,c=`https://${window.location.hostname}/downloads`,d=[s,c],m=`
`,buildDeltaWithLink=(e,t,a)=>{let n=new(r()),i=e.split(t);return i.splice(1,0,t),i.forEach((e,t)=>{1===t?n.insert(e,{link:a}):n.insert(e)}),n},buildDeltaWithChannelLink=(e,t,a,n=!1)=>{let i=new(r()),l=e.split(t);return l.splice(1,0,t),l.forEach((e,t)=>{1===t?i.insert(e,{slackmention:{id:a,label:e,mention:n,unverified:!1}}):i.insert(e)}),i},constructWelcomeDm=(e,t,a)=>{let n,i,l,d,u=((e,t)=>{let a=new(r());if(e&&t){let a=`@${t}`;return buildDeltaWithChannelLink(o.t("Welcome {linkText}! Here are some tips for getting started with Slack:",{linkText:a}),a,e,!0).insert(m).insert(m)}let n=o.t("Welcome! Here are some tips for getting started with Slack:");return a.insert(n).insert(m).insert(m)})(t,a),p=(n=o.t("profile photo"),buildDeltaWithLink(o.t("Update your {linkText}",{linkText:n}),n,s).insert(" ").insert({slackemoji:{text:":sun_with_face:"}}).insert(m,{list:"ordered"})),h=(i=o.t("Download the Slack apps"),buildDeltaWithLink(o.t("{linkText} to stay connected",{linkText:i}),i,c).insert(" ").insert({slackemoji:{text:":computer:"}}).insert(m,{list:"ordered"})),_=(e=>{if(!e)return new(r());let t="#general";return buildDeltaWithChannelLink(o.t("Say hello to everyone in the {linkText} channel",{linkText:t}),t,e).insert(" ").insert({slackemoji:{text:":wave:"}}).insert(m,{list:"ordered"})})(e),f=(l=new(r()),d=o.t("Let me know if you have any questions!"),l.insert(m).insert(d).insert(m));return{contents:u.concat(p).concat(h).concat(_).concat(f)}},parseIsWelcomeDmTemplate=e=>{let t=!1,a=!1;if(e&&e.ops)try{let n=JSON.stringify(e);n.toLowerCase().includes("#general")&&(t=!0),d.some(e=>n.includes(e))&&(a=!0)}catch{}return t&&a}},0x1ab24d57b:(e,t,a)=>{"use strict";a.d(t,{z:()=>u});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x15e48057c),o=a(0x124f71042),s=a(0x21d6ed371),c=a(0x15c7516a2),d=a(0x226892387),m=a(0x1ef125c78);let u=(0,n.Ar)()?e=>{let t,a,n,u,p=(0,r.c)(9),{children:h}=e,_=(0,i.useContext)(l.A),{msg:f,forceLabel:b}=(0,i.useContext)(o.A);p[0]!==f?(t=(0,s.WY)(f),p[0]=f,p[1]=t):t=p[1];let g=t;p[2]!==f?(a=(0,c.j)(f),p[2]=f,p[3]=a):a=p[3];let y=a;p[4]!==g||p[5]!==y?(n=e=>!!(0,m.Kx)(e,{channelId:g,ts:y,ignoreViewContext:!0}),p[4]=g,p[5]=y,p[6]=n):n=p[6];let A=(0,d.d4)(n);return(_||b)&&!A?(p[7]!==h?(u=i.createElement(i.Fragment,null,h),p[7]=h,p[8]=u):u=p[8],u):null}:({children:e})=>{let t=(0,i.useContext)(l.A),{msg:a,forceLabel:n}=(0,i.useContext)(o.A),r=(0,s.WY)(a),u=(0,c.j)(a),p=(0,d.d4)(e=>!!(0,m.Kx)(e,{channelId:r,ts:u,ignoreViewContext:!0}));return(t||n)&&!p?i.createElement(i.Fragment,null,e):null}},0x652e17a5:(e,t,a)=>{"use strict";a.d(t,{W:()=>u});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x124f71042),o=a(0xd843ab47),s=a(0x209d7558d),c=a(0x236e72fc),d=a(0x12ab92fd5),m=a(0x226892387);let u=(0,n.Ar)()?e=>{let t,a,n,u=(0,r.c)(15),{children:p,type:h}=e,{ts:_,channelId:f,msg:b}=(0,i.useContext)(l.A),{container:g}=(0,i.useContext)(o.A);u[0]!==f||u[1]!==b||u[2]!==_?(t=e=>(0,s.M)(e,{ts:_,channelId:f,msg:b}),u[0]=f,u[1]=b,u[2]=_,u[3]=t):t=u[3];let y=(0,m.d4)(t);e:{let e;if(!_||!f||!g||!h){a=void 0;break e}u[4]!==f||u[5]!==g||u[6]!==_||u[7]!==h?(e=(0,d.O)(g,f,_,h),u[4]=f,u[5]=g,u[6]=_,u[7]=h,u[8]=e):e=u[8],a=e}let A=a;if(!A||y&&h!==y||!y&&(0,c.j)(h))return null;if(u[9]!==A||u[10]!==p){let e,t=`aria-labelledby-${A}`;u[12]!==A||u[13]!==t?(e={id:A,hidden:!0,"data-qa":t},u[12]=A,u[13]=t,u[14]=e):e=u[14],n=i.createElement("span",e,p),u[9]=A,u[10]=p,u[11]=n}else n=u[11];return n}:({children:e,type:t})=>{let{ts:a,channelId:n,msg:r}=(0,i.useContext)(l.A),{container:u}=(0,i.useContext)(o.A),p=(0,m.d4)(e=>(0,s.M)(e,{ts:a,channelId:n,msg:r})),h=(0,i.useMemo)(()=>{if(a&&n&&u&&t)return(0,d.O)(u,n,a,t)},[n,u,a,t]);return!h||p&&t!==p||!p&&(0,c.j)(t)?null:i.createElement("span",{id:h,hidden:!0,"data-qa":`aria-labelledby-${h}`},e)};u.displayName="AriaLabelledByElement"},0x46b9c239:(e,t,a)=>{"use strict";a.d(t,{h:()=>T});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x14fad6485),s=a(0x12edaa96a),c=a(0x124f71042),d=a(0xf81a4242),m=a(0x1c907be1b),u=a(0xdfff3bf2),p=a(0x1af3d269c),h=a(0x73564f92),_=a(0x5e713d2c),f=a(0xbda07447),b=a(0x1bb12d33b),g=a(0x6b50b5fd),y=a(0xd843ab47),A=a(0x226892387),x=a(0xd93ecf94);let E=(0,n.Ar)()?e=>{let t,a,n,l,o=(0,r.c)(33),{ts:s,channelId:E,prevTs:C,viewContext:k,container:v,view:S,hideTimestamp:I,includeDate:w}=e,T=(0,A.d4)(e=>(0,x.Ld)(e,E,s))??void 0;o[0]!==E||o[1]!==T||o[2]!==C||o[3]!==s||o[4]!==k?(t={ts:s,channelId:E,msg:T,viewContext:k,prevTs:C},o[0]=E,o[1]=T,o[2]=C,o[3]=s,o[4]=k,o[5]=t):t=o[5];let N=t;o[6]!==v||o[7]!==S?(a={...y.J,container:v,view:S},o[6]=v,o[7]=S,o[8]=a):a=o[8];let M=a;o[9]!==I||o[10]!==w?(n={hideTimestamp:I,includeDate:w},o[9]=I,o[10]=w,o[11]=n):n=o[11];let R=n;if(o[12]!==N||o[13]!==M||o[14]!==R){let e,t;if(o[16]!==N?(e={value:N},o[16]=N,o[17]=e):e=o[17],o[18]!==M||o[19]!==R){let e,a;if(o[21]!==M?(e={value:M},o[21]=M,o[22]=e):e=o[22],o[23]!==R){let e,t,n,r,l,s,c,y;o[25]===Symbol.for("react.memo_cache_sentinel")?(y=i.createElement(f.h,null),e=i.createElement(g.Q,null),t=i.createElement(_.U,null),n=i.createElement(m.k,null),r=i.createElement(b.s,null),l=i.createElement(u.fb,null),s=i.createElement(d.G,null),c=i.createElement(h.P,null),o[25]=e,o[26]=t,o[27]=n,o[28]=r,o[29]=l,o[30]=s,o[31]=c,o[32]=y):(e=o[25],t=o[26],n=o[27],r=o[28],l=o[29],s=o[30],c=o[31],y=o[32]),a=i.createElement(p.c.Provider,{value:R},y,e,t,n,r,l,s,c),o[23]=R,o[24]=a}else a=o[24];t=i.createElement(y.A.Provider,e,a),o[18]=M,o[19]=R,o[20]=t}else t=o[20];l=i.createElement(c.A.Provider,e,t),o[12]=N,o[13]=M,o[14]=R,o[15]=l}else l=o[15];return l}:({ts:e,channelId:t,prevTs:a,viewContext:n,container:r,view:l,hideTimestamp:o,includeDate:s})=>{let E=(0,A.d4)(a=>(0,x.Ld)(a,t,e))??void 0,C=(0,i.useMemo)(()=>({ts:e,channelId:t,msg:E,viewContext:n,prevTs:a}),[e,t,E,n,a]),k=(0,i.useMemo)(()=>({...y.J,container:r,view:l}),[r,l]),v=(0,i.useMemo)(()=>({hideTimestamp:o,includeDate:s}),[o,s]);return i.createElement(c.A.Provider,{value:C},i.createElement(y.A.Provider,{value:k},i.createElement(p.c.Provider,{value:v},i.createElement(f.h,null),i.createElement(g.Q,null),i.createElement(_.U,null),i.createElement(m.k,null),i.createElement(b.s,null),i.createElement(u.fb,null),i.createElement(d.G,null),i.createElement(h.P,null))))};E.displayName="VisuallyHiddenMessage";var C=a(0x7adbadbb),k=a(0x1420931ea),v=a(0xae4df6a1),S=a(0x209d7558d),I=a(0x1cb8dd60e);let w=(0,a(0x11c82607b).Ay)("Compose a string combining all the subcomponent labels for a message, to pass to the announcer API",(e,t,{channelId:a,ts:n,container:r,windowRef:i})=>{let l=t(),o=(0,S.M)(l,{ts:n,channelId:a})??(0,v.e)(l);return(0,I.F)({channelId:a,ts:n,container:r,subcomponents:o}).map(e=>{let t=i.deref()?.document.getElementById(e);return t?.textContent||""}).join(" ")});w.meta={name:"makeStringForMessageAnnouncement",key:"createThunkMakeStringForMessageAnnouncement",description:"Compose a string combining all the subcomponent labels for a message, to pass to the announcer API"};let T=(0,n.Ar)()?()=>{let e,t,a,n=(0,r.c)(8),c=(0,A.wz)(k.DD),d=(0,l.wA)(),{windowRef:m}=(0,i.useContext)(o._0);if(n[0]!==d||n[1]!==c||n[2]!==m?(e=()=>{if(!c?.length||!m)return;let e=c.map(e=>d(w({channelId:e.channelId,ts:e.ts,container:e.container,windowRef:m}))),t=c[0]?.hideTimestamp;d((0,C.rl)({message:`${e.join(" ")}`,assertive:!t,uuid:(0,s.A)()}))},t=[d,c,m],n[0]=d,n[1]=c,n[2]=m,n[3]=e,n[4]=t):(e=n[3],t=n[4]),(0,i.useEffect)(e,t),!c?.length)return null;if(n[5]!==c){let e;n[7]===Symbol.for("react.memo_cache_sentinel")?(e={hidden:!0},n[7]=e):e=n[7],a=i.createElement("div",e,c.map(_temp)),n[5]=c,n[6]=a}else a=n[6];return a}:()=>{let e=(0,A.wz)(k.DD),t=(0,l.wA)(),{windowRef:a}=(0,i.useContext)(o._0);return((0,i.useEffect)(()=>{if(!e?.length||!a)return;let n=e.map(e=>t(w({channelId:e.channelId,ts:e.ts,container:e.container,windowRef:a}))),r=e[0]?.hideTimestamp;t((0,C.rl)({message:`${n.join(" ")}`,assertive:!r,uuid:(0,s.A)()}))},[t,e,a]),e?.length)?i.createElement("div",{hidden:!0},e.map(e=>i.createElement(E,{key:`${e.channelId}-${e.ts}`,ts:e.ts,channelId:e.channelId,prevTs:e.prevTs,viewContext:e.viewContext,container:e.container,view:e.view,hideTimestamp:e.hideTimestamp,includeDate:e.includeDate}))):null};function _temp(e){return i.createElement(E,{key:`${e.channelId}-${e.ts}`,ts:e.ts,channelId:e.channelId,prevTs:e.prevTs,viewContext:e.viewContext,container:e.container,view:e.view,hideTimestamp:e.hideTimestamp,includeDate:e.includeDate})}T.displayName="MessageSummariesForAnnouncerAPIContainer"},0x1c8badc56:(e,t,a)=>{"use strict";a.d(t,{_:()=>d,q:()=>getAttachmentCountPlainTextLabel});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x652e17a5),s=a(0x12afecfaa);let c=new l.Ay("aria_msg_summary");function getAttachmentCountPlainTextLabel({count:e,isLast:t}){let a=c.t("{count, plural, =1 {# attachment} other {# attachments}}, ",{count:e}),n=c.t("{count, plural, =1 {# attachment} other {# attachments}}.",{count:e});return t?n:a}let d=(0,n.Ar)()?e=>{let t,a,n=(0,r.c)(6),{count:l,isLast:c}=e;n[0]!==l||n[1]!==c?(t=getAttachmentCountPlainTextLabel({count:l,isLast:c}),n[0]=l,n[1]=c,n[2]=t):t=n[2];let d=t;if(n[3]!==d){let e;n[5]===Symbol.for("react.memo_cache_sentinel")?(e={type:s.A.attachmentCount},n[5]=e):e=n[5],a=i.createElement(o.W,e,d),n[3]=d,n[4]=a}else a=n[4];return a}:({count:e,isLast:t})=>{let a=(0,i.useMemo)(()=>getAttachmentCountPlainTextLabel({count:e,isLast:t}),[e,t]);return i.createElement(o.W,{type:s.A.attachmentCount},a)};d.displayName="VisuallyHiddenAttachmentCount"},0xf81a4242:(e,t,a)=>{"use strict";a.d(t,{G:()=>VisuallyHiddenBroadcastThreadRootMessage});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x124f71042),s=a(0x1ab24d57b),c=a(0x652e17a5),d=a(0x1ee15af19),m=a(0x1a917cc3b),u=a(0x1dde06271),p=a(0xa9a523c4),h=a(0x94e8342),_=a(0x22d3b4662),f=a(0x14ea3ce99);let getTextForThreadBroadcastRootMessage=(e,t)=>{if((0,h.A)(t.blocks,!0)&&(0,m.n)(t.blocks)&&!(0,p.A)(t))return(0,_.A)(e,t.blocks,{convertEmoji:"phrase"});let a=t.files?.length?(0,d.A)(t.files):void 0,n=a?(0,f.Lp)(e,a):void 0;return(0,u.A)(t,n)};var b=a(0x158809687),g=a(0x1c8b9de2f),y=a(0x1337d9fa2),A=a(0x12afecfaa),x=a(0xc8f018f6),E=a(0x226892387),C=a(0xd93ecf94);let k=new l.Ay("aria_msg_summary"),v=(0,n.Ar)()?()=>{let e,t,a,n,l=(0,r.c)(10),{msg:s,channelId:d}=(0,i.useContext)(o.A),m=void 0===d?"":d,u=s?.root?.ts||"";l[0]!==m||l[1]!==u?(e=e=>(0,C.Ld)(e,m,u),l[0]=m,l[1]=u,l[2]=e):e=l[2];let p=(0,E.d4)(e);l[3]!==p?(t=e=>p?getTextForThreadBroadcastRootMessage(e,p):void 0,l[3]=p,l[4]=t):t=l[4];let h=(0,E.d4)(t);if(!h)return null;if(l[5]!==h){let e=k.t("In reply to: {messageText}",{messageText:h,__react:!0});a=(0,x.S)(e),l[5]=h,l[6]=a}else a=l[6];let _=a;if(!s||(0,y.aK)(s)||(0,g.k)(s)||!(0,y.SM)(s)||!(0,b.n)(s))return null;if(l[7]!==_){let e;l[9]===Symbol.for("react.memo_cache_sentinel")?(e={type:A.A.broadcastThreadRootMessage},l[9]=e):e=l[9],n=i.createElement(c.W,e,_),l[7]=_,l[8]=n}else n=l[8];return n}:()=>{let{msg:e,channelId:t=""}=(0,i.useContext)(o.A),a=e?.root?.ts||"",n=(0,E.d4)(e=>(0,C.Ld)(e,t,a)),r=(0,E.d4)(e=>n?getTextForThreadBroadcastRootMessage(e,n):void 0);if(!r)return null;let l=k.t("In reply to: {messageText}",{messageText:r,__react:!0}),s=(0,x.S)(l);return!e||(0,y.aK)(e)||(0,g.k)(e)||!(0,y.SM)(e)||!(0,b.n)(e)?null:i.createElement(c.W,{type:A.A.broadcastThreadRootMessage},s)};v.displayName="BaseVisuallyHiddenBroadcastThreadRootMessage";let VisuallyHiddenBroadcastThreadRootMessage=()=>i.createElement(s.z,null,i.createElement(v,null))},0x1c907be1b:(e,t,a)=>{"use strict";a.d(t,{k:()=>VisuallyHiddenCounts});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x1ee15af19),o=a(0x124f71042),s=a(0x1ab24d57b),c=a(0x1c8badc56),d=a(0x1f9db3a25),m=a(0x14829f1ec),u=a(0x652e17a5),p=a(0x145fe9ca6),h=a(0x179106a22),_=a(0x12afecfaa),f=a(0x226892387);let b=(0,n.Ar)()?e=>{let t,a,n,l=(0,r.c)(10),{replies:s,scheduled:c,position:d}=e,m=void 0===s?0:s,b=void 0===c?0:c,{msg:g}=(0,i.useContext)(o.A);l[0]!==g?(t=e=>(0,h.k)(e,g),l[0]=g,l[1]=t):t=l[1];let y=(0,f.d4)(t);l[2]!==y||l[3]!==d||l[4]!==m||l[5]!==b?(a=(0,p.f)({replies:m,scheduled:b,position:d,isThreadBroadcastWithNewReplies:y}),l[2]=y,l[3]=d,l[4]=m,l[5]=b,l[6]=a):a=l[6];let A=a;if(!A)return null;if(l[7]!==A){let e;l[9]===Symbol.for("react.memo_cache_sentinel")?(e={type:_.A.replyCount},l[9]=e):e=l[9],n=i.createElement(u.W,e,A),l[7]=A,l[8]=n}else n=l[8];return n}:({replies:e=0,scheduled:t=0,position:a})=>{let{msg:n}=(0,i.useContext)(o.A),r=(0,f.d4)(e=>(0,h.k)(e,n)),l=(0,i.useMemo)(()=>(0,p.f)({replies:e,scheduled:t,position:a,isThreadBroadcastWithNewReplies:r}),[e,t,a,r]);return l?i.createElement(u.W,{type:_.A.replyCount},l):null};b.displayName="VisuallyHiddenReplyCount";var g=a(0xd843ab47),y=a(0xaed5d02c),A=a(0xdf55e8f3);let x={replies:0,scheduled:0},E=(0,A.eI)((e,t)=>{if(!t)return x;let{reply_count:a,channel:n,ts:r,thread_ts:i}=t,l=(0,y.H)(e,{channelId:n,threadTs:i||r})??[];return{replies:a??0,scheduled:l?.length??0}});var C=a(0xae4df6a1),k=a(0x1286af120),v=a(0xa84c5e86),S=a(0xbd3de346),I=a(0x1cf0d97e1),w=a(0x1ccef1c6f),T=a(0x14ea3ce99);let N=(0,I.Ay)((e,t)=>{let a=!!(0,w.ty)(e,"expand_inline_imgs"),n=!!(0,w.ty)(e,"expand_non_media_attachments"),r=(0,v.D)(t,a,n,!1).filter(({id:a,fromUrl:n})=>!!a&&(0,k.W)(e,{attachmentId:a,attachmentFromUrl:n,messageTs:t.ts,channelId:t.channel})),i=(t.files||[]).filter(t=>{let a=(0,T.Lp)(e,t,!1);return!!a&&!((0,S.uO)(a)||(0,S.aK)(a)||(0,S.Sp)(a))});return r.length+i.length});N.meta={name:"getAttachmentCountExcludingMessageUnfurls",key:"createSelectorGetAttachmentCountExcludingMessageUnfurls",description:(e,t)=>{let a=!!(0,w.ty)(e,"expand_inline_imgs"),n=!!(0,w.ty)(e,"expand_non_media_attachments"),r=(0,v.D)(t,a,n,!1).filter(({id:a,fromUrl:n})=>!!a&&(0,k.W)(e,{attachmentId:a,attachmentFromUrl:n,messageTs:t.ts,channelId:t.channel})),i=(t.files||[]).filter(t=>{let a=(0,T.Lp)(e,t,!1);return!!a&&!((0,S.uO)(a)||(0,S.aK)(a)||(0,S.Sp)(a))});return r.length+i.length}};var M=a(0x1ac77f705),R=a(0x1c8b9de2f),P=a(0x1337d9fa2),L=a(0x1d37f5c8a),O=a(0x1b645cd51),D=a(0x1beeaa71e);let F=(0,n.Ar)()?()=>{let e,t,a,n,s,u,p,y,A,k,v,S,I=(0,r.c)(55),{msg:w}=(0,i.useContext)(o.A),{container:F}=(0,i.useContext)(g.A),{replyCount:U,attachmentCount:B,linkCount:H,reactionCount:W}=_.A;I[0]!==w?(e=e=>(0,h.k)(e,w),I[0]=w,I[1]=e):e=I[1];let V=(0,f.d4)(e),G=(0,f.d4)(C.e);I[2]!==G?(t=G.includes(W),I[2]=G,I[3]=t):t=I[3];let q=t,j=G.includes(H);I[4]!==G?(a=G.includes(B),I[4]=G,I[5]=a):a=I[5];let z=a;I[6]!==G?(n=G.includes(U),I[6]=G,I[7]=n):n=I[7];let K=n,$=w?.files;I[8]!==$?(s=(0,l.A)($),I[8]=$,I[9]=s):s=I[9];let Y=s;I[10]!==Y||I[11]!==q?(u=e=>Y&&q?(0,T.Lp)(e,Y):void 0,I[10]=Y,I[11]=q,I[12]=u):u=I[12];let Q=(0,f.d4)(u);I[13]!==Q||I[14]!==w?(p=w?(0,L.J)(w,Q):void 0,I[13]=Q,I[14]=w,I[15]=p):p=I[15];let Z=p;I[16]!==Z||I[17]!==q?(y=e=>q&&Z?(0,D.pK)(e,Z):0,I[16]=Z,I[17]=q,I[18]=y):y=I[18];let J=(0,f.d4)(y),X=j&&w?(0,M.F)({messageBlocks:w?.blocks}):0;I[19]!==w||I[20]!==z?(A=e=>z&&w?N(e,w):0,I[19]=w,I[20]=z,I[21]=A):A=I[21];let ee=(0,f.d4)(A);I[22]!==w||I[23]!==K?(k=e=>K?E(e,w):x,I[22]=w,I[23]=K,I[24]=k):k=I[24];let{replies:et,scheduled:ea}=(0,f.Z2)(k);if(!w||(0,R.k)(w))return null;let en=(0,O.L)({subcomponents:G,isTombstone:(0,P.aK)(w),replies:et,scheduled:ea,reactionCount:J,attachmentCount:ee,linkCount:X,viewContainer:F,showThreadBroadcastHasReplies:V});I[25]!==en?(v=Object.keys(en),I[25]=en,I[26]=v):v=I[26];let er=v,ei=er.includes(W),el=er.includes(B),eo=er.includes(H),es=er.includes(U);if(I[27]!==ee||I[28]!==en||I[29]!==el||I[30]!==eo||I[31]!==ei||I[32]!==es||I[33]!==X||I[34]!==J||I[35]!==et||I[36]!==ea){let e,t,a,n;I[38]!==en||I[39]!==ei||I[40]!==J?(e=ei&&i.createElement(m.A,{count:J,isLast:en[W].isLast}),I[38]=en,I[39]=ei,I[40]=J,I[41]=e):e=I[41],I[42]!==ee||I[43]!==en||I[44]!==el?(t=el&&i.createElement(c._,{count:ee,isLast:en[B].isLast}),I[42]=ee,I[43]=en,I[44]=el,I[45]=t):t=I[45],I[46]!==en||I[47]!==eo||I[48]!==X?(a=eo&&i.createElement(d.Z,{count:X,isLast:en[H].isLast}),I[46]=en,I[47]=eo,I[48]=X,I[49]=a):a=I[49],I[50]!==en||I[51]!==es||I[52]!==et||I[53]!==ea?(n=es&&i.createElement(b,{replies:et,scheduled:ea,position:en[U]}),I[50]=en,I[51]=es,I[52]=et,I[53]=ea,I[54]=n):n=I[54],S=i.createElement(i.Fragment,null,e,t,a,n),I[27]=ee,I[28]=en,I[29]=el,I[30]=eo,I[31]=ei,I[32]=es,I[33]=X,I[34]=J,I[35]=et,I[36]=ea,I[37]=S}else S=I[37];return S}:()=>{let{msg:e}=(0,i.useContext)(o.A),{container:t}=(0,i.useContext)(g.A),{replyCount:a,attachmentCount:n,linkCount:r,reactionCount:s}=_.A,u=(0,f.d4)(t=>(0,h.k)(t,e)),p=(0,f.d4)(C.e),y=p.includes(s),A=p.includes(r),k=p.includes(n),v=p.includes(a),S=e?.files,I=(0,l.A)(S),w=(0,f.d4)(e=>I&&y?(0,T.Lp)(e,I):void 0),F=e?(0,L.J)(e,w):void 0,U=(0,f.d4)(e=>y&&F?(0,D.pK)(e,F):0),B=A&&e?(0,M.F)({messageBlocks:e?.blocks}):0,H=(0,f.d4)(t=>k&&e?N(t,e):0),{replies:W,scheduled:V}=(0,f.Z2)(t=>v?E(t,e):x);if(!e||(0,R.k)(e))return null;let G=(0,O.L)({subcomponents:p,isTombstone:(0,P.aK)(e),replies:W,scheduled:V,reactionCount:U,attachmentCount:H,linkCount:B,viewContainer:t,showThreadBroadcastHasReplies:u}),q=Object.keys(G),j=q.includes(s),z=q.includes(n),K=q.includes(r),$=q.includes(a);return i.createElement(i.Fragment,null,j&&i.createElement(m.A,{count:U,isLast:G[s].isLast}),z&&i.createElement(c._,{count:H,isLast:G[n].isLast}),K&&i.createElement(d.Z,{count:B,isLast:G[r].isLast}),$&&i.createElement(b,{replies:W,scheduled:V,position:G[a]}))};F.displayName="BaseVisuallyHiddenCounts";let VisuallyHiddenCounts=()=>i.createElement(s.z,null,i.createElement(F,null))},0xdfff3bf2:(e,t,a)=>{"use strict";a.d(t,{fb:()=>VisuallyHiddenImageAltText,sI:()=>getAltTextPlainTextLabel});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x1595bdd0),o=a(0x20ef3966f),s=a(0x21f3c49e8),c=a(0x20482ad21),d=a(0x124f71042),m=a(0x1ab24d57b),u=a(0x652e17a5),p=a(0xbd3de346),h=a(0x22fd0ecc8),_=a(0x12afecfaa),f=a(0xa985ed31),b=a(0xc8f018f6),g=a(0x226892387),y=a(0x14ea3ce99),A=a(0x357dacc7);let x=new c.Ay("aria_msg_summary");function getAltTextPlainTextLabel(e){let t=x.t("No alt text");return 1===e.length?(0,b.S)(x.t("Image: {altText}",{altText:e[0]||t,__react:!0})):e.map((e,a)=>(0,b.S)(x.t("Image {index}: {altText}",{index:a+1,altText:e||t,__react:!0}))).join(" ")}let E=(0,n.Ar)()?()=>{let e,t,a,n,c,m,p=(0,r.c)(13),{msg:h}=(0,i.useContext)(d.A);p[0]!==h?.files?(e=h?.files??[],p[0]=h?.files,p[1]=e):e=p[1];let b=e;if(p[2]!==b||p[3]!==h?.pendingFiles){let e=h?.pendingFiles?.filter(e=>!b?.includes(e))??[];t=[...b,...e],p[2]=b,p[3]=h?.pendingFiles,p[4]=t}else t=p[4];let x=t;p[5]!==x?(a=e=>(0,l.A)((0,o.A)(x,t=>(0,f.A)(t)?(0,y.Lp)(e,t):(0,A.Oq)(e,{pendingFileId:t}))),p[5]=x,p[6]=a):a=p[6];let E=(0,g.Z2)(a);if(!h||(0,s.A)(E))return null;if(p[7]!==E){c=Symbol.for("react.early_return_sentinel");e:{let e=E.filter(_temp);if((0,s.A)(e)){c=null;break e}n=getAltTextPlainTextLabel(e.map(_temp2))}p[7]=E,p[8]=n,p[9]=c}else n=p[8],c=p[9];if(c!==Symbol.for("react.early_return_sentinel"))return c;let C=n;if(p[10]!==C){let e;p[12]===Symbol.for("react.memo_cache_sentinel")?(e={type:_.A.altText},p[12]=e):e=p[12],m=i.createElement(u.W,e,C),p[10]=C,p[11]=m}else m=p[11];return m}:()=>{let{msg:e}=(0,i.useContext)(d.A),t=e?.files??[],a=e?.pendingFiles?.filter(e=>!t?.includes(e))??[],n=[...t,...a],r=(0,g.Z2)(e=>(0,l.A)((0,o.A)(n,t=>(0,f.A)(t)?(0,y.Lp)(e,t):(0,A.Oq)(e,{pendingFileId:t}))));if(!e||(0,s.A)(r))return null;let c=r.filter(e=>{if((0,p.E$)(e))return(0,p.sJ)(e);let t=e.file;return(0,p.Cd)(t)&&(0,p.eX)(t)});if((0,s.A)(c))return null;let m=getAltTextPlainTextLabel(c.map(e=>(0,p.E$)(e)?(0,h.zo)(e)?(0,h.dh)(e):null:e.altText??null));return i.createElement(u.W,{type:_.A.altText},m)};E.displayName="BaseVisuallyHiddenImageAltText";let VisuallyHiddenImageAltText=()=>i.createElement(m.z,null,i.createElement(E,null));function _temp(e){if((0,p.E$)(e))return(0,p.sJ)(e);let t=e.file;return(0,p.Cd)(t)&&(0,p.eX)(t)}function _temp2(e){return(0,p.E$)(e)?(0,h.zo)(e)?(0,h.dh)(e):null:e.altText??null}},0x1f9db3a25:(e,t,a)=>{"use strict";a.d(t,{J:()=>getLinkCountPlainTextLabel,Z:()=>d});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x652e17a5),s=a(0x12afecfaa);let c=new l.Ay("aria_msg_summary");function getLinkCountPlainTextLabel({count:e,isLast:t}){let a=c.t("{count, plural, =1 {# link} other {# links}}.",{count:e}),n=c.t("{count, plural, =1 {# link} other {# links}}, ",{count:e});return t?a:n}let d=(0,n.Ar)()?e=>{let t,a,n=(0,r.c)(6),{count:l,isLast:c}=e;n[0]!==l||n[1]!==c?(t=getLinkCountPlainTextLabel({count:l,isLast:c}),n[0]=l,n[1]=c,n[2]=t):t=n[2];let d=t;if(n[3]!==d){let e;n[5]===Symbol.for("react.memo_cache_sentinel")?(e={type:s.A.linkCount},n[5]=e):e=n[5],a=i.createElement(o.W,e,d),n[3]=d,n[4]=a}else a=n[4];return a}:({count:e,isLast:t})=>{let a=(0,i.useMemo)(()=>getLinkCountPlainTextLabel({count:e,isLast:t}),[e,t]);return i.createElement(o.W,{type:s.A.linkCount},a)};d.displayName="VisuallyHiddenLinkCount"},0x1af3d269c:(e,t,a)=>{"use strict";a.d(t,{c:()=>n});let n=a(0xbad225b5).createContext({});n.displayName="VisuallyHiddenMessageContext"},0x73564f92:(e,t,a)=>{"use strict";a.d(t,{P:()=>VisuallyHiddenMessageSummary});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x124f71042),o=a(0x1ab24d57b),s=a(0x652e17a5),c=a(0x209d7558d),d=a(0x20b4dda68),m=a(0x20482ad21),u=a(0x82980ab8),p=a(0x12afecfaa),h=a(0x10079cc7),_=a(0x1cf0d97e1),f=a(0x14149c126),b=a(0xe684f705);let g=new m.Ay("aria_msg_summary"),y=(0,_.Ay)((e,t)=>{if(!t)return null;if(t===p.W.beyondFreeLimit)return g.t("Preview of a locked message older than {limitInDays} days. Start a free trial to unlock.",{limitInDays:h.RF});if(t===p.W.streaming){let t="on"===(0,f._Z)(e,"new_slackbot_voice_announcement_messages"),a=(0,b.nv)(e,d.Q$),n=(0,u.wg)(a)||"Slackbot";return t?g.t("{slackbotName} is typing\u2026",{slackbotName:n}):`${n} is typing\u{2026}`}return p.W.unsupportedNonAutomatedSubtype,null});y.meta={name:"getVisuallyHiddenMessageSummaryText",key:"createSelectorGetVisuallyHiddenMessageSummaryText",description:(e,t)=>{if(!t)return null;if(t===p.W.beyondFreeLimit)return g.t("Preview of a locked message older than {limitInDays} days. Start a free trial to unlock.",{limitInDays:h.RF});if(t===p.W.streaming){let t="on"===(0,f._Z)(e,"new_slackbot_voice_announcement_messages"),a=(0,b.nv)(e,d.Q$),n=(0,u.wg)(a)||"Slackbot";return t?g.t("{slackbotName} is typing\u2026",{slackbotName:n}):`${n} is typing\u{2026}`}return p.W.unsupportedNonAutomatedSubtype,null}};var A=a(0x226892387);let x=(0,n.Ar)()?()=>{let e,t,a,n=(0,r.c)(11),{ts:o,channelId:d,msg:m}=(0,i.useContext)(l.A);n[0]!==d||n[1]!==m||n[2]!==o?(e=e=>(0,c.M)(e,{ts:o,channelId:d,msg:m}),n[0]=d,n[1]=m,n[2]=o,n[3]=e):e=n[3];let u=(0,A.d4)(e);n[4]!==u?(t=e=>y(e,u),n[4]=u,n[5]=t):t=n[5];let p=(0,A.d4)(t);if(!u)return null;if(n[6]!==p||n[7]!==u){let e;n[9]!==u?(e={type:u},n[9]=u,n[10]=e):e=n[10],a=i.createElement(s.W,e,p),n[6]=p,n[7]=u,n[8]=a}else a=n[8];return a}:()=>{let{ts:e,channelId:t,msg:a}=(0,i.useContext)(l.A),n=(0,A.d4)(n=>(0,c.M)(n,{ts:e,channelId:t,msg:a})),r=(0,A.d4)(e=>y(e,n));return n?i.createElement(s.W,{type:n},r):null};x.displayName="BaseVisuallyHiddenMessageSummary";let VisuallyHiddenMessageSummary=()=>i.createElement(o.z,null,i.createElement(x,null))},0x5e713d2c:(e,t,a)=>{"use strict";a.d(t,{U:()=>VisuallyHiddenMessageText});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x124f71042),o=a(0x1ab24d57b),s=a(0x652e17a5),c=a(0x1178eb664),d=a(0x12afecfaa),m=a(0xc8f018f6),u=a(0x226892387),p=a(0x72f6f21f);let h=(0,n.Ar)()?()=>{let e,t,a,n=(0,r.c)(11),{msg:o,channelId:p,rollup:h,viewContext:_,prevTs:f}=(0,i.useContext)(l.A);n[0]!==p||n[1]!==o||n[2]!==f||n[3]!==h||n[4]!==_?(e=e=>(0,c.P)(e,{msg:o,channelId:p,previousMessageTs:f,rollup:h,viewContext:_}),n[0]=p,n[1]=o,n[2]=f,n[3]=h,n[4]=_,n[5]=e):e=n[5];let b=(0,u.d4)(e);n[6]!==b?(t=(0,m.S)(b),n[6]=b,n[7]=t):t=n[7];let g=t;if(n[8]!==g){let e;n[10]===Symbol.for("react.memo_cache_sentinel")?(e={type:d.A.messageText},n[10]=e):e=n[10],a=i.createElement(s.W,e,g),n[8]=g,n[9]=a}else a=n[9];return a}:()=>{let{msg:e,channelId:t,rollup:a,viewContext:n,prevTs:r}=(0,i.useContext)(l.A),o=(0,u.d4)(i=>(0,c.P)(i,{msg:e,channelId:t,previousMessageTs:r,rollup:a,viewContext:n})),p=(0,i.useMemo)(()=>(0,m.S)(o),[o]);return i.createElement(s.W,{type:d.A.messageText},p)};h.displayName="BaseMessageText";let _=(0,n.Ar)()?()=>{let e,t,a=(0,r.c)(7),{channelId:n,ts:o}=(0,i.useContext)(l.A);a[0]!==n||a[1]!==o?(e=e=>n&&o?(0,p.wM)(e,n,o):void 0,a[0]=n,a[1]=o,a[2]=e):e=a[2];let c=(0,u.d4)(e);if(c?.showTranslation&&c.text){let e;if(a[3]!==c.text){let t;a[5]===Symbol.for("react.memo_cache_sentinel")?(t={type:d.A.messageText},a[5]=t):t=a[5],e=i.createElement(s.W,t,c.text),a[3]=c.text,a[4]=e}else e=a[4];return e}return a[6]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement(h,null),a[6]=t):t=a[6],t}:()=>{let{channelId:e,ts:t}=(0,i.useContext)(l.A),a=(0,u.d4)(a=>e&&t?(0,p.wM)(a,e,t):void 0);return a?.showTranslation&&a.text?i.createElement(s.W,{type:d.A.messageText},a.text):i.createElement(h,null)};_.displayName="BaseVisuallyHiddenMessageText";let VisuallyHiddenMessageText=()=>i.createElement(o.z,null,i.createElement(_,null))},0x14829f1ec:(e,t,a)=>{"use strict";a.d(t,{A:()=>d,s:()=>getReactionCountPlainTextLabel});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x652e17a5),s=a(0x12afecfaa);let c=new l.Ay("aria_msg_summary");function getReactionCountPlainTextLabel({count:e,isLast:t}){let a=c.t("{count, plural, =1 {# reaction} other {# reactions}}, ",{count:e}),n=c.t("{count, plural, =1 {# reaction} other {# reactions}}.",{count:e});return t?n:a}let d=(0,n.Ar)()?e=>{let t,a,n=(0,r.c)(6),{count:l,isLast:c}=e;n[0]!==l||n[1]!==c?(t=getReactionCountPlainTextLabel({count:l,isLast:c}),n[0]=l,n[1]=c,n[2]=t):t=n[2];let d=t;if(n[3]!==d){let e;n[5]===Symbol.for("react.memo_cache_sentinel")?(e={type:s.A.reactionCount},n[5]=e):e=n[5],a=i.createElement(o.W,e,d),n[3]=d,n[4]=a}else a=n[4];return a}:({count:e,isLast:t})=>{let a=(0,i.useMemo)(()=>getReactionCountPlainTextLabel({count:e,isLast:t}),[e,t]);return i.createElement(o.W,{type:s.A.reactionCount},a)};d.displayName="VisuallyHiddenReactionCount"},0xbda07447:(e,t,a)=>{"use strict";a.d(t,{h:()=>VisuallyHiddenSender,z:()=>getSenderText});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x124f71042),s=a(0x1ab24d57b),c=a(0x652e17a5),d=a(0x1af3d269c),m=a(0xee100d17),u=a(0xbc76db4d),p=a(0x21d6ed371),h=a(0xa88049da),_=a(0x1c7106d6c),f=a(0x1337d9fa2),b=a(0x2215561bf),g=a(0xdf55e8f3),y=a(0x14149c126),A=a(0xb129c1d5);let x=new l.Ay("message"),E=(0,g.eI)((e,t)=>{if(!e)return;let a=(0,p.Hr)(e),n=!!a&&(0,A.a)(t,a),r=(0,f.s7)(e)||(0,f.Dv)(e)||(0,f.TD)(e),i=(0,_.A)(t,e),l=(0,u.l)(t),o=(0,h.A)(t,e).isAssistantThread,s="on"===(0,y._Z)(t,"channel_folders_post_ga");return n||i?{text:x.t("Someone you\u2019ve hidden")}:r?{text:(0,b.A)(e)}:l&&o?{text:x.t("Assistant")}:(0,f.cb)(e)||(0,f.Ni)(e)?{text:x.t("Canvas updated")}:(0,f.gA)(e)?{text:x.t("Folder added")}:s&&(0,f.Lo)(e)?e.item_added_user_ids&&e.item_added_user_ids.length>1?{text:x.t("Items added")}:{text:x.t("Item added")}:void 0});var C=a(0x128f278bf),k=a(0x270bab0e),v=a(0x1c8b9de2f),S=a(0x12afecfaa),I=a(0xc8f018f6),w=a(0x226892387);let T=new l.Ay("aria_msg_summary"),getSenderText=({sender:e,senderTextWithTerminalPunctuation:t,senderIsFollowedByMessageText:a,senderIsFollowedByDateTime:n,hideTimestamp:r})=>n&&!r?e:a?T.t("{sender}:",{sender:e,__react:!0}):t,N=(0,n.Ar)()?()=>{let e,t,a,n,l=(0,r.c)(13),{msg:s}=(0,i.useContext)(o.A),u=(0,w.d4)(k.R),p=(0,w.d4)(C.c),{hideTimestamp:h}=(0,i.useContext)(d.c);l[0]!==s?(e=e=>(0,m.L)(s,e),l[0]=s,l[1]=e):e=l[1];let _=(0,w.Z2)(e),{text:b}=(0,w.Z2)(e=>E(s,e))||{},g=b||_;l[2]!==g?(t=g?(0,I.S)(g):void 0,l[2]=g,l[3]=t):t=l[3];let y=t;l[4]!==h||l[5]!==g||l[6]!==p||l[7]!==u||l[8]!==y?(a=g&&y?getSenderText({sender:g,senderTextWithTerminalPunctuation:y,senderIsFollowedByMessageText:u,senderIsFollowedByDateTime:p,hideTimestamp:h}):void 0,l[4]=h,l[5]=g,l[6]=p,l[7]=u,l[8]=y,l[9]=a):a=l[9];let A=a;if(!s||!A||(0,f.aK)(s)||(0,v.k)(s))return null;if(l[10]!==A){let e;l[12]===Symbol.for("react.memo_cache_sentinel")?(e={type:S.A.sender},l[12]=e):e=l[12],n=i.createElement(c.W,e,A),l[10]=A,l[11]=n}else n=l[11];return n}:()=>{let{msg:e}=(0,i.useContext)(o.A),t=(0,w.d4)(k.R),a=(0,w.d4)(C.c),{hideTimestamp:n}=(0,i.useContext)(d.c),r=(0,w.Z2)(t=>(0,m.L)(e,t)),{text:l}=(0,w.Z2)(t=>E(e,t))||{},s=l||r,u=(0,i.useMemo)(()=>s?(0,I.S)(s):void 0,[s]),p=(0,i.useMemo)(()=>s&&u?getSenderText({sender:s,senderTextWithTerminalPunctuation:u,senderIsFollowedByMessageText:t,senderIsFollowedByDateTime:a,hideTimestamp:n}):void 0,[s,u,t,a,n]);return!e||!p||(0,f.aK)(e)||(0,v.k)(e)?null:i.createElement(c.W,{type:S.A.sender},p)};N.displayName="BaseVisuallyHiddenSender";let VisuallyHiddenSender=()=>i.createElement(s.z,null,i.createElement(N,null))},0x1bb12d33b:(e,t,a)=>{"use strict";a.d(t,{s:()=>VisuallyHiddenStates});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x124f71042),o=a(0x1ab24d57b),s=a(0x6437000),c=a(0x652e17a5),d=a(0x12afecfaa);let VisuallyHiddenBroadcastStateIndicator=({isIm:e,isMpim:t})=>i.createElement(o.z,null,i.createElement(c.W,{type:d.A.broadcastState},i.createElement(s.z,{isIm:e,isMpim:t})));var m=a(0x1a74a4e59),u=a(0x145b7a49c);let p=(0,n.Ar)()?()=>{let e,t=(0,r.c)(2),a=(0,i.useContext)(u.T);return t[0]!==a?(e=(0,m.J)({position:a}),t[0]=a,t[1]=e):e=t[1],e}:()=>{let e=(0,i.useContext)(u.T);return(0,m.J)({position:e})},VisuallyHiddenDraftReplyStateIndicator=()=>i.createElement(o.z,null,i.createElement(c.W,{type:d.A.hasDraftReply},i.createElement(p,null)));var h=a(0x13776886e),_=a(0x252f0da49),f=a(0x192eafd82),b=a(0x1e03159e1),g=a(0x1ccef1c6f),y=a(0x226892387);let A=(0,n.Ar)()?e=>{let t,a=(0,r.c)(5),{editedTs:n,isArchivedComment:l}=e,o=(0,i.useContext)(u.T),s=(0,y.d4)(_temp);if(a[0]!==s||a[1]!==n||a[2]!==l||a[3]!==o){let e=n?(0,_.J)((0,b.E)(n)):void 0,r=n?(0,h.A)(n,"{time}",{do24hrTime:s,includeSeconds:!1}):void 0;t=(0,f.b)({position:o,editedDate:e,editedTime:r,isArchivedComment:l}),a[0]=s,a[1]=n,a[2]=l,a[3]=o,a[4]=t}else t=a[4];return t}:({editedTs:e,isArchivedComment:t})=>{let a=(0,i.useContext)(u.T),n=(0,y.d4)(e=>(0,g.ty)(e,"time24")),r=e?(0,_.J)((0,b.E)(e)):void 0,l=e?(0,h.A)(e,"{time}",{do24hrTime:n,includeSeconds:!1}):void 0;return(0,f.b)({position:a,editedDate:r,editedTime:l,isArchivedComment:t})};function _temp(e){return(0,g.ty)(e,"time24")}let VisuallyHiddenEditedStateIndicator=({editedTs:e,isArchivedComment:t})=>i.createElement(o.z,null,i.createElement(c.W,{type:d.A.editedState},i.createElement(A,{editedTs:e,isArchivedComment:t})));VisuallyHiddenEditedStateIndicator.displayName="VisuallyHiddenEditedStateIndicator";var x=a(0x1b7e4e34f),E=a(0x19c76d181);let C=(0,n.Ar)()?e=>{let t,a=(0,r.c)(4),{pinnedBy:n}=e,l=(0,y.d4)(E.WR);if(a[0]!==l||a[1]!==n){let e;a[3]===Symbol.for("react.memo_cache_sentinel")?(e={type:d.A.pinnedState},a[3]=e):e=a[3],t=i.createElement(o.z,null,i.createElement(c.W,e,i.createElement(x.s,{currentUserId:l,pinnedBy:n}))),a[0]=l,a[1]=n,a[2]=t}else t=a[2];return t}:({pinnedBy:e})=>{let t=(0,y.d4)(E.WR);return i.createElement(o.z,null,i.createElement(c.W,{type:d.A.pinnedState},i.createElement(x.s,{currentUserId:t,pinnedBy:e})))};C.displayName="VisuallyHiddenPinnedStateIndicator";var k=a(0x127f9a1e7);let VisuallyHiddenSavedStateIndicator=({dateDue:e})=>i.createElement(o.z,null,i.createElement(c.W,{type:d.A.laterState},i.createElement(k.U,{dateDue:e})));var v=a(0x1aba758f1),S=a(0xd843ab47),I=a(0x21f3c49e8),w=a(0x1cf0d97e1),T=a(0x1c2eef3c8);let N=(0,w.Ay)((e,t)=>{if(!t)return!1;let{channel:a,ts:n,thread_ts:r}=t,i=(0,T.N8)(e,{channelId:a,threadTs:r||n});return!(0,I.A)(i)});N.meta={name:"getMessageHasDraftReply",key:"createSelectorGetMessageHasDraftReply",description:(e,t)=>{if(!t)return!1;let{channel:a,ts:n,thread_ts:r}=t,i=(0,T.N8)(e,{channelId:a,threadTs:r||n});return!(0,I.A)(i)}};var M=a(0xae4df6a1),R=a(0x12185e091),P=a(0x21d6ed371),L=a(0x158809687),O=a(0x1c8b9de2f),D=a(0x1337d9fa2),F=a(0xde0eb57),U=a(0x72f6f21f),B=a(0x14f1f708),H=a(0x167fa6898),W=a(0x217553e42);let V=(0,n.Ar)()?()=>{let e,t,a,n,o,s,c,m,p,h,_,f,b,g=(0,r.c)(83),{msg:A,channelId:x,ts:E}=(0,i.useContext)(l.A),{view:k}=(0,i.useContext)(S.A),{editedState:I,pinnedState:w,laterState:T,translatedState:V,broadcastState:G,hasDraftReply:q}=d.A,j=(0,y.d4)(M.e),z=j.includes(I),K=j.includes(w),$=j.includes(T),Y=j.includes(V),Q=j.includes(G);g[0]!==j?(e=j.includes(q),g[0]=j,g[1]=e):e=g[1];let Z=e;g[2]!==A?(t=e=>(0,B.d)(e,A),g[2]=A,g[3]=t):t=g[3];let J=(0,y.d4)(t);g[4]!==x||g[5]!==E?(a=e=>x&&E?(0,U.wM)(e,x,E):void 0,g[4]=x,g[5]=E,g[6]=a):a=g[6];let X=(0,y.d4)(a);g[7]!==x?(n=e=>(0,W.OL)(e,x),g[7]=x,g[8]=n):n=g[8];let ee=(0,y.d4)(n);g[9]!==A||g[10]!==Z?(o=e=>!!Z&&N(e,A),g[9]=A,g[10]=Z,g[11]=o):o=g[11];let et=(0,y.d4)(o);e:{let e,t,a;if(!z||!(0,P.U8)(A)||!(0,P.nZ)(A)){s=void 0;break e}g[12]!==A?(e=(0,P.M8)(A),g[12]=A,g[13]=e):e=g[13];let n=e;if(!n){s=void 0;break e}g[14]!==A?(t=(0,P.$Q)(A),g[14]=A,g[15]=t):t=g[15],g[16]!==n||g[17]!==t?(a={editedTs:n,isArchivedComment:t},g[16]=n,g[17]=t,g[18]=a):a=g[18],s=a}let ea=s;t:{let e,t;if(!K){c=void 0;break t}g[19]!==A?(e=(0,P.gT)(A),g[19]=A,g[20]=e):e=g[20];let a=e;if(!a){c=void 0;break t}g[21]!==a.pinnedBy?(t={pinnedBy:a.pinnedBy},g[21]=a.pinnedBy,g[22]=t):t=g[22],c=t}let en=c;a:{let e;if(!$||!(0,P.P9)(A)||A?.saved?.is_archived){m=void 0;break a}let t=A?.saved?.date_due;g[23]!==t?(e={dateDue:t},g[23]=t,g[24]=e):e=g[24],m=e}let er=m;n:{let e;if(!Y||!J&&X?.status!==H.Ex.COMPLETE){p=void 0;break n}g[25]!==X||g[26]!==J?(e={offerTranslationForMessage:J,aiTranslation:X},g[25]=X,g[26]=J,g[27]=e):e=g[27],p=e}let ei=p;r:{let e,t,a;if(!Q||!(0,D.SM)(A)||!(0,L.n)(A)){h=void 0;break r}g[28]!==ee?(e=(0,R.LI)(ee),g[28]=ee,g[29]=e):e=g[29],g[30]!==ee?(t=(0,R.yz)(ee),g[30]=ee,g[31]=t):t=g[31],g[32]!==e||g[33]!==t?(a={isIm:e,isMpim:t},g[32]=e,g[33]=t,g[34]=a):a=g[34],h=a}let el=h;if(!A||(0,O.k)(A))return null;let eo=!!ea,es=!!en,ec=!!er,ed=!!ei,em=!!el;g[35]!==et||g[36]!==em||g[37]!==eo||g[38]!==es||g[39]!==ec||g[40]!==ed||g[41]!==A||g[42]!==j||g[43]!==k?.viewType?(_=(0,F.H)({subcomponents:j,isTombstone:(0,D.aK)(A),isEdited:eo,isPinned:es,isSaved:ec,isTranslated:ed,isBroadcasted:em,hasDraftReply:et,viewType:k?.viewType}),g[35]=et,g[36]=em,g[37]=eo,g[38]=es,g[39]=ec,g[40]=ed,g[41]=A,g[42]=j,g[43]=k?.viewType,g[44]=_):_=g[44];let eu=_;g[45]!==eu?(f=Object.keys(eu),g[45]=eu,g[46]=f):f=g[46];let ep=f,eh=ep.includes(I)&&eo,e_=ep.includes(w)&&es,ef=ep.includes(T)&&ec,eb=ep.includes(V)&&ed,eg=ep.includes(G)&&em,ey=ep.includes(q)&&et;if(g[47]!==el||g[48]!==ea||g[49]!==eg||g[50]!==eh||g[51]!==ey||g[52]!==e_||g[53]!==ef||g[54]!==eb||g[55]!==en||g[56]!==er||g[57]!==eu||g[58]!==ei){let e,t,a,n,r,l;g[60]!==ea||g[61]!==eh||g[62]!==eu?(e=eh&&i.createElement(u.q,{isFirst:eu[I].isFirst,isLast:eu[I].isLast},i.createElement(VisuallyHiddenEditedStateIndicator,{editedTs:ea.editedTs,isArchivedComment:ea.isArchivedComment})),g[60]=ea,g[61]=eh,g[62]=eu,g[63]=e):e=g[63],g[64]!==e_||g[65]!==en||g[66]!==eu?(t=e_&&i.createElement(u.q,{isFirst:eu[w].isFirst,isLast:eu[w].isLast},i.createElement(C,{pinnedBy:en.pinnedBy})),g[64]=e_,g[65]=en,g[66]=eu,g[67]=t):t=g[67],g[68]!==ef||g[69]!==er||g[70]!==eu?(a=ef&&i.createElement(u.q,{isFirst:eu[T].isFirst,isLast:eu[T].isLast},i.createElement(VisuallyHiddenSavedStateIndicator,{dateDue:er.dateDue})),g[68]=ef,g[69]=er,g[70]=eu,g[71]=a):a=g[71],g[72]!==eb||g[73]!==eu||g[74]!==ei?(n=eb&&i.createElement(u.q,{isFirst:eu[V].isFirst,isLast:eu[V].isLast},i.createElement(v.G,{offerTranslationForMessage:ei.offerTranslationForMessage,aiTranslation:ei.aiTranslation})),g[72]=eb,g[73]=eu,g[74]=ei,g[75]=n):n=g[75],g[76]!==el||g[77]!==eg||g[78]!==eu?(r=eg&&i.createElement(u.q,{isFirst:eu[G].isFirst,isLast:eu[G].isLast},i.createElement(VisuallyHiddenBroadcastStateIndicator,{isIm:el.isIm,isMpim:el.isMpim})),g[76]=el,g[77]=eg,g[78]=eu,g[79]=r):r=g[79],g[80]!==ey||g[81]!==eu?(l=ey&&i.createElement(u.q,{isFirst:eu[q].isFirst,isLast:eu[q].isLast},i.createElement(VisuallyHiddenDraftReplyStateIndicator,null)),g[80]=ey,g[81]=eu,g[82]=l):l=g[82],b=i.createElement(i.Fragment,null,e,t,a,n,r,l),g[47]=el,g[48]=ea,g[49]=eg,g[50]=eh,g[51]=ey,g[52]=e_,g[53]=ef,g[54]=eb,g[55]=en,g[56]=er,g[57]=eu,g[58]=ei,g[59]=b}else b=g[59];return b}:()=>{let{msg:e,channelId:t,ts:a}=(0,i.useContext)(l.A),{view:n}=(0,i.useContext)(S.A),{editedState:r,pinnedState:o,laterState:s,translatedState:c,broadcastState:m,hasDraftReply:p}=d.A,h=(0,y.d4)(M.e),_=h.includes(r),f=h.includes(o),b=h.includes(s),g=h.includes(c),A=h.includes(m),x=h.includes(p),E=(0,y.d4)(t=>(0,B.d)(t,e)),k=(0,y.d4)(e=>t&&a?(0,U.wM)(e,t,a):void 0),I=(0,y.d4)(e=>(0,W.OL)(e,t)),w=(0,y.d4)(t=>!!x&&N(t,e)),T=(0,i.useMemo)(()=>{if(!_||!(0,P.U8)(e)||!(0,P.nZ)(e))return;let t=(0,P.M8)(e);if(t)return{editedTs:t,isArchivedComment:(0,P.$Q)(e)}},[e,_]),V=(0,i.useMemo)(()=>{if(!f)return;let t=(0,P.gT)(e);if(t)return{pinnedBy:t.pinnedBy}},[e,f]),G=(0,i.useMemo)(()=>{if(b&&(0,P.P9)(e)&&!e?.saved?.is_archived)return{dateDue:e?.saved?.date_due}},[e,b]),q=(0,i.useMemo)(()=>{if(g&&(E||k?.status===H.Ex.COMPLETE))return{offerTranslationForMessage:E,aiTranslation:k}},[k,E,g]),j=(0,i.useMemo)(()=>{if(A&&(0,D.SM)(e)&&(0,L.n)(e))return{isIm:(0,R.LI)(I),isMpim:(0,R.yz)(I)}},[I,e,A]);if(!e||(0,O.k)(e))return null;let z=!!T,K=!!V,$=!!G,Y=!!q,Q=!!j,Z=(0,F.H)({subcomponents:h,isTombstone:(0,D.aK)(e),isEdited:z,isPinned:K,isSaved:$,isTranslated:Y,isBroadcasted:Q,hasDraftReply:w,viewType:n?.viewType}),J=Object.keys(Z),X=J.includes(r)&&z,ee=J.includes(o)&&K,et=J.includes(s)&&$,ea=J.includes(c)&&Y,en=J.includes(m)&&Q,er=J.includes(p)&&w;return i.createElement(i.Fragment,null,X&&i.createElement(u.q,{isFirst:Z[r].isFirst,isLast:Z[r].isLast},i.createElement(VisuallyHiddenEditedStateIndicator,{editedTs:T.editedTs,isArchivedComment:T.isArchivedComment})),ee&&i.createElement(u.q,{isFirst:Z[o].isFirst,isLast:Z[o].isLast},i.createElement(C,{pinnedBy:V.pinnedBy})),et&&i.createElement(u.q,{isFirst:Z[s].isFirst,isLast:Z[s].isLast},i.createElement(VisuallyHiddenSavedStateIndicator,{dateDue:G.dateDue})),ea&&i.createElement(u.q,{isFirst:Z[c].isFirst,isLast:Z[c].isLast},i.createElement(v.G,{offerTranslationForMessage:q.offerTranslationForMessage,aiTranslation:q.aiTranslation})),en&&i.createElement(u.q,{isFirst:Z[m].isFirst,isLast:Z[m].isLast},i.createElement(VisuallyHiddenBroadcastStateIndicator,{isIm:j.isIm,isMpim:j.isMpim})),er&&i.createElement(u.q,{isFirst:Z[p].isFirst,isLast:Z[p].isLast},i.createElement(VisuallyHiddenDraftReplyStateIndicator,null)))};V.displayName="BaseVisuallyHiddenStates";let VisuallyHiddenStates=()=>i.createElement(o.z,null,i.createElement(V,null))},0x6b50b5fd:(e,t,a)=>{"use strict";a.d(t,{Q:()=>VisuallyHiddenTimestamp,S:()=>getTimestampPlainTextLabel});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x13776886e),o=a(0x252f0da49),s=a(0x20482ad21),c=a(0x139aa1a7),d=a(0x124f71042),m=a(0x1ab24d57b),u=a(0x652e17a5),p=a(0x1af3d269c),h=a(0xd843ab47),_=a(940089e4),f=a(0x2380341f5),b=a(0x137b3c34d),g=a(0xdf55e8f3),y=a(0x14149c126);let A=(0,g.eI)((e,t,a,n)=>{if(!e)return null;let r=e.ts,i=(0,_.A)(r);return"on"===(0,y._Z)(n,"fe_less_name_avatar_repeating_in_threads")&&t?(0,b.r)(i,b.M.THREAD_DETAIL_VIEW,a,!a):t?(0,f.A)(i,{alwaysAgo:!0}):void 0});var x=a(0x22692fa53),E=a(0x128f278bf),C=a(0x100c4a96f),k=a(0x21d6ed371),v=a(0x1c8b9de2f),S=a(0x1337d9fa2),I=a(0x12afecfaa),w=a(0x1ccef1c6f),T=a(0x226892387);let N=new s.Ay("aria_msg_summary");function getTimestampPlainTextLabel({relativeOrCustomFormatTimestamp:e,senderIsFollowedByDateTime:t,dateTimeIsFollowedByMessageText:a,time:n,messageReplayAndSearchResultTimestamp:r}){let i=e||r||n;return i?t&&a&&!e&&!r?N.t("at {time}:",{time:i}):t&&a?N.t("{time}:",{time:(0,C.CW)(i)}):a?N.t("{time}:",{time:i}):!t||e||r?t?N.t("{time}.",{time:(0,C.CW)(i)}):N.t("{time}.",{time:i}):N.t("at {time}.",{time:i}):null}let M=(0,n.Ar)()?()=>{let e,t,a,n=(0,r.c)(14),{hideTimestamp:s,includeDate:m}=(0,i.useContext)(p.c),{msg:_}=(0,i.useContext)(d.A),f=(0,T.d4)(_temp),b=(0,T.d4)(E.c),g=(0,T.d4)(x.L),y=(0,i.useContext)(h.A),C=y.view?.viewType===c.D.Thread||y.view?.viewType===c.D.Threads;n[0]!==f||n[1]!==C||n[2]!==_?(e=e=>A(_,C,f,e),n[0]=f,n[1]=C,n[2]=_,n[3]=e):e=n[3];let w=(0,T.Z2)(e),M=_?.ts;e:{let e;if(!M||s){t=null;break e}if(n[4]!==g||n[5]!==f||n[6]!==m||n[7]!==w||n[8]!==b||n[9]!==M){let t=M&&!w?(0,l.A)(M,"{time}",{do24hrTime:f,includeSeconds:!1}):null,a=(0,o.J)(parseInt(M,10)),r=t?N.t("{date} at {time}",{date:a,time:t}):a,i=m&&!w?r:null;e=getTimestampPlainTextLabel({relativeOrCustomFormatTimestamp:w,senderIsFollowedByDateTime:b,dateTimeIsFollowedByMessageText:g,time:t,messageReplayAndSearchResultTimestamp:i}),n[4]=g,n[5]=f,n[6]=m,n[7]=w,n[8]=b,n[9]=M,n[10]=e}else e=n[10];t=e}let R=t;if(!_||(0,S.aK)(_)||(0,v.k)(_)||(0,k.AT)(_))return null;if(n[11]!==R){let e;n[13]===Symbol.for("react.memo_cache_sentinel")?(e={type:I.A.dateTime},n[13]=e):e=n[13],a=i.createElement(u.W,e,R),n[11]=R,n[12]=a}else a=n[12];return a}:()=>{let{hideTimestamp:e,includeDate:t}=(0,i.useContext)(p.c),{msg:a}=(0,i.useContext)(d.A),n=(0,T.d4)(e=>(0,w.ty)(e,"time24")),r=(0,T.d4)(E.c),s=(0,T.d4)(x.L),m=(0,i.useContext)(h.A),_=m.view?.viewType===c.D.Thread||m.view?.viewType===c.D.Threads,f=(0,T.Z2)(e=>A(a,_,n,e)),b=a?.ts,g=(0,i.useMemo)(()=>{if(!b||e)return null;let a=b&&!f?(0,l.A)(b,"{time}",{do24hrTime:n,includeSeconds:!1}):null,i=(0,o.J)(parseInt(b,10)),c=a?N.t("{date} at {time}",{date:i,time:a}):i,d=t&&!f?c:null;return getTimestampPlainTextLabel({relativeOrCustomFormatTimestamp:f,senderIsFollowedByDateTime:r,dateTimeIsFollowedByMessageText:s,time:a,messageReplayAndSearchResultTimestamp:d})},[f,n,r,s,b,e,t]);return!a||(0,S.aK)(a)||(0,v.k)(a)||(0,k.AT)(a)?null:i.createElement(u.W,{type:I.A.dateTime},g)};M.displayName="BaseVisuallyHiddenTimestamp";let VisuallyHiddenTimestamp=()=>i.createElement(m.z,null,i.createElement(M,null));function _temp(e){return(0,w.ty)(e,"time24")}},0x1aba758f1:(e,t,a)=>{"use strict";a.d(t,{G:()=>VisuallyHiddenTranslatedStateIndicator});var n=a(0xbad225b5),r=a(0x14ebeb373),i=a(0x1ab24d57b),l=a(0x652e17a5),o=a(0x12afecfaa);let VisuallyHiddenTranslatedStateIndicator=({offerTranslationForMessage:e,aiTranslation:t})=>n.createElement(i.z,null,n.createElement(l.W,{type:o.A.translatedState},n.createElement(r.A,{offerTranslationForMessage:e,aiTranslation:t})))},0x24931e7b0:(e,t,a)=>{"use strict";a.d(t,{B7:()=>o,Ks:()=>c,P2:()=>l,Sn:()=>s});var n=a(0x62a17882);let r=(0,n.cX)()?["del","backspace"]:["del"],i=(0,n.cX)()?["Delete","Backspace"]:["Delete"],l={EDIT:["e"],REACT:["r"],COMMENT:["t"],PIN:["p"],SHARE:["s","f"],STAR:["a"],SAVE:["a"],MARK_UNREAD:["u"],MARK_THREAD_UNREAD:["u"],REMIND:["m"],DELETE:r.concat(i),COPY_LINK:["l"],COPY_TEXT:["mod+c"],ADD_TO_LIST:["v"]},o={x:50,y:0},s={x:0,y:-8},c={x:4,y:-16}},0x1d8f0e558:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xb97b797e),o=a(0x181d663bb),s=a(0x11a296110),c=a(0x344bb842),d=a(0x2173e1832),m=a(0x2501a2cee),u=a(0x4c96e5d9),p=a(0x1b3ecb90f);let h=class extends n.PureComponent{static defaultProps={size:"small",hideTooltip:!1};constructor(e){super(e),(0,l.v)(this,["onClick","onQuickReactionMouseEnter","onQuickReactionMouseLeave"]),this.state={shouldNotAnimateQuickReaction:!0}}onClick(e){let{onSelectAction:t,onClick:a,actionId:n,uiElement:r,isSearchInChannel:i}=this.props;i&&e.stopPropagation(),a&&a(e),n&&t&&t(e,{id:n,uiElement:r})}onQuickReactionMouseEnter(e){let{fadeQuickReactionsCustomizationTip:t}=this.props;t&&t(e),this.setState(()=>({shouldNotAnimateQuickReaction:!1}))}onQuickReactionMouseLeave(e){let{fadeQuickReactionsCustomizationTip:t}=this.props;t&&t(e),this.setState(()=>({shouldNotAnimateQuickReaction:!0}))}getIconElement(){let{icon:e}=this.props;if(e)return"string"==typeof e?n.createElement(m.Ah,{name:e}):e}renderEmoji(){let{"aria-label":e,"aria-haspopup":t,"aria-keyshortcuts":a,"aria-pressed":r,emoji:l,autoClogProps:c,href:d,isDisabled:m,btnRef:u}=this.props,h=i()("c-message_actions__button",this.props.className);return n.createElement(s.Nm,{className:h,onClick:this.onClick,"aria-label":e,"aria-haspopup":t,"aria-keyshortcuts":a,"aria-pressed":r,ref:u,autoClogProps:c,href:d,disabled:m,onMouseEnter:this.onQuickReactionMouseEnter,onMouseLeave:this.onQuickReactionMouseLeave,onFocus:this.onQuickReactionMouseEnter,onBlur:this.onQuickReactionMouseLeave,...(0,o.A)(this.props)},n.createElement(p.Ay,{text:l,emojiSize:p.lw.SMALL,stopAnimations:this.state.shouldNotAnimateQuickReaction}))}renderIcon(){let{"aria-label":e,autoClogProps:t,href:a,inlineLabel:r,fadeQuickReactionsCustomizationTip:l,isDisabled:s,"aria-haspopup":d,btnRef:m,"aria-keyshortcuts":u,"aria-pressed":p,size:h}=this.props,_=i()("c-message_actions__button",this.props.className,{"c-message_actions__labels":r});return n.createElement(c.A,{className:_,onClick:this.onClick,"aria-label":e,"aria-haspopup":d,ref:m,"aria-pressed":p,"aria-keyshortcuts":u,size:h,autoClogProps:t,href:a,disabled:s,onMouseEnter:l,onMouseLeave:l,onFocus:l,onBlur:l,...(0,o.A)(this.props)},this.getIconElement())}renderInlineLabel(){let{"aria-label":e,inlineLabel:t,autoClogProps:a,href:r,inlineIcon:l,isDisabled:c,fadeQuickReactionsCustomizationTip:d,"aria-haspopup":m,btnRef:u,"aria-keyshortcuts":p,"aria-pressed":h}=this.props,_=i()("c-message_actions__button",this.props.className,{"c-message_actions__labels":t}),f=t?"c-message_actions__labels_text":"";return n.createElement(s.Nm,{className:_,onClick:this.onClick,"aria-label":e,"aria-haspopup":m,ref:u,"aria-pressed":h,"aria-keyshortcuts":p,autoClogProps:a,href:r,disabled:c,onMouseEnter:d,onMouseLeave:d,onFocus:d,onBlur:d,...(0,o.A)(this.props)},l||this.getIconElement(),n.createElement("span",{className:f},t))}renderContent(){let{emoji:e,inlineLabel:t}=this.props;return e?this.renderEmoji():t?this.renderInlineLabel():this.renderIcon()}render(){let{hideTooltip:e,subtitle:t}=this.props,a="function"==typeof this.props.label?this.props.label():this.props.label,r=t?n.createElement("div",null,n.createElement("div",null,a),n.createElement("div",{className:"c-message_actions__tooltip_subtext"},t)):a;return n.createElement(n.Fragment,null,e?n.createElement(n.Fragment,null,this.renderContent()):n.createElement(u.Ay,{tip:r,position:this.props.tooltipPosition||"top",delay:u.n1,tipClassName:this.props.tipClassName,zIndex:d.m.AboveFullScreen,hideFromScreenReader:!0},this.renderContent()))}};h.displayName="MessageActionButton";let _=h},0x21724bdd9:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let MessageActionContainer=({className:e,children:t,ariaLabel:a,dataQA:r,showQuickReactionsTip:l,role:o="group"})=>n.createElement("div",{className:i()("c-message_actions__container",{"c-message_actions__quick_reactions_tooltip":l},e),role:o,"aria-label":a,"data-qa":r,"data-stringify-ignore":!0},t);MessageActionContainer.displayName="MessageActionContainer";let l=n.memo(MessageActionContainer)},0x21b4d1d5:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let MessageActionGroup=({children:e,className:t,ariaLabel:a,dataQA:r,role:l="group"})=>n.createElement("div",{className:i()("c-message_actions__group",t),role:l,"aria-label":a,"data-qa":r},e);MessageActionGroup.displayName="MessageActionGroup";let l=MessageActionGroup},0x23f833333:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x22fcfc255),o=a(0x1d8f0e558),s=a(0x242503693),c=a(0x226892387),d=a(0x217553e42);let m=(0,n.Ar)()?e=>{let t,a,n,m=(0,r.c)(18),{actionId:u,uiElement:p,label:h,"aria-label":_,icon:f,fadeQuickReactionsCustomizationTip:b,btnRef:g,channelId:y,focusMetaData:A,className:x,shortcut:E,hasKeyboardFocus:C,onSelectAction:k,autoClogProps:v}=e;m[0]!==y?(t=e=>(0,d.OL)(e,y),m[0]=y,m[1]=t):t=m[1];let S=(0,c.d4)(t),I=E?.key,w=E?.label,T=I&&I[0];e:{if(C&&w){let e;m[2]!==h||m[3]!==w?(e=i.createElement(l.A,{title:h,mainKey:w}),m[2]=h,m[3]=w,m[4]=e):e=m[4],a=e;break e}a=h}let N=a;return S?(m[5]!==u||m[6]!==_||m[7]!==v||m[8]!==g||m[9]!==x||m[10]!==b||m[11]!==A||m[12]!==f||m[13]!==k||m[14]!==T||m[15]!==N||m[16]!==p?(n=i.createElement(o.A,{actionId:u,uiElement:p,"aria-label":_,icon:f,fadeQuickReactionsCustomizationTip:b,btnRef:g,className:x,onSelectAction:k,autoClogProps:v,label:N,tooltipPosition:"top-right","data-focus-key":s.Ay.MESSAGE_ACTIONS,"data-focus-metadata":A,"aria-keyshortcuts":T}),m[5]=u,m[6]=_,m[7]=v,m[8]=g,m[9]=x,m[10]=b,m[11]=A,m[12]=f,m[13]=k,m[14]=T,m[15]=N,m[16]=p,m[17]=n):n=m[17],n):null}:({actionId:e,uiElement:t,label:a,"aria-label":n,icon:r,fadeQuickReactionsCustomizationTip:m,btnRef:u,channelId:p,focusMetaData:h,className:_,shortcut:f,hasKeyboardFocus:b,onSelectAction:g,autoClogProps:y})=>{let A=(0,c.d4)(e=>(0,d.OL)(e,p)),x=f?.key,E=f?.label,C=x&&x[0],k=(0,i.useMemo)(()=>b&&E?i.createElement(l.A,{title:a,mainKey:E}):a,[a,b,E]);return A?i.createElement(o.A,{actionId:e,uiElement:t,"aria-label":n,icon:r,fadeQuickReactionsCustomizationTip:m,btnRef:u,className:_,onSelectAction:g,autoClogProps:y,label:k,tooltipPosition:"top-right","data-focus-key":s.Ay.MESSAGE_ACTIONS,"data-focus-metadata":h,"aria-keyshortcuts":C}):null};m.displayName="MessageActionButtonMyTasks"},0x2f88d761:(e,t,a)=>{"use strict";a.d(t,{A:()=>v});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x22fcfc255),s=a(0x99233ecb),c=a(0x16cf1da63),d=a(0x86993fc6),m=a(0x1723a4af8),u=a(0x3711e82d),p=a(0x1de4133),h=a(0xd43a69c2);let _=new l.Ay("menu"),f=(0,n.Ar)()?e=>{let t,a,n,l,o,f,b=(0,r.c)(63),{messageContainerType:g,item:y,actionId:A,menuProps:x,uiElement:E,experimentFeRemindMenuHoverActionGroupOn:C}=e,k=(0,c.wA)();b[0]!==k||b[1]!==y?(t=()=>{k((0,h.A)({item:y}))},b[0]=k,b[1]=y,b[2]=t):t=b[2];let v=t;b[3]!==k||b[4]!==y.itemId||b[5]!==y.ts?(a=()=>{k((0,p.xF)({channelId:y.itemId,messageTs:y.ts}))},b[3]=k,b[4]=y.itemId,b[5]=y.ts,b[6]=a):a=b[6];let S=a;b[7]===Symbol.for("react.memo_cache_sentinel")?(n={elementName:"later_action_menu_item",stepVariant:"later_actions_menu_open",UiComponentName:u.UiComponentName.SAVED_LATER_ACTION_MENU,elementType:u.ElementType.MENU_ITEM,onClick:{enableClogAction:!0,setElementValueOnAction:!0}},b[7]=n):n=b[7];let I=n;b[8]!==g?(l={uiComponentName:u.UiComponentName.MESSAGE_ACTIONS_MENU,uiComponentVariant:u.UiComponentVariant.MESSAGE_ACTIONS_MENU_OVERFLOW_MENU,uiPage:g},b[8]=g,b[9]=l):l=b[9];let w=l;b[10]!==k||b[11]!==y.itemId||b[12]!==y.ts?(o=(e,t)=>{k((0,m.A)({ts:y.ts,channelId:y.itemId,dateDue:t.dateDue,time:t.time}))},b[10]=k,b[11]=y.itemId,b[12]=y.ts,b[13]=o):o=b[13];let T=o;if(b[14]!==A||b[15]!==w||b[16]!==C||b[17]!==y.itemId||b[18]!==y.ts||b[19]!==x||b[20]!==g||b[21]!==S||b[22]!==T||b[23]!==v||b[24]!==E){let e,t,a,n;if(b[26]!==w||b[27]!==x?(e={menuClassNames:"p-message_later_actions_menu",stripTerminalSeparators:!0,autoClogProps:w,width:"auto",...x},b[26]=w,b[27]=x,b[28]=e):e=b[28],b[29]!==C||b[30]!==v){let e,a;b[32]!==C?(e=C?_.t("Mark complete"):"Mark complete",b[32]=C,b[33]=e):e=b[33],b[34]!==v||b[35]!==e?(a={onSelected:v,autoClogProps:I,label:e},b[34]=v,b[35]=e,b[36]=a):a=b[36],t=i.createElement(s.Dr,a),b[29]=C,b[30]=v,b[31]=t}else t=b[31];if(b[37]!==A||b[38]!==C||b[39]!==y.itemId||b[40]!==y.ts||b[41]!==g||b[42]!==T||b[43]!==E){let e,t;b[45]!==C?(e=C?_.t("Remind me about this"):"Remind me about this",b[45]=C,b[46]=e):e=b[46],b[47]!==A||b[48]!==y.itemId||b[49]!==y.ts||b[50]!==g||b[51]!==T||b[52]!==e||b[53]!==E?(t={key:"remind_submenu",label:e,"data-qa":"later-remind-submenu",actionId:A,uiElement:E,messageContainerType:g,disabled:!1,showOfflineIcon:!1,onSelectAction:T,ts:y.ts,channelId:y.itemId},b[47]=A,b[48]=y.itemId,b[49]=y.ts,b[50]=g,b[51]=T,b[52]=e,b[53]=E,b[54]=t):t=b[54],a=i.createElement(d.A,t),b[37]=A,b[38]=C,b[39]=y.itemId,b[40]=y.ts,b[41]=g,b[42]=T,b[43]=E,b[44]=a}else a=b[44];if(b[55]!==C||b[56]!==S){let e,t;b[58]!==C?(e=C?_.t("Remove from Later"):"Remove from Later",b[58]=C,b[59]=e):e=b[59],b[60]!==S||b[61]!==e?(t={onSelected:S,autoClogProps:I,danger:!0,label:e},b[60]=S,b[61]=e,b[62]=t):t=b[62],n=i.createElement(s.Dr,t),b[55]=C,b[56]=S,b[57]=n}else n=b[57];f=i.createElement(s.Ay,e,t,a,n),b[14]=A,b[15]=w,b[16]=C,b[17]=y.itemId,b[18]=y.ts,b[19]=x,b[20]=g,b[21]=S,b[22]=T,b[23]=v,b[24]=E,b[25]=f}else f=b[25];return f}:({messageContainerType:e,item:t,actionId:a,menuProps:n,uiElement:r,experimentFeRemindMenuHoverActionGroupOn:l})=>{let o=(0,c.wA)(),f=(0,i.useCallback)(()=>{o((0,h.A)({item:t}))},[o,t]),b=(0,i.useCallback)(()=>{o((0,p.xF)({channelId:t.itemId,messageTs:t.ts}))},[o,t]),g=(0,i.useMemo)(()=>({elementName:"later_action_menu_item",stepVariant:"later_actions_menu_open",UiComponentName:u.UiComponentName.SAVED_LATER_ACTION_MENU,elementType:u.ElementType.MENU_ITEM,onClick:{enableClogAction:!0,setElementValueOnAction:!0}}),[]),y=(0,i.useMemo)(()=>({uiComponentName:u.UiComponentName.MESSAGE_ACTIONS_MENU,uiComponentVariant:u.UiComponentVariant.MESSAGE_ACTIONS_MENU_OVERFLOW_MENU,uiPage:e}),[e]);return i.createElement(s.Ay,{menuClassNames:"p-message_later_actions_menu",stripTerminalSeparators:!0,autoClogProps:y,width:"auto",...n},i.createElement(s.Dr,{onSelected:f,autoClogProps:g,label:l?_.t("Mark complete"):"Mark complete"}),i.createElement(d.A,{key:"remind_submenu",label:l?_.t("Remind me about this"):"Remind me about this","data-qa":"later-remind-submenu",actionId:a,uiElement:r,messageContainerType:e,disabled:!1,showOfflineIcon:!1,onSelectAction:(e,a)=>{o((0,m.A)({ts:t.ts,channelId:t.itemId,dateDue:a.dateDue,time:a.time}))},ts:t.ts,channelId:t.itemId}),i.createElement(s.Dr,{onSelected:b,autoClogProps:g,danger:!0,label:l?_.t("Remove from Later"):"Remove from Later"}))};f.displayName="MessageActionsLaterActionMenu";var b=a(0x1d8f0e558),g=a(0x242503693),y=a(0x2283cdc8d),A=a(0x226892387),x=a(0x217553e42),E=a(0x1b9ff23fe);let C=new l.Ay("message"),k=(0,n.Ar)()?e=>{let t,a,n,l,c,d,m=(0,r.c)(62),{entry:u,actionId:p,uiElement:h,label:_,"aria-label":k,icon:v,shortcut:S,"data-qa":I,isSaved:w,className:T,fadeQuickReactionsCustomizationTip:N,btnRef:M,focusMetaData:R,hasKeyboardFocus:P,onSelectAction:L,channelId:O,ts:D,messageContainerType:F,onActionsMenuClose:U,onActionsMenuOpen:B,autoClogProps:H,isSearchInChannel:W}=e;m[0]!==O?(t=e=>(0,x.OL)(e,O),m[0]=O,m[1]=t):t=m[1];let V=(0,A.d4)(t);m[2]!==O||m[3]!==D?(a=e=>(0,E.aT)(e,O,D),m[2]=O,m[3]=D,m[4]=a):a=m[4];let G=(0,A.d4)(a),q=(0,A.d4)(y.X9);if(!V)return null;let j=S?.key,z=S?.label,K=j&&j[0];m[5]!==P||m[6]!==_||m[7]!==z?(n=P&&z?i.createElement(o.A,{title:_,mainKey:z}):_,m[5]=P,m[6]=_,m[7]=z,m[8]=n):n=m[8];let $=n;m[9]!==p||m[10]!==q||m[11]!==G||m[12]!==F||m[13]!==h?(l=e=>i.createElement(f,{messageContainerType:F,item:G,actionId:p,menuProps:e,uiElement:h,experimentFeRemindMenuHoverActionGroupOn:q}),m[9]=p,m[10]=q,m[11]=G,m[12]=F,m[13]=h,m[14]=l):l=m[14];let Y=l;m[15]!==q?(c=q?C.t("Later actions"):"Later actions",m[15]=q,m[16]=c):c=m[16];let Q=c;if(!q||"message_actions"!==u||!w){let e;return m[17]!==p||m[18]!==k||m[19]!==H||m[20]!==M||m[21]!==T||m[22]!==I||m[23]!==N||m[24]!==R||m[25]!==v||m[26]!==w||m[27]!==W||m[28]!==L||m[29]!==K||m[30]!==$||m[31]!==h?(e=i.createElement(b.A,{actionId:p,"aria-label":k,uiElement:h,icon:v,onSelectAction:L,className:T,btnRef:M,fadeQuickReactionsCustomizationTip:N,autoClogProps:H,isSearchInChannel:W,label:$,"aria-keyshortcuts":K,"data-qa":I,"data-focus-key":g.Ay.MESSAGE_ACTIONS,"data-focus-metadata":R,tooltipPosition:"top","aria-pressed":w}),m[17]=p,m[18]=k,m[19]=H,m[20]=M,m[21]=T,m[22]=I,m[23]=N,m[24]=R,m[25]=v,m[26]=w,m[27]=W,m[28]=L,m[29]=K,m[30]=$,m[31]=h,m[32]=e):e=m[32],e}if(m[33]!==p||m[34]!==k||m[35]!==H||m[36]!==M||m[37]!==N||m[38]!==R||m[39]!==v||m[40]!==U||m[41]!==B||m[42]!==L||m[43]!==Y||m[44]!==Q||m[45]!==h){let e,t;m[47]!==U||m[48]!==B||m[49]!==Y?(e={renderMenu:Y,position:"bottom-right",onPopoverOpen:B,onPopoverClose:U},m[47]=U,m[48]=B,m[49]=Y,m[50]=e):e=m[50],m[51]!==p||m[52]!==k||m[53]!==H||m[54]!==M||m[55]!==N||m[56]!==R||m[57]!==v||m[58]!==L||m[59]!==Q||m[60]!==h?(t=i.createElement(b.A,{actionId:p,uiElement:h,icon:v,onSelectAction:L,btnRef:M,fadeQuickReactionsCustomizationTip:N,autoClogProps:H,"aria-label":k,label:Q,tooltipPosition:"top-right","data-qa":"set_reminder_message_actions","data-focus-key":g.Ay.MESSAGE_ACTIONS,"data-focus-metadata":R}),m[51]=p,m[52]=k,m[53]=H,m[54]=M,m[55]=N,m[56]=R,m[57]=v,m[58]=L,m[59]=Q,m[60]=h,m[61]=t):t=m[61],d=i.createElement(s.cQ,e,t),m[33]=p,m[34]=k,m[35]=H,m[36]=M,m[37]=N,m[38]=R,m[39]=v,m[40]=U,m[41]=B,m[42]=L,m[43]=Y,m[44]=Q,m[45]=h,m[46]=d}else d=m[46];return d}:({entry:e,actionId:t,uiElement:a,label:n,"aria-label":r,icon:l,shortcut:c,"data-qa":d,isSaved:m,className:u,fadeQuickReactionsCustomizationTip:p,btnRef:h,focusMetaData:_,hasKeyboardFocus:k,onSelectAction:v,channelId:S,ts:I,messageContainerType:w,onActionsMenuClose:T,onActionsMenuOpen:N,autoClogProps:M,isSearchInChannel:R})=>{let P=(0,A.d4)(e=>(0,x.OL)(e,S)),L=(0,A.d4)(e=>(0,E.aT)(e,S,I)),O=(0,A.d4)(y.X9);if(!P)return null;let D=c?.key,F=c?.label,U=D&&D[0],B=k&&F?i.createElement(o.A,{title:n,mainKey:F}):n,H=O?C.t("Later actions"):"Later actions";return O&&"message_actions"===e&&m?i.createElement(s.cQ,{renderMenu:e=>i.createElement(f,{messageContainerType:w,item:L,actionId:t,menuProps:e,uiElement:a,experimentFeRemindMenuHoverActionGroupOn:O}),position:"bottom-right",onPopoverOpen:N,onPopoverClose:T},i.createElement(b.A,{actionId:t,uiElement:a,icon:l,onSelectAction:v,btnRef:h,fadeQuickReactionsCustomizationTip:p,autoClogProps:M,"aria-label":r,label:H,tooltipPosition:"top-right","data-qa":"set_reminder_message_actions","data-focus-key":g.Ay.MESSAGE_ACTIONS,"data-focus-metadata":_})):i.createElement(b.A,{actionId:t,"aria-label":r,uiElement:a,icon:l,onSelectAction:v,className:u,btnRef:h,fadeQuickReactionsCustomizationTip:p,autoClogProps:M,isSearchInChannel:R,label:B,"aria-keyshortcuts":U,"data-qa":d,"data-focus-key":g.Ay.MESSAGE_ACTIONS,"data-focus-metadata":_,tooltipPosition:"top","aria-pressed":m})};k.displayName="MessageActionButtonSaveLater";let v=k},0x23ef0a20d:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbaaab71e),r=a(0x1a002d0a4),i=a(0xd3813463),l=a(0x105ecbbed),o=a(0x242503693),s=a(0xa624a5c7),c=a(0x18797067c),d=a(0x1deaf9033),m=a(0x11c82607b),u=a(0x1266f1359),p=a(0xf3c65e54),h=a(0x5b1935a6),_=a(0x235c05c79),f=a(0xb9f80e40);let b=(0,m.Ay)("Message actions: Comment button",(e,t,{ts:a,channelId:m,threadTs:b,teamId:g,openInTile:y=!1,focusMessageInput:A=!1},x)=>{let E=t();if(!(0,i.A)(E,{ts:a,channelId:m}))return;let C=(0,c.A)(E);if(e((0,s.H)({focusKey:o.Ay.THREAD_MESSAGE_LIST,focusMetadata:{id:"thread",params:{threadId:(0,d.H)({channel:m,ts:a}),replyTs:a}}})),g)(0,u.Qw)(g,(0,f.O)({channelId:m,threadTs:b||a,requestFocus:A,shouldOpenInTile:y}));else{let{windowId:t}=x(n.U);if(y)e((0,f.O)({channelId:m,threadTs:b||a,requestFocus:A,shouldOpenInTile:y}));else{let n=(0,l.Iu)(m,b||a);e((0,_.pJ)({windowId:t,threadKey:n})),e((0,r.A)({channelId:m,ts:b||a}))}}C&&e((0,p.A)({notificationName:h.ze.SIMPLIFIED_MESSAGE_ACTIONS_LABELS,action:h.hw.CLICK}))});b.meta={name:"messageActionsCommentAction",key:"createThunkMessageActionsCommentAction",description:"Message actions: Comment button"};let g=b},0x2011b2a1b:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xd6ba6894),r=a(0x11cdf8541),i=a(0xd0109e4f),l=a(0x1ed767a16),o=a(0x47119420),s=a(0x59bcdfd6),c=a(0x6fec4429),d=a(0x11c82607b),m=a(0x24429189c),u=a(0xd93ecf94);let p=(0,d.Ay)("Message actions copy text action",(e,t,a,d)=>{let p=t(),{windowRef:h}=d(r.C),{ts:_,channelId:f}=a,b=(0,u.Ld)(p,f,_);if(!b)return;let g=((e,t,a)=>{if((0,i.A)(t,!0)){let e=a((0,m.f)({blocks:t.blocks}));return(0,s.f)({contents:e.ops})}return t.text?(0,o.A)(e,t.text):""})(p,b,e),y=((e,t,a)=>{try{if((0,i.A)(t,!0)){let e=a((0,m.f)({blocks:t.blocks}));return JSON.stringify(e)}if(t.text){let a=(0,c.A)(e,t.text);return JSON.stringify(a)}}catch{}return""})(p,b,e);(0,l.LJ)({"text/plain":g,"slack/texty":y},h.deref()||n.J)});p.meta={name:"messageActionsCopyTextAction",key:"createThunkMessageActionsCopyTextAction",description:"Message actions copy text action"};let h=p},0x1c2c31468:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0x10dfcca9d),r=a(0x158809687),i=a(0x757d6d8),l=a(0x42a4b4de),o=a(0xb04c4a12),s=a(0x11c82607b),c=a(0x1266f1359),d=a(0x19c76d181),m=a(0x217553e42),u=a(0x229b981b3),p=a(0xd93ecf94);let h=(0,s.Ay)("Message actions: Edit button",(e,t,{channelId:a,ts:s,teamId:h,viewContext:_})=>{let f=t(),b=(0,p.Ld)(f,a,s);if(!b)return;let g=(0,l.u)(f),y=(0,l.P)(f),A=(0,d.WR)(f),x=(0,m.OL)(f,a),E=(0,i.t)(f,x);if((0,n._)(f,A,b,x,E)){if(h)return void(0,c.Qw)(h,(0,u.e)({channelId:a,ts:s,viewContext:(0,r.n)(b)?o.Y.THREAD:void 0,scroll:!0,...g&&{fileIds:b.files},...y&&{attachments:b.attachments}}));e((0,u.e)({channelId:a,ts:s,viewContext:_,scroll:!0,...g&&{fileIds:b.files},...y&&{attachments:b.attachments}}))}});h.meta={name:"messageActionsEditAction",key:"createThunkMessageActionsEditAction",description:"Message actions: Edit button"};let _=h},0x1b3f5d630:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0x1a02c72b5),r=a(0xd6a16321),i=a(0x19d55d0e1),l=a(0xbd3de346),o=a(0xe8efe2c1),s=a(0x158809687),c=a(0x1ec68d6a3),d=a(0x24558b75f),m=a(0xb04c4a12),u=a(0x11c82607b),p=a(0x9a5066aa),h=a(0x217553e42),_=a(0x14ea3ce99),f=a(0x8d0a2ff1),b=a(0xd93ecf94),g=a(0x19895585a);let y=(0,u.Ay)("Message actions: Jump button",(e,t,{channelId:a,threadTs:u,ts:y,event:A,messageContainerType:x})=>{let E=t(),C=(0,b.Ld)(E,a,y);if(!C)return;let k=(0,h.OL)(E,a);if(!k)return;let v=(0,o.f)(E,a),S=(0,_.Lp)(E,v),I=u||y;if(!k)return void(0,c.Ay)({getState:t}).error("no channel provided to messageActionsJumpAction");if(x===m.Y.SEARCH){let t=(0,i.OR)(E,a);if((0,l.l7)(S)){let t=(0,f.kG)(E,v,I);t&&e((0,n.o)((0,r.PF)({listId:v,recordId:t.id})))}else e(k&&t?(0,n.o)({...(0,r.m3)({channelId:a,threadTs:u??y}),options:{forceTab:g.k6.UnifiedFiles}}):(0,s.n)(C)&&u?(0,n.o)({...(0,r.UX)({channelId:a,threadTs:u,replyTs:y}),options:{forceTab:g.k6.Home}}):(0,n.o)({...(0,r.R9)(a,y,y),options:{forceTab:g.k6.Home}}))}else e((0,p.A)({channelId:k.id,ts:y,threadTs:(0,s.n)(C)?I:void 0,shouldOpenInTile:(0,d.Cz)(A),listRecordId:C.slack_list?.list_record_id}))});y.meta={name:"messageActionsJumpAction",key:"createThunkMessageActionsJumpAction",description:"Message actions: Jump button"};let A=y},0x1723a4af8:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xa77d37ea),r=a(0x21d6ed371),i=a(0x1f28bdc18),l=a(0x11c82607b),o=a(0xd93ecf94),s=a(0x131781841),c=a(0x1b9ff23fe),d=a(0x1de4133),m=a(0xd43a69c2);let u=(0,l.Ay)("Message actions: Save for later button",(e,t,{ts:a,channelId:l,dateDue:u,time:p})=>{let h=t(),_=(0,o.Ld)(h,l,a);if((0,r.aw)(_)||!_)return;let f=(0,r.Gs)(_),b=(0,c.aT)(h,l,a),g=b&&(0,i.sN)(b);e(p===n.i.CUSTOM?(0,s.A)({isMsgContext:!0,channelId:l,ts:a}):f&&u?(0,d.S1)({channelId:l,messageTs:a,dateDue:u}):g?(0,m.A)({item:b}):f&&!u?(0,d.xF)({channelId:l,messageTs:a}):(0,d.MU)({channelId:l,messageTs:a,dateDue:u}))});u.meta={name:"messageActionsLaterAction",key:"createThunkMessageActionsLaterAction",description:"Message actions: Save for later button"};let p=u},0x198b6c13e:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0x1781c9bc2),r=a(0xa1832ae4),i=a(0x11c82607b),l=a(0xd93ecf94),o=a(0x1ee439e69);let s=(0,i.Ay)("Message actions: Report message",(e,t,{ts:a,channelId:i})=>{let s=t(),c=(0,l.Ld)(s,i,a);if(!c)return;let d=encodeURI((0,n.A)(s,c)),m=(0,o.fu)(s);(0,r.gC)(m,`/help/requests/report-content?u=${d}&type=message`)});s.meta={name:"reportMessage",key:"createThunkReportMessage",description:"Message actions: Report message"};let c=s},0x2326f9e21:(e,t,a)=>{"use strict";a.d(t,{U:()=>i});var n=a(0x1a02c72b5),r=a(0xd6a16321);let i=(0,a(0x11c82607b).Ay)("Navigate to ai explain",(e,t,{channelId:a,sourceTs:i,highlightText:l})=>e((0,n.o)((0,r.n0)({channelId:a,sourceTs:i,highlightText:l}))));i.meta={name:"navigateToAiExplain",key:"createThunkNavigateToAiExplain",description:"Navigate to ai explain"}},0x24879ab20:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let n=(0,a(0xcf658893).Ay)("Triggers a side-effect that opens the private channel invite speedbump modal while avoiding circular dependencies");n.meta={name:"showPrivateChannelInviteSpeedbumpCircular",key:"createActionShowPrivateChannelInviteSpeedbumpCircular",description:"Triggers a side-effect that opens the private channel invite speedbump modal while avoiding circular dependencies"};let r=n},0x1aeee7595:(e,t,a)=>{"use strict";a.d(t,{A:()=>getCanJumpToAndActFromSearch});var n=a(0x21d6ed371),r=a(0x1c96ff3fa),i=a(0x9b971e7e),l=a(0x217553e42),o=a(0xd93ecf94);function getCanJumpToAndActFromSearch(e,t,a){let s=(0,o.Ld)(e,t,a);if(!s)return!1;let c=!(0,n.ow)(s)&&!(0,n.xh)(s),d=(0,l.OL)(e,t);if(!d)return!1;let m=(0,i.ZT)(e);return!!m&&!!((0,r.A)({state:e,channel:d,currentTeamId:m})&&c)}},0x1f4fd9824:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbe0b63ff),r=a(0x20482ad21),i=a(0xb041cb4d),l=a(0x1269e55c8),o=a(0x17bc3dd75),s=a(0x10027d8bc),c=a(0x1b9d5cc0c),d=a(0x1c9a3c4c1),m=a(0xdb0ffe37),u=a(0x4b8e0952),p=a(0x1aad32b98),h=a(0xcaa08ff7),_=a(0x1c91944c9),f=a(0x17268ff9b),b=a(0x5dd1c0f2),g=a(0x18476a827),y=a(0x1ffbda36f),A=a(0x1fb2d2a87),x=a(0xb129c1d5),E=a(0xe684f705);let C=new r.Ay("message"),k=(0,_.N)((e,{userId:t,botId:a,username:r,botProfile:l,isHuddleMsg:_,huddleActivityStatus:k,isAssistantThread:v,isListEditMsg:S,overrideNameText:I,isScheduledHuddleMsg:w,isDeleteScheduledHuddleMsg:T,isWelcomePartyMessage:N,isAiHuddleSummary:M,hideAppBadge:R,isSlackbotNotification:P,isSlackbotDmMessage:L,suppressColoredNames:O=!1,messageTs:D,visible:F,triggerId:U,enableShimmerEffect:B})=>{let H,W,V,G=!0,q=!1,j=!1,z=!1,K=!1,$=!1,Y=!1,Q=!1,{member:Z,bot:J,memberIsHuman:X}=(0,g.Od)(e,{userId:t,botId:a,botProfile:l}),ee=(0,o.A)(e,{userId:t,botId:a,username:r,botProfile:l});if(t)Z&&(G=(0,u.tJ)(Z),q=(0,u.ow)(Z),z=(0,c.v3)(Z),Y=(0,d.D)(Z),H=(0,c.a8)(e,Z),W=`/team/${Z.id}`,$=(0,x.a)(e,Z.id),j=(0,m.g)(Z),V=(0,p.Ux)(e,Z),Q=(0,b.rQ)(e,(0,c.PV)(Z)));else if(r&&!a)G=!1;else if(a)(z=(0,c.v3)(J))||(W=J?`/team/${J?.id}`:void 0),G=!r&&!l&&!!(0,n.mX)(J),q=!r&&!l&&!!(0,n.lv)(J),K=(0,y.e)(e,J);else if(l?.user_id){let t=(0,E.nv)(e,l.user_id);Y=(0,d.D)(t)}let et=I;$&&!et&&(et=C.t("Name hidden"));let ea=(0,i.Gn)(e),en=!!(t&&ea&&(0,h.mF)(e,t)),er=(0,s.ZV)(e);return{theme:(0,f.A)(e),name:ee,overrideNameText:et,userId:t,color:H,botId:J?.id??void 0,href:W,isUnknown:G,huddleActivityStatus:k,isNonExistent:q,memberIsHuman:X,memberIsExternal:j,memberTeamId:V,clientTheme:(0,A.to)(e),isWorkflow:z,isChannelEmail:K,isHuddleMsg:_,isAssistantThread:v,isAgentforceAgent:Y,isAgentApp:Q,isListEditMsg:S,isScheduledHuddleMsg:w,isDeleteScheduledHuddleMsg:T,isWelcomePartyMessage:N,isAiHuddleSummary:M,hideAppBadge:R,isSlackbotNotification:P,isSlackbotDmMessage:L,suppressColoredNames:O,messageTs:D,visible:F,isPriority:en,triggerId:U,enableShimmerEffect:B,experimentReskinCustomResponsesGroupOn:er}},null,null,{forwardRef:!0})(l.A)},0x20fec0309:(e,t,a)=>{"use strict";a.d(t,{A:()=>T});var n=a(0xbad225b5),r=a(0xbe0b63ff),i=a(0x20482ad21),l=a(0x113cdbbd7),o=a(0xe28ad2a3),s=a(0xb25439fa),c=a(0x9388b08c),d=a(0x106a32624),m=a(0x1944fd4df),u=a(0x1337d9fa2),p=a(0x242503693),h=a(0x81b269e4),_=a(0x6b345e37),f=a(0x1919f382c),b=a(0xb04c4a12),g=a(0x1c91944c9),y=a(0x7535c126),A=a(0x67098be8),x=a(0x14149c126),E=a(0x14ea3ce99),C=a(0xd93ecf94),k=a(0x1fcbb004d);let v=(0,s.A)(c.A),S=new i.Ay("msg_edit"),I=class extends n.PureComponent{static defaultProps={messageExists:!0,viewContext:b.Y.MESSAGE_PANE};messageDeleted;constructor(e){super(e),this.onGo=this.onGo.bind(this),this.onClose=this.onClose.bind(this)}componentDidMount(){this.maybeCloseModal()}componentDidUpdate(){this.maybeCloseModal()}onClose(){let{channelId:e,ts:t,viewContext:a,threadTs:n,transitionFocusTo:r}=this.props,i=(0,h.F8)(a);r({focusKey:i,forceFocus:!0,focusMetadata:{...i===p.Ay.MESSAGE_PANE_MESSAGE_LIST?{id:e}:{},uiState:{channelId:e,ts:t,threadTs:n,focusNearestSurroundingMessage:this.messageDeleted}}})}onGo(e){e&&"keydown"===e.type&&"Enter"===e.key&&e.preventDefault();let{ts:t,channelId:a,removeMessage:n,useBulkDelete:r,rollup:i}=this.props,l=(i?Object.values(i):[]).flatMap(e=>e.timestamps).filter(f.z).sort();n&&(n({channelId:a||"",ts:t||"",rollupTimestamps:r&&l?l:[]}),this.messageDeleted=!0)}getTitleText(){let{experimentCanvasCommentContentImprovementsGroupOn:e,isCanvasComment:t}=this.props;return e&&t?S.t("Delete comment"):S.t("Delete message")}getPrimaryBodyText(){let{experimentCanvasCommentContentImprovementsGroupOn:e,isCanvasComment:t}=this.props;return e&&t?S.t("Are you sure you want to delete this comment? This cannot be undone."):S.t("Are you sure you want to delete this message? This cannot be undone.")}getSecondaryBodyText(){let{subtype:e}=this.props;if(!e)return null;let t=this.getFileLabel();if("file_upload"===e){if("file"===t)return S.t("Note that deleting this message will not delete the file that was uploaded.");if("snippet"===t)return S.t("Note that deleting this message will not delete the snippet that was uploaded.");if("post"===t)return S.t("Note that deleting this message will not delete the post that was uploaded.")}else if("file_share"===e){if("file"===t)return S.t("Note that deleting this message will not unshare the file.");if("snippet"===t)return S.t("Note that deleting this message will not unshare the snippet.");if("post"===t)return S.t("Note that deleting this message will not unshare the post.")}else if("file_comment"===e)return S.t("Note that deleting this message will not delete the comment.");return null}getFileLabel(){let{hasFile:e,fileMode:t}=this.props;return e?"snippet"===t?"snippet":"post"===t?"post":"file":null}maybeCloseModal(){!this.props.messageExists&&this.props.closeModal&&this.props.closeModal()}render(){let{ts:e,channelId:t,messageExists:a}=this.props;if(!a)return null;let r=this.getTitleText(),i=this.getPrimaryBodyText(),s=this.getSecondaryBodyText();return n.createElement(d.Ay,{id:b.Y.DELETE_MSG_DIALOG},n.createElement(o.Ay,{title:r,goButtonText:S.t("Delete"),goButtonType:"danger",focusOnPrimaryButton:!0,onGo:this.onGo,onClose:this.onClose},i,s&&n.createElement("div",{className:"margin_top_50"},s),n.createElement("div",{className:"margin_top_100"},n.createElement(v,{ts:e,channelId:t,blocksContainerContext:l.pi.delete_dialog,footer:!1}))))}};I.displayName="BaseDeleteMessageDialog";let w=(0,_.A)(I),T=(0,g.N)((e,{channelId:t,ts:a,rollup:n})=>{let i,l,o=(0,C.Ld)(e,t||"",a||"");if((0,r.lv)(o)||(0,A.k)(e,{channelId:t||"",ts:a||""}))return{messageExists:!1};let s=o.files,c=!1;return s?.length&&(l=(0,E.Lp)(e,s?.[0])),l&&(c=!0,i=l.mode),{messageExists:!0,hasFile:c,fileMode:i,subtype:(0,u.ys)(o),rollup:n,useBulkDelete:!!n,experimentCanvasCommentContentImprovementsGroupOn:"on"===(0,x._Z)(e,"canvas_comment_content_improvements"),isCanvasComment:(0,m.l)(e,o)}},{removeMessage:({channelId:e,ts:t,broadcastDelete:a,rollupTimestamps:n})=>(0,y.A)({channelId:e,ts:t,broadcastDelete:a,rollupTimestamps:n}),closeModal:(e={})=>(0,k.O)(e)})(w)},0x1bf1e64f:(e,t,a)=>{"use strict";a.r(t),a.d(t,{EditMessageAttachmentsEducationContextBar:()=>x});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x1853f0e7c),s=a(0x20482ad21),c=a(0x12edaa96a),d=a(0x14abc22b0),m=a(0x344bb842),u=a(0x2501a2cee),p=a(0x42a4b4de),h=a(0x226892387),_=a(0x20061cab9),f=a(0x5b1935a6),b=a(0x219b348da),g=a.n(b);let y=new s.Ay("message"),A={name:"close"},x=(0,n.Ar)()?()=>{let e,t,a,n,s,b,x,E=(0,r.c)(13),C=(0,l.wA)(),{sendMessageToAnnouncerAPI:k}=(0,i.useContext)(d.A),v=(0,h.d4)(p.u);E[0]===Symbol.for("react.memo_cache_sentinel")?(e=y.t("Forgot something?"),E[0]=e):e=E[0];let S=e;E[1]===Symbol.for("react.memo_cache_sentinel")?(t=y.t("You can now add or edit attachments after a message has been sent."),E[1]=t):t=E[1];let I=t;E[2]===Symbol.for("react.memo_cache_sentinel")?(a=y.t("Dismiss Context Bar"),E[2]=a):a=E[2];let w=a;E[3]!==v||E[4]!==k?(n=()=>{v&&k({message:`${S} ${I}`,uuid:(0,c.A)()})},s=[v,S,I,k],E[3]=v,E[4]=k,E[5]=n,E[6]=s):(n=E[5],s=E[6]),(0,i.useEffect)(n,s),E[7]!==C?(b=()=>{C((0,_.Ay)({spaceName:f.xu.EDIT_MESSAGE_INPUT,action:f.hw.DISMISS}))},E[7]=C,E[8]=b):b=E[8];let T=b;if(!v)return null;if(E[9]!==T){let e,t;E[11]===Symbol.for("react.memo_cache_sentinel")?(e={className:g().wrapper},t=i.createElement("div",{className:g().contents},i.createElement(u.Ah,{name:"emoji-objects-filled",size:"18",color:(0,o.HK)("DT_COLOR_PLT_INDIGO_50")}),i.createElement("div",{className:g().text},i.createElement("strong",null,S)," ",I)),E[11]=e,E[12]=t):(e=E[11],t=E[12]),x=i.createElement("div",e,t,i.createElement(m.A,{"aria-label":w,onClick:T,size:"x-small",svgIconProps:A})),E[9]=T,E[10]=x}else x=E[10];return x}:()=>{let e=(0,l.wA)(),{sendMessageToAnnouncerAPI:t}=(0,i.useContext)(d.A),a=(0,h.d4)(p.u),n=y.t("Forgot something?"),r=y.t("You can now add or edit attachments after a message has been sent."),s=y.t("Dismiss Context Bar");(0,i.useEffect)(()=>{a&&t({message:`${n} ${r}`,uuid:(0,c.A)()})},[a,n,r,t]);let b=(0,i.useCallback)(()=>{e((0,_.Ay)({spaceName:f.xu.EDIT_MESSAGE_INPUT,action:f.hw.DISMISS}))},[e]);return a?i.createElement("div",{className:g().wrapper},i.createElement("div",{className:g().contents},i.createElement(u.Ah,{name:"emoji-objects-filled",size:"18",color:(0,o.HK)("DT_COLOR_PLT_INDIGO_50")}),i.createElement("div",{className:g().text},i.createElement("strong",null,n)," ",r)),i.createElement(m.A,{"aria-label":s,onClick:b,size:"x-small",svgIconProps:A})):null};x.displayName="EditMessageAttachmentsEducationContextBar"},0x15e343a61:(e,t,a)=>{"use strict";a.r(t),a.d(t,{EditMessageUpdatedBadge:()=>u});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x1fd3f6e20),c=a(0xf3c65e54),d=a(0x5b1935a6);let m=new o.Ay("message"),u=(0,n.Ar)()?()=>{let e,t,a,n=(0,r.c)(4),o=(0,l.wA)();return n[0]!==o?(e=()=>()=>{o((0,c.A)({notificationName:d.ze.EDUCATION_EDIT_ATTACHMENTS_MENU_BADGE,action:d.hw.IMPRESSION}))},t=[o],n[0]=o,n[1]=e,n[2]=t):(e=n[1],t=n[2]),(0,i.useEffect)(e,t),n[3]===Symbol.for("react.memo_cache_sentinel")?(a=i.createElement(s.v,{isMicro:!0,style:s.u.InverseInformative},m.t("Updated",{fallbackHash:"f2f8570ddd7b1e7b571311bbf9159efb02571e07",fallbackHashNs:"enterprise_dashboard"})),n[3]=a):a=n[3],a}:()=>{let e=(0,l.wA)();return(0,i.useEffect)(()=>()=>{e((0,c.A)({notificationName:d.ze.EDUCATION_EDIT_ATTACHMENTS_MENU_BADGE,action:d.hw.IMPRESSION}))},[e]),i.createElement(s.v,{isMicro:!0,style:s.u.InverseInformative},m.t("Updated",{fallbackHash:"f2f8570ddd7b1e7b571311bbf9159efb02571e07",fallbackHashNs:"enterprise_dashboard"}))};u.displayName="EditMessageUpdatedBadge"},0x196acb3d5:(e,t,a)=>{"use strict";a.d(t,{A:()=>ek});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1aba66b56),s=a(0x20482ad21),c=a(0x12edaa96a),d=a(0x9f7220f0),m=a(0x1fdec3e16),u=a(0x113cdbbd7),p=a(0x807220a2),h=a(0x19bf376f9),_=a(0x1c659cbb1),f=a(0x1340892e2),b=a(0x110a872e),g=a(0x243435af9),y=a(0x105ecbbed),A=a(0x226892387),x=a(0x20c81ddcb),E=a(0x14149c126),C=a(0xe684f705),k=a(0x1d3b9906f),v=a.n(k);let S=new s.Ay("agents"),I=(0,p.Ar)()?e=>{let t,a,r,i,l,o,s,c=(0,h.c)(48),{msg:d}=e;c[0]!==d.channel||c[1]!==d.ts?(t=(0,y.Iu)(d.channel,d.ts),c[0]=d.channel,c[1]=d.ts,c[2]=t):t=c[2];let m=t;c[3]!==m?(a=e=>(0,x.BZ)(e,m??""),c[3]=m,c[4]=a):a=c[4];let u=(0,A.d4)(a);c[5]!==m?(r=e=>(0,x.MO)(e,m??""),c[5]=m,c[6]=r):r=c[6];let p=(0,A.d4)(r),E=(0,A.d4)(g.Ag),k=(0,A.d4)(_temp);c[7]!==m?(i=e=>(0,x.Y2)(e,m),c[7]=m,c[8]=i):i=c[8];let I=(0,A.d4)(i),w=I?.botUserId;c[9]!==w?(l=e=>(0,C.nv)(e,w),c[9]=w,c[10]=l):l=c[10];let T=(0,A.d4)(l);c[11]!==w?(o=e=>(0,C._7)(e,w),c[11]=w,c[12]=o):o=c[12];let N=(0,A.d4)(o),M=(0,b.j)(u,p.loadingMessages),R=p.iconEmoji||p.iconUrl;if(!u)return null;let P=p.username??N;if(E){let e;if(c[13]!==P||c[14]!==M||c[15]!==k||c[16]!==T||c[17]!==R||c[18]!==p.iconEmoji||c[19]!==p.iconUrl){let t,a,r;if(c[21]===Symbol.for("react.memo_cache_sentinel")?(t={className:v().agentContainer,"data-qa":"agent-container"},c[21]=t):t=c[21],c[22]!==T||c[23]!==R||c[24]!==p.iconEmoji||c[25]!==p.iconUrl){let e,t,r=R?void 0:T.id,i=p.iconEmoji??void 0,l=p.iconUrl??void 0;c[27]!==l?(e={image_36:l},c[27]=l,c[28]=e):e=c[28],c[29]!==r||c[30]!==i||c[31]!==e?(t={size:24,userId:r,emoji:i,icons:e,isInteractive:!1,className:v().agentAvatar,"data-qa":"agent-avatar"},c[29]=r,c[30]=i,c[31]=e,c[32]=t):t=c[32],a=n.createElement(_.Ay,t),c[22]=T,c[23]=R,c[24]=p.iconEmoji,c[25]=p.iconUrl,c[26]=a}else a=c[26];if(c[33]!==P||c[34]!==M||c[35]!==k){let e,t,a;if(c[37]===Symbol.for("react.memo_cache_sentinel")?(e={className:v().agentLoading,"data-qa":"agent-loading"},c[37]=e):e=c[37],c[38]!==P||c[39]!==k?(t=k?n.createElement("span",{className:v().agentName},P):n.createElement(f.r,{className:v().agentName,text:P}),c[38]=P,c[39]=k,c[40]=t):t=c[40],c[41]!==M){let e;c[43]===Symbol.for("react.memo_cache_sentinel")?(e={className:v().agentLoadingText,"data-qa":"agent-loading-text"},c[43]=e):e=c[43],a=n.createElement("span",e,M),c[41]=M,c[42]=a}else a=c[42];r=n.createElement("div",e,t,a),c[33]=P,c[34]=M,c[35]=k,c[36]=r}else r=c[36];e=n.createElement("div",t,a,r),c[13]=P,c[14]=M,c[15]=k,c[16]=T,c[17]=R,c[18]=p.iconEmoji,c[19]=p.iconUrl,c[20]=e}else e=c[20];return e}if(c[44]!==T.id){let e,t;c[46]===Symbol.for("react.memo_cache_sentinel")?(e={className:"display_flex align_items_center","data-qa":"agent-container-legacy"},c[46]=e):e=c[46];let a=n.createElement(_.Ay,{userId:T.id,size:24,isInteractive:!1,className:v().agentAvatar,"data-qa":"agent-avatar-legacy"});c[47]===Symbol.for("react.memo_cache_sentinel")?(t=n.createElement("span",{className:v().agentLoadingText,"data-qa":"agent-loading-text-legacy"},n.createElement(f.r,{text:S.t("Working on a response\u2026")})),c[47]=t):t=c[47],s=n.createElement("div",e,a,t),c[44]=T.id,c[45]=s}else s=c[45];return s}:({msg:e})=>{let t=(0,y.Iu)(e.channel,e.ts),a=(0,A.d4)(e=>(0,x.BZ)(e,t??"")),r=(0,A.d4)(e=>(0,x.MO)(e,t??"")),i=(0,A.d4)(g.Ag),l=(0,A.d4)(e=>"on"===(0,E._Z)(e,"ai_apps_loading_no_shimmer")),o=(0,A.d4)(e=>(0,x.Y2)(e,t)),s=o?.botUserId,c=(0,A.d4)(e=>(0,C.nv)(e,s)),d=(0,A.d4)(e=>(0,C._7)(e,s)),m=(0,b.j)(a,r.loadingMessages),u=r.iconEmoji||r.iconUrl;if(!a)return null;let p=r.username??d;return i?n.createElement("div",{className:v().agentContainer,"data-qa":"agent-container"},n.createElement(_.Ay,{size:24,userId:u?void 0:c.id,emoji:r.iconEmoji??void 0,icons:{image_36:r.iconUrl??void 0},isInteractive:!1,className:v().agentAvatar,"data-qa":"agent-avatar"}),n.createElement("div",{className:v().agentLoading,"data-qa":"agent-loading"},l?n.createElement("span",{className:v().agentName},p):n.createElement(f.r,{className:v().agentName,text:p}),n.createElement("span",{className:v().agentLoadingText,"data-qa":"agent-loading-text"},m))):n.createElement("div",{className:"display_flex align_items_center","data-qa":"agent-container-legacy"},n.createElement(_.Ay,{userId:c.id,size:24,isInteractive:!1,className:v().agentAvatar,"data-qa":"agent-avatar-legacy"}),n.createElement("span",{className:v().agentLoadingText,"data-qa":"agent-loading-text-legacy"},n.createElement(f.r,{text:S.t("Working on a response\u2026")})))};function _temp(e){return"on"===(0,E._Z)(e,"ai_apps_loading_no_shimmer")}I.displayName="AgentCheckingDetailsLoader";var w=a(0x138186673),T=a(0xa361c357),N=a(0x1991a9b6d),M=a(0x16cf1da63),R=a(0x134e233cc),P=a(0x210cf696f),L=a(0x1a02c72b5),O=a(0xd6a16321),D=a(0x179106a22),F=a(0x242503693),U=a(0x24558b75f),B=a(0x1deaf9033),H=a(0x5a0401a4);let W=new s.Ay("message"),V=(0,p.Ar)()?e=>{let t,a,r,l,o=(0,h.c)(14),{msg:s,className:c}=e,d=(0,M.wA)(),{ts:m,thread_ts:u,channel:p}=s,_=void 0===u?"":u,{transitionFocusTo:f}=(0,R.Gx)();o[0]!==s?(t=e=>(0,D.k)(e,s),o[0]=s,o[1]=t):t=o[1];let b=(0,A.d4)(t);o[2]!==p||o[3]!==d||o[4]!==_||o[5]!==f||o[6]!==m?(a=e=>{e.preventDefault();let t=(0,U.Cz)(e);t?(f({focusKey:F.Ay.THREAD_MESSAGE_LIST,focusMetadata:{id:"thread",params:{threadId:(0,B.H)({channel:p,ts:m}),replyTs:m}}}),d((0,H.A)({channelId:p,threadTs:_,highlightTs:m,shouldOpenInTile:t}))):d((0,L.o)((0,O.UX)({channelId:p,threadTs:_,replyTs:m})))},o[2]=p,o[3]=d,o[4]=_,o[5]=f,o[6]=m,o[7]=a):a=o[7];let g=a;if(!b)return null;o[8]!==c?(r=i()("c-message__broadcast_footer",c),o[8]=c,o[9]=r):r=o[9];let y=r;if(o[10]!==g||o[11]!==y){let e;o[13]===Symbol.for("react.memo_cache_sentinel")?(e=W.t("View newer replies"),o[13]=e):e=o[13],l=n.createElement(P.A,{className:y,onClick:g,"data-stringify-ignore":!0},e),o[10]=g,o[11]=y,o[12]=l}else l=o[12];return l}:({msg:e,className:t})=>{let a=(0,M.wA)(),{ts:r,thread_ts:l="",channel:o}=e,{transitionFocusTo:s}=(0,R.Gx)(),c=(0,A.d4)(t=>(0,D.k)(t,e)),d=(0,n.useCallback)(e=>{e.preventDefault();let t=(0,U.Cz)(e);t?(s({focusKey:F.Ay.THREAD_MESSAGE_LIST,focusMetadata:{id:"thread",params:{threadId:(0,B.H)({channel:o,ts:r}),replyTs:r}}}),a((0,H.A)({channelId:o,threadTs:l,highlightTs:r,shouldOpenInTile:t}))):a((0,L.o)((0,O.UX)({channelId:o,threadTs:l,replyTs:r})))},[o,a,l,s,r]);if(!c)return null;let m=i()("c-message__broadcast_footer",t);return n.createElement(P.A,{className:m,onClick:d,"data-stringify-ignore":!0},W.t("View newer replies"))};V.displayName="ThreadBroadcastFooter";var G=a(0x1337d9fa2);function BroadcastFooter({msg:e}){return(0,G.SM)(e)&&e?.thread_ts&&e?.channel?n.createElement(V,{className:"c-message_kit__broadcast_footer",msg:e}):null}BroadcastFooter.displayName="BroadcastFooter";var q=a(0x136bf21),j=a(0x5d46521d),z=a(0x1c8ee22b5),K=a(0x1f0c2dae9),$=a(0x1a502bb06),Y=a(0xca4f3cec),Q=a(0x19a6a6f6a),Z=a(0x1939011ec),J=a(0x170214077),X=a(0x3c7694ae),ee=a(0x106632d1d),et=a(0xf1cb9c30),ea=a(0x11d27b2d),en=a(0x24f3e03d0),er=a(0x150f8d9c),ei=a(0x6792c5b4),el=a(0x1feae9b59),eo=a(0x1bf20af7f),es=a(0x5cc5a7cb),ec=a(0x1496ad106),ed=a(0x1cf59fe89),em=a(0x625e2de8),eu=a(0xbef42b3),ep=a(0x2a101827),eh=a(0x141d0a01),e_=a(0x146369fa8),ef=a(0x1e11e0f6b),eb=a(0xde270041),eg=a(0xb04c4a12),ey=a(0xeeed8b91),eA=a(0x74bbb29a);let ex=new s.Ay("message_kit"),eE=[eA.ml.FirstMessage,eA.ml.AtMention,eA.ml.Reacji],eC=class extends n.PureComponent{static defaultProps={theme:"light",adjacent:!1,focused:!1,hasContextMenu:!1,renderActionsOffscreen:!1,markMsgUnread:l.A,isLast:!1,highlight:!1,clearHighlight:l.A,clearAriaAnnounceMessageTs:l.A,showExternalOpenTooltip:!1,messageContainerType:eg.Y.MESSAGE_PANE,blocksContainerContext:u.pi.message,channelId:"",onMediaPlaybackInProgressChanged:l.A,isInView:!1,onMount:l.A,isSenderHidden:!1,onMessageLimitTrialStart:l.A,isBlurredMsg:!1,blurredMessages:[],experimentTrialImprovementsGroupOn:!1,experimentSlackAiMessageTranslationGroupOn:!1,experimentAiMessageAnalysisGroupOn:!1,shouldMessageStream:!1,experimentAiAppsAnimatedStreamingRootsFeGroupOn:!1,animationsEnabled:!0};ariaAnnounceUniqueIdentifier;constructor(e){super(e),this.state={streamingHappenedWhileInstantiated:!1},this.handleBackgroundClick=this.handleBackgroundClick.bind(this),this.renderSender=this.renderSender.bind(this),this.renderTimestamp=this.renderTimestamp.bind(this),e.ariaAnnounceText&&(this.ariaAnnounceUniqueIdentifier=(0,c.A)())}componentDidMount(){this.props?.onMount&&this.props.onMount(this.props.ts),this.props?.ariaAnnounceText&&this.props?.clearAriaAnnounceMessageTs&&this.props.clearAriaAnnounceMessageTs()}componentDidUpdate(e){!e.ariaAnnounceText&&this.props?.ariaAnnounceText&&this.props?.clearAriaAnnounceMessageTs&&this.props.clearAriaAnnounceMessageTs(),this.props.experimentAiAppsAnimatedStreamingRootsFeGroupOn&&(this.props.animationsEnabled?!this.state.streamingHappenedWhileInstantiated&&(0,eb._)(this.props.msg)&&this.setState(e=>({...e,streamingHappenedWhileInstantiated:!0})):this.state.streamingHappenedWhileInstantiated&&this.setState(e=>({...e,streamingHappenedWhileInstantiated:!1})))}componentWillUnmount(){this.props.shouldFadeInOnTrialStart&&this.props.onMessageLimitTrialStart&&this.props.onMessageLimitTrialStart({unlockMessages:!1})}getCompactGutter(){let{theme:e,adjacent:t}=this.props,a="light"===e,r=i()("p-message_pane_message__compact_timestamp",{"p-message_pane_message__compact_timestamp--light":a,"p-message_pane_message__compact_timestamp--adjacent":t});return n.createElement("div",{className:r},this.renderTimestamp({meridiem:!(t&&a)}))}shouldTruncateBlurredMsg(e){let{experimentTrialImprovementsGroupOn:t,blurredMessages:a}=this.props;return t&&(0,o.A)(a,e?.ts)}getCompactMessageBody(e){let{adjacent:t,rollup:a,blocksContainerContext:r,isSenderHidden:i,channelId:l,experimentSlackAiMessageTranslationGroupOn:o,experimentAiMessageAnalysisGroupOn:s,shouldShowReacjiTriggers:c,shouldMessageStream:d,experimentAiAppsAnimatedStreamingRootsFeGroupOn:p}=this.props,h=d&&p&&this.state.streamingHappenedWhileInstantiated;return n.createElement(eo.A,null,n.createElement(ea.A,{msg:e,shouldRender:!t},this.renderSender({visible:!t,className:"p-message_pane_message__sender--compact"}),!t&&n.createElement(n.Fragment,null,"\xa0")),n.createElement(ed.A,{msg:e},this.shouldTruncateBlurredMsg(e)?n.createElement(m.A,{lines:1},n.createElement(eu.E,{withFormattingStyles:!0,msg:e})):n.createElement(n.Fragment,null,n.createElement(Q.A,{msg:e,rollup:a,"data-qa":"message-text",hideCanvasMsgInBroadcasts:!0}),h?n.createElement(e_.o,{msg:e,blocksContainerContext:u.pi.slackbot_message,inline:!0}):n.createElement(j.A,{msg:e,blocksContainerContext:r})),n.createElement(q.A,{msg:e}),n.createElement(z.A,{msg:e}),n.createElement(K.A,{msg:e}),n.createElement(w.A,{msg:e}),o&&l&&n.createElement(ef.u,{msg:e,channelId:l}),s&&l&&n.createElement(eh.g,{msg:e,channelId:l})),n.createElement($.A,{msg:e,shouldShowReacjiTriggers:c}),!i&&n.createElement(n.Fragment,null,n.createElement(I,{msg:e}),n.createElement(Z.A,{msg:e}),n.createElement(BroadcastFooter,{msg:e})))}getLightMessageBody(e){let{adjacent:t,rollup:a,blocksContainerContext:r,isSenderHidden:i,channelId:l,experimentSlackAiMessageTranslationGroupOn:o,shouldShowReacjiTriggers:s,experimentAiMessageAnalysisGroupOn:c,shouldMessageStream:d,experimentAiAppsAnimatedStreamingRootsFeGroupOn:p}=this.props,h=d&&p&&this.state.streamingHappenedWhileInstantiated;return n.createElement(n.Fragment,null,n.createElement(ea.A,{msg:e,shouldRender:!t},this.renderSender({visible:!t}),!t&&n.createElement(n.Fragment,null,"\xa0\xa0"),this.renderTimestamp({visible:!t}),!t&&n.createElement("br",null)),n.createElement(ed.A,{msg:e},this.shouldTruncateBlurredMsg(e)?n.createElement(m.A,{lines:1},n.createElement(eu.E,{withFormattingStyles:!0,msg:e})):n.createElement(n.Fragment,null,n.createElement(Q.A,{msg:e,rollup:a,"data-qa":"message-text",hideCanvasMsgInBroadcasts:!0}),h?n.createElement(e_.o,{msg:e,blocksContainerContext:u.pi.slackbot_message,inline:!1}):n.createElement(N.A,{msg:e,blocksContainerContext:r})),n.createElement(q.A,{msg:e}),n.createElement(z.A,{msg:e}),n.createElement(K.A,{msg:e}),n.createElement(w.A,{msg:e}),o&&l&&n.createElement(ef.u,{msg:e,channelId:l}),c&&l&&n.createElement(eh.g,{msg:e,channelId:l})),n.createElement($.A,{msg:e,shouldShowReacjiTriggers:s}),!i&&n.createElement(n.Fragment,null,n.createElement(I,{msg:e}),n.createElement(Z.A,{msg:e}),n.createElement(BroadcastFooter,{msg:e})))}handleBackgroundClick(e){e.altKey&&(e.preventDefault(),this.props.markMsgUnread&&this.props.markMsgUnread(this.props.msg))}isCardInteractive(){let{msg:e,teamId:t}=this.props,{bot_profile:a={}}=e,n=!0,r=(0,ey.a_)()===a.app_id,i=a.team_id===t;return r&&!i&&void 0!==t&&(n=!1),n}renderMessageBody(){let{msg:e,theme:t}=this.props;return"dense"===t?this.getCompactMessageBody(e):this.getLightMessageBody(e)}renderSender(e={}){return n.createElement(Y.A,{msg:this.props.msg,isInteractive:this.isCardInteractive(),...e})}renderTimestamp(e={}){return n.createElement(J.A,{msg:this.props.msg,clickable:!0,...e},this.props.showExternalOpenTooltip?ex.t("Open in channel"):null)}render(){let{msg:e,theme:t,adjacent:a,focused:r,hasContextMenu:o,renderActionsOffscreen:s,actionsPosition:c,parentId:m,isLast:u,highlight:p,ariaAnnounceText:h,clearHighlight:_,messageContainerType:f,rollup:b,onMediaPlaybackInProgressChanged:g,isInView:y,shouldFadeInOnTrialStart:A,isBlurredMsg:x}=this.props,E=i()("p-message_pane_message__message","c-message_kit__message",this.props.className,{"p-message_pane_message__fade_in":A}),C="dense"===t,k=this.isCardInteractive(),v=C?this.getCompactGutter():null,S=a?this.getCompactGutter():n.createElement(T.A,{msg:e,showCard:k});return n.createElement(er.A,{msg:e},n.createElement(et.Ay,{isBlurredMsg:x,msg:e,className:E,onClick:this.handleBackgroundClick,highlight:p,clearHighlight:_},n.createElement(el.Ay,{disabled:x,hovered:r,hasContextMenu:o},n.createElement(X.A,{msg:e,rollup:b,messageContainerType:f,position:c||(C||a?"above":"default"),renderOffscreen:s,parentId:m,isLast:u},n.createElement(ec.A,{msg:e,messageContainerType:f},n.createElement(es.A,{msg:e,className:"p-message_pane_message__message_label"},n.createElement(ep.Ay,{msg:e,tips:eE,msgIsInView:y},n.createElement(ei.A,{light:S,compact:v,clipboardIgnoreLeftGutter:!C&&!a},n.createElement(em.A,{msg:e,replyBar:n.createElement(Z.A,{msg:e})},n.createElement(ee.Ay,{onMediaPlaybackInProgressChanged:g||l.A},n.createElement(en.A,{msg:e},this.renderMessageBody())))))))))),h&&n.createElement(d.A,{message:h,uuid:this.ariaAnnounceUniqueIdentifier}))}};eC.displayName="Message";let ek=eC},0x1269e55c8:(e,t,a)=>{"use strict";a.d(t,{A:()=>Q});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x21f3c49e8),c=a(0x210cf696f),d=a(0x16dc59f6a),m=a(0x29f0e1ee),u=a(0x18bf902cb),p=a(0x238ee6f5d),h=a(0x2376ea9bb),_=a(0x6e465d95),f=a(0x1510b26e9),b=a(0x4c96e5d9),g=a(0xfe570029),y=a(0x248c3697e),A=a(0x19ab18890),x=a(0x226892387),E=a(0xe684f705),C=a(0x1f9f884d1),k=a(0x3d579db4),v=a.n(k);let S=n.memo(({memberId:e=""})=>{let t=(0,x.d4)(t=>(0,E.nv)(t,e)),a=(0,x.d4)(t=>(0,C.Jg)(t,e)),r=t&&(0,C.mu)(t);if(!a||!r)return null;let i=(0,y.c)(a,{verbosity:"short"}),l=(0,y.c)(a,{verbosity:"long"}),o=(0,g.t)(a);return i?n.createElement(b.Ay,{tip:l,zIndex:"above_fs","data-qa":"custom_status_tooltip"},n.createElement("div",{className:v().celebrationPill},n.createElement("span",null,i,!!o&&n.createElement(A.Ay,{className:"margin_left_25",text:o,emojiSize:A.lw.XSMALL,isEmojiInlineWithText:!0,forceDisplay:!0})))):null});var I=a(0xd6c581ea),w=a(0x12ca0ca8c),T=a(0x2216d2750),N=a(0x20482ad21);let M=new N.Ay("lists"),ListEditPostfix=()=>n.createElement("span",{className:"c-message__sender--postfix"},"\xa0",M.t("edited this item."));ListEditPostfix.displayName="ListEditPostfix";let R=n.memo(ListEditPostfix);var P=a(0xbda07447),L=a(0x1340892e2),O=a(0x1fd3f6e20);let D=new N.Ay("message");function SlackbotLegacyBadge(){return n.createElement(b.Ay,{tip:D.t("Slack notification",{fallbackHash:"a53f3047adc144706f124136480ec777eef51201",fallbackHashNs:"activity"}),position:"top"},n.createElement("span",{className:"margin_left_25"},n.createElement(O.v,{style:O.u.Gray,isMicro:!0},D.t("LEGACY",{fallbackHash:"38a42fd39e3bbdd76ba2dba65bea762f7aea0428",fallbackHashNs:"enterprise_dashboard"}))))}SlackbotLegacyBadge.displayName="SlackbotLegacyBadge";var F=a(0x14d4c545f),U=a(0xe20fc115),B=a(0x10027d8bc),H=a(0xebdd009e),W=a(0x6d72337),V=a(0x107c8ce7),G=a(0x24558b75f),q=a(0x1cd12d16e),j=a(0x9bb47ea1),z=a(0x14149c126),K=a(0x15b4a156e),$=a(0xf9cb31c6);let Y=(0,n.forwardRef)((e,t)=>{n.useImperativeHandle(t,()=>({props:e}),[e]);let{name:a="",overrideNameText:i,color:b,theme:g="light",userId:y="",botId:A,botProfile:E,hideCustomStatus:C,isUnknown:k=!0,isNonExistent:v,isInteractive:N=!0,memberIsHuman:M=!0,memberIsExternal:O,memberTeamId:D,clogLinkClick:Y=o.A,clientTheme:Q="light",className:Z,isWorkflow:J,isChannelEmail:X,isHuddleMsg:ee,isAssistantThread:et,isAgentforceAgent:ea,isAgentApp:en,isListEditMsg:er,huddleActivityStatus:ei,isHuddleNoteMsg:el,isScheduledHuddleMsg:eo,isDeleteScheduledHuddleMsg:es,hideAppBadge:ec,isChannelCanvasUpdateMessage:ed,isChannelTabCanvasUpdateMessage:em,isWelcomePartyMessage:eu,isCustomResponse:ep,isSlackbotNotification:eh,isSlackbotDmMessage:e_=!1,isAiHuddleSummary:ef,isMeetingReminderLive:eb=!1,experimentReskinCustomResponsesGroupOn:eg,suppressColoredNames:ey=!1,visible:eA=!0,isPriority:ex=!1,messageTs:eE,triggerId:eC,enableShimmerEffect:ek=!1}=e,ev=(0,x.d4)($.Ie),eS=(0,x.d4)(B.gT),eI=(0,x.d4)(e=>(0,U.Cq)(e,eh??!1,e_)),ew=(0,x.d4)(e=>"on"===(0,z._Z)(e,"app_connect")),eT=E?.app_id,eN=(0,x.d4)(e=>ew&&eT?(0,K.Ue)(e,{appId:eT}):void 0),eM=(0,x.d4)(e=>!!("on"===(0,z._Z)(e,"app_connect")&&eN?.connectionStatus===j.q.disconnected&&eN?.connectUrl)),eR=(0,r.wA)();(0,n.useEffect)(()=>{ew&&eT&&!eN&&eR((0,K.fL)({appId:eT}))},[ew,eT,eN,eR]);let renderBotLabel=()=>{let e=X||ee||et||el||eo||es||ed||em||eu||ep||ef||ec;return eI&&!e?n.createElement(SlackbotLegacyBadge,null):M||e||eh&&eS?null:eM&&eN?.connectUrl?n.createElement("span",{className:"margin_left_25"},n.createElement(f.A,{connectUrl:eN.connectUrl})):n.createElement("span",{className:"margin_left_25"},n.createElement(_.A,{isWorkflow:J,"data-qa":"message_sender_app_badge",isAgentforce:ea,isAgent:en}))};renderBotLabel.displayName="renderBotLabel";let renderTeamIcon=()=>O&&D&&"dense"===g?n.createElement(h.A,{size:16,showTooltip:!0,id:D,className:"nudge_top_3 margin_right_25 inline_flex align_top"}):null;renderTeamIcon.displayName="renderTeamIcon";let renderStatusBadge=()=>{if(eb)return n.createElement(T.L,{badge:T.E.LIVE});if(!ee||!ei)return null;switch(ei){case H.Gb.ACTIVE:return n.createElement(T.L,{badge:T.E.LIVE});case H.Gb.MISSED:return n.createElement(T.L,{badge:T.E.MISSED});default:return null}};renderStatusBadge.displayName="renderStatusBadge";let renderListEditPostfix=()=>er?n.createElement(R,null):null;renderListEditPostfix.displayName="renderListEditPostfix";let eP=i||a;if(!eA)return n.createElement(P.h,null);if(k)return n.createElement(p.A,{type:"unknown"});if(v&&!a&&!i)return n.createElement(p.A,{type:"non-existent"});let eL={};"dense"===g&&b&&!ey&&(eL.color=`#${b}`,"dark"===Q&&"USLACKBOT"===y&&(eL.color="#ddd"));let eO=eP;return ek&&(eO=n.createElement(L.r,{text:eP,inline:!0})),eO=!N||ee||eo||es?ee||eo||es?n.createElement("span",{"data-qa":"huddle_message_user_name"},n.createElement(w.A,{text:eP})):n.createElement("span",{"data-qa":"message_sender_name"},eO):n.createElement(c.A,{className:"c-message__sender_button",style:(0,s.A)(eL)?void 0:eL,onClick:e=>{e.nativeEvent instanceof KeyboardEvent&&(0,V.A)(e)||(y||A)&&((0,G.Cz)(e)?eR((0,I.A)(y||A)):eR((0,q.U)({memberId:y,serviceId:A,botProfile:E,triggerId:eC})),Y(eC?{contexts:{ui_context:{ui_component_name:"message_sender",ui_component_variant:"workflow"}}}:void 0))},"data-message-sender":y,"data-qa":"message_sender_name"},eO),!N||ee||eo||es||(eO=(0,W.yN)({memberId:y,serviceId:A,botProfile:E,children:eO,messageTs:eE})),n.createElement("span",{className:l()("c-message__sender",Z),style:(0,s.A)(eL)?void 0:eL,"data-qa":"message_sender","data-stringify-type":"replace","data-stringify-text":eP},renderTeamIcon(),eO,n.createElement(P.h,null),ex&&n.createElement(d.A,null),ep&&eg&&n.createElement(F.A,null),!C&&n.createElement(m.A,{memberId:y}),!C&&ev&&n.createElement(u.A,{isInteractive:!0,memberId:y}),!C&&n.createElement(S,{memberId:y}),renderBotLabel(),renderStatusBadge(),renderListEditPostfix())});Y.displayName="BaseMessageSender";let Q=Y},0x17f2be456:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x113cdbbd7),o=a(0xe28ad2a3),s=a(0xb25439fa),c=a(0x9388b08c),d=a(0x12185e091),m=a(0x1c91944c9),u=a(0x7535c126),p=a(0x217553e42);let h=(0,s.A)(c.A),_=new i.Ay("msg_edit"),f=class extends n.PureComponent{constructor(e){super(e),this.onGo=this.onGo.bind(this)}onGo(){let{ts:e,channelId:t,removeMessage:a}=this.props;a({channelId:t,ts:e,broadcastDelete:!0}).catch(r.A)}render(){let e,t,{ts:a,channelId:r,channelType:i}=this.props;return"channel"===i?(e=_.t("Remove from channel"),t=_.t("Are you sure you want to remove this message from the channel?")):(e=_.t("Remove from conversation"),t=_.t("Are you sure you want to remove this message from the conversation?")),n.createElement(o.Ay,{title:e,focusOnPrimaryButton:!0,goButtonText:_.t("Remove message"),onGo:this.onGo},n.createElement("div",{className:"margin_bottom_100"},t," ",_.t("The original reply will still be visible in its thread.")),n.createElement(h,{ts:a,channelId:r,blocksContainerContext:l.pi.remove_broadcast_dialog,footer:!1}))}};f.displayName="BaseRemoveBroadcastDialog";let b=(0,m.N)((e,{channelId:t})=>{let a=(0,p.OL)(e,t);return{channelType:(0,d.mz)(a)||void 0}},e=>({removeMessage:t=>e((0,u.A)(t))}))(f)},0xbef42b3:(e,t,a)=>{"use strict";a.d(t,{E:()=>O,u:()=>canRenderSimpleMessagePreview});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x6cc5eee0),s=a(0xcd092f8c),c=a(0x16c7d0bca),d=a(0x16a2f8123),m=a(0x1a917cc3b),u=a(0xb22ff273),p=a(0x99192caa),h=a(0xe8a88a4c),_=a(0x96de2457),f=a(0x12ca0ca8c),b=a(0xebdd009e),g=a(0x21d6ed371),y=a(0x226892387),A=a(0x21c11a1dc);let x=new l.Ay("huddles");function HuddleBroadcastMsgText({msg:e}){let t,a=(0,y.d4)(t=>(0,b.Vh)({state:t,roomId:e?.room_id})),n=(0,y.d4)(t=>(0,A.Ej)(t,e?.room_id));return(0,g.mb)(e)?(t=n?a?x.rt("{huddleTopic} is happening",{huddleTopic:i.createElement(f.A,{text:n.trim()})}):x.rt("{huddleTopic} happened",{huddleTopic:i.createElement(f.A,{text:n.trim()})}):a?x.t("A huddle is happening"):x.t("A huddle happened"),i.createElement("span",null,t)):null}HuddleBroadcastMsgText.displayName="HuddleBroadcastMsgText";let E=i.memo(HuddleBroadcastMsgText);var C=a(0xc21e53b3),k=a(0x85ffb91f),v=a(0x4bb86411),S=a(0xa0337198),I=a(0x10cd505f3);let getCanvasShareText=({msg:e})=>{if((0,g.Ds)(e)||e?.blocks?.[0]?.text?.text)return e?.blocks?.[0]?.text.text};var w=a(0x1dde06271),T=a(0x1c24816a5),N=a(0xd0109e4f),M=a(0xa9a523c4),R=a(0x1337d9fa2),P=a(0x19c76d181);let L=new l.Ay("recent_page"),O=(0,n.Ar)()?function(e){let t,a,n,l,f=(0,r.c)(79),{msg:b,file:A,maxNewlines:x,truncateLength:O,withFormattingStyles:D,withHighlights:F,withSlackLinks:U,withHyperlinks:B,withCanvasShare:H,withYouPrefix:W,withBotNamePrefix:V,withFirstAvailableText:G}=e,q=void 0===x?1:x,j=void 0!==D&&D,z=void 0!==F&&F,K=void 0!==U&&U,$=void 0!==B&&B,Y=void 0!==H&&H,Q=void 0!==G&&G,Z=(0,y.d4)(P.WR);f[0]!==b?(t=e=>(0,k.V)(e,{msg:b}),f[0]=b,f[1]=t):t=f[1];let J=(0,y.d4)(t),X=(0,y.d4)(_.wP),ee=(0,g.qL)(b)&&X?b?.assistant_app_thread?.title:void 0;if(b&&(0,g.mb)(b)){let e;return f[2]!==b?(e=i.createElement(E,{msg:b}),f[2]=b,f[3]=e):e=f[3],e}if(b&&(0,T.o)(b)){let e;return f[4]!==b?(e=i.createElement(C.u,{msg:b}),f[4]=b,f[5]=e):e=f[5],e}if(b&&(0,R.cb)(b)){let e;return f[6]!==b?(e=i.createElement(h.g,{msg:b}),f[6]=b,f[7]=e):e=f[7],e}if(b&&(0,R.Ni)(b)){let e;return f[8]!==b?(e=i.createElement(p.z,{msg:b}),f[8]=b,f[9]=e):e=f[9],e}if(b&&Y&&(0,g._t)(b)){let e;return f[10]!==b?(e=i.createElement(u.X,{msg:b}),f[10]=b,f[11]=e):e=f[11],e}if(b&&(0,R.gA)(b)){let e;return f[12]!==b?(e=i.createElement(S.A,{msg:b}),f[12]=b,f[13]=e):e=f[13],e}if(b&&(0,R.Lo)(b)){let e;return f[14]!==b?(e=i.createElement(I.d,{msg:b}),f[14]=b,f[15]=e):e=f[15],e}if(b&&(0,R.AZ)(b)){let e;if(f[16]!==b.channel||f[17]!==b.welcome_party_user_id){let t,a=b.welcome_party_user_id||"";f[19]!==b.channel||f[20]!==a?(t={channelId:b.channel,joinerId:a},f[19]=b.channel,f[20]=a,f[21]=t):t=f[21],e=i.createElement(v.J,t),f[16]=b.channel,f[17]=b.welcome_party_user_id,f[18]=e}else e=f[18];return e}if(!canRenderSimpleMessagePreview({msg:b,file:A,withFirstAvailableText:Q}))return null;let et="";if(void 0!==W&&W&&b?.user===Z){let e;f[22]===Symbol.for("react.memo_cache_sentinel")?(e=L.t("You:"),f[22]=e):e=f[22],et=e}void 0!==V&&V&&J&&(et=J),f[23]!==b?.blocks?(a=b?.blocks??[],f[23]=b?.blocks,f[24]=a):a=f[24],f[25]!==a?(n=(0,c.n)(a),f[25]=a,f[26]=n):n=f[26];let ea=n;if(Q&&b&&ea&&!(0,M.A)(b)&&!ee?.length){let e;return f[27]!==ea||f[28]!==q||f[29]!==et||f[30]!==O||f[31]!==j||f[32]!==z||f[33]!==$||f[34]!==K?(e=i.createElement(d.t,{blockToRender:ea,prefix:et,truncateLength:O,maxNewlines:q,withFormattingStyles:j,withHighlights:z,withSlackLinks:K,withHyperlinks:$}),f[27]=ea,f[28]=q,f[29]=et,f[30]=O,f[31]=j,f[32]=z,f[33]=$,f[34]=K,f[35]=e):e=f[35],e}if(!Q&&b&&(0,N.x)(b,!0)&&(0,m.n)(b.blocks)&&!(0,M.A)(b)&&!ee?.length){let e;if(f[36]!==q||f[37]!==b.blocks?.[0]||f[38]!==et||f[39]!==O||f[40]!==j||f[41]!==z||f[42]!==$||f[43]!==K){let t,a=et;if(f[45]!==q||f[46]!==b.blocks?.[0]||f[47]!==O||f[48]!==j||f[49]!==z||f[50]!==$||f[51]!==K){let e,a=b.blocks?.[0];f[53]!==q||f[54]!==a||f[55]!==O||f[56]!==j||f[57]!==z||f[58]!==$||f[59]!==K?(e={richTextBlock:a,truncateLength:O,maxNewlines:q,withFormattingStyles:j,withHighlights:z,withSlackLinks:K,withHyperlinks:$},f[53]=q,f[54]=a,f[55]=O,f[56]=j,f[57]=z,f[58]=$,f[59]=K,f[60]=e):e=f[60],t=i.createElement(s.y,e),f[45]=q,f[46]=b.blocks?.[0],f[47]=O,f[48]=j,f[49]=z,f[50]=$,f[51]=K,f[52]=t}else t=f[52];e=i.createElement(i.Fragment,null,a,et?" ":"",t),f[36]=q,f[37]=b.blocks?.[0],f[38]=et,f[39]=O,f[40]=j,f[41]=z,f[42]=$,f[43]=K,f[44]=e}else e=f[44];return e}let en="";if(b)if(Y&&(0,g.Ds)(b)){let e;f[61]!==b?(e=getCanvasShareText({msg:b}),f[61]=b,f[62]=e):e=f[62],en=e}else{let e;f[63]!==A||f[64]!==b?(e=(0,w.A)(b,A),f[63]=A,f[64]=b,f[65]=e):e=f[65],en=e}if(f[66]!==q||f[67]!==ee||f[68]!==en||f[69]!==O||f[70]!==z||f[71]!==K){let e,t=ee||en,a=!z,n=!K;f[73]!==q||f[74]!==t||f[75]!==a||f[76]!==n||f[77]!==O?(e={text:t,noHighlights:a,noHexColors:!0,noJumbomoji:!0,noLinking:n,noCode:!0,noQuotes:!0,customLineEnding:"\u2026",maxNewlines:q,maxCharacters:O,"data-qa":"simple_message_preview"},f[73]=q,f[74]=t,f[75]=a,f[76]=n,f[77]=O,f[78]=e):e=f[78],l=i.createElement(o.A,e),f[66]=q,f[67]=ee,f[68]=en,f[69]=O,f[70]=z,f[71]=K,f[72]=l}else l=f[72];return l}:function({msg:e,file:t,maxNewlines:a=1,truncateLength:n,withFormattingStyles:r=!1,withHighlights:l=!1,withSlackLinks:f=!1,withHyperlinks:b=!1,withCanvasShare:A=!1,withYouPrefix:x=!1,withBotNamePrefix:O=!1,withFirstAvailableText:D=!1}){let F=(0,y.d4)(P.WR),U=(0,y.d4)(t=>(0,k.V)(t,{msg:e})),B=(0,y.d4)(_.wP),H=(0,g.qL)(e)&&B?e?.assistant_app_thread?.title:void 0;if(e&&(0,g.mb)(e))return i.createElement(E,{msg:e});if(e&&(0,T.o)(e))return i.createElement(C.u,{msg:e});if(e&&(0,R.cb)(e))return i.createElement(h.g,{msg:e});if(e&&(0,R.Ni)(e))return i.createElement(p.z,{msg:e});if(e&&A&&(0,g._t)(e))return i.createElement(u.X,{msg:e});if(e&&(0,R.gA)(e))return i.createElement(S.A,{msg:e});if(e&&(0,R.Lo)(e))return i.createElement(I.d,{msg:e});if(e&&(0,R.AZ)(e))return i.createElement(v.J,{channelId:e.channel,joinerId:e.welcome_party_user_id||""});if(!canRenderSimpleMessagePreview({msg:e,file:t,withFirstAvailableText:D}))return null;let W="";x&&e?.user===F&&(W=L.t("You:")),O&&U&&(W=U);let V=(0,c.n)(e?.blocks??[]);if(D&&e&&V&&!(0,M.A)(e)&&!H?.length)return i.createElement(d.t,{blockToRender:V,prefix:W,truncateLength:n,maxNewlines:a,withFormattingStyles:r,withHighlights:l,withSlackLinks:f,withHyperlinks:b});if(!D&&e&&(0,N.x)(e,!0)&&(0,m.n)(e.blocks)&&!(0,M.A)(e)&&!H?.length)return i.createElement(i.Fragment,null,W,W?" ":"",i.createElement(s.y,{richTextBlock:e.blocks?.[0],truncateLength:n,maxNewlines:a,withFormattingStyles:r,withHighlights:l,withSlackLinks:f,withHyperlinks:b}));let G="";return e&&(G=A&&(0,g.Ds)(e)?getCanvasShareText({msg:e}):(0,w.A)(e,t)),i.createElement(o.A,{text:H||G,noHighlights:!l,noHexColors:!0,noJumbomoji:!0,noLinking:!f,noCode:!0,noQuotes:!0,customLineEnding:"\u2026",maxNewlines:a,maxCharacters:n,"data-qa":"simple_message_preview"})};function canRenderSimpleMessagePreview({msg:e,file:t,withFirstAvailableText:a=!1}){return!!e&&"tombstone"!==(0,R.ys)(e)&&(!!((0,N.x)(e,a)&&!(0,M.A)(e)||(0,g.Ds)(e))||!!(0,w.A)(e,t))}O.displayName="SimpleMessagePreview"},0x10fb9a645:(e,t,a)=>{"use strict";a.d(t,{A:()=>v});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x1cbdfeceb),c=a(0x13776886e),d=a(0x44520056),m=a(940089e4),u=a(0x3dcad321),p=a(0x2380341f5),h=a(0x20482ad21),_=a(0x15e39ab9e),f=a(0x4c96e5d9),b=a(0x6b50b5fd),g=a(0x137b3c34d),y=a(0x22f6121cb),A=a(0x1ccef1c6f),x=a(0x226892387);let E=new h.Ay("message");function getFullTimestamp({timestamp:e,time24:t,includeSeconds:a=!0,showWeekday:n}){let r=n?(0,c.A)(e.getTime()/1e3,"{date_long}"):(0,d.A)(e,{shortenMonth:!0});return E.t("{date} at {time}",{date:r,time:(0,u.A)(e,{do24hrTime:t,includeSeconds:a})})}let C=(0,n.Ar)()?e=>{let t,a,n=(0,r.c)(14),{children:l,dateObject:o,time24:s,showWeekday:c,full:d}=e,m=!d;n[0]!==o||n[1]!==c||n[2]!==m||n[3]!==s?(t=getFullTimestamp({timestamp:o,time24:s,includeSeconds:m,showWeekday:c}),n[0]=o,n[1]=c,n[2]=m,n[3]=s,n[4]=t):t=n[4];let u=t;if(l){let e;if(n[5]!==l||n[6]!==u){let t,a;if(n[8]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement("br",null),n[8]=t):t=n[8],n[9]!==u){let e;n[11]===Symbol.for("react.memo_cache_sentinel")?(e={className:"sk_light_gray_always no_wrap"},n[11]=e):e=n[11],a=i.createElement("span",e,u),n[9]=u,n[10]=a}else a=n[10];e=i.createElement("span",null,l,t,a),n[5]=l,n[6]=u,n[7]=e}else e=n[7];return e}return n[12]!==u?(a=i.createElement(i.Fragment,null,u),n[12]=u,n[13]=a):a=n[13],a}:({children:e,dateObject:t,time24:a,showWeekday:n,full:r})=>{let l=(0,i.useMemo)(()=>getFullTimestamp({timestamp:t,time24:a,includeSeconds:!r,showWeekday:n}),[t,a,r,n]);return e?i.createElement("span",null,e,i.createElement("br",null),i.createElement("span",{className:"sk_light_gray_always no_wrap"},l)):i.createElement(i.Fragment,null,l)};C.displayName="TimestampTooltip";let k=(0,i.forwardRef)((0,n.Ar)()?(e,t)=>{let a,n,l,c,d,h,A,E,k,v,S,I,w=(0,r.c)(63);w[0]!==e?(a=()=>({props:e}),n=[e],w[0]=e,w[1]=a,w[2]=n):(a=w[1],n=w[2]),i.useImperativeHandle(t,a,n);let{timestamp:T,full:N,relative:M,meridiem:R,showWeekday:P,compact:L,link:O,clickable:D,children:F,onClick:U,"data-qa":B,noTooltip:H,visible:W,alwaysAgo:V,customTimestampFormat:G}=e,q=void 0!==M&&M,j=void 0===R||R,z=void 0===U?s.A:U,K=void 0===V||V,[$,Y]=(0,i.useState)(_temp),Q=(0,x.d4)(_temp2),Z=q||!!G;w[3]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{Y(Date.now())},w[3]=l):l=w[3],(0,y.A)(l,Z?6e4:null),w[4]!==T?(c=(0,m.A)(T),w[4]=T,w[5]=c):c=w[5];let J=c,X=!!(N||O);e:{if(X){let e,t=!N;w[6]!==J||w[7]!==P||w[8]!==t||w[9]!==Q?(e=getFullTimestamp({timestamp:J,time24:Q,includeSeconds:t,showWeekday:P}),w[6]=J,w[7]=P,w[8]=t,w[9]=Q,w[10]=e):e=w[10],d=e;break e}d=void 0}let ee=d;t:{let e;if(N){h=ee;break t}if(q){let e;w[11]!==$||w[12]!==K||w[13]!==L||w[14]!==J?(e=(0,p.A)(J,{alwaysAgo:K,compact:L,currentTime:$}),w[11]=$,w[12]=K,w[13]=L,w[14]=J,w[15]=e):e=w[15],h=e;break t}if(G){let e;w[16]!==$||w[17]!==G||w[18]!==J||w[19]!==j||w[20]!==Q?(e=(0,g.r)(J,G,Q,j,$),w[16]=$,w[17]=G,w[18]=J,w[19]=j,w[20]=Q,w[21]=e):e=w[21],h=e;break t}w[22]!==J||w[23]!==j||w[24]!==Q?(e=(0,u.A)(J,{do24hrTime:Q,includeMeridiem:j}),w[22]=J,w[23]=j,w[24]=Q,w[25]=e):e=w[25],h=e}let et=h;w[26]!==J?(A=(0,u.A)(J),w[26]=J,w[27]=A):A=w[27];let ea=`[${A}]`,en=!D;w[28]!==en?(E=o()("c-timestamp",{"c-timestamp--static":en}),w[28]=en,w[29]=E):E=w[29];let er=E;w[30]!==ea||w[31]!==T?(k={"data-stringify-type":"replace","data-stringify-text":ea,"data-stringify-requires-siblings":!0,"data-ts":T},w[30]=ea,w[31]=T,w[32]=k):k=w[32];let ei=k;w[33]!==er||w[34]!==B||w[35]!==ee||w[36]!==et||w[37]!==O||w[38]!==z||w[39]!==ei?(v=O?i.createElement(_.A,{href:O,"aria-label":ee,className:er,onClick:z,"data-qa":B,...ei},i.createElement("span",{className:"c-timestamp__label","data-qa":"timestamp_label"},et)):i.createElement("span",{role:"none",className:er,onClick:z,"data-qa":B,...ei},i.createElement("span",{className:"c-timestamp__label","data-qa":"timestamp_label"},et)),w[33]=er,w[34]=B,w[35]=ee,w[36]=et,w[37]=O,w[38]=z,w[39]=ei,w[40]=v):v=w[40];let el=v;w[41]!==F||w[42]!==J||w[43]!==N||w[44]!==P||w[45]!==Q?(S=()=>i.createElement(C,{dateObject:J,time24:Q,showWeekday:P,full:N},F),w[41]=F,w[42]=J,w[43]=N,w[44]=P,w[45]=Q,w[46]=S):S=w[46];let eo=S;if(!(void 0===W||W)){let e;return w[47]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(b.Q,null),w[47]=e):e=w[47],e}if(F){let e;if(w[48]!==el||w[49]!==eo){let t,a;w[51]!==eo?(t={delay:f.PK,tip:eo,hideFromScreenReader:!0},w[51]=eo,w[52]=t):t=w[52];let n=i.createElement(f.Ay,t,el);w[53]===Symbol.for("react.memo_cache_sentinel")?(a=i.createElement(b.Q,null),w[53]=a):a=w[53],e=i.createElement(i.Fragment,null,n,a),w[48]=el,w[49]=eo,w[50]=e}else e=w[50];return e}if(N||void 0!==H&&H){let e;if(w[54]!==el){let t;w[56]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement(b.Q,null),w[56]=t):t=w[56],e=i.createElement(i.Fragment,null,el,t),w[54]=el,w[55]=e}else e=w[55];return e}if(w[57]!==el||w[58]!==eo){let e,t;w[60]!==eo?(e={delay:f.PK,tip:eo,hideFromScreenReader:!0},w[60]=eo,w[61]=e):e=w[61];let a=i.createElement(f.Ay,e,el);w[62]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement(b.Q,null),w[62]=t):t=w[62],I=i.createElement(i.Fragment,null,a,t),w[57]=el,w[58]=eo,w[59]=I}else I=w[59];return I}:(e,t)=>{i.useImperativeHandle(t,()=>({props:e}),[e]);let{timestamp:a,full:n,relative:r=!1,meridiem:l=!0,showWeekday:c,compact:d,link:h,clickable:E,children:k,onClick:v=s.A,"data-qa":S,noTooltip:I=!1,visible:w=!0,alwaysAgo:T=!0,customTimestampFormat:N}=e,[M,R]=(0,i.useState)(()=>Date.now()),P=(0,x.d4)(e=>(0,A.ty)(e,"time24")),L=r||!!N;(0,y.A)(()=>{R(Date.now())},L?6e4:null);let O=(0,i.useMemo)(()=>(0,m.A)(a),[a]),D=!!(n||h),F=(0,i.useMemo)(()=>{if(D)return getFullTimestamp({timestamp:O,time24:P,includeSeconds:!n,showWeekday:c})},[O,D,P,n,c]),U=(0,i.useMemo)(()=>n?F:r?(0,p.A)(O,{alwaysAgo:T,compact:d,currentTime:M}):N?(0,g.r)(O,N,P,l,M):(0,u.A)(O,{do24hrTime:P,includeMeridiem:l}),[M,n,F,r,O,T,d,N,P,l]),B=(0,i.useMemo)(()=>`[${(0,u.A)(O)}]`,[O]),H=o()("c-timestamp",{"c-timestamp--static":!E}),W={"data-stringify-type":"replace","data-stringify-text":B,"data-stringify-requires-siblings":!0,"data-ts":a},V=h?i.createElement(_.A,{href:h,"aria-label":F,className:H,onClick:v,"data-qa":S,...W},i.createElement("span",{className:"c-timestamp__label","data-qa":"timestamp_label"},U)):i.createElement("span",{role:"none",className:H,onClick:v,"data-qa":S,...W},i.createElement("span",{className:"c-timestamp__label","data-qa":"timestamp_label"},U)),G=(0,i.useCallback)(()=>i.createElement(C,{dateObject:O,time24:P,showWeekday:c,full:n},k),[k,O,P,c,n]);return w?k?i.createElement(i.Fragment,null,i.createElement(f.Ay,{delay:f.PK,tip:G,hideFromScreenReader:!0},V),i.createElement(b.Q,null)):n||I?i.createElement(i.Fragment,null,V,i.createElement(b.Q,null)):i.createElement(i.Fragment,null,i.createElement(f.Ay,{delay:f.PK,tip:G,hideFromScreenReader:!0},V),i.createElement(b.Q,null)):i.createElement(b.Q,null)}),v=i.memo(k);function _temp(){return Date.now()}function _temp2(e){return(0,A.ty)(e,"time24")}},0x85ffb91f:(e,t,a)=>{"use strict";a.d(t,{V:()=>getBotMessagePrefix});var n=a(0x20482ad21),r=a(0x66a0f59a),i=a(0x18476a827);let l=new n.Ay("recent_page"),getBotMessagePrefix=(e,{msg:t})=>{if(!t?.bot_id)return;if((0,r.A)(t))return`${l.t("Slackbot",{fallbackHash:"9fbb94b5162e7574992afdd016c779599cac2cad",fallbackHashNs:"prefs"})}:`;let a=(0,i.vu)(e,t.bot_id);return a?`${a}:`:void 0}},0x137b3c34d:(e,t,a)=>{"use strict";a.d(t,{M:()=>l,r:()=>getCustomTimestampFormat});var n,r=a(0x3dcad321),i=a(0xa92a13bc),l=((n={}).THREAD_DETAIL_VIEW="THREAD_DETAIL_VIEW",n);let getCustomTimestampFormat=(e,t,a,n,l)=>"THREAD_DETAIL_VIEW"===t?(0,i.q)(e,a,l):(0,r.A)(e,{do24hrTime:a,includeMeridiem:n})},0xfe7e1cbe:(e,t,a)=>{"use strict";a.d(t,{M:()=>getFileCommentPreamble});var n=a(0x20482ad21),r=a(0x3c6b702a);let i=new n.Ay("message");function getFileCommentPreamble({plainText:e,isFollowup:t,fileMode:a,fileLink:n,userId:l,userName:o,userLink:s}={}){let c={file:n,user:s,possessive:(0,r.A)(o)};return t?(c.note="[sender] commented:",i.t("commented:",c)):l?"snippet"===a?(c.note="[sender] commented on joe's snippet. Also, the possessive affix is localized, but please move it before or after the user name depending on whether possessives are prefixes or suffixes for your language.",e?i.t("commented on {user}{possessive} snippet {file}",c):i.rt("commented on {user}{possessive} snippet {file}",c)):(c.note="[sender] commented on joe's file. Also, the possessive affix is localized, but please move it before or after the user name depending on whether possessives are prefixes or suffixes for your language.",e?i.t("commented on {user}{possessive} file {file}",c):i.rt("commented on {user}{possessive} file {file}",c)):(c.note="[sender] commented on Kittens.gif",e?i.t("commented on {file}",c):i.rt("commented on {file}",c))}},0x80cc7778:(e,t,a)=>{"use strict";a.d(t,{A:()=>getMessageAutomatedSubtypeText,x:()=>getWelcomePartyMessageAutomatedSubtypeText});var n=a(0x20482ad21),r=a(0x16ac9b089),i=a(0x1ec69ee01),l=a(0x12185e091),o=a(0x1ecc7f772),s=a(0x1b9d5cc0c),c=a(0x21d6ed371),d=a(0x1337d9fa2);let m=new n.Ay("message");function getRecordChannelAutoArchiveText(e,{new_state:t,old_state:a,owner:n,is_won:i}){let l=m.t("#{channelName} was archived because it moved from {oldState} to {newState}. The contents will still be browsable and available in search.",{channelName:e,oldState:a,newState:t});if(i){let e=n?.slack_user_id?(0,r.Ay)(`<@${n.slack_user_id}>`):n?.display_name;e&&(l+=`
`,l+=m.t("Shout out to {recordOwner} for closing the deal! :tada:",{recordOwner:e}))}return l}function getWelcomePartyMessageAutomatedSubtypeText({message:e,channel:t,member:a,joinerName:n,teamName:r}){if(!e||!t||!a||!n||!r)return"";let i=(0,o.Mn)(t);return m.t("{user} joined #{channel}. They\u2019re also new to {team}.",{channel:i,user:n,team:r,fallbackHash:"f963e8ac75fc47e619e3abf9904d2addc1c33946"})}function getMessageAutomatedSubtypeText({message:e,channel:t,member:a}){if(!e||!t||!a)return"";let n=(0,d.ys)(e),u=(0,c.Hr)(e),p=(0,c.tO)(e),h=(0,c.CO)(e),_=(0,c.kT)(e),f=(0,c.HT)(e),b=(0,l.JM)(t),g=(0,o.Mn)(t),y=(0,i.VE)(t),A=(0,s.qj)(a),x=a.id;if("channel_topic"===n||"group_topic"===n)return p?b?m.t("set the conversation topic: {topic}",{topic:(0,r.Ay)(p)}):m.t("set the channel topic: {topic}",{topic:(0,r.Ay)(p)}):b?m.t("cleared the conversation topic"):m.t("cleared the channel topic");if("channel_purpose"===n||"group_purpose"===n)return h?m.t("set the channel description: {purpose}",{purpose:(0,r.Ay)(h)}):m.t("cleared the channel description");if("channel_name"===n||"group_name"===n)return m.t("renamed the channel from \u201C{old_name}\u201D to \u201C{new_name}\u201D",{old_name:_,new_name:f});if("channel_archive"===n){let t=e.record_context?.event;return t?.type==="record_closed"?getRecordChannelAutoArchiveText(g,t.data):y?m.t("moved #{channelName} to another {orgName} workspace. The contents up until this point are still browsable and available in search.",{channelName:g,orgName:A}):x===u?m.t("archived #{channelName}. The messages and files in this channel are still browsable and available in search. You can unarchive this channel anytime from Channel Details.",{channelName:g}):m.t("archived #{channelName}. The contents will still be browsable and available in search.",{channelName:g})}if("group_archive"===n)return y?m.t("moved {channelName} to another {orgName} workspace. The contents up until this point are still browsable and available in search.",{channelName:g,orgName:A}):x===u?m.t("archived #{channelName}. The messages and files in this channel are still browsable and available in search. You can unarchive this channel anytime from Channel Details.",{channelName:g}):m.t("archived {channelName}. The contents will still be browsable and available in search.",{channelName:g});if("channel_unarchive"===n){let t=e.record_context?.event;if(t?.type==="record_opened"){let{old_state:e,new_state:a}=t.data;return m.t("#{channelName} was unarchived because it moved from {oldState} to {newState}.",{channelName:g,oldState:e,newState:a})}return m.t("unarchived #{channelName}",{channelName:g})}return"group_unarchive"===n?m.t("unarchived {channelName}",{channelName:g}):"channel_posting_permissions"===n?m.t("changed channel posting permissions."):"canvas_open_by_default"===n?m.t("changed the default visibility setting for the channel canvas."):"canvas_editing_permissions_changed"===n?m.t("changed editing permissions for the channel canvas."):"automatic_ai_huddle_notes_enabled"===n?m.t("turned on automatic AI huddle notes in this channel. Manage this setting in *Channel Settings*."):"automatic_ai_huddle_notes_disabled"===n?m.t("turned off automatic AI huddle notes in this channel. Manage this setting in *Channel Settings*."):"retention_threshold"===n?m.t("Due to the retention policies of an organization in this channel, all their messages and files from before this date have been deleted."):"canvas"===n?m.t("joined the huddle"):e.text||""}},0x5189fb60:(e,t,a)=>{"use strict";a.d(t,{u:()=>getMessageCustomResponseIndicatorText});let n=new(a(0x20482ad21)).Ay("message");function getMessageCustomResponseIndicatorText(){return n.t("Custom response")}},0x12b5ed4ce:(e,t,a)=>{"use strict";a.d(t,{Z:()=>getMessageEphemeralIndicatorText});let n=new(a(0x20482ad21)).Ay("message");function getMessageEphemeralIndicatorText(){return n.t("Only visible to you")}},0xda97abcb:(e,t,a)=>{"use strict";a.d(t,{A:()=>getMessageSummaryData});var n=a(0x1595bdd0),r=a(0x1ee15af19),i=a(0x13776886e),l=a(0x252f0da49),o=a(0xec9d0658),s=a(0x20482ad21),c=a(0x17bc3dd75),d=a(0x1d8dbb62d),m=a(0x5fcdd233),u=a(0x1178eb664),p=a(0x1d407f97d),h=a(0x1ecc7f772),_=a(0x21d6ed371),f=a(0xa88049da),b=a(0x1e03159e1),g=a(0x203beba52),y=a(0x1c7106d6c),A=a(0x1c24816a5),x=a(0x1c8b9de2f),E=a(0xe7f7bccf),C=a(0x1337d9fa2),k=a(0x1d37f5c8a),v=a(0x1f28bdc18),S=a(0x94e8342),I=a(0x6960d8b9),w=a(0x62427837),T=a(0x47119420),N=a(0x2215561bf),M=a(0x9b971e7e),R=a(0x1ccef1c6f),P=a(0x217553e42),L=a(0x1e4ae349d),O=a(0x1d6a65362),D=a(0x14ea3ce99),F=a(0xd93ecf94),U=a(0x237a55f00),B=a(0x1beeaa71e),H=a(0x1b9ff23fe);let W=new s.Ay("message");function getTextForTwitterUnfurl(e,t){return`${t.service_name} ${t.author_name} ${t.author_subname} ${(0,T.A)(e,t.text)} ${(0,I.DM)(e,t.ts)}.`}function getTextForLinkUnfurl(e,t){let a=t.text?(0,T.A)(e,t.text):"";return`${t.original_url} ${a}.`}function getTextForGenericAttachment(e,t){let a=[];return t.text&&a.push((0,T.A)(e,t.text)),t.fields&&t.fields.length>0&&a.push(t.fields.map(e=>`${e.title}: ${e.value}`).join("; ")),a.join(" ")}function getTextForAttachments(e,t,{messageSubtype:a,messageText:r,messageBlocks:i,isRichTextMessage:l}){let o=(0,R.ty)(e,"expand_inline_imgs"),s=(0,R.ty)(e,"expand_non_media_attachments");return t?(0,n.A)(t.map(t=>{if(!(0,p.l)({attachment:t,messageSubtype:a,messageText:r,messageBlocks:i,expandInlineImgsPref:o,expandNonMediaAttachmentsPref:s,isRichTextMessage:l}))return null;let n=[];if(t.pretext&&n.push(t.pretext),t.author_name&&n.push(t.author_name),t.title&&n.push(t.title),t.is_msg_unfurl){let a=(0,d.C)(e,t);n.push(replaceEmojiCodesWithPhrases(e,a))}else"twitter"===t.service_name?n.push(getTextForTwitterUnfurl(e,t)):t.from_url?n.push(getTextForLinkUnfurl(e,t)):n.push(getTextForGenericAttachment(e,t));return n.join(" ")})):[]}function replaceEmojiCodesWithPhrases(e,t){if(!t)return"";let a=(0,M.ZT)(e);return t.replace((0,o.A)(),t=>(0,L.ux)(e,{text:t,teamId:a})?(0,w.A)(t,{state:e}):t)}function getMessageSummaryData(e,{ts:t,channelId:a,previousMessageTs:n,rollup:o,viewContext:s}={}){let d,p=a&&t?(0,F.Ld)(e,a,t):null,I=(0,P.OL)(e,a);if(!p||!I)return null;let w=p.files,T=(0,D.Lp)(e,(0,r.A)(w)),M=(0,C.ys)(p),L=(0,g.A)(M),V=(0,f.A)(e,p),G=(0,_.Gs)(p);if(G){let n=`${a}-${t}`,r=(0,H.dc)(e,n);if(r&&r.dateDue)if((0,v.sN)(r))d=W.t("Reminder completed.");else{let t=(0,R.ty)(e,"time24"),a=(0,m.BM)(r.dateDue),n=(0,i.A)(r.dateDue,"{date_long_pretty}"),l=W.t("{date} at {time}",{date:n.includes(a)?n:`${n} ${a},`,time:(0,i.A)(r.dateDue,"{time}",{do24hrTime:t})});d=W.t("Reminder due {detailedDate}.",{detailedDate:l})}}if(M&&!L&&!(0,E.A)(p)&&-1===["agentforce_message","bot_message","me_message","file_comment","file_mention","file_share","file_upload","thread_broadcast","channel_join","channel_leave","group_join","group_leave","tombstone","dlp_tombstone","ekm_access_denied","slackbot_response","document_comment_root","huddle_thread","document_mention","list_mention","dsa_restricted","channel_canvas_updated","channel_canvas_updated_unread_ignore","tabbed_canvas_updated","tabbed_canvas_updated_unread_ignore","assistant_app_thread","canvas_sharing_message","channel_tab_added","channel_tab_added_unread_ignore","folder_item_added","folder_item_added_unread_ignore"].indexOf(M))return null;let q=(0,k.J)(p,T),j=(0,_.If)(p),z=getTextForAttachments(e,j,{messageSubtype:M,messageText:p.text,messageBlocks:p.blocks,isRichTextMessage:(0,S.A)(p.blocks,!1)}),K=p.files?.map(t=>(0,D.Lp)(e,t)),$=(0,O.LV)(e),Y=(0,R.ty)(e,"time24"),Q=(0,_.nZ)(p)?(0,_.M8)(p):void 0,Z={name:"",time:(0,i.A)(p.ts,"{time}",{do24hrTime:Y,includeSeconds:!1}),text:(0,u.P)(e,{msg:p,channelId:a,previousMessageTs:n,rollup:o,viewContext:s}),channelName:(0,h.SB)(e,I,{publicChannelIncludeHashSign:!1}),reactionCount:q?(0,B.pK)(e,q):0,replyCount:p.reply_count,isEdited:!!Q,isArchived:(0,_.$Q)(p),editedDate:Q?(0,l.J)((0,b.E)(Q)):void 0,screen_reader_text:p?.screen_reader_text,editedTime:Q?(0,i.A)(Q,"{time}",{do24hrTime:Y,includeSeconds:!1}):void 0,isPinned:!!a&&!!t&&(0,U.Wt)(e,{channelId:a,ts:t}),isStarred:(0,_.m2)(p),isSaved:G,reminderText:d,isTombstone:(0,C.aK)(p)||(0,C.s7)(p)||(0,C.Dv)(p)||(0,C.TD)(p),isNonExistent:(0,_.xh)(p),isModerated:(0,A.o)(p),isHidden:(0,y.A)(e,p),isEKMOrDLPTombstone:(0,C.s7)(p)||(0,C.Dv)(p),isRetentionThreshold:(0,x.k)(p),isDSARestricted:(0,C.TD)(p),attachmentCount:j?j.length:0,attachmentTexts:z,files:K,pendingFileIds:p.pendingFiles,isPending:p.is_pending,uploadingFileName:$?.fileName||"",hasMeaninglessSentTs:(0,_.AT)(p),isBeyondFreeLimit:p.is_beyond_free_limit};return Z.isEKMOrDLPTombstone||Z.isDSARestricted?Z.name=`${(0,N.A)(p)}.`:Z.name=(0,c.A)(e,{userId:V.userId,botId:V.botId,username:V.username,botProfile:p.bot_profile}),Z}},0x1d8dbb62d:(e,t,a)=>{"use strict";a.d(t,{C:()=>getTextForMessageUnfurl});var n=a(0x20482ad21),r=a(0x16ac9b089),i=a(0x1ecc7f772),l=a(0x2378cf6ec),o=a(0x6960d8b9),s=a(0x47119420),c=a(0xc8f018f6),d=a(0x217553e42);let m=new n.Ay("message");function getTextForMessageUnfurl(e,t,a){let n=(0,l.I)(e,t.author_id||"",!0,!1),u=t?.ts||"",p=(0,o.DM)(e,u),h=(0,i.SB)(e,(0,d.OL)(e,t?.channel_id)),_=(0,s.A)(e,t.text),f=m.t("{authorName} replied to a thread in {channelName} on {date}: {messageText}",{authorName:(0,r.Ay)(n),date:p,channelName:h,messageText:(0,r.Ay)(_)}),b=m.t("{authorName} replied to a thread in {channelName} on {date}: {messageText}, ",{authorName:(0,r.Ay)(n),date:p,channelName:h,messageText:(0,r.Ay)(_)}),g=m.t("{authorName} on {date} in {channelName}: {messageText}",{authorName:(0,r.Ay)(n),date:p,channelName:h,messageText:(0,r.Ay)(_)}),y=m.t("{authorName} on {date} in {channelName}: {messageText}, ",{authorName:(0,r.Ay)(n),date:p,channelName:h,messageText:(0,r.Ay)(_)}),A=t.is_reply_unfurl?b:y,x=t.is_reply_unfurl?f:g,E=(0,c.S)(x);return a?E:A}},0x23b5bebfa:(e,t,a)=>{"use strict";a.d(t,{N:()=>getCanvasThreadPreambleMetaText,x:()=>getThreadPreambleMetaText});let n=new(a(0x20482ad21)).Ay("threads");function getCanvasThreadPreambleMetaText(){return n.t("replied to section")}function getThreadPreambleMetaText(){return n.t("replied to a thread")}},0x94141c4c:(e,t,a)=>{"use strict";a.d(t,{A:()=>getThreadRepliersNamesFromState});var n=a(0x1aba66b56),r=a(0x1673f3229),i=a(0x1595bdd0),l=a(0x20ef3966f),o=a(0xe0376d2),s=a(0x20482ad21),c=a(0x2378cf6ec),d=a(0x19c76d181),m=a(0x18476a827);let u=new s.Ay("threads");function getThreadRepliersNamesFromState(e,t){let a=(0,d.WR)(e),s=(0,n.A)(t,a),p=t;return s&&(p=(0,r.A)(t,a)).push(a),(0,i.A)((0,l.A)((0,r.A)((0,r.A)((0,o.A)(p),"U00"),"B00"),t=>{let n=(0,c.I)(e,t)||(0,m.vu)(e,t);return n?t===a?u.t("you"):n:null}))}},0xa92a13bc:(e,t,a)=>{"use strict";a.d(t,{q:()=>getThreadTimestampFormat});var n=a(0x20482ad21),r=a(0x6960d8b9);let i=new n.Ay("message"),getThreadTimestampFormat=(e,t,a)=>{let n=a?(0,r.$4)(a):new Date,l=Math.abs((0,r.Of)(n,e)),o=l/60;return l<60?i.t("Just now"):o<60?(0,r.YY)(e,{alwaysAgo:!0,currentTime:a}):(0,r.ro)(n,e)?i.t("Today at {time}",{time:(0,r.xe)(e,{do24hrTime:t})}):(0,r.PA)(e)?i.t("Yesterday at {time}",{time:(0,r.xe)(e,{do24hrTime:t})}):o/60/24<7?i.t("{dayOfTheWeek} at {time}",{dayOfTheWeek:(0,r.UE)(e),time:(0,r.xe)(e,{do24hrTime:t})}):i.t("{calendarDate} at {time}",{calendarDate:(0,r.gw)(e,{shortenMonth:!0,excludeYear:(0,r.s0)(n,e)}),time:(0,r.xe)(e,{do24hrTime:t})})}},0x2219d0266:(e,t,a)=>{"use strict";a.d(t,{A:()=>getMessageRollupText});var n=a(0x839ba347),r=a(0x424ce7f7),i=a(0xf4930165),l=a(0x6258badf),o=a(0x1ec37efc9),s=a(0x178533105);function filterOthers(e,t,a){return(0,s.A)(e,(e,n,r)=>(r===t||n.action!==a?.action||a?.inviter&&n.inviter!==a?.inviter||e.concat({id:r,name:n.name}),e),[])}var c=a(0x2317e05b6),d=a(0xf8dd7f80);let m=new(a(0x20482ad21)).Ay("message"),u=(0,d.getGenericLogger)();function getActionDescription({action:e,channel:t,user:a,isAppUser:n,others:r=[],inviter:i,first:l,also:o,i18nReplaceCallback:s,plainText:d,isMPDM:p,isPrivateChannel:h,isChannelCreator:_,isSalesforceChannel:f}){if(!e||!e.length)return u.error("rollups missing actions???"),"";let b=r.length,g={userA:a?.name||"UNKNOWN",userB:i?.name||"UNKNOWN",userC:r.length&&r[0].name,channel:t,count:b},y=(0,c.A)(s)(a,i,r),A="no_name"===t;switch(e){case"join":if(n)return m.rt("was added to this conversation by <inviter>{userB}</inviter>.",g,y);if(l&&i?.id){if(0===g.count){if(d){if(A)return m.t("was added to channel by {userB}.",{userB:g.userB});if(p)return m.t("was added to the conversation by {userB}.",{userB:g.userB});return m.t("was added to {channel} by {userB}.",{channel:g.channel,userB:g.userB})}if(A)return m.rt("was added to channel by <inviter>{userB}</inviter>.",{userB:g.userB},y);if(p)return m.rt("was added to the conversation by <inviter>{userB}</inviter>.",{userB:g.userB},y);return m.rt("was added to {channel} by <inviter>{userB}</inviter>.",{channel:g.channel,userB:g.userB},y)}if(1===g.count){if(d){if(A)return m.t("was added to channel by {userB}, along with {userC}.",{userB:g.userB,userC:g.userC});if(p)return m.t("was added to the conversation by {userB}, along with {userC}.",{userB:g.userB,userC:g.userC});return m.t("was added to {channel} by {userB}, along with {userC}.",{channel:g.channel,userB:g.userB,userC:g.userC})}if(A)return m.rt("was added to channel by <inviter>{userB}</inviter>, along with <other>{userC}</other>.",{userB:g.userB,userC:g.userC},y);if(p)return m.rt("was added to the conversation by <inviter>{userB}</inviter>, along with <other>{userC}</other>.",{userB:g.userB,userC:g.userC},y);return m.rt("was added to {channel} by <inviter>{userB}</inviter>, along with <other>{userC}</other>.",{channel:g.channel,userB:g.userB,userC:g.userC},y)}if(d){if(A)return m.t("was added to channel by {userB}, along with {count, number} others.",{userB:g.userB,count:g.count});if(p)return m.t("was added to the conversation by {userB}, along with {count, number} others.",{userB:g.userB,count:g.count});return m.t("was added to {channel} by {userB}, along with {count, number} others.",{channel:g.channel,userB:g.userB,count:g.count})}if(A)return m.rt("was added to channel by <inviter>{userB}</inviter>, along with <others>{count, number} others</others>.",{userB:g.userB,count:g.count},y);if(p)return m.rt("was added to the conversation by <inviter>{userB}</inviter>, along with <others>{count, number} others</others>.",{userB:g.userB,count:g.count},y);return m.rt("was added to {channel} by <inviter>{userB}</inviter>, along with <others>{count, number} others</others>.",{channel:g.channel,userB:g.userB,count:g.count},y)}if(l&&h&&!_&&!f){if(d){if(A){if(b)return m.t("joined the channel via invite {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("joined the channel via invite.")}if(b)return m.t("joined {channel} via invite {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("joined {channel} via invite.",g)}if(A){if(b)return m.rt("joined the channel via invite {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("joined the channel via invite.")}if(b)return m.rt("joined {channel} via invite {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("joined {channel} via invite.",g)}if(l){if(d){if(A){if(b)return m.t("joined the channel {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("joined the channel.")}if(b)return m.t("joined {channel} {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("joined {channel}.",g)}if(A){if(b)return m.rt("joined the channel {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("joined the channel.")}if(b)return m.rt("joined {channel} {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("joined {channel}.",g)}if(o&&h&&!f){if(d){if(b)return m.t("Also, {userA} {count, plural, =1 {and {userC}} other {and # others}} joined via invite.",g);return m.t("Also, {userA} joined via invite.",g)}if(b)return m.rt("Also, <user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} joined via invite.",g,y);return m.rt("Also, <user>{userA}</user> joined via invite.",g,y)}if(o){if(d){if(b)return m.t("Also, {userA} {count, plural, =1 {and {userC}} other {and # others}} joined.",g);return m.t("Also, {userA} joined.",g)}if(b)return m.rt("Also, <user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} joined.",g,y);return m.rt("Also, <user>{userA}</user> joined.",g,y)}if(d){if(b)return m.t("{userA} {count, plural, =1 {and {userC}} other {and # others}} joined.",g);return m.t("{userA} joined.",g)}if(b)return m.rt("<user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} joined.",g,y);return m.rt("<user>{userA}</user> joined.",g,y);case"leave":if(n){if(d)return m.t("was removed from this conversation by {userB}.",g);return m.rt("was removed from this conversation by <inviter>{userB}</inviter>.",g,y)}if(l){if(d){if(A){if(b)return m.t("left the channel {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("left the channel.")}if(b)return m.t("left {channel} {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("left {channel}.",g)}if(A){if(b)return m.rt("left the channel {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("left the channel.")}if(b)return m.rt("left {channel} {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("left {channel}.",g)}if(o){if(d){if(b)return m.t("Also, {userA} {count, plural, =1 {and {userC}} other {and # others}} left.",g);return m.t("Also, {userA} left.",g)}if(b)return m.rt("Also, <user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} left.",g,y);return m.rt("Also, <user>{userA}</user> left.",g,y)}if(d){if(b)return m.t("{userA} {count, plural, =1 {and {userC}} other {and # others}} left.",g);return m.t("{userA} left.",g)}if(b)return m.rt("<user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} left.",g,y);return m.rt("<user>{userA}</user> left.",g,y);case"join,leave":if(l){if(d){if(A){if(b)return m.t("joined and left the channel {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("joined and left the channel.")}if(b)return m.t("joined and left {channel} {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("joined and left {channel}.",g)}if(A){if(b)return m.rt("joined and left the channel {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("joined and left the channel.")}if(b)return m.rt("joined and left {channel} {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("joined and left {channel}.",g)}if(o){if(d){if(b)return m.t("Also, {userA} {count, plural, =1 {and {userC}} other {and # others}} joined and left.",g);return m.t("Also, {userA} joined and left.",g)}if(b)return m.rt("Also, <user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} joined and left.",g,y);return m.rt("Also, <user>{userA}</user> joined and left.",g,y)}if(d){if(b)return m.t("{userA} {count, plural, =1 {and {userC}} other {and # others}} joined and left.",g);return m.t("{userA} joined and left.",g)}if(b)return m.rt("<user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} joined and left.",g,y);return m.rt("<user>{userA}</user> joined and left.",g,y);case"leave,join":if(l&&i?.id){if(0===g.count){if(d){if(A)return m.t("rejoined the channel by invitation from {userB}.",g);return m.t("rejoined {channel} by invitation from {userB}.",g)}if(A)return m.rt("rejoined the channel by invitation from <inviter>{userB}</inviter>.",g,y);return m.rt("rejoined {channel} by invitation from <inviter>{userB}</inviter>.",g,y)}if(1===g.count){if(d){if(A)return m.t("rejoined the channel by invitation from {userB}, along with {userC}.",g);return m.t("rejoined {channel} by invitation from {userB}, along with {userC}.",g)}if(A)return m.rt("rejoined the channel by invitation from <inviter>{userB}</inviter>, along with <other>{userC}</other>.",g,y);return m.rt("rejoined {channel} by invitation from <inviter>{userB}</inviter>, along with <other>{userC}</other>.",g,y)}if(d){if(A)return m.t("rejoined the channel by invitation from {userB}, along with {count, number} others.",g);return m.t("rejoined {channel} by invitation from {userB}, along with {count, number} others.",g)}if(A)return m.rt("rejoined the channel by invitation from <inviter>{userB}</inviter>, along with <others>{count, number} others</others>.",g,y);return m.rt("rejoined {channel} by invitation from <inviter>{userB}</inviter>, along with <others>{count, number} others</others>.",g,y)}if(l){if(d){if(A){if(b)return m.t("rejoined the channel, {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("rejoined the channel.")}if(b)return m.t("rejoined {channel}, {count, plural, =1 {along with {userC}} other {along with # others}}.",g);return m.t("rejoined {channel}.",g)}if(A){if(b)return m.rt("rejoined the channel, {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("rejoined the channel.")}if(b)return m.rt("rejoined {channel}, {count, plural, =1 {along with <other>{userC}</other>} other {along with <others># others</others>}}.",g,y);return m.rt("rejoined {channel}.",g)}if(o){if(d){if(b)return m.t("Also, {userA} {count, plural, =1 {and {userC}} other {and # others}} rejoined.",g);return m.t("Also, {userA} rejoined.",g)}if(b)return m.rt("Also, <user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} rejoined.",g,y);return m.rt("Also, <user>{userA}</user> rejoined.",g,y)}if(d){if(b)return m.t("{userA} {count, plural, =1 {and {userC}} other {and # others}} rejoined.",g);return m.t("{userA} rejoined.",g)}if(b)return m.rt("<user>{userA}</user> {count, plural, =1 {and <other>{userC}</other>} other {and <others># others</others>}} rejoined.",g,y);return m.rt("<user>{userA}</user> rejoined.",g,y);default:return u.error("invalid rollup action???"),""}}var p=a(0x1ec69ee01),h=a(0x12185e091),_=a(0x1ecc7f772);function getMessageRollupText({plainText:e,rollup:t,channel:a,user:s,isAppUser:c,i18nReplaceCallback:d}={}){if(!t)return[];let m=(0,h.Zp)(a),u=(0,p.Wb)(a),f=(0,h.U_)(a),b=m?(0,_.Mn)(a):`#${(0,_.Mn)(a)}`,g=(0,h.yz)(a),y=[],A=s?t[s]:void 0,x=filterOthers(t,s,A||void 0),E=getActionDescription({action:A?.action||void 0,channel:b,user:{name:A?.name,id:s},isAppUser:!!c,others:x,inviter:{name:A&&"inviterName"in A?A?.inviterName:"",id:A?.inviter},first:!0,i18nReplaceCallback:d,plainText:!!e,isMPDM:g,also:!1,isPrivateChannel:m,isChannelCreator:!!u&&u===s,isSalesforceChannel:f});y.push(E);let C=!0;return(0,n.A)((0,r.A)((0,i.A)((0,l.A)(t,[...x.map(e=>e.id),s]),(e,t)=>({...e,id:t})),"action"),(t,a)=>{let n={name:t[0].name,id:t[0].id},r=(0,o.A)(t);y.push(" "),y.push(getActionDescription({action:a,channel:b,user:n,isAppUser:!!c,others:r,also:C,i18nReplaceCallback:d,plainText:!!e,isMPDM:g,first:!1,isPrivateChannel:m,isChannelCreator:!!u&&u===n.id,isSalesforceChannel:f})),C=!1}),y}},0x1345eeff9:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getInsertData:()=>getInsertData,getMatch:()=>getMatch,getResultFrecencyId:()=>getResultFrecencyId,recordSelection:()=>recordSelection});var n=a(0xb77a689a),r=a(0xe180a236),i=a(0x1ecc7f772),l=a(0x3711e82d),o=a(0x45012309),s=a(0x1aee7b9ef),c=a(0x108fb4e96),d=a(0x15c6cd54f),m=a(0xa3534e17),u=a(0xa5c1a5e9);let p=/(^|\n|.)([#\uFF03][^~`!@#\uFF03$%^&*()+=[\]{}\\|;:'",.<>/?\s]*)$/i,h=/(^|\n|.)([#\uFF03][^~`!@#\uFF03$%^&*()+=[\]{}\\|;:'",.<>/?]*)$/i;function isPrecededByFilterPrefix(e,t){let a=Object.values((0,c.av)()).map(e=>e.toLowerCase()),n=RegExp(`(?:${a.join("|")}):$`,"i"),r=e.slice(0,t);return n.test(r)}let getInsertData=(e,{useChannelTagging:t}={})=>{if(!e||!e.item)return null;(0,o.eo)().track(l.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"channel"}}});let a=(0,i.Mn)(e.item);return t?{text:`#${a}`,format:{slackmention:(0,m.A)(e.item.id||"",`#${a}`)}}:{text:`#${a}`,ensure_preceding_space:!0}},getMatch=(e,{experimentFriendlyChannelNamesEnabled:t,skipSearchFilterMentions:a=!1}={})=>{if(!(0,n.A)(e))return null;let i=e.match(t?h:p)||[],[,l,o]=i;if(!o||(0,u.A)(l))return null;if("/"===l){let t=(0,s.A)(e);if(t&&1===t.length&&t[0].text===e)return null}let c=(i.index||0)+(0,r.A)(l),d=e.slice(c);return a&&isPrecededByFilterPrefix(e,c)?null:{match:d,index:c}},getResultFrecencyId=e=>e&&e.item.id,recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete",navigationMethod:i,actionMethod:l};(0,d.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})}},0x62a5c3a9:(e,t,a)=>{"use strict";a.r(t),a.d(t,{EMOJI_MATCH_RX:()=>h,getInsertData:()=>getInsertData,getMatch:()=>getMatch,getResultFrecencyId:()=>getResultFrecencyId,recordSelection:()=>recordSelection});var n=a(0xb77a689a),r=a(0x99929cad),i=a(0x15c1838d),l=a(0x178bb5f4a),o=a(0x1d06c44fe),s=a(0x223ac29bb),c=a(0x3711e82d),d=a(0x45012309),m=a(0x79469c7e),u=a(0x15c6cd54f),p=a(0xa5c1a5e9);let h=/(^|\s|\S)([:|\uFF1A][^~@#$%^&*()=[\]{}\\|!?`;:\uFF1A",.<>/\s]*)$/i,isReactionPrefix=e=>"+"===e||"-"===e,getInsertData=(e,{userSkinTone:t,shouldRenderEmojiAsText:a}={})=>{if(!e||!e.item)return null;(0,d.eo)().track(c.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"emoji"}}});let n=(0,r.b)(e,t);return a?{text:((e,t)=>{if(!e)return null;let a=e.emojiBestNameMatchLocalized;if(!a)return"";let n=`:${a}:`;if((0,l.J)(t)&&(0,i.x)(e.item)){let e=`skin-tone-${t}`,a=(0,o.PO)({locale:(0,s.Yp)(),name:e});return`${n}:${a}:`}return n})(e,t)}:{text:"",slackemoji:{text:n}}},getMatch=(e,{isUserSolicited:t,locale:a}={})=>{if(!(0,n.A)(e))return null;let r="",i=0;if(e.replace(h,(t,a,n,l)=>{(isReactionPrefix(a)||!(0,p.A)(a))&&(i=l+a.length,r=e.substr(i,n.length))}),!r||(0,m.A)().test(r))return null;if(!t){let t=1===i&&isReactionPrefix(e[0]);if(r.length<("ja-JP"===a||t?2:3))return null}return{match:r,index:i}},getResultFrecencyId=e=>e&&e.item&&e.item.id,recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete",navigationMethod:i,actionMethod:l};(0,u.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})}},0x1867a7f28:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getInsertData:()=>getInsertData,getMatch:()=>getMatch,getResultFrecencyId:()=>getResultFrecencyId,isValidMatch:()=>isValidMatch,recordSelection:()=>recordSelection});var n=a(0xe77b6eca),r=a(0x3711e82d),i=a(0x45012309),l=a(0x1aee7b9ef),o=a(0x108fb4e96),s=a(0x15c6cd54f),c=a(0xa3534e17),d=a(0xa5c1a5e9);let m=/(^|\n|.)?((?:@|\uFF20)([^\n@\uFF20]*))$/i;function isPrecededByFilterPrefix(e,t){let a=Object.values((0,o.av)()).map(e=>e.toLowerCase()),n=RegExp(`(?:${a.join("|")}):$`,"i"),r=e.slice(0,t);return n.test(r)}let getInsertData=(e,{highlightWords:t,shouldRenderBroadcastsAsText:a=!1}={})=>{let l=e&&e.item;if(!l||!l.id)return null;(0,i.eo)().track(r.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"member"}}});let o=(0,n.KX)(l).normalize();return l.is_broadcast_keyword&&a?{text:o}:{text:o,format:{slackmention:(0,c.A)(l.id,o,t)}}},getMatch=(e,{skipSearchFilterMentions:t=!1}={})=>{let a;return(e.replace(m,(n,r="",i,o,s=0)=>{if(isValidMatch(o,r)&&!(t&&isPrecededByFilterPrefix(e,s+r.length))){if("/"===r){let t=(0,l.A)(e);if(t&&1===t.length&&t[0].text===e)return}a={match:i,index:s+r.length}}}),a)?a.match.split(" ").length-1>8?null:a:null},getResultFrecencyId=e=>e&&e.item.id,recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete",navigationMethod:i,actionMethod:l};(0,s.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})};function isValidMatch(e="",t=""){return!((0,d.A)(t)||e.match(/^\s/))}},0x81b4e6a1:(e,t,a)=>{"use strict";a.d(t,{An:()=>htmlIdForResultAtIndex,E:()=>r,P:()=>updateAutocompleteInputElementWithSelectedIndex,hN:()=>initAttributesOnAutocompleteInputElement,lw:()=>removeAttributesOnAutocompleteInputElement});var n=a(0x1feee1711);let r="chat_input_tab_ui";function htmlIdForResultAtIndex(e){return e>=0?`tab_complete_ui_item_${e}`:""}let i={"aria-activedescendant":void 0,"aria-controls":r,"aria-haspopup":"listbox"};function initAttributesOnAutocompleteInputElement(e){Object.entries(i).forEach(([t,a=""])=>e.setAttribute(t,a.toString()))}function removeAttributesOnAutocompleteInputElement(e){Object.keys(i).forEach(t=>e.removeAttribute(t))}function updateAutocompleteInputElementWithSelectedIndex(e,t){e.setAttribute("aria-activedescendant",(0,n.A)(t)?"":htmlIdForResultAtIndex(t))}},0x71f5866f:(e,t,a)=>{"use strict";a.d(t,{N:()=>p});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x15bd59d31),o=a(0x1bc5ae1c9),s=a(0x21caa21ad),c=a(0x12185e091),d=a(0x226892387),m=a(0x217553e42),u=a(0xbbaed668);let p=(0,n.Ar)()?e=>{let t,a,n,p,h=(0,r.c)(41),{channelId:_,index:f,isPseudoSelected:b,isSelected:g,displayFormerNames:y,previousName:A,result:x,onSelectedIndexChange:E,onMount:C,onUpdate:k,onSelect:v,hasChannelNameCollision:S}=e;h[0]!==_?(t=e=>(0,m.OL)(e,_),h[0]=_,h[1]=t):t=h[1];let I=(0,d.d4)(t);h[2]!==_?(a=e=>(0,u.A)(e,{id:_,propsToInclude:{teamName:!0,isArchived:!0,isPrivate:!0}}),h[2]=_,h[3]=a):a=h[3];let w=(0,d.d4)(a);h[4]!==I?(n=(0,c.yz)(I),h[4]=I,h[5]=n):n=h[5];let T=n;if(h[6]!==w||h[7]!==I||h[8]!==_||h[9]!==y||h[10]!==S||h[11]!==f||h[12]!==T||h[13]!==b||h[14]!==g||h[15]!==C||h[16]!==v||h[17]!==E||h[18]!==k||h[19]!==A||h[20]!==x){let e,t;h[22]!==w||h[23]!==_||h[24]!==f||h[25]!==b||h[26]!==g||h[27]!==C||h[28]!==v||h[29]!==E||h[30]!==k||h[31]!==x?(e={key:_,index:f,isPseudoSelected:b,isSelected:g,onSelectedIndexChange:E,onSelect:v,onMount:C,onUpdate:k,result:x,"aria-label":w},h[22]=w,h[23]=_,h[24]=f,h[25]=b,h[26]=g,h[27]=C,h[28]=v,h[29]=E,h[30]=k,h[31]=x,h[32]=e):e=h[32],h[33]!==I||h[34]!==_||h[35]!==y||h[36]!==S||h[37]!==T||h[38]!==g||h[39]!==A?(t=T?i.createElement(o.M,{id:_,mpim:I,isActive:g}):i.createElement(l.A,{channelId:_,channel:I,displayFormerNames:y,isActive:g,bestFormerName:A,showTeamForLocalChannel:S}),h[33]=I,h[34]=_,h[35]=y,h[36]=S,h[37]=T,h[38]=g,h[39]=A,h[40]=t):t=h[40],p=i.createElement(s.A,e,t),h[6]=w,h[7]=I,h[8]=_,h[9]=y,h[10]=S,h[11]=f,h[12]=T,h[13]=b,h[14]=g,h[15]=C,h[16]=v,h[17]=E,h[18]=k,h[19]=A,h[20]=x,h[21]=p}else p=h[21];return p}:({channelId:e,index:t,isPseudoSelected:a,isSelected:n,displayFormerNames:r,previousName:p,result:h,onSelectedIndexChange:_,onMount:f,onUpdate:b,onSelect:g,hasChannelNameCollision:y})=>{let A=(0,d.d4)(t=>(0,m.OL)(t,e)),x=(0,d.d4)(t=>(0,u.A)(t,{id:e,propsToInclude:{teamName:!0,isArchived:!0,isPrivate:!0}})),E=(0,c.yz)(A);return i.createElement(s.A,{key:e,index:t,isPseudoSelected:a,isSelected:n,onSelectedIndexChange:_,onSelect:g,onMount:f,onUpdate:b,result:h,"aria-label":x},E?i.createElement(o.M,{id:e,mpim:A,isActive:n}):i.createElement(l.A,{channelId:e,channel:A,displayFormerNames:r,isActive:n,bestFormerName:p,showTeamForLocalChannel:y}))};p.displayName="TextyAutocompleteChannelResult"},0x17feb01e0:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x839ba347),l=a(0x1cbdfeceb),o=a(0x20ef3966f),s=a(0x20482ad21),c=a(0x1b3ecb90f),d=a(0x68acc0e0),m=a(0x21caa21ad),u=a(0xc12d7108),p=a(0x99929cad),h=a(0x1c91944c9),_=a(0x1ccef1c6f);let f=new s.Ay("tabcomplete"),TextyAutocompleteEmoji=({onSelect:e=l.A,onSelectedIndexChange:t=l.A,onFirstResultMount:a=l.A,onFirstResultUpdate:s=l.A,results:h,selectedIndex:_,userSkinTone:b="",className:g,onFeedbackClick:y})=>n.createElement(d.A,{type:u.pm.EMOJI,className:g,results:h,"aria-label":f.t("Emoji"),onFeedbackClick:y},(0,o.A)(h,(l,o)=>{let d=0===o,u=(({text:e,indexes:t,renderHighlight:a})=>{if((0,r.A)(e))return null;let l=e.split("");return(0,i.A)(t,e=>{let t=a(l[e]);l[e]=n.cloneElement(t,{key:`index-${e}`})}),l})({text:l.emojiBestNameMatch||"",indexes:l.emojiMatchIndices,renderHighlight:e=>n.createElement("span",{className:"c-texty_autocomplete__result_highlight"},e)}),h=(0,p.b)(l,b);return n.createElement(m.A,{key:l.item.name,index:o,isPseudoSelected:0===o&&void 0===_,isSelected:o===_,onSelectedIndexChange:t,onSelect:e,onMount:d?a:void 0,onUpdate:d?s:void 0,result:l},n.createElement(c.Ay,{className:"c-texty_autocomplete__result_emoji",text:h||void 0,forceDisplay:!0}),n.createElement("span",{className:"c-texty_autocomplete__result_name overflow_ellipsis"},":",u,":"))}));TextyAutocompleteEmoji.displayName="TextyAutocompleteEmoji";let b=(0,h.N)(e=>({userSkinTone:(0,_.ty)(e,"preferred_skin_tone")||""}))(TextyAutocompleteEmoji)},0xc20d1300:(e,t,a)=>{"use strict";a.d(t,{a:()=>g});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x10d53599f),s=a(0x21caa21ad),c=a(0x1c9a3c4c1),d=a(0x2434bed34),m=a(0x8c65a12f);let u=(0,a(0x1cf0d97e1).Ay)((e,{fileId:t,memberId:a})=>(0,m.p)(e,{fileId:t,userId:a}));u.meta={name:"getExplicitCanvasMembershipForMemberId",key:"createSelectorGetExplicitCanvasMembershipForMemberId",description:(e,{fileId:t,memberId:a})=>(0,m.p)(e,{fileId:t,userId:a})};var p=a(0x226892387),h=a(0x1b39d2a1f),_=a(0x12a144c0b),f=a(0xe684f705);let b=new l.Ay("tabcomplete"),ContextLabel=({isProfileOnlyUser:e,isMemberOfChannel:t,isCanvasOrCanvasComment:a,isMemberOfCanvas:n,isListFile:r,cannotMentionAgent:l})=>e?i.createElement("span",{className:"c-texty_autocomplete__result_context"},b.t("Not on Slack")):r&&!t?i.createElement("span",{className:"c-texty_autocomplete__result_context"},b.t("Not in list")):a||t?a&&!n?i.createElement("span",{className:"c-texty_autocomplete__result_context"},b.t("Not in canvas")):l?i.createElement("span",{className:"c-texty_autocomplete__result_context"},b.t("Not able to mention more than one agent")):void 0:i.createElement("span",{className:"c-texty_autocomplete__result_context"},b.t("Not in channel"));ContextLabel.displayName="ContextLabel";let g=(0,n.Ar)()?e=>{let t,a,n,l,m,b,g,y,A,x=(0,r.c)(64),{memberId:E,channelId:C,fileId:k,index:v,isPseudoSelected:S,isSelected:I,isListFile:w,isCanvasOrCanvasComment:T,result:N,canMentionAgent:M,shouldUseShortAriaLabel:R,onSelectedIndexChange:P,onMount:L,onUpdate:O,onSelect:D}=e;x[0]!==C||x[1]!==E?(t=e=>!!C&&(0,h.Q)(e,C,E),x[0]=C,x[1]=E,x[2]=t):t=x[2];let F=(0,p.d4)(t);x[3]!==E?(a=e=>(0,f.nv)(e,E),x[3]=E,x[4]=a):a=x[4];let U=(0,p.d4)(a);x[5]!==U?(n=(0,d.h)(U),x[5]=U,x[6]=n):n=x[6];let B=n;x[7]!==k||x[8]!==E?(l=e=>!!k&&u(e,{fileId:k,memberId:E}),x[7]=k,x[8]=E,x[9]=l):l=x[9];let H=(0,p.d4)(l);x[10]!==M||x[11]!==N?(m=(0,c.D)(N)&&!1===M,x[10]=M,x[11]=N,x[12]=m):m=x[12];let W=m;x[13]!==M||x[14]!==N?(b=(0,c.D)(N)&&!1===M,x[13]=M,x[14]=N,x[15]=b):b=x[15];let V=b;if(x[16]!==W||x[17]!==T||x[18]!==w||x[19]!==H||x[20]!==F||x[21]!==B||x[22]!==N.is_profile_only_user){let e,t=!!N.is_profile_only_user,a=B||F,n=!!T;x[24]!==W||x[25]!==w||x[26]!==H||x[27]!==n||x[28]!==t||x[29]!==a?(e={isProfileOnlyUser:t,isMemberOfChannel:a,isMemberOfCanvas:H,isCanvasOrCanvasComment:n,isListFile:w,cannotMentionAgent:W},x[24]=W,x[25]=w,x[26]=H,x[27]=n,x[28]=t,x[29]=a,x[30]=e):e=x[30],g=i.createElement(ContextLabel,e),x[16]=W,x[17]=T,x[18]=w,x[19]=H,x[20]=F,x[21]=B,x[22]=N.is_profile_only_user,x[23]=g}else g=x[23];let G=g;x[31]!==F||x[32]!==E||x[33]!==R?(y=e=>(0,_.A)(e,{id:E,propsToInclude:R?{displayName:!0,teamName:!0}:{displayName:!0,teamName:!0,isSelf:!0,isAppOrBot:!0,isDeleted:!0,isPrescenceAway:!0,isPrescenceDND:!0,isHidden:!0,isAgent:!0,isNotInChannel:!F,statusEmojiCode:!0,statusText:!0}}),x[31]=F,x[32]=E,x[33]=R,x[34]=y):y=x[34];let q=(0,p.d4)(y);if(x[35]!==q||x[36]!==v||x[37]!==V||x[38]!==S||x[39]!==I||x[40]!==E||x[41]!==L||x[42]!==D||x[43]!==P||x[44]!==O||x[45]!==N||x[46]!==G){let e,t;x[48]!==q||x[49]!==v||x[50]!==V||x[51]!==S||x[52]!==I||x[53]!==L||x[54]!==D||x[55]!==P||x[56]!==O||x[57]!==N?(e={index:v,isPseudoSelected:S,isSelected:I,onSelectedIndexChange:P,onSelect:D,onMount:L,onUpdate:O,result:N,isDisabled:V,"aria-label":q},x[48]=q,x[49]=v,x[50]=V,x[51]=S,x[52]=I,x[53]=L,x[54]=D,x[55]=P,x[56]=O,x[57]=N,x[58]=e):e=x[58],x[59]!==V||x[60]!==I||x[61]!==E||x[62]!==G?(t=i.createElement(o.A,{id:E,isActive:I,secondaryContent:G,showTooltip:!1,isDisabled:V}),x[59]=V,x[60]=I,x[61]=E,x[62]=G,x[63]=t):t=x[63],A=i.createElement(s.A,e,t),x[35]=q,x[36]=v,x[37]=V,x[38]=S,x[39]=I,x[40]=E,x[41]=L,x[42]=D,x[43]=P,x[44]=O,x[45]=N,x[46]=G,x[47]=A}else A=x[47];return A}:({memberId:e,channelId:t,fileId:a,index:n,isPseudoSelected:r,isSelected:l,isListFile:m,isCanvasOrCanvasComment:b,result:g,canMentionAgent:y,shouldUseShortAriaLabel:A,onSelectedIndexChange:x,onMount:E,onUpdate:C,onSelect:k})=>{let v=(0,p.d4)(a=>!!t&&(0,h.Q)(a,t,e)),S=(0,p.d4)(t=>(0,f.nv)(t,e)),I=(0,d.h)(S),w=(0,p.d4)(t=>!!a&&u(t,{fileId:a,memberId:e})),T=(0,c.D)(g)&&!1===y,N=(0,c.D)(g)&&!1===y,M=i.createElement(ContextLabel,{isProfileOnlyUser:!!g.is_profile_only_user,isMemberOfChannel:I||v,isMemberOfCanvas:w,isCanvasOrCanvasComment:!!b,isListFile:m,cannotMentionAgent:T}),R=(0,p.d4)(t=>(0,_.A)(t,{id:e,propsToInclude:A?{displayName:!0,teamName:!0}:{displayName:!0,teamName:!0,isSelf:!0,isAppOrBot:!0,isDeleted:!0,isPrescenceAway:!0,isPrescenceDND:!0,isHidden:!0,isAgent:!0,isNotInChannel:!v,statusEmojiCode:!0,statusText:!0}}));return i.createElement(s.A,{index:n,isPseudoSelected:r,isSelected:l,onSelectedIndexChange:x,onSelect:k,onMount:E,onUpdate:C,result:g,isDisabled:N,"aria-label":R},i.createElement(o.A,{id:e,isActive:l,secondaryContent:M,showTooltip:!1,isDisabled:N}))};g.displayName="TextyAutocompleteMemberResult"},0x68acc0e0:(e,t,a)=>{"use strict";a.d(t,{A:()=>T});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x15f8e452a),s=a(0x1faa3f1ac),c=a(0x81b4e6a1),d=a(0xc12d7108),m=a(0xb2c476ed),u=a(0x184deeba7),p=a(0x1c91944c9),h=a(0x1ccef1c6f),_=a(0x16cf1da63),f=a(0x30d0b075),b=a(0x11a296110),g=a(0x110b4f809),y=a(0x20e80190e),A=a(0x1ed767a16),x=a(0x1fcbb004d);let E=new l.Ay("search");function SearchDebugModal({data:e}){let t=(0,_.wA)(),[a,r]=(0,g.A)(!1,2e3),i=a?E.t("Copied!",{ns:"member_profile"}):E.t("Copy",{ns:"member_profile"}),l=(0,f.Zf)(e),o=(0,n.useCallback)(()=>{t((0,x.O)())},[t]),c=(0,n.useCallback)(()=>{(0,A.x3)(l),r(!0)},[l,r]);return n.createElement(y.dW,{closeModal:o,className:"c-search_debug_modal"},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:"Search Debug Results"})),n.createElement(y.$m,null,n.createElement(y.qf,null,n.createElement("p",null,E.rt("Share the output below with a friendly neighborhood Search Friend in {feedbackChannel}",{feedbackChannel:n.createElement(s.A,{onClick:o,href:"https://slack-pde.slack.com/archives/CJJFK649F"},"#feedback-autocomplete")})),n.createElement("pre",{className:"c-search_debug_modal__output"},n.createElement("code",null,l)))),n.createElement(y.jl,null,n.createElement(y.ox,null,(0,A.tD)()&&n.createElement(b.Ay,{type:"outline",onClick:c},i),n.createElement(y.s_,{type:"primary","aria-label":E.t("Done",{ns:"workflow_builder"})},E.t("Done",{ns:"workflow_builder"})))))}SearchDebugModal.displayName="SearchDebugModal";let C=SearchDebugModal;var k=a(0x11c82607b),v=a(0x46dbff89);let S=(0,k.Ay)("Open search debug modal",(e,t,{data:a})=>{e((0,v.q)({element:n.createElement(C,{data:a}),name:"search-debug-modal"}))});S.meta={name:"openSearchDebugModal",key:"createThunkOpenSearchDebugModal",description:"Open search debug modal"};var I=a(0x17a41206b);let w=new l.Ay("tabcomplete"),TextyAutocompleteMenu=({children:e,heading:t,showOfflineHelp:a,showKeyboardHelp:r,showSearchHelp:l,showCanvasHelp:d,results:u,dispatch:p,type:h,className:_,"aria-label":f,matchText:b,footer:g,onFeedbackClick:y})=>{let A,x=(0,n.useRef)();(0,m.M)("mousedown",e=>{x?.current?.contains(e.target)&&(e.preventDefault(),e.stopPropagation())},{element:x?.current});let E=i()("c-texty_autocomplete",_,{[`c-texty_autocomplete--${h}`]:!!h}),C=(0,n.useMemo)(()=>y?()=>y({results:u,matchText:b,type:h}):l?()=>p(S({data:u})):null,[y,l,p,u,b,h]);return a?A=n.createElement("span",{className:"c-texty_autocomplete__help_item"},w.rt("{iconOffline} <strong>No connection.</strong>\xa0Some results may not be available.",{iconOffline:n.createElement(o.A,{type:"cloud-offline",size:"inherit"})})):r?A=n.createElement(n.Fragment,null,n.createElement("span",{className:"c-texty_autocomplete__help_item c-texty_autocomplete__help_item--narrow"},w.rt("{arrowUp} {arrowDown} to navigate",{arrowDown:n.createElement(o.A,{type:"arrow-down-medium",inline:!0}),arrowUp:n.createElement(o.A,{type:"arrow-up-medium",inline:!0})})),n.createElement("span",{className:"c-texty_autocomplete__help_item"},w.rt("{symbol} to select",{symbol:n.createElement(o.A,{type:"enter",size:"inherit",inline:!0})})),n.createElement("span",{className:"c-texty_autocomplete__help_item"},w.rt("<strong>esc</strong> to dismiss"))):C?A=n.createElement("span",{className:"c-texty_autocomplete__help_item","data-qa":"autocomplete_feedback_help"},`${w.t("Something off?",{ns:"search"})} `,n.createElement(s.A,{onClick:C},w.t("Give feedback",{ns:"search"}))):d&&(A=n.createElement("span",{className:"c-texty_autocomplete__help_item"},`${w.t("Only members of the canvas will be notified",{ns:"search"})} `)),n.createElement("div",{"data-qa":"texty_autocomplete_menu",ref:x,className:E},t,n.createElement("div",{className:"c-texty_autocomplete__body"},n.createElement("ul",{className:"c-texty_autocomplete__results",id:c.E,role:"listbox","aria-label":f??w.t("Search suggestions")},e)),A&&n.createElement("div",{className:"c-texty_autocomplete__help"},A),g)};TextyAutocompleteMenu.displayName="TextyAutocompleteMenu";let T=(0,p.N)((e,{type:t})=>({showKeyboardHelp:!!(0,h.ty)(e,"show_autocomplete_help")&&t!==d.pm.TERM,showOfflineHelp:!(0,I.Pb)(e),showSearchHelp:!!(0,u.L)(e)&&t!==d.pm.COMMAND&&t!==d.pm.TERM&&t!==d.pm.SHORTCUT&&t!==d.pm.AI_SUGGESTION}))(TextyAutocompleteMenu)},0x21caa21ad:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1d01572a2),o=a(0x13b0ddf54),s=a(0x81b4e6a1);let TextyAutocompleteResult=({children:e,index:t,isPseudoSelected:a,isSelected:r,onSelectedIndexChange:c,onSelect:d,onMount:m,onUpdate:u,result:p,size:h="small",isDisabled:_,"aria-label":f})=>{let b=(0,n.useRef)(null);(0,l.A)(()=>{m?.()}),(0,n.useEffect)(()=>{let e=b?.current;r&&e&&e.scrollIntoView?.({block:"nearest"}),u?.()},[r,b,u]);let g=(0,n.useCallback)(()=>{d?.(t)},[t,d]),y=(0,n.useCallback)(()=>{r||c?.(t,p)},[t,c,p,r]),A=i()("tab_complete_ui_item","c-texty_autocomplete__result",`c-texty_autocomplete__result--${h}`,{"c-texty_autocomplete__result--pseudo-selected":a,"c-texty_autocomplete__result--selected":r,"c-texty_autocomplete__result--broadcasted":p.is_broadcast_keyword,"c-texty_autocomplete__result--disabled":_});return n.createElement("li",{role:"option","aria-selected":r,className:A,"data-qa":"tab_complete_ui_item",id:(0,s.An)(t),onMouseMove:y,onMouseDown:e=>{e.preventDefault()},onClick:g,ref:b,tabIndex:-1,"aria-label":f},e,a&&n.createElement("div",{"aria-hidden":"true",className:"c-search_autocomplete__shortcut_hint"},n.createElement(o.zG,{slim:!0,label:"Enter"})))};TextyAutocompleteResult.displayName="TextyAutocompleteResult";let c=TextyAutocompleteResult},0x81be5f45:(e,t,a)=>{"use strict";a.d(t,{A:()=>aC});var n={};a.r(n),a.d(n,{SUGGESTION_RE:()=>eM,anchorToContainer:()=>eR,canCompleteOnEmptyQuery:()=>eP,getInsertData:()=>getInsertData,getMatch:()=>getMatch,getResultFrecencyId:()=>getResultFrecencyId,recordSelection:()=>recordSelection});var r={};a.r(r),a.d(r,{COMMAND_RX:()=>eW,getInsertData:()=>command_completer_getInsertData,getMatch:()=>command_completer_getMatch,getResultFrecencyId:()=>command_completer_getResultFrecencyId});var i={};a.r(i),a.d(i,{DOCUMENT_SYMBOL_MATCH_RX:()=>e$,getInsertData:()=>document_completer_getInsertData,getMatch:()=>document_completer_getMatch,getResultFrecencyId:()=>document_completer_getResultFrecencyId,recordSelection:()=>document_completer_recordSelection});var l={};a.r(l),a.d(l,{QUIP_COMMAND_RX:()=>eZ,getInsertData:()=>quip_shortcut_completer_getInsertData,getMatch:()=>quip_shortcut_completer_getMatch,getResultFrecencyId:()=>quip_shortcut_completer_getResultFrecencyId,recordImpressionOnOpen:()=>recordImpressionOnOpen,recordSelection:()=>quip_shortcut_completer_recordSelection});var o={};a.r(o),a.d(o,{getInsertData:()=>slack_file_completer_getInsertData,getMatch:()=>slack_file_completer_getMatch,recordSelection:()=>slack_file_completer_recordSelection});var s=a(0xbad225b5),c=a(0x1cbdfeceb),d=a(0x2286acf6c),m=a(0xe180a236),u=a(0x18f2150ea),p=a(0x1feee1711),h=a(0x9e671ad),_=a(0x21f3c49e8),f=a(0x1ee15af19),b=a(0xd6ba6894),g=a(0xb97b797e),y=a(0x20b4dda68),A=a(0x1df96de4c),x=a(0x20482ad21),E=a(0x224f7f0e9),C=a(0x5739d664),k=a(0x1fc4d7d9f),v=a(0x12edaa96a),S=a(0x6aeae8a3),I=a(0x130c2e810),w=a(0x120c268ad),T=a.n(w),N=a(0x2b7f0bcc),M=a(0x4c96e5d9),R=a(0x12d250bf6),P=a(0xe17ba6e9),L=a(0xa426180f),O=a.n(L);function CanvasAiSuggestionsAutocompleteMenuEntity({suggestion:e,isHighlighted:t,isSpaceSeparated:a,textToHighlight:n,styledElements:r,finalSuggestionText:i}){let{id:l}=e,o=(0,s.useRef)(null),{tooltipPosition:c}=(e=>{let[t,a]=(0,s.useState)("bottom"),[n,r]=(0,s.useState)(!1),i=(0,s.useCallback)(()=>{let t=(e=>{let t="bottom",a=!1;if(!e.current)return{tooltipPosition:t,isAtBottom:a};let n=e.current.getBoundingClientRect();return b.J.innerHeight-n.bottom<R.wd&&(t="top",a=!0),{tooltipPosition:t,isAtBottom:a}})(e);a(t.tooltipPosition),r(t.isAtBottom)},[e]);return(0,s.useEffect)(()=>{i();let handleUpdate=()=>{i()};return b.J.addEventListener("scroll",handleUpdate,{passive:!0}),b.J.addEventListener("resize",handleUpdate,{passive:!0}),()=>{b.J.removeEventListener("scroll",handleUpdate),b.J.removeEventListener("resize",handleUpdate)}},[i]),{tooltipPosition:t,isAtBottom:n,updatePosition:i}})(o);return(0,P.lb)(l)?s.createElement(M.Ay,{position:c,tip:i,shouldFade:!0,shouldOnlyShowWhenTruncated:!0,zIndex:"above_fs"},s.createElement("div",{className:T()("padding_left_150",O().suggestionResult)},r.map((e,t)=>{let n=`${e.text}-${l}`;return e.isMention?s.createElement("span",{key:n,className:O().mention},e.text,t<r.length&&a&&" "):s.createElement("span",{key:n},e.text,t<r.length&&a&&" ")}))):n?s.createElement(M.Ay,{position:c,tip:i,shouldFade:!0,shouldOnlyShowWhenTruncated:!0,zIndex:"above_fs"},s.createElement("span",{className:O().fullSuggestionInfo,"data-qa":`canvas-ai-suggestions-autocomplete-${l}`,ref:o},r.map((e,n)=>e.isMention?s.createElement("span",{key:`${e.text}-${e.shouldHighlight}-${l}`,className:O().mention},e.text,n<r.length&&a&&" "):s.createElement("span",{key:`${e.text}-${e.shouldHighlight}-${l}`,className:T()({[O().selectedBaseSuggestionText]:e.shouldHighlight&&!t,[O().selectedRemainingSuggestionText]:!e.shouldHighlight})},e.text,n<r.length&&a&&" ")))):s.createElement("span",null)}CanvasAiSuggestionsAutocompleteMenuEntity.displayName="CanvasAiSuggestionsAutocompleteMenuEntity";let D=CanvasAiSuggestionsAutocompleteMenuEntity;var F=a(0x1b9993cd4),U=a(0x21caa21ad);function buildStyledElements(e,t,a,n){let r=e.trim().split(R.aP),i=t.toLocaleLowerCase().split(R.aP),l=new Set,o=r.map(e=>{let t=e.toLocaleLowerCase(),a=i.find((e,a)=>!l.has(a)&&isWordMatch(t,e.toLocaleLowerCase()));if(a){let e=i.indexOf(a);return l.add(e),!0}return!1});return r.map((e,t)=>{let r=e,i=!1;return"@"===e?(i=!0,r=a):"#"===e&&(i=!0,r=n),{text:r,shouldHighlight:o[t]||!1,isMention:i}})}function isWordMatch(e,t){if(e.toLocaleLowerCase()===t.toLocaleLowerCase())return!0;if(e.length<3||t.length<3)return!1;let a=Math.min(4,Math.floor(Math.min(e.length,t.length)/2));for(let n=1;n<=a;n++)for(let r=1;r<=a;r++){let a=e.slice(0,-n);if(a===t.slice(0,-r)&&a.length>=2)return!0}return!1}function textFromStyledElements(e,t){return e.map(e=>e.text).join(t?" ":"")}let CanvasAiSuggestionsAutocompleteMenuItem=({index:e,isPseudoSelected:t,isSelected:a,onSelectedIndexChange:n,onSelect:r,result:i})=>{let{name:l,id:o,atMention:c="@",recentChannel:d="#"}=i,m=(0,F.H)(l??""),u=(0,P.sV)(o),p=(0,P.hB)(o),h=buildStyledElements(u,p,c,d),_=textFromStyledElements(h,m);return s.createElement(U.A,{index:e,isPseudoSelected:t,isSelected:a,onSelectedIndexChange:n,onSelect:r,result:i,"aria-label":_},s.createElement(D,{suggestion:i,isHighlighted:a,isSpaceSeparated:m,textToHighlight:p,styledElements:h,finalSuggestionText:_}))};CanvasAiSuggestionsAutocompleteMenuItem.displayName="CanvasAiSuggestionsAutocompleteMenuItem";var B=a(0x16cf1da63),H=a(0x226892387),W=a(0x1472af90a),V=a(0xf052d367),G=a(0x18632f75a);let q=W.G7.CanvasNuxCreateWithAiNotification,j="canvas-ai-dismiss-suggestions-info";var z=a(0x15a4ffb05),K=a(0x68acc0e0),$=a(0xc12d7108);let Y=new x.Ay("slack_docs"),Q=Object.values(P.hM),CanvasAiSuggestionsMenu=({results:e=A.Ml,selectedIndex:t,onSelect:a,onSelectedIndexChange:n,className:r,onFeedbackClick:i})=>{let l,o,c,d,{shouldShowSuggestionsNux:m,recordSuggestionsDismiss:u}=(l=(0,B.wA)(),o=(0,H.d4)(e=>(0,V.kI)(e,q,W.X8.Dismiss)),c=(0,H.d4)(e=>!(0,V.Tn)(e,q,W.X8.Dismiss)),(0,s.useEffect)(()=>{o||l((0,G.b)({interactions:[{component:q,type:W.X8.Dismiss}],reason:j}))},[l,o]),d=(0,s.useCallback)(()=>{l((0,G.z)({component:q,type:W.X8.Dismiss,reason:j}))},[l]),(0,s.useMemo)(()=>({shouldShowSuggestionsNux:c,recordSuggestionsDismiss:d}),[c,d])),p=(0,s.useCallback)((e,r)=>e.map(({item:e},i)=>{if(!e)return null;let l=`${e.id}-${e.name}`,o=s.createElement(CanvasAiSuggestionsAutocompleteMenuItem,{index:i+r,isPseudoSelected:0===i&&void 0===t,isSelected:i+r===t,onSelectedIndexChange:n,onSelect:a,result:e}),c=(0,P.lb)(e.id),d=s.createElement("span",{className:O().suggestionItemEmoji,"aria-hidden":"true"},s.createElement(z.A,{text:c,showTooltips:!1,inputIsEscaped:!0}));return s.createElement("div",{key:l,className:O().suggestionsItem,"data-qa":`canvas-ai-suggestions-menu-entity-${i}`,role:"none"},s.createElement("div",{className:O().suggestionsItemDescription,role:"none"},d," ",o))}),[a,n,t]),h=(0,s.useMemo)(()=>new Map(Q.map(t=>[t,e.filter(e=>e.item.category===t)])),[e]),_=(0,s.useMemo)(()=>{let e=[],t=0,addResultsToReturnResults=(a,n)=>{let r=(0,P.F$)(n);if(a.length>0){""!==r&&e.push(s.createElement("div",{key:`${n}-label`,className:O().categoryLabel},r));let i=p(a,t);t+=i.length,e.push(...i)}};return addResultsToReturnResults.displayName="addResultsToReturnResults",Q.forEach(e=>{addResultsToReturnResults(h.get(e)??[],e)}),e},[h,p]),f=T()(O().menu,r),b=Y.t("AI can create content based on your Slack activity. This is limited to data that you have access to, including your private channels and DMs.",{fallbackHash:"ceb055cc1a6cb9175b17238abe01d3f5a8f85b43"}),g=s.createElement("div",{className:O().suggestionsAlert},s.createElement(N.Ay,{level:"info",isIconVisible:!1,showCloseButton:!0,onClose:u},b));return s.createElement(K.A,{"data-qa":"canvas_ai_suggestions_menu",type:$.pm.AI_SUGGESTION,className:f,"aria-label":Y.t("AI prompt suggestions"),results:e,footer:m?g:void 0,onFeedbackClick:i},_)};CanvasAiSuggestionsMenu.displayName="CanvasAiSuggestionsMenu";var Z=a(0x91728dda),J=a(0x1d8af55dd),X=a(0x16a50aa9e),ee=a.n(X);let et=new x.Ay("slack-docs"),CanvasAiNewBadge=({isDarkBackground:e,className:t})=>{let a=et.t("NEW");return s.createElement("span",{className:T()(ee().newAiBadge,{[ee().darkBackground]:e},t)},a)};CanvasAiNewBadge.displayName="CanvasAiNewBadge";var ea=a(0x1df8afb2c);let en=new x.Ay("slash-commands");var er=a(0x23619f41c),ei=a(0x2501a2cee);let QuipShortcutsAutocompleteMenuEntityIcon=({icon:e})=>e?s.createElement(ei.Ah,{name:e,size:"20"}):s.createElement(er.A,{ariaHidden:!0,image:"/img/slack_logo_mark.svg",size:20});function QuipShortcutsAutocompleteMenuEntity({command:e,isActive:t,className:a}){let{icon:n}=e,r=e.name,i=(0,s.useMemo)(()=>T()("p-quip_shortcuts_autocomplete_menu_entity__container",a,{"p-quip_shortcuts_autocomplete_menu_entity__container--selected":t}),[a,t]);return s.createElement("div",{className:i,"data-qa":"quip_shortcuts_autocomplete_menu_entity"},s.createElement("div",{className:"p-quip_shortcuts_autocomplete_menu_entity__icon"},s.createElement(QuipShortcutsAutocompleteMenuEntityIcon,{icon:n})),s.createElement("div",{className:"p-quip_shortcuts_autocomplete_menu_entity__name"},r))}QuipShortcutsAutocompleteMenuEntityIcon.displayName="QuipShortcutsAutocompleteMenuEntityIcon",QuipShortcutsAutocompleteMenuEntity.displayName="QuipShortcutsAutocompleteMenuEntity";var el=a(0x22d51fee8);let eo=new x.Ay("slack_docs"),es=[ea.Zj.AI,ea.Zj.BASICS,ea.Zj.MEDIA,ea.Zj.SALESFORCE,ea.Zj.SLACK,ea.Zj.LAYOUT],QuipShortcutsAutocompleteMenuV2=({results:e=A.Ml,selectedIndex:t,onSelect:a,onSelectedIndexChange:n,className:r,onFeedbackClick:i})=>{let l=(0,H.d4)(el.c9),o=(0,H.d4)(Z.R5),{shouldShowCanvasAiNux:c}=(0,J.A)(),d=(0,s.useCallback)((e,r)=>e.map(({item:e},i)=>{if(!e)return null;let c=`${e.id}-${e.name}`,d=i+r;return s.createElement(U.A,{key:c,index:d,isPseudoSelected:0===d&&void 0===t,isSelected:d===t,onSelectedIndexChange:n,onSelect:a,result:e,"aria-label":(({command:e,experimentCanvasAiContentCreationGroupOn:t=!1,salesforceDataFieldsAccess:a=!1})=>{let n=e.desc??"",r=(0,ea.vK)(t,a)[e.category]??"";return[`${e.name} ${en.t("Command")}`,n,r].filter(Boolean).join(", ")})({command:e,experimentCanvasAiContentCreationGroupOn:l,salesforceDataFieldsAccess:o})},s.createElement(QuipShortcutsAutocompleteMenuEntity,{command:e,isActive:d===t}))}),[a,n,t,l,o]),m=(0,s.useMemo)(()=>new Map(es.map(t=>[t,e.filter(e=>e.item.category===t)])),[e]),u=(0,s.useMemo)(()=>{let e=[],t=0,a=(0,ea.vK)(l,o),addResultsToReturnResults=(n,r)=>{if(n.length>0){e.length>0&&e.push(s.createElement("div",{key:`${r}-divider`,className:"p-quip_shortcuts_autocomplete_menu_category__divider"})),e.push(s.createElement("div",{key:`${r}-label`,className:"p-quip_shortcuts_autocomplete_menu_category__label"},a[r],l&&r===ea.Zj.AI&&c&&s.createElement("div",{className:"badge"},s.createElement(CanvasAiNewBadge,null))));let i=d(n,t);t+=i.length,e.push(...i)}};return addResultsToReturnResults.displayName="addResultsToReturnResults",es.forEach(e=>{addResultsToReturnResults(m.get(e)??[],e)}),e},[m,d,l,o,c]),p=T()("p-quip_shortcuts_autocomplete_menu",r),h=eo.t("Shortcuts");return s.createElement(K.A,{type:$.pm.SHORTCUT,className:p,results:e,"aria-label":h,onFeedbackClick:i},u)};QuipShortcutsAutocompleteMenuV2.displayName="QuipShortcutsAutocompleteMenuV2";var ec=a(0x8ed587af),ed=a(0x40c0d834),em=a(0x12a8859a1),eu=a(0x1c2b53e10),ep=a(0x90407490),eh=a(0xa1832ae4),e_=a(0x13cf3e8cb),ef=a(0x1ee439e69);function SlashCommandsAutocompleteMenuItem({command:e,index:t,isPseudoSelected:a,isSelected:n,result:r,onSelectedIndexChange:i,onSelect:l}){let{id:o,appName:c}=e,d=e?.applicableTeamId,m=(0,H.d4)(e=>d?(0,ef._J)(e,d):null),u=(0,eu.A)(e),p=(0,H.d4)(t=>"global_action"===e.type&&"Slack"!==e.appName?(0,e_.SW)(t,{appId:u,actionId:o}).name:e.name),h=(0,s.useMemo)(()=>{let t=c||e?.app?.app_name,a=t!==p&&"Slack"!==c?t:void 0,n=m?(0,eh.F1)(m):void 0;return[p,a,(0,ep.A)(e,u),n,e.desc].filter(Boolean).join(", ")},[e,u,c,p,m]);return s.createElement(U.A,{index:t,isPseudoSelected:a,isSelected:n,onSelectedIndexChange:i,onSelect:l,result:r,"aria-label":h},s.createElement(em.A,{className:"p-slash_commands_autocomplete_menu__item",command:e,isActive:n}))}SlashCommandsAutocompleteMenuItem.displayName="SlashCommandsAutocompleteMenuItem";let eb=SlashCommandsAutocompleteMenuItem;var eg=a(0xd843ab47),ey=a(0x3711e82d),eA=a(0x184deeba7),ex=a(0x239e2ae8e),eE=a(0x1ec68d6a3),eC=a(0x11c82607b),ek=a(0xc7d91d1b);let ev=(0,eC.Ay)("Opens an slash commands autocomplete feedback dialog",(e,t,{query:a,suggestionsFromComponent:n})=>{let r=t(),i=(0,eE.Ay)({state:r});if(!n)return void i.warn("No results found for slash command feedback dialog");let l={search_session_id:e((0,ek.w)()),query:a,suggestions:(0,ex.$g)(r,n)};return e((0,ex.mh)({type:"slash command menu",payload:l}))});ev.meta={name:"openSlashCommandsFeedbackDialog",key:"createThunkOpenSlashCommandsFeedbackDialog",description:"Opens an slash commands autocomplete feedback dialog"};let eS=new x.Ay("tabcomplete"),SlashCommandsAutocompleteMenu=({results:e=A.Ml,selectedIndex:t,onSelectedIndexChange:a,onSelect:n,matchText:r})=>{let{isChildWindow:i}=(0,s.useContext)(eg.A),l=(0,B.wA)(),o=(0,H.d4)(eA.L),c=(0,s.useCallback)(({results:e,matchText:t})=>{l(ev({query:t||"",suggestionsFromComponent:e}))},[l]),d=e.map(({item:e},r)=>{let i,l,o,c,d;if(!e)return null;let m="shortcut"===e.type?(i=e.workflow?.app?.name,l=e.workflow?.app?.id,o=e.description,c=e.name,d=e.shortcut_url,{autocomplete:!0,appName:i,appId:l,desc:o,type:"workflow",name:c,usage:"",id:d,triggerId:e.id,workflowId:e?.workflow?.workflow_id}):e,u=`${m.id}-${m.appId}`;return s.createElement(eb,{key:u,index:r,isPseudoSelected:0===r&&void 0===t,isSelected:r===t,onSelectedIndexChange:a,onSelect:n,result:e,command:m})}),m=T()("p-slash_commands_autocomplete_menu",{"p-slash_commands_autocomplete_menu__child_window":i}),u=eS.t("Shortcuts");return s.createElement(ed.A,{eventId:ey.EventId.SLASH_COMMANDS_AUTOCOMPLETE,uiComponentName:ey.UiComponentName.SLASH_COMMANDS_AUTOCOMPLETE_MENU,clogImpression:!0},s.createElement(K.A,{type:$.pm.COMMAND,className:m,matchText:r,results:e,"aria-label":u,onFeedbackClick:o?c:void 0},d))};SlashCommandsAutocompleteMenu.displayName="SlashCommandsAutocompleteMenu";let eI=s.memo(SlashCommandsAutocompleteMenu);var ew=a(0x1fcd1dcfb),eT=a(0x45012309),eN=a(0x15c6cd54f);let eM=/^([^\n/\uFF0F]*)/,getMatch=(e,{startIndex:t}={})=>{if(0!==t)return null;let a=e.match(eM)??[],n=a[1]?.trim();if(e.length&&!n?.length)return null;let r=a.index??0;return{match:e.slice(r),index:r}},getInsertData=e=>{if(!e)return null;let{item:{id:t,recentChannel:a,atMention:n}}=e;if(!t)return null;(0,eT.eo)().track(ey.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"canvas_ai_suggestion"}}});let r=(0,P.nK)(t),i=(0,ew.V_)(r??"",n,a);return{id:t,text:r,contents:[{insert:i}]}},getResultFrecencyId=e=>e&&e.item.id,recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete",navigationMethod:i,actionMethod:l};(0,eN.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})},eR=!0,eP=!0;var eL=a(0x1345eeff9),eO=a(0x118cdcdea),eD=a.n(eO),eF=a(0x1e81297e3),eU=a(0xa326966e),eB=a(0xe7cb9732),eH=a(0x25245e851);let eW=/^([/\uff0f][^~`!@#\uFF03$%^&*()+=[\]{}\\|;:'",.<>/?\n]*)$/i,command_completer_getInsertData=e=>{if(!e||!e.item)return null;(0,eT.eo)().track("PFP_ACTION",{contexts:{growth:{action:"autocomplete_select",trigger:"slash_command"}}});let{item:t}=e;return -1===["/","\uFF0F"].indexOf(t.id?.trim()?.[0]||"")&&-1===["/","\uFF0F"].indexOf(t.name?.trim()?.[0]||"")?{contents:[]}:{text:t.name}},hasFormatsOrStyleAttr=e=>!!((0,eB.A)(e)||(0,eF.A)(e)||(0,eH.A)(e)||(0,eU.A)(e)||e?.attributes?.strike||e?.attributes?.bold||e?.attributes?.italic||e?.attributes?.link),command_completer_getMatch=(e,{startIndex:t,formatOp:a,inputProxy:n}={startIndex:0,formatOp:{}})=>{if(0!==t||!eW.test(e))return null;let r=new(eD())(n?.getContents?.()?.contents),i=r?.ops;return!(0,_.A)(i)&&i.some(e=>hasFormatsOrStyleAttr(e))?null:a&&hasFormatsOrStyleAttr(a)?null:(1===e.length&&(0,eT.eo)().track("PFP_ACTION",{contexts:{growth:{action:"autocomplete_start",trigger:"slash_command"}}}),{match:e,index:0})},command_completer_getResultFrecencyId=e=>{let t=e&&e.item?.id;if(!t?.startsWith("/")&&!t?.startsWith("Ft"))return t};var eV=a(0xec9d0658),eG=a(0xbd3de346),eq=a(0x22fd0ecc8),ej=a(0x1aee7b9ef),ez=a(0xa985ed31),eK=a(0xa5c1a5e9);let e$=/(^|\n|.)?((?:\+|\uFF0B)([^\n+\uFF0B]*))$/i,document_completer_getInsertData=(e,{teamId:t,usePlainTextMode:a,isCanvas:n}={})=>{let r,{item:i}=e||{};if(!e||!e.item||!(0,ez.A)(i?.id??""))return null;(0,eT.eo)().track(ey.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"file"}}});let l=(0,eG.Mh)(i,t||"")||void 0;return(r=(r=((r=(0,eq.SB)(i))||"").replace((0,eV.A)(),"").replace(/\s+/g," ").trim())||l,n)?{text:`${r}`,format:{slackmention:{id:i?.id??"",label:r??"",link:l},filetype:i?.filetype}}:a?{text:`${l}`}:{text:`${r}`,format:{id:i?.id,link:l}}},document_completer_getMatch=e=>{let t=e.match(e$)||[],[,a,n]=t;if(!n||(0,eK.A)(a))return null;let r=(0,ej.A)(e);if(r&&1===r.length&&r[0].text===e)return null;let i=(t.index||0)+(0,m.A)(a);return{match:e.slice(i),index:i}},document_completer_getResultFrecencyId=e=>e&&e.item.id,document_completer_recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete-document",navigationMethod:i,actionMethod:l};(0,eN.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})};var eY=a(0x62a5c3a9),eQ=a(0x1867a7f28);let eZ=/(^|\n|.)?((?:\/|\uFF0F)([^\n/\uFF0F]*))$/i,quip_shortcut_completer_getInsertData=e=>e?.item?((0,eT.eo)().track(ey.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"quip_slash_command"}}}),{id:e.item.id,isCanvasShortcut:!0}):null,quip_shortcut_completer_getMatch=e=>{let t=e.match(eZ)||[],[,a,n]=t;if(!n||(0,eK.A)(a))return null;let r=(0,ej.A)(e);if(r&&1===r.length&&r[0].text===e)return null;let i=(t.index||0)+(0,m.A)(a);return{match:e.slice(i),index:i}},quip_shortcut_completer_getResultFrecencyId=e=>e&&e.item.id,quip_shortcut_completer_recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete",navigationMethod:i,actionMethod:l};(0,eN.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})},recordImpressionOnOpen=e=>{e.track(ey.EventId.QUIP_DOC_EMBED_EVENT,{contexts:{family:"CANVAS",ui_context:{action:ey.UiAction.OPEN,ui_component:ey.UiComponentName.CANVAS_SHORTCUT_AUTOCOMPLETE_MENU}}})};var eJ=a(0x1e49806fc),eX=a(0x1feaab429),e0=a(0xfb1fe411),e1=a(0x57d5a5b5),e2=a(0xa3534e17),e4=a(0x1266f1359),e5=a(0x14149c126);let e3=/(^|\n|.)?((?:\+|\uFF0B)(?![0-9\s:])[^\n+\uFF0B]*)$/i,slack_file_completer_getInsertData=(e,{teamId:t}={})=>{let a,n;if(!e||!e.item)return null;(0,eT.eo)().track(ey.EventId.PFP_ACTION,{contexts:{growth:{action:"autocomplete_select",trigger:"slack_file"}}});let r=(0,e4.$D)(t),i=(0,ef._J)(r,t);if("on"===(0,e5._Z)(r,"fe_link_tokenization")&&e.item.id){let formatSlug=e=>e?{text:e.label,format:{slackslug:e}}:null;return formatSlug((0,e1.or)(e.item.id)&&e.item.listId?(0,e0.d)(r,`${i.url}lists/${t}/${e.item.id}`,{file_id:e.item.listId,record_id:e.item.id}):(0,eG.DQ)(e.item)?(0,eX.l)(r,`${i.url}docs/${t}/${e.item.id}`,{file_id:e.item.id}):(0,e0.d)(r,`${i.url}lists/${t}/${e.item.id}`,{file_id:e.item.id}))}if((0,eG.DQ)(e.item)){let r=e.item;a=(0,eq.V)(r),n=`${i.url}docs/${t}/${r.id}`}else if((0,e1.or)(e.item.id)){let r=e.item;a=`${r.listTitle} > ${r.name}`,n=`${i.url}lists/${t}/${r.listId}?record_id=${r.id}`}else{let r=e.item;a=(0,eq.V)(r),n=`${i.url}lists/${t}/${r.id}`}return a=(a=(a||"").replace((0,eV.A)(),"").replace(/\s+/g," ").trim())||n,{text:`+${a}`,format:{slackmention:(0,e2.A)(e.item.id||"",`+${a}`)}}},slack_file_completer_getMatch=e=>{let t=(0,eJ.A)(e).match(e3)||[],[,a,n]=t;if(!n||(0,eK.A)(a))return null;let r=t.index+(0,m.A)(a),i=e.slice(r);return i.split(" ").length-1>8?null:{match:i,index:r}},slack_file_completer_recordSelection=({clogger:e,query:t,result:a,results:n,teamId:r,navigationMethod:i,actionMethod:l})=>{let o={query:t||"",results:n||[],selectedItemId:a.item.id,source:"texty-autocomplete",navigationMethod:i,actionMethod:l};(0,eN.A)({teamId:r,key:"texty-autocomplete"}).clogSearcherAccept({clogger:e,data:o})};var e6=a(0xb77a689a),e8=a(0x1535e80f3),e7=a(0x71f5866f),e9=a(0x92622564);let hasItemWithId=e=>(0,e6.A)(e.item.id),te=new x.Ay("tabcomplete"),TextyAutocompleteChannels=({results:e,selectedIndex:t,onSelect:a,onSelectedIndexChange:n,onFirstResultMount:r,onFirstResultUpdate:i,className:l,onFeedbackClick:o})=>{let c=e?.map(e=>e.item.name),d=c?new e9.Z(c):void 0;return e?s.createElement(K.A,{type:$.pm.CHANNEL,className:l,results:e,"aria-label":te.t("Channels"),onFeedbackClick:o},e.filter(hasItemWithId).map((e,l)=>{let o=e.item,c=e.bestPreviousNameMatch,m=0===l,u=!!d?.hasDuplicates(o.name),p=o.id;return s.createElement(e7.N,{channelId:p,key:p,index:l,isPseudoSelected:0===l&&void 0===t,isSelected:l===t,onSelectedIndexChange:n,onSelect:a,onMount:m?r:void 0,onUpdate:m?i:void 0,result:o,displayFormerNames:c?e8.P.bestOnly:e8.P.false,previousName:c,hasChannelNameCollision:u})})):null};TextyAutocompleteChannels.displayName="TextyAutocompleteChannels";var tt=a(0x20ef3966f),ta=a(0x408bdeff);let tn=new x.Ay("tabcomplete"),TextyAutocompleteDocuments=({results:e,selectedIndex:t,onSelect:a,onFirstResultMount:n,onFirstResultUpdate:r,onSelectedIndexChange:i,className:l,onFeedbackClick:o})=>s.createElement(K.A,{type:$.pm.DOCUMENT,className:l,results:e,"aria-label":tn.t("Canvases"),onFeedbackClick:o},(0,tt.A)(e,(e,l)=>{let o=l===t,c=0===l,d=e.item;return s.createElement(U.A,{key:d.id,index:l,isPseudoSelected:0===l&&void 0===t,isSelected:o,onSelectedIndexChange:i,onSelect:a,onMount:c?n:void 0,onUpdate:c?r:void 0,result:d},s.createElement(ta.A,{id:d.id??"",file:d,isActive:o,detailType:"owner"}))}));TextyAutocompleteDocuments.displayName="TextyAutocompleteDocuments";var tr=a(0x17feb01e0),ti=a(0x807220a2),tl=a(0x19bf376f9),to=a(0x1760d7f5a),ts=a(0x10227e98c),tc=a(0x1bdad5864),td=a(0x217553e42);let tm=new x.Ay("tabcomplete"),isResultDisabled=({threadTs:e,isAssistantThread:t,isBroadcastKeywordsEnabled:a,isCanvas:n,isWorkflowQuestionOption:r,includeAllBroadcastKeywords:i,isAtChannelRestricted:l,experimentCanvasGroupMentionsGroupOn:o})=>!n&&!t&&!!e||!n&&!i&&(!a||!!l)||!!n&&!o||!!r,ContextLabel=({threadTs:e,isAssistantThread:t,isBroadcastKeywordsEnabled:a,isCanvas:n,isWorkflowQuestionOption:r,includeAllBroadcastKeywords:i,isAtChannelRestricted:l,experimentCanvasGroupMentionsGroupOn:o})=>n||t||!e?n||i||a&&!l?n&&!o?s.createElement("span",{className:"c-texty_autocomplete__result_context"},tm.t("Disabled in a canvas")):r?s.createElement("span",{className:"c-texty_autocomplete__result_context"},tm.t("Unavailable for question options")):void 0:s.createElement("span",{className:"c-texty_autocomplete__result_context"},tm.t("Disabled in this channel")):s.createElement("span",{className:"c-texty_autocomplete__result_context"},tm.t("Disabled in threads"));ContextLabel.displayName="ContextLabel";let tu=(0,ti.Ar)()?e=>{let t,a,n,r,i,l=(0,tl.c)(61),{broadcastListEntityId:o,channelId:c,threadTs:d,index:m,isCanvas:u,isWorkflowQuestionOption:p,includeAllBroadcastKeywords:h,isPseudoSelected:_,isSelected:f,result:b,onSelectedIndexChange:g,onMount:y,onUpdate:A,onSelect:x}=e,E=b?.id==="BKassistant:einstein"&&!!d;l[0]!==c?(t=e=>(0,td.OL)(e,c),l[0]=c,l[1]=t):t=l[1];let C=(0,H.d4)(t),k=(0,H.d4)(_temp);l[2]!==c?(a=e=>!!c&&(0,tc.A)(e,c),l[2]=c,l[3]=a):a=l[3];let v=(0,H.d4)(a),S=!!C?.properties?.at_channel_restricted;l[4]!==k||l[5]!==h||l[6]!==E||l[7]!==S||l[8]!==v||l[9]!==u||l[10]!==p||l[11]!==d?(n=isResultDisabled({threadTs:d,isAssistantThread:E,isBroadcastKeywordsEnabled:v,isCanvas:u,isWorkflowQuestionOption:p,includeAllBroadcastKeywords:h,isAtChannelRestricted:S,experimentCanvasGroupMentionsGroupOn:k}),l[4]=k,l[5]=h,l[6]=E,l[7]=S,l[8]=v,l[9]=u,l[10]=p,l[11]=d,l[12]=n):n=l[12];let I=n;l[13]!==k||l[14]!==h||l[15]!==E||l[16]!==S||l[17]!==v||l[18]!==u||l[19]!==p||l[20]!==d?(r=s.createElement(ContextLabel,{threadTs:d,isAssistantThread:E,isBroadcastKeywordsEnabled:v,isAtChannelRestricted:S,isCanvas:u,isWorkflowQuestionOption:p,includeAllBroadcastKeywords:h,experimentCanvasGroupMentionsGroupOn:k}),l[13]=k,l[14]=h,l[15]=E,l[16]=S,l[17]=v,l[18]=u,l[19]=p,l[20]=d,l[21]=r):r=l[21];let w=r;if(l[22]!==o||l[23]!==m||l[24]!==E||l[25]!==I||l[26]!==_||l[27]!==f||l[28]!==y||l[29]!==x||l[30]!==g||l[31]!==A||l[32]!==b||l[33]!==w){let e,t;if(l[35]!==m||l[36]!==I||l[37]!==_||l[38]!==f||l[39]!==y||l[40]!==x||l[41]!==g||l[42]!==A||l[43]!==b?(e={index:m,isPseudoSelected:_,isSelected:f,onSelectedIndexChange:g,onSelect:x,onMount:y,onUpdate:A,result:b,isDisabled:I},l[35]=m,l[36]=I,l[37]=_,l[38]=f,l[39]=y,l[40]=x,l[41]=g,l[42]=A,l[43]=b,l[44]=e):e=l[44],l[45]!==o||l[46]!==E||l[47]!==I||l[48]!==f||l[49]!==b.description||l[50]!==b.name||l[51]!==w){let e,a=E?"sparkles":void 0;l[53]!==o||l[54]!==I||l[55]!==f||l[56]!==b.description||l[57]!==b.name||l[58]!==w||l[59]!==a?(e={id:o,isActive:f,isDisabled:I,secondaryContent:w,name:b.name,description:b.description,avatar:a},l[53]=o,l[54]=I,l[55]=f,l[56]=b.description,l[57]=b.name,l[58]=w,l[59]=a,l[60]=e):e=l[60],t=s.createElement(ts.A,e),l[45]=o,l[46]=E,l[47]=I,l[48]=f,l[49]=b.description,l[50]=b.name,l[51]=w,l[52]=t}else t=l[52];i=s.createElement(U.A,e,t),l[22]=o,l[23]=m,l[24]=E,l[25]=I,l[26]=_,l[27]=f,l[28]=y,l[29]=x,l[30]=g,l[31]=A,l[32]=b,l[33]=w,l[34]=i}else i=l[34];return i}:({broadcastListEntityId:e,channelId:t,threadTs:a,index:n,isCanvas:r,isWorkflowQuestionOption:i,includeAllBroadcastKeywords:l,isPseudoSelected:o,isSelected:c,result:d,onSelectedIndexChange:m,onMount:u,onUpdate:p,onSelect:h})=>{let _=d?.id==="BKassistant:einstein"&&!!a,f=(0,H.d4)(e=>(0,td.OL)(e,t)),b=(0,H.d4)(e=>"on"===(0,e5._Z)(e,"canvas_group_mentions")),g=(0,H.d4)(e=>!!t&&(0,tc.A)(e,t)),y=!!f?.properties?.at_channel_restricted,A=isResultDisabled({threadTs:a,isAssistantThread:_,isBroadcastKeywordsEnabled:g,isCanvas:r,isWorkflowQuestionOption:i,includeAllBroadcastKeywords:l,isAtChannelRestricted:y,experimentCanvasGroupMentionsGroupOn:b}),x=s.createElement(ContextLabel,{threadTs:a,isAssistantThread:_,isBroadcastKeywordsEnabled:g,isAtChannelRestricted:y,isCanvas:r,isWorkflowQuestionOption:i,includeAllBroadcastKeywords:l,experimentCanvasGroupMentionsGroupOn:b});return s.createElement(U.A,{index:n,isPseudoSelected:o,isSelected:c,onSelectedIndexChange:m,onSelect:h,onMount:u,onUpdate:p,result:d,isDisabled:A},s.createElement(ts.A,{id:e,isActive:c,isDisabled:A,secondaryContent:x,name:d.name,description:d.description,avatar:_?"sparkles":void 0}))};function _temp(e){return"on"===(0,e5._Z)(e,"canvas_group_mentions")}tu.displayName="TextyAutocompleteBroadcastKeywordResult";var tp=a(0xc20d1300),th=a(0x161781f25),t_=a(0x61f75169);let tf=new x.Ay("a11y");function makeAriaLabelForUserGroup({name:e,handle:t,teamName:a,purpose:n,isDeactivated:r,memberCount:i}){if(!e)return"";let l=!(0,p.A)(i);return t&&n&&r&&!l&&!a?tf.t("{name}, @{handle}, {purpose} (deactivated)",{name:e,handle:t,purpose:n}):t&&n&&r&&!l&&a?tf.t("{name}, @{handle}, {purpose} (deactivated, {teamName})",{name:e,handle:t,purpose:n,teamName:a}):t&&n&&r&&l&&!a?tf.t("{name}, @{handle}, {purpose} (deactivated, { memberCount, plural, =1 {# member} other {# members}})",{name:e,handle:t,purpose:n,memberCount:i}):t&&n&&r&&l&&a?tf.t("{name}, @{handle}, {purpose} (deactivated, { memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,handle:t,purpose:n,memberCount:i,teamName:a}):t&&n&&!r&&l&&!a?tf.t("{name}, @{handle}, {purpose} ({ memberCount, plural, =1 {# member} other {# members}})",{name:e,handle:t,purpose:n,memberCount:i}):t&&n&&!r&&l&&a?tf.t("{name}, @{handle}, {purpose} ({ memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,handle:t,purpose:n,memberCount:i,teamName:a}):!t||n||r||!l||a?t&&!n&&!r&&l&&a?tf.t("{name}, @{handle} ({ memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,handle:t,memberCount:i,teamName:a}):t||!n||r||!l||a?!t&&n&&!r&&l&&a?tf.t("{name}, {purpose} ({ memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,purpose:n,memberCount:i,teamName:a}):!t&&n&&r&&l&&!a?tf.t("{name}, {purpose} (deactivated, { memberCount, plural, =1 {# member} other {# members}})",{name:e,purpose:n,memberCount:i}):!t&&n&&r&&l&&a?tf.t("{name}, {purpose} (deactivated, { memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,purpose:n,memberCount:i,teamName:a}):t||!n||!r||l||a?!t&&n&&r&&!l&&a?tf.t("{name}, {purpose} (deactivated, {teamName})",{name:e,purpose:n,teamName:a}):t||!n||r||l||a?t||!n||r||l||!a?t||n||!r||!l||a?!t&&!n&&r&&l&&a?tf.t("{name} (deactivated, { memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,memberCount:i,teamName:a}):t||n||!r||l||a?t||n||!r||l||!a?!t||n||!r||l||a?t&&!n&&r&&!l&&a?tf.t("{name}, @{handle} (deactivated, {teamName})",{name:e,handle:t,teamName:a}):t&&!n&&r&&l&&!a?tf.t("{name}, @{handle} (deactivated, { memberCount, plural, =1 {# member} other {# members}})",{name:e,handle:t,memberCount:i}):t&&!n&&r&&l&&a?tf.t("{name}, @{handle} (deactivated, { memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,handle:t,memberCount:i,teamName:a}):t||n||r||l||a?t||n||r||l||!a?!t||n||r||l||a?!t||n||r||l||!a?!t||!n||r||l||a?t&&n&&!r&&!l&&a?tf.t("{name}, @{handle}, {purpose} ({teamName})",{name:e,handle:t,purpose:n,teamName:a}):t||n||r||!l||a?t||n||r||!l||!a?e:tf.t("{name} ({ memberCount, plural, =1 {# member} other {# members}}, {teamName})",{name:e,memberCount:i,teamName:a}):tf.t("{name} ({ memberCount, plural, =1 {# member} other {# members}})",{name:e,memberCount:i}):tf.t("{name}, @{handle}, {purpose}",{name:e,handle:t,purpose:n}):tf.t("{name}, @{handle} ({teamName})",{name:e,handle:t,teamName:a}):tf.t("{name}, @{handle}",{name:e,handle:t}):tf.t("{name} ({teamName})",{name:e,teamName:a}):e:tf.t("{name}, @{handle} (deactivated)",{name:e,handle:t}):tf.t("{name} (deactivated, {teamName})",{name:e,teamName:a}):tf.t("{name} (deactivated)",{name:e}):tf.t("{name} (deactivated, { memberCount, plural, =1 {# member} other {# members}})",{name:e,memberCount:i}):tf.t("{name}, {purpose} ({teamName})",{name:e,purpose:n,teamName:a}):tf.t("{name}, {purpose}",{name:e,purpose:n}):tf.t("{name}, {purpose} (deactivated)",{name:e,purpose:n}):tf.t("{name}, {purpose} ({ memberCount, plural, =1 {# member} other {# members}})",{name:e,purpose:n,memberCount:i}):tf.t("{name}, @{handle} ({ memberCount, plural, =1 {# member} other {# members}})",{name:e,handle:t,memberCount:i})}var tb=a(0x9b971e7e),tg=a(0x475c9cfe);let get_label_for_user_group_by_id=(e,{id:t,propsToInclude:a={}})=>{let n=(0,tg.lJ)(e,t);if(!n)return"";let r=(0,t_.ue)(n);if(!r)return"";let i=a.handle?(0,t_.x_)(n,{includeAtSign:!1}):void 0,l=a.isDeactivated&&!(0,t_.V1)(n),o=a.memberCount?(0,t_.Br)(n):void 0,s=a.teamName?(0,tb.ZT)(e):void 0,c=a.teamName?(0,t_.$Q)(n):void 0,d=c&&s&&c!==s?(0,ef._J)(e,c):void 0;return makeAriaLabelForUserGroup({name:r,handle:i,teamName:d?(0,eh.F1)(d):void 0,isDeactivated:l,memberCount:o,purpose:a.purpose?(0,t_.NF)(n):void 0})},ty=new x.Ay("tabcomplete"),tA=(0,ti.Ar)()?e=>{let t,a,n,r=(0,tl.c)(32),{userGroupId:i,isCanvas:l,index:o,isPseudoSelected:c,isSelected:d,result:m,onSelectedIndexChange:u,onSelect:p,onMount:h,onUpdate:_}=e,f=(0,H.d4)(texty_autocomplete_usergroup_result_temp),b=l&&!f;r[0]!==b?(t=b?s.createElement("span",{className:"c-texty_autocomplete__result_context"},ty.t("Disabled in a canvas")):void 0,r[0]=b,r[1]=t):t=r[1];let g=t;r[2]!==i?(a=e=>get_label_for_user_group_by_id(e,{id:i,propsToInclude:{handle:!0,isDeactivated:!0,memberCount:!0}}),r[2]=i,r[3]=a):a=r[3];let y=(0,H.d4)(a);if(r[4]!==y||r[5]!==o||r[6]!==b||r[7]!==c||r[8]!==d||r[9]!==h||r[10]!==p||r[11]!==u||r[12]!==_||r[13]!==m||r[14]!==g){let e,t;r[16]!==y||r[17]!==o||r[18]!==b||r[19]!==c||r[20]!==d||r[21]!==h||r[22]!==p||r[23]!==u||r[24]!==_||r[25]!==m?(e={index:o,isPseudoSelected:c,isSelected:d,onSelectedIndexChange:u,onSelect:p,onMount:h,onUpdate:_,result:m,isDisabled:b,"aria-label":y},r[16]=y,r[17]=o,r[18]=b,r[19]=c,r[20]=d,r[21]=h,r[22]=p,r[23]=u,r[24]=_,r[25]=m,r[26]=e):e=r[26],r[27]!==b||r[28]!==d||r[29]!==m.id||r[30]!==g?(t=s.createElement(th.A,{id:m.id,isActive:d,isDisabled:b,secondaryContent:g}),r[27]=b,r[28]=d,r[29]=m.id,r[30]=g,r[31]=t):t=r[31],n=s.createElement(U.A,e,t),r[4]=y,r[5]=o,r[6]=b,r[7]=c,r[8]=d,r[9]=h,r[10]=p,r[11]=u,r[12]=_,r[13]=m,r[14]=g,r[15]=n}else n=r[15];return n}:({userGroupId:e,isCanvas:t,index:a,isPseudoSelected:n,isSelected:r,result:i,onSelectedIndexChange:l,onSelect:o,onMount:c,onUpdate:d})=>{let m=(0,H.d4)(e=>"on"===(0,e5._Z)(e,"canvas_group_mentions")),u=t&&!m,p=u?s.createElement("span",{className:"c-texty_autocomplete__result_context"},ty.t("Disabled in a canvas")):void 0,h=(0,H.d4)(t=>get_label_for_user_group_by_id(t,{id:e,propsToInclude:{handle:!0,isDeactivated:!0,memberCount:!0}}));return s.createElement(U.A,{index:a,isPseudoSelected:n,isSelected:r,onSelectedIndexChange:l,onSelect:o,onMount:c,onUpdate:d,result:i,isDisabled:u,"aria-label":h},s.createElement(th.A,{id:i.id,isActive:r,isDisabled:u,secondaryContent:p}))};function texty_autocomplete_usergroup_result_temp(e){return"on"===(0,e5._Z)(e,"canvas_group_mentions")}tA.displayName="TextyAutocompleteUserGroupResult";var tx=a(0x19d55d0e1),tE=a(0x20679dcfc),tC=a(0xb192491f),tk=a(0x2365f1831),tv=a(0x14ea3ce99),tS=a(0xb9604b6),tI=a(0x20061cab9),tw=a(0x5b1935a6),tT=a(0x18a17ca8f),tN=a(0x207167a29),tM=a(0x74bbb29a);let tR=new x.Ay("tabcomplete"),isItemWithId=e=>(0,e6.A)(e.id),tP=(0,ti.Ar)()?e=>{let t,a,n,r,i,l,o,c,d=(0,tl.c)(18),{results:m,selectedIndex:u,onSelect:p,onSelectedIndexChange:h,onFirstResultMount:_,onFirstResultUpdate:f,className:b,threadTs:g,channelId:y,fileId:A,isCanvas:x,isWorkflowQuestionOption:E,includeAllBroadcastKeywords:C,canMentionAgent:k,onFeedbackClick:v}=e,S=(0,B.wA)();d[0]!==y?(t=e=>!!y&&!!(0,tx.OR)(e,y),d[0]=y,d[1]=t):t=d[1];let I=(0,H.d4)(t),w=y&&I?(0,tE.l)(y):A,T=(0,H.d4)(e=>w?(0,tv.Lp)(e,w):void 0),N=(0,eG.DQ)(T),M=(0,eG.l7)(T),R=(0,H.d4)(texty_autocomplete_members_temp),P=(0,H.d4)(_temp2),L=(0,H.d4)(tT.qh),O=(0,H.d4)(_temp3);return d[2]!==S?(a=()=>(S((0,tC.X)({buttonType:tk.V.MENTION,expanded:!0})),()=>S((0,tC.X)({buttonType:tk.V.MENTION,expanded:!1}))),n=[S],d[2]=S,d[3]=a,d[4]=n):(a=d[3],n=d[4]),(0,s.useEffect)(a,n),d[5]!==S||d[6]!==L||d[7]!==P||d[8]!==R?(r=()=>{!L||P||R||S((0,tN.F)({tip:tM.ml.AtMention}))},i=[S,L,P,R],d[5]=S,d[6]=L,d[7]=P,d[8]=R,d[9]=r,d[10]=i):(r=d[9],i=d[10]),(0,s.useEffect)(r,i),d[11]!==S||d[12]!==E||d[13]!==O?(l=()=>{E&&O&&S((0,tI.Ay)({spaceName:tw.xu.WORKFLOW_BUILDER_QUESTION_OPTION_INPUT,action:tw.hw.DISMISS}))},o=[S,E,O],d[11]=S,d[12]=E,d[13]=O,d[14]=l,d[15]=o):(l=d[14],o=d[15]),(0,s.useEffect)(l,o),d[16]!==P?(c=P?s.createElement(to.A,{tip:tM.ml.AtMention}):null,d[16]=P,d[17]=c):c=d[17],s.createElement(K.A,{type:$.pm.MEMBER,"aria-label":tR.t("Users"),className:b,results:m,showCanvasHelp:N,onFeedbackClick:v,heading:c},m?.map(_temp4).filter(isItemWithId).map((e,t)=>{let a=0===t&&void 0===u,n=t===u,r=0===t,i=e.id,l=r?_:void 0,o=r?f:void 0;return e.is_broadcast_keyword?s.createElement(tu,{key:i,broadcastListEntityId:i,channelId:y,threadTs:g,index:t,isCanvas:x,isWorkflowQuestionOption:E,includeAllBroadcastKeywords:C,isPseudoSelected:a,isSelected:n,onSelectedIndexChange:h,onSelect:p,onMount:l,onUpdate:o,result:e}):e.is_usergroup?s.createElement(tA,{key:i,userGroupId:i,index:t,isCanvas:x,isPseudoSelected:a,isSelected:n,onSelectedIndexChange:h,onSelect:p,onMount:l,onUpdate:o,result:e}):s.createElement(tp.a,{key:i,memberId:i,channelId:y,fileId:w,index:t,isPseudoSelected:a,isSelected:n,isListFile:M,isCanvasOrCanvasComment:N,canMentionAgent:k,onSelectedIndexChange:h,onSelect:p,onMount:l,onUpdate:o,result:e})}))}:e=>{let{results:t,selectedIndex:a,onSelect:n,onSelectedIndexChange:r,onFirstResultMount:i,onFirstResultUpdate:l,className:o,threadTs:c,channelId:d,fileId:m,isCanvas:u,isWorkflowQuestionOption:p,includeAllBroadcastKeywords:h,canMentionAgent:_,onFeedbackClick:f}=e,b=(0,B.wA)(),g=(0,H.d4)(e=>!!d&&!!(0,tx.OR)(e,d)),y=d&&g?(0,tE.l)(d):m,A=(0,H.d4)(e=>y?(0,tv.Lp)(e,y):void 0),x=(0,eG.DQ)(A),E=(0,eG.l7)(A),C=(0,H.d4)(e=>(0,tT.jv)(e,{tip:tM.ml.AtMention})),k=(0,H.d4)(e=>(0,tT.Wg)(e,{tip:tM.ml.AtMention})),v=(0,H.d4)(tT.qh),S=(0,H.d4)(e=>(0,tS.Hp)(e,tw.xu.WORKFLOW_BUILDER_QUESTION_OPTION_INPUT)===tw.ze.HERMES_WORKFLOWS_OPTION_ITEM_MENTION_TIP);return(0,s.useEffect)(()=>(b((0,tC.X)({buttonType:tk.V.MENTION,expanded:!0})),()=>b((0,tC.X)({buttonType:tk.V.MENTION,expanded:!1}))),[b]),(0,s.useEffect)(()=>{!v||k||C||b((0,tN.F)({tip:tM.ml.AtMention}))},[b,v,k,C]),(0,s.useEffect)(()=>{p&&S&&b((0,tI.Ay)({spaceName:tw.xu.WORKFLOW_BUILDER_QUESTION_OPTION_INPUT,action:tw.hw.DISMISS}))},[b,p,S]),s.createElement(K.A,{type:$.pm.MEMBER,"aria-label":tR.t("Users"),className:o,results:t,showCanvasHelp:x,onFeedbackClick:f,heading:k?s.createElement(to.A,{tip:tM.ml.AtMention}):null},t?.map(e=>e.item).filter(isItemWithId).map((e,t)=>{let o=0===t&&void 0===a,m=t===a,f=0===t,b=e.id,g=f?i:void 0,A=f?l:void 0;return e.is_broadcast_keyword?s.createElement(tu,{key:b,broadcastListEntityId:b,channelId:d,threadTs:c,index:t,isCanvas:u,isWorkflowQuestionOption:p,includeAllBroadcastKeywords:h,isPseudoSelected:o,isSelected:m,onSelectedIndexChange:r,onSelect:n,onMount:g,onUpdate:A,result:e}):e.is_usergroup?s.createElement(tA,{key:b,userGroupId:b,index:t,isCanvas:u,isPseudoSelected:o,isSelected:m,onSelectedIndexChange:r,onSelect:n,onMount:g,onUpdate:A,result:e}):s.createElement(tp.a,{key:b,memberId:b,channelId:d,fileId:y,index:t,isPseudoSelected:o,isSelected:m,isListFile:E,isCanvasOrCanvasComment:x,canMentionAgent:_,onSelectedIndexChange:r,onSelect:n,onMount:g,onUpdate:A,result:e})}))};function texty_autocomplete_members_temp(e){return(0,tT.jv)(e,{tip:tM.ml.AtMention})}function _temp2(e){return(0,tT.Wg)(e,{tip:tM.ml.AtMention})}function _temp3(e){return(0,tS.Hp)(e,tw.xu.WORKFLOW_BUILDER_QUESTION_OPTION_INPUT)===tw.ze.HERMES_WORKFLOWS_OPTION_ITEM_MENTION_TIP}function _temp4(e){return e.item}tP.displayName="TextyAutocompleteMembers";var tL=a(0x128d54e52),tO=a(0x24f1e08bb);let tD=new x.Ay("tabcomplete"),tF=(0,ti.Ar)()?e=>{let t,a=(0,tl.c)(17),{results:n,selectedIndex:r,onSelect:i,onSelectedIndexChange:l,className:o,onFeedbackClick:c}=e,d=texty_autocomplete_slack_files_temp;if(a[0]!==o||a[1]!==c||a[2]!==i||a[3]!==l||a[4]!==n||a[5]!==r){let e,m,u;a[7]===Symbol.for("react.memo_cache_sentinel")?(e=tD.t("Lists"),a[7]=e):e=a[7],a[8]!==o||a[9]!==c||a[10]!==n?(m={type:$.pm.LIST,className:o,results:n,"aria-label":e,onFeedbackClick:c},a[8]=o,a[9]=c,a[10]=n,a[11]=m):m=a[11],a[12]!==i||a[13]!==l||a[14]!==n||a[15]!==r?(u=n?.map((e,t)=>{let a,n,o,c;(0,eG.DQ)(e.item)?(o=e.item,a=(0,eq.V)(o)||"",n="canvas"):(0,e1.or)(e.item.id)?(a=(o=e.item).name||"",n="caret-right"):(a=(o=e.item).title||"",n="lists");let m=0===t&&void 0===r,u=t===r;return u&&(c=e8.pI.highlightDark),s.createElement(U.A,{key:o.id,index:t,isPseudoSelected:m,isSelected:u,onSelectedIndexChange:l,onSelect:i,result:o,size:"small"},s.createElement(tO.A,{style:c,primaryContent:s.createElement(tL.Ay,{avatar:()=>d(n),size:"medium",text:s.createElement(tL.CG,null,s.createElement("strong",null,a))})}))}),a[12]=i,a[13]=l,a[14]=n,a[15]=r,a[16]=u):u=a[16],t=s.createElement(K.A,m,u),a[0]=o,a[1]=c,a[2]=i,a[3]=l,a[4]=n,a[5]=r,a[6]=t}else t=a[6];return t}:({results:e,selectedIndex:t,onSelect:a,onSelectedIndexChange:n,className:r,onFeedbackClick:i})=>{let l=(0,s.useCallback)(e=>s.createElement("span",{className:"c-base_entity__avatar"},s.createElement(ei.Ah,{name:e})),[]);return s.createElement(K.A,{type:$.pm.LIST,className:r,results:e,"aria-label":tD.t("Lists"),onFeedbackClick:i},e?.map((e,r)=>{let i,o,c,d;(0,eG.DQ)(e.item)?(c=e.item,i=(0,eq.V)(c)||"",o="canvas"):(0,e1.or)(e.item.id)?(i=(c=e.item).name||"",o="caret-right"):(i=(c=e.item).title||"",o="lists");let m=r===t;return m&&(d=e8.pI.highlightDark),s.createElement(U.A,{key:c.id,index:r,isPseudoSelected:0===r&&void 0===t,isSelected:m,onSelectedIndexChange:n,onSelect:a,result:c,size:"small"},s.createElement(tO.A,{style:d,primaryContent:s.createElement(tL.Ay,{avatar:()=>l(o),size:"medium",text:s.createElement(tL.CG,null,s.createElement("strong",null,i))})}))}))};function texty_autocomplete_slack_files_temp(e){return s.createElement("span",{className:"c-base_entity__avatar"},s.createElement(ei.Ah,{name:e}))}tF.displayName="TextyAutocompleteSlackFiles";let tU=new x.Ay("texty_autocomplete");function getNameForTextyAutocompleteResult(e){return e?.name??e.item.name}function makeMessageForCollapsedState(e,t){return({[$.pm.COMMAND]:tU.t("Command suggestions collapsed"),[$.pm.EMOJI]:tU.t("Emoji suggestions collapsed"),[$.pm.MEMBER]:tU.t("User suggestions collapsed"),[$.pm.CHANNEL]:tU.t("Channel suggestions collapsed"),[$.pm.AI_SUGGESTION]:tU.t("AI suggestions collapsed"),[$.pm.TERM]:tU.t("Term suggestions collapsed"),[$.pm.SHORTCUT]:tU.t("Shortcut suggestions collapsed"),[$.pm.LIST]:tU.t("List suggestions collapsed"),[$.pm.DOCUMENT]:tU.t("Document suggestions collapsed"),[$.pm.SLACK_FILE]:t?tU.t("Slack file suggestions collapsed"):"Slack file suggestions collapsed",[$.pm.SEARCH_FILTER]:""})[e]}var tB=a(0x243435af9),tH=a(0x7bc42e7e),tW=a(0x70de3606),tV=a(0x1c8f352ff),tG=a(0x1a173079e),tq=a(0x6d72337),tj=a(0x223ac29bb),tK=a(0x16d4244ae),t$=a(0x76c42467),tY=a(0x10ea12ee6),tQ=a(0x1c91944c9),tZ=a(0x131598af9),tJ=a(0x1ccef1c6f),tX=a(0x12f41fc32),t0=a(0x7adbadbb),t1=a(0xbbaed668),t2=a(0x12a144c0b);let t4=new x.Ay("texty_autocomplete"),t5=(0,eC.Ay)("Announce the first result of a set of Texty autocomplete suggestions and the total number of suggestions",(e,t,{result:a,numResults:n})=>{let r=a.id;if(!r)return;let i=t(),l=a.type;if("member"===l)return e((0,t0.rl)({assertive:!0,message:t4.t("{resultDescription}, 1 of {total} suggestions",{resultDescription:(0,t2.A)(i,{id:r,propsToInclude:{displayName:!0,teamName:!0,isSelf:!0,isAppOrBot:!0,isDeleted:!0,isPrescenceAway:!0,isPrescenceDND:!0,isHidden:!0,isAgent:!0,statusEmojiCode:!0,statusText:!0}}),total:n,fallbackHash:"51055decbda7309862cc67e3062452ee38890136"}),uuid:(0,v.A)()}));if("userGroup"===l)return e((0,t0.rl)({assertive:!0,message:t4.t("{resultDescription}, 1 of {total} suggestions",{resultDescription:get_label_for_user_group_by_id(i,{id:r,propsToInclude:{handle:!0,isDeactivated:!0,memberCount:!0}}),total:n,fallbackHash:"51055decbda7309862cc67e3062452ee38890136"}),uuid:(0,v.A)()}));if("channel"===l)return e((0,t0.rl)({assertive:!0,message:t4.t("{resultDescription}, 1 of {total} suggestions",{resultDescription:(0,t1.A)(i,{id:r,propsToInclude:{teamName:!0,isArchived:!0,isPrivate:!0}}),total:n,fallbackHash:"51055decbda7309862cc67e3062452ee38890136"}),uuid:(0,v.A)()}));if("canvasAiSuggestions"===l){let{name:t,atMention:r,recentChannel:i}=a.item;return e((0,t0.rl)({assertive:!0,message:t4.t("{resultDescription}, 1 of {total} suggestions",{resultDescription:(0,ew.V_)(t??"",r,i),total:n,fallbackHash:"51055decbda7309862cc67e3062452ee38890136"}),uuid:(0,v.A)()}))}return e((0,t0.rl)({assertive:!0,message:t4.t("{resultDescription}, 1 of {total} suggestions",{resultDescription:getNameForTextyAutocompleteResult(a),total:n,fallbackHash:"51055decbda7309862cc67e3062452ee38890136"}),uuid:(0,v.A)()}))});t5.meta={name:"announceTextyAutocompleteResults",key:"createThunkAnnounceTextyAutocompleteResults",description:"Announce the first result of a set of Texty autocomplete suggestions and the total number of suggestions"};var t3=a(0x1ecc7f772);let t6={entities:{canvasAiSuggestions:!0},sort:{bypassSorting:!0},fuzzyLimit:3,allowEmptyQuery:!0,returnMetadata:!0},t8=(0,eC.Ay)("Find AI prompt suggestions that match a search query",(e,t,{query:a,channelId:n,searcherKey:r="texty-autocomplete",searchViewContext:i,canvasAiContext:l}={})=>{let o=t(),s=(0,t3.SB)(o,(0,td.OL)(o,n),{privateChannelUseHashSign:!0}),c={...t6,searchViewContext:i,tabbedChannelName:s,canvasAiContext:l};return(0,eN.A)({teamId:(0,tb.ZT)(o),key:r}).search({query:a,options:c})});t8.meta={name:"autocompleteCanvasAiSuggestions",key:"createThunkAutocompleteCanvasAiSuggestions",description:"Find AI prompt suggestions that match a search query"};var t7=a(0x40024dc1),t9=a(0xb6085b19);function generateFileSearchObject(e){let t={runaway:!0};return e===y.tH.ALL_CANVASES&&(t.onlyCanvases=!0),e===y.tH.STANDALONE_CANVASES&&(t.onlyCanvases=!0,t.excludeTemplateCanvases=!0),e===y.tH.NON_TEMPLATE_CANVASES&&(t.onlyCanvases=!0,t.excludeTemplateCanvases=!0),t}let ae=(0,eC.Ay)("Find files that match a search query",(e,t,{query:a,limit:n=y.zE,searchViewContext:r,searcherKey:i="texty-autocomplete",allowedFileTypes:l=y.tH.ALL_FILES,signal:o}={})=>{let s=t(),c={entities:{files:generateFileSearchObject(l)},allowEmptyQuery:!0,sort:{source:"texty-autocomplete"},limit:n,tiered:!0,returnMetadata:!0,searchViewContext:r};return(0,eN.A)({teamId:(0,tb.ZT)(s),key:i}).search({query:a,options:c,signal:o})});ae.meta={name:"autocompleteFiles",key:"createThunkAutocompleteFiles",description:"Find files that match a search query"};var at=a(0x39c953cc);let aa=(0,eC.Ay)("Find quip shortcut commands that match a search query",(e,t,{query:a,searcherKey:n="texty-autocomplete"}={})=>{let r=t();return(0,eN.A)({teamId:(0,tb.ZT)(r),key:n}).search({query:a,options:{entities:{shortcuts:{quipShortcutCommands:!0,isOpenedWithSlash:!0}},sort:{bypassSorting:!0},tiered:!0,fuzzyLimit:3,allowEmptyQuery:!0,returnMetadata:!0}})});aa.meta={name:"autocompleteQuipShortcuts",key:"createThunkAutocompleteQuipShortcuts",description:"Find quip shortcut commands that match a search query"};let an=(0,eC.Ay)("Find canvases and lists that match a search query",(e,t,{query:a,limit:n=y.zE,searchViewContext:r,signal:i})=>{let l=["+","\uFF0B"].includes(a[0])?a.slice(1):a,o=t();return(0,eN.A)({teamId:(0,tb.ZT)(o),key:"texty-autocomplete"}).search({query:l,options:{entities:{lists:{runaway:!1},files:{onlyCanvases:!0,runaway:!1}},allowEmptyQuery:!0,sort:{source:"texty-autocomplete"},limit:n,tiered:!0,returnMetadata:!0,searchViewContext:r},signal:i})});an.meta={name:"autocompleteSlackFiles",key:"createThunkAutocompleteSlackFiles",description:"Find canvases and lists that match a search query"};var ar=a(0x303de21b),ai=a(0x12185e091),al=a(0x11439744b);let ChannelsWithMembershipCache=class ChannelsWithMembershipCache{timeoutMs;data;constructor(e=432e5,t={}){this.timeoutMs=e,this.data=t}shouldUpdate(e){let t=this.data[e];return!t||Date.now()-t>this.timeoutMs}recordUpdate(e){this.data[e]=Date.now()}clear(){this.data={}}};let ao=new ChannelsWithMembershipCache;function shouldUpdateChannelMembership(e){return ao.shouldUpdate(e)}function recordChannelMembershipUpdate(e){return ao.recordUpdate(e)}var as=a(0x20e4cf8eb);let ac=(0,eC.Ay)("Fetch and cache channel membership for first members of channel",(e,t,{channelId:a})=>{let n=t(),r=(0,al.Cy)({state:n});if(r.mark("membership-update-mark"),shouldUpdateChannelMembership(a)){let i=(0,td.OL)(n,a);!i||(0,ai.LI)(i)||(0,ai.yz)(i)||((0,ar.ds)(e,t,a,30).then(t=>{let n=t.map(e=>e.id);e((0,as.z)({channelId:a,userIds:n})),r.measureAndClear("membership-update-mark","membership-update")}),recordChannelMembershipUpdate(a))}});ac.meta={name:"ensureChannelMembershipKnownForFirstNMembers",key:"createThunkEnsureChannelMembershipKnownForFirstNMembers",description:"Fetch and cache channel membership for first members of channel"};var ad=a(0x23a67ace),am=a(0x1c9a3c4c1),au=a(0x183ab9a73),ap=a(0xe684f705);let ah=(0,eC.Ay)("Looks at the input for the given view context and determines if an agent can be mentioned",(e,t,{channelId:a,threadTs:n,viewContext:r})=>{let i=t();if(!(0,ad.Nn)(i))return!0;let l=(0,tK.zC)({viewContext:r,channelId:a,threadTs:n});if(!l)return!0;let o=l.getContents?.();if(!o)return!0;let s=(0,au.d)({ops:o.contents});if(!s||0===s.length)return!0;let c=(0,ap.gA)(i,s);return!c||!c.some(am.D)});ah.meta={name:"canMentionAgent",key:"createThunkCanMentionAgent",description:"Looks at the input for the given view context and determines if an agent can be mentioned"};var a_=a(0x17cc44ffa),af=a(0xafce781a);let ab=new x.Ay("texty_autocomplete"),ag="TABCOMPLETE",ay={position:"fixed"},aA={top:0,right:0,bottom:0,left:0,height:0,width:0},ax={isOpen:!1,selectedIndex:void 0,results:void 0,matchIndex:0,matchText:void 0,menuPosition:void 0,matchOptions:void 0,closedWithSelection:!1,canMentionAgent:!0},aE=class extends k.B{static defaultProps;autocompleteConfig;completers;completer;tabCompleteHideMenu;tabCompleteAriaExpand;tabCompleteAriaActiveDescendant;tabCompletePerformSelection;getMaybeStopAutocompleteMatchRenderTrace;searchInFlight;forwardMessageToAnnouncerAPI;announceTextyAutocompleteResults;resultToAnnounce;searchAbortController;navigationMethod;constructor(e){super(e),(0,g.v)(this,["getMatch","handleSelect","onClose","onOpen","onArrowKey","onSelectedIndexChange","onSelect","clearSelectedIndex","possiblySelectFirstItem","positionMenu","search","processResults","forwardMessageToAnnouncerAPI"]),this.autocompleteConfig=this.getAutocompleteConfig(),this.completers=this.getCompleters(e),this.completer=null,this.tabCompleteHideMenu=c.A,this.tabCompleteAriaExpand=c.A,this.tabCompletePerformSelection=c.A,this.tabCompleteAriaActiveDescendant=c.A,this.searchInFlight=null,this.searchAbortController=null,this.navigationMethod=$.As.None,this.resultToAnnounce=void 0,this.state=ax,this.getMaybeStopAutocompleteMatchRenderTrace=(0,C.A)(e=>()=>(0,tG.HJ)(e)),this.forwardMessageToAnnouncerAPI=(0,d.A)(e.forwardMessageToAnnouncerAPI,200),this.announceTextyAutocompleteResults=(0,d.A)(e.announceTextyAutocompleteResults,200)}componentDidMount(){!1!==this.props.shouldCloseOnResize&&b.J.addEventListener("resize",this.tabCompleteHideMenu),this.props.completeOnMembers&&this.props.ensureChannelMembershipKnownForFirstNMembers({channelId:this.props.channelId}),this.props.autocompleteConfig&&(this.props.autocompleteConfig.current=this.autocompleteConfig)}UNSAFE_componentWillReceiveProps(e){let{completeOnMembers:t,completeOnChannels:a,completeOnEmoji:n,completeOnSlackFiles:r,completeOnCommands:i,completeOnAiSuggestions:l,customCompleters:o,listsTextyAutocompleteEnabled:s,disallowedResults:c,searchViewContext:d,canvasAiContext:m,teamId:u}=this.props;(e.completeOnMembers!==t||e.completeOnChannels!==a||e.completeOnEmoji!==n||e.completeOnSlackFiles!==r||e.completeOnCommands!==i||e.completeOnAiSuggestions!==l||e.customCompleters!==o||e.disallowedResults!==c||e.listsTextyAutocompleteEnabled!==s||e.searchViewContext!==d||e.canvasAiContext!==m||e.teamId!==u)&&(this.completers=this.getCompleters(e))}componentDidUpdate(e,t){if(this.props.completeOnMembers&&this.props.channelId!==e.channelId&&this.props.ensureChannelMembershipKnownForFirstNMembers({channelId:this.props.channelId}),this.props.shouldCloseOnResize!==e.shouldCloseOnResize){let t=!1!==this.props.shouldCloseOnResize,a=!1!==e.shouldCloseOnResize;t&&!a?b.J.addEventListener("resize",this.tabCompleteHideMenu):!t&&a&&b.J.removeEventListener("resize",this.tabCompleteHideMenu)}this.state.isOpen!==t.isOpen&&this.tabCompleteAriaExpand?.(this.state.isOpen),!this.state.isOpen&&t.isOpen&&this.announceSuggestionsCollapsed(),this.state.selectedIndex!==t.selectedIndex&&this.state.isOpen&&this.tabCompleteAriaActiveDescendant?.(this.state.selectedIndex)}componentWillUnmount(){this.searchAbortController?.abort(),this.searchAbortController=null,this.completers=[],b.J.removeEventListener("resize",this.tabCompleteHideMenu)}onClose(){let{teamId:e,completeOnCommands:t,loadProgressiveDisclosureMegaphoneSpaceOnClose:a,loadProgressiveDisclosureMegaphoneNotificationData:n,onClose:r}=this.props,{matchText:i,closedWithSelection:l,isOpen:o}=this.state;o&&(this.searchAbortController?.abort(),this.searchAbortController=null,!l&&a&&n(),this.setState(()=>({isOpen:!1,menuPosition:void 0,selectedIndex:void 0,closedWithSelection:!1})),r?.(),(0,eN.A)({teamId:e,key:"texty-autocomplete"}).endSession(),!l&&t&&("/"===i||"\uFF0F"===i)&&this.clearTextyInput())}makeInsertedMessage({name:e,resultType:t}){if(e)return t===$.pm.SEARCH_FILTER?e:ab.t("{name}, inserted",{name:e})}announceSuggestionsCollapsed(){let{experimentFeLinkTokenizationGroupOn:e}=this.props,t=this.resultToAnnounce,a=t?getNameForTextyAutocompleteResult(t):void 0,n=this.completer?.type,r=n!==$.pm.COMMAND&&n!==$.pm.SHORTCUT,i=n?makeMessageForCollapsedState(n,e):"",l=r?this.makeInsertedMessage({resultType:n,name:a}):void 0,o=l?[l,i].join(" "):i;o&&(this.forwardMessageToAnnouncerAPI({assertive:!0,message:o,uuid:(0,v.A)()}),this.resultToAnnounce=void 0)}announceSuggestionsExpanded(){let{results:e}=this.state;if(!e)return;let t=e[0];t&&this.announceTextyAutocompleteResults({result:t,numResults:e.length})}onOpen(){let{onOpen:e,clogger:t,canMentionAgent:a,channelId:n,threadTs:r,viewContext:i}=this.props;(!this.state.isOpen||this.state.closedWithSelection)&&this.completer?.recordImpressionOnOpen&&this.completer?.recordImpressionOnOpen(t);let l=a({channelId:n,threadTs:r,viewContext:i});this.setState(()=>({isOpen:!0,closedWithSelection:!1,canMentionAgent:l})),e?.(this.completer?.type)}getNextIndex({selectedIndex:e,upperLimit:t}){if(void 0===e)return 0;let a=e+1;return a>t?void 0:a}getPrevIndex({selectedIndex:e,upperLimit:t}){if(void 0===e)return t;let a=e-1;return a<0?void 0:a}onArrowKey(e){let{isOpen:t,selectedIndex:a,results:n}=this.state,r=(0,m.A)(n),i=r-1;if(this.searchInFlight=null,!t||!r||![E.i7,E.n6].includes(e))return;this.navigationMethod=$.As.ArrowKeys;let l=e===E.n6?this.getNextIndex({selectedIndex:a,upperLimit:i}):this.getPrevIndex({selectedIndex:a,upperLimit:i});return this.setState(()=>({selectedIndex:l})),!1}onSelectedIndexChange(e){let{logger:t}=this.props;(0,u.A)(e)?this.state.isOpen&&e!==this.state.selectedIndex&&(this.setState(()=>({selectedIndex:e})),t.info(ag,`set new index to ${e}`)):t.warn(ag,`invalid index "${e}"`)}onSelect(e){this.navigationMethod=$.As.Mouse,this.setState(()=>({selectedIndex:e,closedWithSelection:!0}),this.tabCompletePerformSelection)}getCompleters(e=this.props){let t=[];return e.customCompleters&&t.push(...e.customCompleters.filter(e=>e.highPriority)),e.completeOnChannels&&t.push({...eL,completerEntity:"channel",menu:TextyAutocompleteChannels,search:e.autocompleteChannels,type:$.pm.CHANNEL}),e.completeOnEmoji&&t.push({...eY,completerEntity:"emoji",menu:tr.A,search:e.autocompleteEmoji,type:$.pm.EMOJI}),e.completeOnSlackFiles&&e.listsTextyAutocompleteEnabled&&t.push({...o,menu:tF,search:e.autocompleteSlackFiles,getResultFrecencyId:()=>void 0,type:$.pm.SLACK_FILE}),e.completeOnCommands&&!e.isAgentFromChannelId&&t.push({...r,menu:eI,search:e.autocompleteCommandsSearcherFlat,onSelection:e.executeCommandAutocompleteItem,recordSelection:()=>void 0,type:$.pm.COMMAND}),e.isCanvas&&t.push({...l,completerEntity:"quip-shortcut",menu:QuipShortcutsAutocompleteMenuV2,search:e.autocompleteQuipShortcuts,type:$.pm.SHORTCUT}),e.isCanvas&&e.experimentCanvasAutocompleteDocumentGroupOn&&t.push({...i,completerEntity:"quip-document",menu:TextyAutocompleteDocuments,search:e.autocompleteFiles,type:$.pm.DOCUMENT}),e.completeOnMembers&&t.push({...eQ,completerEntity:"member",menu:tP,search:e.autocompleteMembers,type:$.pm.MEMBER}),e.customCompleters&&t.push(...e.customCompleters.filter(e=>!e.highPriority)),e.completeOnAiSuggestions&&e.experimentCanvasAiInlineCreationGroupOn&&t.push({...n,completerEntity:"canvas-ai-suggestion",menu:CanvasAiSuggestionsMenu,search:e.autocompleteCanvasAiSuggestions,type:$.pm.AI_SUGGESTION}),t}getMatch(e,t,a,n){let{teamId:r,locale:i,viewContext:l,experimentFriendlyChannelNamesEnabled:o,skipSearchFilterMentions:s}=this.props,c=(0,tK.zC)({viewContext:l,channelId:this.props.channelId,threadTs:this.props.threadTs});for(let l=0;l<this.completers.length;l++){let d=this.completers[l],m=d.getMatch(e,{isUserSolicited:t,locale:i,startIndex:a,formatOp:n,inputProxy:c,experimentFriendlyChannelNamesEnabled:o,skipSearchFilterMentions:s});if(m)return m?.match&&(0,tG.rO)(m?.match,d?.completerEntity||"unknown",r||""),this.completer===d?(this.setState(()=>({matchIndex:a+m.index,matchText:m.match,matchOptions:m.options})),this.forceUpdate()):(this.completer=d,this.setState(()=>({...ax,matchIndex:a+m.index,matchText:m.match,matchOptions:m.options}))),m}return null}clearSelectedIndex(){this.setState(()=>({selectedIndex:void 0}))}clearTextyInput(){let{viewContext:e}=this.props,t=(0,tK.zC)({viewContext:e,channelId:this.props.channelId,threadTs:this.props.threadTs});t&&t.clear()}getAutocompleteConfig(){let{forceChannelTaggingDisabled:e,skipAriaExpanded:t}=this.props;return{getMatch:this.getMatch,search:this.search,onSelect:this.handleSelect,getInsertDataFromActiveResult:()=>{let t=this.state.results&&!(0,p.A)(this.state.selectedIndex)?this.state.results[this.state.selectedIndex]:void 0,a=t?.id==="BKassistant:einstein"&&!!this.props.threadTs;return this.completer?.getInsertData(t,{shouldRenderBroadcastsAsText:!a&&(!!this.props.threadTs||!this.props.broadcastKeywordsEnabled),shouldRenderEmojiAsText:this.props.isEmojiDisplayedAsText,highlightWords:this.props.highlightWords,userSkinTone:this.props.userSkinTone,locale:this.props.locale,usePlainTextMode:this.props.usePlainTextMode,useChannelTagging:!e,teamId:this.props.teamId,isCanvas:this.props.isCanvas})},shouldDisplayResults:e=>!(this.state.results&&1===this.state.results.length&&e||this.props.completeOnCommands&&this.state.matchText?.includes(" ")&&this.state.results?.some(e=>e.isExactMatch&&e?.item?.isSlashCommand)),canCompleteOnEmptyQuery:()=>{for(let e=0;e<this.completers.length;e++)if(this.completers[e].canCompleteOnEmptyQuery)return!0;return!1},isOpen:()=>this.state.isOpen,getMatchText:()=>this.state.matchText,getMatchIndex:()=>this.state.matchIndex,getMatchResults:()=>this.state.results,setSearchInFlight:e=>{this.searchInFlight=e},getSearchInFlight:()=>this.searchInFlight,getSelectedIndex:()=>this.state.selectedIndex,clearMatchState:()=>{this.setState(()=>({matchText:void 0,matchIndex:void 0,results:void 0}))},onResultsReceived:e=>{this.setState(()=>({results:e}))},onRequestOpen:this.onOpen,onRequestClose:this.onClose,onArrowKey:this.onArrowKey,clearSelectedIndex:this.clearSelectedIndex,possiblySelectFirstItem:this.possiblySelectFirstItem,positionMenu:this.positionMenu,onInit:({hideMenu:e,ariaExpand:t,ariaActiveDescendant:a,performSelection:n})=>{this.tabCompleteHideMenu=e,this.tabCompleteAriaExpand=t,this.tabCompleteAriaActiveDescendant=a,this.tabCompletePerformSelection=n},abortSearch:()=>{this.searchAbortController?.abort(),this.searchAbortController=null},skipAriaExpanded:t}}handleSelect({fromKeyboard:e=!1}={}){let{setUserHasSeenHelp:t,showAutocompleteHelpPref:a,clogger:n,teamId:r,viewContext:i,windowId:l,channelId:o,threadTs:s}=this.props,{results:c,matchText:d,selectedIndex:m}=this.state,u=e&&(0,p.A)(m)?0:m,h=c&&!(0,p.A)(u)?c[u]:void 0,_=this.completer?.getResultFrecencyId?.(h);if(_&&this.props.recordFrecencyEvent({id:_,text:d}),e&&a&&t(),!h)return;this.resultToAnnounce=h,this.completer?.onSelection?.({activeResult:h,channelId:o,threadTs:s,viewContext:i,windowId:l,selectedIndex:u});let f=e?$._n.Enter:$._n.Click;this.completer?.recordSelection?.({query:d,result:h,results:c,clogger:n,teamId:r,navigationMethod:this.navigationMethod,actionMethod:f}),this.navigationMethod=$.As.None}possiblySelectFirstItem(e){(0,p.A)(this.state.selectedIndex)?this.setState(()=>({selectedIndex:0}),()=>e?.()):e?.()}positionMenu(e,t={top:0,right:0,bottom:0,left:0,height:0,width:0}){let{menuPosition:a}=this.state;if(this.props.containerCustomBoundsFn||this.getAnchorToContainer()){let n=this.props.containerCustomBoundsFn?.(e,t)??t;if((0,h.A)(n,a))return;this.setState(()=>({menuPosition:n}));return}(0,_.A)(e)||(0,h.A)(e,a)||this.setState(()=>({menuPosition:e}))}processResults(e,t,a){let n,{logger:r,disallowedResults:i}=this.props,{matchOptions:l}=this.state;if(e!==this.searchInFlight){(0,tG.Fz)(e),r.info(ag,`ignoring stale search for ${e.length} char query`);return}(0,_.A)(t)&&(0,tG.Fz)(e),n=i?t.filter(e=>!e.id||!i.has(e.id)):t,l?.minScore&&(n=n.filter(e=>e?.modelScore>=l.minScore)),this.navigationMethod=$.As.None,this.setState(()=>({results:n}),()=>{this.announceSuggestionsExpanded(),a(n,e)})}search(e,t){let a,{channelId:n,threadTs:r,includeAllBroadcastKeywords:i,logger:l,isCanvas:o,experimentSearcherAbortControllerV2GroupOn:s}=this.props,{matchOptions:c}=this.state;this.setState(()=>({selectedIndex:void 0})),s&&(this.searchAbortController?.abort(),this.searchAbortController=new AbortController,a=this.searchAbortController.signal),this.completer?.search({query:e,channelId:n,isThread:!!r,threadTs:r,enableBroadcastKeywords:!this.props.excludeBroadcastKeywordMembers,includeAllBroadcastKeywords:i,enableUserGroups:!this.props.excludeUserGroupMembers,...c,allowedFileTypes:o?y.tH.ALL_CANVASES:y.tH.ALL_FILES,signal:a}).then(n=>{!a?.aborted&&(l.info(ag,`end search with ${e.length} char query`),(0,_.A)(n)&&(0,tG.Fz)(e),this.processResults(e,n,t),n&&n.promise&&n.promise.then(n=>{a?.aborted||this.processResults(e,n,t)}).catch(this.tabCompleteHideMenu))}).catch(this.tabCompleteHideMenu)}renderMenu(){let e,{channelId:t,className:a,threadTs:n,isCanvas:r,fileId:i,isWorkflowQuestionOption:l,includeAllBroadcastKeywords:o,onFeedbackClick:c}=this.props,{selectedIndex:d,matchText:m,results:u,canMentionAgent:p}=this.state;return this.completer?((0,f.A)(u)?.query===(0,t$.O)(m||"")&&(e=this.getMaybeStopAutocompleteMatchRenderTrace(m||"")),s.createElement(this.completer.menu,{channelId:t,threadTs:n,selectedIndex:d,results:u,onSelectedIndexChange:this.onSelectedIndexChange,onSelect:this.onSelect,onFirstResultMount:e,onFirstResultUpdate:e,className:a,isCanvas:r,matchText:m,fileId:i,isWorkflowQuestionOption:l,includeAllBroadcastKeywords:o,canMentionAgent:p,onFeedbackClick:c})):null}getAnchorToContainer(){return!!this.completer?.anchorToContainer||!!this.props.forceAnchorToContainer}render(){let{renderInput:e,position:t,fixedPosition:a,stickyPosition:n,zIndex:r,shouldCloseOnOverlayMouseDown:i,overlayClassName:l}=this.props,{isOpen:o,menuPosition:d}=this.state,m=this.getAnchorToContainer()?d?.width:void 0,u=a?ay:A.t0,p=m?{width:m,...u}:u,h=this.props.autocompleteOffsetX??(this.getAnchorToContainer()?0:-17),_=this.props.autocompleteOffsetY??("bottom"===t?7:-7);return s.createElement(s.Fragment,null,e({autocompleteConfig:this.autocompleteConfig,isOpen:o})??null,s.createElement(S.AM,{isOpen:o,position:t?`${t}-left`:"top-left",contentStyle:p,targetBounds:d||aA,offsetX:h,offsetY:_,allowanceX:20,zIndex:r||"menu",shouldObserveResize:!1,shouldFocusAfterRender:!1,shouldFade:!1,ariaHideApp:!1,tryOppositePosition:!0,stickyPosition:n,shouldCloseOnOverlayMouseDown:!!i,shouldPropagateOnClose:!!i,onClose:i?this.onClose:c.A,overlayClassName:l},this.renderMenu()||s.createElement("div",null)))}};aE.displayName="TextyAutocomplete";let aC=(0,tQ.N)((e,{forcePlainTextModeDisabled:t,channelId:a})=>{let n=(0,tT.qh)(e),r=!1;return n&&(r=(0,tT.Wg)(e,{tip:tM.ml.AtMention})),{highlightWords:(0,tZ.A)(e),isEmojiDisplayedAsText:(0,tH.P)(e),locale:(0,tj.Yp)(),userSkinTone:(0,tJ.ty)(e,"preferred_skin_tone"),showAutocompleteHelpPref:!!(0,tJ.ty)(e,"show_autocomplete_help"),clogger:(0,eT.eo)({state:e}),usePlainTextMode:!t&&!!(0,tJ.ty)(e,"plain_text_mode"),listsTextyAutocompleteEnabled:(0,tW.hk)(e),experimentCanvasAutocompleteDocumentGroupOn:"on"===(0,e5._Z)(e,"canvas_autocomplete_document"),experimentCanvasAiInlineCreationGroupOn:(0,el.c9)(e),teamId:(0,tb.JY)(e),logger:(0,eE.Ay)({state:e}),broadcastKeywordsEnabled:!!a&&(0,tc.A)(e,a),experimentFriendlyChannelNamesEnabled:(0,tV._E)(e),loadProgressiveDisclosureMegaphoneSpaceOnClose:r,experimentFeLinkTokenizationGroupOn:"on"===(0,e5._Z)(e,"fe_link_tokenization"),experimentAgentforceEnabled:(0,tB.mr)(e),isAgentFromChannelId:!!a&&(0,I.Hm)(e,a),experimentSearcherAbortControllerV2GroupOn:(0,ec.R0)(e)}},(e,{searchViewContext:t,canvasAiContext:a,excludePrivateChannelAutocomplete:n,privateChannelTeamIds:r})=>{let i=t&&`texty-autocomplete:${t}`,l=!!a,o=void 0!==n?!n:void 0;return{autocompleteChannels:({...t})=>e((0,t7.A)({searchViewContext:i,excludeAiExcluded:l,includePrivate:o,privateChannelTeamIds:r,...t})),autocompleteFiles:({...t})=>e(ae({searchViewContext:i,...t})),autocompleteEmoji:({...t})=>e((0,t9.A)({searchViewContext:i,...t})),autocompleteSlackFiles:({...t})=>e(an({searchViewContext:i,...t})),autocompleteMembers:({...t})=>e((0,at.A)({searchViewContext:i,...t})),autocompleteCommandsSearcherFlat:({...t})=>e((0,tq.rQ)({searchViewContext:i,...t})),autocompleteQuipShortcuts:(...t)=>e(aa(...t)),autocompleteCanvasAiSuggestions:({...t})=>e(t8({searchViewContext:i,canvasAiContext:a,...t})),recordFrecencyEvent:(...t)=>e((0,tY.L)(...t)),ensureChannelMembershipKnownForFirstNMembers:(...t)=>e(ac(...t)),setUserHasSeenHelp:()=>e((0,tX.AZ)({pref:"show_autocomplete_help",value:0})),workflowsTriggersTrip:(...t)=>e((0,a_.L)(...t)),executeCommandAutocompleteItem:({...t})=>e((0,tq.qT)({...t})),loadProgressiveDisclosureMegaphoneNotificationData:()=>e((0,af.iR)({event:{type:tw.jo.REQUEST_SPACES,spaces:[tw.xu.PROGRESSIVE_DISCLOSURE]}})),canMentionAgent:({...t})=>e(ah({...t})),forwardMessageToAnnouncerAPI:({...t})=>e((0,t0.rl)({...t})),announceTextyAutocompleteResults:({...t})=>e(t5({...t}))}})(aE)},0xc12d7108:(e,t,a)=>{"use strict";a.d(t,{As:()=>o,_n:()=>l,pm:()=>s});var n,r,i,l=((n={}).Click="click",n.Enter="enter",n),o=((r={}).Mouse="mouse",r.ArrowKeys="arrow_keys",r.None="none",r),s=((i={}).MEMBER="member",i.CHANNEL="channel",i.EMOJI="emoji",i.COMMAND="command",i.SHORTCUT="shortcut",i.AI_SUGGESTION="ai-suggestion",i.TERM="term",i.LIST="list",i.DOCUMENT="document",i.SLACK_FILE="slack_file",i.SEARCH_FILTER="search-filter",i)},0x18a5613e1:(e,t,a)=>{"use strict";a.d(t,{A:()=>buildPotentialMentionsDelta});var n=a(0x118cdcdea),r=a.n(n),i=a(0x3711e82d),l=a(0x45012309),o=a(0xa3534e17);function buildPotentialMentionsDelta(e,t,a){let n=0,s=!1,c=new(r()),d=(0,l.eo)();return e.forEach(e=>{let r=e.globalIndex-n;if(r>0&&c.retain(r),a&&"emoji"===e.type){c.retain(e.length),n=e.globalIndex+e.length;return}if(c.delete(e.length),"emoji"===e.type){let t={slackemoji:{text:e.label}};c.insert(t,{...e.formats})}else{let a=(0,o.A)(e.id,e.label,t);"UNVERIFIED"===e.id?d.track(i.EventId.MSG_AUTO_POTENTIAL_MENTION_CREATED,{}):d.track(i.EventId.MSG_AUTO_MENTION_CREATED,{}),c.insert(e.label,{...e.formats,slackmention:a})}s=!0,n=e.globalIndex+e.length}),{changes:c,hasReplacements:s}}},0x79442f6d:(e,t,a)=>{"use strict";a.d(t,{A:()=>createPotentialEmojiObject});var n=a(0xf8dd7f80),r=a(0x20fdda113);function createPotentialEmojiObject({globalIndex:e,results:t,matchLength:a,formats:i}){let l=t[0];return(0,n.getGenericLogger)().info("AUTOSLUG",`Creating emoji (${l.id})`),{id:l.id,label:`:${(0,r.Y)({name:l.name||""})}:`,globalIndex:e,length:a,formats:i,type:"emoji"}}},0x23a8b6a8b:(e,t,a)=>{"use strict";a.d(t,{A:()=>createPotentialMentionChannelObject});var n=a(0x1e2051844),r=a(0x1ee15af19),i=a(0xf8dd7f80),l=a(0x1ec69ee01),o=a(0x53f531a4);function createPotentialMentionChannelObject({globalIndex:e,results:t,matchLength:a,formats:s}){let c=(0,n.A)(t,e=>!(0,l.lo)(e)),d=(0,r.A)(t);if(!c&&!d)return null;let m=c||d;return(0,i.getGenericLogger)().info("AUTOSLUG",`Creating channel mention (${m?.id})`),{id:m?.id||"",label:`#${(0,o.j)(m)}`,globalIndex:e,length:a,formats:s,type:"mention"}}},0x7a131201:(e,t,a)=>{"use strict";a.d(t,{A:()=>createPotentialMentionObject});var n=a(0x20ef3966f),r=a(0x1595bdd0),i=a(0xe0376d2),l=a(0xb77a689a),o=a(0x1e2051844),s=a(0xf8dd7f80),c=a(0xe77b6eca),d=a(0x3d01f952),m=a(0xf5cf88c8);function createPotentialMentionObject({state:e,text:t,label:a,globalIndex:u,localIndex:p,results:h,matchLength:_,formats:f}){let b,g,y={id:"UNVERIFIED",label:a,globalIndex:u,length:a.length,formats:f,type:"mention"};if(1===h.length&&h[0].is_broadcast_keyword)return(0,s.getGenericLogger)().info("AUTOSLUG",`Creating broadcast keyword mention (${h[0].id})`),b=(0,c.KX)(h[0]),{id:h[0].id,label:b,globalIndex:u,length:_,formats:f,type:"mention"};let A=(0,n.A)(h,e=>(0,m.Pc)((0,c.KX)(e)));A=A.concat((0,n.A)(h,e=>(0,m.Pc)((0,c.KP)(e)))),(A=(0,r.A)((0,i.A)(A))).sort((e,t)=>((0,l.A)(t)?t.length:0)-((0,l.A)(e)?e.length:0));for(let n=0;n<A.length&&(g=A[n]||"",!(a.length>g.length));n+=1){let n=(0,m.Og)(g,t,p);if(n||h.length<=1){let r=h.filter((0,c.jE)(g));if((0,m.fN)(g,a)&&1===r.length&&(n||!r[0].is_usergroup))return(0,s.getGenericLogger)().info("AUTOSLUG",`Inserting real mention, only a single matching result (${r[0].id}). ${h.length} total results`),b=(0,c.KX)(r[0]),{id:r[0].id,label:b,globalIndex:u,length:1!==h.length||n?g.length:y.length,formats:f,type:"mention"};if((0,m.fN)(g,a)&&r.length>1){(0,s.getGenericLogger)().info("AUTOSLUG",`${r.length} matching results, trying to break tie using frecency`);let t=e?(0,d.Zh)(e,{query:a,list:r}):[];if(t&&t.length>1&&t[0].rawFrecencyScore-t[1].rawFrecencyScore>=30){let e=(0,o.A)(r,{id:t[0].id});return b=e?(0,c.KX)(e):"",(0,s.getGenericLogger)().info("AUTOSLUG",`Inserting real mention, tie was broken using frecency (${t[0].id}=${t[0].rawFrecencyScore};${t[1].id}=${t[1].rawFrecencyScore})`),{id:e?.id||"",label:b,globalIndex:u,length:1!==h.length||n?g.length:y.length,formats:f,type:"mention"}}}if(n)return(0,s.getGenericLogger)().info("AUTOSLUG",`Inserting maybe-mention mention, expanded mention to cover name (${h.length} total results)`),y.label=t.substr(p,g.length),y.length=g.length,y}}return(0,s.getGenericLogger)().info("AUTOSLUG",`Fallback: Inserting maybe-mention (${h.length} total results)`),y}},0x2023d94c1:(e,t,a)=>{"use strict";a.d(t,{A:()=>getPotentialMentionMatches});var n=a(0xb77a689a),r=a(0xec9d0658),i=a(0x14d2ae7bc),l=a(0x504b7e5),o=a(0x5a228fbb),s=a(0xa326966e),c=a(0xe7cb9732),d=a(0x222762a83),m=a(0x2398accc);let u=i.Nb.concat(["@","#","`","$","%","^","&","+","=","|",'"',"/"]),p=u.filter(e=>"."!==e).map(e=>`\\${e}`).join("|"),h=u.filter(e=>"_"!==e).map(e=>`\\${e}`).join("|"),_=RegExp(`(?:^|\\s)(?:[\\{|\\[|\\(|<|>|\\*|_|\\/|"|\u{201C}|\u{2018}|'|:]?)([@\uFF20].*?)(?=\\s|'s|\u{2018}s|\u{2019}s|\u{2026}|${p}|$)`,"g"),f=RegExp(`(?:^|\\s)(?:[\\{|\\[|\\(|<|>|\\*|_|\\/|"|\u{201C}|\u{2018}|'|:]?)([@\uFF20#\uFF03].*?)(?=\\s|'s|\u{2018}s|\u{2019}s|\u{2026}|${h}|$)`,"g"),b=RegExp(`[\\.|\\s|${p}]+$`),g=RegExp(`(${(0,r.A)().source})`,"g");function getPotentialMentionMatches(e,{useChannelTagging:t=!1}={}){if(!e)return[];let a=0,r=[],i=t?f:_;return(0,l.A)(e,(e,l)=>{if((0,c.A)(l)||!(0,m.A)(e)||(0,s.A)(e)||(0,d.Ay)(e)){a+=(0,o.A)(e);return}(0,n.A)(e.insert)&&e.insert.replace(i,(i,l,o)=>{let s=o,c=l,d=i.indexOf("@");d>0&&(s+=d);let m=i.indexOf("\uFF20");if(m>0&&(s+=m),t){let e=i.indexOf("#");e>0&&(s+=e);let t=i.indexOf("\uFF03");t>0&&(s+=t)}let u=l.length;c=l.replace(b,"");let p=t?c.replace(/^[@\uFF20#\uFF03]/,""):c.replace(/^[@\uFF20]/,"");p.length&&r.push({type:t&&["#","\uFF03"].includes(l.charAt(0))?"channel":"member",text:(0,n.A)(e.insert)?e.insert:"",matchLength:u,label:c,labelWithoutPrefix:p,localIndex:s,globalIndex:s+a})}),(0,n.A)(e.insert)&&e.insert.replace(g,(t,i,l,o)=>{let s=o,c=t.indexOf(":");c>0&&(s+=c);let d=i.length,m=i.replace(/:/g,"");if(!m.length)return;let u=/^:[0-9]+:$/.test(t),p=(0,n.A)(e.insert)?e.insert.substring(0,o):"",h=/(^|\s)[0-9]+$/.test(p);u&&h||r.push({type:"emoji",text:(0,n.A)(e.insert)?e.insert:"",matchLength:d,label:i,labelWithoutPrefix:m,localIndex:s,globalIndex:s+a})}),a+=(0,o.A)(e)}),r}},0xd925f8ca:(e,t,a)=>{"use strict";a.d(t,{A:()=>BaseTextyClass});var n=a(0x1e33662b),r=a.n(n),i=a(0x21f3c49e8),l=a(0x1feee1711),o=a(0x2416351a6),s=a(0xb77a689a),c=a(0xec1862de),d=a(0x1cbdfeceb),m=a(0x206c7a40f),u=a(0xb5e49867),p=a(0x18f2150ea),h=a(0x106809bc6),_=a(0xd4e00a1e),f=a(0x118cdcdea),b=a.n(f),g=a(0x4e47e388),y=a(0x62a17882),A=a(0x1daf4b9c),x=a(0x10e0f5452),E=a(0x3e6dd1df),C=a(0xe32a2cad),k=a(0x8cffd252),v=a(0x20bafd237),S=a(0x20b4dda68),I=a(0x25245e851),w=a(0x7efc6bfa);let T=S.Az-1;function getRelativeIndent(e,t,a){let n=0;e?.forEach(e=>{(0,I.A)(e)&&(n+=1)});let r=t?.indent||0,i=a?.indent||0,l=Math.min(r+i,T);return 2===n&&(l=i>=r?0:r),l}function convertDeltaToBlockFormat({delta:e,format:t,omitFinalBlockFormattingLine:a=!1}){let n=new(b());e?.eachLine((a,r)=>{if(n=n.concat(a),t?.list&&r?.list){let a=getRelativeIndent(e,t,r);n=n.concat(new(b())().insert(`
`,{...r,indent:a}))}else if(t?.blockquote&&r?.list){let a=getRelativeIndent(e,t,r);n=n.concat(new(b())().insert(`
`,{blockquote:!1,border:1,list:r.list,indent:a}))}else n=t?.blockquote&&r?.["code-block"]?n.concat(new(b())().insert(`
`,{blockquote:!1,border:1,"code-block":!0})):n.concat(new(b())().insert(`
`,t))}),t&&t["code-block"]&&(n=n.compose((0,w.A)(n)));let r=!0;if(t?.list||t?.blockquote){let e=0!==n.length()&&n.slice(n.length()-1)||new(b()),a=(0,v.A)(e?.ops),i=a?.attributes,{list:l,indent:o,border:s}=i||{},c=i?.["code-block"],d=t?.indent||0,m=l&&(0,p.A)(s)&&s>0,u=c&&(0,p.A)(s)&&s>0;r=!(l&&(0,p.A)(o)&&o>0&&o>d)&&!m&&!u}if(a&&r||!t){let e=n.length();n=n.slice(0,e-1)}return n}var N=a(0x52bf7626),M=a(0x1ff9f7c84),R=a(0xd40f768d),P=a(0x4e9c6d0d);let L="TEXTY",O=["code-block","blockquote","list","indent","border","header"],addAttributes=(e,t)=>{!e||(0,i.A)(t)||Object.keys(t).forEach(a=>{let n=t[a];(0,l.A)(n)||(0,o.A)(n)||e.setAttribute(a,n)})},hideElFromScreenReaders=e=>{e&&addAttributes(e,{"aria-hidden":!0,tabindex:-1})},buildAutoSlugOptions=(e,t)=>(!!t.forceAutoslugginEnabled||!t.singleLineInput)&&!!t&&!!t.modules&&!!t.modules.tabcomplete&&{getTeamId:t.getTeamId||d.A,getChannelId:t.getChannelId||d.A,enableBroadcastKeywords:t.enableBroadcastKeywords,isAutocompleteOpen:t.isAutocompleteOpen,includeAllBroadcastKeywords:t.includeAllBroadcastKeywords,getUserHighlightWords:t.getUserHighlightWords,promiseToSearchMembers:t.promiseToSearchMembers,promiseToSearchChannels:t.promiseToSearchChannels,promiseToSearchEmoji:t.promiseToSearchEmoji,onMentionReplace:t.onMentionReplace||d.A,useWysiwyg:e.useWysiwyg,usePlainTextMode:t.usePlainTextMode,useChannelTagging:t.useChannelTagging,inlineEmojiIsEnabled:t.inlineEmojiIsEnabled};let BaseTextyClass=class BaseTextyClass{isInComposition;lastSelection;Quill;quill;element;placeholder;nextTextChangeCallbackSource;useWysiwyg;window;options;Parchment;constructor(e,t,a){if(!e||"DIV"!==e.tagName)throw Error('Texty: param "element" must be <div> element');this.options=(0,m.A)(t,l.A);const n=this.options.isMultiverseQuillEnabled&&this.options.window?this.options.window:window;this.Quill=a(n),this.Parchment=this.Quill.import("parchment"),this.onInputClick=this.onInputClick.bind(this),this.onRootFocus=this.onRootFocus.bind(this),this.onRootBlur=this.onRootBlur.bind(this),this.onRootFocusOut=this.onRootFocusOut.bind(this),this.onResize=(0,g.A)(this.onResize.bind(this),50),this.onCompositionStart=this.onCompositionStart.bind(this),this.onCompositionEnd=this.onCompositionEnd.bind(this),this.onScrollOptimize=this.onScrollOptimize.bind(this),this.window=n,this.element=e,this.placeholder=null,this.lastSelection={index:0,length:0},this.setLastSelection({index:0,length:0}),this.nextTextChangeCallbackSource=null,this.isInComposition=!1,this.useWysiwyg=this.options.useWysiwyg,this.options.singleLineInput&&e.classList.add("texty_single_line_input"),this.options.showTextyTooltips||e.classList.add("texty_hide_tooltips"),this.options.className&&this.options.className.split(" ").forEach(t=>{e.classList.add(t)});const i=["slackemoji","unlink"];if(this.options.modules?.slacksearch&&(i.push("slacksearchtokenmodifier"),i.push("slacksearchtokenvalue")),this.options.modules?.slackmention&&(i.push("slackmention"),this.options.isSearchFilterFormatEnabled&&(i.push("slacksearchfilter"),i.push("bold"))),this.options.isSlugsEnabled&&i.push("slackslug"),this.options.modules?.slackhorizontalrule&&i.push("slackhorizontalrule"),this.options.useWorkflowTokens&&i.push("workflowtoken"),this.options.modules?.canvasvariable&&i.push("canvasvariable"),this.useWysiwyg&&!this.options.usePlainTextMode){const{formats:e}=(0,x.A)({useWorkflowTokens:!!t.useWorkflowTokens,useExpandedRichText:t.useExpandedRichText,isUnderlineEnabled:!!t.isUnderlineEnabled});if(e.forEach(e=>{["h1","h2","h3"].includes(e)?i.includes("header")||i.push("header"):["bullet-list","ordered-list","check-list"].includes(e)?i.includes("list")||i.push("list"):i.push(e)}),i.push("indent"),!this.options.modules?.slackdocslist&&this.options.nestedListDepth){const e=this.options.nestedListDepth;e&&(this.Quill.import("formats/indent").whitelist=(0,u.A)(1,e))}}const o=this.Quill;this.quill=new o(e,{formats:i,scrollingContainer:this.options.scrollingContainerSelector,modules:{clipboard:((e,t)=>t&&t.modules&&t.modules.clipboard?(0,c.A)({onPasted:e.setLastSelection.bind(e),logger:t.logger,getUserHighlightWords:t.getUserHighlightWords,useWysiwyg:e.useWysiwyg,usePlainTextMode:t.usePlainTextMode,texty:e,teamId:t.getTeamId?t.getTeamId():"",useChannelTagging:t.useChannelTagging,isSlugsEnabled:t.isSlugsEnabled??!1,isSlugsStringsEnabled:t.isSlugsStringsEnabled??!1,isSlugsKeyboardAlternativeEnabled:t.isSlugsKeyboardAlternativeEnabled??!1,screenreaderAnnouncement:t?.screenreaderAnnouncement},t.modules.clipboard):{})(this,this.options),keyboard:{...this.options.modules?.keyboard,onEnterExternal:this.options.onEnter,onBackspaceExternal:this.options.onBackspace,onEscapeExternal:this.options.onEscape,onTabExternal:this.options.onTab,texty:this,singleLineInput:this.options.singleLineInput,inlineEmojiIsEnabled:this.options.inlineEmojiIsEnabled,teamId:t.getTeamId?t.getTeamId():"",useWysiwyg:this.useWysiwyg,usePlainTextMode:this.options.usePlainTextMode,showLinkForm:this.options.showLinkForm,useExpandedRichText:this.options.useExpandedRichText},tabcomplete:((e,t)=>!!t&&!!t.modules&&!!t.modules.tabcomplete&&(0,c.A)({logger:t.logger,tooltipIsShowing:t.modules.tabcomplete.tooltipIsShowing||d.A,tooltipShow:t.modules.tabcomplete.tooltipShow||d.A,tooltipHide:t.modules.tabcomplete.tooltipHide||d.A,useWysiwyg:e.useWysiwyg&&!t.usePlainTextMode,teamId:t.getTeamId?t.getTeamId():""},t.modules.tabcomplete))(this,this.options),textsubstitutions:((e,t)=>!!t&&!!t.modules&&!!t.modules.textsubstitutions&&((0,C.Ay)(),{useWysiwyg:e.useWysiwyg,usePlainTextMode:t.usePlainTextMode,isInComposition:()=>e.isInComposition,...t.modules.textsubstitutions}))(this,this.options),slackmention:(e=>!!e&&!!e.modules&&!!e.modules.slackmention&&{isSlugsKeyboardAlternativeEnabled:e.isSlugsKeyboardAlternativeEnabled??!1,isSlugsEnabled:e.isSlugsEnabled??!1,screenreaderAnnouncement:e?.screenreaderAnnouncement})(this.options),slackslug:(e=>!!e&&!!e.modules&&!!e.modules.slackslug&&{teamId:e.getTeamId?.()??"",isSlugsEnabled:e.isSlugsEnabled??!1,isSlugsStringsEnabled:e.isSlugsStringsEnabled??!1,isSlugTruncatedUrlsEnabled:e.isSlugTruncatedUrlsEnabled??!1,isSlugsKeyboardAlternativeEnabled:e.isSlugsKeyboardAlternativeEnabled??!1,screenreaderAnnouncement:e?.screenreaderAnnouncement})(this.options),slackemoji:((e,t)=>!!t&&{isJumbomojiEnabled:t.isJumbomojiEnabled,inlineEmojiIsEnabled:t.inlineEmojiIsEnabled,convertEmoticonsIsEnabled:t.convertEmoticonsIsEnabled,getEmojiNames:t.getEmojiNames,getLocale:t.getLocale,replaceNativeEmoji:t.replaceNativeEmoji,updateJumbomojiClass:t=>{let a=e.element.classList.contains("texty_emoji_only");t&&!a&&e.element.classList.add("texty_emoji_only"),!t&&a&&e.element.classList.remove("texty_emoji_only")},safeToReplaceEmoji:()=>{let t=e.quill.getModule("tabcomplete");return!t||!t.isShowing()},teamId:t.getTeamId?t.getTeamId():"",useWysiwyg:e.useWysiwyg,usePlainTextMode:t.usePlainTextMode})(this,this.options),slacklink:((e,t)=>e.useWysiwyg?{linkifyOnSpace:e.useWysiwyg,teamId:t.getTeamId?t.getTeamId():""}:null)(this,this.options),slackdocslist:this.options.modules?.slackdocslist,slackmarkdown:((e,t,a)=>e.useWysiwyg&&!t.usePlainTextMode?{convertHeaders:a.includes("header"),convertHorizontalRule:a.includes("slackhorizontalrule"),teamId:t.getTeamId?t.getTeamId():""}:null)(this,this.options,i),slackhorizontalrule:this.options.modules?.slackhorizontalrule,textchangequeue:((e,t)=>!!t&&{useWysiwyg:e.useWysiwyg,usePlainTextMode:t.usePlainTextMode,getTextChangeModules:()=>{let a=[];return e.quill&&(e.quill.options.modules.textsanitization&&a.push(e.quill.getModule("textsanitization")),e.useWysiwyg&&a.push(e.quill.getModule("slacklink")),e.quill.options.modules.slackmention&&a.push(e.quill.getModule("slackmention")),buildAutoSlugOptions(e,t)&&a.push(e.quill.getModule("autoslug")),e.quill.options.modules.slackemoji&&a.push(e.quill.getModule("slackemoji")),e.useWysiwyg&&!t.usePlainTextMode&&a.push(e.quill.getModule("slackmarkdown")),e.quill.options.modules.textsubstitutions&&a.push(e.quill.getModule("textsubstitutions")),e.quill.options.modules.cleanembedsincode&&a.push(e.quill.getModule("cleanembedsincode")),e.quill.options.modules.cleanemptyinput&&a.push(e.quill.getModule("cleanemptyinput")),e.quill.options.modules.cleanworkflowtokens&&a.push(e.quill.getModule("cleanworkflowtokens")),e.quill.options.modules.slackslug&&a.push(e.quill.getModule("slackslug"))),a},teamId:t.getTeamId?t.getTeamId():""})(this,this.options),textsanitization:{stripNewlines:this.options.singleLineInput},autoslug:buildAutoSlugOptions(this,this.options),workflowtoken:this.options.useWorkflowTokens?{onClick:this.options.workflowTokenClick}:null,cleanembedsincode:this.options.modules?.cleanembedsincode,cleanemptyinput:this.options.modules?.cleanemptyinput,cleanworkflowtokens:this.options.modules?.cleanworkflowtokens,canvasvariable:this.options.modules?.canvasvariable}}),((e,t,a,n)=>{e.element.addEventListener("click",e.onInputClick),t.root.addEventListener("focus",e.onRootFocus),t.root.addEventListener("blur",e.onRootBlur),t.root.addEventListener("compositionstart",e.onCompositionStart),t.root.addEventListener("compositionend",e.onCompositionEnd),r().msie&&t.root.addEventListener("focusout",e.onRootFocusOut),t.on("selection-change",t=>{t&&e.setLastSelection(t),e.hasFocus()?e.onFocus():e.onBlur(),a.onSelectionChange&&a.onSelectionChange(t)}),(e.useWysiwyg||a.usePlainTextMode)&&n.addEventListener("resize",e.onResize),t.on("text-change",(n,r,i)=>{e.setLastSelection();let l=t.getLength()>1&&1>=r.length();if(l&&e.enforceEmptyStateConsistency(),a.onTextChange){let t=e.nextTextChangeCallbackSource||i;e.nextTextChangeCallbackSource=null,a.onTextChange(t,l,e.isInComposition)}}),t.on((0,E.A)(n).events.SCROLL_OPTIMIZE,e.onScrollOptimize)})(this,this.quill,this.options,this.window),((e,t)=>{let{id:a,getTeamId:n,singleLineInput:r,tabIndex:i,role:l,ariaLabel:o,ariaLabelledBy:c,ariaDescribedBy:d,ariaControls:m,ariaExpanded:u,ariaAutocomplete:p,ariaActiveDescendant:h,inputMetricBoundary:_}=t,f={id:a,dir:"auto",role:l||"textbox",tabindex:i,"data-qa":"texty_input","data-team-id":n?n():"","data-input-metric-boundary":_,"aria-label":o,"aria-labelledby":c,"aria-describedby":d,"aria-multiline":!r},b=(0,y.cX)()&&(0,y.X5)()===y.h5.SAFARI,g="combobox"===l;(b||g)&&(f[b?"aria-owns":"aria-controls"]=m),g&&(f["aria-expanded"]=u),f["aria-autocomplete"]=p;let A=(0,s.A)(h)&&h.length?h:void 0;f["aria-activedescendant"]=A,addAttributes(e.root,f)})(this.quill,this.options),this.setPlaceholder(this.options.placeholder),hideElFromScreenReaders(this.quill.clipboard.container)}unload(){this.getModules().forEach(e=>{e.unload&&e.unload()}),this.element.removeEventListener("click",this.onInputClick),this.quill.root.removeEventListener("focus",this.onRootFocus),this.quill.root.removeEventListener("blur",this.onRootBlur),this.quill.root.removeEventListener("compositionstart",this.onCompositionStart),this.quill.root.removeEventListener("compositionend",this.onCompositionEnd),this.window.removeEventListener("resize",this.onResize),r().msie&&this.quill.root.removeEventListener("focusout",this.onRootFocusOut),this.quill.off(this.Quill.events.SCROLL_OPTIMIZE,this.onScrollOptimize)}onCompositionStart(){this.isInComposition=!0}onCompositionEnd(){this.isInComposition=!1,this.options.onCompositionEnd&&this.options.onCompositionEnd()}onScrollOptimize(){this.options.onScrollOptimize&&this.options.onScrollOptimize()}onResize(){this.options.onResize&&this.options.onResize()}onInputClick(e){this.maybeHandleLinkClick(e),this.quill.hasFocus()||this.quill.focus({preventScroll:!0})}onRootFocus(e){this.onFocus(e)}onRootBlur(e){if(this.quill.hasFocus())return;let t=this.quill.getModule("tabcomplete");t&&t.hideAndReset(),this.onBlur(e)}onRootFocusOut({relatedTarget:e}){e&&e!==this.window.document.body&&e!==this.window.document&&setTimeout(()=>{this.window.document.activeElement!==e&&e.focus({preventScroll:!0})},0)}onFocus(e){if(!this.element.classList.contains("focus")&&(this.element.classList.add("focus"),this.options.onFocus&&this.options.onFocus(e)),this.options.allowsCompleteOnEmptyStateFocus?.()&&this.isEmpty()&&this.quill.getSelection()){let e=this.quill.getModule("tabcomplete");e&&e.maybeCompleteAtCursor("user")}}onBlur(e){this.element.classList.contains("focus")&&(this.element.classList.remove("focus"),this.options.onBlur&&this.options.onBlur(e))}maybeHandleLinkClick(e){if(!this.options.onLinkClick)return;let t=e.target.closest("a");if(!t||!this.quill.root.contains(t))return;let a=t.getBoundingClientRect(),n=e.x-a.left,r=a.right-e.x;if(a.width>=20&&n<5||a.width>=20&&r<5)return;let i=this.Parchment.find(e.target).offset(this.quill.scroll),l=this.quill.getContents(i,1);if(1===l.ops.length&&(0,M.A)(l.ops[0]))return;let o=(0,k.A)(this.quill.getContents(),{index:i+1,length:0},this.quill.getFormat(i+1,0)),s=this.quill.getFormat(o),c=this.quill.getContents(o.index,o.length);this.options.onLinkClick(e.target,s.link,c,o)}enable(){this.quill.enable(),this.element.querySelector(".ql-editor")?.setAttribute("tabindex","0")}disable(){this.quill.disable(),this.blur(),this.element.querySelector(".ql-editor")?.setAttribute("tabindex","-1")}isEnabled(){return this.quill.isEnabled()}focus(){this.isEnabled()&&this.quill.focus({preventScroll:!0})}selectAll(){this.setSelection(0,this.getLength())}blur(){this.quill.blur()}hasFocus(){return this.quill&&this.quill.hasFocus()}getContents(){return this.quill?{contents:this.quill.getContents().ops}:{contents:[]}}getDelta(){return this.quill?.getContents()||new(b())}setContents(e,{source:t="api"}={}){this.nextTextChangeCallbackSource=t,this.quill.setContents(new(b())(e?.contents),t),this.hasFocus()&&this.quill.setSelection(this.quill.getLength(),0);let a=this.quill.getModule("autoslug");a&&a.clearSearchCache()}prependContents(e){let t=new(b())(e.contents).concat(new(b())(this.quill.getContents()));return this.setContents({contents:t.ops})}maybeTriggerSlashCommandsAutocomplete(){if(this.quill.focus({preventScroll:!0}),!this.quill.getSelection())return;let e=this.getBlockFormat();if(!this.isEmpty()||!(0,i.A)(e))return;let t=new(b())().insert("/");this.quill.updateContents(t,"user"),setTimeout(()=>{this.quill.setSelection(1,0,"user"),this.setSelectionAtEnd()},0)}maybeTriggerMentionAutocomplete(){this.quill.focus({preventScroll:!0});let e=this.quill.getSelection();if(!e)return void this.options.logger?.warn(L,"trying to trigger mention autocomplete but there is no range");let t=this.quill.getFormat(e.index-1,1),a=this.quill.getFormat(e.index,1),n=this.quill.getLength()-1;if(e&&e.index<n&&t.slackmention&&a.slackmention)return;let r=this.getFormats()||{},i=this.quill.getText(e.index-1,1),l=((e,t,{formats:a}={})=>{let n="@",r=e.index;return"@"===t?r-=1:t&&" "!==t&&(n=` ${n}`),new(b())().retain(r).delete(e.index-r).delete(e.length).insert(n,a)})(e,i,{formats:r});this.quill.updateContents(l,"user");let o=this.quill.getLength()-1;this.quill.setSelection(e.index+(o-n),0,"user");let s=this.quill.getModule("tabcomplete");s&&s.maybeCompleteAtCursor("user")}getTextForRange(e,t){return this.quill.getText(e,t)}getContentsForRange(e,t){return this.quill.getContents(e,t)}getLineAtCursor(){let e,t=this.quill.getContents(),a=this.getSelection();if(!t||!a)return null;let n=a.index||0,r=0;return t.eachLine(t=>{if(e)return;let a=t&&t.ops,i=(0,N.A)(a,{replaceLinks:!0,replaceCode:!0,embedReplacement:"a"}),l=r+(i?i.length:0)+1;n>=r&&n<l&&(e=t),r=l}),e}getText(){return this.quill.getText().replace(/\n$/,"")}setText(e){e?(this.nextTextChangeCallbackSource="api",this.quill.setText(e),this.hasFocus()&&this.quill.setSelection(this.quill.getLength(),0)):this.clear()}insertText(e,t,a=!0){let n=e;if(!(0,p.A)(n))return void this.options.logger?.warn(L,"no specified index");let r=this.quill.getLength()-1;n=(0,h.A)(n,0,r),t&&this.quill.insertText(n,t,"user"),this.setLastSelection({index:n+t.length,length:0}),this.hasFocus()?this.quill.setSelection(this.lastSelection):a&&this.quill.setSelection(this.lastSelection,0,"silent")}insertTextAtCursor(e,t=!0){(0,A.A)()?this.options.logger?.warn(L,"do not call insertTextAtCursor from modern. use insertContentsAtCursor"):(this.lastSelection.length&&this.quill.deleteText(this.lastSelection),this.insertText(this.lastSelection.index,e,t))}insertContentsAtCursor(e,t=!0,a="user",{matchBlockFormat:n=!1}={}){let r=new(b())(e.contents);if(n){let e=this.getBlockFormat();e&&(r=convertDeltaToBlockFormat({delta:r,format:e,omitFinalBlockFormattingLine:!0}))}let i=new(b())().retain(this.lastSelection.index).delete(this.lastSelection.length).concat(r),l=this.lastSelection.index+r.length();this.setLastSelection({index:l,length:0}),this.quill.updateContents(i,a),this.hasFocus()?this.quill.setSelection(l,0,a):t&&this.quill.setSelection(l,0,a)}updateContents(e){let t=new(b())(e.contents);this.quill.updateContents(t,"api")}getFormats(e){let t=e;return(0,p.A)(t)||(t=this.lastSelection.index),this.quill.getFormat(t,0)}getBlockFormat(e){let t=this.getFormats(e);if(!t)return null;let a=(0,_.A)(t,O);return(0,i.A)(a)?null:a}clear(e={}){this.setLastSelection({index:0,length:0});let t=e.is_silent?"silent":"api";this.setContents({contents:new(b())().insert(`
`)},{source:t});let a=this.quill.getModule("autoslug");a&&a.clearSearchCache()}refreshJumbomoji(){this.quill.getModule("slackemoji").toggleJumbomoji(this.quill.getContents())}refreshContents(e){this.quill.setContents(e.contents,"silent")}getPlaceholder(){return this.placeholder?this.placeholder.innerHTML:""}setPlaceholder(e){this.placeholder||(this.placeholder=this.quill.addContainer("ql-placeholder"),hideElFromScreenReaders(this.placeholder)),e&&this.placeholder?this.placeholder.innerHTML=e:this.placeholder&&(this.placeholder.innerHTML="")}setAriaLabel(e){let t=this.quill.root;e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}setAriaLabelledBy(e){let t=this.quill.root;e?t.setAttribute("aria-labelledby",e):t.removeAttribute("aria-labelledby")}setAriaDescribedBy(e){let t=this.quill.root;e?t.setAttribute("aria-describedby",e):t.removeAttribute("aria-describedby")}setAriaInvalid(e){let t=this.quill.root;e?t.setAttribute("aria-invalid",e):t.removeAttribute("aria-invalid")}setAriaExpanded(e){this.quill.root.setAttribute("aria-expanded",e?"true":"false")}setActiveDescendant(e){let t=this.quill.root;e?t.setAttribute("aria-activedescendant",e):t.removeAttribute("aria-activedescendant")}getSelection(){return!this.hasFocus()&&this.lastSelection?this.lastSelection:this.quill.getSelection()}getBounds(e,t){return this.quill.getBounds(e,t)}getFormat(e){return e?this.quill.getFormat(e):this.quill.getFormat(this.lastSelection)}setSelection(e,t=0){if(!this.isEnabled())return!1;let a=e,n=t;if(!(0,p.A)(a)&&!(0,p.A)(n))return!1;let r=this.quill.getLength()-1;a=(0,h.A)(a,0,r),n=(0,h.A)(n,0,r-a);try{return this.quill.setSelection(a,n),!0}catch(e){return this.options.logger?.error(L,`Failed to set selection (${e})`),e instanceof Error&&e.stack&&this.options.logger?.error(L,e.stack),!1}}setSelectionAtEnd(){let e=this.getLength();if(this.setSelection(e,0)){let e=this.element.querySelector(".ql-editor");e&&(e.scrollLeft=1e4)}}isEmpty(){return 1>=this.quill.getLength()}getLength(){return this.quill.getLength()-1}isCursorInPreBlock(){let e=this.quill.getSelection();if(!e)return!1;if(this.useWysiwyg&&!this.options.usePlainTextMode){let t=this.quill.getFormat(e);return!!(t&&t["code-block"])}let t=this.quill.getText(0,e.index+e.length);return(0,P.A)(t)}isIndexInCode(e){let t=this.quill.getText(0,e);return(0,R.A)(t)}deleteSelection(){let e=this.quill.getSelection();e&&e.length&&(this.quill.deleteText(e.index,e.length),this.quill.setSelection(e.index))}deleteText(e,t){this.quill.deleteText(e,t)}clearHistory(){this.quill.history.clear()}setLastSelection(e){e?this.lastSelection=e:this.isEmpty()?this.lastSelection={index:0,length:0}:this.lastSelection=this.quill.getSelection()||this.lastSelection}getModules(){let e=[];return Object.keys(this.quill.options.modules).forEach(t=>{let a=this.quill.getModule(t);a&&e.push(a)}),e}enforceEmptyStateConsistency(){this.placeholder&&(this.placeholder.offsetHeight,this.placeholder.style.transform="translateZ(0)",this.placeholder.style.transform="")}}},0x7b9828a4:(e,t,a)=>{"use strict";a.d(t,{A:()=>CanvasTextyClass});var n=a(0xd925f8ca),r=a(0x3e6dd1df),i=a(0x13c4df715),l=a(0x41b5bf1),o=a(0x2adeea74),s=a(0x778369d5),c=a(0x224f7f0e9);function getSlackDocsListFormat(e=window){let t=(0,r.A)(e),a=t.import("parchment"),n=t.import("blots/block"),i=t.import("blots/inline"),l=t.import("blots/container"),o=class extends i{constructor(e){super(e),e.addEventListener("keydown",t=>{t&&t.keyCode===c.UQ&&this.moveCursorLeft(t,e),t&&t.keyCode===c.LE&&this.moveCursorRight(t,e),t&&t.keyCode===c.n6&&this.moveCursorDown(t,e),t&&t.keyCode===c.i7&&this.moveCursorUp(t,e),t&&t.keyCode===c.I6&&this.checkUncheck(t,e),t&&t.keyCode===c.wn&&this.onTab(t,e),t.preventDefault()})}checkUncheck(e,a){e.preventDefault(),e.stopPropagation(),t.find(a.closest(".ql-editor")?.parentNode).isEnabled()&&(e.target?.focus(),document.activeElement?.click())}moveCursorLeft(e,a){let n=t.find(a.closest(".ql-editor")?.parentNode),r=n.getSelection();n.isEnabled()&&r&&r.index>0&&setTimeout(()=>{n.setSelection(r.index-1,r.length)},0)}moveCursorRight(e,a){let n=t.find(a.closest(".ql-editor")?.parentNode),r=n.getSelection();n.isEnabled()&&r&&r.index>=0&&setTimeout(()=>{n.setSelection(r.index,r.length)},0)}moveCursorDown(e,a){let n=t.find(a.closest(".ql-editor")?.parentNode),r=n.getSelection();if(n.isEnabled()){let e=n.getLine(r.index)[0];if(e&&e.domNode){let t=e.next,a=e.parent;if(t){let e=t.domNode.querySelector(".slack-docs-list-item-checkbox");if(e){let a=n.getIndex(t);return setTimeout(()=>{n.setSelection(a,0),e.focus()},0),!1}}else{let e;if(a&&a.next&&a.next.children&&a.next.children.head&&a.next.children.head.domNode&&a.next.children.head.domNode.querySelector&&(e=a.next.children.head.domNode.querySelector(".slack-docs-list-item-checkbox")),e){let t=n.getIndex(a.next);return setTimeout(()=>{n.setSelection(t,0),e.focus()},0),!1}let t=n.getSelection();t&&n.setSelection(t.index,t.length)}}}return!0}moveCursorUp(e,a){let n=t.find(a.closest(".ql-editor")?.parentNode),r=n.getSelection();if(n.isEnabled()){let e=n.getLine(r.index)[0];if(e&&e.domNode){let t=e.prev,a=e.parent;if(t){let e=t.domNode.querySelector(".slack-docs-list-item-checkbox");if(e){let a=n.getIndex(t);return setTimeout(()=>{n.setSelection(a,0),e.focus()},0),!1}}else{let e;if(a&&a.prev&&a.prev.children&&a.prev.children.tail&&a.prev.children.tail.domNode&&a.prev.children.tail.domNode.querySelector&&(e=a.prev.children.tail.domNode.querySelector(".slack-docs-list-item-checkbox")),e){let t=n.getIndex(a.prev.children.tail);return setTimeout(()=>{n.setSelection(t,0),e.focus()},0),!1}let t=n.getSelection();t&&t.index&&t.index-1>=0&&n.setSelection(t.index-1,t.length)}}}return!0}onTab(e,a){let n=document.activeElement;if(n?.classList.contains("slack-docs-list-item-checkbox")){let r=t.find(a.closest(".ql-editor")?.parentNode);if(r.isEnabled()){let t=r.getSelection(),a=r.getFormat(t),i=parseInt(a.indent||0,10),l="+1"==(e.shiftKey?"-1":"+1")?1:-1;return"rtl"===a.direction&&(l*=-1),r.format("indent",i+l,"user"),n.focus(),!1}}return!0}};o.blotName="slack-docs-list-item-checkbox",o.tagName="SLACKDOCSLISTITEMCHECKBOX",t.register(o,!0);let s=class extends n{static formats(e){return e.tagName===this.tagName?void 0:super.formats(e)}format(e,t){e!==d.blotName||t?super.format(e,t):this.replaceWith(a.create(this.statics.scope))}remove(){null===this.prev&&null===this.next?this.parent.remove():super.remove()}replaceWith(e,t){return(this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName)?(this.parent.replaceWith(e,t),this):(this.parent.unwrap(),super.replaceWith(e,t))}};s.blotName="list-item",s.tagName="LI";let d=class extends l{static create(e){let t=super.create("ordered"===e?"OL":"UL");return("checked"===e||"unchecked"===e)&&t.setAttribute("data-checked","checked"===e),t}static formats(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}constructor(e){super(e),e.addEventListener("click",t=>this.checkUncheck(t,e))}checkUncheck(e,n){if(e&&e.target&&e.target.tagName&&"SLACKDOCSLISTITEMCHECKBOX"!==e.target.tagName)return;e.preventDefault(),e.stopPropagation();let r=t.find(n.closest(".ql-editor")?.parentNode);if(r.isEnabled()){let t=e.target.parentNode.parentNode,i=e.target.parentNode;if(t!==n)return;let l=this.statics.formats(n),o=a.find(i);"checked"===l?(o.format("list","unchecked"),e.target.setAttribute("aria-checked","false")):"unchecked"===l&&(o.format("list","checked"),e.target.setAttribute("aria-checked","true"));let s=r.getIndex(o);r.setSelection(s,0),setTimeout(()=>{e.target.focus()})}}format(e,t){this.children.length>0&&this.children.tail.format(e,t)}formats(){return{[this.statics.blotName]:this.statics.formats(this.domNode)}}insertBefore(e,t){let n;e instanceof s&&super.insertBefore(e,t),e&&e.parent&&e.parent.domNode&&e.parent.domNode.dataset&&e.parent.domNode.dataset.checked&&("true"===e.parent.domNode.dataset.checked||"false"===e.parent.domNode.dataset.checked)&&(e.domNode.querySelectorAll(".slack-docs-list-item-checkbox").length||((n=a.create("slack-docs-list-item-checkbox")).domNode.setAttribute("role","checkbox"),"true"===e.parent.domNode.dataset.checked?n.domNode.setAttribute("aria-checked","true"):n.domNode.setAttribute("aria-checked","false"),n.domNode.setAttribute("tabindex","-1"),n.domNode.classList.add("slack-docs-list-item-checkbox"),e.domNode.prepend(n.domNode)))}optimize(){super.optimize();let e=this.next;null!=e&&e.prev===this&&e.statics.blotName===this.statics.blotName&&e.domNode.tagName===this.domNode.tagName&&e.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(e.moveChildren(this),e.remove())}replace(e){if(e.statics.blotName!==this.statics.blotName){let t=a.create(this.statics.defaultChild);e.moveChildren(t),this.appendChild(t)}super.replace(e)}};return d.blotName="list",d.scope=a.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[s],{SlackDocsListItem:s,SlackDocsList:d}}var d=a(0x1fde915f3),m=a(0x72c7aa2d),u=a(0xe83be35f),p=a(0x243985139),h=a(0xe48c5ed1),_=a(0xa2e0ef91),f=a(0x1d62f3e69),b=a(0xc526e002),g=a(0x1feb5b316),y=a(0x992a1f63),A=a(0x16a4ac024),x=a(0x21a39214),E=a(0x1f28aba72),C=a(0x93c88edd),k=a(0xb562d18d),v=a(0x1117ab7e4),S=a(0x130405be8),I=a(0x1c94e1914),w=a(0xadfc1247),T=a(0x215b853f5),N=a(0x66ac0b5a),M=a(0xd3a4af01),R=a(0x196f86498),P=a(0xfd55fa83),L=a(0x218d4970c);let O=new WeakMap;function initQuill(e){let t=(0,r.A)(e);if(O.get(t))return t;let{SlackDocsList:a,SlackDocsListItem:n}=getSlackDocsListFormat(e);t.register({"modules/tabcomplete":(0,N.A)(e),"modules/textsubstitutions":(0,P.A)(e),"modules/cleanembedsincode":(0,y.A)(e),"modules/cleanemptyinput":(0,A.A)(e),"modules/clipboard":(0,E.Ay)(e),"modules/keyboard":(0,S.A)(e),"modules/slackmention":(0,T.A)(e),"modules/slackemoji":(0,k.A)(e),"modules/textchangequeue":(0,M.A)(e),"modules/textsanitization":(0,R.A)(e),"modules/autoslug":(0,b.A)(e),"modules/slacklink":(0,I.A)(e),"modules/slackmarkdown":(0,w.A)(e),"modules/slackhorizontalrule":(0,v.A)(e),"modules/workflowtoken":(0,L.A)(e),"modules/cleanworkflowtokens":(0,x.Ay)(e),"modules/slackdocslist":(0,C.A)(e),"modules/canvasvariable":(0,g.A)(e),"formats/slacksearchtokenmodifier":(0,p.A)(e),"formats/slacksearchtokenvalue":(0,h.A)(e),"formats/slackmention":(0,u.A)(e),"formats/slackemoji":(0,d.A)(e),"formats/unlink":(0,o.A)(e),"formats/slackhorizontalrule":(0,m.A)(e),"formats/workflowtoken":(0,f.Gs)(e),"formats/strike":(0,_.A)(e),"formats/border":(0,s.Ay)(e),"formats/list":a,"formats/list/item":n,"formats/canvasvariable":(0,i.Ay)(e)},!0);let{CodeBlock:c}=(0,l.Ay)(e),D=t.import("blots/inline"),F=t.import("formats/bold"),U=t.import("formats/italic"),B=t.import("formats/strike"),H=t.import("formats/code"),W=t.import("formats/link"),V=t.import("formats/unlink"),G=t.import("formats/slackemoji"),q=t.import("formats/slackmention"),j=t.import("formats/workflowtoken");return c.allowedChildren.push(D),c.allowedChildren.push(F),c.allowedChildren.push(U),c.allowedChildren.push(B),c.allowedChildren.push(H),c.allowedChildren.push(W),c.allowedChildren.push(V),c.allowedChildren.push(G),c.allowedChildren.push(q),c.allowedChildren.push(j),t.register({"formats/code":c},!0),O.set(t,!0),t}let CanvasTextyClass=class CanvasTextyClass extends n.A{constructor(e,t){super(e,t,initQuill)}}},0x1b77d8ef3:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x72b537b5),c=a(0x1df96de4c),d=a(0x677a139e),m=a(0x8716533d),u=a(0x143f89715),p=a(0xbbbfd440),h=a(0x1059ba41d);let _=(0,n.Ar)()?function(e){let t,a,n,l,d=(0,r.c)(39),{children:_,className:f,hideBorder:b,isDisabled:g,isInvalid:y,numMaxLines:A,numMinLines:x,refToForward:E,renderPrefix:C,renderSuffix:k,size:v,hints:S,errors:I,dataQa:w}=e,T=void 0!==b&&b,N=void 0!==g&&g,M=void 0!==y&&y,R=void 0===v?"medium":v;d[0]!==S?(t=void 0===S?[]:S,d[0]=S,d[1]=t):t=d[1];let P=t,L=void 0===I?c.Ml:I,O=(0,s.U)();d[2]!==C?(a=C?.(),d[2]=C,d[3]=a):a=d[3];let D=a;d[4]!==k?(n=k?.(),d[4]=k,d[5]=n):n=d[5];let F=n;if(d[6]!==_||d[7]!==f||d[8]!==w||d[9]!==L||d[10]!==T||d[11]!==P||d[12]!==N||d[13]!==M||d[14]!==O||d[15]!==A||d[16]!==x||d[17]!==D||d[18]!==E||d[19]!==R||d[20]!==F){let e,t,a,n,r,s=(0,u.A)(L,O),c=(0,h.IXB)();d[22]!==A||d[23]!==x?(e=(0,p.i)({minLines:x,maxLines:A}),d[22]=A,d[23]=x,d[24]=e):e=d[24];let b=e,g=o()(f,"c-basic_container",`c-basic_container--size_${R}`,{"c-basic_container--bordered":!T,"c-basic_container--disabled":N,"c-basic_container--invalid":s||M,"c-basic_container--prefixed":!!D,"c-basic_container--suffixed":!!F});if(d[25]!==w||d[26]!==b||d[27]!==E||d[28]!==g?(t={className:g,style:b,ref:E,"data-qa":w},d[25]=w,d[26]=b,d[27]=E,d[28]=g,d[29]=t):t=d[29],d[30]!==_||d[31]!==D||d[32]!==F){let e;d[34]===Symbol.for("react.memo_cache_sentinel")?(e={className:o()("c-basic_container__body",{"c-basic_container__body--zoom-adjustment":c>2})},d[34]=e):e=d[34],a=i.createElement("div",e,D,_,F),d[30]=_,d[31]=D,d[32]=F,d[33]=a}else a=d[33];let y=i.createElement("div",t,a);d[35]!==L?(n=i.createElement(m.A,{className:"c-basic_container__subtext margin_bottom_0",errors:L}),d[35]=L,d[36]=n):n=d[36],d[37]!==P?(r=P.map(_temp),d[37]=P,d[38]=r):r=d[38],l=i.createElement(i.Fragment,null,y,n,r),d[6]=_,d[7]=f,d[8]=w,d[9]=L,d[10]=T,d[11]=P,d[12]=N,d[13]=M,d[14]=O,d[15]=A,d[16]=x,d[17]=D,d[18]=E,d[19]=R,d[20]=F,d[21]=l}else l=d[21];return l}:function({children:e,className:t,hideBorder:a=!1,isDisabled:n=!1,isInvalid:r=!1,numMaxLines:l,numMinLines:_,refToForward:f,renderPrefix:b,renderSuffix:g,size:y="medium",hints:A=[],errors:x=c.Ml,dataQa:E}){let C=(0,s.U)(),k=b?.(),v=g?.(),S=(0,u.A)(x,C),I=(0,h.IXB)(),w=(0,p.i)({minLines:_,maxLines:l});return i.createElement(i.Fragment,null,i.createElement("div",{className:o()(t,"c-basic_container",`c-basic_container--size_${y}`,{"c-basic_container--bordered":!a,"c-basic_container--disabled":n,"c-basic_container--invalid":S||r,"c-basic_container--prefixed":!!k,"c-basic_container--suffixed":!!v}),style:w,ref:f,"data-qa":E},i.createElement("div",{className:o()("c-basic_container__body",{"c-basic_container__body--zoom-adjustment":I>2})},k,e,v)),i.createElement(m.A,{className:"c-basic_container__subtext margin_bottom_0",errors:x}),A.map(({id:e,message:t})=>t&&i.createElement(d.A,{className:"c-basic_container__subtext",key:e,id:e},t)))};function _temp(e){let{id:t,message:a}=e;return a&&i.createElement(d.A,{className:"c-basic_container__subtext",key:t,id:t},a)}_.displayName="BasicContainer";let f=i.forwardRef((e,t)=>i.createElement(_,{refToForward:t,...e}))},0x1c4ea1f36:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0xbad225b5).createContext({})},0x14705d91b:(e,t,a)=>{"use strict";a.d(t,{A:()=>tC});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x1cbdfeceb),c=a(0x21f3c49e8),d=a(0x14fad6485),m=a(0x1df96de4c),u=a(0x20482ad21),p=a(0x15e48057c),h=a(0x11a296110),_=a(0xa6f3163b),f=a(0x2501a2cee),b=a(0xbe505324),g=a(0x4c96e5d9),y=a(0x344bb842),A=a(0x96aa1794),x=a(0x1a5ac3a0c),E=a(0x2286acf6c),C=a(0x99233ecb),k=a(0xb90d5858),v=a(0x6aeae8a3),S=a(0x40c0d834),I=a(0x35514c28),w=a(0x18ee7321c),T=a(0x11243fb75),N=a(0x118cdcdea),M=a.n(N),R=a(0x88881d67);let P=new u.Ay("workflow_builder"),L=new u.Ay("workflow_builder");var O=((n={}).PROJECT_UPDATE="project_update",n.INCIDENT_SUMMARY="incident_summary",n.ACCOUNT_UPDATE="account_update",n.ANSWER_FAQS="answer_faqs",n.ANALYZE_SENTIMENT="analyze_sentiment",n.START_FROM_SCRATCH="start_from_scratch",n),D=a(0x145d46a61),F=a(0x226892387);let U=new u.Ay("workflow_builder"),usePromptTemplates=()=>{let e=(0,F.d4)(D.dI),t=(0,r.useCallback)(e=>{switch(e){case O.PROJECT_UPDATE:case O.ANSWER_FAQS:case O.START_FROM_SCRATCH:case O.INCIDENT_SUMMARY:return!0;default:return!1}},[]);return{promptTemplateSchemas:(0,r.useMemo)(()=>[{type:O.PROJECT_UPDATE,title:e?U.t("Draft project update"):"Draft project update",description:e?U.t("Generates a concise status update for a project, highlighting progress, blockers, and next steps."):"Generates a concise status update for a project, highlighting progress, blockers, and next steps.",icon:r.createElement(f.Ah,{name:"canvas-content"}),id:O.PROJECT_UPDATE},{type:O.INCIDENT_SUMMARY,title:e?U.t("Create incident summary"):"Create incident summary",description:e?U.t("Summarizes a technical incident\u2019s timeline, impact, root cause, and resolution steps for reports."):"Summarizes a technical incident\u2019s timeline, impact, root cause, and resolution steps for reports.",icon:r.createElement(f.Ah,{name:"warning"}),id:O.INCIDENT_SUMMARY},{type:O.ANSWER_FAQS,title:e?U.t("Answer FAQs"):"Answer FAQs",description:e?U.t("Drafts clear and concise answers to common questions based on provided context or knowledge."):"Drafts clear and concise answers to common questions based on provided context or knowledge.",icon:r.createElement(f.Ah,{name:"help"}),id:O.ANSWER_FAQS},{type:O.ACCOUNT_UPDATE,title:e?U.t("Summarize account status"):"Summarize account status",description:e?U.t("Provides a quick summary of a customer account, including recent activity, health, and key contacts."):"Provides a quick summary of a customer account, including recent activity, health, and key contacts.",icon:r.createElement(f.Ah,{name:"sales"}),id:O.ACCOUNT_UPDATE},{type:O.ANALYZE_SENTIMENT,title:e?U.t("Analyze sentiment"):"Analyze sentiment",description:e?U.t("Proofreads your text to catch grammatical errors, spelling mistakes, and typos."):"Proofreads your text to catch grammatical errors, spelling mistakes, and typos.",icon:r.createElement(f.Ah,{name:"ai-summary"}),id:O.ANALYZE_SENTIMENT}],[e]),isPromptTemplateEnabled:t}};usePromptTemplates.displayName="usePromptTemplates";var B=a(0x23a4b0853),H=a(0x238b287cf),W=a(0x3711e82d),V=a(0xaca37c42),G=a.n(V);let q=new u.Ay("workflow_builder"),j={name:"close"},AiPromptTemplatesContent=({closePopovers:e,onChange:t})=>{let a=(0,F.d4)(D.dI),n=(0,H.A)(),{promptTemplateSchemas:i,isPromptTemplateEnabled:l}=usePromptTemplates(),{windowRef:s}=(0,r.useContext)(d._0),c=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=s.deref()?.requestAnimationFrame(()=>{c.current?.focus()})??0;return()=>s.deref()?.cancelAnimationFrame(e)},[s]);let m=(0,r.useCallback)(e=>{"Tab"===e.key&&e.stopPropagation()},[]),u=a?q.t("Not sure where to begin? Start from an example:"):"Not sure where to begin? Start from an example:",p=a?q.t("Pardon our dust! We\u2019re working hard to get this template ready."):"Pardon our dust! We\u2019re working hard to get this template ready.",h=a?q.t("Prompt templates"):"Prompt templates",_=(0,r.useCallback)(e=>{t(((e,t)=>{switch(e){case"project_update":let a;return a={workflowtoken:(0,R.Wk)({placeholderLabel:t?L.t("Insert project update text"):"Insert project update text",sourceLabel:"project-update-prompt-template"})},new(M())().insert(`You'll be given the project update text to summarize in the form of markdown. The project update will contain progress updates from team members and any blockers or needs that team members are reporting.
`).insert(`Project update text:
`,{bold:!0}).insert(`<project update text>
`).insert(a,{bold:!1}).insert(`
</project update text>
`).insert(`Read the instructions below, then, following the instructions, generate content for a project update:
`).insert(`Output 2 sections with the first being a summary of the updates to the project and the second being blockers.
`,{list:"ordered"}).insert(`The summary section should be a list of 5 bullet points. Each bullet point should be 1 sentence(s) that summarizes a key update from the project update. A key update is an update on progress that a team members or group of members reports. It is an overarching topic typically found at top level in the project update. If there are fewer than 5 key updates, provide only the meaningful ones.
`,{list:"ordered"}).insert(`The blockers section should be a list of 5 bullet points. Each bullet should be 1 sentence(s) describing an open question raised by blockers or a key blocker itself. A key blocker is a question or item that prevents a teammate from making progress. If no blockers are present, state "No blockers reported."
`,{list:"ordered"}).insert(`Content should be written with a neutral tone and professional voice
`,{list:"ordered"}).insert(`Follow the following format:
`,{list:"ordered"}).insert(`<format>
<heading> Summary </heading> - [bullet point]
<heading> Blockers </heading> - [bullet point]
</format>
`);case"incident_summary":return new(M())().insert(`You will be given a channel containing Slack messages related to an incident in order to generate a comprehensive incident postmortem. Read the instructions, then generate a comprehensive incident postmortem report by analyzing the Slack messages in the provided channel.
`).insert(`
`).insert(`The following list describes each section of the incident postmortem that you will generate a report on. Each subitem in the list describes what the section is about and also what format the section should be in. Subitems also may describe how you should read the channel messages to create content for the section. If that is not described, you should read messages in the provided channel and use citations with the <link to key event|[citation_number]> format to generate the content. Do not use outside knowledge; please read the messages in the provided channel. If a specific team member is involved with an action, idea, mitigation effort, or remediation effort mention them as a user.
`).insert(`
`).insert(`Incident Summary
`,{list:"ordered"}).insert(`What: Create a summary that answers, how we found out about the issue, if this was external or internal impact, the number of impacted users, and the root cause of the issue
`,{list:"ordered",indent:1}).insert(`Format: Create an ordered list answering each of the summary question. Create a bolded header for this summary titled "Incident Summary." Anytime you use channel messages to create the summary, cite the message using the <link to key event|[citation_number]> format.
`,{list:"ordered",indent:1}).insert(`Incident Timeline
`,{list:"ordered"}).insert(`What: A timeline of the key events that occurred in the incident. Key events should be related to detecting failures caused by the incident, when the incident is called, when a mitigation effort is created and deployed (such as scaling up resources, making a code change, or rolling back builds), when a mitigation's efforts are assessed (such as reading logs or monitoring tools), any repeat mitigation efforts needed, when incident is mitigated (such as when metrics return to normal or customers report no impact), and when the incident is fully mitigated.
`,{list:"ordered",indent:1}).insert(`How: Read channel messages to determine key events. Use the message timestamps to determine the ordering of events and use the current date if provided.
`,{list:"ordered",indent:1}).insert(`Format: A content section headed by a bolded "Incident Timeline" title. The content section contains lines where each line is 1 sentence for each key event in this following format: Timestamp (bolded in human readable format in PST time): Key Event details <link to key event|[citation_number]>. These sentences should be separated by new lines. Most timelines should be at most 15 key events. If more are needed, feel free to exceed the limit.
`,{list:"ordered",indent:1}).insert(`What went well
`,{list:"ordered"}).insert(`What: An unordered list of points that describe what went well in the incident remediation process - good things that happened that were in the direct control of incident responders. These could be speedy response times, good collaboration, monitoring tools being effective, etc.
`,{list:"ordered",indent:1}).insert(`Format: A content section headed by a bolded "What Went Well" title. The content section contains an unordered list where each list item is 1 sentence with the following format: What went well point: sentence describing the context of the What went well point.
`,{list:"ordered",indent:1}).insert(`What went wrong
`,{list:"ordered"}).insert(`What: An unordered list of points that describe what went wrong in the incident remediation process - bad things that happened that were in the direct control of incident responders. These could be incorrect assumptions made, changes that worsened the incident's impact, etc.
`,{list:"ordered",indent:1}).insert(`Format: Same as "What went well" but use "What went wrong" instead.
`,{list:"ordered",indent:1}).insert(`How we got lucky
`,{list:"ordered"}).insert(`What: An unordered list of points that describe how we got lucky in this incident remediation - good things that happened that were not in direct control of incident responders. These could be customer impact being limited to a smaller subset, the incident occurring outside business hours, etc.
`,{list:"ordered",indent:1}).insert(`Format: Same as "What went well" but use "How we got lucky" perspective instead.
`,{list:"ordered",indent:1}).insert(`Remediation Actions and Ideas
`,{list:"ordered"}).insert(`What: An ordered list of points that each describe an action or idea that should be performed or completed to remediate fallout from the incident or prevent similar future incidents from occurring.
`,{list:"ordered",indent:1}).insert(`Format: A content section headed by a bolded "Remediation Actions and Ideas" title. The content section contains an ordered list where each list item is 1 sentence with the following format: The remediation action or idea: 1 sentence describing the context of the remediation action or idea.
`,{list:"ordered",indent:1}).insert(`Committed Remediation Items
`,{list:"ordered"}).insert(`What: Out of the Remediation Actions and Ideas, list the points that teams or team members have committed to addressing and why.
`,{list:"ordered",indent:1}).insert(`Format: Same as "Remediation Actions and Ideas" but use "Committed Remediation Items" as the title.
`,{list:"ordered",indent:1}).insert(`Uncommitted Remediation Items
`,{list:"ordered"}).insert(`What: Out of the Remediation Actions and Ideas, list the points that teams or team members have not committed to addressing and why.
`,{list:"ordered",indent:1}).insert(`Format: Same as "Remediation Actions and Ideas" but use "Uncommitted Remediation Items" as the title.
`,{list:"ordered",indent:1}).insert(`
`).insert(`If you cannot find sufficient information for an individual section, write 'Insufficient information' for that section only. Do not use this if you can complete most sections.
`);case"account_update":case"analyze_sentiment":case"start_from_scratch":default:return new(M());case"answer_faqs":let n;return n={workflowtoken:(0,R.Wk)({placeholderLabel:t?P.t("Insert query text"):"Insert query text",sourceLabel:"answer-faqs-prompt-template"})},new(M())().insert(`You will be given a FAQ, general question or issue in the form of markdown.
`).insert(`Query:
`,{bold:!0}).insert(`<query>
`).insert(n,{bold:!1}).insert(`
</query>
`).insert(`Read the instructions below, then, following the instructions, generate content to answer the query to the best of your ability:
`).insert(`Primarily use the provided resources, but supplement with general knowledge if needed to provide a complete FAQ answer. These provided resources may be Canvases to read in Slack, structured spreadsheet data in Lists, or messages stored in Channels that you may search in Slack.
`,{list:"ordered"}).insert(`Do not expose your thinking. First directly answer the query, then provide supporting details at the end. Be concise and to the point.
`,{list:"ordered"}).insert(`Answer in a helpful, conversational tone appropriate for end-users. However, remember that you should not ask follow-up questions intending to continue the conversation.
`,{list:"ordered"}).insert(`Answer in a way appropriate for your audience of non-technical humans.
`,{list:"ordered"}).insert(`If using knowledge outside of the provided resources, ensure that the asker is aware by acknowledging the use of such outside knowledge - e.g. "Based on general knowledge beyond the provided resources..."
`,{list:"ordered"}).insert(`If resources contradict each other, present all sides, acknowledging that the answer you are providing may be confusing. Cite all conflicting resources - e.g. "Resource A says X, but Resource B says Y, so you should understand that there is no definite answer."
`,{list:"ordered"})}})(e,a))},[t,a]),f=(0,r.useCallback)(t=>()=>{(0,B.E7)({clogger:n,uiArgs:{step:W.UiStep.WORKFLOWS_AI_STEP_DEFAULT_MODAL},uiProperties:{element_name:B.KC.AiStepPromptExamples,element_value:t}}),_(t),e()},[n,_,e]),b=(0,r.useCallback)(e=>{let t=l(e.type),a=f(e.type),n=r.createElement(T.A,{id:e.type,className:o()(G().templateListItem,{"dt-hocus:base-pry":t,[G().templateListItemDisabled]:!t}),onClick:t?a:void 0,"aria-label":e.title},r.createElement("div",{className:G().templateCard},r.createElement("div",{className:G().templateCardIcon},e.icon),r.createElement("div",null,e.title)));return r.createElement(g.Ay,{tip:t?e.description:p,position:"top",zIndex:"menu_above_fs"},n)},[f,l,p]);return r.createElement(S.A,{eventId:W.EventId.WORKFLOW_BUILDER,clogImpression:!0,uiStep:W.UiStep.WORKFLOWS_AI_STEP_DEFAULT_MODAL,elementName:B.KC.AiStepPromptExamples},r.createElement("div",{className:G().promptToolsTemplatesContainer,onKeyDown:m},r.createElement(I.A,null,r.createElement("h4",{className:G().promptToolsHeader},r.createElement("span",null,u),r.createElement(y.A,{"aria-label":q.t("Close"),onClick:e,size:"small",svgIconProps:j})),r.createElement(w.A,{ref:c,className:G().promptToolsList,items:i,renderItem:b,initialActiveItem:i[0].id,"aria-label":h}))))};AiPromptTemplatesContent.displayName="AiPromptTemplatesContent";var z=a(0xce378727),K=a(0x5299a396),$=a(0xc3cbf6b1),Y=a(0x24e7004c6);let Q=new u.Ay("workflow_builder"),Z={name:"close"},AiPromptWriterContent=({closePopovers:e,updatePromptField:t,workflowId:a,segment:n,isLoading:i,setIsLoading:l})=>{let o=(0,F.d4)(D.dI),s=(0,H.A)(),[c,m]=(0,r.useState)(""),[u,p]=(0,r.useState)(!1),{windowRef:h}=(0,r.useContext)(d._0);(0,r.useEffect)(()=>{let e=h.deref()?.requestAnimationFrame(()=>{h.deref()?.document.getElementById("ai-prompt-writer")?.focus()})??0;return()=>h.deref()?.cancelAnimationFrame(e)},[h]);let _=(0,r.useCallback)(e=>{"Tab"===e.key&&e.stopPropagation()},[]),f=(0,r.useCallback)(e=>{m(e)},[m]),{handleSubmit:b}=(0,Y.M)({workflowId:a,onComplete:t,stripVariablesFromInputs:!0}),g=(0,r.useCallback)(async e=>{l(!0),p(!1),await b({prompt:`write the best possible prompt for an LLM to solve the task described below. Do not return any thinking steps or interim messages. Do not summarize or describe the prompt at all. Your response will be fed directly to the LLM. Do not do the task yourself. Do not reference any content or dates from the knowledge sources. Do not specify which knowledge sources are being used. These will change before the prompt is executed. Only give me the prompt.
<description>${e}</description>`,segment:n}).then(e=>{p(!e?.ok)}).catch(()=>{l(!1),p(!0)})},[b,n,l,p]),A=(0,r.useCallback)(()=>{(0,B.K$)({clogger:s,uiArgs:{step:W.UiStep.WORKFLOWS_AI_STEP_DEFAULT_MODAL},uiProperties:{element_name:B.KC.AiStepPromptWriter}}),g(c)},[s,g,c]),x=o?Q.t("Describe what you want this step to do"):"Describe what you want this step to do",E=(0,r.useMemo)(()=>u?r.createElement($.y,{onRetry:A,disabled:!1}):r.createElement(r.Fragment,null,r.createElement("h4",{className:G().promptToolsHeader},r.createElement("span",null,x),r.createElement(y.A,{"aria-label":Q.t("Close"),onClick:e,size:"small",svgIconProps:Z})),r.createElement(K.A,{value:c,onChange:f,name:"ai-prompt-writer",id:"ai-prompt-writer",size:"medium"}),r.createElement(z.A,{className:G().promptToolsSubmitButton,onClick:A,type:"outline",loading:i},o?Q.t("Generate Prompt"):"Generate Prompt")),[u,A,x,e,c,f,i,o]);return r.createElement(S.A,{eventId:W.EventId.WORKFLOW_BUILDER,clogImpression:!0,uiStep:W.UiStep.WORKFLOWS_AI_STEP_DEFAULT_MODAL,elementName:B.KC.AiStepPromptWriter},r.createElement("div",{className:G().promptToolsAIPromptWriterContainer,onKeyDown:_},r.createElement(I.A,null,E)))};AiPromptWriterContent.displayName="AiPromptWriterContent";var J=a(0x24429189c);let X=new u.Ay("workflow_builder"),ee={name:"stacked-cards"},AiStepPromptToolsMenu=({segment:e,workflowId:t,onChange:a,textyRef:n})=>{let l=(0,F.d4)(D.dI),o=(0,F.d4)(D.sn),s=(0,i.wA)(),c=(0,H.A)(),[m,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[_,b]=(0,r.useState)(void 0),[A,x]=(0,r.useState)(!1),{windowRef:S}=(0,r.useContext)(d._0),I=(0,r.useRef)(null),w=(0,r.useCallback)(()=>{u(!1),h(!1),S.deref()?.requestAnimationFrame(()=>{n.current?.focus()})},[n,S]),T=(0,r.useCallback)((e,t)=>{a(s((0,J.f)({blocks:e}))),w(),x(!1)},[a,x,s,w]),N=(0,r.useCallback)(()=>{b(n.current?.element?.getBoundingClientRect())},[n]);(0,r.useEffect)(()=>{let e=(0,E.A)(N,150,{maxWait:150,trailing:!0}),t=S.deref();return t?.addEventListener("resize",e),()=>{t?.removeEventListener("resize",e)}},[N,S]);let M=(0,r.useCallback)(()=>{u(!0),N()},[N]),R=(0,r.useCallback)(()=>{h(!0),N()},[N]),P=(0,r.useCallback)(()=>{(0,B.K$)({clogger:c,uiArgs:{step:W.UiStep.WORKFLOWS_AI_STEP_DEFAULT_MODAL},uiProperties:{element_name:B.KC.AiStepPromptToolsMenu}})},[c]),L=(0,r.useCallback)(e=>r.createElement(C.Ay,e,o&&r.createElement(k.A,{onSelected:R},r.createElement("div",{className:G().promptToolsMenuItem},r.createElement(f.Ah,{inline:!0,name:"ai-sparkle-filled"}),l?X.t("AI Prompt writer"):"AI Prompt writer")),r.createElement(k.A,{onSelected:M},r.createElement("div",{className:G().promptToolsMenuItem},r.createElement(f.Ah,{inline:!0,name:"stacked-cards"}),l?X.t("Prompt Examples"):"Prompt Examples"))),[R,M,l,o]),O=(0,r.useCallback)(()=>p?r.createElement(AiPromptWriterContent,{closePopovers:w,updatePromptField:T,workflowId:t,segment:e,isLoading:A,setIsLoading:x}):m?r.createElement(AiPromptTemplatesContent,{closePopovers:w,onChange:a}):null,[p,m,w,T,a,e,t,A,x]),U=l?X.t("Prompt tools"):"Prompt tools";return r.createElement(r.Fragment,null,r.createElement(v.AM,{isOpen:m||p,onClose:w,position:"top",targetBounds:_,shouldFocusAfterRender:!0,shouldReturnFocusAfterClose:!0,offsetY:_?.height},r.createElement("div",{style:{width:`${_?.right?_.right-_.left:0}px`,top:`${_?.height}px`}},O())),r.createElement(C.cQ,{renderMenu:L,closeOnSelect:!0,position:"top-right"},r.createElement(g.Ay,{key:"prompt-tools-button",tip:U,position:"top",offsetY:-7,delay:500,zIndex:"menu_above_fs"},r.createElement(y.A,{ref:I,"aria-label":U,size:"small",svgIconProps:ee,onClick:P}))))};AiStepPromptToolsMenu.displayName="AiStepPromptToolsMenu";var et=a(0x186093629),ea=a.n(et);let en=new u.Ay("workflow_builder"),er={name:"expand-diagonal"},ei={name:"reduce-diagonal"},AiPromptCustomToolbarButtons=({segment:e,onExpandCollapsePromptClick:t,isPromptExpanded:a,enablePromptToolsButton:n,insertVariableButton:i,textyRef:l})=>{let o=(0,F.d4)(D.dI),s=(0,A.j)(),c=(0,x.DY)(s),d=(0,r.useMemo)(()=>a?o?en.t("Close Prompt"):"Close Prompt":o?en.t("Expand Prompt"):"Expand Prompt",[o,a]),m=(0,r.useCallback)(()=>{t?.()},[t]),u=(0,r.useCallback)(e=>{l.current?.setContents({contents:e.ops})},[l]);return r.createElement("div",{className:ea().aiStepToolbarButtons},r.createElement("span",{className:"c-wysiwyg_container__footer_divider"}),i,n&&r.createElement(AiStepPromptToolsMenu,{key:"prompt-tools-menu",workflowId:c,onChange:u,textyRef:l,segment:e}),r.createElement("div",{className:ea().inputToolbarButtonsRight,key:"prompt-tools-button-container"},r.createElement(g.Ay,{key:"expand-prompt-button",tip:d,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},r.createElement(y.A,{"aria-label":d,onClick:m,size:"small",svgIconProps:a?ei:er}))))};AiPromptCustomToolbarButtons.displayName="AiPromptCustomToolbarButtons";var el=a(0x7fbb7bb1),eo=a(0x1039e8d4e),es=a(0x1b77d8ef3),ec=a(0x1c4ea1f36),ed=a(0x18f2150ea),em=a(0x357885ff),eu=a(0x22ba45688),ep=a(0xc6a2c86f);let eh=a(0xe639be51).A;var e_=a(0x1c8c09533),ef=a(0xb77a689a),eb=a(0x1ff9f7c84),eg=a(0x4cd77de3),ey=a(0x11209f55c),eA=a(0x2398accc);function shouldToolbarShow(e,t){if(e.current?.isInComposition)return!1;let a=e.current?.getSelection();if(!a||!a.length)return!1;let n=e.current?.quill?.getModule("tabcomplete");if(n&&n.isMenuOpen()||!(e.current?.getContentsForRange(a.index,a.length)).filter(e=>!!((0,eb.A)(e)&&!(0,eg.Ay)(e)||(0,ey.wU)(e)||(0,eA.A)(e)&&(0,ef.A)(e.insert)&&""!==e.insert.trim())).length)return!1;let r=e.current?.getFormat(a.index,a.length)||{};return!r.imageSrc&&(!!t||!r["code-block"])}var ex=a(0xb3cd55e4);let TextyFloatingFormattingBar=({textyRef:e,isEnabled:t,buttons:a,menuItems:n,menuPosition:l,onFormatButtonClick:o=s.A,activeFormats:c,toolbarPositionData:m,onMouseDown:u=s.A,isDisabled:p=!1})=>{let h=(0,i.wA)(),_=(0,r.useRef)(null),[f,b]=(0,r.useState)(!1),g=(0,ep.A)(f),{windowRef:y}=(0,d.ox)(),A=y.deref(),x=(0,r.useCallback)(()=>{f&&b(!1)},[f]),E=(0,r.useCallback)(t=>{t&&t.length&&b(shouldToolbarShow(e,(0,em.A)(a).includes("code-block")))},[a,e]);(0,r.useEffect)(()=>{let t=e.current?.quill;return t&&t.on("selection-change",E),()=>{t&&t.off("selection-change",E)}},[e,E]),(0,ex.A)(_,e=>{let t=e.target;t?.closest(".p-composer-menu-trigger-button")||x()},!0),(0,r.useEffect)(()=>{if(f){let e=_.current?.offsetWidth||0,t=_.current?.offsetHeight||0,{left:a,top:n}=(0,e_.Ay)({toolbarHeight:t,toolbarWidth:e,toolbarPositionData:m}),{style:r}=_.current;r.visibility="visible",r.pointerEvents="auto",g?Math.abs(parseInt(r.top,10)-n)>=20&&(r.top=`${n}px`):(r.left=`${a}px`,r.top=`${n}px`),a||n||(r.visibility="hidden",r.pointerEvents="none")}},[h,f,g,_,m]);let C=(0,r.useCallback)(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),x())},[x]);return((0,r.useEffect)(()=>{if(f&&A)return A.document.addEventListener("keydown",C,{capture:!0}),()=>{A.document.removeEventListener("keydown",C,{capture:!0})}},[C,f,A]),t&&f&&A)?(0,eu.createPortal)(r.createElement("div",{ref:_,className:"p-texty_floating_formatting_bar",onMouseDown:u},r.createElement(eh,{buttons:a,menuItems:n,menuPosition:l,activeFormats:c,onFormatButtonClick:o,isDisabled:p})),A.document.body):null};TextyFloatingFormattingBar.displayName="TextyFloatingFormattingBar";var eE=a(0x130d89881);function TextyStickyFormattingBar({textyHasFocus:e,buttons:t,onFormatButtonClick:a=s.A,activeFormats:n,onMouseDown:i=s.A,overflowVisible:l,onEscape:o=s.A,isDisabled:c=!1,menuItems:d,menuPosition:m}){return r.createElement("div",{className:"p-texty_sticky_formatting_bar",onMouseDown:i},r.createElement(eE.A,{disableHeight:!0},({width:i})=>r.createElement(eh,{textyHasFocus:e,buttons:t,menuItems:d,menuPosition:m,activeFormats:n,onFormatButtonClick:a,overflowVisible:l,isSticky:!0,width:i,onEscape:o,isDisabled:c})))}TextyStickyFormattingBar.displayName="TextyStickyFormattingBar";let eC=TextyStickyFormattingBar;var ek=a(0x10e0f5452),ev=a(0x18191f91),eS=a(0x14d2ae7bc),eI=a(0x190c367fe),ew=a(0x1f9b19f5a);let TextyFormattingBar=({textyRef:e,textyHasFocus:t,useWorkflowTokens:a,useExpandedRichText:n,showLinkForm:l=s.A,activeFormats:o,useStickyComposer:c,enableStickyComposer:m,toolbarOverflowVisible:u,setToolbarOverflowVisible:p=s.A,toolbarPositionData:h,isDisabled:_=!1,onEscape:f=s.A})=>{let b=(0,i.wA)(),g=(0,H.A)(),{windowRef:y}=(0,r.useContext)(d._0);(0,r.useEffect)(()=>()=>{b((0,ew.A)())},[b]);let{buttons:A,menuItems:x,menuPosition:E}=(0,r.useMemo)(()=>(0,ek.A)({useWorkflowTokens:!!a,useExpandedRichText:!!n,isUnderlineEnabled:!0}),[n,a]),C=(0,r.useCallback)(t=>{let a=y.deref()?.document.activeElement;if(!a||!a.classList||!a.classList.contains("ql-editor"))return;let n=e.current?.quill?.root;n&&n.contains(a)&&t.preventDefault()},[e,y]),k=(0,r.useCallback)((t,{source:a,applyFormatToEmptySelection:r})=>{if("overflow"===t)return void p(!u);if(p(!1),"link"===t)return void l({source:a});let i=e?.current?.getSelection();if(i&&(i.length||r)){let r=(0,eI.Xh)(e?.current?.quill,i),{didHandle:l,addedFormatting:o,hadSelection:s}=(0,ev.A)(e?.current?.quill,{format:t,index:i.index,length:i.length},n);l&&(0,ed.A)(eS.Hm[t])&&g.track(o?W.EventId.MSG_FORMATTING_ADDED:W.EventId.MSG_FORMATTING_REMOVED,{input_context:W.MsgFormattingInputContext.MESSAGE,input_source:a,input_format:eS.Hm[t],is_selection:s,input_prexisting_block_formats:r})}},[g,p,l,e,u,n]),v=(0,r.useCallback)(e=>{p(!1),f(e,u??!1)},[p,f,u]),S=(0,r.useCallback)((e,{source:t})=>k(e,{source:t,applyFormatToEmptySelection:!0}),[k]);return r.createElement(r.Fragment,null,!c&&r.createElement(TextyFloatingFormattingBar,{isEnabled:!m||!c,textyRef:e,buttons:A,menuItems:x,menuPosition:E,activeFormats:o,onFormatButtonClick:S,toolbarPositionData:h,onMouseDown:C,isDisabled:_}),c&&r.createElement(eC,{textyHasFocus:!!t,buttons:A,menuItems:x,menuPosition:E,activeFormats:o,onFormatButtonClick:S,onMouseDown:C,overflowVisible:!!u,onEscape:v,isDisabled:_}))};TextyFormattingBar.displayName="TextyFormattingBar";var eT=a(0x807220a2),eN=a(0x19bf376f9),eM=a(0x21343fa5a),eR=a(0x13953efe6),eP=a(0x22fcfc255),eL=a(0x11c82607b),eO=a(0xafce781a),eD=a(0x5b1935a6);let eF=(0,eL.Ay)("Check for schedule send in threads megaphone",(e,t,{threadTs:a}={})=>{if(a)return e((0,eO.u2)({event:{type:eD.jo.THREAD_PANE_OPENED}}))});eF.meta={name:"getMegaphoneThreadPaneOpened",key:"createThunkGetMegaphoneThreadPaneOpened",description:"Check for schedule send in threads megaphone"};var eU=a(0x3989021c),eB=a(0x1a02c72b5),eH=a(0xd6a16321),eW=a(1927545e3),eV=a(0xa794f9e1),eG=a(0x1c2eef3c8),eq=a(0x14124c8a2);let ej=new u.Ay("drafts"),ez=(0,eT.Ar)()?function(e){let t,a,n,l,o=(0,eN.c)(20),{menuProps:s,onSend:c,draftId:d}=e;o[0]!==d?(t=e=>(0,eG.YI)(e,d),o[0]=d,o[1]=t):t=o[1];let m=(0,F.d4)(t),u=(0,i.wA)();o[2]!==u||o[3]!==d?(a=()=>{u((0,eq.A)({draftId:d,dateScheduled:0})),u((0,eB.o)((0,eH.ZF)(eW.c.Drafts)))},o[2]=u,o[3]=d,o[4]=a):a=o[4];let p=a;o[5]!==m?(n=m&&(0,eV.mI)(m).length,o[5]=m,o[6]=n):n=o[6];let h=!!n;if(o[7]!==h||o[8]!==s||o[9]!==p||o[10]!==c){let e,t,a;if(o[12]!==s?(e={width:"180px",...s},o[12]=s,o[13]=e):e=o[13],o[14]!==c){let e;o[16]===Symbol.for("react.memo_cache_sentinel")?(e=ej.t("Send now"),o[16]=e):e=o[16],t=r.createElement(C.Dr,{label:e,onSelected:c,"data-qa":"p-schedule_send_edit_menu__send_now"}),o[14]=c,o[15]=t}else t=o[15];o[17]!==h||o[18]!==p?(a=!h&&r.createElement(C.Dr,{label:ej.t("Save to drafts"),"data-qa":"p-schedule_send_edit_menu__save_to_drafts",onSelected:p}),o[17]=h,o[18]=p,o[19]=a):a=o[19],l=r.createElement(C.Ay,e,t,a),o[7]=h,o[8]=s,o[9]=p,o[10]=c,o[11]=l}else l=o[11];return l}:function({menuProps:e,onSend:t,draftId:a}){let n=(0,F.d4)(e=>(0,eG.YI)(e,a)),l=(0,i.wA)(),o=(0,r.useCallback)(()=>{l((0,eq.A)({draftId:a,dateScheduled:0})),l((0,eB.o)((0,eH.ZF)(eW.c.Drafts)))},[l,a]),s=!!(n&&(0,eV.mI)(n).length);return r.createElement(C.Ay,{width:"180px",...e},r.createElement(C.Dr,{label:ej.t("Send now"),onSelected:t,"data-qa":"p-schedule_send_edit_menu__send_now"}),!s&&r.createElement(C.Dr,{label:ej.t("Save to drafts"),"data-qa":"p-schedule_send_edit_menu__save_to_drafts",onSelected:o}))};ez.displayName="ScheduleSendMenu";var eK=a(0xa5a7f2f9),e$=a(0x50ff7328),eY=a(0xb04c4a12),eQ=a(0x124342957),eZ=a(0x1c91944c9),eJ=a(0x17a41206b),eX=a(0xb5b2b6dd),e0=a(0xb9604b6);let e1=new u.Ay("drafts"),e2=["CmdOrCtrl"],e4={name:"check"},e5={name:"send-filled"},e3={name:"caret-down"},e6=(0,eT.Ar)()?e=>{let t,a,n,l,c,d,m,u,p,h,_,f,b,A,x,E=(0,eN.c)(114),{draftId:k,disabled:v,onSend:S,onScheduleSend:I,enableScheduleSendButton:w,viewContext:T,enterCreatesNewlinePref:N}=e,M=(0,i.wA)(),R=(0,F.d4)(e$.A);E[0]!==k?(t=e=>(0,eG.YI)(e,k),E[0]=k,E[1]=t):t=E[1];let P=(0,F.d4)(t);E[2]!==P?(a=(0,eV.l7)(P),E[2]=P,E[3]=a):a=E[3];let L=a,O=L?.[0]?.thread_ts;E[4]!==M||E[5]!==O?(n=()=>{M(eF({threadTs:O}))},E[4]=M,E[5]=O,E[6]=n):n=E[6],(0,eM.A)(n,!!O),E[7]!==O?(l=e=>!!O&&(0,e0.Hp)(e,eD.xu.IN_PRODUCT_COACHMARK)===eD.jo.EDUCATION_SCHEDULED_SEND_IN_THREADS,E[7]=O,E[8]=l):l=E[8];let D=(0,F.d4)(l),{closeCoachmark:U,renderCoachmark:B}=(0,eU.A)(eD.jo.EDUCATION_SCHEDULED_SEND_IN_THREADS);E[9]!==U?(c=()=>{U()},E[9]=U,E[10]=c):c=E[10];let H=c;E[11]!==H||E[12]!==B?(d=B({arrowPosition:95,bodyText:e1.t("Schedule a message to be sent later in a thread. Your future self will thank you."),title:e1.t("Write now, send later"),closeCoachmark:H,closeCoachmarkFromOutsideClick:H}),E[11]=H,E[12]=B,E[13]=d):d=E[13];let W=d;E[14]!==P?(m=!1,P&&(m=!!(0,eV.mI)(P).length),E[14]=P,E[15]=m):m=E[15],E[16]!==P?(u=(0,eV.V)(P),E[16]=P,E[17]=u):u=E[17];let V=!!u;E[18]!==M||E[19]!==m||E[20]!==V?(p=()=>{M((0,eB.o)((0,eH.ZF)(eW.c.ScheduledMessages))),m&&V&&M((0,eX.RL)({draftId:null}))},E[18]=M,E[19]=m,E[20]=V,E[21]=p):p=E[21];let G=p;E[22]!==S?(h=()=>{if(S)return S({fromKeyboardShortcut:!1})},E[22]=S,E[23]=h):h=E[23];let q=h;E[24]!==k||E[25]!==q||E[26]!==V||E[27]!==I||E[28]!==T?(_=e=>V?r.createElement(ez,{menuProps:e,draftId:k,onSend:q}):r.createElement(eK.A,{menuProps:e,draftId:k,onScheduleSend:I||s.A,viewContext:T}),E[24]=k,E[25]=q,E[26]=V,E[27]=I,E[28]=T,E[29]=_):_=E[29];let j=_;if(w&&!R){let e,t,a,n,i,l,s,c;E[30]!==v?(e=o()("c-wysiwyg_container__send_button--with_options",{"c-wysiwyg_container__send_button--with_options_disabled":v}),E[30]=v,E[31]=e):e=E[31];let d=e;E[32]!==v?(t=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--send",{"c-wysiwyg_container__button--disabled":v}),E[32]=v,E[33]=t):t=E[33];let m=t;E[34]!==v?(a=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--send_options",{"c-wysiwyg_container__button--disabled":v}),E[34]=v,E[35]=a):a=E[35];let u=a;E[36]!==V?(i=V?e1.t("Save changes"):e1.t("Send now"),E[36]=V,E[37]=i):i=E[37];let p=i;if(V){let e;if(E[38]!==v||E[39]!==G||E[40]!==p||E[41]!==m){let t,a=v?-1:0;E[43]!==v||E[44]!==G||E[45]!==p||E[46]!==m||E[47]!==a?(t={className:m,tabIndex:a,"aria-disabled":v,onClick:G,"data-qa":"texty_done_editing_scheduled_message_button","aria-label":p,size:"x-small",svgIconProps:e4},E[43]=v,E[44]=G,E[45]=p,E[46]=m,E[47]=a,E[48]=t):t=E[48],e=r.createElement(y.A,t),E[38]=v,E[39]=G,E[40]=p,E[41]=m,E[42]=e}else e=E[42];n=e}else{let e;if(E[49]!==v||E[50]!==q||E[51]!==p||E[52]!==m){let t,a=v?-1:0;E[54]!==v||E[55]!==q||E[56]!==p||E[57]!==m||E[58]!==a?(t={className:m,tabIndex:a,"aria-disabled":v,onClick:q,"data-qa":"texty_send_button","aria-label":p,size:"x-small",svgIconProps:e5},E[54]=v,E[55]=q,E[56]=p,E[57]=m,E[58]=a,E[59]=t):t=E[59],e=r.createElement(y.A,t),E[49]=v,E[50]=q,E[51]=p,E[52]=m,E[53]=e}else e=E[53];n=e}E[60]!==V?(l=V?e1.t("Message options"):e1.t("Schedule for later"),E[60]=V,E[61]=l):l=E[61];let h=l;E[62]!==v||E[63]!==h||E[64]!==u?(s=r.createElement(y.A,{className:u,tabIndex:-1,"aria-disabled":v,"data-qa":"texty_send_options_button","aria-label":h,size:"x-small",svgIconProps:e3}),E[62]=v,E[63]=h,E[64]=u,E[65]=s):s=E[65];let _=s;if(E[66]!==N||E[67]!==n||E[68]!==p||E[69]!==j||E[70]!==W||E[71]!==_||E[72]!==h||E[73]!==d||E[74]!==D){let e,t,a;if(E[76]!==d?(e={className:d},E[76]=d,E[77]=e):e=E[77],E[78]!==N||E[79]!==n||E[80]!==p){let e,a;if(E[82]!==N||E[83]!==p){let t,a=N?e2:void 0;E[85]!==p||E[86]!==a?(t={title:p,modifiers:a,mainKey:"Return",useSlimModifiers:!0},E[85]=p,E[86]=a,E[87]=t):t=E[87],e=r.createElement(eP.A,t),E[82]=N,E[83]=p,E[84]=e}else e=E[84];E[88]!==e?(a={position:"top-right",tip:e},E[88]=e,E[89]=a):a=E[89],t=r.createElement(g.Ay,a,n),E[78]=N,E[79]=n,E[80]=p,E[81]=t}else t=E[81];E[90]!==j||E[91]!==W||E[92]!==_||E[93]!==h||E[94]!==D?(a=D?r.createElement(eR.Ay,{orientation:"top-left",coachmarkElement:W},_):r.createElement(C.cQ,{renderMenu:j,position:"top-right",offsetX:0},r.createElement(g.Ay,{position:"top-right",tip:h},_)),E[90]=j,E[91]=W,E[92]=_,E[93]=h,E[94]=D,E[95]=a):a=E[95],c=r.createElement("span",e,t,a),E[66]=N,E[67]=n,E[68]=p,E[69]=j,E[70]=W,E[71]=_,E[72]=h,E[73]=d,E[74]=D,E[75]=c}else c=E[75];return c}E[96]!==v?(f=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--send c-wysiwyg_container__button--experiment_draft_scheduling",{"c-wysiwyg_container__button--disabled":v}),E[96]=v,E[97]=f):f=E[97];let z=f,K=T===eY.Y.THREAD||T===eY.Y.THREADS_VIEW;E[98]!==K?(b=K?e1.t("Send reply"):e1.t("Send message"),E[98]=K,E[99]=b):b=E[99];let $=b;if(E[100]!==$||E[101]!==z||E[102]!==v||E[103]!==q){let e,t=v?-1:0;E[105]!==$||E[106]!==z||E[107]!==v||E[108]!==q||E[109]!==t?(e={tabIndex:t,className:z,"aria-disabled":v,onClick:q,"data-qa":"texty_send_button","aria-label":$,size:"x-small",svgIconProps:e5},E[105]=$,E[106]=z,E[107]=v,E[108]=q,E[109]=t,E[110]=e):e=E[110],A=r.createElement(y.A,e),E[100]=$,E[101]=z,E[102]=v,E[103]=q,E[104]=A}else A=E[104];let Y=A;if(E[111]!==Y){let e;E[113]===Symbol.for("react.memo_cache_sentinel")?(e={position:"top-right",tip:e1.t("Send message")},E[113]=e):e=E[113],x=r.createElement(g.Ay,e,Y),E[111]=Y,E[112]=x}else x=E[112];return x}:({draftId:e,disabled:t,onSend:a,onScheduleSend:n,enableScheduleSendButton:l,viewContext:c,enterCreatesNewlinePref:d})=>{let m=(0,i.wA)(),u=(0,F.d4)(e$.A),p=(0,F.d4)(t=>(0,eG.YI)(t,e)),h=(0,eV.l7)(p),_=h?.[0]?.thread_ts;(0,eM.A)(()=>{m(eF({threadTs:_}))},!!_);let f=(0,F.d4)(e=>!!_&&(0,e0.Hp)(e,eD.xu.IN_PRODUCT_COACHMARK)===eD.jo.EDUCATION_SCHEDULED_SEND_IN_THREADS),{closeCoachmark:b,renderCoachmark:A}=(0,eU.A)(eD.jo.EDUCATION_SCHEDULED_SEND_IN_THREADS),x=(0,r.useCallback)(()=>{b()},[b]),E=A({arrowPosition:95,bodyText:e1.t("Schedule a message to be sent later in a thread. Your future self will thank you."),title:e1.t("Write now, send later"),closeCoachmark:x,closeCoachmarkFromOutsideClick:x}),k=!1;p&&(k=!!(0,eV.mI)(p).length);let v=!!(0,eV.V)(p),S=(0,r.useCallback)(()=>{m((0,eB.o)((0,eH.ZF)(eW.c.ScheduledMessages))),k&&v&&m((0,eX.RL)({draftId:null}))},[m,k,v]),I=(0,r.useCallback)(()=>{if(a)return a({fromKeyboardShortcut:!1})},[a]),w=(0,r.useCallback)(t=>v?r.createElement(ez,{menuProps:t,draftId:e,onSend:I}):r.createElement(eK.A,{menuProps:t,draftId:e,onScheduleSend:n||s.A,viewContext:c}),[v,n,c,e,I]);if(l&&!u){let e,a=o()("c-wysiwyg_container__send_button--with_options",{"c-wysiwyg_container__send_button--with_options_disabled":t}),n=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--send",{"c-wysiwyg_container__button--disabled":t}),i=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--send_options",{"c-wysiwyg_container__button--disabled":t}),l=v?e1.t("Save changes"):e1.t("Send now");e=v?r.createElement(y.A,{className:n,tabIndex:t?-1:0,"aria-disabled":t,onClick:S,"data-qa":"texty_done_editing_scheduled_message_button","aria-label":l,size:"x-small",svgIconProps:e4}):r.createElement(y.A,{className:n,tabIndex:t?-1:0,"aria-disabled":t,onClick:I,"data-qa":"texty_send_button","aria-label":l,size:"x-small",svgIconProps:e5});let s=v?e1.t("Message options"):e1.t("Schedule for later"),c=r.createElement(y.A,{className:i,tabIndex:-1,"aria-disabled":t,"data-qa":"texty_send_options_button","aria-label":s,size:"x-small",svgIconProps:e3});return r.createElement("span",{className:a},r.createElement(g.Ay,{position:"top-right",tip:r.createElement(eP.A,{title:l,modifiers:d?e2:void 0,mainKey:"Return",useSlimModifiers:!0})},e),f?r.createElement(eR.Ay,{orientation:"top-left",coachmarkElement:E},c):r.createElement(C.cQ,{renderMenu:w,position:"top-right",offsetX:0},r.createElement(g.Ay,{position:"top-right",tip:s},c)))}let T=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--send c-wysiwyg_container__button--experiment_draft_scheduling",{"c-wysiwyg_container__button--disabled":t}),N=c===eY.Y.THREAD||c===eY.Y.THREADS_VIEW?e1.t("Send reply"):e1.t("Send message"),M=r.createElement(y.A,{tabIndex:t?-1:0,className:T,"aria-disabled":t,onClick:I,"data-qa":"texty_send_button","aria-label":N,size:"x-small",svgIconProps:e5});return r.createElement(g.Ay,{position:"top-right",tip:e1.t("Send message")},M)};function mapStateToProps(e,{disabled:t,isInputExpanded:a}){let n=t;return(0,eJ.TP)(e)||(n=!0),{disabled:n,enterCreatesNewlinePref:(0,eQ.A)(e,a)}}e6.displayName="SendButton";let e8=(0,eZ.N)(mapStateToProps)(e6),e7=new u.Ay("slackforce"),e9=r.memo((0,eT.Ar)()?e=>{let t,a,n=(0,eN.c)(6),{isDisabled:i,onSendEmail:l}=e;n[0]!==l?(t=()=>{l?.({fromKeyboardShortcut:!1})},n[0]=l,n[1]=t):t=n[1];let o=t;if(n[2]!==i||n[3]!==o){let e;n[5]===Symbol.for("react.memo_cache_sentinel")?(e=e7.t("Send Email",{fallbackHash:"be4e8e2d0338ca30919508fcd48c7041e43bf54a",fallbackHashNs:"member_actions"}),n[5]=e):e=n[5],a=r.createElement(h.$n,{type:"primary",size:"small",onClick:o,disabled:i},e),n[2]=i,n[3]=o,n[4]=a}else a=n[4];return a}:({isDisabled:e,onSendEmail:t})=>{let a=(0,r.useCallback)(()=>{t?.({fromKeyboardShortcut:!1})},[t]);return r.createElement(h.$n,{type:"primary",size:"small",onClick:a,disabled:e},e7.t("Send Email",{fallbackHash:"be4e8e2d0338ca30919508fcd48c7041e43bf54a",fallbackHashNs:"member_actions"}))});var te=a(0x14149c126),tt=a(0x624c12c8);let ta=new u.Ay("texty"),tn={name:"stop-filled"},tr=(0,eT.Ar)()?e=>{let t,a,n,l,s,c,d,m=(0,eN.c)(24),{onStop:u,isStopInProgress:p,threadTs:h}=e,_=void 0!==p&&p,f=(0,i.wA)();m[0]!==f||m[1]!==h?(t=()=>{f((0,tt.w)({eventId:W.EventId.SLACKBOTAI_RESPONSE_STOP,threadTs:h,uiAction:W.UiAction.IMPRESSION}))},a=[f,h],m[0]=f,m[1]=h,m[2]=t,m[3]=a):(t=m[2],a=m[3]),(0,r.useEffect)(t,a),m[4]!==f||m[5]!==u||m[6]!==h?(n=()=>{f((0,tt.w)({eventId:W.EventId.SLACKBOTAI_RESPONSE_STOP,threadTs:h,uiAction:W.UiAction.CLICK})),u&&u()},m[4]=f,m[5]=u,m[6]=h,m[7]=n):n=m[7];let b=n,A=(0,F.d4)(_temp);m[8]===Symbol.for("react.memo_cache_sentinel")?(l=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--stop"),m[8]=l):l=m[8];let x=l;m[9]!==A?(s=A?ta.t("Stopping\u2026"):"Stopping\u2026",m[9]=A,m[10]=s):s=m[10];let E=s;m[11]!==A?(c=A?ta.t("Stop response"):"Stop response",m[11]=A,m[12]=c):c=m[12];let C=c,k=_?E:C;if(m[13]!==b||m[14]!==_||m[15]!==C||m[16]!==k){let e,t;m[18]!==k?(e={position:"top-right",tip:k},m[18]=k,m[19]=e):e=m[19],m[20]!==b||m[21]!==_||m[22]!==C?(t=r.createElement(y.A,{className:x,onClick:b,disabled:_,"data-qa":"texty_stop_button","aria-label":C,size:"x-small",svgIconProps:tn}),m[20]=b,m[21]=_,m[22]=C,m[23]=t):t=m[23],d=r.createElement("span",null,r.createElement(g.Ay,e,t)),m[13]=b,m[14]=_,m[15]=C,m[16]=k,m[17]=d}else d=m[17];return d}:({onStop:e,isStopInProgress:t=!1,threadTs:a})=>{let n=(0,i.wA)();(0,r.useEffect)(()=>{n((0,tt.w)({eventId:W.EventId.SLACKBOTAI_RESPONSE_STOP,threadTs:a,uiAction:W.UiAction.IMPRESSION}))},[n,a]);let l=(0,r.useCallback)(()=>{n((0,tt.w)({eventId:W.EventId.SLACKBOTAI_RESPONSE_STOP,threadTs:a,uiAction:W.UiAction.CLICK})),e&&e()},[n,e,a]),s=(0,F.d4)(e=>"on"===(0,te._Z)(e,"new_slackbot_voice_announcement_messages")),c=o()("c-wysiwyg_container__button","c-wysiwyg_container__button--stop"),d=s?ta.t("Stopping\u2026"):"Stopping\u2026",m=s?ta.t("Stop response"):"Stop response",u=t?d:m;return r.createElement("span",null,r.createElement(g.Ay,{position:"top-right",tip:u},r.createElement(y.A,{className:c,onClick:l,disabled:t,"data-qa":"texty_stop_button","aria-label":m,size:"x-small",svgIconProps:tn})))};function _temp(e){return"on"===(0,te._Z)(e,"new_slackbot_voice_announcement_messages")}tr.displayName="StopButton";var ti=a(0x1b71550d9),tl=a(0x1aa23d71),to=a(0xd843ab47),ts=a(0xc4c44125),tc=a(0x5bd26d75),td=a(0x6d72337),tm=a(0x16d4244ae),tu=a(0x1ccef1c6f),tp=a(0x12f41fc32),th=a(0x1c557d6a0),t_=a(0x599c2680),tf=a(0x1fb2d2a87),tb=a(0x19dffa924),tg=a(0x1a8f65ec3),ty=a(0xb90eea20),tA=a(0x120395fb7),tx=a.n(tA);let tE=new u.Ay("drafts");function WysiwygContainer({channelId:e,children:t,className:a,confirmationSuffixButtons:n,enableDividerForShortcutsButton:l=!1,enableComposerButton:u=!1,enableEmojiButton:y=!1,enableGifPicker:A=!1,enableEmojiButtonBadge:x=!1,enableExpandButton:E=!1,enableFileButton:C=!1,enableMentionButton:k=!1,enableAgentMentionButton:v=!1,enableSendButton:S=!1,enableSendEmailButton:I=!1,enableTriggerAiComposerButton:w=!1,enableShortcutsButton:T=!1,enableStoryButton:N=!1,enableAudioButton:M=!1,enableScheduleSendButton:R=!1,enableSlashCommandsButton:P=!1,enableClipsRepackagingCoachmark:L=!1,enableSubmitButton:O=!1,enableSkillsButton:D=!1,enableEmailDraftButton:U=!1,enableDictationButton:B=!1,onTranscriptionComplete:H,submitButtonText:W,forceFileMenuOpen:V=!1,isDisabled:G=!1,isInvalid:q=!1,isExpanded:j=!1,isSendingDisabled:z=!1,isMinDraftLengthForComposerAi:K=!1,isSubmitButtonDisabled:$=!1,numMaxLines:Y,numMinLines:Q,onGifSelected:Z=s.A,onExpand:J,onFileMenuClose:X,onFileMenuOpen:ee,onFilesSelected:et,onSubmit:ea,onSubmitButtonSubmit:en,onScheduleSend:er,renderFileMenu:ei,onEmailDraftButtonClicked:ed,threadTs:em,viewContext:eu,windowId:ep,forcePlainTextModeDisabled:eh=!1,withWorkflowTokens:e_=!1,useExpandedRichText:ef=!1,forceToolbarDisabled:eb=!1,withBasicContainerBorder:eg=!1,hints:ey=m.Ml,errors:eA=m.Ml,day1ProgressiveDisclosureHighlighting:ex=!1,showProgressiveDisclosureFirstMessageFlag:eE=!1,showProgressiveDisclosureAtMentionFlag:eC=!1,draftId:ek,isComposerPage:ev=!1,isFeedbackFlexpaneComposer:eS=!1,isTextyInputEmpty:eI,showDefaultChannelEmojiCoachmark:ew=!1,showDefaultChannelClipsCoachmark:eT=!1,composerWorkflowHatContainerIsVisible:eN=!1,renderWorkflowBuilderEditLinkInput:eM,onEscape:eR=s.A,showWorkflowOptionItemMentionTip:eP=!1,showHighlightOnSaveButton:eL=!1,shouldForceShortcutsMenuOpen:eO=!1,shouldForceFileMenuOpen:eD=!1,isEditMessageShortcutsButton:eF=!1,wfbAiPromptButtons:eU,limitShortcutsMenuToFileUpload:eB=!1,enableStopButton:eH=!1,onStop:eW,isStopInProgress:eV=!1,overrideFormattingEnabled:eq,onComposerFormatButtonToggle:ej}){let ez,eK,{windowRef:e$}=(0,r.useContext)(d._0),eQ=(0,r.useRef)(null),[eZ,eJ]=(0,r.useState)(!1),eX=(0,F.d4)(t=>(0,ts.M)(t,{channelId:e})),e0=(0,F.d4)(tc.G),e1=eu===eY.Y.MESSAGE_PANE&&e0&&!(0,c.A)(eX),e2=(0,F.d4)(t=>!!e&&eu===eY.Y.MESSAGE_PANE&&(0,tb.XM)(t,e)),e4=(0,F.d4)(t=>(0,ty.S)(t,e,eu)),e5=(0,F.d4)(t=>(0,tg.N)(t,e,eu)),e3=z?0:(ez=eQ.current)?ez.getButtons().findIndex(e=>e.classList.contains("c-wysiwyg_container__button--send")):0;(0,c.A)(n)||(e3=(eK=eQ.current)?eK.getButtons().findIndex(e=>e.classList.contains("c-wysiwyg_container__suffix__confirmation-buttons--save")):0),(0,r.useEffect)(()=>{if(!eZ)return;let e=eQ.current;if(!e)return;let t=e.getButtons().find(e=>e.classList.contains("c-wysiwyg_container__button--composer"));t&&t.focus()});let e6=(0,i.wA)(),e7=(0,F.d4)(eG.kx),te=eq??e7,tt=(0,F.d4)(e=>!!(0,tu.ty)(e,"plain_text_mode")),ta=!eb&&(eh||!tt),tn=(0,F.d4)(tf.to),tA=(0,r.useRef)(),[tC,tk]=(0,r.useState)(!1),[tv,tS]=(0,r.useState)([]),[tI,tw]=(0,r.useState)(!1),[tT,tN]=(0,r.useState)(),tM=(0,r.useMemo)(()=>({setTextyInstance:e=>{tA.current=e},setIsFocused:tk,setActiveFormats:tS,setToolbarOverflowVisible:tw,setToolbarPositionData:tN}),[]),tR=(0,r.useCallback)(e=>{e&&(eJ(!0),eJ(!1))},[eJ]),tP=(0,r.useCallback)((e,{focusOnUpdate:t}={focusOnUpdate:!1})=>{e.current===e$.deref()?.document.activeElement&&e.current?.classList?.contains("c-button--focus-visible")&&!t&&tA?.current?.focus(),ej?ej(!te):e6((0,tp.AZ)({pref:"msg_input_sticky_composer",value:!te})),e6((0,tl.Zt)({isEnabled:!te})),tR&&tR(t)},[e6,te,ej,e$,tR]),tL=(0,r.useMemo)(()=>T&&r.createElement("div",{className:"c-wysiwyg_container__prefix","data-qa":"wysiwyg-container_prefix"},(0,td.Hn)({channelId:e,isDisabled:G,threadTs:em,viewContext:eu,onFilesSelected:et,draftId:ek,isComposerPage:ev,onFileMenuClose:X,forceFileMenuOpen:V||eD,textyRef:tA,onGifSelected:Z,forceOpen:eO,windowId:ep,isEditMessageShortcutsButton:eF,limitShortcutsMenuToFileUpload:eB})),[T,e,G,em,eu,et,ek,ev,X,V,eD,Z,eO,ep,eF,eB]),tO=(0,r.useMemo)(()=>r.createElement(ti.A,{enableDividerForShortcutsButton:l,enableComposerButton:u&&ta,isFormattingEnabled:te,enableEmojiButton:y,enableGifPicker:A,enableEmojiButtonBadge:x,enableFileButton:C,enableAgentMentionButton:v,enableMentionButton:k,enableSendButton:S,enableStoryButton:N,enableAudioButton:M,enableScheduleSendButton:R,enableSlashCommandsButton:P,enableSubmitButton:O,enableSkillsButton:D,enableEmailDraftButton:U,enableDictationButton:B,onTranscriptionComplete:H,submitButtonText:W,onSubmitButtonSubmit:en,isSubmitButtonDisabled:$,enableClipsRepackagingCoachmark:L,forceFileMenuOpen:V,onGifSelected:Z,onComposerClick:tP,onFileMenuClose:X,onFileMenuOpen:ee,onFilesSelected:et,renderFileMenu:ei,onEmailDraftButtonClicked:ed,textyRef:tA,showProgressiveDisclosureAtMentionFlag:eC,draftId:ek||"",viewContext:eu,windowId:ep,channelId:e,threadTs:em,isFeedbackFlexpaneComposer:eS,isTextyInputEmpty:eI,textyHasFocus:tC,showDefaultChannelEmojiCoachmark:ew,showDefaultChannelClipsCoachmark:eT,showWorkflowOptionItemMentionTip:eP,isMinDraftLengthForComposerAi:K}),[l,u,ta,te,y,A,x,C,v,k,S,N,M,R,P,O,D,U,B,H,ed,W,en,$,L,V,Z,tP,X,ee,et,ei,eC,ek,eu,ep,e,em,eS,eI,tC,ew,eT,eP,K]),tD=null;(0,c.A)(n)?eH&&eW?tD=r.createElement(tr,{onStop:eW,isStopInProgress:eV,threadTs:em}):S?tD=w?r.createElement("div",{className:tx().sendButtonsGroup,"data-qa":"send_buttons_group"},r.createElement(e8,{disabled:z||G,onSend:ea,enableScheduleSendButton:R,onScheduleSend:er,draftId:ek||"",viewContext:eu||"",isInputExpanded:j})):r.createElement(e8,{disabled:z||G,onSend:ea,enableScheduleSendButton:R,onScheduleSend:er,draftId:ek||"",viewContext:eu||"",isInputExpanded:j}):eU&&!(0,c.A)(eU)?tD=r.createElement(AiPromptCustomToolbarButtons,{segment:eU.segment,insertVariableButton:eU.insertVariableButton,onExpandCollapsePromptClick:eU.onExpandCollapsePromptClick,isPromptExpanded:!!eU.isPromptExpanded,enablePromptToolsButton:!!eU.enablePromptToolsButton,textyRef:tA}):I&&(tD=r.createElement(e9,{isDisabled:z||G,onSendEmail:ea})):tD=r.createElement("div",{className:"c-wysiwyg_container__suffix__confirmation-buttons"},r.createElement(h.Ay,{tabIndex:-1,type:"outline",size:"small",onClick:n?.onCancelClick},tE.t("Cancel")),r.createElement("span",{className:o()("margin_left_50 c-wysiwyg_container__suffix__confirmation-buttons--save",{"c-wysiwyg_container__suffix__confirmation-buttons--save-highlighted":eL})},r.createElement(h.Ay,{tabIndex:n?.isSaveDisabled?-1:0,size:"small",onClick:n?.onSaveClick,"aria-disabled":n?.isSaveDisabled},tE.t("Save"))));let tF=(0,r.useMemo)(()=>r.createElement("div",{className:"c-wysiwyg_container__toolbar_buttons","data-qa":"wysiwyg-container_toolbar-buttons"},tO),[tO]),onFooterClick=t=>{let a=t.target;if(a.closest(".c-wysiwyg_container__footer")&&!a?.closest("button")){let t=(0,tm.zC)({viewContext:eu,channelId:e,threadTs:em});t?.focus()}},tU=(0,r.useCallback)(()=>{let t=(0,tm.zC)({viewContext:eu,channelId:e,threadTs:em});t?.focus()},[eu,e,em]),tB=(0,r.useCallback)(()=>{let t=(0,tm.zC)({viewContext:eu,channelId:e,threadTs:em});t?.focus(),J?.(!j)},[j,J,eu,e,em]);function ExpandInputButton({isInputExpanded:e,onClick:t}){let a=(0,r.useContext)(p.A);return r.createElement(g.Ay,{tip:e?tE.t("Collapse"):tE.t("Enlarge message composer"),delay:500,position:"left"},r.createElement(_.A,{"aria-pressed":e,"aria-label":e?tE.t("Collapse"):tE.t("Enlarge message composer"),className:o()("c-wysiwyg_container__button--expand_toggle",{"c-wysiwyg_container__button--expand_toggle_opacity":a}),onClick:t},r.createElement(f.Ah,{size:"inherit",name:e?"arrow-collapse":"arrow-expand"})))}ExpandInputButton.displayName="ExpandInputButton";let tH=(0,r.useCallback)(({source:e})=>e6((0,th.A)({textyInstance:tA.current,source:e,renderWorkflowBuilderEditLinkInput:eM})),[e6,eM]),tW=(0,r.useMemo)(()=>ta&&r.createElement(TextyFormattingBar,{useStickyComposer:te,textyHasFocus:tC,textyRef:tA,activeFormats:tv,showLinkForm:tH,useWorkflowTokens:e_,useExpandedRichText:ef,toolbarOverflowVisible:tI,setToolbarOverflowVisible:tw,toolbarPositionData:te?void 0:tT,enableStickyComposer:!1,isDisabled:G,onEscape:eR}),[ta,te,tC,tv,tH,e_,ef,tI,tT,G,eR]),tV=ta&&r.createElement(b.A,{className:o()({"c-wysiwyg_container__formatting":te,"c-wysiwyg_container__formatting_workflow_access":eN,"c-wysiwyg_container__formatting--with_workflow":e1,"c-wysiwyg_container__formatting--message-input-banner-visible":e2||e4||e5}),"data-qa":te?"wysiwyg-container_formatting-enabled":"",...te&&{onClick:t=>{let a=t.target;if(a.closest(".c-wysiwyg_container__formatting")&&!a?.closest("button")){let t=(0,tm.zC)({viewContext:eu,channelId:e,threadTs:em});t?.focus()}}},"aria-label":tE.t("Formatting")},tW),tG=(0,F.d4)(eo.KC),{container:tq,windowId:tj}=(0,r.useContext)(to.A),tK=(0,F.d4)(t=>{let a=em?`${e}:${em}`:e;if(!a)return!1;let{isOpen:n,openedFrom:r}=(0,t_.VA)(t,a);return!!n&&!!r&&r.container===tq&&r.windowId===tj}),t$=(0,r.useMemo)(()=>{if(tG)return tK?{visibility:"hidden",height:"55px"}:void 0},[tG,tK]);return r.createElement(el.A,null,({measureRef:e,width:n})=>{let i=r.createElement(b.A,{style:t$,className:o()("c-wysiwyg_container__footer",{"c-wysiwyg_container__footer--with_formatting":ta&&te}),onClick:onFooterClick,ref:eQ,"aria-label":tE.t("Composer actions"),activeItemIndex:e3,onFocusedElementRemoved:tU},tL,tF,tD&&!tL&&!(ta&&te)&&r.createElement("div",{className:"c-wysiwyg_container__spacer"}),r.createElement("div",{className:"c-wysiwyg_container__suffix","data-qa":"wysiwyg-container_suffix"},tD));return r.createElement(ec.A.Provider,{value:tM},r.createElement(es.A,{className:o()(a,"c-wysiwyg_container",`c-wysiwyg_container--theme_${tn}`,"c-wysiwyg_container--with_footer",{[`c-wysiwyg_container--theme_${tn}_bordered`]:!eg,"c-wysiwyg_container--disabled":G,"c-wysiwyg_container--workflow":e1,"c-wysiwyg_container--double_decker":n<400,"c-wysiwyg_container--with_floating_toolbar":ta&&!te,"c-wysiwyg_container--expandable":E,"c-wysiwyg_container--day1-prog-disc":!!ex&&!e2,"c-wysiwyg_container--day1-prog-disc_ia4":!!ex&&!e2,"c-wysiwyg_container--day1-prog-disc-first-message-tip":!!eE}),hideBorder:!eg,isDisabled:G,isInvalid:q,hints:ey,errors:eA,numMaxLines:Y,numMinLines:Q,ref:e},tV,t,i,E&&r.createElement(ExpandInputButton,{isInputExpanded:j,onClick:tB})))})}WysiwygContainer.displayName="WysiwygContainer";let tC=WysiwygContainer},0x67607d6d:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x1faaed399),o=a(0x65a0a57d),s=a(0x3711e82d),c=a(0x1559b24f7),d=a(0x226892387),m=a(0x1b86f8de5),u=a(0x1988881a0),p=a(0xfd11a83e),h=a(0x207f3d408),_=a(0xb728fb29);let EmojiButton=({enableEmojiButtonBadge:e=!1,enableMentionButton:t=!1,enableGifPicker:a=!1,onClick:f=i.A,onEmojiMenuTriggerClick:b=i.A,onEmojiSelected:g=i.A,onGifSelected:y=i.A,textyRef:A,draftId:x,viewContext:E,windowId:C,threadTs:k,disabled:v=!1})=>{let S=(0,r.wA)(),{viewContext:I,windowId:w,threadTs:T}=(0,d.d4)(_.Nk)??{},N=I&&w&&I===E&&C===w&&k===T,M=(0,d.d4)(u.BH)&&a,[R,P]=(0,n.useState)(void 0),L=(0,n.useCallback)(()=>{S((0,m.at)())},[S]),O=(0,n.useCallback)(()=>{if(b(),L(),!t||!A?.current)return;let e=A.current.getSelection(),a=A.current?.quill?.container?.getBoundingClientRect();if(e&&a&&!M){let t=A.current.getBounds(e.index,e.length);P({top:a.top+t.top,left:a.left+t.left,right:a.right+t.right,bottom:a.bottom+t.bottom,width:a.width,height:a.height})}if(!e||e.length)return;let n=e.index>0?A.current.getTextForRange(e.index-1,1):"";A.current.getFormat(e.index).slackmention||"@"!==n||A.current.deleteText(e.index-1,1)},[b,L,t,A,M]),D=(0,n.useCallback)((e,t)=>{A?.current&&(y(t),S((0,p.T)({payload:t,draftId:x})),setTimeout(()=>{A.current.focus()},0))},[S,x,y,A]),F=(0,n.useCallback)((e,t)=>{if(g(t),!A?.current)return;let a=A.current.getSelection();if(!a)return;let n=A.current.getFormats(a.index)||{},r=!(n.code||n["code-block"])&&A.current.options.inlineEmojiIsEnabled(),i=`:${t}:`,l=(0,c.A)(i,{shouldUseInlineEmoji:r,formats:n});setTimeout(()=>{A.current.insertContentsAtCursor({contents:l.ops})},0)},[A,g]),U=(0,n.useCallback)(e=>{N&&A.current.focus(),S((0,h.lM)(void 0))},[S,N,A]);return n.createElement(l.A,{onClick:O,onEmojiSelected:F,offsetX:M?-70:-17,offsetY:M?-40:void 0,position:"top-left",tryOppositePosition:!0,targetBounds:R,onClose:U,enableGifPicker:a,onGifSelected:D,openNativeGifPicker:!!N,openedBy:N?s.UiStep.GIFS_PICKER_OPENED_FROM_SLASH_COMMAND:s.UiStep.GIFS_PICKER_OPENED_FROM_EMOJI_BUTTON},n.createElement(o.g,{disabled:v,enableEmojiButtonBadge:e,enableGifPicker:a,onClick:f}))};EmojiButton.displayName="EmojiButton";let f=EmojiButton},0x17205d3a0:(e,t,a)=>{"use strict";a.d(t,{A:()=>buildEmojiReplacementDelta});var n=a(0xb77a689a),r=a(0x17294c72a),i=a(0x118cdcdea),l=a.n(i),o=a(0x190e60a66),s=a(0x20b4dda68),c=a(0xec9d0658),d=a(0x120b95954),m=a(0x1a5eb0e27),u=a(0x1ee9b884b),p=a(0x12c4a318d),h=a(0x1829a8d43),_=a(0x223ac29bb),f=a(0x18cf3444e),b=a(0x504b7e5),g=a(0x62e9ff8f),y=a(0x5a228fbb),A=a(0xa326966e),x=a(0xe7cb9732),E=a(0x4cd77de3),C=a(0x222762a83),k=a(0x2398accc),v=a(0x1f45d59b6),S=a(0xd40f768d),I=a(0x1266f1359),w=a(0x1e4ae349d);let T=RegExp(/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/,"ig");function buildEmojiReplacementDelta(e,t={useWysiwyg:!1,usePlainTextMode:!1,inlineEmojiIsEnabled:!1,emojiNames:[],locale:void 0,replaceNativeEmoji:!1,teamId:void 0}){let a=new(l()),i=0,N=0;if(!t.inlineEmojiIsEnabled)return a;let M=null;return(0,b.A)(e,(l,b)=>{let R=!(0,x.A)(b),P=(0,y.A)(l);if(!R||!(0,k.A)(l)||(0,C.Ay)(l)||(0,A.A)(l)){i+=P,M=l;return}let L=l.attributes,O=[],D=t.useWysiwyg&&!t.usePlainTextMode,F=(0,o.F)().getLocaleForLastViewedTeam(),U="";U=(0,_.DU)(F)&&(0,n.A)(l.insert)?l.insert.replace(/\uFF1A/g,":"):(0,n.A)(l.insert)?l.insert:"";let B=D?[]:(0,f.A)(U);U.replace((0,c.A)(),(a,n,r)=>{if(!D&&(0,v.A)(r,B)||!D&&(0,S.A)((0,g.A)(e,0,i+r)))return;let l=(0,m.A)(a,{emojiNames:t.emojiNames,locale:t.locale||"",teamId:t.teamId||""});if(l){let e=/^:[0-9]+:$/.test(l),t=U.substring(0,r),a=/(^|\s)[0-9]+$/.test(t);e&&a&&(l="")}l&&O.push({match:l,index:r,matchLength:a.length,attributes:L})});let H=t.teamId&&(0,I.$D)(t.teamId);if(t.replaceNativeEmoji){let e=(0,p.A)(t.teamId);U.replace(e,(e,t,a,n)=>{if(n>0){let t=U.charAt(n-1);if(t===s._x||T.test(t)&&p.p.includes(e))return}let r=(0,u.A)(e)||"",i=(0,w.qJ)(H,r),l=i?`:${i}:`:null;l&&O.push({match:l,index:n,matchLength:e.length,nativeEmojiReplacement:!0,attributes:L})})}if((O=(0,r.A)(O,"index")).length){let e=0,n=0;O.forEach((r,l)=>{let o=!1,s=r.match,c=0,m=r.matchLength;c=0===l?i+r.index-N:r.index-e-n;let u=s.match(d.x),p=null,_=null;if(u&&(_=parseInt(u[2],10)||null,p=parseInt(u[3],10)||null),!r.nativeEmojiReplacement&&0===l&&0===r.index&&u&&M&&(0,E.Ay)(M)){let e=(0,h.A)((0,E.Um)(M));(!p&&(0,w.Fm)(H,{text:e?.name||"",teamId:t.teamId||""})||p&&_!==p&&(0,w.pA)(H,{text:e?.name||"",teamId:t.teamId||""}))&&(c-=1,m+=1,s=`:${e?.name}:${s}`,o=!0)}e=r.index,n=r.matchLength,N=i+e+n,(o||!p)&&(c&&a.retain(c),a.delete(m).insert({slackemoji:{text:s}},r.attributes))})}i+=P,M=l}),a}},0x1c8c09533:(e,t,a)=>{"use strict";function calculateToolbarPosition({toolbarHeight:e,toolbarWidth:t,toolbarPositionData:a,toolbarPositioning:n="top",continuouslyCenterWithinEditor:r=!1}){let i={left:0,top:0};if(!a)return i;let{rect:l,editorWidth:o,containerWidthBound:s,containerLeftBound:c,containerTopBound:d,viewportWidth:m}=a;if(!l)return i;let u=l.left+c,p=l.top+d-e-5;"bottom"===n&&(p=l.bottom+d+5);let h=u;l.width>=t?l.width!==o&&(h=u+Math.abs((l.width-t)/2)):l.width<t&&u>o/2-o/4&&l.right<o/2+o/4?h=u-Math.abs((l.width-t)/2):l.width<t&&u>t&&(h=u-(t-l.width));let _=m-10-h-t;if(_<0&&(h-=-1*_),r){let e=(s-o)/2,a=Math.max(c+e-12,8);h=Math.min(Math.min(c+e+o-t+12,m-t-8),Math.max(h=l.width===o?u-12:u+(l.width-t)/2,a))}return{left:h,top:p}}function calculateToolbarPositioning({toolbarHeight:e,toolbarRect:t}){return t?t.top<e+5?"bottom":"top":void 0}a.d(t,{Ay:()=>calculateToolbarPosition,JV:()=>calculateToolbarPositioning})},0x10e0f5452:(e,t,a)=>{"use strict";a.d(t,{A:()=>getButtonsAndFormats});var n=a(0x16a140c5a);function getButtonsAndFormats({useWorkflowTokens:e,useQuipTokens:t=!1,useVariables:a=!1,useExpandedRichText:r=!1,quipThreadButtonType:i=n.EM.NONE,reachMaxVariables:l=!1,quipReactionButtonType:o=n.dK.NONE,collapseIntoOverflow:s=!1,collapseTextEmphasisFormats:c=!1,experimentCanvasAiContentCreationGroupOn:d=!1,experimentCanvasUnderlineGroupOn:m=!1,experimentCanvasBlockquoteLayoutGroupOn:u=!1,isUnderlineEnabled:p=!1,focusedInLayoutSection:h=!1}){if(r)return{formats:["h1","h2","h3","bold","italic","strike","link","code","bullet-list","check-list","ordered-list","check-list","code-block","blockquote"],buttons:[["menu"],["bold","italic","strike","code","link"],["ordered-list","bullet-list","check-list","blockquote","code-block","slackhorizontalrule"]],menuItems:["h1","h2","h3","paragraph"],menuPosition:"top-left"};if(e)return{formats:["bold","italic","strike","link","code","bullet-list","ordered-list","code-block","blockquote"],buttons:[["bold","italic","strike","code","link"],["ordered-list","bullet-list","blockquote","code-block"]]};if(t)return(0,n.zk)({collapseIntoOverflow:s,collapseTextEmphasisFormats:c,experimentCanvasAiContentCreationGroupOn:d,experimentCanvasBlockquoteLayoutGroupOn:u,experimentCanvasUnderlineGroupOn:m,focusedInLayoutSection:h,quipReactionButtonType:o,quipThreadButtonType:i,reachMaxVariables:l,useVariables:a});if(p){let e=["bold","italic","underline","strike","link","code","bullet-list","ordered-list","code-block","blockquote"];return e.includes("border")||e.push("border"),{formats:e,buttons:[["bold","italic","underline","strike"],["link"],["ordered-list","bullet-list"],["blockquote"],["code","code-block"]]}}let _=["bold","italic","strike","link","code","bullet-list","ordered-list","code-block","blockquote"];return _.includes("border")||_.push("border"),{formats:_,buttons:[["bold","italic","strike"],["link"],["ordered-list","bullet-list"],["blockquote"],["code","code-block"]]}}},0x3e6dd1df:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0x1a1e04036),r=a.n(n),i=a(0xd46d8b9d),l=a(0x833abd5f);let o=(0,i.eF)(i.vt.QUILL,e=>e===window?(0,l.A)():r()(e))},0x1e58a28f4:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>o,Ru:()=>r.a});var n=a(0x118cdcdea),r=a.n(n),i=a(0x833abd5f);a(0x7b9828a4),a(0x1f28aba72),a(0x130405be8),a(0x66ac0b5a),a(0x159c8cd93);var l=a(0x1376b128);(0,i.A)();let o=l.A},0x10bd0ba09:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x14fad6485),i=a(0x1376b128),l=a(0x4dc18535),o=a(0x226892387);let s=n.forwardRef((e,t)=>{let{windowRef:a}=(0,n.useContext)(r._0),s=(0,o.d4)(l.h);return n.createElement(i.A,{...e,windowRef:a,isMultiverseQuillEnabled:s,ref:t})})},0x13c4df715:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getCanvasVariableFormat});var n=a(0x3e6dd1df);function getCanvasVariableFormat(e){let t=(0,n.A)(e).import("blots/embed"),a=e||window,r=class CanvasVariable extends t{static blotName;static tagName;constructor(...e){super(...e);const[t]=e,{name:n}=CanvasVariable.value(t);this.contentNode.classList.add("c-texty_canvas_variable__content");const r=a.document.createElement("i");r.classList.add("c-texty_canvas_variable__variable_icon","c-icon"),this.contentNode.appendChild(r);const i=a.document.createElement("span");i.textContent=n,this.contentNode.appendChild(i)}static create(e){let t=super.create(e.name);return t.setAttribute("data-name",e.name),t.setAttribute("data-template-type",e.templateType),t}static value(e){return{name:e.getAttribute("data-name"),templateType:e.getAttribute("data-template-type")}}};return r.blotName="canvasvariable",r.tagName="button",r.className="c-texty_canvas_variable",r}},0x41b5bf1:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getCodeBlockFormat});var n=a(0x1e93512b3),r=a(0x3e6dd1df);function getCodeBlockFormat(e){let t=(0,r.A)(e),a=t.import("blots/container"),i=t.import("blots/block"),l=t.import("blots/inline"),o=t.import("blots/text"),s=t.import("blots/break"),c=t.import("blots/cursor"),d=class extends a{static blotName;static tagName;static className;static allowedChildren;static create(e){let t=super.create(e);return t.setAttribute("spellcheck",!1),t}html(e,t){let a=this.children.map(e=>e.domNode.innerText).join(`
`).slice(e,e+t);return`<pre>${(0,n.A)(a)}</pre>`}},m=class extends i{static blotName;static tagName;static className;static allowedChildren;static requiredContainer;static TAB;static register(){t.register(d)}},u=class extends l{static blotName;static tagName};return u.blotName="code",u.tagName="CODE",m.blotName="code-block",m.className="ql-code-block",m.tagName="DIV",d.blotName="code-block-container",d.className="ql-code-block-container",d.tagName="DIV",d.allowedChildren=[m],m.allowedChildren=[o,s,c],m.requiredContainer=d,m.TAB="  ",{Code:u,CodeBlockContainer:d,CodeBlock:m}}let{Code:i,CodeBlockContainer:l,CodeBlock:o}=getCodeBlockFormat(window)},0x778369d5:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getSlackBorderFormat});var n=a(0x3e6dd1df);function getSlackBorderFormat(e){let t=(0,n.A)(e).import("parchment");return new class extends t.Attributor.Class{add(e,t){let a=t;if("+1"===a||"-1"===a){let t=this.value(e)||0;a=("+1"===a?t+1:t-1).toString()}if(0===parseInt(a,10))return this.remove(e,a),!0;let n=e?.parentNode;return"LI"===e.tagName&&n&&parseInt(a,10)>0?(super.add(n,a),n.querySelectorAll("li").forEach(e=>{super.add(e,a)})):(super.add(e,a),this.cleanup()),!0}remove(e,t){let a=e?.parentNode;0===parseInt(t,10)&&(a&&("OL"===a.tagName||"UL"===a.tagName)&&(super.remove(a),a.querySelectorAll("li").forEach(e=>{super.remove(e)})),"DIV"===e.tagName&&e.classList.contains("ql-border-1")&&e.classList.contains("ql-code-block")&&super.remove(e),"BLOCKQUOTE"===e.tagName&&e.classList.contains("ql-border-1")&&super.remove(e))}canAdd(e,t){return e&&super.canAdd(e,t)||e&&super.canAdd(e,parseInt(t,10))||e?.parentNode&&super.canAdd(e.parentNode,t)}value(e){return e&&parseInt(super.value(e),10)||e?.parentNode&&parseInt(super.value(e.parentNode),10)||void 0}cleanup(){setTimeout(()=>{document.querySelectorAll("p[class*='ql-border-']").forEach(e=>{super.remove(e)})},0)}}("border","ql-border",{scope:t.Scope.BLOCK,whitelist:[1,2]})}getSlackBorderFormat(window)},0x1fde915f3:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackEmojiFormat});var n=a(0xb77a689a),r=a(0x1e2051844),i=a(0xf8dd7f80),l=a(0x3e6dd1df),o=a(0x21c50a68b),s=a(0x16dc93e4b),c=a(0x1a173079e),d=a(0x1d06c44fe),m=a(0x1a0bfaf78),u=a(0x1829a8d43),p=a(0x235ff1eab),h=a(0x1ccef1c6f),_=a(0x1266f1359),f=a(0x1e4ae349d),b=a(0x3384beeb),g=a(0x1ae9b422e),y=a(0x55505846);function getActualEmojiUrl(e,t){let a=t;return(0,h.ty)(e,"a11y_animations")||(a=(0,p.Ay)(e,{url:t,stopAnimations:!0,isEmoji:!0})),a}function getSlackEmojiFormat(e){let t=(0,l.A)(e).import("blots/embed"),a=class extends t{static blotName;static tagName;static create(e){let t;(0,n.A)(e)?((0,i.getGenericLogger)().error("slackemoji_bad_input"),t=e):t=e.text;let a=super.create(t);a.setAttribute("data-id",t),a.setAttribute("data-title",t),a.setAttribute("data-stringify-text",t),a.setAttribute("class","emoji"),a.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),a.setAttribute("alt",(0,m.A)(t));let l=(0,u.A)(t),p=l?l.name:"";return a.addEventListener("load",n=>{let i=n.target,u=i.closest(".ql-editor");if(!u)return;let h=u.getAttribute("data-team-id"),A=`background-image: url(${y});`;if(h){let n=(0,_.$D)(h),c=(0,o.JK)({teamOrEnterpriseId:h}),u=(0,d.bR)({state:n,locale:c,name:t})||t;u&&u!==t&&(a.setAttribute("data-title",u),a.setAttribute("alt",(0,m.A)(u)));let x=(0,f.Ez)(n,{...e,teamId:h,emojiMode:(0,s.w)(n,{forceDisplay:!0}),emojiSize:b.lw.LARGE});x?(A=`background-image: url(${getActualEmojiUrl(n,x)});`,l&&(0,f.Fm)(n,{text:p,teamId:h})&&i.setAttribute("data-has-skin-tone","")):(A="background-image: none;",i.classList.add("sk_foreground_low_solid_bg","rounded"),(0,g.eW)(h,[p]).then(e=>{let t=(0,r.A)(e,["name",p])?.value;i.classList.remove("sk_foreground_low_solid_bg","rounded"),t?(A=`background-image: url(${getActualEmojiUrl(n,t)});`,i.setAttribute("style",A)):i.setAttribute("style",`background-image: url(${y});`)}))}i.setAttribute("style",A),(0,c.sJ)(p)}),a}static value(e){return{text:e.getAttribute("data-id")}}};return a.blotName="slackemoji",a.tagName="img",a}},0x72c7aa2d:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackHorizontalRuleFormat});var n=a(0x3e6dd1df);function getSlackHorizontalRuleFormat(e){let t=(0,n.A)(e).import("blots/block/embed"),a=class extends t{static blotName;static tagName;static formats(){return{slackhorizontalrule:!0}}};return a.blotName="slackhorizontalrule",a.tagName="hr",a}},0xe83be35f:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackMentionFormat});var n=a(0x120c268ad),r=a.n(n),i=a(0x62a17882),l=a(0x20482ad21),o=a(0x3e6dd1df),s=a(0x1a173079e);let c=new l.Ay("texty"),d=(0,i.cX)()?"link":"mark";function getSlackMentionFormat(e){let t=(0,o.A)(e).import("blots/inline"),a=class extends t{static blotName;static tagName;static create(e){let t=super.create(e);t.setAttribute("data-id",e.id),t.setAttribute("data-label",e.label),t.setAttribute("spellcheck","false"),e.unverified&&(t.setAttribute("data-title",c.t("Several matches for {name}",{name:e.label})),t.setAttribute("role",d),t.setAttribute("aria-roledescription",c.t("Unknown user mention")));let a=r()("c-member_slug","c-member_slug--link","ts_tip_texty",{"c-member_slug--mention":e.mention,"c-member_slug--unverified":e.unverified});return t.setAttribute("class",a),t.setAttribute("dir","ltr"),(0,s.AH)(e?.id),t}static formats(e){return{id:e.getAttribute("data-id"),label:e.getAttribute("data-label"),mention:e.classList.contains("c-member_slug--mention"),unverified:e.classList.contains("c-member_slug--unverified")}}};return a.blotName="slackmention",a.tagName="ts-mention",a}},0x243985139:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackSearchTokenModifierFormat});var n=a(0x3e6dd1df);function getSlackSearchTokenModifierFormat(e){let t=(0,n.A)(e).import("blots/inline"),a=class extends t{static blotName;static tagName;static create(e){let t=super.create(e);return t.setAttribute("data-name",e.name),t}static formats(e){return{name:e.getAttribute("data-name")}}};return a.blotName="slacksearchtokenmodifier",a.tagName="ts-searchtoken-modifier",a}},0xe48c5ed1:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackSearchTokenValueFormat});var n=a(0x3e6dd1df);function getSlackSearchTokenValueFormat(e){let t=(0,n.A)(e).import("blots/inline"),a=class extends t{static blotName;static tagName;static create(e){let t=super.create(e);return t.setAttribute("data-text",e.text),t.setAttribute("data-ghost",e.ghost),t}static formats(e){return{text:e.getAttribute("data-text"),ghost:e.getAttribute("data-ghost")}}};return a.blotName="slacksearchtokenvalue",a.tagName="ts-searchtoken-value",a}},0x81d64d8c:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackSlugFormat,k:()=>getSlugTypeForScreenreader});var n=a(0x120c268ad),r=a.n(n),i=a(0x62a17882),l=a(0x20482ad21),o=a(0x2501a2cee),s=a(0x91cea13),c=a(0x24a115b5a),d=a(0x160ca5b34),m=a(0xd7587e61),u=a(0x1a919df7f),p=a(0x3e6dd1df),h=a(0x1266f1359);let _=new l.Ay("texty"),f=(0,i.cX)()?"link":"mark",b="SPINNER_NO_ICON_SET",g={link:"link",message:"message",canvas:"canvas",list:"lists",file:"file",workflow:"play"},y={canvas:(e,t)=>{if("canvas"===t.type)return(0,s.V)(e,{fileId:t.id,sectionId:t.secondaryObjectId,fetchIfMissing:!1})},file:(e,t)=>{if("file"===t.type)return(0,c.P)(e,{fileId:t.id,fetchIfMissing:!1})},list:(e,t)=>{if("list"===t.type)return(0,d.Z)(e,{fileId:t.id,recordId:t.secondaryObjectId,viewId:t.tertiaryObjectId})},workflow:(e,t)=>{if("workflow"===t.type)return(0,u.q)(e,{functionTriggerId:t.id,text:t.label})},message:(e,t)=>{if("message"===t.type)return(0,m.Q)(e,{channelId:t.secondaryObjectId,messageTs:t.id})}};function generateSpinnerSvg(){let generateAnimateTransform=e=>`<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 50 50" to="360 50 50" dur="1.2s" repeatCount="indefinite" keyTimes="0; 1" keySplines="${e}" calcMode="spline" />`;return`
<svg
	xmlns="http://www.w3.org/2000/svg"
	aria-hidden="true"
	viewBox="0 0 100 100"
>
	<defs>
		<circle xmlns="http://www.w3.org/2000/svg" id="spinner-path" cx="50%" cy="50%" r="40" fill="none" stroke-width="20" stroke="black" stroke-dasharray="55 200" stroke-dashoffset="90" stroke-linecap="round" />
	</defs>
	<use xmlns="http://www.w3.org/2000/svg" href="#spinner-path" >
		${generateAnimateTransform("0.25, 0.29, 0.54, 0.86")}
	</use>
	<use xmlns="http://www.w3.org/2000/svg" href="#spinner-path" >
		${generateAnimateTransform("0.41, 0.24, 0.64, 0.69")}
	</use>
</svg>
`}function getSlugIconName(e){return e&&"type"in e?g[e.type]??b:b}function getSlugTypeForScreenreader(e){if(!e||!("type"in e))return"";switch(e.type){case"message":return _.t("Message link");case"canvas":if(e?.secondaryObjectId)return _.t("Canvas section link");return _.t("Canvas link");case"list":if(e?.secondaryObjectId)return _.t("List record link");if(e?.tertiaryObjectId)return _.t("List view link");return _.t("List link");case"file":return _.t("File link");case"workflow":return _.t("Workflow link");default:return _.t("Link")}}function encodeSvgString(e){if(e)return`data:image/svg+xml,${encodeURIComponent(e)}`}function maybeEncodeAndSetIcon(e,t){if(!t)return;let a="";t===b?a=generateSpinnerSvg():(0,o.ND)(t)&&(a=(0,o.r8)({name:t,inline:!0}));let n=encodeSvgString(a);n&&e.setAttribute("style",`--editor-local-icon: url(${n})`)}function getStateFromNode(e){let t=e.closest(".ql-editor");if(!t)return;let a=t.getAttribute("data-team-id");if(a)return(0,h.$D)(a)}function getSlackSlugFormat(e){let t=(0,p.A)(e).import("blots/inline"),a=class extends t{static blotName;static tagName;static create(e){let t=super.create(e);t.setAttribute("data-id",e.id),t.setAttribute("data-label",e.label),"url"in e&&t.setAttribute("data-url",e.url),"status"in e&&t.setAttribute("data-status",e.status);let a="type"in e;a&&(e.type&&t.setAttribute("data-type",e.type),"authorId"in e&&t.setAttribute("data-author-id",e.authorId),"secondaryObjectId"in e&&t.setAttribute("data-secondary-object-id",e.secondaryObjectId),"tertiaryObjectId"in e&&t.setAttribute("data-tertiary-object-id",e.tertiaryObjectId));let n=r()("c-slackslug",{"c-slackslug--pending":!a,"c-slackslug--resolved":a});if(t.setAttribute("class",n),t.setAttribute("dir","ltr"),t.setAttribute("spellcheck","false"),maybeEncodeAndSetIcon(t,getSlugIconName(e)),"type"in e&&y[e.type]){let a=new MutationObserver(()=>{a.disconnect();let n=getStateFromNode(t);if(!n)return;if(e.type){let a=getSlugTypeForScreenreader(e);t.setAttribute("role",f),t.setAttribute("aria-roledescription",a)}let r=y[e.type]?.(n,e);if(!r)return;let{iconName:i,isDisabled:l}=r;l&&t.classList.add("c-slackslug--disabled"),maybeEncodeAndSetIcon(t,i)});a.observe(t,{childList:!0})}return t}static formats(e){let t=e.getAttribute("data-id")||"",a=e.getAttribute("data-label")||"";return e.getAttribute("data-type")?{id:e.getAttribute("data-id")||"",label:e.getAttribute("data-label")||"",url:e.getAttribute("data-url")||"",type:e.getAttribute("data-type"),authorId:e.getAttribute("data-author-id")||void 0,secondaryObjectId:e.getAttribute("data-secondary-object-id")||void 0,tertiaryObjectId:e.getAttribute("data-tertiary-object-id")||void 0}:{id:t,label:a}}};return a.blotName="slackslug",a.tagName="ts-slug",a}},0xa2e0ef91:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackStrikeFormat});var n=a(0x3e6dd1df);function getSlackStrikeFormat(e){let t=(0,n.A)(e).import("formats/bold"),a=class extends t{static blotName;static tagName};return a.blotName="strike",a.tagName=["S","STRIKE"],a}},0x1d62f3e69:(e,t,a)=>{"use strict";a.d(t,{Dc:()=>_,Gs:()=>getWorkflowTokenFormat,b2:()=>g,dc:()=>f,li:()=>x,tF:()=>b,x7:()=>createHermesTombstoneToken});var n=a(0x237b6a339),r=a(0x20482ad21),i=a(0x13f7d86f3),l=a(0x1ebe91b72),o=a(0x3e6dd1df),s=a(0x1c66ddbda),c=a(0x1795d8821),d=a(0x2a3fb7ec),m=a(0x192814923),u=a(0x25054cb9f),p=a(0x2241421be);let h=new r.Ay("workflow_builder"),_="c-texty_workflow_token__content",f="c-texty_workflow_token__label",b="c-texty_workflow_token__variable_icon",g={[s.M.SlackTypesSalesforceDataField]:"__sfdf"},y={[s.M.SlackTypesSalesforceDataField]:"\\{salesforce\\.salesforce_data_field\\(salesforce_data_field_info=\\{\\{(.*?)\\}\\}\\)\\}"},A={};function convertFromTokenDataToDomNode({isClickable:e,variableData:t,baseDomNode:a,showErrorState:n,...r}){let i=t?.sourceType,l=t?.supplementalType??"";return a.setAttribute("data-id",r.id),a.setAttribute("data-type",r.type),a.setAttribute("data-label",r.label),a.setAttribute("data-property-label",r.propertyLabel??""),a.setAttribute("data-is-available",r.isAvailable?"true":""),a.setAttribute("data-is-clickable",e?"true":""),a.setAttribute("data-supplemental-type",l??""),a.setAttribute("data-is-placeholder",r.isPlaceholder?"true":""),i&&a.setAttribute("data-source-type",String(i)),t&&a.setAttribute("data-name",t.name),a.setAttribute("title",r.sourceLabel),e||a.classList.add("is-not-clickable"),n&&a.classList.add("has-error"),a}function convertFromDomNodeToTokenData(e){let t=e.getAttribute("data-type"),a=e.getAttribute("title")??"",n="true"===e.getAttribute("data-is-available"),r=e.getAttribute("data-source-type"),o=e.getAttribute("data-supplemental-type")??"",s=e.getAttribute("data-id")??"";if(shouldAppendSuffixToWorkflowToken(s,o)){let e=g[o];s.includes(e)||(s=(0,l.Pt)(s,e))}let m={id:s,type:(0,d.X)(c.EF,t)?t:"string",label:e.getAttribute("data-label")??"",sourceLabel:e.getAttribute("title")??"",isAvailable:"true"===e.getAttribute("data-is-available"),name:e.getAttribute("data-name")??"",sourceType:r&&(0,d.X)(i.Do,r)?r:"function",supplementalType:o||void 0};return{id:s,type:m.type??"",label:e.getAttribute("data-label")??"",propertyLabel:e.getAttribute("data-property-label")??"",sourceLabel:a,isAvailable:n,isClickable:"true"===e.getAttribute("data-is-clickable"),isPlaceholder:"true"===e.getAttribute("data-is-placeholder"),variableData:m}}function createHermesTombstoneToken(e,t){let a=h.t("Missing Data");return{id:(0,n.A)(e),name:a,source_id:"",source_type:"function",sourceLabel:"",type:t,label:a,defaultLabel:a,isTombstone:!0,isAvailable:!1,canCustomizeLabel:!1}}Object.entries(y).forEach(([e,t])=>{A[e]=new RegExp(t)});let x="c-texty_workflow_token",E={id:"",type:"string",label:"",sourceLabel:"",propertyLabel:"",isAvailable:!1},C={id:"",type:"string",label:"",sourceLabel:"",sourceType:"function",name:"",isAvailable:!1};function getWorkflowTokenFormat(e){let t=(0,o.A)(e),a=e||window,n=t.import("blots/embed"),r=class WorkflowToken extends n{static blotName;static tagName;static className;static create(e=E){let{variableData:t=C,...a}=e,n=a.id,r=a.type,i=t.label,l=t.sourceLabel,o=t.isAvailable,s=a.isPlaceholder,d=!o,h=(0,u.ND)(a.id)&&!(0,p.Jx)(a.id),_=t.type===c.TE.SlackTypesRichText||t.type===c.TE.SlackTypesLimitedRichText,f=h||(0,u.R$)({type:t.type,arrayItemType:t.items?.type,id:t.id});d=d||!(0,m.z)(a,t),f=f&&!_||d;let b=s||o&&f;return convertFromTokenDataToDomNode({id:n,label:i,type:r,propertyLabel:a.propertyLabel||"",isAvailable:o,isClickable:b,sourceLabel:l,isPlaceholder:s,baseDomNode:super.create(i),variableData:t,showErrorState:d})}static value(e){return convertFromDomNodeToTokenData(e)}static formats(e){return convertFromDomNodeToTokenData(e)}constructor(...e){super(...e);const[t]=e,{label:n,propertyLabel:r}=WorkflowToken.value(t);this.contentNode.classList.add(_);const i=a.document.createElement("i");i.classList.add(b,"c-icon"),this.contentNode.appendChild(i);const l=a.document.createElement("span");if(l.textContent=n?.length?n:h.t("Missing Data"),l.classList.add(f),this.contentNode.appendChild(l),r){const e=a.document.createElement("span");e.textContent=r,e.classList.add("c-texty_workflow_token__property"),this.contentNode.appendChild(e)}const o=a.document.createElement("i");o.classList.add("c-texty_workflow_token__customize_dropdown","c-icon","c-icon--chevron-down"),this.contentNode.appendChild(o)}};return r.blotName="workflowtoken",r.tagName="button",r.className=x,r}function shouldAppendSuffixToWorkflowToken(e,t){let a=A[t];return!!a&&a.test(e)}},0x2adeea74:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackUnlinkedFormat});var n=a(0x3e6dd1df);function getSlackUnlinkedFormat(e){let t=(0,n.A)(e).import("blots/inline"),a=class extends t{static blotName;static tagName;static create(e){return super.create(e)}static formats(e){return"TS-UNLINKED"===e.tagName}};return a.blotName="unlink",a.tagName=["ts-unlinked"],a}},0xc526e002:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackAutoSlugModule});var n=a(0x2286acf6c),r=a(0x18af67efb),i=a(0x424ce7f7),l=a(0x1595bdd0),o=a(0x1673f3229),s=a(0x18a5613e1),c=a(0x79442f6d),d=a(0x23a8b6a8b),m=a(0x7a131201),u=a(0x2023d94c1),p=a(0x3e6dd1df),h=a(0x53f531a4),_=a(0x1d45db25c),f=a(0x16dc40b8c),b=a(0xf5cf88c8),g=a(0x18cf3444e),y=a(0x59bcdfd6),A=a(0x62e9ff8f),x=a(0x1f45d59b6),E=a(0xd40f768d),C=a(0x1266f1359);let k=["'",".","_","-","\u2018","\u2019"].map(e=>`\\${e}`).join(""),v=RegExp(`^[${k}]+$`,"g");function getSlackAutoSlugModule(e){let t=(0,p.A)(e).import("core/module");return class extends t{quill;asyncResultCount;searchesInFlight;searchesWithoutResults;options;processPotentionalMentionsDebounced;constructor(e,t){super(e,t),this.options=t,this.quill=e,this.processPotentionalMentionsDebounced=(0,n.A)(this.processPotentialMentions,100),this.asyncResultCount=0,this.searchesInFlight=[],this.searchesWithoutResults=[]}afterTextChangeQueue(){this.processPotentionalMentionsDebounced(this.quill)}processPotentialMentions(){if(this.options.isAutocompleteOpen())return;let e=this.quill.getContents(),t=this.quill.getSelection(),a=t?t.index:0;if(1>=e.length())return;let n=[];if(this.options.enableBroadcastKeywords){if(this.options.includeAllBroadcastKeywords)n=(0,_.A)();else if(this.options.getTeamId()&&this.options.getChannelId()){let e=(0,C.$D)(this.options.getTeamId());n=(0,f.A)(e,this.options.getChannelId())}}let i=[],l=[];(0,u.A)(e,{useChannelTagging:this.options.useChannelTagging}).forEach(t=>{let r=t.labelWithoutPrefix;if(!r.length)return;let o=this.options.useWysiwyg&&!this.options.usePlainTextMode,s=!o&&(0,E.A)((0,A.A)(e,0,t.globalIndex)),c=o?[]:(0,g.A)((0,y.f)({contents:e.ops}));if(!(!o&&(0,x.A)(t.globalIndex,c)&&"emoji"===t.type)&&("emoji"===t.type||!(a>t.globalIndex&&a<=t.globalIndex+t.matchLength)&&-1===r.search(v)&&!s)){let e="member"===t.type&&(0,b.dx)(n,r);if(e){let a=this.quill.getFormat(t.globalIndex,t.matchLength);if(a.slackmention&&delete a.slackmention,a.code||a["code-block"]||a.link||a.slackslug)return;let n=(0,m.A)({results:[e],formats:a,...t});i.push(n)}else l.push({type:t.type,label:t.label,labelWithoutPrefix:r})}});let o=l.filter(e=>-1===this.searchesInFlight.indexOf(e.label)&&-1===this.searchesWithoutResults.indexOf(e.label)),s=(0,r.A)(o,"label");this.asyncResultCount=s.length,this.replacePotentialMentions({replacements:i,hasPendingReplacements:this.asyncResultCount>0||i.length>1}),this.searchAndReplaceMentions(s)}replacePotentialMentions({replacements:e,hasPendingReplacements:t}){if(!e.length)return;let a=this.options.getUserHighlightWords(),n=!this.options.inlineEmojiIsEnabled(),{changes:r,hasReplacements:i}=(0,s.A)(e,a,n);i&&(this.quill.updateContents(r),this.options.onMentionReplace({replacements:e,isLastReplacement:1===this.asyncResultCount&&!t}))}clearSearchCache(){this.searchesInFlight=[],this.searchesWithoutResults=[]}searchAndReplaceMentions(e){if(!e||!e.length)return;let t=(0,i.A)(e,"type");t.member&&t.member.forEach(e=>{this.searchesInFlight.push(e.label),this.options.promiseToSearchMembers(e.label).then(t=>{this.processSearchResults(e,t)})}),t.emoji&&t.emoji.forEach(e=>{this.searchesInFlight.push(e.label),this.options.promiseToSearchEmoji(e.label).then(t=>{t.promise&&t.promise.then(t=>{let a=t.filter(e=>e.isEmojiExactMatch);this.processSearchResults(e,a)});let a=t.filter(e=>e.isEmojiExactMatch);this.processSearchResults(e,a)})}),this.options.useChannelTagging&&t.channel&&t.channel.forEach(e=>{this.searchesInFlight.push(e.label),this.options.promiseToSearchChannels(e.label).then(t=>{let a=t.filter(t=>(0,h.j)(t)===e.labelWithoutPrefix);this.processSearchResults(e,a)})})}processSearchResults(e,t){if(!t.length)return void this.searchesWithoutResults.push(e.label);let a=t.map(e=>e.item),n=(0,C.$D)(this.options.getTeamId()),r=this.quill.getContents(),i=this.quill.getSelection(),s=i?i.index:0;if(1>=r.length())return;let p=(0,u.A)(r,{useChannelTagging:this.options.useChannelTagging}).map(t=>{if(t.label!==e.label||!e.labelWithoutPrefix.length||!(this.options.useWysiwyg&&!this.options.usePlainTextMode)&&(0,E.A)((0,A.A)(r,0,t.globalIndex))||"emoji"!==t.type&&s>t.globalIndex&&s<=t.globalIndex+t.matchLength)return null;let i=this.quill.getFormat(t.globalIndex,t.matchLength);return(i.slackmention&&delete i.slackmention,i.code||i["code-block"]||i.link||i.slackslug)?null:"channel"===e.type?(0,d.A)({results:a,formats:i,...t}):"emoji"===e.type?(0,c.A)({results:a,formats:i,...t}):(0,m.A)({state:n,results:a,formats:i,...t})}),h=1!==this.searchesInFlight.length||-1===this.searchesInFlight.indexOf(e.label);this.replacePotentialMentions({replacements:(0,l.A)(p),hasPendingReplacements:h}),this.searchesInFlight=(0,o.A)(this.searchesInFlight,e.label),h||(this.asyncResultCount=0)}}}},0x1feb5b316:(e,t,a)=>{"use strict";a.d(t,{A:()=>getCanvasVariableModule});var n=a(0x3e6dd1df);function getCanvasVariableModule(e){let t=(0,n.A)(e).import("core/module");return class extends t{}}},0x992a1f63:(e,t,a)=>{"use strict";a.d(t,{A:()=>getCleanEmbedsInCodeModule});var n=a(0x3e6dd1df),r=a(0x187155f2e),i=a(0x7efc6bfa);function getCleanEmbedsInCodeModule(e){let t=(0,n.A)(e).import("core/module");return class extends t{buildTextChangeDelta(e){let t=(0,i.A)(e,{removeEmbedsFromCode:!0,stripAllInlineFormatting:!1,stripInlineFormattingFromCodeBlock:!0});if(!(1===t.ops.length&&(0,r.A)(t.ops[0]))||t.ops[0].attributes)return t}}}getCleanEmbedsInCodeModule(window)},0x16a4ac024:(e,t,a)=>{"use strict";a.d(t,{A:()=>getCleanEmptyInputModule});var n=a(0x118cdcdea),r=a.n(n),i=a(0x3e6dd1df),l=a(0x1248ee230);function getCleanEmptyInputModule(e){let t=(0,i.A)(e).import("core/module");return class extends t{buildTextChangeDelta(e,{initialTextChangeDelta:t,useWysiwyg:a=!1,formattingOnly:n=!1}={}){if(!a||n)return;let i=t&&t.ops;if(!i||1!==i.length)return;let o=i[0];if(o&&o.delete&&!(o.delete<=1)&&(0,l.Fr)(e))return new(r())().delete(1)}}}getCleanEmptyInputModule(window)},0x21a39214:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getCleanWorkflowTokensModule});var n=a(0x21f3c49e8),r=a(0x118cdcdea),i=a.n(r),l=a(0x3e6dd1df),o=a(0x1795d8821),s=a(0x504b7e5),c=a(0x1343db4c6),d=a(0x5a228fbb),m=a(0x1e81297e3),u=a(0xa326966e),p=a(0x25245e851),h=a(0x1242da2eb);let _=`
`,f="slack.plain_text(";function getCleanedAttributes(e){return{...e.attributes||{},bold:!1,italic:!1,strike:!1,link:!1,underline:!1,code:!1,"code-block":!1}}function getCleanWorkflowTokensModule(e){let t=(0,l.A)(e).import("core/module");return class extends t{buildTextChangeDelta(e){let t=e.ops;if(!t||0===t.length)return;let a=!0,r=null,l=new(i()),b=[];function reinsertTokens(){for(;b.length;){let e=b.shift();e?.insert&&(a=!1,l.insert(e?.insert,e?.attributes??{}))}}if((0,s.A)(e,(e,t)=>{let i=(0,d.A)(e),s=(0,h.sR)(e);if((0,h.Ay)(e)&&(s===o.TE.SlackTypesRichText||s===o.TE.SlackTypesExpandedRichText)&&!(0,h.PJ)(e).includes(f)){let n=getCleanedAttributes(e);(0,p.A)(t)||(0,u.A)(t)||(0,m.A)(t)?(a=!1,l.delete(i),b.push({...e,attributes:n})):(r&&!(0,c.A)(r).includes(_)&&(a=!1,l.insert(_)),l.retain(i,n)),r=e;return}r&&(0,h.Ay)(r)&&((0,h.sR)(r)===o.TE.SlackTypesRichText||(0,h.sR)(r)===o.TE.SlackTypesExpandedRichText)&&!(0,h.PJ)(r).includes(f)&&(0,c.A)(e)!==_&&(a=!1,l.insert(_)),b.length&&e.insert===_&&(0,n.A)(e.attributes)&&reinsertTokens(),i&&l.retain(i,e.attributes??{}),r=e}),reinsertTokens(),!a)return l}}}getCleanWorkflowTokensModule(window)},0x1f28aba72:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getPlainClipboardModule});var n=a(0x1cbdfeceb),r=a(0xec1862de),i=a(0xb77a689a),l=a(0x1a293ce2e),o=a(0x839ba347),s=a(0x9e671ad),c=a(0xf4930165),d=a(0xdf8554bd),m=a(0x1598e5174),u=a(0x244f35bf8),p=a(0x1e2051844),h=a(0x118cdcdea),_=a.n(h),f=a(0xb97b797e),b=a(0xf8dd7f80),g=a(0x20482ad21),y=a(0xdbb55997),A=a(0x12edaa96a),x=a(0x386198c9),E=a(0x20ef3966f),C=a(0x8eb6366c),k=a(0x1ee15af19),v=a(0x20bafd237),S=a(0x68248169),I=a(0x20b4dda68);function matchMicrosoftWordContents(e,t){let a,n=(0,E.A)(t?.ops,C.A),r=(0,k.A)(n),i=(0,v.A)(n);if(!r?.insert||!i?.insert||"string"!=typeof r?.insert)return t;r.insert=(0,S.A)(r?.insert);let l=r.insert.match(/^(\S+?)\s+?/);if(!l)return t;r.insert=(0,S.A)(r.insert.substring(l[0].length,r.insert.length));let o=l[1].match(/\S+?\./)?"ordered":"bullet",s=e?.getAttribute("style")?.replace(/\n+?/g,""),c=s?.match(/level(\d+?)/)?.[1],d=s?.match(/margin:\s\din\s\din\s\din\s(\d[.]?([\d]+?)?)?in;/)?.[1];return(a=c?parseInt(c,10)-1:a)||!d||`
`===i.insert.slice(-1)&&(i.insert=i.insert.substring(0,i.insert.length-1)),!a&&d&&("0.25"===d||"0.5"===d?a=0:"0.75"===d||"1"===d?a=1:"1.25"===d||"1.5"===d?a=2:"1.75"===d||"2"===d?a=3:"2.25"===d||"2.5"===d?a=4:(d>="2.75"||"3"===d)&&(a=5)),a=a&&a>=I.Az?I.Az:a,n.push({insert:`
`,attributes:{list:o,indent:a}}),new(_())(n)}var w=a(0x3e6dd1df),T=a(0x1ecc7f772),N=a(0x82980ab8),M=a(0x6e20c837),R=a(0x1ed767a16),P=a(0x1032ebf4a),L=a(0x3711e82d),O=a(0x45012309),D=a(0x4c69b9f6),F=a(0x154794b8e),U=a(0x59bcdfd6),B=a(0xd4e00a1e),H=a(0x21f3c49e8),W=a(0x18f2150ea);function cleanStyleFromHtmlDelta(e){return e?new(_())(e.map(e=>{if(e.attributes){let t=(0,B.A)(e.attributes,["bold","italic","strike","code","link","underline","code-block","list","blockquote","slackmention","slackslug","indent"]),a={...e,attributes:(0,H.A)(t)?void 0:t};return(0,W.A)(a.attributes?.indent)&&a.attributes?.indent>=I.Az&&(a={...a,attributes:{...a.attributes,indent:I.Az-1}}),a}return e})):new(_())}var V=a(0x52bf7626),G=a(0x1248ee230),q=a(0x1d258f04b),j=a(0x1ff9f7c84),z=a(0x222762a83),K=a(0x11209f55c),$=a(0x2398accc),Y=a(0xa3534e17),Q=a(0xdf40908a),Z=a(0x1f8895acb),J=a(0x18001c28b),X=a(0x125181074),ee=a(0x1ec68d6a3);function getContentsFromClipboard(e){if(!e||!e.clipboardData)return null;let t=!1;X.fG.texty&&X.fG.plainText&&(e.clipboardData.getData("text/plain")||e.clipboardData.getData("text")).trim()===X.fG.plainText.trim()&&(t=!0);let a=t?X.fG.texty:e.clipboardData.getData("slack/texty");if(a)try{let e=JSON.parse(a);return{type:"slack/texty",contents:e.ops}}catch{(0,ee.Wo)().error("PASTE",`found ${a.length} chars in "slack/texty", but couldn't parse it`)}let n=e.clipboardData.getData("text/plain")?"text/plain":"Text",r=e.clipboardData.getData(n);return r?{type:n,contents:[{insert:r}]}:null}var et=a(0xe36745f5),ea=a(0x1d7da89ab),en=a(0x24ee9c1be),er=a(0xadc5056a),ei=a(0x1aba66b56),el=a(0x658a411c),eo=a(0x12185e091),es=a(0x4b8e0952),ec=a(0x61f75169),ed=a(0x16dc40b8c),em=a(0x739d71af),eu=a(0x11c82607b),ep=a(0x217553e42),eh=a(0xe684f705),e_=a(0x475c9cfe);let ef=(0,eu.Ay)("Determine whether a mention id (member, broadcast, user group) is valid",(e,t,{id:a,channelId:n,threadTs:r,useChannelTagging:i}={})=>{if(!a)return!1;let l=t(),o=(0,eh.nv)(l,a,{preferNonExistentToNull:!1,fetchIfMissing:!1});if(o&&!(0,es.z1)(o))return!0;if(i){let e=(0,ep.OL)(l,a,!1);if(e&&!(0,eo.Zx)(e))return!0}let s=(0,e_.lJ)(l,a);if(s&&!(0,ec.Zx)(s))return!0;if((0,ei.A)((0,em.c)(),a)){if(r)return!1;let e=(0,ed.A)(l,n||"");return(0,el.A)(e,{id:a})}return!1});ef.meta={name:"getIsValidMentionId",key:"createThunkGetIsValidMentionId",description:"Determine whether a mention id (member, broadcast, user group) is valid"};var eb=a(0x1266f1359);function isElement(e){return e.nodeType===Node.ELEMENT_NODE}function hasStringifyTransforms(e){return isElement(e)&&e.hasAttribute("data-stringify-type")}function hasAtLeastNContentfulChildren(e,t){let a=0;function checkNode(e){if(hasStringifyTransforms(e)){if((a+=1)>=t)return!0}else if(e.hasChildNodes()){for(let t=0;t<e.childNodes.length;t++)if(checkNode(e.childNodes[t]))return!0}else if(e.textContent?.trim()&&(a+=1)>=t)return!0;return!1}return checkNode(e)}let eg={getChannelId:n.A,getThreadTs:n.A,getUserHighlightWords:n.A,logger:{info:n.A},onPaste:n.A,onPasted:n.A,onPasteLimit:n.A,shouldFocusOnPaste:n.A,getIsTablePastingEnabled:n.A};function getPlainClipboardModule(e){let t=(0,w.A)(e),a=e||window,n=t.import("modules/clipboard");return class extends n{editingBlockedTimeout;constructor(e,t){super(e,t),this.options=(0,r.A)({},eg,t),this.hasFixedPastedNodes=!1;const n=this.options.teamId,s=(0,eb.oK)(n);this.convertActionIsExternalHtml=!1,this.matchBlockFormat=!0,this.addMatcherSafely=(e,t)=>{let n;if((0,i.A)(e))try{a.document.querySelectorAll(e)}catch(t){n=t,this.options.logger.error("QUILL MATCHERS",`You have an unsafe matcher in PlainClipboardModule: "${e}"`)}n||this.addMatcher(e,t)},this.getIsValidMentionIdDispatched=({id:e})=>(0,eb.Qw)(n,ef({id:e,channelId:this.options.getChannelId(),threadTs:this.options.getThreadTs(),useChannelTagging:this.options.useChannelTagging})),(0,f.v)(this,["onCopy","onGlobalPaste"]),e.container.addEventListener("copy",this.onCopy),e.container.addEventListener("cut",this.onCopy),a.addEventListener("paste",this.onGlobalPaste),this.addMatcherSafely("p.MsoListParagraphCxSpFirst",matchMicrosoftWordContents),this.addMatcherSafely("p.MsoListParagraphCxSpMiddle",matchMicrosoftWordContents),this.addMatcherSafely("p.MsoListParagraphCxSpLast",matchMicrosoftWordContents),this.addMatcherSafely("*",(e,t)=>{if(this.hasFixedPastedNodes)return t;this.hasFixedPastedNodes=!0,(0,l.A)(this.quill.clipboard.container.childNodes,e=>!hasAtLeastNContentfulChildren(e,1)&&(this.quill.clipboard.container.removeChild(e),!0));let n=this.quill.clipboard.container.querySelectorAll(P.XZ),r=this.isPastingMultipleNodes();return(0,o.A)(n,e=>{let t;if((0,P.yt)(e)&&!r)return;let n=(0,P.aX)(e);e.classList.contains("c-message__sender")?(t=a.document.createElement("b")).appendChild(a.document.createTextNode(n)):t=a.document.createTextNode(n),e.parentNode.replaceChild(t,e)}),t}),this.addMatcherSafely("img",()=>new(_())),this.addMatcherSafely(P.B0,()=>new(_())),this.addMatcherSafely("li",(e,t)=>{if(!this.convertActionIsExternalHtml||(0,q.A)(t))return t;let a=e.parentElement,n=a?.tagName==="OL",r=n?"ordered":"bullet",i=a?.getAttribute("start"),l=i?parseInt(i,10):1,o=n&&1!==l;n&&!o&&this.quill.clipboard.container.querySelectorAll("ol").forEach(e=>{let t=e.getAttribute("start");t&&1!==parseInt(t,10)&&(o=!0)});let s=a?.querySelectorAll("li")||[],c=!1;if(s.forEach(e=>{null!==e.querySelector("br")&&(c=!0),e.querySelectorAll("p").length>1&&(c=!0)}),!o&&!c){let e=[];t.forEach(t=>{let{list:a,...n}=t.attributes||{};"string"==typeof t.insert?e.push({insert:t.insert,attributes:Object.keys(n).length?n:void 0}):e.push({...t,attributes:Object.keys(n).length?n:void 0})});let a=e[e.length-1];if("string"==typeof a?.insert&&a.insert.endsWith(`
`)){let t=a.insert.slice(0,-1);e.pop(),t&&e.push({insert:t,attributes:a.attributes}),e.push({insert:`
`,attributes:{list:r}})}else e.push({insert:`
`,attributes:{list:r}});return new(_())(e)}let d="\u2022 ";if(n){let t=0,a=e.previousElementSibling;for(;a;)"LI"===a.tagName&&(t+=1),a=a.previousElementSibling;let n=l+t;d=`${n}. `}let m=[{insert:d}];t.forEach(e=>{if("string"==typeof e.insert){let{list:t,...a}=e.attributes||{};m.push({insert:e.insert,attributes:{...a,plainTextListMarker:!0}})}else{let{list:t,...a}=e.attributes||{};m.push({...e,attributes:{...a,plainTextListMarker:!0}})}});let u=m[m.length-1];return"string"==typeof u?.insert&&u.insert.endsWith(`
`)||m.push({insert:`
`,attributes:{plainTextListMarker:!0}}),new(_())(m)}),this.addMatcherSafely(P.xn,(e,t)=>{if(this.convertActionIsExternalHtml)return t;let a=(0,P.kJ)(e);if(!a)return t;let n=new(_())().insert(e.textContent,{link:a});return this.options.usePlainTextMode&&(0,z.uK)(n.ops[0])?new(_())().insert(a):n}),this.addMatcherSafely(Node.TEXT_NODE,(e,t)=>this.convertActionIsExternalHtml||this.options.useCustomMatchers?t:new(_())().insert(e.textContent)),this.addMatcherSafely("span",(e,t)=>{if(!e?.style||!this.convertActionIsExternalHtml)return t;let a=!!(this.options.isUnderlineEnabled&&("underline"===e.style.textDecorationLine||"underline"===e.style.textDecoration)),n="line-through"===e.style.textDecorationLine||"line-through"===e.style.textDecoration;return a||n?t.compose(new(_())().retain(t.length(),{underline:a,strike:n})):t}),this.options.useWysiwyg&&this.addMatcherSafely("span.inline-code",(e,t)=>this.convertActionIsExternalHtml?t.compose(new(_())().retain(t.length(),{code:!0})):t),this.addMatcherSafely("[data-stringify-indent], li[data-stringify-border]",(e,t)=>{if((0,q.A)(t))return t;let a=parseInt((0,P.My)(e)||"0",10)||0,n=parseInt((0,P.gS)(e)||"0",10)||0,r=this.quill.getSelection(),i=r&&this.quill.getFormat(r);return i?.blockquote&&(n=1),t.compose(new(_())().retain(t.length()-1).retain(1,{indent:a,border:n}))}),this.addMatcherSafely(P.KF,(e,t)=>{if((0,q.A)(t))return t;let a=parseInt((0,P.gS)(e)||"0",10)||0,n=new(_());return t.forEach(e=>{n=n.insert(e.insert||"",{...e.attributes,border:a})}),n}),this.addMatcherSafely('blockquote[data-stringify-border="1"]',(e,t)=>{if((0,q.A)(t))return t;let a=parseInt((0,P.gS)(e)||"0",10)||0,n=new(_());return t.forEach(e=>{n=n.insert(e.insert||"",{...e.attributes,border:a})}),n}),this.addMatcherSafely('blockquote[type="cite"]',(e,t)=>{if((0,q.A)(t))return t;let a=this.quill.getSelection(),n=a&&this.quill.getFormat(a),r=new(_());return n?.blockquote&&!n?.border?(this.quill.format("blockquote",!1,"silent"),t.forEach(e=>{r=r.insert(e.insert||"",{...e.attributes,border:1})}),r):t}),this.addMatcherSafely(P.tr,(e,t)=>{let a=(0,P.gO)(e);return a?new(_())().insert({slackemoji:{text:a}}):t}),this.addMatcherSafely(".c-message_kit__gutter__left",(e,t)=>e.querySelector(".p-message_pane_message__compact_timestamp--adjacent")?new(_())().insert(`${e.textContent} `):t),this.addMatcherSafely(".c-message_kit__message",(e,t)=>e.querySelector(".p-message_pane_message__compact_timestamp--adjacent")?t:new(_())().insert(`
`).concat(t)),this.addMatcherSafely(".c-message_actions__container",()=>new(_())),this.addMatcherSafely("#unreadDivider",()=>new(_())),this.addMatcherSafely(".c-virtual_list__sticky_container",(e,t)=>e.querySelector("[data-stringify-ignore]")&&!e.querySelector(".c-message_kit__message")?new(_()):t),this.addMatcherSafely(".c-virtual_list__item",(e,t)=>e.querySelector("[data-stringify-ignore]")&&!e.querySelector(".c-message_kit__message")?new(_()):t),this.addMatcherSafely('[data-stringify-type="paragraph-break"]',()=>new(_())().insert(`

`)),this.addMatcherSafely('[data-stringify-type="pre"] + .p-rich_text_section [data-stringify-type="paragraph-break"]:first-of-type',()=>new(_())().insert(`
`)),this.addMatcherSafely('[data-stringify-type="unordered-list"] + .p-rich_text_section [data-stringify-type="paragraph-break"]:first-of-type',()=>new(_())().insert(`
`)),this.addMatcherSafely('[data-stringify-type="ordered-list"] + .p-rich_text_section [data-stringify-type="paragraph-break"]:first-of-type',()=>new(_())().insert(`
`)),this.addMatcherSafely('[data-list-tree="true"]:not([data-indent="0"])',(e,t)=>{let a=+e.dataset.stringifyIndent;return t.insert(`
`,{indent:a})}),this.addMatcherSafely('[data-list-tree="true"] li',(e,t)=>{let a=+e.dataset.stringifyIndent;return t.ops.length&&t.ops[t.ops.length-1].attributes?.indent===a?t:new(_())(t.ops).insert(`
`,{indent:a})}),this.addMatcherSafely('[data-list-tree="true"]',(e,t)=>{let a=+e.dataset.indent;if(a>0){let{ops:e}=new(_())().insert(`
`,{indent:a-1}).concat(t);return new(_())(e)}return t}),this.addMatcherSafely('[data-list-tree="true"][data-indent="0"]',(e,t)=>{let a=[],n=`
`;for(let e=0;e<t.ops.length;e+=1){let r=t.ops[e];if(r.insert===n){let a=e+1,i=r.attributes?.indent??0;for(;a<t.ops.length&&t.ops[a].insert===n&&t.ops[a].attributes?.indent!==i;)if((t.ops[a].attributes?.indent??0)<i)a+=1;else break;a>e+1&&(e=a-1)}a.push(r)}return new(_())(a)}),this.addMatcherSafely('[data-stringify-type="quote"] + .p-rich_text_section [data-stringify-type="paragraph-break"]:first-of-type',()=>new(_())().insert(`
`)),this.addMatcherSafely(P.DU,(e,t)=>{let a=(0,P.Lb)(e),n=(0,P.tb)(e);return a&&n?new(_())().insert(n,{slackmention:(0,Y.A)(a,n,this.options.getUserHighlightWords())}):t}),this.addMatcherSafely('a[data-stringify-type="channel"]',e=>{if(this.options.useChannelTagging){let t=e.getAttribute("data-channel-id"),a=e.getAttribute("data-channel-name");if(!a)return new(_())().insert(e.textContent);let n="#"===a[0]?a:`#${a}`;return new(_())().insert(n,{slackmention:(0,Y.A)(t,n)})}return new(_())().insert(e.textContent)}),this.addMatcherSafely("a",(e,t)=>{let a=e.getAttribute("data-stringify-type"),n=e.textContent;if("mention"===a||"channel"===a)return t;let r=e.getAttribute("href");if(this.convertActionIsExternalHtml){let e;try{e=new URL(r)}catch{}if(!e||!e.protocol||"javascript:"===e.protocol.toLowerCase())return new(_())().insert(n)}let i=s&&s.getState();if(n.match(/^[#\uFF03][^~`!@#\uFF03$%^&*()+=[\]{}\\|;:'",.<>/?\s]*$/i)){let e=(0,M.$N)(i,r);if(e&&"message"===e.type&&!e.ts){let t=(0,ep.OL)(i,e.channelId);if(t&&(0,T.Mn)(t)===n.substr(1))return new(_())().insert(n)}}if(n.match(/^(?:@|\uFF20)[^\n@\uFF20]*$/)){let e=(0,M.$N)(i,r);if(e&&"member"===e.type){let t=(0,eh.nv)(i,e.memberId),a=(0,N.Gt)(t);return t&&a===n.substr(1)?new(_())().insert(n,{slackmention:(0,Q.A)(t,this.options.getUserHighlightWords())}):new(_())().insert(n)}}return t})}getState(){return(0,eb.oK)(this.options.teamId).getState()}unload(){this.quill.container.removeEventListener("copy",this.onCopy),this.quill.container.removeEventListener("cut",this.onCopy),a.removeEventListener("paste",this.onGlobalPaste)}isPastingMultipleNodes(){return hasAtLeastNContentfulChildren(this.quill.clipboard.container,2)}onCopy(e){if(this.options.logger.info("COPY",`handling "${e.type}" event`),"cut"===e.type&&!this.quill.isEnabled()){e.preventDefault(),e.stopPropagation();return}let t=this.quill.getSelection();if(!t||0===t.length)return void this.options.logger.info("COPY","no selection");e.preventDefault(),e.stopPropagation();let a=this.correctCopyRange(t),n=this.quill.getContents(a),r=(0,U.f)({contents:n.ops});if(this.options.logger.info("COPY",`found ${r.length} chars`),(0,R.FW)(e,{"text/plain":r,text:r,"public.utf8-plain-text":r,"slack/texty":JSON.stringify(n)}),this.options.logger.info("COPY",`copied ${r.length} chars`),"cut"===e.type){let e=this.options.texty.getBlockFormat(t.index),a=this.options.texty.getBlockFormat(t.index+t.length-1);this.quill.deleteText(t.index,t.length),this.quill.setSelection(t.index),a&&!(0,s.A)(e,a)&&(e?this.quill.formatLine(t.index,1,e):this.quill.formatLine(t.index,1,(0,c.A)(a,()=>!1))),this.options.logger.info("COPY","deleted selection")}}onGlobalPaste(e){!this.options.shouldFocusOnPaste()||(0,y.A)(a.document.activeElement)||this.quill.hasFocus()||e.defaultPrevented||(this.quill.focus({preventScroll:!0}),this.onPaste(e))}onPaste(e){if(e.defaultPrevented||!this.quill.isEnabled()||!this.quill.getSelection())return;let t=(0,ea.i)({quill:this.quill});if(this.options.isSlugsEnabled&&!this.options.isSlugsKeyboardAlternativeEnabled&&((0,en.b)({quill:this.quill})||t)){if(e.preventDefault(),this.options.screenreaderAnnouncement){let e=new g.Ay("texty"),a=this.options.isSlugsStringsEnabled?e.t("Deselect link object to paste"):"Deselect link object to paste";this.options.screenreaderAnnouncement(t?a:void 0)}let a=(0,et.m)({quill:this.quill});a.forEach(e=>{e.classList.add("c-slackslug--editing-blocked")}),this.editingBlockedTimeout&&clearTimeout(this.editingBlockedTimeout),this.editingBlockedTimeout=setTimeout(()=>{a.forEach(e=>{e.classList.remove("c-slackslug--editing-blocked")}),this.editingBlockedTimeout=void 0},100);return}this.hasFixedPastedNodes=!1;try{if(this.options.onPaste(e))return;this.handleOnPaste(e)}catch(t){let e=t instanceof Error?t.message||t.description:JSON.stringify(t);(0,b.getGenericLogger)().error(`Error on paste: ${e}`)}}shouldSkipOnPaste(e){if(!e||!e.clipboardData||e.defaultPrevented||!this.quill.isEnabled())return!0;let t=e.clipboardData.getData("text/plain")?"text/plain":"Text";return!e.clipboardData.getData(t)&&!this.options.useCustomMatchers&&(e&&e.preventDefault&&e.preventDefault(),!0)}handleOnPaste(e){if(!e)return;function redactDelta(e){return e.map(e=>{let t,a=e.attributes?(0,c.A)(e.attributes,e=>(0,d.A)(e)?e:!!e):{};return e.insert?((0,i.A)(e.insert)?t=e.insert.length:(0,m.A)(e.insert)&&(t=Object.keys(e.insert).join(",")),{insert:t,attributes:{...a}}):{...e,attributes:{...a}}})}if(this.shouldSkipOnPaste(e))return;let t=e.clipboardData.getData("slack/texty");if(this.options.useCustomMatchers&&!t){super.onPaste(e),setTimeout(this.options.onPasted,0);return}let a=this.options.texty,n=a&&a.getSelection(),r=n?a&&a.getFormats(n.index):{};if(!r["code-block"]&&this.options.getIsTablePastingEnabled()&&this.options.onTablePaste){let t=e.clipboardData.getData("slack/block-kit");if(t)try{let a=JSON.parse(t);if((0,u.A)(a)&&1===a.length&&"table"===a[0].type){this.options.onTablePaste({block:{block_id:(0,A.A)(),...a[0]}}),e.preventDefault(),setTimeout(this.options.onPasted,0);return}}catch{(0,b.getGenericLogger)().warn("Clipboard contained slack/block-kit but the contents could not be parsed.")}}let l=a.getLineAtCursor(),o=this.options.useWysiwyg&&!this.options.usePlainTextMode&&!r["code-block"],s=this.quill.getContents(n),h=(0,p.A)(s.ops,e=>(0,j.A)(e)||(0,K.wU)(e)),f=(0,V.A)(s.ops),g=(0,D.A)({input:f}),y=g&&1===g.length&&g[0].url===g[0].text&&g[0].text===f,E=this.options.useWysiwyg&&!this.options.usePlainTextMode&&!r.code&&!r["code-block"]&&!h&&!y,{pastedDelta:C,type:k,hasExternalHtml:v}=this.getPastedDelta(e,{acceptExternalHtml:o,acceptSingleUrl:E&&n&&n.length>0});if(!r["code-block"]&&this.options.getIsTablePastingEnabled()){let t=(0,V.A)(C.ops),a=(0,eb.Qw)(this.options.teamId,(0,x.hT)({stringInput:t}));if(a.reason!==x.bi.invalidInput&&a.reason!==x.bi.noTsvContent){e.preventDefault();let n=this.quill.getContents(),i=this.preparePastedDelta({pastedDelta:C,type:k,formats:r,lineAtCursor:l}),restorePastedContent=()=>{i&&this.insertPastedDelta(i),this.quill.focus({preventScroll:!0})},clearText=()=>{this.quill.setContents(new(_()))};this.handleTablePaste(t,a,n,restorePastedContent,clearText);return}}if(!v&&(!C||!C?.length()))return void e.preventDefault();if(v||e.preventDefault(),!t&&v)this.container.focus(),setTimeout(()=>{let a;this.convertActionIsExternalHtml=!0;let n=this.convert();n=new(_())(n.ops.map(e=>{if(e.attributes?.list){if(e.attributes?.plainTextListMarker){let{list:t,plainTextListMarker:a,...n}=e.attributes;return{...e,attributes:Object.keys(n).length?n:void 0}}if("string"==typeof e.insert&&!e.insert.endsWith(`
`)){let{list:t,...a}=e.attributes;return{...e,attributes:Object.keys(a).length?a:void 0}}}if(e.attributes?.plainTextListMarker){let{plainTextListMarker:t,...a}=e.attributes;return{...e,attributes:Object.keys(a).length?a:void 0}}return e}));try{a=cleanStyleFromHtmlDelta(n)}catch{(0,b.getGenericLogger)().error(Error("External HTML cleaning error.").stack),a=n}let i=(0,J.A)({delta:a});if(this.convertActionIsExternalHtml=!1,this.options.onPasteLimit(e,i))return;let o=this.preparePastedDelta({pastedDelta:i,type:k,formats:r,lineAtCursor:l});if(o){try{this.insertPastedDelta(o)}catch(e){throw(0,b.getGenericLogger)().error(`External HTML paste error (redacted). HTML delta: ${JSON.stringify(redactDelta(i))}; Prepared delta: ${JSON.stringify(redactDelta(o))}`),e}this.maybeShowMarkdownToast({preparedDelta:o,clipboardHasTextyContents:t}),setTimeout(this.options.onPasted,0)}},1);else{if(this.options.onPasteLimit(e,C))return;let a=this.preparePastedDelta({pastedDelta:C,type:k,formats:r,lineAtCursor:l});if(!a)return;let i=!1,o=a.ops[0];if("text/uri-list"===k&&o&&((0,$.A)(o)||(0,K.S8)(o))){this.quill.formatText(n.index,n.length,"link",(0,K.S8)(o)?(0,K.L0)(o):a.ops[0].insert);let e=this.getState();e&&(0,O.eo)({state:e}).track(L.EventId.MSG_FORMATTING_ADDED,{input_context:L.MsgFormattingInputContext.MESSAGE,input_source:L.MsgFormattingInputSource.KEYBOARD,input_format:L.MsgFormattingInputFormat.LINK,is_selection:!0}),i=!0}i||(this.insertPastedDelta(a),this.maybeShowMarkdownToast({preparedDelta:a,clipboardHasTextyContents:t})),setTimeout(this.options.onPasted,0)}}handleTablePaste(e,t,a,n,r){this.options.onTablePaste&&this.options.onTablePaste({pastedString:e,tsvResult:t,composerMsgDelta:a,restorePastedContent:n,clearText:r})}getPastedDelta(e,t={acceptExternalHtml:!0,acceptSingleUrl:!1}){if(!e)return{pastedDelta:new(_()),type:"text/plain",hasExternalHtml:!1};let a=t.acceptExternalHtml,n=t.acceptSingleUrl,{type:r,contents:i}=getContentsFromClipboard(e)||{};if(!i||!i.length)return{pastedDelta:new(_()),type:"text/plain",hasExternalHtml:!1};let l=new(_())(i),o=r,s="text/plain"===o||"Text"===o||"slack/texty"===o,c=!1;if(n&&s)if("slack/texty"===o){if(i&&1===i.length&&((0,z.Ay)(i[0])&&i[0].insert===i[0].attributes.link||(0,K.S8)(i[0])))return{pastedDelta:l,type:"text/uri-list",hasExternalHtml:c}}else{let e=(0,D.A)({input:i[0].insert});if(1===e.length&&e[0].url===e[0].text&&e[0].text===i[0].insert)return{pastedDelta:l,type:"text/uri-list",hasExternalHtml:c}}if("slack/texty"===o)return{pastedDelta:l,type:o,hasExternalHtml:c};let d=e.clipboardData.getData("slack/html")||e.clipboardData.getData("text/html"),m=d&&-1!==d.indexOf("data-stringify-"),u=d&&d.match(/<\/table>(?:\s*<\/body>\s*<\/html>)?\s*$/);if(a&&d&&!m&&!u)c=!0,o="text/html";else if(m){let e=this.convert(d);e&&(l=(0,J.A)({delta:e}),o="text/html")}return{pastedDelta:l,type:o,hasExternalHtml:c}}preparePastedDelta({pastedDelta:e,type:t="",formats:a={},lineAtCursor:n}={}){return(0,Z.W)(e,t,a,n,this.options,this.getIsValidMentionIdDispatched,e=>{this.blockquote=e},this.quill.getModule("slackslug")?.convertLinksToSlugs)}insertPastedDelta(e){let t={contents:e.ops},a=this.options.useWysiwyg&&!this.options.usePlainTextMode&&this.matchBlockFormat;this.options.texty.insertContentsAtCursor(t,!0,"user",{matchBlockFormat:a})}maybeShowMarkdownToast({preparedDelta:e,clipboardHasTextyContents:t}){!this.options.showMarkdownPasteToast||this.options.usePlainTextMode||t||0!==(0,F.A)(e).length()&&this.options.showMarkdownPasteToast({applyFormatting:()=>{[er.A,F.A].forEach(e=>{let t=e(this.quill.getContents());this.quill.updateContents(t)})}})}correctCopyRange(e){if(!e||!this.options.useWysiwyg)return e;let t=e.index+e.length,a=this.quill.getContents(t,1);if((0,G.Fr)(a)){this.options.logger.info("COPY","extending selection range to include block formatting char");let t=e.length+1;return{index:e.index,length:t}}return e}}}getPlainClipboardModule(window)},0x93c88edd:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackDocsListModule});var n=a(0x224f7f0e9),r=a(0x3e6dd1df);function getSlackDocsListModule(e=window){let t=(0,r.A)(e).import("core/module");return class extends t{constructor(e,t){super(e,t),this.quill.keyboard.addBinding({key:n.UQ},this.findCheckboxBehind),this.quill.keyboard.addBinding({key:n.LE},this.findCheckboxAhead)}findCheckboxBehind(e){if(e){if(e&&e.length>0)return this.quill.setSelection(e.index,0),!1;let t=this.quill.getFormat(e);if(t&&t.list&&("checked"===t.list||"unchecked"===t.list)){let[t,a]=this.quill.getLeaf(e.index);if(0===a){let e=t&&t.parent;if(e){let t=e.domNode.querySelector(".slack-docs-list-item-checkbox");if(t&&document.activeElement!==t)return t.focus(),!1}}}}return!0}findCheckboxAhead(e){if(e){let t=this.quill.getFormat(e);t&&t.list&&("checked"===t.list||"unchecked"===t.list)&&setTimeout(()=>{let[t,a]=this.quill.getLeaf(e.index+1);if(0===a){let e=t&&t.parent;if(e){let t=e.domNode.querySelector(".slack-docs-list-item-checkbox");if(t&&document.activeElement!==t)return t.focus(),!1}}return!0},0)}return!0}}}},0xb562d18d:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackEmojiModule});var n=a(0x118cdcdea),r=a.n(n),i=a(0x20b4dda68),l=a(0x17205d3a0),o=a(0x120b95954);function increment(e){if(!e)return 2;let t=e+1;return t>6?1:t}function generateNextSkinTone(e,t,{emojiSupportsMultiSkinTones:a}){if(a&&t.length!==e.length-2){let a=e.substr(t.length+2).match(o.x);if(a){let e=parseInt(a[2],10)||1,t=parseInt(a[3],10)||e;return(6===t?(e=increment(e),t=increment(t)):t&&(t=increment(t)),1===e)?"":e===t?`:skin-tone-${e}:`:`:skin-tone-${e}-${1===t?2:t}:`}}else if(t.length!==e.length-2){let a=e.substr(t.length+2).match(o.S);return a&&"6"!==a[2]?`:skin-tone-${parseInt(a[2],10)+1}:`:""}return":skin-tone-2:"}var s=a(0x3e6dd1df),c=a(0x79469c7e),d=a(0x1829a8d43),m=a(0x18cf3444e),u=a(0x4cd77de3),p=a(0x2398accc);let h=/\S/,_=/^\s*:\S*\n$/;var f=a(0x1f45d59b6),b=a(0xd40f768d),g=a(0x1266f1359),y=a(0x1e4ae349d);function getSlackEmojiModule(e){let t=(0,s.A)(e),a=t.import("core/module"),n=t.import("parchment");return class extends a{constructor(e,t){super(e,t),this.onSpace=this.onSpace.bind(this),this.onEnter=this.onEnter.bind(this),this.onCompositionStart=this.onCompositionStart.bind(this),this.onCompositionEnd=this.onCompositionEnd.bind(this),this.onEmojiClick=this.onEmojiClick.bind(this),this.toggleJumbomoji=this.toggleJumbomoji.bind(this),this.updateJumbomojiClass=t.updateJumbomojiClass,this.isInComposition=!1,this.options.inlineEmojiIsEnabled||(this.options.inlineEmojiIsEnabled=()=>!1),this.options.convertEmoticonsIsEnabled||(this.options.convertEmoticonsIsEnabled=()=>!1),this.listen()}unload(){this.quill.root.removeEventListener("click",this.onEmojiClick),this.quill.root.removeEventListener("compositionstart",this.onCompositionStart),this.quill.root.removeEventListener("compositionend",this.onCompositionEnd)}listen(){this.quill.keyboard.addBinding({key:" ",shiftKey:null,collapsed:!0,format:{link:!1,code:!1,"code-block":!1}},this.onSpace),this.quill.root.addEventListener("click",this.onEmojiClick,!1),this.quill.root.addEventListener("compositionstart",this.onCompositionStart),this.quill.root.addEventListener("compositionend",this.onCompositionEnd)}onCompositionStart(){this.isInComposition=!0}onCompositionEnd(){this.isInComposition=!1}maybeConvertEmoticonFromKeyboardBinding(e,t,a){if(this.isInComposition||!this.options.convertEmoticonsIsEnabled())return!1;let n=t.prefix;if(!n)return!1;let r=(0,c.A)();if(!r)return!1;let l=-1,o="";n.replace(r,(e,t,a,n)=>{l=n+t.length,o=a});let s=e.index-n.length+l;if(!i.dq[o]||this.options.useWysiwyg&&t.format&&(t.format.link||t.format.code||t.format["code-block"]))return!1;if(!this.options.useWysiwyg||this.options.usePlainTextMode){if((0,b.A)(this.quill.getText(0,s)))return!1;let e=(0,m.A)(n);if((0,f.A)(s,e))return!1}if("8)"===o&&s>3&&`
`===this.quill.getText(s-1,1)){let e=this.quill.getText(0,s-1);if("7)"===e.substr(e.lastIndexOf(`
`)+1,2))return!1}if(this.options.useWysiwyg&&s>0){let e=this.quill.getContents(s-1,1).ops[0];if(!((0,p.A)(e)&&e.insert.match(/\s/)||(0,u.Ay)(e)))return!1}this.quill.deleteText(s,o.length),this.quill.insertEmbed(s,"slackemoji",{text:`:${i.dq[o]}:`});let d=e.index+(a?a.length:0)-o.length+1;return a&&this.quill.insertText(d-1,a),this.quill.setSelection(d),!0}onEnter(e,{range:t,context:a}){return this.maybeConvertEmoticonFromKeyboardBinding(t,a),!1}onSpace(e,t){return!this.maybeConvertEmoticonFromKeyboardBinding(e,t," ")}onEmojiClick(e){let t=e.target;if(!(t?.classList.contains("emoji")&&t?.hasAttribute("data-has-skin-tone")))return!0;let a=n.find(e.target).offset(this.quill.scroll),i=this.quill.getContents(a,1);if(i.ops[0]&&(0,u.Ay)(i.ops[0])){let e=i.ops[0].insert.slackemoji.text,t=(0,d.A)(e)||{name:""},n=this.options.teamId&&(0,g.$D)(this.options.teamId),l=(0,y.Fm)(n,{text:t.name,teamId:this.options.teamId}),o=(0,y.pA)(n,{text:t.name,teamId:this.options.teamId});if(!l&&!o)return!0;let s=generateNextSkinTone(e,t.name,{emojiSupportsMultiSkinTones:o}),c=new(r());c.retain(a).delete(1).insert({slackemoji:{text:`:${t.name}:${s}`}}),this.quill.updateContents(c)}return!0}toggleJumbomoji(e){if(this.options.isJumbomojiEnabled){if(!this.options.isJumbomojiEnabled())return void this.updateJumbomojiClass(!1);this.updateJumbomojiClass((e=>{if(1>=e.length())return!1;let t=e.ops.length-1,a=0;return e.ops.every((e,n)=>{if((0,u.Ay)(e))return(a+=1)<=i.kf;if((0,p.A)(e)){let r=(0,p.$)(e);if(!h.test(r)||a>0&&t===n&&_.test(r))return!0}return!1})})(e))}}buildTextChangeDelta(e,t={useWysiwyg:!1,usePlainTextMode:!1,formattingOnly:!1}){return(0,l.A)(e,{useWysiwyg:t.useWysiwyg,usePlainTextMode:t.usePlainTextMode,inlineEmojiIsEnabled:this.options.inlineEmojiIsEnabled(),emojiNames:this.options.getEmojiNames?this.options.getEmojiNames():[],locale:this.options.getLocale?this.options.getLocale():void 0,replaceNativeEmoji:this.options.replaceNativeEmoji,teamId:this.options.teamId})}afterTextChangeQueue(e){this.toggleJumbomoji(e)}}}getSlackEmojiModule(window)},0x1117ab7e4:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackHorizontalRuleModule});var n=a(0x224f7f0e9),r=a(0x3e6dd1df);function getSlackHorizontalRuleModule(e){let t=(0,r.A)(e),a=e||window,i=t.import("core/module");return class extends i{constructor(e,t){super(e,t),this.muteKeyEventsOnHrEmbed=this.muteKeyEventsOnHrEmbed.bind(this),this.listen=this.listen.bind(this),this.listen()}listen(){a.document.addEventListener("keydown",this.muteKeyEventsOnHrEmbed)}unload(){a.document.removeEventListener("keydown",this.muteKeyEventsOnHrEmbed)}muteKeyEventsOnHrEmbed(e){let t=this.quill.getSelection();if(t){let a=this.quill.getFormat(t);if(a&&a.slackhorizontalrule){if(e.keyCode===n.Fm||e.keyCode===n.n6||e.keyCode===n.i7||e.keyCode===n.UQ||e.keyCode===n.LE)return!0;e.preventDefault()}}return!0}}}},0x130405be8:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackKeyboardModule});var n=a(0x1cbdfeceb),r=a(0xec1862de),i=a(0xdf8554bd),l=a(0x18f2150ea),o=a(0x20b4dda68),s=a(0x62a17882),c=a(0x224f7f0e9),d=a(0x3e6dd1df),m=a(0x118cdcdea),u=a.n(m),p=a(0x154794b8e),h=a(0xadc5056a);function convertMarkdown({quill:e,range:t,context:a}){let n=new(u()),r=null;!a.collapsed&&t&&t.index>0&&(n.retain(t.index),r=e.getContents(t.index-1,1));let i=a.collapsed?e.getContents():e.getContents(t?.index,t?.length),l=(0,h.A)(i),o=t?.length;a.collapsed||(o=i?.compose(l).length()),e.updateContents(n.concat(l));let s=a.collapsed?e.getContents():e.getContents(t?.index,o),c=(0,p.A)(s,r);e.updateContents(n.concat(c))}let onEnd=({quill:e,texty:t,range:a,context:n,shiftKey:r})=>!(!t.isEnabled()||t.getModules().some(e=>!!e.onEnd&&e.onEnd({context:n})))&&(!(0,s.cX)()||(r?e.setSelection(a.index,e.getLength()-a.index):e.setSelection(e.getLength(),0),!1));var _=a(0x21da4684a),f=a(0x21f3c49e8),b=a(0x1673f3229),g=a(0xd4e00a1e),y=a(0xca26de21);function isSelectionAtEnd(e){if(!e)return!1;let t=e.getSelection();return!!t&&t.index+t.length===e.getLength()-1}let onEnter=({modifiers:e={},range:t,context:a,onEnterExternal:r,quill:i,texty:l,singleLineInput:o,shouldInsertNewline:s=n.A,useWysiwyg:c})=>{if(!l.isEnabled()||l.getModules().some(n=>!!n.onEnter&&n.onEnter(e,{range:t,context:a,shouldInsertNewline:s})))return!1;if(!o&&s(e)||r?.(e)){let n=[];if(c&&a){if(n=(0,_.A)(Object.keys(a.format||{}),["bold","italic","underline","strike","code"]),a&&!(0,f.A)(a.format)&&a.format.header&&0===a.offset)return i.setSelection(t.index,"silent"),i.insertText(t.index,`
`,"user"),i.setSelection(t.index+1,"silent"),i.removeFormat(t.index),!1;if(a&&!(0,f.A)(a.format)&&a.format.header&&0!==a.offset&&!e.shiftKey&&setTimeout(()=>{let e=i.getSelection();i.removeFormat(e.index)},0),a&&!(0,f.A)(a.format)&&a.format.slackhorizontalrule)return i.insertText(t.index+1,`
`,"user"),i.setSelection(t.index+1,"silent"),!1;if(a.collapsed&&a.format&&a.format["code-block"]&&(!a.suffix.length||a.suffix.match(/^\s+$/))){let e=t.index>1?i.getContents(t.index-2,2):null,a=e&&e.ops&&1===e.ops.length&&e.ops[0];if(a&&`

`===a.insert&&a.attributes&&a.attributes["code-block"])return i.insertText(t.index,`
`),i.setSelection(t.index+1,0),i.removeFormat(t.index+1,0),i.deleteText(t.index-2,2,"user"),!1}if(a?.format?.["code-block"]&&setTimeout(()=>{let e=i.getFormat(t.index-1,1),a=i.getFormat(t.index,1);(!e?.border||a?.border)&&i.formatLine(t.index-1,1,"border",e.border||a.border)},0),a.format.list&&!a.prefix.length&&!a.suffix.length&&a.empty)return i.formatLine(t.index,1,{list:!1,indent:0},"silent"),!1;if(a&&a.collapsed&&a.format&&a.format.blockquote&&!a.prefix.length&&!a.suffix.length){let e=t.index>1?i.getContents(t.index-2,2):null,a=e&&e.ops&&1===e.ops.length&&e.ops[0];if(a&&`

`===a.insert&&a.attributes&&a.attributes.blockquote)return i.insertText(t.index,`
`),i.setSelection(t.index+1,0),i.removeFormat(t.index+1,0),i.deleteText(t.index-2,2,"user"),!1}a&&a.format&&a.format.code&&a.prefix.length&&a.suffix.length&&(n=(0,b.A)(n,"code"),setTimeout(()=>(i.formatText(t.index,t.index+a.suffix.length,{code:!1},"silent"),!0),0))}let r=(0,g.A)(a.format||{},["code-block","blockquote","list","header"]);a?.format?.indent&&(r.indent=a.format.indent),a?.format?.border&&(r.border=a.format.border),l.insertContentsAtCursor({contents:new(u())().insert(`
`,r).ops}),c&&n.length&&n.forEach(e=>{i.format(e,!0)}),i.selection.scrollIntoView(i.scrollingContainer),(0,y.A)(i.scrollingContainer)&&isSelectionAtEnd(i)&&(i.scrollingContainer.scrollTop=Number.MAX_SAFE_INTEGER)}return!1},onHome=({quill:e,texty:t,range:a,context:n,shiftKey:r})=>!(!t.isEnabled()||t.getModules().some(e=>!!e.onHome&&e.onHome({context:n})))&&(!(0,s.cX)()||(r?e.setSelection(0,a.index+a.length):e.setSelection(0,0),!1)),onTab=({modifiers:e={},onTabExternal:t,texty:a,context:n})=>!a.getModules().some(t=>!!t.onTab&&t.onTab(e))&&(!t||t({modifiers:e,texty:a,context:n}));var A=a(0x3711e82d),x=a(0x45012309),E=a(0x18191f91),C=a(0x14d2ae7bc),k=a(0x12d25e82d),v=a(0x4cd77de3),S=a(0x190c367fe),I=a(0x1266f1359);let w=o.Az-1,T={bindings:{},onEnter:n.A,onEscape:n.A,onTab:n.A,featureReactMessages:!0,shouldInsertNewline:n.A};function clogListIndentFormatting({teamId:e,isIndent:t,indentLevel:a}){let n=t?A.MsgFormattingInputFormat.INDENT:A.MsgFormattingInputFormat.DEDENT;(0,x.eo)((0,I.oK)(e)).track(A.EventId.MSG_FORMATTING_ADDED,{input_context:A.MsgFormattingInputContext.MESSAGE,input_source:A.MsgFormattingInputSource.KEYBOARD,input_format:n,indent_level:a,is_selection:!1})}function getNestedListsBindings({teamId:e,Quill:t}){return{indent:{key:c.wn,format:["indent","list"],handler(a,n){if(n.collapsed&&0!==n.offset)return!0;this.quill.format("indent","+1",t?.sources.USER);let r=(n?.format?.indent||0)+1;return r<=w&&clogListIndentFormatting({teamId:e,isIndent:!0,indentLevel:r}),!1}},outdent:{key:c.wn,shiftKey:!0,format:["indent","list"],handler(a,n){if(n.collapsed&&0!==n.offset)return!0;this.quill.format("indent","-1",t?.sources.USER);let r=n?.format?.indent||0;return r>0&&clogListIndentFormatting({teamId:e,isIndent:!1,indentLevel:r-1}),!1}},"outdent backspace":{key:c.G_,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(a,n){null!=n.format.indent?this.quill.format("indent","-1",t.sources.USER):null!=n.format.list&&this.quill.format("list",!1,t.sources.USER);let r=n?.format?.indent||0;r>0&&clogListIndentFormatting({teamId:e,isIndent:!1,indentLevel:r-1})}}}}function getSlackKeyboardModule(e){let t=(0,d.A)(e),a=t.import("modules/keyboard");return class extends a{constructor(e,a){let n=a;const l=((e,{texty:t,singleLineInput:a,onEnterExternal:n,onBackspaceExternal:l,onTabExternal:o,inlineEmojiIsEnabled:d,useWysiwyg:m,usePlainTextMode:u,shouldInsertNewline:p,teamId:h,Quill:_})=>{let f=(0,s.cX)()?"metaKey":"ctrlKey",b={...getNestedListsBindings({teamId:h,Quill:_}),underline:{key:"u",shortKey:!0,handler:a=>{if(t?.options?.onPlusMenuShortcut&&!t?.options?.isUnderlineEnabled)return t.options.onPlusMenuShortcut(),!1;if(-1===e.options.formats.indexOf("underline"))return!0;let n=e.getModule("keyboard");return n&&t?.options?.isUnderlineEnabled?n.applyFormattingFromShortcut("underline",a):(n&&n.applyFormattingFromShortcut("underline",a),!0)}},"file upload":{key:"o",shortKey:!0,handler:()=>!((0,s.y3)()&&t?.options?.onPlusMenuShortcut&&t?.options?.isUnderlineEnabled)||(t.options.onPlusMenuShortcut(),!1)},home:{key:c.yZ,handler:(a,n)=>onHome({texty:t,quill:e,range:a,context:n,shiftKey:!1})},shiftHome:{key:c.yZ,shiftKey:!0,handler:(a,n)=>onHome({texty:t,quill:e,range:a,context:n,shiftKey:!0})},end:{key:c.Kp,handler:(a,n)=>onEnd({texty:t,quill:e,range:a,context:n,shiftKey:!1})},shiftEnd:{key:c.Kp,shiftKey:!0,handler:(a,n)=>onEnd({texty:t,quill:e,range:a,context:n,shiftKey:!0})},backspace:{key:c.G_,handler:(e,a)=>(({texty:e,range:t,context:a,onBackspaceExternal:n})=>{if(!e.isEnabled()||e.getModules().some(e=>!!e.onBackspace&&e.onBackspace({range:t,context:a})))return!1;if(n){let e=n();return!(0,i.A)(e)||e}return!0})({texty:t,range:e,context:a,onBackspaceExternal:l})},enter:{key:c.Fm,context:{empty:!1},handler:(r,i)=>onEnter({range:r,context:i,onEnterExternal:n,quill:e,texty:t,singleLineInput:a,shouldInsertNewline:p,useWysiwyg:m})},shiftEnter:{key:c.Fm,shiftKey:!0,context:{empty:!1},handler:(r,i)=>onEnter({modifiers:{shiftKey:!0},range:r,context:i,onEnterExternal:n,quill:e,texty:t,singleLineInput:a,shouldInsertNewline:p,useWysiwyg:m})},metaEnter:{key:c.Fm,shiftKey:!1,shortKey:!0,handler:(r,i)=>onEnter({modifiers:{[f]:!0},range:r,context:i,onEnterExternal:n,quill:e,texty:t,singleLineInput:a,shouldInsertNewline:p,useWysiwyg:m})},metaShiftEnter:{key:c.Fm,shiftKey:!0,shortKey:!0,handler:(r,i)=>onEnter({modifiers:{[f]:!0,shiftKey:!0},range:r,context:i,onEnterExternal:n,quill:e,texty:t,singleLineInput:a,shouldInsertNewline:p,useWysiwyg:m})},optionEnter:{key:c.Fm,altKey:!0,handler:(r,i)=>onEnter({modifiers:{altKey:!0},range:r,context:i,onEnterExternal:n,quill:e,texty:t,singleLineInput:a,shouldInsertNewline:p,useWysiwyg:m})},ctrlEnter:{key:c.Fm,ctrlKey:!0,handler:(r,i)=>onEnter({modifiers:{ctrlKey:!0},range:r,context:i,onEnterExternal:n,quill:e,texty:t,singleLineInput:a,shouldInsertNewline:p,useWysiwyg:m})},tab:{key:c.wn,handler:(e,a)=>onTab({onTabExternal:o,texty:t,context:a})},shiftTab:{key:c.wn,shiftKey:!0,handler:(e,a)=>onTab({modifiers:{shiftKey:!0},onTabExternal:o,texty:t,context:a})},"indent code-block":{key:c.wn,shiftKey:!1,format:{"code-block":!0},handler:()=>!0},"outdent code-block":{key:c.wn,shiftKey:!0,format:{"code-block":!0},handler:()=>!0},"code exit":{key:c.Fm,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(){return!0}},"header enter":{key:c.Fm,collapsed:!0,format:["header"],suffix:/^$/,handler:()=>!0},"list autofill":m&&!u&&{key:" ",collapsed:!0,format:{list:!1,code:!1,"code-block":!1},ctrlKey:null,shiftKey:null,altKey:null,prefix:/^\s*?(1(\.|\))|-|\*|\u2022|\[ ?\]|\[x\])$/,handler(e,t){let a,n;if(t.prefix&&t.prefix.startsWith("[")&&!this.quill.options.modules.slackdocslist)return!0;let r=t.prefix.length,i=this.quill.getLine(e.index)[1],l=this.quill.getFormat();if(i>r)return!0;switch(t.prefix.trim()){case"[]":case"[ ]":a="unchecked",n=A.MsgFormattingInputFormat.CHECK_LIST;break;case"[x]":a="checked",n=A.MsgFormattingInputFormat.CHECK_LIST;break;case"-":case"*":case"\u2022":a="bullet",n=A.MsgFormattingInputFormat.BULLET_LIST;break;default:a="ordered",n=A.MsgFormattingInputFormat.ORDERED_LIST}let o=(0,S.Xh)(this.quill,e),s=l?.blockquote?"1":"0";return(0,k.A)(this.quill,{format:{list:a,border:s},range:e,replacementLength:r,charToInsert:" "}),(0,x.eo)((0,I.oK)(h)).track(A.EventId.MSG_FORMATTING_ADDED,{input_context:A.MsgFormattingInputContext.MESSAGE,input_source:A.MsgFormattingInputSource.MARKDOWN,input_format:n,is_selection:!1,input_prexisting_block_formats:o}),!1}},"opt/ctrl shift left arrow":{key:c.UQ,shiftKey:!0,altKey:(0,s.cX)(),ctrlKey:!(0,s.cX)(),collapsed:!0,handler:function(e){if(!d||!d()||!e||e.index<1)return!0;let t=this.quill.getContents(e.index-1,1),a=t&&t.ops&&t.ops[0];return!(0,v.Ay)(a)||(this.quill.setSelection(e.index-1,1),!1)}},"opt/ctrl shift right arrow":{key:c.LE,shiftKey:!0,altKey:(0,s.cX)(),ctrlKey:!(0,s.cX)(),collapsed:!0,handler:function(e){if(!d||!d())return!0;let t=this.quill.getLength();if(!e||e.index>=t-1)return!0;let a=this.quill.getContents(e.index,1),n=a&&a.ops&&a.ops[0];return!(0,v.Ay)(n)||(this.quill.setSelection(e.index,1),!1)}}};return m&&!u&&((0,r.A)(b,{"block code down arrow":{key:c.n6,shiftKey:!1,metaKey:!1,altKey:!1,ctrlKey:!1,collapsed:!0,format:["code-block"],handler(e,t){if(!t.suffix.length||`
`===t.suffix){let a=this.quill.getLength()-1;t.prefix.length&&e.index===a&&this.quill.insertText(e.index+1,`
`,"user")}return!0}},"up arrow out of code block":{key:c.i7,format:{"code-block":!0},collapsed:!0,handler(e,t){let[a]=this.quill.getLine(e.index-1);return a&&!a.prev&&a.parent&&a.parent.statics&&a.parent.statics.blotName&&"scroll"===a.parent.statics.blotName&&0===t.prefix.length&&0===e.index&&setTimeout(()=>(this.quill.insertText(0,` 
`,{"code-block":!1},"silent"),this.quill.setSelection(0,0,"silent"),!1),0),!0}},"inline code right arrow":{key:c.LE,shiftKey:!1,metaKey:!1,altKey:!1,ctrlKey:!1,collapsed:!0,format:["code"],handler(e,t){return`
`!==this.quill.getText(e.index,1)||!t.prefix.length||!!t.suffix.length||(this.quill.insertText(e.index," ","user"),this.quill.formatText(e.index,1,"code",!1,"silent"),this.quill.setSelection(e.index+1,0,"silent"),!1)}},"HACK: fix word-delete inline code":{key:c.G_,metaKey:!1,shiftKey:!1,empty:!1,altKey:(0,s.cX)(),ctrlKey:!(0,s.cX)(),handler(e){if(`
`!==this.quill.getText(e.index+e.length,1))return!0;if(e.length){if(!this.quill.getFormat(e.index+1).code)return!0}else if(!this.quill.getFormat(e.index-1,0).code)return!0;return setTimeout(()=>{let e=this.quill.getSelection();e&&(this.quill.insertText(e.index," ","silent"),this.quill.deleteText(e.index,1,"silent"))},0),!0}},"delete on empty line to merge with code block":{key:c.SJ,empty:!0,handler(e){return setTimeout(()=>{let t=this.quill.getFormat(e.index,0),a=this.quill.getFormat(e.index-1,0);!t?.border&&a?.border>0&&this.quill.formatLine(e.index,0,"border","1"),t?.border>0&&!a?.border&&this.quill.formatLine(e.index-1,0,"border","1")},0),!0}},"delete line after code block from within code block":{key:c.SJ,format:{"code-block":!0},handler(e){let t=`
`===this.quill.getText(e.index,1),a=this.quill.getFormat(e.index,0);return t&&a?.["code-block"]&&(this.quill.formatLine(e.index+1,0,"code-block",!0),a?.border&&this.quill.formatLine(e.index+1,0,"border","1"),setTimeout(()=>{let t=this.quill.getFormat(e.index,0),a=this.quill.getFormat(e.index+1,0);!t?.border&&a?.border>0&&this.quill.formatLine(e.index,0,"border","1"),t?.border>0&&!a?.border&&this.quill.formatLine(e.index+1,0,"border","1")},0)),!0}},"backspace merging code blocks from empty line":{key:c.G_,empty:!0,format:{"code-block":!1,blockquote:!1},handler(e){return setTimeout(()=>{let t=this.quill.getFormat(e.index-1,0),a=this.quill.getFormat(e.index,0);!t?.border&&a?.border>0&&this.quill.formatLine(e.index-1,0,"border","1"),t?.border>0&&!a?.border&&this.quill.formatLine(e.index,0,"border","1")},0),!0}},"backspace merging code blocks from within code block":{key:c.G_,offset:0,format:{"code-block":!0},handler(e){return setTimeout(()=>{let t=this.quill.getFormat(e.index-1,0),a=this.quill.getFormat(e.index-2,0);t?.border&&!a?.border>0&&this.quill.formatLine(e.index-2,0,"border","1"),!t?.border&&a?.border>0&&this.quill.formatLine(e.index-1,0,"border","1")},0),!0}},"sanitize code block border information after undo":{key:"Z",shortKey:!0,format:{"code-block":!0,border:"1"},handler(){let e=this.quill.getSelection();return setTimeout(()=>{let t=this.quill.getContents();this.quill.setContents(t),this.quill.setSelection(e?.index||0,0)},0),!0}},"sanitize quoted list border information after undo":{key:"Z",shortKey:!0,format:{list:!0,border:"1"},handler(e,t){return setTimeout(()=>{t?.format?.border&&this.quill.formatLine(e.index,e.length,{border:"0"})},0),!0}},"sanitize quoted blockquote border information after undo":{key:"Z",shortKey:!0,format:{blockquote:!0,border:"1"},handler(e,t){return this.quill.formatLine(e.index,e.length,{border:"0"}),t.empty?this.quill.insertText(e.index,"> "):this.quill.insertText(0,"> "),this.quill.setSelection(e.index+2,0),!1}},"backspace empty code block with border":{key:c.G_,collapsed:!0,empty:!0,offset:0,format:{"code-block":!0,border:!0},handler(){return this.quill.format("border","0","user"),!0}},"backspace empty code block":{key:c.G_,collapsed:!0,empty:!0,offset:0,format:{"code-block":!0,border:!1},handler(){return this.quill.format("code-block",!1,"user"),!0}},"backspace empty blockquote":{key:c.G_,collapsed:!0,empty:!0,offset:0,format:["blockquote"],handler(e,t){return t?.format?.border&&t?.format?.border>=1?this.quill.format("border","0","user"):this.quill.format("blockquote",!1,"user"),!1}},"backspace non-empty single line blockquote":{key:c.G_,collapsed:!0,empty:!1,offset:0,format:["blockquote"],handler(e,t){let a=t?.format?.border&&t?.format?.border>=1,n=t?.suffix,r=this.quill.getFormat(e.index-1,0),i=this.quill.getFormat(e.index+n.length+1,0),l=r.blockquote||i.blockquote,o=!i.blockquote&&0===e.index;return a&&(!l||o)?this.quill.format("border","0","silent"):a||l&&!o?n&&l&&this.quill.deleteText(e.index-1,1):this.quill.format("blockquote",!1,"silent"),!1}},"convert markdown":{key:"f",shortKey:!0,shiftKey:!0,handler(e,t){convertMarkdown({quill:this.quill,range:e,context:t})}}}),(0,r.A)(b,{bold:{key:"B",shortKey:!0,handler(e){return this.applyFormattingFromShortcut("bold",e)}},italic:{key:"I",shortKey:!0,handler(e){return this.applyFormattingFromShortcut("italic",e)}},strike:{key:"x",shiftKey:!0,shortKey:!0,handler(e){return this.applyFormattingFromShortcut("strike",e)}},code:{key:"c",shiftKey:!0,shortKey:!0,handler(e){return this.applyFormattingFromShortcut("code",e)}},link:{key:"u",shiftKey:!0,shortKey:!0,handler(){return this.options.showLinkForm&&this.options.showLinkForm({source:A.MsgFormattingInputSource.KEYBOARD}),!1}},"bullet-list":{key:56,shiftKey:!0,shortKey:!0,handler(e){return this.applyFormattingFromShortcut("bullet-list",e)}},"ordered-list":{key:55,shiftKey:!0,shortKey:!0,handler(e){return this.applyFormattingFromShortcut("ordered-list",e)}},blockquote:{key:57,shiftKey:!0,shortKey:!0,handler(e){return this.applyFormattingFromShortcut("blockquote",e)}},"blockquote-alt":{key:190,shiftKey:!0,shortKey:!0,handler(e){return this.applyFormattingFromShortcut("blockquote",e)}},"code-block":{key:"c",shortKey:!0,shiftKey:!0,altKey:!0,handler(e){return this.applyFormattingFromShortcut("code-block",e)}}})),b})(e,n=(0,r.A)({},{Quill:t,...T},n));n.bindings=(0,r.A)({},n.bindings,l),super(e,n),this.onKeydown=this.onKeydown.bind(this),e.root.addEventListener("keydown",this.onKeydown),((e,{onCmdLeftWhenEmpty:t,onCmdRightWhenEmpty:a,onCmdKWhenSelected:n,onCmdZWhenEmpty:r,onDownArrowWhenEmpty:l,onEscapeExternal:o,onUpArrow:s,onUpArrowCmd:d,onUpArrowShift:m,onDownArrow:u,onDownArrowCmd:p,onDownArrowShift:h,onRightArrow:_,onLeftArrow:f,onSelectAll:b,onPageUp:g,onPageDown:y,texty:A,useWysiwyg:x})=>{let E=[{key:c._f,handler:(t,a)=>(({onEscapeExternal:e,quill:t,texty:a,useWysiwyg:n,range:r,context:i})=>!a.getModules().some(e=>!!e.onEscape&&e.onEscape())&&(n&&(i.empty&&i.collapsed&&i.format.blockquote||i.collapsed&&i.format["code-block"]&&(i.empty||i.prefix.length&&`
`===i.prefix.substr(-1)))?(t.removeFormat(r),!1):!e||!e()))({onEscapeExternal:o,quill:e,texty:A,useWysiwyg:x,range:t,context:a})}];return s&&E.push({key:c.i7,format:{"code-block":!1},handler:()=>s()}),u&&E.push({key:c.n6,handler:()=>u()}),_&&E.push({key:c.LE,handler(){let e=_();return!(0,i.A)(e)||e}}),f&&E.push({key:c.UQ,handler(){let e=f();return!(0,i.A)(e)||e}}),d&&E.push({key:c.i7,shortKey:!0,handler:()=>(d(),!0)}),p&&E.push({key:c.n6,shortKey:!0,handler:()=>(p(),!0)}),m&&E.push({key:c.i7,shiftKey:!0,handler:()=>(m(),!0)}),h&&E.push({key:c.n6,shiftKey:!0,handler:()=>(h(),!0)}),l&&E.push({key:c.n6,handler:()=>(1===e.getLength()&&l(),!0)}),t&&E.push({key:c.UQ,shortKey:!0,handler:()=>(1===e.getLength()&&t(),!0)}),a&&E.push({key:c.LE,shortKey:!0,handler:()=>(1===e.getLength()&&a(),!0)}),r&&E.push({key:"Z",shortKey:!0,handler:()=>1!==e.getLength()||!r()}),n&&E.push({key:"K",shortKey:!0,handler:()=>(e.getSelection()?.length&&n(),!0)}),b&&E.push({key:"A",shortKey:!0,handler(){let e=b();return!(0,i.A)(e)||e}}),g&&E.push({key:c.w_,handler(){let e=g();return!(0,i.A)(e)||e}}),y&&E.push({key:c.dB,handler(){let e=y();return!(0,i.A)(e)||e}}),E})(e,n).forEach(e=>this.addBinding(e)),a.onLeftArrow&&(this.onLeftArrow=a.onLeftArrow)}applyFormattingFromShortcut(e,t){let a=(0,S.Xh)(this.quill,t),{didHandle:n,addedFormatting:r,hadSelection:i}=(0,E.A)(this.quill,{format:e,index:t.index,length:t.length},this.options.useExpandedRichText);return n&&(0,l.A)(C.Hm[e])&&(0,x.eo)((0,I.oK)(this.options.teamId)).track(r?A.EventId.MSG_FORMATTING_ADDED:A.EventId.MSG_FORMATTING_REMOVED,{input_context:A.MsgFormattingInputContext.MESSAGE,input_source:A.MsgFormattingInputSource.KEYBOARD,input_format:C.Hm[e],is_selection:i,input_prexisting_block_formats:a}),!1}onKeydown(e){this.onLeftArrow&&e.keyCode===c.UQ&&1===this.quill.getLength()&&this.onLeftArrow()}unload(){this.quill.root.removeEventListener("keydown",this.onKeydown)}}}},0x1c94e1914:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackLinkModule});var n=a(0x20bafd237),r=a(0x18f2150ea),i=a(0x21f3c49e8),l=a(0x118cdcdea),o=a.n(l),s=a(0x3e6dd1df),c=a(0x3711e82d),d=a(0x45012309),m=a(0x4c69b9f6),u=a(0x5a228fbb),p=a(0x1bc89bda),h=a(0xd9d06d50),_=a(0x222762a83),f=a(0x187155f2e),b=a(0x2398accc),g=a(0xb06a6e56);function removeFormatFromRange(e,t,a,n){if(!e||!n)return;let r=e.getFormat(t,a);r&&r[n]&&(r[n]=null,e.formatText(t,a,r))}var y=a(0x1266f1359);function getSlackLinkModule(e){let t=(0,s.A)(e),a=t.import("core/module"),l=t.import("formats/link");return class extends a{constructor(e,t){super(e,t),this.maybeLinkify=this.maybeLinkify.bind(this);const a=(0,y.oK)(this.options.teamId);this.skipNextTextChange=!1,this.clogger=(0,d.eo)(a),l.sanitize=e=>e,this.listen()}listen(){this.options.linkifyOnSpace||this.quill.keyboard.addBinding({key:" ",shiftKey:null,collapsed:!0},this.maybeLinkify)}onEnter(e,{range:t,context:a,shouldInsertNewline:n}){if(!t||t.length>0||!n(e))return!1;let r=this.quill.getFormat(t),i=this.quill.getFormat(t.index+1),l=this.quill.getLine(t.index)[1];if(r.link&&i.link&&r.link===i.link&&0!==l&&0!==a.prefix.trim().length){let[e,a]=this.quill.getLeaf(t.index);e.text&&removeFormatFromRange(this.quill,t.index-a,e.domNode.length,"link")}else this.maybeLinkify(t,a);return!1}maybeLinkify(e,t){if(t&&t.format&&t.format["code-block"])return!0;let a=t.prefix.lastIndexOf(" "),r=-1!==a?t.prefix.substr(a+1):t.prefix,i=(0,m.A)({input:r}),l=(0,n.A)(i);if(!l)return!0;let{url:o,offset:s,text:d}=l,u=d.length,p=e.index-r.length+s,h=this.quill.getFormat(p,u);return!!h&&!!h.link||!!h&&!!h.slackslug||!!h&&!!h.code||(this.quill.formatText(p,u,"link",o),this.clogger.track(c.EventId.MSG_FORMATTING_ADDED,{input_context:c.MsgFormattingInputContext.MESSAGE,input_source:c.MsgFormattingInputSource.MARKDOWN,input_format:c.MsgFormattingInputFormat.LINK,is_selection:u>0}),!0)}getChangeIndex(e){if(!e)return null;let t=e.ops;return t&&t.length?(0,b.A)(t[0])||(0,h.A)(t[0])?0:t.length>1&&(0,f.A)(t[0])&&((0,b.A)(t[1])||(0,h.A)(t[1]))?t[0].retain:null:null}getRelevantOpData(e,t){let a=(0,b.A)(e),n=a?(0,b.$)(e).substr(0,t):"",r=a?(0,b.$)(e).substr(t):"",i=a&&n.match(/\s/g),l=a&&r.match(/\s/),o=(0,_.Ay)(e)||!(0,b.A)(e),s=0===n.length&&r.length>0&&r[0].match(/\s/),c=o||!i||s,d=o||!l,m=0;if(!a)return{shouldGetPreviousOp:c,shouldGetNextOp:d,offsetAdjustment:m,opTextChanged:!1,relevantText:""};let u=n;!c&&i&&(m=n.lastIndexOf(i[i.length-1]),u=n.substr(m));let p=r;!d&&l&&(p=r.substr(0,l.index));let h=`${u}${p}`;return{shouldGetPreviousOp:c,shouldGetNextOp:d,offsetAdjustment:m,opTextChanged:h!==e.insert,relevantText:h}}getRelevantDeltaAndOffsetWithLimitedScope(e,t){let a;if(!e||!(0,r.A)(t))return null;let n=e.ops;if(!n||!n.length)return null;let i=[],l=0;if(0===t){a=0;let e=n[0],{shouldGetNextOp:t,relevantText:r,opTextChanged:l}=this.getRelevantOpData(e,0);l?i.push({...e,insert:r}):i.push(e),t&&n.length>1&&i.push(n[1])}else n.forEach((e,o)=>{let s=(0,u.A)(e),c=l+s;if(!(t>=l&&t<c)){l+=s;return}let d=t-l,{shouldGetPreviousOp:m,shouldGetNextOp:p,relevantText:h,offsetAdjustment:_,opTextChanged:f}=this.getRelevantOpData(e,d);m&&o>0&&(i.push(n[o-1]),a=l-(0,u.A)(n[o-1])),f?h.length&&i.push({...e,insert:h}):i.push(e),(0,r.A)(a)||(a=l+_),p&&o+1<n.length&&i.push(n[o+1]),l+=s});if(t>0&&t===l){let e=n.length-1,t=n[e],r=(0,u.A)(t);a=l-r;let{shouldGetPreviousOp:o,relevantText:s,opTextChanged:c,offsetAdjustment:d}=this.getRelevantOpData(t,r);if(o&&e>0){let r=n[e-1];i.push(r),a=l-(0,u.A)(t)-(0,u.A)(r)}c?i.push({...t,insert:s}):i.push(t),o||(a+=d)}return{relevantDelta:new(o())(i),offset:a}}buildTextChangeDelta(e,{initialTextChangeDelta:t,isSpaceInsertion:a,isDeletion:n,useWysiwyg:i,usePlainTextMode:l}={}){let s;if(this.skipNextTextChange){this.skipNextTextChange=!1;return}if(!e||!t||!i||l)return;let c=this.getChangeIndex(t);if(!(0,r.A)(c))return;let{relevantDelta:d,offset:m}=this.getRelevantDeltaAndOffsetWithLimitedScope(e,c)||{};if(!d||!(0,r.A)(m))return;let h=d;n||a||this.maybePropagateFormattingToCharacterAfterLink(h);let f=0;if(n||a)for(let e=0;e<h.ops.length;e++){let t=h.ops[e];f+=(0,u.A)(t),(0,_.Ay)(t)&&(s=s?void 0:t)}(n||a)&&s&&(0,p.A)(s,{userDidDelete:n,userDidInsertSpace:a})&&(h=h.compose(new(o())().retain(f,{link:!1})));let b=(0,g.L2)(h);if(!b)return;a&&this.maybePropagateFormattingToSpaceAfterLink(b);let y=h.reduce((e,t)=>e+(0,u.A)(t),0),A=new(o())().retain(m).delete(y).concat(b);return e.diff(e.compose(A)).length()>0?A:new(o())}maybePropagateFormattingToCharacterAfterLink(e){let t=e.ops[e.ops.length-1];if(!(0,b.A)(t)||t.attributes)return;let a=e.ops[e.ops.length-2];if(!(0,_.Ay)(a))return;let n={...a.attributes};delete n.link,(0,i.A)(n)||(t.attributes=n)}maybePropagateFormattingToSpaceAfterLink(e){let t=e.ops[e.ops.length-1];if(!(0,_.Ay)(t))return;let a={...t.attributes};delete a.link,(0,i.A)(a)||e.retain(1,a)}}}getSlackLinkModule(window)},0xadfc1247:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackMarkdownModule});var n=a(0xe0376d2),r=a(0x357885ff),i=a(0x18f2150ea),l=a(0x1feee1711),o=a(0xb97b797e),s=a(0x3e6dd1df),c=a(0x3711e82d),d=a(0x45012309),m=a(0x12d25e82d),u=a(0x190c367fe),p=a(0x118cdcdea),h=a.n(p),_=a(0xe916e2af),f=a(0x52bf7626),b=a(0x1248ee230),g=a(0xb77a689a),y=a(0x187155f2e),A=a(0x2398accc),x=a(0x13099d13c);let E=Object.keys(x.Ru),get_markdown_delimiter_data=e=>{let t,a;if(!e)return null;let n=e.ops;return n&&n.length&&(1===n.length&&(0,A.A)(n[0])?(a=0,t=(0,g.A)(n[0].insert)?n[0].insert:""):2===n.length&&(0,y.A)(n[0])&&(0,A.A)(n[1])&&(a=n[0].retain,t=(0,g.A)(n[1].insert)?n[1].insert:""),t&&(0,i.A)(a)&&E.includes(t))?{delimiter:t,position:a}:null};function buildLocalBlockQuoteMarkdownChangeDelta(e,t){if(!e||!t)return new(h());let{delimiter:a,position:n}=get_markdown_delimiter_data(t)||{};if(!a||!(0,i.A)(n)||">"!==a&&"\uFF1E"!==a)return new(h());let r=(0,f.A)(e.ops);if(`
`!==r.charAt(n-1)&&0!==n)return new(h());let l=(0,_.A)(e,n),o=l?.blockquote&&!l?.border;if((0,b.Zz)(l||{})&&!o)return new(h());let s=new(h())().retain(n).delete(1),c=r.indexOf(`
`,n),d={blockquote:!0};if(o&&(d.border=1),-1!==c){let e=c-n-1;return s.retain(e).delete(1).insert(`
`,d)}let m=r.length-n;return s.retain(m-1).insert(`
`,d)}function buildLocalCodeBlockMarkdownChangeDelta(e,t){let a={action:"noop",delta:new(h())};if(!e||!t)return a;let{delimiter:n,position:r}=get_markdown_delimiter_data(t)||{};if(!n||!(0,i.A)(r)||"`"!==n&&"\uFF40"!==n)return a;let l=r-2,o=r+1,s=(0,f.A)(e.ops),c=s.substring(l,o);if("```"!==c&&"\uFF40\uFF40\uFF40"!==c)return a;let d=(0,_.A)(e,r),m=(0,_.A)(e,l-1),u=d?.blockquote||m?.["code-block"]&&(m?.border||0)>=1?1:void 0;if(d?.code)return a;let p=d&&d["code-block"],b=s.charAt(l-1),g=s.charAt(o),y=new(h())().retain(l).delete(3);if(p)return p&&`
`===g?(y.retain(1).insert(`
`),{action:"remove",delta:y}):a;`
`!==b&&0!==l&&y.insert(`
`,{...d});let A=s.indexOf(`
`,r),x={"code-block":!0};if((0,i.A)(u)&&(x.border=u),-1!==A){let e=A-r-1;return y.retain(e).delete(1).insert(`
`,x),{action:"insert",delta:y}}let E=s.length-r;return y.retain(E-1).insert(`
`,x),{action:"insert",delta:y}}var C=a(0x106809bc6);function findPotentialMatchBounds({lineText:e,delimiter:t,position:a}){let n;if(!e||!t||!(0,i.A)(a))return null;for(let r=a-1;r>=0;r--)if(e[r]===t){n=r;break}if(!(0,i.A)(n)){for(let r=a+1;r<e.length;r++)if(e[r]===t){n=r;break}}if(!(0,i.A)(n))return null;let r=Math.min(a,n),l=Math.max(a,n);return{matchStart:r>0?r-1:r,matchEnd:(0,C.A)(l+2,l,e.length)}}var k=a(0x1d8260f03);function buildLocalMarkdownChangeDelta(e,t){if(!e||!t)return new(h());let{delimiter:a,position:n}=get_markdown_delimiter_data(t)||{};if(!a||!(0,i.A)(n))return new(h());let r=new(h()),l=0;return e.eachLine((e,t)=>{let i=e&&e.ops,o=(0,k.A)(i),s=l+(o?o.length:0)+1,c=n>=l&&n<s,d=t["code-block"];if(c&&!d){let{matchStart:e,matchEnd:t}=findPotentialMatchBounds({lineText:o,delimiter:a,position:n-l})||{},i=o&&o.substring(e||0,t);if(i){let t=x.hJ[a],n=x.Ru[a];i.replace(t,(t,a,i)=>{r=new(h())().retain(l).retain(e||0).retain(a.length-1).delete(1).retain(i.length,{[n]:!0}).delete(1)})}}l=s}),r}var v=a(3896603e3);function getChangeDeltaInsertData(e){if(!e)return null;let t=e.ops;if(!t)return null;if(2===t.length&&(0,y.A)(t[0])&&(0,A.A)(t[1])){let e=t[0].retain,a=(0,g.A)(t[1].insert)?t[1].insert:"",n=a&&a.length;return{position:e,insert:a,insertLength:n}}return null}var S=a(0x658a411c),I=a(0x1e81297e3),w=a(0xe7cb9732);function shouldClogBlockFormattingEvent(e,t=""){if(!e||"code-block"!==t&&"blockquote"!==t)return!1;let a=e.ops;if(!a)return!1;let n="code-block"===t?w.A:I.A;return(0,S.A)(a,e=>n(e))}var T=a(0x1266f1359);let N={bold:c.MsgFormattingInputFormat.BOLD,italic:c.MsgFormattingInputFormat.ITALIC,strike:c.MsgFormattingInputFormat.STRIKE,code:c.MsgFormattingInputFormat.CODE,"code-block":c.MsgFormattingInputFormat.CODE_BLOCK,blockquote:c.MsgFormattingInputFormat.BLOCKQUOTE,hr:c.MsgFormattingInputFormat.HR,h1:c.MsgFormattingInputFormat.H1,h2:c.MsgFormattingInputFormat.H2};function isClogFormatComposerBlockLevelFormat(e){return!!({[c.MsgFormattingInputFormat.BOLD]:!1,[c.MsgFormattingInputFormat.ITALIC]:!1,[c.MsgFormattingInputFormat.STRIKE]:!1,[c.MsgFormattingInputFormat.CODE]:!1,[c.MsgFormattingInputFormat.UNDERLINE]:!1,[c.MsgFormattingInputFormat.LINK]:!1,[c.MsgFormattingInputFormat.H1]:!1,[c.MsgFormattingInputFormat.H2]:!1,[c.MsgFormattingInputFormat.HR]:!1,[c.MsgFormattingInputFormat.CHECK_LIST]:!1,[c.MsgFormattingInputFormat.BULLET_LIST]:!0,[c.MsgFormattingInputFormat.ORDERED_LIST]:!0,[c.MsgFormattingInputFormat.CODE_BLOCK]:!0,[c.MsgFormattingInputFormat.BLOCKQUOTE]:!0,[c.MsgFormattingInputFormat.DEDENT]:!0,[c.MsgFormattingInputFormat.INDENT]:!0})[e]}function getAppliedFormatsFromDelta(e){let t=[];return e.length()&&(e.ops||[]).forEach(e=>{e.retain&&e.attributes&&t.push(Object.keys(e.attributes))}),(0,n.A)((0,r.A)(t))}function getSlackMarkdownModule(e){let t=(0,s.A)(e).import("core/module");return class extends t{formatsToRestoreOnBackspace;formatsAppliedInQueue;constructor(e,t){super(e,t),(0,o.v)(this,["formatHorizontalRule","formatHeader","resetFormatsToRestore","onSelectionChange","onBackspace"]);const a=this.options.teamId,n=(0,T.oK)(a);this.clogger=(0,d.eo)(n),this.formatsToRestoreOnBackspace=null,this.formatsAppliedInQueue=null,this.listen()}unload(){this.quill.root.removeEventListener("compositionstart",this.resetFormatsToRestore)}listen(){this.quill.on("selection-change",this.onSelectionChange),this.quill.on("text-change",this.resetFormatsToRestore),this.quill.root.addEventListener("compositionstart",this.resetFormatsToRestore),this.options.convertHorizontalRule&&this.quill.keyboard.addBinding({key:" ",ctrlKey:null,shiftKey:null,altKey:null,collapsed:!0,format:{"code-block":!1,code:!1},prefix:/^---$/,offset:3},this.formatHorizontalRule),this.options.convertHeaders&&this.quill.keyboard.addBinding({key:" ",ctrlKey:null,shiftKey:null,altKey:null,collapsed:!0,format:{header:!1,"code-block":!1,code:!1},prefix:/^#{1,2}$/},this.formatHeader)}onSelectionChange(e,t){this.formatsToRestoreOnBackspace&&(e?e&&(0,i.A)(this.wasBlurredAtIndex)?(this.wasBlurredAtIndex!==e.index&&this.resetFormatsToRestore(),this.wasBlurredAtIndex=null):(0,i.A)(this.wasBlurredAtIndex)||this.resetFormatsToRestore():this.wasBlurredAtIndex=t.index)}onBackspace(){return this.formatsToRestoreOnBackspace&&this.formatsToRestoreOnBackspace.length&&(this.formatsToRestoreOnBackspace.forEach(e=>{this.quill.format(e,!0)}),this.formatsToRestoreOnBackspace=null),!1}resetFormatsToRestore(){this.formatsToRestoreOnBackspace=null}clogMarkdownFormattingEvent({format:e,range:t}){if(!this.clogger)return;let a=N[e];if((0,l.A)(a))return;let n={input_context:c.MsgFormattingInputContext.MESSAGE,input_source:c.MsgFormattingInputSource.MARKDOWN,input_format:a,is_selection:!1};isClogFormatComposerBlockLevelFormat(a)&&t&&(n.input_prexisting_block_formats=(0,u.Xh)(this.quill,t)),this.clogger.track(c.EventId.MSG_FORMATTING_ADDED,n)}formatHorizontalRule(e){let t=e.index-3;this.quill.deleteText(t,3),this.quill.insertEmbed(t,"slackhorizontalrule",!0),this.quill.setSelection(t+1,"silent"),this.quill.removeFormat(t+1),this.clogMarkdownFormattingEvent({format:"hr"})}formatHeader(e,t){if(t.offset>2)return!0;(0,m.A)(this.quill,{format:{header:t.offset},range:e,replacementLength:t.offset,charToInsert:" "});let a=1===t.offset?"h1":"h2";return this.clogMarkdownFormattingEvent({format:a}),!1}afterTextChangeQueue(){if(this.formatsAppliedInQueue){this.formatsToRestoreOnBackspace=this.formatsAppliedInQueue;let e=this.quill.getFormat()||{};for(let t=0;t<(this.formatsToRestoreOnBackspace??[]).length;t++){let a=this.formatsToRestoreOnBackspace[t];e[a]?(this.quill.format(a,!1),this.clogMarkdownFormattingEvent({format:a})):(this.formatsToRestoreOnBackspace.splice(t,1),t-=1)}}this.formatsAppliedInQueue=null}buildTextChangeDelta(e,{initialTextChangeDelta:t,useWysiwyg:a=!1,formattingOnly:n=!1,range:r}={}){if(!e||!t||!a||n)return;let l=buildLocalMarkdownChangeDelta(e,t);if(0!==l.length()){let e=getAppliedFormatsFromDelta(l);this.formatsAppliedInQueue=e.length?e:null}if(0===l.length()&&getAppliedFormatsFromDelta(l=((e,t)=>{if(!e||!t)return new(h());let{position:a,insert:n,insertLength:r}=getChangeDeltaInsertData(t)||{};if(!(0,i.A)(a)||!n)return new(h());let{op:l,opIndex:o}=(0,v.A)(e,a)||{};if(!l||!(0,i.A)(o)||!(0,A.A)(l))return new(h());let s=a-o,c=(0,g.A)(l.insert)?l.insert:"",d=s-1,m=s+((0,i.A)(r)?r:0),u=c.charAt(d);if(u!==c.charAt(m)||!E.includes(u)||-1!==n.indexOf(u))return new(h());let p=c.substring(d-1,m+1),f=x.hJ[u];if(!p.match(f))return new(h());let b=(0,_.A)(e,a)||{};if(b["code-block"]||b.code)return new(h());let y=x.Ru[u];return new(h())().retain(o).retain(d).delete(1).retain((0,i.A)(r)?r:0,{[y]:!0}).delete(1)})(e,t)).forEach(e=>{this.clogMarkdownFormattingEvent({format:e})}),0===l.length()){let{delta:a}=buildLocalCodeBlockMarkdownChangeDelta(e,t),n="code-block";shouldClogBlockFormattingEvent(l=a,n)&&this.clogMarkdownFormattingEvent({format:n,range:r})}if(0===l.length()){l=buildLocalBlockQuoteMarkdownChangeDelta(e,t);let a="blockquote";shouldClogBlockFormattingEvent(l,a)&&this.clogMarkdownFormattingEvent({format:a,range:r})}return l}}}getSlackMarkdownModule(window)},0x215b853f5:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackMentionModule});var n=a(0xec1862de),r=a(0x1595bdd0),i=a(0x118cdcdea),l=a.n(i),o=a(0x20482ad21),s=a(0x3e6dd1df),c=a(0x81d64d8c),d=a(0x62e9ff8f),m=a(0x5a228fbb),u=a(0x1f66c22b2),p=a(0x4cd77de3),h=a(0x1308fe1af),_=a(0x1ca98db3c),f=a(0x11209f55c);function isOpSlugOrMentionAndInvalid(e){return!!(0,f.wU)(e)&&!((0,f.XY)(e)===(0,f.un)(e)||(0,_.SS)(e))}function isOpSlugOrMentionWithAppendedText(e){if(!(0,f.wU)(e)||!(0,f.jI)(e))return!1;let t=(0,f.un)(e);if(!t)return!1;let a=(0,f.XY)(e),n=a.substr(0,t.length);return a.length>t.length&&n===t}function isOpSlugOrMentionWithPrependedText(e){if(!(0,f.wU)(e)||!(0,f.jI)(e))return!1;let t=(0,f.un)(e);if(!t)return!1;let a=(0,f.XY)(e),n=a.substr(-1*t.length);return a.length>t.length&&n===t}var b=a(0x1242da2eb);let hasBackgroundAttr=e=>e.attributes&&e.attributes.background,handleSlugOrMention=(e,t)=>{let a=t.ops[0];return isOpSlugOrMentionAndInvalid(a)?new(l())().insert((0,f.XY)(a)):t},maybeHandleSpaces=(e,t)=>0===t.length()&&e.textContent.length>0&&/^ +$/.test(e.textContent)?new(l())().insert(e.textContent):t;function buildUnformatBrokenMentionsChanges(e,{isSlugsKeyboardAlternativeEnabled:t,isSlugsEnabled:a,screenreaderAnnouncement:n}={}){let r=new(l()),i=0,s=0;return e.forEach(l=>{let u=0,g=i,y="",A=(0,m.A)(l);if(i+=A,!(0,f.wU)(l)||!isOpSlugOrMentionAndInvalid(l))return;let x={...l.attributes};if((0,f.S8)(l)&&(x.slackslug=null),(0,h.Ay)(l)&&(x.slackmention=null),(0,_.SS)(l)&&(x.slacksearchfilter=null),(0,p.Ay)(l))r.retain(g-s).delete(A).insert({slackemoji:(0,p.MU)(l)},x);else if((0,b.Ay)(l))r.retain(g-s).delete(A).insert({workflowtoken:(0,b.zy)(l)},x);else if(isOpSlugOrMentionWithAppendedText(l)){if(g+=(0,f.un)(l).length,r.retain(g-s),u=A-(0,f.un)(l).length,(y=(0,d.A)(e,g,u)).length>=(0,f.un)(l).length)for(;y.length>=(0,f.un)(l).length&&y.length;){let e=y.substr(0,(0,f.un)(l).length);if(e===(0,f.un)(l))r.delete(e.length).insert(e,l.attributes),y=y.substr(e.length);else break}y.length&&r.delete(y.length).insert(y,x)}else if(isOpSlugOrMentionWithPrependedText(l)){let t=(y=(0,d.A)(e,g,A).replace(/\n$/,"")).length,a=(0,f.un)(l),n=0;for(;y.length>a.length&&y.substr(-1*a.length)===a;)n+=1,y=y.substr(0,y.length-a.length);r.retain(g-s),r.delete(t),r.insert(y);for(let e=0;e<n;e++)r.insert(a,l.attributes)}else if(a&&(0,f.S8)(l)&&!t){r.retain(g-s).delete(A);let e=l.attributes?.slackslug;if(n&&e){let t=new o.Ay("texty"),a=(0,c.k)(e);n(t.t("Deleted {slugType}",{slugType:a}))}}else if(t&&(0,f.S8)(l)){r.retain(g-s).delete(A);let e=(0,f.Pz)(l),t=(0,f.Ar)(l),a=[...t].findIndex((t,a)=>t!==e[a]),n=[...e.substring(a)].reverse(),i=[...t].reverse().findIndex((e,t)=>e!==n[t]),o=[...n.join("").substring(i)].reverse().join("");o&&r.insert(o,x)}else y=(0,d.A)(e,g,A),r.retain(g-s).delete(A).insert(y,x);s=i}),r}function getSlackMentionModule(e){let t=(0,s.A)(e).import("core/module");return class extends t{constructor(e,t){super(e,t),this.options=(0,n.A)({},{isSlugsKeyboardAlternativeEnabled:!1},t),this.onTextChange=this.onTextChange.bind(this),this.fixMultipleBrokenMentionsAttempt=!1,this.listen()}listen(){this.quill.on("text-change",this.onTextChange),this.quill.clipboard.addMatcher(".c-member_slug",handleSlugOrMention),this.quill.clipboard.addMatcher("ts-mention",handleSlugOrMention),this.quill.clipboard.addMatcher("ts-slug",handleSlugOrMention),this.quill.clipboard.addMatcher("ts-search-filter",handleSlugOrMention),this.quill.clipboard.addMatcher(Node.TEXT_NODE,maybeHandleSpaces)}onTextChange(e){(0,u.A)(e)||(this.fixMultipleBrokenMentionsAttempt||this.fixMultipleBrokenMentions(e),this.fixLeakingMentions())}buildTextChangeDelta(e){return buildUnformatBrokenMentionsChanges(e,{isSlugsKeyboardAlternativeEnabled:this.options.isSlugsKeyboardAlternativeEnabled,isSlugsEnabled:this.options.isSlugsEnabled,screenreaderAnnouncement:this.options.screenreaderAnnouncement})}fixMultipleBrokenMentions(e){let t=e?.ops,a=this.quill.getContents(),n=t.map(e=>e?.attributes?.slackmention);if(!(n=(0,r.A)(n)).length||this.fixMultipleBrokenMentionsAttempt)return;let i=0,l=n[0];for(let e=1;e<n.length;e++){let t=n[e];if(t.label===l.label&&(i+=1),t.label!==l.label&&(i=0),i>=2){this.quill.setContents(a),this.fixMultipleBrokenMentionsAttempt=!1;return}l=t,this.fixMultipleBrokenMentionsAttempt=!0}}fixLeakingMentions(){this.quill.getContents().filter(e=>hasBackgroundAttr(e)).length>0&&setTimeout(()=>{let e=this.quill.getContents().map(e=>hasBackgroundAttr(e)?{insert:e.insert}:e),t=this.quill.getSelection();this.quill.setContents({ops:e},"silent"),t&&this.quill.setSelection(t)},0)}}}},0x283863ba:(e,t,a)=>{"use strict";a.d(t,{A:()=>getSlackSlugModule});var n=a(0xec1862de),r=a(0x162afc153),i=a(0x128c3200c),l=a(0x118cdcdea),o=a.n(l),s=a(0xb97b797e),c=a(0x20482ad21),d=a(0xbd195de6),m=a(0x224f7f0e9),u=a(0x3e6dd1df),p=a(0x1feaab429),h=a(0x12185e091),_=a(0x1ecc7f772),f=a(0xa3534e17),b=a(0x1aad5a225);function hydrateChannelSlugData(e,t){let a=e.dispatch((0,b.F)({channel:t.channel})),n=e.getState();return{id:a.id,name:(0,_.SB)(n,a,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1,truncateMpimNames:!0})||"",channel:a}}function formatChannelMentionAttributesForDelta({id:e,name:t,channel:a}){if(!e||!t)return;let n=(0,h.JM)(a)?t:`#${t}`;return(0,f.A)(e,n)}var g=a(0x15026e8eb),y=a(0x94332add),A=a(0xfb1fe411),x=a(0x1765e56d2),E=a(0x82980ab8),C=a(0x131598af9),k=a(0x1126392c1);function hydrateUserSlugData(e,t){let a=e.dispatch((0,k.Ay)({members:[t.user]}))[0];return{id:a.id,name:(0,E.Fh)(a)}}function formatUserMentionAttributesForDelta(e,{id:t,name:a}){if(t&&a)return(0,f.A)(t,`@${a}`,(0,C.A)(e))}var v=a(0x1db073f20);let S=["channel","user","canvas","list","file","message","workflow","link"];var I=a(0xcc3e4fc5),w=a(0xaf5a1707),T=a(0x3711e82d),N=a(0x45012309),M=a(0x5a228fbb),R=a(0xd9d06d50),P=a(0x222762a83),L=a(0x187155f2e),O=a(0x11209f55c),D=a(0xe36745f5),F=a(0x1d7da89ab),U=a(0x24ee9c1be),B=a(0x1266f1359);function transformSlugOrMentionToLink({attributes:e,label:t}){let a={...e};return a.link=t,delete a.slackslug,delete a.slackmention,a}function isSlugObjectSupported(e,t,{isSlugTruncatedUrlsEnabled:a}){let n=t[e];return!!n&&"invalid"!==n.slug_type&&!!S.includes(n.slug_type)&&(!!a||"link"!==n.slug_type)&&(!a||"link"!==n.slug_type||!!n.display_url&&n.display_url!==e)}function getSlackSlugModule(e){let t=(0,u.A)(e).import("core/module");return class extends t{processing;clogger;editingBlockedTimeout;constructor(e,t){super(e,t),this.options=(0,n.A)({},{isSlugsEnabled:!1},t),this.clogger=(0,N.eo)((0,B.oK)(this.options.teamId)),this.onSelectionChange=(0,r.A)(this.onSelectionChange.bind(this),300),(0,s.v)(this,["convertLinksToSlugs","processSlugs","onKeydown","onBeforeInput"]),this.processing=new Set,this.options.isSlugsEnabled&&!this.options.isSlugsKeyboardAlternativeEnabled&&(this.quill.root.addEventListener("keydown",this.onKeydown,!0),this.quill.root.addEventListener("beforeinput",this.onBeforeInput)),this.options.isSlugsEnabled&&this.options.isSlugsKeyboardAlternativeEnabled&&this.quill.on("selection-change",this.onSelectionChange)}onBeforeInput(e){let t=(0,F.i)({quill:this.quill});((0,U.b)({quill:this.quill})||t)&&(this.quill.setSelection(this.quill.getSelection().index,0,"silent"),e.preventDefault(),e.stopPropagation(),this.announceEditingBlocked({isSlugPartiallySelected:t}))}onKeydown(e){if(!(e&&((0,d.A)(e)||[m.G_,m.SJ,m.Fm].includes(e.keyCode))))return;let t=(0,F.i)({quill:this.quill});if((0,U.b)({quill:this.quill})||t){e.preventDefault(),e.stopPropagation(),this.announceEditingBlocked({isSlugPartiallySelected:t});let a=(0,D.m)({quill:this.quill});a.forEach(e=>{e.classList.add("c-slackslug--editing-blocked")}),this.editingBlockedTimeout&&clearTimeout(this.editingBlockedTimeout),this.editingBlockedTimeout=setTimeout(()=>{a.forEach(e=>{e.classList.remove("c-slackslug--editing-blocked")}),this.editingBlockedTimeout=void 0},100)}}onSelectionChange(){if(!this.options.isSlugsEnabled||!this.options.isSlugsKeyboardAlternativeEnabled)return;let e=(0,D.m)({quill:this.quill}),t=this.quill.root.querySelectorAll(".c-slackslug--editing-blocked"),a=new WeakSet;t.forEach(t=>{-1===e.indexOf(t)?t.classList.remove("c-slackslug--editing-blocked"):a.add(t)}),e.forEach(e=>{a.has(e)||e.classList.add("c-slackslug--editing-blocked")})}announceEditingBlocked({isSlugPartiallySelected:e}={}){if(!this.options.screenreaderAnnouncement)return;let t=new c.Ay("texty"),a=this.options.isSlugsStringsEnabled?t.t("Deselect link object to edit"):"Deselect link object to edit";this.options.screenreaderAnnouncement(e?a:void 0)}convertLinksToSlugs(e,t){if(!this.options.isSlugsEnabled)return e;let a=new(o())(e.map(e=>{if(!(0,P.Ay)(e)||(0,P.O_)(e)!==(0,P.AQ)(e))return e;let t={...e,attributes:{...e.attributes}},a=(0,P.O_)(t);return delete t.attributes.link,t.attributes.slackslug={id:a,label:a},this.clogger.track(T.EventId.MSG_LINK_PASTED),t}));return a.ops.length>0&&(0,O.eo)(a.ops[0])&&(t?.slackslug||t?.link)?new(o())().insert(" ").concat(a):a}async processSlugs({urls:e}){let{teamId:t,isSlugsEnabled:a}=this.options;if(!a)return;let n=e.filter(e=>!this.processing.has(e)).slice(0,10);if(!(0,w.Z)(n))return;let r=this.quill.getContents();n.forEach(e=>this.processing.add(e));let i=await (0,B.Qw)(t,(0,I.A)({urls:n,reason:"link-paste-slugify",skipSimpleArraySerializationInGetFormData:!0})),l=i.slugs||{},s=this.quill.getContents(),c=!!r.diff(s).length()||Object.keys(i.slugs).length>1,d=Object.entries(i.slugs).every(([e,t])=>"link"===t.slug_type&&(!t.display_url||t.display_url===e));this.quill.history.cutoff();let m=new(o()),u=0,h=0,processReplacement=({start:e,opLength:t,label:a,url:n,newAttributes:r})=>{m.retain(e-h).delete(t).insert(a,r);let i=-1,l=a.length-n.length;this.quill.history.stack.undo.forEach((e,t)=>{if(-1===i&&e.redo.ops.some(e=>(0,O.eo)(e)&&(0,O.zl)(e)===n)&&(i=t),-1===i)return;let o=t===i;!c&&o&&e.undo.ops.forEach(e=>{(0,L.A)(e)&&e.attributes&&null===e.attributes.slackslug&&(delete e.attributes.slackslug,e.attributes.link||(e.attributes.link=null))}),c&&e.undo.ops.forEach(e=>{!o&&(0,L.A)(e)&&(e.retain+=l),o&&(0,R.A)(e)&&(e.delete+=l)}),e.redo.ops.forEach(e=>{o&&(0,O.eo)(e)&&(0,O.zl)(e)===n&&(c?("insert"in e&&(e.insert=a),delete e.attributes?.slackslug,e.attributes=r):e.attributes=transformSlugOrMentionToLink({attributes:e.attributes,label:n})),c&&!o&&(0,L.A)(e)&&(e.retain+=l)})}),c||d||this.quill.history.stack.undo.push({undo:new(o())().retain(e-h).delete(a.length).insert(n,transformSlugOrMentionToLink({attributes:r,label:n})),redo:new(o())().retain(e-h).delete(n.length).insert(a,r)}),h=u};for(let e of s.ops){let a,r,i=u,o=(0,M.A)(e);if(u+=o,!(0,O.S8)(e))continue;let s=(0,O.zl)(e);if(!l[s]&&!n.includes(s))continue;if(!isSlugObjectSupported(s,l,{isSlugTruncatedUrlsEnabled:this.options.isSlugTruncatedUrlsEnabled})){processReplacement({start:i,opLength:o,label:s,url:s,newAttributes:transformSlugOrMentionToLink({attributes:e.attributes,label:s})});continue}let c=(0,B.oK)(t),d=l[s].slug_type;if("message"===l[s].slug_type){let e=(0,x.G)(c,l[s]);a=(0,x.u)(c.getState(),s,e),l[s].thread_ts&&(d="message_thread")}else if("canvas"===l[s].slug_type){let e=await (0,p.x)(c,l[s]);a=(0,p.l)(c.getState(),s,e),l[s].section_id&&(d="canvas_section")}else if("list"===l[s].slug_type){let e=await (0,A.f)(c,l[s]);a=(0,A.d)(c.getState(),s,e),l[s].record_id?d="list_record":l[s].view_id&&(d="list_view")}else if("link"===l[s].slug_type){let e=(0,y.Q)(s,l[s]);a=(0,y.x)(e)}else if("file"===l[s].slug_type){let e=(0,g.f)(c,l[s]);a=(0,g.N)(c.getState(),s,e)}else if("workflow"===l[s].slug_type){let e=(0,v.W)(c,l[s]);a=(0,v.U)(c.getState(),s,e)}if(a){processReplacement({start:i,opLength:o,label:a.label||"",url:s,newAttributes:{...e.attributes,slackslug:{...a}}}),this.clogger.track(T.EventId.MSG_SLUG_CREATE,{contexts:{ui_context:{ui_properties:{element_value:d}}}});continue}if("channel"===l[s].slug_type){let e=hydrateChannelSlugData(c,l[s]);r=formatChannelMentionAttributesForDelta(e),e.channel.is_mpim?d="mpdm":e.channel.is_im&&(d="dm")}else if("user"===l[s].slug_type){let e=hydrateUserSlugData(c,l[s]);r=formatUserMentionAttributesForDelta(c.getState(),e)}if(r){let t={...e.attributes,slackmention:r};delete t.slackslug,processReplacement({start:i,opLength:o,label:r.label,url:s,newAttributes:t}),this.clogger.track(T.EventId.MSG_SLUG_CREATE,{contexts:{ui_context:{ui_properties:{element_value:d}}}});continue}processReplacement({start:i,opLength:o,label:s,url:s,newAttributes:transformSlugOrMentionToLink({attributes:e.attributes,label:s})})}n.forEach(e=>this.processing.delete(e)),this.quill.updateContents(m),this.quill.history.cutoff(),this.quill.history.stack.undo.pop()}afterTextChangeQueue(e){if(!this.options.isSlugsEnabled)return;let t=new Set;e.forEach(e=>{(0,O.S8)(e)&&(0,O.eo)(e)&&t.add((0,O.zl)(e))}),t.size>0&&(0,i.A)(Array.from(t),10).forEach(e=>{this.processSlugs({urls:e})})}unload(){this.editingBlockedTimeout&&(clearTimeout(this.editingBlockedTimeout),this.editingBlockedTimeout=void 0),this.options.isSlugsEnabled&&!this.options.isSlugsKeyboardAlternativeEnabled&&(this.quill.root.removeEventListener("keydown",this.onKeydown),this.quill.root.removeEventListener("beforeinput",this.onBeforeInput)),this.options.isSlugsEnabled&&this.options.isSlugsKeyboardAlternativeEnabled&&this.quill.off("onSelectionChange",this.onSelectionChange)}}}},0x66ac0b5a:(e,t,a)=>{"use strict";a.d(t,{A:()=>getTabCompleteModule});var n=a(0x1cbdfeceb),r=a(0xec1862de),i=a(0x18f2150ea),l=a(0xa560007e),o=a(0x21a04de67),s=a(0xe180a236),c=a(0x118cdcdea),d=a.n(c),m=a(0xb97b797e),u=a(0xe2e5f9b1),p=a(0x224f7f0e9),h=a(0x81b4e6a1),_=a(0x3e6dd1df),f=a(0x1a173079e),b=a(0x1829a8d43),g=a(0x14d2ae7bc),y=a(0x1f66c22b2),A=a(0x4cd77de3),x=a(0x2398accc),E=a(0xd40f768d),C=a(0x1266f1359),k=a(0x1e4ae349d);let v="TABCOMPLETE",S=/^\/[a-zA-Z]*?/i,I={getMatch:n.A,search:n.A,onSelect:n.A,getInsertDataFromActiveResult:n.A,shouldDisplayResults:()=>!0,getMatchText:n.A,getMatchIndex:n.A,getMatchResults:n.A,clearMatchState:n.A,setSearchInFlight:n.A,getSearchInFlight:n.A,getSelectedIndex:n.A,onRequestOpen:n.A,onRequestClose:n.A,onInit:n.A,isOpen:n.A,positionMenu:n.A,logger:{error:n.A,info:n.A,warn:n.A}},w=[":","*","_","~"];function hasSpaceAndPunctuationAfterMention(e,t,a){let n=a.concat([" "]);if(t&&t.index>=4){let a=e.getText(t.index-2,2),r=e.getFormat(t.index-3),i=a.charAt(1);if(-1===w.indexOf(i)&&(-1!==n.indexOf(i)||(0,u.A)(i))&&" "===a.charAt(0)&&r&&r.slackmention&&!r.slackmention.unverified)return!0}return!1}function hasSpaceAndColonAfterMention(e,t){if(t&&t.index>=5){let a=e.getText(t.index-3,3),n=e.getFormat(t.index-4);if(" : "===a&&n&&n.slackmention&&!n.slackmention.unverified)return!0}return!1}function hasSpaceAndApostropheAfterMention(e,t){if(t&&t.index>=6){let a=e.getText(t.index-4,4),n=e.getFormat(t.index-5);if(-1!==a.search(/ ['\u2018\u2019]s /)&&n&&n.slackmention&&!n.slackmention.unverified)return!0}return!1}function getTabCompleteModule(e){let t=(0,_.A)(e).import("core/module");return class extends t{pendingCompletionTimeout;constructor(e,t){super(e,(0,r.A)({},I,t)),(0,m.v)(this,["onEscape","onCompositionStart","onCompositionEnd","onTextChange","onSelectionChange","onTab","maybeCompleteAtCursor","hideMenu","ariaExpand","ariaActiveDescendant","performSelection"]),this.state={prevInsertObject:null,isInComposition:!1,isSelectingOption:!1,selectionJustHappened:!1,compositionTimer:null,isDismissingMenu:!1},this.listen(),this.options.onInit({hideMenu:this.hideMenu,ariaExpand:this.ariaExpand,ariaActiveDescendant:this.ariaActiveDescendant,performSelection:this.performSelection})}unload(){this.isUnmounted=!0,this.quill.root.removeEventListener("compositionstart",this.onCompositionStart),this.quill.root.removeEventListener("compositionend",this.onCompositionEnd),this.hideMenu(),setTimeout(()=>{this.state=null},0)}listen(){this.quill.on("text-change",this.onTextChange),this.quill.on("selection-change",this.onSelectionChange),this.quill.root.addEventListener("compositionstart",this.onCompositionStart),this.quill.root.addEventListener("compositionend",this.onCompositionEnd),[p.i7,p.n6].forEach(e=>{this.quill.keyboard.addBinding({key:e,handler:()=>this.onUpDownArrow(e)})}),[p.UQ,p.LE].forEach(e=>{this.quill.keyboard.addBinding({key:e,handler:e=>this.onLeftRightArrow()})})}ariaExpand(e){let t=this.quill.root;!t||("combobox"!==t.getAttribute("role")||this.options.skipAriaExpanded||t.setAttribute("aria-expanded",e),e||t.removeAttribute("aria-activedescendant"))}ariaCollapse(){let e=this.quill.root;e&&("combobox"!==e.getAttribute("role")||this.options.skipAriaExpanded||e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"))}ariaActiveDescendant(e){let t=this.quill.root;if(t){if(!(0,i.A)(e))return void t.removeAttribute("aria-activedescendant");t.setAttribute("aria-activedescendant",(0,h.An)(e))}}onUpDownArrow(e){return!this.isMenuOpen()||this.options.onArrowKey(e)}onLeftRightArrow(){return this.isMenuOpen()&&this.options.clearSelectedIndex(),!0}onHome(){return this.isMenuOpen()&&this.options.clearSelectedIndex(),!1}onEnd(){return this.isMenuOpen()&&this.options.clearSelectedIndex(),!1}onEscape(){return!!this.isMenuOpen()&&(this.state.isDismissingMenu=!0,this.hideMenu(),setTimeout(()=>{this.state.isDismissingMenu=!1},0),!0)}onTab(e){if(e?.shiftKey)return!1;if(this.isMenuOpen())return this.options.possiblySelectFirstItem(()=>{this.onEnter(null)}),!0;if(this.options.setSearchInFlight(null),1===this.quill.getLength())return!1;let t=this.options.getMatchText(),a=this.getCurrentMatchAtCursor(!0);return(!a||t!==a.text)&&(this.completeAtCursor({isUserSolicited:!0},a),!1)}onCompositionStart(){this.state.isInComposition=!0,this.state.compositionTimer&&clearTimeout(this.state.compositionTimer)}onCompositionEnd(){this.state.compositionTimer=setTimeout(()=>{this.state.isInComposition=!1,this.isMenuOpen()||this.maybeCompleteAtCursor("user")},0)}onTextChange(e,t,a){if(!this.state||(0,y.A)(e))return;let n=this.quill.getSelection();if(1===e.length()&&e.ops[0].insert&&setTimeout(()=>{let e=this.quill.getSelection();if(e&&0===e.index&&0===e.length){let e=this.quill.getLength()-1;1===e&&(this.quill.setSelection(e,0),this.options.logger.info(v,"manually adjusted index for Safari"))}},0),this.state.selectionJustHappened&&!this.state.isInComposition&&(this.state.selectionJustHappened=!1,hasSpaceAndPunctuationAfterMention(this.quill,n,g.Nb)))return void setTimeout(()=>{this.quill.deleteText(n.index-2,1),this.quill.setSelection(n.index-1,0),this.hideMenu()},0);if(hasSpaceAndColonAfterMention(this.quill,n))return void setTimeout(()=>{this.quill.deleteText(n.index-3,1),this.quill.setSelection(n.index-1,0),this.hideMenu()},0);if(hasSpaceAndApostropheAfterMention(this.quill,n))return void setTimeout(()=>{this.quill.deleteText(n.index-4,2),this.quill.insertText(n.index-4,"\u2019"),this.quill.setSelection(n.index-1,0),this.hideMenu()},0);if(!this.state.isSelectingOption){this.pendingCompletionTimeout&&clearTimeout(this.pendingCompletionTimeout),this.options.abortSearch?.();let onQuillUpdate=()=>{this.pendingCompletionTimeout=void 0,this.maybeCompleteAtCursor(a)};this.pendingCompletionTimeout=setTimeout(onQuillUpdate,0)}}maybeCompleteAtCursor(e){this.isUnmounted||this.state.isDismissingMenu||((this.options.setSearchInFlight(null),1>=this.quill.getLength()&&!this.options.canCompleteOnEmptyQuery?.())?this.hideMenu():"user"===e&&this.completeAtCursor({isUserSolicited:!1}))}isCursorWithinMention(e){if(!e||e.length>0||0===e.index)return!1;let t=this.quill.getFormat(e).slackmention;if(t&&0!==e.index&&e.index<this.quill.getLength()-1&&this.quill.getFormat(e.index+1).slackmention)return!0;let a=this.quill.getFormat(e.index+1).slackmention;return!!t&&!!a&&t.id===a.id}isSlashCommand(e){if(!e||e.length>0||0===e.index)return!1;let t=this.quill.getText();return S.test(t)}maybeShowTooltip(e,t){if(this.isMenuOpen())return;let a=this.isCursorWithinMention(e);if(!a&&this.options.tooltipIsShowing())return void this.options.tooltipHide();let n=this.quill.selection.getNativeRange(),r=n&&n.start&&n.start.node&&n.start.node.parentNode,i=r&&r.classList;if(i&&i.contains("c-member_slug--unverified")&&e&&0===e.length)return void this.maybeCompleteAtCursor(t);let l=i&&i.contains("ts_tip_texty");a&&l&&!this.options.tooltipIsShowing()&&this.options.tooltipShow(r)}hideAndReset(){this.onEscape(),this.resetPrevMatchState()}isMenuOpen(){return this.options.isOpen()}onSelectionChange(e,t,a){if(!this.state)return;let n=e&&e.length>0,r=this.isCursorWithinMention(e),i=this.state.isSelectingOption,l=this.isSlashCommand(e);n&&this.isMenuOpen()?this.options.clearSelectedIndex():!i&&e?this.maybeShowTooltip(e,a):(r&&!n||l||this.state.isInComposition||i||(this.options.setSearchInFlight(null),this.hideMenu({fromSelection:!0})),e||(this.onEscape(),this.resetPrevMatchState()))}getCurrentMatchAtCursor(e){let t=this.quill.getSelection();if(!t)return;let a=t.index+t.length;if(t.index>0&&0===t.length&&this.quill.getFormat(t).slackmention&&`
`!==this.quill.getText(t.index-1,1)){let e=" "===this.quill.getText(t.index-1,1),n=1===t.index||!this.quill.getFormat(t.index-2,0).slackmention;if(!(e&&n)){let e=this.quill.getFormat(t).slackmention.label;for(;this.quill.getFormat(a).slackmention&&this.quill.getFormat(a).slackmention.label===e;)a+=1;a-=1}}let{searchText:n,searchTextIndex:r}=this.textBetweenLastTokenAndIndex(a),i={insert:`
`,attributes:this.quill.getFormat(t)};return this.getMatch(n,r,e,i)}completeAtCursor({isUserSolicited:e=!1},t){let a=t||this.getCurrentMatchAtCursor(e);if(!a){this.resetPrevMatchState(),this.hideMenu();return}this.search({match:a,isUserSolicited:e})}search({match:e,isUserSolicited:t=!1}){this.options.getSearchInFlight()===e.text?this.options.logger.info(v,`duplicate search for ${e.text.length} char query`):(this.state.prevInsertObject=null,this.options.setSearchInFlight(e.text),this.options.logger.info(v,`start search with ${e.text.length} char query`),this.options.search(e.text,()=>{this.state&&this.handleSearchResults(t)}))}handleSearchResults(e=!1){let t=this.options.getMatchText()||"";if(!this.hasResults()||!t.length&&!this.options.canCompleteOnEmptyQuery?.())return void this.hideMenu();if(this.options.logger.info(v,`received ${this.getNumResults()} results for ${t.length} char query`),!this.options.shouldDisplayResults(e)){this.options.logger.info(v,"completer decided to hide results"),this.hideMenu();return}this.showMenu()}onEnter(e){return(!e||!e.shiftKey)&&!!this.isMenuOpen()&&(!!this.state.isInComposition||(this.options.possiblySelectFirstItem(()=>{this.performSelection({fromKeyboard:!0})}),!0))}onOptionSelected(){let e=this.options.getInsertDataFromActiveResult();if(!e)return void this.options.logger.error("onOptionSelected could not get insert data");if(!this.hasResults())return void this.options.logger.error("onOptionSelected missing previous match");if(this.options.logger.info(v,`selected index ${this.options.getSelectedIndex()}`),e.contents){this.state.isSelectingOption=!0,this.quill.setContents(e.contents),this.state.prevInsertObject={text:this.quill.getText()},this.quill.setSelection(this.state.prevInsertObject.text.length,0),this.state.isSelectingOption=!1,this.options.setSearchInFlight(null);return}let t=e.slackemoji,a=e.text;t&&(a=`${e.text}${e.slackemoji.text}`);let n=this.options.getSearchInFlight()||this.options.getMatchText(),r=n.length;!this.options.getSearchInFlight()&&this.state.prevInsertObject&&(n=this.state.prevInsertObject.text,r=this.state.prevInsertObject.length||this.state.prevInsertObject.text.length);let i=this.options.getMatchText(),o=((e,t,a)=>{if(-1!==a.indexOf(t))return"";let n=e.exec(t);return n?n[0]:""})(g.Sf,i,a);(0,l.A)(e.text,i)||(a+=o);let s=this.options.getMatchIndex()+r,c=this.quill.getText(s,1),m=-1===g.Nb.concat([" "]).indexOf(c),p=this.quill.getText(this.options.getMatchIndex()-1,1),h=this.options.getMatchIndex()>0&&e.ensure_preceding_space&&(0,u.A)(p),_=new(d()),y=this.options.getMatchIndex(),x=this.quill.getFormat(y+1);x.slackmention&&delete x.slackmention;let S=this.options.useWysiwyg?x.code||x["code-block"]:(0,E.A)(this.quill.getText(0,y)),I=this.options.useWysiwyg&&x.link;if(t&&(S||I)&&(t=null),this.options.getMatchIndex()>0&&!h&&!e.text&&t&&t.text.match(/^(:skin-tone-[2-6]:)$/)){let e=this.quill.getContents(this.options.getMatchIndex()-1,1);if(e.ops&&(0,A.Ay)(e.ops[0])){let a=(0,b.A)(e.ops[0].insert.slackemoji.text),n=this.options.teamId&&(0,C.$D)(this.options.teamId);(0,k.Fm)(n,{text:a?.name||"",teamId:this.options.teamId})&&(y-=1,r+=1,t.text=`:${a?.name}:${t.text}`)}}_.retain(y);let w=this.options.getMatchIndex()||0,T=a.toLowerCase(),N=n.toLowerCase(),M=this.quill.getText(w,a.length).toLowerCase();t||T===N||M!==T?_.delete(r):_.delete(Math.max(a.length,r)),h&&_.insert(" ",x);let R=!!(e.format&&e.format.overrideLink);if(t){if(e.text&&_.insert(e.text),t?.text){let e=t.text.substr(1,t.text.indexOf(":",1)-1);(0,f.ef)(e)}_.insert({slackemoji:t},x)}else if(this.options.useWysiwyg&&(S||I&&!R))_.insert(a,{...x});else{let t=e?.format?.slackmention?.id;(0,f.WR)(t),_.insert(a,{...x,...e.format})}m&&(R?_.insert(" ",{...x,...e.format}):_.insert(" ",x)),this.state.isSelectingOption=!0,this.quill.updateContents(_,"user");let P=1;h||m||" "===c?h&&(m||" "===c)&&(P=2):P=0;let L=e.text?e.text.length:0;this.quill.setSelection(w+(t?L+1:a.length)+P,0),this.state.isSelectingOption=!1,this.options.setSearchInFlight(null),this.state.prevInsertObject={text:a},t&&(this.state.prevInsertObject.length=L+1),this.state.selectionJustHappened=!0}textBetweenLastTokenAndIndex(e){let t,{ops:a}=this.quill.getContents(0,e),n=(t=this.quill.getFormat(e).slackmention?a.slice(-1):(0,o.A)(a,e=>(0,x.A)(e))).reduce((e,t)=>t.insert?e+t.insert:e,""),r=this.quill.getLength()-e-1;return{searchText:n,searchTextIndex:this.quill.getLength()-new(d())(t).length()-r-1}}getMatch(e,t=0,a=!1,n){if(!e&&!this.options.canCompleteOnEmptyQuery?.())return;let r=this.options.getMatch(e,a,t,n);if(r)return{text:r.match,index:r.index+t}}showMenu(){this.options.tooltipHide(),this.isMenuOpen()||this.options.logger.info(v,"opening menu"),this.options.onRequestOpen();let e=this.options.getMatchIndex(),t=this.quill.getBounds(e),a=this.quill.container.getBoundingClientRect(),n=t.left+a.left,r=t.top+a.top,i=r+t.height;this.options.positionMenu({top:r,left:n,bottom:i,right:n},a)}hideMenu({fromSelection:e}={}){if(this.isMenuOpen()&&(this.options.logger.info(v,"closing menu"),this.options.onRequestClose(),!e&&!this.state.isInComposition))try{if(this.quill.hasFocus()){let e=this.quill.getSelection();e&&(this.quill.blur(),this.quill.focus({preventScroll:!0}),this.quill.setSelection(e))}}catch{this.options.logger.error("hideMenu tried to blur/focus Quill and encountered an error")}}resetPrevMatchState(){this.clearPrevMatch(),this.options.setSearchInFlight(null),this.state.prevInsertObject=null}clearPrevMatch(){this.options.clearMatchState()}performSelection({fromKeyboard:e=!1}={}){this.onOptionSelected(),this.options.onSelect({fromKeyboard:e}),this.clearPrevMatch(),this.hideMenu()}getNumResults(){return(0,s.A)(this.options.getMatchResults())}hasResults(){return this.getNumResults()>0}getResultElementIndex(e){if(!e)return;let t=parseInt(e.getAttribute("data-index")||"",10);return(0,i.A)(t)?t:void this.options.logger.warn(v,'missing "data-index" attribute')}}}},0xd3a4af01:(e,t,a)=>{"use strict";a.d(t,{A:()=>getTextChangeQueueModule});var n=a(0x118cdcdea),r=a.n(n),i=a(0x3e6dd1df),l=a(0x1ec68d6a3),o=a(0xd9d06d50),s=a(0x187155f2e);function isDeltaDeletion(e){return!!e&&!!e.length()&&!!(1===e.ops.length&&(0,o.A)(e.ops[0])||2===e.ops.length&&(0,s.A)(e.ops[0])&&!e.ops[0].attributes&&(0,o.A)(e.ops[1]))}var c=a(0x1f66c22b2),d=a(0x2398accc);function isDeltaSpaceInsertion(e){return!!e&&!!e.length()&&!!(1===e.ops.length&&(0,d.A)(e.ops[0])&&" "===e.ops[0].insert||2===e.ops.length&&(0,s.A)(e.ops[0])&&!e.ops[0].attributes&&(0,d.A)(e.ops[1])&&" "===e.ops[1].insert||3===e.ops.length&&(0,s.A)(e.ops[0])&&!e.ops[0].attributes&&(0,d.A)(e.ops[1])&&" "===e.ops[1].insert&&(0,o.A)(e.ops[2]))}var m=a(0x1266f1359);let u="TEXT-CHANGE-QUEUE";function getTextChangeQueueModule(e){let t=(0,i.A)(e).import("core/module");return class extends t{quill;skipNextTextChange;isInsideComposition;isMidProcessingChanges;compositionDelta;logger;options;constructor(e,t){super(e,t),this.options=t,this.quill=e;const a=t&&t.teamId,n=a&&(0,m.oK)(a),i=n&&n.getState();this.logger=(0,l.Ay)({state:i,label:u}),this.onTextChange=this.onTextChange.bind(this),this.startComposition=this.startComposition.bind(this),this.endComposition=this.endComposition.bind(this),this.skipNextTextChange=!1,this.isInsideComposition=!1,this.compositionDelta=new(r()),e.root.addEventListener("compositionstart",this.startComposition),e.root.addEventListener("compositionend",this.endComposition),this.isMidProcessingChanges=!1,this.listen()}unload(){this.quill.root.removeEventListener("compositionstart",this.startComposition),this.quill.root.removeEventListener("compositionend",this.endComposition)}listen(){this.quill.on("text-change",this.onTextChange)}onTextChange(e){if(this.skipNextTextChange){this.skipNextTextChange=!1;return}this.maybeUpdateCompositionDelta(e),this.processChanges(e)}startComposition(){this.isInsideComposition=!0,this.compositionDelta=new(r())}endComposition(){this.isInsideComposition=!1;let e=this.compositionDelta;this.processChanges(e)}isInComposition(){return!!this.isInsideComposition}maybeUpdateCompositionDelta(e){if(!this.isInComposition())return;let t=this.compositionDelta;if(!t)return;let a=t.compose(e);this.compositionDelta=a}shouldProcessChange(){return!this.isInComposition()}processChanges(e){this.isMidProcessingChanges&&this.logger&&this.logger.error(u,"Side effect from processChanges caused TextChangeQueue to rerun unexpectedly (non-fatal)"),this.isMidProcessingChanges=!0;let t=this.options.getTextChangeModules(),a=this.quill.getContents(),n=a;if(this.shouldProcessChange()){let r=a,i=[],l=(0,c.A)(e),o=isDeltaSpaceInsertion(e),s=isDeltaDeletion(e),d=this.quill.getSelection();t.forEach(t=>{if(!t?.buildTextChangeDelta)return;let a=t.buildTextChangeDelta(r,{initialTextChangeDelta:e,useWysiwyg:this.options.useWysiwyg,usePlainTextMode:this.options.usePlainTextMode,formattingOnly:l,isSpaceInsertion:o,isDeletion:s,range:d});a&&a.length()>0&&(i.push(t),r=r.compose(a))});let m=a.diff(r);if(m.length()>0){setTimeout(()=>{let e=this.quill.getModule("slackmarkdown");if(this.quill.getContents().diff(a).length()>0&&!(e&&i.includes(e)))return;let r=e&&i.includes(e),l=this.quill.history.options.delay;r&&(this.quill.history.options.delay=0),this.skipNextTextChange=!0,this.quill.updateContents(m,"user"),r&&(this.quill.history.options.delay=l),n=this.quill.getContents(),t.forEach(e=>{e&&e.afterTextChangeQueue&&e.afterTextChangeQueue(n)})},0),this.isMidProcessingChanges=!1;return}}t.forEach(e=>{e&&e.afterTextChangeQueue&&e.afterTextChangeQueue(n)}),this.isMidProcessingChanges=!1}}}getTextChangeQueueModule(window)},0x196f86498:(e,t,a)=>{"use strict";a.d(t,{A:()=>getTextSanitizationModule});var n=a(0xb77a689a),r=a(0x1aba66b56),i=a(0x118cdcdea),l=a.n(i),o=a(0x3e6dd1df),s=a(0x11209f55c);let c=/(\u2028|\u2029)/g,d=`
`,m=/^[\u200b\uFEFF]+|[\u200b\uFEFF]+$/gm,u=/(\u00AD)/g,p=/\u00A0/g,h=/( ?)\n+/g;function getTextSanitizationModule(e){let t=(0,o.A)(e).import("core/module");return class extends t{buildTextChangeDelta(e,t={useWysiwyg:!1,formattingOnly:!1}){if(t.formattingOnly)return;let a=e.map((t,a)=>{if((0,n.A)(t.insert)){let n=t.insert;if(n=(n=(n=(n=n.replace(c,d)).replace(m,"")).replace(u,"")).replace(p," "),this.options.stripNewlines&&(0,r.A)(n,`
`)){let t=a===e.ops.length-1;n=n.replace(h,(e,a,n,r)=>{let i=n+e.length===r.length;return t&&i?`${a}
`:" "})}if(n!==t.insert)return(0,s.S8)(t)?{...t,attributes:{...t.attributes,slackslug:{...t.attributes.slackslug,label:n}},insert:n}:{...t,insert:n}}return t}),i=new(l())(a);return e.diff(i)}}}getTextSanitizationModule(window)},0xfd55fa83:(e,t,a)=>{"use strict";a.d(t,{A:()=>getTextSubstitutionsModule});var n=a(0x1aba66b56),r=a(0x118cdcdea),i=a.n(r),l=a(0x3e6dd1df);function createSmartQuotes(e){return e.replace(/([^A-Za-z0-9]|^)"(\S)/g,"$1\u201C$2").replace(/(\u201c[^"]*)"([^"]*$|[^\u201c"]*\u201c)/g,"$1\u201D$2").replace(/([^0-9])"/g,"$1\u201D").replace(/([^A-Za-z0-9]|^)'(\S)/g,"$1\u2018$2").replace(/([a-z])'([a-z])/gi,"$1\u2019$2").replace(/((\u2018[^']*)|[a-z])'([^0-9]|$)/gi,"$1\u2019$3").replace(/(\u2018)([0-9]{2}[^\u2019]*)(\u2018([^0-9]|$)|$|\u2019[a-z])/gi,"\u2019$2$3").replace(/(\B|^)\u2018(?=([^\u2019]*\u2019\b)*([^\u2019\u2018]*\W[\u2019\u2018]\b|[^\u2019\u2018]*$))/gi,"$1\u2019").replace(/'/g,"\u2032")}var o=a(0x504b7e5),s=a(0x5a228fbb),c=a(0xa326966e),d=a(0xe7cb9732),m=a(0x1ff9f7c84),u=a(0xde7661f4),p=a(0x222762a83),h=a(0x11209f55c),_=a(0x2398accc),f=a(0xd40f768d),b=a(0x79469c7e),g=a(0x2048e7b71);function replaceSmartQuotes(e){let t=e;t=(t=t.replace(/[\u2018|\u2019]/g,"'")).replace(/[\u201c|\u201d]/g,'"');let a=[];t=(0,g.kW)(a,t,{replace_pre:!0,replace_code:!0,replace_url:!0});let n=[];return t=createSmartQuotes(t=t.replace((0,b.A)(),e=>{let t=`<emoticon-placeholder-${Date.now()}>`;return n.push({emoticon:e,placeholder:t}),t})),n.forEach(e=>{t=t.replace(e.placeholder,e.emoticon)}),t=(0,g.Ki)(a,t)}var y=a(0x120f6f7a3);let A=["'",'"',"\u201C","\u201D","\u2018","\u2019"];function convertDeltaToTextForSmartQuotes(e){return e.reduce((e,t)=>{if((0,m.A)(t))return(0,u.A)(t)?`${e} `:`${e}a`;if((0,h.wU)(t)||(0,p.Ay)(t))return e+((0,h.wU)(t)?(0,h.XY)(t):(0,p.AQ)(t)).replace(/./g,"a");if((0,_.A)(t)){let a=(0,_.$)(t).replace(y.i$,e=>e.replace(/./g,"a"));return e+(a=a.replace(/:'\(/g,"aaa"))}return e+t.insert},"")}function getTextSubstitutionsModule(e){let t=(0,l.A)(e).import("core/module");return class extends t{constructor(e,t){super(e,t),this.onEmDash=this.onEmDash.bind(this),this.onEllipsis=this.onEllipsis.bind(this),this.shouldDoSubstitutions=this.shouldDoSubstitutions.bind(this),this.listen()}shouldDoSubstitutions(e){if(!e||!this.options.getTextPreferences())return!1;if(this.options.useWysiwyg&&!this.options.usePlainTextMode)return!0;let t=this.quill.getText(0,e.index+e.length);return!(0,f.A)(t)}listen(){this.quill.keyboard.addBinding({key:" ",prefix:/--$/,shiftKey:null,collapsed:!0,format:{code:!1,"code-block":!1}},this.onEmDash),this.quill.keyboard.addBinding({key:190,collapsed:!0,format:{code:!1,"code-block":!1},prefix:/\.\.$/},this.onEllipsis)}onEmDash(e,t){if(this.options.isInComposition()||!this.shouldDoSubstitutions(e)||!this.options.getTextPreferences().useSmartDashes)return!0;let a=e.index-2;return this.quill.updateContents(new(i())().retain(a).delete(2).insert("\u2014 ",t.format)),!1}onEllipsis(e,t){if(this.options.isInComposition()||!this.shouldDoSubstitutions(e)||!this.options.getTextPreferences().useSmartDashes)return!0;let a=e.index-2;return this.quill.updateContents(new(i())().retain(a).delete(2).insert("\u2026",t.format)),!1}shouldBuildSmartQuotes(){let e=this.options.getTextPreferences();return!!e&&!!e.useSmartQuotes}buildWysiwygSafeTextChangeDelta(e){let t=new(i()),a=convertDeltaToTextForSmartQuotes(e),r=a.replace(/[\u2018|\u2019]/g,"'").replace(/[\u201c|\u201d]/g,'"');if(!(0,n.A)(r,"'")&&!(0,n.A)(r,'"'))return t;let l=createSmartQuotes(r),m=[];for(let e=0;e<a.length;e++)-1!==A.indexOf(a[e])&&-1!==A.indexOf(l[e])&&m.push(e);if(!m.length)return t;let u=0,h=0;return(0,o.A)(e,(e,n)=>{let r=(0,d.A)(n),i=(0,s.A)(e);if(h+i<m[0]||!(0,_.A)(e)){h+=i;return}m.filter(e=>e>=h&&e<h+i).forEach(n=>{let i=l[n];if(r||(0,c.A)(e)||(0,p.Ay)(e))"\u201C"===i||"\u201D"===i?i='"':("\u2018"===i||"\u2019"===i)&&(i="'");else if(!this.shouldBuildSmartQuotes())return;a[n]!==i&&(t.retain(n-u).delete(1).insert(i,e.attributes),u=n+1)}),h+=i}),t}buildTextChangeDelta(e,t={useWysiwyg:!1,usePlainTextMode:!1}){if(t.useWysiwyg&&!t.usePlainTextMode)return this.buildWysiwygSafeTextChangeDelta(e);let a=new(i()),n=0;if(!this.shouldBuildSmartQuotes())return a;let r=e.reduce((e,t)=>(0,m.A)(t)?`${e}a`:(0,h.wU)(t)?e+(0,h.XY)(t).replace(/./g,"a"):e+t.insert,""),l=replaceSmartQuotes(r);if(r===l)return a;for(let e=0;e<r.length;e++)r[e]!==l[e]&&-1!==A.indexOf(r[e])&&-1!==A.indexOf(l[e])&&(a.retain(e-n).delete(1).insert(l[e]),n=e+1);return a}}}getTextSubstitutionsModule(window)},0x218d4970c:(e,t,a)=>{"use strict";a.d(t,{A:()=>getWorkflowTokenModule});var n=a(0x3e6dd1df),r=a(0x1d62f3e69),i=a(0x1242da2eb);function getWorkflowTokenModule(e){let t=(0,n.A)(e),a=t.import("core/module"),l=t.import("parchment");return class extends a{constructor(e,t){super(e,t),this.onClickOption=t.onClick,this.onTokenClick=this.onTokenClick.bind(this),this.listen()}unload(){this.onClickOption&&this.quill.root.removeEventListener("click",this.onTokenClick)}listen(){this.onClickOption&&this.quill.root.addEventListener("click",this.onTokenClick,!1)}onTokenClick(e){if(!this.onClickOption)return!0;let t=e.target.closest(`.${r.li}`);if(null===t)return!0;let a=l.find(t).offset(this.quill.scroll),n=this.quill.getContents(a,1);if(n.ops[0]&&(0,i.Ay)(n.ops[0])){e.preventDefault(),e.stopPropagation();let r=n.ops[0].insert.workflowtoken;if(r.isPlaceholder)return this.onClickOption({token:r,element:t,index:a}),!0;if(!r.isAvailable||!r.isClickable)return!0;this.onClickOption({token:r,element:t,index:a})}return!0}}}},0xa5a7f2f9:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x99233ecb),d=a(0x7e43e8eb),m=a(0xf5bbd10a),u=a(0x1af40a2ea),p=a(0x3711e82d),h=a(0xb04c4a12),_=a(0x226892387);let f=new s.Ay("drafts"),b=(0,n.Ar)()?function(e){let t,a,n,s,b,g=(0,r.c)(40),{menuProps:y,draftId:A,onScheduleSend:x,viewContext:E}=e,C=(0,l.wA)(),k=(0,m.A)();g[0]!==A?(t=e=>(0,d.rU)(e,{draftId:A}),g[0]=A,g[1]=t):t=g[1];let v=(0,_.d4)(t);g[2]!==C||g[3]!==A||g[4]!==k||g[5]!==x?(a=function(e){let t,a=e!==d.Br.Custom;!a||(t=C((0,d.aj)({option:e,draftId:A})))?x({dateScheduled:t,isSuggestedDate:a}):k.error("SCHEDULE-SEND","Failed to determine dateScheduled from schedule send menu item. Returning early.")},g[2]=C,g[3]=A,g[4]=k,g[5]=x,g[6]=a):a=g[6];let S=a;g[7]!==C||g[8]!==A?(n=function(e){if(e===d.Br.Custom)return null;let t=C((0,d.aj)({option:e,draftId:A}));return t?C((0,u.C0)({draftId:A,schedulingTime:t})):null},g[7]=C,g[8]=A,g[9]=n):n=g[9];let I=n;g[10]!==C||g[11]!==A?(s=function(e){return C((0,d.ZX)({option:e,draftId:A}))},g[10]=C,g[11]=A,g[12]=s):s=g[12];let w=s,T=E===h.Y.MESSAGE_PANE?"chat":"composer";if(g[13]!==T||g[14]!==I||g[15]!==w||g[16]!==y||g[17]!==S||g[18]!==v){let e,t;if(g[20]!==T?(e={eventId:p.EventId.COMPOSE_FLOW,uiStep:p.UiStep.SCHEDULED_SCHEDULING_MODAL_OPEN,scheduleSendActionSource:T,clogImpression:!0},g[20]=T,g[21]=e):e=g[21],g[22]!==I||g[23]!==w||g[24]!==y||g[25]!==S||g[26]!==v){let e,a,n;if(g[28]!==y?(e={width:"260px",...y},g[28]=y,g[29]=e):e=g[29],g[30]===Symbol.for("react.memo_cache_sentinel")?(a=i.createElement(c.c$,{label:f.t("Schedule message")}),g[30]=a):a=g[30],g[31]!==I||g[32]!==w||g[33]!==S||g[34]!==v){let e;g[36]!==I||g[37]!==w||g[38]!==S?(e=e=>{let t=e===d.Br.Custom;return i.createElement(i.Fragment,{key:e},t&&i.createElement(c.bX,null),i.createElement(c.Dr,{label:w(e),description:I(e),"data-qa":"p-schedule_send_menu__scheduling_option",onSelected:()=>S(e)}))},g[36]=I,g[37]=w,g[38]=S,g[39]=e):e=g[39],n=v.map(e),g[31]=I,g[32]=w,g[33]=S,g[34]=v,g[35]=n}else n=g[35];t=i.createElement(c.Ay,e,a,n),g[22]=I,g[23]=w,g[24]=y,g[25]=S,g[26]=v,g[27]=t}else t=g[27];b=i.createElement(o.A,e,t),g[13]=T,g[14]=I,g[15]=w,g[16]=y,g[17]=S,g[18]=v,g[19]=b}else b=g[19];return b}:function({menuProps:e,draftId:t,onScheduleSend:a,viewContext:n}){let r=(0,l.wA)(),s=(0,m.A)(),b=(0,_.d4)(e=>(0,d.rU)(e,{draftId:t}));function onItemSelected(e){let n,i=e!==d.Br.Custom;!i||(n=r((0,d.aj)({option:e,draftId:t})))?a({dateScheduled:n,isSuggestedDate:i}):s.error("SCHEDULE-SEND","Failed to determine dateScheduled from schedule send menu item. Returning early.")}function getMenuItemDescription(e){if(e===d.Br.Custom)return null;let a=r((0,d.aj)({option:e,draftId:t}));return a?r((0,u.C0)({draftId:t,schedulingTime:a})):null}function getMenuItemLabel(e){return r((0,d.ZX)({option:e,draftId:t}))}let g=n===h.Y.MESSAGE_PANE?"chat":"composer";return i.createElement(o.A,{eventId:p.EventId.COMPOSE_FLOW,uiStep:p.UiStep.SCHEDULED_SCHEDULING_MODAL_OPEN,scheduleSendActionSource:g,clogImpression:!0},i.createElement(c.Ay,{width:"260px",...e},i.createElement(c.c$,{label:f.t("Schedule message")}),b.map(e=>{let t=e===d.Br.Custom;return i.createElement(i.Fragment,{key:e},t&&i.createElement(c.bX,null),i.createElement(c.Dr,{label:getMenuItemLabel(e),description:getMenuItemDescription(e),"data-qa":"p-schedule_send_menu__scheduling_option",onSelected:()=>onItemSelected(e)}))})))},g=b;b.displayName="ScheduleSendMenu"},0x1b71550d9:(e,t,a)=>{"use strict";a.d(t,{A:()=>t4});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x3bc7bbd5),o=a(0x23a67ace),s=a(0x120c268ad),c=a.n(s),d=a(0xbe5e39b6),m=a(0x20482ad21),u=a(0xe7ed96ac),p=a(0x2ab73abf),h=a(0x2173e1832),_=a(0x2501a2cee),f=a(0x4c96e5d9),b=a(0x18f2150ea),g=a(0x1f022ebd9),y=a(0xe874a88a),A=a(0x12edaa96a),x=a(0xa6f3163b),E=a(0x15f8e452a),C=a(0x106d9c7ac),k=a(0xc06ed72e),v=a(0xe525becc),S=a(0x11c82607b),I=a(0x1c2eef3c8);let w=(0,S.Ay)("Send a draft message by draft ID",(e,t,a)=>{let n=(0,I.YI)(t(),a);n&&e((0,v.A)({draft:n}))});w.meta={name:"sendDraftMessageById",key:"createThunkSendDraftMessageById",description:"Send a draft message by draft ID"};var T=a(0xd6c28eca),N=a(0x19926a18e),M=a(0x9ac81e1a),R=a(0x1a6aec359),P=a(0x238b287cf),L=a(0xa12b0a9a),O=a(0x3711e82d),D=a(0x150735f79);let F=new m.Ay("stories_av"),AudioPopover=({popoverProps:e,draftId:t,enableScheduleSendButton:a})=>{let{duration:l,audioWaveformRecorderProps:o,onAttach:s,file:d,finishUpload:m,onCancel:u}=(0,M.X)({fileName:"audio_message.m4a",fileSubtype:"slack_audio",draftId:t,onFileAttach:()=>{e?.onClose?.()}}),p=o.warningHighlight,h=(0,r.wA)(),_=(0,P.A)(),[v,S]=(0,n.useState)(!1),[I,U]=(0,n.useState)(!1),[B,H]=(0,n.useState)(!1),W=(0,L.d)(()=>({media_type:"audio",recording_session:(0,A.A)()})),V=(0,n.useContext)(T.Z),G=(0,n.useCallback)(async()=>{await y.S.resolve(m()),h(w(t)),e?.onClose?.()},[h,m,t,e]),q=(0,n.useCallback)(async({dateScheduled:a,isSuggestedDate:n})=>{await y.S.resolve(m()),(0,b.A)(a)?h((0,D.A)({draftId:t,dateScheduled:a,isSuggestedDate:n})):h((0,R.r)({draftId:t,onMessageScheduled:i.A})),e?.onClose?.()},[h,m,t,e]),j=(0,n.useCallback)(()=>{s(),_.track(O.EventId.AV_CAPTURE,{...W,length_seconds:l,contexts:{ui_context:{ui_step:"recording",action:"click",ui_properties:{element_type:"button",element_name:"attach"}}}})},[s,_,W,l]),z=(0,n.useCallback)(()=>{e?.onClose?.(),u(),_.track(O.EventId.AV_CAPTURE,{...W,length_seconds:l,contexts:{ui_context:{ui_step:"recording",action:"click",ui_properties:{element_type:"button",element_name:"cancel"}}}}),_.track(O.EventId.AV_CAPTURE,{...W,length_seconds:l,contexts:{ui_context:{ui_step:"recording",action:"click",ui_properties:{element_type:"button",element_name:"close"}}}})},[e,_,W,l,u]),K=(0,n.useCallback)(e=>{e?.target?.classList?.contains("c-popover")&&H(!0)},[]);(0,n.useEffect)(()=>{v&&d&&(S(!1),G())},[v,d,G]),(0,n.useEffect)(()=>{I&&d&&(U(!1),q(I))},[I,d,q]),(0,g.A)(()=>(V.setIsOpen(!0),()=>V.setIsOpen(!1)),[]),(0,n.useEffect)(()=>{if(B){let e=setTimeout(()=>H(!1),1e3);return()=>clearTimeout(e)}},[B]),(0,g.A)(()=>{_.track(O.EventId.AV_CAPTURE,{...W,contexts:{ui_context:{ui_step:"initial_screen",action:"impression"}}})},[]);let $=n.createElement(n.Fragment,null,n.createElement(N.A,{streamManager:o.streamManager,recording:o.recording,onDotsUpdate:o.onDotsUpdate,warningHighlight:o.warningHighlight,className:"p-audio_popover__waveform"}),n.createElement("div",{className:c()("p-audio_popover__timer",{"p-audio_popover__timer--warning":p})},(0,k.A)(Math.floor(l??0)))),Y=n.createElement(f.Ay,{tip:F.t("Stop recording"),position:"top",delay:f.PK},n.createElement(x.A,{className:c()("p-audio_popover__attach",{"p-audio_popover__attach--scheduled_send":a}),onClick:j,"aria-label":F.t("Stop recording"),autoFocus:!0,visibleAutoFocus:!1},n.createElement(E.A,{type:"check-large-bold",className:"p-audio_popover__attach__icon",size:"inherit"}))),Q=n.createElement("div",{className:"p-audio_popover__footer"},Y);return n.createElement("div",{onClick:K},n.createElement(C.Ay,{...e,offsetX:-64,offsetY:28,allowanceX:4,zIndex:"below_menu",shouldCloseOnOverlayClick:!1,ariaRole:"dialog",ariaLabel:F.t("Audio recorder")},n.createElement("div",{className:"p-audio_popover"},n.createElement("div",{className:c()("p-audio_popover__strip",{"p-audio_popover__strip--speedbump":B})},$),Q),n.createElement(f.Ay,{tip:F.t("Cancel recording"),position:"top",delay:f.PK},n.createElement(x.A,{className:"p-audio_popover__close",onClick:z,"aria-label":F.t("Cancel recording")},n.createElement(E.A,{type:"times-small"})))))};AudioPopover.displayName="AudioPopover";let U=new m.Ay("stories_av"),AudioComposerButton=({draftId:e,enableScheduleSendButton:t,enableClipsCoachmarkHighlight:a,textyRef:r})=>{let i,l=(0,P.A)(),o=(0,n.useCallback)(a=>n.createElement(AudioPopover,{popoverProps:a,draftId:e,enableScheduleSendButton:t}),[e,t]),s=(0,n.useCallback)(()=>{r.current&&r.current.focus()},[r]),m=(0,n.useCallback)(()=>{l.track(O.EventId.AV_CAPTURE,{media_type:"audio",contexts:{ui_context:{ui_step:"entry_point",action:"click",ui_properties:{element_type:O.ElementType.BUTTON,element_name:"audio_composer_button"}}}})},[l]),b=U.t("Record audio clip");return n.createElement(p.Ay,{position:"top-left",renderPopover:o,onClick:m,onClose:s},n.createElement(f.Ay,{tip:b,position:d.yX.Top,offsetY:-7,delay:500,zIndex:h.m.AboveFullScreen},n.createElement(u.A,{className:c()("p-audio_composer_button","c-wysiwyg_container__button",{"p-audio_composer_button--highlight":a}),size:"small","aria-label":b,tabIndex:-1,"data-qa":"audio_composer_button",...i},n.createElement(_.Ah,{name:"microphone",size:"18"}))))};AudioComposerButton.displayName="AudioComposerButton";let B=n.memo(AudioComposerButton);var H=a(0x344bb842),W=a(0x2197a83e3),V=a(0x2486741bf),G=a(0x226892387),q=a(0x1cf0d97e1),j=a(0x2365f1831);let z=(0,q.Ay)((e,t)=>e?.composerToolbarButtonUI?.[j.V?.[t]]?.expanded);z.meta={name:"isComposerButtonExpanded",key:"createSelectorIsComposerButtonExpanded",description:(e,t)=>e?.composerToolbarButtonUI?.[j.V?.[t]]?.expanded};let K=new m.Ay("stories_av");function VideoComposerButton({draftId:e,enableClipsCoachmarkHighlight:t,textyRef:a}){let i,l=(0,r.wA)(),o=(0,G.d4)(e=>z(e,j.V.STORY)),s=(0,G.d4)(t=>(0,V.A)(t,e)),m=(0,P.A)(),u=(0,n.useCallback)(t=>{t.preventDefault(),l((0,W.A)({draftId:e})),m.track(O.EventId.AV_CAPTURE,{media_type:"video",contexts:{ui_context:{ui_step:"entry_point",action:"click",ui_properties:{element_type:O.ElementType.BUTTON,element_name:"video_composer_button"}}}}),a.current&&!o&&a.current.focus()},[l,e,m,a,o]),p=K.t("Record video clip");return n.createElement(f.Ay,{tip:p,position:d.yX.Top,offsetY:-7,delay:500,zIndex:h.m.AboveFullScreen},n.createElement(H.A,{className:c()("p-video_composer_button c-wysiwyg_container__button c-wysiwyg_container__button--story_meeting",{"c-wysiwyg_container__button--disabled":s,"p-video_composer_button--highlight":t}),onClick:u,tabIndex:-1,disabled:s,"aria-label":p,"aria-expanded":o?"true":"false",size:"small","data-qa":"video_composer_button",...i},n.createElement(_.Ah,{name:"video",size:"18"})))}VideoComposerButton.displayName="VideoComposerButton";let $=VideoComposerButton;var Y=a(0x1789e94fa),Q=a(0x1562fc439),Z=a(0x5b1935a6);let J=n.lazy(()=>Promise.resolve().then(a.bind(a,0xd1ec8718)).then(e=>({default:e.OptionItemMentionTip}))),X={spaceName:Z.xu.WORKFLOW_BUILDER_QUESTION_OPTION_INPUT,notifications:{[Z.ze.HERMES_WORKFLOWS_OPTION_ITEM_MENTION_TIP]:{component:J}}};var ee=a(0x20acb5cc8),et=a(0x99233ecb),ea=a(0x1039e8d4e),en=a(0x599c2680),er=a(0x2144db37e),ei=a(0x1aa43e032),el=a(0x120395fb7),eo=a.n(el);let es=new m.Ay("ai"),ec=n.createElement(_.Ah,{name:"ai-sparkle",size:"16"}),ed=(0,n.memo)(({onClick:e,channelId:t,threadTs:a,isMinDraftLengthForComposerAi:r,shouldShowCompactButton:i})=>{let l=(0,G.d4)(ea.KC),o={edit:l?es.t("Edit with AI"):"Edit with AI",draft:l?es.t("Draft with AI"):"Draft with AI"},s=r?o.edit:o.draft,d=a?`${t}:${a}`:t,{draftState:m}=(0,G.d4)(e=>(0,en.VA)(e,d)),u=(0,n.useMemo)(()=>(0,ei.jp)(m)?n.createElement("div",{className:eo().animatedBadge}):m===er.z.GENERATED?n.createElement("div",{className:eo().badge}):null,[m]);if(!l)return null;if(i){let t=c()("c-wysiwyg_container__button","c-wysiwyg_container__button--workflows","display_flex","align_items_center","justify_content_center","position_relative");return n.createElement(f.Ay,{position:"top",tip:s},n.createElement("div",{className:"position_relative"},n.createElement(x.A,{onClick:e,className:t,"data-qa":"ai-composer-trigger-button"},ec),u))}return n.createElement("div",{className:"position_relative"},n.createElement(x.A,{onClick:e,className:c()(eo().aiComposerTriggerButton,eo().buttonWithText),"data-qa":"ai-composer-trigger-button",size:"small"},ec,s),u)});var em=a(0x14705d91b),eu=a(0x10bd0ba09),ep=a(0xd843ab47),eh=a(0x46947d88),e_=a(0xb04c4a12),ef=a(0x3cc61ba4),eb=a(0x11d8adfa7),eg=a(0x1f48e3aa4),ey=a(0x10eb400b2),eA=a.n(ey);let ex=new m.Ay("ai"),eE=[e_.Y.SLACKBOT_AI_CONVERSATION,e_.Y.SLACKBOT_AI_HISTORY,e_.Y.SLACKBOT_AI_SPLIT],AiComposerRefinementButton=({channelId:e,threadTs:t,viewContext:a,isMinDraftLengthForComposerAi:i,shouldShowCompactButton:l})=>{let o=(0,r.wA)(),s=(0,P.A)(),c=(0,n.useRef)(null),{container:d,windowId:m}=(0,n.useContext)(ep.A),u=(0,G.d4)(ea.KC),p=t?`${e}:${t}`:e,h=(0,n.useMemo)(()=>d&&m?{container:d,windowId:m}:null,[d,m]),{draftState:_,prompt:f}=(0,G.d4)(e=>(0,en.VA)(e,p))??{},b=(0,G.d4)(en.zg),g=(0,n.useMemo)(()=>u?(0,ei.NU)().map(a=>({label:a,onSelected:()=>{s.track(O.EventId.NATIVE_AI,{channel_id:e,native_ai_summary_channel_id:e,native_ai_summary_thread_ts:t,native_ai_summary_type:eg.Tj.Composer,contexts:{ui_context:{action:O.UiAction.CLICK,ui_properties:{element_name:"composer_ai_suggested_prompt",element_value:a,element_type:O.ElementType.MENU_ITEM}}}}),o((0,eb.H)({channelId:e,threadTs:t,prompt:a,openedFrom:h}))}})):[],[u,o,e,t,s,h]),y=(0,n.useMemo)(()=>b?.length?b.map(a=>({label:a,onSelected:()=>{s.track(O.EventId.NATIVE_AI,{channel_id:e,native_ai_summary_channel_id:e,native_ai_summary_thread_ts:t,native_ai_summary_type:eg.Tj.Composer,contexts:{ui_context:{action:O.UiAction.CLICK,ui_properties:{element_name:"composer_ai_recent_prompt",element_type:O.ElementType.MENU_ITEM}}}}),o((0,eb.H)({channelId:e,threadTs:t,prompt:a,openedFrom:h}))}})):[],[b,o,e,t,s,h]),A=(0,n.useCallback)(()=>{o((0,ef.CW)({sessionKey:p,updates:{isOpen:!0,openedFrom:h}}))},[o,p,h]),x=(0,n.useCallback)((a=!1)=>()=>{s.track(O.EventId.NATIVE_AI,{channel_id:e,native_ai_summary_channel_id:e,native_ai_summary_thread_ts:t,native_ai_summary_type:eg.Tj.Composer,contexts:{ui_context:{action:O.UiAction.CLICK,ui_properties:{element_name:"composer_ai_trigger_button",element_type:O.ElementType.BUTTON}}}}),a&&A()},[e,t,s,A]),E=(0,n.useCallback)(()=>{s.track(O.EventId.NATIVE_AI,{channel_id:e,native_ai_summary_channel_id:e,native_ai_summary_thread_ts:t,native_ai_summary_type:eg.Tj.Composer,contexts:{ui_context:{action:O.UiAction.ENTER,ui_properties:{element_name:"composer_ai_menu_custom_prompt",element_type:O.ElementType.MENU_ITEM}}}});let a=c.current?.getText().trim();a&&o((0,eb.H)({channelId:e,threadTs:t,prompt:a,openedFrom:h}))},[e,t,o,s,h]),C=(0,n.useCallback)(e=>{[eh.D.ESCAPE,eh.D.UP,eh.D.DOWN].includes(e.key)||e.stopPropagation()},[]),k=(0,n.useCallback)(e=>u?n.createElement(et.Ay,e,n.createElement(et.c$,{label:ex.t("Quick edits")}),g.map(e=>n.createElement(et.Dr,{key:e.label,label:e.label,onSelected:e.onSelected})),y?.length>0&&n.createElement(n.Fragment,null,n.createElement(et.bX,null),n.createElement(et.c$,{label:ex.t("Recent")}),y.map(e=>n.createElement(et.Dr,{key:e.label,label:e.label,onSelected:e.onSelected}))),n.createElement(et.bX,null),n.createElement("div",{onKeyDown:C,role:"presentation"},n.createElement(em.A,{forceToolbarDisabled:!0,className:eA().describeYourEditInput},n.createElement(eu.A,{ariaLabel:ex.t("Describe your edit"),placeholder:ex.t("Describe your edit"),maxLength:2e3,"data-qa":"describe_your_edit_input",focusOnMount:!0,ref:c,onEnter:E,id:"describe_your_edit_input"})))):null,[u,y,g,E,C]);return!u||a&&eE.includes(a)?null:!i||!(0,ei.p0)(_)||f?.length?n.createElement(ed,{onClick:x(!0),channelId:e,threadTs:t,isMinDraftLengthForComposerAi:i,shouldShowCompactButton:l}):n.createElement(et.cQ,{position:"top-left",renderMenu:k,onClick:x(!1)},n.createElement("div",null,n.createElement(ed,{channelId:e,threadTs:t,isMinDraftLengthForComposerAi:i,shouldShowCompactButton:l})))};AiComposerRefinementButton.displayName="AiComposerRefinementButton";var eC=a(0xf5a3fff7),ek=a(0x1c6b56d20),ev=a(0x1da5e2fd),eS=a(0x1da1c17ee),eI=a(0x665f83e5),ew=a(0x22a29f141);function computeAudioLevel(e,t){e.getByteTimeDomainData(t);let a=0;for(let e=0;e<t.length;e++){let n=(t[e]-128)/128;a+=n*n}return Math.min(1,3*Math.sqrt(a/t.length))}function useDictation({onTranscriptionComplete:e}){let t=(0,r.wA)(),[a,i]=(0,n.useState)(!1),[l,o]=(0,n.useState)(!1),[s,c]=(0,n.useState)(null),[d,m]=(0,n.useState)(0),u=(0,n.useRef)(null),p=(0,n.useRef)(e);(0,n.useEffect)(()=>{p.current=e},[e]);let h=(0,n.useRef)(null),_=(0,n.useRef)(null),f=(0,n.useRef)(null),b=(0,L.d)(()=>{let e=(0,eC.Bh)(),t=(0,ev.Nj)(ek.lW.Microphone)?.id,a=e?.audio?.enableAGC;return new eI.A({audioOnly:!0,noiseSuppression:!0,autoGainControl:a,microphoneId:t,shouldStartMicrophone:!1,shouldStartCamera:!1,shouldStartScreenCapture:!1})});(0,n.useEffect)(()=>{if(!a)return;let e=setInterval(()=>{_.current&&f.current&&m(computeAudioLevel(_.current,f.current))},50);return()=>clearInterval(e)},[a]);let g=(0,n.useCallback)(()=>{h.current&&(h.current.close(),h.current=null),_.current=null,f.current=null},[]),y=(0,n.useCallback)(e=>{o(!0),c(null);let a=new FileReader;a.onerror=()=>{c("transcription_failed"),o(!1)},a.onloadend=()=>{let e=a.result.split(",")[1];if(!e){c("transcription_failed"),o(!1);return}t((0,ew.apiCall)({method:"ai.alpha.audio.transcribe",args:{audio_base64:e,audio_format:"webm"},reason:"slackbot_ai_dictation"})).then(e=>{let t=e.transcription?.trim();t?p.current(t):c("no_speech"),o(!1)},()=>{c("transcription_failed"),o(!1)})},a.readAsDataURL(e)},[t]),A=(0,n.useCallback)(()=>{b.recording&&(g(),b.stopAudioRecording(),b.stopMicrophone(),i(!1),u.current&&(clearTimeout(u.current),u.current=null))},[g,b]),x=(0,n.useCallback)(()=>{a||l||(c(null),m(0),i(!0),b.startMicrophone(),u.current=setTimeout(()=>{A()},12e4))},[a,l,b,A]);return(0,n.useEffect)(()=>{let onMicrophoneStart=()=>{let e=b.microphoneStream;if(e){let t=new AudioContext,a=t.createAnalyser();a.fftSize=256,a.smoothingTimeConstant=.5,t.createMediaStreamSource(e).connect(a),h.current=t,_.current=a,f.current=new Uint8Array(a.frequencyBinCount)}b.startAudioRecording()},onMicrophoneError=()=>{t((0,eS.d)()),i(!1)},onRecordingEnd=e=>{e.data.size>0&&y(e.data)};return b.addEventListener("microphonestart",onMicrophoneStart),b.addEventListener("microphoneerror",onMicrophoneError),b.addEventListener("recordingend",onRecordingEnd),()=>{b.removeEventListener("microphonestart",onMicrophoneStart),b.removeEventListener("microphoneerror",onMicrophoneError),b.removeEventListener("recordingend",onRecordingEnd)}},[b,t,y]),(0,n.useEffect)(()=>()=>{g(),u.current&&(clearTimeout(u.current),u.current=null),b.stop()},[b,g]),{isRecording:a,isTranscribing:l,error:s,audioLevel:d,startDictation:x,stopDictation:A}}var eT=a(0x14149c126),eN=a(0xd951c582),eM=a.n(eN);let eR=new m.Ay("assistant"),eP={name:"microphone",size:"18"};function AudioLevelBars({audioLevel:e}){return n.createElement("div",{className:eM().audioBars,"aria-hidden":"true"},Array.from({length:4},(t,a)=>{let r=Math.max(.3,Math.min(1,(e-a/4*.5)*2));return n.createElement("span",{key:a,className:eM().audioBar,style:{transform:`scaleY(${r})`}})}))}AudioLevelBars.displayName="AudioLevelBars";let DictationButton=({onTranscriptionComplete:e,disabled:t=!1})=>{let a=(0,G.d4)(e=>"on"===(0,eT._Z)(e,"slackscribe_transcribe")),{isRecording:r,isTranscribing:i,error:l,audioLevel:o,startDictation:s,stopDictation:m}=useDictation({onTranscriptionComplete:e}),p=(0,n.useCallback)(()=>{r?m():s()},[r,s,m]),h=a?eR.t("Stop recording"):"Stop recording",_=a?eR.t("Transcribing\u2026"):"Transcribing\u2026",b=a?eR.t("Dictate message"):"Dictate message",g=a?eR.t("Transcription failed. Please try again."):"Transcription failed. Please try again.",y=a?eR.t("No speech detected. Please try again."):"No speech detected. Please try again.",A=(0,n.useMemo)(()=>l?"no_speech"===l?y:g:r?h:i?_:b,[r,i,l,h,_,b,g,y]);return n.createElement("div",{className:eM().wrapper},n.createElement(f.Ay,{tip:A,position:d.yX.Top,offsetY:-7,delay:500},n.createElement(u.A,{className:c()(eM().button,"c-wysiwyg_container__button",r&&eM().recording),size:"small",svgIconProps:eP,"aria-label":A,tabIndex:-1,"data-qa":"dictation_button",disabled:t||i,onClick:p})),r&&n.createElement(AudioLevelBars,{audioLevel:o}))};DictationButton.displayName="DictationButton";let eL=n.memo(DictationButton);var eO=a(0x10027d8bc),eD=a(0x807220a2),eF=a(0x19bf376f9),eU=a(0x1595bdd0),eB=a(0x118cdcdea),eH=a.n(eB),eW=a(0x130d89881),eV=a(0xfbe3141b),eG=a(0x6aeae8a3),eq=a(0x1a043bf26),ej=a(0x93c5a2d7),ez=a(0x130c2e810),eK=a(0xe8e28706),e$=a(0x243435af9),eY=a(0xa3534e17),eQ=a(0x26b29744),eZ=a.n(eQ);let eJ=new m.Ay("includes_client"),eX={name:"bot",size:"18"},e0=(0,eD.Ar)()?function(){let e,t=(0,eF.c)(2),a=(0,G.Z2)(_temp);return t[0]!==a?(e=(0,eU.A)(a),t[0]=a,t[1]=e):e=t[1],e}:function(){let e=(0,G.Z2)(e=>(0,eK.wB)(e).map(t=>(0,ez.O8)(e,t.bot_user_id)));return(0,eU.A)(e)};function _temp(e){return(0,eK.wB)(e).map(t=>(0,ez.O8)(e,t.bot_user_id))}let AgentMentionButton=({textyRef:e})=>{let t=(0,G.d4)(e$.IX),a=t?eJ.t("Mention an agent"):"Mention an agent",r=t?eJ.t("Search by agent name or skills"):"Search by agent name or skills",[i,l]=(0,n.useState)(void 0),[o,s]=(0,n.useState)(""),c=e0().filter(e=>e.profile.name.toLowerCase().includes(o.toLowerCase())||e.profile.description?.toLowerCase().includes(o.toLowerCase())),d=c.map(e=>e.app_id),m=(0,n.useCallback)(()=>{if(!e?.current)return;let t=e.current.getSelection(),a=e.current?.quill?.container?.getBoundingClientRect();if(t&&a){let n=e.current.getBounds(t.index,t.length);l({top:a.top+n.top,left:a.left+n.left,right:a.right+n.right,bottom:a.bottom+n.bottom,width:a.width,height:a.height})}if(!t||t.length)return;let n=t.index>0?e.current.getTextForRange(t.index-1,1):"";e.current.getFormat(t.index).slackmention||"@"!==n||e.current.deleteText(t.index-1,1)},[e]),u=(0,n.useCallback)((t,a)=>{let n=c.find(e=>e.app_id===t.id);n&&e?.current&&e.current.getSelection()&&setTimeout(()=>{e.current?.insertContentsAtCursor({contents:new(eH())().insert(`@${n.profile?.name} `,{slackmention:(0,eY.A)(n.app_user?.id||"",`@${n.profile?.name}`)})}),e.current?.focus(),a()},0)},[c,e]),p=(0,n.useCallback)(e=>{s(e.target.value?e.target.value.trim():"")},[]),h=(0,n.useCallback)(e=>{let t=c[e],a={...t.profile,id:t.app_id};return n.createElement(ej.A,{key:c[e].app_id,id:c[e].app_id,app:a,imagePathPrefix:"icons.image_",showBadge:!1,showShortDescription:!0})},[c]),_=(0,n.useCallback)(e=>n.createElement(eG.AM,{shouldFade:!1,allowanceX:15,allowanceY:15,position:"top-left",offsetX:0,tryOppositePosition:!1,offsetY:-6,shouldReturnFocusAfterClose:!0,...e},n.createElement("div",{className:eZ().container},n.createElement(eV.A,{placeholder:r,icon:"search",onChange:p,hasResetButton:!0,autoFocus:!0,className:"p-workflow_picker_filter_input","aria-label":r}),n.createElement(eW.A,{disableHeight:!0},({width:a})=>n.createElement(eq.A,{"aria-label":t?eJ.t("Agents"):"Agents",keys:d,width:a,height:300,rowRenderer:h,onItemClick:t=>u(t,e.onClose)})))),[d,t,u,p,h,r]),b=(0,n.useCallback)(()=>{s("")},[]);return n.createElement(eG.Wv,{targetBounds:i,renderPopover:_,onClick:m,shouldCloseOnOverlayMouseDown:!0,onClose:b},n.createElement(f.Ay,{tip:a,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},n.createElement(H.A,{className:"c-wysiwyg_container__button","data-qa":"texty_agent_mention_button",tabIndex:-1,"aria-label":a,size:"small",svgIconProps:eX})))};AgentMentionButton.displayName="AgentMentionButton";let e1=new m.Ay("includes_client"),ComposerButton=({isDisabled:e,isFormattingEnabled:t,onClick:a=i.A,textyRef:r})=>{let l=(0,n.useRef)(null),o=(0,n.useRef)(!1),s=(0,G.d4)(I.kx),d=t??s,m=c()("c-wysiwyg_container__button c-wysiwyg_container__button--composer",{"c-wysiwyg_container__button--composer_active":d}),u=d?e1.t("Hide formatting"):e1.t("Show formatting"),p=n.createElement(H.A,{ref:l,className:m,"aria-disabled":e,onKeyDown:({key:e})=>{["Enter",""].includes(e)&&(o.current=!0)},onClick:()=>{a(l,{focusOnUpdate:o.current}),o.current=!1},onMouseDown:e=>{r.current?.element?.contains(document.activeElement)&&e.preventDefault()},"data-qa":"texty_composer_button",tabIndex:-1,"aria-label":e1.t("Show formatting"),"aria-pressed":d?"true":"false",size:"small"},n.createElement(_.Ah,{name:"formatting",size:"18"}));return n.createElement(f.Ay,{tip:u,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},p)};ComposerButton.displayName="ComposerButton";var e2=a(0xc768aa5c),e4=a.n(e2);let e5=new m.Ay("texty"),e3={elementName:"email_draft_button",onClick:{enableClogAction:!0}},e6=(0,eD.Ar)()?function(e){let t,a,r,i=(0,eF.c)(8),{onEmailDraftButtonClicked:l}=e,o=(0,G.d4)(email_draft_button_temp);i[0]!==l?(t=e=>{e.preventDefault(),l?.()},i[0]=l,i[1]=t):t=i[1];let s=t;i[2]!==o?(a=o?e5.t("Write with AI"):"Write with AI",i[2]=o,i[3]=a):a=i[3];let d=a;if(i[4]!==d||i[5]!==s){let e,t=c()("display_flex","align_items_center","justify_content_flex_start","position_relative");i[7]===Symbol.for("react.memo_cache_sentinel")?(e=n.createElement(_.Ah,{name:"slackbot-color",size:"24"}),i[7]=e):e=i[7],r=n.createElement(x.A,{className:c()(t,e4().emailDraftButton),onClick:s,tabIndex:-1,"aria-label":d,"data-qa":"email_draft_button",autoClogProps:e3},e,d),i[4]=d,i[5]=s,i[6]=r}else r=i[6];return r}:function({onEmailDraftButtonClicked:e}){let t=(0,G.d4)(e=>"on"===(0,eT._Z)(e,"slack_crm_emails")),a=(0,n.useCallback)(t=>{t.preventDefault(),e?.()},[e]),r=t?e5.t("Write with AI"):"Write with AI",i=c()("display_flex","align_items_center","justify_content_flex_start","position_relative");return n.createElement(x.A,{className:c()(i,e4().emailDraftButton),onClick:a,tabIndex:-1,"aria-label":r,"data-qa":"email_draft_button",autoClogProps:e3},n.createElement(_.Ah,{name:"slackbot-color",size:"24"}),r)};function email_draft_button_temp(e){return"on"===(0,eT._Z)(e,"slack_crm_emails")}e6.displayName="EmailDraftButton";var e8=a(0x67607d6d),e7=a(0x21f3c49e8),e9=a(0x22fcfc255),te=a(0x10a716a94),tt=a(0x8a97dfc2),ta=a(0x138fb0cc6),tn=a(0x22809c249),tr=a(0x5e61a73e),ti=a(0x1c91944c9),tl=a(0x17a41206b);let to=new m.Ay("message_input_plus_button"),FileMenuButton=({onFilesSelected:e,onOpen:t,onClose:a,forceOpen:r,renderMenu:i,isOffline:l,keyboardLocale:o})=>{let s=(0,n.useRef)(null),c=(0,n.useCallback)(t=>{!(0,e7.A)(t)&&e&&e(t)},[e]),d=(0,n.useCallback)(e=>i?i(e,s):null,[i]),m=(0,n.useCallback)(()=>{let e=(0,tt.ib)("Cmd",o),t=n.createElement(e9.A,{title:to.t("Attach file"),mainKey:"U",modifier:"Cmd"===e?"\u2318":e});return l?n.createElement(tr.A,{tooltipLabel:t}):t},[o,l]),u=(0,n.useCallback)(()=>{t&&t()},[t]),p=(0,n.useCallback)(()=>{a&&a()},[a]);return n.createElement(te.H,{subtype:"files"},n.createElement(et.cQ,{renderMenu:d,position:"top-right",offsetX:4,offsetY:-6,onOpen:u,onClose:p,forceOpen:r},n.createElement(f.Ay,{tip:m(),position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},n.createElement(H.A,{className:"c-wysiwyg_container__button","aria-label":to.t("Attach file"),tabIndex:-1,"data-qa":"msg_input_file_btn_inset",size:"small"},n.createElement(_.Ah,{name:"attachment",size:"18"})))),n.createElement(tn.A,{ref:s,onFilesSelectedHandler:c}))};function mapStateToProps(e){return{isOffline:!(0,tl.Pb)(e)}}FileMenuButton.displayName="FileMenuButton";let ts=(0,ti.N)(mapStateToProps)(FileMenuButton),tc=(0,ta.A)(ts),td=new m.Ay("includes_client"),MentionButton=({onClick:e=i.A})=>{let t=td.t("Mention someone");return n.createElement(f.Ay,{tip:t,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},n.createElement(H.A,{className:"c-wysiwyg_container__button",onClick:e,"data-qa":"texty_mention_button",tabIndex:-1,"aria-label":t,size:"small"},n.createElement(_.Ah,{name:"mentions",size:"18"})))};MentionButton.displayName="MentionButton";var tm=a(0x2286acf6c),tu=a(0x102edf836),tp=a(0xce378727),th=a(0x126f22530),t_=a(0x181214caa),tf=a(0x6e87d4ec),tb=a(0x1750bcf85),tg=a(0x56dc0269),ty=a.n(tg);let tA=new m.Ay("skills-picker-modal"),SlackbotAiSkillOption=({skill:e,isSelected:t,experimentSkillsUiGroupOn:a,listPosition:r,onSelect:i})=>{let l=e.title||(a?tA.t("Untitled"):"Untitled"),o=(0,n.useCallback)(()=>{i(e.id)},[i,e.id]),s=c()(ty().skillCard,{[ty().skillCardSelected]:t,[ty().inGroupedList]:!!r,[ty().isFirstInList]:"first"===r,[ty().isMiddleInList]:"middle"===r,[ty().isLastInList]:"last"===r,[ty().isSingleInList]:"single"===r});return n.createElement("button",{type:"button",role:"option","aria-selected":t,className:s,onClick:o},n.createElement(tb.Q,null),n.createElement("div",{className:ty().skillTextContent},n.createElement("div",{className:ty().skillTitle},l),n.createElement("div",{className:ty().skillMetadata},e.timestamp&&new Date(1e3*e.timestamp).toLocaleDateString())),t&&n.createElement("div",{className:ty().skillCheckmark},n.createElement(_.Ah,{name:"check",size:"16"})))};SlackbotAiSkillOption.displayName="SlackbotAiSkillOption";var tx=a(0x15cdc75a2),tE=a(0x20e80190e),tC=a(0x12256831),tk=a(0x209e067d1),tv=a(0x1bfb917fe),tS=a(0xe6970e83),tI=a(0x19c76d181),tw=a(0x1fcbb004d),tT=a(0xeb4f1a4d),tN=a(0x1d23c7f2c),tM=a(0x208ff08f6),tR=a(0x16ffed5ab);let tP=new m.Ay("skills-picker-modal"),SkillsPickerModal=({onSkillApplied:e})=>{let t=(0,r.wA)(),a=(0,P.A)(),[i,l]=(0,n.useState)(void 0),[o,s]=(0,n.useState)(""),[c,d]=(0,n.useState)(!1),m=(0,n.useRef)(!1),u=(0,G.d4)(eO.vP),p=(0,G.d4)(tI.WR),h=(0,G.d4)(tN.Ep),{skills:f,isLoading:b}=(0,tx.fj)(),{createSkill:g}=(0,tx.W8)();(0,n.useEffect)(()=>{if(!m.current&&!b){let e=t((0,tM.T)());a.track(O.EventId.SLACKBOTAI_SKILLS_OVERLAY_VIEWED,{contexts:{slackbotai:{slackbotai_skill_id_array:f.map(e=>e.id),...e&&{slackbotai_session_id:e}},ui_context:{action:O.UiAction.IMPRESSION,ui_properties:{skills_shown_count:f.length}}}}),m.current=!0}},[a,t,b,f]);let y=(0,n.useMemo)(()=>{if(!o.trim())return f;let e=o.toLowerCase().trim();return f.filter(t=>(t.name||"").toLowerCase().includes(e))},[f,o]),A=(0,n.useMemo)(()=>i&&f.find(e=>e.id===i)||null,[f,i]),x=(0,n.useMemo)(()=>y.map(e=>({id:e.id,title:e.name,timestamp:e.updatedAt||e.createdAt})),[y]),E=u?tP.t("No skills found"):"No skills found",C=u?tP.t("No skills yet"):"No skills yet",k=u?tP.t("Try a different search term"):"Try a different search term",v=u?tP.t("Create your first skill to get started"):"Create your first skill to get started",S=(0,n.useMemo)(()=>(0,tm.A)((e,n)=>{if(!e.trim())return;let r=e.toLowerCase().trim(),i=(n??[]).filter(e=>(e.name||"").toLowerCase().includes(r)).length,l=t((0,tM.T)());a.track(O.EventId.SLACKBOTAI_SKILLS_SEARCHED,{contexts:{slackbotai:{...l&&{slackbotai_session_id:l}},ui_context:{action:O.UiAction.SEARCH,ui_properties:{tab:"personal",results_count:i}}}})},500),[a,t]);(0,n.useEffect)(()=>()=>{S.cancel()},[S]);let I=(0,n.useCallback)(e=>{s(e),S(e,f)},[S,f]),w=(0,n.useCallback)(e=>{let n=x.findIndex(t=>t.id===e),r=t((0,tM.T)());a.track(O.EventId.SLACKBOTAI_SKILL_SELECTED_FROM_OVERLAY,{contexts:{slackbotai:{slackbotai_skill_id:e,...r&&{slackbotai_session_id:r}},ui_context:{action:O.UiAction.CLICK,ui_properties:{skill_id:e,position_in_list:n}}}}),l(t=>t===e?void 0:e)},[a,t,x]),T=(0,n.useCallback)(async()=>{let e=t((0,tM.T)());a.track(O.EventId.SLACKBOTAI_SKILL_CREATION_STARTED,{contexts:{slackbotai:{...e&&{slackbotai_session_id:e}},ui_context:{action:O.UiAction.CLICK,ui_properties:{creation_method:"manual"}}}}),d(!0),await g({name:"New Skill",content:"",onSuccess:e=>{t((0,tw.O)()),t((0,tv.B)({skillId:e.id,isNewSkill:!0}))},onError:()=>{t((0,tR.M)({element:n.createElement(tf.A,{showCloseButton:!0},u?tP.t("Failed to create skill. Please try again."):"Failed to create skill. Please try again.")}))}}),d(!1)},[g,t,u,a]),N=(0,n.useCallback)(()=>{if(!i||!A)return;let n=A.creatorId===p,r=t((0,tM.T)()),l=h?(0,tC.A)(h):null;a.track(O.EventId.SLACKBOTAI_SKILL_INVOCATION,{contexts:{slackbotai:{slackbotai_skill_id:i,slackbotai_invocation_method:"skills_button_in_input",slackbotai_is_personal_skill:n,slackbotai_is_workspace_skill:!n,...r&&{slackbotai_session_id:r},...l&&{slackbotai_thread_id:l}},ui_context:{action:O.UiAction.CLICK,ui_properties:{skill_id:i,invocation_method:"skills_button_in_input"}}}}),t((0,tT.Kb)({skillId:i}));let o=A.name||"Untitled Skill";e?.(o),t((0,tw.O)())},[t,i,A,e,p,a,h]),M="skills_picker_modal_label_id";return n.createElement(tE.aF,{maxWidth:650,labelledby:M},n.createElement("div",{className:ty().skillsPickerModal},n.createElement(tE.rQ,null,n.createElement("div",{className:ty().header},n.createElement(tE.Rc,{title:u?tP.t("Select a Skill"):"Select a Skill",id:M}))),n.createElement(tE.$m,null,n.createElement("div",{className:ty().content},n.createElement("div",{className:ty().contentInner},n.createElement("div",{className:ty().searchContainer},n.createElement(th.A,{id:"skills-picker-search-input",name:"skills-picker-search",placeholder:u?tP.t("Search skills"):"Search skills",value:o,onChange:I,icon:"search","aria-label":u?tP.t("Search skills"):"Search skills",size:"medium"})),n.createElement("div",{className:ty().skillsList},n.createElement(eW.A,null,({width:e,height:t})=>n.createElement(t_.A,{width:e,height:t},n.createElement("div",{role:"listbox","aria-label":"Skills",className:ty().skillsListInner},0===x.length?n.createElement("div",{className:ty().emptyState},n.createElement("div",{className:ty().emptyStateIcon},n.createElement(_.Ah,{name:"ai-sparkle-alt",size:"24"})),o.trim()?n.createElement(n.Fragment,null,n.createElement("h3",{className:ty().emptyStateTitle},E),n.createElement("p",{className:ty().emptyStateDescription},k)):n.createElement(n.Fragment,null,n.createElement("h3",{className:ty().emptyStateTitle},C),n.createElement("p",{className:ty().emptyStateDescription},v))):x.map((e,t)=>{let a,r=x.length;return a=1===r?"single":0===t?"first":t===r-1?"last":"middle",n.createElement(SlackbotAiSkillOption,{key:e.id,skill:e,isSelected:i===e.id,experimentSkillsUiGroupOn:u,listPosition:a,onSelect:w})})))))))),n.createElement(tE.jl,null,n.createElement(tE.ox,null,n.createElement(tp.A,{size:tu.F0.medium,type:"outline",onClick:T,loading:c,"aria-label":u?tP.t("New Skill"):"New Skill"},u?tP.t("New Skill"):"New Skill"),n.createElement(tE.s_,{type:"outline","aria-label":u?tP.t("Cancel"):"Cancel"},u?tP.t("Cancel"):"Cancel"),n.createElement(tp.A,{type:"primary",onClick:N,disabled:!i,"aria-label":u?tP.t("Apply"):"Apply"},u?tP.t("Apply"):"Apply")))))};SkillsPickerModal.displayName="SkillsPickerModal";let tL=(0,tS.A)(SkillsPickerModal,{renderInChildWindow:!(0,tk.A)()}),tO=new m.Ay("skills-button"),tD={name:"ai-sparkle-alt",size:"18"},tF=(0,eD.Ar)()?e=>{let t,a,i,l=(0,eF.c)(9),{channelId:o,threadTs:s}=e,c=(0,r.wA)(),d=(0,P.A)(),m=(0,G.d4)(eO.vP);l[0]!==o||l[1]!==d||l[2]!==c||l[3]!==s?(t=()=>{let e=c((0,tM.T)());d.track(O.EventId.SLACKBOTAI_SKILLS_BUTTON_CLICKED,{contexts:{slackbotai:{...e&&{slackbotai_session_id:e}},ui_context:{action:O.UiAction.CLICK,ui_properties:{location:"slackbot_dm"}}}}),c(tL({channelId:o,threadTs:s}))},l[0]=o,l[1]=d,l[2]=c,l[3]=s,l[4]=t):t=l[4];let u=t;if(!m)return null;l[5]===Symbol.for("react.memo_cache_sentinel")?(a=tO.t("Skills"),l[5]=a):a=l[5];let p=a;if(l[6]!==u){let e;l[8]===Symbol.for("react.memo_cache_sentinel")?(e={tip:p,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},l[8]=e):e=l[8],i=n.createElement(f.Ay,e,n.createElement(H.A,{className:"c-wysiwyg_container__button","data-qa":"texty_skills_button",tabIndex:-1,"aria-label":p,size:"small",onClick:u,svgIconProps:tD})),l[6]=u,l[7]=i}else i=l[7];return i}:({channelId:e,threadTs:t})=>{let a=(0,r.wA)(),i=(0,P.A)(),l=(0,G.d4)(eO.vP),o=(0,n.useCallback)(()=>{let n=a((0,tM.T)());i.track(O.EventId.SLACKBOTAI_SKILLS_BUTTON_CLICKED,{contexts:{slackbotai:{...n&&{slackbotai_session_id:n}},ui_context:{action:O.UiAction.CLICK,ui_properties:{location:"slackbot_dm"}}}}),a(tL({channelId:e,threadTs:t}))},[a,e,t,i]);if(!l)return null;let s=tO.t("Skills");return n.createElement(f.Ay,{tip:s,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},n.createElement(H.A,{className:"c-wysiwyg_container__button","data-qa":"texty_skills_button",tabIndex:-1,"aria-label":s,size:"small",onClick:o,svgIconProps:tD}))};tF.displayName="SkillsButton";var tU=a(0x40c0d834),tB=a(0xb90de824),tH=a(0x13953efe6),tW=a(0x10bb8e96f),tV=a(0x22f6a086f);let tG=new m.Ay("slash-commands"),tq={eventId:O.EventId.WORKFLOW_EDUCATION,uiComponentName:O.UiComponentName.SLASH_COMMANDS_AUTOCOMPLETE_MENU,elementName:"slash_commands_education_coachmark"},SlashCommandsShortcutsEducationCoachmark=({onClose:e,onPrimaryAction:t,onSecondaryAction:a,UNSAFE_parentSelector:r})=>{let i=n.createElement(tB.Ay,{arrowPosition:10,offsetX:-25,offsetY:-10,alignActionsRight:!0,closeCoachmark:e,primaryCallToActionText:tG.t("Done"),onClickPrimaryButton:t,onClickSecondaryButton:a,isOpen:!0,width:400,title:tG.t("Run shortcuts"),bodyText:tG.t("Run any workflow or shortcut by typing / followed by the name of the shortcut"),UNSAFE_parentSelector:r,autoClogProps:tq});return n.createElement(tH.Ay,{coachmarkElement:i,orientation:"top"})};SlashCommandsShortcutsEducationCoachmark.displayName="SlashCommandsShortcutsEducationCoachmark";let tj=(0,eD.Ar)()?e=>{let t,a,i,l,o=(0,eF.c)(11),s=(0,r.wA)(),c=(0,G.d4)(tV.VT);o[0]!==s?(t=e=>{e?.stopPropagation(),s((0,tW.uC)({tourId:null}))},o[0]=s,o[1]=t):t=o[1];let d=t;o[2]!==s?(a=e=>{e?.stopPropagation(),s((0,tW.uC)({tourId:null}))},o[2]=s,o[3]=a):a=o[3];let m=a;o[4]!==s?(i=()=>{s((0,tW.uC)({tourId:"platform-coachmark-tour"}))},o[4]=s,o[5]=i):i=o[5];let u=i;return c&&e.isMessagePaneView?(o[6]!==d||o[7]!==m||o[8]!==e||o[9]!==u?(l=n.createElement(SlashCommandsShortcutsEducationCoachmark,{onClose:d,onPrimaryAction:m,onSecondaryAction:u,...e}),o[6]=d,o[7]=m,o[8]=e,o[9]=u,o[10]=l):l=o[10],l):null}:e=>{let t=(0,r.wA)(),a=(0,G.d4)(tV.VT),i=(0,n.useCallback)(e=>{e?.stopPropagation(),t((0,tW.uC)({tourId:null}))},[t]),l=(0,n.useCallback)(e=>{e?.stopPropagation(),t((0,tW.uC)({tourId:null}))},[t]),o=(0,n.useCallback)(()=>{t((0,tW.uC)({tourId:"platform-coachmark-tour"}))},[t]);return a&&e.isMessagePaneView?n.createElement(SlashCommandsShortcutsEducationCoachmark,{onClose:i,onPrimaryAction:l,onSecondaryAction:o,...e}):null};tj.displayName="ConnectedSlashCommandsShortcutsEducationCoachmark";var tK=a(0x1aa23d71);let t$=new m.Ay("slash_commands"),tY=(0,eD.Ar)()?e=>{let t,a,r,l,o,s=(0,eF.c)(23),{onClick:d,isDisabled:m,isMessagePaneView:u,channelId:p}=e,h=void 0===d?i.A:d,b=(0,P.A)();s[0]!==p?(t=e=>(0,tK.lw)(e,p),s[0]=p,s[1]=t):t=s[1];let g=(0,G.d4)(t);s[2]===Symbol.for("react.memo_cache_sentinel")?(a=t$.t("Run shortcut"),s[2]=a):a=s[2];let y=a;s[3]!==m?(r=c()("c-wysiwyg_container__button","c-wysiwyg_container__button--workflows",{"c-wysiwyg_container__button--disabled":m}),s[3]=m,s[4]=r):r=s[4];let A=r;s[5]!==b||s[6]!==g||s[7]!==h?(l=()=>{b.track(O.EventId.SLASH_COMMANDS_AUTOCOMPLETE,{is_slackbot_conversation:g,contexts:{ui_context:{action:O.UiAction.CLICK,ui_component:O.UiComponentName.SLASH_COMMANDS_AUTOCOMPLETE_MENU_COMPOSER_BUTTON,ui_properties:{element_name:"slash_commands_autocomplete_menu_composer_button"}}}}),h()},s[5]=b,s[6]=g,s[7]=h,s[8]=l):l=s[8];let x=l;if(s[9]!==A||s[10]!==m||s[11]!==u||s[12]!==x){let e,t,a;if(s[14]===Symbol.for("react.memo_cache_sentinel")?(e={eventId:O.EventId.SLASH_COMMANDS_AUTOCOMPLETE,uiComponentName:O.UiComponentName.SLASH_COMMANDS_AUTOCOMPLETE_MENU_COMPOSER_BUTTON},s[14]=e):e=s[14],s[15]!==u?(t=n.createElement(tj,{isMessagePaneView:u}),s[15]=u,s[16]=t):t=s[16],s[17]!==A||s[18]!==m||s[19]!==x){let e,t;s[21]===Symbol.for("react.memo_cache_sentinel")?(e={tip:y,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},s[21]=e):e=s[21],s[22]===Symbol.for("react.memo_cache_sentinel")?(t=n.createElement(_.Ah,{name:"slash-box",size:"18"}),s[22]=t):t=s[22],a=n.createElement(f.Ay,e,n.createElement(H.A,{className:A,onClick:x,"data-qa":"slash_commands_composer_button","aria-disabled":m,tabIndex:-1,"aria-label":y,size:"small"},t)),s[17]=A,s[18]=m,s[19]=x,s[20]=a}else a=s[20];o=n.createElement(tU.A,e,t,a),s[9]=A,s[10]=m,s[11]=u,s[12]=x,s[13]=o}else o=s[13];return o}:({onClick:e=i.A,isDisabled:t,isMessagePaneView:a,channelId:r})=>{let l=(0,P.A)(),o=(0,G.d4)(e=>(0,tK.lw)(e,r)),s=t$.t("Run shortcut"),d=c()("c-wysiwyg_container__button","c-wysiwyg_container__button--workflows",{"c-wysiwyg_container__button--disabled":t}),m=(0,n.useCallback)(()=>{l.track(O.EventId.SLASH_COMMANDS_AUTOCOMPLETE,{is_slackbot_conversation:o,contexts:{ui_context:{action:O.UiAction.CLICK,ui_component:O.UiComponentName.SLASH_COMMANDS_AUTOCOMPLETE_MENU_COMPOSER_BUTTON,ui_properties:{element_name:"slash_commands_autocomplete_menu_composer_button"}}}}),e()},[l,o,e]);return n.createElement(tU.A,{eventId:O.EventId.SLASH_COMMANDS_AUTOCOMPLETE,uiComponentName:O.UiComponentName.SLASH_COMMANDS_AUTOCOMPLETE_MENU_COMPOSER_BUTTON},n.createElement(tj,{isMessagePaneView:a}),n.createElement(f.Ay,{tip:s,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},n.createElement(H.A,{className:d,onClick:m,"data-qa":"slash_commands_composer_button","aria-disabled":t,tabIndex:-1,"aria-label":s,size:"small"},n.createElement(_.Ah,{name:"slash-box",size:"18"}))))};tY.displayName="SlashCommandsButton";let tQ=new m.Ay("msg_input"),SubmitButton=({disabled:e,onSubmit:t=i.A,customText:a})=>{let r=c()("c-wysiwyg_container__button c-wysiwyg_container__button--submit",{"c-wysiwyg_container__button--disabled":e}),l=a??tQ.t("Send comment");return n.createElement(f.Ay,{position:"top-right",tip:l},n.createElement(H.A,{tabIndex:e?-1:0,className:r,"aria-disabled":e,onClick:t,"data-qa":"submit-button","aria-label":l,size:"small"},n.createElement(_.Ah,{name:"send-filled",size:"16"})))};SubmitButton.displayName="SubmitButton";var tZ=a(0xd6ba6894),tJ=a(0x224f7f0e9);let tX=new m.Ay("texty_buttons_overflow"),TextyButtonOverflow=({containerOffsetWidth:e,textyHasFocus:t,children:a})=>{let r=(0,G.d4)(e=>"on"===(0,eT._Z)(e,"hermes_next")),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(null),d=n.Children.count(a),m=n.Children.toArray(a).length>0,u=(0,n.useMemo)(()=>d>5?220+(d-5)*36:220,[d]),p=c()({"c-texty_buttons--overflow":i}),h=c()("c-wysiwyg_container__button"),_=tX.t("More options"),b=c()({display_none:i}),g=(0,n.useCallback)(()=>{l(!1)},[]),y=(0,n.useCallback)(({keyCode:e})=>{e===tJ._f&&(g(),o?.current&&s?.current?.contains(tZ.J.document.activeElement)&&o?.current?.focus())},[g]),A=(0,n.useCallback)(()=>{l(e=>!e)},[]),x=(0,n.useCallback)(e=>{if(e.keyCode!==tJ.wn)return;let t=tZ.J.document.querySelector(".c-wysiwyg_container__footer");t&&!t.contains(e.target)&&g()},[g]),E=(0,n.useCallback)(e=>{let t=e.target;if(!(t instanceof HTMLElement))return;let a=!s.current?.contains(t),n=o.current?.contains(t),r=!!t.closest(".c-popover__content");n||!r&&a&&g()},[g]);return((0,n.useEffect)(()=>{if(i)return t&&g(),tZ.J.document.addEventListener("keydown",x),tZ.J.document.addEventListener("mousedown",E),()=>{tZ.J.document.removeEventListener("keydown",x),tZ.J.document.removeEventListener("mousedown",E)}},[t,x,E,g,i]),(0,n.useEffect)(()=>{i&&s?.current&&s.current.querySelectorAll("button").forEach(e=>{e.setAttribute("role","menuitem")})},[s,i]),!m||d<5)?a:e&&e<u?n.createElement("div",{className:"c-texty_buttons__overflow_container"},n.createElement(f.Ay,{tipClassName:b,tip:_,position:"top",offsetY:-7,delay:500,zIndex:"above_fs"},n.createElement(H.A,{ref:o,className:h,onClick:A,"data-qa":"slash_commands_overflow_button",tabIndex:-1,"aria-label":_,size:"small","aria-haspopup":"menu",svgIconProps:{name:"ellipsis-horizontal-filled",size:"18"}})),i&&n.createElement("div",{ref:s,role:"menu","aria-label":r?tX.t("Composer actions overflow menu"):"",tabIndex:-1,className:p,onKeyDown:y},a)):a};TextyButtonOverflow.displayName="TextyButtonOverflow";var t0=a(0x50ff7328),t1=a(0x74bbb29a);let t2={spaceName:Z.xu.IN_PRODUCT_COACHMARK,notifications:{[Z.ze.CLIPS_REPACKAGING_COACHMARK]:{component:n.lazy(()=>Promise.resolve().then(a.bind(a,0xdc714864)))}}},TextyButtons=({enableDividerForShortcutsButton:e=!1,enableEmojiButton:t=!1,enableGifPicker:a=!1,enableMentionButton:s=!1,enableAgentMentionButton:c=!1,enableComposerButton:d=!1,isFormattingEnabled:m,enableSendButton:u=!1,enableFileButton:p=!1,enableStoryButton:h=!1,enableAudioButton:_=!1,enableScheduleSendButton:f=!1,enableClipsRepackagingCoachmark:b=!1,enableSubmitButton:g=!1,enableSkillsButton:y=!1,enableEmailDraftButton:A=!1,enableDictationButton:x=!1,onTranscriptionComplete:E,onEmailDraftButtonClicked:C,submitButtonText:k,onSubmitButtonSubmit:v,isComposerDisabled:S=!1,isSubmitButtonDisabled:I=!1,enableEmojiButtonBadge:w=!1,enableSlashCommandsButton:T=!1,onGifSelected:N=i.A,onComposerClick:M,onFilesSelected:R,onFileMenuOpen:P,onFileMenuClose:L,forceFileMenuOpen:O=!1,renderFileMenu:D,textyRef:F,showProgressiveDisclosureAtMentionFlag:U=!1,draftId:H,viewContext:W,windowId:V,channelId:q,threadTs:j,isFeedbackFlexpaneComposer:z,isTextyInputEmpty:K=!1,textyHasFocus:Z,showDefaultChannelEmojiCoachmark:J=!1,showDefaultChannelClipsCoachmark:et=!1,showWorkflowOptionItemMentionTip:en=!1,isMinDraftLengthForComposerAi:er=!1})=>{let ei,el=(0,r.wA)(),eo=(0,G.d4)(t0.A),es=(0,G.d4)(o.ET),ec=(0,G.d4)(ea.KC),ed=(0,G.d4)(eO.vP),em=(0,n.useRef)(null),[eu,ep]=(0,n.useState)(null),eh=(0,n.useCallback)(()=>{el((0,tK.K1)())},[el]),ef=(0,n.useCallback)(()=>{F?.current?.maybeTriggerMentionAutocomplete(),el((0,tK.Aw)({channelId:q}))},[el,F,q]),eb=(0,n.useCallback)(()=>{F?.current?.maybeTriggerSlashCommandsAutocomplete()},[F]),eg=p&&n.createElement(tc,{onFilesSelected:R,onOpen:P,onClose:L,forceOpen:O,renderMenu:D}),ey=t?n.createElement(e8.A,{textyRef:F,enableMentionButton:s,enableGifPicker:a,onEmojiMenuTriggerClick:eh,enableEmojiButtonBadge:w,draftId:H,onGifSelected:N,viewContext:W,windowId:V,threadTs:j}):null;J&&(ey=n.createElement(Y.A,Q.Oh,ey)),s&&(ei=n.createElement(MentionButton,{onClick:ef}),U&&(ei=n.createElement(ee.Ay,{tip:t1.ml.AtMention,onClick:ef})),en&&(ei=n.createElement(Y.A,{...X,onClick:ef})));let eA=c&&n.createElement(AgentMentionButton,{onClick:ef,textyRef:F}),ex=d&&n.createElement(ComposerButton,{isDisabled:S,isFormattingEnabled:m,onClick:M,textyRef:F}),eE=T&&n.createElement(tY,{onClick:eb,isDisabled:!K,isMessagePaneView:W===e_.Y.MESSAGE_PANE,channelId:q}),eC=h&&n.createElement($,{draftId:H||"",enableClipsCoachmarkHighlight:b,textyRef:F}),ek=_&&n.createElement(B,{draftId:H||"",enableScheduleSendButton:f,enableClipsCoachmarkHighlight:b,textyRef:F}),ev=g&&n.createElement(SubmitButton,{onSubmit:v,disabled:I,customText:k}),eS=n.createElement("span",{className:"c-wysiwyg_container__footer_divider"}),getClipsButtons=()=>{let e=n.createElement(n.Fragment,null,eC,ek);return b?n.createElement(Y.A,{...t2,shouldAlwaysRenderChildren:!0,isOpen:b},e):et?n.createElement(Y.A,Q.eD,e):e};getClipsButtons.displayName="getClipsButtons";let eI=(eC||ek)&&!eo,ew=!!(eu&&eu<160),eT=!es||e&&!eI||T||g,eN=!!eu&&eu<400;return((0,n.useLayoutEffect)(()=>{let handleContainerResize=()=>{em?.current&&ep(em.current?.offsetWidth)};handleContainerResize();let e=null,t=(0,l.A)(handleContainerResize);return em?.current&&(t.observe(em.current),e=em.current),()=>{e&&t.unobserve(e)}},[em]),d||s||c||t||p||h||_||u||f||T||g||y||A||x)?n.createElement("div",{ref:em,className:"c-texty_buttons"},ex,ey,!ew&&ei,n.createElement(TextyButtonOverflow,{textyHasFocus:Z,containerOffsetWidth:eu},ew&&ei,eA,eI&&n.createElement(n.Fragment,null,eS,getClipsButtons(),eT&&eS),e&&!eI&&eS,T&&eE,z&&eg,ec&&q&&n.createElement(n.Fragment,null,eS,n.createElement(AiComposerRefinementButton,{channelId:q,threadTs:j,viewContext:W,isMinDraftLengthForComposerAi:er,shouldShowCompactButton:eN})),y&&ed&&q&&n.createElement(n.Fragment,null,!(e&&!eI)&&eS,n.createElement(tF,{channelId:q,threadTs:j})),x&&E&&n.createElement(n.Fragment,null,!(y&&ed&&q)&&eS,n.createElement(eL,{onTranscriptionComplete:E})),A&&C&&n.createElement(n.Fragment,null,eS,n.createElement(e6,{onEmailDraftButtonClicked:C})),g&&ev)):null};TextyButtons.displayName="TextyButtons";let t4=TextyButtons},0x159c8cd93:(e,t,a)=>{"use strict";a.d(t,{A:()=>TextyClass});var n=a(0xd925f8ca),r=a(0x3e6dd1df),i=a(0x13c4df715),l=a(0x41b5bf1),o=a(0x2adeea74),s=a(0x778369d5),c=a(0x1fde915f3),d=a(0x72c7aa2d),m=a(0xe83be35f),u=a(0x243985139),p=a(0xe48c5ed1),h=a(0x81d64d8c),_=a(0xa2e0ef91),f=a(0x1d62f3e69),b=a(0xc526e002),g=a(0x1feb5b316),y=a(0x992a1f63),A=a(0x16a4ac024),x=a(0x21a39214),E=a(0x1f28aba72),C=a(0x93c88edd),k=a(0xb562d18d),v=a(0x1117ab7e4),S=a(0x130405be8),I=a(0x1c94e1914),w=a(0xadfc1247),T=a(0x215b853f5),N=a(0x283863ba),M=a(0x66ac0b5a),R=a(0xd3a4af01),P=a(0x196f86498),L=a(0xfd55fa83),O=a(0x218d4970c);let D=new WeakMap;function initQuill(e){let t=(0,r.A)(e);if(D.get(t))return t;t.register({"modules/tabcomplete":(0,M.A)(e),"modules/textsubstitutions":(0,L.A)(e),"modules/cleanembedsincode":(0,y.A)(e),"modules/cleanemptyinput":(0,A.A)(e),"modules/clipboard":(0,E.Ay)(e),"modules/keyboard":(0,S.A)(e),"modules/slackmention":(0,T.A)(e),"modules/slackslug":(0,N.A)(e),"modules/slackemoji":(0,k.A)(e),"modules/textchangequeue":(0,R.A)(e),"modules/textsanitization":(0,P.A)(e),"modules/autoslug":(0,b.A)(e),"modules/slacklink":(0,I.A)(e),"modules/slackmarkdown":(0,w.A)(e),"modules/slackhorizontalrule":(0,v.A)(e),"modules/workflowtoken":(0,O.A)(e),"modules/cleanworkflowtokens":(0,x.Ay)(e),"modules/slackdocslist":(0,C.A)(e),"modules/canvasvariable":(0,g.A)(e),"formats/slacksearchtokenmodifier":(0,u.A)(e),"formats/slacksearchtokenvalue":(0,p.A)(e),"formats/slackmention":(0,m.A)(e),"formats/slackslug":(0,h.A)(e),"formats/slackemoji":(0,c.A)(e),"formats/unlink":(0,o.A)(e),"formats/slackhorizontalrule":(0,d.A)(e),"formats/workflowtoken":(0,f.Gs)(e),"formats/strike":(0,_.A)(e),"formats/border":(0,s.Ay)(e),"formats/canvasvariable":(0,i.Ay)(e)},!0);let{CodeBlock:a}=(0,l.Ay)(e),n=t.import("blots/inline"),F=t.import("formats/bold"),U=t.import("formats/italic"),B=t.import("formats/underline"),H=t.import("formats/strike"),W=t.import("formats/code"),V=t.import("formats/link"),G=t.import("formats/unlink"),q=t.import("formats/slackemoji"),j=t.import("formats/slackmention"),z=t.import("formats/slackslug"),K=t.import("formats/workflowtoken");return a.allowedChildren.push(n),a.allowedChildren.push(F),a.allowedChildren.push(U),a.allowedChildren.push(B),a.allowedChildren.push(H),a.allowedChildren.push(W),a.allowedChildren.push(V),a.allowedChildren.push(G),a.allowedChildren.push(q),a.allowedChildren.push(j),a.allowedChildren.push(z),a.allowedChildren.push(K),t.register({"formats/code":a},!0),D.set(t,!0),t}let TextyClass=class TextyClass extends n.A{constructor(e,t){super(e,t,initQuill)}}},0x2c5a5afa:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x1cbdfeceb),o=a(0x6258badf),s=a(0x1e58a28f4);a(0x1345eeff9),a(0x62a5c3a9),a(0x1867a7f28);let c=a(0x81be5f45).A;var d=a(0x10bd0ba09),m=a(0x4dc18535),u=a(0x1c91944c9);let p=(0,n.Ar)()?function(e){let t,a,n,m=(0,r.c)(47),{channelId:u,threadTs:p,completeOnMembers:h,completeOnChannels:_,completeOnEmoji:f,completeOnSlackFiles:b,completeOnCommands:g,completeOnAiSuggestions:y,customCompleters:A,position:x,fixedPosition:E,containerCustomBoundsFn:C,onOpen:k,onClose:v,onTextyInputMount:S,autocompleteClassName:I,zIndex:w,forceChannelTaggingDisabled:T,forcePlainTextModeDisabled:N,includeAllBroadcastKeywords:M,excludeBroadcastKeywordMembers:R,excludeUserGroupMembers:P,refToForward:L,searchViewContext:O,canvasAiContext:D,isMultiverseQuillEnabled:F,useExpandedRichText:U,viewContext:B,windowId:H,isWorkflowQuestionOption:W,overlayClassName:V,forceAnchorToContainer:G,autocompleteOffsetX:q,autocompleteOffsetY:j,shouldCloseOnResize:z,autocompleteConfigRef:K,skipAriaExpanded:$,skipSearchFilterMentions:Y,onFeedbackClick:Q,excludePrivateChannelAutocomplete:Z,privateChannelTeamIds:J}=e,X=void 0!==h&&h,ee=void 0!==_&&_,et=void 0!==f&&f,ea=void 0!==b&&b,en=void 0!==g&&g,er=void 0!==y&&y,ei=void 0===x?"top":x,el=void 0!==E&&E,eo=void 0===k?l.A:k,es=void 0===v?l.A:v,ec=void 0===S?l.A:S,ed=void 0===w?"menu":w,em=void 0!==T&&T,eu=void 0!==N&&N,ep=void 0!==M&&M,eh=void 0!==R&&R,e_=void 0!==P&&P,ef=void 0!==F&&F,eb=void 0!==U&&U;m[0]!==e?(t=(0,o.A)(e,["completeOnMembers","completeOnChannels","completeOnEmoji","completeOnSlackFiles","completeOnCommands","customCompleters","position","fixedPosition","containerCustomBoundsFn","onOpen","onClose","onTextyInputMount","autocompleteClassName","zIndex","searchViewContext","canvasAiContext","autocompleteConfig","overlayClassName","excludeBroadcastKeywordMembers","excludeUserGroupMembers","forceAnchorToContainer","autocompleteOffsetX","autocompleteOffsetY","shouldCloseOnResize","autocompleteConfigRef","onFeedbackClick"]),m[0]=e,m[1]=t):t=m[1];let eg=t;m[2]!==ef||m[3]!==ec||m[4]!==L||m[5]!==eg||m[6]!==eb?(a=e=>{let{autocompleteConfig:t,isOpen:a}=e,n=ef?d.A:s.Ay;return i.createElement(n,{autocompleteConfig:t,isAutocompleteOpen:a,onMount:ec,useExpandedRichText:eb,ref:L,...eg})},m[2]=ef,m[3]=ec,m[4]=L,m[5]=eg,m[6]=eb,m[7]=a):a=m[7];let ey=a;return m[8]!==I||m[9]!==K||m[10]!==q||m[11]!==j||m[12]!==D||m[13]!==u||m[14]!==er||m[15]!==ee||m[16]!==en||m[17]!==et||m[18]!==X||m[19]!==ea||m[20]!==C||m[21]!==A||m[22]!==eh||m[23]!==Z||m[24]!==e_||m[25]!==el||m[26]!==G||m[27]!==em||m[28]!==eu||m[29]!==ep||m[30]!==W||m[31]!==es||m[32]!==Q||m[33]!==eo||m[34]!==V||m[35]!==ei||m[36]!==J||m[37]!==ey||m[38]!==O||m[39]!==z||m[40]!==$||m[41]!==Y||m[42]!==p||m[43]!==B||m[44]!==H||m[45]!==ed?(n=i.createElement(c,{className:I,channelId:u,threadTs:p,completeOnMembers:X,completeOnChannels:ee,completeOnEmoji:et,completeOnSlackFiles:ea,completeOnCommands:en,completeOnAiSuggestions:er,customCompleters:A,position:ei,fixedPosition:el,containerCustomBoundsFn:C,onOpen:eo,onClose:es,zIndex:ed,forceChannelTaggingDisabled:em,forcePlainTextModeDisabled:eu,includeAllBroadcastKeywords:ep,excludeBroadcastKeywordMembers:eh,excludeUserGroupMembers:e_,renderInput:ey,searchViewContext:O,canvasAiContext:D,viewContext:B,windowId:H,isWorkflowQuestionOption:W,overlayClassName:V,forceAnchorToContainer:G,autocompleteOffsetX:q,autocompleteOffsetY:j,shouldCloseOnResize:z,autocompleteConfig:K,skipAriaExpanded:$,skipSearchFilterMentions:Y,onFeedbackClick:Q,excludePrivateChannelAutocomplete:Z,privateChannelTeamIds:J}),m[8]=I,m[9]=K,m[10]=q,m[11]=j,m[12]=D,m[13]=u,m[14]=er,m[15]=ee,m[16]=en,m[17]=et,m[18]=X,m[19]=ea,m[20]=C,m[21]=A,m[22]=eh,m[23]=Z,m[24]=e_,m[25]=el,m[26]=G,m[27]=em,m[28]=eu,m[29]=ep,m[30]=W,m[31]=es,m[32]=Q,m[33]=eo,m[34]=V,m[35]=ei,m[36]=J,m[37]=ey,m[38]=O,m[39]=z,m[40]=$,m[41]=Y,m[42]=p,m[43]=B,m[44]=H,m[45]=ed,m[46]=n):n=m[46],n}:function(e){let{channelId:t,threadTs:a,completeOnMembers:n=!1,completeOnChannels:r=!1,completeOnEmoji:m=!1,completeOnSlackFiles:u=!1,completeOnCommands:p=!1,completeOnAiSuggestions:h=!1,customCompleters:_,position:f="top",fixedPosition:b=!1,containerCustomBoundsFn:g,onOpen:y=l.A,onClose:A=l.A,onTextyInputMount:x=l.A,autocompleteClassName:E,zIndex:C="menu",forceChannelTaggingDisabled:k=!1,forcePlainTextModeDisabled:v=!1,includeAllBroadcastKeywords:S=!1,excludeBroadcastKeywordMembers:I=!1,excludeUserGroupMembers:w=!1,refToForward:T,searchViewContext:N,canvasAiContext:M,isMultiverseQuillEnabled:R=!1,useExpandedRichText:P=!1,viewContext:L,windowId:O,isWorkflowQuestionOption:D,overlayClassName:F,forceAnchorToContainer:U,autocompleteOffsetX:B,autocompleteOffsetY:H,shouldCloseOnResize:W,autocompleteConfigRef:V,skipAriaExpanded:G,skipSearchFilterMentions:q,onFeedbackClick:j,excludePrivateChannelAutocomplete:z,privateChannelTeamIds:K}=e,$=(0,o.A)(e,["completeOnMembers","completeOnChannels","completeOnEmoji","completeOnSlackFiles","completeOnCommands","customCompleters","position","fixedPosition","containerCustomBoundsFn","onOpen","onClose","onTextyInputMount","autocompleteClassName","zIndex","searchViewContext","canvasAiContext","autocompleteConfig","overlayClassName","excludeBroadcastKeywordMembers","excludeUserGroupMembers","forceAnchorToContainer","autocompleteOffsetX","autocompleteOffsetY","shouldCloseOnResize","autocompleteConfigRef","onFeedbackClick"]),Y=(0,i.useCallback)(({autocompleteConfig:e,isOpen:t})=>{let a=R?d.A:s.Ay;return i.createElement(a,{autocompleteConfig:e,isAutocompleteOpen:t,onMount:x,useExpandedRichText:P,ref:T,...$})},[R,x,P,T,$]);return i.createElement(c,{className:E,channelId:t,threadTs:a,completeOnMembers:n,completeOnChannels:r,completeOnEmoji:m,completeOnSlackFiles:u,completeOnCommands:p,completeOnAiSuggestions:h,customCompleters:_,position:f,fixedPosition:b,containerCustomBoundsFn:g,onOpen:y,onClose:A,zIndex:C,forceChannelTaggingDisabled:k,forcePlainTextModeDisabled:v,includeAllBroadcastKeywords:S,excludeBroadcastKeywordMembers:I,excludeUserGroupMembers:w,renderInput:Y,searchViewContext:N,canvasAiContext:M,viewContext:L,windowId:O,isWorkflowQuestionOption:D,overlayClassName:F,forceAnchorToContainer:U,autocompleteOffsetX:B,autocompleteOffsetY:H,shouldCloseOnResize:W,autocompleteConfig:V,skipAriaExpanded:G,skipSearchFilterMentions:q,onFeedbackClick:j,excludePrivateChannelAutocomplete:z,privateChannelTeamIds:K})};p.displayName="TextyInputWithAutocomplete";let h=(0,u.N)(e=>({isMultiverseQuillEnabled:(0,m.h)(e)}))(p),_=i.forwardRef((e,t)=>i.createElement(h,{...e,refToForward:t}))},0x1376b128:(e,t,a)=>{"use strict";a.d(t,{A:()=>t3});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x33644bb7),s=a(0x20bafd237),c=a(0x21f3c49e8),d=a(0xb77a689a),m=a(0xdf8554bd),u=a(0x9e671ad),p=a(0x18f2150ea),h=a(0x118cdcdea),_=a.n(h),f=a(0x22ba45688),b=a(0xd6ba6894),g=a(0xe874a88a),y=a(0xb97b797e),A=a(0x20b4dda68),x=a(0x181d663bb),E=a(0x3bc7bbd5),C=a(0x20482ad21),k=a(0x1fc4d7d9f),v=a(0x12edaa96a),S=a(0x14abc22b0),I=a(0x4c96e5d9),w=a(0x162b19a86),T=a(0x386198c9),N=a(0xe28ad2a3),M=a(0x7b9828a4),R=a(0x1c4ea1f36),P=a(0xd925f8ca),L=a(0x3e6dd1df),O=a(0x13c4df715),D=a(0x2adeea74),F=a(0x778369d5),U=a(0x1fde915f3),B=a(0x72c7aa2d),H=a(0xe83be35f),W=a(0x2501a2cee),V=a(0x16dc93e4b),G=a(0x16ed1b0dc),q=a(0x108fb4e96),j=a(0x1454650c2),z=a(0x4f725d55);function getSearchFilterIconName({modifier:e,entityId:t,isPrivate:a}){switch(e.startsWith("-")?e.slice(1):e){case q.Wp.AFTER:case q.Wp.BEFORE:case q.Wp.DURING:case q.Wp.ON:return"calendar";case q.Wp.IN:if((0,z.A)(t))return"user";return a?"lock-filled":"channel";case q.Wp.HASMY:return"reaction";case q.Wp.HAS:return j.T[t]||"reaction";case q.Wp.TYPE:return j.T[t]||"document";case q.Wp.IS:return j.T[t]||"comment";case q.Wp.THREADS:return j.T[t]||"threads";default:return"user"}}var K=a(0x1266f1359),$=a(0x1e4ae349d),Y=a(0x3384beeb);let Q=new C.Ay("texty");function getEncodedIconUrl(e){let t=(0,W.ND)(e)?(0,W.r8)({name:e,inline:!0}):"";if(t)return`url(data:image/svg+xml,${encodeURIComponent(t)})`}function maybeEncodeAndSetIcon(e,t){if(!t)return;let a=getEncodedIconUrl(t);if(!a)return;let n=getEncodedIconUrl("close")??"";e.setAttribute("style",`--search-filter-icon: ${a}; --search-filter-close-icon: ${n}`)}function maybeRenderEmojiFilter(e){let t=e.getAttribute("data-filter-modifier")||"";if(![q.wd.HAS,q.wd.NOT_HAS,q.wd.HASMY,q.wd.NOT_HASMY].includes(t))return;let a=e.querySelector("strong");if(!a||e.classList.contains("c-member_slug--search-filter-emoji"))return;let n=a.textContent||"";if(!(n.startsWith(":")&&n.endsWith(":")))return;let r=e.closest(".ql-editor"),i=r?.getAttribute("data-team-id");if(!i)return;let l=(0,K.$D)(i),o=(0,$.Ez)(l,{text:n,teamId:i,emojiMode:(0,V.w)(l,{forceDisplay:!0}),emojiSize:Y.lw.LARGE});o&&(e.style.setProperty("--search-filter-emoji-url",`url('${o}')`),e.classList.add("c-member_slug--search-filter-emoji"),e.setAttribute("data-emoji-shortcode",n),a.textContent="\uFFFC")}function getSlackSearchFilterFormat(e){let t=(0,L.A)(e),a=t.import("blots/inline"),n=new WeakSet,r=new WeakSet;function markEditorDeltaDirty(e){let{editor:t}=e;if(!t||(r.add(t),n.has(t)))return;n.add(t);let a=t.update.bind(t);t.update=(...e)=>{let n=a(...e);return r.has(t)&&(r.delete(t),t.delta=t.getDelta()),n}}let l=class extends a{static blotName;static tagName;static create(e){let a=super.create(e);a.setAttribute("data-label",e.label),a.setAttribute("spellcheck","false"),e.modifier&&a.setAttribute("data-filter-modifier",e.modifier),e.entityId&&a.setAttribute("data-filter-value",e.entityId),void 0!==e.isPrivate&&a.setAttribute("data-filter-private",String(e.isPrivate));let n=i()("c-member_slug","c-member_slug--link","ts_tip_texty","c-member_slug--search-filter",{"c-member_slug--mention":e.mention});return a.setAttribute("class",n),a.setAttribute("dir","ltr"),e.entityId&&(0,G.A)(e.entityId)&&a.setAttribute("aria-label",`${e.label} ${Q.t("Channel")}`),e.entityId&&e.modifier&&maybeEncodeAndSetIcon(a,getSearchFilterIconName({modifier:e.modifier,entityId:e.entityId,isPrivate:e.isPrivate??!1})),a.addEventListener("click",e=>{let n=a.getBoundingClientRect(),r=e.clientX-n.left;if(r>7.5&&r<25.5){e.preventDefault(),e.stopPropagation();let n=t.find(a);n&&n.remove()}}),a}static formats(e){let t=e.getAttribute("data-label")||"",a=e.getAttribute("data-filter-modifier")||"",n=e.getAttribute("data-filter-value")||"",r=e.getAttribute("data-filter-private"),i=e.classList.contains("c-member_slug--mention");return{label:t,modifier:a,entityId:n,...null!==r&&{isPrivate:"true"===r},...i&&{mention:i}}}optimize(a){super.optimize(a);let n=this.domNode.getAttribute("data-label")||"",r=this.domNode.getAttribute("data-filter-modifier")||"",i=this.domNode.getAttribute("data-filter-value")||"",l=this.next;for(;l?.domNode?.tagName==="TS-SEARCH-FILTER"&&l.domNode.getAttribute("data-label")===n&&l.domNode.getAttribute("data-filter-modifier")===r&&l.domNode.getAttribute("data-filter-value")===i;){let e=l;l=l.next,e.moveChildren(this),e.remove()}let o=this.domNode.getAttribute("data-label")||"",s=this.domNode.textContent||"",c=this.domNode.getAttribute("data-emoji-shortcode"),d=c&&s.includes("\uFFFC")?s.replace("\uFFFC",c):s;if(o&&d!==o){let a=this.domNode.getAttribute("data-filter-modifier")||"",n=`-${o}`===d,r=o===`-${d}`;if(n||r){let e=a;n?e=`-${a}`:a.startsWith("-")&&(e=a.slice(1)),this.domNode.setAttribute("data-label",d),this.domNode.setAttribute("data-filter-modifier",e),i&&(0,G.A)(i)&&this.domNode.setAttribute("aria-label",`${s} ${Q.t("Channel")}`);let r=this.domNode.closest(".ql-editor");if(r?.parentElement){let e=t.find(r.parentElement);e&&markEditorDeltaDirty(e)}return}let l=this.domNode;l.getAttribute("data-pending-unwrap")||(l.setAttribute("data-pending-unwrap","true"),e.setTimeout(()=>{if(l.removeAttribute("data-pending-unwrap"),!l.isConnected)return;let e=l.closest(".ql-editor");if(!e?.parentElement)return;let a=t.find(e.parentElement);if(!a?.formatText)return;let n=t.find(l);if(!n)return;let r=n.offset(n.scroll),i=n.length();a.formatText(r,i,{slacksearchfilter:!1,bold:!1})},0));return}if(!this.domNode.querySelector("strong")){let e=o.indexOf(":");if(-1!==e&&e<o.length-1){let t=e+1;this.formatAt(t,s.length-t,"bold",!0)}}maybeRenderEmojiFilter(this.domNode)}};return l.blotName="slacksearchfilter",l.tagName="ts-search-filter",l}var Z=a(0x243985139),J=a(0xe48c5ed1),X=a(0x81d64d8c),ee=a(0xa2e0ef91),et=a(0x1d62f3e69),ea=a(0xc526e002),en=a(0x1feb5b316),er=a(0x992a1f63),ei=a(0x16a4ac024),el=a(0x21a39214),eo=a(0x1f28aba72),es=a(0x93c88edd),ec=a(0xb562d18d),ed=a(0x1117ab7e4),em=a(0x130405be8),eu=a(0x1c94e1914),ep=a(0xadfc1247),eh=a(0x215b853f5),e_=a(0x283863ba),ef=a(0x66ac0b5a),eb=a(0xd3a4af01),eg=a(0x196f86498),ey=a(0xfd55fa83),eA=a(0x218d4970c);let ex=new WeakMap;function initSearchQuill(e){let t=(0,L.A)(e);if(ex.get(t))return t;t.register({"modules/tabcomplete":(0,ef.A)(e),"modules/textsubstitutions":(0,ey.A)(e),"modules/cleanembedsincode":(0,er.A)(e),"modules/cleanemptyinput":(0,ei.A)(e),"modules/clipboard":(0,eo.Ay)(e),"modules/keyboard":(0,em.A)(e),"modules/slackmention":(0,eh.A)(e),"modules/slackslug":(0,e_.A)(e),"modules/slackemoji":(0,ec.A)(e),"modules/textchangequeue":(0,eb.A)(e),"modules/textsanitization":(0,eg.A)(e),"modules/autoslug":(0,ea.A)(e),"modules/slacklink":(0,eu.A)(e),"modules/slackmarkdown":(0,ep.A)(e),"modules/slackhorizontalrule":(0,ed.A)(e),"modules/workflowtoken":(0,eA.A)(e),"modules/cleanworkflowtokens":(0,el.Ay)(e),"modules/slackdocslist":(0,es.A)(e),"modules/canvasvariable":(0,en.A)(e),"formats/slacksearchtokenmodifier":(0,Z.A)(e),"formats/slacksearchtokenvalue":(0,J.A)(e),"formats/slacksearchfilter":getSlackSearchFilterFormat(e),"formats/slackmention":(0,H.A)(e),"formats/slackslug":(0,X.A)(e),"formats/slackemoji":(0,U.A)(e),"formats/unlink":(0,D.A)(e),"formats/slackhorizontalrule":(0,B.A)(e),"formats/workflowtoken":(0,et.Gs)(e),"formats/strike":(0,ee.A)(e),"formats/border":(0,F.Ay)(e),"formats/canvasvariable":(0,O.Ay)(e)},!0);let a=t.import("blots/inline"),n=a.order.indexOf("bold");return -1===n||a.order.includes("slacksearchfilter")||a.order.splice(n+1,0,"slacksearchfilter"),ex.set(t,!0),t}let SearchTextyClass=class SearchTextyClass extends P.A{constructor(e,t){super(e,t,initSearchQuill)}};var eE=a(0x159c8cd93),eC=a(0x205f4fb61);let ek=new C.Ay("share-dialog");function TextyLengthWarning({numCharsOverLimit:e=0}){return e<=0?null:n.createElement(I.Ay,{tip:ek.rt("Your message is {count, plural, =1 {# character} other {# characters}} too long",{count:e}),zIndex:"menu",position:"top-right"},n.createElement("div",{className:"c-texty_input_unstyled__warning"},"-",(0,eC.ZV)(e)))}TextyLengthWarning.displayName="TextyLengthWarning";let ev=n.memo(TextyLengthWarning);var eS=a(0x6aeae8a3),eI=a(0x12b6a33fc),ew=a(0x247cf31a2),eT=a(0xc34fd270),eN=a(0x17e7c4f73),eM=a(0x807220a2),eR=a(0x19bf376f9),eP=a(0x16cf1da63),eL=a(0x1e864b930),eO=a(0x149af4496),eD=a(0x61f75169),eF=a(0x226892387),eU=a(0x19c76d181),eB=a(0x475c9cfe),eH=a(0xb49dd8e4);let eW=new C.Ay("channel_token"),eV=(0,eM.Ar)()?e=>{let t,a,r,i,l,o,s,d,m,u=(0,eR.c)(29),{userGroupId:p,targetBounds:h}=e,_=(0,eP.wA)(),[f,b]=(0,n.useState)(!1);u[0]!==p?(t=e=>(0,eB.IM)(e,p),u[0]=p,u[1]=t):t=u[1];let g=(0,eF.d4)(t);u[2]!==p?(a=e=>(0,eB.lJ)(e,p),u[2]=p,u[3]=a):a=u[3];let y=(0,eF.d4)(a),A=(0,eF.d4)(eU.WR)??void 0;u[4]!==y?(r=!1!==y&&(0,eD.t8)(y),u[4]=y,u[5]=r):r=u[5];let x=r;u[6]!==x||u[7]!==y?(i=!x&&!(0,eD.V1)(y),u[6]=x,u[7]=y,u[8]=i):i=u[8];let E=i;u[9]!==g?(l=(0,c.A)(g),u[9]=g,u[10]=l):l=u[10];let C=l,k=!x&&!E&&C&&!f;if(u[11]!==_||u[12]!==k||u[13]!==p?(o=()=>{k&&(_((0,eH.A)({groupId:p,reason:"texty-tooltip"})),b(!0))},s=[_,p,k],u[11]=_,u[12]=k,u[13]=p,u[14]=o,u[15]=s):(o=u[14],s=u[15]),(0,n.useEffect)(o,s),C)return null;if(u[16]!==g||u[17]!==A){let e;u[19]!==A?(e=(e,t)=>n.createElement(eO.A,{key:e,userId:e,isFirst:0===t,isSelf:A===e}),u[19]=A,u[20]=e):e=u[20];let t=g.map(e);g.length>11&&(t=t.slice(0,10).concat(eW.rt("{count} others",{count:g.length-10}))),d=(0,eL.A)(t,{noEscape:!0,react:!0}),u[16]=g,u[17]=A,u[18]=d}else d=u[18];let v=d;if(u[21]!==v||u[22]!==h){let e,t;if(u[24]!==h?(e={isOpen:!0,isOverlayInteractive:!1,position:"top",targetBounds:h,allowanceX:0,allowanceY:0,zIndex:"above_fs",shouldFocusAfterRender:!1,shouldFade:!0,ariaHideApp:!1},u[24]=h,u[25]=e):e=u[25],u[26]!==v){let e;u[28]===Symbol.for("react.memo_cache_sentinel")?(e={position:"top",className:"c-tooltip__tip--usergroup"},u[28]=e):e=u[28],t=n.createElement(eI.Ay,e,v),u[26]=v,u[27]=t}else t=u[27];m=n.createElement(eS.AM,e,t),u[21]=v,u[22]=h,u[23]=m}else m=u[23];return m}:({userGroupId:e,targetBounds:t})=>{let a=(0,eP.wA)(),[r,i]=(0,n.useState)(!1),l=(0,eF.d4)(t=>(0,eB.IM)(t,e)),o=(0,eF.d4)(t=>(0,eB.lJ)(t,e)),s=(0,eF.d4)(eU.WR)??void 0,d=!1!==o&&(0,eD.t8)(o),m=!d&&!(0,eD.V1)(o),u=(0,c.A)(l),p=!d&&!m&&u&&!r;if((0,n.useEffect)(()=>{p&&(a((0,eH.A)({groupId:e,reason:"texty-tooltip"})),i(!0))},[a,e,p]),u)return null;let h=l.map((e,t)=>n.createElement(eO.A,{key:e,userId:e,isFirst:0===t,isSelf:s===e}));l.length>11&&(h=h.slice(0,10).concat(eW.rt("{count} others",{count:l.length-10})));let _=(0,eL.A)(h,{noEscape:!0,react:!0});return n.createElement(eS.AM,{isOpen:!0,isOverlayInteractive:!1,position:"top",targetBounds:t,allowanceX:0,allowanceY:0,zIndex:"above_fs",shouldFocusAfterRender:!1,shouldFade:!0,ariaHideApp:!1},n.createElement(eI.Ay,{position:"top",className:"c-tooltip__tip--usergroup"},_))};eV.displayName="TextyTooltipUserGroup";var eG=a(0x12185e091),eq=a(0x6d72337),ej=a(0x18476a827),ez=a(0x217553e42);let eK=new C.Ay("channel_token"),TextyTooltip=({memberId:e,userGroupId:t,channelId:a,messageTs:r,title:l,targetBounds:o})=>{let s=(0,eF.d4)(e=>(0,ez.OL)(e,a)),c=(0,eF.d4)(t=>(0,ej.wC)(t,e));function renderHoverCard(e){return n.createElement(eS.AM,{isOpen:!0,isOverlayInteractive:!1,position:"top",targetBounds:o,allowanceX:0,allowanceY:0,offsetY:-12,zIndex:"above_fs",shouldFocusAfterRender:!1,shouldFade:!0,ariaHideApp:!1},e)}if(renderHoverCard.displayName="renderHoverCard",c&&e)return renderHoverCard((0,eq.qk)({hideCoveragePlanLink:!0,memberId:e,hideButtons:!0}));if(a&&r)return renderHoverCard((0,eq.UX)({channelId:a,ts:r}));if(a)return renderHoverCard(n.createElement(eN.Y,{channelId:a}));let d=l;if(e)d=n.createElement(eT.Ay,{id:e,showAvatar:!0,showPresence:!0,invert:!0});else if(a){let e=(0,eG.t8)(s),t=(0,eG.QR)(s);d=!e&&t?eK.t("Private channel info"):n.createElement(ew.A,{channelId:a,invert:!0})}else if(t)return n.createElement(eV,{targetBounds:o,userGroupId:t});return n.createElement(eS.AM,{isOpen:!0,isOverlayInteractive:!1,position:"top",targetBounds:o,allowanceX:0,allowanceY:0,zIndex:"above_fs",shouldFocusAfterRender:!1,shouldFade:!0,ariaHideApp:!1},n.createElement(eI.Ay,{position:"top",className:i()({"c-tooltip__tip--member":e,"c-tooltip__tip--channel":a})},d))};TextyTooltip.displayName="TextyTooltip";var e$=a(0x54e399f4);function getNumInsetButtons({enableComposerButton:e,enableEmojiButton:t,enableFileButton:a,enableMentionButton:n,enableSendButton:r,enableStickyComposer:i,enableStoryButton:l,enableAudioButton:o,isExpanded:s,isPlainTextModeEnabledPref:c}){let d=0,m=i&&!c;return s||m?d+=1:!m&&(t&&(d+=1),n&&(d+=1),e&&!c&&(d+=1),r&&(d+=1),a&&(d+=1),l&&(d+=1),o&&(d+=1)),d}var eY=a(0xbbbfd440),eQ=a(0xa84b8b44),eZ=a(0x1015603dd);function mountTextyPlaceholder(e,t,a){if(!e)throw Error('mountTextyPlaceholder missing required "teamId" parameter');if(!t)return null;let r=(0,K.oK)(e);return(0,eZ.R8)(n.createElement(eQ.Kq,{store:r},n.createElement("span",null,a)),t,r)}mountTextyPlaceholder.displayName="mountTextyPlaceholder";let rerenderTextyPlaceholder=(e,t,a,r)=>{if(r){if(!a)throw Error('rerenderTextyPlaceholder missing required "teamId" parameter');let e=(0,K.oK)(a);return r.render(n.createElement(eQ.Kq,{store:e},n.createElement("span",null,t))),r}return mountTextyPlaceholder(a,e,t)};rerenderTextyPlaceholder.displayName="rerenderTextyPlaceholder";var eJ=a(0x7bc42e7e),eX=a(0x1599ad93e),e0=a(0x3711e82d),e1=a(0x45012309),e2=a(0x1ec68d6a3),e4=a(0xe32a2cad),e5=a(0x223ac29bb),e3=a(0x50279ca3),e6=a(0xd2fa49d0),e8=a(0x1ee15af19);let e7={index:0,length:0};function adjustRangeIndex({quill:e,line:t,blockType:a}){return(t?.prev&&t?.prev?.statics?.blotName===a||(e7.index=e.getIndex(t)),t?.prev&&t?.prev?.statics?.blotName===a)?adjustRangeIndex({quill:e,line:t.prev,blockType:a}):e7}function adjustRangeLength({quill:e,line:t,blockType:a}){let n=e.getIndex(t);return t?.next&&t?.next?.statics?.blotName===a||(e7.length=n+t?.cache?.length-e7.index),t?.next&&t?.next?.statics?.blotName===a&&adjustRangeLength({quill:e,line:t.next,blockType:a}),e7}function adjustSelectionToCoverBlock({blockType:e,quill:t,range:a}){let n=a?.index,r=a?.length,[i]=t.getLine(n);if(e7={index:n,length:0},i?.statics?.blotName===e){if(adjustRangeIndex({quill:t,line:i,blockType:e}),adjustRangeLength({quill:t,line:i,blockType:e}),r>0&&"list-item"===e){let a=t.getLines(n,r);if(a?.length){let n=(0,e8.A)(a);if(n?.prev&&adjustRangeIndex({quill:t,line:n.prev,blockType:e}),a?.length>1){let n=(0,s.A)(a);n?.next?adjustRangeLength({quill:t,line:n.next,blockType:e}):adjustRangeLength({quill:t,line:n,blockType:e})}}}return e7}return a}var e9=a(0x21e751f7e),te=a(0xb4cbc3af),tt=a(0x59bcdfd6),ta=a(0x2001af3ac),tn=a(0x52bf7626),tr=a(0xd03b77ca),ti=a(0x124342957),tl=a(0xd9ea5ea3),to=a(0x9b362f9),ts=a(0x24beea7c3),tc=a(0x1d8076771),td=a(0x1bdeab7ff),tm=a(0x1e0a0cdcc),tu=a(0x1c91944c9),tp=a(0x9b971e7e),th=a(0x131598af9),t_=a(0x1ccef1c6f),tf=a(0x40024dc1),tb=a(0xb6085b19),tg=a(0x39c953cc),ty=a(0x1f9b19f5a),tA=a(0x4a7bda68),tx=a(0x1c557d6a0),tE=a(0x150e2012),tC=a(0x1c2eef3c8),tk=a(0x14149c126),tv=a(0x1f57aea47),tS=a(0x46dbff89),tI=a(0x62a17882),tw=a(0xbb0c5132),tT=a(0x11439744b);let tN=new C.Ay("markdown_paste_toast"),tM=class extends n.Component{render(){this.props.telemeter.count("wysiwyg_markdown_paste_shortcut_toast_shown");let e=tN.rt("You can do this any time with <span>Ctrl Shift F</span>"),t=tN.rt("You can do this any time with <span>\u2318 Shift F</span>");return n.createElement(tw.Ay,{fadeDelay:5e3},n.createElement("div",null,(0,tI.cX)()?t:e))}};tM.displayName="MarkdownPasteShortcutToast";let tR=(0,tu.N)(e=>({telemeter:(0,tT.Cy)({state:e})}))(tM);var tP=a(0xa6f3163b),tL=a(0x6e87d4ec),tO=a(0x12f41fc32),tD=a(0x6ea1f0ed);let tF=new C.Ay("markdown_paste_toast"),tU=class extends n.Component{static defaultProps={hasSeenToastValue:-1};constructor(e){super(e),(0,y.v)(this,["onApplyFormattingClick","onDontShowClick"])}onApplyFormattingClick(){this.props.telemeter.count("wysiwyg_markdown_paste_toast_apply"),0===this.props.hasSeenToastValue&&this.props.setUserPrefByApi({pref:"seen_markdown_paste_toast",value:1}),this.props.dismissCurrentToast(),this.props.applyFormatting()}onDontShowClick(){this.props.telemeter.count("wysiwyg_markdown_paste_toast_dont_show"),this.props.setUserPrefByApi({pref:"seen_markdown_paste_toast",value:-1}),this.props.dismissCurrentToast()}renderContent(){let e=n.createElement(tP.A,{className:"underline",onClick:this.onDontShowClick},tF.t("Don\u2019t ask again"));if(0===this.props.hasSeenToastValue){let t=n.createElement(tP.A,{className:"underline",onClick:this.onApplyFormattingClick},tF.t("Apply formatting")),a=tF.t("Looks like your content contains markdown.");return n.createElement("div",null,a,n.createElement("br",null),t," ",e)}let t=n.createElement(tP.A,{className:"underline",onClick:this.onApplyFormattingClick},tF.t("Apply")),a=tF.t("Apply formatting?");return n.createElement("div",null,a," ",t," ",e)}render(){if(-1===this.props.hasSeenToastValue)return null;this.props.telemeter.count("wysiwyg_markdown_paste_toast_shown");let e=this.renderContent();return n.createElement(tL.A,{duration:1e4},n.createElement("div",null,e))}};tU.displayName="MarkdownPasteToast";let tB=(0,tu.N)(e=>({telemeter:(0,tT.Cy)({state:e}),hasSeenToastValue:(0,t_.ty)(e,"seen_markdown_paste_toast")}),{dismissCurrentToast:()=>(0,tD.Z)(),setUserPrefByApi:({pref:e,value:t})=>(0,tO.AZ)({pref:e,value:t})})(tU);var tH=a(0x11c82607b),tW=a(0x16ffed5ab);let tV=(0,tH.Ay)("Show markdown paste toast",(e,t,{applyFormatting:a})=>{let r=t();return e((0,tW.M)({element:n.createElement(tB,{applyFormatting:()=>{let t=(0,t_.ty)(r,"seen_markdown_paste_shortcut");t<3&&(e((0,tW.M)({element:n.createElement(tR)})),e((0,tO.AZ)({pref:"seen_markdown_paste_shortcut",value:t+1}))),a()}})}))});tV.meta={name:"showMarkdownPasteToast",key:"createThunkShowMarkdownPasteToast",description:"Show markdown paste toast"};let tG=new C.Ay("block_kit"),tq={name:"warning"},tj=(0,eM.Ar)()?e=>{let t,a,r=(0,eR.c)(8),{undo:i,omitUndo:l}=e,o=(0,eP.wA)();r[0]!==o||r[1]!==i?(t=()=>{o((0,tD.Z)()),i()},r[0]=o,r[1]=i,r[2]=t):t=r[2];let s=t;if(r[3]!==s||r[4]!==l){let e,t;r[6]===Symbol.for("react.memo_cache_sentinel")?(e={svgIconProps:tq,svgIconClassName:"sk_reddish_orange"},t=tG.t("Only 1 table can be attached to each message. "),r[6]=e,r[7]=t):(e=r[6],t=r[7]),a=n.createElement(tL.A,e,t,!l&&n.createElement(tP.A,{"data-qa":"undo-table-block-creation-toast-undo-button",className:"underline",onClick:s},tG.t("Paste as text instead?"))),r[3]=s,r[4]=l,r[5]=a}else a=r[5];return a}:({undo:e,omitUndo:t})=>{let a=(0,eP.wA)(),r=(0,n.useCallback)(()=>{a((0,tD.Z)()),e()},[a,e]);return n.createElement(tL.A,{svgIconProps:tq,svgIconClassName:"sk_reddish_orange"},tG.t("Only 1 table can be attached to each message. "),!t&&n.createElement(tP.A,{"data-qa":"undo-table-block-creation-toast-undo-button",className:"underline",onClick:r},tG.t("Paste as text instead?")))};tj.displayName="OnlyOneTableCanBeAttachedToast";var tK=a(0xf9124039);let t$=(0,tH.Ay)("Show a toast that allows users to undo the automatic creation of a table block",(e,t,{undo:a,omitUndo:r})=>((0,tK.xD)(t())&&e((0,tD.Z)()),(0,e1.eo)({state:t()}).track(e0.EventId.TABLE_CREATE_ERROR,{contexts:{ui_context:{action:e0.UiAction.ERROR,ui_element:"table_limit_reached",ui_properties:{element_name:"table_create_error",element_value:"table_limit_reached",display_name:"table_limit_reached"}}}}),e((0,tW.M)({element:n.createElement(tj,{omitUndo:r,undo:a})}))));t$.meta={name:"showOnlyOneTableCanBeAttachedToast",key:"createThunkShowOnlyOneTableCanBeAttachedToast",description:"Show a toast that allows users to undo the automatic creation of a table block"};let tY=new C.Ay("block_kit"),tQ=(0,eM.Ar)()?function(e){let t,a,r,i,l,o=(0,eR.c)(11),{convertTableToSnippet:s,clearText:c}=e,d=(0,eP.wA)();o[0]!==d?(t=()=>{d((0,tD.Z)())},o[0]=d,o[1]=t):t=o[1];let m=t;o[2]!==c||o[3]!==s||o[4]!==m?(a=()=>{m(),c(),s()},o[2]=c,o[3]=s,o[4]=m,o[5]=a):a=o[5];let u=a;o[6]===Symbol.for("react.memo_cache_sentinel")?(r=tY.t("This table is too big to send as an attachment."),o[6]=r):r=o[6];let p=r;o[7]===Symbol.for("react.memo_cache_sentinel")?(i=tY.t("Send a snippet instead?"),o[7]=i):i=o[7];let h=i;if(o[8]!==u){let e;o[10]===Symbol.for("react.memo_cache_sentinel")?(e={"data-qa":"send-table-as-snippet-toast"},o[10]=e):e=o[10],l=n.createElement(tL.A,null,n.createElement("div",e,p," ",n.createElement(tP.A,{"data-qa":"send-table-as-snippet-toast-confirm-button",className:"underline",onClick:u},h))),o[8]=u,o[9]=l}else l=o[9];return l}:function({convertTableToSnippet:e,clearText:t}){let a=(0,eP.wA)(),r=(0,n.useCallback)(()=>{a((0,tD.Z)())},[a]),i=(0,n.useCallback)(()=>{r(),t(),e()},[e,t,r]),l=tY.t("This table is too big to send as an attachment."),o=tY.t("Send a snippet instead?");return n.createElement(tL.A,null,n.createElement("div",{"data-qa":"send-table-as-snippet-toast"},l," ",n.createElement(tP.A,{"data-qa":"send-table-as-snippet-toast-confirm-button",className:"underline",onClick:i},o)))};tQ.displayName="SendTableAsSnippetToast";let tZ=(0,tH.Ay)("Show a toast that allows users to undo the automatic creation of a table block",(e,t,{convertTableToSnippet:a,clearText:r})=>((0,tK.xD)(t())&&e((0,tD.Z)()),e((0,tW.M)({element:n.createElement(tQ,{convertTableToSnippet:a,clearText:r})}))));tZ.meta={name:"showSendTableAsSnippetToast",key:"createThunkShowSendTableAsSnippetToast",description:"Show a toast that allows users to undo the automatic creation of a table block"};let tJ=new C.Ay("block_kit"),tX=(0,eM.Ar)()?function(e){let t,a,r,i,l,o=(0,eR.c)(11),{undo:s}=e,c=(0,eP.wA)();o[0]!==c?(t=()=>{c((0,tD.Z)())},o[0]=c,o[1]=t):t=o[1];let d=t;o[2]!==d||o[3]!==s?(a=()=>{d(),s()},o[2]=d,o[3]=s,o[4]=a):a=o[4];let m=a;o[5]===Symbol.for("react.memo_cache_sentinel")?(r=tJ.t("Table added as an attachment."),o[5]=r):r=o[5];let u=r;o[6]===Symbol.for("react.memo_cache_sentinel")?(i=tJ.t("Undo"),o[6]=i):i=o[6];let p=i;if(o[7]!==m){let e,t;o[9]===Symbol.for("react.memo_cache_sentinel")?(e={duration:5e3},o[9]=e):e=o[9],o[10]===Symbol.for("react.memo_cache_sentinel")?(t={"data-qa":"undo-table-block-creation-toast"},o[10]=t):t=o[10],l=n.createElement(tL.A,e,n.createElement("div",t,u," ",n.createElement(tP.A,{"data-qa":"undo-table-block-creation-toast-undo-button",className:"underline",onClick:m},p))),o[7]=m,o[8]=l}else l=o[8];return l}:function({undo:e}){let t=(0,eP.wA)(),a=(0,n.useCallback)(()=>{t((0,tD.Z)())},[t]),r=(0,n.useCallback)(()=>{a(),e()},[e,a]),i=tJ.t("Table added as an attachment."),l=tJ.t("Undo");return n.createElement(tL.A,{duration:5e3},n.createElement("div",{"data-qa":"undo-table-block-creation-toast"},i," ",n.createElement(tP.A,{"data-qa":"undo-table-block-creation-toast-undo-button",className:"underline",onClick:r},l)))};tX.displayName="UndoTableBlockCreationToast";let t0=(0,tH.Ay)("Show a toast that allows users to undo the automatic creation of a table block",(e,t,{undo:a})=>((0,tK.xD)(t())&&e((0,tD.Z)()),e((0,tW.M)({element:n.createElement(tX,{undo:a})}))));t0.meta={name:"showUndoTableBlockCreationToast",key:"createThunkShowUndoTableBlockCreationToast",description:"Show a toast that allows users to undo the automatic creation of a table block"};let t1=new C.Ay("msg_input"),t2={numCharsOverLimit:0,tooltipShowing:!1,tooltipMemberId:void 0,tooltipUserGroupId:void 0,tooltipChannelId:void 0,tooltipMessageTs:void 0,tooltipTitle:void 0,tooltipTargetBounds:void 0,indicateTopScroll:!1,indicateBottomScroll:!1},t4=class extends k.I{static contextType=S.A;static defaultProps={onCompositionEnd:l.A,onMount:l.A,onFileMenuOpen:l.A,onFileMenuClose:l.A,forceFileMenuOpen:!1,sendMessage:l.A,openSnippetDialog:l.A,isSingleLine:!1,noSingleLineStyling:!1,isAttentionOnChat:!1,enableJumbomoji:!1,enableSpellCheck:!1,enableEmoticons:!1,enableStickyComposer:!1,overlayIsOpen:!1,isPlainTextModeEnabledPref:!1,autocompleteChannels:()=>g.S.resolve(),showMarkdownPasteToast:l.A,showUndoTableBlockCreationToast:l.A,showSendTableAsSnippetToast:l.A,enterCreatesNewlinePref:!1,forceEnterCreatesNewline:!1,isDisabled:!1,isExpanded:!1,isEmojiDisplayedAsText:!1,focusOnMount:!1,focusOnPaste:!1,minLines:1,maxLines:void 0,maxLength:void 0,openModal:l.A,autocompleteMembers:l.A,featureReactMessages:!0,showTextyTooltips:!0,isAutocompleteOpen:!1,enableBroadcastKeywords:!0,includeAllBroadcastKeywords:!1,usePreNewlines:!1,useFocusRing:!0,workflowTokens:[],workflowTokenClick:l.A,size:"medium",isInvalid:!1,renderFileMenu:l.A,useWysiwyg:!1,useStickyComposer:!0,useWorkflowTokens:!1,useExpandedRichText:!1,enableActionsButton:!1,forceChannelTaggingDisabled:!1,forcePlainTextModeDisabled:!1,forceAutoslugginEnabled:!1,openTextyEditLinkModal:l.A,openTextyLinkFormModal:l.A,openTextyLinkFormBasedOnSelection:l.A,closeTextyModals:l.A,textyModalIsOpen:!1,onScheduleSend:l.A,autocompleteEmoji:l.A,isTablePastingEnabled:!1,tagChannelsAsSearchGeneric:!1,a11yUnderlineLinks:!1,dragLinksToComposer:l.A,forceAutoTooltipDisabled:!1};container;instance;resizeListener;mentionReplaceTimer;toolbarRef;preventToolbarOnNextSelection;scrollTicking;onMountTimeout;windowRef;placeholderRoot;contextSetTextyInstance;contextSetIsFocused;contextSetActiveFormats;contextSetToolbarOverflowVisible;contextSetToolbarPositionData;constructor(e){super(e),this.container=null,this.instance=null,this.resizeListener=null,this.setContainerRef=this.setContainerRef.bind(this),this.mentionReplaceTimer=null,this.placeholderRoot=void 0,this.toolbarRef=n.createRef(),this.preventToolbarOnNextSelection=!1,this.scrollTicking=!1,this.windowRef=e.windowRef,(0,y.v)(this,["promiseToSearchMembers","promiseToSearchChannels","promiseToSearchEmoji","onMouseOver","onMouseOut","onTextChange","onSelectionChange","onScrollOptimize","onResize","onLinkClick","showLinkForm","onMentionReplace","displayValue","hideToolbarOverflow","resetToolbarPosition","calculateInputOffsetScroll","setupInputListeners","removeInputListeners","scrollListenerRaf","onDrop"]),this.state={...t2}}componentDidMount(){let{initialText:e,focusOnMount:t,teamId:a,onMount:n,useExpandedRichText:r,useSearchTextyClass:i}=this.props;(r?this.instance=new M.A(this.container,this.getOptions()):i?this.instance=new SearchTextyClass(this.container,this.getOptions()):this.instance=new eE.A(this.container,this.getOptions()),this.setupInputListeners(),this.instance)?(this.contextSetTextyInstance?.(this.instance),e&&(this.value(e,{isSilent:!0}),this.clearHistory()),this.onMountTimeout=b.J.setTimeout(()=>{t&&this.setCursorAtEnd(),n&&n()},0),this.handlePropChanges()):(0,e2.Ay)({teamId:a}).error("TextyInput: could not create instance")}componentDidUpdate(e){this.handlePropChanges(e)}componentWillUnmount(){this.unmountPlaceholder(),this.removeInputListeners(),this.instance&&this.instance.unload(),this.onMountTimeout&&clearTimeout(this.onMountTimeout)}setupInputListeners(){this.setupScrollListener(),this.setupResizeListener()}removeInputListeners(){let e=this.instance?.quill?.root;e&&(e.removeEventListener("scroll",this.scrollListenerRaf),this.resizeListener.disconnect())}calculateInputOffsetScroll(){let e=this.instance?.quill?.root;if(!e)return;let t=e.scrollHeight>e.clientHeight,a=t&&e.scrollTop>0,n=t&&e.scrollTop<e.scrollHeight-e.clientHeight;this.setState(()=>({indicateTopScroll:a,indicateBottomScroll:n}))}setupResizeListener(){let e=this.instance?.quill?.root;e&&(this.resizeListener=(0,E.A)(()=>{this.calculateInputOffsetScroll()},250),this.resizeListener.observe(e))}scrollListenerRaf(){this.scrollTicking||(this.windowRef.deref()?.requestAnimationFrame(()=>{this.calculateInputOffsetScroll(),this.scrollTicking=!1}),this.scrollTicking=!0)}setupScrollListener(){let e=this.instance?.quill?.root;e&&e.addEventListener("scroll",this.scrollListenerRaf)}onMouseOut(e){let{showTextyTooltips:t}=this.props;if(!t)return;let a=e.target;!this.mentionReplaceTimer&&(a.classList.contains("c-member_slug")||a.classList.contains("emoji")||"TS-SLUG"===a.tagName)&&this.hideTooltip()}onMouseOver(e){let{showTextyTooltips:t}=this.props;if(!t)return;let a=e.target;(a.classList.contains("c-member_slug")||a.classList.contains("emoji")||"TS-SLUG"===a.tagName)&&this.showTooltip(e.target,e)}onTextChange(e,t,a){f.unstable_batchedUpdates(()=>{let{onTextChange:n,useWysiwyg:r,isPlainTextModeEnabledPref:i}=this.props,{tooltipShowing:l}=this.state;this.updateActiveFormats(),this.updateToolbarPosition(),r&&!i&&this.props.closeTextyModals(void 0),!this.mentionReplaceTimer&&l&&this.hideTooltip(),(0,I.Ws)();let getHasScrollbar=()=>{let e=this.container.querySelector(".ql-editor");return e.clientHeight<e.scrollHeight},o=this.getNumCharsOverLimit();this.setState(()=>({numCharsOverLimit:o})),this.hideToolbarOverflow(),n&&n(e,getHasScrollbar,t,a)})}hasWarning(){let{numCharsOverLimit:e}=this.state;return e>0}getNumCharsOverLimit(){let e,{maxLength:t,useWysiwyg:a,isWorkflowInputText:n}=this.props;if(!this.instance)return 0;let r=t||0;if(r<=0||r>200&&this.instance.getLength()<r/2)return 0;let i=this.instance.getDelta();if(a)e=(0,ta.A)(i);else{let t=(0,tt.f)({contents:i.ops});n&&(t=(0,w.Lk)((0,w.cY)(t))),e=t.length}return Math.max(0,e-r)}onSelectionChange(e){f.unstable_batchedUpdates(()=>{let{onSelectionChange:t,textyModalIsOpen:a}=this.props;this.updateActiveFormats(),this.preventToolbarOnNextSelection||a||!e||!e.length?(this.preventToolbarOnNextSelection=!1,this.resetToolbarPosition()):this.updateToolbarPosition(),this.hideToolbarOverflow(),t&&t(e)})}onScrollOptimize(){this.updateActiveFormats()}onResize(){this.updateToolbarPosition()}onDrop(e){let t=this.props.dragLinksToComposer({dragEvent:e,inputProxy:this.instance??void 0});t?.length&&this.insertContentsAtCursor({contents:{ops:t.ops}})}onLinkClick(e,t,a,n){let{isPlainTextModeEnabledPref:r,renderWorkflowBuilderEditLinkInput:i,renderUrlWithWorkflowBuilderVariable:l}=this.props;if(r)return;let o=this.instance?.getSelection(),s=(0,tn.A)(a.ops,{embedReplacement:"\uE000"}),c=-1===s.indexOf("\uE000");this.preventToolbarOnNextSelection=!0,this.instance?.setSelection(n.index,n.length),this.props.openTextyEditLinkModal({initialRange:o,adjustedRange:n,anchorElement:e,initialText:s,initialUrl:t,textIsEditable:c,initialContents:a,source:e0.MsgFormattingInputSource.TOOLBAR,quill:this.instance?.quill,renderWorkflowBuilderEditLinkInput:i,renderUrlWithWorkflowBuilderVariable:l})}onMentionReplace({replacements:e,isLastReplacement:t}){if(!t||1!==e.length||"UNVERIFIED"===e[0].id)return;let a=this.container.querySelectorAll(`ts-mention[data-id=${e[0].id}]`);if(1!==a.length||a[0].offsetTop<this.container.offsetTop)return;let n=e[0].id,r=(0,z.A)(n)?n:void 0,i=(0,e6.A)(n)?n:void 0,l=(0,G.A)(n)?n:void 0;this.setState(()=>({tooltipShowing:!this.props.forceAutoTooltipDisabled,tooltipMemberId:r,tooltipUserGroupId:i,tooltipChannelId:l,tooltipMessageTs:void 0,tooltipTitle:void 0,tooltipTargetBounds:a[0].getBoundingClientRect()})),this.mentionReplaceTimer=this.windowRef.deref()?.setTimeout(()=>{this.mentionReplaceTimer=null,this.hideTooltip()},1500)||null}getOptions(){let{id:e,ariaLabel:t,ariaLabelledBy:a,ariaDescribedBy:n,ariaInvalid:r,ariaAutocomplete:i,ariaControls:l,ariaExpanded:s,ariaActiveDescendant:c,autocompleteConfig:d,inputMetricBoundary:m,onEnter:u,onPlusMenuShortcut:p,onEscape:h,onTab:_,isSingleLine:f,enableBroadcastKeywords:b,includeAllBroadcastKeywords:g,showTextyTooltips:y,teamId:x,isPlainTextModeEnabledPref:E,useWorkflowTokens:C,useExpandedRichText:k,workflowTokenClick:S,useWysiwyg:I,enableStickyComposer:w,onBackspace:T,forceChannelTaggingDisabled:N,forceAutoslugginEnabled:M,role:R,windowRef:P,isMultiverseQuillEnabled:L,experimentReact19UseCreateRootGroupOn:O,disableSlugging:D,experimentFeLinkTokenizationGroupOn:F,experimentFeLinkTokenizationStringsGroupOn:U,experimentTruncateUrlGroupOn:B,experimentFeLinkTokenizationKeyboardAlternativeGroupOn:H,useSearchTextyClass:W}=this.props;return{id:e,modules:{keyboard:this.getKeyboardModule(),slackmention:!0,slackslug:F&&!D,textsubstitutions:this.getTextSubstitutionsModule(),clipboard:this.getClipboardModule(),tabcomplete:this.getTabCompleteModule(),cleanembedsincode:!0,cleanemptyinput:!0,cleanworkflowtokens:C,slackhorizontalrule:k,slackdocslist:k,canvasvariable:k},onBlur:e=>{this.hideToolbarOverflow(),this.contextSetIsFocused?.(!1),this.props.onBlur?.(e)},onFocus:e=>{this.props.onFocus?.(e),this.contextSetIsFocused?.(!0)},onEnter:u?e=>this.props.onEnter?.(e):void 0,onBackspace:T?()=>this.props.onBackspace?.():void 0,onEscape:()=>{if(h)return this.props.onEscape?this.props.onEscape():void 0},onTab:_?e=>this.props.onTab?.(e):void 0,onTextChange:this.onTextChange,onSelectionChange:this.onSelectionChange,onScrollOptimize:this.onScrollOptimize,onCompositionEnd:this.props.onCompositionEnd,onResize:this.onResize,onLinkClick:this.onLinkClick,showLinkForm:this.showLinkForm,singleLineInput:f,enableBroadcastKeywords:b,includeAllBroadcastKeywords:g,isJumbomojiEnabled:()=>(0,o.A)(this.props.enableJumbomoji)?this.props.enableJumbomoji():this.props.enableJumbomoji,convertEmoticonsIsEnabled:()=>this.props.enableEmoticons,replaceNativeEmoji:!0,usePlainTextMode:E,inlineEmojiIsEnabled:()=>!this.props.isEmojiDisplayedAsText,getLocale:()=>this.props.locale,getTeamId:()=>this.props.teamId,getChannelId:()=>this.props.channelId,getUserHighlightWords:()=>this.props.userHighlightWords,isAutocompleteOpen:()=>this.props.isAutocompleteOpen,promiseToSearchMembers:this.promiseToSearchMembers,promiseToSearchChannels:this.promiseToSearchChannels,promiseToSearchEmoji:this.promiseToSearchEmoji,onMentionReplace:this.onMentionReplace,className:"c-texty_input_unstyled",inputMetricBoundary:m,ariaLabel:t,ariaLabelledBy:a,ariaDescribedBy:n,ariaInvalid:r,ariaAutocomplete:i,ariaControls:l,ariaExpanded:s,ariaActiveDescendant:c,tabIndex:"0",showTextyTooltips:y,getEmojiNames:()=>this.props.emojiNames,logger:(0,e2.Ay)({teamId:x}),useWorkflowTokens:C,useExpandedRichText:k,workflowTokenClick:S,onPlusMenuShortcut:p,nestedListDepth:A.Az,useWysiwyg:I,useStickyComposer:!1,enableStickyComposer:w,useChannelTagging:!N,forceAutoslugginEnabled:M,scrollingContainerSelector:"c-texty_input_unstyled__container",role:R,window:P.deref(),isMultiverseQuillEnabled:L,isSlugsEnabled:F&&!D,isSlugsStringsEnabled:U,isSlugTruncatedUrlsEnabled:B&&!D,isSlugsKeyboardAlternativeEnabled:H&&!D,isUnderlineEnabled:!0,shouldUseCreateRoot:O,isSearchFilterFormatEnabled:W??!1,allowsCompleteOnEmptyStateFocus:()=>d?.canCompleteOnEmptyQuery(),screenreaderAnnouncement:e=>{let{sendMessageToAnnouncerAPI:t}=this.context||{};t&&t({message:e||t1.t("Editing is not permitted"),assertive:!0,uuid:(0,v.A)()})}}}getKeyboardModule(){let{featureReactMessages:e,onCmdLeftWhenEmpty:t,onCmdRightWhenEmpty:a,onCmdZWhenEmpty:n,onCmdKWhenSelected:r,onDownArrowWhenEmpty:i,onUpArrow:l,onDownArrow:o,onRightArrow:s,onLeftArrow:c,onSelectAll:d,onPageUp:m,onPageDown:u}=this.props,p={featureReactMessages:e,onCmdLeftWhenEmpty:t,onCmdRightWhenEmpty:a,onCmdZWhenEmpty:n,onCmdKWhenSelected:r,onDownArrowWhenEmpty:i,shouldInsertNewline:(e,t)=>!this.props.isSingleLine&&(0,ts.A)({...e,enterCreatesNewlinePref:this.props.enterCreatesNewlinePref,isCursorInPreBlock:this.instance?.isCursorInPreBlock(),usePreNewlines:this.props.usePreNewlines,followsTripleBackticks:t})};return l&&(p.onUpArrow=()=>l({}),p.onUpArrowCmd=()=>l({cmdKey:!0}),p.onUpArrowShift=()=>l({shiftKey:!0})),o&&(p.onDownArrow=()=>o({}),p.onDownArrowCmd=()=>o({cmdKey:!0}),p.onDownArrowShift=()=>o({shiftKey:!0})),s&&(p.onRightArrow=()=>s()),c&&(p.onLeftArrow=()=>c()),d&&(p.onSelectAll=()=>d()),m&&(p.onPageUp=()=>m()),u&&(p.onPageDown=()=>u()),p}getTabCompleteModule(){let{autocompleteConfig:e}=this.props;return e?{tooltipIsShowing:()=>this.state.tooltipShowing,tooltipShow:e=>{this.showTooltip(e)},tooltipHide:()=>{this.hideTooltip()},...e}:null}getTextSubstitutionsModule(){return this.props.disableTextSubstitutions?null:{getTextPreferences:()=>this.props.isAutocompleteOpen?null:(0,e4.Tp)()}}getContents(){return this.instance?this.instance?.getContents():{contents:[]}}getText(){return this.instance?.getText()||""}setText(e){return this.instance?.setText(e)}getContentsForRange(e,t){return this.instance?this.instance?.getContentsForRange(e,t):new(_())}getSelection(){return this.instance?.getSelection()||null}getFormatForQuotedObjects(e){if(!this.instance)return;let t=this.instance.getFormat(e),a=adjustSelectionToCoverBlock({blockType:"list-item",quill:this.instance.quill,range:e}),n=a&&a?.length>0?this.instance.quill.getLines(a):[],r=(0,s.A)(n);if((r?.statics?.blotName==="block"&&r?.children?.head?.statics?.blotName==="break"&&r?.children?.tail?.statics?.blotName==="break"&&n.pop(),n?.length)&&(0,to.mj)(n)){let e=this.instance.getFormat(a);return{...t,...e,blockquote:!0}}}getFormat(e){return this.getFormatForQuotedObjects(e)||this.instance?.getFormat(e)}getLength(){return this.instance?.getLength()||0}getClipboardModule(){let{onPasteLimit:e,openSnippetDialog:t,isTablePastingEnabled:a}=this.props;return{isUnderlineEnabled:!0,shouldFocusOnPaste:()=>this.props.focusOnPaste&&this.props.isAttentionOnChat,showMarkdownPasteToast:this.props.showMarkdownPasteToast,getChannelId:()=>this.props.channelId,getThreadTs:()=>this.props.threadTs,onPasteLimit:(t,a)=>!!a&&a.length()>A.Sd&&(t.stopPropagation(),t.preventDefault(),e?e(t,a):this.props.openModal({element:this.renderPasteLimitDialog(),isStackable:!0}),!0),onPaste:()=>!!this.props.onPaste&&this.props.onPaste(),onTablePaste:({pastedString:e,tsvResult:a,block:n,msgDelta:r,restorePastedContent:i,clearText:o})=>{if(t){if(this.props.hasTableAttachment)return void this.props.showOnlyOneTableCanBeAttachedToast({undo:i||l.A});if(this.props.insertTableAsBlockUnfurl&&n){this.props.insertTableAsBlockUnfurl(n),this.props.onBlockAttachmentCreated&&this.props.onBlockAttachmentCreated();return}if(this.props.insertTableAsBlockUnfurl&&a){if(this.props.clogger?.track(e0.EventId.TABLE_INITIATED,{contexts:{ui_context:{action:e0.UiAction.PASTE}}}),a.reason===T.bi.success&&a.block){this.props.insertTableAsBlockUnfurl(a.block),this.props.showUndoTableBlockCreationToast({undo:()=>{i&&i(),this.props.bulkClearBlockUnfurls({draftIds:[this.props.draftId]})}}),this.props.onBlockAttachmentCreated&&this.props.onBlockAttachmentCreated(),this.props.clogger?.track(e0.EventId.TABLE_CREATED,{contexts:{ui_context:{action:e0.UiAction.PASTE}}});return}this.props.clogger?.track(e0.EventId.TABLE_CREATE_ERROR,{contexts:{ui_context:{action:e0.UiAction.ERROR,ui_element:a.reason,ui_properties:{element_name:"table_create_error",element_value:a.reason,display_name:a.reason,element_index:a.errorValue||0}}}})}i&&i(),this.props.showSendTableAsSnippetToast({convertTableToSnippet:()=>{t({initialText:e,initialChannelId:this.props.channelId,threadTs:this.props.threadTs,viewContext:this.props.viewContext||"",initialType:"tsv",initialContents:{contents:r?r.ops:[]}})},clearText:o||l.A})}},getIsTablePastingEnabled:()=>a}}setContainerRef(e){this.container=e}setContents(e){return this.instance?.setContents(e)}setCursorAtEnd(){this.instance?.setSelectionAtEnd()}isCursorAtStart(){return this.instance?.getSelection()?.index===0}maybeTriggerMentionAutocomplete(){this.instance?.maybeTriggerMentionAutocomplete()}setCursor(e,t=0){this.container&&this.instance?.setSelection(e,t)}insertContentsAtCursor(e,t=!0,a="user"){this.container&&this.instance?.insertContentsAtCursor(e,t,a)}clearHistory(){return this.instance?.clearHistory()}isEnabled(){return!!this.instance?.isEnabled()}prependContents(e){return this.instance?.prependContents(e)}value(e,{isSilent:t}={}){let{userHighlightWords:a,isEmojiDisplayedAsText:n,emojiNames:r,locale:i,useWorkflowTokens:l,workflowTokens:o,tagChannelsAsSearchGeneric:s,forceChannelTaggingDisabled:m}=this.props;if(void 0!==e){if((0,c.A)(e))this.clear();else{let c=e;(0,d.A)(e)&&(c=(0,e9.A)(e,{highlightWords:a,shouldRenderEmojiAsText:n,emojiNames:r,locale:i,workflowTokens:l?o:void 0,useChannelTagging:!m,tagChannelsAsSearchGeneric:s}));let u={};t&&(u.source="silent"),this.instance?.setContents(c,u)}return""}return(0,te.e)(this.instance?.getContents(),{tagChannelsAsSearchGeneric:s})}displayValue(){return(0,tt.f)(this.instance?.getContents())}clear({isSilent:e=!1}={}){this.instance?.clear({is_silent:e})}hasActiveDescendantChanged(e={}){let{ariaActiveDescendant:t}=this.props;return e.ariaActiveDescendant!==t}handlePropChanges(e={}){let{placeholder:t,enableSpellCheck:a,isDisabled:n,isPlainTextModeEnabledPref:r,overlayIsOpen:i,ariaLabel:l,ariaLabelledBy:o,ariaDescribedBy:s,ariaInvalid:c,enableBroadcastKeywords:d,ariaActiveDescendant:u,teamId:p,useExpandedRichText:h,ariaExpanded:_}=this.props;if(e.enableSpellCheck!==a&&this.container.querySelector("[contenteditable=true]").setAttribute("spellcheck",a),e.isDisabled!==n&&(n?this.instance?.disable():this.instance?.enable()),e.placeholder!==t&&this.updatePlaceholder(),this.hasActiveDescendantChanged(e)&&this.instance?.setActiveDescendant(u),e.ariaLabel!==l&&this.instance?.setAriaLabel(l),e.ariaLabelledBy!==o&&this.instance?.setAriaLabelledBy(o),e.ariaDescribedBy!==s&&this.instance?.setAriaDescribedBy(s),e.ariaInvalid!==c&&this.instance?.setAriaInvalid(c),e.ariaExpanded!==_&&this.instance?.setAriaExpanded(_),(0,m.A)(e.isPlainTextModeEnabledPref)&&(0,m.A)(r)&&e.isPlainTextModeEnabledPref!==r||(0,m.A)(e.enableBroadcastKeywords)&&(0,m.A)(d)&&e.enableBroadcastKeywords!==d&&e.channelId===this.props.channelId){(0,e2.Ay)({teamId:p}).info("Texty-Input",`Recreates the texty class instance for channelId ${this.props.channelId} `);let e=this.getContents();this.instance&&this.instance.unload(),h?this.instance=new M.A(this.container,this.getOptions()):this.instance=new eE.A(this.container,this.getOptions()),this.contextSetTextyInstance?.(this.instance),this.setContents(e),i||this.setCursorAtEnd(),this.updatePlaceholder()}}focus(){this.instance?.focus()}blur(){this.instance?.blur()}selectAll(){this.instance?.selectAll()}isEmpty({doIgnoreWhitespace:e=!1}={}){return!this.instance||!(0,tr.A)(this.instance.getDelta(),{trimWhitespace:e,ignoreFormatting:!0})}hasFocus(){return!!this.instance?.hasFocus()}resetToolbarPosition(){this.contextSetToolbarPositionData&&this.contextSetToolbarPositionData(void 0)}updateToolbarPosition(){let{enableStickyComposer:e,useStickyComposer:t,useWysiwyg:a,isPlainTextModeEnabledPref:n}=this.props;if(!this.instance||!a||n||t&&e)return;let r=this.getSelection();if(!r||!r.length)return void this.resetToolbarPosition();let i=this.instance.quill.getBounds(r.index,r.length),l=getComputedStyle(this.instance.quill.root),o=this.instance.quill.root.clientWidth-parseInt(l.paddingLeft,10)-parseInt(l.paddingRight,10),s=this.instance?.quill?.root?.parentNode?.getBoundingClientRect(),c=s?.left||0,d={rect:i,editorWidth:o,containerLeftBound:c,containerTopBound:s?.top||0,containerWidthBound:s?.width||0,viewportWidth:this.windowRef.deref()?.document.documentElement.clientWidth||0};this.contextSetToolbarPositionData&&this.contextSetToolbarPositionData(d)}hideToolbarOverflow(){this.contextSetToolbarOverflowVisible&&this.contextSetToolbarOverflowVisible(!1)}updateActiveFormats(){let e=this.getSelection(),t=(e?this.getFormat(e):void 0)||{},a=Object.keys(t).map(e=>{if("header"===e)return`h${t[e]}`;if("list"===e){if("bullet"===t[e])return"bullet-list";if("ordered"===t[e])return"ordered-list";if(t[e]&&["unchecked","checked"].includes(t[e]))return"check-list"}return e});this.contextSetActiveFormats&&this.contextSetActiveFormats(e=>(0,u.A)(e,a)?e:a)}showTooltip(e,t){let a=this.getSelection();if(a&&a.length>0)return;let n=e.getAttribute("data-id"),r=e.getAttribute("data-secondary-object-id"),i="UNVERIFIED"!==n&&(0,z.A)(n)?n:null,l="UNVERIFIED"!==n&&(0,e6.A)(n)?n:null,o=(0,e3.A)(n)?n:null,s=e.getAttribute("data-title"),c=e.classList.contains("emoji"),d=null;if((0,G.A)(n)?d=n:(0,G.A)(r)&&(d=r),!c&&!s&&!(i||d||l||o))return;this.mentionReplaceTimer&&(clearTimeout(this.mentionReplaceTimer),this.mentionReplaceTimer=null);let m=e.getClientRects(),u=t&&Array.from(m).find(e=>t.clientY>=e.top&&t.clientY<=e.bottom&&t.clientX>=e.left&&t.clientX<=e.right)||m[0];this.setState(()=>({tooltipShowing:!0,tooltipMemberId:i,tooltipUserGroupId:l,tooltipChannelId:d,tooltipMessageTs:o,tooltipTitle:s,tooltipTargetBounds:u}))}hideTooltip(){this.setState(()=>({tooltipShowing:!1,tooltipMemberId:void 0,tooltipUserGroupId:void 0,tooltipChannelId:void 0,tooltipMessageTs:void 0,tooltipTitle:void 0,tooltipTargetBounds:void 0}))}showLinkForm({source:e}){this.preventToolbarOnNextSelection=!0,this.props.openTextyLinkFormBasedOnSelection({textyInstance:this.instance,source:e})}promiseToSearchMembers(e){let{channelId:t,enableBroadcastKeywords:a,includeAllBroadcastKeywords:n}=this.props;return this.props.autocompleteMembers({query:e,enableBroadcastKeywords:a,includeAllBroadcastKeywords:n,channelId:t})}promiseToSearchChannels(e){return this.props.autocompleteChannels({query:e})}promiseToSearchEmoji(e){return this.props.autocompleteEmoji({query:e})}renderPasteLimitDialog(){return n.createElement(N.Ay,{title:t1.t("That\u2019s a bit too long to paste"),goButtonText:t1.t("OK")},t1.t("To keep things running smoothly, there\u2019s a limit on the number of characters you can paste into Slack."))}setPlaceholder(e){let{teamId:t}=this.props,a=this.container?.querySelector(".ql-placeholder");this.placeholderRoot=mountTextyPlaceholder(t,a,e)??void 0}updatePlaceholder(){let{placeholder:e,teamId:t}=this.props,a=this.container?.querySelector(".ql-placeholder");this.placeholderRoot=rerenderTextyPlaceholder(a,e,t,this.placeholderRoot)??void 0}unmountPlaceholder(){var e,t;e=this.container?.querySelector(".ql-placeholder"),t=this.placeholderRoot,this.props.experimentReact19UseCreateRootGroupOn?setTimeout(()=>(0,eZ.Wd)(e,t),0):(0,eZ.Wd)(e,t),this.placeholderRoot=void 0}render(){let{className:e,isExpanded:t,isInvalid:a,isSingleLine:r,maxLines:o,minLines:s,useFocusRing:c,size:d,enableActionsButton:m,a11yUnderlineLinks:u,noSingleLineStyling:h}=this.props,{numCharsOverLimit:_,tooltipShowing:f,tooltipMemberId:b,tooltipUserGroupId:g,tooltipChannelId:y,tooltipMessageTs:A,tooltipTitle:E,tooltipTargetBounds:C,indicateTopScroll:k,indicateBottomScroll:v}=this.state,S=(0,p.A)(s)&&s>0?s:1,I=(0,p.A)(o)&&o>0?o:void 0,w=(0,eY.i)({minLines:S,maxLines:I}),T=i()("c-texty_input_unstyled__container",`c-texty_input_unstyled__container--size_${d}`,{"c-texty_input_unstyled__container--multi_line":!r,"c-texty_input_unstyled__container--single_line":r&&!h,"c-texty_input_unstyled__container--use_focus_ring":c,"c-texty_input_unstyled__container--expanded":t,"c-texty_input_unstyled__container--invalid":a,"c-texty_input_unstyled__container--no_actions":!m,"c-texty_input_unstyled__container--with_warning":this.hasWarning(),"c-texty_input_unstyled__container--with_underlined_links":u,"c-texty_input_unstyled__container--multiline_overflow--top":!r&&k,"c-texty_input_unstyled__container--multiline_overflow--bottom":!r&&v});return n.createElement("div",{className:T,"data-buttons":getNumInsetButtons(this.props)},n.createElement("div",{className:e,...(0,x.A)(this.props),style:w,ref:this.setContainerRef,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,onDrop:this.onDrop,onFocus:l.A,onBlur:l.A}),this.hasWarning()&&n.createElement(ev,{numCharsOverLimit:_}),f&&n.createElement(TextyTooltip,{memberId:b,userGroupId:g,channelId:y,messageTs:A,title:E,targetBounds:C}),n.createElement(R.A.Consumer,null,({setTextyInstance:e,setIsFocused:t,setActiveFormats:a,setToolbarOverflowVisible:n,setToolbarPositionData:r}={})=>{this.contextSetTextyInstance=e,this.contextSetIsFocused=t,this.contextSetActiveFormats=a,this.contextSetToolbarOverflowVisible=n,this.contextSetToolbarPositionData=r}))}};t4.displayName="TextyInput";let t5={openModal:tS.q,autocompleteMembers:tg.A,autocompleteChannels:tf.A,autocompleteEmoji:tb.A,showMarkdownPasteToast:tV,showUndoTableBlockCreationToast:t0,showSendTableAsSnippetToast:tZ,showOnlyOneTableCanBeAttachedToast:t$,openTextyEditLinkModal:e=>(0,tA.A)(e),openTextyLinkFormModal:e=>(0,tE.A)(e),closeTextyModals:ty.A,openTextyLinkFormBasedOnSelection:e=>(0,tx.A)(e),dragLinksToComposer:e=>(0,e$.A)(e),bulkClearBlockUnfurls:e=>(0,tc.O4)(e)},t3=(0,tu.N)((e,t)=>{let{isExpanded:a,forcePlainTextModeDisabled:n,forceEnterCreatesNewline:r}=t,i=(0,tC.kx)(e),l=(0,eX.ZV)(e),o=!1;return t.draftId&&(o=(0,tm.sz)(e,{draftId:t.draftId,status:td.o.DRAFT}).some(e=>e?.type==="table")),{clogger:(0,e1.eo)({state:e}),teamId:(0,tp.JY)(e),enableSpellCheck:!!(0,t_.ty)(e,"webapp_spellcheck"),userHighlightWords:(0,th.A)(e),isEmojiDisplayedAsText:(0,eJ.P)(e),overlayIsOpen:l,enableEmoticons:!!(0,t_.ty)(e,"convert_emoticons"),enableStickyComposer:i,locale:(0,e5.Yp)(),emojiNames:(0,$.CK)(e),enterCreatesNewlinePref:!!r||(0,ti.A)(e,a),usePreNewlines:!!(0,t_.ty)(e,"enter_is_special_in_tbt"),isPlainTextModeEnabledPref:!n&&!!(0,t_.ty)(e,"plain_text_mode"),isAttentionOnChat:(0,eX.xT)(e),textyModalIsOpen:(0,tl.A)((0,tv.wc)(e).map(e=>e.name||"")),a11yUnderlineLinks:!!(0,t_.ty)(e,"underline_links"),hasTableAttachment:o,experimentFeLinkTokenizationGroupOn:"on"===(0,tk._Z)(e,"fe_link_tokenization"),experimentFeLinkTokenizationStringsGroupOn:"on"===(0,tk._Z)(e,"fe_link_tokenization_strings"),experimentTruncateUrlGroupOn:"on"===(0,tk._Z)(e,"truncate_url"),experimentFeLinkTokenizationKeyboardAlternativeGroupOn:"on"===(0,tk._Z)(e,"fe_link_tokenization_keyboard_alternative"),experimentReact19UseCreateRootGroupOn:"on"===(0,tk._Z)(e,"react_19_use_create_root")}},t5,null,{forwardRef:!0})(t4)},0x149af4496:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x20482ad21),o=a(0x238ee6f5d),s=a(0x2378cf6ec),c=a(0x4b8e0952),d=a(0x226892387),m=a(0xe684f705);let u=new l.Ay("channel_token"),p=(0,n.Ar)()?e=>{let t,a,n=(0,r.c)(8),{userId:l,isFirst:p,isSelf:h}=e,_=(0,d.d4)(e=>(0,m.nv)(e,l))??void 0;n[0]!==l?(t=e=>(0,s.I)(e,l),n[0]=l,n[1]=t):t=n[1];let f=(0,d.d4)(t);if((0,c.tJ)(_)){let e;return n[2]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(o.A,{type:"unknown",subtler:!0}),n[2]=e):e=n[2],e}if((0,c.ow)(_)){let e;return n[3]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(o.A,{type:"non-existent",subtler:!0}),n[3]=e):e=n[3],e}if(h){let e;n[4]!==p?(e=p?u.t("You"):u.t("you"),n[4]=p,n[5]=e):e=n[5],f=e}return n[6]!==f?(a=i.createElement(i.Fragment,null,f),n[6]=f,n[7]=a):a=n[7],a}:({userId:e,isFirst:t,isSelf:a})=>{let n=(0,d.d4)(t=>(0,m.nv)(t,e))??void 0,r=(0,d.d4)(t=>(0,s.I)(t,e));return(0,c.tJ)(n)?i.createElement(o.A,{type:"unknown",subtler:!0}):(0,c.ow)(n)?i.createElement(o.A,{type:"non-existent",subtler:!0}):(a&&(r=t?u.t("You"):u.t("you")),i.createElement(i.Fragment,null,r))};p.displayName="TooltipMemberName";let h=i.memo(p)},0x1aa23d71:(e,t,a)=>{"use strict";a.d(t,{Aw:()=>m,K1:()=>d,Zt:()=>c,lw:()=>getIsSlackbotConversation});var n=a(0x20b4dda68),r=a(0x280afe13),i=a(0x3711e82d),l=a(0x45012309),o=a(0x11c82607b),s=a(0x217553e42);function getIsSlackbotConversation(e,t){if(!t)return!1;let a=(0,s.OL)(e,t);return(0,r.e)(a)===n.Q$}let c=(0,o.Ay)("Clog when toggling WYSIWYG formatting controls",(e,t,{isEnabled:a})=>{(0,l.eo)({getState:t}).track(i.EventId.MSG_FORMATTING_TOOLBAR_TOGGLE,{contexts:{ui_context:{ui_properties:{element_value:a?"sticky":"floating"}}}})});c.meta={name:"clogFormattingToggle",key:"createThunkClogFormattingToggle",description:"Clog when toggling WYSIWYG formatting controls"};let d=(0,o.Ay)("Clog when clicking the emoji button",(e,t)=>{(0,l.eo)({getState:t}).track(i.EventId.MSG_BTN_EMOJI)});d.meta={name:"clogEmojiClick",key:"createThunkClogEmojiClick",description:"Clog when clicking the emoji button"};let m=(0,o.Ay)("Clog when clicking the mention button",(e,t,{channelId:a}={})=>{let n=t();(0,l.eo)({state:n}).track(i.EventId.MSG_BTN_MENTIONS,{is_slackbot_conversation:getIsSlackbotConversation(n,a)})});m.meta={name:"clogMentionClick",key:"createThunkClogMentionClick",description:"Clog when clicking the mention button"}},0x54e399f4:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0x118cdcdea),r=a.n(n),i=a(0x53f531a4),l=a(0x82980ab8),o=a(0x6e20c837),s=a(0x1aee7b9ef),c=a(0xa3534e17),d=a(0x11c82607b),m=a(0x217553e42),u=a(0x14149c126),p=a(0xe684f705);let h=(0,d.Ay)("Support dragging links to texty inputs",(e,t,{dragEvent:a,inputProxy:n})=>{if(!n)return null;let d=a?.dataTransfer?.getData("text/uri-list");if(!d)return null;let h=(0,s.A)(d);if(!h.length)return null;let _=t(),f=h[0],b=(0,o.$N)(_,f.url);if(h&&1===h.length&&f.text===d){let e=n.getSelection(),t=e?.index??0,a=new(r());if(t>0&&(b||f.text&&f.url)){let e=(n.getText()??"")[t-1];" "!==e&&`
`!==e&&a.insert(" ")}if(b?.type===o.im.MEMBER){let e=(0,p.nv)(_,b?.memberId);if(!e?.id)return a;let t=(0,c.A)(e.id,`@${(0,l.Gt)(e)}`,[]);t?.label&&a.insert(t.label,t)}else if(b?.type===o.im.MESSAGE)if(b?.ts)"on"===(0,u._Z)(_,"fe_link_tokenization")?a.insert(f.url,{slackslug:{id:f.url,label:f.url}}):a.insert(`${f.text}`,{link:f.url});else{let e=(0,m.OL)(_,b?.channelId);if(!b?.channelId)return a;let t=(0,c.A)(b?.channelId,`#${(0,i.j)(e)}`,[]);t?.label&&a.insert(t.label,t)}else f?.text&&f?.url&&!b&&a.insert(`${f.text}`,{link:f.url});return t<(n.getLength()??0)&&(b||f.text&&f.url)&&" "!==(n.getText()??"")[t+1]&&a.insert(" "),a}return null});h.meta={name:"dragLinksToComposer",key:"createThunkDragLinksToComposer",description:"Support dragging links to texty inputs"};let _=h},0xbbbfd440:(e,t,a)=>{"use strict";function getTextyLinesCSSVariables({minLines:e,maxLines:t}){return{...e&&{"--min-lines":e},...t&&{"--max-lines":t}}}a.d(t,{i:()=>getTextyLinesCSSVariables})},0xd95b350:(e,t,a)=>{"use strict";a.r(t),a.d(t,{ActiveOnlyNewBadge:()=>h});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x1fd3f6e20),c=a(0x226892387),d=a(0x14149c126),m=a(0xf3c65e54),u=a(0x5b1935a6);let p=new o.Ay("filter_dormant_channels"),h=(0,n.DA)()?()=>{let e,t,a,n=(0,r.c)(7),o=(0,l.wA)(),d=(0,c.d4)(_temp);if(n[0]!==o?(e=()=>{let e=!1,t=setTimeout(()=>{e=!0},5e3);return()=>{clearTimeout(t),e&&(o((0,m.A)({notificationName:u.ze.MORE_SIDEBAR_MENU_ACTIVE_ONLY_NEW_BADGE,action:u.hw.IMPRESSION})),o((0,m.A)({notificationName:u.ze.MORE_SIDEBAR_MENU_ACTIVE_ONLY_NEW_BADGE,action:u.hw.DISMISS})))}},t=[o],n[0]=o,n[1]=e,n[2]=t):(e=n[1],t=n[2]),(0,i.useEffect)(e,t),d){if(n[3]!==d){let e,t;n[5]===Symbol.for("react.memo_cache_sentinel")?(e={className:"inline margin_left_50"},n[5]=e):e=n[5],n[6]===Symbol.for("react.memo_cache_sentinel")?(t={style:s.u.InverseInformative,isMicro:!0},n[6]=t):t=n[6],a=i.createElement("div",e,i.createElement(s.v,t,d?p.t("NEW"):"NEW")),n[3]=d,n[4]=a}else a=n[4];return a}}:()=>{let e=(0,l.wA)(),t=(0,c.d4)(e=>"on"===(0,d._Z)(e,"filter_dormant_channels"));if((0,i.useEffect)(()=>{let t=!1,a=setTimeout(()=>{t=!0},5e3);return()=>{clearTimeout(a),t&&(e((0,m.A)({notificationName:u.ze.MORE_SIDEBAR_MENU_ACTIVE_ONLY_NEW_BADGE,action:u.hw.IMPRESSION})),e((0,m.A)({notificationName:u.ze.MORE_SIDEBAR_MENU_ACTIVE_ONLY_NEW_BADGE,action:u.hw.DISMISS})))}},[e]),t)return i.createElement("div",{className:"inline margin_left_50"},i.createElement(s.v,{style:s.u.InverseInformative,isMicro:!0},t?p.t("NEW"):"NEW"))};function _temp(e){return"on"===(0,d._Z)(e,"filter_dormant_channels")}h.displayName="ActiveOnlyNewBadge"},0x17a53869:(e,t,a)=>{"use strict";a.d(t,{$:()=>em});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0xf8dd7f80),s=a(0x20482ad21),c=a(0x4ddac097),d=a(0x99233ecb),m=a(0x2501a2cee),u=a(0x1fd3f6e20),p=a(0x1fdec3e16),h=a(0x120c268ad),_=a.n(h),f=a(0x40c0d834),b=a(0x62a17882),g=a(0x2b7f0bcc),y=a(0x1b88285e4),A=a(0x1d2cd7755),x=a(0x139c79d16),E=a(0xa5dbe09b),C=a(0x410829f8),k=a(0x189a28b3e),v=a(0x15e39ab9e),S=a(0xc677a6f6),I=a(0x1e9c618f9);let w=new s.Ay("prefs"),DisabledNotificationsDescription=({notificationDisabledType:e,teamId:t})=>e===S.ur.NotYetAllowed?i.createElement(i.Fragment,null,w.t("To set your notifications for this channel, you\u2019ll need to enable desktop notifications first.")):e===S.ur.NotAllowed?i.createElement(i.Fragment,null,w.t("To enable notifications for Slack, you\u2019ll need to allow notifications in your web browser\u2019s preferences first.")):e===S.ur.Impossible?i.createElement(i.Fragment,null,w.rt("Your browser does not support desktop notifications. <a>Try using our app instead.</a>",null,({key:e,text:a})=>i.createElement(v.A,{href:(0,I.J)({teamId:t}),key:e,target:"_blank"},a))):null;DisabledNotificationsDescription.displayName="DisabledNotificationsDescription";var T=a(0x1e46ae87a),N=a(0x1dcfefeba),M=a(0x10084facf),R=a(0x1059ba41d),P=a(0xea26e4ea),L=a(0x238b287cf),O=a(0x21d145283),D=a(0x12c06dfaa);async function checkMacOSNotificationsDisabled(){if(!(0,b.cX)()||!(0,R.g9M)())return!1;try{return(await (0,D.A)()).includes("MACOS_NOTIFICATIONS_DISABLED")}catch{return!1}}var F=a(0x71e68ec7),U=a(0x20e80190e),B=a(0x15ebe2ca0),H=a(0x1ae731f57),W=a(0x3711e82d),V=a(0xc4548bcd),G=a(0x9b971e7e),q=a(0x226892387),j=a(0x217553e42),z=a(0x1fcbb004d),K=a(0x11eae4d05),$=a(0x2244f10f),Y=a(0x1c13ca946),Q=a(0x1f81b24f1),Z=a.n(Q);let J=new s.Ay("prefs"),ChannelNotificationsPrefsModal=({channelId:e})=>{let t,a,n=(0,l.wA)(),r=(0,L.A)(),s=(0,o.getGenericLogger)({label:"CUSTOMIZE-CHANNEL-NOTIFICATIONS-MODAL"}),[c,d]=(0,i.useState)(!1),[u,p]=(0,i.useState)(!1),[h,v]=(0,i.useState)(!1),[w,D]=(0,i.useState)(!1),K=(0,i.useCallback)(()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_ACTIVE,action:W.UiAction.CLICK,ui_properties:{element_name:"close_modal",element_type:W.ElementType.BUTTON}}}}),v(!1),n((0,z.O)())},[n,r]),Q=(0,q.d4)(t=>(0,j.OL)(t,e)),X=(0,q.d4)(G.ZT),ee=(0,O.N)(Q),et=(0,q.d4)(t=>(0,F.gn)(t,e)),ea=(0,T.pA)(et),en=(0,q.d4)(t=>(0,F.u0)(t,e)),er=(0,q.d4)(t=>(0,F.u0)(t,e)),ei=(0,q.d4)(t=>(0,F.mo)(t,e)),el=(0,q.d4)(t=>(0,$.aG)(t,e,S.o7.MobilePushOverride)),eo=(0,q.d4)(t=>(0,$.aG)(t,e,S.o7.FollowAllThreads)),es=!(0,q.d4)(t=>(0,$.aG)(t,e,S.o7.SuppressAtChannel)),ec=(0,q.d4)(t=>(0,$.aG)(t,e,S.o7.BadgeAllUnreads)),ed=(0,q.d4)(t=>{let a=(0,$.pK)(t,e);return!!a?.muted}),em=(0,F.ug)(),eu=!w&&(!em||"u">typeof Notification&&"granted"===Notification.permission)&&en,ep=(0,M.Q)({desktopNotificationPref:ea,desktopPushEnabled:eu,mobilePushEnabled:el!==S.P$.Nothing});(0,i.useEffect)(()=>{(async()=>{if((0,b.cX)()&&(0,R.g9M)())try{let t=await checkMacOSNotificationsDisabled();s.info("macOS notifications check on mount",{channelId:e,isMacOSDisabled:t}),t&&D(!0)}catch(t){s.warn("Error checking macOS notifications on mount",{channelId:e,error:t instanceof Error?t.message:String(t)})}})()},[e,s]);let eh=""===ei?ea:(0,T.pA)(ei),e_=eh===S.P$.Everything,ef=eh===S.P$.Mentions,eb=ea===S.P$.Everything,eg=ea===S.P$.Mentions,ey=(0,T.tz)(ea,ed),eA=(0,T.Km)(ea,ed),ex=e_&&ea===S.P$.Everything,eE=ef&&ea===S.P$.Mentions,eC=ex?J.t("Same as desktop"):(0,T.oI)(),ek=eE?J.t("Same as desktop"):(0,T.NO)(!es),ev=(0,i.useCallback)((t,a)=>(s.info("Notification preference change initiated",{channelId:e,prefName:t,newValue:a,newValueType:typeof a,apiCall:"setChannelNotificationOverrideAndCallApi"}),d(!1),n((0,Y.My)({name:t,value:a,channelId:e})).then(n=>{s.info("Notification preference API response",{channelId:e,prefName:t,newValue:a,success:n?.ok,response:n}),n?.ok||(s.warn("Notification preference API failed",{channelId:e,prefName:t,newValue:a,response:n}),d(!0))}).catch(n=>{throw s.warn("Notification preference API exception",{channelId:e,prefName:t,newValue:a,error:n?.message||"unknown_exception",stack:n?.stack}),d(!0),n})),[e,n,s]),eS=(0,i.useCallback)((e,t)=>()=>ev(e,!t),[ev]),renderIconWrapper=()=>i.createElement("div",{className:Z().iconWrapper},i.createElement(m.Ah,{name:eA,size:"24"}));renderIconWrapper.displayName="renderIconWrapper";let eI=(0,i.useCallback)(t=>{let a=t.target.value;return r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_DEVICE,action:W.UiAction.CLICK,ui_properties:{element_name:a===S.P$.Everything?"every_message_sent_radio":"just_mentions_radio",element_type:W.ElementType.RADIO}}}}),n((0,Y.My)({name:S.o7.MobilePushOverride,value:a,channelId:e}))},[e,n,r]),ew=(0,i.useCallback)(()=>(r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_ACTIVE,action:W.UiAction.CLICK,ui_properties:{element_name:"follow_every_thread",element_type:W.ElementType.BUTTON}}}}),eS(S.o7.FollowAllThreads,!!eo)()),[r,eS,eo]),eT=(0,i.useCallback)(()=>(r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_ACTIVE,action:W.UiAction.CLICK,ui_properties:{element_name:"get_broadcast_messages",element_type:W.ElementType.BUTTON}}}}),eS(S.o7.SuppressAtChannel,!es)()),[r,eS,es]),eN=(0,i.useCallback)(()=>(r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_BADGE_ALL_UNREADS,action:W.UiAction.CLICK,ui_properties:{element_name:"badge_every_unread_message",element_type:W.ElementType.BUTTON}}}}),eS(S.o7.BadgeAllUnreads,!!ec)()),[r,eS,ec]),eM=(0,i.useCallback)(async()=>{if(r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_DEVICE,action:W.UiAction.CLICK,ui_properties:{element_name:"get_push_notifications_on_desktop",element_type:W.ElementType.BUTTON}}}}),(0,b.cX)()&&(0,R.g9M)()){let t=await checkMacOSNotificationsDisabled();if(s.info("Real-time macOS notifications check on toggle",{channelId:e,isMacOSDisabled:t}),t){D(!0),p(!0);return}}let t="u">typeof Notification?Notification.permission:void 0;if(em&&"granted"!==t)return void p(!0);s.info("Desktop push toggle initiated",{channelId:e,desktopPushOverrideSetting:er,pushNotificationsOn:en,prefName:S.o7.PushNotifications,prefValue:"desktop_push_enabled"});let a=void 0!==er?!er:!en;s.info("Desktop push toggle calculated new value",{channelId:e,hasChannelOverride:void 0!==er,currentOverrideValue:er,currentCalculatedValue:en,newValue:a,newValueType:typeof a});let n=await ev(S.o7.PushNotifications,a);return s.info("Desktop push toggle completed",{channelId:e,result:n}),n},[ev,er,en,s,e,em,p,r]),eR=(0,i.useCallback)(()=>{let e;r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_DEVICE,action:W.UiAction.CLICK,ui_properties:{element_name:"get_push_notifications_on_mobile",element_type:W.ElementType.BUTTON}}}});let t=el!==S.P$.Nothing;return t?(e=S.P$.Nothing,v(!1)):e=ea||S.P$.Mentions,s.info("Mobile push notifications toggle changed",{currentMobilePushOverrideSetting:ei,rawMobilePushOverrideSetting:el,isCurrentlyOn:t,newValue:e,newValueType:typeof e,desktopSetting:ea,action:t?"turning_off_mobile":"turning_on_mobile"}),ev(S.o7.MobilePushOverride,e)},[ev,ei,el,ea,s,r]),eP=(0,i.useCallback)(async()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_NOT_YET_ALLOWED,action:W.UiAction.CLICK,ui_properties:{element_name:"enable_notifications",element_type:W.ElementType.BUTTON}}}});let t=Notification.permission;if(await n((0,N.Tq)()),p(!1),"granted"===Notification.permission&&"granted"!==t){s.info("Browser notifications enabled, proceeding with toggle",{channelId:e,permissionBefore:t,permissionAfter:Notification.permission});let a=void 0!==er?!er:!en;await ev(S.o7.PushNotifications,a)}else if("granted"===Notification.permission){let e=void 0!==er?!er:!en;await ev(S.o7.PushNotifications,e)}},[r,n,s,e,er,en,ev]),eL=(0,i.useCallback)(()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_IMPOSSIBLE,action:W.UiAction.CLICK,ui_properties:{element_name:"download_app",element_type:W.ElementType.BUTTON}}}}),(0,V.A)((0,I.J)({teamId:X??void 0})),p(!1)},[r,X]),eO=(0,i.useCallback)(()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_MACOS_DISABLED,action:W.UiAction.CLICK,ui_properties:{element_name:"open_macos_settings",element_type:W.ElementType.BUTTON}}}}),P.Jd&&(0,V.A)(P.Jd),p(!1)},[r]),eD=(0,i.useCallback)(()=>w?i.createElement("span",{className:"display_flex align_items_center"},i.createElement("span",{className:"margin_right_25"},i.createElement(m.Ah,{name:"new-window"})),J.t("Open System Settings",{fallbackHash:"b5f610b3442e124ab9bede8e8e595deef8dce164"})):em===S.ur.NotYetAllowed?i.createElement("span",{className:"display_flex align_items_center"},i.createElement("span",{className:"margin_right_25"},i.createElement(m.Ah,{name:"new-window"})),J.t("Enable Browser Notifications",{fallbackHash:"b5f610b3442e124ab9bede8e8e595deef8dce164"})):em===S.ur.Impossible?i.createElement("span",{className:"display_flex align_items_center"},i.createElement("span",{className:"margin_right_25"},i.createElement(m.Ah,{name:"new-window"})),J.t("Download App")):J.t("OK"),[w,em]),eF=(0,i.useCallback)(()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_NOT_ALLOWED,action:W.UiAction.CLICK,ui_properties:{element_name:"ok_not_allowed_speedbump",element_type:W.ElementType.BUTTON}}}}),p(!1)},[r]),eU=(0,i.useCallback)(()=>w?eO:em===S.ur.NotYetAllowed?eP:em===S.ur.Impossible?eL:eF,[w,eO,em,eP,eL,eF]),eB=(0,i.useCallback)(()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:em===S.ur.NotYetAllowed?W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_NOT_YET_ALLOWED:em===S.ur.NotAllowed?W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_NOT_ALLOWED:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_IMPOSSIBLE,action:W.UiAction.CLICK,ui_properties:{element_name:"cancel_enable_push_notifications",element_type:W.ElementType.BUTTON}}}}),p(!1)},[r,em]),eH=(0,i.useCallback)(()=>{r.track(W.EventId.CHANNEL_NOTIFICATION_SETTINGS,{contexts:{ui_context:{step:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_DEVICE,action:W.UiAction.CLICK,ui_properties:{element_name:"customize_mobile_push_notifications",element_type:W.ElementType.BUTTON}}}}),v(!h)},[h,r]),eW=w?i.createElement("span",null,J.t("Notifications for Slack are disabled in your macOS System Settings. To receive push notifications, you\u2019ll need to enable them in System Settings.",{fallbackHash:"35f79a0799e353bdab9260b14b2722438fb16093"})):i.createElement(DisabledNotificationsDescription,{notificationDisabledType:em,teamId:X??void 0}),eV=w||em!==S.ur.NotAllowed?{cancelButtonLabel:J.t("Cancel"),onCancel:eB}:{};return i.createElement(f.A,{eventId:W.EventId.CHANNEL_NOTIFICATION_SETTINGS,uiStep:W.UiStep.CHANNEL_NOTIFICATION_SETTINGS_ACTIVE,clogImpression:!0},i.createElement(U.dW,{closeModal:K,labelledby:"channel-notifications-modal-title",maxWidth:600},i.createElement(U.rQ,null,i.createElement(U.Rc,{id:"channel-notifications-modal-title",title:J.t("Advanced options"),subtitle:ey,icon:renderIconWrapper()})),i.createElement(U.$m,null,c?i.createElement(U.qf,null,i.createElement("div",{className:"margin_bottom_75"},i.createElement(g.Ay,{type:g.QE.boxed,level:g.A_.error,align:"left"},i.createElement("span",{className:Z().modalAlertText},J.t("Unable to update your notification preferences. Please try again later."))))):null,ep&&i.createElement(U.qf,null,i.createElement("div",{className:"margin_bottom_100"},i.createElement(g.Ay,{level:g.A_.warning},J.rt("If you want to be notified about <strong>all new posts</strong>, you\u2019ll need to turn desktop or mobile notifications on.")))),i.createElement(U.qf,null,i.createElement(A.A,{text:J.t("Desktop notifications",{fallbackHash:"19af9e829536e93aae050372e0104cc254ec36c9"}),subtext:J.t("You\u2019ll see a banner when new messages come in.",{fallbackHash:"8f132c454b16e495c660899a7232cef69032bcd9"}),className:Z().label},i.createElement(k.A,{ariaLabel:J.t("Get push notifications on desktop"),id:"desktop_push_notifications_toggle",isToggled:eu,onChange:eM,className:Z().switch}))),i.createElement(U.qf,null,i.createElement(A.A,{text:J.t("Mobile notifications",{fallbackHash:"42cfb88b8f10efe705580baf9260fd83aa15d9c3"}),className:_()(Z().label)},i.createElement(k.A,{ariaLabel:J.t("Get push notifications on mobile"),id:"mobile_push_notifications_toggle",isToggled:el!==S.P$.Nothing,onChange:eR,className:Z().switch}))),!ed&&i.createElement(i.Fragment,null,i.createElement(U.qf,null,i.createElement("div",{className:_()(Z().advancedOverridesLink,{[Z().linkWithPadding]:!h})},i.createElement(y.A,{className:Z().toggleLink,onClick:eH,"aria-expanded":h,disabled:el===S.P$.Nothing},h?J.t("Hide advanced mobile overrides",{fallbackHash:"ea2eb16ae6423367f06e7305114786c7edced0af"}):J.t("Show advanced mobile overrides",{fallbackHash:"ea2eb16ae6423367f06e7305114786c7edced0af"}),i.createElement("span",{className:Z().chevron},i.createElement(m.Ah,{name:h?"caret-up":"caret-down",size:"20"})))),i.createElement("div",{className:_()(Z().mobileOverrideBannerContainer,{[Z().mobileOverrideBannerOpen]:h,[Z().mobileOverrideBannerClosed]:!h}),"aria-hidden":!h},i.createElement("div",{className:Z().mobileOverrideBanner},i.createElement("h3",{className:Z().bannerTitle},J.t("Get different push notifications on mobile",{fallbackHash:"e544ec669a568b373b157c97568372e13ad787c4"})),i.createElement(E.A,{className:"margin_bottom_0"},i.createElement(A.A,{text:(0,T.B0)(S.P$.Everything),subtext:eC,htmlFor:"every-message-sent-radio-button",type:"inline"},i.createElement(x.A,{id:"every-message-sent-radio-button",name:"mobile_notification_setting",value:S.P$.Everything,checked:e_,onChange:eI})),i.createElement(A.A,{text:(0,T.B0)(S.P$.Mentions),subtext:ek,htmlFor:"just-mentions-radio-button",type:"inline"},i.createElement(x.A,{id:"just-mentions-radio-button",name:"mobile_notification_setting",value:S.P$.Mentions,checked:ef,onChange:eI})))))),i.createElement("hr",{className:Z().divider}))),!ed&&eb&&(t=i.createElement(C.Gm,{count:1,style:C.rY.themed,className:Z().mentionBadge}),a=J.rt("Show a badge ({unreadBadge}) on the channel name for every new message.",{unreadBadge:t,fallbackHash:"f4c2247481835ed6e838be3e25700c899ca3a0e9"}),i.createElement(U.qf,null,i.createElement(A.A,{text:J.t("Badge every new message in your sidebar",{fallbackHash:"d8d2937af6d3c72a7d9f8b2487bc07bdc74e0edc"}),subtext:a,className:Z().label},i.createElement(k.A,{ariaLabel:J.t("Badge every new message in your sidebar",{fallbackHash:"d8d2937af6d3c72a7d9f8b2487bc07bdc74e0edc"}),id:"badge_all_unreads_toggle",isToggled:!!ec,onChange:eN,className:Z().switch})))),!ed&&i.createElement(i.Fragment,null,i.createElement(U.qf,null,i.createElement(A.A,{text:J.t("Follow every thread"),subtext:J.t("Get notified about every new thread and its replies."),className:Z().label},i.createElement(k.A,{ariaLabel:J.t("Follow every thread"),id:"threads_toggle",isToggled:!!eo,onChange:ew,className:Z().switch}))),eg&&i.createElement(U.qf,null,i.createElement(A.A,{text:J.t("Get broadcast messages"),subtext:J.rt("Be notified anytime someone uses {atChannel} or {atHere}.",{atChannel:i.createElement("strong",null,"@",(0,H.A)(ee?B.N.BKeveryone:B.N.BKchannel)),atHere:i.createElement("strong",null,"@",(0,H.A)(B.N.BKhere))}),className:Z().label},i.createElement(k.A,{ariaLabel:J.t("Get broadcast messages"),id:"mentions_toggle",isToggled:es,onChange:eT,className:Z().switch})))),i.createElement("div",{className:"margin_bottom_75"}),u&&i.createElement(U.jl,null,i.createElement(U.ty,{description:eW,...eV,autoFocusContinueButton:!0,continueButtonLabel:eD(),continueButtonType:"primary",onContinue:eU()}))))};ChannelNotificationsPrefsModal.displayName="ChannelNotificationsPrefsModal";let X=(0,K.e)(ChannelNotificationsPrefsModal);var ee=a(0x1be37a18e);let et=new s.Ay("prefs");function getChannelPushNotificationStatus(e,t){let a=(0,F.u0)(e,t),n=(0,F.mo)(e,t),r=!1===a,i="nothing"===n;return r&&i?et.rt("Push notifications are <strong>off</strong>"):r?et.rt("Desktop push notifications are <strong>off</strong>"):i?et.rt("Mobile push notifications are <strong>off</strong>"):void 0}var ea=a(0x1ccef1c6f),en=a(0x23420bb21),er=a(0x24b37e04d),ei=a(0x14149c126),el=a(0xafce781a),eo=a(0x5b1935a6);let es=new s.Ay("menu"),ec=(0,o.getGenericLogger)(),ed={marginLeft:"8px"},em=(0,n.DA)()?e=>{let t,a,n,o,s,h,_,f,b,g,y,A,x,E,C,k,v,I,w,N,M,R,P,L,O,D,U,B,H,V,G,j=(0,r.c)(155);if(j[0]!==e){let{channelId:r,source:i,isMPDM:l,isDigested:c,onChangeAddToRecap:d,hideDefaultPrefsItem:m,shouldCloseModal:u,setIsPristine:p,...b}=e;t=r,s=i,_=l,f=c,a=m,o=u,n=p,h=b,j[0]=e,j[1]=t,j[2]=a,j[3]=n,j[4]=o,j[5]=s,j[6]=h,j[7]=_,j[8]=f}else t=j[1],a=j[2],n=j[3],o=j[4],s=j[5],h=j[6],_=j[7],f=j[8];let z=void 0!==_&&_,K=(0,l.wA)(),Q="on"===(0,q.d4)(_temp);j[9]!==t?(b=e=>(0,F.gn)(e,t),j[9]=t,j[10]=b):b=j[10];let Z=(0,q.d4)(b);j[11]!==t?(g=e=>(0,F.mo)(e,t),j[11]=t,j[12]=g):g=j[12];let J=(0,q.d4)(g);j[13]!==t?(y=e=>(0,F.qR)(e,t),j[13]=t,j[14]=y):y=j[14];let et=(0,q.d4)(y),ei=void 0!==J&&J!==Z;j[15]!==s?(A=e=>{let t;return"channel_header"===s?t=W.EventId.CHANNEL_HEADER_BELL_ICON_CLICK:"channel_join_banner"===s&&(t=W.EventId.CHANNEL_JOIN_BANNER_NOTIFICATION_PREF_CLICK),{eventId:t,uiStep:W.UiStep.CHANNEL_DETAILS_NOTIFICATIONS,elementValue:e,onClick:{enableClogAction:!0}}},j[15]=s,j[16]=A):A=j[16];let em=A;j[17]!==t?(x=e=>{let a=(0,F.gn)(e,t);if(null===a)return S.P$.Nothing;switch(a){case"everything":return S.P$.Everything;case"mentions_dms":return S.P$.Mentions;case"nothing":return S.P$.Nothing;default:return ec.error(`Unexpected notification setting value: ${a}`),S.P$.Nothing}},j[17]=t,j[18]=x):x=j[18];let eu=(0,q.d4)(x);j[19]!==t?(E=e=>{let a=(0,$.pK)(e,t);return!!a?.muted},j[19]=t,j[20]=E):E=j[20];let ep=(0,q.d4)(E),eh=(0,q.d4)(ea.pJ);j[21]!==t?(C=e=>getChannelPushNotificationStatus(e,t),j[21]=t,j[22]=C):C=j[22];let e_=(0,q.d4)(C);j[23]!==Z||j[24]!==et||j[25]!==ep?(k=e=>{if(!et||ep)return!1;if(Z===e){let e=!1,t=!1,a=!1;Z===S.P$.Everything?(e=!0===et.follow_all_threads,a=!0===et.badge_all_unreads):Z===S.P$.Mentions?(e=!0===et.follow_all_threads,t=!0===et.suppress_at_channel):Z===S.P$.Nothing&&(e=!0===et.follow_all_threads,t=!1===et.suppress_at_channel);let n=void 0!==et.mobile&&et.mobile!==Z;return e||t||a||n}return!1},j[23]=Z,j[24]=et,j[25]=ep,j[26]=k):k=j[26];let ef=k;j[27]===Symbol.for("react.memo_cache_sentinel")?(v=i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},(0,T.oI)())),j[27]=v):v=j[27];let eb=v;if(j[28]!==et?.suppress_at_channel){let e,t,a;j[30]===Symbol.for("react.memo_cache_sentinel")?(e={className:"margin_left_50"},j[30]=e):e=j[30],j[31]===Symbol.for("react.memo_cache_sentinel")?(t={lines:2,breakWords:!0},j[31]=t):t=j[31];let n=et?.suppress_at_channel??!1;j[32]!==n?(a=(0,T.NO)(n),j[32]=n,j[33]=a):a=j[33],I=i.createElement("div",e,i.createElement(p.A,t,a)),j[28]=et?.suppress_at_channel,j[29]=I}else I=j[29];let eg=I;e:{let e;if(eh){let e;j[34]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},es.t("Only badge the channel when someone @mentions you",{fallbackHash:"1c0f55d7683bcec6b2d70c43070e681a9bf18fb0"}))),j[34]=e):e=j[34],w=e;break e}j[35]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},es.t("Only get notified if someone @mentions you personally"))),j[35]=e):e=j[35],w=e}let ey=w;t:{let e;if(!e_){N=null;break t}if(j[36]!==e_){let t;j[38]===Symbol.for("react.memo_cache_sentinel")?(t={className:"margin_left_50"},j[38]=t):t=j[38],e=i.createElement("div",t,e_),j[36]=e_,j[37]=e}else e=j[37];N=e}let eA=N,ex=_temp2;j[39]!==t||j[40]!==K||j[41]!==n?(M=e=>{let a=e.some(_temp3),r=e.map(e=>"desktop"!==e.name&&a&&void 0===e.sync?{...e,sync:!1}:e),i={channelIds:[t],prefs:r,sync:a};K((0,Y.Kp)(i)),n&&n(!1)},j[39]=t,j[40]=K,j[41]=n,j[42]=M):M=j[42];let eE=M;j[43]!==ep?(R=e=>{let t=[...e];return ep&&t.push({name:"muted",value:"false"}),t},j[43]=ep,j[44]=R):R=j[44];let eC=R;j[45]!==eC||j[46]!==ei||j[47]!==eE?(P=()=>{eE(eC((0,T.g2)(T.qV.EVERYTHING,!0,ei)))},j[45]=eC,j[46]=ei,j[47]=eE,j[48]=P):P=j[48];let ek=P;j[49]!==eC||j[50]!==ei||j[51]!==eE?(L=()=>{eE(eC((0,T.g2)(T.qV.MENTIONS,!0,ei)))},j[49]=eC,j[50]=ei,j[51]=eE,j[52]=L):L=j[52];let ev=L;j[53]!==t||j[54]!==K||j[55]!==Q||j[56]!==ep||j[57]!==o||j[58]!==eE?(O=()=>{let e=ep?"false":"true";eE([{name:"muted",value:e}]),Q&&"true"===e&&((0,c.BB)(()=>{K((0,el.u2)({event:{type:eo.jo.CHANNEL_MUTED}}))}),K((0,er.U0)(t)),o&&o())},j[53]=t,j[54]=K,j[55]=Q,j[56]=ep,j[57]=o,j[58]=eE,j[59]=O):O=j[59];let eS=O;j[60]!==t||j[61]!==K?(D=()=>{K(X({channelId:t}))},j[60]=t,j[61]=K,j[62]=D):D=j[62];let eI=D;j[63]!==K?(U=()=>{K((0,en.A)({activeSection:ee._.notifications}))},j[63]=K,j[64]=U):U=j[64];let ew=U,eT=!z;j[65]!==ef?(B=ef(S.P$.Everything)?i.createElement("span",{style:ed},i.createElement(u.v,{isMicro:!0,style:u.u.Informative},es.t("Customized"))):null,j[65]=ef,j[66]=B):B=j[66];let eN=B;j[67]!==ef?(H=ef(S.P$.Mentions)?i.createElement("span",{style:ed},i.createElement(u.v,{isMicro:!0,style:u.u.Informative},es.t("Customized"))):null,j[67]=ef,j[68]=H):H=j[68];let eM=H;a:{let e;if(eh){let e;j[69]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement("div",{className:"margin_left_50"},es.t("Mute and hide")),j[69]=e):e=j[69],V=e;break a}j[70]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement("div",{className:"margin_left_50"},es.t("Mute channel")),j[70]=e):e=j[70],V=e}let eR=V;if(j[71]!==eA||j[72]!==eu||j[73]!==eN||j[74]!==em||j[75]!==a||j[76]!==ep||j[77]!==eg||j[78]!==eM||j[79]!==ey||j[80]!==eR||j[81]!==eI||j[82]!==ew||j[83]!==ek||j[84]!==ev||j[85]!==eT||j[86]!==h||j[87]!==eS){let e,t,n,r,l,o,s;if(j[89]!==h?(e={...h,width:"320"},j[89]=h,j[90]=e):e=j[90],j[91]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement(d.c$,{label:es.t("Notify you about\u2026",{fallbackHash:"878bf59a9dd5cfb5e567e512cad4421c76666df1"})}),j[91]=t):t=j[91],j[92]!==eu||j[93]!==eN||j[94]!==em||j[95]!==ep||j[96]!==ek){let e,t,a,r;if(j[98]!==eN){let t,a;j[100]===Symbol.for("react.memo_cache_sentinel")?(t={className:"margin_left_50"},a=(0,T.B0)(S.P$.Everything),j[100]=t,j[101]=a):(t=j[100],a=j[101]),e=i.createElement("div",t,a,eN),j[98]=eN,j[99]=e}else e=j[99];j[102]===Symbol.for("react.memo_cache_sentinel")?(t=ex(S.P$.Everything),j[102]=t):t=j[102];let l=eu===S.P$.Everything&&!ep;j[103]!==em?(a=em("everything"),j[103]=em,j[104]=a):a=j[104],j[105]!==ek||j[106]!==e||j[107]!==l||j[108]!==a?(r={label:e,description:eb,icon:t,type:"radio",checked:l,onSelected:ek,autoClogProps:a},j[105]=ek,j[106]=e,j[107]=l,j[108]=a,j[109]=r):r=j[109],n=i.createElement(d.Dr,r),j[92]=eu,j[93]=eN,j[94]=em,j[95]=ep,j[96]=ek,j[97]=n}else n=j[97];if(j[110]!==eu||j[111]!==em||j[112]!==ep||j[113]!==eg||j[114]!==eM||j[115]!==ev){let e,t,a,n;if(j[117]!==eM){let t,a;j[119]===Symbol.for("react.memo_cache_sentinel")?(t={className:"margin_left_50"},a=(0,T.B0)(S.P$.Mentions),j[119]=t,j[120]=a):(t=j[119],a=j[120]),e=i.createElement("div",t,a,eM),j[117]=eM,j[118]=e}else e=j[118];j[121]===Symbol.for("react.memo_cache_sentinel")?(t=ex(S.P$.Mentions),j[121]=t):t=j[121];let l=eu===S.P$.Mentions&&!ep;j[122]!==em?(a=em("mentions_dms"),j[122]=em,j[123]=a):a=j[123],j[124]!==eg||j[125]!==ev||j[126]!==e||j[127]!==l||j[128]!==a?(n={label:e,description:eg,icon:t,type:"radio",checked:l,onSelected:ev,autoClogProps:a},j[124]=eg,j[125]=ev,j[126]=e,j[127]=l,j[128]=a,j[129]=n):n=j[129],r=i.createElement(d.Dr,n),j[110]=eu,j[111]=em,j[112]=ep,j[113]=eg,j[114]=eM,j[115]=ev,j[116]=r}else r=j[116];if(j[130]!==em||j[131]!==ep||j[132]!==ey||j[133]!==eR||j[134]!==eS){let e,t,a;j[136]===Symbol.for("react.memo_cache_sentinel")?(e=ex(S.P$.Nothing,!0),j[136]=e):e=j[136];let n=ep?"unmute":"mute";j[137]!==em||j[138]!==n?(t=em(n),j[137]=em,j[138]=n,j[139]=t):t=j[139],j[140]!==ep||j[141]!==ey||j[142]!==eR||j[143]!==t||j[144]!==eS?(a={label:eR,description:ey,icon:e,type:"radio",checked:ep,onSelected:eS,autoClogProps:t},j[140]=ep,j[141]=ey,j[142]=eR,j[143]=t,j[144]=eS,j[145]=a):a=j[145],l=i.createElement(d.Dr,a),j[130]=em,j[131]=ep,j[132]=ey,j[133]=eR,j[134]=eS,j[135]=l}else l=j[135];j[146]!==eA||j[147]!==em||j[148]!==eI||j[149]!==eT?(o=eT&&i.createElement(i.Fragment,null,i.createElement(d.bX,null),i.createElement(d.Dr,{label:i.createElement("div",{className:"margin_left_50"},es.t("Advanced options")),icon:i.createElement(m.Ah,{name:"filters",size:"20"}),onSelected:eI,autoClogProps:em("more_options"),description:eA})),j[146]=eA,j[147]=em,j[148]=eI,j[149]=eT,j[150]=o):o=j[150],j[151]!==em||j[152]!==a||j[153]!==ew?(s=!a&&i.createElement(i.Fragment,null,i.createElement(d.bX,null),i.createElement(d.Dr,{label:es.t("Edit default preferences"),onSelected:ew,autoClogProps:em("preferences")})),j[151]=em,j[152]=a,j[153]=ew,j[154]=s):s=j[154],G=i.createElement(d.Ay,e,t,n,r,l,o,s),j[71]=eA,j[72]=eu,j[73]=eN,j[74]=em,j[75]=a,j[76]=ep,j[77]=eg,j[78]=eM,j[79]=ey,j[80]=eR,j[81]=eI,j[82]=ew,j[83]=ek,j[84]=ev,j[85]=eT,j[86]=h,j[87]=eS,j[88]=G}else G=j[88];return G}:({channelId:e,source:t,isMPDM:a=!1,isDigested:n=!1,onChangeAddToRecap:r,hideDefaultPrefsItem:o,shouldCloseModal:s,setIsPristine:h,..._})=>{let f=(0,l.wA)(),b="on"===(0,q.d4)(e=>(0,ei._Z)(e,"improve_mute_pref")),g=(0,q.d4)(t=>(0,F.gn)(t,e)),y=(0,q.d4)(t=>(0,F.mo)(t,e)),A=(0,q.d4)(t=>(0,F.qR)(t,e)),x=void 0!==y&&y!==g,E=(0,i.useCallback)(e=>{let a;return"channel_header"===t?a=W.EventId.CHANNEL_HEADER_BELL_ICON_CLICK:"channel_join_banner"===t&&(a=W.EventId.CHANNEL_JOIN_BANNER_NOTIFICATION_PREF_CLICK),{eventId:a,uiStep:W.UiStep.CHANNEL_DETAILS_NOTIFICATIONS,elementValue:e,onClick:{enableClogAction:!0}}},[t]),C=(0,q.d4)(t=>{let a=(0,F.gn)(t,e);if(null===a)return S.P$.Nothing;switch(a){case"everything":return S.P$.Everything;case"mentions_dms":return S.P$.Mentions;case"nothing":return S.P$.Nothing;default:return ec.error(`Unexpected notification setting value: ${a}`),S.P$.Nothing}}),k=(0,q.d4)(t=>{let a=(0,$.pK)(t,e);return!!a?.muted}),v=(0,q.d4)(ea.pJ),I=(0,q.d4)(t=>getChannelPushNotificationStatus(t,e)),w=(0,i.useCallback)(e=>{if(!A||k)return!1;if(g===e){let e=!1,t=!1,a=!1;g===S.P$.Everything?(e=!0===A.follow_all_threads,a=!0===A.badge_all_unreads):g===S.P$.Mentions?(e=!0===A.follow_all_threads,t=!0===A.suppress_at_channel):g===S.P$.Nothing&&(e=!0===A.follow_all_threads,t=!1===A.suppress_at_channel);let n=void 0!==A.mobile&&A.mobile!==g;return e||t||a||n}return!1},[A,g,k]),N=(0,i.useMemo)(()=>i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},(0,T.oI)())),[]),M=(0,i.useMemo)(()=>i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},(0,T.NO)(A?.suppress_at_channel??!1))),[A]),R=(0,i.useMemo)(()=>v?i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},es.t("Only badge the channel when someone @mentions you",{fallbackHash:"1c0f55d7683bcec6b2d70c43070e681a9bf18fb0"}))):i.createElement("div",{className:"margin_left_50"},i.createElement(p.A,{lines:2,breakWords:!0},es.t("Only get notified if someone @mentions you personally"))),[v]),P=(0,i.useMemo)(()=>I?i.createElement("div",{className:"margin_left_50"},I):null,[I]),L=(0,i.useCallback)((e,t=!1)=>i.createElement(m.Ah,{name:(0,T.Km)(e,t),size:"20"}),[]),O=(0,i.useCallback)(t=>{let a=t.some(e=>"desktop"===e.name&&!0===e.sync),n=t.map(e=>"desktop"!==e.name&&a&&void 0===e.sync?{...e,sync:!1}:e);f((0,Y.Kp)({channelIds:[e],prefs:n,sync:a})),h&&h(!1)},[e,f,h]),D=(0,i.useCallback)(e=>{let t=[...e];return k&&t.push({name:"muted",value:"false"}),t},[k]),U=(0,i.useCallback)(()=>{O(D((0,T.g2)(T.qV.EVERYTHING,!0,x)))},[D,O,x]),B=(0,i.useCallback)(()=>{O(D((0,T.g2)(T.qV.MENTIONS,!0,x)))},[D,O,x]),H=(0,i.useCallback)(()=>{let t=k?"false":"true";O([{name:"muted",value:t}]),b&&"true"===t&&((0,c.BB)(()=>{f((0,el.u2)({event:{type:eo.jo.CHANNEL_MUTED}}))}),f((0,er.U0)(e)),s&&s())},[k,O,b,f,e,s]),V=(0,i.useCallback)(()=>{f(X({channelId:e}))},[e,f]),G=(0,i.useCallback)(()=>{f((0,en.A)({activeSection:ee._.notifications}))},[f]),j=(0,i.useMemo)(()=>!a,[a]),z=w(S.P$.Everything)?i.createElement("span",{style:ed},i.createElement(u.v,{isMicro:!0,style:u.u.Informative},es.t("Customized"))):null,K=w(S.P$.Mentions)?i.createElement("span",{style:ed},i.createElement(u.v,{isMicro:!0,style:u.u.Informative},es.t("Customized"))):null,Q=(0,i.useMemo)(()=>v?i.createElement("div",{className:"margin_left_50"},es.t("Mute and hide")):i.createElement("div",{className:"margin_left_50"},es.t("Mute channel")),[v]);return i.createElement(d.Ay,{..._,width:"320"},i.createElement(d.c$,{label:es.t("Notify you about\u2026",{fallbackHash:"878bf59a9dd5cfb5e567e512cad4421c76666df1"})}),i.createElement(d.Dr,{label:i.createElement("div",{className:"margin_left_50"},(0,T.B0)(S.P$.Everything),z),description:N,icon:L(S.P$.Everything),type:"radio",checked:C===S.P$.Everything&&!k,onSelected:U,autoClogProps:E("everything")}),i.createElement(d.Dr,{label:i.createElement("div",{className:"margin_left_50"},(0,T.B0)(S.P$.Mentions),K),description:M,icon:L(S.P$.Mentions),type:"radio",checked:C===S.P$.Mentions&&!k,onSelected:B,autoClogProps:E("mentions_dms")}),i.createElement(d.Dr,{label:Q,description:R,icon:L(S.P$.Nothing,!0),type:"radio",checked:k,onSelected:H,autoClogProps:E(k?"unmute":"mute")}),j&&i.createElement(i.Fragment,null,i.createElement(d.bX,null),i.createElement(d.Dr,{label:i.createElement("div",{className:"margin_left_50"},es.t("Advanced options")),icon:i.createElement(m.Ah,{name:"filters",size:"20"}),onSelected:V,autoClogProps:E("more_options"),description:P})),!o&&i.createElement(i.Fragment,null,i.createElement(d.bX,null),i.createElement(d.Dr,{label:es.t("Edit default preferences"),onSelected:G,autoClogProps:E("preferences")})))};function _temp(e){return(0,ei._Z)(e,"improve_mute_pref")}function _temp2(e,t){return i.createElement(m.Ah,{name:(0,T.Km)(e,void 0!==t&&t),size:"20"})}function _temp3(e){return"desktop"===e.name&&!0===e.sync}em.displayName="ChannelNotificationPrefMenu"},0x7eaadf41:(e,t,a)=>{"use strict";a.d(t,{X:()=>markAllAsRead});var n=a(0x20482ad21),r=a(0x230322a4f),i=a(0x1ec69ee01),l=a(0x12185e091),o=a(0x242503693),s=a(0xa624a5c7),c=a(0x11c82607b),d=a(0x165ae5881),m=a(0x8f36a342),u=a(0x217553e42);let p=(0,c.Ay)("Bulk mark channels as read in section",(e,t,a)=>{let n=t(),c=[],{channelSection:p,channelIds:h,sidebarSections:_}=a,f=p.type===m.VZ.DirectMessages,b=_[p.id]?.channelsAssociatedOrdered.filter(e=>{let t=(0,u.OL)(n,e);return f?(0,l.JM)(t):!(0,l.JM)(t)});b?.forEach(e=>{let t=(0,u.OL)(n,e);(0,i.KJ)(t)&&c.push(t)}),e((0,s.H)({focusKey:o.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM})),(0,r.K)("mark_as_read",{channel_section_id:p.id});let g=_?.[p.id]?.channelsAssociatedOrdered??h,y=c.length;e((0,d.A)({channelIds:g,displayCount:y,reason:"section-heading-menu"}))});p.meta={name:"onMarkAsReadSelected",key:"createThunkOnMarkAsReadSelected",description:"Bulk mark channels as read in section"};let h=new n.Ay("menu"),markAllAsRead=(e,{channelSection:t,channelIds:a,sidebarSections:n})=>[{label:h.t("Mark all as read"),click:()=>e(p({channelSection:t,channelIds:a,sidebarSections:n})),dataQa:"channel_section_menu_mark_as_read"}]},0x230322a4f:(e,t,a)=>{"use strict";a.d(t,{K:()=>trackContextMenuClick});var n=a(0xe11d0816),r=a(0x45012309);function trackContextMenuClick(e,t={}){(0,r.eo)().track(n.y1.CONTEXT_MENU_ACTION,{...t,contexts:{ui_context:{action:n.lG.CLICK,ui_component:n.G7.SIDEBAR,ui_element:n.HP.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}},label:e})}},0x32fdd755:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x1a256ff50),i=a(0x99233ecb),l=a(0x1966324d3),o=a(0x115aa5ac3),s=a(0x3711e82d),c=a(0x45012309),d=a(0x1c91944c9),m=a(0x217553e42);let u=class extends n.Component{static defaultProps={position:"bottom",offsetY:-8,showRemoveFromSection:!0,shouldTransitionFocusOnClose:!0};constructor(e){super(e),this.renderMenu=this.renderMenu.bind(this),this.trackClogs=this.trackClogs.bind(this)}shouldComponentUpdate(e){return!(0,r.kt)(this.props,e)}trackClogs(e,t){let a;switch(a="channel_join_banner"===this.props.source?"ChannelJoinBanner":"channel_header"===this.props.source?"ChannelHeader":"ChannelSectionSelectMenuTrigger",e){case l.O.MOVE_TO_SECTION:{let e={[t.channelSection.id]:t.channels.map(e=>e.id)};void 0!==t.score&&null!==t.score?(e.score=t.score,e.isSuggestedSection=!0,this.props.clogger.track(s.EventId.RECOMMEND_ACCEPT,{request_id:t.requestId,selected_type:"channel_section",selected_id_v2:t.channelSection.id})):e.isSuggestedSection=!1,t.recommendationMode&&(e.recommendationMode=t.recommendationMode),t.promptABTestMode&&(e.promptABTestMode=t.promptABTestMode),e.menuHasSuggestedSections=t.menuHasSuggestedSections??!1,this.props.clogger.track(s.EventId.CHANNEL_SECTIONS_CHANNELS_MOVE,{contexts:{ui_context:{action:s.UiAction.SELECT,ui_component_name:a}},insert:e,sectionType:{[t.channelSection.id]:t.channelSection?.type===o.Ri.Standard?"custom":t.channelSection?.type}});break}case l.O.MOVE_TO_NEW_SECTION:this.props.clogger.track(s.EventId.CHANNEL_SECTIONS_MOVE_TO_NEW_SECTION,{contexts:{ui_context:{action:s.UiAction.SELECT,ui_component_name:a}}});break;case l.O.REMOVE_FROM_SECTION:this.props.clogger.track(s.EventId.CHANNEL_SECTIONS_CHANNELS_MOVE,{contexts:{ui_context:{action:s.UiAction.SELECT,ui_component_name:a}},remove:t.remove.reduce((e,t)=>({[t.channelSectionId]:t.channelIds}),{})})}}renderMenu(e){let{channel:t,ignoreEditMode:a,showRemoveFromSection:r,shouldTransitionFocusOnClose:i,source:o}=this.props,s={...e,className:"p-channel_sidebar__channel_section_select_menu"};return n.createElement(l.A,{channel:t,reason:"channel-section-select",ignoreEditMode:a,showRemoveFromSection:r,shouldTransitionFocusOnClose:i,clogTrack:this.trackClogs,width:"auto",source:o,...s})}render(){return n.createElement(i.cQ,{"data-qa":"channel_section_select_menu_trigger",allowanceX:12,offsetX:this.props.offsetX,offsetY:"bottom"===this.props.position?8:this.props.offsetY,position:this.props.position,renderMenu:this.renderMenu,onClick:this.props.onClick,onClose:this.props.onClose},this.props.children)}};u.displayName="ChannelSectionSelectMenuTrigger";let p=(0,d.N)((e,t)=>{let{channelId:a}=t,n=(0,m.OL)(e,a)??void 0;return{channel:a?n:void 0,clogger:(0,c.eo)({state:e})}},null,null,{areStatePropsEqual:r.kt})(u)},0xbd520b0f:(e,t,a)=>{"use strict";a.d(t,{f:()=>w});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x1d2cd7755),d=a(0x13eedc190),m=a(0xf225ecf2),u=a(0x1c7997c1),p=a(0x96920791),h=a(0x16d221c7f),_=a(0x142775427),f=a(0x1f803375e),b=a(0x15bd59d31),g=a(0x10d53599f),y=a(0x19dc73101),A=a(0x18def662b),x=a(0x5acf92f2),E=a(0x61f75169),C=a(0x226892387),k=a(0x11eae4d05),v=a(0x475c9cfe);let S=new o.Ay("channel_sidebar"),getSearcherOptions=e=>({entities:{channels:{includePublic:!0,includePrivate:!0,includeRequired:!0,includeFromAnotherTeam:!1,includeMpims:!1,includeArchived:!1,searchPreviousNames:!1,onlyVisibleMpims:!1}},limit:100,tiered:!0,sort:{frecency:!0},filter:t=>!!e.includes(t.id)}),I=(0,n.DA)()?function(e){let t,a,n,o,b,g,k=(0,r.c)(53),{closeModal:I,userGroup:w}=e,T=(0,l.wA)(),N=(0,C.d4)(A.Ow);k[0]!==w?(t=e=>(0,v.UN)(e,{userGroup:w}),k[0]=w,k[1]=t):t=k[1];let M=(0,C.d4)(t);k[2]!==w?(a=e=>(0,v.E_)(e,{userGroup:w}),k[2]=w,k[3]=a):a=k[3];let R=(0,C.d4)(a);k[4]===Symbol.for("react.memo_cache_sentinel")?(n=[],k[4]=n):n=k[4];let[P,L]=(0,i.useState)(n);k[5]===Symbol.for("react.memo_cache_sentinel")?(o=[],k[5]=o):o=k[5];let[O,D]=(0,i.useState)(o);if(k[6]!==R||k[7]!==I||k[8]!==M||k[9]!==T||k[10]!==N||k[11]!==O||k[12]!==P||k[13]!==w){g=Symbol.for("react.early_return_sentinel");e:{let e,t,a,n,r,l,o,A,C=[],v=M?.map((e,t)=>(C.push(t),{value:e}));k[16]===Symbol.for("react.memo_cache_sentinel")?(e={entities:{members:{includeSelf:!1,onlyLocalTeam:!0,includeAllExternal:!1,includeSlackbot:!1,includeBots:!1,includeDeleted:!1,includeGuests:!1,includeProfileOnlyUsers:!0}},allowEmptyQuery:!0,limit:40,filter:!1},k[16]=e):e=k[16];let F=e,U=_temp,B=_temp2;k[17]!==I?(t=()=>{I()},k[17]=I,k[18]=t):t=k[18];let H=t;k[19]!==M?(a=e=>{D(e.map(_temp3).filter(e=>!M.includes(e)))},k[19]=M,k[20]=a):a=k[20];let W=a;k[21]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{L(e.map(_temp4))},k[21]=n):n=k[21];let V=n;k[22]!==I||k[23]!==T||k[24]!==O||k[25]!==P||k[26]!==w?(r=()=>{let e=O.length>0?O:void 0;return T((0,x.W)({usergroup:w.id,users:P,additionalChannels:e,isShared:!0,reason:"internal-spaces-share-modal"})).then(()=>I())},k[22]=I,k[23]=T,k[24]=O,k[25]=P,k[26]=w,k[27]=r):r=k[27];let G=r,q=[{id:"hint",message:N?S.t("Search by name."):""}],j=[{id:"hint",message:N?S.t("Members can always join other public channels on their own."):""}];if(!N){g=null;break e}if(k[28]!==I?(l={onClose:I,isOpen:!0,centered:!0},k[28]=I,k[29]=l):l=k[29],k[30]!==N||k[31]!==w){let e,t=N?S.rt("Share {userGroupName}",{userGroupName:(0,E.ue)(w)}):"";k[33]!==t?(e={title:t},k[33]=t,k[34]=e):e=k[34],o=i.createElement(_.A,null,i.createElement(f.A,e)),k[30]=N,k[31]=w,k[32]=o}else o=k[32];let z=i.createElement(m.A,null,i.createElement(u.A,null,i.createElement("div",null,i.createElement("div",{className:"display_flex justify_content_between"},i.createElement(c.A,{text:N?S.t("People"):"",htmlFor:"invite-form-input-multiselect"})),i.createElement("div",null,i.createElement(y.h,{isRequired:!0,focusOnMount:!0,key:"add_internal_space_member",selectId:"add_internal_space_member",width:"100%",placeholderText:N?S.t("Search by name"):"",searcherOptions:F,renderOption:U,hints:q,onSelectedItemsChange:V})),i.createElement("div",{className:"display_flex justify_content_between"},i.createElement(c.A,{text:N?S.t("Channel invitations"):"",htmlFor:"invite-form-input-multiselect"})),i.createElement(y.h,{width:"100%",selectId:"user_group_additional_channel_select",selectedOptions:v,renderOption:B,searcherOptions:getSearcherOptions(R),optionsRowHeight:32,disabledSelectedTokenIndexes:C,isDisabled:0===R.length,hints:j,onSelectedItemsChange:W}))));if(k[35]!==N||k[36]!==H||k[37]!==G){let e,t;if(k[39]!==N||k[40]!==H){let t,a;k[42]!==H?(t={type:"outline",onClick:H},k[42]=H,k[43]=t):t=k[43],k[44]!==N?(a=N?S.t("Cancel"):"",k[44]=N,k[45]=a):a=k[45],e=i.createElement(s.Ay,t,a),k[39]=N,k[40]=H,k[41]=e}else e=k[41];if(k[46]!==N||k[47]!==G){let e,a;k[49]!==G?(e={type:"primary",onClick:G},k[49]=G,k[50]=e):e=k[50],k[51]!==N?(a=N?S.t("Share"):"",k[51]=N,k[52]=a):a=k[52],t=i.createElement(s.Ay,e,a),k[46]=N,k[47]=G,k[48]=t}else t=k[48];A=i.createElement(p.A,null,i.createElement(h.A,null,e,t)),k[35]=N,k[36]=H,k[37]=G,k[38]=A}else A=k[38];b=i.createElement(d.A,l,o,z,A)}k[6]=R,k[7]=I,k[8]=M,k[9]=T,k[10]=N,k[11]=O,k[12]=P,k[13]=w,k[14]=b,k[15]=g}else b=k[14],g=k[15];return g!==Symbol.for("react.early_return_sentinel")?g:b}:function({closeModal:e,userGroup:t}){let a=(0,l.wA)(),n=(0,C.d4)(A.Ow),r=(0,C.d4)(e=>(0,v.UN)(e,{userGroup:t})),o=(0,C.d4)(e=>(0,v.E_)(e,{userGroup:t})),[k,I]=(0,i.useState)([]),[w,T]=(0,i.useState)([]),N=[],M=r?.map((e,t)=>(N.push(t),{value:e})),R=(0,i.useMemo)(()=>({entities:{members:{includeSelf:!1,onlyLocalTeam:!0,includeAllExternal:!1,includeSlackbot:!1,includeBots:!1,includeDeleted:!1,includeGuests:!1,includeProfileOnlyUsers:!0}},allowEmptyQuery:!0,limit:40,filter:!1}),[]),P=(0,i.useCallback)(e=>i.createElement(g.A,{id:e.value}),[]),L=(0,i.useCallback)(e=>i.createElement(b.A,{channel:e.entity,channelId:e.value}),[]),O=(0,i.useCallback)(()=>{e()},[e]),D=(0,i.useCallback)(e=>{T(e.map(e=>e.value).filter(e=>!r.includes(e)))},[r]),F=(0,i.useCallback)(e=>{I(e.map(e=>e.value))},[]),U=(0,i.useCallback)(()=>{let n=w.length>0?w:void 0;return a((0,x.W)({usergroup:t.id,users:k,additionalChannels:n,isShared:!0,reason:"internal-spaces-share-modal"})).then(()=>e())},[a,k,w,t,e]),B=[{id:"hint",message:n?S.t("Search by name."):""}],H=[{id:"hint",message:n?S.t("Members can always join other public channels on their own."):""}];return n?i.createElement(d.A,{onClose:e,isOpen:!0,centered:!0},i.createElement(_.A,null,i.createElement(f.A,{title:n?S.rt("Share {userGroupName}",{userGroupName:(0,E.ue)(t)}):""})),i.createElement(m.A,null,i.createElement(u.A,null,i.createElement("div",null,i.createElement("div",{className:"display_flex justify_content_between"},i.createElement(c.A,{text:n?S.t("People"):"",htmlFor:"invite-form-input-multiselect"})),i.createElement("div",null,i.createElement(y.h,{isRequired:!0,focusOnMount:!0,key:"add_internal_space_member",selectId:"add_internal_space_member",width:"100%",placeholderText:n?S.t("Search by name"):"",searcherOptions:R,renderOption:P,hints:B,onSelectedItemsChange:F})),i.createElement("div",{className:"display_flex justify_content_between"},i.createElement(c.A,{text:n?S.t("Channel invitations"):"",htmlFor:"invite-form-input-multiselect"})),i.createElement(y.h,{width:"100%",selectId:"user_group_additional_channel_select",selectedOptions:M,renderOption:L,searcherOptions:getSearcherOptions(o),optionsRowHeight:32,disabledSelectedTokenIndexes:N,isDisabled:0===o.length,hints:H,onSelectedItemsChange:D})))),i.createElement(p.A,null,i.createElement(h.A,null,i.createElement(s.Ay,{type:"outline",onClick:O},n?S.t("Cancel"):""),i.createElement(s.Ay,{type:"primary",onClick:U},n?S.t("Share"):"")))):null};function _temp4(e){return e.value}function _temp3(e){return e.value}function _temp2(e){return i.createElement(b.A,{channel:e.entity,channelId:e.value})}function _temp(e){return i.createElement(g.A,{id:e.value})}I.displayName="InternalSpacesShareModal";let w=(0,k.e)(I)},0x1813a25e3:(e,t,a)=>{"use strict";a.d(t,{a:()=>rE});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x9e38a344),s=a(0x11bd07e39),c=a(0x16ffeff53),d=a(0x129702595),m=a(0x120c268ad),u=a.n(m),p=a(0x1cbdfeceb),h=a(0x854f5389),_=a(0x106809bc6),f=a(0xd6ba6894),b=a(0x4e47e388),g=a(0x318bb66b),y=a(0x3bc7bbd5),A=a(0x7a622ec8),x=a.n(A),E=a(0x1ee15af19),C=a(0x20bafd237),k=a(0x130d89881),v=a(0xb97b797e),S=a(0x62a17882),I=a(0x20482ad21),w=a(0x224f7f0e9),T=a(0x5739d664),N=a(0x1614f02d1),M=a(0xf3c40abe),R=a(0x19aba212c),P=a(0x99233ecb),L=a(0x1a043bf26),O=a(0x12a913e0);let SidebarLayout=class SidebarLayout extends O.A{constructor({getHeight:e,keys:t=[]}={}){super({keys:t}),this.getHeight=e||super.getHeight,this.layout()}getHeightValidity(){return!0}setHeight(){}};var D=a(0x11a296110),F=a(0x2501a2cee),U=a(0x238b287cf),B=a(0x3711e82d),H=a(0x850bedf0),W=a(0x226892387),V=a(0x21f41f335),G=a.n(V);let q=new I.Ay("channel_sidebar"),j=(0,n.DA)()?e=>{let t,a,n,l,o=(0,r.c)(25),{linkedId:s,isVipUnread:c,isMention:d,position:m,ensureItemInView:h}=e,_=void 0===m?"top":m,f=void 0===h?p.A:h,b=(0,W.d4)(H.UG),g=(0,U.A)();switch(!0){case c:{let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.t("VIP unreads"),o[0]=e):e=o[0],t=e;break}case d:{let e;o[1]===Symbol.for("react.memo_cache_sentinel")?(e=q.t("Unread mentions"),o[1]=e):e=o[1],t=e;break}default:{let e;o[2]===Symbol.for("react.memo_cache_sentinel")?(e=q.t("More unreads"),o[2]=e):e=o[2],t=e}}let y=t;if(b)return null;o[3]!==g||o[4]!==f||o[5]!==s?(a=e=>{e.preventDefault(),g.track(B.EventId.SIDEBAR_MORE_UNREADS_CLICK),s&&f(s,44)},o[3]=g,o[4]=f,o[5]=s,o[6]=a):a=o[6];let A=a,x=!d,E="top"===_,C="bottom"===_;o[7]!==d||o[8]!==x||o[9]!==E||o[10]!==C?(n=u()("p-channel_sidebar__banner",G().sidebarBanner,{[G().sidebarBannerMentions]:d,[G().sidebarBannerUnreads]:x,[G().sidebarBannerTop]:E,[G().sidebarBannerBottom]:C}),o[7]=d,o[8]=x,o[9]=E,o[10]=C,o[11]=n):n=o[11];let k=n,v="top"===_?"arrow-up":"arrow-down";if(o[12]!==k||o[13]!==v||o[14]!==y||o[15]!==s||o[16]!==A){let e,t;if(o[18]!==k||o[19]!==s||o[20]!==A?(e={className:k,onClick:A,"data-qa-linked-id":s,tabIndex:-1},o[18]=k,o[19]=s,o[20]=A,o[21]=e):e=o[21],o[22]!==v){let e;o[24]===Symbol.for("react.memo_cache_sentinel")?(e={className:"margin_right_25"},o[24]=e):e=o[24],t=i.createElement("span",e,i.createElement(F.Ah,{name:v,inline:!0})),o[22]=v,o[23]=t}else t=o[23];l=i.createElement(D.Nm,e,t,y),o[12]=k,o[13]=v,o[14]=y,o[15]=s,o[16]=A,o[17]=l}else l=o[17];return l}:({linkedId:e,isVipUnread:t,isMention:a,position:n="top",ensureItemInView:r=p.A})=>{let l=(0,W.d4)(H.UG),o=(0,U.A)(),s=(0,i.useMemo)(()=>{switch(!0){case t:return q.t("VIP unreads");case a:return q.t("Unread mentions");default:return q.t("More unreads")}},[t,a]);if(l)return null;let c=u()("p-channel_sidebar__banner",G().sidebarBanner,{[G().sidebarBannerMentions]:a,[G().sidebarBannerUnreads]:!a,[G().sidebarBannerTop]:"top"===n,[G().sidebarBannerBottom]:"bottom"===n});return i.createElement(D.Nm,{className:c,onClick:t=>{t.preventDefault(),o.track(B.EventId.SIDEBAR_MORE_UNREADS_CLICK),e&&r(e,44)},"data-qa-linked-id":e,tabIndex:-1},i.createElement("span",{className:"margin_right_25"},i.createElement(F.Ah,{name:"top"===n?"arrow-up":"arrow-down",inline:!0})),s)};j.displayName="UnreadBanner";var z=a(0x1e0963d7);function isRowObjectFocusable(e){return"treeitem"===e.role}var K=a(0x889d7d4a),$=a(0x8a97dfc2),Y=a(0x7e1642b8),Q=a(0x252b73458),Z=a(1927545e3),J=a(0x54536a24),X=a(0xef6c3caa),ee=a(0x242503693),et=a(0x7ad38cfb),ea=a(0x6b345e37),en=a(0x12e383cfb);function isHuddleKeyboardShortcutPressed(e){let t=(0,S.cX)()?e.metaKey:e.ctrlKey;return(0,S.y3)()&&t&&e.shiftKey&&72===e.keyCode||t&&e.shiftKey&&e.altKey&&72===e.keyCode}var er=a(0x8f36a342),ei=a(0x4f86f8f5),el=a(0x11c3f605d),eo=a.n(el),es=a(0x1084efb4a),ec=a.n(es);let ed=x()("enter"),em=x()("delete"),eu=x()("backspace"),ep=x()("tab"),eh=new I.Ay("channel_sidebar"),isBannerStateEqual=(e,t)=>e.scrolledBelowFirstVipUnread===t.scrolledBelowFirstVipUnread&&e.scrolledBelowFirstMention===t.scrolledBelowFirstMention&&e.scrolledBelowFirstUnread===t.scrolledBelowFirstUnread&&e.scrolledAboveLastMention===t.scrolledAboveLastMention&&e.scrolledAboveLastUnread===t.scrolledAboveLastUnread,e_=(0,T.A)((e,t)=>a=>!!t&&(e(a),!0)),ef=(0,T.A)((e,t)=>a=>!!t&&(e(a),!0)),eb=(0,T.A)((e,t)=>a=>!!t&&(e(a),!0)),eg=(0,T.A)(e=>e.find(isRowObjectFocusable)),ey=(0,T.A)((e,t,a)=>n=>{let r=n?.params?.newChannelSectionId,i=r&&`sectionHeading-${r}`;return!!t&&!!i&&!!a.includes(i)&&(e(n),!0)}),eA=(0,T.A)((e,t,a)=>n=>!!t&&!!a.length&&(e(n),!0)),ex=(0,T.A)((e,t,a)=>{let n=[];for(let r of a)("sectionHeading"===r.type||r.key===t||r.key===e)&&n.push(r.key);return n},(0,n.x)()?1:3),eE=(0,T.A)(e=>{let t={},a={},n={},r=0;e.forEach(e=>{a[e.key]=e,e.id&&(t[e.id]=e);let i=(0,z.s)(e);i?.forEach(a=>{t[a]=e}),n[e.key]={scrollBottom:r+e.height,scrollTop:r},r+=e.height});let i=Object.keys(a);return{rowById:t,rowByKey:a,rowPositionByKey:n,rowKeys:i}},(0,n.x)()?1:3),eC=class extends i.PureComponent{static defaultProps={bulkSetChannelSectionsCollapsed:p.A,bulkSetEditModeChannelSectionCollapsed:p.A,clearEditModeSelectedChannelIds:p.A,closeIM:p.A,editModeSelectedChannelIds:{},experimentCoreAiRecapChannelNavigationGroupTreatment:!1,getAriaLabelForRow:p.A,getContextMenuTemplateForChannel:p.A,getContextMenuTemplateForEntity:p.A,getContextMenuTemplateForSectionHeading:p.A,isBBModeEnabled:!1,isEditMode:!1,isSlackAiRecapCoachmarkVisible:!1,onAppLauncherClick:p.A,onDMBrowserModalClick:p.A,onEditModeChannelClick:()=>0,onEditModeChannelRangeClick:()=>0,overlayIsOpen:!1,overscanRatio:1/0,selectedItemId:void 0,setChannelSectionCollapsed:p.A,setEditModeChannelSectionCollapsed:p.A,setIsEditMode:p.A,sidebarSections:{},toggleHuddleInHighlightedChannel:p.A,unreadsOnlyCoachmarkVisible:{},updateFocusHistoryState:p.A,starredChannelSectionBadgeResult:void 0,experimentSalesforceListsInSidebarGroupOn:!1,dismissOnboardingTasksLink:p.A};scrollRenderTimeRaf;currentScrollTop;height;keyboardNavigableListRef;unreadsOnlyPromptCoachmarkRef;isLeavingEditMode;isEnteringEditMode;wasScrollNearTop;layout;ariaShortcutsForPages;nextUpdateRelativeScrollPosition;restoreFocusOnUpdate;beforeEnterEditModeScrollTop;constructor(e){super(e),(0,v.v)(this,["resetCurrentScrollTopMaybe","onResize","onScroll","onListFocusEnter","onItemFocusEnter","onItemKeyDown","renderRowByIndex","renderSizedContents","isRowFocusable","getAriaAttributesForRow","onEnterEditModeClick","focus","focusOnEditMode","focusOnExitEditMode","focusList","focusOnNewSection","focusOnFirstSection","getPropsForItem","onItemContextMenu","renderContextMenuForItem","getAriaLabelForRow","onEditModeSelect","onToggleChecked","onChannelSectionCollapseToggle","ensureItemInView","getTemplateForContentMenu","getFocusTransitionListeners","onScrollEnd"]),this.state={bannerState:{scrolledBelowFirstVipUnread:!1,scrolledBelowFirstMention:!1,scrolledBelowFirstUnread:!1,scrolledAboveLastMention:!1,scrolledAboveLastUnread:!1}},this.scrollRenderTimeRaf=null,this.currentScrollTop=0,this.height=0,this.keyboardNavigableListRef=i.createRef(),this.unreadsOnlyPromptCoachmarkRef=i.createRef(),this.isLeavingEditMode=null,this.isEnteringEditMode=null,this.wasScrollNearTop=!0,this.layout=new SidebarLayout({getHeight:e=>{let t=this.getRowByKey(e);return t?.height??0}});const{keyboardLocale:t}=this.props,a=(0,$.Ft)({keyboardLocale:t,enableUnreadView:!0}),n={open_all_unreads:Z.c.Unreads,open_all_threads:"Vall_threads",open_later:Z.c.Later,browse_channels:Z.c.BrowseChannels};this.ariaShortcutsForPages=Object.keys(a).reduce((e,t)=>{let r=n[t];return r&&(e[r]=a[t]),e},{}),this.nextUpdateRelativeScrollPosition=null,this.getFocusTransitionListeners=(0,T.A)(this.getFocusTransitionListeners)}componentDidUpdate(e){let{unreadsOnlyCoachmarkVisible:t,isSlackAiRecapCoachmarkVisible:a}=this.props;if(this.isLeavingEditMode=!this.props.isEditMode&&e.isEditMode,this.isEnteringEditMode=this.props.isEditMode&&!e.isEditMode,this.restoreFocusOnUpdate&&(this.focus(),this.restoreFocusOnUpdate=!1),this.isLeavingEditMode&&this.props.transitionFocusTo?.({focusKey:ee.Ay.SIDEBAR_EXIT_EDIT_MODE_KEY_OFFSET,forceFocus:!0}),t.isVisible){let e=`sectionHeading-${t.channelSectionId}`,a=this.unreadsOnlyPromptCoachmarkRef.current?.contentRef.current?.portal.content.clientHeight||194;this.ensureItemInView(e,a)}if(a&&this.ensureItemInView(Z.c.DailyDigest,0,!1),this.nextUpdateRelativeScrollPosition){let{rowKey:e,offsetTop:t=0}=this.nextUpdateRelativeScrollPosition,a=this.getRowPositionByKey(e);a&&this.jumpToOffset(a.scrollTop-t),this.nextUpdateRelativeScrollPosition=null}(e.rows!==this.props.rows||e.unreadIds!==this.props.unreadIds||e.mentionIds!==this.props.mentionIds)&&this.resetCurrentScrollTopMaybe(this.height)}componentWillUnmount(){this.scrollRenderTimeRaf&&window.cancelAnimationFrame(this.scrollRenderTimeRaf),e_.reset(),ef.reset(),eb.reset(),ey.reset(),eg.reset(),eA.reset(),ex.reset(),eE.reset()}onDeleteKeyPressed(e){let{closeIM:t,dismissOnboardingTasksLink:a,removeCreateASectionRow:n}=this.props;this.restoreFocusOnUpdate=!0;let r=e.id,i=this.getRowByKey(r);i?.type==="createASection"?n():(i?.type==="megaphone"&&i?.key==="sidebar_menu_onboarding_tasks_link"&&a(),i?.id&&"channel"===i.type&&t(i.id))}onEnterKeyPressed(e){let t=this.getRowByKey(e.id);if(t&&"sectionHeading"===t.type){e.preventDefault();let a=e.keyCode===w.I6?"sidebar-key-space":"sidebar-key-enter";this.onChannelSectionCollapseToggle({channelSection:t.channelSection,forceIsCollapsed:void 0,reason:a});return}let a=`.p-channel_sidebar__channel,.p-channel_sidebar__link,.p-channel_sidebar__cta,.${ec().sectionHeadingLabelClickable}`,n=e.currentTarget.querySelector(a);n&&(e.preventDefault(),n.dispatchEvent(new PointerEvent("click",e)))}onItemContextMenu(e,t){let a=this.getRowByKey(t);a&&(e.preventDefault(),this.props.isEditMode&&"channel"===a.type&&this.onToggleChecked(e,{channelId:t,isContextMenu:!0}))}onLeftKeyPressed(e){let t=e.id,a=this.getRowByKey(t),n=this.keyboardNavigableListRef?.current;if(a&&n&&("sectionHeading"===a.type&&a["aria-expanded"]&&this.onChannelSectionCollapseToggle({channelSection:a.channelSection,forceIsCollapsed:!0,reason:"sidebar-key-left"}),"channel"===a.type||"addMore"===a.type)){let e=a.channelSection?.id,t=this.getRowByKey(`sectionHeading-${e}`);if(void 0===t)return;n.focusOnKey(t.key)}}onHuddleKeyboardShortcutPressed(e){e.nativeEvent.preventDefault(),this.props.toggleHuddleInHighlightedChannel({highlightedChannelId:e.id})}onRightKeyPressed(e){let t=this.getRowByKey(e.id),a=this.keyboardNavigableListRef?.current;if(t&&a&&"sectionHeading"===t.type){this.onChannelSectionCollapseToggle({channelSection:t.channelSection,forceIsCollapsed:!1,reason:"sidebar-key-right"});let e=this.getRowByKey(t.channelIds[0]);t["aria-expanded"]&&e&&a.focusOnKey(e.key)}}onShiftKeyAndPageDirectionPressed(e){let t,a,{rows:n}=this.props,r=this.getRowByKey(e.id),i=e.keyCode,l=this.keyboardNavigableListRef?.current;if(!r||!l)return;let o=n.filter(e=>"sectionHeading"===e.type&&e.channelSection);if("sectionHeading"===r.type)switch(a=o.indexOf(r),i){case w.w_:t=o[a-1];break;case w.dB:t=o[a+1];break;default:t=void 0}if("channel"===r.type){let e=r.channelSection?.id,n=this.getRowByKey(`sectionHeading-${e}`);if(void 0===n)return;switch(a=o.indexOf(n),i){case w.w_:t=n;break;case w.dB:t=o[a+1];break;default:t=void 0}}void 0!==t&&l.focusOnKey(t.key)}onEditModeSelect(e,t){let a=this.getRowById(t);a&&"channel"===a.type&&this.onToggleChecked(e,{channelId:t})}onToggleChecked(e,{channelId:t,isContextMenu:a}){let n;!t||(e&&e.nativeEvent&&e.nativeEvent.preventDefault(),a&&this.props.editModeSelectedChannelIds[t]||(a&&!this.props.editModeSelectedChannelIds[t]&&this.props.clearEditModeSelectedChannelIds(),n=e&&e.shiftKey?this.props.onEditModeChannelRangeClick({channelId:t,rows:this.props.rows}):this.props.onEditModeChannelClick({channelId:t}),this.props.sendMessageToAnnouncerAPI({message:eh.t("{selectedItemCount} selected",{selectedItemCount:n})})))}onChannelSectionCollapseToggle({channelSection:e,toggleAll:t=!1,forceIsCollapsed:a,reason:n}){let r=this.getRowByKey(`sectionHeading-${e.id}`);if(!r)return;let{isEditMode:i}=this.props,l=!r["aria-expanded"],o=void 0===a?!l:a;if(!t&&l===o)return;switch(this.props.logger.action(K.o,`Channel section toggle collapsed state for ${t?"all headings":"one heading"}; isCollapsed=${o?"y":"n"}; reason=${n}; channelSectionId=${e.id}`),n){case"sidebar-alt-right":case"sidebar-alt-left":case"sidebar-asterisk":this.props.clogger.track(B.EventId.CHANNEL_SECTIONS_PREFERENCES_SET,{contexts:{ui_context:{action:B.UiAction.TOGGLE,ui_component:B.UiComponent.SIDEBAR,ui_element:B.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"ChannelList"}},channel_section_id:e.id,pref:"collapse_all",value:o?"0":"1"});break;case"sidebar-key-left":case"sidebar-key-right":this.props.clogger.track(B.EventId.CHANNEL_SECTIONS_PREFERENCES_SET,{contexts:{ui_context:{action:B.UiAction.TOGGLE,ui_component:B.UiComponent.SIDEBAR,ui_element:B.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"ChannelList"}},channel_section_id:e.id,pref:"collapsed",value:o?"0":"1"});break;case"section-heading-alt-click":this.props.clogger.track(B.EventId.CHANNEL_SECTIONS_PREFERENCES_SET,{contexts:{ui_context:{action:B.UiAction.TOGGLE,ui_component:B.UiComponent.SIDEBAR,ui_element:B.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}},channel_section_id:e.id,pref:"collapse_all",value:o?"0":"1"});break;case"section-heading-click":this.props.clogger.track(B.EventId.CHANNEL_SECTIONS_PREFERENCES_SET,{contexts:{ui_context:{action:B.UiAction.TOGGLE,ui_component:B.UiComponent.SIDEBAR,ui_element:B.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}},channel_section_id:e.id,pref:"collapsed",value:o?"0":"1"})}t&&i&&this.props.bulkSetEditModeChannelSectionCollapsed({isCollapsed:o}),!t&&i&&this.props.setEditModeChannelSectionCollapsed({channelSectionId:e.id,isCollapsed:o}),t&&!i&&this.props.bulkSetChannelSectionsCollapsed({isCollapsed:o,reason:n}),t||i||this.props.setChannelSectionCollapsed({channelSectionId:e.id,isCollapsed:o,reason:n});let s=this.getRowPositionByKey(r.key);s&&(this.nextUpdateRelativeScrollPosition={rowKey:r.key,offsetTop:s.scrollTop-this.currentScrollTop})}onAltKeyAndDirectionPressed(e){let t=this.getRowByKey(e.id),a=e.keyCode,n=this.keyboardNavigableListRef?.current;if(t&&n&&"sectionHeading"===t.type&&(a===w.LE||a===w.UQ)){let e=a===w.UQ;this.onChannelSectionCollapseToggle({channelSection:t.channelSection,toggleAll:!0,forceIsCollapsed:e,reason:e?"sidebar-alt-left":"sidebar-alt-right"})}}onAsteriskKeyPressed(e){let t=this.getRowByKey(e.id),a=this.keyboardNavigableListRef?.current;t&&a&&"sectionHeading"===t.type&&(e.preventDefault(),this.onChannelSectionCollapseToggle({channelSection:t.channelSection,toggleAll:!0,forceIsCollapsed:!1,reason:"sidebar-asterisk"}))}onItemKeyDown(e){let t=e.keyCode;t===ed||t===w.I6?this.onEnterKeyPressed(e):((t===em||(0,S.cX)()&&t===eu)&&this.onDeleteKeyPressed(e),"*"===e.key&&this.onAsteriskKeyPressed(e),e.altKey&&(t===w.LE||t===w.UQ)&&this.onAltKeyAndDirectionPressed(e),e.shiftKey&&(t===w.w_||t===w.dB)&&this.onShiftKeyAndPageDirectionPressed(e),t===w.LE&&this.onRightKeyPressed(e),t===w.UQ&&this.onLeftKeyPressed(e),this.props.isEditMode&&t===w.I6&&e.id&&this.onToggleChecked(e,{channelId:e.id}),isHuddleKeyboardShortcutPressed(e)&&this.onHuddleKeyboardShortcutPressed(e))}onEnterEditModeClick({channelSection:e,channel:t}){let a;e&&(a=this.props.rows.find(t=>"sectionHeading"===t.type&&t.channelSection?.id===e.id)),t&&(a=this.props.rows.find(e=>"channel"===e.type&&e.id===t.id));let n=this.getRowPositionByKey(a?.key);a&&n?.scrollTop!==void 0?this.props.transitionFocusTo({focusKey:ee.Ay.SIDEBAR_EDIT_MODE_KEY_OFFSET,forceFocus:!0,focusMetadata:{uiState:{rowKey:a.key,offsetTop:n.scrollTop-this.currentScrollTop}}}):this.props.transitionFocusTo({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),this.props.setIsEditMode({isEditMode:!0}),this.props.clogger.track(B.EventId.SIDEBAR_EDIT_MODE_EDIT_ALL_SECTIONS_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}}})}onListFocusEnter(e){let{relatedEvent:t}=e;if(t&&t.keyCode===ep)return;let{bannerHeight:a,hasKeyboardFocus:n,isEditMode:r}=this.props;if(r||!n)return;let{isTopBannerVisible:i,isBottomBannerVisible:l}=this.getBannerVisibility(this.height);if(!(i||l))return;let o=this.keyboardNavigableListRef.current,s=o?.getActiveItem();s&&this.ensureItemInView(s,a+10)}shouldTrackFocusHistoryState(){return this.props.isBBModeEnabled}onItemFocusEnter(){let{hasKeyboardFocus:e,isEditMode:t}=this.props;if(t||!e)return;let a=this.keyboardNavigableListRef.current,n=a?.getActiveItem();this.shouldTrackFocusHistoryState()&&this.props.updateFocusHistoryState({lastFocusedItem:n})}onResize({height:e}){this.resetCurrentScrollTopMaybe(e),this.height=e;let t=this.calculateBannerState(this.height);isBannerStateEqual(t,this.state.bannerState)||this.setState(()=>({bannerState:t}))}onScroll(e){this.currentScrollTop=e.target?.scrollTop;let t=this.calculateBannerState(this.height);if(isBannerStateEqual(t,this.state.bannerState)||this.setState(()=>({bannerState:t})),this.props.onScrollFromTop){let e=20>Math.floor(this.currentScrollTop);this.wasScrollNearTop!==e&&(this.wasScrollNearTop=e,this.props.onScrollFromTop(e))}}getFocusTransitionListeners(e,t,a,n){return{[ee.Ay.SIDEBAR_EDIT_MODE_KEY_OFFSET]:e_(this.focusOnEditMode,e),[ee.Ay.SIDEBAR_EXIT_EDIT_MODE_KEY_OFFSET]:ef(this.focusOnExitEditMode,t),[ee.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM]:eb(this.focusList,a),[ee.Ay.SIDEBAR_CURRENT_CHANNEL]:this.focus,[ee.Ay.SIDEBAR_NEW_SECTION]:ey(this.focusOnNewSection,a,n),[ee.Ay.SIDEBAR_FIRST_VISIBLE_ROW]:eA(this.focusOnFirstSection,a,n)}}getBannerVisibility(e){let{scrolledBelowFirstVipUnread:t,scrolledBelowFirstMention:a,scrolledBelowFirstUnread:n,scrolledAboveLastMention:r,scrolledAboveLastUnread:i}=this.calculateBannerState(e);return{isTopBannerVisible:t||a||n,isBottomBannerVisible:r||i,scrolledBelowFirstVipUnread:t,scrolledBelowFirstMention:a,scrolledBelowFirstUnread:n,scrolledAboveLastMention:r,scrolledAboveLastUnread:i}}getFirstVipUnreadId(){let{sidebarSections:e,selectedItemId:t}=this.props,a=e?.priority?.channelsOrdered;if(a&&0!==a.length&&(1!==a.length||t!==a[0]))return(0,E.A)(a)}getBannerIds(){let{unreadIds:e,mentionIds:t}=this.props,a=(0,E.A)(e),n=(0,C.A)(e),r=(0,E.A)(t);return{firstUnreadId:a,lastUnreadId:n,firstMentionId:r,lastMentionId:(0,C.A)(t),firstVipUnreadId:this.getFirstVipUnreadId()}}getLabelForContextMenu(e){if(e){if("sectionHeading"===e.type)return eh.t("Section options");if("channel"===e.type&&e.channelSection.type===er.VZ.Standard)return eh.t("Channel options");if("channel"===e.type&&(0,X.m)(e.channelSection.type))return eh.t("Conversation options")}}getUnreadRows(){let{firstUnreadId:e,lastUnreadId:t,firstMentionId:a,lastMentionId:n,firstVipUnreadId:r}=this.getBannerIds();return{firstUnread:this.getRowById(e),lastUnread:this.getRowById(t),firstMention:this.getRowById(a),lastMention:this.getRowById(n),firstVipUnread:this.getRowById(r)}}getRowById(e){if(!e)return;let{rowById:t}=eE(this.props.rows);return t[e]}getRowByKey(e){if(!e)return;let{rowByKey:t}=eE(this.props.rows);return t[e]}getRowPositionByKey(e){if(!e)return;let{rowPositionByKey:t}=eE(this.props.rows);return t[e]}getAriaAttributesForRow(e){return"sectionHeading"===e.type?{role:e.role,"aria-expanded":e["aria-expanded"],"aria-level":e["aria-level"],"aria-label":e["aria-label"],"aria-describedby":`${e.key}-description`}:{role:e.role,"aria-level":e["aria-level"],"aria-haspopup":e["aria-haspopup"]}}getAriaLabelForRow(e){let{hasKeyboardFocus:t,getAriaLabelForRow:a}=this.props;return e&&e.id&&t?a(e.id):void 0}getBoundingClientRect(){return this.keyboardNavigableListRef.current?.getBoundingClientRect()}getContentHeight(e=this.props.rows){let{rowKeys:t}=eE(e),a=(0,C.A)(t),n=this.getRowPositionByKey(a);return n?.scrollBottom??0}getAriaCurrent(e){return!this.props.isEditMode&&this.props.selectedItemId===e.key}getTabIndex(e){if(!isRowObjectFocusable(e))return;let t=this.keyboardNavigableListRef?.current;return this.props.isEditMode&&t?t.getInitialActiveItem()===e.key?0:-1:"sectionHeading"===e.type?-1:this.props.selectedItemId&&this.getRowByKey(this.props.selectedItemId)?this.getAriaCurrent(e)?0:-1:void 0}getAriaChecked(e){let{editModeSelectedChannelIds:t,isEditMode:a}=this.props;if(a&&"channel"===e.type)return e.id&&!!t[e.id]}getAriaKeyShortcutForItem(e){if(!e)return;let{key:t}=e;if("pageLink"!==e.type&&"Vall_threads"!==t)return;let a=this.ariaShortcutsForPages[t];if(a)return a}getPropsForItem({index:e}){let{rows:t,isBBModeEnabled:a,editModeSelectedChannelIds:n,isEditMode:r}=this.props,i=t[e];if(!i)return;let l="addMore"===i.type&&(i.showProgressiveDisclosureAddTeammatesFlag||i.showProgressiveDisclosureAddChannelsFlag),o="channel"===i.type&&i.shouldShowInviterJoinerPartyHat,s=!1,c=!1,d=!1;if(r&&"channel"===i.type&&i.id&&(s=!!n[i.id])){let a=t[e-1],r=t[e+1];c=!!(a?.type==="channel"&&a.id&&n[a.id]),d=!!(r?.type==="channel"&&r.id&&n[r.id])}let m={className:u()("p-channel_sidebar__static_list__item",{"p-channel_sidebar__static_list__item--contain":!l&&!o,"p-channel_sidebar__static_list__item--contain-layout":l||o,"p-channel_sidebar__static_list__item__row_container":"sectionHeading"!==i.type&&"divider"!==i.type,"p-channel_sidebar__static_list__item__row_container--bbm":"sectionHeading"!==i.type&&"divider"!==i.type&&a,"p-channel_sidebar__static_list__item--section_header_focus":"sectionHeading"===i.type,"p-channel_sidebar__static_list__item--section-heading-bbm":"sectionHeading"===i.type&&a,[eo().selectedTop]:s&&d&&!c,[eo().selectedMiddle]:s&&d&&c,[eo().selectedBottom]:s&&!d&&c,"p-channel_sidebar__static_list__item--selected":this.props.selectedItemId===i.key})};if("presentation"===i.role)return{...m,role:i.role};let p=this.getAriaAttributesForRow(i),h=i["aria-label"]||this.getAriaLabelForRow(i),_=this.getTabIndex(i);return{...m,...p,"aria-label":h,...void 0!==_?{tabIndex:_}:{},"aria-current":this.getAriaCurrent(i),"aria-checked":this.getAriaChecked(i),"aria-disabled":i.isDisabled,"aria-setsize":i["aria-setsize"],"aria-posinset":i["aria-posinset"],"aria-keyshortcuts":this.getAriaKeyShortcutForItem(i)}}getTemplateForContentMenu(e){let{getContextMenuTemplateForChannel:t,getContextMenuTemplateForEntity:a,getContextMenuTemplateForSectionHeading:n,transitionFocusTo:r,onDMBrowserModalClick:i,onAppLauncherClick:l,sidebarSections:o,getChannelSectionPref:s,setChannelSectionPref:c,experimentSalesforceListsInSidebarGroupOn:d}=this.props,m=this.getRowByKey(e);return m?"sectionHeading"===m.type?n({channelSection:m.channelSection,channelIds:m.channelIds,emoji:m.channelSection.emoji,isHovered:!1,channelSectionHasAllMutedHiddenChannels:m.channelSectionHasAllMutedHiddenChannels,channelSectionReadHiddenChannels:m.channelSectionReadHiddenChannels,channelSectionMutedHiddenChannels:m.channelSectionMutedHiddenChannels,channelSectionUnreadWithNoMentionsHiddenChannels:m.channelSectionUnreadWithNoMentionsHiddenChannels,transitionFocusTo:r,onEnterEditModeClick:this.onEnterEditModeClick,onDMBrowserModalClick:i,onAppLauncherClick:l,sidebarSections:o,getChannelSectionPref:s,setChannelSectionPref:c}):d&&"sidebarEntity"===m.type?a({sidebar:!0,entity:m.entity,type:m.type,channelSection:"channelSection"in m&&m.channelSection?m.channelSection:void 0,onEnterEditModeClick:this.onEnterEditModeClick}):m.id?t({sidebar:!0,header:!1,id:m.id,type:m.type,channelSection:"channelSection"in m&&m.channelSection?m.channelSection:void 0,onEnterEditModeClick:this.onEnterEditModeClick}):void 0:void 0}calculateBannerState(e){let{firstMention:t,firstUnread:a,firstVipUnread:n,lastMention:r,lastUnread:i}=this.getUnreadRows(),l=!!(a&&this.isItemAboveView(a.key,30)),o=!!(i&&this.isItemBelowView(i.key,30,e)),s=!!(t&&this.isItemAboveView(t.key,30)),c=!!(r&&this.isItemBelowView(r.key,30,e));return{scrolledBelowFirstVipUnread:!!(n&&this.isItemAboveView(n.key,30)),scrolledBelowFirstMention:s,scrolledBelowFirstUnread:l,scrolledAboveLastMention:c,scrolledAboveLastUnread:o}}ensureItemInView(e,t=0,a=!0){let n=this.getRowById(e)?.key??e,r=this.keyboardNavigableListRef&&this.keyboardNavigableListRef.current;if(!r||this.isItemInView(n,t))return;let i=this.height,l=this.layout.getTotalHeight(),o=this.layout.getOffsetForKey(n),s=this.layout.getHeight(n);this.isItemAboveView(n,t)&&r.scrollToOffset(Math.max(0,o-t),{animate:a}),this.isItemBelowView(n,t)&&r.scrollToOffset(Math.min(l,o-i+s+t),{animate:a})}focus=e=>{let{isTopBannerVisible:t}=this.getBannerVisibility(this.height),{lastFocusedItem:a}=e?.uiState?.focusHistoryState??{},n=this.shouldTrackFocusHistoryState()&&this.getRowByKey(a)?a:this.props.selectedItemId;n&&this.keyboardNavigableListRef.current?.focusOnKey(n,{offset:t?-40:0})||this.keyboardNavigableListRef.current?.focus()};focusOnEditMode(e){let{rowKey:t,offsetTop:a=0}=e?.uiState||{},n=this.keyboardNavigableListRef?.current;this.beforeEnterEditModeScrollTop=this.currentScrollTop;let r=this.getRowPositionByKey(t);t&&r&&n?(n.focusOnKey(t),this.jumpToOffset(r.scrollTop-a)):this.focus()}focusOnExitEditMode(){this.jumpToOffset(this.beforeEnterEditModeScrollTop||0),this.focus()}focusList(){this.keyboardNavigableListRef?.current?.focus()}focusOnNewSection(e){let t=this.keyboardNavigableListRef?.current;if(!t)return;let a=e?.params?.newChannelSectionId,n=a&&`sectionHeading-${a}`;this.getRowByKey(n)&&t.focusOnKey(n)}focusOnFirstSection(){let{rowKeys:e}=eE(this.props.rows);this.keyboardNavigableListRef?.current?.focusOnKey(e[0])}isItemAboveView(e,t=0){let a=this.getRowPositionByKey(e);if(!a)return!1;let n=this.currentScrollTop+t;return a.scrollBottom<n}isItemBelowView(e,t=0,a=this.height){let n=this.getRowPositionByKey(e);if(!n)return!1;let r=this.currentScrollTop;return n.scrollTop>r+(a-t)}isItemInView(e,t=0){let a=this.getRowPositionByKey(e);if(!a)return!1;let n=this.currentScrollTop;return a.scrollTop>=n+t&&a.scrollTop<=n+(this.height-t)}isRowFocusable({index:e}){return isRowObjectFocusable(this.props.rows[e])}jumpToOffset(e){this.keyboardNavigableListRef.current&&this.keyboardNavigableListRef.current.scrollToOffset(e)}resetCurrentScrollTopMaybe(e,t=this.props.rows){e>this.getContentHeight(t)&&(this.currentScrollTop=0)}rowHasContextMenu(e){return!!("sectionHeading"===e.type||"channel"===e.type||"allThreadsLink"===e.type||"pageLink"===e.type&&(0,J.TW)(e.id))||!!this.props.experimentSalesforceListsInSidebarGroupOn&&"sidebarEntity"===e.type&&e?.entity?.entityType===ei.FN.SalesforceList}renderContextMenuForItem(e,t){let a=this.getRowByKey(e);if(!a||!this.rowHasContextMenu(a))return null;let n=this.getTemplateForContentMenu(a.key);if(!n||!n.length)return null;let{targetBounds:r,onCloseRequested:l}=t;return i.createElement(R.A,{targetBounds:r,onCloseRequested:l},i.createElement(P.a,{"aria-label":this.getLabelForContextMenu(a),template:n,menuClassNames:u()({"p-section_menu":"sectionHeading"===a.type})}))}renderRowByIndex(e){let t=this.props.rows[e];if(!t)return null;if("sectionHeading"===t.type){let{hasKeyboardFocus:e,rowSectionPositioning:a,sidebarSections:n,starredChannelSectionBadgeResult:r}=this.props,i=e&&this.keyboardNavigableListRef?.current?.getActiveItem()===t.key;return t.addedUserGroupSectionCoachmarkSectionId&&this.ensureItemInView(t.key,480),t.renderRow({ensureItemInView:this.ensureItemInView,rowSectionPositioning:a,getContextMenuTemplateForSectionHeading:this.getTemplateForContentMenu,isFocused:i,onChannelSectionCollapseToggle:this.onChannelSectionCollapseToggle,sidebarSections:n,starredChannelSectionBadgeResult:r,unreadsOnlyPromptCoachmarkRef:this.unreadsOnlyPromptCoachmarkRef})}return t.renderRow({ensureItemInView:this.ensureItemInView,onEditModeSelect:this.onEditModeSelect,rowSectionPositioning:this.props.rowSectionPositioning})}renderTopBanner(e,t){let a,{isEditMode:n}=this.props,{firstVipUnreadId:r,firstMentionId:l,firstUnreadId:o}=e,{isTopBannerVisible:s,scrolledBelowFirstVipUnread:c,scrolledBelowFirstMention:d}=t;return n||!s?null:(a=c?r:d?l:o,i.createElement(i.Fragment,null,i.createElement("div",{className:"p-channel_sidebar__list__top_banner_fade",role:"presentation"}),i.createElement(j,{position:"top",isVipUnread:!!c,isMention:!!d,linkedId:a,ensureItemInView:this.ensureItemInView})))}renderBottomBanner(e,t){let{isEditMode:a}=this.props,{lastMentionId:n,lastUnreadId:r}=e,{isBottomBannerVisible:l,scrolledAboveLastMention:o}=t;return a||!l?null:i.createElement(i.Fragment,null,i.createElement(j,{position:"bottom",isMention:!!o,linkedId:o?n:r,ensureItemInView:this.ensureItemInView}),i.createElement("div",{className:"p-channel_sidebar__list__bottom_banner_fade",role:"presentation"}))}onScrollEnd(e){let t=this.props.tracer||(0,en.F)();(0,Y.h)({tracer:t,listOnScrollEndProps:e,listType:"ChannelList",overscanRatio:this.props.overscanRatio})}renderSizedContents({width:e,height:t}){let{rows:a,selectedItemId:r,hasKeyboardFocus:l,overlayIsOpen:o,editModeSelectedChannelIds:s}=this.props,c=this.getRowByKey(r)??eg(a),d=ex(c?.key,r,a),{rowKeys:m}=eE(a),p=this.getBannerIds(),h=this.getBannerVisibility(t);return i.createElement(i.Fragment,null,this.renderTopBanner(p,h),i.createElement(L.A,{layout:this.layout,ref:this.keyboardNavigableListRef,width:e,height:t,className:u()("p-channel_sidebar__static_list",{"p-channel_sidebar__static_list--keyboard_focus":l}),keys:m,rowRenderer:this.renderRowByIndex,"aria-label":eh.t("Channels and direct messages"),"aria-describedby":"channel_sidebar_summary",onScroll:this.onScroll,onItemContextMenu:this.onItemContextMenu,renderContextMenuForItem:this.renderContextMenuForItem,onItemKeyDown:this.onItemKeyDown,onItemFocusEnter:this.onItemFocusEnter,overscanRatio:this.props.overscanRatio,isFocusableItem:this.isRowFocusable,pageHeight:t-26,getPropsForItem:this.getPropsForItem,role:"tree",useStaticHeightForListItems:!0,useFixedTrackHeightForScrollbar:!0,onFocusEnter:this.onListFocusEnter,persistentKeys:d,usePersistentOrder:!0,onScrollEnd:this.onScrollEnd,disableKeyboardShortcuts:!!o,useApplicationRole:!1,onOverflow:this.props.onOverflow,arrowNavigationOffset:-6,fadeScrollbar:!0,useGpuScroll:(0,n.PS)(),__ignored__editModeSelectedChannelIds:s}),this.renderBottomBanner(p,h))}render(){let{rows:e}=this.props,{rowKeys:t}=eE(e);return i.createElement("div",{className:"p-channel_sidebar__list"},i.createElement(et.A,{listeners:this.getFocusTransitionListeners(this.isEnteringEditMode,this.isLeavingEditMode,this.keyboardNavigableListRef?.current,t)},i.createElement(k.A,{onResize:this.onResize},({width:e,height:t})=>this.renderSizedContents({width:e,height:t}))))}};eC.displayName="ChannelList";let ek=(0,ea.A)(eC),ev=(0,M.A)(ek),eS=(0,N.A)(ev),eI=(0,Q.m)(eS,{name:"ChannelList"});var ew=a(0x1fe44d86d),eT=a(0xa1832ae4),eN=a(0x1ccef1c6f),eM=a(0x12f41fc32),eR=a(0x1380694ee),eP=a(0x1ee439e69),eL=a(0x162120efc),eO=a.n(eL);let eD=new I.Ay("channel_sidebar"),eF=(0,n.DA)()?function(e){let t,a,n=(0,r.c)(17);n[0]!==e?(t=void 0===e?{}:e,n[0]=e,n[1]=t):t=n[1];let{anchorElement:o}=t,s=(0,l.wA)(),c=(0,W.d4)(_temp),d=(0,W.d4)(_temp2),m=(0,W.d4)(eR.VH).some(_temp3);n[2]!==s?(a=()=>{s((0,eM.AZ)({pref:"has_created_channel_section",value:!1}))},n[2]=s,n[3]=a):a=n[3];let u=a;if(!d&&c&&!m){let e;if(n[4]!==o||n[5]!==u||n[6]!==c){let t,a,r,l;n[8]!==o?(t=o?-(o?.getBoundingClientRect()?.height*.33):void 0,n[8]=o,n[9]=t):t=n[9],n[10]!==o||n[11]!==u||n[12]!==c||n[13]!==t?(a={anchorElement:o,closeCoachmark:u,isOpen:c,orientation:"right",offsetY:t,coachmarkClassNames:eO().channelSectionsEduCoachmark,isMegaphoneCoachmark:!1},n[10]=o,n[11]=u,n[12]=c,n[13]=t,n[14]=a):a=n[14],n[15]===Symbol.for("react.memo_cache_sentinel")?(r=i.createElement("h2",{className:eO().channelSectionsEduCoachmarkTitle},eD.t("Custom sections are no longer available")),l=i.createElement("div",{className:eO().channelSectionsEduCoachmarkContent},eD.t("Now that your workspace is on a free plan, all your conversations are organized in default sections. You can also still star any conversations you\u2019d like.")),n[15]=r,n[16]=l):(r=n[15],l=n[16]),e=i.createElement(ew.Ay,a,r,l),n[4]=o,n[5]=u,n[6]=c,n[7]=e}else e=n[7];return e}return null}:function({anchorElement:e}={}){let t=(0,l.wA)(),a=(0,W.d4)(e=>(0,eN.ty)(e,"has_created_channel_section")),n=(0,W.d4)(e=>(0,eT.qR)((0,eP.H7)(e))),r=(0,W.d4)(eR.VH).some(e=>e.type===er.VZ.Standard),o=(0,i.useCallback)(()=>{t((0,eM.AZ)({pref:"has_created_channel_section",value:!1}))},[t]);return n||!a||r?null:i.createElement(ew.Ay,{anchorElement:e,closeCoachmark:o,isOpen:a,orientation:"right",offsetY:e?-(e?.getBoundingClientRect()?.height*.33):void 0,coachmarkClassNames:eO().channelSectionsEduCoachmark,isMegaphoneCoachmark:!1},i.createElement("h2",{className:eO().channelSectionsEduCoachmarkTitle},eD.t("Custom sections are no longer available")),i.createElement("div",{className:eO().channelSectionsEduCoachmarkContent},eD.t("Now that your workspace is on a free plan, all your conversations are organized in default sections. You can also still star any conversations you\u2019d like.")))};function _temp3(e){return e.type===er.VZ.Standard}function _temp2(e){return(0,eT.qR)((0,eP.H7)(e))}function _temp(e){return(0,eN.ty)(e,"has_created_channel_section")}eF.displayName="ChannelSectionsEduCoachmark";var eU=a(0x16e80f9af),eB=a(0x1c14ee6d4),eH=a(0x4ba2406),eW=a(0x1493ceea1),eV=a.n(eW);let eG=new I.Ay("channel_header"),eq=(0,i.memo)((0,n.DA)()?()=>{let e,t,a,n=(0,r.c)(10),o=(0,l.wA)();n[0]!==o?(e=()=>{o((0,eH.A)({source:eB.K3.SideBarInviteTeamMates}))},n[0]=o,n[1]=e):e=n[1];let s=e;n[2]===Symbol.for("react.memo_cache_sentinel")?(t={elementName:"sidebar_invite_teammates_cta",onClick:{enableClogAction:!0}},n[2]=t):t=n[2];let c=t;if(n[3]!==s){let e,t,r,l,o;n[5]===Symbol.for("react.memo_cache_sentinel")?(e={clogImpression:!0,elementName:"sidebar_invite_section",eventId:B.EventId.NEWXP_TEAM_CREATE},n[5]=e):e=n[5],n[6]===Symbol.for("react.memo_cache_sentinel")?(t={className:eV().inviteSectionContainer},r=i.createElement("span",{className:eV().inviteSectionText},eG.t("Slack works better when you use it together.")),n[6]=t,n[7]=r):(t=n[6],r=n[7]),n[8]===Symbol.for("react.memo_cache_sentinel")?(l=i.createElement("div",{className:"margin_right_25","aria-hidden":"true"},i.createElement(F.Ah,{name:"user-add",size:"16"})),o=eG.t("Invite teammates"),n[8]=l,n[9]=o):(l=n[8],o=n[9]),a=i.createElement(eU.A,e,i.createElement("div",t,r,i.createElement(D.Nm,{className:eV().inviteCta,"data-qa":"sidebar_invite_cta",autoClogProps:c,onClick:s},l,o))),n[3]=s,n[4]=a}else a=n[4];return a}:()=>{let e=(0,l.wA)(),t=(0,i.useCallback)(()=>{e((0,eH.A)({source:eB.K3.SideBarInviteTeamMates}))},[e]),a=(0,i.useMemo)(()=>({elementName:"sidebar_invite_teammates_cta",onClick:{enableClogAction:!0}}),[]);return i.createElement(eU.A,{clogImpression:!0,elementName:"sidebar_invite_section",eventId:B.EventId.NEWXP_TEAM_CREATE},i.createElement("div",{className:eV().inviteSectionContainer},i.createElement("span",{className:eV().inviteSectionText},eG.t("Slack works better when you use it together.")),i.createElement(D.Nm,{className:eV().inviteCta,"data-qa":"sidebar_invite_cta",autoClogProps:a,onClick:t},i.createElement("div",{className:"margin_right_25","aria-hidden":"true"},i.createElement(F.Ah,{name:"user-add",size:"16"})),eG.t("Invite teammates"))))});var ej=a(0x134e233cc),ez=a(0x210cf696f),eK=a(0x4c96e5d9),e$=a(0x22c5d61d5),eY=a(0xfadc3278),eQ=a(0x32fdd755),eZ=a(0x40c0d834),eJ=a(0x189615fa),eX=a(0xf225ecf2),e0=a(0x1c7997c1),e1=a(0x96920791),e2=a(0x16d221c7f),e4=a(0x142775427),e5=a(0x1f803375e),e3=a(0x1ecc7f772),e6=a(0x11c82607b);let e8=(0,e6.Ay)("Get display names for a set of channels",(e,t,{channels:a})=>{let n=t();return a.map(e=>(0,e3.SB)(n,e,{forceMpimNames:!0}))});e8.meta={name:"getDisplayNameForChannelList",key:"createThunkGetDisplayNameForChannelList",description:"Get display names for a set of channels"};var e7=a(0x1ef8ee083),e9=a(0xa624a5c7),te=a(0x1fcbb004d),tt=a(0x1c00faf04),ta=a.n(tt);let tn=new I.Ay("confirm-leave-channels"),ConfirmLeaveChannelsModal=({channelIdsToLeave:e,channelIdsThatCannotBeLeft:t})=>{let a=(0,l.wA)(),n=(0,i.useCallback)(()=>{a((0,te.O)())},[a]),r=(0,i.useMemo)(()=>0===e.length,[e.length]),o=(0,i.useCallback)(async()=>{r?n():e.length&&(n(),await a((0,e7.r)({commitToLeaveChannelsById:e,recommendedChannelsToLeaveIds:e,reason:"bulk_leave_from_sidebar"})),(0,e9.H)({focusKey:ee.Ay.SIDEBAR_FIRST_VISIBLE_ROW}))},[e,a,n,r]),s=(0,i.useMemo)(()=>r?tn.t("You can\u2019t leave these channels."):tn.t("You\u2019re about to leave {totalChannels, plural, =1{# channel} other {# channels}}, but {channelIdsThatCannotBeLeftCount, plural, =1{# channel} other {these # channels}} can\u2019t be removed just yet. Would you still like to continue with the others?",{totalChannels:e.length+t.length,channelIdsThatCannotBeLeftCount:t.length}),[r,e,t.length]),c=(0,i.useMemo)(()=>r?tn.t("OK"):tn.t("Continue"),[r]),d=(0,i.useMemo)(()=>a(e8({channels:t})),[t,a]),m=(0,i.useMemo)(()=>d.map(e=>i.createElement("li",{key:e},e)),[d]);return i.createElement(eZ.A,{clogImpression:!0,uiComponentName:B.UiComponentName.CONFIRM_LEAVE_CHANNELS_MODAL},i.createElement(eJ.A,{className:ta().modalBody,closeModal:n,centered:!0},i.createElement("div",{className:ta().modalRoot,"data-qa":"confirm-leave-channels-modal-root"},i.createElement(e4.A,{className:ta().modalHeader},i.createElement(e5.A,{title:tn.t("Leave channels")}),i.createElement(e0.A,null,i.createElement("p",null,s))),i.createElement(eX.A,{className:u()(ta().contentBody,"p-about_modal__contents")},i.createElement(e0.A,null,i.createElement("ul",{className:ta().channelList},m))),i.createElement(e1.A,{className:u()("p-about_modal__contents",ta().modalFooter)},i.createElement(e2.A,null,!r&&i.createElement(D.Ay,{type:"outline",onClick:n,"data-qa":"confirm-leave-channels-modal-cancel-button"},tn.t("Cancel")),i.createElement(D.Ay,{type:"primary",onClick:o,"data-qa":"confirm-leave-channels-modal-confirm-button"},c))))))};ConfirmLeaveChannelsModal.displayName="ConfirmLeaveChannelsModal";var tr=a(0x12185e091),ti=a(0x6f213e53),tl=a(0xf6ed6f31),to=a(0x143fb6398),ts=a(0x155965105);let tc=(0,e6.Ay)("Filter out channels that cannot be left",(e,t,a)=>{let n=t();return a.filter(e=>!(0,ts.Y9)(n,e.id)||(0,tr.JM)(e)||!(0,tl.bl)(e)||(0,ti.F)(e)||(0,tr.rI)(e)||(0,to.ju)(e)||(0,tr.cb)(e)||(0,tr.rI)(e))});tc.meta={name:"getChannelsThatCannotBeLeft",key:"createThunkGetChannelsThatCannotBeLeft",description:"Filter out channels that cannot be left"};var td=a(0x1ec69ee01),tm=a(0x1529cf960),tu=a(0x20498e2b4),tp=a(0x14149c126),th=a(0x46dbff89),t_=a(0x1706c1438),tf=a.n(t_);let tb=new I.Ay("channel_sidebar"),tg=(0,n.DA)()?()=>{let e,t,a,n,o,s,c,d,m=(0,r.c)(69),p=(0,W.d4)(eR.Ou),h=(0,W.d4)(organize_mode_menu_temp),_=(0,W.Z2)(eR.a2),f=(0,W.d4)(eR.fM)||0,b=(0,W.d4)(organize_mode_menu_temp2),g=(0,U.A)(),{transitionFocusTo:y}=(0,i.useContext)(ej.Ay),A=(0,l.wA)(),[x,E]=(0,i.useState)(!1);m[0]!==A?(e=()=>{A((0,tm.zm)())},m[0]=A,m[1]=e):e=m[1];let C=e;m[2]!==C||m[3]!==y?(t=()=>{y({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),C()},m[2]=C,m[3]=y,m[4]=t):t=m[4];let k=t;m[5]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{let{isTruncated:t}=e;t&&E(!0)},m[5]=a):a=m[5];let v=a;m[6]!==A||m[7]!==y?(n=()=>{y({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),A((0,tu.k)({isEditMode:!1}))},m[6]=A,m[7]=y,m[8]=n):n=m[8];let S=n;m[9]!==_||m[10]!==C||m[11]!==g||m[12]!==A?(o=async()=>{let e=A(tc(_)),t=_.filter(t=>!e.includes(t)).map(td.FB).filter(organize_mode_menu_temp3);e.length?A((0,th.q)({element:i.createElement(ConfirmLeaveChannelsModal,{channelIdsThatCannotBeLeft:e,channelIdsToLeave:t})})):t.length&&A((0,e7.r)({commitToLeaveChannelsById:t,recommendedChannelsToLeaveIds:t})),A((0,tu.k)({isEditMode:!1})),C(),g.track(B.EventId.SIDEBAR_EDIT_MODE_LEAVE_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}},total_channels_selected:_.length,total_channels_left:t.length})},m[9]=_,m[10]=C,m[11]=g,m[12]=A,m[13]=o):o=m[13];let I=o;m[14]!==g||m[15]!==A?(s=()=>{A((0,eY.i)({action:e$.TH.CREATE})),g.track(B.EventId.SIDEBAR_EDIT_MODE_NEW_SECTION_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}}})},m[14]=g,m[15]=A,m[16]=s):s=m[16];let w=s;m[17]!==g||m[18]!==A||m[19]!==y?(c=()=>{y({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),g.track(B.EventId.SIDEBAR_EDIT_MODE_CHECK_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}}}),A((0,tu.k)({isEditMode:!1}))},m[17]=g,m[18]=A,m[19]=y,m[20]=c):c=m[20];let T=c;if(!p)return;let N=f>0;if(m[21]!==C||m[22]!==f||m[23]!==h||m[24]!==S||m[25]!==T||m[26]!==w||m[27]!==b||m[28]!==x||m[29]!==I||m[30]!==k||m[31]!==N){let e,t,a;if(m[33]===Symbol.for("react.memo_cache_sentinel")?(e={className:tf().organizeModeMenu,"data-qa":"organize-mode-menu"},m[33]=e):e=m[33],m[34]!==f||m[35]!==k){let e,a;m[37]===Symbol.for("react.memo_cache_sentinel")?(e={"data-qa":"org_mode_count",className:tf().organizeModeMenuCount},m[37]=e):e=m[37],m[38]!==f?(a=tb.t("{selectedItemCount} selected",{selectedItemCount:f}),m[38]=f,m[39]=a):a=m[39],t=i.createElement("div",e,a,f>0&&i.createElement(i.Fragment,null,i.createElement("span",null," | "),i.createElement(ez.A,{invert:!0,"data-qa":"org_mode_deselect",onClick:k},tb.t("Clear selection")))),m[34]=f,m[35]=k,m[36]=t}else t=m[36];if(m[40]!==C||m[41]!==h||m[42]!==S||m[43]!==T||m[44]!==w||m[45]!==b||m[46]!==x||m[47]!==I||m[48]!==N){let e,t,n,r,l;m[50]===Symbol.for("react.memo_cache_sentinel")?(e={className:tf().organizeModeMenuActions},m[50]=e):e=m[50],m[51]!==C||m[52]!==h||m[53]!==w||m[54]!==b||m[55]!==x||m[56]!==N?(t=N?i.createElement(eQ.A,{onItemSelected:C,position:"top"},i.createElement(D.Ay,{type:h?"outline":"primary",className:tf().organizeModeMenuOrganizeAction,"data-qa":"org_mode_action_move"},tb.t("Move to\u2026"))):b&&i.createElement(eK.Ay,{tip:tb.t("New Section"),tipClassName:u()({hidden:!x}),position:"top",onShow:v},i.createElement(D.Ay,{type:h?"outline":"primary",className:tf().organizeModeMenuOrganizeAction,"data-qa":"org_mode_action_create",onClick:w},tb.t("New Section"))),m[51]=C,m[52]=h,m[53]=w,m[54]=b,m[55]=x,m[56]=N,m[57]=t):t=m[57],m[58]!==h||m[59]!==I?(n=h&&i.createElement(D.Ay,{type:"outline",className:tf().organizeModeMenuOrganizeAction,"data-qa":"leave_channels_bulk",onClick:I},h?tb.t("Leave"):"Leave"),m[58]=h,m[59]=I,m[60]=n):n=m[60],m[61]!==h||m[62]!==T||m[63]!==x?(r=h&&i.createElement(eK.Ay,{tip:tb.t("Done"),tipClassName:u()({hidden:!x}),position:"top",onShow:v},i.createElement(D.Ay,{"aria-label":tb.t("Done"),type:"primary",className:u()(tf().organizeModeMenuOrganizeAction,tf().doneButton),"data-qa":"org_mode_action_done",onClick:T},i.createElement(F.Ah,{name:"check",type:"filled"}))),m[61]=h,m[62]=T,m[63]=x,m[64]=r):r=m[64],m[65]!==h||m[66]!==S||m[67]!==x?(l=!h&&i.createElement(eK.Ay,{tip:tb.t("Done"),tipClassName:u()({hidden:!x}),position:"top",onShow:v},i.createElement(D.Ay,{type:"outline",className:tf().organizeModeMenuOrganizeAction,"data-qa":"org_mode_action_done",onClick:S},tb.t("Done"))),m[65]=h,m[66]=S,m[67]=x,m[68]=l):l=m[68],a=i.createElement("div",e,t,n,r,l),m[40]=C,m[41]=h,m[42]=S,m[43]=T,m[44]=w,m[45]=b,m[46]=x,m[47]=I,m[48]=N,m[49]=a}else a=m[49];d=i.createElement("div",e,t,a),m[21]=C,m[22]=f,m[23]=h,m[24]=S,m[25]=T,m[26]=w,m[27]=b,m[28]=x,m[29]=I,m[30]=k,m[31]=N,m[32]=d}else d=m[32];return d}:()=>{let e=(0,W.d4)(eR.Ou),t=(0,W.d4)(e=>"on"===(0,tp._Z)(e,"bulk_leave_channels_from_sidebar")),a=(0,W.Z2)(eR.a2),n=(0,W.d4)(eR.fM)||0,r=(0,W.d4)(e=>(0,eT.qR)((0,eP.H7)(e))),o=(0,U.A)(),{transitionFocusTo:s}=(0,i.useContext)(ej.Ay),c=(0,l.wA)(),[d,m]=(0,i.useState)(!1),p=(0,i.useCallback)(()=>{c((0,tm.zm)())},[c]),h=(0,i.useCallback)(()=>{s({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),p()},[p,s]),_=(0,i.useCallback)(({isTruncated:e})=>{e&&m(!0)},[]),f=(0,i.useCallback)(()=>{s({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),c((0,tu.k)({isEditMode:!1}))},[c,s]),b=(0,i.useCallback)(async()=>{let e=c(tc(a)),t=a.filter(t=>!e.includes(t)).map(td.FB).filter(e=>void 0!==e||null!==e);e.length?c((0,th.q)({element:i.createElement(ConfirmLeaveChannelsModal,{channelIdsThatCannotBeLeft:e,channelIdsToLeave:t})})):t.length&&c((0,e7.r)({commitToLeaveChannelsById:t,recommendedChannelsToLeaveIds:t})),c((0,tu.k)({isEditMode:!1})),p(),o.track(B.EventId.SIDEBAR_EDIT_MODE_LEAVE_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}},total_channels_selected:a.length,total_channels_left:t.length})},[a,p,o,c]),g=(0,i.useCallback)(()=>{c((0,eY.i)({action:e$.TH.CREATE})),o.track(B.EventId.SIDEBAR_EDIT_MODE_NEW_SECTION_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}}})},[o,c]),y=(0,i.useCallback)(()=>{s({focusKey:ee.Ay.SIDEBAR_CURRENT_CHANNEL}),o.track(B.EventId.SIDEBAR_EDIT_MODE_CHECK_CLICK,{contexts:{ui_context:{action:B.UiAction.CLICK}}}),c((0,tu.k)({isEditMode:!1}))},[o,c,s]);if(!e)return;let A=n>0;return i.createElement("div",{className:tf().organizeModeMenu,"data-qa":"organize-mode-menu"},i.createElement("div",{"data-qa":"org_mode_count",className:tf().organizeModeMenuCount},tb.t("{selectedItemCount} selected",{selectedItemCount:n}),n>0&&i.createElement(i.Fragment,null,i.createElement("span",null," | "),i.createElement(ez.A,{invert:!0,"data-qa":"org_mode_deselect",onClick:h},tb.t("Clear selection")))),i.createElement("div",{className:tf().organizeModeMenuActions},A?i.createElement(eQ.A,{onItemSelected:p,position:"top"},i.createElement(D.Ay,{type:t?"outline":"primary",className:tf().organizeModeMenuOrganizeAction,"data-qa":"org_mode_action_move"},tb.t("Move to\u2026"))):r&&i.createElement(eK.Ay,{tip:tb.t("New Section"),tipClassName:u()({hidden:!d}),position:"top",onShow:_},i.createElement(D.Ay,{type:t?"outline":"primary",className:tf().organizeModeMenuOrganizeAction,"data-qa":"org_mode_action_create",onClick:g},tb.t("New Section"))),t&&i.createElement(D.Ay,{type:"outline",className:tf().organizeModeMenuOrganizeAction,"data-qa":"leave_channels_bulk",onClick:b},t?tb.t("Leave"):"Leave"),t&&i.createElement(eK.Ay,{tip:tb.t("Done"),tipClassName:u()({hidden:!d}),position:"top",onShow:_},i.createElement(D.Ay,{"aria-label":tb.t("Done"),type:"primary",className:u()(tf().organizeModeMenuOrganizeAction,tf().doneButton),"data-qa":"org_mode_action_done",onClick:y},i.createElement(F.Ah,{name:"check",type:"filled"}))),!t&&i.createElement(eK.Ay,{tip:tb.t("Done"),tipClassName:u()({hidden:!d}),position:"top",onShow:_},i.createElement(D.Ay,{type:"outline",className:tf().organizeModeMenuOrganizeAction,"data-qa":"org_mode_action_done",onClick:f},tb.t("Done")))))};function organize_mode_menu_temp(e){return"on"===(0,tp._Z)(e,"bulk_leave_channels_from_sidebar")}function organize_mode_menu_temp2(e){return(0,eT.qR)((0,eP.H7)(e))}function organize_mode_menu_temp3(e){return void 0!==e||null!==e}tg.displayName="OrganizeModeMenu";var ty=a(0x1789e94fa),tA=a(0x95a99bb7),tx=a(0x12edaa96a),tE=a(0x18ee7321c),tC=a(0x11243fb75),tk=a(0x5a3e6194);let SetupSidebarChannel=({channel:e,className:t,showHighlighted:a,isLastHighlightedItem:n,style:r})=>{let l=e?.channelType?`team_setup_sidebar_channel_link_${e.channelType}`:"team_setup_sidebar_channel_link";return i.createElement(tA.CS.div,{className:u()("p-channel_sidebar__static_list__item",{"p-channel_sidebar__static_list__item--with-highlight":a,"p-channel_sidebar__static_list__item--with-highlight-last-item":n}),style:r,"data-qa":l},i.createElement("div",{className:u()("p-channel_sidebar__channel p-channel_sidebar__channel--setup p-channel_sidebar__channel--ia4_setup",t),"data-qa":"team_setup_sidebar_channel_container"},i.createElement(tk.A,{iconType:"channel-pane-hash",className:"margin_left_0 margin_right_25"}),i.createElement("span",{className:"p-channel_sidebar__name"},e.channelName)))};SetupSidebarChannel.displayName="SetupSidebarChannel";var tv=a(0x1df96de4c),tS=a(0x1c659cbb1),tI=a(0xf93aa03a);let SetupSidebarDirectMessageEmail=({email:e,isSetupPageBootstrapInviteStep:t,isSetupPageChannelsStep:a,showHighlighted:n,style:r})=>{let l=i.createElement("div",{className:"p-channel_sidebar__user_avatar margin_left_0"},e.photo?i.createElement("img",{src:e.photo,className:"p-channel_sidebar__avatar",height:tI.V,width:tI.V,alt:""}):i.createElement(tS.Ay,{userId:"",size:tI.z,isInteractive:!1})),o=e.name||e.emailName,s=i.createElement("div",{className:"p-channel_sidebar__channel p-channel_sidebar__channel--setup p-channel_sidebar__channel--ia4_setup"},l,i.createElement("span",{className:"p-channel_sidebar__name"},o)),c=i.createElement("div",{className:u()("p-channel_sidebar__static_list__item",{"p-channel_sidebar__static_list__item--with-highlight":n}),"data-qa":"team_setup_sidebar_dm"},s);return t?i.createElement(tA.CS.div,{className:"p-channel_sidebar__setup_channel_container p-channel_sidebar__setup_channel_container--direct_message",style:r||tv.t0},i.createElement("div",{className:"p-channel_sidebar__close_container"},s)):a?i.createElement(tA.CS.div,{style:r||tv.t0},c):c};SetupSidebarDirectMessageEmail.displayName="SetupSidebarDirectMessageEmail";var tw=a(0x21d85d6e5),tT=a(0xe684f705);let tN=new I.Ay("setup_page"),SetupSidebarDirectMessageMember=({memberId:e,showHighlighted:t,isLastHighlightedItem:a,style:n,name:r,isSelf:l})=>{let o=(0,W.d4)(t=>(0,tT.nv)(t,e)),s=(0,W.d4)(e=>(0,tw.sE)(e,o)),c=i.createElement("div",{className:"p-channel_sidebar__user_avatar margin_left_0"},i.createElement(tS.Ay,{userId:e,size:tI.z,isInteractive:!1}));return i.createElement(tA.CS.div,{className:u()("p-channel_sidebar__setup_channel_container p-channel_sidebar__setup_channel_container--direct_message",{"p-channel_sidebar__static_list__item--with-highlight":t,"p-channel_sidebar__static_list__item--with-highlight-last-item":a}),style:n||tv.t0},i.createElement("div",{className:"p-channel_sidebar__close_container"},i.createElement("div",{className:"p-channel_sidebar__channel p-channel_sidebar__channel--setup p-channel_sidebar__channel--ia4_setup","data-qa":"team_setup_sidebar_dm_member"},c,i.createElement("span",{className:"p-channel_sidebar__name"},r||s),l&&i.createElement("span",{className:"p-channel_sidebar__member_label"},tN.t("you")))))};SetupSidebarDirectMessageMember.displayName="SetupSidebarDirectMessageMember";var tM=a(0x182c9b0b0),tR=a(0x1b9d5cc0c),tP=a(0x1c91944c9),tL=a(0x18a17ca8f),tO=a(0x74bbb29a),tD=a(0x19895585a);let tF=(0,tM.A)((0,tP.N)((e,{getSiblingView:t})=>{let a=t(e,{container:tD.mq.Primary})?.id===tO.mH.Profile,n=(0,tL.bx)(e),r=(0,tL.nO)(e),i=(0,tT.cA)(e),l=(0,tL._E)(e);return{name:(n||r)&&a?l||" ":void 0,memberId:(0,tR.K6)(i)||"",isSelf:!0}})(SetupSidebarDirectMessageMember)),tU=new I.Ay("setup_page"),setup_sidebar_empty_direct_messages=()=>i.createElement("div",{className:"p-channel_sidebar__static_list__item"},i.createElement("div",{className:"p-channel_sidebar__section_heading p-channel_sidebar__section_heading--setup-sidebar-empty-dms"},tU.rt("No one\u2019s been added yet. <br></br>You can add up to 15 people.")));var tB=a(0x15f8e452a),tH=a(0x38ec07f3);let tW=new I.Ay("setup_page"),setup_sidebar_heading_channels=({className:e,showCaret:t,showCollapsibleIcon:a,showHighlighted:n,style:r})=>i.createElement(tA.CS.div,{style:r||tv.t0,className:"p-channel_sidebar__static_list__item"},i.createElement("div",{className:u()("p-channel_sidebar__section_heading p-channel_sidebar__section_heading--setup-sidebar",{"p-channel_sidebar__section_heading--with-caret":t,"p-channel_sidebar__section_heading--with-highlight":n},e)},a&&i.createElement("span",{className:"p-channel_sidebar__section_heading_expand_container","aria-hidden":!0},i.createElement(tB.A,{"data-qa":"channel-section-collapse",className:"p-channel_sidebar__section_heading_expand",type:"caret-right",size:"inherit",inline:!0})),i.createElement(tH.C,{setup:!0,tabIndex:-1,role:"presentation","aria-label":tW.t("Selected channels section")},tW.t("Channels")))),tV=new I.Ay("setup_page"),setup_sidebar_heading_direct_messages=({className:e,showCaret:t,showCollapsibleIcon:a,showHighlighted:n,selectedMembersCount:r,fadeOut:l,style:o})=>i.createElement(tA.CS.div,{style:o||tv.t0,className:"p-channel_sidebar__static_list__item"},i.createElement("div",{className:u()("p-channel_sidebar__section_heading p-channel_sidebar__section_heading--setup-sidebar",{"p-channel_sidebar__section_heading--with-caret":t,"p-channel_sidebar__section_heading--with-highlight":n,three_fourths_opacity:l},e)},a&&i.createElement("span",{className:"p-channel_sidebar__section_heading_expand_container","aria-hidden":!0},i.createElement(tB.A,{"data-qa":"channel-section-collapse",className:"p-channel_sidebar__section_heading_expand",type:"caret-right",size:"inherit",inline:!0})),i.createElement(tH.C,{setup:!0,setupDms:!0,tabIndex:-1,role:"presentation","aria-label":tV.t("Direct messages section")},tV.t("Direct messages")," ",!!r&&i.createElement("span",{className:"p-setup_sidebar_heading_selected_count"},r," / ",15)))),tG=new I.Ay("setup_page"),setup_sidebar_heading_people=()=>i.createElement("div",{className:"p-channel_sidebar__static_list__item"},i.createElement("div",{className:"p-channel_sidebar__link p-channel_sidebar__link--selected p-channel_sidebar__link--page p-channel_sidebar__link--setup-sidebar"},i.createElement(tH.C,{setup:!0,tabIndex:0,role:"presentation","aria-label":tG.t("People section")},i.createElement(tB.A,{className:"margin_right_50",type:"team-directory",size:"inherit"}),i.createElement("strong",null,tG.t("People"))))),setup_sidebar_loading_spacer=({type:e,className:t,hasBottomBorder:a})=>i.createElement("div",{className:t||""},"menu"===e&&i.createElement("div",{className:u()("p-channel_sidebar__loading_spacer_section","p-channel_sidebar__loading_spacer_section--menu",{"p-channel_sidebar__loading_spacer_section--bottom-border":a})},i.createElement("div",{className:"p-channel_sidebar__loading_spacer_row p-channel_sidebar__loading_spacer_row--long"})),"double"===e&&i.createElement(i.Fragment,null,i.createElement("div",{className:"p-channel_sidebar__loading_spacer_section"},i.createElement("div",{className:"p-channel_sidebar__loading_spacer_row p-channel_sidebar__loading_spacer_row--long"})),i.createElement("div",{className:u()("p-channel_sidebar__loading_spacer_section",{"p-channel_sidebar__loading_spacer_section--bottom-border":a})},i.createElement("div",{className:"p-channel_sidebar__loading_spacer_row p-channel_sidebar__loading_spacer_row--short"}))),"single"===e&&i.createElement("div",{className:"p-channel_sidebar__loading_spacer_section"},i.createElement("div",{className:"p-channel_sidebar__loading_spacer_row p-channel_sidebar__loading_spacer_row--long"}))),tq=new I.Ay("setup_page"),SetupSidebarSeeMoreItem=({className:e,extraItemsCount:t,onClickSeeMore:a,style:n})=>i.createElement(tA.CS.div,{style:n||{},className:"p-channel_sidebar__static_list__item"},i.createElement(ez.A,{className:u()("p-channel_sidebar__section_heading p-channel_sidebar__section_heading--setup-sidebar-see-more",e),onClick:a},i.createElement(tH.C,{tabIndex:0,role:"presentation","aria-label":tq.t("See {extraItemsCount} more",{extraItemsCount:t})},tq.t("See {extraItemsCount} more",{extraItemsCount:t}))));SetupSidebarSeeMoreItem.displayName="SetupSidebarSeeMoreItem";var tj=a(0x217553e42),tK=a(0x1defa8f11),t$=a(0x19f74d539),tY=a(0x12219f474),tQ=a(0x496cd4ea);let tZ=new I.Ay("setup_page"),tJ={transform:"scaleY(0.65)",opacity:0},tX={transform:"scaleY(1)",opacity:1},t0={transform:"translateY(-40px)"},t1={transform:"translateY(0)"},t2={mass:.5,tension:300,friction:12,delay:0},t4={...t2,friction:60},t5=class extends i.Component{listRef=i.createRef();getSidebarItems=()=>{let{channelItem:e,dmItems:t,isJoinerSetupPageWelcomeStep:a,isJoinerSetupPagePeopleStep:n,isJoinerPersonalizedLaunchpadProfileStep:r,isJoinerPersonalizedLaunchpadTeammateIntroStep:i,isJoinerPersonalizedLaunchpadTopicsStep:l,selectedMemberDmItems:o,isCreatorProfileStep:s,isSetupPageBootstrapInviteStep:c,aiWorkspaceChannelNames:d,isUserInCreateAiWorkspaceFlowCheck:m,isEligibleForAiWorkspaceTeamCreation:u,isSetupPageTeamNameStep:p}=this.props,h={id:tO.HN.ChannelHeading,type:tO.HN.ChannelHeading},_={id:tO.HN.DirectMessagesHeading,type:tO.HN.DirectMessagesHeading},f=[];return p||s||a||r||i||l?m&&d.length>0?(f.push(h),f.push(...d),f):[]:n||c||u||(f.push(h),e?.channelName&&f.push({...e,id:e.id??(0,tx.A)()}),!m||!(d.length>0))?(f.push(_,...t,...o),f):(f.push(...d),f)};renderItem=e=>{let{channelItem:t,isSetupPageBootstrapInviteStep:a,isSetupPageChannelsStep:n}=this.props;switch(e.type){case tO.HN.ChannelHeading:return i.createElement(tC.c,{id:e.id,interactive:!1,"aria-labelledby":`channel-heading-${e.id}`},n?i.createElement(tA.c7,{from:tJ,to:tX,config:t2},e=>i.createElement(setup_sidebar_heading_channels,{className:u()("p-channel_sidebar__section_heading--ia4_setup",{"p-channel_sidebar__section_heading--ia4_setup_inactive":!this.props.channelItem?.channelName}),style:e})):i.createElement(setup_sidebar_heading_channels,{className:u()("p-channel_sidebar__section_heading--ia4_setup",{"p-channel_sidebar__section_heading--ia4_setup_inactive":!this.props.channelItem?.channelName})}));case tO.HN.Channel:{let t={key:`${e.channelType}-${e.id}`,channel:e,className:"p-channel_sidebar__channel--ia4_setup",showHighlighted:!1,isLastHighlightedItem:!1};return i.createElement(tC.c,{id:e.id,interactive:!0,"aria-labelledby":`channel-${e.id}`},i.createElement(SetupSidebarChannel,t))}case tO.HN.DirectMessagesHeading:{let r={className:u()("p-channel_sidebar__section_heading--ia4_setup",{margin_top_75:!a&&!!t?.channelName,margin_top_250:!a&&!t?.channelName,"p-channel_sidebar__section_heading--ia4_setup_inactive":this.props.dmItems.length<=0&&this.props.selectedMemberDmItems.length<=0&&!this.props.isFocusedOnEmailInvitesInput}),showCaret:!1,showHighlighted:!1,selectedMembersCount:this.props.selectedMemberDmItems.length},l=`direct-messages-heading-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!1,"aria-labelledby":l},n?i.createElement(tA.c7,{from:t0,to:t1,config:t4},e=>i.createElement(setup_sidebar_heading_direct_messages,{...r,style:e})):i.createElement(setup_sidebar_heading_direct_messages,r))}case tO.HN.DirectMessageEmail:{let[t,a,r]=n?[t0,t1,t4]:[tJ,tX,t2],l=`direct-message-email-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!0,"aria-labelledby":l},i.createElement(tA.c7,{from:t,to:a,config:r,key:n?"slide":"scale"},t=>i.createElement(SetupSidebarDirectMessageEmail,{style:t,key:e.id,email:e,isSetupPageBootstrapInviteStep:this.props.isSetupPageBootstrapInviteStep,isSetupPageChannelsStep:n,showHighlighted:!1})))}case tO.HN.DirectMessageMember:{let t=`direct-message-member-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!0,"aria-labelledby":t},e.memberId&&i.createElement(tA.c7,{from:tJ,to:tX,config:t2},t=>i.createElement(SetupSidebarDirectMessageMember,{key:e.id,style:t,name:e.name,showHighlighted:!1,isLastHighlightedItem:!1,memberId:e.memberId??""})))}case tO.HN.DirectMessageSelf:{let t=`direct-message-self-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!0,"aria-labelledby":t},i.createElement(tA.c7,{from:tJ,to:tX,config:t2},t=>i.createElement(tF,{key:e.id,style:t,showHighlighted:!1,isLastHighlightedItem:!1})))}case tO.HN.DirectMessagesEmpty:{let t=`direct-messages-empty-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!1,"aria-labelledby":t},i.createElement(setup_sidebar_empty_direct_messages,null))}case tO.HN.PeopleHeading:{let t=`people-heading-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!1,"aria-labelledby":t},i.createElement(setup_sidebar_heading_people,null))}case tO.HN.SeeMore:{let t=`see-more-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!0,"aria-labelledby":t},e.extraItemsCount&&i.createElement(SetupSidebarSeeMoreItem,{onClickSeeMore:e.onClickSeeMore??p.A,extraItemsCount:e.extraItemsCount}))}case tO.HN.Spacers:{let t=`spacer-${e.id}`;return i.createElement(tC.c,{id:e.id,interactive:!1,"aria-labelledby":t},i.createElement(setup_sidebar_loading_spacer,{type:"menu",hasBottomBorder:!0,className:"margin_bottom_200"}),i.createElement(setup_sidebar_loading_spacer,{type:"double",className:"margin_bottom_100"}),i.createElement(setup_sidebar_loading_spacer,{type:"single"}))}default:return i.createElement(i.Fragment,null)}};render(){let e=this.getSidebarItems();return i.createElement("div",{className:"p-channel_sidebar__list"},i.createElement(tE.A,{ref:this.listRef,className:"p-channel_sidebar__static_list",items:e,renderItem:this.renderItem,"aria-label":tZ.t("Selected channels")}))}};t5.displayName="SetupSidebar";let t3=(0,tM.A)((0,tP.N)((e,{getSiblingView:t})=>{let a=(0,tL.N1)(e,{getSiblingView:t}),n=(0,tL.H$)(e,{getSiblingView:t}),r=(0,tL.mj)(e,{getSiblingView:t,steps:[tO.mH.Welcome]}),i=(0,tL.RJ)(e,{getSiblingView:t}),l=(0,tL.mj)(e,{getSiblingView:t,steps:[tO.mH.JoinerProfile]}),o=(0,tL.mj)(e,{getSiblingView:t,steps:[tO.mH.TeammateIntro]}),s=(0,tL.mj)(e,{getSiblingView:t,steps:[tO.mH.Topics]}),c=(0,tL.zi)(e),d=(0,tQ.C)(e),m=(0,tQ.d)(e),u=(0,tL.Pm)(e),p=t(e,{container:tD.mq.Primary})?.id===tO.mH.Profile,h=(0,t$.CC)(e),_=(0,tK.ax)(e,t$.yN),f=(0,tY.R)(e),b=[];if(h){let t=(0,tK.ax)(e,t$.M);if(t)b=t.split("|").filter(Boolean).map(t=>{let a=(0,tj.OL)(e,t),n=a?(0,e3.SB)(e,a,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}):t;return{id:t,type:tO.HN.Channel,channelName:n,channelNameRaw:(0,e3.SB)(e,a)||t}});else if(_&&""!==_)try{b=JSON.parse(_).map(e=>e.name).map(e=>({id:e,type:tO.HN.Channel,channelName:e,channelNameRaw:e}))}catch{b=[]}}return{channelItem:c,dmItems:d,selectedMemberDmItems:m,isSetupPageChannelsStep:n,isSetupPageTeamNameStep:a,isJoinerSetupPageWelcomeStep:r,isJoinerSetupPagePeopleStep:i,isJoinerPersonalizedLaunchpadProfileStep:l,isJoinerPersonalizedLaunchpadTeammateIntroStep:o,isJoinerPersonalizedLaunchpadTopicsStep:s,isCreatorProfileStep:p,isSetupPageBootstrapInviteStep:(0,tL.o3)(e,{getSiblingView:t}),isFocusedOnEmailInvitesInput:u,aiWorkspaceChannelNames:b,isUserInCreateAiWorkspaceFlowCheck:h,isEligibleForAiWorkspaceTeamCreation:f}})(t5));var t6=a(0x5b1935a6);let t8=i.lazy(()=>Promise.resolve().then(a.bind(a,0x1388cfd89))),t7={[t6.ze.SIDEBAR_SIMPLIFICATION_COACHMARK]:{component:t8}},t9="react_channel_sidebar_update",ae=(0,g.A)(1),at=class extends i.PureComponent{isSuggestedChannelsClogSent;hasInitializedDraftsData;autoscrollAnimationId;autoscrollHighPrecisionScrollTop;autoscrollLastTick;sidebarDivRef;ChannelList;restoreFocusTransition;resizeObserver;static defaultProps={autoscrollVelocity:0,bulkSetChannelSectionsCollapsed:p.A,bulkSetEditModeChannelSectionCollapsed:p.A,clearEditModeSelectedChannelIds:p.A,clogger:{},closeIM:p.A,connectDropTarget:h.A,editModeSelectedChannelIds:void 0,ensureDraftChannelObjects:void 0,experimentLightReadWhoCanDmAnyonePrefMigrationGroupOn:!1,getAriaLabelForRow:p.A,getContextMenuTemplateForChannel:p.A,getContextMenuTemplateForEntity:p.A,getContextMenuTemplateForSectionHeading:p.A,isBBModeEnabled:!1,isChannelDraggingOverSidebar:!1,isChannelSectionDraggingOverSidebar:!1,isEditMode:!1,isEntityDraggingOverSidebar:!1,isSetupPage:!1,isSlackAiRecapCoachmarkVisible:!1,keyboardLocale:void 0,logger:null,mentionIds:[],mutedMentionIds:[],onAppLauncherClick:p.A,onDMBrowserModalClick:p.A,onEditModeChannelClick:p.A,onEditModeChannelRangeClick:p.A,overlayIsOpen:!1,preFetchSlackConnectDmEligibility:p.A,rows:[],rowSectionPositioning:void 0,selectedItemId:null,setChannelSectionCollapsed:p.A,setEditModeChannelSectionCollapsed:p.A,setIsEditMode:p.A,sidebarSections:{},sidebarSummaryText:void 0,suggestedChannelIds:[],teamId:null,telemeter:null,toggleHuddleInHighlightedChannel:p.A,unreadIds:[],unreadsOnlyCoachmarkVisible:{},updateFocusHistoryState:p.A,starredChannelSectionBadgeResult:void 0,experimentSalesforceListsInSidebarGroupOn:!1,isCompactSidebar:!1,dismissOnboardingTasksLink:p.A};constructor(e){super(e),this.setRef=this.setRef.bind(this),this.ensureItemInView=this.ensureItemInView.bind(this),this.scrollOnNavigate=this.scrollOnNavigate.bind(this),this.onBlur=this.onBlur.bind(this),this.setSidebarDivRef=this.setSidebarDivRef.bind(this),this.restoreFocusTransition=null,this.isSuggestedChannelsClogSent=!1,this.hasInitializedDraftsData=!1,this.autoscrollTick=this.autoscrollTick.bind(this),this.autoscrollAnimationId=null,this.autoscrollHighPrecisionScrollTop=0,this.autoscrollLastTick=null,this.sidebarDivRef=i.createRef()}componentDidMount(){this.scrollOnNavigate(),this.maybeLoadDraftsData(),this.maybeBeaconBootMountSuccess(),this.props.experimentLightReadWhoCanDmAnyonePrefMigrationGroupOn||this.props.preFetchSlackConnectDmEligibility({reason:"sidebar-mount"}),this.sidebarDivRef.current&&(this.resizeObserver=(0,y.A)(this.onResize),this.resizeObserver.observe(this.sidebarDivRef.current))}componentWillUnmount(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0}onResize=(0,b.A)(e=>{let{width:t}=e[0].contentRect;f.J.document.documentElement.style.setProperty("--channelSidebarWidth",`${t}px`)},16,new WeakRef(f.J));UNSAFE_componentWillUpdate(e){ae&&e.telemeter.mark(`${t9}_mark`)}componentDidUpdate(e){let{rows:t,suggestedChannelIds:a,clogger:n,telemeter:r,isChannelDraggingOverSidebar:i,isChannelSectionDraggingOverSidebar:l,isEntityDraggingOverSidebar:o}=this.props;if(this.scrollOnNavigate(e?.selectedItemId),this.maybeLoadDraftsData(),ae&&r.measureAndClear(`${t9}_mark`,t9),!this.isSuggestedChannelsClogSent&&a.length){let e=t.filter(e=>"channel"===e.type&&a.includes(e.id));e.length&&n.track&&(this.isSuggestedChannelsClogSent=!0,n.track(B.EventId.SIDEBAR_SUGGESTED_CHANNELS_RENDERED,{count:e.length}))}this.maybeBeaconBootMountSuccess();let s=i||l||o,c=e.isChannelDraggingOverSidebar||e.isChannelSectionDraggingOverSidebar||e.isEntityDraggingOverSidebar;c&&!s&&this.autoscrollStop(),s&&!c&&this.autoscrollStart()}scrollOnNavigate(e){let{selectedItemId:t}=this.props;e!==t&&this.ensureItemInView(t)}onBlur(){this.restoreFocusTransition&&(this.restoreFocusTransition(),this.restoreFocusTransition=null)}setRef(e){this.ChannelList=e}setSidebarDivRef(e){this.props.connectDropTarget(e),this.sidebarDivRef.current=e}autoscrollStart(){this.autoscrollAnimationId=requestAnimationFrame(this.autoscrollTick),this.autoscrollHighPrecisionScrollTop=this.ChannelList?this.ChannelList.currentScrollTop:0}autoscrollStop(){this.autoscrollAnimationId&&(cancelAnimationFrame(this.autoscrollAnimationId),this.autoscrollLastTick=null,this.autoscrollAnimationId=null)}autoscrollTick(e){if(null===this.autoscrollLastTick&&(this.autoscrollLastTick=e),this.props.isChannelDraggingOverSidebar||this.props.isChannelSectionDraggingOverSidebar||this.props.isEntityDraggingOverSidebar){let t=(e-this.autoscrollLastTick)/1e3,a=this.props.autoscrollVelocity*t;if(a&&this.ChannelList){let e=this.ChannelList.getBoundingClientRect(),t=this.ChannelList.getContentHeight();this.autoscrollHighPrecisionScrollTop=(0,_.A)(this.autoscrollHighPrecisionScrollTop+a,0,t-e.height),this.ChannelList.jumpToOffset(this.autoscrollHighPrecisionScrollTop)}}this.autoscrollLastTick=e,this.autoscrollAnimationId=requestAnimationFrame(this.autoscrollTick)}ensureItemInView(e=this.props.selectedItemId){this.ChannelList?.ensureItemInView(e,24)}maybeBeaconBootMountSuccess(){let{teamId:e,rows:t,telemeter:a,logger:n}=this.props;window.clientBootMountTeam&&e===window.clientBootMountTeam&&t.length&&(a.count("client_boot_mount_success"),window.clientBootMountTeam=void 0,n.info("BOOT","Beaconed client boot mount success"))}maybeLoadDraftsData(){this.props.ensureDraftChannelObjects&&!this.hasInitializedDraftsData&&(this.props.ensureDraftChannelObjects(),this.hasInitializedDraftsData=!0)}render(){let{clogger:e,closeIM:t,experimentSidebarVisualUpdatesM1Enabled:a,getAriaLabelForRow:n,getChannelSectionPref:r,getContextMenuTemplateForChannel:l,getContextMenuTemplateForEntity:o,getContextMenuTemplateForSectionHeading:s,isBBModeEnabled:c,isChannelDraggingOverSidebar:d,isChannelSectionDraggingOverSidebar:m,isEditMode:p,isEntityDraggingOverSidebar:h,isSetupPage:_,isSlackAiRecapCoachmarkVisible:f,keyboardLocale:b,logger:g,onAppLauncherClick:y,onDMBrowserModalClick:A,overlayIsOpen:x,rows:E,rowSectionPositioning:C,selectedItemId:k,setChannelSectionPref:v,showChannelSectionsEduCoachmark:S,sidebarSections:I,sidebarSummaryText:w,tracer:T,unreadsOnlyCoachmarkVisible:N,starredChannelSectionBadgeResult:M,isEligibleForSidebarInviteSectionExperiment:R,experimentSalesforceListsInSidebarGroupOn:P,removeCreateASectionRow:L,isCompactSidebar:O,dismissOnboardingTasksLink:D}=this.props,F=u()("p-channel_sidebar",{"p-channel_sidebar--channel_dragging":d||h,"p-channel_sidebar--channel_section_dragging":m,"p-channel_sidebar--visual-updates-m1":a,"p-channel_sidebar--compact":a&&O});return _?i.createElement("div",{"data-qa-channel-sidebar":!0,className:F},i.createElement(t3,null)):i.createElement("div",{className:F,"data-qa":"channel-sidebar","data-qa-channel-sidebar":!0,"data-qa-channel-sidebar-selected-item-id":k,onBlur:this.onBlur,ref:this.setSidebarDivRef},w&&i.createElement("div",{id:"channel_sidebar_summary",hidden:!0},w),S&&i.createElement(eF,{anchorElement:this.sidebarDivRef.current}),i.createElement(ty.A,{spaceName:t6.xu.IN_PRODUCT_COACHMARK,notifications:t7}),i.createElement(eI,{rows:E,unreadIds:this.props.unreadIds,mentionIds:this.props.mentionIds,rowSectionPositioning:C,ref:this.setRef,logger:g,clogger:e,tracer:T,overlayIsOpen:x,selectedItemId:k,closeIM:t,overscanRatio:this.props.overscanRatio,getAriaLabelForRow:n,isEditMode:p,bannerHeight:24,keyboardLocale:b,setChannelSectionCollapsed:this.props.setChannelSectionCollapsed,bulkSetChannelSectionsCollapsed:this.props.bulkSetChannelSectionsCollapsed,setIsEditMode:this.props.setIsEditMode,setEditModeChannelSectionCollapsed:this.props.setEditModeChannelSectionCollapsed,bulkSetEditModeChannelSectionCollapsed:this.props.bulkSetEditModeChannelSectionCollapsed,editModeSelectedChannelIds:this.props.editModeSelectedChannelIds,onEditModeChannelClick:this.props.onEditModeChannelClick,onEditModeChannelRangeClick:this.props.onEditModeChannelRangeClick,clearEditModeSelectedChannelIds:this.props.clearEditModeSelectedChannelIds,toggleHuddleInHighlightedChannel:this.props.toggleHuddleInHighlightedChannel,updateFocusHistoryState:this.props.updateFocusHistoryState,unreadsOnlyCoachmarkVisible:N,getContextMenuTemplateForChannel:l,getContextMenuTemplateForEntity:o,getContextMenuTemplateForSectionHeading:s,onDMBrowserModalClick:A,onAppLauncherClick:y,sidebarSections:I,setChannelSectionPref:v,getChannelSectionPref:r,onOverflow:this.props.onOverflow,onScrollFromTop:this.props.onScrollFromTop,isSlackAiRecapCoachmarkVisible:f,isBBModeEnabled:c,starredChannelSectionBadgeResult:M,experimentSalesforceListsInSidebarGroupOn:P,removeCreateASectionRow:L,dismissOnboardingTasksLink:D}),i.createElement(tg,null),R&&i.createElement(eq,null))}};at.displayName="ChannelSidebar";var aa=a(0x241818e35),an=a(0x18def662b),ar=a(0x33644bb7),ai=a(0x7d48dd65);let al=new I.Ay("channel_sidebar");function makeAriaLabelForPage({name:e,hasUnreads:t,badgeCount:a,isCurrent:n,ariaLabelPhrases:r}={}){if(!e)return;let i=n?al.t("current page"):null,l=t&&!a?al.t("has unreads"):null,o=a?al.t("{count} {count, plural, =1 {unread highlight} other {unread highlights}}",{count:a}):null,s=(0,ai.A)([i,l,o,...r||[]],h.A);return e+(s.length?` (${s.join(", ")})`:"")}var ao=a(0x1cbc015b8);let as=(0,e6.Ay)("Sidebar: get aria-label for a page row",(e,t,{id:a,isCurrent:n})=>{let r=t(),i=(0,ao.gY)(a),l=i.sidebar||{},o=(0,ar.A)(l.hasUnreads)&&l.hasUnreads(r),s=(0,ar.A)(l.badgeCount)?l.badgeCount(r):void 0,c=(0,ar.A)(l.getAriaLabelPhrases)?l.getAriaLabelPhrases(r):[],d=(0,ar.A)(i.label)?i.label(r):void 0;return(0,eR.Ou)(r)?d:makeAriaLabelForPage({name:d,hasUnreads:o,badgeCount:s,isCurrent:n,ariaLabelPhrases:c})});as.meta={name:"getAriaLabelForPage",key:"createThunkGetAriaLabelForPage",description:"Sidebar: get aria-label for a page row"};var ac=a(0x1613da56a),ad=a(0x243435af9),am=a(0x209fb16e4),au=a(0x280afe13),ap=a(0xc1963a64),ah=a(0xae0b47e2),a_=a(0xebdd009e),af=a(0x1c9a3c4c1),ab=a(0x350d87d7),ag=a(0xdb0ffe37),ay=a(0x1aad32b98),aA=a(0xcdefddc8),ax=a(0x1d9331605),aE=a(0x2276768b0);let aC=new I.Ay("huddles");function makeAriaLabelWithHuddleInfo({huddleMemberCount:e,channelAriaLabel:t,featureIsHuddleEnabled:a}){if(!a)return"";let n=/[!,.?]/.test(t.slice(-1))?"":", ";return e?`${n}${aC.t("{memberCount, plural, =1 {# member} other {# members}} in huddle. Press {keyboardShortcut} to join huddle",{memberCount:e,keyboardShortcut:(0,a_.$z)()})}`:""}var ak=a(0x8baf11b5),av=a(0x16d481b37),aS=a(0xd76c2ee8),aI=a(0xa1d33e09),aw=a(0x21c11a1dc),aT=a(0xc4a84715),aN=a(0x1b32efd32),aM=a(0xc1360909),aR=a(0x1e75c70fa),aP=a(0x2207a1e7d),aL=a(0x1067595c0);let aO=new I.Ay("channel_sidebar"),aD=(0,e6.Ay)("Sidebar: get aria-label for a channel list row",(e,t,{id:a})=>{let n,r=t();if((0,J.z)(r,a))return e(as({id:a}));let i=(0,eR.Ou)(r);if("Vall_threads"===a){let e=aO.t("Threads");if(i)return e;let t=(0,aL.zx)(r);return makeAriaLabelForPage({badgeCount:(0,aL.nJ)(r),hasUnreads:t,name:e})}if(a===ac.IN)return aO.t("Free Trial Badge");let l=(0,tj.OL)(r,a),o=(0,e3.SB)(r,l,{publicChannelIncludeHashSign:!1});if(i)return o;let s=(0,ak.B)(r,a),c=(0,td.yc)(r,a),d=(0,tj.TJ)(r,l)??0,m=(0,td.m2)(r,l),u=(0,tr.mz)(l);if("im"===u){let e=(0,au.e)(l),t=(0,tT.nv)(r,e),a=(0,ap.V)(r,l),i="away"===(0,aP.gd)(r,e),u=(0,aI.z)(r,e),p=e?(0,aT.A)(r,e):void 0,h=e?(0,aN.A)(r,e):void 0,_=!!(t&&(0,ad.mr)(r))&&(0,af.D)(t),f=(0,ag.g)(t)?(0,ay.Ux)(r,t):void 0,b=f?(0,eP._J)(r,f):void 0,g=b?(0,eT.F1)(b):void 0,y="on"===(0,tp._Z)(r,"presence_status_aria_label_strings");n=(0,ax.A)({realName:o,teamName:g,isSelf:a,hasNotifications:d>0,isStarred:m,isMuted:s,hasDraft:c,isPrescenceAway:i,isPrescenceDND:u,isAgent:_,statusEmojiCode:p,statusText:h,isAppOrBot:(0,ab.A)(t)||(0,tR.v3)(t),countNotifications:d,experimentPresenceStatusAriaLabelStringsGroupOn:y})}else if("mpim"===u)n=(0,aE.A)({name:o,hasNotifications:d>0,isStarred:m,isMuted:s,hasDraft:c,countNotifications:d});else{let e,t=(0,aM.q8)(r,a),i=(0,eP.lp)(r),u=i?(0,ah.v4)(i):void 0,p=(0,am.i)((0,tj.MS)(r),l),h=(0,aS.Q)(r,{channel:l});(p||h)&&(e=(0,av.a)(r,{channel:l,xwsAlpha:h})),n=(0,aA.A)({channelName:o,workspaceName:e,isPrivate:(0,tr.Zp)(l),isStarred:m,isMuted:s,hasDraft:c,hasUnreads:!!(0,td.$M)(l),countNotifications:d,orgName:u,channelMemberCount:t?.counts.member_count,channelPurpose:(0,td.z8)(l)})}let p=(0,aw.Yw)(r,a);return(p?.activeParticipants.length&&(n+=makeAriaLabelWithHuddleInfo({huddleMemberCount:p.activeParticipants.length,channelAriaLabel:n,featureIsHuddleEnabled:(0,a_.Bn)(r,l)})),(0,aR.A)(r,a))?aO.t("{channel}, failed to send message",{channel:n}):n});aD.meta={name:"getAriaLabelForRow",key:"createThunkGetAriaLabelForRow",description:"Sidebar: get aria-label for a channel list row"};var aF=a(0x18e18e7ac),aU=a(0x1720d0b2);let aB=new I.Ay("channel_sidebar");var aH=a(0x7f81b930),aW=a(0x138fb0cc6),aV=a(0x18ba7eec),aG=a(0xd843ab47),aq=a(0xf5bbd10a),aj=a(0x6bd05def),az=a(0x22eadb31b),aK=a(0x1599ad93e),a$=a(0xf3508007),aY=a(0x9b971e7e),aQ=a(0x1feee1711);let aZ=(0,e6.Ay)("Clicked on a channel in the channel sidebar when in edit mode",(e,t,{channelId:a})=>{let n=t();if(!(0,eR.Ou)(n))return 0;let r=!(0,eR.DV)(n,a);return e((0,tm.Td)({channelId:a,isSelected:r})),e(r?(0,tm.WT)({channelId:a}):(0,tm.WT)({channelId:null})),e((0,tm.ZV)({channelId:null})),(0,eR.fM)(t())});aZ.meta={name:"onEditModeChannelClick",key:"createThunkOnEditModeChannelClick",description:"Clicked on a channel in the channel sidebar when in edit mode"};let aJ=(0,e6.Ay)("Shift-clicked on a channel in the channel sidebar when in edit mode",(e,t,{channelId:a,rows:n})=>{let r,i,l,o=t();if(!(0,eR.Ou)(o))return 0;let s=(0,eR.os)(o),c=(0,eR.Ls)(o);if(!s)return e(aZ({channelId:a})),(0,eR.fM)(t());if(n?.forEach((e,t)=>{e.id===a&&(l=t),e.id===s&&(r=t),c&&e.id===c&&(i=t)}),c&&!(0,aQ.A)(r)&&!(0,aQ.A)(i))for(let t=Math.min(r,i);t<=Math.max(r,i);++t){let a=n?.[t];a?.type==="channel"&&e((0,tm.Td)({channelId:a.id,isSelected:!1}))}if(e((0,tm.ZV)({channelId:a})),!(0,aQ.A)(r)&&!(0,aQ.A)(l))for(let t=Math.min(r,l);t<=Math.max(r,l);++t){let a=n?.[t];a?.type==="channel"&&e((0,tm.Td)({channelId:a.id,isSelected:!0}))}return(0,eR.fM)(t())});aJ.meta={name:"onEditModeChannelRangeClick",key:"createThunkOnEditModeChannelRangeClick",description:"Shift-clicked on a channel in the channel sidebar when in edit mode"};var aX=a(0x1c5668bfd),a0=a(0x115aa5ac3),a1=a(0x19d55d0e1),a2=a(0x12a9226a0),a4=a(0x42a2d0a3),a5=a(0x21c135fe1),a3=a(0x7441941c),a6=a(0x45012309),a8=a(0x171a902a),a7=a(0x234b24cc8),a9=a(0x1d01649c6),ne=a(0x24018635b);let nt=(0,e6.Ay)("Channel Sections: move a sidebar section to before a target channel/section",async(e,t,{channelSectionId:a,nextChannelSectionId:n=null,reason:r})=>{let i=(0,eR.xe)(t(),a),l=i.nextChannelSectionId;if(a===n)return null;let{promise:o}=await e((0,ne.g)({channelSection:{...i,nextChannelSectionId:n},reason:r}));return{resultPromise:o,undo:()=>(o.cancel(),e((0,ne.g)({channelSection:{...(0,eR.xe)(t(),a),nextChannelSectionId:l},reason:`undo-${r}`})))}});nt.meta={name:"moveChannelSection",key:"createThunkMoveChannelSection",description:"Channel Sections: move a sidebar section to before a target channel/section"};var na=a(0x17a41206b);let nn=(0,e6.Ay)("drag and drop: can the channel sidebar receive a drop",(e,t,{dropItem:a,dropItemType:n})=>{let r=t();if(!(0,na.Pb)(r)||(0,a9.T)(r))return!1;if(n===aH.XV&&a.channelSidebarItems){let e=(0,eR.Hj)(r),t=(0,eR.xe)(r,e.channelSectionId);return!!t&&a.channelSidebarItems.some(e=>{var a,n;return(0,a4.V)(e.channel)&&(a=e.channel,!!(n=t?.type)&&(!(0,a1.jT)(a)||n===er.VZ.Standard||n===er.VZ.Stars))&&(0,a5.r)(e,t)})}if(n===aH.IC&&a.row){let e=(0,eR.Hj)(r),t=(0,eR.xe)(r,e.channelSectionId);return!!t&&(0,a2.p)(a.row.entity,t?.type)}return n===aH.Pz&&!!a.channelSection&&(0,a3.$x)(a.channelSection)});nn.meta={name:"getChannelSidebarCanDrop",key:"createThunkGetChannelSidebarCanDrop",description:"drag and drop: can the channel sidebar receive a drop"};let nr=(0,e6.Ay)("drag and drop: action when channel sidebar receives a drop",(e,t,{dropItem:a,dropItemType:n})=>{let r=t(),i=(0,a6.eo)({state:r});if(n===aH.XV&&a.channelSidebarItems){let t=(0,eR.Hj)(r),n={},l={},o=t.channelSectionId,s=(0,eR.xe)(r,o);a.channelSidebarItems.forEach(e=>{if(!(0,a5.r)(e,s))return;let t=e.channel.id,a=e.channelSection&&e.channelSection.id;a!==o&&(a&&(n[a]||(n[a]=[]),n[a].push(t)),o&&(l[o]||(l[o]=[]),l[o].push(t)))});let c=Object.keys(n).map(e=>({channelSectionId:e,channelIds:n[e]})),d=Object.keys(l).map(e=>({channelSectionId:e,channelIds:l[e]})),getRelevantChannelSectionIds=e=>e.map(e=>e.channelSectionId),m=[...getRelevantChannelSectionIds(c),...getRelevantChannelSectionIds(d)],u={};m.forEach(e=>{let t=(0,eR.xe)(r,e)?.type;u[e]=t===a0.Ri.Standard?"custom":t}),(c.length||d.length)&&(e((0,a8.A)({remove:c,insert:d,reason:"channel-sidebar-channel-drop"})),i.track(B.EventId.CHANNEL_SECTIONS_CHANNELS_MOVE,{contexts:{ui_context:{action:B.UiAction.DROP,ui_component_name:"ConnectedChannelSidebar"}},remove:(0,aX.A)(c||[]),insert:(0,aX.A)(d||[]),sectionType:u}))}if(n===aH.IC&&a.row){let t=(0,eR.Hj)(r).channelSectionId,n=a.row.channelSection?.id;if(!t||n===t)return;n&&t&&(e((0,a7.s)({insert:[{channelSectionId:t,entities:[a.row.entity]}],remove:[{channelSectionId:n,entities:[a.row.entity]}],reason:"channel-sidebar-entity-move-sections"})),i.track(B.EventId.LOB_SALESFORCE_INTEGRATIONS,{contexts:{ui_context:{ui_component_name:B.UiComponentName.SIDEBAR_ENTITY,ui_component_variant:a.row.entity.entityType,action:B.UiAction.DROP,ui_properties:{element_type:B.ElementType.LINK,element_name:"drop_sidebar_entity",element_value:a.row.id},drag_channel_section_id:n,drop_channel_section_id:t}}}));return}if(n===aH.Pz&&a.channelSection){let t=a.channelSection.id,n=(0,eR.Cy)(r),l=(0,eR.VH)(r),{channelSectionId:o,isAfter:s}=n||{},c=o??null;if(s){let e=l.findIndex(e=>e.id===o),t=e>=0?l[e+1]:void 0;c=t?t.id:null}e(nt({channelSectionId:t,nextChannelSectionId:c,reason:"channel-sidebar-section-drop"})),i.track(B.EventId.CHANNEL_SECTIONS_MOVE,{contexts:{ui_context:{action:B.UiAction.DROP,ui_component_name:"ConnectedChannelSidebar"}},channel_section_id:t,next_channel_section_id:c})}});nr.meta={name:"onChannelSidebarDrop",key:"createThunkOnChannelSidebarDrop",description:"drag and drop: action when channel sidebar receives a drop"};var ni=a(0x21f3c49e8),nl=a(0x1ec68d6a3),no=a(0x1c2eef3c8);let ns=(0,e6.Ay)("Ensure channels with drafts exist in our model",(e,t)=>{let a=t(),n=(0,nl.Ay)({state:a,label:"DRAFTS"}),r=(0,no.Qs)(a);!r||(0,ni.A)(r)?n.info("There are no channels with drafts"):(n.info("Ensuring we have channel objects for all channels with drafts"),r.forEach(e=>{(0,tj.OL)(a,e)}))});ns.meta={name:"ensureDraftChannelObjects",key:"createThunkEnsureDraftChannelObjects",description:"Ensure channels with drafts exist in our model"};var nc=a(0xb4434dab),nd=a(0x1e561f770),nm=a(0x365a4cc3),nu=a(0xf139e1df),np=a(0x21bfacd01),nh=a(0x35945a76);let n_=(0,e6.Ay)("Channel Sections: UI action when the collapsed state of all sections is toggled",(e,t,{isCollapsed:a,setChannelSectionPref:n,allChannelSections:r})=>{Object.values(r).forEach(t=>{(0,a3.$x)(t)&&e(n({channelSectionId:t.id,pref:nh.wE,value:a?nh.$v:nh.Hu,debounce:!0}))})});n_.meta={name:"bulkSetChannelSectionsCollapsed",key:"createThunkBulkSetChannelSectionsCollapsed",description:"Channel Sections: UI action when the collapsed state of all sections is toggled"};var nf=a(0x1c030e023),nb=a(0x25329bb92),ng=a(0x195884850),ny=a(0xa187f494),nA=a(0x20061cab9);let nx=(0,e6.Ay)("Dismiss onboarding tasks link from sidebar",(e,t)=>{let a=t(),n=(0,a6.eo)({state:a});e((0,nA.Ay)({spaceName:t6.xu.SIDEBAR_MENU_ONBOARDING_TASKS_LINK,action:t6.hw.DISMISS})),n.track(B.EventId.NEWXP_JOIN_TEAM,ny.oy)});nx.meta={name:"dismissOnboardingTasksLinkFromSidebar",key:"createThunkDismissOnboardingTasksLinkFromSidebar",description:"Dismiss onboarding tasks link from sidebar"};let nE=(0,aW.A)(e=>{let{channelSidebarVisibleRows:t,setChannelSectionPref:a,getChannelSectionPref:n,orderedChannelSections:r,...m}=e,u=(0,l.wA)(),p=(0,aq.A)(),h=(0,U.A)(),_=(0,az.x)(),f=(0,aj.A)(),{getPrimaryView:b}=(0,i.useContext)(aG.A),g=(0,W.d4)(s.K),y=(0,W.d4)(tL.Li),A=(0,W.d4)(an.in),x=(0,W.d4)(e=>"on"===(0,tp._Z)(e,"light_read_who_can_dm_anyone_pref_migration")),E=(0,W.d4)(aY.ZT),C=(0,W.d4)(aK.ZV),k=(0,W.d4)(td.ed),v=(0,W.d4)(eR.KM),I=(0,W.Z2)(eR.Yi),w=(0,W.d4)(e=>b(e)?.id),T=(0,W.d4)(eR.Ou),N=(0,W.d4)(nm.$7),{rows:M,sidebarSummary:R,mutedChannels:P,unreadChannels:L,channelBadgeCount:O,sidebarSections:D}=t,F=(0,W.d4)(aL.nJ)||0,H=(0,W.d4)(aL.zx),V=F>0,G=(0,i.useMemo)(()=>(0,aU.U)({channelBadgeCount:O,hasMentionedThreads:V,hasUnreadThreads:H,mutedChannels:P,rows:M,unreadChannels:L}),[O,V,H,P,M,L]),q=(0,i.useMemo)(()=>(({totalUnreadCount:e,totalMentionCount:t},a,n)=>{let r=a.length>0||n.length>0,i=[];return e>0&&t>0&&i.push(aB.t("{numUnreads, plural, =1 {# conversation} other {# conversations}} with unread messages, including {numBadges, plural, =1 {# mention or keyword} other {# mentions and keywords}}.",{numUnreads:e,numBadges:t})),e>0&&0===t&&i.push(aB.t("{numUnreads, plural, =1 {# conversation} other {# conversations}} with unread messages.",{numUnreads:e,numBadges:t})),r&&((0,S.cX)()?i.push(aB.t("Press option + shift + up/down arrow to navigate between unread items.")):i.push(aB.t("Press alt + shift + up/down arrow to navigate between unread items."))),i.join(" ")})(R,G.unreadIds,G.mutedMentionIds),[R,G.unreadIds,G.mutedMentionIds]),j=(0,i.useCallback)(e=>{let t=u((0,nb.O)({channelId:e})),a=(0,tr.mz)(t);return"im"===a||"mpim"===a?u((0,nf.U)({channelId:e})):void 0},[u]),z=(0,i.useCallback)(e=>u(aD({id:e})),[u]),K=(0,aV.j)(),$=(K?.columnLayout?.width??0)<d.tC,[Y,Q]=(0,i.useState)(0),Z=(0,i.useRef)(void 0),J=(0,i.useRef)(void 0),X=(0,i.useMemo)(()=>(0,aF.A)(M),[M]),{setIsDraggingSplittableItem:ee}=(0,c.z)(),[{isChannelDraggingOverSidebar:et,isChannelSectionDraggingOverSidebar:ea,isEntityDraggingOverSidebar:en},er]=(0,o.H)(()=>({accept:[aH.XV,aH.Pz,aH.IC],canDrop:(e,t)=>u(nn({dropItem:e,dropItemType:t.getItemType()})),drop:(e,t)=>u(nr({dropItem:e,dropItemType:t.getItemType()})),hover:(e,t)=>{let a=Date.now();if(J.current&&a-16.667<J.current)return;J.current=a;let n=t.getItemType(),r=t.getClientOffset();if(!n||!r)return void Q(0);let i=Z.current&&Z.current.getBoundingClientRect(),l=r.x,o=r.y,s=0;if(i&&i.left<=l&&l<i.right){let e=i.top,t=i.bottom,a=Math.min(200,(t-e)/3);o<=i.top?s=-1500:o>=i.bottom?s=1500:o<e+a?s=-(1500*((e+a-o)/a)**2):o>t-a&&(s=((o-(t-a))/a)**2*1500)}Q(Math.round(s)),g&&ee(!0)},collect:e=>{let t=e.getItemType();return{isChannelDraggingOverSidebar:t===aH.XV&&e.isOver(),isEntityDraggingOverSidebar:t===aH.IC&&e.isOver(),isChannelSectionDraggingOverSidebar:t===aH.Pz&&e.isOver()}}}),[u,g,ee]),ei=(0,i.useCallback)(e=>(Z.current=e,er(e)),[Z,er]),el=(0,i.useCallback)(({openComposer:e}={})=>{u((0,nd.o)({openComposer:e})),h.track(B.EventId.IM_BROWSER_OPEN,{label:"ims",contexts:{ui_context:{entry_point:"sidebar_section_menu"}}})},[u,h]),eo=(0,i.useCallback)(()=>{u((0,nc.A)()),u((0,nu.z)({eventId:B.EventId.APP_LAUNCHER_OPEN_FROM_PLUS_BUTTON})),h.track(B.EventId.SIDEBAR_PLUS_CLICK,{label:"apps"})},[h,u]),es=(0,i.useCallback)(()=>{u(nx())},[u]),ec=(0,W.d4)(np.V),ed=(0,W.d4)(tL.Mt),em=(0,i.useCallback)(()=>{u((0,aa.v)())},[u]);return i.createElement(at,{...m,rows:M,rowSectionPositioning:X,connectDropTarget:ei,autoscrollVelocity:Y,isChannelDraggingOverSidebar:et,isChannelSectionDraggingOverSidebar:ea,isEntityDraggingOverSidebar:en,teamId:E,overlayIsOpen:C,overscanRatio:2,suggestedChannelIds:k,isSetupPage:y,unreadsOnlyCoachmarkVisible:v,logger:p,selectedItemId:w,clogger:h,tracer:_,closeIM:j,telemeter:f,editModeSelectedChannelIds:I,ensureDraftChannelObjects:(0,i.useCallback)(()=>u(ns()),[u]),setChannelSectionCollapsed:(0,i.useCallback)(({channelSectionId:e,isCollapsed:t})=>u(a({channelSectionId:e,pref:nh.wE,value:t?nh.$v:nh.Hu,debounce:!0})),[u,a]),bulkSetChannelSectionsCollapsed:(0,i.useCallback)(e=>u(n_({...e,allChannelSections:r,setChannelSectionPref:a})),[u,a,r]),setIsEditMode:(0,i.useCallback)((...e)=>u((0,tu.k)(...e)),[u]),setEditModeChannelSectionCollapsed:(0,i.useCallback)((...e)=>u((0,tm.F5)(...e)),[u]),bulkSetEditModeChannelSectionCollapsed:(0,i.useCallback)((...e)=>u((0,tm.Dy)(...e)),[u]),clearEditModeSelectedChannelIds:(0,i.useCallback)((...e)=>u((0,tm.zm)(...e)),[u]),onEditModeChannelClick:(0,i.useCallback)((...e)=>u(aZ(...e)),[u]),onEditModeChannelRangeClick:(0,i.useCallback)((...e)=>u(aJ(...e)),[u]),toggleHuddleInHighlightedChannel:(0,i.useCallback)(e=>u((0,ng.kq)(e)),[u]),unreadIds:G.unreadIds,mentionIds:G.mentionIds,mutedMentionIds:G.mutedMentionIds,getAriaLabelForRow:z,isEditMode:T,sidebarSummaryText:q,onDMBrowserModalClick:el,onAppLauncherClick:eo,sidebarSections:D,experimentSidebarVisualUpdatesM1Enabled:A,experimentLightReadWhoCanDmAnyonePrefMigrationGroupOn:x,getChannelSectionPref:n,setChannelSectionPref:a,isSlackAiRecapCoachmarkVisible:N,isBBModeEnabled:ec,updateFocusHistoryState:(0,i.useCallback)((...e)=>u((0,a$.$)(...e)),[u]),isEligibleForSidebarInviteSectionExperiment:ed,removeCreateASectionRow:em,isCompactSidebar:$,dismissOnboardingTasksLink:es})});var nC=a(0x1f2082e6f),nk=a(0x129f50c4),nv=a(0x1533f54a8),nS=a(0x1c87b2410),nI=a(0x250af0199),nw=a(0x133aaa7da),nT=a(0x20b4dda68),nN=a(0x1535e80f3),nM=a(0x410829f8),nR=a(0x1fdec3e16),nP=a(0xc162e471),nL=a(0x251135419),nO=a(0x81187f00),nD=a(0xabbf40a5),nF=a(0x1a02c72b5),nU=a(0xd6a16321),nB=a(0x114ffe897),nH=a(0x107c8ce7),nW=a(0x12fc8166d),nV=a.n(nW);function renderAvatarIcon(e){return i.createElement("div",{className:nV().avatarIconContainer},i.createElement(tS.Ay,{userId:e,size:nN.RG.small,isInteractive:!1}))}function renderChannelMenuIcon(e,t){if(!t)return i.createElement(F.Ah,{name:"channel",size:"20"});let a=(0,tr.LI)(t),n=(0,tr.yz)(t),r=(0,nB.D)(t),l=(0,td.Cx)(t);if(a&&!n){if(r)return renderAvatarIcon(nT.Q$);if(l)return i.createElement(F.Ah,{name:"lock",size:"20"});let e=(0,au.e)(t);return e?renderAvatarIcon(e):i.createElement(F.Ah,{name:"direct-messages",size:"20"})}if(n){let e=(0,td.N4)(t)||0,a=(0,nD._)(e);return i.createElement(F.Ah,{name:a||"direct-messages",size:"20"})}switch((0,nL.A)({channel:t,isList:!1,isFrozenAndInGracePeriod:!1,isSuggested:!1,wasExternalChannelsTrial:!1})){case"lock-o":return i.createElement(F.Ah,{name:"lock",size:"20"});case"archived-channel":return i.createElement(F.Ah,{name:"archive",size:"20"});case"heart":return i.createElement(F.Ah,{name:"heart",size:"20"});default:{let a=(0,nP.Ay)(e,t,{filled:!1,bold:!1,disableArchived:!1,showDraftIcon:!1});return i.createElement(F.Ah,{name:a.name,size:"20"})}}}function channel_menu_helpers_createSectionHeader(e){return{label:e,type:nw.A.header}}function channel_menu_helpers_createSeparator(){return{type:nw.A.separator}}renderAvatarIcon.displayName="renderAvatarIcon",renderChannelMenuIcon.displayName="renderChannelMenuIcon";var nG=a(0x1fd3f6e20),nq=a(0x6e87d4ec),nj=a(0x7eaadf41),nz=a(0x230322a4f),nK=a(0xda62d37c),n$=a(0x1180921cd),nY=a(0x9edd91a2),nQ=a(0x9cd3a930),nZ=a(0xeeca30d2),nJ=a(0x217c68a35),nX=a(0x369bcfe0),n0=a(0x24f5b5d9b),n1=a(0xf54a24af),n2=a(0x222e63440),n4=a(0x14f66396b),n5=a(0x1c100a3ca),n3=a(0x198572436),n6=a(0x16ffed5ab);let n8=new I.Ay("menu");function wrapClickHandlerWithErrorHandling(e,t,a,n,r){if(!e)return;let handleError=e=>{(0,nl.Ay)({getState:a,label:"SECTION-MENU-ERROR"}).error("Menu item click handler error",{menuItemName:n,error:e,...r||{}}),t((0,n6.M)({element:i.createElement(nq.A,{svgIconProps:{name:"warning-filled"},svgIconClassName:"sk_raspberry_red"},i.createElement("span",null,n8.t("Unable to perform action. Please try again.",{fallbackHash:"9a3ea0598e7f4b115b6f5ea75d98c145395ac46e",fallbackHashNs:"connected-workflow-account-confirmation-modal"})))}))};return handleError.displayName="handleError",()=>{try{let t=e();null!=t&&"object"==typeof t&&"catch"in t&&t.catch(handleError)}catch(e){handleError(e)}}}function buildAddChannelMenuItem(e,t,a){return{label:(0,an.in)(t())?n8.t("New channel",{fallbackHash:"b31db6124b9de9744ba2ac940c7d674c95bd930e",fallbackHashNs:"resurrected_user_welcome"}):"New channel",icon:i.createElement(F.Ah,{name:"channel",size:"20"}),click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("add_channel",{channel_section_id:a.id}),e((0,n5.A)({entryPoint:nJ.IV.ChannelSidebar,targetChannelSection:a}))},e,t,"add_channel",{channel_section_id:a.id}),dataQa:"section_menu_visual_updates_add_channel"}}function buildCreateSectionMenuItem(e,t,a){let n=(0,an.QT)(t());return{label:a?.type===er.VZ.DirectMessages?n8.t("A new section",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}):n8.t("Channel section",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}),icon:i.createElement(F.Ah,{name:"section",size:"20"}),click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("create"),e((0,eY.i)({action:n?e$.TH.CREATE_AND_MOVE:e$.TH.CREATE}))},e,t,"create_section"),dataQa:"section_menu_visual_updates_create_section"}}function buildManageVIPsMenuItem(e){let{dispatch:t,getState:a}=e;return{label:(0,an.in)(a())?n8.t("Manage VIPs"):"Manage VIPs",click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("manage_vips",{channel_section_id:e.props.channelSection.id}),t((0,nX.H)())},e.dispatch,a,"manage_vips",{channel_section_id:e.props.channelSection.id}),dataQa:"section_menu_visual_updates_manage_vips"}}function buildStartDirectMessageMenuItem(e){let{dispatch:t,getState:a,props:n}=e;return{label:n8.t("A new direct message",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}),icon:i.createElement(F.Ah,{name:"message",size:"20"}),click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("start_dm",{channel_section_id:n.channelSection.id}),n.onDMBrowserModalClick({openComposer:!0})},t,a,"start_dm",{channel_section_id:n.channelSection.id}),dataQa:"section_menu_visual_updates_start_dm"}}function buildRenameSectionMenuItem(e){let{dispatch:t,getState:a,props:n,sectionName:r}=e,{channelSection:i}=n;return{label:(0,an.in)(a())?n8.t("Rename"):"Rename",click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("rename",{channel_section_id:i.id}),t((0,eY.i)({action:e$.TH.RENAME,channelSectionId:i.id,initialText:r,initialEmoji:i.emoji}))},e.dispatch,a,"rename",{channel_section_id:i.id}),dataQa:"section_menu_visual_updates_rename"}}function buildShareSectionMenuItems(e){let{dispatch:t,getState:a,props:n,propsFromState:r,sectionName:i}=e,{channelSection:l}=n,{channelSectionChannels:o}=r;return[{label:n8.t("Share directly",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368"}),click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("share_channel_section",{channel_section_id:l.id}),t((0,n1.y)({channelSectionName:i,channelIdsIncludedInSection:o,emoji:l.emoji})),t((0,n3.J)({badgeName:"share_channel_section"}))},t,a,"share_section_directly",{channel_section_id:l.id}),dataQa:"section_menu_visual_updates_share_directly"},{label:n8.t("Copy section link",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368"}),click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("copy_section_link",{channel_section_id:l.id}),t((0,nY.k)({sectionName:l.name,channels:o,emoji:l.emoji}))},t,a,"copy_section_link",{channel_section_id:l.id}),dataQa:"section_menu_visual_updates_copy_section_link"}]}function buildBrowseExternalConnectionsMenuItem(e){let{dispatch:t,getState:a}=e;return{label:(0,an.in)(a())?n8.t("Browse external connections"):"Browse external connections",click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("Browse Slack Connect",{channel_section_id:e.props.channelSection.id}),t((0,n0.R)({entryPoint:"channel_sidebar_slack_connect_options"}))},e.dispatch,a,"browse_external_connections",{channel_section_id:e.props.channelSection.id}),dataQa:"section_menu_visual_updates_browse_external"}}function buildBrowseAppsMenuItem(e){let{dispatch:t,getState:a,props:n}=e;return{label:(0,an.in)(a())?n8.t("Browse Apps"):"Browse Apps",click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("browse_apps",{channel_section_id:n.channelSection.id}),n.onAppLauncherClick()},t,a,"browse_apps",{channel_section_id:n.channelSection.id}),dataQa:"section_menu_visual_updates_browse_apps"}}function isTeamPaid(e){let t=(0,eP.H7)(e());return(0,eT.qR)(t)}function buildMarkAllAsReadMenuItems(e){let{dispatch:t,props:a,propsFromState:n}=e,{channelSection:r,channelIds:l=[],sidebarSections:o}=a,{hasUnreads:s}=n;return s?(0,nj.X)(t,{channelSection:r,channelIds:l,sidebarSections:o}).map(e=>({...e,icon:i.createElement(F.Ah,{name:"mark-as-read",size:"20"})})):[]}function buildCreateMenuItems(e,t,a){let n=[];return n.push(channel_menu_helpers_createSeparator()),n.push(buildAddChannelMenuItem(e,t,a)),isTeamPaid(t)&&n.push(buildCreateSectionMenuItem(e,t,a)),n.push(channel_menu_helpers_createSeparator()),n}function buildCreateMenuItemsForSection(e){let{dispatch:t,getState:a,props:n}=e,{channelSection:r}=n;if(r.type===er.VZ.DirectMessages){let n=[];return n.push(buildStartDirectMessageMenuItem(e)),isTeamPaid(a)&&n.push(buildCreateSectionMenuItem(t,a,r)),n}return r.type!==er.VZ.Standard&&r.type!==er.VZ.Stars&&r.type!==er.VZ.Channels?[]:buildCreateMenuItems(t,a,r)}function buildFilterAndSortItems(e){let{dispatch:t,fullProps:a,propsFromState:n}=e,r=(0,nI.fg)(t,a);if(0===r.length)return{filterItem:null,sortItem:null};let{filterItems:i,sortItems:l}=(0,nK.wK)(r),{showBehavior:o}=n,s=(0,nQ.F)({experimentFilterDormantChannelsGroupOn:!0,shortVersion:!0},o||""),c=i.length>0?{label:n8.t("Filter",{fallbackHash:"d7decf1aa22b02ae8abf9a96849ee423eee838e4",fallbackHashNs:"ia4"}),shortcut:s,type:nw.A.submenu,dataQa:"section_menu_visual_updates_filter",submenu:i,submenuWidth:"auto"}:null,{sortBehavior:d}=n,m=(0,nZ.H)(d);return{filterItem:c,sortItem:l.length>0?{label:n8.t("Sort",{fallbackHash:"adc4e96a478be02a8147b100bd68113f38b89f80",fallbackHashNs:"search"}),shortcut:m,type:nw.A.submenu,dataQa:"section_menu_visual_updates_sort",submenu:l,submenuWidth:"auto"}:null}}function buildMuteAllMenuItem(e){let{dispatch:t,getState:a,props:n,propsFromState:r}=e,{channelSection:i}=n,{canMuteSection:l,channelSectionChannels:o}=r;return(i.type===er.VZ.Standard||i.type===er.VZ.Channels||i.type===er.VZ.Stars||i.type===er.VZ.DirectMessages||i.type===er.VZ.RecentApps||i.type===er.VZ.SlackConnect)&&l?{label:i.type===er.VZ.DirectMessages?n8.t("Mute all conversations",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}):i.type===er.VZ.RecentApps?n8.t("Mute all apps",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}):n8.t("Mute all channels",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}),click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("mute_all",{channel_section_id:i.id}),t((0,n2.A)({channelIdsToMute:o}))},t,a,"mute_all",{channel_section_id:i.id}),dataQa:"section_menu_visual_updates_mute_all"}:null}function buildUnmuteAllMenuItem(e){let{dispatch:t,getState:a,props:n,propsFromState:r}=e,{channelSection:i}=n,{canUnmuteSection:l,channelSectionChannels:o}=r;if(i.type!==er.VZ.Standard&&i.type!==er.VZ.Channels&&i.type!==er.VZ.Stars&&i.type!==er.VZ.DirectMessages&&i.type!==er.VZ.RecentApps&&i.type!==er.VZ.SlackConnect||!l)return null;let s=(0,an.in)(a());return{label:i.type===er.VZ.DirectMessages?s?n8.t("Unmute all direct messages"):"Unmute all direct messages":i.type===er.VZ.RecentApps?s?n8.t("Unmute all apps"):"Unmute all apps":s?n8.t("Unmute all channels"):"Unmute all channels",click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("unmute_all",{channel_section_id:i.id}),t((0,n2.A)({channelIdsToUnmute:o}))},t,a,"unmute_all",{channel_section_id:i.id}),dataQa:"section_menu_visual_updates_unmute_all"}}function buildDeleteSectionMenuItem(e){let{dispatch:t,getState:a,props:n}=e,{channelSection:r}=n;return r.type!==er.VZ.Standard&&r.type!==er.VZ.Stars?null:{label:(0,an.in)(a())?n8.t("Delete section"):"Delete section",click:wrapClickHandlerWithErrorHandling(()=>{(0,nz.K)("delete",{channel_section_id:r.id}),t((0,n4.A)({channelSectionId:r.id,reason:"section-heading-context-menu-visual-updates"}))},t,a,"delete",{channel_section_id:r.id}),dataQa:"section_menu_visual_updates_delete",danger:!0}}wrapClickHandlerWithErrorHandling.displayName="wrapClickHandlerWithErrorHandling",buildAddChannelMenuItem.displayName="buildAddChannelMenuItem",buildCreateSectionMenuItem.displayName="buildCreateSectionMenuItem",buildStartDirectMessageMenuItem.displayName="buildStartDirectMessageMenuItem",buildMarkAllAsReadMenuItems.displayName="buildMarkAllAsReadMenuItems";var n7=a(0xbaaab71e),n9=a(0x1632f6a87);let re=new I.Ay("menu"),emptyHandler=()=>[];function buildStandardSectionMenuItems(e){let t=[];return t.push(buildRenameSectionMenuItem(e)),t}function buildDMSectionMenuItems(e){let t=[];return t.push(buildManageVIPsMenuItem(e)),t}function buildSlackConnectSectionMenuItems(e){let t=[];return t.push(buildBrowseExternalConnectionsMenuItem(e)),t}function buildRecentAppsSectionMenuItems(e){let t=[];return t.push(buildBrowseAppsMenuItem(e)),t}function buildVIPsSectionMenuItems(e){let t=[];return t.push(buildManageVIPsMenuItem(e)),t}let rt={[er.VZ.Standard]:buildStandardSectionMenuItems,[er.VZ.Stars]:emptyHandler,[er.VZ.Channels]:emptyHandler,[er.VZ.DirectMessages]:buildDMSectionMenuItems,[er.VZ.SlackConnect]:buildSlackConnectSectionMenuItems,[er.VZ.RecentApps]:buildRecentAppsSectionMenuItems,[er.VZ.Priority]:buildVIPsSectionMenuItems};function getSectionHandler(e){return rt[e]||emptyHandler}function addSeparatorIfNeeded(e){if(e.length>0){let t=e[e.length-1];t&&t.type===nw.A.separator||e.push(channel_menu_helpers_createSeparator())}}function buildSimplifiedMenuTemplate(e,t,a){let{channelSection:n}=a;try{let r=getSectionHandler(n.type),i=e((0,n9.i1)({channelSection:n})),l={...a,channelSectionHasAllMutedHiddenChannels:a.channelSectionHasAllMutedHiddenChannels??!1,channelSectionReadHiddenChannels:a.channelSectionReadHiddenChannels??[],channelSectionMutedHiddenChannels:a.channelSectionMutedHiddenChannels??[],channelSectionUnreadWithNoMentionsHiddenChannels:a.channelSectionUnreadWithNoMentionsHiddenChannels??[]},o=(0,nI.Vm)(t(),l),s={...l,...o},c=(0,an.in)(t()),d={dispatch:e,getState:t,props:a,propsFromState:o,fullProps:s,sectionName:i,experimentSidebarVisualUpdatesM1GroupOn:c},m=[],u=n.type!==er.VZ.Priority?buildMuteAllMenuItem(d):null,p=n.type!==er.VZ.Priority?buildUnmuteAllMenuItem(d):null,h=u||p,{filterItem:_,sortItem:f}=buildFilterAndSortItems(d),b=buildMarkAllAsReadMenuItems(d);b.length>0&&b.forEach(e=>{e&&m.push(e)});let g=buildCreateMenuItemsForSection(d).filter(e=>e&&e.type!==nw.A.separator);if(g.length>0&&(m.length>0&&addSeparatorIfNeeded(m),m.push(channel_menu_helpers_createSectionHeader(re.t("Create\u2026",{fallbackHash:"6e157c5da4410b7e9de85f5c93026b9176e69064",fallbackHashNs:"menu"}))),g.forEach(e=>{e&&m.push(e)})),n.type===er.VZ.Standard){let e=o.experimentSimpleSharedSectionsV2GroupOn?buildShareSectionMenuItems(d):[];e.length>0&&(m.length>0&&addSeparatorIfNeeded(m),m.push(channel_menu_helpers_createSectionHeader(re.t("Share\u2026",{fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368",fallbackHashNs:"menu"}))),e.forEach(e=>{e&&m.push(e)}))}let y=r(d);if(n.type!==er.VZ.Priority&&(y.length>0||_||f||n.type!==er.VZ.DirectMessages&&h)){m.length>0&&addSeparatorIfNeeded(m);let e=n.type===er.VZ.DirectMessages?"Direct messages settings":"Section settings";m.push(channel_menu_helpers_createSectionHeader(e)),y.forEach(e=>{e&&m.push(e)}),n.type!==er.VZ.Priority&&n.type!==er.VZ.DirectMessages&&h&&m.push(h),_&&m.push(_),f&&m.push(f)}n.type===er.VZ.DirectMessages&&h&&(m.length>0&&addSeparatorIfNeeded(m),m.push(channel_menu_helpers_createSectionHeader("Notifications")),m.push(h)),n.type===er.VZ.Priority&&(y.length>0||_||f)&&(m.length>0&&addSeparatorIfNeeded(m),m.push(channel_menu_helpers_createSectionHeader(re.t("Section settings",{fallbackHash:"c7f73bb54d928922c3838bb789ee9fb8a5b1eb37",fallbackHashNs:"ia4"}))),y.forEach(e=>{e&&m.push(e)}),_&&m.push(_),f&&m.push(f));let A=buildDeleteSectionMenuItem(d);return A&&(m.length>0&&addSeparatorIfNeeded(m),m.push(A)),m}catch(e){return(0,nl.Ay)({getState:t,label:"SECTION-MENU-ERROR"}).error("Error building section heading context menu template",{error:e,channel_section_id:n.id,channel_section_type:n.type}),[]}}let ra=(0,e6.Ay)("Gets simplified context menu template for section heading (visual updates M1)",(e,t,a,n)=>{if(!(0,an.in)(t()))return[];let{getPrimaryView:r}=n(n7.U);return buildSimplifiedMenuTemplate(e,t,{...a,getPrimaryView:r})});ra.meta={name:"getSimplifiedHeadingContextMenuTemplate",key:"createThunkGetSimplifiedHeadingContextMenuTemplate",description:"Gets simplified context menu template for section heading (visual updates M1)"};var rn=a(0x1be9380c8),rr=a(0x1722a6454),ri=a(0x6d72337),rl=a(0x174f9c45c),ro=a(0x18e1aa302),rs=a(0x42a05810),rc=a(0x2286acf6c),rd=a(0xbc562055),rm=a(0x1b4ecf8e7),ru=a(0x20085de45);let rp=(0,rc.A)((e,t,{channelSectionId:a,isCollapsed:n,reason:r})=>{let i=t(),l=(0,eN.ty)(i,rm.mM)||{},o={...l};o[a]||(o[a]={}),o[a][nh.wE]=n?"1":"0",e((0,rd.CI)({pref:rm.mM,value:o,reason:r})).catch(()=>{e((0,ru.rX)({pref:rm.mM,value:l}))})},3e3),rh=(0,e6.Ay)("Channel Sections: UI action when the collapsed state of a custom section is toggled",(e,t,{channelSectionId:a,isCollapsed:n,reason:r})=>{let i=t(),l={...(0,eN.ty)(i,rm.mM)||{}};l[a]||(l[a]={}),l[a][nh.wE]=n?"1":"0",e((0,ru.rX)({pref:rm.mM,value:l})),rp.cancel(),rp(e,t,{channelSectionId:a,isCollapsed:n,reason:r})});rh.meta={name:"setChannelSectionCollapsed",key:"createThunkSetChannelSectionCollapsed",description:"Channel Sections: UI action when the collapsed state of a custom section is toggled"};var r_=a(0x8568bdf8),rf=a(0xafce781a),rb=a(0x1f32b800d),rg=a(0x23d87f1fb),ry=a(0x6607a120),rA=a(0x19d0d2f2a);let rx=(0,e6.Ay)("prefetch and cache the result of sharedInvites.canGetLink",(e,t,{reason:a="slack-connect-dm-eligibility-pre-fetch"}={})=>e((0,rg.d)({reason:a})).then(a=>a.ok?(e((0,ry.Ic)({isEligible:a.is_eligible})),(0,rA.ED)((0,aY.ZT)(t())),a.is_eligible):((0,nl.Ay)({getState:t}).error("preFetchSlackConnectDmEligibility sharedInvites.canGetLink not ok"),!1)).catch(e=>((0,nl.Ay)({getState:t}).error("preFetchSlackConnectDmEligibility sharedInvites.canGetLink rejected",e),!1)));rx.meta={name:"preFetchSlackConnectDmEligibility",key:"createThunkPreFetchSlackConnectDmEligibility",description:"prefetch and cache the result of sharedInvites.canGetLink"};let rE=(0,n.DA)()?e=>{let t,a,n,o,s,c,d,m,u,p,h=(0,r.c)(37),{onOverflow:_,onScrollFromTop:f}=e,b=(0,l.wA)(),g=(0,U.A)();h[0]!==b?(t=e=>b((0,ri.QO)(e)),h[0]=b,h[1]=t):t=h[1];let y=t;h[2]!==b?(a=e=>b((0,ri.Wu)(e)),h[2]=b,h[3]=a):a=h[3];let A=a;h[4]!==g||h[5]!==b?(n=()=>{g.track(B.EventId.CHANNEL_BROWSER_OPEN,{contexts:{ui_context:{entry_point:"sidebar_section_menu"}}}),b((0,rs.A)({initialBrowsePageFilter:{filter:"channelType",value:"all"}}))},h[4]=g,h[5]=b,h[6]=n):n=h[6];let x=n,E=(0,W.d4)(an.eN);h[7]!==b||h[8]!==E||h[9]!==x?(o=e=>(b((0,rf.iR)({event:{type:t6.jo.SECTION_MENU_OPENED}})),E)?b(ra({...e,onBrowserChannelsClick:x})):b((0,nI.s0)({...e,onBrowserChannelsClick:x})),h[7]=b,h[8]=E,h[9]=x,h[10]=o):o=h[10];let C=o,k=connected_home_channel_sidebar_temp;h[11]!==b?(s=(...e)=>b(rx(...e)),h[11]=b,h[12]=s):s=h[12];let v=s,S=(0,az.x)(),I=S.createSpan({name:"react_channel_sidebar_data"}),w=(0,W.d4)(rl.l),T=(0,W.d4)(rn.pc),N=(0,W.d4)(r_.lg),M=(0,W.d4)(ro.th),R=(0,W.Z2)(eR.VH);h[13]!==w?(c={shouldShowEmptyStarredSectionBanner:w},h[13]=w,h[14]=c):c=h[14];let P=(0,nS.Q)(c),L=P?.shouldForceSectionCollapsed??!1;h[15]!==L?(d={shouldForceStarredSectionCollapsed:L},h[15]=L,h[16]=d):d=h[16];let O=(0,nC.k)(d);h[17]!==O||h[18]!==R?(m={getChannelSectionPref:O,orderedChannelSections:R},h[17]=O,h[18]=R,h[19]=m):m=h[19];let D=(0,nk.Q)(m);h[20]!==N||h[21]!==D||h[22]!==w||h[23]!==M?(u={calculateSidebarSectionsResult:D,addedUserGroupSectionCoachmarkSectionId:N,sweeperSectionId:M,shouldShowEmptyStarredSectionBanner:w},h[20]=N,h[21]=D,h[22]=w,h[23]=M,h[24]=u):u=h[24];let F=(0,nv.A)(u);return I.close(),I.addTags({numRows:F.rows.length,numSections:R.length}),S.reportSpans([I]),h[25]!==F||h[26]!==v||h[27]!==T||h[28]!==O||h[29]!==y||h[30]!==A||h[31]!==C||h[32]!==_||h[33]!==f||h[34]!==R||h[35]!==P?(p=i.createElement(nE,{channelSidebarVisibleRows:F,getContextMenuTemplateForChannel:y,getContextMenuTemplateForEntity:A,getContextMenuTemplateForSectionHeading:C,setChannelSectionPref:k,getChannelSectionPref:O,orderedChannelSections:R,preFetchSlackConnectDmEligibility:v,showChannelSectionsEduCoachmark:!0,onOverflow:_,onScrollFromTop:f,starredChannelSectionBadgeResult:P,experimentSalesforceListsInSidebarGroupOn:T}),h[25]=F,h[26]=v,h[27]=T,h[28]=O,h[29]=y,h[30]=A,h[31]=C,h[32]=_,h[33]=f,h[34]=R,h[35]=P,h[36]=p):p=h[36],p}:({onOverflow:e,onScrollFromTop:t})=>{let a=(0,l.wA)(),n=(0,U.A)(),r=(0,i.useCallback)(e=>a((0,ri.QO)(e)),[a]),o=(0,i.useCallback)(e=>a((0,ri.Wu)(e)),[a]),s=(0,i.useCallback)(()=>{n.track(B.EventId.CHANNEL_BROWSER_OPEN,{contexts:{ui_context:{entry_point:"sidebar_section_menu"}}}),a((0,rs.A)({initialBrowsePageFilter:{filter:"channelType",value:"all"}}))},[a,n]),c=(0,W.d4)(an.eN),d=(0,i.useCallback)(e=>(a((0,rf.iR)({event:{type:t6.jo.SECTION_MENU_OPENED}})),c)?a(ra({...e,onBrowserChannelsClick:s})):a((0,nI.s0)({...e,onBrowserChannelsClick:s})),[a,s,c]),m=(0,i.useCallback)(({channelSectionId:e,pref:t,value:a})=>t===nh.wE?rh({channelSectionId:e,isCollapsed:(0,rr.y)(a),reason:"set_channel_section_collapse_in_home_sidebar"}):(0,rb.th)({channelSectionId:e,pref:t,value:a}),[]),u=(0,i.useCallback)((...e)=>a(rx(...e)),[a]),p=(0,az.x)(),h=p.createSpan({name:"react_channel_sidebar_data"}),_=(0,W.d4)(rl.l),f=(0,W.d4)(rn.pc),b=(0,W.d4)(r_.lg),g=(0,W.d4)(ro.th),y=(0,W.Z2)(eR.VH),A=(0,nS.Q)({shouldShowEmptyStarredSectionBanner:_}),x=(0,nC.k)({shouldForceStarredSectionCollapsed:A?.shouldForceSectionCollapsed??!1}),E=(0,nk.Q)({getChannelSectionPref:x,orderedChannelSections:y}),C=(0,nv.A)({calculateSidebarSectionsResult:E,addedUserGroupSectionCoachmarkSectionId:b,sweeperSectionId:g,shouldShowEmptyStarredSectionBanner:_});return h.close(),h.addTags({numRows:C.rows.length,numSections:y.length}),p.reportSpans([h]),i.createElement(nE,{channelSidebarVisibleRows:C,getContextMenuTemplateForChannel:r,getContextMenuTemplateForEntity:o,getContextMenuTemplateForSectionHeading:d,setChannelSectionPref:m,getChannelSectionPref:x,orderedChannelSections:y,preFetchSlackConnectDmEligibility:u,showChannelSectionsEduCoachmark:!0,onOverflow:e,onScrollFromTop:t,starredChannelSectionBadgeResult:A,experimentSalesforceListsInSidebarGroupOn:f})};function connected_home_channel_sidebar_temp(e){let{channelSectionId:t,pref:a,value:n}=e;return a===nh.wE?rh({channelSectionId:t,isCollapsed:(0,rr.y)(n),reason:"set_channel_section_collapse_in_home_sidebar"}):(0,rb.th)({channelSectionId:t,pref:a,value:n})}rE.displayName="ConnectedHomeChannelSidebar"},0x8583a294:(e,t,a)=>{"use strict";a.r(t),a.d(t,{EducationShareChannelSectionCoachmark:()=>E});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x14fad6485),s=a(0x20482ad21),c=a(0xb90de824),d=a(0x13953efe6),m=a(0x18def662b),u=a(0x3989021c),p=a(0x218842a12),h=a(0x3711e82d),_=a(0x226892387),f=a(0x20061cab9),b=a(0xf3c65e54),g=a(0x5b1935a6);let y=new s.Ay("channel_sidebar"),A={uiComponentName:h.UiComponentName.EDUCATION_SHARE_CHANNEL_SECTION_COACHMARK},x=p.g.EDUCATION_SHARE_CHANNEL_SECTION_COACHMARK,E=(0,n.DA)()?e=>{let t,a,n,s,p,h,E,C,k=(0,r.c)(19),{children:v}=e,S=(0,l.wA)(),{windowRef:I}=(0,i.useContext)(o._0),{isOpen:w,closeCoachmark:T}=(0,u.A)(x,g.xu.IN_PRODUCT_COACHMARK),N=(0,_.d4)(m.QT);k[0]!==T||k[1]!==S?(t=()=>{T(),S((0,f.Ay)({spaceName:g.xu.IN_PRODUCT_COACHMARK,action:g.hw.DISMISS}))},k[0]=T,k[1]=S,k[2]=t):t=k[2];let M=t;k[3]!==S?(a=()=>{S((0,b.A)({notificationName:x,action:g.hw.IMPRESSION}))},n=[S],k[3]=S,k[4]=a,k[5]=n):(a=k[4],n=k[5]),(0,i.useEffect)(a,n),k[6]===Symbol.for("react.memo_cache_sentinel")?(s=y.t("New! Share your sections with a colleague."),k[6]=s):s=k[6];let R=s;k[7]===Symbol.for("react.memo_cache_sentinel")?(p=y.t("Sections are a great way to share multiple channels at once."),k[7]=p):p=k[7];let P=p;k[8]!==I?(h=e=>{I.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},k[8]=I,k[9]=h):h=k[9];let L=h;k[10]!==M||k[11]!==w||k[12]!==L?(E=i.createElement(c.Ay,{autoClogProps:A,isOpen:w,title:R,bodyText:P,closeCoachmark:M,icon:"section",offsetX:-12,width:330,onAfterOpen:L}),k[10]=M,k[11]=w,k[12]=L,k[13]=E):E=k[13];let O=E;if(!N)return v;if(k[14]!==v||k[15]!==O){let e;k[17]!==O?(e={coachmarkElement:O,orientation:"right"},k[17]=O,k[18]=e):e=k[18],C=i.createElement(d.Ay,e,v),k[14]=v,k[15]=O,k[16]=C}else C=k[16];return C}:({children:e})=>{let t=(0,l.wA)(),{windowRef:a}=(0,i.useContext)(o._0),{isOpen:n,closeCoachmark:r}=(0,u.A)(x,g.xu.IN_PRODUCT_COACHMARK),s=(0,_.d4)(m.QT),p=(0,i.useCallback)(()=>{r(),t((0,f.Ay)({spaceName:g.xu.IN_PRODUCT_COACHMARK,action:g.hw.DISMISS}))},[t,r]);(0,i.useEffect)(()=>{t((0,b.A)({notificationName:x,action:g.hw.IMPRESSION}))},[t]);let h=y.t("New! Share your sections with a colleague."),E=y.t("Sections are a great way to share multiple channels at once."),C=(0,i.useCallback)(e=>{a.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},[a]),k=(0,i.useMemo)(()=>i.createElement(c.Ay,{autoClogProps:A,isOpen:n,title:h,bodyText:E,closeCoachmark:p,icon:"section",offsetX:-12,width:330,onAfterOpen:C}),[n,h,E,p,C]);return s?i.createElement(d.Ay,{coachmarkElement:k,orientation:"right"},e):e};E.displayName="EducationShareChannelSectionCoachmark"},0x1f2082e6f:(e,t,a)=>{"use strict";a.d(t,{k:()=>C});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x6affae29),o=a(0x3020a630),s=a(0xfdae11ea),c=a(0xef6c3caa),d=a(0xa1832ae4),m=a(0x20a8e038f),u=a(0x28a6fb09),p=a(0x1d84f40a0),h=a(0x226892387),_=a(0x8f36a342),f=a(0x1380694ee),b=a(0x35945a76),g=a(0x1f3e7d87e),y=a(0x1c6490c73),A=a(0x1eb767853),x=a(0x1ee439e69);let E=[b.Ag,b.z1,b.kZ,b.BG],getChannelSectionSidebarBehaviorPref=({prefValue:e,paidTeam:t,channelSectionType:a,sidebarBehaviorPref:n,experimentFilterDormantChannelsGroupOn:r})=>t&&e&&E.includes(e)&&n===s.eF?(0,c.m)(a)&&e===b.kZ?b.z1:e:(0,A.I)({channelSectionType:a,experimentFilterDormantChannelsGroupOn:r,globalSidebarBehavior:n}),C=(0,n.DA)()?e=>{let t,a,n=(0,r.c)(11);n[0]!==e?(t=void 0===e?{}:e,n[0]=e,n[1]=t):t=n[1];let{shouldForceStarredSectionCollapsed:i}=t,s=(0,h.d4)(m.T),c=(0,h.d4)(g.K5),d=(0,h.d4)(_temp),A=(0,h.d4)(p.G),x=(0,h.d4)(u.A),E=(0,h.d4)(f.jV),C=(0,h.d4)(o.K);return n[2]!==c||n[3]!==E||n[4]!==x||n[5]!==C||n[6]!==s||n[7]!==d||n[8]!==i||n[9]!==A?(a=(e,t)=>{let a=e?c[e]:void 0,n=e?E[e]:void 0;switch(t){case b.wE:if("priority"===e)return b.Hu;if(n?.type===_.VZ.Stars&&i)return b.$v;return a?.[b.wE]??b.Hu;case b.eJ:return getChannelSectionSidebarBehaviorPref({experimentFilterDormantChannelsGroupOn:C,prefValue:a?.[b.eJ],paidTeam:d,sidebarBehaviorPref:A,channelSectionType:n?.type});case b.jx:return(0,y.A)({paidTeam:d,channelSortPref:x,channelSection:n,channelSectionSortPref:a?.[b.jx],experimentIsDmRecencyDefaultSortEnabled:s});default:return(0,l.Kh)(t)}},n[2]=c,n[3]=E,n[4]=x,n[5]=C,n[6]=s,n[7]=d,n[8]=i,n[9]=A,n[10]=a):a=n[10],a}:({shouldForceStarredSectionCollapsed:e}={})=>{let t=(0,h.d4)(m.T),a=(0,h.d4)(g.K5),n=(0,h.d4)(e=>(0,d.qR)((0,x.H7)(e))),r=(0,h.d4)(p.G),s=(0,h.d4)(u.A),c=(0,h.d4)(f.jV),A=(0,h.d4)(o.K);return(0,i.useCallback)((i,o)=>{let d=i?a[i]:void 0,m=i?c[i]:void 0;switch(o){case b.wE:if("priority"===i)return b.Hu;if(m?.type===_.VZ.Stars&&e)return b.$v;return d?.[b.wE]??b.Hu;case b.eJ:return getChannelSectionSidebarBehaviorPref({experimentFilterDormantChannelsGroupOn:A,prefValue:d?.[b.eJ],paidTeam:n,sidebarBehaviorPref:r,channelSectionType:m?.type});case b.jx:return(0,y.A)({paidTeam:n,channelSortPref:s,channelSection:m,channelSectionSortPref:d?.[b.jx],experimentIsDmRecencyDefaultSortEnabled:t});default:return(0,l.Kh)(o)}},[a,c,e,A,n,r,s,t])};function _temp(e){return(0,d.qR)((0,x.H7)(e))}},0x129f50c4:(e,t,a)=>{"use strict";a.d(t,{Q:()=>eT});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x1ce249db6),o=a(0x1a256ff50),s=a(0x2172ff7ff),c=a(0x1ec69ee01),d=a(0x12185e091),m=a(0x280afe13),u=a(0x21d85d6e5),p=a(0x143fb6398),h=a(0x3f9b1657),_=a(0x1af285d2e),f=a(0x226892387);let b=(0,n.DA)()?e=>{let t,a,n,i,b,g,y,A,x,E,C,k,v=(0,r.c)(44),{channels:S,imChannels:I,mpimChannels:w,imAndMpimMembers:T,mutedChannels:N,starredChannels:M,currentUserId:R}=e,P=(0,f.d4)(_.E);v[0]!==P||v[1]!==T?(t={},Object.entries(T).forEach(e=>{let[a,n]=e;t[a]=(0,u.oj)({displayRealNames:P,member:n,shouldEscape:!1,includeAtSign:!1})}),v[0]=P,v[1]=T,v[2]=t):t=v[2];let L=(0,l.K)(t,o.Ay);v[3]!==S||v[4]!==R||v[5]!==I||v[6]!==L||v[7]!==w?(a={},Object.values(S).forEach(e=>{a[e.id]=(0,h.A)({channelName:e.name,includePrefix:!1,isUnknown:(0,d.t8)(e),isNonExistent:(0,d.QR)(e)})}),Object.values(I).forEach(e=>{let t=(0,m.e)(e);t&&(a[e.id]=L[t])}),Object.values(w).forEach(e=>{let t=(0,c.Ug)(e);if(!t)return;let n=t.filter(e=>e!==R).map(e=>L[e]).filter(_temp);a[e.id]=n.sort(s.Ay).join(",")}),v[3]=S,v[4]=R,v[5]=I,v[6]=L,v[7]=w,v[8]=a):a=v[8];let O=(0,l.K)(a,o.Ay);if(v[9]!==S?(n=Object.values(S),v[9]=S,v[10]=n):n=v[10],v[11]!==I||v[12]!==w||v[13]!==n){let e,t;v[15]!==I?(e=Object.values(I),v[15]=I,v[16]=e):e=v[16],v[17]!==w?(t=Object.values(w),v[17]=w,v[18]=t):t=v[18],i=n.concat(e,t),v[11]=I,v[12]=w,v[13]=n,v[14]=i}else i=v[14];let D=(0,l.K)(i,o.Ay);v[19]!==D||v[20]!==N||v[21]!==M?(y={},A={},E=0,x=0,b=!1,g=!1,D.forEach(e=>{let t=!!N?.[e.id],a=(0,c.kR)(e,t)??0,n=(0,c.OJ)(e)??0;(0,c.KJ)(e)&&(E+=1),x+=a,y[e.id]=a,A[e.id]=n,!b&&(0,p.ju)(e)&&(b=!0),!g&&M[e.id]&&(g=!0)}),v[19]=D,v[20]=N,v[21]=M,v[22]=b,v[23]=g,v[24]=y,v[25]=A,v[26]=x,v[27]=E):(b=v[22],g=v[23],y=v[24],A=v[25],x=v[26],E=v[27]),v[28]!==b||v[29]!==g||v[30]!==y||v[31]!==A||v[32]!==x||v[33]!==E?(C={channelBadgeCount:y,channelUnreadVIPCountMap:A,totalUnreadCount:E,totalMentionCount:x,hasSharedChannels:b,userHasStarredChannel:g},v[28]=b,v[29]=g,v[30]=y,v[31]=A,v[32]=x,v[33]=E,v[34]=C):C=v[34];let{channelBadgeCount:F,channelUnreadVIPCountMap:U,totalUnreadCount:B,totalMentionCount:H,hasSharedChannels:W,userHasStarredChannel:V}=C,G=(0,l.K)(F,o.Ay),q=(0,l.K)(U,o.Ay);return v[35]!==O||v[36]!==D||v[37]!==W||v[38]!==G||v[39]!==q||v[40]!==H||v[41]!==B||v[42]!==V?(k={channelNames:O,channelsVisible:D,channelBadgeCount:G,channelUnreadVIPCountMap:q,totalUnreadCount:B,totalMentionCount:H,hasSharedChannels:W,userHasStarredChannel:V},v[35]=O,v[36]=D,v[37]=W,v[38]=G,v[39]=q,v[40]=H,v[41]=B,v[42]=V,v[43]=k):k=v[43],k}:({channels:e,imChannels:t,mpimChannels:a,imAndMpimMembers:n,mutedChannels:r,starredChannels:b,currentUserId:g})=>{let y=(0,f.d4)(_.E),A=(0,l.K)((0,i.useMemo)(()=>{let e={};return Object.entries(n).forEach(([t,a])=>{e[t]=(0,u.oj)({displayRealNames:y,member:a,shouldEscape:!1,includeAtSign:!1})}),e},[n,y]),o.Ay),x=(0,l.K)((0,i.useMemo)(()=>{let n={};return Object.values(e).forEach(e=>{n[e.id]=(0,h.A)({channelName:e.name,includePrefix:!1,isUnknown:(0,d.t8)(e),isNonExistent:(0,d.QR)(e)})}),Object.values(t).forEach(e=>{let t=(0,m.e)(e);t&&(n[e.id]=A[t])}),Object.values(a).forEach(e=>{let t=(0,c.Ug)(e);if(!t)return;let a=t.filter(e=>e!==g).map(e=>A[e]).filter(e=>!!e);n[e.id]=a.sort(s.Ay).join(",")}),n},[e,t,A,a,g]),o.Ay),E=(0,l.K)((0,i.useMemo)(()=>Object.values(e).concat(Object.values(t),Object.values(a)),[e,t,a]),o.Ay),{channelBadgeCount:C,channelUnreadVIPCountMap:k,totalUnreadCount:v,totalMentionCount:S,hasSharedChannels:I,userHasStarredChannel:w}=(0,i.useMemo)(()=>{let e={},t={},a=0,n=0,i=!1,l=!1;return E.forEach(o=>{let s=!!r?.[o.id],d=(0,c.kR)(o,s)??0,m=(0,c.OJ)(o)??0;(0,c.KJ)(o)&&(a+=1),n+=d,e[o.id]=d,t[o.id]=m,!i&&(0,p.ju)(o)&&(i=!0),!l&&b[o.id]&&(l=!0)}),{channelBadgeCount:e,channelUnreadVIPCountMap:t,totalUnreadCount:a,totalMentionCount:n,hasSharedChannels:i,userHasStarredChannel:l}},[E,r,b]);return{channelNames:x,channelsVisible:E,channelBadgeCount:(0,l.K)(C,o.Ay),channelUnreadVIPCountMap:(0,l.K)(k,o.Ay),totalUnreadCount:v,totalMentionCount:S,hasSharedChannels:I,userHasStarredChannel:w}};function _temp(e){return!!e}var g=a(0x1c18c5d4e),y=a(0x1d472ce97),A=a(0x130c2e810),x=a(0x3020a630),E=a(0x1722a6454),C=a(0x8f36a342),k=a(0x35945a76);let channelSectionChannelsFilter=({channel:e,channelBadgeCount:t,channelSection:a,channelSectionShouldHideAllButMentions:n,channelSectionShouldHideDormantChannels:r,channelSectionShouldShowReadChannels:i,currentlySelectedId:l,editModeChannelSectionsCollapsed:o,experimentFilterDormantChannels:s,experimentImproveMutePrefGroupOn:d,getChannelSectionPref:u,hiddenDormantChannelsBySectionMap:p,hiddenReadChannelBySectionMap:h,hasDraftByChannelId:_,hiddenUnreadWithNoMentionsChannelBySectionMap:f,huddleChannelIds:b,isEditMode:g,mutedChannels:y,mutedHiddenChannelBySectionMap:A,sectionShouldHideReadChannels:x,sectionShouldHideReadChannelsUnlessStarred:v,shouldHideMutedItems:S,isSalesforceApp:I})=>{if(a.type===C.VZ.SalesforceRecords&&I){let t=(0,m.e)(e);if(t&&I(t))return!0}if(!g&&l===e.id)return!0;let w=g?!!o[a.id]:(0,E.y)(u(a.id,k.wE)),T=!!_[e.id],N=!!b[e.id],M=t[e.id]>0,R=!!y?.[e.id],pushMutedItemsToContextMenu=()=>{R&&!g&&A[a.id].push(e)};if(d&&(T||M)&&!w)return!0;if(s&&r&&(0,c.WV)(e)&&!T&&!g)return p[a.id].push(e),!1;if(d&&S&&R&&!w)return pushMutedItemsToContextMenu(),!1;if((i||N||T)&&!w)return!0;if(!d&&M)return R&&w&&A[a.id].push(e),!0;let P=!g&&(v||x);return S||g||!R||d?P&&n&&!M?(f[a.id].push(e),pushMutedItemsToContextMenu(),!1):(P||w)&&(0,c.H9)(e)?(h[a.id].push(e),pushMutedItemsToContextMenu(),!1):(w&&(0,c.KJ)(e)&&pushMutedItemsToContextMenu(),w&&R&&pushMutedItemsToContextMenu(),!0):(pushMutedItemsToContextMenu(),!1)};var v=a(0x18def662b);function isChannelEligibleForPrioritySection({channel:e,hasUnreadMention:t=!1,hasVipMention:a=!1,priorityUsers:n=[]}){if(a)return!0;if(!t)return!1;if((0,d.LI)(e)){let t=(0,m.e)(e);return!!t&&n.includes(t)}if((0,d.yz)(e)){let t=(0,c.Ug)(e);return!!t?.length&&t.some(e=>n.includes(e))}return!1}let S={[C.VZ.Stars]:3,[C.VZ.Standard]:2,[C.VZ.UserGroup]:1},getTargetSectionForChannel=({channel:e,channelIdToChannelSectionIds:t,channelSectionById:a,isChannelStarred:n,channelSectionTypeToSingletonChannelSection:r})=>{let i=t[e?.id];if(n)return r[C.VZ.Stars]?.id||null;if(i?.length){if(i.length>1){let e=null;for(let t=0;t<i.length;t++){let n=a[i[t]];if(!Object.keys(S).includes(n.type))break;(!e||S[e.type]<S[n.type])&&(e=n)}return e?.id||null}return i[0]}return null};var I=a(0x1be9380c8),w=a(0x22efab6f7),T=a(0xf5bbd10a),N=a(0x154700aaa),M=a(0xe6b69a0a);let isSalesforceAppChannel=(e,t)=>{if(!t)return!1;let a=(0,m.e)(e),n=a&&t[a]||null;return(0,y.l)(n)};var R=a(0x49e911f4),P=a(0x7441941c),L=a(0xcaa08ff7),O=a(0x249a04cb8),D=a(0x1ccef1c6f),F=a(0x226879b47),U=a(0x4f86f8f5),B=a(0x83f48212),H=a(0x14149c126),W=a(0x8ed8ca46);let V=(0,n.DA)()?e=>{let t,a,n,i,s,c,m,u,p,h,_,b,E,S,U,H,V=(0,r.c)(81),{channelsVisible:G,channelFilter:q,allChannelSectionChannels:j,orderedChannelSections:z,shouldSeparateApps:K,showConnectSection:$,starredChannels:Y,channelNames:Q,getChannelSectionPref:Z,isEditMode:J,shouldHideReadChannels:X,shouldHideReadChannelsUnlessStarred:ee,hasSharedChannels:et,userHasStarredChannel:ea,currentlySelectedId:en,hasDraftByChannelId:er,huddleChannelIds:ei,channelBadgeCount:el,channelUnreadVIPCountMap:eo,mutedChannels:es,editModeChannelSectionsCollapsed:ec,experimentUserGroupSectionsGroupOn:ed,imAndMpimMembers:em,standardChannelSectionsCount:eu}=e,ep=(0,T.A)();V[0]!==em?(t=e=>{if(!e)return!1;let t=em[e];return(0,y.l)(t)},V[0]=em,V[1]=t):t=V[1];let eh=t,e_=(0,f.d4)(v.Zg);V[2]!==z?(a=(0,w.uF)(z),V[2]=z,V[3]=a):a=V[3];let ef=a,eb=(0,f.d4)(use_channel_section_assignment_temp),eg=(0,f.d4)(x.K),ey=(0,f.d4)(v.in),eA=(0,f.d4)(R.DM),ex=(0,f.d4)(L.MY);V[4]!==G?(n=e=>(0,A.jE)(e,G),V[4]=G,V[5]=n):n=V[5];let eE=(0,f.d4)(n),eC=(0,f.d4)(D.pJ),ek=(0,f.d4)(F.r_),ev=(0,f.d4)(I.pc),eS=(0,f.d4)(g.I),eI=(0,f.d4)(B.CZ),ew=(0,f.d4)(W.mO),eT=ew[0]?.salesforce_org_id;V[6]!==eT?(i=e=>!!eT&&(0,W.D2)(e,eT),V[6]=eT,V[7]=i):i=V[7];let eN=(0,f.d4)(i);V[8]!==z?(s=z.find(_temp2),V[8]=z,V[9]=s):s=V[9];let eM=s,eR=eM?.id??"";V[10]!==ek||V[11]!==eR?(c=(ek[eR]??[]).filter(_temp3).map(_temp4),V[10]=ek,V[11]=eR,V[12]=c):c=V[12];let eP=c;if(V[13]!==j||V[14]!==el||V[15]!==q||V[16]!==Q||V[17]!==ek||V[18]!==eo||V[19]!==G||V[20]!==en||V[21]!==ef||V[22]!==ec||V[23]!==e_||V[24]!==eg||V[25]!==eb||V[26]!==ev||V[27]!==ey||V[28]!==eS||V[29]!==ed||V[30]!==Z||V[31]!==er||V[32]!==et||V[33]!==ei||V[34]!==em||V[35]!==eE||V[36]!==J||V[37]!==eA||V[38]!==eI||V[39]!==eh||V[40]!==eN||V[41]!==ep||V[42]!==es||V[43]!==z||V[44]!==ex||V[45]!==eC||V[46]!==X||V[47]!==ee||V[48]!==K||V[49]!==$||V[50]!==eu||V[51]!==Y||V[52]!==ea){let e={};E={},h={},_={},b={},p={};let t={},a={};m={};let n={};u={},z.forEach(r=>{E[r.id]=[],t[r.id]=r,e[r.id]=!0,h[r.id]=[],_[r.id]=[],b[r.id]=[],m[r.id]=[],p[r.id]=[],r.type!==C.VZ.Standard&&(n[r.type]=r),u[r.id]=[],(j[r.id]||[]).forEach(e=>{let t=a[e]??[];t.push(r.id),a[e]=t})});let assignChannelToChannelSection=(t,a)=>{e[a]=!1,q&&!q(t)||!u[a]||(u[a].push(t),m[a]&&m[a].push(t))};G.forEach(e=>{let r=!!Y[e.id];if(en===e.id&&O.e.isVisibleChannelId(e.id)||isChannelEligibleForPrioritySection({channel:e,hasUnreadMention:el[e.id]>0,hasVipMention:eo[e.id]>0,priorityUsers:ex})){O.e.addVisibleChannelId(e.id),assignChannelToChannelSection(e,"priority");return}if(O.e.removeVisibleChannelId(e.id),ed){let i=getTargetSectionForChannel({channel:e,channelIdToChannelSectionIds:a,channelSectionById:t,isChannelStarred:r,channelSectionTypeToSingletonChannelSection:n});if(i)return void assignChannelToChannelSection(e,i)}else{let t=a[e.id];if(t?.length)return void t.forEach(t=>{assignChannelToChannelSection(e,t)})}let i=ev&&isSalesforceAppChannel(e,em);if(((0,d.U_)(e)||i)&&!r&&ef)return void assignChannelToChannelSection(e,ef.id);let l=(0,N.C)({channel:e,isStarred:r,isApp:(0,M.J)(e,em),shouldSeparateApps:K,allowAssignmentToStarredSection:!0,showConnectSection:$,isGuest:eA,isAgent:eE[e.id],isAiApp:!1,isSalesforceApp:i,insertIntoSalesforceSection:eN&&eS&&((0,d.FV)(e)||(0,d.ZZ)(e))}),o=n[l];o?.id?assignChannelToChannelSection(e,o.id):ep.error("CALCULATE_SIDEBAR_SECTIONS","Missing channel section in assignment",{channelId:e.id,channelSectionType:l})}),Object.keys(u).forEach(e=>{let a=t[e],n=Z(a.id,k.eJ),r=n===k.kZ,i=n===k.BG,l=n===k.z1,o=n===k.Ag,s=!o&&!l&&!ee&&!i,c=!o&&(l||X||r),d=u[e];u[e]=d.filter(e=>channelSectionChannelsFilter({channel:e,channelBadgeCount:el,channelNames:Q,channelSection:a,channelSectionShouldHideAllButMentions:r,channelSectionShouldHideDormantChannels:i,channelSectionShouldShowReadChannels:o,currentlySelectedId:en,editModeChannelSectionsCollapsed:ec,experimentFilterDormantChannels:eg,experimentImproveMutePrefGroupOn:eb,experimentSidebarVisualUpdatesM1GroupOn:ey,getChannelSectionPref:Z,hiddenDormantChannelsBySectionMap:p,hiddenReadChannelBySectionMap:h,hasDraftByChannelId:er,hiddenUnreadWithNoMentionsChannelBySectionMap:_,huddleChannelIds:ei,isEditMode:J,mutedChannels:es,mutedHiddenChannelBySectionMap:b,sectionShouldHideReadChannels:c,sectionShouldHideReadChannelsUnlessStarred:s,shouldHideMutedItems:eC,isSalesforceApp:eh}))});let r={};ev&&Object.entries(ek).forEach(e=>{let[t,a]=e;a.length>0&&(r[t]=!0)}),S=z.filter(t=>{if(t.type===C.VZ.Stars&&!ea&&!r[t.id]){if(e_){let e=ex&&ex?.length,a=eu&&eu>=3;return!(0,P.lJ)(t)&&!e&&!a}return!1}if(t.type===C.VZ.SlackConnect&&!($&&et)||t.type===C.VZ.RecentApps&&!K&&!J||t.type===C.VZ.Quip)return!1;let a=eI&&eS;if(t.type===C.VZ.SalesforceRecords)return!e[t.id]||r[t.id]||a;let n=0===u[t.id].length&&0===E[t.id].length&&0===h[t.id].length&&0===_[t.id].length&&0===b[t.id].length&&0===p[t.id].length;return(t.type!==C.VZ.Team||!e[t.id])&&(t.type===C.VZ.UserGroup?!n:t.type===C.VZ.Standard?e[t.id]||!n||r[t.id]:!(ex&&ex?.length<1)||t.type!==C.VZ.Priority||!e[t.id])}),V[13]=j,V[14]=el,V[15]=q,V[16]=Q,V[17]=ek,V[18]=eo,V[19]=G,V[20]=en,V[21]=ef,V[22]=ec,V[23]=e_,V[24]=eg,V[25]=eb,V[26]=ev,V[27]=ey,V[28]=eS,V[29]=ed,V[30]=Z,V[31]=er,V[32]=et,V[33]=ei,V[34]=em,V[35]=eE,V[36]=J,V[37]=eA,V[38]=eI,V[39]=eh,V[40]=eN,V[41]=ep,V[42]=es,V[43]=z,V[44]=ex,V[45]=eC,V[46]=X,V[47]=ee,V[48]=K,V[49]=$,V[50]=eu,V[51]=Y,V[52]=ea,V[53]=m,V[54]=u,V[55]=p,V[56]=h,V[57]=_,V[58]=b,V[59]=E,V[60]=S}else m=V[53],u=V[54],p=V[55],h=V[56],_=V[57],b=V[58],E=V[59],S=V[60];let eL=S;V[61]!==m||V[62]!==u||V[63]!==p||V[64]!==h||V[65]!==_||V[66]!==b||V[67]!==E||V[68]!==eP||V[69]!==eL?(U={channelSectionAssignment:u,readHiddenChannelIdsBySection:E,hiddenReadChannelBySection:h,hiddenUnreadWithNoMentionsChannelBySection:_,mutedHiddenChannelBySection:b,dormantHiddenChannelsBySection:p,visibleChannelSections:eL,allChannelsAssociatedBySection:m,salesforceRelatedChannelIds:eP},V[61]=m,V[62]=u,V[63]=p,V[64]=h,V[65]=_,V[66]=b,V[67]=E,V[68]=eP,V[69]=eL,V[70]=U):U=V[70];let eO=U,eD=(0,l.K)(eO.channelSectionAssignment,o.kt),eF=(0,l.K)(eO.readHiddenChannelIdsBySection,o.kt),eU=(0,l.K)(eO.hiddenReadChannelBySection,o.kt),eB=(0,l.K)(eO.hiddenUnreadWithNoMentionsChannelBySection,o.kt),eH=(0,l.K)(eO.mutedHiddenChannelBySection,o.kt),eW=(0,l.K)(eO.dormantHiddenChannelsBySection,o.kt),eV=(0,l.K)(eO.visibleChannelSections,o.Ay),eG=(0,l.K)(eO.allChannelsAssociatedBySection,o.kt);return V[71]!==eP||V[72]!==eF||V[73]!==eU||V[74]!==eB||V[75]!==eH||V[76]!==eW||V[77]!==eV||V[78]!==eG||V[79]!==eD?(H={channelSectionAssignment:eD,readHiddenChannelIdsBySection:eF,hiddenReadChannelBySection:eU,hiddenUnreadWithNoMentionsChannelBySection:eB,mutedHiddenChannelBySection:eH,dormantHiddenChannelBySection:eW,visibleChannelSections:eV,allChannelsAssociatedBySection:eG,salesforceRelatedChannelIds:eP},V[71]=eP,V[72]=eF,V[73]=eU,V[74]=eB,V[75]=eH,V[76]=eW,V[77]=eV,V[78]=eG,V[79]=eD,V[80]=H):H=V[80],H}:({channelsVisible:e,channelFilter:t,allChannelSectionChannels:a,orderedChannelSections:n,shouldSeparateApps:r,showConnectSection:s,starredChannels:c,channelNames:m,getChannelSectionPref:u,isEditMode:p,shouldHideReadChannels:h,shouldHideReadChannelsUnlessStarred:_,hasSharedChannels:b,userHasStarredChannel:E,currentlySelectedId:S,hasDraftByChannelId:V,huddleChannelIds:G,channelBadgeCount:q,channelUnreadVIPCountMap:j,mutedChannels:z,editModeChannelSectionsCollapsed:K,experimentUserGroupSectionsGroupOn:$,imAndMpimMembers:Y,standardChannelSectionsCount:Q})=>{let Z=(0,T.A)(),J=(0,i.useCallback)(e=>{if(!e)return!1;let t=Y[e];return(0,y.l)(t)},[Y]),X=(0,f.d4)(v.Zg),ee=(0,i.useMemo)(()=>(0,w.uF)(n),[n]),et=(0,f.d4)(e=>"on"===(0,H._Z)(e,"improve_mute_pref")),ea=(0,f.d4)(x.K),en=(0,f.d4)(v.in),er=(0,f.d4)(R.DM),ei=(0,f.d4)(L.MY),el=(0,f.d4)(t=>(0,A.jE)(t,e)),eo=(0,f.d4)(D.pJ),es=(0,f.d4)(F.r_),ec=(0,f.d4)(I.pc),ed=(0,f.d4)(g.I),em=(0,f.d4)(B.CZ),eu=(0,f.d4)(W.mO),ep=eu[0]?.salesforce_org_id,eh=(0,f.d4)(e=>!!ep&&(0,W.D2)(e,ep)),e_=n.find(e=>e.type===C.VZ.SalesforceRecords),ef=e_?.id??"",eb=(0,i.useMemo)(()=>(es[ef]??[]).filter(e=>e.entityType===U.FN.SalesforceRelatedChannel).map(e=>e.entityId),[es,ef]),eg=(0,i.useMemo)(()=>{let i={},l={},o={},f={},g={},y={},A={},x={},v={},I={},w={};n.forEach(e=>{l[e.id]=[],A[e.id]=e,i[e.id]=!0,o[e.id]=[],f[e.id]=[],g[e.id]=[],v[e.id]=[],y[e.id]=[],e.type!==C.VZ.Standard&&(I[e.type]=e),w[e.id]=[],(a[e.id]||[]).forEach(t=>{let a=x[t]??[];a.push(e.id),x[t]=a})});let assignChannelToChannelSection=(e,a)=>{i[a]=!1,t&&!t(e)||!w[a]||(w[a].push(e),v[a]&&v[a].push(e))};e.forEach(e=>{let t=!!c[e.id];if(S===e.id&&O.e.isVisibleChannelId(e.id)||isChannelEligibleForPrioritySection({channel:e,hasUnreadMention:q[e.id]>0,hasVipMention:j[e.id]>0,priorityUsers:ei})){O.e.addVisibleChannelId(e.id),assignChannelToChannelSection(e,"priority");return}if(O.e.removeVisibleChannelId(e.id),$){let a=getTargetSectionForChannel({channel:e,channelIdToChannelSectionIds:x,channelSectionById:A,isChannelStarred:t,channelSectionTypeToSingletonChannelSection:I});if(a)return void assignChannelToChannelSection(e,a)}else{let t=x[e.id];if(t?.length)return void t.forEach(t=>{assignChannelToChannelSection(e,t)})}let a=ec&&isSalesforceAppChannel(e,Y);if(((0,d.U_)(e)||a)&&!t&&ee)return void assignChannelToChannelSection(e,ee.id);let n=(0,N.C)({channel:e,isStarred:t,isApp:(0,M.J)(e,Y),shouldSeparateApps:r,allowAssignmentToStarredSection:!0,showConnectSection:s,isGuest:er,isAgent:el[e.id],isAiApp:!1,isSalesforceApp:a,insertIntoSalesforceSection:eh&&ed&&((0,d.FV)(e)||(0,d.ZZ)(e))}),i=I[n];i?.id?assignChannelToChannelSection(e,i.id):Z.error("CALCULATE_SIDEBAR_SECTIONS","Missing channel section in assignment",{channelId:e.id,channelSectionType:n})}),Object.keys(w).forEach(e=>{let t=A[e],a=u(t.id,k.eJ),n=a===k.kZ,r=a===k.BG,i=a===k.z1,l=a===k.Ag,s=!l&&!i&&!_&&!r,c=!l&&(i||h||n),d=w[e];w[e]=d.filter(e=>channelSectionChannelsFilter({channel:e,channelBadgeCount:q,channelNames:m,channelSection:t,channelSectionShouldHideAllButMentions:n,channelSectionShouldHideDormantChannels:r,channelSectionShouldShowReadChannels:l,currentlySelectedId:S,editModeChannelSectionsCollapsed:K,experimentFilterDormantChannels:ea,experimentImproveMutePrefGroupOn:et,experimentSidebarVisualUpdatesM1GroupOn:en,getChannelSectionPref:u,hiddenDormantChannelsBySectionMap:y,hiddenReadChannelBySectionMap:o,hasDraftByChannelId:V,hiddenUnreadWithNoMentionsChannelBySectionMap:f,huddleChannelIds:G,isEditMode:p,mutedChannels:z,mutedHiddenChannelBySectionMap:g,sectionShouldHideReadChannels:c,sectionShouldHideReadChannelsUnlessStarred:s,shouldHideMutedItems:eo,isSalesforceApp:J}))});let T={};ec&&Object.entries(es).forEach(([e,t])=>{t.length>0&&(T[e]=!0)});let R=n.filter(e=>{if(e.type===C.VZ.Stars&&!E&&!T[e.id]){if(X){let t=ei&&ei?.length,a=Q&&Q>=3;return!(0,P.lJ)(e)&&!t&&!a}return!1}if(e.type===C.VZ.SlackConnect&&!(s&&b)||e.type===C.VZ.RecentApps&&!r&&!p||e.type===C.VZ.Quip)return!1;let t=em&&ed;if(e.type===C.VZ.SalesforceRecords)return!i[e.id]||T[e.id]||t;let a=0===w[e.id].length&&0===l[e.id].length&&0===o[e.id].length&&0===f[e.id].length&&0===g[e.id].length&&0===y[e.id].length;return(e.type!==C.VZ.Team||!i[e.id])&&(e.type===C.VZ.UserGroup?!a:e.type===C.VZ.Standard?i[e.id]||!a||T[e.id]:!(ei&&ei?.length<1)||e.type!==C.VZ.Priority||!i[e.id])});return{channelSectionAssignment:w,readHiddenChannelIdsBySection:l,hiddenReadChannelBySection:o,hiddenUnreadWithNoMentionsChannelBySection:f,mutedHiddenChannelBySection:g,dormantHiddenChannelsBySection:y,visibleChannelSections:R,allChannelsAssociatedBySection:v,salesforceRelatedChannelIds:eb}},[n,e,ec,a,t,c,q,j,Y,ei,S,$,r,s,er,el,ee,Z,u,_,h,m,K,ea,et,en,V,G,p,z,eo,J,es,E,b,em,ed,X,Q,eb,eh]);return{channelSectionAssignment:(0,l.K)(eg.channelSectionAssignment,o.kt),readHiddenChannelIdsBySection:(0,l.K)(eg.readHiddenChannelIdsBySection,o.kt),hiddenReadChannelBySection:(0,l.K)(eg.hiddenReadChannelBySection,o.kt),hiddenUnreadWithNoMentionsChannelBySection:(0,l.K)(eg.hiddenUnreadWithNoMentionsChannelBySection,o.kt),mutedHiddenChannelBySection:(0,l.K)(eg.mutedHiddenChannelBySection,o.kt),dormantHiddenChannelBySection:(0,l.K)(eg.dormantHiddenChannelsBySection,o.kt),visibleChannelSections:(0,l.K)(eg.visibleChannelSections,o.Ay),allChannelsAssociatedBySection:(0,l.K)(eg.allChannelsAssociatedBySection,o.kt),salesforceRelatedChannelIds:eb}};function use_channel_section_assignment_temp(e){return"on"===(0,H._Z)(e,"improve_mute_pref")}function _temp2(e){return e.type===C.VZ.SalesforceRecords}function _temp3(e){return e.entityType===U.FN.SalesforceRelatedChannel}function _temp4(e){return e.entityId}var G=a(0x20b4dda68),q=a(0x6f213e53),j=a(0x19d55d0e1),z=a(0x245dcaf6b),K=a(0xf6ed6f31),$=a(0x70de3606);let Y=(0,n.DA)()?e=>{let t,a,n=(0,r.c)(17),{allChannelValues:i,teamId:s,suggestedChannelsOrderMap:u,channelSectionIdsByChannelId:p,deletedMembers:h,hasDraftByChannelId:_,huddleChannelIds:b,isEditMode:g,shouldHideReadChannelsUnlessStarred:y,currentlySelectedId:A,starredChannels:x}=e,E=(0,f.d4)($.fn);if(n[0]!==E||n[1]!==i||n[2]!==p||n[3]!==A||n[4]!==h||n[5]!==_||n[6]!==b||n[7]!==g||n[8]!==y||n[9]!==x||n[10]!==u||n[11]!==s){let e={},a={},r={},addChannel=t=>{(0,d.LI)(t)?a[t.id]=t:(0,d.yz)(t)?r[t.id]=t:e[t.id]=t};i?.forEach(e=>{let t=p?.[e.id]?.length>0||!!x[e.id];if((0,d.Zx)(e))return;if(e.id===A&&!g||s&&(0,z.sP)(s,e)||e&&e.is_viewable_post_disconnection)return void addChannel(e);if((0,q.F)(e)||(0,j.jT)(e)&&(!E||!t))return;if((0,d.U_)(e)){(0,K.bl)(e)&&((0,c.nT)(e)||t)&&addChannel(e);return}let a=(0,d.LI)(e)?(0,m.e)(e):void 0;if(a&&h[a]||a===G.QF||a===G.jR||!(E&&(0,j.jT)(e))&&!(0,K.bl)(e)&&"number"!=typeof u[e.id])return;let n=!!_[e.id],r=!!b[e.id];if(!(((0,d.LI)(e)||(0,d.yz)(e))&&!(0,c.nT)(e)&&(0,c.H9)(e))||n||r){if(g||y&&t||n||r)return void addChannel(e);addChannel(e)}}),t={channels:e,imChannels:a,mpimChannels:r},n[0]=E,n[1]=i,n[2]=p,n[3]=A,n[4]=h,n[5]=_,n[6]=b,n[7]=g,n[8]=y,n[9]=x,n[10]=u,n[11]=s,n[12]=t}else t=n[12];let C=t,k=(0,l.K)(C.channels,o.Ay),v=(0,l.K)(C.imChannels,o.Ay),S=(0,l.K)(C.mpimChannels,o.Ay);return n[13]!==k||n[14]!==v||n[15]!==S?(a={channels:k,imChannels:v,mpimChannels:S},n[13]=k,n[14]=v,n[15]=S,n[16]=a):a=n[16],a}:({allChannelValues:e,teamId:t,suggestedChannelsOrderMap:a,channelSectionIdsByChannelId:n,deletedMembers:r,hasDraftByChannelId:s,huddleChannelIds:u,isEditMode:p,shouldHideReadChannelsUnlessStarred:h,currentlySelectedId:_,starredChannels:b})=>{let g=(0,f.d4)($.fn),y=(0,i.useMemo)(()=>{let i={},l={},o={},addChannel=e=>{(0,d.LI)(e)?l[e.id]=e:(0,d.yz)(e)?o[e.id]=e:i[e.id]=e};return e?.forEach(e=>{let i=n?.[e.id]?.length>0||!!b[e.id];if((0,d.Zx)(e))return;if(e.id===_&&!p||t&&(0,z.sP)(t,e)||e&&e.is_viewable_post_disconnection)return void addChannel(e);if((0,q.F)(e)||(0,j.jT)(e)&&(!g||!i))return;if((0,d.U_)(e)){(0,K.bl)(e)&&((0,c.nT)(e)||i)&&addChannel(e);return}let l=(0,d.LI)(e)?(0,m.e)(e):void 0;if(l&&r[l]||l===G.QF||l===G.jR||!(g&&(0,j.jT)(e))&&!(0,K.bl)(e)&&"number"!=typeof a[e.id])return;let o=!!s[e.id],f=!!u[e.id];if(!(((0,d.LI)(e)||(0,d.yz)(e))&&!(0,c.nT)(e)&&(0,c.H9)(e))||o||f){if(p||h&&i||o||f)return void addChannel(e);addChannel(e)}}),{channels:i,imChannels:l,mpimChannels:o}},[e,n,b,_,p,t,r,a,s,u,h,g]);return{channels:(0,l.K)(y.channels,o.Ay),imChannels:(0,l.K)(y.imChannels,o.Ay),mpimChannels:(0,l.K)(y.mpimChannels,o.Ay)}};var Q=a(0x21f3c49e8),Z=a(0x839ba347),J=a(0x1df96de4c),X=a(0x114ffe897);let ee={slackbotMention:0,youMention:1,mentions:2,privateMentions:3,imsMentions:4,slackbot:5,you:6,inviter:7,onlineDms:8,mpDms:9,everythingElse:10,private:11,ims:12,youNewTeam:13};var et=a(0xef6c3caa),ea=a(0x814e7940),en=a(0x1e3ee2c86),er=a(0x1cf0d97e1),ei=a(0x1bc4b3ad8),el=a(0x217553e42),eo=a(0x2207a1e7d),es=a(0x18a17ca8f);let ec=(0,er.Ay)(e=>(0,es.Nk)(e)&&!!(0,D.ty)(e,"online_first_dms_on"));ec.meta={name:"isOnlineSortEnabled",key:"createSelectorIsOnlineSortEnabled",description:e=>(0,es.Nk)(e)&&!!(0,D.ty)(e,"online_first_dms_on")};let ed=(0,ei.F)(e=>(0,eo.$M)(e),e=>(0,el._B)(e),(e,t)=>{let a={};return t.forEach(t=>{let n=(0,m.e)(t);(0,c.nT)(t)&&n&&e&&e[n]&&(a[n]=!0)}),a}),useSortedChannelSections=({visibleChannelSections:e,getChannelSectionPref:t,channelSectionAssignment:a,channelNames:r,mutedChannels:c,channelBadgeCount:u,readHiddenChannelIdsBySection:p,hiddenReadChannelBySection:h,hiddenUnreadWithNoMentionsChannelBySection:_,mutedHiddenChannelBySection:b,allChannelsAssociatedBySection:g,isEditMode:y,suggestedChannelsOrderMap:A,currentUserId:x,currentlySelectedId:v,editModeChannelSectionsCollapsed:S,dormantHiddenChannelBySection:I})=>{let w=(0,i.useMemo)(()=>{let a=new Set;return(0,n.Bq)()&&e.forEach(e=>{t(e.id,k.jx)===k.n5&&g[e.id]?.forEach(e=>a.add(e.id))}),a},[e,t,g]),T=(0,f.d4)((0,n.Bq)()?function(e){return(0,ea.AU)(e,w)}:ea.tF),N=(0,f.d4)(en.X),M=(0,f.d4)(ec),R=(0,f.Z2)(e=>M?ed(e):J.t0),P=(0,f.d4)(es.iZ),L=(0,f.d4)(D.ix),O=(0,f.d4)(D.UG),F=(0,f.d4)(D.Jb),U=(0,i.useRef)(),B=(0,i.useMemo)(()=>{let n=[],i={};return e.forEach(e=>{let l=a[e.id],o=h[e.id],f=_[e.id],w=(0,et.m)(e.type),D=b[e.id],B=g[e.id],H=(({sectionSortPref:e,channelNames:t,channelLatests:a,channelPriorities:n})=>{let sortByAlphabetical=(e,a)=>(0,s.Ay)(e&&t[e],a&&t[a]);return e===k.n5?(e,t)=>{let n=a[e],r=a[t];return n===r?sortByAlphabetical(e,t):Number(r)-Number(n)}:e===k.u5?(e,t)=>{let a=n[e]||-1,r=n[t]||-1;return a===r?sortByAlphabetical(e,t):r-a}:sortByAlphabetical})({sectionSortPref:t(e.id,k.jx),channelNames:r,channelLatests:T??{},channelPriorities:N}),getSortedChannelGroup=t=>{let a={default:[],muted:[],suggested:[]};return t.forEach(t=>{let n;n=t.id in A?"suggested":c?.[t.id]?"muted":"default";let r=u[t.id]>0,i=t.id===v,l=(0,m.e)(t),o=(({channel:e,currentUserId:t,shouldBumpMention:a,shouldNotMixChannels:n,shouldSeparatePrivateChannels:r,isDmOnline:i,shouldBumpOnlineDms:l,shouldBumpInviter:o,inviterUserId:s,isPrioritySection:c})=>{if((0,d.Zp)(e)&&r)return a?ee.privateMentions:ee.private;if((0,X.D)(e))return c?a?ee.mentions:ee.slackbot:a?ee.slackbotMention:ee.slackbot;let u=(0,m.e)(e);if(u&&u===t)return o?ee.youNewTeam:a?ee.youMention:ee.you;if(((0,d.LI)(e)||(0,d.yz)(e))&&(n||l||o)){if(a)return ee.imsMentions;if(o&&s&&u===s&&(0,d.LI)(e))return ee.inviter;if(l){if(i)return ee.onlineDms;if((0,d.yz)(e))return ee.mpDms}return ee.ims}return a?ee.mentions:ee.everythingElse})({channel:t,currentUserId:x,shouldBumpMention:r&&O,shouldSeparatePrivateChannels:L,shouldNotMixChannels:F,isDmOnline:!!(w&&l&&R&&!(0,Q.A)(R)&&R[l]),shouldBumpOnlineDms:M&&w,shouldBumpInviter:w,inviterUserId:P,isPrioritySection:e.type===C.VZ.Priority});i&&(U.current&&U.current?.selectedChannelId===v||(U.current={selectedChannelId:v,sortGroup:o}),U.current&&v&&U.current.selectedChannelId===t.id&&(o=U.current.sortGroup)),a[n][o]?a[n][o].push(t.id):a[n][o]=[t.id]}),(0,Z.A)(a,e=>{(0,Z.A)(e,e=>{(0,Q.A)(e)||e.sort(H)})}),a.suggested.forEach(e=>{e.sort((e,t)=>A[e]>A[t]?1:-1)}),a},W={channelsOrdered:getSortedChannelGroup(l),channelsAssociatedOrdered:getSortedChannelGroup(B),readHiddenChannels:p[e.id],readHiddenChannelsOrdered:getSortedChannelGroup(o),mutedHiddenChannelsOrdered:getSortedChannelGroup(D),unreadWithNoMentionsHiddenChannelsOrdered:getSortedChannelGroup(f),dormantHiddenChannelsOrdered:I[e.id].map(e=>e.id),channelSectionSidebarBehavior:t(e.id,k.eJ),hasAllMutedHiddenChannels:g[e.id].every(e=>!!c?.[e.id]),isCollapsed:y?!!S[e.id]:(0,E.y)(t(e.id,k.wE)),channelSection:e},V={...W,channelsOrdered:[...W.channelsOrdered.default.flat(),...W.channelsOrdered.muted.flat(),...W.channelsOrdered.suggested.flat()],channelsAssociatedOrdered:[...W.channelsAssociatedOrdered.default.flat(),...W.channelsAssociatedOrdered.muted.flat(),...W.channelsAssociatedOrdered.suggested.flat()],readHiddenChannelsOrdered:[...W.readHiddenChannelsOrdered.default.flat(),...W.readHiddenChannelsOrdered.suggested.flat()],mutedHiddenChannelsOrdered:W.mutedHiddenChannelsOrdered.muted.flat(),unreadWithNoMentionsHiddenChannelsOrdered:[...W.unreadWithNoMentionsHiddenChannelsOrdered.default.flat(),...W.unreadWithNoMentionsHiddenChannelsOrdered.suggested.flat()]};i[e.id]=V,n.push(V)}),{sidebarSections:i,sidebarSectionsOrdered:n}},[e,a,h,_,I,b,g,t,r,T,N,p,y,S,A,c,u,v,R,M,x,O,L,F,P]);return{sidebarSections:(0,l.K)(B.sidebarSections,o.rM),sidebarSectionsOrdered:(0,l.K)(B.sidebarSectionsOrdered,o.Ay)}};var em=a(0xc9f59321),eu=a(0xd843ab47),ep=a(0x23255e234),eh=a(0x179fdddd3),e_=a(0x8baf11b5),ef=a(0x9b971e7e),eb=a(0x4790a9e9),eg=a(0x1d84f40a0),ey=a(0x19c76d181),eA=a(0x1380694ee),ex=a(0x1c2eef3c8),eE=a(0x21a86db7e),eC=a(0xe684f705),ek=a(0x19895585a),ev=a(0x9271cc31);let eS=(0,n.DA)()?e=>{let t,a,n,s,d,u,p,h,_,g,y,A,x,E,C,k,S,I,w=(0,r.c)(105),{orderedChannelSections:T,allChannelSectionChannels:N,allChannelValues:P,getChannelSectionPref:L,channelFilter:O}=e,D=(0,f.d4)(ey.WR),F=(0,f.Z2)(eC.gX),U=(0,f.d4)(ef.ZT),B=(0,f.d4)(e_.m),H=(0,f.d4)(eb.Sd),W=(0,f.Z2)(eA.nT),G=(0,f.d4)(v.cq);w[0]!==F?(t=F.reduce(use_calculate_sidebar_sections_temp,{}),w[0]=F,w[1]=t):t=w[1];let q=t,j=(0,f.d4)(ex.Qs);w[2]!==j?(a=(j||[]).reduce(use_calculate_sidebar_sections_temp2,{}),w[2]=j,w[3]=a):a=w[3];let z=a,K=(0,f.d4)(c.ed);w[4]!==K?(n=K.reduce(use_calculate_sidebar_sections_temp3,{}),w[4]=K,w[5]=n):n=w[5];let $=n,{activeTab:Q}=(0,i.useContext)(eu.A);w[6]!==Q?(s=e=>(0,ev.F8)(e,{tab:Q,container:ek.mq.Primary})?.id,w[6]=Q,w[7]=s):s=w[7];let Z=(0,f.d4)(s),J=(0,f.d4)(eA.yw),ee=(0,f.F3)(eE.A),et=(0,f.d4)(eA.Ou),ea=(0,f.d4)(em.A)&&T.some(use_calculate_sidebar_sections_temp4),en=(0,f.d4)(eA.SF),er=(0,f.d4)(eg.G),ei="hide_read_channels"===er,el="hide_read_channels_unless_starred"===er;w[8]!==T?(d=T.filter(_temp5),w[8]=T,w[9]=d):d=w[9];let eo=d.length;w[10]!==P||w[11]!==en||w[12]!==Z||w[13]!==q||w[14]!==z||w[15]!==ee||w[16]!==et||w[17]!==el||w[18]!==H||w[19]!==$||w[20]!==U?(u={allChannelValues:P,teamId:U,suggestedChannelsOrderMap:$,channelSectionIdsByChannelId:en,deletedMembers:q,hasDraftByChannelId:z,huddleChannelIds:ee,isEditMode:et,shouldHideReadChannelsUnlessStarred:el,currentlySelectedId:Z,starredChannels:H},w[10]=P,w[11]=en,w[12]=Z,w[13]=q,w[14]=z,w[15]=ee,w[16]=et,w[17]=el,w[18]=H,w[19]=$,w[20]=U,w[21]=u):u=w[21];let{channels:ec,imChannels:ed,mpimChannels:eS}=Y(u),eI=(0,f.d4)(es.I0);w[22]!==D?(p=e=>(0,eC.nv)(e,D),w[22]=D,w[23]=p):p=w[23];let ew=(0,f.d4)(p);w[24]!==ew?(h=(0,ep.Yd)(ew),w[24]=ew,w[25]=h):h=w[25];let eT=h;w[26]!==ew?(_=(0,ep.Ez)(ew),w[26]=ew,w[27]=_):_=w[27];let eN=_;w[28]!==ed||w[29]!==eS?(g=e=>{let t={};return Object.values(ed).forEach(a=>{let n=(0,m.e)(a);if(!n)return;let r=(0,eC.nv)(e,n);r&&(t[n]=r)}),Object.values(eS).forEach(a=>{(0,c.Ug)(a)?.forEach(a=>{if(t[a])return;let n=(0,eC.nv)(e,a);n&&(t[a]=n)})}),t},w[28]=ed,w[29]=eS,w[30]=g):g=w[30];let eM=(0,f.Z2)(g);w[31]!==P||w[32]!==eM||w[33]!==eI||w[34]!==eN||w[35]!==eT?(A={},y=!1,P.forEach(e=>{(eI&&((0,M.J)(e,eM)||(0,X.D)(e))&&((0,c.nT)(e)||(0,c.KJ)(e))||!eI&&(0,X.D)(e)||!eI&&(0,M.J)(e,eM)&&!eT&&!eN)&&(A[e.id]=!0,y=!0)}),w[31]=P,w[32]=eM,w[33]=eI,w[34]=eN,w[35]=eT,w[36]=y,w[37]=A):(y=w[36],A=w[37]),w[38]!==y||w[39]!==A?(x={isAppChannelById:A,hasAnyApps:y},w[38]=y,w[39]=A,w[40]=x):x=w[40];let{isAppChannelById:eR,hasAnyApps:eP}=x,eL=(0,l.K)(eR,o.Ay),eO=!(0,f.d4)(R.DM)&&eP;w[41]!==ec||w[42]!==D||w[43]!==eM||w[44]!==ed||w[45]!==eS||w[46]!==B||w[47]!==H?(E={channels:ec,imChannels:ed,mpimChannels:eS,imAndMpimMembers:eM,mutedChannels:B,starredChannels:H,currentUserId:D},w[41]=ec,w[42]=D,w[43]=eM,w[44]=ed,w[45]=eS,w[46]=B,w[47]=H,w[48]=E):E=w[48];let{channelNames:eD,channelsVisible:eF,channelBadgeCount:eU,channelUnreadVIPCountMap:eB,totalUnreadCount:eH,totalMentionCount:eW,hasSharedChannels:eV,userHasStarredChannel:eG}=b(E);w[49]!==N||w[50]!==eU||w[51]!==O||w[52]!==eD||w[53]!==eB||w[54]!==eF||w[55]!==Z||w[56]!==J||w[57]!==G||w[58]!==L||w[59]!==z||w[60]!==eV||w[61]!==ee||w[62]!==eM||w[63]!==eL||w[64]!==et||w[65]!==B||w[66]!==T||w[67]!==ei||w[68]!==el||w[69]!==eO||w[70]!==ea||w[71]!==eo||w[72]!==H||w[73]!==eG?(C={channelsVisible:eF,channelFilter:O,allChannelSectionChannels:N,isAppChannelById:eL,orderedChannelSections:T,shouldSeparateApps:eO,showConnectSection:ea,channelNames:eD,starredChannels:H,getChannelSectionPref:L,isEditMode:et,shouldHideReadChannels:ei,shouldHideReadChannelsUnlessStarred:el,hasSharedChannels:eV,userHasStarredChannel:eG,currentlySelectedId:Z,hasDraftByChannelId:z,huddleChannelIds:ee,channelBadgeCount:eU,channelUnreadVIPCountMap:eB,mutedChannels:B,editModeChannelSectionsCollapsed:J,experimentUserGroupSectionsGroupOn:G,imAndMpimMembers:eM,standardChannelSectionsCount:eo},w[49]=N,w[50]=eU,w[51]=O,w[52]=eD,w[53]=eB,w[54]=eF,w[55]=Z,w[56]=J,w[57]=G,w[58]=L,w[59]=z,w[60]=eV,w[61]=ee,w[62]=eM,w[63]=eL,w[64]=et,w[65]=B,w[66]=T,w[67]=ei,w[68]=el,w[69]=eO,w[70]=ea,w[71]=eo,w[72]=H,w[73]=eG,w[74]=C):C=w[74];let{channelSectionAssignment:eq,readHiddenChannelIdsBySection:ej,hiddenReadChannelBySection:ez,hiddenUnreadWithNoMentionsChannelBySection:eK,mutedHiddenChannelBySection:e$,dormantHiddenChannelBySection:eY,visibleChannelSections:eQ,allChannelsAssociatedBySection:eZ,salesforceRelatedChannelIds:eJ}=V(C);eh.ec.set("data",{channelSectionAssignment:eq,readHiddenChannelIdsBySection:ej,hiddenReadChannelBySection:ez,hiddenUnreadWithNoMentionsChannelBySection:eK,mutedHiddenChannelBySection:e$,dormantHiddenChannelBySection:eY,visibleChannelSections:eQ,allChannelsAssociatedBySection:eZ,salesforceRelatedChannelIds:eJ}),w[75]!==eZ||w[76]!==eU||w[77]!==eD||w[78]!==eq||w[79]!==D||w[80]!==Z||w[81]!==eY||w[82]!==J||w[83]!==L||w[84]!==ez||w[85]!==eK||w[86]!==et||w[87]!==B||w[88]!==e$||w[89]!==ej||w[90]!==$||w[91]!==eQ?(k={visibleChannelSections:eQ,getChannelSectionPref:L,channelSectionAssignment:eq,channelNames:eD,mutedChannels:B,channelBadgeCount:eU,readHiddenChannelIdsBySection:ej,hiddenReadChannelBySection:ez,hiddenUnreadWithNoMentionsChannelBySection:eK,mutedHiddenChannelBySection:e$,dormantHiddenChannelBySection:eY,allChannelsAssociatedBySection:eZ,isEditMode:et,suggestedChannelsOrderMap:$,currentUserId:D,currentlySelectedId:Z,editModeChannelSectionsCollapsed:J},w[75]=eZ,w[76]=eU,w[77]=eD,w[78]=eq,w[79]=D,w[80]=Z,w[81]=eY,w[82]=J,w[83]=L,w[84]=ez,w[85]=eK,w[86]=et,w[87]=B,w[88]=e$,w[89]=ej,w[90]=$,w[91]=eQ,w[92]=k):k=w[92];let{sidebarSections:eX,sidebarSectionsOrdered:e0}=useSortedChannelSections(k);return w[93]!==eW||w[94]!==eH?(S={totalUnreadCount:eH,totalMentionCount:eW},w[93]=eW,w[94]=eH,w[95]=S):S=w[95],w[96]!==eU||w[97]!==eB||w[98]!==B||w[99]!==eJ||w[100]!==eX||w[101]!==e0||w[102]!==S||w[103]!==W?(I={sidebarSectionsOrdered:e0,sidebarSections:eX,sidebarSummary:S,mutedChannels:B,unreadChannels:W,channelBadgeCount:eU,channelUnreadVIPCountMap:eB,salesforceRelatedChannelIds:eJ},w[96]=eU,w[97]=eB,w[98]=B,w[99]=eJ,w[100]=eX,w[101]=e0,w[102]=S,w[103]=W,w[104]=I):I=w[104],I}:({orderedChannelSections:e,allChannelSectionChannels:t,allChannelValues:a,getChannelSectionPref:n,channelFilter:r})=>{let s=(0,f.d4)(ey.WR),d=(0,f.Z2)(eC.gX),u=(0,f.d4)(ef.ZT),p=(0,f.d4)(e_.m),h=(0,f.d4)(eb.Sd),_=(0,f.Z2)(eA.nT),g=(0,f.d4)(v.cq),y=(0,i.useMemo)(()=>d.reduce((e,t)=>(e[t]=!0,e),{}),[d]),A=(0,f.d4)(ex.Qs),x=(0,i.useMemo)(()=>(A||[]).reduce((e,t)=>(e[t]=!0,e),{}),[A]),E=(0,f.d4)(c.ed),k=(0,i.useMemo)(()=>E.reduce((e,t,a)=>(e[t]=a,e),{}),[E]),{activeTab:S}=(0,i.useContext)(eu.A),I=(0,f.d4)((0,i.useCallback)(e=>(0,ev.F8)(e,{tab:S,container:ek.mq.Primary})?.id,[S])),w=(0,f.d4)(eA.yw),T=(0,f.F3)(eE.A),N=(0,f.d4)(eA.Ou),P=(0,f.d4)(em.A)&&e.some(e=>e.type===C.VZ.SlackConnect),L=(0,f.d4)(eA.SF),O=(0,f.d4)(eg.G),D="hide_read_channels_unless_starred"===O,F=(0,i.useMemo)(()=>e.filter(e=>e.type===C.VZ.Standard).length,[e]),{channels:U,imChannels:B,mpimChannels:H}=Y({allChannelValues:a,teamId:u,suggestedChannelsOrderMap:k,channelSectionIdsByChannelId:L,deletedMembers:y,hasDraftByChannelId:x,huddleChannelIds:T,isEditMode:N,shouldHideReadChannelsUnlessStarred:D,currentlySelectedId:I,starredChannels:h}),W=(0,f.d4)(es.I0),G=(0,f.d4)(e=>(0,eC.nv)(e,s)),q=(0,ep.Yd)(G),j=(0,ep.Ez)(G),z=(0,f.Z2)(e=>{let t={};return Object.values(B).forEach(a=>{let n=(0,m.e)(a);if(!n)return;let r=(0,eC.nv)(e,n);r&&(t[n]=r)}),Object.values(H).forEach(a=>{(0,c.Ug)(a)?.forEach(a=>{if(t[a])return;let n=(0,eC.nv)(e,a);n&&(t[a]=n)})}),t}),{isAppChannelById:K,hasAnyApps:$}=(0,i.useMemo)(()=>{let e={},t=!1;return a.forEach(a=>{(W&&((0,M.J)(a,z)||(0,X.D)(a))&&((0,c.nT)(a)||(0,c.KJ)(a))||!W&&(0,X.D)(a)||!W&&(0,M.J)(a,z)&&!q&&!j)&&(e[a.id]=!0,t=!0)}),{isAppChannelById:e,hasAnyApps:t}},[a,z,W,j,q]),Q=(0,l.K)(K,o.Ay),Z=(0,f.d4)(R.DM),{channelNames:J,channelsVisible:ee,channelBadgeCount:et,channelUnreadVIPCountMap:ea,totalUnreadCount:en,totalMentionCount:er,hasSharedChannels:ei,userHasStarredChannel:el}=b({channels:U,imChannels:B,mpimChannels:H,imAndMpimMembers:z,mutedChannels:p,starredChannels:h,currentUserId:s}),{channelSectionAssignment:eo,readHiddenChannelIdsBySection:ec,hiddenReadChannelBySection:ed,hiddenUnreadWithNoMentionsChannelBySection:eS,mutedHiddenChannelBySection:eI,dormantHiddenChannelBySection:ew,visibleChannelSections:eT,allChannelsAssociatedBySection:eN,salesforceRelatedChannelIds:eM}=V({channelsVisible:ee,channelFilter:r,allChannelSectionChannels:t,isAppChannelById:Q,orderedChannelSections:e,shouldSeparateApps:!Z&&$,showConnectSection:P,channelNames:J,starredChannels:h,getChannelSectionPref:n,isEditMode:N,shouldHideReadChannels:"hide_read_channels"===O,shouldHideReadChannelsUnlessStarred:D,hasSharedChannels:ei,userHasStarredChannel:el,currentlySelectedId:I,hasDraftByChannelId:x,huddleChannelIds:T,channelBadgeCount:et,channelUnreadVIPCountMap:ea,mutedChannels:p,editModeChannelSectionsCollapsed:w,experimentUserGroupSectionsGroupOn:g,imAndMpimMembers:z,standardChannelSectionsCount:F});eh.ec.set("data",{channelSectionAssignment:eo,readHiddenChannelIdsBySection:ec,hiddenReadChannelBySection:ed,hiddenUnreadWithNoMentionsChannelBySection:eS,mutedHiddenChannelBySection:eI,dormantHiddenChannelBySection:ew,visibleChannelSections:eT,allChannelsAssociatedBySection:eN,salesforceRelatedChannelIds:eM});let{sidebarSections:eR,sidebarSectionsOrdered:eP}=useSortedChannelSections({visibleChannelSections:eT,getChannelSectionPref:n,channelSectionAssignment:eo,channelNames:J,mutedChannels:p,channelBadgeCount:et,readHiddenChannelIdsBySection:ec,hiddenReadChannelBySection:ed,hiddenUnreadWithNoMentionsChannelBySection:eS,mutedHiddenChannelBySection:eI,dormantHiddenChannelBySection:ew,allChannelsAssociatedBySection:eN,isEditMode:N,suggestedChannelsOrderMap:k,currentUserId:s,currentlySelectedId:I,editModeChannelSectionsCollapsed:w});return(0,i.useMemo)(()=>({sidebarSectionsOrdered:eP,sidebarSections:eR,sidebarSummary:{totalUnreadCount:en,totalMentionCount:er},mutedChannels:p,unreadChannels:_,channelBadgeCount:et,channelUnreadVIPCountMap:ea,salesforceRelatedChannelIds:eM}),[eP,eR,en,er,p,_,et,ea,eM])};function use_calculate_sidebar_sections_temp(e,t){return e[t]=!0,e}function use_calculate_sidebar_sections_temp2(e,t){return e[t]=!0,e}function use_calculate_sidebar_sections_temp3(e,t,a){return e[t]=a,e}function use_calculate_sidebar_sections_temp4(e){return e.type===C.VZ.SlackConnect}function _temp5(e){return e.type===C.VZ.Standard}var eI=a(0x3d5a0d18),ew=a(0xeb80e632);let eT=(0,n.DA)()?e=>{let t,a=(0,r.c)(6),{getChannelSectionPref:n,orderedChannelSections:i,channelFilter:l}=e,o=(0,f.d4)(eA.OE),s=(0,f.d4)(ew.E),c=(0,eI.H)(),d=l||c;return a[0]!==o||a[1]!==s||a[2]!==n||a[3]!==i||a[4]!==d?(t={orderedChannelSections:i,allChannelSectionChannels:o,allChannelValues:s,getChannelSectionPref:n,channelFilter:d},a[0]=o,a[1]=s,a[2]=n,a[3]=i,a[4]=d,a[5]=t):t=a[5],eS(t)}:({getChannelSectionPref:e,orderedChannelSections:t,channelFilter:a})=>{let n=(0,f.d4)(eA.OE),r=(0,f.d4)(ew.E),i=(0,eI.H)();return eS({orderedChannelSections:t,allChannelSectionChannels:n,allChannelValues:r,getChannelSectionPref:e,channelFilter:a||i})}},0x8ccddb01:(e,t,a)=>{"use strict";a.d(t,{z:()=>c});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0x1f2082e6f),l=a(0x129f50c4),o=a(0x226892387),s=a(0x1380694ee);let c=(0,n.DA)()?()=>{let e,t=(0,r.c)(3),a=(0,o.Z2)(s.VH),n=(0,i.k)();return t[0]!==n||t[1]!==a?(e={orderedChannelSections:a,getChannelSectionPref:n},t[0]=n,t[1]=a,t[2]=e):e=t[2],(0,l.Q)(e)}:()=>{let e=(0,o.Z2)(s.VH),t=(0,i.k)();return(0,l.Q)({orderedChannelSections:e,getChannelSectionPref:t})}},0x3d5a0d18:(e,t,a)=>{"use strict";a.d(t,{J:()=>S,H:()=>v});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0xb62e6bf4),o=a(0xca924ee1),s=a(0x1aba66b56),c=a(0x21da4684a),d=a(0x6affae29),m=a(0x1ec69ee01),u=a(0x12185e091),p=a(0xf159cb74),h=a(0x18b8a1e5b),_=a(0x143fb6398),f=a(0x11c82607b),b=a(0x1d825f245),g=a(0x9b971e7e),y=a(0x1380694ee),A=a(0x1e25c919a),x=a(0x4f86f8f5);let allWorkspacesFilter=()=>!0,filterDisabledFilter=e=>!(0,m.lo)(e),allPeopleFilter=()=>!0,E=(0,o.A)(e=>t=>e===(0,p.c)(t)||!!(0,m.Si)(t)?.length),C=(0,o.A)(e=>t=>(0,s.A)(e,(0,p.c)(t))||(0,h.O)(t)||(0,c.A)(e,(0,m.Si)(t)||[]).length>0),getChannelFilterImpl=({workspaceFilter:e,peopleFilter:t,selfTeamId:a,relevantWorkspaceIdsSubset:n})=>{let r=(({workspaceFilter:e,selfTeamId:t,relevantWorkspaceIdsSubset:a})=>{if(!e||!t)return allWorkspacesFilter;if((0,x.Ac)(e)){let n=e.type;switch(n){case x.MR.All:return a?C(a):allWorkspacesFilter;case x.MR.AllInternal:return E(t);default:(0,d.Kh)(n)}}let{id:n,type:r}=e.workspace;switch(r){case x.SX.Internal:return e=>(0,p.c)(e)===n||(0,h.O)(e)||!!(0,m.Si)(e)?.includes(n)||(0,u.JM)(e);case x.SX.External:return e=>(0,p.c)(e)===n||(0,u.JM)(e);default:(0,d.Kh)(r)}})({workspaceFilter:e,selfTeamId:a,relevantWorkspaceIdsSubset:n}),i=(({peopleFilter:e})=>{if(!e)return allPeopleFilter;let{type:t}=e;switch(t){case x.E7.Internal:return e=>!(0,_.ju)(e);case x.E7.External:return e=>(0,_.ju)(e);default:return allPeopleFilter}})({peopleFilter:t});return e=>r(e)&&i(e)},getChannelSidebarFilterImpl=({orgUnifiedEnabled:e,workspaceFilter:t,peopleFilter:a,selfTeamId:n,relevantWorkspaceIdsSubset:r})=>e?getChannelFilterImpl({workspaceFilter:t,peopleFilter:a,selfTeamId:n,relevantWorkspaceIdsSubset:r}):filterDisabledFilter;(0,f.Ay)("Get channel filter",(e,t)=>{let a=t();return getChannelSidebarFilterImpl({orgUnifiedEnabled:(0,l.ss)(a),workspaceFilter:(0,A.U)(a),peopleFilter:(0,y.ce)(a),selfTeamId:(0,g.ZT)(a),relevantWorkspaceIdsSubset:(0,b.Z)(a)})}).meta={name:"getChannelSidebarFilter",key:"createThunkGetChannelSidebarFilter",description:"Get channel filter"},(0,f.Ay)("Get channel filter",(e,t,{workspaceFilter:a,peopleFilter:n})=>{let r=t();return getChannelFilterImpl({workspaceFilter:a,peopleFilter:n,selfTeamId:(0,g.ZT)(r),relevantWorkspaceIdsSubset:(0,b.Z)(r)})}).meta={name:"getChannelFilter",key:"createThunkGetChannelFilter",description:"Get channel filter"};var k=a(0x226892387);let v=(0,n.DA)()?()=>{let e,t=(0,r.c)(6),a=(0,k.d4)(l.ss),n=(0,k.wz)(A.U),i=(0,k.d4)(y.ce),o=(0,k.d4)(g.ZT),s=(0,k.d4)(b.Z);return t[0]!==a||t[1]!==i||t[2]!==s||t[3]!==o||t[4]!==n?(e=getChannelSidebarFilterImpl({orgUnifiedEnabled:a,workspaceFilter:n,peopleFilter:i,selfTeamId:o,relevantWorkspaceIdsSubset:s}),t[0]=a,t[1]=i,t[2]=s,t[3]=o,t[4]=n,t[5]=e):e=t[5],e}:()=>{let e=(0,k.d4)(l.ss),t=(0,k.wz)(A.U),a=(0,k.d4)(y.ce),n=(0,k.d4)(g.ZT),r=(0,k.d4)(b.Z);return(0,i.useMemo)(()=>getChannelSidebarFilterImpl({orgUnifiedEnabled:e,workspaceFilter:t,peopleFilter:a,selfTeamId:n,relevantWorkspaceIdsSubset:r}),[e,t,a,n,r])},S=(0,n.DA)()?e=>{let t,a=(0,r.c)(5),{workspaceFilter:n,peopleFilter:i}=e,l=(0,k.d4)(g.ZT),o=(0,k.d4)(b.Z);return a[0]!==i||a[1]!==o||a[2]!==l||a[3]!==n?(t=getChannelFilterImpl({workspaceFilter:n,peopleFilter:i,selfTeamId:l,relevantWorkspaceIdsSubset:o}),a[0]=i,a[1]=o,a[2]=l,a[3]=n,a[4]=t):t=a[4],t}:({workspaceFilter:e,peopleFilter:t})=>{let a=(0,k.d4)(g.ZT),n=(0,k.d4)(b.Z);return(0,i.useMemo)(()=>getChannelFilterImpl({workspaceFilter:e,peopleFilter:t,selfTeamId:a,relevantWorkspaceIdsSubset:n}),[e,t,a,n])}},0x1533f54a8:(e,t,a)=>{"use strict";a.d(t,{A:()=>aq});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0xd947897f),o=a(0x91728dda),s=a(0x139aa1a7),c=a(0x1be9380c8),d=a(0x226892387),m=a(0x226879b47);let u=(0,n.DA)()?e=>{let t,a=(0,r.c)(5),{sidebarSections:n,primaryView:i}=e,l=(0,d.d4)(c.pc),o=(0,d.d4)(m.r_);if(a[0]!==o||a[1]!==i||a[2]!==l||a[3]!==n){e:{if(!i||!l){t=void 0;break e}for(let e of Object.values(n)){if(!e.isCollapsed)continue;let a=(o?.[e.channelSection.id]??[]).find(e=>e.entityId===i);if(a){t=a;break e}}t=void 0}a[0]=o,a[1]=i,a[2]=l,a[3]=n,a[4]=t}else t=a[4];return t}:({sidebarSections:e,primaryView:t})=>{let a=(0,d.d4)(c.pc),n=(0,d.d4)(m.r_);return(0,i.useMemo)(function(){if(t&&a)for(let a of Object.values(e)){if(!a.isCollapsed)continue;let e=(n?.[a.channelSection.id]??[]).find(e=>e.entityId===t);if(e)return e}},[t,e,n,a])};var p=a(1927545e3),h=a(0x5e7c6650),_=a(0xdf55e8f3),f=a(0x10437fca0),b=a(0xc9567660);let g=(0,_.eI)((e,{primaryView:t,getSiblingView:a})=>{let n=[];return(0,h.aK)(e)&&n.push(p.c.TodayV2),(t===p.c.JoinerLaunchpad||(0,f.$4)(e))&&!(0,f.LI)(e)&&!(0,b.a)(e)&&n.push(p.c.JoinerLaunchpad),(0,h.Ge)(e)&&n.push(p.c.SalesAutoSlackLaunchpad),(0,h.lH)(e)&&n.push(p.c.ExplorePaidFeatures),(t===p.c.Unreads||(0,h.Gl)(e))&&n.push(p.c.Unreads),(0,h.my)(e,a)&&n.push("Vall_threads"),(0,h.u_)(e)&&n.push(p.c.BrowseHuddles),(0,h.Ew)(e)&&n.push(p.c.DailyDigest),(0,h.Mr)(e)&&n.push(p.c.Todos),(t===p.c.Drafts||t===p.c.ScheduledMessages||t===p.c.Sent||(0,h.Wf)(e))&&n.push(p.c.Drafts),n});var y=a(0x18def662b),A=a(0x20482ad21),x=a(0x16cf1da63),E=a(0x120c268ad),C=a.n(E),k=a(0x40c0d834),v=a(0x11a296110),S=a(0x99233ecb),I=a(0x2501a2cee),w=a(0x9982721),T=a(0x5a3e6194),N=a(0xf931c21),M=a(0x3711e82d);let R=new A.Ay("channel_sidebar"),CreateChannelTrialMenuItem=()=>i.createElement("div",{className:"display_flex align_items_center"},R.t("Create a channel"),i.createElement(N.A,{className:"margin_left_50",hideTooltip:!0,uiComponentVariant:M.UiComponentVariant.SLACK_CONNECT_MENU_CREATE_CHANNEL}));CreateChannelTrialMenuItem.displayName="CreateChannelTrialMenuItem";var P=a(0x17341dcaa),L=a(0x217c68a35),O=a(0xa0b7e90),D=a(0xa1dfeae3),F=a(0x13b720a6e),U=a(0xea25ffc5),B=a(0x1334bf7f0),H=a(0xa1832ae4),W=a(0x13eb6f5d3),V=a(0x1001c1606),G=a(0x1c14ee6d4),q=a(0xe5418754),j=a(0x49e911f4),z=a(0x6960d8b9),K=a(0x1ccef1c6f),$=a(0x217553e42),Y=a(0xe684f705),Q=a(0x1defa8f11);let shouldShowUnreadAddTeammates=(e,t,a)=>{if((0,j.DM)(e)||!(0,$.W2)(e))return!1;if(!a)return!t&&(0,Q.ax)(e,"has_sent_first_message");if(a)return!1;let n=(0,K.ty)(e,"sidebar_theme");if(n&&!n.startsWith("default"))return!1;let r=(0,Y.cA)(e),i=(0,q.yF)(r);return!!i&&7>=(0,z.KR)(new Date,(0,z.$4)(i))};var Z=a(0x12f41fc32),J=a(0xb4434dab),X=a(0x4ba2406),ee=a(0x42a05810),et=a(0x1c100a3ca),ea=a(0x1e561f770),en=a(0x244a84d7e),er=a(0x19511695f),ei=a(0x138acd100),el=a(0x21bfacd01),eo=a(0x1950da728),es=a(0x18a17ca8f),ec=a(0x74bbb29a);function getProgressiveDisclosureSidebarFlagTip({shouldShowProgressiveDisclosureFlag:e,showProgressiveDisclosureAddTeammatesFlag:t}){return e?t?ec.ml.AddTeammates:ec.ml.AddChannels:null}var ed=a(0x207167a29),em=a(0x1ee439e69),eu=a(0x94eb4c60),ep=a.n(eu);let eh=new A.Ay("channel_sidebar"),e_="browse_all_channels_icon",ef="browse_all_people_icon",eb="add_more_items_link_channel_menu_item",eg="add_more_items_link_browse_channels_menu_item",ey={channel:M.UiStep.ADD_CHANNEL,dm:M.UiStep.ADD_TEAMMATES,app:M.UiStep.ADD_MORE_APPS,slack_connect:M.UiStep.ADD_EXTERNAL_PEOPLE},eA=(0,n.DA)()?e=>{let t,a,n,l,o,s,c,m,u,p,h,_,f,b,g,y,A,E,N,R,H=(0,r.c)(157),{type:V,itemId:q,channelSection:j,showInviteModalInAddMoreDMsLink:z,showDmBrowserInAddMoreDMsLink:K,showProgressiveDisclosureAddTeammatesFlag:$,showProgressiveDisclosureAddChannelsFlag:Y,rowPosition:Q,priorDisplayedChannelSectionId:es,finalDisplayedChannelSectionId:em,ensureItemInView:eu}=e,eA=(0,x.wA)(),ex=(0,d.d4)(_temp),eE=(0,d.d4)(_temp2);H[0]!==ex||H[1]!==eE||H[2]!==V?(t=e=>"dm"===V&&shouldShowUnreadAddTeammates(e,eE,ex),H[0]=ex,H[1]=eE,H[2]=V,H[3]=t):t=H[3];let eC=(0,d.d4)(t),ek=(0,d.d4)(B.R),ev=(0,d.d4)(O.A),eS=(0,d.d4)(D.Ah),eI=(0,d.d4)(_temp3),ew=(0,d.d4)(W.MM),[eT,eN]=(0,i.useState)(null),eM=(0,d.d4)(_temp4),eR=(0,d.d4)(el.V),eP=$&&!K||Y;H[4]!==eu||H[5]!==q||H[6]!==eP?(a=()=>{eP&&eu&&q&&eu(q,20)},H[4]=eu,H[5]=q,H[6]=eP,H[7]=a):a=H[7],H[8]!==eP?(n=[eP],H[8]=eP,H[9]=n):n=H[9],(0,i.useEffect)(a,n),H[10]!==j||H[11]!==em||H[12]!==es||H[13]!==Q?(l={rowPosition:Q,priorDisplayedChannelSectionId:es,finalDisplayedChannelSectionId:em,channelSection:j},H[10]=j,H[11]=em,H[12]=es,H[13]=Q,H[14]=l):l=H[14];let{connectDropTarget:eL,channelDropIndicatorAbove:eO,channelDropIndicatorSides:eD,channelDropIndicatorBelow:eF,channelSectionDropIndicatorAbove:eU,channelSectionDropIndicatorBelow:eB,channelDropIneligible:eH}=(0,w.A)(l);H[15]!==eT||H[16]!==V?(o=e=>{eT?.track({action:M.UiAction.CLICK,uiStep:ey[V],uiComponentName:M.UiComponentName.SIDEBAR,elementName:e})},H[15]=eT,H[16]=V,H[17]=o):o=H[17];let eW=o;H[18]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{eN({track:e})},H[18]=s):s=H[18];let eV=s;H[19]!==ex||H[20]!==eA||H[21]!==V?(c=()=>{"dm"!==V||ex||eA((0,Z.AZ)({pref:"add_prompt_interacted",value:!0}))},H[19]=ex,H[20]=eA,H[21]=V,H[22]=c):c=H[22];let eG=c;H[23]!==eA?(m=()=>{eA((0,U.A)({uiComponentVariant:M.UiComponentVariant.SLACK_CONNECT_SIDEBAR_ADD_MORE_ITEMS_LINK}))},H[23]=eA,H[24]=m):m=H[24];let eq=m;H[25]!==eA||H[26]!==K||H[27]!==V?(p=()=>{"dm"===V&&K&&eA((0,ed.F)({tip:ec.ml.AddTeammates}))},u=[eA,V,K],H[25]=eA,H[26]=K,H[27]=V,H[28]=u,H[29]=p):(u=H[28],p=H[29]),(0,i.useEffect)(p,u),H[30]!==eW||H[31]!==eA?(h=()=>{eW("browse_channels"),eA((0,ee.A)({initialBrowsePageFilter:{filter:"channelType",value:eo.xV.all}}))},H[30]=eW,H[31]=eA,H[32]=h):h=H[32];let ej=h;H[33]!==eW||H[34]!==eA?(_=()=>{eW("browse_people"),eA((0,en.k)())},H[33]=eW,H[34]=eA,H[35]=_):_=H[35];let ez=_;if(H[36]!==ew||H[37]!==eW||H[38]!==eA||H[39]!==ev||H[40]!==eS||H[41]!==eE||H[42]!==eI||H[43]!==eG||H[44]!==ej||H[45]!==eM||H[46]!==K||H[47]!==z||H[48]!==Y||H[49]!==eq||H[50]!==V){if(f=[],"channel"!==V||eE)if("dm"!==V||eE){if("app"===V){let e,t;H[71]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Add apps"),H[71]=e):e=H[71],H[72]!==eW||H[73]!==eA?(t={label:e,click:()=>{eW("open_app_launcher"),eA((0,J.A)())}},H[72]=eW,H[73]=eA,H[74]=t):t=H[74],f.push(t)}else if("slack_connect"===V){if(eI){let e,t;H[75]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(CreateChannelTrialMenuItem,null),H[75]=e):e=H[75],H[76]!==eq?(t={label:e,click:eq,dataQa:"add_more_items_link_slack_connect_create_channel_menu_item"},H[76]=eq,H[77]=t):t=H[77],f.push(t)}else{let e,t;H[78]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Create a channel"),H[78]=e):e=H[78],H[79]!==eA?(t={label:e,click:()=>{eA((0,er.A)({entryPoint:L.IV.ChannelSidebarSlackConnectAddMore}))}},H[79]=eA,H[80]=t):t=H[80],f.push(t)}if(eM){let e,t;H[81]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Start a new message"),H[81]=e):e=H[81],H[82]!==eA||H[83]!==eG?(t={label:e,click:()=>{eG(),eA((0,ei.S)({entryPoint:L.IV.ChannelSidebarSlackConnectAddMore}))}},H[82]=eA,H[83]=eG,H[84]=t):t=H[84],f.push(t)}}}else{let e,t,a,n;H[59]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Start a direct message"),H[59]=e):e=H[59],H[60]!==eW||H[61]!==eA||H[62]!==eG?(t={label:e,click:()=>{eW("browse_dms"),eG(),eA((0,ea.o)({openComposer:!0}))}},H[60]=eW,H[61]=eA,H[62]=eG,H[63]=t):t=H[63];let r=t;H[64]===Symbol.for("react.memo_cache_sentinel")?(a=eh.t("Invite to workspace"),H[64]=a):a=H[64],H[65]!==eW||H[66]!==eA||H[67]!==ev||H[68]!==eS||H[69]!==eG?(n={label:a,click:()=>{ev||eS||eW("invite_people"),eG(),eA((0,X.A)({source:G.K3.ChannelSidebar}))}},H[65]=eW,H[66]=eA,H[67]=ev,H[68]=eS,H[69]=eG,H[70]=n):n=H[70];let i=n;K&&f.push(r),z&&f.push(i)}else{if(ew){let e,t;H[52]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Create a new channel"),H[52]=e):e=H[52],H[53]!==eW||H[54]!==eA?(t={label:e,dataQa:eb,click:()=>{eW("create_new_channel"),eA((0,et.A)({entryPoint:L.IV.ChannelSidebarAddMore}))}},H[53]=eW,H[54]=eA,H[55]=t):t=H[55],f.push(t)}if(!Y){let e,t;H[56]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Browse channels"),H[56]=e):e=H[56],H[57]!==ej?(t={label:e,dataQa:eg,click:ej},H[57]=ej,H[58]=t):t=H[58],f.push(t)}}H[36]=ew,H[37]=eW,H[38]=eA,H[39]=ev,H[40]=eS,H[41]=eE,H[42]=eI,H[43]=eG,H[44]=ej,H[45]=eM,H[46]=K,H[47]=z,H[48]=Y,H[49]=eq,H[50]=V,H[51]=f}else f=H[51];let eK=f,e$=eK.length>1;H[85]!==eK||H[86]!==V?(b=e=>i.createElement(k.A,{enableClogImpressionOffScreen:!0,eventId:M.EventId.SIDEBAR_ITEM_CLICK,clogImpression:!0,elementName:`add_${V}_menu`},i.createElement(S.a,{...e,template:eK,width:"auto"})),H[85]=eK,H[86]=V,H[87]=b):b=H[87];let eY=b;H[88]!==eE||H[89]!==eG||H[90]!==eK[0]||H[91]!==ej||H[92]!==ez||H[93]!==e$||H[94]!==eP||H[95]!==V?(g=()=>{eE&&"channel"===V?ej():eE&&"dm"===V?ez():(!e$||eP)&&(eG(),eK[0].click())},H[88]=eE,H[89]=eG,H[90]=eK[0],H[91]=ej,H[92]=ez,H[93]=e$,H[94]=eP,H[95]=V,H[96]=g):g=H[96];let eQ=g;H[97]!==ew||H[98]!==eC||H[99]!==eE||H[100]!==V?(y=e=>{let{name:t}=e;return("dm"===V||"channel"===V)&&eE?i.createElement(i.Fragment,null,i.createElement("div",{className:C()("p-channel_sidebar__channel_icon_prefix",[ep().iconPrefixBackground],[ep().iconPrefixIconXs],[ep().iconPrefixIconS])},i.createElement(I.Ah,{size:"inherit",name:"channel"===V?"channel-search":"user-directory","data-qa":"channel"===V?e_:ef})),t):i.createElement(i.Fragment,null,i.createElement(T.A,{iconType:ew?"plus-small":"search-small",className:C()({[ep().iconPrefixFilled]:eC,[ep().iconPrefixBackground]:!eC})}),t)},H[97]=ew,H[98]=eC,H[99]=eE,H[100]=V,H[101]=y):y=H[101];let eZ=y,eJ="";if("channel"===V){let e;if(H[102]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Browse all channels"),H[102]=e):e=H[102],eJ=e,ew){let e;H[103]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Add channels"),H[103]=e):e=H[103],eJ=e}}else if("dm"===V){let e,t;H[104]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Browse all people"),H[104]=e):e=H[104];let a=e;if(ek){let e;H[105]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Add people"),H[105]=e):e=H[105],t=e}else if(ev||eS){let e;H[106]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Invite people"),H[106]=e):e=H[106],t=e}else{let e;H[107]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Add coworkers"),H[107]=e):e=H[107],t=e}eJ=eE?a:t}else if("app"===V){let e;H[108]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Add apps"),H[108]=e):e=H[108],eJ=e}else if("slack_connect"===V){let e;H[109]===Symbol.for("react.memo_cache_sentinel")?(e=eh.t("Add external people"),H[109]=e):e=H[109],eJ=e}if(H[110]!==eO||H[111]!==eF||H[112]!==eD||H[113]!==eH||H[114]!==eU||H[115]!==eB||H[116]!==eC||H[117]!==eR||H[118]!==eQ||H[119]!==eZ||H[120]!==eJ||H[121]!==V){let e,t,a;H[123]===Symbol.for("react.memo_cache_sentinel")?(e={eventId:M.EventId.SIDEBAR_ITEM_CLICK,trackClogRef:eV},H[123]=e):e=H[123];let n=`add_more_items_${V}`;H[124]!==eO||H[125]!==eF||H[126]!==eD||H[127]!==eH||H[128]!==eU||H[129]!==eB||H[130]!==eC||H[131]!==eR?(t=C()("p-channel_sidebar__link--add-more-items",{"p-channel_sidebar__drop_target_indicator--channel_above":eO,"p-channel_sidebar__drop_target_indicator--channel_sides":eD,"p-channel_sidebar__drop_target_indicator--channel_below":eF,"p-channel_sidebar__drop_target_indicator--channel_section_above":eU,"p-channel_sidebar__drop_target_indicator--channel_section_below":eB,"p-channel_sidebar__drop_target_indicator--ineligible":eH,"p-channel_sidebar__channel--unread":eC,"p-channel_sidebar__link--add-more-items--bbm":eR}),H[124]=eO,H[125]=eF,H[126]=eD,H[127]=eH,H[128]=eU,H[129]=eB,H[130]=eC,H[131]=eR,H[132]=t):t=H[132],H[133]!==eQ||H[134]!==eZ||H[135]!==n||H[136]!==t||H[137]!==eJ?(a={id:n,className:t,label:eJ,onClick:eQ,renderLinkContent:eZ},H[133]=eQ,H[134]=eZ,H[135]=n,H[136]=t,H[137]=eJ,H[138]=a):a=H[138],A=i.createElement(k.A,e,i.createElement(P.A,a)),H[110]=eO,H[111]=eF,H[112]=eD,H[113]=eH,H[114]=eU,H[115]=eB,H[116]=eC,H[117]=eR,H[118]=eQ,H[119]=eZ,H[120]=eJ,H[121]=V,H[122]=A}else A=H[122];let eX=A;if(H[139]!==eL||H[140]!==eX||H[141]!==eY||H[142]!==e$){let e,t;H[144]!==eL?(e={ref:eL,className:"p-channel_sidebar__close_container"},H[144]=eL,H[145]=e):e=H[145],H[146]!==eX||H[147]!==eY||H[148]!==e$?(t=e$?i.createElement(S.cQ,{position:"bottom-right",tryOppositePosition:!0,renderMenu:eY},i.createElement(v.Nm,{className:ep().buttonContainer},eX)):eX,H[146]=eX,H[147]=eY,H[148]=e$,H[149]=t):t=H[149],E=i.createElement("div",e,t),H[139]=eL,H[140]=eX,H[141]=eY,H[142]=e$,H[143]=E}else E=H[143];let e0=E,e1=!!eP,e2=!!$;H[150]!==e1||H[151]!==e2?(N=getProgressiveDisclosureSidebarFlagTip({shouldShowProgressiveDisclosureFlag:e1,showProgressiveDisclosureAddTeammatesFlag:e2}),H[150]=e1,H[151]=e2,H[152]=N):N=H[152];let e4=N;return H[153]!==e0||H[154]!==eQ||H[155]!==e4?(R=e4?i.createElement(F.A,{tip:e4,onFlagClick:eQ},e0):e0,H[153]=e0,H[154]=eQ,H[155]=e4,H[156]=R):R=H[156],R}:({type:e,itemId:t,channelSection:a,showInviteModalInAddMoreDMsLink:n,showDmBrowserInAddMoreDMsLink:r,showProgressiveDisclosureAddTeammatesFlag:l,showProgressiveDisclosureAddChannelsFlag:o,rowPosition:s,priorDisplayedChannelSectionId:c,finalDisplayedChannelSectionId:m,ensureItemInView:u})=>{let p=(0,x.wA)(),h=(0,d.d4)(e=>(0,K.ty)(e,"add_prompt_interacted")),_=(0,d.d4)(e=>!(0,f.$4)(e)&&(0,es.S3)(e)),b=(0,d.d4)(t=>"dm"===e&&shouldShowUnreadAddTeammates(t,_,h)),g=(0,d.d4)(B.R),y=(0,d.d4)(O.A),A=(0,d.d4)(D.Ah),E=(0,d.d4)(e=>(0,H.tc)((0,em.H7)(e))),N=(0,d.d4)(W.MM),[R,q]=(0,i.useState)(null),j=(0,d.d4)(e=>(0,V.u)(e,{shouldRefetch:!1})),z=(0,d.d4)(el.V),$=l&&!r||o;(0,i.useEffect)(()=>{$&&u&&t&&u(t,20)},[$]);let{connectDropTarget:Y,channelDropIndicatorAbove:Q,channelDropIndicatorSides:eu,channelDropIndicatorBelow:eA,channelSectionDropIndicatorAbove:ex,channelSectionDropIndicatorBelow:eE,channelDropIneligible:eC}=(0,w.A)({rowPosition:s,priorDisplayedChannelSectionId:c,finalDisplayedChannelSectionId:m,channelSection:a}),ek=(0,i.useCallback)(t=>{R?.track({action:M.UiAction.CLICK,uiStep:ey[e],uiComponentName:M.UiComponentName.SIDEBAR,elementName:t})},[R,e]),ev=(0,i.useCallback)(e=>{q({track:e})},[]),eS=(0,i.useCallback)(()=>{"dm"!==e||h||p((0,Z.AZ)({pref:"add_prompt_interacted",value:!0}))},[h,p,e]),eI=(0,i.useCallback)(()=>{p((0,U.A)({uiComponentVariant:M.UiComponentVariant.SLACK_CONNECT_SIDEBAR_ADD_MORE_ITEMS_LINK}))},[p]);(0,i.useEffect)(()=>{"dm"===e&&r&&p((0,ed.F)({tip:ec.ml.AddTeammates}))},[p,e,r]);let ew=(0,i.useCallback)(()=>{ek("browse_channels"),p((0,ee.A)({initialBrowsePageFilter:{filter:"channelType",value:eo.xV.all}}))},[ek,p]),eT=(0,i.useCallback)(()=>{ek("browse_people"),p((0,en.k)())},[ek,p]),eN=(0,i.useMemo)(()=>{let t=[];if("channel"!==e||_)if("dm"!==e||_)"app"===e?t.push({label:eh.t("Add apps"),click:()=>{ek("open_app_launcher"),p((0,J.A)())}}):"slack_connect"===e&&(E?t.push({label:i.createElement(CreateChannelTrialMenuItem,null),click:eI,dataQa:"add_more_items_link_slack_connect_create_channel_menu_item"}):t.push({label:eh.t("Create a channel"),click:()=>{p((0,er.A)({entryPoint:L.IV.ChannelSidebarSlackConnectAddMore}))}}),j&&t.push({label:eh.t("Start a new message"),click:()=>{eS(),p((0,ei.S)({entryPoint:L.IV.ChannelSidebarSlackConnectAddMore}))}}));else{let e={label:eh.t("Start a direct message"),click:()=>{ek("browse_dms"),eS(),p((0,ea.o)({openComposer:!0}))}},a={label:eh.t("Invite to workspace"),click:()=>{y||A||ek("invite_people"),eS(),p((0,X.A)({source:G.K3.ChannelSidebar}))}};r&&t.push(e),n&&t.push(a)}else N&&t.push({label:eh.t("Create a new channel"),dataQa:eb,click:()=>{ek("create_new_channel"),p((0,et.A)({entryPoint:L.IV.ChannelSidebarAddMore}))}}),o||t.push({label:eh.t("Browse channels"),dataQa:eg,click:ew});return t},[e,o,r,n,_,N,ek,p,ew,eS,y,A,E,j,eI]),eM=eN.length>1,eR=(0,i.useCallback)(t=>i.createElement(k.A,{enableClogImpressionOffScreen:!0,eventId:M.EventId.SIDEBAR_ITEM_CLICK,clogImpression:!0,elementName:`add_${e}_menu`},i.createElement(S.a,{...t,template:eN,width:"auto"})),[eN,e]),eP=(0,i.useCallback)(()=>{_&&"channel"===e?ew():_&&"dm"===e?eT():(!eM||$)&&(eS(),eN[0].click())},[_,e,eS,eN,ew,eT,eM,$]),eL=(0,i.useCallback)(({name:t})=>("dm"===e||"channel"===e)&&_?i.createElement(i.Fragment,null,i.createElement("div",{className:C()("p-channel_sidebar__channel_icon_prefix",[ep().iconPrefixBackground],[ep().iconPrefixIconXs],[ep().iconPrefixIconS])},i.createElement(I.Ah,{size:"inherit",name:"channel"===e?"channel-search":"user-directory","data-qa":"channel"===e?e_:ef})),t):i.createElement(i.Fragment,null,i.createElement(T.A,{iconType:N?"plus-small":"search-small",className:C()({[ep().iconPrefixFilled]:b,[ep().iconPrefixBackground]:!b})}),t),[e,_,N,b]),eO="";if("channel"===e)eO=eh.t("Browse all channels"),N&&(eO=eh.t("Add channels"));else if("dm"===e){let e=eh.t("Browse all people"),t="";t=g?eh.t("Add people"):y||A?eh.t("Invite people"):eh.t("Add coworkers"),eO=_?e:t}else"app"===e?eO=eh.t("Add apps"):"slack_connect"===e&&(eO=eh.t("Add external people"));let eD=i.createElement(k.A,{eventId:M.EventId.SIDEBAR_ITEM_CLICK,trackClogRef:ev},i.createElement(P.A,{id:`add_more_items_${e}`,className:C()("p-channel_sidebar__link--add-more-items",{"p-channel_sidebar__drop_target_indicator--channel_above":Q,"p-channel_sidebar__drop_target_indicator--channel_sides":eu,"p-channel_sidebar__drop_target_indicator--channel_below":eA,"p-channel_sidebar__drop_target_indicator--channel_section_above":ex,"p-channel_sidebar__drop_target_indicator--channel_section_below":eE,"p-channel_sidebar__drop_target_indicator--ineligible":eC,"p-channel_sidebar__channel--unread":b,"p-channel_sidebar__link--add-more-items--bbm":z}),label:eO,onClick:eP,renderLinkContent:eL})),eF=i.createElement("div",{ref:Y,className:"p-channel_sidebar__close_container"},eM?i.createElement(S.cQ,{position:"bottom-right",tryOppositePosition:!0,renderMenu:eR},i.createElement(v.Nm,{className:ep().buttonContainer},eD)):eD),eU=getProgressiveDisclosureSidebarFlagTip({shouldShowProgressiveDisclosureFlag:!!$,showProgressiveDisclosureAddTeammatesFlag:!!l});return eU?i.createElement(F.A,{tip:eU,onFlagClick:eP},eF):eF};function _temp(e){return(0,K.ty)(e,"add_prompt_interacted")}function _temp2(e){return!(0,f.$4)(e)&&(0,es.S3)(e)}function _temp3(e){return(0,H.tc)((0,em.H7)(e))}function _temp4(e){return(0,V.u)(e,{shouldRefetch:!1})}eA.displayName="AddMoreRowElement";let AddMoreRow=class AddMoreRow{"aria-level"=2;id=null;role="treeitem";type="addMore";"aria-haspopup";channelSection;height;itemId;key;contentType;showDmBrowserInAddMoreDMsLink;showInviteModalInAddMoreDMsLink;showProgressiveDisclosureAddChannelsFlag;showProgressiveDisclosureAddTeammatesFlag;constructor(e,{"aria-haspopup":t,channelSection:a,contentType:n,height:r,itemId:i,showDmBrowserInAddMoreDMsLink:l,showInviteModalInAddMoreDMsLink:o,showProgressiveDisclosureAddChannelsFlag:s,showProgressiveDisclosureAddTeammatesFlag:c}){this["aria-haspopup"]=t,this.channelSection=a,this.contentType=n,this.key=e,this.height=r,this.itemId=i,this.showDmBrowserInAddMoreDMsLink=l,this.showInviteModalInAddMoreDMsLink=o,this.showProgressiveDisclosureAddChannelsFlag=s,this.showProgressiveDisclosureAddTeammatesFlag=c}renderRow({ensureItemInView:e,rowSectionPositioning:t}){return i.createElement(eA,{channelSection:this.channelSection,ensureItemInView:e,finalDisplayedChannelSectionId:t.finalDisplayedChannelSectionId,itemId:this.itemId,priorDisplayedChannelSectionId:t.priorDisplayedChannelSectionId[this.channelSection.id],rowPosition:t.rowPosition[this.key],showDmBrowserInAddMoreDMsLink:this.showDmBrowserInAddMoreDMsLink,showInviteModalInAddMoreDMsLink:this.showInviteModalInAddMoreDMsLink,showProgressiveDisclosureAddTeammatesFlag:this.showProgressiveDisclosureAddTeammatesFlag,showProgressiveDisclosureAddChannelsFlag:this.showProgressiveDisclosureAddChannelsFlag,type:this.contentType})}};var ex=a(0x72b537b5),eE=a(0x1384f171),eC=a(0xcf519d32),ek=a(0xb2231927),ev=a(0xd6a16321),eS=a(0xd843ab47),eI=a(0x850bedf0),ew=a(0x1d34bec20),eT=a(0x1067595c0);let eN=new A.Ay("channel_sidebar"),eM="Vall_threads",eR=i.createElement(eC.A,{name:"small-reply",iconLocation:"sidebar"}),eP=(0,n.DA)()?e=>{let t,a,n,l=(0,r.c)(15),{isDisabled:o}=e,s=(0,x.wA)(),c=(0,ex.U)(),m=(0,d.d4)(eE.Lh),u=(0,d.d4)(eI.UG),p=(0,d.d4)(eT.xY),h=(0,d.d4)(eT.zx),_=(0,d.d4)(eT.nJ);m&&(h=(p.thread_unreads||0)>0,_=p.thread_mentions||0,c.info("AllThreadsRowElement",`From channel badges count, has unreads: ${h} with badge count: ${_}`));let{getPrimaryView:f}=(0,i.useContext)(eS.A);l[0]!==f?(t=e=>f(e)?.id===eM,l[0]=f,l[1]=t):t=l[1];let b=(0,d.d4)(t),g=(0,d.d4)(el.V),A=(0,d.d4)(y.zF);l[2]!==s||l[3]!==b?(a=e=>{s((0,ek.n)({e,navProps:(0,ev.mG)()})),b&&s((0,ew.r8)())},l[2]=s,l[3]=b,l[4]=a):a=l[4];let E=a;if(l[5]!==_||l[6]!==A||l[7]!==E||l[8]!==h||l[9]!==g||l[10]!==o||l[11]!==b||l[12]!==u){let e,t=_,a=h;l[14]===Symbol.for("react.memo_cache_sentinel")?(e=eN.t("Threads"),l[14]=e):e=l[14],n=i.createElement(P.A,{className:"p-channel_sidebar__link--all-threads",badgeCount:t,experimentSidebarBadgeVisualUpdatesGroupOn:A,hasUnreads:a,icon:eR,id:eM,isBBModeEnabled:g,isDisabled:o,isSelected:b,isSilentSidebarActive:u,label:e,onClick:E}),l[5]=_,l[6]=A,l[7]=E,l[8]=h,l[9]=g,l[10]=o,l[11]=b,l[12]=u,l[13]=n}else n=l[13];return n}:({isDisabled:e})=>{let t=(0,x.wA)(),a=(0,ex.U)(),n=(0,d.d4)(eE.Lh),r=(0,d.d4)(eI.UG),l=(0,d.d4)(eT.xY),o=(0,d.d4)(eT.zx),s=(0,d.d4)(eT.nJ);n&&(o=(l.thread_unreads||0)>0,s=l.thread_mentions||0,a.info("AllThreadsRowElement",`From channel badges count, has unreads: ${o} with badge count: ${s}`));let{getPrimaryView:c}=(0,i.useContext)(eS.A),m=(0,d.d4)((0,i.useCallback)(e=>c(e)?.id===eM,[c])),u=(0,d.d4)(el.V),p=(0,d.d4)(y.zF),h=(0,i.useCallback)(e=>{t((0,ek.n)({e,navProps:(0,ev.mG)()})),m&&t((0,ew.r8)())},[t,m]);return i.createElement(P.A,{className:"p-channel_sidebar__link--all-threads",badgeCount:s,experimentSidebarBadgeVisualUpdatesGroupOn:p,hasUnreads:o,icon:eR,id:eM,isBBModeEnabled:u,isDisabled:e,isSelected:m,isSilentSidebarActive:r,label:eN.t("Threads"),onClick:h})};eP.displayName="AllThreadsRowElement";var eL=a(0x1789e94fa),eO=a(0x5b1935a6);let eD=i.lazy(()=>Promise.resolve().then(a.bind(a,0x24e88698f)).then(({SidebarVisualUpdatesCoachmark:e})=>({default:e}))),eF={spaceName:eO.xu.IN_PRODUCT_COACHMARK,notifications:{[eO.ze.EDUCATION_SIDEBAR_VISUAL_UPDATES_COACHMARK]:{component:eD}}};let AllThreadsRow=class AllThreadsRow{"aria-level"=1;id="Vall_threads";role="treeitem";type="allThreadsLink";height;isDisabled;isFirstPageLinkInSidebar;key;constructor(e,{height:t,isDisabled:a,isFirstPageLinkInSidebar:n}){this.height=t,this.isDisabled=a,this.isFirstPageLinkInSidebar=n,this.key=e}renderRow(){let e=i.createElement(eP,{isDisabled:this.isDisabled});return this.isFirstPageLinkInSidebar&&(e=i.createElement(eL.A,{spaceName:eF.spaceName,notifications:eF.notifications,shouldAlwaysRenderChildren:!0},e)),e}};var eU=a(0xa2ab2a30);let ChannelRow=class ChannelRow{role="treeitem";type="channel";"aria-level";"aria-posinset";"aria-setsize";channelSection;height;id;index;key;sectionChannelIndex;shouldShowInviterJoinerPartyHat;constructor(e,{"aria-level":t,"aria-posinset":a,"aria-setsize":n,channelSection:r,height:i,id:l,index:o,sectionChannelIndex:s,shouldShowInviterJoinerPartyHat:c}){this["aria-level"]=t,this["aria-posinset"]=a,this["aria-setsize"]=n,this.channelSection=r,this.height=i,this.id=l,this.index=o,this.key=e,this.sectionChannelIndex=s,this.shouldShowInviterJoinerPartyHat=c}renderRow({onEditModeSelect:e,rowSectionPositioning:t}){return i.createElement(eU.A,{channelSection:this.channelSection,finalDisplayedChannelSectionId:t.finalDisplayedChannelSectionId,id:this.id,index:this.index,onEditModeSelect:e,priorDisplayedChannelSectionId:t.priorDisplayedChannelSectionId[this.channelSection.id],rowPosition:t.rowPosition[this.key],sectionChannelIndex:this.sectionChannelIndex})}};var eB=a(0x15f8e452a),eH=a(0x1fd3f6e20),eW=a(0x4c96e5d9),eV=a(0x1fdec3e16),eG=a(0x22c5d61d5),eq=a(0xfadc3278),ej=a(0x241818e35),ez=a(0x238b287cf),eK=a(0x2d7ecf37),e$=a.n(eK),eY=a(0x13e9d5856),eQ=a.n(eY);let eZ=new A.Ay("channel_sidebar"),eJ=(0,n.DA)()?()=>{let e,t,a,n,l,o,s=(0,r.c)(37),c=(0,x.wA)(),m=(0,ez.A)(),u=(0,d.d4)(y.Rv),p=(0,d.d4)(y.in),h=(0,d.d4)(K.qm);if(s[0]!==u){let t,a;s[2]===Symbol.for("react.memo_cache_sentinel")?(t={className:eQ().tooltipHeading},s[2]=t):t=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(a={className:eQ().tooltipContent},s[3]=a):a=s[3],e=i.createElement(i.Fragment,null,i.createElement("div",t,u?eZ.t("Ready to get organized?"):""),i.createElement("div",a,u?eZ.t("Channel sections keep related conversations close together."):"")),s[0]=u,s[1]=e}else e=s[1];let _=e,f=1===h?"trigger_1":"trigger_2";s[4]===Symbol.for("react.memo_cache_sentinel")?(t={enableClogAction:!0},s[4]=t):t=s[4],s[5]!==f?(a={eventId:M.EventId.CREATE_CHANNEL_SECTION_EDUCATION_DISMISS,uiComponentName:"dismiss_click",onClick:t,action:M.UiAction.CLICK,elementType:M.ElementType.BUTTON,stepVariant:f},s[5]=f,s[6]=a):a=s[6];let b=a;s[7]!==m||s[8]!==c||s[9]!==f?(n=()=>{m.track(M.EventId.CREATE_CHANNEL_SECTION_EDUCATION_CLICK,{contexts:{ui_context:{action:M.UiAction.CLICK,ui_properties:{element_type:M.ElementType.BUTTON},step_variant:f}}}),c((0,eq.i)({action:eG.TH.CREATE_AND_MOVE}))},s[7]=m,s[8]=c,s[9]=f,s[10]=n):n=s[10];let g=n;s[11]!==c?(l=async e=>{e.stopPropagation(),c((0,ej.v)())},s[11]=c,s[12]=l):l=s[12];let A=l;if(!u)return null;if(s[13]!==b||s[14]!==p||s[15]!==g||s[16]!==A||s[17]!==_){let e,t,a,n,r,l,c,d;s[19]===Symbol.for("react.memo_cache_sentinel")?(e={eventId:M.EventId.CREATE_CHANNEL_SECTION_EDUCATION_IMPRESSION,clogImpression:!0},s[19]=e):e=s[19],s[20]===Symbol.for("react.memo_cache_sentinel")?(t={className:e$().ctaContainer},s[20]=t):t=s[20];let m=!p;if(s[21]!==p||s[22]!==m?(a=C()(e$().toggleAndLabel,"p-channel_sidebar__static_list__item__row_container","p-channel_sidebar__cta"," p-channel_sidebar__close_container",e$().createASectionCta,{[e$().ctaUpdatesM1]:p,[e$().ctaLegacy]:m}),s[21]=p,s[22]=m,s[23]=a):a=s[23],s[24]!==g||s[25]!==a?(n={className:a,onClick:g},s[24]=g,s[25]=a,s[26]=n):n=s[26],s[27]===Symbol.for("react.memo_cache_sentinel")?(r=i.createElement(I.Ah,{name:"plus"}),l=i.createElement(eV.A,{lines:1},eZ.t("Create a section")),s[27]=r,s[28]=l):(r=s[27],l=s[28]),s[29]!==_){let e,t;s[31]===Symbol.for("react.memo_cache_sentinel")?(e={className:e$().ctaTipTag},s[31]=e):e=s[31],s[32]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement("span",{className:"display_flex margin_left_25"},i.createElement(eH.v,{style:eH.u.InverseInformative,isMicro:!0},eZ.t("Tip"))),s[32]=t):t=s[32],c=i.createElement("span",e,i.createElement(eW.Ay,{position:eW.Zj.Top,status:eW.YU.Info,tip:_},t)),s[29]=_,s[30]=c}else c=s[30];if(s[33]!==b||s[34]!==A){let e;s[36]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(eB.A,{legacy:!0,type:"times"}),s[36]=e):e=s[36],d=i.createElement(v.Nm,{className:"p-channel_sidebar__close",tabIndex:-1,onClick:A,autoClogProps:b},e),s[33]=b,s[34]=A,s[35]=d}else d=s[35];o=i.createElement(k.A,e,i.createElement("div",t,i.createElement("div",n,r,l,c,d))),s[13]=b,s[14]=p,s[15]=g,s[16]=A,s[17]=_,s[18]=o}else o=s[18];return o}:()=>{let e=(0,x.wA)(),t=(0,ez.A)(),a=(0,d.d4)(y.Rv),n=(0,d.d4)(y.in),r=(0,d.d4)(K.qm),l=(0,i.useMemo)(()=>i.createElement(i.Fragment,null,i.createElement("div",{className:eQ().tooltipHeading},a?eZ.t("Ready to get organized?"):""),i.createElement("div",{className:eQ().tooltipContent},a?eZ.t("Channel sections keep related conversations close together."):"")),[a]),o=1===r?"trigger_1":"trigger_2",s=(0,i.useMemo)(()=>({eventId:M.EventId.CREATE_CHANNEL_SECTION_EDUCATION_DISMISS,uiComponentName:"dismiss_click",onClick:{enableClogAction:!0},action:M.UiAction.CLICK,elementType:M.ElementType.BUTTON,stepVariant:o}),[o]),c=(0,i.useCallback)(()=>{t.track(M.EventId.CREATE_CHANNEL_SECTION_EDUCATION_CLICK,{contexts:{ui_context:{action:M.UiAction.CLICK,ui_properties:{element_type:M.ElementType.BUTTON},step_variant:o}}}),e((0,eq.i)({action:eG.TH.CREATE_AND_MOVE}))},[e,t,o]),m=(0,i.useCallback)(async t=>{t.stopPropagation(),e((0,ej.v)())},[e]);return a?i.createElement(k.A,{eventId:M.EventId.CREATE_CHANNEL_SECTION_EDUCATION_IMPRESSION,clogImpression:!0},i.createElement("div",{className:e$().ctaContainer},i.createElement("div",{className:C()(e$().toggleAndLabel,"p-channel_sidebar__static_list__item__row_container","p-channel_sidebar__cta"," p-channel_sidebar__close_container",e$().createASectionCta,{[e$().ctaUpdatesM1]:n,[e$().ctaLegacy]:!n}),onClick:c},i.createElement(I.Ah,{name:"plus"}),i.createElement(eV.A,{lines:1},eZ.t("Create a section")),i.createElement("span",{className:e$().ctaTipTag},i.createElement(eW.Ay,{position:eW.Zj.Top,status:eW.YU.Info,tip:l},i.createElement("span",{className:"display_flex margin_left_25"},i.createElement(eH.v,{style:eH.u.InverseInformative,isMicro:!0},eZ.t("Tip"))))),i.createElement(v.Nm,{className:"p-channel_sidebar__close",tabIndex:-1,onClick:m,autoClogProps:s},i.createElement(eB.A,{legacy:!0,type:"times"}))))):null};eJ.displayName="CreateASectionRowElement";let CreateASectionRow=class CreateASectionRow{id="createASection";role="treeitem";type="createASection";channelSection;key;height;"aria-label";constructor(e,{channelSection:t,height:a,ariaLabel:n}){this.channelSection=t,this.key=e,this.height=a,this["aria-label"]=n}renderRow(){return i.createElement(eJ,null)}};var eX=a(0x1ebadc6bc),e0=a(0x1880c3158),e1=a(0xb16beb2e),e2=a.n(e1);let e4=new A.Ay("app_update"),e5={info:e2().containerInfo,warning:e2().containerWarning,urgent:e2().containerUrgent},e3={info:"info",warning:"warning",urgent:"warning"},e6=(0,n.DA)()?e=>{let t,a,n,l=(0,r.c)(22),{urgency:o}=e,s=(0,x.wA)();l[0]!==s?(t=()=>{s((0,eX.fd)())},l[0]=s,l[1]=t):t=l[1];let c=t,m=(0,d.d4)(e0.Mu);if(!m)return;if(l[2]!==m){let e=m;e.includes(" ")&&(e=e.split(" ")[1]),a=e4.t("Update Available ({version})",{version:e}),l[2]=m,l[3]=a}else a=l[3];let u=a;if(l[4]!==c||l[5]!==u||l[6]!==o){let e,t,a,r=`${e2().container} ${e5[o]}`;if(l[8]!==c||l[9]!==r||l[10]!==u?(e={className:r,onClick:c,title:u},l[8]=c,l[9]=r,l[10]=u,l[11]=e):e=l[11],l[12]!==o){let e,a;l[14]===Symbol.for("react.memo_cache_sentinel")?(e={className:e2().icon},l[14]=e):e=l[14];let n=e3[o];l[15]!==n?(a={name:n,size:"16"},l[15]=n,l[16]=a):a=l[16],t=i.createElement("span",e,i.createElement(I.Ah,a)),l[12]=o,l[13]=t}else t=l[13];if(l[17]!==u){let e,t,n;l[19]===Symbol.for("react.memo_cache_sentinel")?(e={className:e2().info},l[19]=e):e=l[19],l[20]===Symbol.for("react.memo_cache_sentinel")?(t={className:e2().versionNumber},l[20]=t):t=l[20];let r=i.createElement("span",t,u);l[21]===Symbol.for("react.memo_cache_sentinel")?(n=i.createElement("span",{className:e2().versionDescription},e4.rt("The latest stuff from the Desktop team.")),l[21]=n):n=l[21],a=i.createElement("div",e,r,n),l[17]=u,l[18]=a}else a=l[18];n=i.createElement(v.Nm,e,t,a),l[4]=c,l[5]=u,l[6]=o,l[7]=n}else n=l[7];return n}:({urgency:e})=>{let t=(0,x.wA)(),a=(0,i.useCallback)(()=>{t((0,eX.fd)())},[t]),n=(0,d.d4)(e0.Mu);if(!n)return;let r=n;r.includes(" ")&&(r=r.split(" ")[1]);let l=e4.t("Update Available ({version})",{version:r});return i.createElement(v.Nm,{className:`${e2().container} ${e5[e]}`,onClick:a,title:l},i.createElement("span",{className:e2().icon},i.createElement(I.Ah,{name:e3[e],size:"16"})),i.createElement("div",{className:e2().info},i.createElement("span",{className:e2().versionNumber},l),i.createElement("span",{className:e2().versionDescription},e4.rt("The latest stuff from the Desktop team."))))};e6.displayName="DesktopUpdateRowElement";let DesktopUpdateRow=class DesktopUpdateRow{height=60;id=null;role=null;type="desktopUpdate";key;urgency;constructor(e,t){this.key=e,this.urgency=t}renderRow(){return i.createElement(e6,{urgency:this.urgency})}};var e8=a(0x1a712979a);let DiscountOfferRow=class DiscountOfferRow{"aria-level"=1;height=61;id=null;role="treeitem";type="discountOfferCTA";key;constructor(e){this.key=e}renderRow(){return i.createElement(e8.A,null)}};var e7=a(0x203c9796),e9=a.n(e7);let DividerRowElement=()=>i.createElement("div",{className:e9().divider});let DividerRow=class DividerRow{height=24;id=null;role=null;type="divider";key;constructor(e){this.key=e}renderRow(){return i.createElement(DividerRowElement,null)}};var te=a(0x8f36a342),tt=a(0x19280e3a2),ta=a.n(tt);let tn=new A.Ay("channel_sidebar"),tr=(0,n.DA)()?e=>{let t,a,n,l,o,s=(0,r.c)(29),{channelSection:c,finalDisplayedChannelSectionId:m,priorDisplayedChannelSectionId:u,rowPosition:p}=e,h=(0,d.d4)(y.Zg);s[0]!==c||s[1]!==m||s[2]!==u||s[3]!==p?(t={rowPosition:p,priorDisplayedChannelSectionId:u,finalDisplayedChannelSectionId:m,channelSection:c},s[0]=c,s[1]=m,s[2]=u,s[3]=p,s[4]=t):t=s[4];let{channelDropIndicatorSides:_,connectDropTarget:f}=(0,w.A)(t);s[5]!==h?(a=h?tn.t("Drag and drop important stuff here"):"",s[5]=h,s[6]=a):a=s[6];let b=a;s[7]!==_?(n=C()(ta().banner,{[ta().isHovered]:_,"p-channel_sidebar__drop_target_indicator--channel_sides":_}),s[7]=_,s[8]=n):n=s[8];let g=n;s[9]!==_?(l=C()(ta().spacer,{[ta().isHovered]:_,"p-channel_sidebar__drop_target_indicator--channel_sides":_}),s[9]=_,s[10]=l):l=s[10];let A=l;if(h&&c.type===te.VZ.Stars){if(s[11]!==g||s[12]!==f||s[13]!==b||s[14]!==A){let e,t,a;if(s[16]!==f?(e={ref:f},s[16]=f,s[17]=e):e=s[17],s[18]!==A?(t=i.createElement("div",{className:A}),s[18]=A,s[19]=t):t=s[19],s[20]!==g||s[21]!==b){let e,t;if(s[23]!==g?(e={className:g,"aria-hidden":"true"},s[23]=g,s[24]=e):e=s[24],s[25]!==b){let e,a;s[27]===Symbol.for("react.memo_cache_sentinel")?(e={lines:2,withTooltip:!0,breakWords:!1},s[27]=e):e=s[27],s[28]===Symbol.for("react.memo_cache_sentinel")?(a={className:ta().label},s[28]=a):a=s[28],t=i.createElement(eV.A,e,i.createElement("span",a,b)),s[25]=b,s[26]=t}else t=s[26];a=i.createElement("div",e,t),s[20]=g,s[21]=b,s[22]=a}else a=s[22];o=i.createElement("div",e,t,a),s[11]=g,s[12]=f,s[13]=b,s[14]=A,s[15]=o}else o=s[15];return o}}:({channelSection:e,finalDisplayedChannelSectionId:t,priorDisplayedChannelSectionId:a,rowPosition:n})=>{let r=(0,d.d4)(y.Zg),{channelDropIndicatorSides:l,connectDropTarget:o}=(0,w.A)({rowPosition:n,priorDisplayedChannelSectionId:a,finalDisplayedChannelSectionId:t,channelSection:e}),s=r?tn.t("Drag and drop important stuff here"):"",c=C()(ta().banner,{[ta().isHovered]:l,"p-channel_sidebar__drop_target_indicator--channel_sides":l}),m=C()(ta().spacer,{[ta().isHovered]:l,"p-channel_sidebar__drop_target_indicator--channel_sides":l});if(r&&e.type===te.VZ.Stars)return i.createElement("div",{ref:o},i.createElement("div",{className:m}),i.createElement("div",{className:c,"aria-hidden":"true"},i.createElement(eV.A,{lines:2,withTooltip:!0,breakWords:!1},i.createElement("span",{className:ta().label},s))))};tr.displayName="EmptyStarredSectionRowElement";let EmptyStarredSectionRow=class EmptyStarredSectionRow{height=44;id="emptyStarredSectionBanner";role="treeitem";type="emptyStarredSectionBanner";channelSection;key;constructor(e,{channelSection:t}){this.channelSection=t,this.key=e}renderRow({rowSectionPositioning:e}){return i.createElement(tr,{channelSection:this.channelSection,rowPosition:e.rowPosition[this.key],priorDisplayedChannelSectionId:e.priorDisplayedChannelSectionId[this.channelSection.id],finalDisplayedChannelSectionId:e.finalDisplayedChannelSectionId})}};var ti=a(0x1b81e2549),tl=a(0x2334f665b),to=a(0x1c18c5d4e),ts=a(0x16ed1b0dc),tc=a(0x19895585a),td=a(0x9271cc31),tm=a(0x1926b3cbb),tu=a(0x7f81b930),tp=a(0x1529cf960),th=a(0x4f86f8f5);let t_={channelSectionId:void 0},EntityRowElement=({row:e,channelSection:t,rowPosition:a,priorDisplayedChannelSectionId:n,finalDisplayedChannelSectionId:r})=>{let l=(0,x.wA)(),o=(0,d.d4)(to.I),{connectDropTarget:c,channelDropIndicatorAbove:m,channelDropIndicatorSides:u,channelDropIndicatorBelow:p,channelSectionDropIndicatorAbove:h,channelSectionDropIndicatorBelow:_,channelDropIneligible:f}=(0,w.A)({rowPosition:a,priorDisplayedChannelSectionId:n,finalDisplayedChannelSectionId:r,channelSection:t}),b=(0,i.useRef)(void 0),[,g,y]=(0,ti.i)(()=>({type:tu.IC,item:a=>(l((0,tp.di)({channelSectionId:t.id})),{type:tu.IC,boundingClientRect:b.current?.getBoundingClientRect(),initialClientOffset:a.getInitialClientOffset(),row:e}),end:()=>{l((0,tp.di)(t_))},canDrag:()=>!0}),[l,t,e]),A=(0,i.useCallback)(e=>{b.current=e,c(e),g(e)},[b,c,g]),E=(({entityId:e})=>{let t=(0,d.d4)(td.e6),a=(0,d.d4)(e=>(0,td.F8)(e,{tab:t,container:tc.mq.Primary})),n=a?.params?.parentTab,r=n&&(0,ts.A)(n);return a?.viewType===s.D.SalesBulkGrid&&a?.id===e&&!r})({entityId:e.id}),k=o&&e.entity.entityType===th.FN.SalesforceList,v=C()({"p-channel_sidebar__drop_target_indicator--channel_above":m,"p-channel_sidebar__drop_target_indicator--channel_sides":u,"p-channel_sidebar__drop_target_indicator--channel_below":p,"p-channel_sidebar__drop_target_indicator--channel_section_above":h,"p-channel_sidebar__drop_target_indicator--channel_section_below":_,"p-channel_sidebar__drop_target_indicator--ineligible":f});return y((0,tl.n)(),{captureDraggingState:!0}),i.createElement("div",{ref:A,className:C()("p-channel_sidebar__close_container",{"p-channel_sidebar__close_container--selected":E})},i.createElement(tm.F,{entity:e.entity,shouldHideRemoveButton:k,className:v,isSelected:E,channelSectionId:t.id}))};EntityRowElement.displayName="EntityRowElement";let EntityRow=class EntityRow{role="treeitem";type="sidebarEntity";channelSection;entity;height;key;constructor(e,{channelSection:t,entity:a,height:n}){this.channelSection=t,this.entity=a,this.height=n,this.key=e}get id(){return this.entity.entityId}renderRow({rowSectionPositioning:e}){return i.createElement(EntityRowElement,{channelSection:this.channelSection,finalDisplayedChannelSectionId:e.finalDisplayedChannelSectionId,priorDisplayedChannelSectionId:e.priorDisplayedChannelSectionId[this.channelSection.id],row:this,rowPosition:e.rowPosition[this.key]})}};let MegaphoneRow=class MegaphoneRow{"aria-level"=2;id=null;role="treeitem";type="megaphone";"aria-haspopup";height;key;megaphoneConfig;constructor(e,{"aria-haspopup":t,height:a,megaphoneConfig:n}){this["aria-haspopup"]=t,this.height=a,this.key=e,this.megaphoneConfig=n}renderRow(){return i.createElement(eL.A,{notifications:this.megaphoneConfig.notifications,spaceName:this.megaphoneConfig.spaceName})}};var tf=a(0xa6f3163b),tb=a(0x1a02c72b5);let tg=(0,a(0x11c82607b).Ay)("Navigate to the selected page",(e,t,{e:a,pageId:n})=>{e(n===p.c.SalesAutoSlackLaunchpad?(0,tb.o)((0,ev.bc)()):(0,ek.n)({e:a,navProps:(0,ev.ZF)(n)}))});tg.meta={name:"onPageSelect",key:"createThunkOnPageSelect",description:"Navigate to the selected page"};var ty=a(0x1cbc015b8);let tA=(0,n.DA)()?function(e){let t,a,n,l,o,s,c,m,u,p,h,_=(0,r.c)(37),f=(0,x.wA)();_[0]!==e?(t=(0,ty.gY)(e),_[0]=e,_[1]=t):t=_[1];let b=t;_[2]!==b.sidebar?(a=e=>"function"==typeof b.sidebar?.autoClogParams?b.sidebar?.autoClogParams(e):b.sidebar?.autoClogParams,_[2]=b.sidebar,_[3]=a):a=_[3];let g=(0,d.d4)(a);_[4]!==b.sidebar?(n=e=>b.sidebar?.badgeCount?.(e),_[4]=b.sidebar,_[5]=n):n=_[5];let y=(0,d.d4)(n);_[6]!==b.sidebar?(l=e=>!!b.sidebar?.displayAsBold?.(e),_[6]=b.sidebar,_[7]=l):l=_[7];let A=(0,d.d4)(l);_[8]!==b.sidebar?(o=e=>!!b.sidebar?.hasUnreads?.(e),_[8]=b.sidebar,_[9]=o):o=_[9];let E=(0,d.d4)(o);_[10]!==b.sidebar?(s=e=>(b.sidebar?.showCloseButton?.(e)??!0)&&!!b.sidebar?.onClickClose,_[10]=b.sidebar,_[11]=s):s=_[11];let C=(0,d.d4)(s),{getPrimaryView:k}=(0,i.useContext)(eS.A);_[12]!==k||_[13]!==e||_[14]!==b.sidebar?(c=t=>{if("function"==typeof b.sidebar?.isSelected)return b.sidebar.isSelected(t);let a=k(t);return a?.id===e},_[12]=k,_[13]=e,_[14]=b.sidebar,_[15]=c):c=_[15];let v=(0,d.d4)(c);_[16]!==b?(m=e=>b.label?.(e),_[16]=b,_[17]=m):m=_[17];let S=(0,d.d4)(m);_[18]!==f||_[19]!==b.sidebar?(u=()=>b.sidebar?.onClick?.(f),_[18]=f,_[19]=b.sidebar,_[20]=u):u=_[20];let I=u;_[21]!==f||_[22]!==b.sidebar?(p=e=>b.sidebar?.onClickClose?.(f,e),_[21]=f,_[22]=b.sidebar,_[23]=p):p=_[23];let w=p,T=b.sidebar?.badgeProps,N=b.sidebar?.icon||b.icon||ty.Sg,M=b.sidebar?.renderLinkContent;return _[24]!==g||_[25]!==y||_[26]!==A||_[27]!==E||_[28]!==C||_[29]!==v||_[30]!==S||_[31]!==I||_[32]!==w||_[33]!==T||_[34]!==N||_[35]!==M?(h={autoClogParams:g,badgeCount:y,badgeProps:T,displayAsBold:A,hasUnreads:E,icon:N,isCloseButtonVisible:C,isSelected:v,label:S,onClick:I,onClickClose:w,renderLinkContent:M},_[24]=g,_[25]=y,_[26]=A,_[27]=E,_[28]=C,_[29]=v,_[30]=S,_[31]=I,_[32]=w,_[33]=T,_[34]=N,_[35]=M,_[36]=h):h=_[36],h}:function(e){let t=(0,x.wA)(),a=(0,ty.gY)(e),n=(0,d.d4)(e=>"function"==typeof a.sidebar?.autoClogParams?a.sidebar?.autoClogParams(e):a.sidebar?.autoClogParams),r=(0,d.d4)(e=>a.sidebar?.badgeCount?.(e)),l=(0,d.d4)(e=>!!a.sidebar?.displayAsBold?.(e)),o=(0,d.d4)(e=>!!a.sidebar?.hasUnreads?.(e)),s=(0,d.d4)(e=>(a.sidebar?.showCloseButton?.(e)??!0)&&!!a.sidebar?.onClickClose),{getPrimaryView:c}=(0,i.useContext)(eS.A),m=(0,d.d4)(t=>{if("function"==typeof a.sidebar?.isSelected)return a.sidebar.isSelected(t);let n=c(t);return n?.id===e}),u=(0,d.d4)(e=>a.label?.(e)),p=(0,i.useCallback)(()=>a.sidebar?.onClick?.(t),[t,a.sidebar]),h=(0,i.useCallback)(e=>a.sidebar?.onClickClose?.(t,e),[t,a.sidebar]);return{autoClogParams:n,badgeCount:r,badgeProps:a.sidebar?.badgeProps,displayAsBold:l,hasUnreads:o,icon:a.sidebar?.icon||a.icon||ty.Sg,isCloseButtonVisible:s,isSelected:m,label:u,onClick:p,onClickClose:h,renderLinkContent:a.sidebar?.renderLinkContent}},tx=p.c.CrmProvisioningContacts,tE=p.c.CrmProvisioningAccounts;var tC=a(0x164da2924),tk=a.n(tC);let tv=(0,n.DA)()?e=>{let t,a,n=(0,r.c)(91),{isDisabled:l,id:o}=e,s=void 0!==l&&l,c=(0,x.wA)(),m=(0,d.d4)(el.V),u=(0,d.d4)(y.zF),p=(0,d.d4)(eI.UG),{autoClogParams:h,badgeCount:_,badgeProps:f,displayAsBold:b,hasUnreads:g,icon:A,isCloseButtonVisible:E,isSelected:v,label:S,onClick:I,onClickClose:w,renderLinkContent:T}=tA(o);n[0]!==c||n[1]!==o||n[2]!==s||n[3]!==I?(t=e=>{s||(I(),c(tg({e,pageId:o})))},n[0]=c,n[1]=o,n[2]=s,n[3]=I,n[4]=t):t=n[4];let N=t;if(n[5]!==h?.link||n[6]!==h?.onClick||n[7]!==h?.onClickClose||n[8]!==_||n[9]!==f||n[10]!==b||n[11]!==u||n[12]!==N||n[13]!==g||n[14]!==A||n[15]!==o||n[16]!==m||n[17]!==E||n[18]!==s||n[19]!==v||n[20]!==p||n[21]!==S||n[22]!==w||n[23]!==T){let e;if(n[25]!==h?.onClick||n[26]!==h?.onClickClose||n[27]!==_||n[28]!==f||n[29]!==b||n[30]!==u||n[31]!==N||n[32]!==g||n[33]!==A||n[34]!==o||n[35]!==m||n[36]!==E||n[37]!==s||n[38]!==v||n[39]!==p||n[40]!==S||n[41]!==w||n[42]!==T){let t,a,r,l;if(n[44]!==E?(t=C()({"p-channel_sidebar__close_container":E}),n[44]=E,n[45]=t):t=n[45],n[46]!==t?(a={className:t},n[46]=t,n[47]=a):a=n[47],n[48]!==h?.onClick||n[49]!==_||n[50]!==f||n[51]!==b||n[52]!==u||n[53]!==N||n[54]!==g||n[55]!==A||n[56]!==o||n[57]!==m||n[58]!==s||n[59]!==v||n[60]!==p||n[61]!==S||n[62]!==T){let e,t,a;n[64]!==o?(e=o.toLowerCase(),n[64]=o,n[65]=e):e=n[65];let l=`p-channel_sidebar__link--page_${e}`,c=o===tx||o===tE;n[66]!==m||n[67]!==s||n[68]!==c||n[69]!==l?(t=C()("p-channel_sidebar__link--page",l,"position_relative",{"p-channel_sidebar__link--page--disabled":s,"p-channel_sidebar__link--page--bbm":m,"p-channel_sidebar__channel--sidebar-section-header-update":c}),n[66]=m,n[67]=s,n[68]=c,n[69]=l,n[70]=t):t=n[70];let d=h?.onClick;n[71]!==_||n[72]!==f||n[73]!==b||n[74]!==u||n[75]!==N||n[76]!==g||n[77]!==A||n[78]!==o||n[79]!==m||n[80]!==v||n[81]!==p||n[82]!==S||n[83]!==T||n[84]!==t||n[85]!==d?(a={id:o,isSelected:v,renderLinkContent:T,label:S,className:t,icon:A,hasUnreads:g,displayAsBold:b,badgeCount:_,badgeProps:f,autoClogProps:d,isBBModeEnabled:m,experimentSidebarBadgeVisualUpdatesGroupOn:u,isSilentSidebarActive:p,onClick:N},n[71]=_,n[72]=f,n[73]=b,n[74]=u,n[75]=N,n[76]=g,n[77]=A,n[78]=o,n[79]=m,n[80]=v,n[81]=p,n[82]=S,n[83]=T,n[84]=t,n[85]=d,n[86]=a):a=n[86],r=i.createElement(P.A,a),n[48]=h?.onClick,n[49]=_,n[50]=f,n[51]=b,n[52]=u,n[53]=N,n[54]=g,n[55]=A,n[56]=o,n[57]=m,n[58]=s,n[59]=v,n[60]=p,n[61]=S,n[62]=T,n[63]=r}else r=n[63];n[87]!==h?.onClickClose||n[88]!==E||n[89]!==w?(l=E&&i.createElement(tf.A,{onClick:w,className:C()("p-channel_sidebar__close",tk().closeCircle),"data-qa":"channel_sidebar_close_button","aria-hidden":!0,tabIndex:-1,autoClogProps:h?.onClickClose},i.createElement(eB.A,{type:"times"})),n[87]=h?.onClickClose,n[88]=E,n[89]=w,n[90]=l):l=n[90],e=i.createElement("div",a,r,l),n[25]=h?.onClick,n[26]=h?.onClickClose,n[27]=_,n[28]=f,n[29]=b,n[30]=u,n[31]=N,n[32]=g,n[33]=A,n[34]=o,n[35]=m,n[36]=E,n[37]=s,n[38]=v,n[39]=p,n[40]=S,n[41]=w,n[42]=T,n[43]=e}else e=n[43];a=i.createElement(k.A,h?.link,e),n[5]=h?.link,n[6]=h?.onClick,n[7]=h?.onClickClose,n[8]=_,n[9]=f,n[10]=b,n[11]=u,n[12]=N,n[13]=g,n[14]=A,n[15]=o,n[16]=m,n[17]=E,n[18]=s,n[19]=v,n[20]=p,n[21]=S,n[22]=w,n[23]=T,n[24]=a}else a=n[24];return a}:({isDisabled:e=!1,id:t})=>{let a=(0,x.wA)(),n=(0,d.d4)(el.V),r=(0,d.d4)(y.zF),l=(0,d.d4)(eI.UG),{autoClogParams:o,badgeCount:s,badgeProps:c,displayAsBold:m,hasUnreads:u,icon:p,isCloseButtonVisible:h,isSelected:_,label:f,onClick:b,onClickClose:g,renderLinkContent:A}=tA(t),E=(0,i.useCallback)(n=>{e||(b(),a(tg({e:n,pageId:t})))},[a,t,e,b]);return i.createElement(k.A,o?.link,i.createElement("div",{className:C()({"p-channel_sidebar__close_container":h})},i.createElement(P.A,{id:t,isSelected:_,renderLinkContent:A,label:f,className:C()("p-channel_sidebar__link--page",`p-channel_sidebar__link--page_${t.toLowerCase()}`,"position_relative",{"p-channel_sidebar__link--page--disabled":e,"p-channel_sidebar__link--page--bbm":n,"p-channel_sidebar__channel--sidebar-section-header-update":t===tx||t===tE}),icon:p,hasUnreads:u,displayAsBold:m,badgeCount:s,badgeProps:c,autoClogProps:o?.onClick,isBBModeEnabled:n,experimentSidebarBadgeVisualUpdatesGroupOn:r,isSilentSidebarActive:l,onClick:E}),h&&i.createElement(tf.A,{onClick:g,className:C()("p-channel_sidebar__close",tk().closeCircle),"data-qa":"channel_sidebar_close_button","aria-hidden":!0,tabIndex:-1,autoClogProps:o?.onClickClose},i.createElement(eB.A,{type:"times"}))))};tv.displayName="PageRowElement";var tS=a(0x3989021c);function DigestNuxEducationCoachmarkContainer({children:e}){let t=(0,i.useCallback)(e=>{e.stopPropagation()},[]);return i.createElement("span",{"data-qa":"digest-nux-education-coachmark",role:"none",onClick:t},e)}DigestNuxEducationCoachmarkContainer.displayName="DigestNuxEducationCoachmarkContainer";var tI=a(0x238955a0b),tw=a(0x1aeac9037);function useCoachmarkActions(e){let t=(0,x.wA)(),a=(0,i.useCallback)(()=>{e(!0)},[e]),n=(0,i.useCallback)(()=>{e(!1)},[e]),r=(0,i.useCallback)(()=>{a(),t((0,tb.o)((0,ev.vV)({navigatedFromNuxCoachmark:!0})))},[t,a]);return{closeCoachmark:a,closeAndDismissCoachmark:n,closeCoachmarkAndNavigateToRecap:r}}var tT=a(0xf3c65e54);function useRecordMegaphoneImpression(e){let t=(0,x.wA)();(0,i.useEffect)(()=>{e&&t((0,tT.A)({action:eO.hw.IMPRESSION,notificationName:eO.ze.SLACK_AI_DIGEST_NUX_EDUCATION}))},[t,e])}let tN=new A.Ay("assistant");function RecapNuxEducationCoachmarkExtendedPreviewDay2({children:e}){let{isOpen:t,closeCoachmark:a}=(0,tS.A)(eO.ze.SLACK_AI_DIGEST_NUX_EDUCATION,eO.xu.IN_PRODUCT_COACHMARK);useRecordMegaphoneImpression(t);let{closeCoachmark:n,closeCoachmarkAndNavigateToRecap:r}=useCoachmarkActions(a),l=(0,d.d4)(e=>!(0,K.ty)(e,"a11y_animations")),o=(0,i.useMemo)(()=>i.createElement(tw.s,{useEmptyStateVariant:!0,useLargeSize:!1}),[]),s=tN.t("It\u2019s okay not to read every message"),c=tN.t("You\u2019re human! AI can keep you informed with daily channel recaps, and save you some reading time."),m=tN.t("Preview Your Recap"),u=M.UiStep.SLACK_AI_RECAP_EDUCATION_EXTENDED_PREVIEW_COACHMARK_DAY_2;return i.createElement(tI.H,{className:C()("p-digest_nux_education_coachmark",{"p-digest_nux_education_coachmark--with-color-gradient-background":!l}),isOpen:t,arrowCenterOnAnchor:!0,arrowPosition:10,offsetX:-8,offsetY:145,orientation:"right-bottom",titleText:s,bodyText:c,dismissCoachmark:n,hero:o,primaryCallToActionText:m,onClickPrimaryButton:r,useCustomOverlay:!0,clogUiStep:u},e)}RecapNuxEducationCoachmarkExtendedPreviewDay2.displayName="RecapNuxEducationCoachmarkExtendedPreviewDay2";var tM=a(0x13953efe6),tR=a(0x5eedb646);function useAutoclogProps(e){return(0,i.useMemo)(()=>({eventId:M.EventId.NATIVE_AI,uiStep:e,elementName:tR.H.NUX_COACHMARK}),[e])}var tP=a(0x365a4cc3);let tL=new A.Ay("assistant");function RecapNuxEducationCoachmarkExtendedPreviewDay3({children:e}){let t=(0,d.d4)(tP.G0),{isOpen:a,closeCoachmark:n,renderCoachmark:r}=(0,tS.A)(eO.ze.SLACK_AI_DIGEST_NUX_EDUCATION,eO.xu.IN_PRODUCT_COACHMARK);useRecordMegaphoneImpression(a);let{closeCoachmark:l,closeCoachmarkAndNavigateToRecap:o}=useCoachmarkActions(n),s=useAutoclogProps(M.UiStep.SLACK_AI_RECAP_EDUCATION_EXTENDED_PREVIEW_COACHMARK_DAY_3),c=tL.t("Psst - you don\u2019t need to read every message"),m=tL.t("Your AI recap is ready to skim, saving you about {numMinutes, plural, =1 {{numMinutes} minute} other {{numMinutes} minutes}} of reading time. Your secret\u2019s safe with us.",{numMinutes:t}),u=tL.t("Preview Your Recap"),p=r({title:c,bodyText:m,centerOnArrow:!0,arrowPosition:10,offsetX:-8,offsetY:0,closeCoachmark:l,orientation:tM.YC.TopRight,isMegaphoneCoachmark:!0,autoClogProps:s,primaryCallToActionText:u,onClickPrimaryButton:o});return i.createElement(tM.Ay,{coachmarkElement:p,orientation:"right"},e)}RecapNuxEducationCoachmarkExtendedPreviewDay3.displayName="RecapNuxEducationCoachmarkExtendedPreviewDay3";var tO=a(0x21f3c49e8),tD=a(0x21343fa5a),tF=a(0x11b7023b5),tU=a(0x127c62b25);let tB=new A.Ay("assistant");function RecapNuxEducationCoachmarkExtendedPreviewDayFinal({children:e}){let t=(0,x.wA)(),{isOpen:a,closeCoachmark:n,renderCoachmark:r}=(0,tS.A)(eO.ze.SLACK_AI_DIGEST_NUX_EDUCATION,eO.xu.IN_PRODUCT_COACHMARK),{closeAndDismissCoachmark:l,closeCoachmarkAndNavigateToRecap:o}=useCoachmarkActions(n);useRecordMegaphoneImpression(a);let s=useAutoclogProps(M.UiStep.SLACK_AI_RECAP_EDUCATION_EXTENDED_PREVIEW_COACHMARK_DAY_FINAL),{isRecommendedChannelsLoading:c,recommendedChannelIds:d,fetchRecommendedChannels:m}=(0,tF.U)();(0,tD.A)(()=>{m()});let u=(0,i.useMemo)(()=>{let e={};for(let t of d||[])e[t]={isRecapped:!0};return e},[d]),p=(0,i.useCallback)(async()=>{(0,tO.A)(u)||await t((0,tU.y)({modifiedChannels:u,isOnboardingMode:!0}))},[t,u]),h=(0,i.useCallback)(()=>{p(),o()},[o,p]),_=tB.t("Keep receiving your recap?"),f=tB.t("Your recap preview is about to end. It can keep you informed with daily channel recaps, and save you some reading time."),b=tB.t("Subscribe to Recap"),g=tB.t("No Thanks"),y=r({title:_,bodyText:f,centerOnArrow:!0,arrowPosition:10,offsetX:-8,offsetY:0,closeCoachmark:l,orientation:tM.YC.TopRight,isMegaphoneCoachmark:!0,autoClogProps:s,primaryCallToActionText:b,secondaryCallToActionText:g,onClickPrimaryButton:h,onClickSecondaryButton:l});return c?e:i.createElement(tM.Ay,{coachmarkElement:y,orientation:"right"},e)}RecapNuxEducationCoachmarkExtendedPreviewDayFinal.displayName="RecapNuxEducationCoachmarkExtendedPreviewDayFinal";var tH=a(0xb9604b6);function RecapNuxEducationCoachmarkExtendedPreview({children:e}){let{impressions:t}=(0,d.d4)(e=>(0,tH.OL)(e,eO.xu.IN_PRODUCT_COACHMARK)),a=(0,i.useMemo)(()=>{let e=Number(t);return 0===e||1===e||2===e?e:null},[t]);return 0===a?i.createElement(DigestNuxEducationCoachmarkContainer,null,i.createElement(RecapNuxEducationCoachmarkExtendedPreviewDay2,null,e)):1===a?i.createElement(DigestNuxEducationCoachmarkContainer,null,i.createElement(RecapNuxEducationCoachmarkExtendedPreviewDay3,null,e)):i.createElement(DigestNuxEducationCoachmarkContainer,null,i.createElement(RecapNuxEducationCoachmarkExtendedPreviewDayFinal,null,e))}function RecapNuxEducationCoachmark({children:e}){return i.createElement(RecapNuxEducationCoachmarkExtendedPreview,null,e)}RecapNuxEducationCoachmarkExtendedPreview.displayName="RecapNuxEducationCoachmarkExtendedPreview",RecapNuxEducationCoachmark.displayName="RecapNuxEducationCoachmark";var tW=a(0x1400f598e),tV=a(0x6d8ce6ed),tG=a(0x1fcbb004d);let tq=new A.Ay("assistant");function RecapOnboardingTourEducationCoachmark({children:e}){let t,a,n=(0,x.wA)(),r=(0,d.d4)(tP.GT),l=(0,d.d4)(tP.Py),o=(0,i.useMemo)(()=>i.createElement(tw.s,{useEmptyStateVariant:!1,useLargeSize:!1}),[]);l?(t=tq.t("Stay in the loop on channels you care about"),a=tq.t("Nice, you\u2019ve already set up your daily recap! Your next recap will be ready at {time}.",{time:r?(0,z.Yq)(r,"{time}"):"7 AM"})):(t=tq.t("Recap and mute noisy channels"),a=tq.t("Let Slack AI send daily recaps of channels you can\u2019t always make time for, and mute them in your sidebar for better focus."));let s=tq.t("Done"),c=M.UiStep.SLACK_AI_NUX_RECAP_COACHMARK,m=(0,i.useMemo)(()=>i.createElement("div",null,i.createElement("p",{className:"c-coachmarkv2__body margin_bottom_150"},a),i.createElement("div",{className:"p-digest_nux_education_coachmark__steps"},tq.t("{stepNumber} of {totalStepCount}",{stepNumber:3,totalStepCount:3}))),[a]),u=(0,i.useCallback)(()=>{n((0,tG.O)()),n((0,tW.wX)(null)),n((0,tV.t)())},[n]);return i.createElement(DigestNuxEducationCoachmarkContainer,null,i.createElement(tI.H,{className:"p-digest_nux_education_coachmark",isOpen:!0,arrowCenterOnAnchor:!0,arrowPosition:10,offsetX:-8,offsetY:145,orientation:"right-bottom",titleText:t,bodyText:m,dismissCoachmark:u,hero:o,primaryCallToActionText:s,onClickPrimaryButton:u,useCustomOverlay:!0,clogUiStep:c},e))}RecapOnboardingTourEducationCoachmark.displayName="RecapOnboardingTourEducationCoachmark";var tj=a(0x1599ad93e),tK=a(0x1e3eb45fd),t$=a(0x1f48e3aa4),tY=a(0x22ef89887);let DigestNuxEducationCoachmark=({children:e})=>{let t=(0,x.wA)(),a=(0,d.d4)(tK.hS),n=(0,d.d4)(tP.rV)??null,r=n===t$.MO.Recap,l=(0,d.d4)(tj.ZV),o=(0,d.d4)(tH.up),{isOpen:s}=(0,tS.A)(eO.ze.SLACK_AI_DIGEST_NUX_EDUCATION,eO.xu.IN_PRODUCT_COACHMARK),c=(l||null!==n)&&s;(0,i.useEffect)(()=>{c&&!o&&t((0,tY.co)(!0))},[t,o,c]);let m=c||o;return a&&(r||s)&&!(s&&m)?s?i.createElement(RecapNuxEducationCoachmark,null,e):i.createElement(RecapOnboardingTourEducationCoachmark,null,e):e};DigestNuxEducationCoachmark.displayName="DigestNuxEducationCoachmark";let tQ=i.memo(DigestNuxEducationCoachmark);let PageRow=class PageRow{"aria-level"=1;role="treeitem";type="pageLink";height;id;isDisabled;isFirstPageLinkInSidebar;key;constructor(e,{height:t,id:a,isDisabled:n,isFirstPageLinkInSidebar:r}){this.height=t,this.id=a,this.isDisabled=n,this.isFirstPageLinkInSidebar=r,this.key=e}renderRow(){let e=i.createElement(tv,{id:this.id,isDisabled:this.isDisabled});return this.id===p.c.DailyDigest&&(e=i.createElement(tQ,null,e)),this.isFirstPageLinkInSidebar&&(e=i.createElement(eL.A,{notifications:eF.notifications,shouldAlwaysRenderChildren:!0,spaceName:eF.spaceName},e)),e}};var tZ=a(0x1cbdfeceb),tJ=a(0x1df96de4c),tX=a(0x134e233cc),t0=a(0xe2ca58e9);let t1={[eO.ze.RECORD_CHANNELS_SIDEBAR_CHANNEL_SECTION_BADGE]:{component:i.lazy(()=>Promise.resolve().then(a.bind(a,0x2c06e550)).then(({RecordChannelsSidebarSectionLabelNux:e})=>({default:e})))}};function RecordChannelsSidebarSectionLabel({children:e,channelSectionName:t}){return i.createElement(eL.A,{channelSectionName:t,notifications:t1,renderSidebarSection:e,shouldAlwaysRenderChildren:!0,spaceName:eO.xu.RECORD_CHANNEL_SIDEBAR_SECTION},e())}RecordChannelsSidebarSectionLabel.displayName="RecordChannelsSidebarSectionLabel";var t2=a(0x22efab6f7),t4=a(0x7441941c),t5=a(0x1632f6a87),t3=a(0x174f9c45c),t6=a(0x1380694ee),t8=a(0x83f48212),t7=a(0x14149c126);function ChannelSectionHeading({sidebarListRowKey:e,channelSection:t,channelIds:a=tJ.Ml,channelSectionReadHiddenChannels:n=tJ.Ml,channelSectionMutedHiddenChannels:r=tJ.Ml,channelSectionUnreadWithNoMentionsHiddenChannels:l=tJ.Ml,channelSectionHasAllMutedHiddenChannels:o=!1,rowPosition:s,priorDisplayedChannelSectionId:c,finalDisplayedChannelSectionId:m,unreadsOnlyPromptCoachmarkRef:u,onChannelSectionCollapseToggle:p=tZ.A,sidebarSections:h=tJ.t0,isFirstVisibleSection:_=!1,getContextMenuTemplateForSectionHeading:f,addedUserGroupSectionCoachmarkSectionId:b,ensureItemInView:g,isFocused:y=!1,starredChannelSectionBadgeResult:A,isCollapsed:E}){let C=(0,x.wA)(),k=(0,ez.A)(),v=(0,d.d4)(e=>(0,t5.v2)(e,t)),S=(0,d.d4)(t6.Ou),I=(0,d.d4)(t3.l),T=(0,d.d4)(e=>"on"===(0,t7._Z)(e,"improve_mute_pref")),N=(0,d.d4)(e=>t.type===te.VZ.SalesforceRecords&&(0,t8.CZ)(e)),{transitionFocusTo:M}=(0,tX.Gx)(),{connectDropTarget:R,channelDropIndicatorAbove:P,channelDropIndicatorSides:L,channelDropIndicatorBelow:O,channelSectionDropIndicatorAbove:D,channelSectionDropIndicatorBelow:F,channelDropIneligible:U}=(0,w.A)({rowPosition:s,priorDisplayedChannelSectionId:c,finalDisplayedChannelSectionId:m,channelSection:t}),B=(0,i.useRef)(null),H=t.type===te.VZ.Stars&&I&&!a.length,[,W,V]=(0,ti.i)(()=>({type:tu.Pz,item:()=>(C((0,tp.OC)({channelSectionId:t?.id,isAfter:!1})),{type:tu.Pz,boundingClientRect:B.current?.getBoundingClientRect(),channelSection:t}),end:()=>{C((0,tp.OC)({channelSectionId:void 0,isAfter:!1}))},canDrag:()=>(0,t4.$x)(t)&&!H}),[C,t,H]),G=(0,i.useCallback)(e=>{B.current=e,R(e),W(e)},[B,R,W]),q=t?.id,j=t.type===te.VZ.Standard?q:t.type,z=(0,i.useMemo)(()=>h[t.id]?.dormantHiddenChannelsOrdered||[],[h,t.id]),K=(0,i.useMemo)(()=>h[t.id]?.channelSectionSidebarBehavior,[h,t.id]),renderSection=(s={})=>i.createElement(t0.A,{sidebarListRowKey:e,emoji:t.type===te.VZ.SalesforceRecords?"":t.emoji,label:v,qaLabel:j,channelSection:t,channelIds:a,channelSectionHasAllMutedHiddenChannels:o,connectDragDropRef:G,connectDragPreview:V,channelDropIndicatorAbove:P,channelDropIndicatorSides:L,channelDropIndicatorBelow:O,channelSectionDropIndicatorAbove:D,channelSectionDropIndicatorBelow:F,channelDropIneligible:U,unreadsOnlyPromptCoachmarkRef:u,onChannelSectionCollapseToggle:p,transitionFocusTo:M,isFirstVisibleSection:_,clogger:k,isEditMode:S,getContextMenuTemplateForSectionHeading:f,isCollapsed:E,addedUserGroupSectionCoachmarkSectionId:b,ensureItemInView:g,isFocused:y,starredChannelSectionBadgeResult:A,experimentImproveMutePrefGroupOn:T,channelSectionReadHiddenChannels:n,channelSectionMutedHiddenChannels:r,channelSectionUnreadWithNoMentionsHiddenChannels:l,dormantHiddenChannelIds:z,showBehavior:K,showSpinner:N,...s});return(0,t2.XJ)(t)?i.createElement(RecordChannelsSidebarSectionLabel,{channelSectionName:v},renderSection):renderSection()}ChannelSectionHeading.displayName="ChannelSectionHeading";let t9=i.memo(ChannelSectionHeading);var ae=a(0x8a97dfc2),at=a(0x138fb0cc6);let aa=new A.Ay("channel_sidebar"),an=(0,at.A)(({channelSectionType:e,keyboardLocale:t,sidebarListRowKey:a})=>{let n=(0,i.useMemo)(()=>{function keysToString(e){return e.map(e=>e.replace("key_","")).join(" ")}switch(e){case te.VZ.Channels:{let e=(0,ae.eE)({keyboardLocale:t});return aa.t("Press {keys} to find or create a channel",{keys:keysToString(e.browse_channels.keys)})}case te.VZ.DirectMessages:{let e=(0,ae.eE)({keyboardLocale:t});return aa.t("Press {keys} to find or create a direct message. Press delete to remove a direct message from the sidebar",{keys:keysToString(e.browse_dms.keys)})}case te.VZ.RecentApps:return aa.t("Press delete to remove messages from an app from the sidebar");default:return}},[e,t]);if(n)return i.createElement("div",{hidden:!0,id:`${a}-description`},n)}),ar=(0,n.DA)()?function(e){let t,a,n,l,o,s,c,d=(0,r.c)(25);d[0]!==e?({ariaOwns:t,channelSection:a,getContextMenuTemplateForSectionHeading:l,sidebarListRowKey:o,...n}=e,d[0]=e,d[1]=t,d[2]=a,d[3]=n,d[4]=l,d[5]=o):(t=d[1],a=d[2],n=d[3],l=d[4],o=d[5]),d[6]!==l||d[7]!==o?(s=()=>l(o),d[6]=l,d[7]=o,d[8]=s):s=d[8];let m=s;if(d[9]!==t||d[10]!==a||d[11]!==n||d[12]!==m||d[13]!==o){let e,r,l;d[15]!==a||d[16]!==n||d[17]!==m||d[18]!==o?(e=i.createElement(t9,{channelSection:a,getContextMenuTemplateForSectionHeading:m,sidebarListRowKey:o,...n}),d[15]=a,d[16]=n,d[17]=m,d[18]=o,d[19]=e):e=d[19],d[20]!==t?(r=i.createElement("div",{role:"group","aria-owns":t}),d[20]=t,d[21]=r):r=d[21],d[22]!==a.type||d[23]!==o?(l=i.createElement(an,{channelSectionType:a.type,sidebarListRowKey:o}),d[22]=a.type,d[23]=o,d[24]=l):l=d[24],c=i.createElement(i.Fragment,null,e,r,l),d[9]=t,d[10]=a,d[11]=n,d[12]=m,d[13]=o,d[14]=c}else c=d[14];return c}:function({ariaOwns:e,channelSection:t,getContextMenuTemplateForSectionHeading:a,sidebarListRowKey:n,...r}){let l=(0,i.useCallback)(()=>a(n),[a,n]);return i.createElement(i.Fragment,null,i.createElement(t9,{channelSection:t,getContextMenuTemplateForSectionHeading:l,sidebarListRowKey:n,...r}),i.createElement("div",{role:"group","aria-owns":e}),i.createElement(an,{channelSectionType:t.type,sidebarListRowKey:n}))};ar.displayName="SectionHeadingRowElement";let SectionHeadingRow=class SectionHeadingRow{"aria-level"=1;role="treeitem";type="sectionHeading";"aria-label";"aria-owns";addedUserGroupSectionCoachmarkSectionId;channelIds;channelSection;channelSectionHasAllMutedHiddenChannels;channelSectionMutedHiddenChannels;channelSectionReadHiddenChannels;channelSectionUnreadWithNoMentionsHiddenChannels;height;id;isCollapsed;isFirstCustomSection;key;sweeperSectionId;constructor(e,{addedUserGroupSectionCoachmarkSectionId:t,"aria-label":a,"aria-owns":n,channelIds:r,channelSection:i,channelSectionHasAllMutedHiddenChannels:l,channelSectionMutedHiddenChannels:o,channelSectionReadHiddenChannels:s,channelSectionUnreadWithNoMentionsHiddenChannels:c,height:d,id:m,isCollapsed:u,isFirstCustomSection:p,sweeperSectionId:h}){this.addedUserGroupSectionCoachmarkSectionId=t,this["aria-label"]=a,this["aria-owns"]=n,this.channelIds=r,this.channelSection=i,this.channelSectionHasAllMutedHiddenChannels=l,this.channelSectionMutedHiddenChannels=o,this.channelSectionReadHiddenChannels=s,this.channelSectionUnreadWithNoMentionsHiddenChannels=c,this.height=d,this.id=m,this.isCollapsed=u,this.isFirstCustomSection=p,this.key=e,this.sweeperSectionId=h}get"aria-expanded"(){return!this.isCollapsed}renderRow({ensureItemInView:e,rowSectionPositioning:t,getContextMenuTemplateForSectionHeading:a,isFocused:n,onChannelSectionCollapseToggle:r,sidebarSections:l,starredChannelSectionBadgeResult:o,unreadsOnlyPromptCoachmarkRef:s}){return i.createElement(ar,{addedUserGroupSectionCoachmarkSectionId:this.addedUserGroupSectionCoachmarkSectionId,ariaOwns:this["aria-owns"],channelIds:this.channelIds,channelSection:this.channelSection,channelSectionHasAllMutedHiddenChannels:this.channelSectionHasAllMutedHiddenChannels,channelSectionMutedHiddenChannels:this.channelSectionMutedHiddenChannels,channelSectionReadHiddenChannels:this.channelSectionReadHiddenChannels,channelSectionUnreadWithNoMentionsHiddenChannels:this.channelSectionUnreadWithNoMentionsHiddenChannels,ensureItemInView:e,finalDisplayedChannelSectionId:t.finalDisplayedChannelSectionId,getContextMenuTemplateForSectionHeading:a,isCollapsed:this.isCollapsed,isFirstVisibleSection:this.isFirstCustomSection,isFocused:n,onChannelSectionCollapseToggle:r,priorDisplayedChannelSectionId:t.priorDisplayedChannelSectionId[this.channelSection.id],rowPosition:t.rowPosition[this.key],sidebarListRowKey:this.key,sidebarSections:l,starredChannelSectionBadgeResult:o,unreadsOnlyPromptCoachmarkRef:s})}};var ai=a(0x1d01572a2),al=a(0x10a7ef9d4),ao=a(0x1e1762e62),as=a(0x1c43f1b91),ac=a(0x22d046920),ad=a(0x1533ecc6c),am=a(0x3e3ee3b1),au=a.n(am);let ap=new A.Ay("search");function YearInReviewLink(){let e,t,a,n=(0,d.d4)(as.X),{getPrimaryView:r}=(0,i.useContext)(eS.A),l=(0,d.d4)(e=>r(e)?.id===p.c.Slackiversary),o=(0,x.wA)(),s=(0,d.d4)(el.V),c=(0,ez.A)(),[m,u]=(0,i.useState)(!1);(0,ai.A)(()=>{c.track(M.EventId.SLACKIVERSARY_SIDEBAR_ITEM,{contexts:{ui_context:{eventId:M.EventId.SLACKIVERSARY_SIDEBAR_ITEM,uiStep:M.UiStep.SLACKIVERSARY_SIDEBAR_ITEM_IMPRESSION,action:M.UiAction.IMPRESSION}}})});let h=(0,i.useCallback)(()=>{u(!0)},[]),_=(0,i.useCallback)(()=>{u(!1)},[]);e=(0,x.wA)(),t=(0,d.d4)(ac.i),(0,d.d4)(ac.Ij),a=(0,d.d4)(as.X),(0,i.useEffect)(()=>{!t&&a&&e((0,ad.y)({reason:"lazy-load-on-demand"}))},[e,t,a]);let f=(0,i.useCallback)(()=>{o((0,ao.i)()),o((0,tb.o)((0,ev.ZF)(p.c.Slackiversary)))},[o]),b=(0,i.useMemo)(()=>i.createElement("div",{className:"flex_shrink_none"},i.createElement(al.h,{autoPlay:!1,hasMouseEntered:m})),[m]);return i.createElement("div",{className:C()(au().yearInReviewLinkContainer,{[au().yearInReviewLinkContainerSelected]:l}),onMouseEnter:h,onMouseLeave:_},i.createElement(P.A,{id:"slack_year_in_review_link",className:au().yearInReviewLink,label:n?ap.t("Your anniversary"):"Your anniversary",icon:b,displayAsBold:!1,isSelected:l,onClick:f,isBBModeEnabled:s}))}YearInReviewLink.displayName="YearInReviewLink";let SlackiversaryRow=class SlackiversaryRow{"aria-level"=2;id=null;role="treeitem";type="slackiversaryLink";height;key;constructor(e,{height:t}){this.height=t,this.key=e}renderRow(){return i.createElement(YearInReviewLink,null)}};let SpacerRow=class SpacerRow{id=null;role=null;type="spacer";height;key;constructor(e,{height:t}={height:12}){this.key=e,this.height=t}renderRow(){}};let ah=new A.Ay("channel_sidebar"),a_=i.createElement(eC.A,{name:"unified-directory",iconLocation:"sidebar"}),af=(0,n.DA)()?e=>{let t,a,n,l,o=(0,r.c)(18),{isDisabled:c}=e,m=(0,x.wA)(),u=(0,d.d4)(el.V),{getPrimaryView:p}=(0,i.useContext)(eS.A);o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement("span",{className:"display_flex align_items_center justify_content_center"},ah.t("Directories")),o[0]=t):t=o[0];let h=t;o[1]!==m||o[2]!==c?(a=e=>{c||m((0,ek.n)({e,navProps:(0,ev.ym)()}))},o[1]=m,o[2]=c,o[3]=a):a=o[3];let _=a;o[4]!==p?(n=e=>p(e)?.id===s.D.UnifiedDirectory,o[4]=p,o[5]=n):n=o[5];let f=(0,d.d4)(n);if(o[6]!==u||o[7]!==c||o[8]!==f||o[9]!==_){let e,t;o[11]!==c?(e=C()("p-channel_sidebar__link p-channel_sidebar__link--page",{"p-channel_sidebar__link--page--disabled":c}),o[11]=c,o[12]=e):e=o[12],o[13]!==u||o[14]!==f||o[15]!==_||o[16]!==e?(t={id:"directories_link",label:h,className:e,icon:a_,onClick:_,isSelected:f,isBBModeEnabled:u},o[13]=u,o[14]=f,o[15]=_,o[16]=e,o[17]=t):t=o[17],l=i.createElement(P.A,t),o[6]=u,o[7]=c,o[8]=f,o[9]=_,o[10]=l}else l=o[10];return l}:({isDisabled:e})=>{let t=(0,x.wA)(),a=(0,d.d4)(el.V),{getPrimaryView:n}=(0,i.useContext)(eS.A),r=(0,i.useMemo)(()=>i.createElement("span",{className:"display_flex align_items_center justify_content_center"},ah.t("Directories")),[]),l=(0,i.useCallback)(a=>{e||t((0,ek.n)({e:a,navProps:(0,ev.ym)()}))},[t,e]),o=(0,d.d4)(e=>n(e)?.id===s.D.UnifiedDirectory);return i.createElement(P.A,{id:"directories_link",label:r,className:C()("p-channel_sidebar__link p-channel_sidebar__link--page",{"p-channel_sidebar__link--page--disabled":e}),icon:a_,onClick:l,isSelected:o,isBBModeEnabled:a})};af.displayName="UnifiedDirectoryRowElement";let UnifiedDirectoryRow=class UnifiedDirectoryRow{"aria-level"=1;id=null;role="treeitem";type="unifiedDirectoryLink";height;isDisabled;key;constructor(e,{height:t,isDisabled:a}){this.height=t,this.isDisabled=a,this.key=e}renderRow(){return i.createElement(af,{isDisabled:this.isDisabled})}};var ab=a(0x14d02d98e);let ag=i.lazy(()=>Promise.resolve().then(a.bind(a,0x12c3e0285)).then(e=>({default:e.OnboardingTasksSidebarMenuLink}))),ay={spaceName:eO.xu.SIDEBAR_MENU_ONBOARDING_TASKS_LINK,notifications:{[eO.ze.ONBOARDING_TASKS_TRIGGER]:{component:ag}}},aA=i.lazy(()=>Promise.resolve().then(a.bind(a,0xa502471e)).then(({SpookySidebarLink:e})=>({default:e}))),ax=i.lazy(()=>Promise.resolve().then(a.bind(a,0xfd432866)).then(({JanuarySidebarLink:e})=>({default:e}))),aE={spaceName:eO.xu.SIDEBAR_MENU_SEASONAL_LINK,notifications:{[eO.ze.SEASONAL_DELIGHT_SIDEBAR_POCKET_GUIDE]:{component:aA},[eO.ze.SEASONAL_DELIGHT_JANUARY]:{component:ax}}};var aC=a(0x1613da56a),ak=a(0xef6c3caa),av=a(0x35945a76);let aS=new A.Ay("channel_sidebar"),aI={drafts:()=>aS.t("Drafts"),starred:()=>aS.t("Starred"),channels:()=>aS.t("Channels"),sharedChannels:()=>aS.t("Shared Channels"),ims:()=>aS.t("Messages"),apps:()=>aS.t("Recent apps"),slack_connect:()=>aS.t("External Connections"),canvases:()=>aS.t("Canvases"),priority:()=>"VIP"},aw="addMoreApps",aT="addMoreChannels",aN="addMoreDM",aM="connectLink",getChannelListRows=({sidebarSectionsOrdered:e=[],visiblePageLinks:t=[],showCrmProvisioningPageRow:a=!1,experimentSlackCrmOnboardingMarchGroupOn:n=!1,showBenefitsPageRow:r=!1,hasSidebarDiscountOffer:i=!1,channelIdForcedVisible:l="",entityForcedVisible:o,isEditMode:s=!1,hasConnectLink:c=!1,canUserSeeInviteModal:d=!1,showProgressiveDisclosureAddChannelsSidebarFlag:m=!1,showProgressiveDisclosureAddTeammatesSidebarFlag:u=!1,showDesktopUpdateBanner:p=!1,desktopUpdateUrgency:h=null,isSidebarPopoutSpaceVisible:_=!1,addedUserGroupSectionCoachmarkSectionId:f=null,sweeperSectionId:b="",isBBModeEnabled:g=!1,showUnifiedDirectory:y=!1,entitiesByChannelSectionId:A={},salesforceListsInSidebarEnabled:x=!1,experimentSidebarVisualUpdatesNuxGroupOn:E=!1,shouldShowEmptyStarredSectionBanner:C=!1,isSlackiversaryLinkVisible:k=!1,isSidebarMenuSeasonalLinkVisible:v=!1,salesforceAppChannelIds:S={},isOnboardingTasksLinkVisible:I=!1,experimentPlugAndPlayGroupOn:w,shouldDisplayCreateNewSectionCTA:T,salesforceRelatedChannelIds:N=[],partyHatEligibleChannelIds:M=[]})=>{let R=parseInt((0,ab.Z)(g),10),P=[new SpacerRow("top-padding-spacer",{height:6})];p&&h&&P.push(new DesktopUpdateRow("desktop-update-section-banner",h),new SpacerRow("desktop-update-section-bottom-spacer")),t.forEach((e,a)=>{let n=E&&0===a;"Vall_threads"===e?P.push(new AllThreadsRow("Vall_threads",{height:R,isDisabled:s,isFirstPageLinkInSidebar:n})):P.push(new PageRow(e,{height:R,id:e,isDisabled:s,isFirstPageLinkInSidebar:n})),g&&(a!==t.length-1||y)&&P.push(new SpacerRow(`BBMPagesLinkSpacer_${e}`))}),y&&P.push(new UnifiedDirectoryRow("unified_directory",{height:R,isDisabled:s})),v&&P.push(new MegaphoneRow("spooky_delight",{"aria-haspopup":"dialog",height:R,megaphoneConfig:aE})),k&&P.push(new SlackiversaryRow("slackiversary_link",{height:R})),I&&P.push(new MegaphoneRow("sidebar_menu_onboarding_tasks_link",{"aria-haspopup":"dialog",height:R,megaphoneConfig:ay})),(t.length>0||y)&&P.push(new DividerRow("pagesDivider"));let L=0,O=!1,D=!1;e.forEach(e=>{let t,r=e.channelSection.id;if((e.channelSection.type===te.VZ.Agents||e.channelSection.type===te.VZ.Priority)&&0===e.channelsOrdered.length&&0===e.readHiddenChannelsOrdered.length)return;let i=e.isCollapsed,p=0,h=e.channelSectionSidebarBehavior===av.Ag,_=e.channelSection?.type===te.VZ.Channels&&!e.isCollapsed&&h,y=(0,ak.m)(e.channelSection?.type)&&!e.isCollapsed&&h,E=y&&e?.channelsOrdered?.length>10,k=y&&(E||d),v=c&&!e.isCollapsed&&e.channelSection?.type===te.VZ.SlackConnect&&h,I=e.channelSection?.type===te.VZ.RecentApps&&!e.isCollapsed&&h;if(e.channelSection){if(!(t=(0,t5.je)(e.channelSection))){let{emoji:a,name:n}=e.channelSection;t=a?`${a} ${n}`:n}}else t=aI[r]();let F=[];!e.isCollapsed&&(F=[...e.channelsOrdered],_&&F.push(aT),k&&F.push(aN),I&&F.push(aw),v&&F.push(aM));let U=P[P.length-1];U&&"spacer"!==U.type&&"divider"!==U.type&&P.push(new SpacerRow(`spacer-sectionHeading-${r}`,{height:10}));let B=`sectionHeading-${r}`,H=e.channelsOrdered.length,W=!O&&e.channelSection.type===te.VZ.Standard&&!(0,t4.lJ)(e.channelSection);W&&(O=!0),!T||D||s||(P.push(new CreateASectionRow("createASection",{channelSection:e.channelSection,height:R,ariaLabel:w?aS.t("Create a section."):""})),P.push(new SpacerRow("create-a-section-spacer",{height:10})),D=!0),P.push(new SectionHeadingRow(B,{addedUserGroupSectionCoachmarkSectionId:r===f?f:void 0,"aria-label":t,"aria-owns":F.join(" "),channelIds:e.isCollapsed?e.channelsAssociatedOrdered:e.channelsOrdered,channelSection:e.channelSection,channelSectionHasAllMutedHiddenChannels:e.hasAllMutedHiddenChannels,channelSectionMutedHiddenChannels:e.mutedHiddenChannelsOrdered,channelSectionReadHiddenChannels:e.readHiddenChannelsOrdered,channelSectionUnreadWithNoMentionsHiddenChannels:e.unreadWithNoMentionsHiddenChannelsOrdered,height:R,id:B,sweeperSectionId:e.channelSection.id===b?b:void 0,isCollapsed:e.isCollapsed,isFirstCustomSection:W})),e.channelSection.type!==te.VZ.Stars||!C||i||s||e?.channelsOrdered?.length!==0||P.push(new EmptyStarredSectionRow("emptyStarredSectionBanner",{channelSection:e.channelSection}));let V=e.channelSection.type===te.VZ.SalesforceRecords,G=[],q=[];if(V&&x){var j;let t,a,n=new Set(N),{salesforceAppChannels:r,otherChannels:i}=(j=e.channelsOrdered.filter(e=>!n.has(e)),t=[],a=[],j.forEach(e=>{S[e]?t.push(e):a.push(e)}),{salesforceAppChannels:t,otherChannels:a});G=r,q=i}if(V&&x&&G.forEach((t,a)=>{e.isCollapsed&&l!==t||P.push(new ChannelRow(t,{channelSection:e.channelSection,height:R,id:t,index:a,sectionChannelIndex:a}))}),x&&(!e.isCollapsed||o)&&(A?.[e.channelSection.id]??[]).forEach((t,a)=>{t.entityType!==th.FN.SalesforceList||e.isCollapsed&&o?.entityId!==t.entityId||P.push(new EntityRow(t.entityId,{channelSection:e.channelSection,entity:t,height:R})),t.entityType!==th.FN.SalesforceRelatedChannel||e.isCollapsed&&o?.entityId!==t.entityId||P.push(new ChannelRow(t.entityId,{channelSection:e.channelSection,id:t.entityId,index:a,sectionChannelIndex:a,height:R}))}),a&&e.channelSection.type===te.VZ.SalesforceRecords){let e=!1,t=!1;for(let a of P)if(a.key===tE&&(e=!0),a.key===tx&&(t=!0),t&&e)break;n&&!e&&P.push(new PageRow(tE,{height:R,id:tE,isDisabled:s,isFirstPageLinkInSidebar:!1})),t||P.push(new PageRow(tx,{height:R,id:tx,isDisabled:s,isFirstPageLinkInSidebar:!1}))}if((V&&x?q:e.channelsOrdered).forEach((t,a)=>{N.includes(t)||(e.isCollapsed&&(l!==t||s||g)||(P.push(new ChannelRow(t,{"aria-level":2,"aria-posinset":a+1,"aria-setsize":H,channelSection:e.channelSection,height:R,id:t,index:L,sectionChannelIndex:p,shouldShowInviterJoinerPartyHat:M.includes(t)})),g&&P.push(new SpacerRow(`BBMChannelSpacer_${t}`))),L+=1,p+=1)}),!s&&_&&P.push(new AddMoreRow(aT,{"aria-haspopup":"menu",channelSection:e.channelSection,contentType:"channel",height:m?2*R:R,showProgressiveDisclosureAddChannelsFlag:m})),!s&&k){let t=e.channelSection.type===te.VZ.DirectMessages?aN:"addMoreMPDMs";P.push(new AddMoreRow(t,{"aria-haspopup":"menu",channelSection:e.channelSection,contentType:"dm",height:u?2*R:R,showDmBrowserInAddMoreDMsLink:E,showInviteModalInAddMoreDMsLink:d,showProgressiveDisclosureAddTeammatesFlag:u}))}!s&&v&&P.push(new AddMoreRow(aM,{channelSection:e.channelSection,contentType:"slack_connect",height:R})),!s&&I&&P.push(new AddMoreRow(aw,{channelSection:e.channelSection,contentType:"app",height:R}))}),r&&P.push(new SpacerRow("benefits-page-spacer",{height:R}),new PageRow(aC.IN,{height:R,id:aC.IN,isDisabled:s,isFirstPageLinkInSidebar:!1})),i&&P.push(new SpacerRow("discount-offer-spacer",{height:R}),new DiscountOfferRow("discountOfferCTA")),P.push(new SpacerRow("spacer-footer",{height:48})),_&&P.push(new SpacerRow("spacer-footer-popout",{height:100}));let F=P.filter(e=>1===e["aria-level"]),U=F.length;return F.forEach((e,t)=>{e["aria-setsize"]=U,e["aria-posinset"]=t+1}),P};var aR=a(0x54536a24),aP=a(0x1cf0d97e1);let aL=(0,aP.Ay)(e=>{let t=(0,t6.VH)(e).find(e=>e.type===te.VZ.SalesforceRecords);return!!t&&(0,m.Lz)(e,t.id).length>0});aL.meta={name:"hasSalesforceRecords",key:"createSelectorHasSalesforceRecords",description:e=>{let t=(0,t6.VH)(e).find(e=>e.type===te.VZ.SalesforceRecords);return!!t&&(0,m.Lz)(e,t.id).length>0}};let aO=(0,aP.Ay)(e=>!(!(0,to.I)(e)||!(0,aR.z)(e,tx)||!(0,t8.CZ)(e)||aL(e)));aO.meta={name:"shouldShowCrmProvisioningPageRow",key:"createSelectorShouldShowCrmProvisioningPageRow",description:e=>!(!(0,to.I)(e)||!(0,aR.z)(e,tx)||!(0,t8.CZ)(e)||aL(e))};var aD=a(0x24938d4c2),aF=a(0x1059ba41d),aU=a(0xca3a8e80),aB=a(0x47a6f20a);let aH=(0,aP.Ay)(e=>{if(!(0,y.Rv)(e))return!1;let t=(0,em.H7)(e);if((0,H.tc)(t)||!(0,K.ty)(e,"channel_join_experience_enabled"))return!1;let a=(0,K.iU)(e);return a?.status==="showing"});aH.meta={name:"getShouldDisplayCreateNewSectionCTA",key:"createSelectorGetShouldDisplayCreateNewSectionCTA",description:e=>{if(!(0,y.Rv)(e))return!1;let t=(0,em.H7)(e);if((0,H.tc)(t)||!(0,K.ty)(e,"channel_join_experience_enabled"))return!1;let a=(0,K.iU)(e);return a?.status==="showing"}};var aW=a(0x1ee041c21);let isSidebarPopoutSpaceShowing=e=>(0,tH.Hp)(e,eO.xu.SIDEBAR_POPOUT)===eO.ze.SIDEBAR_POPOUT_QUESTION_AND_RECOMMENDATION_TIP;var aV=a(0x19dffa924),aG=a(0x7281be31);let aq=(0,n.DA)()?e=>{let t,a,n,p,h,_,f,A,x,E,C,k=(0,r.c)(58),{calculateSidebarSectionsResult:v,addedUserGroupSectionCoachmarkSectionId:S,sweeperSectionId:I,shouldShowEmptyStarredSectionBanner:w}=e,{activeTab:T,getSiblingView:N}=(0,i.useContext)(eS.A),M=(0,d.d4)(aW.zu),R=(0,d.d4)(aG.Fl),P=(0,d.d4)(aB.Lz),L=(0,d.d4)(use_home_channel_sidebar_visible_rows_temp),O=(0,d.d4)(use_home_channel_sidebar_visible_rows_temp2);k[0]!==T?(t=e=>(0,td.F8)(e,{tab:T,container:tc.mq.Primary})?.id,k[0]=T,k[1]=t):t=k[1];let D=(0,d.d4)(t),F=(0,d.d4)(t6.Ou);k[2]!==N||k[3]!==D?(a=e=>g(e,{primaryView:D,getSiblingView:N}),k[2]=N,k[3]=D,k[4]=a):a=k[4];let U=(0,d.d4)(a),B=null!==(0,d.d4)(e0.Mu),H=(0,d.d4)(e0.$K);k[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,aF.NjF)(),k[5]=n):n=k[5];let W=n;k[6]!==H||k[7]!==B?(p=(0,aF.g9M)()&&B&&W===aU.zS&&null!==H,k[6]=H,k[7]=B,k[8]=p):p=k[8];let V=p,G=(0,d.d4)(isSidebarPopoutSpaceShowing),q=(0,d.d4)(el.V),j=(0,d.d4)(use_home_channel_sidebar_visible_rows_temp3)||D===s.D.UnifiedDirectory,z=(0,d.d4)(m.r_),K=(0,d.d4)(c.pc),$=(0,d.d4)(y.TO),Y=(0,d.d4)(aD.k),Q=(0,d.d4)(use_home_channel_sidebar_visible_rows_temp4),Z=(0,d.d4)(_temp5),J=(0,d.d4)(y.Rv),X=(0,d.d4)(aH),ee=(0,d.d4)(ac.s5),et=Y&&Q?.notificationName===eO.ze.SEASONAL_DELIGHT_SIDEBAR_POCKET_GUIDE||Z&&Q?.notificationName===eO.ze.SEASONAL_DELIGHT_JANUARY,ea=(0,d.d4)(b.a),{sidebarSections:en,sidebarSectionsOrdered:er,sidebarSummary:ei,mutedChannels:eo,unreadChannels:es,channelBadgeCount:ec,salesforceRelatedChannelIds:ed}=v,em=(0,d.d4)(_temp6);e:{if(!em){h=new Set;break e}h=new Set(Object.values(en).reduce(_temp7,[]))}let eu=h;t:{if(!em){_=D;break t}_=D&&eu.has(D)?D:void 0}let ep=_;k[9]!==D||k[10]!==en?(f={sidebarSections:en,primaryView:D},k[9]=D,k[10]=en,k[11]=f):f=k[11];let eh=u(f);k[12]!==K||k[13]!==en?(A=e=>{if(!K)return{};let t={},a=(0,t6.VH)(e).find(_temp8);if(!a)return{};let n=en[a.id];return n?.channelsOrdered&&n.channelsOrdered.forEach(a=>{(0,l.Y)(e,a)&&(t[a]=!0)}),t},k[12]=K,k[13]=en,k[14]=A):A=k[14];let e_=(0,d.Z2)(A);k[15]!==en?(x=e=>{let t=[],a=(0,t6.VH)(e).find(_temp9);if(!a)return[];let n=en[a.id];return n?.channelsOrdered&&n.channelsOrdered.forEach(a=>{(0,aV.Kr)(e,a)&&t.push(a)}),t},k[15]=en,k[16]=x):x=k[16];let ef=(0,d.Z2)(x),eb=(0,d.d4)(_temp0),eg=(0,d.d4)(aO),ey=(0,d.d4)(o.qq);k[17]!==S||k[18]!==P||k[19]!==ep||k[20]!==H||k[21]!==z||k[22]!==eh||k[23]!==J||k[24]!==$||k[25]!==ey||k[26]!==R||k[27]!==M||k[28]!==q||k[29]!==F||k[30]!==ea||k[31]!==et||k[32]!==G||k[33]!==ee||k[34]!==ef||k[35]!==e_||k[36]!==K||k[37]!==ed||k[38]!==X||k[39]!==w||k[40]!==eb||k[41]!==eg||k[42]!==V||k[43]!==O||k[44]!==L||k[45]!==j||k[46]!==er||k[47]!==I||k[48]!==U?(E=getChannelListRows({visiblePageLinks:U,sidebarSectionsOrdered:er,hasConnectLink:R,canUserSeeInviteModal:P,showProgressiveDisclosureAddChannelsSidebarFlag:O,showProgressiveDisclosureAddTeammatesSidebarFlag:L,showCrmProvisioningPageRow:eg,experimentSlackCrmOnboardingMarchGroupOn:ey,showBenefitsPageRow:eb,hasSidebarDiscountOffer:M,channelIdForcedVisible:ep,entityForcedVisible:eh,isEditMode:F,showDesktopUpdateBanner:V,desktopUpdateUrgency:H,isSidebarPopoutSpaceVisible:G,addedUserGroupSectionCoachmarkSectionId:S,sweeperSectionId:I,isBBModeEnabled:q,showUnifiedDirectory:j,entitiesByChannelSectionId:z,salesforceListsInSidebarEnabled:K,experimentSidebarVisualUpdatesNuxGroupOn:$,shouldShowEmptyStarredSectionBanner:w,isSlackiversaryLinkVisible:ee,isSidebarMenuSeasonalLinkVisible:et,salesforceAppChannelIds:e_,isOnboardingTasksLinkVisible:ea,experimentPlugAndPlayGroupOn:J,shouldDisplayCreateNewSectionCTA:X,salesforceRelatedChannelIds:ed,partyHatEligibleChannelIds:ef}),k[17]=S,k[18]=P,k[19]=ep,k[20]=H,k[21]=z,k[22]=eh,k[23]=J,k[24]=$,k[25]=ey,k[26]=R,k[27]=M,k[28]=q,k[29]=F,k[30]=ea,k[31]=et,k[32]=G,k[33]=ee,k[34]=ef,k[35]=e_,k[36]=K,k[37]=ed,k[38]=X,k[39]=w,k[40]=eb,k[41]=eg,k[42]=V,k[43]=O,k[44]=L,k[45]=j,k[46]=er,k[47]=I,k[48]=U,k[49]=E):E=k[49];let eA=E;return k[50]!==ec||k[51]!==eh||k[52]!==eo||k[53]!==eA||k[54]!==en||k[55]!==ei||k[56]!==es?(C={rows:eA,sidebarSummary:ei,mutedChannels:eo,unreadChannels:es,channelBadgeCount:ec,sidebarSections:en,entityForcedVisible:eh},k[50]=ec,k[51]=eh,k[52]=eo,k[53]=eA,k[54]=en,k[55]=ei,k[56]=es,k[57]=C):C=k[57],C}:({calculateSidebarSectionsResult:e,addedUserGroupSectionCoachmarkSectionId:t,sweeperSectionId:a,shouldShowEmptyStarredSectionBanner:n})=>{let{activeTab:r,getSiblingView:p}=(0,i.useContext)(eS.A),h=(0,d.d4)(aW.zu),_=(0,d.d4)(aG.Fl),f=(0,d.d4)(aB.Lz),A=(0,d.d4)(e=>(0,es.jv)(e,{tip:ec.ml.AddTeammates})),x=(0,d.d4)(e=>(0,es.jv)(e,{tip:ec.ml.AddChannels})),E=(0,d.d4)((0,i.useCallback)(e=>(0,td.F8)(e,{tab:r,container:tc.mq.Primary})?.id,[r])),C=(0,d.d4)(t6.Ou),k=(0,d.d4)((0,i.useCallback)(e=>g(e,{primaryView:E,getSiblingView:p}),[E,p])),v=null!==(0,d.d4)(e0.Mu),S=(0,d.d4)(e0.$K),I=(0,aF.NjF)(),w=(0,aF.g9M)()&&v&&I===aU.zS&&null!==S,T=(0,d.d4)(isSidebarPopoutSpaceShowing),N=(0,d.d4)(el.V),M=(0,d.d4)(e=>(0,K.ty)(e,"enable_unified_directory_view"))||E===s.D.UnifiedDirectory,R=(0,d.d4)(m.r_),P=(0,d.d4)(c.pc),L=(0,d.d4)(y.TO),O=(0,d.d4)(aD.k),D=(0,d.d4)(e=>(0,tH._7)(e,eO.xu.SIDEBAR_MENU_SEASONAL_LINK)),F=(0,d.d4)(e=>"treatment"===(0,t7._Z)(e,"seasonal_delight_january")),U=(0,d.d4)(y.Rv),B=(0,d.d4)(aH),H=(0,d.d4)(ac.s5),W=O&&D?.notificationName===eO.ze.SEASONAL_DELIGHT_SIDEBAR_POCKET_GUIDE||F&&D?.notificationName===eO.ze.SEASONAL_DELIGHT_JANUARY,V=(0,d.d4)(b.a),{sidebarSections:G,sidebarSectionsOrdered:q,sidebarSummary:j,mutedChannels:z,unreadChannels:$,channelBadgeCount:Y,salesforceRelatedChannelIds:Q}=e,Z=(0,d.d4)(e=>"treatment"===(0,t7._Z)(e,"reduce_sidebar_rows_invalidations")),J=(0,i.useMemo)(function(){return Z?new Set(Object.values(G).reduce((e,t)=>t.isCollapsed?e.concat(t.channelsAssociatedOrdered):e,[])):new Set},[G,Z]),X=(0,i.useMemo)(function(){return Z?E&&J.has(E)?E:void 0:E},[J,E,Z]),ee=u({sidebarSections:G,primaryView:E}),et=(0,d.Z2)(e=>{if(!P)return{};let t={},a=(0,t6.VH)(e).find(e=>e.type===te.VZ.SalesforceRecords);if(!a)return{};let n=G[a.id];return n?.channelsOrdered&&n.channelsOrdered.forEach(a=>{(0,l.Y)(e,a)&&(t[a]=!0)}),t}),ea=(0,d.Z2)(e=>{let t=[],a=(0,t6.VH)(e).find(e=>e.type===te.VZ.DirectMessages);if(!a)return[];let n=G[a.id];return n?.channelsOrdered&&n.channelsOrdered.forEach(a=>{(0,aV.Kr)(e,a)&&t.push(a)}),t}),en=(0,d.d4)(e=>!!(0,aR.z)(e,aC.IN)&&!!(0,aW.oA)(e)),er=(0,d.d4)(aO),ei=(0,d.d4)(o.qq);return{rows:(0,i.useMemo)(()=>getChannelListRows({visiblePageLinks:k,sidebarSectionsOrdered:q,hasConnectLink:_,canUserSeeInviteModal:f,showProgressiveDisclosureAddChannelsSidebarFlag:x,showProgressiveDisclosureAddTeammatesSidebarFlag:A,showCrmProvisioningPageRow:er,experimentSlackCrmOnboardingMarchGroupOn:ei,showBenefitsPageRow:en,hasSidebarDiscountOffer:h,channelIdForcedVisible:X,entityForcedVisible:ee,isEditMode:C,showDesktopUpdateBanner:w,desktopUpdateUrgency:S,isSidebarPopoutSpaceVisible:T,addedUserGroupSectionCoachmarkSectionId:t,sweeperSectionId:a,isBBModeEnabled:N,showUnifiedDirectory:M,entitiesByChannelSectionId:R,salesforceListsInSidebarEnabled:P,experimentSidebarVisualUpdatesNuxGroupOn:L,shouldShowEmptyStarredSectionBanner:n,isSlackiversaryLinkVisible:H,isSidebarMenuSeasonalLinkVisible:W,salesforceAppChannelIds:et,isOnboardingTasksLinkVisible:V,experimentPlugAndPlayGroupOn:U,shouldDisplayCreateNewSectionCTA:B,salesforceRelatedChannelIds:Q,partyHatEligibleChannelIds:ea}),[k,q,_,f,x,A,er,ei,en,h,X,ee,C,w,S,T,t,a,N,M,R,P,L,n,H,W,et,V,U,B,Q,ea]),sidebarSummary:j,mutedChannels:z,unreadChannels:$,channelBadgeCount:Y,sidebarSections:G,entityForcedVisible:ee}};function use_home_channel_sidebar_visible_rows_temp(e){return(0,es.jv)(e,{tip:ec.ml.AddTeammates})}function use_home_channel_sidebar_visible_rows_temp2(e){return(0,es.jv)(e,{tip:ec.ml.AddChannels})}function use_home_channel_sidebar_visible_rows_temp3(e){return(0,K.ty)(e,"enable_unified_directory_view")}function use_home_channel_sidebar_visible_rows_temp4(e){return(0,tH._7)(e,eO.xu.SIDEBAR_MENU_SEASONAL_LINK)}function _temp5(e){return"treatment"===(0,t7._Z)(e,"seasonal_delight_january")}function _temp6(e){return"treatment"===(0,t7._Z)(e,"reduce_sidebar_rows_invalidations")}function _temp7(e,t){return t.isCollapsed?e.concat(t.channelsAssociatedOrdered):e}function _temp8(e){return e.type===te.VZ.SalesforceRecords}function _temp9(e){return e.type===te.VZ.DirectMessages}function _temp0(e){return!!(0,aR.z)(e,aC.IN)&&!!(0,aW.oA)(e)}},0x9982721:(e,t,a)=>{"use strict";a.d(t,{A:()=>useSidebarDropIndicator});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x9e38a344),l=a(0x18e18e7ac),o=a(0x7f81b930),s=a(0x115aa5ac3),c=a(0x12a9226a0),d=a(0x42a2d0a3),m=a(0x21c135fe1),u=a(0x7441941c),p=a(0x174f9c45c),h=a(0x226892387),_=a(0x1529cf960),f=a(0x1380694ee);function useSidebarDropIndicator({rowPosition:e,priorDisplayedChannelSectionId:t,finalDisplayedChannelSectionId:a,channelSection:b}){let g=(0,r.wA)(),y=(0,h.d4)(f.Hj),A=(0,h.d4)(f.Cy),x=(0,h.d4)(p.l),E=b?.type===s.Ri.Stars&&x,C=b&&a===b.id,k=e&&e.position===l.y.Middle,v=e&&e.position===l.y.TopHalf,S=e&&e.position===l.y.BottomHalf,I=!!(e&&e.isFirstInSection),w=!!(e&&e.isLastInSection),T=b&&y?.channelSectionId===b.id,N=I&&b&&(A?.channelSectionId===b?.id&&!A?.isAfter||A?.channelSectionId===t&&A?.isAfter),M=C&&w&&b&&A?.channelSectionId===b?.id&&A?.isAfter,R=(0,n.useRef)(null),[P,L]=(0,n.useState)(void 0),O=(0,n.useRef)(void 0),[{dragIsOverDropTarget:D,dragItem:F,dragItemType:U},B]=(0,i.H)(()=>({accept:[o.XV,o.Pz,o.IC],collect:e=>({dragItemType:e.getItemType(),dragItem:e.getItem(),dragIsOverDropTarget:e.isOver()}),hover:(e,t)=>{O.current||(O.current=requestAnimationFrame(()=>{if(O.current=void 0,e.type===o.Pz&&k&&R.current){let e=R.current.getBoundingClientRect(),a=t.getClientOffset(),n=a&&a.y>=e.top&&a.y<e.top+e.height;L(a&&n?a.y<e.top+e.height/2:void 0)}}))}}),[k,L,O]),H=(0,n.useCallback)(e=>(R.current=e,B(e)),[R,B]),W=U===o.XV,V=U===o.Pz,G=U===o.IC;(0,n.useEffect)(()=>{b&&D&&(W||G)&&!T&&g((0,_.di)({channelSectionId:b.id}))},[g,D,W,G,T,b,E]),(0,n.useEffect)(()=>{b&&D&&V&&(0,u.$x)(b)&&!E&&((k?!0===P:v)&&A&&(A.channelSectionId!==b.id||!1!==A.isAfter)&&g((0,_.OC)({channelSectionId:b.id,isAfter:!1})),(k?!1===P:S)&&A&&(A.channelSectionId!==b.id||!0!==A.isAfter)&&g((0,_.OC)({channelSectionId:b.id,isAfter:!0})))},[g,D,V,k,v,S,P,b,A,E]);let q=b&&W&&F.channelSidebarItems.some(e=>(0,d.V)(e.channel)&&(0,m.r)(e,b)),j=q&&T,z=b&&G&&F.row.entity&&(0,c.p)(F.row.entity,b.type),K=z&&T;return{connectDropTarget:H,channelDropIndicatorAbove:(j||K)&&I,channelDropIndicatorSides:j||K,channelDropIndicatorBelow:(j||K)&&w,channelDropIneligible:(W||G)&&!q&&!z,channelSectionDropIndicatorAbove:!!(V&&N),channelSectionDropIndicatorBelow:!!(V&&M)}}},0x1c87b2410:(e,t,a)=>{"use strict";a.d(t,{Q:()=>u});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x18def662b),s=a(0x226892387),c=a(0xb9604b6),d=a(0x198572436);let m="starred_section_new_badge",u=(0,n.DA)()?e=>{let t,a,n=(0,r.c)(10),{shouldShowEmptyStarredSectionBanner:c}=e,u=(0,l.wA)(),[p,h]=(0,i.useState)(!1),_=(0,s.d4)(o.Zg),f=(0,s.d4)(_temp);n[0]!==u?(t=()=>{h(!0),setTimeout(()=>{u((0,d.J)({badgeName:m}))},500)},n[0]=u,n[1]=t):t=n[1];let b=t;e:{let e;if(!_){a=null;break e}if(!c){let e;n[2]!==b?(e={shouldShowBadge:!1,shouldForceSectionCollapsed:!1,onBadgeClick:b},n[2]=b,n[3]=e):e=n[3],a=e;break e}if(!f){let e;n[4]!==b?(e={shouldShowBadge:!1,shouldForceSectionCollapsed:!1,onBadgeClick:b},n[4]=b,n[5]=e):e=n[5],a=e;break e}if(f&&p){let e;n[6]!==b?(e={shouldShowBadge:!0,shouldForceSectionCollapsed:!1,onBadgeClick:b},n[6]=b,n[7]=e):e=n[7],a=e;break e}n[8]!==b?(e={shouldShowBadge:!0,shouldForceSectionCollapsed:!0,onBadgeClick:b},n[8]=b,n[9]=e):e=n[9],a=e}return a}:({shouldShowEmptyStarredSectionBanner:e})=>{let t=(0,l.wA)(),[a,n]=(0,i.useState)(!1),r=(0,s.d4)(o.Zg),u=(0,s.d4)(e=>(0,c.ap)(e,m)),p=(0,i.useCallback)(()=>{n(!0),setTimeout(()=>{t((0,d.J)({badgeName:m}))},500)},[t]);return(0,i.useMemo)(()=>r?e&&u?u&&a?{shouldShowBadge:!0,shouldForceSectionCollapsed:!1,onBadgeClick:p}:{shouldShowBadge:!0,shouldForceSectionCollapsed:!0,onBadgeClick:p}:{shouldShowBadge:!1,shouldForceSectionCollapsed:!1,onBadgeClick:p}:null,[r,p,a,u,e])};function _temp(e){return(0,c.ap)(e,m)}},0x21057f35f:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MutedChannelsReactiveCoachmark:()=>P});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x14fad6485),s=a(0x20482ad21),c=a(0xb90de824),d=a(0x13953efe6),m=a(0x1f2082e6f),u=a(0x1c87b2410),p=a(0x1cf0d97e1),h=a(0xb9604b6),_=a(0x5b1935a6);let f=(0,p.Ay)(e=>{let t=(0,h.OL)(e,_.xu.IN_PRODUCT_COACHMARK);return t?.type});f.meta={name:"getEducationMutedChannelCoachmarkType",key:"createSelectorGetEducationMutedChannelCoachmarkType",description:e=>{let t=(0,h.OL)(e,_.xu.IN_PRODUCT_COACHMARK);return t?.type}};var b=a(0x3989021c),g=a(0x218842a12),y=a(0x3711e82d),A=a(0x585fc7f8),x=a(0x174f9c45c),E=a(0x12f41fc32),C=a(0x226892387),k=a(0x24b37e04d),v=a(0x14149c126),S=a(0x20061cab9),I=a(0xf3c65e54),w=a(0x1472af90a),T=a(0x18632f75a);let N=new s.Ay("channel_sidebar"),M=g.g.EDUCATION_HIDE_MUTED_CHANNELS_COACHMARK,R={uiComponentName:y.UiComponentName.MUTED_CHANNELS_REACTIVE_COACHMARK},P=(0,n.DA)()?e=>{let t,a,n,s,p,h,g,y,v,P,L,O,D=(0,r.c)(34),{children:F,channelSectionId:U}=e,B=(0,l.wA)(),H=(0,C.d4)(x.l);D[0]!==H?(t={shouldShowEmptyStarredSectionBanner:H},D[0]=H,D[1]=t):t=D[1];let W=(0,u.Q)(t),V=W?.shouldForceSectionCollapsed??!1;D[2]!==V?(a={shouldForceStarredSectionCollapsed:V},D[2]=V,D[3]=a):a=D[3];let G=(0,m.k)(a);D[4]!==G?(n=e=>(0,A.T)(e,G),D[4]=G,D[5]=n):n=D[5];let q=(0,C.d4)(n),{windowRef:j}=(0,i.useContext)(o._0),{isOpen:z,closeCoachmark:K}=(0,b.A)(M,_.xu.IN_PRODUCT_COACHMARK),$=(0,C.d4)(_temp),Y="channel_muted"===(0,C.d4)(f);D[6]!==B?(s=()=>{B((0,I.A)({notificationName:M,action:_.hw.IMPRESSION})),B((0,T.z)({component:w.G7.MutedChannelsReactiveCoachmark,type:w.X8.Impression,reason:"MUTED_CHANNELS_REACTIVE_COACHMARK"}))},p=[B],D[6]=B,D[7]=s,D[8]=p):(s=D[7],p=D[8]),(0,i.useEffect)(s,p),D[9]!==U||D[10]!==K||D[11]!==B?(h=()=>{B((0,E.AZ)({pref:"show_muted_items_outside_sidebar_menus",value:!1})),B((0,k.Bt)({shouldShow:!0,channelSectionId:U})),K()},D[9]=U,D[10]=K,D[11]=B,D[12]=h):h=D[12];let Q=h;D[13]!==K||D[14]!==B?(g=()=>{K(),B((0,k.Bv)(!0)),B((0,S.Ay)({spaceName:_.xu.IN_PRODUCT_COACHMARK,action:_.hw.DISMISS}))},D[13]=K,D[14]=B,D[15]=g):g=D[15];let Z=g;D[16]===Symbol.for("react.memo_cache_sentinel")?(y=N.t("Want to hide muted channels?"),D[16]=y):y=D[16];let J=y;D[17]!==q?(v=N.rt("Clear out the clutter and hide {numMutedChannels} {numMutedChannels, plural, =1 {muted channel} other {muted channels}} from view. They\u2019ll only pop up again if someone mentions you.",{numMutedChannels:q}),D[17]=q,D[18]=v):v=D[18];let X=v;D[19]!==j?(P=e=>{j.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},D[19]=j,D[20]=P):P=D[20];let ee=P;if(D[21]!==Z||D[22]!==Q||D[23]!==X||D[24]!==z||D[25]!==ee){let e,t;D[27]===Symbol.for("react.memo_cache_sentinel")?(e=N.t("Hide Muted Channels"),D[27]=e):e=D[27],D[28]===Symbol.for("react.memo_cache_sentinel")?(t=N.t("No Thanks"),D[28]=t):t=D[28],L=i.createElement(c.Ay,{autoClogProps:R,isOpen:z,title:J,bodyText:X,closeCoachmark:Z,icon:"notifications-off",primaryCallToActionText:e,onClickPrimaryButton:Q,secondaryCallToActionText:t,onClickSecondaryButton:Z,width:323,onAfterOpen:ee,offsetX:-3,offsetY:4,alignActionsRight:!0}),D[21]=Z,D[22]=Q,D[23]=X,D[24]=z,D[25]=ee,D[26]=L}else L=D[26];let et=L;if(!$||!Y)return F;if(D[29]!==F||D[30]!==et){let e;D[32]!==et?(e={coachmarkElement:et,orientation:"right"},D[32]=et,D[33]=e):e=D[33],O=i.createElement(d.Ay,e,F),D[29]=F,D[30]=et,D[31]=O}else O=D[31];return O}:({children:e,channelSectionId:t})=>{let a=(0,l.wA)(),n=(0,C.d4)(x.l),r=(0,u.Q)({shouldShowEmptyStarredSectionBanner:n}),s=(0,m.k)({shouldForceStarredSectionCollapsed:r?.shouldForceSectionCollapsed??!1}),p=(0,C.d4)(e=>(0,A.T)(e,s)),{windowRef:h}=(0,i.useContext)(o._0),{isOpen:g,closeCoachmark:y}=(0,b.A)(M,_.xu.IN_PRODUCT_COACHMARK),P=(0,C.d4)(e=>"on"===(0,v._Z)(e,"improve_mute_pref")),L="channel_muted"===(0,C.d4)(f);(0,i.useEffect)(()=>{a((0,I.A)({notificationName:M,action:_.hw.IMPRESSION})),a((0,T.z)({component:w.G7.MutedChannelsReactiveCoachmark,type:w.X8.Impression,reason:"MUTED_CHANNELS_REACTIVE_COACHMARK"}))},[a]);let O=(0,i.useCallback)(()=>{a((0,E.AZ)({pref:"show_muted_items_outside_sidebar_menus",value:!1})),a((0,k.Bt)({shouldShow:!0,channelSectionId:t})),y()},[a,t,y]),D=(0,i.useCallback)(()=>{y(),a((0,k.Bv)(!0)),a((0,S.Ay)({spaceName:_.xu.IN_PRODUCT_COACHMARK,action:_.hw.DISMISS}))},[a,y]),F=N.t("Want to hide muted channels?"),U=N.rt("Clear out the clutter and hide {numMutedChannels} {numMutedChannels, plural, =1 {muted channel} other {muted channels}} from view. They\u2019ll only pop up again if someone mentions you.",{numMutedChannels:p}),B=(0,i.useCallback)(e=>{h.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},[h]),H=(0,i.useMemo)(()=>i.createElement(c.Ay,{autoClogProps:R,isOpen:g,title:F,bodyText:U,closeCoachmark:D,icon:"notifications-off",primaryCallToActionText:N.t("Hide Muted Channels"),onClickPrimaryButton:O,secondaryCallToActionText:N.t("No Thanks"),onClickSecondaryButton:D,width:323,onAfterOpen:B,offsetX:-3,offsetY:4,alignActionsRight:!0}),[g,F,U,D,O,B]);return P&&L?i.createElement(d.Ay,{coachmarkElement:H,orientation:"right"},e):e};function _temp(e){return"on"===(0,v._Z)(e,"improve_mute_pref")}P.displayName="MutedChannelsReactiveCoachmark"},0x1e46ae87a:(e,t,a)=>{"use strict";a.d(t,{B0:()=>getChannelNotifySettingLabel,Km:()=>getChannelNotifySettingIcon,NO:()=>getMentionsDescriptionText,Nl:()=>getChannelHeaderIconButtonIcon,g2:()=>buildNotificationPrefs,oI:()=>getEveryMessageDescriptionText,pA:()=>getChannelNotifySetting,qV:()=>l,tz:()=>getChannelNotificationModalSubtext});var n=a(0x20482ad21),r=a(0xc677a6f6);let i=new n.Ay("channel_sidebar"),getEveryMessageDescriptionText=()=>i.t("Messages and threads you follow"),getMentionsDescriptionText=e=>e?i.t("@you"):i.t("@you, @channel, @here"),getChannelNotifySetting=e=>{switch(e){case r.P$.Everything:return r.P$.Everything;case r.P$.Mentions:return r.P$.Mentions;case r.P$.Nothing:return r.P$.Nothing;default:return r.P$.Mentions}},getChannelNotifySettingLabel=(e,t=!1,a=!1)=>{if(t)return i.t("Muted");switch(e){case r.P$.Everything:return a?i.t("Everything",{fallbackHash:"b36ed0cba675b2e2503fff81bd986e98cfffc03f"}):i.t("All new posts");case r.P$.Mentions:return a?i.t("Mentions and direct messages",{fallbackHash:"7684c075cf97d65fb7a3e2c908c9406f403838c9"}):i.t("Just mentions");case r.P$.Nothing:return i.t("Nothing");default:return i.t("Unknown setting")}},getChannelNotificationModalSubtext=(e,t=!1)=>{if(t)return i.t("Notifications are muted",{fallbackHash:"b9e78ced88a4641f8289a36049516182b46cf836"});switch(e){case r.P$.Everything:return i.t("Notifications set to all new posts",{fallbackHash:"b36ed0cba675b2e2503fff81bd986e98cfffc03f"});case r.P$.Mentions:return i.t("Notifications set to just mentions",{fallbackHash:"7684c075cf97d65fb7a3e2c908c9406f403838c9"});case r.P$.Nothing:return i.t("Notifications set to nothing",{fallbackHash:"4481948392a8846400c954e77f58d76cdaa73963"});default:return i.t("Unknown setting")}},getChannelNotifySettingIcon=(e,t=!1)=>{if(t)return"notifications-off";switch(e){case r.P$.Everything:return"notifications-all-new-posts";case r.P$.Mentions:return"notifications";case r.P$.Nothing:return"notifications-off";default:return"notifications"}},getChannelHeaderIconButtonIcon=(e,t=!1)=>{if(t)return"notifications-off";switch(e){case r.P$.Everything:return"notifications-all-new-posts";case r.P$.Mentions:return"notifications";case r.P$.Nothing:return"notifications-off";default:return"notifications"}},buildNotificationPrefs=(e,t,a)=>{let n=[{name:r.o7.Primary,value:e.desktop,sync:!a}];if(t){let t;return[...n,...(t=[],void 0!==e.followAllThreads&&t.push({name:r.o7.FollowAllThreads,value:e.followAllThreads.toString()}),void 0!==e.suppressAtChannel&&t.push({name:r.o7.SuppressAtChannel,value:e.suppressAtChannel.toString()}),void 0!==e.badgeAllUnreads&&t.push({name:r.o7.BadgeAllUnreads,value:e.badgeAllUnreads.toString()}),t)]}return n},l={EVERYTHING:{desktop:r.P$.Everything,followAllThreads:!1,suppressAtChannel:void 0,badgeAllUnreads:!1},MENTIONS:{desktop:r.P$.Mentions,followAllThreads:!1,suppressAtChannel:!1,badgeAllUnreads:void 0},NOTHING:{desktop:r.P$.Nothing,followAllThreads:void 0,suppressAtChannel:void 0,badgeAllUnreads:void 0}}},0x1212ff273:(e,t,a)=>{"use strict";a.d(t,{A:()=>K});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x20b4dda68),c=a(0x4c96e5d9),d=a(0x29f0e1ee),m=a(0xa2cd8b62),u=a(0x252e80b0),p=a(0x20482ad21),h=a(0x1e5781b84),_=a(0x226892387),f=a(0xb129c1d5);let b=new p.Ay("channel_sidebar"),g=(0,n.DA)()?function(e){let t,a,n=(0,r.c)(19),{userId:l,isYou:o,shouldShowInviterText:s,isGuestMember:c,externalOrgNameForMember:d}=e;if(n[0]!==l?(t=e=>(0,f.a)(e,l),n[0]=l,n[1]=t):t=n[1],(0,_.d4)(t)){let e;return n[2]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(i.Fragment,null,b.t("Name hidden")),n[2]=e):e=n[2],e}if(n[3]!==d||n[4]!==c||n[5]!==o||n[6]!==s||n[7]!==l){let e,t,r,m,u;n[9]!==l?(e=i.createElement(h.A,{id:l}),n[9]=l,n[10]=e):e=n[10],n[11]!==o?(t=o&&i.createElement("span",{className:"p-channel_sidebar__member_label","data-qa":"channel_sidebar_name_you"},b.t("you")),n[11]=o,n[12]=t):t=n[12],n[13]!==c?(r=c&&i.createElement("span",{className:"p-channel_sidebar__member_label"},b.t("guest")),n[13]=c,n[14]=r):r=n[14],n[15]!==d?(m=d&&i.createElement("span",{className:"p-channel_sidebar__member_label"},d),n[15]=d,n[16]=m):m=n[16],n[17]!==s?(u=s&&i.createElement("span",{className:"p-channel_sidebar__member_label"},b.t("invited you")),n[17]=s,n[18]=u):u=n[18],a=i.createElement(i.Fragment,null,e,t,r,m,u),n[3]=d,n[4]=c,n[5]=o,n[6]=s,n[7]=l,n[8]=a}else a=n[8];return a}:function({userId:e,isYou:t,shouldShowInviterText:a,isGuestMember:n,externalOrgNameForMember:r}){let l=(0,_.d4)(t=>(0,f.a)(t,e)),o="p-channel_sidebar__member_label";return l?i.createElement(i.Fragment,null,b.t("Name hidden")):i.createElement(i.Fragment,null,i.createElement(h.A,{id:e}),t&&i.createElement("span",{className:o,"data-qa":"channel_sidebar_name_you"},b.t("you")),n&&i.createElement("span",{className:o},b.t("guest")),r&&i.createElement("span",{className:o},r),a&&i.createElement("span",{className:o},b.t("invited you")))};g.displayName="ChannelNameImName";let y=i.memo(g);var A=a(0x1e864b930);function ChannelNameMpimName({members:e}){return e?i.createElement(i.Fragment,null,(0,A.A)(e.map(e=>i.createElement(h.A,{id:e,key:e})),{react:!0,noEscape:!0,noConj:!0})):null}ChannelNameMpimName.displayName="ChannelNameMpimName";let x=i.memo(ChannelNameMpimName);var E=a(0x1fe886fee),C=a(0x1449f5eb),k=a.n(C);function WrapperElement({isTooltip:e,className:t,children:a}){return e?i.createElement("div",{className:t},a):i.createElement("span",{className:t},a)}WrapperElement.displayName="WrapperElement";let v=(0,n.DA)()?function(e){let t,a=(0,r.c)(30),{channelIsIm:n,channelIsMpim:l,displayName:s,userId:c,isYou:d,shouldShowInviterText:p,isGuestMember:h,externalOrgNameForMember:f,members:b,channelTeam:g,isTooltip:A,isUnknown:C,topic:v}=e,S=void 0!==A&&A,I=(0,_.d4)(E.h);if(void 0!==C&&C){let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement(u.A,{showHash:!1,showTooltip:!1}),a[0]=e):e=a[0],e}if(n){let e;return a[1]!==f||a[2]!==h||a[3]!==d||a[4]!==p||a[5]!==c?(e=i.createElement(y,{userId:c,isYou:d,shouldShowInviterText:p,isGuestMember:h,externalOrgNameForMember:f}),a[1]=f,a[2]=h,a[3]=d,a[4]=p,a[5]=c,a[6]=e):e=a[6],e}if(l){let e;if(I&&v){let e;if(a[7]!==S||a[8]!==v){let t,n;a[10]!==S?(t={isTooltip:S},a[10]=S,a[11]=t):t=a[11],a[12]!==v?(n=i.createElement(m.I,{name:v}),a[12]=v,a[13]=n):n=a[13],e=i.createElement(WrapperElement,t,n),a[7]=S,a[8]=v,a[9]=e}else e=a[9];return e}if(a[14]!==b){let t,n=b||void 0;a[16]!==n?(t={members:n},a[16]=n,a[17]=t):t=a[17],e=i.createElement(x,t),a[14]=b,a[15]=e}else e=a[15];return e}if(a[18]!==g||a[19]!==s||a[20]!==S){let e,n;if(a[22]!==s||a[23]!==S){let t;a[25]!==S?(t={isTooltip:S},a[25]=S,a[26]=t):t=a[26],e=i.createElement(WrapperElement,t,s),a[22]=s,a[23]=S,a[24]=e}else e=a[24];a[27]!==g||a[28]!==S?(n=g&&i.createElement(WrapperElement,{className:o()(k().channelTeam,{margin_left_50:!S}),isTooltip:S},g),a[27]=g,a[28]=S,a[29]=n):n=a[29],t=i.createElement(i.Fragment,null,e,n),a[18]=g,a[19]=s,a[20]=S,a[21]=t}else t=a[21];return t}:function({channelIsIm:e,channelIsMpim:t,displayName:a,userId:n,isYou:r,shouldShowInviterText:l,isGuestMember:s,externalOrgNameForMember:c,members:d,channelTeam:p,isTooltip:h=!1,isUnknown:f=!1,topic:b}){let g=(0,_.d4)(E.h);return f?i.createElement(u.A,{showHash:!1,showTooltip:!1}):e?i.createElement(y,{userId:n,isYou:r,shouldShowInviterText:l,isGuestMember:s,externalOrgNameForMember:c}):t?g&&b?i.createElement(WrapperElement,{isTooltip:h},i.createElement(m.I,{name:b})):i.createElement(x,{members:d||void 0}):i.createElement(i.Fragment,null,i.createElement(WrapperElement,{isTooltip:h},a),p&&i.createElement(WrapperElement,{className:o()(k().channelTeam,{margin_left_50:!h}),isTooltip:h},p))};v.displayName="ChannelNameDisplayName";let S=i.memo(v);var I=a(0x163e6b717),w=a(0x2376ea9bb),T=a(0x1cae4d14b),N=a(0x2414d10c6),M=a(0x15f4f83cf),R=a(0x245dcaf6b),P=a(0x16df7a1d3),L=a(0xa1832ae4),O=a(0x217553e42),D=a(0x1ee439e69);let F=new p.Ay("channels"),U=(0,n.DA)()?function(e){let t,a,n,l,o,s,c=(0,r.c)(101),{channelId:d,isTruncated:m,channelDisplay:u}=e;c[0]!==d?(t=e=>(0,O.OL)(e,d),c[0]=d,c[1]=t):t=c[1];let p=(0,_.d4)(t),h=(0,_.d4)(D.H7),f=_temp,b=(0,_.d4)(D.lp);c[2]!==p||c[3]!==h?(a=!!p&&(0,R.sP)(h,p),c[2]=p,c[3]=h,c[4]=a):a=c[4];let g=a;c[5]!==p?(n=e=>(0,N.y)(e,{channel:p}),c[5]=p,c[6]=n):n=c[6];let[y,x]=(0,_.d4)(n);c[7]!==p||c[8]!==h?(l=e=>(0,N.A)(e,{channel:p,team:h}),c[7]=p,c[8]=h,c[9]=l):l=c[9];let[E,C]=(0,_.d4)(l);c[10]!==p?(o=e=>(0,T.l)(e,{channel:p}),c[10]=p,c[11]=o):o=c[11];let k=(0,_.d4)(o),v=k===T.t.None;if(c[12]!==p||c[13]!==u||c[14]!==k||c[15]!==y||c[16]!==E||c[17]!==g||c[18]!==m||c[19]!==x||c[20]!==C||c[21]!==b||c[22]!==v){s=Symbol.for("react.early_return_sentinel");e:{if(v){s=null;break e}let e=k===T.t.OrgShared&&b;if(c[24]!==p||c[25]!==u||c[26]!==k||c[27]!==y||c[28]!==E||c[29]!==g||c[30]!==m||c[31]!==x||c[32]!==C||c[33]!==b||c[34]!==e){if(e){let e=f(b);if((0,P.S)(p)){if(m){s=F.rt("{channelName} was added to all workspaces at {selfEnterpriseName}",{channelName:u,selfEnterpriseName:e});break e}s=F.rt("Added to all workspaces at {selfEnterpriseName}",{selfEnterpriseName:e});break e}switch(C){case 0:break;case 1:if(m){s=F.rt("{channelName} was added to the {workspaceName} workspace at {selfEnterpriseName}",{channelName:u,workspaceName:f(E[0]),selfEnterpriseName:e});break e}s=F.rt("Added to the {workspaceName} workspace at {selfEnterpriseName}",{workspaceName:f(E[0]),selfEnterpriseName:e});break e;case 2:if(m){s=F.rt("{channelName} was added to the {workspaceName1} and {workspaceName2} workspaces at {selfEnterpriseName}",{channelName:u,workspaceName1:f(E[0]),workspaceName2:f(E[1]),selfEnterpriseName:e});break e}s=F.rt("Added to the {workspaceName1} and {workspaceName2} workspaces at {selfEnterpriseName}",{workspaceName1:f(E[0]),workspaceName2:f(E[1]),selfEnterpriseName:e});break e;default:if(m){s=F.rt("{channelName} was added to {workspaceName1}, {workspaceName2}, and {numAdditionalWorkspaces, plural, =1 {# other workspace} other {# other workspaces}} at {selfEnterpriseName}",{channelName:u,workspaceName1:f(E[0]),workspaceName2:f(E[1]),numAdditionalWorkspaces:C-2,selfEnterpriseName:e});break e}s=F.rt("Added to {workspaceName1}, {workspaceName2}, and {numAdditionalWorkspaces, plural, =1 {# other workspace} other {# other workspaces}} at {selfEnterpriseName}",{workspaceName1:f(E[0]),workspaceName2:f(E[1]),numAdditionalWorkspaces:C-2,selfEnterpriseName:e});break e}}if((k===T.t.ExternallyShared||k===T.t.ExternallySharedPending)&&y&&y.length){let e;if(c[35]!==u||c[36]!==y||c[37]!==g||c[38]!==m||c[39]!==x){let t;c[41]===Symbol.for("react.memo_cache_sentinel")?(t=e=>f(e),c[41]=t):t=c[41];let a=(0,A.A)(y.map(t),{noEscape:!0,react:!0});if(g){if(m){s=F.rt('<span className="sk_foreground_high_solid">Waiting for</span> {externalTeamNames} <span className="sk_foreground_high">to\xa0join {channelName}</span>',{channelName:u,externalTeamNames:a});break e}s=F.rt('<span className="sk_foreground_high_solid">Waiting for</span> {externalTeamNames} <span className="sk_foreground_high">to\xa0join</span>',{externalTeamNames:a});break e}if(1===y.length){let e,t;if(c[42]!==y[0]){let t;c[44]===Symbol.for("react.memo_cache_sentinel")?(t={role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},c[44]=t):t=c[44],e=i.createElement("div",t,i.createElement(w.A,{size:20,team:y[0]})),c[42]=y[0],c[43]=e}else e=c[43];c[45]!==u||c[46]!==y[0]||c[47]!==m?(t=m?F.rt("{externalTeamName} is in {channelName}",{externalTeamName:f(y[0]),channelName:u}):F.rt("{externalTeamName} is in this channel",{externalTeamName:f(y[0])}),c[45]=u,c[46]=y[0],c[47]=m,c[48]=t):t=c[48],s=i.createElement("div",null,e,t);break e}if(2===y.length){let e,t;if(c[49]!==y[0]||c[50]!==y[1]){let t,a,n;c[52]===Symbol.for("react.memo_cache_sentinel")?(t={role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},c[52]=t):t=c[52],c[53]!==y[0]?(a=i.createElement(w.A,{size:20,team:y[0]}),c[53]=y[0],c[54]=a):a=c[54],c[55]!==y[1]?(n=i.createElement(w.A,{size:20,team:y[1]}),c[55]=y[1],c[56]=n):n=c[56],e=i.createElement("div",t,a,n),c[49]=y[0],c[50]=y[1],c[51]=e}else e=c[51];c[57]!==u||c[58]!==y[0]||c[59]!==y[1]||c[60]!==m?(t=m?F.rt("{externalTeamName1} and {externalTeamName2} are in {channelName}",{externalTeamName1:f(y[0]),externalTeamName2:f(y[1]),channelName:u}):F.rt("{externalTeamName1} and {externalTeamName2} are in this channel",{externalTeamName1:f(y[0]),externalTeamName2:f(y[1])}),c[57]=u,c[58]=y[0],c[59]=y[1],c[60]=m,c[61]=t):t=c[61],s=i.createElement("div",null,e,t);break e}if(3===y.length&&3===x){let e,t;if(c[62]!==y[0]||c[63]!==y[1]||c[64]!==y[2]){let t,a,n,r;c[66]===Symbol.for("react.memo_cache_sentinel")?(t={role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},c[66]=t):t=c[66],c[67]!==y[0]?(a=i.createElement(w.A,{size:20,team:y[0]}),c[67]=y[0],c[68]=a):a=c[68],c[69]!==y[1]?(n=i.createElement(w.A,{size:20,team:y[1]}),c[69]=y[1],c[70]=n):n=c[70],c[71]!==y[2]?(r=i.createElement(w.A,{size:20,team:y[2]}),c[71]=y[2],c[72]=r):r=c[72],e=i.createElement("div",t,a,n,r),c[62]=y[0],c[63]=y[1],c[64]=y[2],c[65]=e}else e=c[65];c[73]!==u||c[74]!==y[0]||c[75]!==y[1]||c[76]!==y[2]||c[77]!==m?(t=m?F.rt("{externalTeamName1}, {externalTeamName2}, and {externalTeamName3} are in {channelName}",{externalTeamName1:f(y[0]),externalTeamName2:f(y[1]),externalTeamName3:f(y[2]),channelName:u}):F.rt("{externalTeamName1}, {externalTeamName2}, and {externalTeamName3} are in this channel",{externalTeamName1:f(y[0]),externalTeamName2:f(y[1]),externalTeamName3:f(y[2])}),c[73]=u,c[74]=y[0],c[75]=y[1],c[76]=y[2],c[77]=m,c[78]=t):t=c[78],s=i.createElement("div",null,e,t);break e}if(3===y.length&&x>3){let e,t;if(c[79]!==y[0]||c[80]!==y[1]||c[81]!==y[2]||c[82]!==x){let t,a,n,r,l;if(c[84]===Symbol.for("react.memo_cache_sentinel")?(t={role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},c[84]=t):t=c[84],c[85]!==y[0]?(a=i.createElement(w.A,{size:20,team:y[0]}),c[85]=y[0],c[86]=a):a=c[86],c[87]!==y[1]?(n=i.createElement(w.A,{size:20,team:y[1]}),c[87]=y[1],c[88]=n):n=c[88],c[89]!==y[2]?(r=i.createElement(w.A,{size:20,team:y[2]}),c[89]=y[2],c[90]=r):r=c[90],c[91]!==x){let e;c[93]===Symbol.for("react.memo_cache_sentinel")?(e={className:"c-channel_entity__shared_icon_additional_team_icon"},c[93]=e):e=c[93],l=i.createElement("div",e,x-3<9?`+${x-3}`:"9+"),c[91]=x,c[92]=l}else l=c[92];e=i.createElement("div",t,a,n,r,l),c[79]=y[0],c[80]=y[1],c[81]=y[2],c[82]=x,c[83]=e}else e=c[83];c[94]!==u||c[95]!==y[0]||c[96]!==y[1]||c[97]!==y[2]||c[98]!==m||c[99]!==x?(t=m?F.rt("{externalTeamName1}, {externalTeamName2}, {externalTeamName3}, and {numAdditionalExternalTeams, plural, =1 {# other external organization} other {# other external organizations}} are in {channelName}",{externalTeamName1:f(y[0]),externalTeamName2:f(y[1]),externalTeamName3:f(y[2]),numAdditionalExternalTeams:x-3,channelName:u}):F.rt("{externalTeamName1}, {externalTeamName2}, {externalTeamName3}, and {numAdditionalExternalTeams, plural, =1 {# other external organization} other {# other external organizations}} are in this channel",{externalTeamName1:f(y[0]),externalTeamName2:f(y[1]),externalTeamName3:f(y[2]),numAdditionalExternalTeams:x-3}),c[94]=u,c[95]=y[0],c[96]=y[1],c[97]=y[2],c[98]=m,c[99]=x,c[100]=t):t=c[100],s=i.createElement("div",null,e,t);break e}e=m?F.rt('<span className="sk_foreground_high_solid">{channelName} was shared with</span> {externalTeamNames}',{channelName:u,externalTeamNames:a}):F.rt('<span className="sk_foreground_high_solid">Shared with</span> {externalTeamNames}',{externalTeamNames:a}),c[35]=u,c[36]=y,c[37]=g,c[38]=m,c[39]=x,c[40]=e}else e=c[40];s=e;break e}c[24]=p,c[25]=u,c[26]=k,c[27]=y,c[28]=E,c[29]=g,c[30]=m,c[31]=x,c[32]=C,c[33]=b,c[34]=e}}c[12]=p,c[13]=u,c[14]=k,c[15]=y,c[16]=E,c[17]=g,c[18]=m,c[19]=x,c[20]=C,c[21]=b,c[22]=v,c[23]=s}else s=c[23];return s!==Symbol.for("react.early_return_sentinel")?s:null}:function({channelId:e,isTruncated:t,channelDisplay:a}){let n=(0,_.d4)(t=>(0,O.OL)(t,e)),r=(0,_.d4)(D.H7),renderTeamName=e=>(0,M.GU)(e)?i.createElement(I.A,{type:(0,M.mX)(e)?"unknown":"non-existent",subtler:!0}):(0,L.F1)(e),l=(0,_.d4)(D.lp),o=!!n&&(0,R.sP)(r,n),[s,c]=(0,_.d4)(e=>(0,N.y)(e,{channel:n})),[d,m]=(0,_.d4)(e=>(0,N.A)(e,{channel:n,team:r})),u=(0,_.d4)(e=>(0,T.l)(e,{channel:n}));if(u===T.t.None)return null;if(u===T.t.OrgShared&&l){let e=renderTeamName(l);if((0,P.S)(n))return t?F.rt("{channelName} was added to all workspaces at {selfEnterpriseName}",{channelName:a,selfEnterpriseName:e}):F.rt("Added to all workspaces at {selfEnterpriseName}",{selfEnterpriseName:e});switch(m){case 0:break;case 1:if(t)return F.rt("{channelName} was added to the {workspaceName} workspace at {selfEnterpriseName}",{channelName:a,workspaceName:renderTeamName(d[0]),selfEnterpriseName:e});return F.rt("Added to the {workspaceName} workspace at {selfEnterpriseName}",{workspaceName:renderTeamName(d[0]),selfEnterpriseName:e});case 2:if(t)return F.rt("{channelName} was added to the {workspaceName1} and {workspaceName2} workspaces at {selfEnterpriseName}",{channelName:a,workspaceName1:renderTeamName(d[0]),workspaceName2:renderTeamName(d[1]),selfEnterpriseName:e});return F.rt("Added to the {workspaceName1} and {workspaceName2} workspaces at {selfEnterpriseName}",{workspaceName1:renderTeamName(d[0]),workspaceName2:renderTeamName(d[1]),selfEnterpriseName:e});default:if(t)return F.rt("{channelName} was added to {workspaceName1}, {workspaceName2}, and {numAdditionalWorkspaces, plural, =1 {# other workspace} other {# other workspaces}} at {selfEnterpriseName}",{channelName:a,workspaceName1:renderTeamName(d[0]),workspaceName2:renderTeamName(d[1]),numAdditionalWorkspaces:m-2,selfEnterpriseName:e});return F.rt("Added to {workspaceName1}, {workspaceName2}, and {numAdditionalWorkspaces, plural, =1 {# other workspace} other {# other workspaces}} at {selfEnterpriseName}",{workspaceName1:renderTeamName(d[0]),workspaceName2:renderTeamName(d[1]),numAdditionalWorkspaces:m-2,selfEnterpriseName:e})}}if((u===T.t.ExternallyShared||u===T.t.ExternallySharedPending)&&s&&s.length){let e=(0,A.A)(s.map(e=>renderTeamName(e)),{noEscape:!0,react:!0});return o?t?F.rt('<span className="sk_foreground_high_solid">Waiting for</span> {externalTeamNames} <span className="sk_foreground_high">to\xa0join {channelName}</span>',{channelName:a,externalTeamNames:e}):F.rt('<span className="sk_foreground_high_solid">Waiting for</span> {externalTeamNames} <span className="sk_foreground_high">to\xa0join</span>',{externalTeamNames:e}):1===s.length?i.createElement("div",null,i.createElement("div",{role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},i.createElement(w.A,{size:20,team:s[0]})),t?F.rt("{externalTeamName} is in {channelName}",{externalTeamName:renderTeamName(s[0]),channelName:a}):F.rt("{externalTeamName} is in this channel",{externalTeamName:renderTeamName(s[0])})):2===s.length?i.createElement("div",null,i.createElement("div",{role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},i.createElement(w.A,{size:20,team:s[0]}),i.createElement(w.A,{size:20,team:s[1]})),t?F.rt("{externalTeamName1} and {externalTeamName2} are in {channelName}",{externalTeamName1:renderTeamName(s[0]),externalTeamName2:renderTeamName(s[1]),channelName:a}):F.rt("{externalTeamName1} and {externalTeamName2} are in this channel",{externalTeamName1:renderTeamName(s[0]),externalTeamName2:renderTeamName(s[1])})):3===s.length&&3===c?i.createElement("div",null,i.createElement("div",{role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},i.createElement(w.A,{size:20,team:s[0]}),i.createElement(w.A,{size:20,team:s[1]}),i.createElement(w.A,{size:20,team:s[2]})),t?F.rt("{externalTeamName1}, {externalTeamName2}, and {externalTeamName3} are in {channelName}",{externalTeamName1:renderTeamName(s[0]),externalTeamName2:renderTeamName(s[1]),externalTeamName3:renderTeamName(s[2]),channelName:a}):F.rt("{externalTeamName1}, {externalTeamName2}, and {externalTeamName3} are in this channel",{externalTeamName1:renderTeamName(s[0]),externalTeamName2:renderTeamName(s[1]),externalTeamName3:renderTeamName(s[2])})):3===s.length&&c>3?i.createElement("div",null,i.createElement("div",{role:"presentation",className:"c-channel_entity__shared_icon_external_team_list"},i.createElement(w.A,{size:20,team:s[0]}),i.createElement(w.A,{size:20,team:s[1]}),i.createElement(w.A,{size:20,team:s[2]}),i.createElement("div",{className:"c-channel_entity__shared_icon_additional_team_icon"},c-3<9?`+${c-3}`:"9+")),t?F.rt("{externalTeamName1}, {externalTeamName2}, {externalTeamName3}, and {numAdditionalExternalTeams, plural, =1 {# other external organization} other {# other external organizations}} are in {channelName}",{externalTeamName1:renderTeamName(s[0]),externalTeamName2:renderTeamName(s[1]),externalTeamName3:renderTeamName(s[2]),numAdditionalExternalTeams:c-3,channelName:a}):F.rt("{externalTeamName1}, {externalTeamName2}, {externalTeamName3}, and {numAdditionalExternalTeams, plural, =1 {# other external organization} other {# other external organizations}} are in this channel",{externalTeamName1:renderTeamName(s[0]),externalTeamName2:renderTeamName(s[1]),externalTeamName3:renderTeamName(s[2]),numAdditionalExternalTeams:c-3})):t?F.rt('<span className="sk_foreground_high_solid">{channelName} was shared with</span> {externalTeamNames}',{channelName:a,externalTeamNames:e}):F.rt('<span className="sk_foreground_high_solid">Shared with</span> {externalTeamNames}',{externalTeamNames:e})}return null};function _temp(e){return(0,M.GU)(e)?i.createElement(I.A,{type:(0,M.mX)(e)?"unknown":"non-existent",subtler:!0}):(0,L.F1)(e)}U.displayName="SharedChannelTooltipContent";var B=a(0x14dbdd890),H=a(0x1337b4a0),W=a.n(H);let V=new p.Ay("recordchannels");function RecordChannelNameTooltipContentBase({isTruncated:e,displayName:t,recordLabel:a,channelId:n}){return i.createElement(i.Fragment,null,e&&i.createElement("div",null,t),i.createElement("div",{className:W().record_channel_name_tooltip_content_record_breadcrumbs},V.t("{recordLabel} channel ",{recordLabel:a,recordType:a})),i.createElement("div",{className:W().record_channel_name_tooltip_content_record_breadcrumbs_container},i.createElement(B.r,{channelId:n,className:W().record_channel_name_tooltip_content_record_breadcrumbs})))}RecordChannelNameTooltipContentBase.displayName="RecordChannelNameTooltipContentBase";let G=i.memo(RecordChannelNameTooltipContentBase);function ChannelNameTooltipContent({channelId:e,hasSharedChannelTooltip:t,hasRecordChannelTooltip:a,recordLabel:n,channelIsIm:r,channelIsMpim:l,isTruncated:o,displayName:s,userId:c,isYou:d,shouldShowInviterText:m,isGuestMember:u,externalOrgNameForMember:p,members:h,channelTeam:_}){let f=i.createElement(S,{channelIsIm:r,channelIsMpim:l,displayName:s,userId:c,isYou:d,shouldShowInviterText:m,isGuestMember:u,externalOrgNameForMember:p,members:h||void 0,channelTeam:_,isTooltip:!!_});return a&&e&&n?i.createElement(G,{isTruncated:o,displayName:s,recordLabel:n,channelId:e}):t&&e?i.createElement(U,{channelId:e,isTruncated:o,channelDisplay:f}):f}ChannelNameTooltipContent.displayName="ChannelNameTooltipContent";let q=i.memo(ChannelNameTooltipContent);var j=a(0x18def662b);let z=(0,n.DA)()?function(e){let t,a,n,l,m=(0,r.c)(134),{channelId:u,channelIsIm:p,channelIsMpim:h,memberIdFromIm:f,displayName:b,qaChannelName:g,isYou:y,isUnknown:A,members:x,userActive:E,isGuestMember:C,externalOrgNameForMember:k,shouldShowInviterText:v,hasSharedChannelTooltip:I,channelTeam:w,isRecordChannel:T,recordLabel:N,topic:M}=e,R=void 0===u?void 0:u,P=void 0!==p&&p,L=void 0!==h&&h,O=void 0===f?void 0:f,D=void 0===b?"":b,F=void 0===g?"":g,U=void 0!==y&&y,B=void 0!==A&&A,H=void 0===x?null:x,W=void 0!==C&&C,V=void 0===k?void 0:k,G=void 0!==v&&v,z=void 0!==I&&I,K=void 0===w?void 0:w,$=void 0!==T&&T,Y=void 0===M?"":M,[Q,Z]=(0,i.useState)(!1),J=(0,_.d4)(j.in);m[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{Z(e.isTruncated)},m[0]=t):t=m[0];let X=t,ee=P&&!(void 0===E||E),et=R===s.lS;m[1]!==ee||m[2]!==et?(a=o()("p-channel_sidebar__name",{"p-channel_sidebar__name--away":ee,underline:et}),m[1]=ee,m[2]=et,m[3]=a):a=m[3];let ea=a;m[4]!==F?(n=F.toString().replace(/ /g,"-").toLowerCase(),m[4]=F,m[5]=n):n=m[5];let en=`channel_sidebar_name_${n}`;if(m[6]!==R||m[7]!==P||m[8]!==L||m[9]!==K||m[10]!==ea||m[11]!==en||m[12]!==D||m[13]!==J||m[14]!==V||m[15]!==z||m[16]!==W||m[17]!==$||m[18]!==Q||m[19]!==B||m[20]!==U||m[21]!==O||m[22]!==H||m[23]!==N||m[24]!==G||m[25]!==Y){let e,t;if(m[27]!==R||m[28]!==P||m[29]!==L||m[30]!==K||m[31]!==ea||m[32]!==en||m[33]!==D||m[34]!==V||m[35]!==z||m[36]!==W||m[37]!==$||m[38]!==Q||m[39]!==B||m[40]!==U||m[41]!==O||m[42]!==H||m[43]!==N||m[44]!==G||m[45]!==Y){let t,a,n,r,l=$?"large":"small";if(m[47]!==R||m[48]!==P||m[49]!==L||m[50]!==K||m[51]!==D||m[52]!==V||m[53]!==z||m[54]!==W||m[55]!==$||m[56]!==Q||m[57]!==U||m[58]!==O||m[59]!==H||m[60]!==N||m[61]!==G){let e,a=H||void 0;m[63]!==R||m[64]!==P||m[65]!==L||m[66]!==K||m[67]!==D||m[68]!==V||m[69]!==z||m[70]!==W||m[71]!==$||m[72]!==Q||m[73]!==U||m[74]!==O||m[75]!==N||m[76]!==G||m[77]!==a?(e={hasSharedChannelTooltip:z,hasRecordChannelTooltip:$,channelId:R,isTruncated:Q,channelIsIm:P,channelIsMpim:L,displayName:D,userId:O,isYou:U,shouldShowInviterText:G,isGuestMember:W,externalOrgNameForMember:V,members:a,channelTeam:K,recordLabel:N},m[63]=R,m[64]=P,m[65]=L,m[66]=K,m[67]=D,m[68]=V,m[69]=z,m[70]=W,m[71]=$,m[72]=Q,m[73]=U,m[74]=O,m[75]=N,m[76]=G,m[77]=a,m[78]=e):e=m[78],t=i.createElement(q,e),m[47]=R,m[48]=P,m[49]=L,m[50]=K,m[51]=D,m[52]=V,m[53]=z,m[54]=W,m[55]=$,m[56]=Q,m[57]=U,m[58]=O,m[59]=H,m[60]=N,m[61]=G,m[62]=t}else t=m[62];let s=!(z||Q||$);if(m[79]!==s?(a=o()({hidden:s}),m[79]=s,m[80]=a):a=m[80],m[81]!==l||m[82]!==t||m[83]!==a?(n={onShow:X,delay:600,position:"top",maxWidth:l,tip:t,tipClassName:a},m[81]=l,m[82]=t,m[83]=a,m[84]=n):n=m[84],m[85]!==P||m[86]!==L||m[87]!==K||m[88]!==ea||m[89]!==en||m[90]!==D||m[91]!==V||m[92]!==W||m[93]!==B||m[94]!==U||m[95]!==O||m[96]!==H||m[97]!==G||m[98]!==Y){let e,t;if(m[100]!==ea||m[101]!==en?(e={dir:"auto",className:ea,"data-qa":en},m[100]=ea,m[101]=en,m[102]=e):e=m[102],m[103]!==P||m[104]!==L||m[105]!==K||m[106]!==D||m[107]!==V||m[108]!==W||m[109]!==B||m[110]!==U||m[111]!==O||m[112]!==H||m[113]!==G||m[114]!==Y){let e,a=H||void 0;m[116]!==P||m[117]!==L||m[118]!==K||m[119]!==D||m[120]!==V||m[121]!==W||m[122]!==B||m[123]!==U||m[124]!==O||m[125]!==G||m[126]!==a||m[127]!==Y?(e={channelIsIm:P,channelIsMpim:L,displayName:D,userId:O,isYou:U,shouldShowInviterText:G,isGuestMember:W,externalOrgNameForMember:V,members:a,channelTeam:K,topic:Y,isUnknown:B},m[116]=P,m[117]=L,m[118]=K,m[119]=D,m[120]=V,m[121]=W,m[122]=B,m[123]=U,m[124]=O,m[125]=G,m[126]=a,m[127]=Y,m[128]=e):e=m[128],t=i.createElement(S,e),m[103]=P,m[104]=L,m[105]=K,m[106]=D,m[107]=V,m[108]=W,m[109]=B,m[110]=U,m[111]=O,m[112]=H,m[113]=G,m[114]=Y,m[115]=t}else t=m[115];r=i.createElement("span",e,t),m[85]=P,m[86]=L,m[87]=K,m[88]=ea,m[89]=en,m[90]=D,m[91]=V,m[92]=W,m[93]=B,m[94]=U,m[95]=O,m[96]=H,m[97]=G,m[98]=Y,m[99]=r}else r=m[99];e=i.createElement(c.Ay,n,r),m[27]=R,m[28]=P,m[29]=L,m[30]=K,m[31]=ea,m[32]=en,m[33]=D,m[34]=V,m[35]=z,m[36]=W,m[37]=$,m[38]=Q,m[39]=B,m[40]=U,m[41]=O,m[42]=H,m[43]=N,m[44]=G,m[45]=Y,m[46]=e}else e=m[46];m[129]!==P||m[130]!==L||m[131]!==J||m[132]!==O?(t=P&&!L&&!J&&i.createElement(d.A,{memberId:O,className:"p-channel_sidebar__custom_status"}),m[129]=P,m[130]=L,m[131]=J,m[132]=O,m[133]=t):t=m[133],l=i.createElement(i.Fragment,null,e,t),m[6]=R,m[7]=P,m[8]=L,m[9]=K,m[10]=ea,m[11]=en,m[12]=D,m[13]=J,m[14]=V,m[15]=z,m[16]=W,m[17]=$,m[18]=Q,m[19]=B,m[20]=U,m[21]=O,m[22]=H,m[23]=N,m[24]=G,m[25]=Y,m[26]=l}else l=m[26];return l}:function({channelId:e,channelIsIm:t=!1,channelIsMpim:a=!1,memberIdFromIm:n,displayName:r="",qaChannelName:l="",isYou:m=!1,isUnknown:u=!1,members:p=null,userActive:h=!0,isGuestMember:f=!1,externalOrgNameForMember:b,shouldShowInviterText:g=!1,hasSharedChannelTooltip:y=!1,channelTeam:A,isRecordChannel:x=!1,recordLabel:E,topic:C=""}){let[k,v]=(0,i.useState)(!1),I=(0,_.d4)(j.in),w=(0,i.useCallback)(e=>{v(e.isTruncated)},[v]),T=o()("p-channel_sidebar__name",{"p-channel_sidebar__name--away":t&&!h,underline:e===s.lS}),N=(0,i.useMemo)(()=>`channel_sidebar_name_${l.toString().replace(/ /g,"-").toLowerCase()}`,[l]);return i.createElement(i.Fragment,null,i.createElement(c.Ay,{onShow:w,delay:600,position:"top",maxWidth:x?"large":"small",tip:i.createElement(q,{hasSharedChannelTooltip:y,hasRecordChannelTooltip:x,channelId:e,isTruncated:k,channelIsIm:t,channelIsMpim:a,displayName:r,userId:n,isYou:m,shouldShowInviterText:g,isGuestMember:f,externalOrgNameForMember:b,members:p||void 0,channelTeam:A,recordLabel:E}),tipClassName:o()({hidden:!(y||k||x)})},i.createElement("span",{dir:"auto",className:T,"data-qa":N},i.createElement(S,{channelIsIm:t,channelIsMpim:a,displayName:r,userId:n,isYou:m,shouldShowInviterText:g,isGuestMember:f,externalOrgNameForMember:b,members:p||void 0,channelTeam:A,topic:C,isUnknown:u}))),t&&!a&&!I&&i.createElement(d.A,{memberId:n,className:"p-channel_sidebar__custom_status"}))};z.displayName="ChannelName";let K=i.memo(z)},0x151cc49d5:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1c659cbb1),o=a(0xf93aa03a),s=a(0x18e224417);function ChannelPrefixAvatar({userId:e,isAppIm:t,isSlackbotChannel:a,isSlackSecurityBotChannel:r,className:c,includePartyHat:d,avatarSize:m}){let u=i()("p-channel_sidebar__user_avatar",c),p=m??o.z;return n.createElement("div",{className:u},d&&n.createElement(s.U,{className:"p-channel_sidebar__user_avatar_party_hat",userId:e??"","data-qa":"channel-prefix-im-party-hat"}),n.createElement(l.Ay,{userId:e,size:p,isInteractive:!1,"data-qa":"channel-prefix-im-avatar",showPresence:!(t||a||r)}))}ChannelPrefixAvatar.displayName="ChannelPrefixAvatar";let c=n.memo(ChannelPrefixAvatar)},0x14c39ae0f:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x2469ec64e),c=a(0x1c659cbb1),d=a(0x185aa85ac),m=a.n(d);function MPIMMask({id:e}){return i.createElement("svg",{className:"sr-only"},i.createElement("clipPath",{id:e,clipPathUnits:"objectBoundingBox"},i.createElement("path",{d:"M1,0 H0 V1 H0.4 V0.625 C0.4,0.501,0.501,0.4,0.625,0.4 H1 V0"})))}MPIMMask.displayName="MPIMMask";let u=(0,n.DA)()?function(e){let t,a,n,l,d,u,p=(0,r.c)(27),{userCount:h,mpimMember:_,className:f,isSelected:b}=e,g=void 0===f?void 0:f,y=void 0!==b&&b;p[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.r9)(),p[0]=t):t=p[0];let A=`mpim-mask-${t}`;p[1]!==g?(a=o()(m().mpimAvatars,g),p[1]=g,p[2]=a):a=p[2];let x=a;p[3]!==y?(n=o()(m().mpimCounter,{[m().mpimCounterSelected]:y}),p[3]=y,p[4]=n):n=p[4];let E=n;p[5]===Symbol.for("react.memo_cache_sentinel")?(l={"--mpim-size":"14px"},p[5]=l):l=p[5];let C=l;p[6]===Symbol.for("react.memo_cache_sentinel")?(d={"--mpim-mask":`url(#${A})`},p[6]=d):d=p[6];let k=d;if(p[7]!==x||p[8]!==E||p[9]!==_||p[10]!==h){let e,t,a;if(p[12]!==x?(e={className:x,style:C},p[12]=x,p[13]=e):e=p[13],p[14]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement(MPIMMask,{id:A}),p[14]=t):t=p[14],p[15]!==E||p[16]!==_||p[17]!==h){let e,t,n;if(p[19]===Symbol.for("react.memo_cache_sentinel")?(e={className:m().mpimWrapper,style:k},p[19]=e):e=p[19],p[20]!==_?(t=i.createElement(c.Ay,{userId:_,className:m().mpimAvatarsMpim1,size:14,isInteractive:!1,"data-qa":"channel-prefix-mpim-avatar"}),p[20]=_,p[21]=t):t=p[21],p[22]!==E||p[23]!==h){let e;p[25]!==E?(e={"aria-hidden":!0,className:E,"data-qa":"channel-prefix-mpim-counter"},p[25]=E,p[26]=e):e=p[26],n=i.createElement("div",e,h),p[22]=E,p[23]=h,p[24]=n}else n=p[24];a=i.createElement("div",e,t,n),p[15]=E,p[16]=_,p[17]=h,p[18]=a}else a=p[18];u=i.createElement("div",e,t,a),p[7]=x,p[8]=E,p[9]=_,p[10]=h,p[11]=u}else u=p[11];return u}:function({userCount:e,mpimMember:t,className:a,isSelected:n=!1}){let r=(0,i.useMemo)(()=>`mpim-mask-${(0,s.r9)()}`,[]),l=o()(m().mpimAvatars,a),d=o()(m().mpimCounter,{[m().mpimCounterSelected]:n}),u=(0,i.useMemo)(()=>({"--mpim-size":"14px"}),[14]),p=(0,i.useMemo)(()=>({"--mpim-mask":`url(#${r})`}),[r]);return i.createElement("div",{className:l,style:u},i.createElement(MPIMMask,{id:r}),i.createElement("div",{className:m().mpimWrapper,style:p},i.createElement(c.Ay,{userId:t,className:m().mpimAvatarsMpim1,size:14,isInteractive:!1,"data-qa":"channel-prefix-mpim-avatar"}),i.createElement("div",{"aria-hidden":!0,className:d,"data-qa":"channel-prefix-mpim-counter"},e)))};u.displayName="ChannelPrefixMpim";let p=i.memo(u)},0x15dab9b9f:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x6770da20),o=a.n(l);function ChannelPrefixTyping({className:e}){let t=i()(o().prefixTypingIcon,e);return n.createElement("div",{"data-qa":"sidebar-channel-icon-prefix",className:t},n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n.createElement("circle",{cx:"4",cy:"12",r:"3",opacity:"1",fill:"currentColor"},n.createElement("animate",{id:"spinner_qYjJ",begin:"0;spinner_t4KZ.end-0.25s",attributeName:"opacity",dur:"0.75s",values:"1;.2"})),n.createElement("circle",{cx:"12",cy:"12",r:"3",opacity:".4",fill:"currentColor"},n.createElement("animate",{begin:"spinner_qYjJ.begin+0.15s",attributeName:"opacity",dur:"0.75s",values:"1;.2"})),n.createElement("circle",{cx:"20",cy:"12",r:"3",opacity:".3",fill:"currentColor"},n.createElement("animate",{id:"spinner_t4KZ",begin:"spinner_qYjJ.begin+0.3s",attributeName:"opacity",dur:"0.75s",values:"1;.2"}))))}ChannelPrefixTyping.displayName="ChannelPrefixTyping";let s=n.memo(ChannelPrefixTyping)},0x5a3e6194:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x151cc49d5),c=a(0x15f8e452a),d=a(0x2501a2cee);function ChannelPrefixIcon({iconType:e,channelIsUnread:t,className:a,isMuted:n}){if(["lock-o","channel","channel-pane-hash","archived-channel"].includes(e)){let r="channel";return"lock-o"===e&&(r="lock"),"archived-channel"===e&&(r="archive"),r=t&&("channel"===e||"channel-pane-hash"===e)&&!n?`${r}-filled`:r,i.createElement("div",{className:a},i.createElement(d.Ah,{size:"16",name:r,"data-qa":"sidebar-channel-icon-prefix","data-sidebar-channel-icon":r}))}return i.createElement(c.A,{className:a,"data-qa":"sidebar-channel-icon-prefix",inline:!0,size:"inherit",type:e})}ChannelPrefixIcon.displayName="ChannelPrefixIcon";let m=i.memo(ChannelPrefixIcon);var u=a(0x14c39ae0f),p=a(0xaacd3809);function ChannelPrefixPresence({userId:e,className:t}){return i.createElement(p.Ay,{className:o()("p-channel_sidebar__presence_icon","p-channel_sidebar__presence_icon--dim_enabled",t),"data-qa":"sidebar-channel-presence-prefix",inline:!1,memberId:e})}ChannelPrefixPresence.displayName="ChannelPrefixPresence";let h=i.memo(ChannelPrefixPresence);var _=a(0x15dab9b9f),f=a(0x18def662b),b=a(0x226892387);let g=(0,n.DA)()?function(e){let t,a,n=(0,r.c)(37),{memberIdFromIm:l,isSlackbotChannel:c,isSlackSecurityBotChannel:d,isUnread:p,isSelected:g,isTyping:y,isAppIm:A,iconType:x,mpimMember:E,className:C,showAvatars:k,showPresence:v,mpimMemberCount:S,isMuted:I,includePartyHat:w,avatarSize:T}=e,N=void 0===l?void 0:l,M=void 0!==c&&c,R=void 0!==d&&d,P=void 0!==p&&p,L=void 0!==g&&g,O=void 0!==A&&A,D=void 0===x?"channel":x,F=void 0===E?void 0:E,U=void 0===C?void 0:C,B=void 0!==k&&k,H=void 0===S?void 0:S,W=void 0!==I&&I,V=void 0!==w&&w,G=void 0===T?void 0:T,q=(0,b.d4)(f.in);if(void 0!==v&&v||M||R){let e;if(B){let e;return n[0]!==G||n[1]!==U||n[2]!==V||n[3]!==O||n[4]!==R||n[5]!==M||n[6]!==N?(e=i.createElement(s.A,{userId:N,className:U,isAppIm:O,isSlackbotChannel:M,isSlackSecurityBotChannel:R,includePartyHat:V,avatarSize:G}),n[0]=G,n[1]=U,n[2]=V,n[3]=O,n[4]=R,n[5]=M,n[6]=N,n[7]=e):e=n[7],e}return n[8]!==U||n[9]!==N?(e=i.createElement(h,{userId:N,className:U}),n[8]=U,n[9]=N,n[10]=e):e=n[10],e}if(B&&F&&!q){let e;if(n[11]!==U||n[12]!==L||n[13]!==F||n[14]!==H){let t,a=H||0;n[16]!==U||n[17]!==L||n[18]!==F||n[19]!==a?(t={className:U,mpimMember:F,userCount:a,isSelected:L},n[16]=U,n[17]=L,n[18]=F,n[19]=a,n[20]=t):t=n[20],e=i.createElement(u.A,t),n[11]=U,n[12]=L,n[13]=F,n[14]=H,n[15]=e}else e=n[15];return e}let j=M||R,z=B&&F&&q;n[21]!==U||n[22]!==j||n[23]!==z?(t=o()("p-channel_sidebar__channel_icon_prefix",{"p-channel_sidebar__channel_icon_prefix--im-slackbot":j,"p-channel_sidebar__channel_icon_prefix--visual-updates-with-avatars":z},U),n[21]=U,n[22]=j,n[23]=z,n[24]=t):t=n[24];let K=t;if(void 0!==y&&y&&!L){let e;return n[25]!==K?(e=i.createElement(_.A,{className:K}),n[25]=K,n[26]=e):e=n[26],e}if(n[27]!==K||n[28]!==D||n[29]!==W||n[30]!==P){let e,t=!!P;n[32]!==K||n[33]!==D||n[34]!==W||n[35]!==t?(e={iconType:D,channelIsUnread:t,className:K,isMuted:W},n[32]=K,n[33]=D,n[34]=W,n[35]=t,n[36]=e):e=n[36],a=i.createElement(m,e),n[27]=K,n[28]=D,n[29]=W,n[30]=P,n[31]=a}else a=n[31];return a}:function({memberIdFromIm:e,isSlackbotChannel:t=!1,isSlackSecurityBotChannel:a=!1,isUnread:n=!1,isSelected:r=!1,isTyping:l=!1,isAppIm:c=!1,iconType:d="channel",mpimMember:p,className:g,showAvatars:y=!1,showPresence:A=!1,mpimMemberCount:x,isMuted:E=!1,includePartyHat:C=!1,avatarSize:k}){let v=(0,b.d4)(f.in);if(A||t||a)return y?i.createElement(s.A,{userId:e,className:g,isAppIm:c,isSlackbotChannel:t,isSlackSecurityBotChannel:a,includePartyHat:C,avatarSize:k}):i.createElement(h,{userId:e,className:g});if(y&&p&&!v)return i.createElement(u.A,{className:g,mpimMember:p,userCount:x||0,isSelected:r});let S=o()("p-channel_sidebar__channel_icon_prefix",{"p-channel_sidebar__channel_icon_prefix--im-slackbot":t||a,"p-channel_sidebar__channel_icon_prefix--visual-updates-with-avatars":y&&p&&v},g);return l&&!r?i.createElement(_.A,{className:S}):i.createElement(m,{iconType:d,channelIsUnread:!!n,className:S,isMuted:E})};g.displayName="ChannelPrefix";let y=i.memo(g)},0xa2ab2a30:(e,t,a)=>{"use strict";a.d(t,{A:()=>aK});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21da4684a),l=a(0x1b81e2549),o=a(0x20482ad21),s=a(0x14abc22b0),c=a(0x11bd07e39),d=a(0x16ffeff53),m=a(0x1d472ce97),u=a(0x9982721),p=a(0x120c268ad),h=a.n(p),_=a(0x1cbdfeceb),f=a(0x854f5389),b=a(0x2334f665b),g=a(0xe874a88a),y=a(0xf8dd7f80),A=a(0x1fc4d7d9f),x=a(0x15f8e452a),E=a(0x2501a2cee),C=a(0x807220a2),k=a(0x19bf376f9),v=a(0xb90de824),S=a(0x13953efe6),I=a(0x18bab6d41),w=a(0x1c9980611),T=a(0x1a6e7ed05),N=a(0x229193160),M=a(0x1d25c0791),R=a(0x245208d6a),P=a(0xfbede66),L=a(0xd93ae65c),O=a(0x247cf31a2),D=a(0x172dd1bf5),F=a(0x3989021c),U=a(0x1ccef1c6f),B=a(0x226892387),H=a(0x5b1935a6),W=a(0x113d1778),V=a(0xd3c521b8);let G=new o.Ay("ia4"),q="p-nux_tractor_channel_coachmark",TractorChannelCoachmark=({children:e,renderCoachmark:t,UNSAFE_parentSelector:a,onClose:r,tractorChannelId:i,steps:l,onClickNextStep:o=()=>{},currentStep:s,totalSteps:c,onAfterOpen:d=()=>{},isCreatorVariant:m,hero:u})=>{let p=m?G.rt("Meet {tractorChannel}, your team\u2019s first channel",{tractorChannel:n.createElement(O.A,{channelId:i})}):G.t("Meet channels, where the magic happens"),h=G.rt("Channels keep your work focused, by giving each topic, project or team its own space.<steps></steps>",{"<steps>":l}),_=G.t("Show Me Around"),f=G.t("Maybe Later"),b=G.t("Channels keep your work focused, by giving each topic, project or team its own space. {currentStep} of {totalSteps}",{currentStep:s,totalSteps:c}),g=t({title:p,bodyText:h,centerOnArrow:!0,offsetX:-30,offsetY:0,arrowPosition:30,closeCoachmark:r,orientation:S.YC.Right,primaryCallToActionText:_,secondaryCallToActionText:f,ariaLabel:b,onClickPrimaryButton:o,onClickSecondaryButton:r,className:q,onAfterOpen:d,autoClogProps:(0,w.DV)(m),hero:u,closeBackgroundStyle:"light",UNSAFE_parentSelector:a});return n.createElement(S.Ay,{coachmarkElement:g,orientation:"right"},e)};TractorChannelCoachmark.displayName="TractorChannelCoachmark";let WrappedTractorChannelCoachmark=({children:e,tractorChannelId:t,renderCoachmark:i,closeCoachmark:l,currentStep:o,nextStep:s,totalSteps:c,megaphoneStepData:d})=>{let m=(0,r.wA)(),u=(0,B.d4)(e=>(0,U.ty)(e,"a11y_animations")),p=d?.steps?.[0]===M.m.ActivityCreatorCoachmark&&!!t,h=(0,n.useCallback)(()=>m((0,W.F$)(s)),[m,s]),_=(0,n.useCallback)(()=>n.createElement(I.A,{currentStep:o,totalSteps:c}),[o,c]),{onAfterOpen:f}=(0,P.j)({className:q,highlightPadding:{top:4,bottom:4,left:8}}),{clogDismissFromOverlay:b}=(0,R.V)(q,(0,w.DV)(p)),g=(0,n.useCallback)(e=>{b(e),l(),m((0,N.A)())},[l,m,b]),y=(0,n.useCallback)(()=>a.e("lottie-tractor-channel.json").then(a.t.bind(a,0x18265a97c,23)),[]),A=(0,n.useMemo)(()=>u?n.createElement(D.e,{autoplay:!0,className:"p-nux_coachmark__hero p-nux_coachmark--rounded",getAnimationImport:y,svgClassName:"p-nux_coachmark--rounded","data-qa":T.s.TRACTOR_ANIMATION}):n.createElement("img",{alt:"","aria-hidden":!0,src:V,"data-qa":T.s.TRACTOR_IMAGE,className:"p-nux_coachmark__hero p-nux_coachmark--rounded"}),[y,u]);return n.createElement(TractorChannelCoachmark,{renderCoachmark:i,onClose:g,tractorChannelId:t,steps:_,onClickNextStep:h,currentStep:o,totalSteps:c,onAfterOpen:f,isCreatorVariant:p,hero:A},e)};WrappedTractorChannelCoachmark.displayName="WrappedTractorChannelCoachmark";let j=(0,C.DA)()?e=>{let t,a=(0,k.c)(17),{tractorChannelId:r,children:i}=e,{closeCoachmark:l,renderCoachmark:o,isOpen:s}=(0,F.A)(H.ze.IA4_NEW_TEAMS_V3_NUX_EDUCATION,H.xu.WELCOME_SPACE),{currentStep:c,isOpen:d,nextStep:m,totalSteps:u,megaphoneStepData:p}=(0,L.H)();if(!(s&&d))return i;if(a[0]!==i||a[1]!==l||a[2]!==c||a[3]!==p||a[4]!==m||a[5]!==o||a[6]!==u||a[7]!==r){let e;a[9]!==l||a[10]!==c||a[11]!==p||a[12]!==m||a[13]!==o||a[14]!==u||a[15]!==r?(e={renderCoachmark:o,closeCoachmark:l,currentStep:c,nextStep:m,totalSteps:u,megaphoneStepData:p,tractorChannelId:r},a[9]=l,a[10]=c,a[11]=p,a[12]=m,a[13]=o,a[14]=u,a[15]=r,a[16]=e):e=a[16],t=n.createElement(WrappedTractorChannelCoachmark,e,i),a[0]=i,a[1]=l,a[2]=c,a[3]=p,a[4]=m,a[5]=o,a[6]=u,a[7]=r,a[8]=t}else t=a[8];return t}:({tractorChannelId:e,children:t})=>{let{closeCoachmark:a,renderCoachmark:r,isOpen:i}=(0,F.A)(H.ze.IA4_NEW_TEAMS_V3_NUX_EDUCATION,H.xu.WELCOME_SPACE),{currentStep:l,isOpen:o,nextStep:s,totalSteps:c,megaphoneStepData:d}=(0,L.H)();return i&&o?n.createElement(WrappedTractorChannelCoachmark,{renderCoachmark:r,closeCoachmark:a,currentStep:l,nextStep:s,totalSteps:c,megaphoneStepData:d,tractorChannelId:e},t):t};j.displayName="ConnectedTractorChannelCoachmark";var z=a(0x29f0e1ee),K=a(0x18bf902cb),$=a(0x14fad6485),Y=a(0x18def662b),Q=a(0x218842a12),Z=a(0x1380694ee);let J=a.p+"new-channel-section-still-802b547.png",X=a.p+"new-channel-section-4d72845.gif",ee=new o.Ay("channel_sidebar"),et=Q.g.EDUCATION_SHAREABLE_SECTIONS,ea=(0,C.DA)()?e=>{let t,a,r,i,l,o,s=(0,k.c)(25),{children:c}=e,{isOpen:d,closeCoachmark:m}=(0,F.A)(et,H.xu.IN_PRODUCT_COACHMARK),{windowRef:u}=(0,n.useContext)($._0),p=(0,B.d4)(Y.QT),h=(0,B.d4)(Z.zj),_=(0,B.d4)(_temp);s[0]!==m?(t=()=>{m()},s[0]=m,s[1]=t):t=s[1];let f=t;s[2]!==h?(a=ee.t("A new section for {channelSectionName}",{channelSectionName:h}),s[2]=h,s[3]=a):a=s[3];let b=a;s[4]===Symbol.for("react.memo_cache_sentinel")?(r=ee.t("Feel free to move things around to your liking. We love an organized sidebar."),s[4]=r):r=s[4];let g=r;s[5]!==u?(i=e=>{setTimeout(()=>{u.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},500)},s[5]=u,s[6]=i):i=s[6];let y=i;if(s[7]!==f||s[8]!==d||s[9]!==y||s[10]!==_||s[11]!==b){let e,t,a=_?J:X;s[13]===Symbol.for("react.memo_cache_sentinel")?(e=ee.t("Got it"),s[13]=e):e=s[13],s[14]!==f||s[15]!==d||s[16]!==y||s[17]!==a||s[18]!==b?(t={isOpen:d,title:b,bodyText:g,closeCoachmark:f,hero:a,primaryCallToActionText:e,onClickPrimaryButton:f,alignActionsRight:!0,arrowColor:"DT_COLOR_PLT_HORCHATA_0",onAfterOpen:y},s[14]=f,s[15]=d,s[16]=y,s[17]=a,s[18]=b,s[19]=t):t=s[19],l=n.createElement(v.Ay,t),s[7]=f,s[8]=d,s[9]=y,s[10]=_,s[11]=b,s[12]=l}else l=s[12];let A=l;if(!p)return c;if(s[20]!==c||s[21]!==A){let e;s[23]!==A?(e={coachmarkElement:A,orientation:"right"},s[23]=A,s[24]=e):e=s[24],o=n.createElement(S.Ay,e,c),s[20]=c,s[21]=A,s[22]=o}else o=s[22];return o}:({children:e})=>{let{isOpen:t,closeCoachmark:a}=(0,F.A)(et,H.xu.IN_PRODUCT_COACHMARK),{windowRef:r}=(0,n.useContext)($._0),i=(0,B.d4)(Y.QT),l=(0,B.d4)(Z.zj),o=(0,B.d4)(e=>!(0,U.ty)(e,"a11y_animations")),s=(0,n.useCallback)(()=>{a()},[a]),c=ee.t("A new section for {channelSectionName}",{channelSectionName:l}),d=ee.t("Feel free to move things around to your liking. We love an organized sidebar."),m=(0,n.useCallback)(e=>{setTimeout(()=>{r.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},500)},[r]),u=(0,n.useMemo)(()=>n.createElement(v.Ay,{isOpen:t,title:c,bodyText:d,closeCoachmark:s,hero:o?J:X,primaryCallToActionText:ee.t("Got it"),onClickPrimaryButton:s,alignActionsRight:!0,arrowColor:"DT_COLOR_PLT_HORCHATA_0",onAfterOpen:m}),[t,c,d,s,o,m]);return i?n.createElement(S.Ay,{coachmarkElement:u,orientation:"right"},e):e};function _temp(e){return!(0,U.ty)(e,"a11y_animations")}ea.displayName="EducationSharedChannelSectionCoachmark";var en=a(0x11a296110);function ChannelCloseButton({onClose:e,"data-qa":t="channel_item_close"}){return n.createElement(en.Nm,{className:"p-channel_sidebar__close","data-qa":t,"aria-hidden":!0,tabIndex:-1,onClick:e},n.createElement(E.Ah,{name:"close",size:"16"}))}ChannelCloseButton.displayName="ChannelCloseButton";let er=n.memo(ChannelCloseButton);var ei=a(0x1ec69ee01),el=a(0xfee8fb3);function shouldShowCloseButton({channel:e,isSuggested:t,hideCloseButton:a,isStarred:n,isInAnyChannelSection:r,isEditMode:i,hasDraft:l,hasHuddle:o,isPending:s,isSalesforceChannelsXOutChannelEnabled:c=!1}){return!(a||!(0,el.l)(e,c)&&!t||(0,ei.KJ)(e))&&!r&&!n&&!i&&!l&&!o&&!s&&!0}var eo=a(0x1212ff273),es=a(0x5a3e6194),ec=a(0x410829f8),ed=a(0x4c96e5d9),em=a(0x1ee15af19),eu=a(0x118cdcdea),ep=a.n(eu);let eh=new o.Ay("general");function getOpeningCurlyQuote(){return eh.t("\u201C")}function getClosingCurlyQuote(){return eh.t("\u201D")}var e_=a(0xcd092f8c),ef=a(0x1b3ecb90f),eb=a(0xa794f9e1),eg=a(0x10d5cec41),ey=a(0x1c2eef3c8);let eA=new o.Ay("channel_sidebar"),ex=(0,C.DA)()?function(e){let t,a,r,i,l=(0,k.c)(16),{channelId:o,hasDraftText:s,numDraftFiles:c}=e;l[0]!==o?(t=e=>(0,ey.YI)(e,o),l[0]=o,l[1]=t):t=l[1];let d=(0,B.d4)(t);if(l[2]!==d){let e=d?(0,eb._l)(d):[];a=new(ep())(e.slice()),l[2]=d,l[3]=a}else a=l[3];let m=a;l[4]!==m?(r=e=>(0,eg.A)({delta:m,state:e}),l[4]=m,l[5]=r):r=l[5];let u=(0,B.F3)(r);if(l[6]!==u||l[7]!==s||l[8]!==c){let e,t,a;l[10]===Symbol.for("react.memo_cache_sentinel")?(e=n.createElement("div",null,n.createElement("strong",null,eA.t("Draft"))),l[10]=e):e=l[10],l[11]!==u||l[12]!==s?(t=s&&n.createElement("div",{className:"c-tooltip__subtitle"},getOpeningCurlyQuote(),n.createElement(e_.y,{richTextBlock:"blocks"in u?(0,em.A)(u?.blocks):void 0,emojiSize:ef.lw.SMALL,truncateLength:50}),getClosingCurlyQuote()),l[11]=u,l[12]=s,l[13]=t):t=l[13],l[14]!==c?(a=c>0&&n.createElement("div",{className:"c-tooltip__subtitle"},eA.t("{numFiles, plural, =1 {# file} other {# files}}",{numFiles:c})),l[14]=c,l[15]=a):a=l[15],i=n.createElement(n.Fragment,null,e,t,a),l[6]=u,l[7]=s,l[8]=c,l[9]=i}else i=l[9];return i}:function({channelId:e,hasDraftText:t,numDraftFiles:a}){let r=(0,B.d4)(t=>(0,ey.YI)(t,e)),i=r?(0,eb._l)(r):[],l=new(ep())(i.slice()),o=(0,B.F3)(e=>(0,eg.A)({delta:l,state:e}));return n.createElement(n.Fragment,null,n.createElement("div",null,n.createElement("strong",null,eA.t("Draft"))),t&&n.createElement("div",{className:"c-tooltip__subtitle"},getOpeningCurlyQuote(),n.createElement(e_.y,{richTextBlock:"blocks"in o?(0,em.A)(o?.blocks):void 0,emojiSize:ef.lw.SMALL,truncateLength:50}),getClosingCurlyQuote()),a>0&&n.createElement("div",{className:"c-tooltip__subtitle"},eA.t("{numFiles, plural, =1 {# file} other {# files}}",{numFiles:a})))};function ChannelSuffixDraftIcon({channelId:e,hasDraftText:t,numDraftFiles:a}){return n.createElement(ed.Ay,{tip:n.createElement(ex,{channelId:e,hasDraftText:t,numDraftFiles:a})},n.createElement(x.A,{className:"p-channel_sidebar__suffix_generic","data-qa":"sidebar-channel-draft-icon-suffix",inline:!0,size:"inherit",type:"pencil"}))}ex.displayName="ChannelSuffixDraftIconTooltipContent",ChannelSuffixDraftIcon.displayName="ChannelSuffixDraftIcon";let eE=n.memo(ChannelSuffixDraftIcon);var eC=a(0x1df70a9f4),ek=a(0xf91e43cd),ev=a(0xd9e862e6),eS=a(0xd66cda03),eI=a(0x1591157c4),ew=a(0x7b0b485),eT=a(0xff53c57),eN=a.n(eT);function HuddlesBadgeFakeMask({inHuddle:e}){return n.createElement("svg",{className:h()(eN().huddleFakeMaskSvg,{[eN().huddleFakeMaskSvgInHuddle]:e})},n.createElement("path",{d:"M2.98805e-07 20H2.52782V0H0C0.95008 1.06151 1.52779 2.46329 1.52779 4V16C1.52779 17.5367 0.95008 18.9385 2.98805e-07 20Z"}))}HuddlesBadgeFakeMask.displayName="HuddlesBadgeFakeMask";let eM=(0,C.DA)()?function(e){let t,a,r=(0,k.c)(13),{channelId:i}=e,l=(0,eS.cw)(ew.hc);r[0]!==l?(t=(0,eI.A)()?l:void 0,r[0]=l,r[1]=t):t=r[1];let o=t;if(r[2]!==i||r[3]!==o){let e,t,l,s;r[5]===Symbol.for("react.memo_cache_sentinel")?(e={shouldStopHuddle:!0},r[5]=e):e=r[5],r[6]!==i?(t=n.createElement(eC.i,{channelId:i,withTooltip:!0,excludeIcon:!0,excludeMemberOverflowCount:!0}),r[6]=i,r[7]=t):t=r[7];let c=o===i;r[8]!==c?(l={inHuddle:c},r[8]=c,r[9]=l):l=r[9];let d=o||"";r[10]!==i||r[11]!==d?(s={channelId:i,myHuddleChannelId:d},r[10]=i,r[11]=d,r[12]=s):s=r[12],a=n.createElement(ek.A,e,t,n.createElement(HuddlesBadgeFakeMask,l),n.createElement(ev.A,s)),r[2]=i,r[3]=o,r[4]=a}else a=r[4];return a}:function({channelId:e}){let t=(0,eS.cw)(ew.hc),a=(0,eI.A)()?t:void 0;return n.createElement(ek.A,{shouldStopHuddle:!0},n.createElement(eC.i,{channelId:e,withTooltip:!0,excludeIcon:!0,excludeMemberOverflowCount:!0}),n.createElement(HuddlesBadgeFakeMask,{inHuddle:a===e}),n.createElement(ev.A,{channelId:e,myHuddleChannelId:a||""}))};eM.displayName="ChannelSuffixHuddleIcon";let eR=n.memo(eM),eP=new o.Ay("channel_sidebar");function ChannelSuffixPendingIconTooltipContent(){return n.createElement(n.Fragment,null,n.createElement("div",null,n.createElement("strong",null,eP.t("Pending conversation"))),n.createElement("div",{className:"c-tooltip__subtitle"},eP.t("Waiting for you to accept")))}function ChannelSuffixPendingIcon(){return n.createElement(ed.Ay,{tip:n.createElement(ChannelSuffixPendingIconTooltipContent,null)},n.createElement(x.A,{className:"p-channel_sidebar__suffix_generic",inline:!0,type:"hourglass","data-qa":"sidebar-channel-pending-icon-suffix"}))}ChannelSuffixPendingIconTooltipContent.displayName="ChannelSuffixPendingIconTooltipContent",ChannelSuffixPendingIcon.displayName="ChannelSuffixPendingIcon";let eL=n.memo(ChannelSuffixPendingIcon);var eO=a(0xd0109e4f),eD=a(0x1e75c70fa);let eF=new o.Ay("channel_sidebar"),eU=(0,C.DA)()?function(e){let t,a,r=(0,k.c)(9),{channelId:i}=e;r[0]!==i?(t=e=>(0,eD.A)(e,i),r[0]=i,r[1]=t):t=r[1];let l=(0,B.d4)(t);if(!(l&&(0,eO.A)(l,!1))){let e;return r[2]===Symbol.for("react.memo_cache_sentinel")?(e=n.createElement("span",null,eF.t("Failed to send message")),r[2]=e):e=r[2],e}if(r[3]!==l.blocks[0]){let e,t,i,o;r[5]===Symbol.for("react.memo_cache_sentinel")?(e=n.createElement("div",null,eF.t("Failed to send message")),r[5]=e):e=r[5],r[6]===Symbol.for("react.memo_cache_sentinel")?(t={className:"c-tooltip__subtitle",dir:"auto"},i=getOpeningCurlyQuote(),r[6]=t,r[7]=i):(t=r[6],i=r[7]);let s=n.createElement(e_.y,{richTextBlock:l.blocks[0],emojiSize:ef.lw.SMALL,truncateLength:50});r[8]===Symbol.for("react.memo_cache_sentinel")?(o=getClosingCurlyQuote(),r[8]=o):o=r[8],a=n.createElement(n.Fragment,null,e,n.createElement("div",t,i,s,o)),r[3]=l.blocks[0],r[4]=a}else a=r[4];return a}:function({channelId:e}){let t=(0,B.d4)(t=>(0,eD.A)(t,e));return t&&(0,eO.A)(t,!1)?n.createElement(n.Fragment,null,n.createElement("div",null,eF.t("Failed to send message")),n.createElement("div",{className:"c-tooltip__subtitle",dir:"auto"},getOpeningCurlyQuote(),n.createElement(e_.y,{richTextBlock:t.blocks[0],emojiSize:ef.lw.SMALL,truncateLength:50}),getClosingCurlyQuote())):n.createElement("span",null,eF.t("Failed to send message"))};eU.displayName="FailedMessagePreview";var eB=a(0x8baf11b5),eH=a(0x850bedf0),eW=a(0x21c11a1dc),eV=a(0x1297c5b76),eG=a.n(eV);let eq=(0,C.DA)()?function(e){let t,a,r,i,l,o=(0,k.c)(56),{channelId:s,isIm:c,showPending:d,badgeCount:m,isUnread:u,showDraft:p,hasDraftText:_,numDraftFiles:f,hasFailedMessage:b,className:g,isHuddlesAllowed:y,experimentHuddlesStatusUltraGroupOn:A,experimentSidebarDotUnreadGroupOn:x,displayAsHovered:C}=e,v=void 0===m?0:m,S=void 0!==u&&u,I=void 0!==p&&p,w=void 0!==_&&_,T=void 0===f?0:f,N=void 0!==b&&b,M=void 0===g?"":g,R=void 0!==y&&y,P=void 0!==x&&x,L=void 0!==C&&C;o[0]!==s?(t=e=>(0,eB.B)(e,s),o[0]=s,o[1]=t):t=o[1];let O=(0,B.d4)(t),D=(0,B.d4)(eH.UG);o[2]!==s?(a=e=>(0,eH.ul)(e,s),o[2]=s,o[3]=a):a=o[3];let F=(0,B.d4)(a);o[4]!==s||o[5]!==R?(r=e=>!!R&&(0,eW.LY)(e,s)>0,o[4]=s,o[5]=R,o[6]=r):r=o[6];let U=(0,B.d4)(r),H=v>0,W=(0,B.d4)(Y.zF);o[7]!==v||o[8]!==L||o[9]!==W||o[10]!==F||o[11]!==D?(i=()=>{let e=ec.HY.pill;return W&&(e=ec.HY.pillCompact),D&&!F&&(e=ec.HY.dot),n.createElement(ec.Gm,{count:v,className:"p-channel_sidebar__badge p-channel_sidebar__badge--sidebar-section-header-update",shape:e,style:ec.rY.themed,"data-qa":"sidebar-channel-badge-suffix",displayAsHovered:L})},o[7]=v,o[8]=L,o[9]=W,o[10]=F,o[11]=D,o[12]=i):i=o[12];let V=i,G=channel_suffix_temp;if(!I&&!d&&!H&&!N&&c&&!U&&void 0!==A&&A&&!(P&&S))return null;if(o[13]!==s||o[14]!==M||o[15]!==P||o[16]!==H||o[17]!==w||o[18]!==N||o[19]!==O||o[20]!==R||o[21]!==S||o[22]!==T||o[23]!==V||o[24]!==I||o[25]!==U||o[26]!==d||o[27]!==D){let e,t,a,r,i,c,m,u,p=O?"p-channel_sidebar__channel_suffix--muted":"";o[29]!==M||o[30]!==p?(e=h()("p-channel_sidebar__channel_suffix",p,M),o[29]=M,o[30]=p,o[31]=e):e=o[31],o[32]!==e?(t={className:e,"data-qa":"sidebar-channel-suffix"},o[32]=e,o[33]=t):t=o[33],o[34]!==s||o[35]!==w||o[36]!==T||o[37]!==I?(a=I&&n.createElement(eE,{channelId:s,hasDraftText:w,numDraftFiles:T}),o[34]=s,o[35]=w,o[36]=T,o[37]=I,o[38]=a):a=o[38],o[39]!==s||o[40]!==R||o[41]!==U?(r=R&&U&&n.createElement(eR,{channelId:s}),o[39]=s,o[40]=R,o[41]=U,o[42]=r):r=o[42],o[43]!==d?(i=d&&n.createElement(eL,null),o[43]=d,o[44]=i):i=o[44],o[45]!==H||o[46]!==V?(c=H&&V(),o[45]=H,o[46]=V,o[47]=c):c=o[47],o[48]!==P||o[49]!==H||o[50]!==S||o[51]!==D?(m=P&&S&&!H&&!D&&G(),o[48]=P,o[49]=H,o[50]=S,o[51]=D,o[52]=m):m=o[52],o[53]!==s||o[54]!==N?(u=N&&n.createElement("div",{className:eG().messageFailureSuffix},n.createElement(ed.Ay,{tip:n.createElement(eU,{channelId:s})},n.createElement(E.Ah,{name:"warning-filled","data-qa":"sidebar-channel-message-failure-suffix"}))),o[53]=s,o[54]=N,o[55]=u):u=o[55],l=n.createElement("span",t,a,r,i,c,m,u),o[13]=s,o[14]=M,o[15]=P,o[16]=H,o[17]=w,o[18]=N,o[19]=O,o[20]=R,o[21]=S,o[22]=T,o[23]=V,o[24]=I,o[25]=U,o[26]=d,o[27]=D,o[28]=l}else l=o[28];return l}:function({channelId:e,isIm:t,showPending:a,badgeCount:r=0,isUnread:i=!1,showDraft:l=!1,hasDraftText:o=!1,numDraftFiles:s=0,hasFailedMessage:c=!1,className:d="",isHuddlesAllowed:m=!1,experimentHuddlesStatusUltraGroupOn:u=!1,experimentSidebarDotUnreadGroupOn:p=!1,displayAsHovered:_=!1}){let f=(0,B.d4)(t=>(0,eB.B)(t,e)),b=(0,B.d4)(eH.UG),g=(0,B.d4)(t=>(0,eH.ul)(t,e)),y=(0,B.d4)(t=>!!m&&(0,eW.LY)(t,e)>0),A=r>0,x=(0,B.d4)(Y.zF),C=(0,n.useCallback)(()=>{let e=ec.HY.pill;return x&&(e=ec.HY.pillCompact),b&&!g&&(e=ec.HY.dot),n.createElement(ec.Gm,{count:r,className:"p-channel_sidebar__badge p-channel_sidebar__badge--sidebar-section-header-update",shape:e,style:ec.rY.themed,"data-qa":"sidebar-channel-badge-suffix",displayAsHovered:_})},[r,_,x,g,b]),k=(0,n.useCallback)(()=>n.createElement("div",{className:h()("p-channel_sidebar__badge",eG().badgeDot)}),[]);return l||a||A||c||!t||y||!u||p&&i?n.createElement("span",{className:h()("p-channel_sidebar__channel_suffix",f?"p-channel_sidebar__channel_suffix--muted":"",d),"data-qa":"sidebar-channel-suffix"},l&&n.createElement(eE,{channelId:e,hasDraftText:o,numDraftFiles:s}),m&&y&&n.createElement(eR,{channelId:e}),a&&n.createElement(eL,null),A&&C(),p&&i&&!A&&!b&&k(),c&&n.createElement("div",{className:eG().messageFailureSuffix},n.createElement(ed.Ay,{tip:n.createElement(eU,{channelId:e})},n.createElement(E.Ah,{name:"warning-filled","data-qa":"sidebar-channel-message-failure-suffix"})))):null};function channel_suffix_temp(){return n.createElement("div",{className:h()("p-channel_sidebar__badge",eG().badgeDot)})}eq.displayName="ChannelSuffix";let ej=n.memo(eq);var ez=a(0x1cae4d14b),eK=a(0x251135419),e$=a(0x889d7d4a),eY=a(0x1002e1f2c),eQ=a(0x1789e94fa);let eZ=n.lazy(()=>Promise.resolve().then(a.bind(a,0x21057f35f)).then(e=>({default:e.MutedChannelsReactiveCoachmark}))),eJ={spaceName:H.xu.IN_PRODUCT_COACHMARK,notifications:{[H.ze.EDUCATION_HIDE_MUTED_CHANNELS_COACHMARK]:{component:eZ}}};var eX=a(0x2a101827),e0=a(0xe1644a69),e1=a(0x190a9df19),e2=a(0x3711e82d),e4=a(0xafce781a),e5=a(0x1321e517b),e3=a.n(e5);let e6=new o.Ay("ia4"),e8="p-nux_tractor_channel_coachmark--solutions_onboarding",SolutionsOnboardingTractorChannelCoachmark=({children:e,renderCoachmark:t,UNSAFE_parentSelector:a,onClose:r,tractorChannel:i,onAfterOpen:l=()=>{},isCreatorVariant:o,hero:s,autoClogProps:c})=>{let d=o?e6.t("Meet {tractorChannel}, your team\u2019s first channel",{tractorChannel:i}):e6.t("Meet channels, where the magic happens"),m=e6.t("Channels keep your work focused, giving each topic or project a space for all the related messages, files, people and more."),u=e6.t("Check It Out"),p=e6.t("Channels keep your work focused, giving each topic or project a space for all the related messages, files, people and more."),h=t({title:d,bodyText:m,centerOnArrow:!0,offsetX:-30,offsetY:0,arrowPosition:30,closeCoachmark:r,orientation:S.YC.Right,primaryCallToActionText:u,ariaLabel:p,onClickPrimaryButton:r,className:e8,onAfterOpen:l,autoClogProps:c,hero:s,closeBackgroundStyle:"light",UNSAFE_parentSelector:a,isModal:!0});return n.createElement(S.Ay,{coachmarkElement:h,orientation:"right"},e)};SolutionsOnboardingTractorChannelCoachmark.displayName="SolutionsOnboardingTractorChannelCoachmark";let solutions_onboarding_tractor_channel_coachmark_WrappedTractorChannelCoachmark=({children:e,channelName:t,renderCoachmark:i,closeCoachmark:l,isCreator:o})=>{let s=(0,r.wA)(),c=(0,B.d4)(e=>(0,U.ty)(e,"a11y_animations")),d=t?.length?`#${t}`:"",m=o&&!!d?.length,u={eventId:e2.EventId.NEWXP_TEAM_CREATE,uiComponentVariant:m?"team_creator":"team_joiner",elementName:"solutions_onboarding_welcome_coachmark",elementType:e2.ElementType.COACHMARK},{onAfterOpen:p}=(0,P.j)({className:e8,highlightPadding:{top:55,bottom:30,left:8,right:8},backgroundClassName:h()(P.P,e3().tractorChannelCoachmark)}),{clogDismissFromOverlay:_}=(0,R.V)(e8,u),f=(0,n.useCallback)(e=>{s((0,W.O6)(!0)),_(e),l(),s((0,e4.iR)({event:{type:H.jo.REQUEST_SPACES,spaces:[H.xu.PROGRESSIVE_DISCLOSURE]},reason:"solutions-onboarding-dismiss-tractor-channel-coachmark"}))},[_,l,s]),b=(0,n.useCallback)(()=>a.e("lottie-tractor-channel.json").then(a.t.bind(a,0x18265a97c,23)),[]),g=(0,n.useMemo)(()=>c?n.createElement(D.e,{autoplay:!0,className:"p-nux_coachmark__hero p-nux_coachmark--rounded",getAnimationImport:b,svgClassName:"p-nux_coachmark--rounded","data-qa":T.s.TRACTOR_ANIMATION}):n.createElement("img",{alt:"","aria-hidden":!0,src:V,"data-qa":T.s.TRACTOR_IMAGE,className:"p-nux_coachmark__hero p-nux_coachmark--rounded"}),[b,c]);return n.createElement(SolutionsOnboardingTractorChannelCoachmark,{renderCoachmark:i,onClose:f,tractorChannel:d,onAfterOpen:p,isCreatorVariant:m,hero:g,autoClogProps:u},e)};solutions_onboarding_tractor_channel_coachmark_WrappedTractorChannelCoachmark.displayName="WrappedTractorChannelCoachmark";let ConnectedSolutionsOnboardingTractorChannelCoachmark=({channelName:e,children:t})=>{let a=H.ze.SOLUTIONS_ONBOARDING_WELCOME_CHANNEL_COACHMARK,{closeCoachmark:r,renderCoachmark:i,isOpen:l}=(0,F.A)(a,H.xu.WELCOME_SPACE),o=(0,B.d4)(e1.$G);return l?n.createElement(solutions_onboarding_tractor_channel_coachmark_WrappedTractorChannelCoachmark,{renderCoachmark:i,closeCoachmark:r,isCreator:o,channelName:e},t):t};ConnectedSolutionsOnboardingTractorChannelCoachmark.displayName="ConnectedSolutionsOnboardingTractorChannelCoachmark";var e7=a(0x8b588d25),e9=a(0x12185e091),te=a(0x280afe13),tt=a(0x6f213e53),ta=a(0x114ffe897),tn=a(0x1b154a8c4),tr=a(0x74bbb29a),ti=a(0x1650f6656),tl=a.n(ti);let to=[tr.ml.AddChannels],ts=(0,y.getGenericLogger)(),tc=class extends A.B{static defaultProps={isSelected:!1,isYou:!1,isMuted:!1,isStarred:!1,isGuestMember:!1,isSuggested:!1,hasDraft:!1,hasDraftText:!1,numDraftFiles:0,hasHuddle:!1,hasAnyUnknownMembers:!1,hideCloseButton:void 0,isSalesforceChannelsXOutChannelEnabled:!1,displayName:"",qaChannelName:"",badgeCount:0,userActive:!0,closeChannel:()=>g.S.resolve(),dismissSuggestedChannel:_.A,isTyping:!1,members:null,index:void 0,sectionChannelIndex:void 0,showDraftsPageSidebar:!1,showDraftIcon:!1,isEditMode:!1,isEditModeSelectedChannelId:!1,connectDragDropRef:f.A,connectDragPreview:f.A,channelDropIndicatorAbove:!1,channelDropIndicatorSides:!1,channelDropIndicatorBelow:!1,channelSectionDropIndicatorAbove:!1,channelSectionDropIndicatorBelow:!1,channelDropIneligible:!1,hasFailedMessage:!1,externalOrgNameForMember:void 0,isPending:!1,shouldShowProgDiscSuccessCoachmark:!1,isList:!1,isHuddlesAllowed:!1,experimentHuddlesStatusUltraGroupOn:!1,channelTeam:void 0,tractorOrGeneralChannelId:"",isAiRecapEnabled:!1,isChannelDigested:!1,isEligibleForDecorateDefaultChannels:!1,showSolutionsOnboardingTractorChannelCoachmark:!1,isGeneralOrRandomChannel:!1,isBBModeEnabled:!1,hasUnreadThreads:!1,canLeaveChannel:!0,experimentBulkLeaveChannelsSidebarGroupOn:!1,wasExternalChannelsTrial:!1,isEligibleForInviterJoinerDmPartyHat:!1,isFrozenAndInGracePeriod:!1,isDragging:!1,experimentImproveMutePrefGroupOn:!1,mutedChannelCoachmarkChannelId:"",isSalesforceAppDM:!1,isSilentSidebarActive:!1,experimentSidebarVisualUpdatesM1Enabled:!1,experimentSidebarDotUnreadGroupOn:!1};state={isHovered:!1};constructor(e){super(e),this.closeChannel=this.closeChannel.bind(this),this.connectLinkRef=this.connectLinkRef.bind(this),this.closeSuggestedChannel=this.closeSuggestedChannel.bind(this)}componentDidMount(){let{isEligibleForDecorateDefaultChannels:e,isGeneralOrRandomChannel:t,clogger:a}=this.props;t&&e&&a.track(e2.EventId.NEWXP_TEAM_CREATE,{contexts:{ui_context:{ui_step:"decorate_general_random_entry_point",action:e2.UiAction.IMPRESSION}}})}connectLinkRef(e){this.props.connectDragDropRef(e)}closeChannel(e){let{channel:t,clogger:a,isSalesforceAppDM:n}=this.props;e.preventDefault(),e.stopPropagation(),ts.action(e$.o,`Closed ${t.id}`),n&&a.track(e2.EventId.LOB_SALESFORCE_INTEGRATIONS,{contexts:{ui_context:{action:"CLICK",ui_properties:{element_name:"close_salesforce_app_dm"}}}}),this.props.closeChannel({channelId:t.id})}closeSuggestedChannel(e){let{channel:t,index:a,isSelected:n,clogger:r,dismissSuggestedChannel:i}=this.props;e.preventDefault(),e.stopPropagation(),ts.action(e$.o,`Closed suggested channel ${t.id}`),i({channelId:t.id,isSelected:n}),r.track(e2.EventId.SIDEBAR_ITEM_SUGGESTED_CLOSE,{item_type:t.id[0],item_id:t.id,index:a,is_selected:n})}shouldShowClose(){let{channel:e,isStarred:t,isSuggested:a,hasDraft:n,hasHuddle:r,hideCloseButton:i,isPending:l,isInAnyChannelSection:o,isEditMode:s,isSalesforceChannelsXOutChannelEnabled:c}=this.props;return shouldShowCloseButton({channel:e,isSuggested:a,hideCloseButton:i,isStarred:t,isInAnyChannelSection:o,isEditMode:s,hasDraft:n,hasHuddle:r,isPending:l,isSalesforceChannelsXOutChannelEnabled:c})}getIsEditModeSelected(){return this.props.isEditModeSelectedChannelId}getSidebarChannelUiInfo(e){let{isYou:t,isMuted:a,isSuggested:n,isSelected:r,isTyping:i,showDraftsPageSidebar:l,channel:o,isEditMode:s,channelDropIndicatorAbove:c,channelDropIndicatorSides:d,channelDropIndicatorBelow:m,channelSectionDropIndicatorAbove:u,channelSectionDropIndicatorBelow:p,channelDropIneligible:h,isPending:_,isList:f,isBBModeEnabled:b,hasUnreadThreads:g,isDragging:y,isSilentSidebarActive:A,experimentSidebarDotUnreadGroupOn:x,badgeCount:E}=this.props,C=s?this.getIsEditModeSelected():r;return{isMpim:(0,e9.yz)(o),isSlackbot:(0,ta.D)(o),isSlackSecurityBot:(0,ei.Cx)(o),isYou:t,isMuted:a,isChannelUiSelected:C,isSelected:r,isEditMode:s,isSuggested:n,isUnread:((0,ei.KJ)(o)||g)&&!f,isBadged:E>0,isArchived:(0,tt.F)(o),showDraft:e,showDraftsPageSidebar:l,isPending:_,isTyping:i,channelDropIndicatorAbove:c,channelDropIndicatorSides:d,channelDropIndicatorBelow:m,channelSectionDropIndicatorAbove:u,channelSectionDropIndicatorBelow:p,channelDropIneligible:h,isBBModeEnabled:b,isDragging:y,isSilentSidebarActive:A,experimentSidebarDotUnreadGroupOn:x}}renderEditModeCheckbox(){let e=this.getIsEditModeSelected();return n.createElement(x.A,{className:h()(tl().editModeCheckbox,{[tl().editModeCheckboxSelected]:e}),"data-qa":"edit-mode-checkbox-state",size:"inherit",inline:!0,type:e?"real-checkbox-checked":"real-checkbox-empty"})}handleMouseEnter=()=>{this.setState({isHovered:!0})};handleMouseLeave=()=>{this.setState({isHovered:!1})};render(){let e,{channelSectionId:t,isYou:a,isMuted:r,isStarred:i,isSuggested:l,isGuestMember:o,externalOrgNameForMember:s,badgeCount:c,isSelected:d,displayName:m,qaChannelName:u,isTyping:p,hasDraftText:_,numDraftFiles:f,hasAnyUnknownMembers:g,showDraftsPageSidebar:y,showDraftIcon:A,members:x,userActive:C,channel:k,isEditMode:v,hasFailedMessage:S,sectionChannelIndex:I,showAvatars:w,shouldShowProgDiscSuccessCoachmark:T,isHuddlesAllowed:N,experimentHuddlesStatusUltraGroupOn:M,channelSharedTooltipState:R,isList:P,memberId:L,hasActiveHuddle:O,shouldShowInviterText:D,channelTeam:F,tractorOrGeneralChannelId:U,isAiRecapEnabled:B,isChannelDigested:H,showSolutionsOnboardingTractorChannelCoachmark:W,wasExternalChannelsTrial:V,isFrozenAndInGracePeriod:G,sharedChannelSectionCoachmarkChannelId:q,experimentImproveMutePrefGroupOn:$,experimentSidebarDotUnreadGroupOn:Y,mutedChannelCoachmarkChannelId:Q,isEligibleForInviterJoinerDmPartyHat:Z,isSilentSidebarActive:J,isAppIm:X,onClick:ee}=this.props,et=this.getSidebarChannelUiInfo(A),en=this.shouldShowClose(),el=h()((({isMpim:e,isSlackbot:t,isYou:a,isChannelUiSelected:n,isSelected:r,isEditMode:i,isMuted:l,isSuggested:o,isUnread:s,isBadged:c,isArchived:d,showDraft:m,showDraftsPageSidebar:u,isPending:p,isTyping:_,isDragging:f,channelDropIndicatorAbove:b,channelDropIndicatorSides:g,channelDropIndicatorBelow:y,channelSectionDropIndicatorAbove:A,channelSectionDropIndicatorBelow:x,channelDropIneligible:E,isBBModeEnabled:C,isSilentSidebarActive:k,experimentSidebarDotUnreadGroupOn:v})=>h()("p-channel_sidebar__channel",{"p-channel_sidebar__channel--mpim":e,"p-channel_sidebar__channel--im-slackbot":t,"p-channel_sidebar__channel--im-you":a,"p-channel_sidebar__channel--selected":n&&!C,"p-channel_sidebar__channel--muted":l,"p-channel_sidebar__channel--suggested":o,"p-channel_sidebar__channel--unread":s&&!d&&!k&&(!v||c),"p-channel_sidebar__channel--draft":m&&u,"p-channel_sidebar__channel--pending":p,"p-channel_sidebar__channel--typing":_&&!r,"p-channel_sidebar__channel--edit-mode":i,"p-channel_sidebar__channel--bbm":C,"p-channel_sidebar__drop_target_indicator--channel_above":b,"p-channel_sidebar__drop_target_indicator--channel_sides":g,"p-channel_sidebar__drop_target_indicator--channel_below":y,"p-channel_sidebar__drop_target_indicator--channel_section_above":A,"p-channel_sidebar__drop_target_indicator--channel_section_below":x,"p-channel_sidebar__drop_target_indicator--ineligible":E,"p-channel_sidebar__channel--is_dragging":f}))({...et}),{"p-channel_sidebar__channel--has-badge":c&&c>0,"p-channel_sidebar__channel--show-avatars":w,"p-channel_sidebar__channel--hide-avatars":!w}),ec=(0,te.e)(k)||k?.user_id,ed=(0,e9.rI)(k),em=(0,e7.jT)(k),eu=(0,e9.yz)(k)&&x?x[0]:void 0,ep=eu&&w?(0,ei.N4)(k):void 0,eh=(0,eY.A)({channel:k,isSelected:d,isTyping:p}),e_=(0,eK.A)({channel:k,isList:P,isFrozenAndInGracePeriod:G,isSuggested:l,wasExternalChannelsTrial:V}),ef=!!(0,ei.KJ)(k)&&!J,eb=n.createElement(es.A,{memberIdFromIm:ec,isSlackbotChannel:(0,ta.D)(k),isSlackSecurityBotChannel:(0,ei.Cx)(k),isUnread:ef,mpimMemberCount:ep||void 0,isSelected:d,isTyping:p,"data-qa":"channel_prefix",isAppIm:X,channelNameNormalized:"",showAvatars:w,showPresence:eh,mpimMember:eu,iconType:e_,isMuted:r,includePartyHat:Z}),eg=n.createElement(ej,{badgeCount:c,isUnread:ef,channelId:k.id,isIm:(0,e9.LI)(k),showPending:(0,tn.M)(k),showDraft:y&&A,hasDraftText:_,numDraftFiles:f,"data-qa":"channel_suffix",hasFailedMessage:S,className:O?"margin_left_0":"",isHuddlesAllowed:N,experimentHuddlesStatusUltraGroupOn:M,experimentSidebarDotUnreadGroupOn:Y,displayAsHovered:this.state.isHovered}),ey=n.createElement(eo.A,{channelId:k.id,channelIsIm:(0,e9.LI)(k),channelIsMpim:(0,e9.yz)(k),memberIdFromIm:ec,displayName:m,qaChannelName:u,isYou:a,isUnknown:g,isGuestMember:o,externalOrgNameForMember:s,members:x,userActive:C,"data-qa":"channel_name",shouldShowInviterText:D,hasSharedChannelTooltip:k&&R!==ez.t.None,channelTeam:F,isRecordChannel:ed,recordLabel:em,topic:(0,ei.cU)(k)}),eA=this.renderEditModeCheckbox();switch(this.props.connectDragPreview((0,b.n)(),{captureDraggingState:!0}),R){case ez.t.ExternallySharedPending:e=ez.t.ExternallySharedPending;break;case ez.t.ExternallyShared:e=ez.t.ExternallyShared;break;case ez.t.OrgShared:e=ez.t.OrgShared}let ex=O?n.createElement(K.A,{memberId:L,className:"p-channel_sidebar__channel_custom_status",viewContext:"sidebar",currentChannelId:k.id}):null,eE=B&&H?n.createElement("div",{className:h()(tl().digestIcon,"margin_left_25"),"data-digest-icon":!0},n.createElement(e0.o,{inline:!0,type:"sparkles"})):null,eC=$&&r?n.createElement("div",{className:tl().mutedIcon},n.createElement(E.Ah,{name:"notifications-off"})):null,ek=this.props.experimentSidebarVisualUpdatesM1Enabled&&(0,e9.LI)(k)&&!(0,e9.yz)(k)&&ec?n.createElement(z.A,{memberId:ec,className:"p-channel_sidebar__custom_status"}):null,ev=en?n.createElement(er,{onClose:l?this.closeSuggestedChannel:this.closeChannel}):null,eS=n.createElement("div",{ref:this.connectLinkRef,className:el,"data-user-count":(0,ei.N4)(k)||0,"data-section-channel-index":I,"data-qa":"channel-sidebar-channel","data-qa-channel-sidebar-channel":!0,"data-qa-channel-sidebar-channel-is-selected":d,"data-qa-channel-sidebar-channel-is-muted":r,"data-qa-channel-sidebar-channel-id":k&&k.id,"data-qa-channel-sidebar-channel-section-id":t,"data-qa-channel-sidebar-channel-type":(0,e9.mz)(k),"data-qa-channel-sidebar-is-starred":i,"data-qa-channel-sidebar-is-you":a,"data-qa-channel-sidebar-shared-type":e,"data-show-avatars":w,onClick:ee,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},v&&eA,eb,ey,ek,eE,ex,eC,eg,ev);return W&&(eS=n.createElement(ConnectedSolutionsOnboardingTractorChannelCoachmark,{channelName:m},eS)),U===this.props.id&&this.props.isSelected&&(eS=n.createElement(j,{tractorChannelId:k.id},eS)),T&&(eS=n.createElement(eX.Ay,{tips:to},eS)),q===k.id&&(eS=n.createElement(ea,null,eS)),$&&Q&&Q===k.id&&(eS=n.createElement(eQ.A,{spaceName:eJ.spaceName,notifications:eJ.notifications,channelSectionId:t,shouldAlwaysRenderChildren:!0},eS)),eS}};tc.displayName="Channel";var td=a(0xca4cbd80),tm=a(0x1f903450c),tu=a(0x245dcaf6b),tp=a(0xf6ed6f31),th=a(0x1b9d5cc0c),t_=a(0x4cdbb756),tf=a(0x11c82607b),tb=a(0x217553e42),tg=a(0xe684f705);let ty=(0,tf.Ay)("Clog joining a suggested channel",(e,t,{channelId:a,clogger:n,index:r,sectionChannelIndex:i,isSelected:l,isChannelSectionDirectMessages:o})=>{let s=t(),c=(0,tb.OL)(s,a),d=(0,U.ty)(s,"suggestions_request_id"),m=!!(c&&!(0,tp.bl)(c)&&(0,ei.FT)(s,c)),u=(0,U.Vz)(s);if(m&&d){let e=m?u.split(",").indexOf(a):0;(0,td.Gx)({clogger:n,data:{requestId:d,selectedItemId:a,selectedPosition:e,selectedAction:"preview"}})}let p=(0,te.e)(c),h=!1;o&&p&&(h=u.includes(a)),h&&d&&p&&((0,tm.s)({clogger:n,data:{requestId:d,selectedItemId:p,selectedPosition:i,selectedAction:"preview"}}),e((0,W.jt)(i)));let _=(0,tg.nv)(s,p),f=(0,t_.A)(s,_)||void 0,b=(0,th.PV)(_)||void 0,g=c?(0,tb.TJ)(s,c):0;n.track(e2.EventId.SIDEBAR_ITEM_CLICK,{item_type:a[0],item_id:a,index:r,is_muted:(0,eB.B)(s,a),is_suggested:m,is_record_channel:(0,e9.rI)(c),is_starred:(0,ei.m2)(s,c),has_unreads:(0,ei.KJ)(c),is_archived:(0,tt.F)(c),is_frozen:(0,tu.Zz)(c),is_selected:l,badge_count:g,app_id:b,bot_id:f})});ty.meta={name:"clogChannelClick",key:"createThunkClogChannelClick",description:"Clog joining a suggested channel"};var tA=a(0x20b4dda68),tx=a(0xb2231927),tE=a(0x10027d8bc),tC=a(0xbaaab71e),tk=a(0xd6a16321),tv=a(0x19d55d0e1),tS=a(0x20679dcfc),tI=a(0x70de3606),tw=a(0x1c9a3c4c1);let tT=(0,a(0x1cf0d97e1).Ay)((e,t)=>{let a=(0,tb.OL)(e,t);if(!(0,e9.LI)(a))return!1;let n=(0,te.e)(a),r=(0,tg.nv)(e,n);return(0,tw.D)(r)});tT.meta={name:"isAgentforceIm",key:"createSelectorIsAgentforceIm",description:(e,t)=>{let a=(0,tb.OL)(e,t);if(!(0,e9.LI)(a))return!1;let n=(0,te.e)(a),r=(0,tg.nv)(e,n);return(0,tw.D)(r)}};var tN=a(0x233ef96bd),tM=a(0x21c55473c),tR=a(0x11cdf8541),tP=a(0x1b7e07763),tL=a(0x8bf2baac),tO=a(0x665ca02e),tD=a(0x1ed65ccda);let tF=(0,tf.Ay)("Navigate to a channel with unread",async(e,t,{channelId:a},n)=>{let r=n(tR.C).windowId;e((0,tO.D_)({channelId:a,isLoading:!0,isSplitView:!1,windowId:r})),e((0,tD.T)({channelId:a,isSplitView:!1}));let i=await e((0,tP.N)({channel:a,reason:"navigate_to_agent_dm_channel_with_unread"})),{channelData:l}=(0,tM.W)(i),o=l?.latest;o&&"string"==typeof o&&(e((0,tO.ed)({channelId:a,threadTs:o,isSplitView:!1,windowId:r})),e((0,tL.CW)({id:a,ts:o,reason:"navigate-to-agent-dm-channel-with-unread"}))),e((0,tO.D_)({channelId:a,isLoading:!1,isSplitView:!1,windowId:r}))});tF.meta={name:"navigateToAgentDmChannelWithUnread",key:"createThunkNavigateToAgentDmChannelWithUnread",description:"Navigate to a channel with unread"};var tU=a(0xbd3de346),tB=a(0x14ea3ce99),tH=a(0x62a17882),tW=a(0x1a02c72b5),tV=a(0x6d72337),tG=a(0x1fdf007c4),tq=a(0x19895585a);let tj=(0,tf.Ay)("Open a list from sidebar",(e,t,{id:a})=>{if((0,tH.y3)()||(0,tG.S)()){let t={[tq.mq.Primary]:(0,tk.st)({listId:a})};e((0,tV.Bb)({viewSet:t}));return}e((0,tW.o)((0,tk.st)({listId:a})))});tj.meta={name:"openListFromSidebar",key:"createThunkOpenListFromSidebar",description:"Open a list from sidebar"};let tK=(0,tf.Ay)("Open a file channel from sidebar",(e,t,{fileChannelId:a})=>{let n=t(),r=(0,tB.Lp)(n,a);return!!(r&&(0,tU.l7)(r))&&(e(tj({id:a})),!0)});tK.meta={name:"openFileChannelFromSidebar",key:"createThunkOpenFileChannelFromSidebar",description:"Open a file channel from sidebar"};var t$=a(0x93a9f6f3),tY=a(0x1067595c0);let tQ=(0,tf.Ay)("Navigate to the selected channel",(e,t,{e:a,channelId:n},r)=>{let i=t(),l=(0,tb.OL)(i,n);if((0,tI.fn)(i)&&(0,tv.jT)(l)&&e(tK({fileChannelId:(0,tS.l)(n)})))return;let{getPrimaryView:o}=r(tC.U),s=o(i);if(n===s?.id&&e((0,tN._)({channelId:n})),tT(i,n)){let t=(0,tY.ty)(i);if((t?.[n]?.unreadCnt??0)>0)return void e(tF({channelId:n}))}let c=(0,tb.o2)(i,tA.Q$),d=(0,tE.gT)(i)&&c&&n===c?(0,tk.up)(n,t$.XM.Sidebar,(0,tE.gT)(i)):(0,tk.pr)(n);e((0,tx.n)({e:a,navProps:d}))});tQ.meta={name:"onChannelSelect",key:"createThunkOnChannelSelect",description:"Navigate to the selected channel"};var tZ=a(0x48071695),tJ=a(0x7f81b930),tX=a(0x1be9380c8),t0=a(0x11ed04fa0),t1=a(0xd843ab47),t2=a(0x238b287cf),t4=a(0xef6c3caa),t5=a(0x209fb16e4),t3=a(0x1ecc7f772),t6=a(0x136bdf2c4),t8=a(0xc1963a64),t7=a(0x9c7d2aa9),t9=a(0x6556c7bb),ae=a(0xebdd009e),at=a(0x82980ab8),aa=a(0xdb0ffe37),an=a(0x23255e234),ar=a(0x1aad32b98),ai=a(0xa1832ae4),al=a(0x155965105),ao=a(0x5738b4bc),as=a(0xcaa08ff7),ac=a(0x9b971e7e),ad=a(0x1d600678),am=a(0x68b4cd4e),au=a(0x9ae53e23),ap=a(0x130c2e810),ah=a(0xc9f59321),a_=a(0x154700aaa),af=a(0xe6b69a0a),ab=a(0x5e7c6650),ag=a(0x20c81ddcb),ay=a(0x8f36a342);let aA=(0,tf.Ay)("drag and drop: build the DRAG_CHANNEL_SIDEBAR_CHANNELS item",(e,t,{channelId:a,channelSectionId:n})=>{let r=t(),i=(0,Z.jV)(r),l={},o=(0,tX.pc)(r);Object.values(i).forEach(e=>{switch(e.type){case ay.VZ.Stars:l[ay.VZ.Stars]=e;break;case ay.VZ.Channels:l[ay.VZ.Channels]=e;break;case ay.VZ.DirectMessages:l[ay.VZ.DirectMessages]=e;break;case ay.VZ.RecentApps:l[ay.VZ.RecentApps]=e;break;case ay.VZ.Agents:l[ay.VZ.Agents]=e;break;case ay.VZ.SlackConnect:l[ay.VZ.SlackConnect]=e;break;case ay.VZ.SalesforceRecords:l[ay.VZ.SalesforceRecords]=e}});let s=!!l[ay.VZ.Stars],c={},getSidebarSectionCategory=e=>{if(!c[e.id]){let t=(0,Z.VH)(r);c[e.id]=(0,a_.C)({channel:e,isStarred:(0,ei.m2)(r,e),isApp:(0,af.J)(e,(0,tg.Zo)(r)),isAgent:(0,ap.yB)(r,e),shouldSeparateApps:(0,ab.eb)(r),isAiApp:(0,ag.zf)(r,e),allowAssignmentToStarredSection:!1,showConnectSection:(0,ah.A)(r)&&t.some(e=>e.type===ay.VZ.SlackConnect),isSalesforceApp:o&&(0,au.y)(r,e)})}return c[e.id]},d=[{channelId:a,channelSectionId:n}];(0,Z.Ou)(r)&&(0,Z.a2)(r).forEach(e=>{let t=getSidebarSectionCategory(e),a=(0,ei.m2)(r,e)&&s?[l[ay.VZ.Stars].id]:(0,Z.qu)(r,e.id);0===a.length&&(t===ay.ns?a.push(l[ay.VZ.Channels].id):t===ay.GR?a.push(l[ay.VZ.DirectMessages].id):t===ay.rU?a.push(l[ay.VZ.RecentApps].id):t===ay.Tr?a.push(l[ay.VZ.Agents].id):t===ay.VZ.SalesforceRecords&&a.push(l[ay.VZ.SalesforceRecords].id)),a.forEach(t=>{d.push({channelId:e.id,channelSectionId:t})})});let m=new Set,u=[];return d.forEach(e=>{if(!m.has(e.channelId)&&e.channelSectionId){let t=(0,tb.OL)(r,e.channelId);m.add(e.channelId),u.push({channel:t,channelSection:i[e.channelSectionId],sidebarSectionCategory:getSidebarSectionCategory(t)})}}),u});aA.meta={name:"buildDragItemsForChannelSidebarChannels",key:"createThunkBuildDragItemsForChannelSidebarChannels",description:"drag and drop: build the DRAG_CHANNEL_SIDEBAR_CHANNELS item"};var ax=a(0x1e3eb45fd),aE=a(0x365a4cc3),aC=a(0x21bfacd01),ak=a(0x1529cf960),av=a(0x1e25c919a),aS=a(0x4f86f8f5),aI=a(0x8568bdf8),aw=a(0x16d481b37),aT=a(0xd76c2ee8),aN=a(0x1c030e023),aM=a(0x14149c126),aR=a(0xf9cb31c6),aP=a(0x13d894892),aL=a(0x140b65eaf),aO=a(0x2207a1e7d),aD=a(0x206196e71),aF=a(0x18a17ca8f),aU=a(0xfd109cfc),aB=a(0x19dffa924),aH=a(0x1de0eefdb),aW=a(0x1ee439e69),aV=a(0x4513653f),aG=a(0x9271cc31);let aq=new o.Ay("client"),aj={channelSectionId:void 0},az={memberId:void 0,botId:void 0,appId:void 0,externalOrgNameForMember:void 0,isGuestMember:void 0,huddleChannelId:void 0,userActive:!1,isTyping:!1,realNameLc:void 0,channelIsSelfIm:!1,isSalesforceAppDM:!1};function ConnectedChannel({id:e,channelSection:t,index:a,sectionChannelIndex:o,rowPosition:p,priorDisplayedChannelSectionId:h,finalDisplayedChannelSectionId:_,isSlackbotQuickviewLink:f=!1,onEditModeSelect:b}){let g,y=(0,r.wA)(),A=(0,t2.A)(),x=(0,B.d4)(c.K),E=(0,B.d4)(Y.in),C=(0,B.d4)(aC.V),k=(0,B.d4)(Z.Ou),v=(0,B.d4)(t=>(0,Z.DV)(t,e)),S=(0,B.d4)(tX.c8),I=(0,B.d4)(e=>(0,ae.pt)(e)||(0,aP.s)(e)),w=(0,B.d4)(aR.Ie),T=(0,B.d4)(tI.Fh),N=(0,B.d4)(t=>(0,tb.OL)(t,e)),M=(0,e9.LI)(N),R=(0,e9.yz)(N),P=(0,B.d4)(e=>!!(!(0,tp.bl)(N)&&(0,ei.FT)(e,N))),L=(0,B.d4)(as.MY),O=t?.type===ay.VZ.Priority,D=N.vip_count&&N?.vip_count>0,F=L&&(M&&(0,te.e)(N)&&L.includes((0,te.e)(N)||"")||R&&(0,i.A)((0,ei.Ug)(N)||[],L).length>0),H=!!(O&&(F||D)),W=(0,B.d4)(t=>(0,al.Y9)(t,e)),V=(0,B.d4)(Z.jY),G=(0,B.d4)(t=>(0,aB.Kr)(t,e)),q=(0,B.d4)(e=>(0,ac.kN)(e)?.length??0),j=(0,B.d4)(aF.xS),z=(0,B.d4)(e=>{let t=(0,av.U)(e)?.type;return t!==aS.MR.All&&t!==aS.MR.AllInternal}),K=(0,B.d4)(e=>!(0,aF.Li)(e)&&(0,aU.oh)(e)),{endDraggingSplittableItem:$}=(0,d.z)(),{connectDropTarget:Q,channelDropIndicatorAbove:J,channelDropIndicatorSides:X,channelDropIndicatorBelow:ee,channelSectionDropIndicatorAbove:et,channelSectionDropIndicatorBelow:ea,channelDropIneligible:en}=(0,u.A)({rowPosition:p,priorDisplayedChannelSectionId:h,finalDisplayedChannelSectionId:_,channelSection:t}),er=(0,n.useRef)(void 0),[{isDragging:el},eo,es]=(0,l.i)(()=>({type:tJ.XV,item:a=>(y((0,ak.di)({channelSectionId:t?.id})),{type:tJ.XV,boundingClientRect:er.current?.getBoundingClientRect(),initialClientOffset:a.getInitialClientOffset(),channelSidebarItems:y(aA({channelId:e,channelSectionId:t?.id}))}),collect:e=>x?{isDragging:e.isDragging()}:{isDragging:!1},end:()=>{y((0,ak.di)(aj)),$()},canDrag:()=>!H&&!f}),[y,t,e,x,$,H,f]),ec=(0,n.useCallback)(e=>{er.current=e,Q(e),eo(e)},[er,Q,eo]),ed=(0,B.d4)(t=>{if(!T||!(0,tv.jT)(N))return!1;let a=(0,tB.Lp)(t,(0,tS.l)(e));return a&&(0,tU.l7)(a)}),{memberId:em,appId:eu,externalOrgNameForMember:ep,isGuestMember:eh,huddleChannelId:e_,userActive:ef,isTyping:eg,realNameLc:eA,channelIsSelfIm:ex,isSalesforceAppDM:eE}=(0,B.Z2)(t=>{if(!M)return az;let a=(0,te.e)(N),n=(0,tg.nv)(t,a),r=(0,aa.g)(n)&&(0,ar.dQ)(n),i=r&&(0,aW._J)(t,r),l=(0,U.ty)(t,"show_typing");return{memberId:a,appId:(0,th.PV)(n)||void 0,externalOrgNameForMember:i?(0,ai.F1)(i):void 0,isGuestMember:(0,an.P)(n),huddleChannelId:(0,aL.A)(t,a||""),userActive:"active"===(0,aO.gd)(t,a),isTyping:!!(l&&(0,aV.rg)(t,e)),realNameLc:(0,at.j_)(n),channelIsSelfIm:(0,t8.V)(t,N),isSalesforceAppDM:(0,m.l)(n)}}),eC=(0,B.Z2)(e=>(0,t6.Z)(e,N)),ek=(0,B.d4)(e=>em?!(0,tg.TO)(e,em):!!eC&&eC.some(t=>!(0,tg.TO)(e,t))),ev=(0,B.d4)(e=>(0,aH.Qe)(e,{sectionType:t?.type,channel:N})),eS=(0,B.d4)(e=>M||R?"":(0,t3.SB)(e,N,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}));eS&&(g=eS),M&&(g=eA),R&&(g=N.name_normalized);let eI=(0,B.d4)(ey.b7),ew=(0,B.d4)(t=>(0,ey.YI)(t,(0,t7.A)(t,e))),{activeTab:eT}=(0,n.useContext)(t1.A),eN=(0,B.d4)(t=>{let a=(0,aG.F8)(t,{tab:eT,container:tq.mq.Primary});return a?.id===e||a?.params?.parentTab===e}),eM=(0,B.d4)(Z.Hj),eR=(0,B.d4)(Z.Cy),eP=(0,B.d4)(t=>(0,eB.B)(t,e)),eL=(0,B.d4)(e=>(0,ei.m2)(e,N)),eO=(0,B.d4)(e=>(0,t9.A)(e,ew)),eF=(0,B.d4)(e=>!!(0,U.ty)(e,"show_sidebar_avatars")),eU=(0,B.d4)(t=>(0,ae.Xx)(t,e)),eW=(0,B.d4)(e=>(0,tZ.N)(e,N)),eV=(0,B.d4)(e=>!!ew&&!eN&&!!(0,ao.c)(e,N)),eG=(0,B.d4)(t=>(0,Z.P0)(t,e)),eq=(0,B.d4)(t=>!!(0,eD.A)(t,e)),ej=(0,B.d4)(e=>(0,aF.DV)(e,em)),eK=(0,B.d4)(e=>N&&(0,ez.l)(e,{channel:N})),e$=(0,B.d4)(e=>(0,aI.F0)(e)&&!!(0,ei._A)(e,N)&&(0,aF.Y8)(e,{tip:tr.ml.AddChannels})),eY=(0,B.d4)(e=>(0,aT.Q)(e,{channel:N})&&q>1),eQ=(0,B.d4)(e=>(0,t5.i)((0,tb.MS)(e),N)),eZ=(0,B.d4)(e=>(0,aw.a)(e,{channel:N,xwsAlpha:eY}));eZ=(eQ||eY)&&!z?eZ:void 0;let eJ=(0,B.d4)(ax.hS),eX=(0,B.d4)(t=>!!eJ&&(0,aE.p2)(t,{channelId:e})),e0=(0,B.d4)(t=>((0,ad.x)(t,"default_channels")??[]).includes(e)),e1=(0,B.d4)(aF.te)===e,e2=(0,B.d4)(t=>!!(0,t0.BJ)(t)&&!!(0,tY.aX)(t)?.[e]),e4=(0,B.d4)(aD.bY),e5=(0,B.d4)(e=>"on"===(0,aM._Z)(e,"improve_mute_pref")),e3=(0,B.d4)(aI.Uo),e6=(0,B.d4)(e=>"on"===(0,aM._Z)(e,"sidebar_dot_unread")),e8=(0,B.d4)(eH.UG),{sendMessageToAnnouncerAPI:e7}=(0,n.useContext)(s.A),tt=(0,n.useCallback)(n=>{k?b?.(n,e):(y(tQ({e:n,channelId:e})),y(ty({channelId:e,clogger:A,index:a,isChannelSectionDirectMessages:(0,t4.m)(t?.type),isSelected:eN,sectionChannelIndex:o})),e7({message:aq.t("Channel {channelName}",{channelName:eS})}))},[t?.type,A,y,eS,e,a,k,eN,b,o,e7]);return n.createElement(tc,{id:e,channel:N,channelSectionId:t?.id,isEditMode:k,isEditModeSelectedChannelId:v,connectDragDropRef:ec,connectDragPreview:es,channelDropIndicatorAbove:J,channelDropIndicatorSides:X,channelDropIndicatorBelow:ee,channelSectionDropIndicatorAbove:et,channelSectionDropIndicatorBelow:ea,channelDropIneligible:en,index:a,sectionChannelIndex:o,isList:ed,isSelected:eN,isYou:ex,isMuted:eP,isStarred:eL,isSuggested:P,hasDraft:!!ew,hasDraftText:(0,eb.v7)(ew),numDraftFiles:eO,hasHuddle:eU,hasAnyUnknownMembers:ek,displayName:eS,qaChannelName:g,badgeCount:eW,userActive:ef,isAppIm:M&&!!eu,isTyping:eg,showDraftIcon:eV,members:eC,showDraftsPageSidebar:!!eI,clogger:A,isDropTargetOfChannelDrag:eM?.channelSectionId===t?.id,isDropTargetOfChannelSectionDragAfter:eR?.channelSectionId===t?.id&&!!eR?.isAfter,isInAnyChannelSection:eG,isGuestMember:eh,showAvatars:eF,externalOrgNameForMember:ep,hasFailedMessage:eq,isPending:(0,tn.M)(N),shouldShowProgDiscSuccessCoachmark:e$,closeChannel:(0,n.useCallback)(e=>y((0,aN.U)(e)),[y]),dismissSuggestedChannel:(0,n.useCallback)(e=>y((0,am.B)(e)),[y]),channelSharedTooltipState:eK,memberId:em,hasActiveHuddle:!!e_,isHuddlesAllowed:I,experimentHuddlesStatusUltraGroupOn:w,shouldShowInviterText:ej,channelTeam:eZ,tractorOrGeneralChannelId:j,isAiRecapEnabled:eJ,isChannelDigested:eX,isEligibleForDecorateDefaultChannels:K,isGeneralOrRandomChannel:e0&&!e1,isBBModeEnabled:C,showSolutionsOnboardingTractorChannelCoachmark:ev,hasUnreadThreads:e2,canLeaveChannel:W,wasExternalChannelsTrial:e4,isFrozenAndInGracePeriod:eK===ez.t.ExternallySharedPending,sharedChannelSectionCoachmarkChannelId:V,isDragging:el,experimentImproveMutePrefGroupOn:e5,mutedChannelCoachmarkChannelId:e3,isEligibleForInviterJoinerDmPartyHat:G,isSalesforceAppDM:eE,hideCloseButton:f,isSalesforceChannelsXOutChannelEnabled:S,onClick:tt,isSilentSidebarActive:e8,experimentSidebarVisualUpdatesM1Enabled:E,experimentSidebarDotUnreadGroupOn:e6})}ConnectedChannel.displayName="ConnectedChannel";let aK=n.memo(ConnectedChannel)},0xda62d37c:(e,t,a)=>{"use strict";a.d(t,{AW:()=>createFilterSortMenuProps,Dm:()=>filterOptionsWithSections,b4:()=>getSectionDisplayName,wK:()=>splitFilterSortMenuItems});var n=a(0x20482ad21),r=a(0x410829f8),i=a(0x8f36a342);let createFilterSortMenuProps=e=>({channelSection:{id:e.sectionId,type:e.sectionType,name:e.sectionName,emoji:e.sectionEmoji||"",nextChannelSectionId:null},channelIds:[],emoji:e.sectionEmoji||"",isHovered:!1,channelSectionHasAllMutedHiddenChannels:!1,channelSectionReadHiddenChannels:[],channelSectionMutedHiddenChannels:[],channelSectionUnreadWithNoMentionsHiddenChannels:[],transitionFocusTo:()=>{},onDMBrowserModalClick:()=>{},onAppLauncherClick:()=>{},onEnterEditModeClick:()=>{},sidebarSections:{},setChannelSectionPref:e.setChannelSectionPref,getChannelSectionPref:(t,a)=>t===e.sectionId?e.sectionPrefs[a]:e.channelSectionPrefs[t||""]?.[a],enableChannelSectionEditing:!1,enableGlobalSidebarPref:!1,hasUnreads:!1,canMuteSection:!1,canUnmuteSection:!1,isEditMode:!1,isAPaidTeam:!1,showBehavior:e.showBehavior,sortBehavior:e.sortPref,unreadChannelCount:0,hasPendingChannelSectionSetRequest:!1,isClientOnline:!0,hasUnmutedUnreads:!1,canUserCreateChannels:!1,canUserCreateSlackConnectChannels:!1,potentiallyStaleSharedInvitesCanGetLinkResult:!1,isSlackConnectHubEnabled:!1,canManageSlackConnect:!1,channelSectionChannels:[],channelSectionListViews:[],hasStarredChannelsInSection:!1,isCollapsed:!1,hasAllMutedChannels:!1,readHiddenChannels:[],mutedHiddenChannels:[],unreadWithNoMentionsHiddenChannels:[],channelsWithUnmutedUnreads:[],channelsWithMutedReads:[],clogger:e.clogger,isCurrentMemberGuest:!1,experimentSimpleSharedSectionsV2GroupOn:!1,experimentIsSharedSectionsFollowUpsGroupOn:!1,isShareSectionNewBadgeVisible:!1,experimentSidebarPrefsApplyToMenusGroupOn:!1,recentQuipDocs:[],canCreateCanvas:!1,showAvatars:!1,isAiRecapEnabled:!1,experimentUserGroupSectionsGroupOn:!1,experimentInternalSpacesGroupOn:!1,experimentFeCreateChannelUsergroupSectionsGroupOn:!1,isVipAvailableForCurrentTeam:!1,canUserEditUserGroups:!1,usergroupSectionHiddenChannels:void 0,priorityHiddenReadChannels:void 0,experimentDmRecencySortRolloutGroupWithEdu:!1,badgeShape:r.HY.circle,channelNamesToChannelIdsMap:new Map,digestedChannels:[],shouldShowMuteEducationModal:!1,recapDefaultMuteStatusUserPref:void 0,hiddenDormantChannels:[],experimentFilterDormantChannelsGroupOn:e.experimentFilterDormantChannelsGroupOn,experimentMuteChannelEduGroupOn:e.experimentMuteChannelEduGroupOn});function splitFilterSortMenuItems(e){if(!e||!Array.isArray(e)||0===e.length)return{filterItems:[],sortItems:[]};let t=e.findIndex((t,a)=>{if(!t||0===a||"separator"!==t.type)return!1;let n=e[a+1];return null!=n&&"label"in n&&"string"==typeof n.label&&String(n.label).includes("Sort")});return -1===t?{filterItems:[{type:"header",label:"Filter conversations by",key:"filter-header"},...e.slice(1).filter(e=>null!==e)],sortItems:[]}:{filterItems:[{type:"header",label:"Filter conversations by",key:"filter-header"},...e.slice(1,t).filter(e=>null!==e)],sortItems:[{type:"header",label:"Sort conversations by",key:"sort-header"},...e.slice(t+2).filter(e=>e&&"open-prefs-modal"!==e.key&&"separator"!==e.type)]}}function filterOptionsWithSections(e,t){let a=(t.filterQuery||"").toLowerCase().trim();if(!a)return{...t,options:e};let n=[],r=null,i=[];for(let t of e)"heading"===t.type?(r&&n.push({heading:r,items:i}),r=t,i=[]):"divider"===t.type||("string"==typeof t.label?t.label:"").toLowerCase().includes(a)&&i.push(t);r&&n.push({heading:r,items:i});let l=[];return n.filter(e=>e.items.length>0).forEach((e,t)=>{t>0&&l.push({value:`divider-${e.heading.value}`,label:"",type:"divider"}),l.push(e.heading),l.push(...e.items)}),{...t,options:l}}let l=new n.Ay("channel_sidebar");function getSectionDisplayName(e,t){return e===i.VZ.Channels?l.t("Channels"):e===i.VZ.Stars?l.t("Starred"):e===i.VZ.RecentApps?l.t("Apps"):e===i.VZ.DirectMessages?l.t("Direct messages"):e===i.VZ.SlackConnect?l.t("External connections",{fallbackHash:"ffe740c3e742622ea4e92503c4f06ce40984d073",fallbackHashNs:"ia4"}):t}},0x17341dcaa:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xb77a689a),s=a(0x1c371dd8b),c=a(0xf8dd7f80),d=a(0x15f8e452a),m=a(0x410829f8),u=a(0x889d7d4a),p=a(0x3711e82d);let h={onClick:{action:p.UiAction.CLICK}},_=class extends n.PureComponent{static defaultProps={isSelected:!1,hasUnreads:!1,displayAsBold:!1,badgeProps:void 0,icon:void 0,onClick:l.A,className:"",renderLinkContent:null,isDisabled:!1,autoClogProps:void 0,isBBModeEnabled:!1,experimentSidebarBadgeVisualUpdatesGroupOn:!1,isSilentSidebarActive:!1};constructor(e){super(e),this.onClick=this.onClick.bind(this),this.state={isHovered:!1}}onClick(e){this.props.isDisabled||((0,c.getGenericLogger)().action(u.o,`Selected ${this.props.id}`),"function"==typeof this.props.onClick&&this.props.onClick(e))}handleMouseEnter=()=>{this.setState(()=>({isHovered:!0}))};handleMouseLeave=()=>{this.setState(()=>({isHovered:!1}))};render(){let{id:e,label:t,icon:a,hasUnreads:r,displayAsBold:l,badgeCount:c,badgeProps:u,isSelected:_,className:f,renderLinkContent:b,isDisabled:g,autoClogProps:y,isBBModeEnabled:A,experimentSidebarBadgeVisualUpdatesGroupOn:x,isSilentSidebarActive:E}=this.props,C=(r||l)&&!E,k=n.createElement("span",{className:"p-channel_sidebar__name"},t),{className:v,...S}=u||{},I=x?m.HY.pillCompact:m.HY.pill;E&&(I=m.HY.dot);let w=n.createElement(m.Gm,{className:i()("p-channel_sidebar__badge",v),count:c??0,shape:I,style:m.rY.themed,displayAsHovered:E&&this.state.isHovered,...S}),T=(0,o.A)(a)?n.createElement(d.A,{type:a,size:"inherit",className:"p-channel_sidebar__link__icon","data-qa":"channel-sidebar-page-link-icon"}):a;return n.createElement(s.A,{autoClogProps:y,actionProps:h,elementType:p.ElementType.LINK},n.createElement("div",{className:i()("p-channel_sidebar__link",{"p-channel_sidebar__link--selected":_&&!A,"p-channel_sidebar__link--unread":C,"p-channel_sidebar__link--all-threads--disabled":g,"p-channel_sidebar__link--all-threads--bbm":A,"p-channel_sidebar__link--has-badge":c&&c>0},f),onClick:this.onClick,onMouseEnter:E?this.handleMouseEnter:void 0,onMouseLeave:E?this.handleMouseLeave:void 0,"data-qa":`channel_sidebar_${e.toLowerCase()}`},b?b({icon:T,name:k,badge:w}):n.createElement(n.Fragment,null,T,k,w)))}};_.displayName="Link";let f=_},0x250af0199:(e,t,a)=>{"use strict";a.d(t,{s0:()=>tI,fg:()=>getShowSortPrefsSubmenuItems,Vm:()=>mapStateToPropsOnDemand});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x155d02b1c),o=a(0x6affae29),s=a(0x1df96de4c),c=a(0x8c8bafa3),d=a(0x20482ad21),m=a(0x16ac9b089),u=a(0x410829f8),p=a(0x133aaa7da),h=a(0x2501a2cee),_=a(0x1fd3f6e20),f=a(0xb041cb4d),b=a(0x929229c1),g=a(0x22c5d61d5),y=a(0xfadc3278),A=a(0x7eaadf41),x=a(0xbd520b0f),E=a(0x807220a2),C=a(0x19bf376f9),k=a(0x16cf1da63),v=a(0x11a296110),S=a(0x13eedc190),I=a(0xf225ecf2),w=a(0x1c7997c1),T=a(0x96920791),N=a(0x16d221c7f),M=a(0x142775427),R=a(0x1f803375e),P=a(0x18def662b),L=a(0x61f75169),O=a(0x226892387),D=a(0xbc562055),F=a(0x1ec68d6a3),U=a(0x46cf166),B=a(0x11c82607b),H=a(0x1ccef1c6f),W=a(0x24febdb71),V=a(0x20085de45);let G="hidden_user_group_sections",q=(0,B.Ay)("Hide a user group section",(e,t,{sectionId:a,reason:n})=>{if(!(0,U.A)(a))return;let r=t(),i=(0,H.ty)(r,G),l=(0,W.M)(i);if(l.includes(a))return;l.push(a);let o=l.join();try{e((0,D.CI)({pref:G,value:o,reason:n}))}catch(t){(0,F.Wo)().error("HIDDEN-USER-GROUP-SECTIONS-PREF","Failed to set the pref to hide user group sections",t),e((0,V.rX)({pref:G,value:i}))}});q.meta={name:"hideUserGroupSections",key:"createThunkHideUserGroupSections",description:"Hide a user group section"};var j=a(0x11eae4d05),z=a(0x475c9cfe);let K=new d.Ay("channel_sidebar"),$=(0,E.DA)()?function(e){let t,a,r,i,l,o,s,c=(0,C.c)(50),{userGroupSectionId:d,userGroupId:m,closeModal:u}=e,p=(0,k.wA)(),h=(0,O.d4)(P.cq);c[0]!==m?(t=e=>(0,z.lJ)(e,m),c[0]=m,c[1]=t):t=c[1];let _=(0,O.d4)(t);c[2]!==u||c[3]!==p||c[4]!==d?(a=()=>{p(q({sectionId:d,reason:"sidebar-section-context-menu"})),u()},c[2]=u,c[3]=p,c[4]=d,c[5]=a):a=c[5];let f=a;c[6]!==u?(r=()=>{u()},c[6]=u,c[7]=r):r=c[7];let b=r;c[8]!==h?(i=h?K.t("Remove this section?"):"",c[8]=h,c[9]=i):i=c[9];let g=i;if(c[10]!==h||c[11]!==_){let e=_&&(0,L.hc)(_)?(_.prefs?.channels||[]).length:0;if(0===e){let e;c[13]!==h?(e=h?K.t("Conversations in this section will move back to the Channels section of your Home sidebar."):"",c[13]=h,c[14]=e):e=c[14],l=e}else l=h?K.rt("Conversations in <strong>{usergroupName}</strong> section will move back to the Channels section of your Home sidebar.<br></br><br></br>And don\u2019t worry- you won\u2019t be removed from {channelCount,plural, =1 {this channel} other {any of these {channelCount} channels}} and you can add the section back again in <strong>Preferences</strong>.",{usergroupName:(0,L.ue)(_),channelCount:e}):"";c[10]=h,c[11]=_,c[12]=l}else l=c[12];c[15]!==l||c[16]!==g?(o={modalTitle:g,modalContent:l},c[15]=l,c[16]=g,c[17]=o):o=c[17];let{modalTitle:y,modalContent:A}=o;if(!h)return null;if(c[18]!==u||c[19]!==h||c[20]!==A||c[21]!==y||c[22]!==b||c[23]!==f){let e,t,a,r,i;if(c[25]===Symbol.for("react.memo_cache_sentinel")?(e=K.t("Delete message?"),c[25]=e):e=c[25],c[26]!==u?(t={onClose:u,isOpen:!0,contentLabel:e,centered:!0},c[26]=u,c[27]=t):t=c[27],c[28]!==y?(a=n.createElement(M.A,null,n.createElement(R.A,{title:y})),c[28]=y,c[29]=a):a=c[29],c[30]!==A?(r=n.createElement(I.A,null,n.createElement(w.A,null,n.createElement("p",null,A))),c[30]=A,c[31]=r):r=c[31],c[32]!==h||c[33]!==b||c[34]!==f){let e,t;if(c[36]!==h||c[37]!==b){let t,a;c[39]!==b?(t={type:"outline",onClick:b},c[39]=b,c[40]=t):t=c[40],c[41]!==h?(a=h?K.t("Cancel"):"",c[41]=h,c[42]=a):a=c[42],e=n.createElement(v.Ay,t,a),c[36]=h,c[37]=b,c[38]=e}else e=c[38];if(c[43]!==h||c[44]!==f){let e,a;c[46]!==f?(e={type:"danger",onClick:f},c[46]=f,c[47]=e):e=c[47],c[48]!==h?(a=h?K.t("Remove"):"",c[48]=h,c[49]=a):a=c[49],t=n.createElement(v.Ay,e,a),c[43]=h,c[44]=f,c[45]=t}else t=c[45];i=n.createElement(T.A,null,n.createElement(N.A,null,e,t)),c[32]=h,c[33]=b,c[34]=f,c[35]=i}else i=c[35];s=n.createElement(S.A,t,a,r,i),c[18]=u,c[19]=h,c[20]=A,c[21]=y,c[22]=b,c[23]=f,c[24]=s}else s=c[24];return s}:function({userGroupSectionId:e,userGroupId:t,closeModal:a}){let r=(0,k.wA)(),i=(0,O.d4)(P.cq),l=(0,O.d4)(e=>(0,z.lJ)(e,t)),o=(0,n.useCallback)(()=>{r(q({sectionId:e,reason:"sidebar-section-context-menu"})),a()},[a,r,e]),s=(0,n.useCallback)(()=>{a()},[a]),{modalTitle:c,modalContent:d}=(0,n.useMemo)(()=>{let e=i?K.t("Remove this section?"):"",t=l&&(0,L.hc)(l)?(l.prefs?.channels||[]).length:0;return{modalTitle:e,modalContent:0===t?i?K.t("Conversations in this section will move back to the Channels section of your Home sidebar."):"":i?K.rt("Conversations in <strong>{usergroupName}</strong> section will move back to the Channels section of your Home sidebar.<br></br><br></br>And don\u2019t worry- you won\u2019t be removed from {channelCount,plural, =1 {this channel} other {any of these {channelCount} channels}} and you can add the section back again in <strong>Preferences</strong>.",{usergroupName:(0,L.ue)(l),channelCount:t}):""}},[i,l]);return i?n.createElement(S.A,{onClose:a,isOpen:!0,contentLabel:K.t("Delete message?"),centered:!0},n.createElement(M.A,null,n.createElement(R.A,{title:c})),n.createElement(I.A,null,n.createElement(w.A,null,n.createElement("p",null,d))),n.createElement(T.A,null,n.createElement(N.A,null,n.createElement(v.Ay,{type:"outline",onClick:s},i?K.t("Cancel"):""),n.createElement(v.Ay,{type:"danger",onClick:o},i?K.t("Remove"):"")))):null};$.displayName="RemoveUserGroupSectionConfirmationModal";let Y=(0,j.e)($);var Q=a(0x1180921cd),Z=a(0xe0bad038),J=a(0x9edd91a2),X=a(0x3020a630),ee=a(0x12c9f31d5),et=a(0x217c68a35),ea=a(0x1b3ecb90f),en=a(0x1789e94fa),er=a(0xfc66d6b0),ei=a(0x81187f00),el=a(0x201f2115b),eo=a(0xf7c96b4a),es=a(0xe1644a69),ec=a(0x1f9462230),ed=a(0xea25ffc5),em=a(0xf931c21),eu=a(0xbaaab71e),ep=a(0x1a02c72b5),eh=a(0xd6a16321),e_=a(0x1722a6454),ef=a(0x8f36a342),eb=a(0xef6c3caa),eg=a(0x1ec69ee01),ey=a(0x12185e091),eA=a(0x209fb16e4),ex=a(0x114ffe897),eE=a(0xf6ed6f31),eC=a(0x23255e234),ek=a(0x167d76333),ev=a(0xae656d37),eS=a(0x5358f344),eI=a(0xa1832ae4),ew=a(0x13eb6f5d3),eT=a(0x1001c1606),eN=a(0x242503693),eM=a(0x7441941c),eR=a(0x1632f6a87),eP=a(0x3711e82d),eL=a(0x45012309),eO=a(0x107c8ce7),eD=a(0x20a8e038f),eF=a(0x16ed1b0dc),eU=a(0x107e97a6b),eB=a(0x369bcfe0),eH=a(0x249a04cb8),eW=a(0x8baf11b5),eV=a(0x4790a9e9),eG=a(0x12f41fc32),eq=a(0x7cf565aa),ej=a(0xdeaf4051),ez=a(0x24f5b5d9b),eK=a(0x1006f8a2b),e$=a(0xf54a24af),eY=a(0xc7d6b293),eQ=a(0x222e63440),eZ=a(0x14f66396b),eJ=a(0x1c100a3ca),eX=a(0x138acd100),e0=a(0x1e3eb45fd),e1=a(0x365a4cc3),e2=a(0x139aa1a7),e4=a(0x1fa01bf86),e5=a(0x6e87d4ec),e3=a(0x167c26d3),e6=a(0x1fdec3e16),e8=a(0x1550c1995);let e7=new d.Ay("assistant"),AddSectionToRecapToast=({addedChannelIds:e,hasApiErrors:t,channelSectionName:a,skipMutingCopy:r})=>{let i,l=(0,n.useRef)(null),o=(0,k.wA)(),s="",c=(0,n.useCallback)(()=>{o((0,e8.N)()),l.current?.hideToast()},[o]);t?i=e?e7.rt("Some channels in <b>{channelSectionName}</b> not added to future recaps. Please try again in a bit.",{channelSectionName:a}):e7.rt("<b>{channelSectionName}</b> not added to future recaps. Please try again in a bit.",{channelSectionName:a}):r?(i=e7.rt("<b>{channelSectionName}</b> added to future recaps.",{channelSectionName:a}),s=e7.t("Manage channels")):(i=e7.rt("<b>{channelSectionName}</b> added to future recaps and muted.",{channelSectionName:a}),s=e7.t("Manage muting"));let d=(0,n.useMemo)(()=>n.createElement(v.Nm,{className:"p-ai_summary_ready_toast__item",onClick:c},n.createElement("span",{className:"p-ai_summary_ready_toast__subtitle"},n.createElement(e6.A,{lines:1},s))),[c,s]),m=(0,es.T)({type:"summary"});return s?n.createElement(e3.A,{svgIconProps:m,svgIconClassName:"p-ai_summary_ready_toast__icon",customButton:d,ref:l,duration:3e3},n.createElement("div",{className:"flex_one overflow_hidden"},n.createElement("div",null,i))):n.createElement(e5.A,{duration:3e3,svgIconProps:m},n.createElement("span",null,i))};AddSectionToRecapToast.displayName="AddSectionToRecapToast";var e9=a(0x1a84f8520),te=a(0x94a64c46),tt=a(0x1400f598e),ta=a(0xb2eafc44),tn=a(0x25366f1fb),tr=a(0x217553e42),ti=a(0x16ffed5ab);let tl=(0,B.Ay)("Adds a list of channels to digest",async(e,t,{channelIds:a,channelSectionName:r,skipMuting:i},l)=>{let o,s,c=a.filter(e=>{let a=(0,tr.OL)(t(),e);return!((0,ey.JM)(a)||(0,e1.p2)(t(),{channelId:e}))}),d=(0,e0.YX)(t());if(0===c.length)return;let m=!1,u=(0,e1.T7)(t()),{getViewSet:p}=l(eu.U),h=p(t()),_=h?.primary?.viewType===e2.D.DailyDigest;e((0,tt.GI)({channelIds:c})),!u&&_&&e((0,tn.P)({targetChannelId:c[0]}));try{let a=await e((0,te.G)({reason:"add-to-daily-digest",channels:c,unmutedChannels:i?c:[]}));a.ok||((0,F.Ay)({label:"daily-digest"}).error(Error("failed to add channels to digest")),e((0,tt.Pb)({channelIds:c})),m=!0),a.ok&&((0,e4.Y)(t())&&(0,eL.eo)({state:t()}).track(eP.EventId.CHANNEL_NOTIFICATION_SETTINGS_SET_MUTE,{value:!0,entry_point:"recap",channel_ids:c}),d&&e((0,ta.$)()),o=a.added_channel_ids)}catch(t){s=t?.data?.error,(0,F.Ay)({label:"daily-digest"}).error(Error("error adding channel to digest")),e((0,tt.Pb)({channelIds:c})),m=!0}finally{if(r&&(o||m)&&!(!u&&_)){let t;t=s===te.L.ChannelSubscriptionLimitReached?n.createElement(e9.P,{channelIds:c}):(({addedChannelIds:e,hasApiErrors:t,channelSectionName:a,skipMutingCopy:r})=>n.createElement(AddSectionToRecapToast,{addedChannelIds:e,hasApiErrors:t,channelSectionName:a,skipMutingCopy:r}))({addedChannelIds:m?c:o,channelSectionName:r,hasApiErrors:m,skipMutingCopy:i}),e((0,ti.M)({element:t}))}}});tl.meta={name:"addChannelsToDigest",key:"createThunkAddChannelsToDigest",description:"Adds a list of channels to digest"};var to=a(0x1a2ed171d),ts=a(0x1380694ee),tc=a(0x226879b47),td=a(0x1d01649c6),tm=a(0x4f86f8f5),tu=a(0x17a41206b),tp=a(0x14149c126),th=a(0x14ea3ce99),t_=a(0xb9604b6),tf=a(0x198572436),tb=a(0xe684f705),tg=a(0x1fcbb004d),ty=a(0x46dbff89),tA=a(0x35945a76),tx=a(0x1cf0d97e1);let tE=(0,tx.Ay)(e=>e.quipMostRecent?.list.length?e.quipMostRecent.list:s.Ml);tE.meta={name:"getMostRecentQuipDocIds",key:"createSelectorGetMostRecentQuipDocIds",description:e=>e.quipMostRecent?.list.length?e.quipMostRecent.list:s.Ml},(0,tx.Ay)(e=>e?.quipMostRecent?.currentlyOpenDocId).meta={name:"getCurrentlyOpenDocIdFromMessage",key:"createSelectorGetCurrentlyOpenDocIdFromMessage",description:e=>e?.quipMostRecent?.currentlyOpenDocId},(0,tx.Ay)(e=>e?.quipMostRecent?.backToChannelId).meta={name:"getBackToChannelId",key:"createSelectorGetBackToChannelId",description:e=>e?.quipMostRecent?.backToChannelId};var tC=a(0x1ee439e69),tk=a(0x7332fa2f),tv=a.n(tk);let tS=new d.Ay("menu");function trackContextMenuClick(e,t={},a){a.track(eP.EventId.CONTEXT_MENU_ACTION,{...t,contexts:{ui_context:{action:eP.UiAction.CLICK,ui_component:eP.UiComponent.SIDEBAR,ui_element:eP.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}},label:e})}function onCreateNewSection({dispatch:e,props:t}){let{channelSection:a,clogger:n,experimentSimpleSharedSectionsV2GroupOn:r}=t;e((0,y.i)({action:r?g.TH.CREATE_AND_MOVE:g.TH.CREATE,nextChannelSectionId:a.id,onAttemptSubmit:()=>{n.track(eP.EventId.CHANNEL_SECTIONS_CREATE,{contexts:{ui_context:{action:eP.UiAction.SAVE,ui_component:eP.UiComponent.SIDEBAR,ui_element:eP.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}}})}})),trackContextMenuClick("create",{},n)}function onClickEditSidebar({props:e}){let{channelSection:t,clogger:a,onEnterEditModeClick:n}=e;n({channelSection:t}),trackContextMenuClick("organize",{},a)}function onClickOrganizeSidebar(e){e((0,ty.q)({element:n.createElement(eo.n,null)}))}function onModalSubmit({dispatch:e,props:t}){let{channelSection:a,transitionFocusTo:n,clogger:r}=t;e((0,eZ.A)({channelSectionId:a.id,reason:"section-heading-confirm-delete"})).then(()=>{n({focusKey:eN.Ay.SIDEBAR_CURRENT_CHANNEL}),r.track(eP.EventId.CHANNEL_SECTIONS_DELETE,{contexts:{ui_context:{action:eP.UiAction.CONFIRM,ui_component:eP.UiComponent.SIDEBAR,ui_element:eP.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}},channel_section_id:a.id,channel_section_type:a.type})}).finally(()=>e((0,tg.O)()))}function renderEmojiPrefix(e){let{emoji:t,hasUnmutedUnreads:a,isCollapsed:r,hasAllMutedChannels:l,isHovered:o}=e;if(!t)return null;let s=i()("p-channel_sidebar__emoji",{"p-channel_sidebar__emoji--active":a||!r||o,"p-channel_sidebar__emoji--muted":r&&l});return n.createElement(ea.Ay,{text:t,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:ea.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,className:s,renderEmojiFallback:!0})}function onRemoveSectionSelected({dispatch:e,props:t}){let{channelSectionListViews:a,channelSectionChannels:r,hasStarredChannelsInSection:i,channelSection:l,transitionFocusTo:o,clogger:s}=t,c=r.length;(trackContextMenuClick("delete",{channel_section_id:l.id},s),c>0||i||a.length>0)?e((0,ty.q)({element:n.createElement(Z.A,{onModalSubmit:()=>onModalSubmit({dispatch:e,props:t}),onModalClose:()=>e((0,tg.O)()),channelSectionId:l.id,emojiPrefix:renderEmojiPrefix(t)})})):0===c&&(o({focusKey:eN.Ay.SIDEBAR_CURRENT_CHANNEL}),e((0,eZ.A)({channelSectionId:l.id,reason:"section-heading-delete"})),s.track(eP.EventId.CHANNEL_SECTIONS_DELETE,{contexts:{ui_context:{action:eP.UiAction.SELECT,ui_component:eP.UiComponent.SIDEBAR,ui_element:eP.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionHeading"}},channel_section_id:l.id,channel_section_type:l.type}))}function onRenameSectionSelected({dispatch:e,props:t}){let{clogger:a,channelSection:n}=t;e((0,y.i)({action:g.TH.RENAME,channelSectionId:n.id,initialText:e((0,eR.i1)({channelSection:n})),initialEmoji:n.emoji,onAttemptSubmit:()=>{a.track(eP.EventId.CHANNEL_SECTIONS_RENAME,{contexts:{ui_context:{action:eP.UiAction.SELECT,ui_component:eP.UiComponent.SIDEBAR,ui_element:eP.UiElement.SIDEBAR_CHANNEL_ITEM,ui_component_name:"SectionHeading"}},channel_section_id:n.id})}})),trackContextMenuClick("rename",{channel_section_id:n.id},a)}function onViewUnreadsSelected({dispatch:e,props:t}){let{transitionFocusTo:a,clogger:n,channelSection:r}=t;a({focusKey:eN.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),trackContextMenuClick("view_unreads",{channel_section_id:r.id},n),e((0,eG.AZ)({pref:"all_unreads_section_filter",value:r.id,reason:"on-view-unreads-selected"})),e((0,eY.A)({}))}function onMuteAllSelected({dispatch:e,props:t}){let{transitionFocusTo:a,channelSection:n,clogger:r,channelSectionChannels:i}=t;a({focusKey:eN.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),trackContextMenuClick("mute",{channel_section_id:n.id},r),e((0,eQ.A)({channelIdsToMute:i}))}function onUnmuteAllSelected({dispatch:e,props:t}){let{transitionFocusTo:a,clogger:n,channelSection:r,channelSectionChannels:i}=t;a({focusKey:eN.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),trackContextMenuClick("unmute",{channel_section_id:r.id},n),e((0,eQ.A)({channelIdsToUnmute:i}))}function addAllToRecaps({dispatch:e,props:t,skipMuting:a}){let{transitionFocusTo:n,channelSection:r,clogger:i,channelSectionChannels:l,channelIds:o}=t,s=Array.from(l);r.type===ef.VZ.Stars&&o&&o?.length>0&&(s=Array.from(o)),n({focusKey:eN.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),trackContextMenuClick("add_section_to_recap",{channel_section_id:r.id},i),e(tl({channelIds:s,channelSectionName:r.name,skipMuting:a}))}function onSetSidebarBehavior({dispatch:e,props:t},a){let{transitionFocusTo:n,channelSection:r,clogger:i,setChannelSectionPref:l}=t;n({focusKey:eN.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),e(l({channelSectionId:r.id,pref:tA.eJ,value:a})),trackContextMenuClick(a===tA.kZ?"show_mentions":a===tA.z1?"show_unread":a===tA.BG?"active":"show_all",{channel_section_id:r.id},i)}function onSetSorting({dispatch:e,props:t},a){let{transitionFocusTo:n,channelSection:r,clogger:i,setChannelSectionPref:l}=t;n({focusKey:eN.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),e(l({channelSectionId:r.id,pref:tA.jx,value:a})),trackContextMenuClick(`sort_${a}`,{channel_section_id:r.id},i)}function getCreateChannelSubmenuItem({dispatch:e,props:t}){let{canUserCreateChannels:a,channelSection:n,canUserEditUserGroups:r,experimentFeCreateChannelUsergroupSectionsGroupOn:i,userGroup:l}=t;return(n?.type===ef.VZ.Channels||n.type===ef.VZ.Standard||n.type===ef.VZ.Stars||n.type===ef.VZ.UserGroup)&&a&&(n.type!==ef.VZ.UserGroup||r&&i)?[{label:tS.t("Create channel"),click:()=>{let t={entryPoint:et.IV.ChannelSidebar};n.usergroupId=l?.id,t.targetChannelSection=n,e((0,eJ.A)(t))},dataQa:"channel_section_menu__create_channel"}]:[]}function autoClogPropsForBehavior(e){let t;switch(e){case tA.z1:t=eP.EventId.SIDEBAR_SECTION_CONTEXT_MENU_FILTER_UNREADS;break;case tA.kZ:t=eP.EventId.SIDEBAR_SECTION_CONTEXT_MENU_FILTER_MENTIONS;break;case tA.BG:t=eP.EventId.SIDEBAR_SECTION_CONTEXT_MENU_FILTER_ACTIVE;break;case tA.Ag:default:t=eP.EventId.SIDEBAR_SECTION_CONTEXT_MENU_FILTER_ALL}return{onClick:{enableClogAction:!0},eventId:t}}function itemForBehavior(e,t,a){let{experimentFilterDormantChannelsGroupOn:r,experimentMuteChannelEduGroupOn:i,showBehavior:l}=a,o={[tA.Ag]:tS.t("All"),[tA.BG]:n.createElement(n.Fragment,null,r?tS.t("Active only"):"Active only",n.createElement(en.A,er.A)),[tA.z1]:r?tS.t("Unreads"):tS.t("Unreads only"),[tA.kZ]:r?tS.t("Mentions"):tS.t("Mentions only")},s=!r&&l===tA.BG&&e===tA.Ag;return{autoClogProps:autoClogPropsForBehavior(e),label:o[e],value:e,key:e,dataQa:`channel_section_menu_sidebar_behavior_${e}`,type:p.A.radio,checked:!!s||l===e,click:()=>onSetSidebarBehavior({dispatch:t,props:a},e),description:e===tA.BG&&r&&i?tS.rt("New activity within the last 30 days"):null}}function getShowStateLabel(e){let t,{experimentFilterDormantChannelsGroupOn:a,showBehavior:n}=e;if(!a&&n===tA.BG)return tS.t("All");switch(n){case tA.z1:t=a?tS.t("Unreads"):tS.t("Unreads only");break;case tA.kZ:t=a?tS.t("Mentions"):tS.t("Mentions only");break;case tA.BG:t=a?tS.t("Active only"):"Active only";break;case tA.Ag:default:t=tS.t("All")}return t}function getShowSortPrefsSubmenuItems(e,t){let{enableGlobalSidebarPref:a,experimentFilterDormantChannelsGroupOn:r}=t,i=renderMenuPlaceholderItem("section_show_prefs",e,t),l=renderMenuPlaceholderItem("section_sort_prefs",e,t);return[{label:t.experimentFilterDormantChannelsGroupOn?tS.t("Filter conversations by:"):tS.t("Show in this section"),type:p.A.header},...i,{type:p.A.separator},{label:t.experimentFilterDormantChannelsGroupOn?tS.t("Sort conversations by:"):tS.t("Sort this section"),type:p.A.header},...l,...a&&!r?[{type:p.A.separator},{click:()=>{e((0,eK.A)({activeSection:"sidebar",activeSubsection:"sidebar_show_pref"}))},label:n.createElement("div",{className:tv().showSectionState},tS.rt('<strong className="sk_highlight">Change these settings for all sections in Preferences</strong>')),key:"open-prefs-modal",className:tv().sectionMenuSubmenuLink}]:[]]}function onHideUserGroupSection({dispatch:e,props:t}){let{channelSection:a}=t;a.type===ef.VZ.UserGroup&&a.usergroupId&&e(Y({userGroupSectionId:a.id,userGroupId:a.usergroupId}))}function onOpenUserGroupView({dispatch:e,props:t}){let{userGroup:a}=t;e((0,ej.q)({groupId:a?.id||""}))}function onShareInternalSpace({dispatch:e,props:t}){let{userGroup:a,channelSection:n}=t;n.type===ef.VZ.UserGroup&&n.usergroupId&&e((0,x.f)({userGroup:a}))}function getCreateSubmenu(e,t){let a,{channelSection:n}=t;switch(n.type){case ef.VZ.Standard:case ef.VZ.Stars:case ef.VZ.Channels:a=renderMenuPlaceholders([["create_channel","create_section"]],e,t);break;case ef.VZ.DirectMessages:a=renderMenuPlaceholders([["create_dm","create_section"]],e,t);break;case ef.VZ.SlackConnect:a=[{label:tS.t("Slack Connect"),type:p.A.header},...renderMenuPlaceholders([["create_scdm","create_sc_channel"],["create_section"]],e,t)];break;case ef.VZ.RecentApps:case ef.VZ.Agents:default:case ef.VZ.UserGroup:a=renderMenuPlaceholders([["create_channel","create_section"]],e,t)}return 0===a.length?[]:[{label:tS.t("Create"),type:p.A.submenu,key:"create_submenu",dataQa:"channel_section_submenu_create",submenu:a,submenuWidth:"auto"}]}function getManageSubmenuItem(e,t){let a,{channelSection:n,experimentUserGroupSectionsGroupOn:r}=t;switch(n.type){case ef.VZ.Standard:case ef.VZ.Stars:a=[["mark_all_as_read","mute_all","add_section_to_recap","view_unreads"],["rename_section","delete_section"],["edit_all","sidebar_sweeper"]];break;case ef.VZ.Channels:default:a=[["mark_all_as_read","view_unreads"],["browse_page","edit_all","sidebar_sweeper"]];break;case ef.VZ.DirectMessages:a=[["mark_all_as_read","edit_all","view_unreads"],["manage_vip"],["browse_page"]];break;case ef.VZ.SlackConnect:case ef.VZ.RecentApps:case ef.VZ.Agents:a=[["mark_all_as_read","view_unreads"],["browse_page","edit_all"]];break;case ef.VZ.UserGroup:if(!r)return[];a=[["mute_all","add_section_to_recap"],["hide_user_group_section"],["edit_all"]]}let i=renderMenuPlaceholders(a,e,t);return 0===i.length?[]:[{label:tS.t("Manage"),type:p.A.submenu,key:"manage",dataQa:"channel_section_submenu_manage",submenu:i,submenuWidth:"auto"}]}function renderHiddenUnreadsWithoutMentions(e,t){let{channelsWithUnmutedUnreads:a,unreadWithNoMentionsHiddenChannels:r,isCollapsed:i,showBehavior:l,experimentSidebarPrefsApplyToMenusGroupOn:o,showAvatars:s,channelNamesToChannelIdsMap:c,digestedChannels:d,badgeShape:m}=t,u=l===tA.kZ,h=[],_=a.concat(r),f=u&&r.length>0&&!i?r:_;return(u&&r.length>0||i&&_.length>0)&&(h.push({label:tS.t("Unread conversations"),type:p.A.header}),f.forEach(t=>{let a=(0,ey.JM)(t),r=d?.includes(t.id),i=(0,eA.i)(c,t);h.push({label:n.createElement(b.A,{id:t.id,model:t,forceRealName:!o||void 0,showPresence:!0,showStatus:!0,showAvatar:o?a&&s:void 0,useShortMode:!0,className:tv().contextMenuChannel,onlyBoldIfUnread:!0,showUnreadBadge:!0,badgeShape:m,shortenTooltipContents:!0,showTruncatedChannelNameTooltip:!0,showTeamForLocalChannel:i,inlineNameSuffix:r?renderRecapIcon():null}),click:a=>{(0,eO.A)(a)?e((0,ei.s)({viewId:t.id})):e((0,ep.o)((0,eh.pr)(t.id)))}})})),h}function renderHiddenReadChannels(e,t){let{readHiddenChannels:a,hasUnreads:r,unreadWithNoMentionsHiddenChannels:i,experimentSidebarPrefsApplyToMenusGroupOn:l,showAvatars:o,channelNamesToChannelIdsMap:s,digestedChannels:c,badgeShape:d}=t,m=a.length>0,u=[];if(m){let t=tS.t("You\u2019re all caught up!"),m=n.createElement(n.Fragment,null,n.createElement(ea.Ay,{text:"tada",shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:ea.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,renderEmojiFallback:!0,className:tv().unreadIcon}),n.createElement("span",null,t));!r&&i.length<=0?u.push({label:m,type:p.A.header}):u.push({label:tS.t("Read conversations"),type:p.A.header}),a.forEach(t=>{let a=(0,ey.JM)(t),r=(0,eA.i)(s,t),i=c?.includes(t.id);u.push({label:n.createElement(b.A,{id:t.id,model:t,forceRealName:!l||void 0,showPresence:!0,showStatus:!0,showAvatar:l?a&&o:void 0,useShortMode:!0,className:tv().contextMenuChannel,onlyBoldIfUnread:!0,showUnreadBadge:!0,badgeShape:d,shortenTooltipContents:!0,showTruncatedChannelNameTooltip:!0,showTeamForLocalChannel:r,inlineNameSuffix:i?renderRecapIcon():null}),click:a=>{(0,eO.A)(a)?e((0,ei.s)({viewId:t.id})):e((0,ep.o)((0,eh.pr)(t.id)))}})})}return u}function renderRecapIcon(){return n.createElement("span",null,n.createElement(es.o,{type:"sparkles",size:"inherit",inline:!0}))}function renderHiddenMutedChannels(e,t){let{mutedHiddenChannels:a,experimentSidebarPrefsApplyToMenusGroupOn:r,showAvatars:i,channelNamesToChannelIdsMap:l,digestedChannels:o,badgeShape:s}=t;if(0===a.length)return[];let c=[];return c.push({label:tS.t("Muted conversations"),type:p.A.header}),a.forEach(t=>{let a=(0,ey.JM)(t),d=(0,eA.i)(l,t),m=o?.includes(t.id);c.push({label:n.createElement(b.A,{id:t.id,model:t,forceRealName:!r||void 0,showPresence:!0,showStatus:!0,showAvatar:r?a&&i:void 0,useShortMode:!0,className:tv().contextMenuChannel,onlyBoldIfUnread:!0,showUnreadBadge:!0,badgeShape:s,shortenTooltipContents:!0,showTruncatedChannelNameTooltip:!0,showTeamForLocalChannel:d,inlineNameSuffix:m?renderRecapIcon():null}),click:a=>{(0,eO.A)(a)?e((0,ei.s)({viewId:t.id})):e((0,ep.o)((0,eh.pr)(t.id)))}})}),c}function renderHiddenUsergroupChannelSubmenu(e,t){let{usergroupSectionHiddenChannels:a,experimentUserGroupSectionsGroupOn:r,channelSection:i,experimentSidebarPrefsApplyToMenusGroupOn:l,showAvatars:o,channelNamesToChannelIdsMap:s,digestedChannels:c,badgeShape:d}=t;if(!r||a?.length===0||i.type!==ef.VZ.UserGroup)return[];let m=[];return m.push({label:r?tS.t("Channels in other sections"):"",type:p.A.header}),a?.forEach(t=>{let a=(0,eA.i)(s,t),r=c?.includes(t.id),i=(0,ey.t8)(t)?null:t,u=(0,ey.JM)(t);m.push({label:n.createElement(b.A,{id:t.id,model:i,forceRealName:!l||void 0,showPresence:!0,showStatus:!0,showAvatar:l?u&&o:void 0,useShortMode:!0,className:tv().contextMenuChannel,onlyBoldIfUnread:!0,showUnreadBadge:!0,badgeShape:d,shortenTooltipContents:!0,showTruncatedChannelNameTooltip:!0,showTeamForLocalChannel:a,inlineNameSuffix:r?renderRecapIcon():null}),click:a=>{(0,eO.A)(a)?e((0,ei.s)({viewId:t.id})):e((0,ep.o)((0,eh.pr)(t.id)))}})}),[{label:r?tS.t("Additional group channels"):"",type:p.A.submenu,key:"user group channels",dataQa:"hidden_user_group_channels",submenu:m,submenuWidth:"auto"}]}function renderHiddenReadPriorityChannels(e,t){let{priorityHiddenReadChannels:a,experimentSidebarPrefsApplyToMenusGroupOn:r,showAvatars:i,channelNamesToChannelIdsMap:l,digestedChannels:o,isVipAvailableForCurrentTeam:s,badgeShape:c}=t,d=[];return s&&a?.length?(d.push({label:tS.t("Most recent"),type:p.A.header,dataQa:"hidden_read_priority_channels_header"}),a?.forEach(t=>{let a=(0,ey.JM)(t),s=(0,eA.i)(l,t),m=o?.includes(t.id);d.push({label:n.createElement(b.A,{id:t.id,model:t,forceRealName:!r||void 0,showAvatar:r?a&&i:void 0,useShortMode:!0,className:tv().contextMenuChannel,onlyBoldIfUnread:!0,showUnreadBadge:!0,badgeShape:c,shortenTooltipContents:!0,showTruncatedChannelNameTooltip:!0,showTeamForLocalChannel:s,inlineNameSuffix:m?renderRecapIcon():null}),click:a=>{eH.e.addVisibleChannelId(t.id),(0,eO.A)(a)?e((0,ei.s)({viewId:t.id})):e((0,ep.o)((0,eh.pr)(t.id)))},dataQa:`hidden_read_priority_channel_${t.id}`})}),d):[]}function renderHiddenDormantChannels(e,t){let{channelNamesToChannelIdsMap:a,digestedChannels:r,experimentFilterDormantChannelsGroupOn:i,experimentSidebarPrefsApplyToMenusGroupOn:l,hiddenDormantChannels:o,showAvatars:s,badgeShape:c}=t;if(!o?.length||!i)return[];let d=[{label:i?tS.t("No messages in at least 30 days"):"No messages in at least 30 days",type:p.A.header}];return o.forEach(t=>{let i=(0,ey.JM)(t),o=(0,eA.i)(a,t),m=r?.includes(t.id);d.push({autoClogProps:{onClick:{enableClogAction:!0},eventId:eP.EventId.SIDEBAR_CONTEXT_MENU_OPEN_DORMANT_CHANNEL},label:n.createElement(b.A,{id:t.id,model:t,forceRealName:!l||void 0,showAvatar:l?i&&s:void 0,useShortMode:!0,className:tv().contextMenuChannel,onlyBoldIfUnread:!0,showUnreadBadge:!0,badgeShape:c,shortenTooltipContents:!0,showTruncatedChannelNameTooltip:!0,showTeamForLocalChannel:o,inlineNameSuffix:m?renderRecapIcon():null}),click:a=>{(0,eO.A)(a)?e((0,ei.s)({viewId:t.id})):e((0,ep.o)((0,eh.pr)(t.id)))},dataQa:`hidden_dormant_channel_${t.id}`})}),d}function renderMenuPlaceholderItem(e,t,a){let{channelSection:r,hasUnreads:i,canMuteSection:s,canUnmuteSection:d,sortBehavior:u,channelSectionChannels:f,isCurrentMemberGuest:b,enableChannelSectionEditing:g,onDMBrowserModalClick:y,onAppLauncherClick:x,onBrowserChannelsClick:E,experimentSimpleSharedSectionsV2GroupOn:C,experimentIsSharedSectionsFollowUpsGroupOn:k,isAiRecapEnabled:v,experimentUserGroupSectionsGroupOn:S,experimentInternalSpacesGroupOn:I,experimentDmRecencySortRolloutGroupWithEdu:w,experimentFilterDormantChannelsGroupOn:T,isVipAvailableForCurrentTeam:N,isAPaidTeam:M,isClientOnline:R,hasPendingChannelSectionSetRequest:P,clogger:O,isEditMode:D,userGroup:F,isShareSectionNewBadgeVisible:U,potentiallyStaleSharedInvitesCanGetLinkResult:B,isSlackConnectHubEnabled:H,canUserCreateSlackConnectChannels:W,shouldShowMuteEducationModal:V,recapDefaultMuteStatusUserPref:G}=a,q=w&&r.type===ef.VZ.DirectMessages?tS.t("By most recent (Default)"):tS.t("By most recent");switch(T&&(q=tS.t("Recency")),e){case"mark_all_as_read":if(i)return(0,A.X)(t,{channelSection:r,channelIds:a.channelIds,sidebarSections:a.sidebarSections});return[];case"view_unreads":if(i)return[{label:tS.t("View unreads"),click:()=>onViewUnreadsSelected({dispatch:t,props:a}),dataQa:"channel_section_menu_view_unreads"}];return[];case"mute_all":if(s&&(r.type===ef.VZ.Standard||r.type===ef.VZ.UserGroup))return[{label:tS.t("Mute all"),click:()=>onMuteAllSelected({dispatch:t,props:a}),dataQa:"channel_section_menu_mute"}];if(d&&(r.type===ef.VZ.Standard||r.type===ef.VZ.UserGroup))return[{label:tS.t("Unmute all"),click:()=>onUnmuteAllSelected({dispatch:t,props:a}),dataQa:"channel_section_menu_unmute"}];return[];case"add_section_to_recap":if(v){let e=t((0,eR.i1)({channelSection:a.channelSection}));return[{label:tS.t("Add section to recap"),click:()=>V?t((0,to.o)({onConfirmMute:()=>addAllToRecaps({dispatch:t,props:a,skipMuting:!1}),onSkipMute:()=>addAllToRecaps({dispatch:t,props:a,skipMuting:!0}),channelOrSectionName:e})):addAllToRecaps({dispatch:t,props:a,skipMuting:!G}),dataQa:"add_section_to_recap"}]}return[];case"edit_all":if(M&&g&&!D&&(0,eM.$x)(r))return[{dataQa:"edit_mode_enter",label:n.createElement("span",null,tS.t("Edit all sections")),click:()=>onClickEditSidebar({props:a})}];return[];case"sidebar_sweeper":return[{label:tS.t("Leave inactive channels"),description:t((0,eq.r)()).shouldLeaveChannelsMenuBeInactive?tS.t("Looking fresh! No new recommendations."):void 0,disabled:t((0,eq.r)()).shouldLeaveChannelsMenuBeInactive,click:()=>onClickOrganizeSidebar(t)}];case"rename_section":if(r.type===ef.VZ.Standard)return[{label:tS.t("Rename {sectionName}",{sectionName:(0,m.Ay)(r.name)}),disabled:!(0,eM.$x)(r)||!R||P,click:()=>onRenameSectionSelected({dispatch:t,props:a}),dataQa:"channel_section_menu_rename_channel_section"}];return[];case"delete_section":if(r.type===ef.VZ.Standard||r.type===ef.VZ.Stars)return[{label:tS.t("Delete {sectionName}",{sectionName:(0,m.Ay)(t((0,eR.i1)({channelSection:r})))}),disabled:!(0,eM.$x)(r)||!R||P,click:()=>onRemoveSectionSelected({dispatch:t,props:a}),dataQa:"channel_section_menu_remove_channel_section",danger:!0}];return[];case"create_section":if(!g)return[];if(M)return[{dataQa:"channel_section_menu_create_new_section",label:tS.t("Create section"),disabled:!R||P,click:()=>onCreateNewSection({dispatch:t,props:a})}];return[{dataQa:"channel_section_menu_create_new_section--callout",label:tS.t("Create sidebar section"),badgeLabel:tS.t("PAID"),badgeClassName:"margin_right_100",href:`https://${(0,c.qF)()}/help/articles/360043207674`}];case"manage_vip":if(!N)return[];return[{label:tS.t("Manage VIP"),click:()=>t((0,eB.H)()),dataQa:"manage_vip"}];case"sort_vip":return[{label:tS.t("Sort this section"),type:p.A.submenu,key:"showsort",dataQa:"priority_section_menu_show_sort_pref",submenu:renderMenuPlaceholderItem("section_sort_prefs",t,a),submenuWidth:"auto"}];case"create_channel":return getCreateChannelSubmenuItem({dispatch:t,props:a});case"create_sc_channel":if(!W)return[];if(!M)return[{label:n.createElement("div",{className:"display_flex align_items_center"},tS.t("Create a channel"),n.createElement(em.A,{className:"margin_left_50",hideTooltip:!0,uiComponentVariant:eP.UiComponentVariant.SLACK_CONNECT_MENU_CREATE_CHANNEL})),click:()=>t((0,ed.A)({uiComponentVariant:eP.UiComponentVariant.SLACK_CONNECT_MENU_CREATE_CHANNEL})),dataQa:"channel_section_menu__create_sc_channel"}];return[{label:tS.t("Create channel"),click:()=>t((0,eJ.A)({entryPoint:et.IV.ChannelSidebarSlackConnectSection})),dataQa:"channel_section_menu__create_sc_channel"}];case"create_scdm":if(B)return[{label:tS.t("Start direct message"),click:()=>{t((0,eX.S)({entryPoint:"channel_sidebar_slack_connect_right_click"}))},dataQa:"channel_section_menu__create_scdm"}];return[];case"create_dm":return[{label:tS.t("Start direct message"),click:()=>y({openComposer:!0})}];case"hide_user_group_section":return[{label:S?tS.t("Remove section"):"",click:()=>onHideUserGroupSection({dispatch:t,props:a})}];case"browse_page":switch(r.type){case ef.VZ.Channels:return E?[{label:tS.t("Browse channels"),click:E,dataQa:"channel_section_menu__channels__browse"}]:[];case ef.VZ.DirectMessages:return[{label:tS.t("Recent direct messages"),click:y,dataQa:"channel_sidebar__recent_dms"}];case ef.VZ.RecentApps:return[{label:tS.t("Browse apps"),click:x}];case ef.VZ.Agents:return[{label:tS.t("Browse agents"),click:x}];case ef.VZ.SlackConnect:if(!H)return[];return[{label:tS.t("Browse Slack Connect"),click:()=>{trackContextMenuClick("Browse Slack Connect",{},O),t((0,ez.R)({entryPoint:"channel_sidebar_slack_connect_options"}))},dataQa:"channel_sidebar__slack_connect__browse"}];default:return[]}case"share_channel_set":if(!C||b||!f||0===f.length||r.type!==ef.VZ.Standard)return[];if(k)return[{label:n.createElement("div",null,k?tS.t("Share section"):"Share section",n.createElement("span",{className:"margin_left_50"},U&&n.createElement(_.v,{isMicro:!0,style:_.u.InverseInformative},k?tS.t("New"):"New"))),icon:n.createElement(h.Ah,{name:"share-message",size:"20"}),type:p.A.submenu,dataQa:"section_menu_visual_updates_share",submenu:[{icon:n.createElement(h.Ah,{name:"share-message",size:"20"}),label:k?tS.t("Share directly"):"",description:k?n.createElement(Q.I,{text:tS.t("Invite to public or private channels")}):"",click:()=>{t((0,e$.y)({channelSectionName:t((0,eR.i1)({channelSection:r})),channelIdsIncludedInSection:f,emoji:r.emoji})),t((0,tf.J)({badgeName:"share_channel_section"})),trackContextMenuClick("share_channel_section",{},O)}},{icon:n.createElement(h.Ah,{name:"link",size:"20"}),label:k?tS.t("Copy section link"):"",description:k?n.createElement(Q.I,{text:tS.t("Private channels won\u2019t be visible to people who aren\u2019t already in them")}):"",click:()=>{t((0,J.k)({sectionName:r.name,channels:f,emoji:r.emoji}))}}],submenuWidth:280}];return[{label:n.createElement("div",null,tS.rt("Share section"),n.createElement("span",{className:"margin_left_50"},U&&n.createElement(_.v,{isMicro:!0,style:_.u.InverseInformative},C?tS.t("New"):""))),click:()=>{t((0,e$.y)({channelSectionName:t((0,eR.i1)({channelSection:r})),channelIdsIncludedInSection:f,emoji:r.emoji})),t((0,tf.J)({badgeName:"share_channel_section"})),trackContextMenuClick("share_channel_section",{},O)},icon:r.emoji&&!C&&n.createElement(ea.Ay,{text:r.emoji,emojiSize:ea.lw.SMALL,className:tv().shareSectionEmoji}),additionalIcon:n.createElement("div",{className:"margin_left_75"},n.createElement(h.Ah,{name:"share-message",size:"20"})),dataQa:"share_channel_set"}];case"section_show_prefs":return T?[{...itemForBehavior(tA.BG,t,a)},itemForBehavior(tA.z1,t,a),(0,eb.m)(r.type)?null:itemForBehavior(tA.kZ,t,a),itemForBehavior(tA.Ag,t,a)]:[itemForBehavior(tA.Ag,t,a),itemForBehavior(tA.z1,t,a),(0,eb.m)(r.type)?null:itemForBehavior(tA.kZ,t,a)];case"section_sort_prefs":return[{label:T?tS.t("A\u2013Z"):tS.t("Alphabetically"),value:tA.PY,key:tA.PY,dataQa:"channel_section_menu_sort_default",type:p.A.radio,checked:!u||u===tA.PY,click:()=>onSetSorting({dispatch:t,props:a},tA.PY)},{label:q,value:tA.n5,key:tA.n5,dataQa:"channel_section_menu_sort_recent",type:p.A.radio,checked:u===tA.n5,click:()=>onSetSorting({dispatch:t,props:a},tA.n5)},{label:tS.t("Priority"),value:tA.u5,key:tA.u5,dataQa:"channel_section_menu_sort_recent",type:p.A.radio,checked:u===tA.u5,click:()=>onSetSorting({dispatch:t,props:a},tA.u5)}];case"user_group_section_context":if(!S||r.type!==ef.VZ.UserGroup)return[];if(I&&S)return[{type:p.A.header,key:"user_group_section_context",dataQa:"user_group_section_context",label:S?tS.t("{userGroupName}",{userGroupName:(0,L.ue)(F)}):""}];return[{type:p.A.default,key:"usergroupsections",dataQa:"user_group_section_context",children:S?(0,l.A)(tS.t("{userGroupName}",{userGroupName:(0,L.ue)(F)})):"",description:S?tS.t("Go to user group"):"",icon:n.createElement(h.Ah,{name:"user-groups-filled",size:"20"}),click:()=>onOpenUserGroupView({dispatch:t,props:a})}];case"per_section_show_sort_prefs_submenu":if(!M||D||!(0,eM.$x)(r))return[];return[{label:n.createElement("div",{className:tv().subMenuLabel},tS.t("Show and sort"),n.createElement("span",{className:tv().subMenuLabelSecondaryText},getShowStateLabel(a))),type:p.A.submenu,key:"showsort",dataQa:"channel_section_menu_show_sort_pref",submenu:getShowSortPrefsSubmenuItems(t,a),submenuWidth:"auto"}];case"internal_spaces_share":if(!I||r.type!==ef.VZ.UserGroup)return[];return[{type:p.A.default,key:"internal_spaces_share",dataQa:"internal_spaces_share",children:I?tS.t("Share with co-workers"):"",click:()=>onShareInternalSpace({dispatch:t,props:a})}];case"create_submenu":if(r.type===ef.VZ.Standard||r.type===ef.VZ.Stars||r.type===ef.VZ.Channels||(0,eb.m)(r.type)||r.type===ef.VZ.UserGroup)return getCreateSubmenu(t,a);return[];case"manage_submenu":return getManageSubmenuItem(t,a);case"unread_channels":return renderHiddenUnreadsWithoutMentions(t,a);case"read_channels":return renderHiddenReadChannels(t,a);case"muted_channels":return renderHiddenMutedChannels(t,a);case"hidden_user_group_channels":return renderHiddenUsergroupChannelSubmenu(t,a);case"hidden_read_priority_channels":return renderHiddenReadPriorityChannels(t,a);case"dormant_channels":return renderHiddenDormantChannels(t,a);default:(0,o.Kh)(e)}}function renderMenuPlaceholders(e,t,a){return e.map(e=>e.flatMap(e=>renderMenuPlaceholderItem(e,t,a))).filter(e=>e&&e.length>0).flatMap((e,t)=>t>0?[{type:p.A.separator},...e]:e,[])}onClickOrganizeSidebar.displayName="onClickOrganizeSidebar",renderEmojiPrefix.displayName="renderEmojiPrefix",onRemoveSectionSelected.displayName="onRemoveSectionSelected",itemForBehavior.displayName="itemForBehavior",getShowSortPrefsSubmenuItems.displayName="getShowSortPrefsSubmenuItems",renderHiddenUnreadsWithoutMentions.displayName="renderHiddenUnreadsWithoutMentions",renderHiddenReadChannels.displayName="renderHiddenReadChannels",renderRecapIcon.displayName="renderRecapIcon",renderHiddenMutedChannels.displayName="renderHiddenMutedChannels",renderHiddenUsergroupChannelSubmenu.displayName="renderHiddenUsergroupChannelSubmenu",renderHiddenReadPriorityChannels.displayName="renderHiddenReadPriorityChannels",renderHiddenDormantChannels.displayName="renderHiddenDormantChannels",renderMenuPlaceholderItem.displayName="renderMenuPlaceholderItem";let mapStateToPropsOnDemand=(e,{channelSection:t,channelIds:a=[],channelSectionHasAllMutedHiddenChannels:n=!1,channelSectionReadHiddenChannels:r=[],channelSectionMutedHiddenChannels:i=[],channelSectionUnreadWithNoMentionsHiddenChannels:l=[],sidebarSections:o={},getPrimaryView:c,getChannelSectionPref:d})=>{let m,p,h=(0,ts.xe)(e,t.id)?.usergroupId,_=o[t.id]?.dormantHiddenChannelsOrdered||[],b=a.reduce((t,a)=>{if(!(0,eF.A)(a))return t;let n=(0,tr.OL)(e,a);return n&&(0,eg.KJ)(n)?t.concat(n):t},[]),g=r.map(t=>(0,tr.OL)(e,t)),y=i.map(t=>(0,tr.OL)(e,t)),A=l.map(t=>(0,tr.OL)(e,t)),x=(0,ts.X$)(e,t.id);if(t.type===ef.VZ.UserGroup)for(let t of(m=[],x)){if(a.includes(t))continue;let n=(0,tr.OL)(e,t);n&&m.push(n)}if(t.type===ef.VZ.Priority)for(let t of(p=[],eH.e.getHiddenChannelIds())){if(a.includes(t))continue;let n=(0,tr.OL)(e,t);n&&p.push(n)}let E=_?.map(t=>(0,tr.OL)(e,t)),C=o[t.id]?.channelsAssociatedOrdered.filter(t=>{let a=(0,tr.OL)(e,t);return!(0,ey.JM)(a)}),k=(0,tb.cA)(e),v=(0,eC.Ez)(k),S=b.length,I=S>0||l.length>0,w=c(e)?.id,T=b.filter(t=>{if(!(0,eW.B)(e,t.id)){let e=(0,eg.$M)(t);return e&&e>0&&w!==t.id}return!1}),N=g.filter(t=>{if(t?.id&&(0,eW.B)(e,t.id)){let e=(0,eg.$M)(t);return!e&&0===e&&w!==t.id}return!1}),M=(0,e0.hS)(e),R=M?C.filter(t=>(0,e1.p2)(e,{channelId:t})):s.Ml,O=T.length>0,D=a.length>0?0===T.length:!!n,F=(0,td.T)(e),U=t?.type===ef.VZ.Stars&&(0,eV.gA)(e),B=(0,tc.Lz)(e,t.id||""),W=B.every(e=>e.entityType===tm.FN.SalesforceList),V=x.length>0?x:[...a,...r,...i,...l,..._],{canMuteSection:G,canUnmuteSection:q}=V.reduce((t,a)=>{let n=(0,tr.OL)(e,a);return n&&!(0,eg.lo)(n)&&(0,eE.bl)(n)&&!(0,ex.D)(n)&&(n&&(0,eW.B)(e,n.id)?t.canUnmuteSection=!0:t.canMuteSection=!0),t},{canMuteSection:!1,canUnmuteSection:!1}),j=(0,ew.MM)(e),K=(0,ev.lR)(e).ok,$=(0,eS.U)(e),Y=(0,ts.Ou)(e),Q=Y?(0,ts.VJ)(e,t.id):(0,e_.y)(d(t.id,tA.wE)),Z=(0,tu.Pb)(e),J=(0,tC.H7)(e),et=(0,eI.qR)(J),ea=d(t.id,tA.eJ),en=!!(0,H.ty)(e,"show_sidebar_avatars"),er="on"===(0,tp._Z)(e,"sidebar_prefs_apply_to_menus"),ei=(0,P.QT)(e),eo=(0,P.aL)(e),es=(0,t_.ap)(e,"share_channel_section"),ed=(0,P.cq)(e),em=(0,P.Ow)(e),eu=(0,P.tv)(e),ep=(0,eD.t)(e),eh=d(t.id,tA.jx),eb=(0,eT.u)(e,{shouldRefetch:!1}),eA=(0,eL.eo)({state:e}),eN=(0,ec.A)(e),eM=tE(e).map(t=>({id:(0,eU._U)(t),title:(0,th.Lp)(e,t).title})),eR=(0,tr.MS)(e),eP=h?(0,z.lJ)(e,h):null,eO=(0,L.$Q)(eP??void 0),eB=!!eO&&(0,L.wC)(e,eO),eG=(0,f.Gn)(e),eq=(0,H.ty)(e,el.Dk),ej=(0,P.zF)(e)?u.HY.pillCompact:u.HY.pill;return{isEditMode:Y,isCollapsed:Q,isClientOnline:Z,isAPaidTeam:et,hasUnreads:I,hasPendingChannelSectionSetRequest:F,hasUnmutedUnreads:O,hasAllMutedChannels:D,canMuteSection:G,canUnmuteSection:q,canUserCreateChannels:j,showBehavior:ea,sortBehavior:eh,showAvatars:en,experimentSimpleSharedSectionsV2GroupOn:ei,experimentIsSharedSectionsFollowUpsGroupOn:eo,experimentSidebarPrefsApplyToMenusGroupOn:er,experimentUserGroupSectionsGroupOn:ed,experimentInternalSpacesGroupOn:em,experimentFeCreateChannelUsergroupSectionsGroupOn:eu,experimentDmRecencySortRolloutGroupWithEdu:ep,canUserCreateSlackConnectChannels:K,canManageSlackConnect:$,isSlackConnectHubEnabled:eN,potentiallyStaleSharedInvitesCanGetLinkResult:eb,isAiRecapEnabled:M,isVipAvailableForCurrentTeam:eG,unreadChannelCount:S,channelSectionChannels:V,hasStarredChannelsInSection:U,channelSectionListViews:W?B:[],readHiddenChannels:g,mutedHiddenChannels:y,unreadWithNoMentionsHiddenChannels:A,channelsWithMutedReads:N,channelsWithUnmutedUnreads:T,isCurrentMemberGuest:v,clogger:eA,sidebarSections:o,channelNamesToChannelIdsMap:eR,userGroup:eP,canUserEditUserGroups:eB,usergroupSectionHiddenChannels:m,priorityHiddenReadChannels:p,recentQuipDocs:eM,canCreateCanvas:(0,ek.F)(e),digestedChannels:R,shouldShowMuteEducationModal:null===eq,recapDefaultMuteStatusUserPref:eq,hiddenDormantChannels:E,experimentFilterDormantChannelsGroupOn:(0,X.K)(e),experimentMuteChannelEduGroupOn:(0,ee.D)(e),isShareSectionNewBadgeVisible:es,badgeShape:ej}},tI=(0,B.Ay)("Gets a context menu template, triggered by ChannelContextMenu",(e,t,{channelSection:a,channelIds:n,emoji:r,isHovered:i=!1,channelSectionHasAllMutedHiddenChannels:l=!1,channelSectionReadHiddenChannels:o,channelSectionMutedHiddenChannels:s,channelSectionUnreadWithNoMentionsHiddenChannels:c,sidebarSections:d,getChannelSectionPref:m,enableChannelSectionEditing:u=!0,enableGlobalSidebarPref:p=!0,...h},_)=>{let{getPrimaryView:f}=_(eu.U),b=(0,X.K)(t()),g=mapStateToPropsOnDemand(t(),{channelSection:a,channelIds:n,channelSectionHasAllMutedHiddenChannels:l,channelSectionReadHiddenChannels:o,channelSectionMutedHiddenChannels:s,channelSectionUnreadWithNoMentionsHiddenChannels:c,sidebarSections:d,getPrimaryView:f,getChannelSectionPref:m}),y={channelSection:a,channelIds:n,isHovered:i,channelSectionHasAllMutedHiddenChannels:l,channelSectionReadHiddenChannels:o,channelSectionMutedHiddenChannels:s,channelSectionUnreadWithNoMentionsHiddenChannels:c,emoji:r,getChannelSectionPref:m,enableChannelSectionEditing:u,enableGlobalSidebarPref:p,...h,...g},A=[];if(A=a.type===ef.VZ.Team?[["per_section_show_sort_prefs_submenu"],["unread_channels"],["read_channels"],["muted_channels"]]:a.type===ef.VZ.Priority?[["manage_vip"],["sort_vip"],["hidden_read_priority_channels"]]:[["share_channel_set"],["user_group_section_context","internal_spaces_share","hidden_user_group_channels"],["create_submenu"],["manage_submenu"],["per_section_show_sort_prefs_submenu"],["unread_channels"],["read_channels"],["muted_channels"]],b&&A.push(["dormant_channels"]),A?.length!==0)return renderMenuPlaceholders(A,e,y)});tI.meta={name:"getImprovedSectionHeadingContextMenuTemplate",key:"createThunkGetImprovedSectionHeadingContextMenuTemplate",description:"Gets a context menu template, triggered by ChannelContextMenu"}},0x38ec07f3:(e,t,a)=>{"use strict";a.d(t,{C:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1084efb4a),o=a.n(l);let s=(0,n.memo)(({children:e,clickable:t,collapsed:a,ellipsisOrBadge:r,noTransition:l,muted:s,overflow:c,setup:d,setupSlackConnect:m,setupDms:u,unreads:p,...h})=>n.createElement("div",{className:i()(o().sectionHeadingLabel,{[o().sectionHeadingLabelClickable]:t,[o().sectionHeadingLabelCollapsed]:a,[o().sectionHeadingLabelEllipsisOrBadge]:r,[o().sectionHeadingLabelNoTransition]:l,[o().sectionHeadingLabelMuted]:s,[o().sectionHeadingLabelSetup]:d,[o().sectionHeadingLabelSetupDms]:u,[o().sectionHeadingLabelSetupSlackConnect]:m,[o().sectionHeadingLabelUnreads]:p}),...h},c?n.createElement("span",{className:o().sectionHeadingLabelOverflow},e):e))},0x1180921cd:(e,t,a)=>{"use strict";a.d(t,{I:()=>MultiLineDescription});var n=a(0xbad225b5),r=a(0x1a00d8796),i=a.n(r);let MultiLineDescription=({text:e})=>n.createElement("div",{className:i().multiLineDescription},e);MultiLineDescription.displayName="MultiLineDescription"},0xe0bad038:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x1b88224f9),s=a(0x5f90c96a),c=a(0x1ec69ee01),d=a(0xa1832ae4),m=a(0x1c91944c9),u=a(0x9b971e7e),p=a(0x4790a9e9),h=a(0x16f8b3ac2),_=a(0x8f36a342),f=a(0x1380694ee),b=a(0x226879b47),g=a(0x4f86f8f5),y=a(0x217553e42),A=a(0x1ee439e69);let x=new i.Ay("channel_browser_coachmark"),E=class extends n.Component{static defaultProps={numOtherWorkspacesOfCurrentEnterprise:0,channelExternalTeamNamesAffected:{},numOtherChannelsAffected:0,onModalSubmit:r.A,onModalClose:r.A,emojiPrefix:null,selfEnterpriseOrgName:"",hasOnlyChannelsInSection:!1,hasOnlyListViewsInSection:!1,hasChannelsAndListViewsInSection:!1};renderEmojiPrefix(){let{emojiPrefix:e}=this.props;return e||""}render(){let{channelSection:e,channelExternalTeamNamesAffected:t,numOtherChannelsAffected:a,numOtherWorkspacesOfCurrentEnterprise:r,onModalSubmit:i,onModalClose:c,selfEnterpriseOrgName:d,hasOnlyChannelsInSection:m,hasOnlyListViewsInSection:u,hasChannelsAndListViewsInSection:p}=this.props,h=e?n.createElement("div",{"data-qa":"channel-section-delete-confirmation-modal-message"},u&&n.createElement(n.Fragment,null,x.rt("List views you added to <strong>{inlineChannelSection}</strong> will move back to the Salesforce section.",{inlineChannelSection:n.createElement(s.A,{channelSection:e,spacing:"small"}),fallbackHash:"43fe322a3a48a08100296b5094feb3213da5f393",fallbackHashNs:"channel_browser_coachmark"})),m&&n.createElement(n.Fragment,null,n.createElement("div",{className:"margin_bottom_75"},x.rt("Anything you added to <strong>{inlineChannelSection}</strong> will move back to their default sections:",{inlineChannelSection:n.createElement(s.A,{channelSection:e,spacing:"small"}),fallbackHash:"43fe322a3a48a08100296b5094feb3213da5f393",fallbackHashNs:"channel_browser_coachmark"})),n.createElement("ul",null,n.createElement("li",null,x.t("Channels",{fallbackHash:"18e03e2a37ba37df713f9665ef752fb8b40fc1e8",fallbackHashNs:"activity"})),n.createElement("li",null,x.t("Direct messages",{fallbackHash:"e7596a09868814d3384a5cce56034222fa0e615c",fallbackHashNs:"channel_sidebar"})))),p&&n.createElement(n.Fragment,null,n.createElement("div",{className:"margin_bottom_75"},x.rt("Anything you added to <strong>{inlineChannelSection}</strong> will move back to their default sections:",{inlineChannelSection:n.createElement(s.A,{channelSection:e,spacing:"small"}),fallbackHash:"43fe322a3a48a08100296b5094feb3213da5f393",fallbackHashNs:"channel_browser_coachmark"})),n.createElement("ul",null,n.createElement("li",null,x.t("Channels",{fallbackHash:"18e03e2a37ba37df713f9665ef752fb8b40fc1e8",fallbackHashNs:"activity"})),n.createElement("li",null,x.t("Direct messages",{fallbackHash:"e7596a09868814d3384a5cce56034222fa0e615c",fallbackHashNs:"channel_sidebar"})),n.createElement("li",null,x.t("Salesforce",{fallbackHash:"5f4b3e9b1f43ddee302297e198291545c8d24f66",fallbackHashNs:"salesforce_connections"}))))):null,f=t?Object.keys(t).length:0,b=t?Object.keys(t)[0]:null,g=n.createElement(l.Ay,{type:"inline",align:"left",level:"warning",className:"margin_top_75","data-qa":"channel-section-delete-confirmation-modal-multi-workspace-warning"},x.rt("<strong>{numOtherChannelsAffected, plural, =1 {# channel not shown} other {# channels not shown}}</strong> (in {numTotalWorkspacesAffected, plural, =1 {{firstWorkspaceAffectedName}} =2 {{firstWorkspaceAffectedName} and 1 other workspace} other {{firstWorkspaceAffectedName} and {numTotalWorkspacesAffectedMinusOne} other workspaces}}) will also move out of this section.",{numOtherChannelsAffected:a,numTotalWorkspacesAffected:f,firstWorkspaceAffectedName:b,numTotalWorkspacesAffectedMinusOne:f-1})),y=n.createElement(l.Ay,{type:"inline",align:"left",level:"warning",className:"margin_top_75","data-qa":"channel-section-delete-confirmation-modal-starred-multi-workspace-warning"},x.rt("<strong>Starred</strong> will be deleted across all your {orgName} workspaces.",{orgName:d})),A=n.createElement(n.Fragment,null,h,!u&&n.createElement("div",{className:"margin_top_75"},x.rt("And don\u2019t worry \u2014 you won\u2019t be removed from any channels when you delete this section.")),t&&Object.keys(t).length>0?g:null,"number"==typeof r&&r>0&&e?.type===_.VZ.Stars&&y);return n.createElement(o.A,{"data-qa":"remove_channel_section_modal",submitButtonText:x.t("Delete"),submitButtonType:"danger",cancelButtonText:x.t("Cancel"),onSubmit:i,onCancel:c,onClose:c,title:x.t("Delete this section?")},A)}};E.displayName="SectionHeadingConfirmationModal";let C=(0,m.N)((e,{channelSectionId:t})=>{let a=(0,h.dp)(e).filter(t=>!!t.enterprise_id&&t.enterprise_id===(0,u.jV)(e)).length,n=(0,f.X$)(e,t).map(t=>(0,y.OL)(e,t)).filter(e=>e&&(0,c.lo)(e)).map(t=>(0,d.F1)((0,A._J)(e,(0,c.bK)(e,t)))),r={};n.forEach(e=>{r[e]?r[e]+=1:r[e]=1});let i=0;i=Object.values(r).reduce((e,t)=>e+t,0);let l=(0,f.xe)(e,t),o=(0,f.X$)(e,t),s=l?.type===_.VZ.Stars&&(0,p.gA)(e),m=!!o.length||s,x=(0,b.Lz)(e,t||""),E=x.every(e=>e.entityType===g.FN.SalesforceList)&&!!x.length;return{numOtherWorkspacesOfCurrentEnterprise:a,channelExternalTeamNamesAffected:r,numOtherChannelsAffected:i,channelSection:l,selfEnterpriseOrgName:(0,A.H2)(e),hasOnlyChannelsInSection:!E&&m,hasOnlyListViewsInSection:E&&!m,hasChannelsAndListViewsInSection:E&&m}})(E)},0xe2ca58e9:(e,t,a)=>{"use strict";a.d(t,{A:()=>aU});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x854f5389),s=a(0x2334f665b),c=a(0x9de95c9f),d=a(0x20482ad21),m=a(0x1a256ff50),u=a(0x1faa3f1ac),p=a(0x2501a2cee),h=a(0x4c96e5d9),_=a(0xb041cb4d),f=a(0x807220a2),b=a(0x19bf376f9),g=a(0x16cf1da63),y=a(0x1e864b930),A=a(0xb90de824),x=a(0x13953efe6),E=a(0x235fec370),C=a(0x2378cf6ec),k=a(0x840597c2),v=a(0xcaa08ff7),S=a(0x226892387),I=a(0xf3c65e54),w=a(0x5b1935a6),T=a(0x176cc99e3),N=a.n(T);let M=new d.Ay("sidebar_sweeper"),R=(0,f.DA)()?e=>{let t,a,r,i,l,o,s,c,d,m=(0,b.c)(39),{children:u,ensureItemInView:h,sidebarListRowKey:_}=e,f=(0,g.wA)(),T=(0,S.Z2)(v.ZC);m[0]!==T?(t=e=>T?.map(t=>(0,C.I)(e,t)),m[0]=T,m[1]=t):t=m[1];let R=(0,S.Z2)(t),P="VIP_ADDED"===(0,S.d4)(v.b0),[L,O]=(0,n.useState)(P);m[2]!==f?(a=()=>{f((0,I.A)({notificationName:w.ze.EDUCATION_VIP_USERS,action:w.hw.DISMISS})),f((0,k.s8)("")),O(!1)},m[2]=f,m[3]=a):a=m[3];let D=a;m[4]!==h||m[5]!==P||m[6]!==_?(r=()=>{O(P),h&&_&&P&&h(_,260,!0)},i=[h,_,O,P],m[4]=h,m[5]=P,m[6]=_,m[7]=r,m[8]=i):(r=m[7],i=m[8]),(0,n.useEffect)(r,i);let F=T?.length;m[9]!==R?(l=()=>M.rt("This section will now show unread messages and mentions from <strong>{names}</strong>.",{names:(0,y.A)(R,{noEscape:!0,react:!0}).join("")}),m[9]=R,m[10]=l):l=m[10];let U=l;if(m[11]!==U||m[12]!==F){let e,t,a,r;if(m[14]===Symbol.for("react.memo_cache_sentinel")?(e={className:N().content},t=n.createElement(p.Ah,{name:"arrow-up-circle",size:"20"}),m[14]=e,m[15]=t):(e=m[14],t=m[15]),m[16]!==F){let e;m[18]===Symbol.for("react.memo_cache_sentinel")?(e={className:N().title},m[18]=e):e=m[18],a=n.createElement("div",e,M.t("You added {numOfVip, plural, =1 {# person} other {# people}} to VIP",{numOfVip:F})),m[16]=F,m[17]=a}else a=m[17];if(m[19]!==U){let e;m[21]===Symbol.for("react.memo_cache_sentinel")?(e={className:N().body},m[21]=e):e=m[21],r=n.createElement("div",e,U()),m[19]=U,m[20]=r}else r=m[20];o=n.createElement("div",e,t,a,r),m[11]=U,m[12]=F,m[13]=o}else o=m[13];let B=o;m[22]!==D?(s={dismissCoachmark:D},m[22]=D,m[23]=s):s=m[23];let{renderOverlayElement:H,renderCoachmarkChildren:W}=(0,E._)(s),V=_temp;if(m[24]!==B||m[25]!==D||m[26]!==L||m[27]!==H){let e;m[29]===Symbol.for("react.memo_cache_sentinel")?(e=M.t("Got it!"),m[29]=e):e=m[29],c=n.createElement(A.Ay,{title:"",closeCoachmark:D,isOpen:L,arrowPosition:20,offsetY:-10,offsetX:-110,width:450,centerOnArrow:!0,orientation:"right-bottom",primaryCallToActionText:e,onClickPrimaryButton:D,shouldCloseOnOverlayClick:!0,bodyText:B,alignActionsRight:!0,isModal:!0,overlayElement:H,onAfterOpen:V,isMegaphoneCoachmark:!1}),m[24]=B,m[25]=D,m[26]=L,m[27]=H,m[28]=c}else c=m[28];let G=c;if(m[30]!==u||m[31]!==G||m[32]!==W){let e,t;m[34]!==G?(e={orientation:"right-bottom",coachmarkElement:G},m[34]=G,m[35]=e):e=m[35],m[36]!==u||m[37]!==W?(t=W(u),m[36]=u,m[37]=W,m[38]=t):t=m[38],d=n.createElement(x.Ay,e,t),m[30]=u,m[31]=G,m[32]=W,m[33]=d}else d=m[33];return d}:({children:e,ensureItemInView:t,sidebarListRowKey:a})=>{let r=(0,g.wA)(),i=(0,S.Z2)(v.ZC),l=(0,S.Z2)(e=>i?.map(t=>(0,C.I)(e,t))),o="VIP_ADDED"===(0,S.d4)(v.b0),[s,c]=(0,n.useState)(o),d=(0,n.useCallback)(()=>{r((0,I.A)({notificationName:w.ze.EDUCATION_VIP_USERS,action:w.hw.DISMISS})),r((0,k.s8)("")),c(!1)},[r,c]);(0,n.useEffect)(()=>{c(o),t&&a&&o&&t(a,260,!0)},[t,a,c,o]);let m=i?.length,u=(0,n.useCallback)(()=>M.rt("This section will now show unread messages and mentions from <strong>{names}</strong>.",{names:(0,y.A)(l,{noEscape:!0,react:!0}).join("")}),[l]),h=(0,n.useMemo)(()=>n.createElement("div",{className:N().content},n.createElement(p.Ah,{name:"arrow-up-circle",size:"20"}),n.createElement("div",{className:N().title},M.t("You added {numOfVip, plural, =1 {# person} other {# people}} to VIP",{numOfVip:m})),n.createElement("div",{className:N().body},u())),[m,u]),{renderOverlayElement:_,renderCoachmarkChildren:f}=(0,E._)({dismissCoachmark:d}),b=(0,n.useCallback)(()=>(0,k.s8)(void 0),[]),T=(0,n.useMemo)(()=>n.createElement(A.Ay,{title:"",closeCoachmark:d,isOpen:s,arrowPosition:20,offsetY:-10,offsetX:-110,width:450,centerOnArrow:!0,orientation:"right-bottom",primaryCallToActionText:M.t("Got it!"),onClickPrimaryButton:d,shouldCloseOnOverlayClick:!0,bodyText:h,alignActionsRight:!0,isModal:!0,overlayElement:_,onAfterOpen:b,isMegaphoneCoachmark:!1}),[s,h,d,_,b]);return n.createElement(x.Ay,{orientation:"right-bottom",coachmarkElement:T},f(e))};function _temp(){return(0,k.s8)(void 0)}R.displayName="VipAddedScreen";var P=a(0x1fe44d86d),L=a(0x1ebfa1009),O=a(0x14fad6485),D=a(0x210cf696f),F=a(0x1f2082e6f),U=a(0x1c87b2410),B=a(0x1be37a18e),H=a(0x3711e82d),W=a(0x585fc7f8),V=a(0x174f9c45c),G=a(0x1006f8a2b),q=a(0x24b37e04d),j=a(0x8568bdf8),z=a(0x14149c126);let K=new d.Ay("channel_sidebar"),$={elementName:"change_preferences_link",onClick:{enableClogAction:!0}},Y=(0,f.DA)()?e=>{let t,a,r,i,l,o,s,c,d,m,u,h=(0,b.c)(33),{children:_}=e,f=(0,g.wA)(),y=(0,S.d4)(V.l);h[0]!==y?(t={shouldShowEmptyStarredSectionBanner:y},h[0]=y,h[1]=t):t=h[1];let E=(0,U.Q)(t),C=E?.shouldForceSectionCollapsed??!1;h[2]!==C?(a={shouldForceStarredSectionCollapsed:C},h[2]=C,h[3]=a):a=h[3];let k=(0,F.k)(a);h[4]!==k?(r=e=>(0,W.T)(e,k),h[4]=k,h[5]=r):r=h[5];let v=(0,S.d4)(r),I=(0,S.d4)(muted_channels_hidden_confirmation_coachmark_temp),{windowRef:w}=(0,n.useContext)(O._0),T=(0,S.d4)(j.Lo);h[6]!==f?(i=()=>{f((0,q.Bt)({shouldShow:!1}))},h[6]=f,h[7]=i):i=h[7];let N=i;h[8]!==f||h[9]!==N?(l=()=>{f((0,G.A)({activeSection:B._.sidebar,activeSubsection:"hide-muted-items"})),N()},h[8]=f,h[9]=N,h[10]=l):l=h[10];let M=l;h[11]!==v?(o=K.rt("{numMutedChannels} channels are now hidden",{numMutedChannels:v}),h[11]=v,h[12]=o):o=h[12];let R=o;h[13]!==w?(s=e=>{setTimeout(()=>{w.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},500)},h[13]=w,h[14]=s):s=h[14];let P=s;if(h[15]!==M){let e;h[17]===Symbol.for("react.memo_cache_sentinel")?(e=n.createElement(p.Ah,{name:"ellipsis-vertical-filled",inline:!0}),h[17]=e):e=h[17],c=K.rt("You can find muted channels in the section {icon} menu. Want to bring them back? <a>Change your preferences</a>",{icon:e},e=>{let{text:t,tag:a}=e;return"a"===a?n.createElement(D.A,{onClick:M,autoClogProps:$},t):null}),h[15]=M,h[16]=c}else c=h[16];let L=c;h[18]!==v?(d={uiComponentName:H.UiComponentName.MUTED_CHANNELS_HIDDEN_CONFIRMATION_COACHMARK,numMutedChannels:v},h[18]=v,h[19]=d):d=h[19];let z=d;if(h[20]!==z||h[21]!==N||h[22]!==L||h[23]!==R||h[24]!==P||h[25]!==T){let e;h[27]===Symbol.for("react.memo_cache_sentinel")?(e=K.t("Got It"),h[27]=e):e=h[27],m=n.createElement(A.Ay,{autoClogProps:z,isOpen:T,title:R,bodyText:L,icon:"notifications-off",closeCoachmark:N,primaryCallToActionText:e,onClickPrimaryButton:N,offsetX:-11,width:315,onAfterOpen:P}),h[20]=z,h[21]=N,h[22]=L,h[23]=R,h[24]=P,h[25]=T,h[26]=m}else m=h[26];let Y=m;if(!I||!T)return _;if(h[28]!==_||h[29]!==Y){let e;h[31]!==Y?(e={coachmarkElement:Y,orientation:"right"},h[31]=Y,h[32]=e):e=h[32],u=n.createElement(x.Ay,e,_),h[28]=_,h[29]=Y,h[30]=u}else u=h[30];return u}:({children:e})=>{let t=(0,g.wA)(),a=(0,S.d4)(V.l),r=(0,U.Q)({shouldShowEmptyStarredSectionBanner:a}),i=(0,F.k)({shouldForceStarredSectionCollapsed:r?.shouldForceSectionCollapsed??!1}),l=(0,S.d4)(e=>(0,W.T)(e,i)),o=(0,S.d4)(e=>"on"===(0,z._Z)(e,"improve_mute_pref")),{windowRef:s}=(0,n.useContext)(O._0),c=(0,S.d4)(j.Lo),d=(0,n.useCallback)(()=>{t((0,q.Bt)({shouldShow:!1}))},[t]),m=(0,n.useCallback)(()=>{t((0,G.A)({activeSection:B._.sidebar,activeSubsection:"hide-muted-items"})),d()},[t,d]),u=K.rt("{numMutedChannels} channels are now hidden",{numMutedChannels:l}),h=(0,n.useCallback)(e=>{setTimeout(()=>{s.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},500)},[s]),_=K.rt("You can find muted channels in the section {icon} menu. Want to bring them back? <a>Change your preferences</a>",{icon:n.createElement(p.Ah,{name:"ellipsis-vertical-filled",inline:!0})},({text:e,tag:t})=>"a"===t?n.createElement(D.A,{onClick:m,autoClogProps:$},e):null),f=(0,n.useMemo)(()=>({uiComponentName:H.UiComponentName.MUTED_CHANNELS_HIDDEN_CONFIRMATION_COACHMARK,numMutedChannels:l}),[l]),b=(0,n.useMemo)(()=>n.createElement(A.Ay,{autoClogProps:f,isOpen:c,title:u,bodyText:_,icon:"notifications-off",closeCoachmark:d,primaryCallToActionText:K.t("Got It"),onClickPrimaryButton:d,offsetX:-11,width:315,onAfterOpen:h}),[f,c,u,_,d,h]);return o&&c?n.createElement(x.Ay,{coachmarkElement:b,orientation:"right"},e):e};function muted_channels_hidden_confirmation_coachmark_temp(e){return"on"===(0,z._Z)(e,"improve_mute_pref")}Y.displayName="MutedChannelsHiddenConfirmationCoachmark";var Q=a(0x38ec07f3),Z=a(0x3bc7bbd5),J=a(0xb1ea448c),X=a(0x410829f8),ee=a(0x99233ecb),et=a(0x106d9c7ac),ea=a(0x1fd3f6e20),en=a(0x6e87d4ec),er=a(0x1fdec3e16),ei=a(0x129702595),el=a(0x344bb842),eo=a(0x24573b3ff),es=a(0x22c5d61d5),ec=a(0xfadc3278),ed=a(0x230322a4f),em=a(0x11a296110),eu=a(0x1d5dc623c),ep=a(0xfe866216),eh=a(0x1e1bdd25f),e_=a(0x8f36a342),ef=a(0xf7669308),eb=a.n(ef);let eg=new d.Ay("channel_sidebar");function ActionsTab({sectionId:e,sectionType:t,onNewChannel:a,onNewSection:r,onShareChannels:i,onCopySectionLink:l,onRename:o,onMuteUnmuteAllChannels:s,canMuteSection:c,canUnmuteSection:d,canShareSection:m,filterMenuItems:u=[],sortMenuItems:h=[],currentFilterLabel:_="Unreads",currentSortLabel:f="Recency",onNewDirectMessage:b,onManageVIPs:g,onBrowseApps:y,onBrowseExternalConnections:A,onDeleteSection:x,canDeleteSection:E,onMarkAllAsRead:C,hasUnreads:k}){let v=eg.t("New direct message"),S=eg.t("New channel"),I=eg.t("Channel section"),w=eg.t("Share channels directly"),T=eg.t("Copy section link"),N=eg.t("Manage VIPs"),M=eg.t("Browse Apps"),R=eg.t("Browse external connections",{fallbackHash:"124c499ca933a5de2cb268755487978708d82dc1",fallbackHashNs:"menu"}),P=eg.t("Rename"),L=eg.t("Mute all channels"),O=eg.t("Mute all conversations"),D=eg.t("Unmute all conversations"),F=eg.t("Unmute all channels"),U=eg.t("Filter conversations by "),B=eg.t("Sort conversations by "),H=eg.t("Delete section"),W=eg.t("Mark all as read"),V=eg.t("Quick actions",{fallbackHash:"e47e804262aa8131a62f0b23fccce47a48b6d429",fallbackHashNs:"recordchannels"}),G=t===e_.VZ.DirectMessages,q=t===e_.VZ.Priority,j=t===e_.VZ.RecentApps,z=t===e_.VZ.Standard,K=(0,n.useRef)(null),$=(0,n.useCallback)(e=>{let t;if("ArrowDown"!==e.key&&"ArrowUp"!==e.key)return;let a=K.current;if(!a)return;let n=Array.from(a.querySelectorAll("button:not([disabled])"));if(0===n.length)return;let r=n.findIndex(e=>e===document.activeElement);t="ArrowDown"===e.key?r<n.length-1?r+1:0:r>0?r-1:n.length-1,n[t]?.focus(),e.preventDefault()},[]);return n.createElement("div",{ref:K,className:eb().actionsContainer,onKeyDown:$},k&&C&&n.createElement(n.Fragment,null,n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},V),n.createElement(em.$n,{type:"ghost",size:"small",onClick:C,className:eb().actionButton},n.createElement(p.Ah,{name:"mark-as-read",size:"16"}),W)),n.createElement(ep.Ay,null)),!q&&n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},eg.t("Create\u2026")),G&&b?n.createElement(em.$n,{type:"ghost",size:"small",onClick:b,className:eb().actionButton},n.createElement(p.Ah,{name:"message",size:"16"}),v):n.createElement(em.$n,{type:"ghost",size:"small",onClick:a,className:eb().actionButton},n.createElement(p.Ah,{name:"channel-add",size:"16"}),S),n.createElement(em.$n,{type:"ghost",size:"small",onClick:r,className:eb().actionButton},n.createElement(p.Ah,{name:"section",size:"16"}),I)),m&&n.createElement(n.Fragment,null,n.createElement(ep.Ay,null),n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},eg.t("Share\u2026")),n.createElement(em.$n,{type:"ghost",size:"small",onClick:i,className:eb().actionButton},w),n.createElement(em.$n,{type:"ghost",size:"small",onClick:l,className:eb().actionButton},T))),G&&g&&n.createElement(n.Fragment,null,n.createElement(ep.Ay,null),n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},eg.t("Manage\u2026")),n.createElement(em.$n,{type:"ghost",size:"small",onClick:g,className:eb().actionButton},N))),j&&y&&n.createElement(n.Fragment,null,n.createElement(ep.Ay,null),n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},eg.t("Browse\u2026")),n.createElement(em.$n,{type:"ghost",size:"small",onClick:y,className:eb().actionButton},M))),A&&n.createElement(n.Fragment,null,n.createElement(ep.Ay,null),n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},eg.t("External connections",{fallbackHash:"ffe740c3e742622ea4e92503c4f06ce40984d073",fallbackHashNs:"ia4"})),n.createElement(em.$n,{type:"ghost",size:"small",onClick:A,className:eb().actionButton},R))),!q&&n.createElement(ep.Ay,null),n.createElement("fieldset",{className:eb().section},n.createElement("legend",{className:eb().sectionLegend},eg.t("Section settings")),q&&g&&n.createElement(em.$n,{type:"ghost",size:"small",onClick:g,className:eb().actionButton},N),z&&n.createElement(em.$n,{type:"ghost",size:"small",onClick:o,className:eb().actionButton},P),c&&n.createElement(em.$n,{type:"ghost",size:"small",onClick:s,className:eb().actionButton},G?O:L),d&&!c&&n.createElement(em.$n,{type:"ghost",size:"small",onClick:s,className:eb().actionButton},G?D:F),u.length>0&&n.createElement(eh.A,{renderMenu:e=>n.createElement(eu.A,{...e,template:u}),position:"top-left"},n.createElement(em.$n,{type:"ghost",size:"small",className:eb().actionButton},U,"\u2014 ",n.createElement("strong",null,_),n.createElement(p.Ah,{name:"caret-down",size:"16",color:"secondary"}))),h.length>0&&n.createElement(eh.A,{renderMenu:e=>n.createElement(eu.A,{...e,template:h}),position:"top-left"},n.createElement(em.$n,{type:"ghost",size:"small",className:eb().actionButton},B,"\u2014 ",n.createElement("strong",null,f),n.createElement(p.Ah,{name:"caret-down",size:"16",color:"secondary"})))),E&&x&&n.createElement(n.Fragment,null,n.createElement(ep.Ay,null),n.createElement("fieldset",{className:eb().section},n.createElement(em.$n,{type:"ghost",size:"small",onClick:x,className:eb().deleteButton},H))))}ActionsTab.displayName="ActionsTab";var ey=a(0x2172ff7ff),eA=a(0x1d1911997),ex=a(0x5a3e6194),eE=a(0x1cef2e035),eC=a.n(eE);let ek="entity:",ev=n.memo(function({label:e}){return n.createElement(h.Ay,{tip:e,position:"top",zIndex:"above_fs",shouldOnlyShowWhenTruncated:!0},n.createElement("div",{className:eC().channelOptionContent},n.createElement("div",{className:eC().channelStart},n.createElement("div",{className:"p-channel_sidebar__channel_icon_prefix"},n.createElement(p.Ah,{name:"sf-record-list",size:"20"}))),n.createElement("div",{className:eC().channelMiddle},n.createElement("span",{className:eC().channelName},n.createElement(er.A,{lines:1},e)))))});var eS=a(0xda62d37c),eI=a(0x48071695),ew=a(0x251135419),eT=a(0x1002e1f2c),eN=a(0x1ec69ee01),eM=a(0x12185e091),eR=a(0x1ecc7f772),eP=a(0x280afe13),eL=a(0x136bdf2c4),eO=a(0x6f213e53),eD=a(0x114ffe897),eF=a(0x1b9d5cc0c),eU=a(0x8baf11b5),eB=a(0x19c76d181),eH=a(0x226879b47),eW=a(0x4f86f8f5),eV=a(0x217553e42),eG=a(0x22e3eb4b6),eq=a(0xe684f705);let ej=new d.Ay("channel_sidebar"),ez="hidden-channels-unreads-section",eK="hidden-channels-read-section",e$="hidden-channels-muted-section",eY="hidden-channels-dormant-section",eQ=n.memo((0,f.DA)()?function(e){let t,a,r,l,o,s,c,d,m,u,p,_,f,g,y,A=(0,b.c)(100),{channelId:x}=e;A[0]!==x?(t=e=>(0,eV.OL)(e,x),A[0]=x,A[1]=t):t=A[1];let E=(0,S.d4)(t),C=!!E&&(0,eO.F)(E),k=x===(0,S.d4)(eG.bX);A[2]!==x?(a=e=>(0,eU.B)(e,x),A[2]=x,A[3]=a):a=A[3];let v=(0,S.d4)(a);A[4]!==E?(r=e=>(0,eI.N)(e,E),A[4]=E,A[5]=r):r=A[5];let I=(0,S.d4)(r);e:{let e;if(k||!E||v){l=!1;break e}A[6]!==E?(e=(0,eN.KJ)(E),A[6]=E,A[7]=e):e=A[7],l=e||I>0}let w=l;A[8]!==E?(o=e=>E?(0,eR.SB)(e,E,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}):"",A[8]=E,A[9]=o):o=A[9];let T=(0,S.d4)(o);A[10]!==E?(s=E&&(0,eM.LI)(E),A[10]=E,A[11]=s):s=A[11];let N=s;A[12]!==E?(c=E&&(0,eM.yz)(E),A[12]=E,A[13]=c):c=A[13];let M=c;A[14]!==E||A[15]!==N?(d=N?(0,eP.e)(E):void 0,A[14]=E,A[15]=N,A[16]=d):d=A[16];let R=d;A[17]!==E||A[18]!==M?(m=M?(0,eN.N4)(E):void 0,A[17]=E,A[18]=M,A[19]=m):m=A[19];let P=m,L=(0,S.d4)(eB.WR),O=N&&R===L;A[20]!==E?(u=e=>E?(0,eL.Z)(e,E):[],A[20]=E,A[21]=u):u=A[21];let D=(0,S.Z2)(u),F=M&&D?D[0]:void 0;A[22]!==R?(p=e=>(0,eq.nv)(e,R),A[22]=R,A[23]=p):p=A[23];let U=(0,S.d4)(p);A[24]!==U?(_=(0,eF.PV)(U),A[24]=U,A[25]=_):_=A[25];let B=_,H=N&&!!B;A[26]!==E?(f=(0,ew.A)({channel:E,isList:!1,isFrozenAndInGracePeriod:!1,isSuggested:!1,wasExternalChannelsTrial:!1}),A[26]=E,A[27]=f):f=A[27];let W=f;A[28]!==E?(g=(0,eT.A)({channel:E,isSelected:!1,isTyping:!1}),A[28]=E,A[29]=g):g=A[29];let V=g;if(!E||C)return null;if(A[30]!==I||A[31]!==E||A[32]!==T||A[33]!==W||A[34]!==k||A[35]!==H||A[36]!==w||A[37]!==N||A[38]!==M||A[39]!==v||A[40]!==O||A[41]!==R||A[42]!==F||A[43]!==P||A[44]!==V){let e,t,a,r,l;if(A[46]!==T?(e={tip:T,position:"top",zIndex:"above_fs",shouldOnlyShowWhenTruncated:!0},A[46]=T,A[47]=e):e=A[47],A[48]===Symbol.for("react.memo_cache_sentinel")?(t={className:eC().channelOptionContent},A[48]=t):t=A[48],A[49]!==E||A[50]!==W||A[51]!==k||A[52]!==H||A[53]!==N||A[54]!==M||A[55]!==v||A[56]!==R||A[57]!==F||A[58]!==P||A[59]!==V){let e,t,r,i,l;A[61]===Symbol.for("react.memo_cache_sentinel")?(e={className:eC().channelStart},A[61]=e):e=A[61],A[62]!==E?(t=(0,eD.D)(E),A[62]=E,A[63]=t):t=A[63],A[64]!==E?(r=(0,eN.Cx)(E),A[64]=E,A[65]=r):r=A[65],A[66]!==E||A[67]!==k?(i=!k&&!!(0,eN.KJ)(E),A[66]=E,A[67]=k,A[68]=i):i=A[68];let o=P||void 0,s=N||M;A[69]!==W||A[70]!==H||A[71]!==v||A[72]!==R||A[73]!==F||A[74]!==V||A[75]!==t||A[76]!==r||A[77]!==i||A[78]!==o||A[79]!==s?(l={memberIdFromIm:R,isSlackbotChannel:t,isSlackSecurityBotChannel:r,isUnread:i,mpimMemberCount:o,isSelected:!1,isTyping:!1,isAppIm:H,showAvatars:s,showPresence:V,mpimMember:F,iconType:W,isMuted:v,includePartyHat:!1,avatarSize:20},A[69]=W,A[70]=H,A[71]=v,A[72]=R,A[73]=F,A[74]=V,A[75]=t,A[76]=r,A[77]=i,A[78]=o,A[79]=s,A[80]=l):l=A[80],a=n.createElement("div",e,n.createElement(ex.A,l)),A[49]=E,A[50]=W,A[51]=k,A[52]=H,A[53]=N,A[54]=M,A[55]=v,A[56]=R,A[57]=F,A[58]=P,A[59]=V,A[60]=a}else a=A[60];if(A[81]!==T||A[82]!==w||A[83]!==O){let e,t,a;if(A[85]===Symbol.for("react.memo_cache_sentinel")?(e={className:eC().channelMiddle},A[85]=e):e=A[85],A[86]!==T||A[87]!==w){let e,a,r;if(A[89]!==w?(e=i()(eC().channelName,{[eC().bold]:w}),A[89]=w,A[90]=e):e=A[90],A[91]!==e?(a={className:e},A[91]=e,A[92]=a):a=A[92],A[93]!==T){let e;A[95]===Symbol.for("react.memo_cache_sentinel")?(e={lines:1},A[95]=e):e=A[95],r=n.createElement(er.A,e,T),A[93]=T,A[94]=r}else r=A[94];t=n.createElement("span",a,r),A[86]=T,A[87]=w,A[88]=t}else t=A[88];A[96]!==O?(a=O&&n.createElement("span",{className:eC().youLabel,"data-qa":"channel_sidebar_name_you"},ej.t("you")),A[96]=O,A[97]=a):a=A[97],r=n.createElement("div",e,t,a),A[81]=T,A[82]=w,A[83]=O,A[84]=r}else r=A[84];A[98]!==I?(l=I>0&&n.createElement("div",{className:eC().channelEnd},n.createElement(X.Gm,{count:I,style:X.rY.themed})),A[98]=I,A[99]=l):l=A[99],y=n.createElement(h.Ay,e,n.createElement("div",t,a,r,l)),A[30]=I,A[31]=E,A[32]=T,A[33]=W,A[34]=k,A[35]=H,A[36]=w,A[37]=N,A[38]=M,A[39]=v,A[40]=O,A[41]=R,A[42]=F,A[43]=P,A[44]=V,A[45]=y}else y=A[45];return y}:function({channelId:e}){let t=(0,S.d4)(t=>(0,eV.OL)(t,e)),a=!!t&&(0,eO.F)(t),r=e===(0,S.d4)(eG.bX),l=(0,S.d4)(t=>(0,eU.B)(t,e)),o=(0,S.d4)(e=>(0,eI.N)(e,t)),s=(0,n.useMemo)(()=>!r&&!!t&&!l&&((0,eN.KJ)(t)||o>0),[r,t,l,o]),c=(0,S.d4)(e=>t?(0,eR.SB)(e,t,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}):""),d=t&&(0,eM.LI)(t),m=t&&(0,eM.yz)(t),u=d?(0,eP.e)(t):void 0,p=m?(0,eN.N4)(t):void 0,_=(0,S.d4)(eB.WR),f=d&&u===_,b=(0,S.Z2)(e=>t?(0,eL.Z)(e,t):[]),g=m&&b?b[0]:void 0,y=(0,S.d4)(e=>(0,eq.nv)(e,u)),A=(0,eF.PV)(y),x=d&&!!A,E=(0,ew.A)({channel:t,isList:!1,isFrozenAndInGracePeriod:!1,isSuggested:!1,wasExternalChannelsTrial:!1}),C=(0,eT.A)({channel:t,isSelected:!1,isTyping:!1});return!t||a?null:n.createElement(h.Ay,{tip:c,position:"top",zIndex:"above_fs",shouldOnlyShowWhenTruncated:!0},n.createElement("div",{className:eC().channelOptionContent},n.createElement("div",{className:eC().channelStart},n.createElement(ex.A,{memberIdFromIm:u,isSlackbotChannel:(0,eD.D)(t),isSlackSecurityBotChannel:(0,eN.Cx)(t),isUnread:!r&&!!(0,eN.KJ)(t),mpimMemberCount:p||void 0,isSelected:!1,isTyping:!1,isAppIm:x,showAvatars:d||m,showPresence:C,mpimMember:g,iconType:E,isMuted:l,includePartyHat:!1,avatarSize:20})),n.createElement("div",{className:eC().channelMiddle},n.createElement("span",{className:i()(eC().channelName,{[eC().bold]:s})},n.createElement(er.A,{lines:1},c)),f&&n.createElement("span",{className:eC().youLabel,"data-qa":"channel_sidebar_name_you"},ej.t("you"))),o>0&&n.createElement("div",{className:eC().channelEnd},n.createElement(X.Gm,{count:o,style:X.rY.themed}))))}),eZ=(0,f.DA)()?function(e){let t,a,r,i,l,o,s,c,d,m,u,p,h,_,f,y,A,x,E,C,k,v,I,w,T,N=(0,b.c)(98),{sectionId:M,allChannelIds:R,readHiddenChannelIds:P,mutedHiddenChannelIds:L,unreadWithNoMentionsHiddenChannelIds:O,dormantHiddenChannelIds:D,channelsWithUnmutedUnreadsIds:F,onChannelSelect:U,onEntitySelect:B,isLoading:H,onHasUnreadsChange:W}=e,V=(0,g.Pj)();N[0]!==V?(t=(e,t)=>{let a=V.getState(),n=(0,eV.OL)(a,e),r=(0,eV.OL)(a,t);if(!n||!r)return 0;let i=(0,eR.SB)(a,n,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}),l=(0,eR.SB)(a,r,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1});return(0,ey.Ay)(i,l)},N[0]=V,N[1]=t):t=N[1];let G=t;N[2]!==R||N[3]!==G?(a=e=>{if(0===e.length)return e;if(R&&R.length>0){let t=new Map;return R.forEach((e,a)=>{t.set(e,a)}),[...e].sort((e,a)=>{let n=t.get(e),r=t.get(a);return void 0!==n&&void 0!==r?n-r:void 0===n&&void 0===r?G(e,a):void 0===n?1:-1})}return[...e].sort(G)},N[2]=R,N[3]=G,N[4]=a):a=N[4];let q=a;e:{let e;if(!R||0===R.length){r=null;break e}if(N[5]!==R||N[6]!==V){let t=V.getState(),a=[],n=[],r=[];for(let e of R){let i=(0,eV.OL)(t,e);if(!i||(0,eO.F)(i)||i.is_file)continue;let l=(0,eU.B)(t,e),o=(0,eN.KJ)(i);l?r.push(e):o?a.push(e):n.push(e)}e={unreadIds:a,readIds:n,mutedIds:r},N[5]=R,N[6]=V,N[7]=e}else e=N[7];r=e}let j=r;t:{let e;if(j){i=j.unreadIds;break t}N[8]!==F||N[9]!==O?(e=[...F,...O],N[8]=F,N[9]=O,N[10]=e):e=N[10],i=e}let z=i;a:{let e;if(j){let e,t;N[11]!==D?(e=new Set(D),N[11]=D,N[12]=e):e=N[12];let a=e;if(N[13]!==j.readIds||N[14]!==a){let e;N[16]!==a?(e=e=>!a.has(e),N[16]=a,N[17]=e):e=N[17],t=j.readIds.filter(e),N[13]=j.readIds,N[14]=a,N[15]=t}else t=N[15];l=t;break a}N[18]!==P?(e=Array.from(P),N[18]=P,N[19]=e):e=N[19],l=e}let K=l;n:{let e;if(j){o=j.mutedIds;break n}N[20]!==L?(e=Array.from(L),N[20]=L,N[21]=e):e=N[21],o=e}let $=o;r:{let e;if(j){let e,t;N[22]!==j.mutedIds?(e=new Set(j.mutedIds),N[22]=j.mutedIds,N[23]=e):e=N[23];let a=e;if(N[24]!==D||N[25]!==a){let e;N[27]!==a?(e=e=>!a.has(e),N[27]=a,N[28]=e):e=N[28],t=D.filter(e),N[24]=D,N[25]=a,N[26]=t}else t=N[26];s=t;break r}N[29]!==D?(e=Array.from(D),N[29]=D,N[30]=e):e=N[30],s=e}let Y=s;if(N[31]!==z||N[32]!==q||N[33]!==V){let e=V.getState();c=q(z.filter(t=>{let a=(0,eV.OL)(e,t);return!!a&&(0,eN.KJ)(a)})),N[31]=z,N[32]=q,N[33]=V,N[34]=c}else c=N[34];let Q=c;N[35]!==K||N[36]!==q?(d=q(Array.from(K)),N[35]=K,N[36]=q,N[37]=d):d=N[37];let Z=d;N[38]!==$||N[39]!==q?(m=q(Array.from($)),N[38]=$,N[39]=q,N[40]=m):m=N[40];let J=m;N[41]!==Y||N[42]!==q?(u=q(Array.from(Y)),N[41]=Y,N[42]=q,N[43]=u):u=N[43];let X=u,ee=Math.min(Q.length,500);p=500-ee;let et=Math.min(Z.length,p);p-=et;let ea=Math.min(J.length,p);p-=ea;let en=Math.min(X.length,p),er=Q.length+Z.length+J.length+X.length,ei=ee+et+ea+en;N[44]!==Q||N[45]!==ee?(h=Q.slice(0,ee),N[44]=Q,N[45]=ee,N[46]=h):h=N[46],N[47]!==et||N[48]!==Z?(_=Z.slice(0,et),N[47]=et,N[48]=Z,N[49]=_):_=N[49],N[50]!==ea||N[51]!==J?(f=J.slice(0,ea),N[50]=ea,N[51]=J,N[52]=f):f=N[52],N[53]!==en||N[54]!==X?(y=X.slice(0,en),N[53]=en,N[54]=X,N[55]=y):y=N[55],N[56]!==h||N[57]!==_||N[58]!==f||N[59]!==y?(A={unreads:h,read:_,muted:f,dormant:y},N[56]=h,N[57]=_,N[58]=f,N[59]=y,N[60]=A):A=N[60];let el=ei<er;N[61]!==A||N[62]!==el?(x={displayChannelIds:A,hasHiddenChannels:el},N[61]=A,N[62]=el,N[63]=x):x=N[63];let{displayChannelIds:eo,hasHiddenChannels:es}=x,ec=eo.unreads.length>0;N[64]!==ec||N[65]!==W?(E=()=>{W&&W(ec)},C=[ec,W],N[64]=ec,N[65]=W,N[66]=E,N[67]=C):(E=N[66],C=N[67]),(0,n.useEffect)(E,C),N[68]!==M?(k=e=>(0,eH.Lz)(e,M),N[68]=M,N[69]=k):k=N[69];let ed=(0,S.d4)(k);N[70]!==ed?(v=ed.filter(conversations_tab_temp),N[70]=ed,N[71]=v):v=N[71];let em=v;if(N[72]!==eo.dormant||N[73]!==eo.muted||N[74]!==eo.read||N[75]!==eo.unreads||N[76]!==em||N[77]!==V){let e=V.getState();I=[];let addSection=(t,a,n)=>{0!==t.length&&(I.length>0&&I.push({value:`divider-${n}`,label:"",type:"divider"}),I.push({value:`heading-${n}`,label:a,type:"heading",nonInteractive:!0}),t.forEach(t=>{let a=(0,eV.OL)(e,t);if(!a||(0,eO.F)(a)||a.is_file)return;let n=(0,eR.SB)(e,a,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1});I.push({value:t,label:n})}))};addSection(eo.unreads,ej.t("Unread conversations"),ez),addSection(eo.read,ej.t("Read conversations"),eK),addSection(eo.muted,ej.t("Muted"),e$),addSection(eo.dormant,ej.t("No new messages in the last 30 days"),eY),em.length>0&&(I.length>0&&I.push({value:"divider-salesforce-lists",label:"",type:"divider"}),I.push({value:"heading-salesforce-lists",label:ej.t("Salesforce lists",{ns:"modernselling"}),type:"heading",nonInteractive:!0}),em.forEach(e=>{I.push({value:`${ek}${e.entityId}`,label:e.label||e.fallbackLabel||""})})),N[72]=eo.dormant,N[73]=eo.muted,N[74]=eo.read,N[75]=eo.unreads,N[76]=em,N[77]=V,N[78]=I}else I=N[78];let eu=I,ep=_temp2;N[79]!==U||N[80]!==B?(w=e=>{if(e.value.startsWith(ek)){let t=e.value.slice(ek.length);B?.(t,eW.FN.SalesforceList,e.label);return}U(e.value)},N[79]=U,N[80]=B,N[81]=w):w=N[81];let eh=w,e_=eu.some(_temp3);if(N[82]!==eh||N[83]!==e_||N[84]!==es||N[85]!==H||N[86]!==eu){let e,t,a,r;N[88]===Symbol.for("react.memo_cache_sentinel")?(e={className:eC().conversationsContainer},N[88]=e):e=N[88],N[89]!==H?(t=H&&n.createElement("p",{className:"padding_inline_200"},ej.t("Loading hidden channels\u2026")),N[89]=H,N[90]=t):t=N[90],N[91]!==eh||N[92]!==H||N[93]!==eu?(a=!H&&n.createElement(eA.Ay,{options:eu,selectId:"hidden-channels-conversations",resultsInPopover:!1,size:"medium",placeholderText:ej.t("Find in section",{fallbackHash:"a9aa37e2ce2a483795eb179b28da72449b028880"}),inputIcon:"search",showDropdownIcon:!1,expandOnFocus:!0,isExpanded:!0,focusOnMount:!0,onOptionSelected:eh,renderOption:ep,filter:eS.Dm,ariaLabel:ej.t("Find in section",{fallbackHash:"a9aa37e2ce2a483795eb179b28da72449b028880"}),emptyStateMessage:_temp4,className:eC().searchSelect,shouldRefocusInputAfterSelection:!0}),N[91]=eh,N[92]=H,N[93]=eu,N[94]=a):a=N[94],N[95]!==e_||N[96]!==es?(r=es&&e_&&n.createElement("div",{className:eC().limitMessage},ej.t("Showing the first 500 conversations. Filter for others.")),N[95]=e_,N[96]=es,N[97]=r):r=N[97],T=n.createElement("div",e,t,a,r),N[82]=eh,N[83]=e_,N[84]=es,N[85]=H,N[86]=eu,N[87]=T}else T=N[87];return T}:function({sectionId:e,allChannelIds:t,readHiddenChannelIds:a,mutedHiddenChannelIds:r,unreadWithNoMentionsHiddenChannelIds:i,dormantHiddenChannelIds:l,channelsWithUnmutedUnreadsIds:o,onChannelSelect:s,onEntitySelect:c,isLoading:d,onHasUnreadsChange:m}){let u=(0,g.Pj)(),p=(0,n.useCallback)((e,t)=>{let a=u.getState(),n=(0,eV.OL)(a,e),r=(0,eV.OL)(a,t);if(!n||!r)return 0;let i=(0,eR.SB)(a,n,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1}),l=(0,eR.SB)(a,r,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1});return(0,ey.Ay)(i,l)},[u]),h=(0,n.useCallback)(e=>{if(0===e.length)return e;if(t&&t.length>0){let a=new Map;return t.forEach((e,t)=>{a.set(e,t)}),[...e].sort((e,t)=>{let n=a.get(e),r=a.get(t);return void 0!==n&&void 0!==r?n-r:void 0===n&&void 0===r?p(e,t):void 0===n?1:-1})}return[...e].sort(p)},[t,p]),_=(0,n.useMemo)(()=>{if(!t||0===t.length)return null;let e=u.getState(),a=[],n=[],r=[];for(let i of t){let t=(0,eV.OL)(e,i);if(!t||(0,eO.F)(t)||t.is_file)continue;let l=(0,eU.B)(e,i),o=(0,eN.KJ)(t);l?r.push(i):o?a.push(i):n.push(i)}return{unreadIds:a,readIds:n,mutedIds:r}},[t,u]),f=(0,n.useMemo)(()=>_?_.unreadIds:[...o,...i],[_,o,i]),b=(0,n.useMemo)(()=>{if(_){let e=new Set(l);return _.readIds.filter(t=>!e.has(t))}return Array.from(a)},[_,a,l]),y=(0,n.useMemo)(()=>_?_.mutedIds:Array.from(r),[_,r]),A=(0,n.useMemo)(()=>{if(_){let e=new Set(_.mutedIds);return l.filter(t=>!e.has(t))}return Array.from(l)},[l,_]),x=(0,n.useMemo)(()=>{let e=u.getState();return h(f.filter(t=>{let a=(0,eV.OL)(e,t);return!!a&&(0,eN.KJ)(a)}))},[f,u,h]),E=(0,n.useMemo)(()=>h(Array.from(b)),[b,h]),C=(0,n.useMemo)(()=>h(Array.from(y)),[y,h]),k=(0,n.useMemo)(()=>h(Array.from(A)),[A,h]),{displayChannelIds:v,hasHiddenChannels:I}=(0,n.useMemo)(()=>{let e=500,t=Math.min(x.length,e);e-=t;let a=Math.min(E.length,e);e-=a;let n=Math.min(C.length,e);e-=n;let r=Math.min(k.length,e),i=x.length+E.length+C.length+k.length,l=t+a+n+r;return{displayChannelIds:{unreads:x.slice(0,t),read:E.slice(0,a),muted:C.slice(0,n),dormant:k.slice(0,r)},hasHiddenChannels:l<i}},[x,E,C,k]),w=v.unreads.length>0;(0,n.useEffect)(()=>{m&&m(w)},[w,m]);let T=(0,S.d4)(t=>(0,eH.Lz)(t,e)),N=(0,n.useMemo)(()=>T.filter(e=>e.entityType===eW.FN.SalesforceList),[T]),M=(0,n.useMemo)(()=>{let e=u.getState(),t=[],addSection=(a,n,r)=>{0!==a.length&&(t.length>0&&t.push({value:`divider-${r}`,label:"",type:"divider"}),t.push({value:`heading-${r}`,label:n,type:"heading",nonInteractive:!0}),a.forEach(a=>{let n=(0,eV.OL)(e,a);if(!n||(0,eO.F)(n)||n.is_file)return;let r=(0,eR.SB)(e,n,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1});t.push({value:a,label:r})}))};return addSection(v.unreads,ej.t("Unread conversations"),ez),addSection(v.read,ej.t("Read conversations"),eK),addSection(v.muted,ej.t("Muted"),e$),addSection(v.dormant,ej.t("No new messages in the last 30 days"),eY),N.length>0&&(t.length>0&&t.push({value:"divider-salesforce-lists",label:"",type:"divider"}),t.push({value:"heading-salesforce-lists",label:ej.t("Salesforce lists",{ns:"modernselling"}),type:"heading",nonInteractive:!0}),N.forEach(e=>{t.push({value:`${ek}${e.entityId}`,label:e.label||e.fallbackLabel||""})})),t},[v,u,N]),R=(0,n.useCallback)((e,t)=>t?.isGroupHeader||"heading"===e.type?n.createElement("span",{className:eC().sectionLegend},e.label):e.value.startsWith(ek)?n.createElement("div",{className:eC().channelRow},n.createElement(ev,{label:e.label})):n.createElement("div",{className:eC().channelRow},n.createElement(eQ,{channelId:e.value})),[]),P=(0,n.useCallback)(e=>{if(e.value.startsWith(ek)){let t=e.value.slice(ek.length);c?.(t,eW.FN.SalesforceList,e.label);return}s(e.value)},[s,c]),L=M.some(e=>"heading"!==e.type&&"divider"!==e.type);return n.createElement("div",{className:eC().conversationsContainer},d&&n.createElement("p",{className:"padding_inline_200"},ej.t("Loading hidden channels\u2026")),!d&&n.createElement(eA.Ay,{options:M,selectId:"hidden-channels-conversations",resultsInPopover:!1,size:"medium",placeholderText:ej.t("Find in section",{fallbackHash:"a9aa37e2ce2a483795eb179b28da72449b028880"}),inputIcon:"search",showDropdownIcon:!1,expandOnFocus:!0,isExpanded:!0,focusOnMount:!0,onOptionSelected:P,renderOption:R,filter:eS.Dm,ariaLabel:ej.t("Find in section",{fallbackHash:"a9aa37e2ce2a483795eb179b28da72449b028880"}),emptyStateMessage:()=>"No conversations found matching your search",className:eC().searchSelect,shouldRefocusInputAfterSelection:!0}),I&&L&&n.createElement("div",{className:eC().limitMessage},ej.t("Showing the first 500 conversations. Filter for others.")))};function _temp4(){return"No conversations found matching your search"}function _temp3(e){return"heading"!==e.type&&"divider"!==e.type}function _temp2(e,t){return t?.isGroupHeader||"heading"===e.type?n.createElement("span",{className:eC().sectionLegend},e.label):e.value.startsWith(ek)?n.createElement("div",{className:eC().channelRow},n.createElement(ev,{label:e.label})):n.createElement("div",{className:eC().channelRow},n.createElement(eQ,{channelId:e.value}))}function conversations_tab_temp(e){return e.entityType===eW.FN.SalesforceList}eZ.displayName="ConversationsTab";var eJ=a(0x9edd91a2),eX=a(0xf54a24af),e0=a(0x222e63440);function muteAllChannelsInSection({dispatch:e,sectionId:t,channelIds:a=[]}){(0,ed.K)("mute",{channel_section_id:t}),e((0,e0.A)({channelIdsToMute:a}))}function unmuteAllChannelsInSection({dispatch:e,sectionId:t,channelIds:a=[]}){(0,ed.K)("unmute",{channel_section_id:t}),e((0,e0.A)({channelIdsToUnmute:a}))}function shareChannelsInSection({dispatch:e,sectionId:t,sectionName:a="",sectionEmoji:n,channelIds:r=[]}){(0,ed.K)("share_channel_section",{channel_section_id:t}),e((0,eX.y)({channelSectionName:a,channelIdsIncludedInSection:r,emoji:n}))}function copySectionLink({dispatch:e,sectionId:t,sectionName:a="",sectionEmoji:n,channelIds:r=[]}){(0,ed.K)("copy_section_link",{channel_section_id:t}),r.length>0&&e((0,eJ.k)({sectionName:a,channels:r,emoji:n}))}var e1=a(0x250af0199),e2=a(0xe0bad038),e4=a(0x3020a630),e5=a(0x12c9f31d5),e3=a(0x9cd3a930),e6=a(0xeeca30d2);function getSectionIconName(e){switch(e){case e_.VZ.DirectMessages:return"direct-messages";case e_.VZ.Channels:return"channel-section";case e_.VZ.RecentApps:return"apps";case e_.VZ.SlackConnect:return"buildings";case e_.VZ.Agents:return"ai-agents";case e_.VZ.SalesforceRecords:return"sf-cloud";case e_.VZ.Stars:return"star";default:return"section"}}function hasSectionIcon(e){return!0}function shouldShowDefaultSectionIcon({sectionType:e,emoji:t,experimentEmptyStarredSectionGroupOn:a,experimentSidebarVisualUpdatesM1GroupOn:n}){return(e===e_.VZ.Stars&&a||n&&!t)&&hasSectionIcon(e)}var e8=a(0x217c68a35),e7=a(0x1b3ecb90f),e9=a(0xc9f59321),te=a(0x238b287cf),tt=a(0x188544c76),ta=a(0x369bcfe0),tn=a(0x9f5891b3),tr=a(0x165ae5881),ti=a(0x24f5b5d9b),tl=a(0xb4434dab),to=a(0x14f66396b),ts=a(0x1c100a3ca),tc=a(0x1e561f770),td=a(0xf139e1df),tm=a(0x35456108),tu=a(0x1380694ee),tp=a(0x1fcbb004d),th=a(0x46dbff89),t_=a(0x35945a76),tf=a(0x1f3e7d87e),tb=a(0x1f32b800d),tg=a(0x1ca7885e6),ty=a.n(tg);let tA=new d.Ay("channel_sidebar"),tx=[],tE="conversations",tC="actions",tk="hidden-channels-modal",tv="hidden-channels-modal-conversations-tab",tS="hidden-channels-modal-actions-tab",tI="hidden-channels-modal-mark-as-read",tw="hidden-channels-modal-close",tT=(0,f.DA)()?function(e){let t,a,r,i,l,o,s,c,d,m,u,_,f,y,A,x,E,C,k,v,I,w,T,N,M,R,P,L,O,D,F,U,B,W,V,G,q,j,z,K,$=(0,b.c)(237),{onClose:Y,sectionId:Q,sectionType:Z,sectionName:J,sectionEmoji:X,defaultTabId:ee,onTabChange:et,allChannelIds:ea,readHiddenChannelIds:en,mutedHiddenChannelIds:ei,unreadWithNoMentionsHiddenChannelIds:em,dormantHiddenChannelIds:eu,channelsWithUnmutedUnreadsIds:ep,showTabsBar:eh,showSectionHeader:ef}=e,eb=void 0===J?"":J,eg=void 0===ee?tE:ee,ey=void 0===en?tx:en,eA=void 0===ei?tx:ei,ex=void 0===em?tx:em,eE=void 0===eu?tx:eu,eC=void 0===ep?tx:ep,ek=void 0===eh||eh,ev=void 0===ef||ef,eI=(0,g.wA)(),ew=(0,te.A)();$[0]!==Q?(t=e=>(0,tu.X$)(e,Q),$[0]=Q,$[1]=t):t=$[1];let eT=(0,S.d4)(t);e:{let e;if(ea&&ea.length>0){let e,t,n;$[2]!==ea?(e=new Set(ea),$[2]=ea,$[3]=e):e=$[3];let r=e;if($[4]!==eE||$[5]!==eA||$[6]!==ey||$[7]!==ex||$[8]!==r){let e=[...ey,...eA,...ex,...eE],a=new Set;t=e.filter(e=>!(r.has(e)||a.has(e))&&(a.add(e),!0)),$[4]=eE,$[5]=eA,$[6]=ey,$[7]=ex,$[8]=r,$[9]=t}else t=$[9];let i=t;$[10]!==i||$[11]!==ea?(n=[...ea,...i],$[10]=i,$[11]=ea,$[12]=n):n=$[12],a=n;break e}if(eT.length>0){a=eT;break e}$[13]===Symbol.for("react.memo_cache_sentinel")?(e=[],$[13]=e):e=$[13],a=e}let eM=a;$[14]!==Q?(r=e=>(0,eH.Lz)(e,Q),$[14]=Q,$[15]=r):r=$[15];let eR=(0,S.d4)(r).length>0,eP=eM.length>0||ey.length>0||eA.length>0||ex.length>0||eE.length>0||eR,eL=eg!==tE||eP?eg:tC,[eO,eD]=(0,n.useState)(eL),[eF,eB]=(0,n.useState)(!1);$[16]!==eb||$[17]!==Z?(i=(0,eS.b4)(Z,eb),$[16]=eb,$[17]=Z,$[18]=i):i=$[18];let eW=i,eG=Z===e_.VZ.SalesforceRecords?"":X;$[19]!==Z?(l=getSectionIconName(Z)??"section",$[19]=Z,$[20]=l):l=$[20];let eq=l,ej=hidden_channels_modal_temp,ez=(0,S.d4)(tf.K5),eK=(0,S.d4)(e4.K),e$=(0,S.d4)(e5.D),eY=(0,S.d4)(e9.A);$[21]!==ez||$[22]!==Q?(o=ez[Q]||{},$[21]=ez,$[22]=Q,$[23]=o):o=$[23];let eQ=o,eJ=eQ[t_.eJ],eX=eQ[t_.jx],e0=(0,S.d4)(eU.m),tb=Z===e_.VZ.Standard,tg=Z===e_.VZ.Standard||Z===e_.VZ.Stars,tT=!1,tN=!1;for(let e of eM)if(e0?.[e]?tT=!0:tN=!0,tT&&tN)break;$[24]!==tT||$[25]!==tN?(s={canMuteSection:tN,canUnmuteSection:tT},$[24]=tT,$[25]=tN,$[26]=s):s=$[26];let{canMuteSection:tM,canUnmuteSection:tR}=s;$[27]!==eM?(c=e=>{let t=(0,eU.m)(e);return eM.filter(a=>{if(t?.[a])return!1;let n=(0,eV.OL)(e,a);return!!n&&!!(0,eN.KJ)(n)})},$[27]=eM,$[28]=c):c=$[28];let tP=(0,S.Z2)(c);$[29]!==et?(d=e=>{eD(e),et?.(e)},$[29]=et,$[30]=d):d=$[30];let tL=d;$[31]===Symbol.for("react.memo_cache_sentinel")?(m=e=>{eB(e)},$[31]=m):m=$[31];let tO=m;$[32]!==eI||$[33]!==Y?(u=e=>{eI((0,tm.e)({channelId:e})),Y()},$[32]=eI,$[33]=Y,$[34]=u):u=$[34];let tD=u;$[35]!==eI||$[36]!==Y?(_=(e,t,a)=>{let{salesforceOrgId:n,rawRecordId:r}=(0,tt.D)(e);eI((0,tn.x)({listView:{id:r,label:a,objectType:"",salesforceOrgId:n},openInHome:!0})),Y()},$[35]=eI,$[36]=Y,$[37]=_):_=$[37];let tF=_;$[38]!==tP||$[39]!==eI||$[40]!==Y||$[41]!==Q?(f=()=>{(0,ed.K)("mark_as_read",{channel_section_id:Q}),eI((0,tr.A)({channelIds:tP,displayCount:tP.length,reason:"hidden-channels-modal-mark-as-read"})),Y()},$[38]=tP,$[39]=eI,$[40]=Y,$[41]=Q,$[42]=f):f=$[42];let tU=f;$[43]!==eI||$[44]!==X||$[45]!==Q||$[46]!==eb||$[47]!==Z?(y=()=>{(0,ed.K)("create_new_channel",{channel_section_id:Q}),eI((0,ts.A)({targetChannelSection:{id:Q,type:Z,name:eb,emoji:X||"",nextChannelSectionId:null},entryPoint:e8.IV.ChannelSidebar}))},$[43]=eI,$[44]=X,$[45]=Q,$[46]=eb,$[47]=Z,$[48]=y):y=$[48];let tB=y;$[49]!==eI||$[50]!==Q?(A=()=>{(0,ed.K)("create_new_section",{channel_section_id:Q}),eI((0,ec.i)({action:es.TH.CREATE}))},$[49]=eI,$[50]=Q,$[51]=A):A=$[51];let tH=A;$[52]!==eM||$[53]!==eI||$[54]!==X||$[55]!==Q||$[56]!==eb?(x=()=>{shareChannelsInSection({dispatch:eI,sectionId:Q,sectionName:eb,sectionEmoji:X,channelIds:eM})},$[52]=eM,$[53]=eI,$[54]=X,$[55]=Q,$[56]=eb,$[57]=x):x=$[57];let tW=x;$[58]!==eM||$[59]!==eI||$[60]!==Y||$[61]!==X||$[62]!==Q||$[63]!==eb?(E=()=>{copySectionLink({dispatch:eI,sectionId:Q,sectionName:eb,sectionEmoji:X,channelIds:eM}),Y()},$[58]=eM,$[59]=eI,$[60]=Y,$[61]=X,$[62]=Q,$[63]=eb,$[64]=E):E=$[64];let tV=E;$[65]!==eI||$[66]!==X||$[67]!==Q||$[68]!==eb?(C=()=>{(0,ed.K)("rename",{channel_section_id:Q}),eI((0,ec.i)({action:es.TH.RENAME,channelSectionId:Q,initialText:eb,initialEmoji:X}))},$[65]=eI,$[66]=X,$[67]=Q,$[68]=eb,$[69]=C):C=$[69];let tG=C;$[70]!==eM||$[71]!==tM||$[72]!==eI||$[73]!==Q?(k=()=>{tM?muteAllChannelsInSection({dispatch:eI,sectionId:Q,channelIds:eM}):unmuteAllChannelsInSection({dispatch:eI,sectionId:Q,channelIds:eM})},$[70]=eM,$[71]=tM,$[72]=eI,$[73]=Q,$[74]=k):k=$[74];let tq=k;if($[75]!==ez||$[76]!==ew||$[77]!==eI||$[78]!==eK||$[79]!==e$||$[80]!==X||$[81]!==Q||$[82]!==eb||$[83]!==eQ||$[84]!==Z||$[85]!==eJ||$[86]!==eX){let e=(0,eS.AW)({sectionId:Q,sectionType:Z,sectionName:eb,sectionEmoji:X,showBehavior:eJ,sortPref:eX,sectionPrefs:eQ,channelSectionPrefs:ez,experimentFilterDormantChannelsGroupOn:eK,experimentMuteChannelEduGroupOn:e$,clogger:ew,setChannelSectionPref:ej}),t=(0,e1.fg)(eI,e);v=(0,eS.wK)(t),$[75]=ez,$[76]=ew,$[77]=eI,$[78]=eK,$[79]=e$,$[80]=X,$[81]=Q,$[82]=eb,$[83]=eQ,$[84]=Z,$[85]=eJ,$[86]=eX,$[87]=v}else v=$[87];let{filterItems:tj,sortItems:tK}=v;$[88]!==tj?(I=tj||[],$[88]=tj,$[89]=I):I=$[89],$[90]!==tK?(w=tK||[],$[90]=tK,$[91]=w):w=$[91],$[92]!==eK||$[93]!==eJ?(T=(0,e3.F)({experimentFilterDormantChannelsGroupOn:eK},eJ),$[92]=eK,$[93]=eJ,$[94]=T):T=$[94],$[95]!==eX?(N=(0,e6.H)(eX),$[95]=eX,$[96]=N):N=$[96],$[97]!==I||$[98]!==w||$[99]!==T||$[100]!==N?(M={filterMenuItems:I,sortMenuItems:w,currentFilterLabel:T,currentSortLabel:N},$[97]=I,$[98]=w,$[99]=T,$[100]=N,$[101]=M):M=$[101];let{filterMenuItems:t$,sortMenuItems:tY,currentFilterLabel:tQ,currentSortLabel:tZ}=M;$[102]!==X?(R=()=>X?n.createElement("span",null,X," "):null,$[102]=X,$[103]=R):R=$[103];let tJ=R;$[104]!==eM.length||$[105]!==eI||$[106]!==Y||$[107]!==tJ||$[108]!==Q?(P=()=>{(0,ed.K)("delete_section",{channel_section_id:Q}),eM.length>0?eI((0,th.q)({element:n.createElement(e2.A,{onModalSubmit:()=>{eI((0,to.A)({channelSectionId:Q,reason:"hidden-channels-modal-confirm-delete"})).then(()=>{Y()}).finally(()=>{eI((0,tp.O)())})},onModalClose:()=>eI((0,tp.O)()),channelSectionId:Q,emojiPrefix:tJ()})})):(eI((0,to.A)({channelSectionId:Q,reason:"hidden-channels-modal-delete"})),Y())},$[104]=eM.length,$[105]=eI,$[106]=Y,$[107]=tJ,$[108]=Q,$[109]=P):P=$[109];let tX=P;$[110]!==ew||$[111]!==eI||$[112]!==Q?(L=()=>{(0,ed.K)("start_dm",{channel_section_id:Q}),eI((0,tc.o)({openComposer:!0})),ew.track(H.EventId.IM_BROWSER_OPEN,{label:"ims",contexts:{ui_context:{entry_point:"hidden_channels_modal"}}})},$[110]=ew,$[111]=eI,$[112]=Q,$[113]=L):L=$[113];let t0=L;$[114]!==eI||$[115]!==Q?(O=()=>{(0,ed.K)("manage_vips",{channel_section_id:Q}),eI((0,ta.H)())},$[114]=eI,$[115]=Q,$[116]=O):O=$[116];let t1=O;$[117]!==ew||$[118]!==eI||$[119]!==Q?(D=()=>{(0,ed.K)("browse_apps",{channel_section_id:Q}),eI((0,tl.A)()),eI((0,td.z)({eventId:H.EventId.APP_LAUNCHER_OPEN_FROM_PLUS_BUTTON})),ew.track(H.EventId.SIDEBAR_PLUS_CLICK,{label:"apps"})},$[117]=ew,$[118]=eI,$[119]=Q,$[120]=D):D=$[120];let t2=D;$[121]!==eI||$[122]!==Y||$[123]!==Q?(F=()=>{(0,ed.K)("Browse Slack Connect",{channel_section_id:Q}),eI((0,ti.R)({entryPoint:"channel_sidebar_slack_connect_options"})),Y()},$[121]=eI,$[122]=Y,$[123]=Q,$[124]=F):F=$[124];let t4=F;if($[125]!==tP.length||$[126]!==tg||$[127]!==tM||$[128]!==tb||$[129]!==tR||$[130]!==tQ||$[131]!==tZ||$[132]!==t$||$[133]!==t2||$[134]!==t4||$[135]!==tV||$[136]!==tX||$[137]!==t1||$[138]!==tU||$[139]!==tq||$[140]!==tB||$[141]!==t0||$[142]!==tH||$[143]!==tG||$[144]!==tW||$[145]!==eY||$[146]!==Q||$[147]!==Z||$[148]!==tY){let e,t=Z===e_.VZ.DirectMessages?t0:void 0,a=Z===e_.VZ.DirectMessages||Z===e_.VZ.Priority?t1:void 0,r=Z===e_.VZ.RecentApps?t2:void 0,i=Z!==e_.VZ.SlackConnect&&(Z!==e_.VZ.Channels||eY)?void 0:t4,l=tP.length>0;$[150]!==tg||$[151]!==tM||$[152]!==tb||$[153]!==tR||$[154]!==tQ||$[155]!==tZ||$[156]!==t$||$[157]!==tV||$[158]!==tX||$[159]!==tU||$[160]!==tq||$[161]!==tB||$[162]!==tH||$[163]!==tG||$[164]!==tW||$[165]!==Q||$[166]!==Z||$[167]!==tY||$[168]!==t||$[169]!==a||$[170]!==r||$[171]!==i||$[172]!==l?(e={sectionId:Q,sectionType:Z,onNewChannel:tB,onNewSection:tH,onShareChannels:tW,onCopySectionLink:tV,onRename:tG,onMuteUnmuteAllChannels:tq,canMuteSection:tM,canUnmuteSection:tR,canShareSection:tb,filterMenuItems:t$,sortMenuItems:tY,currentFilterLabel:tQ,currentSortLabel:tZ,onNewDirectMessage:t,onManageVIPs:a,onBrowseApps:r,onBrowseExternalConnections:i,onDeleteSection:tX,canDeleteSection:tg,onMarkAllAsRead:tU,hasUnreads:l},$[150]=tg,$[151]=tM,$[152]=tb,$[153]=tR,$[154]=tQ,$[155]=tZ,$[156]=t$,$[157]=tV,$[158]=tX,$[159]=tU,$[160]=tq,$[161]=tB,$[162]=tH,$[163]=tG,$[164]=tW,$[165]=Q,$[166]=Z,$[167]=tY,$[168]=t,$[169]=a,$[170]=r,$[171]=i,$[172]=l,$[173]=e):e=$[173],U=n.createElement(ActionsTab,e),$[125]=tP.length,$[126]=tg,$[127]=tM,$[128]=tb,$[129]=tR,$[130]=tQ,$[131]=tZ,$[132]=t$,$[133]=t2,$[134]=t4,$[135]=tV,$[136]=tX,$[137]=t1,$[138]=tU,$[139]=tq,$[140]=tB,$[141]=t0,$[142]=tH,$[143]=tG,$[144]=tW,$[145]=eY,$[146]=Q,$[147]=Z,$[148]=tY,$[149]=U}else U=$[149];let t5=U;$[174]!==eC||$[175]!==eE||$[176]!==tD||$[177]!==tF||$[178]!==eP||$[179]!==eA||$[180]!==ey||$[181]!==Q||$[182]!==eM||$[183]!==ex?(B=eP&&{id:tE,label:tA.t("Conversations"),title:tA.t("Conversations"),content:n.createElement(eZ,{sectionId:Q,allChannelIds:eM,readHiddenChannelIds:ey,mutedHiddenChannelIds:eA,unreadWithNoMentionsHiddenChannelIds:ex,dormantHiddenChannelIds:eE,channelsWithUnmutedUnreadsIds:eC,onChannelSelect:tD,onEntitySelect:tF,isLoading:!1,onHasUnreadsChange:tO}),"data-qa":tv},$[174]=eC,$[175]=eE,$[176]=tD,$[177]=tF,$[178]=eP,$[179]=eA,$[180]=ey,$[181]=Q,$[182]=eM,$[183]=ex,$[184]=B):B=$[184],$[185]===Symbol.for("react.memo_cache_sentinel")?(W=tA.t("Actions"),V=tA.t("Actions"),$[185]=W,$[186]=V):(W=$[185],V=$[186]),$[187]!==t5?(G={id:tC,label:W,title:V,content:t5,"data-qa":tS},$[187]=t5,$[188]=G):G=$[188],$[189]!==B||$[190]!==G?(q=[B,G].filter(Boolean),$[189]=B,$[190]=G,$[191]=q):q=$[191];let t3=q,t6=1===t3.length,t8=hidden_channels_modal_temp2;$[192]!==t3?(j=t3.find(hidden_channels_modal_temp3),$[192]=t3,$[193]=j):j=$[193];let t7=j,t9=t7?.content??null;if($[194]!==tP.length||$[195]!==tU||$[196]!==eF||$[197]!==Y){let e,t,a;if($[199]===Symbol.for("react.memo_cache_sentinel")?(e={className:ty().headerButtons},$[199]=e):e=$[199],$[200]!==tP.length||$[201]!==tU||$[202]!==eF?(t=(eF||tP.length>0)&&n.createElement(h.Ay,{tip:tA.t("Mark all as read"),zIndex:"above_fs"},n.createElement(el.A,{size:"small",svgIconProps:{name:"mark-as-read",size:"16"},onClick:tU,"aria-label":tA.t("Mark all as read"),"data-qa":tI})),$[200]=tP.length,$[201]=tU,$[202]=eF,$[203]=t):t=$[203],$[204]!==Y){let e,t,r;$[206]===Symbol.for("react.memo_cache_sentinel")?(e={tip:tA.t("Close"),zIndex:"above_fs"},$[206]=e):e=$[206],$[207]===Symbol.for("react.memo_cache_sentinel")?(t={name:"close",size:"16"},$[207]=t):t=$[207],$[208]===Symbol.for("react.memo_cache_sentinel")?(r=tA.t("Close"),$[208]=r):r=$[208],a=n.createElement(h.Ay,e,n.createElement(el.A,{size:"small",svgIconProps:t,onClick:Y,"aria-label":r,"data-qa":tw})),$[204]=Y,$[205]=a}else a=$[205];z=n.createElement("div",e,t,a),$[194]=tP.length,$[195]=tU,$[196]=eF,$[197]=Y,$[198]=z}else z=$[198];let ae=z;if($[209]!==t9||$[210]!==eO||$[211]!==eW||$[212]!==eG||$[213]!==tL||$[214]!==t6||$[215]!==ae||$[216]!==eq||$[217]!==ev||$[218]!==ek||$[219]!==t3){let e,t,a,r=`c-sk-modal ${ty().modalContainer} ${t6||!ek?ty().singleTab:""}`;$[221]!==r?(e={className:r,"data-qa":tk,onContextMenu:t8},$[221]=r,$[222]=e):e=$[222],$[223]!==eW||$[224]!==eG||$[225]!==ae||$[226]!==eq||$[227]!==ev?(t=ev&&n.createElement("div",{className:ty().header},eG?n.createElement(e7.Ay,{text:eG,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:e7.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,renderEmojiFallback:!0,className:ty().sectionIcon}):n.createElement(p.Ah,{name:eq,size:"16",className:ty().sectionIcon}),n.createElement(h.Ay,{tip:eW,zIndex:"above_fs",shouldOnlyShowWhenTruncated:!0},n.createElement("h2",{className:ty().title},n.createElement(er.A,{lines:1},eW))),ae),$[223]=eW,$[224]=eG,$[225]=ae,$[226]=eq,$[227]=ev,$[228]=t):t=$[228],$[229]!==t9||$[230]!==eO||$[231]!==tL||$[232]!==ae||$[233]!==ev||$[234]!==ek||$[235]!==t3?(a=ek?n.createElement("div",{className:ev?void 0:ty().tabsWithButtons},n.createElement(eo.A,{tabs:t3,currentTabId:eO,onTabChange:tL,ariaLabel:tA.t("View options"),focusOnMount:!0}),!ev&&ae):n.createElement(n.Fragment,null,!ev&&ae,t9),$[229]=t9,$[230]=eO,$[231]=tL,$[232]=ae,$[233]=ev,$[234]=ek,$[235]=t3,$[236]=a):a=$[236],K=n.createElement("div",e,t,a),$[209]=t9,$[210]=eO,$[211]=eW,$[212]=eG,$[213]=tL,$[214]=t6,$[215]=ae,$[216]=eq,$[217]=ev,$[218]=ek,$[219]=t3,$[220]=K}else K=$[220];return K}:function({isOpen:e,onClose:t,sectionId:a,sectionType:r,sectionName:i="",sectionEmoji:l,defaultTabId:o=tE,onTabChange:s,allChannelIds:c,readHiddenChannelIds:d=tx,mutedHiddenChannelIds:m=tx,unreadWithNoMentionsHiddenChannelIds:u=tx,dormantHiddenChannelIds:_=tx,channelsWithUnmutedUnreadsIds:f=tx,showTabsBar:b=!0,showSectionHeader:y=!0}){let A=(0,g.wA)(),x=(0,te.A)(),E=(0,S.d4)(e=>(0,tu.X$)(e,a)),C=(0,n.useMemo)(()=>{if(c&&c.length>0){let e=new Set(c),t=[...d,...m,...u,..._],a=new Set;return[...c,...t.filter(t=>!(e.has(t)||a.has(t))&&(a.add(t),!0))]}return E.length>0?E:[]},[c,E,d,m,u,_]),k=(0,S.d4)(e=>(0,eH.Lz)(e,a)).length>0,v=C.length>0||d.length>0||m.length>0||u.length>0||_.length>0||k,I=o!==tE||v?o:tC,[w,T]=(0,n.useState)(I),[N,M]=(0,n.useState)(!1),R=(0,n.useMemo)(()=>(0,eS.b4)(r,i),[r,i]),P=r===e_.VZ.SalesforceRecords?"":l,L=(0,n.useMemo)(()=>getSectionIconName(r)??"section",[r]),O=(0,n.useCallback)(e=>(0,tb.th)(e),[]),D=(0,S.d4)(tf.K5),F=(0,S.d4)(e4.K),U=(0,S.d4)(e5.D),B=(0,S.d4)(e9.A),W=(0,n.useMemo)(()=>D[a]||{},[D,a]),V=W[t_.eJ],G=W[t_.jx],q=(0,S.d4)(eU.m),j=(0,n.useMemo)(()=>r===e_.VZ.Standard,[r]),z=(0,n.useMemo)(()=>r===e_.VZ.Standard||r===e_.VZ.Stars,[r]),{canMuteSection:K,canUnmuteSection:$}=(0,n.useMemo)(()=>{let e=!1,t=!1;for(let a of C)if(q?.[a]?e=!0:t=!0,e&&t)break;return{canMuteSection:t,canUnmuteSection:e}},[C,q]),Y=(0,S.Z2)(e=>{let t=(0,eU.m)(e);return C.filter(a=>{if(t?.[a])return!1;let n=(0,eV.OL)(e,a);return!!n&&!!(0,eN.KJ)(n)})}),Q=(0,n.useCallback)(e=>{T(e),s?.(e)},[s]),Z=(0,n.useCallback)(e=>{M(e)},[]),J=(0,n.useCallback)(e=>{A((0,tm.e)({channelId:e})),t()},[A,t]),X=(0,n.useCallback)((e,a,n)=>{let{salesforceOrgId:r,rawRecordId:i}=(0,tt.D)(e);A((0,tn.x)({listView:{id:i,label:n,objectType:"",salesforceOrgId:r},openInHome:!0})),t()},[A,t]),ee=(0,n.useCallback)(()=>{(0,ed.K)("mark_as_read",{channel_section_id:a}),A((0,tr.A)({channelIds:Y,displayCount:Y.length,reason:"hidden-channels-modal-mark-as-read"})),t()},[A,a,Y,t]),et=(0,n.useCallback)(()=>{(0,ed.K)("create_new_channel",{channel_section_id:a}),A((0,ts.A)({targetChannelSection:{id:a,type:r,name:i,emoji:l||"",nextChannelSectionId:null},entryPoint:e8.IV.ChannelSidebar}))},[A,a,r,i,l]),ea=(0,n.useCallback)(()=>{(0,ed.K)("create_new_section",{channel_section_id:a}),A((0,ec.i)({action:es.TH.CREATE}))},[A,a]),en=(0,n.useCallback)(()=>{shareChannelsInSection({dispatch:A,sectionId:a,sectionName:i,sectionEmoji:l,channelIds:C})},[A,a,i,l,C]),ei=(0,n.useCallback)(()=>{copySectionLink({dispatch:A,sectionId:a,sectionName:i,sectionEmoji:l,channelIds:C}),t()},[A,a,i,l,C,t]),em=(0,n.useCallback)(()=>{(0,ed.K)("rename",{channel_section_id:a}),A((0,ec.i)({action:es.TH.RENAME,channelSectionId:a,initialText:i,initialEmoji:l}))},[A,a,i,l]),eu=(0,n.useCallback)(()=>{K?muteAllChannelsInSection({dispatch:A,sectionId:a,channelIds:C}):unmuteAllChannelsInSection({dispatch:A,sectionId:a,channelIds:C})},[A,a,C,K]),{filterMenuItems:ep,sortMenuItems:eh,currentFilterLabel:ef,currentSortLabel:eb}=(0,n.useMemo)(()=>{let e=(0,eS.AW)({sectionId:a,sectionType:r,sectionName:i,sectionEmoji:l,showBehavior:V,sortPref:G,sectionPrefs:W,channelSectionPrefs:D,experimentFilterDormantChannelsGroupOn:F,experimentMuteChannelEduGroupOn:U,clogger:x,setChannelSectionPref:O}),t=(0,e1.fg)(A,e),{filterItems:n,sortItems:o}=(0,eS.wK)(t);return{filterMenuItems:n||[],sortMenuItems:o||[],currentFilterLabel:(0,e3.F)({experimentFilterDormantChannelsGroupOn:F},V),currentSortLabel:(0,e6.H)(G)}},[A,a,r,i,l,V,G,F,U,W,D,x,O]),eg=(0,n.useCallback)(()=>l?n.createElement("span",null,l," "):null,[l]),ey=(0,n.useCallback)(()=>{(0,ed.K)("delete_section",{channel_section_id:a}),C.length>0?A((0,th.q)({element:n.createElement(e2.A,{onModalSubmit:()=>{A((0,to.A)({channelSectionId:a,reason:"hidden-channels-modal-confirm-delete"})).then(()=>{t()}).finally(()=>{A((0,tp.O)())})},onModalClose:()=>A((0,tp.O)()),channelSectionId:a,emojiPrefix:eg()})})):(A((0,to.A)({channelSectionId:a,reason:"hidden-channels-modal-delete"})),t())},[A,a,C,t,eg]),eA=(0,n.useCallback)(()=>{(0,ed.K)("start_dm",{channel_section_id:a}),A((0,tc.o)({openComposer:!0})),x.track(H.EventId.IM_BROWSER_OPEN,{label:"ims",contexts:{ui_context:{entry_point:"hidden_channels_modal"}}})},[A,a,x]),ex=(0,n.useCallback)(()=>{(0,ed.K)("manage_vips",{channel_section_id:a}),A((0,ta.H)())},[A,a]),eE=(0,n.useCallback)(()=>{(0,ed.K)("browse_apps",{channel_section_id:a}),A((0,tl.A)()),A((0,td.z)({eventId:H.EventId.APP_LAUNCHER_OPEN_FROM_PLUS_BUTTON})),x.track(H.EventId.SIDEBAR_PLUS_CLICK,{label:"apps"})},[A,a,x]),eC=(0,n.useCallback)(()=>{(0,ed.K)("Browse Slack Connect",{channel_section_id:a}),A((0,ti.R)({entryPoint:"channel_sidebar_slack_connect_options"})),t()},[A,a,t]),ek=(0,n.useMemo)(()=>n.createElement(ActionsTab,{sectionId:a,sectionType:r,onNewChannel:et,onNewSection:ea,onShareChannels:en,onCopySectionLink:ei,onRename:em,onMuteUnmuteAllChannels:eu,canMuteSection:K,canUnmuteSection:$,canShareSection:j,filterMenuItems:ep,sortMenuItems:eh,currentFilterLabel:ef,currentSortLabel:eb,onNewDirectMessage:r===e_.VZ.DirectMessages?eA:void 0,onManageVIPs:r===e_.VZ.DirectMessages||r===e_.VZ.Priority?ex:void 0,onBrowseApps:r===e_.VZ.RecentApps?eE:void 0,onBrowseExternalConnections:r!==e_.VZ.SlackConnect&&(r!==e_.VZ.Channels||B)?void 0:eC,onDeleteSection:ey,canDeleteSection:z,onMarkAllAsRead:ee,hasUnreads:Y.length>0}),[a,r,et,ea,en,ei,em,eu,K,$,j,ep,eh,ef,eb,eA,ex,eE,eC,B,ey,z,ee,Y]),ev=(0,n.useMemo)(()=>[v&&{id:tE,label:tA.t("Conversations"),title:tA.t("Conversations"),content:n.createElement(eZ,{sectionId:a,allChannelIds:C,readHiddenChannelIds:d,mutedHiddenChannelIds:m,unreadWithNoMentionsHiddenChannelIds:u,dormantHiddenChannelIds:_,channelsWithUnmutedUnreadsIds:f,onChannelSelect:J,onEntitySelect:X,isLoading:!1,onHasUnreadsChange:Z}),"data-qa":tv},{id:tC,label:tA.t("Actions"),title:tA.t("Actions"),content:ek,"data-qa":tS}].filter(Boolean),[v,C,d,m,u,_,f,J,X,Z,a,ek]),eI=1===ev.length,ew=(0,n.useCallback)(e=>{e.stopPropagation()},[]),eT=(0,n.useMemo)(()=>{let e=ev.find(e=>e.id===tE);return e?.content??null},[ev]),eM=(0,n.useMemo)(()=>n.createElement("div",{className:ty().headerButtons},(N||Y.length>0)&&n.createElement(h.Ay,{tip:tA.t("Mark all as read"),zIndex:"above_fs"},n.createElement(el.A,{size:"small",svgIconProps:{name:"mark-as-read",size:"16"},onClick:ee,"aria-label":tA.t("Mark all as read"),"data-qa":tI})),n.createElement(h.Ay,{tip:tA.t("Close"),zIndex:"above_fs"},n.createElement(el.A,{size:"small",svgIconProps:{name:"close",size:"16"},onClick:t,"aria-label":tA.t("Close"),"data-qa":tw}))),[N,Y.length,ee,t]);return n.createElement("div",{className:`c-sk-modal ${ty().modalContainer} ${eI||!b?ty().singleTab:""}`,"data-qa":tk,onContextMenu:ew},y&&n.createElement("div",{className:ty().header},P?n.createElement(e7.Ay,{text:P,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:e7.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,renderEmojiFallback:!0,className:ty().sectionIcon}):n.createElement(p.Ah,{name:L,size:"16",className:ty().sectionIcon}),n.createElement(h.Ay,{tip:R,zIndex:"above_fs",shouldOnlyShowWhenTruncated:!0},n.createElement("h2",{className:ty().title},n.createElement(er.A,{lines:1},R))),eM),b?n.createElement("div",{className:y?void 0:ty().tabsWithButtons},n.createElement(eo.A,{tabs:ev,currentTabId:w,onTabChange:Q,ariaLabel:tA.t("View options"),focusOnMount:!0}),!y&&eM):n.createElement(n.Fragment,null,!y&&eM,eT))};function hidden_channels_modal_temp3(e){return e.id===tE}function hidden_channels_modal_temp2(e){e.stopPropagation()}function hidden_channels_modal_temp(e){return(0,tb.th)(e)}tT.displayName="HiddenChannelsModal";var tN=a(0x3989021c);let tM=a.p+"education-section-menu-coachmark-7f6130c.png",tR=new d.Ay("channel_sidebar"),tP=w.ze.EDUCATION_SECTION_MENU_COACHMARK,tL="top-right",tO="right",tD={[tL]:50,[tO]:20},tF={[tL]:{x:-12,y:0},[tO]:{x:0,y:5}},EducationSectionMenuCoachmark=({children:e})=>{let{isOpen:t,closeCoachmark:a}=(0,tN.A)(tP,w.xu.IN_PRODUCT_COACHMARK),r=(0,n.useRef)(null),[i,l]=(0,n.useState)(tO);(0,n.useEffect)(()=>{if(!t)return;let updatePosition=()=>{let e=r.current?.parentElement;e&&l(window.innerHeight-e.getBoundingClientRect().bottom<150?tL:tO)};return updatePosition(),window.addEventListener("resize",updatePosition),()=>{window.removeEventListener("resize",updatePosition)}},[t]);let o=(0,n.useCallback)(()=>{a()},[a]),s=tR.t("Looking for the section menu?",{context:"Title of coachmark that helps users find the section menu in the channel sidebar"}),c=(0,n.useMemo)(()=>{let e=n.createElement(p.Ah,{name:"ellipsis-vertical-filled",inline:!0}),t=tR.t("You\u2019ll find it by right-clicking on the section name or by clicking the",{fallbackHash:"60d1f35ec4982dc38d94de2a421f86e865eed747",context:'First part of instruction text that comes before the ellipsis icon. Full sentence: "You\u2019ll find it by right-clicking on the section name or by clicking the [icon] next to it."'}),a=tR.t("icon next to it.",{fallbackHash:"93c2d89f6bfbdbb28dbb6b46990305aed8b2453e",context:'Second part of instruction text that comes after the ellipsis icon. Full sentence: "You will find it by right-clicking on the section name or by clicking the [icon] next to it."'});return n.createElement(n.Fragment,null,t," ",e," ",a)},[]),d=(0,n.useMemo)(()=>{let e=i===tO?"DT_COLOR_PLT_SUNFLOWER_40":void 0;return n.createElement(A.Ay,{arrowPosition:tD[i],arrowColor:e,bodyText:c,centerOnArrow:!0,closeCoachmark:o,closeCoachmarkFromOutsideClick:o,hero:tM,isMegaphoneCoachmark:!0,isOpen:t,offsetX:tF[i].x,offsetY:tF[i].y,orientation:i,title:s,width:320})},[i,c,o,t,s]);return n.createElement("div",{ref:r,style:{display:"contents"}},n.createElement(x.Ay,{coachmarkElement:d,orientation:i},e))};EducationSectionMenuCoachmark.displayName="EducationSectionMenuCoachmark";var tU=a(0x2d7ecf37),tB=a.n(tU);let tH=new d.Ay("channel_sidebar"),tW={visibility:"hidden"},tV=(0,f.DA)()?function(e){let t,a,r=(0,b.c)(35),{channelSection:l,handleSectionMenuOpen:o,isCollapsed:s,isHiddenChannelsMenuOpen:c,isSectionMenuOpen:d,modalOpenSource:m,onSectionMenuClose:u,qaLabel:_,renderSectionMenu:f,shouldShowButtons:g}=e,y=(0,te.A)(),A="hidden-channels-button"===m||"right-click"===m;r[0]!==l.id||r[1]!==l.type||r[2]!==y||r[3]!==o||r[4]!==s?(t=()=>{y.track(H.EventId.CONTEXT_MENU_ACTION,{ui_action:H.UiAction.CLICK,ui_action_detail:"section_menu_button",label:"section_menu_button",section_id:l.id,section_type:l.type,is_collapsed:s}),o()},r[0]=l.id,r[1]=l.type,r[2]=y,r[3]=o,r[4]=s,r[5]=t):t=r[5];let x=t;if(r[6]!==x||r[7]!==A||r[8]!==c||r[9]!==d||r[10]!==u||r[11]!==_||r[12]!==f||r[13]!==g){let e,t;if(r[15]!==x||r[16]!==u||r[17]!==f?(e={renderMenu:f,onClick:x,position:"right-bottom",tryOppositePosition:!0,offsetX:-4,offsetY:4,"data-qa":"channel_section_menu_trigger",onClose:u,shouldCloseOnOverlayClick:!0},r[15]=x,r[16]=u,r[17]=f,r[18]=e):e=r[18],r[19]!==A||r[20]!==c||r[21]!==d||r[22]!==_||r[23]!==g){let e,a,l,o,s;r[25]===Symbol.for("react.memo_cache_sentinel")?(e={tip:tH.t("More actions"),position:"top",delay:h.PK,key:"ellipsis-tooltip"},r[25]=e):e=r[25],r[26]===Symbol.for("react.memo_cache_sentinel")?(a=tH.t("More actions"),r[26]=a):a=r[26];let m=g&&!c;r[27]!==d||r[28]!==m?(l=i()(tB().sectionbutton,tB().ellipsis,{[tB().showing]:m,[tB().bgActive]:d}),r[27]=d,r[28]=m,r[29]=l):l=r[29];let u=`section_heading_button_ellipsis__${_}`,f=A?tW:void 0;r[30]!==f||r[31]!==l||r[32]!==u?(o={tabIndex:0,"aria-label":a,className:l,"data-qa":u,style:f},r[30]=f,r[31]=l,r[32]=u,r[33]=o):o=r[33],r[34]===Symbol.for("react.memo_cache_sentinel")?(s=n.createElement(p.Ah,{name:"ellipsis-vertical-filled"}),r[34]=s):s=r[34],t=n.createElement(h.Ay,e,n.createElement(em.Nm,o,s)),r[19]=A,r[20]=c,r[21]=d,r[22]=_,r[23]=g,r[24]=t}else t=r[24];a=n.createElement(ee.cQ,e,t),r[6]=x,r[7]=A,r[8]=c,r[9]=d,r[10]=u,r[11]=_,r[12]=f,r[13]=g,r[14]=a}else a=r[14];return a}:function({channelSection:e,handleSectionMenuOpen:t,isCollapsed:a,isHiddenChannelsMenuOpen:r,isSectionMenuOpen:l,modalOpenSource:o,onSectionMenuClose:s,qaLabel:c,renderSectionMenu:d,shouldShowButtons:m}){let u=(0,te.A)(),_=(0,n.useCallback)(()=>{u.track(H.EventId.CONTEXT_MENU_ACTION,{ui_action:H.UiAction.CLICK,ui_action_detail:"section_menu_button",label:"section_menu_button",section_id:e.id,section_type:e.type,is_collapsed:a}),t()},[u,e.id,e.type,a,t]);return n.createElement(ee.cQ,{renderMenu:d,onClick:_,position:"right-bottom",tryOppositePosition:!0,offsetX:-4,offsetY:4,"data-qa":"channel_section_menu_trigger",onClose:s,shouldCloseOnOverlayClick:!0},n.createElement(h.Ay,{tip:tH.t("More actions"),position:"top",delay:h.PK,key:"ellipsis-tooltip"},n.createElement(em.Nm,{tabIndex:0,"aria-label":tH.t("More actions"),className:i()(tB().sectionbutton,tB().ellipsis,{[tB().showing]:m&&!r,[tB().bgActive]:l}),"data-qa":`section_heading_button_ellipsis__${c}`,style:"hidden-channels-button"===o||"right-click"===o?tW:void 0},n.createElement(p.Ah,{name:"ellipsis-vertical-filled"}))))};tV.displayName="SectionMenuEllipsisButton";var tG=a(0x16ffed5ab);function handleSectionMenuError(e,t,a){let{action:n,error:r,channelSection:i,context:l={},toast:o,rethrow:s=!0}=a;e.error(`Error in ${n}`,{error:r,channel_section_id:i.id,channel_section_type:i.type,...l});let c=o.createToastElement();if(t((0,tG.M)({element:c})),s)throw r}var tq=a(0x2ab73abf);let tj=new d.Ay("channel_sidebar"),noOp=()=>{},tK={visibility:"hidden"},t$=(0,f.DA)()?function(e){let t,a,r,l,o,s=(0,b.c)(54),{channelIds:c,channelSection:d,channelSectionMutedHiddenChannels:m,channelSectionReadHiddenChannels:u,channelSectionUnreadWithNoMentionsHiddenChannels:_,dormantHiddenChannelIds:f,experimentSidebarVisualUpdatesM1ClickActionGroupOn:g,hasUnmutedUnreads:y,isCollapsed:A,isHiddenChannelsModalOpen:x,isSectionMenuOpen:E,modalOpenSource:C,onSectionMenuClose:k,qaLabel:v,setIsHiddenChannelsModalOpen:S,shouldShowButtons:I,shouldShowHiddenChannelsButton:w}=e,T=(0,te.A)();s[0]!==g?(t=g?tj.t("More conversations",{fallbackHash:"2ecf79f16fdb035ae7f9f1e794ce056e01fec3b5"}):"More conversations",s[0]=g,s[1]=t):t=s[1];let N=t;s[2]!==d.id||s[3]!==d.type||s[4]!==T||s[5]!==y||s[6]!==A||s[7]!==S?(a=()=>{T.track(H.EventId.CONTEXT_MENU_ACTION,{ui_action:H.UiAction.CLICK,ui_action_detail:"hidden_channels_button",label:"hidden_channels_button",section_id:d.id,section_type:d.type,is_collapsed:A,has_unreads:y}),S(!0)},s[2]=d.id,s[3]=d.type,s[4]=T,s[5]=y,s[6]=A,s[7]=S,s[8]=a):a=s[8];let M=a;s[9]!==k||s[10]!==S?(r=()=>{setTimeout(()=>{S(!1),k()},0)},s[9]=k,s[10]=S,s[11]=r):r=s[11];let R=r;s[12]!==c||s[13]!==d.emoji||s[14]!==d.id||s[15]!==d.name||s[16]!==d.type||s[17]!==m||s[18]!==u||s[19]!==_||s[20]!==f?(l=e=>n.createElement(et.Ay,{...e,ariaRole:"dialog",ariaLabel:tj.t("{sectionName} \u2014 Channels and actions",{sectionName:(0,eS.b4)(d.type,d.name),fallbackHash:"8723bdeec65b35875f0ee137f07f471c6e661d6a"})},n.createElement(tT,{isOpen:e.isOpen??!1,onClose:e.onClose??noOp,sectionId:d.id,sectionType:d.type,sectionName:d.name,sectionEmoji:d.emoji,allChannelIds:c,readHiddenChannelIds:u,mutedHiddenChannelIds:m,unreadWithNoMentionsHiddenChannelIds:_,dormantHiddenChannelIds:f,showTabsBar:!1})),s[12]=c,s[13]=d.emoji,s[14]=d.id,s[15]=d.name,s[16]=d.type,s[17]=m,s[18]=u,s[19]=_,s[20]=f,s[21]=l):l=s[21];let P=l,L="ellipsis"===C||"right-click"===C;e:{let e;if(!w){o=null;break e}if(s[22]!==R||s[23]!==M||s[24]!==N||s[25]!==L||s[26]!==x||s[27]!==E||s[28]!==v||s[29]!==P||s[30]!==I){let t,a;if(s[32]!==R||s[33]!==M||s[34]!==P?(t={renderPopover:P,position:"right-bottom",tryOppositePosition:!0,offsetX:8,offsetY:4,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,onOpen:M,onClose:R},s[32]=R,s[33]=M,s[34]=P,s[35]=t):t=s[35],s[36]!==N||s[37]!==L||s[38]!==x||s[39]!==E||s[40]!==v||s[41]!==I){let e,t,r,l;s[43]!==N?(e={tip:N,position:"top",delay:h.PK,key:"hidden-channels-tooltip"},s[43]=N,s[44]=e):e=s[44];let o=I&&!E||x;s[45]!==x||s[46]!==o?(t=i()(tB().sectionbutton,{[tB().showing]:o,[tB().bgActive]:x}),s[45]=x,s[46]=o,s[47]=t):t=s[47];let c=`section_heading_button_hidden_channels__${v}`,d=L?tK:void 0;s[48]!==N||s[49]!==t||s[50]!==c||s[51]!==d?(r={"aria-label":N,className:t,"data-qa":c,style:d},s[48]=N,s[49]=t,s[50]=c,s[51]=d,s[52]=r):r=s[52],s[53]===Symbol.for("react.memo_cache_sentinel")?(l=n.createElement(p.Ah,{name:"quick-switch"}),s[53]=l):l=s[53],a=n.createElement(h.Ay,e,n.createElement(em.Nm,r,l)),s[36]=N,s[37]=L,s[38]=x,s[39]=E,s[40]=v,s[41]=I,s[42]=a}else a=s[42];e=n.createElement(tq.Ay,t,a),s[22]=R,s[23]=M,s[24]=N,s[25]=L,s[26]=x,s[27]=E,s[28]=v,s[29]=P,s[30]=I,s[31]=e}else e=s[31];o=e}return o}:function({channelIds:e,channelSection:t,channelSectionMutedHiddenChannels:a,channelSectionReadHiddenChannels:r,channelSectionUnreadWithNoMentionsHiddenChannels:l,dormantHiddenChannelIds:o,experimentSidebarVisualUpdatesM1ClickActionGroupOn:s,hasUnmutedUnreads:c,isCollapsed:d,isHiddenChannelsModalOpen:m,isSectionMenuOpen:u,modalOpenSource:_,onSectionMenuClose:f,qaLabel:b,setIsHiddenChannelsModalOpen:g,shouldShowButtons:y,shouldShowHiddenChannelsButton:A}){let x=(0,te.A)(),E=s?tj.t("More conversations",{fallbackHash:"2ecf79f16fdb035ae7f9f1e794ce056e01fec3b5"}):"More conversations",C=(0,n.useCallback)(()=>{x.track(H.EventId.CONTEXT_MENU_ACTION,{ui_action:H.UiAction.CLICK,ui_action_detail:"hidden_channels_button",label:"hidden_channels_button",section_id:t.id,section_type:t.type,is_collapsed:d,has_unreads:c}),g(!0)},[x,t.id,t.type,d,c,g]),k=(0,n.useCallback)(()=>{setTimeout(()=>{g(!1),f()},0)},[g,f]),v=(0,n.useCallback)(i=>n.createElement(et.Ay,{...i,ariaRole:"dialog",ariaLabel:tj.t("{sectionName} \u2014 Channels and actions",{sectionName:(0,eS.b4)(t.type,t.name),fallbackHash:"8723bdeec65b35875f0ee137f07f471c6e661d6a"})},n.createElement(tT,{isOpen:i.isOpen??!1,onClose:i.onClose??noOp,sectionId:t.id,sectionType:t.type,sectionName:t.name,sectionEmoji:t.emoji,allChannelIds:e,readHiddenChannelIds:r,mutedHiddenChannelIds:a,unreadWithNoMentionsHiddenChannelIds:l,dormantHiddenChannelIds:o,showTabsBar:!1})),[t.id,t.type,t.name,t.emoji,e,r,a,l,o]),S="ellipsis"===_||"right-click"===_;return(0,n.useMemo)(()=>A?n.createElement(tq.Ay,{renderPopover:v,position:"right-bottom",tryOppositePosition:!0,offsetX:8,offsetY:4,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,onOpen:C,onClose:k},n.createElement(h.Ay,{tip:E,position:"top",delay:h.PK,key:"hidden-channels-tooltip"},n.createElement(em.Nm,{"aria-label":E,className:i()(tB().sectionbutton,{[tB().showing]:y&&!u||m,[tB().bgActive]:m}),"data-qa":`section_heading_button_hidden_channels__${b}`,style:S?tK:void 0},n.createElement(p.Ah,{name:"quick-switch"})))):null,[A,v,y,u,m,b,E,C,k,S])};t$.displayName="SectionMenuHiddenChannelsButton";var tY=a(0x62a17882),tQ=a(0x22fcfc255),tZ=a(0x889d7d4a),tJ=a(0xf5bbd10a),tX=a(0xef6c3caa),t0=a(0x13ef633fd);let t1=["\u2318"],t2=new d.Ay("channel_browser_coachmark"),t4=(0,f.DA)()?e=>{let t,a,r,l=(0,b.c)(36),{channelSection:o,className:s,onClick:c,qaLabel:d}=e,m=(0,g.wA)(),u=(0,tJ.A)(),_=(0,te.A)();e:{if((0,tX.m)(o.type)){let e,a,r;l[0]!==m?(e=()=>{m((0,t0.U)({}))},l[0]=m,l[1]=e):e=l[1],l[2]===Symbol.for("react.memo_cache_sentinel")?(a=t2.rt("Open a direct message<br></br>{dmBrowserShortcut}",{dmBrowserShortcut:(0,tY.cX)()?n.createElement(tQ.A,{mainKey:"N",modifiers:t1}):n.createElement(tQ.A,{mainKey:"N",modifier:t2.t("Ctrl")})}),l[2]=a):a=l[2],l[3]!==e||l[4]!==a?(r={onClick:e,tooltip:a},l[3]=e,l[4]=a,l[5]=r):r=l[5],t=r;break e}if(o.type===e_.VZ.Channels){let e,a,n;l[6]!==o||l[7]!==m?(e=()=>{m((0,ts.A)({entryPoint:e8.IV.ChannelSidebar,targetChannelSection:o}))},l[6]=o,l[7]=m,l[8]=e):e=l[8],l[9]===Symbol.for("react.memo_cache_sentinel")?(a=t2.t("Create a channel"),l[9]=a):a=l[9],l[10]!==e?(n={onClick:e,tooltip:a},l[10]=e,l[11]=n):n=l[11],t=n;break e}t=void 0}let f=t;l[12]!==_||l[13]!==u||l[14]!==c||l[15]!==d||l[16]!==f?(a=e=>{c?.(e),f?.onClick?.(),u.action(tZ.o,`Clicked plus button for "${d}"`),_.track(H.EventId.SIDEBAR_PLUS_CLICK,{label:d})},l[12]=_,l[13]=u,l[14]=c,l[15]=d,l[16]=f,l[17]=a):a=l[17];let y=a;if(f){if(l[18]!==s||l[19]!==y||l[20]!==d||l[21]!==f.tooltip){let e,t;if(l[23]!==f.tooltip?(e={delay:h.PK,position:"top",tip:f.tooltip},l[23]=f.tooltip,l[24]=e):e=l[24],l[25]!==s||l[26]!==y||l[27]!==d){let e,a,r;l[29]!==s?(e=i()(tB().sectionbutton,tB().plusButton,s),l[29]=s,l[30]=e):e=l[30];let o=`section_heading_button_plus__${d}`;l[31]!==y||l[32]!==e||l[33]!==o?(a={className:e,"data-qa":o,onClick:y,tabIndex:0},l[31]=y,l[32]=e,l[33]=o,l[34]=a):a=l[34],l[35]===Symbol.for("react.memo_cache_sentinel")?(r=n.createElement(p.Ah,{name:"plus"}),l[35]=r):r=l[35],t=n.createElement(em.Nm,a,r),l[25]=s,l[26]=y,l[27]=d,l[28]=t}else t=l[28];r=n.createElement(h.Ay,e,t),l[18]=s,l[19]=y,l[20]=d,l[21]=f.tooltip,l[22]=r}else r=l[22];return r}}:({channelSection:e,className:t,onClick:a,qaLabel:r})=>{let l=(0,g.wA)(),o=(0,tJ.A)(),s=(0,te.A)(),c=(0,n.useMemo)(()=>(0,tX.m)(e.type)?{onClick:()=>{l((0,t0.U)({}))},tooltip:t2.rt("Open a direct message<br></br>{dmBrowserShortcut}",{dmBrowserShortcut:(0,tY.cX)()?n.createElement(tQ.A,{mainKey:"N",modifiers:t1}):n.createElement(tQ.A,{mainKey:"N",modifier:t2.t("Ctrl")})})}:e.type===e_.VZ.Channels?{onClick:()=>{l((0,ts.A)({entryPoint:e8.IV.ChannelSidebar,targetChannelSection:e}))},tooltip:t2.t("Create a channel")}:void 0,[e,l]),d=(0,n.useCallback)(e=>{a?.(e),c?.onClick?.(),o.action(tZ.o,`Clicked plus button for "${r}"`),s.track(H.EventId.SIDEBAR_PLUS_CLICK,{label:r})},[c,s,o,a,r]);if(c)return n.createElement(h.Ay,{delay:h.PK,position:"top",tip:c.tooltip},n.createElement(em.Nm,{className:i()(tB().sectionbutton,tB().plusButton,t),"data-qa":`section_heading_button_plus__${r}`,onClick:d,tabIndex:0},n.createElement(p.Ah,{name:"plus"})))};t4.displayName="SectionMenuPlusButton";var t5=a(0x18def662b),t3=a(0x18ba7eec),t6=a(0x7441941c),t8=a(0x1ec68d6a3),t7=a(0x850bedf0),t9=a(0xafce781a);let ae=new d.Ay("channel_sidebar"),at=[],aa={name:"warning-filled"},SectionMenuNewInternal=({ariaHidden:e="true",badgeCount:t=0,channelIds:a,channelSection:r,channelSectionHasAllMutedHiddenChannels:o,displayAsHovered:s=!1,displayCoachmarkOnSection:c=!1,emoji:d,getTemplate:m,hasFocus:u=!1,hasUnmutedUnreads:_,isBadgeForAllMuted:f=!1,isCollapsed:b,isEditMode:y,isFirstVisibleSection:A=!1,isSectionMenuCoachmarkVisible:x=!1,isSectionMenuOpen:E=!1,isVipAvailableForCurrentTeam:C,label:k="",labelTruncationRef:v=null,onCollapseToggleClick:I,onPlusClick:T,onSectionMenuClose:N=l.A,onSectionMenuOpen:M=l.A,qaLabel:R="",tooltipText:P="",starredChannelSectionBadgeResult:L,experimentSidebarBadgeVisualUpdatesGroupOn:O=!1,channelSectionReadHiddenChannels:D=at,channelSectionMutedHiddenChannels:F=at,channelSectionUnreadWithNoMentionsHiddenChannels:U=at,dormantHiddenChannelIds:B=at,showBehavior:W,showSpinner:V=!1,onRightClickMenuStateChange:G})=>{let q=(0,te.A)(),j=(0,S.d4)(t5.Zg),z=(0,S.d4)(t5.in),K=(0,t3.j)(),$=(K?.columnLayout?.width??0)<ei.tC,Y=z&&$,Q=(0,S.d4)(t5.eN),el=(0,S.d4)(t7.UG),eo=(0,g.wA)(),es=(0,n.useMemo)(()=>(0,t8.Ay)({label:"SECTION-MENU-ERROR"}),[]),{isOpen:ec}=(0,tN.A)(w.ze.EDUCATION_SECTION_MENU_COACHMARK,w.xu.IN_PRODUCT_COACHMARK),ed=x&&c,[em,eu]=(0,n.useState)(!1),[ep,eh]=(0,n.useState)(!1),ef=(0,n.useRef)(null),eb=ec&&em,[eg,ey]=(0,n.useState)(!1),eA=(0,n.useCallback)(()=>ey(!0),[]),ex=(0,n.useCallback)(()=>ey(!1),[]),[eE,eC]=(0,n.useState)(!1),ek=(0,n.useCallback)(()=>{eC(!0)},[]),ev=(0,n.useCallback)(e=>{let{currentTarget:t,relatedTarget:a}=e;t.contains(a)||eC(!1)},[]),[eI,ew]=n.useState(!1),[eT,eN]=n.useState(null),[eM,eR]=n.useState("conversations"),[eP,eL]=n.useState("conversations"),eO=n.useRef(null);(0,n.useEffect)(()=>{let checkWidth=()=>{ef.current&&eh(ef.current.offsetWidth<=200)};checkWidth();let e=(0,Z.A)(()=>{checkWidth()});return ef.current&&e.observe(ef.current),()=>{e.disconnect()}},[]);let eD=b&&t,eF=s||u||E||eE||eI||em&&ec||ed,eU=(0,n.useCallback)(e=>{Q&&(e.stopPropagation(),e.preventDefault(),q.track(H.EventId.CONTEXT_MENU_ACTION,{ui_action:H.UiAction.CLICK,ui_action_detail:"section_heading_right_click_open_modal",label:"section_heading_right_click_open_modal",section_id:r.id,section_type:r.type,is_collapsed:b,last_viewed_tab:eM}),eO.current={x:e.clientX,y:e.clientY},eL(eM),eN("right-click"),ew(!0),M())},[Q,q,r.id,r.type,b,eM,M]),eB=(0,n.useCallback)(()=>{try{q.track(H.EventId.CONTEXT_MENU_ACTION,{ui_action:H.UiAction.CLICK,ui_action_detail:"section_menu_button",label:"section_menu_button",section_id:r.id,section_type:r.type,is_collapsed:b,has_unreads:_,badge_count:t}),M()}catch(e){handleSectionMenuError(es,eo,{action:"handleSectionMenuOpen",error:e,channelSection:r,toast:{createToastElement:()=>n.createElement(en.A,{svgIconProps:aa},n.createElement("div",null,ae.t("Unable to open menu. Please try again.")))}})}},[M,es,r,eo,q,b,_,t]);n.useEffect(()=>{ec||eu(!1)},[ec]),(0,n.useEffect)(()=>{let e="right-click"===eT&&eI;G?.(e)},[eT,eI,G]);let eH=r.type===e_.VZ.Stars&&L?.shouldShowBadge,eW=L?.onBadgeClick,eV=(0,n.useCallback)(e=>{try{eo((0,t9.u2)({event:{type:w.jo.SECTION_MENU_OPENED}})),eu(!0),I(e),eH&&eW&&eW()}catch(e){handleSectionMenuError(es,eo,{action:"handleSectionHeaderClick",error:e,channelSection:r,context:{is_starred_section_with_badge:eH},toast:{createToastElement:()=>n.createElement(en.A,{svgIconProps:aa},n.createElement("div",null,ae.t("Unable to perform action. Please try again.")))}})}},[eo,I,eH,eW,es,r]),eG=(0,n.useCallback)(e=>{try{let t=m?.();if(!t)throw Error("Missing menu template");return n.createElement("div",{onContextMenu:eU},n.createElement(ee.a,{template:t,width:300,...e}))}catch(e){return handleSectionMenuError(es,eo,{action:"renderSectionMenu",error:e,channelSection:r,toast:{createToastElement:()=>n.createElement(en.A,{svgIconProps:aa},n.createElement("div",null,ae.t("Unable to display menu. Please try again.")))},rethrow:!1}),n.createElement("div",null)}},[m,eU,es,r,eo]),eq=(0,n.useMemo)(()=>{let e=i()(tB().emoji,{[tB().active]:!b||_||s,[tB().muted]:b&&o});if(r.type===e_.VZ.UserGroup)return n.createElement("div",{className:e},n.createElement(p.Ah,{name:"user-groups-filled"}));if(r.type===e_.VZ.Priority)return n.createElement(p.Ah,{name:"vip",size:"16"});if(shouldShowDefaultSectionIcon({sectionType:r.type,emoji:d,experimentEmptyStarredSectionGroupOn:j,experimentSidebarVisualUpdatesM1GroupOn:z})){let t=getSectionIconName(r.type);if(t)return n.createElement("div",{className:e},n.createElement(p.Ah,{name:t,size:"16"}))}return d?n.createElement(e7.Ay,{text:d,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:e7.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,className:e,renderEmojiFallback:!0}):null},[r.type,o,s,d,_,b,j,z]),ej=(0,n.useMemo)(()=>{let e=C&&r.type===e_.VZ.Priority;if(!C&&!(0,t6.$x)(r))return null;let t=shouldShowDefaultSectionIcon({sectionType:r.type,emoji:d,experimentEmptyStarredSectionGroupOn:j,experimentSidebarVisualUpdatesM1GroupOn:z}),a=!!d||r.type===e_.VZ.Priority||t;return V?n.createElement("span",{className:i()(tB().expandContainer,tB().spinnerContainer,tB().hasEmoji,{[tB().editMode]:y}),"aria-hidden":!0},n.createElement("div",{className:i()(tB().emoji,tB().active)},n.createElement(J.A,{size:"medium",color:"white"}))):n.createElement("span",{className:i()(tB().expandContainer,{[tB().hasEmoji]:a,[tB().editMode]:y,[tB().priority]:e}),"aria-hidden":!0},a&&eq,!e&&n.createElement("div",{className:tB().expand},n.createElement(p.Ah,{name:"caret-right-filled","data-qa":"channel-section-collapse",inline:!0,size:"inherit"})))},[r,d,j,z,y,C,eq,V]),ez=(0,n.useMemo)(()=>j&&eH?n.createElement("div",{className:tB().labelWithBadgeWrapper},n.createElement(er.A,{lines:1},n.createElement("div",{className:tB().overflowEllipsis,ref:v},k)),!ep&&n.createElement("div",{className:tB().callout},n.createElement(ea.v,{isMicro:!0,style:ea.u.Informative},ae.t("New")))):n.createElement(er.A,{lines:1},n.createElement("div",{className:tB().overflowEllipsis,ref:v},k)),[ep,k,v,eH,j]),eK=(0,n.useCallback)(()=>{ey(!0)},[]),e$=(0,n.useCallback)(()=>{ey(!1)},[]),eY=n.createElement("div",{className:i()(tB().toggleAndLabel,{[tB().coachmarkOpen]:ed&&A}),onClick:eV,onContextMenu:eU,"data-qa":`section_heading_toggle_and_label__${R}`,"aria-hidden":e,role:"button",tabIndex:-1},ej,n.createElement("span",{className:i()(tB().labelContent,{[tB().primaryColor]:_})},ez)),eQ=(0,n.useCallback)(e=>{try{T&&T(e)}catch(e){handleSectionMenuError(es,eo,{action:"handlePlusClick",error:e,channelSection:r,toast:{createToastElement:()=>n.createElement(en.A,{svgIconProps:aa},n.createElement("div",null,ae.t("Unable to open direct message. Please try again.")))}})}},[T,es,r,eo]),eZ=(0,n.useCallback)(e=>{eR(e)},[]),eJ=(0,n.useCallback)(e=>{e?eN("hidden-channels-button"):eN(null),ew(e)},[]),eX=(0,n.useMemo)(()=>Y?null:n.createElement(t4,{channelSection:r,className:i()({[tB().showing]:(eF||ed&&c)&&!E&&!eI}),onClick:eQ,qaLabel:R}),[r,c,eQ,eI,ed,E,R,Y,eF]),e0=(0,n.useMemo)(()=>{if(!eD)return null;let e=X.HY.pill;return O&&(e=X.HY.pillCompact),el&&(e=X.HY.dot),n.createElement(X.Gm,{className:i()(tB().badge,{[tB().showing]:eD&&!eF,[tB().muted]:eD&&!eF&&f,[tB().sectionMenuOpen]:E}),style:X.rY.red,shape:e,count:t,displayAsHovered:s||eg,key:"badge"})},[eD,O,el,eF,f,E,t,s,eg]),e1=r.type===e_.VZ.Priority,e2=Q&&!Y&&!e1,e4=n.createElement(t$,{channelIds:a,channelSection:r,channelSectionMutedHiddenChannels:F,channelSectionReadHiddenChannels:D,channelSectionUnreadWithNoMentionsHiddenChannels:U,dormantHiddenChannelIds:B,experimentSidebarVisualUpdatesM1ClickActionGroupOn:Q,hasUnmutedUnreads:_,isCollapsed:b,isHiddenChannelsModalOpen:eI,isSectionMenuOpen:E,modalOpenSource:eT,onSectionMenuClose:N,qaLabel:R,setIsHiddenChannelsModalOpen:eJ,shouldShowButtons:eF,shouldShowHiddenChannelsButton:e2}),e5=n.createElement(tV,{channelSection:r,handleSectionMenuOpen:eB,isCollapsed:b,isHiddenChannelsMenuOpen:!1,isSectionMenuOpen:E,modalOpenSource:eT,onSectionMenuClose:N,qaLabel:R,renderSectionMenu:eG,shouldShowButtons:eF}),e3=z?n.createElement("div",{ref:ef,className:i()(tB().container,{[tB().collapsed]:b,[tB().coachmarkActive]:eb}),onMouseEnter:eK,onMouseLeave:e$},P?n.createElement(h.Ay,{tip:P,position:"top",delay:h.PK,key:"toggle-label-tooltip"},eY):eY,n.createElement("div",{className:tB().buttonsContainer,onFocus:ek,onBlur:ev},eX,e4,e5,e0)):n.createElement("div",{ref:ef,className:i()(tB().container,{[tB().collapsed]:b,[tB().coachmarkActive]:eb}),onMouseEnter:eA,onMouseLeave:ex},P?n.createElement(h.Ay,{tip:P,position:"top",delay:h.PK,key:"toggle-label-tooltip"},eY):eY,n.createElement("div",{className:tB().buttonsContainer,onFocus:ek,onBlur:ev},eX,e4,e5,e0)),e6=(0,n.useCallback)(()=>{if(eO.current){let e=eO.current.x,t=eO.current.y;return{top:t,left:e,right:e,bottom:t,height:0,width:0}}if(ef.current){let e=ef.current.getBoundingClientRect();return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,height:e.height,width:e.width}}return{top:0,left:0,right:0,bottom:0,height:0,width:0}},[]),e8=Q&&eI&&"right-click"===eT&&n.createElement(et.Ay,{isOpen:eI,onClose:()=>{ew(!1),eN(null),N()},position:"bottom-left",tryOppositePosition:!0,offsetX:0,offsetY:0,ariaRole:"dialog",ariaLabel:ae.t("{sectionName} \u2014 Channels and actions",{sectionName:(0,eS.b4)(r.type,r.name),fallbackHash:"8723bdeec65b35875f0ee137f07f471c6e661d6a"}),shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,targetBounds:e6()},n.createElement(tT,{isOpen:eI,onClose:()=>{ew(!1),N()},sectionId:r.id,sectionType:r.type,sectionName:r.name,sectionEmoji:r.emoji,allChannelIds:a,readHiddenChannelIds:D,mutedHiddenChannelIds:F,unreadWithNoMentionsHiddenChannelIds:U,dormantHiddenChannelIds:B,defaultTabId:eP,onTabChange:eZ,showSectionHeader:!1}));return eb?n.createElement(n.Fragment,null,n.createElement(EducationSectionMenuCoachmark,null,e3),e8):n.createElement(n.Fragment,null,e3,e8)};SectionMenuNewInternal.displayName="SectionMenuNewInternal";let an=n.memo(SectionMenuNewInternal);var ar=a(0xfdae11ea),ai=a(0x20e77676b),al=a(0x172dd1bf5),ao=a(0x61f75169),as=a(0x1ccef1c6f);let ac=a.p+"shared_channel-0171673.svg",ad=new d.Ay("user_groups"),UserGroupSectionsCoachmark=({children:e,userGroup:t})=>{let r=(0,S.d4)(t5.cq),l=(0,S.d4)(e=>!!(0,as.ty)(e,"a11y_animations")),[o,s]=(0,n.useState)(!1),c=w.xu.EDUCATION_USER_GROUP_SECTIONS_COACHMARK,{isOpen:d,closeCoachmark:m}=(0,tN.A)(w.ze.EDUCATION_USERGROUP_SECTIONS,c),u=(0,n.useCallback)(()=>m(),[m]),p=(0,n.useCallback)(()=>{m()},[m]),getAnimationImport=()=>a.e("lottie-usergroup-sections-coachmark").then(a.t.bind(a,0x2349ad6de,23)),h=(0,n.useMemo)(()=>l?n.createElement(al.e,{getAnimationImport:getAnimationImport,svgClassName:"p-user_group_sections_coachmark_lottie",autoplay:!0,loop:!0}):n.createElement("img",{alt:"","aria-hidden":!0,src:ac,className:"p-user_group_sections_coachmark--img",width:"100%"}),[l]),_=ad.t("All the right conversations - organized just for your team"),f=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,n.createElement("p",{className:"margin_bottom_50"},ad.rt("<strong>{usergroupName}</strong> grouped their important channels into a section to help you stay organized.",{usergroupName:(0,ao.ue)(t),fallbackHash:"049debae9799238e8b8e30f658d7682e894aec5b"})),n.createElement("p",null,ad.rt("You can <a>add custom sections and re-organize channels</a> anytime.",{fallbackHash:"870e75da6e328a46b7778eadf24bac91fc107039"},({text:e})=>n.createElement(ai.A,{articleId:0x53d43f5bfa},e)))),[t]),b=r?ad.t("Got it"):"",g=(0,n.useMemo)(()=>n.createElement(A.Ay,{isOpen:d&&o,offsetY:30,offsetX:-5,arrowPosition:40,closeBackgroundStyle:"light",title:_,bodyText:f,hideCloseButton:!1,closeCoachmark:u,isMegaphoneCoachmark:!0,primaryCallToActionText:b,onClickPrimaryButton:p,className:i()({"p-user_group_sections_coachmark_static":!l},{"p-user_group_sections_coachmark_lottie":l}),hero:h,alignActionsRight:!0}),[d,o,_,f,u,b,p,l,h]);return(0,n.useEffect)(()=>{let e;return d?e=setTimeout(()=>{s(!0)},300):s(!1),()=>{e&&clearTimeout(e)}},[d]),n.createElement(x.Ay,{coachmarkElement:g,orientation:"right-bottom"},e)};UserGroupSectionsCoachmark.displayName="UserGroupSectionsCoachmark";var am=a(0x1789e94fa);let au=n.lazy(()=>Promise.resolve().then(a.bind(a,0x8583a294)).then(e=>({default:e.EducationShareChannelSectionCoachmark}))),ap={spaceName:w.xu.IN_PRODUCT_COACHMARK,notifications:{[w.ze.EDUCATION_SHARE_CHANNEL_SECTION_COACHMARK]:{component:au}}};var ah=a(0xea25ffc5),a_=a(0x182c9b0b0),af=a(0xa1832ae4),ab=a(0x1632f6a87),ag=a(0x20a8e038f),ay=a(0x1c91944c9),aA=a(0x1cf0d97e1),ax=a(0x1d84f40a0),aE=a(0xf1527618),aC=a(0x18e1aa302),ak=a(0x42a05810),av=a(0x19511695f),aS=a(0x138acd100),aI=a(0xd4df61da),aw=a(0x1529cf960),aT=a(0x1ee439e69),aN=a(0x475c9cfe),aM=a(0x19895585a),aR=a(0x2405d50f),aP=a.n(aR);let aL=new d.Ay("channel_browser_coachmark"),aO={[w.ze.UNREADS_SIMPLIFICATION_COACHMARK]:{component:n.lazy(()=>Promise.resolve().then(a.bind(a,0x75186d4d)))}},aD=class extends n.PureComponent{static defaultProps={label:"",qaLabel:"",emoji:"",tooltipClassName:"",onCollapseToggleClick:l.A,isSelected:!1,connectDragDropRef:o.A,connectDragPreview:o.A,channelDropIndicatorAbove:!1,channelDropIndicatorSides:!1,channelDropIndicatorBelow:!1,channelSectionDropIndicatorAbove:!1,channelSectionDropIndicatorBelow:!1,channelDropIneligible:!1,transitionFocusTo:l.A,unreadsOnlyPromptCoachmarkRef:null,onChannelSectionCollapseToggle:l.A,isFirstVisibleSection:!1};labelTruncationRef;constructor(e){super(e),this.onCollapseToggleClick=this.onCollapseToggleClick.bind(this),this.onPlusClick=this.onPlusClick.bind(this),this.determineLabelTruncation=this.determineLabelTruncation.bind(this),this.handleMouseEnter=this.handleMouseEnter.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.onSectionMenuOpen=this.onSectionMenuOpen.bind(this),this.setIsHovered=this.setIsHovered.bind(this),this.onContextMenu=this.onContextMenu.bind(this),this.onSectionMenuClose=this.onSectionMenuClose.bind(this),this.labelTruncationRef=n.createRef(),this.state={isTruncated:!1,displayAsHovered:!1,isSectionMenuOpen:!1,isRightClickMenuOpen:!1}}onCollapseToggleClick(e){let{channelSection:t}=this.props;if((0,t6.$x)(t)){if(e?.altKey){e.preventDefault(),this.props.onChannelSectionCollapseToggle({channelSection:t,toggleAll:!0,reason:"section-heading-alt-click"});return}this.props.onChannelSectionCollapseToggle({channelSection:t,reason:"section-heading-click"})}}onPlusClick(){this.setState(()=>({displayAsHovered:!0})),(0,h.Ws)()}onSectionMenuOpen(){let{clogger:e}=this.props;this.setState(()=>({isSectionMenuOpen:!0})),this.setIsHovered(!0),e?.track(H.EventId.CONTEXT_MENU_ACTION,{contexts:{ui_context:{action:H.UiAction.CLICK,ui_component:H.UiComponent.SIDEBAR,ui_element:H.UiElement.SIDEBAR_CHANNEL_SECTION_ITEM,ui_component_name:"SectionMenu"}},label:"open",is_iap1:!0})}onSectionMenuClose(){this.setState(()=>({isSectionMenuOpen:!1})),this.setIsHovered(!1)}onRightClickMenuStateChange=e=>{this.setState(()=>({isRightClickMenuOpen:e}))};setIsHovered(e){this.setState(()=>({displayAsHovered:e}))}handleMouseEnter(){this.setIsHovered(!0)}handleMouseLeave(){this.setIsHovered(!1)}isEmpty(){let{isCollapsed:e,channelIds:t,isPrimaryViewInSection:a,isEditMode:n}=this.props;return e&&(n||!a)||!!t&&t?.length===0}determineLabelTruncation(){this.setState(()=>({isTruncated:!!this.labelTruncationRef.current&&this.labelTruncationRef.current.offsetWidth<this.labelTruncationRef.current.scrollWidth}))}shouldShowDefaultIcon(){let{channelSection:e,emoji:t,experimentEmptyStarredSectionGroupOn:a,experimentSidebarVisualUpdatesM1GroupOn:n}=this.props;return shouldShowDefaultSectionIcon({sectionType:e.type,emoji:t,experimentEmptyStarredSectionGroupOn:a,experimentSidebarVisualUpdatesM1GroupOn:n})}renderDefaultSectionIcon(e){let{channelSection:t}=this.props,a=getSectionIconName(t.type);return a?n.createElement("div",{className:e},n.createElement(p.Ah,{name:a,size:"16"})):null}renderIconPrefix(){let{emoji:e,hasUnmutedUnreads:t,isCollapsed:a,channelSectionHasAllMutedHiddenChannels:r,channelSection:l}=this.props,o=i()("p-channel_sidebar__emoji",{"p-channel_sidebar__emoji--active":!a||t||this.state.displayAsHovered,"p-channel_sidebar__emoji--muted":a&&r});return l.type===e_.VZ.UserGroup?n.createElement("div",{className:o},n.createElement(p.Ah,{name:"user-groups-filled"})):l.type===e_.VZ.Priority?n.createElement(p.Ah,{name:"vip",size:"16"}):this.shouldShowDefaultIcon()?this.renderDefaultSectionIcon(o):e?n.createElement(e7.Ay,{text:e,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:e7.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,className:o,renderEmojiFallback:!0}):null}onContextMenu(e){this.state.isSectionMenuOpen&&e.stopPropagation()}renderStaticSectionLabel(){let{hasUnmutedUnreads:e,isCollapsed:t,isSelected:a,qaLabel:r,label:i,channelSection:l,badgeCount:o,isAPaidTeam:s,silentSidebarIsActive:c}=this.props,d=t&&o,m=(s||l.type===e_.VZ.Stars)&&this.state.displayAsHovered;return n.createElement(Q.C,{collapsed:t,"data-qa":`channel_sidebar__section_heading_label__${r}`,ellipsisOrBadge:!!(d||m),noTransition:a,overflow:!0,unreads:t&&e&&!c},this.renderIconPrefix()," ",i)}renderSectionMenuCoachmarkMaybe(e){let{setSectionMenuCoachmarkVisible:t,isSectionMenuCoachmarkVisible:a,isFirstVisibleSection:r,openPrefsModal:i,sidebarBehavior:l}=this.props;if(!r)return e;let o=aL.t("You updated your sidebar!"),s=aL.t("Take control of your sidebar"),c=aL.rt("To see all your channels and manage <t>Preferences</t>, select the name of any sidebar section.",{"<t>":({text:e})=>n.createElement(u.A,{onClick:()=>{i({activeSection:"sidebar",activeSubsection:"sidebar_show_pref"})}},e)}),d=aL.rt("To customize your sidebar, select the name of any sidebar section or visit <t>Preferences</t>.",{"<t>":({text:e})=>n.createElement(u.A,{onClick:()=>{i({activeSection:"sidebar",activeSubsection:"sidebar_show_pref"})}},e)}),m=n.createElement(P.Ay,{isOpen:a,orientation:"right",closeCoachmark:()=>{t(!1)},coachmarkClassNames:aP().headingCoachmark,offsetX:13,isMegaphoneCoachmark:!1},n.createElement("div",{className:aP().headingCoachmarkTitle},l===ar.nU?o:s),n.createElement("div",{className:aP().headingCoachmarkDescription},l===ar.nU?c:d));return n.createElement(L.Ay,{orientation:"right",coachmarkElement:m,coachmarkAnchorClassNames:"overflow_ellipsis"},e)}renderClickableSectionLabel(e){let{badgeCount:t,channelSection:a,channelSectionHasAllMutedHiddenChannels:r,emoji:i,getContextMenuTemplateForSectionHeading:l,hasUnmutedUnreads:o,isAPaidTeam:s,isCollapsed:d,isEditMode:m,isFirstVisibleSection:u,isSectionMenuCoachmarkVisible:p,isSelected:h,isVipAvailableForCurrentTeam:_,label:f,qaLabel:b,silentSidebarIsActive:g}=this.props,y=d&&t,A=(s||a.type===e_.VZ.Stars)&&this.state.displayAsHovered,x=n.createElement(Q.C,{clickable:!0,collapsed:d,"data-qa":`channel_sidebar__section_heading_label__${b}`,ellipsisOrBadge:!!(y||A),noTransition:h,onMouseEnter:this.determineLabelTruncation,onClick:void 0,onContextMenu:this.onContextMenu,muted:d&&r,unreads:d&&o&&!g},this.renderSectionMenuCoachmarkMaybe(n.createElement(an,{badgeCount:this.props.badgeCount,channelIds:this.props.channelIds,channelSection:a,channelSectionHasAllMutedHiddenChannels:r,displayAsHovered:this.state.displayAsHovered,displayCoachmarkOnSection:u,emoji:i,getTemplate:l,hasFocus:this.props.isFocused,hasUnmutedUnreads:o,isBadgeForAllMuted:this.props.isBadgeForAllMuted,isCollapsed:d,isEditMode:m,isFirstVisibleSection:u,isSectionMenuCoachmarkVisible:p,isSectionMenuOpen:this.state.isSectionMenuOpen,isVipAvailableForCurrentTeam:_,key:"section-menu",label:f,labelTruncationRef:this.labelTruncationRef,onCollapseToggleClick:this.onCollapseToggleClick,onPlusClick:this.onPlusClick,onSectionMenuClose:this.onSectionMenuClose,onSectionMenuOpen:this.onSectionMenuOpen,qaLabel:b,starredChannelSectionBadgeResult:this.props.starredChannelSectionBadgeResult,experimentSidebarBadgeVisualUpdatesGroupOn:this.props.experimentSidebarBadgeVisualUpdatesGroupOn,channelSectionReadHiddenChannels:this.props.channelSectionReadHiddenChannels,channelSectionMutedHiddenChannels:this.props.channelSectionMutedHiddenChannels,channelSectionUnreadWithNoMentionsHiddenChannels:this.props.channelSectionUnreadWithNoMentionsHiddenChannels,dormantHiddenChannelIds:this.props.dormantHiddenChannelIds,showBehavior:this.props.showBehavior,showSpinner:this.props.showSpinner,onRightClickMenuStateChange:this.onRightClickMenuStateChange})));return e?(0,c.A)(x,e):x}renderSectionLabel(e){let{onCollapseToggleClick:t,label:a,tooltipClassName:r,alwaysShowTooltip:o,tooltipContents:s=a,isDMSectionWithUnsetSortPref:c,experimentDmRecencySortRolloutGroupWithEdu:d}=this.props,{isTruncated:m}=this.state,u=!!this.props.getContextMenuTemplateForSectionHeading,p=t!==l.A||u?this.renderClickableSectionLabel(e):this.renderStaticSectionLabel();return p?n.createElement(n.Fragment,null,d&&c?n.createElement(n.Fragment,null,p):n.createElement(h.Ay,{tip:s,tipClassName:i()(r,{hidden:!o&&!m}),position:"top",delay:h.PK,"data-qa":"channel_section_label_overflow_tooltip",tipAnchorRef:this.labelTruncationRef},p)):null}render(){let{qaLabel:e,isSelected:t,isCollapsed:a=!1,hasUnmutedUnreads:r,channelDropIndicatorAbove:l,channelDropIndicatorSides:o,channelDropIndicatorBelow:c,channelSectionDropIndicatorAbove:d,channelSectionDropIndicatorBelow:m,channelDropIneligible:u,isFirstVisibleSection:p,channelSection:h,userGroup:_,addedUserGroupSectionCoachmarkSectionId:f,isVipAvailableForCurrentTeam:b,experimentImproveMutePrefGroupOn:g,lastMutedChannelChannelSectionId:y,shouldShowMutedChannelsHiddenConfirmationCoachmark:A,shareChannelSectionCoachmarkSectionId:x,experimentSimpleSharedSectionsV2GroupOn:E}=this.props,C={};this.props.connectDragPreview((0,s.n)(),{captureDraggingState:!0});let k=this.isEmpty();C["p-channel_sidebar__section_heading--collapsed"]=a,C["p-channel_sidebar__section_heading--empty"]=k,C["p-channel_sidebar__section_heading--unreads"]=r&&a;let v=a&&this.props.badgeCount&&this.props.badgeCount>0,S=n.createElement("div",{className:i()("p-channel_sidebar__section_heading",{"p-channel_sidebar__section_heading--selected":t,"p-channel_sidebar__section_heading--has-badge":v,"p-channel_sidebar__section_heading--right-click-open":this.state.isRightClickMenuOpen,"p-channel_sidebar__drop_target_indicator--channel_above":l,"p-channel_sidebar__drop_target_indicator--channel_sides":o,"p-channel_sidebar__drop_target_indicator--channel_below":c,"p-channel_sidebar__drop_target_indicator--channel_section_above":d,"p-channel_sidebar__drop_target_indicator--channel_section_below":m,"p-channel_sidebar__drop_target_indicator--ineligible":u,...C}),ref:this.props.connectDragDropRef,"data-qa-channel-sidebar-section-heading":e,"data-qa-channel-section-collapsed":a,"data-qa":e,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.renderSectionLabel());if(h.type===e_.VZ.UserGroup&&h.id===f)return n.createElement(UserGroupSectionsCoachmark,{userGroup:_},S);if(b&&h.type===e_.VZ.Priority){let{ensureItemInView:e,sidebarListRowKey:t}=this.props;return n.createElement(R,{ensureItemInView:e,sidebarListRowKey:t},S)}return g&&A&&y===h.id?n.createElement(Y,null,S):E&&x===h.id?n.createElement(am.A,{spaceName:ap.spaceName,notifications:ap.notifications,shouldAlwaysRenderChildren:!0},S):p?n.createElement(am.A,{spaceName:w.xu.IN_PRODUCT_COACHMARK,notifications:aO,shouldAlwaysRenderChildren:!0},S):S}};aD.displayName="SectionHeading";let aF=(0,aA.Ay)((e,t)=>{let a=(0,tf.K5)(e);return a[t]?.[t_.jx]});aF.meta={name:"getChannelSectionSortPref",key:"createSelectorGetChannelSectionSortPref",description:(e,t)=>{let a=(0,tf.K5)(e);return a[t]?.[t_.jx]}};let aU=(0,a_.A)((0,ay.N)((e,{channelSection:t,channelIds:a,getSiblingView:n,isCollapsed:r,channelSectionUnreadWithNoMentionsHiddenChannels:i})=>{let l=n(e,{container:aM.mq.Primary})?.id,o=!1,s=0,c=0;if(r&&a&&a.length>0&&r&&a.forEach(t=>{let a=(0,eV.OL)(e,t);if(a&&l!==t){let t=(0,eV.TJ)(e,a)||0;(0,eU.B)(e,a.id)?s+=t:(!o&&(0,eN.KJ)(a)&&(o=!0),c+=t)}}),r&&!o&&i)for(let t of i){if(o)break;let a=(0,eV.OL)(e,t);a&&l!==t&&!(0,eU.B)(e,a.id)&&(0,eN.KJ)(a)&&(o=!0)}let d=!!a&&a?.indexOf(l)>=0,m=(0,aT.H7)(e);"canvases"===t.id&&(o=!!a?.length);let u=t?.usergroupId?(0,aN.lJ)(e,t.usergroupId):null,p=t.type===e_.VZ.DirectMessages,h=aF(e,t.id),f=(0,j.Lo)(e),b=(0,j.lU)(e),g=(0,j.t9)(e)??"";return{hasUnmutedUnreads:o,badgeCount:s+c,isBadgeForAllMuted:s>0&&0===c,isPrimaryViewInSection:d,isAPaidTeam:(0,af.qR)(m),isSectionMenuCoachmarkVisible:(0,j.DB)(e),sidebarBehavior:(0,ax.G)(e),userGroup:u,isVipAvailableForCurrentTeam:(0,_.Gn)(e),sidebarSweeperChannelsLeftCount:(0,aC.Yp)(e),isDMSectionWithUnsetSortPref:p&&!h,experimentDmRecencySortRolloutGroupWithEdu:(0,ag.t)(e),channelSectionName:(0,ab.v2)(e,t),experimentEmptyStarredSectionGroupOn:(0,t5.Zg)(e),experimentSidebarVisualUpdatesM1GroupOn:(0,t5.in)(e),lastMutedChannelChannelSectionId:b,shouldShowMutedChannelsHiddenConfirmationCoachmark:f,shareChannelSectionCoachmarkSectionId:g,experimentSimpleSharedSectionsV2GroupOn:(0,t5.QT)(e),experimentSidebarBadgeVisualUpdatesGroupOn:(0,t5.zF)(e),silentSidebarIsActive:(0,t7.UG)(e)}},e=>({openChannelBrowser:(...t)=>e((0,ak.A)(...t)),openChannelCreateModal:(...t)=>e((0,ts.A)(...t)),openSharedChannelCreateModal:(...t)=>e((0,av.A)(...t)),navigateToExternalConnections:(...t)=>e((0,ti.R)(...t)),openSlackConnectDmInviteModal:(...t)=>e((0,aS.S)(...t)),openDmBrowser:(...t)=>e((0,tc.o)(...t)),openSlackConnectTrialEntryPointModal:t=>e((0,ah.A)(t)),enqueueToast:(...t)=>e((0,tG.M)(...t)),openPrefsModal:(...t)=>e((0,G.A)(...t)),getChannelSectionName:(...t)=>e((0,ab.i1)(...t)),setSidebarSectionsUnreadsOnlyCoachmarkVisible:t=>e((0,aw.s0)(t)),openSearchWithEntity:(...t)=>e((0,aI.Il)(...t)),setOnboardingPrefByApi:t=>e((0,aE.fE)(t)),setSectionMenuCoachmarkVisible:t=>e((0,q.jF)(t)),openSectionShareDialog:t=>e((0,eX.y)(t))}),null,{areStatePropsEqual:m.kt})(aD))},0x9edd91a2:(e,t,a)=>{"use strict";a.d(t,{k:()=>h});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x6e87d4ec),l=a(0x18def662b),o=a(0x1e3c7661),s=a(0x23ce87ad8),c=a(0x1ed767a16),d=a(0x1ec68d6a3),m=a(0x11c82607b),u=a(0x16ffed5ab);let p=new r.Ay("menu"),h=(0,m.Ay)("generate and copy channel section link",async(e,t,{sectionName:a,channels:r,emoji:m})=>{let h=(0,l.aL)(t());try{let{url:t}=await e((0,s.n)({sectionName:a,channels:r,emoji:m,reason:"generate and copy channel section link"}));(0,c.x3)(t);let l=n.createElement(i.A,{duration:o.UJ,svgIconProps:{name:"check"}},h?p.t("Section link copied"):"");e((0,u.M)({element:l}))}catch(r){(0,d.Ay)({getState:t}).error(r,void 0,{subtype:"sidebar-systems-copy-channel-section-link"});let a=n.createElement(i.A,{duration:o.UJ,svgIconProps:{name:"warning"}},h?p.t("Unable to copy section link"):"");e((0,u.M)({element:a}))}});h.meta={name:"generateAndCopyChannelSectionLink",key:"createThunkGenerateAndCopyChannelSectionLink",description:"generate and copy channel section link"}},0x241818e35:(e,t,a)=>{"use strict";a.d(t,{v:()=>s});var n=a(0x1ec68d6a3),r=a(0x11c82607b),i=a(0x1ccef1c6f),l=a(0x12f41fc32),o=a(0x1529cf960);let s=(0,r.Ay)("remove create a section row",async(e,t)=>{let a=(0,n.Ay)({getState:t});try{let a=(0,i.qm)(t());(await e((0,l.AZ)({pref:"create_channel_section_education",value:JSON.stringify({status:"dismissed"})}))).ok&&e((0,o.Uv)({shouldShow:!0,trigger:a}))}catch(e){a.error(e,void 0,{subtype:"sidebar-systems-on-delete-create-a-section-cta"})}});s.meta={name:"removeCreateASectionRow",key:"createThunkRemoveCreateASectionRow",description:"remove create a section row"}},0x1926b3cbb:(e,t,a)=>{"use strict";a.d(t,{F:()=>A});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x40c0d834),s=a(0x11a296110),c=a(0x2501a2cee),d=a(0x120c268ad),m=a.n(d),u=a(0x17341dcaa),p=a(0x238b287cf),h=a(0x3711e82d),_=a(0x188544c76),f=a(0x9f5891b3),b=a(0x4f86f8f5);let g=(0,n.DA)()?e=>{let t,a,n,s=(0,r.c)(30),{listId:d,label:g,className:y,isSelected:A,isEphemeral:x}=e,E=void 0!==x&&x,C=(0,l.wA)(),k=(0,p.A)();s[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.createElement("div",{className:"p-channel_sidebar__channel_icon_prefix"},i.createElement(c.Ah,{name:"sf-record-list",size:"16"})),s[0]=t):t=s[0];let v=t;s[1]!==k||s[2]!==C||s[3]!==g||s[4]!==d?(a=()=>{let{salesforceOrgId:e,rawRecordId:t}=(0,_.D)(d);C((0,f.x)({listView:{id:t,label:g,objectType:"",salesforceOrgId:e},openInHome:!0})),k.track(h.EventId.LOB_SALESFORCE_INTEGRATIONS,{contexts:{ui_context:{action:"CLICK",ui_component_name:h.UiComponentName.SIDEBAR_ENTITY,ui_component_variant:b.FN.SalesforceList,ui_properties:{element_name:"navigate_to_sidebar_entity",element_type:h.ElementType.LINK,element_value:d}}}})},s[1]=k,s[2]=C,s[3]=g,s[4]=d,s[5]=a):a=s[5];let S=a;if(s[6]!==y||s[7]!==S||s[8]!==E||s[9]!==A||s[10]!==g||s[11]!==d){let e,t;if(s[13]!==E||s[14]!==d?(e={clogImpression:!0,elementValue:d,isEphemeralListView:E},s[13]=E,s[14]=d,s[15]=e):e=s[15],s[16]!==y||s[17]!==S||s[18]!==A||s[19]!==g||s[20]!==d){let e,a,n=`salesforce-list-${d}`;s[22]!==y||s[23]!==A?(e=m()(y,"p-channel_sidebar__channel",{"p-channel_sidebar__link--selected":A}),s[22]=y,s[23]=A,s[24]=e):e=s[24],s[25]!==S||s[26]!==g||s[27]!==n||s[28]!==e?(a={id:n,label:g,icon:v,className:e,onClick:S},s[25]=S,s[26]=g,s[27]=n,s[28]=e,s[29]=a):a=s[29],t=i.createElement(u.A,a),s[16]=y,s[17]=S,s[18]=A,s[19]=g,s[20]=d,s[21]=t}else t=s[21];n=i.createElement(o.A,e,t),s[6]=y,s[7]=S,s[8]=E,s[9]=A,s[10]=g,s[11]=d,s[12]=n}else n=s[12];return n}:({listId:e,label:t,className:a,isSelected:n,isEphemeral:r=!1})=>{let s=(0,l.wA)(),d=(0,p.A)(),g=(0,i.useMemo)(()=>i.createElement("div",{className:"p-channel_sidebar__channel_icon_prefix"},i.createElement(c.Ah,{name:"sf-record-list",size:"16"})),[]),y=(0,i.useCallback)(()=>{let{salesforceOrgId:a,rawRecordId:n}=(0,_.D)(e);s((0,f.x)({listView:{id:n,label:t,objectType:"",salesforceOrgId:a},openInHome:!0})),d.track(h.EventId.LOB_SALESFORCE_INTEGRATIONS,{contexts:{ui_context:{action:"CLICK",ui_component_name:h.UiComponentName.SIDEBAR_ENTITY,ui_component_variant:b.FN.SalesforceList,ui_properties:{element_name:"navigate_to_sidebar_entity",element_type:h.ElementType.LINK,element_value:e}}}})},[d,s,t,e]);return i.createElement(o.A,{clogImpression:!0,elementValue:e,isEphemeralListView:r},i.createElement(u.A,{id:`salesforce-list-${e}`,label:t,icon:g,className:m()(a,"p-channel_sidebar__channel",{"p-channel_sidebar__link--selected":n}),onClick:y}))};g.displayName="SalesforceListLink";var y=a(0x16a9bc40a);let A=(0,n.DA)()?e=>{let t,a,n,d=(0,r.c)(24),{channelSectionId:m,className:u,entity:p,isSelected:_,shouldHideRemoveButton:f}=e,A=void 0!==f&&f,x=(0,l.wA)();d[0]!==m||d[1]!==x||d[2]!==p?(t=e=>{e.preventDefault(),e.stopPropagation(),x((0,y.p)({entityToRemove:p,channelSectionId:m}))},d[0]=m,d[1]=x,d[2]=p,d[3]=t):t=d[3];let E=t;if(p.entityType===b.FN.SalesforceList){let e;d[4]!==u||d[5]!==p.entityId||d[6]!==p.isEphemeral||d[7]!==p.label||d[8]!==_?(e=i.createElement(g,{listId:p.entityId,label:p.label,className:u,isSelected:_,isEphemeral:p.isEphemeral}),d[4]=u,d[5]=p.entityId,d[6]=p.isEphemeral,d[7]=p.label,d[8]=_,d[9]=e):e=d[9],a=e}else a=null;let C=a;if(d[10]!==m||d[11]!==p.entityId||d[12]!==p.entityType||d[13]!==E||d[14]!==A||d[15]!==C){let e,t;d[17]!==m||d[18]!==p.entityType?(e={eventId:h.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:h.UiComponentName.SIDEBAR_ENTITY,uiComponentVariant:p.entityType,sidebarEntityChannelSectionId:m},d[17]=m,d[18]=p.entityType,d[19]=e):e=d[19],d[20]!==p.entityId||d[21]!==E||d[22]!==A?(t=!A&&i.createElement(s.Nm,{className:"p-channel_sidebar__close","data-qa":"channel_item_close","aria-hidden":!0,tabIndex:-1,onClick:E,autoClogProps:{onClick:{enableClogAction:!0},elementName:"remove_from_sidebar",elementValue:p.entityId}},i.createElement(c.Ah,{name:"close"})),d[20]=p.entityId,d[21]=E,d[22]=A,d[23]=t):t=d[23],n=i.createElement(o.A,e,t,C),d[10]=m,d[11]=p.entityId,d[12]=p.entityType,d[13]=E,d[14]=A,d[15]=C,d[16]=n}else n=d[16];return n}:({channelSectionId:e,className:t,entity:a,isSelected:n,shouldHideRemoveButton:r=!1})=>{let d=(0,l.wA)(),m=(0,i.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),d((0,y.p)({entityToRemove:a,channelSectionId:e}))},[e,d,a]),u=(0,i.useMemo)(()=>a.entityType===b.FN.SalesforceList?i.createElement(g,{listId:a.entityId,label:a.label,className:t,isSelected:n,isEphemeral:a.isEphemeral}):null,[a.entityType,a.entityId,a.isEphemeral,a.label,t,n]);return i.createElement(o.A,{eventId:h.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:h.UiComponentName.SIDEBAR_ENTITY,uiComponentVariant:a.entityType,sidebarEntityChannelSectionId:e},!r&&i.createElement(s.Nm,{className:"p-channel_sidebar__close","data-qa":"channel_item_close","aria-hidden":!0,tabIndex:-1,onClick:m,autoClogProps:{onClick:{enableClogAction:!0},elementName:"remove_from_sidebar",elementValue:a.entityId}},i.createElement(c.Ah,{name:"close"})),u)};A.displayName="EntityRowElementEntity"},0x3020a630:(e,t,a)=>{"use strict";a.d(t,{K:()=>i});var n=a(0x1cf0d97e1),r=a(0x14149c126);let i=(0,n.Ay)(e=>"on"===(0,r._Z)(e,"filter_dormant_channels"));i.meta={name:"filterDormantChannelsGroupOn",key:"createSelectorFilterDormantChannelsGroupOn",description:e=>"on"===(0,r._Z)(e,"filter_dormant_channels")}},0x12c9f31d5:(e,t,a)=>{"use strict";a.d(t,{D:()=>i});var n=a(0x1cf0d97e1),r=a(0x14149c126);let i=(0,n.Ay)(e=>"on"===(0,r._Z)(e,"mute_channel_edu"));i.meta={name:"muteChannelEduGroupOn",key:"createSelectorMuteChannelEduGroupOn",description:e=>"on"===(0,r._Z)(e,"mute_channel_edu")}},0x1388cfd89:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>b});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x15fb82076),o=a(0x1fe44d86d),s=a(0x172dd1bf5),c=a(0x3711e82d),d=a(0x11fcf00e),m=a(0x226892387),u=a(0x1fb2d2a87),p=a(0x20061cab9),h=a(0x5b1935a6);let _=new i.Ay("channel_sidebar"),f={elementType:c.ElementType.COACHMARK,uiComponentName:c.UiComponentName.SIDEBAR_SIMPLIFICATION_COACHMARK,eventId:c.EventId.CLIENT_GENERAL},b=n.memo(({anchorElement:e})=>{let t=(0,r.wA)(),i=(0,m.d4)(u.to),c=(0,n.useCallback)(()=>{t((0,p.Ay)({spaceName:h.xu.IN_PRODUCT_COACHMARK,action:h.hw.DISMISS}))},[t]),b=(0,n.useCallback)(()=>{c(),t((0,d.a)({articleId:0x502d46aa313}))},[t,c]),g=(0,n.useCallback)(()=>"dark"===i?a.e("lottie-sidebar-simplification-coachmark-animation-dark.json").then(a.t.bind(a,0x97e2b1d0,23)):a.e("lottie-sidebar-simplification-coachmark-animation-light.json").then(a.t.bind(a,0x1baf9e14a,23)),[i]);return e?n.createElement(o.Ay,{coachmarkClassNames:"p-sidebar_simplification_coachmark",anchorElement:e,closeCoachmark:c,isOpen:!0,arrowPosition:80,offsetY:300,offsetX:-8,centerOnArrow:!0,orientation:"right-top",forceCoachmarkRefurbish:!0,autoClogProps:f},n.createElement("div",{className:"p-sidebar_simplification_coachmark__wrapper"},n.createElement("div",{className:"p-sidebar_simplification_coachmark__hero_container"},n.createElement(s.e,{getAnimationImport:g,className:"p-sidebar_simplification_coachmark__hero",autoplay:!0,loop:!0})),n.createElement("div",{className:"p-sidebar_simplification_coachmark__content"},n.createElement("h2",{className:"margin_bottom_25"},_.t("A simpler sidebar")),n.createElement("p",null,_.rt("We\u2019ve tidied up icons and reorganized menus, but all your conversations are right where you left them.")),n.createElement("p",{className:"margin_bottom_0"},n.createElement(l.A,{onClick:b},_.rt("Learn more")))))):null})},0xcf519d32:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x2501a2cee),c=a(0xf93aa03a),d=a(0xe1644a69);let m=(0,n.DA)()?e=>{let t,a,n,l,m=(0,r.c)(44),{name:u,className:p,iconLocation:h}=e,_=void 0===p?"":p,f=void 0===h?void 0:h,b="sidebar"===f,g="preferencesPane"===f;m[0]!==_||m[1]!==b||m[2]!==g?(t=o()(_,{"p-channel_sidebar__link__icon c-icon--inherit":b,"p-sidebar_prefs__label__icon":g}),m[0]=_,m[1]=b,m[2]=g,m[3]=t):t=m[3];let y=t;m[4]===Symbol.for("react.memo_cache_sentinel")?(a={type:"summary"},m[4]=a):a=m[4];let A=(0,d.T)(a);switch(u){case"all-files":{let e;m[5]===Symbol.for("react.memo_cache_sentinel")?(e={name:"edit"},m[5]=e):e=m[5],n=e;break}case"list":{let e;m[6]===Symbol.for("react.memo_cache_sentinel")?(e={name:"list-view"},m[6]=e):e=m[6],n=e;break}case"gn-menu":{let e;m[7]===Symbol.for("react.memo_cache_sentinel")?(e={name:"apps"},m[7]=e):e=m[7],n=e;break}case"all-files-alt":{let e;m[8]===Symbol.for("react.memo_cache_sentinel")?(e={name:"file-browser"},m[8]=e):e=m[8],n=e;break}case"team-directory":{let e;m[9]===Symbol.for("react.memo_cache_sentinel")?(e={name:"user-directory"},m[9]=e):e=m[9],n=e;break}case"share-other-alt":{let e;m[10]===Symbol.for("react.memo_cache_sentinel")?(e={name:"channel-search"},m[10]=e):e=m[10],n=e;break}case"dm":{let e;m[11]===Symbol.for("react.memo_cache_sentinel")?(e={name:"direct-messages"},m[11]=e):e=m[11],n=e;break}case"paper-plane-alt":{let e;m[12]===Symbol.for("react.memo_cache_sentinel")?(e={name:"send"},m[12]=e):e=m[12],n=e;break}case"mentions":{let e;m[13]===Symbol.for("react.memo_cache_sentinel")?(e={name:"mentions"},m[13]=e):e=m[13],n=e;break}case"bell-o":{let e;m[14]===Symbol.for("react.memo_cache_sentinel")?(e={name:"notifications"},m[14]=e):e=m[14],n=e;break}case"buildings":{let e;m[15]===Symbol.for("react.memo_cache_sentinel")?(e={name:"buildings"},m[15]=e):e=m[15],n=e;break}case"small-reply":{let e;m[16]===Symbol.for("react.memo_cache_sentinel")?(e={name:"threads"},m[16]=e):e=m[16],n=e;break}case"bookmark":{let e;m[17]===Symbol.for("react.memo_cache_sentinel")?(e={name:"bookmark"},m[17]=e):e=m[17],n=e;break}case"shared-channels-outline":{let e;m[18]===Symbol.for("react.memo_cache_sentinel")?(e={name:"shared-channel"},m[18]=e):e=m[18],n=e;break}case"home":{let e;m[19]===Symbol.for("react.memo_cache_sentinel")?(e={name:"home"},m[19]=e):e=m[19],n=e;break}case"emoji":{let e;m[20]===Symbol.for("react.memo_cache_sentinel")?(e={name:"emoji"},m[20]=e):e=m[20],n=e;break}case"your-files":{let e;m[21]===Symbol.for("react.memo_cache_sentinel")?(e={name:"canvas-content"},m[21]=e):e=m[21],n=e;break}case"create-post":{let e;m[22]===Symbol.for("react.memo_cache_sentinel")?(e={name:"canvas-browser"},m[22]=e):e=m[22],n=e;break}case"sales":{let e;m[23]===Symbol.for("react.memo_cache_sentinel")?(e={name:"sales"},m[23]=e):e=m[23],n=e;break}case"sf-cloud":{let e;m[24]===Symbol.for("react.memo_cache_sentinel")?(e={name:"sf-cloud"},m[24]=e):e=m[24],n=e;break}case"sparkles":n=A;break;case"stacked-cards":{let e;m[25]===Symbol.for("react.memo_cache_sentinel")?(e={name:"stacked-cards"},m[25]=e):e=m[25],n=e;break}case"user":{let e;m[26]===Symbol.for("react.memo_cache_sentinel")?(e={name:"user"},m[26]=e):e=m[26],n=e;break}case"bullet-list":{let e;m[27]===Symbol.for("react.memo_cache_sentinel")?(e={name:"bulleted-list"},m[27]=e):e=m[27],n=e;break}case"inbox":{let e;m[28]===Symbol.for("react.memo_cache_sentinel")?(e={name:"inbox"},m[28]=e):e=m[28],n=e;break}case"email":{let e;m[29]===Symbol.for("react.memo_cache_sentinel")?(e={name:"email"},m[29]=e):e=m[29],n=e;break}case"check-circle":{let e;m[30]===Symbol.for("react.memo_cache_sentinel")?(e={name:"check-circle"},m[30]=e):e=m[30],n=e;break}case"unified-directory":{let e;m[31]===Symbol.for("react.memo_cache_sentinel")?(e={name:"user-directory"},m[31]=e):e=m[31],n=e;break}case"rocket":{let e;m[32]===Symbol.for("react.memo_cache_sentinel")?(e={name:"rocket"},m[32]=e):e=m[32],n=e;break}case"sun":{let e;m[33]===Symbol.for("react.memo_cache_sentinel")?(e={name:"sun"},m[33]=e):e=m[33],n=e;break}default:{let e;m[34]===Symbol.for("react.memo_cache_sentinel")?(e={name:"emoji"},m[34]=e):e=m[34],n=e}}let x=n;if(m[35]!==y||m[36]!==u||m[37]!==x){let e,t;m[39]!==y||m[40]!==u?(e={className:y,"data-qa":u},m[39]=y,m[40]=u,m[41]=e):e=m[41],m[42]!==x?(t=i.createElement(s.Ah,{size:c.V,inline:!0,...x}),m[42]=x,m[43]=t):t=m[43],l=i.createElement("span",e,t),m[35]=y,m[36]=u,m[37]=x,m[38]=l}else l=m[38];return l}:({name:e,className:t="",iconLocation:a})=>{let n=o()(t,{"p-channel_sidebar__link__icon c-icon--inherit":"sidebar"===a,"p-sidebar_prefs__label__icon":"preferencesPane"===a}),r=(0,d.T)({type:"summary"}),l=(0,i.useMemo)(()=>{switch(e){case"all-files":return{name:"edit"};case"list":return{name:"list-view"};case"gn-menu":return{name:"apps"};case"all-files-alt":return{name:"file-browser"};case"team-directory":case"unified-directory":return{name:"user-directory"};case"share-other-alt":return{name:"channel-search"};case"dm":return{name:"direct-messages"};case"paper-plane-alt":return{name:"send"};case"mentions":return{name:"mentions"};case"bell-o":return{name:"notifications"};case"buildings":return{name:"buildings"};case"small-reply":return{name:"threads"};case"bookmark":return{name:"bookmark"};case"shared-channels-outline":return{name:"shared-channel"};case"home":return{name:"home"};case"emoji":default:return{name:"emoji"};case"your-files":return{name:"canvas-content"};case"create-post":return{name:"canvas-browser"};case"sales":return{name:"sales"};case"sf-cloud":return{name:"sf-cloud"};case"sparkles":return r;case"stacked-cards":return{name:"stacked-cards"};case"user":return{name:"user"};case"bullet-list":return{name:"bulleted-list"};case"inbox":return{name:"inbox"};case"email":return{name:"email"};case"check-circle":return{name:"check-circle"};case"rocket":return{name:"rocket"};case"sun":return{name:"sun"}}},[e,r]);return i.createElement("span",{className:n,"data-qa":e},i.createElement(s.Ah,{size:c.V,inline:!0,...l}))};m.displayName="SidebarSimplificationIcon";let u=m},0x24e88698f:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SidebarVisualUpdatesCoachmark:()=>SidebarVisualUpdatesCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x14fad6485),s=a(0x20482ad21),c=a(0xb90de824),d=a(0x13953efe6),m=a(0x18def662b),u=a(0x172dd1bf5),p=a(0x3989021c),h=a(0x218842a12),_=a(0x1ccef1c6f),f=a(0x226892387),b=a(0x20498e2b4),g=a(0x20061cab9),y=a(0xf3c65e54),A=a(0x5b1935a6);let x=a.p+"sidebar-visual-updates-static-03f5f45.png";var E=a(0x155938222),C=a.n(E);let k=new s.Ay("sidebar_visual_updates_coachmark"),SidebarVisualUpdatesCoachmark=({children:e})=>{let t=(0,r.wA)(),{windowRef:i}=(0,n.useContext)(o._0),s=(0,f.d4)(m.TO),E=k.t("We tweaked the sidebar"),v=k.t("With better indentation, smaller icons, and section menus, your sidebar should now be easier to scan."),S=k.t("Edit Sidebar"),I=k.t("Got it"),w=(0,f.d4)(e=>!!(0,_.ty)(e,"a11y_animations")),T=(0,n.useCallback)(()=>a.e("lottie-sidebar-visual-updates-coachmark-animation.json").then(a.t.bind(a,0x1c1510c97,23)),[]),{isOpen:N,closeCoachmark:M}=(0,p.A)(h.g.EDUCATION_SIDEBAR_VISUAL_UPDATES_COACHMARK,A.xu.IN_PRODUCT_COACHMARK),R=(0,n.useCallback)(()=>{M(),t((0,g.Ay)({spaceName:A.xu.IN_PRODUCT_COACHMARK,action:A.hw.DISMISS}))},[t,M]);(0,n.useEffect)(()=>{s&&N&&t((0,y.A)({notificationName:h.g.EDUCATION_SIDEBAR_VISUAL_UPDATES_COACHMARK,action:A.hw.IMPRESSION}))},[t,s,N]);let P=(0,n.useCallback)(()=>{t((0,b.k)({isEditMode:!0})),R()},[t,R]),L=(0,n.useCallback)(e=>{i.deref()?.requestAnimationFrame(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})})},[i]),O=(0,n.useMemo)(()=>n.createElement("div",{className:l()("c-coachmarkv2__hero",C().coachmarkBg)},w?n.createElement(u.e,{autoplay:!0,getAnimationImport:T,loop:!0}):n.createElement("img",{alt:"","aria-hidden":!0,"data-qa":"sidebar_visual_updates_coachmark_static_img",src:x,className:l()("full_max_width",C().staticClassNames)})),[w,T]),D=(0,n.useMemo)(()=>n.createElement(c.Ay,{arrowPosition:10,bodyText:v,closeCoachmark:R,isOpen:N,width:350,offsetY:155,offsetX:-7,title:E,hero:O,primaryCallToActionText:I,onClickPrimaryButton:R,secondaryCallToActionText:S,onClickSecondaryButton:P,onAfterOpen:L,arrowColor:"DT_COLOR_PLT_SUNFLOWER_30"}),[v,E,I,S,R,P,N,O,L]);return s?n.createElement(d.Ay,{coachmarkElement:D,orientation:d.YC.Right,preventPropagation:!0},e):e};SidebarVisualUpdatesCoachmark.displayName="SidebarVisualUpdatesCoachmark"},0x75186d4d:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseUnreadsSimplificationCoachmark:()=>T,default:()=>N});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x5373464c),c=a(0x1d2cd7755),d=a(0x139c79d16),m=a(0xa5dbe09b),u=a(0x1fe44d86d),p=a(0x1ebfa1009),h=a(0xfdae11ea),_=a(0x172dd1bf5),f=a(0x3711e82d),b=a(0x223ac29bb),g=a(0x1d84f40a0),y=a(0x12f41fc32),A=a(0x226892387),x=a(0x24b37e04d),E=a(0x1fb2d2a87),C=a(0x20061cab9),k=a(0x5b1935a6),v=a(0x20085de45);let S=new o.Ay("channel_sidebar"),I={elementType:f.ElementType.COACHMARK,uiComponentName:f.UiComponentName.UNREADS_SIMPLIFICATION_COACHMARK,eventId:f.EventId.CLIENT_GENERAL,megaphoneSpaceName:k.xu.IN_PRODUCT_COACHMARK,megaphoneNotificationName:k.ze.UNREADS_SIMPLIFICATION_COACHMARK},w={"de-DE":{light:a.e("lottie-unreads-simplification-animation-light-de-DE.json").then(a.t.bind(a,0x74a8dbe4,23)),dark:a.e("lottie-unreads-simplification-animation-dark-de-DE.json").then(a.t.bind(a,0x773258aa,23))},"en-GB":{light:a.e("lottie-unreads-simplification-animation-light-en-GB.json").then(a.t.bind(a,0x1bc30fe86,23)),dark:a.e("lottie-unreads-simplification-animation-dark-en-GB.json").then(a.t.bind(a,0x34b1d80,23))},"en-US":{light:a.e("lottie-unreads-simplification-animation-light.json").then(a.t.bind(a,0x19c3b63ac,23)),dark:a.e("lottie-unreads-simplification-animation-dark.json").then(a.t.bind(a,0x20f6119f2,23))},"es-ES":{light:a.e("lottie-unreads-simplification-animation-light-es-ES.json").then(a.t.bind(a,0x199e7c16a,23)),dark:a.e("lottie-unreads-simplification-animation-dark-es-ES.json").then(a.t.bind(a,0x4b0f0640,23))},"es-LA":{light:a.e("lottie-unreads-simplification-animation-light-es-LA.json").then(a.t.bind(a,0x1ce37e459,23)),dark:a.e("lottie-unreads-simplification-animation-dark-es-LA.json").then(a.t.bind(a,0x109d42d53,23))},"fr-FR":{light:a.e("lottie-unreads-simplification-animation-light-fr-FR.json").then(a.t.bind(a,0x11d808872,23)),dark:a.e("lottie-unreads-simplification-animation-dark-fr-FR.json").then(a.t.bind(a,0x135f54d80,23))},"it-IT":{light:a.e("lottie-unreads-simplification-animation-light-it-IT.json").then(a.t.bind(a,0x1a78e4b2c,23)),dark:a.e("lottie-unreads-simplification-animation-dark-it-IT.json").then(a.t.bind(a,0x11f3a8d52,23))},"ja-JP":{light:a.e("lottie-unreads-simplification-animation-light-ja-JP.json").then(a.t.bind(a,0x22f5649d7,23)),dark:a.e("lottie-unreads-simplification-animation-dark-ja-JP.json").then(a.t.bind(a,0x10d8c3dd5,23))},"ko-KR":{light:a.e("lottie-unreads-simplification-animation-light-ko-KR.json").then(a.t.bind(a,0x20b5edd6d,23)),dark:a.e("lottie-unreads-simplification-animation-dark-ko-KR.json").then(a.t.bind(a,0x23703451b,23))},"pt-BR":{light:a.e("lottie-unreads-simplification-animation-light-pt-BR.json").then(a.t.bind(a,0x23d2b672,23)),dark:a.e("lottie-unreads-simplification-animation-dark-pt-BR.json").then(a.t.bind(a,0x68a809c0,23))},"zh-CN":{light:a.e("lottie-unreads-simplification-animation-light-zh-CN.json").then(a.t.bind(a,0x69f0f119,23)),dark:a.e("lottie-unreads-simplification-animation-dark-zh-CN.json").then(a.t.bind(a,0x23fe2383,23))},"zh-TW":{light:a.e("lottie-unreads-simplification-animation-light-zh-TW.json").then(a.t.bind(a,0x793afd71,23)),dark:a.e("lottie-unreads-simplification-animation-dark-zh-TW.json").then(a.t.bind(a,0x25368e39f,23))}},T=(0,n.DA)()?e=>{let t,a,n,l=(0,r.c)(42),{children:o,handleDismiss:f,clientTheme:g,sidebarBehavior:y,onChangeSidebarBehavior:A,onClickPrimaryButton:x,UNSAFE_parentSelector:E}=e,C=w[(0,b.Yp)()]||w["en-US"],k=C.dark,v=C.light;l[0]!==g?(t=()=>"dark"===g?k:v,l[0]=g,l[1]=t):t=l[1];let T=t;if(l[2]!==E||l[3]!==T||l[4]!==f||l[5]!==A||l[6]!==x||l[7]!==y){let e,t,n;if(l[9]===Symbol.for("react.memo_cache_sentinel")?(e=S.t("Save"),l[9]=e):e=l[9],l[10]!==E||l[11]!==f||l[12]!==x?(t={coachmarkClassNames:"p-unreads_simplification_coachmark",closeCoachmark:f,isOpen:!0,arrowPosition:20,offsetY:-20,offsetX:-18,centerOnArrow:!0,orientation:"right-bottom",forceCoachmarkRefurbish:!0,primaryCallToActionText:e,onClickPrimaryButton:x,autoClogProps:I,shouldCloseOnOverlayClick:!1,UNSAFE_parentSelector:E},l[10]=E,l[11]=f,l[12]=x,l[13]=t):t=l[13],l[14]!==T||l[15]!==A||l[16]!==y){let e,t,a;if(l[18]===Symbol.for("react.memo_cache_sentinel")?(e={className:"p-unreads_simplification_coachmark__wrapper"},l[18]=e):e=l[18],l[19]!==T){let e;l[21]===Symbol.for("react.memo_cache_sentinel")?(e={className:"p-unreads_simplification_coachmark__hero_container"},l[21]=e):e=l[21],t=i.createElement("div",e,i.createElement(_.e,{getAnimationImport:T,className:"p-unreads_simplification_coachmark__hero",autoplay:!0,loop:!0,svgClassName:"p-unreads_simplification_coachmark__hero__svg",renderLoading:_temp})),l[19]=T,l[20]=t}else t=l[20];if(l[22]!==A||l[23]!==y){let e,t,n,r,o,u,p,_;l[25]===Symbol.for("react.memo_cache_sentinel")?(n={className:"p-unreads_simplification_coachmark__content"},e=i.createElement("p",{className:"p-unreads_simplification_coachmark__content__header"},S.t("Want a simpler sidebar?")),t=i.createElement("p",{className:"p-unreads_simplification_coachmark__content__description"},S.rt("Since you have a lot of channels, we recommend only showing those with unread messages. Once you\u2019ve read a conversation, it can be found just a click away.")),l[25]=e,l[26]=t,l[27]=n):(e=l[25],t=l[26],n=l[27]),l[28]===Symbol.for("react.memo_cache_sentinel")?(r={"data-qa":"unreads_simplification_coachmark_radiogroup"},l[28]=r):r=l[28],l[29]===Symbol.for("react.memo_cache_sentinel")?(o={key:h.nU,text:i.createElement(i.Fragment,null,S.t("Show unreads only")," ",i.createElement(s.A,null,S.t("RECOMMENDED"))),type:"inline",cursor:"pointer"},l[29]=o):o=l[29];let f=y===h.nU;l[30]!==A||l[31]!==f?(u={name:"sidebar_behavior_set",value:h.nU,checked:f,onChange:A,"data-qa":"unreads_simplification_coachmark_radio--show_unreads_only"},l[30]=A,l[31]=f,l[32]=u):u=l[32],l[33]===Symbol.for("react.memo_cache_sentinel")?(p={key:h.UN,text:S.t("Show all"),type:"inline",cursor:"pointer"},l[33]=p):p=l[33];let b=y===h.UN;l[34]!==A||l[35]!==b?(_={name:"sidebar_behavior_set",value:h.UN,checked:b,onChange:A,"data-qa":"unreads_simplification_coachmark_radio--show_all"},l[34]=A,l[35]=b,l[36]=_):_=l[36],a=i.createElement("div",n,e,t,i.createElement(m.A,r,i.createElement(c.A,o,i.createElement(d.A,u)),i.createElement(c.A,p,i.createElement(d.A,_)))),l[22]=A,l[23]=y,l[24]=a}else a=l[24];n=i.createElement("div",e,t,a),l[14]=T,l[15]=A,l[16]=y,l[17]=n}else n=l[17];a=i.createElement(u.Ay,t,n),l[2]=E,l[3]=T,l[4]=f,l[5]=A,l[6]=x,l[7]=y,l[8]=a}else a=l[8];let N=a;if(l[37]!==o||l[38]!==N){let e;l[40]!==N?(e={orientation:"right-bottom",coachmarkElement:N},l[40]=N,l[41]=e):e=l[41],n=i.createElement(p.Ay,e,o),l[37]=o,l[38]=N,l[39]=n}else n=l[39];return n}:({children:e,handleDismiss:t,clientTheme:a,sidebarBehavior:n,onChangeSidebarBehavior:r,onClickPrimaryButton:l,UNSAFE_parentSelector:o})=>{let f=w[(0,b.Yp)()]||w["en-US"],g=f.dark,y=f.light,A=(0,i.useCallback)(()=>"dark"===a?g:y,[a,g,y]),x=i.createElement(u.Ay,{coachmarkClassNames:"p-unreads_simplification_coachmark",closeCoachmark:t,isOpen:!0,arrowPosition:20,offsetY:-20,offsetX:-18,centerOnArrow:!0,orientation:"right-bottom",forceCoachmarkRefurbish:!0,primaryCallToActionText:S.t("Save"),onClickPrimaryButton:l,autoClogProps:I,shouldCloseOnOverlayClick:!1,UNSAFE_parentSelector:o},i.createElement("div",{className:"p-unreads_simplification_coachmark__wrapper"},i.createElement("div",{className:"p-unreads_simplification_coachmark__hero_container"},i.createElement(_.e,{getAnimationImport:A,className:"p-unreads_simplification_coachmark__hero",autoplay:!0,loop:!0,svgClassName:"p-unreads_simplification_coachmark__hero__svg",renderLoading:()=>i.createElement("div",{className:"p-unreads_simplification_coachmark__loading_placeholder"})})),i.createElement("div",{className:"p-unreads_simplification_coachmark__content"},i.createElement("p",{className:"p-unreads_simplification_coachmark__content__header"},S.t("Want a simpler sidebar?")),i.createElement("p",{className:"p-unreads_simplification_coachmark__content__description"},S.rt("Since you have a lot of channels, we recommend only showing those with unread messages. Once you\u2019ve read a conversation, it can be found just a click away.")),i.createElement(m.A,{"data-qa":"unreads_simplification_coachmark_radiogroup"},i.createElement(c.A,{key:h.nU,text:i.createElement(i.Fragment,null,S.t("Show unreads only")," ",i.createElement(s.A,null,S.t("RECOMMENDED"))),type:"inline",cursor:"pointer"},i.createElement(d.A,{name:"sidebar_behavior_set",value:h.nU,checked:n===h.nU,onChange:r,"data-qa":"unreads_simplification_coachmark_radio--show_unreads_only"})),i.createElement(c.A,{key:h.UN,text:S.t("Show all"),type:"inline",cursor:"pointer"},i.createElement(d.A,{name:"sidebar_behavior_set",value:h.UN,checked:n===h.UN,onChange:r,"data-qa":"unreads_simplification_coachmark_radio--show_all"}))))));return i.createElement(p.Ay,{orientation:"right-bottom",coachmarkElement:x},e)};T.displayName="UnreadsSimplificationCoachmark";let N=i.memo((0,n.DA)()?e=>{let t,a,n,o,s,c,d,m=(0,r.c)(22),u=(0,l.wA)(),p=(0,A.d4)(E.to),_=(0,A.d4)(g.G);m[0]!==u?(t=()=>{u((0,v.rX)({pref:"sidebar_behavior",value:h.nU}))},a=[u],m[0]=u,m[1]=t,m[2]=a):(t=m[1],a=m[2]),(0,i.useEffect)(t,a),m[3]!==u?(n=()=>{u((0,C.Ay)({spaceName:k.xu.IN_PRODUCT_COACHMARK,action:k.hw.DISMISS}))},m[3]=u,m[4]=n):n=m[4];let f=n;m[5]!==f||m[6]!==u||m[7]!==_?(o=()=>{u((0,x.jF)(!0)),_===h.nU&&u((0,v.rX)({pref:"sidebar_behavior",value:h.UN})),f()},m[5]=f,m[6]=u,m[7]=_,m[8]=o):o=m[8];let b=o;m[9]!==f||m[10]!==u||m[11]!==_?(s=()=>{u((0,x.jF)(!0)),_===h.nU&&u((0,y.AZ)({pref:"sidebar_behavior",value:_})),f()},m[9]=f,m[10]=u,m[11]=_,m[12]=s):s=m[12];let S=s;m[13]!==u?(c=e=>{let t=e.target.value;u((0,v.rX)({pref:"sidebar_behavior",value:t}))},m[13]=u,m[14]=c):c=m[14];let I=c;return m[15]!==p||m[16]!==b||m[17]!==S||m[18]!==I||m[19]!==e||m[20]!==_?(d=i.createElement(T,{...e,handleDismiss:b,clientTheme:p,sidebarBehavior:_,onChangeSidebarBehavior:I,onClickPrimaryButton:S}),m[15]=p,m[16]=b,m[17]=S,m[18]=I,m[19]=e,m[20]=_,m[21]=d):d=m[21],d}:e=>{let t=(0,l.wA)(),a=(0,A.d4)(E.to),n=(0,A.d4)(g.G);(0,i.useEffect)(()=>{t((0,v.rX)({pref:"sidebar_behavior",value:h.nU}))},[t]);let r=(0,i.useCallback)(()=>{t((0,C.Ay)({spaceName:k.xu.IN_PRODUCT_COACHMARK,action:k.hw.DISMISS}))},[t]),o=(0,i.useCallback)(()=>{t((0,x.jF)(!0)),n===h.nU&&t((0,v.rX)({pref:"sidebar_behavior",value:h.UN})),r()},[t,r,n]),s=(0,i.useCallback)(()=>{t((0,x.jF)(!0)),n===h.nU&&t((0,y.AZ)({pref:"sidebar_behavior",value:n})),r()},[t,r,n]),c=(0,i.useCallback)(e=>{let a=e.target.value;t((0,v.rX)({pref:"sidebar_behavior",value:a}))},[t]);return i.createElement(T,{...e,handleDismiss:o,clientTheme:a,sidebarBehavior:n,onChangeSidebarBehavior:c,onClickPrimaryButton:s})});function _temp(){return i.createElement("div",{className:"p-unreads_simplification_coachmark__loading_placeholder"})}},0xf93aa03a:(e,t,a)=>{"use strict";a.d(t,{V:()=>r,z:()=>n});let n=a(0x1c659cbb1).RG.tiny,r="16"},0x1e4389f2:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n,r=((n=r||{}).STAR_CHANNEL="star_channel",n.UNSTAR_CHANNEL="unstar_channel",n.MUTE_CHANNEL="mute_channel",n.UNMUTE_CHANNEL="unmute_channel",n.LEAVE_CHANNEL="leave_channel",n.STAR_CONVERSATION="star_conversation",n.UNSTAR_CONVERSATION="unstar_conversation",n.MUTE_CONVERSATION="mute_conversation",n.UNMUTE_CONVERSATION="unmute_conversation",n.HIDE_USER="hide_user",n.UNHIDE_USER="unhide_user",n.LEAVE_CONVERSATION="leave_conversation",n.POPOUT_CHANNEL="popout_channel",n.COPY_CHANNEL_NAME="copy_channel_name",n.COPY_CHANNEL_LINK="copy_channel_link",n.COPY_EMAIL_ADDRESS="copy_email_address",n.SIDEBAR_SETTINGS="sidebar_settings",n.STOP_ORGANIZING_SIDEBAR="stop_organizing_sidebar",n.ORGANIZE_SIDEBAR="organize_sidebar",n.GO_TO_CHANNEL="go_to_channel",n.GO_TO_CONVERSATION="go_to_conversation",n.VIEW_MEMBRES="view_members",n.MARK_AS_READ="mark_as_read",n.SEARCH_CHANNEL="search_channel",n.ADD_TO_DAILY_DIGEST="add_to_daily_digest",n.REMOVE_FROM_DAILY_DIGEST="remove_from_daily_digest",n.ADD_PRIORITY_USER="add_priority_user",n.REMOVE_PRIORITY_USER="remove_priority_user",n);let i=r},0x1cae4d14b:(e,t,a)=>{"use strict";a.d(t,{l:()=>u,t:()=>m});var n=a(0x2414d10c6),r=a(0x12185e091),i=a(0x245dcaf6b),l=a(0x100fb9ff5),o=a(0x16df7a1d3),s=a(0x143fb6398),c=a(0x1cf0d97e1),d=a(0x1ee439e69);let m={None:"none",ExternallySharedPending:"externally-shared-pending",ExternallyShared:"externally-shared",OrgShared:"org-shared"},u=(0,c.Ay)((e,{channel:t})=>{if((0,r.JM)(t))return m.None;let a=(0,d.H7)(e);if(a&&t&&(0,i.sP)(a,t))return m.ExternallySharedPending;if((0,s.ju)(t))return 0===(0,n.y)(e,{channel:t})[1]?m.None:m.ExternallyShared;if((0,l.t)(t)){if((0,o.S)(t))return m.OrgShared;let[r,i]=(0,n.A)(e,{channel:t,team:a});return 1===i&&r.includes(a)||0===i?m.None:m.OrgShared}return m.None});u.meta={name:"getChannelSharedTooltipState",key:"createSelectorGetChannelSharedTooltipState",description:(e,{channel:t})=>{if((0,r.JM)(t))return m.None;let a=(0,d.H7)(e);if(a&&t&&(0,i.sP)(a,t))return m.ExternallySharedPending;if((0,s.ju)(t))return 0===(0,n.y)(e,{channel:t})[1]?m.None:m.ExternallyShared;if((0,l.t)(t)){if((0,o.S)(t))return m.OrgShared;let[r,i]=(0,n.A)(e,{channel:t,team:a});return 1===i&&r.includes(a)||0===i?m.None:m.OrgShared}return m.None}}},0x9cd3a930:(e,t,a)=>{"use strict";a.d(t,{F:()=>getConversationsFilterLabel});var n=a(0x20482ad21),r=a(0xfdae11ea);let i=new n.Ay("menu");function getConversationsFilterLabel(e,t=r.UN){let{shortVersion:a=!1,experimentFilterDormantChannelsGroupOn:n=!1}=e||{};switch(t){case r.nU:case"hid":return n?i.t("Unreads"):i.t("Unreads only");case r.Ao:case"mentions":return n?i.t("Mentions"):i.t("Mentions only");case r.k_:case"active":return i.t("Active only");case r.eF:if(a)return i.t("Custom",{fallbackHash:"081ae3fdc403609cf6e760849ebb14117b7a50cb",fallbackHashNs:"ia4"});return i.t("Custom by section",{fallbackHash:"854da44efceea6aab66f3b5e7d0120e46cc5e30d",fallbackHashNs:"ia4"});default:return i.t("All")}}},0xeeca30d2:(e,t,a)=>{"use strict";a.d(t,{H:()=>getConversationsSortLabel});var n=a(0x35945a76);function getConversationsSortLabel(e){switch(e){case n.n5:return"Recency";case n.u5:return"Priority";case n.PY:default:return"A-Z"}}},0x251135419:(e,t,a)=>{"use strict";a.d(t,{A:()=>getIconTypeForChannelPrefix});var n=a(0x1ec69ee01),r=a(0x12185e091),i=a(0x6f213e53),l=a(0x114ffe897),o=a(0x245dcaf6b);function getIconTypeForChannelPrefix({channel:e,isFrozenAndInGracePeriod:t,isSuggested:a,isList:s,wasExternalChannelsTrial:c}){if(s)return"bullet-list";let d=(0,i.F)(e)&&!t&&(!(0,o.Zz)(e)||!(0,r.JM)(e));if(c&&t||d)return"archived-channel";if((0,r.Zp)(e))return"lock-o";if((0,r.yz)(e)){let t=(0,n.N4)(e)||0;return`multiparty-dm-${t}`}return(0,l.D)(e)?"heart":a?"plus-small":"channel"}},0x1e0963d7:(e,t,a)=>{"use strict";function getRowChannelIds(e){switch(e.type){case"channel":return[e.id];case"sectionHeading":return e.channelIds;default:return}}a.d(t,{s:()=>getRowChannelIds})},0x18e18e7ac:(e,t,a)=>{"use strict";let n;a.d(t,{A:()=>o,y:()=>l});var r=a(0x9e671ad),i=a(0x1a256ff50);let l={TopHalf:"top-half",Middle:"middle",BottomHalf:"bottom-half"},o=(n={rowPosition:{},priorDisplayedChannelSectionId:{},finalDisplayedChannelSectionId:void 0},e=>{var t;let a,o,s={},c={},d={};return e.forEach(e=>{if(!("channelSection"in e)||!e.channelSection)return;let t=e.channelSection.id;d[t]||(d[t]=[]),d[t].push(e),o!==t&&(c[t]=o,o=t,a=t)}),Object.values(d).forEach(e=>{e.forEach((t,a)=>{var i,o;let c,d=a===e.length-1;c=a<(e.length-1)/2?l.TopHalf:a>(e.length-1)/2?l.BottomHalf:l.Middle,s[t.key]=(i=t.key,o={isFirstInSection:0===a,position:c,isLastInSection:d},(0,r.A)(o,n.rowPosition[i])||(n.rowPosition[i]=o),n.rowPosition[i])})}),t={rowPosition:((0,i.Ay)(s,n.rowPosition)||(n.rowPosition=s),n.rowPosition),priorDisplayedChannelSectionId:((0,r.A)(c,n.priorDisplayedChannelSectionId)||(n.priorDisplayedChannelSectionId=c),n.priorDisplayedChannelSectionId),finalDisplayedChannelSectionId:a},(0,i.Ay)(n,t)||(n=t),n})},0x1720d0b2:(e,t,a)=>{"use strict";a.d(t,{U:()=>getRowsUnreadsAndMentions});let getRowsUnreadsAndMentions=({rows:e,channelBadgeCount:t,mutedChannels:a,unreadChannels:n,hasMentionedThreads:r,hasUnreadThreads:i})=>e.reduce((e,r)=>{let i="sectionHeading"===r.type?r.channelIds:[];return i?.forEach(r=>{let i=t[r]>0,l=a?.[r];!l&&n[r]&&e.unreadIds.push(r),!l&&i&&e.mentionIds.push(r),l&&i&&e.mutedMentionIds.push(r)}),e},{unreadIds:i?["Vall_threads"]:[],mentionIds:r?["Vall_threads"]:[],mutedMentionIds:[]})},0x14d02d98e:(e,t,a)=>{"use strict";a.d(t,{Z:()=>getSidebarItemHeight});var n=a(0x1771e0aa7),r=a.n(n);function getSidebarItemHeight(e){return e?r().DT_STATIC_SPACE_275:r().DT_STATIC_SPACE_175}},0x2414d10c6:(e,t,a)=>{"use strict";a.d(t,{A:()=>c,y:()=>s});var n=a(0x6b35329),r=a(0x73d7ee71),i=a(0xa1832ae4),l=a(0x1cf0d97e1),o=a(0x1ee439e69);let s=(0,l.Ay)((e,{channel:t})=>{let a=(0,n.A)(e,t),r=[],l=a.length;for(let t=0;t<a.length&&r.length<3;t++){let n=a[t],s=(0,o._J)(e,n);(0,i.hc)(s)||(0,i.t8)(s)?r.push(s):l-=1}return[r,l]});s.meta={name:"getExternalTeamsForTooltip",key:"createSelectorGetExternalTeamsForTooltip",description:(e,{channel:t})=>{let a=(0,n.A)(e,t),r=[],l=a.length;for(let t=0;t<a.length&&r.length<3;t++){let n=a[t],s=(0,o._J)(e,n);(0,i.hc)(s)||(0,i.t8)(s)?r.push(s):l-=1}return[r,l]}};let c=(0,l.Ay)((e,{channel:t,team:a})=>{let n=(0,r.R)(e,t)||[];a&&n.includes(a.id)&&(n=[a.id,...n.filter(e=>e!==a.id)]);let l=[],s=n.length;for(let t=0;t<n.length&&l.length<3;t++){let a=n[t],r=(0,o._J)(e,a);(0,i.hc)(r)||(0,i.t8)(r)?l.push(r):s-=1}return[l,s]});c.meta={name:"getInternalTeamsForTooltip",key:"createSelectorGetInternalTeamsForTooltip",description:(e,{channel:t,team:a})=>{let n=(0,r.R)(e,t)||[];a&&n.includes(a.id)&&(n=[a.id,...n.filter(e=>e!==a.id)]);let l=[],s=n.length;for(let t=0;t<n.length&&l.length<3;t++){let a=n[t],r=(0,o._J)(e,a);(0,i.hc)(r)||(0,i.t8)(r)?l.push(r):s-=1}return[l,s]}}},0x117d364b7:(e,t,a)=>{"use strict";a.d(t,{AV:()=>onNavigateBack,Cu:()=>maybeIncrementHistoryLength,Gu:()=>onNavigateForward,g4:()=>isForwardDisabled,qn:()=>isBackDisabled});var n=a(0x4f6e90b4),r=a(0x1ae5d492),i=a(0x1ec68d6a3);let l=1,o=1,s=(0,i.Wo)({label:"HISTORY-NAVIGATION"}),onNavigateForward=()=>{o!==l&&(s.info("Incrementing the users current position in the history stack"),o+=1)},onNavigateBack=()=>{1!==o&&(s.info("Decrementing the users current position in the history stack"),o-=1)},isBackDisabled=()=>1===o,isForwardDisabled=()=>o===l;function incrementHistoryLength(){s.info("Adding route to the history stack"),o+=1,l=o}function maybeIncrementHistoryLength({shouldReplaceState:e,reason:t}){e||t!==r.GB&&incrementHistoryLength()}(0,n.ul)("history",{getHistoryLength:()=>l,getHistoryIndex:()=>o})},0x1fa01bf86:(e,t,a)=>{"use strict";a.d(t,{Y:()=>i});var n=a(0x1cf0d97e1),r=a(0x14149c126);let i=(0,n.Ay)(e=>"on"===(0,r._Z)(e,"fe_noise_metrics_logging"));i.meta={name:"isNoiseMetricsLoggingEnabled",key:"createSelectorIsNoiseMetricsLoggingEnabled",description:e=>"on"===(0,r._Z)(e,"fe_noise_metrics_logging")}},0x889d7d4a:(e,t,a)=>{"use strict";a.d(t,{o:()=>n});let n="CHANNEL-SIDEBAR"},0x1002e1f2c:(e,t,a)=>{"use strict";a.d(t,{A:()=>shouldShowPresenceIcon});var n=a(0x12185e091),r=a(0x6f213e53),i=a(0x114ffe897),l=a(0x245dcaf6b);function shouldShowPresenceIcon({channel:e,isSelected:t,isTyping:a}){return!(!e||!(0,n.LI)(e)||(0,i.D)(e)||a&&!t||(0,r.F)(e)&&!(0,l.Zz)(e))}},0xfdae11ea:(e,t,a)=>{"use strict";a.d(t,{Ao:()=>l,UN:()=>r,eF:()=>i,k_:()=>o,nU:()=>n});let n="hide_read_channels",r="",i="hide_read_channels_unless_starred",l="show_mentions_only",o="hide_inactive_channels"},0x23e6a74f2:(e,t,a)=>{"use strict";a.d(t,{l:()=>withCalculateSidebarSections});var n=a(0xbad225b5),r=a(0x8ccddb01);function withCalculateSidebarSections(e){return function(t){let a=(0,r.z)();return n.createElement(e,{...t,calculateSidebarSectionsResult:a})}}withCalculateSidebarSections.displayName="withCalculateSidebarSections"},0x97e52daf:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x14fad6485),o=a(0x23485a76e),s=a(0xdbb55997),c=a(0x1599ad93e),d=a(0x16d4244ae),m=a(0x226892387),u=a(0x19895585a);let p=(0,n.DA)()?()=>{let e,t,a,n,p,h,_,f,b=(0,r.c)(22),{windowRef:g,windowId:y}=(0,i.useContext)(l._0),A=void 0===y?u.N2:y;b[0]!==g?(e=g.deref()?.document,b[0]=g,b[1]=e):e=b[1];let x=e,E=(0,m.d4)(c.ZV),C=A!==u.N2;b[2]!==x||b[3]!==C||b[4]!==E?(t=e=>()=>{if(C||E||!x?.activeElement)return!1;let t=(0,d.wn)(x.activeElement);if(t&&!t.isEmpty())return"previous"===e?!!t?.isCursorAtBeginning?.():!!t?.isCursorAtEnd?.();if(!t&&(0,s.A)(x.activeElement)){let e=x.activeElement;return(0,o.A)(e)?e.textContent?.trim()==="":""===e.value}return!0},b[2]=x,b[3]=C,b[4]=E,b[5]=t):t=b[5];let k=t;b[6]!==k?(a=k("next"),b[6]=k,b[7]=a):a=b[7];let v=a;b[8]!==k?(n=k("previous"),b[8]=k,b[9]=n):n=b[9];let S=n;b[10]!==v?(p=()=>!v(),b[10]=v,b[11]=p):p=b[11];let I=p;b[12]!==S?(h=()=>!S(),b[12]=S,b[13]=h):h=b[13];let w=h;b[14]!==x||b[15]!==C||b[16]!==E?(_=()=>{if(C||E||!x?.activeElement)return!0;let e=(0,d.wn)(x.activeElement);return!!(e&&e.hasFocus?.()||!e&&(0,s.A)(x.activeElement))},b[14]=x,b[15]=C,b[16]=E,b[17]=_):_=b[17];let T=_;return b[18]!==I||b[19]!==w||b[20]!==T?(f={cannotMoveNext:I,cannotMovePrevious:w,cannotPerformAction:T},b[18]=I,b[19]=w,b[20]=T,b[21]=f):f=b[21],f}:()=>{let{windowRef:e,windowId:t=u.N2}=(0,i.useContext)(l._0),a=e.deref()?.document,n=(0,m.d4)(c.ZV),r=t!==u.N2,p=(0,i.useCallback)(e=>()=>{if(r||n||!a?.activeElement)return!1;let t=(0,d.wn)(a.activeElement);if(t&&!t.isEmpty())return"previous"===e?!!t?.isCursorAtBeginning?.():!!t?.isCursorAtEnd?.();if(!t&&(0,s.A)(a.activeElement)){let e=a.activeElement;return(0,o.A)(e)?e.textContent?.trim()==="":""===e.value}return!0},[r,n,a]),h=p("next"),_=p("previous");return{cannotMoveNext:()=>!h(),cannotMovePrevious:()=>!_(),cannotPerformAction:(0,i.useCallback)(()=>{if(r||n||!a?.activeElement)return!0;let e=(0,d.wn)(a.activeElement);return!!(e&&e.hasFocus?.()||!e&&(0,s.A)(a.activeElement))},[r,n,a])}}},0xe55f1698:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseTabsCustomizationNuxCoachmark:()=>BaseTabsCustomizationNuxCoachmark,default:()=>E});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x13953efe6);let c=a.p+"tabs-customization-nux-coachmark-fd9f17d.png";var d=a(0x172dd1bf5),m=a(0x3989021c),u=a(0x1be37a18e),p=a(0x218842a12),h=a(0x3711e82d),_=a(0x1ccef1c6f),f=a(0x1006f8a2b),b=a(0x226892387),g=a(0x5b1935a6);let y=new o.Ay("view"),A={clogImpression:!0,elementName:"more_tab_coachmark_close",uiComponentName:h.UiComponentName.MORE_TAB_NUX_COACHMARK};p.g.TAB_RAIL_TABS_CUSTOMIZATION_NUX_COACHMARK;let BaseTabsCustomizationNuxCoachmark=({areAnimationsEnabled:e,children:t,onClick:n,onClose:r,renderCoachmark:l,UNSAFE_parentSelector:o})=>{let m=(0,i.useCallback)(()=>a.e("tabs-customization-nux-coachmark.json").then(a.t.bind(a,0x2d9aa102,23)),[]),u=(0,i.useMemo)(()=>e?i.createElement(d.e,{autoplay:!0,svgClassName:"p-tabs_customization_nux_coachmark__hero",getAnimationImport:m,loop:!0}):i.createElement("img",{alt:"","aria-hidden":!0,className:"p-tabs_customization_nux_coachmark__hero",src:c,width:"100%"}),[e,m]),p=l({autoClogProps:A,bodyText:y.t("Now you can customize the navigation bar to include the tabs you use most."),centerOnArrow:!0,className:"p-tabs_customization_nux_coachmark",closeBackgroundStyle:"dark",closeCoachmark:r,hero:u,offsetX:-8,onClickPrimaryButton:n,orientation:"right",primaryCallToActionText:y.t("Try it"),title:y.t("Put your favorite tools front and center"),UNSAFE_parentSelector:o,width:400});return i.createElement(s.Ay,{coachmarkAnchorClassNames:"p-home_tab_button__coachmark_anchor",coachmarkElement:p,orientation:"right"},t)};BaseTabsCustomizationNuxCoachmark.displayName="BaseTabsCustomizationNuxCoachmark";let x=(0,n.DA)()?e=>{let t,a,n,o=(0,r.c)(16),{children:s}=e,c=(0,l.wA)(),{closeCoachmark:d,renderCoachmark:p}=(0,m.A)(g.ze.TAB_RAIL_TABS_CUSTOMIZATION_NUX_COACHMARK),h=(0,b.d4)(_temp);o[0]!==d?(t=()=>d(!1),o[0]=d,o[1]=t):t=o[1];let _=t;o[2]!==c||o[3]!==_?(a=()=>{c((0,f.A)({activeSection:u._.tabRail})),_()},o[2]=c,o[3]=_,o[4]=a):a=o[4];let y=a;if(o[5]!==h||o[6]!==s||o[7]!==y||o[8]!==_||o[9]!==p){let e;o[11]!==h||o[12]!==y||o[13]!==_||o[14]!==p?(e={areAnimationsEnabled:h,onClick:y,onClose:_,renderCoachmark:p},o[11]=h,o[12]=y,o[13]=_,o[14]=p,o[15]=e):e=o[15],n=i.createElement(BaseTabsCustomizationNuxCoachmark,e,s),o[5]=h,o[6]=s,o[7]=y,o[8]=_,o[9]=p,o[10]=n}else n=o[10];return n}:({children:e})=>{let t=(0,l.wA)(),{closeCoachmark:a,renderCoachmark:n}=(0,m.A)(g.ze.TAB_RAIL_TABS_CUSTOMIZATION_NUX_COACHMARK),r=(0,b.d4)(e=>!!(0,_.ty)(e,"a11y_animations")),o=(0,i.useCallback)(()=>a(!1),[a]),s=(0,i.useCallback)(()=>{t((0,f.A)({activeSection:u._.tabRail})),o()},[t,o]);return i.createElement(BaseTabsCustomizationNuxCoachmark,{areAnimationsEnabled:r,onClick:s,onClose:o,renderCoachmark:n},e)};x.displayName="TabsCustomizationNuxCoachmark";let E=(0,i.memo)(x);function _temp(e){return!!(0,_.ty)(e,"a11y_animations")}},0x18c712349:(e,t,a)=>{"use strict";a.d(t,{I:()=>E,A:()=>k});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0xb90de824),c=a(0x13953efe6);let d=a.p+"tabs-reveal-coachmark-8091981.gif",m=a.p+"tabs-reveal-coachmark-0ada814.png";var u=a(0x3989021c),p=a(0x218842a12),h=a(0x3711e82d),_=a(0x1ccef1c6f),f=a(0x226892387),b=a(0xafce781a),g=a(0xf3c65e54),y=a(0x5b1935a6);let A=new o.Ay("ia4"),x={clogImpression:!0,elementName:"tabs_reveal_coachmark",elementType:h.ElementType.COACHMARK,eventId:h.EventId.TAB_RAIL,uiStep:h.UiStep.TABS_REVEAL_COACHMARK};p.g.TAB_RAIL_TABS_REVEAL_COACHMARK;let E=(0,n.DA)()?function(e){let t,a,n,l,o,u=(0,r.c)(16),{areAnimationsEnabled:p,children:h,isOpen:_,onClose:f,UNSAFE_parentSelector:b}=e;u[0]===Symbol.for("react.memo_cache_sentinel")?(t=A.t("You\u2019re on a roll \u2014 say hello to DMs and Activity"),u[0]=t):t=u[0];let g=t;u[1]===Symbol.for("react.memo_cache_sentinel")?(a=A.t("Easily jump into DMs and catch up on your notifications."),u[1]=a):a=u[1];let y=a;if(u[2]!==p){let e,t=p?d:m;u[4]!==t?(e={alt:"","aria-hidden":!0,className:"p-tabs_reveal_coachmark__hero",src:t,width:"100%"},u[4]=t,u[5]=e):e=u[5],n=i.createElement("img",e),u[2]=p,u[3]=n}else n=u[3];let E=n;u[6]!==b||u[7]!==E||u[8]!==_||u[9]!==f?(l=i.createElement(s.Ay,{ariaLabel:y,arrowPosition:20,autoClogProps:x,bodyText:y,centerOnArrow:!0,className:"p-tabs_reveal_coachmark",closeCoachmark:f,hero:E,isMegaphoneCoachmark:!1,isOpen:_,offsetX:12,offsetY:68,title:g,width:400,UNSAFE_parentSelector:b}),u[6]=b,u[7]=E,u[8]=_,u[9]=f,u[10]=l):l=u[10];let C=l;if(u[11]!==h||u[12]!==C){let e;u[14]!==C?(e={coachmarkElement:C,orientation:"right-top"},u[14]=C,u[15]=e):e=u[15],o=i.createElement(c.Ay,e,h),u[11]=h,u[12]=C,u[13]=o}else o=u[13];return o}:function({areAnimationsEnabled:e,children:t,isOpen:a,onClose:n,UNSAFE_parentSelector:r}){let l=A.t("You\u2019re on a roll \u2014 say hello to DMs and Activity"),o=A.t("Easily jump into DMs and catch up on your notifications."),u=(0,i.useMemo)(()=>i.createElement("img",{alt:"","aria-hidden":!0,className:"p-tabs_reveal_coachmark__hero",src:e?d:m,width:"100%"}),[e]),p=(0,i.useMemo)(()=>i.createElement(s.Ay,{ariaLabel:o,arrowPosition:20,autoClogProps:x,bodyText:o,centerOnArrow:!0,className:"p-tabs_reveal_coachmark",closeCoachmark:n,hero:u,isMegaphoneCoachmark:!1,isOpen:a,offsetX:12,offsetY:68,title:l,width:400,UNSAFE_parentSelector:r}),[r,o,u,a,n,l]);return i.createElement(c.Ay,{coachmarkElement:p,orientation:"right-top"},t)};E.displayName="BaseTabsRevealCoachmark";let C=(0,n.DA)()?function(e){let t,a,n,o,s=(0,r.c)(16),{children:c}=e,d=(0,l.wA)(),m=(0,f.d4)(_temp),{closeCoachmark:p,isOpen:h}=(0,u.A)(y.ze.TAB_RAIL_TABS_REVEAL_COACHMARK);s[0]!==p||s[1]!==d?(t=()=>{p(),d((0,b.iR)({event:{spaces:[y.xu.PROGRESSIVE_DISCLOSURE],type:y.jo.REQUEST_SPACES}}))},s[0]=p,s[1]=d,s[2]=t):t=s[2];let _=t;if(s[3]!==d||s[4]!==h?(a=()=>{h&&d((0,g.A)({action:y.hw.IMPRESSION,notificationName:y.ze.TAB_RAIL_TABS_REVEAL_COACHMARK}))},n=[d,h],s[3]=d,s[4]=h,s[5]=a,s[6]=n):(a=s[5],n=s[6]),(0,i.useEffect)(a,n),s[7]!==m||s[8]!==c||s[9]!==_||s[10]!==h){let e;s[12]!==m||s[13]!==_||s[14]!==h?(e={areAnimationsEnabled:m,isOpen:h,onClose:_},s[12]=m,s[13]=_,s[14]=h,s[15]=e):e=s[15],o=i.createElement(E,e,c),s[7]=m,s[8]=c,s[9]=_,s[10]=h,s[11]=o}else o=s[11];return o}:function({children:e}){let t=(0,l.wA)(),a=(0,f.d4)(e=>!!(0,_.ty)(e,"a11y_animations")),{closeCoachmark:n,isOpen:r}=(0,u.A)(y.ze.TAB_RAIL_TABS_REVEAL_COACHMARK),o=(0,i.useCallback)(()=>{n(),t((0,b.iR)({event:{spaces:[y.xu.PROGRESSIVE_DISCLOSURE],type:y.jo.REQUEST_SPACES}}))},[n,t]);return(0,i.useEffect)(()=>{r&&t((0,g.A)({action:y.hw.IMPRESSION,notificationName:y.ze.TAB_RAIL_TABS_REVEAL_COACHMARK}))},[t,r]),i.createElement(E,{areAnimationsEnabled:a,isOpen:r,onClose:o},e)};function _temp(e){return!!(0,_.ty)(e,"a11y_animations")}C.displayName="TabsRevealCoachmark";let k=C},0x15245627b:(e,t,a)=>{"use strict";a.d(t,{A:()=>getHistoryMenuItem});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0xa84b8b44),l=a(0x20482ad21),o=a(0x2501a2cee),s=a(0x1fdec3e16),c=a(0x12185e091),d=a(0x1ecc7f772),m=a(0x280afe13),u=a(0x1e79c438d),p=a(0xbd3de346),h=a(0x1b9d5cc0c),_=a(0x82980ab8),f=a(0x1abacca2d),b=a(0x16ed1b0dc),g=a(0x4f725d55),y=a(0x217553e42),A=a(0xe684f705);let x=new l.Ay("classic_nav"),getConversationTextLabel=(e,t)=>{if(!t||!e)return"";let a=t&&(0,b.A)(t)?(0,y.OL)(e,t):null,n=t&&a&&(0,c.LI)(a)?(0,A.nv)(e,(0,m.e)(a)):null,r=t&&(0,g.A)(t)?(0,A.nv)(e,t):null,i=n||r;if(!a&&!i)return"";if(i){let e=(0,h.wg)(n||r),t=(0,_.Fh)(n||r);return t||e}if((0,c.yz)(a))return(0,d.SB)(e,a);if((0,u.V)(a)){let t=(0,c.Zp)(a),n=(0,d.SB)(e,a,{publicChannelIncludeHashSign:!0,imIncludeAtSign:!1});return t?x.t("#{channelName} (Private)",{channelName:n}):n}return""},getFileTextLabel=(e,t)=>{if(!t?.title)return"";let a=x.t("and",{fallbackHash:"cffa50a32cb13a240d705317bcec65dd1f31b6ad",fallbackHashNs:"workflow_builder"}),n=(0,f.h)(t.title).replace(/&amp;/g,a),r=(0,p.DQ)(t),i=(0,p.l7)(t);return r?n=n.replace(/&lt;[@#]([A-Z0-9]+?)&gt;/g,(t,a)=>getConversationTextLabel(e,a)||""):i&&(n=n.replace(/<[@#]([A-Z0-9]+?)\|.*?>/g,(t,a)=>getConversationTextLabel(e,a)||"")),n.split(" ").filter(Boolean).join(" ")};var E=a(0x139aa1a7),C=a(0x929229c1),k=a(0x408bdeff),v=a(0x120c268ad),S=a.n(v),I=a(0xb97f3675),w=a(0x24f1e08bb),T=a(0x1535e80f3),N=a(0xf01a9d50),M=a(0x4f86f8f5);let R=n.memo(({label:e,entityType:t,className:a,isBold:r=!1})=>{let i=(0,n.useCallback)(()=>{let e;return(e=t===M.FN.SalesforceList?(0,N.C)("ListView"):void 0)?n.createElement("span",{className:"p-ia4_history_menu__item__icon"},n.createElement(o.Ah,{...e,size:"20"})):null},[t]),l=(0,n.useMemo)(()=>n.createElement(I.A,{className:S()(a,{bold:r}),size:T.ny.small,avatar:i,text:e,"data-qa":"small_sidebar_entity"}),[a,r,e,i]);return n.createElement(w.A,{size:T.ny.small,className:a,primaryContent:l})});var P=a(0x2376ea9bb),L=a(0x1be9380c8),O=a(0x1e8587960),D=a(0x20c703bc5),F=a(0x54536a24),U=a(0x1cbc015b8),B=a(0x209fb16e4),H=a(0x3711e82d),W=a(0xa985ed31),V=a(0x107e97a6b),G=a(0xf51a309e),q=a(0x171b52ec3),j=a(0x19e4a8feb),z=a(0xbfebdd7c),K=a(0x243f94184),$=a(0x1266f1359),Y=a(0x226879b47),Q=a(0x14ea3ce99),Z=a(0x75bb5a7b),J=a(0x19895585a);let X=new l.Ay("classic_nav");function getHistoryMenuItem({viewSet:e,teamId:t,currentTeamId:a,channelNamesToChannelIdsMap:l,onlyBoldIfUnread:c=!1,showUnreadBadge:d=!1,isOSMenu:m=!1}){let u,h=e?.[J.mq.Primary],_=h?.id,f=h?.viewType,g=e?.[J.mq.Sidebar],A=g?.viewType,x=g?.params,v=(0,$.oK)(t);if(!v)return null;let S=v.getState(),I=(0,L.pc)(S),w=null,T="",N=a!==t?n.createElement(P.A,{className:"p-ia4_history_menu_item__label__team",id:t,size:20}):null;(0,b.A)(_)&&(u=(0,B.i)(l,(0,y.OL)(S,_)));let ee=(0,V.QY)(_);!ee&&_&&(0,W.A)(_)&&(ee=_);let et=ee?(0,Q.Lp)(S,ee):void 0,ea=(0,p.DQ)(et),en=(0,p.l7)(et);if(_&&(0,b.A)(_)){let e=getConversationTextLabel(S,_);m?w=e:(T=e,w=n.createElement(i.Kq,{store:v},n.createElement(C.A,{className:"p-ia4_history_menu_item__label__entity",id:_,showTeamForLocalChannel:u,onlyBoldIfUnread:c,showUnreadBadge:d,showPresence:!1,showAppOrBotBadge:!1,useShortMode:!0})))}if(f===E.D.Threads&&(m?w=X.t("All Threads"):(T=X.t("All Threads"),w=n.createElement("div",{className:"p-ia4_history_menu__item--page"},n.createElement("div",{className:"p-ia4_history_menu__item__icon"},n.createElement(o.Ah,{name:"threads",size:"20"})),n.createElement("div",{className:"p-ia4_history_menu__item__entity"},X.t("All Threads"))))),_&&(0,F.TW)(_)){let e=(0,O.w0)(_)||U.Fr,t=_&&(0,U.gY)(_),a=(0,D.X)(_),i=t&&!(0,r.A)(t)&&t.label?t.label(S):a&&a(S)||void 0;m?w=i:(T=i||"",w=n.createElement("div",{className:"p-ia4_history_menu__item--page"},n.createElement("div",{className:"p-ia4_history_menu__item__icon"},n.createElement(o.Ah,{name:e,size:"20"})),n.createElement("span",{className:"p-ia4_history_menu__item__entity"},n.createElement(s.A,{lines:1},i))))}if(A===E.D.Search){let e=(0,q.Wj)(x?.searchId),t=G.dn.fromString(S,e.requestQuery),a=(0,j.Q)(t.toTextyOps()),r=(0,z.A)(a);m?w=r:(T=r,w=n.createElement("div",{className:"p-ia4_history_menu__item--page"},n.createElement("div",{className:"p-ia4_history_menu__item__icon"},n.createElement(o.Ah,{name:"search",size:"20"})),n.createElement(s.A,{lines:1},n.createElement("div",{className:"p-ia4_history_menu__item__entity"},r))))}if(ee&&(ea||en)&&(m?w=getFileTextLabel(S,et):(T=getFileTextLabel(S,et),w=n.createElement(k.A,{className:"p-ia4_history_menu_item__label__entity",id:ee,file:et,shouldShowDetailText:!1}))),I&&_&&f===E.D.SalesBulkGrid&&A===E.D.ChannelList){let e=(0,Y.iD)(S,{entityId:_,entityType:M.FN.SalesforceList}),t=e?.label||(0,Z.qO)(S,_);t&&(m?w=t:(T=t,w=n.createElement(R,{label:t,entityType:M.FN.SalesforceList,isBold:!0,className:"p-ia4_history_menu_item__label__entity"})))}return w?m?{label:w,teamId:t,viewSet:e}:{ariaLabel:T,className:"p-ia4_history_menu_item",label:n.createElement("div",{className:"p-ia4_history_menu_item__label"},w,N),click:()=>{(0,$.Qw)(t,(0,K.P)({teamId:t,viewSet:e}))},autoClogProps:{eventId:H.EventId.HISTORY_NAVIGATION,elementName:"history_item",onClick:{enableClogAction:!0}}}:null}getHistoryMenuItem.displayName="getHistoryMenuItem"},0x16c17c7de:(e,t,a)=>{"use strict";a.d(t,{Pt:()=>i,QP:()=>r,bF:()=>l,gX:()=>n});let n={BACK:"back",FORWARD:"forward",RECENTS:"recents",SHOW_ALL_RECENTS:"showAllRecents",RECENTLY_CLOSED_WINDOWS:"recentlyClosedWindows"},r=15,i=10,l=70},0x1ec24af9a:(e,t,a)=>{"use strict";a.d(t,{Dx:()=>filterIA4Recents,PT:()=>truncateOSMenuItemLabel,Ss:()=>getRecentlyVisitedItemsForShowMoreDialog,gJ:()=>getOSHistoryMenuItems,v6:()=>getRecentlyVisitedItemsForMenu});var n=a(0x21f3c49e8),r=a(0x62a17882),i=a(0x20482ad21),l=a(0x30d0b075),o=a(0x15245627b),s=a(0x16c17c7de),c=a(0x139aa1a7),d=a(0x12aa1a707),m=a(0x24abfdc6e),u=a(1927545e3),p=a(0x54536a24),h=a(0xfee0a4ff),_=a(0x691ce3ab),f=a(0x19895585a),b=a(0x12b3a2912);let g=new i.Ay("desktop-app-menu"),truncateOSMenuItemLabel=e=>e?e.length>s.bF?`${e.slice(0,s.bF)}...`:e:"",getRecentlyVisitedItemsForMenu=({filteredPages:e,currentTeamId:t,channelNamesToChannelIdsMap:a,maxMenuItems:n=15,isOSMenu:r=!1})=>{let i=[];for(let l of e){if(i.length>=n)break;let e=l[f.jf],s=l[e],c=(0,o.A)({viewSet:s,teamId:l.teamId,currentTeamId:t,channelNamesToChannelIdsMap:a,isOSMenu:r});c&&(r&&c.label&&"string"==typeof c.label?i.push({...c,label:truncateOSMenuItemLabel(c.label)}):i.push(c))}return i},getRecentlyVisitedItemsForShowMoreDialog=({filteredPages:e,currentTeamId:t,channelNamesToChannelIdsMap:a})=>{if((0,n.A)(e)||!t)return[];let r=[];for(let n of e){let e=n[f.jf],i=n[e],l=(0,o.A)({viewSet:i,teamId:n.teamId,currentTeamId:t,channelNamesToChannelIdsMap:a});l&&r.push({ts:n.ts,entry:l})}return r},getUniqueEntryKey=e=>{let t=e[f.jf],a=e[t],n=a?.[f.mq.Primary],r=n?.id,i=a?.[f.mq.Sidebar],o=i?.id,s=i?.params?`-${(0,l.Zf)(i?.params,{space:""})}`:"";return`${e.teamId}-${o}-${r}${s}`},filterIA4Recents=({allRecents:e,state:t,maxItems:a})=>{if((0,n.A)(e)||!t)return[];let r=[],i=new Set;for(let n of e){if(void 0!==a&&r.length>=a)break;if(!(0,b.H)(n))continue;let e=n[f.jf],l=n[e],o=l?.[f.mq.Primary],s=o?.id;if(s===u.c.Empty||o?.viewType===c.D.Setup||s&&(0,p.MD)(s)&&!(0,p.z)(t,s))continue;let d=getUniqueEntryKey(n);i.has(d)||(i.add(d),r.push(n))}return r},getOSHistoryMenuItems=({state:e,recents:t,recentlyClosedWindows:a,currentTeamId:n,channelNamesToChannelIdsMap:i})=>{if(!(0,m.T)(e))return[];let l=[],o=(0,_.en)().getState(),c=(0,h.yS)(o),u=(0,h.m6)(o);l.push({id:`${d.Px}-${s.gX.BACK}`,label:g.t("Back"),accelerator:(0,r.cX)()?"Command+[":"Alt+Left",enabled:!c,order:0}),l.push({id:`${d.Px}-${s.gX.FORWARD}`,label:g.t("Forward"),enabled:!u,accelerator:(0,r.cX)()?"Command+]":"Alt+Right",order:0});let p=[];for(let e=0;e<a.length&&e<s.Pt;e++){let t=a[e];t&&p.push({id:`${d.Px}-${s.gX.RECENTLY_CLOSED_WINDOWS}-${e}`,label:t.label||g.t("Untitled Window",{fallbackHash:"621521f9a8788695ec292cbec54d2792cfdf0a7d",fallbackHashNs:"files"}),enabled:!0,order:e})}let f=[];p.length&&(f.push({id:`${d.Px}-recently-closed-windows-top-separator`,type:"separator",order:1}),f.push({id:`${d.Px}-recently-closed-windows`,type:"submenu",label:g.t("Recently Closed"),order:1,submenu:p}));let b=getRecentlyVisitedItemsForMenu({filteredPages:t,maxMenuItems:s.QP,currentTeamId:n,channelNamesToChannelIdsMap:i,isOSMenu:!0}).reduce((e,t,a)=>(t?.label&&"string"==typeof t.label&&e.push({id:`${d.Px}-${s.gX.RECENTS}-${a}-${t.teamId}`,label:t.label,order:2}),e),[]),y=[];b.length&&(y=[{id:`${d.Px}-recently-visited-separator`,type:"separator",order:2},...b]);let A=[];return b.length===s.QP&&t.length>s.QP&&(A.push({id:`${d.Px}-view-more-separator`,type:"separator",order:3}),A.push({id:`${d.Px}-${s.gX.SHOW_ALL_RECENTS}`,label:g.t("Show full history",{fallbackHash:"e3a17d2a278c26cbd642e265738cbc9fcb3f0c0b",fallbackHashNs:"desktop-app-menu"}),accelerator:(0,r.cX)()?"Command+Y":"Control+H",order:3})),[...l,...f,...y,...A]}},0x11218bc0c:(e,t,a)=>{"use strict";a.d(t,{g:()=>tg});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x1e33662b),s=a.n(o),c=a(0x120c268ad),d=a.n(c),m=a(0x1cbdfeceb),u=a(0x190e60a66),p=a(0x1df96de4c),h=a(0x174f66c40),_=a(0x62a17882),f=a(0x20482ad21),b=a(0x17fee64c3),g=a(0x2264e6ea3),y=a(0x11a296110),A=a(0x99233ecb),x=a(0x133aaa7da),E=a(0x2501a2cee),C=a(0x4c96e5d9),k=a(0x6f2de2d0),v=a(0xd6ba6894);let openAdminTools=()=>{let e=v.J.document.querySelector(".p-tab_rail__tab_menu #admin");if(null!==e)e.click();else{let e=v.J.document.querySelector(".p-tab_rail__tab_menu #browse");e?.click(),setTimeout(()=>{let e=v.J.document.querySelector('[aria-describedby="admin-tools-description"]');e?.focus()},10)}return null};var S=a(0x20ada2503),I=a(0x1cbb49736),w=a(0x47c2b6f4),T=a(0x17f5acc57),N=a(0x8e06a4a2),M=a(0x2376ea9bb),R=a(0x9cd3a930),P=a(0xfdae11ea),L=a(0x398c0114),O=a(0x24d09eca0),D=a(0x40c0d834),F=a(0xb90d5858),U=a(0x1ed656589),B=a(0x11439744b),H=a(0x11c82607b);let W=(0,H.Ay)("Counts the number of times the Open App team menu item is selected",(e,t)=>{(0,B.Cy)({getState:t}).count("team_menu_download_apps")});W.meta={name:"countOpenAppClick",key:"createThunkCountOpenAppClick",description:"Counts the number of times the Open App team menu item is selected"};var V=a(0x3711e82d),G=a(0x226892387),q=a(0x1cf0d97e1),j=a(0xf1527618),z=a(0x1bb53c7d3),K=a(0xe91e45de);let $=(0,q.Ay)(e=>{let t=(0,z.QJ)(e),a=(0,j.Yx)(e),n=1>(0,K.H)(e);return t&&a&&n});$.meta={name:"firstLoginIntoWorkspaceSelector",key:"createSelectorFirstLoginIntoWorkspaceSelector",description:e=>{let t=(0,z.QJ)(e),a=(0,j.Yx)(e),n=1>(0,K.H)(e);return t&&a&&n}};var Y=a(0x16e0cc226);let Q=new f.Ay("native_apps_entry_points"),Z={onClick:{enableClogAction:!0}},OpenDesktopAppMenuItem=({showMobileEntryPoint:e,teamUrl:t,className:a,...n})=>{let r=(0,l.wA)(),o=Q.rt("Open the Slack App",{fallbackHash:"3d3bf52716f61d19b7b9959018e54757226c17ca",fallbackHashNs:"classic_nav"}),s=V.UiComponentVariant.PERSISTENT_ENTRY_CONTROL_DESKTOP_DEFAULT_COPY;e&&(o=Q.rt("Open the desktop app",{fallbackHash:"f1ccafab17e31b70d527e3984ece02b6e92d9d25",fallbackHashNs:"classic_nav"}),s=V.UiComponentVariant.PERSISTENT_ENTRY_TREATMENT_DESKTOP_UPDATED_COPY);let c=i.createElement(i.Fragment,null,i.createElement("span",{className:"p-ia__main_menu__open_native_app_copy"},o),i.createElement("span",{className:d()("p-ia__main_menu__open_slack_app_icon","p-ia__main_menu__open_native_app_icon")},i.createElement("img",{src:Y,alt:"Slack app logo"}))),m=(0,i.useCallback)(()=>r(W()),[r]),u=(0,G.d4)($)?`${t}ssb/redirect?open_desktop=1`:`${t}ssb/redirect`;return i.createElement(D.A,{eventId:V.EventId.EDUCATION_PERSISTENT_MOBILE_ENTRY,uiStep:V.UiStep.MAIN_MENU,uiComponentName:V.UiComponentName.DESKTOP_ENTRY_POINT,uiComponentVariant:s,clogImpression:!0},i.createElement(F.A,{...n,"data-qa":"open-desktop-app",className:d()("p-ia__main_menu__open_slack_app_item",a),onSelected:m,href:u,showLinkIndicatorIcon:!1,label:c,autoClogProps:Z}))};OpenDesktopAppMenuItem.displayName="OpenDesktopAppMenuItem";let J=(0,U.Ay)(OpenDesktopAppMenuItem);var X=a(0x1789e94fa),ee=a(0x5b1935a6);let et={spaceName:ee.xu.MAIN_MENU,notifications:{[ee.ze.PERSISTENT_MOBILE_PROMO]:{component:i.lazy(()=>Promise.resolve().then(a.bind(a,0x239b31086)))}}},ea=i.lazy(()=>Promise.resolve().then(a.bind(a,0x740c71f0))),en=i.lazy(()=>Promise.resolve().then(a.bind(a,0xa03bdfff))),er=i.lazy(()=>Promise.resolve().then(a.bind(a,0xd59d4a4d))),ei=i.lazy(()=>Promise.resolve().then(a.bind(a,0x1780dc294))),el=i.lazy(()=>Promise.resolve().then(a.bind(a,0x1210a2372))),eo={spaceName:ee.xu.WORKSPACE_MENU_PRIMARY_PLAN_INFO,notifications:{[ee.ze.PLAN_INFO]:{component:ea},[ee.ze.TRIAL_INFO]:{component:en},[ee.ze.STRAIGHT_TO_PAID_WORKSPACE_MENU_PRIMARY_TIME_LIMIT]:{component:el},[ee.ze.LIMITED_HISTORY_COUNTDOWN]:{component:er},[ee.ze.LIMITED_HISTORY_COUNTER]:{component:ei},[ee.ze.PLUS_TRIAL_WORKSPACE_MENU_PRO_TO_BIZ_TRIAL_INFO]:{component:en}}},es=i.lazy(()=>Promise.resolve().then(a.bind(a,0x1219ddf98)).then(e=>({default:e.SidebarMenuHeaderPromoCta}))),ec=i.lazy(()=>Promise.resolve().then(a.bind(a,0x22b7c91c4))),ed=i.lazy(()=>Promise.resolve().then(a.bind(a,0x99d5cea2))),em=i.lazy(()=>Promise.resolve().then(a.bind(a,0x208cb0199))),eu=i.lazy(()=>Promise.resolve().then(a.bind(a,0x1e2194294))),ep=i.lazy(()=>Promise.resolve().then(a.bind(a,0x2073a8aa1)).then(e=>({default:e.TrialUpgrade}))),eh=i.lazy(()=>Promise.resolve().then(a.bind(a,0xa9e9acbb))),e_={spaceName:ee.xu.WORKSPACE_MENU_SECONDARY_PLAN_INFO,notifications:{[ee.ze.STRAIGHT_TO_PAID_WORKSPACE_MENU_SECONDARY_UPGRADE_CTA]:{component:ec},[ee.ze.DISCOUNT_PROMO]:{component:es},[ee.ze.SLACK_AI_WORKSPACE_MENU_CTA]:{component:ed},[ee.ze.AUTO_CHARGE_FEATURE_TRIALS_MANAGE_TRIAL_WORKSPACE_MENU_CTA]:{component:em},[ee.ze.SLACK_AI_REQUEST_TO_PURCHASE_WORKSPACE_MENU_CTA]:{component:eu},[ee.ze.PRO_TRIAL_NO_COMMIT_WORKSPACE_MENU_UPGRADE_NOW_CTA]:{component:ep},[ee.ze.PLUS_TRIAL_WORKSPACE_MENU_SECONDARY_PRO_TO_BIZ_TRIAL_INFO]:{component:i.lazy(()=>Promise.resolve().then(a.bind(a,0x21d054151)).then(e=>({default:e.BizPlusTrialManagePlanWorkspaceMenuCta})))},[ee.ze.PLUS_REQUEST_TO_PURCHASE_WORKSPACE_MENU]:{component:eh}}};var ef=a(0x1697a9b0e),eb=a(0x42f5bcc7),eg=a(0x46dbff89);let ey=new f.Ay("classic_nav"),eA={onClick:{enableClogAction:!0}},OpenQrCodeSigninMenuItem=({teamDisplayName:e,...t})=>{let a=(0,l.wA)(),n=ey.rt("Sign in on mobile",{teamDisplayName:e});return i.createElement(D.A,{eventId:V.EventId.EDUCATION_QR_CODE_SIGNIN,uiStep:V.UiStep.MAIN_MENU,clogImpression:!0},i.createElement(F.A,{...t,"data-qa":"qr-code-signin-menu-item",onSelected:()=>a((0,eg.q)({element:i.createElement(eb.A,null)})),label:n,autoClogProps:eA}))};OpenQrCodeSigninMenuItem.displayName="OpenQrCodeSigninMenuItem";let ex=(0,U.Ay)(OpenQrCodeSigninMenuItem);var eE=a(0x3e058968),eC=a(0x205563788),ek=a(0xf7c96b4a),ev=a(0x1059ba41d),eS=a(0x1a02c72b5),eI=a(0xd6a16321),ew=a(0x1f9ab1e80),eT=a(0x47a6f20a),eN=a(0x5358f344),eM=a(0xa1832ae4),eR=a(0xb8504a42),eP=a(0x2209fd06a),eL=a(0x16c7f7638),eO=a(0x1b2346786),eD=a(0xf038462c),eF=a(0x4ebe29ad),eU=a(0x1abe76423),eB=a(0x3ee92a48),eH=a(0x159a0d582),eW=a(0xd84d0b08),eV=a(0x10b952946),eG=a(0x190a9df19),eq=a(0xfb9cbb1),ej=a(0x49e911f4),ez=a(0x84f62144),eK=a(0x2498088b6),e$=a(0x1c14ee6d4),eY=a(0x12cbe336e),eQ=a(0xfe423c7c),eZ=a(0x11d0b0bd1),eJ=a(0x1ccef1c6f),eX=a(0x12f41fc32),e0=a(0x18e1aa302),e1=a(0x7cf565aa),e2=a(0x4ba2406),e4=a(0x1006f8a2b),e5=a(0x10b12d2ae),e3=a(0x691ce3ab),e6=a(0x1529cf960),e8=a(0x1380694ee),e7=a(0x1a45299f),e9=a(0x1e25c919a),te=a(0x4f86f8f5),tt=a(0x14149c126),ta=a(0xb9604b6),tn=a(0x1fcbb004d),tr=a(0xb9965e11),ti=a(0xce702808);(0,q.Ay)(e=>(0,tt.ze)(e,"team_menu_mobile_copy_update")).meta={name:"teamMenuMobileCopyUpdateGetAssignment",key:"createSelectorTeamMenuMobileCopyUpdateGetAssignment",description:e=>(0,tt.ze)(e,"team_menu_mobile_copy_update")};let tl=(0,q.Ay)(e=>"control"===(0,tt.ze)(e,"team_menu_mobile_copy_update"));tl.meta={name:"teamMenuMobileCopyUpdateIsControl",key:"createSelectorTeamMenuMobileCopyUpdateIsControl",description:e=>"control"===(0,tt.ze)(e,"team_menu_mobile_copy_update")};let to=(0,q.Ay)(e=>"treatment_a"===(0,tt.ze)(e,"team_menu_mobile_copy_update"));to.meta={name:"teamMenuMobileCopyUpdateIsTreatmentA",key:"createSelectorTeamMenuMobileCopyUpdateIsTreatmentA",description:e=>"treatment_a"===(0,tt.ze)(e,"team_menu_mobile_copy_update")};let ts=(0,q.Ay)(e=>"treatment_b"===(0,tt.ze)(e,"team_menu_mobile_copy_update"));ts.meta={name:"teamMenuMobileCopyUpdateIsTreatmentB",key:"createSelectorTeamMenuMobileCopyUpdateIsTreatmentB",description:e=>"treatment_b"===(0,tt.ze)(e,"team_menu_mobile_copy_update")};let tc=(0,q.Ay)(e=>["treatment_a","treatment_b"].includes((0,tt.ze)(e,"team_menu_mobile_copy_update")??""));tc.meta={name:"teamMenuMobileCopyUpdateIsAnyTreatment",key:"createSelectorTeamMenuMobileCopyUpdateIsAnyTreatment",description:e=>["treatment_a","treatment_b"].includes((0,tt.ze)(e,"team_menu_mobile_copy_update")??"")};let td=(0,q.Ay)(e=>tl(e)||tc(e));td.meta={name:"teamMenuMobileCopyUpdateIsExposed",key:"createSelectorTeamMenuMobileCopyUpdateIsExposed",description:e=>tl(e)||tc(e)};let tm=(0,q.Ay)(e=>["aa_control","aa_treatment_a","aa_treatment_b"].includes((0,tt.ze)(e,"team_menu_mobile_copy_update")??""));tm.meta={name:"teamMenuMobileCopyUpdateIsAAExposed",key:"createSelectorTeamMenuMobileCopyUpdateIsAAExposed",description:e=>["aa_control","aa_treatment_a","aa_treatment_b"].includes((0,tt.ze)(e,"team_menu_mobile_copy_update")??"")};let tu=(0,H.Ay)("Log exposure for the team_menu_mobile_copy_update experiment if it is exposed",(e,t,{sendImmediately:a=!1}={})=>{let n=t();(td(n)||tm(n))&&((e,{sendImmediately:t=!1}={})=>{let a=(0,tt.KK)(e,"team_menu_mobile_copy_update");a&&a.log_exposures&&(0,ti.K)("team_menu_mobile_copy_update",a,e,t)})(n,{sendImmediately:a})});tu.meta={name:"teamMenuMobileCopyUpdateMaybeLogExposure",key:"createThunkTeamMenuMobileCopyUpdateMaybeLogExposure",description:"Log exposure for the team_menu_mobile_copy_update experiment if it is exposed"};var tp=a(0x1ee439e69),th=a(0x981a75e2);let t_=new f.Ay("ia4"),tf={[ee.ze.WORKSPACE_MENU_UPGRADE_ITEM]:{component:i.lazy(()=>Promise.resolve().then(a.bind(a,0x74103232)))}};function isWorkspaceMenuItem(e){return!(0,I.B)(e)}function workspaceFilterToMenuItemKey(e){return(0,te.Ac)(e)?e.type:e.workspace.id}function makeMenuItemIcon(e,{className:t,teamIconClassName:a}={}){return"workspace"===e.meta.icon?null:i.createElement(M.U,{className:t??a,icon:e.meta.icon,size:36,teamName:e.meta.label})}makeMenuItemIcon.displayName="makeMenuItemIcon";let tb=(0,n.DA)()?e=>{let t,a,n,o,c,d,f,y,E,C,v,I,T,M,D,F,U,B,H,W,q,j,z,K,$,Y,Q,Z,et,ea,en,er,ei,el,es,ec,ed,em,eu,ep,eh,eb,ey,eA,ev,eJ,e7,tt,ta,ti,tl,tc,td,tm,tb,tg,ty,tA,tx,tE,tC,tk,tv,tS,tI,tw,tT,tN,tM,tR,tP,tL,tO,tD,tF,tU,tB,tH,tW,tV,tG,tq,tj,tK,t$=(0,r.c)(420),{menuProps:tY}=e,tQ=(0,l.wA)(),tZ=(0,G.d4)(_temp),tJ=(0,G.d4)(eE.tb),tX=(0,G.d4)(_temp2),t0=(0,G.d4)(_temp3),t1=(0,G.d4)(_temp4),t2=(0,G.d4)(e0.Z_),t4=(0,G.d4)(_temp5),t5=(0,G.d4)(tr.AV),t3=(0,G.d4)(tp.H7),t6=(0,eM.ZT)(t3)??void 0,t8=(0,G.d4)(eY.hi),t7=(0,G.d4)(eY.O6),{currentTeamName:t9}=(0,S.k)();t$[0]!==t3||t$[1]!==t9?(t=t9??(0,eM.F1)(t3),t$[0]=t3,t$[1]=t9,t$[2]=t):t=t$[2];let ae=t;t$[3]!==t3?(a=(0,eM.Zl)(t3),t$[3]=t3,t$[4]=a):a=t$[4];let at=a;t$[5]!==t3?(n=(0,eM.Zl)(t3,"",!0),t$[5]=t3,t$[6]=n):n=t$[6];let aa=n,an=(0,G.d4)(eT.Lz),ar=(0,G.d4)(eH.W),ai=(0,G.d4)(eG.PY),al=(0,G.Z2)(eD.Fm),ao=(0,G.d4)(eG.p2),as=(0,G.d4)(eq.k);t$[7]!==t3?(o=(0,eR.r7)(t3),t$[7]=t3,t$[8]=o):o=t$[8];let ac=o,ad=(0,g.JV)(t6),am=(0,G.d4)(eK.t_),au=(0,G.d4)(eN.U),ap=(0,G.d4)(eP.A7),ah=(0,G.d4)(eO.U),a_=(0,G.d4)(ez.IF),af=(0,G.d4)(ew.h),ab=(0,G.d4)(eP.xk),ag=(0,G.d4)(eP.zi),ay=(0,G.d4)(eP.p4),aA=(0,G.d4)(eP.zd),ax=(0,G.d4)(eL.S),aE=(0,G.d4)(eP.oM),aC=(0,G.d4)(eP.Ak),ak=(0,G.d4)(eP.w5),av=(0,G.d4)(eP.e_);t$[9]!==t3?(c=(0,eM.qR)(t3),t$[9]=t3,t$[10]=c):c=t$[10];let aS=c,aI=(0,G.d4)(_temp6),aw=(0,G.d4)(eM.FH),aT=(0,G.d4)(eF.N),aN=(0,G.d4)(eB.g),aM=ac?ai:aS&&(ao||aI);t$[11]!==t3?(d=(0,eM.S5)(t3),t$[11]=t3,t$[12]=d):d=t$[12];let aR=`https://app.${d}/apps-manage/${t3?.id}/`,aP=ao&&!ac,aL=(0,G.d4)(e8.ce),aO=(0,G.d4)(_temp7),aD=(0,G.d4)(tp.FR),aF=(0,G.wz)(e9.U),aU=(0,G.d4)(ej.sV),aB=(0,G.d4)(eP.B9),aH=(0,G.d4)(eP.wF),aW=(0,G.d4)(eP.lN),aV=(0,G.Z2)(eU.P),aG=aV.length>0,aq=(0,G.d4)(eV._);t$[13]===Symbol.for("react.memo_cache_sentinel")?(f=t_.rt("Tools & settings"),t$[13]=f):f=t$[13];let aj=f;t$[14]===Symbol.for("react.memo_cache_sentinel")?(y=t_.rt("Tools"),t$[14]=y):y=t$[14];let az=y;t$[15]===Symbol.for("react.memo_cache_sentinel")?(E=t_.rt("Settings"),t$[15]=E):E=t$[15];let aK=E,a$=al.length>0,aY=ac&&ap,aQ=!t5&&(a$||aY),aZ=!t5&&!aU&&(a$||aT.length>0||aN.length>0),aJ=(0,G.d4)(eW.M),aX=ad?aJ:as,a0=ad&&af,a1=ad&&ab,a2=tX&&ax,a4=(0,G.d4)(_temp8);t$[16]!==a4||t$[17]!==ad||t$[18]!==aE||t$[19]!==aC?(C=(!(0,b.z$)()||a4)&&(ad&&aE||!ad&&aC),t$[16]=a4,t$[17]=ad,t$[18]=aE,t$[19]=aC,t$[20]=C):C=t$[20];let a5=C;t$[21]!==ad||t$[22]!==ak||t$[23]!==av?(v=!(0,b.z$)()&&(ad&&ak||!ad&&av),t$[21]=ad,t$[22]=ak,t$[23]=av,t$[24]=v):v=t$[24];let a3=v,a6=au||aX||aM||ah||a_||a0||a1||ag||aq||a2||aA||ay||a5||a3,a8=aQ||a6,a7=!!(0,G.d4)(_temp9),a9=!!(0,G.d4)(_temp0),ne=!ac&&a9,nt=!!(0,G.d4)(_temp1),na=(0,G.d4)(_temp10)===ee.ze.PERSISTENT_MOBILE_PROMO,nn=(0,G.d4)(to),nr=(0,G.d4)(ts),ni=(0,G.d4)(_temp11),nl=ni?.signedInMobileOtherTeam;t$[25]!==tQ||t$[26]!==na?(I=()=>{na&&tQ(tu())},T=[tQ,na],t$[25]=tQ,t$[26]=na,t$[27]=I,t$[28]=T):(I=t$[27],T=t$[28]),(0,i.useEffect)(I,T);let no=(0,G.d4)(_temp12)===ee.ze.STRAIGHT_TO_PAID_WORKSPACE_MENU_PRIMARY_TIME_LIMIT;t$[29]!==tQ?(M=()=>{tQ((0,e4.A)())},t$[29]=tQ,t$[30]=M):M=t$[30];let ns=M;t$[31]!==tQ?(D=()=>{tQ((0,e2.A)({source:e$.K3.TeamMenu}))},t$[31]=tQ,t$[32]=D):D=t$[32];let nc=D;t$[33]!==tQ?(F=()=>{tQ((0,tn.O)())},t$[33]=tQ,t$[34]=F):F=t$[34];let nd=F;t$[35]!==nd||t$[36]!==tQ?(U=(e,t,a)=>()=>{tQ((0,eg.q)({element:i.createElement(k.A,{adminRoute:e,closeModal:nd,title:t,workspaceIds:a})}))},t$[35]=nd,t$[36]=tQ,t$[37]=U):U=t$[37];let nm=U,nu=ad?nm:m.A;t$[38]!==at||t$[39]!==ad?(B=e=>ad?void 0:`${at}${e}`,t$[38]=at,t$[39]=ad,t$[40]=B):B=t$[40];let np=B;t$[41]!==at||t$[42]!==aW||t$[43]!==aH?(H=`${at}manage/analytics`,aW&&!aH&&(H=`${H}/canvas`),t$[41]=at,t$[42]=aW,t$[43]=aH,t$[44]=H):H=t$[44],t$[45]!==at||t$[46]!==ac?(W=()=>ac?`${at}manage/integrations?utm_source=in-prod&utm_medium=inprod-apps_link-slack_menu-click`:`${at}apps/manage?utm_source=in-prod&utm_medium=inprod-apps_link-slack_menu-click`,t$[45]=at,t$[46]=ac,t$[47]=W):W=t$[47];let nh=W;t$[48]!==tQ?(q=tQ((0,e1.r)()),t$[48]=tQ,t$[49]=q):q=t$[49];let{shouldLeaveChannelsMenuBeInactive:n_}=q;e:{if(n_){let e;t$[50]===Symbol.for("react.memo_cache_sentinel")?(e=t_.t("Looking fresh! No new recommendations."),t$[50]=e):e=t$[50],j=e;break e}j=void 0}let nf=j;t:{let e,t,a,n,r,i,l,o,s,c,d,m,u,h,_;if(!aZ&&!am&&!aG&&!aB){z=p.Ml;break t}if(t$[51]!==aT||t$[52]!==aN||t$[53]!==nu||t$[54]!==aZ){let n=t_.t("Customize workspace");e=n,t=aZ,a=nu("customize?utm_source=in-prod&utm_medium=inprod-customize_link-slack_menu-click",n,[...aT,...aN]),t$[51]=aT,t$[52]=aN,t$[53]=nu,t$[54]=aZ,t$[55]=e,t$[56]=t,t$[57]=a}else e=t$[55],t=t$[56],a=t$[57];t$[58]!==np?(n=np("customize?utm_source=in-prod&utm_medium=inprod-customize_link-slack_menu-click"),t$[58]=np,t$[59]=n):n=t$[59],t$[60]!==e||t$[61]!==t||t$[62]!==a||t$[63]!==n?(r={label:e,show:t,click:a,href:n,key:"customize-workspace",showLinkIndicatorIcon:!1},t$[60]=e,t$[61]=t,t$[62]=a,t$[63]=n,t$[64]=r):r=t$[64],t$[65]!==tQ||t$[66]!==tJ?(i=()=>{tJ?tQ((0,eS.o)((0,eI.Hf)({tabId:eC.l.ManagedByYou}))):tQ((0,eS.o)((0,eI.x6)()))},t$[65]=tQ,t$[66]=tJ,t$[67]=i):i=t$[67],t$[68]===Symbol.for("react.memo_cache_sentinel")?(l=t_.t("Workflow Builder"),t$[68]=l):l=t$[68],t$[69]!==i||t$[70]!==am?(o={click:i,label:l,key:"launch-workflow-builder",showLinkIndicatorIcon:!1,show:am},t$[69]=i,t$[70]=am,t$[71]=o):o=t$[71],t$[72]===Symbol.for("react.memo_cache_sentinel")?(s=t_.t("Workspace analytics"),t$[72]=s):s=t$[72],t$[73]!==nu||t$[74]!==aV?(c=nu("stats",t_.t("Workspace analytics"),aV),t$[73]=nu,t$[74]=aV,t$[75]=c):c=t$[75],t$[76]!==np?(d=np("stats"),t$[76]=np,t$[77]=d):d=t$[77],t$[78]!==aG||t$[79]!==c||t$[80]!==d?(m={key:"workspace-analytics",label:s,click:c,href:d,show:aG},t$[78]=aG,t$[79]=c,t$[80]=d,t$[81]=m):m=t$[81],t$[82]===Symbol.for("react.memo_cache_sentinel")?(u=t_.t("Organization analytics"),t$[82]=u):u=t$[82];let f=`${H}`;t$[83]!==aB||t$[84]!==f?(h={key:"org-analytics",label:u,href:f,show:aB},t$[83]=aB,t$[84]=f,t$[85]=h):h=t$[85],t$[86]!==r||t$[87]!==o||t$[88]!==m||t$[89]!==h?(_=[r,o,m,h].filter(_temp13),t$[86]=r,t$[87]=o,t$[88]=m,t$[89]=h,t$[90]=_):_=t$[90],z=_}let nb=z;a:{let e,t,a,n,r,i,l,o,s,c,d,u,h,_,f,b,g,y,A,E,C,k,v,S,I,w,T,N,M,R,P,L,O,D,F,U,B,H,W,V,G,q,j,z,$,Y;if(!a8){K=p.Ml;break a}if(t5){let e;t$[91]===Symbol.for("react.memo_cache_sentinel")?(e=[{type:x.y.header,label:t_.t("Administration"),key:"administration"},{label:t_.t("Admin tools"),key:"open-admin-tools-menu",click:openAdminTools},{label:t_.t("Admin tools and settings have moved. You can now access them directly from the sidebar."),key:"admin-tools-wayfinder",className:"admin_tools_wayfinder",disabled:!0}],t$[91]=e):e=t$[91],K=e;break a}if(t$[92]!==ad||t$[93]!==nu||t$[94]!==ap){let n=t_.rt("Workspace settings");e=ad&&ap,t=n,a=nu("admin/settings",n),t$[92]=ad,t$[93]=nu,t$[94]=ap,t$[95]=e,t$[96]=t,t$[97]=a}else e=t$[95],t=t$[96],a=t$[97];t$[98]!==np?(n=np("admin/settings"),t$[98]=np,t$[99]=n):n=t$[99],t$[100]!==t||t$[101]!==a||t$[102]!==n||t$[103]!==a$?(r={label:t,click:a,href:n,key:"workspace-settings",showLinkIndicatorIcon:!1,show:a$},t$[100]=t,t$[101]=a,t$[102]=n,t$[103]=a$,t$[104]=r):r=t$[104],t$[105]===Symbol.for("react.memo_cache_sentinel")?(i=t_.t("Edit workspace details"),t$[105]=i):i=t$[105],t$[106]!==tQ?(l=()=>tQ((0,e5.A)()),t$[106]=tQ,t$[107]=l):l=t$[107],t$[108]!==aP||t$[109]!==l?(o={label:i,show:aP,click:l,key:"edit-workspace-details"},t$[108]=aP,t$[109]=l,t$[110]=o):o=t$[110],t$[111]!==ae?(s=t_.rt("Organization settings \u2013 {teamDisplayName}",{teamDisplayName:ae}),t$[111]=ae,t$[112]=s):s=t$[112];let Q=`${at}manage`;t$[113]!==e||t$[114]!==s||t$[115]!==Q?(c={label:s,href:Q,key:"organization-settings",showLinkIndicatorIcon:!1,show:e},t$[113]=e,t$[114]=s,t$[115]=Q,t$[116]=c):c=t$[116];let Z=a6&&(a$||aP||e);t$[117]!==Z?(d={type:x.y.separator,key:"settings-administration-separator",show:Z},t$[117]=Z,t$[118]=d):d=t$[118],t$[119]===Symbol.for("react.memo_cache_sentinel")?(u=t_.t("Administration"),t$[119]=u):u=t$[119],t$[120]!==a6?(h={type:x.y.header,label:u,key:"administration",show:a6},t$[120]=a6,t$[121]=h):h=t$[121],t$[122]===Symbol.for("react.memo_cache_sentinel")?(_=t_.t("Manage Salesforce Organizations"),t$[122]=_):_=t$[122];let J=ac?`${at}manage/salesforce/organizations`:`${at}admin/salesforce-organizations`;t$[123]!==a5||t$[124]!==J?(f={label:_,href:J,key:"manage-salesforce-organizations",showLinkIndicatorIcon:!1,show:a5},t$[123]=a5,t$[124]=J,t$[125]=f):f=t$[125],t$[126]===Symbol.for("react.memo_cache_sentinel")?(b=t_.t("Manage Agentforce"),t$[126]=b):b=t$[126];let X=ac?`${at}manage/salesforce/agentforce`:`${at}admin/agentforce`;t$[127]!==a3||t$[128]!==X?(g={label:b,href:X,key:"manage-agentforce",showLinkIndicatorIcon:!1,show:a3},t$[127]=a3,t$[128]=X,t$[129]=g):g=t$[129],t$[130]===Symbol.for("react.memo_cache_sentinel")?(y=t_.t("Manage Slack Connect Invitations"),t$[130]=y):y=t$[130];let ee=ac&&ar?`${at}manage/slack-connect/requests-pending-invites`:`${aw}admin/slack-connect-invitations`;t$[131]!==au||t$[132]!==ee?(A={label:y,show:au,href:ee,key:"manage-slack-connect-invitations",dataQa:"main_menu_settings_submenu_manage_slack_connect_invitations",showLinkIndicatorIcon:!1},t$[131]=au,t$[132]=ee,t$[133]=A):A=t$[133],t$[134]===Symbol.for("react.memo_cache_sentinel")?(E=t_.rt("Manage members"),t$[134]=E):E=t$[134],t$[135]!==tZ||t$[136]!==nu?(C=nu("admin",tZ?t_.rt("Manage workspace members"):t_.rt("Manage members")),t$[135]=tZ,t$[136]=nu,t$[137]=C):C=t$[137],t$[138]!==np?(k=np("admin"),t$[138]=np,t$[139]=k):k=t$[139],t$[140]!==C||t$[141]!==k||t$[142]!==a$?(v={label:E,click:C,href:k,key:"manage-members",showLinkIndicatorIcon:!1,show:a$},t$[140]=C,t$[141]=k,t$[142]=a$,t$[143]=v):v=t$[143],t$[144]!==tZ?(S=tZ?t_.rt("Manage roles"):t_.rt("Manage Roles"),t$[144]=tZ,t$[145]=S):S=t$[145],t$[146]!==tZ||t$[147]!==nu?(I=nu("admin/roles",tZ?t_.rt("Manage workspace roles"):t_.rt("Manage Roles")),t$[146]=tZ,t$[147]=nu,t$[148]=I):I=t$[148],t$[149]!==np?(w=np("admin/roles"),t$[149]=np,t$[150]=w):w=t$[150],t$[151]!==a_||t$[152]!==S||t$[153]!==I||t$[154]!==w?(T={label:S,click:I,href:w,key:"manage-roles",showLinkIndicatorIcon:!1,show:a_},t$[151]=a_,t$[152]=S,t$[153]=I,t$[154]=w,t$[155]=T):T=t$[155],t$[156]===Symbol.for("react.memo_cache_sentinel")?(N=t_.rt("Manage apps"),t$[156]=N):N=t$[156];let et=nh();t$[157]!==aX||t$[158]!==et?(M={label:N,click:m.A,href:et,key:"manage-apps",showLinkIndicatorIcon:!1,show:aX},t$[157]=aX,t$[158]=et,t$[159]=M):M=t$[159],t$[160]===Symbol.for("react.memo_cache_sentinel")?(R=t_.rt("Manage workflows"),t$[160]=R):R=t$[160];let ea=ac?`${at}manage/integrations/workflows`:`${aR}integrations/workflows`;t$[161]!==aq||t$[162]!==ea?(P={label:R,href:ea,key:"manage-workflows",showLinkIndicatorIcon:!1,show:aq},t$[161]=aq,t$[162]=ea,t$[163]=P):P=t$[163],t$[164]===Symbol.for("react.memo_cache_sentinel")?(L=t_.rt("Manage legal holds"),t$[164]=L):L=t$[164];let en=`${at}manage/security/legal-holds`;t$[165]!==aA||t$[166]!==en?(O={label:L,href:en,key:"manage-legal-holds",showLinkIndicatorIcon:!1,show:aA},t$[165]=aA,t$[166]=en,t$[167]=O):O=t$[167],t$[168]===Symbol.for("react.memo_cache_sentinel")?(D=t_.t("Manage exports"),t$[168]=D):D=t$[168];let er=`${at}manage/security/exports`;t$[169]!==a0||t$[170]!==er?(F={label:D,href:er,key:"manage-exports-admin",showLinkIndicatorIcon:!1,show:a0},t$[169]=a0,t$[170]=er,t$[171]=F):F=t$[171],t$[172]===Symbol.for("react.memo_cache_sentinel")?(U=t_.t("Manage security"),t$[172]=U):U=t$[172];let ei=`${at}manage/security`;t$[173]!==a1||t$[174]!==ei?(B={label:U,href:ei,key:"manage-security-admin",showLinkIndicatorIcon:!1,show:a1},t$[173]=a1,t$[174]=ei,t$[175]=B):B=t$[175],t$[176]!==tX?(H=tX?t_.t("Manage Audit Logs"):"",t$[176]=tX,t$[177]=H):H=t$[177];let el=ac?`${at}manage/security/audit-logs`:`${at}admin/audit_logs`;t$[178]!==a2||t$[179]!==H||t$[180]!==el?(W={label:H,href:el,key:"manage-audit-logs-admin",showLinkIndicatorIcon:!1,show:a2},t$[178]=a2,t$[179]=H,t$[180]=el,t$[181]=W):W=t$[181],t$[182]===Symbol.for("react.memo_cache_sentinel")?(V=t_.t("Manage DLP"),t$[182]=V):V=t$[182];let eo=`${at}manage/security/dlp`;t$[183]!==ay||t$[184]!==eo?(G={label:V,href:eo,key:"manage-dlp-admin",showLinkIndicatorIcon:!1,show:ay},t$[183]=ay,t$[184]=eo,t$[185]=G):G=t$[185],t$[186]===Symbol.for("react.memo_cache_sentinel")?(q=t_.t("Manage content"),t$[186]=q):q=t$[186];let es=`${at}manage/security/flagged-content`;t$[187]!==ag||t$[188]!==es?(j={label:q,href:es,key:"manage-content-admin",showLinkIndicatorIcon:!1,show:ag},t$[187]=ag,t$[188]=es,t$[189]=j):j=t$[189],t$[190]===Symbol.for("react.memo_cache_sentinel")?(z=t_.rt("Billing"),t$[190]=z):z=t$[190];let ec=ac?`${at}manage/billing`:`${at}admin/billing`;t$[191]!==aM||t$[192]!==ec?($={label:z,href:ec,key:"billing",showLinkIndicatorIcon:!1,show:aM},t$[191]=aM,t$[192]=ec,t$[193]=$):$=t$[193],t$[194]!==r||t$[195]!==o||t$[196]!==c||t$[197]!==d||t$[198]!==h||t$[199]!==f||t$[200]!==g||t$[201]!==A||t$[202]!==v||t$[203]!==T||t$[204]!==M||t$[205]!==P||t$[206]!==O||t$[207]!==F||t$[208]!==B||t$[209]!==W||t$[210]!==G||t$[211]!==j||t$[212]!==$?(Y=[r,o,c,d,h,f,g,A,v,T,M,P,O,F,B,W,G,j,$],t$[194]=r,t$[195]=o,t$[196]=c,t$[197]=d,t$[198]=h,t$[199]=f,t$[200]=g,t$[201]=A,t$[202]=v,t$[203]=T,t$[204]=M,t$[205]=P,t$[206]=O,t$[207]=F,t$[208]=B,t$[209]=W,t$[210]=G,t$[211]=j,t$[212]=$,t$[213]=Y):Y=t$[213],K=Y}let ng=K;t$[214]!==at||t$[215]!==na?($=()=>[{type:x.y.custom,ariaHidden:!1,children:i.createElement(J,{key:"open-desktop-app",showMobileEntryPoint:na,teamUrl:at}),show:!(0,_.y3)()&&!s().chromeBook,key:"open-desktop-app"}],t$[214]=at,t$[215]=na,t$[216]=$):$=t$[216];let ny=$,nA=_temp14;t$[217]!==t6||t$[218]!==ae?(Y=()=>{let e=(0,u.F)();return[{type:x.y.custom,ariaHidden:!1,children:i.createElement(ex,{key:"qr-code-signin-mobile",teamDisplayName:ae}),show:e.getEnvironmentVariantForTeamOrEnterpriseId(t6)!==h.j.GOV,key:"qr-code-signin-mobile"}]},t$[217]=t6,t$[218]=ae,t$[219]=Y):Y=t$[219];let nx=Y,nE=_temp15,nC=_temp16;t$[220]!==tQ?(Q=e=>{tQ((0,e6.UG)({peopleFilter:{type:e}}))},t$[220]=tQ,t$[221]=Q):Q=t$[221];let nk=Q;t$[222]===Symbol.for("react.memo_cache_sentinel")?(Z=[te.E7.All,te.E7.Internal,te.E7.External],t$[222]=Z):Z=t$[222];let nv=Z;t$[223]!==nk||t$[224]!==aL?.type?(et=()=>{let e=aL?.type;return nv.map(t=>({label:nC(t),type:x.y.checkbox,click:()=>nk(t),checked:!e&&t===te.E7.All||e===t,autoClogProps:{onClick:{enableClogAction:!0},eventId:nE(t)}}))},t$[223]=nk,t$[224]=aL?.type,t$[225]=et):et=t$[225];let nS=et;t$[226]!==tQ?(ea=e=>{tQ((0,eX.AZ)({pref:"sidebar_behavior",value:e}))},t$[226]=tQ,t$[227]=ea):ea=t$[227];let nI=ea;t$[228]===Symbol.for("react.memo_cache_sentinel")?(en=[P.UN,P.nU,P.Ao,P.eF],t$[228]=en):en=t$[228];let nw=en;t$[229]!==nI||t$[230]!==aO?(er=()=>[...nw.map(e=>({label:(0,R.F)(void 0,e),type:x.y.checkbox,click:()=>nI(e),checked:!aO&&e===P.UN||aO===e,autoClogProps:{onClick:{enableClogAction:!0},eventId:nE(e)}}))],t$[229]=nI,t$[230]=aO,t$[231]=er):er=t$[231];let nT=er;t$[232]!==tQ?(ei=e=>{tQ((0,eX.AZ)({pref:"workspace_filter_selected",value:e.key}))},t$[232]=tQ,t$[233]=ei):ei=t$[233];let nN=ei;t$[234]!==tQ?(el=()=>{tQ((0,eg.q)({element:i.createElement(ef.S,null),isStackable:!0}))},t$[234]=tQ,t$[235]=el):el=t$[235];let nM=el;t$[236]!==t3||t$[237]!==aD.length?(es=(0,w.n)({label:t_.t("All {numberOfWorkspaces} workspaces",{numberOfWorkspaces:aD.length}),key:te.MR.All,icon:(0,eM.Rf)(t3)??void 0}),t$[236]=t3,t$[237]=aD.length,t$[238]=es):es=t$[238];let nR=es;if(t$[239]!==nR||t$[240]!==aD){let e=[nR,...aD.map(_temp17)];ec={workspacesMenuItems:e,workspacesMenuItemsByKey:e.reduce(_temp18,{})},t$[239]=nR,t$[240]=aD,t$[241]=ec}else ec=t$[241];let{workspacesMenuItems:nP,workspacesMenuItemsByKey:nL}=ec;t$[242]!==aF?(ed=aF?workspaceFilterToMenuItemKey(aF):void 0,t$[242]=aF,t$[243]=ed):ed=t$[243];let nO=ed,nD=nO?nL[nO]:void 0;t$[244]!==nR||t$[245]!==nD||t$[246]!==nO?(em=nD?{selectedKey:nO}:{selectedKey:nR.key},t$[244]=nR,t$[245]=nD,t$[246]=nO,t$[247]=em):em=t$[247];let{selectedKey:nF}=em;t$[248]!==nN||t$[249]!==nF?(eu=e=>({type:x.y.checkbox,checked:e.key===nF,key:e.key,click:()=>nN(e),className:"p-workspace_filter_menu__item_container",classNameListItem:"p-workspace_filter_menu__item_label",ariaRole:"menuitemradio",children:i.createElement(N.A,{teamId:isWorkspaceMenuItem(e)?e.key:void 0,label:e.meta.label,description:isWorkspaceMenuItem(e)?e.meta.description:void 0,icon:makeMenuItemIcon(e),itemKey:e.key,key:e.key})}),t$[248]=nN,t$[249]=nF,t$[250]=eu):eu=t$[250];let nU=eu;if(t$[251]!==nU||t$[252]!==nM||t$[253]!==nP){let e,t,a,n;t$[255]!==nU?(e=e=>nU(e),t$[255]=nU,t$[256]=e):e=t$[256];let r=nP.map(e);t$[257]===Symbol.for("react.memo_cache_sentinel")?(t={type:x.y.separator,key:"separator"},t$[257]=t):t=t$[257],t$[258]===Symbol.for("react.memo_cache_sentinel")?(a=t_.t("Edit and reorder workspaces"),t$[258]=a):a=t$[258],t$[259]!==nM?(n={type:x.y.default,key:"edit-or-reorder",label:a,click:()=>nM()},t$[259]=nM,t$[260]=n):n=t$[260],ep=[...r,t,n],t$[251]=nU,t$[252]=nM,t$[253]=nP,t$[254]=ep}else ep=t$[254];let nB=ep;t$[261]===Symbol.for("react.memo_cache_sentinel")?(eh=t_.rt("Activity"),t$[261]=eh):eh=t$[261],t$[262]!==nT?(eb=nT(),t$[262]=nT,t$[263]=eb):eb=t$[263],t$[264]!==t0||t$[265]!==eb?(ey={type:x.y.submenu,label:eh,key:"filter-activity",show:t0,template:eb},t$[264]=t0,t$[265]=eb,t$[266]=ey):ey=t$[266],t$[267]!==t0?(eA=t0?t_.rt("People"):"",t$[267]=t0,t$[268]=eA):eA=t$[268],t$[269]!==nS?(ev=nS(),t$[269]=nS,t$[270]=ev):ev=t$[270],t$[271]!==t0||t$[272]!==eA||t$[273]!==ev?(eJ={type:x.y.submenu,label:eA,key:"filter-people",show:t0,template:ev},t$[271]=t0,t$[272]=eA,t$[273]=ev,t$[274]=eJ):eJ=t$[274],t$[275]!==ey||t$[276]!==eJ?(e7=[ey,eJ].filter(_temp19),t$[275]=ey,t$[276]=eJ,t$[277]=e7):e7=t$[277];let nH=e7,nW=aj;nb.length&&!ng.length&&(nW=az),!nb.length&&ng.length&&(nW=aK),t$[278]!==aP||t$[279]!==aa||t$[280]!==tQ||t$[281]!==t1||t$[282]!==ac||t$[283]!==nB?(tt=t1&&ac?{type:x.y.submenu,label:i.createElement(L.A,{ariaDescribedById:"team-blurb-text",customSubtitle:aa,isMenuItem:aP}),key:"workspace-switcher",template:nB}:{children:i.createElement(L.A,{className:"padding_left_150",key:"team-blurb-menu-item",isMenuItem:aP,ariaDescribedById:"team-blurb-text"}),type:aP?void 0:x.y.custom,key:"team-blurb-menu-item",click:()=>aP?tQ((0,e5.A)()):void 0},t$[278]=aP,t$[279]=aa,t$[280]=tQ,t$[281]=t1,t$[282]=ac,t$[283]=nB,t$[284]=tt):tt=t$[284];let nV=tt;t$[285]!==nt?(ta={type:x.y.separator,key:"upsell-separator-top",show:nt},t$[285]=nt,t$[286]=ta):ta=t$[286],t$[287]===Symbol.for("react.memo_cache_sentinel")?(ti=i.createElement(X.s,{key:"workspace-menu-upsell",uiPage:V.UiPage.MAIN_MENU,notifications:tf,spaceName:ee.xu.WORKSPACE_MENU_UPSELL}),t$[287]=ti):ti=t$[287],t$[288]!==nt?(tl={type:x.y.custom,ariaHidden:!1,children:ti,key:"workspace-menu-upsell",show:nt},t$[288]=nt,t$[289]=tl):tl=t$[289],t$[290]===Symbol.for("react.memo_cache_sentinel")?(tc={type:x.y.separator,key:"primary-plan-info-separator-top"},t$[290]=tc):tc=t$[290],t$[291]===Symbol.for("react.memo_cache_sentinel")?(td=i.createElement(X.s,{key:"workspace-menu-primary-plan-info",...eo}),t$[291]=td):td=t$[291],t$[292]!==ne?(tm={type:x.y.custom,ariaHidden:!1,children:td,key:"workspace-menu-primary-plan-info",show:ne},t$[292]=ne,t$[293]=tm):tm=t$[293];let nG=ne&&!no;t$[294]!==nG?(tb={type:x.y.separator,key:"primary-plan-info-separator-bottom",show:nG},t$[294]=nG,t$[295]=tb):tb=t$[295],t$[296]===Symbol.for("react.memo_cache_sentinel")?(tg=i.createElement(X.s,{key:"workspace-menu-secondary-plan-info",...e_}),t$[296]=tg):tg=t$[296],t$[297]!==a7?(ty={type:x.y.custom,ariaHidden:!1,children:tg,key:"workspace-menu-secondary-plan-info",show:a7},tA={type:x.y.separator,key:"secondary-plan-info-separator-bottom",show:a7},t$[297]=a7,t$[298]=ty,t$[299]=tA):(ty=t$[298],tA=t$[299]),t$[300]!==ae?(tx=t_.rt("Invite people to {teamDisplayName}",{teamDisplayName:ae}),t$[300]=ae,t$[301]=tx):tx=t$[301],t$[302]===Symbol.for("react.memo_cache_sentinel")?(tE={elementName:"team_menu_invite_people",onClick:{enableClogAction:!0}},t$[302]=tE):tE=t$[302],t$[303]!==an||t$[304]!==nc||t$[305]!==tx?(tC={label:tx,click:nc,show:an,key:"invite-people",autoClogProps:tE},t$[303]=an,t$[304]=nc,t$[305]=tx,t$[306]=tC):tC=t$[306],t$[307]!==an?(tk={type:x.y.separator,show:an,key:"invite-people-separator"},t$[307]=an,t$[308]=tk):tk=t$[308],t$[309]===Symbol.for("react.memo_cache_sentinel")?(tv=t_.rt("Preferences"),t$[309]=tv):tv=t$[309],t$[310]===Symbol.for("react.memo_cache_sentinel")?(tS=(0,_.cX)()&&(0,_.y3)()&&"\u2318,",t$[310]=tS):tS=t$[310],t$[311]!==ns?(tI={label:tv,click:ns,shortcut:tS,key:"sidebar-preferences"},t$[311]=ns,t$[312]=tI):tI=t$[312],t$[313]!==t8?(tw=t8?t_.t("Prototype Simplified UI"):"Prototype Simplified UI",t$[313]=t8,t$[314]=tw):tw=t$[314],t$[315]!==t6||t$[316]!==t8?(tT=()=>{if(t6){let e=!t8;(0,eQ.$)(t6,e),(0,eZ.yQ)()}},t$[315]=t6,t$[316]=t8,t$[317]=tT):tT=t$[317],t$[318]!==t8||t$[319]!==t7||t$[320]!==tw||t$[321]!==tT?(tN={type:x.y.checkbox,label:tw,checked:t8,click:tT,show:t7,key:"toggle-duis"},t$[318]=t8,t$[319]=t7,t$[320]=tw,t$[321]=tT,t$[322]=tN):tN=t$[322],t$[323]!==t0?(tM=t0?t_.rt("Filter sidebar"):"",t$[323]=t0,t$[324]=tM):tM=t$[324];let nq=t0&&!t2;t$[325]!==nH?(tR=[...nH],t$[325]=nH,t$[326]=tR):tR=t$[326],t$[327]!==tM||t$[328]!==nq||t$[329]!==tR?(tP={type:x.y.submenu,label:tM,key:"filter-sidebar",show:nq,template:tR},t$[327]=tM,t$[328]=nq,t$[329]=tR,t$[330]=tP):tP=t$[330];let nj=nW,nz=nb.length>0||ng.length>0;t$[331]===Symbol.for("react.memo_cache_sentinel")?(tL=t_.rt("Tools"),t$[331]=tL):tL=t$[331];let nK=nb.length>0&&ng.length>0;t$[332]!==nK?(tO={type:x.y.header,label:tL,show:nK,key:"tools-header"},t$[332]=nK,t$[333]=tO):tO=t$[333];let n$=nb.length>0&&ng.length>0;t$[334]!==n$?(tD={type:x.y.separator,show:n$,key:"tools-bottom-separator"},t$[334]=n$,t$[335]=tD):tD=t$[335],t$[336]===Symbol.for("react.memo_cache_sentinel")?(tF=t_.rt("Settings"),t$[336]=tF):tF=t$[336];let nY=aQ&&ng.length>0;t$[337]!==nY?(tU={type:x.y.header,label:tF,show:nY,key:"settings-header"},t$[337]=nY,t$[338]=tU):tU=t$[338],t$[339]!==ng?(tB=ng.length>0?ng:[],t$[339]=ng,t$[340]=tB):tB=t$[340],t$[341]!==tO||t$[342]!==tD||t$[343]!==tU||t$[344]!==tB||t$[345]!==nb?(tH=[tO,...nb,tD,tU,...tB].filter(_temp20),t$[341]=tO,t$[342]=tD,t$[343]=tU,t$[344]=tB,t$[345]=nb,t$[346]=tH):tH=t$[346],t$[347]!==nz||t$[348]!==tH||t$[349]!==nW?(tW={label:nj,type:x.y.submenu,show:nz,key:"tools-and-settings-submenu",template:tH},t$[347]=nz,t$[348]=tH,t$[349]=nW,t$[350]=tW):tW=t$[350],t$[351]===Symbol.for("react.memo_cache_sentinel")?(tV=t_.t("Leave channels"),t$[351]=tV):tV=t$[351];let nQ=!t2;if(t$[352]!==tQ||t$[353]!==n_?(tG=()=>{n_||tQ((0,eg.q)({element:i.createElement(ek.n,null)}))},t$[352]=tQ,t$[353]=n_,t$[354]=tG):tG=t$[354],t$[355]!==nf||t$[356]!==n_||t$[357]!==nQ||t$[358]!==tG?(tq={key:"organize-sidebar",label:tV,description:nf,disabled:n_,show:nQ,click:tG},t$[355]=nf,t$[356]=n_,t$[357]=nQ,t$[358]=tG,t$[359]=tq):tq=t$[359],t$[360]!==t6||t$[361]!==at||t$[362]!==ny||t$[363]!==tQ||t$[364]!==t4||t$[365]!==nV||t$[366]!==nn||t$[367]!==nr||t$[368]!==nx||t$[369]!==na||t$[370]!==nl||t$[371]!==ta||t$[372]!==tl||t$[373]!==tm||t$[374]!==tb||t$[375]!==ty||t$[376]!==tA||t$[377]!==tC||t$[378]!==tk||t$[379]!==tI||t$[380]!==tN||t$[381]!==tP||t$[382]!==tW||t$[383]!==tq||t$[384]!==ae||t$[385]!==ac){let e,t,a,n,r=[nV,ta,tl,tc,tm,tb,ty,tA,tC,tk,tI,tN,tP,tW,tq];t$[387]===Symbol.for("react.memo_cache_sentinel")?(e=t_.rt("Sign out"),t$[387]=e):e=t$[387],t$[388]!==t6||t$[389]!==tQ||t$[390]!==t4||t$[391]!==ae||t$[392]!==ac?(t={label:e,key:"sign-out",shortcut:"",click:()=>{t4&&!ac?t6&&ae&&tQ((0,eg.q)({element:i.createElement(O.j,null)})):(0,e3.dispatchForClientStore)((0,th.H)?.({teamId:t6}))}},t$[388]=t6,t$[389]=tQ,t$[390]=t4,t$[391]=ae,t$[392]=ac,t$[393]=t):t=t$[393];let l=t;t$[394]===Symbol.for("react.memo_cache_sentinel")?(a=t_.rt("Join or leave workspaces"),t$[394]=a):a=t$[394],t$[395]!==at||t$[396]!==ac?(n={label:a,show:ac,key:"join-leave-workspaces",href:at,click:_temp21},t$[395]=at,t$[396]=ac,t$[397]=n):n=t$[397];let o=n;if(na){let e,t,a,n=!1,i=!0;if(nn&&nl&&(n=!0,i=!1),nr&&nl&&(n=!0,i=!0),t$[398]===Symbol.for("react.memo_cache_sentinel")?(e={type:x.y.separator,show:!0,key:"native-apps-separator"},t$[398]=e):e=t$[398],t$[399]!==ny?(t=ny(),t$[399]=ny,t$[400]=t):t=t$[400],r.push(e,...t),n){let e;t$[401]!==nx?(e=nx(),t$[401]=nx,t$[402]=e):e=t$[402],r.push(...e)}if(i){let e;t$[403]===Symbol.for("react.memo_cache_sentinel")?(e=nA(),t$[403]=e):e=t$[403],r.push(...e)}t$[404]===Symbol.for("react.memo_cache_sentinel")?(a={type:x.y.separator,show:!0,key:"sign-out-separator"},t$[404]=a):a=t$[404],r.push(a,o,l)}else{let e,t,a;t$[405]===Symbol.for("react.memo_cache_sentinel")?(e={type:x.y.separator,key:"workspace-tools-separator",show:!0},t$[405]=e):e=t$[405],t$[406]!==nx?(t=nx(),t$[406]=nx,t$[407]=t):t=t$[407],t$[408]!==ny?(a=ny(),t$[408]=ny,t$[409]=a):a=t$[409],r.push(e,...t,o,l,...a)}tj=r.filter(_temp22),t$[360]=t6,t$[361]=at,t$[362]=ny,t$[363]=tQ,t$[364]=t4,t$[365]=nV,t$[366]=nn,t$[367]=nr,t$[368]=nx,t$[369]=na,t$[370]=nl,t$[371]=ta,t$[372]=tl,t$[373]=tm,t$[374]=tb,t$[375]=ty,t$[376]=tA,t$[377]=tC,t$[378]=tk,t$[379]=tI,t$[380]=tN,t$[381]=tP,t$[382]=tW,t$[383]=tq,t$[384]=ae,t$[385]=ac,t$[386]=tj}else tj=t$[386];let nZ=tj;if(t$[410]!==nZ||t$[411]!==tY||t$[412]!==ae){let e,t;t$[414]!==ae?(e=t_.t("{teamDisplayName} Actions",{teamDisplayName:ae}),t$[414]=ae,t$[415]=e):e=t$[415],t$[416]!==nZ||t$[417]!==tY||t$[418]!==e?(t={...tY,menuClassNames:"p-ia4_home_header_menu__menu","aria-label":e,template:nZ},t$[416]=nZ,t$[417]=tY,t$[418]=e,t$[419]=t):t=t$[419],tK=i.createElement(A.a,t),t$[410]=nZ,t$[411]=tY,t$[412]=ae,t$[413]=tK}else tK=t$[413];return tK}:({menuProps:e})=>{let t=(0,l.wA)(),a=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"ia4_admin_and_settings_translations")),n=(0,G.d4)(eE.tb),r=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"audit_logs_client")),o=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"filter_conversations_menu_updates")),c=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"workspace_switcher_improvements")),d=(0,G.d4)(e0.Z_),f=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"deactivate_account_desktop")),y=(0,G.d4)(tr.AV),E=(0,G.d4)(tp.H7),C=(0,eM.ZT)(E)??void 0,v=(0,G.d4)(eY.hi),I=(0,G.d4)(eY.O6),{currentTeamName:M}=(0,S.k)(),D=M??(0,eM.F1)(E),F=(0,eM.Zl)(E),U=(0,eM.Zl)(E,"",!0),B=(0,G.d4)(eT.Lz),H=(0,G.d4)(eH.W),W=(0,G.d4)(eG.PY),q=(0,G.Z2)(eD.Fm),j=(0,G.d4)(eG.p2),z=(0,G.d4)(eq.k),K=(0,eR.r7)(E),$=(0,g.JV)(C),Y=(0,G.d4)(eK.t_),Q=(0,G.d4)(eN.U),Z=(0,G.d4)(eP.A7),ea=(0,G.d4)(eO.U),en=(0,G.d4)(ez.IF),er=(0,G.d4)(ew.h),ei=(0,G.d4)(eP.xk),el=(0,G.d4)(eP.zi),es=(0,G.d4)(eP.p4),ec=(0,G.d4)(eP.zd),ed=(0,G.d4)(eL.S),em=(0,G.d4)(eP.oM),eu=(0,G.d4)(eP.Ak),ep=(0,G.d4)(eP.w5),eh=(0,G.d4)(eP.e_),eb=(0,eM.qR)(E),ey=(0,G.d4)(e=>(0,eJ.ty)(e,"purchaser")),eA=(0,G.d4)(eM.FH),e7=(0,G.d4)(eF.N),ti=(0,G.d4)(eB.g),tl=eb&&(j||ey),tc=K?W:tl,td=`https://app.${(0,eM.S5)(E)}/apps-manage/${E?.id}/`,tm=j&&!K,tb=(0,G.d4)(e8.ce),tg=(0,G.d4)(e=>(0,eJ.ty)(e,"sidebar_behavior")),ty=(0,G.d4)(tp.FR),tA=(0,G.wz)(e9.U),tx=(0,G.d4)(ej.sV),tE=(0,G.d4)(eP.B9),tC=(0,G.d4)(eP.wF),tk=(0,G.d4)(eP.lN),tv=(0,G.Z2)(eU.P),tS=tv.length>0,tI=(0,G.d4)(eV._),tw=t_.rt("Tools & settings"),tT=t_.rt("Tools"),tN=t_.rt("Settings"),tM=q.length>0,tR=K&&Z,tP=!y&&(tM||tR),tL=!y&&!tx&&(tM||e7.length>0||ti.length>0),tO=(0,G.d4)(eW.M),tD=$?tO:z,tF=$&&er,tU=$&&ei,tB=r&&ed,tH=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"sfdc_seamless_auth_govcloud")),tW=(!(0,b.z$)()||tH)&&($&&em||!$&&eu),tV=!(0,b.z$)()&&($&&ep||!$&&eh),tG=Q||tD||tc||ea||en||tF||tU||el||tI||tB||ec||es||tW||tV,tq=tP||tG,tj=!!(0,G.d4)(e=>(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_SECONDARY_PLAN_INFO)),tK=!!(0,G.d4)(e=>(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_PRIMARY_PLAN_INFO)),t$=!K&&tK,tY=!!(0,G.d4)(e=>(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_UPSELL)&&!(0,ev.Z9F)()),tQ=(0,G.d4)(e=>(0,ta.Hp)(e,ee.xu.MAIN_MENU))===ee.ze.PERSISTENT_MOBILE_PROMO,tZ=(0,G.d4)(to),tJ=(0,G.d4)(ts),tX=(0,G.d4)(e=>(0,ta.OL)(e,ee.xu.MAIN_MENU)),t0=tX?.signedInMobileOtherTeam;(0,i.useEffect)(()=>{tQ&&t(tu())},[t,tQ]);let t1=(0,G.d4)(e=>(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_PRIMARY_PLAN_INFO))===ee.ze.STRAIGHT_TO_PAID_WORKSPACE_MENU_PRIMARY_TIME_LIMIT,t2=(0,i.useCallback)(()=>{t((0,e4.A)())},[t]),t4=(0,i.useCallback)(()=>{t((0,e2.A)({source:e$.K3.TeamMenu}))},[t]),t5=(0,i.useCallback)(()=>{t((0,tn.O)())},[t]),t3=(0,i.useCallback)((e,a,n)=>()=>{t((0,eg.q)({element:i.createElement(k.A,{adminRoute:e,closeModal:t5,title:a,workspaceIds:n})}))},[t5,t]),t6=$?t3:m.A,t8=(0,i.useCallback)(e=>$?void 0:`${F}${e}`,[F,$]),t7=`${F}manage/analytics`;tk&&!tC&&(t7=`${t7}/canvas`);let t9="customize?utm_source=in-prod&utm_medium=inprod-customize_link-slack_menu-click",ae=(0,i.useCallback)(()=>K?`${F}manage/integrations?utm_source=in-prod&utm_medium=inprod-apps_link-slack_menu-click`:`${F}apps/manage?utm_source=in-prod&utm_medium=inprod-apps_link-slack_menu-click`,[F,K]),{shouldLeaveChannelsMenuBeInactive:at}=t((0,e1.r)()),aa=(0,i.useMemo)(()=>{if(at)return t_.t("Looking fresh! No new recommendations.")},[at]),an=(0,i.useMemo)(()=>{if(!tL&&!Y&&!tS&&!tE)return p.Ml;let e=t_.t("Customize workspace");return[{label:e,show:tL,click:t6(t9,e,[...e7,...ti]),href:t8(t9),key:"customize-workspace",showLinkIndicatorIcon:!1},{click:()=>{n?t((0,eS.o)((0,eI.Hf)({tabId:eC.l.ManagedByYou}))):t((0,eS.o)((0,eI.x6)()))},label:t_.t("Workflow Builder"),key:"launch-workflow-builder",showLinkIndicatorIcon:!1,show:Y},{key:"workspace-analytics",label:t_.t("Workspace analytics"),click:t6("stats",t_.t("Workspace analytics"),tv),href:t8("stats"),show:tS},{key:"org-analytics",label:t_.t("Organization analytics"),href:`${t7}`,show:tE}].filter(e=>!("show"in e)||!1!==e.show)},[tL,Y,tS,tE,t6,e7,ti,t8,tv,t7,n,t]),ar=(0,i.useMemo)(()=>{if(!tq)return p.Ml;if(y)return[{type:x.y.header,label:t_.t("Administration"),key:"administration"},{label:t_.t("Admin tools"),key:"open-admin-tools-menu",click:openAdminTools},{label:t_.t("Admin tools and settings have moved. You can now access them directly from the sidebar."),key:"admin-tools-wayfinder",className:"admin_tools_wayfinder",disabled:!0}];let e=t_.rt("Workspace settings"),n=$&&Z;return[{label:e,click:t6("admin/settings",e),href:t8("admin/settings"),key:"workspace-settings",showLinkIndicatorIcon:!1,show:tM},{label:t_.t("Edit workspace details"),show:tm,click:()=>t((0,e5.A)()),key:"edit-workspace-details"},{label:t_.rt("Organization settings \u2013 {teamDisplayName}",{teamDisplayName:D}),href:`${F}manage`,key:"organization-settings",showLinkIndicatorIcon:!1,show:n},{type:x.y.separator,key:"settings-administration-separator",show:tG&&(tM||tm||n)},{type:x.y.header,label:t_.t("Administration"),key:"administration",show:tG},{label:t_.t("Manage Salesforce Organizations"),href:K?`${F}manage/salesforce/organizations`:`${F}admin/salesforce-organizations`,key:"manage-salesforce-organizations",showLinkIndicatorIcon:!1,show:tW},{label:t_.t("Manage Agentforce"),href:K?`${F}manage/salesforce/agentforce`:`${F}admin/agentforce`,key:"manage-agentforce",showLinkIndicatorIcon:!1,show:tV},{label:t_.t("Manage Slack Connect Invitations"),show:Q,href:K&&H?`${F}manage/slack-connect/requests-pending-invites`:`${eA}admin/slack-connect-invitations`,key:"manage-slack-connect-invitations",dataQa:"main_menu_settings_submenu_manage_slack_connect_invitations",showLinkIndicatorIcon:!1},{label:t_.rt("Manage members"),click:t6("admin",a?t_.rt("Manage workspace members"):t_.rt("Manage members")),href:t8("admin"),key:"manage-members",showLinkIndicatorIcon:!1,show:tM},{label:a?t_.rt("Manage roles"):t_.rt("Manage Roles"),click:t6("admin/roles",a?t_.rt("Manage workspace roles"):t_.rt("Manage Roles")),href:t8("admin/roles"),key:"manage-roles",showLinkIndicatorIcon:!1,show:en},{label:t_.rt("Manage apps"),click:m.A,href:ae(),key:"manage-apps",showLinkIndicatorIcon:!1,show:tD},{label:t_.rt("Manage workflows"),href:K?`${F}manage/integrations/workflows`:`${td}integrations/workflows`,key:"manage-workflows",showLinkIndicatorIcon:!1,show:tI},{label:t_.rt("Manage legal holds"),href:`${F}manage/security/legal-holds`,key:"manage-legal-holds",showLinkIndicatorIcon:!1,show:ec},{label:t_.t("Manage exports"),href:`${F}manage/security/exports`,key:"manage-exports-admin",showLinkIndicatorIcon:!1,show:tF},{label:t_.t("Manage security"),href:`${F}manage/security`,key:"manage-security-admin",showLinkIndicatorIcon:!1,show:tU},{label:r?t_.t("Manage Audit Logs"):"",href:K?`${F}manage/security/audit-logs`:`${F}admin/audit_logs`,key:"manage-audit-logs-admin",showLinkIndicatorIcon:!1,show:tB},{label:t_.t("Manage DLP"),href:`${F}manage/security/dlp`,key:"manage-dlp-admin",showLinkIndicatorIcon:!1,show:es},{label:t_.t("Manage content"),href:`${F}manage/security/flagged-content`,key:"manage-content-admin",showLinkIndicatorIcon:!1,show:el},{label:t_.rt("Billing"),href:K?`${F}manage/billing`:`${F}admin/billing`,key:"billing",showLinkIndicatorIcon:!1,show:tc}]},[tq,y,t6,t8,tM,tm,D,F,$,Z,tG,K,tW,tV,Q,H,eA,a,en,ae,tD,td,tI,ec,tF,tU,r,tB,es,el,tc,t]),ai=(0,i.useCallback)(()=>{let e="open-desktop-app";return[{type:x.y.custom,ariaHidden:!1,children:i.createElement(J,{key:e,showMobileEntryPoint:tQ,teamUrl:F}),show:!(0,_.y3)()&&!s().chromeBook,key:e}]},[F,tQ]),al=(0,i.useCallback)(()=>{let e="get-mobile-app";return[{type:x.y.custom,ariaHidden:!1,children:i.createElement(X.A,{...et,key:e}),show:!0,key:e}]},[]),ao=(0,i.useCallback)(()=>{let e=(0,u.F)();return[{type:x.y.custom,ariaHidden:!1,children:i.createElement(ex,{key:"qr-code-signin-mobile",teamDisplayName:D}),show:e.getEnvironmentVariantForTeamOrEnterpriseId(C)!==h.j.GOV,key:"qr-code-signin-mobile"}]},[D,C]),getClogEventIdForEntry=e=>{switch(e){case P.UN:return V.EventId.HOME_FILTER_ALL_ACTIVITY;case P.nU:return V.EventId.HOME_FILTER_UNREADS_ONLY;case P.Ao:return V.EventId.HOME_FILTER_MENTIONS_ONLY;case P.eF:return V.EventId.HOME_FILTER_CUSTOM_BY_SECTION;case te.E7.All:return V.EventId.HOME_FILTER_EVERYONE;case te.E7.Internal:return V.EventId.HOME_FILTER_WITHOUT_EXTERNAL;case te.E7.External:return V.EventId.HOME_FILTER_INCLUDE_EXTERNAL;default:return V.EventId.UNKNOWN}},as=(0,i.useCallback)((e=te.E7.All)=>{let t=null;switch(e){case te.E7.Internal:t=t_.t("Without external people");break;case te.E7.External:t=t_.t("Including external people");break;default:t=t_.t("Everyone")}return t},[]),ac=(0,i.useCallback)(e=>{t((0,e6.UG)({peopleFilter:{type:e}}))},[t]),ad=(0,i.useMemo)(()=>[te.E7.All,te.E7.Internal,te.E7.External],[]),am=(0,i.useCallback)(()=>{let e=tb?.type;return ad.map(t=>({label:as(t),type:x.y.checkbox,click:()=>ac(t),checked:!e&&t===te.E7.All||e===t,autoClogProps:{onClick:{enableClogAction:!0},eventId:getClogEventIdForEntry(t)}}))},[as,ac,tb,ad]),au=(0,i.useCallback)(e=>{t((0,eX.AZ)({pref:"sidebar_behavior",value:e}))},[t]),ap=(0,i.useMemo)(()=>[P.UN,P.nU,P.Ao,P.eF],[]),ah=(0,i.useCallback)(()=>[...ap.map(e=>({label:(0,R.F)(void 0,e),type:x.y.checkbox,click:()=>au(e),checked:!tg&&e===P.UN||tg===e,autoClogProps:{onClick:{enableClogAction:!0},eventId:getClogEventIdForEntry(e)}}))],[au,tg,ap]),a_=(0,i.useCallback)(e=>{t((0,eX.AZ)({pref:"workspace_filter_selected",value:e.key}))},[t]),af=(0,i.useCallback)(()=>{t((0,eg.q)({element:i.createElement(ef.S,null),isStackable:!0}))},[t]),ab=(0,i.useMemo)(()=>(0,w.n)({label:t_.t("All {numberOfWorkspaces} workspaces",{numberOfWorkspaces:ty.length}),key:te.MR.All,icon:(0,eM.Rf)(E)??void 0}),[ty.length,E]),{workspacesMenuItems:ag,workspacesMenuItemsByKey:ay}=(0,i.useMemo)(()=>{let e=[ab,...ty.map(e=>(0,T.I)(e,te.SX.Internal))];return{workspacesMenuItems:e,workspacesMenuItemsByKey:e.reduce((e,t)=>(e[t.key]=t,e),{})}},[ab,ty]),{selectedKey:aA}=(0,i.useMemo)(()=>{let e=tA?workspaceFilterToMenuItemKey(tA):void 0;return(e?ay[e]:void 0)?{selectedKey:e}:{selectedKey:ab.key}},[tA,ay,ab]),ax=(0,i.useCallback)(e=>({type:x.y.checkbox,checked:e.key===aA,key:e.key,click:()=>a_(e),className:"p-workspace_filter_menu__item_container",classNameListItem:"p-workspace_filter_menu__item_label",ariaRole:"menuitemradio",children:i.createElement(N.A,{teamId:isWorkspaceMenuItem(e)?e.key:void 0,label:e.meta.label,description:isWorkspaceMenuItem(e)?e.meta.description:void 0,icon:makeMenuItemIcon(e),itemKey:e.key,key:e.key})}),[a_,aA]),aE=(0,i.useMemo)(()=>[...ag.map(e=>ax(e)),{type:x.y.separator,key:"separator"},{type:x.y.default,key:"edit-or-reorder",label:t_.t("Edit and reorder workspaces"),click:()=>af()}],[ag,ax,af]),aC=(0,i.useMemo)(()=>[{type:x.y.submenu,label:t_.rt("Activity"),key:"filter-activity",show:o,template:ah()},{type:x.y.submenu,label:o?t_.rt("People"):"",key:"filter-people",show:o,template:am()}].filter(e=>!("show"in e)||!1!==e.show),[o,ah,am]),ak=(0,i.useMemo)(()=>{let e=tw;an.length&&!ar.length&&(e=tT),!an.length&&ar.length&&(e=tN);let a=[c&&K?{type:x.y.submenu,label:i.createElement(L.A,{ariaDescribedById:"team-blurb-text",customSubtitle:U,isMenuItem:tm}),key:"workspace-switcher",template:aE}:{children:i.createElement(L.A,{className:"padding_left_150",key:"team-blurb-menu-item",isMenuItem:tm,ariaDescribedById:"team-blurb-text"}),type:tm?void 0:x.y.custom,key:"team-blurb-menu-item",click:()=>tm?t((0,e5.A)()):void 0},{type:x.y.separator,key:"upsell-separator-top",show:tY},{type:x.y.custom,ariaHidden:!1,children:i.createElement(X.s,{key:"workspace-menu-upsell",uiPage:V.UiPage.MAIN_MENU,notifications:tf,spaceName:ee.xu.WORKSPACE_MENU_UPSELL}),key:"workspace-menu-upsell",show:tY},{type:x.y.separator,key:"primary-plan-info-separator-top"},{type:x.y.custom,ariaHidden:!1,children:i.createElement(X.s,{key:"workspace-menu-primary-plan-info",...eo}),key:"workspace-menu-primary-plan-info",show:t$},{type:x.y.separator,key:"primary-plan-info-separator-bottom",show:t$&&!t1},{type:x.y.custom,ariaHidden:!1,children:i.createElement(X.s,{key:"workspace-menu-secondary-plan-info",...e_}),key:"workspace-menu-secondary-plan-info",show:tj},{type:x.y.separator,key:"secondary-plan-info-separator-bottom",show:tj},{label:t_.rt("Invite people to {teamDisplayName}",{teamDisplayName:D}),click:t4,show:B,key:"invite-people",autoClogProps:{elementName:"team_menu_invite_people",onClick:{enableClogAction:!0}}},{type:x.y.separator,show:B,key:"invite-people-separator"},{label:t_.rt("Preferences"),click:t2,shortcut:(0,_.cX)()&&(0,_.y3)()&&"\u2318,",key:"sidebar-preferences"},{type:x.y.checkbox,label:v?t_.t("Prototype Simplified UI"):"Prototype Simplified UI",checked:v,click:()=>{if(C){let e=!v;(0,eQ.$)(C,e),(0,eZ.yQ)()}},show:I,key:"toggle-duis"},{type:x.y.submenu,label:o?t_.rt("Filter sidebar"):"",key:"filter-sidebar",show:o&&!d,template:[...aC]},{label:e,type:x.y.submenu,show:an.length>0||ar.length>0,key:"tools-and-settings-submenu",template:[{type:x.y.header,label:t_.rt("Tools"),show:an.length>0&&ar.length>0,key:"tools-header"},...an,{type:x.y.separator,show:an.length>0&&ar.length>0,key:"tools-bottom-separator"},{type:x.y.header,label:t_.rt("Settings"),show:tP&&ar.length>0,key:"settings-header"},...ar.length>0?ar:[]].filter(e=>!("show"in e)||!1!==e.show)},{key:"organize-sidebar",label:t_.t("Leave channels"),description:aa,disabled:at,show:!d,click:()=>{at||t((0,eg.q)({element:i.createElement(ek.n,null)}))}}],n={label:t_.rt("Sign out"),key:"sign-out",shortcut:"",click:()=>{f&&!K?C&&D&&t((0,eg.q)({element:i.createElement(O.j,null)})):(0,e3.dispatchForClientStore)((0,th.H)?.({teamId:C}))}},r={label:t_.rt("Join or leave workspaces"),show:K,key:"join-leave-workspaces",href:F,click:()=>{}};if(tQ){let e=!1,t=!0;tZ&&t0&&(e=!0,t=!1),tJ&&t0&&(e=!0,t=!0),a.push({type:x.y.separator,show:!0,key:"native-apps-separator"},...ai()),e&&a.push(...ao()),t&&a.push(...al()),a.push({type:x.y.separator,show:!0,key:"sign-out-separator"},r,n)}else a.push({type:x.y.separator,key:"workspace-tools-separator",show:!0},...ao(),r,n,...ai());return a.filter(e=>!("show"in e)||!1!==e.show)},[tw,an,ar,c,K,U,tm,aE,tY,t$,t1,tj,D,t4,B,t2,v,o,d,aC,tP,aa,at,F,tQ,tT,tN,t,C,f,tZ,t0,tJ,ai,ao,al,I]);return i.createElement(A.a,{...e,menuClassNames:"p-ia4_home_header_menu__menu","aria-label":t_.t("{teamDisplayName} Actions",{teamDisplayName:D}),template:ak})};tb.displayName="HomeHeaderMenu";let tg=(0,n.DA)()?()=>{let e,t=(0,r.c)(19),a=(0,G.d4)(_temp23),n=_temp24,{currentTeamName:l}=(0,S.k)(),o=(0,G.d4)(tp.H7),s=(0,G.d4)(e7.D),c=(0,G.d4)(tp.FR);if(t[0]!==o||t[1]!==l||t[2]!==a||t[3]!==s||t[4]!==c){let r,m,u,p,h,_,f,b;if(r=a&&s?(0,eM.F1)(s):l??(0,eM.F1)(o),a&&c.length>1){let e;t[6]===Symbol.for("react.memo_cache_sentinel")?(e=t_.t("Move between workspaces"),t[6]=e):e=t[6],m=e}t[7]===Symbol.for("react.memo_cache_sentinel")?(u={renderMenu:n,position:"bottom-left"},t[7]=u):u=t[7],t[8]!==m?(p={delay:1e3,position:"bottom",tip:m},t[8]=m,t[9]=p):p=t[9];let g=a&&s;t[10]!==g?(h=d()("p-ia4_home_header_menu__button",{"p-ia4_home_header_menu__button--filtered":g}),t[10]=g,t[11]=h):h=t[11];let x=t_.t("{teamDisplayName} Actions",{teamDisplayName:r});if(t[12]!==h||t[13]!==x?(_={className:h,"aria-label":x,"data-qa":"workspace_actions_button"},t[12]=h,t[13]=x,t[14]=_):_=t[14],t[15]!==r){let e;t[17]===Symbol.for("react.memo_cache_sentinel")?(e={className:"p-ia4_home_header_menu__team_name"},t[17]=e):e=t[17],f=i.createElement("span",e,r),t[15]=r,t[16]=f}else f=t[16];t[18]===Symbol.for("react.memo_cache_sentinel")?(b=i.createElement(E.Ah,{name:"caret-down","aria-label":"caret-down"}),t[18]=b):b=t[18],e=i.createElement(A.cQ,u,i.createElement(C.Ay,p,i.createElement(y.Nm,_,f,b))),t[0]=o,t[1]=l,t[2]=a,t[3]=s,t[4]=c,t[5]=e}else e=t[5];return e}:()=>{let e,t,a=(0,G.d4)(e=>"on"===(0,tt._Z)(e,"workspace_switcher_improvements")),n=(0,i.useCallback)(e=>i.createElement(tb,{menuProps:e}),[]),{currentTeamName:r}=(0,S.k)(),l=(0,G.d4)(tp.H7),o=(0,G.d4)(e7.D),s=(0,G.d4)(tp.FR);return e=a&&o?(0,eM.F1)(o):r??(0,eM.F1)(l),a&&s.length>1&&(t=t_.t("Move between workspaces")),i.createElement(A.cQ,{renderMenu:n,position:"bottom-left"},i.createElement(C.Ay,{delay:1e3,position:"bottom",tip:t},i.createElement(y.Nm,{className:d()("p-ia4_home_header_menu__button",{"p-ia4_home_header_menu__button--filtered":a&&o}),"aria-label":t_.t("{teamDisplayName} Actions",{teamDisplayName:e}),"data-qa":"workspace_actions_button"},i.createElement("span",{className:"p-ia4_home_header_menu__team_name"},e),i.createElement(E.Ah,{name:"caret-down","aria-label":"caret-down"}))))};function _temp(e){return"on"===(0,tt._Z)(e,"ia4_admin_and_settings_translations")}function _temp2(e){return"on"===(0,tt._Z)(e,"audit_logs_client")}function _temp3(e){return"on"===(0,tt._Z)(e,"filter_conversations_menu_updates")}function _temp4(e){return"on"===(0,tt._Z)(e,"workspace_switcher_improvements")}function _temp5(e){return"on"===(0,tt._Z)(e,"deactivate_account_desktop")}function _temp6(e){return(0,eJ.ty)(e,"purchaser")}function _temp7(e){return(0,eJ.ty)(e,"sidebar_behavior")}function _temp8(e){return"on"===(0,tt._Z)(e,"sfdc_seamless_auth_govcloud")}function _temp9(e){return(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_SECONDARY_PLAN_INFO)}function _temp0(e){return(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_PRIMARY_PLAN_INFO)}function _temp1(e){return(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_UPSELL)&&!(0,ev.Z9F)()}function _temp10(e){return(0,ta.Hp)(e,ee.xu.MAIN_MENU)}function _temp11(e){return(0,ta.OL)(e,ee.xu.MAIN_MENU)}function _temp12(e){return(0,ta.Hp)(e,ee.xu.WORKSPACE_MENU_PRIMARY_PLAN_INFO)}function _temp13(e){return!("show"in e)||!1!==e.show}function _temp14(){return[{type:x.y.custom,ariaHidden:!1,children:i.createElement(X.A,{...et,key:"get-mobile-app"}),show:!0,key:"get-mobile-app"}]}function _temp15(e){switch(e){case P.UN:return V.EventId.HOME_FILTER_ALL_ACTIVITY;case P.nU:return V.EventId.HOME_FILTER_UNREADS_ONLY;case P.Ao:return V.EventId.HOME_FILTER_MENTIONS_ONLY;case P.eF:return V.EventId.HOME_FILTER_CUSTOM_BY_SECTION;case te.E7.All:return V.EventId.HOME_FILTER_EVERYONE;case te.E7.Internal:return V.EventId.HOME_FILTER_WITHOUT_EXTERNAL;case te.E7.External:return V.EventId.HOME_FILTER_INCLUDE_EXTERNAL;default:return V.EventId.UNKNOWN}}function _temp16(e){let t;switch(void 0===e?te.E7.All:e){case te.E7.Internal:t=t_.t("Without external people");break;case te.E7.External:t=t_.t("Including external people");break;default:t=t_.t("Everyone")}return t}function _temp17(e){return(0,T.I)(e,te.SX.Internal)}function _temp18(e,t){return e[t.key]=t,e}function _temp19(e){return!("show"in e)||!1!==e.show}function _temp20(e){return!("show"in e)||!1!==e.show}function _temp21(){}function _temp22(e){return!("show"in e)||!1!==e.show}function _temp23(e){return"on"===(0,tt._Z)(e,"workspace_switcher_improvements")}function _temp24(e){return i.createElement(tb,{menuProps:e})}tg.displayName="HomeHeaderMenuTrigger"},0x1113dd2e0:(e,t,a)=>{"use strict";a.d(t,{j:()=>calculatePrimaryWidth});var n=a(0x129702595);let calculatePrimaryWidth=({availableWidth:e,isCollapsed:t,sidebarWidth:a,secondaryWidth:r,splitWidth:i})=>t?{width:0}:{width:Math.max(e-a-r-i,n.ZM)}},0x64723458:(e,t,a)=>{"use strict";a.d(t,{h:()=>calculateSecondaryWidth});var n=a(0x7a706dfe),r=a(0x129702595);let calculateSecondaryWidth=({availableWidth:e,isCollapsed:t,widthIntent:a,widthMode:i})=>{if(t)return{width:0,defaultWidth:0};let l=e*r.XR,o=(0,n.q)(l,r.F8,r.jy);return!t&&a&&i===r.tR.MANUAL&&Number.isFinite(a)?{width:(0,n.q)(a,r.F8,r.jy),defaultWidth:o}:{width:o,defaultWidth:o}}},0x1a86b53e6:(e,t,a)=>{"use strict";a.d(t,{b:()=>calculateSidebarWidth});var n=a(0x7a706dfe),r=a(0x129702595);let calculateSidebarWidth=({availableWidth:e,isCollapsed:t,isWideWidth:a,isExtraWideWidth:i,widthIntent:l,widthMode:o,isPrimaryShowing:s,isSecondaryShowing:c,isSplitShowing:d})=>{let m=r.N7,u=r.jH,p=r.j4;if(a&&(m=r.HG,u=r.$J,p=r.VV),i){let t=s?r.ZM:0,a=c?r.R2:0,n=d?r.BR:0;m=r.oZ,u=e-t-a-n,p=r.km,s||c||(p=1),(s||c)&&d&&(p=r.j4)}let h=e*p,_=(0,n.q)(h,m,u);if(1!==p&&!t&&l&&o===r.tR.MANUAL&&Number.isFinite(l)){let e=(0,n.q)(l,m,u);return{width:e,widthIfVisible:e,minWidth:m,maxWidth:u,defaultWidth:_}}return t?{width:0,widthIfVisible:_,minWidth:m,maxWidth:u,defaultWidth:_}:{width:_,widthIfVisible:_,minWidth:m,maxWidth:u,defaultWidth:_}}},0x2c4ed242:(e,t,a)=>{"use strict";a.d(t,{R:()=>calculateSplitWidth});var n=a(0x7a706dfe),r=a(0x129702595),i=a(0x117f78ac8);let calculateSplitWidth=({availableWidth:e,isCollapsed:t,widthIntent:a,widthMode:l,isPrimaryCollapsed:o,columnMode:s})=>{let c=!t,d=Math.round(Math.min(e-(o?0:r.ZM)-(s===i.oZ.Single&&o?r.F8:0),r.T1)),m=e*r.by,u=(0,n.q)(m,r.BR,d),p=0,h=a&&l===r.tR.STICKY&&Number.isFinite(a),_=a&&l===r.tR.MANUAL&&Number.isFinite(a);return c&&h||c&&_?{width:(0,n.q)(a,r.BR,d),defaultWidth:u,maxWidth:d,potentialWidth:p}:t?(p=u,_&&(p=(0,n.q)(a,r.BR,d)),{width:0,defaultWidth:0,maxWidth:d,potentialWidth:p}):{width:u,defaultWidth:u,maxWidth:d,potentialWidth:p}}},0x612743a6:(e,t,a)=>{"use strict";a.d(t,{v:()=>maybeSquishColumns});var n=a(0x129702595),r=a(0x117f78ac8);let maybeSquishColumns=({availableWidthForPrimaryAndSecondary:e,availableWidthForPrimaryAndSplit:t,isSidebarCollapsed:a,isPrimaryCollapsed:i,isSecondaryCollapsed:l,isSplitCollapsed:o,sidebarWidth:s,primaryWidth:c,secondaryWidth:d,splitWidth:m,sidebarWidthMin:u,splitWidthMode:p,columnMode:h})=>{let _=!i,f=!l,b=!o,g=s,y=c,A=d,x=m,E=p===n.tR.AUTO||p===n.tR.STICKY;if(h===r.oZ.Single&&(f?A=Math.max(e,n.ZM):y=Math.max(e,n.ZM)),_&&f&&c<=n.ZM&&(y=n.ZM,A=Math.max(e-n.ZM,n.R2)),_&&b&&l&&c<=n.ZM&&E&&(y=n.ZM,x=Math.max(t-n.ZM,n.BR)),_&&b&&f&&c<=n.ZM&&d<=n.R2&&E&&(y=n.ZM,A=n.R2,x=Math.max(c+d+m-n.ZM-n.R2,n.BR)),!a&&c<=n.ZM&&d<=n.R2&&(m<=n.BR||p===n.tR.MANUAL)){let e=_?n.ZM:0,t=f?n.R2:0,a=b?n.BR:0;p===n.tR.MANUAL&&(a=m),g=Math.max(c+d+m+s-e-t-a,u)}return{maybeSquishedSidebarWidth:g,maybeSquishedPrimaryWidth:y,maybeSquishedSecondaryWidth:A,maybeSquishedSplitWidth:x}}},0x7a706dfe:(e,t,a)=>{"use strict";a.d(t,{q:()=>clamp});let clamp=(e,t,a)=>Math.max(t,Math.min(a,e))},0x13f5975f9:(e,t,a)=>{"use strict";a.d(t,{i:()=>shouldUseNarrowWindow});var n=a(0x129702595);let shouldUseNarrowWindow=e=>e<n.W5},0x183b48748:(e,t,a)=>{"use strict";a.d(t,{v:()=>shouldUseShortWindow});var n=a(0x129702595);let shouldUseShortWindow=e=>e<n.ww},0x483131be:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseTabsCustomizationNuxMenuItem:()=>g,default:()=>A});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x99233ecb),c=a(0x1ed656589),d=a(0x218842a12),m=a(0x3711e82d),u=a(0xafce781a),p=a(0x1a07e694d),h=a(0xf3c65e54),_=a(0x5b1935a6);let f=new o.Ay("search"),b={clogImpression:!0,elementName:"tabs_customization_menu_item",onClick:{enableClogAction:!0},uiComponentName:m.UiComponentName.TABS_CUSTOMIZATION_NUX_MENU_ITEM};d.g.MORE_PEEK_MENU_TABS_CUSTOMIZATION_NUX_MENU_ITEM;let g=(0,n.DA)()?e=>{let t,a,n,l,o,c,d,m=(0,r.c)(13);if(m[0]!==e?({onClick:t,onMount:a,onUnmount:n,...l}=e,m[0]=e,m[1]=t,m[2]=a,m[3]=n,m[4]=l):(t=m[1],a=m[2],n=m[3],l=m[4]),m[5]!==a||m[6]!==n?(o=()=>(a(),()=>{n()}),c=[a,n],m[5]=a,m[6]=n,m[7]=o,m[8]=c):(o=m[7],c=m[8]),(0,i.useEffect)(o,c),m[9]!==t||m[10]!==l){let e;m[12]===Symbol.for("react.memo_cache_sentinel")?(e=i.createElement("div",{className:"p-more_menu_infobox--container"},i.createElement("div",{className:"p-more_menu_infobox--alert"},i.createElement("div",{className:"p-more_menu_infobox--nux-msg"},f.t("Put your favorite tools front and center")),i.createElement("div",{className:"p-more_menu_infobox--link"},f.t("Customize navigation bar"))),i.createElement("div",{className:"p-more_menu_infobox--callout"},f.t("NEW"))),m[12]=e):e=m[12],d=i.createElement(s.Dr,{...l,autoClogProps:b,className:"p-more_menu_infobox--menu",onSelected:t,type:"custom"},e),m[9]=t,m[10]=l,m[11]=d}else d=m[11];return d}:({onClick:e,onMount:t,onUnmount:a,...n})=>((0,i.useEffect)(()=>(t(),()=>{a()}),[t,a]),i.createElement(s.Dr,{...n,autoClogProps:b,className:"p-more_menu_infobox--menu",onSelected:e,type:"custom"},i.createElement("div",{className:"p-more_menu_infobox--container"},i.createElement("div",{className:"p-more_menu_infobox--alert"},i.createElement("div",{className:"p-more_menu_infobox--nux-msg"},f.t("Put your favorite tools front and center")),i.createElement("div",{className:"p-more_menu_infobox--link"},f.t("Customize navigation bar"))),i.createElement("div",{className:"p-more_menu_infobox--callout"},f.t("NEW")))));g.displayName="BaseTabsCustomizationNuxMenuItem";let y=(0,n.DA)()?e=>{let t,a,n,o,s,c,d=(0,r.c)(15);d[0]!==e?({onClick:t,...a}=e,d[0]=e,d[1]=t,d[2]=a):(t=d[1],a=d[2]);let m=(0,l.wA)();d[3]!==m||d[4]!==t?(n=()=>{m((0,p.A)({action:_.hw.CLICK,iaVersion:4,spaceName:_.xu.MORE_PEEK_MENU})),t()},d[3]=m,d[4]=t,d[5]=n):n=d[5];let f=n;d[6]!==m?(o=()=>{m((0,h.A)({action:_.hw.IMPRESSION,notificationName:_.ze.MORE_PEEK_MENU_TABS_CUSTOMIZATION_NUX_MENU_ITEM}))},d[6]=m,d[7]=o):o=d[7];let b=o;d[8]!==m?(s=()=>{m((0,u.iR)({event:{iaVersion:4,spaces:[_.xu.MORE_PEEK_MENU],type:_.jo.REQUEST_SPACES}}))},d[8]=m,d[9]=s):s=d[9];let y=s;return d[10]!==f||d[11]!==b||d[12]!==y||d[13]!==a?(c=i.createElement(g,{...a,onClick:f,onMount:b,onUnmount:y}),d[10]=f,d[11]=b,d[12]=y,d[13]=a,d[14]=c):c=d[14],c}:({onClick:e,...t})=>{let a=(0,l.wA)(),n=(0,i.useCallback)(()=>{a((0,p.A)({action:_.hw.CLICK,iaVersion:4,spaceName:_.xu.MORE_PEEK_MENU})),e()},[a,e]),r=(0,i.useCallback)(()=>{a((0,h.A)({action:_.hw.IMPRESSION,notificationName:_.ze.MORE_PEEK_MENU_TABS_CUSTOMIZATION_NUX_MENU_ITEM}))},[a]),o=(0,i.useCallback)(()=>{a((0,u.iR)({event:{iaVersion:4,spaces:[_.xu.MORE_PEEK_MENU],type:_.jo.REQUEST_SPACES}}))},[a]);return i.createElement(g,{...t,onClick:n,onMount:r,onUnmount:o})};y.displayName="TabsCustomizationNuxMenuItem";let A=(0,c.Ay)((0,i.memo)(y))},0x18bab6d41:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5);let r=new(a(0x20482ad21)).Ay("ia4");function NFXSteps({currentStep:e,totalSteps:t}){return n.createElement("span",{className:"p-nfx_steps","data-qa":`nfx-steps-${e}`},r.t("{currentStep} of {totalSteps}",{currentStep:e,totalSteps:t}))}NFXSteps.displayName="NFXSteps";let i=(0,n.memo)(NFXSteps)},0x21fc2f311:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>C});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x2b7f0bcc),s=a(0x344bb842),c=a(0x1faa3f1ac),d=a(0x2501a2cee),m=a(0x52f61f28),u=a(0x1cf0d97e1),p=a(0xb9604b6),h=a(0x5b1935a6);let _=(0,u.Ay)(e=>{if((0,p.Hp)(e,h.xu.ACTIVITY_TAB_SIDEBAR)!==h.ze.HOME_ACTIVITY_NUDGE)return!1;let{homeBadgeCount:t}=(0,m.e)(e);return t>0});_.meta={name:"shouldShowHomeActivityNudge",key:"createSelectorShouldShowHomeActivityNudge",description:e=>{if((0,p.Hp)(e,h.xu.ACTIVITY_TAB_SIDEBAR)!==h.ze.HOME_ACTIVITY_NUDGE)return!1;let{homeBadgeCount:t}=(0,m.e)(e);return t>0}};var f=a(0x3711e82d),b=a(0x226892387),g=a(0x20061cab9),y=a(0x19895585a),A=a(0x1a204ce4e);let x=new l.Ay("ia4"),E={name:"close",size:"20"};function HomeActivityNudge({dismissAndClearNotification:e,recordNotificationEventImpression:t}){let a=(0,r.wA)(),l=(0,n.useRef)(),m=(0,n.useCallback)(e=>{l.current=e},[]),u=(0,b.d4)(_),p=(0,n.useMemo)(()=>n.createElement(d.Ah,{name:"stacked-cards",size:"20"}),[]),C=(0,n.useCallback)(()=>{a((0,A.A)({reason:A.m.Click,tab:y.k6.Home})),a((0,g.Ay)({action:h.hw.CLICK,spaceName:h.xu.ACTIVITY_TAB_SIDEBAR})),l.current?.({action:f.UiAction.CLICK})},[a]),k=(0,n.useCallback)(({text:e})=>n.createElement(c.A,{"data-qa":"home_activity_nudge__home_link",onClick:C},e),[C]),v=(0,n.useCallback)(()=>{e(),l.current?.({action:f.UiAction.CLOSE})},[e]);return((0,n.useEffect)(()=>{u&&t()},[u,t]),u)?n.createElement(i.A,{clogImpression:!0,elementName:"home_activity_nudge",elementType:f.ElementType.ALERT,eventId:f.EventId.ACTIVITY_TAB_OPEN,stepVariant:"desktop_ia4_new_teams_v3__treatment_home_more",uiStep:f.UiStep.HOME_ACTIVITY_NUDGE,trackClogRef:m},n.createElement(o.Ay,{className:"p-home_activity_nudge",customIcon:p,"data-qa":"home_activity_nudge",heading:x.t("You have unread messages in Home"),level:"info"},x.rt("Only your mentions, replies and reactions appear in Activity. <a>View Home</a>",{"<a>":k}),n.createElement(s.A,{"aria-label":x.t("Close"),className:"p-home_activity_nudge__close_button","data-qa":"home_activity_nudge__close_button",onClick:v,size:"x-small",svgIconProps:E}))):null}HomeActivityNudge.displayName="HomeActivityNudge";let C=(0,n.memo)(HomeActivityNudge)},0x15366c0fa:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>C});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x40c0d834),o=a(0x16cf1da63),s=a(0x24357b9d4),c=a(0xafce781a),d=a(0x5b1935a6);let m=(0,n.DA)()?function(e){let t,a,n,l=(0,r.c)(6),{children:m,duration:u}=e,p=(0,o.wA)(),h=(0,i.useRef)(null);return(0,s.A)(d.ze.HOME_TAB_BUTTON_NUDGE),l[0]!==p||l[1]!==u?(t=()=>(h.current=setTimeout(()=>{p((0,c.iR)({event:{spaces:[d.xu.TAB_RAIL_HOME_TAB],type:d.jo.REQUEST_SPACES}}))},u),()=>{h.current&&clearTimeout(h.current)}),a=[p,u],l[0]=p,l[1]=u,l[2]=t,l[3]=a):(t=l[2],a=l[3]),(0,i.useEffect)(t,a),l[4]!==m?(n=i.createElement(i.Fragment,null,m),l[4]=m,l[5]=n):n=l[5],n}:function({children:e,duration:t}){let a=(0,o.wA)(),n=(0,i.useRef)(null);return(0,s.A)(d.ze.HOME_TAB_BUTTON_NUDGE),(0,i.useEffect)(()=>(n.current=setTimeout(()=>{a((0,c.iR)({event:{spaces:[d.xu.TAB_RAIL_HOME_TAB],type:d.jo.REQUEST_SPACES}}))},t),()=>{n.current&&clearTimeout(n.current)}),[a,t]),i.createElement(i.Fragment,null,e)};var u=a(0x20482ad21),p=a(0xb90de824),h=a(0x13953efe6),_=a(0x3711e82d),f=a(0xf3c65e54);let b=new u.Ay("view"),g={uiComponentName:_.UiComponentName.HOME_TAB_NUDGE_COACHMARK,elementName:"home_tab_nudge_coachmark_close"};function HomeTabNudgeCoachmark({children:e,duration:t,setCanTrackHomeTabClick:a}){let n=(0,o.wA)(),r=(0,i.useRef)(null),[l,m]=(0,i.useState)(!0);(0,s.A)(d.ze.HOME_TAB_BUTTON_NUDGE),(0,i.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[n]);let u=(0,i.useCallback)(e=>{e?.stopPropagation(),m(!1),a(!0),n((0,f.A)({action:d.hw.DISMISS,notificationName:d.ze.HOME_TAB_BUTTON_NUDGE})),r.current=setTimeout(()=>{a(!1),n((0,c.iR)({event:{spaces:[d.xu.TAB_RAIL_HOME_TAB],type:d.jo.REQUEST_SPACES}}))},t)},[n,t,a]),_=(0,i.useMemo)(()=>i.createElement(p.Ay,{title:b.t("Curious about where to start"),offsetX:-8,orientation:"right",centerOnArrow:!0,isOpen:l,closeCoachmark:u,isMegaphoneCoachmark:!1,bodyText:b.t("Head back to home to send your first message"),autoClogProps:g}),[u,l]);return i.createElement(h.Ay,{coachmarkAnchorClassNames:"p-home_tab_button__coachmark_anchor",coachmarkElement:_,orientation:"right"},e)}HomeTabNudgeCoachmark.displayName="HomeTabNudgeCoachmark";let y=HomeTabNudgeCoachmark;var A=a(0x1ccef1c6f),x=a(0x226892387);let E=(0,n.DA)()?function(e){let t,a=(0,r.c)(7),{canTrackHomeTabClick:n,children:o,duration:s,isHomeTabNudging:c,setCanTrackHomeTabClick:d}=e,u=void 0===s?3e4:s,p=(0,x.d4)(_temp);if(c||n){let e;return a[0]!==o||a[1]!==u||a[2]!==p||a[3]!==d?(e=p?i.createElement(l.A,{uiComponentName:_.UiComponentName.HOME_TAB_NUDGE_ANIMATION,clogImpression:!0},i.createElement(m,{duration:u},o)):i.createElement(l.A,{uiComponentName:_.UiComponentName.HOME_TAB_NUDGE_COACHMARK,clogImpression:!0},i.createElement(y,{duration:u,setCanTrackHomeTabClick:d},o)),a[0]=o,a[1]=u,a[2]=p,a[3]=d,a[4]=e):e=a[4],e}return a[5]!==o?(t=i.createElement(i.Fragment,null,o),a[5]=o,a[6]=t):t=a[6],t}:function({canTrackHomeTabClick:e,children:t,duration:a=3e4,isHomeTabNudging:n,setCanTrackHomeTabClick:r}){let o=(0,x.d4)(e=>(0,A.ty)(e,"a11y_animations"));return n||e?o?i.createElement(l.A,{uiComponentName:_.UiComponentName.HOME_TAB_NUDGE_ANIMATION,clogImpression:!0},i.createElement(m,{duration:a},t)):i.createElement(l.A,{uiComponentName:_.UiComponentName.HOME_TAB_NUDGE_COACHMARK,clogImpression:!0},i.createElement(y,{duration:a,setCanTrackHomeTabClick:r},t)):i.createElement(i.Fragment,null,t)};function _temp(e){return(0,A.ty)(e,"a11y_animations")}E.displayName="HomeTabNudge";let C=E},0x1c9980611:(e,t,a)=>{"use strict";a.d(t,{DV:()=>getNuxTractorChannelCoachmarkAutoClogProps,VN:()=>i,cY:()=>r,gk:()=>l});var n=a(0x3711e82d);function getNuxTractorChannelCoachmarkAutoClogProps(e){return{eventId:n.EventId.NEWXP_JOIN_TEAM,uiStep:n.UiStep.NUX_TRACTOR_CHANNEL,uiComponentVariant:e?"team_creator":"team_joiner",elementName:`${n.UiStep.NUX_TRACTOR_CHANNEL}_coachmark`}}let r={eventId:n.EventId.NEWXP_JOIN_TEAM,uiStep:n.UiStep.NUX_HUDDLES_CANVAS,elementName:`${n.UiStep.NUX_HUDDLES_CANVAS}_coachmark`},i={eventId:n.EventId.NEWXP_JOIN_TEAM,uiStep:n.UiStep.NUX_CUSTOMIZATION,elementName:`${n.UiStep.NUX_CUSTOMIZATION}_coachmark`},l={eventId:n.EventId.NEWXP_JOIN_TEAM,uiStep:n.UiStep.NUX_GLOBAL_CREATE,elementName:`${n.UiStep.NUX_GLOBAL_CREATE}_coachmark`}},0x1a6e7ed05:(e,t,a)=>{"use strict";a.d(t,{s:()=>n});let n={TRACTOR_ANIMATION:"nux_coachmark_tractor_channel_animation",TRACTOR_IMAGE:"nux_coachmark_tractor_channel_img",TOOLS_ANIMATION:"nux_coachmark_tools_animation",TOOLS_IMAGE:"nux_coachmark_tools_img",GLOBAL_CREATE_ANIMATION:"nux_coachmark_global_create_animation",GLOBAL_CREATE_IMAGE:"nux_coachmark_global_create_img"}},0x229193160:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0x11c82607b),r=a(0xafce781a),i=a(0x5b1935a6);let l=(0,n.Ay)("Fetch megaphone spaces during/after the NUX tour",e=>e((0,r.iR)({event:{type:i.jo.REQUEST_SPACES,spaces:[i.xu.PROGRESSIVE_DISCLOSURE,i.xu.WELCOME_SPACE,i.xu.MESSAGE_PANE]}})));l.meta={name:"fetchMegaphoneSpacesPostNuxTour",key:"createThunkFetchMegaphoneSpacesPostNuxTour",description:"Fetch megaphone spaces during/after the NUX tour"};let o=l},0x1d25c0791:(e,t,a)=>{"use strict";a.d(t,{m:()=>n});let n={ActivityCreatorCoachmark:"tractor_channel_creator_coachmark",ActivityJoinerCoachmark:"tractor_channel_joiner_coachmark",HuddlesCoachmark:"huddles_coachmark",ToolsCoachmark:"tools_coachmark",ThemingCoachmark:"theming_coachmark",GlobalCreateWithHuddlesCoachmark:"global_create_with_huddles_coachmark",GlobalCreateWithoutHuddlesCoachmark:"global_create_without_huddles_coachmark"}},0x245208d6a:(e,t,a)=>{"use strict";a.d(t,{V:()=>c});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x14fad6485),o=a(0x238b287cf),s=a(0x3711e82d);let c=(0,n.DA)()?(e,t)=>{let a,n,c=(0,r.c)(7),{windowRef:d}=(0,i.useContext)(l._0),m=(0,o.A)();c[0]!==t||c[1]!==m||c[2]!==e||c[3]!==d?(a=a=>{let n=d.deref()?.document?.getElementsByClassName(e)?.[0];a&&n&&!n.contains(a.target)&&t.eventId&&m.track(t.eventId,{contexts:{ui_context:{action:s.UiAction.CLOSE,...t?.uiStep&&{ui_step:t?.uiStep},...t?.uiComponentVariant&&{ui_component_variant:t?.uiComponentVariant},...t?.elementName&&{ui_properties:{element_name:`${t?.elementName}_outside_close`}}}}})},c[0]=t,c[1]=m,c[2]=e,c[3]=d,c[4]=a):a=c[4];let u=a;return c[5]!==u?(n={clogDismissFromOverlay:u},c[5]=u,c[6]=n):n=c[6],n}:(e,t)=>{let{windowRef:a}=(0,i.useContext)(l._0),n=(0,o.A)();return{clogDismissFromOverlay:(0,i.useCallback)(r=>{let i=a.deref()?.document?.getElementsByClassName(e)?.[0];r&&i&&!i.contains(r.target)&&t.eventId&&n.track(t.eventId,{contexts:{ui_context:{action:s.UiAction.CLOSE,...t?.uiStep&&{ui_step:t?.uiStep},...t?.uiComponentVariant&&{ui_component_variant:t?.uiComponentVariant},...t?.elementName&&{ui_properties:{element_name:`${t?.elementName}_outside_close`}}}}})},[t,n,e,a])}}},0xfbede66:(e,t,a)=>{"use strict";a.d(t,{P:()=>o,j:()=>useHighlightCoachmark});var n=a(0xbad225b5),r=a(0x162afc153),i=a(0x14fad6485),l=a(0x3bc7bbd5);let o="p-nux_coachmark";function useHighlightCoachmark({className:e,highlightPadding:t={},backgroundClassName:a=o}){let{windowRef:s}=(0,n.useContext)(i._0),c=(0,n.useRef)(null),d=(0,n.useRef)(null),[m,u]=(0,n.useState)(!1),p=(0,n.useRef)(null),h=(0,n.useMemo)(()=>(0,r.A)(()=>{if(!c.current||!d.current)return;let{bottom:e=0,left:a=0,right:n=0,top:r=0,all:i,borderRadius:l=0}=t,{height:o,left:s,top:m,width:u}=c.current.getBoundingClientRect();d.current.style.left=`${s-(i??a)}px`,d.current.style.top=`${m-(i??r)}px`,d.current.style.width=`${u+("number"==typeof i?2*i:a+n)}px`,d.current.style.height=`${o+("number"==typeof i?2*i:r+e)}px`,l&&(d.current.style.borderRadius=`${l}px`)},200),[t]),_=(0,n.useCallback)(t=>{let n=s.deref();if(!e?.length||!n)return;if(c.current=t,d.current=n.document.createElement("div"),a){let e=a.split(" ");d.current.classList.add(...e)}h();let r=n.document?.getElementsByClassName(e)?.[0];if(!r)return;let i=r.parentElement;i&&(i.insertBefore(d.current,r),u(!0))},[e,h,s,a]);return(0,n.useEffect)(()=>{if(!m)return;let e=s?.deref(),t=(0,l.A)(h);return c.current&&(e?.addEventListener("resize",h),t.observe(c.current)),p.current=new MutationObserver(h),e?.document?.body&&p.current.observe(e?.document.body,{childList:!0,subtree:!0,attributes:!0}),()=>{c.current&&(e?.removeEventListener("resize",h),t.unobserve(c.current)),p.current&&p.current.disconnect()}},[h,s,m,e]),{onAfterOpen:_}}},0xd93ae65c:(e,t,a)=>{"use strict";a.d(t,{H:()=>d});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x226892387),o=a(0xb9604b6),s=a(0x5b1935a6);let c=(0,n.DA)()?function(e){let t,a,n=(0,r.c)(6),i=(0,l.d4)(_temp);n[0]!==i||n[1]!==e?(t=t=>(0,o.Hp)(t,s.xu.WELCOME_SPACE)===s.ze.IA4_NEW_TEAMS_V3_NUX_EDUCATION&&(e?.length?!!i&&e.includes(i):!i),n[0]=i,n[1]=e,n[2]=t):t=n[2];let c=(0,l.d4)(t);return n[3]!==i||n[4]!==c?(a={isOpen:c,currentStepName:i},n[3]=i,n[4]=c,n[5]=a):a=n[5],a}:function(e){let t=(0,l.d4)(e=>e.setupCreation.currentIA4NUXStep);return{isOpen:(0,l.d4)(a=>(0,o.Hp)(a,s.xu.WELCOME_SPACE)===s.ze.IA4_NEW_TEAMS_V3_NUX_EDUCATION&&(e?.length?!!t&&e.includes(t):!t)),currentStepName:t}};function _temp(e){return e.setupCreation.currentIA4NUXStep}let d=(0,n.DA)()?function(e){let t,a,n=(0,r.c)(10),{isOpen:i,currentStepName:o}=c(e),s=(0,l.d4)(use_nux_data_temp);n[0]!==o||n[1]!==s.steps?(t=s.steps?.findIndex(e=>e===o)??0,n[0]=o,n[1]=s.steps,n[2]=t):t=n[2];let d=t,m=d>-1?d:0,u=s.steps?.length??0,p=m+1<u?s.steps?.[m+1]:void 0,h=m+1;return n[3]!==o||n[4]!==s||n[5]!==i||n[6]!==p||n[7]!==h||n[8]!==u?(a={currentStep:h,isOpen:i,nextStep:p,totalSteps:u,currentStepName:o,megaphoneStepData:s},n[3]=o,n[4]=s,n[5]=i,n[6]=p,n[7]=h,n[8]=u,n[9]=a):a=n[9],a}:function(e){let{isOpen:t,currentStepName:a}=c(e),n=(0,l.d4)(e=>(0,o.OL)(e,s.xu.WELCOME_SPACE)),r=n.steps?.findIndex(e=>e===a)??0,d=r>-1?r:0,m=n.steps?.length??0,u=d+1<m?n.steps?.[d+1]:void 0;return(0,i.useMemo)(()=>({currentStep:d+1,isOpen:t,nextStep:u,totalSteps:m,currentStepName:a,megaphoneStepData:n}),[m,d,t,u,a,n])};function use_nux_data_temp(e){return(0,o.OL)(e,s.xu.WELCOME_SPACE)}},0xdbb7521e:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x1a592c177),d=a(0x3711e82d),m=a(0xcaa08ff7),u=a(0x2513da192),p=a(0x226892387),h=a(0xe684f705);let _=new o.Ay("priority_manage"),f={eventId:d.EventId.REMOVE_PRIORITY_USER,onClick:{interaction:d.Interaction.CLICK,enableClogAction:!0},entryPoint:"vip_preferences_people_entity"},b=(0,n.DA)()?e=>{let t,a,n,o,b,g,y,A=(0,r.c)(40),{memberId:x,isVipAvailableForCurrentTeam:E,secondaryAction:C,description:k,isRecommendation:v,listPostion:S}=e,I=void 0===k?"":k,w=void 0!==v&&v,T=(0,l.wA)(),N=(0,p.d4)(m.Vh);A[0]!==x?(t=e=>(0,h._7)(e,x),A[0]=x,A[1]=t):t=A[1];let M=(0,p.d4)(t);A[2]===Symbol.for("react.memo_cache_sentinel")?(a={interaction:d.Interaction.CLICK,enableClogAction:!0},A[2]=a):a=A[2],A[3]!==S||A[4]!==x||A[5]!==N?(n={eventId:d.EventId.RECOMMEND_ACCEPT,requestId:N,selectedIdV2:x,selectedPosition:S,selectedType:"user",onClick:a,entryPoint:"vip_preferences_people_entity"},A[3]=S,A[4]=x,A[5]=N,A[6]=n):n=A[6];let R=n;A[7]!==T||A[8]!==x?(o=()=>{T((0,u.C)(x))},A[7]=T,A[8]=x,A[9]=o):o=A[9];let P=o;if(A[10]!==M||A[11]!==P){let e,t,a;A[13]!==M?(e=_.t("Remove {memberName}",{memberName:M}),A[13]=M,A[14]=e):e=A[14],A[15]!==P||A[16]!==e?(t={onClick:P,className:"p-priority_manage_modal__list_button",autoClogProps:f,"aria-label":e},A[15]=P,A[16]=e,A[17]=t):t=A[17],A[18]===Symbol.for("react.memo_cache_sentinel")?(a=_.t("Remove"),A[18]=a):a=A[18],b=i.createElement(s.Nm,t,a),A[10]=M,A[11]=P,A[12]=b}else b=A[12];let L=b;if(A[19]!==R||A[20]!==M||A[21]!==P){let e,t,a;A[23]!==M?(e=_.t("Add {memberName}",{memberName:M}),A[23]=M,A[24]=e):e=A[24],A[25]!==R||A[26]!==P||A[27]!==e?(t={onClick:P,className:"p-priority_manage_modal__list_button",autoClogProps:R,"aria-label":e},A[25]=R,A[26]=P,A[27]=e,A[28]=t):t=A[28],A[29]===Symbol.for("react.memo_cache_sentinel")?(a=_.t("Add"),A[29]=a):a=A[29],g=i.createElement(s.Nm,t,a),A[19]=R,A[20]=M,A[21]=P,A[22]=g}else g=A[22];let O=g,D="add"===C?O:L;if(!E)return null;if(A[30]!==I||A[31]!==w||A[32]!==x||A[33]!==D){let e,t=!w;A[35]!==I||A[36]!==x||A[37]!==D||A[38]!==t?(e={id:x,showStatus:!1,showPresence:!1,secondaryContent:D,description:I,useShortMode:!0,showSubtext:t},A[35]=I,A[36]=x,A[37]=D,A[38]=t,A[39]=e):e=A[39],y=i.createElement(c.A,e),A[30]=I,A[31]=w,A[32]=x,A[33]=D,A[34]=y}else y=A[34];return y}:({memberId:e,isVipAvailableForCurrentTeam:t,secondaryAction:a,description:n="",isRecommendation:r=!1,listPostion:o})=>{let b=(0,l.wA)(),g=(0,p.d4)(m.Vh),y=(0,p.d4)(t=>(0,h._7)(t,e)),A=(0,i.useMemo)(()=>({eventId:d.EventId.RECOMMEND_ACCEPT,requestId:g,selectedIdV2:e,selectedPosition:o,selectedType:"user",onClick:{interaction:d.Interaction.CLICK,enableClogAction:!0},entryPoint:"vip_preferences_people_entity"}),[o,e,g]),x=(0,i.useCallback)(()=>{b((0,u.C)(e))},[b,e]),E=(0,i.useMemo)(()=>i.createElement(s.Nm,{onClick:x,className:"p-priority_manage_modal__list_button",autoClogProps:f,"aria-label":_.t("Remove {memberName}",{memberName:y})},_.t("Remove")),[y,x]),C=(0,i.useMemo)(()=>i.createElement(s.Nm,{onClick:x,className:"p-priority_manage_modal__list_button",autoClogProps:A,"aria-label":_.t("Add {memberName}",{memberName:y})},_.t("Add")),[y,x,A]);return t?i.createElement(c.A,{id:e,showStatus:!1,showPresence:!1,secondaryContent:"add"===a?C:E,description:n,useShortMode:!0,showSubtext:!r}):null};b.displayName="PriorityModalPeopleEntity"},0x16dc59f6a:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x20482ad21),c=a(0x2501a2cee),d=a(0x4c96e5d9),m=a(0xb041cb4d),u=a(0x139aa1a7),p=a(0x176a6b6c5),h=a(0xd843ab47),_=a(0xb04c4a12),f=a(0x226892387),b=a(0x2407bdb15),g=a.n(b);let y=new s.Ay("members"),A=(0,n.DA)()?function(e){let t,a,n=(0,r.c)(16),{forceBadge:l,size:s,displayWithoutViewContext:b,className:A}=e,x=(0,f.d4)(m.Gn),E=(0,i.useContext)(p.r4),{view:C}=(0,i.useContext)(h.A),k=C?.id,v=k===u.D.DmsList||E===_.Y.DMS_TAB,S=E||k;if(!x)return null;let I=[_.Y.MESSAGE_PANE,_.Y.THREAD,_.Y.THREADS_VIEW,u.D.DmsList];if(!S&&!b||k&&k.startsWith("D")&&!v&&!l||S&&!I.includes(S)&&!l)return null;if(n[0]!==s){let e,a=s||"18";n[2]!==a?(e={name:"vip-filled",size:a,inline:!0},n[2]=a,n[3]=e):e=n[3],t=i.createElement(c.Ah,e),n[0]=s,n[1]=t}else t=n[1];let w=t;if(!l){let e;if(n[4]!==w){let t;n[6]===Symbol.for("react.memo_cache_sentinel")?(t={tip:y.t("VIP")},n[6]=t):t=n[6],e=i.createElement(d.Ay,t,w),n[4]=w,n[5]=e}else e=n[5];w=e}if(n[7]!==A||n[8]!==l||n[9]!==w){let e,t;n[11]!==A||n[12]!==l?(e=o()(A,g().priorityVipBadgeIcon,{[g().priorityVipBadgeInHeader]:l}),n[11]=A,n[12]=l,n[13]=e):e=n[13],n[14]!==e?(t={className:e,"data-qa":"priority_vip_badge"},n[14]=e,n[15]=t):t=n[15],a=i.createElement("span",t,w),n[7]=A,n[8]=l,n[9]=w,n[10]=a}else a=n[10];return a}:function({forceBadge:e,size:t,displayWithoutViewContext:a,className:n}){let r=(0,f.d4)(m.Gn),l=(0,i.useContext)(p.r4),{view:s}=(0,i.useContext)(h.A),b=s?.id,A=b===u.D.DmsList||l===_.Y.DMS_TAB,x=l||b;if(!r)return null;let E=[_.Y.MESSAGE_PANE,_.Y.THREAD,_.Y.THREADS_VIEW,u.D.DmsList];if(!x&&!a||b&&b.startsWith("D")&&!A&&!e||x&&!E.includes(x)&&!e)return null;let C=i.createElement(c.Ah,{name:"vip-filled",size:t||"18",inline:!0});return e||(C=i.createElement(d.Ay,{tip:y.t("VIP")},C)),i.createElement("span",{className:o()(n,g().priorityVipBadgeIcon,{[g().priorityVipBadgeInHeader]:e}),"data-qa":"priority_vip_badge"},C)};A.displayName="PriorityVipBadge";let x=(0,i.memo)(A)},0x6f2de2d0:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0xe0376d2),o=a(0x1cbdfeceb),s=a(0x20482ad21),c=a(0x102edf836),d=a(0x2501a2cee),m=a(0x146419600),u=a(0xa079e8fe);let workspace_picker_modal=({modalProps:e,selectProps:t})=>i.createElement(u.A,{"data-qa":`${e?.dataQaPrefix}__select_workspace_modal`,maxWidth:e?.maxWidth??"520px",...e},i.createElement(m.A,t));var p=a(0xa1832ae4),h=a(0xf038462c),_=a(0x226892387),f=a(0x1ee439e69);let b=new s.Ay("ia4"),g=(0,n.DA)()?e=>{let t,a,n,s,m,u,g,y,A,x,E=(0,r.c)(25),{adminRoute:C,closeModal:k,title:v,workspaceIds:S}=e,[I,w]=(0,i.useState)(""),T=(0,_.d4)(h.Ur);E[0]!==S?(t=e=>(0,f.DK)(e,(0,l.A)(S)),E[0]=S,E[1]=t):t=E[1];let N=(0,_.d4)(t);E[2]!==I?(a=e=>(0,f._J)(e,I),E[2]=I,E[3]=a):a=E[3];let M=(0,_.d4)(a);E[4]===Symbol.for("react.memo_cache_sentinel")?(n=b.t("Open"),E[4]=n):n=E[4];let R=n;E[5]!==C||E[6]!==k||E[7]!==M||E[8]!==I?(s=()=>i.createElement(c.z9,{disabled:!I,type:"primary",href:`${(0,p.Zl)(M)}${C}`,onClick:k},i.createElement("div",{className:"margin_right_25"},R),i.createElement(d.Ah,{inline:!0,name:"new-window",size:"20"})),E[5]=C,E[6]=k,E[7]=M,E[8]=I,E[9]=s):s=E[9];let P=s;E[10]!==P?(m=i.createElement(P,null),E[10]=P,E[11]=m):m=E[11],E[12]!==m?(u={buttonText:m,onClick:o.A,ariaLabelPrimaryAction:R},E[12]=m,E[13]=u):u=E[13];let L=u;E[14]!==v?(g=v??b.t("Workspace settings"),E[14]=v,E[15]=g):g=E[15],E[16]!==L||E[17]!==g?(y={dataQaPrefix:"select_workspace_to_admin",maxWidth:"520px",title:g,primaryAction:L},E[16]=L,E[17]=g,E[18]=y):y=E[18];let O=y,D=S?N:T;E[19]!==I||E[20]!==D?(A={workspaces:D,selectedWorkspaceId:I,onWorkspaceSelected:w},E[19]=I,E[20]=D,E[21]=A):A=E[21];let F=A;return E[22]!==O||E[23]!==F?(x=i.createElement(workspace_picker_modal,{modalProps:O,selectProps:F}),E[22]=O,E[23]=F,E[24]=x):x=E[24],x}:({adminRoute:e,closeModal:t,title:a,workspaceIds:n})=>{let[r,s]=(0,i.useState)(""),m=(0,_.d4)(h.Ur),u=(0,_.d4)(e=>(0,f.DK)(e,(0,l.A)(n))),g=(0,_.d4)(e=>(0,f._J)(e,r)),y=b.t("Open"),A=(0,i.useCallback)(()=>i.createElement(c.z9,{disabled:!r,type:"primary",href:`${(0,p.Zl)(g)}${e}`,onClick:t},i.createElement("div",{className:"margin_right_25"},y),i.createElement(d.Ah,{inline:!0,name:"new-window",size:"20"})),[e,t,y,g,r]),x=(0,i.useMemo)(()=>({buttonText:i.createElement(A,null),onClick:o.A,ariaLabelPrimaryAction:y}),[A,y]),E=(0,i.useMemo)(()=>({dataQaPrefix:"select_workspace_to_admin",maxWidth:"520px",title:a??b.t("Workspace settings"),primaryAction:x}),[x,a]),C=(0,i.useMemo)(()=>({workspaces:n?u:m,selectedWorkspaceId:r,onWorkspaceSelected:s}),[m,r,s,n,u]);return i.createElement(workspace_picker_modal,{modalProps:E,selectProps:C})};g.displayName="SelectWorkspaceToAdmin";let y=g},0x50b7c4f6:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x99233ecb),i=a(0x1ed656589),l=a(0x2501a2cee),o=a(0x145c24a0e),s=a.n(o);function AdminPeekMenuItem({ariaDescribedBy:e,ariaLabel:t,svgIconName:a,id:i,href:o,onClick:c,children:d,badgeProps:m,...u}){let getIcon=()=>a?n.createElement("div",{className:s().menuItemIcon},n.createElement(l.Ah,{name:a,size:"16",inline:!0})):void 0;return getIcon.displayName="getIcon",n.createElement(r.Dr,{ariaLabel:t,ariaDescribedBy:e,icon:getIcon(),target:"_blank",showLinkIndicatorIcon:!1,href:o,onSelected:c,...m,...u},d)}AdminPeekMenuItem.displayName="AdminPeekMenuItem";let c=(0,i.Ay)(AdminPeekMenuItem)},0x1ad587e3c:(e,t,a)=>{"use strict";a.d(t,{Cr:()=>X,Ay:()=>et});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x120c268ad),s=a.n(o),c=a(0x20482ad21),d=a(0x5373464c),m=a(0x99233ecb),u=a(0x1a3c2e1af),p=a(0x2501a2cee),h=a(0x2be3dfd3),_=a(0x16e0cc226),f=a(0x356dab23),b=a.n(f);let g=new c.Ay("ia4");function AdminPeekCurrentPlanMenuItem({urlText:e,teamPlanTitle:t}){return i.createElement(h.A,{className:b().container,alignItems:"center",gap:12},i.createElement(h.A,null,i.createElement("img",{className:b().slackLogo,src:_,alt:"Slack app logo"})),i.createElement(h.A,{flexDirection:"column"},i.createElement("div",{className:b().header},g.t("Current plan",{fallbackHash:"440a9f2ca18e6b2247e5a569e231fe161de46717",fallbackHashNs:"pricing_plans"})),i.createElement("div",{className:b().planName},t)),i.createElement(h.A,{className:b().link},e))}AdminPeekCurrentPlanMenuItem.displayName="AdminPeekCurrentPlanMenuItem";var y=a(0x50b7c4f6),A=a(0x88d7fe76),x=a(0x1de65b9a4),E=a(0x1789e94fa),C=a(0x5b1935a6);let k=i.lazy(()=>Promise.resolve().then(a.bind(a,0x2b3d7502)).then(e=>({default:e.PlusTrialOfferAdminMenuBottomBanner}))),v=i.lazy(()=>Promise.resolve().then(a.bind(a,0x9608d09)).then(e=>({default:e.PlusRequestToPurchaseAdminMenuBanner}))),S=i.lazy(()=>Promise.resolve().then(a.bind(a,0x17374b5a0)).then(e=>({default:e.DownmarketAdminTrialBanner}))),I={spaceName:C.xu.ADMIN_MENU_BOTTOM_BANNER,notifications:{[C.ze.PLUS_TRIAL_SLACK_AI_OFFER_ADMIN_MENU_BOTTOM_BANNER]:{component:k},[C.ze.PLUS_REQUEST_TO_PURCHASE_ADMIN_MENU_BANNER]:{component:v},[C.ze.DOWNMARKET_CRM_TENURED_UPGRADE_BANNER]:{component:S}}};var w=a(0x11036d95f),T=a(0x10027d8bc),N=a(0x248e197a3),M=a(0x5358f344),R=a(0xa1832ae4),P=a(0x2209fd06a),L=a(0x2053fa1a7),O=a(0x16c7f7638),D=a(0x1abe76423),F=a(0x10b952946),U=a(0x190a9df19),B=a(0xfb9cbb1),H=a(0x84f62144),W=a(0x1ccef1c6f),V=a(0x10b12d2ae),G=a(0x226892387),q=a(0x21bfacd01),j=a(0x15257bc0b),z=a(0x18daff603),K=a(0xb9604b6),$=a(0x1ee439e69),Y=a(0x19895585a),Q=a(0x145c24a0e),Z=a.n(Q);let J=new c.Ay("ia4"),X=(0,n.DA)()?e=>{let t,a,n,o,c,h,_,f,b,g,A,C,k,v,S,N,W,q,z,K,Y,Q,X,ee,et,ea,en,er,ei,el,eo,es,ec,ed,em,eu,ep,eh,e_,ef,eb,eg,ey,eA,ex,eE,eC,ek,ev,eS,eI,ew,eT,eN,eM,eR,eP=(0,r.c)(180),{restoreFocusFn:eL}=e,eO=(0,l.wA)(),eD=(0,G.d4)(j.HP),eF=(0,G.d4)(T.ZV),eU=(0,G.d4)($.H7);eP[0]!==eU?(t=(0,R.ZT)(eU)??void 0,eP[0]=eU,eP[1]=t):t=eP[1];let eB=t;eP[2]!==eU?(a=(0,R.Zl)(eU),eP[2]=eU,eP[3]=a):a=eP[3];let eH=a;eP[4]!==eU?(n=(0,R.lk)(eU),eP[4]=eU,eP[5]=n):n=eP[5];let eW=n;eP[6]!==eB?(o=e=>(0,U.p2)(e,eB),eP[6]=eB,eP[7]=o):o=eP[7];let eV=(0,G.d4)(o),eG=(0,G.d4)(_temp),eq=(0,G.Z2)(D.P),ej=(0,G.d4)(B.k),ez=(0,G.d4)(F._),eK=(0,G.d4)(M.U),e$=(eV||eG)??!1,eY=ej||ez;eP[8]!==eB||eP[9]!==eq?(c=eq.includes(eB),eP[8]=eB,eP[9]=eq,eP[10]=c):c=eP[10];let eQ=c;eP[11]!==eU?(h=(0,R.tc)(eU),eP[11]=eU,eP[12]=h):h=eP[12];let eZ=!h,eJ=(0,G.d4)(L.A),eX=(0,G.d4)(P.Ak),e0=(0,G.d4)(P.e_),e1=(0,G.d4)(H.CJ),e2=(0,G.d4)(O.S),e4=(0,G.d4)($.H7);eP[13]!==e4?(_=(0,R.S5)(e4),eP[13]=e4,eP[14]=_):_=eP[14];let e5=`https://app.${_}/apps-manage/${eB}/integrations/installed`;eP[15]!==eO?(f=()=>{eO((0,V.A)())},eP[15]=eO,eP[16]=f):f=eP[16];let e3=f,{numToReview:e6}=(0,G.d4)(j.i9)??{numToReview:0};eP[17]!==eH?(b=e=>`${eH}${e}`,eP[17]=eH,eP[18]=b):b=eP[18];let e8=b;eP[19]!==eF?(g=eF?J.t("Automated messages"):J.t("Slackbot"),eP[19]=eF,eP[20]=g):g=eP[20],eP[21]===Symbol.for("react.memo_cache_sentinel")?(A=J.t("Workspace settings",{fallbackHash:"d90ec0b9a7d549b0c8f25b6426290f66c4e3a98b"}),eP[21]=A):A=eP[21];let e7=e8("admin/settings");eP[22]!==e7?(C={label:A,href:e7,iconName:"buildings-filled"},eP[22]=e7,eP[23]=C):C=eP[23],eP[24]===Symbol.for("react.memo_cache_sentinel")?(k={label:J.t("Edit workspace",{fallbackHash:"117ccd2fd76a884c78beb0e12afd60352afa61cd"})},v=J.t("Manage Salesforce organizations",{fallbackHash:"5be3444db64df63f30dc120fb64b76730af88744"}),eP[24]=k,eP[25]=v):(k=eP[24],v=eP[25]);let e9=e8("admin/salesforce-organizations");eP[26]!==e9?(S={label:v,href:e9},eP[26]=e9,eP[27]=S):S=eP[27],eP[28]===Symbol.for("react.memo_cache_sentinel")?(N=J.t("Manage Agentforce"),eP[28]=N):N=eP[28];let te=e8("admin/agentforce");eP[29]!==te?(W={label:N,href:te},eP[29]=te,eP[30]=W):W=eP[30],eP[31]===Symbol.for("react.memo_cache_sentinel")?(q=J.t("Manage members",{fallbackHash:"0fa9d9046de519c4b43ba567342a77d28f6b2046"}),eP[31]=q):q=eP[31];let tt=e8("admin");eP[32]!==tt?(z={label:q,href:tt},eP[32]=tt,eP[33]=z):z=eP[33],eP[34]===Symbol.for("react.memo_cache_sentinel")?(K=J.t("Manage roles",{fallbackHash:"5f9b853170a9aa1bfabb5b1d8abdb7d6d3b665bc"}),eP[34]=K):K=eP[34];let ta=e8("admin/roles");eP[35]!==ta?(Y={label:K,href:ta},eP[35]=ta,eP[36]=Y):Y=eP[36],eP[37]===Symbol.for("react.memo_cache_sentinel")?(Q=J.t("Slack Connect invites",{fallbackHash:"94da5dfca41ac4b77e083f25434c03d98f0e1261"}),eP[37]=Q):Q=eP[37];let tn=e8("admin/slack-connect-invitations");eP[38]!==tn?(X={label:Q,href:tn},eP[38]=tn,eP[39]=X):X=eP[39],eP[40]===Symbol.for("react.memo_cache_sentinel")?(ee=J.t("Apps & workflows",{fallbackHash:"97337ba69c821713ddfa8397521126bf7ebc511d"}),eP[40]=ee):ee=eP[40],eP[41]!==e5?(et={label:ee,href:e5},eP[41]=e5,eP[42]=et):et=eP[42],eP[43]===Symbol.for("react.memo_cache_sentinel")?(ea=J.t("Manage audit logs",{fallbackHash:"0ae4f1b57e4f2bcc957543c739dbf238280137a0"}),eP[43]=ea):ea=eP[43];let tr=e8("admin/audit_logs");eP[44]!==tr?(en={label:ea,href:tr},eP[44]=tr,eP[45]=en):en=eP[45],eP[46]===Symbol.for("react.memo_cache_sentinel")?(er=J.t("Data exports",{fallbackHash:"41a24227f2fb92369d67274acae13d32f5b71622"}),eP[46]=er):er=eP[46];let ti=e8("services/export");eP[47]!==ti?(ei={label:er,href:ti},eP[47]=ti,eP[48]=ei):ei=eP[48],eP[49]===Symbol.for("react.memo_cache_sentinel")?(el=J.t("Workspace analytics",{fallbackHash:"35bd515cd8539a184bcf397a5dc98051a616260e"}),eP[49]=el):el=eP[49];let tl=e8("stats");eP[50]!==tl?(eo={label:el,href:tl},eP[50]=tl,eP[51]=eo):eo=eP[51],eP[52]!==eD?(es=eD?J.t("Admin security advisor",{fallbackHash:"f2a4624929c77947451c3109e262218488e604b7"}):"",eP[52]=eD,eP[53]=es):es=eP[53];let to=e8("admin/advisor");eP[54]!==e6?(ec=e6>0?{badgeCount:e6,badgeVariant:d.c.warning}:void 0,eP[54]=e6,eP[55]=ec):ec=eP[55],eP[56]!==es||eP[57]!==to||eP[58]!==ec?(ed={label:es,href:to,badgeProps:ec},eP[56]=es,eP[57]=to,eP[58]=ec,eP[59]=ed):ed=eP[59],eP[60]===Symbol.for("react.memo_cache_sentinel")?(em=J.t("Name and URL"),eP[60]=em):em=eP[60],eP[61]!==e3?(eu={label:em,onClick:e3},eP[61]=e3,eP[62]=eu):eu=eP[62],eP[63]===Symbol.for("react.memo_cache_sentinel")?(ep=J.t("Workspace icon",{fallbackHash:"4a71f2114b2d390a1b127b8adb7c4b7048752237"}),eP[63]=ep):ep=eP[63];let ts=e8("customize/icon");eP[64]!==ts?(eh={label:ep,href:ts},eP[64]=ts,eP[65]=eh):eh=eP[65],eP[66]===Symbol.for("react.memo_cache_sentinel")?(e_=J.t("Emoji"),eP[66]=e_):e_=eP[66];let tc=e8("customize/emoji");eP[67]!==tc?(ef={label:e_,href:tc},eP[67]=tc,eP[68]=ef):ef=eP[68];let td=g,tm=e8(eF?"customize/automated-messages":"customize/slackbot");eP[69]!==g||eP[70]!==tm?(eb={label:td,href:tm},eP[69]=g,eP[70]=tm,eP[71]=eb):eb=eP[71],eP[72]===Symbol.for("react.memo_cache_sentinel")?(eg=J.t("Statuses"),eP[72]=eg):eg=eP[72];let tu=e8("customize/statuses");eP[73]!==tu?(ey={label:eg,href:tu},eP[73]=tu,eP[74]=ey):ey=eP[74],eP[75]===Symbol.for("react.memo_cache_sentinel")?(eA=J.t("Channel prefixes",{fallbackHash:"2923eb520e98d7e7ca7d06caf724eda8ae16d67c"}),eP[75]=eA):eA=eP[75];let tp=e8("customize/channels");eP[76]!==tp?(ex={label:eA,href:tp},eP[76]=tp,eP[77]=ex):ex=eP[77],eP[78]!==C||eP[79]!==S||eP[80]!==W||eP[81]!==z||eP[82]!==Y||eP[83]!==X||eP[84]!==et||eP[85]!==en||eP[86]!==ei||eP[87]!==eo||eP[88]!==ed||eP[89]!==eu||eP[90]!==eh||eP[91]!==ef||eP[92]!==eb||eP[93]!==ey||eP[94]!==ex?(eE={WorkspaceSettings:C,EditWorkspace:k,ManageSalesforceOrganizations:S,ManageAgentforce:W,ManageMembers:z,ManageRoles:Y,SlackConnectInvites:X,AppsAndWorkflows:et,ManageAuditLogs:en,DataExports:ei,WorkspaceAnalytics:eo,AdminAdvisor:ed,NameAndUrl:eu,WorkspaceIcon:eh,Emoji:ef,Slackbot:eb,Statuses:ey,ChannelPrefixes:ex},eP[78]=C,eP[79]=S,eP[80]=W,eP[81]=z,eP[82]=Y,eP[83]=X,eP[84]=et,eP[85]=en,eP[86]=ei,eP[87]=eo,eP[88]=ed,eP[89]=eu,eP[90]=eh,eP[91]=ef,eP[92]=eb,eP[93]=ey,eP[94]=ex,eP[95]=eE):eE=eP[95];let th=eE;eP[96]!==th.EditWorkspace||eP[97]!==th.WorkspaceSettings?((eC=[]).push(th.WorkspaceSettings),eC.push(th.EditWorkspace),eP[96]=th.EditWorkspace,eP[97]=th.WorkspaceSettings,eP[98]=eC):eC=eP[98],eP[99]!==th.AdminAdvisor||eP[100]!==th.AppsAndWorkflows||eP[101]!==th.DataExports||eP[102]!==th.ManageAgentforce||eP[103]!==th.ManageAuditLogs||eP[104]!==th.ManageMembers||eP[105]!==th.ManageRoles||eP[106]!==th.ManageSalesforceOrganizations||eP[107]!==th.SlackConnectInvites||eP[108]!==th.WorkspaceAnalytics||eP[109]!==eJ||eP[110]!==eY||eP[111]!==eZ||eP[112]!==e0||eP[113]!==e2||eP[114]!==e1||eP[115]!==eX||eP[116]!==eK||eP[117]!==eQ?(ek=[],eX&&ek.push(th.ManageSalesforceOrganizations),e0&&ek.push(th.ManageAgentforce),ek.push(th.ManageMembers),e1&&ek.push(th.ManageRoles),eK&&ek.push(th.SlackConnectInvites),eY&&ek.push(th.AppsAndWorkflows),e2&&ek.push(th.ManageAuditLogs),eZ&&ek.push(th.DataExports),eQ&&ek.push(th.WorkspaceAnalytics),eJ&&ek.push(th.AdminAdvisor),eP[99]=th.AdminAdvisor,eP[100]=th.AppsAndWorkflows,eP[101]=th.DataExports,eP[102]=th.ManageAgentforce,eP[103]=th.ManageAuditLogs,eP[104]=th.ManageMembers,eP[105]=th.ManageRoles,eP[106]=th.ManageSalesforceOrganizations,eP[107]=th.SlackConnectInvites,eP[108]=th.WorkspaceAnalytics,eP[109]=eJ,eP[110]=eY,eP[111]=eZ,eP[112]=e0,eP[113]=e2,eP[114]=e1,eP[115]=eX,eP[116]=eK,eP[117]=eQ,eP[118]=ek):ek=eP[118],eP[119]!==th.ChannelPrefixes||eP[120]!==th.Emoji||eP[121]!==th.NameAndUrl||eP[122]!==th.Slackbot||eP[123]!==th.Statuses||eP[124]!==th.WorkspaceIcon||eP[125]!==eV?(ev=[],eV&&ev.push(th.NameAndUrl),ev.push(th.WorkspaceIcon,th.Emoji,th.Slackbot,th.Statuses,th.ChannelPrefixes),eP[119]=th.ChannelPrefixes,eP[120]=th.Emoji,eP[121]=th.NameAndUrl,eP[122]=th.Slackbot,eP[123]=th.Statuses,eP[124]=th.WorkspaceIcon,eP[125]=eV,eP[126]=ev):ev=eP[126];let t_=ev;eP[127]===Symbol.for("react.memo_cache_sentinel")?(eS=J.t("Admin Tools"),eP[127]=eS):eS=eP[127];let tf=eS;eP[128]!==t_?(eI=e=>i.createElement(m.Ay,{width:325,menuClassNames:Z().submenu,isSubmenu:!0,styleMode:"alternate",...e},t_.map(_temp2)),eP[128]=t_,eP[129]=eI):eI=eP[129];let tb=eI;eP[130]===Symbol.for("react.memo_cache_sentinel")?(ew=i.createElement("div",{className:Z().submenuEditIcon},i.createElement(p.Ah,{name:"edit-filled",size:"16"})),eP[130]=ew):ew=eP[130];let tg=ew,ty=(0,x.L)();eP[131]!==eW||eP[132]!==ty?(eT=()=>"std"===eW?J.t("Slack Pro"):"enterprise"===eW?ty.enterprise:"compliance"===eW?ty.compliance:"plus"===eW?ty.plus:J.t("Free",{fallbackHash:"75f527181b574f84568f33f67adc3b267a6fef9c",fallbackHashNs:"promotions"}),eP[131]=eW,eP[132]=ty,eP[133]=eT):eT=eP[133];let tA=eT,tx=!!(0,G.d4)(_temp3),{maybeClosePeek:tE}=(0,i.useContext)(w.Z);eP[134]!==tE||eP[135]!==eL?(eN=e=>{tE(),"key"in e&&"Escape"===e.key&&eL&&eL()},eP[134]=tE,eP[135]=eL,eP[136]=eN):eN=eP[136];let tC=eN,tk=`${eH}admin/billing`,tv=`${eH}account/workspace-settings`,tS=e$?tk:tv;eP[137]!==e$?(eM=e$?J.t("Manage billing"):J.t("Workspace Info"),eP[137]=e$,eP[138]=eM):eM=eP[138];let tI=eM;if(eP[139]!==th.EditWorkspace||eP[140]!==ek||eP[141]!==tA||eP[142]!==tC||eP[143]!==tb||eP[144]!==eC||eP[145]!==tx||eP[146]!==tS||eP[147]!==tI){let e,t,a,n,r,l,o,c,d,p,h=!tx&&Z().menuBottomPadding;if(eP[149]!==h?(e=s()("p-peek_card--as-card p-peek_card--animate-in",Z().menu,h),eP[149]=h,eP[150]=e):e=eP[150],eP[151]!==tC||eP[152]!==e?(t={width:360,noMargin:!0,onTriggerClose:tC,menuClassNames:e,styleMode:"alternate"},eP[151]=tC,eP[152]=e,eP[153]=t):t=eP[153],eP[154]===Symbol.for("react.memo_cache_sentinel")?(a=i.createElement(m.c$,{label:tf,className:s()("p-peek_card__header",Z().header)}),n=i.createElement(m.bX,{className:Z().separator}),eP[154]=a,eP[155]=n):(a=eP[154],n=eP[155]),eP[156]!==tA||eP[157]!==tS||eP[158]!==tI){let e,t;if(eP[160]!==tS?(e={href:tS,target:"_blank",showLinkIndicatorIcon:!1,className:Z().menuItem},eP[160]=tS,eP[161]=e):e=eP[161],eP[162]!==tA||eP[163]!==tI){let e,a;eP[165]!==tA?(e=tA(),eP[165]=tA,eP[166]=e):e=eP[166],eP[167]!==e||eP[168]!==tI?(a={urlText:tI,teamPlanTitle:e},eP[167]=e,eP[168]=tI,eP[169]=a):a=eP[169],t=i.createElement(AdminPeekCurrentPlanMenuItem,a),eP[162]=tA,eP[163]=tI,eP[164]=t}else t=eP[164];r=i.createElement(m.Dr,e,t),eP[156]=tA,eP[157]=tS,eP[158]=tI,eP[159]=r}else r=eP[159];eP[170]===Symbol.for("react.memo_cache_sentinel")?(l=i.createElement(m.bX,{className:s()(Z().separator,Z().bottomPadding)}),eP[170]=l):l=eP[170],eP[171]!==th.EditWorkspace||eP[172]!==tb||eP[173]!==eC?(o=eC.map(e=>e.label===th.EditWorkspace.label?i.createElement(u.A,{key:`admin_tools_menu_item-${e.label}`,label:e.label,renderSubmenu:tb,icon:tg,className:Z().menuItem}):i.createElement(y.A,{href:e.href,onClick:e.onClick,svgIconName:e.iconName,key:`admin_tools_menu_tem-${e.label}`},e.label)),eP[171]=th.EditWorkspace,eP[172]=tb,eP[173]=eC,eP[174]=o):o=eP[174],eP[175]===Symbol.for("react.memo_cache_sentinel")?(c=i.createElement(m.bX,{className:s()(Z().separator,Z().topPadding,Z().bottomPadding)}),eP[175]=c):c=eP[175],eP[176]!==ek?(d=ek.map(_temp4),eP[176]=ek,eP[177]=d):d=eP[177],eP[178]!==tx?(p=tx&&i.createElement(i.Fragment,null,i.createElement(m.bX,{className:s()(Z().separator,Z().topPadding)}),i.createElement(E.A,{...I,classNameListItem:Z().footerListItem})),eP[178]=tx,eP[179]=p):p=eP[179],eR=i.createElement(m.Ay,t,a,n,r,l,o,c,d,p),eP[139]=th.EditWorkspace,eP[140]=ek,eP[141]=tA,eP[142]=tC,eP[143]=tb,eP[144]=eC,eP[145]=tx,eP[146]=tS,eP[147]=tI,eP[148]=eR}else eR=eP[148];return eR}:({restoreFocusFn:e})=>{let t,a=(0,l.wA)(),n=(0,G.d4)(j.HP),r=(0,G.d4)(T.ZV),o=(0,G.d4)($.H7),c=(0,R.ZT)(o)??void 0,h=(0,R.Zl)(o),_=(0,R.lk)(o),f=(0,G.d4)(e=>(0,U.p2)(e,c)),b=(0,G.d4)(e=>(0,W.ty)(e,"purchaser")),g=f||b,A=(0,G.Z2)(D.P),k=(0,G.d4)(B.k),v=(0,G.d4)(F._),S=(0,G.d4)(M.U),N=g??!1,q=A.includes(c),z=!(0,R.tc)(o),Y=(0,G.d4)(L.A),Q=(0,G.d4)(P.Ak),X=(0,G.d4)(P.e_),ee=(0,G.d4)(H.CJ),et=(0,G.d4)(O.S),ea=`https://app.${(0,R.S5)((0,G.d4)($.H7))}/apps-manage/${c}/integrations/installed`,en=(0,i.useCallback)(()=>{a((0,V.A)())},[a]),{numToReview:er}=(0,G.d4)(j.i9)??{numToReview:0},ei=(0,i.useCallback)(e=>`${h}${e}`,[h]);t=r?J.t("Automated messages"):J.t("Slackbot");let el=(0,i.useMemo)(()=>({WorkspaceSettings:{label:J.t("Workspace settings",{fallbackHash:"d90ec0b9a7d549b0c8f25b6426290f66c4e3a98b"}),href:ei("admin/settings"),iconName:"buildings-filled"},EditWorkspace:{label:J.t("Edit workspace",{fallbackHash:"117ccd2fd76a884c78beb0e12afd60352afa61cd"})},ManageSalesforceOrganizations:{label:J.t("Manage Salesforce organizations",{fallbackHash:"5be3444db64df63f30dc120fb64b76730af88744"}),href:ei("admin/salesforce-organizations")},ManageAgentforce:{label:J.t("Manage Agentforce"),href:ei("admin/agentforce")},ManageMembers:{label:J.t("Manage members",{fallbackHash:"0fa9d9046de519c4b43ba567342a77d28f6b2046"}),href:ei("admin")},ManageRoles:{label:J.t("Manage roles",{fallbackHash:"5f9b853170a9aa1bfabb5b1d8abdb7d6d3b665bc"}),href:ei("admin/roles")},SlackConnectInvites:{label:J.t("Slack Connect invites",{fallbackHash:"94da5dfca41ac4b77e083f25434c03d98f0e1261"}),href:ei("admin/slack-connect-invitations")},AppsAndWorkflows:{label:J.t("Apps & workflows",{fallbackHash:"97337ba69c821713ddfa8397521126bf7ebc511d"}),href:ea},ManageAuditLogs:{label:J.t("Manage audit logs",{fallbackHash:"0ae4f1b57e4f2bcc957543c739dbf238280137a0"}),href:ei("admin/audit_logs")},DataExports:{label:J.t("Data exports",{fallbackHash:"41a24227f2fb92369d67274acae13d32f5b71622"}),href:ei("services/export")},WorkspaceAnalytics:{label:J.t("Workspace analytics",{fallbackHash:"35bd515cd8539a184bcf397a5dc98051a616260e"}),href:ei("stats")},AdminAdvisor:{label:n?J.t("Admin security advisor",{fallbackHash:"f2a4624929c77947451c3109e262218488e604b7"}):"",href:ei("admin/advisor"),badgeProps:er>0?{badgeCount:er,badgeVariant:d.c.warning}:void 0},NameAndUrl:{label:J.t("Name and URL"),onClick:en},WorkspaceIcon:{label:J.t("Workspace icon",{fallbackHash:"4a71f2114b2d390a1b127b8adb7c4b7048752237"}),href:ei("customize/icon")},Emoji:{label:J.t("Emoji"),href:ei("customize/emoji")},Slackbot:{label:t,href:ei(r?"customize/automated-messages":"customize/slackbot")},Statuses:{label:J.t("Statuses"),href:ei("customize/statuses")},ChannelPrefixes:{label:J.t("Channel prefixes",{fallbackHash:"2923eb520e98d7e7ca7d06caf724eda8ae16d67c"}),href:ei("customize/channels")}}),[ea,er,ei,n,r,t,en]),eo=[];eo.push(el.WorkspaceSettings),eo.push(el.EditWorkspace);let es=[];Q&&es.push(el.ManageSalesforceOrganizations),X&&es.push(el.ManageAgentforce),es.push(el.ManageMembers),ee&&es.push(el.ManageRoles),S&&es.push(el.SlackConnectInvites),(k||v)&&es.push(el.AppsAndWorkflows),et&&es.push(el.ManageAuditLogs),z&&es.push(el.DataExports),q&&es.push(el.WorkspaceAnalytics),Y&&es.push(el.AdminAdvisor);let ec=(0,i.useMemo)(()=>{let e=[];return f&&e.push(el.NameAndUrl),e.push(el.WorkspaceIcon,el.Emoji,el.Slackbot,el.Statuses,el.ChannelPrefixes),e},[el,f]),ed=J.t("Admin Tools"),em=(0,i.useCallback)(e=>i.createElement(m.Ay,{width:325,menuClassNames:Z().submenu,isSubmenu:!0,styleMode:"alternate",...e},ec.map(e=>i.createElement(y.A,{href:e.href,onClick:e.onClick,svgIconName:e.iconName,key:`admin_tools_edit_workspace_submenu_item-${e.label}`},e.label))),[ec]),eu=i.createElement("div",{className:Z().submenuEditIcon},i.createElement(p.Ah,{name:"edit-filled",size:"16"})),ep=(0,x.L)(),eh=!!(0,G.d4)(e=>(0,K.Hp)(e,C.xu.ADMIN_MENU_BOTTOM_BANNER)),{maybeClosePeek:e_}=(0,i.useContext)(w.Z),ef=(0,i.useCallback)(t=>{e_(),"key"in t&&"Escape"===t.key&&e&&e()},[e_,e]),eb=`${h}admin/billing`,eg=`${h}account/workspace-settings`,ey=N?J.t("Manage billing"):J.t("Workspace Info");return i.createElement(m.Ay,{width:360,noMargin:!0,onTriggerClose:ef,menuClassNames:s()("p-peek_card--as-card p-peek_card--animate-in",Z().menu,!eh&&Z().menuBottomPadding),styleMode:"alternate"},i.createElement(m.c$,{label:ed,className:s()("p-peek_card__header",Z().header)}),i.createElement(m.bX,{className:Z().separator}),i.createElement(m.Dr,{href:N?eb:eg,target:"_blank",showLinkIndicatorIcon:!1,className:Z().menuItem},i.createElement(AdminPeekCurrentPlanMenuItem,{urlText:ey,teamPlanTitle:"std"===_?J.t("Slack Pro"):"enterprise"===_?ep.enterprise:"compliance"===_?ep.compliance:"plus"===_?ep.plus:J.t("Free",{fallbackHash:"75f527181b574f84568f33f67adc3b267a6fef9c",fallbackHashNs:"promotions"})})),i.createElement(m.bX,{className:s()(Z().separator,Z().bottomPadding)}),eo.map(e=>e.label===el.EditWorkspace.label?i.createElement(u.A,{key:`admin_tools_menu_item-${e.label}`,label:e.label,renderSubmenu:em,icon:eu,className:Z().menuItem}):i.createElement(y.A,{href:e.href,onClick:e.onClick,svgIconName:e.iconName,key:`admin_tools_menu_tem-${e.label}`},e.label)),i.createElement(m.bX,{className:s()(Z().separator,Z().topPadding,Z().bottomPadding)}),es.map(e=>i.createElement(y.A,{href:e.href,badgeProps:e.badgeProps,onClick:e.onClick,svgIconName:e.iconName,key:`admin_tools_menu_item-${e.label}`},e.label)),eh&&i.createElement(i.Fragment,null,i.createElement(m.bX,{className:s()(Z().separator,Z().topPadding)}),i.createElement(E.A,{...I,classNameListItem:Z().footerListItem})))};X.displayName="AdminPeekView";let ee=(0,n.DA)()?e=>{let t,a,n,o,s=(0,r.c)(17),{children:c,restoreFocusFn:d}=e,m=(0,l.wA)(),u=(0,G.d4)(j.HP);s[0]!==m||s[1]!==u?(t=()=>{u&&m((0,z.G)({listType:N.ml.Active}))},a=[u,m],s[0]=m,s[1]=u,s[2]=t,s[3]=a):(t=s[2],a=s[3]),(0,i.useEffect)(t,a),s[4]!==d?(n=()=>i.createElement(X,{restoreFocusFn:d}),s[4]=d,s[5]=n):n=s[5];let p=n,h=(0,G.d4)(q.V),_=6*!h,f=h?-6:-44,b=h?"top-right":void 0;if(s[6]!==c||s[7]!==_||s[8]!==f||s[9]!==b||s[10]!==p){let e;s[12]!==_||s[13]!==f||s[14]!==b||s[15]!==p?(e={allowanceY:4,offsetX:_,offsetY:f,renderContent:p,forceOpenOnClick:!0,peekId:Y.k6.Admin,position:b},s[12]=_,s[13]=f,s[14]=b,s[15]=p,s[16]=e):e=s[16],o=i.createElement(A.A,e,c),s[6]=c,s[7]=_,s[8]=f,s[9]=b,s[10]=p,s[11]=o}else o=s[11];return o}:({children:e,restoreFocusFn:t})=>{let a=(0,l.wA)(),n=(0,G.d4)(j.HP);(0,i.useEffect)(()=>{n&&a((0,z.G)({listType:N.ml.Active}))},[n,a]);let r=(0,i.useCallback)(()=>i.createElement(X,{restoreFocusFn:t}),[t]),o=(0,G.d4)(q.V);return i.createElement(A.A,{allowanceY:4,offsetX:6*!o,offsetY:o?-6:-44,renderContent:r,forceOpenOnClick:!0,peekId:Y.k6.Admin,position:o?"top-right":void 0},e)};ee.displayName="AdminPeekTrigger";let et=ee;function _temp(e){return(0,W.ty)(e,"purchaser")}function _temp2(e){return i.createElement(y.A,{href:e.href,onClick:e.onClick,svgIconName:e.iconName,key:`admin_tools_edit_workspace_submenu_item-${e.label}`},e.label)}function _temp3(e){return(0,K.Hp)(e,C.xu.ADMIN_MENU_BOTTOM_BANNER)}function _temp4(e){return i.createElement(y.A,{href:e.href,badgeProps:e.badgeProps,onClick:e.onClick,svgIconName:e.iconName,key:`admin_tools_menu_item-${e.label}`},e.label)}},0x9608d09:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PlusRequestToPurchaseAdminMenuBanner:()=>P});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x20482ad21),s=a(0x120c268ad),c=a.n(s),d=a(0x8c8bafa3),m=a(0x2501a2cee),u=a(0x50b7c4f6),p=a(0x1c4007162),h=a(0x18a618354),_=a(0xde4f4747),f=a(0xec149dbf),b=a(0x1144076c8),g=a(0x1d0f4d36),y=a(0xe467d35c),A=a(0xa1832ae4),x=a(0x190a9df19),E=a(0x3711e82d),C=a(0x1ccef1c6f),k=a(0x226892387),v=a(0x204f00798),S=a(0x1ee439e69),I=a(0x1221d09da),w=a.n(I);let T=new o.Ay("ia4"),N={eventId:E.EventId.UPGRDEXP_UPSELL_PROMPTS,uiComponentName:E.UiComponentName.ADMIN_MENU_PROMOTIONAL_ENTERPRISE_BANNER,clogImpression:!0,onClick:{enableClogAction:!0}},M=(0,n.DA)()?e=>{let t,a,n,l,o,s,f,b,y,A,x,C,S,I=(0,r.c)(62);I[0]!==e?({isStandardTeam:l,businessPlusOfferModal:t,subtitle:s,experimentbizPlusAdminCtaOptmizationsGroupTreatment:a,userCanPurchase:f,isEligibleForPlusFeatureTrial:n,...o}=e,I[0]=e,I[1]=t,I[2]=a,I[3]=n,I[4]=l,I[5]=o,I[6]=s,I[7]=f):(t=I[1],a=I[2],n=I[3],l=I[4],o=I[5],s=I[6],f=I[7]);let M=(0,k.d4)(v.qA),R=(0,k.d4)(v.s$);I[8]!==a||I[9]!==n||I[10]!==l||I[11]!==f?(b=()=>l?n&&f?T.t("Try Business+ for the price of Pro"):a&&f?T.t("Elevate security & scale operations"):T.t("Do more with Business+"):T.t("Unleash your team\u2019s potential"),I[8]=a,I[9]=n,I[10]=l,I[11]=f,I[12]=b):b=I[12];let P=b;I[13]!==a||I[14]!==n||I[15]!==l||I[16]!==s||I[17]!==f?(y=()=>s?s:l?f&&n||f&&a?T.t("Unlock SSO, automated user management, data exports, channel management and more."):T.t("Get Slack AI, advanced security, global compliance tools, and more"):T.t("Get access to multiple workspaces and advanced search with Enterprise Grid."),I[13]=a,I[14]=n,I[15]=l,I[16]=s,I[17]=f,I[18]=y):y=I[18];let L=y;if(I[19]!==n){let e,t;I[21]===Symbol.for("react.memo_cache_sentinel")?(e={className:w().badgeWrapper},I[21]=e):e=I[21],I[22]===Symbol.for("react.memo_cache_sentinel")?(t={className:w().badge},I[22]=t):t=I[22],A=i.createElement("div",e,i.createElement("span",t,n?i.createElement(p.m,{ariaHidden:!0,size:g.vj.Large}):i.createElement(h.y,{ariaHidden:!0,size:g.vj.Large}))),I[19]=n,I[20]=A}else A=I[20];let O=A;I[23]===Symbol.for("react.memo_cache_sentinel")?(x={businessPlusEntryPoint:E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER,enableOnClickClogAction:!0},I[23]=x):x=I[23];let D=(0,_.Jg)(x);I[24]!==M||I[25]!==D||I[26]!==R||I[27]!==l||I[28]!==f?(C=()=>{let e=l?D:N;return l&&f&&R?{...e,elementValue:`${E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER}_${M}`}:e},I[24]=M,I[25]=D,I[26]=R,I[27]=l,I[28]=f,I[29]=C):C=I[29];let F=C;if(I[30]!==O||I[31]!==t||I[32]!==L||I[33]!==P||I[34]!==F||I[35]!==l||I[36]!==o){let e,a,n,r;I[38]!==F?(e=F(),I[38]=F,I[39]=e):e=I[39];let s=l?t:void 0;if(I[40]!==l?(a=l?void 0:`https://${(0,d.Xk)()}/enterprise`,I[40]=l,I[41]=a):a=I[41],I[42]!==o||I[43]!==e||I[44]!==s||I[45]!==a?(n={showLinkIndicatorIcon:!1,autoClogProps:e,onSelected:s,href:a,...o},I[42]=o,I[43]=e,I[44]=s,I[45]=a,I[46]=n):n=I[46],I[47]!==O||I[48]!==L||I[49]!==P||I[50]!==l){let e,t,a,n,o,s;if(I[52]===Symbol.for("react.memo_cache_sentinel")?(e={className:c()(w().banner,w().gradientBackground)},I[52]=e):e=I[52],I[53]===Symbol.for("react.memo_cache_sentinel")?(t={className:w().bannerContent},I[53]=t):t=I[53],I[54]===Symbol.for("react.memo_cache_sentinel")?(a={className:w().textContent},I[54]=a):a=I[54],I[55]!==P){let e;I[57]===Symbol.for("react.memo_cache_sentinel")?(e={className:w().title},I[57]=e):e=I[57],n=i.createElement("div",e,P()),I[55]=P,I[56]=n}else n=I[56];if(I[58]!==L){let e;I[60]===Symbol.for("react.memo_cache_sentinel")?(e={className:w().subtitle},I[60]=e):e=I[60],o=i.createElement("div",e,L()),I[58]=L,I[59]=o}else o=I[59];let d=i.createElement("div",a,l&&O,n,o);I[61]===Symbol.for("react.memo_cache_sentinel")?(s=i.createElement("div",{className:w().iconWrapper},i.createElement("div",{className:w().icon},i.createElement(m.Ah,{name:"arrow-up-circle-filled",size:"20"}))),I[61]=s):s=I[61],r=i.createElement("div",e,i.createElement("div",t,d,s)),I[47]=O,I[48]=L,I[49]=P,I[50]=l,I[51]=r}else r=I[51];S=i.createElement(u.A,n,r),I[30]=O,I[31]=t,I[32]=L,I[33]=P,I[34]=F,I[35]=l,I[36]=o,I[37]=S}else S=I[37];return S}:({isStandardTeam:e,businessPlusOfferModal:t,subtitle:a,experimentbizPlusAdminCtaOptmizationsGroupTreatment:n,userCanPurchase:r,isEligibleForPlusFeatureTrial:l,...o})=>{let s=(0,k.d4)(v.qA),f=(0,k.d4)(v.s$),b=(0,i.useCallback)(()=>e?l&&r?T.t("Try Business+ for the price of Pro"):n&&r?T.t("Elevate security & scale operations"):T.t("Do more with Business+"):T.t("Unleash your team\u2019s potential"),[n,l,e,r]),y=(0,i.useCallback)(()=>a?a:e?r&&l||r&&n?T.t("Unlock SSO, automated user management, data exports, channel management and more."):T.t("Get Slack AI, advanced security, global compliance tools, and more"):T.t("Get access to multiple workspaces and advanced search with Enterprise Grid."),[n,l,e,a,r]),A=i.createElement("div",{className:w().badgeWrapper},i.createElement("span",{className:w().badge},l?i.createElement(p.m,{ariaHidden:!0,size:g.vj.Large}):i.createElement(h.y,{ariaHidden:!0,size:g.vj.Large}))),x=(0,_.Jg)({businessPlusEntryPoint:E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER,enableOnClickClogAction:!0}),C=(0,i.useCallback)(()=>{let t=e?x:N;return e&&r&&f?{...t,elementValue:`${E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER}_${s}`}:t},[s,x,f,e,r]);return i.createElement(u.A,{showLinkIndicatorIcon:!1,autoClogProps:C(),onSelected:e?t:void 0,href:e?void 0:`https://${(0,d.Xk)()}/enterprise`,...o},i.createElement("div",{className:c()(w().banner,w().gradientBackground)},i.createElement("div",{className:w().bannerContent},i.createElement("div",{className:w().textContent},e&&A,i.createElement("div",{className:w().title},b()),i.createElement("div",{className:w().subtitle},y())),i.createElement("div",{className:w().iconWrapper},i.createElement("div",{className:w().icon},i.createElement(m.Ah,{name:"arrow-up-circle-filled",size:"20"}))))))};function _temp(e){return(0,C.ty)(e,"purchaser")}M.displayName="AdminPeekFooterUpsellBanner",((0,n.DA)()?e=>{let t,a,n,o,s,c,d=(0,r.c)(24),m=(0,l.wA)(),u=(0,k.d4)(S.H7);d[0]!==u?(t=(0,A.KJ)(u),d[0]=u,d[1]=t):t=d[1];let p=t,h=(0,k.d4)(v.aG);d[2]!==u.id?(a=e=>(0,x.p2)(e,u.id),d[2]=u.id,d[3]=a):a=d[3];let _=(0,k.d4)(a),g=(0,k.d4)(_temp);d[4]===Symbol.for("react.memo_cache_sentinel")?(n={reason:"admin_menu_bar_promo"},d[4]=n):n=d[4];let C=(0,y.H)(n)===y.f.TrialEligible;d[5]!==m?(o=()=>m((0,f.W)({entryPoint:E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER})),d[5]=m,d[6]=o):o=d[6];let I=o;d[7]!==m?(s=()=>{m((0,b.M)({uiComponentName:E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER,highLightAIFeature:!1}))},d[7]=m,d[8]=s):s=d[8];let w=s,T=p&&(_||g)&&C?w:I;if(d[9]!==h||d[10]!==C||d[11]!==_||d[12]!==p||d[13]!==T||d[14]!==e||d[15]!==g){let t,a=_||g;d[17]!==h||d[18]!==C||d[19]!==p||d[20]!==T||d[21]!==e||d[22]!==a?(t={...e,isStandardTeam:p,businessPlusOfferModal:T,experimentbizPlusAdminCtaOptmizationsGroupTreatment:h,userCanPurchase:a,isEligibleForPlusFeatureTrial:C},d[17]=h,d[18]=C,d[19]=p,d[20]=T,d[21]=e,d[22]=a,d[23]=t):t=d[23],c=i.createElement(M,t),d[9]=h,d[10]=C,d[11]=_,d[12]=p,d[13]=T,d[14]=e,d[15]=g,d[16]=c}else c=d[16];return c}:e=>{let t=(0,l.wA)(),a=(0,k.d4)(S.H7),n=(0,A.KJ)(a),r=(0,k.d4)(v.aG),o=(0,k.d4)(e=>(0,x.p2)(e,a.id)),s=(0,k.d4)(e=>(0,C.ty)(e,"purchaser")),c=(0,y.H)({reason:"admin_menu_bar_promo"})===y.f.TrialEligible,d=(0,i.useCallback)(()=>t((0,f.W)({entryPoint:E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER})),[t]),m=(0,i.useCallback)(()=>{t((0,b.M)({uiComponentName:E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER,highLightAIFeature:!1}))},[t]),u=n&&(o||s)&&c?m:d;return i.createElement(M,{...e,isStandardTeam:n,businessPlusOfferModal:u,experimentbizPlusAdminCtaOptmizationsGroupTreatment:r,userCanPurchase:o||s,isEligibleForPlusFeatureTrial:c})}).displayName="ConnectedAdminPeekFooterUpsellBanner";let R=new o.Ay("ia4"),P=(0,n.DA)()?e=>{let t,a,n,o,s,c,d,m,u=(0,r.c)(27),p=(0,l.wA)(),h=(0,k.d4)(S.H7);u[0]!==h?(t=(0,A.KJ)(h),u[0]=h,u[1]=t):t=u[1];let _=t,b=E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER,g=(0,k.d4)(v.aG);u[2]===Symbol.for("react.memo_cache_sentinel")?(a={reason:"admin_menu_bar_promo"},u[2]=a):a=u[2];let C=(0,y.H)(a)===y.f.TrialEligible;u[3]!==h.id?(n=e=>(0,x.p2)(e,h.id),u[3]=h.id,u[4]=n):n=u[4];let I=(0,k.d4)(n),w=(0,k.d4)(plus_request_to_purchase_admin_menu_banner_temp),T=!!(I||w);u[5]!==p||u[6]!==_||u[7]!==T?(o=()=>{_&&T&&p((0,v.Xi)())},u[5]=p,u[6]=_,u[7]=T,u[8]=o):o=u[8],u[9]!==p||u[10]!==g||u[11]!==_||u[12]!==T?(s=[p,g,_,T],u[9]=p,u[10]=g,u[11]=_,u[12]=T,u[13]=s):s=u[13],(0,i.useEffect)(o,s),u[14]!==p?(c=()=>p((0,f.W)({entryPoint:b})),u[14]=p,u[15]=c):c=u[15];let N=c;e:{let e;if(g&&T&&_){let e;u[16]!==g?(e=g?R.t("Unlock SSO, automated user management, data exports, channel management and more."):"",u[16]=g,u[17]=e):e=u[17],d=e;break e}u[18]===Symbol.for("react.memo_cache_sentinel")?(e=R.t("More analytics, data exports, control and access."),u[18]=e):e=u[18],d=e}let P=d;return u[19]!==g||u[20]!==C||u[21]!==_||u[22]!==N||u[23]!==e||u[24]!==P||u[25]!==T?(m=i.createElement(M,{isStandardTeam:_,businessPlusOfferModal:N,subtitle:P,experimentbizPlusAdminCtaOptmizationsGroupTreatment:g,isEligibleForPlusFeatureTrial:C,...e,userCanPurchase:T}),u[19]=g,u[20]=C,u[21]=_,u[22]=N,u[23]=e,u[24]=P,u[25]=T,u[26]=m):m=u[26],m}:e=>{let t=(0,l.wA)(),a=(0,k.d4)(S.H7),n=(0,A.KJ)(a),r=E.UiComponentName.BUSINESS_PLUS_ADMIN_MENU_BOTTOM_BANNER_TRIGGER,o=(0,k.d4)(v.aG),s=(0,y.H)({reason:"admin_menu_bar_promo"})===y.f.TrialEligible,c=(0,k.d4)(e=>(0,x.p2)(e,a.id)),d=(0,k.d4)(e=>(0,C.ty)(e,"purchaser")),m=!!(c||d);(0,i.useEffect)(()=>{n&&m&&t((0,v.Xi)())},[t,o,n,m]);let u=(0,i.useCallback)(()=>t((0,f.W)({entryPoint:r})),[t,r]),p=(0,i.useMemo)(()=>o&&m&&n?o?R.t("Unlock SSO, automated user management, data exports, channel management and more."):"":R.t("More analytics, data exports, control and access."),[o,n,m]);return i.createElement(M,{isStandardTeam:n,businessPlusOfferModal:u,subtitle:p,experimentbizPlusAdminCtaOptmizationsGroupTreatment:o,isEligibleForPlusFeatureTrial:s,...e,userCanPurchase:m})};function plus_request_to_purchase_admin_menu_banner_temp(e){return(0,C.ty)(e,"purchaser")}P.displayName="PlusRequestToPurchaseAdminMenuBanner"},0x104daa6a5:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x18f2150ea),o=a(0xef503114),s=a(0x20482ad21),c=a(0x19895585a);let d=new s.Ay("client");function getTabAriaDescription(e,t){return!(0,l.A)(t)||(0,o.A)(t)||0===t?null:({get[c.k6.Home](){return d.t("with unreads",{fallbackHash:"08f53bb533ed3306e2efcc5fc8bf8b2daca3127f",fallbackHashNs:"client"})},get[c.k6.DMs](){return d.t("{badgeCounts, plural, =1 {# unread} other {# unreads}}",{badgeCounts:t,fallbackHash:"76fcbfb007590d10fabb287bc4b343d5e19bfaba",fallbackHashNs:"client"})},get[c.k6.Activity](){return d.t("{badgeCounts, plural, =1 {# notification} other {# notifications}}",{badgeCounts:t})},get[c.k6.ActivityInbox](){return d.t("{badgeCounts, plural, =1 {# notification} other {# notifications}}",{badgeCounts:t})},get[c.k6.ActivityInboxSidebarPrototype](){return d.t("{badgeCounts, plural, =1 {# notification} other {# notifications}}",{badgeCounts:t})},get[c.k6.Later](){return d.t("{badgeCounts, plural, =1 {# notification} other {# notifications}}",{badgeCounts:t,fallbackHash:"b6ea7ac0be24273cb26b5ffab8311349111869be",fallbackHashNs:"client"})},get[c.k6.LaterSidebarPrototype](){return d.t("{badgeCounts, plural, =1 {# notification} other {# notifications}}",{badgeCounts:t})},get[c.k6.Browse](){return d.t("{badgeCounts, plural, =1 {# notification} other {# notifications}}",{badgeCounts:t,fallbackHash:"b6ea7ac0be24273cb26b5ffab8311349111869be",fallbackHashNs:"client"})},[c.k6.Search]:null,[c.k6.Platform]:null,[c.k6.Huddles]:null,[c.k6.SalesHome]:null,[c.k6.Todos]:null,[c.k6.Records]:null,[c.k6.Assistant]:null,get[c.k6.UnifiedFiles](){return d.t("with unread starred files",{fallbackHash:"08f53bb533ed3306e2efcc5fc8bf8b2daca3127f",fallbackHashNs:"client"})},[c.k6.Solutions]:null,[c.k6.Agents]:null,[c.k6.Sidekicks]:null,[c.k6.SlackKitPlayground]:null,[c.k6.BBM]:null,[c.k6.Admin]:null,[c.k6.Today]:null,[c.k6.SearchSidebarPrototype]:null})[e]}var m=a(0x1ef448e88);let u=(0,n.DA)()?e=>{let t,a,n,l=(0,r.c)(10),{tab:o,badgeCount:s}=e;l[0]!==o?(t=(0,m.A)(o),l[0]=o,l[1]=t):t=l[1];let c=t;l[2]!==s||l[3]!==o?(a=getTabAriaDescription(o,s),l[2]=s,l[3]=o,l[4]=a):a=l[4];let d=a;if(!d)return null;if(l[5]!==c||l[6]!==d){let e;l[8]!==c?(e={id:c,hidden:!0},l[8]=c,l[9]=e):e=l[9],n=i.createElement("div",e,d),l[5]=c,l[6]=d,l[7]=n}else n=l[7];return n}:({tab:e,badgeCount:t})=>{let a=(0,m.A)(e),n=(0,i.useMemo)(()=>getTabAriaDescription(e,t),[t,e]);return n?i.createElement("div",{id:a,hidden:!0},n):null};u.displayName="BadgeAriaDescription";let p=u},0x14d6bb998:(e,t,a)=>{"use strict";a.d(t,{N:()=>r,s:()=>n});let n={TAB_RAIL_DESKTOP:"tab_rail_desktop",TAB_RAIL_HOME_BUTTON:"tab_rail_home_button",TAB_RAIL_DMS_BUTTON:"tab_rail_dms_button",TAB_RAIL_ACTIVITY_BUTTON:"tab_rail_activity_button",TAB_RAIL_FILES_BUTTON:"tab_rail_files_button",TAB_RAIL_CALENDAR_BUTTON:"tab_rail_calendar_button",TAB_RAIL_SALESHOME_BUTTON:"tab_rail_saleshome_button",TAB_RAIL_ITEMS_BUTTON:"tab_rail_items_button",TAB_RAIL_CRM_BUTTON:"tab_rail_crm_button",TAB_RAIL_LATER_BUTTON:"tab_rail_later_button",TAB_RAIL_TODOS_BUTTON:"tab_rail_todos_button",TAB_RAIL_BROWSE_BUTTON:"tab_rail_browse_button",TAB_RAIL_MAGIC_ACTIONS_BUTTON:"tab_rail_magic_actions_button",TAB_RAIL_AGENTFORCE_BUTTON:"tab_rail_agentforce_button",TAB_RAIL_AGENT_BROWSER_BUTTON:"tab_rail_agent_browser_button",TAB_RAIL_SIDEKICK_BUTTON:"tab_rail_sidekick_button"},r=99},0x1e81aad14:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x410829f8);function UnreadDot({className:e,style:t=l.rY.themed,dataQa:a}){return n.createElement("div",{className:i()("p-unread_dot",e,{"p-unread_dot--dimmed":t===l.rY.dimmed}),"data-qa":a})}UnreadDot.displayName="UnreadDot";let o=UnreadDot},0x390b8716:(e,t,a)=>{"use strict";a.d(t,{P:()=>d});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x1384f171),o=a(0x1ccef1c6f),s=a(0x226892387),c=a(0x19895585a);let d=(0,n.DA)()?(e,t)=>{let a,n=(0,r.c)(5),i=(0,s.d4)(_temp),o=(0,s.d4)(l.Lh),d=e||t||!i,m=e&&!o,u=e&&o;return n[0]!==e||n[1]!==d||n[2]!==m||n[3]!==u?(a={[c.k6.Home]:d,[c.k6.DMs]:e,[c.k6.Activity]:m,[c.k6.ActivityInbox]:u,[c.k6.Browse]:e,[c.k6.Later]:void 0},n[0]=e,n[1]=d,n[2]=m,n[3]=u,n[4]=a):a=n[4],a}:(e,t)=>{let a=(0,s.d4)(e=>!1!==(0,o.ty)(e,"home_unread_dot")),n=(0,s.d4)(l.Lh);return(0,i.useMemo)(()=>({[c.k6.Home]:e||t||!a,[c.k6.DMs]:e,[c.k6.Activity]:e&&!n,[c.k6.ActivityInbox]:e&&n,[c.k6.Browse]:e,[c.k6.Later]:void 0}),[a,t,e,n])};function _temp(e){return!1!==(0,o.ty)(e,"home_unread_dot")}},0x2396248b4:(e,t,a)=>{"use strict";a.d(t,{t:()=>L});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x410829f8),o=a(0x14d6bb998),s=a(0x1e81aad14),c=a(0x162e993e5),d=a(0x135392a7f),m=a(0x1ccef1c6f),u=a(0x226892387),p=a(0x14149c126);let h=(0,n.DA)()?e=>{let{isNarrowWindow:t}=e,a=(0,u.d4)(_temp),{isUserAttentionOnTab:n}=(0,i.useContext)(c.T),{isOpen:r}=(0,i.useContext)(d.x);return!!(0,u.d4)(_temp2)&&(a||t)&&!(n||r)}:({isNarrowWindow:e})=>{let t=(0,u.d4)(e=>(0,m.ty)(e,"ia4_compact_mode")||!1),{isUserAttentionOnTab:a}=(0,i.useContext)(c.T),{isOpen:n}=(0,i.useContext)(d.x);return!!(0,u.d4)(e=>"on"===(0,p._Z)(e,"compact_mode_pref"))&&(t||e)&&!(a||n)};function _temp(e){return(0,m.ty)(e,"ia4_compact_mode")||!1}function _temp2(e){return"on"===(0,p._Z)(e,"compact_mode_pref")}var _=a(0x1384f171),f=a(0x3e058968),b=a(0xbf7d64b),g=a(0x15e3c2e33),y=a(0x1a54d5ba1),A=a(0xfc11c981),x=a(0x850bedf0),E=a(0x217553e42),C=a(0xbd3de346),k=a(0x1cf0d97e1),v=a(0x14ea3ce99),S=a(0x4479e27b),I=a(0x19895585a),w=a(0x9271cc31);let T=(0,k.Ay)(e=>(0,w.e6)(e)!==I.k6.UnifiedFiles&&(0,S.Lq)(e).map(t=>(0,v.Lp)(e,t,!0)).filter(e=>!(0,C.uO)(e)&&!(0,C.aK)(e)).some(e=>e.show_badge));T.meta={name:"shouldShowUnreadMentions",key:"createSelectorShouldShowUnreadMentions",description:e=>(0,w.e6)(e)!==I.k6.UnifiedFiles&&(0,S.Lq)(e).map(t=>(0,v.Lp)(e,t,!0)).filter(e=>!(0,C.uO)(e)&&!(0,C.aK)(e)).some(e=>e.show_badge)};var N=a(0x786f41af);let M=(0,n.DA)()?(e,t,a,n)=>{let l,o,s=(0,r.c)(2),{isOpen:c}=(0,i.useContext)(d.x),m=(0,u.d4)(use_get_mentions_temp),p=(0,u.d4)(use_get_mentions_temp2),b=(0,u.d4)(y.aq),g=(0,u.d4)(y._G),A=(0,u.d4)(_temp3);s[0]!==t?(l={isNarrowWindow:t},s[0]=t,s[1]=l):l=s[1];let x=h(l),E=(0,u.d4)(_temp4),C=(0,u.d4)(f.hx),k=(0,u.d4)(_temp5),v=(0,u.d4)(_.Lh),S=(0,u.d4)(_.IW),w=(0,u.d4)(_.QT),M=(0,u.d4)(_temp6),R=(0,u.d4)(_.Jw),P=(0,u.d4)(_.kZ),L=(0,u.d4)(N.A).includes(I.k6.Later),O=(0,u.d4)(T);e:{let t=a?.[I.k6.DMs]??0;if(e===I.k6.Home){let e=(a?.[I.k6.Home]??0)>0;if(S){o=e||x;break e}o=e||!p&&t>0&&x;break e}if(e===I.k6.DMs&&t>0&&(v&&R&&!P||m)){if(c){o=!1;break e}o=!0;break e}if(e===I.k6.DMs&&t>0&&P){o=!1;break e}let r=v?I.k6.ActivityInbox:I.k6.Activity;if(e===r){let e=a?.[r]??0;if(S){o=e>0&&x;break e}let n=e>0;if(A&&!n&&b>0||v&&(b>0||t>0||g)&&!n){o=!0;break e}o=e>0&&x;break e}if(e===I.k6.Browse){let e=a?.[I.k6.Browse]??0;if(!(e>0)&&(C&&!E||k&&n)){o=!0;break e}let t=a?.[I.k6.Later]??0;if(v&&S&&w&&!L&&e>0&&e===t){o=!1;break e}}if(e===I.k6.UnifiedFiles){o=M&&O;break e}o=(a?.[e]??0)>0&&x}return o}:(e,t,a,n)=>{let{isOpen:r}=(0,i.useContext)(d.x),l=(0,u.d4)(e=>(0,m.ty)(e,"ia4_compact_mode")),o=(0,u.d4)(e=>(0,A.a)(e,I.k6.DMs)),s=(0,u.d4)(y.aq),c=(0,u.d4)(y._G),x=(0,u.d4)(e=>!(0,m.ty)(e,"activity_include_threads_in_badge_count")),E=h({isNarrowWindow:t}),C=(0,u.d4)(e=>(0,m.ty)(e,"seen_sidebar_tabrail_more_automations_callout")),k=(0,u.d4)(f.hx),v=(0,u.d4)(e=>(0,g.U)(e)&&"on"!==(0,p._Z)(e,"external_workspaces_add_to_home_v2",!1)&&(0,b.I)(e).browseTab),S=(0,u.d4)(_.Lh),w=(0,u.d4)(_.IW),M=(0,u.d4)(_.QT),R=(0,u.d4)(e=>"on"===(0,p._Z)(e,"unified_files_badge_tab")),P=(0,u.d4)(_.Jw),L=(0,u.d4)(_.kZ),O=(0,u.d4)(N.A).includes(I.k6.Later),D=(0,u.d4)(T),F=k&&!C||v&&n;return(0,i.useMemo)(()=>{let t=a?.[I.k6.DMs]??0;if(e===I.k6.Home){let e=(a?.[I.k6.Home]??0)>0;return w?e||E:e||!o&&t>0&&E}if(e===I.k6.DMs&&t>0&&(S&&P&&!L||l))return!r;if(e===I.k6.DMs&&t>0&&L)return!1;let n=S?I.k6.ActivityInbox:I.k6.Activity;if(e===n){let e=a?.[n]??0;if(w)return e>0&&E;let r=e>0,i=x&&!r&&s>0,l=S&&(s>0||t>0||c)&&!r;return!!i||!!l||e>0&&E}if(e===I.k6.Browse){let e=a?.[I.k6.Browse]??0;if(!(e>0)&&F)return!0;let t=S&&w&&M,n=a?.[I.k6.Later]??0;if(t&&!O&&e>0&&e===n)return!1}return e===I.k6.UnifiedFiles?R&&D:(a?.[e]??0)>0&&E},[e,a,E,o,x,s,c,F,D,r,R,S,P,w,M,L,O,l])},R=(0,n.DA)()?(e,t,a)=>{let n,i,l=(0,r.c)(2),o=(0,u.d4)(_temp7),s=(0,u.d4)(_.Lh);l[0]!==t?(n={isNarrowWindow:t},l[0]=t,l[1]=n):n=l[1];let c=h(n);e:{if(e===I.k6.Home){let e=a?.[I.k6.DMs]??0;if(s&&!o){i=!1;break e}i=!o&&e>0&&!c;break e}i=(a?.[e]??0)>0&&!c}return i}:(e,t,a)=>{let n=(0,u.d4)(e=>(0,A.a)(e,I.k6.DMs)),r=(0,u.d4)(_.Lh),l=h({isNarrowWindow:t});return(0,i.useMemo)(()=>{if(e===I.k6.Home){let e=a?.[I.k6.DMs]??0;return(!r||!!n)&&!n&&e>0&&!l}return(a?.[e]??0)>0&&!l},[a,n,l,e,r])},P=(0,n.DA)()?(e,t)=>{let a=(0,u.d4)(_.Lh),n=(0,u.d4)(_.IW),r=(0,u.d4)(_.QT),i=(0,u.d4)(_.kZ),l=(0,u.d4)(_temp8),o=(0,u.d4)(E.Sm),s=(0,u.d4)(N.A).includes(I.k6.Later),c=t?.[I.k6.Browse]??0,d=t?.[I.k6.Later]??0;return i&&l&&e===I.k6.DMs?o:a&&n&&r&&!s&&e===I.k6.Browse&&c>0&&d>0?c-d:e!==I.k6.Home?t?.[e]:a&&!l?0:t?.[I.k6.DMs]}:(e,t)=>{let a=(0,u.d4)(_.Lh),n=(0,u.d4)(_.IW),r=(0,u.d4)(_.QT),i=(0,u.d4)(_.kZ),l=(0,u.d4)(e=>(0,A.a)(e,I.k6.DMs)),o=(0,u.d4)(E.Sm),s=(0,u.d4)(N.A).includes(I.k6.Later),c=t?.[I.k6.Browse]??0,d=t?.[I.k6.Later]??0;return i&&l&&e===I.k6.DMs?o:a&&n&&r&&!s&&e===I.k6.Browse&&c>0&&d>0?c-d:e!==I.k6.Home?t?.[e]:a&&!l?0:t?.[I.k6.DMs]},L=(0,n.DA)()?e=>{let t,a=(0,r.c)(32),{tab:n,hideMentions:c,badgeCounts:d,hasBrowseExternalWorkspacesTab:m,isNarrowWindow:p,style:h,badgeShape:_,displayAsHovered:f}=e,b=M(n,p||!1,d,m),g=R(n,p||!1,d),y=P(n,d)??0,A=(0,u.d4)(x.UG);e:{let e;if(c){let e;a[0]===Symbol.for("react.memo_cache_sentinel")?(e={},a[0]=e):e=a[0],t=e;break e}if(n===I.k6.Home&&g){let e,n;if(a[1]!==_||a[2]!==y||a[3]!==f||a[4]!==A||a[5]!==h){let t,n=A?l.HY.dot:_;a[7]!==y||a[8]!==f||a[9]!==h||a[10]!==n?(t={count:y,maxCount:o.N,style:h,shape:n,displayAsHovered:f},a[7]=y,a[8]=f,a[9]=h,a[10]=n,a[11]=t):t=a[11],e=i.createElement(l.Gm,t),a[1]=_,a[2]=y,a[3]=f,a[4]=A,a[5]=h,a[6]=e}else e=a[6];a[12]!==e?(n={badge:e},a[12]=e,a[13]=n):n=a[13],t=n;break e}if(b){let e,n;a[14]!==h?(e=i.createElement(s.A,{style:h}),a[14]=h,a[15]=e):e=a[15],a[16]!==e?(n={dot:e},a[16]=e,a[17]=n):n=a[17],t=n;break e}if(g){let e,n;if(a[18]!==_||a[19]!==y||a[20]!==f||a[21]!==A||a[22]!==h){let t,n=A?l.HY.dot:_;a[24]!==y||a[25]!==f||a[26]!==h||a[27]!==n?(t={count:y,maxCount:o.N,style:h,shape:n,displayAsHovered:f},a[24]=y,a[25]=f,a[26]=h,a[27]=n,a[28]=t):t=a[28],e=i.createElement(l.Gm,t),a[18]=_,a[19]=y,a[20]=f,a[21]=A,a[22]=h,a[23]=e}else e=a[23];a[29]!==e?(n={badge:e},a[29]=e,a[30]=n):n=a[30],t=n;break e}a[31]===Symbol.for("react.memo_cache_sentinel")?(e={},a[31]=e):e=a[31],t=e}return t}:({tab:e,hideMentions:t,badgeCounts:a,hasBrowseExternalWorkspacesTab:n,isNarrowWindow:r,style:c,badgeShape:d,displayAsHovered:m})=>{let p=M(e,r||!1,a,n),h=R(e,r||!1,a),_=P(e,a)??0,f=(0,u.d4)(x.UG);return(0,i.useMemo)(()=>t?{}:e===I.k6.Home&&h?{badge:i.createElement(l.Gm,{count:_,maxCount:o.N,style:c,shape:f?l.HY.dot:d,displayAsHovered:m})}:p?{dot:i.createElement(s.A,{style:c})}:h?{badge:i.createElement(l.Gm,{count:_,maxCount:o.N,style:c,shape:f?l.HY.dot:d,displayAsHovered:m})}:{},[t,e,h,p,_,c,f,d,m])};function use_get_mentions_temp(e){return(0,m.ty)(e,"ia4_compact_mode")}function use_get_mentions_temp2(e){return(0,A.a)(e,I.k6.DMs)}function _temp3(e){return!(0,m.ty)(e,"activity_include_threads_in_badge_count")}function _temp4(e){return(0,m.ty)(e,"seen_sidebar_tabrail_more_automations_callout")}function _temp5(e){return(0,g.U)(e)&&"on"!==(0,p._Z)(e,"external_workspaces_add_to_home_v2",!1)&&(0,b.I)(e).browseTab}function _temp6(e){return"on"===(0,p._Z)(e,"unified_files_badge_tab")}function _temp7(e){return(0,A.a)(e,I.k6.DMs)}function _temp8(e){return(0,A.a)(e,I.k6.DMs)}L.displayName="useGetMentions"},0xd0a2c77f:(e,t,a)=>{"use strict";a.d(t,{A:()=>useTabRailOrganizer});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x14fad6485),l=a(0x13f5975f9),o=a(0x183b48748),s=a(0x1649d39d4),c=a(0x129702595),d=a(0x900b8a0d),m=a(0x17a6ae140),u=a(0xd66cda03),p=a(0xebdd009e),h=a(0x297a22c6),_=a(0x223ac29bb),f=a(0x2283cdc8d),b=a(0x850bedf0),g=a(0x226892387),y=a(0x7b0b485),A=a(0xe684f705),x=a(0xc4a84715),E=a(0xb9965e11),C=a(0x190247ff2),k=a(0x19895585a);let v={"de-DE":{[k.k6.Platform]:80},"en-GB":{},"en-US":{},"es-ES":{[k.k6.DMs]:80,[k.k6.Platform]:80},"es-LA":{[k.k6.DMs]:80,[k.k6.Platform]:80},"fr-FR":{[k.k6.DMs]:80,[k.k6.Platform]:80,[k.k6.Huddles]:80},"it-IT":{[k.k6.Platform]:80},"pt-BR":{[k.k6.Platform]:80},"ja-JP":{[k.k6.Activity]:80,[k.k6.ActivityInbox]:80,[k.k6.Huddles]:92},"zh-CN":{[k.k6.Later]:80},"zh-TW":{},"ko-KR":{}},useTabRailOrganizer=({overrideCompactModeEnabled:e}={})=>{let{windowRef:t}=(0,n.useContext)(i._0),a=(0,r.wA)(),S=(0,_.Yp)(),{tabRailList:I,visibleTabs:w}=(0,s.A)(),T=(0,g.d4)(e=>{let t=(0,A.cA)(e);return(0,x.A)(e,t.id)}),N=(0,u.cw)(y.ad),M=(0,u.cw)(y.j),R=(0,u.cw)(y.$V),P=(0,g.d4)(p.rU),L=(0,n.useMemo)(()=>{if(!N)return 0;let e=0;return P&&!R&&(e+=d.OS),M?e+=d.fZ:e+=d.fz,e},[N,M,R,P]),O=t.deref(),D=O?.innerHeight||0,F=O?.innerWidth||0,U=D-L,B=e??((0,l.i)(F)||(0,o.v)(U)),H=(0,g.d4)(f.s7),W=(0,g.d4)(b.Pn),V=(0,g.d4)(E.iq),G=B?192:208;H&&(G+=B?40:52),W&&(G+=B?40:52),T&&(G+=24);let q=(0,g.d4)(E.AV),j=(0,m.r)();return(0,n.useMemo)(()=>{let e=(0,h.m)(I),t=[],n=[],r=U-G;if(B){q&&(r-=40);let e=r/40;j?t.push(...I.slice(0,e)):(t.push(k.k6.Home),t.push(...I.slice(1,e))),n.push(...I.slice(e)),r-=40*t.length}else{for(q&&(r-=109);e.length>0&&r>=(v[S][e[0]]??68);){let a=e.shift();a&&(t.push(a),r-=v[S][a]??68)}n.push(...e)}let i=w.filter(e=>!t.includes(e)&&!n.includes(e));if(n.push(...i),n.length>0){if(r<(B?40:68)&&t.length>1){let e=t.pop();e&&n.unshift(e)}t.push(k.k6.Browse)}return V&&a((0,C.KH)()),q&&(U<c.DJ?n.push(k.k6.Admin):t.push(k.k6.Admin)),{tabsToShow:t,overflowTabs:n}},[a,V,B,S,G,U,q,j,I,w])}},0x2b546917:(e,t,a)=>{"use strict";a.d(t,{O:()=>l2});var n,r=a(0x807220a2),i=a(0x19bf376f9),l=a(0xbad225b5),o=a(0x16cf1da63),s=a(0x120c268ad),c=a.n(s),d=a(0x1cbdfeceb),m=a(0x1595bdd0),u=a(0x19b3ba9fd),p=a(0x62a17882),h=a(0x20482ad21),_=a(0x133aaa7da),f=a(0x2501a2cee),b=a(0xb90de824),g=a(0x13953efe6),y=a(0x3989021c),A=a(0x5b1935a6);let x=new h.Ay("ia4"),LaterTabInMoreCoachmark=({children:e,renderCoachmark:t,onClose:a,UNSAFE_parentSelector:n})=>{let r=t({title:x.t("Now you\u2019ve got Later",{fallbackHash:"8bb6efd2758bf9afe6876eaecbf1a4379d808da8"}),bodyText:x.t("We added a new view to the More menu for you to quickly access the messages you save for later.",{fallbackHash:"91b9ef81ed76ac1acc9cef9d0fa63cc0d9db7c63"}),centerOnArrow:!0,offsetX:0,offsetY:0,arrowPosition:0,closeCoachmark:a,orientation:g.YC.Right,className:"p-later_in_more_tab_coachmark",UNSAFE_parentSelector:n});return l.createElement(g.Ay,{coachmarkElement:r,orientation:"right"},e)};LaterTabInMoreCoachmark.displayName="LaterTabInMoreCoachmark";let E=(0,r.DA)()?e=>{let t,a=(0,i.c)(7),{children:n,shouldShowTabNudge:r}=e,{closeCoachmark:o,renderCoachmark:s,isOpen:c}=(0,y.A)(A.ze.LATER_TAB_BUTTON_NUDGE,A.xu.TAB_RAIL_LATER_TAB);if(!c||!r)return n;if(a[0]!==n||a[1]!==o||a[2]!==s){let e;a[4]!==o||a[5]!==s?(e={renderCoachmark:s,onClose:o},a[4]=o,a[5]=s,a[6]=e):e=a[6],t=l.createElement(LaterTabInMoreCoachmark,e,n),a[0]=n,a[1]=o,a[2]=s,a[3]=t}else t=a[3];return t}:({children:e,shouldShowTabNudge:t})=>{let{closeCoachmark:a,renderCoachmark:n,isOpen:r}=(0,y.A)(A.ze.LATER_TAB_BUTTON_NUDGE,A.xu.TAB_RAIL_LATER_TAB);return r&&t?l.createElement(LaterTabInMoreCoachmark,{renderCoachmark:n,onClose:a},e):e};E.displayName="ConnectedLaterTabInMoreCoachmark";var C=a(0xfe5aa224),k=a(0x172dd1bf5),v=a(0x1cf0d97e1),S=a(0x1ccef1c6f);let I=(0,v.Ay)(e=>!0===(0,S.ty)(e,"has_starred_item"));I.meta={name:"shouldShowLaterTabButton",key:"createSelectorShouldShowLaterTabButton",description:e=>!0===(0,S.ty)(e,"has_starred_item")};var w=a(0x226892387),T=a(0xb9604b6),N=a(0x20061cab9),M=a(0xf3c65e54);let R=new h.Ay("saved_for_later"),LaterTabButtonNudge=({children:e,isActive:t})=>{let n=(0,o.wA)(),r=(0,l.useRef)(null),i=(0,l.useContext)(C.A),s=(0,w.d4)(I),c=(0,w.d4)(e=>(0,T.Hp)(e,A.xu.TAB_RAIL_LATER_TAB)===A.ze.LATER_TAB_BUTTON_NUDGE),d=(0,w.d4)(e=>(0,S.ty)(e,"a11y_animations"));(0,l.useEffect)(()=>{c&&(d?r.current=setTimeout(()=>{n((0,N.Ay)({action:A.hw.IMPRESSION,spaceName:A.xu.TAB_RAIL_LATER_TAB}))},5e3):n((0,M.A)({action:A.hw.IMPRESSION,notificationName:A.ze.LATER_TAB_BUTTON_NUDGE})))},[n,c,d]),(0,l.useEffect)(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);let m=(0,l.useCallback)(()=>a.e("sparkles-wobbly.json").then(a.t.bind(a,0xee7ac640,23)),[]),u=(0,l.useCallback)(e=>{e?.stopPropagation(),n((0,M.A)({notificationName:A.ze.LATER_TAB_BUTTON_NUDGE,action:A.hw.DISMISS}))},[n]);if(!s)return null;let p=c&&!i&&d,h=l.createElement(b.Ay,{title:R.rt("Now you\u2019ve got Later"),offsetX:-8,orientation:"right",centerOnArrow:!0,isOpen:!t&&c&&(!!i||!d),closeCoachmark:u,isMegaphoneCoachmark:!1,bodyText:R.rt("We added a tab for you to quickly access the messages you save for later.")});return l.createElement(g.Ay,{coachmarkElement:h,orientation:"right"},l.createElement("div",{className:"p-later_tab_button__sparkles_container",role:"none"},!t&&p&&l.createElement("div",{className:"p-later_tab_button__sparkles"},l.createElement(k.e,{getAnimationImport:m,autoplay:!0,loop:!0})),e))};LaterTabButtonNudge.displayName="LaterTabButtonNudge";var P=a(0x410829f8),L=a(0x104daa6a5),O=a(0x2396248b4),D=a(0x1384f171),F=a(0xe180a236),U=a(0x4c96e5d9),B=a(0x1b3ecb90f),H=a(0x12185e091),W=a(0x1ecc7f772),V=a(0x2378cf6ec),G=a(0x1c91944c9),q=a(0x217553e42),j=a(0x26183c55),z=a(0xe009643),K=a(0x1faf30cb0);let $=new h.Ay("classic_nav"),Y=class extends l.Component{static defaultProps={currentToast:void 0,shiftToast:d.A,clearQueue:d.A,stopAnimations:!1,prefExcludeReactions:!1,isDirectMessage:!1,svgIconProps:{name:"notifications-filled"}};toastTimer;waitTimer;clearToastTimer;constructor(e){super(e),this.startPause=this.startPause.bind(this),this.endPause=this.endPause.bind(this),this.state={waiting:!1,newToast:!1,paused:!1}}componentDidMount(){this.props.currentToast&&this.props.clearQueue()}componentDidUpdate(e,t){let a=e.currentToast&&e.currentToast.emoji,n=this.props.currentToast&&this.props.currentToast.emoji;n&&n!==a&&this.startToastTimer(),this.state.waiting&&!t.waiting&&this.startWaitTimer()}componentWillUnmount(){this.props.shiftToast(),this.toastTimer&&clearTimeout(this.toastTimer),this.waitTimer&&clearTimeout(this.waitTimer)}shouldShowToast(){return!this.props.prefExcludeReactions&&this.props.currentToast&&this.state.newToast&&!this.state.waiting}startToastTimer(){this.setState(()=>({newToast:!0})),this.toastTimer=window.setTimeout(()=>{this.setState(e=>({...e,waiting:!0,newToast:!1}))},z.d.DISPLAY)}startWaitTimer(){this.waitTimer=window.setTimeout(()=>{this.setState(e=>({...e,waiting:!1})),this.props.shiftToast()},z.d.WAIT)}startPause(){this.toastTimer&&(clearTimeout(this.toastTimer),this.setState(e=>({...e,paused:!0}))),this.clearToastTimer&&(clearTimeout(this.clearToastTimer),this.clearToastTimer=null)}endPause(){this.clearToastTimer||(this.clearToastTimer=window.setTimeout(()=>{this.setState(e=>({...e,waiting:!0,newToast:!1,paused:!1})),this.clearToastTimer=null},z.d.HIDE_AFTER_HOVER))}renderTip(){let{userName:e,channelName:t,isDirectMessage:a,currentToast:n}=this.props,{otherUsers:r}=n,i=(0,F.A)(r),o=0===i?e:$.rt("{userName} and {numOthers,plural,=1{# other}other{# others}}",{userName:e,numOthers:i}),s=a?$.t("Direct Message"):t;return l.createElement(l.Fragment,null,o,l.createElement("span",{className:"p-activity_toast_ia2022__activity__toast__tip_sub"},s))}render(){let{currentToast:e,stopAnimations:t,svgIconProps:a}=this.props,{paused:n}=this.state,r=this.shouldShowToast()?l.createElement(U.Ay,{tip:this.renderTip(),position:"right",onShow:this.startPause,onHide:this.endPause},l.createElement("div",{className:c()("p-activity_toast_ia2022__activity__toast p-activity_toast_ia2022__activity__toast--with-tooltip",{"p-activity_toast_ia2022__activity__toast--paused":n,"p-activity_toast_ia2022__link--no_animation":t,"p-activity_toast_ia2022__link__icon":!0})},l.createElement(B.Ay,{text:`:${e.emoji}:`,url:e.url,emojiSize:B.lw.MEDIUM,forceDisplay:!0}))):null,i=l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement("div",{className:c()("p-activity_toast_ia2022__link__icon p-activity_toast_ia2022__link__activity",{"p-activity_toast_ia2022__link__activity--toasting":!!r,"p-activity_toast_ia2022__link--no_animation":t,"p-activity_toast_ia2022__link__activity--hide":n})},l.createElement(f.Ah,{size:"20",...a})));return l.createElement("div",{style:{position:"relative"}},r,i)}};Y.displayName="ActivityToast";let Q=(0,G.N)(e=>{let t=(0,K.L)(e),a={};if(t){let{userId:n,channelId:r}=t,i=(0,q.OL)(e,r),l=(0,W.SB)(e,i);a={userName:(0,V.I)(e,n),channelName:l,isDirectMessage:(0,H.LI)(i)}}return{...a,currentToast:t,stopAnimations:!(0,S.ty)(e,"a11y_animations"),prefExcludeReactions:(0,S.ty)(e,"mentions_exclude_reactions")}},e=>({shiftToast:()=>e((0,j.Us)()),clearQueue:()=>e((0,j.lg)())}))(Y);var Z=a(0x13b8c2941),J=a(0x850bedf0);let useTabButtonHover=e=>{let[t,a]=(0,l.useState)(!1),n=(0,w.d4)(J.UG),r=(0,l.useCallback)(()=>{a(!0)},[]),i=(0,l.useCallback)(()=>a(!1),[]);return(0,l.useLayoutEffect)(()=>{if(!e.current||!n)return;let t=e.current.closest("button");return t?.addEventListener("mouseenter",r),t?.addEventListener("mouseleave",i),()=>{t?.removeEventListener("mouseenter",r),t?.removeEventListener("mouseleave",i)}},[e,n,r,i]),t};var X=a(0x28ca4d0),ee=a(0x19895585a);function ActivityTabContent({badgeCounts:e,hideMentions:t=!1,isActive:a,isNarrowWindow:n=!1,shouldHideInactiveLabels:r=!1}){let i=(0,l.useRef)(null),o=useTabButtonHover(i),s=(0,w.d4)(D.Lh),d=e[s?Z.Vw.ACTIVITY_INBOX:Z.Vw.ACTIVITY]??0,m=s?ee.k6.ActivityInbox:ee.k6.Activity,{dot:u,badge:p}=(0,O.t)({displayAsHovered:o,tab:m,hideMentions:t,badgeCounts:e,isNarrowWindow:n,style:P.rY.themed,badgeShape:P.HY.circle}),h=(0,w.d4)(e=>(0,X.A)(e,{tab:m})),_=(0,l.useCallback)(()=>a?{name:"notifications-filled"}:{name:"notifications"},[a]);return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon",ref:i},l.createElement(Q,{svgIconProps:_()})),u||p,l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":a&&r,"p-tab_rail__button__label--inactive":!a&&r})},h),l.createElement(L.A,{tab:m,badgeCount:d}))}ActivityTabContent.displayName="ActivityTabContent";let et=(0,l.memo)(ActivityTabContent);var ea=a(0x1ad587e3c);let en=(0,r.DA)()?function(e){let t,a=(0,i.c)(15),{isActive:n,shouldHideInactiveLabels:r}=e,o=void 0!==n&&n,s=void 0!==r&&r,d=(0,w.d4)(_temp);if(a[0]!==o||a[1]!==d||a[2]!==s){let e,n,r;if(a[4]!==o){let t,n,r;a[6]===Symbol.for("react.memo_cache_sentinel")?(t={className:"p-tab_rail__button__icon"},a[6]=t):t=a[6],a[7]===Symbol.for("react.memo_cache_sentinel")?(n={className:"p-tab_rail__button__icon_inner"},a[7]=n):n=a[7];let i=o?"agentforce-filled":"agentforce";a[8]!==i?(r={name:i,size:"20"},a[8]=i,a[9]=r):r=a[9],e=l.createElement("div",t,l.createElement("div",n,l.createElement(f.Ah,r))),a[4]=o,a[5]=e}else e=a[5];let i=o&&s,m=!o&&s;a[10]!==i||a[11]!==m?(n=c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":i,"p-tab_rail__button__label--inactive":m}),a[10]=i,a[11]=m,a[12]=n):n=a[12],a[13]!==n?(r={className:n},a[13]=n,a[14]=r):r=a[14],t=l.createElement(l.Fragment,null,e,l.createElement("div",r,d)),a[0]=o,a[1]=d,a[2]=s,a[3]=t}else t=a[3];return t}:function({isActive:e=!1,shouldHideInactiveLabels:t=!1}){let a=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Agents}));return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:e?"agentforce-filled":"agentforce",size:"20"}))),l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":e&&t,"p-tab_rail__button__label--inactive":!e&&t})},a))};function _temp(e){return(0,X.A)(e,{tab:ee.k6.Agents})}en.displayName="AgentforceTabContent";let er=(0,l.memo)(en),AutomationsIconDUIS=({isActive:e})=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,className:"block"},l.createElement("path",{fill:"currentColor",d:e?"M18.026 4.563c.08.08.137.174.174.274l.013.037.002.004a5.16 5.16 0 0 1-1.208 5.393 5.152 5.152 0 0 1-4.773 1.383l-6.472 6.473c-.494.493-1.173.596-1.772.488-.601-.109-1.2-.436-1.684-.921-.485-.485-.812-1.083-.92-1.684-.109-.599-.006-1.278.487-1.772l6.46-6.46A5.154 5.154 0 0 1 9.71 2.974c1.468-1.468 3.65-1.835 5.457-1.187l-.003.005a.747.747 0 0 1 .259 1.228l-2.268 2.268.327 1.216 1.215.326 2.27-2.267a.75.75 0 0 1 1.06 0Z":"M18.027 4.563c.079.08.135.173.172.272l.015.042a5.161 5.161 0 0 1-1.207 5.394 5.154 5.154 0 0 1-4.773 1.384L5.76 18.127c-.493.493-1.173.596-1.771.487-.602-.108-1.2-.435-1.685-.92-.485-.485-.811-1.083-.92-1.684-.108-.599-.006-1.279.487-1.772l6.461-6.46a5.154 5.154 0 0 1 1.378-4.803c1.467-1.468 3.649-1.835 5.456-1.187l-.001.003a.75.75 0 0 1 .258 1.23l-2.268 2.267.326 1.217 1.217.325 2.267-2.267a.75.75 0 0 1 1.06 0Zm-2.574 3.635a.752.752 0 0 1-.724.194l-2.053-.55a.751.751 0 0 1-.53-.53l-.55-2.054a.75.75 0 0 1 .193-.724l1.552-1.553c-.938.01-1.876.36-2.57 1.054a3.66 3.66 0 0 0-.88 3.759h-.002a.747.747 0 0 1-.187.736l-6.769 6.769c-.048.048-.12.176-.072.444.048.265.21.594.505.89.296.296.625.457.89.505.268.049.396-.023.445-.072l6.778-6.778c.2-.2.484-.26.738-.188l.24.07a3.658 3.658 0 0 0 4.561-3.538l-1.565 1.566Z"}));AutomationsIconDUIS.displayName="AutomationsIconDUIS";var ei=a(0x1789e94fa);let el=l.lazy(()=>Promise.resolve().then(a.bind(a,0x16aa7b49b)).then(e=>({default:e.WfbAiStepToolsRailTabDot}))),eo={spaceName:A.xu.TOOLS_TAB_RAIL,notifications:{[A.ze.UNIFIED_TOOLS_TAB_WFB_AI_STEP_TOOLS_TAB_BADGE]:{component:el}}};var es=a(0x3e058968),ec=a(0x21c50a68b),ed=a(0x12cbe336e),em=a(0x9271cc31);let eu=(0,r.DA)()?function(e){let t,a,n,r,o=(0,i.c)(28),{shouldHideInactiveLabels:s}=e,d=void 0!==s&&s,m=(0,w.d4)(em.e6),u=(0,w.d4)(es.tb),p=(0,w.d4)(ed.hi),h=m===ee.k6.Platform,_=(0,w.d4)(automations_tab_button_temp);o[0]===Symbol.for("react.memo_cache_sentinel")?(t=["en-GB","en-US"],o[0]=t):t=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(a=(0,ec.JK)(),o[1]=a):a=o[1];let b=t.includes(a);o[2]!==p||o[3]!==h?(n=p?l.createElement(AutomationsIconDUIS,{isActive:h}):l.createElement(f.Ah,{name:h?"tools-filled":"tools",size:"20"}),o[2]=p,o[3]=h,o[4]=n):n=o[4];let g=n;if(o[5]!==g||o[6]!==u||o[7]!==h||o[8]!==_||o[9]!==d){let e,t,a;if(o[11]!==g||o[12]!==u||o[13]!==h){let t,a;o[15]===Symbol.for("react.memo_cache_sentinel")?(t={className:"p-tab_rail__button__icon"},o[15]=t):t=o[15],o[16]===Symbol.for("react.memo_cache_sentinel")?(a={className:"p-tab_rail__button__icon_inner"},o[16]=a):a=o[16],e=l.createElement("div",t,l.createElement("div",a,u?g:l.createElement(f.Ah,{name:h?"play-filled":"play",size:"20"}))),o[11]=g,o[12]=u,o[13]=h,o[14]=e}else e=o[14];if(o[17]!==h||o[18]!==_||o[19]!==d){let e,a,n;o[21]===Symbol.for("react.memo_cache_sentinel")?(e={className:"display_flex align_items_center"},o[21]=e):e=o[21];let r=h&&d,i=!h&&d;o[22]!==i||o[23]!==r?(a=c()("p-tab_rail__button__label",{"p-tab_rail__button__label--en":b,"p-tab_rail__button__label--active":r,"p-tab_rail__button__label--inactive":i}),o[22]=i,o[23]=r,o[24]=a):a=o[24],o[25]!==a?(n={className:a},o[25]=a,o[26]=n):n=o[26],t=l.createElement("div",e,l.createElement("div",n,_)),o[17]=h,o[18]=_,o[19]=d,o[20]=t}else t=o[20];o[27]===Symbol.for("react.memo_cache_sentinel")?(a=l.createElement(ei.A,eo),o[27]=a):a=o[27],r=l.createElement(l.Fragment,null,e,t,a),o[5]=g,o[6]=u,o[7]=h,o[8]=_,o[9]=d,o[10]=r}else r=o[10];return r}:function({shouldHideInactiveLabels:e=!1}){let t=(0,w.d4)(em.e6),a=(0,w.d4)(es.tb),n=(0,w.d4)(ed.hi),r=t===ee.k6.Platform,i=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Platform})),o=(0,l.useMemo)(()=>["en-GB","en-US"].includes((0,ec.JK)()),[]),s=(0,l.useMemo)(()=>n?l.createElement(AutomationsIconDUIS,{isActive:r}):l.createElement(f.Ah,{name:r?"tools-filled":"tools",size:"20"}),[n,r]);return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},a?s:l.createElement(f.Ah,{name:r?"play-filled":"play",size:"20"}))),l.createElement("div",{className:"display_flex align_items_center"},l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--en":o,"p-tab_rail__button__label--active":r&&e,"p-tab_rail__button__label--inactive":!r&&e})},i)),l.createElement(ei.A,eo))};function automations_tab_button_temp(e){return(0,X.A)(e,{tab:ee.k6.Platform})}eu.displayName="AutomationsTabButton";let ep=(0,l.memo)(eu),eh=(0,r.DA)()?function(e){let t,a,n=(0,i.c)(33),{badgeCounts:r,hasBrowseExternalWorkspacesTab:o,hideMentions:s,isNarrowWindow:d,shouldHideInactiveLabels:m}=e,u=void 0!==s&&s,p=void 0!==d&&d,h=void 0!==m&&m,_=(0,w.d4)(em.e6),b=r[Z.Vw.BROWSE]||0;n[0]!==r||n[1]!==o||n[2]!==u||n[3]!==p?(t={tab:ee.k6.Browse,hideMentions:u,badgeCounts:r,hasBrowseExternalWorkspacesTab:o,isNarrowWindow:p,style:P.rY.themed,badgeShape:P.HY.circle},n[0]=r,n[1]=o,n[2]=u,n[3]=p,n[4]=t):t=n[4];let{dot:g,badge:y}=(0,O.t)(t),A=(0,w.d4)(browse_tab_content_temp),x=_===ee.k6.Browse;if(n[5]!==y||n[6]!==g||n[7]!==x||n[8]!==p||n[9]!==A||n[10]!==b||n[11]!==h){let e,t,r;if(n[13]!==g||n[14]!==p){let t,a;if(n[16]===Symbol.for("react.memo_cache_sentinel")?(t={className:"p-tab_rail__button__icon"},n[16]=t):t=n[16],n[17]!==p){let e,t;n[19]===Symbol.for("react.memo_cache_sentinel")?(e={className:"p-tab_rail__button__icon_inner"},n[19]=e):e=n[19];let r=p?"ellipsis-vertical-filled":"ellipsis-horizontal-filled";n[20]!==r?(t={name:r,size:"20"},n[20]=r,n[21]=t):t=n[21],a=l.createElement("div",e,l.createElement(f.Ah,t)),n[17]=p,n[18]=a}else a=n[18];e=l.createElement("div",t,a,g),n[13]=g,n[14]=p,n[15]=e}else e=n[15];if(n[22]!==x||n[23]!==A||n[24]!==h){let e,a,r=x&&h,i=!x&&h;n[26]!==r||n[27]!==i?(e=c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":r,"p-tab_rail__button__label--inactive":i}),n[26]=r,n[27]=i,n[28]=e):e=n[28],n[29]!==e?(a={className:e},n[29]=e,n[30]=a):a=n[30],t=l.createElement("div",a,A),n[22]=x,n[23]=A,n[24]=h,n[25]=t}else t=n[25];n[31]!==b?(r=l.createElement(L.A,{tab:ee.k6.Browse,badgeCount:b}),n[31]=b,n[32]=r):r=n[32],a=l.createElement(l.Fragment,null,e,y,t,r),n[5]=y,n[6]=g,n[7]=x,n[8]=p,n[9]=A,n[10]=b,n[11]=h,n[12]=a}else a=n[12];return a}:function({badgeCounts:e,hasBrowseExternalWorkspacesTab:t,hideMentions:a=!1,isNarrowWindow:n=!1,shouldHideInactiveLabels:r=!1}){let i=(0,w.d4)(em.e6),o=e[Z.Vw.BROWSE]||0,{dot:s,badge:d}=(0,O.t)({tab:ee.k6.Browse,hideMentions:a,badgeCounts:e,hasBrowseExternalWorkspacesTab:t,isNarrowWindow:n,style:P.rY.themed,badgeShape:P.HY.circle}),m=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Browse})),u=i===ee.k6.Browse;return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:n?"ellipsis-vertical-filled":"ellipsis-horizontal-filled",size:"20"})),s),d,l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":u&&r,"p-tab_rail__button__label--inactive":!u&&r})},m),l.createElement(L.A,{tab:ee.k6.Browse,badgeCount:o}))};function browse_tab_content_temp(e){return(0,X.A)(e,{tab:ee.k6.Browse})}eh.displayName="BrowseTabContent";let e_=(0,l.memo)(eh);var ef=a(0x14d6bb998),eb=a(0x1c659cbb1),eg=a(0x1b35e60a5),ey=a(0x1f665c253);let eA=(0,v.Ay)(e=>e.dmsToast&&e.dmsToast[0]);eA.meta={name:"getCurrentToast",key:"createSelectorGetCurrentToast",description:e=>e.dmsToast&&e.dmsToast[0]},(0,v.Ay)(e=>e.dmsToast).meta={name:"getToastQueue",key:"createSelectorGetToastQueue",description:e=>e.dmsToast};let ex=class extends l.Component{static defaultProps={currentToast:void 0,shiftToast:d.A,clearQueue:d.A,stopAnimations:!1,variation:void 0};toastTimer;waitTimer;clearToastTimer;constructor(e){super(e),this.startPause=this.startPause.bind(this),this.endPause=this.endPause.bind(this),this.state={waiting:!1,newToast:!1,paused:!1}}componentDidMount(){this.props.currentToast&&this.props.clearQueue()}componentDidUpdate(e,t){let a=e.currentToast&&e.currentToast.userId,n=this.props.currentToast&&this.props.currentToast.userId,r=e.currentToast&&e.currentToast.key,i=this.props.currentToast&&this.props.currentToast.key;i&&i!==r&&(n&&n!==a?this.startToastTimer():this.props.shiftToast()),this.state.waiting&&!t.waiting&&this.startWaitTimer()}componentWillUnmount(){this.props.shiftToast(),this.toastTimer&&clearTimeout(this.toastTimer),this.waitTimer&&clearTimeout(this.waitTimer)}shouldShowToast(){return this.props.currentToast&&this.state.newToast&&!this.state.waiting}startToastTimer(){this.setState(()=>({newToast:!0})),this.toastTimer=window.setTimeout(()=>{this.setState(e=>({...e,waiting:!0,newToast:!1}))},ey.J.DISPLAY)}startWaitTimer(){this.waitTimer=window.setTimeout(()=>{this.setState(e=>({...e,waiting:!1})),this.props.shiftToast()},ey.J.WAIT)}startPause(){this.toastTimer&&(clearTimeout(this.toastTimer),this.setState(e=>({...e,paused:!0}))),this.clearToastTimer&&(clearTimeout(this.clearToastTimer),this.clearToastTimer=null)}endPause(){this.clearToastTimer||(this.clearToastTimer=window.setTimeout(()=>{this.setState(e=>({...e,waiting:!0,newToast:!1,paused:!1})),this.clearToastTimer=null},ey.J.HIDE_AFTER_HOVER))}render(){let{currentToast:e,stopAnimations:t,variation:a}=this.props,{paused:n}=this.state,r=this.shouldShowToast()?l.createElement("div",{className:c()("p-bloop",{"p-bloop--paused":n,"p-bloop__link--no_animation":t,"p-bloop__link__icon":!0})},l.createElement(eb.Ay,{size:20,userId:e.userId,isInteractive:!1,tabIndex:-1})):null,i=l.createElement("div",{className:c()("p-bloop__link__icon p-bloop__link",{"p-bloop__link--toasting":!!r,"p-bloop__link--no_animation":t,"p-bloop__link--hide":n})},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:"filled"===a?"direct-messages-filled":"direct-messages",size:"20"})));return l.createElement("div",{style:{position:"relative"}},r,i)}};ex.displayName="Bloop";let eE=(0,G.N)(e=>{let t=eA(e),a={};if(t){let{userId:n}=t;a={userName:(0,V.I)(e,n)}}return{...a,currentToast:t,stopAnimations:!(0,S.ty)(e,"a11y_animations")}},e=>({shiftToast:()=>e((0,eg.Us)()),clearQueue:()=>e((0,eg.lg)())}))(ex);var eC=a(0x135392a7f),ek=a(0x2244f10f);let ev=(0,r.DA)()?e=>{let{isActive:t,isHovered:a,tab:n}=e,r=(0,w.d4)(D.ax),i=(0,w.d4)(use_get_badge_style_temp),o=(0,w.d4)(_temp2),{isOpen:s}=(0,l.useContext)(eC.x),c=n===ee.k6.Later&&!o,d=P.rY.themed;return r&&(c?d=P.rY.themed:t||s||a||i||(d=P.rY.dimmed)),d}:({isActive:e,isHovered:t,tab:a})=>{let n=(0,w.d4)(D.ax),r=(0,w.d4)(e=>(0,S.ty)(e,"ia4_compact_mode")),i=(0,w.d4)(e=>(0,ek.FD)(e,"global_reminders_in_activity")),{isOpen:o}=(0,l.useContext)(eC.x),s=a===ee.k6.Later&&!i,c=P.rY.themed;return n&&(s?c=P.rY.themed:e||o||t||r||(c=P.rY.dimmed)),c};function use_get_badge_style_temp(e){return(0,S.ty)(e,"ia4_compact_mode")}function _temp2(e){return(0,ek.FD)(e,"global_reminders_in_activity")}let eS=(0,r.DA)()?e=>{let t,a,n,r,o=(0,i.c)(5),[s,c]=(0,l.useState)(!1);o[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{c(!0)},o[0]=t):t=o[0];let d=t;o[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{c(!1)},o[1]=a):a=o[1];let m=a;return o[2]!==e?(n=()=>{if(!e.current)return;let t=e.current.closest("button");return t?.addEventListener("mouseenter",d),t?.addEventListener("mouseleave",m),()=>{t?.removeEventListener("mouseenter",d),t?.removeEventListener("mouseleave",m)}},r=[e,d,m],o[2]=e,o[3]=n,o[4]=r):(n=o[3],r=o[4]),(0,l.useLayoutEffect)(n,r),s}:e=>{let[t,a]=(0,l.useState)(!1),n=(0,l.useCallback)(()=>{a(!0)},[]),r=(0,l.useCallback)(()=>{a(!1)},[]);return(0,l.useLayoutEffect)(()=>{if(!e.current)return;let t=e.current.closest("button");return t?.addEventListener("mouseenter",n),t?.addEventListener("mouseleave",r),()=>{t?.removeEventListener("mouseenter",n),t?.removeEventListener("mouseleave",r)}},[e,n,r]),t};var eI=a(0x2283cdc8d);function DmsTabContent({badgeCounts:e,hideMentions:t=!1,isActive:a=!1,isNarrowWindow:n=!1,shouldHideInactiveLabels:r=!1}){let i=(0,l.useRef)(null),o=useTabButtonHover(i),s=e[Z.Vw.DMS]??0,d=(0,w.d4)(eI.xW),m=ev({isActive:a,isHovered:eS(i),tab:ee.k6.DMs}),{dot:u,badge:p}=(0,O.t)({displayAsHovered:o,tab:ee.k6.DMs,hideMentions:t,badgeCounts:e,isNarrowWindow:n,style:m,badgeShape:P.HY.circle}),h=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.DMs}));return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon",ref:i},d?l.createElement(eE,{variation:a?"filled":void 0}):l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:a?"direct-messages-filled":"direct-messages",size:"20"}))),u||p,l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":a&&r,"p-tab_rail__button__label--inactive":!a&&r})},h),l.createElement(L.A,{tab:ee.k6.DMs,badgeCount:s}))}DmsTabContent.displayName="DmsTabContent";let ew=(0,l.memo)(DmsTabContent);function HomeTabContent({hideMentions:e=!1,isActive:t=!1,badgeCounts:a,className:n,isNarrowWindow:r=!1,shouldHideInactiveLabels:i=!1}){let o=(0,l.useRef)(null),s=ev({isActive:t,isHovered:eS(o),tab:ee.k6.Home}),{dot:d,badge:m}=(0,O.t)({tab:ee.k6.Home,hideMentions:e,badgeCounts:a,isNarrowWindow:r,style:s,badgeShape:P.HY.circle}),u=a?.[Z.Vw.HOME]??0,p=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Home})),h=l.createElement(f.Ah,{name:t?"home-filled":"home",size:"20"});return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button--home",ref:o},l.createElement("div",{className:c()("p-tab_rail__button__icon",n)},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},h)),d||m),l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":t&&i,"p-tab_rail__button__label--inactive":!t&&i})},p),l.createElement(L.A,{tab:ee.k6.Home,badgeCount:u}))}HomeTabContent.displayName="HomeTabContent";let eT=(0,l.memo)(HomeTabContent),LaterTab=({badgeCounts:e,hideMentions:t=!1,isNarrowWindow:a=!1,shouldHideInactiveLabels:n=!1})=>{let r=(0,w.d4)(em.e6),i=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Later})),o=r===ee.k6.Later,s=e[Z.Vw.LATER]??0,d=(0,l.useRef)(null),m=ev({isActive:o,isHovered:eS(d),tab:ee.k6.Later}),{dot:u,badge:p}=(0,O.t)({tab:ee.k6.Later,hideMentions:t,badgeCounts:e,isNarrowWindow:a,style:m,badgeShape:P.HY.circle});return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon",ref:d},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:o?"bookmark-filled":"bookmark",size:"20"}))),u||p,l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":o&&n,"p-tab_rail__button__label--inactive":!o&&n})},i),l.createElement(L.A,{tab:ee.k6.Later,badgeCount:s}))};LaterTab.displayName="LaterTab";let eN=(0,l.memo)(LaterTab);var eM=a(0x1e81aad14),eR=a(0x91728dda),eP=a(0xc6f9b126),eL=a(0x1565d06ef);let eO=(0,r.DA)()?function(e){let t,a=(0,i.c)(22),{shouldHideInactiveLabels:n}=e,r=void 0!==n&&n,o=(0,w.d4)(em.e6)===ee.k6.SalesHome,s=(0,w.d4)(eR.hx),d=(0,w.d4)(saleshome_tab_temp),m=(0,w.d4)(saleshome_tab_temp2);if(!s)return null;if(a[0]!==o||a[1]!==m||a[2]!==d||a[3]!==r){let e,n,i;if(a[5]!==o){let t,n,r;a[7]===Symbol.for("react.memo_cache_sentinel")?(t={className:"p-tab_rail__button__icon"},a[7]=t):t=a[7],a[8]===Symbol.for("react.memo_cache_sentinel")?(n={className:"p-tab_rail__button__icon_inner"},a[8]=n):n=a[8];let i=o?"sales-filled":"sales";a[9]!==i?(r={name:i,size:"20"},a[9]=i,a[10]=r):r=a[10],e=l.createElement("div",t,l.createElement("div",n,l.createElement(f.Ah,r))),a[5]=o,a[6]=e}else e=a[6];if(a[11]!==d?(n=0!==d&&l.createElement(eM.A,null),a[11]=d,a[12]=n):n=a[12],a[13]!==o||a[14]!==m||a[15]!==r){let e,t,n=o&&r,s=!o&&r;a[17]!==n||a[18]!==s?(e=c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":n,"p-tab_rail__button__label--inactive":s}),a[17]=n,a[18]=s,a[19]=e):e=a[19],a[20]!==e?(t={className:e},a[20]=e,a[21]=t):t=a[21],i=l.createElement("div",t,m),a[13]=o,a[14]=m,a[15]=r,a[16]=i}else i=a[16];t=l.createElement(l.Fragment,null,e,n,i),a[0]=o,a[1]=m,a[2]=d,a[3]=r,a[4]=t}else t=a[4];return t}:function({shouldHideInactiveLabels:e=!1}){let t=(0,w.d4)(em.e6)===ee.k6.SalesHome,a=(0,w.d4)(eR.hx),n=(0,w.d4)(e=>(0,eL.P)(e,eP.e.SalesHomeNotification)),r=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.SalesHome}));return a?l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:t?"sales-filled":"sales",size:"20"}))),0!==n&&l.createElement(eM.A,null),l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":t&&e,"p-tab_rail__button__label--inactive":!t&&e})},r)):null};function saleshome_tab_temp2(e){return(0,X.A)(e,{tab:ee.k6.SalesHome})}function saleshome_tab_temp(e){return(0,eL.P)(e,eP.e.SalesHomeNotification)}eO.displayName="SalesHomeTabButton";let eD=(0,l.memo)(eO),eF=(0,r.DA)()?e=>{let t,a,n=(0,i.c)(11),{id:r,isActive:o,shouldHideInactiveLabels:s}=e,d=void 0!==o&&o,m=void 0!==s&&s;n[0]!==r?(t=e=>(0,X.A)(e,{tab:r}),n[0]=r,n[1]=t):t=n[1];let u=(0,w.d4)(t);if(n[2]!==d||n[3]!==u||n[4]!==m){let e,t,r=d&&m,i=!d&&m;n[6]!==r||n[7]!==i?(e=c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":r,"p-tab_rail__button__label--inactive":i}),n[6]=r,n[7]=i,n[8]=e):e=n[8],n[9]!==e?(t={className:e},n[9]=e,n[10]=t):t=n[10],a=l.createElement("div",t,u),n[2]=d,n[3]=u,n[4]=m,n[5]=a}else a=n[5];return a}:({id:e,isActive:t=!1,shouldHideInactiveLabels:a=!1})=>{let n=(0,w.d4)(t=>(0,X.A)(t,{tab:e}));return l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":t&&a,"p-tab_rail__button__label--inactive":!t&&a})},n)};eF.displayName="TabLabel";var eU=a(0x18519d643);let eB=l.memo((0,r.DA)()?e=>{let t,a,n,r,o=(0,i.c)(25),{hideMentions:s,isNarrowWindow:c}=e,d=void 0!==s&&s,m=void 0!==c&&c,u=(0,w.d4)(em.e6),p=(0,w.d4)(todos_tab_content_temp),h=u===ee.k6.Todos,_=(0,w.d4)(eU.PG);o[0]!==_?(t=_??{incompleteOverdueTodosCount:0},o[0]=_,o[1]=t):t=o[1];let{incompleteOverdueTodosCount:b}=t;o[2]!==b?(a={[ee.k6.Todos]:b},o[2]=b,o[3]=a):a=o[3];let g=a;o[4]!==g||o[5]!==d||o[6]!==m?(n={tab:ee.k6.Todos,hideMentions:d,badgeCounts:g,isNarrowWindow:m,style:P.rY.themed,badgeShape:P.HY.circle},o[4]=g,o[5]=d,o[6]=m,o[7]=n):n=o[7];let{dot:y,badge:A}=(0,O.t)(n);if(o[8]!==A||o[9]!==y||o[10]!==h||o[11]!==p||o[12]!==_.incompleteOverdueTodosCount){let e,t,a;if(o[14]!==h){let t,a,n;o[16]===Symbol.for("react.memo_cache_sentinel")?(t={className:"p-tab_rail__button__icon"},o[16]=t):t=o[16],o[17]===Symbol.for("react.memo_cache_sentinel")?(a={className:"p-tab_rail__button__icon_inner"},o[17]=a):a=o[17];let r=h?"check-circle-filled":"check-circle";o[18]!==r?(n={name:r,size:"20"},o[18]=r,o[19]=n):n=o[19],e=l.createElement("div",t,l.createElement("div",a,l.createElement(f.Ah,n))),o[14]=h,o[15]=e}else e=o[15];if(o[20]!==p){let e;o[22]===Symbol.for("react.memo_cache_sentinel")?(e={className:"p-tab_rail__button__label"},o[22]=e):e=o[22],t=l.createElement("div",e,p),o[20]=p,o[21]=t}else t=o[21];o[23]!==_.incompleteOverdueTodosCount?(a=l.createElement(L.A,{tab:ee.k6.Todos,badgeCount:_.incompleteOverdueTodosCount}),o[23]=_.incompleteOverdueTodosCount,o[24]=a):a=o[24],r=l.createElement(l.Fragment,null,e,y||A,t,a),o[8]=A,o[9]=y,o[10]=h,o[11]=p,o[12]=_.incompleteOverdueTodosCount,o[13]=r}else r=o[13];return r}:({hideMentions:e=!1,isNarrowWindow:t=!1})=>{let a=(0,w.d4)(em.e6),n=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Todos})),r=a===ee.k6.Todos,i=(0,w.d4)(eU.PG),{incompleteOverdueTodosCount:o}=i??{incompleteOverdueTodosCount:0},s=(0,l.useMemo)(()=>({[ee.k6.Todos]:o}),[o]),{dot:c,badge:d}=(0,O.t)({tab:ee.k6.Todos,hideMentions:e,badgeCounts:s,isNarrowWindow:t,style:P.rY.themed,badgeShape:P.HY.circle});return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:r?"check-circle-filled":"check-circle",size:"20"}))),c||d,l.createElement("div",{className:"p-tab_rail__button__label"},n),l.createElement(L.A,{tab:ee.k6.Todos,badgeCount:i.incompleteOverdueTodosCount}))});function todos_tab_content_temp(e){return(0,X.A)(e,{tab:ee.k6.Todos})}let eH=(0,r.DA)()?function(e){let t,a,n=(0,i.c)(32),{badgeCounts:r,hideMentions:o,isActive:s,isNarrowWindow:d,shouldHideInactiveLabels:m}=e,u=void 0!==o&&o,p=void 0!==s&&s,h=void 0!==d&&d,_=void 0!==m&&m,b=(0,w.d4)(unified_files_tab_content_temp);n[0]!==r||n[1]!==u||n[2]!==h?(t={tab:ee.k6.UnifiedFiles,hideMentions:u,badgeCounts:r,isNarrowWindow:h,style:P.rY.themed,badgeShape:P.HY.circle},n[0]=r,n[1]=u,n[2]=h,n[3]=t):t=n[3];let{dot:g}=(0,O.t)(t),y=(0,w.d4)(ed.hi),A=p?"canvas-browser-filled":"canvas-browser",x=p?"folder-filled":"folder";if(n[4]!==g||n[5]!==x||n[6]!==y||n[7]!==A||n[8]!==p||n[9]!==b||n[10]!==_){let e,t,r;if(n[12]!==x||n[13]!==y||n[14]!==A){let t,a,r;n[16]===Symbol.for("react.memo_cache_sentinel")?(t={className:"p-tab_rail__button__icon"},n[16]=t):t=n[16],n[17]===Symbol.for("react.memo_cache_sentinel")?(a={className:"p-tab_rail__button__icon_inner"},n[17]=a):a=n[17];let i=y?x:A;n[18]!==i?(r={name:i,size:"20"},n[18]=i,n[19]=r):r=n[19],e=l.createElement("div",t,l.createElement("div",a,l.createElement(f.Ah,r))),n[12]=x,n[13]=y,n[14]=A,n[15]=e}else e=n[15];if(n[20]!==p||n[21]!==b||n[22]!==_){let e,a,r;n[24]===Symbol.for("react.memo_cache_sentinel")?(e={className:"display_flex align_items_center"},n[24]=e):e=n[24];let i=p&&_,o=!p&&_;n[25]!==i||n[26]!==o?(a=c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":i,"p-tab_rail__button__label--inactive":o}),n[25]=i,n[26]=o,n[27]=a):a=n[27],n[28]!==a?(r={className:a},n[28]=a,n[29]=r):r=n[29],t=l.createElement("div",e,l.createElement("div",r,b)),n[20]=p,n[21]=b,n[22]=_,n[23]=t}else t=n[23];n[30]!==g?(r=!!g&&l.createElement(L.A,{tab:ee.k6.UnifiedFiles,badgeCount:0}),n[30]=g,n[31]=r):r=n[31],a=l.createElement(l.Fragment,null,e,g,t,r),n[4]=g,n[5]=x,n[6]=y,n[7]=A,n[8]=p,n[9]=b,n[10]=_,n[11]=a}else a=n[11];return a}:function({badgeCounts:e,hideMentions:t=!1,isActive:a=!1,isNarrowWindow:n=!1,shouldHideInactiveLabels:r=!1}){let i=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.UnifiedFiles})),{dot:o}=(0,O.t)({tab:ee.k6.UnifiedFiles,hideMentions:t,badgeCounts:e,isNarrowWindow:n,style:P.rY.themed,badgeShape:P.HY.circle}),s=(0,w.d4)(ed.hi);return l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},l.createElement("div",{className:"p-tab_rail__button__icon_inner"},l.createElement(f.Ah,{name:s?a?"folder-filled":"folder":a?"canvas-browser-filled":"canvas-browser",size:"20"}))),o,l.createElement("div",{className:"display_flex align_items_center"},l.createElement("div",{className:c()("p-tab_rail__button__label",{"p-tab_rail__button__label--active":a&&r,"p-tab_rail__button__label--inactive":!a&&r})},i)),!!o&&l.createElement(L.A,{tab:ee.k6.UnifiedFiles,badgeCount:0}))};function unified_files_tab_content_temp(e){return(0,X.A)(e,{tab:ee.k6.UnifiedFiles})}eH.displayName="UnifiedFilesTabContent";let eW=(0,l.memo)(eH);var eV=a(0x390b8716),eG=a(0x1df96de4c),eq=a(0x5e7c6650),ej=a(0x3711e82d),ez=a(0x709dda87);let eK={elementName:"home_button",onClick:{enableClogAction:!0}},e$=(0,r.DA)()?function(e){let t,a,n,r,s,d,m=(0,i.c)(23),{autoClogProps:u,onClick:p}=e,h=void 0===u?eG.t0:u,_=(0,o.wA)(),[f,b]=(0,l.useState)(!1),g=(0,w.d4)(use_home_tab_props_temp),y=(0,w.d4)(use_home_tab_props_temp2),x=!g&&y,E=(0,w.d4)(_temp3),{top_nav_bg:C}=(0,w.d4)(eq.ze);m[0]!==C?(t=(0,ez.ST)(C),m[0]=C,m[1]=t):t=m[1];let k=t;m[2]!==f||m[3]!==_||m[4]!==E||m[5]!==x||m[6]!==p?(a=(e,t)=>{if(!(!E&&x&&t?.target instanceof Node)||t.currentTarget.contains(t.target))return(x||f)&&(b(!1),_((0,N.Ay)({action:A.hw.CLICK,spaceName:A.xu.TAB_RAIL_HOME_TAB}))),p(e,t)},m[2]=f,m[3]=_,m[4]=E,m[5]=x,m[6]=p,m[7]=a):a=m[7];let v=a,S=x||f?ej.UiStep.HOME_TAB_NUDGE:"";return m[8]!==S?(n={uiStep:S},m[8]=S,m[9]=n):n=m[9],m[10]!==h||m[11]!==n?(r={...h,...eK,...n},m[10]=h,m[11]=n,m[12]=r):r=m[12],m[13]!==E||m[14]!==x||m[15]!==k?(s=x&&E&&{className:c()("p-home_tab_button--pulse-animation",{"p-home_tab_button--pulse-animation--light":k,"p-home_tab_button--pulse-animation--dark":!k})},m[13]=E,m[14]=x,m[15]=k,m[16]=s):s=m[16],m[17]!==f||m[18]!==v||m[19]!==x||m[20]!==r||m[21]!==s?(d={autoClogProps:r,...s,canTrackHomeTabClick:f,isHomeTabNudging:x,onClick:v,setCanTrackHomeTabClick:b},m[17]=f,m[18]=v,m[19]=x,m[20]=r,m[21]=s,m[22]=d):d=m[22],d}:function({autoClogProps:e=eG.t0,onClick:t}){let a=(0,o.wA)(),[n,r]=(0,l.useState)(!1),i=(0,w.d4)(e=>(0,em.e6)(e)===ee.k6.Home),s=(0,w.d4)(e=>(0,T.Hp)(e,A.xu.TAB_RAIL_HOME_TAB)===A.ze.HOME_TAB_BUTTON_NUDGE),d=!i&&s,m=(0,w.d4)(e=>(0,S.ty)(e,"a11y_animations")),{top_nav_bg:u}=(0,w.d4)(eq.ze),p=(0,ez.ST)(u),h=(0,l.useCallback)((e,i)=>{if(!(!m&&d&&i?.target instanceof Node)||i.currentTarget.contains(i.target))return(d||n)&&(r(!1),a((0,N.Ay)({action:A.hw.CLICK,spaceName:A.xu.TAB_RAIL_HOME_TAB}))),t(e,i)},[n,a,m,d,t]);return(0,l.useMemo)(()=>({autoClogProps:{...e,...eK,...{uiStep:d||n?ej.UiStep.HOME_TAB_NUDGE:""}},...d&&m&&{className:c()("p-home_tab_button--pulse-animation",{"p-home_tab_button--pulse-animation--light":p,"p-home_tab_button--pulse-animation--dark":!p})},canTrackHomeTabClick:n,isHomeTabNudging:d,onClick:h,setCanTrackHomeTabClick:r}),[e,n,h,m,d,p])};function _temp3(e){return(0,S.ty)(e,"a11y_animations")}function use_home_tab_props_temp2(e){return(0,T.Hp)(e,A.xu.TAB_RAIL_HOME_TAB)===A.ze.HOME_TAB_BUTTON_NUDGE}function use_home_tab_props_temp(e){return(0,em.e6)(e)===ee.k6.Home}var eY=a(0xaec6660),eQ=a(0x1273beb2c),eZ=a(0xc7d79eb0),eJ=a(0x24573b3ff),eX=a(0x11c46e85f),e0=a(0x12b2867d0),e1=a(0x1a54d5ba1),e2=a(0xb057ae3b),e4=a(0x1785fce29),e5=a.n(e4);let e3=new h.Ay("activity"),ActivityPeekViewTabs=()=>{let e=(0,o.wA)(),t=(0,w.d4)(e1.Fp),a=(0,w.d4)(e1.wf),n=(0,w.d4)(e1.cJ),r=(0,l.useCallback)(t=>{e((0,e0.$i)(t)),e((0,e0.yO)()),e((0,e2.t)({fetchNew:!0}))},[e]),i=(0,l.useMemo)(()=>[{id:eX.Yq.All,title:e3.t("All"),label:e3.t("All"),titleCount:n>0?n:void 0,className:e5().activityPeekViewTab},{id:eX.Yq.DMs,title:e3.t("DMs"),label:e3.t("DMs"),titleCount:a>0?a:void 0,className:e5().activityPeekViewTab}],[a,n]);return l.createElement(eJ.A,{tabs:i,currentTabId:t,onTabChange:r,ariaLabel:e3.t("Activity tabs"),className:e5().activityPeekViewTabContainer})};ActivityPeekViewTabs.displayName="ActivityPeekViewTabs";var e6=a(0x4122c7f8);let e8=new h.Ay("mentions"),ActivityUnreadsToggleButtonV2=()=>{let e=(0,o.wA)(),t=(0,w.d4)(e1.MF),a=(0,l.useCallback)(async()=>{let a=!t;e((0,e0.qQ)(a)),e((0,e2.t)({fetchNew:!0}))},[e,t]);return l.createElement(e6.A,{selected:t,onClick:a,"aria-label":e8.t("Unreads"),label:e8.t("Unreads")})};ActivityUnreadsToggleButtonV2.displayName="ActivityUnreadsToggleButtonV2";var e7=a(0xe849da7d),e9=a(0xbe5e39b6),te=a(0x88d7fe76),tt=a(0x2103b703d);let ta=6,TabPeekTrigger=({children:e,offsetX:t=ta,renderContent:a,forceTabWhenNavigating:n,peekId:r,isOpen:i=!1,onClose:o})=>{let s=(0,l.useCallback)(()=>l.createElement(tt.A,{type:ee.mq.Modal,windowId:ee.N2,shouldNavigateInContext:!0,forceTabWhenNavigating:n},a()),[a,n]),c=(0,w.d4)(ed.hi);return(0,w.d4)(em.e6)===r?e:l.createElement(te.A,{offsetX:c?-12:t,offsetY:c?4:-44,position:c?e9.yX.BottomLeft:e9.yX.RightBottom,renderContent:s,peekId:r,isOpen:i,onClose:o},e)};TabPeekTrigger.displayName="TabPeekTrigger";var tn=a(0x139aa1a7),tr=a(0x23e6a74f2),ti=a(0x483ff0d),tl=a(0x11036d95f),to=a(1927545e3),ts=a(0x24558b75f),tc=a(0x13404c1ac),td=a(0x1731631dc),tm=a(0x117f78ac8),tu=a(0x19c4eddad),tp=a.n(tu);let th=new h.Ay("ia4"),t_=(0,tr.l)(()=>{let e=(0,o.wA)(),t=(0,w.d4)(ts.n3),a=(0,w.d4)(D.Lh),n=(0,w.d4)(td.Jz),{maybeClosePeek:r}=(0,l.useContext)(tl.Z),i=a?tp().activityPeekView:"";(0,l.useEffect)(()=>{e((0,tc.a)())},[e]),(0,eQ.d)("activityPeek");let s=(0,l.useCallback)(()=>{e((0,e0.Ux)({})),r()},[e,r]),d=l.createElement(l.Fragment,null,a?l.createElement(l.Fragment,null,l.createElement("div",{className:"display_flex align_items_center margin_left_25"},l.createElement(ActivityPeekViewTabs,null)),l.createElement(ActivityUnreadsToggleButtonV2,null)):l.createElement(eZ.A,null),t&&!n&&l.createElement(ti.A,{viewId:a?tn.D.ActivityInbox:to.c.Activity,containerOrigin:ee.mq.Peek,initialColumnMode:tm.oZ.Single,tooltipPosition:"top",onOpen:s,shouldForceNavigateInContext:!1}));return l.createElement(e7.A,{header:th.t("Activity"),className:i,classNameSuffix:"activity",contentClassName:c()("p-view_sidebar","p-view_sidebar--list","p-activity_ia4_page--threads_v2"),headerButtons:d},l.createElement(eY.A,{shouldTrackScroll:!1,className:"p-activity_ia4_page--peek"}))}),ActivityPeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(t_,null),[]),a=(0,w.d4)(D.Lh),n=(0,w.d4)(ed.hi)?ee.k6.ActivityInboxSidebarPrototype:ee.k6.ActivityInbox,r=a?n:ee.k6.Activity;return l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:r,isViewContainer:!0,peekId:r},e)};ActivityPeekTrigger.displayName="ActivityPeekTrigger";var tf=a(0x130d89881),tb=a(0x9c0c23e6),tg=a(0x8f926d7a),ty=a(0x23619f41c),tA=a(0x11a296110),tx=a(0x1fdec3e16),tE=a(0x130c2e810),tC=a(0x1b9d5cc0c),tk=a(0x82980ab8),tv=a(0x1ed65ccda),tS=a(0x18486defc),tI=a.n(tS);let AgentListItemLayout=({avatarUrl:e,name:t,description:a,onClick:n})=>l.createElement(tA.Nm,{className:tI().listItemContainer,onClick:n},l.createElement("div",{className:tI().listItemIconContainer},l.createElement(ty.A,{image:e,size:36})),l.createElement("div",{className:tI().listItemInformation},l.createElement("div",{className:c()(tI().listItemInformationName,{[tI().noDescription]:!a})},l.createElement(tx.A,{lines:1,breakWords:!1},l.createElement("span",null,t))),l.createElement("div",{className:tI().listItemInformationDescription},l.createElement(tx.A,{lines:1,breakWords:!1},l.createElement("span",null,a)))));AgentListItemLayout.displayName="AgentListItemLayout";let AgentListItem=({agentChannelId:e})=>{let t=(0,o.wA)(),{maybeClosePeek:a}=(0,l.useContext)(tl.Z),n=(0,w.d4)(t=>(0,tE.Qn)(t,e)),r=(0,w.d4)(t=>(0,tE.rV)(t,e)),i=r?.legacy_app?.assistant_description,s=n?(0,tC.c2)(n):void 0,c=r?.profile?.name??(0,tk.wg)(n),d=(0,l.useCallback)(()=>{t((0,tv.T)({channelId:e,isSplitView:!1})),a()},[a,t,e]);return l.createElement(AgentListItemLayout,{avatarUrl:s??void 0,name:c,description:i,onClick:d})};AgentListItem.displayName="AgentListItem";var tw=a(0x1a02c72b5),tT=a(0xd6a16321),tN=a(0x13ef633fd);let tM=new h.Ay("agents"),AgentforcePeekActions=()=>{let e=(0,o.wA)(),{maybeClosePeek:t}=(0,l.useContext)(tl.Z),a=(0,l.useCallback)(()=>{e((0,tN.U)({})),t()},[e,t]),n=(0,l.useCallback)(()=>{e((0,tw.o)((0,tT.Mm)())),t()},[e,t]);return l.createElement("div",null,l.createElement(tA.Nm,{className:tI().listItemContainer,onClick:a},l.createElement("div",{className:tI().triggerActionIcon},l.createElement(f.Ah,{name:"plus",size:"20"})),l.createElement("div",{className:tI().listItemInformation},l.createElement("div",{id:"create-message-label",className:tI().listItemInformationName},tM.t("New Conversation")),l.createElement("div",{id:"create-message-description",className:tI().listItemInformationDescription},tM.t("Start a conversation with an agent")))),l.createElement(tA.Nm,{className:tI().listItemContainer,onClick:n},l.createElement("div",{className:tI().triggerActionIcon},l.createElement(f.Ah,{name:"agentforce",size:"20"})),l.createElement("div",{className:tI().listItemInformation},l.createElement("div",{id:"create-message-label",className:tI().listItemInformationName},tM.t("All agents")),l.createElement("div",{id:"create-message-description",className:tI().listItemInformationDescription},tM.t("Your available agents")))))};AgentforcePeekActions.displayName="AgentforcePeekActions";var tR=a(0x18c2d4c6f);let tP=new h.Ay("search"),AgentsList=({keys:e,width:t,height:a})=>{let n=(0,l.useRef)(null),r=(0,l.useCallback)((e,{key:t})=>{if(t.length)return t.startsWith("agentforce-peek-actions")?l.createElement(AgentforcePeekActions,null):l.createElement(AgentListItem,{agentChannelId:t})},[]);return l.createElement(tb.A,{keys:e,width:t,height:a,ref:n,rowRenderer:r})};AgentsList.displayName="AgentsList";let AgentforcePeekView=()=>{let{threads:e}=(0,tg.S)(),t=new Set;e.forEach(({channel:e})=>{e&&t.add(e)});let a=["agentforce-peek-actions",...t];return l.createElement(e7.A,{header:tP.t("Agentforce"),classNameSuffix:"agentforce",contentClassName:c()("p-view_sidebar","p-view_sidebar--list")},l.createElement(tf.A,null,({width:e,height:t})=>l.createElement(AgentsList,{keys:a.flat(),width:e,height:t})))};AgentforcePeekView.displayName="AgentforcePeekView";let AgentforcePeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(AgentforcePeekView,null),[]);return l.createElement(tR.A,{subtype:"agentforce-peek"},l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:ee.k6.Agents,peekId:ee.k6.Agents},e))};AgentforcePeekTrigger.displayName="AgentforcePeekTrigger";var tL=a(0x1d01572a2),tO=a(0x181214caa),tD=a(0x7a2a96da),tF=a(0x1dc84ebc7),tU=a(0x1ae9db902),tB=a(0x22f6a086f),tH=a(0x18fcd8e2a);let AutomationsItem=({triggerId:e,onClick:t})=>{let a=(0,o.wA)(),n=(0,w.d4)(t=>(0,tB.bn)(t,{triggerId:e},!0)),r=(0,l.useCallback)(e=>{a((0,tU.A)({e,triggerId:n.id})),t&&t()},[a,t,n]),i=(0,w.d4)(e=>n?.workflow?.workflow_id?(0,tH.g)(e,n.workflow.workflow_id):void 0),s=(0,tF.j)({trigger:n,workflow:i});if(!s)return null;let{title:c,description:d}=s;return l.createElement("div",{className:"p-automations_item_container","aria-hidden":!0,onClick:r},l.createElement("div",{className:"p-automations_item-icon_container"},l.createElement(tD.A,{shortcutInfo:s,size:36,className:"p-automations_item-icon"})),l.createElement("div",{className:"p-automations_item-information"},l.createElement("div",{className:"p-automations_item-information--name"},l.createElement(tx.A,{lines:1,breakWords:!1},l.createElement("span",null,c))),l.createElement("div",{className:"p-automations_item-information--description"},l.createElement(tx.A,{lines:1,breakWords:!1},l.createElement("span",null,d)))))};AutomationsItem.displayName="AutomationsItem";var tW=a(0x1905eb0cb),tV=a(0x1d0e84a15),tG=a(0xe87b4f3b),tq=a(0x14308a220),tj=a(0x549c3119),tK=a(0x14149c126);let t$=new h.Ay("search"),tY={small:120,medium:175,large:250},AutomationsList=({keys:e,width:t,height:a})=>{let n=(0,l.useRef)(null),{maybeClosePeek:r}=(0,l.useContext)(tl.Z),i=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"perf_browse_sidebar_interactive_list")),o=(0,l.useCallback)((e,{key:t})=>{if(t.length)return"list-loading"===t?l.createElement(l.Fragment,null,[...Array(10)].map((e,t)=>l.createElement(tW.A,{key:t,missingTextSizes:tY,className:"p-explorer_result--list"}))):l.createElement(AutomationsItem,{onClick:()=>{r()},triggerId:t})},[r]);return i?l.createElement(tO.A,{width:t,height:a},e.map(e=>o(0,{key:e}))):l.createElement(tb.A,{keys:e,ref:n,width:t,height:a,rowRenderer:o})};AutomationsList.displayName="AutomationsList";let tQ=l.createElement(tV.$,{minimizedView:!0,clogSource:"more-platform-peek-view-create-button"}),AutomationsPeekView=()=>{let e=(0,o.wA)(),t=(0,w.d4)(es.tb),{workflows:a}=(0,w.d4)(tq.RQ),n=(0,w.d4)(tB.N6)||[],r=n.length;(0,tL.A)(()=>{e((0,tj.sy)())});let i=a?["list-loading"]:n.map(e=>e.id),s=(0,l.useMemo)(()=>l.createElement("span",null,t?t$.t("Tools"):t$.t("Automations"),r>0&&l.createElement("span",{className:"p-peek_card__header_subtitle"},t$.t("{count} recently used",{count:r}))),[t,r]);return l.createElement(e7.A,{header:s,classNameSuffix:"automations",contentClassName:c()("p-view_sidebar","p-view_sidebar--list"),headerButtons:tQ},l.createElement(tf.A,null,({width:e,height:t})=>l.createElement(AutomationsList,{keys:i,width:e,height:t})))};AutomationsPeekView.displayName="AutomationsPeekView";let AutomationsPeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(AutomationsPeekView,null),[]);return(0,w.d4)(tG.MA)?l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:ee.k6.Platform,peekId:ee.k6.Platform},e):e};AutomationsPeekTrigger.displayName="AutomationsPeekTrigger";var tZ=a(0x6affae29),tJ=a(0x99233ecb),tX=a(0x1a3c2e1af),t0=a(0x1ed656589);let t1=new h.Ay("search"),t2={clogImpression:!0,elementName:"tabs_customization_menu_item",onClick:{enableClogAction:!0},uiComponentName:ej.UiComponentName.TABS_CUSTOMIZATION_MENU_ITEM},t4=(0,r.DA)()?e=>{let t,a,n,r=(0,i.c)(7);if(r[0]!==e?({onClick:t,...a}=e,r[0]=e,r[1]=t,r[2]=a):(t=r[1],a=r[2]),(0,w.d4)(tabs_customization_menu_item_temp))return null;if(r[3]!==t||r[4]!==a){let e;r[6]===Symbol.for("react.memo_cache_sentinel")?(e=l.createElement("div",{className:"p-more_menu_infobox--steady"},t1.t("Customize navigation bar")),r[6]=e):e=r[6],n=l.createElement(tJ.Dr,{...a,autoClogProps:t2,className:"p-more_menu_infobox--menu",onSelected:t,type:"custom"},e),r[3]=t,r[4]=a,r[5]=n}else n=r[5];return n}:({onClick:e,...t})=>(0,w.d4)(e=>(0,T.Hp)(e,A.xu.MORE_PEEK_MENU)===A.ze.MORE_PEEK_MENU_TABS_CUSTOMIZATION_NUX_MENU_ITEM)?null:l.createElement(tJ.Dr,{...t,autoClogProps:t2,className:"p-more_menu_infobox--menu",onSelected:e,type:"custom"},l.createElement("div",{className:"p-more_menu_infobox--steady"},t1.t("Customize navigation bar")));t4.displayName="TabsCustomizationMenuItem";let t5=(0,t0.Ay)((0,l.memo)(t4));function tabs_customization_menu_item_temp(e){return(0,T.Hp)(e,A.xu.MORE_PEEK_MENU)===A.ze.MORE_PEEK_MENU_TABS_CUSTOMIZATION_NUX_MENU_ITEM}let t3=new h.Ay("search");function BrowsePeekMenuItemContainer({ariaDescribedBy:e,ariaLabel:t,badge:a,hasUnreads:n,callout:r,svgIconProps:i,id:o,menuItemProps:s,shortcutNumber:d,subtitle:m,title:u,...h}){let _=null;return d&&(_=(0,p.cX)()?t3.rt("^{keyboardNumber}",{keyboardNumber:d}):t3.rt("Ctrl Shift {keyboardNumber}",{keyboardNumber:d})),l.createElement(tJ.Dr,{ariaLabel:t,ariaDescribedBy:e,...s,...h},l.createElement("div",{className:c()("p-more_menu_icon",n&&"p-more_menu_icon--with_unreads")},l.createElement(f.Ah,{size:"20",...i})),l.createElement("div",{className:"p-ia4_create_menu__item__label"},l.createElement("div",{id:`${o}-title`,className:"p-ia4_create_menu__item__label__title"},u,r),l.createElement("div",{id:o,className:"p-ia4_create_menu__item__label__subtitle"},m)),a,_&&l.createElement("span",{className:"p-more_menu_shortcuts"},_))}BrowsePeekMenuItemContainer.displayName="BrowsePeekMenuItemContainer";let t6=(0,t0.Ay)(BrowsePeekMenuItemContainer),t8=BrowsePeekMenuItemContainer;var t7=a(0xb04bc36e);let t9=new h.Ay("search");function BrowsePeekMenuItemNewCallout(){return l.createElement(t7.A,{className:"p-more_menu_callout"},t9.t("NEW"))}BrowsePeekMenuItemNewCallout.displayName="BrowsePeekMenuItemNewCallout";let ae=(0,l.memo)(BrowsePeekMenuItemNewCallout);var at=a(0x1fbd80a09),aa=a(0x1c56fcf95),an=a(0x1d06e350e),ar=a(0x1defa8f11);let ai="seen_files_tab",al=(0,v.Ay)(e=>{if((0,S.ty)(e,"onboarding_complete")||(0,ar.ax)(e,ai))return!0;let t=an.ej.FILES,{totalCount:a}=(0,aa.gK)(e,t);return a>0});al.meta={name:"shouldShowFilesInMore",key:"createSelectorShouldShowFilesInMore",description:e=>{if((0,S.ty)(e,"onboarding_complete")||(0,ar.ax)(e,ai))return!0;let t=an.ej.FILES,{totalCount:a}=(0,aa.gK)(e,t);return a>0}};var ao=a(0xc573eb49),as=a(0x1be37a18e),ac=a(0xbc76db4d),ad=a(0x70de3606),am=a(0x167d76333),au=a(0x382cbff6),ap=a(0x194961f43),ah=a(0xfc11c981),a_=a(0x12f41fc32),af=a(0x18f14f172),ab=a(0x1006f8a2b),ag=a(0x1a07e694d),ay=a(0x1624919a),aA=a(0x1472af90a),ax=a(0xf052d367),aE=a(0x18632f75a),aC=a(0x786f41af),ak=a(0x1a204ce4e);let av=new h.Ay("search"),BrowsePeekMenu=({overflowTabs:e,refToTriggerElement:t})=>{let a=(0,o.wA)(),n=(0,w.d4)(es.tb),r=(0,w.d4)(es.hx),i=(0,w.d4)(au.d9),s=(0,w.d4)(D.Lh),c=(0,w.d4)(D.IW),d=(0,w.d4)(D.QT),m=s?ee.k6.ActivityInbox:ee.k6.Activity,u=(0,w.d4)(e=>!(0,ax.h$)(e,aA.G7.SolutionsMoreMenuItem)),p=(0,at.X)(),h=(0,w.d4)(e1.cJ),f=(0,w.d4)(em.e6),b=(0,w.d4)(al),g=(0,w.d4)(am.F),y=(0,w.d4)(ad.Il),x=(0,w.d4)(e=>(0,S.ty)(e,"seen_sidebar_tabrail_more_automations_callout")),E=(0,w.d4)(e=>(0,S.ty)(e,"onboarding_complete")),C=(0,w.d4)(e=>(0,ar.ax)(e,ai)),k=(0,w.d4)(ac.l),v=(0,l.useMemo)(()=>g&&y?av.t("Canvases, lists and attachments"):g&&!y?av.t("Canvases and attachments"):y&&!g?av.t("Lists and attachments"):av.t("Attachments"),[g,y]),I=(0,w.d4)(aC.A).slice(0,9),{maybeClosePeek:N}=(0,l.useContext)(tl.Z),M=(0,w.d4)(e=>(0,ah.a)(e,ee.k6.DMs)),R=(0,w.d4)(e=>(0,X.A)(e,{tab:ee.k6.Platform})??"");(0,tL.A)(()=>{!x&&r&&a((0,a_.AZ)({pref:"seen_sidebar_tabrail_more_automations_callout",value:!0}))}),(0,l.useEffect)(()=>{!b||E||C||a((0,ay.S)({pref:ai,value:!0,reason:ai}))},[a,b,C,E]);let L=(0,l.useCallback)(e=>{switch(e){case ee.k6.DMs:return a((0,ak.A)({tab:ee.k6.DMs,reason:ak.m.Click}));case m:return a((0,ak.A)({tab:m,reason:ak.m.Click}));case ee.k6.SalesHome:return a((0,ak.A)({tab:ee.k6.SalesHome,reason:ak.m.Click}));case ee.k6.Later:return a((0,ak.A)({tab:ee.k6.Later,reason:ak.m.Click}));case ee.k6.Platform:return a((0,af.c)());case ee.k6.Huddles:return a((0,tw.o)((0,tT.ZF)(to.c.Huddles)));case ee.k6.Assistant:return a((0,ak.A)({tab:ee.k6.Assistant,reason:ak.m.Click}));case ee.k6.SlackKitPlayground:return a((0,ak.A)({tab:ee.k6.SlackKitPlayground,reason:ak.m.Click}));case ee.k6.Solutions:return a((0,tw.o)((0,tT.Wy)()));case ee.k6.Todos:return a((0,ak.A)({tab:ee.k6.Todos,reason:ak.m.Click}));case ee.k6.Agents:return a((0,ak.A)({tab:ee.k6.Agents,reason:ak.m.Click}));case ee.k6.Today:return a((0,ak.A)({tab:ee.k6.Today,reason:ak.m.Click}));case ee.k6.UnifiedFiles:return a((0,ak.A)({tab:ee.k6.UnifiedFiles,reason:ak.m.Click}));case ee.k6.Search:return a((0,ak.A)({tab:ee.k6.Search,reason:ak.m.Click}));default:(0,tZ.Kh)(e)}},[a,m]),O=(0,l.useCallback)(()=>{t?.current?.focus(),N()},[t,N]),F=(0,l.useCallback)(e=>{e===ee.k6.Solutions&&a((0,aE.z)({component:aA.G7.SolutionsMoreMenuItem,type:aA.X8.Click,reason:"templates-more-menu-item-click"}))},[a]),U=(0,l.useCallback)(()=>l.createElement(ea.Cr,null),[]),B=(0,w.d4)(e=>(0,T.Hp)(e,A.xu.MORE_PEEK_MENU,void 0)===A.ze.UNIFIED_TOOLS_TAB_WFB_AI_STEP_TOOLS_TAB_BADGE),H=(0,l.useCallback)(e=>{e!==ee.k6.Admin&&(O(),F(e),L(e)),e===ee.k6.Platform&&B&&a((0,ag.A)({action:A.hw.CLICK,spaceName:A.xu.MORE_PEEK_MENU}))},[B,O,F,L,a]),W=(0,l.useCallback)(()=>{O()},[O]),V=(0,l.useCallback)((e,t)=>l.createElement(l.Fragment,null,l.createElement(P.Gm,{style:P.rY.themed,count:e,maxCount:ef.N}),l.createElement("div",{hidden:!0,id:`${t}-mention-count`},av.t("{mentionCount, plural, =1 {{count} new mention} other {{count} new mentions}}",{mentionCount:e,count:e,ns:"team_picker"}))),[]),G=(0,l.useCallback)(e=>({id:e,key:e,className:"p-ia4_create_menu__item",type:_.A.radio,checked:e===f,onSelected:()=>H(e),autoClogProps:{eventId:ej.EventId.TAB_RAIL,elementName:e,onClick:{enableClogAction:!0}}}),[f,H]),q=(0,l.useMemo)(()=>l.createElement(ae,null),[]),j=(0,l.useCallback)(()=>{a((0,ab.A)({activeSection:as._.tabRail})),O()},[O,a]),z=(0,l.useMemo)(()=>l.createElement(ei.A,ao.Mb),[]);return l.createElement(tJ.Ay,{menuClassNames:"p-more_menu p-peek_card p-peek_card--as-card p-peek_card--animate-in p-peek_card--browse p-more_menu--with_customization",width:360,onTriggerClose:W,"aria-label":av.t("More"),noMargin:!0,styleMode:"alternate"},l.createElement(tJ.c$,{label:av.t("More"),className:"p-more_menu_header p-peek_card__header"}),e.map(e=>{let t=I.findIndex(t=>t===e)+1,a=t>0?t:void 0;switch(e){case ee.k6.DMs:return l.createElement(t6,{ariaDescribedBy:"dms-description",ariaLabelledBy:`dms-description-title ${ee.k6.DMs}-mention-count`,ariaLabel:av.t("Direct messages",{ns:"ia4"}),badge:M?!!p[Z.Vw.DMS]&&V(p[Z.Vw.DMS],ee.k6.DMs):void 0,svgIconProps:(0,ap.A)(e),id:"dms-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Direct messages with your team"),title:av.t("DMs")});case m:return l.createElement(t6,{ariaDescribedBy:"activity-description",ariaLabelledBy:`activity-description-title ${m}-mention-count`,ariaLabel:av.t("Activity"),badge:!!h&&V(h,m),svgIconProps:(0,ap.A)(e),id:"activity-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Updates on what\u2019s happening"),title:av.t("Activity")});case ee.k6.SalesHome:return l.createElement(t6,{ariaDescribedBy:"sales-home-description",ariaLabelledBy:"sales-home-description-title",ariaLabel:av.t("Sales"),svgIconProps:(0,ap.A)(e),id:"sales-home-description",menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Where you go to close the deals"),title:av.t("Sales")});case ee.k6.Todos:return l.createElement(t6,{ariaDescribedBy:"todos-description",ariaLabelledBy:"todos-description-title",ariaLabel:av.t("To-dos"),svgIconProps:(0,ap.A)(e),id:"todos-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Personal task tracking"),title:av.t("To-dos")});case ee.k6.Later:return l.createElement(t6,{ariaDescribedBy:"later-description",ariaLabelledBy:`later-description-title ${ee.k6.Later}-mention-count`,ariaLabel:av.t("Later"),badge:!(s&&c&&d)&&!!p[Z.Vw.LATER]&&V(p[Z.Vw.LATER],ee.k6.Later),svgIconProps:(0,ap.A)(e),id:"later-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Saved messages to review later"),title:av.t("Later")});case ee.k6.Assistant:return l.createElement(t6,{ariaDescribedBy:"assistant-description",ariaLabelledBy:"assistant-description-title",ariaLabel:k?av.t("Assistant"):"",svgIconProps:(0,ap.A)(e),id:"assistant-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:k?av.t("Get some assistance from AI"):"",title:k?av.t("Assistant"):""});case ee.k6.Huddles:return l.createElement(t6,{ariaDescribedBy:"huddles-description",ariaLabelledBy:"huddles-description-title",ariaLabel:av.t("Calendar",{ns:"page_huddles"}),svgIconProps:(0,ap.A)(e),id:"huddles-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("All your meetings and events in one place"),title:av.t("Calendar",{ns:"page_huddles"})});case ee.k6.Platform:return l.createElement(t6,{ariaDescribedBy:"platform-description",ariaLabelledBy:"platform-description-title",ariaLabel:R,svgIconProps:(0,ap.A)(e,n),id:"platform-description",key:e,callout:z,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Create and find workflows and apps"),title:R});case ee.k6.Solutions:return l.createElement(t6,{ariaDescribedBy:"solutions-description",ariaLabel:av.t("Templates"),ariaLabelledBy:"solutions-description-title",svgIconProps:(0,ap.A)(e),id:"solutions-description",key:e,callout:u&&q,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Kickstart any job with these pre-built bundles"),title:av.t("Templates")});case ee.k6.SlackKitPlayground:return l.createElement(t6,{ariaDescribedBy:"slack-kit-playground-description",ariaLabel:"Slack Kit Playground",ariaLabelledBy:"slack-kit-playground-title",svgIconProps:(0,ap.A)(e),id:"slack-kit-playground-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:"Prototype on a blank canvas",title:"Slack Kit Playground"});case ee.k6.Agents:return l.createElement(t6,{ariaDescribedBy:"agents-description",ariaLabelledBy:"agents-description-title",ariaLabel:av.t("Agentforce"),svgIconProps:(0,ap.A)(e),id:"agents-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Browse and team up with AI agents"),title:av.t("Agentforce")});case ee.k6.Today:return l.createElement(t6,{ariaLabel:av.t("Today"),svgIconProps:(0,ap.A)(e),id:"today-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:i?av.t("Your day, organized"):"Your day, organized",title:av.t("Today")});case ee.k6.UnifiedFiles:return l.createElement(t6,{ariaLabel:av.t("Files"),svgIconProps:(0,ap.A)(e),id:"unified-files-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:v,title:av.t("Files")});case ee.k6.Search:return l.createElement(t6,{ariaLabel:av.t("Search"),svgIconProps:(0,ap.A)(e),id:"search-description",key:e,menuItemProps:G(e),shortcutNumber:a,subtitle:av.t("Search far and wide"),title:av.t("Search")});default:return null}}),e.map(e=>e===ee.k6.Admin?l.createElement(tX.A,{key:e,renderSubmenu:U,className:"no_padding"},l.createElement(t8,{ariaDescribedBy:"admin-tools-description",ariaLabel:av.t("Admin tools"),id:"admin-tools-description",key:e,svgIconProps:(0,ap.A)(e),menuItemProps:G(e),subtitle:av.t("Manage your team\u2019s workspace"),title:av.t("Admin tools")})):null),l.createElement(ei.s,{...ao.Uc,onClick:j,shouldAlwaysRenderChildren:!0,shouldPassPropsToChildren:!0},l.createElement(t5,{onClick:j})))};BrowsePeekMenu.displayName="BrowsePeekMenu";let BrowsePeekTrigger=({overflowTabs:e,children:t})=>{let a=(0,l.useRef)(null),n=(0,l.useRef)(null),r=l.Children.only(t),i=l.cloneElement(r,{ref:n}),o=(0,l.useCallback)(()=>l.createElement("div",{className:"p-more_menu__container",ref:a},l.createElement(BrowsePeekMenu,{refToTriggerElement:n,overflowTabs:e}),l.createElement(ei.A,{...ao.y6,maxHeight:a.current?.clientHeight,isListsNuxVisible:!1})),[e]),s=(0,w.d4)(ed.hi);return l.createElement(te.A,{allowanceY:4,offsetX:s?-12:ta,offsetY:s?4:-44,renderContent:o,forceOpenOnClick:!0,peekId:ee.k6.Browse,position:s?e9.yX.BottomLeft:void 0},i)};BrowsePeekTrigger.displayName="BrowsePeekTrigger";var aS=a(0x1f355b555),aI=a(0x344bb842),aw=a(0x2d8324a5),aT=a(0x21482e9f8);function useGetSortedEvents(e){return(0,l.useMemo)(()=>{if(e)return e.sort((e,t)=>(e?.start||0)-(t?.start||0))},[e])}var aN=a(0x1e864b930),aM=a(0xa6f3163b),aR=a(0x24e94d4ab),aP=a(0x1f4876c3),aL=a.n(aP);let aO=new h.Ay("calendar"),aD=l.memo(({events:e,selectedBackground:t})=>{let a=(0,o.wA)(),n=(0,l.useMemo)(()=>e?.length===0?eG.Ml:(0,aR.U)(e),[e]),r=(0,l.useCallback)(()=>{a((0,tw.o)((0,tT.ZF)(to.c.BrowseHuddles)))},[a]),i=aO.t("All day",{fallbackHash:"114574336ac7883aebd0653b3fc5e82f9262dc86",fallbackHashNs:"huddles"}),s=n.map(e=>e.title),d=(0,aN.A)(s),m=(0,l.useMemo)(()=>{switch(t){case aT.L.LightCabin:return{gradient:aL().cabinGradientLight};case aT.L.LightCherryBlossom:return{gradient:aL().cherryBlossomGradientLight};case aT.L.LightClouds:return{gradient:aL().cloudsGradientLight};case aT.L.DarkCabin:return{gradient:aL().cabinGradientDark};case aT.L.DarkCherryBlossom:return{gradient:aL().cherryBlossomGradientDark};case aT.L.DarkClouds:return{gradient:aL().cloudsGradientDark};default:return{gradient:null}}},[t]),u=(0,l.useMemo)(()=>{if(0===n.length)return null;let e=aO.rt("{eventTitle}{remainingEventsCount, plural, =0 {} =1 {, +1 more} other {, +# more}}",{eventTitle:n[0].title,remainingEventsCount:n.length-1,fallbackHash:"dc3decbb93847518f1a049dcf49d0d7c6560bcc6",fallbackHashNs:"today"});return l.createElement(tx.A,{lines:1,className:aL().allDayEventsContainer,withTooltip:!0,customTooltipText:d},e)},[n,d]);return 0===n.length?null:l.createElement(aM.A,{className:c()(aL().allDayEvents,m.gradient),onClick:r},l.createElement("div",{className:aL().allDayEventsLabel},i),u)});var aF=a(0xb1ea448c),aU=a(0x20b28780d),aB=a(0x10a9e0608),aH=a(0x110f7e629),aW=a.n(aH);let aV=new h.Ay("calendar"),aG=l.memo(({isToday:e,backgroundClassName:t})=>{let a=aV.t("No meetings today"),n=aV.t("No meetings"),r=aV.t("Take a breath and enjoy the tranquility");return l.createElement("div",{className:c()(aW().noEvents,t)},l.createElement("div",{className:aW().noEventsTitle},e?a:n," "),l.createElement("div",{className:aW().noEventsBody},r))});var aq=a(0x2043404b0),aj=a(0x1d7642c9b),az=a(0x152e71af8),aK=a(0x83eee12e),a$=a(0x204d9fd0b),aY=a(0xafbd6e39),aQ=a(0x1dce572d1),aZ=a.n(aQ);let PeekEventItem=({event:e,showAdditionalDetails:t=!1,showJoinButton:a=!1,className:n})=>{let r=(0,w.d4)(e=>(0,S.ty)(e,"time24"))??!1,{meeting_provider:i,start:o,end:s}=e,d=`${aS.Ay.unix(o||0).format(r?"HH:mm":"h:mm A")}`,m=(0,aY.y)(o,s);return l.createElement("div",{className:c()(aZ().peekEventItem,n,{[aZ().eventHasPassed]:m===az.Ow.Past})},l.createElement("div",{className:aZ().topContainer},l.createElement(aK.E,{meetingProvider:i||"not_set"}),l.createElement("div",{className:aZ().peekTime},d),l.createElement("div",{className:aZ().titleContainer},l.createElement("div",{className:aZ().peekTitle},l.createElement(tx.A,{lines:1,breakWords:!0,withTooltip:!0},l.createElement(aj.j,{eventItem:e})))),a&&l.createElement(a$.n,{event:e,className:aZ().joinButton,variation:a$.W.PeekVariation})),t&&e?.description_blocks&&l.createElement("div",{className:aZ().eventDetails},l.createElement(aq.A,{elements:e.description_blocks[0].elements,maxLines:3,maxChars:200})))};PeekEventItem.displayName="PeekEventItem";var aJ=a(0x16f91c3e9),aX=a(0x1c65dc5d1),a0=a.n(aX);let a1=new h.Ay("today"),a2=l.memo(({isLoading:e,events:t,isToday:a,selectedBackground:n})=>{let r=(0,o.wA)(),i=(0,aU._)(),s=(0,l.useRef)(null),d=(0,l.useMemo)(()=>t.filter(e=>!1===e.is_all_day),[t]),m=(0,l.useMemo)(()=>{let e=(0,aS.Ay)(),t=!0,n=!0,r=!0;return d.map(i=>{let l=(0,aS.Ay)((i.start??0)*1e3).diff(e,"minute"),o=l<=0&&a,s=l>0&&l<60&&a,c=!o&&!s&&!a,d=a&&!o&&!s,m={event:i,isHappeningNow:o,isFirstHappeningNow:o&&t,isUpcoming:s,isFirstUpcoming:s&&n,isFirstToday:d&&r,isOther:c};return o&&(t=!1),s&&(n=!1),d&&(r=!1),m})},[d,a]),u=(0,l.useCallback)((e,{key:t})=>{if(!d||0===d.length)return null;let a=m[e],n=a.event;if(!n)return null;if(a.isFirstHappeningNow)return l.createElement("div",null,l.createElement("div",{className:c()(a0().peekEventListHeader,a0().upcomingEvent)},a1.t("Happening now")),l.createElement(PeekEventItem,{key:n.id,event:n,showAdditionalDetails:!0,showJoinButton:!0}));if(a.isFirstUpcoming){let e=(0,aS.Ay)((n.start??0)*1e3).diff((0,aS.Ay)(),"minute");return l.createElement("div",null,l.createElement("div",{className:c()(a0().peekEventListHeader,a0().upcomingEvent)},a1.t("Upcoming"),e<60&&l.createElement("span",{className:a0().upcomingEventTime},a1.rt("in {minutes} minutes",{minutes:e}))),l.createElement(PeekEventItem,{key:n.id,event:n,showAdditionalDetails:!0,showJoinButton:!0}))}return a.isFirstToday?l.createElement("div",{className:a0().todayEvents},l.createElement("div",{className:a0().peekEventListHeader},"Today"),l.createElement(PeekEventItem,{key:n.id,event:n})):a.isHappeningNow||a.isUpcoming?l.createElement(PeekEventItem,{key:n.id,event:n,showAdditionalDetails:!0,showJoinButton:!0}):l.createElement(PeekEventItem,{key:t,event:n})},[m,d]),p=(0,l.useMemo)(()=>{switch(n){case aT.L.LightCabin:return{gradient:a0().cabinGradientLight};case aT.L.LightCherryBlossom:return{gradient:a0().cherryBlossomGradientLight};case aT.L.LightClouds:return{gradient:a0().cloudsGradientLight};case aT.L.DarkCabin:return{gradient:a0().cabinGradientDark};case aT.L.DarkCherryBlossom:return{gradient:a0().cherryBlossomGradientDark};case aT.L.DarkClouds:return{gradient:a0().cloudsGradientDark};default:return{gradient:null}}},[n]),h=(0,l.useCallback)(e=>{if(!e||!e.id)return;let t=d.find(t=>t.id===e.id);if(t){let e=(0,aS.Ay)(1e3*(t?.start||0)),a={formattedDateString:e.format("YYYY-MM-DD"),relativePlaceInTime:(0,aB.fg)(e)};r((0,aJ.U)({meetingDetailsEventId:t.id,openAtDay:!0,dayToView:a})),i({elementName:aU.H.PEEK_OPEN_EVENT,extraParams:{calendarEventId:t.id},action:ej.UiAction.CLICK})}},[d,r,i]),_=(0,l.useMemo)(()=>m.map(e=>e.event.id),[m]);return d?e||0!==d.length?l.createElement("div",{className:c()(a0().peekEventList,p.gradient)},e&&l.createElement(aF.A,{size:"medium",noMargin:!0,floating:!0}),l.createElement(tf.A,null,({width:e,height:t})=>l.createElement(tb.A,{containerClassName:"margin_top_100 margin_bottom_100",ref:s,width:e,height:t,"aria-label":a1.t("Calendar",{fallbackHash:"adab5090ac6a1b7b5420faac7be86c41721ba27c",fallbackHashNs:"today"}),keys:_,rowRenderer:u,animateOnScroll:!1,onItemClick:h}))):l.createElement(aG,{isToday:a,backgroundClassName:p.gradient}):null});var a4=a(0x2449f9f39),a5=a(0x1f9d0e196),a3=a(0xcb6d046a),a6=a.n(a3);let a8=new h.Ay("ia4_peeks"),a7={name:"caret-left"},a9={name:"caret-right"},ne={name:"open-in-window"},CalendarPeekView=()=>{let e=(0,o.wA)(),t=(0,w.d4)(td.Jz),[a,n]=(0,l.useState)(0),r=Date.now(),i=(0,aS.Ay)().add(a,"day"),s=i.format("YYYY-MM-DD"),d=(0,aT.z)(),{daywiseEventsData:m,isLoading:u}=(0,aw.G)({dayToFetchEventsFor:s}),p=(0,aR.V)(m),h=useGetSortedEvents(a<0?p:p.filter(e=>e.start&&1e3*e.start>r||e.end&&r<1e3*e.end)),_=(0,l.useCallback)(()=>{n(e=>e-1)},[]),f=(0,l.useCallback)(()=>{n(e=>e+1)},[]),b=(0,l.useCallback)(()=>{e((0,a4.X)({tabName:ee.k6.Huddles}))},[e]),g=(0,l.useMemo)(()=>{let e=i.isSame((0,aS.Ay)(),"day")?a8.t("Today"):i.format("dddd"),t=i.format("MMMM Do");return l.createElement("div",null,l.createElement("span",null,e," "),l.createElement("span",{className:a6().headerDate},t," "))},[i]),y=(0,l.useMemo)(()=>{let e=a8.t("Open in new window"),a=a8.t("Previous day"),n=a8.t("Next day");return l.createElement("div",{className:a6().header},g,l.createElement("div",{className:a6().triggerControls},!t&&(0,ts.M2)()&&l.createElement(U.Ay,{tip:e},l.createElement(aI.A,{"aria-label":e,onClick:b,size:"small",svgIconProps:ne})),l.createElement(U.Ay,{tip:a},l.createElement(aI.A,{"aria-label":a,onClick:_,size:"small",svgIconProps:a7})),l.createElement(U.Ay,{tip:n},l.createElement(aI.A,{"aria-label":n,onClick:f,size:"small",svgIconProps:a9}))))},[_,f,g,b,t]);return h&&l.createElement(e7.A,{header:y,className:a6().triggerView,classNameSuffix:"calendar",contentClassName:c()("p-view_sidebar","p-view_sidebar--list")},l.createElement("div",{className:a6().peekContent},l.createElement(a2,{isLoading:u,events:h,isToday:0===a,selectedBackground:d}),l.createElement(aD,{events:m,selectedBackground:d})))};CalendarPeekView.displayName="CalendarPeekView";let CalendarPeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(CalendarPeekView,null),[]);return(0,w.d4)(a5.wh)?l.createElement(tR.A,{subtype:"calendar-peek"},l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:ee.k6.Huddles,peekId:ee.k6.Huddles},e)):e};CalendarPeekTrigger.displayName="CalendarPeekTrigger";var nt=a(0x21a429a1b),na=a(0x9927431e);let nn=new h.Ay("ia4"),nr=l.createElement(na.A,null),DmsPeekView=()=>l.createElement(e7.A,{header:nn.t("Direct messages"),classNameSuffix:"dms",contentClassName:c()("p-view_sidebar","p-view_sidebar--list"),headerButtons:nr},l.createElement(nt.A,{shouldTrackScroll:!1,compactDisplay:!0,isPeekView:!0}));DmsPeekView.displayName="DmsPeekView";let DmsPeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(DmsPeekView,null),[]);return l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:ee.k6.DMs,peekId:ee.k6.DMs},e)};DmsPeekTrigger.displayName="DmsPeekTrigger";var ni=a(0x1813a25e3);let nl=new h.Ay("ia4"),HomePeekView=()=>l.createElement(e7.A,{header:nl.t("Home"),classNameSuffix:"home",contentClassName:"p-ia4_channel_list"},l.createElement(ni.a,null));HomePeekView.displayName="HomePeekView";let HomePeekTrigger=({children:e})=>{let t=(0,w.d4)(eI.pK),a=(0,l.useCallback)(()=>l.createElement(HomePeekView,null),[]);return t?l.createElement(TabPeekTrigger,{renderContent:a,forceTabWhenNavigating:ee.k6.Home,peekId:ee.k6.Home},e):e};HomePeekTrigger.displayName="HomePeekTrigger";var no=a(0x15e48057c),ns=a(0x66a64bd9),nc=a(0x241b9cd6e),nd=a(0xccad1590),nm=a(0x121459a2),nu=a(0x1fb2d2a87),np=a(0x1b9ff23fe),nh=a(0xb8c5c3c3);let n_=new h.Ay("saved_for_later"),LaterList=({loading:e,items:t,clientTheme:a})=>{let n=(0,l.useContext)(no.A),r=t.map(e=>(0,nh.Fz)(e)),i=(0,l.useRef)(null),o=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"perf_browse_sidebar_interactive_list")),s=(0,l.useCallback)((e,{key:a,hasFocus:r})=>l.createElement(ns.A,{item:t[e],key:a,hasFocus:!!r&&n,setHighlightedTab:d.A}),[n,t]);return l.createElement("div",{className:`p-saved_for_later_page__list_wrapper p-saved_for_later_page__list_wrapper--${a}`},e&&l.createElement(aF.A,{size:"medium",noMargin:!0,floating:!0}),l.createElement(tf.A,null,({width:e,height:t})=>o?l.createElement(tO.A,{width:e,height:t,className:"p-saved_for_later_page__list"},r.map((e,t)=>l.createElement("div",{key:e,className:"position_relative full_width"},s(t,{key:e})))):l.createElement(tb.A,{ref:i,className:c()("p-saved_for_later_page__list"),width:e,height:t,"aria-label":n_.t("Saved for Later"),keys:r,rowRenderer:s,animateOnScroll:!1})))};LaterList.displayName="LaterList";let LaterPeekView=()=>{let e=(0,o.wA)(),t=(0,l.useRef)(null),a=(0,w.Z2)(np._q),[n,r]=(0,l.useState)(()=>!a.length),i=(0,w.d4)(td.Jz),s=(0,w.d4)(ts.n3),d=(0,w.d4)(np.mD),{maybeClosePeek:m}=(0,l.useContext)(tl.Z),u=(0,w.d4)(nu.to);(0,l.useEffect)(()=>{n&&e((0,nd.W3)({filter:nm.ax.saved})).then(()=>{r(!1)})},[n,e]);let p=l.createElement("span",null,n_.t("Later"),d.uncompletedCount>0&&l.createElement("span",{className:"p-peek_card__header_subtitle"},n_.t("{count} in progress",{count:d.uncompletedCount}))),h=s&&!i?l.createElement(ti.A,{viewId:to.c.Later,containerOrigin:ee.mq.Peek,initialColumnMode:tm.oZ.Single,tooltipPosition:"top",onOpen:m}):null;return l.createElement(e7.A,{header:p,headerButtons:h,classNameSuffix:"later",contentClassName:c()("p-view_sidebar","p-view_sidebar--list")},n||0!==a.length?l.createElement(LaterList,{items:a,loading:n,clientTheme:u}):l.createElement(nc.A,{activeTab:nm.ax.saved,emptyStateRef:t}))};LaterPeekView.displayName="LaterPeekView";let LaterPeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(LaterPeekView,null),[]);return l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:ee.k6.Later,peekId:ee.k6.Later},e)};LaterPeekTrigger.displayName="LaterPeekTrigger";var nf=a(0x5359476e),nb=a(0x3b6d144f),ng=a(0x40c0d834),ny=a(0x2b7f0bcc),nA=a(0x223e3a88),nx=a(0x172c54b1c),nE=a(0x113cdbbd7),nC=a(0x944e06df),nk=a(0xf01a9d50),nv=a(0x6960d8b9),nS=a(0x1d104c491),nI=a(0xbf61ff25);let nw=new h.Ay("modernselling"),FeedItemTitle=({info:e})=>{let t=e.payload.opportunities?.[0];return"scheduled"===e.notification_type?l.createElement("div",{className:c()("sk_primary_foreground",{bold:e.is_unread})},l.createElement(f.Ah,{inline:!0,name:"calendar"})," ",nw.t("Scheduled")):t?l.createElement("div",{className:"bold"},l.createElement(f.Ah,{inline:!0,...(0,nk.C)(nS.Dj.Opportunity)})," ",t.name):l.createElement("div",{className:c()("sk_primary_foreground",{bold:e.is_unread})},l.createElement(f.Ah,{inline:!0,name:"reminder"})," ",nw.t("Reminder"))};FeedItemTitle.displayName="FeedItemTitle";let FeedItem=({info:e,last:t})=>l.createElement("div",{className:c()({"p-sales_notifications_peek__feed_item__card--last":t,"p-sales_notifications_peek__feed_item__card--unread":e.is_unread},"p-sales_notifications_peek__feed_item__card")},l.createElement("div",{className:"p-sales_notifications_peek__feed_item__title"},l.createElement(FeedItemTitle,{info:e,last:t}),l.createElement("div",{className:"display_flex flex_direction_row align_items_center"},e.is_unread?l.createElement("span",{className:"p-sales_notifications_peek__feed_item__unread_dot"}):null)),l.createElement("div",{className:"p-sales_notifications_peek__feed_item__info"},l.createElement("div",{className:"display_flex align_items_start"},l.createElement("img",{className:"p-sales_notifications_peek__feed_item__icon",src:e.icon_url??nI,alt:e.notification_type})),l.createElement("div",{className:"p-sales_notifications_peek__feed_item__info_text"},l.createElement("div",{className:"p-sales_notifications_peek__feed_item__info_container"},l.createElement("span",{className:"p-sales_notifications_peek__feed_item__info_title"},e.payload.workflow.title),l.createElement("span",{className:c()("p-sales_notifications_peek__feed_item__info_datetime",{bold:e.is_unread})},(0,nv.Yq)(e.created_ts,"{ago}"))),l.createElement(nC.A,{blocks:e.body,blocksContainerContext:nE.pi.sales_home_notification}))));FeedItem.displayName="FeedItem";var nT=a(0x21f1cb409);function useFetchNotifications(e=40){let t=(0,o.wA)();return(0,l.useCallback)(a=>t((0,nT.J)({reason:"list",cursor:a,limit:e})),[t,e])}var nN=a(0x156eec78a);let nM=a.p+"bell-peek-dark-8e55d93.svg",nR=a.p+"bell-peek-light-25a8281.svg",nP=new h.Ay("modernselling"),Feed=({limit:e})=>{let t=(0,o.wA)(),a=useFetchNotifications(e),n=(0,nN.Q)(),r=(0,w.d4)(nu.to),{maybeClosePeek:i}=(0,l.useContext)(tl.Z),s=(0,l.useCallback)(()=>{n({viewType:tn.D.SalesNotifications}),i()},[i,n]),c=(0,l.useCallback)(()=>{t((0,tw.o)((0,tT.FN)())),i()},[t,i]),[d,m]=(0,l.useState)([]),[u,p]=(0,l.useState)(!0),[h,_]=(0,l.useState)(!1),f=(0,nb.A)(()=>{let e=new nx.A({DEFAULT_HEIGHT:100});return new nA.A({heightCache:e})},[]);(0,tL.A)(()=>{a().then(e=>{m(e.notifications)}).catch(()=>{_(!0)}).finally(()=>{p(!1)})});let b=(0,l.useCallback)(e=>l.createElement(FeedItem,{info:d[e],last:e===d.length-1}),[d]),g=(0,l.useMemo)(()=>d.filter(e=>e.is_acn).length,[d]);return h?l.createElement(ny.Ay,{type:"boxed",level:"error",icon:"slack-logo",align:"left"},nP.t("Something went wrong. Please retry again later.")):l.createElement(ng.A,{clogImpression:!0,elementName:"lob_sales_notifications_total",elementType:ej.ElementType.CLIENT_PAGE,elementValue:d.length.toString(),enableClogImpressionOffScreen:!0},l.createElement(ng.A,{clogImpression:!0,elementName:"lob_sales_admin_notifications_total",elementType:ej.ElementType.CLIENT_PAGE,elementValue:g.toString()},l.createElement(l.Fragment,null,l.createElement("div",{className:"p-sales_notifications_peek__feed__container"},u&&l.createElement("div",{className:"p-sales_notifications_peek__feed__spinner_container"},l.createElement(aF.A,{size:"jumbo"})),0!==d.length||u?l.createElement(tf.A,null,({width:e,height:t})=>l.createElement(tb.A,{animateOnScroll:!1,height:t,keys:(0,nf.A)(d,e=>e.created_ts),layout:f,rowRenderer:b,onItemClick:c,width:e,disableKeyboardShortcuts:!1,useGlobalKeyboardShortcuts:!1})):l.createElement("div",{className:"p-sales_notifications_peek__feed__empty"},l.createElement("img",{alt:nP.t("Empty notifications placeholder image"),srcSet:"dark"===r?nM:nR,height:"85",width:"auto"}),l.createElement("div",{className:"p-sales_notifications_peek__feed__empty__title"},nP.t("No notifications yet")),l.createElement("div",null,nP.t("When the conditions you\u2019ve set up are met,")),l.createElement("div",null,nP.t("the notifications will appear here.")),l.createElement(tA.Ay,{className:"margin_top_75",type:"outline",onClick:s},nP.t("Manage Notifications")))),l.createElement("div",{className:"p-sales_notifications_peek__feed__footer"},l.createElement("div",{className:"p-sales_notifications_peek__feed__footer--text"},nP.t("Visit Sales to see more",{fallbackHash:"4e6dcd39183a5c4574321fa0381dbfa09eca6e74"}))))))};Feed.displayName="Feed";var nL=a(0x1c8beab7f),nO=a(0x609b6779);let nD=new h.Ay("ia4"),SalesHomePeekView=()=>{let e=(0,o.wA)(),t=(0,w.d4)(nL.Vp);return((0,l.useEffect)(()=>{e((0,nO.S)({reason:"sales-home-peek-trigger"}))},[e]),t)?l.createElement(e7.A,{header:nD.t("Sales"),classNameSuffix:"sales-home",contentClassName:"p-ia4_channel_list"},l.createElement(Feed,{limit:16})):null};SalesHomePeekView.displayName="SalesHomePeekView";let SalesHomePeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(SalesHomePeekView,null),[]);return l.createElement(TabPeekTrigger,{renderContent:t,forceTabWhenNavigating:ee.k6.SalesHome,peekId:ee.k6.SalesHome},e)};SalesHomePeekTrigger.displayName="SalesHomePeekTrigger";var nF=a(0x18ee7321c),nU=a(0x22c27dff5),nB=a(0x87cb5fb8),nH=a(0x17f2723c6),nW=a(0xe58b0244),nV=a(0xa21d7e01),nG=a(0xfa52c52b),nq=a.n(nG);let TodayPeekTabContent=({children:e,ariaLabel:t})=>l.createElement("div",{className:nq().tabContentWrapper},l.createElement(tf.A,null,({width:a,height:n})=>l.createElement(tO.A,{width:a,height:Math.floor(n),"aria-label":t},e)));TodayPeekTabContent.displayName="TodayPeekTabContent";var nj=a(0x74d5cc7e);let nz=new h.Ay("today"),TodayPeekActionItemsTab=({actionItems:e})=>{let t=(0,o.wA)(),a=(0,l.useRef)(),{maybeClosePeek:n}=(0,l.useContext)(tl.Z),[r,i]=(0,l.useState)(!1),s=(0,nU.x)({actionItems:e,showAllOlderItems:r}),c=(0,l.useCallback)(()=>{i(e=>!e)},[]),d=(0,l.useCallback)(e=>{n();let r=e.fields.conversation?.channelId||"",i=e.fields.conversation?.messageTs||"",l=e.fields.conversation?.threadTs;(0,nj.v)({itemId:e.id,channelId:r,messageTs:i,threadTs:l,elementName:"today_peek_action_item_click",cloggerRef:a,dispatch:t,entryPoint:"today_peek_action_items"})},[t,n]),m=(0,l.useMemo)(()=>(0,nB.Q)(s),[s]),u=(0,l.useCallback)(e=>e.type===nB.d.Header?l.createElement(nV.X,{key:e.id,id:e.id,theme:e.theme,isPeek:!0}):l.createElement(nH.o,{key:e.id,actionItem:e.item,onClick:d,manageTabIndex:!1,isPeek:!0}),[d]),p=nz.t("Action items");return 0===s.length?l.createElement("div",{className:nq().emptyState},l.createElement(nW.d,{showAllOlderItems:r,onToggleShowAllOlderItems:c})):l.createElement(TodayPeekTabContent,{ariaLabel:p},l.createElement(nF.A,{items:m,renderItem:u,"aria-label":p}))};TodayPeekActionItemsTab.displayName="TodayPeekActionItemsTab";var nK=a(0xf3b0bc58),n$=a(0x249fabfa6),nY=a(0x1703603e2),nQ=a.n(nY);let nZ=new h.Ay("today"),PeekAllDayEventsRow=({events:e})=>{let t=(0,w.d4)(au.xF);if(0===e.length)return null;let a=e[0].title||(t?nZ.t("Untitled event"):"Untitled event"),n=e.length-1;return l.createElement("div",{className:nQ().row},l.createElement("span",{className:nQ().label},t?nZ.t("All day"):"All day"),l.createElement("span",{className:nQ().eventNames},a),n>0&&l.createElement("span",{className:nQ().moreCount},t?nZ.t("+{count} more",{count:n}):`+${n} more`))};PeekAllDayEventsRow.displayName="PeekAllDayEventsRow";var nJ=a(0x1093b8fd6),nX=a(0x2536f5389),n0=a(0x9824ae46),n1=a(0x220d1c987),n2=a.n(n1);let n4=new h.Ay("today"),n5={color:"rgb(var(--dt_color-plt-horchata-60))"},n3={color:"rgb(var(--dt_color-plt-jade-60))"},n6={google_meet:nJ,zoom:n0,microsoft_teams:nX},n8={webex:"video",huddle:"headphones",hangout:"video",skype:"video",bluejeans:"video",chime:"video",slack:"video"},renderIcon=(e,t)=>{if(!(e&&"not_set"!==e)||!(t&&"not_set"!==t))return l.createElement(f.Ah,{name:"calendar",size:"20",style:n5});let a=n6[e];if(a)return l.createElement("img",{src:a,alt:"",role:"presentation",className:n2().providerIconImg});let n=n8[e]??"link",r="headphones"===n;return l.createElement(f.Ah,{name:n,size:"20",style:r?n3:void 0})};renderIcon.displayName="renderIcon";let PeekNextMeetingCard=({meeting:e,currentTime:t})=>{let a=(0,w.d4)(e=>(0,S.ty)(e,"time24"))??!1,n=(0,w.d4)(au.xF),{title:r,start:i,end:o,meeting_provider:s,meeting_url:c}=e,d=(0,l.useMemo)(()=>{let e=a?"HH:mm":"h:mma",t=i?aS.Ay.unix(i).format(e):"",n=o?aS.Ay.unix(o).format(e):"";return`${t} - ${n}`},[i,o,a]),m=i?1e3*i:0,u=m<=t&&(o?1e3*o:0)>t,p=(0,l.useMemo)(()=>{if(!i)return null;let e=m-t;if(e<=0)return null;let a=Math.ceil(e/1e3/60);if(a>=60){let e=Math.round(a/60);return n?n4.t("In {hours}h",{hours:e}):`In ${e}h`}return n?n4.t("In {minutes}m",{minutes:a}):`In ${a}m`},[i,m,t,n]);return l.createElement("div",{className:n2().nextCard},l.createElement("div",{className:n2().cardInner},l.createElement("div",{className:n2().colorStripe}),l.createElement("div",{className:n2().content},l.createElement("div",{className:n2().titleRow},l.createElement("span",{className:n2().title},l.createElement(tx.A,{lines:1,breakWords:!0,withTooltip:!0},r||(n?n4.t("Untitled event"):"Untitled event"))),l.createElement("div",{className:n2().metaRight},u&&l.createElement("span",{className:n2().timeUntilBadge},n?n4.t("NOW"):"NOW"),!u&&p&&l.createElement("span",{className:n2().timeUntilBadge},p),l.createElement("span",{className:n2().providerIcon},renderIcon(s,c)))),l.createElement("span",{className:n2().timeText},d))))};PeekNextMeetingCard.displayName="PeekNextMeetingCard";var n7=a(0x24179971c),n9=a(0x1a5c525d3),re=a(0x38d5048c),rt=a(0x1ad7330da),ra=a.n(rt);let rn=new h.Ay("today"),rr={color:"rgb(var(--dt_color-plt-horchata-60))"},ri={color:"rgb(var(--dt_color-plt-jade-60))"},rl={google_meet:{src:nJ,srcBnw:n7},zoom:{src:n0,srcBnw:re},microsoft_teams:{src:nX,srcBnw:n9}},ro={webex:"video",huddle:"headphones",hangout:"video",skype:"video",bluejeans:"video",chime:"video",slack:"video"},renderProviderIcon=(e,t,a)=>{if(!(e&&"not_set"!==e)||!(t&&"not_set"!==t))return l.createElement(f.Ah,{name:"calendar",size:"16",style:a?void 0:rr});let n=rl[e];if(n){let e=a?n.srcBnw:n.src;return l.createElement("img",{src:e,alt:"",role:"presentation",className:ra().providerIconImg})}let r=ro[e]??"link",i="headphones"===r;return l.createElement(f.Ah,{name:r,size:"20",style:i&&!a?ri:void 0})};renderProviderIcon.displayName="renderProviderIcon";let PeekMeetingBlock=({meeting:e,currentTime:t,isNext:a})=>{let n=(0,w.d4)(e=>(0,S.ty)(e,"time24"))??!1,r=(0,w.d4)(au.xF),{title:i,start:o,end:s,meeting_provider:d,meeting_url:m}=e,u=o?1e3*o:0,p=s?1e3*s:0,h=p<t,_=u<=t&&t<=p,f=(0,l.useMemo)(()=>{let e=n?"HH:mm":"h:mma";return o?aS.Ay.unix(o).format(e):""},[o,n]),b=(0,l.useMemo)(()=>{if(!o)return null;let e=u-t;if(e<=0)return null;let a=Math.ceil(e/1e3/60);if(a>=60){let e=Math.round(a/60);return r?rn.t("In {hours}h",{hours:e}):`In ${e}h`}return r?rn.t("In {minutes}m",{minutes:a}):`In ${a}m`},[o,u,t,r]);return l.createElement("div",{className:c()(ra().block,{[ra().blockPast]:h})},l.createElement("div",{className:c()(ra().colorStripe,{[ra().stripeZoom]:"zoom"===d,[ra().stripeGoogleMeet]:"google_meet"===d,[ra().stripeTeams]:"microsoft_teams"===d,[ra().stripeHuddle]:"huddle"===d,[ra().stripePast]:h})}),l.createElement("div",{className:ra().content},l.createElement("span",{className:ra().title},l.createElement(tx.A,{lines:1,breakWords:!0,withTooltip:!0},i||(r?rn.t("Untitled event"):"Untitled event"))),l.createElement("div",{className:ra().metaRight},_&&l.createElement("span",{className:ra().nowBadge},r?rn.t("NOW"):"NOW"),a&&!_&&b&&l.createElement("span",{className:ra().timeUntilBadge},b),!_&&l.createElement("span",{className:ra().startTime},f),l.createElement("span",{className:ra().providerIcon},renderProviderIcon(d,m,h)))))};PeekMeetingBlock.displayName="PeekMeetingBlock";var rs=a(0x36e0d5e8),rc=a.n(rs);let PeekTimelineGroup=({hour:e,meetings:t,currentTime:a,nextEventId:n,showCurrentTimeIndicator:r,currentTimePosition:i})=>{let o=(0,w.d4)(e=>(0,S.ty)(e,"time24"))??!1,s=(0,l.useMemo)(()=>{let t=(0,aS.Ay)().hour(e).minute(0);return o?t.format("HH:mm"):t.format("h A")},[e,o]),c=(0,l.useMemo)(()=>{if(!r)return;let e=100*Math.max(0,Math.min(1,i));return{top:`${e}%`}},[r,i]);return l.createElement("div",{className:rc().group},l.createElement("div",{className:rc().timeLabel},s),l.createElement("div",{className:rc().cards},t.map(e=>l.createElement(PeekMeetingBlock,{key:e.id,meeting:e,currentTime:a,isNext:e.id===n}))),r&&l.createElement("div",{className:rc().currentTimeIndicator,style:c},l.createElement("div",{className:rc().currentTimeDot}),l.createElement("div",{className:rc().currentTimeLine})))};PeekTimelineGroup.displayName="PeekTimelineGroup";var rd=a(0x1fb1f561e),rm=a(0x16186f97a),ru=a.n(rm);let rp=new h.Ay("today"),PeekAgendaLayout=({calendarData:e})=>{let t=(0,w.d4)(au.xF),{isAuthenticated:a,isLoading:n,isConnectingOrSyncing:r,isRequestSubmitted:i,meetingsError:o,upcomingEvents:s,tomorrowEvents:c,allDayEvents:d,totalMeetingCount:m,nextEventId:u,currentTime:p}=e,h=!a||n||o||i,_=(0,l.useMemo)(()=>u?s.find(e=>e.id===u)??null:null,[s,u]),f=(0,l.useMemo)(()=>{var e=u?s.filter(e=>e.id!==u):s;let t=new Map;for(let a of e){if(!a.start)continue;let e=aS.Ay.unix(a.start).hour(),n=t.get(e);n?n.push(a):t.set(e,[a])}return Array.from(t.entries()).sort(([e],[t])=>e-t).map(([e,t])=>({hour:e,meetings:t}))},[s,u]),b=(0,l.useMemo)(()=>(0,aS.Ay)(p).hour(),[p]),g=(0,l.useMemo)(()=>(0,aS.Ay)(p).minute()/60,[p]);if(h)return l.createElement(n$.E,{isAuthenticated:a,isLoading:n,isConnectingOrSyncing:r,isRequestSubmitted:i,meetingsError:o,upcomingEvents:s,tomorrowEvents:c,nextEventId:u,currentTime:p,isPeek:!0,isPrimaryCard:!1,layoutMode:"horizontal"});if(0===s.length&&0===d.length)return l.createElement("div",{className:ru().emptyState},l.createElement(rd.A,null),l.createElement(nK.A,{title:rp.t("No more meetings today"),description:rp.t("Take a breath")}));let y=t?rp.t("{count} meetings",{count:m}):`${m} meetings`;return l.createElement("div",{className:ru().container},_&&l.createElement(l.Fragment,null,l.createElement("div",{className:ru().sectionHeader},l.createElement("span",{className:ru().sectionLabel},t?rp.t("Next"):"Next")),l.createElement("div",{className:ru().nextCardWrapper},l.createElement(PeekNextMeetingCard,{meeting:_,currentTime:p}))),l.createElement("div",{className:ru().sectionHeader},l.createElement("span",{className:ru().sectionLabel},t?rp.t("Your Day"):"Your Day"),l.createElement("span",{className:ru().meetingCount},y)),d.length>0&&l.createElement(PeekAllDayEventsRow,{events:d}),l.createElement("div",{className:ru().timelineSection},f.map(e=>l.createElement(PeekTimelineGroup,{key:e.hour,hour:e.hour,meetings:e.meetings,currentTime:p,nextEventId:u,showCurrentTimeIndicator:e.hour===b,currentTimePosition:g}))))};PeekAgendaLayout.displayName="PeekAgendaLayout";let rh=new h.Ay("today"),TodayPeekCalendarTab=({calendarData:e})=>{let t=rh.t("Calendar events");return l.createElement(TodayPeekTabContent,{ariaLabel:t},l.createElement(PeekAgendaLayout,{calendarData:e}))};TodayPeekCalendarTab.displayName="TodayPeekCalendarTab";var r_=a(0x63d92055),rf=a(0x46d45d6d),rb=a(0x5932bb18),rg=((n={}).ActionItems="action_items",n.Unreads="unreads",n.Calendar="calendar",n);let ry=new h.Ay("today"),TodayPeekTabs=()=>{let e=(0,o.wA)(),t=(0,w.d4)(rb.l6),a=(0,w.d4)(au.L1),n=(0,l.useCallback)(t=>{e((0,rf.Zu)(t))},[e]),r=ry.t("Replies"),i=ry.t("Highlights"),s=ry.t("Agenda"),c=ry.t("Today tabs"),d=(0,l.useMemo)(()=>{let e=[{id:rg.ActionItems,title:r,label:r,className:nq().todayPeekTab,autoClogProps:(0,r_.qw)()},{id:rg.Unreads,title:i,label:i,className:nq().todayPeekTab,autoClogProps:(0,r_.Pr)()}];return a?[{id:rg.Calendar,title:s,label:s,className:nq().todayPeekTab,autoClogProps:(0,r_.yt)()},...e]:e},[r,i,s,a]),m=null!==t&&(t!==rg.Calendar||a)?t:d[0].id;return l.createElement(eJ.A,{tabs:d,currentTabId:m,onTabChange:n,ariaLabel:c,tabMenuClassnames:nq().todayPeekTabMenu})};TodayPeekTabs.displayName="TodayPeekTabs";var rA=a(0x1340892e2),rx=a(0xe1644a69),rE=a(0x110a872e),rC=a(0xa1224624),rk=a(0x1ffd81795),rv=a(0x4c6e860e),rS=a(0x7f1d1331);let rI=new h.Ay("today"),TodayPeekUnreadsTab=({unreads:e,isLoading:t,showStreamingSpinner:a})=>{let n=(0,o.wA)(),r=(0,l.useRef)(),{maybeClosePeek:i}=(0,l.useContext)(tl.Z),s=(0,rE.j)(a),c=(0,l.useMemo)(()=>l.createElement(rx.o,{type:"sparkles",inline:!0}),[]),d=(0,l.useCallback)((e,t)=>{t?.stopPropagation(),t?.preventDefault(),t?.nativeEvent.stopImmediatePropagation(),i();let a=e.fields.sources,l=Array.isArray(a)&&a.length>0?a[0]:null;if(!l)return;let o=l.channelId||"",s=l.messageTs||"",c=l.threadTs;(0,nj.v)({itemId:e.id,channelId:o,messageTs:s,threadTs:c,elementName:"today_peek_unread_item_click",cloggerRef:r,dispatch:n,entryPoint:"today_peek_unreads"})},[n,i]),m=(0,l.useMemo)(()=>(0,rS.l)(e),[e]),u=(0,l.useCallback)(e=>e.type===rS.V.Header?l.createElement(nV.X,{key:e.id,id:e.id,theme:e.theme,isPeek:!0}):l.createElement(rv.p,{key:e.id,unreadItem:e.item,onClick:d,manageTabIndex:!1,isPeek:!0}),[d]),p=rI.t("Unreads");return t||a?l.createElement(TodayPeekTabContent,{ariaLabel:p},l.createElement("div",{className:nq().peekLoadingContent},s&&l.createElement(rA.r,{text:s,icon:c,className:nq().peekLoadingText}),l.createElement(rC.w,{rows:3}))):0===e.length?l.createElement("div",{className:nq().emptyState},l.createElement(rk.t,null)):l.createElement(TodayPeekTabContent,{ariaLabel:p},l.createElement(nF.A,{items:m,renderItem:u,"aria-label":p}))};TodayPeekUnreadsTab.displayName="TodayPeekUnreadsTab";var rw=a(0x1bd0d83da),rT=a(0x16647208c),rN=a(0x2101cf91),rM=a(0x2539361d4);function useTodayPeekData(e){let t=(0,o.wA)(),a=(0,l.useRef)(!1),n=(0,w.d4)(au.DK),r=(0,w.d4)(rb.t5),i=(0,w.d4)(rb.TA);(0,l.useEffect)(()=>{t((0,rN.q)({shouldCheckForUnreads:!1,forceRefreshUnreads:!1}))},[t]);let{itemsByType:s,isLoading:c}=(0,rT.E)(["action_item","latest_unread_and_activity"]),d=s.latest_unread_and_activity||[],m=(0,rw._)();return(0,l.useEffect)(()=>{if(e!==rg.Unreads){a.current=!1;return}a.current||!n||r||c||d.length>0||(a.current=!0,t((0,rM.r)({reason:"today-peek-unreads-tab"})))},[e,n,r,c,d.length,t]),{actionItems:s.action_item||[],unreads:d,calendarData:m,isLoading:c,showStreamingSpinner:!!i}}var rR=a(0x142f30ffc),rP=a.n(rR);let rL=new h.Ay("today"),TodayPeekV2View=()=>{let e=(0,w.d4)(rb.l6),t=(0,w.d4)(au.L1),a=null!==e&&(e!==rg.Calendar||t)?e:t?rg.Calendar:rg.ActionItems,{actionItems:n,unreads:r,calendarData:i,isLoading:o,showStreamingSpinner:s}=useTodayPeekData(a),d=(0,l.useMemo)(()=>l.createElement("div",{className:rP().todayPeekHeaderButtons},l.createElement(TodayPeekTabs,null)),[]),m=(0,l.useMemo)(()=>{switch(a){case rg.ActionItems:return l.createElement(TodayPeekActionItemsTab,{actionItems:n});case rg.Unreads:return l.createElement(TodayPeekUnreadsTab,{unreads:r,isLoading:o,showStreamingSpinner:s});case rg.Calendar:return l.createElement(TodayPeekCalendarTab,{calendarData:i});default:return l.createElement(TodayPeekActionItemsTab,{actionItems:n})}},[a,n,r,i,o,s]);return l.createElement(e7.A,{header:rL.t("Today"),className:rP().todayPeekView,classNameSuffix:"today_v2",headerButtons:d,contentClassName:c()("p-view_sidebar","p-view_sidebar--list")},l.createElement("div",{className:rP().todayPeekContent},m))};TodayPeekV2View.displayName="TodayPeekV2View";let TodayPeekV2Trigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(TodayPeekV2View,null),[]);return l.createElement(tR.A,{subtype:"today-v2-peek"},l.createElement(TabPeekTrigger,{renderContent:t,isViewContainer:!0,peekId:ee.k6.Today},e))};TodayPeekV2Trigger.displayName="TodayPeekV2Trigger";var rO=a(0xd5e0f7b6),rD=a(0x20a4dd525),rF=a(0x20a60608a),rU=a(0x16bc7ad6),rB=a(0x113bfb4d5),rH=a.n(rB);let rW=new h.Ay("todos"),TodosPeekHeader=({records:e,dueDateField:t})=>{let{incompleteOverdueTodosCount:a}=(0,w.d4)(eU.PG),n=(0,l.useMemo)(()=>e.reduce((e,a)=>{if(!t)return e;let n=a[t.key];return null===n||n<=0||(0,rU.kH)({dateInput:n,isInSeconds:!0})&&(e.dueToday+=1),e},{dueToday:0}),[t,e]),r=(0,l.useMemo)(()=>0===a&&0===n.dueToday?null:a>0&&0===n.dueToday?rW.t("{numOverdueTodos} overdue",{numOverdueTodos:a}):a>0&&n.dueToday>0?rW.t("{numOverdueTodos} overdue,  {numTodosDueToday} due today",{numOverdueTodos:a,numTodosDueToday:n.dueToday}):0===a&&n.dueToday>0?rW.t("{numTodosDueToday} due today",{numTodosDueToday:n.dueToday}):null,[a,n.dueToday]);return t?l.createElement("div",{className:rH().container},l.createElement("div",null,rW.t("To-dos")),l.createElement("div",{className:(rH().totalDue,"p-peek_card__header_subtitle")},r)):null};TodosPeekHeader.displayName="TodosPeekHeader";var rV=a(0x11c82607b),rG=a(0xa2cd147d),rq=a(0x19f498e5f);let rj=(0,rV.Ay)("Creates a todo and opens flexpane",async(e,t,{listId:a,viewId:n})=>{if(!a||!n||!n)return;let r=await e((0,rG.e)({listId:a,viewId:n}));r&&e((0,ak.A)({reason:ak.m.Click,tab:ee.k6.Todos})).then(()=>{e((0,rq.C)({listId:a,viewId:n,recordId:r.id,autoFocusOnTitle:!0,todoDetailsSameTab:!0}))})});rj.meta={name:"addAndOpenTodoItem",key:"createThunkAddAndOpenTodoItem",description:"Creates a todo and opens flexpane"};var rz=a(0xf33c0c54),rK=a(0x8d0a2ff1),r$=a(0x100514b3e),rY=a.n(r$);let rQ=new h.Ay("todos"),rZ=l.memo(({taskListId:e,isLoading:t})=>{let a=(0,o.wA)(),n=(0,l.useMemo)(()=>({eventId:ej.EventId.SLACK_LISTS,elementName:rz.j1,onClick:{enableClogAction:!0},entryPoint:rz._u,uiStep:rz.hM,stepVariant:rz.ic}),[]),r=(0,w.d4)(t=>e?(0,rK.vS)(t,e):void 0),i=(0,rD.Q)({list:r}),s=(0,l.useCallback)(async()=>{e&&a(rj({listId:e,viewId:i}))},[a,e,i]);if(t)return null;let c=rQ.t("Add to-do");return l.createElement("div",{className:rY().todosPeekHeaderButtons},l.createElement(U.Ay,{tip:c},l.createElement(aI.A,{"aria-label":c,onClick:s,autoClogProps:n},l.createElement(f.Ah,{name:"plus",size:"20"}))))});var rJ=a(0x1229d92d),rX=a(0x19aba212c),r0=a(0x150e26644),r1=a(0xeeec674d),r2=a(0x2503c64e1);let r4=new h.Ay("lists"),r5={elementName:rz.qN,elementType:ej.ElementType.BUTTON,entryPoint:"todo_peek_header",onClick:{enableClogAction:!0}},MarkCompleteTodoMenuItem=({listId:e,recordId:t,...a})=>{let n=(0,o.wA)(),r=(0,w.d4)(a=>t?(0,rK.ll)(a,e,t):null),i=(0,r0.V)({record:r}),s=(0,l.useCallback)(a=>{n((0,r2.c)({taskListId:e,rowId:t,value:!0})),n((0,r1.E)({customText:r4.t("Item marked complete")})),a.stopPropagation()},[n,e,t]);return i?null:l.createElement(tJ.Dr,{disabled:i,onSelected:s,label:r4.t("Mark complete"),autoClogProps:r5,...a})};MarkCompleteTodoMenuItem.displayName="MarkCompleteTodoMenuItem";let r3=(0,t0.Ay)(MarkCompleteTodoMenuItem);var r6=a(0xc3f8cc32);let r8=new h.Ay("lists"),r7={elementName:"remove_from_todos",onClick:{enableClogAction:!0}},RemoveTodoMenuItem=({listId:e,recordId:t,...a})=>{let n=(0,o.wA)(),r=(0,w.d4)(a=>t?(0,rK.ll)(a,e,t):null),i=(0,r0.V)({record:r}),s=(0,l.useCallback)(t=>{n((0,r6.L)({listId:e,id:t,submitAutoClogProps:{},disableDeleteConfirmationSpeedbump:!0}))},[n,e]),c=(0,l.useCallback)(e=>t=>{s(e),t?.stopPropagation()},[s]);return l.createElement(tJ.Dr,{danger:!0,disabled:i,onSelected:c(t),label:r8.t("Remove to-do"),autoClogProps:r7,...a})};RemoveTodoMenuItem.displayName="RemoveTodoMenuItem";let r9=(0,t0.Ay)(RemoveTodoMenuItem);var ie=a(0x244f35bf8),it=a(0x21c8c64ab),ia=a(0x23666c095),ir=a(0x153cbdf74),ii=a(0x14fde54c);let il=new h.Ay("todos"),io=l.memo(({value:e,taskListId:t,diffDays:a})=>{let n=(0,w.d4)(ad.tl),r=(0,w.d4)(e=>t?(0,rK.vS)(e,t):null),i=(0,ii.uA)(r),o=(0,rU.dq)(e),s=(0,l.useMemo)(()=>i?.find(e=>e.type===ir.$.TodoDueDate),[i]);if(!n||!s||o||null===a)return null;let c=Math.abs(a),d=(0,rU.Ey)({timestamp:e,shouldCapitalize:!1,includeDuePrefix:!0,shouldBoldDatePart:!0});return a<-1?il.rt("<b>Due {numDaysAgo} days ago</b>",{numDaysAgo:c}):d||il.rt("No due date")});var is=a(0x17d13b2a8),ic=a(0x95c69c7),id=a(0x12776746c),im=a.n(id);let iu=new h.Ay("todos"),ip={name:"check-filled"},ih={name:"ellipsis-vertical-filled"},i_=l.memo(({item:e,taskListId:t,isHovered:a})=>{let n=(0,o.wA)(),r=(0,w.d4)(ad.tl),i=(0,w.d4)(au.d9),s=(0,ic._)({view:"sidebar"}),[d,m]=(0,l.useState)(!1),u=e.completed,p=(0,l.useMemo)(()=>({elementName:rz.qN,elementType:ej.ElementType.BUTTON,entryPoint:"todo_peek_header",onClick:{enableClogAction:!0}}),[]),h=(0,l.useMemo)(()=>({elementName:rz.Y2,elementType:ej.ElementType.BUTTON,onClick:{enableClogAction:!0}}),[]),_=(0,l.useCallback)(a=>{n((0,r2.c)({taskListId:t,rowId:e.id,value:!0})),n((0,r1.E)({customText:iu.t("Item marked complete")})),a.stopPropagation()},[n,e.id,t]),f=(0,l.useCallback)(a=>l.createElement(tJ.Ay,a,l.createElement(r9,{listId:t,recordId:e.id,isCompleted:u})),[t,e.id,u]),b=(0,l.useCallback)(()=>m(!0),[m]),g=(0,l.useCallback)(()=>m(!1),[m]);return r||i?l.createElement("div",{className:c()(im().todosPeekAction,{[is.Pn]:!!s,[im().todosPeekActionActive]:d||a}),role:"group","aria-label":iu.t("To-dos actions")},!u&&l.createElement(U.Ay,{tip:iu.t("Mark complete")},l.createElement(aI.A,{"aria-label":iu.t("Mark complete"),autoClogProps:p,onClick:_,size:"small",svgIconProps:ip})),l.createElement(tJ.cQ,{onOpen:b,onClose:g,renderMenu:f,position:"bottom-right",offsetY:6},l.createElement(U.Ay,{tip:iu.t("More actions")},l.createElement(aI.A,{"aria-label":iu.t("More actions"),autoClogProps:h,size:"small",svgIconProps:ih})))):null});var ib=a(0x5f10b9c2),ig=a.n(ib);let iy=new h.Ay("todos"),TodosPeekListRow=({rows:e,index:t,taskListId:a})=>{let n=e[t],r=n.dueDateValue;void 0!==n.dueDateValue&&null!==n.dueDateValue&&"number"==typeof n.dueDateValue&&(r=(0,rU.hK)(n.dueDateValue));let i=null,o=(0,rU.dq)(r);o||(i=(0,rU.VL)(r));let s=!o&&(0,rU.kH)({dateInput:r,isInSeconds:!1}),d=!o&&(0,rU.Jv)({dateInput:r,isInSeconds:!1}),m=d||s?"clock":"check-circle",u=(0,rU.ax)({timestamp:n.createdDate}),[p,h]=(0,l.useState)(null),_=(0,l.useCallback)(e=>()=>{h(e)},[]),b=(0,l.useCallback)(()=>{h(null)},[]),g=p===n.id;return l.createElement("div",{key:n.id,className:ig().rowContainer,onMouseEnter:_(n.id),onMouseLeave:b},!o&&l.createElement("div",null,a&&l.createElement("div",{className:c()(ig().dueDate,{[ig().listIconTodayColor]:s,[ig().listIconPastDueColor]:d})},l.createElement(io,{value:r,taskListId:a,diffDays:i}))),l.createElement("div",{className:ig().innerRowContainer},l.createElement("div",{className:c()(ig().listIcon,{[ig().listIconTodayBackground]:s,[ig().listIconTodayColor]:s,[ig().listIconPastDueBackground]:d,[ig().listIconPastDueIconColor]:d})},l.createElement(f.Ah,{name:m,size:"24"})),l.createElement("div",null,l.createElement(tx.A,{lines:1,withTooltip:!0},n.blocks&&(0,ie.A)(n.blocks)&&n.blocks.length?l.createElement(it.$,{value:n.blocks,inline:!0}):iy.t("Untitled")),n.reference&&l.createElement("div",{className:ig().referenceContainer},l.createElement(ia.q,{reference:n.reference,iconFilled:!1,preventPropagation:!0,disableReferenceField:!0})),!n.reference&&u&&l.createElement("div",{className:ig().dateCreated},u)),a&&l.createElement(i_,{item:n,taskListId:a,isHovered:g})))};TodosPeekListRow.displayName="TodosPeekListRow";var iA=a(0x239539849),ix=a(0x238b287cf),iE=a(0xe419380f),iC=a.n(iE);let ik=new h.Ay("todos"),TodosPeekList=({taskListId:e,isLoading:t,records:a,itemLayout:n})=>{let r=(0,o.wA)(),i=(0,w.d4)(ad.tl),s=(0,l.useRef)(null),c=(0,w.d4)(t=>e?(0,rK.vS)(t,e):void 0),d=(0,rD.Q)({list:c}),m=(0,ix.A)(),u=(0,l.useMemo)(()=>{if(!n)return[];let{primaryField:t,statusField:r,dueDateField:i,referenceField:l,selectField:o}=n;return a.map(a=>({rowType:iA.T6.ListItem,id:a.id,createdDate:a.created_time,blocks:a[t.key],completed:!!a[r.key],referenceField:l,reference:l?a[l.key]:void 0,listId:e,dueDateField:i,dueDateValue:a[i.key],selectField:o,selectValue:o?a[o.key]:void 0}))},[n,a,e]),p=(0,l.useCallback)(({id:t})=>{e&&(r((0,ak.A)({reason:ak.m.Click,tab:ee.k6.Todos})).then(()=>{r((0,rq.C)({listId:e,viewId:d,recordId:t,forceTab:ee.k6.Todos}))}),m.track(ej.EventId.SLACK_LISTS,{contexts:{ui_context:{ui_step:rz.m3,entry_point:rz.YY,action:ej.UiAction.CLICK}},list_id:e}))},[e,r,d,m]),h=(0,l.useCallback)(t=>l.createElement(TodosPeekListRow,{rows:u,index:t,taskListId:e}),[u,e]),_=(0,l.useCallback)((t,a)=>{let{targetBounds:n,onCloseRequested:r}=a,i=u.find(e=>e.id===t);return i?l.createElement(rX.A,{targetBounds:n,onCloseRequested:r},l.createElement(tJ.Ay,a,l.createElement(r3,{listId:e,recordId:i.id}),l.createElement(r9,{listId:e,recordId:i.id}))):null},[u,e]),f=(0,l.useCallback)(e=>{e.preventDefault()},[]);if(!i)return null;let b=u.map(e=>e.id);return l.createElement("div",{className:iC().peekContainer},t&&l.createElement(aF.A,{size:"medium",noMargin:!0,floating:!0}),e&&0!==b.length||t?l.createElement(tf.A,null,({width:e,height:t})=>l.createElement(tb.A,{className:iC().peekContainerList,ref:s,width:e,height:t,"aria-label":ik.t("To-dos"),keys:b,rowRenderer:h,animateOnScroll:!1,onItemClick:p,onItemContextMenu:f,renderContextMenuForItem:_})):l.createElement("div",{className:iC().emptyTodoListContainer},l.createElement(nK.A,{title:ik.t("No to-dos"),description:ik.t("What\u2019s next on the docket?")})))};TodosPeekList.displayName="TodosPeekList";let iv=l.memo((0,rJ.A)(TodosPeekList));var iS=a(0x1d1119980),iI=a(0xfc0e0710),iw=a(0x148194053),iT=a.n(iw);let iN=new h.Ay("todos"),iM={name:"open-in-window",size:"18"},iR=l.memo(()=>{let e=(0,o.wA)(),t=(0,w.d4)(td.Jz),a=(0,ts.M2)(),{isLoading:n,taskListId:r}=(0,rF.g)(),i=(0,w.d4)(e=>r?(0,rK.vS)(e,r):void 0),s=(0,ii.uA)(i),d=(0,w.d4)(e=>(0,rK.Rl)(e,r)),m=(0,rD.Q)({list:i}),u=(0,l.useMemo)(()=>(0,iS.E)({list:i,listSchema:s}),[i,s]),p=(0,l.useMemo)(()=>{if(!u)return[];let{statusField:e}=u;return[{key:e.key,columnId:e.id,operator:iI.p.IsEmpty,values:[]}]},[u]),h=(0,l.useMemo)(()=>[{key:ir.$.TodoDueDate,ascending:!0}],[]),{records:_}=(0,rO.o)({list:i,listRecords:d,filters:p,sorts:h,searchString:"",viewId:m}),f=(0,l.useCallback)(()=>{e((0,a4.X)({tabName:ee.k6.Todos,shouldNavigateInContext:!0}))},[e]),b=(0,l.useMemo)(()=>({eventId:ej.EventId.SLACK_LISTS,elementName:rz.Rc,onClick:{enableClogAction:!0},entryPoint:rz._u}),[]),g=(0,l.useMemo)(()=>l.createElement(l.Fragment,null,!t&&a&&l.createElement(aI.A,{"aria-label":iN.t("Open in new window"),onClick:f,autoClogProps:b,svgIconProps:iM}),l.createElement(rZ,{taskListId:r,isLoading:n})),[t,a,f,b,r,n]),y=(0,l.useMemo)(()=>l.createElement(TodosPeekHeader,{records:_,dueDateField:u?.dueDateField}),[u?.dueDateField,_]);return u?l.createElement(e7.A,{header:y,headerButtons:g,classNameSuffix:"todos",className:iT().todosPeekTrigger,contentClassName:c()("p-view_sidebar","p-view_sidebar--list")},l.createElement(iv,{taskListId:r,isLoading:n,records:_,itemLayout:u})):null}),iP=l.memo(({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(tR.A,{subtype:"todos-peek"},l.createElement(iR,null)),[]);return l.createElement(TabPeekTrigger,{renderContent:t,peekId:ee.k6.Todos},e)});var iL=a(0x3796a18c),iO=a(0x814278bf),iD=a(0x22f5cc45d),iF=a(0x84a5226c),iU=a(0x66306c2d),iB=a(0x2af5332d),iH=a(0xbd3de346),iW=a(0xa1832ae4),iV=a(0x107c8ce7),iG=a(0x8acb3ad3),iq=a(0x1a80146c8),ij=a(0x178f0e117),iz=a(0x140422d4a),iK=a(0x41a56f6d),i$=a(0x1d774a049),iY=a(0x42b88c77),iQ=a(0x773ed904),iZ=a(0x177f84525),iJ=a(0x14ea3ce99),iX=a(0x20e69791a),i0=a(0x1ee439e69),i1=a(0x17e63c876),i2=a(0x992dd89a),i4=a(0x4479e27b),i5=a(0xf2505ea),i3=a.n(i5);let i6=new h.Ay("quip-files-browser"),i8={onClick:{enableClogAction:!0},elementName:"unified_files_peek_trigger_create_canvas_button"},i7={onClick:{enableClogAction:!0},elementName:"unified_files_peek_trigger_create_list_button"},UnifiedFilesList=({keys:e,width:t,height:a})=>{let n=(0,l.useRef)(null),r=(0,o.wA)(),{maybeClosePeek:i}=(0,l.useContext)(tl.Z),s=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"perf_browse_sidebar_interactive_list")),getFileDetailOveride=e=>l.createElement(iB.A,{fileId:e,detailType:iL.s.LAST_UPDATED});getFileDetailOveride.displayName="getFileDetailOveride";let d=(0,l.useCallback)((e,t)=>{r((0,iY.f)({browserInstanceId:an.ej.UNIFIED_FILES_PEEK,fileId:t})),r((0,iq.A)({e,fileId:t,source:i$.f.SLACK_DOCS_TAB_PEEK})),i()},[r,i]),m=(0,l.useCallback)((t,{key:a})=>{if(a.length)return"recents-loading"===a?l.createElement(l.Fragment,null,[...Array(13)].map((e,t)=>l.createElement(iF.A,{key:t,className:c()("p-explorer_result--list")}))):l.createElement(iD.A,{key:a,className:c()("p-explorer_result--list",{"p-explorer_result--list--last":t===e.length-1}),fileId:a,showActions:!0,useListStyling:!0,detailType:iL.s.LAST_UPDATED,detailTextOverride:getFileDetailOveride(a),onClick:e=>d(e,a),showStarredStatus:!0,openDocSource:i$.f.SLACK_DOCS_TAB_PEEK})},[e.length,d]);return l.createElement("div",{className:i3().unifiedFilesPeekTrigger},s?l.createElement(tO.A,{width:t,height:a},e.map((e,t)=>m(t,{key:e}))):l.createElement(tb.A,{keys:e,ref:n,width:t,height:a,rowRenderer:m}))};UnifiedFilesList.displayName="UnifiedFilesList";let UnifiedFilesPeekView=()=>{let e=(0,o.wA)(),{results:t,isLoading:a}=(0,iO.A)(an.ej.UNIFIED_FILES_PEEK,an.ri.FILES,{filters:{fileType:iG.b},sort:an.QX.LAST_ENGAGED}),n=(0,w.d4)(ad._q),r=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"custom_file_sections")),i=(0,w.d4)(am.F),s=(0,w.d4)(ad.Il),d=(0,w.d4)(iZ.v7),m=(0,w.d4)(iZ.Z6),u=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"unified_files_peek_starred_switch")),p=(0,w.d4)(i4.fb),h="number"!=typeof m||Date.now()-m>864e5,_=(0,iW.tc)((0,w.d4)(i0.H7)),[f,b]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(h||void 0===m)&&t?.length&&e((0,iQ.OV)({fileIds:t}))},[t,m,e,h]),(0,l.useEffect)(()=>{u&&(b(!0),e((0,i2.H)()).finally(()=>{b(!1)}))},[e,u]);let g=(0,l.useCallback)(t=>{_?e((0,iU.A)({uiComponentVariant:ej.UiComponentVariant.UNIFIED_FILES_PEEK_CREATE})):e((0,iz.A)({source:iK.P.SLACK_DOCS_PEEK_VIEW,inTile:(0,iV.A)(t)}))},[e,_]),y=(0,l.useCallback)(()=>{e((0,iX.V)({...n&&{todoMode:!0},source:ij.d.UNIFIED_FILES_PEEK_TRIGGER_CREATE_LIST_BUTTON,reason:"unified-files-peek-trigger-create-list-button"}))},[e,n]),A=(0,w.Z2)(e=>r?(0,i4.gU)(e):(0,i4.Lq)(e).map(t=>(0,iJ.Lp)(e,t,!0)).filter(e=>!(0,iH.uO)(e)&&!(0,iH.aK)(e)).map(e=>e.id)),x=(0,l.useMemo)(()=>u&&p?f?["recents-loading"]:A:d?.length&&!h&&m?d:a?["recents-loading"]:t,[u,p,d,h,m,a,t,f,A]),E=(0,w.Z2)(e=>a?x:x.map(t=>(0,iJ.Lp)(e,t,!0)).filter(e=>!(0,iH.uO)(e)&&!(0,iH.aK)(e)).map(e=>e.id)),C=(0,l.useMemo)(()=>{let t={eventId:ej.EventId.UNIFIED_FILES_SIDEBAR_PEEK,onClick:{enableClogAction:!0},elementName:p?"starred":"all"};return l.createElement("div",{className:i3().unifiedFilesPeekTriggerButtonGroup},u?l.createElement(e6.A,{selected:p,onClick:()=>e((0,i1.JE)(!p)),autoClogProps:t,"aria-label":i6.t("Starred"),label:i6.t("Starred")}):l.createElement("div",{className:i3().unifiedFilesPeekTriggerCreateButtons},i&&l.createElement(tA.Ay,{"data-qa":"unified_files_peek_trigger_create_canvas_button",type:"outline",size:"small",onClick:g,autoClogProps:i8},i6.t("New Canvas")),s&&l.createElement(tA.Ay,{"data-qa":"unified_files_peek_trigger_create_list_button",type:"outline",size:"small",onClick:y,autoClogProps:i7},i6.t("New List"))))},[u,p,i,g,s,y,e]);return i||s?l.createElement(e7.A,{header:i6.t("Files"),classNameSuffix:"unified-files",contentClassName:c()("p-view_sidebar","p-view_sidebar--list"),headerButtons:C},a||E.length?l.createElement(tf.A,null,({width:e,height:t})=>l.createElement(UnifiedFilesList,{keys:E,width:e,height:t})):l.createElement(nK.A,{description:l.createElement("span",{className:"padding_left_50 padding_right_50"},u&&p?i6.t("Click the star on any canvas or list to add it here for later"):i6.t("Recently viewed canvases and lists will show up here.")),isExtended:!0,title:u&&p?i6.rt("{emoji} No starred files yet",{emoji:l.createElement(B.Ay,{emojiSize:B.lw.LARGE,text:"star",className:"p-lists_peek_trigger___no_results_emoji"})}):i6.rt("{emoji} No files yet",{emoji:l.createElement(B.Ay,{emojiSize:B.lw.LARGE,text:"file_cabinet",className:"p-lists_peek_trigger___no_results_emoji"})})})):null};UnifiedFilesPeekView.displayName="UnifiedFilesPeekView";let UnifiedFilesPeekTrigger=({children:e})=>{let t=(0,l.useCallback)(()=>l.createElement(UnifiedFilesPeekView,null),[]);return l.createElement(TabPeekTrigger,{renderContent:t,peekId:ee.k6.UnifiedFiles,forceTabWhenNavigating:ee.k6.UnifiedFiles},e)};UnifiedFilesPeekTrigger.displayName="UnifiedFilesPeekTrigger";var i9=a(0x125de1ee5),le=a(0x801dea7a),lt=a(0x56f7449b),la=a(0x11253e6a6);let ln=l.lazy(()=>Promise.resolve().then(a.bind(a,0x15366c0fa))),lr={spaceName:A.xu.TAB_RAIL_HOME_TAB,notifications:{[A.ze.HOME_TAB_BUTTON_NUDGE]:{component:ln}}};var li=a(0x1c140378a);function getNavPropsFromTab(e){return({[ee.k6.Activity]:(0,tT.TD)(),[ee.k6.ActivityInbox]:(0,tT.jI)(),[ee.k6.ActivityInboxSidebarPrototype]:(0,tT.jI)(),[ee.k6.Later]:(0,tT._j)(),[ee.k6.Todos]:(0,tT.ox)(),[ee.k6.Huddles]:(0,tT.yP)(),[ee.k6.Today]:(0,tT.$1)({entryPoint:"tab_rail"})})[e]}var ll=a(0x10027d8bc),lo=a(0x1fef2be00),ls=a(0x243435af9),lc=a(0x1fe8a7017),ld=a(0x1334bf7f0),lm=a(0xbf7d64b),lu=a(0x13eb6f5d3),lp=a(0x15e3c2e33),lh=a(0x1499cf180),l_=a(0x1ef448e88),lf=a(0x7e4b110),lb=a(0x1fdf007c4),lg=a(0x1b21fc923),ly=a(0x2e4c7381),lA=a(0x19c735f02),lx=a(0x4c79b03f),lE=a(0x15257bc0b),lC=a(0xafce781a),lk=a(0x1f57aea47),lv=a(0x114180e52),lS=a(0x1950da728),lI=a(0xb9965e11);let lw=(0,rV.Ay)("returns true & resets the timesamp if that timestamp set when user last viewed unified browser is greater than 5 min otherwise returns false",(e,t)=>{let a=(0,i4.hh)(t()),n=Date.now();return"number"==typeof a&&n-a>=3e5&&(e((0,i1.xP)({ts:void 0})),!0)});lw.meta={name:"getAndResetNavigatedAwayForUnifiedFiles",key:"createThunkGetAndResetNavigatedAwayForUnifiedFiles",description:"returns true & resets the timesamp if that timestamp set when user last viewed unified browser is greater than 5 min otherwise returns false"};var lT=a(0x10baafd1e);let lN=new h.Ay("view"),getActiveTabForTabRail=({activeTab:e,overflowTabs:t,isHomeTabActive:a})=>{let n=a?ee.k6.Home:e;return t.includes(n)?ee.k6.Browse:n},getIsShowTabsShortcutKeysPressed=e=>{let t=e.ctrlKey,a=e.shiftKey;return!e.metaKey&&((0,p.cX)()?t&&!a:t&&a)},getIsCmdOrCtrlKeyPressed=e=>{let t=e.ctrlKey,a=e.metaKey;return(0,p.cX)()?a:t};function getIsOptOrAltKeyPressed(e){return!!e.altKey}let lM={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.PLATFORM_AI_APPS_TAB_RAIL_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x6667bc94)).then(e=>({default:e.PlatformAiAppsTabRailCoachmark})))}}},lR={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.AGENTFORCE_TAB_RAIL_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x19d70ce89)).then(e=>({default:e.AgentforceTabRailCoachmark})))}}},lP={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.TODOS_TAB_RAIL_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x82cfb5d7)).then(e=>({default:e.TodosTabRailCoachmark})))}}},lL={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.UNIFIED_BROWSER_DOCS_NUX_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0xd8c4cd49)).then(e=>({default:e.DocsNuxCoachmark})))}}},lO={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.JOINER_LAUNCHPAD_DISMISSED_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x23ef5e07b)).then(e=>({default:e.ConnectedJoinerLaunchpadDismissedCoachmark})))},[A.ze.TAB_RAIL_TABS_CUSTOMIZATION_NUX_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0xe55f1698)))}}},lD={spaceName:lO.spaceName,notifications:{...lO.notifications,...lM.notifications}},lF={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.PROMOTE_PLAN_VISIBILITY_ADMIN_MENU_MOVING_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x1ac512daa)))}}},lU={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.CALENDAR_TAB_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x20eea06c0)).then(e=>({default:e.CalendarTabCoachmark})))}}},lB={spaceName:A.xu.IN_PRODUCT_COACHMARK,notifications:{[A.ze.EDUCATION_ACTIVITY_INBOX_DMS_COACHMARK]:{component:l.lazy(()=>Promise.resolve().then(a.bind(a,0x9f53908e)).then(e=>({default:e.ActivityInboxDmsCoachmark})))}}},lH={elementName:"dms_button",onClick:{enableClogAction:!0}},lW={elementName:"activity_button",onClick:{enableClogAction:!0}},lV={elementName:"later_button",onClick:{enableClogAction:!0}},lG={elementName:"more_button",onClick:{enableClogAction:!0}},lq={elementName:"sales_home_button",onClick:{enableClogAction:!0}},lj={elementName:"slack_kit_playground_button",onClick:{enableClogAction:!0}},lz={elementName:"solutions_button",onClick:{enableClogAction:!0}},lK={elementName:"agents_button",onClick:{enableClogAction:!0}},l$={elementName:"assistant_button",onClick:{enableClogAction:!0}},lY={elementName:"huddles_button",onClick:{enableClogAction:!0}},lQ={elementName:"todos_button",onClick:{enableClogAction:!0}},lZ={elementName:"unified_files_button",onClick:{enableClogAction:!0}},lJ={elementName:"admin_button",onClick:{enableClogAction:!0}},lX={elementName:"today_button",onClick:{enableClogAction:!0}},l0={elementName:"today_crm_button",onClick:{enableClogAction:!0}},l1={elementName:"search_button",onClick:{enableClogAction:!0}},l2=(0,r.DA)()?(e,t,a,n,r,s,h)=>{let b,g,y,x,C,k,v,S,I,T,N,M,R,P,L,O,F,U,B,H,W,V,G,q,j,z,K,$,Y,Q,Z,J,X,ea=(0,i.c)(184),en=(0,o.wA)(),el=(0,w.d4)(D.Lh),eo=(0,w.d4)(ed.hi);ea[0]!==el||ea[1]!==eo?(b=el?ee.k6.ActivityInbox:ee.k6.Activity,eo&&(b=ee.k6.ActivityInboxSidebarPrototype),ea[0]=el,ea[1]=eo,ea[2]=b):b=ea[2];let es=(0,w.d4)(ad.tl),ec=(0,w.d4)(lc.b),em=(0,w.d4)(ll.We),eu=(0,w.d4)(lu.MM),eh=(0,w.d4)(lo.g),eb=(0,w.d4)(ls.mr),eg=(0,w.d4)(au.bq),ey=(0,w.d4)(use_tabs_item_props_builder_temp),eA=(0,w.d4)(au.og),ex=(0,w.d4)(au._d),eE=(0,w.d4)(use_tabs_item_props_builder_temp2),eC=(0,w.d4)(ed.yZ),ek=(0,w.d4)(lE.HP),ev=((0,w.d4)(lE.i9)?.numToReview??0)>0,eS=(0,w.d4)(ts.n3),eI=(0,w.d4)(use_tabs_item_props_builder_temp3),eR=(0,w.d4)(_temp4),eP=!eR&&eI,eL=(0,w.d4)(lI.AV),eO=(0,w.d4)(le.lf),eU=eO.reason||void 0,eH=eO.shouldShowTabs,eG=(0,w.d4)(_temp5),eq=(0,w.d4)(_temp6),ez=(0,w.d4)(ld.R);ea[3]===Symbol.for("react.memo_cache_sentinel")?(g=(0,p.y3)()||(0,lb.S)(),ea[3]=g):g=ea[3];let eK=g;ea[4]===Symbol.for("react.memo_cache_sentinel")?(y=[],ea[4]=y):y=ea[4];let[eY,eQ]=(0,l.useState)(y),[eZ,eJ]=(0,l.useState)(!1);ea[5]!==en?(x=async e=>{let t=getNavPropsFromTab(e);return!!t&&(await en((0,i9.p)({navProps:t,clogParams:{entryPoint:"use-tabs-item-props-builder"}})),!0)},ea[5]=en,ea[6]=x):x=ea[6];let eX=x;ea[7]!==en||ea[8]!==eX?(C=async e=>{let t=getIsCmdOrCtrlKeyPressed(e),a=getIsOptOrAltKeyPressed(e),n=Object.keys(ee.k6).find(t=>ee.k6[t]===e.target.id);if(eJ(getIsShowTabsShortcutKeysPressed(e)),t&&n&&"Enter"===e.code){if(a&&await eX(ee.k6[n]))return;en((0,a4.X)({tabName:ee.k6[n],shouldNavigateInContext:!1}))}},ea[7]=en,ea[8]=eX,ea[9]=C):C=ea[9];let e0=C;ea[10]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{eJ(!1)},ea[10]=k):k=ea[10];let e1=k;ea[11]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{eJ(!1)},ea[11]=v):v=ea[11];let e2=v;ea[12]!==e0?(S=()=>(window.addEventListener("keydown",e0),window.addEventListener("keyup",e1),window.addEventListener("mousedown",e1),window.addEventListener("mouseup",e0),window.addEventListener("blur",e2),()=>{window.removeEventListener("keydown",e0),window.removeEventListener("keyup",e1),window.removeEventListener("mousedown",e1),window.removeEventListener("mouseup",e0),window.removeEventListener("blur",e2)}),I=[e0,e1,e2],ea[12]=e0,ea[13]=S,ea[14]=I):(S=ea[13],I=ea[14]),(0,l.useEffect)(S,I);let e4=(0,at.X)(s),e5=(0,eV.P)(t,e);ea[15]!==s?(T=e=>{if(!e)return null;let t=!s.includes(ee.k6.Later)||!s.includes(ee.k6.LaterSidebarPrototype),a=s.includes(ee.k6.Platform)?lD:lO;return l.createElement(E,{shouldShowTabNudge:!t},l.createElement(ei.A,{spaceName:a.spaceName,notifications:a.notifications,shouldAlwaysRenderChildren:!0},l.createElement(BrowsePeekTrigger,{overflowTabs:s},e)))},ea[15]=s,ea[16]=T):T=ea[16];let e3=T,e6=_temp7,e8=_temp8;ea[17]!==n||ea[18]!==eP?(N=e=>e?(e.props.id,l.createElement(ActivityPeekTrigger,null,e)):null,ea[17]=n,ea[18]=eP,ea[19]=N):N=ea[19];let e7=N,e9=_temp9,te=_temp0;ea[20]!==n?(M=e=>e?l.createElement(LaterTabButtonNudge,{isActive:n===ee.k6.Later||n===ee.k6.LaterSidebarPrototype},l.createElement(LaterPeekTrigger,null,e)):null,ea[20]=n,ea[21]=M):M=ea[21];let tt=M,ta=_temp1,tr=_temp10,ti=_temp11,tl=_temp12;ea[22]!==ex?(R=e=>e?ex?l.createElement(TodayPeekV2Trigger,null,e):e:null,ea[22]=ex,ea[23]=R):R=ea[23];let tc=R,td=_temp13;ea[24]!==eZ?(P=e=>{let t=c()("p-tab_rail__shortcut_hint",{"p-tab_rail__shortcut_hint--visible":eZ});return l.createElement("div",{"aria-hidden":"true",className:t,"data-qa":"tab_rail_shortcut_hint"},void 0===e?0:e)},ea[24]=eZ,ea[25]=P):P=ea[25];let tm=P;ea[26]!==tm?(L=(e,t)=>t>=0&&t<=9?l.createElement(l.Fragment,null,e,tm(t)):e,ea[26]=tm,ea[27]=L):L=ea[27];let tu=L;ea[28]!==h||ea[29]!==tu?(O=e=>{let{shortcutNumber:t}=e;return tu(l.createElement(eB,{isNarrowWindow:h}),t)},ea[28]=h,ea[29]=tu,ea[30]=O):O=ea[30];let tp=O;ea[31]!==b||ea[32]!==en||ea[33]!==ey?(F=e=>{(e===b||e===ee.k6.Huddles||e===ee.k6.Later||e===ee.k6.LaterSidebarPrototype||e===ee.k6.Today||e===ee.k6.UnifiedFiles&&ey)&&en((0,a4.X)({tabName:e,shouldNavigateInContext:!0}))},ea[31]=b,ea[32]=en,ea[33]=ey,ea[34]=F):F=ea[34];let th=F,t_=(0,w.d4)(_temp14);ea[35]!==b||ea[36]!==en||ea[37]!==el||ea[38]!==eS||ea[39]!==eC||ea[40]!==ey||ea[41]!==t_||ea[42]!==eX||ea[43]!==th||ea[44]!==eA?(U=async(e,t)=>{let a=Object.keys(ee.k6).find(t=>ee.k6[t]===e),n=t?t.nativeEvent:void 0,r=n&&getIsCmdOrCtrlKeyPressed(n),i=n&&getIsOptOrAltKeyPressed(n);if(a&&e!==ee.k6.Browse){if(eC&&r&&en((0,lg.$)()),e===ee.k6.SalesHome)return void en((0,tw.o)((0,tT.Y9)((0,tT.FN)(),lt.w.ACTIVE_TAB_UPDATE)));if(e===ee.k6.Solutions)return void en((0,tw.o)((0,tT.Y9)((0,tT.Wy)(),lt.w.ACTIVE_TAB_UPDATE)));if(e===ee.k6.Agents)return void en((0,tw.o)((0,tT.Y9)((0,tT.Mm)(),lt.w.ACTIVE_TAB_UPDATE)));if(e===ee.k6.UnifiedFiles){let t=en(lw()),a={[ee.mq.Sidebar]:{id:to.c.BrowseUnifiedFiles,viewType:tn.D.UnifiedFilesSidebar}};if(await en((0,li.P)({viewSet:a})))return;if(eK&&r&&ey)return void th(e);if(t){en((0,lx.Q)({browserInstanceId:an.ej.UNIFIED_FILES})),en((0,lv.o2)({inputId:lS.Jx.UNIFIED_FILES_EXPLORER})),en((0,i1.cd)({fileTypes:iG.b})),en((0,lT.A)({windowId:ee.N2,viewSet:{[ee.mq.Sidebar]:(0,tT.AQ)(),[ee.mq.Primary]:(0,tT.s8)()},tab:ee.k6.UnifiedFiles}));return}}if(e===b){if(r&&i&&!eC&&await eX(e))return;let t=el?{[ee.mq.Primary]:{id:tn.D.ActivityInbox,viewType:tn.D.ActivityInbox}}:{[ee.mq.Primary]:{id:to.c.Activity,viewType:tn.D.ActivityList}};if(await en((0,li.P)({viewSet:t})))return;if(r&&!eC)return void en((0,a4.X)({tabName:e,shouldNavigateInContext:!0}))}if(eS&&(e===ee.k6.Later||e===ee.k6.LaterSidebarPrototype)){let t={[ee.mq.Primary]:{id:to.c.Later,viewType:tn.D.LaterList}};if(await en((0,li.P)({viewSet:t})))return;if(r&&!eC)return void en((0,a4.X)({tabName:e,shouldNavigateInContext:!1}))}if(eS&&e===ee.k6.Huddles){if(r&&i&&!eC&&await eX(e))return;let t={[ee.mq.Primary]:{id:to.c.BrowseHuddles,viewType:tn.D.BrowseHuddles}};if(await en((0,li.P)({viewSet:t})))return;if(r&&!eC)return void en((0,a4.X)({tabName:e}))}if(e===ee.k6.Todos){if(r&&i&&!eC&&await eX(e))return;let t={[ee.mq.Primary]:(0,tT.ox)()};return await en((0,li.P)({viewSet:t}))?void 0:r&&!eC?void en((0,a4.X)({tabName:e,shouldNavigateInContext:!1})):void en((0,tw.o)((0,tT.Y9)({...(0,tT.ox)(),options:{forceTab:ee.k6.Todos}},lt.w.ACTIVE_TAB_UPDATE)))}eA&&e===ee.k6.Today?en((0,tw.o)((0,tT.Y9)({...(0,tT.$1)()},lt.w.ACTIVE_TAB_UPDATE))):e!==ee.k6.Admin&&(e===ee.k6.Platform&&t_&&en((0,ag.A)({action:A.hw.CLICK,spaceName:A.xu.TOOLS_TAB_RAIL})),en((0,ak.A)({tab:ee.k6[a],reason:ak.m.Click})))}},ea[35]=b,ea[36]=en,ea[37]=el,ea[38]=eS,ea[39]=eC,ea[40]=ey,ea[41]=t_,ea[42]=eX,ea[43]=th,ea[44]=eA,ea[45]=U):U=ea[45];let tf=U,tb=eH?"shown_tabs":"hidden_tabs",tg=`ia4_new_teams_v3_treatment_home_more_${tb}${eU?`--${eU}`:""}`;ea[46]!==tg?(B={stepVariant:tg,clogImpression:!0},ea[46]=tg,ea[47]=B):B=ea[47];let ty=B,tA=e?d.A:tf;ea[48]!==ty||ea[49]!==tA?(H={autoClogProps:ty,onClick:tA},ea[48]=ty,ea[49]=tA,ea[50]=H):H=ea[50];let tx=e$(H);ea[51]!==tx.canTrackHomeTabClick||ea[52]!==tx.isHomeTabNudging||ea[53]!==tx.setCanTrackHomeTabClick||ea[54]!==e?(W=t=>t?e?t:l.createElement(ei.A,{spaceName:lr.spaceName,notifications:lr.notifications,canTrackHomeTabClick:tx.canTrackHomeTabClick,isHomeTabNudging:tx.isHomeTabNudging,setCanTrackHomeTabClick:tx.setCanTrackHomeTabClick,shouldAlwaysRenderChildren:!0},l.createElement(HomePeekTrigger,null,t)):null,ea[51]=tx.canTrackHomeTabClick,ea[52]=tx.isHomeTabNudging,ea[53]=tx.setCanTrackHomeTabClick,ea[54]=e,ea[55]=W):W=ea[55];let tE=W,tC=e||t&&a||!t&&n===ee.k6.Home;ea[56]!==n||ea[57]!==eo||ea[58]!==tC||ea[59]!==s?(V=getActiveTabForTabRail({activeTab:n,overflowTabs:s,isHomeTabActive:tC}),eo&&n===ee.k6.SearchSidebarPrototype&&(V=ee.k6.SearchSidebarPrototype),ea[56]=n,ea[57]=eo,ea[58]=tC,ea[59]=s,ea[60]=V):V=ea[60];let tk=(0,w.d4)(lk.oY),tv=(0,w.d4)(_temp15);ea[61]!==en||ea[62]!==tv||ea[63]!==e||ea[64]!==tk||ea[65]!==eU||ea[66]!==eH||ea[67]!==eG?(G=()=>{e||eG||!eH||tk||tv||(en((0,a_.AZ)({pref:le.S4,value:!0})),eU&&![le.ez.IS_ENTERPRISE,le.ez.IS_EXISTING_JOINER,le.ez.IS_IN_SOLUTIONS_ONBOARDING_TRIAL,le.ez.IS_IN_ACTIVATE_SOLUTIONS_GALLERY_TRIAL].includes(eU)&&en((0,lC.iR)({event:{iaVersion:4,type:A.jo.TABS_REVEALED}})))},q=[en,tv,e,tk,eU,eH,eG],ea[61]=en,ea[62]=tv,ea[63]=e,ea[64]=tk,ea[65]=eU,ea[66]=eH,ea[67]=eG,ea[68]=G,ea[69]=q):(G=ea[68],q=ea[69]),(0,l.useEffect)(G,q);let tS=(0,w.d4)(lf.yW);ea[70]!==en?(j=()=>{en((0,ab.A)({activeSection:as._.tabRail}))},ea[70]=en,ea[71]=j):j=ea[71];let tI=j;ea[72]!==en?(z=e=>{en((0,lA.E)({tabName:e,value:!1,reason:ly.pU.Manual}))},ea[72]=en,ea[73]=z):z=ea[73];let tN=z,tM=(0,w.d4)(_temp16),tR=(0,w.d4)(_temp17);ea[74]!==eR||ea[75]!==en?(K=e=>{e!==eR&&en((0,a_.AZ)({pref:"ia4_compact_mode",value:e}))},ea[74]=eR,ea[75]=en,ea[76]=K):K=ea[76];let tP=K;ea[77]!==b||ea[78]!==eR||ea[79]!==tS||ea[80]!==tM||ea[81]!==eE||ea[82]!==eI||ea[83]!==ey||ea[84]!==eX||ea[85]!==tI||ea[86]!==tN||ea[87]!==th||ea[88]!==tP?($=e=>{let t=[];if(tM&&(t.push({label:lN.t("Show"),type:_.A.header}),t.push({type:_.A.radio,label:eI?lN.t("Icons only"):lN.t("Icons and text"),checked:!eR,click:()=>tP(!1)}),t.push({type:_.A.radio,label:eI?lN.t("Compact"):lN.t("Icons only"),checked:eR,click:()=>tP(!0)}),t.push({type:_.A.separator})),tS.includes(e)||e===ee.k6.Browse||t.push({label:eE?lN.t("Hide tab"):"Hide tab",click:()=>tN(e)}),t.push({label:eE?lN.t("Customize tabs"):"Customize tabs",click:tI}),t.push({type:_.A.separator}),e===b||e===ee.k6.Huddles||e===ee.k6.Today){let a=lN.t("\u2318 Opt Click"),n=lN.t("Ctrl Alt Click"),r=(0,p.cX)()?a:n;t.push({label:lN.t("Open in split view",{ns:"menu"}),click:()=>eX(e),icon:l.createElement(f.Ah,{name:"move-to-split-view",size:"16"}),className:"c-menu_item_action_button",autoClogProps:{onClick:{enableClogAction:!0},uiComponentName:ej.UiComponentName.TAB_RAIL_CONTEXT_MENU,elementName:"open_in_split_view"},shortcut:r})}if(eK&&(e===b||e===ee.k6.Huddles||e===ee.k6.Later||e===ee.k6.LaterSidebarPrototype||e===ee.k6.Today||ey&&e===ee.k6.UnifiedFiles)){let a=lN.t("\u2318 Click"),n=lN.t("Ctrl Click"),r=(0,p.cX)()?a:n;t.push({label:lN.t("Open in new window"),click:()=>th(e),icon:l.createElement(f.Ah,{name:"open-in-window",size:"16"}),className:"c-menu_item_action_button",autoClogProps:{onClick:{enableClogAction:!0},uiComponentName:ej.UiComponentName.TAB_RAIL_CONTEXT_MENU,elementName:"open_in_new_window"},shortcut:r})}return t},ea[77]=b,ea[78]=eR,ea[79]=tS,ea[80]=tM,ea[81]=eE,ea[82]=eI,ea[83]=ey,ea[84]=eX,ea[85]=tI,ea[86]=tN,ea[87]=th,ea[88]=tP,ea[89]=$):$=ea[89];let tL=$;ea[90]!==tu||ea[91]!==eP?(Y=e=>{let{icon:t,id:a,shortcutNumber:n,showDot:r,isActive:i}=e;return tu(l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},void 0!==r&&r&&l.createElement(eM.A,{dataQa:`${a}_tab_badge_dot`}),l.createElement("div",{className:"p-tab_rail__button__icon_inner"},t)),l.createElement(eF,{id:a,isActive:void 0!==i&&i,shouldHideInactiveLabels:eP})),n)},ea[90]=tu,ea[91]=eP,ea[92]=Y):Y=ea[92];let tO=Y;ea[93]!==V||ea[94]!==tf||ea[95]!==tO?(Q=e=>{let{ariaHasPopup:t,autoClogProps:a,className:n,dataQa:r,icon:i,id:l,renderTitle:o,renderWrapper:s,shortcutNumber:d,showDot:m}=e,u=void 0===o?tO:o;return{"aria-describedby":(0,l_.A)(l),"aria-haspopup":t,"aria-label":(0,lh.A)(l),autoClogProps:a,className:c()(n,"p-tab_rail__button",{"p-tab_rail__button--active":V===l}),"data-qa":r,id:l,onClick:tf,renderWrapper:s,title:u({icon:i,id:l,shortcutNumber:d,showDot:void 0!==m&&m,isActive:V===l})}},ea[93]=V,ea[94]=tf,ea[95]=tO,ea[96]=Q):Q=ea[96];let tD=Q;return ea[97]!==n||ea[98]!==V||ea[99]!==b||ea[100]!==em||ea[101]!==e4||ea[102]!==ek||ea[103]!==eE||ea[104]!==tR||ea[105]!==eg||ea[106]!==es||ea[107]!==tL||ea[108]!==tf||ea[109]!==e5||ea[110]!==tx.autoClogProps||ea[111]!==tx.className||ea[112]!==tx.onClick||ea[113]!==e||ea[114]!==tC||ea[115]!==h||ea[116]!==ez||ea[117]!==a||ea[118]!==t||ea[119]!==s||ea[120]!==e7||ea[121]!==tD||ea[122]!==e3||ea[123]!==tE||ea[124]!==tt||ea[125]!==tc||ea[126]!==tp||ea[127]!==tu||ea[128]!==eP||ea[129]!==eL||ea[130]!==eA||ea[131]!==ev||ea[132]!==eb||ea[133]!==eh||ea[134]!==ec||ea[135]!==r?(Z=()=>{let i=r.map((r,i)=>{let o=i+1,d=n===r;switch(r){case ee.k6.Home:{let n=tu(l.createElement(eT,{badgeCounts:t||e?void 0:e4,className:t||e?void 0:tx.className,hideMentions:e5[ee.k6.Home],isActive:tC,isNarrowWindow:h,shouldHideInactiveLabels:eP}),o);if(ez)return null;return{title:n,id:r,onClick:tx.onClick,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_HOME_BUTTON,renderWrapper:tE,autoClogProps:tx.autoClogProps,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t||e,"p-tab_rail__button--active":V===r,"p-tab_rail__button--disabled":t&&!a})}}case ee.k6.DMs:if(e)return null;return{title:tu(l.createElement(ew,{badgeCounts:e4,hideMentions:e5[ee.k6.DMs],isActive:!t&&n===r,isNarrowWindow:h,shouldHideInactiveLabels:eP}),o),id:r,onClick:tf,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_DMS_BUTTON,renderWrapper:e6,autoClogProps:lH,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":V===r,"p-tab_rail__button--disabled":t})};case b:if(e)return null;return{title:tu(l.createElement(et,{badgeCounts:e4,hideMentions:e5[b],isActive:!t&&n===r,isNarrowWindow:h,shouldHideInactiveLabels:eP}),o),id:r,onClick:tf,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_ACTIVITY_BUTTON,renderWrapper:e7,autoClogProps:lW,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":V===r,"p-tab_rail__button--disabled":t})};case ee.k6.SalesHome:if(t||e)return null;return{title:tu(l.createElement(eD,{shouldHideInactiveLabels:eP}),o),id:r,onClick:tf,"aria-label":(0,lh.A)(r),"data-qa":ef.s.TAB_RAIL_SALESHOME_BUTTON,renderWrapper:ti,autoClogProps:lq,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":V===r})};case ee.k6.Later:case ee.k6.LaterSidebarPrototype:if(t||e)return null;return{title:tu(l.createElement(eN,{badgeCounts:e4,isNarrowWindow:h,shouldHideInactiveLabels:eP}),o),id:r,onClick:tf,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_LATER_BUTTON,renderWrapper:tt,autoClogProps:lV,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":V===r})};case ee.k6.SlackKitPlayground:if(!ec)return null;return tD({autoClogProps:lj,id:r,icon:l.createElement(f.Ah,{name:d?"sparkles-filled":"sparkles",size:"20"}),shortcutNumber:o,className:c()({"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t})});case ee.k6.Solutions:if(!eh)return null;return tD({autoClogProps:lz,id:r,icon:l.createElement(f.Ah,{name:d?"tools-filled":"tools",size:"20"}),shortcutNumber:o});case ee.k6.Agents:if(!eb)return null;return{title:tu(l.createElement(er,{isActive:!t&&n===r,shouldHideInactiveLabels:eP}),o),id:r,onClick:tf,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_AGENTFORCE_BUTTON,autoClogProps:lK,renderWrapper:tr,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":V===r,"p-tab_rail__button--disabled":t})};case ee.k6.UnifiedFiles:return{title:tu(l.createElement(eW,{badgeCounts:e4,hideMentions:e5[ee.k6.UnifiedFiles],isActive:!t&&n===r,isNarrowWindow:h,shouldHideInactiveLabels:eP}),o),id:r,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_FILES_BUTTON,onClick:tf,renderWrapper:e9,autoClogProps:lZ,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":V===r,"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t})};case ee.k6.Platform:return{title:tu(l.createElement(ep,{shouldHideInactiveLabels:eP}),o),id:r,"aria-label":tR?lN.t("Tools"):(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),onClick:tf,renderWrapper:e8,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":V===r,"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t})};case ee.k6.Huddles:if(t||e)return null;return tD({autoClogProps:lY,className:c()({"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t}),id:r,dataQa:ef.s.TAB_RAIL_CALENDAR_BUTTON,icon:l.createElement(f.Ah,{name:d?"calendar-filled":"calendar",size:"20"}),renderWrapper:td,shortcutNumber:o});case ee.k6.Assistant:if(!em)return null;return tD({autoClogProps:l$,id:r,icon:l.createElement(f.Ah,{name:d?"ai-sparkle-filled":"ai-sparkle",size:"20"}),shortcutNumber:o});case ee.k6.Todos:if(t||e)return null;return tD({autoClogProps:lQ,id:r,icon:l.createElement(f.Ah,{name:d?"check-circle-filled":"check-circle",size:"20"}),renderWrapper:te,shortcutNumber:o,...es&&{dataQa:ef.s.TAB_RAIL_TODOS_BUTTON,renderTitle:tp}});case ee.k6.Browse:if(e)return null;return{title:tu(l.createElement(e_,{badgeCounts:e4,hideMentions:e5[ee.k6.Browse],hasBrowseExternalWorkspacesTab:!1,isNarrowWindow:h,shouldHideInactiveLabels:eP}),0),id:r,"aria-label":(0,lh.A)(r,n,s),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_BROWSE_BUTTON,"aria-haspopup":"menu",renderWrapper:e3,autoClogProps:lG,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":V===r,"p-tab_rail__button--disabled":t})};case ee.k6.Admin:if(!eL)return null;return tD({showDot:ek&&ev,autoClogProps:lJ,ariaHasPopup:"menu",id:r,icon:l.createElement(f.Ah,{name:"settings",size:"20"}),renderWrapper:tl,shortcutNumber:-1});case ee.k6.Today:if(!eA)return null;return tD({autoClogProps:eg?l0:lX,id:r,icon:l.createElement(f.Ah,{name:"sun",size:"20"}),renderWrapper:tc,shortcutNumber:o});case ee.k6.SearchSidebarPrototype:return tD({autoClogProps:l1,id:r,icon:l.createElement(f.Ah,{name:"search",size:"20"}),shortcutNumber:o});default:return null}});eE?eQ(i.filter(u.b).map(e=>{let getTemplate=()=>tL(e.id);return{buttonWrapper:e=>{let{children:t}=e;return l.createElement(la.A,{getTemplate,menuAriaLabel:lN.t("Tab actions"),desktopAppOnly:!1,showSlackKitContextMenuOnDesktop:!0,width:"auto"},t)},...e}})):eQ((0,m.A)(i))},ea[97]=n,ea[98]=V,ea[99]=b,ea[100]=em,ea[101]=e4,ea[102]=ek,ea[103]=eE,ea[104]=tR,ea[105]=eg,ea[106]=es,ea[107]=tL,ea[108]=tf,ea[109]=e5,ea[110]=tx.autoClogProps,ea[111]=tx.className,ea[112]=tx.onClick,ea[113]=e,ea[114]=tC,ea[115]=h,ea[116]=ez,ea[117]=a,ea[118]=t,ea[119]=s,ea[120]=e7,ea[121]=tD,ea[122]=e3,ea[123]=tE,ea[124]=tt,ea[125]=tc,ea[126]=tp,ea[127]=tu,ea[128]=eP,ea[129]=eL,ea[130]=eA,ea[131]=ev,ea[132]=eb,ea[133]=eh,ea[134]=ec,ea[135]=r,ea[136]=Z):Z=ea[136],ea[137]!==n||ea[138]!==V||ea[139]!==b||ea[140]!==em||ea[141]!==e4||ea[142]!==eu||ea[143]!==el||ea[144]!==ek||ea[145]!==tM||ea[146]!==eE||ea[147]!==tR||ea[148]!==eg||ea[149]!==es||ea[150]!==tL||ea[151]!==tf||ea[152]!==eq||ea[153]!==e5||ea[154]!==tx||ea[155]!==e||ea[156]!==tC||ea[157]!==h||ea[158]!==ez||ea[159]!==a||ea[160]!==t||ea[161]!==s||ea[162]!==e7||ea[163]!==tD||ea[164]!==e3||ea[165]!==tE||ea[166]!==tt||ea[167]!==tc||ea[168]!==tp||ea[169]!==tu||ea[170]!==eP||ea[171]!==eL||ea[172]!==eA||ea[173]!==ev||ea[174]!==eb||ea[175]!==eZ||ea[176]!==eh||ea[177]!==eH||ea[178]!==ec||ea[179]!==r?(J=[ek,ev,r,e,t,a,tx,s,e4,tf,e3,e6,tE,e7,tt,ti,tu,n,V,tC,eH,eZ,ez,tD,el,b,h,eq,ta,tr,e8,tL,eE,ec,e5,eh,e9,te,eb,em,tl,eL,eA,tc,eu,es,tM,td,tp,tR,eg,eP],ea[137]=n,ea[138]=V,ea[139]=b,ea[140]=em,ea[141]=e4,ea[142]=eu,ea[143]=el,ea[144]=ek,ea[145]=tM,ea[146]=eE,ea[147]=tR,ea[148]=eg,ea[149]=es,ea[150]=tL,ea[151]=tf,ea[152]=eq,ea[153]=e5,ea[154]=tx,ea[155]=e,ea[156]=tC,ea[157]=h,ea[158]=ez,ea[159]=a,ea[160]=t,ea[161]=s,ea[162]=e7,ea[163]=tD,ea[164]=e3,ea[165]=tE,ea[166]=tt,ea[167]=tc,ea[168]=tp,ea[169]=tu,ea[170]=eP,ea[171]=eL,ea[172]=eA,ea[173]=ev,ea[174]=eb,ea[175]=eZ,ea[176]=eh,ea[177]=eH,ea[178]=ec,ea[179]=r,ea[180]=J):J=ea[180],(0,l.useEffect)(Z,J),ea[181]!==V||ea[182]!==eY?(X={activeTabForTabRail:V,tabsItemProps:eY},ea[181]=V,ea[182]=eY,ea[183]=X):X=ea[183],X}:(e,t,a,n,r,i,s)=>{let h=(0,o.wA)(),b=(0,w.d4)(D.Lh),g=(0,w.d4)(ed.hi),y=b?ee.k6.ActivityInbox:ee.k6.Activity;g&&(y=ee.k6.ActivityInboxSidebarPrototype);let x=(0,w.d4)(ad.tl),C=(0,w.d4)(lc.b),k=(0,w.d4)(ll.We),v=(0,w.d4)(lu.MM),I=(0,w.d4)(lo.g),N=(0,w.d4)(ls.mr),M=(0,w.d4)(au.bq),R=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"unified_files_browser_child_window_2")),P=(0,w.d4)(au.og),L=(0,w.d4)(au._d),O=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"customize_tab_rail_context_menu")),F=(0,w.d4)(ed.yZ),U=(0,w.d4)(lE.HP),B=((0,w.d4)(lE.i9)?.numToReview??0)>0,H=(0,w.d4)(ts.n3),W=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"tab_rail_active_labels")),V=(0,w.d4)(e=>(0,S.ty)(e,"ia4_compact_mode")),G=!V&&W,q=(0,w.d4)(lI.AV),j=(0,w.d4)(le.lf),z=j.reason||void 0,K=j.shouldShowTabs,$=(0,w.d4)(e=>(0,S.ty)(e,le.S4)),Y=(0,w.d4)(e=>(0,lp.U)(e)&&"on"!==(0,tK._Z)(e,"external_workspaces_add_to_home_v2",!1)&&(0,lm.I)(e).browseTab),Q=(0,w.d4)(ld.R),Z=(0,p.y3)()||(0,lb.S)(),[J,X]=(0,l.useState)([]),[en,el]=(0,l.useState)(!1),eo=(0,l.useCallback)(async e=>{let t=getNavPropsFromTab(e);return!!t&&(await h((0,i9.p)({navProps:t,clogParams:{entryPoint:"use-tabs-item-props-builder"}})),!0)},[h]),es=(0,l.useCallback)(async e=>{let t=getIsCmdOrCtrlKeyPressed(e),a=getIsOptOrAltKeyPressed(e),n=Object.keys(ee.k6).find(t=>ee.k6[t]===e.target.id);if(el(getIsShowTabsShortcutKeysPressed(e)),t&&n&&"Enter"===e.code){if(a&&await eo(ee.k6[n]))return;h((0,a4.X)({tabName:ee.k6[n],shouldNavigateInContext:!1}))}},[h,eo]),ec=(0,l.useCallback)(()=>{el(!1)},[]),em=(0,l.useCallback)(()=>{el(!1)},[]);(0,l.useEffect)(()=>(window.addEventListener("keydown",es),window.addEventListener("keyup",ec),window.addEventListener("mousedown",ec),window.addEventListener("mouseup",es),window.addEventListener("blur",em),()=>{window.removeEventListener("keydown",es),window.removeEventListener("keyup",ec),window.removeEventListener("mousedown",ec),window.removeEventListener("mouseup",es),window.removeEventListener("blur",em)}),[es,ec,em]);let eu=(0,at.X)(i),eh=(0,eV.P)(t,e),eb=(0,l.useCallback)(e=>{if(!e)return null;let t=!i.includes(ee.k6.Later)||!i.includes(ee.k6.LaterSidebarPrototype),a=i.includes(ee.k6.Platform)?lD:lO;return l.createElement(E,{shouldShowTabNudge:!t},l.createElement(ei.A,{spaceName:a.spaceName,notifications:a.notifications,shouldAlwaysRenderChildren:!0},l.createElement(BrowsePeekTrigger,{overflowTabs:i},e)))},[i]),eg=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lB.spaceName,notifications:lB.notifications,shouldAlwaysRenderChildren:!0},l.createElement(DmsPeekTrigger,null,e)):null,[]),ey=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lM.spaceName,notifications:lM.notifications,shouldAlwaysRenderChildren:!0},l.createElement(AutomationsPeekTrigger,null,e)):null,[]),eA=(0,l.useCallback)(e=>e?(e.props.id,l.createElement(ActivityPeekTrigger,null,e)):null,[n,G]),ex=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lL.spaceName,notifications:lL.notifications,shouldAlwaysRenderChildren:!0},l.createElement(UnifiedFilesPeekTrigger,null,e)):null,[]),eE=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lP.spaceName,notifications:lP.notifications,shouldAlwaysRenderChildren:!0},l.createElement(iP,null,e)):null,[]),eC=(0,l.useCallback)(e=>e?l.createElement(LaterTabButtonNudge,{isActive:n===ee.k6.Later||n===ee.k6.LaterSidebarPrototype},l.createElement(LaterPeekTrigger,null,e)):null,[n]),ek=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lM.spaceName,notifications:lM.notifications,shouldAlwaysRenderChildren:!0},e):null,[]),ev=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lR.spaceName,notifications:lR.notifications,shouldAlwaysRenderChildren:!0},l.createElement(AgentforcePeekTrigger,null,e)):null,[]),eS=(0,l.useCallback)(e=>e?l.createElement(SalesHomePeekTrigger,null,e):null,[]),eI=(0,l.useCallback)(e=>e?l.createElement(l.Fragment,null,l.createElement("hr",{className:"c-tabs__tab_menu--tab_separator"}),l.createElement(ei.A,{spaceName:lF.spaceName,notifications:lF.notifications,shouldAlwaysRenderChildren:!0},l.createElement(ea.Ay,null,e))):null,[]),eR=(0,l.useCallback)(e=>e?L?l.createElement(TodayPeekV2Trigger,null,e):e:null,[L]),eP=(0,l.useCallback)(e=>e?l.createElement(ei.A,{spaceName:lU.spaceName,notifications:lU.notifications,shouldAlwaysRenderChildren:!0},l.createElement(CalendarPeekTrigger,null,e)):null,[]),eL=(0,l.useCallback)((e=0)=>{let t=c()("p-tab_rail__shortcut_hint",{"p-tab_rail__shortcut_hint--visible":en});return l.createElement("div",{"aria-hidden":"true",className:t,"data-qa":"tab_rail_shortcut_hint"},e)},[en]),eO=(0,l.useCallback)((e,t)=>t>=0&&t<=9?l.createElement(l.Fragment,null,e,eL(t)):e,[eL]),eU=(0,l.useCallback)(({shortcutNumber:e})=>eO(l.createElement(eB,{isNarrowWindow:s}),e),[s,eO]),eH=(0,l.useCallback)(e=>{(e===y||e===ee.k6.Huddles||e===ee.k6.Later||e===ee.k6.LaterSidebarPrototype||e===ee.k6.Today||e===ee.k6.UnifiedFiles&&R)&&h((0,a4.X)({tabName:e,shouldNavigateInContext:!0}))},[h,y,R]),eG=(0,w.d4)(e=>(0,T.Hp)(e,A.xu.TOOLS_TAB_RAIL,void 0)===A.ze.UNIFIED_TOOLS_TAB_WFB_AI_STEP_TOOLS_TAB_BADGE),eq=(0,l.useCallback)(async(e,t)=>{let a=Object.keys(ee.k6).find(t=>ee.k6[t]===e),n=t?t.nativeEvent:void 0,r=n&&getIsCmdOrCtrlKeyPressed(n),i=n&&getIsOptOrAltKeyPressed(n);if(a&&e!==ee.k6.Browse){if(F&&r&&h((0,lg.$)()),e===ee.k6.SalesHome)return void h((0,tw.o)((0,tT.Y9)((0,tT.FN)(),lt.w.ACTIVE_TAB_UPDATE)));if(e===ee.k6.Solutions)return void h((0,tw.o)((0,tT.Y9)((0,tT.Wy)(),lt.w.ACTIVE_TAB_UPDATE)));if(e===ee.k6.Agents)return void h((0,tw.o)((0,tT.Y9)((0,tT.Mm)(),lt.w.ACTIVE_TAB_UPDATE)));if(e===ee.k6.UnifiedFiles){let t=h(lw()),a={[ee.mq.Sidebar]:{id:to.c.BrowseUnifiedFiles,viewType:tn.D.UnifiedFilesSidebar}};if(await h((0,li.P)({viewSet:a})))return;if(Z&&r&&R)return void eH(e);if(t){h((0,lx.Q)({browserInstanceId:an.ej.UNIFIED_FILES})),h((0,lv.o2)({inputId:lS.Jx.UNIFIED_FILES_EXPLORER})),h((0,i1.cd)({fileTypes:iG.b})),h((0,lT.A)({windowId:ee.N2,viewSet:{[ee.mq.Sidebar]:(0,tT.AQ)(),[ee.mq.Primary]:(0,tT.s8)()},tab:ee.k6.UnifiedFiles}));return}}if(e===y){if(r&&i&&!F&&await eo(e))return;let t=b?{[ee.mq.Primary]:{id:tn.D.ActivityInbox,viewType:tn.D.ActivityInbox}}:{[ee.mq.Primary]:{id:to.c.Activity,viewType:tn.D.ActivityList}};if(await h((0,li.P)({viewSet:t})))return;if(r&&!F)return void h((0,a4.X)({tabName:e,shouldNavigateInContext:!0}))}if(H&&(e===ee.k6.Later||e===ee.k6.LaterSidebarPrototype)){let t={[ee.mq.Primary]:{id:to.c.Later,viewType:tn.D.LaterList}};if(await h((0,li.P)({viewSet:t})))return;if(r&&!F)return void h((0,a4.X)({tabName:e,shouldNavigateInContext:!1}))}if(H&&e===ee.k6.Huddles){if(r&&i&&!F&&await eo(e))return;let t={[ee.mq.Primary]:{id:to.c.BrowseHuddles,viewType:tn.D.BrowseHuddles}};if(await h((0,li.P)({viewSet:t})))return;if(r&&!F)return void h((0,a4.X)({tabName:e}))}if(e===ee.k6.Todos){if(r&&i&&!F&&await eo(e))return;let t={[ee.mq.Primary]:(0,tT.ox)()};return await h((0,li.P)({viewSet:t}))?void 0:r&&!F?void h((0,a4.X)({tabName:e,shouldNavigateInContext:!1})):void h((0,tw.o)((0,tT.Y9)({...(0,tT.ox)(),options:{forceTab:ee.k6.Todos}},lt.w.ACTIVE_TAB_UPDATE)))}P&&e===ee.k6.Today?h((0,tw.o)((0,tT.Y9)({...(0,tT.$1)()},lt.w.ACTIVE_TAB_UPDATE))):e!==ee.k6.Admin&&(e===ee.k6.Platform&&eG&&h((0,ag.A)({action:A.hw.CLICK,spaceName:A.xu.TOOLS_TAB_RAIL})),h((0,ak.A)({tab:ee.k6[a],reason:ak.m.Click})))}},[F,y,H,h,Z,eo,eH,b,P,R,eG]),ez=e$({autoClogProps:(0,l.useMemo)(()=>{let e=K?"shown_tabs":"hidden_tabs";return{stepVariant:`ia4_new_teams_v3_treatment_home_more_${e}${z?`--${z}`:""}`,clogImpression:!0}},[z,K]),onClick:e?d.A:eq}),eK=(0,l.useCallback)(t=>t?e?t:l.createElement(ei.A,{spaceName:lr.spaceName,notifications:lr.notifications,canTrackHomeTabClick:ez.canTrackHomeTabClick,isHomeTabNudging:ez.isHomeTabNudging,setCanTrackHomeTabClick:ez.setCanTrackHomeTabClick,shouldAlwaysRenderChildren:!0},l.createElement(HomePeekTrigger,null,t)):null,[e,ez.canTrackHomeTabClick,ez.isHomeTabNudging,ez.setCanTrackHomeTabClick]),eY=e||t&&a||!t&&n===ee.k6.Home,eQ=getActiveTabForTabRail({activeTab:n,overflowTabs:i,isHomeTabActive:eY});g&&n===ee.k6.SearchSidebarPrototype&&(eQ=ee.k6.SearchSidebarPrototype);let eZ=(0,w.d4)(lk.oY),eJ=(0,w.d4)(e=>!!(0,T._7)(e,A.xu.IN_PRODUCT_COACHMARK));(0,l.useEffect)(()=>{e||$||!K||eZ||eJ||(h((0,a_.AZ)({pref:le.S4,value:!0})),z&&![le.ez.IS_ENTERPRISE,le.ez.IS_EXISTING_JOINER,le.ez.IS_IN_SOLUTIONS_ONBOARDING_TRIAL,le.ez.IS_IN_ACTIVATE_SOLUTIONS_GALLERY_TRIAL].includes(z)&&h((0,lC.iR)({event:{iaVersion:4,type:A.jo.TABS_REVEALED}})))},[h,eJ,e,eZ,z,K,$]);let eX=(0,w.d4)(lf.yW),e0=(0,l.useCallback)(()=>{h((0,ab.A)({activeSection:as._.tabRail}))},[h]),e1=(0,l.useCallback)(e=>{h((0,lA.E)({tabName:e,value:!1,reason:ly.pU.Manual}))},[h]),e2=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"compact_mode_pref")),e4=(0,w.d4)(e=>"on"===(0,tK._Z)(e,"ia_next_automations")),e5=(0,l.useCallback)(e=>{e!==V&&h((0,a_.AZ)({pref:"ia4_compact_mode",value:e}))},[V,h]),e3=(0,l.useCallback)(e=>{let t=[];if(e2&&(t.push({label:lN.t("Show"),type:_.A.header}),t.push({type:_.A.radio,label:W?lN.t("Icons only"):lN.t("Icons and text"),checked:!V,click:()=>e5(!1)}),t.push({type:_.A.radio,label:W?lN.t("Compact"):lN.t("Icons only"),checked:V,click:()=>e5(!0)}),t.push({type:_.A.separator})),eX.includes(e)||e===ee.k6.Browse||t.push({label:O?lN.t("Hide tab"):"Hide tab",click:()=>e1(e)}),t.push({label:O?lN.t("Customize tabs"):"Customize tabs",click:e0}),t.push({type:_.A.separator}),e===y||e===ee.k6.Huddles||e===ee.k6.Today){let a=lN.t("\u2318 Opt Click"),n=lN.t("Ctrl Alt Click"),r=(0,p.cX)()?a:n;t.push({label:lN.t("Open in split view",{ns:"menu"}),click:()=>eo(e),icon:l.createElement(f.Ah,{name:"move-to-split-view",size:"16"}),className:"c-menu_item_action_button",autoClogProps:{onClick:{enableClogAction:!0},uiComponentName:ej.UiComponentName.TAB_RAIL_CONTEXT_MENU,elementName:"open_in_split_view"},shortcut:r})}if(Z&&(e===y||e===ee.k6.Huddles||e===ee.k6.Later||e===ee.k6.LaterSidebarPrototype||e===ee.k6.Today||R&&e===ee.k6.UnifiedFiles)){let a=lN.t("\u2318 Click"),n=lN.t("Ctrl Click"),r=(0,p.cX)()?a:n;t.push({label:lN.t("Open in new window"),click:()=>eH(e),icon:l.createElement(f.Ah,{name:"open-in-window",size:"16"}),className:"c-menu_item_action_button",autoClogProps:{onClick:{enableClogAction:!0},uiComponentName:ej.UiComponentName.TAB_RAIL_CONTEXT_MENU,elementName:"open_in_new_window"},shortcut:r})}return t},[eX,O,e0,e1,eH,Z,V,e5,e2,eo,y,R,W]),e6=(0,l.useCallback)(({icon:e,id:t,shortcutNumber:a,showDot:n=!1,isActive:r=!1})=>eO(l.createElement(l.Fragment,null,l.createElement("div",{className:"p-tab_rail__button__icon"},n&&l.createElement(eM.A,{dataQa:`${t}_tab_badge_dot`}),l.createElement("div",{className:"p-tab_rail__button__icon_inner"},e)),l.createElement(eF,{id:t,isActive:r,shouldHideInactiveLabels:G})),a),[eO,G]),e8=(0,l.useCallback)(({ariaHasPopup:e,autoClogProps:t,className:a,dataQa:n,icon:r,id:i,renderTitle:l=e6,renderWrapper:o,shortcutNumber:s,showDot:d=!1})=>({"aria-describedby":(0,l_.A)(i),"aria-haspopup":e,"aria-label":(0,lh.A)(i),autoClogProps:t,className:c()(a,"p-tab_rail__button",{"p-tab_rail__button--active":eQ===i}),"data-qa":n,id:i,onClick:eq,renderWrapper:o,title:l({icon:r,id:i,shortcutNumber:s,showDot:d,isActive:eQ===i})}),[e6,eQ,eq]);return(0,l.useEffect)(()=>{let o=r.map((r,o)=>{let d=o+1,m=n===r;switch(r){case ee.k6.Home:{let n=eO(l.createElement(eT,{badgeCounts:t||e?void 0:eu,className:t||e?void 0:ez.className,hideMentions:eh[ee.k6.Home],isActive:eY,isNarrowWindow:s,shouldHideInactiveLabels:G}),d);if(Q)return null;return{title:n,id:r,onClick:ez.onClick,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_HOME_BUTTON,renderWrapper:eK,autoClogProps:ez.autoClogProps,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t||e,"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--disabled":t&&!a})}}case ee.k6.DMs:if(e)return null;return{title:eO(l.createElement(ew,{badgeCounts:eu,hideMentions:eh[ee.k6.DMs],isActive:!t&&n===r,isNarrowWindow:s,shouldHideInactiveLabels:G}),d),id:r,onClick:eq,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_DMS_BUTTON,renderWrapper:eg,autoClogProps:lH,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--disabled":t})};case y:if(e)return null;return{title:eO(l.createElement(et,{badgeCounts:eu,hideMentions:eh[y],isActive:!t&&n===r,isNarrowWindow:s,shouldHideInactiveLabels:G}),d),id:r,onClick:eq,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_ACTIVITY_BUTTON,renderWrapper:eA,autoClogProps:lW,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--disabled":t})};case ee.k6.SalesHome:if(t||e)return null;return{title:eO(l.createElement(eD,{shouldHideInactiveLabels:G}),d),id:r,onClick:eq,"aria-label":(0,lh.A)(r),"data-qa":ef.s.TAB_RAIL_SALESHOME_BUTTON,renderWrapper:eS,autoClogProps:lq,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":eQ===r})};case ee.k6.Later:case ee.k6.LaterSidebarPrototype:if(t||e)return null;return{title:eO(l.createElement(eN,{badgeCounts:eu,isNarrowWindow:s,shouldHideInactiveLabels:G}),d),id:r,onClick:eq,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_LATER_BUTTON,renderWrapper:eC,autoClogProps:lV,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":eQ===r})};case ee.k6.SlackKitPlayground:if(!C)return null;return e8({autoClogProps:lj,id:r,icon:l.createElement(f.Ah,{name:m?"sparkles-filled":"sparkles",size:"20"}),shortcutNumber:d,className:c()({"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t})});case ee.k6.Solutions:if(!I)return null;return e8({autoClogProps:lz,id:r,icon:l.createElement(f.Ah,{name:m?"tools-filled":"tools",size:"20"}),shortcutNumber:d});case ee.k6.Agents:if(!N)return null;return{title:eO(l.createElement(er,{isActive:!t&&n===r,shouldHideInactiveLabels:G}),d),id:r,onClick:eq,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_AGENTFORCE_BUTTON,autoClogProps:lK,renderWrapper:ev,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--disabled":t})};case ee.k6.UnifiedFiles:return{title:eO(l.createElement(eW,{badgeCounts:eu,hideMentions:eh[ee.k6.UnifiedFiles],isActive:!t&&n===r,isNarrowWindow:s,shouldHideInactiveLabels:G}),d),id:r,"aria-label":(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_FILES_BUTTON,onClick:eq,renderWrapper:ex,autoClogProps:lZ,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t})};case ee.k6.Platform:return{title:eO(l.createElement(ep,{shouldHideInactiveLabels:G}),d),id:r,"aria-label":e4?lN.t("Tools"):(0,lh.A)(r),"aria-describedby":(0,l_.A)(r),onClick:eq,renderWrapper:ey,className:c()("p-tab_rail__button",{"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t})};case ee.k6.Huddles:if(t||e)return null;return e8({autoClogProps:lY,className:c()({"p-tab_rail__button--setup":t,"p-tab_rail__button--disabled":t}),id:r,dataQa:ef.s.TAB_RAIL_CALENDAR_BUTTON,icon:l.createElement(f.Ah,{name:m?"calendar-filled":"calendar",size:"20"}),renderWrapper:eP,shortcutNumber:d});case ee.k6.Assistant:if(!k)return null;return e8({autoClogProps:l$,id:r,icon:l.createElement(f.Ah,{name:m?"ai-sparkle-filled":"ai-sparkle",size:"20"}),shortcutNumber:d});case ee.k6.Todos:if(t||e)return null;return e8({autoClogProps:lQ,id:r,icon:l.createElement(f.Ah,{name:m?"check-circle-filled":"check-circle",size:"20"}),renderWrapper:eE,shortcutNumber:d,...x&&{dataQa:ef.s.TAB_RAIL_TODOS_BUTTON,renderTitle:eU}});case ee.k6.Browse:if(e)return null;return{title:eO(l.createElement(e_,{badgeCounts:eu,hideMentions:eh[ee.k6.Browse],hasBrowseExternalWorkspacesTab:!1,isNarrowWindow:s,shouldHideInactiveLabels:G}),0),id:r,"aria-label":(0,lh.A)(r,n,i),"aria-describedby":(0,l_.A)(r),"data-qa":ef.s.TAB_RAIL_BROWSE_BUTTON,"aria-haspopup":"menu",renderWrapper:eb,autoClogProps:lG,className:c()("p-tab_rail__button",{"p-tab_rail__button--setup":t,"p-tab_rail__button--active":eQ===r,"p-tab_rail__button--disabled":t})};case ee.k6.Admin:if(!q)return null;return e8({showDot:U&&B,autoClogProps:lJ,ariaHasPopup:"menu",id:r,icon:l.createElement(f.Ah,{name:"settings",size:"20"}),renderWrapper:eI,shortcutNumber:-1});case ee.k6.Today:if(!P)return null;return e8({autoClogProps:M?l0:lX,id:r,icon:l.createElement(f.Ah,{name:"sun",size:"20"}),renderWrapper:eR,shortcutNumber:d});case ee.k6.SearchSidebarPrototype:return e8({autoClogProps:l1,id:r,icon:l.createElement(f.Ah,{name:"search",size:"20"}),shortcutNumber:d});default:return null}});O?X(o.filter(u.b).map(e=>{let getTemplate=()=>e3(e.id);return{buttonWrapper:({children:e})=>l.createElement(la.A,{getTemplate:getTemplate,menuAriaLabel:lN.t("Tab actions"),desktopAppOnly:!1,showSlackKitContextMenuOnDesktop:!0,width:"auto"},e),...e}})):X((0,m.A)(o))},[U,B,r,e,t,a,ez,i,eu,eq,eb,eg,eK,eA,eC,eS,eO,n,eQ,eY,K,en,Q,e8,b,y,s,Y,ek,ev,ey,e3,O,C,eh,I,ex,eE,N,k,eI,q,P,eR,v,x,e2,eP,eU,e4,M,G]),{activeTabForTabRail:eQ,tabsItemProps:J}};function use_tabs_item_props_builder_temp(e){return"on"===(0,tK._Z)(e,"unified_files_browser_child_window_2")}function use_tabs_item_props_builder_temp2(e){return"on"===(0,tK._Z)(e,"customize_tab_rail_context_menu")}function use_tabs_item_props_builder_temp3(e){return"on"===(0,tK._Z)(e,"tab_rail_active_labels")}function _temp4(e){return(0,S.ty)(e,"ia4_compact_mode")}function _temp5(e){return(0,S.ty)(e,le.S4)}function _temp6(e){return(0,lp.U)(e)&&"on"!==(0,tK._Z)(e,"external_workspaces_add_to_home_v2",!1)&&(0,lm.I)(e).browseTab}function _temp7(e){return e?l.createElement(ei.A,{spaceName:lB.spaceName,notifications:lB.notifications,shouldAlwaysRenderChildren:!0},l.createElement(DmsPeekTrigger,null,e)):null}function _temp8(e){return e?l.createElement(ei.A,{spaceName:lM.spaceName,notifications:lM.notifications,shouldAlwaysRenderChildren:!0},l.createElement(AutomationsPeekTrigger,null,e)):null}function _temp9(e){return e?l.createElement(ei.A,{spaceName:lL.spaceName,notifications:lL.notifications,shouldAlwaysRenderChildren:!0},l.createElement(UnifiedFilesPeekTrigger,null,e)):null}function _temp0(e){return e?l.createElement(ei.A,{spaceName:lP.spaceName,notifications:lP.notifications,shouldAlwaysRenderChildren:!0},l.createElement(iP,null,e)):null}function _temp1(e){return e?l.createElement(ei.A,{spaceName:lM.spaceName,notifications:lM.notifications,shouldAlwaysRenderChildren:!0},e):null}function _temp10(e){return e?l.createElement(ei.A,{spaceName:lR.spaceName,notifications:lR.notifications,shouldAlwaysRenderChildren:!0},l.createElement(AgentforcePeekTrigger,null,e)):null}function _temp11(e){return e?l.createElement(SalesHomePeekTrigger,null,e):null}function _temp12(e){return e?l.createElement(l.Fragment,null,l.createElement("hr",{className:"c-tabs__tab_menu--tab_separator"}),l.createElement(ei.A,{spaceName:lF.spaceName,notifications:lF.notifications,shouldAlwaysRenderChildren:!0},l.createElement(ea.Ay,null,e))):null}function _temp13(e){return e?l.createElement(ei.A,{spaceName:lU.spaceName,notifications:lU.notifications,shouldAlwaysRenderChildren:!0},l.createElement(CalendarPeekTrigger,null,e)):null}function _temp14(e){return(0,T.Hp)(e,A.xu.TOOLS_TAB_RAIL,void 0)===A.ze.UNIFIED_TOOLS_TAB_WFB_AI_STEP_TOOLS_TAB_BADGE}function _temp15(e){return!!(0,T._7)(e,A.xu.IN_PRODUCT_COACHMARK)}function _temp16(e){return"on"===(0,tK._Z)(e,"compact_mode_pref")}function _temp17(e){return"on"===(0,tK._Z)(e,"ia_next_automations")}l2.displayName="useTabsItemPropsBuilder"},0x1649d39d4:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x226892387),o=a(0x786f41af);let s=(0,n.DA)()?function(){let e,t=(0,r.c)(3),a=(0,l.d4)(o.r),n=(0,l.d4)(o.A);return t[0]!==n||t[1]!==a?(e={tabRailList:n,visibleTabs:a},t[0]=n,t[1]=a,t[2]=e):e=t[2],e}:function(){let e=(0,l.d4)(o.r),t=(0,l.d4)(o.A);return(0,i.useMemo)(()=>({tabRailList:t,visibleTabs:e}),[t,e])}},0x77f93fcc:(e,t,a)=>{"use strict";a.d(t,{A:()=>G});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x62a17882),c=a(0x20482ad21),d=a(0x15f8e452a),m=a(0x410829f8),u=a(0x14d6bb998),p=a(0x1384f171),h=a(0x136939b88),_=a(0x21a0daea5),f=a(0x226892387),b=a(0x21bfacd01),g=a(0x2079c6624),y=a.n(g),A=a(0x5355ab9e),x=a.n(A);let AccountSwitcherRowShortcut=({index:e,fontSize:t})=>{let a=(0,s.cX)()?"\u2318":"Ctrl ",n=(0,f.d4)(b.V);return i.createElement("div",{id:(0,_.$q)(e),style:{fontSize:`${t}px`},className:o()(x().accountSwitcherRowShortcut,{[y().workspaceSwitcherKeyboardShortcut]:n})},(0,s.y3)()&&e<9&&`${a}${e+1}`)};AccountSwitcherRowShortcut.displayName="AccountSwitcherRowShortcut";var E=a(0x2376ea9bb),C=a(0xa1832ae4),k=a(0x7b24385d),v=a(0x17f03e906),S=a(0x184deeba7),I=a(0x1750c1ced),w=a(0x1a54d5ba1),T=a(0x583896b1),N=a(0x1266f1359),M=a(0x2244f10f),R=a(0x152efebe6),P=a(0x1b9ff23fe),L=a(0x1ee439e69),O=a(0x1067595c0),D=a(0x7441145f),F=a(0x19895585a);let U=new c.Ay("team_picker"),AccountSwitcherRow=({index:e,teamName:t,teamIcon:a,teamUrl:n,hasSessionExpired:r,isPendingAuth:l,mentionCount:c,hasUnreads:p,isCurrentFocusedTeam:h,isGovSlackWorkspace:f,isBBMEnabled:b,teamRequiresMobileLogin:g})=>{let y;r?y=i.createElement("div",{className:"p-account_switcher__signed_out_badge","data-qa":"team_signed_out_badge"},i.createElement(d.A,{type:"warning",className:"p-account_switcher__signed_out_badge__stroke"}),i.createElement(d.A,{type:"warning-filled"})):l?y=i.createElement("div",{className:"p-account_switcher__locked_badge"},i.createElement("img",{src:"/img/sidebar_lock_icon.svg",alt:"",height:"16"})):g?y=i.createElement("div",{className:"p-account_switcher__warning_badge"},i.createElement("img",{src:"/img/sidebar_warning_icon.svg",alt:"",height:"22"})):c>0?y=i.createElement("div",{className:"p-account_switcher__row_unread_counts"},i.createElement(m.Gm,{count:c,maxCount:u.N,style:m.rY.red})):p&&(y=i.createElement("div",{className:"p-account_switcher__row_unread_counts"},i.createElement("div",{className:"p-account_switcher__row_unread_dot"})));let A=i.createElement(E.U,{ariaHidden:!0,icon:a,size:36,teamName:t}),x=(({hasUnreads:e,mentionCount:t,hasSessionExpired:a,isPendingAuth:n,teamRequiresMobileLogin:r})=>{if(a)return U.t("Logged out");if(n)return U.t("Finish logging in");let i=U.t("{maxBadgeCount}+",{maxBadgeCount:u.N}),l=t&&t>u.N?i:t;return t?U.t("{mentionCount, plural, =1 {{count} new mention} other {{count} new mentions}}",{mentionCount:t,count:l}):e?U.t("Has new messages"):r?U.t("Can\u2019t be accessed on desktop. Please log in on the mobile app."):void 0})({hasSessionExpired:r,isPendingAuth:l,mentionCount:c,hasUnreads:p,teamRequiresMobileLogin:g}),C=(0,i.useCallback)(()=>f?i.createElement(d.A,{className:o()("p-team_sidebar__govslack_icon",{"p-team_sidebar__govslack_icon--active":h}),type:"gov-slack",size:"inherit"}):null,[f,h]),v=(0,s.y3)()||(0,I.VA)()||!h||b?i.createElement("div",{className:o()("p-account_switcher__row_tile_and_unreads",{"p-account_switcher__row--focused_team":h})},i.createElement("div",{className:"p-account_switcher__row_icon"},A),!h&&y,C()):null;return i.createElement(i.Fragment,null,v,i.createElement("div",{className:"p-account_switcher__row_team"},i.createElement("div",{className:"p-account_switcher__row_name p-account_switcher_peeks-card__title",id:(0,k.N)(e)},t),i.createElement("div",{className:"p-account_switcher__row_url  p-account_switcher_peeks-card__subtitle"},n)),x&&i.createElement("div",{id:(0,_.Qb)(e),hidden:!0},x),i.createElement(AccountSwitcherRowShortcut,{index:e,fontSize:13}))};AccountSwitcherRow.displayName="AccountSwitcherRow";let ConnectedAccountSwitcherRow=e=>{let{teamMeta:t,isBooted:a,failedToBoot:n,...r}=e,{isExpired:l,isPendingAuth:o}=t;if(!a||n){let{id:e,domain:a,icon:n,name:s,url:c}=t,d=(0,C.Zl)({id:e,url:c,domain:a||""},"",!0);return i.createElement(AccountSwitcherRow,{teamName:s,teamUrl:d,teamIcon:n,hasSessionExpired:!!l,isPendingAuth:o,mentionCount:0,hasUnreads:!1,...r})}let s=(0,N.$D)(t.id),c=(0,L.H7)(s),d=e.teamRenderInfo?.teamIcon??(0,C.Rf)(c),m=e.teamRenderInfo?.teamName??(0,C.F1)(c),u=e.teamRenderInfo?.teamUrl??(0,C.Zl)(c,"",!0),_=(0,O.kP)(s),f=(0,p.IW)(s),g=(0,w.cJ)(s),y=(0,p.QT)(s),A=(0,P.BK)(s),x=(0,M.FD)(s,"global_reminders_in_activity")??!0,E=(0,T.b)(s)[F.k6.Later]??!0,k=(0,D.p)(s)+(0,R.g_)(s);f&&(k=g,y&&x||!E||(k+=A));let I=(0,v.c)(s),U=(0,b.V)(s),B=(0,h.y)(s),H=(0,S.L)(s);return B&&H&&(d=h.X,m="Slack Corp"),i.createElement(AccountSwitcherRow,{teamName:m,teamUrl:u,teamIcon:d,hasSessionExpired:!!l,isPendingAuth:o,mentionCount:k,hasUnreads:_,isGovSlackWorkspace:I,isBBMEnabled:U,...r})};ConnectedAccountSwitcherRow.displayName="ConnectedAccountSwitcherRow";var B=a(0x20ada2503),H=a(0xd66cda03),W=a(0x1bb02f2c4);let V=(0,n.DA)()?e=>{let t,a,n,l,o,s,c,d=(0,r.c)(26),{team:m,index:u,isCurrentFocusedTeam:p}=e,_=(0,H.cw)(W.getBootedWorkspaces),f=(0,H.cw)(W.getFailedToBootWorkspaces)??[];d[0]!==m.id?(t=e=>(0,W.isUserRequiredToUseMobileLogin)(e,m.id),d[0]=m.id,d[1]=t):t=d[1];let b=(0,H.cw)(t);if(d[2]!==m.id){let e=(0,N.oK)(m.id)?.getState();if(n="",l="",e){let t=(0,B.q)(e);t&&(n=t.teamName,a=t.teamIcon,l=t.teamUrl);let r=(0,h.y)(e),i=(0,S.L)(e);r&&i&&(a=h.X,n="Slack Corp")}d[2]=m.id,d[3]=a,d[4]=n,d[5]=l}else a=d[3],n=d[4],l=d[5];d[6]!==_||d[7]!==m.id?(o=_.includes(m.id),d[6]=_,d[7]=m.id,d[8]=o):o=d[8];let g=o;d[9]!==f||d[10]!==m.id?(s=f.includes(m.id),d[9]=f,d[10]=m.id,d[11]=s):s=d[11];let y=s;if(d[12]!==y||d[13]!==u||d[14]!==g||d[15]!==p||d[16]!==m||d[17]!==a||d[18]!==n||d[19]!==b||d[20]!==l){let e={teamMeta:m,index:u,isBooted:g,failedToBoot:y,isCurrentFocusedTeam:p,teamRequiresMobileLogin:b};if(n&&a&&l){let t;d[22]!==a||d[23]!==n||d[24]!==l?(t={teamName:n,teamIcon:a,teamUrl:l},d[22]=a,d[23]=n,d[24]=l,d[25]=t):t=d[25],e.teamRenderInfo=t}c=i.createElement(ConnectedAccountSwitcherRow,e),d[12]=y,d[13]=u,d[14]=g,d[15]=p,d[16]=m,d[17]=a,d[18]=n,d[19]=b,d[20]=l,d[21]=c}else c=d[21];return c}:({team:e,index:t,isCurrentFocusedTeam:a})=>{let n,r=(0,H.cw)(W.getBootedWorkspaces),l=(0,H.cw)(W.getFailedToBootWorkspaces)??[],o=(0,H.cw)(t=>(0,W.isUserRequiredToUseMobileLogin)(t,e.id)),s=(0,N.oK)(e.id)?.getState(),c="",d="";if(s){let e=(0,B.q)(s);e&&(c=e.teamName,n=e.teamIcon,d=e.teamUrl);let t=(0,h.y)(s),a=(0,S.L)(s);t&&a&&(n=h.X,c="Slack Corp")}let m=r.includes(e.id),u=l.includes(e.id),p={teamMeta:e,index:t,isBooted:m,failedToBoot:u,isCurrentFocusedTeam:a,teamRequiresMobileLogin:o};return c&&n&&d&&(p.teamRenderInfo={teamName:c,teamIcon:n,teamUrl:d}),i.createElement(ConnectedAccountSwitcherRow,p)};V.displayName="TeamSwitcherTeamRow";let G=V},0x2366a14ba:(e,t,a)=>{"use strict";a.d(t,{R:()=>E});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0xd6ba6894),s=a(0x1df96de4c),c=a(0x62a17882),d=a(0x2172ff7ff),m=a(0xd66cda03),u=a(0xc2ae1186),p=a(0xa1832ae4),h=a(0x1750c1ced),_=a(0x2c32ad3c),f=a(0x1bb02f2c4),b=a(0x9b971e7e),g=a(0x226892387),y=a(0x1266f1359),A=a(0x21bfacd01),x=a(0x19a19c640);let E=(0,n.DA)()?()=>{let e,t,a,n,i,d=(0,r.c)(19),E=(0,l.wA)(),C=(0,g.d4)(A.V),k=(0,g.d4)(b.Kc),v=(0,m.cw)(f.getWorkspacesMeta)??s.t0;d[0]!==k?(e=e=>e.id!==k,d[0]=k,d[1]=e):e=d[1];let S=Object.values(v).sort(_temp).filter(e);k&&S.unshift(v[k]);let I=!(0,c.y3)()&&!(0,h.VA)()&&S.length>1,w=(0,m.cw)(f.getAllWorkspaces),T=S.map(_temp2);d[2]!==w||d[3]!==T?(t=(0,h.VA)()?w:T,d[2]=w,d[3]=T,d[4]=t):t=d[4];let N=t;d[5]!==E||d[6]!==C||d[7]!==v?(a=e=>{let t=v[e];if(!t)return;let a=(0,p.Zl)({domain:"app"},`client/${t.id}${o.J.location.search}`);o.J.open(a,"_self"),C&&E((0,x.U)())},d[5]=E,d[6]=C,d[7]=v,d[8]=a):a=d[8];let M=a;d[9]!==k||d[10]!==M||d[11]!==N?(n=e=>{(0,c.y3)()||(0,h.VA)()||!(N.length>1)?(0,_.A)({currentTeamStore:(0,y.oK)(k),newWorkspaceId:e,navigateToRouteProps:{routeName:u.ov}}):M(e)},d[9]=k,d[10]=M,d[11]=N,d[12]=n):n=d[12];let R=n;return d[13]!==k||d[14]!==I||d[15]!==R||d[16]!==N||d[17]!==v?(i={teams:v,teamIds:N,currentTeamId:k,isNonMultiTeam:I,onTeamSelected:R},d[13]=k,d[14]=I,d[15]=R,d[16]=N,d[17]=v,d[18]=i):i=d[18],i}:()=>{let e=(0,l.wA)(),t=(0,g.d4)(A.V),a=(0,g.d4)(b.Kc),n=(0,m.cw)(f.getWorkspacesMeta)??s.t0,r=Object.values(n).sort((e,t)=>(0,d.Ay)(e.name,t.name)).filter(e=>e.id!==a);a&&r.unshift(n[a]);let E=!(0,c.y3)()&&!(0,h.VA)()&&r.length>1,C=(0,m.cw)(f.getAllWorkspaces),k=r.map(e=>e.id),v=(0,h.VA)()?C:k,S=(0,i.useCallback)(a=>{let r=n[a];if(!r)return;let i=(0,p.Zl)({domain:"app"},`client/${r.id}${o.J.location.search}`);o.J.open(i,"_self"),t&&e((0,x.U)())},[n,t,e]);return{teams:n,teamIds:v,currentTeamId:a,isNonMultiTeam:E,onTeamSelected:e=>{(0,c.y3)()||(0,h.VA)()||!(v.length>1)?(0,_.A)({currentTeamStore:(0,y.oK)(a),newWorkspaceId:e,navigateToRouteProps:{routeName:u.ov}}):S(e)}}};function _temp(e,t){return(0,d.Ay)(e.name,t.name)}function _temp2(e){return e.id}},0x52f61f28:(e,t,a)=>{"use strict";a.d(t,{e:()=>h});var n=a(0x801dea7a),r=a(0x1334bf7f0),i=a(0x1ec69ee01),l=a(0x12185e091),o=a(0x21dd74f4c),s=a(0x7fae732f),c=a(0x1edb6b65f),d=a(0xdf55e8f3),m=a(0xcc576ddd),u=a(0x217553e42),p=a(0x1067595c0);let h=(0,d.eI)(e=>{let t=0,a=0,d=0,h=0;for(let[n,_]of Object.entries((0,p.ty)(e))){let p=(0,u.OL)(e,n);if((0,l.JM)(p)){if(!_?.unreadHighlightCnt)continue;let a=(0,o.G)(e,n);(0,i.df)(p)||a&&!(0,r.R)(e)||(t+=_?.unreadHighlightCnt||0,d+=+!!_?.unreadHighlightCnt);continue}if("number"!=typeof _?.unreadCnt||"number"!=typeof _?.unreadHighlightCnt)continue;let f=(0,s.n)(e,p);(!(0,c.B)(e,f)||(0,m.f)(e,f))&&(a+=_.unreadCnt-_.unreadHighlightCnt,_.unreadHighlightCnt||(0,i.m2)(e,p)||(h+=+!!_?.unreadCnt))}return(0,n.Ty)(e)||(a+=t,t=0),{dmsBadgeCount:t,homeBadgeCount:a,conversationsBadgeCount:d,channelsWithoutMentionsCount:h}})},0x105b61a65:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>i});var n=a(0xbad225b5),r=a(0x1f525ac26);let ActivityListView=()=>n.createElement(r.A,null);ActivityListView.displayName="ActivityListView";let i=n.memo(()=>n.createElement(ActivityListView,null))},0x8f926d7a:(e,t,a)=>{"use strict";a.d(t,{S:()=>h});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x243435af9),s=a(0x2316c4def),c=a(0x1c2358c11),d=a(0x1ec68d6a3),m=a(0x226892387),u=a(0x181e01ee6),p=a(0x1fc66211c);let h=(0,n.DA)()?e=>{let t,a,n,h,_,f,b,g,y=(0,r.c)(26),A=(0,l.wA)(),x=e?.context===p.$.AGENT_BROWSER,E=(0,m.d4)(o.W);y[0]!==E||y[1]!==e?.includeTypes||y[2]!==e?.type?(t=E&&{type:e?.type,includeTypes:e?.includeTypes},y[0]=E,y[1]=e?.includeTypes,y[2]=e?.type,y[3]=t):t=y[3],y[4]!==t?(a={fetcher:s.D,args:{reason:"agents_sidebar",...t}},y[4]=t,y[5]=a):a=y[5];let{data:C,loading:k,error:v}=(0,c.L)(a);y[6]!==x?(n=e=>x?e.agentThreads.threadsForAgentBrowser:e.agentThreads.threads,y[6]=x,y[7]=n):n=y[7];let S=(0,m.d4)(n);y[8]!==S?(h=S.filter(_temp),y[8]=S,y[9]=h):h=y[9];let I=h;y[10]!==C?.threads||y[11]!==A||y[12]!==v||y[13]!==x?(_=()=>{v&&(0,d.Ay)({label:"AI-ALPHA-AGENTS-THREADS-LIST-FETCHER"}).error(v,void 0,{subtype:"ai.alpha.agents.threads.list"}),C?.threads&&A((0,u.oz)({threads:C?.threads,upsertAgentThreadsForAgentBrowser:x}))},y[10]=C?.threads,y[11]=A,y[12]=v,y[13]=x,y[14]=_):_=y[14];let w=C?.threads;return y[15]!==A||y[16]!==v||y[17]!==x||y[18]!==w?(f=[w,A,v,x],y[15]=A,y[16]=v,y[17]=x,y[18]=w,y[19]=f):f=y[19],(0,i.useEffect)(_,f),y[20]!==I?(b=I||[],y[20]=I,y[21]=b):b=y[21],y[22]!==v||y[23]!==k||y[24]!==b?(g={error:v,loading:k,threads:b},y[22]=v,y[23]=k,y[24]=b,y[25]=g):g=y[25],g}:e=>{let t=(0,l.wA)(),a=e?.context===p.$.AGENT_BROWSER,n=(0,m.d4)(o.W),{data:r,loading:h,error:_}=(0,c.L)({fetcher:s.D,args:{reason:"agents_sidebar",...n&&{type:e?.type,includeTypes:e?.includeTypes}}}),f=(0,m.d4)(e=>a?e.agentThreads.threadsForAgentBrowser:e.agentThreads.threads),b=(0,i.useMemo)(()=>f.filter(e=>!e.hidden),[f]);return(0,i.useEffect)(()=>{_&&(0,d.Ay)({label:"AI-ALPHA-AGENTS-THREADS-LIST-FETCHER"}).error(_,void 0,{subtype:"ai.alpha.agents.threads.list"}),r?.threads&&t((0,u.oz)({threads:r?.threads,upsertAgentThreadsForAgentBrowser:a}))},[r?.threads,t,_,a]),{error:_,loading:h,threads:b||[]}};function _temp(e){return!e.hidden}},0x1f9f7c77b:(e,t,a)=>{"use strict";a.d(t,{u:()=>i});var n=a(0x11c82607b),r=a(0x1ed65ccda);let i=(0,n.Ay)("Opens an Agent thread in the Agent view",async(e,t,a)=>{let{channelId:n,threadTs:i}=a;e((0,r.T)({channelId:n,threadTs:i,isSplitView:!1}))});i.meta={name:"openAgentThread",key:"createThunkOpenAgentThread",description:"Opens an Agent thread in the Agent view"}},0x61570498:(e,t,a)=>{"use strict";a.d(t,{X:()=>l});var n=a(0x807220a2),r=a(0x19bf376f9),i=a(0xbad225b5);let l=(0,n.DA)()?()=>{let e,t,a=(0,r.c)(3),[n,l]=(0,i.useState)(!0);a[0]===Symbol.for("react.memo_cache_sentinel")?(e=e=>{l(20>Math.floor("number"==typeof e?e:e.currentTarget?.scrollTop))},a[0]=e):e=a[0];let o=e;return a[1]!==n?(t={isAtTop:n,scrollHandler:o},a[1]=n,a[2]=t):t=a[2],t}:()=>{let[e,t]=(0,i.useState)(!0);return{isAtTop:e,scrollHandler:(0,i.useCallback)(e=>{t(20>Math.floor("number"==typeof e?e:e.currentTarget?.scrollTop))},[])}}},0x24192361b:e=>{e.exports={missingSlug:"missingSlug__HvNVx",linkText:"linkText__S8q2r",label:"label__dwWEF"}},0x205724f89:e=>{e.exports={wrapper:"wrapper__W3fKM",icon:"icon__RJBTp"}},0x13d8b077b:e=>{e.exports={container:"container__ERPRF",loadingOverlay:"loadingOverlay__Y9I_s"}},0xdc271f00:e=>{e.exports={container:"container__aQlR5",join_button_container:"join_button_container__pQLDu",join_button:"join_button__fXNDg"}},0x1d8817421:e=>{e.exports={label:"label__AG5Ow",selectAllCheckbox:"selectAllCheckbox__ktRtc"}},0xf9ae2e24:e=>{e.exports={tooltipSubtitle:"tooltipSubtitle__Yw08G"}},0x9740883e:e=>{e.exports={filterButton:"filterButton__e0XV7",filterButtonSelected:"filterButtonSelected__cJz2o",filterButtonMedium:"filterButtonMedium__xT9K2",iconWrapper:"iconWrapper__S82AW",caretDownWrapper:"caretDownWrapper__qZsBg"}},0x32439399:e=>{e.exports={button:"button__wZec1"}},0xdef09ef9:e=>{e.exports={bar:"bar__cFVGl"}},0x46692f66:e=>{e.exports={removeButton:"removeButton__ibHUw"}},0xb0e48f05:e=>{e.exports={group:"group__Jf2J0",container:"container__ZH2Yv",thumbnail:"thumbnail__nl0xz",suppressFixedWidth:"suppressFixedWidth__Yms5J",shouldShrinkUnderDefaultWidth:"shouldShrinkUnderDefaultWidth__zLea0",suppressFixedHeight:"suppressFixedHeight__yG9zk",compact:"compact__RYQ1O",expanded:"expanded__Owpm0",fullHeight:"fullHeight__wD_yd",autoHeight:"autoHeight__yVA2O",fullWidth:"fullWidth__ncI5F",withBorder:"withBorder__ZwJSn",withHover:"withHover__oCCmk",actionsBar:"actionsBar__Nlq8R",hide:"hide__Vqz3Q",show:"show__k1KEX",renderedInList:"renderedInList__Nosoj",isFirstInList:"isFirstInList__genPQ",isLastInList:"isLastInList__YFWRO",isSingleInList:"isSingleInList__vzJOR"}},0x1e8c87431:e=>{e.exports={loadingBox:"loadingBox__qwZKo"}},0x882cbbe9:e=>{e.exports={previewContainer:"previewContainer__l4HCb",withTopBorder:"withTopBorder__EtImq",withBottomBorder:"withBottomBorder__RMnBt",withPadding:"withPadding__jG5dP",centerContents:"centerContents__SJC6D"}},0x115dda929:e=>{e.exports={container:"container__yMOip",singleLabel:"singleLabel__MmVxe",removeLabelGap:"removeLabelGap__qFexl",text:"text__WHiUI",subtext:"subtext__bRFOq",loading:"loading__T9hNV",primaryLabelLoading:"primaryLabelLoading__hu3Vm",secondPartLoadingLabel:"secondPartLoadingLabel__Ruv8n"}},0x218975e5:e=>{e.exports={thumbnailContainer:"thumbnailContainer__Jp_0X",defaultContainerColors:"defaultContainerColors__hOoi7"}},0xf448cf7e:e=>{e.exports={listitem:"listitem__iBnNh",separator:"separator___Kknn"}},0x179bff8ac:e=>{e.exports={tag:"tag__F73Fg",micro:"micro__ufQ5F",informative:"informative___Au3z",inverseInformative:"inverseInformative__jOhkM",gray:"gray__P_KpL",horchata:"horchata__GE9aF",honeycomb:"honeycomb__vW5oW",flamingo:"flamingo__HTQJu",aubergine:"aubergine__CrLNc",indigo:"indigo__zz6qr",lagoon:"lagoon__FMGc9",jade:"jade__MbWl9",grass:"grass__OD9b3",themed:"themed__BDYpw"}},0x5355ab9e:e=>{e.exports={accountSwitcherRowShortcut:"accountSwitcherRowShortcut__oUmCT"}},0x6860251b:e=>{e.exports={wrapper:"wrapper__cT5FB"}},0x165e24b54:e=>{e.exports={container:"container__FhQFb",xSmall:"xSmall__rbnzo",small:"small__g0eYQ",medium:"medium__l8QoA",notificationDot:"notificationDot__ogpR5"}},0xc4ff06b2:e=>{e.exports={fileIconSearch:"fileIconSearch__aqSf0",productIconImg:"productIconImg__E24Z1"}},0x21955b88e:e=>{e.exports={widgetHeaderContainer:"widgetHeaderContainer__TMYTB"}},0x12908d5fe:e=>{e.exports={widgetIconContainer:"widgetIconContainer__ueDfm"}},0xed3181a2:e=>{e.exports={galleryContainer:"galleryContainer__ro7AE",filesContainer:"filesContainer__n7Ztn"}},0x13c579941:e=>{e.exports={overlay:"overlay__pTzVl"}},0x7de30fcd:e=>{e.exports={compact:"compact__OTGxp",thumbnailImageContainer:"thumbnailImageContainer__oS4t0",enabled:"enabled__yHbgy",processing:"processing__C5QiL",loading:"loading__qMnqI",error:"error__cdDri"}},0x4a5a4a6:e=>{e.exports={thumbnail:"thumbnail__idyiz",enabled:"enabled__Qum7T",processing:"processing__Mkmbw",loading:"loading__rE57c",error:"error__EoiAP",overlayContainer:"overlayContainer__WxpvR"}},0x1efcc1f7c:e=>{e.exports={base:"base__ae26e",thumbnail:"thumbnail__r1OKe",miniThumbnail:"miniThumbnail__NEZ6D",aubergine:"aubergine__XrwLL",aquarium:"aquarium__gnT9B",flamingo:"flamingo__XyrU5",gray:"gray__C14F6",jade:"jade__B3C2J",mojito:"mojito__HgmBO",ocean:"ocean__H_InP",tangerine:"tangerine__VfwXK",tomato:"tomato___izie"}},0x1b76a7dc5:e=>{e.exports={imageThumbnail:"imageThumbnail__oEZHn",processing:"processing__sozWj"}},0x1356f7294:e=>{e.exports={listThumbnail:"listThumbnail__Kn5Mo",listRecordThumbnail:"listRecordThumbnail__siCIU",listRecordThumbnailArchived:"listRecordThumbnailArchived__b5592",flexContainer:"flexContainer__GTlE6",withPadding:"withPadding__JW3J4",filePermissions:"filePermissions__BO_9p"}},0x1ce5a81fa:e=>{e.exports={listThumbnail:"listThumbnail__xrwPc",listRecordThumbnail:"listRecordThumbnail__cIAt0",listRecordThumbnailArchived:"listRecordThumbnailArchived__maUB0",container:"container__ro09v",header:"header__IJINF",expandedListRecordContent:"expandedListRecordContent__fXbAj",withPadding:"withPadding__PKOv7",fieldContainer:"fieldContainer__aKKVc",marginBottom:"marginBottom__WXX1V",fieldContainerAlignment:"fieldContainerAlignment__CTHs1",fieldLabel:"fieldLabel__OJcwO",fieldValue:"fieldValue__xGqGZ",emptyLabel:"emptyLabel__i7LXy",gridContainer:"gridContainer__FLRx1",snapshotBottomSizing:"snapshotBottomSizing___zV1u",gridRow:"gridRow__SfqVd",singleGridRow:"singleGridRow__nwbbZ",gridCell:"gridCell__MD_ll",columnHeader:"columnHeader__wf13k",gridCellEmpty:"gridCellEmpty__DwFlj",fieldRender:"fieldRender__qK6r3",listErrorPageContainer:"listErrorPageContainer__OMZdO",tasksGridContainer:"tasksGridContainer__jMwfv",gridCellCrossOut:"gridCellCrossOut__dxVis",boardContainer:"boardContainer__xOmes",tasksBoardContainer:"tasksBoardContainer__IRNVQ",boardLaneContainer:"boardLaneContainer__tLAfb",pGrouping_color__borderGray:"p-grouping_color__border--gray___SHOK",pGrid_cellCell_usability_updates:"p-grid_cell--cell_usability_updates__n47yi",pGrouping_color__borderBrown:"p-grouping_color__border--brown__hdA6h",pGrouping_color__borderOrange:"p-grouping_color__border--orange__ijnay",pGrouping_color__borderYellow:"p-grouping_color__border--yellow__eyLIr",pGrouping_color__borderGreen:"p-grouping_color__border--green__UZr1M",pGrouping_color__borderBlue:"p-grouping_color__border--blue__rYEwH",pGrouping_color__borderIndigo:"p-grouping_color__border--indigo__VNyGX",pGrouping_color__borderPurple:"p-grouping_color__border--purple__IoU7f",pGrouping_color__borderPink:"p-grouping_color__border--pink__cjYOE",pGrouping_color__borderRed:"p-grouping_color__border--red__bX_gz",pGrouping_color__borderCyan:"p-grouping_color__border--cyan__tYi6S",boardLaneHeaderWrapper:"boardLaneHeaderWrapper__TO0eP",boardLaneHeader:"boardLaneHeader__FcAXi",boardPrimaryField:"boardPrimaryField__p3A60",boardPrimaryFieldCrossOut:"boardPrimaryFieldCrossOut__t8aMV",listRecordEntityExpandedFooter:"listRecordEntityExpandedFooter__WJNSe",completedFooter:"completedFooter__blCJI",archivedFooter:"archivedFooter__UimEZ"}},0x8387d235:e=>{e.exports={compactRecord:"compactRecord__awe9D"}},0x7318ec06:e=>{e.exports={container:"container__b3XEK",fieldRow:"fieldRow__lgJVT",fieldLabel:"fieldLabel__kaTNB",fieldValue:"fieldValue__TEZcd",textBody:"textBody__gc1jb",noRecipientText:"noRecipientText__lA8G_",andOthers:"andOthers__XMvkP"}},0xeb1fd179:e=>{e.exports={header:"header__PZOzv",footer:"footer___oqMu",timestampWithRefresh:"timestampWithRefresh__Tcuzj",timestampContainer:"timestampContainer__bRDHE",timestampText:"timestampText__Jfxan",refreshButton:"refreshButton__dLxsd",hide:"hide__NFGyF",show:"show__pmY6T"}},0x2c4b53b6:e=>{e.exports={entityContentContainer:"entityContentContainer__a5vOo",withSmallPaddingBottom:"withSmallPaddingBottom__U5oHs",withLargePaddingBottom:"withLargePaddingBottom__OYHUx",fieldValue:"fieldValue__dUTaa",textDescription:"textDescription__ZfrbN",fieldContainer:"fieldContainer__H7ORf",fullWidth:"fullWidth__kDxSa",checkbox:"checkbox__LJxm6",disabled:"disabled__xFqX7",multiPicklist:"multiPicklist__W6RoF",fieldOption:"fieldOption__Ysnzm"}},0x28933e48:e=>{e.exports={content:"content__S_HMm",private:"private__UsW24",buttonContainer:"buttonContainer__tChHt",text:"text__GSoyB",caret:"caret__xIfSf"}},0x1a3980079:e=>{e.exports={metadataContainer:"metadataContainer__ZTIUL",expanded:"expanded__wSPRB",compact:"compact__ClzAf",withThumbnail:"withThumbnail__cKXKc",thumbnailImg:"thumbnailImg__iSB5U"}},0x20cbb047a:e=>{e.exports={templatePreview:"templatePreview__c8A3t",templateImage:"templateImage__3xpfI",templateImageCover:"templateImageCover__tBWa8",templateImageTop:"templateImageTop__beBdZ",templateImageBottom:"templateImageBottom__iihLo",previewContent:"previewContent__jwf3b",noPreviewMargin:"noPreviewMargin__bVqqd"}},0x144455081:e=>{e.exports={heroBannerWrapper:"heroBannerWrapper__CIz8D",heroBannerWrapperRoundBorders:"heroBannerWrapperRoundBorders__C3fxv",heroBannerFocusWrapper:"heroBannerFocusWrapper__wUSat",heroBannerCTAWrapper:"heroBannerCTAWrapper__gopMt",heroBannerButtonIcon:"heroBannerButtonIcon__G0To5",heroBannerTitleContainer:"heroBannerTitleContainer__fP1lh",heroBannerTitle:"heroBannerTitle__f4gjK",heroBannerTitleColumn:"heroBannerTitleColumn__fr3ME",heroBannerContent:"heroBannerContent__R_nMT",heroBannerContentColumn:"heroBannerContentColumn__UfaSN",heroBannerLeft:"heroBannerLeft__LQcAv",heroBannerLeftAddPaddingLeft:"heroBannerLeftAddPaddingLeft__SRrZh",heroBannerLeftAddPaddingRight:"heroBannerLeftAddPaddingRight__cgEWp",heroBannerLeftColumn:"heroBannerLeftColumn__NhZdo",heroBannerLeftFullWidth:"heroBannerLeftFullWidth__ucTI2",heroBannerRight:"heroBannerRight__ON0nY",heroBannerRightAddPaddingRight:"heroBannerRightAddPaddingRight__tHpRL",heroBannerPrimaryImg:"heroBannerPrimaryImg__i8uAV",heroBannerPrimaryImgFullHeight:"heroBannerPrimaryImgFullHeight___xFYj",heroBannerPrimaryImgMini:"heroBannerPrimaryImgMini__Hovy1",heroBannerPrimaryVideo:"heroBannerPrimaryVideo__XQGgx",heroBannerBackgroundHorchata:"heroBannerBackgroundHorchata__k1X26",heroBannerBackgroundHorchataGradient:"heroBannerBackgroundHorchataGradient__gvvhk",heroBannerBackgroundLagoon:"heroBannerBackgroundLagoon__ruZXd",heroBannerBackgroundLagoonGradient:"heroBannerBackgroundLagoonGradient___4s3F",heroBannerBackgroundMojito:"heroBannerBackgroundMojito__h7i3f",heroBannerBackgroundMojitoGradient:"heroBannerBackgroundMojitoGradient__aPUzg",heroBannerBackgroundGray:"heroBannerBackgroundGray__Jwwq7",heroBannerBackgroundGrayGradient:"heroBannerBackgroundGrayGradient__QxP90",heroBannerBackgroundCampfire:"heroBannerBackgroundCampfire__L8tjq",heroBannerBackgroundCampfireGradient:"heroBannerBackgroundCampfireGradient__mHFNf",heroBannerBackgroundSunflower:"heroBannerBackgroundSunflower__qCwBz",heroBannerBackgroundSunflowerGradient:"heroBannerBackgroundSunflowerGradient__bXpX_",heroBannerBackgroundRose:"heroBannerBackgroundRose__O3ZjK",heroBannerBackgroundRoseGradient:"heroBannerBackgroundRoseGradient__E5pl0",heroBannerBackgroundTheme:"heroBannerBackgroundTheme__fZefc",heroBannerBackgroundThemeGradient:"heroBannerBackgroundThemeGradient__uosng"}},0x1407d15fa:e=>{e.exports={heroBannerContainer:"heroBannerContainer__TtkoU",heroBannerContainerColumn:"heroBannerContainerColumn__v0VlJ",heroBannerCloseButton:"heroBannerCloseButton__Icw5x"}},0x19f4f8a7c:e=>{e.exports={table:"table__CBWOJ",tableMargin:"tableMargin__PMmD9",cell:"cell__momkv",cellRight:"cellRight__ARYOE",cellCenter:"cellCenter__irlJF",cellNowrap:"cellNowrap__yMMm8",cellBold:"cellBold__nd7N4",editableCell:"editableCell__KRdAX"}},0x105ceccf1:e=>{e.exports={tableauEmbedContainer:"tableauEmbedContainer__ShjeJ",isFullSizePreview:"isFullSizePreview__w7sDh",liveDashboardOrVisualization:"liveDashboardOrVisualization__EmNHw",tableauEmbedContainerError:"tableauEmbedContainerError__zU3n2",tableauEmbed:"tableauEmbed__onCYE",rendered:"rendered__EzCZk",loadingContainer:"loadingContainer__kO8T3",tableauEmbedLoader:"tableauEmbedLoader__NFOEY",swipeAnimation:"swipe-animation__WSdpM",analyticsMetricContainer:"analyticsMetricContainer__CI5uq",hidden:"hidden__qbd90",analyticsMetricViewerContainer:"analyticsMetricViewerContainer__uDQ4g",analyticsMetricTimestamp:"analyticsMetricTimestamp__iIf3N"}},0x24e61ced2:e=>{e.exports={tableauCompactEntity:"tableauCompactEntity__oy6_Z"}},0x1ece179fb:e=>{e.exports={errorContainer:"errorContainer__KABim",previewErrorContainer:"previewErrorContainer__CRN77",errorTitle:"errorTitle__Jn24G",errorDescription:"errorDescription__AlaJR",tableauIcon:"tableauIcon__j9mk6"}},0x21b6d97ec:e=>{e.exports={headerContainer:"headerContainer__hXvoe",tableauThumbnail:"tableauThumbnail__Kglbw",timestampContainer:"timestampContainer__VyX4E"}},0x1f8a63054:e=>{e.exports={dashboardContainer:"dashboardContainer__R77Kn",tableauContainer:"tableauContainer__Zomhb",loadedStaticEmbed:"loadedStaticEmbed__qnVDf",staticContainer:"staticContainer__mtMjm",blocked:"blocked__E_oum",isStaticMetric:"isStaticMetric__p3CUI",fileCardPreview:"fileCardPreview__H_N2H",previewImg:"previewImg__qd__w",allowHiddenVerticalOverflow:"allowHiddenVerticalOverflow__T1ZkT",insightsContainer:"insightsContainer__k_HvU",tableauMetricInfo:"tableauMetricInfo__FFVIO",tableauMetricValueBadgeContainer:"tableauMetricValueBadgeContainer__aBDY3",tableauMetricValue:"tableauMetricValue__tuRze",tableauUnfurlText:"tableauUnfurlText__i08zP",tableauMetricBadge:"tableauMetricBadge__rdj9W",negativeSentiment:"negativeSentiment__RENv5",neutralSentiment:"neutralSentiment__lmTRr",positiveSentiment:"positiveSentiment__LTlPS",footerContainer:"footerContainer__bpiWz",tableauExpandedEntity:"tableauExpandedEntity__Njchp",isLive:"isLive__TGJ2S",actionBarDivider:"actionBarDivider__sc1RO",actionBarTextButtonText:"actionBarTextButtonText__aWuaf",actionBarTextButton:"actionBarTextButton__Cl99t"}},0x1631ca244:e=>{e.exports={header:"header__VmPPI",entityTitle:"entityTitle__xV7YX",entityIconWrapper:"entityIconWrapper__R2WbE",entityIcon:"entityIcon__zdttm",tabMenu:"tabMenu__prR8l",emptyState:"emptyState__fqoxw",tableauAnchor:"tableauAnchor__d1PZW",flexpane:"flexpane__BZ1Ng"}},0x22a286f97:e=>{e.exports={container:"container__RIdXv",fileViewerWrapper:"fileViewerWrapper__BSDRv",white:"white__sS6Zr",isLive:"isLive__Y5vkB",previewContextContainer:"previewContextContainer__D6sU0",title:"title__Xz0lG",relatedThreadsTitle:"relatedThreadsTitle__U7FX6",tableauIconContainer:"tableauIconContainer__yUNzt",flexpaneWrapper:"flexpaneWrapper__oT5J1",flexpaneTitle:"flexpaneTitle__xuCWi",appName:"appName__sDabh",preview:"preview__Ut4vr",previewImg:"previewImg__hTiIr",token:"token__oCp_t",dashboardPreviewImg:"dashboardPreviewImg__UuilU",detailsBody:"detailsBody__x_iZ9",appIcon:"appIcon__lEZ83",flexpaneLoadingTitle:"flexpaneLoadingTitle__QgAZI",flexpaneSpinnerWrapper:"flexpaneSpinnerWrapper___OXNU",filterText:"filterText__LYd6T",flexpaneFullWidth:"flexpaneFullWidth__f3lEQ"}},0x10f15d8cd:e=>{e.exports={modal:"modal__ZBYrZ",modalHeader:"modalHeader__YI0Iy",madlibsContainer:"madlibsContainer__pS22s",madlibsSentence:"madlibsSentence__VHjWU",contentContainer:"contentContainer__DwHPj",contentSection:"contentSection__Tqkos",footer:"footer__KdcPP",bookmarkWorkflow:"bookmarkWorkflow__NUyEE"}},0x218a194a7:e=>{e.exports={highlight:"highlight__AgbNW",cLinkButton:"c-link--button__hAYZR",darkTheme:"darkTheme__lQt3n",wrap:"wrap__u6qzk",active:"active__XOa5i",invalid:"invalid__K3q1Y",subtext:"subtext__Y7IFF",title:"title__JVnZx",header:"header__UUZBt",headerForm:"headerForm__o25fJ"}},0x20313a508:e=>{e.exports={listStepTitle:"listStepTitle__RdWrx",listStepContainer:"listStepContainer__nBFLA",listStepHeader:"listStepHeader__kzI1I",listStepHeaderTitle:"listStepHeaderTitle__b_HqA",listStepHeaderLink:"listStepHeaderLink__QGEoB",listStepItemContainer:"listStepItemContainer__mmiDq",listStepItem:"listStepItem__Az25X",listStepItemTitle:"listStepItemTitle__b2kk7"}},0x1624613c2:e=>{e.exports={label:"label__oOWfK",card:"card__Jl0f3",header:"header__BvufU",headerContent:"headerContent__dmwFS",headerTitle:"headerTitle__XfAyo",headerSubtitle:"headerSubtitle__sDeJ6",headerLinkIcon:"headerLinkIcon__VsFJB",content:"content__PqXPX",contentNoOverflow:"contentNoOverflow__rvS2f",table:"table__hstkQ",variableToken:"variableToken__fRrzf",tableRow:"tableRow__qjSnr",tableCell:"tableCell__c02Ma",tableCellDummy:"tableCellDummy__Jkv9u",missingText:"missingText__oRXRO",missingVariableText:"missingVariableText__KIVZ3",tableContainer:"tableContainer__o9z6l",regenBtn:"regenBtn__TCA6M"}},0xc8c4bccf:e=>{e.exports={questionsList:"questionsList__VUpRk",formActionsContainer:"formActionsContainer__zkUjh",formEditButton:"formEditButton__eUxyv",formPreviewButtonContainer:"formPreviewButtonContainer__w8TmO"}},0x75c1beca:e=>{e.exports={formPreviewButtonSpacing:"formPreviewButtonSpacing__oUe2W",questionsList:"questionsList__ZqaNA",formActionsContainer:"formActionsContainer__gokT4",formEditButton:"formEditButton__zv6GH",formPreviewButtonContainer:"formPreviewButtonContainer__YLgvL"}},0x11bdcf6d0:e=>{e.exports={cropper:"cropper__AVXBL"}},0x777b1e7d:e=>{e.exports={error_container:"error_container__KGtM0",error_text:"error_text__WJQC7",modal_main_content:"modal_main_content__TuQGS"}},0x1e0e21463:e=>{e.exports={container:"container__zv_9n",itemPreview:"itemPreview__NvpW6",itemPreviewScheduledTrigger:"itemPreviewScheduledTrigger__TrLau",itemPreviewIconChannelJoinTrigger:"itemPreviewIconChannelJoinTrigger__fIdya",itemPreviewIconReactjiTrigger:"itemPreviewIconReactjiTrigger__ehiXv",itemPreviewIconLinkTrigger:"itemPreviewIconLinkTrigger__oVLet",itemPreviewSendMessageStep:"itemPreviewSendMessageStep__pKEPI",itemPreviewSendDMStep:"itemPreviewSendDMStep__oVA9I",itemPreviewReplyInThreadStep:"itemPreviewReplyInThreadStep__gAQap",itemPreviewOpenFormStep:"itemPreviewOpenFormStep__t5v1a",divider:"divider__QOSgL"}},0x19e82e86:e=>{e.exports={noPadding:"noPadding__K3Plj",subheader:"subheader__oOBT0"}},0x216054933:e=>{e.exports={pollIcon:"pollIcon__QEauw",pollIconDark:"pollIconDark__ptWiL"}},0x6f2766a4:e=>{e.exports={questionHeader:"questionHeader__oGm_x",questionGroup:"questionGroup__jBr3k",question:"question__NrfFc",votes:"votes__RiSGx",author:"author__T7W1_",member:"member__tZ8lk"}},0x516421e2:e=>{e.exports={pollViewer:"pollViewer__FAhkQ",pollViewerInCanvas:"pollViewerInCanvas__Rq6V6",title:"title__DEKQ_",instructions:"instructions__tJYHm",choiceButton:"choiceButton__aCA7h",choiceHeader:"choiceHeader__GW8Vh",vote:"vote__FGm0x",voteActive:"voteActive__lsasE",choiceLabelActive:"choiceLabelActive__yd6N4",progressBar:"progressBar__hiRlq",progress:"progress__tpvS7",progressActive:"progressActive__cIDrz",facepile:"facepile__Xujd3",viewAll:"viewAll__tyR_u"}},0x1083c8470:e=>{e.exports={non_existent_record:"non_existent_record__DCDTm",non_existent_record_no_image:"non_existent_record_no_image__Vm2uV",non_existent_record_emoji:"non_existent_record_emoji__iuBRK",non_existent_record_title:"non_existent_record_title__meT42"}},0x4e42a58a:e=>{e.exports={modal:"modal__XDryN",modalHeader:"modalHeader__kDdbf",fromName:"fromName__tH3JN",modalBody:"modalBody__KQ8lz",fileName:"fileName__Vw8jV",errorMessage:"errorMessage__K2S6s",buttonContainer:"buttonContainer__CwdeJ",link:"link__GXPlb"}},0x219c3727d:e=>{e.exports={fileAttachment:"fileAttachment__TTURl",fileAttachmentBlocked:"fileAttachmentBlocked__CHGdZ",iconContainer:"iconContainer__saSUZ"}},0xdacd9bc3:e=>{e.exports={title:"title__XA5L5",subtitle:"subtitle__OK5RT",footerCtas:"footerCtas__tAbqL"}},0xccb7b166:e=>{e.exports={modal:"modal__qcXVU",content:"content__l5q5q",header:"header__HL68T",errorContent:"errorContent__wFvVG",errorTitle:"errorTitle__vVeZ9",newWindowButton:"newWindowButton__ZPsKE",titleContainer:"titleContainer__UV88q",titleIcon:"titleIcon__jGBT_",subtitle:"subtitle__PeLA2",emailModalContent:"emailModalContent__piJEn",emailComposerEnabled:"emailComposerEnabled__UyB1w",loadingSpinner:"loadingSpinner__uDXsh",emailHistory:"emailHistory__XVIQA",replySection:"replySection__UVYtk",emailComposer:"emailComposer__ZJoBp",emailComposerEmptyEmailThread:"emailComposerEmptyEmailThread__mK72V",replySectionEmptyEmailThread:"replySectionEmptyEmailThread__XKBse",modalChildWindow:"modalChildWindow__n75Ss",modalChildWindowTitle:"modalChildWindowTitle__UVG5j",modalChildWindowContent:"modalChildWindowContent__CuK3k",loaderRow:"loaderRow__OdwiO",inlineErrorRow:"inlineErrorRow__egrU_"}},0x1b66e7465:e=>{e.exports={container:"container__ejtlb",header:"header__m5y3r",avatar:"avatar__NUBqF",headerContent:"headerContent__ZoXTe",toFromSection:"toFromSection__EkliF",sender:"sender__NxJAA",recipients:"recipients__mZgHG",previewTimestamp:"previewTimestamp__eT6_P",date:"date__meZ8v",bodyWrapper:"bodyWrapper__y1NZl",body:"body__es9pP",bodyFade:"bodyFade__dnv81",expandBodyLink:"expandBodyLink__AlnUt",attachmentsHeader:"attachmentsHeader__WZrkw",attachmentsCollapseButton:"attachmentsCollapseButton__flO3I",viewAllAttachmentsLink:"viewAllAttachmentsLink__i5_wg",attachmentsBody:"attachmentsBody__MKCEO",previewActions:"previewActions__vrf8o",previewActionsHidden:"previewActionsHidden__flwez",previewTimestampHidden:"previewTimestampHidden__O5_fx"}},0x3be338f2:e=>{e.exports={avatarContainer:"avatarContainer__w43Dz",avatarIconContainer:"avatarIconContainer__PKWPn"}},0x1b3054a4a:e=>{e.exports={record_breadcrumbs:"record_breadcrumbs__ErsaA",record_breadcrumb:"record_breadcrumb__cEZEJ",record_breadcrumb_label:"record_breadcrumb_label__LDBB9"}},0x14abaa6da:e=>{e.exports={record_channel_details:"record_channel_details__Nv91V",record_channel_details_heading:"record_channel_details_heading__VZ4qZ",record_channel_details_info:"record_channel_details_info__Nr59C",record_channel_details_breadcrumbs:"record_channel_details_breadcrumbs__rNqu5"}},0xabd39208:e=>{e.exports={record_channel_foreword:"record_channel_foreword__CqS0y",record_channel_foreword_image_container:"record_channel_foreword_image_container__pIRFS",record_channel_foreword_image:"record_channel_foreword_image__cy0N_",record_channel_foreword_title:"record_channel_foreword_title__GflAH",record_channel_foreword_description:"record_channel_foreword_description__NY22T"}},0x1337b4a0:e=>{e.exports={record_channel_name_tooltip_content_record_breadcrumbs:"record_channel_name_tooltip_content_record_breadcrumbs__AJkYo",record_channel_name_tooltip_content_record_breadcrumbs_container:"record_channel_name_tooltip_content_record_breadcrumbs_container__FFYub"}},0x1d0dac6e2:e=>{e.exports={headerContainer:"headerContainer__wYEFO",modalIllustration:"modalIllustration__PNYAK",modalIllustrationRequestSent:"modalIllustrationRequestSent__TG13G"}},0x325072cc:e=>{e.exports={badge:"badge__mEdwX"}},0x1d2aa0320:e=>{e.exports={badge:"badge__kOmhv",section:"section__yWOG1"}},0x22bbc5c16:e=>{e.exports={modal:"modal__nk2uD",content:"content__i6vo3",footer:"footer__ECapw",header:"header__Yjbsq"}},0x2354af51:e=>{e.exports={bannerContainer:"bannerContainer__W5Nks"}},0x16c59013b:e=>{e.exports={loadingSpinner:"loadingSpinner__hyV_m",emptyState:"emptyState__hwvaL",container:"container__ExDJM",bottomPadding:"bottomPadding__hK_UZ",gridOverlay:"gridOverlay__K9GvG",bottomFade:"bottomFade__eg1DC",gridContainer:"gridContainer__gjrM9",gridRow:"gridRow__PfRmg",gridCell:"gridCell__CplbS",columnHeader:"columnHeader__NTnPD",recordIcon:"recordIcon__Wd6RV"}},0x2dbddb48:e=>{e.exports={loadingSpinner:"loadingSpinner__cncBE",emptyState:"emptyState__q4Eem"}},0xbe93ca1c:e=>{e.exports={record_type_badge:"record_type_badge__OdKzy"}},0x1727bf0da:e=>{e.exports={recordTypeIcon:"recordTypeIcon__kuwEY",skClientThemeDark:"sk-client-theme--dark__FoTug",grayTone:"grayTone__U8bOz",grayToneInverse:"grayToneInverse___IRtk"}},0x209a696ae:e=>{e.exports={record_channel_creation_modal_conversion_select_label:"record_channel_creation_modal_conversion_select_label__wOqWy",record_channel_creation_modal_conversion_speedbump_description:"record_channel_creation_modal_conversion_speedbump_description__JmU5J",record_channel_creation_modal:"record_channel_creation_modal__wpazM",record_channel_creation_modal_header:"record_channel_creation_modal_header__lnUxx",record_channel_creation_modal_content:"record_channel_creation_modal_content__Ip1fy",record_channel_creation_modal_footer:"record_channel_creation_modal_footer__kvGMg",record_channel_creation_modal_radio_group:"record_channel_creation_modal_radio_group__RFRZg",record_channel_creation_modal_radio_card:"record_channel_creation_modal_radio_card__WSkq9",record_channel_creation_modal_radio_card_label:"record_channel_creation_modal_radio_card_label__dZ8FU",record_channel_creation_modal_radio_card_image:"record_channel_creation_modal_radio_card_image__qaSen",record_channel_creation_modal_radio_card_image_disabled:"record_channel_creation_modal_radio_card_image_disabled__z_wuk"}},0xb9f658b0:e=>{e.exports={alertContainer:"alertContainer__aJ7SE",link:"link__AHgmC"}},0x1f148ad6d:e=>{e.exports={footerActions:"footerActions__A0vlS",infoText:"infoText__vrVh7",shareContactsFooterButton:"shareContactsFooterButton__fjI4I",listSalesforceUsers:"listSalesforceUsers__RTt0n",salesforceTitleBar:"salesforceTitleBar__uRjvg",licenseText:"licenseText__Bg9Gl",wideShareModal:"wideShareModal__hrMCr",loadingModal:"loadingModal__SjKEa",userProfileSelectContainer:"userProfileSelectContainer__sB17U",userProfileSpinner:"userProfileSpinner__VuPav"}},0x1de419498:e=>{e.exports={content:"content__u_UuG"}},0x1d6165588:e=>{e.exports={header_record_type_badge:"header_record_type_badge__ZHyG0"}},0x1a90217b8:e=>{e.exports={modalBody:"modalBody__OX6bj"}},0x1703fd552:e=>{e.exports={searchSelectContainer:"searchSelectContainer__3nisH",scopeableSearchSelect:"scopeableSearchSelect__pbuWN",scopeSelectorButton:"scopeSelectorButton__Ua570",regularHintElement:"regularHintElement__e9ENK",noScopeHint:"noScopeHint__xsppu",disabledSearchBar:"disabledSearchBar__WfyBx",disabledWithoutHints:"disabledWithoutHints__YBU2C",lockIcon:"lockIcon__CRXLx",errorContent:"errorContent__hwUCI",errorText:"errorText__Dn2Dz",errorIcon:"errorIcon__o7JoW",loadingRow:"loadingRow__Zu9_n",scopeSelectorLink:"scopeSelectorLink__PM4XB",active:"active__qzjpD"}},0xf962ece8:e=>{e.exports={scopeMenu:"scopeMenu__NFxMz",inputContainer:"inputContainer__M2NTb",hint:"hint__Qm31n",menuItem:"menuItem__CfWj1",checked:"checked__TTrK0"}},0xeb1fef96:e=>{e.exports={option:"option__PuNtm"}},0x86a74e1:e=>{e.exports={field:"field__CjmDT",editableContentContainer:"editableContentContainer__EJCh2",vertical:"vertical__wyK53",horizontal:"horizontal__frNjb",medium:"medium__IxtEd",large:"large__YJu9W",showLockOnHover:"showLockOnHover__XsF8T",error:"error__d7WNH",placeholderLock:"placeholderLock__Fxfw3",alert:"alert__nSn4A"}},0x15525222f:e=>{e.exports={labelContainer:"labelContainer___2S0d",label:"label__IsjoQ",vertical:"vertical__Vd_p0",medium:"medium__E7Lay",horizontal:"horizontal__gXxNp",large:"large__yt0Z4",labelText:"labelText__TVwx1",requiredAsterisk:"requiredAsterisk__EKIfO"}},0x197bfc8cc:e=>{e.exports={requiredLegend:"requiredLegend__yXhIE",requiredAsterisk:"requiredAsterisk__K1bvY"}},0xef5f4ac9:e=>{e.exports={placeholder:"placeholder__CoXZx"}},0x17ce2eea8:e=>{e.exports={multiPicklist:"multiPicklist__nxrJ8",fieldOption:"fieldOption__qXbLQ"}},0xf2d37b2a:e=>{e.exports={addRecordOption:"addRecordOption__oc9YO",accountName:"accountName__sov5T"}},0x173e58c5b:e=>{e.exports={baseEntity:"baseEntity__oRekn",baseEntityWithIconAvatar:"baseEntityWithIconAvatar__UXvTj",avatarIcon:"avatarIcon__vI3f3",slackIcon:"slackIcon__WB6eK",text:"text__Yoo4C",subtext:"subtext__aEsYi",subtextActive:"subtextActive__QCu9I"}},0x210bb1c6f:e=>{e.exports={string:"string__Ev1nV"}},0x19336f998:e=>{e.exports={unfurlRichText:"unfurlRichText__KrgOL",string:"string__i0N7a"}},0x24ba8eead:e=>{e.exports={withNewLines:"withNewLines__fBwXw"}},0xe1b0970:e=>{e.exports={unfurlRichText:"unfurlRichText__k9sM3",textArea:"textArea__bwMUC"}},0xb27fe48e:e=>{e.exports={hyperlinkColor:"hyperlinkColor__mpeRf",wrap:"wrap__DsJcK"}},0x1210bf555:e=>{e.exports={lockIcon:"lockIcon__NVNba"}},0x164322fc9:e=>{e.exports={modal:"modal__NTG0m",container:"container__DilSi",flexContainer:"flexContainer__eqR2y",textarea:"textarea___0pXc",instructionsContainer:"instructionsContainer__fbl40",instructionsRewriteLoadingText:"instructionsRewriteLoadingText__Vjj4l",instructionsControls:"instructionsControls__RtBHK",toggleContainer:"toggleContainer__sbSAK",toggleRow:"toggleRow__h4HQz",toggleLabelContainer:"toggleLabelContainer__BgdHo",toggleLabel:"toggleLabel__QsyzI",knowledgeLabel:"knowledgeLabel__edEcv",tabs:"tabs__IkJ6i",errorContainer:"errorContainer__vMavh"}},0x222072683:e=>{e.exports={cropperSection:"cropperSection__U1ohr",previewSection:"previewSection__x5g3M",previewLabel:"previewLabel__J9fZZ",previewContent:"previewContent__VSLMd",preview:"preview__DtqY0",previewName:"previewName__Nl17G",errorAlert:"errorAlert__tifH1",imageCropPlaceholder:"imageCropPlaceholder__VOhZs"}},0x16515e22e:e=>{e.exports={avatar:"avatar__NRHYA",container:"container__ayCaf",buttons:"buttons__L7MFd"}},0x1d908beff:e=>{e.exports={previewEmptyState:"previewEmptyState__eVAYV",previewEmptyStateTitle:"previewEmptyStateTitle__dBW9u",previewEmptyStateText:"previewEmptyStateText___zlQ4"}},0x191567947:e=>{e.exports={previewContainer:"previewContainer__JEC9v",hasConversation:"hasConversation__kykoY",messageInputContainer:"messageInputContainer__xCRDV",preview:"preview__TUKha",conversationHistory:"conversationHistory__Ee3gs",message:"message__kbY8Y",firstMessage:"firstMessage__Ts3zC"}},0xe97344d1:e=>{e.exports={root:"root__Tvd7A"}},0x1349ade65:e=>{e.exports={asset:"asset__c04Cs",body:"body__gTrpJ"}},0x2198565e6:e=>{e.exports={questionItem:"questionItem__Ib0XG",questionItemPreviewBtn:"questionItemPreviewBtn__Vgzju",invalidQuestion:"invalidQuestion__IDuRA",questionItemPreview:"questionItemPreview__nhKYw",icon:"icon__jIRU1",questionInfo:"questionInfo__BZiXo",labelContainer:"labelContainer__WooRB",label:"label___o8oJ",optional:"optional__kXjkm",questionType:"questionType__n8X4u",caretDownIcon:"caretDownIcon__q8j2h",questionItemEdit:"questionItemEdit__Nv9IG",questionLabelInput:"questionLabelInput__ScHZU",questionDescriptionInput:"questionDescriptionInput__oOSg3",questionOptionRow:"questionOptionRow__Z6qv6",optionsInput:"optionsInput__PtZMf",textInput:"textInput__zYk0k",optionsDeleteIcon:"optionsDeleteIcon__KxfCp",questionAddtionalInfoRow:"questionAddtionalInfoRow__Y18vX",deleteBtn:"deleteBtn__niP67",questionList:"questionList__APEwk",secondarySelectorLabel:"secondarySelectorLabel__cGcGO",secondarySelector:"secondarySelector__wbyl_"}},0x22ce0af5f:e=>{e.exports={add_tab_menu_trigger_icon:"add_tab_menu_trigger_icon__CPMY1",add_tab_menu_trigger_icon_open:"add_tab_menu_trigger_icon_open__ELogN",add_tab_menu_trigger:"add_tab_menu_trigger__uKUXm",add_tab_menu_trigger_content:"add_tab_menu_trigger_content__zB576",add_tab_menu_list_item_emoji:"add_tab_menu_list_item_emoji__sS93N",add_tab_menu_cta:"add_tab_menu_cta__JSHyh",do_more_with_pro:"do_more_with_pro__H0rKo",add_tab_pro_badge:"add_tab_pro_badge__nR1V2",try_template_badge:"try_template_badge__CW5dK"}},0x18431be77:e=>{e.exports={channel_tab_label:"channel_tab_label__WjErI",channel_tab_document_label:"channel_tab_document_label__xSKTO",channel_tab_label_text:"channel_tab_label_text__aZZ9f",channel_tab_label_disabled:"channel_tab_label_disabled__DxdRC",channel_tab_label_icon:"channel_tab_label_icon__JGc8y",channel_tab_label__animated_avatar:"channel_tab_label__animated_avatar__Cw0gg"}},0x220569946:e=>{e.exports={addTab:"addTab__brBMy",addTabIcon:"addTabIcon__vyd_2",addTabIconOpen:"addTabIconOpen__a9wyx",addTabNoAnimation:"addTabNoAnimation__nR0az",addChannelFolderNux:"addChannelFolderNux__qzjPZ",toolTipSecondaryText:"toolTipSecondaryText__vgG6C"}},0x23f4759d:e=>{e.exports={channelTabsAddCanvasCoachmark:"channelTabsAddCanvasCoachmark__qMgTQ",cCoachmark__fadein:"c-coachmark__fadein__bZT_Q"}},0x132d4c7bf:e=>{e.exports={overflow_label:"overflow_label__Ga2um",draggable_overflow_menu:"draggable_overflow_menu__Cv0mO",is_menu_hidden:"is_menu_hidden__mtAUJ",draggable_overflow_menu_hovered:"draggable_overflow_menu_hovered__XPZPh"}},0xfbbace2d:e=>{e.exports={draggable_tabs:"draggable_tabs__EkD8o",draggable_tabs_container:"draggable_tabs_container__AGMar",draggable_tab:"draggable_tab__uEikv",draggable_tab_hidden:"draggable_tab_hidden__aV0pg",cTabs__tab_overflow:"c-tabs__tab_overflow__oGPB_",cIcon_buttonDefault:"c-icon_button--default__JqHZs",cButtonUnstyled:"c-button-unstyled__mcnWI",cTabs__tabActive:"c-tabs__tab--active__EKka8",cButtonFocusVisible:"c-button--focus-visible__QmTY9",cTabs__tab_overflow_menu_item:"c-tabs__tab_overflow_menu_item__bOnhW",cMenu_item__icon:"c-menu_item__icon__BsgI2",draggable_tabs_nux:"draggable_tabs_nux__rQQCw",resource_tabs_nux:"resource_tabs_nux__qzK31",cCoachmark__highlight:"c-coachmark__highlight__LYdk0",draggable_tabs_children:"draggable_tabs_children__z9CcH",channel_tab_dragging:"channel_tab_dragging__rA_nP",channel_tab_hovered:"channel_tab_hovered__kzosn",channel_tab_folder_hovered:"channel_tab_folder_hovered__DmNu7",channel_tab_menu_item_hovered:"channel_tab_menu_item_hovered__WfTtZ",channel_tab_menu_item_hovered_bottom__last_item:"channel_tab_menu_item_hovered_bottom__last_item__a4HDN",channel_tab_menu_item_hovered_top__last_item:"channel_tab_menu_item_hovered_top__last_item__xnm2H",channel_tab_hovered_left__last_visible_tab:"channel_tab_hovered_left__last_visible_tab__lpLzh",channel_tab_hovered_right__last_visible_tab:"channel_tab_hovered_right__last_visible_tab__Z1y85",channel_tab_is_dragging:"channel_tab_is_dragging__lLlrh",message_file_attachment_label:"message_file_attachment_label__CArFP",productIconImg:"productIconImg__KMp0H",link_label:"link_label__lkIAU"}},0x197f580ad:e=>{e.exports={inputContainer:"inputContainer__jnuDH",clearButton:"clearButton__m92BY"}},0x2347ae009:e=>{e.exports={container:"container__VcU8d",folderTabDragOverlayOverlayTransition:"folderTabDragOverlayOverlayTransition__QxDr9",info:"info__Xh5JK",title:"title__boi2V",subtitle:"subtitle__HxiGX",anim:"anim__sDAyr",animCircle:"animCircle__MI841",folderTabCircleAnim:"folderTabCircleAnim__OuaMy",animCard03:"animCard03__E8BNG",folderTabCard3Anim:"folderTabCard3Anim__AEIdZ",animCard02:"animCard02__jsTOr",folderTabCard2Anim:"folderTabCard2Anim__Girg9",animCard01:"animCard01__mXbxS",folderTabCard1Anim:"folderTabCard1Anim__eVp8L",containerNight:"containerNight__dzrMy",blockFilesEsc:"blockFilesEsc__uaeH6"}},0xdaeae807:e=>{e.exports={container:"container__Itvf4",containerPadding:"containerPadding__v2oe4",containerCkaEmpty:"containerCkaEmpty__tGGXI",listContainer:"listContainer__Xk4ll",skeletonListContainer:"skeletonListContainer__WyQyd",skeletonListContainerChannelFolder:"skeletonListContainerChannelFolder__uS0Pe",ckaListContainer:"ckaListContainer__sbsKk",heading:"heading__TmeMj",headingChannelFolders:"headingChannelFolders__itAUi",headingChannelKnowledge:"headingChannelKnowledge__lHgbX",addToChannelFolderButton:"addToChannelFolderButton__VXZ7M",entityContainer:"entityContainer__NkZZy",emptyContainer:"emptyContainer__GsJVK",emptyTitle:"emptyTitle__BgCgm",emptyCTA:"emptyCTA__Q57z3",info:"info__SN2Gf",workflowsAlert:"workflowsAlert__n89oE",emptyStateFolderIcon:"emptyStateFolderIcon__aGXwF",editIcon:"editIcon__fiv_j",editButton:"editButton__j4fSI",basicContainer:"basicContainer__sCWEm",emptyFooter:"emptyFooter__DhB7Z",actionsButtonUnifiedFiles:"actionsButtonUnifiedFiles__hjIsv",viewOnly:"viewOnly__MXQza",viewOnlyInner:"viewOnlyInner__m1THs",fileUploadBanner:"fileUploadBanner__xgRNj",pendingFile:"pendingFile__xCxJg",addToChannelFolderButtonPeek:"addToChannelFolderButtonPeek__VdGsR"}},0x221261d6a:e=>{e.exports={draggable_tabs_container:"draggable_tabs_container__pMCrv",unread:"unread__xAF7Y"}},0x1accaaf20:e=>{e.exports={invitationsView:"invitationsView__MD8Q1",listHeader:"listHeader__yz0l9",unifiedDirectoryTopLevelAlertWrapper:"unifiedDirectoryTopLevelAlertWrapper__XhNo2",unifiedDirectoryTopLevelAlert:"unifiedDirectoryTopLevelAlert__UOeBz"}},0x1f0b9c2c3:e=>{e.exports={railTabDot:"railTabDot__ASdlF",toolsRailTabDotEn:"toolsRailTabDotEn__QCcgy",filesRailTabDotEn:"filesRailTabDotEn__no2NK"}},0x159456070:e=>{e.exports={emptyPageContainer:"emptyPageContainer__Qamfj",title:"title__pKhkq",subTitle:"subTitle__R1IaB",slackConnectTabEmptyStateSentSteps:"slackConnectTabEmptyStateSentSteps__LQQqu",dividerLine:"dividerLine___G3By",contactAdminLink:"contactAdminLink__enVgn",emptyStateImage:"emptyStateImage__qYsCK"}},0x1b3dac368:e=>{e.exports={alertContainer:"alertContainer__gJ7du",alertHeader:"alertHeader__FQFA6",configureButtonContainer:"configureButtonContainer__U6t6K"}},0x4d30ca6f:e=>{e.exports={contentContainer:"contentContainer__JBXZu"}},0x19a6d3f03:e=>{e.exports={loaderContainer:"loaderContainer__alyDP"}},0x7ab77f95:e=>{e.exports={container:"container__K8L4Y",blur:"blur__Ygmww"}},0x247aba52d:e=>{e.exports={span:"span__melod",row:"row__Rozkg",shimmer:"shimmer__fSoiY"}},0x1ef57c248:e=>{e.exports={emailDetailsFlexpane:"emailDetailsFlexpane__QTRdu",emailSubject:"emailSubject__ivi5F",subject:"subject__B5z9P",date:"date__YxHVF",emailBody:"emailBody__daTG0",attachments:"attachments__zrhye",attachmentsTitle:"attachmentsTitle__xqHE3"}},0x2309268e8:e=>{e.exports={container:"container__K0QpF",appIcon:"appIcon__Jisa0",title:"title__LoxVe",message:"message__oUZoa",actions:"actions__zYVJC",containerCenter:"containerCenter__nMbYF",image:"image__oeG6r"}},0x233e552ae:e=>{e.exports={textContainer:"textContainer__GUZE5",dateLine:"dateLine__WtQlh",recurrenceLine:"recurrenceLine__IHHnX"}},0x19ed4a6a3:e=>{e.exports={emailAddress:"emailAddress__z7fmI"}},0x6c8b23ac:e=>{e.exports={addressList:"addressList__YGIYp",addressListItem:"addressListItem__EXHRt",label:"label__uEowG"}},0x1f35308af:e=>{e.exports={showMore:"showMore__Cvpl6",emailAddressees:"emailAddressees__qdSZR"}},0x1bca37972:e=>{e.exports={emailFieldContent:"emailFieldContent__BSCVZ",inline:"inline__SgUMg",emailFieldContentText:"emailFieldContentText__TJ9tM"}},0x1c68b3eea:e=>{e.exports={externalUserProfileCard:"externalUserProfileCard__OOE2H",profileCardContainer:"profileCardContainer__cvuBV",externalUserFlexpaneImgContainer:"externalUserFlexpaneImgContainer__SeHUl",externalUserFlexpaneImg:"externalUserFlexpaneImg__KIPjn",externalUserImg:"externalUserImg__cg1MZ",externalUserImgContainer:"externalUserImgContainer__xoPsD",externalUserHoverImg:"externalUserHoverImg__KVQDz",externalUserHoverImgContainer:"externalUserHoverImgContainer__JU9cc",hoverCard:"hoverCard__N69wh",externalUserNameContainer:"externalUserNameContainer__xrcpw",externalUserNameFlexpaneContainer:"externalUserNameFlexpaneContainer__FCy5z",externalUserName:"externalUserName__Suvua",buttonContainer:"buttonContainer__Z_71u",externalUserField:"externalUserField__cvXYj",externalTag:"externalTag__fIVab",externalUserNameFlexpane:"externalUserNameFlexpane__EM9bp",externalUserFlexpaneContent:"externalUserFlexpaneContent__u8fzL",iconContainer:"iconContainer___wJxG",icon:"icon__kffCW",iconLabel:"iconLabel__CHsXu"}},0xdfb68246:e=>{e.exports={workObjectInput:"workObjectInput__FaGXz"}},0x8b3d4022:e=>{e.exports={metadataUserObjectContainer:"metadataUserObjectContainer__kBjgy",title:"title__t89RF",metadataUserObjectLabels:"metadataUserObjectLabels__ZQMpN",productIconImg:"productIconImg__HY0n8",productIconImgThumbnail:"productIconImgThumbnail__xTqsa",userImage:"userImage__bk6ck",userImageThumbnail:"userImageThumbnail__IDPdv",attendanceBadge:"attendanceBadge__eR_BX",attendanceBadgeThumbnail:"attendanceBadgeThumbnail___MdHj",titleWithRole:"titleWithRole__LZVS0",userRole:"userRole__zfEOM",seeAllAttendeesButton:"seeAllAttendeesButton__h0LEB"}},0xcc530c82:e=>{e.exports={workObjectReferenceContainer:"workObjectReferenceContainer__FSPnS",hoveredSubtitle:"hoveredSubtitle__cdbCT"}},0x11a8d0917:e=>{e.exports={analyticsValue:"analyticsValue__mzIKs",analyticsSubText:"analyticsSubText__aywX1",headerWithBadgeContainer:"headerWithBadgeContainer__Huesi",badge:"badge__IwZdg"}},0x1e5b1d40b:e=>{e.exports={informative:"informative__vuTo8",gray:"gray__jiz_P",horchata:"horchata__oj_so",honeycomb:"honeycomb__WFCL5",flamingo:"flamingo__ncsZl",aubergine:"aubergine__nMeux",indigo:"indigo__lY6h0",lagoon:"lagoon__cY_AU",jade:"jade__inLgn",grass:"grass__SzHJU"}},0x309fcb30:e=>{e.exports={fileEntity:"fileEntity__eg7BK"}},0xb60f126e:e=>{e.exports={actionButton:"actionButton__npzPD"}},0x2539cccbc:e=>{e.exports={actionButtonIcon:"actionButtonIcon__mjOI0",menuItemIcon:"menuItemIcon__PS0tl",menuItemButton:"menuItemButton__q9Ffw",editFooterContainer:"editFooterContainer__oPWTe",saveButton:"saveButton__P9STb",savingText:"savingText__qmodP",buttonsContainer:"buttonsContainer__jjP2g",errorText:"errorText__ROmdC",pendingChangesText:"pendingChangesText__lVJyP"}},0x1b869f061:e=>{e.exports={loaderBar:"loaderBar__SUhOa",loaderBarFill:"loaderBarFill__UVHbT"}},0x15ef02801:e=>{e.exports={openInAppButton:"openInAppButton__qv4H3",openInAppLink:"openInAppLink__ayFdq"}},0x119bfe74a:e=>{e.exports={container:"container__kO_xC",thumbnailImage:"thumbnailImage__k8n6C",loadingMessage:"loadingMessage__lcBfP",emptyStateImage:"emptyStateImage__db8YI",primaryText:"primaryText__hqt9P",forceLightMode:"forceLightMode__I4Hh4",secondaryText:"secondaryText__OrbGg",emptyState:"emptyState__P9fg0",productIconImage:"productIconImage__spemd",fallbackImage:"fallbackImage__O_xtL",fallbackThumbnailContainer:"fallbackThumbnailContainer__XZL1g",hourGlassIllustration:"hourGlassIllustration__FLJpA"}},0x1fd61b7a6:e=>{e.exports={slackFileViewer:"slack-file-viewer__fGSRD",hideSlackFileViewerFilmStrip:"hideSlackFileViewerFilmStrip__uKCgO",backgroundImage:"backgroundImage__qrneZ"}},0x214d3bda8:e=>{e.exports={salesforceAuthRedirectContainer:"salesforceAuthRedirectContainer__pR3vX",appIcon:"appIcon__KTnFi",tableauIconContainer:"tableau-icon-container__eoPbY",plugIconContainer:"plugIconContainer__CoTsS",title:"title__CsqnK",appName:"appName___2sq3",redirectDescription:"redirectDescription__NJZbL",redirectAction:"redirectAction__PV4kb"}},0x11dd23337:e=>{e.exports={footer:"footer__O3EdC",entityFooter:"entityFooter__LRkwe",searchFooter:"searchFooter__o0vSy",buttonContainer:"buttonContainer__yjqYs",buttonContainerSmallGap:"buttonContainerSmallGap__VSlBd",inactive:"inactive__GaCw7",textContainer:"textContainer__CRTSh",timestampWithRefresh:"timestampWithRefresh__ZUovi",timestampContainer:"timestampContainer__jiUjx",timestampText:"timestampText__kzvyJ",refreshButtonContainer:"refreshButtonContainer__AwUw5",hide:"hide__zjGjc",show:"show__maEgP",viewRelatedConversations:"viewRelatedConversations__zIq6G"}},0x17588a0d:e=>{e.exports={contentContainer:"contentContainer__b20hr",menuItemIcon:"menuItemIcon__h5pHm",header:"header__LA3UI",bottomBorder:"bottomBorder__W0ZIz",entityThumbnail:"entityThumbnail__qVekB",image:"image__wW9uU",slackThumbnailImage:"slackThumbnailImage__aIX2o",defaultSubtitle:"defaultSubtitle__dEGEJ",hoveredSubtitle:"hoveredSubtitle__Jg4Xm",secondaryLabelWrapper:"secondaryLabelWrapper__t3EI1",defaultSubtitleContainer:"defaultSubtitleContainer__U3rM4",hoveredSubtitleContainer:"hoveredSubtitleContainer__ACWzQ",hide:"hide__p5RjW",show:"show__bFXBV",openUrlIconPadding:"openUrlIconPadding__gFKZ2",menuItemImageContainer:"menuItemImageContainer__UbdNG",userField:"userField__enfth",tagField:"tagField__iv27A",tagLink:"tagLink__qhqqK",previewContainer:"previewContainer__Is4X6",gridLayout:"gridLayout__FOG2I",default:"default__eO1FB",small:"small__dDoK5",large:"large__HVgd8",xlarge:"xlarge__PNQtR",thinPadding:"thinPadding__TSCa6",noPadding:"noPadding__oWgbp",hiddenPreview:"hiddenPreview__gcSvF",gridItemLong:"gridItemLong__Knh2w",gradient:"gradient__vu9hn",contentItem:"contentItem__QQpy7",expanded:"expanded__yRugO",full:"full__uiyL_",displayColumn:"displayColumn__oKhoA",calendarEntity:"calendarEntity__wuyA3",contentItemLabel:"contentItemLabel__zf_5O",bold:"bold__wFRIz",contentItemValue:"contentItemValue__dtLBB",previewImage:"previewImage__NZPuJ",tableauVisualizationImage:"tableauVisualizationImage__GEowp",analyticsLayout:"analyticsLayout__MsGyz",tagImage:"tagImage__n5Yls",userToken:"userToken__eOSYX",footer:"footer__wQJ6R",timestamp:"timestamp__EaSPf",labelsContainer:"labelsContainer__HNntz",arraySpacing:"arraySpacing__F06Db",lockedIcon:"lockedIcon__XV5wV",fakeInput:"fakeInput__o1z6z",actionBarTextButton:"actionBarTextButton__FtoBw",actionBarIconButton:"actionBarIconButton__SgTHx",actionBarLoadingButton:"actionBarLoadingButton__s4v4Q",actionBarDivider:"actionBarDivider__YUxXc",flexpaneTokenArray:"flexpaneTokenArray__jX4tm",unfurlTokenArray:"unfurlTokenArray__f5r0P",showFade:"showFade__TBfQo",hideTooltip:"hideTooltip__oyklj",appIconBadge:"appIconBadge___c8Q9",productIconContainer:"productIconContainer__lf8b0",iconsContainer:"iconsContainer__VptzH",productIconImg:"productIconImg__Rjoby",contentWrapper:"contentWrapper__rI0df",workObjectSearchItem:"workObjectSearchItem__vTlYZ",workObjectSearchItemSelected:"workObjectSearchItemSelected__HUMPk",editableValueContainer:"editableValueContainer__bL2cR",editButtonContainer:"editButtonContainer__FF3tt",editButton:"editButton__rPw2w",thumbnailsContainer:"thumbnailsContainer__brq4X",workObjectFileExpandedContainer:"workObjectFileExpandedContainer__g89Rj",workObjectFileContainer:"workObjectFileContainer__WjWOh"}},0x1ddb28a20:e=>{e.exports={container:"container__HsjX1",headerTitle:"headerTitle__o5Bky",description:"description__ci0c_",actions:"actions__H8mTJ",learn_more_link:"learn_more_link__Vf8C8"}},0x4ac22ef6:e=>{e.exports={img:"img__lO8cy"}},0x1b57df26:e=>{e.exports={summarizeWithSlackbotButton:"summarizeWithSlackbotButton__mp6pP",slackbotImg:"slackbotImg__gWgTa"}},0x1b8a2ca0c:e=>{e.exports={composer:"composer__FBklq",errorBanner:"errorBanner__M18Fp"}},0x10ea414df:e=>{e.exports={commentItem:"commentItem__IZm3c",actions:"actions__SL8SS",externalAvatar:"externalAvatar__tJENy",header:"header__Lzxi6",userName:"userName__Hp_DR",timestamp:"timestamp__QuDu0",body:"body__sb8XV"}},0xbafc75b7:e=>{e.exports={skeletonItem:"skeletonItem__m8ZUc",textSkeleton:"textSkeleton__Th6I1",avatarSkeleton:"avatarSkeleton__itXde",lines:"lines__uDUsb"}},0x1d53b5b7c:e=>{e.exports={emptyState:"emptyState__joM7W",productIconOverlay:"productIconOverlay__Ic648"}},0x1ee02af6d:e=>{e.exports={errorState:"errorState__VnWMD"}},0x10db4022c:e=>{e.exports={container:"container__WR5O7"}},0xef2e73b8:e=>{e.exports={details:"details__S9LRs",description:"description__h4L11",emptyState:"emptyState__zlG5i",spinnerContainer:"spinnerContainer__y_ttk",spinner:"spinner__RnqLD",label:"label__Q3Vec",fieldset:"fieldset__MImbd",fileImgPreviewContainer:"fileImgPreviewContainer__CK2iM",fileImgPreview:"fileImgPreview__QYXFX",updatedTsFooter:"updatedTsFooter__S9Ibz",updatedTsText:"updatedTsText__hD0LZ"}},0x2382c92e5:e=>{e.exports={workObjectFlexpaneAdditionalButtonsContainer:"workObjectFlexpaneAdditionalButtonsContainer__uhwOw",flexpaneBadgeIcon:"flexpaneBadgeIcon__qjJtQ",flexpaneRefreshBtn:"flexpaneRefreshBtn__oMlY1",flexpaneRefreshCheckedBtn:"flexpaneRefreshCheckedBtn__tSijC",flexpaneRefreshIcon:"flexpaneRefreshIcon__Fp9yf",spinFlexpaneRefreshIcon:"spinFlexpaneRefreshIcon__mO55P",flexpaneCheckedIcon:"flexpaneCheckedIcon__wMzcA",flexpaneRefreshTooltipLabel:"flexpaneRefreshTooltipLabel__MG8ql",flexpaneRefreshTooltipSubLabel:"flexpaneRefreshTooltipSubLabel__BWdP_",flexpaneSyncedLabel:"flexpaneSyncedLabel__yisTK",flexpaneSyncingLabel:"flexpaneSyncingLabel__rpwZI",flexpaneOpenInWindowBtn:"flexpaneOpenInWindowBtn__f33rF",cancelEditButton:"cancelEditButton__aHuew",loadingEdit:"loadingEdit__FP7g3"}},0x80a16bdd:e=>{e.exports={flexpane:"flexpane__TMUXz",scrollDisabledContainer:"scrollDisabledContainer__Wtg59",header:"header__i5UwZ",flexpaneTitle:"flexpaneTitle__YEqm7",flexpaneCaption:"flexpaneCaption__HN4fV",flexpaneLoadingTitle:"flexpaneLoadingTitle__ezVWR",flexpaneSpinnerWrapper:"flexpaneSpinnerWrapper__ZhjEP",flexpaneSpinner:"flexpaneSpinner__E5Xrr",primarySourceLink:"primarySourceLink__XCe0n",authOverlay:"authOverlay__CijiP",authWrapper:"authWrapper__vxV5t",entityTitle:"entityTitle__VIjQe",tabMenu:"tabMenu__CKg9T",entityIcon:"entityIcon__bvKb9",isSavingContainer:"isSavingContainer__Ebf0g",editContainer:"editContainer__PfOhV",workObjectFlexpane:"workObjectFlexpane__KUY4V",flexpaneCaptionTruncated:"flexpaneCaptionTruncated__EaxAS",updateAlert:"updateAlert__tH6aj"}},0x8c27d6c6:e=>{e.exports={modalContent:"modalContent__JscXq",container:"container__UpfYW",contentWrapper:"contentWrapper__bDmGW",fullPreviewModal:"fullPreviewModal__Cfp7V",flexpaneWrapper:"flexpaneWrapper___IUhY",fileViewerWrapper:"fileViewerWrapper__cPnwM",previewContextContainer:"previewContextContainer__E8Oee",fileViewerFooter:"fileViewerFooter__lVEUr",fileViewerHeader:"fileViewerHeader__Pwonc",modalHeaderTitle:"modalHeaderTitle__Q5rZT",modalHeaderInfo:"modalHeaderInfo__fvFGm",modalHeaderAppInfo:"modalHeaderAppInfo__OURR4",modalHeaderActions:"modalHeaderActions__CKne1",fileViewerFooterActions:"fileViewerFooterActions__RbTeo",fileViewerActionsButton:"fileViewerActionsButton__XzR7Z",fileViewerActionsButtonSelected:"fileViewerActionsButtonSelected__VjvEZ",feedbackButtonText:"feedbackButtonText__NwHsz",feedbackButton:"feedbackButton__MDhsD"}},0x9b65d19d:e=>{e.exports={work_objects_thread_filter_menu:"work_objects_thread_filter_menu__Er6Bh"}},0x1c412a275:e=>{e.exports={work_object_threads:"work_object_threads__jq5Wk",work_object_threads_scrollbar:"work_object_threads_scrollbar__LpRtX",work_object_threads_empty_state:"work_object_threads_empty_state__UvpgA"}},0x2173cfef:e=>{e.exports={accordion:"accordion__kLx8x",item:"item__MTv17",expanded:"expanded__G1WSM",noBorder:"noBorder__Bkdii",itemHeader:"itemHeader__rqviz",expandedIcon:"expandedIcon__a6bDs",header:"header__Mu2fJ",defaultShowDescriptionAnimation:"defaultShowDescriptionAnimation__SUEzA",showDescription:"show-description___8nN1",defaultShowDescription:"defaultShowDescription__O25CX",customItemTextAnimation:"customItemTextAnimation__J88Pz",addPadding:"add-padding__dbRf8",customItemText:"customItemText__vavhM",customItemTransition:"customItemTransition__YwYGB",description:"description__RSIZO",iconSpacer:"iconSpacer__a8u1y",imageCaret:"imageCaret__ZFZoY"}},0x751c205d:e=>{e.exports={alertFont:"alertFont__VJruI"}},0x1aaf5b422:e=>{e.exports={heroBannerContainer:"heroBannerContainer__GwzBP",heroBannerTitleContainer:"heroBannerTitleContainer__l30lI",heroBannerContent:"heroBannerContent___PCzS",filterBar:"filterBar__kJJIF",agentExchangeGridItem:"agentExchangeGridItem__SVKUI",tagContainer:"tagContainer__JzH2B",actionsContainer:"actionsContainer__cfnTA",secondaryLabel:"secondaryLabel__Fza3G"}},0xb985bb5e:e=>{e.exports={thumbnailImg:"thumbnailImg__5FPcy"}},0x1f6b74117:e=>{e.exports={bottomSection:"bottomSection__k6ymq",primaryLabelContainer:"primaryLabelContainer__ZXRF_",listItemContainer:"listItemContainer__baEfF",listItemActionsContainer:"listItemActionsContainer__EJz7r",secondaryLabelContainer:"secondaryLabelContainer__7zHhL"}},0x17e07355d:e=>{e.exports={container:"container__ST51g",content:"content__F5yrM",iconContainer:"iconContainer__Gh4bZ",labels:"labels__Bdr9I",loadingLabels:"loadingLabels___7nhy",primaryLabel:"primaryLabel__x5wMe",secondaryLabel:"secondaryLabel__qA4tO",description:"description__xmFl8",loadingDescription:"loadingDescription__Q1MfJ",header:"header__VZ1d3",icon:"icon__vTKq9",prompts:"prompts__iafcz",promptButton:"promptButton__id7P9",loadingPromptButton:"loadingPromptButton__o5HNl"}},0x87843311:e=>{e.exports={agentContainer:"agentContainer__VQ4zL",expandedActionBarContainer:"expandedActionBarContainer__YNNg2",iconContainer:"iconContainer__mYGJ7",icon:"icon__sUEgW",iconExternal:"iconExternal__cwFLF",actionbarContainer:"actionbarContainer__Zj4WV"}},0x172d74529:e=>{e.exports={modalHeader:"modalHeader__WrRcf",modalFooter:"modalFooter__ZQjyy",listItem:"listItem__7RpyN",selectedListItem:"selectedListItem__ZAGBx"}},0x11e937aa8:e=>{e.exports={dmView:"dmView__RRc1d",hero:"hero__hiGMy",heroHeader:"heroHeader__UeZCw",heroBadge:"heroBadge__FwmIX",heroDescription:"heroDescription__Rywtv",prompts:"prompts__oRYno",promptWrapper:"promptWrapper__bza9H",prompt:"prompt__Hd755",dmConversationHeader:"dmConversationHeader__Q3nBk",dmConversationTitle:"dmConversationTitle__J8euI",dmConversationName:"dmConversationName__YXuCY",promptIcon:"promptIcon__CNOeL"}},0x277d3dda:e=>{e.exports={comments:"comments__d5NoE"}},0xe1dd52e6:e=>{e.exports={agentMessageFooterIconSelected:"agentMessageFooterIconSelected__BZbvF"}},0x1a5abe5cf:e=>{e.exports={agentHomeView:"agentHomeView__stG3D",agentHomeViewLoading:"agentHomeViewLoading__kYfo3",navigateToPastConversationsBtn:"navigateToPastConversationsBtn__F7ioy",agentHomeViewNoHistory:"agentHomeViewNoHistory__niHkK",agentHomeViewConversationList:"agentHomeViewConversationList__H8uEq",navigateToNewConversationBtn:"navigateToNewConversationBtn__QSCJy",agentHomeViewSplitView:"agentHomeViewSplitView__RwIzP",agentHomeViewConversation:"agentHomeViewConversation__pxm8S",agentHomeViewMessageListItem:"agentHomeViewMessageListItem__xEnr_",newConversationUi:"newConversationUi__HaUOb",activeConversationUi:"activeConversationUi__BUSQ_",titleRow:"titleRow__KvbqW",activeConversationUiLoading:"activeConversationUiLoading__lBqnn",messageInput:"messageInput__WnEdy",messageInputActiveConversation:"messageInputActiveConversation__rH7LG",centeredHorizontally:"centeredHorizontally__Cga7b",centeredHorizontallySmaller:"centeredHorizontallySmaller__IpYNN",rowCommon:"rowCommon__FWhl9",rowThreadHeading:"rowThreadHeading__r4fjt",titleRowActiveConversation:"titleRowActiveConversation__YA3om",rowRoot:"rowRoot__TWGu_",rowRootWithoutTitle:"rowRootWithoutTitle__G_J36",rowReply:"rowReply__D3PgX",rowLoadOlder:"rowLoadOlder__sk3Op",rowFooter:"rowFooter__kMqCR",rowBottom:"rowBottom__tAJeN",loadingShimmer:"loadingShimmer__THIzU",megaphoneContainer:"megaphoneContainer__J1QT3"}},0x40564d24:e=>{e.exports={menuItemContent:"menuItemContent__og6jm",menuIcon:"menuIcon__g07KY"}},0x2560a900:e=>{e.exports={cta:"cta__EbzCm",tooltipCaption:"tooltipCaption__JusH6"}},0x21e9508a6:e=>{e.exports={advancedSettings:"advanced-settings__OzLrp",channelName:"channelName__Jjgx_"}},0xe504f41b:e=>{e.exports={prompts:"prompts__ATQe1",promptsTextOnly:"promptsTextOnly___4xpv",pillIconTop:"pillIconTop__sPAQy",pillIconLeft:"pillIconLeft__KUgXt",pillIcon:"pillIcon__ytECU",iconTop:"iconTop__LCcOu",iconLeft:"iconLeft__N1nM2",promptsButton:"promptsButton__Ou8il",promptsButtonSelected:"promptsButtonSelected__iLoD9",pillsGrid:"pillsGrid__HBzBX",pillGridItem:"pillGridItem__v1sRY",pillFullWidthButton:"pillFullWidthButton__PaGNA",flex_direction_row:"flex_direction_row__OTcc9"}},0x23a15d690:e=>{e.exports={otherTextInputWrapper:"otherTextInputWrapper__XkyaI"}},0x23a2c754b:e=>{e.exports={appConnectBadge:"appConnectBadge__VGOzr"}},0xdacfd239:e=>{e.exports={container:"container__b6wpO",description:"description__V5P7H",showDetails:"showDetails__q27i6",connectedBadge:"connectedBadge__cEUpQ",appConnectBadge:"appConnectBadge__b66SA",nudge:"nudge__bl4p1",nudgeLink:"nudgeLink__QtxiU"}},0x9e1a7494:e=>{e.exports={svgContainer:"svgContainer__KT0et"}},0x838a1917:e=>{e.exports={page:"page__l8rW_",contentContainer:"contentContainer__zlXNO",headerContainer:"headerContainer__aVMg3",isScrolled:"isScrolled__oyJTR",searchContainer:"searchContainer__lJvYl",headerContent:"headerContent__vm0HI",legacyHeaderContent:"legacyHeaderContent__JVsnk",filtersContainer:"filtersContainer__NX0if"}},0x13927a035:e=>{e.exports={installButton:"installButton__LPjHx",contentContainer:"contentContainer__pzZ3X"}},0x1d3ade97e:e=>{e.exports={header:"header__d7cxV",grid:"grid__gbDmG"}},0x1b001a9f9:e=>{e.exports={radioCardsImgContainer:"radioCardsImgContainer__yOsBG"}},0x1fc59448:e=>{e.exports={WelcomeGif:"WelcomeGif__kKCAu"}},0xf24db15e:e=>{e.exports={blockKitInlineForm:"blockKitInlineForm__OThSz",buttons:"buttons__IGDNb"}},0x10872dea8:e=>{e.exports={calloutBlock:"calloutBlock__hhJVp",calloutBlockIndigo:"calloutBlockIndigo__LmwrE",calloutBlockBlue:"calloutBlockBlue__GpPad",calloutBlockJade:"calloutBlockJade__vUQGH",calloutBlockPink:"calloutBlockPink__gACED",calloutBlockGreen:"calloutBlockGreen__a8d8P",calloutBlockGray:"calloutBlockGray__vdpej",calloutBlockPurple:"calloutBlockPurple__Q_yY0",calloutBlockOrange:"calloutBlockOrange__ho1_e",calloutBlockBrown:"calloutBlockBrown__b6bvd",calloutBlockEmpty:"calloutBlockEmpty__yqYjT"}},0xd31900af:e=>{e.exports={container:"container__Sh_cK",contentElement:"contentElement__lvh1l"}},0xb96cde2b:e=>{e.exports={container:"container__Ij6XE"}},0x1e766438b:e=>{e.exports={block:"block__G68co",blockContent:"blockContent__soSQw"}},0x1fdb06097:e=>{e.exports={headerTitle:"headerTitle__uBUOE",subheaderTitle:"subheaderTitle__ChRQx",toggleBarButton:"toggleBarButton__IiA5U",disabled:"disabled__DJSOq",toggleBarIcon:"toggleBarIcon__Vfyg_",spinner:"spinner__yNUfX",toggleBarTitleContainer:"toggleBarTitleContainer__rtZEF",taskItem:"taskItem__S7DLU",taskHeader:"taskHeader__jDCkb",taskContent:"taskContent__NVbm8",taskIcon:"taskIcon__iBlpR",taskContentIcons:"taskContentIcons__Nmm_1",placeholderIcon:"placeholderIcon__WWSw8",taskContentSection:"taskContentSection__m3Vqh",divider:"divider__vRBwf",error:"error__vRUf6",inProgress:"inProgress__SutVB"}},0x1b59f1d56:e=>{e.exports={card:"card__Ck52M",content:"content__IC7fb",heroImage:"heroImage__w7YtC",iconContainer:"iconContainer__Dep8h",headerContainer:"headerContainer__EdPcP",bodyContainer:"bodyContainer__UVxhy",withGradient:"withGradient__ox_im",bodyContent:"bodyContent__QNthV",actionsContainer:"actionsContainer__qly2s"}},0x1dd05c9fe:e=>{e.exports={carousel:"carousel__EgaZW",cardWrapper:"cardWrapper__xz1yY"}},0x34f7089c:e=>{e.exports={container:"container__u_9wR",header:"header__k5RRm",language:"language__YYtm5",code:"code__VM0wp",loading:"loading__NIoBR",loadingPre:"loadingPre__T6sQb"}},0x114c3624e:e=>{e.exports={container:"container__eOz5q",image:"image__Y2z3z",grid:"grid__aqOQL",openGalleryButton:"openGalleryButton__ycQVL"}},0xe4be167c:e=>{e.exports={inlineFormBlock:"inlineFormBlock__SzXcl",title:"title__rVmY2",buttons:"buttons__f94yO",doneContainer:"doneContainer__rQixZ",inlineFormBlockDone:"inlineFormBlockDone__AUcfo",doneClickTarget:"doneClickTarget__o3tWC",doneHeaderRow:"doneHeaderRow__wAnOy",doneSubtitle:"doneSubtitle__KWNPR",doneHeaderLeft:"doneHeaderLeft__Eosok",doneHeaderActions:"doneHeaderActions__JpzR5",caretIcon:"caretIcon__uS6K8",editButton:"editButton__XSAdI",doneExpandedContent:"doneExpandedContent__IESHs",doneView:"doneView__b3W9T",doneField:"doneField__FyLUE",doneFieldLabel:"doneFieldLabel__M4M5l",doneFieldValue:"doneFieldValue__IYRdx",doneFieldEmpty:"doneFieldEmpty__A_ooq"}},0x39c7a394:e=>{e.exports={content:"content__Kl1Kr",animating:"animating__pyHJH",blockWrapper:"blockWrapper__LRkBn",blockAnimating:"blockAnimating__m7uId",blockReplacedContainer:"blockReplacedContainer__FVxY8",pulseHighlight:"pulseHighlight__yHe4v",shimmer:"shimmer__k3_Nj",undoButtonContainer:"undoButtonContainer__bZBKi",undoButton:"undoButton__kA32I",backButtonContainer:"backButtonContainer__g2He_",backButton:"backButton__KQd68"}},0xda39ef2b:e=>{e.exports={workflowDecoration:"workflowDecoration__dD4NM",workflowDecorationIcon:"workflowDecorationIcon__BN33q",workflowDecorationText:"workflowDecorationText__wYTUC"}},0x19908cbe7:e=>{e.exports={fileCard:"fileCard__hMqyS",citationLink:"citationLink__bLuLL",privateNotation:"privateNotation__WvVDX",contents:"contents__HLu9G",fileLabel:"fileLabel__vwaVi",appIcon:"appIcon__HDImb"}},0x1d19775cc:e=>{e.exports={coachmarkWrapper:"coachmarkWrapper__y2iLe",coachmarkFadeIn:"coachmarkFadeIn__P56Fb",description:"description__WOjJj"}},0x82949345:e=>{e.exports={imageSection:"imageSection__JStx_",imageContainer:"imageContainer__jbIBi",animationOverlay:"animationOverlay__O8Cmo",pulsingCircle:"pulsingCircle__XuWTF",pulseAnimation:"pulseAnimation__Ii4zI",footer:"footer__dGqAR",footerText:"footerText__K9nna"}},0x190599afd:e=>{e.exports={promptCardActionsBar:"promptCardActionsBar__DofT8",promptCardMaxWidth:"promptCardMaxWidth__aoYIc",promptCardMargin:"promptCardMargin__KjO8z",promptCard:"promptCard__PBmmu",promptCardHeader:"promptCardHeader__WGp3A",promptCardHeaderInfo:"promptCardHeaderInfo__eTpAB",promptCardHeaderInfoTitle:"promptCardHeaderInfoTitle__Xn3ug",promptCardBody:"promptCardBody__cPHBa",promptCardHeaderInfoTitleAuthor:"promptCardHeaderInfoTitleAuthor__F9RXm",promptCardHeaderIcon:"promptCardHeaderIcon__HUDPj",promptCardHeaderIconBackground:"promptCardHeaderIconBackground__Tmfue",loadingButton:"loadingButton____Tx_",shimmer_share_prompt_loading:"shimmer_share_prompt_loading__h8wcL",promptCardPreviewContent:"promptCardPreviewContent__MWbBa",sharePromptButtonNoClickButtonContainer:"sharePromptButtonNoClickButtonContainer__jaLNm",sharePromptButtonNoClickButtonTooltip:"sharePromptButtonNoClickButtonTooltip__d5Auc",sharePromptButtonNoClickButtonTooltipHidden:"sharePromptButtonNoClickButtonTooltipHidden__evkk0",promptCardFooter:"promptCardFooter__sQU8F",promptCardFooterText:"promptCardFooterText__fZAhW",promptCardHeaderInfoTitleEmpty:"promptCardHeaderInfoTitleEmpty__xPN6P"}},0x155488593:e=>{e.exports={skillCardMaxWidth:"skillCardMaxWidth__q19hq",skillCardMargin:"skillCardMargin__x2bmz",skillCard:"skillCard__AcV0L",skillCardHeader:"skillCardHeader__FS1F4",skillCardHeaderInfo:"skillCardHeaderInfo__BBmDI",skillCardHeaderInfoTitle:"skillCardHeaderInfoTitle__yWfF9",skillCardBody:"skillCardBody__XWe8c",skillCardHeaderInfoTitleAuthor:"skillCardHeaderInfoTitleAuthor__cNSqt",skillCardDescription:"skillCardDescription__lHtpW",skillCardButtons:"skillCardButtons__qPZ7N"}},0x44cb0a94:e=>{e.exports={tablePreview:"tablePreview__YFDoX",viewTablePill:"viewTablePill__LZlfe",viewTablePillContainer:"viewTablePillContainer___3D9j"}},0x8cc32fe7:e=>{e.exports={tableActionsGroup:"tableActionsGroup__f1RWj",tableActionsContainer:"tableActionsContainer__gV00B",tableContainerHorizontalOverflow:"tableContainerHorizontalOverflow__cCP0m"}},0x4469b29b:e=>{e.exports={timelineBlock:"timelineBlock__ejVd0",timelinePoint:"timelinePoint__xC6Y3",expandable:"expandable__nQCv4",timelineLine:"timelineLine__MBazj",timelineIcon:"timelineIcon__BD6j2",timelineContent:"timelineContent__dw9lB",timelineText:"timelineText__Egtw9",timelineTextShimmer:"timelineTextShimmer__DmT2y",timelineShimmerIcon:"timelineShimmerIcon__aKmn1",timelineSteps:"timelineSteps__HBY8P",timelineStepItem:"timelineStepItem__xGUsp",timelineStepIcons:"timelineStepIcons__U4sZd",timelineStepPlaceholderIcon:"timelineStepPlaceholderIcon__Zcune",timelineStepDivider:"timelineStepDivider__BXNQ0",timelineStepContent:"timelineStepContent__xtz1X",timelineDropdownContents:"timelineDropdownContents__dm4kd",timelineDropdownItem:"timelineDropdownItem__TtG7q",timelineStatus:"timelineStatus__IA6AQ",timelineStatusIcon:"timelineStatusIcon__LotP5",timelineStatusIconInProgress:"timelineStatusIconInProgress__fxptk",timelineStatusContainer:"timelineStatusContainer__Xg90z",timelineContentCount:"timelineContentCount__CPFu0",timelineDropdownToggle:"timelineDropdownToggle__DtZ80",timelineSourcesSlug:"timelineSourcesSlug__xyrus",sourcesSubheader:"sourcesSubheader__Ejs7P",sourcesModalContent:"sourcesModalContent__s7STD",sourcesPanelBody:"sourcesPanelBody__hJPDf",sourcesChannelGroup:"sourcesChannelGroup__gHa2u",sourcesChannelHeader:"sourcesChannelHeader__IQZSQ",sourcesChannelThumbnail:"sourcesChannelThumbnail__kZ4vF",sourcesMessageItem:"sourcesMessageItem__eT8Nt",sourcesMessageAvatar:"sourcesMessageAvatar__bemB7",sourcesMessageContent:"sourcesMessageContent__s1dWU",sourcesMessageHeader:"sourcesMessageHeader__S7OiO",sourcesMessageSender:"sourcesMessageSender__kQFBI",sourcesMessageTimestamp:"sourcesMessageTimestamp__BPLrH",sourcesMessageText:"sourcesMessageText__TEedL",sourcesFilesSection:"sourcesFilesSection__qIBrA",sourcesFilesSectionHeader:"sourcesFilesSectionHeader__DVMBr",sourcesFilesBox:"sourcesFilesBox__gvDjv",sourcesFileItem:"sourcesFileItem__utrPR",sourcesFileThumbnail:"sourcesFileThumbnail__WuHCC"}},0xabbe611c:e=>{e.exports={dropTarget:"dropTarget__DBLGQ",dropTargetActive:"dropTargetActive__zjmza",animContainer:"animContainer__UWmyV",animCard:"animCard__Y_NVJ",dropTargetError:"dropTargetError__k2hHJ",animCard3:"animCard3__vvW3_",animCard2:"animCard2__bIwi0",animCard1:"animCard1__kpkSD",animNight:"animNight__CMf6q",sadCloud:"sadCloud__TC2Li",dropPrompt:"dropPrompt__usuRf",uploadPrompt:"uploadPrompt__omJ2F",uploadButton:"uploadButton__CBdav"}},0x1545708d9:e=>{e.exports={alertContainer:"alertContainer__EsQtH"}},0x9337a79a:e=>{e.exports={content:"content__oc4tS",icon:"icon__COEVN",droptarget:"droptarget__ZKK0V",dropoverlay:"dropoverlay__EyMag"}},0x18e87117e:e=>{e.exports={micro:"micro__Re2Sf",caption:"caption__Hcg3I",body:"body__ZkE4N",subtitle:"subtitle__y3AHi",title:"title__VtsP3",headline:"headline__aHoM3",primary:"primary__h_r0V",secondary:"secondary__iCi2N",tertiary:"tertiary__XBZDI",highlight1:"highlight1__Zy6IT",highlight2:"highlight2__uL7JI",highlight3:"highlight3__YkpT6",important:"important__oDq5i",regular:"regular__NvDjQ",bold:"bold__G1fpp",bolder:"bolder__kcC5x",underline:"underline__XP7Te",strikethrough:"strikethrough__F8xsw"}},0x13061d4ff:e=>{e.exports={container:"container__yzebK",previewImg:"preview-img__JYciH"}},0x974d09a:e=>{e.exports={justificationSparkle:"justificationSparkle__KfHJb"}},0xde62a275:e=>{e.exports={avatar_toast:"avatar_toast__ILee5",avatar__toast_keyframes:"avatar__toast_keyframes__xrdly"}},0x16a50aa9e:e=>{e.exports={newAiBadge:"newAiBadge__Hzm4p",darkBackground:"darkBackground__zetFh"}},0x1ac82719b:e=>{e.exports={optionsHeader:"optionsHeader__pme2U"}},0x142811197:e=>{e.exports={nuxBody:"nuxBody___vCYG",fadeIn:"fadeIn__Ap_dr",header:"header__LsOhY",titleContainer:"titleContainer__ieFx3",title:"title__RsCT9",tooltipContainer:"tooltipContainer__uzDZj",tooltipTitle:"tooltipTitle__m_WFL",tooltipEmoji:"tooltipEmoji__AH6CR",tooltipSubtitle:"tooltipSubtitle__lkbJu",contentBody:"contentBody__HLvT_",featureIcon:"featureIcon__O6nwN",featureImage:"featureImage__byzlc",featureBlock:"featureBlock__ZMOrC",featureText:"featureText__S8DQ5",featureHeading:"featureHeading__XeCjP",featureDescription:"featureDescription__Xqhxh",highlightedText:"highlightedText__NQBKO",channelName:"channelName__ZEkqg"}},0xa426180f:e=>{e.exports={menu:"menu__GjvfJ",mention:"mention__zNKT2",categoryLabel:"categoryLabel__yUOIA",suggestionsAlert:"suggestionsAlert__BB763",suggestionsItem:"suggestionsItem__aA06q",suggestionItemEmoji:"suggestionItemEmoji__X1v5F",suggestionsItemDescription:"suggestionsItemDescription__J_5wS",selectedBaseSuggestionText:"selectedBaseSuggestionText__mgZCT",fullSuggestionInfo:"fullSuggestionInfo__Ii9yq",selectedRemainingSuggestionText:"selectedRemainingSuggestionText__SmGT3",suggestionResult:"suggestionResult__BjpOd"}},0xab98ceeb:e=>{e.exports={CanvasReactionBar:"CanvasReactionBar__zR79S",CanvasReactionBarEditsDisabled:"CanvasReactionBarEditsDisabled__CNPNK"}},0x99216ae2:e=>{e.exports={overlayContainer:"overlayContainer__wocyf",autocompleteMenu:"autocompleteMenu__hEwBF",inputSuperContainer:"inputSuperContainer__4vX1f",interactionContainer:"interactionContainer__CfQay",inputContainer:"inputContainer__vARV4",multiline:"multiline__aUnrL",accessories:"accessories__AYlq4",accessoriesWrapped:"accessoriesWrapped__GM5cp",accessoriesContainerInner:"accessoriesContainerInner__exFyc",acceptButton:"acceptButton__zzwxI",submitButton:"submitButton__BK_Kl",withText:"withText__QMOEu",stopButton:"stopButton__yNyne",overflowedAcceptButton:"overflowedAcceptButton__XuBWi",loadingAnimationContainer:"loadingAnimationContainer__B1PsB",loadingContainer:"loadingContainer__eEzzY",fetching:"fetching__TyNGP",statusContainer:"statusContainer__WZMev",suggestionGuideContainer:"suggestionGuideContainer__wk66O",suggestionGuideText:"suggestionGuideText__zL6tn",alertContainer:"alertContainer__J2kZR",inserting:"inserting__KGmfm",disclaimerContainer:"disclaimerContainer__WDF00",feedbackContainer:"feedbackContainer__Fjjeq",srOnly:"srOnly__kpSf0",sourceContainer:"sourceContainer__k4C3f",sourceButton:"sourceButton__hTRzc",sourceText:"sourceText__T0tSf",previewBlocksContainer:"previewBlocksContainer__yl9Al",sourceCountNumber:"sourceCountNumber__nP9oO",tokenContainer:"tokenContainer__htFf0",menuButton:"menuButton__vtcrA",menu:"menu__QUpFM",icon:"icon__ElNRa",defaultIcon:"defaultIcon__JsG0W",container:"container__FykVy",banner:"banner__KtoUJ"}},0x86d174ec:e=>{e.exports={sourcesContainer:"sourcesContainer___DdbI",sourceRow:"sourceRow__E0QNp",grayBackground:"grayBackground__iiOZX",channel:"channel__MjaaV",message:"message__qEtpf",file:"file__Je4dM",subtitle:"subtitle__E5js9",actionsContainer:"actionsContainer__v2keU",hiddenSource:"hiddenSource__teFZ_",hideButton:"hideButton___GNrT",channelRow2:"channelRow2__cAhkq",joined:"joined__T4gOV"}},0xfb490a95:e=>{e.exports={root:"root__ioJxQ",disclaimer:"disclaimer__iiUsW",buttonContainer:"buttonContainer__kAV4w"}},0x241b62a4f:e=>{e.exports={EmbeddedSlackListEmbedHeader:"EmbeddedSlackListEmbedHeader__WESbE",EmbeddedSlackListEmbedHeaderContent:"EmbeddedSlackListEmbedHeaderContent__SyURr",EmbeddedSlackListEmbedHeaderTitle:"EmbeddedSlackListEmbedHeaderTitle__adJ30",EmbeddedSlackListEmbedHeaderFocused:"EmbeddedSlackListEmbedHeaderFocused__kTsnz",EmbeddedSlackListEmbedSC:"EmbeddedSlackListEmbedSC__zacqj",EmbeddedSlackListEmbedSCText:"EmbeddedSlackListEmbedSCText__YzWOo"}},0x227d0a49:e=>{e.exports={EmbeddedSlackListEmbedOpenButton:"EmbeddedSlackListEmbedOpenButton__ZOiej"}},0x250666a62:e=>{e.exports={CommentGutter:"CommentGutter__wG5nv",CommentGutterIcon:"CommentGutterIcon__HhE5x",CommentGutterIconDark:"CommentGutterIconDark__f3It3",CommentGutterUnread:"CommentGutterUnread__gVUtz"}},0xf6191486:e=>{e.exports={ReactionGutter:"ReactionGutter__d1Ozx",ReactionGutterOverflowEmojis:"ReactionGutterOverflowEmojis__xQRUc"}},0x1ab870191:e=>{e.exports={wrapperModal:"wrapperModal__e4P90",calendar:"calendar__gEVhB",footer:"footer__ZZQYo"}},0x22f8aaafa:e=>{e.exports={dateTimePicker:"dateTimePicker__VNqD2"}},0x22e21ba59:e=>{e.exports={reminderOptionsSelect:"reminderOptionsSelect__Ow8u0"}},0x19add9947:e=>{e.exports={channel_entity:"channel_entity__UtQDZ"}},0x6de811be:e=>{e.exports={hovercardContainer:"hovercardContainer__OFTrK",dateIconContainer:"dateIconContainer__RlSLy",dateEntityText:"dateEntityText__M4XIV",dateButtonContainer:"dateButtonContainer__QBYhc",buttonContents:"buttonContents__xjRnh",dateReminderTextContent:"dateReminderTextContent__WqzVS",dateReminderText:"dateReminderText__EVY1r",reminderOptions:"reminderOptions__MgiwD"}},0x158894c7e:e=>{e.exports={hovercardContainer:"hovercardContainer__KgOTw",changeFieldButtonContainer:"changeFieldButtonContainer__YA5R8",buttonContents:"buttonContents__G78t1"}},0xc73a6a57:e=>{e.exports={embeddedMessage:"embeddedMessage__oM760",embeddedMessageHeader:"embeddedMessageHeader__y8ryF",embeddedMessageContent:"embeddedMessageContent__dGwNm"}},0x3d579db4:e=>{e.exports={celebrationPill:"celebrationPill__Odzrf"}},0xfbe1d6bf:e=>{e.exports={agents:"agents__oVtjN",listWithoutTitle:"listWithoutTitle__Jd_5o",search:"search__J0kJd",heading:"heading__sN119",error:"error__fH5lr",list:"list___iNDK",listItem:"listItem__NOahH",listItemHover:"listItemHover__QWuEE",ctaField:"ctaField__aXBKy",ctaFieldButton:"ctaFieldButton__wFVdu",selectedAgent:"selectedAgent__iuGAk"}},0x156422bf:e=>{e.exports={agent:"agent__cgBLS",subtext:"subtext__b_JY_"}},0x24b18883e:e=>{e.exports={limitedAccessGroupDropdownCaption:"limitedAccessGroupDropdownCaption__vJK3f",limitedAccessGroupDropdownTitle:"limitedAccessGroupDropdownTitle__bx_0F",limitedAccessGroupDropdownTitleSelected:"limitedAccessGroupDropdownTitleSelected__oied0",limitedAccessGroupDropdownOptionSelected:"limitedAccessGroupDropdownOptionSelected__GqtAU"}},0x40d892cd:e=>{e.exports={modal:"modal__ErDJ9",modalContent:"modalContent___l0Xx",noPreview:"noPreview__hJliI",setupHeader:"setupHeader__H5aN9",setupContent:"setupContent__aZoN2",setupFooter:"setupFooter__HrYEb",emptyStateContainer:"emptyStateContainer__dRGha",addSourcesTextContainer:"addSourcesTextContainer__kOFLn",manageSourcesListContainer:"manageSourcesListContainer__C1b5l",subtitle:"subtitle__e7vMx",buttonContainer:"buttonContainer__QMlXy"}},0x57e82e39:e=>{e.exports={previewHeader:"previewHeader___JOaK",previewHeaderText:"previewHeaderText__bsOR3",previewContent:"previewContent__LAWyy",previewContentWithActiveConversation:"previewContentWithActiveConversation__qL8WG",agentDmView:"agentDmView___kh0e",agentDmViewHero:"agentDmViewHero__Cjy35",agentDmViewHeroHeader:"agentDmViewHeroHeader__Rgrtl",agentDmViewHeroBadge:"agentDmViewHeroBadge__wlNSk",agentDmViewHeroDescription:"agentDmViewHeroDescription__Ls7v8",messageInput:"messageInput__eJiuY",addSourcesContainer:"addSourcesContainer__BMEqC",addSourcesText:"addSourcesText__oygyt"}},0x1c95a2c1:e=>{e.exports={meterContainer:"meterContainer__tCgNG",meterFill:"meterFill__kLL7X",subtitle:"subtitle__zbxct"}},0x11931264:e=>{e.exports={connectContainer:"connectContainer__Kq0FR",iconContainer:"iconContainer__DHpp1",plugIconWrapper:"plugIconWrapper__yBpdQ",connectContent:"connectContent__XjCW6"}},0x4cd55786:e=>{e.exports={advanceDropDownContainer:"advanceDropDownContainer__H3iDu",advanceDropDownButton:"advanceDropDownButton__js5G2",advancedContent:"advancedContent__Sp3lf"}},0x7c4acb9:e=>{e.exports={modalContent:"modalContent__jBduu",hidePreview:"hidePreview__aXWFO",settingsHeader:"settingsHeader__wpPpV",settingsContent:"settingsContent__OjLC6",settingsFooter:"settingsFooter__EGvUD",addSourcesContainer:"addSourcesContainer__OS3nd",thumbnailContainer:"thumbnailContainer__RHTAu",messagesIcon:"messagesIcon__s9RJs",filesIcon:"filesIcon__xdRv6"}},0x1f81b24f1:e=>{e.exports={modalAlertText:"modalAlertText__OUkWK",switch:"switch__owlNB",label:"label___7aZm",labelExtraPaddingBottom:"labelExtraPaddingBottom__MOTx9",subtitleContainer:"subtitleContainer__y_RbL",subtitle:"subtitle__ChFJI",iconWrapper:"iconWrapper__Gvvnh",divider:"divider__XQRJH",advancedOverridesLink:"advancedOverridesLink__aPuLQ",linkWithPadding:"linkWithPadding__AYsIQ",toggleLink:"toggleLink__EPDbV",chevron:"chevron__EpdAi",mobileOverrideBannerContainer:"mobileOverrideBannerContainer__t763H",mobileOverrideBannerOpen:"mobileOverrideBannerOpen__EsTUj",mobileOverrideBannerClosed:"mobileOverrideBannerClosed__xHs71",mobileOverrideBanner:"mobileOverrideBanner__aSf_1",bannerTitle:"bannerTitle__l4jHY",mentionBadge:"mentionBadge__wb2_V"}},0x17274275:e=>{e.exports={wideModal:"wideModal__toM1k",listItem:"listItem__KDlkx",firstItem:"firstItem__j0GG5",lastItem:"lastItem__IWsrG"}},0x2157a3ac1:e=>{e.exports={inner:"inner__IQQaC",sideBar:"sideBar__IBFAH",footerButtons:"footerButtons__F5Tuu"}},0x1bbda52ad:e=>{e.exports={manage_channel_tabs_select:"manage_channel_tabs_select__sSpQj",manage_channel_tabs_add:"manage_channel_tabs_add__Yg741",manage_channel_tabs_list:"manage_channel_tabs_list__irHJo",list_item_handle:"list_item_handle__QEc_z",list_item_handle_visible:"list_item_handle_visible__fZmPw",manage_channel_error:"manage_channel_error__zwHZf",manage_channel_error_alert:"manage_channel_error_alert__Kzg3A",list_item:"list_item__Ajm3O",list_item_label:"list_item_label__V2HbL",list_item_label_truncate:"list_item_label_truncate__U53Jt",list_item_uneditable:"list_item_uneditable__SZMeo",list_item_content:"list_item_content__HmTzG",list_item_actions:"list_item_actions__QQY1b",list_item_actions_hover:"list_item_actions_hover__yhYVL",list_item_actions_always_show:"list_item_actions_always_show__gzt26",list_item_description:"list_item_description__faqFd",list_item_description_hide:"list_item_description_hide__zv5Kh"}},0x9c162739:e=>{e.exports={container:"container__tBIju",paywall:"paywall__rsrUh",paywallContent:"paywallContent__VdIst",paywallTitle:"paywallTitle__hfPXO",paywallSubtitle:"paywallSubtitle__rbsTm"}},0xbe07e68d:e=>{e.exports={container:"container__jCSkE",toolsList:"toolsList__Fc9cy",row:"row__EIMia",icon:"icon__dYS3C",info:"info__WJFin",name:"name__UGrrP",description:"description__c4WI4",loadingContainer:"loadingContainer__YVFy4",errorContainer:"errorContainer__BlTj8",loadingText:"loadingText__fx5Dr",errorText:"errorText__DVUY3"}},0x22fc52cce:e=>{e.exports={emailInvite:"emailInvite__PSVtV",emailInviteCardContainer:"emailInviteCardContainer__GuEkm"}},0x32f91a1e:e=>{e.exports={avatar:"avatar__JyeMd",emailInvitePreviewIcons:"emailInvitePreviewIcons__D0SdO",emailInvitePreviewContent:"emailInvitePreviewContent__xUngY",emailContentText:"emailContentText__DFNCy"}},0x4876f1b6:e=>{e.exports={channelSectionMultiSelect:"channelSectionMultiSelect__Iq0rY",smallChannelListEntity:"smallChannelListEntity__tTJsj",channelSectionMultiSelectOption:"channelSectionMultiSelectOption__jyNEx",channelSectionMultiSelectSectionInfo:"channelSectionMultiSelectSectionInfo__cvHVt",channelSectionMultiSelectSectionNameText:"channelSectionMultiSelectSectionNameText__nIY9u"}},0x11fbdf93f:e=>{e.exports={channelSectionOptionText:"channelSectionOptionText__X4Twg",channelSectionOptionDescription:"channelSectionOptionDescription__boImp"}},0x20cd090a7:e=>{e.exports={channelSectionCreateMultiStepModalStack:"channelSectionCreateMultiStepModalStack__mJQx3",channelSectionCreateStepOneFooter:"channelSectionCreateStepOneFooter__QZTPh",channelSectionCreateStepOneFooterStep:"channelSectionCreateStepOneFooterStep__MQzqx",channelSectionCreateStepOneError:"channelSectionCreateStepOneError__dlYcE",channelSectionInputWrapper:"channelSectionInputWrapper__Di48B",radioGroup:"radioGroup__nyP9l"}},0x24be3ff73:e=>{e.exports={channelSectionCreateStepTwoSubhead:"channelSectionCreateStepTwoSubhead__ecQ3u",channelSectionCreateStepTwoModalContent:"channelSectionCreateStepTwoModalContent__uW_Yr",channelSectionCreateStepTwoContentStack:"channelSectionCreateStepTwoContentStack__ZVmpF",channelSectionCreateStepTwoFooter:"channelSectionCreateStepTwoFooter__XlRqc",channelSectionCreateStepTwoToolbar:"channelSectionCreateStepTwoToolbar__oCNyz",channelSectionCreateStepTwoSelectedOnly:"channelSectionCreateStepTwoSelectedOnly__MS8vG",channelSectionCreateStepTwoFilterButton:"channelSectionCreateStepTwoFilterButton__T3eUb"}},0x11c3f605d:e=>{e.exports={selectedTop:"selectedTop__vcEKR",selectedMiddle:"selectedMiddle__g33zl",selectedBottom:"selectedBottom__Zf7FY"}},0x162120efc:e=>{e.exports={channelSectionsEduCoachmark:"channelSectionsEduCoachmark__UhFVQ",channelSectionsEduCoachmarkTitle:"channelSectionsEduCoachmarkTitle__eL3ru",channelSectionsEduCoachmarkContent:"channelSectionsEduCoachmarkContent__ML5ld"}},0x1493ceea1:e=>{e.exports={inviteSectionContainer:"inviteSectionContainer__AnqRv",inviteSectionText:"inviteSectionText__jh3Ra",inviteCta:"inviteCta__kGmxZ"}},0x1706c1438:e=>{e.exports={organizeModeMenu:"organizeModeMenu__GA0j0",organizeModeMenuCount:"organizeModeMenuCount__qhKPK",organizeModeMenuActions:"organizeModeMenuActions__M4kfF",organizeModeMenuOrganizeAction:"organizeModeMenuOrganizeAction__Av5je",doneButton:"doneButton__i_cP_"}},0x1449f5eb:e=>{e.exports={channelTeam:"channelTeam__UfIxp"}},0x185aa85ac:e=>{e.exports={mpimAvatars:"mpimAvatars__e2tXE",cAvatar:"c-avatar__ANGzv",cHidden_user_avatar:"c-hidden_user_avatar__l0SFT",mpimWrapper:"mpimWrapper__b9Cfo",mpimAvatarsMpim1:"mpimAvatarsMpim1__QRunF",mpimCounter:"mpimCounter__Vx4zw",mpimCounterSelected:"mpimCounterSelected__FaqEX"}},0x6770da20:e=>{e.exports={prefixTypingIcon:"prefixTypingIcon__P9vfT"}},0xff53c57:e=>{e.exports={huddleFakeMaskSvg:"huddleFakeMaskSvg__qSj9b",huddleFakeMaskSvgInHuddle:"huddleFakeMaskSvgInHuddle__uYzdL"}},0x1297c5b76:e=>{e.exports={messageFailureSuffix:"messageFailureSuffix__N56Kr",badgeDot:"badgeDot__GaJh0"}},0x1650f6656:e=>{e.exports={editModeCheckbox:"editModeCheckbox__kpwgD",editModeCheckboxSelected:"editModeCheckboxSelected__gEBWs",digestIcon:"digestIcon__sXoEP",mutedIcon:"mutedIcon__UGSJQ"}},0xf7669308:e=>{e.exports={section:"section__hzdPy",sectionLegend:"sectionLegend__FZzro",actionsContainer:"actionsContainer__b9ZAa",actionButton:"actionButton__s8Irf",deleteButton:"deleteButton__jlGWf"}},0x1cef2e035:e=>{e.exports={section:"section__AaWzr",sectionLegend:"sectionLegend__MSu3e",conversationsContainer:"conversationsContainer__C2iN3",searchSelect:"searchSelect__IFxtB",channelRow:"channelRow__yX83P",channelOptionContent:"channelOptionContent__RFVey",channelStart:"channelStart__uCgUq",channelMiddle:"channelMiddle__cdTgc",channelName:"channelName__ZIA6P",bold:"bold__b59AR",youLabel:"youLabel__Ewj9x",channelEnd:"channelEnd__H8UoV",limitMessage:"limitMessage__ncuiq"}},0x1ca7885e6:e=>{e.exports={section:"section__ou8FD",sectionLegend:"sectionLegend__F8fXQ",modalContainer:"modalContainer__PSeMM",header:"header__oORNS",sectionIcon:"sectionIcon__tTVw4",title:"title__yKHHV",headerButtons:"headerButtons__d7z8u",tabsWithButtons:"tabsWithButtons__j1isU",singleTab:"singleTab__wEX4A"}},0x7332fa2f:e=>{e.exports={showSectionState:"showSectionState__DGnsr",sectionMenuSubmenuLink:"sectionMenuSubmenuLink__J1jsC",contextMenuChannel:"contextMenuChannel__Ib573",unreadIcon:"unreadIcon__ZY6h2",shareSectionEmoji:"shareSectionEmoji__tJLxY",subMenuLabel:"subMenuLabel__c5UsC",subMenuLabelSecondaryText:"subMenuLabelSecondaryText__ClflB"}},0x12fc8166d:e=>{e.exports={avatarIconContainer:"avatarIconContainer__KN8ou",channelMenuLabel:"channelMenuLabel__p_ZKU"}},0x1084efb4a:e=>{e.exports={sectionHeadingLabel:"sectionHeadingLabel__pJTbB",sectionHeadingLabelClickable:"sectionHeadingLabelClickable__egmct",sectionHeadingLabelEllipsisOrBadge:"sectionHeadingLabelEllipsisOrBadge__zF_oj",sectionHeadingLabelOverflow:"sectionHeadingLabelOverflow__ua20k",sectionHeadingLabelNoTransition:"sectionHeadingLabelNoTransition__yAFCa",sectionHeadingLabelMuted:"sectionHeadingLabelMuted__NDXqw",sectionHeadingLabelUnreads:"sectionHeadingLabelUnreads__E3CFo",sectionHeadingLabelSetup:"sectionHeadingLabelSetup__EpJve",sectionHeadingLabelSetupSlackConnect:"sectionHeadingLabelSetupSlackConnect__Qq0IU",sectionHeadingLabelSetupDms:"sectionHeadingLabelSetupDms__Nvq80"}},0x1a00d8796:e=>{e.exports={multiLineDescription:"multiLineDescription__Ku_vJ"}},0x2405d50f:e=>{e.exports={headingCoachmark:"headingCoachmark__bH4A_",headingCoachmarkTitle:"headingCoachmarkTitle__21oxg",headingCoachmarkDescription:"headingCoachmarkDescription__kOMfH"}},0x2d7ecf37:e=>{e.exports={container:"container__bxot2",menu:"menu__dlMGK",toggleAndLabel:"toggleAndLabel__g8Gk4",emoji:"emoji__OWo11",active:"active__wKCsN",muted:"muted__yCICC",expand:"expand__wdLJX",expandContainer:"expandContainer__sgXlc",hasEmoji:"hasEmoji__Zt0wH",editMode:"editMode__mpGcV",labelContent:"labelContent__ND43C",primaryColor:"primaryColor__DVDDx",tooltip:"tooltip__oXvrS",labelWithBadgeWrapper:"labelWithBadgeWrapper__fjqlg",callout:"callout__MHCtX",overflowEllipsis:"overflowEllipsis__HJDrl",buttonsContainer:"buttonsContainer__tQgEF",sectionbutton:"sectionbutton__CadG9",plusButton:"plusButton__W0iNT",shareButton:"shareButton__EdYZm",ellipsis:"ellipsis__Lwi05",showing:"showing__rj_ek",bgActive:"bgActive__hW3I3",badge:"badge__isXfA",sectionMenuOpen:"sectionMenuOpen__Pwa2E",collapsed:"collapsed__gS1sE",priority:"priority__DG8Fg",coachmarkActive:"coachmarkActive__jmQn0",spinnerContainer:"spinnerContainer__BJa3q"}},0x94eb4c60:e=>{e.exports={buttonContainer:"buttonContainer__XGg1k",iconPrefixBackground:"iconPrefixBackground__Th014",iconPrefixIconXs:"iconPrefixIconXs__tnv69",iconPrefixIconS:"iconPrefixIconS__aJEDp",iconPrefixFilled:"iconPrefixFilled__Rc18X"}},0x13e9d5856:e=>{e.exports={tooltipHeading:"tooltipHeading__xkW8p",tooltipContent:"tooltipContent__sH6iW",ctaLegacy:"ctaLegacy__JANRp",pChannel_sidebar__cta_tip_tag:"p-channel_sidebar__cta_tip_tag__zHp_t",ctaContainer:"ctaContainer__oaXsp",createASectionCta:"createASectionCta__kofsR",ctaUpdatesM1:"ctaUpdatesM1__dl2TV",ctaTipTag:"ctaTipTag__VNZAr"}},0xb16beb2e:e=>{e.exports={container:"container__okBc8",containerInfo:"containerInfo__lubJD",containerWarning:"containerWarning__GQAIy",containerUrgent:"containerUrgent__REs1Z",icon:"icon__q24by",info:"info__IdxX8",versionNumber:"versionNumber__DH1Ph",versionDescription:"versionDescription__KRXow"}},0x203c9796:e=>{e.exports={divider:"divider__QhKlG"}},0x19280e3a2:e=>{e.exports={banner:"banner__kYRUH",label:"label__H84QF",isHovered:"isHovered__FQ0B2",spacer:"spacer__euZCI"}},0x164da2924:e=>{e.exports={closeCircle:"closeCircle__eAONG"}},0x1419d828a:e=>{e.exports={savedToast:"savedToast__yG_ek",pChannel_sidebar__saved__toast:"p-channel_sidebar__saved__toast__pQbAm",noAnimation:"noAnimation__FeRfe",linkSavedToasting:"linkSavedToasting__JBoGP",pChannel_sidebar__saved__toast_fade:"p-channel_sidebar__saved__toast_fade__UoVXh"}},0x155938222:e=>{e.exports={coachmarkBg:"coachmarkBg__sDSXl",staticClassNames:"staticClassNames__cptdO"}},0x21f41f335:e=>{e.exports={sidebarBanner:"sidebarBanner__TaHKZ",sidebarBannerTop:"sidebarBannerTop__h4Oue",sidebarBannerBottom:"sidebarBannerBottom__8F6br",sidebarBannerMentions:"sidebarBannerMentions__xNtJV",sidebarBannerUnreads:"sidebarBannerUnreads__lOahz",skClientThemeDark:"sk-client-theme--dark__Jwf9i",skClientThemeLightInvertedSidebar:"sk-client-theme--light-inverted-sidebar__ll43z"}},0xc1746f92:e=>{e.exports={modalLoaderSection:"modal-loader-section__U3vR4"}},0x3ac3626:e=>{e.exports={container:"container__YYwNg",button:"button__LaAZh"}},0x1bc0a3228:e=>{e.exports={container:"container__Vlbzm",button:"button__ngN9S",content:"content__KXsHb",multiLink:"multiLink__ifG_L",closeButton:"closeButton__kREKW",avatar:"avatar__iI4ue",memberSlug:"memberSlug__ak44L"}},0x21ad9b85e:e=>{e.exports={quickReplyBanner:"quickReplyBanner__ToYbD",text:"text__iqf50",close:"close__LSmIG"}},0x22725f619:e=>{e.exports={context_bar_salesforce_channel_linked_private_content_link:"context_bar_salesforce_channel_linked_private_content_link__ViZGD"}},0x1ac645aac:e=>{e.exports={container:"container__HGgq6",closeButton:"closeButton__JfwER"}},0x12d348dfc:e=>{e.exports={context_bar_salesforce_channel_linked_private_icon_container:"context_bar_salesforce_channel_linked_private_icon_container__g5VJo"}},0x1c054fd54:e=>{e.exports={overlay:"overlay__iQfAM"}},0x1c9953ecf:e=>{e.exports={crmProvisioningPage:"crmProvisioningPage__fMyd9",crmProvisioningPageTitle:"crmProvisioningPageTitle__Pa4ax",crmProvisioningPageDescription:"crmProvisioningPageDescription__zBBWk",imgContainer:"imgContainer__VyeED",slack:"slack__xJ9X3",salesforce:"salesforce__BI0j5",ellipsis:"ellipsis__JrLcE",crmProvisioningPageWrapper:"crmProvisioningPageWrapper__y_aip"}},0x21e74fa93:e=>{e.exports={radiogroup:"radiogroup__iXuAW",chooseHowToLeave:"chooseHowToLeave__MP9xa",radioLabelFirst:"radioLabelFirst__N5KSs",optionContainer:"optionContainer__IFxnD"}},0x10ac8a3a:e=>{e.exports={dragPreview:"dragPreview__QsU2n",emoji:"emoji__iCynt",label:"label__uhd6v"}},0xce52ce6a:e=>{e.exports={preview:"preview__M9g9Y",resetButton:"resetButton__l9xCr"}},0x9d629e0a:e=>{e.exports={item:"item__ZMu1A",isVisible:"isVisible__lBVQZ",isDraggingRight:"isDraggingRight__oXoAz",isDraggingLeft:"isDraggingLeft__jBS7D"}},0x1347d5361:e=>{e.exports={editProfileDragOverlay:"editProfileDragOverlay__izYR4",threadDragOverlayFadeIn:"threadDragOverlayFadeIn__Ho9lp",overlayInfo:"overlayInfo__e4DQq",title:"title__DPSoh",editProfileDragOverlayOnboardingTask:"editProfileDragOverlayOnboardingTask__ottkX",fileUploadIcon:"fileUploadIcon__Fpmoq",dropToUploadText:"dropToUploadText__q_4g1"}},0x1ace8c6bd:e=>{e.exports={profilePhotoExamples:"profilePhotoExamples__W9jdq",profilePhotoExampleHeader:"profilePhotoExampleHeader__quw_2",profilePhotoExampleContent:"profilePhotoExampleContent__L0Dw7",profilePhotoExampleImage:"profilePhotoExampleImage__hUgeY",profilePhotoExampleItem:"profilePhotoExampleItem__OOFYJ",checkIcon:"checkIcon__E9Shy",xIcon:"xIcon__e_LtU"}},0x759c7c1c:e=>{e.exports={banner:"banner__FmmLr",bannerFading:"bannerFading__kyHlO",bannerProgress:"bannerProgress__jmzAw",bannerProgressComplete:"bannerProgressComplete__Kmopt",bannerProgressInner:"bannerProgressInner__zQ_FI",bannerProgressInnerAnimated:"bannerProgressInnerAnimated__aJERY",pFile_upload_bannerProgress_bar:"p-file_upload_banner--progress_bar__ZMT7u",bannerText:"bannerText__rfRcp",bannerTextName:"bannerTextName__XLyUE",pFile_upload_banner__text_percent:"p-file_upload_banner__text_percent__HVnsa"}},0x150b70873:e=>{e.exports={container:"container__JiSXN",tokensContainer:"tokensContainer__cRDAZ",toText:"toText___4BjB",customMessage:"customMessage__e4rtv"}},0x242843d69:e=>{e.exports={contentHeader:"contentHeader__O5afU",contentSection:"contentSection__tAeB_",noteHeader:"noteHeader__utnfg",lists:"lists__S2Pq4"}},0x3e240f31:e=>{e.exports={avatarContainer:"avatarContainer__qaikH",agentAvatar:"agentAvatar__GYynZ"}},0xf9d5f7f2:e=>{e.exports={agentforceCoachmark:"agentforceCoachmark__JJvwq"}},0xa22cfefe:e=>{e.exports={secondaryText:"secondaryText__oYuQA"}},0xc51a6cc5:e=>{e.exports={box:"box__BbYzd",listStyleNone:"listStyleNone__fGPrE",padding50:"padding50__KTivo",padding100:"padding100__FO4Df",padding125:"padding125__wPCLi",paddingInlineStart125:"paddingInlineStart125__AHXRJ",paddingInlineStart250:"paddingInlineStart250__ryMsp",paddingInline25:"paddingInline25__QlxnG",paddingInline100:"paddingInline100__RY7w2",paddingInline150:"paddingInline150__qtcbG",paddingInline175:"paddingInline175__GIyfT",paddingInline200:"paddingInline200__rPpR8",paddingInline250:"paddingInline250__ZeMZ7",paddingBlock100:"paddingBlock100__DVwcw",paddingBlockEnd150:"paddingBlockEnd150__rGDet",backgroundColorCoreBaseSecondary:"backgroundColorCoreBaseSecondary__UAaW_",backgroundColorCoreSurfacePrimary:"backgroundColorCoreSurfacePrimary__Z8_oG",backgroundColorCoreSurfaceHighlight3:"backgroundColorCoreSurfaceHighlight3__RTwhL",backgroundLightCoreBaseSecondary:"backgroundLightCoreBaseSecondary__xlKtd",borderRadiusXLarge:"borderRadiusXLarge__Do4ag",borderRadiusRounded:"borderRadiusRounded__B28WR",borderRadiusBase:"borderRadiusBase__LrHG9",borderColorCoreSurfaceSecondary:"borderColorCoreSurfaceSecondary__wMLkW",borderColorCoreOutlineTertiary:"borderColorCoreOutlineTertiary__HVCLe",borderRegular:"borderRegular__gW1CN",heightFill:"heightFill__XbzxW",inlineFlex:"inlineFlex__r7dDr"}},0x1f78c1883:e=>{e.exports={container:"container__dwviQ",loading:"loading__jykT6",exampleText:"example-text__rgEsX",exampleSampleData:"example-sample-data__UAHJa",unfurlPreviewContainer:"unfurl-preview-container__OOZsM",listOption:"list-option__Olnaq",comingSoonInHeader:"coming-soon-in-header__pdudl",comingSoonTag:"coming-soon-tag__PP3E6",dwaContainer:"dwaContainer__QmHUn",link:"link__fi8Om"}},0x2b0f6209:e=>{e.exports={baseEmojiInputIcon:"base-emoji-input-icon__Z7Ry9",emojiInputCircleIcon:"emoji-input-circle-icon__FXwCK",emojiInputSmileIcon:"emoji-input-smile-icon__dZMqd",emojiInputHappyIcon:"emoji-input-happy-icon__MUp_T",fileSectionInput:"file-section-input__jBAbr",fileSectionInputWrapper:"file-section-input-wrapper__r3MjT",emojiPicker:"emoji-picker__db4TC",clearIconWrapper:"clear-icon-wrapper__R9fr4",clearButton:"clear-button__EIOH7",cButtonFocusVisible:"c-button--focus-visible__D7QoU",clearIcon:"clear-icon__sRkro"}},0x243a9d0e4:e=>{e.exports={emptySectionCaption:"emptySectionCaption__qTrgw"}},0xb4d0a8c2:e=>{e.exports={filterLabel:"filterLabel__pjKWZ",iconImage:"iconImage__s5njm",error_state_related_list:"error_state_related_list__Jwbmy"}},0x448f547b:e=>{e.exports={blurFallback:"blurFallback__lgFho",thumbnailWrapper:"thumbnailWrapper__y4j86",thumbnailWrapperV2:"thumbnailWrapperV2__WqiHD",altBadge:"altBadge__HFa53",plusAltBadgeWhenActive:"plusAltBadgeWhenActive__bZStN",popover:"popover__uA2Ta",popoverDynamic:"popoverDynamic__SIBzB",popoverHeader:"popoverHeader__Xt_vX",popoverHeaderActions:"popoverHeaderActions__eNz2Q",popoverTitle:"popoverTitle__sSyfF",popoverContent:"popoverContent__yRKWc",popoverContentScrollable:"popoverContentScrollable__fne2j"}},0x1acf15cf9:e=>{e.exports={fileTitleBadge:"fileTitleBadge__Jlbfg",fileTitleBadgeSizeSmall:"fileTitleBadgeSizeSmall__VZmBw",topResultsfileTitleBadge:"topResultsfileTitleBadge__AhxTW",fileTitleBadgeExplorerTile:"fileTitleBadgeExplorerTile__O_ZqX",fileTitleBadgeColorOcean:"fileTitleBadgeColorOcean__fBRv0",fileTitleBadgeColorGrass:"fileTitleBadgeColorGrass___6NKY",fileTitleBadgeColorTomato:"fileTitleBadgeColorTomato__fHoc4",fileTitleBadgeColorHoneycomb:"fileTitleBadgeColorHoneycomb__CQY9y",fileTitleBadgeColorFlamingo:"fileTitleBadgeColorFlamingo__BWmWb",fileTitleBadgeColorAqua:"fileTitleBadgeColorAqua__xO_M9",fileTitleBadgeColorSangria:"fileTitleBadgeColorSangria__Zfe3C"}},0x1bd76421c:e=>{e.exports={container:"container__VHCEk",fileGallery:"fileGallery__Ao50V",fileContainer:"fileContainer__xfW0J",mediaFileThumbnailContainer:"mediaFileThumbnailContainer__eRelu",attachmentItem:"attachmentItem___ggiP",attachmentInfo:"attachmentInfo__SLaeY",attachmentName:"attachmentName__o71jY",attachmentSize:"attachmentSize__u4lP4"}},0x17bc3bfdb:e=>{e.exports={section:"section__lWDsb",label:"label__TSi0W",content:"content__x6MuN",emailIframe:"emailIframe__jMxtT"}},0x977eaed6:e=>{e.exports={emailAddressContent:"emailAddressContent__VB4Ns",emailAddressContentWarning:"emailAddressContentWarning__PEiFL",emailAddressText:"emailAddressText__CfOq1",warningIcon:"warningIcon__foTxD"}},0x11e29432f:e=>{e.exports={wrapper:"wrapper__nq4fb"}},0x9912e4ab:e=>{e.exports={actions:"actions__RydKL",meetingCard:"meetingCard__d_ZtN",icon:"icon__NPd8I",iconImage:"iconImage__xOlwU",content:"content__Hw45X",title:"title__nu2GW",scheduled:"scheduled__NhRRx"}},0xf05970b5:e=>{e.exports={nuxHeaderContent:"nux-header-content__kasNP",narrow:"narrow__eqCc7",largeTopPadding:"large-top-padding__eU4Us",nuxHeadingContent:"nux-heading-content__i3W2E",nuxSubheadContent:"nux-subhead-content__KbgSW"}},0x19f43297d:e=>{e.exports={buttonBase:"buttonBase__udRtI",yellow:"yellow__bm3HG",gray:"gray__x9_rM"}},0x2096a3930:e=>{e.exports={agentThreadTitle:"agentThreadTitle__oWiwP"}},0x1f576e723:e=>{e.exports={agentSenderInfo:"agentSenderInfo__bUfFX",agentLoadingDiv:"agentLoadingDiv__JGHfR",agentLoadingContainer:"agentLoadingContainer__qCssK",agentLoadingText:"agentLoadingText__YdGGW"}},0x1fd31879f:e=>{e.exports={threads:"threads__Eim7c",list:"list__GSUJQ",itemHeader:"item-header__LtlqS",itemHeaderWithSpacing:"item-header-with-spacing__fCO0Q",listItem:"list-item__BGZ1c",listTitle:"list-title__pYl6J",listSecondary:"list-secondary__mRjyD",history:"history__LLKr6",aiAppHistoryContainer:"aiAppHistoryContainer__ylX2j",historyListItemContainer:"history-list-item-container__vXLof",historyListItem:"history-list-item__Lbgpl",historyListItemInner:"history-list-item-inner__jGrGj",historyListItemV2Active:"history-list-item-v2-active__o0ct2",historyListItemIcon:"history-list-item-icon__ORUiR",historyListItemInfo:"history-list-item-info__bzpsg",historyListItemTitle:"history-list-item-title__iIxgd",historyListItemTitleV2Single:"history-list-item-title-v2-single__OjoEX",historyListItemTitleV2:"history-list-item-title-v2__zq3JF",historyListItemSubtitle:"history-list-item-subtitle__VPrUb",historyListItemBadge:"history-list-item-badge___NxXZ",historyListItemLabel:"history-list-item-label__iDxFp",historyListItemLabelIcon:"history-list-item-label-icon__WAgeB",historyListItemLabelText:"history-list-item-label-text__dwaRc"}},0x4c2f3cc2:e=>{e.exports={container:"container__J6kd9"}},0xeec65681:e=>{e.exports={shareContextContainer:"shareContextContainer__xr9Pd",entityIcon:"entityIcon__eIyS0",msgEntityItem:"msgEntityItem__krueP",msgEntityItemHeader:"msgEntityItemHeader__wv4T0",msgEntityHeaderTitleText:"msgEntityHeaderTitleText__UZgFW",msgEntityHeaderTimestamp:"msgEntityHeaderTimestamp__opFkY",msgEntityItemSender:"msgEntityItemSender__cQQUs",msgEntityItemContent:"msgEntityItemContent__juOuG",msgEntityItemReplies:"msgEntityItemReplies__LGOlz",shareDivider:"shareDivider__GMW4a",shareDividerEmpty:"shareDividerEmpty__moV0_",emptyState:"emptyState__MgpDI",emptyStateImage:"emptyStateImage__yNq0t",emptyStateTitle:"emptyStateTitle__NrTbg",emptyStateDescription:"emptyStateDescription__htM7b",fileEntityItem:"fileEntityItem__Z3lh7"}},0x1cf680dde:e=>{e.exports={container:"container__QjvAv",content:"content__JYq80",senderRecipientContainer:"senderRecipientContainer__xls8R",senderRecipientSlug:"senderRecipientSlug__GRJWy",loadingContainer:"loadingContainer__EOhO_",emailSubject:"emailSubject__CNv_Y",subject:"subject__qIJf6"}},0x47682ee6:e=>{e.exports={promptButton:"promptButton__o9hh_"}},0x145cd62cf:e=>{e.exports={workspacesIcon:"workspacesIcon__ywjpJ"}},0xaa554453:e=>{e.exports={profileSection:"profileSection__S7s4j",contents:"contents__j3wvs",contentsSlideIn:"contents-slide-in__UZAyF",disclaimer:"disclaimer__cvan8",buttonCaption:"buttonCaption__kWLA3",headerCaption:"headerCaption__MTOfI",buttonContainer:"buttonContainer__ZMBWt"}},0x111941c7c:e=>{e.exports={calendarProfileScheduler:"calendarProfileScheduler__sNg_s",suggestionsSection:"suggestionsSection__jSszP",suggestionTitle:"suggestionTitle__dt0LQ",suggestions:"suggestions__UF5k1",seeAvailability:"seeAvailability__nTvoB",calendarLink:"calendarLink__HgP3x"}},0x12acdfbec:e=>{e.exports={suggestedTime:"suggestedTime__oYq8s"}},0x169991781:e=>{e.exports={entityList:"entityList__q2zhs"}},0x1132c0065:e=>{e.exports={headerContainer:"headerContainer__ASCFG"}},0x724ec011:e=>{e.exports={iconContainer:"iconContainer__bQ_5o",aquarium:"aquarium__XJZOq",charcoal:"charcoal__QGGbt",jade:"jade__YNzA0",aubergine:"aubergine__vLds_",flamingo:"flamingo__V1nHR",indigo:"indigo__BYZHM",tangerine:"tangerine__bwBgm",cilantro:"cilantro__DnhBS",campfire:"campfire__zgLsw",honeycomb:"honeycomb__NwOlq",tomato:"tomato__o20Z6"}},0x26c3cd13:e=>{e.exports={label:"label__RzEnz",viewDetailsButtonText:"viewDetailsButtonText__IKqw1",stepDetails:"stepDetails__r3kio",stepDetailsHeader:"stepDetailsHeader__Ll5BX"}},0xe025ffd3:e=>{e.exports={description:"description__NZYOf"}},0xee558913:e=>{e.exports={actionCards:"actionCards__tKvkA"}},0x1c98dbdca:e=>{e.exports={animationWrap:"animationWrap__ribHt",image:"image__bzQGQ"}},0x1a4cd09df:e=>{e.exports={title:"title__tDet7"}},0x1f30edf66:e=>{e.exports={header:"header__xDYH3",loading:"loading__L0I3J"}},0x13156f64c:e=>{e.exports={backgroundColorPalettesAquarium5:"backgroundColorPalettesAquarium5___MIVC",backgroundColorPalettesAubergine0:"backgroundColorPalettesAubergine0__yp4sg",backgroundColorPalettesAubergine5:"backgroundColorPalettesAubergine5__xnOm2",backgroundColorPalettesAubergine10:"backgroundColorPalettesAubergine10__rw930",backgroundColorPalettesAubergine30:"backgroundColorPalettesAubergine30___x41U",backgroundColorPalettesAubergine40:"backgroundColorPalettesAubergine40__zeY0G",backgroundColorPalettesAubergine50:"backgroundColorPalettesAubergine50__Daaay",backgroundColorPalettesCampfire5:"backgroundColorPalettesCampfire5__cn5Vf",backgroundColorPalettesCilantro30:"backgroundColorPalettesCilantro30__Zeh0l",backgroundColorPalettesHoneycomb5:"backgroundColorPalettesHoneycomb5__B8TmN",backgroundColorPalettesHoneycomb30:"backgroundColorPalettesHoneycomb30__cJjf3",backgroundColorPalettesIndigo5:"backgroundColorPalettesIndigo5__rh1xD",backgroundColorPalettesIndigo20:"backgroundColorPalettesIndigo20__VjABw",backgroundColorPalettesIndigo50:"backgroundColorPalettesIndigo50__BdNLS",backgroundColorPalettesJade40:"backgroundColorPalettesJade40__uaYN8",backgroundColorPalettesJade70:"backgroundColorPalettesJade70__snAPR",backgroundColorPalettesLagoon5:"backgroundColorPalettesLagoon5__HppmO",backgroundColorPalettesLagoon30:"backgroundColorPalettesLagoon30__AzvcG",backgroundColorPalettesLagoon40:"backgroundColorPalettesLagoon40__JnvId",backgroundColorPalettesMojito5:"backgroundColorPalettesMojito5__bbv_1",backgroundColorPalettesOcean5:"backgroundColorPalettesOcean5___io7x",backgroundColorPalettesOcean20:"backgroundColorPalettesOcean20__MHnWt",backgroundColorPalettesPaprika50:"backgroundColorPalettesPaprika50__OYx4C",backgroundColorPalettesPaprika5:"backgroundColorPalettesPaprika5__zboiT",backgroundColorPalettesSangria5:"backgroundColorPalettesSangria5__uDk2J",backgroundColorPalettesSunflower20:"backgroundColorPalettesSunflower20__Tdxjb",backgroundColorPalettesSunflower40:"backgroundColorPalettesSunflower40__g5Rya",backgroundColorPalettesTangerine40:"backgroundColorPalettesTangerine40__Sj1UE",backgroundColorPalettesTomato40:"backgroundColorPalettesTomato40__IUOVr",backgroundColorCoreSurfacePrimary:"backgroundColorCoreSurfacePrimary__eLkrd",colorPrimary:"colorPrimary__h2bDa",colorSecondary:"colorSecondary__OHliL",colorTertiary:"colorTertiary__e22Bh",colorThemeInversePrimary:"colorThemeInversePrimary__btClg",colorCoreContentHighlight1:"colorCoreContentHighlight1__LIRpK",colorCoreContentHighlight2:"colorCoreContentHighlight2__NM5Dz",colorCoreContentHighlight3:"colorCoreContentHighlight3__cMUtx",colorCoreContentImportant:"colorCoreContentImportant__yunAI",colorPalettesAubergine70:"colorPalettesAubergine70__u6Qhm",colorPalettesCampfire70:"colorPalettesCampfire70__GGs6G",colorPalettesCilantro70:"colorPalettesCilantro70__NvoIW",colorPalettesLagoon70:"colorPalettesLagoon70__AJYyd",colorPalettesSunflower60:"colorPalettesSunflower60__G8gaJ",colorInherit:"colorInherit__P1i5l",actionCard:"actionCard__Z29EC",animated:"animated__Hi2oA"}},0x1f8638360:e=>{e.exports={container:"container__FjRzT"}},0x22f8dd124:e=>{e.exports={backgroundColorPalettesAquarium5:"backgroundColorPalettesAquarium5__UhYqe",backgroundColorPalettesAubergine0:"backgroundColorPalettesAubergine0__BkhFI",backgroundColorPalettesAubergine5:"backgroundColorPalettesAubergine5__UjIuA",backgroundColorPalettesAubergine10:"backgroundColorPalettesAubergine10__nsntJ",backgroundColorPalettesAubergine30:"backgroundColorPalettesAubergine30__mM0sV",backgroundColorPalettesAubergine40:"backgroundColorPalettesAubergine40__skv3b",backgroundColorPalettesAubergine50:"backgroundColorPalettesAubergine50__pdtqq",backgroundColorPalettesCampfire5:"backgroundColorPalettesCampfire5__DMyqP",backgroundColorPalettesCilantro30:"backgroundColorPalettesCilantro30__xW8Jp",backgroundColorPalettesHoneycomb5:"backgroundColorPalettesHoneycomb5__AnPa9",backgroundColorPalettesHoneycomb30:"backgroundColorPalettesHoneycomb30__Ze9Pj",backgroundColorPalettesIndigo5:"backgroundColorPalettesIndigo5___QRdP",backgroundColorPalettesIndigo20:"backgroundColorPalettesIndigo20__OYXcK",backgroundColorPalettesIndigo50:"backgroundColorPalettesIndigo50__e6wzd",backgroundColorPalettesJade40:"backgroundColorPalettesJade40__EQvRa",backgroundColorPalettesJade70:"backgroundColorPalettesJade70__lekdu",backgroundColorPalettesLagoon5:"backgroundColorPalettesLagoon5__dD8kx",backgroundColorPalettesLagoon30:"backgroundColorPalettesLagoon30__qs_HE",backgroundColorPalettesLagoon40:"backgroundColorPalettesLagoon40__TjbG2",backgroundColorPalettesMojito5:"backgroundColorPalettesMojito5__Lihka",backgroundColorPalettesOcean5:"backgroundColorPalettesOcean5__wTWWB",backgroundColorPalettesOcean20:"backgroundColorPalettesOcean20__wa7dH",backgroundColorPalettesPaprika50:"backgroundColorPalettesPaprika50__HuyGt",backgroundColorPalettesPaprika5:"backgroundColorPalettesPaprika5__fRph4",backgroundColorPalettesSangria5:"backgroundColorPalettesSangria5__twpQw",backgroundColorPalettesSunflower20:"backgroundColorPalettesSunflower20__iRKKl",backgroundColorPalettesSunflower40:"backgroundColorPalettesSunflower40__JGaIY",backgroundColorPalettesTangerine40:"backgroundColorPalettesTangerine40__qJW6B",backgroundColorPalettesTomato40:"backgroundColorPalettesTomato40__O3kes",backgroundColorCoreSurfacePrimary:"backgroundColorCoreSurfacePrimary___FU9E",colorPrimary:"colorPrimary__pqMUI",colorSecondary:"colorSecondary__tXF3L",colorTertiary:"colorTertiary__TG9nw",colorThemeInversePrimary:"colorThemeInversePrimary__r8zk0",colorCoreContentHighlight1:"colorCoreContentHighlight1__UnioN",colorCoreContentHighlight2:"colorCoreContentHighlight2__DHtNc",colorCoreContentHighlight3:"colorCoreContentHighlight3__pRyzO",colorCoreContentImportant:"colorCoreContentImportant__vXDs2",colorPalettesAubergine70:"colorPalettesAubergine70__esQbh",colorPalettesCampfire70:"colorPalettesCampfire70__CbMzg",colorPalettesCilantro70:"colorPalettesCilantro70__ktV7V",colorPalettesLagoon70:"colorPalettesLagoon70__F1Uwp",colorPalettesSunflower60:"colorPalettesSunflower60__hciKV",colorInherit:"colorInherit__E2Wfp",baseBorder:"baseBorder__aBQH0",borderColorCoreOutlineTertiary:"borderColorCoreOutlineTertiary__hyyWE",borderBottomColorCoreOutlineTertiary:"borderBottomColorCoreOutlineTertiary__boL_G",borderTopColorCoreOutlineTertiary:"borderTopColorCoreOutlineTertiary__hCjmJ",borderLeftColorCoreOutlineTertiary:"borderLeftColorCoreOutlineTertiary__VSsDc",borderRightColorCoreOutlineTertiary:"borderRightColorCoreOutlineTertiary__AEmp9",borderWidth1px:"borderWidth1px__hrHO6",borderBottomWidth1px:"borderBottomWidth1px__MpemO",borderTopWidth1px:"borderTopWidth1px__OX8RQ",borderLeftWidth1px:"borderLeftWidth1px__Wvgyi",borderRightWidth1px:"borderRightWidth1px__57jdl",borderRadiusNone:"borderRadiusNone__PuxYC",borderRadiusSmall:"borderRadiusSmall__tiE8J",borderRadiusBase:"borderRadiusBase__XWg1d",borderRadiusLarge:"borderRadiusLarge__TjjvZ",borderRadiusXlarge:"borderRadiusXlarge__DrJCO",padding125:"padding125__bmuS4",paddingTop125:"paddingTop125__sYxiq",paddingRight125:"paddingRight125__S4diI",paddingBottom125:"paddingBottom125__eG8iI",paddingLeft125:"paddingLeft125__b3UYC"}},0x11ef06522:e=>{e.exports={infoTab:"infoTab__CAUV7",container:"container__pbw5x",mediumContainer:"mediumContainer__dF8zS"}},0xa785845e:e=>{e.exports={cardsContainer:"cardsContainer__OTIvX",cardContainer:"cardContainer__uXDsY",cardContainerImg:"cardContainerImg__rCUUa",lagoon:"lagoon__MG9UQ",aubergine:"aubergine__ETp71",cilantro:"cilantro__r5shg",sunflower:"sunflower__r4abx",flamingo:"flamingo__Q_Ynx",flamingo30:"flamingo30__Y1SZ6",indigo10:"indigo10__uJLLG",cardImg:"cardImg__z4O6B",cardContent:"cardContent__aKoTc",arrows:"arrows__iz2fp",left:"left__TiWOa",right:"right__dFttJ"}},0x62eca2aa:e=>{e.exports={backgroundColorPalettesAquarium5:"backgroundColorPalettesAquarium5___6_6m",backgroundColorPalettesAubergine0:"backgroundColorPalettesAubergine0__96WJp",backgroundColorPalettesAubergine5:"backgroundColorPalettesAubergine5__A5WrP",backgroundColorPalettesAubergine10:"backgroundColorPalettesAubergine10__7qZ2A",backgroundColorPalettesAubergine30:"backgroundColorPalettesAubergine30__LcFJs",backgroundColorPalettesAubergine40:"backgroundColorPalettesAubergine40__IscmE",backgroundColorPalettesAubergine50:"backgroundColorPalettesAubergine50__sBC2y",backgroundColorPalettesCampfire5:"backgroundColorPalettesCampfire5__KtkO2",backgroundColorPalettesCilantro30:"backgroundColorPalettesCilantro30__i5oqV",backgroundColorPalettesHoneycomb5:"backgroundColorPalettesHoneycomb5__IeyDe",backgroundColorPalettesHoneycomb30:"backgroundColorPalettesHoneycomb30__ngrPU",backgroundColorPalettesIndigo5:"backgroundColorPalettesIndigo5__cfa0f",backgroundColorPalettesIndigo20:"backgroundColorPalettesIndigo20__nOuB6",backgroundColorPalettesIndigo50:"backgroundColorPalettesIndigo50__O_MJK",backgroundColorPalettesJade40:"backgroundColorPalettesJade40__L1eU8",backgroundColorPalettesJade70:"backgroundColorPalettesJade70__jhhW8",backgroundColorPalettesLagoon5:"backgroundColorPalettesLagoon5__U3VkS",backgroundColorPalettesLagoon30:"backgroundColorPalettesLagoon30__qPZN3",backgroundColorPalettesLagoon40:"backgroundColorPalettesLagoon40__qBXK3",backgroundColorPalettesMojito5:"backgroundColorPalettesMojito5__TLRv0",backgroundColorPalettesOcean5:"backgroundColorPalettesOcean5__UnBKP",backgroundColorPalettesOcean20:"backgroundColorPalettesOcean20__r9gpL",backgroundColorPalettesPaprika50:"backgroundColorPalettesPaprika50__BknK7",backgroundColorPalettesPaprika5:"backgroundColorPalettesPaprika5__ZHZ4V",backgroundColorPalettesSangria5:"backgroundColorPalettesSangria5__RMJEp",backgroundColorPalettesSunflower20:"backgroundColorPalettesSunflower20__AGf8u",backgroundColorPalettesSunflower40:"backgroundColorPalettesSunflower40__CZklN",backgroundColorPalettesTangerine40:"backgroundColorPalettesTangerine40__juFXf",backgroundColorPalettesTomato40:"backgroundColorPalettesTomato40__hTWu2",backgroundColorCoreSurfacePrimary:"backgroundColorCoreSurfacePrimary__tWi2S",colorPrimary:"colorPrimary__Iy6z6",colorSecondary:"colorSecondary__y6cgl",colorTertiary:"colorTertiary__Idom0",colorThemeInversePrimary:"colorThemeInversePrimary__EJNIu",colorCoreContentHighlight1:"colorCoreContentHighlight1__CltMO",colorCoreContentHighlight2:"colorCoreContentHighlight2__FYnj0",colorCoreContentHighlight3:"colorCoreContentHighlight3__gGst9",colorCoreContentImportant:"colorCoreContentImportant__yPnyu",colorPalettesAubergine70:"colorPalettesAubergine70__RccpV",colorPalettesCampfire70:"colorPalettesCampfire70__sxLOK",colorPalettesCilantro70:"colorPalettesCilantro70__g4ST5",colorPalettesLagoon70:"colorPalettesLagoon70__lo2gw",colorPalettesSunflower60:"colorPalettesSunflower60__lXLUN",colorInherit:"colorInherit__vwPOT",chip:"chip__Q3ooO",darkMode:"darkMode__UKAub",medium:"medium__kJEgv",large:"large__tdnhm",extraLarge:"extraLarge___ScFb",aiGradient:"aiGradient__pjyr2"}},0x223fa8af2:e=>{e.exports={modalHeader:"modalHeader__Wbg3M",backButtonContainer:"backButtonContainer__Alwv0",title:"title__u8urZ",subtitle:"subtitle__EXljm",modalContent:"modalContent__mJPAv",actionsInHeader:"actionsInHeader___9eBt",modalFooter:"modalFooter__GFR66"}},0x2223cdd4:e=>{e.exports={featuresTable:"featuresTable__EabKi",th:"th__a_u7k",actionsInHeader:"actionsInHeader__vp4Ue",actionCell:"actionCell__hU0iX",actionsRow:"actionsRow__i8RMe",columnHighlighted:"columnHighlighted__CtxTy",categoryTitleRow:"categoryTitleRow__MmiqB",cell:"cell__BhWTO",featureTitle:"featureTitle__O7dDz",tooltipText:"tooltipText__FrFyr",availabilityCell:"availabilityCell__X6d_t",iconContainer:"iconContainer__ESh75",check:"check__TVNEG",linkIcon:"linkIcon__he0gD",externalLinkContainer:"externalLinkContainer__pDQET",plansPageLink:"plansPageLink__pAqXR",emphasized:"emphasized___iw5t",price:"price__uctPm",priceSubtext:"priceSubtext__peF7A",regularPriceStrikethrough:"regularPriceStrikethrough__FYnyV",boldPrice:"boldPrice__JAY1D",inproductTeamCreationPrice:"inproductTeamCreationPrice__M8wRV",discountedPriceContainer:"discountedPriceContainer__RvXfJ",badge:"badge___sDls",highlighted:"highlighted__GhZF7",planTitleContainer:"planTitleContainer__LODdD",footerTable:"footerTable__weKwg",ctaCell:"ctaCell__lGC4k",ctaCellHeader:"ctaCellHeader__Lc8TO",ctaButton:"ctaButton__GnqKL"}},0x1ee388501:e=>{e.exports={card:"card__i9zyK",helpLink:"helpLink__Z1QxO",icon:"icon__hng4r",content:"content__p9UiL",animated:"animated__NJe8s"}},0x236167bb4:e=>{e.exports={cardsContainer:"cardsContainer__z4CJh"}},0x7ffa6831:e=>{e.exports={clickableIcon:"clickableIcon__TWpIU",nonClickableIcon:"nonClickableIcon__S7ksP",divider:"divider__IMCIF",clickableFeatureContainer:"clickableFeatureContainer__nIB4p",feature:"feature__Q_SzS",urlLink:"urlLink__nc3gX",iconButton:"iconButton__WoqBy"}},0x2224c3cb4:e=>{e.exports={gradient:"gradient__lR1yS",nonGradient:"nonGradient__HXpPp"}},0x9aab14ea:e=>{e.exports={modalContainer:"modalContainer__o78sg",container:"container__NwDCd",leftContainer:"leftContainer__qkVPh",multiChipContainer:"multiChipContainer__k02pj",subtitle:"subtitle__TcwNf",outerButtonContainer:"outerButtonContainer__zOWxe",innerButtonContainer:"innerButtonContainer__q5Fqv",errorContainer:"errorContainer__BNd_a"}},0x19e22d656:e=>{e.exports={content:"content__msFWh",subSection:"subSection__yNkrd",featureList:"featureList__SPK72"}},0x3504a07f:e=>{e.exports={wrapper:"wrapper__B9Ag7",container:"container__MuwXB",assetContainer:"assetContainer__jMi8O",asset:"asset___Kptq"}},0xf6ef35d4:e=>{e.exports={icon:"icon___wgbS",featuresList:"featuresList__v963Q",featureText:"featureText__BoIN1",learnMoreLink:"learnMoreLink__hw_vw",plus:"plus__iPRG_",learnMoreLinkText:"learnMoreLinkText__qtbZP",tooltipWrapper:"tooltipWrapper__jwJZ_",footerText:"footerText__se87A",cta:"cta__YiZ70",completedIcon:"completedIcon__z2D5U"}},0xd2938f44:e=>{e.exports={containerVertical:"containerVertical__edZL1",containerVerticalDarkMode:"containerVerticalDarkMode__xCc07",containerHorizontal:"containerHorizontal__MZl6H",farLeft:"farLeft__p7HYg",lagoonTheme:"lagoonTheme__K4YNH",childrenContainer:"childrenContainer__wCqjs"}},0x2d98cfd0:e=>{e.exports={backgroundColorPalettesAquarium5:"backgroundColorPalettesAquarium5__Npmse",backgroundColorPalettesAubergine0:"backgroundColorPalettesAubergine0__SJdLS",backgroundColorPalettesAubergine5:"backgroundColorPalettesAubergine5__xQJud",backgroundColorPalettesAubergine10:"backgroundColorPalettesAubergine10__iNj6V",backgroundColorPalettesAubergine30:"backgroundColorPalettesAubergine30__Qqdsf",backgroundColorPalettesAubergine40:"backgroundColorPalettesAubergine40__muAXc",backgroundColorPalettesAubergine50:"backgroundColorPalettesAubergine50__p6xfY",backgroundColorPalettesCampfire5:"backgroundColorPalettesCampfire5__mlbge",backgroundColorPalettesCilantro30:"backgroundColorPalettesCilantro30__z7dnE",backgroundColorPalettesHoneycomb5:"backgroundColorPalettesHoneycomb5__Iy0E7",backgroundColorPalettesHoneycomb30:"backgroundColorPalettesHoneycomb30__dZheb",backgroundColorPalettesIndigo5:"backgroundColorPalettesIndigo5__QeGSJ",backgroundColorPalettesIndigo20:"backgroundColorPalettesIndigo20__Ltjwx",backgroundColorPalettesIndigo50:"backgroundColorPalettesIndigo50__wyyhq",backgroundColorPalettesJade40:"backgroundColorPalettesJade40__XETZN",backgroundColorPalettesJade70:"backgroundColorPalettesJade70__fsuSB",backgroundColorPalettesLagoon5:"backgroundColorPalettesLagoon5__SMKfm",backgroundColorPalettesLagoon30:"backgroundColorPalettesLagoon30__Q1D_u",backgroundColorPalettesLagoon40:"backgroundColorPalettesLagoon40__iCYL7",backgroundColorPalettesMojito5:"backgroundColorPalettesMojito5__ybTJ1",backgroundColorPalettesOcean5:"backgroundColorPalettesOcean5__CDwld",backgroundColorPalettesOcean20:"backgroundColorPalettesOcean20__AlqkB",backgroundColorPalettesPaprika50:"backgroundColorPalettesPaprika50__xa2Cy",backgroundColorPalettesPaprika5:"backgroundColorPalettesPaprika5__VOZtS",backgroundColorPalettesSangria5:"backgroundColorPalettesSangria5__Wx6H4",backgroundColorPalettesSunflower20:"backgroundColorPalettesSunflower20__gSOS2",backgroundColorPalettesSunflower40:"backgroundColorPalettesSunflower40__yQpIv",backgroundColorPalettesTangerine40:"backgroundColorPalettesTangerine40__dsHc_",backgroundColorPalettesTomato40:"backgroundColorPalettesTomato40__DK7f0",backgroundColorCoreSurfacePrimary:"backgroundColorCoreSurfacePrimary__BvUyV",colorPrimary:"colorPrimary__OpPYq",colorSecondary:"colorSecondary__LA4z5",colorTertiary:"colorTertiary__NzHwL",colorThemeInversePrimary:"colorThemeInversePrimary__HYor1",colorCoreContentHighlight1:"colorCoreContentHighlight1__Cni2v",colorCoreContentHighlight2:"colorCoreContentHighlight2__u2WOd",colorCoreContentHighlight3:"colorCoreContentHighlight3__bkwIu",colorCoreContentImportant:"colorCoreContentImportant__ehtOc",colorPalettesAubergine70:"colorPalettesAubergine70__PCnnM",colorPalettesCampfire70:"colorPalettesCampfire70__gpgIR",colorPalettesCilantro70:"colorPalettesCilantro70__vVpSY",colorPalettesLagoon70:"colorPalettesLagoon70__LUoRy",colorPalettesSunflower60:"colorPalettesSunflower60__DiKe3",colorInherit:"colorInherit__jnox0",text:"text__yxtZb",fontSizeMicro:"fontSizeMicro__vL5rG",fontSizeCaption:"fontSizeCaption__g87_d",fontSizeBase:"fontSizeBase__vq3Rz",fontSizeSubtitle:"fontSizeSubtitle__ehrGi",fontSizeTitle:"fontSizeTitle__oao6m",fontSizeHeadline:"fontSizeHeadline__tkdnz",fontWeightBase:"fontWeightBase__MuzzM",fontWeightSemibold:"fontWeightSemibold__qFHfO",fontWeightBold:"fontWeightBold__xavtM",fontWeightBlack:"fontWeightBlack__VEFyV"}},0x2162556bf:e=>{e.exports={workflow_status_toast:"workflow_status_toast__W3W3o",workflow_status_row:"workflow_status_row__nO4P6",workflow_status_item:"workflow_status_item__ZSH2n",workflow_status_count_text:"workflow_status_count_text__HK4uO",workflow_auto_dismiss_status:"workflow_auto_dismiss_status__EAoPy",workflow_status_expand_button:"workflow_status_expand_button__gK2Ld",workflow_status_close_button:"workflow_status_close_button__Rb3ID",workflow_status_close_button_visible:"workflow_status_close_button_visible__eh26y"}},0x1b97a4bde:e=>{e.exports={radioGroup:"radioGroup__xHgc_",pill:"pill__c6ifC",icon:"icon__LjbUj",clouds:"clouds__L6_Ry",selected:"selected__bRXAq",sakura:"sakura__mmdCe",forest:"forest__pI4p0",random:"random__IN1fy",inputRadio:"inputRadio__BTyfo",label:"label__PLLAV",columnLabel:"columnLabel__bPkpV",disabledCheck:"disabledCheck__VYC5L",themeTooltip:"themeTooltip__Csx8v",themeTooltipContainer:"themeTooltipContainer__PenbV",calendarMetadata:"calendarMetadata__Hfjby",multiCalendarContainer:"multiCalendarContainer__FMOpa",multiCalendarRow:"multiCalendarRow__B1NfT",calendarEmail:"calendarEmail__bDh9Q",calendarButtons:"calendarButtons__mV5b_"}},0x19c2d40b2:e=>{e.exports={stickerButton:"stickerButton__mz4Tg",stickerEmojiWrapper:"stickerEmojiWrapper__Uk0BM",stickerEmojiWrapperSelected:"stickerEmojiWrapperSelected__cA_ED",stickerEmoji:"stickerEmoji__wgV9S",stickerGrid:"stickerGrid__gFDu2",stickerGridSubtitle:"stickerGridSubtitle__ykxPQ"}},0x64f59f4:e=>{e.exports={aiNotesIndicator:"aiNotesIndicator__S4LAF",highContrast:"highContrast__AlTwW"}},0xace895a3:e=>{e.exports={cameraIcon:"cameraIcon__vgsSq",cameraIconContainer:"cameraIconContainer__NV4uD",cameraIconSlashAnimated:"cameraIconSlashAnimated__k0A78",pHuddle_icon__slash:"p-huddle_icon__slash__dzCHw",cameraIconDot:"cameraIconDot__rWZ6f"}},0x201525af7:e=>{e.exports={micIcon:"micIcon__XE9Cj",micIconContainer:"micIconContainer___DE57",microphoneSlash:"microphoneSlash__SE1Pd",microphoneSlashAnimated:"microphoneSlashAnimated__YMm70",pHuddle_icon__slash:"p-huddle_icon__slash__KnZzT",microphoneInputLevel:"microphoneInputLevel__P5UZI",micIconImg:"micIconImg__EazBL"}},0x21b2a021c:e=>{e.exports={banner:"banner__S5_Z4",bottomBarBanner:"bottomBarBanner__veU3Z",label:"label__snugV"}},0x208363f6a:e=>{e.exports={bannerIcon:"bannerIcon__SluDM"}},0x200a818a5:e=>{e.exports={content:"content__IPGgk",text:"text__v552W",optionButtonText:"optionButtonText__KkTan",buttonsContainer:"buttonsContainer__N_DMP",button:"button__mt534",optionButton:"optionButton__Xxy5x",dismissButton:"dismissButton__nEu3d"}},0x23d9f4241:e=>{e.exports={huddleInviteWindow:"huddleInviteWindow__BWITB",scrollOverflow:"scrollOverflow__ZbU7k",noWindowTitleBar:"noWindowTitleBar__h1w4R",contentWrapper:"contentWrapper__A7iBo",browserCenteredContent:"browserCenteredContent__KnRBH",colorWrapper:"colorWrapper__lUAOm",titleBar:"titleBar__aNrJo",titleBarContentContainer:"titleBarContentContainer__a8keK",titleBarAvatarContainer:"titleBarAvatarContainer__kJNdr",titleBarText:"titleBarText__iYmFy",content:"content__d6a0i",smallContentBox:"smallContentBox__cddXe",contentOverlap:"contentOverlap__EYyk_",contentOverlapMultiLine:"contentOverlapMultiLine__wJRiY",contentBody:"contentBody__EhtX1",deviceSelectionContainer:"deviceSelectionContainer__ne0Ak",selectorButtonContainer:"selectorButtonContainer__bnsKm",deviceSelectorButton:"deviceSelectorButton__gm5tT",deviceSelectorButtonText:"deviceSelectorButtonText__NdcX3",footerButtonsContainer:"footerButtonsContainer__twxVS",videoContainer:"videoContainer__QswqZ",videoInnerContainer:"videoInnerContainer__QpM6E",bgEffectsButtonContainer:"bgEffectsButtonContainer__CrNm4",dontShowPreviewAgain:"dontShowPreviewAgain__f_BSx",errorOverride:"errorOverride__kelXl",warningOverride:"warningOverride__JP11f",linkOverride:"linkOverride__xXqer",talking:"talking__hE49u",talkingPill:"talkingPill__uhq4D",talkingBorder:"talkingBorder__Ngufc"}},0x16c422b8d:e=>{e.exports={container:"container__n_wJr",iconMargin:"iconMargin__cjq3m",link:"link__yGVOC"}},0x2fc1cdb8:e=>{e.exports={videoAndDevicesContainer:"videoAndDevicesContainer__NVELK",videoContainer:"videoContainer__XjCxI",videoPreview:"videoPreview__hMjwB",videoPreviewSizeV1:"videoPreviewSizeV1__zhWFQ",videoInnerContainer:"videoInnerContainer__lO7xn",videoAvatar:"videoAvatar__lZyuR",loading:"loading__FMtdL"}},0x2135f6f0d:e=>{e.exports={modal:"modal__V69Vd",centeredModal:"centeredModal__joHsr",overlay:"overlay__gsuuD"}},0x45a7f2a4:e=>{e.exports={container:"container__DVK1Z",button:"button__PWHcn",popoverCard:"popoverCard__jbZdx",popoverHeader:"popoverHeader__QhVnW"}},0x138056d8:e=>{e.exports={container:"container__ExpEn",device:"device__Wqu1p",speaker:"speaker__IHiCf"}},0x7f7a4d52:e=>{e.exports={modal:"modal__v1OWN",overlay:"overlay__HrRPN"}},0x142df131:e=>{e.exports={container:"container__rto70"}},0x89c29b64:e=>{e.exports={container:"container__bqBHK",toolbarButton:"toolbarButton__uaxi2",toolbarButtonV2:"toolbarButtonV2__xS5kW",activeButton:"activeButton__UwqVv",warningBadgeContainer:"warningBadgeContainer__SWzb7",warningBadge:"warningBadge__srWl0",errorBadgeContainer:"errorBadgeContainer__s8iFT",errorBadge:"errorBadge__o3CsZ",cameraDisabled:"cameraDisabled__fhjuY",micDisabled:"micDisabled__QD_DR",moreOptions:"moreOptions__vf0mP",activeButtonInverse:"activeButtonInverse__FOGpa",preview_bg_effects_models_loading:"preview_bg_effects_models_loading__onxlx"}},0x1d83d256b:e=>{e.exports={buttonBase:"buttonBase__K95kY",jitPrimaryButton:"jitPrimaryButton__WcTRF",jitSnoozeButton:"jitSnoozeButton__go3MJ",header:"header__X_CIV",title:"title__zIx6a",subheader:"subheader__hA_dd",main:"main__UugSY",dismissButton:"dismissButton__P_9Gr",avBackground:"avBackground__reA1g"}},0x15b6e724d:e=>{e.exports={paginationContainer:"paginationContainer__oVOMr",paginateButton:"paginateButton__D6R6G",paginateNumbers:"paginateNumbers__dO7Gw"}},0x1bdb0806b:e=>{e.exports={calendarJitConnectSidebar:"calendarJitConnectSidebar__U7cAA",bannerHeader:"bannerHeader__ugv3g",bannerContent:"bannerContent__xdPYr",bannerDescription:"bannerDescription__eMjTF",bannerIconContainer:"bannerIconContainer__V2Zhz",bannerTextContainer:"bannerTextContainer__GRthc",bannerTitle:"bannerTitle__ze13H",connectButtonWrapper:"connectButtonWrapper__cjMli",closeButtonWrapper:"closeButtonWrapper__YYHut"}},0x1f52e94dc:e=>{e.exports={editTopicModal:"editTopicModal__nm_q0",cSkModal_content:"c-sk-modal_content__Aak2s",inlineHelperText:"inlineHelperText__lhy5F"}},0xbd73b935:e=>{e.exports={allDayEvent:"allDayEvent__a5E5B",allDayEventPopUpContainer:"allDayEventPopUpContainer__VbrgG",allDayEventPopUpTrigger:"allDayEventPopUpTrigger__P_fSR"}},0xbc123eb3:e=>{e.exports={allDayEvents:"allDayEvents__djRKE",allDayEventsTitle:"allDayEventsTitle__Rpbvm",eventsContainer:"eventsContainer__doT8f"}},0x2447facf9:e=>{e.exports={button:"button__eVoBI"}},0x1ae526449:e=>{e.exports={container:"container__xEbez"}},0xf2c1ae9d:e=>{e.exports={container:"container__MBSyj",containerDarkMode:"containerDarkMode__sXKXD",pillContainer:"pillContainer__TizNC"}},0x121f28c46:e=>{e.exports={container:"container__sdr_z",activeContainer:"activeContainer__dgsk7",activeContainerDarkMode:"activeContainerDarkMode__QG_9Q",nonActiveNotTodayContainer:"nonActiveNotTodayContainer__RHbaK",day:"day__rNkz1",activeDayDarkMode:"activeDayDarkMode__vDudT",date:"date__dmjfE",dateDarkMode:"dateDarkMode__tcyJx",activeDate:"activeDate__FYLBt",activeDateDarkMode:"activeDateDarkMode__aMIXK",todayNonActive:"todayNonActive__LkLoE",todayNonActiveDarkMode:"todayNonActiveDarkMode__L5Gpb",todayNonActiveDate:"todayNonActiveDate__odmut"}},0x1ff9f38b5:e=>{e.exports={eventActiveTimer:"eventActiveTimer__plsrA",timerHuddle:"timerHuddle__xA7gH",timerMeetOrTeams:"timerMeetOrTeams__wIvzI"}},0x24dff902d:e=>{e.exports={rsvpButtonContainer:"rsvpButtonContainer__WnJT_",rsvpButton:"rsvpButton__SLlMe",rsvpAccepted:"rsvpAccepted__rKCOq",rsvpDeclined:"rsvpDeclined__bDmda",rsvpMaybe:"rsvpMaybe__Wp2Pa",rsvpNeedsAction:"rsvpNeedsAction__DnONl"}},0x1ba3ae628:e=>{e.exports={gridEventGroup:"gridEventGroup__BRVDJ",gridEventGroupColumn:"gridEventGroupColumn__aqWKP",eventItemContainer:"eventItemContainer__k7o0i"}},0x21b9dcba8:e=>{e.exports={calendarStripe:"calendarStripe__aU8dW",huddleStripe:"huddleStripe__TfqRF",googleMeetAndTeamsStripe:"googleMeetAndTeamsStripe__DQndS",defaultStripe:"defaultStripe__E0MVP",grayStripe:"grayStripe__LMplx"}},0x1da7f3294:e=>{e.exports={locationIconContainer:"locationIconContainer__U8iBB",location:"location__cZnYQ"}},0x5018c5c7:e=>{e.exports={popoverTrigger:"popoverTrigger__E6lLo",hoverItemOverlayModal:"hoverItemOverlayModal__ZbjjZ",hoverPopover:"hoverPopover__LLzdq",hoverPopupItemPositionTop:"hoverPopupItemPositionTop__dTk9W",hoverPopupItemPositionBottom:"hoverPopupItemPositionBottom__qdW_5"}},0xf5917960:e=>{e.exports={container:"container__VxKkp",containerShow:"containerShow__t0txl",eventTitleBox:"eventTitleBox__BHAjg",titleAndTimeContainer:"titleAndTimeContainer__uF1KP",title:"title__KtW_J",timeInformation:"timeInformation__tCtAK",timeText:"timeText__rxKy2",infoContainer:"infoContainer__rQHlu",locationContainer:"locationContainer__c_Dwx",descriptionContainer:"descriptionContainer__TLT1O",descriptionIconContainer:"descriptionIconContainer__uBLtU",descriptionTextContainer:"descriptionTextContainer__hcNOE",buttonsContainer:"buttonsContainer__qzlN4"}},0x1346b2118:e=>{e.exports={gridEventItemContainer:"gridEventItemContainer__oJd8W",gridEventItem:"gridEventItem__wL2M5",gridEventItemSmall:"gridEventItemSmall__xe5OG",gridEventItemPast:"gridEventItemPast__J9vbi",gridEventItemPastDarkMode:"gridEventItemPastDarkMode__pggvk",gridEventItemPresentHuddle:"gridEventItemPresentHuddle__TcQrV",gridEventItemPresentMeet:"gridEventItemPresentMeet__UQoBy",gridEventItemPresentDefault:"gridEventItemPresentDefault__UCcXi",gridEventItemFuture:"gridEventItemFuture__zwTx8",gridEventItemFutureDarkMode:"gridEventItemFutureDarkMode__QZhwd",iconContainer:"iconContainer__IU7mK",eventContentSmall:"eventContentSmall__HTNaP",eventDetailsContainer:"eventDetailsContainer__TEMq1",eventNameContainer:"eventNameContainer__irhVq",eventNameContainerFuture:"eventNameContainerFuture__iN1BO",eventName:"eventName__mfChC",eventNamePopupActive:"eventNamePopupActive__Ig4eO",informationContainer:"informationContainer__DEry1",informationContainerFuture:"informationContainerFuture__jukKF",eventTime:"eventTime__ZTfAS",infoLink:"infoLink__TKele",infoLinkIcon:"infoLinkIcon__6N887",infoSeparator:"infoSeparator__aU84W",pastEventTextDarkMode:"pastEventTextDarkMode__tyrQ0",futureEventTextDarkMode:"futureEventTextDarkMode__DX6vz",joinProviderButton:"joinProviderButton__tuGR7",dot:"dot__u9BtH",dotPresentHuddle:"dotPresentHuddle__nsQZJ",dotPresentMeet:"dotPresentMeet__fsvnw"}},0xe59ca3fb:e=>{e.exports={container:"container__YkD17",calendarWrapper:"calendarWrapper__QmYy1",dayPickerWrapper:"dayPickerWrapper__VaNBZ",scrollContainer:"scrollContainer__pigVo",overlay:"overlay__oZ908"}},0x41b76369:e=>{e.exports={overlay:"overlay__b_itw",textWrapper:"textWrapper__rBwmb",connectingText:"connectingText__Fg90o",havingTrouble:"havingTrouble__jBylQ",tryAgainLink:"tryAgainLink__U8eTf"}},0x2086f6034:e=>{e.exports={nuxBannerContainer:"nuxBannerContainer__cPsqx",nuxNonAuthContainerMods:"nuxNonAuthContainerMods__NG3l6",nuxBannerContent:"nuxBannerContent__i5VyI",nuxNonAuthBannerContentMods:"nuxNonAuthBannerContentMods__cDEko"}},0x1cefe40f4:e=>{e.exports={nuxNonAuthorizedWrapper:"nuxNonAuthorizedWrapper__xsviF",contentWrapper:"contentWrapper__uQ1r5",header:"header__CZja9",subtitle:"subtitle__nniW2",button:"button__RPfIZ",buttonBase:"buttonBase__EI4cV",iconAndTextContainer:"iconAndTextContainer__x2efJ",textContainer:"textContainer__T73BZ",caretContainer:"caretContainer__UsLYE",line:"line__K7OBK"}},0x1f4876c3:e=>{e.exports={allDayEvents:"allDayEvents__AiRm9",allDayEventsLabel:"allDayEventsLabel__aOzNy",allDayEventsContainer:"allDayEventsContainer__kmkJ1",cabinGradientLight:"cabinGradientLight__GvzBr",cherryBlossomGradientLight:"cherryBlossomGradientLight__OPbv2",cloudsGradientLight:"cloudsGradientLight__iCqkl",cabinGradientDark:"cabinGradientDark__HW5li",cherryBlossomGradientDark:"cherryBlossomGradientDark__UGWOY",cloudsGradientDark:"cloudsGradientDark__VQe6p"}},0x110f7e629:e=>{e.exports={noEvents:"noEvents___0WhX",noEventsTitle:"noEventsTitle___AF9h",noEventsBody:"noEventsBody__rvw7I"}},0x1dce572d1:e=>{e.exports={peekEventItem:"peekEventItem__Cxq5n",topContainer:"topContainer__PUiH3",titleContainer:"titleContainer__YlHkD",peekTitle:"peekTitle__pBDD6",peekTime:"peekTime__w8DOl",eventHasPassed:"eventHasPassed__W03s0",eventDetails:"eventDetails__r9gIV",joinButton:"joinButton__KzJ6Y"}},0x1c65dc5d1:e=>{e.exports={peekEventList:"peekEventList__tQPBR",upcomingEvent:"upcomingEvent__gBumy",upcomingEventTime:"upcomingEventTime__Y_MJZ",todayEvents:"todayEvents__QiLsv",peekEventListHeader:"peekEventListHeader__iABLA",cabinGradientLight:"cabinGradientLight__qPIfI",cherryBlossomGradientLight:"cherryBlossomGradientLight__OeMqb",cloudsGradientLight:"cloudsGradientLight__MOt3q",cabinGradientDark:"cabinGradientDark__VTZgo",cherryBlossomGradientDark:"cherryBlossomGradientDark__IELG1",cloudsGradientDark:"cloudsGradientDark__M9ypV"}},0x1a96b211d:e=>{e.exports={wrapper:"wrapper__MSsIf",time:"time__Z7wYI",text:"text__e04br",lineContainer:"lineContainer__JO4i8",redCircle:"redCircle__ghdJK",line:"line__jRk3y"}},0x7f011176:e=>{e.exports={timelineBackground:"timelineBackground__OVy55",backgroundContainer:"backgroundContainer__MtDgM",animationEnabled:"animationEnabled__PNK95",backgroundContainerNoEvents:"backgroundContainerNoEvents__gTQU5",backgroundContainerHasEvents:"backgroundContainerHasEvents__Tqctb",background:"background__nc6RX",hiddenBackground:"hiddenBackground__mdPPg",cabinGradientLight:"cabinGradientLight__kwUNC",cherryBlossomGradientLight:"cherryBlossomGradientLight__wgB0U",cloudsGradientLight:"cloudsGradientLight__kfLxH",cabinGradientDark:"cabinGradientDark__aUfJg",cherryBlossomGradientDark:"cherryBlossomGradientDark__sTiZJ",cloudsGradientDark:"cloudsGradientDark__ap447"}},0xf31a5169:e=>{e.exports={timelineNoEvents:"timelineNoEvents__AlsPW"}},0x63448c0d:e=>{e.exports={timelineViewLayout:"timelineViewLayout__zDFR8",timelineItem:"timelineItem__krSep",timelineText:"timelineText__RNc8B",timelineLine:"timelineLine__uDZC_",timelineLineDarkMode:"timelineLineDarkMode__XM6vn",eventWrapper:"eventWrapper__XtH07",emptyState:"emptyState__QfZjm",allDayEventsContainer:"allDayEventsContainer__rlE_x",verticalLine:"verticalLine__zNIJ_",verticalLineDarkMode:"verticalLineDarkMode__YEP90",noEventsContainer:"noEventsContainer___Ks2i"}},0x8a0c9bee:e=>{e.exports={container:"container__PBWFF",containerCalendarHistory:"containerCalendarHistory___QVT8"}},0x5178ba20:e=>{e.exports={sectionGap:"sectionGap__mPp4c",bottomSectionMargin:"bottomSectionMargin__caWYF"}},0xe9c1fa6a:e=>{e.exports={container:"container__kSw1D",title:"title__yxNNc"}},0x1050f8fbc:e=>{e.exports={copy:"copy__I7hbD"}},0x18b0dea16:e=>{e.exports={backToTopButtonContainer:"backToTopButtonContainer__UAEFh",backToTopButton:"backToTopButton__ZFKg3"}},0x21e566982:e=>{e.exports={greenSquare:"greenSquare__ZCbZX"}},0x8368aeb4:e=>{e.exports={sidebarLink:"sidebarLink__w8QIz",facepile:"facepile__RJWDO",huddleBadge:"huddleBadge__PcXv3",facepileItem:"facepileItem__PYH_H"}},0x253e8b383:e=>{e.exports={container:"container__h36TQ",header:"header__YSRS2",closeButtonContainer:"closeButtonContainer__ixiKz",content:"content__X_wgj",footer:"footer__a4Ia1"}},0xc64128be:e=>{e.exports={modalContent:"modalContent__X6KqL",screenPickerWrapper:"screenPickerWrapper__vGPGR",sourceSegmentedButtonContainer:"sourceSegmentedButtonContainer__FVSTR"}},0x163c421b3:e=>{e.exports={title:"title__THf4R",screenPickerTile:"screenPickerTile__F1YMT",largeThumbnail:"largeThumbnail___EjKZ",selected:"selected__ukkWP",thumb:"thumb__O5zcG",img:"img__oI1R4"}},0x200d7764e:e=>{e.exports={screenPicker:"screenPicker__kXcTy",screensGrid:"screensGrid__FPDWV",screensGridRow:"screensGridRow__vDKFi",screensGridItem2Columns:"screensGridItem2Columns__wEf0o",screensGridItem3Columns:"screensGridItem3Columns__YPtoO"}},0x737446a8:e=>{e.exports={container:"container__gcSkQ",toolbar:"toolbar__oG2xF",item:"item__wdSUv",selected:"selected__xnOTV"}},0x154d26c4e:e=>{e.exports={wrapper:"wrapper__BLaTg",action:"action__VRWfx",label:"label__IeXNO"}},0xf04cc458:e=>{e.exports={testSpeakerContainer:"testSpeakerContainer__t2Dh2",testSpeakerIconContainer:"testSpeakerIconContainer__Qah7E",jiggleIcon:"jiggleIcon__KtYd9",jiggle:"jiggle__YcbaG"}},0x1db174551:e=>{e.exports={label:"label__MmBbN",labelText:"labelText__MDPwj",menuItemDisabled:"menuItemDisabled__IiPby",callout:"callout__ib1pb",calloutDisabled:"calloutDisabled__Qb1SX"}},0x1a188516e:e=>{e.exports={modalContent:"modalContent__qU71r"}},0xac968956:e=>{e.exports={buttonDisabled:"buttonDisabled__CTQhl",buttonDisabledTooltip:"buttonDisabledTooltip__e485F",notCompactModeButton:"notCompactModeButton__S82cd"}},0x73e9639c:e=>{e.exports={button:"button__jUk2U",active:"active__b1BLV",toolbarWindowButton:"toolbarWindowButton__ctOYV",bottomBarButton:"bottomBarButton__JXrtq",toolbarExpandedWindowButton:"toolbarExpandedWindowButton__UwfW_",disabled:"disabled__WOcT3",pill:"pill__fg1kK",small:"small__QnqNr",fullBleed:"fullBleed__EuELA",onText:"onText__tg1hZ",caret:"caret__cWwSS",fullWidth:"fullWidth__VB4Ky",recordIcon:"recordIcon__glOnO",huddles_temporary_control_banner_transcript__icon_fade:"huddles_temporary_control_banner_transcript__icon_fade__rf6xc",hoverNameFade:"hoverNameFade__czqJ_"}},0x1c4e622e3:e=>{e.exports={description:"description__U_MsE",highlighted:"highlighted__u9Tyr"}},0x1431bd7e3:e=>{e.exports={toolbarContainer:"toolbarContainer__eE_VC",leftButtons:"leftButtons__B6Qlj",centerButtons:"centerButtons__ByIUv",rightButtons:"rightButtons__pk9Eg",leftButtonsDrawingSupportContainer:"leftButtonsDrawingSupportContainer__Fb53R",centerButtonsDrawingSupportContainer:"centerButtonsDrawingSupportContainer__KmBuI",rightButtonsDrawingSupportContainer:"rightButtonsDrawingSupportContainer__YfVzw",button:"button__Dv5Vp",segmentedButton:"segmentedButton__vDuKx",leaveButton:"leaveButton__wzISw",segmentedButtonMain:"segmentedButtonMain__erfvC",segmentedButtonPopover:"segmentedButtonPopover__j8l_z",buttonFullBleed:"buttonFullBleed__dFRNq",buttonToggledOn:"buttonToggledOn__Kuvfg",stickerButton:"stickerButton__BfgQn",buttonDisabled:"buttonDisabled__HqhQ5",buttonEducation:"buttonEducation__VWyqE",buttonDisabledTooltip:"buttonDisabledTooltip___dDUA",bottomBar:"bottomBar__fKAS1",toolbarMainBar:"toolbarMainBar__Svv7I",toolbarMainBarControlsCollapsed:"toolbarMainBarControlsCollapsed__pozDr",openHuddleWindowButton:"openHuddleWindowButton__IaOKu",bottomBarLeftControls:"bottomBarLeftControls__SmByI",bottomBarLeftControlsCollapsed:"bottomBarLeftControlsCollapsed__Wbqem",huddleTitle:"huddleTitle__VV5VR",bottomBarRightControls:"bottomBarRightControls__ynS0D",bottomBarCenterControlsOuter:"bottomBarCenterControlsOuter__UXAGG",bottomBarCenterControls:"bottomBarCenterControls__p0iQd",huddleDetails:"huddleDetails__wwBzX",huddleIcon:"huddleIcon__JjYZO",huddleSubtitle:"huddleSubtitle__Qxtwl",tileContainer:"tileContainer__yVax9",screenshareIndicator:"screenshareIndicator__vxnhj",toolbarContainerCompactMode:"toolbarContainerCompactMode__uLvGQ",toolbarContainerExpandedMode:"toolbarContainerExpandedMode__nPMzn",inviteTopicContainer:"inviteTopicContainer__a5ckd",toolbarContainerFullBleed:"toolbarContainerFullBleed__zrOQV",emojiButton:"emojiButton__KGFo5",emojiButtonHover:"emojiButtonHover__DeKR0",emojiButtonResting:"emojiButtonResting__KDZDh",micAlertContainer:"micAlertContainer__oEeLN",micAlert:"micAlert__JnGvL",micDisabled:"micDisabled__InUj_",hoverNameFade:"hoverNameFade__wTIz8"}},0xb9330100:e=>{e.exports={inlineAudioMeterContainer:"inlineAudioMeterContainer__Y3vlI",inlineAudioMeter:"inlineAudioMeter__XIoND"}},0xecb8ec1f:e=>{e.exports={audioLevels:"audioLevels__PhqRo",audioLevelsBubble:"audioLevelsBubble__jQ3o0",inactive:"inactive__PGyQe",active:"active__eW09S"}},0xdb6241ec:e=>{e.exports={audioDeviceContainer:"audioDeviceContainer__tdXcZ",audioDeviceLabel:"audioDeviceLabel__B9S7l",buttonsContainer:"buttonsContainer__vZS2x"}},0xa2babec2:e=>{e.exports={canvasButtonContainer:"canvasButtonContainer__bMLk2",canvasButton:"canvasButton__UAJlr",canvasButtonBadgeCircle:"canvasButtonBadgeCircle__VEZZC",canvasButtonClosed:"canvasButtonClosed__kddX4",buttonToggledOn:"buttonToggledOn__FNGMn",canvasButtonExpandedButton:"canvasButtonExpandedButton__PpZIj",canvasButtonBadgeContainer:"canvasButtonBadgeContainer__fI7jb",canvasButtonBadgeCircleToggledOff:"canvasButtonBadgeCircleToggledOff__D0yMx",canvasButtonAiSummaryIcon:"canvasButtonAiSummaryIcon__jyHMT",canvasButtonAiSummaryIconClosed:"canvasButtonAiSummaryIconClosed__tYHAT"}},0x1ce83ec8a:e=>{e.exports={threadButtonContainer:"threadButtonContainer__Zbvpr",threadButton:"threadButton__m__bS",threadButtonBadgeCircle:"threadButtonBadgeCircle__a4_br",threadButtonClosed:"threadButtonClosed__WGz7G",buttonToggledOn:"buttonToggledOn__F1GSm",hoverNameFade:"hoverNameFade__rdILY"}},0xec40f5cb:e=>{e.exports={participantsMenuButton:"participantsMenuButton__UAsXl",participantsLabel:"participantsLabel__Xc2lq",participantsLabelSlideUp:"participantsLabelSlideUp__i3VoL",participantsLabelSlideDown:"participantsLabelSlideDown__w9aNg",fadeIn:"fade-in__TAgZf",slideUp:"slide-up__WmWPY",userIcon:"userIcon__QptM1",activeButton:"activeButton__swBZ6",skClientThemeDark:"sk-client-theme--dark__Mqq3K",buttonBadgeCircle:"buttonBadgeCircle__ypi7y",slideDown:"slide-down__V0XuG"}},0x1dd5d0900:e=>{e.exports={alert:"alert__p93GV",oauth_picker:"oauth_picker__BObOi"}},0x236c13203:e=>{e.exports={custom_key_pair_container:"custom_key_pair_container__jXIde"}},0x40183a59:e=>{e.exports={container:"container__S5eeY",appName:"appName__AoSkI",noWrap:"noWrap__f_P2w",appNameAndIcon:"appNameAndIcon__YoJ7v",salesforceIcon:"salesforceIcon__KxRGt"}},0x96fa2b29:e=>{e.exports={svgColor:"svgColor__Xh77Z",tipContainer:"tipContainer__am0TD"}},0x9a74153:e=>{e.exports={speedbumpDescriptionContainer:"speedbumpDescriptionContainer__Hnpil",speedbumpDescription:"speedbumpDescription__yP_GL",speedbumpHeading:"speedbumpHeading__LcPGs",svgIcon:"svgIcon__qflmn"}},0x46828aaf:e=>{e.exports={searchRow:"searchRow__YrjuY",searchInput:"searchInput__KfPsY",channelList:"channelList__P4HoH",channelRow:"channelRow__rYrkg",channelInfo:"channelInfo__iytWd",channelName:"channelName__hoZu6",channelPurpose:"channelPurpose__nJYr7",addedText:"addedText__Z1VT9",addButtonText:"addButtonText__R4GQS",searchAddedConfirmation:"searchAddedConfirmation__HKKG_",searchAddedFadeOut:"searchAddedFadeOut__wR73x",label:"label__xTs9Q"}},0x1b724d7aa:e=>{e.exports={customTextInput:"customTextInput__M4Zzs"}},0x19cfa6834:e=>{e.exports={suggestedLabel:"suggestedLabel__bFS5Q",missingText:"missingText__L6nhy"}},0x1d5722ea1:e=>{e.exports={modalContainer:"modalContainer__f5HzG",modalContent:"modalContent__VLytg",iconContainer:"iconContainer__bKQC8",inviteSendHeader:"inviteSendHeader__NR2qP"}},0x209f2655:e=>{e.exports={launchWelcomeModal:"launchWelcomeModal__TKppW",container:"container__gEGEO",slideWrap:"slideWrap__WYgHy",details:"details__kLh9f",detailsContent:"detailsContent__kb_NW",heading:"heading__N7bQX",pagination:"pagination__otwpN",bullet:"bullet__bRftK",active:"active__lxoAt",imageWrap:"imageWrap__gIX4F",featuresListWrap:"featuresListWrap__M3qWU",launchWelcomeFeaturesList:"launchWelcomeFeaturesList__HiuNx",buttonWrap:"buttonWrap__bYKip",extendedDetailsContainerHeight:"extendedDetailsContainerHeight__XQ9NY",detailsDescription:"detailsDescription__Vt_wa",image:"image__koIZb"}},0x3e7ced97:e=>{e.exports={contents:"contents__eXUAj",icon:"icon__WB2Zx"}},0x19ab1f641:e=>{e.exports={speedBumpDescription:"speedBumpDescription__KuxkL",speedBumpSubtitle:"speedBumpSubtitle__oHUOe",listNameIcon:"listNameIcon__IboBK",listOption:"listOption__FnX0N",listOptionLabel:"listOptionLabel__K0Aat",speedBumpSelect:"speedBumpSelect__FGo5J"}},0x253b2f106:e=>{e.exports={container:"container__O5xJU",progressSummaryBtn:"progressSummaryBtn__tBDfe",progressSummaryText:"progressSummaryText__Xk_gQ"}},0xf384fdd4:e=>{e.exports={modalDescriptionSection:"modalDescriptionSection__Ttd1Y",assigneeColumnLabel:"assigneeColumnLabel__w_txt",dueDateColumnLabel:"dueDateColumnLabel__CwcN1",fieldsMigrationOptionLabel:"fieldsMigrationOptionLabel__rejAw",assigneeColumnSelect:"assigneeColumnSelect__aZQlv",assigneeColumnSubtext:"assigneeColumnSubtext__KUrz6",assigneeAccesssLevelSpeedbumpContent:"assigneeAccesssLevelSpeedbumpContent__RacjH"}},0x1aba3b6af:e=>{e.exports={laterIsBackBannerContainer:"laterIsBackBannerContainer__z9GYt",laterIsBackBannerText:"laterIsBackBannerText__mxob7",laterIsBackBannerLink:"laterIsBackBannerLink__etdGJ"}},0xa96b022d:e=>{e.exports={bannerText:"bannerText__Mfnsc"}},0x18fe3f8b0:e=>{e.exports={banner:"banner__bESic",bannerContent:"bannerContent__XrjIv",bannerTitle:"bannerTitle__bAHvO",bannerImageAsset:"bannerImageAsset__tCwco",bannerImage:"bannerImage__xjH8R",bannerImageAssetAnimation:"bannerImageAssetAnimation__Mt25B",bannerAnimation:"bannerAnimation__S4f5c"}},0x225e3dfdf:e=>{e.exports={list_user_created_template_coachmark:"list_user_created_template_coachmark__baoki",list_user_created_template_coachmark__hero:"list_user_created_template_coachmark__hero__Zm6S8",list_user_created_template_coachmark__hero__image:"list_user_created_template_coachmark__hero__image__sSW13"}},0x25d2de0b:e=>{e.exports={freemiumHeader:"freemiumHeader___1Adu",freemiumHeaderAsset:"freemiumHeaderAsset__J4jMh",freemiumHeaderAssetImage:"freemiumHeaderAssetImage__uGdg4",freemiumHeaderTitle:"freemiumHeaderTitle__g50ST"}},0x16fb12d68:e=>{e.exports={shareModal:"shareModal__v_Qf8",select:"select__jh37k",alertSection:"alertSection__n96yV",footerActions:"footerActions__KbL4Q"}},0x213ba32f9:e=>{e.exports={dateToken:"dateToken__xmWvT",todoDate:"todoDate__Ijyui",defaultColor:"defaultColor__oUQwK",flamingoIcon:"flamingoIcon__LFhl6",indigoIcon:"indigoIcon__UK4eM",blueDueDate:"blueDueDate__DAdZ2",redDueDate:"redDueDate__j1qUk"}},0xee1e8180:e=>{e.exports={fileAttachments:"fileAttachments__l25M4",fileAttachmentsEmptyValueText:"fileAttachmentsEmptyValueText__krtbq",fileAttachmentsUploading:"fileAttachmentsUploading__X53qQ",fileAttachmentsButtonTrigger:"fileAttachmentsButtonTrigger__7ZS6d",fileAttachmentsContainer:"fileAttachmentsContainer__sxAOU",fileAttachmentsSpinnerContainer:"fileAttachmentsSpinnerContainer__boHoj",fileAttachmentsSpinnerContainerMargin:"fileAttachmentsSpinnerContainerMargin__i38TV",fileAttachmentsEmptyValueTextHover:"fileAttachmentsEmptyValueTextHover__uHvJ5",fileAttachmentsMenu:"fileAttachmentsMenu__Sm7jm",cMenuItemIcon:"cMenuItemIcon__hUcHG",fileAttachmentsMenuItem:"fileAttachmentsMenuItem__mjdG0",fileAttachmentsRemoveButton:"fileAttachmentsRemoveButton__Opzg5",fileAttachmentsFiles:"fileAttachmentsFiles__suSdS",fileAttachmentsDragOverlay:"fileAttachmentsDragOverlay__XEcey",fileAttachmentsDragOverlayIcon:"fileAttachmentsDragOverlayIcon__BUkn8",fileAttachmentsEditButton:"fileAttachmentsEditButton__bFVFF",fileAttachmentsEditButtonHover:"fileAttachmentsEditButtonHover__u9X2K",fileAttachmentsPopover:"fileAttachmentsPopover__wYl_f",fileAttachmentsButton:"fileAttachmentsButton__Wh0nQ",fileAttachmentsButtonRecentFiles:"fileAttachmentsButtonRecentFiles__ijWc1",fileAttachmentsButtonText:"fileAttachmentsButtonText___pe2W",fileAttachmentsFileRow:"fileAttachmentsFileRow__IS4Al",fileAttachmentsDivider:"fileAttachmentsDivider__Dn834",fileAttachmentsWarning:"fileAttachmentsWarning___YNhG",fileAttachmentsMenuSeparator:"fileAttachmentsMenuSeparator___CyxA"}},0x1a331a034:e=>{e.exports={filePile:"filePile__KJxCM",filePileItem:"filePileItem__EKGIu"}},0x1267ba460:e=>{e.exports={menuButton:"menuButton__DUUWl",menuButtonDisplay:"menuButtonDisplay__fstTH",openMenu:"openMenu__iL6Yc",loadingSpinner:"loadingSpinner__Efs8Q",linkCellContainer:"linkCellContainer__yjBJM",linkContainer:"linkContainer__OKMsv",linkContainerFlexpane:"linkContainerFlexpane__qAXL5",linkContainerUnfurl:"linkContainerUnfurl__uCvhw",linkImage:"linkImage__b4sMV",linkImageDefault:"linkImageDefault__cLeM8"}},0x1f9087b27:e=>{e.exports={messageUnfurl:"messageUnfurl__fQBzE",messageReactions:"messageReactions__zc1ga",suggestedEmoji:"suggestedEmoji__Yvhmp",sfdcApproval:"sfdcApproval__smIOe",approvalActions:"approvalActions__XWt9K"}},0x73b31dfe:e=>{e.exports={missingChannelEntity:"missingChannelEntity__QykQF"}},0x2337255e6:e=>{e.exports={listDescriptionContainer:"listDescriptionContainer__ErW1J",listDescriptionContent:"listDescriptionContent__SQYJv",listDescriptionBasicContainer:"listDescriptionBasicContainer__qK5SB",emptyDescription:"emptyDescription__O3ouf",listHistoryDescription:"listHistoryDescription__wPPlr"}},0x19ae226b2:e=>{e.exports={listInfoBar:"listInfoBar__hHfNB"}},0x1ac05fbb8:e=>{e.exports={calloutText:"calloutText__jlmbA"}},0x250ffe53e:e=>{e.exports={newBadge:"newBadge__HuZdL",newBadgeVerticalAligned:"newBadgeVerticalAligned__vcNeV"}},0xdac53fbc:e=>{e.exports={nudgeContainer:"nudgeContainer__XgEfd",buttonWithNudge:"buttonWithNudge__RoUal",nudge:"nudge__A9jmu"}},0x4d77fade:e=>{e.exports={dropIndicator:"dropIndicator__Kq9cJ",top:"top__baZ7_",bottom:"bottom__lKNiO"}},0xc06eb238:e=>{e.exports={addField:"addField__wIveZ",optionText:"optionText__WvSl0"}},0x21504f1e0:e=>{e.exports={selectFieldOption:"selectFieldOption__QMfcg",skClientThemeDark:"sk-client-theme--dark__ii08m",pSelect_fieldSaturatedColors:"p-select_field--saturated-colors__WRNOk",pColor__select_option_bgGray:"p-color__select_option_bg--gray__mKG2f",selectFieldOptionLists:"selectFieldOptionLists__aZIlB",inBoardHeader:"inBoardHeader__YcHB5",selectFieldColumnWrapped:"selectFieldColumnWrapped__2H9hu",selectFieldGroupHeader:"selectFieldGroupHeader__b0ayD",customTooltip:"customTooltip__fITBn",truncate:"truncate__rhnQH"}},0x2316ca9b2:e=>{e.exports={container:"container__GGjs9",emptyState:"emptyState__nBkIA"}},0xbf20e2c3:e=>{e.exports={container:"container__fX8yV",completedHeader:"completedHeader__bMMe6"}},0x2bc173b:e=>{e.exports={todosBoardFieldRenderer:"todosBoardFieldRenderer__E5fIQ"}},0x154b95e3d:e=>{e.exports={btnContainer:"btnContainer__mQnsw",btnContainerText:"btnContainerText__lF1IG",btnContainerTextHover:"btnContainerTextHover__MFJH3"}},0xea7d860f:e=>{e.exports={todosCheckboxColumn:"todosCheckboxColumn__WR5GO",isUnfurl:"isUnfurl__ocb0K"}},0x120b2ba4e:e=>{e.exports={workflowsModalHeader:"workflowsModalHeader__fUKwE",workflowsModalContent:"workflowsModalContent__rsZ5j",workflowsModalListWrapper:"workflowsModalListWrapper__tCGMk",workflowsModalSubHeader:"workflowsModalSubHeader__J789M",workflowsModalTitle:"workflowsModalTitle__WMddk",workflowsModalTitleWithSubtitle:"workflowsModalTitleWithSubtitle__B1DEy",workflowsModalSubtitle:"workflowsModalSubtitle__vOLtw",workflowsModalCard:"workflowsModalCard__ud6QI",workflowsModalRow:"workflowsModalRow__kk0Hz"}},0xd3ba253f:e=>{e.exports={container:"container__JJ0sM",iconContainer:"iconContainer__FORWJ",icon:"icon__P1cMY",contentContainer:"contentContainer__M0Rwf",header:"header___qxWL",templateBadge:"templateBadge__uU4ib",subtitle:"subtitle__qnoIb"}},0x70ad81aa:e=>{e.exports={listTemplatesFooterOptionsContainer:"listTemplatesFooterOptionsContainer__PQk5z",listTemplatesOptionButtonsContainer:"listTemplatesOptionButtonsContainer__khxEu",listTemplatesOptionButton:"listTemplatesOptionButton__g42Ny"}},0xcc8160ae:e=>{e.exports={titleWrapper:"titleWrapper__EIY_t",titleText:"titleText__tHvqH",seeAllLink:"seeAllLink__ahaJW",buttonsContainer:"buttonsContainer__egYYs",cardsV2:"cardsV2__pOtb4",buttonsContainerWide:"buttonsContainerWide__B8Ayh",templateListItem:"templateListItem___2A0K",explorerActionsTile:"explorerActionsTile__Zluj3"}},0x24eebf2ce:e=>{e.exports={heroContainer:"heroContainer__mdUOa",teamIcon:"teamIcon__TCojc",confetti:"confetti__eDs22"}},0x2333c2f57:e=>{e.exports={heroContainer:"heroContainer__AzcED",teamIcon:"teamIcon__KPx8f",confetti:"confetti__rGj96"}},0x14af3ba58:e=>{e.exports={container:"container__az2aY",workspacesLabel:"workspacesLabel__HfR2B",joinBtn:"joinBtn__xz5EA",title:"title__WLZ8Y",teamName:"teamName__K1yWC",subDomain:"subDomain__KxuOd",facepileContainer:"facepileContainer__L8CNy",facepilePhoto:"facepilePhoto__xQCDz",closeIcon:"closeIcon__EpM98"}},0x25496f8a:e=>{e.exports={modal:"modal__eZnnW",content:"content__Sy8nM",options:"options__APt78",option:"option__pjM5o",nonePreview:"nonePreview__qUWoX",blurPreview:"blurPreview__mdtBh",customPreview:"customPreview__j9VOD",selected:"selected__Dm638",noneIconContainer:"noneIconContainer__v9DdY",previewText:"previewText__OM_Ai",checkmark:"checkmark__BZnNO",checkmarkBackground:"checkmarkBackground__PyNfJ",uploadPlaceholder:"uploadPlaceholder__VKgB6",uploadIcon:"uploadIcon__OQtnH",uploadText:"uploadText__wRrii",optionLabel:"optionLabel__O98t_",previewSection:"previewSection__p14fo",videoPreview:"videoPreview__RmN_g",loading:"loading__OyE9a",videoContent:"videoContent__FHMBX",spinnerContainer:"spinnerContainer__whq5a",videoContentCompactMode:"videoContentCompactMode__X7Ykh",userAvatar:"userAvatar__H3kde",recorderContainer:"recorderContainer__EV770",videoRecorderCanvas:"videoRecorderCanvas__WuaZ3",videoRecorderCanvasNotRendering:"videoRecorderCanvasNotRendering__R7Shb",footer:"footer__eaOcp",footerButtons:"footerButtons__lgB6Y",actionButtons:"actionButtons__P7spY",uploadButton:"uploadButton__fu7YL",uploadButtonIcon:"uploadButtonIcon__Ac9Vc",uploadButtonText:"uploadButtonText__bHbLC",removeButton:"removeButton__ONOjP",removeButtonIcon:"removeButtonIcon__puIj8",blurIconContainer:"blurIconContainer__MOY8X",headerWithBorder:"headerWithBorder__Es4So",customOutlineButton:"customOutlineButton__Yu1dP",customDangerButton:"customDangerButton__uP01A",huddleVideoContent:"huddleVideoContent__rlH58",huddleRecorderContainer:"huddleRecorderContainer__ZHHZa",huddlePreviewSection:"huddlePreviewSection__MZpLS",huddleBackgroundModal:"huddleBackgroundModal__Nj_zd"}},0x143a157fa:e=>{e.exports={transcriptButton:"transcriptButton__TVmAu",disabled:"disabled__IISd6"}},0x16faceb3b:e=>{e.exports={spaceNameContainer:"spaceNameContainer__Up4ES",spaceName:"spaceName__e2eNG",notificationName:"notificationName__PLxJo",notificationList:"notificationList__K7YI_",formError:"formError__RF0wt",textArea:"text-area__GqSis",alert:"alert__gmI86",alertText:"alertText__WNqBZ"}},0x1092fb6ab:e=>{e.exports={dispatcherViewer:"dispatcherViewer__MqLHN",container:"container__JbqvN",dispatcherViewerIcon:"dispatcherViewerIcon__TTCBH",xDispatcher__viewer_iconPulse:"x-dispatcher__viewer_icon--pulse__rzHrs",dispatcherViewerDetails:"dispatcherViewerDetails__HF2Tz"}},0x367edae0:e=>{e.exports={label:"label__WyTss",badge:"badge__FSVyK"}},0x7962982d:e=>{e.exports={myTasksSelected:"myTasksSelected__ueEKW"}},0x1e7dd1b:e=>{e.exports={cardContainer:"cardContainer__FVPGV",container:"container__urpg1",title:"title__VJWrF",titleIcon:"titleIcon__RN_Ns",titleTextContainer:"titleTextContainer__gwcL3",eventName:"eventName__V533s",eventDayAndTimeContainer:"eventDayAndTimeContainer__CtFpO",eventDay:"eventDay__jYOYM",eventTime:"eventTime__eiArj",verticalDelimiter:"verticalDelimiter__EbIEa",delimiterContainer:"delimiterContainer__q_8V_",contentContainer:"contentContainer__k4aWt",description:"description__CEw6C",locationContainer:"locationContainer__V6jFv",subheadingText:"subheadingText__WLOKy",locationDecorativeLinkHuddle:"locationDecorativeLinkHuddle__OI6Ri",locationDecorativeLinkHuddleText:"locationDecorativeLinkHuddleText__n8_kB",attachmentsContainer:"attachmentsContainer___pUSO",attachmentsDecorativeLink:"attachmentsDecorativeLink__uqsJU",attachmentsDecorativeLinkText:"attachmentsDecorativeLinkText__P4AjA",aiSparkle:"aiSparkle__HW17A",replyCountContainer:"replyCountContainer__xlmZD",footer:"footer__OnqbH",goingContainer:"goingContainer__XYOz8",goingText:"goingText___zZaw",numberInvited:"numberInvited__dQ2KI",rsvpButtonsContainer:"rsvpButtonsContainer__QSzLu",unselectedButton:"unselectedButton__eF37m",selectedYesOrMaybeButton:"selectedYesOrMaybeButton___oqHO",selectedNoButton:"selectedNoButton___6EhQ"}},0xc218b073:e=>{e.exports={container:"container__oAzAe"}},0x2240f6b75:e=>{e.exports={container:"container__wCQN7",metaText:"metaText__hTt2H",metaTextCollapse:"metaTextCollapse__k6n9I"}},0x14f785c53:e=>{e.exports={container:"container__r6e_z",aiLabel:"aiLabel__foDvm"}},0x174c61c15:e=>{e.exports={container:"container__pOUfp",metaText:"metaText__oWrqp",metaTextCollapse:"metaTextCollapse__OnHnr"}},0xf37f708e:e=>{e.exports={messageHoverCardContainer:"messageHoverCardContainer__YG8ec",messageHoverCardHeader:"messageHoverCardHeader__N1z8K"}},0x518ab9ee:e=>{e.exports={joinerReplyNudge:"joinerReplyNudge__qLpA3",steps:"steps__zatvh",dismissBtn:"dismissBtn__HgpSr"}},0x1daf6af72:e=>{e.exports={bannerContainer:"bannerContainer__uH4Dz",bannerContent:"bannerContent__TFadD",dismissButton:"dismissButton__C5Zmj"}},0x1c06b4fb9:e=>{e.exports={buttonRow:"buttonRow__pa5kW",messageSuggestionButton:"messageSuggestionButton__BDnR9"}},0x175bacc9a:e=>{e.exports={joinerReplyNudge:"joinerReplyNudge__a0nEb",contentContainer:"contentContainer__NqeTr",sendWelcomeCardButton:"sendWelcomeCardButton__WW_Rg"}},0x22f5c9b08:e=>{e.exports={sharedChannelInfo:"sharedChannelInfo__GHVkL",sharedChannelInfoIcon:"sharedChannelInfoIcon__AV2ih",emoji:"emoji__huR9r",animatedContainer:"animatedContainer__fTEnj",inviterBannerContainerSlideIn:"inviterBannerContainerSlideIn__kxtTT",animatedContent:"animatedContent__Rzzym",inviterBannerContentSlideIn:"inviterBannerContentSlideIn__kqhmK"}},0x1d3b9906f:e=>{e.exports={agentContainer:"agentContainer___Zjrn",agentAvatar:"agentAvatar__qlhie",agentLoading:"agentLoading__O6r9A",agentName:"agentName___3NVK",agentLoadingText:"agentLoadingText__G_HPs"}},0x18f7061fe:e=>{e.exports={backgroundMaxWidth:"backgroundMaxWidth__DFPyY",backgroundMaxWidthCentered:"backgroundMaxWidthCentered__rltvG",backgroundBorderRadius:"backgroundBorderRadius__KZb1W",messageHovered:"messageHovered__OeJ6A",messageBackground:"messageBackground__EcKAw"}},0x196dea6b3:e=>{e.exports={inlineLoaderMaxWidth:"inlineLoaderMaxWidth__O7jQx"}},0x18071adf:e=>{e.exports={channelJoinBannerOuterWrapper:"channelJoinBannerOuterWrapper__TpBQA",animateSlideDown:"animateSlideDown__Bj5IF",channelJoinCloseButton:"channelJoinCloseButton__ByAsd",channelJoinBannerWrapper:"channelJoinBannerWrapper__xVGf4",channelJoinBannerTitle:"channelJoinBannerTitle__mJvuO",channelJoinSectionLabelWrapper:"channelJoinSectionLabelWrapper__ANq41",channelJoinSectionLabel:"channelJoinSectionLabel__yISZh",channelJoinButtonWrapper:"channelJoinButtonWrapper__QApPG",channelJoinBannerActionButtons:"channelJoinBannerActionButtons__iibFi",channelJoinBannerActionButtonsWrapper:"channelJoinBannerActionButtonsWrapper__UvUKc",titleEmoji:"titleEmoji__oMQJo",channelJoinAgentsSection:"channelJoinAgentsSection__oCjZI",channelJoinAgentAvatar:"channelJoinAgentAvatar__irzlq",channelJoinAgentItem:"channelJoinAgentItem__oLFNY",channelJoinAgentMemberSlug:"channelJoinAgentMemberSlug__Bth6a",channelJoinAgentLink:"channelJoinAgentLink__bZkr1"}},0x4e52495b:e=>{e.exports={container:"container__AujBy",bannerContainer:"bannerContainer__wtVf2"}},0x1bb24c23d:e=>{e.exports={messageInput:"messageInput__PWdc0",pBlock_wrapperModal_view:"p-block_wrapper--modal_view__EmrAJ",sendMessageBtn:"sendMessageBtn__xNfhN",messageRoadbloackMsg:"messageRoadbloackMsg__RmE7r",messageInputInactive:"messageInputInactive__Ah6Ii",messageInputHeader:"messageInputHeader__jiCUv",messageInputActive:"messageInputActive__sH8bT",workflowBtn:"workflowBtn__qfczc"}},0x122f9753a:e=>{e.exports={channelJoinReasonContainer:"channelJoinReasonContainer__V93uD",channelJoinReasonBannerOuterWrapper:"channelJoinReasonBannerOuterWrapper__FZilp",channelJoinReasonCloseButton:"channelJoinReasonCloseButton__ihbFG",pipeSeparator:"pipeSeparator__LJXUR",aiSparkle:"aiSparkle__KDxfX",channelJoinReasonBannerTitle:"channelJoinReasonBannerTitle__r7yFq",titleEmoji:"titleEmoji__sbR0F",channelJoinReasonSectionLabel:"channelJoinReasonSectionLabel__AIIxB",channelJoinReasonWrapper:"channelJoinReasonWrapper__gpaAz",channelJoinReasonButtonWrapper:"channelJoinReasonButtonWrapper__PU4BM",channelJoinBannerActionButtons:"channelJoinBannerActionButtons__zkKVo",channelJoinBannerActionButtonsWrapper:"channelJoinBannerActionButtonsWrapper__BnWEL",channelJoinReasonReplyInThread:"channelJoinReasonReplyInThread__O9guE",replyInThreadSection:"replyInThreadSection__Z4T5B",replyInThreadButton:"replyInThreadButton__F0c0x",aiDisclaimer:"aiDisclaimer__NsuRP",channelJoinReasonFeedbackButtons:"channelJoinReasonFeedbackButtons__keYJX",channelJoinReasonFeedbackButton:"channelJoinReasonFeedbackButton__QgiZ_",channelJoinAgentsSection:"channelJoinAgentsSection__OhSE2",channelJoinAgentAvatar:"channelJoinAgentAvatar__tYeY0",channelJoinAgentItem:"channelJoinAgentItem__o_zxo",channelJoinAgentMemberSlug:"channelJoinAgentMemberSlug__sh3XL",channelJoinAgentLink:"channelJoinAgentLink__evBoq"}},0x549e4288:e=>{e.exports={headerImageContainer:"headerImageContainer__s6S5L"}},0xb6bbec7:e=>{e.exports={maxWidth:"maxWidth__ykUR8",maxWidthCentered:"maxWidthCentered__wA4Bh"}},0x1ee910a9c:e=>{e.exports={animationWrap:"animationWrap__gtQTL",animation:"animation__SR_PB",description:"description__eW04v",aiWorkspaceTeamCreationForeword:"aiWorkspaceTeamCreationForeword___xOcd",createdChannelTopicAndDescription:"createdChannelTopicAndDescription__jfHkE",cardsContainer:"cardsContainer__gb5YD",welcomeMessage:"welcomeMessage__SF_cw",cardWrapper:"cardWrapper__G0nra",actionCardButton:"actionCardButton__D0Mup",cardTitle:"cardTitle__OcMm7",shimmerBlocks:"shimmerBlocks__UesZT",messageContainer:"messageContainer__nvqXk",shimmer:"shimmer__A73LO"}},0x57f4a4c4:e=>{e.exports={animation:"animation__j6hLS"}},0x1261801fc:e=>{e.exports={forewordContainer:"forewordContainer__aXTcU",ctaButtonsContainer:"ctaButtonsContainer__ybrac",ctaButton:"ctaButton__RtRB1",ctaIcon:"ctaIcon__dRMsS",aubergine:"aubergine__gCV0k",ocean:"ocean__Xn4BY",ctaButtonTextContainer:"ctaButtonTextContainer__jpzvx",ctaButtonTitle:"ctaButtonTitle__DuRJm",ctaButtonSubtitle:"ctaButtonSubtitle__pXvOL"}},0x21a2c0eeb:e=>{e.exports={sendEmailImage:"sendEmailImage__XXYgn"}},0x23c4e78ca:e=>{e.exports={inviteImage:"inviteImage__jImW1"}},0x212e77513:e=>{e.exports={sendWelcomeCard:"sendWelcomeCard__AjJgd",cardImage:"cardImage__mRIVm",heading:"heading__SwnFU",description:"description__jJERd",ctaButton:"ctaButton__l392l"}},0x1837c19af:e=>{e.exports={modal:"modal__tXcr5",fileVideoContainer:"fileVideoContainer__rFBZG",playPauseContainer:"playPauseContainer__vVgmC",fileImageContainer:"fileImageContainer__iuKlw",fileImage:"fileImage__bBHL_",welcomeMessage:"welcomeMessage__uaEnU",senderNameAndTitle:"senderNameAndTitle__MsbBQ"}},0x1e1f56b12:e=>{e.exports={selectedWelcomeGraphicContainer:"selectedWelcomeGraphicContainer__iITgx",playPauseContainer:"playPauseContainer__nlBxT",selectedWelcomeGraphic:"selectedWelcomeGraphic__AMCz4",graphicOptionsContainer:"graphicOptionsContainer__B44f1",graphicOptionBtn:"graphicOptionBtn__S61O0",selectedGraphicOption:"selectedGraphicOption__I0iWl",fileEmptyPlaceholder:"fileEmptyPlaceholder__uaDl7",pendingVideoFile:"pendingVideoFile__E0v16",draftVideoFile:"draftVideoFile__zex1p",wysiwygContainer:"wysiwygContainer__yjcQS",addToChannelsHeader:"addToChannelsHeader__QC_BB",addToChannelsGraphic:"addToChannelsGraphic__PM6yk",addToChannelsTitle:"addToChannelsTitle__vfqhI",addMessageButton:"addMessageButton__UeyCe",addMessageButtonCta:"addMessageButtonCta__Qw3EJ",addMessageButtonIcon:"addMessageButtonIcon__VceVR",alreadyInChannel:"alreadyInChannel__Dk577"}},0xd17ce2f5:e=>{e.exports={graphicContainer:"graphicContainer__Kps3y",graphicImage:"graphicImage__ArbgW"}},0x28ecf5ad:e=>{e.exports={purposeImage:"purposeImage__oOjjz"}},0x1621c805e:e=>{e.exports={salesforceAppForewordContainer:"salesforceAppForewordContainer__yGTsB",salesforceAppForewordDescription:"salesforceAppForewordDescription__p0PIN",salesforceAppForewordImage:"salesforceAppForewordImage__jUHFF",salesforceAppForewordImageBoxShadow:"salesforceAppForewordImageBoxShadow__wQ_6I"}},0x2519d15ce:e=>{e.exports={inviteTeamImage:"inviteTeamImage__C3W6Z",specialChannelCardImage:"specialChannelCardImage__gwEsj"}},0x1120a0e3d:e=>{e.exports={specialChannelsForeword:"specialChannelsForeword__WyqIk",main:"main__MmzPA"}},0x8d65695b:e=>{e.exports={galleryLoadingState:"galleryLoadingState__M91M0",galleryLoadingLottie:"galleryLoadingLottie__taNhV",galleryLoadingStateTextContainer:"galleryLoadingStateTextContainer__zwqOv",galleryLoadingStateText:"galleryLoadingStateText__maOBs"}},0x224f95521:e=>{e.exports={templateImage:"templateImage__Ij8FY"}},0x1e7158ad7:e=>{e.exports={container:"container___QRnz",overrideBottomPadding:"overrideBottomPadding__Qr4bu",overrideRightPadding:"overrideRightPadding__nYrOD"}},0x58ea9622:e=>{e.exports={container:"container__Lk_po",fwdDescription:"fwdDescription__BLbbp",description:"description__uh41y",overrideRightPadding:"overrideRightPadding__f3y2B",workflowImg:"workflowImg__F6oLh",overrideRightPaddingWithLessHeight:"overrideRightPaddingWithLessHeight__P187S",animationWrapWithMargin:"animationWrapWithMargin__vD5lq",animationWrap:"animationWrap__PTlf2",animation:"animation__GXofJ"}},0x1f93bb185:e=>{e.exports={handbookImage:"handbookImage__9lIAi",videoClipImage:"videoClipImage__qhGlV"}},0xf3c38009:e=>{e.exports={container:"container__Wo4DY",animationWrap:"animationWrap__KAdCn",animation:"animation__wGrDm",overrideRightPadding:"overrideRightPadding__sllpK"}},0x747dcd87:e=>{e.exports={container:"container__Tmvy_",animationWrap:"animationWrap__KKZ5G",animation:"animation__HCnpy",overrideRightPadding:"overrideRightPadding__Pfe02",overrideRightPaddingWithLessHeight:"overrideRightPaddingWithLessHeight__BRUF7",description:"description__MuaWe",fwdDescription:"fwdDescription__fJOEB"}},0x249757129:e=>{e.exports={gifCardImage:"gifCardImage__t7hT_"}},0x211363274:e=>{e.exports={animationWrap:"animationWrap__rYdKD",animation:"animation__S7J3x"}},0xc0b8b1a1:e=>{e.exports={skClientThemeDark:"sk-client-theme--dark__dUGdy",container:"container__fb2F0"}},0x22a90e625:e=>{e.exports={container:"container__z3l0C",callout:"callout__FxDCF"}},0x20a68dce9:e=>{e.exports={buttonContainer:"buttonContainer__MyxZG",button:"button__ienqN"}},0x219b348da:e=>{e.exports={wrapper:"wrapper__ogp_q",contents:"contents__fRYG8",text:"text__WI7C8"}},0x22cacb314:e=>{e.exports={container:"container__CJ6Es"}},0x3f7bbab5:e=>{e.exports={confirmationScreenDescriptionText:"confirmationScreenDescriptionText__calUw"}},0x2411f08d5:e=>{e.exports={guestInfoItem:"guestInfoItem__omA8K",guestInfoNameContainer:"guestInfoNameContainer__DSbaP",guestInfoNameTextContainer:"guestInfoNameTextContainer__SVEDJ",memberName:"memberName__KNQ9Y",guestInfoPresence:"guestInfoPresence__PdPl0",guestInfoSecondaryName:"guestInfoSecondaryName__PLuic",guestInfoGuest:"guestInfoGuest__rLr4H",guestInfoTextContainer:"guestInfoTextContainer__w0JYj",isError:"isError__VA45F",guestInfoTextIcon:"guestInfoTextIcon__mXEZP"}},0x1b874510d:e=>{e.exports={guestInfoList:"guestInfoList__xh38_",guestInfoListItem:"guestInfoListItem__R1xKj"}},0xd623f311:e=>{e.exports={reasonForRequestDescription:"reasonForRequestDescription__AAhEs"}},0xea6fb843:e=>{e.exports={recommendedChannelsContainer:"recommendedChannelsContainer__zgeHO",missingText:"missingText__S2Vun"}},0x1f13c06a5:e=>{e.exports={container:"container__S2zF7",noBorder:"noBorder__ulS13"}},0x138dc1af2:e=>{e.exports={notificationsEverythingGlobalSuggestedDowngradeModalImageContainer:"notificationsEverythingGlobalSuggestedDowngradeModalImageContainer__TbsCT",notificationsEverythingGlobalSuggestedDowngradeModalImage:"notificationsEverythingGlobalSuggestedDowngradeModalImage__NfTdg",notificationsAlert:"notificationsAlert__s2E1R",alertIcon:"alertIcon__O2cGZ"}},0x246eca5cc:e=>{e.exports={container:"container__b2jkQ",list:"list__VbkEw",withFilters:"withFilters__Homha",loading:"loading__ERj6W",filters:"filters__HHbyy"}},0x1087682bd:e=>{e.exports={photo:"photo__iioQ0",email:"email__AkJ6k",listItem:"listItem__LnCxc",lastListItem:"lastListItem__DpSCx",mobileListItemContainer:"mobileListItemContainer__iT4KM",ellipsisName:"ellipsisName__kjQU1",ellipsisEmail:"ellipsisEmail__FkrHf"}},0x148f906f3:e=>{e.exports={deselectAll:"deselectAll__OxEvU",selectAll:"selectAll__qxydD"}},0x24aff762e:e=>{e.exports={successContainer:"successContainer__cTrsW",successTitle:"successTitle__rzS3E",successSubtitle:"successSubtitle__ekjL1",errorContainer:"errorContainer__qNmml"}},0x19ad7b3d6:e=>{e.exports={container:"container__G9sZt",alertContainer:"alertContainer__nBdS3",crmErrorContainer:"crmErrorContainer__O3sA3",emoji:"emoji__OdT3F",errorTitle:"errorTitle__WidUI",errorDescription:"errorDescription__uuL8Z"}},0x4c0f457b:e=>{e.exports={container:"container__g1yc5",icon:"icon__o2t4L",animation:"animation__UxfTD"}},0x20521db88:e=>{e.exports={appListContainer:"appListContainer__BOnoQ",loadingContainer:"loadingContainer__ihCAV",noResultsContainer:"noResultsContainer__X8Acp",appListWrapper:"appListWrapper__TnA1n",appListItem:"appListItem__U7X6v",appIcon:"appIcon__y57zX",appName:"appName__XUtDX",categoryHeader:"categoryHeader__bcG5n",noResultsText:"noResultsText__dN6jM"}},0x152816c31:e=>{e.exports={celebrationModal:"celebrationModal__U9s7H",closeButton:"closeButton__wGH2o",confettiContainer:"confettiContainer__EsClt",confettiLottie:"confettiLottie__LDpRL",confettiSvg:"confettiSvg__uvA8R",contentHidden:"contentHidden__vW589",contentVisible:"contentVisible__FV2Dg",heroSection:"heroSection__SPmkX",celebrationHeader:"celebrationHeader__e1lJz",title:"title__P_tmi",contentContainer:"contentContainer__NL6dU",buttonContainer:"buttonContainer___gr3R",footer:"footer__EIDBx",footerIcon:"footerIcon__vHxKu",footerText:"footerText___L1CS",flowerAnimation:"flowerAnimation__I4ziq",progressBarTrack:"progressBarTrack__ffWcf",progressBarFill:"progressBarFill__jUvA2",fillProgress:"fillProgress__XgUKA"}},0x9a24ca77:e=>{e.exports={closeButton:"closeButton__S1Ozj",linkContainer:"linkContainer__lw6uM",onboardingTasksSidebarMenuLinkIconWrapper:"onboardingTasksSidebarMenuLinkIconWrapper__dSY7B",sidebarIconCelebration:"sidebarIconCelebration__eokv_",iconContainer:"iconContainer__Xi722",staticIconContainer:"staticIconContainer__jQdUG",compactSidebarVariant:"compactSidebarVariant__NUAtT"}},0xdf99bfb0:e=>{e.exports={upload:"upload__QX06V",avatarCtn:"avatarCtn__JgHZW",avatar:"avatar__kIZTI",uploadButton:"uploadButton__D9hXm",uploadButtonDisabled:"uploadButtonDisabled__z8_gI"}},0x65986485:e=>{e.exports={checkbox:"checkbox__tcGGv",taskCompletedAnimationContainer:"taskCompletedAnimationContainer__GSYy2",taskCompletedAnimation:"taskCompletedAnimation__UvlC4",taskItemContainer:"taskItemContainer__zMkGX",taskItem:"taskItem__eaqMl",taskItemRowEndIcon:"taskItemRowEndIcon__bzgCY",urlLink:"urlLink__uCiKh",taskList:"taskList__b05CW"}},0x10ed81918:e=>{e.exports={menu:"menu__kr963",headerContainer:"headerContainer__NjzyN",header:"header__t92wQ",progressBarRow:"progressBarRow__kOSvq",progressBarContainer:"progressBarContainer__EExgg",progressBar:"progressBar__WTqFl",progressBarFill:"progressBarFill__sy9vZ",footer:"footer__wmHlV",dismissLink:"dismissLink__yeBfA"}},0xf7baccf0:e=>{e.exports={suggestedMembersContainer:"suggestedMembersContainer__xtGR1",suggestedMemberTag:"suggestedMemberTag__d_sc0",missingMember:"missingMember__rm_Yo"}},0x1a5d2fb07:e=>{e.exports={moreActionsButton:"moreActionsButton__vRQJ2",moreActionsButtonPolish:"moreActionsButtonPolish__u5JGj"}},0x108f35437:e=>{e.exports={dynamicImage:"dynamicImage__LR0kd",dynamicImageTitle:"dynamicImageTitle__Kio54",dynamicImageIcon:"dynamicImageIcon__ufUet",dynamicContainer:"dynamicContainer__GaDxn"}},0xeb0037f0:e=>{e.exports={emptyStateContainer:"empty-state-container__wsjXW",onboardingModalContent:"onboarding-modal-content__BDO2s",onboardingImageContainer:"onboarding-image-container__TaZjT",onboardingModalTitle:"onboarding-modal-title__SzprG",onboardingModalFooter:"onboarding-modal-footer__IGNqI"}},0x10d192ead:e=>{e.exports={actionsContainer:"actions-container__bvuLY"}},0x21fb69470:e=>{e.exports={highlightLabelSubText:"highlight-label-sub-text__Ma5q7",scopesDropdownOptions:"scopes-dropdown-options__DGuU2",scopesListCount:"scopes-list-count__pjlrR",conditionItemContainer:"condition-item-container__ficSz"}},0xf51b67e3:e=>{e.exports={conditionLogicalGroupSection:"condition-logical-group-section__qrNsZ",conditionItems:"condition-items__nQuf1",conditionsContainer:"conditions-container__IIrXI",selectorSection:"selector-section__QfI1t",selectorSectionLabel:"selector-section-label__ojeSQ",ctaSectionLineBorder:"cta-section-line-border__aOXxw",ctaContainer:"cta-container__xeRlS",ctaSection:"cta-section__RDF0g"}},0xa518a49a:e=>{e.exports={reorderTableWrapper:"reorder-table-wrapper__SpgLm"}},0x1273dcf73:e=>{e.exports={pAppLinkLabel:"p-app-link--label__YOD21"}},0x1563824bb:e=>{e.exports={whoCanRunChannelIcon:"who-can-run-channel-icon__zqJEl",pAppLinkLabel:"p-app-link--label__pl7Ne",pAppLinkLabelApp:"p-app-link--label--app__Xo0A3"}},0x217342252:e=>{e.exports={pAccesslist_table_filter:"p-accesslist_table_filter__YweX9"}},0xd08c6709:e=>{e.exports={loadingContainer:"loadingContainer__wu43_",overlay:"overlay__To3Ge",content:"content__BNqZq",marginTop100:"marginTop100__CerKe"}},0x80196f51:e=>{e.exports={rowContainer:"row-container__bfosA",row:"row__dZNp0",divider:"divider__eknzv"}},0x20b9aea96:e=>{e.exports={alert:"alert__q7s09"}},0x1d9cf8bfd:e=>{e.exports={pPlatformAdminAppsPage:"p-platform-admin-apps-page__jyeKo",pageHeader:"page-header__kg_r7",isOrgWorkspace:"is-org-workspace__T2vTc",tabAlert:"tab-alert__CSiIh",pPlatformAdminEnterpriseAppsPage:"p-platform-admin-enterprise-apps-page__qgQ9i",emptyState:"empty-state__Rb5wO",enterprisePageHeight:"enterprise-page-height__Ulu3z",workspacePageHeight:"workspace-page-height__TZcjW",noCollaboratorsLabel:"no-collaborators-label__T8VNS",installedTableWrapper:"installed-table-wrapper__fi9Vz",renderedInList:"renderedInList__Flr27",isFirstInList:"isFirstInList__HWgwK",isLastInList:"isLastInList__tjofG",isSingleInList:"isSingleInList__s0C3V"}},0x7564bb4c:e=>{e.exports={pageHeader:"page-header___KoHJ",subLine:"sub-line__H6JpR"}},0x1597edc94:e=>{e.exports={container:"container__Vei0W",resolvedBy:"resolved-by__ZPjov",categoryHeading:"categoryHeading__w38kR"}},0x164045f32:e=>{e.exports={container:"container__Qqws6",memberName:"member-name__QImCT"}},0x38eb4665:e=>{e.exports={emptyStateLayout:"empty-state-layout__lBL0j"}},0x118544f13:e=>{e.exports={agentChannelSettingsLabel:"agentChannelSettingsLabel__pPQSL",agentChannelSettingsEnableLabel:"agentChannelSettingsEnableLabel__Gh4dw",agentChannelSettingsEnableSwitch:"agentChannelSettingsEnableSwitch__Ixj54",agentChannelSettingsEnableLabelSwitchText:"agentChannelSettingsEnableLabelSwitchText__VxC5P",agentChannelSettingsEnableSwitchSwitch:"agentChannelSettingsEnableSwitchSwitch__CkUaT",agentChannelSettingsRadioText:"agentChannelSettingsRadioText__bKPkQ",agentChannelSettingsRadioTextDisabled:"agentChannelSettingsRadioTextDisabled__uuzhS"}},0xa8a9b593:e=>{e.exports={pageContent:"page-content__rUoGb"}},0x11b66d5a3:e=>{e.exports={appFunctionName:"app-function-name__Y9Nfk",alert:"alert__UiqRK",loadingState:"loadingState__YmMKu"}},0x1e362e985:e=>{e.exports={emptyStateLayout:"empty-state-layout__s53v_",memberEntity:"memberEntity__OH5NB",labelLink:"labelLink__DTYzX"}},0x1208d92d3:e=>{e.exports={emptyStateLayout:"empty-state-layout__OXZPq",pageContent:"page-content__ibTaW",groupedScopesInfoList:"grouped-scopes-info-list__yryNN",groupedScopesInfoHeading:"grouped-scopes-info-heading__Cg61M",groupedScopeListItem:"grouped-scope-list-item__XLIW7",listItemLink:"list-item-link__kBs54",listItemName:"list-item-name__dI8Tp",listItemDescription:"list-item-description__rlnjH",scopeSection:"scope-section__Eshkp",scopeSectionHeading:"scope-section-heading__AlFtH",scopeGroupHeading:"scope-group-heading__cBwER",statusApproved:"status-approved__KwvNB",statusInactive:"status-inactive__FHD18"}},0x1710a28d7:e=>{e.exports={emptyStateContainer:"empty-state-container__tC6gx"}},0x1c626f707:e=>{e.exports={viewContainer:"viewContainer__w5c9P",headerWrapper:"headerWrapper__NOWgW",tabListWrapper:"tabListWrapper__jkMi7",manageIntegrationsTabLabel:"manageIntegrationsTabLabel__v6maP",manageIntegrationsAlertContainer:"manageIntegrationsAlertContainer__K62C5"}},0x3fa06559:e=>{e.exports={viewContainer:"view-container__RbzxZ",headerWrapper:"header-wrapper__UJbcq"}},0x161a02863:e=>{e.exports={viewContainer:"view-container__Jp3bS"}},0x218c193b3:e=>{e.exports={sidebar:"sidebar__AaQ4C",sidebarContent:"sidebar-content__qaWp9"}},0x13ff301fb:e=>{e.exports={pauseImages:"pauseImages__X_mEB"}},0x7627ed13:e=>{e.exports={container:"container__vBqQ6",entity:"entity__ZH7QC",entityText:"entityText__X7tj3",textTall:"textTall__vY_uG",content:"content__wfVaQ",threads:"threads__pUxNZ"}},0x10374daae:e=>{e.exports={viewContainerContents:"viewContainerContents__asASw"}},0x1a97e7153:e=>{e.exports={viewContainerHeader:"viewContainerHeader__bttGf"}},0xcf185008:e=>{e.exports={split:"split__VNIMn",primary:"primary__oV3xm"}},0xb77461ab:e=>{e.exports={largeLegend:"largeLegend__XuFDe"}},0x10e96dc50:e=>{e.exports={speakerSelectorRow:"speakerSelectorRow__D9OET"}},0x24e129696:e=>{e.exports={colorPickerContainer:"colorPickerContainer__LdGzw",hsvContainer:"hsvContainer__ig8qE",inputWrapper:"inputWrapper__tHjBa",hashWrapper:"hashWrapper__ja74a",input:"input__PVxvm"}},0xb56a6e1f:e=>{e.exports={pageContainer:"pageContainer__wbum2",legend:"legend__ZmkWQ",headerContainer:"headerContainer__Z656n",container:"container__PmHSR",pickerPreviewButton:"pickerPreviewButton__Jq9aQ",pickerLabel:"pickerLabel__HpqsP",pickerPreviewContainer:"pickerPreviewContainer__pkwHf",pickerPreviewCircle:"pickerPreviewCircle__qYUPq",pickerPreviewText:"pickerPreviewText__g2FE6",pickerPopoverContainer:"pickerPopoverContainer__Zt4Zb",pickerPopoverHeader:"pickerPopoverHeader__GYa1q"}},0x2318f44e5:e=>{e.exports={headerSpacer:"headerSpacer__DOzeZ"}},0xf1dbcda3:e=>{e.exports={themeColorModeContainer:"themeColorModeContainer__rzOPF",sectionHeader:"sectionHeader__PsBU4",radioSectionContainer:"radioSectionContainer__YoAs8"}},0x20dbb254f:e=>{e.exports={themeFontTypefaceContainer:"themeFontTypefaceContainer__shbZE",sectionHeader:"sectionHeader__PmWjs",selectSelectionContainer:"selectSelectionContainer__I5TJU"}},0x128b5e88f:e=>{e.exports={themePrefsCheckBoxLabel:"themePrefsCheckBoxLabel__sq18m"}},0x239fc458:e=>{e.exports={themePresetSelectionContainer:"themePresetSelectionContainer__V1KUu",themePresetSection:"themePresetSection__90F0B",shareButtonContainer:"shareButtonContainer__Qwsb4",themePresetSectionHalloween:"themePresetSectionHalloween__oJd1s",themePresetSectionLabel:"themePresetSectionLabel__ooi2N",presetButtonContainer:"presetButtonContainer__Yp9OE"}},0x62f82a57:e=>{e.exports={previewCircleContainer:"previewCircleContainer__Mb7eI",previewCircle:"previewCircle__coDWn",selectedColorPickerPalette:"selectedColorPickerPalette__DHBXE",withBorder:"withBorder__hwPYq"}},0x19a58822c:e=>{e.exports={container:"container__uhwRp",themeRadio:"themeRadio__IHvrr",circleContainer:"circleContainer__jL4i5",boxContainer:"boxContainer__VfsBU",boxContainerSelected:"boxContainerSelected__ZTl4r",themeCirclePreview:"themeCirclePreview__XYCJz",boxContainerWithCircle:"boxContainerWithCircle__YKfBx",themePresetName:"themePresetName__Mj19x",boxContainerWithIcon:"boxContainerWithIcon__VE6ef",themeColorModeText:"themeColorModeText__hDoyl",brightnessIconContainer:"brightnessIconContainer__wZcnS"}},0xe32ca77d:e=>{e.exports={sectionButtonContainer:"sectionButtonContainer__qMxxP",sectionButton:"sectionButton__cNaaP",shareButton:"shareButton__DSMfA",sectionButtonText:"sectionButtonText__O2k9K",sectionButtonIcon:"sectionButtonIcon__dNiqL",surpriseButtonIcon:"surpriseButtonIcon__G9IXU",importButtonIcon:"importButtonIcon__RsBdG"}},0x1cba5e586:e=>{e.exports={row:"row__Fhwsz",rowTitle:"rowTitle__Rfaww",rowDescription:"rowDescription__FGtQ6",rowControls:"rowControls__ZCILs",cIcon_button:"c-icon_button__xijNM",notificationsAlert:"notificationsAlert__KiUAS",alertIcon:"alertIcon__s39lW"}},0x115e4260:e=>{e.exports={option:"option__FP4Lj",optionDescription:"optionDescription__QQuyj",inheritColor:"inheritColor__mMiU2"}},0x39a0d15b:e=>{e.exports={buttonRow:"buttonRow__Im7sN",playButtonLabelText:"playButtonLabelText__VOpVy",syncButton:"syncButton__e1FuT",syncList:"syncList__sAR9F",syncRow:"syncRow__XQC52",syncCheckbox:"syncCheckbox__mqd1E"}},0xdfe2a6f4:e=>{e.exports={text:"text__ppaLJ",noMarginBottom:"noMarginBottom__ol3XY"}},0x1ad07ed56:e=>{e.exports={tipContainer:"tipContainer__veVC4",tipHeader:"tipHeader__fMiJT",headerTitleContainer:"headerTitleContainer__oHRdd",title:"title__asdiH",tipItem:"tipItem__Egnnz",tipIcon:"tipIcon__diiKL",tipListContainer:"tipListContainer__W1ON_",tipContent:"tipContent__d1_lp",tipAnimatedGif:"tipAnimatedGif__N_10P",learnHow:"learnHow__M6dqq",learnHowHelpLink:"learnHowHelpLink__a6bde",helpLink:"helpLink__h4B8j",helpLinkDark:"helpLinkDark__clmGY",tipCloseText:"tipCloseText__hHoTr",closeDark:"closeDark___5gmi"}},0xfc25531d:e=>{e.exports={container:"container__X1LeC"}},0x164503a01:e=>{e.exports={laterItemDragPreview:"laterItemDragPreview__JjSnZ"}},0x11155e5e6:e=>{e.exports={autocompleteMenu:"autocompleteMenu__U7uPm",valueResult:"valueResult__VZJg9",emojiResult:"emojiResult__FphUu",channelSectionResult:"channelSectionResult__YcLKF",resultIcon:"resultIcon__ULn_B",resultEmoji:"resultEmoji__A_Uwk",channelSectionIcon:"channelSectionIcon__jcNUY"}},0xa87e6b49:e=>{e.exports={keyboardContainer:"keyboardContainer__PR865",keyboardGroup:"keyboardGroup__RG5pV",keyboardKeys:"keyboardKeys__z32oe",keyboardKey:"keyboardKey___cwll",enterKey:"enterKey__WqwIw"}},0x28365596:e=>{e.exports={avatar:"avatar___zdPf",icon:"icon__zhma6",mask:"mask__b84vg",badge:"badge__KuSXa"}},0x2488d11e4:e=>{e.exports={root:"root__NxWdh",emoji:"emoji__HxxLX",closeButton:"closeButton__BV0Sa"}},0x1c07a79c6:e=>{e.exports={connectors:"connectors__ijjTN",connectedRow:"connectedRow__hjzpc",footer:"footer__bJOkZ",title:"title__oZ7f1",subtitle:"subtitle__EW9oa",layoutControlSection:"layoutControlSection__V_1bx"}},0x1764aace7:e=>{e.exports={container:"container__S72UZ",banner:"banner__z3MwD",removeButton:"removeButton__apoK8",ctaLink:"ctaLink__A6dyf"}},0x11906ae56:e=>{e.exports={highlightedSearchTerm:"highlightedSearchTerm__Ws2QP",enterpriseSearchHeroBanner:"enterpriseSearchHeroBanner__IJ4DO",suppressAnimations:"suppressAnimations__GPoS7",fadeIn:"fade-in__WT0SK",enterpriseSearchHeroBannerContent:"enterpriseSearchHeroBannerContent__Outt3",enterpriseSearchHeroBannerLeft:"enterpriseSearchHeroBannerLeft__oUJ93",enterpriseSearchHeroBannerRight:"enterpriseSearchHeroBannerRight__Wk6N7",enterpriseSearchHeroBannerTitle:"enterpriseSearchHeroBannerTitle__Ol11j",enterpriseSearchHeroBannerSubtext:"enterpriseSearchHeroBannerSubtext__jegmm",enterpriseSearchHeroBannerViewAllLink:"enterpriseSearchHeroBannerViewAllLink__yRWZJ",enterpriseSearchHeroBannerCloseButton:"enterpriseSearchHeroBannerCloseButton__YyrSh",enterpriseSearchHeroBannerActions:"enterpriseSearchHeroBannerActions__GEauJ",enterpriseSearchHeroBannerButtons:"enterpriseSearchHeroBannerButtons__JKXBf",enterpriseSearchHeroBannerConnectorButton:"enterpriseSearchHeroBannerConnectorButton__rnIAX",enterpriseSearchHeroBannerConnectorButtonIcon:"enterpriseSearchHeroBannerConnectorButtonIcon__YqR0m"}},0x1d173564f:e=>{e.exports={contents:"contents__BxZ4p",contentsSelected:"contentsSelected__RYz7R",iconContainer:"iconContainer__ARs4f",emailHeader:"emailHeader__agmIJ",emailDescription:"emailDescription__qNl7q"}},0x1409a42ff:e=>{e.exports={container:"container__dUINj",filtersLeft:"filtersLeft__RIQ8t",filtersRight:"filtersRight__xcoNV",filtersModalTrigger:"filtersModalTrigger__o6a4C",filters:"filters__oAPer",filter:"filter__nl3hZ",hidden:"hidden__gHyU7",filterPill:"filterPill__d0pCB",filterPillContent:"filterPillContent__jU5d4",subContent:"subContent__aphPr"}},0x24ed5a3b0:e=>{e.exports={rowContainer:"rowContainer__MF87N",filterPill:"filterPill__oyGxv"}},0x1139227f9:e=>{e.exports={footerContainer:"footerContainer__xjclr"}},0x1bd59e157:e=>{e.exports={recordItem:"recordItem__mwYYj",recordItemFirst:"recordItemFirst__HRGxb",recordItemLast:"recordItemLast__MzRHm",recordItemContent:"recordItemContent__RUXqh",rowIcon:"rowIcon__cR6O0",recordSubtext:"recordSubtext__Nqk4w",actionsMenu:"actionsMenu__jPxKT"}},0x1f20c3f64:e=>{e.exports={staticValueResult:"staticValueResult__qmG2U"}},0xb69526fb:e=>{e.exports={semanticMatchLabel:"semanticMatchLabel__oQJTc"}},0xe9ac1152:e=>{e.exports={loadingState:"loadingState__FKVVi",previewContainer:"previewContainer__vzSdM"}},0x7e9bddba:e=>{e.exports={confirmationModalHero:"confirmationModalHero__JA5Np"}},0x2420e4f1b:e=>{e.exports={root:"root__p_uJI",connectButton:"connectButton__FvcfS",emoji:"emoji__NVaLg",closeButton:"closeButton__wWBtw"}},0x150225e6b:e=>{e.exports={root:"root__hLCWw",content:"content__KZtNv",emoji:"emoji__xWyVR"}},0x23d5c3171:e=>{e.exports={container:"container__JEU5t",aiModeContainer:"aiModeContainer__HlBp2",content:"content__A9uq4",conversationalSearch:"conversationalSearch__zSszG",tabsInner:"tabsInner__bTHUF",tabsContainer:"tabsContainer__q3M1X",tabsContainerInner:"tabsContainerInner__kJknf",tabsWrapper:"tabsWrapper__uJ98e",tabsMenu:"tabsMenu__ACAHp",aiContainer:"aiContainer__eGod4",noAnimation:"noAnimation__oHozE",enter:"enter__ws8bb",searchContainer:"searchContainer__lHap_",searchContainerNoConnectors:"searchContainerNoConnectors__ghv6K",searchContainerFull:"searchContainerFull__Yd8FW",refinements:"refinements__fjyNR",showingEscapeHatch:"showingEscapeHatch__mRBpo",filtersContainer:"filtersContainer__NpT3U",emptyStateContainer:"emptyStateContainer__gByBq",emptyState:"emptyState__cVPaQ",searchAIContainer:"searchAIContainer__lctIV",viewToggleContainer:"viewToggleContainer__cTpfx",filesLoader:"filesLoader__yGrDE",floatingSortButton:"floatingSortButton__fhAMm",shimmer_search_summary_loading:"shimmer_search_summary_loading__igloq"}},0x13556ef4c:e=>{e.exports={containerWithSearchSamples:"containerWithSearchSamples__qKqYi"}},0x3c3df166:e=>{e.exports={channelListItem:"channelListItem__gkOey"}},0x4521babb:e=>{e.exports={container:"container__wST60",actionBar:"actionBar__Ap_QA",selected:"selected__HLFV3",iconWrapper:"iconWrapper__XduPq",icon:"icon__L5Zun",content:"content__pRrln",name:"name__jkMFi",metadata:"metadata__moo8Q",joinedIcon:"joinedIcon__O9DBI",joined:"joined__DCeS0",separator:"separator___4F17",memberCount:"memberCount__wtdno",creationDateContainer:"creationDateContainer__GldB6",creationDate:"creationDate__D3mH0",queryHighlight:"queryHighlight__wmItB",topTerms:"topTerms__vLlG3"}},8557948:e=>{e.exports={appIcon:"appIcon__L4PQ1",slackIcon:"slackIcon__WG93g",appIconSmall:"appIconSmall__e1AlT",source:"source__mVdbK",resultCount:"resultCount__xSD_m",connectButton:"connectButton__trBfG",itemButton:"itemButton__c8fxM",noConnectorsSource:"noConnectorsSource__iGkpW",isLoading:"isLoading__sXTfP",hasError:"hasError__AYo52",sourceSelected:"sourceSelected__z3RNr",sourceName:"sourceName__CY2s5",badge:"badge__S0hHj",facet:"facet__uphJO",noBorderFacet:"noBorderFacet__bwmhV",lastFacet:"lastFacet__YeDW_",noBorderFacetSelected:"noBorderFacetSelected__YG798",facetSelected:"facetSelected__Yt7IX",manageSources:"manageSources__BEbsx",iconContainer:"iconContainer__SWGzI",dropdownExternalLabel:"dropdownExternalLabel__NiyAM",dropdownConnectButton:"dropdownConnectButton__QSr2D",dropdownSourceCount:"dropdownSourceCount__pAzOf",sourceDisplayOptionsBtn:"sourceDisplayOptionsBtn__zatvr",workObjectLoadingContainer:"workObjectLoadingContainer__imXI9",workObjectLoadingItem:"workObjectLoadingItem__IXTbk",shimmer:"shimmer__QCtx2"}},0x53449634:e=>{e.exports={searchFeedbackHeader:"searchFeedbackHeader__C9eaT"}},0x5a7ad540:e=>{e.exports={headerContainer:"headerContainer__z6rzo",headerContainerScrolled:"headerContainerScrolled__C1LdE",headerContainerContent:"headerContainerContent__iTTja",title:"title__WS6Ur",withTabsPadding:"withTabsPadding__UDgDG",titleMain:"titleMain__LAdNQ",titleWrapper:"titleWrapper__M5qsv",titleContent:"titleContent__Oy36d",filtersAppliedLabel:"filtersAppliedLabel__CFGzo",saveSearchButton:"saveSearchButton__y2tJg",escapeHatchText:"escapeHatchText__S8AMe",escapeHatchQuery:"escapeHatchQuery__g6Hrl",interpretationLabel:"interpretationLabel__YhuCh",interpretationQuery:"interpretationQuery__pswTK",interpretationUndo:"interpretationUndo__TQ0xV",interpretationIcon:"interpretationIcon__oha39",interpretationText:"interpretationText__ISkZ5"}},0x1d96a4e35:e=>{e.exports={modalContent:"modalContent__UOLhd",subText:"subText__uqaaV",renderContent:"renderContent__VVjNQ"}},0x6cdc8dc7:e=>{e.exports={dmsListItemEntity:"dmsListItemEntity__lRxAb"}},0x24ec4ca14:e=>{e.exports={resultsFooter:"resultsFooter__m8lTI",filtersToolbar:"filtersToolbar__hHWdf",filtersSticky:"filtersSticky__Ue0dN",conversationalSearch:"conversationalSearch__JMlsT",mostRelevantLink:"mostRelevantLink__INlZu"}},0x1423d8a96:e=>{e.exports={fileListItemContainer:"fileListItemContainer__Ib5tX",fileListItem:"fileListItem__UhvDr",firstListItemFirst:"firstListItemFirst__njte5"}},0x61668d8a:e=>{e.exports={message:"message__ziaO0",compact:"compact__VXY5y",selected:"selected__z4mq1",hoverExpand:"hoverExpand__qSmBn"}},0x78839222:e=>{e.exports={profileCard:"profileCard__KRk6t"}},0x2205cf3d7:e=>{e.exports={container:"container__d84tF",actionBar:"actionBar__Wvfb5",selected:"selected__EpLhX",avatar:"avatar__pDfOX",content:"content__RevNV",name:"name__RAWis",title:"title__WeerW",startDateContainer:"startDateContainer__HFa5Q",startDate:"startDate__uPdTE",topTerms:"topTerms__ji_bu",queryHighlight:"queryHighlight__uZdPy",separator:"separator__suZMb"}},0xe21e723:e=>{e.exports={container:"container__EHuhl",visible:"visible__Vnd99",fadeInUp:"fadeInUp__ax1Rq",heading:"heading__hGd3V",grid:"grid__DNEV_",categoryCard:"categoryCard__X_Y6Y",categoryIcon:"categoryIcon__TsRUa",categoryLabel:"categoryLabel__t9cdj",labelWrapper:"labelWrapper__rd7Fz",categoryCount:"categoryCount__eUQ2Y",arrowIcon:"arrowIcon__CBIJn"}},0x1c97508c7:e=>{e.exports={resultCounts:"resultCounts__aD8i3"}},0x10ae93e2d:e=>{e.exports={externalGridSkeletonContainer:"externalGridSkeletonContainer__fqXrh"}},0x3cf1e980:e=>{e.exports={cardSkeletonContainer:"cardSkeletonContainer__SerYA",memberCardSkeletonLoading:"memberCardSkeletonLoading__dmmKh",memberCardSkeletonLoadingNoAnimation:"memberCardSkeletonLoadingNoAnimation__EOwN9",pHubShimmer:"p-hub--shimmer__LnI40",memberCardSkeletonLoadingTitle:"memberCardSkeletonLoadingTitle__vwINL",memberCardSkeletonLoadingTitleTexts:"memberCardSkeletonLoadingTitleTexts__aSngN",memberCardSkeletonLoadingContent:"memberCardSkeletonLoadingContent__EwOdZ",memberCardSkeletonLoadingContentText:"memberCardSkeletonLoadingContentText__NYEwp"}},0x1badff7f5:e=>{e.exports={topResultsNuxBanner:"topResultsNuxBanner__rxa43",content:"content__EZfac",betaBadge:"betaBadge__mkzLH",text:"text__LVk75",boldText:"boldText__ruB2g",feedback:"feedback__r38m5"}},0x1d7c0bb20:e=>{e.exports={fileRow:"fileRow__at6zg"}},0x157f4cb8e:e=>{e.exports={container:"container__ESrBy",content:"content__IiB6T"}},0x927f2022:e=>{e.exports={container:"container__bNhjW",background:"background__ohxsJ",toggleMask:"toggleMask__XcoLZ",leftToggle:"leftToggle__QZ4WQ",rightToggle:"rightToggle__VMlSJ"}},0x24ae890bf:e=>{e.exports={contents:"contents__pxZA2"}},0x1756d936b:e=>{e.exports={celebration:"celebration__TnpGM",container:"container__M8uIN"}},0x200a7fabd:e=>{e.exports={hero:"hero__gCRom",loading:"loading__FDOGv"}},0x231b1626f:e=>{e.exports={banner:"banner__AWo7W"}},0xe926b18a:e=>{e.exports={blur:"blur__igfzq"}},0x16baa0c5b:e=>{e.exports={container:"container__ZsuL1",slideUp:"slideUp___VfHD",content:"content__cGahl",slideIn:"slideIn__h5OvX",banner:"banner__OKEPJ",bannerText:"bannerText__tiDEZ",dismissIcon:"dismissIcon__lRh1E",suggestions:"suggestions__CUty4",suggestionButton:"suggestionButton__Du11v"}},0x1a9d86eeb:e=>{e.exports={container:"container__vWR80",orangeCircle:"orangeCircle__KbNLR",greenCircle:"greenCircle__FbJQV",contentContainer:"contentContainer__C9QX5",headingContainer:"headingContainer__JQhQz",headingCentered:"headingCentered__vXNHU",heading:"heading__OJNE0",currentHeading:"currentHeading__sSeNR",currentSubheading:"currentSubheading__fal_o",detailsContainer:"detailsContainer__zk8No",options:"options__IjEUK",optionButton:"optionButton__Quuse",selected:"selected__SeGj_",hasSelected:"hasSelected__DJ9q6",buttonWrap:"buttonWrap__eeZul",secondaryCTA:"secondaryCTA__XSdT9",staticPill:"staticPill__c5RNr",orangeCorner:"orangeCorner__Ekw5y",greenCorner:"greenCorner__DWbB_"}},0xd82c2f63:e=>{e.exports={prefOptedOut:"prefOptedOut__iQfDL"}},0x142033e1:e=>{e.exports={container:"container__Xgbgw",label:"label__IDW0q",pills:"pills__kTds7",pill:"pill__HyKSZ",pillFilled:"pillFilled__VYqqR"}},0x2186c9ce5:e=>{e.exports={aiFeedback:"aiFeedback__UaMtw",aiFeedbackAsk:"aiFeedbackAsk__nRfqT",aiFeedbackBtns:"aiFeedbackBtns__NJcWm"}},0x76e73e3f:e=>{e.exports={expandableChannelRow:"expandableChannelRow__ezzh4",channelName:"channelName__ttyBq",inner:"inner__eBsEI",aiIcon:"aiIcon__zrevV",channelDetailsCtn:"channelDetailsCtn__eAfEd",channelDetails:"channelDetails__HQJcj",nameRow:"nameRow__Qh1qK",viewChannel:"viewChannel__x2OQN",channelTopic:"channelTopic__giQVP",timeStampContainer:"timeStampContainer__MuD9L",expandedContent:"expandedContent__nKA05",expandableBtn:"expandableBtn__jzRAF",joinButton:"joinButton__So4Q5",recentMessageContainer:"recentMessageContainer__Iv5MD",recentTopicsLabel:"recentTopicsLabel__RXwCM",channelDescriptionWithMessage:"channelDescriptionWithMessage__h4qol"}},0x173b4d8c:e=>{e.exports={joinerLaunchpadDmSection:"joinerLaunchpadDmSection__P0vnX",joinerLaunchpadDmSectionMessagePreview:"joinerLaunchpadDmSectionMessagePreview__k0hfr"}},0x1262321a9:e=>{e.exports={upload:"upload__gFyTa",avatarCtn:"avatarCtn__R0PtC",avatar:"avatar__g9mpA",uploadButton:"uploadButton__IqEKJ",uploadButtonDisabled:"uploadButtonDisabled__lZOeA",selectLabel:"selectLabel__gOwLK",alertWrapper:"alertWrapper__jCy7Z",footer:"footer__v7jht"}},0x23f7693f7:e=>{e.exports={container:"container__gDpCN",teammateLayout:"teammateLayout__uF8CG",teammate:"teammate__dA5XW",avatar:"avatar__xWyXC",subtext:"subtext__X8_W7"}},0x1776adcb1:e=>{e.exports={subheader:"subheader__YOmuN",subheaderTextContent:"subheaderTextContent__fckaT",aiGradient:"aiGradient__JoWxX",topicCardContainer:"topicCardContainer__NuxdB",topicCardWrapper:"topicCardWrapper__XX8aH",topicCard:"topicCard__LBAf6",topicCardLabel:"topicCardLabel__ZUoAh",topicCardIcon:"topicCardIcon__c1OeV",projects:"projects__PWB2M",team_collaboration:"team_collaboration__DGaAZ",social:"social__XMCcG",organization_announcements:"organization_announcements__jA2Zf",places_to_ask_questions:"places_to_ask_questions__pNHMN",selected:"selected__gmXW9",enabled:"enabled__XYL3T",disabled:"disabled__UCocW"}},0x126cca364:e=>{e.exports={ctaButton:"ctaButton__Xm5YF",ctaFilled:"ctaFilled__N8n8S",ctaOutline:"ctaOutline__Z647T",ctaText:"ctaText__r9hqG"}},0xed364038:e=>{e.exports={startWithFreeContainer:"startWithFreeContainer__wzJ7M",startWithFreeContainerInModal:"startWithFreeContainerInModal__qou3r",mrBeastContainer:"mrBeastContainer__LVPaA",mrBeastContainerMobile:"mrBeastContainerMobile__xczcU",mrBeastContainerModal:"mrBeastContainerModal__InhdA",freeCta:"freeCta__Vh3F5",freeVersionText:"freeVersionText__SuHnj",freeCtaText:"freeCtaText__Qqg4Y"}},0x1b9d148a0:e=>{e.exports={featureColumnContainer:"featureColumnContainer__VM8XE",featureColumn:"featureColumn__JGqhA",featureColumnPro:"featureColumnPro__PEt0c",featureColumnPlus:"featureColumnPlus__w2TjX",featureColumnContent:"featureColumnContent__Ryktl",highlightPlan:"highlightPlan__swqs4",highlightPlanInModal:"highlightPlanInModal__DbaQv",featureColumnHighlighted:"featureColumnHighlighted__A58Vj",header:"header__rhgbo",planName:"planName__hOE3w",planPrice:"planPrice__z2HAS",isMobile:"isMobile__B6rmJ",featuresList:"featuresList__pHcBD",feature:"feature__cJyCW",missingFeature:"missingFeature__h_I2x"}},0x60116c1a:e=>{e.exports={mrBeastImgContainer:"mrBeastImgContainer__E7ItE",mrBeastImg:"mrBeastImg__kug6M",mobile:"mobile__tbjaP"}},0x10fa39d93:e=>{e.exports={carouselContainer:"carouselContainer__KNdUe",carouselSlide:"carouselSlide__pXFpX",carouselSpacer:"carouselSpacer__ku0NC",carouselImage:"carouselImage__BVDxm",connectAppListWrapper:"connectAppListWrapper__nE2Mu",connectAppListContainer:"connectAppListContainer__FSTvq",connectAppListItem:"connectAppListItem__Rztln",connectAppListItemInfo:"connectAppListItemInfo__odRix",connectAppIcon:"connectAppIcon__tQ2Mk",connectAppIconLoading:"connectAppIconLoading__RHc9q",connectAppName:"connectAppName__jlYJz",connectAppNameLoading:"connectAppNameLoading__kFHJe",connectAppButtonLoading:"connectAppButtonLoading__znCx7"}},0x126450493:e=>{e.exports={description:"description__a7Az4",memberSelector:"memberSelector__QOpKR",channelList:"channelList__u0hgf",channelRow:"channelRow__FOW1Q",channelInfo:"channelInfo__p_aQN",joinedIcon:"joinedIcon__Czrkk",channelName:"channelName__eu0w3",channelJoined:"channelJoined__AmvbB",channelMeta:"channelMeta__JrNoI",createdDate:"createdDate__wFlf8",goToChannelLink:"goToChannelLink__qE1ge",loadingState:"loadingState__cMBys",emptyState:"emptyState__B90Vv",channelCheckbox:"channelCheckbox__RL2lt"}},0x19bbe5be3:e=>{e.exports={container:"container__Urd1x",cta:"cta__XiBG4",ctaIconWrapper:"ctaIconWrapper__df_ei",isMember:"isMember__xuhnp",creator:"creator__ow9op",iconWrapper:"iconWrapper__V54ph",title:"title__y72so",noMargin:"noMargin__GveIJ",subtitle:"subtitle__seAdq",avatarWrapper:"avatarWrapper__DdkIK"}},0x21fb432b3:e=>{e.exports={errorAlert:"errorAlert__hToJe"}},0xa3fa40d5:e=>{e.exports={container:"container___swEv",wrapper:"wrapper__gIA5H",content:"content__khNVE",headerEmoji:"headerEmoji__eReol",header:"header__b5p8g",subheader:"subheader__rt719",actionItems:"actionItems__FmLpT"}},0x24b55bcb3:e=>{e.exports={container:"container__yx5Gh",collapsedContent:"collapsedContent___TBw1",collapsedText:"collapsedText__uJ_lO",expanded:"expanded__BOSWE",expandSlideIn:"expandSlideIn__Q70MN",revealed:"revealed__PEK2I",collapseSlideOut:"collapseSlideOut__xLPJU",contentWrapper:"contentWrapper__bzcCc",giftIcon:"giftIcon__Girjs",expandedContent:"expandedContent__CPef8",closeButton:"closeButton__BXt4b",iconWrapper:"iconWrapper__S_umw",textContent:"textContent__t1dhL",headline:"headline__m83ni",description:"description__b8FVb",ctaSection:"ctaSection__nRoos",daysLeftWrapper:"daysLeftWrapper__hUwBm",daysLeftText:"daysLeftText__OgGUx",hidden:"hidden__YCNe7"}},0x184709a93:e=>{e.exports={ring:"ring__rD_Do",trackCircle:"trackCircle__mO4r9",fillCircle:"fillCircle__nSpXs"}},0x6dfa3b5f:e=>{e.exports={taskListSection:"taskListSection__C5bzG",taskListHeader:"taskListHeader__AtBfr",taskListTitle:"taskListTitle__XnEKP",taskListCard:"taskListCard__JAjgY",taskItem:"taskItem__hwpm9",taskItemContent:"taskItemContent__w33l7",taskItemIcon:"taskItemIcon__ZuxAG",taskItemText:"taskItemText__R_YJY",taskItemTitle:"taskItemTitle__UqksZ",taskItemDescription:"taskItemDescription__nC_0Q",taskItemCheckbox:"taskItemCheckbox__zst5Q",arrowIcon:"arrowIcon__pJ9MJ",checkIcon:"checkIcon__QXk8X",checkboxDefault:"checkboxDefault__f3cBX",checkboxCompleted:"checkboxCompleted__fUgpw"}},0x1b3fe09dc:e=>{e.exports={listItem:"listItem__EBiQJ",featuresList:"featuresList__UUS6x",listItemIcon:"listItemIcon__UcerT"}},0x228cb9bbc:e=>{e.exports={container:"container__udPUV",button:"button__pqCHk",link:"link__okuQe",skip:"skip__0ySRm"}},0x18bf86b41:e=>{e.exports={container:"container__D8W45",content:"content__IAp1U",options:"options__O3Sqp",option:"option__kIEPH",optionSelected:"optionSelected__FmdTl",secondaryQuestion:"secondaryQuestion__DNclw",fadeIn:"fadeIn__Qbb9f",secondaryHeading:"secondaryHeading__UAwyO"}},0x37bd4c02:e=>{e.exports={contentWrapper:"contentWrapper__F79EE",contentHeader:"contentHeader__VGwwT",backButton:"backButton__DEnll",modalContent:"modalContent__R45t1",title:"title__JZBnU",titleWithSubTitle:"titleWithSubTitle__FalqN",subtitle:"subtitle__Ivutq",featureCardsContainer:"featureCardsContainer__Jxv9W",comparePlansTitle:"comparePlansTitle__egEe0",comparePlansButton:"comparePlansButton__CXqtX"}},0xacbb6bc1:e=>{e.exports={container:"container__ZTjTj",noDiscount:"noDiscount__rwpk0",card:"card__NtqB_",withDisclaimer:"withDisclaimer__A_j6q",freeBtnWrapper:"freeBtnWrapper__e67jW",cardInner:"cardInner___2fXG",discountPercentCopy:"discountPercentCopy__MJkvl",discountPriceCopy:"discountPriceCopy__TkO4Z",discountedPrice:"discountedPrice__QxA_7",oldPrice:"oldPrice__QrmWO",giftBox:"giftBox__nOKIv",startWithFree:"startWithFree__Y6ZR6",disclaimer:"disclaimer__sWDK1",paidBtn:"paidBtn__PDaf0",freeBtnLabel:"freeBtnLabel__eoLY2",largeContainer:"largeContainer___qf25",discountCard:"discountCard__qV_1i",discountHeader:"discountHeader__vPis6",discountPercentCopyNew:"discountPercentCopyNew__tf3A5",discountPriceCopyNew:"discountPriceCopyNew__HWGjU",paidBtnNew:"paidBtnNew__KICJj",containerInModal:"containerInModal__x4HEo"}},0x1bd39ef7d:e=>{e.exports={contentWrapper:"contentWrapper__qoq_G",contentWrapperSlackConnect:"contentWrapperSlackConnect__ezJoe",contentWrapperInproductTeamCreation:"contentWrapperInproductTeamCreation__RWzAS",proForwardContent:"proForwardContent__mdRXn",responsiveHeaderButton:"responsiveHeaderButton__N_qsM",responsiveHeader:"responsiveHeader__w5hXO",responsiveIconHighlight:"responsiveIconHighlight__yT4_C",modalLink:"modalLink__MJxHv",iconWrapper:"iconWrapper__CWu9z",iconHighlight:"iconHighlight__jAyZx",inproductTeamCreationItem:"inproductTeamCreationItem__gcIpf",expanded:"expanded__mXToC",inproductTeamCreationItemHeader:"inproductTeamCreationItemHeader__unVhF"}},0x12868644c:e=>{e.exports={rightSection:"rightSection__hkPXY",fillContainer:"fillContainer__LPWWZ",modalWidth:"modalWidth__czLp1",lottieWrapper:"lottieWrapper__pTOE0",inModal:"inModal__lSF2M",nudgeHuddles:"nudgeHuddles___uQ7U",nudgeConnect:"nudgeConnect__rCgOl",nudgeApps:"nudgeApps__gbR7N",nudgeAi:"nudgeAi___j4g3",fillContainerLottie:"fillContainerLottie__hzlgO",blobWrapper:"blobWrapper__uxwWe",blob1:"blob1__nR3ta",blob2:"blob2__cUTNP",blob3:"blob3__XDLET"}},0x43f905b9:e=>{e.exports={celebration:"celebration__WWXAI",container:"container__NbK4C"}},0x9b44caf0:e=>{e.exports={upgradeModal:"upgradeModal__OMuvV",accordionExpandedIcon:"accordionExpandedIcon__a4o5T",accordionCollapsedIcon:"accordionCollapsedIcon__sVs4L",accordionItemHeader:"accordionItemHeader__lobWM",accordionItemHeaderButton:"accordionItemHeaderButton__qap2c",accordionItemDescription:"accordionItemDescription__DzJr4",accordionListContainer:"accordionListContainer__qUSNW",featureImage:"featureImage__fEpXx",listContainer:"listContainer__YCXNK",subtitle:"subtitle__BPaBR"}},0x1fc4bd693:e=>{e.exports={confetti:"confetti__EVTml",modalContent:"modalContent__RXNqB",modalHeader:"modalHeader___MXgz",otherUsersTile:"otherUsersTile__fwzp3",avatarBar:"avatarBar__jj6Re",reactionList:"reactionList__cnztN",reactionItem:"reactionItem__tOOrQ",reactionItemIcon:"reactionItemIcon___eOU4"}},0x5705c61f:e=>{e.exports={bannerContainer:"bannerContainer__LhHYF"}},0x168e3426:e=>{e.exports={messageBody:"messageBody__BLdXY",memberLink:"memberLink__RJ2wz",cta:"cta__eUxH7",ctaBubble:"ctaBubble__luW6v",reactionContainer:"reactionContainer__HsdIz",reactionAdd:"reactionAdd__BzhG1",reactionAddButton:"reactionAddButton__NmjBq"}},0x17c4f57c9:e=>{e.exports={aboveContentImage:"aboveContentImage__GrXKm"}},0x16c87cf93:e=>{e.exports={shareTitleSection:"shareTitleSection__dGRuJ",shareTitleSecondaryText:"shareTitleSecondaryText__Pw_T3",ownerSection:"ownerSection__A9IOb",mainPageSection:"mainPageSection__YKW8N",mainPageSectionContainer:"mainPageSectionContainer__jXHwF",withDivider:"withDivider__voIae",publishCategoryRadioLabel:"publishCategoryRadioLabel__nA9qs",listWorkflowCtaContainer:"listWorkflowCtaContainer__aUv9l",listWorkflowCtaContainerSubtext:"listWorkflowCtaContainerSubtext__sJjnT"}},0x668806d4:e=>{e.exports={container:"container__aVnH3",heading:"heading__rdMwc",listItem:"listItem__of20k",listItemLabel:"listItemLabel__6kuTb",disabled:"disabled__KcGe5",listItemEntityFirst:"listItemEntityFirst__KcO76",listItemEntityLast:"listItemEntityLast__lcDib",listItemUnknownChannelsWrapper:"listItemUnknownChannelsWrapper__eqfXl",listItemUnknownChannelsText:"listItemUnknownChannelsText__mX_QK",listItemEntityConversationEntity:"listItemEntityConversationEntity__efLzQ",listItemEntityConversationEntityWithChannelSection:"listItemEntityConversationEntityWithChannelSection__KXrx6",listItemEntityExistingChannelSectionWrapper:"listItemEntityExistingChannelSectionWrapper__E002H",listItemEntityExistingChannelSectionIcon:"listItemEntityExistingChannelSectionIcon___VEec"}},0x3517b12a:e=>{e.exports={modalContent:"modalContent__oIf6K",modalFooterText:"modalFooterText__IoVQF",shareDialogChannelSectionContent:"shareDialogChannelSectionContent__n6AN6",shareDialogChannelSectionChannelsError:"shareDialogChannelSectionChannelsError__vVlVf",shareDialogChannelSectionChannelsErrorIcon:"shareDialogChannelSectionChannelsErrorIcon__gWLlS",shareDialogModalPreamble:"shareDialogModalPreamble__GdxuN",shareDialogMessageInput:"shareDialogMessageInput__DNVH_",inputHint:"inputHint__ZuOV5",emptyStateContainer:"emptyStateContainer__F1JLT"}},0xa75a038b:e=>{e.exports={container:"container__cRqXx",heroImage:"heroImage__jurCC",text:"text__gU54p"}},0x20cb5591c:e=>{e.exports={workflowTemplatesButtonsHideWidth:"workflowTemplatesButtonsHideWidth__cEr4R",templateItem:"templateItem___BXXh",buttonsContainer:"buttonsContainer__zFXsZ",cardsV2:"cardsV2__P7rwF"}},0x1930f20c2:e=>{e.exports={container:"container__V0zkP",item:"item__t3U28",itemFocused:"itemFocused__Wsi2D",unpublishedBadge:"unpublishedBadge__fJYgf",icon:"icon__PTBTT",information:"information__xtl78",name:"name__J_WW7",description:"description__X9LP5",actions:"actions__b0IFe",actionsMenu:"actionsMenu__zNpsF",advancedCategoryBadge:"advancedCategoryBadge__oEgKX",statusBadgeDraft:"statusBadgeDraft__IFSEj",statusBadgePublished:"statusBadgePublished__vmqLL",statusBadgeInReview:"statusBadgeInReview__fPeZN",statusBadgeFeatured:"statusBadgeFeatured__jfbhN",editItem:"editItem__UJ375"}},0x11c57e1f5:e=>{e.exports={manageIntegrationsHasMovedBanner:"manageIntegrationsHasMovedBanner__JZm5u"}},0x20d1f15d3:e=>{e.exports={heroImageContainer:"heroImageContainer__FfWtg",heroImage:"heroImage__L2xYb"}},0x1c112f897:e=>{e.exports={find_workflows_education_coachmark_hero:"find_workflows_education_coachmark_hero__syYm6"}},0x10b462047:e=>{e.exports={tabbedHeaderContainer:"tabbedHeaderContainer__uyAwU",tabbedHeaderContainerPolish:"tabbedHeaderContainerPolish__fQDdE",tabbedHeaderWrapper:"tabbedHeaderWrapper__nNAs2",tabbedHeaderWrapperPolish:"tabbedHeaderWrapperPolish__N3Ypf",tabbedHeader:"tabbedHeader__eSl10",tabbedHeaderTitle:"tabbedHeaderTitle__cnM_H",tabbedHeaderActions:"tabbedHeaderActions__fEQEK"}},0x1c00faf04:e=>{e.exports={modalBody:"modalBody__OnL8r",modalFooter:"modalFooter__fmhBK",modalRoot:"modalRoot__twZP_",contentBody:"contentBody__Mmfpn",modalHeader:"modalHeader__QsU5e",channelList:"channelList__kkBf2"}},0x9d10e758:e=>{e.exports={leaveChannelsSkeletonRoot:"leaveChannelsSkeletonRoot__BdkgM",missingTextTitle:"missingTextTitle__QqBk_",missingText:"missingText__Hk7A5",missingTextSmall:"missingTextSmall__sx1q4",missingTextSmaller:"missingTextSmaller__TeIOl",missingDivider:"missingDivider__svYbe",missingChannel:"missingChannel__jzw8i",missingAvatar:"missingAvatar__Kx2Yg"}},0x55b729bf:e=>{e.exports={leaveChannelsZeroStateRoot:"leaveChannelsZeroStateRoot__RhKG4",leaveChannelsZeroStateHeader:"leaveChannelsZeroStateHeader__uihHr",leaveChannelsZeroStateCopy:"leaveChannelsZeroStateCopy__dE2qZ"}},0x951d1d4c:e=>{e.exports={fieldset:"fieldset__INuzx",header:"header__kJeJb",title:"title__Zwb_y",subTitle:"subTitle__DzF4C",label:"label__N1508",labelWrapper:"labelWrapper__E5XIv",showChannelsLabel:"showChannelsLabel__DmpGC",privateChannelsLabel:"privateChannelsLabel___XH_l",divider:"divider__JrY3J",metaCheckboxLabel:"metaCheckboxLabel__HWddX",leaveChannelCheckbox:"leaveChannelCheckbox__IpxJc",autoSizerWrapper:"autoSizerWrapper__A0Hek",checkboxGroup:"checkboxGroup__iWVzH"}},0x213c46665:e=>{e.exports={contentContainer:"contentContainer__BzIkV",heroImageContainer:"heroImageContainer__dlG1t",heroImageContainerLoading:"heroImageContainerLoading__nu1oA",actionContainer:"actionContainer__r6Z8_",stepContent:"stepContent__RLslZ",footer:"footer__tBMwT",loadingSpinner:"loadingSpinner__K8CFp",zeroStateImage:"zeroStateImage__NhFrm"}},0x71823d26:e=>{e.exports={root:"root__rvCz7",experimentSlackAiPriorityActionItemsGroupOn:"experimentSlackAiPriorityActionItemsGroupOn__jb_Nv",contentButton:"contentButton__IwvjJ",iconContainer:"iconContainer__VbGpI",messageActions:"messageActions__x9GmO",messageActionButton:"messageActionButton__StQl_",separator:"separator__BEOCm",todoAddButton:"todoAddButton__j9BP0",content:"content__GYTCx",topic:"topic__Li2ZB",actionCopy:"actionCopy__ef1GG",actionLink:"actionLink__RZQOP",hide:"hide__pgYFt",badge:"badge__pOMn4",interpunct:"interpunct__AJO7D",buttonWrapper:"buttonWrapper__X1t0Y",dismissButton:"dismissButton__L19EL",savedForLaterLabel:"savedForLaterLabel__XWmvR",messageLabel:"messageLabel__PBShu",actionCopySavedForLater:"actionCopySavedForLater__MBm5e",rootInverted:"rootInverted__lmjMb",isPeekMode:"isPeekMode__m6jHD",actionItemIcon:"actionItemIcon__QLI_x",activityListActionItemsFooter:"activityListActionItemsFooter__lH8gq"}},0x16824f6c5:e=>{e.exports={root:"root__x2jQz"}},0x3373681b:e=>{e.exports={root:"root__ihEuE"}},0x13d51b01c:e=>{e.exports={heroImage:"heroImage__aPQY0",nuxIconContainer:"nuxIconContainer__twLNk"}},0x10eb400b2:e=>{e.exports={aiComposerOverlay:"aiComposerOverlay__a94iW",fadeIn:"fadeIn__rOraP",overlayModal:"overlayModal__pFsxx",slideUp:"slideUp__TZQ_9",overlayContent:"overlayContent__IeC4K",promptBarContainer:"promptBarContainer__DOFBl",aiSparkleFilledIcon:"aiSparkleFilledIcon__vpINd",basicContainer:"basicContainer__xGYwE",multiline:"multiline__Njaed",basicContainerLoading:"basicContainerLoading__mMNdB",promptBarInput:"promptBarInput__REgSn",accessories:"accessories__Jx0wu",accessoriesWrapped:"accessoriesWrapped__oqmBf",accessoriesContainerInner:"accessoriesContainerInner__sEIrG",submitButton:"submitButton__lJPlS",suggestionsContainer:"suggestionsContainer___P8NI",slideDown:"slideDown__wLzuX",suggestionsSubMenu:"suggestionsSubMenu__VYE_3",suggestionsHeader:"suggestionsHeader__PTNtY",suggestionEmoji:"suggestionEmoji__zwuBH",suggestionContent:"suggestionContent__FyEhE",suggestionName:"suggestionName__zyujh",suggestionDescription:"suggestionDescription__j1xb9",previewContainer:"previewContainer__Xih5M",previewLabel:"previewLabel__WmdyN",previewContent:"previewContent__UTPNC",shimmerText:"shimmerText__vkpZJ",promptBarSection:"promptBarSection__uDT5y",promptBarHeader:"promptBarHeader__ZuXvg",promptBarResultsPreview:"promptBarResultsPreview__fXm2F",promptBarFooter:"promptBarFooter__MWcC8",promptBarFooterLoading:"promptBarFooterLoading__hsIt5",promptBarFooterDisclaimer:"promptBarFooterDisclaimer__Qkx3r",errorFallback:"errorFallback__jcmDI",plainTextFallback:"plainTextFallback__zhIkP",mrkdwnFallback:"mrkdwnFallback__Zpw27",typingEffect:"typingEffect__oSanJ",richContentBlocks:"richContentBlocks__H0eBx",typingIndicator:"typingIndicator__Hvhcl",dot:"dot__AH1wv",typingDot:"typingDot__OQoHY",describeYourEditInput:"describeYourEditInput__WoW76"}},0x149e4188c:e=>{e.exports={sizedContainer:"sizedContainer__WlbXl",borderStyles:"borderStyles__VCtpv"}},0x24f2b5f48:e=>{e.exports={aiComposerQuickReplies:"aiComposerQuickReplies__nhZmi",quickReplyButton:"quickReplyButton__jqczV"}},0x120395fb7:e=>{e.exports={buttonWithText:"buttonWithText__J6q0a",aiComposerTriggerButton:"aiComposerTriggerButton__atRpf",badge:"badge__EncT6",animatedBadge:"animatedBadge__bmdsU",pulse:"pulse__BnPBZ",sendButtonsGroup:"sendButtonsGroup__aCuBs"}},0x19f4efa87:e=>{e.exports={explainsBar:"explainsBar__YqZ7X",explainLabel:"explainLabel__f8WC1",explainIcon:"explainIcon__ySxVl"}},0x5808b178:e=>{e.exports={text:"text__MIWrT",static:"static__sJDbs",inline:"inline__HgiYb"}},0x1bf070f6d:e=>{e.exports={aiIconSparkles:"aiIconSparkles__MBmes",aiIconWarning:"aiIconWarning__dJIIa",aiIconInfo:"aiIconInfo__j_MMD",translationsBar:"translationsBar__zhp47",loadingBarContainer:"loadingBarContainer__fSJCJ",messageLabelSeparator:"messageLabelSeparator__t__zQ",seeOriginalText:"seeOriginalText__EBksC",feedback:"feedback__aM25m",feedbackContainer:"feedbackContainer__HdGNB",toastNotification:"toastNotification__kh4bX",preferencesLabel:"preferencesLabel__vHa3g",translateLabel:"translateLabel__p2Qos",callOutText:"callOutText__Qgakr",translationPill:"translationPill__Vi9C4",aiTranslationSparkleAnimation:"aiTranslationSparkleAnimation__fQdJH",legalDisclaimerDescription:"legalDisclaimerDescription__cECIq",translationContent:"translationContent__cr9z2",renderMenu:"renderMenu__yDVQX",submenuItem:"submenuItem__UeSfm",changeTranslationSubMenu:"changeTranslationSubMenu__IPhnn",feedbackButton:"feedbackButton__RRpRj"}},0x1ffe25e93:e=>{e.exports={loadingButton:"loadingButton__CrXuh",searchLoadingButton:"searchLoadingButton__ahv0O",recapLoadingButton:"recapLoadingButton__Ez0ye",workObjectSummaryLoadingButton:"workObjectSummaryLoadingButton__QJlH9",generateWorkflowButton:"generateWorkflowButton__dmxIe",button:"button__iTTG8",searchButton:"searchButton__XhuPj",submenuSummaryFeedbackDisclaimer:"submenuSummaryFeedbackDisclaimer__ATO13",showLabelWithIcon:"showLabelWithIcon__poPJC"}},0x16ff3076f:e=>{e.exports={missingText:"missingText__BgDNJ",animated:"animated__yLU3P",shimmer_search_summary_loading:"shimmer_search_summary_loading__Yb6no"}},0x1566664b1:e=>{e.exports={root:"root__vNBGD",pPro_badgeWithIcon:"p-pro_badge-with-icon__Ftls3",text:"text__pPKjl"}},0x108aae937:e=>{e.exports={heroImage:"heroImage__PwXar"}},0x210c066c0:e=>{e.exports={coachmarkTitle:"coachmarkTitle__yVUHi",freePreviews:"freePreviews__EpuKx",ctaButton:"ctaButton__uRM6d",aiSparkleIcon:"aiSparkleIcon__neuye",cCoachmarkv2__actions:"c-coachmarkv2__actions__l7vv1"}},0x1fe166b27:e=>{e.exports={banner:"banner__ZVL0j",searchIcon:"searchIcon__Rf11t"}},0xca04458d:e=>{e.exports={wrapper:"wrapper__YZ8EQ",content:"content__VQBSo",answer:"answer__T1iwK",aiSearchIcon:"aiSearchIcon__DO0RA",actions:"actions__fmuO0",searchExample:"searchExample__cbbrI"}},0x14195200a:e=>{e.exports={container:"container__frU8B",angle90:"angle90__Hx0ut",angle180:"angle180___4Pvl",borderRadiusL:"borderRadiusL__xQMfj",borderRadiusXL:"borderRadiusXL__UibR6"}},0x1771f1274:e=>{e.exports={container:"container__fZuvP",rest:"rest__g2GAH",transparent:"transparent__qApxt"}},0x1a819ebb4:e=>{e.exports={root:"root__rrE4J",connectButton:"connectButton__KYu_R",emoji:"emoji__apNQK",close_button:"close_button__OZ2_g"}},0xdd615930:e=>{e.exports={wrapper:"wrapper__cmehn",header:"header__f9KU5",description:"description__WBmm9",footer:"footer__EdwAB",learnMoreLink:"learnMoreLink__SNWzm"}},0x20a36ba31:e=>{e.exports={wrapper:"wrapper__etOpI",header:"header__XBITv",headerDescription:"headerDescription__M53DM",headerText:"headerText__CFBFr",headerDate:"headerDate__wFtyT",contentHeader:"contentHeader__rEC_2",contentHeaderText:"contentHeaderText__XHXb4",contentBlocks:"contentBlocks__JOnN0",contentDescription:"contentDescription__FsYkj",contentCitation:"contentCitation__cWdn_",show:"show__jSa3q",hide:"hide__agAPG",displayNone:"displayNone__PkABy",actionsBar:"actionsBar__k0fd4",hoverActionsBar:"hoverActionsBar__f52Yy",messageActions:"messageActions__Q6pvQ",linkButton:"linkButton__VMDjb",appFileIcon:"appFileIcon__xi2zG"}},0xbf37f64e:e=>{e.exports={footerActionsBar:"footerActionsBar__ZNztW",footerActionButton:"footerActionButton__p8Ezp",footerActionButtonIconOnly:"footerActionButtonIconOnly__iD78H",footerFeedbackButtons:"footerFeedbackButtons__UTMLo",footerFeedbackButton:"footerFeedbackButton__lcqE8",footerFeedbackButtonIconOnly:"footerFeedbackButtonIconOnly___V93H"}},0x79bc5396:e=>{e.exports={sourcesContainer:"sourcesContainer__DNpnl",container:"container__zXiCg",sourcesText:"sourcesText__jLoJB",toggleContainer:"toggleContainer___HRDz",sourcesButton:"sourcesButton__cwkw_",sourcesButtonIconOnly:"sourcesButtonIconOnly__xpY3L"}},0xefb728b0:e=>{e.exports={typingContainer:"typingContainer__Bk0_i",typingContainerInline:"typingContainerInline__ki98O",typingContainerFlex:"typingContainerFlex__fTXUO",typingCursor:"typingCursor__Lnoea",fadeInText:"fadeInText__N4w8w",textFadeIn:"textFadeIn__M8RLl",textContent:"textContent__QaAfu"}},0x88cc4f15:e=>{e.exports={autoSummaryCard:"autoSummaryCard__UEStF",autoSummaryContentContainer:"autoSummaryContentContainer__fRrHz",resummarizeButton:"resummarizeButton__vCIzH",autoSummaryTextContainer:"autoSummaryTextContainer__ruA9t",autoSummaryButtonContainer:"autoSummaryButtonContainer__wqTgE",loadingMessage:"loadingMessage__jkLWQ",autoSummaryCardContainer:"autoSummaryCardContainer__pJe4c",actionButtons:"actionButtons__WllaG",headerRow:"headerRow__nDubJ",titleText:"titleText__Ek6ty",minimizedCard:"minimizedCard__c2WYr",minimizeSummaryButtonContainer:"minimizeSummaryButtonContainer__Vj5sI",minimizedContentContainer:"minimizedContentContainer__E2Zek",minimizedTextContainer:"minimizedTextContainer__K7oTY",summaryPreviewText:"summaryPreviewText__xveXj",autoSummaryFooterContainer:"autoSummaryFooterContainer__CnbQ0"}},0xcd9e748:e=>{e.exports={summary:"summary__phRJj",scrollable:"scrollable__onWSP",action_buttons:"action_buttons__Sfx2N",title:"title__qNdsS",headline:"headline__u67pE",headline_icon:"headline_icon__gZx9W",title_icon:"title_icon__ppk6Z",icon:"icon__MpjhW",warning:"warning__xzEAn",action_button:"action_button__xIJTh",delete_button:"delete_button__DXRJ0",text:"text__m24DX",footer:"footer__wkjHc",footer_content:"footer_content__rtqAM",footer_content_message:"footer_content_message__Pg_cw",popover:"popover__l84I4",blockquote:"blockquote__tQXaD",has_completed_summary_flex:"has_completed_summary_flex__UumdM",summary_preview_container:"summary_preview_container__UBxNC",view_summary_label:"view_summary_label__SIXTP",preview_with_popover_trigger:"preview_with_popover_trigger__vtP76",preview_span:"preview_span__KGxpp",preview_popover_trigger:"preview_popover_trigger__Oaeni",plus_badge:"plus_badge__zfITH",search_result_summary:"search_result_summary__sz2hn"}},0x20b82548b:e=>{e.exports={threadSummaryBanner:"threadSummaryBanner__lKb9n",flexbox:"flexbox__hqQC6"}},0x22678ff4d:e=>{e.exports={container:"container__Of2mM",title:"title__GpD_N",sectionContainer:"sectionContainer__jeGTx",feedbackContainer:"feedbackContainer__WzmuY",loadingText:"loadingText__nMywQ",drop_text:"drop_text__SVfMX",errorText:"errorText__G0yWQ",shimmerText:"shimmerText__BT0Tp",loadingTextNoAnimation:"loadingTextNoAnimation__Ew9DV",feedbackButtonGroup:"feedbackButtonGroup__ktgyR"}},0x13a39b9b1:e=>{e.exports={sparkle:"sparkle__yVg8y"}},0x1dd61e4ab:e=>{e.exports={container:"container__cewY_",leftColumn:"leftColumn__sLOap",modalTitleBar:"modalTitleBar__AiIxF",modalTitleBarText:"modalTitleBarText__HL_Ns",workspaceCreatedHeader:"workspaceCreatedHeader__HSr__",workspaceCreatedEmoji:"workspaceCreatedEmoji__cEjXH",rightColumn:"rightColumn__zsWJN"}},0x2111ba460:e=>{e.exports={peekContentContainer:"peekContentContainer__k9Pc4",peekContentItem:"peekContentItem__OMA93",peekContentItemLast:"peekContentItemLast__cG2G2",candyImageContainer:"candyImageContainer__d48Lm",headerContainer:"headerContainer__cYM1D",headerTitle:"headerTitle__pT0kp",headerSubtitle:"headerSubtitle__JcSO_",arrowRightContainer:"arrowRightContainer__XEjnV",footerContainer:"footerContainer__yTE2S",footerButton:"footerButton__EcBFd",spookyCTATopNavContainer:"spookyCTATopNavContainer__V48Vl",animationContainer:"animationContainer__oddzc",icon:"icon__DNHyS",spookyLink:"spookyLink__WAxtN",spookyLinkSelected:"spookyLinkSelected__sl2ve",closeButton:"closeButton__HNw0I",undoBtnHidden:"undoBtnHidden__uA0Q4",undoBtnNotHidden:"undoBtnNotHidden__ENuA0",footerCTAContainer:"footerCTAContainer__utwVA",stylesidebarLinkBold:"stylesidebarLinkBold__nYowx",peekContentCloseButton:"peekContentCloseButton__NPClN"}},0x9f85bad2:e=>{e.exports={spiderAnimation:"spiderAnimation__ZJo6Y"}},0xa3c57145:e=>{e.exports={leftPanelCardBear:"leftPanelCardBear__q1K57",leftPanelCardGroup:"leftPanelCardGroup__eiF1A",leftPanelCardPigeon:"leftPanelCardPigeon__IRldP",header:"header__LxESF",contentScrollable:"contentScrollable__zfZNI",supports_custom_scrollbar:"supports_custom_scrollbar__fGymt",title:"title__DDmkO",message:"message__yHJPc",messageCloseToCta:"messageCloseToCta__xUXta",senderInfo:"senderInfo__BMFl6",warmRegards:"warmRegards__DD15u",senderNameWithAvatar:"senderNameWithAvatar__YD9vg",senderAvatar:"senderAvatar__oNSuV",senderName:"senderName__KmXl0",footer:"footer__JruxD",ctaButton:"ctaButton__F9j3T"}},0xf4f68b09:e=>{e.exports={cardBear:"cardBear__qDuMm",cardGroup:"cardGroup__Rrvbh",cardPigeon:"cardPigeon__FmIDB"}},0x14340c57:e=>{e.exports={cardModalWrapper:"cardModalWrapper__FcxUk",modalContentWrapper:"modalContentWrapper__basOJ",confetti:"confetti__BY1B2",modalContainer:"modalContainer__oGR8Q",leftPanel:"leftPanel__xmqcw",mediaLoadingOverlay:"mediaLoadingOverlay__SJGYW",heroImage:"heroImage__U5kKY",isLoading:"isLoading__njN37",rightPanel:"rightPanel__AGXoB"}},0x2416bb99b:e=>{e.exports={modalContainer:"modalContainer__pFawm",modalContent:"modalContent__zldDW",recipientSection:"recipientSection__jtDzF",imageSection:"imageSection__AyF1f",messageSection:"messageSection__ytDEo",sectionLabel:"sectionLabel___9rJ_",imageGrid:"imageGrid__vsaGe",imageCard:"imageCard__zyNKt",imageCardSelected:"imageCardSelected__fEZTE",imagePreview:"imagePreview__epCaa",removeFileButton:"removeFileButton__ICPUj",uploadCardContainer:"uploadCardContainer__XEDvV",uploadCard:"uploadCard__u6ocd",uploadedFileContent:"uploadedFileContent__V6_cu",uploadPlaceholder:"uploadPlaceholder__IH_pW",uploadText:"uploadText___jJ7n",messageComposer:"messageComposer__bNMrM",uploadingOverlay:"uploadingOverlay__HPzPt",uploadingSpinner:"uploadingSpinner__m9lEv",backButton:"backButton__I_Q9d",heicPlaceholder:"heicPlaceholder__J_5WF",heicFileName:"heicFileName__JwcUY"}},0x1eab6de7d:e=>{e.exports={bodyTextContainer:"bodyTextContainer__BhUmU",description:"description__k0nxv"}},0x71242e95:e=>{e.exports={spookySidebarLinkContainer:"spookySidebarLinkContainer__bWVMB",spookySidebarLinkAnimatedIcon:"spookySidebarLinkAnimatedIcon__MuZMB",spookySidebarLinkIcon:"spookySidebarLinkIcon__nG8yE",icon:"icon__w7BnD",closeButton:"closeButton__suN49"}},0x3e3ee3b1:e=>{e.exports={yearInReviewLinkContainer:"yearInReviewLinkContainer__ZrpWE",yearInReviewLinkContainerSelected:"yearInReviewLinkContainerSelected__fxTpT",yearInReviewLink:"yearInReviewLink__RVmT8",closeButton:"closeButton__B8a8m",closeButtonHidden:"closeButtonHidden__fYdeQ"}},0x2371a2749:e=>{e.exports={wrapper:"wrapper__buRp4",pill:"pill__dkZjo",pillExcluded:"pillExcluded__lwTJy",icon:"icon__AkAZ2",iconExcluded:"iconExcluded__HBmpy",text:"text__acCzO",textExcluded:"textExcluded__o5XZH",closeButton:"closeButton__NJA7O",addBackButton:"addBackButton__aUiIF"}},0xd951c582:e=>{e.exports={wrapper:"wrapper__EZx_o",button:"button__LqT50",recording:"recording__QUFTd",pulse:"pulse__hQV0g",audioBars:"audioBars__tyEFa",audioBar:"audioBar__xDl26"}},0x168bdc938:e=>{e.exports={cardsContainer:"cardsContainer__DB0yh",card:"card__rXXAK",iconContainer:"iconContainer__EXUli",promptText:"promptText__NjTns",selectedCard:"selectedCard__AC7MR",inactiveCard:"inactiveCard__vTYoo"}},0x1ef96c0ee:e=>{e.exports={messageContainer:"messageContainer__CGBD1",messageSenderContainer:"messageSenderContainer__N4R35",introSplashContent:"introSplashContent__KyJZo",introSplashSlackbot:"introSplashSlackbot__WZWac",introSplashSlackbotGradient:"introSplashSlackbotGradient__xKFNA",lottieAnimation:"lottieAnimation__x1w71",lottieLoading:"lottieLoading__Ms_mL",introSplashText:"introSplashText__UHfZt",introSplashSubtext:"introSplashSubtext__uTph_"}},0x5d9ad338:e=>{e.exports={container:"container__tugjQ",content:"content__aL_Gt",text:"text__J7tJr",title:"title__F6zbu",description:"description__N11sT",contactSalesSection:"contactSalesSection__YLNAk",contactSalesText:"contactSalesText__w89A0",buttonWrapper:"buttonWrapper__tTNqj",salesButtonIcon:"salesButtonIcon__ug89N",lottieAnimation:"lottieAnimation__Zr2OW",lottieLoading:"lottieLoading__Plor6",slackbotSleeping:"slackbotSleeping__JMd4u",requestHigherLimitSection:"requestHigherLimitSection___7NLi",requested:"requested__Jnoqk"}},0x4575dd94:e=>{e.exports={container:"container__mtA72",header:"header__AMtS0",title:"title__Umnzf",listContainer:"listContainer__yDUkA",listButton:"listButton__BszYd",menu:"menu__BwlYc"}},0x19e90b3f4:e=>{e.exports={wrapper:"wrapper__J7so3",container:"container__JFrg2",content:"content__o6VV0",icon:"icon__jF7uy",text:"text__W1_oa",closeButton:"closeButton__B09fT"}},0x8344419f:e=>{e.exports={skillPreviewCard:"skillPreviewCard__YNbGG",header:"header__TlZV5",headerText:"headerText__JeBoe",title:"title__k4066",metadata:"metadata__Gho4Q",description:"description__tmPW7",actions:"actions__ZnbRp",buttonText:"buttonText__drR83"}},0x56dc0269:e=>{e.exports={skillsPickerModal:"skillsPickerModal__EdT9f",header:"header__bR8lk",content:"content__BUKFx",contentInner:"contentInner__GRFJc",searchContainer:"searchContainer__gMV82",searchInput:"searchInput__n5mEH",skillsList:"skillsList__J04fM",skillsListInner:"skillsListInner__Bw9vs",skillCard:"skillCard__VGnQu",skillCardSelected:"skillCardSelected__yHAXD",inGroupedList:"inGroupedList__p6mgu",isFirstInList:"isFirstInList__Bw_QD",isMiddleInList:"isMiddleInList__uLwt5",isLastInList:"isLastInList__LPq1S",isSingleInList:"isSingleInList__FxOIx",skillIconContainer:"skillIconContainer__ZvsOo",skillIconSvg:"skillIconSvg__cLUL5",skillTextContent:"skillTextContent__C6qT_",skillTitle:"skillTitle__pOmQN",skillMetadata:"skillMetadata__T4Hwg",skillCheckmark:"skillCheckmark__XLQsP",emptyState:"emptyState__XS3Rd",emptyStateIcon:"emptyStateIcon__UWoqi",emptyStateTitle:"emptyStateTitle__sgS_8",emptyStateDescription:"emptyStateDescription__GCDfR"}},0x1ec72af76:e=>{e.exports={container:"container__W1AQL",searchContainer:"searchContainer__bFWqu",filtersRow:"filtersRow__a2D6W",selectOptionWithIcon:"selectOptionWithIcon__X3L54",emptyState:"emptyState__P1NAr",emptyStateIcon:"emptyStateIcon__WCVMJ",emptyStateTitle:"emptyStateTitle__K6N8q",emptyStateDescription:"emptyStateDescription__gYHWY",skillIconContainer:"skillIconContainer__IsFfa",skillIconSvg:"skillIconSvg__ix5Y5"}},0x45c9a2b7:e=>{e.exports={dragContainer:"dragContainer__m7LWR",container:"container__Sqa3A",nuxContainer:"nuxContainer__aOw3C",welcomeMat:"welcomeMat__BCMSL",welcomeMatGreetingContainer:"welcomeMatGreetingContainer__rJnbm",welcomeMatGreetingContainerHidden:"welcomeMatGreetingContainerHidden__TS12k",heading:"heading__E3y0c",greeting:"greeting__rwgR4",categoriesContainer:"categoriesContainer__LeW28",categoriesContainerScrollWrapper:"categoriesContainerScrollWrapper__iqKeH",categoryButton:"categoryButton__YtyWz",categoryButtonLabel:"categoryButtonLabel__mIwGb",listContainer:"listContainer__LtpLv",slackbotIconContainer:"slackbotIconContainer__uirmu",slackbotIcon:"slackbotIcon__JYxiG",slackbotBackground:"slackbotBackground__gbX6f",popIn:"popIn__mJF1a",slackbotCircles:"slackbotCircles__P3eLJ",features:"features__NJ81U",fadeIn:"fadeIn__W6ifK",brows:"brows__HU9wu",browRise:"browRise__DqnMQ"}},0x250055013:e=>{e.exports={container:"container__mmm_H",messageContainer:"messageContainer__jm2FJ",messageSenderContainer:"messageSenderContainer__vmcVn",messageText:"messageText__JFHV6",buttonsContainer:"buttonsContainer__PXUTD",promptButton:"promptButton__c6ZSw",iconContainer:"iconContainer__L0D2F",promptText:"promptText__p7Bkq"}},0x203c433d3:e=>{e.exports={container:"container__ewM6Q",errorIcon:"errorIcon__axElb",errorMessage:"errorMessage__XmTAj"}},0x1a4ed136e:e=>{e.exports={slackbotAiStreamConnectionInterrupted:"slackbotAiStreamConnectionInterrupted__wK41t"}},0x13aecef56:e=>{e.exports={cardListContainer:"cardListContainer__UKF1z",cardStack:"cardStack__OH9gO",cardStackPreview:"cardStackPreview__XQzb8",cardStackLine:"cardStackLine__fKzxX",cardListHeader:"cardListHeader__T371x",cardListHeaderTitle:"cardListHeaderTitle__hcSLG",cardListHeaderChevron:"cardListHeaderChevron__gxMj0",cardListExpandedList:"cardListExpandedList__UFFyS",expandedCard:"expandedCard__EFUPa"}},0xf70b8f1:e=>{e.exports={card:"card__F_azW",cardContent:"cardContent__DKfiN",cardSummary:"cardSummary__bppqg",cardMeta:"cardMeta__q1uHi",cardMetaSeparator:"cardMetaSeparator__K_ssa",calendarDateIcon:"calendarDateIcon__X14uW",calendarDateIconMonth:"calendarDateIconMonth__bWf7E",calendarDateIconDay:"calendarDateIconDay__qb1pB",calendarEventSummary:"calendarEventSummary__ntFtc"}},0x1e4ef72d1:e=>{e.exports={customResponseInfoBadgeIcon:"customResponseInfoBadgeIcon__mN56C"}},0x20343b2e6:e=>{e.exports={card:"card__mByyn",header:"header__GJ66H",headerText:"headerText__VKuRo",body:"body__Bv1Dw",footer:"footer__Uju2r"}},0x1807e7cb2:e=>{e.exports={SlackbotThinkingAvatar:"SlackbotThinkingAvatar__dIpl7"}},0x1cfb1db28:e=>{e.exports={blocksContainer:"blocksContainer__JR6TB",mainContainer:"mainContainer__Z_gqA",contentContainer:"contentContainer__slayQ",titleText:"titleText__yPgg5",bodyText:"bodyText__e1G6U",imageBottomTitleText:"imageBottomTitleText__gzRRq",imageDropShadow:"imageDropShadow__Z_oDM",wrappedButtonCircular:"wrappedButtonCircular__hY4WB",container:"container__IEy5n",controls:"controls__VIkmX",progressPips:"progressPips__y5N2N",pip:"pip__AV117",pipSelected:"pipSelected__SCLtD",pipProgress:"pipProgress__A9W5U",restartControls:"restartControls__Aa8I9",audioControls:"audioControls__AzqYI",restartButton:"restartButton__ga_nd",restartHidden:"restartHidden__HVzDR",pauseButton:"pauseButton__ClgVk",pauseButtonLabel:"pauseButtonLabel__eyQR5",rightFlags:"rightFlags__iQMKz",leftFlags:"leftFlags__ul2Xy"}},0x101a3c5c:e=>{e.exports={confettiBackgroundWrapper:"confettiBackgroundWrapper__lNA7T",confettiBackgroundSvg:"confettiBackgroundSvg__AAGHF",confettiBackgroundContent:"confettiBackgroundContent__BCvQG"}},0x14a5c39e8:e=>{e.exports={trigger:"trigger__yN99p",triggerLink:"triggerLink__WZp3z",confirmationModalHero:"confirmationModalHero__aZxjJ"}},0x190b23307:e=>{e.exports={blocksContainer:"blocksContainer__EgTm8",mainContainer:"mainContainer__xEQp8",contentContainer:"contentContainer__bEq9r",titleText:"titleText__Q1kSg",bodyText:"bodyText__SXxaQ",imageBottomTitleText:"imageBottomTitleText__s4Mg1",imageDropShadow:"imageDropShadow__YnS3F",wrappedButtonCircular:"wrappedButtonCircular__zclAd",container:"container__is7ZJ",content:"content__cDR4t",emoji:"emoji__k7U9c",heading:"heading__pR8vg",buttonWrapper:"buttonWrapper__RhnIO"}},0x18d58cb42:e=>{e.exports={container:"container__CpjGI",loadingText:"loadingText__amG86"}},0x1272633e1:e=>{e.exports={blocksContainer:"blocksContainer__lOlw0",mainContainer:"mainContainer__k_jim",contentContainer:"contentContainer__Qhgtv",titleText:"titleText__xDN0m",bodyText:"bodyText__R4b5b",imageBottomTitleText:"imageBottomTitleText__d2x6D",imageDropShadow:"imageDropShadow__KM5Ky",wrappedButtonCircular:"wrappedButtonCircular__ha6ER",button:"button__TWnmi",buttonLeft:"buttonLeft__XeROd",buttonRight:"buttonRight__S8r_G"}},0x2440a25d4:e=>{e.exports={blocksContainer:"blocksContainer__iH_34",mainContainer:"mainContainer__A37di",contentContainer:"contentContainer__DGc6L",titleText:"titleText__ChlUr",bodyText:"bodyText__vPEoy",imageBottomTitleText:"imageBottomTitleText__EhmXZ",imageDropShadow:"imageDropShadow__l0WdT",wrappedButtonCircular:"wrappedButtonCircular__BnXlx",pieChartContainer:"pieChartContainer__rOz5N",labelsContainer:"labelsContainer__RYMST",labelRow:"labelRow__n0fKH",labelFaded:"labelFaded__fxBBW",labelText:"labelText__xbkZB",connectorLine:"connectorLine__wslSd",pieChartSvg:"pieChartSvg__l3Ffm"}},0x2d3bbbec:e=>{e.exports={blocksContainer:"blocksContainer__lZM93",mainContainer:"mainContainer__Wjzmo",contentContainer:"contentContainer__KxcDA",titleText:"titleText__p1hxc",bodyText:"bodyText__fWCYR",imageBottomTitleText:"imageBottomTitleText__aNGtQ",imageDropShadow:"imageDropShadow__SDdEa",wrappedButtonCircular:"wrappedButtonCircular__lRESs",button:"button__JlQsW"}},0xfc98b301:e=>{e.exports={blocksContainer:"blocksContainer__E9bxH",mainContainer:"mainContainer__ElrjM",contentContainer:"contentContainer__T6zUJ",titleText:"titleText__jZ6n1",bodyText:"bodyText__TobgE",imageBottomTitleText:"imageBottomTitleText__vSlpC",imageDropShadow:"imageDropShadow__w3NQi",wrappedButtonCircular:"wrappedButtonCircular__lvBww",cardContentHorizontal:"cardContentHorizontal__NdEWm",cardLabelWrap:"cardLabelWrap__aIeF_",cardVisual:"cardVisual__N90xb",cardAvatarsContainer:"cardAvatarsContainer__nsnTd",cardAvatarsContainerSingle:"cardAvatarsContainerSingle__JlAAR",cardAvatar:"cardAvatar__tnbVK",cardAvatarsContainerDuo:"cardAvatarsContainerDuo__N94ep",cardAvatarsContainerTop:"cardAvatarsContainerTop__Gn2s3",cardAvatarsContainerBottom:"cardAvatarsContainerBottom__hB35S",cardPersonaImage:"cardPersonaImage__OGkwT"}},0x14bf3d1a5:e=>{e.exports={label:"label__li9Rj"}},0x1b25b7e64:e=>{e.exports={container:"container__zDXAU",slackbot:"slackbot__k6a5r",slackbotImage:"slackbotImage__I4rJM",bubbleContainer:"bubbleContainer__Nfx0a",bubbleButton:"bubbleButton__j43fO",bubble:"bubble__c_YQB",bubbleTail:"bubbleTail__xbW_e"}},0x958a1bd5:e=>{e.exports={blocksContainer:"blocksContainer__q6GCX",mainContainer:"mainContainer__RwUgs",contentContainer:"contentContainer__Ei547",titleText:"titleText__aWABW",bodyText:"bodyText__Zvv7p",imageBottomTitleText:"imageBottomTitleText__sfNRL",imageDropShadow:"imageDropShadow__NryE7",wrappedButtonCircular:"wrappedButtonCircular__OzxGn",container:"container__Zz12_",slideContainer:"slideContainer__iyNRN"}},0x1e983c396:e=>{e.exports={blocksContainer:"blocksContainer__o9JjR",mainContainer:"mainContainer__OzloA",contentContainer:"contentContainer__uYthh",titleText:"titleText__Qsw1H",bodyText:"bodyText__Hnxex",imageBottomTitleText:"imageBottomTitleText__R_DLC",imageDropShadow:"imageDropShadow__Xnx42",wrappedButtonCircular:"wrappedButtonCircular__ZanXb",footer:"footer__RC8G5"}},0x19b3c8f03:e=>{e.exports={blocksContainer:"blocksContainer__w_V9H",mainContainer:"mainContainer__RuKnu",contentContainer:"contentContainer__zkM81",titleText:"titleText__Vcrp6",bodyText:"bodyText__oZQ9X",imageBottomTitleText:"imageBottomTitleText__NV5h4",imageDropShadow:"imageDropShadow__MfgNW",wrappedButtonCircular:"wrappedButtonCircular__qKen6",bestiesMessagesBarChart:"bestiesMessagesBarChart__pR45X",bestiesMessagesBarChartItem:"bestiesMessagesBarChartItem__FJHmm",bestiesMessagesBarChartItemBar:"bestiesMessagesBarChartItemBar__kMWG1",messageCount:"messageCount__WEw2P",bestiesMessagesBarChartAvatar:"bestiesMessagesBarChartAvatar__uP4X4"}},0x225b23168:e=>{e.exports={blocksContainer:"blocksContainer__bDqCK",mainContainer:"mainContainer__X1XjG",contentContainer:"contentContainer__kuwmb",titleText:"titleText__riRGs",bodyText:"bodyText__QXRgX",imageBottomTitleText:"imageBottomTitleText__ttgMc",imageDropShadow:"imageDropShadow__JrfBz",wrappedButtonCircular:"wrappedButtonCircular__Zvfzp",heartImage:"heartImage__IoWut",animated:"animated__dXMj2",static:"static__wMC7G",cards:"cards__pT2oV",footer:"footer__anRrY",shareButton:"shareButton__FOiK9"}},0x150d1308e:e=>{e.exports={blocksContainer:"blocksContainer__RjlrB",mainContainer:"mainContainer__LwkAn",contentContainer:"contentContainer__YUOe7",titleText:"titleText__Rb41o",bodyText:"bodyText__V1O_C",imageBottomTitleText:"imageBottomTitleText__FbKU_",imageDropShadow:"imageDropShadow__nwDYg",wrappedButtonCircular:"wrappedButtonCircular__nsmrZ",avatar:"avatar__I6Ykd",subtext:"subtext__Kvm73",avatarContainer:"avatarContainer__Za6DD",partyEmojiAnimation:"partyEmojiAnimation__zbFcI",redHeartEmoji:"redHeartEmoji__HxhNP"}},0xdce7c84b:e=>{e.exports={blocksContainer:"blocksContainer__Imdqa",mainContainer:"mainContainer__ig2y8",contentContainer:"contentContainer__fdgQk",titleText:"titleText__moIJj",bodyText:"bodyText__D_fQA",imageBottomTitleText:"imageBottomTitleText__ertrQ",imageDropShadow:"imageDropShadow__CUH83",wrappedButtonCircular:"wrappedButtonCircular__ombIj",totalCountContainer:"totalCountContainer__rKx3e",totalCountNumber:"totalCountNumber__e2K3P",subtitle:"subtitle__bTVIA"}},0x669b470c:e=>{e.exports={blocksContainer:"blocksContainer__T8PnU",mainContainer:"mainContainer__yvmK8",contentContainer:"contentContainer__qMO9t",titleText:"titleText___toKC",bodyText:"bodyText__nVgo4",imageBottomTitleText:"imageBottomTitleText__txwXl",imageDropShadow:"imageDropShadow__HyYQJ",wrappedButtonCircular:"wrappedButtonCircular__QofLS",personaImage:"personaImage__KH8E_",personaDescription:"personaDescription__W5wIh"}},0x6c5313d0:e=>{e.exports={blocksContainer:"blocksContainer__ft969",mainContainer:"mainContainer__vTvqd",contentContainer:"contentContainer__JcnBB",titleText:"titleText__F5Wgi",bodyText:"bodyText__s6ok9",imageBottomTitleText:"imageBottomTitleText__sMoGj",imageDropShadow:"imageDropShadow__QEBLM",wrappedButtonCircular:"wrappedButtonCircular__IhQXM",slackbotPartyEmoji:"slackbotPartyEmoji__EIlg1",suggestionsList:"suggestionsList__H1zJZ",ctaButton:"ctaButton__FZcdp"}},0x19ca94507:e=>{e.exports={avatar:"avatar__boEVV"}},0x6754008c:e=>{e.exports={blocksContainer:"blocksContainer__jSNKL",mainContainer:"mainContainer__VWlBD",contentContainer:"contentContainer__E6k6z",titleText:"titleText__Mox57",bodyText:"bodyText__WldL9",imageBottomTitleText:"imageBottomTitleText__bfqZA",imageDropShadow:"imageDropShadow__gFRGq",wrappedButtonCircular:"wrappedButtonCircular__SXCdO",avatar:"avatar__LSpH8",avatarsContainer:"avatarsContainer__wwb6N",avatarsContainerDuo:"avatarsContainerDuo__LOepd",avatarsContainerBottom:"avatarsContainerBottom__jWwYR",avatarsContainerTop:"avatarsContainerTop__YPzCf",avatarSmall:"avatarSmall__LS6WO",avatarTopFirst:"avatarTopFirst__CaPgw",avatarTopLast:"avatarTopLast__Hbcqp"}},0x147f4ff18:e=>{e.exports={blocksContainer:"blocksContainer__gNymV",mainContainer:"mainContainer__TDa0p",contentContainer:"contentContainer__autk9",titleText:"titleText__P3LF_",bodyText:"bodyText__fOQo0",imageBottomTitleText:"imageBottomTitleText__xV6iC",imageDropShadow:"imageDropShadow__GVBVx",wrappedButtonCircular:"wrappedButtonCircular__AzZ2E",introText:"introText__CziOd",topEmojiBadgeContainer:"topEmojiBadgeContainer__vWkih",topEmojiCountBadge:"topEmojiCountBadge__ODfSl",topEmoji:"topEmoji__F5Vyl",topEmojiContainer:"topEmojiContainer__Iq2gn",emojiSlotMachineReels:"emojiSlotMachineReels__j1Y5V",slotReel:"slotReel__Ikcvd",emptySlotReel:"emptySlotReel__MV7oz",slideContainer:"slideContainer__Dcbhw"}},0x4f7913ac:e=>{e.exports={blocksContainer:"blocksContainer__sZk1m",mainContainer:"mainContainer__h3gtV",contentContainer:"contentContainer__PxIgD",titleText:"titleText__mLxYv",bodyText:"bodyText__ae30q",imageBottomTitleText:"imageBottomTitleText__ZUPeX",imageDropShadow:"imageDropShadow__QpSjq",wrappedButtonCircular:"wrappedButtonCircular__XOEFi",messageCard:"messageCard__TN4Ez"}},0x3f980684:e=>{e.exports={blocksContainer:"blocksContainer__izQ_k",mainContainer:"mainContainer__bWVQ9",contentContainer:"contentContainer__FkkaM",titleText:"titleText__p5hgz",bodyText:"bodyText__C5qrb",imageBottomTitleText:"imageBottomTitleText__hbSkC",imageDropShadow:"imageDropShadow__i6JPI",wrappedButtonCircular:"wrappedButtonCircular__ZZfRa"}},0x1f3127799:e=>{e.exports={badge:"badge__VYhZj",badgeTooltipTip:"badgeTooltipTip__XFtSI"}},0x1321e517b:e=>{e.exports={solutionsOnboardingCoachmarkOverlay:"solutionsOnboardingCoachmarkOverlay__u8UKG",cCoachmark__highlight:"c-coachmark__highlight__h8ST5",solutionsOnboardingCoachmark:"solutionsOnboardingCoachmark__fW8BN",cCoachmark__fadein:"c-coachmark__fadein__ng9u3",tractorChannelCoachmark:"tractorChannelCoachmark__PJI2v"}},0x12f41ff7d:e=>{e.exports={banner:"banner__oIcGM",listsBannerWrap:"listsBannerWrap__4RS7j"}},0x198963561:e=>{e.exports={solutionsGalleryWrapper:"solutionsGalleryWrapper__fLq2E",heroTitle:"heroTitle__nSkv8",halfCircle:"halfCircle__SPwGS",filterControlsWrapper:"filterControlsWrapper__EVunI",filterCardWrapper:"filterCardWrapper__WlgVb",fullWidth:"fullWidth__E69js",selectedCard:"selectedCard__qaOvF",moreFilterControlsWrapper:"moreFilterControlsWrapper__h379j",filterTitleAnimationContainer:"filterTitleAnimationContainer__kRswK",filterTitleAnimationImg:"filterTitleAnimationImg__AIjak",filterCardAnimationContainer:"filterCardAnimationContainer__r_58V",filterAnimationCardImg:"filterAnimationCardImg__uh3Ka",filterCardImg:"filterCardImg__WhDkj",filterCardTempImg:"filterCardTempImg__fG3UD",filterCardTempText:"filterCardTempText__QuOtf",filterCardTitle:"filterCardTitle__jjvZS",filterCardCancel:"filterCardCancel__F8tQ7",featuredCardWrapper:"featuredCardWrapper__Sgxz8",featuredCardContainer:"featuredCardContainer__t2rIz",featuredCardText:"featuredCardText__CgYfL",featuredCardImg:"featuredCardImg__E5y9K",allTemplatesCard:"allTemplatesCard__WTR_S",allTemplatesCardPreview:"allTemplatesCardPreview__d5PEj",image:"image__hzjqm",filteredViewTitleContainer:"filteredViewTitleContainer__X0bHp",filteredViewTitleImg:"filteredViewTitleImg__Cvwee",filteredViewTitleText:"filteredViewTitleText__yIZJy",titleDescription:"titleDescription__J4rZJ",expandedCardContainer:"expandedCardContainer__UBxDV",expandedCardText:"expandedCardText__JTx2z",expandedCardTitle:"expandedCardTitle__pWPC8",expandedCardDescription:"expandedCardDescription__oXrKm",expandedCardPoster:"expandedCardPoster__xLoJ1",expandedCardThumbnailContainer:"expandedCardThumbnailContainer__Dgxde",expandedCardThumbnailInnerContainer:"expandedCardThumbnailInnerContainer__LJQUo",expandedCardThumbnailImg:"expandedCardThumbnailImg__em6HQ",expandedCopyLink:"expandedCopyLink__JzFAG",hide:"hide__cLDHD",footerContainer:"footerContainer__aI8E4",footerTitle:"footerTitle__h1Boq",footerButton:"footerButton__HodKI",newBadge:"newBadge__FQL78"}},0x1638a470d:e=>{e.exports={agentSelect:"agentSelect__Fm1K7",overlay:"overlay__vHHbi",modalTitle:"modalTitle__bM9XP",modalSection:"modalSection__Yl9aL",alert:"alert__xnBuG"}},0x24e7ecf19:e=>{e.exports={confirmationModal:"confirmationModal__Nd6VC"}},0xa93dbd54:e=>{e.exports={modal:"modal__CpsC8",cSkModal_content:"c-sk-modal_content__GpgaP",cSkModal_content__inner:"c-sk-modal_content__inner__itz1x",cSkModal_content_section:"c-sk-modal_content_section__m1f0f",container:"container__uDHI8",flex_container:"flex_container__zNwl_",left_rail:"left_rail__dVqAD",header:"header__VIdT9",title:"title__WMXpt",sub_header:"sub_header__LTjf7",footer_actions:"footer_actions__G_9fA",preview:"preview__zCdHs",pro_badge:"pro_badge__cAIqY",moreActions:"moreActions__i6oM9"}},0x1fb018406:e=>{e.exports={scrollable_pane:"scrollable_pane__Km2hh",item_list:"item_list__eXBV4"}},0x1b39fc815:e=>{e.exports={help_text:"help_text__E80zL",subheader:"subheader__XpiNd",content_section:"content_section__OuJLh"}},0x41e21d9d:e=>{e.exports={footer:"footer__Ag9mW"}},0x9acebc24:e=>{e.exports={container:"container__Y7fBD",item:"item__Y4KIK",first:"first__JZudJ",last:"last__hegrt",standalone:"standalone__aX7Uv",icon:"icon__WVmI6",information:"information__Cbsu7",name:"name__oqsI5",description:"description__ufQOe"}},0x14d0e92a2:e=>{e.exports={header:"header__gHeCU",form:"form__wjgVX",back_button:"back_button__uUMfP"}},0x1fb004bbd:e=>{e.exports={header:"header__clOxI",description:"description__hc6Bb",createBlank:"createBlank__mRW3C",list:"list__UT0Mh",sub_header:"sub_header__xQnIc",blank_channel_item:"blank_channel_item__TtTdW",list_item:"list_item__j_XFz",list_item_selected:"list_item_selected__izkA9",see_all_link:"see_all_link__u6ex4"}},0x2a6449b4:e=>{e.exports={template_tag:"template_tag__ReUDI",header:"header__zsndk",description:"description__CHuh9",sub_header:"sub_header__j5oIg",list:"list__i0vIR",back_button:"back_button__y2lSK",pro_badge:"pro_badge__ewPX1"}},0x1d9a149b1:e=>{e.exports={container:"container__gaYoK",body:"body__EvJoZ",footer:"footer__q2Li1",left_rail:"left_rail__MlMzZ",left_rail_content:"left_rail_content__kKJsn",left_rail_step:"left_rail_step___LDDS",containsPill:"containsPill__nAkzy",left_rail_step_detail:"left_rail_step_detail__Qarzn",left_rail_action:"left_rail_action__IrOlJ",left_rail_action_border:"left_rail_action_border__BaJ8C",left_rail_comment:"left_rail_comment__w2u7e",preview:"preview__GutIF",copyLink:"copyLink__XnDeG",creatorPillContainer:"creatorPillContainer__lSwss",creatorPill:"creatorPill__JJmGn"}},0x1ba40412e:e=>{e.exports={channelName:"channelName__rxsv6",tabs:"tabs__uiuMx",pQuip_loading_skeleton:"p-quip_loading_skeleton__DrIiC",container:"container__HCkRC",channelDetailsActive:"channelDetailsActive__x9kUn",header:"header__zs4rK",tabList:"tabList__Pyy5j",tabContent:"tabContent__PcVVJ",tabPanel:"tabPanel__aUDph",setupContainer:"setupContainer__FirPA"}},0x333d854e:e=>{e.exports={messagePane:"messagePane__L54LU",messageContent:"messageContent__bhdIh",messageInput:"messageInput__PYesa",attachmentAction:"attachmentAction__ZoiOL",sendButton:"sendButton__KJrCv",inputContent:"inputContent__oPrH6",userName:"userName__zVdhv",messageContainer:"messageContainer__GH0wJ",messageContainerLast:"messageContainerLast__DSavX",missingText:"missingText__tMeIh",avatar:"avatar__SZ8I0",contextBar:"contextBar__fKN8_"}},0x17cf7384c:e=>{e.exports={title_container:"title_container__H7yWD"}},0x244c929c6:e=>{e.exports={mainContent:"mainContent__fj0HP",footer:"footer__tcAWT",footerText:"footer-text__OC92s",messagePreview:"messagePreview__CDjev"}},0x951239f9:e=>{e.exports={container:"container__Qn72K",previewMinis:"previewMinis__Ubnng",workflowPreview:"workflowPreview__MVh9v",icon:"icon__yPlCD",title:"title__VHmox",templateListItem:"templateListItem__eMnKe",stepsContainer:"stepsContainer__Vu5ep",triggerArrowContainer:"triggerArrowContainer__VyeVg",previewLink:"previewLink__EA72I",footerContainer:"footerContainer__kG050",helpLink:"helpLink__RLYlb",closeWorkflow:"closeWorkflow__sShkV"}},0x1b67c4c34:e=>{e.exports={container:"container__VLqd2",firstItem:"firstItem__mNzVS",lastItem:"lastItem__bm29d"}},0x1faeeb159:e=>{e.exports={template_item_remove:"template_item_remove___3gGl",preview_badge:"preview_badge__qlqLD",template_item_with_selection:"template_item_with_selection__KYhUN",template_item:"template_item__Co87y",template_item_button:"template_item_button__ermD6",template_item_with_checkbox:"template_item_with_checkbox__oQGk6",link_item:"link_item__hPQ3T",template_item_highlight:"template_item_highlight__R5psv",template_item_title:"template_item_title__mO5PZ",template_item_use_auto_cursor:"template_item_use_auto_cursor__zoD24",invalid_item:"invalid_item__tYjBL",warning_badge:"warning_badge__s5FjW",child_item:"child_item__FiHf_",child_item_icon:"child_item_icon__JVVVK"}},0x2d5733c2:e=>{e.exports={pillow:"pillow__gr3GN",selected:"selected___ydUF",subtitle:"subtitle__t9Q3Q",icon:"icon__GuIWD",title:"title__xAnQX",dim:"dim__bSQ8P",templateListItem:"templateListItem__ruz5i"}},0x1342ba35a:e=>{e.exports={modalHeaderImage:"modalHeaderImage__OTFAF",modalTitleBar:"modalTitleBar__pbZTw",spocoFeaturesWrapper:"spocoFeaturesWrapper__bNFJT",spocoFeature:"spocoFeature__tEpdU",spocoFeatureDarkMode:"spocoFeatureDarkMode__fWVIx",spocoFeatureImg:"spocoFeatureImg__xhaHc",spocoFeatureDescription:"spocoFeatureDescription__OWk2R"}},0x1c74b394:e=>{e.exports={upperSection:"upperSection__Msu3t",questionHeader:"questionHeader__gFQef",questionSubtitle:"questionSubtitle__ICbY5",closeIcon:"closeIcon__juPSE",optionsContainer:"optionsContainer__DfEIF",optionCta:"optionCta__q3j9n"}},0x135fcbf50:e=>{e.exports={headerContainer:"headerContainer__BRShX",closeIcon:"closeIcon__wSzqd",guideButton:"guideButton__lMZ5l"}},0x449f8adb:e=>{e.exports={container:"container__tM8O8"}},0x119d80f1a:e=>{e.exports={container:"container__TqAkb"}},0x648fae83:e=>{e.exports={container:"container__TwN3v",closeIcon:"closeIcon__WjCFN",solutionContainer:"solutionContainer__PAf5S",solutionHeader:"solutionHeader__CC4SV",solutionLinkCta:"solutionLinkCta__jey0y",solutionLinkCtaText:"solutionLinkCtaText__bsiLg",solutionLink2:"solutionLink2__xMRw_"}},0x23bb885d1:e=>{e.exports={container:"container__LFwjL"}},0xd189fd73:e=>{e.exports={preferences_hint:"preferences_hint__imAqM"}},0x26b29744:e=>{e.exports={container:"container__VmqKR"}},0xc768aa5c:e=>{e.exports={emailDraftButton:"emailDraftButton__Uae5I"}},0x1ab88057e:e=>{e.exports={coachmarkHero:"coachmarkHero__D2n3i",coachmarkLight:"coachmarkLight__e16lA",coachmarkDark:"coachmarkDark__Kh0n1",preload:"preload__eCuEY"}},0x1f2f7481e:e=>{e.exports={wrapper:"wrapper__nYo0T",content:"content__SiftZ",withCategoriesBtns:"withCategoriesBtns___DcY9",subtitle:"subtitle__VR8i_",actions:"actions__PzYYL",categories:"categories__kRQbh"}},0x5271d93d:e=>{e.exports={aiWarning:"aiWarning__inBX9"}},0x128752cf5:e=>{e.exports={inputContainer:"inputContainer__MGfwb",stickyInputContainer:"stickyInputContainer__Qm3GB",threadsViewInputContainer:"threadsViewInputContainer__Np4We"}},0x6f7ed95:e=>{e.exports={threadsViewFooter:"threadsViewFooter__UTxZn"}},0x1c04f0c10:e=>{e.exports={agendaError:"agendaError__yy7PF",agendaErrorCompact:"agendaErrorCompact__rjM0j",agendaErrorIllustration:"agendaErrorIllustration__ORqLb",agendaErrorIllustrationCompact:"agendaErrorIllustrationCompact__jE72A",title:"title__IfQzI",titleCompact:"titleCompact__Lv4jT",description:"description__HW9i9",descriptionCompact:"descriptionCompact__Pymua",buttonContainer:"buttonContainer___cSzz"}},0xa97abafb:e=>{e.exports={agendaNotAuthed:"agendaNotAuthed__ML7uC",agendaNotAuthedCompact:"agendaNotAuthedCompact__jPvED",calendarIllustration:"calendarIllustration__zNceX",calendarIllustrationCompact:"calendarIllustrationCompact__HFZjw",title:"title__OJ7UN",titleCompact:"titleCompact__m0Fc6",description:"description__bVG9M",descriptionCompact:"descriptionCompact__OJBS1",connectButtonContainer:"connectButtonContainer__daNuq"}},0x237b41ff6:e=>{e.exports={button:"button__gM0zi",buttonBase:"buttonBase__sF8Tx",iconAndTextContainer:"iconAndTextContainer__xmjAQ"}},0x3d28c436:e=>{e.exports={IconContainer:"IconContainer__yt4QK"}},0x1c69f5205:e=>{e.exports={slackbotAvatar:"slackbotAvatar__PlZDl",slackbotAvatarCompact:"slackbotAvatarCompact__Wy5Tg"}},0x17fed0236:e=>{e.exports={agendaSubtitle:"agendaSubtitle__vRhke"}},0x913e7874:e=>{e.exports={actions:"actions__vT1Nr",cardItem:"cardItem__KVIQf",cardItemFullView:"cardItemFullView__hGVpv",peekItem:"peekItem__KutkA",cardItemMarkedForDelete:"cardItemMarkedForDelete__Wy7cQ",title:"title__JSuNB",titleMarkedForDelete:"titleMarkedForDelete__gJIuR",metadata:"metadata__az3Z1",metadataMarkedForDelete:"metadataMarkedForDelete__IeWuP",metadataIsPeek:"metadataIsPeek__qvs_p",contextText:"contextText__PRfrd",contextTextMarkedForDelete:"contextTextMarkedForDelete__FGzpQ",separator:"separator__xJZbL",checkIcon:"checkIcon__cQI9S",checkIconButton:"checkIconButton__Yovpq",animationWrapper:"animationWrapper__lsKt6",animation:"animation__nZ0O4",animation_tada:"animation_tada__rwuBf",animation_sparkles:"animation_sparkles__Zulid",animation_heart:"animation_heart__sb8vL",animation_sunflower:"animation_sunflower__OOfF0"}},0xd18e6c88:e=>{e.exports={meetingItem:"meetingItem__KJXmo",peekItem:"peekItem__pjSRp",meetingTitle:"meetingTitle__KUYRE",meetingTitleLarge:"meetingTitleLarge__oBXm6",meetingTime:"meetingTime__mre2I",meetingStartTime:"meetingStartTime__xN_ns",meetingMetaRight:"meetingMetaRight__Vv5no",meetingItemPast:"meetingItemPast__WLHto",meetingProvider:"meetingProvider__Uah7V",providerIcon:"providerIcon__a7gBz",meetingItemCurrent:"meetingItemCurrent__x8aiq",meetingItemInner:"meetingItemInner__ZMh_w",meetingContent:"meetingContent__alcOI",meetingTitleRow:"meetingTitleRow__YDxAi",meetingDetails:"meetingDetails__RI2nW",separator:"separator__XMv0Q",meetingTag:"meetingTag__dvfTx",timeUntil:"timeUntil__zedtG",now:"now__wL1GF",joinButtonContainer:"joinButtonContainer__ood7w",prepButtonInline:"prepButtonInline__xEAVq",prepButtonContainer:"prepButtonContainer__v5mHM",providerIconContainer:"providerIconContainer__azSlJ",colorBlock:"colorBlock__cw3nj",colorBlockZoom:"colorBlockZoom__LZMHE",colorBlockGoogleMeet:"colorBlockGoogleMeet__QL_lA",colorBlockTeams:"colorBlockTeams__rFjZy",colorBlockHuddle:"colorBlockHuddle__wmBtn",colorBlockPast:"colorBlockPast__kSs5z",colorBlockTall:"colorBlockTall__DT0Oi"}},0x253145d23:e=>{e.exports={aiDisclaimerContainer:"aiDisclaimerContainer__qlL9b",aiDisclaimerText:"aiDisclaimerText__cGLiq"}},0x1305f01f8:e=>{e.exports={headerControls:"headerControls__qXHYW",headerActions:"headerActions__E8Zad",emptyState:"emptyState__IZh6O",agendaErrorContainer:"agendaErrorContainer__C4O4C",notAuthedContainer:"notAuthedContainer__eJoY5",requestSubmittedContainer:"requestSubmittedContainer__v6_3P",comingSoonContainer:"comingSoonContainer__SZZ7E",loadingContainer:"loadingContainer__GChjp",spinnerContainer:"spinnerContainer__zD_j2",loadingTextContainer:"loadingTextContainer__AT_38",loadingTitle:"loadingTitle__Hdw57",loadingSubtitle:"loadingSubtitle__rdk3_"}},0x17de1691e:e=>{e.exports={joinButtonContainer:"joinButtonContainer__xE6CY",eventItem:"eventItem__P5W8Q",eventItemPast:"eventItemPast__W2zFu",eventItemInProgress:"eventItemInProgress__NeTQy",eventItemAllDay:"eventItemAllDay__gLqZB",eventItemInner:"eventItemInner__Nrou0",eventContent:"eventContent__rtC1j",eventTitleRow:"eventTitleRow__Z9hs4",eventTitleContainer:"eventTitleContainer__gnHQW",eventTitle:"eventTitle__kT9PW",eventDetails:"eventDetails__Gi_5J",huddleStatusRow:"huddleStatusRow__OGlLs",eventTime:"eventTime__yJjR2",separator:"separator__MRUSy",meetingProvider:"meetingProvider__OnHwF",providerIcon:"providerIcon__NPGxb",huddleFacepile:"huddleFacepile__wckhS",joinButton:"joinButton__S9DYa"}},0x1035924d7:e=>{e.exports={cardFooter:"cardFooter__Flfpz",readState:"readState__Nw4qu",clearReadMessagesLink:"clearReadMessagesLink__czOxB",cardFooterCentered:"cardFooterCentered__YaDyv",fadeInDelay:"fade-in-delay__rKhIL",todayMarkedAsReadFadeIn:"today-marked-as-read--fade-in__z8yTd",fadeInDelayNoAnimation:"fade-in-delay-no-animation__RRmI_",readIcon:"readIcon__SdXdC",markedReadText:"markedReadText__DW9OK",footerLabel:"footerLabel__YjkkN",footerLabelUnread:"footerLabelUnread__zGC3w"}},0x1a75bdcd:e=>{e.exports={card:"card__s0H8N",primaryCardLayoutExperiment:"primaryCardLayoutExperiment__OkFSp",verticalLayoutCard:"verticalLayoutCard__atUX0",cardHeader:"cardHeader__Hdj68",cardHeaderBorderOn:"cardHeaderBorderOn__euZ4J",cardTitle:"cardTitle__izLY4",cardActions:"cardActions__vzcdx",cardSubTitle:"cardSubTitle__VWZZu",cardIcon:"cardIcon__kwM6n",cardIconImg:"cardIconImg__s9Ck3",secondaryCardIconImg:"secondaryCardIconImg__JYSKo",primaryCardIcon:"primaryCardIcon__V8ZPr",cardTitleText:"cardTitleText__O7IJ0",primaryCardTitleText:"primaryCardTitleText__Vt98j",cardContent:"cardContent__suYQB",cardItem:"cardItem__PBfg3",itemAvatar:"itemAvatar__DU2Sf",itemContent:"itemContent__yz47P",itemTitle:"itemTitle__v9ofu",itemSubtitle:"itemSubtitle__S3Yhz",loadingContainer:"loadingContainer__rUMLt",emptyStateContainer:"emptyStateContainer__oyngE",seeMoreContainer:"seeMoreContainer__LLCXg",tabsContainer:"tabsContainer__MxdlS",tabContent:"tabContent__M6snW",savedItemWrapper:"savedItemWrapper__RaqLy",laterFooter:"laterFooter__P84KC",laterInfoText:"laterInfoText__PIbQQ",viewAllLink:"viewAllLink__xj341"}},0x171309c6b:e=>{e.exports={nullStateContainer:"nullStateContainer__kVt4Z"}},0x1f34ebe92:e=>{e.exports={overrides:"overrides__I8BMl",optInWrapper:"optInWrapper__uYbwN"}},0x1037c7d0f:e=>{e.exports={laterEduBanner:"laterEduBanner__nhNKd",bannerText:"bannerText__kPih_"}},0x1f161b9bc:e=>{e.exports={markAsReadContainer:"markAsReadContainer__dqedo",loadingContainer:"loadingContainer__sb8xu",emptyStateContainer:"emptyStateContainer__wFUuR",cardFooter:"cardFooter__H4NX5",timestamp:"timestamp__ovKSb",scrollableContent:"scrollableContent__BYuNk",scrollbarWrapper:"scrollbarWrapper__CHSOJ",interactiveListItem:"interactiveListItem__b1nQ6",shimmerContainer:"shimmerContainer__zZe8C",cardLoadingContent:"cardLoadingContent__YaWFq",cardLoadingText:"cardLoadingText__T_EXA"}},0x2332fbbb1:e=>{e.exports={autosizerWrapper:"autosizerWrapper__At0EP",wrapper:"wrapper__w6B62",supports_custom_scrollbar:"supports_custom_scrollbar__YNsKB",layoutContainer:"layoutContainer__JuaAh",fixedHeader:"fixedHeader__B7Wps",scrollingHeader:"scrollingHeader__ObAcd",headerWrapper:"headerWrapper__afGbk",showAllCardsButton:"showAllCardsButton__NtqxQ",fixedBottom:"fixedBottom__PhsZJ",searchContainer:"searchContainer__AcMcM",cardsScrollContainer:"cardsScrollContainer__Fzgle",cardsScrollContainerTwoColumn:"cardsScrollContainerTwoColumn__TeUEx",verticalLayout:"verticalLayout__vPNjx",cardsRow:"cardsRow__c_GjP",singleCard:"singleCard__XCbHb",twoColumnLayout:"twoColumnLayout__N39Kg",primaryColumn:"primaryColumn__KEcK0",primaryColumnFullWidth:"primaryColumnFullWidth__NPAOx",secondaryColumn:"secondaryColumn__BmfwM",cardColumn:"cardColumn__CjQLw",primaryColumnStacked:"primaryColumnStacked__Mpqdv",bannerContainer:"bannerContainer__XWyfO",secondaryColumnSingle:"secondaryColumnSingle__T4Le2",layoutContainerScrollable:"layoutContainerScrollable__MK6t5",downmarketCrmAgendaWrapper:"downmarketCrmAgendaWrapper__n04tb",calendarCardContainer:"calendarCardContainer__S8wMN"}},0x1d4815ae9:e=>{e.exports={loadingContainer:"loadingContainer__WkwT_",loadingContainerAnimation:"loadingContainerAnimation__sj8Pi",shimmer:"shimmer__I6gFo",shimmerDark:"shimmerDark__OWZic",hidden:"hidden__ybCVp",loadingContainerAnimationFullWidth:"loadingContainerAnimationFullWidth__Q5jGy",labelsLoading:"labelsLoading__JdKz1",labelsLoadingHorizontal:"labelsLoadingHorizontal__fXj7g",labelsLoadingHorizontalTop:"labelsLoadingHorizontalTop__XoJ8A",actionItem:"actionItem__emX_X",actionItemPrimary:"actionItemPrimary__NeoWD",actionItemSecondary:"actionItemSecondary__hluOq",focusItem:"focusItem__AOFFl",focusBoxLoading:"focusBoxLoading__wv8US"}},0x1497833ea:e=>{e.exports={suggestedTopicBox:"suggestedTopicBox__sEUSK",emojiIcon:"emojiIcon__yX6qx",emojiIconImg:"emojiIconImg__kFTQv",hoverContent:"hoverContent__k1Myu",hoverIconButton:"hoverIconButton__VuXS1"}},0x1d82b821a:e=>{e.exports={suggestedTopicsContainer:"suggestedTopicsContainer__zDZ97",suggestedTopicsInner:"suggestedTopicsInner__b_bRS",suggestedTopicsHeader:"suggestedTopicsHeader__dY54_",suggestedTopicsSubtitle:"suggestedTopicsSubtitle__c7I_x",suggestedTopicsRow:"suggestedTopicsRow__b6TLn",slackbotInputContainer:"slackbotInputContainer__VEm6O"}},0x1d471e6b7:e=>{e.exports={header:"header__SfrDp",headerFullView:"headerFullView__YJCsm",headerPeek:"headerPeek__ppUrm",headerText:"headerText__ptgmV",fipLabelIcon:"fipLabelIcon__YCW7a"}},0x1ded1905b:e=>{e.exports={modalContentWrapper:"modalContentWrapper__icQNK",promptTopic:"promptTopic__jPTVN",sendButton:"sendButton__DeOWt"}},0x2482322f0:e=>{e.exports={focusContainer:"focusContainer__bqCej",focusInner:"focusInner__XLtfj",focusContainerLabel:"focusContainerLabel__u97EW",focusBoxContainer:"focusBoxContainer__IzW94",focusBox:"focusBox__p32TT",focusBoxHoverContent:"focusBoxHoverContent__NcsCl",focusBoxIcon:"focusBoxIcon__J3bY5",focusBoxTopic:"focusBoxTopic__NBd7H",focusBoxSubTopic:"focusBoxSubTopic__fmUq0",focusBoxHoverButton:"focusBoxHoverButton__BR9KD",focusBoxTooltipTitle:"focusBoxTooltipTitle__pYrdx",focusBoxTooltipSubtitle:"focusBoxTooltipSubtitle__yxBsi",spin:"spin__fbwuw"}},0x1fe6430f1:e=>{e.exports={topHeaderBanner:"topHeaderBanner__fy_D2",bannerText:"bannerText__dmBJS",bannerAlert:"bannerAlert__nK6Kl",bannerLink:"bannerLink__SDRUt"}},0x1ac87996e:e=>{e.exports={tomorrowHeader:"tomorrowHeader__DNKug",caret:"caret__fhJJW",headerContent:"headerContent__RqpTq",headerTitle:"headerTitle__IFNZ7",meetingCount:"meetingCount__zm6bF"}},0x1c2941beb:e=>{e.exports={topicListItem:"topicListItem__juj8L",topicListItemMarkedForDelete:"topicListItemMarkedForDelete__a8UHc",header:"header__mzgG_",titleContainer:"titleContainer__VRwVU",icon:"icon__GjB7T",title:"title__L7tgo",actions:"actions__HZNi6",summary:"summary__JCONB",viewMoreContainer:"viewMoreContainer___w3vV",generatingText:"generatingText__HpF0i",metadata:"metadata__pQb_w",metadataMarkedForDelete:"metadataMarkedForDelete__CxY65"}},0x35b3b396:e=>{e.exports={topicsCard:"topicsCard__UV6pi",topicsList:"topicsList__mzXEy",emptyState:"emptyState__qIfXl"}},0x6989832d:e=>{e.exports={actions:"actions__JkGo1",unreadItem:"unreadItem__tavIP",coachmarkActive:"coachmarkActive__fKofz",clickable:"clickable__rlGAG",unreadItemFullView:"unreadItemFullView__JksKN",peekItem:"peekItem__xTE4C",content:"content__BsUKo",theme:"theme__FcNMH",summary:"summary__h4Kq6",facepile:"facepile__XC3xz",cardFooter:"cardFooter__eeLg2",footerLabel:"footerLabel__ALv9R",markAsReadLabel:"markAsReadLabel__gZQU0",markAsReadIcon:"markAsReadIcon__Sf7mx",footerLabelSeparator:"footerLabelSeparator__h5qX0"}},0x18ea0c2fe:e=>{e.exports={headerRow:"headerRow__PvHRc",cardRow:"cardRow__Bl87h",footerRow:"footerRow__T99SF",focusRow:"focusRow__u32kj"}},0x13dc3f248:e=>{e.exports={headerRow:"headerRow__OSEzZ",headerTitle:"headerTitle__CdWBg",headerSubtitle:"headerSubtitle__sLfND"}},0x1216a7076:e=>{e.exports={channelItem:"channelItem__ROKXB",channelContent:"channelContent__XDVAz",removeButton:"removeButton__uYEdP",filteredListItem:"filteredListItem__XHcje"}},0x10011c386:e=>{e.exports={listContainer:"listContainer__xJEIo",emptyStateContainer:"emptyStateContainer__NFbe9",channelListItemContainer:"channelListItemContainer__VVvvp",filteredListItemContainer:"filteredListItemContainer__J8VqY",filteredListItemLast:"filteredListItemLast__qPVxA",filteredListItemName:"filteredListItemName__MDUUx",filteredListItemButtons:"filteredListItemButtons__J5WxL",filteredListItemButton:"filteredListItemButton__OunoE",sectionHeaderRow:"sectionHeaderRow__g_V70",sectionHeaderContent:"sectionHeaderContent__bsa09",sectionHeaderButton:"sectionHeaderButton__yoh37"}},0x175d40739:e=>{e.exports={manageChannelsFilterInput:"manageChannelsFilterInput__kWCnt"}},0xc3798d32:e=>{e.exports={loadingContainer:"loadingContainer__RmAJ6",modalContentWrapper:"modalContentWrapper__yliqR",emptyStateContainer:"emptyStateContainer__wR3BB",modalEmptyStateContainer:"modalEmptyStateContainer__ovsYF",modalFooter:"modalFooter__ygh9t",modalEmptyStateTitle:"modalEmptyStateTitle__Fby1N",modalEmptyStateDescription:"modalEmptyStateDescription__fEpI0",modalEmptyStateContainerInList:"modalEmptyStateContainerInList__VeSbc",modalEmptyStateIcon:"modalEmptyStateIcon__SRT9t"}},0xe74bb3b7:e=>{e.exports={laterPageTodayBannerContainer:"laterPageTodayBannerContainer__uVvfA",laterPageTodayBannerText:"laterPageTodayBannerText__WcGwh",laterPageTodayBannerTitle:"laterPageTodayBannerTitle__okmMx",laterPageTodayBannerContent:"laterPageTodayBannerContent__bx0um"}},0x16186f97a:e=>{e.exports={container:"container__mm9Y4",sectionHeader:"sectionHeader__AftN_",sectionLabel:"sectionLabel__HoTjw",meetingCount:"meetingCount__mgCEW",nextCardWrapper:"nextCardWrapper__bghRz",timelineSection:"timelineSection__qEV0k",emptyState:"emptyState__MLKj9"}},0x1703603e2:e=>{e.exports={row:"row__E0_Uf",label:"label__SlekP",eventNames:"eventNames__r7gTX",moreCount:"moreCount__FdCNT"}},0x1ad7330da:e=>{e.exports={block:"block__pyu4Y",colorStripe:"colorStripe__jAAWW",stripeZoom:"stripeZoom__XqxwR",stripeGoogleMeet:"stripeGoogleMeet__RPXPh",stripeTeams:"stripeTeams__xgT0R",stripeHuddle:"stripeHuddle__dfGvE",stripePast:"stripePast__XAaFr",content:"content__evSj0",title:"title__y9kgZ",metaRight:"metaRight___Bb_y",startTime:"startTime__rPHGK",blockPast:"blockPast__p4iSU",providerIcon:"providerIcon__SpwAI",providerIconImg:"providerIconImg__F69sH",timeUntilBadge:"timeUntilBadge__TWA4u",nowBadge:"nowBadge__joV2B"}},0x220d1c987:e=>{e.exports={nextCard:"nextCard__l9bTk",cardInner:"cardInner__ZZIJB",colorStripe:"colorStripe__Dczpr",content:"content__POmyE",titleRow:"titleRow__lfqY6",title:"title__cA6GA",metaRight:"metaRight__ZUTrZ",timeText:"timeText__VHZWH",providerIcon:"providerIcon__ZZnVf",providerIconImg:"providerIconImg__ek2ir",timeUntilBadge:"timeUntilBadge__NUUBe"}},0x36e0d5e8:e=>{e.exports={group:"group__uCioO",timeLabel:"timeLabel__if3Ch",cards:"cards__URVeC",currentTimeIndicator:"currentTimeIndicator__ma97A",currentTimeDot:"currentTimeDot__txUaY",currentTimeLine:"currentTimeLine__nAa4C"}},0xfa52c52b:e=>{e.exports={tabContentWrapper:"tabContentWrapper__alXcw",emptyState:"emptyState__iWZEw",loadingState:"loadingState__Yj2uX",peekLoadingContent:"peekLoadingContent__wF2L3",peekLoadingText:"peekLoadingText__balqQ",notAuthedState:"notAuthedState__R2lGh",todayPeekTabMenu:"todayPeekTabMenu__wb1tF",todayPeekTab:"todayPeekTab__eoj7L"}},0x25730b9:e=>{e.exports={sizedContainer:"sizedContainer__w__cL",borderStyles:"borderStyles__m5OFg",draftBarContainer:"draftBarContainer__igCUS",shimmerText:"shimmerText__Q7FQX"}},0x7ec27376:e=>{e.exports={header:"header__gbkr5",headerTopSpacingSM:"headerTopSpacingSM__gxNvq",headerTopSpacingXL:"headerTopSpacingXL__ClaN2",welcomeText:"welcomeText__OVgh0",headerWrapper:"headerWrapper__GR5gf",welcome:"welcome__nJO73",slackbotAvatar:"slackbotAvatar__Pb7CN",welcomeFocusDisabled:"welcomeFocusDisabled___pxCY",greetingEmoji:"greetingEmoji__NZek5"}},0x4a4d6322:e=>{e.exports={stepContent:"stepContent__OPBw7",heading:"heading__v31Wc",body:"body__VhroU",footer:"footer__E62PQ",footerStepLabel:"footerStepLabel__lyEhF",footerActions:"footerActions__XF6Ep",radioOptionGroup:"radioOptionGroup__iWiv4",radioOption:"radioOption__bMWVS",radioOptionLabel:"radioOptionLabel__b7o04",radioOptionSecondary:"radioOptionSecondary__Q5cRF"}},0x767f7190:e=>{e.exports={viewHeader:"viewHeader__xh6az",viewHeaderTitle:"viewHeaderTitle__eKxeT",viewHeaderDate:"viewHeaderDate__sk3w7",viewHeaderSettings:"viewHeaderSettings__Micaq",viewHeaderWithBackButton:"viewHeaderWithBackButton__CM_GF",viewHeaderDUIS:"viewHeaderDUIS__UwpTO",viewHeaderSynth:"viewHeaderSynth__Oyslu"}},0x1a2f8292:e=>{e.exports={search_container:"search_container__jrMlk",todayWysiwygContainer:"todayWysiwygContainer__x5vyH"}},0xf34859af:e=>{e.exports={reference:"reference__u55IR",messageIcon:"messageIcon__QLWFw",messageAvatar:"messageAvatar__dKuJg",messageAvatarDynamicRow:"messageAvatarDynamicRow__DHo8x",taskMetaData:"taskMetaData__ZjK3b",messageChannelName:"messageChannelName__P_Mys",listIcon:"listIcon__a9oe7",listTitle:"listTitle__g6xBZ",messageUserDisplayName:"messageUserDisplayName__Sr1m7",messageTaskMetaData:"messageTaskMetaData__u9tJT",listRefContainer:"listRefContainer__u7cmU"}},0x189f14b1c:e=>{e.exports={banner:"banner__dM3jJ",fieldSet:"fieldSet__NatYL",fieldSetHeader:"fieldSetHeader__nUUrR",saveButton:"saveButton__LmKFS",label:"label__qZNf1"}},0x1bc7d420c:e=>{e.exports={coachmarkImage:"coachmarkImage__bQDsT",animationContainer:"animationContainer__eNm3D",svgAnimation:"svgAnimation__UppoZ"}},0x12776746c:e=>{e.exports={todosPeekAction:"todosPeekAction__oiXWO",todosPeekActionActive:"todosPeekActionActive__WOidq"}},0x100514b3e:e=>{e.exports={todosPeekHeaderButtons:"todosPeekHeaderButtons__IAaUA"}},0xe419380f:e=>{e.exports={peekContainer:"peekContainer__UG2zH",peekContainerList:"peekContainerList__SDIgR",emptyTodoListContainer:"emptyTodoListContainer__k4Jdn"}},0x5f10b9c2:e=>{e.exports={rowContainer:"rowContainer__ase6O",innerRowContainer:"innerRowContainer__E7Up0",listIcon:"listIcon__DXkkg",dueDate:"dueDate__cQowx",referenceContainer:"referenceContainer__eXPn2",listIconTodayBackground:"listIconTodayBackground__WOHCb",listIconTodayColor:"listIconTodayColor__HJvbC",listIconPastDueBackground:"listIconPastDueBackground__WjinM",listIconPastDueColor:"listIconPastDueColor__bkJN9",listIconPastDueIconColor:"listIconPastDueIconColor__y84F3",dateCreated:"dateCreated__bqlRz"}},0x113bfb4d5:e=>{e.exports={container:"container__g7MEm",totalDue:"totalDue__zLPRW"}},0x158fe4753:e=>{e.exports={savedItemsLoadingSkeleton:"savedItemsLoadingSkeleton__ZELQP",savedItemsLoadingSkeletonTtitle:"savedItemsLoadingSkeletonTtitle__uNMtz",savedItemsLoadingSkeletonContent:"savedItemsLoadingSkeletonContent__hBSH5",savedItemsLoadingSkeletonPlaceholderContainer:"savedItemsLoadingSkeletonPlaceholderContainer__mvgEy"}},0x184cfbd2b:e=>{e.exports={header:"header__pu7_r",headerText:"headerText__VD13E"}},0x1bf1853f6:e=>{e.exports={searchInput:"searchInput__IFyT7",contentSection:"contentSection__xyVAk",contentSectionScrolled:"contentSectionScrolled__w_n2t",emptyState:"emptyState__oyR3B",agentInfo:"agentInfo__Vex8K",agentName:"agentName__zOLG2",agentDescription:"agentDescription__BczXg",selectedItem:"selectedItem__mpriC",listItem:"listItem__NsCcB",footer:"footer__zPR8m",header:"header__aMLT8",footerActions:"footerActions__fMNZT"}},0x5ab77d3c:e=>{e.exports={menuItem:"menuItem__emD1N",menuItemHovered:"menuItemHovered__jrvca",menu:"menu__W31u5",menuItemContent:"menuItemContent__krFYe",singleLine:"singleLine__XCzQ4",appName:"appName__vGzPs",appDescription:"appDescription__OkTtQ"}},0x590043ed:e=>{e.exports={coachmarkAnchor:"coachmarkAnchor__QZ7b_",coachmarkImage:"coachmarkImage__cFMMc"}},0xe12cb885:e=>{e.exports={actionMenu:"actionMenu__Y7125"}},0x2e998784:e=>{e.exports={modal:"modal__kT3_C",modal_label:"modal_label__K7fIz",modal_radio_option:"modal_radio_option__HjSOY"}},0xd773b9b0:e=>{e.exports={slackAIButtonIcon:"slackAIButtonIcon__CaFgs",spin:"spin__Cg3bX",spinOnLoad:"spin-on-load__zRI3I",slackAIButton:"slackAIButton__koTPn",animate:"animate__rqzav",shineOnHover:"shine-on-hover__eaKpX",shine:"shine__TWEnd",shineOnLoad:"shine-on-load__XVDiX"}},0x1e25f7eb5:e=>{e.exports={container:"container__YLyxi",sparkleWrapper:"sparkleWrapper__IwZNS",button:"button__zEiFQ",sparkleLeft:"sparkleLeft__Aba99",sparkleRight:"sparkleRight__ynFeB",containerExpanded:"containerExpanded__xtFaY",buttonExpanded:"buttonExpanded__bbmym",typingText:"typingText__t_DAr"}},0x506398b6:e=>{e.exports={filePickerModalContent:"filePickerModalContent__HaFPm",filePickerSearch:"filePickerSearch__ZO7Fw"}},0x12d522820:e=>{e.exports={slackIcon:"slackIcon__xY1Wj",appIcon:"appIcon__rsLqx",sidebar:"sidebar__BD0_e",iconContainer:"iconContainer__OW2Q5",hideIcon:"hideIcon__erHOP",connectButton:"connectButton__tsitp",resultCount:"resultCount__I5HyS",filterLabel:"filterLabel__uOq5y",itemButton:"itemButton__VCojk",itemButtonSelected:"itemButtonSelected__LKGuU",alwaysHideBorder:"alwaysHideBorder__d8HEv"}},0xac7a6f80:e=>{e.exports={fileCollectionRow:"fileCollectionRow__iy_Zv",fileCollectionRowNoEmoji:"fileCollectionRowNoEmoji__u2dpB",emoji:"emoji__JVh33",caret:"caret__g5Bef",fileCollectionDropIndicatorAbove:"fileCollectionDropIndicatorAbove__HAriQ",fileCollectionDropIndicatorBelow:"fileCollectionDropIndicatorBelow__dB8oB",container:"container__LsZAj",fileCollectionHoveringWithFile:"fileCollectionHoveringWithFile__vI9za",toggleAndLabel:"toggleAndLabel__HJIcg",label:"label__sCsHr",buttonsContainer:"buttonsContainer__twhHQ",ellipsisButton:"ellipsisButton__EfoP6",ellipsisButtonActive:"ellipsisButtonActive___yyRo"}},0x15189028c:e=>{e.exports={tooltipTriggerText:"tooltipTriggerText__fWzzm",icon:"icon__gputC",featureText:"featureText__Ahssc",ctaButton:"ctaButton__I_bge"}},0x1e031b8cf:e=>{e.exports={icon:"icon__PInh1",featuresList:"featuresList__A0jpK",featureText:"featureText__qwFSd",finePrintLink:"finePrintLink__MIZV1"}},0xf3d9a30d:e=>{e.exports={bodyContainer:"bodyContainer__XdYx2",listContainer:"listContainer__Q03_Y",videoContainer:"videoContainer__zFTj5",proBadge:"proBadge__vbDah",title:"title__I2qJO",subtitle:"subtitle__lKLAD",ctaButton:"ctaButton__KoQEK",modalBackground:"modalBackground__eUyLk"}},0x1bec10dc:e=>{e.exports={featuresListContainer:"featuresListContainer__Wztys",icon:"icon__oy3IT",title:"title__OyvRi",text:"text__lXfZb"}},0x231abf6ad:e=>{e.exports={upgradeCTA:"upgradeCTA__nAEeo"}},0xeb157283:e=>{e.exports={container:"container__tUR3m",subtitle:"subtitle__TZQIt",modalBg:"modalBg__Y7lF1",ctaContainer:"ctaContainer__S0lp7"}},0x1964f7017:e=>{e.exports={cardContainer:"cardContainer__Dw8R3",featureCard:"featureCard__n1_YN",featureCardImage:"featureCardImage__n5SoZ",lagoon:"lagoon__yMPiB",aubergine:"aubergine__rNojZ",cilantro:"cilantro__fi0az",sunflower:"sunflower__FrZwH",featureCardImageHighlighted:"featureCardImageHighlighted__wru4u",cardDescriptionContainer:"cardDescriptionContainer__KRAQt",cardDescriptionContainerHighlighted:"cardDescriptionContainerHighlighted__FX_je",featureCardHighlighted:"featureCardHighlighted__zBd90",cardTitle:"cardTitle___Ttja",cardTitleHighlighted:"cardTitleHighlighted__G62V5"}},0x10a4fb839:e=>{e.exports={buttonLink:"buttonLink__KvLEy"}},0x26b15941:e=>{e.exports={footer_text:"footer_text__G0UZH",dataDeletionModalWrapper:"dataDeletionModalWrapper__eKNb8",contentwrapper:"contentwrapper__ADnvs",primaryBtn:"primaryBtn__WqOUB"}},0x24090ceac:e=>{e.exports={bannerContainer:"bannerContainer__rmw4m",messagepaneBody:"messagepaneBody__CTaNb",bannerContainerWrapper:"bannerContainerWrapper__csG2X",pMessage_paneClassicNav:"p-message_pane--classic-nav__wDpUV",searchBannerWrapper:"searchBannerWrapper__Ji1Be",searchBannerContent:"searchBannerContent__tzB5A",searchBannerContainer:"searchBannerContainer__OPKXI",searchPrimaryCTAContainer:"searchPrimaryCTAContainer__PHr8p",searchPrimaryCTA:"searchPrimaryCTA__BZat4"}},0x1914b4a55:e=>{e.exports={container:"container__ZDarU",textContainer:"textContainer__N6p1A"}},0x52e18505:e=>{e.exports={container:"container__xqSLm",pageContent:"pageContent__O9YY9",pageHeader:"pageHeader__nOmdq",pageHeaderText:"pageHeaderText__znOCH",header:"header__yxqD0",emojiHeader:"emojiHeader__y0PVH",title:"title__oz27B",subtitle:"subtitle__i9NwV",featuresList:"featuresList__k_GoY",trialFeaturesLearnMoreBanner:"trialFeaturesLearnMoreBanner__wNC55",trialFeaturesLearnMoreBannerTitle:"trialFeaturesLearnMoreBannerTitle__xzuRK",notTrial:"notTrial__xVT9e"}},0x868b8d85:e=>{e.exports={discountOffer:"discountOffer__uW_MO"}},0x1c3366fcc:e=>{e.exports={icon:"icon__JDWIk"}},0x1f3db8780:e=>{e.exports={costLabel:"costLabel__JmQfs",freeLabel:"freeLabel__kOzDa",proLabel:"proLabel__Y_YqW",bizPlusLabel:"bizPlusLabel__BafhG",costLabelSubtitle:"costLabelSubtitle___zgim",planLabel:"planLabel__jNOYK",discountedPrice:"discountedPrice__pH5Uq",typicalPriceWithStrikethrough:"typicalPriceWithStrikethrough__SlrWi",trialProBadge:"trialProBadge__v4egQ",planHeaderContainer:"planHeaderContainer__P0_Hy",disabledCurrentPlanButton:"disabledCurrentPlanButton__ne1m4",bizPlusUpgradeButton:"bizPlusUpgradeButton__IVKuJ",trialEligibleCellContainer:"trialEligibleCellContainer__No8Xm",trialEligibleCurrentPlanBtn:"trialEligibleCurrentPlanBtn__A1SEA",trialStartCta:"trialStartCta__qHMCY",upgradeLink:"upgradeLink__MZ6Um",upgradeRocketIcon:"upgradeRocketIcon__rrknv",missingText:"missingText__OThqS"}},0x23ca450a6:e=>{e.exports={completed:"completed__K8qQ_"}},0x13c996915:e=>{e.exports={menuItem:"menuItem__R91m_",content:"content__Pc1eg",rocketIcon:"rocketIcon__gcU6J",highlighted:"highlighted__b5g85",text:"text__ktoRE",subtext:"subtext__XLcw0"}},0x1ef2dd9e8:e=>{e.exports={backgroundContainer:"backgroundContainer__EdFmM",autoSlack:"autoSlack__KsR4i",darkMode:"darkMode__roNop",container:"container__Ts_9t",withNavBar:"withNavBar__S7lVc",navBar:"navBar__fy7UB",navBarTitle:"navBarTitle__UGTv5",clouds:"clouds__5Wsa7",cloudLeft:"cloudLeft__wrr61",cloudRight:"cloudRight__aHHSF",header:"header__swvpu",headerCard:"headerCard__e4Drx",title:"title__DgEEA",subtitle:"subtitle__VtcUv",headerButtonsSection:"headerButtonsSection__RTD8l",pageHero:"pageHero__UZvk_",cardsHeader:"cardsHeader__ELoFG",cardsSection:"cardsSection__blLkr",cardContainer:"cardContainer__Ld5aS",selectedCard:"selectedCard__fvrjS",cardImageContainer:"cardImageContainer__tNCaj",cardImage:"cardImage__pHsEZ",sparkles:"sparkles__SJDc8",alwaysVisible:"alwaysVisible__RJxbg",sparkle:"sparkle__ZurpE",animationsDisabled:"animationsDisabled__Q40XY",lagoon:"lagoon__o3pHA",securityCardImage:"securityCardImage__u4mBS",customerRelationshipsManagementCardImage:"customerRelationshipsManagementCardImage__F5f2p",aubergine:"aubergine__YtD9o",cilantro:"cilantro__Tsg2J",campfire:"campfire__w1vzR",productivityCardImage:"productivityCardImage__p0tBe",cardAnimation:"cardAnimation__ZiAKi",cardTextContainer:"cardTextContainer__b54Au",footer:"footer__kSiZK"}},0x509c2d88:e=>{e.exports={pageContainer:"pageContainer__UkqqT",container:"container__oZpkA",lagoon:"lagoon__H2Waw",darkMode:"darkMode__UJMxn",aubergine:"aubergine__dTYW7",cilantro:"cilantro__jSeYK",campfire:"campfire__icIg0",clouds:"clouds__c__YQ",cloudLeft:"cloudLeft__czeP_",cloudRight:"cloudRight__Rl65P",titleContainer:"titleContainer__NMnDk",title:"title__SOud4",subtitle:"subtitle___jrw0",imageSection:"imageSection__hsqrq",customerRelationshipsAnimationEnUs:"customerRelationshipsAnimationEnUs__kyrGq",customerRelationshipsAnimationI18n:"customerRelationshipsAnimationI18n__sQayr",featuresSection:"featuresSection__qXiE1",feature:"feature__J4bUw",featureWrapper:"featureWrapper__NWo3D",divider:"divider__Qv_BK",featureTitle:"featureTitle__TEzde",featureSubtitle:"featureSubtitle__Ynzwa",featureLink:"featureLink__U350l",navButtons:"navButtons__TFs4a",navDot:"navDot__sAPdp",navDotSelected:"navDotSelected__JM7ih"}},0x140162782:e=>{e.exports={icon:"icon__FjacC",featuresList:"featuresList__CSXeQ",featureText:"featureText__FJcZW",learnMoreLink:"learnMoreLink__aOiVk",plus:"plus__LxKva",learnMoreLinkText:"learnMoreLinkText__S0HoG",footerText:"footerText__hJgWh",cta:"cta__yLBIb"}},0xb74cb752:e=>{e.exports={buttonContainer:"buttonContainer__P15ZQ",active:"active__vgmKS"}},0xf2057da5:e=>{e.exports={featureColumn:"featureColumn__DvgB8",featureColumnHighlighted:"featureColumnHighlighted__g56f4",featureColumnHighlightedGradient:"featureColumnHighlightedGradient__IenWb",featureColumnContent:"featureColumnContent__XfSw2",highlightPlan:"highlightPlan__fH_Ej",highlightPlanGradiant:"highlightPlanGradiant__v9cWj",isHighlighted:"isHighlighted__NOw5m",header:"header__I5PpM",planName:"planName__SjUGh",planPrice:"planPrice__NDrl7",planPricePrimary:"planPricePrimary__naZQ8",planPriceSecondary:"planPriceSecondary__VzuPM",dashedUnderline:"dashedUnderline__KGDb4",primaryCta:"primaryCta__uCqHP",primaryCtaPrimary:"primaryCtaPrimary__uYHsh",primaryCtaOutline:"primaryCtaOutline__Lu_6b",disabledCta:"disabledCta__hJqKk",featuresList:"featuresList__XKOgF",feature:"feature__QGMu1",missingFeature:"missingFeature__t1bJv",highlightedFeature:"highlightedFeature__tbHvT"}},0x1aa5785ac:e=>{e.exports={streamlinePlansModal:"streamlinePlansModal__HPXgY",modalContent:"modalContent__PriYC",title:"title__wqYYp",titleWithSubTitle:"titleWithSubTitle__QShll",subtitle:"subtitle__lp2j4",featureCardsContainer:"featureCardsContainer__VrF8t",comparePlansTitle:"comparePlansTitle__qi93f",comparePlansButton:"comparePlansButton__laDMh"}},0x13d8ad9fd:e=>{e.exports={featureImage:"featureImage__GCGJB"}},0xba7f66d0:e=>{e.exports={accordionFeatureListModal:"accordionFeatureListModal__XY4l2",horchataBg:"horchataBg__Z4qYV",aubergineBg:"aubergineBg__XTvzG",horchataCaret:"horchataCaret__z5j66",aubergineCaret:"aubergineCaret__Ln6eA",bodyContainer:"bodyContainer__WwREe",listContainer:"listContainer__RAODJ",header:"header__A7Fx9",title:"title__w5UXN",subtitle:"subtitle__GJpvo",accordionListContainer:"accordionListContainer__ZhxlB",accordionItem:"accordionItem__N3S6I",imageContainer:"imageContainer__I5MJj",upgradeCta:"upgradeCta__gvG2D",spinner:"spinner__D0NVf",footer:"footer__cNZ0p",accordionItemHeaderButton:"accordionItemHeaderButton__klUaK",accordionItemHeader:"accordionItemHeader__SDi13",accordionItemDescription:"accordionItemDescription__P1u4j",accordionExpandedIcon:"accordionExpandedIcon__a2fMf",accordionCollapsedIcon:"accordionCollapsedIcon__KurIq"}},0xfab9cf18:e=>{e.exports={footer:"footer__q8kg4",cta:"cta__x1pLT",light:"light__adKpp",disclaimer:"disclaimer__i655U",link:"link__ISsu1"}},0x7dc390be:e=>{e.exports={wrapper:"wrapper__Gheda",listWrapper:"listWrapper__Nr85x",appsWrapper:"appsWrapper__QXHIn",listActionsBuffer:"listActionsBuffer__rA0QQ",canvasActionsBuffer:"canvasActionsBuffer__SLIeu",browserWrapper:"browserWrapper__i9oGZ",linkInBody:"linkInBody__PWOil"}},0x1e453b8fc:e=>{e.exports={primaryCta:"primaryCta__eSYB_"}},0x10dac1a1c:e=>{e.exports={fade:"fade__Cd90j"}},0x139b10b00:e=>{e.exports={messageLimitModalContainer:"messageLimitModalContainer__Hew9B"}},0x1f490a2cf:e=>{e.exports={tooltipText:"tooltipText__Z9pUy",inproductTeamCreationTooltipText:"inproductTeamCreationTooltipText__vdiBo"}},0x101899bdb:e=>{e.exports={modalTitle:"modalTitle__wvS5f",headerContainer:"headerContainer__x9J2q",trialEndPromoOptimizationsVariant:"trialEndPromoOptimizationsVariant__rwIiH",monthlyStdCostPerMonth:"monthlyStdCostPerMonth__EX5NM",discountedMonthlyCostPerMonth:"discountedMonthlyCostPerMonth___2mQZ",bodyText:"bodyText__plLes"}},0x7cb82357:e=>{e.exports={banner:"banner__NRqlA",link:"link__zbG4b",bodyText:"bodyText__J_4W5",icon:"icon__rIB5w",comparePlansBtn:"comparePlansBtn__EQLop",titleText:"titleText__qMilT",linkWrapper:"linkWrapper__FF5pM"}},0x7519c0cb:e=>{e.exports={accordionExpandedIcon:"accordionExpandedIcon__tuZuY",accordionCollapsedIcon:"accordionCollapsedIcon__LGaQ4",accordionItemHeader:"accordionItemHeader__SgOzu",accordionItemHeaderButton:"accordionItemHeaderButton__Yu1Hu",accordionItemDescription:"accordionItemDescription__ZVSY9",accordionListContainer:"accordionListContainer__VYseM",featureImage:"featureImage__nTVPM",listContainer:"listContainer__jXoRC",buttonContainer:"buttonContainer__qamB3"}},0x2fc22a9f:e=>{e.exports={modal:"modal__VC_fP",featureIcon:"featureIcon__S361i",featureList:"featureList__SoslC",featureListItem:"featureListItem__IxLcu"}},0x108aa730f:e=>{e.exports={modalTitle:"modalTitle__zVuuJ",headerContainer:"headerContainer__rVoZF"}},0x1a25490f0:e=>{e.exports={sidebarMenuHeaderPromoContentPeekWrapper:"sidebarMenuHeaderPromoContentPeekWrapper__kfC0j",modalPromoContentWrapper:"modalPromoContentWrapper__MoYtP",promoContentWrapper:"promoContentWrapper__FWRUr",sparkle:"sparkle__whZQD",circle:"circle__az16C",ellipse:"ellipse__CNpx5",content:"content__vT2yi",badge:"badge__DjYAb",title:"title__sJP6r",subtitle:"subtitle__ZtOC0",featuresHeading:"featuresHeading__pnEKg",features:"features__toV_d",feature:"feature__gRVyh",icon:"icon__Ox9K7",featureText:"featureText__duwbh",learnMoreLink:"learnMoreLink__heEGM",plus:"plus__CgZnk",learnMoreLinkText:"learnMoreLinkText__ath9R",missingLearnMoreLinkSpacing:"missingLearnMoreLinkSpacing__tjSvS",buttonIcon:"buttonIcon__Qm3B6",iconBackground:"iconBackground__r9SZh",disclaimer:"disclaimer__NwcXk"}},0x126b1884a:e=>{e.exports={bodyContainer:"bodyContainer__I6nWM",iconButton:"iconButton__gglOK"}},0x1781dd219:e=>{e.exports={modalFooter:"modalFooter__deGJ3",buttonsContainer:"buttonsContainer__hzFuL"}},0x1595017bb:e=>{e.exports={modalContainer:"modalContainer__YICvR",modalContent:"modalContent__yNmvO"}},0x22119fca6:e=>{e.exports={iconPair:"iconPair__tHRn_",workspaceIcon:"workspaceIcon__T6TYW",slackbotIcon:"slackbotIcon__Ys9wu"}},0x7ece28f1:e=>{e.exports={container:"container__RcI_d"}},0x1e292e510:e=>{e.exports={container:"container__vquXC",highlighted:"highlighted__z144q",link:"link__q9NBl",icon:"icon__RoZAP",label:"label__jX8Es",description:"description__iHBlu"}},0x7230bced:e=>{e.exports={viewHeaderActionButton:"viewHeaderActionButton__d6GTR",backButton:"backButton__UPiht",backButtonPolish:"backButtonPolish__nDFlO"}},0x22ffe000:e=>{e.exports={preview:"preview__kAm5M",previewChannelName:"previewChannelName__ywKtr",previewChannelTopic:"previewChannelTopic__WCT0m"}},0x13583f615:e=>{e.exports={disabled:"disabled__plJgv"}},0x559f1f4c:e=>{e.exports={modal:"modal__Y0SgS",modalContent:"modalContent__gAfoM",imgCard:"imgCard__A0ART",img:"img__K8TvT",feature_workflow_checkbox:"feature_workflow_checkbox__mfshW"}},0x1f0a865ad:e=>{e.exports={overflowButton:"overflowButton___iTP3",mentionBadge:"mentionBadge__iNG1K"}},0x155639a70:e=>{e.exports={featuredWorkflow:"featuredWorkflow__IJbH2",featuredContainer:"featuredContainer__BKd3x",noShrinking:"noShrinking__QIAiy"}},0xa8e65990:e=>{e.exports={workflowButtonContainer:"workflowButtonContainer__Fzb0e"}},0xa4f69faf:e=>{e.exports={workflowContentContainer:"workflowContentContainer__qaewH",standardBottomPadding:"standardBottomPadding__RmjEk",withButtonBottomPadding:"withButtonBottomPadding__jx1Wu"}},0x1c6793cdf:e=>{e.exports={workflowHeaderContainer:"workflowHeaderContainer__qQWbH"}},0x178c0b243:e=>{e.exports={workflowIconContainer:"workflowIconContainer__pR4FO"}},0x22ade83e7:e=>{e.exports={iconContainer:"iconContainer__hSwUl",notice:"notice__U3O4x",permissionsSection:"permissionsSection__QsfwN",collaborators:"collaborators__VZrxB",membersContainer:"membersContainer__Vo74l"}},0x1ec03adce:e=>{e.exports={inviteFormContainer:"inviteFormContainer__Roq0q",sheetGripperWrapper:"sheetGripperWrapper__gB9cE",sheetGripper:"sheetGripper__J0qvi",mobileWebNoResultsMessage:"mobileWebNoResultsMessage__X8HsP",svgPaperPlane:"svgPaperPlane__J3pD0",modalHeader:"modalHeader__WBsbT",modalTitle:"modalTitle__sewnb",setupNextButton:"setupNextButton__L1UUI",loadingSpinner:"loadingSpinner__N_XM_",list:"list__pwQE7",modalFooter:"modalFooter__v_KDo"}},0x7d483b67:e=>{e.exports={debugOverlay:"debugOverlay__EISyy",debugFrame:"debugFrame__KakqI",debugContainer:"debugContainer__URe44",disabled:"disabled__EbCwF"}},0x1e6f96068:e=>{e.exports={listboxContainer:"listboxContainer__OpPkj",actionsBarContainer:"actionsBarContainer__pcmiO",hiddenActionsBarContainer:"hiddenActionsBarContainer__o5aiy",actionBar:"actionBar__uwaJB",actionButton:"actionButton__da1_4",selectedOption:"selectedOption__JcPVF",listbox:"listbox__aFiAi",optionContainer:"optionContainer__HzE5n",optionDescription:"optionDescription__HCkeB",option:"option__upzLh",icon:"icon__KWPQd",dragItem:"dragItem__bhss8",checkbox:"checkbox__xoSOA",optionLabel:"optionLabel__q0GAD",draggingOption:"draggingOption__vyBLm",dropIndicator:"dropIndicator__v4xKH",topDropIndicator:"topDropIndicator__L1N1g",bottomDropIndicator:"bottomDropIndicator__C_cGN",dragLayer:"dragLayer__MbQzW",dragHandle:"dragHandle__RepLv"}},0x1e34344f0:e=>{e.exports={container:"container__B4f9S",header:"header__yMo9R",description:"description__lbgvd",components:"components__Wk5M_",footer:"footer__j12aw"}},0xfa24be4e:e=>{e.exports={search_sidebar:"search_sidebar__Z2ZJD",search_sidebar__item:"search_sidebar__item__J5N5j",search_sidebar__item_selected:"search_sidebar__item_selected__XkV03",search_sidebar__item_count:"search_sidebar__item_count__N8x9L",search_sidebar__item_icon:"search_sidebar__item_icon__jxdEa",search_sidebar__item_app_icon:"search_sidebar__item_app_icon___q6rF",search_sidebar__item_label:"search_sidebar__item_label__e2w3D",search_sidebar__connected_accounts:"search_sidebar__connected_accounts__B8hH2",search_sidebar__section_heading:"search_sidebar__section_heading___qzdH",search_sidebar__section_caret:"search_sidebar__section_caret__KRt3P",search_sidebar__section_caret_open:"search_sidebar__section_caret_open__xLSwY",sidebar_search_button:"sidebar_search_button__FNb8G",pTop_nav__search__text:"p-top_nav__search__text__wATaE",sidebar_search_cancel_button:"sidebar_search_cancel_button___NmzJ"}},0xb26178cd:e=>{e.exports={footer:"footer__Pshtd",footerActions:"footerActions__yMSCT",tooltipSubtitle:"tooltipSubtitle__CL7EG",focusModeButton:"focusModeButton__YAf1q",focusModeButtonActive:"focusModeButtonActive__ZwOcD"}},0x12a6bb92f:e=>{e.exports={container:"container__rtxft",title:"title__eNa4J"}},0x18a918040:e=>{e.exports={container:"container__kX3Yi",tooltipSubheader:"tooltipSubheader__Xs6DW"}},0x21e28dfc3:e=>{e.exports={container:"container__t5t8H",focusable:"focusable__t1iy0",suffix:"suffix__aSixg",suffixOnHover:"suffixOnHover__Wkrpq",focused:"focused__MFerc"}},0x135943ebd:e=>{e.exports={container:"container__NfZZc"}},0x611fe274:e=>{e.exports={wrapper:"wrapper__Fq4dj",teamIcons:"teamIcons__N49WG",teamIcon:"teamIcon__qPthc"}},0xf697245f:e=>{e.exports={primaryWrapper:"primaryWrapper__q46PI"}},0x20b3ece7e:e=>{e.exports={bannerWrapper:"bannerWrapper__MvEiN",banner:"banner__c2GVq",bannerText:"bannerText__ZvbOS"}},0x19c4eddad:e=>{e.exports={activityPeekView:"activityPeekView__FjmQY",peekLinkText:"peekLinkText__mD3BF",peekLinkButton:"peekLinkButton__VwkAn",peekLinkBadgeCount:"peekLinkBadgeCount__FXZT1"}},0xb20171db:e=>{e.exports={imgContainer:"imgContainer__Nv0bg",img:"img__DrD50",waveEmoji:"waveEmoji__qC1jG",title:"title__JrS2z",subtitle:"subtitle__r7Jis",description:"description__vYCDE",description2:"description2__bETpM"}},0x63476ab8:e=>{e.exports={activity_approval_item__thumbnail:"activity_approval_item__thumbnail__KeTRE",activity_approval_item__name:"activity_approval_item__name__zQDZP",activity_approval_item__message:"activity_approval_item__message__GKbwQ"}},0xb1e8f8c1:e=>{e.exports={notification_avatar:"notification_avatar__x2zTn"}},0x238360ecd:e=>{e.exports={InviteActions:"InviteActions__IlfWS",ButtonLinkAction:"ButtonLinkAction__MzDM2"}},0xa140151d:e=>{e.exports={activity_filter_layout_toggle__container:"activity_filter_layout_toggle__container__jqC6p",activity_filter_layout_toggle__button:"activity_filter_layout_toggle__button__R5UJb",activity_filter_layout_toggle__selected:"activity_filter_layout_toggle__selected__b9RU9",activity_filter_layout_toggle__background:"activity_filter_layout_toggle__background__gqF4w",activity_filter_layout_toggle__left:"activity_filter_layout_toggle__left__FlHI0",activity_filter_layout_toggle__right:"activity_filter_layout_toggle__right__cn0Hq"}},0xbbb52e45:e=>{e.exports={avatar:"avatar__N77Kv"}},0x31a4e039:e=>{e.exports={activity_detailed_row_content__sender_and_timestamp:"activity_detailed_row_content__sender_and_timestamp__xtunM",activity_detailed_row_content__sender_and_destination:"activity_detailed_row_content__sender_and_destination__ktEfm",activity_detailed_row_content__sender__name_and_destination:"activity_detailed_row_content__sender__name_and_destination__yft4z",activity_detailed_row_content__sender__destination:"activity_detailed_row_content__sender__destination__YWesh",activity_detailed_row_content__details:"activity_detailed_row_content__details__MEN7J",activity_detailed_row_content__reactions:"activity_detailed_row_content__reactions__voP4W",activity_detailed_row_content__sender_name:"activity_detailed_row_content__sender_name__Jpd4L",activity_detailed_row_content__actions:"activity_detailed_row_content__actions__rgFgg",activity_detailed_row_content__invite_actions:"activity_detailed_row_content__invite_actions__Dauek",pSlack_connect_invite_actions__text_actions:"p-slack_connect_invite_actions__text_actions__FfU9C",activity_detailed_row_content:"activity_detailed_row_content__CEtF7",activity_detailed_row_content__detailsBlurred:"activity_detailed_row_content__details--blurred__fCQkd",activity_detailed_row_contentUnread:"activity_detailed_row_content--unread___xGHr"}},0x16e5914dc:e=>{e.exports={activity_row_triage_container:"activity_row_triage_container__ls48M",activity_row_content__sender:"activity_row_content__sender__rVmVC",activity_row_content__sender__avatar:"activity_row_content__sender__avatar__G3oXs",activity_row_content__sender__name:"activity_row_content__sender__name__r3rfO",activity_row_content__type_icon:"activity_row_content__type_icon__F0dGl",activity_row_content__destination:"activity_row_content__destination__z87Eo",activity_row_content__details:"activity_row_content__details__sJZcY",activity_row_content__detailsBlurred:"activity_row_content__details--blurred__mvLRs",activity_row_content__timestamp:"activity_row_content__timestamp__AcUDO",activity_row_content__timestampHidden:"activity_row_content__timestamp--hidden__dYurt",activity_row_content__activity_sender:"activity_row_content__activity_sender__qxY4d",activity_row_content__avatar_and_icon:"activity_row_content__avatar_and_icon__FvjNh",activity_row_content__avatar_and_icon_small:"activity_row_content__avatar_and_icon_small__G0gET",activity_row_contentDesignV3:"activity_row_content--design-v3__jpz2O",activity_row_content__avatar_and_icon_large:"activity_row_content__avatar_and_icon_large__c6Big",activity_row_content__sender_icon_container:"activity_row_content__sender_icon_container__gmWVY",activity_row_content__sender_icon_container_small:"activity_row_content__sender_icon_container_small__cWARj",activity_row_content__sender_icon_container_large:"activity_row_content__sender_icon_container_large__T6Ys8",activity_row_content__sender_icon_containerUnread:"activity_row_content__sender_icon_container--unread__vsuSE",activity_row_content__type_icon_container:"activity_row_content__type_icon_container__iZ4aQ",activity_row_content__sender_name:"activity_row_content__sender_name__w6yZ9",activity_row_content__destination_channel_wrapper:"activity_row_content__destination_channel_wrapper__wBmsm",activity_row_content__reminder_icon:"activity_row_content__reminder_icon__Axu32",activity_row_content__reminder_iconLarge:"activity_row_content__reminder_icon--large__oV9P0",activity_row_content__destination_channel:"activity_row_content__destination_channel__NpfGf",thread_variant_destination:"thread_variant_destination__G5VXI",thread_variant_message:"thread_variant_message__D5Evu",activity_row_content__typing_indicator:"activity_row_content__typing_indicator__EkePr",activity_row_content__actions_and_mentions:"activity_row_content__actions_and_mentions__Sv6s6",activity_row_content__actions:"activity_row_content__actions__UK7EY",activity_row_content__actionsHidden:"activity_row_content__actions--hidden__cUHsb",activity_row_content:"activity_row_content__B4Yi0",activity_row_contentUnread:"activity_row_content--unread__g04dI",is_dragging:"is_dragging__PN0Cj",activity_row_content__sender_avatar_with_party_hat:"activity_row_content__sender_avatar_with_party_hat__uasNX",activity_row_content__party_hat:"activity_row_content__party_hat__FNT6v",activity_row_content__sender_tooltip:"activity_row_content__sender_tooltip__FVmHJ",mention_variant_wide:"mention_variant_wide__Ns4lj",mention_variant_medium:"mention_variant_medium__DuOYL",mention_variant_narrow:"mention_variant_narrow__o5a2L",thread_variant_wide:"thread_variant_wide__MBp3i",thread_variant_narrow:"thread_variant_narrow__jDfsT",timestamp_variant_wide:"timestamp_variant_wide__Acb4h",timestamp_variant_narrow:"timestamp_variant_narrow__bRH9w",activity_row_content__ml_priority:"activity_row_content__ml_priority__D_9xP"}},0x1019f999c:e=>{e.exports={activity_row_content_margin:"activity_row_content_margin__JI87w",activity_row_content_margin_triage:"activity_row_content_margin_triage__k3SB5",activity_row_content_container:"activity_row_content_container__E078d",activity_row_content_containerDense:"activity_row_content_container--dense__zFXm8",activity_row_content_containerDesignV3:"activity_row_content_container--design-v3__ITXYB",activity_row_content_containerUnread:"activity_row_content_container--unread__JB7Ek",activity_row_content_containerDarkMode:"activity_row_content_container--dark-mode__phqCw",activity_row_content_containerBulkSelected:"activity_row_content_container--bulk-selected__hR31i",activity_row_content_containerDetailed:"activity_row_content_container--detailed__aCWfz",activity_row_content_containerPeek:"activity_row_content_container--peek__YOHuw",activity_row_content_containerSelected:"activity_row_content_container--selected__ppxTs",activity_row_content_containerFirst:"activity_row_content_container--first__InvGi",activity_row_content_containerLast:"activity_row_content_container--last__FiUIy"}},0x20359348d:e=>{e.exports={destination_tag:"destination_tag__Bi6Br",destination_tagDense:"destination_tag--dense__ep_V_",destination_tagDark:"destination_tag--dark__P_XcX",destination_tagUnread:"destination_tag--unread__A05A3",destination_tagNoMargin:"destination_tag--no-margin__boTrL"}},0x1493dca4d:e=>{e.exports={activityRowDragPreview:"activityRowDragPreview__PmxRW"}},0x22a381df5:e=>{e.exports={avatar:"avatar__SdVyn",partyHat:"partyHat__XU4Yd"}},0x1e42f0d21:e=>{e.exports={coachmarkContainer:"coachmarkContainer__oLxJ4",coachMarkPrimaryButtonIcon:"coachMarkPrimaryButtonIcon__hKnB4",coachmarkStepIndicator:"coachmarkStepIndicator__jvdqQ"}},0xdbd4be07:e=>{e.exports={baseOnboardingIcon:"baseOnboardingIcon__JF5d_",bannerVariant:"bannerVariant__O_fPS",defaultVariant:"defaultVariant__YScqI"}},0x970ae6db:e=>{e.exports={imgContainer:"imgContainer__QkEWK",img:"img__cJleR",title:"title__k5ncK",subtitle:"subtitle__OQGQu",contentContainer:"contentContainer__SRejF",featureListItem:"featureListItem__l8B2n",stepDescription:"stepDescription__pPyXK",textAlignCenter:"textAlignCenter__I2wFp",stepIndicator:"stepIndicator__erg0z",nextButton:"nextButton__eb2gx",layoutOptions:"layoutOptions__Diwi1",layoutOptionContainer:"layoutOptionContainer__O_aBb",layoutOptionIcon:"layoutOptionIcon__cOfhn",layoutOptionIconSelected:"layoutOptionIconSelected__sVn6p",layoutOption:"layoutOption__x09Ce",cLabel__subtext:"c-label__subtext__VEmjp",layoutOptionSelected:"layoutOptionSelected__XVyY_",layoutTitle:"layoutTitle__QT2ez",layoutDescription:"layoutDescription__a88JF",fallbackImg:"fallbackImg__ajxOb",textContainer:"textContainer___qM1L",labelContainer:"labelContainer__vCsQl"}},0x172b56cda:e=>{e.exports={coachmarkContainer:"coachmarkContainer__kWox6",heroContainer:"heroContainer__zn41h",dmIcon:"dmIcon__qVjcw",avatarImageDetailsContainer:"avatarImageDetailsContainer__tZevC",avatarImageDetails:"avatarImageDetails__S5U0E",avatarImageDetailsRows:"avatarImageDetailsRows__qU8ZF",avatarImageContainerShadow:"avatarImageContainerShadow__zdzWm",mentionBadge:"mentionBadge__cNZU9"}},0xf8e11e72:e=>{e.exports={alertBanner:"alertBanner__KTIPO",hideDmsButton:"hideDmsButton__QYRvj",alertIcon:"alertIcon__m2hMY"}},0x757107ef:e=>{e.exports={markCompleteButton:"markCompleteButton__ob4yw",markCompleteIconButton:"markCompleteIconButton__POKZU"}},0x18213b61e:e=>{e.exports={header:"header__BaLem",headerSmallGap:"headerSmallGap__lWJoq"}},0x14250552c:e=>{e.exports={container:"container__ghHPA"}},0x1785fce29:e=>{e.exports={activityPeekViewTabContainer:"activityPeekViewTabContainer__Wq72J",activityPeekViewTab:"activityPeekViewTab__fhGKh"}},0x18486defc:e=>{e.exports={listItemContainer:"listItemContainer__qHv9n",listItemIconContainer:"listItemIconContainer__LElAj",listItemInformation:"listItemInformation__ym38f",listItemInformationName:"listItemInformationName__ylbu9",noDescription:"noDescription__PWz18",listItemInformationDescription:"listItemInformationDescription__Ytlgr",triggerActionIcon:"triggerActionIcon__aC9iW",cMenu_item__liHighlighted:"c-menu_item__li--highlighted__vTHx3"}},0xcb6d046a:e=>{e.exports={triggerView:"triggerView__Al8PO",pastEventsToggle:"pastEventsToggle__DybXu",header:"header__QirJD",headerDate:"headerDate__DuRTT",triggerControls:"triggerControls__r2TTL",peekContent:"peekContent__Q4yPt"}},0x142f30ffc:e=>{e.exports={todayPeekView:"todayPeekView__K48Lt",todayPeekHeaderButtons:"todayPeekHeaderButtons__xOanz",todayPeekContent:"todayPeekContent__RLKrH"}},0x148194053:e=>{e.exports={todosPeekTrigger:"todosPeekTrigger__uzAbi"}},0xf2505ea:e=>{e.exports={unifiedFilesPeekTrigger:"unifiedFilesPeekTrigger__h8BwA",cPillow_fileClickable:"c-pillow_file--clickable__HQVIH",unifiedFilesPeekTriggerCreateButtons:"unifiedFilesPeekTriggerCreateButtons__HHV7r",unifiedFilesPeekTriggerButtonGroup:"unifiedFilesPeekTriggerButtonGroup__ELHTS",unifiedFilesPeekTriggerNewWindowButton:"unifiedFilesPeekTriggerNewWindowButton__coGLe"}},0x1deeb683d:e=>{e.exports={taskBundleNux:"taskBundleNux__rY3FY",taskBundleNuxTitle:"taskBundleNuxTitle___WJK4",taskBundleNuxDescription:"taskBundleNuxDescription__VRVVf",taskBundleNuxImageAssetAnimation:"taskBundleNuxImageAssetAnimation__hWyeQ",taskBundleNuxAnimation:"taskBundleNuxAnimation__c09D3",taskBundleNuxImageAsset:"taskBundleNuxImageAsset__caDJV",taskBundleNuxImage:"taskBundleNuxImage__R_HYn"}},0x1ec443a0b:e=>{e.exports={label:"label__Ha2Iu",icon:"icon__DIhCL",title:"title__w7kex",shortcut:"shortcut__C1Xsi"}},0x65d9e5db:e=>{e.exports={improved2faScreenContainer:"improved2faScreenContainer__BaNcU",improved2faScreenImageContainer:"improved2faScreenImageContainer__YelIx",improved2faScreenContent:"improved2faScreenContent__my486",improved2faScreenTitle:"improved2faScreenTitle__qhUTV",improved2faScreenDescription:"improved2faScreenDescription__FRQAK",improved2faScreenButtonContainer:"improved2faScreenButtonContainer__S7XZM"}},0x1a276635f:e=>{e.exports={container:"container__TekrZ",target:"target__yBffT",content:"content__GAOkO",isOpen:"isOpen__pvsuS",isInteractive:"isInteractive__qyhip",wrapper:"wrapper__jKy4R",isMacOSTahoeOrHigher:"isMacOSTahoeOrHigher__Rrhoy",workspaceSwitcher:"workspaceSwitcher__e69Nv",tabRail:"tabRail__asafj",hasSidebar:"hasSidebar__hgT_z"}},0xf4a0842b:e=>{e.exports={container:"container__Oloyq",button:"button__dhUKJ"}},0x176cc99e3:e=>{e.exports={content:"content__ILLlY",title:"title__qQUoF",body:"body__hjlti"}},0x2407bdb15:e=>{e.exports={priorityVipBadge:"priorityVipBadge__olSV0",priorityVipBadgeInHeader:"priorityVipBadgeInHeader__GvZ3L",priorityVipBadgeIcon:"priorityVipBadgeIcon__TTlIV"}},0x81fe4d9e:e=>{e.exports={container:"container__gVCBn"}},0x356dab23:e=>{e.exports={header:"header__lXT7x",container:"container__MJ8hE",planName:"planName__q3l7s",billingOrInfoLinkContainer:"billingOrInfoLinkContainer__QOHBq",workspaceBillingOrInfoMenuItem:"workspaceBillingOrInfoMenuItem__WSa2J",slackLogo:"slackLogo__K2efp",link:"link__QuP9t"}},0x1221d09da:e=>{e.exports={banner:"banner__RdaiV",gradientBackground:"gradientBackground__EFsj0",bannerContent:"bannerContent__cCLLN",badgeWrapper:"badgeWrapper__MxXrU",badge:"badge__KcbFB",title:"title__vQ81p",subtitle:"subtitle__W4kE8",textContent:"textContent__L3_vq",iconWrapper:"iconWrapper__uUHrl",icon:"icon__NEap9"}},0x145c24a0e:e=>{e.exports={menu:"menu__m45hz",menuBottomPadding:"menuBottomPadding__IYrSA",submenu:"submenu__C8bAJ",header:"header__Q7yXe",separator:"separator__k21g2",bottomPadding:"bottomPadding__UkrGy",topPadding:"topPadding__l08L5",menuItemIcon:"menuItemIcon__QMKT9",submenuEditIcon:"submenuEditIcon__lHYyw",footerListItem:"footerListItem__uiDF_"}},0x20871dd50:e=>{e.exports={tabBar:"tabBar__pVJzs",desktopUiSimplification:"desktopUiSimplification__J1nPb",tabList:"tabList__emDhW",backdrop:"backdrop__PAuho",divider:"divider__pmuJ3",tab:"tab__X0NJ6",tabInner:"tabInner__cTe1q",isDragging:"isDragging__OFXLn",isSelected:"isSelected__yimnc",isDraggingOutside:"isDraggingOutside__yPB9p",tabContent:"tabContent__VShLf",tabLabel:"tabLabel__fD7AU",tabControlButtons:"tabControlButtons__9SGxD",tabControlButton:"tabControlButton__X5np3",addTabButton:"addTabButton__CUQDO"}},0x1c25107df:e=>{e.exports={automationsSidebarButton:"automationsSidebarButton__Pgvqd",automationsSidebarIcon:"automationsSidebarIcon__f4aQY"}},0x17541d184:e=>{e.exports={container:"container__rmh6C",button:"button__OxyMw"}},0x220cc2137:e=>{e.exports={button:"button__beS2l"}},0x176271757:e=>{e.exports={label:"label__PsH27",labelOverride:"labelOverride__uULtK",iconSizeOverride:"iconSizeOverride__BTD6w"}},0x4d775abb:e=>{e.exports={aiRootMessage:"aiRootMessage__TTlYP"}},0x1dc32e0cb:e=>{e.exports={multiThreadBackground:"multiThreadBackground__Qt3fs",multiThreadBackgroundShowingDragOverlay:"multiThreadBackgroundShowingDragOverlay__KxESp",multiThreadBackgroundFirst:"multiThreadBackgroundFirst__eTF6Z",multiThreadBackgroundLast:"multiThreadBackgroundLast__y0L_J",multiThreadBackgroundDragOverlay:"multiThreadBackgroundDragOverlay___0gBc",multiThreadBackgroundDragOverlayFirst:"multiThreadBackgroundDragOverlayFirst__y_dnJ",multiThreadBackgroundDragOverlayLast:"multiThreadBackgroundDragOverlayLast__pc3im"}},0xd1b5c5d3:e=>{e.exports={avatar:"avatar__iKEAy",title:"title__FT_jv",pRich_text_section:"p-rich_text_section__c8eGR"}},0x1b1fcd9f7:e=>{e.exports={overlay:"overlay__jeFrF",isDarkMode:"isDarkMode__TuTPq",icon:"icon__am0Gu",text:"text__gz2GE"}},0x2374ec520:e=>{e.exports={container:"container__Nnlmn",isDarkMode:"isDarkMode__xqZ0p",isA11yAnimationsOn:"isA11yAnimationsOn__OhoAO",shouldShowSplitDropPeek:"shouldShowSplitDropPeek__QUTPM",icon:"icon__et7R7",text:"text__N4WmS",shouldShowSplitDropTarget:"shouldShowSplitDropTarget__nh2pC",isWorkspaceSwitcherVisible:"isWorkspaceSwitcherVisible__aXtYL"}},0x19c39117:e=>{e.exports={tipContainer:"tipContainer__DZenY",contentWrapper:"contentWrapper__ATTTa",title:"title__wN2iE",subtitle:"subtitle__Qu1AE",salesforceLogo:"salesforceLogo__lWUxv"}},0xab9fedea:e=>{e.exports={contactsReadyToastContent:"contactsReadyToastContent__bUzkG",contactsReadyToastIcon:"contactsReadyToastIcon__PZRzD"}},0xf4040274:e=>{e.exports={toastContentWrapper:"toastContentWrapper__xAAdw",toastContent:"toastContent__f81U2",title:"title__cdCED",subtitle:"subtitle__vVZZG"}},0xc28f05ec:e=>{e.exports={fieldMappingRow:"fieldMappingRow__DHwGH",importedFieldInfo:"importedFieldInfo__Ejpe5",columnTitle:"columnTitle__MOtAN",columnSampleData:"columnSampleData__ZtV07",fieldMappingArrow:"fieldMappingArrow__Q4pHU",mappingFieldSelectorLabel:"mappingFieldSelectorLabel__TFdIb",addedMappingFieldOption:"addedMappingFieldOption__nX9R3",fieldMappingSelect:"fieldMappingSelect__Sku4E"}},0x696b8c97:e=>{e.exports={bulkGridImportModalPreviewStep:"bulkGridImportModalPreviewStep__l5vEP",gridContainer:"gridContainer__lpYPq",gridRow:"gridRow__KN4ck",gridHeaderRow:"gridHeaderRow__D6C7K",gridBodyRow:"gridBodyRow__rfPOs",gridCell:"gridCell__FbSYr",columnHeader:"columnHeader__BrRnm",renderPreviewError:"renderPreviewError__rMV0J"}},0xe3727f85:e=>{e.exports={uploadFileStep:"uploadFileStep__eiF2J",uploadButton:"uploadButton__ty3JC",uploadButtonFileUploaded:"uploadButtonFileUploaded__mdzLB",uploadAnimation:"uploadAnimation__KZR9K",uploadInstructions:"uploadInstructions__RPBNN",uploadInstructionsTitle:"uploadInstructionsTitle__VAfkL",uploadInstructionsLink:"uploadInstructionsLink__oznW4",uploadInstructionsSubtitle:"uploadInstructionsSubtitle__km9fE",uploadErrorIcon:"uploadErrorIcon__tIY6a",uploadDragOverlay:"uploadDragOverlay__zv3si",uploadDragOverlayIcon:"uploadDragOverlayIcon__J5tSi",overlayAnimation:"overlayAnimation__fttHB"}},0x7634efc7:e=>{e.exports={bulkGridImportModalStep:"bulkGridImportModalStep___GoVh",mappingStepErrorAlert:"mappingStepErrorAlert__zPHB4"}},0xc5fc0a47:e=>{e.exports={changeOwnerSection:"changeOwnerSection__gO3G7",changeOwnerInfoText:"changeOwnerInfoText__bTFsC",notifyNewOwnerWrapper:"notifyNewOwnerWrapper__mhHK5",changeOwnerLoading:"changeOwnerLoading__Pt8tq",permissionErrorBanner:"permissionErrorBanner__U0_Bp",changeOwnerError:"changeOwnerError__mUIo0"}},0x246bbffc8:e=>{e.exports={changeOwnerTransferOptions:"changeOwnerTransferOptions__frhWh"}},0x128e29750:e=>{e.exports={mainGeneratingUI:"mainGeneratingUI__B9HFf",aiSparkleComponent:"aiSparkleComponent__wdAK3",spanSparkle:"spanSparkle__PSnSq"}},0xb16ecf47:e=>{e.exports={label:"label__YIoXl"}},0x1e058d3cd:e=>{e.exports={createRecordModal:"createRecordModal__v0Lr7",createRecordModalChildWindow:"createRecordModalChildWindow__ViVHz",formFieldClassName:"formFieldClassName__KrtCX",textArea:"textArea__pCYAJ",fieldLabel:"fieldLabel__yRSA_",titleBarChildWindow:"titleBarChildWindow__cIvxK",newWindowButton:"newWindowButton___itbF",errorSummary:"errorSummary__FEnLT",modalFooter:"modalFooter__t8jRG"}},0x20ca71905:e=>{e.exports={headerIcon:"headerIcon__qJ2FN",slideContainer:"slideContainer__HN_or",surveyNavigation:"surveyNavigation__HDv_u",slideNumberDisplay:"slideNumberDisplay__VgeHP",buttonsContainer:"buttonsContainer__HLV2s",label:"label__vSj3F",thankYouImage:"thankYouImage__Uc_8o",thankYouMessage:"thankYouMessage__WcWcs",popoutContainer:"popoutContainer__i9f61",upperSection:"upperSection__vZy92",questionHeader:"questionHeader__kD7EQ",questionSubtitle:"questionSubtitle__adq1T",closeIcon:"closeIcon__rSCn6",optionsContainer:"optionsContainer___44ZR",optionCta:"optionCta__bH6DL"}},0x7ec5332a:e=>{e.exports={connectToGoogleButton:"connectToGoogleButton__abS5B"}},0x1c7751617:e=>{e.exports={banner:"banner__cIQBY",content:"content__xQsQc",foregroundImageContainer:"foregroundImageContainer__wXRnn",foregroundImage:"foregroundImage__XqWWH",closeButtonContainer:"closeButtonContainer__vP2uO"}},0x21c738cd9:e=>{e.exports={forwardingEmailContainer:"forwardingEmailContainer__HRgmd"}},0x603c9c94:e=>{e.exports={codeActions:"codeActions__Cy0N2"}},0xe386c8fe:e=>{e.exports={codeEditor:"codeEditor___e8BB",codeTable:"codeTable__uaazO",codeLine:"codeLine__qKIjl",lineNumber:"lineNumber__tCf8T",codeText:"codeText__jypaC"}},0xf6f89a2d:e=>{e.exports={loading:"loading__mJnOQ"}},0xf4dc6b98:e=>{e.exports={previewForm:"previewForm__SrYwv"}},0x3bc782de:e=>{e.exports={formFieldsContainer:"formFieldsContainer__FvUtt"}},0x2409a3b1e:e=>{e.exports={banner:"banner__sTXt9",gradientBackground:"gradientBackground__ylyAZ",bannerContent:"bannerContent__CayDl",badgeWrapper:"badgeWrapper__zVpTj",badge:"badge__Kjgk1",title:"title__alGcn",subtitle:"subtitle__nlyAU",textContent:"textContent__AvOrj",iconWrapper:"iconWrapper__Ubpl4",icon:"icon__v2t3u"}},0x13cbfef6f:e=>{e.exports={confettiContainer:"confettiContainer__A4rHU",confettiLottie:"confettiLottie__aSvIm",confettiSvg:"confettiSvg__LZSS4",container:"container__LsOZm",leftContainer:"leftContainer__KbFNq",headerContainer:"headerContainer__tqOrz",subtitle:"subtitle__DGKiu",errorContainer:"errorContainer__f5MOH",featuresContainer:"featuresContainer__Bu5RT",feature:"feature__CpvIK",featureIcon:"featureIcon__rJAIb",featureContent:"featureContent__xHTKs",buttonContainer:"buttonContainer__jPXOd",disclaimer:"disclaimer__ZXk0L",buttonWrapper:"buttonWrapper__wLAaW",buttonIcon:"buttonIcon__at0XP",buttonContent:"buttonContent__Wecwr",rightContainer:"rightContainer__taYCX",rightImage:"rightImage__M7RgZ"}},0x32665ea4:e=>{e.exports={container:"container__QMCGH",content:"content__LKy8N",contentBox:"contentBox__UWe5S",sidePanel:"sidePanel__BWS3Q",eacOnboardingPanel:"eacOnboardingPanel__fvHcB",emailToCasePanel:"emailToCasePanel__fRSSL",webToLeadPanel:"webToLeadPanel__MKIbl",actions:"actions__ReqjP",header:"header__thRaz",image:"image__e_XE9"}},0x45b12c87:e=>{e.exports={inline:"inline___XuVR",space_25:"space_25__QTaFd",space_50:"space_50__jTX79",space_75:"space_75__gdLnc",space_100:"space_100__iBors",space_150:"space_150__A6dCd",align_inherit:"align_inherit__ABYqz",align_start:"align_start__LX1xa",align_center:"align_center__tZitR",align_space_between:"align_space_between__nOvPL",alignY_inherit:"alignY_inherit__hcI62",alignY_start:"alignY_start__YAAp6",alignY_center:"alignY_center__X0Gdk",alignY_end:"alignY_end__kMCpS",alignY_baseline:"alignY_baseline__lxDQj"}},0x1da07e54b:e=>{e.exports={stack:"stack__eg6VL",listStyleNone:"listStyleNone__agQo0",space_0:"space_0__W_M4v",space_25:"space_25__bGNYJ",space_50:"space_50__Ka7rn",space_75:"space_75__jusfA",space_100:"space_100__kGiZE",space_125:"space_125__w0o4d",space_150:"space_150__ssfbm",space_175:"space_175__mmUpK",space_200:"space_200__XQv_e",align_inherit:"align_inherit__On6zX",align_start:"align_start__yDo0N",align_center:"align_center__B0x7R",grow_0:"grow_0__NXyCQ",grow_1:"grow_1__pzEHP"}},0x78e4b754:e=>{e.exports={emailSentSuccessToastContent:"emailSentSuccessToastContent__M36wK",emailSentSuccessToastIcon:"emailSentSuccessToastIcon__keArW"}},0x1ec9adeaa:e=>{e.exports={borderStyles:"borderStyles__q4QyS",emailPromptContainer:"emailPromptContainer__f81qz",promptBarHeader:"promptBarHeader__uIPHZ",promptBarStreamingHeader:"promptBarStreamingHeader__sLe6T",shimmerText:"shimmerText__RjPEY",aiSparkleFilledIcon:"aiSparkleFilledIcon__F5Pmj",stopButton:"stopButton__Orams",promptBarErrorBanner:"promptBarErrorBanner__WoZ4x",promptBarErrorTitle:"promptBarErrorTitle__JHYrn",promptBarErrorSubtitle:"promptBarErrorSubtitle__BPoxY",promptBarInput:"promptBarInput__jyzMi",accessories:"accessories__oVeIh",accessoriesWrapped:"accessoriesWrapped__tKdMY",accessoriesContainerInner:"accessoriesContainerInner__dXT79",submitButton:"submitButton___HKf4",buttonWithIcon:"buttonWithIcon__EEXC1",promptBarFooter:"promptBarFooter__KEJlv",promptBarFooterDisclaimer:"promptBarFooterDisclaimer__tMrqV",promptBarStreamingFooter:"promptBarStreamingFooter__Kql2i",emailSentSuccessToastIcon:"emailSentSuccessToastIcon__RdyAs"}},0x1a352b5d:e=>{e.exports={emailComposerContainer:"emailComposerContainer__YC0Ls",emailComposerNewEmailThread:"emailComposerNewEmailThread__pbvn0",emailComposerWysiwygContainer:"emailComposerWysiwygContainer__sUX3N",emailComposerMetadataContainer:"emailComposerMetadataContainer__PrOff",emailComposerMetadataRow:"emailComposerMetadataRow__VwjsR",emailComposerToLabel:"emailComposerToLabel__VYbNL",emailComposerFromLabel:"emailComposerFromLabel__olKsm",emailComposerSubjectLabel:"emailComposerSubjectLabel__BIdUq",emailComposerAttachmentsError:"emailComposerAttachmentsError__aoL8K",emailComposerSubjectInput:"emailComposerSubjectInput__czObI",emailComposerDraftHighlight:"emailComposerDraftHighlight__voYSC"}},0x1bd6773d4:e=>{e.exports={attachmentsDragOverlay:"attachmentsDragOverlay__Mc5Ia",attachmentsDragOverlayContent:"attachmentsDragOverlayContent__3yE4j",attachmentsDragOverlayAnimationContainer:"attachmentsDragOverlayAnimationContainer__sOiG4",attachmentsDragOverlayAnimationCard:"attachmentsDragOverlayAnimationCard__Wwe7V",cardAnim:"cardAnim__Tq_a7",attachmentsDragOverlayTitle:"attachmentsDragOverlayTitle__YCO9K"}},0xe2adc842:e=>{e.exports={collapseToggle:"collapseToggle__jHTI1"}},0x156de7cd4:e=>{e.exports={autoPeekCoachmark:"autoPeekCoachmark__bFKUT",autoPeekWrapper:"autoPeekWrapper__u6mns"}},0x1b1feccfb:e=>{e.exports={banner:"banner__l13qy",addListModal:"addListModal__KYhRz",singleRecordFlexpane:"singleRecordFlexpane__XoUQz",bannerPrimaryView:"bannerPrimaryView__o8LHR",bannerSecondaryView:"bannerSecondaryView__ohP1l"}},0x9ac518e6:e=>{e.exports={container:"container__xPhEJ",image:"image__ssZqM",containerClipRight:"containerClipRight__IZl9O",containerSlackbot:"containerSlackbot__p7d3C"}},0xc0b06cfd:e=>{e.exports={toastItem:"toastItem__wi_hX",toastContentContainer:"toastContentContainer__AJeBe",toastContent:"toastContent__vnygu",toastContentWithFooterCTAs:"toastContentWithFooterCTAs__zz6ey",title:"title__Ewr_R",subtitle:"subtitle__a_ajQ",closeButton:"closeButton__LMtLs",hidden:"hidden__sb6Bw"}},0x1c22b9a6d:e=>{e.exports={bottomBorder:"bottomBorder__kCUxL",iconContainer:"iconContainer__PZ9pB",footerCtas:"footerCtas__FqZPL"}},0x5c967059:e=>{e.exports={bottomBorder:"bottomBorder__USFy4",iconStack:"iconStack__fgHaO",iconStackItem:"iconStackItem__Xkkem",iconContainer:"iconContainer__NsjgG",progressBar:"progressBar__a4WQC",progressBarInner:"progressBarInner__ZBmb9",progressBarAnimated:"progressBarAnimated__vZFna",progressBarAnim:"progress-bar-anim__pIqzX"}},0x1bf969971:e=>{e.exports={toast:"toast__gFBep"}},0x2057fe759:e=>{e.exports={noAccessMessage:"noAccessMessage__lP2SW",subtitle:"subtitle__T7pPf",peek:"peek__mZAN7"}},0x25dee083:e=>{e.exports={input:"input__HXkAy",description:"description__gheiU",inputClearButton:"inputClearButton__qEz9j"}},0x1b8fbfd8c:e=>{e.exports={menuItem:"menuItem__Bgr4I"}},0x116ffe585:e=>{e.exports={cta:"cta__joCJb",addedToSidebar:"addedToSidebar__h9CqO",iconBlack:"iconBlack__akUdQ",iconYellow:"iconYellow__s0yGM",disabled:"disabled__IPaXE",noBorder:"noBorder__jwfuL"}},0x122c16d45:e=>{e.exports={orgSelect:"org-select__c3w2G",orgSelectMaxWidth:"org-select-max-width__t8ozp",rowOverride:"rowOverride__PPrDD",optionWrapper:"optionWrapper__UI19R",overlay:"overlay__g8Hfx",migrationOverlay:"migrationOverlay__LHjku",normalOverlay:"normalOverlay__h5b4h",optionContent:"optionContent__wfdaW",orgName:"orgName__CyYP8",isMigrating:"isMigrating__CoyRA",migrationMsg:"migrationMsg__fsgCE"}},0x228d910c8:e=>{e.exports={orgName:"orgName__L9l6H",orgList:"orgList__aikYH"}},0x12e13ac0a:e=>{e.exports={fieldContainer:"fieldContainer__qSyKG",multiReferenceContainer:"multiReferenceContainer__H9zD_",placeholderLock:"placeholderLock___RlTt"}},0x2a68add3:e=>{e.exports={loadingSpinner:"loadingSpinner__jN6Ld",loadingSpinnerCreateMode:"loadingSpinnerCreateMode__NlOjI",detailsLoadingContainer:"detailsLoadingContainer__N3vvd",formContent:"formContent__SuETl",fetchErrorContainer:"fetchErrorContainer__E3KsK",fetchErrorTitle:"fetchErrorTitle__Jo09L",fetchErrorText:"fetchErrorText__V76Lc",headerLabel:"headerLabel__bMXaf",topFieldsContainer:"topFieldsContainer__QqbcG",topFieldsContainerWithExtraFields:"topFieldsContainerWithExtraFields__jM6F8",topFieldsContainerWithCompoundTopName:"topFieldsContainerWithCompoundTopName__tqlAH",compoundNameHeaderLabel:"compoundNameHeaderLabel__AF9mm",topLevelErrorsContainer:"topLevelErrorsContainer__gxoa_",topLevelErrorsAlert:"topLevelErrorsAlert__h7zZ7",formFieldContainer:"formFieldContainer__lh5sm",nameField:"nameField__ZIdvh",formFieldLabel:"formFieldLabel__bZmqk",inputContainer:"inputContainer__U_I51",isEditing:"isEditing__Ptp6m",hasError:"hasError__PSlBX",hasBeenChanged:"hasBeenChanged__g1ni1",locked:"locked__LOlj3",topNameFieldsContainer:"topNameFieldsContainer__AcSaI",compoundTopNameFieldsContainer:"compoundTopNameFieldsContainer__LsLkN",inputCompoundTopNamesFieldContainer:"inputCompoundTopNamesFieldContainer__R5pXF"}},0x5cea7998:e=>{e.exports={skeleton:"skeleton__CJaJ6"}},0x2288f8eb:e=>{e.exports={iconContainer:"iconContainer__skppE"}},0x14e4701c8:e=>{e.exports={checkIcon:"checkIcon__MQBtz",warnIcon:"warnIcon__uwVNM",statusIcon:"statusIcon__AhETJ",statusIconLoading:"statusIconLoading__niiGD"}},0x141aaa1b2:e=>{e.exports={gradient_wrapper:"gradient_wrapper__vHSH4",content:"content__efzVy",salesforce_logo:"salesforce_logo__v7tL5"}},0x15973a9da:e=>{e.exports={salesforce_login_empty_state:"salesforce_login_empty_state__q0XWj"}},0x195b4ef0b:e=>{e.exports={cloudButton:"cloudButton__dLGig",orgUrl:"orgUrl__EoKpj",statusText:"statusText__Cwius",errorText:"errorText__hnoaZ"}},0x928ca71c:e=>{e.exports={subSectionSeparator:"subSectionSeparator__FKhaC"}},0x710afd12:e=>{e.exports={image:"image__DxBOw",small:"small__mdSB_",medium:"medium__cZPea",large:"large__W3xEf",xl:"xl__ZfgwY",button:"button__SdkrY"}},0xb11cfed4:e=>{e.exports={container:"container__FlXt0",searchSelect:"searchSelect__Yb6Ax",has_errors:"has_errors__pTW3Z",fileEntityText:"fileEntityText__IqtPa"}},0x1a6b3a1c9:e=>{e.exports={container:"container__d1zYH"}},0x856b6254:e=>{e.exports={shortcut_summary_header:"shortcut_summary_header__HHLDT",shortcut_summary_header_icon:"shortcut_summary_header_icon__PX6gu"}},0xd5a46e59:e=>{e.exports={inline__file_entity:"inline__file_entity__UoI0k",inline__title:"inline__title__hOyyt"}},0x3f600f93:e=>{e.exports={title:"title__VgTjt",icon:"icon__vuPpV"}},0x1461e71d1:e=>{e.exports={variable_container:"variable_container__bbk5s",inputToolbarVariablesButton:"inputToolbarVariablesButton__a4aeN"}},0x1aedf305b:e=>{e.exports={containerOuter:"containerOuter__gAQJl",innerWrapper:"innerWrapper__cB6XK",cCard:"c-card__PwX9G",header:"header__HkLiC",headerContainer:"headerContainer__gOKRf",headerTitle:"headerTitle__MsW9U",preview:"preview__QTt78",cardSection:"cardSection__n5h8X",cardContainer:"cardContainer__x0bBo",cardTrigger:"card-trigger__VzeWe",cardHeader:"card-header___7bQs",headerInfo:"header-info__FCs33",headerText:"header-text__ZgJVl",headerNoBorderBottom:"header-no-border-bottom__RliSX",divider:"divider__SuQhJ",spacer:"spacer__X_YCX",dot:"dot__hb64a",border:"border__eRBNB",headerInner:"headerInner__R9vLk",workflowPreview:"workflowPreview__UFJ0I",headerNoBottomRadius:"headerNoBottomRadius__eBcZc",headerHasBottomRadius:"headerHasBottomRadius__x18uZ",workflowScroll:"workflowScroll__q9fXs",itemPreview:"itemPreview__BYfdx",shimmer_workflow_loading:"shimmer_workflow_loading__KyRNY",arrowDown:"arrowDown__d83Ni",loadingText:"loadingText__nXQmy",iconContainer:"iconContainer__xFmjv",loadingButton:"loadingButton__E_bz6",tertiaryText:"tertiaryText__eLT6M"}},0x1de687e0f:e=>{e.exports={dynamic_data_display_options_container:"dynamic_data_display_options_container__N1cqQ"}},0x133096d9b:e=>{e.exports={variablesMenuContainer:"variables-menu-container__KQ6wE",menuTriggerText:"menu-trigger-text__TPeSc",menuItem:"menu-item__n2aK_",menuTriggerButton:"menu-trigger-button__hZDDY",menuTriggerButtonDisable:"menu-trigger-button-disable__Ts7b3",menuTriggerButtonIconOnly:"menu-trigger-button-icon-only__vTxkf",variableTypeSeparator:"variable-type-separator__oB3PV",groupHeaderLabel:"group-header-label__t6QCL"}},0xebf2b1aa:e=>{e.exports={has_errors:"has_errors__J1iCJ"}},0x1897055b4:e=>{e.exports={sendMessageFilesWrapper:"send-message-files-wrapper__tESnH",sendMessageFile:"send-message-file__cRxFN",sendMessageFileError:"send-message-file-error__IaMzC",sendMessageAttachmentIcon:"send-message-attachment-icon___ODnG"}},0x73cfdc00:e=>{e.exports={container:"container__qk5BQ",transparent_background:"transparent_background__dsUxk",pin:"pin__s7SOo",pinnedBackground:"pinned-background__Cxg0H"}},0xeddc23dd:e=>{e.exports={title:"title__lB8uX",list:"list__Elu6o",icon:"icon__zw1iG"}},0x23efb3294:e=>{e.exports={container:"container__ySRqb",icon:"icon__Umn0M",label:"label__Cfu6K"}},0x129d52829:e=>{e.exports={container:"container__VEu4G",syncIcon:"syncIcon__TVnZv"}},0x9b06c346:e=>{e.exports={withSelect:"withSelect__bqubz",row:"row__AZIde",cell:"cell__oaWsT",textyInput:"textyInput__oxymu",protip:"protip__OYH8O",alert:"alert__k_2MO",headerRow:"headerRow__wjk6N",headerCell:"headerCell__rhpJH",cellLabel:"cellLabel__pZuQJ",closeIconCell:"closeIconCell__SMycz",overflowSpace:"overflowSpace__HaAO2",availableFields:"availableFields__D_S6R"}},0xdcfa8f6a:e=>{e.exports={entity:"entity__NbKIP",placeholder_text:"placeholder_text__LrIOO"}},0x81984638:e=>{e.exports={entity:"entity__hJy3Y"}},0x18c090e66:e=>{e.exports={timestampWrapper:"timestampWrapper__yOawR",timestampInlineDateTimePicker:"timestampInlineDateTimePicker__Y_JvT"}},0x11e7d7571:e=>{e.exports={select:"select__OUeNo"}},0x1f1acac35:e=>{e.exports={token:"token__iKNGt",highlight:"highlight__SEp7M",invalid:"invalid__QXBxd"}},0xea8a50b7:e=>{e.exports={container:"container__ffLf1"}},0x2cc8fa56:e=>{e.exports={container:"container__mgeZ4"}},0x18c49b4c3:e=>{e.exports={inline:"inline__nScIu"}},0x566fc4c8:e=>{e.exports={label:"label__UfLr9",default:"default__nTg_Y"}},0x19935b6b1:e=>{e.exports={outerContainer:"outerContainer__aVTc4",innerContainer:"innerContainer__D2BWk",variableReference:"variableReference__Uj5bM",token:"token__WisgE"}},0x170cd7c4b:e=>{e.exports={dateWrapper:"dateWrapper__wMYJS"}},0x1358509bc:e=>{e.exports={container:"container__uAlzF",form_inputs:"form_inputs__awlbr"}},0xe0cde178:e=>{e.exports={has_errors:"has_errors__vVHxr"}},0x810a3ce9:e=>{e.exports={radioButton:"radioButton__H7VhN",radioField:"radioField__J6CIA",radioButtonLabel:"radioButtonLabel__AnAnP",radioButtonBase:"radioButtonBase__A6_Sm",radioButtonChecked:"radioButtonChecked__ogOSE",radioButtonDisabled:"radioButtonDisabled__eL9hO",smallText:"smallText__Htc5t",deprecatedBadge:"deprecatedBadge__lVjjO",callerAuthLabelText:"callerAuthLabelText__cyI5o",userId:"userId__CGUKh",radioButtonBottomBorder:"radioButtonBottomBorder__WpyTA",oauthGroupBorder:"oauthGroupBorder__SC6Xh",marginBottom:"marginBottom__sf_K7"}},0x17c322a5b:e=>{e.exports={labelWithError:"labelWithError__WRuYt",oauthAccountContainer:"oauthAccountContainer__RRMpd",checkIcon:"checkIcon__r3lPG",subLabel:"subLabel__CQDnp"}},0xec70cbf1:e=>{e.exports={timestampWrapper:"timestampWrapper__FQDs9",timestampInlineDateTimePicker:"timestampInlineDateTimePicker__TJTaF"}},0x17abac04c:e=>{e.exports={inlineLabel:"inlineLabel__WkZsG",syncedWithFormLabel:"syncedWithFormLabel__WSFbe",messagePostedTriggerLabel:"messagePostedTriggerLabel__KnjzE"}},0x2310bfb55:e=>{e.exports={inline_width:"inline_width__YZPhb",dynamicDataMenuButton:"dynamic-data-menu-button__qlTRm",parameter_long:"parameter_long__NZidC",hint_text_width:"hint_text_width__bVxpK"}},0x10b4dd7c2:e=>{e.exports={addReaction__button:"addReaction__button__fkbAK"}},0x3bb53a1e:e=>{e.exports={container:"container__MaGC8",reaction_info:"reaction_info__HcYA5",delete_button:"delete_button__aLHY1"}},0x22b3dbb67:e=>{e.exports={inputWrapper:"inputWrapper__hNLE5",emojiButton:"emojiButton__L4D9T"}},0x8c7f74eb:e=>{e.exports={withEmojiButton:"withEmojiButton__j1I3N"}},0x22146d01c:e=>{e.exports={stepList:"stepList__Sn0O8",stepListTitle:"stepListTitle__mCdtQ",legacyStepListTitle:"legacyStepListTitle__M09Ly",stepListTitleHeaderAndBadge:"stepListTitleHeaderAndBadge__QGdk2",stepListLoader:"stepListLoader__GjU8S",stepIcon:"stepIcon__ByVHU"}},0xac500276:e=>{e.exports={step:"step__ewiQE",stepContainer:"stepContainer__ale0q",stepInfo:"stepInfo__A4eBn",stepIcon:"stepIcon__biT2y",stepText:"stepText__KRDk9"}},0x1a0b853ac:e=>{e.exports={headline:"headline__tbrfu",title:"title__t4xmV",subtitle:"subtitle__VaV8_",body:"body__hoy8Y",caption:"caption__ITdOJ",micro:"micro__ZLNDi",black:"black__pcFug",bold:"bold__xdMjM",regular:"regular__A8Ii2",foreground:"foreground__xBf1B",foreground_max:"foreground_max__AABKf",foreground_max_solid:"foreground_max_solid__BGd74",black_always:"black_always__Kch5V",white_always:"white_always__bAn4T"}},0x1f1e5460f:e=>{e.exports={modalOverlay:"modalOverlay__zzGBy"}},0x221574985:e=>{e.exports={blocksRenderer:"blocks-renderer__bmveh",footerText:"footer-text__l0nOy"}},0x1de368064:e=>{e.exports={badge:"badge__tM_Je"}},0x54fbc2d4:e=>{e.exports={keywordToken:"keywordToken__aPA6P",keywordTokenSlim:"keywordTokenSlim___JI5L",keywordsTooltipWrapper:"keywordsTooltipWrapper__TEv6z",normalStyle:"normalStyle__u9Sk_",italicStyle:"italicStyle__sbPmI",inlineBlock:"inlineBlock__FzItc"}},0x2079c6624:e=>{e.exports={listViewerContainer:"listViewerContainer__VdCy3",listViewer:"listViewer__i1ycP",listItem:"listItem__neM0B",row:"row__iMgDe",currentWorkspaceRow:"currentWorkspaceRow__Xtno8",workspaceRow:"workspaceRow__fUOZr",workspaceRowWithUnreads:"workspaceRowWithUnreads__lMwY3",workspaceSwitcherKeyboardShortcut:"workspaceSwitcherKeyboardShortcut__kJoMF",title:"title__MkAHK",hasMentions:"hasMentions__kAfL1",addWorkspaceRow:"addWorkspaceRow__hUEZn",icon:"icon__MjVAC",iconWithDot:"iconWithDot__WyTJ9",iconBackgroundContainer:"iconBackgroundContainer__YwXNR",listViewerList:"listViewerList__gWiRp",topNavLeftContainerStart:"topNavLeftContainerStart__J8A4u",topNavRightContainerButtons:"topNavRightContainerButtons__Qai6z",mainButtonWithUnreadDot:"mainButtonWithUnreadDot__rIM79",topNavButton:"topNavButton__RsHSh",mainButton:"mainButton__jZwey",highlightedMainButton:"highlightedMainButton__gF0XO",mentionBadge:"mentionBadge___eKQt",mainHeaderContainer:"mainHeaderContainer__y9g7v",mainHeaderLeftContainerStart:"mainHeaderLeftContainerStart__oAhMD",workspaceSwitcherButton:"workspaceSwitcherButton__OfoOe",workspaceSwitcherButtonWithUnreads:"workspaceSwitcherButtonWithUnreads__mrb_P",workspaceSwitcherIcons:"workspaceSwitcherIcons__TQuHI",workspaceSwitcherTeamName:"workspaceSwitcherTeamName__IqGnz",mainHeaderRightContainer:"mainHeaderRightContainer__Fjsse",userMenu:"userMenu__RtYQO",mainHeaderUser:"mainHeaderUser__hCak_",mainHeaderUserWithStatus:"mainHeaderUserWithStatus__dWVqK",mainHeaderUserStatus:"mainHeaderUserStatus__OTI63",secondaryHeader:"secondaryHeader__DPFdh",backButton:"backButton__eXNtb",titleText:"titleText__Sn7jQ",LaterMessageAction:"LaterMessageAction__l4eE5",breadcrumbs:"breadcrumbs__xleVi",breadcrumb:"breadcrumb__ZD5hR",breadcrumbIcon:"breadcrumbIcon__HS5qA",label:"label__jtstR",highlightedBreadcrumb:"highlightedBreadcrumb__ImMAw",adminSeparator:"adminSeparator__xXPmM"}},0x136692fbe:e=>{e.exports={adminPageLink:"adminPageLink__ibzxb"}},0x81503523:e=>{e.exports={accountMenuContainer:"accountMenuContainer__Xixf1",accountMenuButton:"accountMenuButton__M3kaW",accountMenuIcon:"accountMenuIcon__dYctN",accountMenuAvatar:"accountMenuAvatar__iauJ2",accountMenuName:"accountMenuName__UJ6tq",switchWorkspace:"switchWorkspace__wt7LU",menuItem:"menuItem__a5taz",userName:"userName__alaPP",accountSettings:"accountSettings__UAW5r",openInSlackMenuItem:"openInSlackMenuItem__Dx9NN"}},0x1c63d8a90:e=>{e.exports={workspaceNavigationContainer:"workspaceNavigationContainer__QPLwP",navigationAllItemsContainer:"navigationAllItemsContainer__Iwa26",header:"header__iqHww",headerOrgName:"headerOrgName__ooII1",openInSlackLink:"openInSlackLink__N8eAz",headerOrgImg:"headerOrgImg__N6Ebx",navigationItemsPrimaryContainer:"navigationItemsPrimaryContainer__Adf86",secondaryItemsContainer:"secondaryItemsContainer__O4DI2",secondaryItem:"secondaryItem__BOzFZ",selected:"selected__Ja9nw",itemPrimary:"itemPrimary__Lju8B",open:"open__ZKkN6",itemButton:"itemButton__JQmx_",userAccountButton:"userAccountButton__yjh8O",sidebar_expand:"sidebar_expand__jH4zZ",sidebar_collapse:"sidebar_collapse__cRwmv"}},0x23f2f703b:e=>{e.exports={orgWideOption:"orgWideOption__qOxRe"}},0x11ad04567:e=>{e.exports={modal_main_content:"modal_main_content__IBcIn"}},0x77627b71:e=>{e.exports={container:"container__ncwY8",invalid:"invalid__sJpNR",plainTextSelectOptions:"plainTextSelectOptions__dd1nD"}},0x1b1df7714:e=>{e.exports={modalContainer:"modalContainer__AMl4K",helpText:"helpText__eGNnq"}},0x8b08ad98:e=>{e.exports={disabledCheckboxLabel:"disabledCheckboxLabel__E7ti6"}},0x186093629:e=>{e.exports={modalContent:"modalContent__XDnBx",inputParametersWrapper:"inputParametersWrapper__Hg3Mn",promptEditorModal:"promptEditorModal__W9CKi",promptLabel:"promptLabel__whNBf",promptEditorModalContent:"promptEditorModalContent__yEjg2",textyInputContainer:"textyInputContainer__fOBr7",promptInputWrapper:"promptInputWrapper__RVlo_",aiStepRightPanel:"aiStepRightPanel__Ucx1Z",sectionContainer:"sectionContainer__o_5Zr",expanded:"expanded__CIlvD",testPromptPanelOuterContainer:"testPromptPanelOuterContainer__Sitn_",contentSourcesContent:"contentSourcesContent__c_g10",testPromptPanelContainer:"testPromptPanelContainer__uSLvD",sectionHeader:"sectionHeader___RzM0",sectionHeaderButton:"sectionHeaderButton__b22OF",sectionHeaderContent:"sectionHeaderContent__sQkur",sectionHeaderText:"sectionHeaderText__Xp98j",promptEditorModalOverlay:"promptEditorModalOverlay__oCbzs",aiStepToolbarButtons:"aiStepToolbarButtons__GumJW",inputToolbarButtonsRight:"inputToolbarButtonsRight__X3LOK",modalTitleBarContentContainer:"modalTitleBarContentContainer__f47NF",hasNoBackButton:"hasNoBackButton__iJk8Y",modalTitleBarContentLeft:"modalTitleBarContentLeft__gNIsT",modalTitleText:"modalTitleText__VbSUq",testPromptButton:"testPromptButton__nj5C7",testPromptPanel:"testPromptPanel__eiSA_",testPromptPanelShowResult:"testPromptPanelShowResult__GJj_u",testPromptShowResponse:"testPromptShowResponse__NBKHX",testPromptPanelStreamingError:"testPromptPanelStreamingError__SbB4E",testContentModalContentSection:"testContentModalContentSection__NQ5jw",testPromptPanelEmptyState:"testPromptPanelEmptyState__zJzO1",testPromptPanelEmptyStateContent:"testPromptPanelEmptyStateContent__MccUr",testPromptPanelEmptyStateTitle:"testPromptPanelEmptyStateTitle__rhWat",generatedContentContainer:"generatedContentContainer__Lb8pm",testPromptPanelResult:"testPromptPanelResult__g3OgV",testPromptPanelResultLoading:"testPromptPanelResultLoading__BeTIh",testPromptPanelResultContent:"testPromptPanelResultContent__kjXzP",resultLoading:"resultLoading__jksZi",testPromptPanelFooter:"testPromptPanelFooter__epOXJ",testPromptPanelResultError:"testPromptPanelResultError__Mmm3k",testPromptPanelResultErrorButton:"testPromptPanelResultErrorButton__iw4Op",viewErrorButton:"viewErrorButton__DT8I5"}},0xaca37c42:e=>{e.exports={promptToolsTemplatesContainer:"promptToolsTemplatesContainer__LAiaw",promptToolsAIPromptWriterContainer:"promptToolsAIPromptWriterContainer__c7BzK",promptToolsHeader:"promptToolsHeader___LLAl",promptToolsList:"promptToolsList__dXFeV",templateCard:"templateCard__NqR3L",templateCardIcon:"templateCardIcon__F72mO",templateListItem:"templateListItem__GnFxW",templateListItemDisabled:"templateListItemDisabled__pPHjF",templateSelectionContainer:"templateSelectionContainer__EBd66",promptToolsMenuItem:"promptToolsMenuItem__Q5W94",promptToolsSubmitButton:"promptToolsSubmitButton__r7uar"}},0x8601851c:(e,t,a)=>{"use strict";a.d(t,{A:()=>KeyCommands});var n=a(0x58704e95),r=a.n(n),i=a(0x33644bb7),l=a(0x5359476e);let o=r().prototype.stopCallback;r().prototype.stopCallback=()=>!1;let filterInput=e=>o(e,e.target),applyFilters=(e,t)=>{let a=t[0];return a?applyFilters((...t)=>{a(t[0])||e(...t)},t.slice(1)):e};let KeyCommands=class KeyCommands{mousetrap;constructor(e){r().addKeycodes({188:"comma"}),r().addKeycodes({173:"-"}),this.mousetrap=new(r())(e||void 0)}bindAll(e){e.forEach(e=>{let t=[e.ignoreInputs&&filterInput,e.filter].filter(i.A);e.handler=applyFilters(e.handler,t),this.mousetrap.bind(e.keys,e.handler,e.action)})}reset(){this.mousetrap.destroy()}unbindAll(e){this.mousetrap.unbind((0,l.A)(e,"keys"))}trigger(e,t){this.mousetrap.trigger(e,t)}}},0x16aa90253:(e,t,a)=>{"use strict";a.d(t,{O:()=>c});var n=a(0xbad225b5),r=a(0xa98e0bd0),i=a.n(r),l=a(0xd46d8b9d),o=a(0x14fad6485);let s=(0,l.eF)(l.vt.REACT_VIRTUALIZED,e=>i()(e));function PortableReactVirtualizedList({refToForward:e,...t}){let{windowRef:a}=(0,n.useContext)(o._0),r=s(a.deref()).List;return n.createElement(r,{ref:e,...t})}PortableReactVirtualizedList.displayName="PortableReactVirtualizedList";let c=n.forwardRef((e,t)=>n.createElement(PortableReactVirtualizedList,{refToForward:t,...e}))},0x130d89881:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x1d9c7cde0);let i=n.forwardRef(({doNotBailOutOnEmptyChildren:e=!0,...t},a)=>n.createElement(r.Ay,{...t,ref:a,doNotBailOutOnEmptyChildren:e}));i.displayName="AutoSizer";let l=i},0xf27817c9:(e,t,a)=>{"use strict";a.d(t,{A:()=>i,r:()=>useHoverContext});var n=a(0xbad225b5);let r=(0,n.createContext)({isHovered:!1});function useHoverContext(){return(0,n.useContext)(r)}let Hover=({children:e})=>{let[t,a]=n.useState(!1),i=(0,n.useRef)(null),l=(0,n.useMemo)(()=>({isHovered:t}),[t]);return n.createElement(r.Provider,{value:l},e({isHovered:t,hoverProps:{onMouseEnter:()=>{t||a(!0)},onMouseLeave:()=>{t&&a(!1)},onFocus:()=>{a(!0)},onBlur:e=>{t&&!i?.current?.contains(e?.relatedTarget)&&a(!1)}},ref:i}))};Hover.displayName="Hover";let i=Hover},0x13dc5b6cd:(e,t,a)=>{"use strict";a.d(t,{O:()=>Scroll});var n=a(0xbad225b5);let Scroll=({children:e})=>{let[t,a]=(0,n.useState)(!1);return e({onScroll:e=>{let n=e.currentTarget.scrollTop>4;n!==t&&a(n)},isScrolled:t})}},0x70bb2ceb:(e,t,a)=>{"use strict";a.d(t,{l:()=>Toggle});var n=a(0xbad225b5);let Toggle=({children:e,initialState:t=!1})=>{let[a,r]=(0,n.useState)(t);return e({isToggled:a,toggle:(0,n.useCallback)(()=>{r(e=>!e)},[])})}},0x1cf587e0a:(e,t,a)=>{"use strict";a.d(t,{$:()=>n});let n=(0,a(0xbad225b5).createContext)({isInMegaphoneContainerContext:!1})},0xe78822f2:(e,t,a)=>{"use strict";a.d(t,{b:()=>logMegaphoneDevAwarenessWarning,r:()=>l});var n,r=a(0x18dac2b8e),i=a(0x22480f425),l=((n={}).Coachmark="coachmark",n.DeprecatedCoachmark="deprecated_coachmark",n);let logMegaphoneDevAwarenessWarning=(e,t)=>{if((0,r.Cu)()&&!(0,i.A)()){let a="Coachmark";"deprecated_coachmark"===e&&(a="DeprecatedCoachmark"),t.warn(`[MEGAPHONE FRAMEWORK]: Hi! Adding a new '${a}' component? Have you considered taking advantage of our Megaphone framework? If you already did and Megaphone does not apply to your use case, that is great! you can turn off this warning by setting the 'isMegaphoneCoachmark' prop to 'false' in your '${a}' component instance.

Now, if you want to learn more about Megaphone and how it can help your use case, you can take a look at our docs (https://docs.tinyspeck.com/megaphone/) or you can find us over #devel-megaphone and we will be happy to assist you
`)}}},0x24ac4d72e:(e,t,a)=>{"use strict";a.d(t,{Ah:()=>r,K2:()=>n,Z4:()=>i});let n="EGRIDORG1",r="TTESTTEAM",i="USELFUSER"},0x543a781e:(e,t,a)=>{"use strict";a.d(t,{A:()=>useDebounce});var n=a(0xbad225b5);function useDebounce(e,t){let[a,r]=(0,n.useState)(e);return(0,n.useEffect)(()=>{let a=setTimeout(()=>{r(e)},t);return()=>clearTimeout(a)},[e,t]),a}},0x18b53049a:(e,t,a)=>{"use strict";a.d(t,{Y:()=>useDebouncedCallback});var n=a(0xbad225b5),r=a(0x2286acf6c);let i={leading:!1,trailing:!0};function useDebouncedCallback(e,t=250,a=i){let l=(0,n.useRef)(!1),o=(0,n.useRef)(!1),[s,c]=(0,n.useState)(0),d=(0,n.useRef)(),m=(0,n.useRef)(),u=(0,n.useRef)(!1),p=(0,n.useRef)(!1),h=(0,n.useRef)(!1),_=(0,n.useMemo)(()=>({isDebounce:e,isExecute:t})=>{let n=l.current,r=o.current,i=n&&(a?.trailing??!0)||r;l.current=e??n,o.current=t??r;let s=n!==l.current,d=r!==o.current,m=i!==(e&&(a?.trailing??!0)||t);(s&&u.current||d&&p.current||m&&h.current)&&c(e=>e+1)},[]);return d.current=(0,n.useMemo)(()=>{let n=d.current,i=m.current,s=(0,r.A)((...t)=>{_({isDebounce:!1,isExecute:!0});let a=e(...t);return Promise.resolve(a).finally(()=>{_({isExecute:!1})}),a},t,a),wrappedDebouncedFn=(...e)=>(n?.cancel(),clearTimeout(i),a?.leading&&(clearTimeout(m.current),m.current=setTimeout(()=>{_({isDebounce:!1})},t)),_({isDebounce:!0}),s(...e));return wrappedDebouncedFn.cancel=()=>{s.cancel(),_({isDebounce:!1})},wrappedDebouncedFn.flush=()=>{s.flush()},wrappedDebouncedFn.isDebouncing=(e=!0)=>(u.current=e,l.current),wrappedDebouncedFn.isExecuting=(e=!0)=>(p.current=e,o.current),wrappedDebouncedFn.isLoading=(e=!0)=>(h.current=e,l.current&&(a?.trailing??!0)||o.current),wrappedDebouncedFn},[e]),(0,n.useEffect)(()=>()=>{d.current?.cancel()},[]),d.current}},0x1b3b89b97:(e,t,a)=>{"use strict";a.d(t,{O:()=>useDeepEqualMemo});var n=a(0xbad225b5),r=a(0xa6799b78),i=a.n(r);function useCustomCompareMemo(e,t){let a=n.useRef(e),r=n.useRef(0);return t(e,a.current)||(a.current=e,r.current+=1),n.useMemo(()=>a.current,[r.current])}function useDeepEqualMemo(e){return useCustomCompareMemo(e,i())}},0x1407c6c2c:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x3b6d144f),r=a(0x12edaa96a);let __WEBPACK_DEFAULT_EXPORT__=()=>(0,n.A)(()=>(0,r.A)())},0x33a1edef:(e,t,a)=>{"use strict";window.timezones_list=function(e){return new TimezoneDetector().getList(e)},window.timezones_guess=function(){var e=new TimezoneDetector,t={};return arguments.length>0&&(t.default=arguments[0]),e.detect(t).zoneId},window.get_canonical_timezone=function(e,t){return new TimezoneDetector().getCanonicalTimezone(e,t)},(function(){this.TimezoneDetector;var tz=function(){this.getList=function(e){if("fr-FR"==e)return a;if("es-ES"==e)return n;if("de-DE"==e)return r;if("ja-JP"==e)return i;if("en-GB"==e)return l;else if("es-LA"==e)return o;else if("pt-BR"==e)return s;else if("ko-KR"==e)return c;else if("it-IT"==e)return d;else if("zh-CN"==e)return m;else if("zh-TW"==e)return u;return t},this.detect=function(e){var a={zoneId:"America/Los_Angeles",method:"gave_up"};e&&e.default&&(a.zoneId=e.default,a.method="default"),a.intl=_try_using_api();var n=a.intl.zoneId;if(n){for(var r=0;r<t.length;r++)if(t[r][1]==n)return a.zoneId=n,a.method="intlapi_exact",a;if(p[n])return a.zoneId=p[n],a.method="intl_api_manual",a;if(h[n])return a.zoneId=h[n],a.method="intl_api_equivalent",a;if(_[n])return a.zoneId=_[n],a.method="intl_api_fallback",a}return a.probe=_try_using_probe(),a.probe.zoneId&&(a.zoneId=a.probe.zoneId,a.method="date_probe"),a},this.getCanonicalTimezone=function(e,a){for(var n=0;n<t.length;n++)if(t[n][1]==e)return e;return h[e]?h[e]:p[e]?p[e]:a};var _try_using_api=function(){var e={zoneId:null,hasIntl:!1,hasDateTime:!1,hasOptions:!1};try{if("u"<typeof Intl||(e.hasIntl=!0,void 0===Intl.DateTimeFormat))return e;var t=Intl.DateTimeFormat();if(void 0===t||(e.hasDateTime=!0,void 0===t.resolvedOptions))return e;e.hasOptions=!0,e.zoneId=t.resolvedOptions().timeZone}catch{}return e},_try_using_probe=function(){var t=[];t.push(-1*new Date(Date.UTC(2008,10,27,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2010,4,30,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2001,10,28,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2002,4,7,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2004,10,3,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2011,11,7,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2012,11,10,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2015,9,22,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2015,11,2,0,0,0,0)).getTimezoneOffset()),t.push(-1*new Date(Date.UTC(2016,3,27,0,0,0,0)).getTimezoneOffset());for(var a=1;a<=t.length;a++){var n=t.slice(0,a).join(":");if(e[n])return{zoneId:e[n],probeKey:n,fullKey:t.join(":")}}return{zoneId:null,fullKey:t.join(":")}},e={"-660:-660:-660:-660:-660:-660":"Pacific/Midway","-540":"America/Adak","-600":"Pacific/Honolulu","-570":"Pacific/Marquesas","-480:-480":"America/Anchorage","-480:-420":"America/Tijuana","-420:-420:-420:-480":"America/Los_Angeles","-420:-420:-420:-420":"America/Phoenix","-420:-360":"America/Chihuahua","-360:-360:-360:-420":"America/Denver","-360:-360:-360:-360":"America/Regina","-300:-300:-300:-360":"America/Chicago","-300:-360":"Pacific/Easter","-360:-300:-360:-360:-300:-360:-360:-300:-360":"America/Mexico_City","-300:-300:-300:-300:-300:-300:-300:-300":"America/Bogota","-360:-300:-360:-360:-300:-360:-360:-300:-300":"America/Cancun","-240:-240:-240:-300:-240:-300:-300:-240:-300":"America/New_York","-300:-300:-300:-300:-300:-300:-300:-240":"America/Port-au-Prince","-300:-240":"America/Havana","-240:-240:-300":"America/Indiana/Indianapolis","-180:-240:-180:-180":"America/Asuncion","-180:-180:-180:-240":"America/Halifax","-270":"America/Caracas","-180:-240:-180:-240:-240:-180:-180:-240":"America/Cuiaba","-240:-240:-240:-240":"America/Manaus","-180:-240:-180:-240:-240:-180:-180:-180":"America/Santiago","-240:-240:-240:-300:-240:-300:-300:-240:-240":"America/Grand_Turk","-150":"America/St_Johns","-180:-180:-120:-180:-180:-180":"America/Fortaleza","-120:-180:-120":"America/Sao_Paulo","-180:-180:-180:-180":"America/Cayenne","-120:-180:-180:-180:-180":"America/Buenos_Aires","-180:-120":"America/Godthab","-120:-180:-180:-180:-120":"America/Montevideo","-120:-120:-120":"America/Miquelon","-180:-180:-120:-180:-180:-120":"America/Bahia","-120:-120:-60":"America/Noronha","-60:0":"Atlantic/Azores","-60:-60":"Atlantic/Cape_Verde","0:0:0:0:0:0:0:60":"Africa/Casablanca","0:60":"Europe/London","0:0:0:0:0:0:0:0":"Africa/Monrovia","60:120":"Europe/Amsterdam","60:60":"Africa/Algiers","120:60":"Africa/Windhoek","180:180:120:180:180":"Asia/Amman","120:180:180":"Europe/Athens","120:180:120:180:180:120:120:180:120":"Asia/Beirut","120:180:120:120:120:120:120:120":"Africa/Cairo","180:180:120:180:120":"Asia/Damascus","120:180:120:120:120:120:120:180":"Asia/Gaza","120:120:120:120:120:120:120":"Africa/Harare","120:180:120:180:120":"Asia/Jerusalem","120:180:120:180:180:180:180:120":"Europe/Kaliningrad","120:120:120:120:120:120:60":"Africa/Tripoli","180:180:180:240":"Asia/Baghdad","120:180:120:180:180:120:120:180:180":"Asia/Istanbul","180:180:180:180":"Asia/Kuwait","120:180:120:180:180:180:180:180":"Europe/Minsk","180:240:180:240:240:240:240:180:180:180":"Europe/Moscow",210:"Asia/Tehran","240:240:240:240":"Asia/Muscat","180:240:180:240:240:240:240:180:180:240":"Europe/Astrakhan","240:300:240:300:300:240:240:300":"Asia/Baku","240:240:240:300:300":"Europe/Samara","300:240":"Indian/Mauritius","240:240:240:300:240":"Asia/Tbilisi","240:300:240:300:300:240:240:240":"Asia/Yerevan",270:"Asia/Kabul","300:300":"Asia/Tashkent","300:360":"Asia/Yekaterinburg","360:300":"Asia/Karachi","330:330:330":"Asia/Kolkata","330:330:360":"Asia/Colombo",345:"Asia/Katmandu","360:360:360:420":"Asia/Almaty","360:360:360:360":"Asia/Dhaka",390:"Asia/Rangoon","360:420:360:420:420:420:420:360:360:360":"Asia/Novosibirsk","420:420:420:420":"Asia/Bangkok","360:420:360:420:420:420:420:360:360:420":"Asia/Barnaul","420:420:420:480":"Asia/Hovd","420:480":"Asia/Krasnoyarsk","360:420:420":"Asia/Tomsk","480:480:480:480":"Asia/Chongqing","480:540":"Asia/Irkutsk","540:480":"Australia/Perth","480:480:480:540":"Asia/Ulaanbaatar","540:540:540:540:540:540:540:510":"Asia/Pyongyang",585:"Australia/Eucla","540:600:540:600:600:600:600:480":"Asia/Chita","540:540:540:540:540:540:540:540":"Asia/Tokyo","540:600:540:600:600:600:600:540":"Asia/Yakutsk",630:"Australia/Adelaide",570:"Australia/Darwin","600:600:600:600:600:600:600:600":"Australia/Brisbane","660:600:660:600:600":"Australia/Canberra","660:600:660:600:660":"Australia/Hobart","600:660:600:660:660:660:660:600:600:600":"Asia/Vladivostok","660:630":"Australia/Lord_Howe","600:600:600:600:600:600:600:660":"Pacific/Bougainville","660:720:660:720:720:720:720:660":"Asia/Srednekolymsk","660:720:660:720:720:720:720:600":"Asia/Magadan",690:"Pacific/Norfolk","600:660:600:660:660:660:660:600:600:660":"Asia/Sakhalin","660:660":"Pacific/Guadalcanal","720:720:720:780":"Asia/Anadyr","780:720":"Pacific/Auckland","720:720:720:720":"Pacific/Fiji",825:"Pacific/Chatham","780:780":"Pacific/Tongatapu","-660:-660:-660:-660:-660:-600":"Pacific/Apia",840:"Pacific/Kiritimati"},t=[["(UTC-11:00) Midway Island, American Samoa","Pacific/Midway"],["(UTC-10:00) Aleutian Islands","America/Adak"],["(UTC-10:00) Hawaii","Pacific/Honolulu"],["(UTC-09:30) Marquesas Islands","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Baja California","America/Tijuana"],["(UTC-08:00) Pacific Time (US and Canada)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Mountain Time (US and Canada), Navajo Nation","America/Denver"],["(UTC-06:00) Central America","America/Belize"],["(UTC-06:00) Central Time (US and Canada)","America/Chicago"],["(UTC-06:00) Chihuahua, La Paz, Mazatlan","America/Chihuahua"],["(UTC-06:00) Easter Island","Pacific/Easter"],["(UTC-06:00) Guadalajara, Mexico City, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogota, Lima, Quito","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Eastern Time (US and Canada)","America/New_York"],["(UTC-05:00) Haiti","America/Port-au-Prince"],["(UTC-05:00) Havana","America/Havana"],["(UTC-05:00) Indiana (East)","America/Indiana/Indianapolis"],["(UTC-04:00) Asuncion","America/Asuncion"],["(UTC-04:00) Atlantic Time (Canada)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiaba","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-04:00) Turks and Caicos","America/Grand_Turk"],["(UTC-03:30) Newfoundland","America/St_Johns"],["(UTC-03:00) Araguaina","America/Fortaleza"],["(UTC-03:00) Brasilia","America/Sao_Paulo"],["(UTC-03:00) Cayenne, Fortaleza","America/Cayenne"],["(UTC-03:00) City of Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Greenland","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) Saint Pierre and Miquelon","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Azores","Atlantic/Azores"],["(UTC-01:00) Cabo Verde Islands","Atlantic/Cape_Verde"],["(UTC) Dublin, Edinburgh, Lisbon, London","Europe/London"],["(UTC) Monrovia, Reykjavik","Africa/Monrovia"],["(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","Europe/Amsterdam"],["(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","Europe/Belgrade"],["(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","Europe/Warsaw"],["(UTC+01:00) West Central Africa","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Athens, Bucharest","Europe/Athens"],["(UTC+02:00) Beirut","Asia/Beirut"],["(UTC+02:00) Cairo","Africa/Cairo"],["(UTC+02:00) Damascus","Asia/Damascus"],["(UTC+02:00) Gaza, Hebron","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","Europe/Helsinki"],["(UTC+02:00) Jerusalem","Asia/Jerusalem"],["(UTC+02:00) Kaliningrad","Europe/Kaliningrad"],["(UTC+02:00) Tripoli","Africa/Tripoli"],["(UTC+03:00) Amman","Asia/Amman"],["(UTC+03:00) Baghdad","Asia/Baghdad"],["(UTC+03:00) Istanbul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riyadh","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Moscow, St. Petersburg","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) Tehran","Asia/Tehran"],["(UTC+04:00) Abu Dhabi, Muscat","Asia/Muscat"],["(UTC+04:00) Astrakhan, Ulyanovsk, Volgograd","Europe/Astrakhan"],["(UTC+04:00) Baku","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tbilisi","Asia/Tbilisi"],["(UTC+04:00) Yerevan","Asia/Yerevan"],["(UTC+04:30) Kabul","Asia/Kabul"],["(UTC+05:00) Tashkent, Ashgabat","Asia/Tashkent"],["(UTC+05:00) Ekaterinburg","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karachi","Asia/Karachi"],["(UTC+05:00) Astana","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Kathmandu","Asia/Katmandu"],["(UTC+06:00) Dhaka","Asia/Dhaka"],["(UTC+06:30) Yangon (Rangoon)","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Hanoi, Jakarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaysk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnoyarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Beijing, Chongqing, Hong Kong SAR, Urumqi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapore","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taipei","Asia/Taipei"],["(UTC+08:00) Ulaanbaatar","Asia/Ulaanbaatar"],["(UTC+08:30) Pyongyang","Asia/Pyongyang"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokyo","Asia/Tokyo"],["(UTC+09:00) Seoul","Asia/Seoul"],["(UTC+09:00) Yakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaide","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, Sydney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) Lord Howe Island","Australia/Lord_Howe"],["(UTC+11:00) Bougainville Island","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magadan","Asia/Magadan"],["(UTC+11:00) Norfolk Island","Pacific/Norfolk"],["(UTC+11:00) Sakhalin","Asia/Sakhalin"],["(UTC+11:00) Solomon Islands, New Caledonia","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Fiji Islands","Pacific/Fiji"],["(UTC+12:45) Chatham Islands","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Kiritimati Island","Pacific/Kiritimati"]],a=[["(UTC-11:00) \xceles Midway, Samoa am\xe9ricaines, \xeele Jarvis, r\xe9cif Kingman et atoll Palmyra","Pacific/Midway"],["(UTC-10:00) \xceles Al\xe9outiennes","America/Adak"],["(UTC-10:00) Hawaii","Pacific/Honolulu"],["(UTC-09:30) \xceles Marquises","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Basse Californie","America/Tijuana"],["(UTC-08:00) Pacifique (\xc9.-U. et Canada)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Montagnes Rocheuses (\xc9.-U. et Canada), Nation navajo","America/Denver"],["(UTC-06:00) Am\xe9rique centrale","America/Belize"],["(UTC-06:00) Centre (\xc9.-U. et Canada)","America/Chicago"],["(UTC-06:00) Chihuahua, La Paz, Mazatlan","America/Chihuahua"],["(UTC-06:00) \xcele de P\xe2ques","Pacific/Easter"],["(UTC-06:00) Guadalajara, Mexico, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogota, Lima, Quito, Rio Branco","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Est (\xc9.-U. et Canada)","America/New_York"],["(UTC-05:00) Ha\xefti","America/Port-au-Prince"],["(UTC-05:00) Havane (La)","America/Havana"],["(UTC-05:00) Indiana (Est)","America/Indiana/Indianapolis"],["(UTC-04:00) Asunci\xf3n","America/Asuncion"],["(UTC-04:00) Heure Atlantique (Canada)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiaba","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-04:00) \xceles Turques-et-Ca\xefques","America/Grand_Turk"],["(UTC-03:30) Terre-Neuve-et-Labrador","America/St_Johns"],["(UTC-03:00) Aragua\xedna","America/Fortaleza"],["(UTC-03:00) Brasilia","America/Sao_Paulo"],["(UTC-03:00) Cayenne, Fortaleza","America/Cayenne"],["(UTC-03:00) Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Groenland","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) Saint-Pierre-et-Miquelon","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Les A\xe7ores","Atlantic/Azores"],["(UTC-01:00) \xceles du Cap-Vert","Atlantic/Cape_Verde"],["(UTC) Dublin, \xc9dimbourg, Lisbonne, Londres","Europe/London"],["(UTC) Monrovia, Reykjavik","Africa/Monrovia"],["(UTC+01:00) Amsterdam, Berlin, Berne, Rome, Stockholm, Vienne","Europe/Amsterdam"],["(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","Europe/Belgrade"],["(UTC+01:00) Bruxelles, Copenhague, Madrid, Paris","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopje, Varsovie, Zagreb","Europe/Warsaw"],["(UTC+01:00) Afrique centrale - Ouest","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Ath\xe8nes, Bucarest","Europe/Athens"],["(UTC+02:00) Beyrouth","Asia/Beirut"],["(UTC+02:00) Le Caire","Africa/Cairo"],["(UTC+02:00) Damas","Asia/Damascus"],["(UTC+02:00) Gaza, H\xe9bron","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","Europe/Helsinki"],["(UTC+02:00) J\xe9rusalem","Asia/Jerusalem"],["(UTC+02:00) Kaliningrad","Europe/Kaliningrad"],["(UTC+02:00) Tripoli","Africa/Tripoli"],["(UTC+03:00) Amman","Asia/Amman"],["(UTC+03:00) Bagdad","Asia/Baghdad"],["(UTC+03:00) Istanbul","Asia/Istanbul"],["(UTC+03:00) Kowe\xeft, Riyad","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Moscou, Saint-P\xe9tersbourg","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) T\xe9h\xe9ran","Asia/Tehran"],["(UTC+04:00) Abu Dhabi, Muscat","Asia/Muscat"],["(UTC+04:00) Astrakhan, Oulianovsk, Volgograd","Europe/Astrakhan"],["(UTC+04:00) Bakou","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tbilissi","Asia/Tbilisi"],["(UTC+04:00) Erevan","Asia/Yerevan"],["(UTC+04:30) Kaboul","Asia/Kabul"],["(UTC+05:00) Achgabat, Tachkent","Asia/Tashkent"],["(UTC+05:00) Iekaterinbourg","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karachi","Asia/Karachi"],["(UTC+05:00) Astana","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Katmandou","Asia/Katmandu"],["(UTC+06:00) Dhaka","Asia/Dhaka"],["(UTC+06:30) Rangoon","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Hanoi, Djakarta","Asia/Bangkok"],["(UTC+07:00) Barnaoul, Gorno-Alta\xefsk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasno\xefarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi","Asia/Chongqing"],["(UTC+08:00) Irkoutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapour","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taipei","Asia/Taipei"],["(UTC+08:00) Oulan-Bator","Asia/Ulaanbaatar"],["(UTC+08:30) Pyongyang","Asia/Pyongyang"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokyo","Asia/Tokyo"],["(UTC+09:00) S\xe9oul","Asia/Seoul"],["(UTC+09:00) Iakoutsk","Asia/Yakutsk"],["(UTC+09:30) Ad\xe9la\xefde","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, Sydney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) \xcele Lord Howe","Australia/Lord_Howe"],["(UTC+11:00) \xcele Bougainville","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magadan","Asia/Magadan"],["(UTC+11:00) \xcele Norfolk","Pacific/Norfolk"],["(UTC+11:00) Sakhaline","Asia/Sakhalin"],["(UTC+11:00) \xceles Salomon, Nouvelle-Cal\xe9donie","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropavlovsk-Kamtchatski","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Fidji","Pacific/Fiji"],["(UTC+12:45) \xceles Chatham","Pacific/Chatham"],["(UTC+13:00) Nuku\u2019alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Kiritimati, \xcele","Pacific/Kiritimati"]],n=[["(UTC-11:00) Islas Midway, Samoa Americana","Pacific/Midway"],["(UTC-10:00) Islas Aleutianas","America/Adak"],["(UTC-10:00) Hawai","Pacific/Honolulu"],["(UTC-09:30) Islas Marquesas","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Baja California","America/Tijuana"],["(UTC-08:00) Hora del Pac\xedfico (EE.UU. y Canad\xe1)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Hora de las Monta\xf1as Rocosas (EE.UU. y Canad\xe1), Naci\xf3n Navajo","America/Denver"],["(UTC-06:00) Am\xe9rica Central","America/Belize"],["(UTC-06:00) Chihuahua, La Paz, Mazatl\xe1n","America/Chihuahua"],["(UTC-06:00) Hora central (EE.UU. y Canad\xe1)","America/Chicago"],["(UTC-06:00) Isla de Pascua","Pacific/Easter"],["(UTC-06:00) Guadalajara, Ciudad de M\xe9xico, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogot\xe1, Lima, Quito, Rio Branco","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Hora del este (EE.UU. y Canad\xe1)","America/New_York"],["(UTC-05:00) Hait\xed","America/Port-au-Prince"],["(UTC-05:00) La Habana","America/Havana"],["(UTC-05:00) Indiana (este)","America/Indiana/Indianapolis"],["(UTC-04:00) Asunci\xf3n","America/Asuncion"],["(UTC-04:00) Hora del Atl\xe1ntico (Canad\xe1)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiab\xe1","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaos, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-04:00) Islas Turcas y Caicos","America/Grand_Turk"],["(UTC-03:30) Terranova","America/St_Johns"],["(UTC-03:00) Aragua\xedna","America/Fortaleza"],["(UTC-03:00) Brasilia","America/Sao_Paulo"],["(UTC-03:00) Cayena, Fortaleza","America/Cayenne"],["(UTC-03:00) Ciudad de Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Groenlandia","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) San Pedro y Miquel\xf3n","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Azores","Atlantic/Azores"],["(UTC-01:00) Cabo Verde","Atlantic/Cape_Verde"],["(UTC) Dubl\xedn, Edimburgo, Lisboa, Londres","Europe/London"],["(UTC) Monrovia, Reikiavik","Africa/Monrovia"],["(UTC+01:00) Amsterdam, Berl\xedn, Berna, Roma, Estocolmo, Viena","Europe/Amsterdam"],["(UTC+01:00) Belgrado, Bratislava, Budapest, Liubliana, Praga","Europe/Belgrade"],["(UTC+01:00) Bruselas, Copenhague, Madrid, Par\xeds","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopie, Varsovia, Zagreb","Europe/Warsaw"],["(UTC+01:00) \xc1frica Central Occidental","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Atenas, Bucarest","Europe/Athens"],["(UTC+02:00) Beirut","Asia/Beirut"],["(UTC+02:00) El Cairo","Africa/Cairo"],["(UTC+02:00) Damasco","Asia/Damascus"],["(UTC+02:00) Gaza, Hebr\xf3n","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kyiv, Riga, Sof\xeda, Tallin, Vilna","Europe/Helsinki"],["(UTC+02:00) Jerusal\xe9n","Asia/Jerusalem"],["(UTC+02:00) Kaliningrado","Europe/Kaliningrad"],["(UTC+02:00) Tr\xedpoli","Africa/Tripoli"],["(UTC+03:00) Amm\xe1n","Asia/Amman"],["(UTC+03:00) Bagdad","Asia/Baghdad"],["(UTC+03:00) Estambul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riad","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Mosc\xfa, San Petersburgo","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) Teher\xe1n","Asia/Tehran"],["(UTC+04:00) Abu Dabi, Mascate","Asia/Muscat"],["(UTC+04:00) Astrakhan, Ulyanovsk, Volgogrado","Europe/Astrakhan"],["(UTC+04:00) Bak\xfa","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tiflis","Asia/Tbilisi"],["(UTC+04:00) Erev\xe1n","Asia/Yerevan"],["(UTC+04:30) Kabul","Asia/Kabul"],["(UTC+05:00) Asjabad, Tashkent","Asia/Tashkent"],["(UTC+05:00) Ekaterimburgo","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karachi","Asia/Karachi"],["(UTC+05:00) Astan\xe1","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata (Calcuta), Mumbai, Nueva Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Katmand\xfa","Asia/Katmandu"],["(UTC+06:00) Dacca","Asia/Dhaka"],["(UTC+06:30) Rang\xfan","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Han\xf3i, Yakarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaysk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnoyarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Pek\xedn, Chongqing, Hong Kong, Urumqi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapur","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taip\xe9i","Asia/Taipei"],["(UTC+08:00) Ul\xe1n Bator","Asia/Ulaanbaatar"],["(UTC+08:30) Pyongyang","Asia/Pyongyang"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokio","Asia/Tokyo"],["(UTC+09:00) Se\xfal","Asia/Seoul"],["(UTC+09:00) Yakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaida","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, S\xeddney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) Isla Lord Howe","Australia/Lord_Howe"],["(UTC+11:00) Isla Bougainville","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magad\xe1n","Asia/Magadan"],["(UTC+11:00) Isla Norfolk","Pacific/Norfolk"],["(UTC+11:00) Sajal\xedn","Asia/Sakhalin"],["(UTC+11:00) Islas Salom\xf3n, Nueva Caledonia","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Fiyi","Pacific/Fiji"],["(UTC+12:45) Islas Chatham","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Isla Kiritimati","Pacific/Kiritimati"]],r=[["(UTC-11:00) Midwayinseln, Amerikanisch-Samoa","Pacific/Midway"],["(UTC-10:00) Aleuten-Inseln","America/Adak"],["(UTC-10:00) Hawaii","Pacific/Honolulu"],["(UTC-09:30) Marquesas-Inseln","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Niederkalifornien","America/Tijuana"],["(UTC-08:00) Pacific Zeit (USA & Kanada)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Mountain Zeit (USA & Kanada), Navajo Nation","America/Denver"],["(UTC-06:00) Mittelamerika","America/Belize"],["(UTC-06:00) Central Zeit (USA & Kanada)","America/Chicago"],["(UTC-06:00) Chihuahua, La Paz, Mazatlan","America/Chihuahua"],["(UTC-06:00) Osterinsel","Pacific/Easter"],["(UTC-06:00) Guadalajara, Mexiko-Stadt, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogot\xe1, Lima, Quito, Rio Branco","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Eastern Zeit (USA & Kanada)","America/New_York"],["(UTC-05:00) Haiti","America/Port-au-Prince"],["(UTC-05:00) Havanna","America/Havana"],["(UTC-05:00) Indiana (Ost)","America/Indiana/Indianapolis"],["(UTC-04:00) Asuncion","America/Asuncion"],["(UTC-04:00) Atlantic (Kanada)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiaba","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-04:00) Turks- und Caicosinseln","America/Grand_Turk"],["(UTC-03:30) Neufundland","America/St_Johns"],["(UTC-03:00) Aragua\xedna","America/Fortaleza"],["(UTC-03:00) Brasilia","America/Sao_Paulo"],["(UTC-03:00) Cayenne, Fortaleza","America/Cayenne"],["(UTC-03:00) Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Gr\xf6nland","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) St. Pierre und Miquelon","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Azoren","Atlantic/Azores"],["(UTC-01:00) Cabo Verde","Atlantic/Cape_Verde"],["(UTC) Dublin, Edinburgh, Lissabon, London","Europe/London"],["(UTC) Monrovia, Reykjavik","Africa/Monrovia"],["(UTC+01:00) Amsterdam, Berlin, Bern, Rom, Stockholm, Wien","Europe/Amsterdam"],["(UTC+01:00) Belgrad, Bratislava (Pressburg), Budapest, Ljubljana, Prag","Europe/Belgrade"],["(UTC+01:00) Br\xfcssel, Kopenhagen, Madrid, Paris","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopje, Warschau, Zagreb","Europe/Warsaw"],["(UTC+01:00) West-Zentralafrika","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhuk","Africa/Windhoek"],["(UTC+02:00) Athen, Bukarest","Europe/Athens"],["(UTC+02:00) Beirut","Asia/Beirut"],["(UTC+02:00) Kairo","Africa/Cairo"],["(UTC+02:00) Damaskus","Asia/Damascus"],["(UTC+02:00) Gaza, Hebron","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kiew, Riga, Sofia, Tallinn, Wilna","Europe/Helsinki"],["(UTC+02:00) Jerusalem","Asia/Jerusalem"],["(UTC+02:00) Kaliningrad","Europe/Kaliningrad"],["(UTC+02:00) Tripolis","Africa/Tripoli"],["(UTC+03:00) Amman","Asia/Amman"],["(UTC+03:00) Bagdad","Asia/Baghdad"],["(UTC+03:00) Istanbul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riad","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Moskau (Moskwa), St. Petersburg","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) Teheran","Asia/Tehran"],["(UTC+04:00) Abu Dhabi, Muskat","Asia/Muscat"],["(UTC+04:00) Astrachan, Uljanowsk, Wolgograd","Europe/Astrakhan"],["(UTC+04:00) Baku","Asia/Baku"],["(UTC+04:00) Ischewsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tiflis","Asia/Tbilisi"],["(UTC+04:00) Eriwan","Asia/Yerevan"],["(UTC+04:30) Kabul","Asia/Kabul"],["(UTC+05:00) Aschgabat, Taschkent","Asia/Tashkent"],["(UTC+05:00) Jekaterinburg","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karatschi","Asia/Karachi"],["(UTC+05:00) Astana","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Katmandu","Asia/Katmandu"],["(UTC+06:00) Dakka","Asia/Dhaka"],["(UTC+06:30) Yangon (Rangun)","Asia/Rangoon"],["(UTC+07:00) Nowosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Hanoi, Jakarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaisk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnojarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Peking, Chongqing, Hongkong (SAR), Urumchi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapur","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taipeh","Asia/Taipei"],["(UTC+08:00) Ulan-Bator","Asia/Ulaanbaatar"],["(UTC+08:30) Pj\xf6ngjang","Asia/Pyongyang"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokio","Asia/Tokyo"],["(UTC+09:00) Seoul","Asia/Seoul"],["(UTC+09:00) Jakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaide","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, Sydney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Wladiwostok","Asia/Vladivostok"],["(UTC+10:30) Lord-Howe-Insel","Australia/Lord_Howe"],["(UTC+11:00) Bougainville-Insel","Pacific/Bougainville"],["(UTC+11:00) Tschokurdach","Asia/Srednekolymsk"],["(UTC+11:00) Magadan","Asia/Magadan"],["(UTC+11:00) Norfolkinsel","Pacific/Norfolk"],["(UTC+11:00) Sachalin","Asia/Sakhalin"],["(UTC+11:00) Salomonen, Neu-Kaledonien","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropawlowsk-Kamtschatski","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Fidschi","Pacific/Fiji"],["(UTC+12:45) Chatham-Inseln","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Insel Kiritimati","Pacific/Kiritimati"]],i=[["(UTC-11:00) \u30DF\u30C3\u30C9\u30A6\u30A7\u30FC\u5CF6\u30FB\u30B5\u30E2\u30A2\u5CF6","Pacific/Midway"],["(UTC-10:00) \u30A2\u30EA\u30E5\u30FC\u30B7\u30E3\u30F3\u8AF8\u5CF6","America/Adak"],["(UTC-10:00) \u30CF\u30EF\u30A4","Pacific/Honolulu"],["(UTC-09:30) \u30DE\u30EB\u30AD\u30FC\u30BA\u8AF8\u5CF6","Pacific/Marquesas"],["(UTC-09:00) \u30A2\u30E9\u30B9\u30AB","America/Anchorage"],["(UTC-08:00) \u30D0\u30CF\u30AB\u30EA\u30D5\u30A9\u30EB\u30CB\u30A2","America/Tijuana"],["(UTC-08:00) \u592A\u5E73\u6D0B\u6A19\u6E96\u6642 (\u7C73\u56FD\u304A\u3088\u3073\u30AB\u30CA\u30C0)","America/Los_Angeles"],["(UTC-07:00) \u30A2\u30EA\u30BE\u30CA","America/Phoenix"],["(UTC-07:00) \u5C71\u5CB3\u6A19\u6E96\u6642 (\u7C73\u56FD\u304A\u3088\u3073\u30AB\u30CA\u30C0)\u3001\u30CA\u30D0\u30DB\u30FB\u30CD\u30A4\u30B7\u30E7\u30F3","America/Denver"],["(UTC-06:00) \u4E2D\u592E\u30A2\u30E1\u30EA\u30AB","America/Belize"],["(UTC-06:00) \u4E2D\u90E8\u6A19\u6E96\u6642 (\u7C73\u56FD\u304A\u3088\u3073\u30AB\u30CA\u30C0)","America/Chicago"],["(UTC-06:00) \u30C1\u30EF\u30EF\u3001\u30E9\u30D1\u30B9\u3001\u30DE\u30B5\u30C8\u30E9\u30F3","America/Chihuahua"],["(UTC-06:00) \u30A4\u30FC\u30B9\u30BF\u30FC\u5CF6","Pacific/Easter"],["(UTC-06:00) \u30B0\u30A2\u30C0\u30E9\u30CF\u30E9\u3001\u30E1\u30AD\u30B7\u30B3\u30B7\u30C6\u30A3\u3001\u30E2\u30F3\u30C6\u30EC\u30FC","America/Mexico_City"],["(UTC-06:00) \u30B5\u30B9\u30AB\u30C1\u30E5\u30EF\u30F3","America/Regina"],["(UTC-05:00) \u30DC\u30B4\u30BF\u3001\u30EA\u30DE\u3001\u30AD\u30C8\u3001\u30EA\u30AA \u30D6\u30E9\u30F3\u30B3","America/Bogota"],["(UTC-05:00) \u30C1\u30A7\u30C8\u30A5\u30DE\u30EB","America/Cancun"],["(UTC-05:00) \u6771\u90E8\u6A19\u6E96\u6642 (\u7C73\u56FD\u304A\u3088\u3073\u30AB\u30CA\u30C0)","America/New_York"],["(UTC-05:00) \u30CF\u30A4\u30C1","America/Port-au-Prince"],["(UTC-05:00) \u30CF\u30D0\u30CA","America/Havana"],["(UTC-05:00) \u30A4\u30F3\u30C7\u30A3\u30A2\u30CA\u6771\u90E8","America/Indiana/Indianapolis"],["(UTC-04:00) \u30A2\u30B9\u30F3\u30B7\u30AA\u30F3","America/Asuncion"],["(UTC-04:00) \u5927\u897F\u6D0B\u6A19\u6E96\u6642 (\u30AB\u30CA\u30C0)","America/Halifax"],["(UTC-04:00) \u30AB\u30E9\u30AB\u30B9","America/Caracas"],["(UTC-04:00) \u30AF\u30A4\u30A2\u30D0","America/Cuiaba"],["(UTC-04:00) \u30B8\u30E7\u30FC\u30B8\u30BF\u30A6\u30F3\u3001\u30E9\u30D1\u30B9\u3001\u30DE\u30CA\u30A6\u30B9\u3001\u30B5\u30F3\u30D5\u30A1\u30F3","America/Manaus"],["(UTC-04:00) \u30B5\u30F3\u30C6\u30A3\u30A2\u30B4","America/Santiago"],["(UTC-04:00) \u30BF\u30FC\u30AF\u30B9\u30FB\u30AB\u30A4\u30B3\u30B9\u8AF8\u5CF6","America/Grand_Turk"],["(UTC-03:30) \u30CB\u30E5\u30FC\u30D5\u30A1\u30F3\u30C9\u30E9\u30F3\u30C9","America/St_Johns"],["(UTC-03:00) \u30A2\u30E9\u30B0\u30A1\u30A4\u30CA","America/Fortaleza"],["(UTC-03:00) \u30D6\u30E9\u30B8\u30EA\u30A2","America/Sao_Paulo"],["(UTC-03:00) \u30AB\u30A4\u30A8\u30F3\u30CC\u3001\u30D5\u30A9\u30EB\u30BF\u30EC\u30B6","America/Cayenne"],["(UTC-03:00) \u30D6\u30A8\u30CE\u30B9\u30A2\u30A4\u30EC\u30B9","America/Buenos_Aires"],["(UTC-03:00) \u30B0\u30EA\u30FC\u30F3\u30E9\u30F3\u30C9","America/Godthab"],["(UTC-03:00) \u30E2\u30F3\u30C6\u30D3\u30C7\u30AA","America/Montevideo"],["(UTC-03:00) \u30B5\u30F3\u30D4\u30A8\u30FC\u30EB\u30FB\u30DF\u30AF\u30ED\u30F3","America/Miquelon"],["(UTC-03:00) \u30B5\u30EB\u30D0\u30C9\u30EB","America/Bahia"],["(UTC-02:00) \u30D5\u30A7\u30EB\u30CA\u30F3\u30C9\u30FB\u30C7\u30FB\u30CE\u30ED\u30FC\u30CB\u30E3\u5CF6","America/Noronha"],["(UTC-01:00) \u30A2\u30BE\u30EC\u30B9\u8AF8\u5CF6","Atlantic/Azores"],["(UTC-01:00) \u30AB\u30FC\u30DC\u30D9\u30EB\u30C7\u8AF8\u5CF6","Atlantic/Cape_Verde"],["(UTC) \u30C0\u30D6\u30EA\u30F3\u3001\u30A8\u30B8\u30F3\u30D0\u30E9\u3001\u30EA\u30B9\u30DC\u30F3\u3001\u30ED\u30F3\u30C9\u30F3","Europe/London"],["(UTC) \u30E2\u30ED\u30F3\u30D3\u30A2\u3001\u30EC\u30A4\u30AD\u30E3\u30D3\u30AF","Africa/Monrovia"],["(UTC+01:00) \u30A2\u30E0\u30B9\u30C6\u30EB\u30C0\u30E0\u3001\u30D9\u30EB\u30EA\u30F3\u3001\u30D9\u30EB\u30F3\u3001\u30ED\u30FC\u30DE\u3001\u30B9\u30C8\u30C3\u30AF\u30DB\u30EB\u30E0\u3001\u30A6\u30A3\u30FC\u30F3","Europe/Amsterdam"],["(UTC+01:00) \u30D9\u30AA\u30B0\u30E9\u30FC\u30C9\u3001\u30D6\u30E9\u30C1\u30B9\u30E9\u30D0\u3001\u30D6\u30C0\u30DA\u30B9\u30C8\u3001\u30EA\u30E5\u30D6\u30EA\u30E3\u30CA\u3001\u30D7\u30E9\u30CF","Europe/Belgrade"],["(UTC+01:00) \u30D6\u30EA\u30E5\u30C3\u30BB\u30EB\u3001\u30B3\u30DA\u30F3\u30CF\u30FC\u30B2\u30F3\u3001\u30DE\u30C9\u30EA\u30FC\u30C9\u3001\u30D1\u30EA","Europe/Brussels"],["(UTC+01:00) \u30B5\u30E9\u30A8\u30DC\u3001\u30B9\u30B3\u30D4\u30A8\u3001\u30EF\u30EB\u30B7\u30E3\u30EF\u3001\u30B6\u30B0\u30EC\u30D6","Europe/Warsaw"],["(UTC+01:00) \u897F\u4E2D\u592E\u30A2\u30D5\u30EA\u30AB","Africa/Algiers"],["(UTC+01:00) \u30AB\u30B5\u30D6\u30E9\u30F3\u30AB","Africa/Casablanca"],["(UTC+01:00) \u30A6\u30A3\u30F3\u30C8\u30D5\u30C3\u30C8","Africa/Windhoek"],["(UTC+02:00) \u30A2\u30C6\u30CD\u3001\u30D6\u30AB\u30EC\u30B9\u30C8","Europe/Athens"],["(UTC+02:00) \u30D9\u30A4\u30EB\u30FC\u30C8","Asia/Beirut"],["(UTC+02:00) \u30AB\u30A4\u30ED","Africa/Cairo"],["(UTC+02:00) \u30C0\u30DE\u30B9\u30AB\u30B9","Asia/Damascus"],["(UTC+02:00) \u30AC\u30B6\u3001\u30D8\u30D6\u30ED\u30F3","Asia/Gaza"],["(UTC+02:00) \u30CF\u30E9\u30FC\u30EC\u3001\u30D7\u30EC\u30C8\u30EA\u30A2","Africa/Harare"],["(UTC+02:00) \u30D8\u30EB\u30B7\u30F3\u30AD\u3001\u30AD\u30A8\u30D5\u3001\u30EA\u30AC\u3001\u30BD\u30D5\u30A3\u30A2\u3001\u30BF\u30EA\u30F3\u3001\u30D3\u30EA\u30CB\u30E5\u30B9","Europe/Helsinki"],["(UTC+02:00) \u30A8\u30EB\u30B5\u30EC\u30E0","Asia/Jerusalem"],["(UTC+02:00) \u30AB\u30EA\u30FC\u30CB\u30F3\u30B0\u30E9\u30FC\u30C9","Europe/Kaliningrad"],["(UTC+02:00) \u30C8\u30EA\u30DD\u30EA","Africa/Tripoli"],["(UTC+03:00) \u30A2\u30F3\u30DE\u30F3","Asia/Amman"],["(UTC+03:00) \u30D0\u30B0\u30C0\u30C3\u30C9","Asia/Baghdad"],["(UTC+03:00) \u30A4\u30B9\u30BF\u30F3\u30D6\u30FC\u30EB","Asia/Istanbul"],["(UTC+03:00) \u30AF\u30A6\u30A7\u30FC\u30C8\u3001\u30EA\u30E4\u30C9","Asia/Kuwait"],["(UTC+03:00) \u30DF\u30F3\u30B9\u30AF","Europe/Minsk"],["(UTC+03:00) \u30E2\u30B9\u30AF\u30EF\u3001\u30B5\u30F3\u30AF\u30C8\u30DA\u30C6\u30EB\u30D6\u30EB\u30AF","Europe/Moscow"],["(UTC+03:00) \u30CA\u30A4\u30ED\u30D3","Africa/Nairobi"],["(UTC+03:30) \u30C6\u30D8\u30E9\u30F3","Asia/Tehran"],["(UTC+04:00) \u30A2\u30D6\u30C0\u30D3\u3001\u30DE\u30B9\u30AB\u30C3\u30C8","Asia/Muscat"],["(UTC+04:00) \u30A2\u30B9\u30C8\u30E9\u30CF\u30F3\u3001\u30A6\u30EA\u30E4\u30CE\u30D5\u30B9\u30AF\u3001\u30DC\u30EB\u30B4\u30B0\u30E9\u30FC\u30C9","Europe/Astrakhan"],["(UTC+04:00) \u30D0\u30AF","Asia/Baku"],["(UTC+04:00) \u30A4\u30B8\u30A7\u30D5\u30B9\u30AF\u3001\u30B5\u30DE\u30FC\u30E9","Europe/Samara"],["(UTC+04:00) \u30DD\u30FC\u30C8\u30EB\u30A4\u30B9","Indian/Mauritius"],["(UTC+04:00) \u30C8\u30D3\u30EA\u30B7","Asia/Tbilisi"],["(UTC+04:00) \u30A8\u30EC\u30D0\u30F3","Asia/Yerevan"],["(UTC+04:30) \u30AB\u30D6\u30FC\u30EB","Asia/Kabul"],["(UTC+05:00) \u30A2\u30B7\u30CF\u30D0\u30FC\u30C9\u3001\u30BF\u30B7\u30B1\u30F3\u30C8","Asia/Tashkent"],["(UTC+05:00) \u30A8\u30AB\u30C6\u30EA\u30F3\u30D6\u30EB\u30AF","Asia/Yekaterinburg"],["(UTC+05:00) \u30A4\u30B9\u30E9\u30DE\u30D0\u30FC\u30C9\u3001\u30AB\u30E9\u30C1","Asia/Karachi"],["(UTC+05:00) \u30A2\u30B9\u30BF\u30CA","Asia/Almaty"],["(UTC+05:30) \u30C1\u30A7\u30F3\u30DE\u30A4\u3001\u30B3\u30EB\u30AB\u30BF\u3001\u30E0\u30F3\u30D0\u30A4\u3001\u30CB\u30E5\u30FC\u30C7\u30EA\u30FC","Asia/Kolkata"],["(UTC+05:30) \u30B9\u30EA\u30B8\u30E3\u30E4\u30EF\u30EB\u30C0\u30CA\u30D7\u30E9\u30B3\u30C3\u30C6","Asia/Colombo"],["(UTC+05:45) \u30AB\u30C8\u30DE\u30F3\u30BA","Asia/Katmandu"],["(UTC+06:00) \u30C0\u30C3\u30AB","Asia/Dhaka"],["(UTC+06:30) \u30E4\u30F3\u30B4\u30F3 (\u30E9\u30F3\u30B0\u30FC\u30F3)","Asia/Rangoon"],["(UTC+07:00) \u30CE\u30DC\u30B7\u30D3\u30EB\u30B9\u30AF","Asia/Novosibirsk"],["(UTC+07:00) \u30D0\u30F3\u30B3\u30AF\u3001\u30CF\u30CE\u30A4\u3001\u30B8\u30E3\u30AB\u30EB\u30BF","Asia/Bangkok"],["(UTC+07:00) \u30D0\u30A6\u30CA\u30A6\u30EB\u3001\u30B4\u30EB\u30CE\u30FB\u30A2\u30EB\u30BF\u30A4\u30B9\u30AF","Asia/Barnaul"],["(UTC+07:00) \u30DB\u30D6\u30C9","Asia/Hovd"],["(UTC+07:00) \u30AF\u30E9\u30B9\u30CE\u30E4\u30EB\u30B9\u30AF","Asia/Krasnoyarsk"],["(UTC+07:00) \u30C8\u30E0\u30B9\u30AF","Asia/Tomsk"],["(UTC+08:00) \u5317\u4EAC\u3001\u91CD\u6176\u3001\u9999\u6E2F\u7279\u5225\u884C\u653F\u533A\u3001\u30A6\u30EB\u30E0\u30C1","Asia/Chongqing"],["(UTC+08:00) \u30A4\u30EB\u30AF\u30FC\u30C4\u30AF","Asia/Irkutsk"],["(UTC+08:00) \u30AF\u30A2\u30E9\u30EB\u30F3\u30D7\u30FC\u30EB\u3001\u30B7\u30F3\u30AC\u30DD\u30FC\u30EB","Asia/Kuala_Lumpur"],["(UTC+08:00) \u30D1\u30FC\u30B9","Australia/Perth"],["(UTC+08:00) \u53F0\u5317","Asia/Taipei"],["(UTC+08:00) \u30A6\u30E9\u30F3\u30D0\u30FC\u30C8\u30EB","Asia/Ulaanbaatar"],["(UTC+08:30) \u5E73\u58CC","Asia/Pyongyang"],["(UTC+08:45) \u30E6\u30FC\u30AF\u30E9","Australia/Eucla"],["(UTC+09:00) \u30C1\u30BF","Asia/Chita"],["(UTC+09:00) \u5927\u962A\u3001\u672D\u5E4C\u3001\u6771\u4EAC","Asia/Tokyo"],["(UTC+09:00) \u30BD\u30A6\u30EB","Asia/Seoul"],["(UTC+09:00) \u30E4\u30C4\u30FC\u30C4\u30AF","Asia/Yakutsk"],["(UTC+09:30) \u30A2\u30C7\u30EC\u30FC\u30C9","Australia/Adelaide"],["(UTC+09:30) \u30C0\u30FC\u30A6\u30A3\u30F3","Australia/Darwin"],["(UTC+10:00) \u30D6\u30EA\u30BA\u30D9\u30F3","Australia/Brisbane"],["(UTC+10:00) \u30AD\u30E3\u30F3\u30D9\u30E9\u3001\u30E1\u30EB\u30DC\u30EB\u30F3\u3001\u30B7\u30C9\u30CB\u30FC","Australia/Canberra"],["(UTC+10:00) \u30B0\u30A2\u30E0\u3001\u30DD\u30FC\u30C8\u30E2\u30EC\u30B9\u30D3\u30FC","Pacific/Guam"],["(UTC+10:00) \u30DB\u30D0\u30FC\u30C8","Australia/Hobart"],["(UTC+10:00) \u30A6\u30E9\u30B8\u30AA\u30B9\u30C8\u30AF","Asia/Vladivostok"],["(UTC+10:30) \u30ED\u30FC\u30C9\u30CF\u30A6\u5CF6","Australia/Lord_Howe"],["(UTC+11:00) \u30D6\u30FC\u30B2\u30F3\u30D3\u30EB\u5CF6","Pacific/Bougainville"],["(UTC+11:00) \u30C1\u30E7\u30AF\u30EB\u30C0\u30D5","Asia/Srednekolymsk"],["(UTC+11:00) \u30DE\u30AC\u30C0\u30F3","Asia/Magadan"],["(UTC+11:00) \u30CE\u30FC\u30D5\u30A9\u30FC\u30AF\u5CF6","Pacific/Norfolk"],["(UTC+11:00) \u30B5\u30CF\u30EA\u30F3","Asia/Sakhalin"],["(UTC+11:00) \u30BD\u30ED\u30E2\u30F3\u8AF8\u5CF6\u3001\u30CB\u30E5\u30FC\u30AB\u30EC\u30C9\u30CB\u30A2","Pacific/Guadalcanal"],["(UTC+12:00) \u30A2\u30CA\u30C7\u30A3\u30EA\u3001\u30DA\u30C8\u30ED\u30D1\u30D6\u30ED\u30B9\u30AF\u30FB\u30AB\u30E0\u30C1\u30E3\u30C4\u30AD\u30FC","Asia/Anadyr"],["(UTC+12:00) \u30AA\u30FC\u30AF\u30E9\u30F3\u30C9\u3001\u30A6\u30A7\u30EA\u30F3\u30C8\u30F3","Pacific/Auckland"],["(UTC+12:00) \u30D5\u30A3\u30B8\u30FC","Pacific/Fiji"],["(UTC+12:45) \u30C1\u30E3\u30BF\u30E0\u8AF8\u5CF6","Pacific/Chatham"],["(UTC+13:00) \u30CC\u30AF\u30A2\u30ED\u30D5\u30A1","Pacific/Tongatapu"],["(UTC+13:00) \u30B5\u30E2\u30A2","Pacific/Apia"],["(UTC+14:00) \u30AF\u30EA\u30B9\u30DE\u30B9\u5CF6","Pacific/Kiritimati"]],l=[["(UTC-11:00) Midway Island, American Samoa","Pacific/Midway"],["(UTC-10:00) Aleutian Islands","America/Adak"],["(UTC-10:00) Hawaii","Pacific/Honolulu"],["(UTC-09:30) Marquesas Islands","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Baja California","America/Tijuana"],["(UTC-08:00) Pacific Time (US and Canada)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Mountain Time (US and Canada), Navajo Nation","America/Denver"],["(UTC-06:00) Central America","America/Belize"],["(UTC-06:00) Central Time (US and Canada)","America/Chicago"],["(UTC-06:00) Chihuahua, La Paz, Mazatl\xe1n","America/Chihuahua"],["(UTC-06:00) Easter Island","Pacific/Easter"],["(UTC-06:00) Guadalajara, Mexico City, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogot\xe1, Lima, Quito","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Eastern Time (US and Canada)","America/New_York"],["(UTC-05:00) Haiti","America/Port-au-Prince"],["(UTC-05:00) Havana","America/Havana"],["(UTC-05:00) Indiana (East)","America/Indiana/Indianapolis"],["(UTC-05:00) Turks and Caicos","America/Grand_Turk"],["(UTC-04:00) Asunci\xf3n","America/Asuncion"],["(UTC-04:00) Atlantic Time (Canada)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiab\xe1","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-03:30) Newfoundland","America/St_Johns"],["(UTC-03:00) Aragua\xedna","America/Fortaleza"],["(UTC-03:00) Bras\xedlia","America/Sao_Paulo"],["(UTC-03:00) Cayenne, Fortaleza","America/Cayenne"],["(UTC-03:00) City of Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Greenland","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) Saint Pierre and Miquelon","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Azores","Atlantic/Azores"],["(UTC-01:00) Cabo Verde Islands","Atlantic/Cape_Verde"],["(UTC) Dublin, Edinburgh, Lisbon, London","Europe/London"],["(UTC) Monrovia, Reykjav\xedk","Africa/Monrovia"],["(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna","Europe/Amsterdam"],["(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague","Europe/Belgrade"],["(UTC+01:00) Brussels, Copenhagen, Madrid, Paris","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb","Europe/Warsaw"],["(UTC+01:00) West Central Africa","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Athens, Bucharest","Europe/Athens"],["(UTC+02:00) Beirut","Asia/Beirut"],["(UTC+02:00) Cairo","Africa/Cairo"],["(UTC+02:00) Damascus","Asia/Damascus"],["(UTC+02:00) Gaza, Hebron","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","Europe/Helsinki"],["(UTC+02:00) Jerusalem","Asia/Jerusalem"],["(UTC+02:00) Kaliningrad","Europe/Kaliningrad"],["(UTC+02:00) Tripoli","Africa/Tripoli"],["(UTC+03:00) Amman","Asia/Amman"],["(UTC+03:00) Baghdad","Asia/Baghdad"],["(UTC+03:00) Istanbul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riyadh","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Moscow, St. Petersburg","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) Tehran","Asia/Tehran"],["(UTC+04:00) Abu Dhabi, Muscat","Asia/Muscat"],["(UTC+04:00) Astrakhan, Ulyanovsk, Volgograd","Europe/Astrakhan"],["(UTC+04:00) Baku","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tbilisi","Asia/Tbilisi"],["(UTC+04:00) Yerevan","Asia/Yerevan"],["(UTC+04:30) Kabul","Asia/Kabul"],["(UTC+05:00) Tashkent, Ashgabat","Asia/Tashkent"],["(UTC+05:00) Ekaterinburg","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karachi","Asia/Karachi"],["(UTC+05:00) Astana","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Kathmandu","Asia/Katmandu"],["(UTC+06:00) Dhaka","Asia/Dhaka"],["(UTC+06:30) Yangon (Rangoon)","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Hanoi, Jakarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaysk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnoyarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Beijing, Chongqing, Hong Kong SAR, \xdcr\xfcmqi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapore","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taipei","Asia/Taipei"],["(UTC+08:00) Ulaanbaatar","Asia/Ulaanbaatar"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokyo","Asia/Tokyo"],["(UTC+09:00) Pyongyang","Asia/Pyongyang"],["(UTC+09:00) Seoul","Asia/Seoul"],["(UTC+09:00) Yakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaide","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, Sydney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) Lord Howe Island","Australia/Lord_Howe"],["(UTC+11:00) Bougainville Island","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magadan","Asia/Magadan"],["(UTC+11:00) Norfolk Island","Pacific/Norfolk"],["(UTC+11:00) Sakhalin","Asia/Sakhalin"],["(UTC+11:00) Solomon Islands, New Caledonia","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Fiji Islands","Pacific/Fiji"],["(UTC+12:45) Chatham Islands","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Kiritimati Island","Pacific/Kiritimati"]],o=[["(UTC-11:00) Isla Midway, Samoa Americana","Pacific/Midway"],["(UTC-10:00) Islas Aleutianas","America/Adak"],["(UTC-10:00) Haw\xe1i","Pacific/Honolulu"],["(UTC-09:30) Islas Marquesas","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Baja California","America/Tijuana"],["(UTC-08:00) Hora del Pac\xedfico (EE.UU. y Canad\xe1)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Hora de las Monta\xf1as Rocosas (EE.UU. y Canad\xe1), Naci\xf3n Navajo","America/Denver"],["(UTC-06:00) Am\xe9rica Central","America/Belize"],["(UTC-06:00) Chihuahua, La Paz, Mazatl\xe1n","America/Chihuahua"],["(UTC-06:00) Hora central (EE.UU. y Canad\xe1)","America/Chicago"],["(UTC-06:00) Isla de Pascua","Pacific/Easter"],["(UTC-06:00) Guadalajara, Ciudad de M\xe9xico, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogot\xe1, Lima, Quito","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Hora del este (EE.UU. y Canad\xe1)","America/New_York"],["(UTC-05:00) Hait\xed","America/Port-au-Prince"],["(UTC-05:00) La Habana","America/Havana"],["(UTC-05:00) Indiana (este)","America/Indiana/Indianapolis"],["(UTC-05:00) Islas Turcas y Caicos","America/Grand_Turk"],["(UTC-04:00) Asunci\xf3n","America/Asuncion"],["(UTC-04:00) Hora del Atl\xe1ntico (Canad\xe1)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiab\xe1","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaos, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-03:30) Terranova","America/St_Johns"],["(UTC-03:00) Aragua\xedna","America/Fortaleza"],["(UTC-03:00) Brasilia","America/Sao_Paulo"],["(UTC-03:00) Cayena, Fortaleza","America/Cayenne"],["(UTC-03:00) Ciudad de Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Groenlandia","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) San Pedro y Miquel\xf3n","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Azores","Atlantic/Azores"],["(UTC-01:00) Islas de Cabo Verde","Atlantic/Cape_Verde"],["(UTC) Dubl\xedn, Edimburgo, Lisboa, Londres","Europe/London"],["(UTC) Monrovia, Reikiavik","Africa/Monrovia"],["(UTC+01:00) \xc1msterdam, Berl\xedn, Berna, Roma, Estocolmo, Viena","Europe/Amsterdam"],["(UTC+01:00) Belgrado, Bratislava, Budapest, Liubliana, Praga","Europe/Belgrade"],["(UTC+01:00) Bruselas, Copenhague, Madrid, Par\xeds","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopie, Varsovia, Zagreb","Europe/Warsaw"],["(UTC+01:00) \xc1frica Central Occidental","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Atenas, Bucarest","Europe/Athens"],["(UTC+02:00) Beirut","Asia/Beirut"],["(UTC+02:00) El Cairo","Africa/Cairo"],["(UTC+02:00) Damasco","Asia/Damascus"],["(UTC+02:00) Gaza, Hebr\xf3n","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kyiv, Riga, Sof\xeda, Tallin, Vilna","Europe/Helsinki"],["(UTC+02:00) Jerusal\xe9n","Asia/Jerusalem"],["(UTC+02:00) Kaliningrado","Europe/Kaliningrad"],["(UTC+02:00) Tr\xedpoli","Africa/Tripoli"],["(UTC+03:00) Amm\xe1n","Asia/Amman"],["(UTC+03:00) Bagdad","Asia/Baghdad"],["(UTC+03:00) Estambul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riad","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Mosc\xfa, San Petersburgo","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) Teher\xe1n","Asia/Tehran"],["(UTC+04:00) Abu Dabi, Mascate","Asia/Muscat"],["(UTC+04:00) Astrac\xe1n, Uli\xe1novsk, Volgogrado","Europe/Astrakhan"],["(UTC+04:00) Bak\xfa","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tiflis","Asia/Tbilisi"],["(UTC+04:00) Erev\xe1n","Asia/Yerevan"],["(UTC+04:30) Kabul","Asia/Kabul"],["(UTC+05:00) Taskent, Asjabad","Asia/Tashkent"],["(UTC+05:00) Ekaterimburgo","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karachi","Asia/Karachi"],["(UTC+05:00) Astan\xe1","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata (Calcuta), Mumbai (Bombay), Nueva Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Katmand\xfa","Asia/Katmandu"],["(UTC+06:00) Dacca","Asia/Dhaka"],["(UTC+06:30) Yang\xf3n (Rang\xfan)","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Han\xf3i, Yakarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaisk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnoiarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Beijing (Pek\xedn), Chongqing, RAE de Hong Kong, Urumqi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapur","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taip\xe9i","Asia/Taipei"],["(UTC+08:00) Ul\xe1n Bator","Asia/Ulaanbaatar"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokio","Asia/Tokyo"],["(UTC+09:00) Pyongyang","Asia/Pyongyang"],["(UTC+09:00) Se\xfal","Asia/Seoul"],["(UTC+09:00) Yakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaida","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, S\xeddney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) Isla Lord Howe","Australia/Lord_Howe"],["(UTC+11:00) Isla Bougainville","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magad\xe1n","Asia/Magadan"],["(UTC+11:00) Isla Norfolk","Pacific/Norfolk"],["(UTC+11:00) Sajal\xedn","Asia/Sakhalin"],["(UTC+11:00) Islas Salom\xf3n, Nueva Caledonia","Pacific/Guadalcanal"],["(UTC+12:00) An\xe1dyr, Petrop\xe1vlovsk-Kamchatski","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Fiyi","Pacific/Fiji"],["(UTC+12:45) Islas Chatham","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Isla Kiritimati","Pacific/Kiritimati"]],s=[["(UTC-11:00) Ilhas Midway, Samoa Americana","Pacific/Midway"],["(UTC-10:00) Ilhas Aleutas","America/Adak"],["(UTC-10:00) Hava\xed","Pacific/Honolulu"],["(UTC-09:30) Ilhas Marquesas","Pacific/Marquesas"],["(UTC-09:00) Alasca","America/Anchorage"],["(UTC-08:00) Baixa California","America/Tijuana"],["(UTC-08:00) Hora do Pac\xedfico (EUA e Canad\xe1)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Hora das Montanhas (EUA e Canad\xe1), Na\xe7\xe3o Navajo","America/Denver"],["(UTC-06:00) Am\xe9rica Central","America/Belize"],["(UTC-06:00) Chihuahua, La Paz, Mazatlan","America/Chihuahua"],["(UTC-06:00) Hora Central (EUA e Canad\xe1)","America/Chicago"],["(UTC-06:00) Ilha da P\xe1scoa","Pacific/Easter"],["(UTC-06:00) Guadalajara, Cidade do M\xe9xico, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogot\xe1, Lima, Quito","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Hora do Leste (EUA e Canad\xe1)","America/New_York"],["(UTC-05:00) Haiti","America/Port-au-Prince"],["(UTC-05:00) Havana","America/Havana"],["(UTC-05:00) Indiana (Leste)","America/Indiana/Indianapolis"],["(UTC-05:00) Turcos e Caicos","America/Grand_Turk"],["(UTC-04:00) Assun\xe7\xe3o","America/Asuncion"],["(UTC-04:00) Hora do Atl\xe2ntico (Canad\xe1)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiab\xe1","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-03:30) Terra Nova","America/St_Johns"],["(UTC-03:00) Aragua\xedna","America/Fortaleza"],["(UTC-03:00) Bras\xedlia","America/Sao_Paulo"],["(UTC-03:00) Cayenne, Fortaleza","America/Cayenne"],["(UTC-03:00) Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Groenl\xe2ndia","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) S\xe3o Pedro e Miquelon","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) A\xe7ores","Atlantic/Azores"],["(UTC-01:00) Ilhas Cabo Verde","Atlantic/Cape_Verde"],["(UTC) Dublin, Edimburgo, Lisboa, Londres","Europe/London"],["(UTC) Monr\xf3via, Reykjavik","Africa/Monrovia"],["(UTC+01:00) Amsterd\xe3, Berlim, Berna, Roma, Estocolmo, Viena","Europe/Amsterdam"],["(UTC+01:00) Belgrado, Bratislava, Budapeste, Liubliana, Praga","Europe/Belgrade"],["(UTC+01:00) Bruxelas, Copenhague, Madri, Paris","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopje, Vars\xf3via, Zagreb","Europe/Warsaw"],["(UTC+01:00) Centro-oeste da \xc1frica","Africa/Algiers"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Atenas, Bucareste","Europe/Athens"],["(UTC+02:00) Beirute","Asia/Beirut"],["(UTC+02:00) Cairo","Africa/Cairo"],["(UTC+02:00) Damasco","Asia/Damascus"],["(UTC+02:00) Gaza, Hebron","Asia/Gaza"],["(UTC+02:00) Harare, Pret\xf3ria","Africa/Harare"],["(UTC+02:00) Helsinque, Kyiv, Riga, Sofia, Tallinn, Vilnius","Europe/Helsinki"],["(UTC+02:00) Jerusal\xe9m","Asia/Jerusalem"],["(UTC+02:00) Kaliningrado","Europe/Kaliningrad"],["(UTC+02:00) Tr\xedpoli","Africa/Tripoli"],["(UTC+03:00) Am\xe3","Asia/Amman"],["(UTC+03:00) Bagd\xe1","Asia/Baghdad"],["(UTC+03:00) Istambul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riad","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Moscou, S\xe3o Petersburgo","Europe/Moscow"],["(UTC+03:00) Nair\xf3bi","Africa/Nairobi"],["(UTC+03:30) Teer\xe3","Asia/Tehran"],["(UTC+04:00) Abu Dhabi, Mascate","Asia/Muscat"],["(UTC+04:00) Astrakhan, Ulyanovsk, Volgogrado","Europe/Astrakhan"],["(UTC+04:00) Baku","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tbilisi","Asia/Tbilisi"],["(UTC+04:00) Ierevan","Asia/Yerevan"],["(UTC+04:30) Cabul","Asia/Kabul"],["(UTC+05:00) Tashkent, Ashgabat","Asia/Tashkent"],["(UTC+05:00) Ecaterimburgo","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Carachi","Asia/Karachi"],["(UTC+05:00) Astana","Asia/Almaty"],["(UTC+05:30) Chennai, Calcut\xe1, Mumbai, Nova D\xe9li","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Catmandu","Asia/Katmandu"],["(UTC+06:00) Dacca","Asia/Dhaka"],["(UTC+06:30) Yangon (Rangoon)","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangcoc, Han\xf3i, Jacarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaysk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnoyarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Pequim, Chongqing, RAE de Hong Kong, Urumqi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Cingapura","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taip\xe9","Asia/Taipei"],["(UTC+08:00) Ulan Bator","Asia/Ulaanbaatar"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, T\xf3quio","Asia/Tokyo"],["(UTC+09:00) Pyongyang","Asia/Pyongyang"],["(UTC+09:00) Seul","Asia/Seoul"],["(UTC+09:00) Yakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaide","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, Sydney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) Ilha Lord Howe","Australia/Lord_Howe"],["(UTC+11:00) Ilha Bougainville","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magad\xe3","Asia/Magadan"],["(UTC+11:00) Ilha Norfolk","Pacific/Norfolk"],["(UTC+11:00) Sakhalin","Asia/Sakhalin"],["(UTC+11:00) Ilhas Salom\xe3o, Nova Caled\xf4nia","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Ilhas Fiji","Pacific/Fiji"],["(UTC+12:45) Ilhas Chatham","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Ilha de Kiritimati","Pacific/Kiritimati"]],c=[["(UTC-11:00) \uBBF8\uB4DC\uC6E8\uC774 \uC81C\uB3C4, \uBBF8\uAD6D\uB839 \uC0AC\uBAA8\uC544","Pacific/Midway"],["(UTC-10:00) \uC54C\uB958\uC0E8 \uC5F4\uB3C4","America/Adak"],["(UTC-10:00) \uD558\uC640\uC774","Pacific/Honolulu"],["(UTC-09:30) \uB9C8\uB974\uD0A4\uC988 \uC81C\uB3C4","Pacific/Marquesas"],["(UTC-09:00) \uC54C\uB798\uC2A4\uCE74","America/Anchorage"],["(UTC-08:00) \uBC14\uD558 \uCE98\uB9AC\uD3EC\uB2C8\uC544","America/Tijuana"],["(UTC-08:00) \uD0DC\uD3C9\uC591 \uD45C\uC900\uC2DC(\uBBF8\uAD6D \uBC0F \uCE90\uB098\uB2E4)","America/Los_Angeles"],["(UTC-07:00) \uC560\uB9AC\uC870\uB098","America/Phoenix"],["(UTC-07:00) \uC0B0\uC9C0 \uD45C\uC900\uC2DC(\uBBF8\uAD6D \uBC0F \uCE90\uB098\uB2E4), \uB098\uBC14\uD638 \uAD6D\uAC00","America/Denver"],["(UTC-06:00) \uC911\uC559 \uC544\uBA54\uB9AC\uCE74","America/Belize"],["(UTC-06:00) \uC911\uBD80 \uD45C\uC900\uC2DC(\uBBF8\uAD6D \uBC0F \uCE90\uB098\uB2E4)","America/Chicago"],["(UTC-06:00) \uCE58\uC640\uC640, \uB77C\uD30C\uC2A4, \uB9C8\uC0AC\uD2C0\uB780","America/Chihuahua"],["(UTC-06:00) \uC774\uC2A4\uD130 \uC12C","Pacific/Easter"],["(UTC-06:00) \uACFC\uB2EC\uB77C\uD558\uB77C, \uBA55\uC2DC\uCF54\uC2DC\uD2F0, \uBAAC\uD14C\uB808\uC774","America/Mexico_City"],["(UTC-06:00) \uC11C\uC2A4\uCE90\uCC98\uC6D0","America/Regina"],["(UTC-05:00) \uBCF4\uACE0\uD0C0, \uB9AC\uB9C8, \uD0A4\uD1A0","America/Bogota"],["(UTC-05:00) \uCCB4\uD22C\uB9D0","America/Cancun"],["(UTC-05:00) \uB3D9\uBD80 \uD45C\uC900\uC2DC(\uBBF8\uAD6D \uBC0F \uCE90\uB098\uB2E4)","America/New_York"],["(UTC-05:00) \uC544\uC774\uD2F0","America/Port-au-Prince"],["(UTC-05:00) \uC544\uBC14\uB098","America/Havana"],["(UTC-05:00) \uC778\uB514\uC560\uB098(\uB3D9\uBD80)","America/Indiana/Indianapolis"],["(UTC-04:00) \uC544\uC21C\uC2DC\uC628","America/Asuncion"],["(UTC-04:00) \uB300\uC11C\uC591 \uD45C\uC900\uC2DC(\uCE90\uB098\uB2E4)","America/Halifax"],["UTC-04:00) \uCE74\uB77C\uCE74\uC2A4","America/Caracas"],["(UTC-04:00) \uCFE0\uC774\uC544\uBC14","America/Cuiaba"],["(UTC-04:00) \uC870\uC9C0\uD0C0\uC6B4, \uB77C\uD30C\uC2A4, \uB9C8\uB178\uC2A4, \uC0B0\uD6C4\uC548","America/Manaus"],["(UTC-04:00) \uC0B0\uD2F0\uC544\uACE0","America/Santiago"],["(UTC-04:00) \uD130\uD06C\uC2A4 \uCF00\uC774\uCEE4\uC2A4","America/Grand_Turk"],["(UTC-03:30) \uB274\uD380\uB4E4\uB79C\uB4DC","America/St_Johns"],["(UTC-03:00) \uC544\uB77C\uAD6C\uC544\uC774\uB098","America/Fortaleza"],["(UTC-03:00) \uBE0C\uB77C\uC9C8\uB9AC\uC544","America/Sao_Paulo"],["(UTC-03:00) \uCE74\uC60C, \uD3EC\uB974\uD0C8\uB808\uC790","America/Cayenne"],["(UTC-03:00) \uBD80\uC5D0\uB178\uC2A4\uC544\uC774\uB808\uC2A4","America/Buenos_Aires"],["(UTC-03:00) \uADF8\uB9B0\uB780\uB4DC","America/Godthab"],["(UTC-03:00) \uBAAC\uD14C\uBE44\uB370\uC624","America/Montevideo"],["(UTC-03:00) \uC0DD\uD53C\uC5D0\uB974 \uBBF8\uD074\uB871","America/Miquelon"],["(UTC-03:00) \uC0B4\uBC14\uB3C4\uB974","America/Bahia"],["(UTC-02:00) \uD398\uB974\uB09C\uB3C4\uB370\uB178\uB85C\uB0D0","America/Noronha"],["(UTC-01:00) \uC544\uC870\uB808\uC2A4","Atlantic/Azores"],["(UTC-01:00) \uCE74\uBCF4\uBCA0\uB974\uB370 \uC81C\uB3C4","Atlantic/Cape_Verde"],["(UTC+01:00) \uCE74\uC0AC\uBE14\uB791\uCE74","Africa/Casablanca"],["(UTC) \uB354\uBE14\uB9B0, \uC5D0\uB4E0\uBC84\uB7EC, \uB9AC\uC2A4\uBCF8, \uB7F0\uB358","Europe/London"],["(UTC) \uBAAC\uB85C\uBE44\uC544, \uB808\uC774\uCEAC\uBE44\uD06C","Africa/Monrovia"],["(UTC+01:00) \uC554\uC2A4\uD14C\uB974\uB2F4, \uBCA0\uB97C\uB9B0, \uBCA0\uB978, \uB85C\uB9C8, \uC2A4\uD1A1\uD640\uB984, \uBE48","Europe/Amsterdam"],["(UTC+01:00) \uBCA0\uC624\uADF8\uB77C\uB4DC, \uBE0C\uB77C\uD2F0\uC2AC\uB77C\uBC14, \uBD80\uB2E4\uD398\uC2A4\uD2B8, \uB958\uBE14\uB7B4\uB098, \uD504\uB77C\uD558","Europe/Belgrade"],["(UTC+01:00) \uBE0C\uB93C\uC140, \uCF54\uD39C\uD558\uAC90, \uB9C8\uB4DC\uB9AC\uB4DC, \uD30C\uB9AC","Europe/Brussels"],["(UTC+01:00) \uC0AC\uB77C\uC608\uBCF4, \uC2A4\uCF54\uD398, \uBC14\uB974\uC0E4\uBC14, \uC790\uADF8\uB808\uBE0C","Europe/Warsaw"],["(UTC+01:00) \uC11C\uC911\uC559 \uC544\uD504\uB9AC\uCE74","Africa/Algiers"],["(UTC+01:00) \uBE48\uD2B8\uD6C4\uD06C","Africa/Windhoek"],["(UTC+02:00) \uC544\uD14C\uB124, \uBD80\uCFE0\uB808\uC288\uD2F0","Europe/Athens"],["(UTC+02:00) \uBCA0\uC774\uB8E8\uD2B8","Asia/Beirut"],["(UTC+02:00) \uCE74\uC774\uB85C","Africa/Cairo"],["(UTC+02:00) \uB2E4\uB9C8\uC2A4\uCFE0\uC2A4","Asia/Damascus"],["(UTC+02:00) \uAC00\uC790, \uD5E4\uBE0C\uB860","Asia/Gaza"],["(UTC+02:00) \uD558\uB77C\uB808, \uD504\uB9AC\uD1A0\uB9AC\uC544","Africa/Harare"],["(UTC+02:00) \uD5EC\uC2F1\uD0A4, \uD0A4\uC608\uD504, \uB9AC\uAC00, \uC18C\uD53C\uC544, \uD0C8\uB9B0, \uBE4C\uB274\uC2A4","Europe/Helsinki"],["(UTC+02:00) \uC608\uB8E8\uC0B4\uB818","Asia/Jerusalem"],["(UTC+02:00) \uCE7C\uB9AC\uB2CC\uADF8\uB77C\uB4DC","Europe/Kaliningrad"],["(UTC+02:00) \uD2B8\uB9AC\uD3F4\uB9AC","Africa/Tripoli"],["(UTC+03:00) \uC554\uB9CC","Asia/Amman"],["(UTC+03:00) \uBC14\uADF8\uB2E4\uB4DC","Asia/Baghdad"],["(UTC+03:00) \uC774\uC2A4\uD0C4\uBD88","Asia/Istanbul"],["(UTC+03:00) \uCFE0\uC6E8\uC774\uD2B8, \uB9AC\uC57C\uB4DC","Asia/Kuwait"],["(UTC+03:00) \uBBFC\uC2A4\uD06C","Europe/Minsk"],["(UTC+03:00) \uBAA8\uC2A4\uD06C\uBC14, \uC0C1\uD2B8\uD398\uD14C\uB974\uBD80\uB974\uD06C","Europe/Moscow"],["(UTC+03:00) \uB098\uC774\uB85C\uBE44","Africa/Nairobi"],["(UTC+03:30) \uD14C\uD5E4\uB780","Asia/Tehran"],["(UTC+04:00) \uC544\uBD80\uB2E4\uBE44, \uBB34\uC2A4\uCE74\uD2B8","Asia/Muscat"],["(UTC+04:00) \uC544\uC2A4\uD2B8\uB77C\uD55C, \uC6B8\uB7B4\uB178\uBE0C\uC2A4\uD06C, \uBCFC\uACE0\uADF8\uB77C\uB4DC","Europe/Astrakhan"],["(UTC+04:00) \uBC14\uCFE0","Asia/Baku"],["(UTC+04:00) \uC774\uC81C\uD504\uC2A4\uD06C, \uC0AC\uB9C8\uB77C","Europe/Samara"],["(UTC+04:00) \uD3EC\uD2B8\uB8E8\uC774\uC2A4","Indian/Mauritius"],["(UTC+04:00) \uD2B8\uBE4C\uB9AC\uC2DC","Asia/Tbilisi"],["(UTC+04:00) \uC608\uB808\uBC18","Asia/Yerevan"],["(UTC+04:30) \uCE74\uBD88","Asia/Kabul"],["(UTC+05:00) \uD0C0\uC288\uCF04\uD2B8, \uC544\uC288\uAC00\uBC14\uD2B8","Asia/Tashkent"],["(UTC+05:00) \uC608\uCE74\uD14C\uB9B0\uBD80\uB974\uD06C","Asia/Yekaterinburg"],["(UTC+05:00) \uC774\uC2AC\uB77C\uB9C8\uBC14\uB4DC, \uCE74\uB77C\uCE58","Asia/Karachi"],["(UTC+05:00) \uC544\uC2A4\uD0C0\uB098","Asia/Almaty"],["(UTC+05:30) \uCCB8\uB098\uC774, \uCF5C\uCE74\uD0C0, \uBB44\uBC14\uC774, \uB274\uB378\uB9AC","Asia/Kolkata"],["(UTC+05:30) \uC2A4\uB9AC\uC790\uC57C\uC640\uB974\uB370\uB124\uD478\uB77C\uCF54\uD14C","Asia/Colombo"],["(UTC+05:45) \uCE74\uD2B8\uB9CC\uB450","Asia/Katmandu"],["(UTC+06:00) \uB2E4\uCE74","Asia/Dhaka"],["(UTC+06:30) \uC591\uACE4(\uB791\uAD70)","Asia/Rangoon"],["(UTC+07:00) \uB178\uBCF4\uC2DC\uBE44\uB974\uC2A4\uD06C","Asia/Novosibirsk"],["(UTC+07:00) \uBC29\uCF55, \uD558\uB178\uC774, \uC790\uCE74\uB974\uD0C0","Asia/Bangkok"],["(UTC+07:00) \uBC14\uB974\uB098\uC6B8, \uACE0\uB974\uB178\uC54C\uD0C0\uC774\uC2A4\uD06C","Asia/Barnaul"],["(UTC+07:00) \uD638\uBE0C\uB4DC","Asia/Hovd"],["(UTC+07:00) \uD06C\uB77C\uC2A4\uB178\uC57C\uB974\uC2A4\uD06C","Asia/Krasnoyarsk"],["(UTC+07:00) \uD1B0\uC2A4\uD06C","Asia/Tomsk"],["(UTC+08:00) \uBCA0\uC774\uC9D5, \uCDA9\uCE6D, \uD64D\uCF69 \uD2B9\uBCC4 \uD589\uC815\uAD6C, \uC6B0\uB8E8\uBB34\uCE58","Asia/Chongqing"],["(UTC+08:00) \uC774\uB974\uCFE0\uCE20\uD06C","Asia/Irkutsk"],["(UTC+08:00) \uCFE0\uC54C\uB77C\uB8F8\uD478\uB974, \uC2F1\uAC00\uD3EC\uB974","Asia/Kuala_Lumpur"],["(UTC+08:00) \uD37C\uC2A4","Australia/Perth"],["(UTC+08:00) \uD0C0\uC774\uBCA0\uC774","Asia/Taipei"],["(UTC+08:00) \uC6B8\uB780\uBC14\uD1A0\uB974","Asia/Ulaanbaatar"],["(UTC+08:30) \uD3C9\uC591","Asia/Pyongyang"],["(UTC+08:45) \uC720\uD074\uB77C","Australia/Eucla"],["(UTC+09:00) \uCE58\uD0C0","Asia/Chita"],["(UTC+09:00) \u200E\uC624\uC0AC\uCE74, \uC0BF\uD3EC\uB85C, \uB3C4\uCFC4","Asia/Tokyo"],["(UTC+09:00) \uC11C\uC6B8","Asia/Seoul"],["(UTC+09:00) \uC57C\uCFE0\uCE20\uD06C","Asia/Yakutsk"],["(UTC+09:30) \uC560\uB4E4\uB808\uC774\uB4DC","Australia/Adelaide"],["(UTC+09:30) \uB2E4\uC708","Australia/Darwin"],["(UTC+10:00) \uBE0C\uB9AC\uC988\uBC88","Australia/Brisbane"],["(UTC+10:00) \u200E\uCE94\uBC84\uB77C, \uBA5C\uBC84\uB978, \uC2DC\uB4DC\uB2C8","Australia/Canberra"],["(UTC+10:00) \uAD0C, \uD3EC\uD2B8\uBAA8\uB974\uC988\uBE44","Pacific/Guam"],["(UTC+10:00) \uD638\uBC14\uD2B8","Australia/Hobart"],["UTC+10:00) \uBE14\uB77C\uB514\uBCF4\uC2A4\uD1A0\uD06C","Asia/Vladivostok"],["(UTC+10:30) \uB85C\uB4DC\uD558\uC6B0 \uC12C","Australia/Lord_Howe"],["(UTC+11:00) \uBD80\uAC74\uBE4C \uC12C","Pacific/Bougainville"],["(UTC+11:00) \uCD08\uCFE0\uB974\uB2E4\uD06C","Asia/Srednekolymsk"],["(UTC+11:00) \uB9C8\uAC00\uB2E8","Asia/Magadan"],["(UTC+11:00) \u200E\uB178\uD37D \uC12C","Pacific/Norfolk"],["(UTC+11:00) \uC0AC\uD560\uB9B0\u200E","Asia/Sakhalin"],["(UTC+11:00) \uC194\uB85C\uBAAC \uC81C\uB3C4, \uB274\uCE7C\uB808\uB3C4\uB2C8\uC544","Pacific/Guadalcanal"],["(UTC+12:00) \uC544\uB098\uB514\uB9AC, \uD398\uD2B8\uB85C\uD30C\uBE14\uB85C\uD504\uC2A4\uD06C-\uCE84\uCC28\uC2A4\uD0A4","Asia/Anadyr"],["(UTC+12:00) \u200E\uC624\uD074\uB79C\uB4DC, \uC6F0\uB9C1\uD134","Pacific/Auckland"],["(UTC+12:00) \uD53C\uC9C0 \uC81C\uB3C4","Pacific/Fiji"],["(UTC+12:45) \uCC44\uD140 \uC12C","Pacific/Chatham"],["(UTC+13:00) \uB204\uCFE0\uC54C\uB85C\uD30C","Pacific/Tongatapu"],["(UTC+13:00) \uC0AC\uBAA8\uC544","Pacific/Apia"],["(UTC+14:00) \uD0A4\uB9AC\uD2F0\uB9C8\uD2F0 \uC12C","Pacific/Kiritimati"]],d=[["(UTC-11:00) Atollo di Midway, Samoa americane","Pacific/Midway"],["(UTC-10:00) Isole Aleutine","America/Adak"],["(UTC-10:00) Hawaii","Pacific/Honolulu"],["(UTC-09:30) Isole Marchesi","Pacific/Marquesas"],["(UTC-09:00) Alaska","America/Anchorage"],["(UTC-08:00) Bassa California","America/Tijuana"],["(UTC-08:00) Fuso orario del Pacifico (Stati Uniti e Canada)","America/Los_Angeles"],["(UTC-07:00) Arizona","America/Phoenix"],["(UTC-07:00) Fuso occidentale (Stati Uniti e Canada), Riserva Navajo","America/Denver"],["(UTC-06:00) America centrale","America/Belize"],["(UTC-06:00) Chihuahua, La Paz, Mazatlan","America/Chihuahua"],["(UTC-06:00) Fuso centrale (Stati Uniti e Canada)","America/Chicago"],["(UTC-06:00) Isola di Pasqua","Pacific/Easter"],["(UTC-06:00) Guadalajara, Citt\xe0 del Messico, Monterrey","America/Mexico_City"],["(UTC-06:00) Saskatchewan","America/Regina"],["(UTC-05:00) Bogota, Lima, Quito","America/Bogota"],["(UTC-05:00) Chetumal","America/Cancun"],["(UTC-05:00) Fuso orientale (Stati Uniti e Canada)","America/New_York"],["(UTC-05:00) Haiti","America/Port-au-Prince"],["(UTC-05:00) Havana","America/Havana"],["(UTC-05:00) Indiana (Est)","America/Indiana/Indianapolis"],["(UTC-04:00) Asunci\xf3n","America/Asuncion"],["(UTC-04:00) Fuso orario dell\u2019Atlantico (Canada)","America/Halifax"],["(UTC-04:00) Caracas","America/Caracas"],["(UTC-04:00) Cuiaba","America/Cuiaba"],["(UTC-04:00) Georgetown, La Paz, Manaus, San Juan","America/Manaus"],["(UTC-04:00) Santiago","America/Santiago"],["(UTC-04:00) Isole Turks e Caicos","America/Grand_Turk"],["(UTC-03:30) Terranova","America/St_Johns"],["(UTC-03:00) Araguaina","America/Fortaleza"],["(UTC-03:00) Brasilia","America/Sao_Paulo"],["(UTC-03:00) Cayenne, Fortaleza","America/Cayenne"],["(UTC-03:00) Buenos Aires","America/Buenos_Aires"],["(UTC-03:00) Groenlandia","America/Godthab"],["(UTC-03:00) Montevideo","America/Montevideo"],["(UTC-03:00) Saint Pierre e Miquelon","America/Miquelon"],["(UTC-03:00) Salvador","America/Bahia"],["(UTC-02:00) Fernando de Noronha","America/Noronha"],["(UTC-01:00) Azzorre","Atlantic/Azores"],["(UTC-01:00) Isole di Capo Verde","Atlantic/Cape_Verde"],["(UTC+01:00) Casablanca","Africa/Casablanca"],["(UTC) Dublino, Edimburgo, Lisbona, Londra","Europe/London"],["(UTC) Monrovia, Reykjavik","Africa/Monrovia"],["(UTC+01:00) Amsterdam, Berlino, Berna, Roma, Stoccolma, Vienna","Europe/Amsterdam"],["(UTC+01:00) Belgrado, Bratislava, Budapest, Lubiana, Praga","Europe/Belgrade"],["(UTC+01:00) Bruxelles, Copenhagen, Madrid, Parigi","Europe/Brussels"],["(UTC+01:00) Sarajevo, Skopje, Varsavia, Zagabria","Europe/Warsaw"],["(UTC+01:00) Africa centro-occidentale","Africa/Algiers"],["(UTC+01:00) Windhoek","Africa/Windhoek"],["(UTC+02:00) Atene, Bucarest","Europe/Athens"],["(UTC+02:00) Beirut","Asia/Beirut"],["(UTC+02:00) Il Cairo","Africa/Cairo"],["(UTC+02:00) Damasco","Asia/Damascus"],["(UTC+02:00) Gaza, Hebron","Asia/Gaza"],["(UTC+02:00) Harare, Pretoria","Africa/Harare"],["(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius","Europe/Helsinki"],["(UTC+02:00) Gerusalemme","Asia/Jerusalem"],["(UTC+02:00) Kaliningrad","Europe/Kaliningrad"],["(UTC+02:00) Tripoli","Africa/Tripoli"],["(UTC+03:00) Amman","Asia/Amman"],["(UTC+03:00) Baghdad","Asia/Baghdad"],["(UTC+03:00) Istanbul","Asia/Istanbul"],["(UTC+03:00) Kuwait, Riyadh","Asia/Kuwait"],["(UTC+03:00) Minsk","Europe/Minsk"],["(UTC+03:00) Mosca, San Pietroburgo","Europe/Moscow"],["(UTC+03:00) Nairobi","Africa/Nairobi"],["(UTC+03:30) Tehran","Asia/Tehran"],["(UTC+04:00) Abu Dhabi, Muscat","Asia/Muscat"],["(UTC+04:00) Astrakhan, Ulyanovsk, Volgograd","Europe/Astrakhan"],["(UTC+04:00) Baku","Asia/Baku"],["(UTC+04:00) Izhevsk, Samara","Europe/Samara"],["(UTC+04:00) Port Louis","Indian/Mauritius"],["(UTC+04:00) Tbilisi","Asia/Tbilisi"],["(UTC+04:00) Yerevan","Asia/Yerevan"],["(UTC+04:30) Kabul","Asia/Kabul"],["(UTC+05:00) Tashkent, Ashgabat","Asia/Tashkent"],["(UTC+05:00) Ekaterinburg","Asia/Yekaterinburg"],["(UTC+05:00) Islamabad, Karachi","Asia/Karachi"],["(UTC+05:00) Astana","Asia/Almaty"],["(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi","Asia/Kolkata"],["(UTC+05:30) Sri Jayawardenepura","Asia/Colombo"],["(UTC+05:45) Kathmandu","Asia/Katmandu"],["(UTC+06:00) Dhaka","Asia/Dhaka"],["(UTC+06:30) Yangon (Rangoon)","Asia/Rangoon"],["(UTC+07:00) Novosibirsk","Asia/Novosibirsk"],["(UTC+07:00) Bangkok, Hanoi, Jakarta","Asia/Bangkok"],["(UTC+07:00) Barnaul, Gorno-Altaysk","Asia/Barnaul"],["(UTC+07:00) Hovd","Asia/Hovd"],["(UTC+07:00) Krasnoyarsk","Asia/Krasnoyarsk"],["(UTC+07:00) Tomsk","Asia/Tomsk"],["(UTC+08:00) Pechino, Chongqing, Hong Kong, Urumqi","Asia/Chongqing"],["(UTC+08:00) Irkutsk","Asia/Irkutsk"],["(UTC+08:00) Kuala Lumpur, Singapore","Asia/Kuala_Lumpur"],["(UTC+08:00) Perth","Australia/Perth"],["(UTC+08:00) Taipei","Asia/Taipei"],["(UTC+08:00) Ulaanbaatar","Asia/Ulaanbaatar"],["(UTC+08:30) Pyongyang","Asia/Pyongyang"],["(UTC+08:45) Eucla","Australia/Eucla"],["(UTC+09:00) Chita","Asia/Chita"],["(UTC+09:00) Osaka, Sapporo, Tokyo","Asia/Tokyo"],["(UTC+09:00) Seul","Asia/Seoul"],["(UTC+09:00) Yakutsk","Asia/Yakutsk"],["(UTC+09:30) Adelaide","Australia/Adelaide"],["(UTC+09:30) Darwin","Australia/Darwin"],["(UTC+10:00) Brisbane","Australia/Brisbane"],["(UTC+10:00) Canberra, Melbourne, Sydney","Australia/Canberra"],["(UTC+10:00) Guam, Port Moresby","Pacific/Guam"],["(UTC+10:00) Hobart","Australia/Hobart"],["(UTC+10:00) Vladivostok","Asia/Vladivostok"],["(UTC+10:30) Isola di Lord Howe","Australia/Lord_Howe"],["(UTC+11:00) Isola di Bougainville","Pacific/Bougainville"],["(UTC+11:00) Chokurdakh","Asia/Srednekolymsk"],["(UTC+11:00) Magadan","Asia/Magadan"],["(UTC+11:00) Isola Norfolk","Pacific/Norfolk"],["(UTC+11:00) Sakhalin","Asia/Sakhalin"],["(UTC+11:00) Isole Salomone, Nuova Caledonia","Pacific/Guadalcanal"],["(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky","Asia/Anadyr"],["(UTC+12:00) Auckland, Wellington","Pacific/Auckland"],["(UTC+12:00) Isole Figi","Pacific/Fiji"],["(UTC+12:45) Isole Chatham","Pacific/Chatham"],["(UTC+13:00) Nuku'alofa","Pacific/Tongatapu"],["(UTC+13:00) Samoa","Pacific/Apia"],["(UTC+14:00) Isola Christmas","Pacific/Kiritimati"]],m=[["(UTC-11:00) \u7F8E\u5C5E\u8428\u6469\u4E9A\u4E2D\u9014\u5C9B","Pacific/Midway"],["(UTC-10:00) \u963F\u7559\u7533\u7FA4\u5C9B","America/Adak"],["(UTC-10:00) \u590F\u5A01\u5937\u5DDE","Pacific/Honolulu"],["(UTC-09:30) \u9A6C\u514B\u8428\u65AF\u7FA4\u5C9B","Pacific/Marquesas"],["(UTC-09:00) \u963F\u62C9\u65AF\u52A0\u5DDE","America/Anchorage"],["(UTC-08:00) \u4E0B\u52A0\u5229\u798F\u5C3C\u4E9A\u5DDE","America/Tijuana"],["(UTC-08:00) \u592A\u5E73\u6D0B\u65F6\u95F4\uFF08\u7F8E\u56FD\u548C\u52A0\u62FF\u5927\uFF09","America/Los_Angeles"],["(UTC-07:00) \u4E9A\u5229\u6851\u90A3\u5DDE","America/Phoenix"],["(UTC-07:00) \u5317\u7F8E\u5C71\u5730\u65F6\u95F4\uFF08\u7F8E\u56FD\u548C\u52A0\u62FF\u5927\uFF09\u3001\u7EB3\u74E6\u970D\u65CF\u4FDD\u7559\u5730","America/Denver"],["(UTC-06:00) \u4E2D\u7F8E\u6D32","America/Belize"],["(UTC-06:00) \u4E2D\u90E8\u65F6\u95F4\uFF08\u7F8E\u56FD\u548C\u52A0\u62FF\u5927\uFF09","America/Chicago"],["(UTC-06:00) \u5947\u74E6\u74E6\u5DDE\u3001\u62C9\u5DF4\u65AF\u3001\u9A6C\u8428\u7279\u5170","America/Chihuahua"],["(UTC-06:00) \u590D\u6D3B\u8282\u5C9B","Pacific/Easter"],["(UTC-06:00) \u74DC\u8FBE\u62C9\u54C8\u62C9\u3001\u58A8\u897F\u54E5\u57CE\u3001\u8499\u7279\u96F7","America/Mexico_City"],["(UTC-06:00) \u8428\u65AF\u5580\u5F7B\u6E29\u7701","America/Regina"],["(UTC-05:00) \u6CE2\u54E5\u5927\u3001\u5229\u9A6C\u3001\u57FA\u591A","America/Bogota"],["(UTC-05:00) \u5207\u56FE\u9A6C\u5C14","America/Cancun"],["(UTC-05:00) \u4E1C\u90E8\u65F6\u95F4\uFF08\u7F8E\u56FD\u548C\u52A0\u62FF\u5927\uFF09","America/New_York"],["(UTC-05:00) \u6D77\u5730","America/Port-au-Prince"],["(UTC-05:00) \u54C8\u74E6\u90A3","America/Havana"],["(UTC-05:00) \u5370\u7B2C\u5B89\u7EB3\u5DDE\uFF08\u4E1C\u90E8\uFF09","America/Indiana/Indianapolis"],["(UTC-04:00) \u4E9A\u677E\u68EE","America/Asuncion"],["(UTC-04:00) \u5927\u897F\u6D0B\u65F6\u95F4\uFF08\u52A0\u62FF\u5927\uFF09","America/Halifax"],["(UTC-04:00) \u52A0\u62C9\u52A0\u65AF","America/Caracas"],["(UTC-04:00) \u5E93\u4E9A\u5DF4","America/Cuiaba"],["(UTC-04:00) \u4E54\u6CBB\u6566\u3001\u62C9\u5DF4\u65AF\u3001\u739B\u7459\u65AF\u3001\u5723\u80E1\u5B89","America/Manaus"],["(UTC-04:00) \u5723\u5730\u4E9A\u54E5","America/Santiago"],["(UTC-04:00) \u7279\u514B\u65AF\u548C\u51EF\u79D1\u65AF\u7FA4\u5C9B","America/Grand_Turk"],["(UTC-03:30) \u7EBD\u82AC\u5170","America/St_Johns"],["(UTC-03:00) \u963F\u62C9\u74DC\u4F0A\u7EB3","America/Fortaleza"],["(UTC-03:00) \u5DF4\u897F\u5229\u4E9A","America/Sao_Paulo"],["(UTC-03:00) \u5361\u5BB4\u3001\u798F\u5854\u83B1\u8428","America/Cayenne"],["(UTC-03:00) \u5E03\u5B9C\u8BFA\u65AF\u827E\u5229\u65AF\u5E02","America/Buenos_Aires"],["(UTC-03:00) \u683C\u9675\u5170\u5C9B","America/Godthab"],["(UTC-03:00) \u8499\u5F97\u7EF4\u7684\u4E9A","America/Montevideo"],["(UTC-03:00) \u5723\u76AE\u57C3\u5C14\u5C9B\u548C\u5BC6\u514B\u9686\u5C9B","America/Miquelon"],["(UTC-03:00) \u8428\u5C14\u74E6\u591A","America/Bahia"],["(UTC-02:00) \u8D39\u5C14\u5357\u591A-\u8FEA\u8BFA\u7F57\u5C3C\u4E9A","America/Noronha"],["(UTC-01:00) \u4E9A\u901F\u5C14\u7FA4\u5C9B","Atlantic/Azores"],["(UTC-01:00) \u4F5B\u5F97\u89D2\u7FA4\u5C9B","Atlantic/Cape_Verde"],["(UTC+01:00) \u5361\u8428\u5E03\u5170\u5361","Africa/Casablanca"],["(UTC) \u90FD\u67CF\u6797\u3001\u7231\u4E01\u5821\u3001\u91CC\u65AF\u672C\u3001\u4F26\u6566","Europe/London"],["(UTC) \u8499\u7F57\u7EF4\u4E9A\u3001\u96F7\u514B\u96C5\u672A\u514B","Africa/Monrovia"],["(UTC+01:00) \u963F\u59C6\u65AF\u7279\u4E39\u3001\u67CF\u6797\u3001\u4F2F\u5C14\u5C3C\u3001\u7F57\u9A6C\u3001\u65AF\u5FB7\u54E5\u5C14\u6469\u3001\u7EF4\u4E5F\u7EB3","Europe/Amsterdam"],["(UTC+01:00) \u8D1D\u5C14\u683C\u83B1\u5FB7\u3001\u5E03\u62C9\u8FEA\u65AF\u62C9\u53D1\u3001\u5E03\u8FBE\u4F69\u65AF\u3001\u5362\u5E03\u5C14\u96C5\u90A3\u3001\u5E03\u62C9\u683C","Europe/Belgrade"],["(UTC+01:00) \u5E03\u9C81\u585E\u5C14\u3001\u54E5\u672C\u54C8\u6839\u3001\u9A6C\u5FB7\u91CC\u3001\u5DF4\u9ECE","Europe/Brussels"],["(UTC+01:00) \u8428\u62C9\u70ED\u7A9D\u3001\u65AF\u79D1\u666E\u91CC\u3001\u534E\u6C99\u3001\u8428\u683C\u52D2\u5E03","Europe/Warsaw"],["(UTC+01:00) \u975E\u6D32\u4E2D\u897F\u90E8","Africa/Algiers"],["(UTC+01:00) \u6E29\u5F97\u548C\u514B","Africa/Windhoek"],["(UTC+02:00) \u96C5\u5178\u3001\u5E03\u52A0\u52D2\u65AF\u7279","Europe/Athens"],["(UTC+02:00) \u8D1D\u9C81\u7279","Asia/Beirut"],["(UTC+02:00) \u5F00\u7F57","Africa/Cairo"],["(UTC+02:00) \u5927\u9A6C\u58EB\u9769","Asia/Damascus"],["(UTC+02:00) \u52A0\u6C99\u3001\u5E0C\u4F2F\u4ED1","Asia/Gaza"],["(UTC+02:00) \u54C8\u62C9\u96F7\u3001\u6BD4\u52D2\u9640\u5229\u4E9A","Africa/Harare"],["(UTC+02:00) \u8D6B\u5C14\u8F9B\u57FA\u3001\u57FA\u8F85\u3001\u91CC\u52A0\u3001\u7D22\u975E\u4E9A\u3001\u5854\u6797\u3001\u7EF4\u5C14\u7EBD\u65AF","Europe/Helsinki"],["(UTC+02:00) \u8036\u8DEF\u6492\u51B7","Asia/Jerusalem"],["(UTC+02:00) \u52A0\u91CC\u5B81\u683C\u52D2","Europe/Kaliningrad"],["(UTC+02:00) \u7684\u9ECE\u6CE2\u91CC","Africa/Tripoli"],["(UTC+03:00) \u5B89\u66FC","Asia/Amman"],["(UTC+03:00) \u5DF4\u683C\u8FBE","Asia/Baghdad"],["(UTC+03:00) \u4F0A\u65AF\u5766\u5E03\u5C14","Asia/Istanbul"],["(UTC+03:00) \u79D1\u5A01\u7279\u3001\u5229\u96C5\u5F97","Asia/Kuwait"],["(UTC+03:00) \u660E\u65AF\u514B","Europe/Minsk"],["(UTC+03:00) \u83AB\u65AF\u79D1\u3001\u5723\u5F7C\u5F97\u5821","Europe/Moscow"],["(UTC+03:00) \u5185\u7F57\u6BD5","Africa/Nairobi"],["(UTC+03:30) \u5FB7\u9ED1\u5170","Asia/Tehran"],["(UTC+04:00) \u963F\u5E03\u624E\u6BD4\u3001\u9A6C\u65AF\u5580\u7279","Asia/Muscat"],["(UTC+04:00) \u963F\u65AF\u7279\u62C9\u7F55\u3001\u4E4C\u91CC\u626C\u8BFA\u592B\u65AF\u514B\u3001\u4F0F\u5C14\u52A0\u683C\u52D2","Europe/Astrakhan"],["(UTC+04:00) \u5DF4\u5E93","Asia/Baku"],["(UTC+04:00) \u4F0A\u70ED\u592B\u65AF\u514B\u3001\u8428\u9A6C\u62C9","Europe/Samara"],["(UTC+04:00) \u8DEF\u6613\u6E2F","Indian/Mauritius"],["(UTC+04:00) \u7B2C\u6BD4\u5229\u65AF","Asia/Tbilisi"],["(UTC+04:00) \u57C3\u91CC\u6E29","Asia/Yerevan"],["(UTC+04:30) \u5580\u5E03\u5C14","Asia/Kabul"],["(UTC+05:00) \u5854\u4EC0\u5E72\u3001\u963F\u4EC0\u54C8\u5DF4\u5FB7","Asia/Tashkent"],["(UTC+05:00) \u53F6\u5361\u6377\u7433\u5821","Asia/Yekaterinburg"],["(UTC+05:00) \u4F0A\u65AF\u5170\u5821\u3001\u5361\u62C9\u5947","Asia/Karachi"],["(UTC+05:00) \u963F\u65AF\u5854\u7EB3","Asia/Almaty"],["(UTC+05:30) \u91D1\u5948\u3001\u52A0\u5C14\u5404\u7B54\u3001\u5B5F\u4E70\u3001\u65B0\u5FB7\u91CC","Asia/Kolkata"],["(UTC+05:30) \u65AF\u91CC\u8D3E\u4E9A\u74E6\u5FB7\u7EB3\u666E\u62C9","Asia/Colombo"],["(UTC+05:45) \u52A0\u5FB7\u6EE1\u90FD","Asia/Katmandu"],["(UTC+06:00) \u8FBE\u5361","Asia/Dhaka"],["(UTC+06:30) \u4EF0\u5149","Asia/Rangoon"],["(UTC+07:00) \u65B0\u897F\u4F2F\u5229\u4E9A","Asia/Novosibirsk"],["(UTC+07:00) \u66FC\u8C37\u3001\u6CB3\u5185\u3001\u96C5\u52A0\u8FBE","Asia/Bangkok"],["(UTC+07:00) \u5DF4\u5C14\u7459\u5C14\u3001\u6208\u5C14\u8BFA-\u963F\u5C14\u6CF0\u65AF\u514B","Asia/Barnaul"],["(UTC+07:00) \u79D1\u5E03\u591A","Asia/Hovd"],["(UTC+07:00) \u514B\u62C9\u65AF\u8BFA\u4E9A\u5C14\u65AF\u514B","Asia/Krasnoyarsk"],["(UTC+07:00) \u6258\u6728\u65AF\u514B","Asia/Tomsk"],["(UTC+08:00) \u5317\u4EAC\u3001\u91CD\u5E86\u3001\u9999\u6E2F\u7279\u522B\u884C\u653F\u533A\u3001\u4E4C\u9C81\u6728\u9F50","Asia/Chongqing"],["(UTC+08:00) \u4F0A\u5C14\u5E93\u8328\u514B","Asia/Irkutsk"],["(UTC+08:00) \u5409\u9686\u5761\u3001\u65B0\u52A0\u5761","Asia/Kuala_Lumpur"],["(UTC+08:00) \u73C0\u65AF","Australia/Perth"],["(UTC+08:00) \u53F0\u5317","Asia/Taipei"],["(UTC+08:00) \u4E4C\u5170\u5DF4\u6258","Asia/Ulaanbaatar"],["(UTC+08:30) \u5E73\u58E4","Asia/Pyongyang"],["(UTC+08:45) \u5C24\u514B\u62C9","Australia/Eucla"],["(UTC+09:00) \u8D64\u5854","Asia/Chita"],["(UTC+09:00) \u5927\u962A\u3001\u672D\u5E4C\u3001\u4E1C\u4EAC","Asia/Tokyo"],["(UTC+09:00) \u9996\u5C14","Asia/Seoul"],["(UTC+09:00) \u96C5\u5E93\u8328\u514B","Asia/Yakutsk"],["(UTC+09:30) \u963F\u5FB7\u83B1\u5FB7","Australia/Adelaide"],["(UTC+09:30) \u8FBE\u5C14\u6587","Australia/Darwin"],["(UTC+10:00) \u5E03\u91CC\u65AF\u73ED","Australia/Brisbane"],["(UTC+10:00) \u582A\u57F9\u62C9\u3001\u58A8\u5C14\u672C\u3001\u6089\u5C3C","Australia/Canberra"],["(UTC+10:00) \u5173\u5C9B\u3001\u83AB\u5C14\u5179\u6BD4\u6E2F","Pacific/Guam"],["(UTC+10:00) \u970D\u5DF4\u7279","Australia/Hobart"],["(UTC+10:00) \u7B26\u62C9\u8FEA\u6C83\u65AF\u6258\u514B","Asia/Vladivostok"],["(UTC+10:30) \u8C6A\u52CB\u7235\u5C9B","Australia/Lord_Howe"],["(UTC+11:00) \u5E03\u5E72\u7EF4\u5C14\u5C9B","Pacific/Bougainville"],["(UTC+11:00) \u4E54\u5E93\u5C14\u8FBE\u8D6B","Asia/Srednekolymsk"],["(UTC+11:00) \u9A6C\u52A0\u4E39","Asia/Magadan"],["(UTC+11:00) \u8BFA\u798F\u514B\u5C9B","Pacific/Norfolk"],["(UTC+11:00) \u5E93\u9875\u5C9B","Asia/Sakhalin"],["(UTC+11:00) \u6240\u7F57\u95E8\u7FA4\u5C9B\u3001\u65B0\u5580\u91CC\u591A\u5C3C\u4E9A","Pacific/Guadalcanal"],["(UTC+12:00) \u963F\u7EB3\u5FB7\u5C14\u3001\u582A\u5BDF\u52A0\u5F7C\u5F97\u7F57\u5DF4\u752B\u6D1B\u592B\u65AF\u514B","Asia/Anadyr"],["(UTC+12:00) \u5965\u514B\u5170\u3001\u60E0\u7075\u987F","Pacific/Auckland"],["(UTC+12:00) \u6590\u6D4E\u7FA4\u5C9B","Pacific/Fiji"],["(UTC+12:45) \u67E5\u5854\u59C6\u7FA4\u5C9B","Pacific/Chatham"],["(UTC+13:00) \u52AA\u5E93\u963F\u6D1B\u6CD5","Pacific/Tongatapu"],["(UTC+13:00) \u8428\u6469\u4E9A","Pacific/Apia"],["(UTC+14:00) \u5723\u8BDE\u5C9B","Pacific/Kiritimati"]],u=[["(UTC-11:00) \u4E2D\u9014\u5CF6\u3001\u7F8E\u5C6C\u85A9\u6469\u4E9E","Pacific/Midway"],["(UTC-10:00) \u963F\u7559\u7533\u7FA4\u5CF6","America/Adak"],["(UTC-10:00) \u590F\u5A01\u5937","Pacific/Honolulu"],["(UTC-09:30) \u99AC\u514B\u85A9\u65AF\u7FA4\u5CF6","Pacific/Marquesas"],["(UTC-09:00) \u963F\u62C9\u65AF\u52A0","America/Anchorage"],["(UTC-08:00) \u4E0B\u52A0\u5229\u798F\u5C3C\u4E9E\u5DDE","America/Tijuana"],["(UTC-08:00) \u592A\u5E73\u6D0B\u6642\u9593\uFF08\u7F8E\u570B\u8207\u52A0\u62FF\u5927\uFF09","America/Los_Angeles"],["(UTC-07:00) \u4E9E\u5229\u6851\u90A3\u5DDE","America/Phoenix"],["(UTC-07:00) \u5C71\u5340\u6642\u9593\uFF08\u7F8E\u570B\u8207\u52A0\u62FF\u5927\uFF09\u3001\u7D0D\u74E6\u970D\u65CF\u4FDD\u7559\u5730","America/Denver"],["(UTC-06:00) \u7F8E\u570B\u4E2D\u90E8","America/Belize"],["(UTC-06:00) \u4E2D\u90E8\u6642\u9593\uFF08\u7F8E\u570B\u8207\u52A0\u62FF\u5927\uFF09","America/Chicago"],["(UTC-06:00) \u5947\u74E6\u74E6\u5DDE\u3001\u62C9\u5DF4\u65AF\u7701\u3001\u99AC\u85A9\u7279\u862D","America/Chihuahua"],["(UTC-06:00) \u5FA9\u6D3B\u7BC0\u5CF6","Pacific/Easter"],["(UTC-06:00) \u74DC\u9054\u62C9\u54C8\u62C9\u3001\u58A8\u897F\u54E5\u57CE\u3001\u8499\u7279\u96F7","America/Mexico_City"],["(UTC-06:00) \u85A9\u514B\u5176\u842C\u7701","America/Regina"],["(UTC-05:00) \u6CE2\u54E5\u5927\u3001\u5229\u99AC\u3001\u57FA\u591A","America/Bogota"],["(UTC-05:00) \u5207\u5716\u99AC\u723E","America/Cancun"],["(UTC-05:00) \u6771\u90E8\u6642\u9593\uFF08\u7F8E\u570B\u8207\u52A0\u62FF\u5927\uFF09","America/New_York"],["(UTC-05:00) \u6D77\u5730","America/Port-au-Prince"],["(UTC-05:00) \u54C8\u74E6\u90A3","America/Havana"],["(UTC-05:00) \u5370\u5730\u5B89\u90A3\uFF08\u6771\u90E8\uFF09","America/Indiana/Indianapolis"],["(UTC-04:00) \u4E9E\u677E\u68EE","America/Asuncion"],["(UTC-04:00) \u5927\u897F\u6D0B\u6642\u9593\uFF08\u52A0\u62FF\u5927\uFF09","America/Halifax"],["(UTC-04:00) \u5361\u62C9\u5361\u65AF","America/Caracas"],["(UTC-04:00) \u53E4\u96C5\u5DF4","America/Cuiaba"],["(UTC-04:00) \u55AC\u6CBB\u57CE\u3001\u62C9\u5DF4\u65AF\u3001\u746A\u7459\u65AF\u3001\u8056\u80E1\u5B89","America/Manaus"],["(UTC-04:00) \u8056\u5730\u7259\u54E5","America/Santiago"],["(UTC-04:00) \u571F\u514B\u65AF\u53CA\u958B\u79D1\u65AF\u7FA4\u5CF6","America/Grand_Turk"],["(UTC-03:30) \u7D10\u82AC\u862D","America/St_Johns"],["(UTC-03:00) \u963F\u62C9\u74DC\u4F0A\u7D0D","America/Fortaleza"],["(UTC-03:00) \u5DF4\u897F\u5229\u4E9E","America/Sao_Paulo"],["(UTC-03:00) \u958B\u96F2\u3001\u798F\u5854\u529B\u6C99","America/Cayenne"],["(UTC-03:00) \u5E03\u5B9C\u8AFE\u65AF\u827E\u5229\u65AF","America/Buenos_Aires"],["(UTC-03:00) \u683C\u9675\u862D","America/Godthab"],["(UTC-03:00) \u8499\u7279\u7DAD\u591A","America/Montevideo"],["(UTC-03:00) \u8056\u76AE\u8036\u8207\u5BC6\u514B\u9686\u7FA4\u5CF6","America/Miquelon"],["(UTC-03:00) \u85A9\u723E\u74E6\u591A","America/Bahia"],["(UTC-02:00) \u8CBB\u723E\u5357\u591A\u8FEA\u8AFE\u7F85\u5C3C\u4E9E\u7FA4\u5CF6","America/Noronha"],["(UTC-01:00) \u4E9E\u901F\u723E\u7FA4\u5CF6","Atlantic/Azores"],["(UTC-01:00) \u7DAD\u5FB7\u89D2","Atlantic/Cape_Verde"],["(UTC+01:00) \u5361\u85A9\u5E03\u862D\u52A0","Africa/Casablanca"],["(UTC) \u90FD\u67CF\u6797\u3001\u611B\u4E01\u5821\u3001\u91CC\u65AF\u672C\u3001\u502B\u6566","Europe/London"],["(UTC) \u8499\u7F85\u7DAD\u4E9E\u3001\u96F7\u514B\u96C5\u7DAD\u514B","Africa/Monrovia"],["(UTC+01:00) \u963F\u59C6\u65AF\u7279\u4E39\u3001\u67CF\u6797\u3001\u4F2F\u6069\u3001\u7F85\u99AC\u3001\u65AF\u5FB7\u54E5\u723E\u6469\u3001\u7DAD\u4E5F\u7D0D","Europe/Amsterdam"],["(UTC+01:00) \u8C9D\u723E\u683C\u52D2\u3001\u5E03\u62C9\u63D0\u65AF\u62C9\u74E6\u3001\u5E03\u9054\u4F69\u65AF\u3001\u76E7\u5E03\u4E9E\u7D0D\u3001\u5E03\u62C9\u683C","Europe/Belgrade"],["(UTC+01:00) \u5E03\u9B6F\u585E\u723E\u3001\u54E5\u672C\u54C8\u6839\u3001\u99AC\u5FB7\u91CC\u3001\u5DF4\u9ECE","Europe/Brussels"],["(UTC+01:00) \u585E\u62C9\u8036\u4F5B\u3001\u65AF\u9AD8\u5F7C\u4E9E\u3001\u83EF\u6C99\u3001\u672D\u683C\u96F7\u5E03","Europe/Warsaw"],["(UTC+01:00) \u897F\u4E2D\u90E8\u975E\u6D32","Africa/Algiers"],["(UTC+01:00) \u6EAB\u5F97\u548C\u514B","Africa/Windhoek"],["(UTC+02:00) \u96C5\u5178\u3001\u5E03\u52A0\u52D2\u65AF\u7279","Europe/Athens"],["(UTC+02:00) \u8C9D\u9B6F\u7279","Asia/Beirut"],["(UTC+02:00) \u958B\u7F85","Africa/Cairo"],["(UTC+02:00) \u5927\u99AC\u58EB\u9769","Asia/Damascus"],["(UTC+02:00) \u52A0\u85A9\u3001\u5E0C\u4F2F\u4F96","Asia/Gaza"],["(UTC+02:00) \u54C8\u62C9\u96F7\u3001\u666E\u52D2\u6258\u5229\u4E9E","Africa/Harare"],["(UTC+02:00) \u8D6B\u723E\u8F9B\u57FA\u3001\u57FA\u8F14\u3001\u91CC\u52A0\u3001\u7D22\u83F2\u4E9E\u3001\u5854\u6797\u3001\u7DAD\u723E\u7D10\u65AF","Europe/Helsinki"],["(UTC+02:00) \u8036\u8DEF\u6492\u51B7","Asia/Jerusalem"],["(UTC+02:00) \u52A0\u91CC\u5BE7\u683C\u52D2","Europe/Kaliningrad"],["(UTC+02:00) \u7684\u9ECE\u6CE2\u91CC","Africa/Tripoli"],["(UTC+03:00) \u963F\u66FC","Asia/Amman"],["(UTC+03:00) \u5DF4\u683C\u9054","Asia/Baghdad"],["(UTC+03:00) \u4F0A\u65AF\u5766\u5821","Asia/Istanbul"],["(UTC+03:00) \u79D1\u5A01\u7279\u3001\u5229\u96C5\u5FB7","Asia/Kuwait"],["(UTC+03:00) \u660E\u65AF\u514B","Europe/Minsk"],["(UTC+03:00) \u83AB\u65AF\u79D1\u3001\u8056\u5F7C\u5FB7\u5821","Europe/Moscow"],["(UTC+03:00) \u5948\u6D1B\u6BD4","Africa/Nairobi"],["(UTC+03:30) \u5FB7\u9ED1\u862D","Asia/Tehran"],["(UTC+04:00) \u963F\u5E03\u9054\u6BD4\u3001\u99AC\u65AF\u5580\u7279","Asia/Muscat"],["(UTC+04:00) \u963F\u65AF\u7279\u62C9\u7F55\u3001\u70CF\u91CC\u63DA\u8AFE\u592B\u65AF\u514B\u3001\u4F0F\u723E\u52A0\u683C\u52D2","Europe/Astrakhan"],["(UTC+04:00) \u5DF4\u5EAB","Asia/Baku"],["(UTC+04:00) \u4F0A\u71B1\u592B\u65AF\u514B\u3001\u85A9\u99AC\u62C9","Europe/Samara"],["(UTC+04:00) \u8DEF\u6613\u6E2F","Indian/Mauritius"],["(UTC+04:00) \u7B2C\u6BD4\u5229\u65AF","Asia/Tbilisi"],["(UTC+04:00) \u8449\u91CC\u6EAB","Asia/Yerevan"],["(UTC+04:30) \u5580\u5E03\u723E","Asia/Kabul"],["(UTC+05:00) \u5854\u4EC0\u5E72\u3001\u963F\u4EC0\u54C8\u5DF4\u7279","Asia/Tashkent"],["(UTC+05:00) \u8449\u5361\u6377\u7433\u5821","Asia/Yekaterinburg"],["(UTC+05:00) \u4F0A\u65AF\u862D\u99AC\u5DF4\u5FB7\u3001\u5580\u62C9\u86A9","Asia/Karachi"],["(UTC+05:00) \u963F\u65AF\u5854\u7D0D","Asia/Almaty"],["(UTC+05:30) \u6E05\u5948\u3001\u52A0\u723E\u5404\u7B54\u3001\u5B5F\u8CB7\u3001\u65B0\u5FB7\u91CC","Asia/Kolkata"],["(UTC+05:30) \u65AF\u91CC\u8CC8\u4E9E\u74E6\u5FB7\u7D0D\u666E\u62C9\u79D1\u7279","Asia/Colombo"],["(UTC+05:45) \u52A0\u5FB7\u6EFF\u90FD","Asia/Katmandu"],["(UTC+06:00) \u9054\u5361","Asia/Dhaka"],["(UTC+06:30) \u4EF0\u5149\uFF08\u5927\u5149\uFF09","Asia/Rangoon"],["(UTC+07:00) \u65B0\u897F\u4F2F\u5229\u4E9E","Asia/Novosibirsk"],["(UTC+07:00) \u66FC\u8C37\u3001\u6CB3\u5167\u3001\u96C5\u52A0\u9054","Asia/Bangkok"],["(UTC+07:00) \u5DF4\u723E\u7459\u3001\u6208\u723E\u8AFE-\u963F\u723E\u6CF0\u65AF\u514B","Asia/Barnaul"],["(UTC+07:00) \u79D1\u5E03\u591A\u57CE","Asia/Hovd"],["(UTC+07:00) \u514B\u62C9\u65AF\u8AFE\u4E9E\u723E\u65AF\u514B","Asia/Krasnoyarsk"],["(UTC+07:00) \u6258\u6728\u65AF\u514B","Asia/Tomsk"],["(UTC+08:00) \u5317\u4EAC\u3001\u91CD\u6176\u3001\u9999\u6E2F\u7279\u5225\u884C\u653F\u5340\u3001\u70CF\u9B6F\u6728\u9F4A","Asia/Chongqing"],["(UTC+08:00) \u4F0A\u723E\u5EAB\u8328\u514B","Asia/Irkutsk"],["(UTC+08:00) \u5409\u9686\u5761\u3001\u65B0\u52A0\u5761","Asia/Kuala_Lumpur"],["(UTC+08:00) \u4F2F\u65AF","Australia/Perth"],["(UTC+08:00) \u53F0\u5317","Asia/Taipei"],["(UTC+08:00) \u70CF\u862D\u5DF4\u6258","Asia/Ulaanbaatar"],["(UTC+08:30) \u5E73\u58E4","Asia/Pyongyang"],["(UTC+08:45) \u5C24\u514B\u62C9","Australia/Eucla"],["(UTC+09:00) \u8D64\u5854","Asia/Chita"],["(UTC+09:00) \u5927\u962A\u3001\u672D\u5E4C\u3001\u6771\u4EAC","Asia/Tokyo"],["(UTC+09:00) \u9996\u723E","Asia/Seoul"],["(UTC+09:00) \u96C5\u5EAB\u6B21\u514B","Asia/Yakutsk"],["(UTC+09:30) \u963F\u5F97\u96F7\u5FB7","Australia/Adelaide"],["(UTC+09:30) \u9054\u723E\u6587","Australia/Darwin"],["(UTC+10:00) \u5E03\u91CC\u65AF\u672C","Australia/Brisbane"],["(UTC+10:00) \u574E\u57F9\u62C9\u3001\u58A8\u723E\u672C\u3001\u96EA\u68A8","Australia/Canberra"],["(UTC+10:00) \u95DC\u5CF6\u3001\u83AB\u58EB\u6BD4\u6E2F","Pacific/Guam"],["(UTC+10:00) \u8377\u4F2F\u7279","Australia/Hobart"],["(UTC+10:00) \u6D77\u53C3\u5A01","Asia/Vladivostok"],["(UTC+10:30) \u8C6A\u52F3\u7235\u5CF6","Australia/Lord_Howe"],["(UTC+11:00) \u5E03\u5E72\u7DAD\u723E\u5CF6","Pacific/Bougainville"],["(UTC+11:00) \u55AC\u5EAB\u723E\u9054\u8D6B","Asia/Srednekolymsk"],["(UTC+11:00) \u99AC\u52A0\u4E39","Asia/Magadan"],["(UTC+11:00) \u8AFE\u798F\u514B\u5CF6","Pacific/Norfolk"],["(UTC+11:00) \u85A9\u54C8\u6797","Asia/Sakhalin"],["(UTC+11:00) \u7D22\u7F85\u9580\u7FA4\u5CF6\u3001\u65B0\u5580\u91CC\u591A\u5C3C\u4E9E","Pacific/Guadalcanal"],["(UTC+12:00) \u963F\u90A3\u5E95\u3001\u582A\u5BDF\u52A0\u5F7C\u5F97\u7F85\u5DF4\u752B\u6D1B\u592B\u65AF\u514B","Asia/Anadyr"],["(UTC+12:00) \u5967\u514B\u862D\u3001\u5A01\u9748\u9813","Pacific/Auckland"],["(UTC+12:00) \u6590\u6FDF","Pacific/Fiji"],["(UTC+12:45) \u67E5\u5854\u59C6\u7FA4\u5CF6","Pacific/Chatham"],["(UTC+13:00) \u52AA\u5EAB\u963F\u6D1B\u6CD5","Pacific/Tongatapu"],["(UTC+13:00) \u85A9\u6469\u4E9E","Pacific/Apia"],["(UTC+14:00) \u5409\u91CC\u5DF4\u65AF","Pacific/Kiritimati"]],p={"America/Guatemala":"America/Belize","America/Indianapolis":"America/Indiana/Indianapolis","America/La_Paz":"America/Manaus",UTC:"Africa/Monrovia","Atlantic/Reykjavik":"Africa/Monrovia","Europe/Berlin":"Europe/Amsterdam","Europe/Budapest":"Europe/Belgrade","Europe/Paris":"Europe/Brussels","Africa/Lagos":"Africa/Algiers","Europe/Bucharest":"Europe/Athens","Africa/Johannesburg":"Africa/Harare","Europe/Kyiv":"Europe/Helsinki","Europe/Istanbul":"Asia/Istanbul","Asia/Riyadh":"Asia/Kuwait","Asia/Dubai":"Asia/Muscat","Asia/Calcutta":"Asia/Kolkata","Asia/Shanghai":"Asia/Chongqing","Asia/Singapore":"Asia/Kuala_Lumpur","Australia/Sydney":"Australia/Canberra","Pacific/Port_Moresby":"Pacific/Guam","Asia/Kamchatka":"Asia/Anadyr"},h={"Africa/Abidjan":"Africa/Monrovia","Africa/Accra":"Africa/Monrovia","Africa/Addis_Ababa":"Europe/Moscow","Africa/Asmara":"Europe/Moscow","Africa/Asmera":"Europe/Moscow","Africa/Bamako":"Africa/Monrovia","Africa/Bangui":"Africa/Algiers","Africa/Banjul":"Africa/Monrovia","Africa/Bissau":"Africa/Monrovia","Africa/Blantyre":"Africa/Harare","Africa/Brazzaville":"Africa/Algiers","Africa/Bujumbura":"Africa/Harare","Africa/Ceuta":"Europe/Amsterdam","Africa/Conakry":"Africa/Monrovia","Africa/Dakar":"Africa/Monrovia","Africa/Dar_es_Salaam":"Europe/Moscow","Africa/Djibouti":"Europe/Moscow","Africa/Douala":"Africa/Algiers","Africa/El_Aaiun":"Africa/Casablanca","Africa/Freetown":"Africa/Monrovia","Africa/Gaborone":"Africa/Harare","Africa/Johannesburg":"Africa/Harare","Africa/Juba":"Europe/Moscow","Africa/Kampala":"Europe/Moscow","Africa/Khartoum":"Europe/Moscow","Africa/Kigali":"Africa/Harare","Africa/Kinshasa":"Africa/Algiers","Africa/Lagos":"Africa/Algiers","Africa/Libreville":"Africa/Algiers","Africa/Lome":"Africa/Monrovia","Africa/Luanda":"Africa/Algiers","Africa/Lubumbashi":"Africa/Harare","Africa/Lusaka":"Africa/Harare","Africa/Malabo":"Africa/Algiers","Africa/Maputo":"Africa/Harare","Africa/Maseru":"Africa/Harare","Africa/Mbabane":"Africa/Harare","Africa/Mogadishu":"Europe/Moscow","Africa/Ndjamena":"Africa/Algiers","Africa/Niamey":"Africa/Algiers","Africa/Nouakchott":"Africa/Monrovia","Africa/Ouagadougou":"Africa/Monrovia","Africa/Porto-Novo":"Africa/Algiers","Africa/Sao_Tome":"Africa/Monrovia","Africa/Timbuktu":"Africa/Monrovia","Africa/Tunis":"Africa/Algiers","America/Anguilla":"America/Manaus","America/Antigua":"America/Manaus","America/Araguaina":"America/Buenos_Aires","America/Argentina/Buenos_Aires":"America/Buenos_Aires","America/Argentina/Catamarca":"America/Buenos_Aires","America/Argentina/ComodRivadavia":"America/Buenos_Aires","America/Argentina/Cordoba":"America/Buenos_Aires","America/Argentina/Jujuy":"America/Buenos_Aires","America/Argentina/La_Rioja":"America/Buenos_Aires","America/Argentina/Mendoza":"America/Buenos_Aires","America/Argentina/Rio_Gallegos":"America/Buenos_Aires","America/Argentina/Salta":"America/Buenos_Aires","America/Argentina/San_Juan":"America/Buenos_Aires","America/Argentina/San_Luis":"America/Buenos_Aires","America/Argentina/Tucuman":"America/Buenos_Aires","America/Argentina/Ushuaia":"America/Buenos_Aires","America/Aruba":"America/Manaus","America/Atikokan":"America/Bogota","America/Atka":"America/Adak","America/Bahia_Banderas":"America/Mexico_City","America/Barbados":"America/Manaus","America/Belem":"America/Buenos_Aires","America/Blanc-Sablon":"America/Manaus","America/Boa_Vista":"America/Manaus","America/Boise":"America/Denver","America/Cambridge_Bay":"America/Denver","America/Campo_Grande":"America/Cuiaba","America/Catamarca":"America/Buenos_Aires","America/Cayman":"America/Bogota","America/Coral_Harbour":"America/Bogota","America/Cordoba":"America/Buenos_Aires","America/Costa_Rica":"America/Regina","America/Creston":"America/Phoenix","America/Curacao":"America/Manaus","America/Danmarkshavn":"Africa/Monrovia","America/Dawson":"America/Los_Angeles","America/Dawson_Creek":"America/Phoenix","America/Detroit":"America/New_York","America/Dominica":"America/Manaus","America/Edmonton":"America/Denver","America/Eirunepe":"America/Bogota","America/El_Salvador":"America/Regina","America/Ensenada":"America/Los_Angeles","America/Fort_Wayne":"America/New_York","America/Glace_Bay":"America/Halifax","America/Goose_Bay":"America/Halifax","America/Grenada":"America/Manaus","America/Guadeloupe":"America/Manaus","America/Guatemala":"America/Regina","America/Guayaquil":"America/Bogota","America/Guyana":"America/Manaus","America/Hermosillo":"America/Phoenix","America/Indiana/Knox":"America/Chicago","America/Indiana/Marengo":"America/New_York","America/Indiana/Petersburg":"America/New_York","America/Indiana/Tell_City":"America/Chicago","America/Indiana/Vevay":"America/New_York","America/Indiana/Vincennes":"America/New_York","America/Indiana/Winamac":"America/New_York","America/Indianapolis":"America/New_York","America/Inuvik":"America/Denver","America/Iqaluit":"America/New_York","America/Jamaica":"America/Bogota","America/Jujuy":"America/Buenos_Aires","America/Juneau":"America/Anchorage","America/Kentucky/Louisville":"America/New_York","America/Kentucky/Monticello":"America/New_York","America/Knox_IN":"America/Chicago","America/Kralendijk":"America/Manaus","America/La_Paz":"America/Manaus","America/Lima":"America/Bogota","America/Louisville":"America/New_York","America/Lower_Princes":"America/Manaus","America/Maceio":"America/Buenos_Aires","America/Managua":"America/Regina","America/Marigot":"America/Manaus","America/Martinique":"America/Manaus","America/Matamoros":"America/Chicago","America/Mazatlan":"America/Chihuahua","America/Mendoza":"America/Buenos_Aires","America/Menominee":"America/Chicago","America/Merida":"America/Mexico_City","America/Moncton":"America/Halifax","America/Monterrey":"America/Mexico_City","America/Montreal":"America/New_York","America/Montserrat":"America/Manaus","America/Nassau":"America/New_York","America/Nipigon":"America/New_York","America/Nome":"America/Anchorage","America/North_Dakota/Beulah":"America/Chicago","America/North_Dakota/Center":"America/Chicago","America/North_Dakota/New_Salem":"America/Chicago","America/Ojinaga":"America/Denver","America/Panama":"America/Bogota","America/Pangnirtung":"America/New_York","America/Paramaribo":"America/Buenos_Aires","America/Port_of_Spain":"America/Manaus","America/Porto_Acre":"America/Bogota","America/Porto_Velho":"America/Manaus","America/Puerto_Rico":"America/Manaus","America/Rainy_River":"America/Chicago","America/Rankin_Inlet":"America/Chicago","America/Recife":"America/Buenos_Aires","America/Resolute":"America/Chicago","America/Rio_Branco":"America/Bogota","America/Rosario":"America/Buenos_Aires","America/Santa_Isabel":"America/Los_Angeles","America/Santarem":"America/Buenos_Aires","America/Santo_Domingo":"America/Manaus","America/Scoresbysund":"Atlantic/Azores","America/Shiprock":"America/Denver","America/Sitka":"America/Anchorage","America/St_Barthelemy":"America/Manaus","America/St_Kitts":"America/Manaus","America/St_Lucia":"America/Manaus","America/St_Thomas":"America/Manaus","America/St_Vincent":"America/Manaus","America/Swift_Current":"America/Regina","America/Tegucigalpa":"America/Regina","America/Thule":"America/Halifax","America/Thunder_Bay":"America/New_York","America/Toronto":"America/New_York","America/Tortola":"America/Manaus","America/Vancouver":"America/Los_Angeles","America/Virgin":"America/Manaus","America/Whitehorse":"America/Los_Angeles","America/Winnipeg":"America/Chicago","America/Yakutat":"America/Anchorage","America/Yellowknife":"America/Denver","Antarctica/Casey":"Asia/Chongqing","Antarctica/Davis":"Asia/Bangkok","Antarctica/DumontDUrville":"Australia/Brisbane","Antarctica/Macquarie":"Pacific/Bougainville","Antarctica/Mawson":"Asia/Tashkent","Antarctica/McMurdo":"Pacific/Auckland","Antarctica/Palmer":"America/Santiago","Antarctica/Rothera":"America/Buenos_Aires","Antarctica/South_Pole":"Pacific/Auckland","Antarctica/Syowa":"Europe/Moscow","Antarctica/Vostok":"Asia/Dhaka","Arctic/Longyearbyen":"Europe/Amsterdam","Asia/Aden":"Europe/Moscow","Asia/Aqtau":"Asia/Tashkent","Asia/Aqtobe":"Asia/Tashkent","Asia/Ashgabat":"Asia/Tashkent","Asia/Ashkhabad":"Asia/Tashkent","Asia/Bahrain":"Europe/Moscow","Asia/Bishkek":"Asia/Dhaka","Asia/Brunei":"Asia/Chongqing","Asia/Calcutta":"Asia/Kolkata","Asia/Choibalsan":"Asia/Ulaanbaatar","Asia/Chungking":"Asia/Chongqing","Asia/Dacca":"Asia/Dhaka","Asia/Dili":"Asia/Tokyo","Asia/Dubai":"Asia/Muscat","Asia/Dushanbe":"Asia/Tashkent","Asia/Harbin":"Asia/Chongqing","Asia/Hebron":"Asia/Gaza","Asia/Ho_Chi_Minh":"Asia/Bangkok","Asia/Hong_Kong":"Asia/Chongqing","Asia/Jakarta":"Asia/Bangkok","Asia/Jayapura":"Asia/Tokyo","Asia/Kamchatka":"Asia/Anadyr","Asia/Kashgar":"Asia/Dhaka","Asia/Kathmandu":"Asia/Katmandu","Asia/Khandyga":"Asia/Tokyo","Asia/Kuching":"Asia/Chongqing","Asia/Macao":"Asia/Chongqing","Asia/Macau":"Asia/Chongqing","Asia/Makassar":"Asia/Chongqing","Asia/Manila":"Asia/Chongqing","Asia/Nicosia":"Europe/Athens","Asia/Novokuznetsk":"Asia/Bangkok","Asia/Omsk":"Asia/Dhaka","Asia/Oral":"Asia/Tashkent","Asia/Phnom_Penh":"Asia/Bangkok","Asia/Pontianak":"Asia/Bangkok","Asia/Qatar":"Europe/Moscow","Asia/Qyzylorda":"Asia/Dhaka","Asia/Riyadh":"Europe/Moscow","Asia/Saigon":"Asia/Bangkok","Asia/Samarkand":"Asia/Tashkent","Asia/Shanghai":"Asia/Chongqing","Asia/Singapore":"Asia/Chongqing","Asia/Tel_Aviv":"Asia/Jerusalem","Asia/Thimbu":"Asia/Dhaka","Asia/Thimphu":"Asia/Dhaka","Asia/Ujung_Pandang":"Asia/Chongqing","Asia/Ulan_Bator":"Asia/Ulaanbaatar","Asia/Urumqi":"Asia/Dhaka","Asia/Ust-Nera":"Australia/Brisbane","Asia/Vientiane":"Asia/Bangkok","Atlantic/Bermuda":"America/Halifax","Atlantic/Canary":"Europe/London","Atlantic/Faeroe":"Europe/London","Atlantic/Faroe":"Europe/London","Atlantic/Jan_Mayen":"Europe/Amsterdam","Atlantic/Madeira":"Europe/London","Atlantic/Reykjavik":"Africa/Monrovia","Atlantic/South_Georgia":"America/Noronha","Atlantic/St_Helena":"Africa/Monrovia","Atlantic/Stanley":"America/Buenos_Aires","Australia/ACT":"Australia/Canberra","Australia/Broken_Hill":"Australia/Adelaide","Australia/Currie":"Australia/Canberra","Australia/LHI":"Australia/Lord_Howe","Australia/Lindeman":"Australia/Brisbane","Australia/Melbourne":"Australia/Canberra","Australia/NSW":"Australia/Canberra","Australia/North":"Australia/Darwin","Australia/Queensland":"Australia/Brisbane","Australia/South":"Australia/Adelaide","Australia/Sydney":"Australia/Canberra","Australia/Tasmania":"Australia/Canberra","Australia/Victoria":"Australia/Canberra","Australia/West":"Asia/Chongqing","Australia/Yancowinna":"Australia/Adelaide","Brazil/Acre":"America/Bogota","Brazil/DeNoronha":"America/Noronha","Brazil/East":"America/Sao_Paulo","Brazil/West":"America/Manaus",CET:"Europe/Amsterdam",CST6CDT:"America/Chicago","Canada/Atlantic":"America/Halifax","Canada/Central":"America/Chicago","Canada/East-Saskatchewan":"America/Regina","Canada/Eastern":"America/New_York","Canada/Mountain":"America/Denver","Canada/Newfoundland":"America/St_Johns","Canada/Pacific":"America/Los_Angeles","Canada/Saskatchewan":"America/Regina","Canada/Yukon":"America/Los_Angeles","Chile/Continental":"America/Santiago","Chile/EasterIsland":"Pacific/Easter",Cuba:"America/Havana",EET:"Europe/Athens",EST:"America/New_York",EST5EDT:"America/New_York",Egypt:"Africa/Cairo",Eire:"Europe/London","Etc/GMT":"Africa/Monrovia","Etc/GMT+0":"Africa/Monrovia","Etc/GMT+1":"Atlantic/Cape_Verde","Etc/GMT+10":"Pacific/Honolulu","Etc/GMT+11":"Pacific/Midway","Etc/GMT+2":"America/Noronha","Etc/GMT+3":"America/Buenos_Aires","Etc/GMT+4":"America/Manaus","Etc/GMT+5":"America/Bogota","Etc/GMT+6":"America/Regina","Etc/GMT+7":"America/Phoenix","Etc/GMT-0":"Africa/Monrovia","Etc/GMT-1":"Africa/Algiers","Etc/GMT-10":"Australia/Brisbane","Etc/GMT-11":"Pacific/Bougainville","Etc/GMT-12":"Asia/Anadyr","Etc/GMT-13":"Pacific/Tongatapu","Etc/GMT-14":"Pacific/Kiritimati","Etc/GMT-2":"Africa/Harare","Etc/GMT-3":"Europe/Moscow","Etc/GMT-4":"Asia/Muscat","Etc/GMT-5":"Asia/Tashkent","Etc/GMT-6":"Asia/Dhaka","Etc/GMT-7":"Asia/Bangkok","Etc/GMT-8":"Asia/Chongqing","Etc/GMT-9":"Asia/Tokyo","Etc/GMT0":"Africa/Monrovia","Etc/Greenwich":"Africa/Monrovia","Etc/UCT":"Africa/Monrovia","Etc/UTC":"Africa/Monrovia","Etc/Universal":"Africa/Monrovia","Etc/Zulu":"Africa/Monrovia","Europe/Andorra":"Europe/Amsterdam","Europe/Belfast":"Europe/London","Europe/Berlin":"Europe/Amsterdam","Europe/Bratislava":"Europe/Amsterdam","Europe/Bucharest":"Europe/Athens","Europe/Budapest":"Europe/Amsterdam","Europe/Busingen":"Europe/Amsterdam","Europe/Copenhagen":"Europe/Amsterdam","Europe/Dublin":"Europe/London","Europe/Gibraltar":"Europe/Amsterdam","Europe/Guernsey":"Europe/London","Europe/Isle_of_Man":"Europe/London","Europe/Istanbul":"Asia/Istanbul","Europe/Jersey":"Europe/London","Europe/Kyiv":"Europe/Athens","Europe/Kirov":"Europe/Moscow","Europe/Lisbon":"Europe/London","Europe/Ljubljana":"Europe/Amsterdam","Europe/Luxembourg":"Europe/Amsterdam","Europe/Madrid":"Europe/Amsterdam","Europe/Malta":"Europe/Amsterdam","Europe/Mariehamn":"Europe/Athens","Europe/Monaco":"Europe/Amsterdam","Europe/Nicosia":"Europe/Athens","Europe/Oslo":"Europe/Amsterdam","Europe/Paris":"Europe/Amsterdam","Europe/Podgorica":"Europe/Amsterdam","Europe/Prague":"Europe/Belgrade","Europe/Riga":"Europe/Athens","Europe/Rome":"Europe/Amsterdam","Europe/San_Marino":"Europe/Amsterdam","Europe/Sarajevo":"Europe/Amsterdam","Europe/Simferopol":"Europe/Moscow","Europe/Skopje":"Europe/Amsterdam","Europe/Sofia":"Europe/Athens","Europe/Stockholm":"Europe/Amsterdam","Europe/Tallinn":"Europe/Athens","Europe/Tirane":"Europe/Amsterdam","Europe/Ulyanovsk":"Europe/Astrakhan","Europe/Uzhgorod":"Europe/Athens","Europe/Vaduz":"Europe/Amsterdam","Europe/Vatican":"Europe/Amsterdam","Europe/Vienna":"Europe/Amsterdam","Europe/Vilnius":"Europe/Athens","Europe/Volgograd":"Europe/Astrakhan","Europe/Zagreb":"Europe/Amsterdam","Europe/Zaporozhye":"Europe/Athens","Europe/Zurich":"Europe/Amsterdam",Factory:"Africa/Monrovia",GB:"Europe/London","GB-Eire":"Europe/London",GMT:"Africa/Monrovia","GMT+0":"Africa/Monrovia","GMT-0":"Africa/Monrovia",GMT0:"Africa/Monrovia",Greenwich:"Africa/Monrovia",HST:"Pacific/Honolulu",Hongkong:"Asia/Chongqing",Iceland:"Africa/Monrovia","Indian/Antananarivo":"Europe/Moscow","Indian/Chagos":"Asia/Dhaka","Indian/Christmas":"Asia/Bangkok","Indian/Cocos":"Asia/Rangoon","Indian/Comoro":"Europe/Moscow","Indian/Kerguelen":"Asia/Tashkent","Indian/Mahe":"Asia/Muscat","Indian/Maldives":"Asia/Tashkent","Indian/Mayotte":"Europe/Moscow","Indian/Reunion":"Asia/Muscat",Iran:"Asia/Tehran",Israel:"Asia/Jerusalem",Jamaica:"America/Bogota",Japan:"Asia/Tokyo",Kwajalein:"Asia/Anadyr",Libya:"Africa/Harare",MET:"Europe/Amsterdam",MST:"America/Denver",MST7MDT:"America/Denver","Mexico/BajaNorte":"America/Los_Angeles","Mexico/BajaSur":"America/Chihuahua","Mexico/General":"America/Mexico_City",NZ:"Pacific/Auckland","NZ-CHAT":"Pacific/Chatham",Navajo:"America/Denver",PRC:"Asia/Chongqing",PST8PDT:"America/Los_Angeles","Pacific/Chuuk":"Australia/Brisbane","Pacific/Efate":"Pacific/Bougainville","Pacific/Enderbury":"Pacific/Tongatapu","Pacific/Fakaofo":"Pacific/Tongatapu","Pacific/Funafuti":"Asia/Anadyr","Pacific/Galapagos":"America/Regina","Pacific/Johnston":"Pacific/Honolulu","Pacific/Kosrae":"Pacific/Bougainville","Pacific/Kwajalein":"Asia/Anadyr","Pacific/Majuro":"Asia/Anadyr","Pacific/Nauru":"Asia/Anadyr","Pacific/Niue":"Pacific/Midway","Pacific/Noumea":"Pacific/Bougainville","Pacific/Pago_Pago":"Pacific/Midway","Pacific/Palau":"Asia/Tokyo","Pacific/Pohnpei":"Pacific/Bougainville","Pacific/Ponape":"Pacific/Bougainville","Pacific/Port_Moresby":"Australia/Brisbane","Pacific/Rarotonga":"Pacific/Honolulu","Pacific/Saipan":"Australia/Brisbane","Pacific/Samoa":"Pacific/Midway","Pacific/Tahiti":"Pacific/Honolulu","Pacific/Tarawa":"Asia/Anadyr","Pacific/Truk":"Australia/Brisbane","Pacific/Wake":"Asia/Anadyr","Pacific/Wallis":"Asia/Anadyr","Pacific/Yap":"Australia/Brisbane",Poland:"Europe/Amsterdam",Portugal:"Europe/London",ROC:"Asia/Chongqing",ROK:"Asia/Tokyo",Singapore:"Asia/Chongqing",Turkey:"Asia/Istanbul",UCT:"Africa/Monrovia","US/Alaska":"America/Anchorage","US/Aleutian":"America/Adak","US/Arizona":"America/Phoenix","US/Central":"America/Chicago","US/East-Indiana":"America/New_York","US/Eastern":"America/New_York","US/Hawaii":"Pacific/Honolulu","US/Indiana-Starke":"America/Chicago","US/Michigan":"America/New_York","US/Mountain":"America/Denver","US/Pacific":"America/Los_Angeles","US/Pacific-New":"America/Los_Angeles","US/Samoa":"Pacific/Midway",UTC:"Africa/Monrovia",Universal:"Africa/Monrovia","W-SU":"Europe/Moscow",WET:"Europe/Amsterdam",Zulu:"Africa/Monrovia"},_={"America/Fort_Nelson":"America/Denver"};return this};e.exports&&(t=e.exports=tz),t.TimezoneDetector=tz}).call(function(){return this||("u">typeof window?window:a.g)}())},0x28c8c85:(e,t,a)=>{"use strict";a.d(t,{A:()=>configureEnhancers});var n=a(0x1d6936809),r=a(0x7ae39ecf),i=a(0x18dac2b8e);function configureEnhancers({teamOrEnterpriseId:e,customEnhancers:t,middlewares:a,disableDevTools:l}){let o=(0,r.P)();return(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&!l&&((0,i.Cu)()||(0,i.b3)())?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__(o(e)):n.Zz)((0,n.Tw)(...a??[]),...t??[])}},0x13a454b51:(e,t,a)=>{"use strict";a.d(t,{XT:()=>validateCSV,Xw:()=>n,gU:()=>isEmailUrlFromUrlObject,l0:()=>isDomain,xf:()=>isEmail}),a(0x1d5f57074);let n=RegExp("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","i");function isEmail(e){if(!e)return!1;let t=e.match(n);return t&&1===t.length&&t[0]===e||!1}function isEmailUrlFromUrlObject(e){let{pathname:t,protocol:a}=e;return"mailto:"===a&&isEmail(t)}let r=/^[\w.-]+(?:\.[\w.-]+)+[\w\-.]+$/i;function isDomain(e){let t=e.match(r);return t&&1===t.length&&t[0]===e||!1}function validateCSV({csv:e,min:t=0,max:a=10}){let n=e.split(/\s*,\s*/).length;return{minViolation:n<t,maxViolation:n>a}}},0x1c4816103:(e,t,a)=>{"use strict";a.d(t,{A:()=>getTimezoneLabel,j:()=>getTimezoneLocationLabel});var n=a(0x10a23ba39);function getTimezoneLabel(e,t){let a=(0,n.Ay)(t),r=a?.find(t=>t[1]===e)?.[0];if(r)return r;let i=(0,n.yO)(e,e);return a?.find(e=>e[1]===i)?.[0]}function getTimezoneLocationLabel(e,t){let a=getTimezoneLabel(e,t);if(a)return a.replace(/\(UTC ?[+-]? ?.*?\)/,"").trim()}},0x10a23ba39:(e,t,a)=>{"use strict";let n;a.d(t,{Ay:()=>getTimezones,_j:()=>getTimezoneDetector,yO:()=>getCanonicalTimezone});var r=a(0x33a1edef);function getTimezoneDetector(){return n||(n=new r.TimezoneDetector),n}function getTimezones(e){return getTimezoneDetector().getList(e)}function getCanonicalTimezone(e,t){return getTimezoneDetector().getCanonicalTimezone(e,t)}},0xb1fd610d:(e,t,a)=>{"use strict";function isElement(e){return e?.nodeType===1}function isHtmlElement(e){return isElement(e)&&"http://www.w3.org/1999/xhtml"===e.namespaceURI}function isAnchorElement(e){return isHtmlElementWithTagName(e,"a")}function isHtmlElementWithTagName(e,t){return isHtmlElement(e)&&e.localName===t}function hasAttribute(e,t){return e.hasAttribute&&e.hasAttribute(t)}a.d(t,{IR:()=>isAnchorElement,P7:()=>hasAttribute,vq:()=>isElement}),[...new Set(["INPUT","TEXTAREA","SELECT"])]},0x205dfed38:(e,t,a)=>{"use strict";function capitalize(e,t=!0){if("string"!=typeof e)throw Error(`String required for capitalization; type ${typeof e} given`);let a=e.slice(1);return t&&(a=a.toLowerCase()),`${e.charAt(0).toUpperCase()}${a}`}a.d(t,{ZH:()=>capitalize,t5:()=>capitalizePaymentMethodBrand});let capitalizePaymentMethodBrand=e=>{switch(e){case"unionpay":return"Union Pay";case"jcb":return"JCB";default:return capitalize(e)}}},0x125523996:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x5a5c86cb),r=a(0xa560007e);let __WEBPACK_DEFAULT_EXPORT__=e=>(0,n.A)(e,(e,t)=>(0,r.A)(t,"aria-"))},0x181d663bb:(e,t,a)=>{"use strict";a.d(t,{A:()=>getDataProps});var n=a(0x5a5c86cb),r=a(0xa560007e);function getDataProps(e){return(0,n.A)(e,(e,t)=>(0,r.A)(t,"data-"))}},0x1427e2c62:(e,t,a)=>{"use strict";function getTotalScrollTop(e,t=document){let a=e.parentElement,n=e.scrollTop;for(;a&&a!==t;)n+=a.scrollTop,a=a.parentElement;return n}a.d(t,{A:()=>getTotalScrollTop})},0x3fe04406:(e,t,a)=>{"use strict";a.d(t,{X:()=>getCountries});let n=new(a(0x20482ad21)).Ay("countries"),getCountries=()=>({Afghanistan:{name:n.t("Afghanistan"),code:"93",examplePhoneNumbers:["701234567"],shortCode:"AF"},Albania:{name:n.t("Albania"),code:"355",examplePhoneNumbers:["661234567"],shortCode:"AL"},Algeria:{name:n.t("Algeria"),code:"213",examplePhoneNumbers:["561234567"],shortCode:"DZ"},"American Samoa":{name:n.t("American Samoa"),code:"1684",examplePhoneNumbers:["(201) 555-5555"],shortCode:"AS"},Andorra:{name:n.t("Andorra"),code:"376",examplePhoneNumbers:["312 345"],shortCode:"AD"},Angola:{name:n.t("Angola"),code:"244",examplePhoneNumbers:["923 123 456"],shortCode:"AO"},Anguilla:{name:n.t("Anguilla"),code:"1264",examplePhoneNumbers:["(201) 555-5555"],shortCode:"AI"},Antarctica:{name:n.t("Antarctica"),code:"672",examplePhoneNumbers:["(201) 555-5555"],shortCode:"AQ"},"Antigua and Barbuda":{name:n.t("Antigua and Barbuda"),code:"1268",examplePhoneNumbers:["(201) 555-5555"],shortCode:"AG"},Argentina:{name:n.t("Argentina"),code:"54",examplePhoneNumbers:["91123456789"],shortCode:"AR"},Armenia:{name:n.t("Armenia"),code:"374",examplePhoneNumbers:["77123456"],shortCode:"AM"},Aruba:{name:n.t("Aruba"),code:"297",examplePhoneNumbers:["560 1234"],shortCode:"AW"},Australia:{name:n.t("Australia"),code:"61",examplePhoneNumbers:["412345678"],shortCode:"AU"},Austria:{name:n.t("Austria"),code:"43",examplePhoneNumbers:["664123456"],shortCode:"AT"},Azerbaijan:{name:n.t("Azerbaijan"),code:"994",examplePhoneNumbers:["401234567"],shortCode:"AZ"},Bahamas:{name:n.t("Bahamas"),code:"1242",examplePhoneNumbers:["(201) 555-5555"],shortCode:"BS"},Bahrain:{name:n.t("Bahrain"),code:"973",examplePhoneNumbers:["3600 1234"],shortCode:"BH"},Bangladesh:{name:n.t("Bangladesh"),code:"880",examplePhoneNumbers:["1812345678"],shortCode:"BD"},Barbados:{name:n.t("Barbados"),code:"1246",examplePhoneNumbers:["(201) 555-5555"],shortCode:"BB"},Belarus:{name:n.t("Belarus"),code:"375",examplePhoneNumbers:["294911911"],shortCode:"BY"},Belgium:{name:n.t("Belgium"),code:"32",examplePhoneNumbers:["470123456"],shortCode:"BE"},Belize:{name:n.t("Belize"),code:"501",examplePhoneNumbers:["622-1234"],shortCode:"BZ"},Benin:{name:n.t("Benin"),code:"229",examplePhoneNumbers:["90 01 12 34"],shortCode:"BJ"},Bermuda:{name:n.t("Bermuda"),code:"1441",examplePhoneNumbers:["(201) 555-5555"],shortCode:"BM"},Bhutan:{name:n.t("Bhutan"),code:"975",examplePhoneNumbers:["17 12 23 56"],shortCode:"BT"},Bolivia:{name:n.t("Bolivia"),code:"591",examplePhoneNumbers:["71234567"],shortCode:"BO"},"Bonaire, Sint Eustatius and Saba":{name:n.t("Bonaire, Sint Eustatius and Saba"),code:"599",examplePhoneNumbers:["9 518 1234"],shortCode:"BQ"},"Bosnia and Herzegovina":{name:n.t("Bosnia and Herzegovina"),code:"387",examplePhoneNumbers:["61123456"],shortCode:"BA"},Botswana:{name:n.t("Botswana"),code:"267",examplePhoneNumbers:["71123456"],shortCode:"BW"},"Bouvet Island":{name:n.t("Bouvet Island"),code:"55",examplePhoneNumbers:["71123456"],shortCode:"BV"},Brazil:{name:n.t("Brazil"),code:"55",examplePhoneNumbers:["1196123-4567"],shortCode:"BR"},"British Virgin Islands":{name:n.t("British Virgin Islands"),code:"1284",examplePhoneNumbers:["(201) 555-5555"],shortCode:"VG"},Brunei:{name:n.t("Brunei"),code:"673",examplePhoneNumbers:["7123456"],shortCode:"BN"},Bulgaria:{name:n.t("Bulgaria"),code:"359",examplePhoneNumbers:["48123456"],shortCode:"BG"},"Burkina Faso":{name:n.t("Burkina Faso"),code:"226",examplePhoneNumbers:["70123456"],shortCode:"BF"},Burundi:{name:n.t("Burundi"),code:"257",examplePhoneNumbers:["79 56 12 34"],shortCode:"BI"},Cambodia:{name:n.t("Cambodia"),code:"855",examplePhoneNumbers:["91234567"],shortCode:"KH"},Cameroon:{name:n.t("Cameroon"),code:"237",examplePhoneNumbers:["6 71 23 45 67"],shortCode:"CM"},Canada:{name:n.t("Canada"),code:"1",examplePhoneNumbers:["(201) 555-5555"],shortCode:"CA"},"Cape Verde":{name:n.t("Cape Verde"),code:"238",examplePhoneNumbers:["991 12 34"],shortCode:"CV"},"Cayman Islands":{name:n.t("Cayman Islands"),code:"1345",examplePhoneNumbers:["(201) 555-5555"],shortCode:"KY"},"Central African Republic":{name:n.t("Central African Republic"),code:"236",examplePhoneNumbers:["70 01 23 45"],shortCode:"CF"},Chad:{name:n.t("Chad"),code:"235",examplePhoneNumbers:["63 01 23 45"],shortCode:"TD"},Chile:{name:n.t("Chile"),code:"56",examplePhoneNumbers:["961234567"],shortCode:"CL"},China:{name:n.t("China"),code:"86",examplePhoneNumbers:["131 2345 6789"],shortCode:"CN"},"Christmas Island":{name:n.t("Christmas Island"),code:"61",examplePhoneNumbers:["412345678"],shortCode:"CX"},"Cocos [Keeling] Islands":{name:n.t("Cocos [Keeling] Islands"),code:"61",examplePhoneNumbers:["412345678"],shortCode:"CC"},Colombia:{name:n.t("Colombia"),code:"57",examplePhoneNumbers:["321 1234567"],shortCode:"CO"},Comoros:{name:n.t("Comoros"),code:"269",examplePhoneNumbers:["321 23 45"],shortCode:"KM"},"Republic of the Congo":{name:n.t("Republic of the Congo"),code:"242",examplePhoneNumbers:["61234567"],shortCode:"CG"},"Democratic Republic of the Congo":{name:n.t("Democratic Republic of the Congo"),code:"243",examplePhoneNumbers:["991234567"],shortCode:"CD"},"Cook Islands":{name:n.t("Cook Islands"),code:"682",examplePhoneNumbers:["71 234"],shortCode:"CK"},"Costa Rica":{name:n.t("Costa Rica"),code:"506",examplePhoneNumbers:["8312 3456"],shortCode:"CR"},"C\xf4te d'Ivoire":{name:n.t("C\xf4te d'Ivoire"),code:"225",examplePhoneNumbers:["12 34 56 7"],shortCode:"CI"},Croatia:{name:n.t("Croatia"),code:"385",examplePhoneNumbers:["912345678"],shortCode:"HR"},"Cura\xe7ao":{name:n.t("Cura\xe7ao"),code:"5999",examplePhoneNumbers:["9 518 1234"],shortCode:"CW"},Cyprus:{name:n.t("Cyprus"),code:"357",examplePhoneNumbers:["96 123456"],shortCode:"CY"},"Czech Republic":{name:n.t("Czech Republic"),code:"420",examplePhoneNumbers:["601 123 456"],shortCode:"CZ"},Denmark:{name:n.t("Denmark"),code:"45",examplePhoneNumbers:["20 12 34 56"],shortCode:"DK"},Djibouti:{name:n.t("Djibouti"),code:"253",examplePhoneNumbers:["77 83 10 01"],shortCode:"DJ"},Dominica:{name:n.t("Dominica"),code:"1767",examplePhoneNumbers:["(201) 555-5555"],shortCode:"DM"},"Dominican Republic":{name:n.t("Dominican Republic"),code:"1",examplePhoneNumbers:["(201) 555-5555"],shortCode:"DO"},Ecuador:{name:n.t("Ecuador"),code:"593",examplePhoneNumbers:["991234567"],shortCode:"EC"},Egypt:{name:n.t("Egypt"),code:"20",examplePhoneNumbers:["1001234567"],shortCode:"EG"},"El Salvador":{name:n.t("El Salvador"),code:"503",examplePhoneNumbers:["7012 3456"],shortCode:"SV"},"Equatorial Guinea":{name:n.t("Equatorial Guinea"),code:"240",examplePhoneNumbers:["222 123 456"],shortCode:"GQ"},Eritrea:{name:n.t("Eritrea"),code:"291",examplePhoneNumbers:["7123456"],shortCode:"ER"},Estonia:{name:n.t("Estonia"),code:"372",examplePhoneNumbers:["512 3456","5123 4567"],shortCode:"EE"},Ethiopia:{name:n.t("Ethiopia"),code:"251",examplePhoneNumbers:["911234567"],shortCode:"ET"},"Falkland Islands":{name:n.t("Falkland Islands"),code:"500",examplePhoneNumbers:["51234"],shortCode:"FK"},"Faroe Islands":{name:n.t("Faroe Islands"),code:"298",examplePhoneNumbers:["211234"],shortCode:"FO"},Fiji:{name:n.t("Fiji"),code:"679",examplePhoneNumbers:["701 2345"],shortCode:"FJ"},Finland:{name:n.t("Finland"),code:"358",examplePhoneNumbers:["412345678"],shortCode:"FI"},France:{name:n.t("France"),code:"33",examplePhoneNumbers:["612345678"],shortCode:"FR"},"French Guiana":{name:n.t("French Guiana"),code:"594",examplePhoneNumbers:["694201234"],shortCode:"GF"},"French Polynesia":{name:n.t("French Polynesia"),code:"689",examplePhoneNumbers:["87 12 34 56"],shortCode:"PF"},Gabon:{name:n.t("Gabon"),code:"241",examplePhoneNumbers:["6 03 12 34"],shortCode:"GA"},Gambia:{name:n.t("Gambia"),code:"220",examplePhoneNumbers:["301 2345"],shortCode:"GM"},Georgia:{name:n.t("Georgia"),code:"995",examplePhoneNumbers:["550 12 34 56"],shortCode:"GE"},Germany:{name:n.t("Germany"),code:"49",examplePhoneNumbers:["15123456789"],shortCode:"DE"},Ghana:{name:n.t("Ghana"),code:"233",examplePhoneNumbers:["231234567"],shortCode:"GH"},Gibraltar:{name:n.t("Gibraltar"),code:"350",examplePhoneNumbers:["57123456"],shortCode:"GI"},Greece:{name:n.t("Greece"),code:"30",examplePhoneNumbers:["691 234 5678"],shortCode:"GR"},Greenland:{name:n.t("Greenland"),code:"299",examplePhoneNumbers:["22 12 34"],shortCode:"GL"},Grenada:{name:n.t("Grenada"),code:"1473",examplePhoneNumbers:["(201) 555-5555"],shortCode:"GD"},Guadeloupe:{name:n.t("Guadeloupe"),code:"590",examplePhoneNumbers:["690301234"],shortCode:"GP"},Guam:{name:n.t("Guam"),code:"1671",examplePhoneNumbers:["(201) 555-5555"],shortCode:"GU"},Guatemala:{name:n.t("Guatemala"),code:"502",examplePhoneNumbers:["5123 4567"],shortCode:"GT"},Guinea:{name:n.t("Guinea"),code:"224",examplePhoneNumbers:["601 12 34 56"],shortCode:"GN"},"Guinea-Bissau":{name:n.t("Guinea-Bissau"),code:"245",examplePhoneNumbers:["955 012 345"],shortCode:"GW"},Guyana:{name:n.t("Guyana"),code:"592",examplePhoneNumbers:["609 1234"],shortCode:"GY"},Haiti:{name:n.t("Haiti"),code:"509",examplePhoneNumbers:["34 10 1234"],shortCode:"HT"},Honduras:{name:n.t("Honduras"),code:"504",examplePhoneNumbers:["9123-4567"],shortCode:"HN"},"Hong Kong":{name:n.t("Hong Kong"),code:"852",examplePhoneNumbers:["5123 4567"],shortCode:"HK"},Hungary:{name:n.t("Hungary"),code:"36",examplePhoneNumbers:["20 123 4567"],shortCode:"HU"},Iceland:{name:n.t("Iceland"),code:"354",examplePhoneNumbers:["611 1234"],shortCode:"IS"},India:{name:n.t("India"),code:"91",examplePhoneNumbers:["91234 56789"],shortCode:"IN"},Indonesia:{name:n.t("Indonesia"),code:"62",examplePhoneNumbers:["812345678"],shortCode:"ID"},Iran:{name:n.t("Iran"),code:"98",examplePhoneNumbers:["9123456789"],shortCode:"IR"},Iraq:{name:n.t("Iraq"),code:"964",examplePhoneNumbers:["7912345678"],shortCode:"IQ"},Ireland:{name:n.t("Ireland"),code:"353",examplePhoneNumbers:["850123456"],shortCode:"IE"},"Isle of Man":{name:n.t("Isle of Man"),code:"44",examplePhoneNumbers:["7400123456"],shortCode:"IM"},Israel:{name:n.t("Israel"),code:"972",examplePhoneNumbers:["501234567"],shortCode:"IL"},Italy:{name:n.t("Italy"),code:"39",examplePhoneNumbers:["312 345 6789"],shortCode:"IT"},Jamaica:{name:n.t("Jamaica"),code:"1876",examplePhoneNumbers:["(201) 555-5555"],shortCode:"JM"},Japan:{name:n.t("Japan"),code:"81",examplePhoneNumbers:["9012345678"],shortCode:"JP"},Jersey:{name:n.t("Jersey"),code:"44",examplePhoneNumbers:["7400123456"],shortCode:"JE"},Jordan:{name:n.t("Jordan"),code:"962",examplePhoneNumbers:["790123456"],shortCode:"JO"},Kazakhstan:{name:n.t("Kazakhstan"),code:"7",examplePhoneNumbers:["912 345-67-89"],shortCode:"KZ"},Kenya:{name:n.t("Kenya"),code:"254",examplePhoneNumbers:["712123456"],shortCode:"KE"},Kiribati:{name:n.t("Kiribati"),code:"686",examplePhoneNumbers:["72012345"],shortCode:"KI"},Kosovo:{name:n.t("Kosovo"),code:"383",examplePhoneNumbers:["500 12345"],shortCode:"XK"},Kuwait:{name:n.t("Kuwait"),code:"965",examplePhoneNumbers:["500 12345"],shortCode:"KW"},Kyrgyzstan:{name:n.t("Kyrgyzstan"),code:"996",examplePhoneNumbers:["700123456"],shortCode:"KG"},"Lao People's Democratic Republic":{name:n.t("Lao People's Democratic Republic"),code:"856",examplePhoneNumbers:["2023123456"],shortCode:"LA"},Latvia:{name:n.t("Latvia"),code:"371",examplePhoneNumbers:["21 234 567"],shortCode:"LV"},Lebanon:{name:n.t("Lebanon"),code:"961",examplePhoneNumbers:["71 123 456"],shortCode:"LB"},Lesotho:{name:n.t("Lesotho"),code:"266",examplePhoneNumbers:["5012 3456"],shortCode:"LS"},Liberia:{name:n.t("Liberia"),code:"231",examplePhoneNumbers:["770123456"],shortCode:"LR"},Libya:{name:n.t("Libya"),code:"218",examplePhoneNumbers:["912345678"],shortCode:"LY"},Liechtenstein:{name:n.t("Liechtenstein"),code:"423",examplePhoneNumbers:["660 234 567"],shortCode:"LI"},Lithuania:{name:n.t("Lithuania"),code:"370",examplePhoneNumbers:["612 34567"],shortCode:"LT"},Luxembourg:{name:n.t("Luxembourg"),code:"352",examplePhoneNumbers:["628 123 456"],shortCode:"LU"},Macau:{name:n.t("Macau"),code:"853",examplePhoneNumbers:["66123456"],shortCode:"MO"},Macedonia:{name:n.t("Macedonia"),code:"389",examplePhoneNumbers:["72345678"],shortCode:"MK"},Madagascar:{name:n.t("Madagascar"),code:"261",examplePhoneNumbers:["321234567"],shortCode:"MG"},Malawi:{name:n.t("Malawi"),code:"265",examplePhoneNumbers:["991234567"],shortCode:"MW"},Malaysia:{name:n.t("Malaysia"),code:"60",examplePhoneNumbers:["123456789"],shortCode:"MY"},Maldives:{name:n.t("Maldives"),code:"960",examplePhoneNumbers:["771-2345"],shortCode:"MV"},Mali:{name:n.t("Mali"),code:"223",examplePhoneNumbers:["65 01 23 45"],shortCode:"ML"},Malta:{name:n.t("Malta"),code:"356",examplePhoneNumbers:["9696 1234"],shortCode:"MT"},"Marshall Islands":{name:n.t("Marshall Islands"),code:"692",examplePhoneNumbers:["235-1234"],shortCode:"MH"},Martinique:{name:n.t("Martinique"),code:"596",examplePhoneNumbers:["696201234"],shortCode:"MQ"},Mauritania:{name:n.t("Mauritania"),code:"222",examplePhoneNumbers:["22 12 34 56"],shortCode:"MR"},Mauritius:{name:n.t("Mauritius"),code:"230",examplePhoneNumbers:["5251 2345"],shortCode:"MU"},Mayotte:{name:n.t("Mayotte"),code:"262",examplePhoneNumbers:["692123456"],shortCode:"YT"},Mexico:{name:n.t("Mexico"),code:"52",examplePhoneNumbers:["12221234567"],shortCode:"MX"},Micronesia:{name:n.t("Micronesia"),code:"691",examplePhoneNumbers:["350 1234"],shortCode:"FM"},"Republic of Moldova":{name:n.t("Republic of Moldova"),code:"373",examplePhoneNumbers:["62112345"],shortCode:"MD"},Monaco:{name:n.t("Monaco"),code:"377",examplePhoneNumbers:["612345678"],shortCode:"MC"},Mongolia:{name:n.t("Mongolia"),code:"976",examplePhoneNumbers:["8812 3456"],shortCode:"MN"},Montenegro:{name:n.t("Montenegro"),code:"382",examplePhoneNumbers:["067 222 123"],shortCode:"ME"},Montserrat:{name:n.t("Montserrat"),code:"1664",examplePhoneNumbers:["(201) 555-5555"],shortCode:"MS"},Morocco:{name:n.t("Morocco"),code:"212",examplePhoneNumbers:["650123456"],shortCode:"MA"},Mozambique:{name:n.t("Mozambique"),code:"258",examplePhoneNumbers:["82 123 4567"],shortCode:"MZ"},Myanmar:{name:n.t("Myanmar"),code:"95",examplePhoneNumbers:["92123456"],shortCode:"MM"},Namibia:{name:n.t("Namibia"),code:"264",examplePhoneNumbers:["811234567"],shortCode:"NA"},Nauru:{name:n.t("Nauru"),code:"674",examplePhoneNumbers:["555 1234"],shortCode:"NR"},Nepal:{name:n.t("Nepal"),code:"977",examplePhoneNumbers:["984-1234567"],shortCode:"NP"},Netherlands:{name:n.t("Netherlands"),code:"31",examplePhoneNumbers:["612345678"],shortCode:"NL"},"New Caledonia":{name:n.t("New Caledonia"),code:"687",examplePhoneNumbers:["75.12.34"],shortCode:"NC"},"New Zealand":{name:n.t("New Zealand"),code:"64",examplePhoneNumbers:["211234567"],shortCode:"NZ"},Nicaragua:{name:n.t("Nicaragua"),code:"505",examplePhoneNumbers:["8123 4567"],shortCode:"NI"},Niger:{name:n.t("Niger"),code:"227",examplePhoneNumbers:["93 12 34 45"],shortCode:"NE"},Nigeria:{name:n.t("Nigeria"),code:"234",examplePhoneNumbers:["8021234567"],shortCode:"NG"},Niue:{name:n.t("Niue"),code:"683",examplePhoneNumbers:["1234"],shortCode:"NU"},"Norfolk Island":{name:n.t("Norfolk Island"),code:"672",examplePhoneNumbers:["3 81234"],shortCode:"NF"},"Northern Mariana Islands":{name:n.t("Northern Mariana Islands"),code:"1670",examplePhoneNumbers:["(201) 555-5555"],shortCode:"MP"},Norway:{name:n.t("Norway"),code:"47",examplePhoneNumbers:["406 12 345"],shortCode:"NO"},Oman:{name:n.t("Oman"),code:"968",examplePhoneNumbers:["9212 3456"],shortCode:"OM"},Pakistan:{name:n.t("Pakistan"),code:"92",examplePhoneNumbers:["3012345678"],shortCode:"PK"},Palau:{name:n.t("Palau"),code:"680",examplePhoneNumbers:["620 1234"],shortCode:"PW"},"State of Palestine":{name:n.t("State of Palestine"),code:"970",examplePhoneNumbers:["599123456"],shortCode:"PS"},Panama:{name:n.t("Panama"),code:"507",examplePhoneNumbers:["6001-2345"],shortCode:"PA"},"Papua New Guinea":{name:n.t("Papua New Guinea"),code:"675",examplePhoneNumbers:["681 2345"],shortCode:"PG"},Paraguay:{name:n.t("Paraguay"),code:"595",examplePhoneNumbers:["961345678"],shortCode:"PY"},Peru:{name:n.t("Peru"),code:"51",examplePhoneNumbers:["912 345 678"],shortCode:"PE"},Philippines:{name:n.t("Philippines"),code:"63",examplePhoneNumbers:["9051234567"],shortCode:"PH"},"Pitcairn Islands":{name:n.t("Pitcairn Islands"),code:"64",examplePhoneNumbers:["712345678"],shortCode:"PN"},Poland:{name:n.t("Poland"),code:"48",examplePhoneNumbers:["512 345 678"],shortCode:"PL"},Portugal:{name:n.t("Portugal"),code:"351",examplePhoneNumbers:["912 345 678"],shortCode:"PT"},"Puerto Rico":{name:n.t("Puerto Rico"),code:"1",examplePhoneNumbers:["(201) 555-5555"],shortCode:"PR"},Qatar:{name:n.t("Qatar"),code:"974",examplePhoneNumbers:["3312 3456"],shortCode:"QA"},"R\xe9union":{name:n.t("R\xe9union"),code:"974",examplePhoneNumbers:["692123456"],shortCode:"RE"},Romania:{name:n.t("Romania"),code:"40",examplePhoneNumbers:["712345678"],shortCode:"RO"},"Russian Federation":{name:n.t("Russian Federation"),code:"7",examplePhoneNumbers:["912 345-67-89"],shortCode:"RU"},Rwanda:{name:n.t("Rwanda"),code:"250",examplePhoneNumbers:["720123456"],shortCode:"RW"},"Saint Barth\xe9lemy":{name:n.t("Saint Barth\xe9lemy"),code:"590",examplePhoneNumbers:["690301234"],shortCode:"BL"},"Saint Helena":{name:n.t("Saint Helena"),code:"290",examplePhoneNumbers:["21234"],shortCode:"SH"},"Saint Kitts and Nevis":{name:n.t("Saint Kitts and Nevis"),code:"1869",examplePhoneNumbers:["(201) 555-5555"],shortCode:"KN"},"Saint Lucia":{name:n.t("Saint Lucia"),code:"1758",examplePhoneNumbers:["(201) 555-5555"],shortCode:"LC"},"Saint Martin":{name:n.t("Saint Martin"),code:"599",examplePhoneNumbers:["690301234"],shortCode:"MF"},"Saint Pierre and Miquelon":{name:n.t("Saint Pierre and Miquelon"),code:"508",examplePhoneNumbers:["551234"],shortCode:"PM"},"Saint Vincent and the Grenadines":{name:n.t("Saint Vincent and the Grenadines"),code:"1784",examplePhoneNumbers:["(201) 555-5555"],shortCode:"VC"},Samoa:{name:n.t("Samoa"),code:"685",examplePhoneNumbers:["601234"],shortCode:"WS"},"San Marino":{name:n.t("San Marino"),code:"378",examplePhoneNumbers:["66 66 12 12"],shortCode:"SM"},"S\xe3o Tom\xe9 and Pr\xedncipe":{name:n.t("S\xe3o Tom\xe9 and Pr\xedncipe"),code:"239",examplePhoneNumbers:["981 2345"],shortCode:"ST"},"Saudi Arabia":{name:n.t("Saudi Arabia"),code:"966",examplePhoneNumbers:["512345678"],shortCode:"SA"},Senegal:{name:n.t("Senegal"),code:"221",examplePhoneNumbers:["70 123 45 67"],shortCode:"SN"},Serbia:{name:n.t("Serbia"),code:"381",examplePhoneNumbers:["601234567"],shortCode:"RS"},Seychelles:{name:n.t("Seychelles"),code:"248",examplePhoneNumbers:["2 510 123"],shortCode:"SC"},"Sierra Leone":{name:n.t("Sierra Leone"),code:"232",examplePhoneNumbers:["25123456"],shortCode:"SL"},Singapore:{name:n.t("Singapore"),code:"65",examplePhoneNumbers:["8123 4567"],shortCode:"SG"},"Sint Maarten":{name:n.t("Sint Maarten"),code:"1721",examplePhoneNumbers:["(201) 555-5555"],shortCode:"SX"},Slovakia:{name:n.t("Slovakia"),code:"421",examplePhoneNumbers:["912123456"],shortCode:"SK"},Slovenia:{name:n.t("Slovenia"),code:"386",examplePhoneNumbers:["31234567"],shortCode:"SI"},"Solomon Islands":{name:n.t("Solomon Islands"),code:"386",examplePhoneNumbers:["74 21234"],shortCode:"SB"},Somalia:{name:n.t("Somalia"),code:"252",examplePhoneNumbers:["7 1123456"],shortCode:"SO"},"South Africa":{name:n.t("South Africa"),code:"27",examplePhoneNumbers:["711234567"],shortCode:"ZA"},"Republic of Korea":{name:n.t("Republic of Korea"),code:"82",examplePhoneNumbers:["1000000000"],shortCode:"KR"},"South Sudan":{name:n.t("South Sudan"),code:"211",examplePhoneNumbers:["977123456"],shortCode:"SS"},Spain:{name:n.t("Spain"),code:"34",examplePhoneNumbers:["612 34 56 78"],shortCode:"ES"},"Sri Lanka":{name:n.t("Sri Lanka"),code:"94",examplePhoneNumbers:["712345678"],shortCode:"LK"},Suriname:{name:n.t("Suriname"),code:"597",examplePhoneNumbers:["741-2345"],shortCode:"SR"},"Svalbard and Jan Mayen":{name:n.t("Svalbard and Jan Mayen"),code:"47",examplePhoneNumbers:["406 12 345"],shortCode:"SJ"},Swaziland:{name:n.t("Swaziland"),code:"268",examplePhoneNumbers:["7612 3456"],shortCode:"SZ"},Sweden:{name:n.t("Sweden"),code:"46",examplePhoneNumbers:["701234567"],shortCode:"SE"},Switzerland:{name:n.t("Switzerland"),code:"41",examplePhoneNumbers:["781234567"],shortCode:"CH"},Taiwan:{name:n.t("Taiwan"),code:"886",examplePhoneNumbers:["912345678"],shortCode:"TW"},Tajikistan:{name:n.t("Tajikistan"),code:"992",examplePhoneNumbers:["917 12 3456"],shortCode:"TJ"},Tanzania:{name:n.t("Tanzania"),code:"255",examplePhoneNumbers:["621234567"],shortCode:"TZ"},Thailand:{name:n.t("Thailand"),code:"66",examplePhoneNumbers:["812345678"],shortCode:"TH"},"Timor-Leste":{name:n.t("Timor-Leste"),code:"670",examplePhoneNumbers:["7721 2345"],shortCode:"TL"},Togo:{name:n.t("Togo"),code:"228",examplePhoneNumbers:["90 11 23 45"],shortCode:"TG"},Tokelau:{name:n.t("Tokelau"),code:"690",examplePhoneNumbers:["7290"],shortCode:"TK"},Tonga:{name:n.t("Tonga"),code:"676",examplePhoneNumbers:["771 5123"],shortCode:"TO"},"Trinidad and Tobago":{name:n.t("Trinidad and Tobago"),code:"1868",examplePhoneNumbers:["(201) 555-5555"],shortCode:"TT"},Tunisia:{name:n.t("Tunisia"),code:"216",examplePhoneNumbers:["20 123 456"],shortCode:"TN"},Turkey:{name:n.t("Turkey"),code:"90",examplePhoneNumbers:["501 234 5678"],shortCode:"TR"},Turkmenistan:{name:n.t("Turkmenistan"),code:"993",examplePhoneNumbers:["66123456"],shortCode:"TM"},"Turks and Caicos Islands":{name:n.t("Turks and Caicos Islands"),code:"1649",examplePhoneNumbers:["(201) 555-5555"],shortCode:"TC"},Tuvalu:{name:n.t("Tuvalu"),code:"688",examplePhoneNumbers:["901234"],shortCode:"TV"},"U.S. Virgin Islands":{name:n.t("U.S. Virgin Islands"),code:"1340",examplePhoneNumbers:["(201) 555-5555"],shortCode:"VI"},Uganda:{name:n.t("Uganda"),code:"256",examplePhoneNumbers:["712345678"],shortCode:"UG"},Ukraine:{name:n.t("Ukraine"),code:"380",examplePhoneNumbers:["391234567"],shortCode:"UA"},"United Arab Emirates":{name:n.t("United Arab Emirates"),code:"971",examplePhoneNumbers:["501234567"],shortCode:"AE"},"United Kingdom":{name:n.t("United Kingdom"),code:"44",examplePhoneNumbers:["7400123456"],shortCode:"GB"},"United States":{name:n.t("United States"),code:"1",examplePhoneNumbers:["(201) 555-5555"],shortCode:"US",rawName:"United States"},Uruguay:{name:n.t("Uruguay"),code:"598",examplePhoneNumbers:["94231234"],shortCode:"UY"},Uzbekistan:{name:n.t("Uzbekistan"),code:"998",examplePhoneNumbers:["912345678"],shortCode:"UZ"},Vanuatu:{name:n.t("Vanuatu"),code:"678",examplePhoneNumbers:["591 2345"],shortCode:"VU"},"Vatican City":{name:n.t("Vatican City"),code:"39",examplePhoneNumbers:["312 345 6789"],shortCode:"VA"},Venezuela:{name:n.t("Venezuela"),code:"58",examplePhoneNumbers:["4121234567"],shortCode:"VE"},Vietnam:{name:n.t("Vietnam"),code:"84",examplePhoneNumbers:["91 234 56 78"],shortCode:"VN"},"Wallis and Futuna":{name:n.t("Wallis and Futuna"),code:"681",examplePhoneNumbers:["50 12 34"],shortCode:"WF"},"Western Sahara":{name:n.t("Western Sahara"),code:"212",examplePhoneNumbers:["650123456"],shortCode:"EH"},Yemen:{name:n.t("Yemen"),code:"967",examplePhoneNumbers:["712345678"],shortCode:"YE"},Zambia:{name:n.t("Zambia"),code:"260",examplePhoneNumbers:["955123456"],shortCode:"ZM"},Zimbabwe:{name:n.t("Zimbabwe"),code:"263",examplePhoneNumbers:["711234567"],shortCode:"ZW"}})},0x1cc943c8d:(e,t,a)=>{"use strict";a.d(t,{YQ:()=>i,f$:()=>l,fe:()=>normalizeKeyboardFromDesktop,kB:()=>keyEquivalent,ty:()=>keyCodeEquivalent});var n=a(0xca924ee1),r=a(0x62a17882);let i="us",l={br:"Brazilian","br-ABNT":"Brazilian (ABNT)",de:"Deutsch",[i]:"English (US)",es:"Espa\xf1ol",fr:"Fran\xe7ais",gb:"English (UK)",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4",it:"Italiano","zh-pinyin":"\u62FC\u97F3","zh-cangjie-zhuyin":"\u5009\u9821\u4EE5\u53CA\u6CE8\u97F3"},o=(0,n.A)(()=>({"`":{es:"\xba",fr:"@",de:"^",ja:"@"},"~":{es:"\xaa",fr:"#",de:"\xb0"},"/":{es:"'",fr:",",de:"\xf6",it:"\xe0",ja:"\u30FB","br-ABNT":";"},"\\":{es:"\xa1",fr:"`",de:"#",it:"\xf9",ja:"_","br-ABNT":"\xe7","zh-pinyin":(0,r.uF)()?"\\":"\u3001","zh-cangjie-zhuyin":(0,r.uF)()?"\\":"\u3001"},",":{ru:"<"},".":{fr:";","zh-cangjie-zhuyin":(0,r.uF)()?".":"\u3002",ru:">"},"{":{it:";"},"}":{it:":"},"[":{it:",","zh-cangjie-zhuyin":"\u300C"},"]":{it:".","zh-cangjie-zhuyin":"\u300D"}})),s=/\[(\d+)\]/,normalizeKeyboardFromDesktop=e=>{if(!e)return i;let t=(0,r.j9)()?(e=>{let t=e.split(","),a=t.pop();if(!a)return i;let n=a.match(s);return n?t[parseInt(n[1],10)]:i})(e):e;return/^de$|\.german|00000407$/i.test(t)?"de":/^fr$|\.french|0000040c$/i.test(t)?"fr":/^es$|\.spanish|0000040a$/i.test(t)?"es":/^jp$|\.japanese|0411$/i.test(t)?"ja":/^br$|\.brazilian$|Brazilian-Pro$/i.test(t)?"br":/^br$|\.brazilian-ABNT2|0416$/i.test(t)?"br-ABNT":/^gb$|\.british$|00000809$/i.test(t)||/^gb$|\.british-PC/i.test(t)?"gb":/^kr$|\.korean|0412$/i.test(t)?"ko":/^it$|\.italian|Italian-Pro|0410$/i.test(t)?"it":/^zh$|\.SCIM.ITABC|\.TCIM.Pinyin|0804$|1004$/i.test(t)?"zh-pinyin":/^zh$|\.TCIM.Cangjie|\.TCIM.Zhuyin|0404$|0c04$/i.test(t)?"zh-cangjie-zhuyin":i},c=(0,n.A)(()=>({190:{fr:186},191:{es:222,fr:188,de:(0,r.uF)()?192:186,"br-ABNT":(0,r.uF)()?191:186,it:222},219:{it:186},220:{es:187,de:(0,r.uF)()?191:222,ja:189,"br-ABNT":186,ru:(0,r.uF)()?222:220},221:{it:186}})),normalizeKeyboardLocale=e=>"en-US"===e?"us":l[e]?e:normalizeKeyboardFromDesktop(e),keyCodeEquivalent=(e,{kb:t=i,useReverseMap:a=!1}={})=>{let n=normalizeKeyboardLocale(t),r=c();if(a){let t,a,r=(t=c(),a={},Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{a[n]=a[n]||{},a[n][t[e][n]]=parseInt(e,10)})}),a);if(n!==i&&r[n]&&r[n][e])return r[n][e]}return n!==i&&r[e]&&r[e][n]?r[e][n]:e},keyEquivalent=(e,{kb:t=i}={})=>{let a=normalizeKeyboardLocale(t),n=o();return a!==i&&n[e]&&n[e][a]?n[e][a]:e}},0x188c863db:(e,t,a)=>{"use strict";a.d(t,{v:()=>getLocalizedPath});var n=a(0x190e60a66);function getLocalizedPath(e){let t=(0,n.F)().getLocaleForLastViewedTeam().toLowerCase();return"en-us"===t?e:`/intl/${t}${e}`}},0x3c6b702a:(e,t,a)=>{"use strict";a.d(t,{A:()=>i,l:()=>fullPossessiveString});var n=a(0x190e60a66),r=a(0x1e49806fc);function possessive(e,{locale:t=(0,n.F)().getLocaleForLastViewedTeam()}={}){let a=e;switch(!a&&(a=""),t){case"fr-FR":return(0,r.A)(a).match(/^[aeiouy]/i)?"d\u2019":"de ";case"es-ES":case"es-LA":case"pt-BR":return"de ";case"de-DE":return a.match(/[s\u00DFxz]$/i)?"\u2019":"s";case"ja-JP":return"\u306E";case"ko-KR":return"\uC758";case"it-IT":return"di ";case"zh-CN":case"zh-TW":return" \u7684";case"en-US":case"en-GB":return"\u2019s";default:return""}}function fullPossessiveString(e,{locale:t=(0,n.F)().getLocaleForLastViewedTeam()}={}){switch(t){case"es-ES":case"es-LA":case"fr-FR":case"pt-BR":case"it-IT":return possessive(e,{locale:t})+e;default:return e+possessive(e,{locale:t})}}let i=possessive},0x1ee978dcb:(e,t,a)=>{"use strict";a.d(t,{A:()=>isButtonElement});let n=["button","submit","reset"];function isButtonElement(e){if(!e)return!1;let t=e.nodeName;return"BUTTON"===t||"INPUT"===t&&n.includes(e.getAttribute("type")||"")}},0x101e2cd2a:(e,t,a)=>{"use strict";function isKeyboardClick(e){return!!e&&!e.detail}a.d(t,{A:()=>isKeyboardClick})},0xbd195de6:(e,t,a)=>{"use strict";function isPrintableKeyEvent(e){return!!e&&!e.metaKey&&!e.ctrlKey&&e.key?.length===1}a.d(t,{A:()=>isPrintableKeyEvent})},0xda9cd3e5:(e,t,a)=>{"use strict";a.d(t,{W:()=>isSerializable});var n=a(0x33644bb7),r=a(0x6660b3e7),i=a(0x1598e5174),l=a(0x244f35bf8);function isSerializable(e){return null==e||!((0,n.A)(e)||(0,r.A)(e)&&e!==Symbol.for("react.element")||"object"==typeof e&&"then"in e&&(0,n.A)(e.then))&&((0,i.A)(e)?Object.values(e).every(e=>isSerializable(e)):(0,l.A)(e)?e.every(isSerializable):e!==Object(e))}},0x1c3b3efd5:(e,t,a)=>{"use strict";a.d(t,{q:()=>isUnifiedUserAppPopoutsEnabled,z:()=>i});var n=a(0xd6ba6894),r=a(0x12c020c3);let i={unified_user_app_popouts:"1"};function isUnifiedUserAppPopoutsEnabled(){return(0,r.qN)(n.J.location.href).unified_user_app_popouts===i.unified_user_app_popouts}},0x1bbd404d7:(e,t,a)=>{"use strict";a.d(t,{Q:()=>noopNull});let noopNull=()=>null},0x1f1251cca:(e,t,a)=>{"use strict";a.d(t,{G:()=>PubSub});var n=a(0x16a98fd3c);let PubSub=class PubSub{publishers={};createPublisher(e){return this.publishers[e]=new n.D,this.publishers[e]}publish(e,t){let a=this.publishers[e];a&&a.publish(t)}subscribe(e,t){(this.publishers[e]||this.createPublisher(e)).subscribe(t)}unsubscribe(e,t){let a=this.publishers[e];a&&(a.unsubscribe(t),0===a.subscriberCount&&delete this.publishers[e])}}},0x16a98fd3c:(e,t,a)=>{"use strict";a.d(t,{D:()=>UnaryPubSub});var n=a(0x1f4e32220);let UnaryPubSub=class UnaryPubSub{subscribers=[];get subscriberCount(){return this.subscribers.length}subscribe(e){this.subscribers.push(e)}unsubscribe(e){(0,n.A)(this.subscribers,e)}publish(e){for(let t of this.subscribers)t(e)}}},0x1fc4d7d9f:(e,t,a)=>{"use strict";a.d(t,{B:()=>PureComponentDepth2,I:()=>i.A});var n=a(0xbad225b5),r=a(0x1a256ff50);let PureComponentDepth2=class PureComponentDepth2 extends n.Component{shouldComponentUpdate(e,t){return!(0,r.Ay)(e,this.props,2)||!(0,r.Ay)(t,this.state,2)}};var i=a(0x1bc10b4dc)},0x1bc10b4dc:(e,t,a)=>{"use strict";a.d(t,{A:()=>PureComponentDepth3});var n=a(0xbad225b5),r=a(0x1a256ff50);let PureComponentDepth3=class PureComponentDepth3 extends n.Component{shouldComponentUpdate(e,t){return!(0,r.Ay)(e,this.props,3)||!(0,r.Ay)(t,this.state,3)}}},0xef6027c8:(e,t,a)=>{"use strict";a.d(t,{A:()=>waitForTransitionEnd});var n=a(0xe874a88a);function waitForTransitionEnd(e,t,a){return new n.S((n,r)=>{let endHandler=a=>{a.propertyName===t&&(n(a),e.removeEventListener("transitionend",endHandler))};e.addEventListener("transitionend",endHandler),a&&a>0&&setTimeout(()=>{r(Error("maxWaitTime exceeded")),e.removeEventListener("transitionend",endHandler)},a)})}},0x202bd965c:(e,t,a)=>{"use strict";a.d(t,{i:()=>useUiComponents,w:()=>r});var n=a(0xbad225b5);let r=n.createContext(void 0),useUiComponents=()=>{let e=n.useContext(r);if(!e)throw Error("useUiComponents must be used within a UiComponentsProvider");return e}},0xb0cb9380:(e,t,a)=>{"use strict";a.d(t,{Yu:()=>n,k4:()=>i,zx:()=>r});let n="knob_",r="pref_",i="theme"},0x1924cb250:(e,t,a)=>{"use strict";a.d(t,{S:()=>o});var n=a(0xbad225b5),r=a(0xca924ee1),i=a(0x220a941b7),l=a(0x202bd965c);let o=(0,r.A)(()=>({Component:function(e){let{Checkbox:t,Label:a}=(0,l.i)(),{onChange:r}=e,o=(0,n.useCallback)(e=>{r(!!e.target.checked)},[r]),s=(0,n.useMemo)(()=>n.createElement("strong",null,e.name),[e.name]);return n.createElement(a,{text:s,type:"inline",cursor:"pointer"},n.createElement(t,{name:(0,i.A)(e.name),checked:!!e.value,indeterminate:null===e.value,onChange:o}))},toString:e=>"boolean"==typeof e?e?"1":"0":null,fromString:e=>"string"!=typeof e?null:"0"!==e}))},0x1bc0f0590:(e,t,a)=>{"use strict";a.d(t,{C:()=>selectKnobDefinition});var n=a(0xbad225b5),r=a(0x220a941b7),i=a(0x202bd965c);function hasKey(e){return!!e.key}function selectKnobDefinition(e){let valueToOption=t=>e.find(e=>e.value===t);return{Component:function(t){let{Label:a,Select:l}=(0,i.i)(),{onChange:o}=t,s=(0,n.useCallback)(e=>{o(e.value)},[o]);return n.createElement(a,{text:t.name},n.createElement(l,{options:e,selectedOption:valueToOption(t.value),selectId:(0,r.A)(t.name),onOptionSelected:s,width:"100%",isRequired:void 0===t.defaultValue}))},toString:e=>{let t=valueToOption(e);return t?hasKey(t)?t.key:t.value:null},fromString:t=>{let a=e.find(e=>e.key===t||e.value===t);return a?a.value:null}}}selectKnobDefinition.displayName="selectKnobDefinition"},0x21ccc05ad:(e,t,a)=>{"use strict";a.d(t,{Z:()=>updateQueryString,v:()=>getQueryParams});var n=a(0xd6ba6894);let r=(0,a(0x5739d664).A)(e=>new URLSearchParams(e)),getQueryParams=()=>r(n.J.location.search),updateQueryString=(e,t)=>{let a=getQueryParams();"string"==typeof t?a.set(e,t):a.delete(e);let r=`${n.J.location.href.split("?")[0]}?${a.toString()}`;n.J.history.replaceState(null,"",r)}},0x1e37e0bc1:(e,t,a)=>{"use strict";a.d(t,{f:()=>m,A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x22ba45688),o=a(0x1f7a86bf5),s=a(0x1229d92d),c=a(0x18dac2b8e),d=a(0x14abc22b0);let BaseAriaLiveRegion=e=>{let t=i()("c-aria_live_announcer_api"),a=(0,n.useRef)(null);return(0,n.useEffect)(()=>{a.current.textContent=e.message},[e.message]),n.createElement("div",{ref:a,className:t,"data-qa":`sk_aria_live_region_${e["aria-live"]}`,role:e.role,"aria-live":e["aria-live"],"aria-atomic":"true"})};BaseAriaLiveRegion.displayName="BaseAriaLiveRegion";let m="\xa0",u=class extends n.Component{static displayName="AnnouncerAPIProvider";static defaultProps={children:void 0};value;liveRegion;constructor(e){super(e);const t=e.windowRef.deref().document.createElement("div"),a=i()("c-aria_live_announcer_api_container","c-aria_live_announcer_api");t.setAttribute("class",a),this.liveRegion=t,this.state={assertive:{message:"",uuid:"",originalMessage:""},polite:{message:"",uuid:"",originalMessage:""}},this.sendMessageToAnnouncerAPI=this.sendMessageToAnnouncerAPI.bind(this),this.value={sendMessageToAnnouncerAPI:this.sendMessageToAnnouncerAPI}}componentDidMount(){(0,c.Cu)()&&this.props.windowRef.deref()?.document.querySelector(".c-aria_live_announcer_api_container")&&this.props.logger.warn("ANNOUNCER-API","Attempting to mount another AnnouncerAPIProvider. AnnouncerAPIProvider was already mounted above in the component tree and is ready to be used."),this.props.windowRef.deref()?.document.body.appendChild(this.liveRegion)}componentWillUnmount(){this.props.windowRef.deref()?.document.body.removeChild(this.liveRegion)}getLiveRegions(){let{assertive:e,polite:t}=this.state;return n.createElement(n.Fragment,null,n.createElement(BaseAriaLiveRegion,{"aria-live":"assertive",role:"alert",message:e.message}),n.createElement(BaseAriaLiveRegion,{"aria-live":"polite",role:"log",message:t.message}))}sendMessageToAnnouncerAPI({message:e="",assertive:t=!1,uuid:a=""}){if(!e)return;let n=t?"assertive":"polite",r=this.state[n];if(e===r.originalMessage&&a===r.uuid){(0,c.Cu)()&&this.props.logger.warn("ANNOUNCER-API",`Deduping a repeating aria-live="${n}" message to the screen reader: "${e}"`,'To prevent this, please pass a "uuid" prop to Announcer API component.');return}let i=e.trim();i===r.message&&(i+=m),this.setState(()=>({[n]:{message:i,uuid:a,originalMessage:e}})),(0,c.Cu)()&&this.props.logger.info("ANNOUNCER-API",`Sending an aria-live="${n}" message to the screen reader: "${i}"`)}render(){return n.createElement(d.A.Provider,{value:this.value},this.props.children,l.createPortal(this.getLiveRegions(),this.liveRegion))}};u.displayName="AnnouncerAPIProvider";let p=(0,o.V)((0,s.A)(u))},0xd3c52762:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x14fad6485),l=a(0x1f7a86bf5),o=a(0x1229d92d),s=a(0x62a17882),c=a(0x15279822),d=a(0x224f7f0e9);let m={},u={},focusFirstInClient=e=>{let t=(0,c.Fp)(e.getElementById("client-ui"));t&&t.focus()},focusLastInClient=e=>{let t=(0,c.LQ)(e.getElementById("client-ui"));t&&t.focus()},onDocumentKeyDown=(e,{keyCode:t,type:a,shiftKey:n,ctrlKey:r,metaKey:i})=>{let l=u[e];t!==d.wn||r||(0,s.cX)()&&i||(l.keydownTimeoutId&&clearTimeout(l.keydownTimeoutId),l.relatedEvent={type:a,keyCode:t,shiftKey:n},l.keydownTimeoutId=setTimeout(()=>{l.relatedEvent=null},15))},onDocumentMouseDown=(e,{type:t})=>{let a=u[e];a.mousedownTimeoutId&&clearTimeout(a.mousedownTimeoutId),a.relatedEvent={type:t},a.mousedownTimeoutId=setTimeout(()=>{a.relatedEvent=null},15)},onDocumentFocus=(e,t)=>{let{currentTarget:a,target:n,relatedTarget:r}=t,i=u[e],l=i.relatedEvent,o=l&&"keydown"===l.type?l:null,s=i.firstHiddenTabStop,c=i.lastHiddenTabStop,d=n===s,m=n===c;if(n!==a){if(d&&o){if(o.shiftKey)return void n.blur();if(!r)return void focusFirstInClient(a)}if(m&&o)return void(o.shiftKey?focusLastInClient(a):n.blur());if(!r&&!o&&(d||m)){if(i.relatedEvent={type:"keydown",shiftKey:!1,keyCode:9},d){focusFirstInClient(a),i.relatedEvent=null;return}m&&(focusLastInClient(a),i.relatedEvent=null)}}},onDocumentBlur=(e,t)=>{let{currentTarget:a,relatedTarget:n}=t,r=u[e];r.blurTimeoutId&&(clearTimeout(r.blurTimeoutId),r.blurTimeoutId=null);let{shiftKey:i,type:l,keyCode:o}=r.relatedEvent||{};n||"keydown"!==l||(r.blurTimeoutId=setTimeout(()=>{a.activeElement!==a.body||(r.relatedEvent={type:l,shiftKey:i,keyCode:o},(i?focusLastInClient:focusFirstInClient)(a),r.relatedEvent=null)},150))},p=class extends n.PureComponent{static defaultProps={children:null,onFocusEnter:r.A,onFocusWithin:r.A,onFocusLeave:r.A,windowRef:i.Jh.windowRef};constructor(e){super(e),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}componentDidMount(){let e=n.Children.only(this.props.children);"function"==typeof e.type&&this.checkChildIsValid(e);let{windowRef:t,windowId:a=i.Ab}=this.props,r=t.deref()?.document;if(!r)return void this.props.logger.warn("FOCUS-MANAGER","FocusManager does not have a document (mount)");if(!m[a]){m[a]=0,u[a]={firstHiddenTabStop:null,lastHiddenTabStop:null,onDocumentBlur:onDocumentBlur.bind(null,a),onDocumentFocus:onDocumentFocus.bind(null,a),onDocumentKeyDown:onDocumentKeyDown.bind(null,a),onDocumentMouseDown:onDocumentMouseDown.bind(null,a),relatedEvent:null,blurTimeoutId:null,keydownTimeoutId:null,mousedownTimeoutId:null};let e=u[a];if((0,s.y3)())r.addEventListener("blur",e.onDocumentBlur,!0);else{let t,n,i,l;(t=r.createElement("div")).innerHTML='<div aria-hidden="true" style="position:absolute" tabindex="1"></div><div aria-hidden="true" style="position:absolute" tabindex="0"></div>',n=t.firstChild,i=t.lastChild,l=r.body,n&&i&&(l.insertBefore(n,l.firstChild),l.appendChild(i),u[a].firstHiddenTabStop=n,u[a].lastHiddenTabStop=i),r.addEventListener("focus",e.onDocumentFocus,!0)}r.addEventListener("keydown",e.onDocumentKeyDown,!0),r.addEventListener("mousedown",e.onDocumentMouseDown,!0)}m[a]+=1}componentWillUnmount(){let{windowRef:e,windowId:t=i.Ab}=this.props,a=e.deref()?.document;if(!a)return void this.props.logger.warn("FOCUS-MANAGER","FocusManager does not have a document (unmount)");if(m[t]-=1,0===m[t]){let e=u[t];(0,s.y3)()?a?.removeEventListener("blur",e.onDocumentBlur,!0):(((e,t)=>{let{firstHiddenTabStop:a,lastHiddenTabStop:n}=u[t];a&&e?.body.removeChild(a),n&&e?.body.removeChild(n)})(a,t),a?.removeEventListener("focus",e.onDocumentFocus,!0)),a?.removeEventListener("keydown",e.onDocumentKeyDown,!0),a?.removeEventListener("mousedown",e.onDocumentMouseDown,!0),e.blurTimeoutId&&clearTimeout(e.blurTimeoutId),e.keydownTimeoutId&&clearTimeout(e.keydownTimeoutId),e.mousedownTimeoutId&&clearTimeout(e.mousedownTimeoutId),delete m[t],delete u[t]}}onBlur(e){let{currentTarget:t,target:a,relatedTarget:n}=e;!t.contains(n)&&this.props.onFocusLeave&&this.props.onFocusLeave({relatedTarget:n,currentTarget:t,target:a})}onFocus(e){let{currentTarget:t,target:a,relatedTarget:n}=e,{windowId:r=i.Ab}=this.props,{relatedEvent:l}=u[r];if(!t?.contains(a))return;let o=t.contains(n)?this.props.onFocusWithin:this.props.onFocusEnter;o&&o({relatedTarget:n,currentTarget:t,target:a,relatedEvent:l})}checkChildIsValid(e){let{onFocus:t,onBlur:a}=e.props;if(!(t&&a))throw Error("FocusManager requires a single child with onFocus and onBlur props.")}render(){let e=this.props.children;return n.cloneElement(e,{onFocus:this.onFocus,onBlur:this.onBlur},e.props.children)}};p.displayName="FocusManager";let h=(0,l.V)((0,o.A)(p))},0x1dbf5c48b:(e,t,a)=>{"use strict";a.d(t,{I:()=>n});let n=(0,a(0xbad225b5).createContext)({useARIAApplicationForListViews:!1})},0xa942d25:(e,t,a)=>{"use strict";a.d(t,{A:()=>isInlineAriaWidget});var n=a(0x1ee978dcb);let r=["radio","searchbox","slider","spinbutton","switch","textbox","combobox","listbox","option"];function isInlineAriaWidget(e){if(!e)return!1;if((0,n.A)(e)&&e.matches('[role="toolbar"] button, [role="toolbar"] input'))return!0;let t=e.getAttribute("role");return!!t&&r.includes(t)}},0x5896a0f9:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x7a622ec8),r=a.n(n),i=a(0x62a17882);let l=r()("f6"),o=r()("right"),s=r()("left"),__WEBPACK_DEFAULT_EXPORT__=(e,t,a)=>{let n=(0,i.cX)();return!!t&&!!a&&!!n&&(e===o||e===s)||e===l&&((0,i.y3)()?!t&&!a:n?t&&!a:!n&&a&&!t)}},0x11fe26014:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x11a296110),s=a(0x15f8e452a),c=a(0x99233ecb),d=a(0x4c96e5d9);let ActionButton=({icon:e,customClasses:t,"data-qa":a,ariaLabel:r,menuProps:m,menuOffsetY:u=0,menuOffsetX:p=0,tooltip:h,tooltipPosition:_="top",onClick:f=l.A,onMenuTriggerClick:b=l.A,buttonText:g,href:y,autoClogProps:A})=>{let x=(0,n.useCallback)(()=>{let l=i()("c-action_buttons__icon",t),c=n.createElement(o.Nm,{className:i()("c-action_buttons__button",{"c-action_buttons__button--text":!e&&g}),onClick:f,"data-qa":a,"aria-label":r,href:y,autoClogProps:A},e?n.createElement(s.A,{className:l,type:e}):n.createElement("span",{className:t,"data-qa":"action_button_text"},g));return h?n.createElement(d.Ay,{tip:h,position:_,offsetY:-5},c):c},[r,g,t,y,e,f,h,_,A,a]),E=(0,n.useCallback)(e=>m?n.createElement(c.cQ,{onClick:b,position:"bottom-right",offsetY:u,offsetX:p,...m},e):null,[m,b,u,p]),C=x();return m?E(C):C};ActionButton.displayName="ActionButton";let m=n.memo(ActionButton)},0x17edff9e2:(e,t,a)=>{"use strict";a.d(t,{A:()=>AspectBox});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);function AspectBox({width:e,height:t,className:a,style:r,children:l,unsetWidthStyle:o}){let s=(0,n.useMemo)(()=>({...r,width:o?void 0:e}),[e,r,o]),c=(0,n.useMemo)(()=>({paddingTop:`${t/e*100}%`}),[t,e]);return n.createElement("div",{className:i()("c-aspect_box__outer",a),style:s},n.createElement("div",{className:"c-aspect_box__inner",style:c},n.createElement("div",{className:"c-aspect_box__content"},l)))}AspectBox.displayName="AspectBox",AspectBox.displayName="AspectBox"},0x236a5cd68:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x17edff9e2).A},0xd9faf062:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>S,Gs:()=>C,QE:()=>A,al:()=>k});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x220f8fb41),c=a(0x1407c6c2c),d=a(0x22c5b2158),m=a(0xb97b797e),u=a(0x15279822),p=a(0x20482ad21),h=a(0x5739d664),_=a(0x12edaa96a),f=a(0x344bb842),b=a(0x543aca4e),g=a(0x44ce343e);let y=new p.Ay("sk_banner");var A=((n={}).info="info",n.success="success",n.warning="warning",n.urgent="urgent",n.neutral="neutral",n);let x={elementName:"close",elementType:s.RJ.X,action:s.lG.CLOSE,onClick:{enableClogAction:!0}},E=(0,h.A)((e,t)=>({top:e,opacity:t})),C={type:"success",showCloseButton:!0,autoFadeout:!1,topOffset:0,className:null,isFixedPosition:!0,"data-qa":"banner",onClose:o.A,onFocus:o.A,onBlur:o.A,closeOnDismiss:!0},k=class extends r.PureComponent{static displayName="Banner";static defaultProps=C;banner;textContent;cancelAnimation;textContentId;constructor(e){super(e),(0,m.v)(this,["onCloseButtonClick","onKeyDown","focus","setRef","maybeRemoveAriaDescribedBy"]),this.cancelAnimation=o.A,this.banner=r.createRef(),this.textContent=r.createRef(),this.textContentId=(0,_.A)();const{"aria-describedby":t}=e;this.state={isShowing:!0,opacity:1,describedbyId:t||this.textContentId}}getIsPersistent(){let{closeOnDismiss:e,showCloseButton:t}=this.props;return!e&&!t}componentDidMount(){this.fadeOutMaybe(),this.maybeRemoveAriaDescribedBy()}componentWillUnmount(){this.cancelAnimation()}fadeOutMaybe(){let{autoFadeout:e,onClose:t}=this.props;if(!e)return;let a=(0,d.A)({delay:2e3,fromValue:1,toValue:0,duration:2e3,easing:"easeOutQuad",onTick:({value:e,nextTick:t})=>{this.setState(()=>({opacity:e})),t()},onComplete:()=>{this.setState(()=>({isShowing:!1})),t?.()}});this.cancelAnimation=a.cancel}setRef(e){this.banner&&(this.banner.current=e),this.props.innerRef?.(e)}focus(){let e=(0,u.Fp)(this.banner.current);e&&e.focus()}close(){let{onClose:e,closeOnDismiss:t}=this.props;t&&this.setState(()=>({isShowing:!1})),e?.()}onCloseButtonClick(){this.close()}onKeyDown(e){let{showCloseButton:t}=this.props,a=this.getIsPersistent();"Escape"!==e.key||!t||a||this.close()}maybeRemoveAriaDescribedBy(){let{"aria-describedby":e}=this.props;e||this.textContent?.current?.querySelectorAll("a,button").length&&this.state.describedbyId&&this.setState(()=>({describedbyId:void 0}))}renderLabel(){let{type:e,"aria-label":t,"aria-labelledby":a}=this.props;if(!a)return t||("info"===e||"neutral"===e?y.t("Information"):"success"===e?y.t("Success"):"warning"===e?y.t("Warning"):"urgent"===e?y.t("Urgent"):y.t("Information"))}render(){let{type:e,children:t,showCloseButton:a,topOffset:n,className:i,isFixedPosition:o,dismissButtonLabel:s,"data-qa":c,onFocus:d,onBlur:m,"aria-labelledby":u}=this.props,{isShowing:p,opacity:h,describedbyId:_}=this.state;if(!p)return!1;let b=l()("c-banner",{[`c-banner--${e}`]:!!e,"c-banner--fixed":o},i),g=y.t("Close"),A=this.getIsPersistent();return r.createElement("div",{role:A?"group":"dialog","aria-label":this.renderLabel(),"aria-labelledby":u,"aria-describedby":_,className:b,style:n?E(n,h):void 0,"data-qa":c,ref:this.setRef,onFocus:d,onBlur:m,onKeyDown:this.onKeyDown},r.createElement("div",{id:this.textContentId,className:"c-banner__text",ref:this.textContent},t),a&&r.createElement(f.A,{className:"c-banner__close",onClick:this.onCloseButtonClick,backgroundStyle:"warning"!==e?"dark":"light","aria-label":s||g,autoClogProps:x,"data-qa":"banner_close_btn",svgIconProps:{name:"close"}}))}};k.displayName="Banner";let v=(0,r.forwardRef)(({enableSectionNavigation:e=!1,...t},a)=>{let{managedFocusContainer:n}=(0,b.ow)(),i=(0,c.A)(),l=`Banner_${i}`;if(!n)return r.createElement(k,{ref:a,...t});let s=n.Component,d=n.workspaceSwitcherTabListSectionIndex;return r.createElement(s,{id:l,index:d,focusFn:o.A,enableSectionNavigation:e},r.createElement(k,{ref:a,...t}))}),S=(0,g.A)(v)},0xc7cbdeb4:(e,t,a)=>{"use strict";a.d(t,{A:()=>d,p:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x23619f41c);let o=24,s="c-base_icon_image_stacked__image c-base_icon_image_stacked__image--top",c="c-base_icon_image_stacked__svg";function ImageStackedBaseIcon({primaryImage:e,secondaryImage:t,PrimaryHiddenUserComponent:a,SecondaryHiddenUserComponent:r,className:d,ariaHidden:m}){let u;return u=t?n.createElement("image",{clipPath:"url(#c-base_icon_image_stacked__clip)",width:o,height:o,xlinkHref:t,"data-qa":"image-secondary"}):n.createElement("rect",{className:"c-base_icon_image_stacked__image--missing",clipPath:"url(#c-base_icon_image_stacked__clip)",width:o,height:o,"data-qa":"image-secondary"}),n.createElement("div",{"aria-hidden":m,className:i()("c-base_icon_image_stacked",d)},r?n.createElement(r,{"data-qa":"image-secondary",className:c,size:o}):n.createElement("svg",{className:c,height:o,width:o,"aria-hidden":"true"},n.createElement("clipPath",{id:"c-base_icon_image_stacked__clip"},n.createElement("path",{d:"M0,0 L28,0 L28,10 L16,10 C13,10 10,13 10,16 L10,28 L0,28 L0,0 Z"})),u,n.createElement("path",{className:"c-base_icon_image_stacked__svg_stroke",d:"M10,23.5 L5,23.5 C2,23.5 0.5,22 0.5,20 L0.5,3.5 C0.5,2 2,0.5 3.5,0.5 L20.5,0.5 C22,0.5 23.5,2 23.5,3.5 L23.5,10"})),a?n.createElement(a,{"data-qa":"image-primary",className:s,size:o}):n.createElement(l.A,{image:e,classes:s,size:o,ariaHidden:!0,"data-qa":"image-primary"}))}ImageStackedBaseIcon.displayName="ImageStackedBaseIcon";let d=ImageStackedBaseIcon},0x1651509ed:(e,t,a)=>{"use strict";a.d(t,{Fr:()=>p,Kw:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20c2e7f06),o=a(0x1d71c4455),s=a(0x2501a2cee),c=a(0x9740883e),d=a.n(c);let m="sk-filter-button",u={menu:"menu",toggle:"toggle"},p=n.forwardRef(({id:e,onClick:t,autoClogProps:a,text:r,ariaLabel:c,icon:p,variant:h=u.toggle,dataQA:_=m,isSelected:f=!1,size:b=o.F.small},g)=>{let y=b===o.F.small?"16":"20",A=(0,n.useCallback)(()=>{t&&t()},[t]),x=(0,n.useCallback)(()=>n.createElement(n.Fragment,null,p?.name&&n.createElement("span",{className:d().iconWrapper,"data-qa":"filter-button-icon"},n.createElement(s.Ah,{name:p.name,size:y})),r,h===u.menu&&n.createElement("span",{className:d().caretDownWrapper,"data-qa":"filter-button-caret-down"},n.createElement(s.Ah,{name:"caret-down",size:y}))),[r,p,h,y]),E=i()(d().filterButton,{[d().filterButtonSelected]:f,[d().filterButtonMedium]:b===o.F.medium});return n.createElement(l.A,{id:e,onClick:A,autoClogProps:a,className:E,"data-qa":_,"aria-label":c,ref:g,"aria-pressed":h===u.toggle?f:void 0,"aria-haspopup":h===u.menu||void 0},x())})},0x1b111a110:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1075d3a9c),s=a.n(o),c=a(0xb97b797e),d=a(0x13776886e),m=a(0x24c261bcb);let u=class extends n.PureComponent{static defaultProps={format:"dd"};constructor(e){super(e),this.renderSingleDayOfWeek=this.renderSingleDayOfWeek.bind(this)}renderSingleDayOfWeek(e){let t=s()().weekday(e);return n.createElement("th",{key:e,className:"c-calendar_month__day_of_week_heading","aria-label":t.format("dddd")},t.format(this.props.format))}render(){let{className:e,format:t,...a}=this.props,r=i()("c-calendar_month__days_of_week",e);return n.createElement("tr",{className:r,...a},(0,m.A)(7,this.renderSingleDayOfWeek))}};u.displayName="DaysOfWeek";let p=class extends n.Component{static defaultProps={monthFormat:"YYYY-MM",renderDate:({value:e,dateFormat:t,sameMonth:a})=>a&&s()(e,t).format("D"),dateFormat:"YYYY-MM-DD",header:n.createElement(u,null),onKeyDown:l.A};constructor(e){super(e),(0,c.v)(this,["renderDay"])}renderDay(e,t,a){let{dateFormat:r,renderDate:i,selectedDate:l,activeDate:o}=this.props,s=e.startOf("day").format(r),c=e.diff(t,"days"),d=e.clone().endOf("day").diff(a,"days"),m=c>=0&&d<=0,u=e.isSame(new Date,"day"),p=e.weekday(),h=o===s,_=void 0===l?h:l===s,f=i({value:s,dateFormat:r,sameMonth:m,isToday:u,monthStart:0===c,monthEnd:0===d,firstWeekStart:m&&0===p&&c<7,firstWeekEnd:m&&6===p&&c<7,lastWeekStart:m&&0===p&&d>-7,lastWeekEnd:m&&6===p&&d>-7});return n.createElement("td",{key:s,id:s,className:"c-calendar_month__date_container","data-qa":"calendar_month_date_container",role:"gridcell","aria-selected":_,"aria-current":u?"date":void 0},f)}renderWeek(e,t,a){let r=e.clone(),i=[];for(;i.length<7;)i.push(this.renderDay(r,t,a)),r.add(1,"day");return n.createElement("tr",{key:e.week(),className:"c-calendar_month__week"},i)}render(){let{month:e,monthFormat:t,className:a,header:r,onKeyDown:l}=this.props,o=s()(e,t),c=o.clone().startOf("month"),m=o.clone().endOf("month"),u=c.clone().startOf("week"),p=[];for(;u.isBefore(m);)p.push(this.renderWeek(u.clone(),c,m)),u.add(1,"week");let h=i()("c-calendar_month",a),_=(0,d.A)(o,"{calendar_header}");return n.createElement("table",{role:"grid","aria-readonly":!0,"aria-label":_,className:h,onKeyDown:l},n.createElement("thead",null,r),n.createElement("tbody",null,p))}};p.displayName="MonthView";let h=p},0x1759e4833:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xb97b797e),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x2501a2cee),d=a(0xbe505324);let m=new o.Ay("sk_calendar"),u=class extends n.Component{static defaultProps={nextMonthIsDisabled:!1,previousMonthIsDisabled:!1,nextYearIsDisabled:!1,previousYearIsDisabled:!1};titleRef;constructor(e){super(e),this.titleRef=null,(0,l.v)(this,["setTitleRef"])}setTitleRef(e){this.titleRef=e}focus(){this.titleRef&&this.titleRef.focus()}renderButton({icon:e,className:t,...a}){let r=i()("c-calendar_view_header_btn",t);return n.createElement(s.Nm,{className:r,...a},n.createElement(c.Ah,{name:e,size:"20"}))}renderPreviousMonthButton(){let{onPreviousMonthClick:e,previousMonthAriaLabel:t,previousMonthIsDisabled:a}=this.props;if(!e)return null;let n=t||m.t("Previous month",{fallbackHash:"46a299215300b3a0de6931f926bc6b0f2283eb99",fallbackHashNs:"date_picker"});return this.renderButton({icon:"caret-left-full",onClick:e,className:"c-calendar_view_header__previous_month_btn","aria-label":n,"data-qa":"cal_header_previous_month_btn",disabled:a})}renderNextMonthButton(){let{onNextMonthClick:e,nextMonthAriaLabel:t,nextMonthIsDisabled:a}=this.props;if(!e)return null;let n=t||m.t("Next month",{fallbackHash:"8abf7cf1d0b36ff16ebbe26b8285a65d9d1582f6",fallbackHashNs:"date_picker"});return this.renderButton({icon:"caret-right-full",onClick:e,className:"c-calendar_view_header__next_month_btn","aria-label":n,"data-qa":"cal_header_next_month_btn",disabled:a})}renderNextYearButton(){let{onNextYearClick:e,nextYearIsDisabled:t}=this.props,a=m.t("Next year");return e?this.renderButton({icon:"caret-right-double-full",onClick:e,"aria-label":a,"data-qa":"cal_header_next_year_btn",disabled:t}):null}renderPreviousYearButton(){let{onPreviousYearClick:e,previousYearIsDisabled:t}=this.props,a=m.t("Previous year");return e?this.renderButton({icon:"caret-left-double-full",onClick:e,"aria-label":a,"data-qa":"cal_header_previous_year_btn",disabled:t}):null}renderTitle(){let{title:e}=this.props;return n.createElement("span",{className:"c-calendar_view_header__title","data-qa":"cal_header_title",ref:this.setTitleRef},e)}render(){let e=m.t("Navigation",{fallbackHash:"cf03cf2e9cdf95a20af09137dfb9071db0c31bf2",fallbackHashNs:"prefs"});return n.createElement(d.A,{"aria-label":e,className:"c-calendar_view_header"},this.renderPreviousYearButton(),this.renderPreviousMonthButton(),this.renderTitle(),this.renderNextMonthButton(),this.renderNextYearButton())}};u.displayName="ViewHeader";let p=u},0x1ee57b3a0:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let CardHeader=({children:e,className:t,"data-qa":a})=>n.createElement("div",{className:i()("c-card__header",t),"data-qa":a},e);CardHeader.displayName="CardHeader";let l=n.memo(CardHeader)},0x1fa67866c:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let CardSection=({children:e,className:t,"data-qa":a})=>n.createElement("div",{className:i()("c-card__section",t),"data-qa":a},e);CardSection.displayName="CardSection";let l=n.memo(CardSection)},0x1e4ad58a2:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let Card=({children:e,className:t,"data-qa":a})=>n.createElement("div",{className:i()(t,"c-card"),"data-qa":a},e);Card.displayName="Card";let l=n.memo(Card)},0x13953efe6:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>CoachmarkAnchor,Xg:()=>s,YC:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1407c6c2c);let o={TopLeft:"top-left",Top:"top",TopRight:"top-right",BottomLeft:"bottom-left",Bottom:"bottom",BottomRight:"bottom-right",LeftTop:"left-top",Left:"left",LeftBottom:"left-bottom",RightTop:"right-top",Right:"right",RightBottom:"right-bottom"},s=["top-left","top","top-right","bottom-left","bottom","bottom-right","left-top","left","left-bottom","right-top","right","right-bottom"];function CoachmarkAnchor({children:e,coachmarkAnchorClassNames:t,coachmarkElement:a,orientation:r,preventPropagation:o,style:s}){let c=(0,n.useRef)(null),[d,m]=(0,n.useState)(0),u=(0,l.A)(),p=i()("c-coachmark-anchor",t);(0,n.useEffect)(()=>{m(e=>e+1)},[]);let h=(0,n.useCallback)(e=>{o&&e.stopPropagation()},[o]);return n.createElement("div",{role:"none",id:`c-coachmark-anchor_${u}`,ref:c,className:p,style:s,onClick:h},e,a&&n.cloneElement(a,{anchorRef:c,orientation:r}))}CoachmarkAnchor.displayName="CoachmarkAnchor"},0x23f2a501b:(e,t,a)=>{"use strict";a.d(t,{A:()=>CoachmarkVideoHero});var n=a(0xbad225b5);function CoachmarkVideoHero({children:e,...t}){return n.createElement("video",{...t,className:"c-coachmarkv2__hero"},e)}CoachmarkVideoHero.displayName="CoachmarkVideoHero"},0xb90de824:(e,t,a)=>{"use strict";a.d(t,{nf:()=>N,cK:()=>M,Ay:()=>Coachmark});var n=a(0xbad225b5),r=a(0x1853f0e7c),i=a(0x17d13b2a8),l=a(0x120c268ad),o=a.n(l),s=a(0xb5e49867),c=a(0x1cbdfeceb),d=a(0x125763ad),m=a(0x106809bc6),u=a(0x217f0c263),p=a(0x1cf587e0a),h=a(0xe78822f2),_=a(0x72b537b5),f=a(0x14fad6485),b=a(0x220f8fb41),g=a(0x1407c6c2c),y=a(0x40c0d834),A=a(0x1df96de4c),x=a(0x20482ad21),E=a(0x224f7f0e9),C=a(0x11a296110),k=a(0x344bb842),v=a(0x1faa3f1ac),S=a(0x22097256c),I=a(0x2501a2cee),w=a(0x543aca4e);let T=new x.Ay("generic_dialog"),N=[10,20,30,40,50,60,70,80,85,90,95];(0,s.A)(260,440,10);let M=1e3,stopPropagation=e=>{e.stopPropagation()},maybeStopPropagation=e=>{e?.keyCode===E.wn&&e.stopPropagation()},R={qa:"coachmark"};function Coachmark({isOpen:e,title:t,bodyText:a,hero:l,icon:s,onClickPrimaryButton:x,onClickSecondaryButton:E,primaryCallToActionText:N,secondaryCallToActionText:P,linkText:L,onClickLink:O,alignActionsRight:D,offsetX:F=0,offsetY:U=0,centerOnArrow:B=!1,anchorRef:H,orientation:W,arrowPosition:V,arrowCenterOnAnchor:G,hideCloseButton:q=!1,closeCoachmark:j=c.A,closeCoachmarkFromOutsideClick:z,closeBackgroundStyle:K,shouldCloseOnOverlayClick:$=!0,onAfterOpen:Y,autoClogProps:Q={elementName:"unset"},linkClogElementName:Z,width:J,ariaLabel:X,className:ee,UNSAFE_parentSelector:et,isMegaphoneCoachmark:ea=!0,overlayStyle:en,isModal:er=!1,enableSectionNavigation:ei=!0,onAfterClose:el,renderPreview:eo=c.A,overlayElement:es,isInverted:ec=!1,arrowColor:ed,onAnchorPositionChange:em}){let{windowId:eu,windowRef:ep}=(0,n.useContext)(f._0),{isInMegaphoneContainerContext:eh}=(0,n.useContext)(p.$),{popoverHooks:e_,managedFocusContainer:ef}=(0,w.ow)(),eb=(0,_.U)(),[eg,ey]=(0,n.useState)(),[eA,ex]=(0,n.useState)(),[eE,eC]=(0,n.useState)(),ek=(0,n.useRef)(null),ev=(0,n.useRef)(!1),eS=(0,g.A)(),eI=(0,g.A)(),ew=(0,g.A)(),eT=(0,n.useCallback)(()=>{if(!H?.current)return;let e=H?.current.getBoundingClientRect(),t=ep.deref()?.innerWidth||0;eg&&eA===t&&e.x===eg.x&&e.y===eg.y&&e.width===eg.width&&e.height===eg.height||(ey(e),ex(t),em?.(e))},[H,eg,eA,ep,em]),eN=(0,n.useCallback)(()=>{eE||eC(ep.deref()?.setInterval(eT,50))},[eT,eE,ep]),eM=(0,n.useCallback)(()=>{eE&&(clearInterval(eE),eC(void 0))},[eE]);(0,n.useEffect)(()=>(e?(eT(),eN()):eM(),()=>{eM()}),[e,eT,eN,eM]);let eR=(0,n.useCallback)(e=>{let t=ep.deref()?.innerWidth||0,a={};switch(W){case"top-left":a.top=e.top-20+U,a.right=t-e.right+F;break;case"top":a.left=e.left+F,a.top=e.top-20+U,B&&(a.left+=e.width/2);break;case"top-right":a.left=e.left+F,a.top=e.top-20+U,B&&(a.left+=e.width);break;case"bottom-left":a.top=e.top+e.height+20+U,a.right=t-e.right+F,G&&(a["--arrow_right_position"]=`${Math.round((e.width-26)/2-F)}px`);break;case"bottom":a.left=e.left+F,a.top=e.top+e.height+20+U,B&&(a.left+=e.width/2);break;case"bottom-right":a.left=e.left+F,a.top=e.top+e.height+20+U,B&&(a.left+=e.width);break;case"left-top":a.left=e.left+F+20,a.top=e.top+U;break;case"left":a.left=e.left+F+20,a.top=e.top+e.height/2+U;break;case"left-bottom":a.left=e.left+F+20,a.top=e.top+e.height+U;break;case"right-top":a.left=e.left+e.width+20+F,a.top=e.top+U;break;case"right":a.left=e.left+e.width+20+F,a.top=e.top+e.height/2+U;break;case"right-bottom":a.left=e.left+e.width+20+F,a.top=e.top+e.height+U}return a},[G,B,F,U,W,ep]),eP=(0,n.useCallback)(()=>{er&&(e_?.incrementOpenCount({windowId:eu}),ev.current=!0),H?.current&&Y?.(H.current)},[er,H,Y,e_,eu]),eL=(0,n.useCallback)(()=>{ev.current&&(e_?.decrementOpenCount({windowId:eu}),ev.current=!1),el?.()},[e_,el,eu]),eO=(0,n.useCallback)(()=>D?N??n.createElement(n.Fragment,null,T.t("Next")," ",n.createElement(I.Ah,{name:"caret-right",size:"24"})):N??T.t("Confirm"),[D,N]),eD=(0,n.useCallback)(()=>D?P??n.createElement(n.Fragment,null,n.createElement(I.Ah,{name:"caret-left",size:"24"})," ",T.t("Back")):P??T.t("Close"),[D,P]),eF=(0,n.useCallback)(()=>{let r=n.createElement(n.Fragment,null,l&&!s&&("string"==typeof l?n.createElement("img",{className:"c-coachmarkv2__hero",src:l,alt:"coachmark hero"}):l),n.createElement("div",{className:"c-coachmarkv2__content"},s&&!l?n.createElement("div",{className:"c-coachmarkv2__icon_container"},n.createElement("div",{className:"c-coachmarkv2__icon","data-qa":"slack-kit-coachmark-icon"},n.createElement(I.Ah,{name:s,size:"18"}))):null,n.createElement("div",{className:"c-coachmarkv2__title",id:eS},t),n.createElement("div",{className:"c-coachmarkv2__body",id:eI},a),eo(),x||E?n.createElement("div",{className:"c-coachmarkv2__actions"},E&&n.createElement(C.Ay,{className:"c-coachmarkv2__secondary_button",type:"outline",onClick:E,"data-action-type":"secondary","data-qa":"coachmark-secondary-cta",autoClogProps:{elementName:Q.elementName?`${Q.elementName}_secondary_cta`:"secondary_cta",onClick:{enableClogAction:!0}}},eD()),x&&n.createElement(C.Ay,{type:"primary",onClick:x,"data-qa":"coachmark-primary-cta",autoFocus:!0,autoClogProps:{elementName:Q.elementName?`${Q.elementName}_primary_cta`:"primary_cta",onClick:{enableClogAction:!0}}},eO())):null,L?n.createElement(v.A,{className:"c-coachmarkv2__link",onClick:O,...Z?{autoClogProps:{elementName:Z,onClick:{enableClogAction:!0}}}:A.t0},L," \u2192"):null),q?null:n.createElement(k.A,{className:o()("c-coachmarkv2__close",{"c-coachmarkv2__close--light":"light"===K,"c-coachmarkv2__close--dark":"dark"===K}),onClick:j,"aria-label":T.t("Close"),"data-qa":"coachmark-close-button",autoClogProps:{elementName:Q.elementName?`${Q.elementName}_close_cta`:"close_cta",action:b.lG.CLOSE,onClick:{enableClogAction:!0}},svgIconProps:{name:"close"}}));if(!ef)return r;let{Component:i,coachmarkSectionIndex:d}=ef;return n.createElement(i,{id:`Coachmark_${ew}`,index:d,focusFn:c.A,onFocus:stopPropagation,enableSectionNavigation:ei&&e,onKeyDown:maybeStopPropagation},r)},[Q.elementName,a,eS,eI,K,j,ei,l,q,s,e,Z,L,O,x,E,ew,eO,eD,t,eo,ef]);(0,n.useEffect)(()=>{ea&&!eh&&(0,h.b)(h.r.Coachmark,eb)},[ea,eh,eb]);let eU=(0,n.useMemo)(()=>({modal:er,describedby:eI,labelledby:eS}),[eI,eS,er]);if(!e||!H?.current||!eg)return null;let eB=eR(eg),eH=o()("c-coachmarkv2",`c-coachmark--${W}`,ee,{"c-coachmark--center_on_arrow":B,"c-coachmarkv2--actions-right":D,"c-coachmark--arrow_auto_center":G,[i.RD]:ec}),eW={overlay:(0,d.A)({position:"fixed",inset:0,backgroundColor:"transparent",zIndex:M},en),content:{...eB,...J&&{width:(0,m.A)(J,260,440)},...V&&{"--arrow-position":`${V}%`},...ed&&{"--arrow-color":(0,r.HK)(ed)}}};return n.createElement(n.Fragment,null,n.createElement(y.A,{...Q,enableClogImpressionOffScreen:!0,clogImpression:e},n.createElement(u.A,{data:R,className:eH,isOpen:e,onRequestClose:z||j,ref:ek,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:$,style:eW,onAfterOpen:eP,contentLabel:X,parentSelector:et,ariaHideApp:er,shouldReturnFocusAfterClose:!el,onAfterClose:eL,aria:eU,overlayElement:es},eF())),n.createElement(S.J,{isOverlayOpen:e}))}Coachmark.displayName="Coachmark"},0x235fec370:(e,t,a)=>{"use strict";a.d(t,{_:()=>useOverlayCutout});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x14fad6485),o=a(0x1f022ebd9);function useOverlayCutout({dismissCoachmark:e,enableOverlayCutout:t=!0,topBottomPadding:a=0,leftRightPadding:r=0,overlayHeight:s=0,overlayClassName:c,onSetAnchorRef:d}){let m=(0,n.useRef)(),u=(0,n.useRef)(),{windowRef:p}=(0,n.useContext)(l._0),h=(0,n.useCallback)(()=>{t&&m.current&&u.current&&p.deref()?.requestAnimationFrame(()=>{let e=u.current?.children?.[0]?.getBoundingClientRect();e&&m.current&&(m.current.style.width=`${e.width+2*r}px`,m.current.style.height=`${e.height+2*a+s}px`,m.current.style.left=`${e.left-r}px`,m.current.style.top=`${e.top-a}px`)})},[t,p,r,a,s]);(0,o.A)(()=>{if(!t)return;let onResizeOrScroll=()=>{h()};return p.deref()?.addEventListener("resize",onResizeOrScroll),p.deref()?.addEventListener("scroll",onResizeOrScroll,!0),()=>{p.deref()?.removeEventListener("resize",onResizeOrScroll),p.deref()?.removeEventListener("scroll",onResizeOrScroll,!0)}},[]),(0,n.useEffect)(()=>{if(!t||!u.current)return;let e=new MutationObserver(h);return e.observe(u.current,{subtree:!0,childList:!0}),()=>{e.disconnect()}},[t,h]);let _=(0,n.useCallback)(e=>{let t=p.deref()?.document.querySelector(".c-sk-modal_portal");t&&(t.style.display="none"),m.current=e,h()},[h,p]),f=(0,n.useCallback)(e=>{u.current=e,e&&d?.(e),h()},[h,d]),b=(0,n.useCallback)(t=>{let a=t.target;a&&"slack_kit_coachmark_overlay_cutout"!==a.id&&null===a.closest(".c-coachmarkv2")&&e()},[e]);return{renderOverlayElement:(0,n.useCallback)((e,t)=>n.createElement("div",{className:i()("c-coachmark__transparent_overlay",c),role:"none",onClick:b},n.createElement("div",{ref:_,id:"slack_kit_coachmark_overlay_cutout",className:"c-coachmark__overlay_cutout"}),t),[c,b,_]),renderCoachmarkChildren:(0,n.useCallback)(e=>n.createElement("div",{className:"c-coachmark__anchor",ref:f},e),[f])}}useOverlayCutout.displayName="useOverlayCutout"},0x19aba212c:(e,t,a)=>{"use strict";a.d(t,{A:()=>l,h:()=>makeTargetBounds});var n=a(0xbad225b5),r=a(0x6aeae8a3),i=a(0x543aca4e);let makeTargetBounds=e=>{let{left:t=0,top:a=0}=e||{};return{left:t,top:a,right:t,bottom:a,width:0,height:0}},ContextMenu=({targetBounds:e,onCloseRequested:t,width:a,children:l})=>{let o=n.Children.only(l),s=(0,i.ow)();(0,n.useEffect)(()=>(s.popoverHooks?.incrementOpenCount({}),()=>{s.popoverHooks?.decrementOpenCount({})}),[s]);let c=(0,n.useMemo)(()=>({isContextMenu:!0,width:a??"auto",onTriggerClose:t,onMenuItemSelected:t}),[t,a]);return n.createElement(r.AM,{shouldFade:!1,position:"right-bottom",tryOppositePosition:!0,useTargetBoundsAsPosition:!0,shouldCloseOnOverlayMouseDown:!0,shouldReturnFocusAfterClose:!1,isOpen:!0,targetBounds:makeTargetBounds(e),onClose:t,ariaHideApp:!1},n.cloneElement(o,c))};ContextMenu.displayName="ContextMenu";let l=ContextMenu},0xcbaa2b9f:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1075d3a9c),s=a.n(o),c=a(0x1f7a86bf5),d=a(0x1229d92d),m=a(0xb97b797e),u=a(0x13776886e),p=a(0x18dac2b8e),h=a(0x20482ad21),_=a(0x101e2cd2a),f=a(0x12edaa96a),b=a(0x1614f02d1),g=a(0xa6f3163b),y=a(0x1b111a110),A=a(0x1759e4833);let x=new h.Ay("date_picker"),E="year",C="month",k={year:"YYYY",month:"YYYY-MM"};function maybeParseViewOrDate(e,t,a){return e&&t?s()(e,t):(e&&(0,p.Cu)()&&a.warn("View specified without format -- ignoring"),s()())}let v=class extends n.PureComponent{static defaultProps={className:void 0,selectedDate:void 0,disabledDates:[],dateFormat:"YYYY-MM-DD",onDateChange:l.A,kbNavActive:!0,focusOnMount:!0,isDateDisabled:()=>!1,disableDatesBefore:void 0,disableDatesAfter:void 0,sendMessageToAnnouncerAPI:l.A,setDateOnEnterKeyDown:!1,onEscapeKeyDown:l.A};activeDayElement;constructor(e){super(e);const{selectedDate:t,dateFormat:a,disableDatesBefore:r,disableDatesAfter:i,focusOnMount:l}=this.props;let o=maybeParseViewOrDate(t,a,this.props.logger);const c=r&&s()(r,a);if(c&&o.isBefore(c))o=c;else{const e=i&&s()(i,a);e&&o.isAfter(e)&&(o=e)}this.state={activeDate:this.isDateDisabled(o)?this.getActiveDateFromMonth(o):o.format(a),view:o.format(k.month),focusOnActiveDate:!!l},(0,m.v)(this,["onKeyDown","handleDateClick","handleDateOnKeyDown","decrementMonth","incrementMonth","incrementYear","decrementYear","renderDate","moveDateBy"]),this.activeDayElement=n.createRef()}componentDidMount(){this.maybeFocusOnActiveDate()}componentDidUpdate(){this.maybeFocusOnActiveDate()}getActiveDateFromMonth(e){if(this.props.selectedDate){let t=s()(this.props.selectedDate,this.props.dateFormat);if(e.isSame(t,"month")&&!this.isDateDisabled(t))return t.format(this.props.dateFormat)}if(this.state?.activeDate){let t=s()(this.state.activeDate,this.props.dateFormat).month(e.month()).year(e.year());if(!this.isDateDisabled(t))return t.format(this.props.dateFormat)}let t=e.clone().startOf("month");for(;e.isSame(t,"month");){if(!this.isDateDisabled(t))return t.format(this.props.dateFormat);t.add(1,"day")}}setView(e,t){t||this.props.sendMessageToAnnouncerAPI({message:(0,u.A)(e,"{calendar_header}"),assertive:!0,uuid:(0,f.A)()}),this.setState(()=>({view:e.format(k.month),activeDate:this.getActiveDateFromMonth(e),focusOnActiveDate:!1}))}canMoveBackMonth(){return!this.props.disableDatesBefore||s()(this.state.view,k[C]).startOf(C).isAfter(s()(this.props.disableDatesBefore,this.props.dateFormat))}canMoveForwardMonth(){return!this.props.disableDatesAfter||s()(this.state.view,k[C]).endOf(C).isBefore(s()(this.props.disableDatesAfter,this.props.dateFormat))}canMoveBackYear(){return!this.props.disableDatesBefore||s()(this.state.view,k[C]).subtract(1,E).isAfter(s()(this.props.disableDatesBefore,this.props.dateFormat))}canMoveForwardYear(){return!this.props.disableDatesAfter||s()(this.state.view,k[C]).add(1,E).isBefore(s()(this.props.disableDatesAfter,this.props.dateFormat))}handleDateClick(e){let t=e.target.dataset.value;t&&this.isDateDisabled(s()(t,this.props.dateFormat))||(this.setState(()=>({activeDate:t})),this.props.onDateChange?.(t))}handleDateOnKeyDown(e){let{key:t}=e;"Enter"===t&&this.props.setDateOnEnterKeyDown?this.handleDateClick(e):"Escape"===t&&this.props.onEscapeKeyDown?.(e)}onKeyDown(e){if(!this.props.kbNavActive)return;let{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),this.moveDateBy(-1,"week");break;case"ArrowDown":e.preventDefault(),this.moveDateBy(1,"week");break;case"ArrowLeft":e.preventDefault(),this.moveDateBy(-1,"day");break;case"ArrowRight":e.preventDefault(),this.moveDateBy(1,"day");break;case"PageUp":e.preventDefault(),this.moveDateBy(-1,"month");break;case"PageDown":e.preventDefault(),this.moveDateBy(1,"month")}}decrementMonth(e){this.incrementMonth(e,-1)}incrementMonth(e,t=1){let{view:a}=this.state,n=s()(a,k.month).add(t,C);this.setView(n,(0,_.A)(e))}decrementYear(e){this.incrementYear(e,-1)}incrementYear(e,t=1){let{view:a}=this.state,n=s()(a,k.month).add(t,E);this.setView(n,(0,_.A)(e))}isDateActive(e){let t=s()(this.state.activeDate,this.props.dateFormat);return e.isSame(t)}isDateDisabled(e){let t=!1;if(this.props.isDateDisabled&&(t=this.props.isDateDisabled(e)),!t)for(let a=0;a<this.props.disabledDates.length;a++){let n=this.props.disabledDates?.[a];e.isSame(s()(n,this.props.dateFormat))&&(t=!0)}return!t&&this.props.disableDatesBefore&&(t=t||e.isBefore(s()(this.props.disableDatesBefore,this.props.dateFormat))),!t&&this.props.disableDatesAfter&&(t=t||e.isAfter(s()(this.props.disableDatesAfter,this.props.dateFormat))),t}isDateSelected(e){let t=s()(this.props.selectedDate,this.props.dateFormat);return e.isSame(t)}maybeFocusOnActiveDate(){this.props.kbNavActive&&this.state.focusOnActiveDate&&this.activeDayElement.current&&this.activeDayElement.current.focus()}moveDateBy(e,t){let{activeDate:a,view:n}=this.state;if(!a&&n){let e=s()(n,k.month),t=this.getActiveDateFromMonth(e);this.setState(()=>({activeDate:t,focusOnActiveDate:!!t}));return}if(this.activeDayElement.current&&this.props.windowRef.deref()?.document.activeElement!==this.activeDayElement.current)return void(this.state.focusOnActiveDate?this.activeDayElement.current.focus():this.setState(()=>({focusOnActiveDate:!0})));let r=s()(a,this.props.dateFormat);r.add(e,t),this.isDateDisabled(r)||this.setState(()=>({activeDate:r.format(this.props.dateFormat),view:r.format(k.month),focusOnActiveDate:!0}))}renderDate({value:e,dateFormat:t,sameMonth:a,isToday:r,monthStart:o,monthEnd:c,firstWeekStart:d,firstWeekEnd:m,lastWeekStart:u,lastWeekEnd:p}={}){let h=s()(e,t),_=this.isDateActive(h),f=this.isDateDisabled(h),b=this.isDateSelected(h),y=i()("c-date_picker_calendar__date","c-button-unstyled",{"c-date_picker_calendar__date--is_today":r,"c-date_picker_calendar__date--is_selected":b,"c-date_picker_calendar__date--is_active":_,"c-date_picker_calendar__date--disabled":f,"c-date_picker_calendar__date--month_start":o,"c-date_picker_calendar__date--month_end":c,"c-date_picker_calendar__date--first_week_start":d,"c-date_picker_calendar__date--first_week_end":m,"c-date_picker_calendar__date--last_week_start":u,"c-date_picker_calendar__date--last_week_end":p}),A=h.format("D");return a?n.createElement(g.A,{ref:_?this.activeDayElement:l.A,className:y,disabled:f,onClick:this.handleDateClick,onKeyDown:this.handleDateOnKeyDown,"data-value":e,"data-format":t,tabIndex:_?0:-1,"aria-label":A,"data-qa":_&&"active_date","data-qa-date":e},h.format("D")):null}render(){let{view:e}=this.state,{dateFormat:t,selectedDate:a,className:r}=this.props,l=i()("c-date_picker_calendar",r),o=s()(e,t),c=(0,u.A)(o,"{calendar_header}");return n.createElement("div",{className:l,"data-qa":"date_picker_calendar"},n.createElement("div",{className:"c-mini_calendar"},n.createElement("div",{className:"c-mini_calendar__month_view"},n.createElement(A.A,{title:c,onPreviousMonthClick:this.decrementMonth,onNextMonthClick:this.incrementMonth,onPreviousYearClick:this.decrementYear,onNextYearClick:this.incrementYear,previousMonthAriaLabel:x.t("Previous month"),nextMonthAriaLabel:x.t("Next month"),previousMonthIsDisabled:!this.canMoveBackMonth(),nextMonthIsDisabled:!this.canMoveForwardMonth(),previousYearIsDisabled:!this.canMoveBackYear(),nextYearIsDisabled:!this.canMoveForwardYear()}),n.createElement(y.A,{month:e,monthFormat:t,renderDate:this.renderDate,onKeyDown:this.onKeyDown,selectedDate:a,activeDate:this.state.activeDate}))))}};v.displayName="DatePickerCalendar";let S=(0,c.V)((0,d.A)((0,b.A)(v)))},0xd054f030:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1075d3a9c),s=a.n(o),c=a(0x190e60a66),d=a(0xb97b797e),m=a(0x77a36d88),u=a(0x1e49806fc);let p={"de-de":["YYYY MMM D","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"],"en-gb":["YYYY MMM D","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"],"en-us":["MMM D YYYY","M D YYYY","YYYY M D","YYYY MMM D","D MMM YYYY","M D"],"es-es":["YYYY MMM D","D [de] MMM [de] YYYY","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"],"es-la":["YYYY MMM D","D [de] MMM [de] YYYY","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"],"fr-fr":["YYYY MMM D","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"],"ja-jp":["YYYY[\u5E74]MMMMD","YYYY[\u5E74]MM[\u6708]D[\u65E5]","MM D"],"ko-kr":["YYYY-MM-DD","YYYY[\uB144] MM[\uC6D4] DD[\uC77C]","YYYY[\uB144] M[\uC6D4] D[\uC77C]","YYYY.MM.DD.","YYYY.MM.DD","YYYY.M.D.","YYYY.M.D","MM[\uC6D4] DD[\uC77C]","M[\uC6D4] D[\uC77C]"],"pt-br":["YYYY MMM D","D [de] MMM [de] YYYY","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"],"zh-cn":["YYYY [\u5E74] MMMM D","YYYY [\u5E74] MM [\u6708] D [\u65E5]","MM D"],"zh-tw":["YYYY [\u5E74] MMMM D","YYYY [\u5E74] MM [\u6708] D [\u65E5]","MM D"],default:["YYYY MMM D","D MMM YYYY","D M YYYY","YYYY M D","D M YY","D M"]},parse_calendar_date=function(e){let t=m.A.locale(),a=p[t]||p.default;a.push("YYYY-M-D");let n=e?.trim().toLocaleLowerCase()??"";return("ja-jp"===t||"ko-kr"===t||"zh-cn"===t||"zh-tw"===t)&&(n=(0,u.A)(n)??""),"de-de"===t?n=n.replace("marz","m\xe4rz"):"fr-fr"===t&&(n=(n=(n=n.replace("fevr","f\xe9vr")).replace("aout","ao\xfbt")).replace("dec","d\xe9c")),(0,m.A)(n,a,!1)};var h=a(0xb1c0d55),_=a(0x20482ad21),f=a(0x5739d664),b=a(0x126f22530);let g=new _.Ay("date_picker"),y=class extends n.PureComponent{static defaultProps={value:null,displayFormat:null,disabledDates:[],isDateDisabled:void 0,disableDatesBefore:void 0,disableDatesAfter:void 0,disabledDateErrorText:null,onChange:l.A,onClick:l.A,onFocus:l.A,onBlur:l.A,onEscape:l.A,required:!1,isInvalid:!1,size:"medium",className:null,datePickerDisabled:!1,autoClogProps:void 0,preventScrollOnFocus:!1,placeholder:void 0,focusOnMount:void 0,onKeyDown:l.A,inputRef:void 0};input;constructor(e){super(e),this.state={inputValue:"",focused:!1},this.input=e.inputRef||n.createRef(),this.getMemoizedDisplayValue=(0,f.A)(this.getMemoizedDisplayValue),(0,d.v)(this,["onKeyDown","isDateDisabled","handleBlur","handleFocus","handleClick","handleChange","handleReturnKey","handleEscapeKey","handleDownKey"])}getDisplayFormat(){return this.props.displayFormat||this.props.valueFormat}getDisplayValueFromMoment(e,t,{useRelativeDateLanguage:a=!0}={}){if(!e||!e.isValid())return"";if(e.isSame(s()(),"day")&&a)return g.t("Today");if(e.isSame(s()().add(1,"days"),"day")&&a)return g.t("Tomorrow");if(t)return e.format(t);let n=(0,c.F)().getLocaleForLastViewedTeam(),r="es-ES"===n||"es-LA"===n;return(0,h.A)(e,{shortenMonth:r,shortenDay:r})}getMemoizedDisplayValue(e,t,a){let n=s()(e,t);return this.getDisplayValueFromMoment(n,a)}getInputValue(){if(this.state.focused)return this.state.inputValue;let{value:e,valueFormat:t,displayFormat:a}=this.props;return this.getMemoizedDisplayValue(e,t,a)}handleDownKey(e){this.props.onClick(e)}onKeyDown(e){let{key:t}=e;"Enter"===t?this.handleReturnKey(e):"Escape"===t?this.handleEscapeKey(e):"ArrowDown"===t&&this.handleDownKey(e)}resetInputForEditing(e){let{value:t,valueFormat:a,displayFormat:n,onResetInput:r}=this.props;this.setState(()=>({focused:!0,inputValue:this.getDisplayValueFromMoment(s()(t,a),n,{useRelativeDateLanguage:!1})||t||""}),()=>{this.input.current?.select(),r&&r(this.input,e)})}handleBlur(e){this.state.focused&&this.updateValue(e.target.value),this.setState(()=>({focused:!1})),this.props.onBlur(e)}handleChange(e){this.setState(()=>({inputValue:e}))}handleClick(e){this.input.current&&this.input.current.focus(),this.props.onClick(e)}handleEscapeKey(e){this.input.current&&this.state.focused&&(this.resetInputForEditing(!0),this.props.onEscape(e))}handleFocus(e){this.resetInputForEditing(),this.props.onFocus(e)}handleReturnKey(e){this.input.current&&(e.preventDefault(),this.updateValue(e.currentTarget.value))}isDateDisabled(e){let t=!1;if(this.props.isDateDisabled&&(t=this.props.isDateDisabled(e.format(this.props.valueFormat))),!t)for(let a=0,n=this.props.disabledDates[a];a<this.props.disabledDates.length;a++)e.isSame(s()(n,this.props.valueFormat))&&(t=!0);return!t&&this.props.disableDatesBefore&&(t=t||e.isBefore(s()(this.props.disableDatesBefore,this.props.valueFormat))),!t&&this.props.disableDatesAfter&&(t=t||e.isAfter(s()(this.props.disableDatesAfter,this.props.valueFormat))),t}parseToMoment(e){if(!e||!e.trim())return null;let t=this.getDisplayFormat(),a=s()(e,t,!0);if(a.isValid())return a;let n=parse_calendar_date(e);if(n.isValid())return n;let r=new Date(e);return Number.isNaN(r.valueOf())?null:s()(r)}updateValue(e,t){let{value:a,valueFormat:n,required:r}=this.props,i=t?s()(e,t):this.parseToMoment(e),l=i&&i.isValid();if(l||(r?l=(i=s()(a,n))&&i.isValid():(i=null,l=!0)),l){let e=i?i.format(n):"";this.props.onChange(e)}}render(){let{id:e,required:t,className:a,value:r,valueFormat:l,displayFormat:o,disabledDates:s,isDateDisabled:c,disableDatesBefore:d,disableDatesAfter:m,disabledDateErrorText:u,onChange:p,onClick:h,onEscape:_,size:f,"aria-label":g,datePickerDisabled:y,isInvalid:A,autoClogProps:x,preventScrollOnFocus:E,onResetInput:C,...k}=this.props;return n.createElement("div",{onClick:this.handleClick,"data-qa":`datepicker_input--${f}`,className:i()(`c-date_picker_input c-date_picker_input--${f}`,{"c-date_picker_input--focused":this.state.focused}),role:"presentation"},n.createElement(b.A,{...k,id:e,name:e,className:a,inputRef:this.input,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange,onKeyDown:this.onKeyDown,value:this.getInputValue(),icon:"calendar",showError:A,isDisabled:y,isInvalid:A,isRequired:t,size:f,"aria-label":g,autoClogProps:x,preventScrollOnFocus:E,useInlineAlert:!0}))}};y.displayName="DatePickerInput";let A=y},0x18246e515:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x2286acf6c),s=a(0x1075d3a9c),c=a.n(s),d=a(0x1f7a86bf5),m=a(0x1229d92d),u=a(0xb97b797e),p=a(0x20482ad21),h=a(0x101e2cd2a),_=a(0x11a296110),f=a(0xcbaa2b9f),b=a(0xd054f030),g=a(0x124f73fdb),y=a(0x2469ec64e),A=a(0x6aeae8a3),x=a(0x2501a2cee);let E=new p.Ay("date_picker"),C=class extends n.PureComponent{static defaultProps={onDateChange:l.A,onClick:l.A,onClose:l.A,onMaybeClickOutside:l.A,datePickerDisabled:!1,isInvalid:!1,id:`date-picker-select-${(0,y.r9)()}`,datePlaceholder:void 0,selectedDate:void 0,disableDatesBefore:void 0,disableDatesAfter:void 0,"data-qa":void 0,onScrollablePage:!1,focusOnMount:!1,setDateOnEnterKeyDown:!1,focusInputOnCalendarEscapeKeyDown:!1,popoverOverrides:void 0};lastClickInsideSelect;lastClickInsideDropdown;resizeListenerInstalled;clickListenerInstalled;selectContainer;dropdownContainer;input;handleResize;constructor(e){super(e),e.selectedDate&&!c()(e.selectedDate,e.dateFormat).isValid()&&this.props.logger.warn(`Invalid date ${e.selectedDate} for format ${e.dateFormat}`),this.state={dropdownVisible:!1,dropdownActive:!1,dropdownFocusOnMount:!1,targetBoundsAdjusted:void 0},this.lastClickInsideSelect=!1,this.lastClickInsideDropdown=!1,this.selectContainer=n.createRef(),this.dropdownContainer=n.createRef(),this.input=n.createRef(),this.handleResize=(0,o.A)(this.setTargetBounds,150,{maxWait:150,trailing:!0}),this.resizeListenerInstalled=!1,this.clickListenerInstalled=!1,(0,u.v)(this,["setTargetBounds","handleInputClick","handleInputEscape","handleTriggerClick","handleInputChange","handleCalendarChange","handleClearSelectionClick","handleCalendarEscapeKeyDown","handleInputBlur","handleDropdownFocusEnter","handleContainerClick","handleDropdownClick","handleMaybeOutsideClick","handleContainerKeyDown","handleOnClose","closeDropdown","renderPopover"])}componentDidUpdate(){this.updateListeners()}componentWillUnmount(){this.removeListeners()}setTargetBounds(){if(this.selectContainer.current){let e=this.selectContainer.current.getBoundingClientRect(),t=this.props.windowRef.deref()?.pageYOffset??0,a={top:e.top+t,bottom:e.bottom+t,left:e.left,right:e.right,width:e.width,height:e.height};this.setState(()=>({targetBoundsAdjusted:a}))}}changeDate(e){e!==this.props.selectedDate&&this.props.onDateChange(e)}closeDropdown(){this.setState(()=>({dropdownVisible:!1,dropdownActive:!1}))}handleOnClose(){this.props.onClose(),this.closeDropdown()}handleCalendarChange(e){this.changeDate(e),this.closeDropdown()}handleClearSelectionClick(){this.changeDate(""),this.closeDropdown()}handleContainerClick(){this.lastClickInsideSelect=!0}handleDropdownClick(){this.lastClickInsideDropdown=!0}handleDropdownFocusEnter(){this.props.datePickerDisabled||this.setState(()=>({dropdownVisible:!0,dropdownActive:!0}))}handleInputBlur(e){let{relatedTarget:t}=e,a=this.dropdownContainer.current;!(a&&a.contains(t))&&(this.setState(()=>({dropdownVisible:!1})),this.props.onBlur&&this.props.onBlur(e))}handleInputChange(e){this.changeDate(e)}handleInputClick(e){if(this.props.datePickerDisabled)return;this.setTargetBounds();let t=(0,h.A)(e);this.setState(()=>({dropdownVisible:!0,dropdownActive:t,dropdownFocusOnMount:t})),this.props.onClick(e)}handleInputEscape(e){this.state.dropdownVisible&&(e.preventDefault(),this.setState(()=>({dropdownVisible:!1})))}handleMaybeOutsideClick(){let e=this.lastClickInsideSelect||this.lastClickInsideDropdown;e?(this.lastClickInsideSelect=!1,this.lastClickInsideDropdown=!1):this.setState(()=>({dropdownVisible:!1,dropdownActive:!1,dropdownFocusOnMount:!1})),this.props.onMaybeClickOutside(e)}handleTriggerClick(e){if(this.props.datePickerDisabled)return;this.setTargetBounds();let t=(0,h.A)(e);this.setState(e=>e.dropdownVisible?{dropdownVisible:!1,dropdownActive:!1,dropdownFocusOnMount:!1}:{dropdownVisible:!0,dropdownActive:!0,dropdownFocusOnMount:t}),this.props.onClick(e)}removeListeners(){this.resizeListenerInstalled&&(this.handleResize.cancel(),this.props.windowRef.deref()?.removeEventListener("resize",this.handleResize),this.resizeListenerInstalled=!1),this.clickListenerInstalled&&(this.props.windowRef.deref()?.document.removeEventListener("click",this.handleMaybeOutsideClick),this.clickListenerInstalled=!1)}updateListeners(){this.state.dropdownVisible?(this.resizeListenerInstalled||(this.props.windowRef.deref()?.addEventListener("resize",this.handleResize),this.resizeListenerInstalled=!0),this.clickListenerInstalled||(this.props.windowRef.deref()?.document.addEventListener("click",this.handleMaybeOutsideClick),this.clickListenerInstalled=!0)):this.removeListeners()}handleContainerKeyDown(e){let{onDatePickerSelectKeyDown:t}=this.props;if(t)return t(e,{closeDropdown:this.closeDropdown})}handleCalendarEscapeKeyDown(){this.props.focusInputOnCalendarEscapeKeyDown&&this.input.current?.focus(),this.props.onCalendarEscapeKeyDown?.()}renderPopover(){let e,{selectedDate:t,dateFormat:a,calendarClassName:r,dropdownClassName:l,isDateDisabled:o,disabledDates:s,disableDatesBefore:c,disableDatesAfter:d,required:m,size:u,onScrollablePage:p,clearSelectionText:h,setDateOnEnterKeyDown:b,additionalPopoverContent:y}=this.props,{dropdownVisible:x,dropdownActive:C,dropdownFocusOnMount:k}=this.state,v=i()(l,"c-date_picker__dropdown"),S=i()(r,"c-date_picker__select_calendar"),I="small"===u?g.mc:g.aA,w=this.props.windowRef.deref();return p&&w&&(e={height:w.document.body.scrollHeight}),n.createElement(A.AM,{isOpen:x,onClose:this.handleOnClose,overlayClassName:"c-popover c-date_picker__popover_overlay",targetBounds:this.state.targetBoundsAdjusted,position:"bottom-right",offsetX:I.x,offsetY:I.y,ariaHideApp:!C,shouldFocusAfterRender:C,tryOppositePosition:!0,overlayStyle:e,...this.props.popoverOverrides},n.createElement("div",{ref:this.dropdownContainer,className:v,tabIndex:-1,"data-qa":"date_picker_dropdown",onFocus:this.handleDropdownFocusEnter},n.createElement(f.A,{className:S,selectedDate:t,dateFormat:a,onDateChange:this.handleCalendarChange,kbNavActive:C,focusOnMount:k,isDateDisabled:o,disabledDates:s,disableDatesBefore:c,disableDatesAfter:d,setDateOnEnterKeyDown:b,onEscapeKeyDown:this.handleCalendarEscapeKeyDown}),y,!m&&t&&n.createElement("div",{className:"c-date_picker__clear_selection_container"},n.createElement(_.Nm,{className:"c-date_picker__clear_selection_btn","data-qa":"date_picker_clear",onClick:this.handleClearSelectionClick},h||E.t("Clear selection")))))}renderPopoverTrigger(){let{"data-qa":e,size:t}=this.props;return n.createElement(_.Nm,{className:i()("c-date_picker__select_btn",{"c-date_picker__select_btn--small":"small"===t,"c-date_picker__select_btn--large":"large"===t}),onClick:this.handleTriggerClick,"data-qa":e?`${e}_dropdown_trigger`:"date_picker_dropdown_trigger","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],disabled:this.props.datePickerDisabled},n.createElement(x.Ah,{name:"caret-down",size:"20"}))}render(){let{id:e,dateFormat:t,displayFormat:a,datePlaceholder:r,inputClassName:l,isDateDisabled:o,disabledDates:s,disableDatesBefore:c,disableDatesAfter:d,required:m,selectedDate:u,size:p,datePickerDisabled:h,"aria-label":_,"aria-labelledby":f,"data-qa":g,isInvalid:y,containerStyle:A,autoClogProps:x,focusOnMount:E,onResetInput:C}=this.props,k=i()(l,"c-date_picker__select_input");return n.createElement("div",{ref:this.selectContainer,className:"c-date_picker__select_container",onClick:this.handleContainerClick,role:"presentation",style:A,onKeyDown:this.handleContainerKeyDown},n.createElement(b.A,{id:e,inputRef:this.input,className:k,value:u,valueFormat:t,displayFormat:a,onChange:this.handleInputChange,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onEscape:this.handleInputEscape,placeholder:r,isDateDisabled:o,disabledDates:s,disableDatesBefore:c,disableDatesAfter:d,required:m,"aria-label":_,"aria-labelledby":f,size:p,datePickerDisabled:!!h,"data-qa":g?`${g}_input`:"date_picker_input",isInvalid:y,autoClogProps:x,focusOnMount:E,onResetInput:C}),this.renderPopoverTrigger(),this.renderPopover())}};C.displayName="DatePickerSelect";let k=(0,d.V)((0,m.A)(C))},0x124f73fdb:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>DatePickerTrigger,aA:()=>p,mc:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1075d3a9c),s=a.n(o),c=a(0xb97b797e),d=a(0x1df96de4c),m=a(0xcbaa2b9f),u=a(0x6aeae8a3);let p={x:-4,y:-4},h={x:0,y:-4};let DatePickerTrigger=class DatePickerTrigger extends n.Component{static defaultProps={children:null,renderTrigger:void 0,dropdownClassName:void 0,onDateChange:l.A,onDatePickerClose:l.A,dateFormat:void 0,calendarClassName:void 0,selectedDate:void 0,disabledDates:void 0,isDateDisabled:void 0,disableDatesBefore:void 0,disableDatesAfter:void 0,onRenderPopover:l.A};trigger;constructor(e){super(e);const t=s()(e.selectedDate,e.dateFormat).isValid()?e.selectedDate:void 0;this.state={selectedDate:t,passedSelectedDate:t,passedDateFormat:e.dateFormat},this.trigger=n.createRef(),(0,c.v)(this,["handleDateChange","renderPopover"])}static getDerivedStateFromProps(e,t){if(e.selectedDate!==t.passedSelectedDate||e.dateFormat!==t.passedDateFormat){let t=s()(e.selectedDate,e.dateFormat).isValid()?e.selectedDate:void 0;return{selectedDate:t,passedSelectedDate:t,passedDateFormat:e.dateFormat}}return null}handleDateChange(e){if(this.setState(()=>({selectedDate:e})),this.props.onDateChange?.(e),this.trigger.current){let e=this.trigger.current;e?.closePopover&&e.closePopover()}}triggerPopover(e){if(this.trigger.current){let t=this.trigger.current;t?.onTrigger&&t.onTrigger(e)}}renderPopover(e){let{calendarClassName:t,dropdownClassName:a,disabledDates:r,dateFormat:l,isDateDisabled:o,disableDatesBefore:s,disableDatesAfter:c,onRenderPopover:h,onDatePickerClose:_}=this.props,{onClose:f,...b}=e,g=i()(a,"c-date_picker__dropdown");return h?.(),n.createElement(u.AM,{position:"bottom-right",offsetX:p.x,offsetY:p.y,onClose:()=>{f?.(),_?.()},...b},n.createElement("div",{className:g,"data-qa":"date_picker_dropdown"},n.createElement(m.A,{className:t,selectedDate:this.state.selectedDate,disabledDates:r||d.Ml,dateFormat:l||"YYYY-MM-DD",onDateChange:this.handleDateChange,isDateDisabled:o,disableDatesBefore:s,disableDatesAfter:c,focusOnMount:e.openedWithKeyboard})))}renderTrigger(){return this.props.renderTrigger?this.props.renderTrigger(this.state.selectedDate):this.props.children}render(){let{children:e,renderTrigger:t,calendarClassName:a,dropdownClassName:r,selectedDate:i,disabledDates:l,dateFormat:o,onDateChange:s,isDateDisabled:c,disableDatesBefore:d,disableDatesAfter:m,...p}=this.props;return n.createElement(u.Wv,{...p,ref:this.trigger,renderPopover:this.renderPopover},this.renderTrigger())}};DatePickerTrigger.displayName="DatePickerTrigger"},0xbed1d357:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x2286acf6c),s=a(0x9e671ad),c=a(0x1075d3a9c),d=a.n(c),m=a(0x1229d92d),u=a(0xb97b797e),p=a(0x13776886e),h=a(0x20482ad21),_=a(0x2b7f0bcc),f=a(0x11a296110),b=a(0x1b111a110),g=a(0x1759e4833),y=a(0x1faa3f1ac),A=a(0x6aeae8a3),x=a(0x4c96e5d9);let E=new h.Ay("date_picker"),C=class extends n.PureComponent{static defaultProps={className:void 0,disabledDates:[],dateFormat:"YYYY-MM-DD",onStartDateChange:l.A,onEndDateChange:l.A,inputWidth:650,maxRange:void 0,showClearSelection:!0,endDateRequired:!1,onClose:l.A,disableDatesBefore:void 0,disableDatesAfter:void 0,singleMonthMode:!1,showSaveCancelButtons:!1,onSave:l.A,disableSaveWhenNoDatesSelected:!1,renderInPopover:!0,buttonSize:"small",showPreviousMonth:!1,saveButtonAutoClogProps:void 0,saveButtonCopy:void 0};popover;listenerInstalled;dayFocusSet;onResize;onScroll;static getDerivedStateFromProps(e,t){let a={...t};return e.showSaveCancelButtons&&e.tempStartDate&&e.tempStartDate!==t.selectedStartDate&&(a.selectedStartDate=e.tempStartDate),e.showSaveCancelButtons&&e.tempEndDate&&e.tempEndDate!==t.selectedEndDate&&(a.selectedEndDate=e.tempEndDate),a}constructor(e){let t,a;super(e);const{dateFormat:r,selectedStartDate:i,selectedEndDate:l}=e,s=d()(e.selectedStartDate),c=d()(e.selectedEndDate);s.isValid()?(t=s.format(r),a=s.add(1,"months").format(r)):(t=e.showPreviousMonth?d()().subtract(1,"months").format(r):d()().format(r),a=e.showPreviousMonth?d()().format(r):d()().add(1,"months").format(r)),this.state={selectedStartDate:s.isValid()?i:void 0,selectedEndDate:c.isValid()?l:void 0,thisMonth:t,nextMonth:a,calendarBounds:null,lowerBoundDateMoment:null,upperBoundDateMoment:null,focusedDate:null,hoveringDate:null},(0,u.v)(this,["onKeyDown","onMouseEnter","onMouseLeave","onDateClick","onDateFocus","onDateBlur","onPreviousMonthClick","onNextMonthClick","onClearDatesClick","isDateDisabled","isDateInvalid","renderDate","measureCalendarAndSetState","onClose","onSave"]),this.popover=n.createRef(),this.onResize=(0,o.A)(this.measureCalendarAndSetState,50,{maxWait:50}),this.onScroll=(0,o.A)(this.measureCalendarAndSetState,50,{maxWait:50}),this.dayFocusSet=!1}componentDidMount(){this.maybeInstallListener(),this.measureCalendarAndSetState()}componentWillUnmount(){this.maybeUninstallListener()}onClearDatesClick(){this.setState(()=>({selectedStartDate:void 0,selectedEndDate:void 0,lowerBoundDateMoment:null,upperBoundDateMoment:null})),this.props.showSaveCancelButtons?this.props.setPickerState(e=>({...e,tempStartDate:void 0,tempEndDate:void 0})):(this.props.onStartDateChange(void 0),this.props.onEndDateChange(void 0))}onClose(){let{pickerState:e,setPickerState:t,endDateRequired:a,onEndDateChange:n,onClose:r,showSaveCancelButtons:i,renderInPopover:l}=this.props,{selectedStartDate:o,selectedEndDate:s}=this.state;(e?.isExpanded||!l)&&(i?this.setState(()=>({selectedStartDate:this.props.selectedStartDate,selectedEndDate:this.props.selectedEndDate})):a&&!s&&(this.setState(()=>({selectedEndDate:o,lowerBoundDateMoment:null,upperBoundDateMoment:null})),n(o)),t(e=>({...e,isExpanded:!1,tempStartDate:void 0,tempEndDate:void 0}),r))}onDateBlur(){this.dayFocusSet=!1,this.setState(()=>({focusedDate:null}))}onDateClick(e){let t=e.target.dataset.value,{dateFormat:a,maxRange:n,onStartDateChange:r,onEndDateChange:i,setPickerState:l,showSaveCancelButtons:o}=this.props,{selectedStartDate:s,selectedEndDate:c}=this.state,m=d()(s,a),u=d()(t,a);if(!this.isDateDisabled(u).isDisabled)if(s){if(s&&!c)u.isBefore(m)?(this.setState(e=>({selectedStartDate:t,selectedEndDate:e.selectedStartDate})),o?l(e=>({...e,tempStartDate:t,tempEndDate:s})):(r(t),i(s))):(this.setState(()=>({selectedEndDate:t})),o?l(e=>({...e,tempEndDate:t})):i(t));else if(s&&c){let e,a;n&&(e=d()(u).subtract(n,"d"),a=d()(u).add(n,"d")),this.setState(()=>({selectedStartDate:t,selectedEndDate:void 0,lowerBoundDateMoment:e,upperBoundDateMoment:a})),o?l(e=>({...e,tempStartDate:t,tempEndDate:void 0})):(r(t),i(void 0))}}else{let e,a;n&&(e=d()(u).subtract(n,"d"),a=d()(u).add(n,"d")),this.setState(()=>({selectedStartDate:t,lowerBoundDateMoment:e,upperBoundDateMoment:a})),o?l(e=>({...e,tempStartDate:t})):r(t)}}onDateFocus(e){this.dayFocusSet=!0;let t=e.currentTarget.dataset.value;t&&this.setState(()=>({focusedDate:t}))}onPreviousMonthClick(){this.setState(e=>({thisMonth:d()(e.thisMonth).subtract(1,"months").format(this.props.dateFormat),nextMonth:e.thisMonth}))}onNextMonthClick(){this.setState(e=>({thisMonth:e.nextMonth,nextMonth:d()(e.nextMonth).add(1,"months").format(this.props.dateFormat)}))}onSave(){let{pickerState:e,setPickerState:t,endDateRequired:a,onStartDateChange:n,onEndDateChange:r,onSave:i,renderInPopover:l}=this.props,{selectedStartDate:o,selectedEndDate:s}=this.state;(e?.isExpanded||!l)&&(n(o),a&&!s?(r(o),this.setState(()=>({selectedEndDate:o}))):r(s),t(e=>({...e,isExpanded:!1,tempStartDate:void 0,tempEndDate:void 0}),()=>i({selectedStartDate:o,selectedEndDate:s})))}getCalendarBounds(){let{inputRef:e}=this.props;return e&&e.current?e.current.getBoundingClientRect():null}getTargetBounds(){let{windowRef:e,inputWidth:t,singleMonthMode:a}=this.props,n=this.state.calendarBounds||{top:0,left:0,width:0,bottom:0},r=e.deref()?.scrollY??0;return{top:n.top+r+4,bottom:n.bottom+r-4,left:n.left-((a?332:674)-t)/2,width:n.width,right:0,height:0}}onKeyDown(e){let{key:t}=e;"Enter"===t&&this.onDateClick(e);let a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[e.key];if(!a)return;let{focusedDate:n}=this.state;if(!n)return;let r=d()(n,this.props.dateFormat);r.add(a,"days");let i=r.format(this.props.dateFormat);this.setState(()=>({focusedDate:i}),()=>{let e=`div[data-value="${i}"]`;this.props.calendarRef.current?.querySelector(e)?.focus()})}onMouseEnter(e){let{selectedEndDate:t,selectedStartDate:a}=this.state,n=e.target.dataset.value;t&&a&&!(0,s.A)(t,a)?this.setState(()=>({hoveringDate:null})):this.setState(()=>({hoveringDate:n||""}))}onMouseLeave(){this.setState(()=>({hoveringDate:null}))}isDateDisabled(e){let{disableDatesBefore:t,disableDatesAfter:a,maxRange:n}=this.props,{lowerBoundDateMoment:r,upperBoundDateMoment:i,selectedEndDate:l}=this.state;if(n&&!l&&r&&i&&!e.isBetween(r,i))return{isDisabled:!0,reason:"max-range-exceeded"};if(t&&e.isBefore(t)||a&&e.isAfter(a))return{isDisabled:!0,reason:"date-explicitly-disabled"};for(let t=0,a=this.props.disabledDates[t];t<this.props.disabledDates.length;t++)if(e.isSame(d()(a,this.props.dateFormat)))return{isDisabled:!0,reason:"date-explicitly-disabled"};return{isDisabled:!1,reason:null}}isDateInvalid(e){let t=d()(this.state.selectedStartDate,this.props.dateFormat),a=d()(this.state.selectedEndDate,this.props.dateFormat);return(e.isSame(t)||e.isSame(a)||e.isBetween(t,a))&&this.isDateDisabled(e).isDisabled}maybeInstallListener(){if(this.listenerInstalled)return;let e=this.props.windowRef.deref();e?.addEventListener("resize",this.onResize),e?.addEventListener("scroll",this.onScroll),e?.addEventListener(this.props.measureEventId,this.measureCalendarAndSetState),this.listenerInstalled=!0}maybeUninstallListener(){if(!this.listenerInstalled)return;this.onResize.cancel(),this.onScroll.cancel();let e=this.props.windowRef.deref();e?.removeEventListener("resize",this.onResize),e?.removeEventListener("scroll",this.onScroll),e?.removeEventListener(this.props.measureEventId,this.measureCalendarAndSetState),this.listenerInstalled=!1}measureCalendarAndSetState(){this.listenerInstalled&&this.setState(()=>({calendarBounds:this.getCalendarBounds()}))}renderDate({value:e,dateFormat:t,sameMonth:a,isToday:r,monthStart:l,monthEnd:o,firstWeekStart:s,firstWeekEnd:c,lastWeekStart:m,lastWeekEnd:u}={}){if(!a)return null;let p=d()(e,t),{maxRange:h}=this.props,{selectedStartDate:_,selectedEndDate:f,focusedDate:b,hoveringDate:g}=this.state,y=d()(_,t),A=d()(f,t),C=d()(g,t),{isDisabled:k,reason:v}=this.isDateDisabled(p),S=Number(p.format("D")),I=p.isBetween(y,C)||p.isBetween(C,y)||p.isBetween(A,C)||p.isBetween(C,A)||_&&f&&p.isBetween(y,A),w=i()("c-date_range_picker_calendar__date",{"c-date_range_picker_calendar__date--is_today":r,"c-date_range_picker_calendar__date--select_range_start":p.isSame(y),"c-date_range_picker_calendar__date--select_range_end":p.isSame(A),"c-date_range_picker_calendar__date--in_selected_range":I,"c-date_range_picker_calendar__date--disabled":k,"c-date_range_picker_calendar__date--is_invalid":this.isDateInvalid(p),"c-date_range_picker_calendar__date--month_start":l,"c-date_range_picker_calendar__date--month_end":o,"c-date_range_picker_calendar__date--first_week_start":s,"c-date_range_picker_calendar__date--first_week_end":c,"c-date_range_picker_calendar__date--last_week_start":m,"c-date_range_picker_calendar__date--last_week_end":u}),T=-1;b===e?T=0:this.dayFocusSet||k||(T=0,this.dayFocusSet=!0);let N=n.createElement("div",{className:w,onClick:this.onDateClick,onFocus:this.onDateFocus,onBlur:this.onDateBlur,onKeyDown:this.onKeyDown,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,"data-value":e,"aria-label":p.format("D"),"data-format":t,"data-day-number":S,role:"button","aria-disabled":k,tabIndex:T},p.format("D"));return k&&h&&"max-range-exceeded"===v?n.createElement(x.Ay,{tip:E.t("The maximum date range is {maxRange} days",{maxRange:h.toString()}),zIndex:"above_fs"},N):(p.format("D")===p.endOf("month").format("D")&&(this.dayFocusSet=!1),N)}renderNextMonth(){let{dateFormat:e,singleMonthMode:t}=this.props;if(t)return null;let a=d()(this.state.nextMonth),r=(0,p.A)(a,"{calendar_header}");return n.createElement("div",null,n.createElement(g.A,{title:r,onNextMonthClick:this.onNextMonthClick}),n.createElement(b.A,{month:a.format(e),renderDate:this.renderDate,dateFormat:e,selectedDate:this.state.selectedEndDate}))}renderThisMonth(){let{dateFormat:e,singleMonthMode:t,maxRange:a}=this.props,r=d()(this.state.thisMonth),i=(0,p.A)(r,"{calendar_header}"),l=t?this.onNextMonthClick:void 0,o=a?n.createElement(_.Ay,{type:"inline",level:"info",className:"margin_bottom_50"},E.t("Date range is limited to {maxRange} days",{maxRange:a.toString()})):null;return n.createElement("div",null,n.createElement(g.A,{title:i,onPreviousMonthClick:this.onPreviousMonthClick,onNextMonthClick:l}),o,n.createElement(b.A,{month:r.format(e),renderDate:this.renderDate,dateFormat:e,selectedDate:this.state.selectedStartDate}))}render(){let{className:e,pickerState:t,showClearSelection:a,singleMonthMode:r,showSaveCancelButtons:l,calendarRef:o,renderInPopover:s,buttonSize:c,tempStartDate:d,tempEndDate:m,saveButtonAutoClogProps:u,saveButtonCopy:p}=this.props,h=i()("c-date_range_picker_calendar",e,{"c-date_range_picker_calendar--single-month":r,"c-date_range_picker_calendar--popover":s}),_=s?{ref:this.popover,isOpen:t?.isExpanded,shouldFocusAfterRender:!1,position:"bottom-left",targetBounds:this.getTargetBounds(),onClose:this.onClose}:{},b=s?A.AM:n.Fragment,g=!(this.props.disableSaveWhenNoDatesSelected&&(!d||!m))&&(this.props.selectedStartDate||this.props.selectedEndDate||this.state.selectedStartDate&&this.state.selectedEndDate);return n.createElement(b,_,n.createElement("div",{className:h,ref:o,"data-qa":"date_ranger_picker_calendar"},n.createElement("div",{className:"c-date_range_picker_calendar__calendars"},this.renderThisMonth(),this.renderNextMonth()),n.createElement("div",{className:"c-date_range_picker_calendar__buttons"},a&&(this.state.selectedStartDate||this.state.selectedEndDate)?n.createElement(y.A,{onClick:this.onClearDatesClick},E.t("Clear selection")):null,l&&n.createElement("div",{className:"display_flex c-date_range_picker_calendar__buttons--right"},n.createElement(f.Ay,{type:"outline",size:c,className:"margin_right_50",onClick:this.onClose,"data-qa":"date_ranger_picker_calendar_cancel_button"},E.t("Cancel")),n.createElement(f.Ay,{type:"primary",size:c,onClick:this.onSave,"data-qa":"date_ranger_picker_calendar_save_button",disabled:!g,autoClogProps:u},p||E.t("Save"))))))}};C.displayName="DateRangePickerCalendar";let k=(0,m.A)(C)},0xcf3ab7bb:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1075d3a9c),s=a.n(o),c=a(0x190e60a66),d=a(0x1229d92d),m=a(0xb97b797e),u=a(0xb1c0d55),p=a(0x20482ad21),h=a(0x224f7f0e9),_=a(0xa6f3163b),f=a(0xd054f030),b=a(0x2501a2cee);let g=new p.Ay("date_picker"),y=class extends n.Component{static defaultProps={className:void 0,disabledDates:[],size:"medium",width:650,useRealInputs:!1,showSaveCancelButtons:void 0,onStartDateChange:l.A,onEndDateChange:l.A,disableDatesBefore:void 0,disableDatesAfter:void 0,startInputPlaceholder:void 0,endInputPlaceholder:void 0,focusOnMount:!1,startInputAriaLabel:void 0,endInputAriaLabel:void 0,preventScrollOnFocus:!1};measurePopoverEvent;constructor(e){super(e),(0,m.v)(this,["isDateDisabled","onInputClickOrFocus","onKeyDown","handleStartDateChange","handleEndDateChange"]);const{measureEventId:t=null}=this.props;t&&(this.measurePopoverEvent=new Event(t))}onInputClickOrFocus(){let{pickerState:e,setPickerState:t}=this.props;e.isExpanded||t(e=>({...e,isExpanded:!0})),this.maybeRepositionCalendarPopover()}maybeRepositionCalendarPopover(){let{windowRef:e,measureEventId:t}=this.props;this.measurePopoverEvent&&t&&e.deref()?.dispatchEvent(this.measurePopoverEvent)}onKeyDown(e){let{pickerState:t,setPickerState:a,calendarRef:n}=this.props;t.isExpanded&&(e.which===h.wn?a(e=>({...e,isExpanded:!1})):e.which===h.n6&&(e.preventDefault(),n.current?.querySelector('.c-date_range_picker_calendar__date[tabindex="0"]')?.focus()))}getDateDisplayValue(e){let t=s()(e);if(!t||!t.isValid())return"";let{displayFormat:a}=this.props;if(a)return t.format(a);let n=(0,c.F)().getLocaleForLastViewedTeam(),r="es-ES"===n||"es-LA"===n;return(0,u.A)(t,{shortenMonth:r,shortenDay:r})}getDisplayValue(){let{startDate:e,endDate:t,tempStartDate:a,tempEndDate:r,placeholderText:i}=this.props;if(!a&&!r){if(e&&t&&e!==t)return g.rt("{startDate} to {endDate}",{startDate:this.getDateDisplayValue(e),endDate:this.getDateDisplayValue(t)});if(e)return this.getDateDisplayValue(e);if(t)return this.getDateDisplayValue(t)}return a&&r?g.rt("{startDate} to {endDate}",{startDate:this.getDateDisplayValue(a),endDate:this.getDateDisplayValue(r)}):a?this.getDateDisplayValue(a):r?this.getDateDisplayValue(r):n.createElement("span",{className:"sk_foreground_max_solid"},i||g.t("Start Date to End Date"))}getRealInputStartValue(){return this.props.showSaveCancelButtons?this.props.tempStartDate||"":this.props.startDate||""}getRealInputEndValue(){return this.props.showSaveCancelButtons?this.props.tempEndDate||"":this.props.endDate||""}isDateDisabled(e){for(let t=0,a=this.props.disabledDates[t];t<this.props.disabledDates.length;t++)if(e.isSame(s()(a,this.props.dateFormat)))return!0;return!1}handleStartDateChange(e){let{dateFormat:t,disableDatesBefore:a,disableDatesAfter:n,tempEndDate:r,showSaveCancelButtons:i,setPickerState:l,onStartDateChange:o}=this.props,c=s()(e,t);if(!(a&&c.isBefore(s()(a,t)))&&!(n&&c.isAfter(s()(n,t))))if(i){let a={};r&&s()(r,t).isBefore(c)&&(a.tempEndDate=e),a.tempStartDate=e,l(e=>({...e,...a}))}else o(e)}handleEndDateChange(e){let{disableDatesBefore:t,disableDatesAfter:a,dateFormat:n,showSaveCancelButtons:r,setPickerState:i,onEndDateChange:l,tempStartDate:o}=this.props,c=s()(e,n);t&&c.isBefore(s()(t,n))||a&&c.isAfter(s()(a,n))||o&&c.isBefore(o,n)||(r?i(t=>({...t,tempEndDate:e})):l(e))}render(){let{className:e,inputRef:t,pickerId:a,size:r,width:l,dataQa:o,useRealInputs:s,dateFormat:c,displayFormat:d,startInputPlaceholder:m,endInputPlaceholder:u,focusOnMount:p,"aria-label":h,preventScrollOnFocus:g}=this.props,y=i()("c-date_range_picker_input",e),A=i()("c-date_range_picker_input__button",`c-date_range_picker_input__button--${r}`),x=i()(y,"c-date_range_picker_input__container"),E=o&&`${o}_date_input`;return s?n.createElement("div",{style:{width:l},ref:t,className:x},n.createElement(f.A,{id:`${a}-start-input`,onChange:this.handleStartDateChange,size:r,value:this.getRealInputStartValue(),displayFormat:d||c,valueFormat:c,placeholder:m,focusOnMount:p,"aria-label":"string"==typeof h?h:h?.start,preventScrollOnFocus:g}),n.createElement(f.A,{id:`${a}-end-input`,onChange:this.handleEndDateChange,size:r,value:this.getRealInputEndValue(),displayFormat:d||c,valueFormat:c,placeholder:u,"aria-label":"string"==typeof h?h:h?.end,preventScrollOnFocus:g})):n.createElement("div",{className:y,style:{width:l},ref:t},n.createElement(_.A,{id:a,name:a,className:A,onClick:this.onInputClickOrFocus,onFocus:this.onInputClickOrFocus,onKeyDown:this.onKeyDown,"data-qa":E,"aria-label":"string"==typeof h?h:h?.start},n.createElement("span",{className:"margin_right_25"},n.createElement(b.Ah,{name:"calendar",inline:!0})),this.getDisplayValue()))}};y.displayName="DateRangePickerInput";let A=(0,d.A)(y)},0x32683b78:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1075d3a9c),s=a.n(o),c=a(0xb97b797e),d=a(0xbed1d357),m=a(0xcf3ab7bb),u=a(0x2469ec64e);let p=class extends n.PureComponent{static defaultProps={id:`date-range-picker-${(0,u.r9)()}`,className:null,selectedStartDate:null,selectedEndDate:null,disabledDates:[],dateFormat:"YYYY-MM-DD",displayFormat:null,onStartDateChange:l.A,onEndDateChange:l.A,placeholderText:null,size:"medium",width:null,maxRange:void 0,showClearSelection:!0,endDateRequired:!1,onCalendarClose:l.A,disableDatesBefore:void 0,disableDatesAfter:void 0,singleMonthMode:!1,dataQa:null,showSaveCancelButtons:!1,onSave:l.A,disableSaveWhenNoDatesSelected:!1,closeAfterSelection:!1,renderCalendarInPopover:!0,buttonSize:void 0,showPreviousMonth:!1,useRealInputs:!1,startInputAriaLabel:void 0,startInputPlaceholder:void 0,endInputAriaLabel:void 0,endInputPlaceholder:void 0,focusOnMount:!1,preventScrollOnFocus:!1,saveButtonAutoClogProps:null,saveButtonCopy:void 0};inputRef;calendarRef;measurePopoverEventName;constructor(e){super(e);const t=s()(e.selectedStartDate).isValid()?e.selectedStartDate:void 0,a=s()(e.selectedEndDate).isValid()?e.selectedEndDate:void 0;this.state={isExpanded:!1,selectedStartDate:t,selectedEndDate:a,tempStartDate:t,tempEndDate:a},this.inputRef=n.createRef(),this.calendarRef=n.createRef(),(0,c.v)(this,["handleStartDateChange","handleEndDateChange","setPickerState"]),this.measurePopoverEventName=`measureDateRangeCalendarPopover--${e.id}`}setPickerState(e,t){this.setState(e,t)}handleEndDateChange(e){let{onEndDateChange:t,closeAfterSelection:a}=this.props;e!==this.state.selectedEndDate&&(this.setState(()=>({selectedEndDate:e})),t({selectedEndDate:e}),e&&a&&this.setState(t=>({isExpanded:!1,tempStartDate:t.selectedStartDate,tempEndDate:e})))}handleStartDateChange(e){e!==this.state.selectedStartDate&&(this.setState(()=>({selectedStartDate:e})),this.props.onStartDateChange({selectedStartDate:e}))}render(){let{id:e,className:t,disabledDates:a,dateFormat:r,displayFormat:l,placeholderText:o,size:s,width:c,maxRange:u,showClearSelection:p,endDateRequired:h,onCalendarClose:_,disableDatesBefore:f,disableDatesAfter:b,singleMonthMode:g,showSaveCancelButtons:y,onSave:A,disableSaveWhenNoDatesSelected:x,dataQa:E,renderCalendarInPopover:C,buttonSize:k,showPreviousMonth:v,useRealInputs:S,"aria-label":I,startInputPlaceholder:w,endInputPlaceholder:T,focusOnMount:N,preventScrollOnFocus:M,saveButtonAutoClogProps:R,saveButtonCopy:P}=this.props,{tempStartDate:L,tempEndDate:O}=this.state,D=i()("c-date_range_picker",t);return n.createElement("div",{className:D,"data-qa":E},n.createElement(m.A,{startDate:this.state.selectedStartDate,endDate:this.state.selectedEndDate,dateFormat:r,displayFormat:l,placeholderText:o,inputRef:this.inputRef,calendarRef:this.calendarRef,measureEventId:this.measurePopoverEventName,pickerState:this.state,setPickerState:this.setPickerState,pickerId:e,size:s,width:c,tempStartDate:L,tempEndDate:O,dataQa:E,useRealInputs:S,"aria-label":I,onStartDateChange:this.handleStartDateChange,onEndDateChange:this.handleEndDateChange,showSaveCancelButtons:y,disableDatesBefore:f,disableDatesAfter:b,startInputPlaceholder:w,endInputPlaceholder:T,focusOnMount:N,preventScrollOnFocus:M}),n.createElement(d.A,{selectedStartDate:this.state.selectedStartDate,selectedEndDate:this.state.selectedEndDate,disabledDates:a,dateFormat:r,onStartDateChange:this.handleStartDateChange,onEndDateChange:this.handleEndDateChange,inputRef:this.inputRef,calendarRef:this.calendarRef,measureEventId:this.measurePopoverEventName,pickerState:this.state,setPickerState:this.setPickerState,inputWidth:c,pickerId:e,maxRange:u,showClearSelection:p,endDateRequired:h,onClose:_,disableDatesBefore:f,disableDatesAfter:b,singleMonthMode:g,showSaveCancelButtons:y,onSave:A,disableSaveWhenNoDatesSelected:x,renderInPopover:C,buttonSize:k,showPreviousMonth:v,tempStartDate:this.state.tempStartDate,tempEndDate:this.state.tempEndDate,saveButtonAutoClogProps:R,saveButtonCopy:P}))}};p.displayName="DateRangePicker";let h=p},0x2503b7c1:(e,t,a)=>{"use strict";a.d(t,{H0:()=>u,$5:()=>p.A,tK:()=>h.A,b:()=>_.A,fN:()=>c.Ay,Ur:()=>f.A,sE:()=>b.A,Yf:()=>g.A});var n=a(0xbad225b5),r=a(0x13776886e),i=a(940089e4),l=a(0x1df96de4c),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x124f73fdb),d=a(0x2501a2cee);let m=new o.Ay("date_picker");function DatePickerButton({dateFormat:e="YYYY-MM-DD",disableDatesAfter:t,disableDatesBefore:a,disabledDates:o=l.Ml,displayFormat:u="date_short",isDateDisabled:p,isDisabled:h,onDateChange:_,placeholder:f=m.t("Select date"),selectedDate:b,...g}){let y;if(b){let t=(0,i.A)(b,{parseFormat:e,returnMoment:!0});y=(0,r.A)(t,`{${u}}`)}else y=f;let A=n.createElement(s.Ay,{...g,disabled:h},n.createElement("span",{className:"margin_right_50"},n.createElement(d.Ah,{name:"calendar",size:"20"})),y);return h?A:n.createElement(c.Ay,{dateFormat:e,disableDatesAfter:t,disableDatesBefore:a,disabledDates:o,isDateDisabled:p,onDateChange:_,"aria-label":y},A)}DatePickerButton.displayName="DatePickerButton";let u=DatePickerButton;var p=a(0xcbaa2b9f),h=a(0xd054f030),_=a(0x18246e515),f=a(0x32683b78),b=a(0xbed1d357),g=a(0xcf3ab7bb)},0x1b1820b2c:(e,t,a)=>{"use strict";a.d(t,{A:()=>E,u:()=>A});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x237b6a339),s=a(0x1075d3a9c),c=a.n(s),d=a(0x1f7a86bf5),m=a(0xb97b797e),u=a(0x18dac2b8e),p=a(0x20482ad21),h=a(0x18246e515),_=a(0x1d2cd7755),f=a(0x9154b87c);let b=new p.Ay("date_time_picker"),g="YYYY-MM-DD",y="HH:mm";var A=((n={}).DateInput="DateInput",n.TimeInput="TimeInput",n);let x=class extends r.Component{defaultId;static defaultProps={valueFormat:"YYYY-MM-DDTHH:mm",showTimeZone:!0,isRequired:!0,"data-qa":"date_time_picker"};constructor(e){super(e),!e.isRequired&&((0,u.Cu)()||(0,u.b3)())&&this.props.logger.error(Error("DateTimePicker: Support for isRequired=false not implemented  yet")),(0,m.v)(this,["handleDateChange","handleTimeChange"])}getId(){return this.props.id?this.props.id:(this.defaultId=this.defaultId||(0,o.A)("date_time_picker"),this.defaultId)}getMaxMoment(){if(this.props.max)return c()(this.props.max,this.props.valueFormat)}getMinMoment(){if(this.props.min)return c()(this.props.min,this.props.valueFormat)}getValueMoment(){if(this.props.value)return c()(this.props.value,this.props.valueFormat)}handleChange({date:e,time:t,isSelectionBeingCleared:a}={}){if(!this.props.isRequired&&a)return void this.props.onChange("");let n=e?c()(e,g):this.getValueMoment()||c()(),r=t?c()(t,y):this.getValueMoment()||c()();n.hour(r.hour()),n.minute(r.minute());let i=this.getMinMoment();i&&n.isBefore(i)&&(n=i);let l=this.getMaxMoment();l&&n.isAfter(l)&&(n=l),n.isValid()&&this.props.onChange(n.format(this.props.valueFormat))}handleDateChange(e){let t=!this.props.isRequired&&!e;this.handleChange({date:e,isSelectionBeingCleared:t})}handleTimeChange(e){let t=!this.props.isRequired&&!e;this.handleChange({time:e,isSelectionBeingCleared:t})}renderDatePicker(){let{"aria-label":e,"aria-labelledby":t,"data-qa":a,disabled:n,isRequired:i,isInvalid:l,size:o,dateDisplayFormat:s,focusOnMountOption:c}=this.props,d=`${this.getId()}-datepicker`,m=b.t("Date");e&&(m=`${e} ${m}`);let u=this.getValueMoment(),p=u?u.format(g):void 0,_=b.t("Select a date",{fallbackHash:"642b09c1f60b0090861264facba6e0e0f1b98c05",fallbackHashNs:"block_kit"}),f=this.getMinMoment(),y=this.getMaxMoment();return r.createElement("div",{className:"c-date_time_picker__date_picker_container"},r.createElement(h.A,{id:d,dateFormat:g,selectedDate:p,onDateChange:this.handleDateChange,datePickerDisabled:n,datePlaceholder:_,disableDatesBefore:f?f.format(g):void 0,disableDatesAfter:y?y.format(g):void 0,"aria-label":m,"aria-labelledby":t,"data-qa":a?`${a}_date_picker`:void 0,required:i,size:o,displayFormat:s,focusOnMount:"DateInput"===c,isInvalid:l,onResetInput:this.props.onResetDatePickerInput,popoverOverrides:this.props.datePickerPopoverOverrides}))}renderTimePicker(){let{"aria-label":e,"aria-labelledby":t,"data-qa":a,isInvalid:n,isRequired:i,showTimeZone:l,optionsHourIncrement:o,timezone:s,size:c,focusOnMountOption:d}=this.props,m=b.t("Time");e&&(m=`${e} ${m}`);let u=this.getValueMoment(),p=this.getMinMoment(),h=this.getMaxMoment(),_=u&&u.format(y),g=p&&u&&p.isSame(u,"date")?p.format(y):void 0,A=h&&u&&h.isSame(u,"date")?h.format(y):void 0,x=this.props.disabled||!u&&!!(p||h);return r.createElement("div",{className:"c-date_time_picker__time_picker_container"},r.createElement(f.Ay,{value:_,onChange:this.handleTimeChange,isDisabled:x,min:g,max:A,width:"100%",ariaLabel:m,ariaLabelledBy:t,timeZone:s,selectDataQa:`${a}_time_picker`,showTimeZone:l,isInvalid:n,optionsHourIncrement:o,isRequired:i,size:c,focusOnMount:"TimeInput"===d}))}render(){let{className:e,dateLabel:t,timeLabel:a}=this.props;return r.createElement("div",{id:this.getId(),className:l()(e,"c-date_time_picker"),"data-qa":this.props["data-qa"]},t?r.createElement(_.A,{text:t,id:"custom-modal-date-label","data-qa":"custom-modal-date-label-data-qa"},this.renderDatePicker()):this.renderDatePicker(),a&&r.createElement("br",null),a?r.createElement(_.A,{text:a,id:"custom-modal-time-label","data-qa":"custom-modal-time-label-data-qa"},this.renderTimePicker()):this.renderTimePicker())}};x.displayName="DateTimePicker";let E=(0,d.V)(x)},0xf3b0bc58:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x278aa6d7),s=a(0x102edf836),c=a(0x11a296110),d=a(0x15f8e452a),m=a(0x15fb82076),u=a(0x2501a2cee);function EmptyState({className:e,dataQAPrefix:t,description:a,imageUrl:r,imageUrl2x:p,isExtended:h=!1,onClickPrimaryAction:_=l.A,onClickSecondaryAction:f=l.A,primaryActionTextWrapperClassName:b,primaryActionText:g,primaryActionHref:y,primaryActionButtonType:A=s.QE.outline,primaryActionDataQA:x,primaryActionIcon:E,primaryActionAutoClogProps:C,role:k="alert","aria-label":v,secondaryActionHref:S,secondaryActionText:I,title:w,titleIcon:T,titleIconClassName:N,secondaryLinkRef:M,helpLink:R},P){let L;r&&p&&(L={srcSet:`${r}, ${p} 2x`});let O=y?c.z9:c.Ay,D=(0,n.useRef)(null),F=(0,o.A)(M);(0,n.useImperativeHandle)(P,()=>({focus:()=>{let e=D.current;e?e.focus():F.current?.focus()}}),[D,F]);let U=t?`${t}_`:"";return n.createElement("div",{role:k,...v&&{"aria-label":v},className:i()(e,"c-empty_state",{"c-empty_state--extended":h}),"data-qa":`${U}empty_state_wrapper`},r&&n.createElement("div",{className:"c-empty_state__image_wrapper"},n.createElement("img",{...L,src:r,className:"c-empty_state__image",alt:""})),T&&n.createElement(d.A,{className:i()(N,"c-empty_state__title_icon"),size:"inherit",type:T}),w&&n.createElement("div",{className:"c-empty_state__title"},w),n.createElement("div",{className:"c-empty_state__description"},a),g&&n.createElement("div",{className:i()("c-empty_state__action",b,{"c-empty_state__action_href":!!y}),"data-qa":"empty_state_primary_action"},n.createElement(O,{ref:D,className:i()({"empty-state-href":!!y}),type:A,onClick:_,href:y,"data-qa":x,...C?{autoClogProps:C}:{}},E?n.createElement("div",{className:"c-empty_state__primary_action_text_with_icon"},n.createElement(u.Ah,E),g):g)),I&&n.createElement("div",{className:"c-empty_state__secondary_action","data-qa":"empty_state_secondary_action"},n.createElement(m.A,{className:"c-empty_state_secondary_action_link",href:S,onClick:f,ref:F},I)),R&&n.createElement("div",{className:"c-empty_state__secondary_action","data-qa":"empty_state_secondary_action"},R))}EmptyState.displayName="EmptyState";let p=n.memo(n.forwardRef(EmptyState))},0x22b8621cf:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xbe5e39b6),l=a(0x125523996),o=a(0x181d663bb),s=a(0x344bb842),c=a(0x99233ecb),d=a(0x2501a2cee),m=a(0x4c96e5d9),u=a(0x32439399),p=a.n(u);let ActionButton=({onClick:e=r.A,buttonRef:t,autoClogProps:a,isDisabled:u,onMouseEnter:h=r.A,onMouseLeave:_=r.A,onFocus:f=r.A,onBlur:b=r.A,href:g,tooltipLabel:y,tooltipPosition:A,svgIconProps:x,isMenuTrigger:E=!1,renderMenu:C,onPopoverOpen:k=r.A,onPopoverClose:v=r.A,tooltipZIndex:S,buttonSize:I="medium","aria-disabled":w,menuPosition:T=i.yX.LeftBottom,suppressActionStyles:N=!1,...M})=>{let R=(0,l.A)(M),P=(0,o.A)(M),L=(0,n.useMemo)(()=>n.createElement(s.A,{className:N?void 0:p().button,onClick:e,"aria-label":R["aria-label"],"aria-describedby":R["aria-describedby"],"aria-haspopup":R["aria-haspopup"],ref:t,"aria-pressed":R["aria-pressed"],"aria-keyshortcuts":R["aria-keyshortcuts"],autoClogProps:a,href:g,disabled:u,onMouseEnter:h,onMouseLeave:_,onFocus:f,onBlur:b,size:I,"aria-disabled":w,...P},n.createElement(d.Ah,{...x,inline:!0})),[e,R,t,a,g,u,h,_,f,b,I,w,P,x,N]),O=(0,n.useMemo)(()=>y?n.createElement(m.Ay,{zIndex:S,tip:y,position:A,delay:m.n1,hideFromScreenReader:!0},L):L,[y,S,A,L]);return E&&C?n.createElement(c.cQ,{onTriggerClose:v,onPopoverOpen:k,onPopoverClose:v,renderMenu:C,position:T,offsetX:-2,closeOnSelect:!0},O):O};ActionButton.displayName="ActionButton";let h=ActionButton},0x11c86845f:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0xdef09ef9),i=a.n(r);let ActionsBar=({children:e=null}={children:null})=>n.createElement("div",{className:i().bar},e);ActionsBar.displayName="ActionsBar";let l=n.memo(ActionsBar)},0x32d3ef3d:(e,t,a)=>{"use strict";a.d(t,{S:()=>n,w:()=>r});let n={thumbnail:"thumbnail",compact:"compact",expanded:"expanded"},r={enabled:"enabled",loading:"loading",processing:"processing",error:"error",noAccess:"no_access"}},0xfa28400d:(e,t,a)=>{"use strict";a.d(t,{j7:()=>EntityContainer,Ay:()=>E});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xf27817c9),o=a(0x21a39e2e1),s=a(0x1df96de4c),c=a(0x181d663bb),d=a(0x20482ad21),m=a(0x11a296110),u=a(0x32d3ef3d),p=a(0x2501a2cee),h=a(0x4c96e5d9),_=a(0x46692f66),f=a.n(_);let b=new d.Ay("sk_entities"),RemoveButton=({onRemove:e,dataAttrs:t={},removeButtonTip:a})=>{let r=(0,n.useCallback)(t=>{t.stopPropagation(),e(t)},[e]),i=b.t("Remove",{fallbackHash:"304b14ba1a6451f209451dc43d9da92a6ba5f6f1",fallbackHashNs:"drafts"});return n.createElement(h.Ay,{position:"top",tip:a||i,hideFromScreenReader:!0},n.createElement(m.Nm,{onClick:r,className:f().removeButton,"aria-label":a||i,...t},n.createElement(p.Ah,{name:"close-filled"})))};RemoveButton.displayName="RemoveButton";var g=a(0x88dbe1f3),y=a(0xea83f132),A=a(0xb0e48f05),x=a.n(A);new d.Ay("sk_entities");let EntityContainer=({size:e=u.S.thumbnail,isRemovable:t=!0,isInteractive:a=!0,onClick:r,onRemove:d,children:p,data:h,ariaLabel:_="",entityState:f,removeButtonTip:b,isFullWidth:A=!1,isFullHeight:E=!1,isAutoHeight:C=!1,withBorder:k=!0,withHover:v=!1,removeOnBackspace:S=!1,actionsBar:I,renderedInListVariant:w,"data-entity-list-index":T,isActionsBarMenuOpen:N=!1,customWidth:M,customMaxWidth:R,customMinWidth:P,shouldShrinkUnderDefaultWidth:L=!1,groupAriaLabel:O="",interactiveContents:D,forceShowActionsBar:F=!1,autoClogProps:U=s.t0,dragRef:B=null})=>{let H=a&&!w?m.Nm:"div",W=(0,n.useCallback)(e=>{r?.(e,h)},[r,h]),V=(0,n.useCallback)(e=>{e.stopPropagation(),d?.(e,h)},[d,h]),G=(0,n.useCallback)(e=>{t&&S&&("Backspace"===e.key||"Delete"===e.key)&&d?.(e,h)},[t,S,d,h]),q=(0,y.f)(g.j.EntityContainer),j=(0,n.useMemo)(()=>i()(x().group,x()[e],{[x().fullWidth]:A||L,[x().fullHeight]:E,[x().autoHeight]:C,[x().suppressFixedWidth]:!!M||L||A,[x().suppressFixedHeight]:E||C,[x().shouldShrinkUnderDefaultWidth]:L}),[M,C,E,A,L,e]),z=(0,n.useMemo)(()=>i()(x().container,q,{[x().withBorder]:k,[x().renderedInList]:!!w,[x().isFirstInList]:"first"===w,[x().isLastInList]:"last"===w,[x().isSingleInList]:"single"===w,[x().autoHeight]:C,[x().withHover]:v}),[C,w,k,q,v]),K=(0,c.A)(h),$=f!==u.w.enabled,Y=`${$?f:""}${_?` ${_}`:""}`;return n.createElement(l.A,null,({isHovered:e,hoverProps:r,ref:l})=>{let s={"aria-label":Y,className:z,...K},c=a?{onClick:W,...t?{onKeyDown:G}:{}}:{},d=H===m.Nm?{...s,...c,...U?{autoClogProps:U}:{}}:{...s,...c};return n.createElement("div",{role:w?"none":"group",className:j,style:{...M&&{width:M},...R&&{maxWidth:R},...P&&{minWidth:P}},ref:B?(0,o.A)(l,B):l,"data-entity-list-index":T,...r,"aria-label":O},n.createElement(H,d,p),D,I&&n.createElement("div",{className:i()(e||N||F?x().show:x().hide,x().actionsBar)},I),t&&n.createElement("div",{className:e?x().show:x().hide,"data-qa":"remove-container"},n.createElement(RemoveButton,{onRemove:V,dataAttrs:K,removeButtonTip:b})))})};EntityContainer.displayName="EntityContainer";let E=EntityContainer},0x4df01f17:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x1e8c87431),i=a.n(r);function LoadingBox({width:e,height:t,borderRadius:a=0,applyBorderOn:r=["top-right","top-left","bottom-right","bottom-left"],children:l=null}){let o={};return r.find(e=>"top-right"===e)&&(o.borderTopRightRadius=a),r.find(e=>"top-left"===e)&&(o.borderTopLeftRadius=a),r.find(e=>"bottom-right"===e)&&(o.borderBottomRightRadius=a),r.find(e=>"bottom-left"===e)&&(o.borderBottomLeftRadius=a),n.createElement("div",{style:{width:e,height:t,...o},className:i().loadingBox,"data-qa":"loading-box"},l)}LoadingBox.displayName="LoadingBox";let l=LoadingBox},0xb59b1927:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x18f2150ea),o=a(0x32d3ef3d),s=a(0x4df01f17),c=a(0x2501a2cee),d=a(0x882cbbe9),m=a.n(d);let PreviewContainer=({children:e=null,centerContents:t=!1,entityState:a=o.w.loading,noPadding:r=!1,isFullWidth:d=!1,customHeight:u,noTopBorder:p=!1,addBottomBorder:h=!1,isFullHeight:_=!1,isAutoHeight:f=!1})=>{let b=null,g={height:238};switch(_?g.height="100%":(0,l.A)(u)?g.height=u:f&&(g.height="auto"),a){case o.w.enabled:b=n.createElement("div",{className:i()(m().previewContainer,{[m().centerContents]:t,[m().withPadding]:!r,[m().withTopBorder]:!p,[m().withBottomBorder]:h}),style:g},e);break;case o.w.loading:case o.w.processing:b=n.createElement(s.A,{width:d?"100%":426,height:u??302},e);break;case o.w.error:b=n.createElement("div",{className:i()(m().previewContainer,m().centerContents),style:g,"data-qa":"warning-icon"},null!==e?e:n.createElement(c.Ah,{name:"warning",size:"20"}))}return n.createElement("div",{"data-qa":"preview-container",style:{height:"100%"}},b)};PreviewContainer.displayName="PreviewContainer";let u=PreviewContainer},0x9798b7f:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x32d3ef3d),o=a(0x4df01f17),s=a(0x1fdec3e16),c=a(0x115dda929),d=a.n(c);let StackedLabels=({primaryLabel:e,secondaryLabel:t,size:a,entityState:r=l.w.loading,shouldShowLabelGap:c=!0,primaryTruncateLines:m=1,secondaryTruncateLines:u=1})=>{let p=null;switch(r){case l.w.enabled:case l.w.processing:case l.w.error:p=n.createElement("div",{className:i()(d().container,{[d().removeLabelGap]:!c,[d().singleLabel]:!t}),"data-qa":`stacked-labels-${r}-container`},n.createElement("span",{className:d().text},n.createElement(s.A,{withTooltip:!0,lines:m},e)),n.createElement("span",{className:d().subtext},n.createElement(s.A,{lines:u},t)));break;case l.w.loading:a===l.S.compact?p=n.createElement("div",{className:i()(d().container,d().loading),"data-qa":"compact-loading-container"},n.createElement("div",{className:d().primaryLabelLoading},n.createElement(o.A,{width:93,height:8,borderRadius:8})),n.createElement(o.A,{width:131,height:8,borderRadius:8})):a===l.S.expanded&&(p=n.createElement("div",{className:i()(d().container,d().loading),"data-qa":"expanded-loading-container"},n.createElement("div",{className:d().primaryLabelLoading},n.createElement(o.A,{width:100,height:8,borderRadius:8}),n.createElement("div",{className:d().secondPartLoadingLabel},n.createElement(o.A,{width:85,height:8,borderRadius:8}))),n.createElement(o.A,{width:180,height:8,borderRadius:8})))}return p};StackedLabels.displayName="StackedLabels";let m=StackedLabels},0x7729d35b:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xb1ea448c),o=a(0x32d3ef3d),s=a(0x4df01f17),c=a(0x2501a2cee),d=a(0x218975e5),m=a.n(d);let ThumbnailContainer=({children:e=null,entityState:t=o.w.loading,suppressDefaultColors:a=!1,customErrorIcon:r})=>{let d=null;switch(t){case o.w.enabled:d=n.createElement("div",{className:a?m().thumbnailContainer:i()(m().thumbnailContainer,m().defaultContainerColors),style:{height:36,width:36,minWidth:36},"data-qa":"enabled-container"},e);break;case o.w.loading:d=n.createElement(s.A,{width:36,height:36,borderRadius:8});break;case o.w.processing:d=n.createElement(s.A,{width:36,height:36,borderRadius:8},n.createElement(l.A,{size:"small"}));break;case o.w.error:d=n.createElement("div",{className:i()(m().thumbnailContainer,m().defaultContainerColors),style:{height:36,width:36,minWidth:36},"data-qa":"warning-container"},n.createElement(c.Ah,{name:r||"warning",size:"20"}))}return n.createElement("div",{"data-qa":"thumbnail-container"},d)};ThumbnailContainer.displayName="ThumbnailContainer";let u=ThumbnailContainer},0x1eca5a06d:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x181d663bb);function BaseEntityMetadata(e){let{children:t,className:a}=e;return t?n.createElement("span",{className:i()(a,"c-base_entity__metadata"),...(0,l.A)(e)},t):null}BaseEntityMetadata.displayName="BaseEntityMetadata";let o=BaseEntityMetadata},0x15811db89:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x181d663bb);function BaseEntitySubtext(e){let{children:t,className:a}=e;return t?n.createElement("span",{className:i()(a,"c-base_entity__subtext"),...(0,l.A)(e)},t):null}BaseEntitySubtext.displayName="BaseEntitySubtext";let o=BaseEntitySubtext},0x42441247:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x181d663bb),o=a(0x1fdec3e16);function BaseEntityText(e){let{children:t=null,className:a="",multiline:r=!1,inline:s=!1,breakWords:c=!0,truncate:d=!0,withTruncationTooltip:m=!1}=e;return t?s||!d?n.createElement("span",{className:i()(a,"c-base_entity__text"),...(0,l.A)(e)},t):n.createElement("span",{className:i()(a,"c-base_entity__text"),...(0,l.A)(e)},n.createElement(o.A,{lines:r?2:1,breakWords:c,withTooltip:m},t)):null}BaseEntityText.displayName="BaseEntityText";let s=BaseEntityText},0xb97f3675:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x181d663bb),o=a(0x1535e80f3);let s={className:"c-base_entity__avatar"},BaseEntity=e=>{let{size:t,style:a=o.pI.normal,text:r=null,className:c="",subtext:d=null,avatar:m=()=>null,metadata:u=null,forwardedRef:p=null,truncate:h=!0,useAvatarOutline:_=!1}=e,f=m(s),b=!!f,g=(0,n.useCallback)(()=>_?n.createElement("div",{className:"c-base_entity__avatar-container"},f):f,[f,_]);return n.createElement("div",{className:i()(c,"c-base_entity",`c-base_entity--${t}`,{"c-base_entity--has-avatar":b,"c-base_entity--dim":a===o.pI.dim,"c-base_entity--align-items-start":!h,"c-base_entity--vertically-center":t===o.ny.medium&&!!b&&!u&&!d}),...(0,l.A)(e),ref:p},g(),n.createElement("div",{className:"c-base_entity__text-contents"},r,d,u))};BaseEntity.displayName="BaseEntity";let c=BaseEntity},0x128d54e52:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>o,CG:()=>l.A,Q:()=>r.A,sT:()=>i.A});var n=a(0xb97f3675),r=a(0x1eca5a06d),i=a(0x15811db89),l=a(0x42441247);let o=n.A},0xd47730c5:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x181d663bb),s=a(0x1535e80f3),c=a(0x1fdec3e16);let MaybeTruncate=({children:e,truncate:t=!1,truncateWidth:a,withTruncationTooltip:r=!1})=>{let i=(0,n.useMemo)(()=>({maxWidth:a||void 0}),[a]);return t?a?n.createElement("span",{className:"c-base_inline_entity__inline_wrapper",style:i},e):n.createElement("span",null,n.createElement(c.A,{lines:1,withTooltip:r},e)):n.createElement("span",null,e)};MaybeTruncate.displayName="MaybeTruncate";let d={className:"c-base_inline_entity__avatar","data-qa":"base_inline_entity__avatar"},m=class extends n.Component{render(){let{className:e,avatar:t=l.A,primaryContent:a,secondaryContent:r,style:c=s.pI.normal,truncate:m=!1,truncateWidth:u,withTruncationTooltip:p=!1}=this.props,h=t(d);return n.createElement("span",{className:i()(e,"c-base_inline_entity",{"c-base_inline_entity--has_avatar":!!h,"c-base_inline_entity--truncate_block":m&&!u,"c-base_inline_entity--truncate_inline":m&&u,"c-base_inline_entity--dim":c===s.pI.dim,"c-base_inline_entity--highlight-dark":c===s.pI.highlightDark,"c-base_inline_entity--highlight-dim":c===s.pI.highlightDim,"c-base_inline_entity--highlight-light":c===s.pI.highlightLight}),...(0,o.A)(this.props)},n.createElement(MaybeTruncate,{truncate:m,truncateWidth:u,withTruncationTooltip:p},h,n.createElement("span",{className:"c-base_inline_entity__primary_content"},a),r&&n.createElement("span",{className:"c-base_inline_entity__secondary_content"},r)))}};m.displayName="BaseInlineEntity";let u=m},0x24f1e08bb:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x181d663bb),o=a(0x1535e80f3);let s=class extends n.Component{render(){let{className:e,primaryContent:t,secondaryContent:a,size:r=o.ny.medium,style:s=o.pI.normal,padding:c=o.FK.normal}=this.props;return n.createElement("div",{className:i()(e,"c-base_list_entity",`c-base_list_entity--${r}`,{"c-base_list_entity--dim":s===o.pI.dim,"c-base_list_entity--highlight-dark":s===o.pI.highlightDark,"c-base_list_entity--highlight-dim":s===o.pI.highlightDim,"c-base_list_entity--highlight-light":s===o.pI.highlightLight,"c-base_list_entity--no-pad":c===o.FK.none}),...(0,l.A)(this.props)},n.createElement("div",{className:"c-base_list_entity__primary_content"},t),a&&n.createElement("div",{className:"c-base_list_entity__secondary_content"},a))}};s.displayName="BaseListEntity";let c=s},0x1535e80f3:(e,t,a)=>{"use strict";a.d(t,{FK:()=>i,P:()=>o,RG:()=>n,ny:()=>l,pI:()=>r});let n={xxlarge:102,xlarge:72,large:56,medium:36,small:20,smallListVariant:24,smallListVariantOutline:16,xsmall:18,inline:14},r={normal:"normal",dim:"dim",highlightDark:"highlight-dark",highlightDim:"highlight-dim",highlightLight:"highlight-light"},i={normal:"12px",none:"0"},l={small:"small",medium:"medium"},o={true:!0,bestOnly:"best_only",false:!1}},0x1fda13b24:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x33644bb7),o=a(0x220f8fb41),s=a(0x1c371dd8b),c=a(0xb97b797e),d=a(0x20482ad21),m=a(0x11a296110),u=a(0xb1ea448c),p=a(0x15f8e452a);let h=new d.Ay("enhanced_text_input"),_={onFocus:{action:o.lG.CLICK},onChange:{action:o.lG.ENTER_TEXT}},f=class extends n.Component{static defaultProps={placeholder:void 0,value:"",icon:"search",autoFocus:!1,hasResetButton:!0,isLoading:!1,onFocus:void 0,onBlur:void 0,onChange:void 0,onSubmit:void 0,onReset:void 0,onKeyDown:void 0,blurOnSubmit:!1,className:"","data-qa":void 0,size:"medium",refToForward:void 0,allowEmptySubmit:!1,"aria-autocomplete":void 0,"aria-describedby":void 0,"aria-expanded":!1,role:"searchbox",autoClogProps:void 0,required:!1};input;constructor(e){super(e),this.state={focused:e.autoFocus||!1,value:e.value||"",passedValue:e.value,autoFocusComplete:!1},this.input=null,(0,c.v)(this,["handleClick","handleInputBlur","handleInputFocus","handleInputChange","handleResetButtonClick","handleKeyDown","setRef"])}componentDidMount(){this.props.autoFocus&&this.autoFocus()}static getDerivedStateFromProps(e,t){return e.value!==t.passedValue?{value:e.value,passedValue:e.value}:null}setRef(e){this.input=e;let{refToForward:t}=this.props;if(t){if((0,l.A)(t))return void t(e);t.current=e}}autoFocus(){if(this.state.autoFocusComplete)return;let{onFocus:e}=this.props;this.setState(()=>({autoFocusComplete:!0}),()=>{e&&e()})}focus(){this.state.focused||this.setState(()=>({focused:!0}),()=>{this.input?.focus()})}handleClick(){this.state.focused||(this.setState(()=>({focused:!0})),this.input?.focus())}handleEscapeKey(e){0!==this.state.value.length&&e.preventDefault(),this.setState(e=>({value:e.focused?"":e.value})),this.props.onChange&&this.props.onChange(e)}handleInputBlur(e){this.setState(()=>({focused:!1})),this.props.onBlur&&this.props.onBlur(e)}handleInputChange(e){let t=e.target.value;this.setState(()=>({value:t})),this.props.onChange&&this.props.onChange(e)}handleKeyDown(e){let{key:t}=e,{onKeyDown:a}=this.props;"Enter"===t&&this.handleReturnKey(e),"Escape"===t&&this.handleEscapeKey(e),a&&a(e)}handleInputFocus(){!this.state.focused&&(this.setState(()=>({focused:!0})),this.props.onFocus&&this.props.onFocus())}handleResetButtonClick(e){this.setState(()=>({value:""})),this.input&&(this.input.value=""),this.props.onChange&&this.props.onChange(e),this.props.onReset&&this.props.onReset(e)}handleReturnKey(e){let{onSubmit:t,blurOnSubmit:a,allowEmptySubmit:n}=this.props;(t||a)&&this.state.focused&&(this.state.value||n)&&(e.preventDefault(),this.input&&a&&this.input.blur(),t&&t(this.state.value))}render(){let e=i()("c-filter_input",this.props.className,{"c-filter_input--active":this.state.focused},{"c-filter_input--large":"large"===this.props.size},{"c-filter_input--small":"small"===this.props.size}),t=i()("c-filter_input__reset_button",{"c-filter_input__reset_button--visible":this.props.hasResetButton&&!!this.state.value&&!this.props.isLoading}),a=i()("c-filter_input__loading_indicator",{"c-filter_input__loading_indicator--visible":this.props.isLoading}),r="small"===this.props.size?"search-small":"search-medium",l=this.props.placeholder||h.t("Search"),c=n.createElement("input",{className:"c-filter_input__input mousetrap","data-qa":this.props["data-qa"]?`${this.props["data-qa"]}_input`:void 0,ref:this.setRef,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onChange:this.handleInputChange,onKeyDown:this.handleKeyDown,type:"text",placeholder:l,value:this.state.value,autoFocus:this.props.autoFocus,"aria-label":this.props["aria-label"],"aria-describedby":this.props["aria-describedby"],role:this.props.role,"aria-autocomplete":this.props["aria-autocomplete"],..."combobox"===this.props.role?{"aria-expanded":this.props["aria-expanded"]}:{},required:this.props.required});return this.props.autoClogProps&&(c=n.createElement(s.A,{autoClogProps:this.props.autoClogProps,actionProps:_,elementType:o.RJ.INPUT},c)),n.createElement("div",{className:e,"data-qa":this.props["data-qa"],onClick:this.handleClick,role:"presentation"},n.createElement(p.A,{type:"search"===this.props.icon?r:this.props.icon??"search",className:i()({nudge_top_1:"search"===this.props.icon&&"small"!==this.props.size})}),c,n.createElement("div",{className:"c-filter_input__right_icons"},n.createElement(m.Nm,{className:t,onClick:this.handleResetButtonClick,"data-qa":"close_input","aria-label":h.t("Clear text")},n.createElement(p.A,{type:"close-filled",size:"inherit","data-qa":"close_input_icon"})),n.createElement("div",{className:a},n.createElement(u.A,{size:"small"===this.props.size?"small":"medium",speed:"fast"}))))}};f.displayName="FilterInputBase";let b=n.forwardRef(function(e,t){return n.createElement(f,{...e,refToForward:t})})},0xfbe3141b:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x1fda13b24).A},0x45bd075:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x220f8fb41),s=a(0x1c371dd8b),c=a(0x125523996),d=a(0x185d57056),m=a(0xfe5aa224),u=a(0x88dbe1f3),p=a(0xea83f132);let h=n.forwardRef(function({className:e,isRequired:t=!1,"aria-disabled":a,indeterminate:r=!1,checked:h,unstyled:_,autoClogProps:f,onChange:b,focusOnMount:g,...y},A){let x=(0,n.useRef)(null),E=(0,n.useContext)(m.A),[C,k]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(r&&null==h)throw Error("The indeterminate prop is only supported for the controlled Checkbox. Please provide the checked prop.");x.current&&(x.current.indeterminate=r)},[h,r]),(0,n.useEffect)(()=>{g&&x.current?.focus()},[g]);let v=(0,n.useCallback)(e=>{void 0===h&&f&&k(e.target.checked),b?.(e)},[f,h,b]),S=(0,p.f)(u.j.Checkbox),I=_?i()("c-input_unstyled_checkbox",e,S,{"c-input_unstyled_checkbox--focus-visible":E,"c-input_unstyled_checkbox--checked":h}):i()("c-input_checkbox",e,S,{"c-input_checkbox--focus-visible":E,"c-input_checkbox--disabled":a}),w=n.createElement("input",{...y,...(0,c.A)(y),"aria-disabled":a,"aria-checked":r?"mixed":void 0,checked:h,type:"checkbox",required:t,className:I,ref:(0,d.P)(x,A),onChange:a?l.A:v}),T=void 0!==h?h:C,N=(0,n.useMemo)(()=>({onChange:{action:T?o.lG.UNCHECK:o.lG.CHECK}}),[T]);return f?n.createElement(s.A,{autoClogProps:f,actionProps:N,elementType:o.RJ.CHECKBOX},w):w})},0x15698ed2:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x2b7f0bcc),s=a(0x1d57b7d4c),c=a(0x677a139e);let d=new l.Ay("form_inputs"),Checkboxgroup=({children:e,className:t,errorId:a,errorLevel:r=o.A_.error,errorText:l,errorType:m=o.QE.nestedBox,hintText:u,hintId:p,isDisabled:h=!1,isRequired:_=!1,legendId:f,legendText:b,optional:g=!1})=>{let y=i()("c-checkboxgroup",{"c-checkboxgroup--with_error":!!l,"c-checkboxgroup--with_hint":!!u},t),renderOptionalTextMaybe=()=>{let e=d.t("(optional)",{fallbackHash:"b16c7ac6faff07d7e255da685e52bd66d3bf1575",fallbackHashNs:"app_dialog"});return g?n.createElement("span",{className:"c-label__optional_tag","data-qa-label-optional-tag":!0},e):null};renderOptionalTextMaybe.displayName="renderOptionalTextMaybe";let A=f||a?[f,a].join(" ").trim():void 0,x=b?n.createElement(s.A,{id:f},b,renderOptionalTextMaybe()):null,E=u?n.createElement(c.A,{id:p},u):null,C=l?n.createElement(o.Ay,{id:a,level:r,type:m,className:"c-alert--error margin_bottom_100"},l):null,k=n.createElement("fieldset",{"aria-describedby":p,"aria-invalid":l?"true":"false","aria-labelledby":A,"aria-required":_,className:y,disabled:h},x,e);return n.createElement("div",null,k,C,E)};Checkboxgroup.displayName="Checkboxgroup",Checkboxgroup.displayName="Checkboxgroup";let m=Checkboxgroup},0xd2bf4d47:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x72b537b5),o=a(0x18dac2b8e),s=a(0x22480f425),c=a(0x1d57b7d4c);let FieldSet=({className:e="",children:t,...a})=>{let r=i()("c-fieldset",e),d=(0,o.Cu)()||(0,o.b3)()||(0,o.M8)()||(0,s.A)(),m=(0,l.U)();if(d){let e=n.Children.toArray(t);0!==e.length&&n.isValidElement(e[0])&&e[0].type===c.A||m.error(Error("[Slack Kit] The first child in a Fieldset must be a Legend"))}return n.createElement("fieldset",{className:r,...a},t)};FieldSet.displayName="FieldSet";let d=FieldSet},0x1d57b7d4c:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let l=n.forwardRef(function({className:e="",children:t,id:a,...r},l){let o=i()("c-legend",e);return n.createElement("legend",{id:a,...r,className:o,ref:l},t)});l.displayName="Legend";let o=l},0x1d2cd7755:(e,t,a)=>{"use strict";a.d(t,{A:()=>s,Q:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let l=new(a(0x20482ad21)).Ay("app_dialog"),o={block:"block",inline:"inline"};function Label({children:e,className:t,cursor:a,htmlFor:r,optional:s=!1,subtext:c,text:d,type:m="block",isDisabled:u=!1,dataQaLabel:p="true",...h}){let _=(0,n.useMemo)(()=>u?null:void 0===a&&r?"pointer":a,[a,r,u]),f=i()("c-label",t,{"c-label--block":m===o.block,"c-label--inline":m===o.inline,"c-label--with_subtext":c,"c-label--pointer":"pointer"===_,"c-label--disabled":u,"c-label--with_formatted_text":"string"!=typeof d});return n.createElement("label",{...h,htmlFor:r,className:f,"data-qa-label":p,"data-qa-label-type":m},n.createElement("span",{className:"c-label__text","data-qa-label-text":!0},d,s&&n.createElement("span",{className:"c-label__optional_tag","data-qa-label-optional-tag":!0},l.t("(optional)")),c?n.createElement("span",{className:"c-label__subtext","data-qa-label-subtext":!0},c):null),e&&n.createElement("span",{className:"c-label__children","data-qa-label-children":!0},e))}Label.displayName="Label";let s=Label},0x139c79d16:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x220f8fb41),o=a(0x1c371dd8b);let s={onChange:{action:l.lG.CLICK}},c=class extends n.PureComponent{static defaultProps={autoFocus:!1};inputRef;constructor(e){super(e),this.inputRef=n.createRef()}componentDidMount(){let{focusOnMount:e,autoFocus:t}=this.props;(e||t)&&this.focus()}componentDidUpdate(){let{autoFocus:e}=this.props;e&&this.focus()}focus(){this.inputRef.current?.focus()}render(){let{className:e,autoClogProps:t,autoFocus:a,focusOnMount:r,...c}=this.props,d=i()("c-input_radio",e),m=n.createElement("input",{...c,className:d,ref:this.inputRef,type:"radio"});return t?n.createElement(o.A,{autoClogProps:t,actionProps:s,elementType:l.RJ.RADIO},m):m}};c.displayName="Radio";let d=c},0xa5dbe09b:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2b7f0bcc),o=a(0x1d57b7d4c),s=a(0x677a139e);let Radiogroup=({"aria-label":e,"aria-labelledby":t,errorId:a,className:r,errorText:c,hintId:d,hintText:m,isDisabled:u=!1,isRequired:p=!1,"data-qa":h,errorLevel:_=l.A_.error,errorType:f=l.QE.nestedBox,children:b,legendText:g,legendClassNames:y=""})=>{let A=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=A.current;!e||g||Array.from(e.querySelectorAll('input[type="radio"]:not(:scope [role="radiogroup"] input[type="radio"])')).forEach(e=>{e.disabled=u})},[u,g]);let x=(t||a)&&[t,a].join(" ").trim(),E=c&&n.createElement(l.Ay,{id:a,level:_,type:f,className:"c-alert--error margin_bottom_100"},c),C=m&&n.createElement(s.A,{id:d},m),k=g&&n.createElement(o.A,{className:y},g),v=i()("c-radiogroup",{"c-radiogroup--with_error":!!c,"c-radiogroup--with_hint":!!m},r),S={"aria-describedby":d,"aria-invalid":!!c,"aria-labelledby":x,"aria-required":p,className:v},renderFieldset=()=>n.createElement("fieldset",{...S,disabled:u},k,b);renderFieldset.displayName="renderFieldset";let renderAriaGroup=()=>n.createElement("div",{...S,role:"radiogroup","aria-disabled":u,"aria-label":e,ref:A},b);renderAriaGroup.displayName="renderAriaGroup";let I=g?renderFieldset():renderAriaGroup();return n.createElement("div",{"data-qa":h},I,E,C)};Radiogroup.displayName="Radiogroup";let c=Radiogroup},0x5299a396:(e,t,a)=>{"use strict";a.d(t,{A:()=>FormTextareaInput});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x77727995),s=a(0x220f8fb41),c=a(0x1c371dd8b),d=a(0xb97b797e),m=a(0x2b7f0bcc),u=a(0x2469ec64e),p=a(0x677a139e),h=a(0x66d73753),_=a(0xca04f009),f=a(0x1e586fbba);let b={onChange:{action:s.lG.ENTER_TEXT}};let FormTextareaInput=class FormTextareaInput extends n.PureComponent{static defaultProps={className:null,showError:!0,errorId:void 0,errorLevel:m.A_.error,errorText:null,errorType:m.QE.nestedBox,useInlineAlert:!1,hintText:null,hintId:void 0,isDisabled:!1,isRequired:!1,isInvalid:!1,labelId:null,onChange:l.A,onFocus:l.A,onBlur:l.A,placeholder:void 0,size:_.F.medium,value:"",maxCharacterLimit:null,minCharacterLimit:null,focusOnMount:!1,autoClogProps:void 0,type:void 0,ariaDescribedById:void 0,role:void 0,inputRef:void 0,height:void 0};input;characterCounterId;characterCount;constructor(e){super(e);const{id:t}=this.props;(0,d.v)(this,["onFocus","onBlur","setInputRef","setCharacterCountRef"]),this.state={errorId:(0,o.A)(this.props,"errorId",(0,u.Es)(t,"error")),hintId:(0,o.A)(this.props,"hintId",(0,u.Es)(t,"hint")),isFocused:!1,everReceivedUserInput:!1,textStyle:{}},this.props.maxCharacterLimit&&(this.characterCounterId=(0,u.Es)(t,"character-count")),this.input=n.createRef()}componentDidMount(){this.getTextStyle(),this.props.focusOnMount&&this.input.current?.focus()}componentDidUpdate(e,t){(this.props.value!==e.value||this.state.isFocused!==t.isFocused)&&this.getTextStyle(),this.props.value===e.value||this.state.everReceivedUserInput||this.setEverReceivedUserInput(),this.props.focusOnMount&&e.focusOnMount!==this.props.focusOnMount&&!this.state.isFocused&&this.input.current?.focus()}onBlur(){let{onBlur:e}=this.props;this.setFocus(!1),e&&e()}onFocus(){let{onFocus:e}=this.props;this.setFocus(!0),e&&e()}getTextStyle(){let{maxCharacterLimit:e,height:t}=this.props;e||t?this.setTextStyle({...t&&{height:t},...e&&{paddingRight:this.characterCount?.getCharacterCountElementSize()||0}}):this.setTextStyle({})}setCharacterCountRef(e){this.characterCount=e}setEverReceivedUserInput(){this.setState(()=>({everReceivedUserInput:!0}))}setFocus(e){this.setState(()=>({isFocused:e}))}setInputRef(e){this.input=e}setTextStyle(e){this.setState(()=>({textStyle:e}))}blur(){this.input.current&&this.input.current.blur()}focus(){this.input.current&&this.input.current.focus()}getIsInputLengthTooShort(){let{isRequired:e,minCharacterLimit:t,value:a}=this.props,{everReceivedUserInput:n}=this.state;return!!n&&null!=t&&(!!e||0!==a.length)&&a.length<t}getIsInputLengthTooLong(){let{maxCharacterLimit:e,value:t}=this.props;return null!=e&&t.length>e}renderDeprecatedErrorMaybe(){let{showError:e,errorLevel:t,errorText:a,errorType:r,isRequired:i,maxCharacterLimit:l,minCharacterLimit:o,value:s}=this.props;return e?a?n.createElement(m.Ay,{id:this.state.errorId,level:t,type:r,className:"margin_bottom_100"},a):i||0!==s.length?this.getIsInputLengthTooLong()?n.createElement(m.Ay,{id:this.state.errorId,level:m.A_.error,type:r,className:"margin_bottom_100"},(0,u.zI)(l)):this.getIsInputLengthTooShort()&&!this.state.isFocused?n.createElement(m.Ay,{id:this.state.errorId,level:m.A_.error,type:r,className:"margin_bottom_100"},(0,u.r7)(o)):null:null:null}renderErrorMaybe(){let{showError:e,errorText:t,isRequired:a,maxCharacterLimit:r,minCharacterLimit:i,value:l}=this.props;return e?t?n.createElement(f.A,{"data-qa":"form-text-area-inline-alert",id:this.state.errorId},t):a||0!==l.length?this.getIsInputLengthTooLong()?n.createElement(f.A,{id:this.state.errorId,"data-qa":"form-text-area-max-char-alert"},(0,u.zI)(r)):this.getIsInputLengthTooShort()&&!this.state.isFocused?n.createElement(f.A,{id:this.state.errorId,"data-qa":"form-text-area-min-char-alert"},(0,u.r7)(i)):null:null:null}renderHintMaybe(){let{hideExternalSpacing:e,hintText:t}=this.props;return t?n.createElement(p.A,{hideExternalSpacing:e,id:this.state.hintId},t):null}renderTextArea(){let{className:e,showError:t,errorId:a,errorLevel:r,errorText:l,errorType:o,hintId:d,hintText:m,useInlineAlert:p,id:h,isRequired:f,isInvalid:g,labelId:y,name:A,onChange:x,onFocus:E,onKeyDown:C,onBlur:k,maxCharacterLimit:v,minCharacterLimit:S,autoClogProps:I,ariaDescribedById:w,resize:T,focusOnMount:N,inputRef:M,hideExternalSpacing:R,height:P,...L}=this.props,{textStyle:O}=this.state,D=!!l||this.getIsInputLengthTooLong()||this.getIsInputLengthTooShort()||g,F=i()({[`c-input_textarea--with_${r}`]:D,"c-input_textarea--with_hint":m,"c-input_textarea--with_character_count":!!v,"c-input_text--with_inline_alert":p&&D},e),U=(0,u.Yk)([D?this.state.errorId:void 0,w,this.state.hintId,this.characterCounterId]),B=n.createElement(_.A,{...L,resize:T,ref:this.setInputRef,style:O,ariaDescribedby:U,isInvalid:D,ariaLabelledby:y,ariaRequired:f,className:F,id:h,"data-qa":L["data-qa"]||h,name:A,onChange:x,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:C});return I?n.createElement(c.A,{autoClogProps:I,actionProps:b,elementType:s.RJ.TEXTAREA},B):B}renderWrappedTextareaMaybe(){let{value:e,maxCharacterLimit:t,size:a,isDisabled:r}=this.props,i=this.renderTextArea();return t&&(i=n.createElement(h.A,{id:this.characterCounterId,ref:this.setCharacterCountRef,currentCount:e?.length,isDisabled:r,maxCharacterLimit:t,type:"multiline",size:a},i)),i}render(){let e=this.props.useInlineAlert?this.renderErrorMaybe():this.renderDeprecatedErrorMaybe();return n.createElement("div",{"data-qa-formtextarea":!0,className:i()("c-input_textarea__wrapper",{margin_bottom_0:this.props.hideExternalSpacing})},this.renderWrappedTextareaMaybe(),e,this.renderHintMaybe())}};FormTextareaInput.displayName="FormTextareaInput"},0xca04f009:(e,t,a)=>{"use strict";a.d(t,{A:()=>p,F:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x220f8fb41),s=a(0x1c371dd8b),c=a(0x1aea0ac1b);let d={small:"small",medium:"medium",large:"large"},m={onBlur:{action:o.lG.SAVE}},u=class extends n.Component{static defaultProps={ariaDescribedby:"",isInvalid:!1,ariaLabel:void 0,ariaLabelledby:"",ariaRequired:!1,className:null,isDisabled:!1,onChange:l.A,onFocus:l.A,onBlur:l.A,onBlurCapture:l.A,placeholder:"",resize:null,size:d.medium,style:void 0,maxLength:void 0,value:"",focusOnMount:!1,autoClogProps:void 0,onKeyDown:void 0};constructor(e){super(e),this.onChange=this.onChange.bind(this)}componentDidMount(){this.props.focusOnMount&&this.props.refToForward&&this.props.refToForward.current&&this.props.refToForward.current.focus()}onChange(e){this.props.onChange(e.target.value)}render(){let{ariaDescribedby:e,isInvalid:t,ariaLabel:a,ariaLabelledby:r,ariaRequired:l,className:u,placeholder:p,id:h,isDisabled:_,name:f,resize:b,size:g,refToForward:y,focusOnMount:A,autoClogProps:x,onKeyDown:E,...C}=this.props,k=i()("c-input_textarea",{"c-input_textarea--large":g===d.large,"c-input_textarea--small":g===d.small,"c-input_textarea--resize_none":"none"===b,"c-input_textarea--resize_both":"both"===b,"c-input_textarea--resize_h":"horizontal"===b,"c-input_textarea--with_error":t,"c-input_textarea--with_inline_alert":t,[c.E.small]:g===d.small,[c.E.large]:g===d.large},u),v=n.createElement("textarea",{...C,"aria-describedby":e,"aria-invalid":t,"aria-label":a,"aria-labelledby":r,"aria-required":l,className:k,disabled:_,id:h,name:f,onChange:this.onChange,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onBlurCapture:this.props.onBlurCapture,placeholder:p,ref:y,value:this.props.value,style:this.props.style,maxLength:this.props.maxLength,onKeyDown:E});return x?n.createElement(s.A,{autoClogProps:x,actionProps:m,elementType:o.RJ.TEXTAREA},v):v}};u.displayName="TextareaInput";let p=n.forwardRef((e,t)=>n.createElement(u,{...e,refToForward:t||n.createRef()}))},0x203a7c062:(e,t,a)=>{"use strict";a.d(t,{A:()=>m,_:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xd4787de9),o=a(0x2469ec64e),s=a(0x16401accf),c=a(0x285f04ee);let d=n.createContext({name:""});function BaseField({children:e,name:t,className:a,labelId:r,validate:m,validateAsync:u,focusOnMount:p=!1,ariaLabelOverride:h}){let _=(0,s.A)(t),[f]=(0,l.Mt)({name:t,...u||m?{validate:u||m}:{}}),{hints:b}=(0,c.A)(),g=(0,n.useMemo)(()=>({name:t}),[t]),[y,A]=(0,n.useState)(!1);(0,n.useEffect)(()=>{p&&!y&&A(!y)},[y,p]);let x=h?void 0:(0,o.Yk)([r]),E=(0,o.Yk)([b,_.map(e=>e.id)]),C=i()({"c-input_text--with_hint":b.length||_.length},a);return n.createElement(d.Provider,{value:g},e({field:{...f,ariaLabel:h,ariaLabelledby:x,isInvalid:_.length>0,ariaDescribedby:E,className:C,focusOnMount:p&&!y},fieldErrors:_}))}BaseField.displayName="BaseField";let m=BaseField},0x1a2d55128:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0xa516e097),l=a(0x242c9b8f3),o=a(0x15dd8a31);let WithAdaptedProps=e=>{let{name:t,options:a}=e,{validateOnBlur:i,onFieldBlur:s,value:c,...d}=e,{setFieldValue:m,handleBlur:u,setFieldTouched:p}=(0,r.j7)(),h=(0,n.useCallback)(e=>{m(t,e.value)},[t,m]),_=(0,n.useCallback)(e=>{u(t),p(t,!0),s?.(e)},[u,t,p,s]),f=(0,n.useCallback)(e=>{p(t,!1),s?.(e)},[p,t,s]);return n.createElement(o.A,{...d,onOptionSelected:h,selectedOption:(0,l.$)(a,c),key:c,onBlur:i?_:f})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(i.A,{component:WithAdaptedProps,...e})},0xdfbfd8e5:(e,t,a)=>{"use strict";a.d(t,{A:()=>field_combo_search_select});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0xa516e097),l=a(0x1feee1711),o=a(0x9e671ad),s=a(0x1d1911997),c=a(0xfbeb1e08);let d={filterQuery:"",options:[],selectId:"combo-search-select",isExpanded:!1,isInvalid:!1},ComboSearchSelect=({label:e,options:t,isDisabled:a,isInvalid:r,isRequired:i,maxLength:m,onBlur:u,onChange:p,onOptionsListClose:h,onOptionSelected:_,initialValue:f,filterOptions:b=c.f,renderOption:g,shouldAllowUnselectInSingleSelectMode:y,placeholderText:A,focusOnMount:x})=>{let[E,C]=(0,n.useState)({...d,options:t,selectedOption:f?{label:f,value:f}:null,isDisabled:a}),k=(0,n.useRef)(null),v=(0,n.useRef)(!0),S=E.selectedOption?.value||E.filterQuery||"";(0,n.useEffect)(()=>{if(v.current){v.current=!1;return}p?.(S)},[S,p]);let I=(0,n.useCallback)(e=>b(e,t),[t,b]),w=(0,n.useRef)([]),T=(0,n.useCallback)((e,a)=>{a?.(),C(a=>{let n=e(),r={...a,...n};if(m&&r.filterQuery&&r.filterQuery.length>m&&(r.filterQuery=r.filterQuery.substring(0,m)),((r.filterQuery??"")!==a.filterQuery||r.options!==t)&&(r.options=I(r.filterQuery??"")),0===r.options.length&&r.isExpanded&&(r.isExpanded=!1),!1===n.isExpanded&&(0,l.A)(n.activeRowIndex)&&""===n.filterQuery&&null!==n.selectedOption&&(r.filterQuery=a.filterQuery),!1===n.isExpanded&&k?.current?.blur(),n.isExpanded&&a.selectedOption){let e=a.selectedOption.value;r.filterQuery=e,r.displayQuery=e}if(r.selectedOption&&n.filterQuery&&(r.selectedOption=null),r.filterQuery&&!(0,o.A)(w.current,a.options)){let e=r.filterQuery.toLowerCase(),t=r.selectedOption&&!i?1:0,a=r.options?.findIndex(t=>t.value?.toString().toLowerCase()===e);r.activeRowIndex=(a||0)+t,w.current=[...r.options]}return r})},[I,i,t,m]);return(0,n.useEffect)(()=>{T(()=>({isInvalid:r}))},[T,r]),n.createElement(s.JJ,{ariaLabel:e,selectState:E,setSelectState:T,inputRef:k,width:"100%",isDisabled:a,isRequired:i,onBlur:u,onOptionsListClose:h,isInvalidStateControlled:!0,renderOption:g,onOptionSelected:_,shouldAllowUnselectInSingleSelectMode:y,placeholderText:A,focusOnMount:x})};ComboSearchSelect.displayName="ComboSearchSelect";let WithAdaptedProps=e=>{let{name:t}=e,{onChange:a,value:i,...l}=e,{errors:o,setFieldValue:s}=(0,r.j7)(),c=(0,n.useCallback)(e=>{s(t,e||""),a(e)},[t,a,s]),d=!!o[t]?.length;return n.createElement(ComboSearchSelect,{...l,initialValue:i,onChange:c,isInvalid:d})};WithAdaptedProps.displayName="WithAdaptedProps";let field_combo_search_select=e=>n.createElement(i.A,{component:WithAdaptedProps,...e})},0x53a8fdbe:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x18246e515),l=a(0xa516e097);let WithAdaptedProps=e=>{let{name:t}=e,{validateOnBlur:a,onFieldBlur:l,value:o,dateFormat:s="YYYY-MM-DD",...c}=e,{setFieldValue:d,handleBlur:m,setFieldTouched:u}=(0,r.j7)(),p=(0,n.useCallback)(e=>{m(t),u(t,!0),l?.(e)},[m,t,u,l]),h=(0,n.useCallback)(e=>{u(t,!1),l?.(e)},[u,t,l]),_=(0,n.useCallback)(e=>{d(t,e)},[d,t]);return n.createElement(i.A,{...c,selectedDate:o,dateFormat:s,onDateChange:_,onBlur:a?p:h})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(l.A,{component:WithAdaptedProps,...e})},0x7666e42a:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x1b1820b2c),l=a(0xa516e097);let WithAdaptedProps=e=>{let{name:t}=e,{onChange:a,validateOnBlur:l=!1,validateOnChange:o=!1,...s}=e,{setFieldValue:c,setFieldTouched:d}=(0,r.j7)(),m=(0,n.useCallback)(e=>{d(t,o,!1),c(t,e)},[t,d,c,o]);return n.createElement(i.A,{...s,onChange:m})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(l.A,{component:WithAdaptedProps,...e})},0xf2fa0573:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x1595bdd0),l=a(0xa516e097),o=a(0x242c9b8f3),s=a(0xa7ec93c2);let WithAdaptedProps=e=>{let{name:t,options:a,onOptionsListClose:l}=e,{validateOnBlur:c,onFieldBlur:d,value:m,...u}=e,{setFieldValue:p,handleBlur:h,setFieldTouched:_}=(0,r.j7)(),f=e?.stayExpandedAfterSelection,b=(0,n.useMemo)(()=>[...(0,o.M)(a,(0,i.A)(e.value))],[a,e.value]),g=(0,n.useRef)(!1),y=(0,n.useCallback)(()=>{g.current=!0},[]),A=(0,n.useCallback)(()=>{g.current=!1,l?.()},[l]),x=(0,n.useCallback)(e=>{p(t,e.map(({value:e})=>e))},[t,p]),E=(0,n.useCallback)(e=>{h(t),_(t,!0),d?.(e)},[h,t,_,d]),C=(0,n.useCallback)(e=>{_(t,!1),d?.(e)},[_,t,d]),k=(0,n.useCallback)(e=>f&&!g.current?(p(t,b.map(({value:e})=>e)),c?E(e):C(e)):f?void 0:c?E(e):C(e),[f,p,t,b,c,E,C]);return n.createElement(s.Ay,{...u,onSelectedItemsChange:x,selectedOptions:b,onBlur:k,onOptionsListClose:A,onOptionsListOpen:y})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(l.A,{component:WithAdaptedProps,...e})},0x16de00424:(e,t,a)=>{"use strict";a.d(t,{i:()=>FieldRadio});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x139c79d16),l=a(0xa516e097);let WithAdaptedProps=e=>{let{name:t,value:a,validateOnBlur:l,checked:o,...s}=e,{setFieldValue:c,handleBlur:d,setFieldTouched:m}=(0,r.j7)(),u=(0,n.useCallback)(e=>c(t,e?.target?.value),[t,c]);return n.createElement(i.A,{...s,name:t,value:a,checked:o,onChange:u,...l?{onBlur:()=>{d(t),m(t,!0)}}:{onBlur:()=>{m(t,!1)}}})};WithAdaptedProps.displayName="WithAdaptedProps";let FieldRadio=e=>{let{handleBlur:t,handleChange:a}=(0,r.j7)(),{labelText:i,labelSubtext:o,...s}=e;return n.createElement(l.A,e,n.createElement(WithAdaptedProps,{...s,onChange:a,onBlur:t}))};FieldRadio.displayName="FieldRadio"},0x5a97f6e0:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0xa516e097),l=a(0x242c9b8f3),o=a(0x1d1911997);let WithAdaptedProps=e=>{let{name:t,options:a}=e,{validateOnBlur:i,onFieldBlur:s,value:c,...d}=e,{setFieldValue:m,handleBlur:u,setFieldTouched:p}=(0,r.j7)(),h=(0,n.useCallback)(e=>m(t,e.value),[t,m]),_=(0,n.useCallback)(e=>{u(t),p(t,!0),s?.(e)},[u,p,s,t]),f=(0,n.useCallback)(e=>{p(t,!1),s?.(e)},[p,s,t]);return n.createElement(o.Ay,{...d,onOptionSelected:h,selectedOption:(0,l.$)(a,c),key:c,onBlur:i?_:f})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(i.A,{component:WithAdaptedProps,...e})},0x1dcaa81f9:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(0x10598eeca);let r=(0,a(0x206050348).Z)(n.A,({name:e,setFieldValue:t,handleBlur:a,setFieldTouched:n,validateOnBlur:r})=>({onChange:a=>t(e,a),...r&&{onBlur:()=>{a(e),n(e,!0)}},...!r&&{onBlur:()=>{n(e,!1)}}}))},0xd61e2baa:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var n=a(0xca04f009);let r=(0,a(0x206050348).Z)(n.A,({name:e,setFieldValue:t,handleBlur:a,setFieldTouched:n,validateOnBlur:r})=>({onChange:a=>t(e,a),...r&&{onBlur:()=>{a(e),n(e,!0)}},...!r&&{onBlur:()=>{n(e,!1)}}}))},0x235e73a9e:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0xa516e097),l=a(0x9154b87c);let WithAdaptedProps=e=>{let{name:t}=e,{onChange:a,onFieldBlur:i,validateOnBlur:o=!1,validateOnChange:s=!1,...c}=e,{setFieldValue:d,handleBlur:m,setFieldTouched:u}=(0,r.j7)(),p=(0,n.useCallback)(e=>{u(t,s,!1),d(t,e)},[t,u,d,s]),h=(0,n.useCallback)(e=>{o&&m(t),u(t,o),i?.(e)},[m,t,u,o,i]);return n.createElement(l.Ay,{...c,onChange:p,onBlur:h})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(i.A,{component:WithAdaptedProps,...e})},0xa516e097:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x15b6c0ccc),o=a(0x1df96de4c),s=a(0x1d2cd7755),c=a(0x203a7c062),d=a(0x8716533d),m=a(0x2469ec64e),u=a(0x677a139e),p=a(0x285f04ee);function FormHint(e){let{name:t}=(0,n.useContext)(c._),{addHint:a,removeHint:r}=(0,p.A)(),i=(0,n.useMemo)(()=>`${t}_hint_${(0,m.r9)()}`,[t]);return(0,n.useEffect)(()=>(a(i),()=>{r(i)}),[a,i,r]),n.createElement(u.A,{...e,id:i})}FormHint.displayName="FormHint";let h=FormHint;function FieldHints({hints:e}){return e&&e.map((e,t)=>{let a=(("string"==typeof e?e:e?.key)||"").slice(-3)+t;return n.createElement(h,{key:a,className:"c-field_input__helpers"},e)})}function Field({name:e,labelText:t,hints:a=o.Ml,labelSubtext:r,focusOnMount:m=!1,component:u,children:p,optional:h=!1,validate:_,validateAsync:f,ariaLabelOverride:b,...g}){let y=`${e}_label_id`;(0,l.A)(!(u&&p),"You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored.");let A=(0,n.useCallback)(e=>t?n.createElement(s.A,{text:t,id:y,type:"inline",cursor:"pointer",className:i()(e,g.className),optional:h},p):p,[p,y,t,h,g.className]),x=(0,n.useCallback)(()=>t?n.createElement(s.A,{text:t,subtext:r,id:y,optional:h}):null,[y,r,t,h]);return n.createElement(c.A,{name:e,labelId:y,validate:_,validateAsync:f,focusOnMount:m,ariaLabelOverride:b},({field:e,fieldErrors:t})=>{let r;return n.createElement(n.Fragment,null,p?A(e.className):n.createElement(n.Fragment,null,x(),n.createElement(u,(r={...g},{...e,...r,className:i()(e.className,r.className)}))),n.createElement(d.A,{errors:t}),n.createElement(FieldHints,{hints:a}))})}FieldHints.displayName="FieldHints",Field.displayName="Field";let _=Field},0x242c9b8f3:(e,t,a)=>{"use strict";function*nestedOptionsGenerator(e){if(void 0!==e)for(let t of e)void 0!==t.value?yield t:t.options&&(yield*nestedOptionsGenerator(t.options))}function findOption(e,t){for(let a of nestedOptionsGenerator(e))if(a.value===t)return a}function*findOptions(e,t){let a=new Set(t);for(let t of nestedOptionsGenerator(e))void 0!==t.value&&null!==t.value&&a.has(t.value)&&(a.delete(t.value),yield t)}a.d(t,{$:()=>findOption,M:()=>findOptions})},0x10b5318b2:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0xd4787de9);function Form({className:e,initialValues:t,initialErrors:a,validate:i,validationSchema:l,validateOnBlur:o=!0,validateOnChange:s=!0,validateOnMount:c=!1,onReset:d,onSubmit:m,children:u,...p}){return n.createElement(r.l1,{initialValues:t,initialErrors:a,validate:i,validationSchema:l,validateOnBlur:o,validateOnChange:s,validateOnMount:c,onSubmit:m,...d?{onReset:d}:{},...p},({handleSubmit:t,handleReset:a,...r})=>n.createElement("form",{className:e,onSubmit:t,onReset:a},u({...r})))}Form.displayName="Form";let i=Form},0x8716533d:(e,t,a)=>{"use strict";a.d(t,{A:()=>FieldErrors});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1e586fbba);function FieldErrors({className:e,errors:t}){return t&&t.length>0?n.createElement(n.Fragment,null,t.map(t=>(0,n.isValidElement)(t.message)?n.cloneElement(t.message,{key:t.id,id:t.id,className:i()(e,"c-field_input__helpers")}):(!!t.message&&n.createElement(l.A,{className:i()(e,"c-field_input__helpers"),key:t.id,id:t.id},t.message))??null)):null}FieldErrors.displayName="FieldErrors"},0x16401accf:(e,t,a)=>{"use strict";a.d(t,{A:()=>useFieldErrors});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x2469ec64e);function useFieldErrors(e){let{getFieldMeta:t,submitCount:a}=(0,r.j7)(),{touched:l,error:o,initialError:s}=t(e),c=(0,n.useCallback)(t=>t&&t.map&&t.length>0?t.map(t=>({id:`${e}_error_${(0,i.r9)()}`,message:t})):t?[{id:t,message:t}]:[],[e]);return(0,n.useMemo)(()=>l||a>0?c(o):c(s),[l,c,s,o,a])}},0x285f04ee:(e,t,a)=>{"use strict";a.d(t,{A:()=>useHints});var n=a(0xbad225b5);function useHints(){let[e,t]=(0,n.useReducer)(hintsReducer,[]);return{hints:e,addHint:(0,n.useCallback)(e=>{t({type:"addHint",hintId:e})},[t]),removeHint:(0,n.useCallback)(e=>{t({type:"removeHint",hintId:e})},[t])}}function hintsReducer(e,t){switch(t.type){case"addHint":return[...e,t.hintId];case"removeHint":return e.filter(e=>e!==t.hintId);default:return e}}},0x206050348:(e,t,a)=>{"use strict";a.d(t,{Z:()=>withField});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x203a7c062),l=a(0xa516e097);function withFieldAdapter(e,t){return a=>{let{name:l}=(0,n.useContext)(i._),{validateOnBlur:o,...s}=a,c=(0,r.j7)(),d=(0,n.useMemo)(()=>t({name:l,handleChange:c.handleChange,handleBlur:c.handleBlur,setFieldValue:c.setFieldValue,setFieldTouched:c.setFieldTouched,validateOnBlur:o,props:a}),[l,c.handleChange,c.handleBlur,c.setFieldValue,c.setFieldTouched,o,a]);return n.createElement(e,{...s,...d})}}function withField(e,t){let a=withFieldAdapter(e,t);return e=>n.createElement(l.A,{component:a,...e})}withFieldAdapter.displayName="withFieldAdapter",withField.displayName="withField"},0xa6c8ec12:(e,t,a)=>{"use strict";a.d(t,{$P:()=>tokenNotAllowed,DQ:()=>maxCharacterCount,IM:()=>regexPattern,T$:()=>minCharacterCount,Wz:()=>createValidation,Zr:()=>createValidate,m4:()=>i,mw:()=>required});var n=a(0x178533105),r=a(0x21f3c49e8);let i={email:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,phone:/^[0-9._+-]{8,15}$/i},required=e=>{let t="boolean"==typeof e,a="string"==typeof e,n=t&&!e,r=a&&(!e||!e.trim()),i=Array.isArray(e)&&!e.length,l=null===e;return n||r||i||l?"Required":null},regexPattern=(e,t)=>a=>("email"===e||"phone"===e?i[e]:e).test(a)?null:t;regexPattern(i.email,"Please enter a valid email address."),regexPattern(i.phone,"Please enter a valid phone number.");let minCharacterCount=e=>t=>!t||t.length<e?`Minimum of ${e} characters`:null,maxCharacterCount=e=>t=>t.length>e?`Max character limit is ${e}`:null,tokenNotAllowed=e=>t=>e.includes(t)?`Cannot use ${t}`:null,createValidation=e=>t=>{let a=(0,n.A)(e,(e,a,n)=>{let r=a.map(e=>e(t[n],t)).filter(Boolean);return r.length>0&&(e[n]=r),e},{});return(0,r.A)(a)?void 0:a},createValidate=e=>t=>{let a=e.map(e=>e(t)).filter(Boolean);if(a.length>0)return a[0]}},0x6e8c7b08:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x1cbdfeceb);let i={activeItem:void 0,setActiveItem:r.A,setInitialActiveItem:r.A,initialActiveItem:void 0,addInteractiveItem:r.A,removeInteractiveItem:r.A},l=(0,n.createContext)(i)},0x18ee7321c:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x21343fa5a),i=a(0x18dac2b8e),l=a(0x10da39755);let o=["listitem","none"],s=[null,"-1","0"];var c=a(0x6e8c7b08),d=a(0x17e89afdc);let getIndexOfItemWithId=({id:e,items:t})=>t?.findIndex(t=>t===e),m=["ArrowUp","ArrowLeft"],u=["ArrowDown","ArrowRight"],InteractiveList=({items:e,renderItem:t,"aria-label":a,"aria-labelledby":p,"aria-describedby":h,onFocus:_,onBlur:f,initialActiveItem:b,shouldHandleKeyEvent:g,pageSize:y=10,getKeyForItem:A,...x},E)=>{let[C,k]=(0,n.useState)(b),[v,S]=(0,n.useState)(void 0),I=(0,n.useRef)([]),[w,T]=(0,n.useState)(!1),[N,M]=(0,n.useState)(!1),R=(0,i.Cu)()||(0,i.M8)()||(0,i.b3)(),P=(0,n.useRef)(null);(0,r.A)(()=>{if(C)return;let e=I.current;if(!e.length)return;let t=e[0];t&&k(t)});let L=(0,n.useCallback)(t=>{let a=I.current;a.includes(t)||(a.push(t),I.current=e.filter(e=>a.includes(e.id)).map(e=>e.id))},[I,e]),O=(0,n.useCallback)(e=>{let t=I.current;t.includes(e)&&(I.current=t.filter(t=>t!==e))},[I]);if((0,n.useImperativeHandle)(E,()=>({getActiveItem:()=>v,getInitialActiveItem:()=>C,hasFocus:()=>w,focus:e=>S(e||C),blur:()=>S(void 0)}),[v,w,C]),(0,n.useEffect)(()=>{if(!R)return;let t=P.current;!t||Array.from(t.children).filter(e=>!e.hasAttribute("hidden")).every((t,a)=>(({node:e,id:t})=>{let a=e.getAttribute("role");if(!a||!o.includes(a)||e.id!==t)return!1;if("listitem"!==a)return!0;let n=e.getAttribute("tabindex"),r=e.getAttribute("aria-label"),i=e.getAttribute("aria-labelledby");return!!(0,l.k)({ariaLabel:r,ariaLabelledBy:i})&&!!s.includes(n)})({node:t,id:e[a].id}))||M(!0)},[e,R]),N)throw Error("Each item in an InteractiveList should be rendered using the ListItem component.");let D=(0,n.useCallback)(e=>g?g(e):(0,d.p)(e),[g]),F=(0,n.useCallback)(e=>{let t=I.current[e];t&&(S(t),k(t))},[I,S,k]),U=(0,n.useCallback)(e=>{if(!D(e))return;e.preventDefault();let t=getIndexOfItemWithId({id:v,items:I.current});0!==t&&F(t-1)},[v,D,F]),B=(0,n.useCallback)(e=>{if(!D(e))return;e.preventDefault();let t=I.current,a=getIndexOfItemWithId({id:v,items:t});a!==t.length-1&&F(a+1)},[v,D,F]),H=(0,n.useCallback)(e=>{if(!D(e))return;e.preventDefault();let t=getIndexOfItemWithId({id:v,items:I.current}),a=t?Math.floor(t/y):0;F(a>1?(a-1)*y:0)},[v,y,D,F]),W=(0,n.useCallback)(e=>{if(!D(e))return;e.preventDefault();let t=I.current,a=t.length,n=Math.ceil(a/y),r=getIndexOfItemWithId({id:v,items:t}),i=r?Math.floor(r/y):0;F(i===n-1?a-1:(i+1)*y)},[v,y,D,F]),V=(0,n.useCallback)(e=>{D(e)&&(e.preventDefault(),F(0))},[D,F]),G=(0,n.useCallback)(e=>{D(e)&&(e.preventDefault(),F(I.current.length-1))},[D,F]),q=(0,n.useCallback)(e=>{let{key:t}=e,a=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;m.includes(t)&&!a?U(e):u.includes(t)&&!a?B(e):"PageUp"===t?H(e):"PageDown"===t?W(e):"Home"===t?V(e):"End"===t&&G(e)},[U,B,H,W,V,G]),j=(0,n.useMemo)(()=>({activeItem:v,setActiveItem:S,setInitialActiveItem:k,setHasFocus:T,initialActiveItem:C,addInteractiveItem:L,removeInteractiveItem:O}),[v,S,k,T,C,L,O]),z=(0,n.useCallback)(e=>{T(!0),_?.(e)},[T,_]),K=(0,n.useCallback)(e=>{let{currentTarget:t,relatedTarget:a}=e;!t.contains(a)&&w&&(S(void 0),T(!1)),f?.(e)},[S,T,f,w]);return n.createElement(c.A.Provider,{value:j},n.createElement("div",{...x,role:"list",tabIndex:-1,"aria-label":a,"aria-labelledby":p,"aria-describedby":h,onKeyDown:q,onFocus:z,onBlur:K,ref:P},e?.map((e,a,r)=>n.createElement(n.Fragment,{key:A?.(e)??e.id},t(e,a,r)))))};InteractiveList.displayName="InteractiveList";let p=(0,n.forwardRef)(InteractiveList)},0x10da39755:(e,t,a)=>{"use strict";a.d(t,{k:()=>isValidListItemLabel,n:()=>makeListItemPlaceholderLabel});var n=a(0x18dac2b8e);let makeListItemPlaceholderLabel=()=>(0,n.Cu)()||(0,n.M8)()||(0,n.b3)()?"LIST_ITEM_PLACEHOLDER_LABEL":void 0,isValidListItemLabel=({ariaLabel:e,ariaLabelledBy:t})=>(!!e||!!t)&&(!e||!t)&&(!e||0!==e.trim().length)&&(!t||0!==t.trim().length)},0x11243fb75:(e,t,a)=>{"use strict";a.d(t,{c:()=>f,A:()=>b});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x14fad6485),o=a(0x1f022ebd9),s=a(0x1ea9a28fa),c=a(0x185d57056),d=a(0x6e8c7b08),m=a(0xb77a689a),u=a(0x15279822),p=a(0xf448cf7e),h=a.n(p);let _=[" ","Enter"],f=(0,n.forwardRef)(({children:e,id:t,className:a,tabIndex:r,interactive:p=!0,manageTabIndex:f=!0,"aria-label":b,"aria-labelledby":g,"aria-describedby":y,onFocus:A,onKeyDown:x,...E},C)=>{let{activeItem:k,setActiveItem:v,setInitialActiveItem:S,initialActiveItem:I,addInteractiveItem:w,removeInteractiveItem:T}=(0,n.useContext)(d.A),{windowRef:N}=(0,n.useContext)(l._0),M=N?.deref()?.document,R=(0,n.useRef)(null);(0,o.A)(()=>{let e=R.current;e&&t===k&&M?.activeElement!==e&&e.focus()},[k,t]),(0,n.useEffect)(()=>{if(!f)return;let e=R.current;if(e){var a;if(I===t)return void(a=N.deref(),e&&e.querySelectorAll("[data-tab-index-was-modified]").forEach(e=>{if(!(0,s.A)(e,a))return;let t=e.dataset.tabIndexToRestore;(0,m.A)(t)?e.setAttribute("tabindex",t):e.removeAttribute("tabindex"),delete e.dataset.tabIndexWasModified,delete e.dataset.tabIndexToRestore}));e&&(0,u.rO)(e).forEach(e=>{let t=e.getAttribute("tabindex");e.setAttribute("tabindex","-1"),e.dataset.tabIndexWasModified="true",(0,m.A)(t)&&(e.dataset.tabIndexToRestore=t)})}},[I,t,f,N]),(0,n.useEffect)(()=>{if(p)return w(t),()=>{T(t)}},[t,w,T,p]);let P=(0,n.useCallback)(e=>{let{target:a,currentTarget:n}=e;v(a!==n?void 0:t),S(t),A?.(e)},[t,v,S,A]),L=(0,n.useCallback)(e=>{x?.(e);let{key:t,target:a,currentTarget:n}=e;!_.includes(t)||a===n&&(0,s.A)(a,N.deref())&&a.click()},[x,N]),O=I===t?0:-1,D=(0,c.P)(C,R);return n.createElement("div",{...E,role:"listitem",id:t,className:i()(h().listitem,a),"aria-label":b,"aria-labelledby":g,"aria-describedby":y,tabIndex:f?O:r,ref:D,onFocus:P,onKeyDown:L},e)}),b=f},0x1a0f9c9a:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xf448cf7e),o=a.n(l);let Separator=({id:e,className:t,...a})=>n.createElement("div",{...a,role:"none",className:i()(o().separator,t),id:e});Separator.displayName="Separator";let s=Separator},0x17e89afdc:(e,t,a)=>{"use strict";a.d(t,{p:()=>shouldHandleKeyEvent});var n=a(0xdbb55997),r=a(0xa942d25);let shouldHandleKeyEvent=e=>{let t=e.target;return!(0,n.A)(t)&&!(0,r.A)(t)}},0x13b0ddf54:(e,t,a)=>{"use strict";a.d(t,{ed:()=>getNameForKey,tc:()=>_,zG:()=>KeyboardKey});var n,r,i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0xbe5e39b6),c=a(0x62a17882),d=a(0x20482ad21),m=a(0x2501a2cee);let u=new d.Ay("keyboard_key");var p=((n=p||{}).ArrowUp="\u2191",n.ArrowDown="\u2193",n.ArrowLeft="\u2190",n.ArrowRight="\u2192",n),h=((r=h||{}).CmdOrCtrl="CmdOrCtrl",r.OptOrAlt="OptOrAlt",r);let _={...p,...h},f=Object.values(p).map(e=>e.toString()),b={Cmd:{name:"command"},"\u2191":{name:"caret-up-filled"},"\u2193":{name:"caret-down-filled"},"\u2190":{name:"caret-left-filled"},"\u2192":{name:"caret-right-filled"}},getNameForKey=e=>(({"\u2191":u.t("up arrow"),"\u2193":u.t("down arrow"),"\u2190":u.t("left arrow"),"\u2192":u.t("right arrow"),Ctrl:u.t("control"),"\u2318":u.t("command"),Cmd:u.t("command"),Option:u.t("option"),Alt:u.t("alt"),".":u.t("period"),",":u.t("comma"),"[":u.t("left bracket"),"]":u.t("right bracket"),"+":u.t("plus"),"-":u.t("minus"),Esc:u.t("escape"),Strg:"Steuerung"})[e]||String(e)).toLowerCase(),KeyboardKey=({label:e,className:t,slim:a=!1,theme:n=s.Sx.Light,tooltip:r=!1,"aria-hidden":l=!1})=>{let d=String(e),u=f.includes(d),p="CmdOrCtrl"===d?(0,c.cX)()?"Cmd":"Ctrl":"OptOrAlt"===d?(0,c.cX)()?"Option":"Alt":d,h=b[p],_=o()(t,{"c-keyboard_key":!0,"c-keyboard_key__arrow_key":u,"c-keyboard_key--slim":a||r,"c-keyboard_key--dark":n===s.Sx.Dark,"c-keyboard_key__tooltip":r}),g=getNameForKey(p);return i.createElement("div",{role:"img","aria-label":g,"aria-hidden":l,className:_},h?i.createElement(m.Ah,{...h,size:a?"inherit":"20",inline:a}):p)};KeyboardKey.displayName="KeyboardKey"},0x22fcfc255:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x62a17882),o=a(0x13b0ddf54);let Delimiter=()=>(0,l.cX)()?n.createElement("span",{"data-qa":"keyboard-keys-tip-key-delimiter",className:"c-keyboard_keys--delimiter"},"\xa0"):n.createElement("span",{"data-qa":"keyboard-keys-tip-key-delimiter",className:"c-keyboard_keys--delimiter"},"+");Delimiter.displayName="Delimiter";let KeyboardKeysTooltip=({isInline:e=!1,title:t,mainKey:a,modifier:r,modifiers:l,className:s,useSlimModifiers:c})=>{let d=i()("c-keyboard_keys",{"c-keyboard_keys--inline":e,"c-keyboard_key__tooltip_text":!(r||l)},s),m=i()("c-keyboard_keys--title",{"c-keyboard_keys--title-inline":e}),u=r?[r]:l,p=u?.map(e=>n.createElement(n.Fragment,{key:`${e}_key`},n.createElement(o.zG,{label:e,tooltip:!0,slim:c}),n.createElement(Delimiter,null)));return n.createElement(n.Fragment,null,n.createElement("span",{className:m,"aria-hidden":"true"},t),n.createElement("span",{className:d},p,n.createElement(o.zG,{label:a,tooltip:!0})))};KeyboardKeysTooltip.displayName="KeyboardKeysTooltip";let s=KeyboardKeysTooltip},0x15e39ab9e:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x220f8fb41),o=a(0x1c371dd8b),s=a(0x23723e37b),c=a(0xfe5aa224);let d={onClick:{action:l.lG.CLICK}},m=n.forwardRef(function({autoClogProps:e,className:t,href:a,invert:r=!1,children:m,...u},p){let h=(0,n.useContext)(c.A),_=i()("c-link",{"c-link--focus-visible":h,"c-link--invert":r},t),f=n.createElement("a",{...(0,s.A)(u),className:_,href:a,ref:p},m);return e?n.createElement(o.A,{autoClogProps:e,actionProps:d,elementType:l.RJ.LINK},f):f})},0x14eba15dc:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x11a296110),s=a(0x1ed656589);let c=class extends n.PureComponent{static defaultProps={highlighted:!1,isKeyboardHighlight:!1,disabled:!1,className:"",onMouseEnter:l.A,onSelected:l.A,menuCallback:l.A,menuCallbackBefore:l.A,menuCallbackId:void 0,"data-qa":"menu_item_action_button",activeMenuId:void 0,isResponsive:!0};disableHighlightedState;constructor(e){super(e),this.disableHighlightedState=!1,this.handleMouseEnter=this.handleMouseEnter.bind(this),this.handleSelected=this.handleSelected.bind(this)}componentDidUpdate(){this.props.highlighted||(this.disableHighlightedState=!1)}handleMouseEnter(e){this.disableHighlightedState=!0,this.props.onMouseEnter?.(e)}handleSelected(e){this.props.menuCallbackBefore?.(e),this.props.onSelected?.(e),this.props.menuCallback?.(this.props.menuCallbackId,e)}render(){let{disabled:e,highlighted:t,isKeyboardHighlight:a,className:r,onMouseEnter:l,onSelected:s,menuCallback:c,menuCallbackBefore:d,menuCallbackId:m,activeMenuId:u,isResponsive:p,...h}=this.props,_=i()("c-menu_item_action_button",r,{"c-menu_item_action_button--highlighted":t&&!e&&!this.disableHighlightedState}),f=this.props.activeMenuId;return n.createElement("div",{className:"c-menu_item_action_button__container",onMouseEnter:this.handleMouseEnter,"data-qa":`${this.props["data-qa"]}-wrapper`},n.createElement(o.Ay,{id:f,className:_,disabled:e,onClick:this.handleSelected,role:"menuitem",tabIndex:-1,type:"outline",...h}))}};c.displayName="MenuItemActionButton";let d=(0,s.Ay)(c)},0x219f07351:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x178788799),o=a(0x1e1bdd25f);let s=class extends n.PureComponent{static defaultProps={initialSelectedIndex:0,menuClassNames:"",noMargin:!1};constructor(e){super(e),this.renderMenu=this.renderMenu.bind(this),this.onMenuItemSelected=this.onMenuItemSelected.bind(this),this.state={selectedIndex:this.props.initialSelectedIndex}}onMenuItemSelected(e,t,a){let{children:n}=this.props;this.setState(()=>({selectedIndex:e})),t?.(a),n[e]&&n[e]?.props?.onSelected&&n[e]?.props?.onSelected(a)}renderMenu({onTriggerClose:e}){let{children:t,...a}=this.props,r=n.Children.map(t,(t,a)=>n.cloneElement(t,{onSelected:this.onMenuItemSelected.bind(this,a,e||void 0)})),o=i()(a.menuClassNames,"c-menu_select__menu");return a.noMargin=!0,n.createElement(l.Ay,{...a,menuClassNames:o},r)}render(){let{selectedIndex:e}=this.state,{children:t,...a}=this.props,{label:r,icon:i}=n.cloneElement(t[e]).props;return n.createElement("div",{className:"c-menu_select__wrapper"},n.createElement(o.A,{renderMenu:this.renderMenu,...a},n.createElement("div",{className:"c-menu_select"},i&&n.createElement("div",{className:"c-menu_select_item__icon"},i),n.createElement("div",{className:"c-menu_select__label"},r),n.createElement("div",{className:"c-menu_select__caret c-deprecated-icon c-icon--caret-down"}))))}};s.displayName="MenuSelect";let c=s},0x1b88224f9:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x1407c6c2c),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x189615fa),c=a(0xf225ecf2),d=a(0x1c7997c1),m=a(0x96920791),u=a(0x16d221c7f),p=a(0x142775427),h=a(0x1f803375e);let _=new l.Ay("generic_dialog"),DialogModalProps=({title:e,children:t,submitButtonType:a="primary",submitButtonText:l=_.t("Confirm"),submitButtonIsDisabled:f=!1,submitButtonIsLoading:b=!1,showCancelButton:g=!0,showCloseButton:y=!0,showSubmitButton:A=!0,cancelButtonText:x=_.t("Cancel"),onSubmit:E=r.A,onCancel:C=r.A,onClose:k=r.A,"data-qa":v="dialog",className:S,overlayClassName:I,submitAutoClogProps:w,cancelAutoClogProps:T,shouldReturnFocusAfterClose:N=!0})=>{let M=(0,i.A)(),R=(0,i.A)();return n.createElement(s.A,{describedby:R,labelledby:M,closeModal:k,role:"dialog",className:S,overlayClassName:I,dataQa:v,shouldReturnFocusAfterClose:N,showCloseButton:y},n.createElement(p.A,null,n.createElement(h.A,{id:M,title:e,"data-qa":`${v}_header`})),n.createElement(c.A,null,n.createElement(d.A,{id:R,"data-qa":`${v}_body`},t)),(g||A)&&n.createElement(m.A,{"data-qa":`${v}_footer`},n.createElement(u.A,null,g&&n.createElement(o.Ay,{type:"outline",onClick:C,"data-qa":`${v}_cancel`,autoClogProps:T},x),A&&n.createElement(o.lV,{type:a,onClick:E,loading:b,disabled:f,"data-qa":`${v}_go`,autoClogProps:w,"aria-label":l},l))))};DialogModalProps.displayName="DialogModalProps";let f=DialogModalProps},0x127218dbe:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x344bb842);let l=new r.Ay("generic_dialog");function ModalBackButton({onClick:e,...t}){let a=(0,n.useMemo)(()=>({name:"caret-left-full"}),[]);return n.createElement(i.A,{className:"c-multi_pane_modal__back",svgIconProps:a,onClick:e,"aria-label":l.t("Back"),"data-qa":t["data-qa"]})}ModalBackButton.displayName="ModalBackButton";let o=n.memo(ModalBackButton)},0x24546e7f2:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x72b537b5),o=a(0x189615fa);function MultiPaneModal({defaultPane:e,panes:t,...a}){let r=(0,l.U)(),[s,c]=(0,n.useState)({pane:e}),d=(0,n.useCallback)((e,t)=>c({pane:e,props:t}),[]),{render:m,modalProps:u}=t[s.pane]??{};return m?n.createElement(o.A,{...a,...u,className:i()(a.className,u?.className,"c-multi_pane_modal")},n.createElement(n.Fragment,{key:s.pane},m({...s.props,switchPane:d}))):(r.error(Error(`[MULTI_PANE_MODAL] Unknown pane "${s.pane}"`)),null)}MultiPaneModal.displayName="MultiPaneModal";let s=MultiPaneModal},0x126affba2:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x205f4fb61),d=a(0xa6f3163b),m=a(0x344bb842),u=a(0xb5e49867);function getCurrentPageRange({page:e,totalPageCount:t,rangeSize:a=5}){if(e<=0||!t)return[];let n=Math.max(Math.min(e-(a%2==0?Math.floor(a/2)-1:Math.floor(a/2)),t-(a-1)),1),r=Math.min(n+a,t+1);return(0,u.A)(n,r)}var p=a(0x2501a2cee),h=a(0xbe505324);let _=new s.Ay("browsers"),f={ArrowDown:!0,ArrowRight:!0},b={ArrowUp:!0,ArrowLeft:!0},g=n.forwardRef(({ariaLabel:e,wrapperClassName:t,page:a,totalPageCount:r,rangeSize:s=5,onPageSelect:u,onPrevPageClick:g=l.A,onNextPageClick:y=l.A,onPageNumberClick:A=l.A,navigationLabel:x,makePageLabel:E},C)=>{let k=(0,n.useCallback)(e=>{u(e),A(e)},[A,u]),v=(0,n.useCallback)(()=>{if(a-1<=0)return;let e=a>=1?a-1:1;u(e),g(e)},[u,g,a]),S=(0,n.useCallback)(()=>{if(a+1>r)return;let e=a+1>r?r:a+1;u(e),y(e)},[y,u,a,r]),I=(0,n.useMemo)(()=>getCurrentPageRange({page:a,totalPageCount:r,rangeSize:s}),[a,r,s]),w=x?_.t("Previous {label}",{label:x,fallbackHash:"81f547195bef12a0bb74f5af751fe50e78a0c2f3"}):_.t("Previous page"),T=x?_.t("Next {label}",{label:x,fallbackHash:"4bfc194b68a3369d53aadcddc4f891771d91a3d9"}):_.t("Next page"),N=e||_.t("Pagination"),M=(0,n.useCallback)(e=>{let{key:t,target:a}=e;if(!(t in f||t in b))return;e.stopPropagation(),e.preventDefault();let n=a.nextElementSibling,r=a.previousElementSibling;t in f&&n?n.focus():t in b&&r&&r.focus()},[]),R=(0,n.useRef)(null);(0,n.useImperativeHandle)(C,()=>({focus:()=>{R.current&&R.current.focus()}}),[R]);let P=(0,n.useMemo)(()=>{let e=1===a;return n.createElement(m.A,{size:"small",onClick:v,"data-qa":"c-pagination_back_btn",className:"c-pagination__arrow_btn","aria-label":w,tabIndex:-1,onKeyDown:M,autoClogProps:{elementName:"pagination_back_button",elementValue:String(a-1),onClick:{enableClogAction:!0}},"aria-disabled":e,svgIconProps:{name:"caret-left"}})},[M,v,a,w]),L=(0,n.useMemo)(()=>{let e=a===r;return n.createElement(m.A,{size:"small",onClick:S,"data-qa":"c-pagination_forward_btn",className:"c-pagination__arrow_btn","aria-label":T,tabIndex:-1,onKeyDown:M,autoClogProps:{elementName:"pagination_forward_button",elementValue:String(a+1),onClick:{enableClogAction:!0}},"aria-disabled":e},n.createElement(p.Ah,{name:"caret-right"}))},[T,M,S,a,r]);return a?n.createElement(o.A,{uiComponentName:"pagination"},n.createElement("div",{className:i()(t,"c-pagination_wrapper"),"data-qa-current-page":a},n.createElement(h.A,{className:"c-pagination__container","aria-label":N},P,I.map((e,t)=>{let r=E&&E(e)||_.t("Page {pageNumber}",{pageNumber:(0,c.Ay)(e)}),o=a===e;return n.createElement(d.A,{key:e,className:i()("c-pagination__page_btn",{"c-pagination__page_btn--active":o}),"aria-current":!!o&&"page",tabIndex:o?0:-1,ref:o?R:l.A,"data-qa":`c-pagination_page_btn_${e}`,"aria-label":r,onClick:()=>k(e),"aria-describedby":"pagination-arrow-key-instructions-node",onKeyDown:M,autoClogProps:{elementName:"pagination_page_button",elementIndex:t,elementValue:String(e),onClick:{enableClogAction:!0}}},(0,c.Ay)(e))}),L))):null})},0xeaeb4a22:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x181214caa).A},0x2473f074:(e,t,a)=>{"use strict";a.d(t,{K:()=>useScrollAreaClass});var n=a(0xbad225b5),r=a(0x14fad6485),i=a(0x807220a2);let l="use-scroll-area";function useScrollAreaClass(){let{windowRef:e}=(0,n.useContext)(r._0),t=(0,i.p4)();(0,n.useEffect)(()=>{t?e.deref()?.document?.body?.classList.add(l):e.deref()?.document?.body?.classList.remove(l)},[t,e])}},0x15dd8a31:(e,t,a)=>{"use strict";a.d(t,{A:()=>P});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xca924ee1),s=a(0x72b537b5),c=a(0x220f8fb41),d=a(0x1c371dd8b),m=a(0xb97b797e),u=a(0x185d57056),p=a(0x2469ec64e),h=a(0x677a139e),_=a(0x8716533d),f=a(0x2bba3a0),b=a(0x1422234dc),g=a(0x18f2150ea),y=a(0x1229d92d),A=a(0x20482ad21),x=a(0x223fb5a56),E=a(0x11aaf59fe),C=a(0x2501a2cee);let k=new A.Ay("select"),v=class extends n.Component{measurePopoverEvent;constructor(e){super(e),(0,m.v)(this,["updateOptionsListPosition","onKeyDown","onClick"]);const{measurePopoverEventName:t=null}=this.props;t&&(this.measurePopoverEvent=new Event(t))}componentDidMount(){let{focusOnMount:e=!1}=this.props;e&&this.onClick()}onKeyDown(e){let{shiftKey:t,ctrlKey:a,metaKey:n,altKey:r,key:i}=e;if(!t&&!a&&!n){if("Escape"===i&&!r)return void this.onEsc(e);if(" "===i&&!r)return void this.onSpacebar(e);if("Enter"===i&&!r)return void this.onEnter(e);if("ArrowUp"===i&&r)return void this.onAltArrowUp(e);if("ArrowUp"===i&&!r)return void this.onArrowUp(e);if("ArrowDown"===i)return void this.onArrowDown(e);if("Home"===i&&!r)return void this.onHome(e);if("End"===i&&!r)return void this.onEnd(e);"Tab"!==i||r||this.onTab()}}onEsc(e){let{selectState:t,setSelectState:a}=this.props,{isExpanded:n}=t;n&&(e.stopPropagation(),a(()=>({activeRowIndex:void 0,activeOption:void 0,initialActiveOption:void 0,isExpanded:!1})))}onArrowUp(e){let{selectState:t,setSelectState:a}=this.props,{isExpanded:n,options:r}=t;if(n)return;e.preventDefault(),e.stopPropagation(),this.updateOptionsListPosition();let i=(0,f.A)(r,e=>(0,x.oj)(e),0),l=r[i];a(()=>({initialActiveOption:l,isExpanded:!0}))}onAltArrowUp(e){let{selectState:t}=this.props,{isExpanded:a}=t;if(!a)return;let n=this.props.listRef.current;n&&(e.stopPropagation(),e.preventDefault(),n.onEnter(e))}onArrowDown(e){let{selectState:t,setSelectState:a}=this.props,{isExpanded:n}=t;n||(e.preventDefault(),e.stopPropagation(),this.updateOptionsListPosition(),a(()=>({isExpanded:!0})))}onHome(e){let{selectState:t,setSelectState:a}=this.props,{isExpanded:n,options:r}=t;if(n)return;e.preventDefault(),e.stopPropagation(),this.updateOptionsListPosition();let i=(0,f.A)(r,e=>(0,x.oj)(e),0),l=r[i];a(()=>({initialActiveOption:l,isExpanded:!0}))}onEnd(e){let{selectState:t,setSelectState:a}=this.props,{isExpanded:n,options:r}=t;if(n)return;e.preventDefault(),e.stopPropagation(),this.updateOptionsListPosition();let i=(0,b.A)(r,e=>(0,x.oj)(e)),l=r[i];a(()=>({initialActiveOption:l,isExpanded:!0}))}onEnter(e){let{selectState:t}=this.props,{isExpanded:a}=t;a||(e.stopPropagation(),this.onClick())}onSpacebar(e){let{selectState:t}=this.props,{isExpanded:a}=t;a||(e.preventDefault(),e.stopPropagation(),this.onClick())}onTab(){let{setSelectState:e}=this.props;e(()=>({isExpanded:!1}))}onClick(){let{onClick:e=l.A,setSelectState:t,selectState:a}=this.props;this.updateOptionsListPosition(),e&&e(),t(()=>({isExpanded:!a.isExpanded}))}updateOptionsListPosition(){let{selectState:e}=this.props,{isExpanded:t}=e;!t&&this.measurePopoverEvent&&this.props.windowRef.deref()?.dispatchEvent(this.measurePopoverEvent)}renderContent(e){let{renderSelectedOption:t,selectState:a,textSelect:r=!1,textSelectLabel:i,selectDataQa:l,placeholderText:o}=this.props,{selectedOption:s}=a,c=s?t(s):n.createElement("span",{className:"c-select_button__placeholder"},o||k.t("Please select an option")),d=r&&i?n.createElement("span",{className:"c-select_button--text-select-label"},i):void 0;return n.createElement("div",{id:e,"data-qa":l?`${l}-button-content`:null,className:"c-select_button__content",role:"none"},d,c)}render(){let{ariaLabelledBy:e,ariaDescribedBy:t,ariaLabel:a,ariaControls:r,selectState:o,size:s,width:c,textSelect:d=!1,selectDataQa:m,classPrefix:u,onFocus:h=l.A,onBlur:_=l.A,onMouseEnter:f,onMouseLeave:b,refToForward:y}=this.props,{isDisabled:A,isExpanded:x,isInvalid:k,selectId:v,activeRowIndex:S}=o,I=i()("c-select_button",`c-select_button--${s}`,{"c-select_button--disabled":A,"c-select_button--expanded":x,"c-select_button--text-select":d,"c-select_button--invalid":k,[`${u}__select_button`]:u}),w=d?{}:{width:c},T=(0,p.Es)(v,"button"),N=`${T}-option`,M=(0,g.A)(S)&&x?(0,p.Es)(v,`option_${S}`):void 0;return n.createElement("div",{tabIndex:0,className:I,style:w,"data-qa":m?`${m}-button`:null,id:T,ref:y,role:"combobox","aria-disabled":!!A||void 0,"aria-labelledby":e,"aria-describedby":t,"aria-label":a,"aria-invalid":k,"aria-activedescendant":M,"aria-expanded":x,"aria-haspopup":"listbox","aria-controls":r,onFocus:h,onBlur:_,onMouseEnter:f,onMouseLeave:b,onClick:this.onClick,onKeyDown:this.onKeyDown},this.renderContent(N),n.createElement("div",{className:`c-select_button__icon c-select_button__icon--${s}`},n.createElement(C.Ah,{name:"caret-down",size:s===E.hu.SMALL?"inherit":"20"})))}};v.displayName="SelectButton";let S=(0,y.A)(v),I=n.forwardRef((e,t)=>n.createElement(S,{...e,refToForward:t}));var w=a(0x172a4bb17),T=a(0x143f89715);let N={onOptionSelected:{action:c.lG.SELECT}},getIdsFromHintOrErrors=e=>e.map(({id:e})=>e),M=class extends n.Component{static defaultProps={renderOption:e=>e.label,renderSelectedOption:e=>e.label,size:E.hu.MEDIUM,width:225,optionsRowHeight:E.bJ,errors:[],hints:[],ariaLabelledBy:void 0,ariaDescribedBy:void 0,placeholderText:void 0,selectDataQa:void 0,resultsInPopover:!0,overlayClassName:void 0,listClassName:void 0,onClick:l.A,onOptionSelected:l.A,onOptionsListClose:l.A,className:void 0,classPrefix:void 0,textSelect:!1,textSelectLabel:void 0,minOptionsListWidth:void 0,focusOnMount:!1,onFocus:l.A,onBlur:l.A,maxListHeight:void 0,autoClogProps:void 0,onScrollablePage:!1,buttonRef:void 0,dynamicHeight:!1,forceMaxHeight:!1,includePadding:!0,includeDividers:!0};triggerRef;listRef;measurePopoverEventName;fallbackDataQa;keyCommandShortcuts;constructor(e){super(e),(0,m.v)(this,["renderOptionsList","onHome","onEnd","onPageUp","onPageDown"]),this.triggerRef=n.createRef(),this.listRef=n.createRef();const{selectId:t}=e.selectState;this.measurePopoverEventName=`measureSelectPopover--${t}`,this.fallbackDataQa=e.selectDataQa||t,this.keyCommandShortcuts=[{keys:["home"],handler:this.onHome},{keys:["end"],handler:this.onEnd},{keys:["pageup"],handler:this.onPageUp},{keys:["pagedown"],handler:this.onPageDown}]}onHome(e){let t=this.listRef.current;if(!t||(t.isMouseMoveEnabled=!1,!t.shouldInterceptKeyEvent(e)))return;let{isExpanded:a}=this.props.selectState;a&&e.preventDefault(),t.movePrevious(0)}onEnd(e){let t=this.listRef.current;if(!t||(t.isMouseMoveEnabled=!1,!t.shouldInterceptKeyEvent(e)))return;let{isExpanded:a}=this.props.selectState;a&&e.preventDefault();let n=t.getOptionsList();if(!n)return;let r=n.length-1;t.moveNext(r)}onPageUp(e){let t=this.listRef.current;if(!t||(t.isMouseMoveEnabled=!1,!t.shouldInterceptKeyEvent(e)))return;let{isExpanded:a,activeRowIndex:n}=this.props.selectState;a&&e.preventDefault();let r=n?Math.floor(n/10):0;t.movePrevious(r>1?(r-1)*10:0)}onPageDown(e){let t=this.listRef.current;if(!t||(t.isMouseMoveEnabled=!1,!t.shouldInterceptKeyEvent(e)))return;let{activeRowIndex:a,isExpanded:n}=this.props.selectState;n&&e.preventDefault();let r=t.getOptionsList();if(!r)return;let i=r.length,l=Math.ceil(i/10),o=a?Math.floor(a/10):0;t.moveNext(o===l-1?i-1:(o+1)*10)}renderOptionsList(){let{ariaLabel:e,onOptionSelected:t,onOptionsListClose:a,renderOption:r,resultsInPopover:i,overlayClassName:l,listClassName:o,selectState:s,setSelectState:m,width:u,classPrefix:p,minOptionsListWidth:h,optionsRowHeight:_,maxListHeight:f,onScrollablePage:b,dynamicHeight:g,forceMaxHeight:y,includePadding:A,includeDividers:E,preventScroll:C,autoClogProps:k}=this.props,{isDisabled:v}=s;if(v)return null;let S=i?n.createElement(w.A,{selectOptionsListRef:this.listRef,className:o,selectState:s,setSelectState:m,renderOption:r,ariaLabel:e,onOptionSelected:t,onOptionsListClose:a,width:u,inputRef:this.triggerRef,measurePopoverEventName:this.measurePopoverEventName,classPrefix:p,selectDataQa:this.fallbackDataQa,minOptionsListWidth:h,optionsRowHeight:_,popoverProps:l?{overlayClassName:l}:void 0,shouldAlwaysHaveActiveRow:!0,maxListHeight:f,onScrollablePage:b,dynamicHeight:g,forceMaxHeight:y,includePadding:A,includeDividers:E,preventScroll:C,keyCommandShortcuts:this.keyCommandShortcuts,shouldTokenizeOnSpace:!0}):n.createElement(x.Ay,{ref:this.listRef,className:o,selectState:s,setSelectState:m,renderOption:r,ariaLabel:e,onOptionSelected:t,onOptionsListClose:a,width:u,inputRef:this.triggerRef,classPrefix:p,selectDataQa:this.fallbackDataQa,optionsRowHeight:_,maxListHeight:f,shouldAlwaysHaveActiveRow:!0,dynamicHeight:g,forceMaxHeight:y,includePadding:A,includeDividers:E,preventScroll:C,keyCommandShortcuts:this.keyCommandShortcuts,shouldTokenizeOnSpace:!0});return k?n.createElement(d.A,{autoClogProps:k,actionProps:N,elementType:c.RJ.DROPDOWN},S):S}render(){let e,t,{resultsInPopover:a,selectState:r,setSelectState:l,className:o,textSelect:s,textSelectLabel:c,focusOnMount:d,onFocus:m,onBlur:f,ariaLabel:b,ariaLabelledBy:g,ariaDescribedBy:y,buttonRef:A,errors:x,hints:E,size:C,renderSelectedOption:k,width:v}=this.props,{isExpanded:S,isInvalid:w,selectId:N}=r,M=(0,T.A)(x,this.props.logger),R=(0,T.A)(E,this.props.logger);x&&(e=M?getIdsFromHintOrErrors(x):void 0),E&&(t=R?getIdsFromHintOrErrors(E):void 0);let P=(0,p.Yk)([y,e,t]);return n.createElement("div",{className:i()(o,"c-basic-select"),"data-qa":this.fallbackDataQa},n.createElement(I,{...this.props,width:v,size:C,renderSelectedOption:k,selectDataQa:this.fallbackDataQa,selectState:r,setSelectState:l,measurePopoverEventName:a?this.measurePopoverEventName:void 0,textSelect:s,textSelectLabel:c,focusOnMount:d,onFocus:m,onBlur:f,ariaLabel:b,ariaLabelledBy:g,ariaDescribedBy:P,"aria-invalid":w,...S?{ariaControls:(0,p.Es)(N,"listbox")}:{},ref:(0,u.P)(this.triggerRef,A),listRef:this.listRef}),M&&x&&n.createElement(_.A,{errors:x}),R&&E&&E.map(({id:e,message:t})=>n.createElement(h.A,{key:e,id:e},t)),this.renderOptionsList())}};M.displayName="ControlledBasicSelect";let R=class extends n.Component{static defaultProps={isDisabled:!1,isExpanded:!1,isRequired:!0,isInvalid:!1,errors:[],hints:[],onOptionSelected:l.A,onOptionsListClose:l.A,selectedOption:void 0,selectId:`basic-select-${(0,p.r9)()}`,maxListHeight:void 0,autoClogProps:void 0};static getDerivedStateFromProps(e,t){let{selectedOption:a}=e,{selectedOption:n}=t;return n&&(void 0===a||a===n)?null:{selectedOption:a}}constructor(e){super(e),this.state={activeRowIndex:void 0,isDisabled:e.isDisabled,isExpanded:e.isExpanded,isInvalid:e.isInvalid,isRequired:e.isRequired,options:e.options,selectId:e.selectId,selectedOption:e.selectedOption,selectType:E.US.BASIC},(0,m.v)(this,["setSelectState"])}setSelectState(e,t){return this.setState(e,t)}render(){return n.createElement(s.Y.Consumer,null,e=>{let{isDisabled:t,isInvalid:a,isRequired:r,errors:i}=this.props,l=a||(0,T.A)(i,e),s=(0,o.A)(()=>({...this.state,isDisabled:t,isInvalid:l,isRequired:r}));return n.createElement(M,{...this.props,selectState:s(),setSelectState:this.setSelectState,logger:e})})}};R.displayName="BasicSelect";let P=R},0x15014e268:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>o,HH:()=>i.A,P2:()=>l.A,Z1:()=>r.A});var n=a(0x15dd8a31),r=a(0xcc2c1a16),i=a(0x1c2f8d9ec),l=a(0xcc619422);let o=n.A},0xa7ec93c2:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>v,Gn:()=>S,yW:()=>C});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xca924ee1),s=a(0x72b537b5),c=a(0x220f8fb41),d=a(0x1c371dd8b),m=a(0xb97b797e),u=a(0x2469ec64e),p=a(0x677a139e),h=a(0x8716533d),_=a(0xb6f15b90),f=a(0x223fb5a56),b=a(0x172a4bb17),g=a(0xf006b40c),y=a(0x11aaf59fe),A=a(0x143f89715),x=a(0x85e904d5);let E={onOptionSelected:{action:c.lG.SELECT}},getIdsFromHintOrErrors=e=>e.map(({id:e})=>e),C=class extends n.Component{static defaultProps={renderOption:e=>e.label,size:y.hu.MEDIUM,width:300,optionsRowHeight:y.bJ,maxHeight:void 0,maxOptionsListHeight:void 0,minOptionsListWidth:void 0,errors:[],hints:[],placeholderText:"",prefix:void 0,emptyStateMessage:void 0,isLoading:!1,resultsInPopover:!0,overlayClassName:void 0,offsetY:void 0,offsetX:void 0,enableLoadingState:!0,selectDataQa:void 0,focusOnMount:!1,onSelectedItemsChange:l.A,onKeyDown:l.A,onKeyUp:l.A,className:void 0,classPrefix:void 0,onFilterQueryChange:l.A,onFilterQueryPaste:l.A,processOptions:l.A,onBlur:l.A,onOptionsListClosedBlur:l.A,ariaLabelledBy:void 0,ariaDescribedBy:void 0,expandOnFocus:!1,onTokenSelect:l.A,onInputFocused:l.A,forceRealName:void 0,onOptionsListOpen:l.A,onOptionsListClose:l.A,onScrollablePage:!1,onOptionSelected:l.A,shouldOptionBeSelected:l.A,shouldTokenizeOnComma:!1,shouldTokenizeOnSpace:!1,autoClogProps:void 0,dynamicHeight:!1,customizeTokenProps:{},iconType:void 0,disableIdParsing:!1,isTokenEditable:!1,ignoreSelectAllTokensAfterMount:!1,optionsListFooterBannerContent:void 0,throttleForceRenderSelectContainer:!1,forceRenderSelectContainerThrottleRate:void 0};inputContainerRef;measurePopoverEventName;fallbackDataQa;additionalInfoContainerRef;constructor(e){super(e),(0,m.v)(this,["renderOptionsList"]),this.inputContainerRef=n.createRef(),this.additionalInfoContainerRef=n.createRef();const{selectId:t}=e.selectState;this.measurePopoverEventName=`measureSelectPopover--${t}`,this.fallbackDataQa=e.selectDataQa||t}renderOptionsList(e){let{selectState:t,setSelectState:a,renderOption:r,emptyStateMessage:i,enableLoadingState:l,width:o,maxOptionsListHeight:s,minOptionsListWidth:m,inputRef:u,resultsInPopover:p,includeWrapper:h,isLoading:_,classPrefix:g,optionsRowHeight:y,onOptionsListOpen:A,onOptionsListClose:x,overlayClassName:C,onScrollablePage:k,onOptionSelected:v,shouldOptionBeSelected:S,shouldTokenizeOnComma:I,shouldTokenizeOnSpace:w,autoClogProps:T,dynamicHeight:N,shouldAllowUnselectInMultiSelectMode:M,stayExpandedAfterSelection:R,optionsListFooterBannerContent:P,offsetY:L,offsetX:O,disableSelectionWhileLoading:D,ariaLabel:F}=this.props,{isDisabled:U,loadInBackground:B}=t;if(U)return null;let H={key:`${t.selectId}-popover`};C&&(H.overlayClassName=C),L&&(H.offsetY=L);let W=this.additionalInfoContainerRef?.current;e&&W&&(H.offsetY=-W.offsetHeight),O&&(H.offsetX=O);let V=p?n.createElement(b.A,{selectState:t,setSelectState:a,renderOption:r,emptyStateMessage:i,enableLoadingState:l,width:o,maxListHeight:s,multiSelectMode:!0,inputRef:u,inputContainerRef:this.inputContainerRef,measurePopoverEventName:this.measurePopoverEventName,isLoading:_&&!B,classPrefix:g,selectDataQa:this.fallbackDataQa,optionsRowHeight:y,onOpen:A,onOptionsListClose:x,popoverProps:H,onScrollablePage:k,onOptionSelected:v,shouldOptionBeSelected:S,shouldTokenizeOnComma:I,shouldTokenizeOnSpace:w,autoClogProps:T,dynamicHeight:N,shouldAllowUnselectInMultiSelectMode:M,stayExpandedAfterSelection:R,footerBannerContent:P,minOptionsListWidth:m,includeWrapper:h,disableSelectionWhileLoading:D,ariaLabel:F}):n.createElement(f.Ay,{selectState:t,setSelectState:a,renderOption:r,emptyStateMessage:i,enableLoadingState:l,width:o,maxListHeight:s,multiSelectMode:!0,classPrefix:g,selectDataQa:this.fallbackDataQa,optionsRowHeight:y,onOptionsListClose:x,onOptionSelected:v,shouldOptionBeSelected:S,shouldTokenizeOnComma:I,shouldTokenizeOnSpace:w,dynamicHeight:N,footerBannerContent:P,includeWrapper:h,disableSelectionWhileLoading:D,ariaLabel:F});return T?n.createElement(d.A,{elementType:c.RJ.DROPDOWN,actionProps:E,autoClogProps:T},V):V}render(){return n.createElement(s.Y.Consumer,null,e=>{let t,a,r,l,{selectState:o,setSelectState:s,inputRef:c,maxHeight:d,placeholderText:m,size:f,width:b,isLoading:g,focusOnMount:y,resultsInPopover:x,onSelectedItemsChange:E,onKeyDown:C,onKeyUp:k,onPaste:v,className:S,classPrefix:I,onFilterQueryChange:w,onFilterQueryPaste:T,processOptions:N,onBlur:M,onOptionsListClosedBlur:R,onOptionsListClose:P,expandOnFocus:L,ariaLabel:O,ariaLabelledBy:D,ariaDescribedBy:F,onTokenSelect:U,onInputFocused:B,forceRealName:H,autoClogProps:W,errors:V,hints:G,disableIdParsing:q,customizeTokenProps:j,iconType:z,isTokenEditable:K,ignoreSelectAllTokensAfterMount:$,disableCloseOnTab:Y,throttleForceRenderSelectContainer:Q,forceRenderSelectContainerThrottleRate:Z,allowFileToken:J}=this.props;V&&(t=(0,A.A)(V,e)),G&&(a=(0,A.A)(G,e)),V&&(r=t?getIdsFromHintOrErrors(V):void 0),G&&(l=a?getIdsFromHintOrErrors(G):void 0);let X=(0,u.Yk)([F,r,l]),ee=!!(t&&V||a&&G);return n.createElement("div",{className:i()(S,"c-multi-select"),"data-qa":this.fallbackDataQa,ref:this.inputContainerRef},n.createElement(_.A,{selectState:o,setSelectState:s,size:f,width:b,maxHeight:d,placeholderText:m,isLoading:g,inputRef:c,focusOnMount:y,measurePopoverEventName:x&&this.measurePopoverEventName,onSelectedItemsChange:E,selectDataQa:this.fallbackDataQa,onKeyDown:C,onKeyUp:k,onPaste:v,classPrefix:I,onFilterQueryChange:w,onFilterQueryPaste:T,processOptions:N,onBlur:M,onOptionsListClosedBlur:R,onOptionsListClose:P,expandOnFocus:L,ariaLabel:O,ariaLabelledBy:D,ariaDescribedBy:X,onTokenSelect:U,onInputFocused:B,forceRealName:H,autoClogProps:W,customizeTokenProps:j,iconType:z,disableIdParsing:q,isTokenEditable:K,ignoreSelectAllTokensAfterMount:$,disableCloseOnTab:Y,throttleForceRenderSelectContainer:Q,forceRenderSelectContainerThrottleRate:Z,allowFileToken:J}),n.createElement("div",{className:"flow_root",ref:this.additionalInfoContainerRef},t&&V&&n.createElement(h.A,{errors:V}),a&&G&&G.map(({id:e,message:t,className:a})=>n.createElement(p.A,{key:e,id:e,className:a},t))),this.renderOptionsList(ee))})}};C.displayName="ControlledMultiSelect";let k=class extends n.Component{static defaultProps={selectedOptions:null,isDisabled:!1,isExpanded:!1,isInvalid:!1,isRequired:!0,className:void 0,errors:[],hints:[],filter:x.k,selectId:`multi-select-${(0,u.r9)()}`,customControlledMultiSelectComponent:null,showConfirmDialog:void 0,autoClogProps:void 0,selectedTokenIndexes:[]};inputRef;constructor(e){super(e),this.state={filterQuery:"",options:e.options,isDisabled:e.isDisabled,isExpanded:e.isExpanded,isInvalid:e.isInvalid,isRequired:e.isRequired,selectId:e.selectId,selectedOptions:e.selectedOptions||[],shouldRefocusInputAfterSelection:!!e.showConfirmDialog,selectedTokenIndexes:e.selectedTokenIndexes||[]},this.inputRef=n.createRef(),(0,m.v)(this,["setSelectState"])}setSelectState(e,t){this.setState(t=>{let a=e(),{filter:n,options:r}=this.props;return void 0!==a.filterQuery&&a.filterQuery!==t.filterQuery&&n&&(a=n(r,a)),a},t)}render(){return n.createElement(s.Y.Consumer,null,e=>{let{isDisabled:t,isInvalid:a,isRequired:r,customControlledMultiSelectComponent:i,errors:l}=this.props,s=a||(0,A.A)(l,e),c=i??C,d=(0,o.A)(()=>({...this.state,isDisabled:t,isInvalid:s,isRequired:r}));return n.createElement(c,{...this.props,selectState:d(),setSelectState:this.setSelectState,inputRef:this.inputRef})})}};k.displayName="MultiSelect";let v=k,S=(0,g.A)(C)},0x1d1911997:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>S,Fw:()=>k,JJ:()=>C});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xca924ee1),s=a(0x72b537b5),c=a(0x220f8fb41),d=a(0x1c371dd8b),m=a(0xb97b797e),u=a(0x2469ec64e),p=a(0x677a139e),h=a(0x8716533d),_=a(0x1bdc66740),f=a(0x223fb5a56),b=a(0x172a4bb17),g=a(0xf006b40c),y=a(0x11aaf59fe),A=a(0x143f89715),x=a(0x85e904d5);let E={onOptionSelected:{action:c.lG.SELECT}},getIdsFromHintOrErrors=e=>e.map(({id:e})=>e),C=class extends n.Component{static defaultProps={autoClogProps:void 0,className:void 0,classPrefix:void 0,renderOption:e=>e.label,renderSelectedOption:e=>e.label,resultsInPopover:!0,overlayClassName:void 0,offsetY:void 0,offsetX:void 0,size:y.hu.MEDIUM,width:360,optionsRowHeight:y.bJ,errors:[],hints:[],ariaLabel:null,ariaLabelledBy:void 0,ariaDescribedBy:void 0,placeholderText:void 0,popoverPlaceholderText:void 0,onOptionSelected:l.A,selectDataQa:void 0,showDropdownIcon:!0,focusOnMount:!1,isLoading:!1,isDisabled:!1,isInvalid:!1,isRequired:!0,onBlur:l.A,onFocus:l.A,onEsc:l.A,onOpen:l.A,onOptionsListClose:l.A,emptyStateMessage:void 0,minOptionsListWidth:void 0,maxOptionsListHeight:void 0,inputIcon:void 0,maxCharacterLimit:void 0,onScrollablePage:!1,expandOnClick:!0,enableLoadingState:!0,searchOnClick:!1,shouldAllowUnselectInSingleSelectMode:!0,shouldOptionBeSelected:l.A,isInvalidStateControlled:!1,shouldRefocusInputAfterSelection:void 0};measurePopoverEventName;fallbackDataQa;dropdownContainer;constructor(e){super(e);const{selectId:t}=e.selectState;this.measurePopoverEventName=`measureSelectPopover--${t}`,this.fallbackDataQa=e.selectDataQa||t,this.dropdownContainer=n.createRef()}onBlur=e=>{if(this.dropdownContainer){let t=this.dropdownContainer.current;if(t&&t.contains(e.relatedTarget)&&!this.props.isInvalidStateControlled)return void this.props.setSelectState(()=>({isInvalid:!1}))}this.props.onBlur&&this.props.onBlur(e)};maybeRenderOptionsList(){let{selectState:e,setSelectState:t,renderOption:a,width:r,inputRef:i,ariaLabel:l,resultsInPopover:o,overlayClassName:s,offsetY:m,offsetX:u,onOptionSelected:p,className:h,classPrefix:_,optionsRowHeight:g,onOpen:y,emptyStateMessage:A,minOptionsListWidth:x,maxOptionsListHeight:C,isLoading:k,onOptionsListClose:v,onScrollablePage:S,enableLoadingState:I,autoClogProps:w,shouldAllowUnselectInSingleSelectMode:T,shouldOptionBeSelected:N,optionsListFooterBannerContent:M,includeWrapper:R=!0,popoverPlaceholderText:P}=this.props;if(o&&(!this.props.inputRef||!this.props.inputRef.current))return null;let L={key:`${e.selectId}-popover`};s&&(L.overlayClassName=s),m&&(L.offsetY=m),u&&(L.offsetX=u);let O=o?n.createElement(b.A,{selectState:e,setSelectState:t,renderOption:a,width:r,inputRef:i,ariaLabel:l,onOptionSelected:p,popoverProps:L,measurePopoverEventName:this.measurePopoverEventName,className:h,classPrefix:_,selectDataQa:this.fallbackDataQa,optionsRowHeight:g,onOpen:y,emptyStateMessage:A,minOptionsListWidth:x,maxListHeight:C,isLoading:k,onOptionsListClose:v,onScrollablePage:S,enableLoadingState:I,autoClogProps:w,dropdownContainer:this.dropdownContainer,shouldAllowUnselectInSingleSelectMode:T,shouldOptionBeSelected:N,footerBannerContent:M,includeWrapper:R,placeholderText:P}):n.createElement(f.Ay,{selectState:e,setSelectState:t,renderOption:a,width:r,inputRef:i,ariaLabel:l,onOptionSelected:p,classPrefix:_,selectDataQa:this.fallbackDataQa,emptyStateMessage:A,maxListHeight:C,optionsRowHeight:g,onOptionsListClose:v,enableLoadingState:I,shouldAllowUnselectInSingleSelectMode:T,shouldOptionBeSelected:N,footerBannerContent:M,includeWrapper:R});return n.createElement(d.A,{elementType:c.RJ.DROPDOWN,actionProps:E,autoClogProps:w},O)}render(){return n.createElement(s.Y.Consumer,null,e=>{let t,a,{renderSelectedOption:r,className:l,classPrefix:o,placeholderText:s,size:c,width:d,selectState:m,setSelectState:f,inputRef:b,focusOnMount:g,showDropdownIcon:y,isLoading:x,resultsInPopover:E,isDisabled:C,isRequired:k,onFocus:v,onEsc:S,ariaLabelledBy:I,ariaDescribedBy:w,inputIcon:T,maxCharacterLimit:N,onOptionsListClose:M,ariaLabel:R,expandOnClick:P,searchOnClick:L,autoClogProps:O,errors:D,hints:F,expandOnFocus:U,hideSelectedOptionOnDropdownOpen:B,retainPreviousSelectionOnDelete:H}=this.props,{isInvalid:W}=m,V=(0,A.A)(D,e),G=(0,A.A)(F,e);D&&(t=V?getIdsFromHintOrErrors(D):void 0),F&&(a=G?getIdsFromHintOrErrors(F):void 0);let q=(0,u.Yk)([w,t,a]),j=W||V;return n.createElement("div",{className:i()(l,"c-search-select"),"data-qa":this.fallbackDataQa},n.createElement(_.Ay,{selectState:{...m,isInvalid:j,isRequired:k,isDisabled:C},setSelectState:f,renderSelectedOption:r,placeholderText:s,size:c,width:d,selectDataQa:this.fallbackDataQa,inputRef:b,focusOnMount:g,showDropdownIcon:y,isLoading:x,resultsInPopover:E,measurePopoverEventName:E?this.measurePopoverEventName:void 0,classPrefix:o,onBlur:this.onBlur,onFocus:v,onEsc:S,"aria-label":R,ariaLabelledBy:I,ariaDescribedBy:q,icon:T,maxCharacterLimit:N,onOptionsListClose:M,expandOnClick:P,autoClogProps:O,searchOnClick:L,expandOnFocus:U,hideSelectedOptionOnDropdownOpen:B,retainPreviousSelectionOnDelete:H}),V&&D&&n.createElement(h.A,{errors:D}),G&&F&&F.map(({id:e,message:t,className:a})=>t&&n.createElement(p.A,{key:e,id:e,className:a},t)),this.maybeRenderOptionsList())})}};C.displayName="ControlledSearchSelect";let k=(0,g.A)(C),v=class extends n.Component{static defaultProps={autoClogProps:void 0,isDisabled:!1,isExpanded:!1,isInvalid:!1,isRequired:!0,errors:[],hints:[],filter:x.k,onOptionSelected:l.A,selectId:`search-select-${(0,u.r9)()}`,selectedOption:void 0,showConfirmDialog:void 0,inputIcon:void 0,maxCharacterLimit:void 0,inputRef:void 0};inputRef;constructor(e){super(e),this.state={filterQuery:"",displayQuery:"",options:e.options,selectId:e.selectId,isExpanded:e.isExpanded,isInvalid:e.isInvalid,isDisabled:e.isDisabled,selectedOption:e.selectedOption,shouldRefocusInputAfterSelection:e.shouldRefocusInputAfterSelection},this.inputRef=this.props.inputRef?this.props.inputRef:n.createRef(),(0,m.v)(this,["setSelectState"])}setSelectState(e,t){this.setState(t=>{let a=e(),{filter:n,options:r}=this.props;return void 0!==a.filterQuery&&a.filterQuery!==t.filterQuery&&n&&(a=n(r,a)),a},t)}render(){let{isRequired:e,isInvalid:t,isDisabled:a,showConfirmDialog:r}=this.props,i=r?k:C,l=(0,o.A)(()=>({...this.state,isInvalid:t,isRequired:e,isDisabled:a}));return n.createElement(i,{...this.props,selectState:l(),setSelectState:this.setSelectState,inputRef:this.inputRef})}};v.displayName="SearchSelect";let S=v},0xcc2c1a16:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x1407c6c2c),i=a(0x20482ad21),l=a(0x9f7220f0),o=a(0x210cf696f),s=a(0x2501a2cee);let c=new i.Ay("form_inputs"),MultiSelectErrorText=({onCtaClick:e,errorCopy:t,ctaCopy:a})=>{let i=(0,r.A)();return n.createElement("div",{className:"c-multi_select_helper_text"},n.createElement("span",{className:"c-multi_select_helper_text__icon_container c-multi_select_helper_text__icon_container--error"},n.createElement(s.Ah,{name:"warning",inline:!0})),n.createElement("span",null,n.createElement(l.z,{uuid:i,deferBy:100},t||c.t("Selected entries contain errors.")),n.createElement(o.A,{onClick:e,className:"margin_left_25"},a||c.t("Delete all errors"))))};MultiSelectErrorText.displayName="MultiSelectErrorText";let d=MultiSelectErrorText},0xb6f15b90:(e,t,a)=>{"use strict";a.d(t,{A:()=>R,Z:()=>M});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x162afc153),s=a(0x1feee1711),c=a(0x18f2150ea),d=a(0xca924ee1),m=a(0x220f8fb41),u=a(0x1229d92d),p=a(0x1c371dd8b),h=a(0xe874a88a),_=a(0xb97b797e),f=a(0x62a17882),b=a(0x1a256ff50),g=a(0x2343fde45),y=a(0x5896a0f9),A=a(0xb1ea448c),x=a(0x1aea0ac1b),E=a(0x2469ec64e),C=a(0x15f8e452a),k=a(0x11aaf59fe),v=a(0x2501a2cee),S=a(0x1d8fbce0b);let I={onChange:{action:m.lG.ENTER_TEXT}},w={onClick:{action:m.lG.CLICK}},T=Array(95).fill("").map((e,t)=>String.fromCharCode(t+32)),makeSpace=e=>n.createElement("span",{className:"c-multi_select_input__space",...e},"\xa0"),N={leading:!0,trailing:!1},M=class extends n.PureComponent{static defaultProps={inputRef:n.createRef(),maxHeight:96,placeholderText:void 0,onKeyDown:l.A,onKeyUp:l.A,size:k.hu.MEDIUM,width:300,isLoading:!1,classPrefix:void 0,selectDataQa:void 0,focusOnMount:!1,measurePopoverEventName:null,onSelectedItemsChange:l.A,onFilterQueryChange:l.A,onFilterQueryPaste:l.A,ariaLabelledBy:void 0,ariaLabel:void 0,expandOnFocus:!1,onTokenSelect:l.A,onInputFocused:l.A,forceRealName:void 0,onOptionsListClose:l.A,processOptions:e=>h.S.resolve(e),isTokenEditable:!1,hideFilterQueryOnBlur:!0,autoClogProps:void 0,customizeTokenProps:{},iconType:void 0,disableIdParsing:!1,hasKeyboardFocus:!1,onFocus:l.A,onBlur:l.A,onOptionsListClosedBlur:l.A,ignoreSelectAllTokensAfterMount:!1,throttleForceRenderSelectContainer:!1,forceRenderSelectContainerThrottleRate:1e3};caretPosInFilterQuery;ignoreSelectionChange;updateSelectionOnKeyUp;measurePopoverEvent;filterQueryRef;inputHeight;mouseDownOnToken;backspaceWasPressed;mutationObserver;leftArrowKeyWasPressed;shouldMoveCursorToFilterQuery;selectStateAfterMutation;updateQueryTimer;forceRenderSelectContainerThrottled;constructor(e){super(e),(0,_.v)(this,["onFocus","onF6","onBlur","onChange","onPaste","onKeyDown","onKeyUp","onInputContainerMouseDown","onFilterQueryMouseDown","onPlaceholderMouseDown","onSelectionChange","onCut","onMutation","onNodeRemoved","onNodeAdded","onCompositionStart","onCompositionEnd"]),this.state={composing:!1,focused:!1,selectContainerKey:Date.now(),isCurrentlyEditingToken:!1,editTokenIndex:0,ignoreSelectAllTokensAfterMount:e.ignoreSelectAllTokensAfterMount??!1},this.caretPosInFilterQuery=-1,this.ignoreSelectionChange=!1,this.updateSelectionOnKeyUp=!1,e.measurePopoverEventName&&(this.measurePopoverEvent=new Event(e.measurePopoverEventName)),this.forceRenderSelectContainerThrottled=(0,o.A)(this.forceRenderSelectContainer,e.forceRenderSelectContainerThrottleRate??1e3,N),this.filterQueryRef=n.createRef()}componentDidMount(){this.inputHeight=this.getInputHeight(),this.props.focusOnMount&&this.focus(),this.attachMutationObserver()}componentDidUpdate(e){let t=e.selectState,{selectState:a,onOptionsListClose:n,onTokenSelect:r,onSelectedItemsChange:i,setSelectState:l,hasKeyboardFocus:o,isTokenEditable:c}=this.props,{selectedOptions:d,isExpanded:m,isDisabled:u}=a,p=this.getSelectedTokenIndexes();if(this.doesMutationObserverExist()||(this.attachMutationObserver(),this.focus()),this.props.focusOnMount&&e.focusOnMount!==this.props.focusOnMount&&this.focus(),a.filterQuery?.length&&a.filterQuery!==t.filterQuery&&-1!==this.caretPosInFilterQuery&&this.updateCaretPosInFilterQuery(),this.possiblyRepositionOptionsList(t),this.haveSelectedTokens()&&!(0,b.Ay)(t.selectedTokenIndexes,p)&&d&&(p?.forEach(e=>{r&&r(d[e])}),m&&(l(()=>({isExpanded:!1})),n?.(!0)),this.scrollSelectedTokenIntoView()),t.isDisabled&&!u&&this.moveCursorAndScrollToFilterQuery(),!(0,b.Ay)(t.selectedOptions,d,3)){if(i&&void 0!==d){if(c){let{isCurrentlyEditingToken:e}=this.state;if((t.selectedOptions?.length||0)<d.length){if(e){let e=d.pop();e&&d.splice(this.state.editTokenIndex,0,e),this.setTokenState(!1,0)}}else e&&0===d.length&&this.setTokenState(!1,0)}i(d)}this.scrollFilterQueryIntoView()}this.inputHeight=this.getInputHeight(),o&&!e.hasKeyboardFocus&&(0,s.A)(a.activeRowIndex)&&!this.allTokensAreSelected()&&this.selectAllTokens()}componentWillUnmount(){this.doesMutationObserverExist()&&this.removeMutationObserver(),this.updateQueryTimer&&clearTimeout(this.updateQueryTimer),this.forceRenderSelectContainerThrottled.cancel&&this.forceRenderSelectContainerThrottled.cancel()}onBlur(e){let{selectState:t,setSelectState:a,hideFilterQueryOnBlur:n,onBlur:r,onOptionsListClosedBlur:i}=this.props,{selectedOptions:l,filterQuery:o,isExpanded:s}=t;this.setState(()=>({focused:!1})),this.deselectAllTokens(),n&&o&&!s&&a(()=>({filterQuery:""})),this.caretPosInFilterQuery=-1,this.mouseDownOnToken=!1,r&&r(e,l),!s&&i&&i()}onChange(){this.state.composing||this.onFilterQueryChanged()}setTokenState(e,t){this.props.isTokenEditable&&this.setState(()=>({isCurrentlyEditingToken:e,editTokenIndex:t}))}onFilterQueryChanged(){let{setSelectState:e,selectState:t,onFilterQueryChange:a}=this.props,n=this.filterQueryRef.current,r=n?.textContent,i=t.filterQuery!==r;if(this.backspaceWasPressed&&!i){this.backspaceWasPressed=!1;return}let l=!!r&&r.length>0;this.saveCaretPosInFilterQuery(),e(()=>({filterQuery:r,isExpanded:l})),a&&a(r)}onFocus(e){this.setState(()=>({focused:!0}));let{expandOnFocus:t,onInputFocused:a,setSelectState:n,onFocus:r}=this.props;t&&n(()=>({isExpanded:!0})),this.mouseDownOnToken||this.moveCursorAndScrollToFilterQuery(),a&&a(e),this.mouseDownOnToken=!1,r&&r(e)}onCaretSelectionChange(){this.isCaretOutSideFilterQuery()?this.updateCaretPosInFilterQuery():this.saveCaretPosInFilterQuery()}onRangeSelectionChange(){let e=this.props.windowRef.deref()?.getSelection(),t=e?.getRangeAt(0),a=this.getTokensAsArray(),{selectState:n}=this.props,{filterQuery:r}=n,i=a.reduce((t,a,n)=>e?.containsNode(a)?[...t,n]:t,[]),l=i.length>0;if(!r&&!l&&!e?.isCollapsed){this.ignoreSelectionChange=!0,e?.collapseToEnd();return}if(this.isEntireFilterQuerySelected()&&!l){this.ignoreSelectionChange=!0,t?.setStartBefore(this.filterQueryRef.current?.firstChild);return}let o=i[0],s=i[i.length-1],c=a[o],d=a[s];if(!r&&l){this.ignoreSelectionChange=!0,t?.setStartBefore(c),this.ignoreSelectionChange=!0,t?.setEndAfter(d),this.setSelectedTokenIndexes(i);return}this.isEntireFilterQuerySelected()&&l&&(this.ignoreSelectionChange=!0,t?.setStartBefore(c),this.setSelectedTokenIndexes(i))}onSelectionChange(){if(this.ignoreSelectionChange){this.ignoreSelectionChange=!1;return}let e=this.props.windowRef.deref()?.getSelection(),t=null;if(e){let{type:a}=e;t=a}"Caret"===t&&this.onCaretSelectionChange(),"Range"===t&&this.onRangeSelectionChange()}onKeyDown(e){if(this.state.composing)return;let{key:t,keyCode:a,ctrlKey:n,metaKey:r,altKey:i,shiftKey:l}=e,{selectState:o,onKeyDown:s}=this.props,d=(0,f.cX)()?r:n,m="Delete"===t&&((0,f.cX)()&&i||(0,f.uF)()&&d);("Backspace"===t||m)&&this.onBackspace(e),m||"Delete"!==t||this.onDelete(e),"Escape"===t&&this.onEscape(e),("Home"===t||r&&!l&&"ArrowLeft"===t||r&&!l&&"ArrowUp"===t)&&this.onHome(e),("End"===t||r&&!l&&"ArrowRight"===t||r&&!l&&"ArrowDown"===t)&&this.onEnd(e),r||"ArrowLeft"!==t||this.leftArrowKeyWasPressed||(this.leftArrowKeyWasPressed=!0,this.onLeftArrow(e)),r||"ArrowRight"!==t||this.onRightArrow(e),"Tab"===t&&this.onTab(e),("ArrowUp"===t||"ArrowDown"===t)&&e.preventDefault(),"Enter"===t&&e.preventDefault(),!d&&T.includes(t)&&this.onCharacterKey(),(0,y.A)(a,r,n)&&this.onF6(),s&&s(e,{hasActiveRowIndex:(0,c.A)(o.activeRowIndex),isExpanded:!!o.isExpanded})}onHome(e){e.preventDefault();let{selectState:t}=this.props,{selectedOptions:a}=t;a?.length?this.setSelectedTokenIndexes([0],{initiator:e.type}):this.moveCursorToFilterQuery({cursorAtStart:!0})}onEnd(e){e.preventDefault();let{selectState:t}=this.props,{selectedTokenIndexes:a}=t;a?.length&&this.deselectAllTokens(),this.moveCursorAndScrollToFilterQuery()}onKeyUp(e){let{selectState:t,onKeyUp:a}=this.props,n=this.getSelectedTokenIndexes(),r=this.getTokensAsArray();this.shouldMoveCursorToFilterQuery&&(this.moveCursorToFilterQuery({cursorAtStart:!0}),this.shouldMoveCursorToFilterQuery=!1),this.updateSelectionOnKeyUp&&n?.length&&(this.selectTextInNode(r[n[0]]),this.updateSelectionOnKeyUp=!1),this.leftArrowKeyWasPressed&&(this.leftArrowKeyWasPressed=!1),a&&a(e,{hasActiveRowIndex:(0,c.A)(t.activeRowIndex)})}onInputContainerMouseDown(e){e.preventDefault(),this.haveSelectedTokens()&&this.deselectAllTokens(),this.state.focused?this.moveCursorAndScrollToFilterQuery(!1):this.focus()}onPaste(e){if(!e||!e.clipboardData)return;let{onPaste:t,selectState:a}=this.props,{filterQuery:n}=a,{onFilterQueryPaste:r,setSelectState:i}=this.props;if(e.preventDefault(),t&&!t(e))return;let l=e.clipboardData.getData("text"),o=this.caretPosInFilterQuery||0,s=n||"",c=n?.length||0,d=o<=c?o:c,m=s.slice(0,d)+l+s.slice(d),u=m.length>0;i(()=>({filterQuery:m,isExpanded:u})),r&&r(e)}onCharacterKey(){if(!this.haveSelectedTokens())return;let{setSelectState:e}=this.props,{selectState:t}=this.props,{filterQuery:a,selectedOptions:n}=t,r=this.getSelectedTokenIndexes(),i=n?.filter((e,t)=>r?.indexOf(t)===-1),l=this.getSelectedFilterQueryText(),o=a?.replace(l,"");e(()=>({selectedOptions:i,selectedTokenIndexes:[],filterQuery:o})),this.moveCursorToFilterQuery()}onBackspace(e){let{setSelectState:t}=this.props,{selectState:a,isTokenEditable:n}=this.props,{filterQuery:r}=a;if(this.ignoreSelectionChange=!0,this.allTokensAreSelected()&&(this.isEntireFilterQuerySelected()||!r)){e.preventDefault(),t(()=>({selectedOptions:[],selectedTokenIndexes:[],filterQuery:"",isExpanded:!1}));return}if(n&&r?.length===1){e.preventDefault(),t(()=>({filterQuery:"",isExpanded:!1})),this.setTokenState(!1,0),this.moveCursorToFilterQuery();return}if(this.isEntireFilterQuerySelected()){e.preventDefault(),t(()=>({filterQuery:"",isExpanded:!1}));return}let i=this.getTokensAsArray().length,l=this.getSelectedTokenIndexes(),o=this.isCaretAtStartOfFilterQuery();if(this.backspaceWasPressed=!0,o&&0===i)return void e.preventDefault();if(!o&&!this.haveSelectedTokens()&&r)return;if(e.preventDefault(),!this.haveSelectedTokens())return void this.setSelectedTokenIndexes([i-1],{initiator:e.type});l?.forEach(e=>{this.removeToken(e,"backspaceKey")});let s=l&&l[0],c=null;s&&(c=0===s?[0]:[s-1]),c?.length&&this.setSelectedTokenIndexes(c,{initiator:e.type})}onDelete(e){let{setSelectState:t}=this.props;if(this.ignoreSelectionChange=!0,this.isEntireFilterQuerySelected()){e.preventDefault(),t(()=>({filterQuery:"",isExpanded:!1}));return}let a=this.getTokensAsArray().length,n=this.getSelectedTokenIndexes();if(0===a||!this.haveSelectedTokens()||(e.preventDefault(),n?.forEach(e=>{this.removeToken(e,"deleteKey")}),!n?.length))return;let r=n[n.length-1],i=n?.length===a;(r===a-1||i)&&(this.moveCursorToFilterQuery({cursorAtStart:!0}),this.deselectAllTokens())}onF6(){let{selectState:e,setSelectState:t,onOptionsListClose:a}=this.props;e.isExpanded&&(a&&a(),this.setState(()=>({focused:!1})),t(()=>({isExpanded:!1})))}onEscape(e){let{selectState:t,setSelectState:a,onOptionsListClose:n}=this.props;t.isExpanded&&(e.stopPropagation(),n&&n(),a(()=>({isExpanded:!1})))}onLeftArrow(e){let t=this.getTokensAsArray().length,a=this.getSelectedTokenIndexes(),n=a?.length&&a[0],r=this.props.windowRef.deref()?.getSelection(),i=null,l=null;if(r){let{type:e,anchorOffset:t}=r;i=e,l=t}let o="Caret"===i,s="Range"===i;if(e.shiftKey&&s&&this.isRangeSelectionOfFilterQueryComplete(l))return void e.preventDefault();let c=o&&this.isCaretAtStartOfFilterQuery();0===t&&c?e.preventDefault():0===t||(this.props.isTokenEditable&&this.state.isCurrentlyEditingToken&&c?e.preventDefault():this.allTokensAreSelected()?this.setSelectedTokenIndexes([0],{initiator:e.type}):!this.haveSelectedTokens()&&c?this.setSelectedTokenIndexes([t-1],{initiator:e.type}):s&&this.haveSelectedTokens()&&0===n?e.preventDefault():this.haveSelectedTokens()&&"number"==typeof n&&this.setSelectedTokenIndexes([n-1],{initiator:e.type}))}onRightArrow(e){let t=this.props.windowRef.deref()?.getSelection(),a=t?.type==="Range",n=this.getTokensAsArray().length,r=this.getSelectedTokenIndexes(),i=r?.length&&r[0];if("number"==typeof i){if(!(a&&this.haveSelectedTokens()&&i<n-1)&&this.haveSelectedTokens()||this.allTokensAreSelected()){e.preventDefault(),this.shouldMoveCursorToFilterQuery=!0,this.deselectAllTokens();return}this.haveSelectedTokens()&&"number"==typeof i&&this.setSelectedTokenIndexes([i+1],{initiator:e.type})}}onTab(e){let{shiftKey:t}=e,{expandOnFocus:a,selectState:n,onOptionsListClose:r,setSelectState:i,disableCloseOnTab:l}=this.props;!l&&(r&&r(),(t||a&&(0,s.A)(n.activeRowIndex))&&i(()=>({isExpanded:!1})))}onTokenMouseDown(e,t){let{focused:a,isCurrentlyEditingToken:n}=this.state,{selectState:r,isTokenEditable:i}=this.props;if(r.isDisabled)return;if(e.preventDefault(),this.mouseDownOnToken=!0,e.stopPropagation(),i&&!n)return void this.onTokenEdit(t);a||this.focus();let l=this.getTokensAsArray();this.selectTextInNode(l[t]);let o=this.getSelectedTokenIndexes();t!==o?.[0]&&this.setSelectedTokenIndexes([t])}onTokenEdit(e){let{selectState:t,setSelectState:a,processOptions:n}=this.props,{selectedOptions:r}=t;this.setTokenState(!0,e);let i="";r&&r[e]&&(i="string"==typeof r[e].label&&r[e].label!==r[e].value?r[e].label:r[e].value),this.removeToken(e,"editToken"),this.updateFilterQueryValue(i),n&&n([],i).then(e=>{a(()=>({isExpanded:!0,options:e,filterQuery:i}))})}onTokenRemoveMouseDown(e,t){let{focused:a,isCurrentlyEditingToken:n,editTokenIndex:r}=this.state;e.preventDefault(),this.mouseDownOnToken=!0,e.stopPropagation(),a||this.focus(),this.moveCursorToFilterQuery(),this.props.isTokenEditable&&n&&t<r&&this.setTokenState(!0,r-1),this.removeToken(t,"iconClick")}onFilterQueryMouseDown(e){this.state.focused&&this.filterQueryRef.current?.textContent&&e.stopPropagation(),this.haveSelectedTokens()&&this.deselectAllTokens()}updateFilterQueryValue(e){let{onFilterQueryChange:t}=this.props;this.updateQueryTimer=setTimeout(()=>{t&&t(e),this.moveCursorToFilterQuery(),clearTimeout(this.updateQueryTimer)})}onPlaceholderMouseDown(){this.focus()}onSelectAll(e){let{setSelectState:t}=this.props;e.preventDefault(),t(()=>({selectedTokenIndexes:[],isExpanded:!1}));let a=this.filterQueryRef?.current;a?.textContent&&this.selectTextInNode(a)}onCompositionStart(){this.setState(()=>({composing:!0}))}onCompositionEnd(){this.setState(()=>({composing:!1})),this.onFilterQueryChanged()}onCut(){let{selectState:e}=this.props,{filterQuery:t,selectedOptions:a}=e,n=this.getSelectedTokenIndexes(),r=a?.filter((e,t)=>n?.indexOf(t)===-1),i=this.getSelectedFilterQueryText(),l=t?.replace(i,"");this.selectStateAfterMutation={selectedTokenIndexes:[],selectedOptions:r,filterQuery:l,isExpanded:!1}}onNodeAdded(e){let{nodeName:t}=e;("B"===t||"I"===t)&&(this.removeMutationObserver(),this.runForceRenderSelectContainer())}onNodeRemoved(e){let{setSelectState:t}=this.props;if(this.selectStateAfterMutation){this.caretPosInFilterQuery=0,this.removeMutationObserver(),this.runForceRenderSelectContainer(!0),t(()=>this.selectStateAfterMutation),this.selectStateAfterMutation=null;return}e===this.filterQueryRef.current&&(this.removeMutationObserver(),this.runForceRenderSelectContainer(!0))}onMutation(e){e.forEach(e=>{e.addedNodes.forEach(this.onNodeAdded),e.removedNodes.forEach(this.onNodeRemoved)})}getOptionsListboxHtmlId(){return(0,E.Es)(this.props.selectState.selectId??"","listbox")}getAriaPlaceholderText(){let{selectState:e,placeholderText:t}=this.props,{filterQuery:a,selectedOptions:n}=e;if(!a&&(!n||!(n.length>0)))return t}getAriaActiveDescendant(){let{selectState:e}=this.props,{selectId:t,activeRowIndex:a}=e;return(0,c.A)(a)?(0,E.Es)(t,`option_${a}`):void 0}getInputHeight(){let{inputRef:e}=this.props,t=e?.current;return t?t.offsetHeight:null}getTokensAsArray(){let e=this.props.inputRef?.current?.querySelectorAll(".c-token");return Array.prototype.slice.call(e)}getSelectedFilterQueryText(){let{selectState:e}=this.props,{filterQuery:t}=e;if(t?.length===0)return"";let a=this.props.windowRef.deref()?.getSelection(),n=a?.toString();if(!a?.containsNode(this.filterQueryRef.current,!0))return"";let r=n?.split(`
`);return r?.length?r[r.length-1].trim():""}setSelectedTokenIndexes(e,{initiator:t}={}){"keydown"===t&&(this.updateSelectionOnKeyUp=!0,this.ignoreSelectionChange=!0);let{setSelectState:a}=this.props;a(()=>({selectedTokenIndexes:e}))}getSelectedTokenIndexes(){let{selectState:e}=this.props,{selectedTokenIndexes:t}=e;return t||[]}allTokensAreSelected(){let e=this.getSelectedTokenIndexes(),t=this.getTokensAsArray();return!!e?.length&&e.length>0&&e.length===t.length}attachMutationObserver(){this.mutationObserver=new MutationObserver(this.onMutation),this.props.inputRef?.current&&this.mutationObserver.observe(this.props.inputRef?.current,{subtree:!0,childList:!0})}deselectAllTokens(){this.setSelectedTokenIndexes([])}determineCaretPosInFilterQuery(){let{selectState:e}=this.props,{filterQuery:t}=e;if(-1===this.caretPosInFilterQuery||!t)return 0;let a=t?.length;return"number"==typeof this.caretPosInFilterQuery&&this.caretPosInFilterQuery>a?a:this.caretPosInFilterQuery}doesMutationObserverExist(){return!!this.mutationObserver}removeMutationObserver(){this.mutationObserver?.disconnect(),this.mutationObserver=null}focus(){let e=this.props.inputRef?.current;e?.focus()}forceRenderSelectContainer(){this.setState(()=>({selectContainerKey:Date.now()}))}runForceRenderSelectContainer(e){let{isLoading:t,throttleForceRenderSelectContainer:a}=this.props;a?(e&&this.forceRenderSelectContainerThrottled.cancel&&this.forceRenderSelectContainerThrottled.cancel(),t||this.forceRenderSelectContainerThrottled()):this.forceRenderSelectContainer()}haveSelectedTokens(){return!!this.getSelectedTokenIndexes()?.length}isCaretAtStartOfFilterQuery(){if(this.isCaretOutSideFilterQuery())return!1;let{selectState:e}=this.props,{filterQuery:t}=e;if(!t)return!0;let a=this.props.windowRef.deref()?.getSelection(),n=null;if(a){let{anchorOffset:e}=a;n=e}return 0===n}isCaretOutSideFilterQuery(){let e=this.props.windowRef.deref()?.getSelection(),t=null;if(e){let{anchorNode:a}=e;t=a}return!this.filterQueryRef.current?.contains(t)}isRangeSelectionOfFilterQueryComplete(e){let t=this.getSelectedFilterQueryText();if(!t)return!1;let{selectState:a}=this.props,n=a.filterQuery;return!!n&&!!e&&t.substr(0,e)===n?.substr(0,e)}isEntireFilterQuerySelected(){let{selectState:e}=this.props,t=this.getSelectedFilterQueryText();return!!t&&t===e.filterQuery}moveCursorAndScrollToFilterQuery(e=!0){this.scrollFilterQueryIntoView(e),this.moveCursorToFilterQuery()}moveCursorToFilterQuery({cursorAtStart:e}={cursorAtStart:!1}){let t=document.createRange(),a=this.props.windowRef.deref()?.getSelection();a?.removeAllRanges();let n=this.filterQueryRef?.current,r=n?.firstChild||n,i=e?0:n?.textContent?.trim()?.length;null!==r&&"number"==typeof i&&t.setStart(r,i),t.collapse(!0),a?.addRange(t)}possiblyRepositionOptionsList(e){if(!this.measurePopoverEvent)return;let{selectState:t}=this.props,a=t.isExpanded&&!e.isExpanded,n=this.getInputHeight(),r=this.inputHeight!==n;(a||r)&&this.props.windowRef.deref()?.dispatchEvent(this.measurePopoverEvent)}removeToken(e,t){let{selectState:a,setSelectState:n,isTokenEditable:r}=this.props,{selectedOptions:i,pendingQueries:l,filterQuery:o}=a,s=l?l.length:0,c=i&&i[e]&&i[e].queryId,d=c&&s?l?.filter(({queryId:e})=>e!==c):l;n(()=>({selectedOptions:i?.filter((t,a)=>a!==e),selectedTokenIndexes:[],removalInitiator:t,removedItemIndex:e,pendingQueries:d})),r&&this.state.isCurrentlyEditingToken&&this.updateFilterQueryValue(o)}saveCaretPosInFilterQuery(){let e=this.props.windowRef.deref()?.getSelection();this.caretPosInFilterQuery=e?.anchorOffset}scrollFilterQueryIntoView(e=!0){let t=this.filterQueryRef.current;t&&(e||t.textContent)&&t?.scrollIntoView&&t?.scrollIntoView({block:"nearest"})}scrollSelectedTokenIntoView(){let e=this.getSelectedTokenIndexes();if(!this.haveSelectedTokens())return;let t=this.getTokensAsArray();if(!e?.length)return;let a=t[e[e.length-1]];!a||a.scrollIntoView&&a.scrollIntoView({block:"nearest"})}selectAllTokens(){if(this.state.ignoreSelectAllTokensAfterMount)return void this.setState(()=>({ignoreSelectAllTokensAfterMount:!1}));let e=this.getTokensAsArray();if(0===e.length)return;let t=e[0],a=e[e.length-1],n=this.props.windowRef.deref()?.getSelection(),r=document.createRange();n?.removeAllRanges(),r.setStartBefore(t),r.setEndAfter(a),n?.addRange(r)}selectTextInNode(e){if(!e)return;let t=this.props.windowRef.deref()?.getSelection(),a=document.createRange();this.ignoreSelectionChange=!0,t?.removeAllRanges();let n=(0,f.cX)()?e:e.querySelector(".c-token__content");a.selectNode(n),this.ignoreSelectionChange=!0,t?.addRange(a)}updateCaretPosInFilterQuery(){let e=this.filterQueryRef?.current;if(!e)return;let t=document.createRange(),a=this.props.windowRef.deref()?.getSelection();a?.removeAllRanges();let n=this.determineCaretPosInFilterQuery();"number"==typeof n&&t.setStart(e?.firstChild||e,n),t.collapse(!0),a?.addRange(t)}renderFilterQuery(){let{selectState:e,isTokenEditable:t,size:a}=this.props,{filterQuery:r,isDisabled:l}=e,{isCurrentlyEditingToken:o,editTokenIndex:s}=this.state,c=l?void 0:this.onFilterQueryMouseDown,d=i()({"c-multi_select_input__filter_query":!0,[`c-multi_select_input__${a}_filter_query--edit`]:t&&o});return n.createElement("span",{className:d,ref:this.filterQueryRef,onMouseDown:c,key:s},r)}renderInput(){let{selectState:e,selectDataQa:t,inputRef:a,ariaLabelledBy:r,ariaLabel:l,autoClogProps:o,iconType:s,isTokenEditable:c}=this.props,{selectId:d,isDisabled:u,isExpanded:h,isInvalid:_}=e,f=u?void 0:this.getAriaActiveDescendant(),b=!u,g=u?void 0:this.onFocus,y=u?void 0:this.onBlur,A=u?void 0:this.onChange,x=u?void 0:this.onPaste,E=u?void 0:this.onKeyDown,C=u?void 0:this.onKeyUp,k=u?void 0:this.onSelectionChange,v=u?void 0:this.onCut,S=u?void 0:this.onCompositionStart,w=u?void 0:this.onCompositionEnd,T=i()({"c-multi_select_input__input":!0,"c-multi_select_input__input--with-icon":!!s}),N=n.createElement("div",{role:"combobox","aria-disabled":u,"aria-autocomplete":"list","aria-expanded":h,"aria-controls":this.getOptionsListboxHtmlId(),"aria-activedescendant":f,"aria-labelledby":r,"aria-label":l,"aria-placeholder":this.getAriaPlaceholderText(),"aria-invalid":_,id:d,className:T,tabIndex:u?void 0:0,contentEditable:b,suppressContentEditableWarning:b,"data-qa":t?`${t}-input`:void 0,ref:a,onFocus:g,onBlur:y,onInput:A,onCompositionStart:S,onCompositionEnd:w,onPaste:x,onKeyDown:E,onKeyUp:C,onSelect:k,onCut:v,"aria-multiline":!1},makeSpace(),c&&this.state.isCurrentlyEditingToken?this.renderEditableTokens():n.createElement(n.Fragment,null,this.renderTokens(),this.renderFilterQuery()),makeSpace({contentEditable:!1}));return o?n.createElement(p.A,{autoClogProps:o,actionProps:I,elementType:m.RJ.INPUT},N):N}renderLoadingIndicator(){let{isLoading:e,size:t}=this.props;return e?n.createElement(A.A,{className:"c-multi_select_input__spinner",color:"blue",size:t===k.hu.LARGE?k.hu.LARGE:k.hu.MEDIUM}):null}renderPlaceholder(){let{selectState:e,placeholderText:t,iconType:a}=this.props,{filterQuery:r,selectedOptions:l,isDisabled:o}=e;if(this.state.composing||r||l&&l.length>0)return null;let s=o?void 0:this.onPlaceholderMouseDown,c=i()({"c-multi_select_input__placeholder":!0,"c-multi_select_input__placeholder--with-icon":!!a});return n.createElement("div",{"aria-hidden":"true",className:c,onMouseDown:s},t)}renderToken({icon:e,svgIcon:t,value:a,label:r,hoverText:i,isLoading:l,isError:o,isMemberError:s,isTeamError:c,isUnknown:d,emailTeam:m},u){let{forceRealName:p,size:h,selectState:_,customizeTokenProps:f,disableIdParsing:b,allowFileToken:g}=this.props,y=this.getSelectedTokenIndexes(),A=y?.indexOf(u)!==-1,{isDisabled:x,restrictedSelectedTokenIndexes:E,disabledSelectedTokenIndexes:C,invalidSelectedTokenIndexes:k}=_,v=!!E&&E?.indexOf(u)!==-1,S=!!C&&C?.indexOf(u)!==-1,I=!!k&&k?.indexOf(u)!==-1,w=x||S,T=w?void 0:e=>this.onTokenMouseDown(e,u),N=w?void 0:()=>this.renderTokenRemoveIcon(u),M=this.props.tokenComponent;return n.createElement(n.Fragment,null,n.createElement(M,{"data-qa":"multi_select_token_wrapper",className:"c-multi_select_input__token",...T?{onMouseDown:T}:{},isDisabled:w,label:r,hoverText:i,isLoading:l,isError:o,isMemberError:s,isTeamError:c,isUnknown:d,...h?{size:h}:{},isSelected:A,...N?{renderIcon:N}:{},icon:e,svgIcon:t,tabIndex:-1,contentEditable:!1,...f,entityId:a,forceRealName:p,disableIdParsing:b,...m?{emailTeam:m}:{},isRestricted:v,isInvalid:I,allowFileToken:g}),"\xa0")}renderTokenRemoveIcon(e){return n.createElement(p.A,{actionProps:w,elementType:m.RJ.BUTTON},n.createElement("span",{className:"c-multi_select_input__remove_token","data-qa":"token_remove_icon",onMouseDown:(0,d.A)(t=>{this.onTokenRemoveMouseDown(t,e)})},n.createElement(v.Ah,{name:"close"})))}renderTokens(){let{selectedOptions:e}=this.props.selectState;return e?.map((e,t)=>{let a=e.label,r=e.value;return n.createElement(n.Fragment,{key:e.key||r},this.renderToken({...e,label:a,value:r},t))})}renderEditableTokens(){let{isCurrentlyEditingToken:e,editTokenIndex:t}=this.state,a=this.renderTokens()||[],n=this.renderFilterQuery();return e?a.splice(t,0,n):a?.push(n),a}renderIcon(){let{iconType:e}=this.props;return e?n.createElement(C.A,{type:e,inline:!0}):null}render(){let{maxHeight:e,width:t,selectState:a,classPrefix:r,size:l}=this.props,{isDisabled:o,isInvalid:s,selectedOptions:c}=a,d=c?.length,m=i()("c-multi_select_input",{"c-multi_select_input--disabled":o,"c-multi_select_input--focused":this.state.focused&&!o,"c-multi_select_input--large":l===k.hu.LARGE,"c-multi_select_input--invalid":s,"c-multi_select_input--initial":!d,[`${r}__multi_select_input`]:r,[x.E.large]:l===k.hu.LARGE}),u=o?void 0:this.onInputContainerMouseDown;return n.createElement("div",{className:m,style:{width:t,maxHeight:e},onMouseDown:u,key:this.state.selectContainerKey},this.renderIcon(),this.renderInput(),this.renderLoadingIndicator(),this.renderPlaceholder())}};M.displayName="MultiSelectInput";let R=(0,S.v)((0,u.A)((0,g.A)(M)))},0x1c2f8d9ec:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb1ea448c);let l=new r.Ay("form_inputs"),__WEBPACK_DEFAULT_EXPORT__=({count:e,clientTheme:t,spinnerSize:a="large"})=>n.createElement("div",{className:"c-multi_select_helper_text c-multi_select_helper_text--loading"},n.createElement("span",{className:"c-multi_select_helper_text__icon_container"},n.createElement(i.A,{color:"dark"===t?"white":"blue",size:a,inline:!0})),l.t("Loading {count, plural, =1 {# entry} other {# entries}}",{count:e}))},0xcc619422:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x1407c6c2c),i=a(0x20482ad21),l=a(0x9f7220f0),o=a(0x2501a2cee);let s=new i.Ay("form_inputs"),MultiSelectUnknownText=({count:e})=>{let t=(0,r.A)();return n.createElement("div",{className:"c-multi_select_helper_text"},n.createElement("span",{className:"c-multi_select_helper_text__icon_container c-multi_select_helper_text__icon_container--unknown"},n.createElement(o.Ah,{name:"emoji-missing-filled",inline:!0})),n.createElement(l.z,{uuid:`${t}-${e}`,deferBy:100},s.t("{count, plural, =1 {# entry has} other {# entries have}} multiple matches. Select entry to resolve.",{count:e})))};MultiSelectUnknownText.displayName="MultiSelectUnknownText";let c=MultiSelectUnknownText},0x1bdc66740:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x18f2150ea),s=a(0x14fad6485),c=a(0xb97b797e),d=a(0x62a17882),m=a(0x20482ad21),u=a(0xbd195de6),p=a(0xb1ea448c),h=a(0x2469ec64e),_=a(0x126f22530),f=a(0x10598eeca),b=a(0x11aaf59fe),g=a(0x2501a2cee);let y=new m.Ay("select"),A={ArrowLeft:!0,ArrowRight:!0},x={ArrowUp:!0,ArrowDown:!0},E={Backspace:!0,Delete:!0},C=class extends n.Component{static defaultProps={autoClogProps:void 0,inputRef:null,onClick:l.A,placeholderText:void 0,width:360,selectDataQa:void 0,showDropdownIcon:!0,icon:void 0,maxCharacterLimit:void 0,focusOnMount:!1,isLoading:!1,classPrefix:void 0,onFocus:l.A,onBlur:l.A,onEsc:l.A,resultsInPopover:!0,ariaLabelledBy:void 0,ariaDescribedBy:void 0,onOptionsListClose:l.A,expandOnClick:!0,searchOnClick:!1,expandOnFocus:!0,hideSelectedOptionOnDropdownOpen:!0};selectInputRef;backspaceOrDeletePressed;measurePopoverEvent;blurTimeout;static contextType=s._0;constructor(e){super(e),(0,c.v)(this,["onClick","onFocus","onBlur","onUpOrDownPressed","onKeyPressedEnter","onKeyPressedEscape","onKeyPressedTab","onWrapperKeyDown","onInputKeyDown","onInputChanged","showOptionsList","updateOptionsListPosition"]),this.selectInputRef=n.createRef(),this.backspaceOrDeletePressed=!1,this.measurePopoverEvent=void 0,this.blurTimeout=void 0,this.state={hasFocus:!1,focusedViaMouse:!1,cursorVisible:!1},e.measurePopoverEventName&&(this.measurePopoverEvent=new Event(e.measurePopoverEventName))}componentDidMount(){let{inputRef:e,focusOnMount:t,expandOnFocus:a}=this.props,n=e&&e.current;t&&(!this.state.hasFocus&&n&&n.focus(),a&&this.showOptionsList())}componentDidUpdate(e,t){let{inputRef:a,selectState:n,focusOnMount:r}=this.props,{selectedOption:i}=n,{selectState:l}=e,{selectedOption:o}=l,s=a&&a.current,{hasFocus:c,focusedViaMouse:m}=this.state,u=!(0,d.cX)()||!this.shouldShowStaticInputContent();i&&c&&!m&&(i!==o||!t.hasFocus)&&u&&setTimeout(()=>{s?.select()},50),r&&e.focusOnMount!==r&&!this.state.hasFocus&&s?.focus()}componentWillUnmount(){this.blurTimeout&&clearTimeout(this.blurTimeout)}onClick(e){let{inputRef:t,selectState:a,onClick:n,expandOnClick:r,searchOnClick:i}=this.props,{isDisabled:l,isExpanded:o,selectedOption:s}=a;if(l)return;let c=t&&t.current;this.state.hasFocus||(this.setState(()=>({focusedViaMouse:!0})),c?.focus()),(r||s)&&!o&&this.showOptionsList({searchOnClick:i}),n&&n(e)}onBlur(e){let{onBlur:t}=this.props;this.setState(()=>({hasFocus:!1,focusedViaMouse:!1,cursorVisible:!1}),()=>{t&&t(e)})}onFocus(e){let{onFocus:t}=this.props;this.setState(()=>({hasFocus:!0}),()=>{t&&t(e)})}onInputChanged(e){let{selectState:t,setSelectState:a,expandOnClick:n,retainPreviousSelectionOnDelete:r}=this.props,{isExpanded:i,selectedOption:l}=t;this.backspaceOrDeletePressed&&0===e.length&&l?a(()=>({filterQuery:e,displayQuery:e,...r?{}:{selectedOption:null}})):(i?n||e||a(()=>({isExpanded:!1})):this.showOptionsList(),a(()=>({filterQuery:e,displayQuery:e})))}onKeyPressedEnter(e){this.props.selectState.isExpanded?e.preventDefault():(this.showOptionsList(),e.stopPropagation())}onKeyPressedEscape(e){let{selectState:t,setSelectState:a,resultsInPopover:n,onEsc:r,onOptionsListClose:i}=this.props;t.isExpanded&&n&&(e.stopPropagation(),e?.nativeEvent.stopImmediatePropagation(),r&&r(),i&&i(),a(()=>({isExpanded:!1})))}onKeyPressedTab(){let{setSelectState:e,onOptionsListClose:t,selectState:a}=this.props;t&&t();let{activeRowIndex:n,initialActiveOption:r}=a;"number"==typeof n||r||e(()=>({isExpanded:!1}))}onUpOrDownPressed(e){e.preventDefault(),this.props.selectState.isExpanded||(this.showOptionsList(),e.stopPropagation())}onWrapperKeyDown(e){let{key:t}=e;x[t]?this.onUpOrDownPressed(e):"Enter"===t?this.onKeyPressedEnter(e):"Escape"===t?this.onKeyPressedEscape(e):"Tab"===t&&this.onKeyPressedTab()}onInputKeyDown(e){let{key:t}=e,a=E[t],n=A[t],r=a||n||(0,u.A)(e);this.setState(()=>({cursorVisible:r})),this.backspaceOrDeletePressed=a}maybeRenderIconOrLoading(){let{showDropdownIcon:e,isLoading:t,size:a,expandOnClick:r}=this.props;return t?n.createElement(p.A,{className:"c-select_input__spinner",color:"blue",size:a===b.hu.LARGE?"large":"medium"}):e&&r?n.createElement("span",{className:"c-select_input__icon"},n.createElement(g.Ah,{name:"caret-down",size:"20"})):null}showOptionsList(e={}){let{searchOnClick:t}=e;this.updateOptionsListPosition(),this.props.setSelectState(()=>({isExpanded:!0,searchOnClick:t}))}updateOptionsListPosition(){let{selectState:e}=this.props,{isExpanded:t}=e;!t&&this.measurePopoverEvent&&this.context.windowRef.deref()?.dispatchEvent(this.measurePopoverEvent)}shouldShowStaticInputContent(){let{selectState:e,hideSelectedOptionOnDropdownOpen:t}=this.props,{isExpanded:a,selectedOption:n,filterQuery:r}=e;return!this.state.cursorVisible&&!!n&&(!a||!t&&!r)}renderInputContent(){let{selectState:e,renderSelectedOption:t,classPrefix:a,selectDataQa:r}=this.props,{selectedOption:l}=e;if(!this.shouldShowStaticInputContent())return null;let o=i()("c-select_input__content",{[`${a}__select_input_content`]:a});return n.createElement("div",{className:o,"data-qa":r?`${r}-input-content`:null},n.createElement("span",{className:"c-select_input__content_text"},t&&t(l)))}getOptionsListboxHtmlId(){return(0,h.Es)(this.props.selectState.selectId??"","listbox")}renderTextInput(){let e,{selectDataQa:t,inputRef:a,classPrefix:r,ariaLabelledBy:l,ariaDescribedBy:s,icon:c,maxCharacterLimit:d,size:m,selectState:u,autoClogProps:p,hideSelectedOptionOnDropdownOpen:b}=this.props,{activeRowIndex:g,filterQuery:A,isDisabled:x,isExpanded:E,isInvalid:C,isRequired:k,selectedOption:v,selectId:S=""}=u;e=A||!E&&v||v&&E&&!b?null:this.props.placeholderText||y.t("Please select an option");let I=E&&(0,o.A)(g)?(0,h.Es)(S,`option_${g}`):null,w=!this.state.cursorVisible&&v&&!E,T=i()("c-select_input",{"c-select_input--offscreen":w,"c-select_input--invalid":C,[`${r}__select_input`]:r}),N=(0,h.Yk)([s,(0,h.Es)(S,"initial-focus")]),M=!this.state.focusedViaMouse&&this.state.hasFocus&&!this.state.cursorVisible&&b?A||v&&v.label:A,R={spellCheck:!1,className:T,id:S,name:S,"aria-activedescendant":I,"aria-autocomplete":"list","aria-expanded":E,"aria-controls":this.getOptionsListboxHtmlId(),"aria-required":k,"aria-label":this.props["aria-label"],"aria-labelledby":l,"aria-describedby":N,isInvalid:C,autoComplete:"off",isDisabled:x,onChange:this.onInputChanged,placeholder:e,value:M||"","data-qa":t?`${t}-input`:null,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onInputKeyDown,role:"combobox",autoClogProps:p};return c||d?n.createElement(_.A,{...R,icon:c,size:m,maxCharacterLimit:d,showError:!1,type:"text",inputRef:a,isInvalid:C}):n.createElement(f.A,{...R,ref:a})}render(){let{icon:e,size:t,selectDataQa:a,width:r,classPrefix:l,showDropdownIcon:o,selectState:s}=this.props,{isInvalid:c}=s,d=i()("c-select_input__wrapper",{[`c-select_input--${t}`]:t,"c-select_input--with_icon_right":o,"c-select_input--with_icon_left":!!e,"c-select_input--invalid":c,[`${l}__select_input_wrapper`]:l}),m=i()("c-select_input__input_container",{[`${l}__select_input_container`]:l});return n.createElement("div",{role:"presentation",className:d,style:{width:r},onClick:this.onClick,onKeyDown:this.onWrapperKeyDown,"data-qa":a?`${a}-wrapper`:null},n.createElement("div",{className:m},this.renderTextInput(),this.renderInputContent()),n.createElement("div",{className:"c-select_input__icon_container"},this.maybeRenderIconOrLoading()))}};C.displayName="SelectInput";let k=C},0x223fb5a56:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>L,oj:()=>isSelectableOption});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2286acf6c),o=a(0x2bba3a0),s=a(0x18f2150ea),c=a(0x77727995),d=a(0x1422234dc),m=a(0x1cbdfeceb),u=a(0xcf583510),p=a(0x9e671ad),h=a(0x65455bc3),_=a(0xca924ee1),f=a(0x18082cf3c),b=a(0x8601851c),g=a(0x16aa90253),y=a(0x14fad6485),A=a(0xb97b797e),x=a(0xb1fd610d),E=a(0x20482ad21),C=a(0x5739d664),k=a(0x1fc4d7d9f),v=a(0x1a256ff50),S=a(0xb1ea448c),I=a(0x2469ec64e),w=a(0x11aaf59fe),T=a(0x5359476e),N=a(0x20bafd237),M=a(0x1c6958849);function formatOptions(e,t=!0){return(0,T.A)(e,(a,n)=>{if("divider"===a.type)return{type:"divider"};if(a.options){let{options:r,label:i,...l}=a,o=`${a.label.toLowerCase()}${w.Sx}${(0,M.A)()}`,s=[{type:"heading",label:a.label,group:o,optionsCount:a.options&&a.options.length||0,extras:l}].concat(a.options.map((e,t)=>{let n={type:"option",option:e,optgroup:o};return 0===t&&(n.isFirstChild=!0),t===a.options.length-1&&(n.isLastChild=!0),n}));if(t){if(e[n-1]&&e[n-1].value&&!e[n-1].options&&s.unshift({type:"divider"}),(0,N.A)(e)===a)return s;s.push({type:"divider"})}return s}return{type:"option",option:a}})}let R=new E.Ay("select"),isKeyboardNavigableOption=e=>"heading"!==e.type&&"divider"!==e.type&&!e?.option?.nonInteractive,isSelectableOption=e=>!e.isDisabled&&!e?.option?.nonInteractive,P=class extends k.B{static contextType=y._0;isMouseMoveEnabled;listBody;list;currentRow;formatOptions;debouncedEnableMouseMove;debouncedOnScroll;cellMeasurerCache;previousFocus;keyCommands;constructor(e){super(e),this.isMouseMoveEnabled=!1,(0,A.v)(this,["getOptionsList","getOptionFromList","onClearSelectedOption","onArrowDown","onArrowUp","onEnter","onTab","onShiftTab","onMouseLeftOption","onScroll","renderRow","clearDynamicRowHeight","initKeyCommands"]),this.listBody=n.createRef(),this.list=n.createRef(),this.currentRow=n.createRef(),this.keyCommands=void 0,this.previousFocus=null,this.cellMeasurerCache=void 0,this.formatOptions=(0,C.A)(formatOptions),this.enableMouseMove=this.enableMouseMove.bind(this),this.debouncedEnableMouseMove=(0,l.A)(this.enableMouseMove,200),this.debouncedOnScroll=(0,l.A)(this.onScroll.bind(this),200),w.az.label=R.t("Clear selection");const{optionsRowHeight:t=w.bJ,dynamicHeight:a=!1}=e;a&&(this.cellMeasurerCache=new f.jS({defaultHeight:t,fixedWidth:!0}))}componentDidMount(){this.initKeyCommands();let{focusOnMount:e=!1,selectState:t,setSelectState:a,shouldIncludeActiveOption:n=!1}=this.props,{selectType:r}=t;r===w.US.BASIC&&e&&this.onOpen();let i=this.getInitalActiveRowIndex(),l=this.list.current;a(()=>({activeRowIndex:i,...n?{activeOption:this.getOptionFromList(i)}:null})),-1!==i&&l&&l.scrollToRow(i),this.removeAriaAttrsFromGridNode()}componentWillUnmount(){let{focusOnMount:e=!1,preventScroll:t=!1}=this.props,{selectType:a}=this.props.selectState;this.keyCommands&&this.keyCommands.reset(),e&&a===w.US.BASIC&&this.previousFocus&&this.getCurrentActiveElement()!==this.previousFocus&&this.previousFocus.focus({preventScroll:t})}componentDidUpdate(e){let{selectState:t,setSelectState:a,shouldIncludeActiveOption:n=!1,dynamicHeight:r=!1,optionsShallowEqualComparisonDepth:i=4,shouldRerenderOnOptionChange:l=!1}=this.props,{filterQuery:o,options:s,initialActiveOption:c}=t,d=!(0,v.Ay)(e.selectState.options,s,i),m=o!==e.selectState.filterQuery;if(d||m){let e=void 0!==c?this.getActiveRowIndex():this.getFirstSelectableRowIndex();a(()=>({activeRowIndex:e,...n?{activeOption:this.getOptionFromList(e)}:null}));let t=e||0===e;this.list.current&&t&&(this.list.current.forceUpdateGrid(),this.list.current.scrollToRow(e))}d&&!m&&l&&this.list.current?.recomputeRowHeights(),r&&t?.options!==e.selectState?.options&&(this.cellMeasurerCache?.clearAll(),this.list.current&&this.list.current.recomputeRowHeights()),this.removeAriaAttrsFromGridNode()}getInitalActiveRowIndex(){let{selectState:e,multiSelectMode:t=!1}=this.props,{selectedOption:a,initialActiveOption:n}=e;return t||!a?this.getFirstSelectableRowIndex():n?this.getActiveRowIndex():(0,o.A)(this.getOptionsList(),e=>isKeyboardNavigableOption(e)&&e?.option?.value===a.value)}getActiveRowIndex(){let{selectState:e}=this.props,{initialActiveOption:t}=e;if(!t)return;let a=(0,o.A)(this.getOptionsList(),e=>isKeyboardNavigableOption(e)&&e?.option?.value===t.value);if(a>=0)return a}getCurrentActiveElement(){return this.context.windowRef.deref()?.document.activeElement??null}getFirstSelectableRowIndex(){let e,{selectState:t,multiSelectMode:a=!1,shouldAlwaysHaveActiveRow:n=!1,inputRef:r}=this.props,{filterQuery:i}=t,l=this.getOptionsList();if((i||n)&&l.length){let n=(0,o.A)(l,e=>isKeyboardNavigableOption(e)&&!this.isOptionSelected(t,e.option,a),0);-1!==n&&(e=n),r?.current&&r?.current.focus()}return e}getRowHeight(e){let{optionsRowHeight:t=w.bJ,headingRowHeight:a=null,dividerRowHeight:n=w.r3}=this.props;return e.option&&(0,s.A)(e.option.height)?Number(e.option.height):e.type&&"divider"===e.type?n:"heading"===e.type&&(0,s.A)(e.extras?.height)?Number(e.extras.height):e.type&&"heading"===e.type&&null!==a?a:t}getClassName(e,t){let{unstyled:a=!1}=this.props;return a&&t?i()(t):i()(t,e)}getOptionFromList(e){let t=this.getOptionsList();return(0,c.A)(t,`[${e}].option`,null)}getOptionsList(){let{multiSelectMode:e=!1,selectState:t,includeDividers:a=!0}=this.props,{options:n,isRequired:r,selectedOption:i,filterQuery:l,minQueryLength:o}=t,s=[];return o&&o>0&&i&&!l&&(s=[i]),n&&(s=e||!i||r?n:[w.az,...n]),s=[...this.formatOptions(s,a)]}getDataQaTag(e,t){let{selectDataQa:a,selectState:n}=this.props,{isRequired:r}=n,i=e.value?e.value:e.label,l="";return"string"==typeof i&&(l=i.replace(/[^\w\s]/g,"").replace(/\s/g,"_").toLowerCase()),e.value?`${a}_option_${r?t:t-1}`:`${a}_option_header_${l}`}getNextActiveRowIndex(e){let t=this.getOptionsList();if(t&&!t.length||e===t.length-1)return -1;let a=(0,s.A)(e)?e+1:0,n=(0,o.A)(t,isKeyboardNavigableOption,a);return -1!==n&&t[n]?n:-1}getPreviousActiveRowIndex(e){if(0===e)return -1;let t=this.getOptionsList();if(t&&!t.length)return -1;let a=t.length-1,n=(0,s.A)(e)?e-1:a,r=(0,d.A)(t,isKeyboardNavigableOption,n);return -1!==r&&t[r]?r:-1}getArialabelForItem(e){let{isFirstChild:t,isLastChild:a,optgroup:n}=e;if(!n)return null;let r=R.t("First item in group {group}, {value}",{group:n&&n.split(w.Sx).slice(0,-1).join("-"),value:"string"==typeof e.option?.label?e.option?.label:""}),i=R.t("Last item in group {group}, {value}",{group:n&&n.split(w.Sx).slice(0,-1).join("-"),value:"string"==typeof e.option?.label?e.option?.label:""});return t?r:a?i:null}getEmptyStateMessage(){let{emptyStateMessage:e,selectState:t,emptyPlaceholderText:a}=this.props,{filterQuery:n,minQueryLength:r}=t;if(e)return e(n);if(r){if(!n)return a??R.t("Type to search\u2026");if(n.length<r)return R.t("Keep typing\u2026")}return R.t("No items")}getContainerStyle(){return{position:"relative",overflow:"visible"}}getListStyle(e){return{padding:e?w.Hy:void 0,boxSizing:"content-box"}}onArrowDown(e){if(this.isMouseMoveEnabled=!1,!this.shouldInterceptKeyEvent(e))return;let{isExpanded:t,activeRowIndex:a}=this.props.selectState;t&&e.preventDefault();let n=this.getNextActiveRowIndex(a);(0,s.A)(n)&&-1!==n&&this.moveNext(n)}onArrowUp(e){if(this.isMouseMoveEnabled=!1,!this.shouldInterceptKeyEvent(e))return;let{isExpanded:t,activeRowIndex:a}=this.props.selectState;t&&e.preventDefault();let n=this.getPreviousActiveRowIndex(a);(0,s.A)(n)&&-1!==n&&this.movePrevious(n)}onEsc(e){let{shouldIncludeActiveOption:t=!1}=this.props;if(!this.props.selectState.isExpanded||!this.shouldInterceptKeyEvent(e))return;e.preventDefault();let{onOptionsListClose:a=m.A}=this.props;a&&a(),this.props.setSelectState(()=>({isExpanded:!1,activeRowIndex:void 0,...t?{activeOption:null}:null,filterQuery:"",displayQuery:""}))}onEnter(e){let t;if(this.props.shouldDisableKeyPressedEnter||!this.shouldInterceptKeyEvent(e))return;e.preventDefault();let{activeRowIndex:a,initialActiveOption:n}=this.props.selectState,r=this.getOptionsList();"number"==typeof a&&(t=r[a]&&r[a].option||r[a]),(!(t=t||n)||isSelectableOption(t))&&(this.onOptionSelected(t),this.onClose(e))}onTab(e){let t,{selectState:a,disableSelectOnTab:n=!1}=this.props;if(n||!this.shouldInterceptKeyEvent(e)||!a.isExpanded)return;let{onKeyPressedTab:r=m.A}=this.props;if(r&&r!==m.A)return void r(event);let{activeRowIndex:i,initialActiveOption:l}=a,o=this.getOptionsList();"number"==typeof i&&(t=o[i]&&o[i].option||o[i]),(t=t||l)&&e.preventDefault(),(!t||isSelectableOption(t))&&this.onOptionSelected(t)}onShiftTab(e){if(!this.shouldInterceptKeyEvent(e))return;let{onKeyPressedShiftTab:t=m.A}=this.props;t&&t!==m.A&&t(e)}onMouseEnteredOption(e){let{shouldIncludeActiveOption:t=!1}=this.props;this.isMouseMoveEnabled&&(this.props.setSelectState(()=>({activeRowIndex:e,...t?{activeOption:this.getOptionFromList(e)}:null})),this.list.current&&this.list.current.forceUpdateGrid())}onMouseLeftOption(){let{shouldAlwaysHaveActiveRow:e=!1}=this.props;this.isMouseMoveEnabled&&!e&&this.clearActive()}onOptionClicked(e){this.onOptionSelected(e,!0)}onScroll(e){let{onScroll:t=m.A}=this.props;t&&t(e)}onOptionSelected(e,t=!1){let{onOptionSelected:a=m.A,onOptionUnselected:n=m.A,selectState:r,setSelectState:i,multiSelectMode:l=!1,inputRef:o,shouldIncludeActiveOption:s=!1,shouldOptionBeSelected:c,shouldAllowUnselectInMultiSelectMode:d=!1,shouldAllowUnselectInSingleSelectMode:h=!0,stayExpandedAfterSelection:_=!1,disableSelectionWhileLoading:f}=this.props;if((!f||!r.isLoading)&&(r.shouldRefocusInputAfterSelection&&o&&o.current&&o.current.focus(),e&&isSelectableOption(e))){if(c&&!1===c(e))return void i(()=>({activeRowIndex:void 0,filterQuery:"",isExpanded:!1}),()=>{a(e)});if(e.value===w.yk)this.onClearSelectedOption();else if(l){let{selectedOptions:t,shouldRefocusInputAfterSelection:c}=r;if(!this.isOptionSelected(r,e,l)&&t)i(()=>({selectedOptions:[...t,e],activeRowIndex:void 0,...s?{activeOption:null}:null,filterQuery:"",isExpanded:_}),()=>{a&&a(e)});else if(d){let a=(0,u.A)(t,[e],(e,t)=>e.value===t.value);i(()=>({selectedOptions:a,activeRowIndex:void 0,...s?{activeOption:null}:null,filterQuery:"",isExpanded:_}),()=>{n&&n(e)})}!c&&!e.fromUnknown&&o&&o.current&&o.current.focus()}else{let n={isExpanded:!1,filterQuery:"",displayQuery:"",selectedOption:h?null:r.selectedOption};(0,p.A)(r.selectedOption,e)||(n.selectedOption=e),i(()=>({...n}),()=>{a&&a(e,t,r)}),r.shouldRefocusInputAfterSelection&&o&&o.current&&o.current.focus()}}}onOpen(){let{focusOnMount:e=!1,selectState:t}=this.props,{selectType:a}=t;(e||a===w.US.BASIC)&&(this.previousFocus=this.getCurrentActiveElement(),this.listBody&&this.listBody.current&&this.listBody.current.focus())}onClose(e){"Escape"===e.key&&this.onEsc(e);let{focusOnMount:t=!1,preventScroll:a=!1}=this.props,{selectType:n}=this.props.selectState;(t||n===w.US.BASIC)&&this.previousFocus&&this.getCurrentActiveElement()!==this.previousFocus&&this.previousFocus.focus({preventScroll:a})}onClearSelectedOption(){let{selectState:e,setSelectState:t,onOptionSelected:a=m.A,multiSelectMode:n=!1,onMultiSelectClear:r}=this.props,{selectedOption:i,selectedOptions:l}=e,o=!1;i?(t(()=>({selectedOption:null,isExpanded:!1,filterQuery:"",displayQuery:""}),()=>{a&&a({value:null})}),o=!0):n&&l&&(t(()=>({selectedOptions:[],isExpanded:!1,filterQuery:"",displayQuery:""}),()=>{r&&r()}),o=!0),this.list.current&&o&&this.list.current.forceUpdateGrid()}clearDynamicRowHeight(e){this.cellMeasurerCache?.clear(e,0),this.list.current&&this.list.current.recomputeRowHeights(e)}clearActive(){let{shouldIncludeActiveOption:e=!1}=this.props;this.props.setSelectState(()=>({activeRowIndex:void 0,...e?{activeOption:null}:null})),this.list.current&&this.list.current.forceUpdateGrid()}enableMouseMove(){this.isMouseMoveEnabled=!0}focusNode(e){e&&this.getCurrentActiveElement()!==e&&e.focus()}isFirstItemUnselectable(){return!isKeyboardNavigableOption(this.getOptionsList()[0])}initKeyCommands(){if(this.keyCommands)return;let{shouldTokenizeOnComma:e,shouldTokenizeOnSpace:t,keyCommandShortcuts:a}=this.props,n=["enter"];e&&n.push("comma"),t&&n.push("space");let r=[{keys:["down"],handler:this.onArrowDown},{keys:n,handler:this.onEnter,filter:e=>"comma"===e.code.toLowerCase()&&","!==e.key},{keys:["up"],handler:this.onArrowUp},{keys:["tab"],handler:this.onTab},{keys:["shift+tab"],handler:this.onShiftTab}],i=a?r.concat(a):r;this.keyCommands=new b.A(this.context.windowRef.deref()?.document),this.keyCommands.bindAll(i)}isOptionSelected({selectedOptions:e,selectedOption:t},a,n){return(!n||!!e&&(!e||!!e.length))&&(!!n||!!t)&&(n?!!a&&e&&e.some(e=>e.value===a.value):t&&a&&t.value===a.value)}isOptionActive({activeRowIndex:e},t,a){if(!e&&0!==e)return!1;let n=t[e];return(n&&n.option?n.option:n)===a}moveNext(e){let{setSelectState:t,shouldIncludeActiveOption:a=!1}=this.props,n=this.getOptionFromList(e);if(!n)return;let r=this.list.current;if(!r)return;t(()=>({activeRowIndex:e,...a?{activeOption:n}:null,displayQuery:n?.value})),this.debouncedEnableMouseMove(),r.forceUpdateGrid();let i=1===e&&this.isFirstItemUnselectable()?0:e;r.scrollToRow(i)}movePrevious(e){let{setSelectState:t,shouldIncludeActiveOption:a=!1}=this.props,n=this.getOptionFromList(e);if(!n)return;let r=this.list.current;if(!r)return;let i=this.getOptionsList();if(!i)return;if(t(()=>({activeRowIndex:e,...a?{activeOption:n}:null,displayQuery:n?.value})),this.debouncedEnableMouseMove(),r.forceUpdateGrid(),n?.height!==0)return void r.scrollToRow(e);let l=(0,h.A)(i.slice(0,e)).findIndex(e=>e?.option?.height!==0);r.scrollToRow(e-l-1)}shouldInterceptKeyEvent(e){return!!e.target&&!!(0,x.vq)(e.target)&&!!((0,x.P7)(e.target,"aria-autocomplete")||(0,x.P7)(e.target,"aria-haspopup")||this.listBody.current&&this.listBody.current.contains(e.target))}removeAriaAttrsFromGridNode(){let e=this.listBody.current,t=e&&e.querySelector(".ReactVirtualized__Grid");t&&(t.removeAttribute("aria-label"),t.removeAttribute("aria-readonly"))}renderEmptyState(){let{unstyled:e=!1,width:t,isLoading:a=!1,selectDataQa:r,includeWrapper:i=!0}=this.props;if(a)return null;let l=this.getEmptyStateMessage();if(null===l)return null;let o=e||!i?+t:t-w.$_;return n.createElement("div",{"data-qa":r?`${r}-empty-state`:null,className:this.getClassName("c-select_options_list__empty_state"),style:{width:o}},n.createElement("div",{role:"alert",className:this.getClassName("c-select_options_list__option c-select_options_list__option--empty-state")},l))}renderList(){let{maxListHeight:e,width:t,includePadding:a,unstyled:r=!1,useSlackScrollbar:l,dynamicHeight:o=!1,forceMaxHeight:s,includeWrapper:c=!0,classPrefix:d}=this.props,m=this.getOptionsList(),u=e||w.CK,p=m.map(e=>this.getRowHeight(e)||0).reduce((e,t)=>e+t,0),h=s||p>=u?u:p,_=r||!c?+t:t-w.$_,f=i()("c-select_options_list__virtual_list",{"c-select_options_list__virtual_list--slack_scrollbar":l,[`${d}__virtual_list`]:!!d}),b=o&&this.cellMeasurerCache?this.cellMeasurerCache.rowHeight:({index:e})=>this.getRowHeight(m[e]);return this.cellMeasurerCache?n.createElement(g.O,{className:f,containerRole:"presentation",containerStyle:this.getContainerStyle(),style:this.getListStyle(a),height:h,deferredMeasurementCache:this.cellMeasurerCache,noRowsRenderer:this.renderEmptyState,onScroll:this.debouncedOnScroll,ref:this.list,rowCount:m?m.length:0,rowHeight:b,rowRenderer:this.renderRow,tabIndex:null,role:"presentation","no-bootstrap":1,width:_}):n.createElement(g.O,{className:f,containerRole:"presentation",containerStyle:this.getContainerStyle(),style:this.getListStyle(a),height:h,noRowsRenderer:this.renderEmptyState,onScroll:this.debouncedOnScroll,ref:this.list,rowCount:m?m.length:0,rowHeight:b,rowRenderer:this.renderRow,tabIndex:null,role:"presentation","no-bootstrap":1,width:_})}renderListBody(){let{enableLoadingState:e=!0,isLoading:t=!1}=this.props;if(t&&e)return this.renderLoadingState();let a=this.getOptionsList();return a&&(!a||a.length)?this.renderList():this.renderEmptyState()}renderLoadingState(){let{width:e}=this.props,t=R.t("Loading results\u2026");return n.createElement("div",{className:this.getClassName("c-select_options_list__loading_state"),style:{width:e}},n.createElement(S.A,{size:"medium",inline:!0}),n.createElement("div",null,t))}renderRow({index:e,key:t,style:a,parent:r}){let l,s,d,{classPrefix:u,selectState:p,multiSelectMode:h=!1,unstyled:b=!1,dynamicHeight:g=!1,hideOptionsListCheckbox:y=!1}=this.props,{selectId:A}=p,x=this.getOptionsList(),{isPlaceholder:E}=l=x[e].option?x[e].option:x[e],{activeRowIndex:C}=p,{selectedOption:k,selectedOptions:v}=p;"number"==typeof C&&(s=this.isOptionActive({activeRowIndex:C},x,l));let S=this.isOptionSelected({selectedOptions:v,selectedOption:k},l,h),T=l.value===w.yk,N="heading"===x[e].type,M=!!x[e].optgroup,R="divider"===x[e].type,P=!!l.isDisabled,L=!!l.nonInteractive,O=S&&!N&&!R,D=N||L||R,F=x.filter(isKeyboardNavigableOption),U=(0,o.A)(F,e=>e.option===l,0),B=u?`${u}__option`:"",H=i()("c-select_options_list__option",B,(0,c.A)(l,"overrides.className",!1),{"c-select_options_list__option--active":s&&(0,c.A)(l,"overrides.useHoverStyles",!0),"c-select_options_list__option--placeholder":E,"c-select_options_list__option--selected":O,"c-select_options_list__option--disabled":P,"c-select_options_list__option--non-interactive":L,"c-select_options_list__group_header":N,"c-select_options_list__group_option":M,"c-select_options_list__divider":R,"c-select_options_list__clear_option":T}),W=T?l.label:n.createElement("hr",{className:this.getClassName("c-select_options__divider")});R||T||(W=this.props.renderOption(l,{index:e,isActive:s,isGroupHeader:N,isClearOption:T,isSelected:S&&!N&&!R,clearDynamicRowHeight:this.clearDynamicRowHeight})),d=b||l.overrides?.unstyled?W:n.createElement("span",{"data-qa":l.value,className:this.getClassName("c-select_options_list__option_label",{normal_wrap:l.extras?.forceHeaderWrap})},W);let V=F.length,G=n.createElement("div",{"aria-hidden":D?"true":null,"aria-selected":S,"aria-label":N?null:this.getArialabelForItem(x[e]),className:this.getClassName(H,B),"data-qa":R?void 0:this.getDataQaTag(l,e),id:(0,I.Es)(A,`option_${e}`),key:t,...a?{style:a}:{},onClick:P||L?(0,_.A)(()=>this.onOptionSelected(l)):(0,_.A)(()=>{this.onOptionClicked(l)}),onMouseEnter:P||L?m.A:(0,_.A)(()=>{this.onMouseEnteredOption(e)}),onMouseLeave:P||L?m.A:this.onMouseLeftOption,role:"option",tabIndex:-1,"data-is-active":s?"true":void 0,ref:s?this.currentRow:null,optgroup:M?x[e].optgroup:void 0,"aria-disabled":P||null,"aria-setsize":V,"aria-posinset":-1===U?void 0:U+1},O&&!y&&n.createElement("span",{className:"c-select_options_list__selected","aria-hidden":"true"}),d);return g&&this.cellMeasurerCache?n.createElement(f.dl,{cache:this.cellMeasurerCache,columnIndex:0,rowIndex:e,key:t,parent:r},({registerChild:e})=>n.cloneElement(G,{ref:t=>{e?.(t),s&&t&&(this.currentRow.current=t)}})):G}render(){let{className:e,ariaLabel:t,classPrefix:a,multiSelectMode:r=!1,selectDataQa:l,selectState:o,dropdownContainer:c,footerBannerContent:d}=this.props,{isExpanded:m,activeRowIndex:u,selectId:p,selectType:h}=o,_=i()("c-select_options_list",{[`${a}_options_list`]:a}),f=h===w.US.BASIC&&m&&(0,s.A)(u)?(0,I.Es)(p,`option_${u}`):void 0,b=n.createElement("div",{className:_,ref:this.listBody,"data-qa":l?`${l}-options-list`:null,id:(0,I.Es)(p,"listbox"),"aria-activedescendant":f,"aria-label":t??R.t("Options"),"aria-multiselectable":!!r,role:"listbox",tabIndex:-1,onMouseMove:this.enableMouseMove},this.renderListBody()),{includeWrapper:g=!0}=this.props;if(!g)return b;let y=i()("c-select_options_list__wrapper",{[`${e}`]:e,[`${a}_options_list_wrapper`]:a});return n.createElement("div",{className:this.getClassName(y),"data-qa":l?`${l}-options-list-wrapper`:"sk-select-options-list-wrapper",...c?{ref:c}:{}},b,d&&n.createElement("div",{className:"c-select_options_list__footer_banner"},d))}};P.displayName="SelectOptionsList";let L=P},0x172a4bb17:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x2286acf6c),i=a(0x1cbdfeceb),l=a(0x14fad6485),o=a(0x220f8fb41),s=a(0x1c371dd8b),c=a(0xb97b797e),d=a(0x21a39e2e1),m=a(0x6aeae8a3),u=a(0x223fb5a56),p=a(0x11aaf59fe);let h={onClose:{action:o.lG.CLOSE},onOpen:{action:o.lG.OPEN}},_=class extends n.Component{static contextType=l._0;popover;optionsListRef;onResize;onScroll;listenerInstalled;static defaultProps={includePadding:!0,window};constructor(e){super(e),this.popover=n.createRef(),this.optionsListRef=n.createRef(),this.state={optionsListBounds:null},(0,c.v)(this,["measureOptionsListAndSetState","onClose"]),this.onResize=(0,r.A)(this.measureOptionsListAndSetState,50,{maxWait:50}),this.onScroll=(0,r.A)(this.measureOptionsListAndSetState,50,{maxWait:50}),this.listenerInstalled=null}componentDidMount(){this.maybeInstallListener(),this.measureOptionsListAndSetState()}componentDidUpdate(){this.maybeInstallListener()}componentWillUnmount(){this.maybeUninstallListener()}isMouseEvent(e){return e?.type==="click"}didClickInput(e){let{inputRef:t}=this.props;if(!t?.current||!this.isMouseEvent(e))return;let a=e.clientX,n=e.clientY,r=t.current.getBoundingClientRect();return a>r.left&&a<r.right&&n>r.top&&n<r.bottom}onClose(e){let{selectState:t,inputRef:a,onOptionsListClose:n,setSelectState:r}=this.props;t.isExpanded&&(e instanceof KeyboardEvent&&this.optionsListRef.current?.onClose(e),a?.current?.focus(),n?.(this.didClickInput(e)),r(()=>({isExpanded:!1,activeRowIndex:void 0,filterQuery:"",displayQuery:""})))}getOptionsListBounds(){let{inputRef:e,inputContainerRef:t=null}=this.props,a=t||e;return a&&a.current?a.current.getBoundingClientRect():null}getPopoverPosition({top:e,bottom:t}){let a=(this.context.windowRef.deref()?.innerHeight||0)-t,{selectState:n,maxListHeight:r=p.CK}=this.props,{options:i}=n,l=0,calculateRowHeight=e=>e.map(e=>this.getRowHeight(e)).reduce((e,t)=>e+t,0);if(i){let e=[];i.forEach(t=>{if(t.options){e.push(t.label),t.options.forEach(t=>e.push(t));return}e.push(t)}),l=calculateRowHeight(e)}return a<Math.min(l,r)&&a<e?"top-left":"bottom-left"}getRowHeight(e){let{optionsRowHeight:t=p.bJ}=this.props;return e.type&&"divider"===e.type?p.r3:t}maybeInstallListener(){if(this.listenerInstalled)return;this.context.windowRef.deref()?.addEventListener("resize",this.onResize),this.context.windowRef.deref()?.addEventListener("scroll",this.onScroll);let{measurePopoverEventName:e=null}=this.props;e&&this.context.windowRef.deref()?.addEventListener(e,this.measureOptionsListAndSetState),this.listenerInstalled=!0}maybeUninstallListener(){let{measurePopoverEventName:e=null}=this.props;this.listenerInstalled&&(this.onResize.cancel(),this.onScroll.cancel(),this.context.windowRef.deref()?.removeEventListener("resize",this.onResize),this.context.windowRef.deref()?.removeEventListener("scroll",this.onScroll),e&&this.context.windowRef.deref()?.removeEventListener(e,this.measureOptionsListAndSetState),this.listenerInstalled=!1)}measureOptionsListAndSetState(){this.listenerInstalled&&this.setState(()=>({optionsListBounds:this.getOptionsListBounds()}))}render(){let e,{popoverProps:t={},selectState:a,minOptionsListWidth:r=null,onOpen:l=i.A,renderOption:c,onScrollablePage:_=!1,autoClogProps:f,maxListHeight:b=p.CK,shouldAllowUnselectInSingleSelectMode:g,shouldAllowUnselectInMultiSelectMode:y,stayExpandedAfterSelection:A,selectOptionsListRef:x,placeholderText:E}=this.props,{selectId:C}=a,k=this.state.optionsListBounds||{width:0,bottom:0,left:0},v=this.getPopoverPosition({top:k.top,bottom:k.bottom}),S="top-left"===v,I=this.context.windowRef.deref()?.innerWidth||0,w=k.width;r&&k.width<r&&(w=r);let T=k.left-12+w,N=0;r&&T>I&&(N=r-k.width);let M=Math.min((S?k.top:(this.context.windowRef.deref()?.innerHeight||0)-k.bottom)-32,b),R={...this.props,autoClogProps:f,renderOption:c,width:w+24,maxListHeight:M,shouldAllowUnselectInSingleSelectMode:g,shouldAllowUnselectInMultiSelectMode:y,stayExpandedAfterSelection:A},{pageYOffset:P}=this.context.windowRef.deref()||{},L={top:k.top+P+4,bottom:k.bottom+P-4,left:k.left-(12+N),width:w};return _&&(e={height:this.context.windowRef.deref()?.document.body.scrollHeight}),n.createElement(s.A,{elementType:o.RJ.DROPDOWN,actionProps:h,...f?{autoClogProps:f}:{}},n.createElement(m.AM,{position:v,allowanceX:-12,ref:this.popover,...t,onClose:this.onClose,isOpen:!!a.isExpanded,key:`${C}-popover`,shouldFocusAfterRender:!1,targetBounds:L,ariaHideApp:!1,onOpen:l,...void 0!==e?{overlayStyle:e}:{},shouldPropagateOnClose:!0},n.createElement(u.Ay,{...R,emptyPlaceholderText:E,ref:(0,d.A)(this.optionsListRef,x)})))}};_.displayName="SelectPopoverOptionsList";let f=_},0xf006b40c:(e,t,a)=>{"use strict";a.d(t,{A:()=>withConfirm});var n=a(0xbad225b5),r=a(0x9e671ad);function withConfirm(e){let t=class extends n.Component{static defaultProps={selectedOptions:[],selectedOption:null,showConfirmDialog:void 0};selectedOptions;selectedOption;constructor(e){super(e),this.setSelectState=this.setSelectState.bind(this),this.selectedOptions=e.selectedOptions,this.selectedOption=e.selectedOption}setSelectState(e,t){let a=e();a.selectedOptions&&!(0,r.A)(a.selectedOptions,this.selectedOptions)||a.selectedOption&&!(0,r.A)(a.selectedOption,this.selectedOption)?(this.props.setSelectState(()=>({...a,isExpanded:!1})),this.props.showConfirmDialog&&this.props.showConfirmDialog({onGo:()=>{this.props.setSelectState(e,t),this.selectedOptions=a.selectedOptions||this.selectedOptions,this.selectedOption=a.selectedOption||this.selectedOption}})):(this.props.setSelectState(e,t),this.selectedOptions=a.selectedOptions||this.selectedOptions,this.selectedOption=a.selectedOption||this.selectedOption)}render(){let{showConfirmDialog:t}=this.props,a=t?this.setSelectState:this.props.setSelectState;return n.createElement(e,{...this.props,setSelectState:a})}};return t.displayName="ConfirmSelectWrapper",t}withConfirm.displayName="withConfirm"},0x913f6320:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x15dd8a31);let i={textSelectLabel:void 0,minOptionsListWidth:null,ariaLabel:""};function TextSelect(e){return n.createElement(r.A,{...i,...e,textSelect:!0})}TextSelect.displayName="TextSelect";let l=TextSelect},0x1ad596f5f:(e,t,a)=>{"use strict";a.d(t,{A:()=>defaultFilter});var n=a(0xd5e26907);function defaultFilter(e,t,a={}){return t?e.reduce((e,r)=>((e,t={},a=[],r)=>{if(!r)return a;let{label:i,options:l}=r,o=new n.Ay(e,{fuzzyLimit:3,...t});if(l){let e=[];l.forEach(t=>{let{label:a}=t;isFinite(o.normalizeAndScore(a))&&e.push(t)}),e.length&&a.push({label:r.label,options:e})}else isFinite(o.normalizeAndScore(i))&&a.push(r);return a})(t,a,e,r),[]):e}},0xfbeb1e08:(e,t,a)=>{"use strict";a.d(t,{f:()=>filterOptions});var n=a(0x1e49806fc);function filterOptions(e,t){return e?t.filter(t=>(0,n.A)((t.value||"").toString().toLowerCase()).includes((0,n.A)(e.toLowerCase()))):t}},0x143f89715:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x21f3c49e8),r=a(0x7d48dd65),i=a(0x18dac2b8e);let __WEBPACK_DEFAULT_EXPORT__=(e,t)=>{if((0,n.A)(e))return!1;let a=(0,r.A)(e,e=>(e&&!e.message&&(0,i.Cu)()&&t.error(Error(`[Invalid Error or Hint Object] The following error or hint object is invalid: { id: ${e.id}, message: ${e.message}}`)),e&&!!e.message));return!(0,n.A)(a)}},0x85e904d5:(e,t,a)=>{"use strict";a.d(t,{k:()=>defaultFilter});var n=a(0x1ad596f5f);let defaultFilter=(e,t,a={})=>void 0===t.filterQuery?t:{...t,options:(0,n.A)(e,t.filterQuery,a)}},0xe2e22817:(e,t,a)=>{"use strict";a.d(t,{FX:()=>d,Lg:()=>h,Ay:()=>_});var n=a(0x11207caba),r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x1faa3f1ac),c=a(0x2501a2cee);let SidebarMenuItem=({children:e,className:t,href:a,isExternalLink:i,isHeader:d,isDivider:m,shouldOpenInSameTarget:u,onClick:p,itemId:h,onActivate:_=o.A,parentId:f,"data-qa":b="sidebar_menu_item",autoClogProps:g,anchorRef:y,"aria-disabled":A=!1})=>{let[x,E]=(0,r.useState)(!1),{activeItemId:C,setActiveItem:k}=(0,r.useContext)(n.A),v=y??r.createRef();(0,r.useEffect)(()=>{C===h?(_(v.current),k(h,f),E(!0)):E(!1)},[C,h,v,_,f,k]);let S=(0,r.useCallback)(e=>{p&&(a||e.preventDefault(),A||p(h))},[a,A,h,p]);if(m)return r.createElement("hr",{className:l()("c-sidebar_menu__divider",t)});if(d)return r.createElement("h3",{className:l()("c-sidebar_menu__header",t)},e);let I=l()("c-sidebar_menu__list_item",{is_active:x,is_disabled:A},t);return r.createElement("li",{role:"presentation"},r.createElement(s.A,{href:a,className:I,onClick:S,"data-qa":b,ref:v,role:"menuitem",shouldOpenInSameTarget:u,autoClogProps:g,"aria-disabled":A},e,i&&r.createElement("span",{className:"sk_foreground_high"},r.createElement(c.Ah,{name:"new-window",inline:!0}))))};SidebarMenuItem.displayName="SidebarMenuItem";let d=SidebarMenuItem;var m=a(0x33644bb7),u=a(0x1f3598f80),p=a(0x11a296110);let mergeChildrenWithProps=(e,t)=>(0,m.A)(e)?e(t):r.Children.map(e,e=>r.cloneElement(e,t)),SidebarMenuItemExpandable=({title:e,itemId:t,className:a,subItems:i=[],children:o,"data-qa":s="sidebar_menu_item__expandable",...d})=>{let[m,h]=(0,r.useState)("0px"),[_,f]=(0,r.useState)(!1),{parentId:b}=(0,r.useContext)(n.A),g=(0,r.useRef)(null);(0,r.useEffect)(function(){_&&g.current&&h(`${g.current.scrollHeight}px`)},[_]),(0,r.useEffect)(()=>{b===t?f(!0):f(!1)},[t,b]);let y=(0,r.useCallback)(()=>{f(!1)},[f]),[A,x]=(0,u.i)(y),E=(0,r.useCallback)(e=>{e.preventDefault(),_?(h("0px"),A(350)):f(!0)},[_,A]);(0,r.useEffect)(()=>function(){x()},[x]);let C=l()(a,"c-sidebar_menu__list","c-sidebar_menu__list-expandable"),k=l()(a,"c-sidebar_menu__list_item",{is_active:!_&&b===t}),v=(0,r.useMemo)(()=>({maxHeight:m}),[m]);return r.createElement("li",null,r.createElement(p.Nm,{className:k,onClick:E,"data-qa":s,...d},r.createElement("span",{className:"float_right"},r.createElement(c.Ah,{name:_?"caret-down":"caret-right",inline:!0})),e),_?r.createElement("ul",{ref:g,className:C,style:v},mergeChildrenWithProps(o,{subItems:i,parentId:t})):r.createElement("ul",{className:"c-sidebar_menu__list-offscreen","aria-hidden":!0},mergeChildrenWithProps(o,{subItems:i,parentId:t})))};SidebarMenuItemExpandable.displayName="SidebarMenuItemExpandable";let h=SidebarMenuItemExpandable,_=n.h},0x11207caba:(e,t,a)=>{"use strict";a.d(t,{A:()=>o,h:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb);let o=(0,n.createContext)({setActiveItem:l.A}),s=class extends n.PureComponent{activeLink;constructor(e){super(e),this.state={}}onItemActivate=e=>{this.activeLink=e};setParentId=e=>{this.setState(()=>({parentId:e}))};render(){let{className:e,children:t}=this.props;return n.createElement(o.Provider,{value:{activeItemId:this.props.activeItemId,parentId:this.state.parentId,setActiveItem:(e,t)=>{this.setParentId(t)}}},n.createElement("div",{className:i()("c-sidebar_menu",e)},n.createElement("ul",{className:"c-sidebar_menu__list"},n.Children.map(t,e=>e?n.cloneElement(e,{onActivate:this.onItemActivate}):null))))}};s.displayName="SidebarMenu";let c=s},0x2414ac804:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x15e48057c);let o=(0,n.forwardRef)(function({className:e,onChange:t,value:a,min:r,max:o,step:s,ariaLabel:c,...d},m){let u=(0,n.useContext)(l.A),p=(0,n.useCallback)(e=>{t(Number(e.target.value))},[t]);return n.createElement("input",{ref:m,type:"range",className:i()("c-slider__input",e,{"c-slider__input--focus-visible":u}),onChange:p,value:a,min:r,max:o,step:s,"aria-label":c,...d})})},0x189a28b3e:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x220f8fb41),s=a(0x1c371dd8b);let c={onChange:{action:o.lG.CLICK}},d=n.memo(({id:e,isToggled:t=!1,isDisabled:a=!1,ariaLabelledBy:r,ariaDescribedBy:d,dataQa:m,onChange:u=l.A,className:p,autoClogProps:h,ariaLabel:_})=>{let f=i()("c-switch",p);return n.createElement("div",{"data-qa":"switch_button",className:f,role:"presentation"},n.createElement(s.A,{autoClogProps:h,actionProps:c,elementType:o.RJ.CHECKBOX},n.createElement("input",{id:e,type:"checkbox",className:"c-switch__input",role:"switch","aria-checked":t,"aria-label":_,"aria-labelledby":r,"aria-describedby":d,checked:t,disabled:a,onChange:u,"data-qa":m})),n.createElement("div",{"aria-hidden":"true",className:"c-switch__visual",tabIndex:-1}))})},0xa8101a76:(e,t,a)=>{"use strict";a.d(t,{A:()=>eE});var n,r,i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x7a622ec8),c=a.n(s),d=a(0x1cbdfeceb),m=a(0x2286acf6c),u=a(0x33644bb7),p=a(0x21f3c49e8),h=a(0x18082cf3c),_=a(0x130d89881),f=a(0x72b537b5),b=a(0xb97b797e),g=a(0x20482ad21),y=a(0x5739d664),A=a(0x12edaa96a),x=a(0x14abc22b0),E=a(0xfe5aa224),C=a(0xb1ea448c),k=a(0xf3b0bc58),v=a(0x2469ec64e),S=a(0x14fad6485);let I=i.memo(({disable:e,children:t})=>{let{windowRef:a}=(0,S.ox)(),[n,r]=i.useState(0),l=i.useRef(null),o=i.useCallback(()=>{l.current&&r(a.deref()?.innerHeight||0)},[a]),s=i.useCallback(()=>{a.deref()?.requestAnimationFrame(o)},[o,a]),c=i.useMemo(()=>l.current?n-l.current.getBoundingClientRect().top:0,[n]);return(i.useEffect(()=>(s(),a.deref()?.addEventListener("resize",s),()=>{a.deref()?.removeEventListener("resize",s)}),[s,a]),e)?t({}):i.createElement("div",{ref:l},t({tableHeight:c}))});var w=a(0x2377ba67d);function formatDataQa({dataQaPrefix:e,dataQaSelector:t}){return e?`${e}_${t}`:t}let T=i.memo(({cellComponent:e,cellData:t,dataQaPrefix:a,rowIdKey:n})=>{let{dataKey:r="",rowData:l={}}=t,o=i.useCallback(({cellData:e,dynamicRowHeight:t})=>{let a;return i.isValidElement(e)?a=e:void 0!==e&&(a=String(e)),i.createElement(w.A,{dynamicRowHeight:t,text:a})},[]),s=i.useCallback(()=>{let a={...t},n=e?e(a):o(a);return n&&"object"==typeof n&&"type"in n&&n.type?.isDefaultTableCell&&(n=i.cloneElement(n,{size:a.rowHeight,align:a.align})),n},[e,t,o]);return i.createElement("div",{"data-qa-id":l?.[n],"data-qa-column":formatDataQa({dataQaPrefix:a,dataQaSelector:`${r}`}),"data-qa":formatDataQa({dataQaPrefix:a,dataQaSelector:"data_table_cell"}),className:"c-table_cell_container"},s())});var N=a(0xb77a689a),M=a(0xa6f3163b),R=a(0x344bb842),P=a(0x2501a2cee),L=a(0x4c96e5d9),O=a(0x1fdec3e16),D=a(0x15513c993);let F=new g.Ay("table"),U={NOT_SORTED:{name:"caret-up-down"},SORT_ASC:{name:"caret-up"},SORT_DESC:{name:"caret-down"}},B="data_table_column_header",H=class extends i.PureComponent{constructor(e){super(e),this.buttonRef=(0,i.createRef)()}buttonRef;getHeaderAriaLabel=()=>{let{dataKey:e,headerLabel:t,headerInfoText:a,headerAriaLabel:n}=this.props,r=n??((0,N.A)(t)?t:e);return(0,N.A)(a)&&(r+=` - ${a}`),r};getSortAriaLabel=e=>{let{sortDirection:t}=this.props,a=this.getHeaderAriaLabel();return e?t===D.Pg.ASC?F.t("{ariaLabel}, Sortable, Sort Ascending",{ariaLabel:a}):F.t("{ariaLabel}, Sortable, Sort Descending",{ariaLabel:a}):F.t("{ariaLabel}, Sortable, Not Sorted",{ariaLabel:a})};getSortIcon=(e,t)=>{let{NOT_SORTED:a,SORT_ASC:n,SORT_DESC:r}=U,i=t===D.Pg.ASC?n:r;return(!e||!t)&&a||i};renderHeaderLabel=()=>{let{headerLabel:e,hasTwoLineHeader:t}=this.props;return e?i.createElement(O.A,{lines:t?2:1,breakWords:!1},e):null};renderHeaderIcon=()=>{let{headerInfoText:e,headerIconProps:t,headerTooltipClassName:a,dataQaPrefix:n}=this.props;return e?i.createElement(L.Ay,{tip:e,tipClassName:a,position:"top"},i.createElement(R.A,{className:"c-table_column_header__icon",size:"x-small","aria-label":(0,N.A)(e)?e:"","data-qa":formatDataQa({dataQaPrefix:n,dataQaSelector:`${B}_icon`})},i.createElement(P.Ah,{name:"info",inline:!0,size:"16",...t}))):null};render(){let{dataQaPrefix:e,dataKey:t,sortBy:a,sortDirection:n,isSortable:r,headerAutoClogProps:l}=this.props,s=t===a,c={"data-qa":formatDataQa({dataQaPrefix:e,dataQaSelector:B}),"data-qa-column":t,className:"c-table_column_header"},d=this.getSortIcon(s,n),m=o()(c.className,{"c-table_column_header--sorted":s}),u={};return l&&(u.autoClogProps=l),r?i.createElement(i.Fragment,null,i.createElement(M.A,{...c,ref:this.buttonRef,"aria-label":this.getSortAriaLabel(s),"data-qa-sortable":!0,"data-qa-sort":n?.toLowerCase(),className:m,tabIndex:-1,...u},i.createElement("span",{"aria-hidden":"true"},this.renderHeaderLabel()),i.createElement("span",{className:"c-table_column_header__sort_icon"},i.createElement(P.Ah,{inline:!0,size:"inherit",...d}))),this.renderHeaderIcon()):i.createElement("span",c,this.renderHeaderLabel(),this.renderHeaderIcon())}};H.displayName="TableColumnHeader";var W=a(0x244f35bf8),V=a(0xd3c52762),G=a(0x11a296110);let q=new g.Ay("table"),j=class extends i.Component{node;static defaultProps={dataQaPrefix:void 0,rowIdKey:void 0,isLoading:!1,isFocused:!1,isHovered:!1,showLoadMore:!1,fetchMoreRows:d.A,onFocusEnter:d.A,onKeyDown:d.A,onMouseEnter:d.A,onMouseLeave:d.A,isHeader:!1};constructor(e){super(e),this.node=i.createRef()}componentDidMount(){this.maybeFocusNode()}componentDidUpdate(e){let{isFocused:t}=this.props;!e.isFocused&&t&&this.node?.current?.focus()}handleRowClick=e=>{let{rowProps:t,onClick:a=d.A}=this.props,{rowData:n,index:r}=t;a({rowData:n,index:r,event:e})};handleOnMouseEnter=()=>{let{rowProps:e,onMouseEnter:t=d.A}=this.props,{index:a}=e;t({index:a})};onFocusWithin=e=>{let{relatedEvent:t}=e,{rowProps:a,onFocusEnter:n,isHeader:r}=this.props,{index:i,onFocusWithinRow:l}=a??{};if(n&&t?.type!=="mousedown"){if("function"==typeof l)return void l(e,t=>{t||n({index:r?D.uI:i,...e})});n({index:r?D.uI:i,...e})}};onFocusLeave=e=>{let{rowProps:t}=this.props,{onFocusLeaveRow:a}=t??{};"function"==typeof a&&a(e)};maybeFocusNode=()=>{let{isFocused:e}=this.props;e&&this.node?.current?.focus()};getDataQA(e){let{rowProps:t,dataQaPrefix:a,isLoading:n,rowIdKey:r}=this.props,i={},{rowData:l}=t;return n||("data_table_row"===e&&r&&(i["data-qa-id"]=String(l?.[r])),i["data-qa"]=formatDataQa({dataQaPrefix:a,dataQaSelector:e})),i}getClassNames(){let{rowProps:e,rowStyle:t,isHeader:a,isLoading:n,showLoadMore:r,isFocused:i,isHovered:l}=this.props,{className:s}=e,c="";if(a)c=o()(s,"c-data_table__header_row",{"c-data_table__header_row--focus":i});else{let e=!n&&!r,a=[];(0,W.A)(t)?a=t:t&&(a=[t]);let d=a.map(e=>`c-data_table__row--${e}`);c=o()(s,"c-data_table__row",d,{"c-data_table__row--focus":i,"c-data_table__row--load_more":!e,[`c-data_table__row--${D.z$.hover}`]:l&&e})}return c}getAriaAttributes(){let{isHeader:e,rowProps:t}=this.props,a={};if(e)return a;let{index:n=0}=t;return a["aria-rowindex"]=n+1,a}render(){let{rowProps:e,style:t,isLoading:a,isFocused:n,isHeader:r,showLoadMore:l,fetchMoreRows:o,onKeyDown:s,onMouseLeave:c,dataQaPrefix:d}=this.props,{columns:m,hideRowContent:u,containerProps:p}=e,h=m;return a?h=i.createElement(C.A,{color:"blue",size:"large","data-qa":formatDataQa({dataQaPrefix:d,dataQaSelector:"data_table_load_more_rows_spinner"})}):l&&(h=i.createElement("span",{role:"gridcell"},i.createElement(G.Ay,{"aria-label":q.t("Load more rows"),type:"outline",size:"small",onClick:o,...this.getDataQA("data_table_load_more_btn")},i.createElement("span",{"aria-hidden":!0},q.t("Load More"))))),i.createElement(V.A,{onFocusEnter:this.onFocusWithin,onFocusWithin:this.onFocusWithin,onFocusLeave:this.onFocusLeave},i.createElement("div",{role:"row",tabIndex:n?0:-1,onClick:this.handleRowClick,onKeyDown:s,onMouseEnter:this.handleOnMouseEnter,onMouseLeave:c,className:this.getClassNames(),style:t,ref:this.node,...this.getDataQA(r?"data_table_header":"data_table_row"),...this.getAriaAttributes(),...p||{}},!u&&h))}};j.displayName="TableRow";var z=a(0xd5892119);let table_spacer_column=({width:e})=>i.createElement(z.Ve,{dataKey:"___spacer_column",label:i.createElement("div",{className:"c-table_spacer_header",style:{width:e}}),headerAriaLabel:"",width:e,className:"c-table_spacer_column c-data_table__row_column--no_padding"});var K=((n={}).TopLeft="c-virtualized_table--top-left",n.TopRight="c-virtualized_table--top-right",n.BottomLeft="c-virtualized_table--bottom-left",n.BottomRight="c-virtualized_table--bottom-right",n);let $="data-rowindex";var Y=((r={}).ASC="ASC",r.DESC="DESC",r);let Q={[D.Pg.ASC]:Y.ASC,[D.Pg.DESC]:Y.DESC},get_react_virtualized_sort_direction=e=>Q[e],should_render_multi_grid=({pinnedColumnCount:e,dynamicRowHeight:t})=>void 0!==e&&Number.isInteger(e)&&e>0||!!t;var Z=a(0x1383b91ba),J=a(0x357885ff),X=a(0xc9a382f9),ee=a(0x9e671ad),et=a(0x15279822);let MultiGridScrollIndicator=()=>{let e=(0,i.useRef)(null),[t,a]=(0,i.useState)(0),[n,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let t=e.current,n=t?.parentElement;if(!t||!n)return d.A;let i=n.querySelector(`.${K.BottomRight}`);if(!i)return d.A;let resizeListener=()=>{a(i.offsetLeft??0)};resizeListener();let scrollListener=()=>{r(i.scrollLeft>0)};return document.addEventListener("resize",resizeListener),i.addEventListener("scroll",scrollListener),()=>{document.removeEventListener("resize",resizeListener),i.removeEventListener("scroll",scrollListener)}}),i.createElement("div",{ref:e,className:o()("c-virtualized_table__scroll-indicator",{"c-virtualized_table__scroll-indicator--visible":n}),style:{left:t}})};MultiGridScrollIndicator.displayName="MultiGridScrollIndicator";let getIdForRow=({idPrefix:e,rowIndexIncludingHeader:t})=>`${e}__row_${t}`,getIdForCell=({idPrefix:e,rowIndexIncludingHeader:t,columnIndex:a})=>`${e}__row_${t}__column_${a}`,getClassNamesForCell=(e,t)=>{let{columnIndex:a,pinnedColumnCount:n,columnCount:r,isSortableHeader:i,dynamicRowHeight:l}=t,[s]=e.split(" ");return o()(e,`${s}--grid-cell`,{[`${s}--grid-cell-first-pinned-column`]:n&&0===a,[`${s}--grid-cell-last-pinned-column`]:n&&a===n-1,[`${s}--grid-cell-first-unpinned-column`]:n?a===n:0===a,[`${s}--grid-cell-last-unpinned-column`]:n?a>=n&&a===r-1:a===r-1,"c-virtualized_table__sortable_header_wrapper":i,[`${s}--dynamic-row-height`]:l})},isElementRow=e=>e?.getAttribute($)!==null,getElementRowIndex=e=>isElementRow(e)?parseInt(e?.getAttribute($)??"",10):null,getGridRows=(e,t)=>e?.querySelectorAll(`.${t} [${$}]`)??null,ea=(0,i.forwardRef)(({children:e,idPrefix:t,containerProps:a,rowCount:n,columnCount:r,ariaLabel:l},o)=>{let s=[...Array(n)].map((e,a)=>getIdForRow({idPrefix:t,rowIndexIncludingHeader:a})).join(" ");return i.createElement("div",{ref:o,className:"c-virtualized_table__wrapper",role:"grid","aria-label":l,"aria-colcount":r,"aria-rowcount":n&&n-1},i.createElement("div",{...a||{},id:(({idPrefix:e})=>`${e}__row_container`)({idPrefix:t}),role:"rowgroup","aria-owns":s},e))}),get_column_widths=e=>i.Children.toArray(e).map(e=>i.isValidElement(e)?e.props.width:0),en={[Y.ASC]:D.Pg.ASC,[Y.DESC]:D.Pg.DESC},getDataTableSortDirection=e=>en[e],get_multi_grid_focusable_elements=function(e){let t=getGridRows(e,K.TopLeft),a=getGridRows(e,K.TopRight),n=getGridRows(e,K.BottomLeft),r=getGridRows(e,K.BottomRight),i=[...(0,J.A)([...Array(t?.length??0)].map((e,n)=>[t?.[n],a?.[n]])).filter(e=>void 0!==e),...(0,J.A)([...Array(n?.length??0)].map((e,t)=>[n?.[t],r?.[t]])).filter(e=>void 0!==e)].reduce((e,t)=>{let a=getElementRowIndex(t);if(null===a)return e;let n=e[a]??[];return{...e,[a]:[...n,...(0,et.Py)(t)]}},{}),l=(0,J.A)(Object.keys(i).map(e=>parseInt(e,10)).sort((e,t)=>e-t).map(e=>i[e.toString()]));return{focusableChildrenByRow:i,focusableChildren:l,focusableChildrenInDefaultOrder:e?(0,et.Py)(e):[]}};var er=a(0x6258badf);let ei=i.forwardRef((e,t)=>i.createElement("div",{ref:t,role:"columnheader",...e}));ei.isHeaderRowCell=!0;let el=i.forwardRef((e,t)=>i.createElement("div",{ref:t,role:"columnheader",...e}));el.isPinnedColumnCell=!0,el.isHeaderRowCell=!0;let eo=i.forwardRef((e,t)=>i.createElement("div",{ref:t,role:"gridcell",...e})),es=i.forwardRef((e,t)=>i.createElement("div",{ref:t,role:"gridcell",...e}));es.isPinnedColumnCell=!0;let ec=D.Pg.ASC;function getMultiGridCellRenderer({children:e,rowGetter:t,sort:a,sortBy:n,sortDirection:r,deferredMeasurementCache:l},{pinnedColumnCount:o,idPrefix:s},{getColumnWidth:c}){return d=>{let m,{columnIndex:u,rowIndex:p,style:_,key:f,parent:b}=d,g=i.Children.toArray(e),y=g.length,A=g[u];if(!i.isValidElement(A))return null;let x=u<o,{label:E,dataKey:C,columnData:k,headerAriaLabel:v,headerInfoText:S,headerClassName:I,headerRenderer:w,className:T,cellRenderer:M,cellDataGetter:R,sortable:P,defaultSortDirection:L}=A.props,O={columnIndex:u,key:f,parent:b,rowIndex:p};if(0===p){let e={};if(P){let t=(({sortDirection:e,sortBy:t,dataKey:a,defaultSortDirection:n})=>{let r,i;switch(n){case Y.ASC:case Y.DESC:i=getDataTableSortDirection(n);break;default:i=n||ec}return r=t!==a?i:e===D.Pg.ASC?D.Pg.DESC:D.Pg.ASC,{sortBy:a,sortDirection:r}})({dataKey:C,sortBy:n,sortDirection:r,defaultSortDirection:L}),sortWithSortData=()=>a?.(t);e.onClick=sortWithSortData,e.onKeyDown=e=>{("Enter"===e.key||" "===e.key)&&sortWithSortData()},e.tabIndex=0,e["aria-sort"]=(({sortDirection:e,sortBy:t,dataKey:a})=>a!==t?"none":e===D.Pg.ASC?"ascending":"descending")({sortBy:n,dataKey:C,sortDirection:r})}let t=x?el:ei,renderHeaderWrapper=()=>{let a;return i.createElement(t,{role:"columnheader",id:getIdForCell({idPrefix:s,rowIndexIncludingHeader:p,columnIndex:u}),className:getClassNamesForCell(I,{columnIndex:u,pinnedColumnCount:o,columnCount:y,isSortableHeader:P}),style:_,key:f,"aria-label":(a=v??((0,N.A)(E)?E:C),(0,N.A)(S)&&(a+=` - ${S}`),a),...e},w({label:E,dataKey:C,sortBy:n,sortDirection:r,columnData:k}))};m=l?i.createElement(h.dl,{...O,cache:l,type:t},({registerChild:e})=>i.cloneElement(renderHeaderWrapper(),{ref:e})):renderHeaderWrapper()}else{let e=p-1,a=t?.({index:e})??null,n=(0,er.A)(_,["top","height"]);"auto"===n.width&&(n.width=c({index:u}));let r=x?es:eo,renderCellWrapper=t=>i.createElement(r,{id:getIdForCell({idPrefix:s,rowIndexIncludingHeader:p,columnIndex:u}),className:getClassNamesForCell(T,{columnIndex:u,pinnedColumnCount:o,columnCount:y,dynamicRowHeight:!!l}),style:n,key:f,"aria-colindex":u+1},a&&M({refreshRowHeight:t,dataKey:C,rowData:a,rowIndex:e,columnData:k,columnIndex:u,cellData:R?.({dataKey:C,rowData:a,columnData:k})||a[C]}));m=l?i.createElement(h.dl,{cache:l,...O,type:r},({registerChild:e,measure:t})=>i.cloneElement(renderCellWrapper(t),{ref:e})):renderCellWrapper()}return m}}getMultiGridCellRenderer.displayName="getMultiGridCellRenderer";let ed=getMultiGridCellRenderer;function VirtualizedTable({innerRef:e,idPrefix:t="",isDataRow:a=()=>!1,pinnedColumnCount:n=0,pinnedRowCount:r=1,isLoading:l=!1,...s}){let{width:m,children:u,scrollToIndex:p,sort:_,sortDirection:f,containerProps:b,dynamicRowHeight:g}=s,y=(0,i.useMemo)(()=>should_render_multi_grid({pinnedColumnCount:n,dynamicRowHeight:g}),[n,g]),[A,x]=(0,i.useState)(0),E=get_column_widths(u),C=(0,Z.A)(E),k=Math.max(0,m-C),v=(0,i.useRef)(null),[S,I]=(0,i.useState)(0),[w,T]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e=v.current;if(!y||!e)return d.A;let t=C-m,keyListener=e=>{"ArrowLeft"===e.key?I(e=>Math.max(e-50,0)):"ArrowRight"===e.key&&I(e=>Math.min(e+50,t))};return e.addEventListener("keydown",keyListener),()=>e.removeEventListener("keydown",keyListener)},[y,C,m]),(0,i.useEffect)(()=>{l||T(0)},[l]);let[N,M]=(0,i.useState)();(0,i.useEffect)(()=>{M(p+r)},[r,p]);let[R,P]=(0,i.useState)(null),L=(0,i.useRef)(null),O=(0,i.useCallback)(e=>{L.current=e,P(e),e!==document.activeElement&&e?.focus()},[]),D=(0,i.useCallback)(({relatedEvent:e,target:t,relatedTarget:a},n)=>{let r=v.current;if(!r)return;if(L.current===t)return void n(!1);if(e?.keyCode!==c()("tab")){n(!1),O(null);return}let{focusableChildren:i,focusableChildrenByRow:l,focusableChildrenInDefaultOrder:o}=get_multi_grid_focusable_elements(r),s=!e?.shiftKey,d=L.current;if(null===d&&r.contains(a)){if(isElementRow(a)){if(s){let e=getElementRowIndex(a),[t]=e?l[e]??[]:[];n(!0),O(t);return}n(!1),O(t);return}d=a??null}if(null===d){let e=o[o.length-1];if(!s&&e===t){let e=i[i.length-1];n(!0),O(e);return}let a=o[0];if(s&&a!==t){let[e]=i;n(!0),O(e);return}n(!1),O(t);return}let m=i.findIndex(e=>e===d);if(s){let e=i[m+1];if(n(!0),O(e),!e){let e=o[o.length-1],t=(0,et.b)(e);O(r&&t&&r.contains(t)?t:null)}}else{let e=i[m-1];n(!0),O(e)}},[O]),F=(0,i.useCallback)(({target:e,relatedTarget:t})=>{let a=v.current;if(!a||a.contains(t)||L.current===t)return;let{focusableChildren:n,focusableChildrenByRow:r,focusableChildrenInDefaultOrder:i}=get_multi_grid_focusable_elements(a);if(isElementRow(e)){let t=getElementRowIndex(e),[a]=(0,J.A)(Object.keys(r).filter(e=>null!==t&&parseInt(e,10)>=t).map(e=>r[e]));if(a)return void O(a)}let l=i[i.length-1];if(L.current===l){let e=n.findIndex(e=>e===L.current),t=n[e+1];L.current=t,t?.focus();return}L.current=null},[O]);(0,i.useLayoutEffect)(()=>{let e=v.current,t=e?.querySelector(`.${K.BottomRight}`),a=e?.querySelector(`.${K.TopRight}`),n=e?.querySelector(`.${K.BottomLeft}`),r=e?.querySelector(`.${K.TopLeft}`);if(!e||!t)return;let i=a?.contains(R),l=n?.contains(R),o=r?.contains(R);(0,X.A)(()=>{let e=((e,t,{isPinnedColumn:a,isPinnedRow:n})=>{if(!e||!t)return{scrollLeft:0,scrollTop:0};let r=e.scrollLeft,i=e.scrollTop,{x:l,width:o,y:s,height:c}=e.getBoundingClientRect(),d=l+o,m=s+c,{x:u,width:p,y:h,height:_}=t.getBoundingClientRect(),f=u+p,b=h+_,g={scrollLeft:r,scrollTop:i};return!a&&(f<=d||(g.scrollLeft=Math.max(f-(d-r),0)),u>=l||(g.scrollLeft=Math.max(r-(l-u),0))),!n&&(b<=m||(g.scrollTop=Math.max(b-(m-i),0)),h>=s||(g.scrollTop=Math.max(i-(s-h),0))),g})(t,R,{isPinnedRow:i||o,isPinnedColumn:l||o});I(e.scrollLeft),T(e.scrollTop)})},[R]);let U=(0,i.useMemo)(()=>y?((e,t)=>{let{className:a,gridClassName:n,children:r,rowCount:l,rowHeight:s,headerHeight:c,onRowsRendered:d,deferredMeasurementCache:m}=e,{pinnedRowCount:u,pinnedColumnCount:p,extraHorizontalSpace:_,scrollLeft:f,scrollTop:b,setScrollLeft:g,setScrollTop:y,scrollToRow:A,setScrollToRow:x,scrollbarWidth:E,setScrollbarWidth:C}=t,k=i.Children.toArray(r),v=k.length,columnWidth=({index:e})=>{let t=(0,Z.A)(k.map(({props:{flexGrow:e=0}})=>e)),a=t?Math.floor(_/t):0,n=k[e]?.props?.width||0,r=k[e]?.props?.flexGrow||0,i=-(0===E?0:0===t?E/v:E/t*r);return n+a*r+i},S=ed(e,t,{getColumnWidth:columnWidth}),I=((e,t,{columnCount:a})=>{let{rowGetter:n,headerRowRenderer:r,rowRenderer:l}=e,{pinnedColumnCount:o,pinnedRowCount:s,idPrefix:c,isDataRow:d,onFocusWithinRow:m,onFocusLeaveRow:u}=t,p=o>0;return e=>{let t=(0,h.Mn)(e),{columnStartIndex:o,columnStopIndex:_,rowStartIndex:f,rowStopIndex:b,rowSizeAndPositionManager:g,verticalOffsetAdjustment:y}=e,A=_-o+1;return t.reduce((e,t)=>{let a=e[e.length-1];return a.length<A?(a.push(t),e):[...e,[t]]},[[]]).map((e,t)=>{let getCellType=e=>e.props&&e.props.cache?e.props.type:e.type,o=e.some(e=>getCellType(e).isHeaderRowCell),h=e.some(e=>getCellType(e).isPinnedColumnCell),_=f+t,A=o?_:_+s,x={size:0,offset:0};b>=f&&(x=g.getSizeAndPositionOfCell(_));let E={key:`row-${A}`,index:_,rowData:o?null:n?.({index:_})??null,columns:e.map(e=>i.cloneElement(e,{style:{...e.props.style,top:"auto",height:null}})),style:{width:"100%",position:"absolute",height:x.size,top:x.offset+y},hideRowContent:p&&!h&&!o&&!d(_),onFocusWithinRow:m,onFocusLeaveRow:u,containerProps:{id:getIdForRow({idPrefix:c,rowIndexIncludingHeader:A}),[$]:A,...!p||h?{role:"row"}:{},"aria-owns":!p||h?[...Array(a)].map((e,t)=>getIdForCell({idPrefix:c,rowIndexIncludingHeader:A,columnIndex:t})).join(" "):void 0}};return o?r?.(E):l?.(E)})}})(e,t,{columnCount:v});return{role:"none","aria-readonly":null,height:e.height,width:e.width,scrollToAlignment:e.scrollToAlignment,tabIndex:e.tabIndex,containerRole:"",classNameTopLeftGrid:o()(a,n,K.TopLeft),classNameTopRightGrid:o()(a,n,K.TopRight),classNameBottomLeftGrid:o()(a,n,K.BottomLeft),classNameBottomRightGrid:o()(a,n,K.BottomRight),enableFixedColumnScroll:!0,hideBottomLeftGridScrollbar:!0,overscanRowCount:3,fixedRowCount:u,fixedColumnCount:p,rowCount:void 0!==l?l+1:0,deferredMeasurementCache:m,rowHeight:({index:e})=>0===e?c??0:"number"==typeof s?s??0:s?.({index:e-1})??0,columnCount:v,columnWidth,cellRenderer:S,cellRangeRenderer:I,scrollLeft:f,scrollTop:b,scrollToRow:A,onScroll:e=>{g(e.scrollLeft),y(e.scrollTop),x(void 0)},onSectionRendered:({rowStartIndex:e,rowStopIndex:t,rowOverscanStartIndex:a,rowOverscanStopIndex:n})=>{d?.({startIndex:e,stopIndex:t,overscanStartIndex:a,overscanStopIndex:n})},onScrollbarPresenceChange:({vertical:e,size:t})=>{C(e?t:0)},overscanIndicesGetter:e=>"horizontal"===e.direction?{overscanStartIndex:0,overscanStopIndex:Math.min(v-1,e.cellCount-1)}:{overscanStartIndex:Math.max(e.startIndex-3,0),overscanStopIndex:Math.min(e.stopIndex+3,e.cellCount-1)}}})(s,{idPrefix:t,isDataRow:a,pinnedColumnCount:n,pinnedRowCount:r,extraHorizontalSpace:k,scrollLeft:S,setScrollLeft:I,scrollTop:w,setScrollTop:T,scrollToRow:N,setScrollToRow:M,onFocusWithinRow:D,onFocusLeaveRow:F,scrollbarWidth:A,setScrollbarWidth:x}):null,[t,a,k,n,r,y,s,S,w,N,D,F,A]),B=(0,i.useRef)();(0,i.useEffect)(()=>{B.current instanceof h._3?B.current?.recomputeGridSize?.():B.current?.recomputeRowHeights?.()},[y]);let H=(0,i.useRef)(get_column_widths(u)),W=(0,i.useRef)(A);(0,i.useEffect)(()=>{if(!y)return;let e=get_column_widths(u);(0,ee.A)(H.current,e)&&W.current===A||(B.current instanceof h._3&&B.current?.recomputeGridSize?.(),H.current=e,W.current=A)},[y,u,k,A]);let V=(0,i.useRef)(k);return((0,i.useEffect)(()=>{!y||(0,ee.A)(V.current,k)||(B.current instanceof h._3&&B.current?.recomputeGridSize?.(),V.current=k)},[y,u,k]),U)?i.createElement(ea,{ref:v,idPrefix:t,columnCount:U?.columnCount,rowCount:U?.rowCount,ariaLabel:s["aria-label"],containerProps:b},i.createElement(h._3,{ref:t=>{B.current=t,"function"==typeof e&&e(t)},...U}),i.createElement(MultiGridScrollIndicator,null)):i.createElement(h.XI,{ref:t=>{B.current=t,"function"==typeof e&&e(t)},...s,sort:e=>_?.({...e,sortDirection:getDataTableSortDirection(e.sortDirection)}),sortDirection:get_react_virtualized_sort_direction(f)})}VirtualizedTable.displayName="VirtualizedTable";let em=(0,i.memo)(VirtualizedTable),eu=new g.Ay("table"),ep=c()("tab"),eh=c()("page down"),e_=c()("page up"),ef=c()("home"),eb=c()("end"),eg=c()("enter"),ey=c()("up"),eA={paddingLeft:40},ex=class DataTable extends i.PureComponent{static defaultProps={tableId:`data_table_${(0,v.r9)()}`,pinnedColumnCount:0,pinnedRowCount:1,rowIdKey:void 0,sortBy:void 0,sortDirection:void 0,rowHeight:D.pK,getRowStyle:void 0,onHighlightsSettled:void 0,height:D.Qk,width:D.Qk,isLoading:!1,isSearching:!1,isFetchingMoreRows:!1,searchQuery:void 0,onSort:d.A,onRowClick:d.A,fetchMoreRows:null,maxRowCount:1e4,rowFetchThreshold:15,getNoResultsMessage:d.A,emptyState:null,loadingState:null,dataQaPrefix:void 0,hasKeyboardFocus:!1,showHeader:!0,hasTwoLineHeader:!1,sendMessageToAnnouncerAPI:d.A,responsive:!1,hasSpacerColumn:!1,dynamicRowHeight:!1,rowContentAlign:D.x9.center};cellMeasurerCache;constructor(e){super(e),(0,b.v)(this,["getColumnChildren","getRowData","getRowHeight","getRowRenderedCallback","setArrowKeyNavRow","setScrollIndices","isDataRow","onRowFocusEnter","onRowKeyDown","onRowMouseEnter","onRowMouseLeave","onLoadMoreRowsClick","handleInfiniteLoader","renderTableRow","renderHeaderRow","renderTableCell","renderColumns","renderColumnHeader","recomputeDynamicRowHeights"]),this.getColumnChildren=(0,y.A)(this.getColumnChildren),this.getRowRenderedCallback=(0,y.A)(this.getRowRenderedCallback),this.onRowHighlightStylesSettled=(0,m.A)(this.onRowHighlightStylesSettled,1e3),this.state={arrowKeyNavActive:!1,scrollIndices:{rowStartIndex:0,rowStopIndex:0},focusedCellRowIndex:-2,hoveredRowIndex:null},this.hasDynamicRowHeight()&&(this.cellMeasurerCache=new h.jS({fixedWidth:!0,defaultHeight:D.J4[e.rowHeight||D.pK],minHeight:D.J4[e.rowHeight||D.pK]}))}componentDidUpdate(e){this.props.sortBy&&(e.sortBy!==this.props.sortBy||e.sortDirection!==this.props.sortDirection)&&this.props.sendMessageToAnnouncerAPI({message:this.getSortingChangeMessage()}),this.setPaginationLoadingMessage(e)}onRowFocusEnter({index:e,relatedEvent:t}){this.setState(()=>({arrowKeyNavActive:t?.keyCode!==ep,focusedCellRowIndex:e}))}onRowMouseEnter({index:e}){this.setState(()=>({hoveredRowIndex:e}))}onRowMouseLeave(){this.setState(()=>({hoveredRowIndex:null}))}onLoadMoreRowsClick(){let{fetchMoreRows:e,ariaLabel:t,hasKeyboardFocus:a}=this.props;e&&(a&&this.setState(()=>({arrowKeyNavActive:!0})),e(),this.props.sendMessageToAnnouncerAPI({message:eu.t("{tableAriaLabel} is loading more rows",{tableAriaLabel:t}),assertive:!0,uuid:(0,A.A)()}))}onRowKeyDown(e){let{showHeader:t,isFetchingMoreRows:a}=this.props,{focusedCellRowIndex:n}=this.state,r=e?.keyCode,i=this.getRowCount()-1,l=null,o=0;switch(r){case e_:l=n-10;break;case eh:l=n+10;break;case ef:l=0;break;case eb:l=i;break;case ey:if(t&&0===n)l=D.uI,o=D.uI;else if(n===D.uI)return void e.stopPropagation();break;case eg:{let e=this.shouldShowLoadMore(n);!a&&e&&this.onLoadMoreRowsClick()}}null!==l&&this.setState(()=>({arrowKeyNavActive:!0,focusedCellRowIndex:Math.min(Math.max(l,o),i)}))}onRowHighlightStylesSettled(){let{onHighlightsSettled:e}=this.props;e&&e()}getColumnChildren(e){return i.Children.toArray(e).filter(e=>i.isValidElement(e))}getRowCount(){let{data:e,isFetchingMoreRows:t,fetchMoreRows:a}=this.props;return t||(0,u.A)(a)?e.length+1:e.length}getRowData({index:e}){return this.props.data[e]??null}getHeaderHeight(){let{showHeader:e,hasTwoLineHeader:t}=this.props;return e?t?D.MO.TWO_LINE:D.MO.ONE_LINE:0}getDataRowHeight(){let{rowHeight:e}=this.props;return D.J4[e||D.pK]}getRowHeight({index:e}){let{data:t}=this.props;return e>=t.length?D.J4.medium:this.hasDynamicRowHeight()&&this.cellMeasurerCache?this.cellMeasurerCache.rowHeight({index:e+1}):this.getDataRowHeight()}getRowRenderedCallback(e,t){return({startIndex:a,stopIndex:n})=>{e({startIndex:a,stopIndex:n});let r={rowStartIndex:a,rowStopIndex:n};t(r),this.setScrollIndices(r)}}getSortingChangeMessage(){let{ariaLabel:e,sortBy:t,sortDirection:a,children:n}=this.props,r=this.getColumnChildren(n).find(e=>e.props.dataKey===t);if(!r)return e;let{headerAriaLabel:i,label:l,dataKey:o}=r.props,s=o;return i&&"string"==typeof i?s=i:"string"==typeof l&&(s=l),a===D.Pg.ASC?eu.t("{tableAriaLabel} is now sorted by {fieldName}, ascending",{fieldName:s,tableAriaLabel:e}):eu.t("{tableAriaLabel} is now sorted by {fieldName}, descending",{fieldName:s,tableAriaLabel:e})}setPaginationLoadingMessage({isFetchingMoreRows:e,data:t}){let{isLoading:a,isFetchingMoreRows:n,data:r,ariaLabel:i}=this.props,l=r.length>t.length;!a&&e&&!n&&l&&this.props.sendMessageToAnnouncerAPI({message:eu.t("New rows have loaded to the {tableAriaLabel}",{tableAriaLabel:i})})}setScrollIndices(e){this.setState(()=>({scrollIndices:{...e}}))}setArrowKeyNavRow({scrollToRow:e}){let{arrowKeyNavActive:t,focusedCellRowIndex:a}=this.state,n=t?e:a;this.setState(()=>({arrowKeyNavActive:!0,focusedCellRowIndex:n}))}hasDynamicRowHeight(){let{dynamicRowHeight:e,pinnedColumnCount:t}=this.props;return should_render_multi_grid({pinnedColumnCount:t,dynamicRowHeight:e})&&!!e}recomputeDynamicRowHeights(){this.hasDynamicRowHeight()&&this.cellMeasurerCache?.clearAll()}isDataRow(e){return void 0!==e&&!!this.props.data[e]}shouldShowLoadMore(e){let{fetchMoreRows:t}=this.props;return(0,u.A)(t)&&!this.isDataRow(e)&&e!==D.uI}resolveCustomColumn(e){let{type:t,props:a}=e;if(!(0,u.A)(t)||t?.prototype?.render)return this.props.logger.warn("Custom columns must be defined as function components"),e;let n=t(a);return null===n||"boolean"==typeof n?null:(i.isValidElement(n)&&"string"!=typeof n.type&&n.type?.isDefaultTableColumn||this.props.logger.warn("Custom column components must render a TableColumn"),i.isValidElement(n))?n:null}resolveGetRowStyle(e,t){let{getRowStyle:a,onHighlightsSettled:n}=this.props;if(!a)return;let r=a({rowData:e,index:t});if(r)return r===D.z$.highlight&&n&&this.onRowHighlightStylesSettled(),r}handleInfiniteLoader(){let{fetchMoreRows:e,hasKeyboardFocus:t,isFetchingMoreRows:a}=this.props,{scrollIndices:n,arrowKeyNavActive:r}=this.state,{rowStartIndex:i}=n;r||t||!a&&i>0&&(0,u.A)(e)&&e()}renderHeaderRow({key:e,style:t,...a}){let{showHeader:n,dataQaPrefix:r,hasKeyboardFocus:l}=this.props,{focusedCellRowIndex:o,arrowKeyNavActive:s}=this.state;if(!n)return null;let c=l&&s&&o===D.uI;return i.createElement(j,{isHeader:!0,key:e,style:t,rowProps:a,dataQaPrefix:r,isFocused:c,onKeyDown:this.onRowKeyDown,onFocusEnter:this.onRowFocusEnter})}renderTableCell({children:e,align:t}){return a=>{let{rowHeight:n,dataQaPrefix:r,rowIdKey:l}=this.props,o={...a,rowHeight:n,align:t,dynamicRowHeight:this.hasDynamicRowHeight()};return i.createElement(T,{dataQaPrefix:r,rowIdKey:l,cellData:o,cellComponent:e})}}renderColumnHeader({columnData:e,label:t,sortBy:a,dataKey:n}){let{sortDirection:r,showHeader:l,hasTwoLineHeader:o,dataQaPrefix:s}=this.props;return l?i.createElement(H,{...e,dataQaPrefix:s,dataKey:n,headerLabel:t,hasTwoLineHeader:o,sortBy:a,sortDirection:r}):null}renderColumns(e){let{hasSpacerColumn:t}=this.props,a=[...e];t&&a.push(i.createElement(table_spacer_column,{width:40}));let n={};return a.map((e,t)=>{let a=e.type.isDefaultTableColumn?e:this.resolveCustomColumn(e);if(!a)return null;let{props:r}=a,{dataKey:l,align:s,headerAlign:c,sortable:d,label:m,getCellData:u,headerAriaLabel:p,headerInfoText:_,headerIconProps:f,headerTooltipClassName:b,headerAutoClogProps:g,defaultSortDirection:y}=r;n[l]&&this.props.logger.warn(`Multiple columns with dataKey="${l}" detected. Non-unique values may cause unintended behavior.`),n[l]=!0;let A=c||s,x=o()("c-data_table__header_column",{"c-data_table__header_column--align_right":A===D.nk.right,"c-data_table__header_column--align_center":A===D.nk.center});return i.createElement(h.VP,{"aria-label":"string"==typeof p?p:void 0,key:e.key,...r,columnData:{label:m,headerAriaLabel:p,headerInfoText:_,headerIconProps:f,headerTooltipClassName:b,headerAutoClogProps:g,columnIndex:t,isSortable:d},disableSort:!d,className:o()("c-data_table__row_column",r.className),headerClassName:o()(x,r.className),cellDataGetter:e=>e?.rowData===null?null:u?u(e):e?.rowData?.[e?.dataKey],headerRenderer:e=>this.renderColumnHeader(e),cellRenderer:this.renderTableCell(r),defaultSortDirection:y?get_react_virtualized_sort_direction(y):void 0})})}renderTableRow({key:e,style:t,...a}){let{rowIdKey:n,dataQaPrefix:r,isFetchingMoreRows:l,hasKeyboardFocus:o,onRowClick:s}=this.props,{focusedCellRowIndex:c,arrowKeyNavActive:d,hoveredRowIndex:m}=this.state,{rowData:u,index:p}=a,h=this.isDataRow(p),_=o&&d&&c===p,f=p===m;return i.createElement(j,{key:String(u?.[n]??e),style:t,rowProps:a,rowIdKey:n,rowStyle:h?this.resolveGetRowStyle(u,p):void 0,dataQaPrefix:r,isLoading:l&&!h,isFocused:_,isHovered:f,showLoadMore:this.shouldShowLoadMore(p),fetchMoreRows:this.onLoadMoreRowsClick,onClick:s,onKeyDown:this.onRowKeyDown,onFocusEnter:this.onRowFocusEnter,onMouseEnter:this.onRowMouseEnter,onMouseLeave:this.onRowMouseLeave})}renderBodyOverlay({tableWidth:e,tableHeight:t,className:a,content:n,dataQaSuffix:r="data_table_body_overlay"}){let{dataQaPrefix:l}=this.props,o=this.getHeaderHeight();return i.createElement("div",{className:a,style:{top:o,height:`${t-o}px`,width:`${e}px`},"data-qa":formatDataQa({dataQaPrefix:l,dataQaSelector:r})},n)}renderLoadingSpinner(e,t){let a,{loadingState:n}=this.props;return a=(0,u.A)(n)?n():n||i.createElement(C.A,{color:"blue",size:"jumbo"}),this.renderBodyOverlay({tableWidth:e,tableHeight:t,className:"c-data_table__spinner",content:a,dataQaSuffix:"data_table_loading_spinner"})}renderNoResultsState(e,t,a){let n,{emptyState:r,getNoResultsMessage:l}=this.props,o=l?l(e):void 0;return((0,u.A)(r)?n=r():r?n=r:o&&(n=i.createElement(k.A,{description:o})),n)?this.renderBodyOverlay({tableWidth:t,tableHeight:a,className:"c-data_table__no_results",dataQaSuffix:"data_table_no_results",content:n}):null}render(){let{tableId:e,data:t,height:a,width:n,isLoading:r,isSearching:l,searchQuery:s,sortBy:c,sortDirection:d,onSort:m,maxRowCount:u,rowFetchThreshold:f,pinnedColumnCount:b,pinnedRowCount:g,hasKeyboardFocus:y,ariaLabel:A,dataQaPrefix:x,responsive:E,hasSpacerColumn:C,rowContentAlign:k,dynamicRowHeight:v}=this.props,{focusedCellRowIndex:S}=this.state,w=this.getHeaderHeight(),T=a===D.Qk?this.getDataRowHeight()+w:0,N=this.getColumnChildren(this.props.children),M=this.getRowCount(),R=N.length,P=this.renderColumns(N),L=[A];r&&L.push(eu.t("Data Loading"));let O=o()("c-data_table",`c-data_table--align_${k}`,{"c-data_table--focus-visible":y,"c-data_table--responsive":E}),F=i.createElement(h.wK,{isRowLoaded:({index:e})=>!!t[e],loadMoreRows:this.handleInfiniteLoader,rowCount:u,threshold:f},({onRowsRendered:o,registerChild:u})=>i.createElement(_.A,{disableHeight:a!==D.Qk,disableWidth:n!==D.Qk,style:{minHeight:`${T}px`},onResize:this.recomputeDynamicRowHeights},({width:_=n,height:f=a})=>i.createElement(h.e9,{isControlled:!0,mode:"cells",columnCount:R,rowCount:M,scrollToRow:S,onScrollToChange:this.setArrowKeyNavRow},({onSectionRendered:n})=>i.createElement(I,{disable:a!==D.JJ},({tableHeight:a=f})=>i.createElement("div",{id:e,className:O,style:{width:_,height:Math.max(a,T)}},i.createElement(em,{containerProps:{"data-qa":formatDataQa({dataQaPrefix:x,dataQaSelector:"data_table_body"})},"aria-label":L.join(" "),innerRef:u,tabIndex:-1,scrollToAlignment:"auto",sortBy:c,sortDirection:d,height:Math.max(a,T),width:_,headerRowRenderer:this.renderHeaderRow,headerHeight:w,gridClassName:"c-data_table__body",rowHeight:this.getRowHeight,deferredMeasurementCache:this.cellMeasurerCache,rowCount:M,rowGetter:this.getRowData,rowRenderer:this.renderTableRow,onRowsRendered:this.getRowRenderedCallback(o,n),scrollToIndex:S,isDataRow:this.isDataRow,sort:m||DataTable.defaultProps.onSort,idPrefix:e||DataTable.defaultProps.tableId,pinnedColumnCount:b||DataTable.defaultProps.pinnedColumnCount,pinnedRowCount:g||DataTable.defaultProps.pinnedRowCount,isLoading:r||l||DataTable.defaultProps.isLoading||DataTable.defaultProps.isSearching,dynamicRowHeight:v||DataTable.defaultProps.dynamicRowHeight},P),r||l?this.renderLoadingSpinner(_,a):null,!l&&!r&&(0,p.A)(t)?this.renderNoResultsState(s,_,a):null)))));return C?i.createElement("div",{className:"c-data_table--has_spacer_column",style:eA},F):F}};function DataTableWithHOCProps(e){let{sendMessageToAnnouncerAPI:t}=(0,i.useContext)(x.A),a=(0,i.useContext)(E.A),n=(0,f.U)();return i.createElement(ex,{...e,sendMessageToAnnouncerAPI:t,hasKeyboardFocus:a,logger:n})}ex.displayName="DataTable",DataTableWithHOCProps.displayName="DataTableWithHOCProps";let eE=DataTableWithHOCProps},0x17f9141f1:(e,t,a)=>{"use strict";a.d(t,{a:()=>DynamicTableCell});var n=a(0xbad225b5);function DynamicTableCell({tableCellData:e,refreshRowHeight:t}){return(0,n.useEffect)(()=>{t&&t()},[e,t]),(0,n.isValidElement)(e)?n.cloneElement(e):n.createElement(n.Fragment,null,e)}},0x12f409c9c:(e,t,a)=>{"use strict";a.d(t,{nk:()=>m.nk,bQ:()=>n.A,MO:()=>m.MO,x9:()=>m.x9,FL:()=>m.FL,J4:()=>m.J4,z$:()=>m.z$,Qk:()=>m.Qk,JJ:()=>m.JJ,Pg:()=>m.Pg,nA:()=>r.A,Ve:()=>i.A,Uk:()=>table_row_actions_column,r9:()=>i.r});var n=a(0xa8101a76),r=a(0x2377ba67d),i=a(0xf4ca14c2),l=a(0xbad225b5),o=a(0x33644bb7),s=a(0x20482ad21),c=a(0x48bf5f55);let d=new s.Ay("table"),table_row_actions_column=({showActionButton:e=!0,renderActionButtonCoachmark:t,onActionButtonClick:a,renderMenu:n,buttonAriaLabel:r,actionButtonAutoClogProps:s,...m})=>l.createElement(i.A,{headerAriaLabel:d.t("Actions"),className:"c-data_table__row_column--no_padding",...m},i=>l.createElement(c.A,{showActionButton:(0,o.A)(e)?e(i):e,renderActionButtonCoachmark:(0,o.A)(t)?t(i):null,onActionButtonClick:(0,o.A)(a)?a(i):null,buttonAriaLabel:(0,o.A)(r)?r(i):r,renderMenu:e=>n(e,i),actionButtonAutoClogProps:s}));var m=a(0x15513c993)},0x197a7490d:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x7d48dd65),l=a(0x1aba66b56),o=a(0x12f409c9c),s=a(0x54b8110a);let MultiSelectTable=({data:e,children:t,rowIdKey:a,getRowStyle:c,pinnedColumnCount:d,onRowClick:m,renderTableSelectColumn:u=!0,checkboxAriaLabel:p,checkboxDisabled:h,selectOnRowClick:_,showSelectAll:f,selectedRows:b,showOnlySelected:g=!1,selectAllChecked:y,selectAllIndeterminate:A,onRowSelect:x=r.A,onSelectAll:E,...C})=>{let k=(0,n.useCallback)(({rowData:e,...t})=>{let n=c?.({rowData:e,...t});if(n||null===n)return n;let r=_?o.z$.selectable:null,i=String(e[a]);if(b?.includes(i)){let e=[o.z$.selected];return r&&e.push(r),e}return r},[c,_,b,a]),v=(0,n.useCallback)(({rowData:e,...t})=>{if(void 0!==e){if(c?.({rowData:e,...t})!==o.z$.inactive){let t=String(e[a]),n=!b?.includes(t);x({id:t,selected:n,selectedRows:(0,s.w)({selectedRows:b||[],id:t,selected:n})})}m?.({rowData:e,...t})}},[m,x,a,b,c]);return n.createElement(o.bQ,{...C,rowIdKey:a,data:g?(0,i.A)(e,e=>(0,l.A)(b,e[a])):e,pinnedColumnCount:u&&d&&d>0?d+1:d,getRowStyle:k,onRowClick:_?v:m},u&&n.createElement(s.A,{dataKey:"selection",flexGrow:0,flexShrink:0,rowIdKey:a,checkboxAriaLabel:p,checkboxDisabled:h,showSelectAll:f,selectedRows:b,selectAllChecked:y,selectAllIndeterminate:A,onRowSelect:x,onSelectAll:E}),t)};MultiSelectTable.displayName="MultiSelectTable";let c=MultiSelectTable},0x54b8110a:(e,t,a)=>{"use strict";a.d(t,{A:()=>table_select_column,w:()=>updateSelectedRows});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1673f3229),o=a(0x1cbdfeceb),s=a(0x33644bb7),c=a(0x20482ad21),d=a(0x11a296110),m=a(0x45bd075);let TableSelectCell=({ariaLabel:e,checked:t=!1,indeterminate:a=!1,onSelect:r=o.A,disabled:i=!1,dataQa:l})=>{let s=(0,n.useCallback)(()=>r(!t),[r,t]);return n.createElement(d.Nm,{className:"c-table_select_cell",onClick:s,tabIndex:-1,role:"checkbox","aria-checked":a?"mixed":t,"aria-label":e,disabled:i,"data-qa":l},n.createElement(m.A,{checked:t,indeterminate:a,"aria-label":e,"aria-hidden":"true",disabled:i}))};TableSelectCell.displayName="TableSelectCell";var u=a(0xd5892119);let p=new c.Ay("table"),updateSelectedRows=({selectedRows:e,id:t,selected:a})=>a?[...e,t]:(0,l.A)(e,t),table_select_column=({rowIdKey:e,checkboxAriaLabel:t,checkboxDisabled:a=!1,showSelectAll:r=!0,selectedRows:l=[],selectAllChecked:c=!1,selectAllIndeterminate:d=!1,onRowSelect:m=o.A,onSelectAll:h=o.A,..._})=>n.createElement(u.Ay,{label:r?n.createElement(TableSelectCell,{ariaLabel:p.t("Select all"),dataQa:"table_select_column_select_all_checkbox_button",checked:c,indeterminate:d,onSelect:e=>h({selected:e}),disabled:!(0,s.A)(a)&&a}):null,headerAriaLabel:p.t("Row selection, {count, plural, =1 {# row} other {# rows}} selected",{count:l.length}),width:37,..._,className:i()("c-table_select_column",_.className)},r=>{let i=String(r.rowData[e]);return n.createElement(TableSelectCell,{ariaLabel:(0,s.A)(t)?t(r):t,checked:l.includes(i),onSelect:e=>m({id:i,selected:e,selectedRows:updateSelectedRows({selectedRows:l,id:i,selected:e})}),disabled:(0,s.A)(a)?a(r):a})})},0x2377ba67d:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x128d54e52),o=a(0x15513c993);let s=n.memo(({size:e=o.pK,text:t,subtext:a,metadata:r,align:s=o.nk.left,dynamicRowHeight:c})=>{let d=i()("c-table_cell",{"c-table_cell--small":e===o.FL.small,"c-table_cell--medium":e===o.FL.medium,"c-table_cell--align_left":s===o.nk.left,"c-table_cell--align_right":s===o.nk.right,"c-table_cell--align_center":s===o.nk.center});return c?n.createElement("div",{className:d,style:{justifyContent:s}},t):n.createElement(l.Ay,{className:d,size:e,text:n.createElement(l.CG,null,t),subtext:n.createElement(l.sT,null,a),metadata:n.createElement(l.Q,null,r)})});s.isDefaultTableCell=!0;let c=s},0xf4ca14c2:(e,t,a)=>{"use strict";a.d(t,{A:()=>r,r:()=>n.r9});var n=a(0xd5892119);let r=n.Ay},0xd5892119:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>n,Ve:()=>TableColumn,r9:()=>createTableColumn});let TableColumn=e=>null;TableColumn.isDefaultTableColumn=!0;let createTableColumn=()=>TableColumn,n=TableColumn},0x48bf5f55:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x11fe26014);let TableRowActions=({className:e="",renderMenu:t,buttonAriaLabel:a,showActionButton:r=!0,onActionButtonClick:s=l.A,actionButtonAutoClogProps:c,renderActionButtonCoachmark:d})=>{let m=(0,n.useMemo)(()=>({renderMenu:t,width:"auto",children:null}),[t]);if(r){let t=i()("c-table_row_actions",e);return n.createElement("div",{className:t},d,n.createElement(o.A,{onMenuTriggerClick:s,"data-qa":"table_row_actions_button",icon:"ellipsis",ariaLabel:a,menuProps:m,autoClogProps:c}))}return null};TableRowActions.displayName="TableRowActions";let s=TableRowActions},0x1fd3f6e20:(e,t,a)=>{"use strict";a.d(t,{u:()=>d,v:()=>Tag});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0xa6f3163b),s=a(0x179bff8ac),c=a.n(s),d=((n={}).Informative="informative",n.InverseInformative="inverse-informative",n.Gray="gray",n.Horchata="horchata",n.Honeycomb="honeycomb",n.Flamingo="flamingo",n.Aubergine="aubergine",n.Indigo="indigo",n.Lagoon="lagoon",n.Jade="jade",n.Grass="grass",n.Themed="themed",n);let Tag=({children:e,style:t,onClick:a,onKeyDown:n,dataQa:i="tag",isMicro:s=!1,autoClogProps:d})=>{let m=(0,r.useMemo)(()=>({[c().informative]:"informative"===t,[c().inverseInformative]:"inverse-informative"===t,[c().gray]:"gray"===t,[c().horchata]:"horchata"===t,[c().honeycomb]:"honeycomb"===t,[c().flamingo]:"flamingo"===t,[c().aubergine]:"aubergine"===t,[c().indigo]:"indigo"===t,[c().lagoon]:"lagoon"===t,[c().jade]:"jade"===t,[c().grass]:"grass"===t,[c().themed]:"themed"===t}),[t]),u=l()(c().tag,m,{[c().micro]:s});return(0,r.useMemo)(()=>!!(a||n),[n,a])?r.createElement(o.A,{autoClogProps:d,className:u,"data-qa":`${i}-button`,"data-sk":"tag-button",onKeyDown:n,onClick:a},e):r.createElement("span",{className:u,"data-qa":`${i}-span`,"data-sk":"tag-span"},e)};Tag.displayName="Tag"},0x4bb14979:(e,t,a)=>{"use strict";a.d(t,{g5:()=>getOptionFromHHmm,me:()=>getTimePickerHourOptions,sq:()=>getHalfHourOptions});var n=a(0xb5e49867),r=a(0x5359476e),i=a(0x20ef3966f),l=a(0x1f355b555),o=a(0x13776886e);let getOption=(e,t,a)=>{let n=(0,l.Ay)("2020-01-01").hour(e).minute(t),r=(0,o.A)(n.unix(),"{time}",{do24hrTime:a});return{value:n.format("HH:mm"),label:r}},getOptionFromHHmm=(e,t)=>{let[a,n]=e.split(":");return getOption(parseInt(a,10),parseInt(n,10),t)},getTimePickerHourOptions=(e,t=60)=>{let a=(0,n.A)(24),l=(0,n.A)(0,60,t);return(0,r.A)(a,t=>(0,i.A)(l,a=>getOption(t,a,e)))},getHalfHourOptions=e=>getTimePickerHourOptions(e,30)},0x9154b87c:(e,t,a)=>{"use strict";a.d(t,{b1:()=>C,Ay:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x237b6a339),s=a(0x3b6d144f),c=a(0x1c4816103),d=a(0xe0376d2),m=a(0x1e1603503),u=a(0x77a36d88),p=a(0x1e49806fc);function parseTime(e,{normalizedFmt:t="HH:mm",includeMeridiem:a=(0,m.b)()}={}){let n=(0,p.A)(e?.trim()?.toLocaleLowerCase())??"";if(!n)return[];let r=/^(.*)(\d)(\d\d)(?!\d)(.*)/.exec(n);r&&(n=`${r[1]}${r[2]}:${r[3]}${r[4]}`);let i=(0,m.b)(),l=[];return(a?["LT"]:["LT","HH:mm"]).forEach(e=>{let r=(0,u.A)(n,e);if(r.isValid()&&(l.push(r.format(t)),a&&i)){let e=r.hour();e>=1&&e<=12&&!r.parsingFlags().meridiem&&l.push(r.add(12,"hours").format(t))}}),(0,d.A)(l)}var h=a(0x20482ad21),_=a(0x11dc1e636),f=a(0x15014e268),b=a(0x1d1911997),g=a(0x2501a2cee),y=a(0x4bb14979),A=a(0x21cf37dc6),x=a(0x543aca4e);let E=new h.Ay("date_time_picker"),C={FIVE_MINUTE:"five_minute",TEN_MINUTE:"ten_minute",TWENTY_MINUTE:"twenty_minute",QUARTER_HOUR:"quarter",HALF_HOUR:"half",FULL_HOUR:"full"},timeFromStringToInt=e=>parseInt(e.replace(":",""),10),TimePicker=({allowCustomInput:e=!0,autoClogProps:t,isDisabled:a=!1,isInvalid:r=!1,isRequired:d=!1,max:m="23:59",min:u="0:00",onChange:p=l.A,onBlur:h=l.A,onEsc:k=l.A,renderOption:v,onOptionsListClose:S=l.A,optionsHourIncrement:I=C.FULL_HOUR,placeholderText:w,showTimeZone:T=!0,size:N=A.o.Medium,timeZone:M,value:R,timeZoneClassName:P,selectClassName:L,...O})=>{let{timeZone:D,locale:F=_.Xn,enable24hrTime:U}=(0,x.ow)(),B=M??(D?(0,c.A)(D,F):null),H=(0,n.useCallback)(e=>{if(!e?.value)return!d;let t=timeFromStringToInt(e.value),a=timeFromStringToInt(u),n=timeFromStringToInt(m);return!!(t>=a)&&!!(t<=n)},[d,m,u]),W=(0,s.A)(()=>{let e;switch(I){case C.FIVE_MINUTE:e=(0,y.me)(U,5);break;case C.TEN_MINUTE:e=(0,y.me)(U,10);break;case C.QUARTER_HOUR:e=(0,y.me)(U,15);break;case C.TWENTY_MINUTE:e=(0,y.me)(U,20);break;case C.HALF_HOUR:e=(0,y.me)(U,30);break;case C.FULL_HOUR:default:e=(0,y.me)(U)}return e.filter(H)},[I,H,U]),V=(0,s.A)(()=>{let e=R?(0,y.g5)(R,U):null;return H(e)||(e=null),e},[U,H,R]),G=(0,s.A)(()=>(0,o.A)("time-picker-")),[q,j]=(0,n.useState)({selectId:G,filterQuery:"",options:W,selectedOption:V,initialActiveOption:V}),z=(0,n.useRef)(null),K=(0,n.useRef)([]),$=(0,n.useCallback)(()=>{"function"==typeof z.current?.setSelectionRange&&V&&V.label===z.current?.value&&z.current.select()},[V]),Y=(0,n.useCallback)(e=>{if(!e)return null;let t=parseTime(e,{includeMeridiem:!U}).map(e=>(0,y.g5)(e,U)).filter(H),a=e.toLocaleLowerCase().replace(/\s/g,"");return(U?null:t.find(e=>a===e.label.toLocaleLowerCase().replace(/\s/g,"")))||t[0]||null},[U,H]),Q=(0,n.useCallback)((e,t)=>{t&&K.current.push(t),j(t=>{let a={...t,...e(t)};if(a.isExpanded&&!t.isExpanded){let e=Y(R);a={...a,filterQuery:e?.label??"",isInvalid:!1,initialActiveOption:e}}else if(a.filterQuery&&a.filterQuery!==t.filterQuery){let e=Y(a.filterQuery);a={...a,isInvalid:!e,initialActiveOption:e}}else a.filterQuery?.trim()||!a.isExpanded||d||(a={...a,initialActiveOption:{value:null}});return a})},[Y,d,R]);(0,n.useEffect)(()=>{K.current.forEach(e=>e()),K.current=[]});let Z=(0,n.useCallback)(e=>{H(e)&&e?.value!==V?.value&&(j(t=>({...t,initialActiveOption:e})),p(e?.value??null))},[H,p,V]),{initialActiveOption:J}=q,X=(0,n.useCallback)(e=>{Z(J),j(e=>({...e,isInvalid:!1,isExpanded:!1})),h(e)},[Z,J,h]),ee=(0,n.useCallback)(()=>{let e=Y(R)?.label??"";j(t=>({...t,filterQuery:e,initialActiveOption:null})),k?.()},[Y,k,R]),et=(0,n.useCallback)(e=>n.createElement("div",{className:"c-time_picker__selected-option-wrapper"},n.createElement("span",{className:"c-time_picker__option-icon"},n.createElement(g.Ah,{name:"clock"})),n.createElement("span",null,e.label)),[]),ea=E.t("Time"),en=r||q.isInvalid,er=(0,n.useMemo)(()=>({...q,options:W,selectedOption:V,isInvalid:en,isRequired:d,isDisabled:a}),[a,en,d,W,V,q]);return n.createElement("div",null,e?n.createElement(b.JJ,{key:G,selectState:er,setSelectState:Q,inputRef:z,inputIcon:"clock-o",onBlur:X,onEsc:ee,onOpen:$,renderOption:v,onOptionSelected:Z,onOptionsListClose:S,placeholderText:w||ea,isInvalid:en,isRequired:d,isDisabled:a,selectAllOnFocus:!0,size:N,autoClogProps:t,overlayClassName:"c-popover c-time_picker__popover_overlay",classPrefix:"c-time_picker",className:L,...O}):n.createElement(f.Ay,{key:G,options:W,onOptionSelected:Z,selectedOption:V,renderSelectedOption:et,placeholderText:w||ea,size:N,isInvalid:en,isRequired:d,isDisabled:a,className:L,...O}),T&&B&&n.createElement("p",{className:i()("c-time_picker__timezone-caption",P)},E.t("Time zone: {timeZone}",{timeZone:B})))};TimePicker.displayName="TimePicker";let k=TimePicker},0x167c26d3:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x15e48057c),l=a(0x11a296110),o=a(0x1d71c4455),s=a(0xbb0c5132);let c=new r.Ay("toast"),d=(0,n.forwardRef)(({children:e,duration:t=6e3,buttonText:a,buttonType:r=o.Q.outline,buttonIcon:d,onButtonClick:m,type:u,svgIconProps:p,toastClasses:h,offsetY:_,onCloseComplete:f,shouldSkipToastDismissal:b,svgIconClassName:g,closeButtonClasses:y,customButton:A,forceFocusAfterRender:x=!1},E)=>{let C=(0,n.useContext)(i.A),k={Error:c.t("Error"),Information:c.t("Information"),Warning:c.t("Warning")},v=u&&k[u];return n.createElement(s.Ay,{forceFocusAfterRender:C||x,fadeDelay:t,role:"dialog","aria-label":v,shouldSkipToastDismissal:b,svgIconClassName:g,svgIconProps:p,toastClasses:h,offsetY:_,onCloseComplete:f,closeButtonClasses:y,ref:E},n.createElement("div",null,e),A||n.createElement(l.Ay,{type:r,icon:d,onClick:m,size:"small"},a))})},0x6e87d4ec:(e,t,a)=>{"use strict";a.d(t,{A:()=>Toast});var n=a(0xbad225b5),r=a(0x9f7220f0),i=a(0xbb0c5132);let Toast=({children:e,duration:t=6e3,svgIconProps:a,toastClasses:l,position:o,offsetX:s,offsetY:c,showCloseButton:d,onCloseClick:m,onCloseComplete:u,shouldAutoFade:p,shouldSkipToastDismissal:h,closeButtonClasses:_,svgIconClassName:f,announceContentAsAssertive:b,closeButtonAutoClogProps:g,announcerAPIMessage:y,closeButtonTooltipText:A})=>n.createElement(i.Ay,{fadeDelay:t,svgIconClassName:f,svgIconProps:a,toastClasses:l,offsetX:s,offsetY:c,position:o,showCloseButton:d,onCloseClick:m,onCloseComplete:u,shouldAutoFade:p,shouldSkipToastDismissal:h,closeButtonClasses:_,closeButtonAutoClogProps:g,closeButtonTooltipText:A},y?n.createElement(n.Fragment,null,n.createElement(r.A,{message:y,assertive:b}),e):n.createElement(r.z,{assertive:b},e));Toast.displayName="Toast"},0x186b638d6:(e,t,a)=>{"use strict";a.d(t,{F:()=>n,n:()=>r});let n={small:"small",medium:"medium",large:"large"},r={small:22,medium:26,large:32}},0xbe505324:(e,t,a)=>{"use strict";a.d(t,{A:()=>b,t:()=>p});var n,r=a(0xbad225b5),i=a(0x9e671ad),l=a(0x18f2150ea),o=a(0x14fad6485),s=a(0x1f022ebd9),c=a(0xc6a2c86f),d=a(0x1df96de4c),m=a(951303e3),u=a(0x9844ea22),p=((n=p||{}).Horizonatal="horizontal",n.Vertical="vertical",n);let h=["ArrowRight","ArrowDown"],_=["ArrowUp","ArrowLeft"].concat(h),f=["Home","End"].concat(_),b=(0,r.forwardRef)(({children:e,orientation:t="horizontal","aria-label":a,activeItemIndex:n,nodeRef:p,insertedButtons:b,onFocusedElementRemoved:g,onFocus:y,...A},x)=>{let E=(0,r.useRef)(null),C=p||E,[k,v]=(0,r.useState)(n??0),{windowRef:S}=(0,o.ox)(),I=(0,r.useRef)(),[w,T]=(0,r.useState)(d.Ml),N=(0,r.useCallback)(()=>{if(void 0!==I.current)return;let e=S.deref();I.current=e?.requestAnimationFrame(function(){I.current=void 0;let e=C.current;if(!e)return;let t=Array.from(e.querySelectorAll('button:not([disabled]),a,input[type="button"]:not([disabled]),input[type="submit"]:not([disabled]),input[type="reset"]:not([disabled]),input[type="color"]:not([disabled]),input[type="radio"]:not([disabled]),input[type="checkbox"]:not([disabled]),select:not([disabled]),[role="button"]:not([disabled]),[role="checkbox"]:not([disabled]),[role="link"]:not([disabled]),[role="listbox"]:not([disabled]),[role="radio"]:not([disabled])')||d.Ml)?.filter(e=>e.offsetHeight).filter(e=>!e.matches('[role=toolbar] [aria-hidden="true"] *'));(0,i.A)(w,t)||T(t)})},[S,w,C]);function onHome(){let e=w[0];e?.focus()}function onEnd(){let e=w[w.length-1];e?.focus()}function onArrowKey(e){let{key:t,target:a}=e,n=w.indexOf(a),r=w[h.includes(t)?n+1:n-1];r?.focus()}function onKeyDown(e){let{key:t,target:a,currentTarget:n,ctrlKey:r,shiftKey:i,metaKey:l,altKey:o}=e;if(!i&&!l&&!r&&!o&&n.contains(a)&&f.includes(t)){if(e.preventDefault(),_.includes(t))return void onArrowKey(e);if("Home"===t)return void onHome();onEnd()}}function onFocus(e){let{target:t,currentTarget:a}=e;if(!a.contains(t))return;let n=w[k];n?.setAttribute("tabindex","-1"),t.setAttribute("tabindex","0"),v(w?.findIndex(e=>e===t)||0),y?.(e)}0===w.length&&N();let M=w[k],R=(0,c.A)(M?(0,m.O)(M):void 0),P=(0,c.A)(b);(0,s.A)(()=>{if((0,l.A)(n)&&w[n])return void v(n);let e=R?.deref(),t=e?w.indexOf(e):-1;-1===t||P!==b?v(0):t!==k&&v(t)},[n,w]),(0,r.useEffect)(()=>{w.forEach((e,t)=>{let a=t===k?"0":"-1";e.setAttribute("tabindex",a)})},[k,w]),(0,r.useEffect)(()=>{N()},[N,e,b]);let L=(0,r.useCallback)(()=>{let e=w[k];return!!e&&(e.focus(),!0)},[w,k]);return(0,r.useImperativeHandle)(x,()=>({focus:L,getButtons:()=>w}),[L,w]),r.createElement(u.A,{onFocusedElementRemoved:g??L},r.createElement("div",{ref:C,role:"toolbar","aria-orientation":t,"aria-label":a,onKeyDown:onKeyDown,onFocus:onFocus,...A},e))})},0x15513c993:(e,t,a)=>{"use strict";a.d(t,{FL:()=>f,J4:()=>b,JJ:()=>m,MO:()=>g,Pg:()=>h,Qk:()=>d,nk:()=>s,pK:()=>u,uI:()=>_,x9:()=>c,z$:()=>p});var n,r,i,l,o=a(0x1535e80f3),s=((n={}).left="left",n.center="center",n.right="right",n),c=((r={}).top="top",r.center="center",r.bottom="bottom",r);let d="auto",m="viewport",u=o.ny.medium;var p=((i={}).inactive="inactive",i.selectable="selectable",i.selected="selected",i.hover="hover",i.header="header",i.highlight="highlight",i.warning="warning",i.error="error",i),h=((l={}).ASC="asc",l.DESC="desc",l);let _=-1,f={small:o.ny.small,medium:o.ny.medium},b={small:44,medium:60},g={ONE_LINE:36,TWO_LINE:54}},0x6817b511:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x72b537b5),o=a(0x14fad6485),s=a(0x20482ad21),c=a(0x2501a2cee),d=a(0x1a9c9ada0);let m=new s.Ay("messages");let BaseDegradedList=class BaseDegradedList extends d.B{static defaultProps={...d.B.defaultProps,reachedStart:!1,reachedEnd:!1};pendingUpdate;overscan;startKey;endKey;startTop;endBottom;scrollAnimation;constructor(e){super(e),this.pendingUpdate=!1,this.recomputeOffsets(e),this.overscan=Math.max(200,e.height/2),this.startTop=0,this.endBottom=0}componentDidUpdate(e,t){super.componentDidUpdate(e,t),0===this.props.keys.length&&this.loadMore(),this.layout.setBottomMargin(this.getLoadingOffsetBottom()),this.pendingUpdate=!1}determineInitialActiveItem(){this.props.isLoading||this.pendingUpdate||super.determineInitialActiveItem()}onKeyDownPageDown(e){this.state.hasKeyboardFocus&&this.isScrolledToBottom()&&this.props.reachedEnd?this.focusLastItemInView():super.onKeyDownPageDown(e)}onKeyDownPageUp(e){this.state.hasKeyboardFocus&&this.isScrolledToTop()&&this.props.reachedStart?this.focusFirstItemInView():super.onKeyDownPageUp(e)}getOffset(){let e=this.getLoadingOffsetTop();return this.startTop-e}getLoadingOffsetTop(){return!this.props.keys.length||this.props.reachedStart&&0===this.state.start||this.layout.getTotalHeight()<=this.props.height?0:0!==this.state.start?96:56}getLoadingOffsetBottom(){return!this.props.keys.length||this.props.reachedEnd&&this.state.end===this.props.keys.length?0:96}getScrollTop(){return"number"==typeof this.scrollTop?this.scrollTop:"number"==typeof this.pendingScrollTop?this.pendingScrollTop:super.getScrollTop()+this.getOffset()}getContentHeight(){return this.endBottom-this.getOffset()+this.getLoadingOffsetBottom()}getTop(e){return this.layout.getTop(e)-this.getOffset()}getBottom(e){return this.layout.getBottom(e)-this.getOffset()}setScrollTop(e){let t=e<this.getOffset(),a=e+this.props.height>this.endBottom+this.getLoadingOffsetBottom();if(t&&0!==this.state.start||a&&this.state.end!==this.props.keys.length){this.scrollTop=e,this.relayout();return}super.setScrollTop(e-this.getOffset())}scrollToOffset(e,{animate:t,absolute:a}={}){if(!this.scrollbar||this.pendingUpdate)return;let n=a?e:e-this.getOffset();!a&&n>0&&n<this.getLoadingOffsetTop()&&(n=0);let r=this.bracketScrollTop(n);if(!a&&r!==n)return void this.setScrollTop(e);if(t){this.scrollAnimation=this.scrollbar.scrollWithAnimation(r);return}super.setScrollTop(r)}bracketScrollTop(e){return Math.max(0,Math.min(this.getContentHeight()-this.props.height,e))}resetRendered(){this.overscan=this.props.height/2}loadMore(e=this.state.start,t=this.state.end,a=this.props,n=this.getScrollTop()){let r=this.layout.getTotalHeight(),i=t===a.keys.length&&n+a.height>r-1,l=!a.keys.length||r<=a.height||0===e&&n<1,o=!a.keys.length||r<=a.height||i;return l&&o?a.loadAround():l?a.loadPre():!!o&&a.loadPost()}relayout(){this.setState((e,t)=>{if(t.isLoading)return null;let{start:a,end:n}=e,r=this.startKey,i=this.endKey;this.recomputeOffsets(t,a,n);let l=this.scrollbar&&this.scrollbar.scrollTop()||0,o=this.getScrollTop(),s=l-1<=0||o-1<=this.getOffset(),c=l+1>=this.getContentHeight()-t.height||o+1>=this.endBottom-t.height,d={start:a,end:n};if(this.startKey!==r||this.endKey!==i||s&&0!==a||c&&n!==t.keys.length){e.hasKeyboardFocus?this.resetRendered():e.scrolling&&(this.overscan=8e3);let{start:a,end:n}=d=this.computeBounds(t,o);this.recomputeOffsets(t,a,n),s=o-1<=this.getOffset(),c=o+t.height+1>=this.endBottom+this.getLoadingOffsetBottom()}(s&&0===d.start||c&&d.end===t.keys.length||this.layout.getTotalHeight()<t.height&&0===d.start)&&this.loadMore(a,n,t);let m=this.layout.getTops(),u=this.layout.getTotalHeight();return d.start===a&&d.end===n&&m===e.tops&&u===e.totalHeight?null:(this.scrollAnimation&&this.scrollAnimation.cancel(),this.pendingUpdate=!0,this.scrollTop=o,{...d,tops:m,totalHeight:u})})}recomputeOffsets(e=this.props,t=this.state.start,a=this.state.end){let n=this.layout.getTotalHeight()<=e.height;this.startKey=e.keys[t],this.endKey=e.keys[a-1],this.startTop=n?0:this.layout.getTop(this.startKey)||0,this.endBottom=this.layout.getBottom(this.endKey)||0}computeBounds(e=this.props,t){let a=t-this.overscan,n=t+e.height+this.overscan,r=super.getBounds(a,n);return this.snapBounds(e,r)}snapBounds(e=this.props,{start:t,end:a}){return{start:t<20?0:t,end:e.keys.length-a<20?e.keys.length:a}}renderLoading(e,t){let a=this.props.isOffline&&!t,r=m.t("Loading history\u2026",{fallbackHash:"59c39817874d45c52a98770bfda56785da931331"});a&&(r=n.createElement("span",null,n.createElement(c.Ah,{name:"cloud-offline",size:"inherit",inline:!0})," ",n.createElement("strong",null,m.t("No connection."))," ",m.t("Go online to load more messages.")));let l=i()("p-degraded_list__loading",{"p-degraded_list__loading--offline":a});return n.createElement("div",{key:e?"degradedLoadingTop":"degradedLoadingBottom",className:l,style:e?{top:0,paddingTop:40}:{bottom:0,paddingBottom:15}},r)}renderItems(){let e=super.renderItems(),t=this.state.start>0,a=this.state.end<this.props.keys.length,n=this.props.keys.length>1&&(!this.props.reachedStart||t),r=this.props.keys.length>1&&(!this.props.reachedEnd||a);return[n&&this.renderLoading(!0,t),...e,r&&this.renderLoading(!1,a)]}};let u=n.memo(n.forwardRef(function(e,t){let a=(0,n.useContext)(o._0),r=(0,l.U)();return n.createElement(BaseDegradedList,{...e,ref:t,...a,logger:r})}))},0x9c0c23e6:(e,t,a)=>{"use strict";a.d(t,{R:()=>BaseDynamicList,A:()=>b});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x1f7a86bf5),l=a(0x1229d92d),o=a(0x16c170c3b),s=a(0x1a256ff50),c=a(0x1a043bf26),d=a(0x11db163e2),m=a(0x223e3a88),u=a(0x195d5c868),p=a(0x7acf06fe);function isScrollmarkValid({timestamp:e},t){let a=new Date,n=new Date(e);return!(t&&(0,u.A)(a,n,{units:"seconds"})>t)&&!!((0,p.A)(n,a)||6>(0,u.A)(a,n,{units:"hours"}))}var h=a(0x543aca4e);let _=class extends n.Component{shouldResetAnchorOnScroll;constructor(e){super(e),this.shouldResetAnchorOnScroll=!1}componentDidMount(){this.restoreScrollmark()}componentDidUpdate(e){let{autoScrollmarkTrackingId:t}=this.props;t!==e.autoScrollmarkTrackingId&&(this.saveScrollMark(e),this.restoreScrollmark())}componentWillUnmount(){this.saveScrollMark(this.props)}onScroll(){let{layout:e}=this.props;this.shouldResetAnchorOnScroll&&(e.setAnchor(!1),this.shouldResetAnchorOnScroll=!1)}restoreScrollmark(){let{scrollmarkHooks:e}=this.props.slackKitConfig;if(!e)return;let{autoScrollmarkTrackingId:t,layout:a,expirationDurationOverrideSeconds:n}=this.props,r=e.getScrollmark(t);r&&(isScrollmarkValid(r,n)&&(a.setAnchor(r.key,r.offset),this.shouldResetAnchorOnScroll=!0),e.removeScrollmarks({ids:[t]}))}saveScrollMark({autoScrollmarkTrackingId:e,getListScrollTop:t,keys:a,layout:n}){let{scrollmarkHooks:r}=this.props.slackKitConfig;if(!r)return;let i=t();if(i<=0)return;let l=n.findAnchor(a,a,i);if(!l)return;let o=n.getTop(l);r.addScrollmarks({objects:[{id:e,key:l,offset:o-i,timestamp:Date.now()}]})}render(){let{children:e}=this.props;return e}};_.displayName="ScrollmarkTracker";let f=(0,h.hP)(_);let BaseDynamicList=class BaseDynamicList extends c.Q{static defaultProps={...c.Q.defaultProps,layout:void 0,loadPre:r.A,loadPost:r.A,loadAround:r.A,animateOnScroll:!0};scrollTop;pendingScrollTop;layout;scrollmarkRef;constructor(e){super(e),this.onScroll=this.onScroll.bind(this),this.setHeight=this.setHeight.bind(this),this.getScrollTop=this.getScrollTop.bind(this),this.layout=e.layout||new m.A,this.scrollbar=null,this.scrollmarkRef=n.createRef(),this.scrollTop=this.layout.setContainerHeight(e.height,e.initialScrollTop||0),this.scrollTop=this.layout.setKeys(e.keys,this.scrollTop);const{start:t,end:a}=this.layout.getBounds(this.scrollTop,this.scrollTop+e.height),r=this.layout.getTops();this.state={...this.state,start:t,end:a,tops:r}}UNSAFE_componentWillReceiveProps(e){let t=e.width!==this.props.width,a=e.height!==this.props.height,n=!(0,s.Ay)(e.keys,this.props.keys);(t||a||n)&&(a&&(this.scrollTop=this.layout.setContainerHeight(e.height,this.getScrollTop())),n&&(this.scrollTop=this.layout.setKeys(e.keys,this.getScrollTop())),this.relayout())}componentDidUpdate(e,t){super.componentDidUpdate(e,t),"number"==typeof this.pendingScrollTop&&this.setScrollTop(this.pendingScrollTop),this.loadMore()}componentDidMount(){super.componentDidMount(),"number"==typeof this.pendingScrollTop&&this.setScrollTop(this.pendingScrollTop),this.loadMore()}onScroll(e){this.pendingScrollTop=!1,super.onScroll(e),this.scrollmarkRef.current?.onScroll()}getScrollTop(){return"number"==typeof this.scrollTop?this.scrollTop:"number"==typeof this.pendingScrollTop?this.pendingScrollTop:this.scrollbar?super.getScrollTop():0}setHeight(e,t,a=!1){if(!e)return!1;let n=this.layout.getHeight(e);if((0,o.W)(t,n,1))return!1;let r=this.getScrollTop();return this.scrollTop=this.layout.setHeight(e,t,r),a||this.relayout(),!0}loadMore(e=this.state.start,t=this.state.end,a=this.props){let{keys:n,height:r}=a,i=this.layout.getTotalHeight(),l=this.layout.getTop(n[e]),o=this.layout.getBottom(n[t-1]),s=!n.length||i<=r||l<400,c=!n.length||i<=r||i-o<400;return s&&c?a.loadAround():s?a.loadPre():c?a.loadPost():void 0}renderItem(e,t){let{activeItem:a,initialActiveItem:r,hasKeyboardFocus:i}=this.state,l=this.getTop(e),o=this.layout.getHeight(e),s=this.layout.getHeightValidity(e),c=a===e,m=null===a&&i&&r===e,u=this.isItemInView(e),{rowRenderer:p,getPropsForItem:h,onItemClick:_,onItemKeyDown:f,onItemFocusLeave:b,shouldHorizontallyScroll:g,useStaticHeightForListItems:y,width:A,keysToExcludeFromRovingTabIndex:x}=this.props,E=this.getUniqueItemId(e),C=c&&this.state.isInitialFocusInRange,k=this.state.itemWithVisibleContextMenu===e,v=i&&!this.isScrolling()?this.getNextFirstFocusableItemInView():void 0,S=!x.includes(e),I=r===e,w=h({key:e,index:t,isInitialFocusInRange:C,hasFocus:c,activeItem:a,firstItemInView:v,initialActiveItem:r})||{};return n.createElement(d.Ay,{tabIndex:this.getListItemTabIndex(e),...w,supportRovingTabIndex:S,id:E,itemKey:e,key:e,height:o,isCachedHeightValid:s,...this.props.useGpuScroll?{forceTop:l}:{top:l},hasFocus:c,hasFocusWithin:m,contextMenuVisible:k,onFocusEnter:this.onItemFocusEnter,onFocusWithin:this.onItemFocusWithin,onFocusLeave:b,onTabWithin:this.onItemTabWithin,onHeightChange:this.setHeight,onContextMenu:this.onItemContextMenu,onMouseDown:this.onItemMouseDown,onClick:_,onKeyDown:f,shouldHorizontallyScroll:g,useStaticHeight:y,isInitialActiveItem:I,"aria-setsize":"-1",resizeObserver:this.resizeObserver},p(t,{key:e,hasFocus:c,hasFocusWithin:m,itemId:E,listWidth:A,isInView:u,isExpanded:w["aria-expanded"],hasContextMenu:k}))}render(){return("number"==typeof this.scrollTop&&(this.pendingScrollTop=this.scrollTop,this.scrollTop=!1),this.props.autoScrollmarkTrackingId)?n.createElement(f,{autoScrollmarkTrackingId:this.props.autoScrollmarkTrackingId,expirationDurationOverrideSeconds:this.props.scrollmarkExpirationDurationOverrideSeconds,getListScrollTop:this.getScrollTop,keys:this.props.keys,layout:this.layout,ref:this.scrollmarkRef},super.render()):super.render()}};BaseDynamicList.displayName="BaseDynamicList";let b=(0,i.V)((0,l.A)(BaseDynamicList))},0x1a043bf26:(e,t,a)=>{"use strict";a.d(t,{A:()=>x,Q:()=>BaseKeyboardNavigableList});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xb77a689a),l=a(0x20bafd237),o=a(0x33644bb7),s=a(0x8601851c),c=a(0x1229d92d),d=a(0xb97b797e),m=a(0x62a17882),u=a(0xdbb55997),p=a(0x224f7f0e9),h=a(0xd3c52762),_=a(0x9844ea22),f=a(0x1dbf5c48b),b=a(0xa942d25),g=a(0x19aba212c),y=a(0x1cb091cca),A=a(0x11db163e2);let BaseKeyboardNavigableList=class BaseKeyboardNavigableList extends y.sD{static contextType=f.I;static defaultProps={...y.sD.defaultProps,activeItem:void 0,initialActiveItem:void 0,isFocusableItem:()=>!0,onFocusEnter:r.A,onFocusLeave:r.A,onPageUp:r.A,onPageDown:r.A,onHome:r.A,onEnd:r.A,onItemClick:r.A,onItemMouseDown:r.A,onItemKeyDown:r.A,onItemTabWithin:r.A,onItemFocusEnter:r.A,onItemFocusWithin:r.A,onItemFocusLeave:r.A,onItemContextMenu:r.A,onActiveItemChange:r.A,keyCommands:void 0,pageHeight:void 0,ignoreKeyCommandsOnInputs:!0,getPropsForItem:r.A,preventTabKeyNavigationIntoList:!1,renderContextMenuForItem:r.A,disableKeyboardShortcuts:!1,useGlobalKeyboardShortcuts:!1,keysToExcludeFromRovingTabIndex:[],useApplicationRole:!0,shouldUpdateFocusIfPreviouslyFocusedItemWasRemoved:()=>!0};keyCommands;isHomeKeyPressed;isEndKeyPressed;ariaDescribedById;restoreFocusWhenContextMenuCloses;focusOnNextUpdate;focusAfterScrollEnd;constructor(e){super(e),(0,d.v)(this,["onFocusEnter","onFocusLeave","onFocusedElementRemoved","onItemMouseDown","onItemFocusEnter","onItemFocusWithin","onItemTabWithin","onItemContextMenu","closeContextMenu","focus","onKeyDownPageUp","onKeyDownPageDown","onKeyDownHome","onKeyDownEnd","onKeyUpHome","onKeyUpEnd","onArrowKeyDown"]),this.state={...this.state,initialActiveItem:null,activeItem:null,hasKeyboardFocus:!1,isInitialFocusInRange:!1,itemWithVisibleContextMenu:null,contextMenuTargetBounds:null}}componentDidMount(){super.componentDidMount(),this.determineInitialActiveItem(),this.props.disableKeyboardShortcuts||this.bindKeyboardShortcuts(),this.props.focusOnMount&&this.focus()}componentWillUnmount(){super.componentWillUnmount(),this.unbindKeyboardShortcuts()}componentDidUpdate(e,t){super.componentDidUpdate(e,t);let{activeItem:a,onActiveItemChange:n,disableKeyboardShortcuts:r}=this.props,{activeItem:i,hasKeyboardFocus:l,itemWithVisibleContextMenu:o}=this.state;r&&!e.disableKeyboardShortcuts&&this.unbindKeyboardShortcuts(),!r&&e.disableKeyboardShortcuts&&this.bindKeyboardShortcuts();let s=t.activeItem&&i&&i!==t.activeItem;this.isScrolling()||l||this.determineInitialActiveItem(),a&&a!==e.activeItem&&(this.setActiveItem(a,!0),this.isItemInView(a)||this.scrollToKey(a)),s&&n(i),this.isScrolling()||this.updateFocusIfPreviouslyFocusedItemWasRemoved(e),!o&&t.itemWithVisibleContextMenu&&this.restoreFocusWhenContextMenuCloses&&(this.restoreFocusWhenContextMenuCloses=!1,this.focus()),this.focusOnNextUpdate&&(this.focusOnNextUpdate=!1,this.focus()),this.focusAfterScrollEnd&&!this.isScrolling()&&(this.focusAfterScrollEnd=!1,this.focus())}bindKeyboardShortcuts(){if(this.keyCommands)return;let e=[{keys:["pageup"],handler:this.onKeyDownPageUp},{keys:["pagedown"],handler:this.onKeyDownPageDown},{keys:["home"],handler:this.onKeyDownHome,action:"keydown"},{keys:["end"],handler:this.onKeyDownEnd,action:"keydown"},{keys:["home"],handler:this.onKeyUpHome,action:"keyup"},{keys:["end"],handler:this.onKeyUpEnd,action:"keyup"},{keys:["up","down"],handler:this.onArrowKeyDown}],t=this.props.keyCommands?e.concat(this.props.keyCommands):e,a=t?.map(e=>{let t=e.filter;return{...e,filter:this.shouldIgnoreKeyboardShortcut.bind(this,t)}})??[];this.keyCommands=new s.A(this.props.windowRef.deref()?.document),this.keyCommands.bindAll(a)}unbindKeyboardShortcuts(){this.keyCommands&&(this.keyCommands.reset(),this.keyCommands=null)}determineInitialActiveItem(){let{initialActiveItem:e,keysToExcludeFromRovingTabIndex:t}=this.props,{initialActiveItem:a}=this.state,n=this.getFocusableItemsInView().filter(e=>!t.includes(e));if(0===n.length)return;let r=(0,i.A)(a)&&n.includes(a),l=(0,i.A)(e)&&n.includes(e);l||r?l&&!r&&this.setState(t=>t.initialActiveItem===e?null:{initialActiveItem:e}):this.setInitialActiveItemToFirstItemInView()}updateFocusIfPreviouslyFocusedItemWasRemoved({keys:e}){let{initialActiveItem:t,hasKeyboardFocus:a}=this.state,{keys:n,shouldUpdateFocusIfPreviouslyFocusedItemWasRemoved:r}=this.props;if(this.props.activeItem||!a||!t)return;let i=e.indexOf(t);if(!(-1!==i&&!n.includes(t))||r&&!r())return;let o=n[i]||(0,l.A)(n);o&&this.focusOnKey(o)}getPageHeight(){let{pageHeight:e,height:t}=this.props;return e||t-21}getKeysForFocusableItems(){let{keys:e,isFocusableItem:t}=this.props;return e.filter((e,a)=>t({index:a,key:e}))}getListItemTabIndex(e){let{hasKeyboardFocus:t,initialActiveItem:a}=this.state,{keysToExcludeFromRovingTabIndex:n,preventTabKeyNavigationIntoList:r}=this.props;return n?.includes(e)||!t&&r?-1:a===e?0:-1}onKeyDownPageUp(e){if(e.preventDefault(),!1===this.props.onPageUp(e))return;let t=this.getScrollTop()-this.getPageHeight();this.state.hasKeyboardFocus?this.isScrolledToTop()?this.focusFirstItemInView():this.scrollToAndFocusFirstItemInView(t):this.scrollToOffset(t)}onKeyDownPageDown(e){if(e.preventDefault(),!1===this.props.onPageDown(e))return;let t=this.getScrollTop()+this.getPageHeight();if(!this.state.hasKeyboardFocus)return void this.scrollToOffset(t);if(this.isScrolledToBottom())return void this.focusLastItemInView();let a=this.getNextLastFocusableItemInView(t);this.setActiveItem(a??null,!0),this.scrollToOffset(t)}onKeyDownHome(e){if(this.isHomeKeyPressed||(this.isHomeKeyPressed=!0,e.preventDefault(),!1===this.props.onHome(e)))return;if(!this.state.hasKeyboardFocus)return void this.scrollToOffset(0);if(this.isScrolledToTop())return void this.focusFirstItemInView();let t=this.getKeysForFocusableItems()[0];this.setActiveItem(t,!0),this.scrollToKey(t)}onKeyDownEnd(e){if(this.isEndKeyPressed||(this.isEndKeyPressed=!0,e.preventDefault(),!1===this.props.onEnd(e)))return;if(!this.state.hasKeyboardFocus)return void this.scrollToOffset(1/0);if(this.isScrolledToBottom())return void this.focusLastItemInView();let t=this.getKeysForFocusableItems(),a=t[t.length-1];this.setActiveItem(a,!0),this.scrollToKey(a)}onArrowKeyDown(e){if(e.defaultPrevented)return;if(this.state.hasKeyboardFocus){e.preventDefault(),this.focusNextItem(e.keyCode);return}let t=this.getScrollTop();"ArrowUp"===e.key?this.scrollToOffset(t-40):this.scrollToOffset(t+40)}onKeyUpHome(){this.isHomeKeyPressed=!1}onKeyUpEnd(){this.isEndKeyPressed=!1}onItemFocusEnter(e){let{id:t,relatedEvent:a,currentTarget:n,target:r,hasKeyboardFocus:i}=e,{onItemFocusEnter:l}=this.props;if(!this.haveActiveItem()&&r===n){this.setActiveItem(t),l(e);return}let o=!this.haveActiveItem()&&!a&&n.contains(r),s=this.isValidInitialActiveItem(t)?t:this.state.initialActiveItem;o&&this.setState(()=>({hasKeyboardFocus:i,activeItem:null,initialActiveItem:s})),l(e)}onItemFocusWithin(e){let{id:t,currentTarget:a,target:n}=e,{onItemFocusWithin:r}=this.props;if(n===a){this.setActiveItem(t),r(e);return}let i=this.isValidInitialActiveItem(t)?t:this.state.initialActiveItem;this.setState(()=>({activeItem:null,initialActiveItem:i})),r(e)}onItemTabWithin(e){this.props.onItemTabWithin(e)}onFocusEnter(e){let{relatedEvent:t,target:a}=e;if(t&&"mousedown"===t.type||a&&(a instanceof HTMLMediaElement||a.dataset.mediaFocusContainer))return;let n=!t,r=t&&"keydown"===t.type||n;r?this.props.onFocusEnter({isKeyboardFocus:r,...e}):this.props.onFocusEnter(e)}onFocusLeave(e){let{onFocusLeave:t}=this.props,a=this.state.activeItem,n={activeItem:null,hasKeyboardFocus:!1,initialActiveItem:this.isValidInitialActiveItem(a)?a:this.state.initialActiveItem,isInitialFocusInRange:!1},r={activeItem:a,...e};this.setState(()=>n,()=>{t(r)})}onFocusedElementRemoved(){this.state.hasKeyboardFocus&&this.focus()}onItemContextMenu(e,t,{hasKeyboardFocus:a}){let{onItemContextMenu:n}=this.props;if(n&&n(e,t,{hasKeyboardFocus:a}),!e.defaultPrevented)return;let r=this.getTargetBoundsForContextMenu(e);this.restoreFocusWhenContextMenuCloses=this.state.hasKeyboardFocus,this.setState(()=>({itemWithVisibleContextMenu:t,contextMenuTargetBounds:r}))}onItemMouseDown(e,t){let{onItemMouseDown:a}=this.props;a&&a(e,t??"");let n=this.isValidInitialActiveItem(t)?t:this.state.initialActiveItem;this.setState(()=>({hasKeyboardFocus:!1,activeItem:null,initialActiveItem:n}))}focus(){if(this.isScrolling()){this.focusAfterScrollEnd=!0;return}let e=this.state.initialActiveItem;e&&this.isItemInView(e)?this.setActiveItem(e,!0):this.scrollToAndFocusFirstItemInView()||(this.focusOnNextUpdate=!0)}focusOnKey(e,{offset:t=0}={}){let{keys:a}=this.props;return!!e&&-1!==a.indexOf(e)&&(this.setActiveItem(e,!0),this.isItemInView(e)||this.scrollToKey(e,{offset:t}),!0)}scrollToAndFocusFirstItemInView(e){let t=this.getNextFirstFocusableItemInView(e);return!!t&&(this.setActiveItem(t,!0),this.scrollToKey(t),!0)}blur(){let e=this.props.windowRef.deref()?.document.activeElement;this.getScrollerRef()?.contains(e)&&e.blur()}getActiveItem(){return this.state.activeItem}getTargetBoundsForContextMenu(e){if(!this.state.hasKeyboardFocus)return(0,g.h)({left:e.pageX,top:e.pageY});let{left:t,top:a,width:n,height:r}=e.currentTarget.getBoundingClientRect();return(0,g.h)({left:t+n/2,top:a+r/2})}closeContextMenu(){this.setState(()=>({itemWithVisibleContextMenu:null,contextMenuTargetBounds:null}))}isValidInitialActiveItem(e){let{isFocusableItem:t,keys:a,keysToExcludeFromRovingTabIndex:n}=this.props;return null!==e&&t({index:a.indexOf(e),key:e})&&!n.includes(e)}shouldIgnoreKeyboardShortcut(e,t){let{ignoreKeyCommandsOnInputs:a,useGlobalKeyboardShortcuts:n}=this.props,r=t.target,i=this.getScrollerRef()?.contains(r),l=(0,o.A)(a)?a():a;return!!n&&!i&&r!==this.props.windowRef.deref()?.document.body||!n&&!i||!r.matches(".c-virtual_list__item")&&(!!(l&&((0,u.A)(r)||(0,b.A)(r)))||!!(e&&e(t)))}setActiveItem(e,t=!1){let a=this.isValidInitialActiveItem(e)?e:this.state.initialActiveItem;this.setState(()=>({hasKeyboardFocus:!0,activeItem:e,initialActiveItem:a,isInitialFocusInRange:t}))}setInitialActiveItem(e){this.isValidInitialActiveItem(e)&&this.setState(()=>({initialActiveItem:e}))}haveActiveItem(){return null!==this.state.activeItem}getUniqueItemId(e){let{id:t}=this.props;return t?`${t}_${e}`:e}focusFirstItemInView(){let e=this.getFocusableItemsInView()[0];this.state.activeItem!==e&&this.setActiveItem(e,!0)}focusLastItemInView(e=!1){let t=this.getFocusableItemsInView(void 0,e),a=t[t.length-1];this.state.activeItem!==a&&this.setActiveItem(a,!0)}focusNextItem(e){let t=this.getNextActiveItem(e,this.state.activeItem);t&&(this.setActiveItem(t,!1),this.isItemInView(t,this.layout.anchorOffset)||this.scrollToKey(t,{offset:this.props.arrowNavigationOffset}))}getFocusableItemsInView(e,t){let{keys:a,isFocusableItem:n}=this.props,{start:r,end:i}=this.getVisibleRange(e,t);return(r===i?a.slice(r,r+1):a.slice(r,i)).filter(e=>n({index:a.indexOf(e),key:e}))}getNextFirstFocusableItemInView(e){let t=this.state.activeItem,a=this.getFocusableItemsInView(e)[0];return a&&a===t||!a&&t?this.getNextActiveItem(p.i7,t):a}getNextLastFocusableItemInView(e){let t=this.state.activeItem,a=this.getFocusableItemsInView(e),n=a[a.length-1];return n&&n===t||!n&&t?this.getNextActiveItem(p.n6,t):n}getInitialActiveItem(){return this.state.initialActiveItem}getNextActiveItem(e,t){let a=this.state.initialActiveItem;if(!this.haveActiveItem())return a&&!this.isItemInView(a)?this.getNextFirstFocusableItemInView():a||this.getNextFirstFocusableItemInView();let n=this.props.keys.indexOf(t),r=e===p.i7?n-1:n+1,i=this.props.keys[r];return i&&!this.props.isFocusableItem({index:r,key:i})?this.getNextActiveItem(e,i):i}getTabIndex(){return!this.shouldUseARIAApplicationRole()&&(0,m.uF)()?-1:void 0}setInitialActiveItemToFirstItemInView(){let{keysToExcludeFromRovingTabIndex:e}=this.props,t=this.getFocusableItemsInView().find(t=>!e.includes(t));t&&this.setState(e=>e.initialActiveItem===t?null:{initialActiveItem:t})}shouldUseARIAApplicationRole(){let{useARIAApplicationForListViews:e}=this.context;return!!(0,m.uF)()&&!!this.props.useApplicationRole&&!!e}renderContextMenu(){let{itemWithVisibleContextMenu:e,contextMenuTargetBounds:t}=this.state;if(!e||!t)return null;let a={targetBounds:t,onCloseRequested:this.closeContextMenu};return this.props.renderContextMenuForItem(e,a)}renderItem(e,t){let{activeItem:a,initialActiveItem:r,hasKeyboardFocus:i}=this.state,l=this.getTop(e),o=this.layout.getHeight(e),s=a===e,c=null===a&&i&&r===e,d=this.isItemInView(e),m=this.layout.getHeightValidity(e),u=i&&!this.isScrolling()?this.getNextFirstFocusableItemInView():void 0,{rowRenderer:p,getPropsForItem:h,onItemClick:_,onItemKeyDown:f,onItemFocusLeave:b,shouldHorizontallyScroll:g,useStaticHeightForListItems:y,width:x,keysToExcludeFromRovingTabIndex:E}=this.props,C=this.getUniqueItemId(e),k=s&&this.state.isInitialFocusInRange,v=this.state.itemWithVisibleContextMenu===e,S=!E.includes(e),I=r===e,w=h({key:e,index:t,isInitialFocusInRange:k,hasFocus:s,activeItem:a,initialActiveItem:r,firstItemInView:u})||{};return n.createElement(A.Ay,{tabIndex:this.getListItemTabIndex(e),"aria-setsize":"-1",...w,supportRovingTabIndex:S,id:C,itemKey:e,key:e,height:o,isCachedHeightValid:m,...this.props.useGpuScroll?{forceTop:l}:{top:l},hasFocus:s,hasFocusWithin:c,contextMenuVisible:v,onFocusEnter:this.onItemFocusEnter,onFocusWithin:this.onItemFocusWithin,onFocusLeave:b,onTabWithin:this.onItemTabWithin,onHeightChange:this.setHeight,onMouseDown:this.onItemMouseDown,onContextMenu:this.onItemContextMenu,onClick:_,onKeyDown:f,shouldHorizontallyScroll:g,useStaticHeight:y,isInitialActiveItem:I,resizeObserver:this.resizeObserver},p(t,{key:e,hasFocus:s,hasFocusWithin:c,itemId:C,listWidth:x,isInView:d,isExpanded:w["aria-expanded"],hasContextMenu:v}))}render(){let e=this.shouldUseARIAApplicationRole()?"application":"presentation";return n.createElement(n.Fragment,null,n.createElement(h.A,{onFocusEnter:this.onFocusEnter,onFocusLeave:this.onFocusLeave},n.createElement(_.A,{onFocus:r.A,onBlur:r.A,onFocusedElementRemoved:this.onFocusedElementRemoved},n.createElement("div",{role:e,id:this.props.id},super.render()))),this.renderContextMenu())}};BaseKeyboardNavigableList.displayName="BaseKeyboardNavigableList";let x=(0,c.A)(BaseKeyboardNavigableList)},0x11db163e2:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>C,Gn:()=>x});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x7a622ec8),o=a.n(l),s=a(0x1cbdfeceb),c=a(0xb77a689a),d=a(0x1229d92d),m=a(0xb97b797e),u=a(0x15279822),p=a(0x1ea9a28fa),h=a(0x23723e37b),_=a(0x807220a2),f=a(0x1a256ff50),b=a(0xd3c52762),g=a(0x15e48057c);let y=o()("enter"),A=o()("tab"),x="c-virtual_list__item",E=class extends n.Component{static defaultProps={children:null,onFocusEnter:s.A,onFocusWithin:s.A,onFocusLeave:s.A,onHeightChange:s.A,onMouseDown:s.A,onClick:s.A,onKeyDown:s.A,onContextMenu:s.A,onTabWithin:s.A,className:"",top:void 0,zIndex:void 0,role:"listitem",height:0,isCachedHeightValid:!0,hasFocus:!1,hasFocusWithin:!1,shouldHorizontallyScroll:!1,tabIndex:-1,useStaticHeight:!1,dataQA:null,contextMenuVisible:!1,isInitialActiveItem:!1,hideFocusRing:!1,supportRovingTabIndex:!0,forceTop:void 0,resizeObserver:void 0};node;constructor(e){super(e),this.setRef=this.setRef.bind(this),(0,m.v)(this,["onFocusEnter","onFocusWithin","onFocusLeave","onMouseDown","onClick","onKeyDown","onContextMenu","updateHeight"]),this.node=null}componentDidMount(){let{supportRovingTabIndex:e,isInitialActiveItem:t,hasKeyboardFocus:a,resizeObserver:n,isCachedHeightValid:r,useStaticHeight:i}=this.props;this.node&&n&&!i&&n.observe(this.node,{box:"border-box"}),r||i||this.updateHeight(),this.maybeFocusNode(),a&&e&&!t&&this.removeChildrenFromTabFlow()}componentDidUpdate(){let{useStaticHeight:e,isInitialActiveItem:t,supportRovingTabIndex:a,hasKeyboardFocus:n,resizeObserver:r}=this.props;e||r||this.updateHeight(),this.maybeFocusNode(),n&&a&&(t||this.removeChildrenFromTabFlow(),t&&this.restoreChildrenIntoTabFlow())}componentWillUnmount(){let{resizeObserver:e,useStaticHeight:t}=this.props;this.node&&e&&!t&&e.unobserve(this.node)}onClick(e){e.id=this.props.itemKey,this.props.onClick(e)}onFocusEnter(e){let{relatedEvent:t,target:a,currentTarget:n}=e,{itemKey:r,onTabWithin:i,onFocusEnter:l,hasKeyboardFocus:o}=this.props;t&&"mousedown"===t.type||a&&(a instanceof HTMLMediaElement||a.dataset.mediaFocusContainer)||((t&&t.keyCode)===A&&n!==a&&i({id:r,hasKeyboardFocus:o,...e}),l({id:r,hasKeyboardFocus:o,...e}))}onFocusLeave(e){let{itemKey:t,onFocusLeave:a,hasKeyboardFocus:n}=this.props;a({id:t,hasKeyboardFocus:n,...e})}onFocusWithin(e){let{relatedEvent:t}=e,{itemKey:a,onTabWithin:n,onFocusWithin:r,hasKeyboardFocus:i}=this.props;t&&"mousedown"===t.type||((t&&t.keyCode)===A&&n({id:a,hasKeyboardFocus:i,...e}),r({id:a,hasKeyboardFocus:i,...e}))}onKeyDown(e){let{target:t,currentTarget:a,keyCode:n}=e,{itemKey:r,onKeyDown:i,onClick:l}=this.props;t===a&&(i({id:r,...e,preventDefault:e.preventDefault,stopPropagation:e.stopPropagation}),n===y&&l({id:r,...e,preventDefault:e.preventDefault,stopPropagation:e.stopPropagation}))}onContextMenu(e){let{itemKey:t,onContextMenu:a,hasKeyboardFocus:n}=this.props;e?.altKey||a(e,t,{hasKeyboardFocus:n})}onMouseDown(e){let{itemKey:t,onMouseDown:a}=this.props;a(e,t)}setRef(e){this.node=e}maybeFocusNode(){this.props.hasFocus&&this.node&&this.node.focus()}updateHeight(){let{height:e,isCachedHeightValid:t,itemKey:a,onHeightChange:n}=this.props;if(!this.node)return;let{height:r}=this.node.getBoundingClientRect();(Math.abs(r-e)>.5||!t)&&n(a,r)}removeChildrenFromTabFlow(){let e=this.node;e&&(0,u.rO)(e).forEach(e=>{let t=e.getAttribute("tabindex");e.setAttribute("tabindex","-1"),e.dataset.removeTabIndex="true",(0,c.A)(t)&&(e.dataset.tabIndexToRestore=t)})}restoreChildrenIntoTabFlow(){let e=this.node;e&&e.querySelectorAll("[data-remove-tab-index]").forEach(e=>{if(!(0,p.A)(e,this.props.windowRef.deref()))return;let t=e.dataset.tabIndexToRestore;(0,c.A)(t)?e.setAttribute("tabindex",t):e.removeAttribute("tabindex"),delete e.dataset.removeTabIndex,delete e.dataset.tabIndexToRestore})}render(){if(!this.props.children)return null;let{id:e,children:t,onFocusEnter:a,onFocusWithin:r,onFocusLeave:l,onHeightChange:o,onMouseDown:s,onClick:c,onKeyDown:d,onContextMenu:m,onTabWithin:u,className:p,top:f,zIndex:g,role:y,height:A,isCachedHeightValid:E,hasFocus:C,hasFocusWithin:k,hideFocusRing:v,shouldHorizontallyScroll:S,tabIndex:I,itemKey:w,useStaticHeight:T,hasKeyboardFocus:N,dataQA:M,contextMenuVisible:R,isInitialActiveItem:P,supportRovingTabIndex:L,forceTop:O,resizeObserver:D,windowId:F,windowToken:U,windowRef:B,...H}=this.props,W=void 0!==O&&(0,_.PS)(),V=i()(p,x,{[`${x}--focus`]:C&&N&&!v,[`${x}--focus-within`]:k,[`${x}--auto_width`]:S,[`${x}--contextmenu-visible`]:R});return n.createElement(b.A,{onFocusEnter:this.onFocusEnter,onFocusWithin:this.onFocusWithin,onFocusLeave:this.onFocusLeave},n.createElement("div",{...(0,h.A)(H),onMouseDown:this.onMouseDown,onClick:this.onClick,onKeyDown:this.onKeyDown,onContextMenu:this.onContextMenu,className:V,tabIndex:I,role:y,style:T?{top:W?0:O??f,...W&&{willChange:"transform",transform:`translateY(${O??f??0}px)`},height:A,zIndex:g}:{top:W?0:O??f,...W&&{willChange:"transform",transform:`translateY(${O??f??0}px)`},zIndex:g},ref:this.setRef,id:e,"data-qa":M||"virtual-list-item","data-item-key":w},t))}};E.displayName="ListItem";let WithKeyboardFocusListItem=function(e){let t=(0,n.useContext)(g.A);return n.createElement(E,{...e,hasKeyboardFocus:t})};function areListItemPropsEqual(e,t){let{children:a,isCachedHeightValid:n,resizeObserver:r,height:i,top:l,zIndex:o,forceTop:s,...c}=e,{children:d,isCachedHeightValid:m,resizeObserver:u,height:p,top:h,zIndex:_,forceTop:b,...g}=t;return l===h&&s===b&&o===_&&i===p&&(!a||!d||d.key===a.key&&!!(0,f.Ay)(d.props,a.props))&&(0,f.Ay)(c,g)}WithKeyboardFocusListItem.displayName="WithKeyboardFocusListItem";let C=n.memo((0,d.A)(WithKeyboardFocusListItem),areListItemPropsEqual)},0x1cb091cca:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>y,a:()=>g,sD:()=>BaseList});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1229d92d),s=a(0x16c170c3b),c=a(0xb97b797e),d=a(0x4e47e388),m=a(0x3bc7bbd5),u=a(0x1a256ff50),p=a(0xeaeb4a22),h=a(0x181214caa),_=a(0x11db163e2),f=a(0x223e3a88),b=a(0x12a913e0);let g=.5;let BaseList=class BaseList extends n.Component{static defaultProps={className:"",containerClassName:"",layout:void 0,role:"list","aria-label":void 0,"aria-labelledby":void 0,"aria-describedby":void 0,persistentKeys:[],usePersistentOrder:!0,fadeScrollbar:!1,onScroll:l.A,onSelectionChange:l.A,onItemContextMenu:l.A,getPropsForItem:l.A,shouldHorizontallyScroll:!1,scrollbarAlwaysVisible:!1,id:void 0,useStaticHeightForListItems:!1,useFixedTrackHeightForScrollbar:!1,initialScrollTop:0,overscanRatio:g,siblingNode:null,isSiblingNodeFirst:!1,useLegacyScrollbar:!1,useGpuScroll:!1};layout;scrollbar;contentNode;siblingNode;isSelecting;selectionStart;selectionEnd;scrollStartTimeout;scrollTop;prevBounds=[-1/0,1/0];janks=[];resizeObserver;scrollOnUpdateCallback;constructor(e){super(e),(0,c.v)(this,["onScroll","onSelectionChange","setScrollbarRef","setContentRef","setSiblingNodeRef","setHeight","getScrollTop","getVisibleRange","isItemInView","onScrollStart","onItemContextMenu","onItemResize"]),this.onScrollEnd=(0,d.A)(this.onScrollEnd.bind(this),50,e.windowRef),this.layout=e.layout||new b.A({});const t=e.windowRef.deref();this.props.useStaticHeightForListItems||(this.resizeObserver=(0,m.Y)(t,this.onItemResize)),this.scrollbar=null,this.contentNode=null,this.siblingNode=null,this.isSelecting=!1,this.selectionStart=null,this.selectionEnd=null,this.scrollStartTimeout=null,this.scrollOnUpdateCallback=null,this.layout.setKeys(e.keys);const{start:a,end:n}=this.getBounds(0,e.height);this.state={start:a,end:n,scrolling:!1}}componentDidMount(){this.props.windowRef.deref()?.document.addEventListener("selectionchange",this.onSelectionChange)}componentDidUpdate(e,t){this.maybeHandleScrollOnUpdateCallback()}shouldComponentUpdate(e,t){return!(0,u.Ay)(e,this.props)||!(0,u.Ay)(t,this.state)}UNSAFE_componentWillReceiveProps(e){this.layout.setKeys(e.keys),this.relayout()}componentWillUnmount(){this.scrollStartTimeout&&clearTimeout(this.scrollStartTimeout);let e=this.props.windowRef.deref();e&&e.document.removeEventListener("selectionchange",this.onSelectionChange),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}maybeHandleScrollOnUpdateCallback(){if(!this.scrollOnUpdateCallback)return;let e=this.scrollOnUpdateCallback;e(),e===this.scrollOnUpdateCallback&&(this.scrollOnUpdateCallback=null)}onScroll(e){this.onScrollEnd();let{start:t,end:a}=this.state,{keys:n}=this.props;if(0!==t||a!==n.length){let e=this.getScrollTop();if(this.props.onScrollEnd){let t,[a,n]=this.prevBounds;e<a?t=Math.abs(a-e):e>n&&(t=Math.abs(e-n)),t&&this.janks.push(t)}this.relayout()}this.scrollStartTimeout||this.isScrolling()||e.target!==this.getScrollerRef()||(this.scrollStartTimeout=setTimeout(this.onScrollStart,100)),this.props.onScroll(e,{scrollTop:this.getScrollTop(),scrollHeight:this.getContentHeight(),clientHeight:this.props.height})}onScrollEnd(){if(this.scrollStartTimeout&&(clearTimeout(this.scrollStartTimeout),this.scrollStartTimeout=null),this.props.onScrollEnd){let e={count:0,total:0,max:0};for(let t of this.janks)e.total+=t,t>e.max&&(e.max=t);e.count=this.janks.length,this.props.onScrollEnd({jankPx:e})}this.janks=[],this.setState(e=>e.scrolling?{scrolling:!1}:null)}onScrollStart(){this.setState(()=>({scrolling:!0}),this.onScrollEnd),this.scrollStartTimeout=null}onSelectionChange(){if(!this.scrollbar)return;let e=this.props.windowRef.deref(),t=e?.getSelection&&e?.getSelection();t&&"Range"===t.type&&this.contentNode&&this.contentNode.contains(t.anchorNode)?(this.isSelecting=!0,this.selectionStart=this.props.keys[this.state.start],this.selectionEnd=this.props.keys[this.state.end-1]):(this.isSelecting=!1,this.selectionStart=null,this.selectionEnd=null),this.props.onSelectionChange(this.isSelecting)}onItemContextMenu(e,t,{hasKeyboardFocus:a}){this.props.onItemContextMenu(e,t,{hasKeyboardFocus:a})}onItemResize(e){e.reduce((e,t)=>{let a=t.target.getAttribute("data-item-key"),n=(e=>{let{borderBoxSize:t,target:a}=e,n=t?.[0];return n?.blockSize??a.getBoundingClientRect().height})(t);return!!this.setHeight(a,n,!0)||e},!1)&&this.relayout()}getBottom(e){return this.layout.getBottom(e)}getBounds(e,t){this.onSelectionChange();let a=e,n=t;return this.selectionStart&&(a=Math.min(a,this.layout.getTop(this.selectionStart))),this.selectionEnd&&(n=Math.max(n,this.layout.getTop(this.selectionEnd))),this.layout.getBounds(a,n)}getBoundingClientRect(){return this.getScrollerRef().getBoundingClientRect()}getClassName(){return i()("c-virtual_list c-virtual_list--scrollbar",this.props.className)}getContainerHeight(){return this.props.height}getContentHeight(){return this.layout.getTotalHeight()+this.getSiblingNodeHeight()}getSiblingNodeHeight(){if(!this.siblingNode)return 0;let{height:e}=this.siblingNode.getBoundingClientRect();return e}getContentsClassName(){return i()("c-virtual_list__scroll_container",this.props.containerClassName,{"c-virtual_list__scroll_container--scrolling":this.isScrolling()&&!this.isSelecting})}getScrollTop(){return this.scrollbar&&this.scrollbar.scrollTop()||0}getScrollerRef(){return this.scrollbar?.scroller}getTop(e){return this.layout.getTop(e)}getVisibleRange(e=this.getScrollTop(),t=!1){let{keys:a,height:n}=this.props,{start:r,end:i}=this.layout.getBounds(e,e+n);if(t)return{start:r,end:i};let l=this.layout.getTop(a[r])<e-1?r+1:r,o=this.layout.getBottom(a[i-1])>e+n+1?i-1:i,s=Math.min(l,a.length-1),c=Math.max(o,s);return{start:s,end:c}}setContentRef(e){this.contentNode=e}setSiblingNodeRef(e){this.siblingNode=e}setHeight(e,t,a=!1){if(!e)return!1;let n=this.layout.getHeight(e);return!(0,s.W)(t,n,1)&&(this.layout.setHeight(e,t),a||this.relayout(),!0)}setScrollbarRef(e){this.scrollbar=e}setScrollTop(e){this.scrollbar&&this.scrollbar.scrollTop(Math.ceil(e))}getItemsToRender(){let{keys:e,persistentKeys:t,usePersistentOrder:a}=this.props,{start:n,end:r}=this.state,i=[];if(a){let a={};for(let e=0;e<t.length;e++)a[t[e]]=!0;this.layout instanceof f.A&&this.layout.anchor&&!a[this.layout.anchor]&&(a[this.layout.anchor]=!0);for(let t=0;t<e.length;t++){let l=e[t];l&&(a[l]||t>=n&&t<=r)&&i.push({key:l,index:t})}}else{for(let t=n;t<r;t++){let a=e[t];a&&i.push({key:a,index:t})}t.forEach(t=>{let a=e.indexOf(t);a<0||a>=n&&a<r||i.push({key:t,index:a})}),this.layout instanceof f.A&&this.layout.anchor&&!t.includes(this.layout.anchor)&&i.push({key:this.layout.anchor,index:e.indexOf(this.layout.anchor)})}let l=e[n],o=e[r];return l&&o&&(this.prevBounds=[this.layout.getTop(l),this.layout.getBottom(o)]),i}getTabIndex(){}bracketScrollTop(e){return Math.max(0,Math.min(this.getContentHeight()-this.props.height,e))}isItemAboveView(e,t=0){let a=this.getScrollTop()+t;return this.layout.getBottom(e)<a}isItemBelowView(e,t=0){let a=this.getScrollTop();return this.layout.getTop(e)>a+(this.props.height-t)}isItemInView(e,t=0){let a=this.getScrollTop(),n=this.layout.getTop(e),r=a+(this.props.height-t);return n>=a+t&&n<=r}isScrolledToBottom(){return this.getScrollTop()+this.getContainerHeight()>=this.layout.getTotalHeight()-1}isScrolledToTop(){return 1>=Math.floor(this.getScrollTop())}isScrolling(){return this.state.scrolling}relayout(){this.setState((e,t)=>{let a=this.getScrollTop(),n=t.height*t.overscanRatio,r=a+t.height+n,{start:i,end:l}=this.getBounds(a-n,r),o=this.layout.getTops(),s=this.layout.getTotalHeight();return i===e.start&&l===e.end&&o===e.tops&&s===e.totalHeight?null:{start:i,end:l,tops:o,totalHeight:s}},()=>{let e=this.state.totalHeight&&this.state.totalHeight>this.props.height||!1;this.props.onOverflow&&this.props.onOverflow(e)})}scrollToKey(e,{lazy:t,animate:a,offset:n=0}={}){if(t&&this.isItemInView(e))return;if(!this.scrollbar){this.scrollOnUpdateCallback=()=>{this.scrollToKey(e,{lazy:t,animate:a,offset:n})};return}let r=this.layout.getOffsetForKey(e);this.scrollToOffset(r+n,{animate:a})}scrollToOffset(e,{animate:t}={}){let a=!!(this.scrollbar&&t);if(!this.scrollbar){this.scrollOnUpdateCallback=()=>{this.scrollToOffset(e,{animate:a})};return}let n=this.bracketScrollTop(e);a?this.scrollbar?.scrollWithAnimation(n):(this.scrollTop=n,this.setScrollTop(n))}renderContents(){let e=this.getContentsClassName(),t=this.getContentHeight()-this.getSiblingNodeHeight(),a=this.renderItems(),{role:r,"aria-label":i,"aria-labelledby":l,"aria-describedby":o}=this.props;return n.createElement("div",{"data-qa":"slack_kit_list",ref:this.setContentRef,className:e,role:r,tabIndex:this.getTabIndex(),"aria-label":i,"aria-labelledby":l,"aria-describedby":o,style:{position:"relative",height:t}},a)}renderItem(e,t){let a=this.getTop(e),r=this.layout.getHeight(e),i=this.layout.getHeightValidity(e),{rowRenderer:l,getPropsForItem:o,shouldHorizontallyScroll:s}=this.props,c=o({key:e,index:t})||{};return n.createElement(_.Ay,{...c,id:e,itemKey:e,key:e,height:r,...this.props.useGpuScroll?{forceTop:a}:{top:a},onHeightChange:this.setHeight,onContextMenu:this.onItemContextMenu,isCachedHeightValid:i,shouldHorizontallyScroll:s,useStaticHeight:this.props.useStaticHeightForListItems,"aria-setsize":"-1",resizeObserver:this.resizeObserver},l(t,{key:e,isExpanded:c["aria-expanded"]}))}renderItems(){return this.getItemsToRender().map(({key:e,index:t})=>this.renderItem(e,t))}render(){let{width:e,height:t,forceDarkScrollbar:a,useLegacyScrollbar:r}=this.props;if(!e||!t)return null;let i=this.getClassName(),l=this.renderContents(),o=this.props.isSiblingNodeFirst,s=n.createElement("div",{className:"c-virtual_list__sibling_container",ref:this.setSiblingNodeRef},this.props.siblingNode);return n.createElement(p.A,{className:i,width:e,height:this.getContainerHeight(),contentHeight:this.getContentHeight(),trackTop:12,onTrackClick:h.d.track.page,onScroll:this.onScroll,anchor:"bottom",role:"presentation",id:this.props.id,ref:this.setScrollbarRef,fade:this.props.fadeScrollbar,useFixedTrackHeight:this.props.useFixedTrackHeightForScrollbar,alwaysVisible:this.props.scrollbarAlwaysVisible||this.state.hasKeyboardFocus,initialScrollTop:this.props.initialScrollTop,useLegacyScrollbar:r,forceDarkScrollbar:a},o&&s,l,!o&&s)}};BaseList.displayName="BaseList";let y=(0,o.A)(BaseList)},0x223e3a88:(e,t,a)=>{"use strict";a.d(t,{A:()=>AnchorLayout});var n=a(0x12a913e0);let AnchorLayout=class AnchorLayout extends n.A{containerHeight;stickToBottom;bottomMargin;ANCHOR_OFFSET;STICKY_EPSILON;STICKY_EPSILON_SETHEIGHT;anchorOffset;anchor;constructor({keys:e,heightCache:t,gutter:a,onTotalHeightChange:n,containerHeight:r=0,stickToBottom:i=!1,bottomMargin:l=0,ANCHOR_OFFSET:o=0,STICKY_EPSILON:s=2,STICKY_EPSILON_SETHEIGHT:c=2}={}){super({keys:e,heightCache:t,gutter:a,onTotalHeightChange:n}),this.containerHeight=r,this.stickToBottom=i,this.bottomMargin=l,this.STICKY_EPSILON=s,this.STICKY_EPSILON_SETHEIGHT=c,this.ANCHOR_OFFSET=o,this.anchorOffset=o,this.anchor=!1}getOffsetForKey(e){if(!e)return this.totalHeight;let t=this.getTop(e);return void 0===t?0:t-this.anchorOffset}setHeight(e,t,a){if(!1!==this.anchor)return super.setHeight(e,t),this.bracketScrollTop(this.getOffsetForKey(this.anchor));if(this.shouldStickToBottom(a,this.STICKY_EPSILON_SETHEIGHT))return super.setHeight(e,t),this.bracketScrollTop(1/0);let n=a;return this.getBottom(e)<=a+this.anchorOffset&&(n+=t-this.getHeight(e)),super.setHeight(e,t),this.bracketScrollTop(n)}setKeys(e,t){if(!1!==this.anchor)return super.setKeys(e),this.bracketScrollTop(this.getOffsetForKey(this.anchor));if(this.shouldStickToBottom(t))return super.setKeys(e),this.bracketScrollTop(1/0);let a=t+this.anchorOffset,n=this.findAnchor(this.keys,e,a);if(!n)return super.setKeys(e),this.bracketScrollTop(t);let r=this.getTop(n)-a;super.setKeys(e);let i=this.getTop(n)-a;return this.bracketScrollTop(t-(r-i))}setContainerHeight(e,t){return!1!==this.anchor?(this.containerHeight=e,this.layout(),this.bracketScrollTop(this.getOffsetForKey(this.anchor))):this.shouldStickToBottom(t)?(this.containerHeight=e,this.layout(),this.bracketScrollTop(1/0)):(this.containerHeight=e,this.layout(),t)}setBottomMargin(e){this.bottomMargin=e}setStickToBottom(e){this.stickToBottom=e}setAnchor(e,t){this.anchor=e,"number"!=typeof t?this.anchorOffset=this.ANCHOR_OFFSET:this.anchorOffset=t}findAnchor(e,t,a){for(let n=0;n<e.length;n++){let r=e[n];if(this.getBottom(r)>a){for(let e=0;e<t.length;e++)if(t[e]===r)return r}}return null}bracketScrollTop(e){return Math.max(0,Math.min(this.totalHeight-this.containerHeight+this.bottomMargin,e))}shouldStickToBottom(e,t=this.STICKY_EPSILON){return!!this.stickToBottom&&e>=this.totalHeight-this.containerHeight-t+this.bottomMargin}}},0x19b773bfb:(e,t,a)=>{"use strict";a.d(t,{A:()=>GravityAnchorLayout});var n=a(0x33644bb7),r=a(0xf4930165),i=a(0x1ee15af19),l=a(0x223e3a88);let GravityAnchorLayout=class GravityAnchorLayout extends l.A{shouldExcludeFirstItemFromGravity;constructor(e){super(e),(0,n.A)(e.shouldExcludeFirstItemFromGravity)&&(this.shouldExcludeFirstItemFromGravity=e.shouldExcludeFirstItemFromGravity)}layout(){if(super.layout(),this.totalHeight<this.containerHeight){let e=this.containerHeight-this.totalHeight;this.tops=(0,r.A)(this.tops,t=>t+e),this.totalHeight=this.containerHeight}this.shouldExcludeFirstItemFromGravity&&this.shouldExcludeFirstItemFromGravity()&&this.keys.length>0&&(this.tops={...this.tops},this.tops[(0,i.A)(this.keys)]=0)}}},0x12a913e0:(e,t,a)=>{"use strict";a.d(t,{A:()=>Layout});var n=a(0x1cbdfeceb),r=a(0x839ba347),i=a(0x9e671ad),l=a(0x172c54b1c);let Layout=class Layout{keys;gutter;heightCache;onTotalHeightChange;tops;totalHeight;anchorOffset;constructor({keys:e=[],gutter:t=0,heightCache:a=new l.A,onTotalHeightChange:r=n.A}={}){this.keys=e,this.heightCache=a,this.onTotalHeightChange=r,this.gutter=t,this.tops={},this.totalHeight=0,this.layout()}layout(){let{keys:e}=this,t={},a=0;(0,r.A)(e,e=>{t[e]=a;let n=this.getHeight(e);a+=n+(n>0?this.gutter:0)}),(0,i.A)(t,this.tops)||(this.tops=t),a!==this.totalHeight&&this.onTotalHeightChange(a),this.totalHeight=a}getHeight(e){return this.heightCache.get(e)}getHeightValidity(e){return this.heightCache.getValidity(e)}getTop(e){return this.tops[e]}getBottom(e){return this.tops[e]+this.getHeight(e)}getTops(){return this.tops}getTotalHeight(){return this.totalHeight}getOffsetForKey(e){return e?this.getTop(e):this.totalHeight}getBounds(e,t){let a=this.keys,n=0;for(;n+1<a.length;){let t=a[n+1];if(this.getTop(t)>e)break;n+=1}let r=n;for(;r<a.length;){let e=a[r];if(this.getTop(e)>t)break;r+=1}return{start:n,end:r}}setHeight(e,t,a){this.heightCache.set(e,t),this.layout()}setKeys(e,t){this.keys=e,this.layout()}}},0x172c54b1c:(e,t,a)=>{"use strict";a.d(t,{A:()=>ValidityHeightCache});let HeightCache=class HeightCache{DEFAULT_HEIGHT;heights;constructor({DEFAULT_HEIGHT:e=50,heights:t}={}){this.heights=t||{},this.DEFAULT_HEIGHT=e}get(e){return e in this.heights?this.heights[e]:this.DEFAULT_HEIGHT}set(e,t){this.heights[e]=t}getValidity(e){return e in this.heights}};let ValidityHeightCache=class ValidityHeightCache extends HeightCache{validity;constructor(e){super(e),this.validity={}}getValidity(e){return!!this.validity[e]}set(e,t){super.set(e,t),this.validity[e]=!0}invalidate(e){if(!e){this.validity={};return}delete this.validity[e]}}},0x1a9c9ada0:(e,t,a)=>{"use strict";a.d(t,{A:()=>u,B:()=>BaseStickyList});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x77727995),o=a(0x153c664af),s=a(0x1f7a86bf5),c=a(0x1229d92d),d=a(0x9c0c23e6),m=a(0x11db163e2);function createRowMap(e){let t={};for(let a=0;a<e.length;a++)t[e[a].key]={index:e[a].index,next:(0,l.A)(e[a+1],"key")};return t}let BaseStickyList=class BaseStickyList extends d.R{static defaultProps={...d.R.defaultProps,stickyItems:[],stickyOffsetTop:0,stickyZIndex:void 0,stickyOffsetTopAnimated:!1,stickyContainerTopOverride:void 0,stickyContainerWidthOverride:void 0,alwaysRenderStickyItems:!1,contentWidthOverride:void 0};stickyItems;constructor(e){super(e),this.stickyItems=createRowMap(e.stickyItems)}UNSAFE_componentWillReceiveProps(e){super.UNSAFE_componentWillReceiveProps(e),this.stickyItems=createRowMap(e.stickyItems)}renderContents(){let e=this.getContentsClassName(),t=this.getContentHeight(),a=this.renderItems(),{role:r,"aria-label":i,"aria-labelledby":l,"aria-describedby":o,contentWidthOverride:s,useStaticAriaParent:c}=this.props,d={"data-qa":"slack_kit_list",ref:this.setContentRef,className:e,style:Object.freeze({position:"relative",height:t,...s&&{width:s}})};if(c){let e=this.getItemsToRender().map(({key:e})=>this.getUniqueItemId(e)).join(" ");return n.createElement(n.Fragment,null,n.createElement("div",{...d,role:"presentation"},a),n.createElement("div",{role:r,tabIndex:this.getTabIndex(),"aria-label":i,"aria-labelledby":l,"aria-describedby":o,"aria-owns":e,className:"sr-only"}))}return n.createElement("div",{...d,role:r,tabIndex:this.getTabIndex(),"aria-label":i,"aria-labelledby":l,"aria-describedby":o},a)}getItemsToRender(){let e=super.getItemsToRender(),t=this.state.start,a=(0,o.A)(this.props.stickyItems,{index:t},e=>e.index)-1;if(this.props.alwaysRenderStickyItems){if(a>=0){let t=this.props.stickyItems.slice(0,a+1);e.unshift(...t)}return e}let n=this.props.stickyItems[a];if(n)if(this.props.usePersistentOrder){let t=(0,o.A)(e,n,e=>e.index);e.splice(t,0,n)}else e.unshift(n);return e}renderItem(e,t){if(!(e in this.stickyItems))return super.renderItem(e,t);let{rowRenderer:a,getPropsForItem:r,onItemClick:l,onItemKeyDown:o,shouldHorizontallyScroll:s,useStaticHeightForListItems:c,width:d,onItemFocusLeave:u,keysToExcludeFromRovingTabIndex:p,stickyContainerTopOverride:h,stickyContainerWidthOverride:_}=this.props,f=0===t,{activeItem:b,initialActiveItem:g,hasKeyboardFocus:y}=this.state,A=f?h??-100:this.getTop(e),x=this.layout.getHeight(e),E=this.layout.getHeightValidity(e),C=this.getContentHeight(),k=this.stickyItems[e].next,v=k?this.getTop(k):C,S=Math.max(0,C-v),I=this.state.activeItem===e,w=null===b&&y&&g===e,T=this.state.itemWithVisibleContextMenu===e,N=this.isItemInView(e),M=this.getUniqueItemId(e),R=r({key:e,index:t,isInitialFocusInRange:I&&this.state.isInitialFocusInRange,hasFocus:I,activeItem:b,firstItemInView:y&&!this.isScrolling()?this.getNextFirstFocusableItemInView():void 0,initialActiveItem:g})||{},P=i()(R.className,"c-virtual_list__item--sticky",{"c-virtual_list__item--sticky-animated":this.props.stickyOffsetTopAnimated}),L=i()("c-virtual_list__sticky_container",{"c-virtual_list__sticky_container--focus":I}),O=!p.includes(e),D=g===e;return n.createElement("div",{key:e,className:L,role:"presentation",style:{top:A,bottom:S,...f&&_&&{width:_}}},n.createElement(m.Ay,{tabIndex:this.getListItemTabIndex(e),...R,supportRovingTabIndex:O,id:M,itemKey:e,key:e,height:x,isCachedHeightValid:E,className:P,top:this.props.stickyOffsetTop,zIndex:this.props.stickyZIndex,hasFocus:I,hasFocusWithin:w,contextMenuVisible:T,onFocusEnter:this.onItemFocusEnter,onFocusWithin:this.onItemFocusWithin,onFocusLeave:u,onTabWithin:this.onItemTabWithin,onHeightChange:this.setHeight,onClick:l,onKeyDown:o,onContextMenu:this.onItemContextMenu,onMouseDown:this.onItemMouseDown,shouldHorizontallyScroll:s,useStaticHeight:c,isInitialActiveItem:D,"aria-setsize":"-1",resizeObserver:this.resizeObserver},a(t,{key:e,hasFocus:I,hasFocusWithin:w,itemId:M,listWidth:d,isInView:N,isExpanded:R["aria-expanded"],hasContextMenu:T})))}};let u=(0,s.V)((0,c.A)(BaseStickyList))},0x1b1e3d1ac:(e,t,a)=>{"use strict";a.d(t,{S:()=>n});let n={ALL_DMS:"all_dms",MENTIONS_REACTIONS:"mentions_reactions",SAVED_ITEMS:"saved_items",LATER_TAB_IN_PROGRESS:"later_tab_in_progress",LATER_TAB_ARCHIVED:"later_tab_archived",LATER_TAB_COMPLETED:"later_tab_completed",UNREADS:"unreads",DAILY_DIGEST:"daily_digest"}},0x1905febac:(e,t,a)=>{"use strict";function shouldUseDegradedList(){let e=window.location.search||"";if(e.indexOf("force_degraded_list=1")>0)return!0;if(e.indexOf("force_infinite_list=1")>0)return!1;let t=window.navigator.userAgent;return -1!==t.indexOf("Firefox")||-1!==t.indexOf("Windows")||-1!==t.indexOf("Linux")}a.d(t,{A:()=>shouldUseDegradedList})},0x1d8fbce0b:(e,t,a)=>{"use strict";a.d(t,{C:()=>i,v:()=>l});var n=a(0xbad225b5),r=a(0xafd4161c);let i=(0,n.createContext)(({label:e})=>(0,n.createElement)("span",null,e)),l=(0,r._)(i,"withTokenComponent",e=>({tokenComponent:e}))},0xa079e8fe:(e,t,a)=>{"use strict";a.d(t,{A:()=>u,l:()=>AdminModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x138a699),o=a(0x87a0be7),s=a(0x147ada709),c=a(0x20e80190e),d=a(0x1fcbb004d);let m="ask_admin_modal",AdminModal=({fullWidthContent:e,className:t,maxWidth:a,title:r,subtitle:d,children:u,modalAlert:p,primaryAction:h,secondaryAction:_,tertiaryActionElement:f,showCloseButton:b=!1,closeModal:g=i.A,dataQaPrefix:y=m,speedBumpState:A,autoClogProps:x,renderSpeedBump:E,onClose:C,contentLabel:k,overlayClassName:v})=>n.createElement(c.dW,{maxWidth:a,showCloseButton:b,closeModal:g,onClose:C,className:t??"p-admin_modal",contentLabel:k,dataQa:`${y}`,...x?{autoClogProps:x}:{},overlayClassName:v},n.createElement(s.A,{title:r,subtitle:d}),n.createElement(l.A,{fullWidthContent:e,dataQaPrefix:y,modalAlert:p},u),A?.isVisible?n.createElement(c.ty,{...A,description:A.message}):null,h?n.createElement(o.A,{dataQaPrefix:y,primaryAction:h,secondaryAction:_,tertiaryActionElement:f,renderSpeedBump:E}):null),AdminModalContainer=e=>{let t=(0,r.wA)();return n.createElement(AdminModal,{...e,closeModal:(0,n.useCallback)(()=>t((0,d.O)({closeAll:!0})),[t])})};AdminModalContainer.displayName="AdminModalContainer";let u=AdminModalContainer},0x138a699:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x2b7f0bcc),i=a(0x20e80190e);let ApiErrorAlert=({dataQaPrefix:e,modalAlert:t})=>t?.alertContent?n.createElement(i.qf,{className:"margin_bottom_100"},n.createElement(r.Ay,{"data-qa":`${e}__api_error`,id:`${e}__api_error`,level:t?.alertLevel||r.A_.error,type:t?.alertType||r.QE.boxed,align:r.AO.left,className:t?.className,isIconVisible:t?.isIconVisible??!0},t?.alertContent)):null,AdminModalWarning=({dataQaPrefix:e,modalAlert:t})=>t?.warningContent?n.createElement(i.qf,{className:"margin_bottom_100"},n.createElement(r.Ay,{"data-qa":`${e}__warning`,id:`${e}__warning`,level:r.A_.warning,align:r.AO.left},t?.warningContent)):null,__WEBPACK_DEFAULT_EXPORT__=({dataQaPrefix:e,fullWidthContent:t=!1,modalAlert:a,children:r})=>n.createElement(i.$m,null,n.createElement(ApiErrorAlert,{dataQaPrefix:e,modalAlert:a}),n.createElement(i.qf,{"data-qa":`${e}__content`,className:t?"padding_0":""},r),n.createElement(AdminModalWarning,{dataQaPrefix:e,modalAlert:a}))},0x87a0be7:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x1d71c4455),s=a(0x20e80190e);let c=new i.Ay("enterprise_dashboard"),d="ask_admin_modal",getProperAriaLabel=(e,t)=>e||"string"==typeof t&&t||"",PrimaryAction=({ariaLabelPrimaryAction:e,isDisabled:t=!1,isLoading:a=!1,buttonType:i=o.Q.primary,buttonText:s=c.t("Save"),onClick:d=r.A,autoClogProps:m})=>n.createElement(l.lV,{"data-qa":"primary_action","aria-label":getProperAriaLabel(e,s),type:i,disabled:t,loading:a,onClick:d,autoClogProps:m},s),SecondaryAction=({isDisabled:e=!1,isLoading:t=!1,buttonType:a=o.Q.outline,buttonText:r=c.t("Cancel"),onClick:i,autoClogProps:l,ariaLabelSecondaryAction:d})=>n.createElement(s.s_,{"data-qa":"cancel_action","aria-label":getProperAriaLabel(d,r),type:a,disabled:e,loading:t,onClick:i,autoClogProps:l},r),__WEBPACK_DEFAULT_EXPORT__=({dataQaPrefix:e=d,primaryAction:t,secondaryAction:a,tertiaryActionElement:r,renderSpeedBump:i})=>n.createElement(s.jl,{"data-qa":`${e}_footer`,className:"p-admin_modal_footer",renderSpeedBump:i},r,n.createElement(s.ox,null,null!==a&&n.createElement(SecondaryAction,a),"string"==typeof t.buttonText?n.createElement(PrimaryAction,t):t.buttonText))},0x147ada709:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x20e80190e);let i="ask_admin_modal",__WEBPACK_DEFAULT_EXPORT__=({dataQaPrefix:e=i,title:t,subtitle:a})=>n.createElement(r.rQ,null,n.createElement(r.Rc,{"data-qa":`${e}__modal_title`,title:t,subtitle:a}))},0x214010a22:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1daf4b9c);let AdminPageSection=({children:e,className:t,fullWidth:a=!1,fullHeight:r=!1,skipInLegacy:o=!1,removeTopPadding:s=!1,...c})=>{let d=(0,l.A)()||!o;return n.createElement("div",{className:d?i()({"p-admin_page_section__full_width":a,"p-admin_page_section__full_height":r,"p-admin_page_section__remove_top_padding":s},t):t,...c},e)};AdminPageSection.displayName="AdminPageSection";let o=AdminPageSection},0x1b5aad35e:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x40c0d834),o=a(0x1daf4b9c),s=a(0x3711e82d);let c=!1,AdminPage=({children:e,className:t})=>{let a=!c&&(0,o.A)();(0,n.useEffect)(()=>{c||(c=!0)},[]);let r=i()("p-admin_page",t),d=n.createElement("div",{className:r},e);return a?n.createElement(l.A,{eventId:s.EventId.ADMIN_PAGE_BOOTED,uiStep:window.location.pathname,stepVariant:"gantry",clogImpression:!0},d):d};AdminPage.displayName="AdminPage";let d=AdminPage},0x14bcb276e:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x913f6320),i=a(0x11aaf59fe),l=a(0x2501a2cee),o=a(0x4c96e5d9),s=a(0x1ebfa1009);let DataTableHeaderFilter=({dataQaPrefix:e="data_table_header",ariaLabel:t="Data table header filter",placeholderText:a,filterOptions:c,selectedOption:d,onFilterChange:m,isDisabled:u=!1,filterUnavailable:p,coachmark:h,minOptionsListWidth:_=228})=>{let f=`${e}-filter`;if(p){let{infoText:e,infoIcon:t="info",hideIcon:r=!1}=p;return n.createElement("div",{className:"c-data_table_header_filter--unavailable","data-qa":`${f}-unavailable-info`},n.createElement("div",{className:"c-data_table_header_filter--unavailable-info-text"},a),!r&&n.createElement(o.Ay,{tip:e,position:"top"},n.createElement(l.Ah,{name:t,"aria-label":e})))}let b=n.createElement(r.A,{"data-qa":f,ariaLabel:t,selectId:f,size:i.hu.SMALL,minOptionsListWidth:_,placeholderText:a,options:c,selectedOption:d,onOptionSelected:m,isDisabled:u});return h?n.createElement(s.Ay,{coachmarkElement:h,orientation:"bottom"},b):b};DataTableHeaderFilter.displayName="DataTableHeaderFilter";let c=(0,n.memo)(DataTableHeaderFilter)},0x21699de:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>b,Tr:()=>_,X7:()=>isSelectDateRangeSection,XN:()=>isSelectManySearchableSection,sE:()=>isSelectOneSection,wc:()=>isSelectOneSearchableSection});var n,r=a(0xbad225b5),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x15f8e452a),s=a(0x410829f8),c=a(0x6aeae8a3),d=a(0x93992cb9),m=a(0xe7720a80),u=a(0xba27e49),p=a(0x245cc36c7),h=a(0x194c792f8),_=((n={})[n.SELECT_ONE=0]="SELECT_ONE",n[n.SELECT_ONE_SEARCHABLE=1]="SELECT_ONE_SEARCHABLE",n[n.SELECT_MANY=2]="SELECT_MANY",n[n.SELECT_MANY_SEARCHABLE=3]="SELECT_MANY_SEARCHABLE",n[n.SELECT_DATERANGE=4]="SELECT_DATERANGE",n);let f=new i.Ay("enterprise_dashboard");function isSelectOneSection(e){return 0===e.sectionType}function isSelectOneSearchableSection(e){return 1===e.sectionType}function isSelectManySearchableSection(e){return 3===e.sectionType}function isSelectDateRangeSection(e){return 4===e.sectionType}function getActiveFilterCount(e){let t=0;return e.forEach(({sectionType:e,selected:a,defaultValue:n})=>{(2===e||3===e)&&n?t+=a.length-n.length:4===e?(a?.selectedStartDate!==void 0&&a?.selectedStartDate!==n?.startDate||a?.selectedEndDate!==void 0&&a?.selectedEndDate!==n?.endDate)&&(t+=1):n!==a&&(t+=1)}),t}function DataTableHeaderMultiFilter({dataQaPrefix:e,multiFilters:t,filterButtonAutoClogProps:a,resetButtonAutoClogProps:n,onFilterReset:i}){let _=getActiveFilterCount(t),b=(0,r.useCallback)(()=>{t.forEach(e=>{isSelectOneSection(e)||isSelectOneSearchableSection(e)?e.onSelectedChange(e.defaultValue):isSelectDateRangeSection(e)?e.onSelectedChange({selectedStartDate:e.defaultValue?.startDate,selectedEndDate:e.defaultValue?.endDate}):e.onSelectedChange(e.defaultValue)})},[t]),renderSection=e=>isSelectOneSection(e)?r.createElement(p.A,e):isSelectOneSearchableSection(e)?r.createElement(h.A,e):isSelectManySearchableSection(e)?r.createElement(u.A,e):isSelectDateRangeSection(e)?r.createElement(d.A,e):r.createElement(m.A,e);renderSection.displayName="renderSection";let g=(0,r.useCallback)(e=>r.createElement(c.AM,{position:"left-bottom",zIndex:"menu",offsetX:50,offsetY:25,ariaHideApp:!1,...e},r.createElement("div",{className:"c-data_table_header_multi_filter__pop_over_container"},r.createElement("div",{className:"c-data_table_header_multi_filter__pop_over_header"},r.createElement("p",{className:"c-data_table_header_multi_filter__header_title","data-qa":"data-table-header-multi-filter-title"},f.t("Filter")),r.createElement(l.Nm,{className:"c-data_table_header_multi_filter__header_reset",onClick:i??b,disabled:0===_,...n?{autoClogProps:n}:{}},f.t("Reset"))),r.createElement("div",{className:"c-data_table_header_multi_filter__pop_over_body"},t.map(e=>r.createElement("div",{key:e.sectionId,className:"c-data_table_header_multi_filter__section"},r.createElement("p",{className:"c-data_table_header_multi_filter__section_title"},e.sectionTitle),renderSection(e)))))),[b,t,_,i,n]),renderIconOrBadge=()=>_>0?r.createElement(s.Gm,{className:"c-data_table_header_multi_filter__active_badge",count:_,style:s.rY.blue}):r.createElement(o.A,{type:"filters",size:"inherit",className:"c-data_table_header_multi_filter__filter_icon"});return renderIconOrBadge.displayName="renderIconOrBadge",r.createElement(c.Wv,{renderPopover:g},r.createElement(l.Nm,{className:"c-data_table_header_multi_filter__filter_button","data-qa":`${e}-multi-filter-popover-trigger`,...a?{autoClogProps:a}:{},"aria-label":f.t("Filter, {numActive, plural, =1 {# filter} other {# filters}} applied",{numActive:_,fallbackHash:"d7decf1aa22b02ae8abf9a96849ee423eee838e4"})},r.createElement("span",{className:"c-data_table_header_multi_filter__filter_text"},f.t("Filter")),renderIconOrBadge()))}DataTableHeaderMultiFilter.displayName="DataTableHeaderMultiFilter";let b=(0,r.memo)(DataTableHeaderMultiFilter)},0x93992cb9:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x32683b78);let SelectDateRange=({dateFormat:e,selected:t,disableDatesBefore:a,disableDatesAfter:i,endDateRequired:l,showClearSelection:o,showCancelSaveButtons:s,focusOnMount:c,placeholderText:d,ariaLabel:m,dataQa:u,closeAfterSelection:p,onSelectedChange:h,onCalendarClose:_,onStartDateChange:f,onEndDateChange:b,saveButtonCopy:g,className:y,defaultValue:A,maxRange:x=30})=>{let E=t?.selectedStartDate??A?.startDate,C=t?.selectedEndDate??A?.endDate;return n.createElement(r.A,{placeholderText:d,key:`${E}-${C}`,selectedStartDate:E,selectedEndDate:C,onStartDateChange:f,onEndDateChange:b,onCalendarClose:_,onSave:h,maxRange:x,disableDatesBefore:a,disableDatesAfter:i,endDateRequired:l,showClearSelection:o,showSaveCancelButtons:s,saveButtonCopy:g,focusOnMount:c,closeAfterSelection:p,"aria-label":m,dataQa:u,displayFormat:"MMM Do YY",dateFormat:e,className:y,buttonSize:"medium",width:250,singleMonthMode:!0,renderCalendarInPopover:!0,disableSaveWhenNoDatesSelected:!0})};SelectDateRange.displayName="SelectDateRange";let i=SelectDateRange},0xba27e49:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0xa7ec93c2);let SelectManySearchable=({selected:e,sectionId:t,sectionOptions:a,placeholderText:i,isRequired:l,ariaLabel:o,renderOption:s,onSelectedChange:c})=>n.createElement(r.Ay,{selectId:t.toString(),key:`${e}`,placeholderText:i,isRequired:l,ariaLabel:o,options:a,selectedOptions:e,onSelectedItemsChange:c,renderOption:s,width:250,expandOnFocus:!0});SelectManySearchable.displayName="SelectManySearchable";let i=SelectManySearchable},0xe7720a80:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x45bd075),i=a(0x1d2cd7755);let SelectMany=({sectionOptions:e,selected:t,onSelectedChange:a})=>n.createElement(n.Fragment,null,e.map(({label:e,value:l,disabled:o=!1,autoClogProps:s,dataQa:c})=>n.createElement(i.A,{key:l,type:"inline",cursor:"pointer",text:n.createElement("span",null,e,"\xa0"),isDisabled:o},n.createElement(r.A,{checked:t.includes(l),onChange:()=>t.includes(l)?a(t.filter(e=>e!==l),l):a([...t,l],l),disabled:o,autoClogProps:s,"data-qa":c??`${l}-checkbox`}))));SelectMany.displayName="SelectMany";let l=SelectMany},0x194c792f8:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1d1911997),l=a(0xa9a7442);let o=new r.Ay("enterprise_dashboard"),SelectOneSearchable=({sectionId:e,sectionOptions:t,selected:a,onSelectedChange:r,search:s,processOptions:c,renderOption:d,renderSelectedOption:m,minQueryLength:u,isDisabled:p=!1,isRequired:h=!1,placeholderText:_,autoClogProps:f,selectDataQa:b})=>{let g=(0,n.useMemo)(()=>({...f,elementValue:a}),[f,a]);if(s)return n.createElement(l.m,{ariaLabel:o.t("Please select an option"),selectId:e,width:250,selectedOption:a?{value:a}:null,key:a,onOptionSelected:({value:e})=>r(e),renderOption:d,renderSelectedOption:m,search:s,processOptions:c,showDropdownIcon:!0,isDisabled:p,isRequired:h,placeholderText:_,autoClogProps:g,selectDataQa:b,minQueryLength:u});let y=t.filter(e=>"value"in e&&e.value===a)[0];return n.createElement(i.Ay,{options:t,ariaLabel:o.t("Please select an option"),selectId:e,width:250,selectedOption:y,key:a,onOptionSelected:({value:e})=>r(e),showDropdownIcon:!0,placeholderText:_,autoClogProps:g,selectDataQa:b,renderSelectedOption:m})};SelectOneSearchable.displayName="SelectOneSearchable";let s=SelectOneSearchable},0x245cc36c7:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x1d2cd7755),i=a(0x139c79d16),l=a(0xa5dbe09b);let SelectOne=({sectionOptions:e,selected:t,onSelectedChange:a})=>n.createElement(l.A,{className:"c-data_table_header_multi_filter__radio_group"},e.map(({label:e,value:l})=>n.createElement(r.A,{key:l,type:"inline",cursor:"pointer",text:n.createElement("span",null,e,"\xa0")},n.createElement(i.A,{checked:t===l,onChange:()=>a(l)}))));SelectOne.displayName="SelectOne";let o=SelectOne},0xb656f820:(e,t,a)=>{"use strict";a.d(t,{A:()=>z});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1595bdd0),o=a(0xb1ea448c),s=a(0x1faa3f1ac),c=a(0x4c96e5d9);let DataTableHeaderAction=({text:e,ariaLabel:t,onClick:a,isDisabled:r,shouldShowSpinner:i,tooltipProps:l,dataQaPrefix:d,autoClogProps:m})=>{let u=n.createElement(s.A,{className:"c-data_table_header_action","aria-label":t??e.toString(),onClick:a,disabled:r,"data-qa":`${d}-header-action`,autoClogProps:m},i?n.createElement(o.A,{className:"c-data_table_header_action__spinner",color:"blue",size:"medium",inline:!0}):null,n.createElement("div",null,e));return l?n.createElement(c.Ay,l,u):u};DataTableHeaderAction.displayName="DataTableHeaderAction";let d=(0,n.memo)(DataTableHeaderAction);var m=a(0x62a17882),u=a(0x20482ad21),p=a(0x344bb842);let h=new u.Ay("enterprise_dashboard"),DataTableHeaderSelectedBox=({selectedObjectsCount:e,showOnlySelected:t=!1,onToggleShowSelected:a,onClearSelected:r,dataQaPrefix:i,hideShowSelected:l})=>n.createElement("div",{className:"p-data_table_header_count_selected","data-qa":`${i}-selected-box`},n.createElement("div",{className:"p-data_table_header_count_selected--close-icon"},n.createElement(p.A,{"data-qa":`${i}-deselected-all-button`,"aria-label":h.t("Deselect all rows"),size:"small",onClick:r,svgIconProps:{name:"close"}})),n.createElement("div",{className:"p-data_table_header_count_selected--label","data-qa":`${i}-selected-count-label`},h.t("{count, plural, =1 {# selected} other {# selected}}",{count:e})),!l&&n.createElement(s.A,{onClick:a,"data-qa":`${i}-toggle-show-all-button`,"aria-label":t?h.t("Show all rows"):h.t("Show only selected {count, plural, =1 {# row} other {# rows}}",{count:e})},t?h.t("Show all"):h.t("Show only")));DataTableHeaderSelectedBox.displayName="DataTableHeaderSelectedBox";let _=(0,n.memo)(DataTableHeaderSelectedBox),f=new u.Ay("enterprise_dashboard"),DataTableHeaderCount=({selectedObjectsCount:e,filteredObjectsCount:t,totalCountLabel:a,showOnlySelected:r,onToggleShowSelected:i,onClearSelected:l,hideShowSelected:o,dataQaPrefix:s})=>{if(void 0!==e&&e>0)return n.createElement(_,{dataQaPrefix:`${s}-selected`,selectedObjectsCount:e,onClearSelected:l,showOnlySelected:r,onToggleShowSelected:i,hideShowSelected:o});let c=void 0!==t?n.createElement("span",{"data-qa":`${s}-filtered`},f.t("{count, plural, =1 {# filtered result} other {# filtered results}}",{count:t})):n.createElement("span",{"data-qa":`${s}-total`},a);return(0,m.cX)()&&((0,m.y3)()||(0,m.F2)())?n.createElement("div",null,c):c};DataTableHeaderCount.displayName="DataTableHeaderCount";let b=(0,n.memo)(DataTableHeaderCount);var g=a(0x1ebfa1009);let y=new u.Ay("enterprise_dashboard"),DataTableHeaderEditColumnsAction=({openEditColumnsModal:e,dataQaPrefix:t,coachmark:a})=>{let r=n.createElement(d,{text:y.t("Edit columns",{fallbackHash:"6db7d965c5a86fe0d969c3e52eec9ba870d678e2"}),onClick:e,dataQaPrefix:t});return a?n.createElement(g.Ay,{coachmarkElement:a,orientation:"bottom"},r):r};DataTableHeaderEditColumnsAction.displayName="DataTableHeaderEditColumnsAction";var A=a(0x40c0d834),x=a(0x45bd075),E=a(0x1d2cd7755),C=a(0x20e80190e),k=a(0x3711e82d);let v=new u.Ay("enterprise_dashboard");function DataTableHeaderEditColumnsModal({visibleTableColumns:e,setVisibleTableColumns:t,tableColumnOptions:a,tableColumnSections:r,dataQaPrefix:l="analytics",closeModal:o,baseAutoClogProps:c}){let[d,m]=(0,n.useState)(e);(0,n.useEffect)(()=>{t(d)},[d,t]);let u=a.every(({value:e,isDisabled:t})=>t||d.includes(e)),maybeAutoClogProps=e=>c?{...c,...e}:void 0;return n.createElement(A.A,maybeAutoClogProps({uiStep:k.UiStep.DATA_TABLE_HEADER_EDIT_COLUMNS_MODAL,clogImpression:!0})??{},n.createElement(C.dW,{className:"c-data_table_edit_columns_modal",closeModal:o,showCloseButton:!0,shouldCloseOnOverlayClick:!0},n.createElement(C.Rc,{className:"c-data_table_edit_columns_modal__title",title:v.t("Edit columns",{fallbackHash:"6db7d965c5a86fe0d969c3e52eec9ba870d678e2"})}),n.createElement(C.$m,null,n.createElement(C.qf,null,n.createElement("div",{className:"c-data_table_edit_columns_modal__select_controls"},n.createElement(s.A,{className:"margin_right_50",onClick:()=>m(a.map(({value:e})=>e)),"data-qa":`${l}__data_table_edit_columns_modal__select_all`,disabled:u,autoClogProps:maybeAutoClogProps({uiStep:k.UiStep.DATA_TABLE_HEADER_EDIT_COLUMNS_MODAL_SELECT_ALL_COLUMNS,action:k.UiAction.CLICK,onClick:{enableClogAction:!0}})},v.t("Select all",{fallbackHash:"86a599ef4df28ea3f3b3919bb62442d7f7d40c69"})),"|",n.createElement(s.A,{className:"margin_left_50",onClick:()=>m(a.filter(({isVisibleByDefault:e})=>e).map(({value:e})=>e)),"data-qa":`${l}__data_table_edit_columns_modal__reset`,autoClogProps:maybeAutoClogProps({uiStep:k.UiStep.DATA_TABLE_HEADER_EDIT_COLUMNS_MODAL_RESET_COLUMNS,action:k.UiAction.CLICK,onClick:{enableClogAction:!0}})},v.t("Reset columns",{fallbackHash:"b4b3001831815163a7bd7a34fff8195b2cc4948b"})))),n.createElement(C.qf,null,r.map(({label:e,value:t,desc:r})=>n.createElement("div",{key:t,className:"c-data_table_edit_columns_modal__option_section"},n.createElement("p",{className:"c-data_table_edit_columns_modal__option_section_title"},e),r?n.createElement("p",{className:"c-data_table_edit_columns_modal__option_section_description"},r):null,a.filter(({section:e})=>e===t).map(({label:e,value:t,description:a,isDisabled:r})=>{let o=d.includes(t);return n.createElement(E.A,{key:t,className:i()("c-data_table_edit_columns_modal__option_section_item",{sk_foreground_high_solid:r}),type:"inline",cursor:"pointer",text:e,subtext:a},n.createElement(x.A,{onChange:()=>{d.includes(t)?m(d.filter(e=>e!==t)):m([...d,t])},checked:o,name:"visibleColumnOptions","data-qa":`${l}__data_table_edit_columns_modal__checkbox_${t}`,disabled:r,autoClogProps:maybeAutoClogProps({uiStep:k.UiStep.DATA_TABLE_HEADER_EDIT_COLUMNS_MODAL_TOGGLE_COLUMN,action:k.UiAction.TOGGLE,actionStatus:o?k.UiActionStatus.OFF:k.UiActionStatus.ON,elementValue:t,onChange:{enableClogAction:!0}})}))}))))),n.createElement(C.jl,null,n.createElement(C.ox,null,n.createElement(C.s_,{type:"outline",onClick:o,autoClogProps:maybeAutoClogProps({uiStep:k.UiStep.DATA_TABLE_HEADER_EDIT_COLUMNS_MODAL_CLOSE,action:k.UiAction.CLOSE,onClick:{enableClogAction:!0}}),"data-qa":`${l}__data_table_edit_columns_modal__close`,"aria-label":v.t("Close")},v.t("Close"))))))}DataTableHeaderEditColumnsModal.displayName="DataTableHeaderEditColumnsModal";let S=DataTableHeaderEditColumnsModal;var I=a(0x14bcb276e),w=a(0x21699de),T=a(0x2286acf6c),N=a(0x543a781e),M=a(0x224f7f0e9),R=a(0x12edaa96a),P=a(0x14abc22b0),L=a(0xfbe3141b),O=a(0x21cf37dc6);let D=new u.Ay("enterprise_dashboard"),DataTableHeaderSearch=({filteredObjectsCount:e,searchProps:t,searchDebounceWait:a,dataQaPrefix:r})=>{let{sendMessageToAnnouncerAPI:l}=(0,n.useContext)(P.A),{onDebouncedChange:o,widthSize:s=O.o.Medium,isLoading:c,...d}=t,m=d.value,[u,p]=(0,n.useState)(!1),[h,_]=(0,n.useState)(m);(0,n.useEffect)(()=>{_(m)},[m]);let f=(0,n.useRef)(!1),b=(0,N.A)(h,a);(0,n.useEffect)(()=>{f.current&&o?.(b),f.current=!0},[b,o]),d?.autoClogProps?.onChange?.enableClogAction&&(d.autoClogProps.onChange.throttleActionClogDuration=a),(0,n.useEffect)(()=>{u&&!c&&(e&&l({message:D.t("{count, plural, =1 {# filtered result} other {# filtered results}}",{count:e,fallbackHash:"ddf19c4fe7e82abdd809ba72af999c1dc7a78f91"}),uuid:(0,R.A)()}),p(!1))},[u,e,c,l]);let g=(0,n.useCallback)(e=>{if(e.keyCode===M.Fm){let e=(a||0)+500;(0,T.A)(()=>p(!0),e)()}},[a]);return n.createElement(L.A,{...d,value:h,onChange:({target:{value:e}})=>_(e??""),className:i()({"p-data_table_header_search--small":s===O.o.Small},{"p-data_table_header_search--medium":s===O.o.Medium}),onKeyDown:g,icon:"search",size:O.o.Small,"data-qa":`${r}-search`,isLoading:c})};DataTableHeaderSearch.displayName="DataTableHeaderSearch";let F=(0,n.memo)(DataTableHeaderSearch);var U=a(0x1d1911997),B=a(0x11aaf59fe),H=a(0xa9a7442);let W=new u.Ay("enterprise_dashboard"),DataTableHeaderSearchableFilter=({dataQaPrefix:e="data_table_header",ariaLabel:t=W.t("Please select an option"),placeholderText:a,filterOptions:r,selectedOption:i,onFilterChange:l,processOptions:o,renderOption:s,renderSelectedOption:c,search:d,isDisabled:m=!1,isRequired:u=!1})=>{let p={selectId:`${e}-searchable_filter`,size:B.hu.SMALL,width:228,showDropdownIcon:!0,onOptionSelected:l,ariaLabel:t,renderOption:s,renderSelectedOption:c,isDisabled:m,isRequired:u,placeholderText:a};if(d)return n.createElement(H.m,{...p,selectedOption:i,search:d,processOptions:o,selectDataQa:"data_table_header-custom-searchable_filter-input"});if(r){let e=r.filter(e=>e.value===i?.value)[0];return n.createElement(U.Ay,{...p,options:r,selectedOption:e,selectDataQa:"data_table_header-searchable_filter-input"})}return null};DataTableHeaderSearchableFilter.displayName="DataTableHeaderSearchableFilter";let V=(0,n.memo)(DataTableHeaderSearchableFilter);var G=a(0x11a296110),q=a(0x15f8e452a);let data_table_header_tooltip=({dataQaPrefix:e,...t})=>n.createElement(c.Ay,{...t,"data-qa":`${e}-tooltip`,position:"right"},n.createElement(G.Nm,{className:"sk_foreground_max padding_left_25 padding_right_25","aria-label":"string"==typeof t.tip?t.tip:void 0,"data-qa":`${e}-tooltip-button`},n.createElement(q.A,{type:"info-circle",size:"inherit"})));var j=a(0x4433d67f);function DataTableHeader({totalCountLabel:e,filteredObjectsCount:t,selectedObjectsCount:a,tooltipProps:r,className:o,dataQaPrefix:s="data_table_header",searchProps:c,searchDebounceWait:m=300,filterProps:u,multiFilterProps:p,searchableFilterProps:h,showOnlySelected:_,onClearSelected:f,onToggleShowSelected:g,hideShowSelected:y=!1,actions:A=[],editColumnsModalProps:x,fullWidthInModalContentSection:E,responsive:C=!1,hideCount:k=!1,customDataTableHeaderRightElement:v=null,infoLabel:T}){let[N]=(0,j.A)(({closeModal:e})=>({element:x&&n.createElement(S,{...x,dataQaPrefix:s,closeModal:e})})),M=(0,l.A)(Array.isArray(u)?u.slice(0,2):[u]);return n.createElement("div",{className:i()(o,"p-data_table_header",{"p-data_table_header--full-width-in-modal":E,"p-data_table_header--responsive":C}),"data-qa":s},n.createElement("div",{className:"p-data_table_header--left"},!k&&n.createElement(b,{dataQaPrefix:`${s}-count`,totalCountLabel:e,filteredObjectsCount:t,selectedObjectsCount:a,showOnlySelected:_,onClearSelected:f,onToggleShowSelected:g,hideShowSelected:y}),r&&n.createElement(data_table_header_tooltip,{...r,dataQaPrefix:s}),(A.length>0||x)&&n.createElement("div",{className:i()("p-data_table_header__actions",{margin_left_0:k||!e}),"data-qa":`${s}-actions`},A.map(e=>n.createElement(d,{key:e.dataQaPrefix,...e})),x&&n.createElement(DataTableHeaderEditColumnsAction,{openEditColumnsModal:N,dataQaPrefix:`${s}_edit_columns`,coachmark:x.editColumnsCoachmark})),T&&n.createElement("div",{className:"p-data_table_header__infoLabel","data-qa":`${s}-infoLabel`},T)),n.createElement("div",{className:"p-data_table_header--right"},v,M&&M.map((e,t)=>n.createElement(I.A,{key:e.key||`${s}-filter-${t}`,dataQaPrefix:s,...e})),h&&n.createElement(V,{dataQaPrefix:s,...h}),p&&n.createElement(w.Ay,{dataQaPrefix:s,...p}),c&&n.createElement(F,{filteredObjectsCount:t,searchProps:c,searchDebounceWait:m,dataQaPrefix:s})))}DataTableHeader.displayName="DataTableHeader";let z=(0,n.memo)(DataTableHeader)},0x76d8f545:(e,t,a)=>{"use strict";a.d(t,{A:()=>i,R:()=>r.Tr});var n=a(0xb656f820),r=a(0x21699de);let i=n.A},0x24a897194:(e,t,a)=>{"use strict";a.d(t,{Nk:()=>n.A,xm:()=>label_link_button,oc:()=>c});var n=a(0x97e3e60e),r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x11a296110);let label_link_button=({className:e,...t})=>r.createElement(o.Nm,{className:l()("p-label_link","p-label_link--button",e),...t});var s=a(0x2501a2cee);let LabelLinkExternal=({className:e,iconName:t,iconSize:a="20",children:n,...i})=>t?r.createElement(o.jV,{className:l()("p-label_link_text_with_icon_wrapper",e),...i},r.createElement("div",{className:"p-label_link_text_with_icon"},n),t&&r.createElement("div",{className:"p-label_link_icon"},r.createElement(s.Ah,{name:t,inline:!0,size:a}))):r.createElement(o.jV,{className:l()("p-label_link",e),...i},n);LabelLinkExternal.displayName="LabelLinkExternal";let c=LabelLinkExternal},0x97e3e60e:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1daf4b9c),o=a(0x15e39ab9e),s=a(0xf0dfe005);let LabelLink=({className:e,routeName:t,params:a,legacyRoute:r,withEntity:c=!1,...d})=>{let m=i()("p-label_link",e,{"p-label_link--with-entity":c});return(0,l.A)()?n.createElement(s.A,{className:m,routeName:t,params:a,...d}):n.createElement(o.A,{className:m,href:r??"",...d})};LabelLink.displayName="LabelLink";let c=LabelLink},0x36a65a43:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x19575c897).A},0x19575c897:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x2b7f0bcc),i=a(0x15f8e452a),l=a(0x1faa3f1ac);let PageHeaderBreadcrumbs=({breadcrumbs:e,dataQaPrefix:t})=>{if(!e?.length)return null;let a=t?`${t}_`:"";return n.createElement("div",{className:"p-page_header__breadcrumbs","data-qa":`${a}page-header-breadcrumbs`},e.map(e=>n.createElement(l.A,{className:"p-page_header__breadcrumbs_crumb",href:e?.link,key:e?.label,onClick:e?.route,"data-qa":e?.["data-qa"]},e?.label,n.createElement(i.A,{type:"chevron-right"}))))};PageHeaderBreadcrumbs.displayName="PageHeaderBreadcrumbs";var o=a(0x21f3c49e8),s=a(0x102edf836),c=a(0xce378727),d=a(0x99233ecb),m=a(0x4c96e5d9),u=a(0x20482ad21),p=a(0xb90de824),h=a(0x13953efe6),_=a(0x1b997ca3c);let f=new u.Ay("modernselling"),SalesforceAdminMigrateUsersLaterCoachmarkBase=({children:e,isOpen:t,closeCoachmark:a})=>{let r=f.t("Migrate users later"),i=f.rt("When you\u2019re ready to manage all your users with one  permission set, start the migration process from the <b>Manage</b> menu."),l=(0,n.useMemo)(()=>n.createElement(p.Ay,{isMegaphoneCoachmark:!1,isOpen:t,width:403,offsetY:0,arrowPosition:90,title:r,ariaLabel:r,bodyText:i,closeCoachmark:a}),[i,a,t,r]),o=(0,n.useCallback)(e=>{e.stopPropagation()},[]);return n.createElement("span",{role:"none",onClick:o},n.createElement(h.Ay,{coachmarkElement:l,orientation:"bottom-left"},e))};SalesforceAdminMigrateUsersLaterCoachmarkBase.displayName="SalesforceAdminMigrateUsersLaterCoachmarkBase";let SalesforceAdminMigrateUsersLaterCoachmark=({children:e})=>{let[t,a]=(0,_.s)();return t?n.createElement(SalesforceAdminMigrateUsersLaterCoachmarkBase,{isOpen:t,closeCoachmark:a},e):e||null};SalesforceAdminMigrateUsersLaterCoachmark.displayName="SalesforceAdminMigrateUsersLaterCoachmark";let b={[a(0x1472af90a).G7.SalesforceAdminMigrateUsersLaterCoachmark]:SalesforceAdminMigrateUsersLaterCoachmark},CoachmarkWrapper=({coachmarkName:e,children:t})=>{if(!e)return t;let a=b[e];return n.createElement(n.Fragment,null,a&&n.createElement(a,null,t),!a&&t)};CoachmarkWrapper.displayName="CoachmarkWrapper";let PageHeaderButtons=({primaryActionProps:{tooltipProps:e,...t}={"aria-label":void 0},secondaryActionProps:{tooltipProps:a,...r}={"aria-label":void 0},menuButtonProps:l,dataQaPrefix:u,children:p})=>{let h=u?`${u}_`:"",MaybeWrapWithTooltip=({tooltipProps:e,children:t})=>e?n.createElement(m.Ay,e,t):t;MaybeWrapWithTooltip.displayName="MaybeWrapWithTooltip";let isOnlyAriaLabelProp=e=>1===Object.keys(e).length&&"aria-label"in e;return n.createElement("div",{className:"p-page_header__buttons"},(0,o.A)(r)||isOnlyAriaLabelProp(r)?null:n.createElement(MaybeWrapWithTooltip,{tooltipProps:a},n.createElement(c.A,{type:"outline","data-qa":`${h}page_header_secondary_button`,...r})),(0,o.A)(t)||isOnlyAriaLabelProp(t)?null:n.createElement(MaybeWrapWithTooltip,{tooltipProps:e},n.createElement(c.A,{type:"primary","data-qa":`${h}page_header_primary_button`,...t})),l?n.createElement(CoachmarkWrapper,{coachmarkName:l.coachmarkName},n.createElement(d.cQ,{renderMenu:l.renderMenu,position:"bottom-right",offsetY:8},n.createElement(s.Ay,{type:"outline","data-qa":`${h}page_header_menu_button`},l.text,n.createElement(i.A,{type:"chevron-down",inline:!0})))):null,p)};PageHeaderButtons.displayName="PageHeaderButtons";let page_header_page_header_large=({title:e,subline:t,dataQaPrefix:a})=>n.createElement("div",{className:"p-page_header_large__info"},n.createElement("h1",{"data-qa":`${a}_title`,className:"p-page_header_large__title"},e),t?n.createElement("div",{className:"p-page_header_large__subline","data-qa":`${a}_subline`},t):null),PageHeader=({title:e,subline:t,description:a,menuButtonProps:i,primaryActionProps:l,secondaryActionProps:o,dataQaPrefix:s,breadcrumbs:c,alertProps:d,renderIcon:m,children:u})=>{let p=s?`${s}_`:"";return n.createElement("div",{className:"p-page_header","data-qa":`${p}page_header_container`},n.createElement("div",{className:"p-page_header__info"},n.createElement("div",null,n.createElement(PageHeaderBreadcrumbs,{breadcrumbs:c,dataQaPrefix:s}),n.createElement("div",{className:"p-page_header__main_column"},m&&n.createElement("div",{className:"p-page_header__icon"},m({size:56})),n.createElement(page_header_page_header_large,{title:e,subline:a?"":t,dataQaPrefix:s}))),n.createElement(PageHeaderButtons,{menuButtonProps:i,primaryActionProps:l,secondaryActionProps:o,dataQaPrefix:s},u)),!t&&a?n.createElement("div",{className:"p-page_header__description","data-qa":`${p}page_header_description`},a):null,d&&n.createElement("div",{className:"margin_top_125"},n.createElement(r.Ay,{"data-qa":`${p}page_header_error`,...d})))};PageHeader.displayName="PageHeader";let g=PageHeader},0x2347f903d:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x1fd3f6e20),s=a(0x4c96e5d9),c=a(0x1cbdfeceb),d=a(0x11a296110),m=a(0x15f8e452a),u=a(0x189a28b3e),p=a(0x195cfaedb);let format_data_qa=(e,t)=>t?e?`${e}_${t}`:t:"",h=new l.Ay("enterprise_dashboard"),_=class extends n.PureComponent{constructor(e){super(e)}maybeRenderEditButton(){let{onEdit:e,editButtonText:t,editButtonAriaLabel:a,editButtonDataQa:r="edit-button",isReadOnly:i,dataQaPrefix:l}=this.props;return!e||i?null:n.createElement(d.Ay,{"data-qa":format_data_qa(l,r),type:"outline",size:"small",onClick:e,"aria-label":a},t||h.t("Edit"))}renderSecondaryAction=()=>{if(!this.props.secondaryAction||this.props.isReadOnly)return null;let{secondaryActionDataQa:e="secondary_action_button_qa",secondaryActionDataId:t,size:a="small",type:r="primary",buttonText:i="",onClick:l=c.A}=this.props.secondaryAction,o=t?`${p.B}${t}`:"secondary_action_button_id";return n.createElement(d.Ay,{"data-qa":format_data_qa(this.props.dataQaPrefix,e),"data-id":o,className:"margin_right_50","aria-label":i,type:r,size:a,onClick:l},i)};maybeRenderRemoveButton=()=>{let{onRemove:e,isReadOnly:t,dataQaPrefix:a,hideRemoveButton:r}=this.props;return!e||t||r?null:n.createElement(d.Ay,{"data-qa":format_data_qa(a,"remove-button"),className:"p-settings_row__actions__remove",type:"danger",size:"small",onClick:e},h.t("Remove"))};maybeRenderSwitch(){let{isEnabled:e,isReadOnly:t,switchAriaLabel:a,dataQaPrefix:r,onToggle:i}=this.props;return t||!i?null:n.createElement(u.A,{isToggled:e,onChange:i,ariaLabel:a,dataQa:format_data_qa(r,"switch")})}maybeRenderReadOnlyLabel(){let{isReadOnly:e,readOnlyText:t,hideReadOnlyIcon:a}=this.props;return e?n.createElement("div",{className:"p-settings_row__actions__read_only"},a?null:n.createElement(m.A,{type:"lock-o"}),n.createElement("span",null,t)):null}render(){return n.createElement("div",{className:"p-settings_row__actions"},this.maybeRenderReadOnlyLabel(),this.maybeRenderRemoveButton(),this.renderSecondaryAction(),this.maybeRenderEditButton(),this.maybeRenderSwitch(),this.props?.customAction)}};_.displayName="SettingsRowActions";var f=a(0xdf8554bd),b=a(0x1faa3f1ac);let g=new l.Ay("enterprise_dashboard"),SettingsRowActionsV2=({onEdit:e,actionMenuButton:t,isReadOnly:a,readOnlyText:r,readOnlyTooltipText:l,dataQaPrefix:o,infoBadgeText:c,editButtonText:u,editButtonAriaLabel:p,editButtonDataQa:h})=>{let maybeRenderEditButton=()=>!e||a?null:n.createElement(d.Ay,{"data-qa":format_data_qa(o,h||"settings_row_btn"),type:"outline",size:"small",onClick:e,"aria-label":p},u||g.t("Edit"));maybeRenderEditButton.displayName="maybeRenderEditButton";let maybeRenderReadOnlyLabel=()=>{if(!a)return null;let e=r||g.t("Locked by an org admin"),t=l||void 0,i=n.createElement(m.A,{type:"lock-small"}),c=t?n.createElement("span",{style:{display:"content"},role:"img","aria-label":t},i):i,d=n.createElement("div",{className:"p-settings_row_v2__actions__read_only"},c,n.createElement("span",{"data-qa":format_data_qa(o,"settings_row_read_only")},e));return l?n.createElement(s.Ay,{tip:l},d):d};maybeRenderReadOnlyLabel.displayName="maybeRenderReadOnlyLabel";let maybeRenderInfoBadge=()=>a||!c?null:n.createElement("div",{className:"p-settings_row_v2__badge"},n.createElement("span",{"data-qa":format_data_qa(o,"settings_row_info_badge")},c),n.createElement(m.A,{type:"question-circle"}));maybeRenderInfoBadge.displayName="maybeRenderInfoBadge";let _=i()("p-settings_row_v2__actions");return n.createElement("div",{className:_},maybeRenderInfoBadge(),maybeRenderReadOnlyLabel(),maybeRenderEditButton(),t||null)};SettingsRowActionsV2.displayName="SettingsRowActionsV2";let y=new l.Ay("enterprise_dashboard"),SettingsRowV2=({icon:e,title:t,description:a,onEdit:r,actionMenuButton:l,isReadOnly:o,subsettings:s,dataQaPrefix:c,readOnlyText:d,readOnlyTooltipText:u,learnMoreHref:p,infoBadgeText:h,editButtonText:_,editButtonAriaLabel:g,editButtonDataQa:A,primaryStateValue:x})=>{let renderTitle=()=>{let e=i()("p-settings_row_v2__title");return n.createElement("div",{className:e},n.createElement("div",{className:"p-settings_row_v2__title_label","data-qa":format_data_qa(c,"settings_row_title")},t),p?n.createElement("div",{className:"p-settings_row_v2__learn_more_link","data-qa":format_data_qa(c,"settings_row_link")},n.createElement(b.A,{href:p},y.t("Learn more",{fallbackHash:"378cbbf54cbb2e3f3bd201f02c1b946ec3601eba"}))):null,a?n.createElement("div",{className:"p-settings_row__desc"},n.createElement("div",{className:"p-settings_row__desc_label","data-qa":format_data_qa(c,"settings_row_description")},a)):null)};renderTitle.displayName="renderTitle";let renderIcon=()=>e?n.createElement("div",{className:"p-settings_row_v2__icon","data-qa":format_data_qa(c,"settings_row_icon")},e):null;renderIcon.displayName="renderIcon";let renderPrimarySettingState=()=>{if(void 0===x)return null;let e=n.createElement("div",{className:"p-settings_row_v2__primary_state_label bold","data-qa":format_data_qa(c,"settings_row_primary_state_title")},x);return(0,f.A)(x)&&(e=n.createElement("div",{className:"p-settings_row_v2__primary_state_container"},n.createElement("div",{className:"p-settings_row_v2__primary_state_label bold","data-qa":format_data_qa(c,"settings_row_primary_state_title")},x?y.t("Enabled"):y.t("Disabled")),n.createElement(m.A,{type:x?"check-circle-o":"disable"}))),n.createElement("div",{className:"p-settings_row_v2__primary_state","data-qa":format_data_qa(c,"settings_row_primary_state")},renderIcon(),e)};renderPrimarySettingState.displayName="renderPrimarySettingState";let renderSubsettings=()=>s&&s?.length?s.map(e=>n.createElement("div",{key:e.title,className:"p-settings_row_v2__subsetting","data-qa":format_data_qa(c,"settings_row_subsetting")},n.createElement("div",{className:"p-settings_row_v2__subsetting_title bold","data-qa":format_data_qa(c,"settings_row_subsetting_title")},e.title),n.createElement("div",{className:"p-settings_row_v2__subsetting_value","data-qa":format_data_qa(c,"settings_row_subsetting_value")},e.value))):null;renderSubsettings.displayName="renderSubsettings";let E=i()("p-settings_row_v2__state"),renderState=()=>n.createElement("div",{className:E},renderPrimarySettingState(),renderSubsettings());return renderState.displayName="renderState",n.createElement("div",{className:"p-settings_row_v2"},renderTitle(),renderState(),n.createElement(SettingsRowActionsV2,{isReadOnly:o,readOnlyText:d,readOnlyTooltipText:u,onEdit:r,infoBadgeText:h,editButtonText:_,editButtonAriaLabel:g,editButtonDataQa:A,actionMenuButton:l,dataQaPrefix:c}))};SettingsRowV2.displayName="SettingsRowV2";let A=new l.Ay("enterprise_dashboard"),x=class extends n.PureComponent{constructor(e){super(e)}renderTitle(){let{title:e,dataQaPrefix:t,comingSoonTag:a,comingSoonTooltip:r,badge:i}=this.props;return n.createElement("div",{className:"p-settings_row__title"},n.createElement("div",{className:"p-settings_row__title_label","data-qa":format_data_qa(t,"settings_row_title")},e),a&&n.createElement(o.v,{isMicro:!0,style:o.u.Informative},r?n.createElement(s.Ay,{tip:r},n.createElement("span",null,a)):a),i)}renderDescription(){let{stateOverrideText:e,description:t,isEnabled:a,isReadOnly:r,dataQaPrefix:i}=this.props,l=a||r?A.t("Enabled"):A.t("Disabled");return e&&(l=e),n.createElement("div",{className:"p-settings_row__desc"},n.createElement("div",{className:"p-settings_row__desc_label bold","data-qa":format_data_qa(i,"settings_row_description_title")},l),n.createElement("div",{className:"p-settings_row__desc_label","data-qa":format_data_qa(i,"settings_row_description")},t))}renderIcon(){let{icon:e,dataQaPrefix:t}=this.props;return e?n.createElement("div",{className:"p-settings_row__icon","data-qa":format_data_qa(t,"settings_row_icon")},e):null}render(){let{isEnabled:e=!1,readOnlyText:t="",onEdit:a,onToggle:r,editButtonText:l,editButtonAriaLabel:o,editButtonDataQa:s,onRemove:c,isReadOnly:d=!1,title:m,dataQaPrefix:u,useLegacyStyles:p,stateOverrideText:h,primaryStateValue:f,customAction:b,experimentSettingsRowV2GroupOn:g,hideRemoveButton:y,hideReadOnlyIcon:A=!1,hideBorder:x=!1,secondaryAction:E}=this.props,C=i()("p-settings_row",{"p-settings_row__legacy_styles":p,no_border_top:x});return g?n.createElement(SettingsRowV2,{...this.props,primaryStateValue:f??h}):n.createElement("div",{className:C},this.renderTitle(),this.renderIcon(),this.renderDescription(),n.createElement(_,{isEnabled:e,isReadOnly:d,readOnlyText:t,onEdit:a,editButtonText:l,editButtonAriaLabel:o,editButtonDataQa:s,onRemove:c,switchAriaLabel:m,dataQaPrefix:u,onToggle:r,customAction:b,hideRemoveButton:y,hideReadOnlyIcon:A,secondaryAction:E}))}};x.displayName="SettingsRow";let E=x},0x195cfaedb:(e,t,a)=>{"use strict";a.d(t,{B:()=>n});let n="secondary_action_"},0x54ab33f8:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x57984731),o=a.n(l),s=a(0x20482ad21),c=a(0xe7ed96ac),d=a(0x1d9716add);let m=new s.Ay("enterprise_dashboard");function Subtitle({subtitle:e}){return e?n.createElement("div",{className:"c-side_panel__subtitle"},e):null}function Title(e){let{title:t,titleClassName:a}=e,r=i()("c-side_panel__title_container",a);return n.createElement("div",{className:r},n.createElement("div",{className:"c-side_panel__title"},n.createElement("div",{className:"c-side_panel__title_text"},t),n.createElement(c.A,{className:"c-side_panel__close","aria-label":m.t("close"),onClick:e.onClose,svgIconProps:{name:"close"}})),n.createElement(Subtitle,e))}Subtitle.displayName="Subtitle",Title.displayName="Title";let u=class extends n.Component{render(){let{children:e,title:t,shouldCloseOnEsc:a=!0,shouldFadeBackground:r}=this.props,l=i()("c-side_panel",this.props.className),s=i()("c-side_panel__overlay",{"c-side_panel__overlay--fade-background":r},this.props.overlayClassName);return n.createElement(o(),{className:l,overlayClassName:s,onRequestClose:this.props.onClose,isOpen:!!this.props.isOpen,shouldCloseOnEsc:a},n.createElement(d.A,null,n.createElement(n.Fragment,null,t&&n.createElement(Title,this.props),e??null)))}};u.displayName="SidePanel";let p=u},0x26a6787e:(e,t,a)=>{"use strict";a.d(t,{p:()=>useSidePanel});var n=a(0xbad225b5),r=a(0x54ab33f8);function useSidePanel(){let[e,t]=(0,n.useState)(!1),a=(0,n.useCallback)(()=>t(e=>!e),[t]);return{onShowSidePanel:a,renderSidePanel:t=>n.createElement(r.A,{...t,shouldFadeBackground:t.shouldFadeBackground??!0,onClose:a,isOpen:e})}}useSidePanel.displayName="useSidePanel"},0xeeb2392a:(e,t,a)=>{"use strict";a.d(t,{A:()=>b,T:()=>_});var n,r=a(0xbad225b5),i=a(0xb97b797e),l=a(0x20482ad21),o=a(0x2b7f0bcc),s=a(0x15014e268),c=a(0x15a05e998),d=a(0xa1832ae4),m=a(0x1c91944c9),u=a(0x9b971e7e),p=a(0x1ee439e69);let h=new l.Ay("enterprise_calls");var _=((n={}).GLOBAL="GLOBAL",n.US="US",n);let f=class extends r.Component{constructor(e){super(e),(0,i.v)(this,["handleOptionSelected"])}render(){let{appsState:e,featureCallsLocationLock:t,isLockedByOrgAdmin:a,selectedCallLocation:n,isFreeTeam:i}=this.props,l=[{label:h.t("Global"),value:"GLOBAL"},{label:h.t("US"),value:"US"}],c=e&&e.video&&Object.keys(e.video).find(e=>"A00"===e);if(!t||!c||i)return null;let d=l.find(e=>e.value===n),m=t?h.t("Slack Calls will be restricted and routed through selected regions only."):"Slack Calls will be restricted and routed through selected regions only.",u=t?h.t("Call location options"):"Call location options",p=t?h.t("Limiting to certain regions may reduce call performance or block joining calls in some circumstances."):"Limiting to certain regions may reduce call performance or block joining calls in some circumstances.",_=t?h.t("Slack calls are restricted by Org admin"):"Slack calls are restricted by Org admin";return r.createElement(r.Fragment,null,r.createElement("div",{"data-qa":"calls-location-container",className:"border_top padding_top_100 p-calls_location_lock__container"},r.createElement("span",{className:"p-calls_location_lock__title"},t?h.t("Calls location"):"Calls location"),r.createElement("span",{className:"p-calls_location_lock__description"},m),r.createElement("div",{className:"p-calls_location_lock__options_container"},r.createElement(s.Ay,{className:"p-calls_location_lock__options",size:"medium",isDisabled:a,options:l,selectedOption:d,onOptionSelected:this.handleOptionSelected,ariaLabel:u}),a&&r.createElement("span",{className:"p-calls_location_lock__options_disable_reason"},_))),"US"===n&&r.createElement(o.Ay,{type:o.QE.boxed,level:o.A_.warning,icon:"warning",align:o.AO.left,className:"p-calls_location_lock__alert"},r.createElement("span",null,p)))}handleOptionSelected(e){this.props.setSelectedCallLocation(e.value)}};f.displayName="CallsRegionLockOptions";let b=(0,m.N)(e=>{let t=(0,u.jV)(e);return{isFreeTeam:!(0,d.qR)((0,p.H7)(e))&&!t,featureCallsLocationLock:(0,c.XY)(e)}})(f)},0x132aff908:(e,t,a)=>{"use strict";a.d(t,{wl:()=>CallSection,JG:()=>O,uy:()=>filterNativeCallsApp,bM:()=>reduceTeamPrefApps,Ox:()=>setCallsAppsPayloadToSave,A9:()=>toggleCallApp,fD:()=>toggleCallType});var n,r=a(0xbad225b5),i=a(0xe180a236),l=a(0x21f3c49e8),o=a(0xe67fcf33),s=a(0x2bba3a0),c=a(0x6258badf),d=a(0x20482ad21),m=a(0x2b7f0bcc),u=a(0xce378727),p=a(0x45bd075),h=a(0x1d2cd7755),_=a(0x15f8e452a),f=a(0xeeb2392a),b=a(0x3711e82d);let clogCallsApps=({callsApps:e,allowCalls:t,clogger:a,action:n,stepVariant:r})=>{let i={allow_calls:t};e&&e.video&&e.video.length>0&&(i.video_call_app_ids=e.video.map(e=>e.id)),e&&e.audio&&e.audio.length>0&&(i.audio_call_app_ids=e.audio.map(e=>e.id)),e&&e.profile_field_options&&e.profile_field_options.length>0&&(i.profile_field_option_ids=e.profile_field_options.map(e=>e.id)),a.track(b.EventId.CALLS_ADMIN_PHONE_INTEGRATION,{...i,contexts:{ui_context:{step:b.UiStep.CALLS_ADMIN_SAVE_CALLS_APPS,action:n,entry_point:"calls-workspace-admin",step_variant:r}}})};var g=a(0x15a05e998),y=a(0x45012309);let A=(0,a(0x11c82607b).Ay)("Clog a standardized click event when a workspace setting is saved",(e,t,{eventId:a,uiStep:n,stepVariant:r})=>{(0,y.eo)({getState:t}).track(a,{contexts:{ui_context:{ui_step:n,step_variant:r,ui_properties:{element_type:b.ElementType.BUTTON,element_name:"submit_button"},action:b.UiAction.CLICK,is_primary_cta:!0}}})});A.meta={name:"clogWorkspaceSettingSubmit",key:"createThunkClogWorkspaceSettingSubmit",description:"Clog a standardized click event when a workspace setting is saved"};var x=a(0x20e77676b),E=a(0xa1832ae4),C=a(0xb8504a42),k=a(0x20e80190e),v=a(0xc67f3d80),S=a(0x10079cc7),I=a(0x1c91944c9),w=a(0xb1f0729f),T=a(0x1d600678),N=a(0x17a77d778),M=a(0x19c76d181),R=a(0x1ee439e69);let P=new d.Ay("calls_admin"),L="only_available_for_paid_teams";var O=((n={}).Video="video",n.Audio="audio",n.ProfileFieldOptions="profile_field_options",n);let AppCheckbox=({type:e,app:t,isChecked:a,onChangeCallApp:n,isLocked:i})=>{let l=(0,r.useCallback)(()=>n(e,t.id),[n,e,t]),o=`${e}_${t.id}`;return r.createElement(h.A,{text:t.name,type:"inline",cursor:"pointer"},r.createElement(p.A,{id:o,name:t.name,checked:a,onChange:l,disabled:i,"data-qa":o}))};AppCheckbox.displayName="AppCheckbox";let CallSection=({type:e,sectionTitle:t,appsState:a,installedCallApps:n,onChangeCallType:s,onChangeCallApp:c,isLocked:d,dataQa:m})=>{if(!n||!a||!n[e])return null;let u=`enable_${e}_calls`;return r.createElement("div",{className:`p-calls_workspace_settings__${e}_container`,"data-qa":m},r.createElement(h.A,{text:t,type:"inline",cursor:"pointer"},r.createElement(p.A,{checked:!(0,l.A)(a[e]),id:u,name:u,onChange:s,disabled:(({appsState:e,isLocked:t,type:a})=>!!t&&!!e&&("video"===a&&(0,i.A)(e.video)>0&&0===(0,i.A)(e.audio)||0===("audio"===a&&(0,i.A)(e.audio)>0&&(0,i.A)(e.video))))({appsState:a,isLocked:d,type:e})})),r.createElement("p",{className:"p-calls_workspace_settings__options_title"},P.t("Calling options:")),r.createElement("div",{className:"p-calls_workspace_settings__calls_apps"},[...n[e]].map(t=>r.createElement(AppCheckbox,{app:t,isChecked:(0,o.A)(a[e],t.id),key:`${e}_${t.id}`,onChangeCallApp:c,type:e,isLocked:(({appsState:e,isLocked:t,appId:a,type:n})=>{if(!t||!e)return!1;let r=e.video?Object.keys(e.video):[],i=e.audio?Object.keys(e.audio):[],l=r.length+i.length;if(a&&1===l){let e,t;return 1===r.length?(e=r[0],t="video"):1===i.length&&(e=i[0],t="audio"),a===e&&n===t}return!1})({appsState:a,isLocked:d,appId:t.id,type:e})}))))};CallSection.displayName="CallSection";let toggleCallApp=({installedCallApps:e,appsState:t,appId:a,type:n,setAppsState:r})=>{if(!e||!t)return;let i={...t[n]};if((0,o.A)(i,a))delete i[a],r({...t,[n]:i});else{let l=(0,s.A)(e[n],e=>e.id===a);l>-1&&(i[a]=l,r({...t,[n]:i}))}},toggleCallType=({installedCallApps:e,appsState:t,type:a,setAppsState:n})=>{if(t&&e)if((0,l.A)(t[a])){let r={};e[a]?.forEach((e,t)=>{r[e.id]=t}),n({...t,[a]:r})}else n({...t,[a]:{}})},reduceTeamPrefApps=(e,t)=>{let a={video:{},audio:{},profile_field_options:{}};return t&&e&&["video","audio","profile_field_options"].forEach(n=>{t[n]&&[...t[n]].forEach(t=>{let r=(0,s.A)(e[n],e=>e.id===t.id);r>-1&&(a[n][t.id]=r)})}),a},setCallsAppsPayloadToSave=({installedCallApps:e,appsState:t}={})=>{let a={video:[],audio:[]};return e&&t&&["video","audio"].forEach(n=>{if(e[n]){let r=[...e[n]],i=t[n];r.forEach(e=>{(0,o.A)(i,e.id)&&a[n]?.push((0,c.A)(e,"preselected"))})}}),a},filterNativeCallsApp=e=>{if(!e||!e.video)return;let t=e.video.findIndex(e=>e.id===v.rq);t>=0&&e.video.splice(t,1)},ErrorModal=({isOpen:e,closeModal:t,errorMessage:a,buttonLabel:n})=>r.createElement(k.dW,{centered:!0,isOpen:e,closeModal:t},r.createElement(k.$m,{className:"p-calls_workspace_settings__error_modal"},r.createElement(k.qf,null,r.createElement("p",null,a))),r.createElement(k.jl,null,r.createElement(k.ox,null,r.createElement(k.s_,{type:"outline",onClick:t,"aria-label":n},n))));ErrorModal.displayName="ErrorModal";let CallsWorkspaceSettings=({installedCallApps:e,teamPrefCallsApps:t,setMultipleTeamPrefsByApi:a,clogWorkspaceSettingSubmit:n,isLocked:i,isCallsSelectorDisabled:o,clogger:s,isOrgCallsAppsSettingsEnabled:c,team:d,isCallsLocationLockedByOrgAdmin:p,callsLocationLocked:h})=>{let[g,y]=(0,r.useState)(!1),[A,k]=(0,r.useState)(""),v=P.t("Save"),I=P.t("Saved"),w=P.t("Sorry! Something went wrong. Please try again."),T=P.t("Allow third-party calls in Slack"),N=P.t("Allow phone number calls in Slack (only in direct messages)"),M=P.t("Ok"),R=P.t("Sorry, call selection is currently managed by your organization admin."),O=P.rt("First install a <a>calling app from the Slack Marketplace</a> then come back here to enable it as a default calling app.",{},({text:e})=>r.createElement(x.A,{articleId:0xc6d5944},e)),D=(0,r.useCallback)(()=>{(({clogger:e})=>{e.track(b.EventId.CALLS_ADMIN_PHONE_INTEGRATION,{contexts:{ui_context:{step:b.UiStep.CALLS_ADMIN_SAVE_CALLS_APPS,action:b.UiAction.LEARN_MORE,is_primary_cta:!0,ui_properties:{element_type:b.ElementType.LINK,element_name:"calls-admin-save-multiple-call-apps"}}}})})({clogger:s}),(0,E.gC)(d,(0,S.hZ)({entryPoint:"calls-admin-workspace-settings"}))},[s,d]),F=P.rt("Sorry, this feature is only available to <a>paid teams</a>.",{},({text:e})=>r.createElement("a",{href:"#",onClick:D,"data-qa":"paid_plan_page_link"},e)),U=t?reduceTeamPrefApps(e,t):{video:{},audio:{},profile_field_options:{}},[B,H]=(0,r.useState)(U),[W,V]=(0,r.useState)(!1),[G,q]=(0,r.useState)(!1),j=h&&h.length>0?f.T.US:f.T.GLOBAL,[z,K]=(0,r.useState)(j);(0,r.useEffect)(()=>{H(reduceTeamPrefApps(e,t))},[H,e,t]);let $=(0,r.useCallback)(t=>{q(!1),toggleCallType({installedCallApps:e,appsState:B,type:t,setAppsState:H})},[e,B,H]),Y=(0,r.useCallback)(()=>$("video"),[$]),Q=(0,r.useCallback)(()=>$("audio"),[$]),Z=(0,r.useCallback)(()=>y(!1),[y]),J=(0,r.useCallback)((t,a)=>{q(!1),toggleCallApp({installedCallApps:e,appsState:B,appId:a,type:t,setAppsState:H})},[e,B,H]),X=(0,r.useCallback)(e=>{K(e),q(!1)},[K]),ee=e&&(e.video&&e.video.length>0||e.audio&&e.audio.length>0);return r.createElement("div",{key:"calls_workspace_settings",className:"p-calls_workspace_settings"},o&&c?r.createElement(m.Ay,{type:"boxed",level:"info",icon:"info",align:"left","data-qa":"org_calls_apps_alert_selector_disabled"},r.createElement("span",null,R)):r.createElement(r.Fragment,null,!ee&&r.createElement(m.Ay,{type:"boxed",level:"info",icon:"info",align:"left"},r.createElement("span",null,O)),r.createElement("div",{className:"p-calls_workspace_settings__call_options"},e&&e.video&&e.video.length>0&&r.createElement(CallSection,{type:"video",sectionTitle:T,appsState:B,installedCallApps:e,onChangeCallType:Y,onChangeCallApp:J,isLocked:i}),e&&e.audio&&e.audio.length>0&&r.createElement(CallSection,{type:"audio",sectionTitle:N,appsState:B,installedCallApps:e,onChangeCallType:Q,onChangeCallApp:J,isLocked:i})),r.createElement(f.A,{appsState:B,isLockedByOrgAdmin:p,selectedCallLocation:z,setSelectedCallLocation:X}),r.createElement(ErrorModal,{closeModal:Z,isOpen:g,errorMessage:A,buttonLabel:M}),ee&&r.createElement(u.A,{onClick:()=>{V(!0),n({eventId:b.EventId.ADMIN_TEAM_SETTINGS,uiStep:"change_enable_calls"});let t=!(0,l.A)(B.video)||!(0,l.A)(B.audio),r=setCallsAppsPayloadToSave({installedCallApps:e,appsState:B}),i={calls_apps:r};(0,C.r7)(d)||(i.allow_calls=t),p||(i.calls_locations=z===f.T.US?[z]:[]),a({prefs:i}).then(()=>{q(!0),clogCallsApps({callsApps:r,allowCalls:t,clogger:s,action:b.UiAction.SAVE})}).catch(e=>{y(!0),e?.data?.error===L?(k(F),clogCallsApps({callsApps:r,allowCalls:t,clogger:s,action:b.UiAction.ERROR,stepVariant:L})):(k(w),clogCallsApps({callsApps:r,allowCalls:t,clogger:s,action:b.UiAction.ERROR}))}).finally(()=>V(!1))},loading:W,"data-qa":"call_save_button","aria-label":G?I:v},G&&r.createElement(_.A,{type:"check-circle-o",className:"p-calls_workspace_settings_check_icon"}),G?I:v)))};CallsWorkspaceSettings.displayName="CallsWorkspaceSettings";let D={setMultipleTeamPrefsByApi:N.hz,clogWorkspaceSettingSubmit:A};(0,I.N)(e=>{let t=(0,M.tV)(e,"calls_apps");filterNativeCallsApp(t);let a=(0,T.x)(e,"calls_apps"),n=(0,w.SI)(e,"calls_locations");return{installedCallApps:t,teamPrefCallsApps:a,clogger:(0,y.eo)({state:e}),isOrgCallsAppsSettingsEnabled:!(0,g.BD)(e),team:(0,R.H7)(e),isCallsLocationLockedByOrgAdmin:!!n&&n.length>0,callsLocationLocked:(0,T.x)(e,"calls_locations")}},D)(CallsWorkspaceSettings)},0x24898c14b:(e,t,a)=>{"use strict";a.d(t,{A:()=>eZ});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20ef3966f),o=a(0x237b6a339),s=a(0x1e2051844),c=a(0xc48503ad),d=a.n(c),m=a(0xb97b797e),u=a(0x20482ad21),p=a(0x1daf4b9c),h=a(0x1a256ff50),_=a(0x11a296110),f=a(0x15f8e452a),b=a(0x21cf37dc6),g=a(0x21f3c49e8),y=a(0x18f2150ea),A=a(0x1e864b930),x=a(0x4c96e5d9),E=a(0x1c659cbb1),C=a(0xa089d16d);function maybeGetMaxNumFacesOverride(e,t,a){return e<44*t&&!(44*a-8<=e)?Math.floor(e/44):t}let k=class extends n.PureComponent{static defaultProps={maxNumFaces:5};static getDerivedStateFromProps({width:e,maxNumFaces:t,participants:a}){let n=a.length,r=maybeGetMaxNumFacesOverride(e,t,n),i=n<=r?0:n-r;return{maxNumFacesOverride:r,overflowDisplayValue:i}}constructor(e){super(e),this.state={maxNumFacesOverride:0,overflowDisplayValue:0}}getOverflowTooltipContent(){let{participants:e}=this.props,{maxNumFacesOverride:t}=this.state;return(0,A.A)(e.slice(t-1).map(({displayName:e})=>e),{conj:"and"})}renderAvatar(e,t){let a=t?this.getOverflowTooltipContent():e.displayName;return e.slackId?n.createElement(x.Ay,{tip:a,key:e.slackId},n.createElement("span",{className:"p-call_facepile__face"},n.createElement(E.Ay,{additionalOverlay:t,ariaHidden:"true",tabIndex:-1,userId:e.slackId,size:36}))):this.renderExternalAvatar(e,t)}renderExternalAvatar(e,t){let{displayName:a,avatarUrl:r}=e,asyncImageFallback=()=>this.renderExternalAvatarFallback();if(t){let e=t>9?"9+":`+${t}`,i=this.getOverflowTooltipContent();return n.createElement(x.Ay,{tip:i,key:(0,o.A)("unknown-")},n.createElement("span",{className:"p-call_facepile__face p-call_facepile__face--external"},n.createElement(C.A,{src:r,height:"36px",width:"36px",alt:a,renderError:asyncImageFallback}),n.createElement("div",{className:"c-avatar__additional_overlay"},e)))}return n.createElement(x.Ay,{tip:a,key:(0,o.A)("unknown-")},n.createElement("span",{className:"p-call_facepile__face p-call_facepile__face--external"},n.createElement(C.A,{src:r,height:"36px",width:"36px",alt:a,renderError:asyncImageFallback})))}renderExternalAvatarFallback(){return n.createElement(E.Ay,{ariaHidden:"true",tabIndex:-1,size:36})}renderAvatars(){let{participants:e}=this.props,{maxNumFacesOverride:t,overflowDisplayValue:a}=this.state,n=e.slice(0,t-1).map(e=>this.renderAvatar(e,0));return e.length>=t&&n.push(this.renderAvatar(e[t-1],a)),n}render(){let{className:e,participants:t,callEnded:a}=this.props,{maxNumFacesOverride:r}=this.state;if((0,g.A)(t)||(0,y.A)(r)&&r<=0)return null;let l=this.renderAvatars();return n.createElement("div",{className:i()("p-call_facepile",e,{"p-call_facepile--call_ended":a})},l)}};k.displayName="Facepile";var v=a(0x13776886e),S=a(0xb1c0d55),I=a(0x1533b2385),w=a(0xc153c8c0),T=a(0xc67f3d80);let N=new u.Ay("modern_call_object");function getCallTitle({call:{name:e,dateStart:t,dateEnd:a,isDmCall:n},isCreator:r,isParticipant:i,participantCount:l,wasMissed:o,wasRejected:s,now:c}){if(e)return e;if(!a&&t>c)return N.t("Scheduled Call");if(n){if(!a&&r&&l<2)return N.t("Calling\u2026",{fallbackHash:"90d4a0a60458160e6c2222fe50326fcdefe892ad"});if(!a&&!i)return N.t("Calling You\u2026",{fallbackHash:"e9023d7093c8be9055d8d18e34587caa2f2dbe3f"});if(!a&&2===l)return N.t("Call Started");if(a&&o&&s)return N.t("Call Declined");if(a&&o)return N.t("Missed Call")}return a?N.t("Call Ended"):a?void 0:N.t("Call Started")}function getCallStatus({call:{dateStart:e,dateEnd:t,isDmCall:a},isCreator:n,wasMissed:r,wasRejected:i,now:l,onAnotherDeviceOnly:o,dmCallName:s}){if(!t&&o)return N.t("You are on this call on another device");let c=t?(0,w.A)(t-e):(0,w.A)(l-e);if(a){if(i)return n?N.t("{name} declined this call",{name:s}):N.t("You declined this call");if(r)return n?N.t("{name} missed this call",{name:s}):N.t("You missed this call")}if(!t){if(e>l){let t=(0,S.A)(e,{shortenMonth:!0,excludeYear:!0}),a=(0,v.A)(e,"{time}"),n=(0,I.A)(e,{shortenDay:!0});return N.t("Starting on {day}, {date} at {time}",{day:n,date:t,time:a})}return c.w?N.t("Started {weeks} weeks ago",{weeks:c.w}):c.d?N.t("Started {days} days ago",{days:c.d}):c.h?c.m?N.t("Started {hours, plural, =1 {# hour} other {# hours}} and {minutes, plural, =1 {# minute} other {# minutes}} ago",{hours:c.h,minutes:c.m}):N.t("Started {hours, plural, =1 {# hour} other {# hours}} ago",{hours:c.h}):c.m?N.t("Started {minutes, plural, =1 {# minute} other {# minutes}} ago",{minutes:c.m}):N.t("Started a few seconds ago")}let d=(0,v.A)(t,"{time}");return c.w&&c.w>0?N.t("Ended at {endTime} - Lasted {weeks, plural, =1 {# week} other {# weeks}}",{endTime:d,weeks:c.w}):c.d&&c.d>0?N.t("Ended at {endTime} - Lasted {days, plural, =1 {# day} other {# days}}",{endTime:d,days:c.d}):c.h&&c.h>0?c.m?N.t("Ended at {endTime} - Lasted {hours, plural, =1 {# hour} other {# hours}} and {minutes, plural, =1 {# minute} other {# minutes}}",{endTime:d,hours:c.h,minutes:c.m}):N.t("Ended at {endTime} - Lasted {hours, plural, =1 {# hour} other {# hours}}",{endTime:d,hours:c.h}):c.m&&c.m>0?N.t("Ended at {endTime} - Lasted {minutes, plural, =1 {# minute} other {# minutes}}",{endTime:d,minutes:c.m}):N.t("Ended at {endTime} - Lasted a few seconds",{endTime:d})}function getCallDescription({call:{dateEnd:e,isDmCall:t},isCreator:a,wasMissed:n,wasRejected:r,isParticipant:i,participantCount:l,dmCallName:o}){let s=N.t("{participantCount, plural, =1 {# person} other {# people}} joined",{participantCount:l});if(!e&&!t&&0===l)return N.t("Waiting for people to join");if(!e&&!t&&1===l)return N.t("Waiting for others to join",{fallbackHash:"ffd57c89f52a41135e5a6c50dc052b45391b1441",fallbackHashNs:"calls"});if(e&&!t)return s;if(!e&&a&&t&&l<2){if(o)return N.t("Waiting for {dmCallName} to join",{dmCallName:o});if(!i)return N.t("Waiting for the other person to join")}return!e&&!a&&l<2&&t?N.t("Waiting for you to join"):e&&t&&!n&&!r?2===l?N.t("You both joined"):s:void 0}function getButtonText({call:e,isCreator:t,wasMissed:a,wasRejected:n,isParticipant:r,onAnotherDeviceOnly:i,isIncoming:l}){let{dateEnd:o,isDmCall:s,joinUrl:c}=e,d=a||n;if(s&&o&&d&&t)return{text:N.t("Call Again"),ariaLabel:N.t("Enter to call again.")};if(s&&o&&d)return{text:N.t("Call Back"),ariaLabel:N.t("Enter to call back.")};if(!o&&!i&&!l&&!c&&r)return{text:N.t("Show Call"),ariaLabel:N.t("Enter to show call.")};if(!o){let e=N.t("Enter to join call.");return{text:N.t("Join"),ariaLabel:e}}}function getCallObjectText({call:e,participantCount:t,isParticipant:a,currentMemberId:n,dmCallName:r,onAnotherDeviceOnly:i}){let l={call:e,isParticipant:a,participantCount:t,isCreator:n===e.createdBy,onAnotherDeviceOnly:i,dmCallName:r,wasMissed:e.callObjectInviteResponse===T.xr.Missed||e.callObjectInviteResponse===T.xr.Reject,wasRejected:e.callObjectInviteResponse===T.xr.Reject,isIncoming:!!e.incomingInvite,now:Date.now()/1e3};return{title:getCallTitle(l),button:getButtonText(l),status:getCallStatus(l),description:getCallDescription(l)}}var M=a(0x51fc3908),R=a(0x339b339c),P=a(0x1bed15d44),L=a(0x174730f93),O=a(0x7fbb7bb1),D=a(0x182c9b0b0),F=a(0xd66cda03),U=a(0x21d85d6e5),B=a(0x1f3e2995c),H=a(0x1a769a9e8),W=a(0x235ff1eab),V=a(0x1c91944c9),G=a(0x222719d7),q=a(0x157bc0648),j=a(0x62a17882),z=a(0x22a29f141),K=a(0x30164a1e),$=a(0x1036bc040),Y=a(0x1dfdeb1c8);let Q=(0,Y.A)("Sends an invite response to the web API from the slack window",(e,t,{id:a,response:n,toUserId:r})=>((0,K.M)(!(0,$.A)(),"Not a slack window context"),e((0,z.apiCall)({method:"screenhero.rooms.inviteResponse",reason:"calls-invite-response",args:{caller:r,room:a,response:n}}))));Q.meta={name:"sendInviteResponse",key:"createFetcherSendInviteResponse",description:"Sends an invite response to the web API from the slack window"};let Z=(0,Y.A)("Reject a DM call from the slack window",(e,t,{id:a,appId:n,channelId:r})=>((0,K.M)(!(0,$.A)(),"Not a slack window context"),e((0,z.apiCall)({method:"calls.reject",reason:"calls-invite-response",args:{id:a,app_id:n,channel_id:r}}))));Z.meta={name:"sendPartnerCallRejected",key:"createFetcherSendPartnerCallRejected",description:"Reject a DM call from the slack window"};var J=a(0x6a506842),X=a(0x1059ba41d);async function resizeContentAroundWindowCenter(e,t){let a=await (0,X.FUe)(e)||{x:800,y:500,width:200,height:200};(0,X.pe_)(e,{x:Math.round(a.x+(a.width-t.width)/2),y:Math.round(a.y+(a.height-t.height)/2),height:t.height,width:t.width})}async function getWindowSizeForContentSize(e,t){let a=await (0,X.oCQ)(e),n=await (0,X.FUe)(e),r={height:(a?.height??0)-(n?.height??0),width:(a?.width??0)-(n?.width??0)};return{width:t.width+r.width,height:t.height+r.height}}async function setMinimumContentSize(e,t){let a=await getWindowSizeForContentSize(e,t);(0,X.W6f)(e,a.width,a.height)}var ee=a(0x11c82607b);function startIncomingInviteTimeout(e,t){return(0,K.M)(!(0,$.A)(),"Not a slack window context"),window.setTimeout(()=>{e(eB({id:t,response:T.xr.Missed}))},3e4)}let et=(0,ee.Ay)("Handles an invite response from the callee",(e,t,a)=>{let n=(0,G.H6)(t(),a);if(!n)return;let r=(0,j.y3)()&&(0,G.Ms)(n);r&&!r.isClosed()&&r.close()});et.meta={name:"closeDesktopIncomingInviteWindow",key:"createThunkCloseDesktopIncomingInviteWindow",description:"Handles an invite response from the callee"},(0,ee.Ay)("Inserts an incoming invite and starts a timer to cancel it",(e,t,{roomId:a,userId:n,mediaBackendType:r})=>{let i={direction:T.z3.Incoming,userId:n,timeout:startIncomingInviteTimeout(e,a)};e((0,G.oU)({id:a,incomingInvite:i,mediaBackendType:r}))}).meta={name:"insertIncomingInvite",key:"createThunkInsertIncomingInvite",description:"Inserts an incoming invite and starts a timer to cancel it"};let ea=(0,ee.Ay)("Removes the invite and any pending timer",(e,t,a)=>{let n=(0,G.H6)(t(),a)?.incomingInvite;n&&n.timeout&&clearTimeout(n.timeout),e((0,G.oU)({id:a,incomingInvite:void 0}))});ea.meta={name:"clearIncomingInvite",key:"createThunkClearIncomingInvite",description:"Removes the invite and any pending timer"};var en=a(0x15a05e998),er=a(0x21faee2f4),ei=a(0xb27404ef);function getDefaultQueryStringParams(){return(0,p.A)()?null:{launchedFromLegacyUrl:window.location.href}}var el=a(0x6affae29),eo=a(0x23acb8e0f),es=a(0x1c40e1088),ec=a(0xe874a88a),ed=a(0xbe498a72),em=a(0x20c2aafd7),eu=a(0x16998c9bf),ep=a(0x1d80562e6),eh=a(0x1636fd671),e_=a(0x3711e82d),ef=a(0x45012309);async function fetchRegions(e,t,a){if(t===T.Dn.FREE_WILLY)return fetchChimeRegion(e,a);let n=new eh.A({url:"https://universal.slack-core.com/region.json"});try{let t=await e.q(n);return JSON.parse(t).region_text}catch(e){return(0,em.z3)("Region request error: ",(0,eu.iT)(e).name),""}}async function fetchChimeRegion(e,t){let a=!!t&&(0,ep.H)(t),n=new eh.A({url:a?"https://nearest-us-gov-media-region.l.chime.aws":"https://nearest-media-region.l.chime.aws"});try{let t=await e.q(n),a=JSON.parse(t);return(0,ef.eo)().track(e_.EventId.CALLS_CHIME_MEDIA_REGION,{media_region:a.region}),a.region}catch(t){let e=(0,eu.iT)(t);return(0,em.z3)("Chime region request error: ",e.name),(0,ef.eo)().track(e_.EventId.CALLS_CHIME_MEDIA_REGION_ERROR,{error:e.name}),""}}var eb=a(0x208477787);async function fetchRoom(e,t,a,n,r,i){let l=new eb.Ay({method:"rooms.join",args:{token:t,...n&&{id:n},...i&&{channel_id:i}},teamId:a,...r?{usingTracer:{tracer:r?.traceInstance.getTracer(),traceId:r?.traceInstance.getTrace()?.getTraceId(),parentSpanId:r?.parentSpanId}}:{}}),o=await e.q(l);return{server:(0,T.YY)(o.call),roomId:o.call.call_id,regions:"",inviteResponses:void 0,virtualRoomId:n}}function getInviteResponses(e){if(e)return e.map(e=>({userId:e.user_id,response:e.response}))}async function fetchCall(e,t,a,n,r,i,l,o,s){return(0,T.cd)(n)?((0,K.M)(!i,"Cannot pick your server when joining a call."),(0,K.M)(!l,"Cannot pick your regions when joining a call."),fetchCallWithId(e,t,a,n,s)):(0,T.bU)(n)?((0,K.M)(!i,"Cannot pick your server when joining a room."),(0,K.M)(!l,"Cannot pick your regions when joining a room."),fetchRoom(e,t,a,n,s)):fetchNewCall(e,t,a,n,l||await fetchRegions(e,r,a),r,i,o,s)}async function fetchNewCall(e,t,a,n,r,i,l,o,s){let c=new eb.Ay({method:"screenhero.rooms.create",args:{token:t,regions:r,channel:n,send_immediate_invite:!0,use_room_scoped_token:!0,call_server:l,media_backend_type:i,readiness_check:o},teamId:a,...s?{usingTracer:{tracer:s?.traceInstance.getTracer(),traceId:s?.traceInstance.getTrace()?.getTraceId(),parentSpanId:s?.parentSpanId}}:{}}),d=await e.q(c);return d.immediately_rejected?{inviteResponses:getInviteResponses(d.invite_responses)}:{server:(0,T.YY)(d),roomId:d.room_id,regions:r,inviteResponses:getInviteResponses(d.invite_responses),virtualRoomId:void 0}}async function fetchCallWithId(e,t,a,n,r){let i=new eb.Ay({method:"screenhero.rooms.join",args:{token:t,room:n,use_room_scoped_token:!0,regions:""},teamId:a,...r?{usingTracer:{tracer:r?.traceInstance.getTracer(),traceId:r?.traceInstance.getTrace()?.getTraceId(),parentSpanId:r?.parentSpanId}}:{}}),l=await e.q(i);return{server:(0,T.YY)(l),roomId:l.room_id,regions:"",inviteResponses:void 0,virtualRoomId:void 0}}Object.defineProperty({},"fetchCall",{get:()=>fetchCall,set:e=>{fetchCall=e}});var eg=a(0x12e383cfb);let TraceInstance=class TraceInstance{isCallsTracingDisabled;trace;tracer;teamId;constructor({traceName:e,traceOptions:t,teamId:a}){this.isCallsTracingDisabled="true"===t.isCallsTracingDisabled,this.tracer=(0,eg.F)(),this.teamId=a,this.isCallsTracingDisabled?this.trace=null:this.trace=this.tracer.createTrace({traceName:e,traceId:t.traceId,parentSpanId:t.parentSpanId,tags:{team_id:this.teamId}})}createSpan({parentSpanId:e,spanName:t,tags:a}){return this.isCallsTracingDisabled||!this.trace?null:this.trace.startSpan(t,{tags:{...a,team_id:this.teamId},parentSpanId:e})}maybeTraceFn({name:e,parentSpanId:t,tracingFunction:a}){return this.isCallsTracingDisabled||!this.trace?a():this.trace.traceFn({name:e,options:{parentSpanId:t,tags:{team_id:this.teamId}}},a)}getTrace(){return this.trace}getTracer(){return this.tracer}reportTrace(){this.tracer&&this.trace&&this.tracer.reportTrace(this.trace)}};function getErrorName(e){if(!(e instanceof Error))return"UnknownError";let t=e.name;return"rooms_unauthorized_channel"===t&&"data"in e&&e.data?.msg?.indexOf("information barrier")>-1&&(t="InformationBarrierActive"),t}var ey=a(0x8fe98f44),eA=a(0xcbb99517);let ex=(0,ee.Ay)("Insert a newly created call once we have a room id, copying from pending state",(e,t,{roomId:a,windowId:n})=>{let r=t(),i=(0,G.NX)(r)?.pending;if(!i||!i[n])return void(0,K.M)("No pending call state");let l=i[n],o=(0,G.Ms)(l);if(!o)return void(0,K.M)("No call window");e((0,G.oU)({...l,id:a})),e((0,G.Km)(n));let s=(0,G.$5)(r,a);s&&(s.forEach(e=>{(0,es.R)(o,"inviteResponse",{userId:e.userId,response:e.response})}),e((0,G.fW)(a)))});ex.meta={name:"setupWithRoomId",key:"createThunkSetupWithRoomId",description:"Insert a newly created call once we have a room id, copying from pending state"};var eE=a(0x1ee439e69);function getInitialAsyncCallInfo(){return{server:(0,ed.u)(),callId:(0,ed.u)(),regions:(0,ed.u)(),inviteResponses:(0,ed.u)(),virtualRoomId:(0,ed.u)(),error:(0,ed.u)(),isJoiningExistingCall:(0,ed.u)(),callWindow:(0,ed.u)()}}let eC=new Map,ek=(0,ee.Ay)("Fetches all the information required to join a call",async(e,t,a)=>{let n,{params:r,callWindow:i,traceParams:l}=a,o=r.callId||r.channelId;if(!o)return;let s=(0,eE.H7)(t()).id,c=(0,eA.A)({},{teamId:s,method:""}),d=null,m=null;l&&(m=(d=new TraceInstance({traceOptions:{traceId:l.traceId,parentSpanId:l.parentSpanId,isCallsTracingDisabled:l.isCallsTracingDisabled},traceName:"calls:free-willy:prefetch_call_info",teamId:s})).createSpan({spanName:"calls:prefetch_call_info",tags:{view_id:o,is_joining_existing_call:!!r.callId,filename:"prefetch-call-info.ts",function:"prefetchCallInfo",team_id:s}}),n={traceInstance:d,parentSpanId:m?.getId()});let u=getAsyncCallInfoForWindow(i.getId());return(u.callWindow.resolve(i),r.mediaService)?(u.server.isPending()&&u.server.resolve(r.mediaService),u.callId.isPending()&&r.callId&&u.callId.resolve(r.callId),u.regions.isPending()&&u.regions.resolve(""),u.inviteResponses.isPending()&&u.inviteResponses.resolve(void 0),u.virtualRoomId.isPending()&&u.virtualRoomId.resolve(void 0),u.isJoiningExistingCall.isPending()&&u.isJoiningExistingCall.resolve(!!r.callId),u.error.isPending()&&u.error.resolve(null),ec.S.resolve()):fetchCall((0,ey.E)(),c.token,s,o,getMediaBackendType(t(),r.callId),r.debugServerName,r.debugRegions,r.readinessCheck,n).then(t=>{let{server:a,roomId:n,regions:l,inviteResponses:o,virtualRoomId:s}=t;!n||(r.callId||e(ex({roomId:n,windowId:i.getId()})),u&&(u.server.isPending()&&u.server.resolve(a),u.callId.isPending()&&u.callId.resolve(n),u.regions.isPending()&&u.regions.resolve(l||""),u.inviteResponses.isPending()&&u.inviteResponses.resolve(o),u.virtualRoomId.isPending()&&u.virtualRoomId.resolve(s),u.isJoiningExistingCall.isPending()&&u.isJoiningExistingCall.resolve(!!r.callId),u.error.isPending()&&u.error.resolve(null)))}).catch(e=>{let t=e.data;t?((0,J.tZ)("PREFETCH-CALL-INFO").error("Error while fetching call info: ",t.error),u.error.isPending()&&u.error.resolve({name:getErrorName(e)})):((0,J.tZ)("PREFETCH-CALL-INFO").error("Error while fetching call info, (error.data is undefined): ",e),u.error.isPending()&&u.error.resolve({name:void 0}))})});function saveIncomingInviteCallData(e,t,a){let n=getAsyncCallInfoForWindow(a.getId());n.callId.resolve(e),n.server.resolve(t),n.regions.resolve(""),n.inviteResponses.resolve(void 0),n.virtualRoomId.resolve(void 0),n.isJoiningExistingCall.resolve(!0),n.error.resolve(null),n.callWindow.resolve(a)}function getMediaBackendType(e,t){let a=null;return t&&(a=(0,G.H6)(e,t)),a&&a.mediaBackendType?a.mediaBackendType:T.Dn.FREE_WILLY}function getAsyncCallInfoForWindow(e){let t=eC.get(e);return t||(t=getInitialAsyncCallInfo(),eC.set(e,t)),t}function deleteAsyncCallInfoForWindow(e){eC.delete(e)}ek.meta={name:"prefetchCallInfo",key:"createThunkPrefetchCallInfo",description:"Fetches all the information required to join a call"};let ev=(0,ee.Ay)("Send call data to call window",async(e,t,a)=>{let n=getAsyncCallInfoForWindow(a);if(!n){(0,J.tZ)("PREFETCH-CALL-INFO").error("asyncCallInfo is null, probably data was already sent to call window");let e=(0,G.ue)(t());e?.getId()===a&&(0,es.R)(e,"callData",{error:{name:T.uZ.CallInfoError}});return}let r=await n.error,i=await n.callWindow;if(r)return void(0,es.R)(i,"callData",{error:r});let[l,o,s,c,d,m]=await Promise.all([n.callId,n.server,n.regions,n.inviteResponses,n.virtualRoomId,n.isJoiningExistingCall]);o&&l?(i&&!i.isClosed()&&(0,es.R)(i,"callData",{callId:l,server:o,regions:s,inviteResponses:c,virtualRoomId:d,isJoiningExistingCall:m},!1),deleteAsyncCallInfoForWindow(i.getId())):(0,J.tZ)("PREFETCH-CALL-INFO").error("Missing call server or callId info")});ev.meta={name:"sendCallDataToCallWindow",key:"createThunkSendCallDataToCallWindow",description:"Send call data to call window"};var eS=a(0x691ce3ab),eI=a(0x20c7d2c5e);let ew=(0,ee.Ay)("Subscribe to data messages from the call window",(e,t,a)=>{(0,K.M)(!(0,$.A)(),"Need the slack window context to listen for messages from the call window"),a.onData=t=>{let n=t.type,r=t.payload;switch((0,eo.Y)({direction:"receive",type:n,payload:r}),n){case"reportRoomId":r&&e(ex({roomId:r,windowId:a.getId()}));break;case"onIncomingInviteAccept":r&&e(eU(r));break;case"onIncomingInviteReject":r&&e(eB({id:r,response:T.xr.Reject}));break;case"stopOutgoingRing":e((0,G.nN)());break;case"requestCallData":e(ev(a.getId()));break;case"showHuddleSidebarFooterDiscoveryBanner":(0,eS.dispatchForClientStore)((0,eI.M)());break;default:(0,el.Kh)(n)}}});ew.meta={name:"listenForMessagesFromCallWindow",key:"createThunkListenForMessagesFromCallWindow",description:"Subscribe to data messages from the call window"};var eT=a(0x2416351a6),eN=a(0x1feee1711),eM=a(0x269115a5),eR=a(0x1b66417d),eP=a(0x22ddfce0b);let eL=(0,ee.Ay)("Hide share screen borders",(e,t)=>{(0,eP.a)()});eL.meta={name:"hideScreenBorders",key:"createThunkHideScreenBorders",description:"Hide share screen borders"};let eO=(0,ee.Ay)("On call window closed",(e,t)=>{let a=t(),n=(0,G.$U)(a,(0,G.S_)((0,G.NX)(a)));n?(e(eL()),(0,eT.A)(n.windowId)||(0,eN.A)(n.windowId)?(0,J.tZ)("ON-CALL-WINDOW-CLOSED").warn("No windowId for active call"):((0,er.jN)(n.windowId),e((0,G.Eo)(n.windowId))),(0,eR.ZH)(eM.PV,{useSlackPreferredSink:!0}),e((0,G.nN)()),n.incomingInvite&&n.id&&(0,T.cd)(n.id)&&e(eB({id:n.id,response:T.xr.Reject})),(0,X.g9M)()&&setTimeout(()=>{if(!n.windowId)return;let e=(0,X.oQe)("windows",n.windowId.toString()),a=n.id||"unavailable";void 0!==e&&((0,J.tZ)("ON-CALL-WINDOW-CLOSED").info(`Call window is open after call was terminated by user, callId = ${a}`),(0,ef.eo)({state:t()}).track(e_.EventId.CALLS_CALL_WINDOW_CLOSED_EVENT,{is_call_window_open:!0,room_id:a}))},5e3)):(0,J.tZ)("ON-CALL-WINDOW-CLOSED").warn("No active call on call window close")});function buildCallsUrl({teamId:e,viewId:t,incomingInviteUserId:a,outgoingInviteUserIds:n,mediaBackendType:r}){(0,K.M)(!(a&&n),"Cannot both invite and be invited at the same time");let i="calls";r===T.Dn.FREE_WILLY&&(i="free-willy");let l=`/${i}/${e}/${t}`;return a?`${l}/${a}`:n?`${l}/${n.join(",")}`:l}eO.meta={name:"onCallWindowClosed",key:"createThunkOnCallWindowClosed",description:"On call window closed"};let eD=(0,ee.Ay)("Open the gantry call window",async(e,t,{viewId:a,incomingInvite:n,outgoingInvites:r,queryStringParams:i,windowOptions:o,readinessCheck:s,teamId:c})=>{let d=t(),m=!s,u=(0,G.H6)(d,a),p=(0,eE.H7)(d);try{let t=await e((0,ei.Dx)({pathname:buildCallsUrl({teamId:c||p.id,viewId:a,incomingInviteUserId:n?n.userId:void 0,outgoingInviteUserIds:r?(0,l.A)(r,"userId"):void 0,mediaBackendType:u&&u.mediaBackendType?u.mediaBackendType:T.Dn.FREE_WILLY}),queryStringParams:{...getDefaultQueryStringParams(),...i,...{outgoingRingStartedOnParent:m.toString().toLowerCase()},...(0,j.y3)()&&n?void 0:{intentToJoinTimeMs:String(Date.now())},...{isCallsTracingDisabled:(0,en.wn)(d).toString().toLowerCase()}},windowOptions:{...o,backgroundColor:"#000000",useContentSize:!0}})),s=t.getId();if((0,er.Jn)(s,t),e((0,G.lv)({id:a,windowId:s,incomingInvite:n})),(0,T.cd)(a)&&e(ex({roomId:a,windowId:s})),m){let a=r&&r.length&&!r.some(e=>void 0!==e.response);t&&!n&&a&&e((0,G.RD)())}return e((0,G.Q0)(t.getId())),e(ew(t)),t.onClose=()=>{e(eO())},t}catch(e){return(0,J.tZ)("OPEN-CALL-WINDOW").error("Error launching calls gantry app",e),null}});eD.meta={name:"openCallWindow",key:"createThunkOpenCallWindow",description:"Open the gantry call window"};function convertInviteWindowToFullWindow(e){(0,j.y3)()?(resizeContentAroundWindowCenter(e,{width:1024,height:576}),setMinimumContentSize(e,{width:704,height:396}),(0,X.CRO)(e,!1),(0,X.Kqm)(e,!0),(0,X.gqi)(e,!0),(0,X.CaN)(e,!0),(0,X.Sfb)(e,!0)):(0,K.M)("Not in desktop")}let eF=(0,ee.Ay)("Respond to an invite within the slack window",(e,t,{id:a,response:n})=>{let r=(0,G.H6)(t(),a);if(!r)return;let{incomingInvite:i}=r;if(i){if(i.direction!==T.z3.Incoming)return void(0,K.M)("Did not have an incoming invite to respond to");e(Q({id:a,response:n,toUserId:i.userId})),e(ea(a))}});eF.meta={name:"respondToInvite",key:"createThunkRespondToInvite",description:"Respond to an invite within the slack window"};let eU=(0,ee.Ay)("Accept an invite within the slack window",async(e,t,a)=>{(0,K.M)(!(0,$.A)(),"Not a slack window context");let n=t(),r=(0,G.NX)(n)?.byId[a];if((0,j.y3)()){let e=(0,G.Ms)(r);if(!e)return void(0,K.M)("No call window");convertInviteWindowToFullWindow(e)}else{let t=await e(eD({viewId:a,incomingInvite:r.incomingInvite})),n=localStorage.getItem(T.rS);try{let r=JSON.parse(n||"null");t&&saveOrPrefetchInviteCallData(e,a,void 0,r,t)}catch(e){(0,J.tZ)("INVITE").warn("Could not parse server info",String(e))}localStorage.removeItem(T.rS)}e(eF({id:a,response:T.xr.Accept}))});eU.meta={name:"acceptInvite",key:"createThunkAcceptInvite",description:"Accept an invite within the slack window"};let eB=(0,ee.Ay)("Decline an invite within the slack window",(e,t,{id:a,response:n})=>{(0,K.M)(!(0,$.A)(),"Not a slack window context"),e(eF({id:a,response:n})),e(et(a)),(0,j.y3)()||localStorage.removeItem(T.rS)});eB.meta={name:"declineInvite",key:"createThunkDeclineInvite",description:"Decline an invite within the slack window"};let eH=(0,ee.Ay)("Respond to the Decline button for a partner call",(e,t,{id:a,app:n,channelId:r})=>{let i=n.id;(0,G.H6)(t(),a)&&e(Z({id:a,appId:i,channelId:r}))});function saveOrPrefetchInviteCallData(e,t,a,n,r){n?saveIncomingInviteCallData(t,n,r):e(ek({params:{callId:t,channelId:a},callWindow:r}))}eH.meta={name:"declinePartnerCall",key:"createThunkDeclinePartnerCall",description:"Respond to the Decline button for a partner call"};var eW=a(0x5dd1c0f2),eV=a(0x19c76d181),eG=a(0x14149c126),eq=a(0x7b0b485),ej=a(0x183e72453),ez=a(0xe684f705),eK=a(0x19895585a);let e$=new u.Ay("modern_call_object");function convertParticipants(e,t){return(0,l.A)(t,t=>{if((0,T.MZ)(t)){let a=t.slackId;return{slackId:a,displayName:(0,U.sE)(e,(0,ez.nv)(e,a))}}return{avatarUrl:(0,W.Ay)(e,{url:t.avatarUrl,width:36,height:36}),displayName:t.displayName,externalId:t.externalId}})}let eY=class extends n.PureComponent{static propTypes={callId:d().string.isRequired};constructor(e){super(e),(0,m.v)(this,["onPrimaryButtonClick","onDeclineButtonClick","onRetryButtonClick"])}async onPrimaryButtonClick(){let{app:e,clogJoinCallClick:t,externalCallUrl:a,externalDesktopAppCallUrl:n,huddleChannelId:r,stopHuddle:i}=this.props;(r&&i(),await (0,q.q)(n))?window.open(n,"_blank"):a&&(t&&e&&t(e.id),window.open(a,"_blank"))}onDeclineButtonClick(){let{declineInvite:e,declinePartnerCall:t,callId:a,app:n,currentChannelId:r}=this.props;n&&r?t({id:a,app:n,channelId:r}):e({id:a,response:T.xr.Reject})}onRetryButtonClick(){let{huddleChannelId:e,stopHuddle:t}=this.props;e&&t()}renderCallIcon(){let{dateEnd:e,app:t,defaultAppIcon:a,isDmCall:r,wasMissed:l,wasRejected:o}=this.props,s=t&&t.icons;if(s){let r=(0,H.A)({icons:s},36,a);return n.createElement("div",{className:i()("p-call_subtype__icon",{"p-call_subtype__icon--ended":!!e})},n.createElement("img",{alt:t.profile&&t.profile.name,src:r,className:i()("p-call_subtype__img")}))}let c="phone";return e&&(c="phone-flat"),r&&(l&&(c="call-missed"),o&&(c="call-declined")),n.createElement("div",{className:i()("p-call_subtype__icon",{"p-call_subtype__icon--ended":!!e})},n.createElement(f.A,{type:c}))}renderSecondaryButtonMaybe(){let{dateEnd:e,isParticipant:t,isDmCall:a,isCreator:r,launchGantryCall:i}=this.props;if(a&&!t&&!e&&!r&&i)return n.createElement("div",{className:"p-call_subtype__action_button--secondary"},n.createElement(_.Ay,{type:"danger",onClick:this.onDeclineButtonClick,"aria-label":e$.t("Enter to decline the call")},e$.t("Decline")))}renderPrimaryButton(){let{activeCallWindowExists:e,dateEnd:t,externalCallUrl:a,isDmCall:r,textObject:i,wasMissed:l,wasRejected:o,experimentCallsDeprecationGroupOn:s}=this.props;if(r&&(l||o)&&a||s&&!a&&t||!i||!i.button)return;let{button:c}=i,d="outline";return(t||!a&&e||(d="primary"),r&&(l||o))?n.createElement("div",{className:"p-call_subtype__action_button"},n.createElement(_.Ay,{type:d,"aria-label":c.ariaLabel,onClick:this.onRetryButtonClick,"data-qa":"call-subtype-primary-button"},c.text)):n.createElement("div",{className:"p-call_subtype__action_button"},n.createElement(_.Ay,{type:d,"aria-label":c.ariaLabel,onClick:this.onPrimaryButtonClick,"data-qa":"call-subtype-primary-button"},c.text))}renderCallHeader(){let{textObject:e}=this.props;if(!e)return n.createElement("div",{className:"p-call_subtype__header"},n.createElement(R.A,{size:b.o.Large}));let{title:t,status:a}=e;return n.createElement("div",{className:"p-call_subtype__header"},this.renderCallIcon(),n.createElement("div",{className:"p-call_subtype__header_text"},n.createElement("span",{className:"p-call_subtype__title"},t),n.createElement("span",{className:"p-call_subtype__status"},a)))}renderCallBodyMaybe(){let{meetingDisplayId:e}=this.props;return e?n.createElement("div",{className:"p-call_subtype__body"},n.createElement("span",{className:"p-call_subtype__description"},e$.t("Meeting ID: {meetingDisplayId}",{meetingDisplayId:e}))):null}renderCallFooter(){let{dateEnd:e,externalCallUrl:t,hideFacepile:a,isDmCall:r,textObject:i,wasMissed:l,wasRejected:o,experimentCallsDeprecationGroupOn:s}=this.props;if(r&&(l||o)&&t&&a)return null;if(s&&e&&!t&&a)return;if(!i)return n.createElement("div",{className:"p-call_subtype__footer"},n.createElement(R.A,{size:b.o.Large}));let{description:c=""}=i;return a?n.createElement("div",{className:"p-call_subtype__footer"},n.createElement("span",{className:"p-call_subtype__description",dangerouslySetInnerHTML:{__html:c}}),this.renderSecondaryButtonMaybe(),this.renderPrimaryButton()):n.createElement("div",{className:"p-call_subtype__footer"},n.createElement(O.A,null,({measureRef:t,width:a})=>n.createElement("span",{className:"p-call_subtype__facepile",ref:t},n.createElement(k,{participants:this.props.participants,maxNumFaces:5,callEnded:!!e,width:a}))),n.createElement("span",{className:"p-call_subtype__description",dangerouslySetInnerHTML:{__html:c}}),this.renderPrimaryButton())}render(){let{callId:e,textObject:t,experimentExpandableTriggerAriaLabelGroupOn:a}=this.props,r=(0,B.A)("call",(0,o.A)(),{id:e}),i=e$.t("Call"),l=t?t.status:"",s=a?e$.t("call"):"call";return n.createElement("div",{className:"c-message__call",role:"presentation"},n.createElement("div",{className:"c-message__body c-message__body--automated"},i,n.createElement(L.A,{expandableKey:r,useAttachmentRules:!1,"aria-label":s}),n.createElement(P.A,{expandableKey:r,useAttachmentRules:!1},n.createElement("div",{className:"p-call_subtype",role:"group","aria-label":l,"data-qa":"call-subtype"},this.renderCallHeader(),this.renderCallBodyMaybe(),this.renderCallFooter()))))}};eY.displayName="PlatformCallSubtype";let eQ=(0,V.N)((e,t)=>{let a=(0,M.O4)(),{callId:n,getSiblingView:r}=t,i="on"===(0,eG._Z)(e,"expandable_trigger_aria_label"),l=(0,G.H6)(e,n),o=(0,eV.WR)(e);if(!l)return{launchGantryCall:a,currentMemberId:o,experimentExpandableTriggerAriaLabelGroupOn:i};let c=convertParticipants(e,(0,G.d5)(l)||[]),d=!!(0,s.A)(c,e=>e.slackId===o),m=(0,G.Kj)(e,t.callId),u=o===l.createdBy,h=l.isDmCall,_=l.channels&&l.channels[0]?l.channels[0]:r(e,{container:eK.mq.Primary})?.id,f=c.length,b=l.callObjectInviteResponse===T.xr.Missed||l.callObjectInviteResponse===T.xr.Reject,g=l.callObjectInviteResponse===T.xr.Reject,y=l.dateEnd,A=!!(0,G.ko)(),x=d&&!A&&!l.joinUrl,E=getCallObjectText({call:l,participantCount:f,isParticipant:d,currentMemberId:o,dmCallName:m,onAnotherDeviceOnly:x}),C=0===f;h&&1===f&&!u&&(C=!0);let k=l.appId&&l.appId!==T.rq&&(0,eW.sO)(e,l.appId),v=(0,eW.Mu)(e),S=(0,p.A)()?`/calls/${(0,eE.H7)(e).id}/${l.id}`:`/call/${l.id}`;return{activeCallWindowExists:A,app:k,call:l,customCallName:l.name,currentMemberId:o,dateEnd:y,dateStart:l.dateStart,defaultAppIcon:v,dmCallName:m,hideFacepile:C,isCreator:u,isDmCall:h,launchGantryCall:a,currentChannelId:_,isParticipant:d,meetingDisplayId:l.displayId,participants:c,textObject:E,url:S,wasMissed:b,wasRejected:g,externalCallUrl:l.joinUrl,externalDesktopAppCallUrl:l.desktopAppJoinUrl,experimentExpandableTriggerAriaLabelGroupOn:i}},e=>({stopHuddle:()=>e((0,ej.A)()),declineInvite:t=>e(eB(t)),declinePartnerCall:t=>e(eH(t))}),null,{areStatePropsEqual:h.rM})(eY),ClientStoreConnectedPlatformCallSubtype=e=>{let t=(0,F.cw)(eq.hc);return n.createElement(eQ,{huddleChannelId:t,...e})};ClientStoreConnectedPlatformCallSubtype.displayName="ClientStoreConnectedPlatformCallSubtype";let eZ=(0,D.A)(ClientStoreConnectedPlatformCallSubtype)},0xb75eaa95:(e,t,a)=>{"use strict";let n;a.d(t,{o:()=>w});var r=a(0xbad225b5),i=a(0x9e671ad),l=a(0x162afc153),o=a(0x32f90b85);let HuddlesCursorTarget=e=>{let{onDragStart:t,onDragMove:a,onDragEnd:n,onCursorMoveStart:i,onCursorMove:s,onCursorMoveEnd:c,children:d}=e,[m,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[_,f]=(0,r.useState)(0),[b,g]=(0,r.useState)(0),y=(0,r.useCallback)(e=>{0===e.button&&(u(!0),t(e))},[t]),A=(0,r.useCallback)(()=>{h(!1),c()},[h,c]);(0,o.Z)(()=>{A()},2e3,[_,b]);let x=(0,r.useCallback)(e=>{if(0===e.button){if(m)return void a(e);p||(i(e),h(!0)),s(e),f(e.movementX),g(e.movementY)}},[p,m,s,i,a]),E=(0,l.A)(x,50,{leading:!0}),C=(0,r.useCallback)(e=>{E(e)},[E]),k=(0,r.useCallback)(e=>{e&&0!==e.button||(u(!1),m&&n(e))},[m,n]),v=(0,r.useCallback)(e=>{u(!1),m?n(e):p&&c()},[m,n,p,c]);return r.createElement("div",{onMouseDown:y,onMouseMove:C,onMouseUp:k,onMouseLeave:v,"aria-hidden":"true"},d)};HuddlesCursorTarget.displayName="HuddlesCursorTarget";let s=r.memo(HuddlesCursorTarget);function startCurve(e){n=createCurve(roundVec(e))}function addToCurve(e){let t=roundVec(e),a=addToCurveImpl(n,t);return a.update_status==c.SUCCESS?a:addToCurveImpl(n,t)}let c={SUCCESS:1,FAIL_CORNER:2,FAIL_MAXED:3},initCurveSegment=(e,t)=>({c0:{x:e,y:t},c1:{x:e,y:t},c2:{x:e,y:t},c3:{x:e,y:t}}),getLastSegment=e=>e.segments[e.segments.length-1],createCurve=function({x:e,y:t}){let a={segments:[],vdmap:[]};return a.segments.push(initCurveSegment(e,t)),a},addToCurveImpl=function(e,t){let a=getLastSegment(e),n=a.c3;if(1>getMagnitude(t,a.c3))return a;if(c.SUCCESS!=a.update_status&&void 0!==a.update_status){let t;c.FAIL_CORNER==a.update_status?t=initCurveSegment(n.x,n.y):c.FAIL_MAXED==a.update_status&&((t=initCurveSegment(n.x,n.y)).constrain_to=getUnitVector(getCurveEndTangent(a))),e.vdmap=[],e.segments.push(t)}return updateDistanceField(e,t)},updateDistanceField=function(e,t){let a=getLastSegment(e),{x:n,y:r}=t,i=a.c3,l={c0:{x:a.c0.x,y:a.c0.y},c1:{x:a.c1.x,y:a.c1.y},c2:{x:a.c2.x,y:a.c2.y},c3:{x:a.c3.x,y:a.c3.y},constrain_to:void 0==a.constrain_to?void 0:{x:a.constrain_to.x,y:a.constrain_to.y},error:a.error||0,update_status:a.update_status};if(checkCorner(a,t))return a.update_status=c.FAIL_CORNER,a;a.c3={x:n,y:r},a.c2={x:a.c2.x+n-i.x,y:a.c2.y+r-i.y};let o=getScaledVectorDifference(getPerpindicularUnitVector(i,t)),s=addVec(i,o),d=addVec(t,o),m=negateVec(multVec(o,2)),u=getDDASteps(m),p=divVec(m,u),h=subVec(d,s),_=getDDASteps(h),f=divVec(h,_),b=s;for(let t=0;t<_;t++){let t=b,a=o;for(let n=0;n<u;n++){let{x:n,y:r}=roundVec(t);e.vdmap[n]||(e.vdmap[n]=[]),void 0==e.vdmap[n][r]?e.vdmap[n][r]=roundVec(a):e.vdmap[n][r]=sumOfSquaresVec(e.vdmap[n][r])<sumOfSquaresVec(roundVec(a))?e.vdmap[n][r]:roundVec(a),a=addVec(a,p),t=addVec(t,p)}b=addVec(b,f)}let g=subVec(t,{x:9,y:9}),y=addVec(t,{x:9,y:9});for(let a=g.x;a<y.x;a++)for(let n=g.y;n<y.y;n++){e.vdmap[a]||(e.vdmap[a]=[]);let r=subVec({x:a,y:n},t);void 0==e.vdmap[a][n]?e.vdmap[a][n]=r:e.vdmap[a][n]=sumOfSquaresVec(e.vdmap[a][n])<sumOfSquaresVec(r)?e.vdmap[a][n]:r}let A=0;for(;;){let t={x:0,y:0},n={x:0,y:0};for(let r=0;r<9;r++){let i=r/9,l=getDistanceFromPolyline(e,roundVec(getPointAlongCurve(a,i))),o=magnitudeVec(l),s=l.x,c=l.y,d=1;(i<.1||i>.9)&&(d=10),t.x+=i*Math.pow(1-i,2)*o*s*d,t.y+=i*Math.pow(1-i,2)*o*c*d,n.x+=Math.pow(i,2)*(1-i)*o*s*d,n.y+=Math.pow(i,2)*(1-i)*o*c*d}{let e=subVec(getSegmentMidpoint(a),a.c2),r=subVec(getSegmentMidpoint(a),a.c1);t=subVec(t,multVec(r,.03)),n=subVec(n,multVec(e,.03))}a.constrain_to&&(t=multVec(a.constrain_to,dotProduct(a.constrain_to,t))),a.c1.x-=6*t.x/9,a.c1.y-=6*t.y/9,a.c2.x-=6*n.x/9,a.c2.y-=6*n.y/9;let r=0;for(let t=0;t<9;t++){let n=getDistanceFromPolyline(e,roundVec(getPointAlongCurve(a,t/9)));r+=Math.pow(n.x,2)+Math.pow(n.y,2)}if(r/=9,A++,a.error=r,a.steps=A,r<2||A>50)break}return A>50?(a.c0=l.c0,a.c1=l.c1,a.c2=l.c2,a.c3=l.c3,a.error=l.error,a.constrain_to=l.constrain_to,a.update_status=c.FAIL_MAXED):a.update_status=c.SUCCESS,a},getDistanceFromPolyline=function(e,{x:t,y:a}){if(!e.vdmap[t])return{x:9,y:9};{let n=e.vdmap[t][a],r=e.vdmap[t][a+1],i=void 0!=n?{x:n.x,y:n.y}:{x:9,y:9};return r&&void 0!=r.x&&Math.abs(i.x)>Math.abs(r.x)&&(i.x=r.x),r&&void 0!=r.y&&Math.abs(i.y)>Math.abs(r.y)&&(i.y=r.y),i}},getCurveEndTangent=function(e){let t=e.c3,a=e.c2;return{x:3*(a.x-t.x),y:3*(a.y-t.y)}},checkCorner=function(e,t){return!equalVec(e.c0,e.c3)&&(80>radiansToDegrees(Math.acos(dotProduct(getUnitVector(subVec(getPointAlongCurve(e,.95),e.c3)),getUnitVector({x:t.x-e.c3.x,y:t.y-e.c3.y}))))||void 0)},getSegmentMidpoint=e=>addVec(divVec(subVec(e.c3,e.c0),2),e.c0),getScaledVectorDifference=e=>({x:9*e.x,y:9*e.y}),negateVec=e=>({x:-e.x,y:-e.y}),roundVec=e=>({x:Math.round(e.x),y:Math.round(e.y)}),sumOfSquaresVec=e=>Math.pow(e.x,2)+Math.pow(e.y,2),magnitudeVec=e=>Math.sqrt(sumOfSquaresVec(e)),addVec=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),subVec=(e,t)=>addVec(e,negateVec(t)),multVec=(e,t)=>({x:e.x*t,y:e.y*t}),divVec=(e,t)=>multVec(e,1/t),equalVec=(e,t)=>e.x==t.x&&e.y==t.y,dotProduct=(e,t)=>e.x*t.x+e.y*t.y,getMagnitude=({x:e,y:t},a={x:0,y:0})=>Math.sqrt(Math.pow(e-a.x,2)+Math.pow(t-a.y,2)),radiansToDegrees=e=>180*e/Math.PI,getDDASteps=e=>Math.max(Math.abs(e.x),Math.abs(e.y)),getPerpindicularUnitVector=(e,t)=>{let a=t.x-e.x;return getUnitVector({x:t.y-e.y,y:-a})},getUnitVector=function({x:e,y:t}){let a=getMagnitude({x:e,y:t});return{x:e/a,y:t/a}},getPointAlongCurve=function(e,t){return{x:singleComponentBezier(t,e.c0.x,e.c1.x,e.c2.x,e.c3.x),y:singleComponentBezier(t,e.c0.y,e.c1.y,e.c2.y,e.c3.y)}},singleComponentBezier=function(e,t,a,n,r){return t*Math.pow(1-e,3)+3*a*e*Math.pow(1-e,2)+3*n*Math.pow(e,2)*(1-e)+r*Math.pow(e,3)};var d=a(0x2408d30fd),m=a(0xc67f3d80);let ProgressiveCurveTransformer=class ProgressiveCurveTransformer{current;targetRect;setTargetRect(e){this.targetRect=e}add(e){if(!(0,d.Z)(this.targetRect,"Need size to transform point to curve"))throw Error();let{top:t,left:a,width:n,height:r}=this.targetRect,[i,l]=[e[0]-a,e[1]-t];if(!this.current){startCurve({x:i,y:l});let e=[i/n,l/r];return this.current={a:e,b:e,c:e,d:e},{type:m.Sl.New,segment:this.current}}let o=this.current,{c0:s,c1:c,c2:u,c3:p}=addToCurve({x:i,y:l});return(this.current={a:[s.x/n,s.y/r],b:[c.x/n,c.y/r],c:[u.x/n,u.y/r],d:[p.x/n,p.y/r]},this.current.a[0]!==o.a[0]||this.current.a[1]!==o.a[1])?{type:m.Sl.New,segment:this.current}:{type:m.Sl.Edit,segment:this.current}}};var u=a(0xdf7a57c3),p=a(0xe9a7487f),h=a(0x14b6e238a),_=a(0x14fad6485),f=a(0x185d57056);let b=class extends r.PureComponent{isDragging=!1;static contextType=_._0;constructor(e){super(e),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this)}componentDidMount(){this.context.windowRef.deref()?.document.addEventListener("mouseup",this.onMouseUp)}componentWillUnmount(){this.isDragging&&this.onMouseUp(),this.context.windowRef.deref()?.document.removeEventListener("mouseup",this.onMouseUp)}onMouseDown(e){0===e.button&&(this.isDragging=!0,this.context.windowRef.deref()?.document.addEventListener("mousemove",this.onMouseMove),this.props.onDragStart(e))}onMouseMove(e){0!==e.button||this.isDragging&&this.props.onDragMove(e)}onMouseUp(e){if(e&&0!==e.button)return;let t=this.isDragging;this.isDragging=!1,t&&(this.context.windowRef.deref()?.document.removeEventListener("mousemove",this.onMouseMove),this.props.onDragEnd(e))}render(){let{children:e,refToForward:t,onDragStart:a,onDragMove:n,onDragEnd:i,...l}=this.props,o=r.Children.only(this.props.children);return r.cloneElement(o,{...l,onMouseDown:e=>this.onMouseDown(e),ref:(0,f.N)(t,o)})}};b.displayName="BaseDragTarget";let g=r.forwardRef((e,t)=>r.createElement(b,{...e,refToForward:t}));var y=a(0x3711e82d),A=a(0x1c91944c9),x=a(0x6a506842),E=a(0x11c82607b);let C=(0,x.tZ)("USER-ACTIONS"),k=(0,E.Ay)("Logs user interaction with call window",(e,t,a)=>{C.info(a)});k.meta={name:"logUserAction",key:"createThunkLogUserAction",description:"Logs user interaction with call window"};var v=a(0x167b46d0f);let S=class extends r.Component{multilineTransformer;constructor(e){super(e),this.onResize=this.onResize.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onCursorMoveStart=this.onCursorMoveStart.bind(this),this.onCursorMove=this.onCursorMove.bind(this),this.onCursorMoveEnd=this.onCursorMoveEnd.bind(this),this.state={showCursor:!0}}componentDidMount(){this.onResize()}shouldComponentUpdate(e,t){return!(0,i.A)(this.props,e)||!(0,i.A)(this.state,t)}componentDidUpdate(e){(0,i.A)(e.targetRect,this.props.targetRect)||this.onResize()}onResize(){if(!this.props.refToForward?.current)return;let e=(0,h.n)(this.props.targetRect);this.props.refToForward.current.style.height=e.height,this.props.refToForward.current.style.width=e.width,this.props.refToForward.current.style.top=e.top,this.props.refToForward.current.style.left=e.left,this.props.refToForward.current.style.position=e.position}getCursorCoordinates(e){return this.props.useHuddlesDragTarget?[e.nativeEvent.offsetX,e.nativeEvent.offsetY]:[e.pageX,e.pageY]}onDragStart(e){this.multilineTransformer=new ProgressiveCurveTransformer,this.props.useHuddlesDragTarget?this.multilineTransformer.setTargetRect({top:0,left:0,width:this.props.targetRect.width,height:this.props.targetRect.height}):this.multilineTransformer.setTargetRect(this.props.targetRect),p.A.publish({id:"self",type:m.Sl.ChangeHue,hue:this.props.hue,...this.props.itemId&&{itemId:this.props.itemId}}),p.A.publish({id:"self",...this.multilineTransformer.add(this.getCursorCoordinates(e)),...this.props.itemId&&{itemId:this.props.itemId}}),this.props.logDrawingAction("Draw start"),this.setState(()=>({showCursor:!1}))}onDragMove(e){(0,d.Z)(this.multilineTransformer,"Need transformer to draw")&&p.A.publish({id:"self",...this.multilineTransformer.add(this.getCursorCoordinates(e)),...this.props.itemId&&{itemId:this.props.itemId}})}onDragEnd(e){p.A.publish({id:"self",type:m.Sl.End,...this.props.itemId&&{itemId:this.props.itemId}}),this.props.logDrawingAction("Draw stop"),this.setState(()=>({showCursor:!0})),this.props.useHuddlesDragTarget&&(0,u.k)(y.EventId.HUDDLES_SCREENSHARE_INTERACTION,{contexts:{ui_context:{action:y.UiAction.CLICK,ui_properties:{element_name:"screenshare_draw"}}}})}onCursorMoveStart(){p.A.publish({id:"self",type:m.Sl.ChangeHue,hue:this.props.hue,...this.props.itemId&&{itemId:this.props.itemId}})}onCursorMove(e){let t=this.getCursorCoordinates(e),a=t[0]/this.props.targetRect.width,n=t[1]/this.props.targetRect.height;p.A.publish({id:"self",type:m.Sl.Position,x:a,y:n,...this.props.itemId&&{itemId:this.props.itemId}}),this.setState(()=>({showCursor:!0}))}onCursorMoveEnd(){p.A.publish({id:"self",type:m.Sl.End,...this.props.itemId&&{itemId:this.props.itemId}}),this.setState(()=>({showCursor:!1}))}render(){return this.props.useHuddlesDragTarget?r.createElement(s,{onDragStart:this.onDragStart,onDragMove:this.onDragMove,onDragEnd:this.onDragEnd,onCursorMoveStart:this.onCursorMoveStart,onCursorMove:this.onCursorMove,onCursorMoveEnd:this.onCursorMoveEnd},r.createElement("div",{ref:this.props.refToForward,className:"p-calls_draw__target_none",style:{...(0,h.n)(this.props.targetRect)}})):r.createElement(g,{onDragStart:e=>this.onDragStart(e),onDragMove:e=>this.onDragMove(e),onDragEnd:e=>this.onDragEnd(e)},r.createElement("div",{ref:this.props.refToForward,className:this.state.showCursor?"p-calls_draw__target":"p-calls_draw__target_none",style:{...(0,h.n)(this.props.targetRect)}}))}};S.displayName="BaseDrawTarget";let I=(0,A.N)((e,t)=>({hue:(0,v.Ng)(e).drawHue}),e=>({logDrawingAction:t=>e(k(t))}))(S),w=r.forwardRef((e,t)=>r.createElement(I,{refToForward:t,...e}))},0x6d8d29a5:(e,t,a)=>{"use strict";a.d(t,{u:()=>I});var n=a(0xbad225b5),r=a(0x9e671ad),i=a(0x6258badf),l=a(0x1feee1711),o=a(0x20ef3966f),s=a(0x14fad6485),c=a(0x14b6e238a);let Canvas=({refToForward:e,isHidden:t,numVisibleLines:a,top:r,left:i,width:l,height:o,doNotApplyTargetRect:s})=>{if(s)return n.createElement("canvas",{ref:e,style:{display:t||0===a?"none":"block"},"data-qa":"huddles-drawing-canvas"});let d={display:t||0===a?"none":"block",...(0,c.n)({left:i,top:r,width:l,height:o})};return n.createElement("canvas",{ref:e,style:d,"data-qa":"huddles-drawing-canvas"})};Canvas.displayName="Canvas";let d=n.memo(Canvas,r.A);var m=a(0x20482ad21),u=a(0x1c91944c9),p=a(0x167b46d0f);let h=new m.Ay("calls"),_=(0,u.N)((e,{id:t})=>({displayName:"self"===t?h.t("You"):(0,p.iU)(e,t)}))(({displayName:e,coord:[t,a]})=>n.createElement("div",{className:"p-calls_draw__name_tag",style:{left:`${t+10}px`,top:`${a+10}px`}},e)),Cursor=({top:e,left:t,width:a,height:r,leftOffset:i,topOffset:l,id:o})=>{let s=t+i*a,c=e+l*r,d={left:`${s+-9}px`,top:`${c+-33}px`},m=(0,n.useMemo)(()=>[s,c],[s,c]);return n.createElement(n.Fragment,null,"self"!==o&&n.createElement("div",{key:`cursor-${o}`,className:"p-calls_draw__pencil_cursor",style:d}),n.createElement(_,{key:`name-tag-${o}`,id:o,coord:m}))};Cursor.displayName="Cursor";let f=n.memo(Cursor,r.A);var b=a(0x6affae29);let g=class{segments=[];getSegments(){return this.segments}addNewSegment(e){this.segments.push(e)}editLastSegment(e){this.segments.pop(),this.segments.push(e)}};let ProgressiveBezierCurvePlotter=class ProgressiveBezierCurvePlotter extends g{draw(e,t=1,a=1){let n=this.getSegments();e.beginPath();for(let r=0;r<n.length;r++){let i=n[r];e.moveTo(i.a[0]*t,i.a[1]*a),e.bezierCurveTo(i.b[0]*t,i.b[1]*a,i.c[0]*t,i.c[1]*a,i.d[0]*t,i.d[1]*a)}e.stroke()}};function makeColorString(e,t,a,n){return`hsla(${e}, ${t}%, ${a}%, ${n})`}let LineStyle=class LineStyle{observer;static initialWidth=7;static fadeDuration=3e3;width=LineStyle.initialWidth;opacity=1;hue=0;color=((e,t)=>makeColorString(e,100,75,t))(this.hue,this.opacity);shadowColor=(e=>makeColorString(e,80,50,1))(this.hue);startedFadingTimestamp;static renderBaseStyle(e){e.lineJoin="round",e.lineCap="round",e.shadowBlur=5}constructor(e){this.observer=e}startFade(){this.startedFadingTimestamp=performance.now(),this.observer.requestRenderOnNextFrame()}resetFade(){this.startedFadingTimestamp&&(delete this.startedFadingTimestamp,this.width=LineStyle.initialWidth,this.opacity=1,this.color=makeColorString(this.hue,100,75,this.opacity))}setHue(e){this.hue=e,this.color=makeColorString(this.hue,100,75,this.opacity),this.shadowColor=makeColorString(this.hue,80,50,1),this.observer.requestRenderOnNextFrame()}render(e){this.fade(),e.lineWidth=this.width,e.strokeStyle=this.color,e.shadowColor=this.shadowColor}fade(){if(!this.startedFadingTimestamp)return;let e=Math.min(1,(performance.now()-this.startedFadingTimestamp)/LineStyle.fadeDuration);this.width=LineStyle.initialWidth-3*e,this.opacity=1-e/1,this.color=makeColorString(this.hue,100,75,this.opacity),e<1?this.observer.requestRenderOnNextFrame():this.observer.onFadeCompleted()}getColor(){return this.color}};LineStyle.displayName="LineStyle";var y=a(0xc67f3d80);let DrawLine=class DrawLine{observer;inactivityTimeout;vestigialLineTimeout;plotter=new ProgressiveBezierCurvePlotter;style;visibilityState={isLineVisible:!1,isFading:!1};constructor(e){this.observer=e,this.style=new LineStyle({onFadeCompleted:()=>this.onFadeCompleted(),requestRenderOnNextFrame:()=>this.observer.requestRenderOnNextFrame()})}onFadeCompleted(){this.plotter=new ProgressiveBezierCurvePlotter,this.observer.onLineVisibilityChanged(!1),this.setLineVisibility({isFading:!1,isLineVisible:!1}),this.style.resetFade()}resetVestigialLineTimeout(){this.vestigialLineTimeout&&clearTimeout(this.vestigialLineTimeout),this.vestigialLineTimeout=window.setTimeout(this.onInactivity,5e3)}resetInactivityTimeout(){this.inactivityTimeout&&clearTimeout(this.inactivityTimeout),this.inactivityTimeout=window.setTimeout(this.onInactivity,700)}update(e){if(this.resetVestigialLineTimeout(),e.type===y.Sl.New)this.visibilityState.isLineVisible||this.observer.onLineVisibilityChanged(!0),this.setLineVisibility({isFading:!1,isLineVisible:!0}),this.plotter.addNewSegment(e.segment),this.style.resetFade(),clearTimeout(this.inactivityTimeout);else if(e.type===y.Sl.Edit)this.plotter.editLastSegment(e.segment);else if(e.type===y.Sl.End)this.resetInactivityTimeout();else if(e.type===y.Sl.ChangeHue)this.style.setHue(e.hue);else{if(e.type===y.Sl.Position)return;(0,b.Kh)(e.type)}this.observer.requestRenderOnNextFrame()}render(e,t,a){this.style.render(e),this.plotter.draw(e,t,a)}setLineVisibility(e){Object.assign(this.visibilityState,e)}onInactivity=()=>{this.inactivityTimeout&&clearTimeout(this.inactivityTimeout),this.vestigialLineTimeout&&clearTimeout(this.vestigialLineTimeout),!this.visibilityState.isFading&&this.visibilityState.isLineVisible&&(this.setLineVisibility({isFading:!0}),this.style.startFade())};getColor(){return this.style.getColor()}};DrawLine.displayName="DrawLine";var A=a(0x6a506842),x=a(0xe9a7487f),E=a(0x1c659cbb1),C=a(0x19c76d181);let k=new m.Ay("calls"),v=(0,u.N)((e,{id:t})=>({displayName:"self"===t?k.t("You"):(0,p.iU)(e,t),userId:"self"===t?(0,C.WR)(e):(0,p.C1)(e,t).userId}))(({displayName:e,id:t,userId:a,color:r})=>n.createElement("div",{className:"p-huddles_draw__name_tag",style:r?{background:r}:{}},n.createElement(E.Ay,{className:"p-huddles_draw__name_tag_avatar",key:t,size:24,userId:a,isInteractive:!1,tabIndex:-1}),n.createElement("div",{className:"p-huddles_draw__name_tag_text"},e))),HuddlesCursor=({peerId:e,width:t,height:a,leftOffset:r,topOffset:i,color:l,renderNameTag:o=!0,isWindowDrawMode:s=!1,xWindowPosition:c=0,yWindowPosition:d=0})=>{let m,u,p=(0,n.useRef)(null);m=Math.round(r*t+-15),u=Math.round(i*a+-21),s&&(m+=c,u+=d);let h=(0,n.useMemo)(()=>[m,u],[m,u]);return(0,n.useEffect)(()=>{let e;(e=p.current)&&(e.style.setProperty("transform",`translate(${h[0]}px, ${h[1]}px)`),e.style.setProperty("visibility","initial"))},[h]),n.createElement("div",{className:"p-huddles_cursor_tracking__cursor_container"},n.createElement("div",{key:`cursor-${e}`,className:"p-huddles_cursor_tracking__cursor",ref:p},o&&n.createElement(v,{key:`name-tag-${e}`,id:e,color:l})))};HuddlesCursor.displayName="HuddlesCursor";let S=n.memo(HuddlesCursor,r.A);let BaseDrawRenderer=class BaseDrawRenderer extends n.Component{ctx;dirty=!1;peerLines={};rafId;static contextType=s._0;constructor(e){super(e),this.onResize=this.onResize.bind(this),this.onIncomingPeerLine=this.onIncomingPeerLine.bind(this),this.draw=this.draw.bind(this),this.renderCursor=this.renderCursor.bind(this),this.state={tagCoords:{},numVisibleLines:0,userColors:{}}}shouldComponentUpdate(e,t){return!(0,r.A)(this.props,e)||!(0,r.A)(this.state,t)}getOrCreatePeerLine(e){return this.peerLines[e]=this.peerLines[e]||new DrawLine({requestRenderOnNextFrame:()=>this.requestRenderOnNextFrame(),onLineVisibilityChanged:e=>this.setState(t=>({numVisibleLines:t.numVisibleLines+(e?1:-1)}))}),this.peerLines[e]}onIncomingPeerLine(e){if(this.props.itemId&&e.itemId&&e.itemId!==this.props.itemId)return;let t=this.getOrCreatePeerLine(e.id);switch(t.update(e),e.type){case y.Sl.New:this.setState(({tagCoords:a,userColors:n})=>({tagCoords:{...a,[e.id]:e.segment.d},userColors:{...n,[e.id]:t.getColor()}}));break;case y.Sl.Edit:this.setState(({tagCoords:t})=>({tagCoords:{...t,[e.id]:e.segment.d}}));break;case y.Sl.ChangeHue:this.setState(({userColors:a})=>({userColors:{...a,[e.id]:t.getColor()}}));break;case y.Sl.End:this.setState(({tagCoords:t})=>({tagCoords:(0,i.A)(t,e.id)}));break;case y.Sl.Position:{let t=[e.x,e.y];this.setState(({tagCoords:a})=>({tagCoords:{...a,[e.id]:t}}))}}}componentDidMount(){x.A.subscribe(this.onIncomingPeerLine),this.ctx=this.props.refToForward.current.getContext("2d"),this.onResize()}componentDidUpdate(e,t){e.targetRect!==this.props.targetRect&&this.onResize(),this.state.numVisibleLines<0&&(0,A.tZ)("DRAW-RENDERER").warn("Should not have a negative number of lines"),this.props.onRendererIsActive&&(0===this.state.numVisibleLines&&t.numVisibleLines>0||this.state.numVisibleLines>0&&0===t.numVisibleLines)&&this.props.onRendererIsActive(0!==this.state.numVisibleLines)}componentWillUnmount(){(0,l.A)(this.rafId)||this.context.windowRef.deref()?.cancelAnimationFrame(this.rafId),x.A.unsubscribe(this.onIncomingPeerLine)}onResize(){this.ctx&&(this.ctx.canvas.width=this.props.targetRect.width,this.ctx.canvas.height=this.props.targetRect.height,LineStyle.renderBaseStyle(this.ctx),this.requestRenderOnNextFrame())}requestRenderOnNextFrame(){this.dirty||(this.dirty=!0,this.rafId=this.context.windowRef.deref().requestAnimationFrame(this.draw))}draw(){if(this.rafId=void 0,!this.ctx)return;let e=this.props.targetRect.width,t=this.props.targetRect.height;this.dirty=!1,this.ctx.clearRect(0,0,e,t);let a=Object.values(this.peerLines);for(let n=0;n<a.length;n++)a[n].render(this.ctx,e,t)}renderCursor(e,t,a){let{targetRect:r,useHuddlesCursor:i,itemId:l,isHostDrawWindow:o,isWindowDrawing:s}=this.props;if(i){let i=this.state.userColors[e];return n.createElement(S,{key:e,peerId:e,topOffset:t,leftOffset:a,width:r.width,height:r.height,color:i,renderNameTag:"self"!==l,isWindowDrawMode:o&&s,xWindowPosition:r.left,yWindowPosition:r.top})}return n.createElement(f,{key:e,id:e,topOffset:t,leftOffset:a,...r})}render(){if(this.props.setPositionToMatchTargetRect){let{targetRect:e}=this.props,t={...(0,c.n)({left:e.left,top:e.top,width:e.width,height:e.height})};return n.createElement("div",{className:"p-calls_draw__renderer",style:t},n.createElement(d,{refToForward:this.props.refToForward,isHidden:this.props.isHidden,numVisibleLines:this.state.numVisibleLines,...this.props.targetRect,doNotApplyTargetRect:!0}),(0,o.A)(this.state.tagCoords,([e,t],a)=>this.renderCursor(a,t,e)))}return n.createElement("div",{className:"p-calls_draw__renderer"},n.createElement(d,{refToForward:this.props.refToForward,isHidden:this.props.isHidden,numVisibleLines:this.state.numVisibleLines,...this.props.targetRect}),(0,o.A)(this.state.tagCoords,([e,t],a)=>this.renderCursor(a,t,e)))}};BaseDrawRenderer.displayName="BaseDrawRenderer";let I=n.forwardRef((e,t)=>n.createElement(BaseDrawRenderer,{refToForward:t,...e}))},0xf579c4b7:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>m,Ft:()=>getClampedAudioLevel});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x24aafb965),o=a(0x9c32dee),s=a(0x1c91944c9),c=a(0x1fb2d2a87);function getClampedAudioLevel(e){return Math.min(1,Math.max(0,l.Ep*e))}let d=class extends n.PureComponent{numBubbles=this.props.initNumBubbles??15;constructor(e){super(e),this.state={numInactiveBubbles:e.initNumBubbles??15,numActiveBubbles:0},this.onLevelUpdated=this.onLevelUpdated.bind(this)}componentDidMount(){o.B.subscribe(this.onLevelUpdated)}componentWillUnmount(){o.B.unsubscribe(this.onLevelUpdated)}onLevelUpdated({level:e}){let{isEnabled:t}=this.props;if(!t){this.numBubbles>0&&this.setState(()=>({numActiveBubbles:0,numInactiveBubbles:this.numBubbles}));return}let a=Math.floor(this.numBubbles*getClampedAudioLevel(e));this.setState(()=>({numActiveBubbles:a,numInactiveBubbles:this.numBubbles-a}))}renderBubbles(){let{numActiveBubbles:e,numInactiveBubbles:t}=this.state,{bubbleClassname:a}=this.props,r=i()("p-audio_levels__bubble","p-audio_levels__bubble--active",a,{"p-audio_levels__bubble--dark":"dark"===this.props.clientTheme}),l=i()("p-audio_levels__bubble","p-audio_levels__bubble--inactive",a,{"p-audio_levels__bubble--dark":"dark"===this.props.clientTheme}),o=Array.from({length:e},(e,t)=>n.createElement("span",{key:`active${t}`,className:r})),s=Array.from({length:t},(e,t)=>n.createElement("span",{key:t,className:l}));return o.concat(s)}render(){let e=this.props.ariaLabelledBy||this.props.ariaLabel?{role:"meter","aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-valuenow":Math.floor(this.state.numActiveBubbles/this.numBubbles*100),"aria-valuemin":0,"aria-valuemax":100,tabIndex:0}:{};return n.createElement("div",{className:i()("p-audio_levels",this.props.containerClassName),"data-qa":"audio-levels-bubbles",...e},this.renderBubbles())}};d.displayName="AudioMeter";let m=(0,s.N)(e=>({clientTheme:(0,c.to)(e)}))(d)},0x308014ed:(e,t,a)=>{"use strict";let n;a.d(t,{_:()=>getAudioDetectionTracker});var r=a(0x6a506842);let i=null;function getSharedAudioBuffer(e){return i&&i.length===e||(i=new Float32Array(e)),i}let AudioDetectionTracker=class AudioDetectionTracker{logger=(0,r.Jt)("AUDIO-DETECTION-TRACKER");huddleStartedTime=0;peerIds=new Set;peerJoinedCount=0;peerLeftCount=0;twoPlusPeopleStartTime=0;hasDetectedSelfAudio=!1;hasDetectedRemoteAudio=!1;selfAudioDetectionTime;remoteAudioDetectionTime;bothSidesAudioDetected=!1;audioDeviceSuccessfullyInitialized=!1;localAudioContext;localSrc;localAnalyser;localTimer;isHuddlesUpdatedAudioDetectionTriggerEnabled=!1;constructor(){this.logger.info("Audio detection tracker initialized")}setHuddleStarted(){this.huddleStartedTime=Date.now(),this.logger.info("Audio detection tracker Huddle started set")}getTimeSinceStart(){return this.huddleStartedTime>0?Date.now()-this.huddleStartedTime:0}trackVolumeIndicator(e,t){if(null===t)return;if(this.bothSidesAudioDetected)return void this.stopLocalMonitor();let a=this.getTimeSinceStart();e&&this.hasDetectedSelfAudio&&t>0?this.stopLocalMonitor():e&&!this.hasDetectedSelfAudio&&t>0?(this.stopLocalMonitor(),this.hasDetectedSelfAudio=!0,this.selfAudioDetectionTime=a,this.logger.info(`Self audio detected for the first time (${this.getFormattedDuration(a)} seconds since Huddle start)`)):e||this.hasDetectedRemoteAudio||!(t>0)||(this.hasDetectedRemoteAudio=!0,this.remoteAudioDetectionTime=a,this.logger.info(`Remote peer audio detected for the first time (${this.getFormattedDuration(a)} seconds since Huddle start)`)),this.checkBothSidesDetected(a)}checkBothSidesDetected(e){this.hasDetectedSelfAudio&&this.hasDetectedRemoteAudio&&!this.bothSidesAudioDetected&&(this.bothSidesAudioDetected=!0,this.logger.info(`Audio detected for self and remote (${this.getFormattedDuration(e)} seconds since Huddle start)`))}updatePeerId(e){this.peerIds.add(e),this.updateTwoPlusPeopleTracking()}removePeerId(e){this.peerIds.delete(e),this.updateTwoPlusPeopleTracking()}updatePeerJoinedCount(){this.peerJoinedCount+=1}updatePeerLeftCount(){this.peerLeftCount+=1}getPeerJoinedCount(){return this.peerJoinedCount}getPeerLeftCount(){return this.peerLeftCount}setAudioDeviceSuccessfullyInitialized(){this.audioDeviceSuccessfullyInitialized=!0}hasSelfAudioBeenDetected(){return this.hasDetectedSelfAudio}getSelfAudioDetectionTime(){return this.selfAudioDetectionTime}hasRemoteAudioBeenDetected(){return this.hasDetectedRemoteAudio}getRemoteAudioDetectionTime(){return this.remoteAudioDetectionTime}haveBothSidesBeenDetected(){return this.bothSidesAudioDetected}setIsHuddlesUpdatedAudioDetectionTriggerEnabled(e){this.isHuddlesUpdatedAudioDetectionTriggerEnabled=e}updateTwoPlusPeopleTracking(){let e=this.peerIds.size;!this.isValidHuddle()&&(e>=2?0===this.twoPlusPeopleStartTime&&(this.twoPlusPeopleStartTime=Date.now()):this.twoPlusPeopleStartTime>0&&(this.twoPlusPeopleStartTime=0))}isValidHuddle(){return 0!==this.twoPlusPeopleStartTime&&Date.now()-this.twoPlusPeopleStartTime>=15e3}getFormattedDuration(e){return Math.floor(e/1e3).toString()}getTags(){let e=this.getTimeSinceStart(),t=this.twoPlusPeopleStartTime>0?Date.now()-this.twoPlusPeopleStartTime:0;return{hasDetectedSelfAudio:this.hasDetectedSelfAudio,hasDetectedRemoteAudio:this.hasDetectedRemoteAudio,bothSidesAudioDetected:this.bothSidesAudioDetected,selfAudioDetectionTime:this.selfAudioDetectionTime,remoteAudioDetectionTime:this.remoteAudioDetectionTime,huddleStartedTime:this.huddleStartedTime,huddleDurationInMS:e,peerCount:this.peerIds.size,peerJoinedCount:this.peerJoinedCount,peerLeftCount:this.peerLeftCount,twoPlusPeopleStartTime:this.twoPlusPeopleStartTime,timeWithTwoPlusPeople:t,isValidHuddle:this.isValidHuddle(),audioDeviceSuccessfullyInitialized:this.audioDeviceSuccessfullyInitialized,isHuddlesUpdatedAudioDetectionTriggerEnabled:this.isHuddlesUpdatedAudioDetectionTriggerEnabled}}setHuddleEnded(){this.huddleStartedTime=0,this.hasDetectedSelfAudio=!1,this.hasDetectedRemoteAudio=!1,this.selfAudioDetectionTime=void 0,this.remoteAudioDetectionTime=void 0,this.bothSidesAudioDetected=!1,this.peerIds.clear(),this.peerJoinedCount=0,this.peerLeftCount=0,this.twoPlusPeopleStartTime=0,this.audioDeviceSuccessfullyInitialized=!1,this.stopLocalMonitor(),this.logger.info("Audio detection tracker reset")}async startLocalMonitor(e){if(!this.isHuddlesUpdatedAudioDetectionTriggerEnabled)return;this.stopLocalMonitor();let t=new AudioContext;if("suspended"===t.state&&await t.resume(),this.localAudioContext)return void await t.close().catch(()=>{});this.localAudioContext=t,this.localSrc=this.localAudioContext.createMediaStreamSource(e),this.localAnalyser=this.localAudioContext.createAnalyser(),this.localAnalyser.fftSize=512,this.localAnalyser.smoothingTimeConstant=0,this.localSrc.connect(this.localAnalyser);let a=0,n=getSharedAudioBuffer(512),r=n.length,i=this.localAnalyser;this.hasDetectedSelfAudio=!1;let audioTick=()=>{if(this.localAnalyser!==i)return;i.getFloatTimeDomainData(n);let e=0;for(let t=0;t<r;t++)e+=n[t]*n[t];let t=Math.sqrt(e/r),l=-110>this.rmsToDb(t)?0:t;l>0&&(a>10?this.trackVolumeIndicator(!0,l):a+=1),this.localAnalyser===i&&(this.localTimer=setTimeout(audioTick,150))};audioTick()}stopLocalMonitor(){this.cleanupLocalMonitorResources()}cleanupLocalMonitorResources(){try{this.localTimer&&(clearTimeout(this.localTimer),this.localTimer=void 0),this.localSrc?.disconnect(),this.localAnalyser=void 0,this.localSrc=void 0,this.localAudioContext&&(this.localAudioContext.close().catch(()=>{}),this.localAudioContext=void 0)}catch(e){this.logger.warn("Problem disconnecting local audio source",String(e))}}rmsToDb(e){return 20*Math.log10(Math.max(1e-12,e))}};let getAudioDetectionTracker=()=>(n||(n=new AudioDetectionTracker),n)},0x7e65931b:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>i});var n=a(0x18f2150ea),r=a(0xca924ee1);let HuddleBatteryManager=class HuddleBatteryManager{battery;isInitialized=!1;isUsingBattery=null;batteryLevel=null;isSupported=!1;constructor(){this.setUp()}registerListeners=()=>{this.battery?.addEventListener("chargingchange",this.handleBatteryUpdate),this.battery?.addEventListener("levelchange",this.handleBatteryUpdate)};removeEventListeners=()=>{this.battery?.removeEventListener("chargingchange",this.handleBatteryUpdate),this.battery?.removeEventListener("levelchange",this.handleBatteryUpdate)};handleBatteryUpdate=()=>{this.isSupported&&this.updateBatteryState()};updateBatteryState=()=>{this.battery&&(this.isUsingBattery=!this.battery.charging,this.batteryLevel=this.battery.level)};initialize=async()=>{await this.setUp(),this.updateBatteryState()};setUp=async()=>{if(!this.isInitialized)try{if(navigator.getBattery){let e=await navigator.getBattery();this.battery=e,this.battery&&(this.isSupported=!0,this.updateBatteryState(),this.registerListeners())}else this.isSupported=!1}catch{this.isSupported=!1}finally{this.isInitialized=!0}};cleanup=()=>{this.isSupported&&this.removeEventListeners()};isUsingBatteryPower=()=>{if(this.isSupported)return!!this.isUsingBattery};getLevel=()=>{if(this.isSupported&&(0,n.A)(this.batteryLevel))return 100*this.batteryLevel}};let i=(0,r.A)(()=>new HuddleBatteryManager)},0x14466d83e:(e,t,a)=>{"use strict";let n,r,i,l;a.d(t,{$H:()=>getDefaultMeetingReadinessCheckerExp,$b:()=>g,$s:()=>getDefaultMeetingReadinessCheckerDefault,E9:()=>A,Es:()=>d,I8:()=>_,KK:()=>B,Ls:()=>getAudioProfileExp,QJ:()=>I,Q_:()=>getDefaultMeetingSessionExp,RM:()=>getDefaultDeviceControllerExp,VW:()=>isTranscriptEventTranscriptionStatus,Vr:()=>w,XL:()=>b,Xw:()=>c,ZT:()=>setUseExpSDK,_R:()=>getDefaultDeviceController,b9:()=>y,dQ:()=>m,em:()=>P,fX:()=>N,gi:()=>x,i3:()=>U,j3:()=>getAudioProfileDefault,jV:()=>R,jp:()=>v,jq:()=>getDefaultVideoTransformDevice,kM:()=>getBackgroundBlurVideoFrameProcessor,mn:()=>f,of:()=>getDefaultMeetingSessionDefault,px:()=>getBackgroundReplacementVideoFrameProcessor,uL:()=>h,uP:()=>M,vB:()=>F,w2:()=>getVoiceFocusDeviceTransformer,wV:()=>L,xY:()=>u,xc:()=>S,z2:()=>p,zF:()=>T,zg:()=>getDefaultDeviceControllerDefault});var o=a(0x12192fed6),s=a(0x1ec8c7574);let c=o.CheckAudioConnectivityFeedback,d=o.CheckAudioInputFeedback,m=o.CheckAudioOutputFeedback,u=o.CheckCameraResolutionFeedback,p=o.CheckContentShareConnectivityFeedback,h=o.CheckNetworkTCPConnectivityFeedback,_=o.CheckNetworkUDPConnectivityFeedback,f=o.CheckVideoConnectivityFeedback,b=o.CheckVideoInputFeedback,g=o.LogLevel,y=o.MeetingSessionStatusCode,A=o.TranscriptItemType,x=o.AllHighestVideoBandwidthPolicy,E=o.DefaultDeviceController,C=o.DefaultMeetingReadinessChecker,k=o.DefaultMeetingSession,v=o.DefaultModality,S=o.DefaultVideoTile,I=o.MeetingSessionConfiguration,w=o.TargetDisplaySize,T=o.Versioning,N=o.VideoPreference,M=o.VideoPreferences,R=o.VideoPriorityBasedPolicy,P=o.NScaleVideoUplinkBandwidthPolicy,L=o.VoiceFocusDeviceTransformer,O=o.DefaultVideoTransformDevice,D=o.BackgroundBlurVideoFrameProcessor,F=o.CSPMonitor,U=o.VideoFxProcessor,B=o.VideoCodecCapability,H=!1;async function setUseExpSDK(e){if(!e||H)return;let t=await Promise.resolve().then(a.t.bind(a,0x1ec8c7574,23));c=t.CheckAudioConnectivityFeedback,d=t.CheckAudioInputFeedback,m=t.CheckAudioOutputFeedback,u=t.CheckCameraResolutionFeedback,p=t.CheckContentShareConnectivityFeedback,h=t.CheckNetworkTCPConnectivityFeedback,_=t.CheckNetworkUDPConnectivityFeedback,f=t.CheckVideoConnectivityFeedback,b=t.CheckVideoInputFeedback,t.ClientVideoStreamReceivingReport,t.ConnectionHealthData,t.DataMessage,r=t.DefaultDeviceController,i=t.DefaultMeetingReadinessChecker,l=t.DefaultMeetingSession,v=t.DefaultModality,S=t.DefaultVideoTile,g=t.LogLevel,I=t.MeetingSessionConfiguration,t.MeetingSessionStatus,y=t.MeetingSessionStatusCode,t.MeetingSessionVideoAvailability,t.MutableVideoPreferences,t.PermissionDeniedError,w=t.TargetDisplaySize,A=t.TranscriptItemType,t.TranscriptionStatusType,T=t.Versioning,N=t.VideoPreference,M=t.VideoPreferences,R=t.VideoPriorityBasedPolicy,t.VideoPriorityBasedPolicyConfig,P=t.NScaleVideoUplinkBandwidthPolicy,t.VideoTileState,n=t.AudioProfile,L=t.VoiceFocusDeviceTransformer,t.DefaultBrowserBehavior,O=t.DefaultVideoTransformDevice,D=t.BackgroundBlurVideoFrameProcessor,t.BackgroundReplacementVideoFrameProcessor,F=t.CSPMonitor,U=t.VideoFxProcessor,B=t.VideoCodecCapability,H=!0}function getDefaultDeviceController(){return r||E}function getDefaultDeviceControllerDefault(){return E}function getDefaultDeviceControllerExp(){return r}function getDefaultMeetingReadinessCheckerDefault(){return C}function getDefaultMeetingReadinessCheckerExp(){return i}function getDefaultMeetingSessionDefault(){return k}function getDefaultMeetingSessionExp(){return l}function getVoiceFocusDeviceTransformer(){return L}function getDefaultVideoTransformDevice(){return O}function getBackgroundBlurVideoFrameProcessor(){return D}function getBackgroundReplacementVideoFrameProcessor(){return s.BackgroundReplacementVideoFrameProcessor}function getAudioProfileDefault(){return o.AudioProfile}function getAudioProfileExp(){return n}function isTranscriptEventTranscriptionStatus(e){return!!e.type}},0x172f8916f:(e,t,a)=>{"use strict";a.d(t,{LD:()=>isWindowDrawingSupported,MS:()=>determineContentShareTypeFromSourceId,Vd:()=>doesContentShareTypeSupportDrawing,k0:()=>determineFullContentShareSourceType});var n=a(0x1feee1711),r=a(0x62a17882),i=a(0xbaa04805);let l=[i.R.DesktopScreen,i.R.DesktopWindow];function isWindowDrawingSupported(){return!!(0,r.dY)("4.30.79")}function determineContentShareTypeFromSourceId(e){return(0,n.A)(e)?i.f.None:e.startsWith("screen:")?i.f.Screen:e.startsWith("window:")?i.f.Window:i.f.Other}function determineFullContentShareSourceType(e){if(!(0,r.y3)())return i.R.BrowserContent;let t=determineContentShareTypeFromSourceId(e);if((0,r.y3)())switch(t){case i.f.Screen:return i.R.DesktopScreen;case i.f.Window:return i.R.DesktopWindow;default:return i.R.DesktopUnknown}return i.R.Unknown}function doesContentShareTypeSupportDrawing(e){return l.includes(e)}},0xbaa04805:(e,t,a)=>{"use strict";a.d(t,{R:()=>l,f:()=>i});var n,r,i=((n={}).Screen="screen",n.Window="window",n.Other="other",n.None="none",n),l=((r={}).DesktopScreen="desktop:screen",r.DesktopWindow="desktop:window",r.DesktopUnknown="desktop:unknown",r.BrowserContent="browser:content",r.MobileScreen="mobile:screen",r.Unknown="unknown",r)},0x84e85657:(e,t,a)=>{"use strict";a.d(t,{q:()=>getDeviceAvailability,y:()=>i});var n,r=a(0x62a17882),i=((n={})[n.Available=0]="Available",n[n.HiddenByBrowser=1]="HiddenByBrowser",n[n.NoDevices=2]="NoDevices",n);function getDeviceAvailability(e){return(0,r.y3)()?0:0===e.length?2:(0,r.gm)()?+!!e.every(e=>""===e.label):+(1===e.length&&""===e[0].id)}},0x1fb44c2bf:(e,t,a)=>{"use strict";a.d(t,{Bm:()=>createEmptyDevices,LL:()=>c,On:()=>removeDeviceIdFromDeviceLabel,Zy:()=>s,dx:()=>o,my:()=>logDevices,tk:()=>makeDevice});var n=a(0x839ba347),r=a(0x1aba66b56),i=a(0x1c6b56d20),l=a(0x120e75720);let o="default",s="communications",c=[i.lW.Microphone,i.lW.Camera,i.Q4];function logDevices(e,t,a=c){(0,n.A)(t,(t,n)=>{if(!(0,r.A)(a,n))return;if(!t.length)return void e.warn(`No ${n} devices available`);let i=new l.M(["id","label"]);t.forEach(e=>{i.add([e.id,e.label].map(String))}),e.info(`${n} devices:
${i.report()}`)})}function createEmptyDevices(){return{camera:[],microphone:[],output:[]}}let d={audioinput:i.lW.Microphone,videoinput:i.lW.Camera,audiooutput:i.Q4};function makeDevice(e){let t=d[e.kind],a={id:e.deviceId,label:e.label||void 0,groupId:e.groupId||void 0};return isInputDeviceType(t),{...a,type:t}}function isInputDeviceType(e){return e!==i.Q4}function removeDeviceIdFromDeviceLabel(e){return e.replace(/ *?\([^)]*?\) *?/g,"")}},0xf5a3fff7:(e,t,a)=>{"use strict";a.d(t,{t3:()=>getPreferredDevices,Bh:()=>readDevicePrefs,i4:()=>writeDevicePrefs});var n=a(0xf4930165),r=a(0x16998c9bf),i=a(0x1fb44c2bf),l=a(0x6a506842);let o="devicePrefs";function getPreferredDevices(e){return(0,n.A)(e,e=>e[0])}function createDefaultDevicePriority(){return{camera:[],microphone:[i.dx,i.Zy],output:[i.dx,i.Zy]}}function createDefaultDeviceExtendedPriority(){return{camera:[],microphone:[],output:[]}}function createDefaultAudioPrefs(){return{enableAGC:!0,enableNoiseSuppression:!0}}function createDefaultVideoPrefs(){return{enableHD:!1,mirrorVideo:!1,effect:void 0}}function readDevicePrefs(){let e=localStorage.getItem(o),t={version:"0.1",deviceIdPriorities:createDefaultDevicePriority(),deviceIdPrioritiesExtended:createDefaultDeviceExtendedPriority(),video:createDefaultVideoPrefs(),audio:createDefaultAudioPrefs()};if(!e)return t;try{let a=JSON.parse(e);if("0.1"!==a.version)return t;return{...t,...a}}catch(e){return(0,l.tZ)("DEVICES").error("Could not read device preferences from localStorage: ",(0,r.u1)(e)),t}}async function updateDeviceIdPrioritiesExtended(e){let t={},a=await navigator.mediaDevices.enumerateDevices();for(let n of Object.keys(e)){let r=[];for(let t=0;t<e[n].length;t++){let l=e[n][t],o=a.find(e=>e.deviceId===l);o&&r.push({id:o.deviceId,groupId:o.groupId,label:o.label,labelWithoutId:(0,i.On)(o.label)})}t[n]=r}return t}async function writeDevicePrefs(e){try{let t=await updateDeviceIdPrioritiesExtended(e.deviceIdPriorities),a={...e,deviceIdPrioritiesExtended:t};localStorage.setItem(o,JSON.stringify(a))}catch(e){(0,l.tZ)("DEVICES").error("Could not write device preferences to localStorage: ",(0,r.u1)(e))}}},0x83598c13:(e,t,a)=>{"use strict";let n;a.d(t,{L:()=>getNativeDeviceManager});var r=a(0x2286acf6c),i=a(0xb77a689a),l=a(0x62a17882),o=a(0x1c6b56d20),s=a(0x18d2488e1),c=a(0x6a506842),d=a(0x90c529f0);let m=class{logger=(0,c.Jt)("DEVICES");audioDevices={};isNativeDeviceManagerEnabled=!1;init({isEnabled:e}){this.isNativeDeviceManagerEnabled=e}async enumerateDevices(e=!1){if(e){if(!this.isPlatformSupported())return}else if(!this.isNativeDeviceManagerAvailable())return;let t=await (0,d.wT)();t&&0!==t.length?(this.audioDevices={},t.forEach(e=>{e.webRTCDeviceId&&(this.audioDevices[e.webRTCDeviceId]={...e,webRTCDeviceId:e.webRTCDeviceId})})):this.logger.warn("No native audio devices found from enumerateAudioDevices")}checkForMicrophoneDeviceIssues(e){if(!this.isNativeDeviceManagerAvailable())return;if(!e)return void this.logger.warn("checkForDeviceIssues - Valid device id not provided");let t=this.getAudioDeviceByWebRTCId(e);if(!t)return void this.logger.warn("checkForDeviceIssues - No device found for device id",e);if((0,l.cX)()){t.muted&&(this.logger.warn(`checkForDeviceIssues - Device is muted deviceID: ${t.deviceId}`),(0,s.C)().recordNativeDeviceIssue(o.ZB.DeviceMuted)),0===t.avgVolumeScalar&&(this.logger.warn(`checkForDeviceIssues - Device average volume scalar is 0 deviceID: ${t.deviceId}`),(0,s.C)().recordNativeDeviceIssue(o.ZB.DeviceVolumeScalar0));return}(0,l.uF)()&&(t.initializable||(this.logger.warn(`checkForDeviceIssues - Device is not initializable deviceID: ${t.deviceId}`),(0,s.C)().recordNativeDeviceIssue(o.ZB.DeviceNotInitializable)),t.unplugged&&(this.logger.warn(`checkForDeviceIssues - Device is unplugged deviceID: ${t.deviceId}`),(0,s.C)().recordNativeDeviceIssue(o.ZB.DeviceUnplugged)),t.disabled&&(this.logger.warn(`checkForDeviceIssues - Device is disabled deviceID: ${t.deviceId}`),(0,s.C)().recordNativeDeviceIssue(o.ZB.DeviceDisabled)),t.notPresent&&this.logger.warn(`checkForDeviceIssues - Device is not present deviceID: ${t.deviceId}`),t.unknown&&(this.logger.warn(`checkForDeviceIssues - Device state is unknown deviceID: ${t.deviceId}`),(0,s.C)().recordNativeDeviceIssue(o.ZB.DeviceUnknown)))}attemptToInitMicrophoneNative=(0,r.A)(async e=>{if(this.isNativeDeviceManagerAvailable())try{if(!(0,l.uF)())return;if(!e)return void this.logger.warn("attemptToInitMicrophoneNative - No valid device label provided");let{error:t,canInit:a}=await (0,d.Lh)(e);if(!(0,i.A)(t))return void this.logger.info(`Successfully initialized microphone with device: ${e}`);if(t.includes("Method not available")||t.includes("only supported on Windows"))return void this.logger.info("Microphone init test not supported on this client");a||this.logger.warn(`ALERT! Possible init failure for microphone with device: ${e}: ${t}`)}catch(e){this.logger.error("Error attempting to init audio device",e)}},1e3);logNativeDeviceDetails(e){if(!this.isNativeDeviceManagerAvailable())return;let t=this.getAudioDeviceByWebRTCId(e);t?this.logger.info(`Native device details for device ID: ${t.deviceId}, ${t}`):this.logger.warn("No native device details found for webRTC device id",e)}getAudioDevices(){return this.audioDevices}async logAllNativeDeviceDetails(e=!1){if(e){if(!this.isPlatformSupported())return void this.logger.warn("Native device manager not available - platform not supported")}else if(!this.isNativeDeviceManagerAvailable())return void this.logger.warn("Native device manager not available");await this.enumerateDevices(e);let t=[],a=[];Object.values(this.audioDevices).forEach(e=>{"audioinput"===e.kind?t.push(e):"audiooutput"===e.kind&&a.push(e)});let n=this.createDeviceLogText("Input",t),r=this.createDeviceLogText("Output",a);this.logger.info(`Native Audio Input Devices Info: ${n}`),this.logger.info(`Native Audio Output Devices Info: ${r}`)}getAudioDeviceByWebRTCId(e,t=!1){if(t)return this.audioDevices[e];if("default"===e){let e=this.getNativeDefaultDevice();if(!e)return;return this.getAudioDeviceByWebRTCId(e)}return this.audioDevices[e]}getNativeDefaultDevice(){let e=[];return Object.keys(this.audioDevices).forEach(t=>{!0===this.audioDevices[t].default&&e.push(t)}),e.length>1&&this.logger.warn(`Multiple default devices found (${e.length}). Using the first one.`),e.length>0?e[0]:void 0}isPlatformSupported(){return!(!(0,l.y3)()||(0,l.j9)())&&!!(0,l.dY)("4.48.14")}isNativeDeviceManagerAvailable(){return!!this.isNativeDeviceManagerEnabled&&this.isPlatformSupported()}createDeviceLogText(e,t){let a=`${e} Devices (${t.length}):
`;return t.forEach((e,t)=>{a+=`
[Device ${t+1}]${e.default?" [DEFAULT]":""}
  Label:           ${e.label}
  ID:              ${e.deviceId}
  WebRTC ID:       ${e.webRTCDeviceId}
`,"audioinput"===e.kind&&(a+=`  Muted:           ${void 0!==e.muted?e.muted:"Unknown"}
`),a+=`  Active:          ${void 0!==e.active?e.active:"Unknown"}
  Initializable:   ${void 0!==e.initializable?e.initializable:"Unknown"}
  Unplugged:       ${void 0!==e.unplugged?e.unplugged:"Unknown"}
  Disabled:        ${void 0!==e.disabled?e.disabled:"Unknown"}
  Not Present:     ${void 0!==e.notPresent?e.notPresent:"Unknown"}
  Unknown State:   ${void 0!==e.unknown?e.unknown:"Unknown"}
`}),a}},getNativeDeviceManager=()=>(n||(n=new m),n)},0x24643ca4:(e,t,a)=>{"use strict";a.d(t,{Ef:()=>getDeviceTrack,IP:()=>getDeviceId,uW:()=>didSuccessfullyUpdateDevice});let getDeviceId=e=>"string"==typeof e?e:e?.exact?.deviceId??e?.deviceId??"unknown",getDeviceTrack=e=>{if(!e?.activeDevices?.audio?.stream?.getAudioTracks)return null;let t=e.activeDevices.audio.stream.getAudioTracks();return 1===t.length?t[0]:null},didSuccessfullyUpdateDevice=(e,t)=>{let a=getDeviceTrack(e);if(!a)return{isSuccessfulUpdate:!1};let n=a.getSettings().deviceId;return n?{isSuccessfulUpdate:n===t,deviceId:n}:{isSuccessfulUpdate:!1}}},0xef5ec459:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var n,r=((n={}).Blur="blur",n.Background="bg",n)},0x152e2322a:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>f});var n=a(0x1626b8eae),r=a(0xd6ba6894),i=a(0x1bbc0c9bf),l=a(0x62a17882),o=a(0x1c6b56d20),s=a(0xe874a88a),c=a(0xc67f3d80);let DefaultDevicePermissions=class DefaultDevicePermissions{config;logger;permissions;constructor(e){this.config=e,this.logger=this.config.logger,this.permissions=this.config.initialState}canAccessMediaResource=e=>{let t=this.wasPermissionGranted(e);return this.logger.info(`${e} permissions granted: ${t}`),{isAvailable:this.config.isElectronApiAvailable,status:this.permissions[e]}};requestMediaAccess=async e=>(this.updatePermissionsState(e,this.getDefaultAccessResult().status),this.logger.error("Requesting media access is not implemented for this device, but it is being called. This is likely a bug."),s.S.resolve({isAvailable:this.config.isElectronApiAvailable,isGranted:!0}));refreshAllPermissions=async()=>{try{await this.refreshDevicePermissionStatus(c.mT.MICROPHONE),await this.refreshDevicePermissionStatus(c.mT.CAMERA),await this.refreshDevicePermissionStatus(c.mT.SCREEN)}catch(e){this.logger.warn("An error occurred while refreshing device permissions",String(e))}};refreshDevicePermissionStatus=async e=>{this.updatePermissionsState(e,this.getDefaultAccessResult().status)};getDefaultAccessResult=()=>({isAvailable:this.config.isElectronApiAvailable,status:o.eJ.Granted});updatePermissionsState=(e,t)=>{this.permissions[e]!==t&&(this.logger.info(`permission state for ${e} changed to ${t}`),this.permissions[e]=t,this.config.onPermissionsChange(this.permissions))};wasPermissionGranted=e=>{let t=!1;return this.permissions[e]&&(t=this.permissions[e]===o.eJ.Granted),t};hasNoKnownPermissions=e=>null===this.permissions[e]};let d={[c.mT.MICROPHONE]:"microphone",[c.mT.CAMERA]:"camera",[c.mT.SCREEN]:"display-capture"},m={[c.mT.MICROPHONE]:null,[c.mT.CAMERA]:null,[c.mT.SCREEN]:null},getInitialPermissionsState=()=>({...m});let BrowserDevicePermissions=class BrowserDevicePermissions extends DefaultDevicePermissions{changeHandlers=getInitialPermissionsState();refreshDevicePermissionStatus=async e=>{let t=await navigator.permissions.query({name:d[e]});this.updatePermissionsState(e,t.state),this.logger.info(`Received ${e} access status for browser: ${this.permissions[e]}`),this.maybeRegisterPermissionChangeListener(e,t)};maybeRegisterPermissionChangeListener=(e,t)=>{if(!this.changeHandlers[e]){let handler=()=>this.onPermissionChangeEvent(e,t?.state);t.addEventListener("change",handler),this.changeHandlers[e]=handler}};onPermissionChangeEvent=(e,t)=>{this.updatePermissionsState(e,t)}};var u=a(0x1059ba41d);let DesktopDevicePermissions=class DesktopDevicePermissions extends DefaultDevicePermissions{constructor(e){super(e)}refreshDevicePermissionStatus=async e=>{let{status:t}=await (0,u.XBC)(e,{forceRefresh:!0});this.logger.info(`Received ${e} access status for desktop app: ${t}`),this.updatePermissionsState(e,t)};requestMediaAccess=async e=>{let{isAvailable:t,isGranted:a}=await (0,u.Nin)(e);return this.updatePermissionsState(e,a?o.eJ.Granted:o.eJ.Denied),{isAvailable:t,isGranted:!!a}}};let FirefoxDevicePermissions=class FirefoxDevicePermissions extends DefaultDevicePermissions{constructor(e){super(e)}refreshDevicePermissionStatus=async e=>{if(e===c.mT.SCREEN)return;let t=e===c.mT.MICROPHONE?"audioinput":"videoinput";try{let a=(await navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===t),n=a.length>0&&a.some(e=>""!==e.label.trim());this.updatePermissionsState(e,n?o.eJ.Granted:o.eJ.NotDetermined)}catch{this.logger.error('An error occurred enumerating devices. Setting access status to "granted"'),this.updatePermissionsState(e,o.eJ.NotDetermined)}}};var p=a(0x1da5e2fd),h=a(0x1ec68d6a3);let _="device-permissions-state";let DevicePermissionsManager=class DevicePermissionsManager{isSSB=(0,l.y3)();logger=(0,h.Wo)({label:"DEVICE-PERMISSIONS-MANAGER"});permissionsStrategy;initialized=!1;config;init=(0,n.A)(async()=>{this.logger.info("Initializing media device permissions manager"),this.initialized=!0,this.permissionsStrategy=this.getStrategy(),setTimeout(this.refreshAllPermissions,5e3),this.logger.info("Scheduled permissions refresh")});canAccessMediaResource=e=>this.permissionsStrategy?.canAccessMediaResource?this.permissionsStrategy.canAccessMediaResource(e):{isAvailable:!!this.config?.isElectronApiAvailable,status:o.eJ.Granted};requestMediaAccess=async e=>this.config?.isElectronApiAvailable?this.permissionsStrategy.requestMediaAccess(e):(this.logger.warn("Permissions strategy not available"),{isAvailable:!1,isGranted:!0});getStrategy=()=>{let e={initialState:this.readPermissionsFromLocalStorage()||getInitialPermissionsState(),isElectronApiAvailable:this.isSSB&&(0,l.cX)(),onPermissionsChange:this.onPermissionsChange,logger:this.logger};return(this.config=e,(0,l.y3)())?(this.logger.info("Using desktop device permissions strategy"),new DesktopDevicePermissions(e)):(0,l.gm)()?(this.logger.info("Using Firefox device permissions strategy"),new FirefoxDevicePermissions(e)):this.shouldUsePermissionsApi()?(this.logger.info("Using browser device permissions strategy"),new BrowserDevicePermissions(e)):(this.logger.info("Using default device permissions strategy"),new DefaultDevicePermissions(e))};onPermissionsChange=e=>{this.logger.info("Permissions changed",e),(0,p.pq)(),this.savePermissionsToLocalStorage(e)};refreshAllPermissions=async()=>{this.logger.info("Refreshing all permissions");try{await navigator.mediaDevices.enumerateDevices(),await this.refreshPermissions(c.mT.MICROPHONE),await this.refreshPermissions(c.mT.CAMERA),await this.refreshPermissions(c.mT.SCREEN)}catch(e){this.logger.warn("An error occurred while refreshing device permissions",e)}};refreshPermissions=async e=>{this.logger.debug(`Refreshing ${e} permissions`);try{await (0,i.nD)(()=>{this.permissionsStrategy.refreshDevicePermissionStatus(e)},{priority:"background"})}catch(t){this.logger.warn(`An error occurred while trying to check ${e} permissions`,t)}};shouldUsePermissionsApi=()=>!this.isSSB&&!(0,l.gm)()&&"permissions"in r.J.navigator;clearAllPermissions=()=>{this.initialized&&this.savePermissionsToLocalStorage(getInitialPermissionsState())};isPersistedStateTrustworthy(e){return!(!e||Date.now()-e>6048e5)}savePermissionsToLocalStorage(e){try{let t={permissions:e,timestamp:Date.now()},a=JSON.stringify(t);localStorage.setItem(_,a),this.logger.info(`Permissions saved to local storage: ${a}`)}catch(e){this.logger.error("Error saving permissions to local storage",e)}}readPermissionsFromLocalStorage(){try{let e=localStorage.getItem(_);if(e){this.logger.info(`Permissions loaded from local storage ${e}`);let t=JSON.parse(e);if(!this.isPersistedStateTrustworthy(t?.timestamp))return this.logger.warn("Permissions not considered trustworthy. Requiring refresh"),null;return t.permissions}}catch(e){this.logger.error("Error reading permissions from local storage",e)}return null}};let f=new DevicePermissionsManager},0x1b30ff524:(e,t,a)=>{"use strict";a.d(t,{C8:()=>getDevicePermissionStatusForCamera,EA:()=>getDevicePermissionStatusForScreenshare,PG:()=>getDevicePermissionStatusForMicrophone,gC:()=>arePermissionsGrantedForInputDevices});var n=a(0x1c6b56d20),r=a(0x152e2322a),i=a(0xc67f3d80);function arePermissionsGrantedForInputDevices(){return getIsMicrophonePermissionGranted()||getIsCameraPermissionGranted()}function getIsMicrophonePermissionGranted(){return r.Ay.canAccessMediaResource(i.mT.MICROPHONE).status===n.eJ.Granted}function getIsCameraPermissionGranted(){return r.Ay.canAccessMediaResource(i.mT.CAMERA).status===n.eJ.Granted}function getDevicePermissionStatusForMicrophone(){return getDevicePermissionStatus(i.mT.MICROPHONE)}function getDevicePermissionStatusForCamera(){return getDevicePermissionStatus(i.mT.CAMERA)}function getDevicePermissionStatusForScreenshare(){return getDevicePermissionStatus(i.mT.SCREEN)}function getDevicePermissionStatus(e){let t=r.Ay.canAccessMediaResource(e);return void 0===t.status?n.eJ.Unknown:t.status}},0x2529f534e:(e,t,a)=>{"use strict";let n;a.d(t,{S:()=>c,p:()=>getDeviceChangeTracker});var r,i=a(0x1f355b555),l=a(0x1c6b56d20),o=a(0x1ad140cce),s=a(0x120e75720),c=((r={}).InputTrackHandler="inputTrackHandler",r.CameraPreviewV2="cameraPreviewV2",r.CameraPreviewV1="cameraPreviewV1",r.JoinPreviewCamera="joinPreviewCamera",r.AudioOutSettingsMenuItems="audioOutSettingsMenuItems",r.CameraSettingsMenuItems="cameraSettingsMenuItems",r.MicSettingsMenuItems="micSettingsMenuItems",r.TroubleshootingPanelDeviceSelector="troubleshooting-panel-device-selector",r.ClipsVideoRecorderSettingsMenu="clips-video-recorder-settings-menu",r.AudioAndVideoPreferences="audio-and-video-preferences",r);let d={inputTrackHandler:"auto",cameraPreviewV2:"userInitiated",cameraPreviewV1:"userInitiated",joinPreviewCamera:"userInitiated",audioOutSettingsMenuItems:"userInitiated",cameraSettingsMenuItems:"userInitiated",micSettingsMenuItems:"userInitiated","troubleshooting-panel-device-selector":"userInitiated","clips-video-recorder-settings-menu":"userInitiatedOutOfHuddle","audio-and-video-preferences":"userInitiatedOutOfHuddle"},m=class{deviceChanges=[];huddleStartTime=null;audioInputDevicesChangedAtStartOfHuddleCount=0;audioOutputDevicesChangedAtStartOfHuddleCount=0;videoInputDevicesChangedAtStartOfHuddleCount=0;trackDeviceChange(e,t,a){try{let n={deviceId:e,deviceType:t,source:a,timestamp:Date.now()};this.deviceChanges.push(n),this.huddleStartTime&&"userInitiated"===d[a]&&n.timestamp-this.huddleStartTime<=6e4&&this.incrementDeviceChangeCount(t),o.Ay.info("Device change tracked:",{...n})}catch(e){o.Ay.warn("Problem tracking device change:",e)}}incrementDeviceChangeCount(e){switch(e){case l.lW.Microphone:this.audioInputDevicesChangedAtStartOfHuddleCount+=1;break;case l.lW.Camera:this.videoInputDevicesChangedAtStartOfHuddleCount+=1;break;case l.Q4:this.audioOutputDevicesChangedAtStartOfHuddleCount+=1}}setHuddleStarted(){this.huddleStartTime&&(o.Ay.warn("Huddle start time already set"),this.reset()),this.huddleStartTime=Date.now()}setHuddleEnded(){try{this.logDeviceChangesForHuddle(),this.reset()}catch(e){o.Ay.warn("Problem encountered with device change tracker tear down",e)}}getDeviceChangeCountsAtStartOfHuddle(){return{audioInputDevicesChangedAtStartOfHuddleCount:this.audioInputDevicesChangedAtStartOfHuddleCount,audioOutputDevicesChangedAtStartOfHuddleCount:this.audioOutputDevicesChangedAtStartOfHuddleCount,videoInputDevicesChangedAtStartOfHuddleCount:this.videoInputDevicesChangedAtStartOfHuddleCount}}logDeviceChangesForHuddle(){if(!this.deviceChanges.length)return void o.Ay.info("No device changes recorded for this huddle");let e=new s.M(["Device ID","Type","Source","Category","Time Since Start (s)","Time"]);this.deviceChanges.forEach(t=>{let a=this.huddleStartTime?Math.round((t.timestamp-this.huddleStartTime)/1e3):"N/A",n=(0,i.Ay)(t.timestamp).format("HH:mm:ss"),r=d[t.source];e.add([t.deviceId,t.deviceType,t.source,r,String(a),n])}),o.Ay.info(`Device changes during huddle:
${e.report()}`),o.Ay.info("Device change counts at start of the huddle:",{audioInputDevicesChangedAtStartOfHuddleCount:this.audioInputDevicesChangedAtStartOfHuddleCount,audioOutputDevicesChangedAtStartOfHuddleCount:this.audioOutputDevicesChangedAtStartOfHuddleCount,videoInputDevicesChangedAtStartOfHuddleCount:this.videoInputDevicesChangedAtStartOfHuddleCount})}reset(){this.deviceChanges=[],this.huddleStartTime=null,this.audioInputDevicesChangedAtStartOfHuddleCount=0,this.audioOutputDevicesChangedAtStartOfHuddleCount=0,this.videoInputDevicesChangedAtStartOfHuddleCount=0}getTags(){return{audioInputDevicesChangedAtStartOfHuddleCount:this.audioInputDevicesChangedAtStartOfHuddleCount,audioOutputDevicesChangedAtStartOfHuddleCount:this.audioOutputDevicesChangedAtStartOfHuddleCount,videoInputDevicesChangedAtStartOfHuddleCount:this.videoInputDevicesChangedAtStartOfHuddleCount}}},getDeviceChangeTracker=()=>(n||(n=new m),n)},0x1da5e2fd:(e,t,a)=>{"use strict";let n;a.d(t,{$S:()=>getDeviceRecordStats,_o:()=>getPreferredAudioSinkId,Nj:()=>getPreferredDeviceOfType,ty:()=>getPrioritizedDeviceListOfType,T5:()=>getPrioritizedDeviceLists,Zy:()=>initializeDevicePreferences,G0:()=>isDevicePreferencesManagerInitialized,pq:()=>refreshDeviceListsOnDevicePermissionsUpdate,cT:()=>reportDeviceSelected,i_:()=>reportDeviceUsed,es:()=>waitForDeviceListUpdate});var r,i=a(0x83598c13),l=a(0x1c6b56d20),o=((r={}).Microphone="audioinput",r.Camera="videoinput",r.Speakers="audiooutput",r);let s="default",c="communications",d={videoinput:void 0,audioinput:s,audiooutput:s},mapDeviceTypeToDeviceKind=e=>({[l.lW.Microphone]:o.Microphone,[l.lW.Camera]:o.Camera,[l.Q4]:o.Speakers})[e],mapMediaDeviceInfoArrayToInputDevices=e=>e.map(e=>{let t;return t=e.kind===o.Microphone?l.lW.Microphone:l.lW.Camera,{id:e.deviceId,label:e.label,groupId:e.groupId,type:t,track:void 0}}),mapMediaDeviceInfoArrayToOutputDevices=e=>e.map(e=>({id:e.deviceId,label:e.label,groupId:e.groupId,type:l.Q4}));var m=a(0x2529f534e),u=a(0x1ad140cce),p=a(0xe1870af4),h=a(0x17294c72a),_=a(0x6258badf),f=a(0xf4930165),b=a(0x18f2150ea),g=a(0x178533105),y=a(0x1e2051844);let A=["ZoomAudioDevice (Virtual)"],x=["default","communications"],removeDeviceFingerprintFromLabel=e=>e?e.replace(/ *?\([a-zA-Z0-9]{4}:[a-zA-Z0-9]{4}\) *?/g,""):e,generateDeviceKey=(e,t)=>`${e}-${t}`,E="version",C={1:e=>e,2:e=>(0,f.A)(e,e=>{if((0,b.A)(e))return e;let t={...e},a=removeDeviceFingerprintFromLabel(e.deviceLabel);return a&&a!==e.deviceLabel&&(t.deviceLabel=a),t}),3:e=>(0,g.A)(e,(t,a,n)=>{if(!x.includes(n)&&n!==E){let r=(0,y.A)(e,(e,t)=>x.includes(t)&&e.deviceInfo.kind===a.deviceInfo.kind&&e.deviceInfo.groupId===a.deviceInfo.groupId&&e.deviceInfo.label.includes(a.deviceInfo.label));r&&((!a.used&&r.used||a.used&&r.used&&a.used<r.used)&&(a.used=r.used),(!a.selected&&r.selected||a.selected&&r.selected&&a.selected<r.selected)&&(a.selected=r.selected)),t[n]=a}return t},{}),4:e=>(0,g.A)(e,(e,t,a)=>{if((0,b.A)(t))e[a]=t;else{let{deviceId:a,kind:n}=t.deviceInfo;e[generateDeviceKey(a,n)]=t}return e},{})},k="device-selection-records",v=u.Ay;let DeviceSelectionRecordsStore=class DeviceSelectionRecordsStore{records={};init=()=>{this.initFromLocalStorage(),this.printRecords()};hasRecordForDevice(e){return!!this.getRecord(e)}getAllRecordsForTesting=()=>({...this.records});getFormattedLabelForRecord(e){let t=this.getRecord(e);return t?.deviceLabel}getDeviceInfoForRecord=e=>{let t=this.getRecord(e);if(t)return{...t.deviceInfo}};wasDeviceSelected(e){let t=this.getRecord(e);return!!t?.selected}wasDeviceUsed(e){let t=this.getRecord(e);return!!t?.used}createRecord(e){let t=this.createEmptyDeviceSelectionRecord(e);if(t.deviceLabel){let a=this.findExistingRecordByLabel(e,t.deviceLabel);if(a){u.Ay.info(`Matching device record found for label: ${a.deviceLabel} ${a.deviceInfo.deviceId}`),this.removeRecord(a.deviceInfo),this.setRecord(e,{...a,deviceInfo:e});return}}this.setRecord(e,t)}updateDeviceUsed(e){let t=this.getRecord(e);t&&(u.Ay.info(`Removing device selection record for used device ${e.deviceId}`),this.setRecord(e,{...t,used:Date.now()}))}updateDeviceSelected(e){let t=this.getRecord(e);t&&(u.Ay.info(`Updating device selection record for selected device ${e.deviceId}`),this.setRecord(e,{...t,selected:Date.now()}))}sortDevicesByLastSelection=e=>(0,p.A)(e,e=>this.records[generateDeviceKey(e.deviceId,e.kind)]?.selected,"desc");sortDevicesByLastUsed=e=>(0,p.A)(e,e=>this.records[generateDeviceKey(e.deviceId,e.kind)]?.used,"desc");sortDevicesByLabel=e=>(0,h.A)(e,e=>e.label);updateDeviceLabel(e){this.getRecord(e)&&u.Ay.info(`Updating device selection record for label ${e.label} ${e.deviceId}`)}updateDeviceInfo(e){let t=this.getRecord(e);t&&(u.Ay.debug(`Updating device selection record for device info ${e.label} ${e.deviceId}`),this.setRecord(e,{...t,deviceLabel:e.label,deviceInfo:e}))}persistToLocalStorage(){u.Ay.info("Persisting device selection records to local storage");var e=this.records;if(e){v.debug("Writing device selection history to local storage",e);try{let t={...e,[E]:4};localStorage.setItem(k,JSON.stringify(t))}catch(e){v.error("Failed to write device selection history to local storage",e)}}}printRecords=()=>{u.Ay.info("Device selection records:",this.records)};getAllRecordsForInitializationAnalyses=()=>(u.Ay.info("Returning all records for initialization analyses"),this.records);initFromLocalStorage(){this.records=(()=>{let e;try{let t=localStorage.getItem(k);t?(e=JSON.parse(t),4!==e[E]?(v.debug(`Migration needed for device selection history from ${e[E]} to 4`),e=(e=>{if(!C[4])throw Error("No migration found for version 4");let t=e[E]||0;if(4===t)return e;let a={...e};for(let e=t;e<4;e++){let t=e+1;(a=(0,C[t])(a))[E]=t}return a})(e)):v.debug("No migration needed for device selection history")):e=void 0}catch(t){v.error("Failed to read device selection history from local storage",t),e=void 0}return v.debug("Reading device selection history from local storage",e),e?(0,_.A)(e,E):void 0})()||{},u.Ay.info("Initializing device preferences manager from local storage")}setRecord(e,t){let{deviceId:a,kind:n}=e,r=generateDeviceKey(a,n);u.Ay.debug(`Setting device selection record for ${r}`,t),this.records[r]=t}getRecord({deviceId:e,kind:t}){let a=generateDeviceKey(e,t);return this.records[a]}removeRecord(e){let{deviceId:t,kind:a}=e,n=generateDeviceKey(t,a);u.Ay.info(`Removing device selection record for ${n}`),delete this.records[n]}createEmptyDeviceSelectionRecord=e=>({deviceInfo:e,deviceLabel:e.label,selected:null,used:null});findExistingRecordByLabel(e,t){return Object.values(this.records).find(a=>a.deviceLabel===t&&a.deviceInfo.kind===e.kind)}};let getDeviceSelectionRecordStore=()=>(n||(n=new DeviceSelectionRecordsStore),n);var S=a(0x1cbdfeceb),I=a(0xe0376d2),w=a(0x839ba347),T=a(0x2286acf6c),N=a(0xd6ba6894),M=a(0x20482ad21);let R="preferred-media-devices",P=getDeviceSelectionRecordStore(),getPreferredDevicesFromLocalStorage=()=>{try{let e=localStorage.getItem(R);if(!e){u.Ay.info("No preferred devices found in local storage. Detecting preferences from selection records"),P.init();let e=(0,p.A)(P.getAllRecordsForTesting(),"selected",["desc"]),findMostRecentDevice=t=>{let a=e.find(e=>e.selected&&e.deviceInfo?.kind===t);if(a?.deviceInfo?.deviceId||t!==o.Camera)return a?.deviceInfo?.deviceId||s};return{[o.Camera]:findMostRecentDevice(o.Camera),[o.Microphone]:findMostRecentDevice(o.Microphone)||s,[o.Speakers]:findMostRecentDevice(o.Speakers)||s}}let t=JSON.parse(e);return t[o.Camera]===s&&(t[o.Camera]=void 0),t}catch(e){u.Ay.error("Error getting preferred devices from local storage",e)}return d},setPreferredDevicesInLocalStorage=e=>{try{let t=JSON.stringify(e);localStorage.setItem(R,t)}catch(e){u.Ay.error("Error setting preferred devices in local storage",e)}},L=[500,750,1e3],isValidEnumerateDeviceList=e=>!!e&&0!==e.length&&e.some(e=>!!e.deviceId),attemptFetchEnumerateDevices=async e=>{if(e>0){let t,a=(t=e-1)<0||t>=L.length?L[L.length-1]:L[t];u.Ay.info(`Retry attempt ${e} for enumerateDevices with ${a}ms delay`),await new Promise(e=>{setTimeout(e,a)})}let t=await N.J.navigator.mediaDevices.enumerateDevices(),a=isValidEnumerateDeviceList(t);return a?u.pL.info(`Valid device list obtained. Attempts: ${e}`):t&&0!==t.length||u.pL.warn(`Invalid device list returned (attempts ${e})`),{devices:t,isValid:a,attempts:e}},runDeviceEnumerationRetrySequence=(e,t)=>t.isValid||e>=3?Promise.resolve(t):attemptFetchEnumerateDevices(e).then(t=>t.isValid?t:runDeviceEnumerationRetrySequence(e+1,t)),enumerateDevicesWithRetry=async()=>{try{u.Ay.info("Starting device enumeration with retry");let e=await attemptFetchEnumerateDevices(0);if(e.isValid)return e;return await runDeviceEnumerationRetrySequence(1,e)}catch(e){return u.pL.error("Error during device enumeration with retry",e),{devices:[],isValid:!1}}};var O=a(0x691ce3ab),D=a(0x1266f1359),F=a(0x9139def),U=a(0x1750f634e),B=a(0x36b4a164),H=a(0xf9cb31c6);let W=new M.Ay("device-preferences");let DevicePreferencesManager=class DevicePreferencesManager{dispatch;preferredDevices=d;teamId=null;availableDevices=null;osDefaultDeviceIds=d;updatingAvailableDevicesPromise=null;logger=u.Ay;devicePreferencesCallLogger=u.pL;noPrefsOnBoot=!1;experimentHuddlesEnumerateDevicesRetryGroupOn=!1;experimentHuddlesNativeDeviceCallOnEmptyDevicesGroupOn=!1;experimentHuddlesDevicePreferredLabelGroupOn=!1;init=async({teamId:e,experimentHuddlesEnumerateDevicesRetryGroupOn:t,experimentHuddlesNativeDeviceCallOnEmptyDevicesGroupOn:a,experimentHuddlesDevicePreferredLabelGroupOn:n})=>{this.teamId=e,this.experimentHuddlesEnumerateDevicesRetryGroupOn=t,this.experimentHuddlesNativeDeviceCallOnEmptyDevicesGroupOn=a,this.experimentHuddlesDevicePreferredLabelGroupOn=n,this.logger.info("Using device preferences manager"),this.noPrefsOnBoot=(()=>{try{let e=!localStorage.getItem(R);return e&&u.Ay.info("No preferred devices found in local storage."),e}catch(e){u.Ay.error("Error checking if no preferred devices in local storage",e)}return!0})(),this.preferredDevices=getPreferredDevicesFromLocalStorage()||d,this.logger.debug("Preferred devices loaded from local storage",this.preferredDevices),this.dispatch=(0,D.oK)(this.teamId).dispatch,await this.updateAvailableDevices(),this.maybeSetInitialDevicePrefToOSDefault(),this.updateDeviceListChangeHandler(),this.logger.info("Device preferences manager initialized")};recordDeviceUsed=(e,t)=>(0,S.A)();recordDeviceSelected=(e,t)=>{(this.logger.info(`Recording selected ${t} device: ${e}`),this.preferredDevices)?this.preferredDevices[t]!==e||this.reduxDeviceStoreNeedsUpdate(t)?(this.preferredDevices[t]=e,setPreferredDevicesInLocalStorage(this.preferredDevices),this.availableDevices&&this.experimentHuddlesDevicePreferredLabelGroupOn&&this.scrubDeviceLabels(),this.propagateUpdateToExternalStores(t)):this.logger.info(`Device ${e} already selected. No action taken.`):this.devicePreferencesCallLogger.warn(`preferred Devices does not exist skipping recording selected device for ${t} device: ${e}`)};getPrioritizedDeviceListOfType=e=>{if(!this.availableDevices)return this.devicePreferencesCallLogger.warn(`available Devices does not exist skipping getting prioritized device list for ${e}`),[];let t=[],a=this.preferredDevices[e],n=this.findDeviceByKindAndId(e,a),r=this.findDeviceByKindAndId(e,s);n&&t.push(n),r&&t.push(r);let i=this.experimentHuddlesDevicePreferredLabelGroupOn?this.availableDevices.filter(t=>(t.deviceId!==c||t.kind!==e)&&!(!t.label||A.includes(t.label))&&t.kind===e):this.availableDevices.filter(t=>t.kind===e&&t.deviceId!==c);return i.sort((e,t)=>e.label.localeCompare(t.label)),(0,I.A)([...t,...i]).filter(Boolean)};getPreferredDeviceOfType(e){return this.availableDevices?this.getPrioritizedDeviceListOfType(e)[0]:void this.devicePreferencesCallLogger.warn(`available Devices does not exist skipping getting preferred device for ${e}`)}handleDeviceListChange=async()=>{try{this.logger.info(`Device list change event received at ${Date.now()}`),await this.updateAvailableDevices()}catch(e){this.devicePreferencesCallLogger.error("Error handling device list change event",e)}};updateDeviceListChangeHandler=()=>{N.J.navigator.mediaDevices.removeEventListener("devicechange",this.handleDeviceListChange),N.J.navigator.mediaDevices.addEventListener("devicechange",this.handleDeviceListChange),this.logger.info("Device list change handler updated")};maybeSetInitialDevicePrefToOSDefault=()=>{if(this.noPrefsOnBoot){let e=this.osDefaultDeviceIds;if(!e)return void this.devicePreferencesCallLogger.warn("OS default device IDs do not exist skipping maybe setting initial device pref to OS default");(0,w.A)(this.preferredDevices,(t,a)=>{t===e[a]&&a!==o.Camera&&(this.logger.info(`Preferred ${a} device matches OS default. Updating to OS default`),this.recordDeviceSelected(s,a))})}};processAvailableDevices=()=>{this.availableDevices&&(this.logger.info("Processing device list",this.availableDevices),this.validatePreferredDevices(),this.recordOSDefaultDeviceIds(),this.experimentHuddlesDevicePreferredLabelGroupOn&&(this.preferredDevices=getPreferredDevicesFromLocalStorage()||this.preferredDevices),this.scrubDeviceLabels(),this.propagateUpdateToExternalStores(),this.logger.info("Device list processing complete"))};handleInvalidDeviceList=async()=>{this.experimentHuddlesNativeDeviceCallOnEmptyDevicesGroupOn&&(this.devicePreferencesCallLogger.warn("Invalid device list detected - Native Device API call on empty devices group experiment enabled"),await (0,i.L)().logAllNativeDeviceDetails(!0))};updateAvailableDevicesOriginal=async e=>{try{this.logger.info("Updating available devices (original flow)");let t=await N.J.navigator.mediaDevices.enumerateDevices(),a=isValidEnumerateDeviceList(t);this.logger.info("Device list validation result:",a),a||await this.handleInvalidDeviceList(),this.availableDevices=t,this.logger.info("Device list updated",this.availableDevices),this.processAvailableDevices(),e()}catch(t){this.devicePreferencesCallLogger.error("Error updating available devices",t),e()}finally{this.updatingAvailableDevicesPromise=null}};updateAvailableDevicesWithRetry=e=>{this.logger.info("Updating available devices (with retry)"),enumerateDevicesWithRetry().then(t=>{this.availableDevices=t.devices||[],t.isValid?this.logger.info("Device list updated successfully"):this.logger.error("Failed to get valid device list after all retries"),this.processAvailableDevices(),e()}).catch(t=>{this.devicePreferencesCallLogger.error("Error updating available devices with retry",t),e()}).finally(()=>{this.updatingAvailableDevicesPromise=null})};updateAvailableDevices=async()=>{if(this.updatingAvailableDevicesPromise)return this.devicePreferencesCallLogger.info("Available devices update already in progress. Returning existing promise."),this.updatingAvailableDevicesPromise;let e=this.experimentHuddlesEnumerateDevicesRetryGroupOn?this.updateAvailableDevicesWithRetry:this.updateAvailableDevicesOriginal;return this.updatingAvailableDevicesPromise=new Promise(e),this.updatingAvailableDevicesPromise};waitForDeviceListUpdate=async()=>{await this.updateAvailableDevices()};refreshAvailableDevices=async()=>{await this.updateAvailableDevices()};validatePreferredDevices(){if(!this.availableDevices)return void this.devicePreferencesCallLogger.info("skipping validating preferred devices because available devices do not exist");let e=new Set(this.availableDevices.map(e=>e.deviceId));Object.entries(this.preferredDevices).forEach(([t,a])=>{e.has(a)||t===o.Camera||(this.logger.warn(`Preferred ${t} device (${a}) not found. Resetting to OS default.`),this.preferredDevices[t]=s)}),this.logger.debug("Preferred devices validated",this.preferredDevices)}recordOSDefaultDeviceIds(){this.availableDevices?(this.availableDevices.forEach(e=>{if(e.deviceId===s){let t=this.availableDevices?.find(t=>t.deviceId!==s&&t.groupId===e.groupId&&t.kind===e.kind&&e.label.includes(t.label));t?.deviceId&&this.osDefaultDeviceIds&&(this.osDefaultDeviceIds[e.kind]=t.deviceId,this.logger.info(`Recorded OS default device for ${e.kind}: ${t.deviceId}`))}}),this.logger.debug("OS default device IDs recorded",this.osDefaultDeviceIds)):this.devicePreferencesCallLogger.info("available Devices does not exist skipping recording OS default device IDs")}scrubDeviceLabels(){let e=(0,D.oK)(this.teamId).getState(),t=(0,H.ZN)(e),a=this.availableDevices,n=this.experimentHuddlesDevicePreferredLabelGroupOn,r=!this.experimentHuddlesDevicePreferredLabelGroupOn&&!this.osDefaultDeviceIds;a&&!r&&(this.availableDevices=a.map(e=>{let a=e.originalLabel||e.label,r=removeDeviceFingerprintFromLabel(a)||"Unknown Device";if(this.experimentHuddlesDevicePreferredLabelGroupOn){let t,i=(t=e.deviceId,x.includes(t)),l=this.preferredDevices[e.kind]===e.deviceId,o=r;if(i&&e.deviceId===s&&this.osDefaultDeviceIds){let t=this.osDefaultDeviceIds[e.kind],a=this.findDeviceByKindAndId(e.kind,t);a&&(o=removeDeviceFingerprintFromLabel(a.originalLabel||a.label)||r)}let c=o;return l&&i?c=n?W.t("{deviceName} (System Default) (Preferred)",{deviceName:o,__react:!0}):"":l?c=n?W.t("{deviceName} (Preferred)",{deviceName:o,__react:!0}):"":i&&(c=W.t("{deviceName} (System Default)",{deviceName:o,__react:!0})),{groupId:e.groupId,kind:e.kind,deviceId:e.deviceId,label:c,originalLabel:a}}if(e.deviceId===s){let a=this.osDefaultDeviceIds?.[e.kind],n=this.findDeviceByKindAndId(e.kind,a);if(a&&n){let a=removeDeviceFingerprintFromLabel(n.label),r=t?W.t("{deviceName} (System Default)",{deviceName:a,__react:!0}):W.t("System Default ({deviceName})",{deviceName:a,__react:!0});return this.logger.info(`Amending label for OS default ${e.kind} device: ${e.label} -> ${r}`),{groupId:e.groupId,kind:e.kind,deviceId:s,label:r}}}return{groupId:e.groupId,kind:e.kind,deviceId:e.deviceId,label:r}}),this.logger.debug("Device labels scrubbed",this.availableDevices))}findDeviceByKindAndId(e,t){return this.availableDevices?.find(a=>a.kind===e&&a.deviceId===t)}reduxDeviceStoreNeedsUpdate=e=>{let t=(0,D.oK)(this.teamId).getState();return({[o.Microphone]:(0,U.I7)(t)?.id,[o.Camera]:(0,U.Ls)(t)?.id,[o.Speakers]:(0,U.QM)(t)?.id})[e]!==this.preferredDevices[e]};propagateUpdateToExternalStores=(0,T.A)(e=>{setPreferredDevicesInLocalStorage(this.preferredDevices),this.logger.info("Propagating device selection history update"),this.dispatch((0,F.Fb)(void 0)),this.updateDevicesInHuddle(e)},300);updateDevicesInHuddle=e=>{let maybeApplyPreference=t=>{let a=this.getPreferredDeviceOfType(t)?.deviceId;if(!a)return void this.devicePreferencesCallLogger.warn(`preferred device for ${t} does not exist skipping setting preferred device in huddle`);(t!==o.Camera||e)&&((0,O.dispatchForClientStore)((0,B._Z)({id:a,type:t===o.Microphone?l.lW.Microphone:t===o.Camera?l.lW.Camera:t===o.Speakers?l.Q4:l.lW.Microphone})),this.logger.info(`Setting preferred ${t} device in huddle`,a))};e?maybeApplyPreference(e):(maybeApplyPreference(o.Microphone),maybeApplyPreference(o.Speakers),maybeApplyPreference(o.Camera))}};let V=new DevicePreferencesManager;var G=a(0x7b0b485);let q=null,j=V,z=null,initializeDevicePreferences=async({teamId:e,experimentHuddlesEnumerateDevicesRetryGroupOn:t,experimentHuddlesNativeDeviceCallOnEmptyDevicesGroupOn:a,experimentHuddlesDevicePreferredLabelGroupOn:n})=>{if(!e||q===e)return;let r=(0,O.Ry)();(0,G.ad)(r)?u.pL.info("User is already in a huddle, not re-initializing device preferences manager"):(u.pL.info(`Initializing device preferences manager with teamId: ${e}`),q=e,j=V,await j.init({teamId:e,experimentHuddlesEnumerateDevicesRetryGroupOn:t,experimentHuddlesNativeDeviceCallOnEmptyDevicesGroupOn:a,experimentHuddlesDevicePreferredLabelGroupOn:n}),z=(()=>{try{u.Ay.info("Analyzing stored device records");let e=getDeviceSelectionRecordStore().getAllRecordsForInitializationAnalyses(),t={totalRecords:Object.keys(e).length,webAudioDevices:0,webAudioSelectedDevices:0,webAudioUsedDevices:0,microphoneCount:0,speakerCount:0,cameraCount:0};return Object.values(e).forEach(e=>{switch(e.deviceInfo.kind){case o.Microphone:t.microphoneCount+=1;break;case o.Speakers:t.speakerCount+=1;break;case o.Camera:t.cameraCount+=1}e.deviceInfo.deviceId.startsWith("WebAudio-")&&(t.webAudioDevices+=1,e.selected&&(t.webAudioSelectedDevices+=1),e.used&&(t.webAudioUsedDevices+=1))}),u.Ay.info("Device selection records analysis:",t),t.webAudioDevices>0&&u.Ay.warn(`Webaudio device records found: total=${t.webAudioDevices}, selected=${t.webAudioSelectedDevices}, used=${t.webAudioUsedDevices}`),t}catch(e){return u.Ay.warn("Error analyzing device records:",e),{totalRecords:0,webAudioDevices:0,webAudioSelectedDevices:0,webAudioUsedDevices:0,microphoneCount:0,speakerCount:0,cameraCount:0}}})(),u.pL.info("Device preferences manager initialized"))},reportDeviceUsed=(e,t)=>{if(!q)return;let a=mapDeviceTypeToDeviceKind(t);j.recordDeviceUsed(e,a)},reportDeviceSelected=(e,t,a)=>{if(!q)return void u.pL.warn("reportDeviceSelected called but teamId is not initialized");if(e.startsWith("WebAudio-"))return void u.pL.warn(`Skipping save of WebAudio deviceId to preferences: ${e}. This should never happen. Keep log for tracking if regression is introduced.`);let n=mapDeviceTypeToDeviceKind(t);(0,m.p)().trackDeviceChange(e,t,a),j.recordDeviceSelected(e,n),t===l.lW.Microphone&&(0,i.L)().checkForMicrophoneDeviceIssues(e)},getPrioritizedDeviceLists=()=>{if(!q)return;let e=j.getPrioritizedDeviceListOfType(o.Microphone)||[],t=j.getPrioritizedDeviceListOfType(o.Camera)||[],a=j.getPrioritizedDeviceListOfType(o.Speakers)||[];return{[l.lW.Microphone]:mapMediaDeviceInfoArrayToInputDevices(e),[l.lW.Camera]:mapMediaDeviceInfoArrayToInputDevices(t),[l.Q4]:mapMediaDeviceInfoArrayToOutputDevices(a)}},refreshDeviceListsOnDevicePermissionsUpdate=async()=>{q&&await j.refreshAvailableDevices()},getPrioritizedDeviceListOfType=e=>{if(!q)return;let t=mapDeviceTypeToDeviceKind(e),a=j.getPrioritizedDeviceListOfType(t);return e===l.Q4?mapMediaDeviceInfoArrayToOutputDevices(a):mapMediaDeviceInfoArrayToInputDevices(a)},getPreferredDeviceOfType=e=>{let t;if(!q)return;let a=mapDeviceTypeToDeviceKind(e),n=j.getPreferredDeviceOfType(a);return n?(u.$e.debug(`Returning preferred ${e} device`,n.deviceId),n.kind===o.Speakers?{id:n.deviceId,label:n.label,groupId:n.groupId,type:l.Q4}:(t=n.kind===o.Microphone?l.lW.Microphone:n.kind===o.Camera?l.lW.Camera:l.lW.Microphone,{id:n.deviceId,label:n.label,groupId:n.groupId,type:t,track:void 0})):void u.pL.warn(`No preferred device found for type ${e}. Returning undefined. If this happens, the user will likely report that their device is not working. They may also have revoked or not given permission to use the device.`)},waitForDeviceListUpdate=async()=>{q&&await j.waitForDeviceListUpdate()},getPreferredAudioSinkId=()=>getPreferredDeviceOfType(l.Q4)?.id||"default",getDeviceRecordStats=()=>z,isDevicePreferencesManagerInitialized=()=>!!q},0x1ad140cce:(e,t,a)=>{"use strict";a.d(t,{$e:()=>i,Ay:()=>o,pL:()=>l});var n=a(0xf8dd7f80),r=a(0x6a506842);let i=(0,n.getGenericLogger)({label:"DEVICE-PREFS"}),l=(0,r.tZ)("DEVICE-PREFS"),o=i},0x18eb54473:(e,t,a)=>{"use strict";a.d(t,{k:()=>FreeWillyLogger});var n=a(0x13d856742),r=a(0x4f6e90b4),i=a(0x14466d83e),l=a(0x6a506842);let o={debug:0,info:1,warn:2,error:3,action:0};let FreeWillyLogger=class FreeWillyLogger{static debugLogsEnabled=!1;name;level;consoleLogger;callLogger;constructor(e,t){this.name=e,this.level=t||o[(0,n.XM)()],this.consoleLogger=(0,l.Cc)(e),this.callLogger=(0,l.Jt)(e)}debug(e){if(!(this.level>i.$b.DEBUG)&&FreeWillyLogger.debugLogsEnabled)if("string"==typeof e)this.consoleLogger.debug(e);else{let t=e();this.consoleLogger.debug(t)}}info(e){this.level>i.$b.INFO||this.consoleLogger.info(e)}warn(e){this.level>i.$b.WARN||this.consoleLogger.warn(e)}error(e){this.level>i.$b.ERROR||this.callLogger.error(e)}setLogLevel(e){this.level=e}getLogLevel(){return this.level}getName(){return this.name}};(0,r.ul)("toggleChimeDebugLogs",()=>{FreeWillyLogger.debugLogsEnabled=!FreeWillyLogger.debugLogsEnabled})},0x13967c99:(e,t,a)=>{"use strict";a.d(t,{Y:()=>FreeWillySdk});var n,r,i=a(0x6258badf),l=a(0xd6ba6894),o=a(0x18dac2b8e),s=a(0x19efc8b50),c=a(0xbe498a72),d=a(0x308014ed),m=a(0xcf98861b),u=a(0xcb734b68),p=a(0xc56ae113),h=a(0x1d25c929),_=a(0x1feee1711),f=a(0x14466d83e),b=a(0x172f8916f),g=a(0x92cac38d),y=a(0x1f4e32220),A=a(0xf2e7528e),x=a(0x839ba347),E=a(0x9b44b68b),C=a(0x30164a1e);let PeerCache=class PeerCache{observer;NO_ACTIVE_SPEAKER="none";ids=[];selfId;includeSelf=!1;includeNone=!1;cachedCallState={};cachedPeerStates={};callStateForwarder={activeSpeakerList:{updateFn:(e,t)=>{let a=e||[],n=t&&t.length?t[0]:this.NO_ACTIVE_SPEAKER;return(0,g.A)(a,[n,this.NO_ACTIVE_SPEAKER]),a.unshift(n),a},removeFn:(e,t)=>{if(e)return(0,y.A)(e,t),e},getPeerIdFn:e=>{let t=e.filter(e=>e===this.NO_ACTIVE_SPEAKER?this.includeNone:this.includeSelf||this.selfId!==this.getAttendeeId(e));if(t.length)return t[0]},forwardFn:e=>{let t=e.filter(e=>e===this.NO_ACTIVE_SPEAKER&&!!this.includeNone||this.includeSelf||this.selfId!==this.getAttendeeId(e));t.length&&t[0]!==this.NO_ACTIVE_SPEAKER?this.observer.onNewActiveSpeaker(this.selfId===t[0]?"self":t[0]):this.observer.onNewActiveSpeaker(void 0)},isCached:!0}};peerStateForwarder={isDrawEnabled:(e,t)=>{this.observer.onPeerDrawEnabled(e,t)}};constructor(e){this.observer=e}addSelf(e){this.selfId=e,this.addPeer(e)}removeSelf(e){(0,C.M)(e===this.selfId,"Bad attendeeId when removing self"),delete this.selfId,this.removePeer(e)}addPeer(e){this.ids=(0,A.A)(this.ids,[e]),(0,x.A)(this.cachedPeerStates[e],(t,a)=>{this.peerStateForwarder[a]&&!(0,_.A)(t)&&this.peerStateForwarder[a](e,t)}),delete this.cachedPeerStates[e];let t=[];(0,x.A)(this.cachedCallState,(a,n)=>{this.callStateForwarder[n]&&!(0,_.A)(a)&&this.callStateForwarder[n].getPeerIdFn(a)===e&&(this.callStateForwarder[n].forwardFn(a),this.callStateForwarder[n].isCached||t.push(n))}),this.cachedCallState=(0,i.A)(this.cachedCallState,t)}removePeer(e){(0,y.A)(this.ids,e),(0,x.A)((0,E.A)(this.cachedCallState),t=>{if(this.callStateForwarder[t]){let a=this.callStateForwarder[t].removeFn(this.cachedCallState[t],e);if(!a)return void delete this.cachedCallState[t];this.cachedCallState[t]=a}})}getPeers(){return this.ids}hasPeer(e){return this.ids.includes(e)}hasAttendee(e){return this.hasPeer(e)||e===this.selfId}updateCallState(e){(0,x.A)(e,(t,a)=>{this.callStateForwarder[a]&&(e[a]=this.callStateForwarder[a].updateFn(this.cachedCallState[a],t))}),(0,x.A)(this.callStateForwarder,(t,a)=>{this.forwardOrCacheCallState([e],a,t)})}updatePeerStates(e){(0,x.A)(this.peerStateForwarder,(t,a)=>{this.forwardOrCachePeerState(e,a,t)})}setIncludeSelfAndNoneActiveSpeaker(e,t){(e!==this.includeSelf||t!==this.includeNone)&&(this.includeSelf=e,this.includeNone=t,(0,x.A)(this.cachedCallState,(e,t)=>{this.callStateForwarder[t]&&!(0,_.A)(e)&&this.callStateForwarder[t].forwardFn(e)}))}forwardOrCachePeerState(e,t,a){e.filter(e=>!(0,_.A)(e.state[t])).map(e=>({id:e.peerId,value:e.state[t]})).forEach(({id:e,value:n})=>{this.ids.includes(e)?a(e,n):this.cachedPeerStates[e]={...this.cachedPeerStates[e],[t]:n}})}forwardOrCacheCallState(e,t,a){e.filter(e=>!(0,_.A)(e[t])).map(e=>({value:e[t]})).forEach(({value:e})=>{let n=a.getPeerIdFn(e),r=!1;n&&(this.ids.includes(n)||n===this.NO_ACTIVE_SPEAKER)?a.forwardFn(e):r=!0,(r||a.isCached)&&(this.cachedCallState={...this.cachedCallState,[t]:e})})}getAttendeeId(e){return new f.jp(e).base()}};let StaleAttendeeChecker=class StaleAttendeeChecker{timeoutMs;observer;disconnectedAttendees;timerHandle;constructor(e,t){this.timeoutMs=e,this.observer=t,this.runTimer=this.runTimer.bind(this),this.disconnectedAttendees=new Map}shutdown(){window.clearTimeout(this.timerHandle),delete this.timerHandle}addDisconnectedAttendee(e){new f.jp(e).hasModality(f.jp.MODALITY_CONTENT)||this.disconnectedAttendees.has(e)||(this.disconnectedAttendees.set(e,Date.now()+this.timeoutMs),this.maybeStartTimer())}deleteDisconnectedAttendee(e){this.disconnectedAttendees.delete(e),0===this.disconnectedAttendees.size&&(window.clearTimeout(this.timerHandle),delete this.timerHandle)}hasDisconnectedAttendee(e){return this.disconnectedAttendees.has(e)}maybeStartTimer(){if(this.timerHandle||0===this.disconnectedAttendees.size)return;let e=this.disconnectedAttendees.get([...this.disconnectedAttendees.keys()][0]);e&&(this.timerHandle=window.setTimeout(this.runTimer,Math.max(e-Date.now(),10)))}runTimer(){window.clearTimeout(this.timerHandle),delete this.timerHandle;let e=[],t=Date.now();this.disconnectedAttendees.forEach((a,n)=>{t>a&&(this.observer.onStalePeer(n),e.push(n))}),e.forEach(e=>{this.disconnectedAttendees.delete(e)}),this.maybeStartTimer()}};let WindowedActiveSpeakerPolicy=class WindowedActiveSpeakerPolicy{attendeesStates;params;static DAMPED_SWITCHING_PARAMS={slowAttackFactor:.05,fastDecayFactor:.5,noiseFloorMax:.03,analysisWindowMs:3e3};static FAST_SWITCHING_PARAMS={slowAttackFactor:.05,fastDecayFactor:.5,noiseFloorMax:.03,analysisWindowMs:300};constructor(){this.attendeesStates=new Map,this.params=WindowedActiveSpeakerPolicy.FAST_SWITCHING_PARAMS}updatePresence(e,t){t?this.attendeesStates.set(e,this.initializeState()):this.attendeesStates.delete(e)}calculateScore(e,t,a){let n=this.attendeesStates.get(e);if(!n||(null!==a&&(n.muted=a),n.muted))return 0;let r=Date.now();return t&&(n.noiseFloor=this.updateNoiseFloor(n,t),n.volumeSamples.push({timestamp:r,volume:t})),this.pruneVolumeSamples(n),this.getScore(n,r)}prioritizeVideoSendBandwidthForActiveSpeaker(){return!0}initializeState(){return{muted:!1,noiseFloor:0,volumeSamples:[]}}updateNoiseFloor(e,t){let a=e.noiseFloor;return Math.min(a=t>a?(1-this.params.slowAttackFactor)*a+this.params.slowAttackFactor*t:(1-this.params.fastDecayFactor)*a+this.params.fastDecayFactor*t,this.params.noiseFloorMax)}pruneVolumeSamples(e){let t=Date.now()-this.params.analysisWindowMs,a=e.volumeSamples;for(;a.length&&a[0].timestamp<t;)a.shift()}getScore(e,t){return e.volumeSamples.reduce((a,n)=>{let r=Math.max(1,Math.ceil((t-n.timestamp)/1e3));return a+Math.max(0,n.volume-e.noiseFloor)/r},0)}};var k=a(0x6a506842),v=a(0x2408d30fd),S=a(0x6affae29),I=a(0x62a17882),w=a(0x1059ba41d),T=a(0x4a33e69),N=a(0xc67f3d80),M=a(7854195);function getScaleFactorForCurrentZoomLevel(){switch((0,w.IXB)()){case -3:return 1/.7;case -2:return 1.25;case -1:return 1/.9;case 0:default:return 1;case 1:return 1/1.1;case 2:return .8;case 3:return 1/1.5;case 4:return 1/1.75;case 5:return .5}}function getScaledCoordinates(e,t){let[a,n]=e;return[a*t,n*t]}function convertDrawMessageToPeerMessage(e,t){let a=(0,I.y3)()&&!(0,I.dY)("4.18.0")?1/getScaleFactorForCurrentZoomLevel():1,n=e.itemId?.toString()||"",r="self"===e.itemId?t:n;switch(e.type){case N.Sl.New:case N.Sl.Edit:{let[t,n]=getScaledCoordinates(e.segment.a,a),[i,l]=getScaledCoordinates(e.segment.b,a),[o,s]=getScaledCoordinates(e.segment.c,a),[c,d]=getScaledCoordinates(e.segment.d,a);return(0,m.v)(T.e4,{itemId:r,type:e.type===N.Sl.New?T.Q7.NEW:T.Q7.EDIT,segment:{a:{x:t,y:n},b:{x:i,y:l},c:{x:o,y:s},d:{x:c,y:d}}})}case N.Sl.End:return(0,m.v)(T.e4,{itemId:r,type:T.Q7.END});case N.Sl.ChangeHue:return(0,m.v)(T.e4,{itemId:r,type:T.Q7.CHANGE_HUE,hue:e.hue});case N.Sl.Position:return(0,m.v)(T.e4,{itemId:r,type:T.Q7.POSITION,x:e.x,y:e.y});default:return(0,S.Kh)(e),(0,m.v)(T.e4,{itemId:"",type:T.Q7.END})}}function convertPeerMessageToDrawMessage(e,t){let a=e.itemId===t?"self":e.itemId;switch(e.type){case T.Q7.NEW:case T.Q7.EDIT:{let t=(0,I.y3)()&&!(0,I.dY)("4.18.0")?getScaleFactorForCurrentZoomLevel():1;return{itemId:a,type:e.type===T.Q7.NEW?N.Sl.New:N.Sl.Edit,segment:{a:[(e.segment.a.x||0)*t,(e.segment.a.y||0)*t],b:[(e.segment.b.x||0)*t,(e.segment.b.y||0)*t],c:[(e.segment.c.x||0)*t,(e.segment.c.y||0)*t],d:[(e.segment.d.x||0)*t,(e.segment.d.y||0)*t]}}}case T.Q7.END:return{itemId:a,type:N.Sl.End};case T.Q7.CHANGE_HUE:return{itemId:a,type:N.Sl.ChangeHue,hue:e.hue};case T.Q7.POSITION:return{itemId:a,type:N.Sl.Position,x:e.x,y:e.y};default:(0,C.M)("Unhandled draw message case");return}}function convertFromPeerReactionType(e){let t=M.o.Standard;return e.type&&e.type===T.Ae.Effect&&(t=M.o.Effect),e.type&&e.type===T.Ae.Gif&&(t=M.o.Gif),t}function convertToPeerReactionType(e){let t=T.Ae.Standard;return e===M.o.Effect&&(t=T.Ae.Effect),e===M.o.Gif&&(t=T.Ae.Gif),t}var R=a(0x98358620),P=a(0x1fc95ec5c);let AudioVideoFacadeSubscriber=class AudioVideoFacadeSubscriber{selfAttendeeId;audioVideoFacade;observer;videoPriorityDownlinkManager;videoUplinkManager;callLogger=(0,k.Jt)("AUDIO-VIDEO-FACADE-SUBS");consoleLog=(0,k.Cc)("AUDIO-VIDEO-FACADE-SUBS");windowedActiveSpeakerPolicy;dataChannelTopic="data-channel";staleAttendeeTimeoutMs=6e4;staleAttendeeChecker;peerCache;attendeeMuteRequestThrottleMs=1e4;attendeeMuteRequestMaxAllowed=50;attendeeMuteRequests={};activeAttendeeIds=new Set;constructor(e,t,a,n,r){this.selfAttendeeId=e,this.audioVideoFacade=t,this.observer=a,this.videoPriorityDownlinkManager=n,this.videoUplinkManager=r,(0,h.A)(this,["realtimeAttendeeIdPresenceCallback","realtimeFatalErrorCallback","realtimeLocalSignalStrengthChangeCallback","realtimeMuteAndUnmuteLocalAudioCallback","realtimeSetCanUnmuteLocalAudioCallback","activeSpeakerDetectorCallback","realtimeVolumeIndicatorCallback","realtimeReceiveDataMessageCallback","realtimeReceiveTranscriptEventCallback"]),this.audioVideoFacade.realtimeSubscribeToAttendeeIdPresence(this.realtimeAttendeeIdPresenceCallback),this.audioVideoFacade.realtimeSubscribeToFatalError(this.realtimeFatalErrorCallback),this.audioVideoFacade.realtimeSubscribeToLocalSignalStrengthChange(this.realtimeLocalSignalStrengthChangeCallback),this.audioVideoFacade.realtimeSubscribeToMuteAndUnmuteLocalAudio(this.realtimeMuteAndUnmuteLocalAudioCallback),this.audioVideoFacade.realtimeSubscribeToSetCanUnmuteLocalAudio(this.realtimeSetCanUnmuteLocalAudioCallback),this.windowedActiveSpeakerPolicy=new WindowedActiveSpeakerPolicy,this.audioVideoFacade.subscribeToActiveSpeakerDetector(this.windowedActiveSpeakerPolicy,this.activeSpeakerDetectorCallback),this.audioVideoFacade.realtimeSubscribeToReceiveDataMessage(this.dataChannelTopic,this.realtimeReceiveDataMessageCallback),this.audioVideoFacade.transcriptionController?.subscribeToTranscriptEvent(this.realtimeReceiveTranscriptEventCallback),this.peerCache=new PeerCache(this.observer),this.staleAttendeeChecker=new StaleAttendeeChecker(this.staleAttendeeTimeoutMs,this)}destroy(){this.peerCache?.getPeers().forEach(e=>this.audioVideoFacade.realtimeUnsubscribeFromVolumeIndicator(e)),delete this.peerCache,this.staleAttendeeChecker?.shutdown(),delete this.staleAttendeeChecker,this.audioVideoFacade.realtimeUnsubscribeToAttendeeIdPresence(this.realtimeAttendeeIdPresenceCallback),this.audioVideoFacade.realtimeUnsubscribeToFatalError(this.realtimeFatalErrorCallback),this.audioVideoFacade.realtimeUnsubscribeToLocalSignalStrengthChange(this.realtimeLocalSignalStrengthChangeCallback),this.audioVideoFacade.realtimeUnsubscribeToMuteAndUnmuteLocalAudio(this.realtimeMuteAndUnmuteLocalAudioCallback),this.audioVideoFacade.realtimeUnsubscribeToSetCanUnmuteLocalAudio(this.realtimeSetCanUnmuteLocalAudioCallback),this.audioVideoFacade.unsubscribeFromActiveSpeakerDetector(this.activeSpeakerDetectorCallback),delete this.windowedActiveSpeakerPolicy,this.audioVideoFacade.realtimeUnsubscribeFromReceiveDataMessage(this.dataChannelTopic),this.audioVideoFacade.transcriptionController?.unsubscribeFromTranscriptEvent(this.realtimeReceiveTranscriptEventCallback),this.attendeeMuteRequests={}}selfDrawEnabled(e){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{capabilities:{isDrawEnabled:e},fromPeerIdString:this.selfAttendeeId}))}sendReacji(e,t,a){let n={emoji:e,...t?{type:convertToPeerReactionType(t)}:{},...a?{emojiUrl:a}:{}};this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{reacji:n,fromPeerIdString:this.selfAttendeeId}))}sendBackground(e){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{background:{url:e},fromPeerIdString:this.selfAttendeeId}))}sendMuteRequest(e){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{muteRequest:{peerId:e},fromPeerIdString:this.selfAttendeeId}))}sendJukeboxRequest(e){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{jukeboxRequest:{songKey:e},fromPeerIdString:this.selfAttendeeId}))}sendJukeboxStopRequest(){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{jukeboxRequest:{stop:!0},fromPeerIdString:this.selfAttendeeId}))}sendDrawMessage(e){let t=convertDrawMessageToPeerMessage(e,this.selfAttendeeId);this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{draw:t,fromPeerIdString:this.selfAttendeeId}))}sendContentShareDetails(e){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{contentShareDetails:{sourceType:e,itemId:this.selfAttendeeId},fromPeerIdString:this.selfAttendeeId}))}sendRecordingStartNotification(){this.sendPeerMessageOverDataChannel((0,m.v)(T.lP,{recordingStartNotification:{type:T.Om.SUMMARY},fromPeerIdString:this.selfAttendeeId}))}onStalePeer(e){this.callLogger.info(`Removing stale peer: ${e}`),this.attendeeLeft(e),this.observer.onPeerDisconnected(e),this.observer.onPeerLeft(e)}setIncludeSelfAndNoneActiveSpeaker(e,t){this.peerCache?.setIncludeSelfAndNoneActiveSpeaker(e,t)}attendeeJoined(e){e===this.selfAttendeeId?this.peerCache?.addSelf(e):this.peerCache?.addPeer(e),this.audioVideoFacade.realtimeSubscribeToVolumeIndicator(e,this.realtimeVolumeIndicatorCallback),this.consoleLog.info(`Subscribed to attendee=${e} volume indicator`)}attendeeLeft(e){e===this.selfAttendeeId?this.peerCache?.removeSelf(e):this.peerCache?.removePeer(e),this.audioVideoFacade.removeVideoTilesByAttendeeId(e),this.audioVideoFacade.realtimeUnsubscribeFromVolumeIndicator(e),this.consoleLog.info(`Unsubscribed from attendee=${e} volume indicator`)}isDataChannelReady=()=>this.audioVideoFacade.audioVideoController?.meetingSessionContext?.signalingClient?.ready();logFailureToSendPeerMessage=e=>{let t=e.draw?"draw":"reacji",logError=()=>this.callLogger.error(`Failed to send ${t} peer message. Data channel is not ready to use.`);return(0,P.A)(t,logError)};sendPeerMessageOverDataChannel(e){this.isDataChannelReady()?this.audioVideoFacade.realtimeSendDataMessage(this.dataChannelTopic,(0,u.R)(T.lP,e)):this.logFailureToSendPeerMessage(e)}isAttendeeOfTypeContent(e){return new f.jp(e).hasModality(f.jp.MODALITY_CONTENT)}realtimeAttendeeIdPresenceCallback(e,t,a,n){if(this.consoleLog.info(`Attendee presence: attendeeId=${e}, isSelf=${this.selfAttendeeId===new f.jp(e).base()}, present=${t}, externalUserId=${a}, dropped=${n}`),this.windowedActiveSpeakerPolicy?.updatePresence(e,t),this.isAttendeeOfTypeContent(e)){t||this.audioVideoFacade.removeVideoTilesByAttendeeId(e);return}if(!a){this.callLogger.error(`Attendee presence: no externalUserId for attendee=${e}`),this.observer.onClogError("MissingExternalUserId");return}let r=null;if(r=t?!1!==n||this.peerCache?.hasAttendee(e)?"reconnected":"joined":!0===n?"disconnected":"left",this.selfAttendeeId===e)switch(r){case"joined":this.observer.onSelfJoined(),this.observer.onSelfConnected();break;case"left":this.observer.onSelfDisconnected(),this.observer.onSelfLeft();break;case"disconnected":this.observer.onSelfDisconnected();break;case"reconnected":this.observer.onSelfConnected();break;default:this.callLogger.error(`unknown self event ${r}`);return}else{let t=(0,R.l)(a);if(!t)return void this.callLogger.error(`No externalUserId for ${e}`);switch(r){case"joined":this.staleAttendeeChecker?.deleteDisconnectedAttendee(e),this.observer.onPeerJoined(e,t),this.observer.onPeerConnected(e),this.updatePeerVideoTile(e),(0,d._)().updatePeerId(e);break;case"left":this.observer.onPeerDisconnected(e),this.observer.onPeerLeft(e);break;case"disconnected":this.staleAttendeeChecker?.addDisconnectedAttendee(e),this.observer.onPeerDisconnected(e);break;case"reconnected":this.staleAttendeeChecker?.deleteDisconnectedAttendee(e),this.observer.onPeerConnected(e),this.updatePeerVideoTile(e);break;default:this.callLogger.error(`unknown peer event ${r}`);return}}if("joined"===r){this.attendeeJoined(e),(0,d._)().updatePeerJoinedCount();let t=new f.jp(e).base();this.activeAttendeeIds.add(t),this.updateParticipantCount()}if("left"===r){this.attendeeLeft(e),(0,d._)().updatePeerLeftCount();let t=new f.jp(e).base();this.activeAttendeeIds.delete(t),this.updateParticipantCount()}}updateParticipantCount(){if(!this.videoUplinkManager)return;let e=this.activeAttendeeIds.size;this.videoUplinkManager.updateParticipantCount(e)}realtimeFatalErrorCallback(e){this.callLogger.error(`Chime session fatal error: name=${e.name}, message=${e.message}`),this.observer.onClogError(`FatalError: ${e.name} - ${e.message}`)}realtimeLocalSignalStrengthChangeCallback(e){this.consoleLog.debug(`Local attendee signalStrength=${e}`)}realtimeMuteAndUnmuteLocalAudioCallback(e){this.callLogger.debug(`Local attendee mute=${e}`),this.observer.onPeerMuted("self",e)}realtimeSetCanUnmuteLocalAudioCallback(e){this.consoleLog.debug(`Local attendee can unmute = ${e}`)}realtimeVolumeIndicatorCallback(e,t,a,n,r){this.consoleLog.debug(`Attendee volume indicator: attendeeId=${e}, volume=${t}, muted=${a}, signalStrength=${n}, externalUserId=${r}`);let i=this.selfAttendeeId===e;(0,d._)().trackVolumeIndicator(i,t),this.selfAttendeeId!==e&&(a?this.observer.onPeerMuted(e,!0):null!==a&&!1===a&&this.observer.onPeerMuted(e,!1)),null!==n&&(this.selfAttendeeId===e?this.observer.onSelfConnectionQualityChanged("uplink",(0,N.MK)(n)):this.observer.onPeerConnectionQualityChanged(e,"uplink",(0,N.MK)(n)))}activeSpeakerDetectorCallback(e){this.peerCache?.updateCallState({activeSpeakerList:e}),this.videoPriorityDownlinkManager?.setActiveSpeakers(e)}realtimeReceiveDataMessageCallback(e){let t;if(this.selfAttendeeId===e.senderAttendeeId){if(!e.throttled)return;this.callLogger.info(`Data message throttled: size=${e.data.length} bytes`);return}try{t=(0,p.Er)(T.lP,e.data)}catch(t){this.callLogger.error(`Peer Message failed during decode, ignoring peer message.
				| Error: ${t}
				| Data Sender Attendee ID: ${e.senderAttendeeId}
				| Data Sender External Attendee ID: ${e.senderExternalUserId}
				| Topic: ${e.topic}`);return}this.handlePeerMessageFromDataMessage(t,e.senderAttendeeId)}handlePeerMessageFromDataMessage(e,t){if(e.jukeboxRequest){if((0,v.Z)(t,"senderAttendeeId is not populated")&&(0,v.Z)(e.jukeboxRequest,"message.jukeboxRequest is required in the jukebox request message")){if(!this.peerCache||!this.peerCache?.hasPeer(t))return void this.callLogger.info(`Dropping jukeboxRequest from unknown peer: ${t}`);e.jukeboxRequest.songKey&&!e.jukeboxRequest.stop&&this.observer.onJukeboxRequest(e.jukeboxRequest.songKey),e.jukeboxRequest.stop&&this.observer.onJukeboxStopRequest()}}else if(e.reacji){if(!(0,v.Z)(t,"senderAttendeeId is not populated")||!(0,v.Z)(e.reacji.emoji,"reacji.emoji is required in the reacji message"))return;if(this.peerCache?.hasPeer(t)){let a=convertFromPeerReactionType(e.reacji);this.observer.onPeerReacji(t,e.reacji.emoji,!0,a,e.reacji.emojiUrl??void 0)}else this.callLogger.info(`Dropping reacji from unknown peer: ${t}`)}else if(e.draw){let a=convertPeerMessageToDrawMessage(e.draw,this.selfAttendeeId);if(!(0,v.Z)(t,"senderAttendeeId is not populated")||!(0,v.Z)(a,"Draw message must be correctly formed"))return;this.peerCache?.hasPeer(t)?this.observer.onPeerDrawMessage(t,a):this.callLogger.info(`Dropping draw message from unknown peer: ${t}`)}else if(e.capabilities){if(!(0,v.Z)(t,"senderAttendeeId is not populated"))return;(0,_.A)(e.capabilities.isDrawEnabled)||this.peerCache?.updatePeerStates([{peerId:t,state:{isDrawEnabled:e.capabilities.isDrawEnabled}}])}else if(e.muteRequest){if(!(0,v.Z)(t,"senderAttendeeId is not populated")||!(0,v.Z)(e.muteRequest.peerId,"muteRequest.peerId is required in the background message"))return;if(this.peerCache?.hasPeer(t)){if(e.muteRequest.peerId===this.selfAttendeeId){let e=this.attendeeMuteRequests[t],a=e?.lastRequestTime,n=Date.now();if(e?(e.lastRequestTime=n,e.count+=1):this.attendeeMuteRequests[t]={lastRequestTime:n,count:1},a&&n-a<=this.attendeeMuteRequestThrottleMs)return void this.callLogger.info(`Throttled mute request from attendee: ${t} peer: ${t}`);if(this.attendeeMuteRequests[t]?.count>=this.attendeeMuteRequestMaxAllowed)return void this.callLogger.info(`Dropped mute request from attendee: ${t} peer: ${t}`)}this.observer.onPeerMuteRequest(t,e.muteRequest.peerId)}else this.callLogger.info(`Dropping mute request from unknown peer: ${t}`)}else if(e.contentShareDetails){if(!(0,v.Z)(t,"senderAttendeeId is not populated")||!(0,v.Z)(e.contentShareDetails.itemId,"contentShareDetails.itemId is required in the contentShareDetails message")||!(0,v.Z)(e.contentShareDetails.sourceType,"contentShareDetails.sourceType is required in the contentShareDetails message"))return;this.callLogger.info(`Received content share details for item: ${e.contentShareDetails.itemId}, type: ${e.contentShareDetails.sourceType}`);let a=(0,b.Vd)(e.contentShareDetails.sourceType);this.observer.onContentShareDetailsUpdate(t,a,e.contentShareDetails.sourceType)}}realtimeReceiveTranscriptEventCallback(e){this.observer.onTranscriptionEvent(e)}updatePeerVideoTile(e){this.audioVideoFacade.getAllVideoTiles().filter(t=>{let a=t.state();return!!a&&!!a.boundAttendeeId&&new f.jp(a.boundAttendeeId).base()===new f.jp(e).base()}).forEach(t=>{let a=t?.state()||null;a&&this.observer.onPeerVideoTileUpdate(e,a)})}};var L=a(0x16998c9bf);let MeetingEvent=class MeetingEvent{sequenceNumber;message;timestampMs;constructor(e,t,a){this.sequenceNumber=e,this.message=t,this.timestampMs=a}};var O=a(0x18574f75a),D=a(0x1bace49f);let MeetingEventLogger=class MeetingEventLogger{observer;meetingId;mediaRegion;attendeeId;callId;batchSize;intervalMs;eventCapture=[];sequenceNumber=0;intervalScheduler;log=(0,k.tZ)("MEETING-EVENT-LOGGER");stopped=!1;static DEFAULT_BATCH_SIZE=100;static DEFAULT_INTERVAL_MS=39e5;constructor(e,t,a,n,r,i=MeetingEventLogger.DEFAULT_BATCH_SIZE,l=MeetingEventLogger.DEFAULT_INTERVAL_MS){this.observer=e,this.meetingId=t,this.mediaRegion=a,this.attendeeId=n,this.callId=r,this.batchSize=i,this.intervalMs=l,this.intervalScheduler=new D.A(this.intervalMs),this.startEventPublishScheduler(this.batchSize),(0,O.A)(async()=>{this.stop(!0)})}getEventCaptureSize(){return this.eventCapture.length}startEventPublishScheduler(e){this.intervalScheduler.start(async()=>{if(0===this.getEventCaptureSize())return;let t=this.eventCapture.slice(0,e);try{this.postEvents(t),this.eventCapture=this.eventCapture.slice(t.length)}catch(e){this.log.error((0,L.u1)(e))}})}stop(e=!1){this.stopped||(this.intervalScheduler.stop(),this.postEvents(this.eventCapture,e,!0),this.eventCapture=[],this.stopped=!0,this.observer=void 0)}logEvent(e,t){let{meetingHistory:a,...n}=t;try{let t=JSON.stringify({name:e,attributes:n});this.eventCapture.push(new MeetingEvent(this.sequenceNumber,t,Date.now())),this.sequenceNumber+=1}catch(e){this.log.error((0,L.u1)(e))}}postEvents(e,t=!1,a=!1){(0!==e.length||t||a)&&this.observer?.onMeetingEvents(this.meetingId,this.mediaRegion,this.attendeeId,this.callId,e,t,a)}};var F=a(0x43a6c25d),U=a(0x21fa18925),B=a(0x1bd185e94);async function makeAppMetricsStats(){let e,t,a;if(!(0,I.y3)())return;let n="unknown";if(w.vkf.isAvailable()){let a=await (0,w.vkf)();if(!a)return;e=a.processMetrics,n=a.thermalState??"unknown",t=a.speedLimit}if(!e)return;let r=e.reduce((e,t)=>("GPU"===t.type&&(a=t),{cpu:e.cpu+(t?.cpu?.percentCPUUsage||0),memory:{workingSetSize:e.memory.workingSetSize+(0,B.UK)(t?.memory?.workingSetSize||0),peakWorkingSetSize:e.memory.peakWorkingSetSize+(0,B.UK)(t?.memory?.peakWorkingSetSize||0)}}),{cpu:0,memory:{workingSetSize:0,peakWorkingSetSize:0}}),i=a?.cpu?.percentCPUUsage||0,l=i?r.cpu-i:r.cpu;return{...(0,m.v)(U.i1,r),cpuWithoutGpu:l,gpu:i,thermalState:n,speedLimit:t}}let HuddlesStatsManager=class HuddlesStatsManager{audioVideoFacade;observer;callLogger=(0,k.Jt)("HUDDLES-STATS-MANAGER");isDisconnected=!1;constructor(e,t){this.audioVideoFacade=e,this.observer=t}onMetricsDidReceive=async e=>{if(!e)return;let t=await this.collectScreenshareStats();this.reportAppMetrics({clientMetricReport:e,screenshareRtcStats:t})};reportDisconnect=()=>{this.isDisconnected=!0,this.callLogger.info("Disconnect reported. Resuming app metrics collection without client metric report."),this.reportAppMetrics();let e=setInterval(()=>{this.isDisconnected?(this.callLogger.info("User still disconnected. Reporting app metrics without client metric report."),this.reportAppMetrics()):clearInterval(e)},5e3)};cleanup=()=>{};collectScreenshareStats=async()=>{try{let e=this.audioVideoFacade.contentShareController.contentAudioVideo?.rtcPeerConnection;if(!e)return;return await e.getStats()}catch(e){this.callLogger.error("Failed to collect screenshare stats",e)}};reportAppMetrics=async({clientMetricReport:e,screenshareRtcStats:t}={})=>{if(!e&&!this.isDisconnected)return;this.isDisconnected&&e&&(this.isDisconnected=!1);let a=await this.collectAppMetrics();this.observer.onAppMetrics({appMetrics:a,clientMetricReport:e,screenshareRtcStats:t})};collectAppMetrics=async()=>{let e=await makeAppMetricsStats();if(!e)return;let t=e;return e&&(t=(0,i.A)({...e,cpu:e.cpuWithoutGpu},"cpuWithoutGpu")),t}};let AudioVideoObserverImpl=class AudioVideoObserverImpl{selfAttendeeId;meetingId;mediaRegion;callId;audioVideoFacade;observer;deviceManager;videoDownlinkManager;disconnectObserver;dataChannelSubscribers;videoPriorityDownlinkManager;videoTileUpdateCallback;isInitialConnectionTimeoutEnabled;callLogger=(0,k.tZ)("FREE-WILLY-AV");consoleLog=(0,k.Cc)("FREE-WILLY-AV");waitForStart=(0,c.u)();waitForStop=(0,c.u)();isStopRequested=!1;isSignallingOnly=!1;isReconnecting=!1;hasEverConnected=!1;initialConnectionTimer;statsManager;meetingEventLogger;huddleReconnectTracer;constructor(e,t,a,n,r,i,l,o,s,c,d,m=[],u,p,h=!1){this.selfAttendeeId=e,this.meetingId=t,this.mediaRegion=a,this.callId=n,this.audioVideoFacade=r,this.observer=i,this.deviceManager=l,this.videoDownlinkManager=o,this.disconnectObserver=s,this.dataChannelSubscribers=m,this.videoPriorityDownlinkManager=u,this.videoTileUpdateCallback=p,this.isInitialConnectionTimeoutEnabled=h,c&&(this.waitForStart=c),d&&(this.waitForStop=d),this.statsManager=new HuddlesStatsManager(r,i),this.meetingEventLogger=new MeetingEventLogger(i,this.meetingId,this.mediaRegion,this.selfAttendeeId,this.callId),{reconnectTrace:this.huddleReconnectTracer}=(0,F.A)().getAllTraceHandlers()}static INITIAL_CONNECTION_TIMEOUT_MS=1e4;start(){this.isSignallingOnly=!1,this.videoDownlinkManager?.addObserver(this),this.videoPriorityDownlinkManager?.addObserver(this),this.audioVideoFacade.addObserver(this),this.audioVideoFacade.start(),this.isInitialConnectionTimeoutEnabled&&(this.initialConnectionTimer=setTimeout(()=>{this.hasEverConnected||this.isStopRequested||(this.callLogger.warn(`Chime session failed to start within ${AudioVideoObserverImpl.INITIAL_CONNECTION_TIMEOUT_MS}ms.`),this.observer.onInitialConnectionFailed())},AudioVideoObserverImpl.INITIAL_CONNECTION_TIMEOUT_MS)),this.observer.onStart()}startWithSignalingOnly(){this.audioVideoFacade.start({signalingOnly:!0}),this.isSignallingOnly=!0}async stop(){this.isStopRequested=!0,clearTimeout(this.initialConnectionTimer),this.isSignallingOnly||!this.hasEverConnected?(this.waitForStart.resolve(),this.waitForStop.resolve(!0)):await this.waitForStart,this.stopSync()}stopSync(){this.isStopRequested=!0,this.audioVideoFacade.stop()}audioVideoDidStartConnecting(e){e?(this.callLogger.info("Reconnecting Chime session"),this.observer.onSelfDisconnected(),this.statsManager?.reportDisconnect?.(),this.huddleReconnectTracer?.traceReconnectAttempt(),this.isReconnecting=!0):(this.callLogger.info("Starting Chime session"),this.observer.onStartSessionTimeout(),this.observer.onAudioVideoDidStartConnecting(),this.isReconnecting=!1),this.disconnectObserver?.onConnectionUpdate(this.audioVideoFacade)}async audioVideoDidStart(){this.callLogger.info("Chime audio video session started"),this.hasEverConnected=!0,clearTimeout(this.initialConnectionTimer),this.disconnectObserver?.onConnectionUpdate(this.audioVideoFacade?.audioVideoController?.meetingSessionContext,this.isReconnecting),this.isReconnecting&&(this.callLogger.info("Successfully re-connected to Huddle"),this.huddleReconnectTracer?.traceReconnectAttemptOutcome({isSuccess:!0}),this.isReconnecting=!1),this.observer.onAudioVideoDidStart(),this.dataChannelSubscribers.forEach(e=>e.onConnectDatachannel(this.audioVideoFacade)),this.waitForStart.resolve()}audioVideoDidStop(e){clearTimeout(this.initialConnectionTimer);let t=f.b9[e.statusCode()],a=`Chime session stopped. StatusCode: ${t}`;this.callLogger.info(a),this.isReconnecting&&e.isFailure()&&(this.callLogger.info("Failed to re-connect to Huddle"),this.huddleReconnectTracer?.traceReconnectAttemptOutcome({isSuccess:!1})),delete this.disconnectObserver,this.audioVideoFacade.removeObserver(this),this.observer.onScreenShareStopped(),this.observer.onAudioVideoDidStop(),this.videoDownlinkManager?.removeObserver(this),this.videoPriorityDownlinkManager?.removeObserver(this),this.meetingEventLogger?.stop(),delete this.meetingEventLogger,this.statsManager.cleanup?.(),delete this.statsManager,this.dataChannelSubscribers.forEach(e=>e.onDisconnectDataChannel()),!this.isStopRequested&&e.isTerminal()&&(this.observer.onClogError(a),this.observer.onError(N.uZ.CallEnded,t)),this.waitForStop.resolve(this.isStopRequested)}videoTileDidUpdate(e){if(!e.boundVideoStream||!e.boundAttendeeId)return e.tileId&&e.boundAttendeeId&&!e.localTile&&new f.jp(e.boundAttendeeId).hasModality(f.jp.MODALITY_CONTENT)?void this.consoleLog.info(`Skipping tile removal for content share tile without bound stream: tileId=${e.tileId}`):void(e.tileId&&this.observer.onVideoTileRemoved(e.tileId));let t=new f.jp(e.boundAttendeeId).base();this.selfAttendeeId===t?(this.deviceManager.localVideoTileDidUpdate(e),this.observer.onSelfVideoTileUpdate(e)):this.observer.onPeerVideoTileUpdate(t,e),e.tileId&&this.videoTileUpdateCallback?.(e.tileId)}videoTileWasRemoved(e){this.consoleLog.info(`Video tile removed: tileId=${e}`),this.observer.onVideoTileRemoved(e)}videoAvailabilityDidChange(e){this.consoleLog.debug(`Video availability: RemoteVideoAvailable=${e.remoteVideoAvailable}, CanStartLocalVideo=${e.canStartLocalVideo}`)}async metricsDidReceive(e){this.statsManager?.onMetricsDidReceive(e)}connectionDidBecomePoor(){this.callLogger.warn("SDK detected poor connection")}connectionDidSuggestStopVideo(){this.callLogger.warn("SDK suggested stop video, maybe poor connection")}connectionDidBecomeGood(){this.callLogger.info("SDK detected good connection")}videoSendDidBecomeUnavailable(){this.callLogger.warn("Video send is unavailable")}remoteVideoSourcesDidChange(e){this.videoDownlinkManager?.remoteVideoSourcesDidChange(e),this.videoPriorityDownlinkManager?.remoteVideoSourcesDidChange(e)}tileWillBePausedByDownlinkPolicy(e){this.observer.onVideoTileWillPause(e)}tileWillBeUnpausedByDownlinkPolicy(e){this.observer.onVideoTileWillUnpause(e)}};var H=a(0x7e65931b);let W=new(a(0x12192fed6)).ConnectionHealthPolicyConfiguration,V={connectionWaitTimeMs:15e3,connectionUnhealthyThreshold:5,sendingAudioFailureSamplesToConsider:3,sendingAudioFailureInitialWaitTimeMs:15e3,missedPongsLowerThreshold:1,missedPongsUpperThreshold:3,consecutiveVideoEncodingFailureThreshold:5},G=class{expectAv1EncoderFreeze;constructor(e=!1){this.expectAv1EncoderFreeze=e}getConfiguration=()=>{let e={...W,...V};return this.expectAv1EncoderFreeze&&(e.consecutiveVideoEncodingFailureThreshold=20),e}};var q=a(0xe67fcf33),j=a(0x18f2150ea),z=a(0x1f06b0cba),K=a(0x5186d4e),$=a(0x1ea5cc025),Y=a(0x18d2488e1);function serialGuard(e,t,{skipIntermediatePendingRuns:a=!0}={}){let n=!1,r=[],run=async(...i)=>{if(n){a&&(r=[]);let e=(0,c.u)();return r.push({args:i,deferred:e}),e}n=!0;let l=await t.call(e,...i);n=!1;let o=r.shift();return o&&run(...o.args).then(o.deferred.resolve).catch(o.deferred.reject),l};return run}let Q="text";let ContentShareManager=class ContentShareManager{audioVideoFacade;observer;huddlesJukeboxEnabled;useScreensharePermissionHandlingV2;VideoUplinkManager;log=(0,k.tZ)("FREE-WILLY-CONTENT-SHARE");isScreenshareEnabled;waitForStart;isStopRequested=!1;lastEnableTimeMs=0;isMusicEnabled;constructor(e,t,a,n,r){this.audioVideoFacade=e,this.observer=t,this.huddlesJukeboxEnabled=a,this.useScreensharePermissionHandlingV2=n,this.VideoUplinkManager=r,this.audioVideoFacade.addContentShareObserver(this),this.setScreenshare=serialGuard(this,this.setScreenshare,{skipIntermediatePendingRuns:!1})}stopMusic({cleanObserver:e}){this.huddlesJukeboxEnabled&&this.isMusicEnabled&&(this.isMusicEnabled=!1,this.log.info("stop content share called via stop music action"),this.audioVideoFacade.stopContentShare(),e&&this.audioVideoFacade.removeContentShareObserver(this))}async stop(){this.isScreenshareEnabled&&(this.log.info("stop content share called via stop action"),this.isStopRequested=await this.stopContentShare()),this.huddlesJukeboxEnabled&&this.stopMusic({cleanObserver:!0}),this.isStopRequested||(this.observer.onScreenShareStopped(),this.audioVideoFacade.removeContentShareObserver(this))}contentShareDidStart(){this.log.info("Chime content share started"),this.waitForStart?.resolve(!0),this.VideoUplinkManager?.setScreenSharingActive(!0),this.observer.onScreenShareStarted()}contentShareDidStop(){this.log.info("Chime content share stopped"),this.isScreenshareEnabled&&this.log.info("Screenshare stop: stream ended"),this.isScreenshareEnabled=!1,this.VideoUplinkManager?.setScreenSharingActive(!1),this.observer.onScreenShareStopped(),this.isStopRequested&&this.audioVideoFacade.removeContentShareObserver(this)}contentShareDidPause(){this.log.info("Chime content share paused")}contentShareDidUnpause(){this.log.info("Chime content share unpaused")}async setSongStream(e){this.huddlesJukeboxEnabled&&(this.waitForStart=(0,c.u)(),await this.audioVideoFacade.startContentShare(e),this.isMusicEnabled=!0)}async setScreenshare(e,t,a){if(this.log.info(`setScreenshare called, isScreenshareEnabled: ${e}`),e===this.isScreenshareEnabled)return void this.log.info(`setScreenshare isScreenshareEnabled is the same as current, no action taken. isScreenshareEnabled: ${e}`);let{huddleEventsTrace:n}=(0,F.A)().getAllTraceHandlers();if(e){let r,i=t;if(t){let e=t.split(":");3===e.length&&"0"!==e[2]&&(e[2]="0",i=e.join(":"),this.log.warn(`Munging screen share media source id, before: ${t}, after: ${i}`))}try{this.waitForStart=(0,c.u)();let logGetUserMediaError=e=>{throw this.log.error(`getUserMedia error during huddle screenshare attempt: ${e.name} ${e.message}`),(0,Y.C)().recordScreenShareFailed(e.name),e};if((0,w.g9M)()&&this.log.info(`Starting screen share with zoomLevel = ${(0,w.IXB)()}`),(0,w.g9M)()&&a){let{screenHeight:e,screenWidth:t,selectedDisplayId:l}=a;if(r={video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:i,maxFrameRate:15}}},t&&e){let a=r.video.mandatory,n=t/e;a.maxWidth=t<2560?t:2560,a.maxHeight=e<2560?e:2560;let i=navigator.mediaDevices.getSupportedConstraints();(0,q.A)(i,"aspectRatio")&&i.aspectRatio&&(0,j.A)(n)&&(a.minAspectRatio=n,a.maxAspectRatio=n),this.log.info(`Starting screen share with resolution constraints: ${a.maxWidth} x ${a.maxHeight} | resolution provided: ${t} x ${e}`)}else this.log.info("Starting application window share without proposed resolution");let o=await navigator.mediaDevices.getUserMedia(r).catch(logGetUserMediaError);(0,Y.C)().recordScreenShareSuccess(),o?.getVideoTracks().length>0?(this.log.debug(`Applying content hint to content share stream. Content Hint ${Q}`),o.getVideoTracks()[0].contentHint=Q):this.log.warn("No video tracks where available when starting constrained content share"),setTimeout(()=>{let e=o.getVideoTracks()[0].getSettings(),t=(0,b.MS)(e?.deviceId);K.A.publish({type:z.lx.ScreenshareContentType,update:{screenshareContentType:t}}),this.log.info(`Created video track with resolution: ${e.width} x ${e.height} framerate: ${e.frameRate} aspect ratio: ${e.aspectRatio}`),l&&this.log.info(`Sharing from selected display: ${l}`)},500),await this.audioVideoFacade.startContentShare(o),setTimeout(()=>this.applyContentShareConstraints(o),1e3),n?.update({name:$.p.SCREENSHARE,type:$.G.START})}else{this.log.info("Starting unconstrained content share with chime API's startContentShareFromScreenCapture");let e=await this.audioVideoFacade.startContentShareFromScreenCapture(i).catch(logGetUserMediaError);if(n?.update({name:$.p.SCREENSHARE,type:$.G.START}),setTimeout(()=>this.applyContentShareConstraints(e),1e3),e?.getVideoTracks().length>0){this.log.debug(`Applying content hint to content share stream. Content Hint ${Q}`),e.getVideoTracks()[0].contentHint=Q;let t=e.getVideoTracks()[0].getSettings(),a=(0,b.MS)(t?.deviceId);K.A.publish({type:z.lx.ScreenshareContentType,update:{screenshareContentType:a}})}else this.log.warn("No video tracks where available when starting unconstrained content share")}}catch(t){let e=(0,L.iT)(t),exitScreenshare=()=>{delete this.waitForStart,this.isScreenshareEnabled=!1,this.observer.onScreenShareStopped()};if("NotAllowedError"===e.name){exitScreenshare(),this.useScreensharePermissionHandlingV2?this.observer.onCheckSystemMediaAccess(N.mT.SCREEN):"Permission denied by system"===e.message&&this.observer.onCheckSystemMediaAccess(N.mT.SCREEN);return}if("OverconstrainedError"===e.name){exitScreenshare(),r&&this.log.error(`Invalid stream constraints prevented screenshare from succeeding: ${JSON.stringify(r)}`);return}if(["TypeError","AbortError","Error"].includes(e.name)){exitScreenshare(),this.observer.onScreenShareError(N.lD.ERROR);return}if("NotReadableError"===e.name){exitScreenshare(),this.observer.onScreenShareError(N.lD.NOT_READABLE_ERROR);return}throw"NotFoundError"===e.name&&(exitScreenshare(),this.observer.onScreenShareError(N.lD.NOT_FOUND_ERROR)),this.log.error(`Encountered an uncaught error attempting to start screen share: ${e.name} ${e.message}`),this.waitForStart?.resolve(!1),exitScreenshare(),t}this.lastEnableTimeMs=Date.now(),this.isScreenshareEnabled=e}else this.isScreenshareEnabled&&(this.log.info("stop content share called in set screenshare"),await this.stopContentShare())}async applyContentShareConstraints(e){let t=e.getVideoTracks()[0];t?(t.getSettings()||this.log.info("Constraints not re-applied no video track settings available"),await t.applyConstraints({width:{ideal:2560},height:{ideal:2560},frameRate:{ideal:15}}),this.log.info("Constraints re-applied to content share (resolution overwrite applied)")):this.log.info("Constraints not re-applied no video track available")}isScreenShareEnabled(){return this.isScreenshareEnabled||!1}async stopContentShare(){this.log.info("stop content share called");let e=!1;if(this.waitForStart?.isPending()?Date.now()-this.lastEnableTimeMs>1e4?(e=!0,this.log.info(`Stop screen share, force: ${Date.now()-this.lastEnableTimeMs} ms since start`)):(this.log.info("Stop screen share, waiting for content share start to resolve"),e=await this.waitForStart?.value()||!1,this.log.info(`Stop screen share, wait for content share start resolve finished: ${e}`)):(e=this.waitForStart?.value()||!1,this.log.info(`Stop screen share, promise resolved: ${e}`)),e){this.log.info("stop content share called in stopContentShare"),this.audioVideoFacade.stopContentShare(),this.isScreenshareEnabled=!1;let{huddleEventsTrace:e}=(0,F.A)().getAllTraceHandlers();e?.update({name:$.p.SCREENSHARE,type:$.G.STOP}),K.A.publish({type:z.lx.ScreenshareContentType,update:null})}else this.log.warn("Screen share disable ignored as screen share was not started successfully");return e}};var Z=a(0x83598c13),J=a(0x1c6b56d20),X=a(0x2286acf6c),ee=a(0xb77a689a),et=a(0x77727995),ea=a(0x24643ca4);let AudioInputTrackHandler=class AudioInputTrackHandler{defaultDeviceController;observer;logger;isAudioInputTrackMuted=!1;audioInputTrack;constructor(e,t,a){this.defaultDeviceController=e,this.observer=t,this.logger=a,this.onMute=this.onMute.bind(this),this.onUnmute=this.onUnmute.bind(this),this.onEnded=this.onEnded.bind(this),this.defaultDeviceController=e}initialize(){let e=(0,ea.Ef)(this.defaultDeviceController);e?(this.audioInputTrack=e,this.audioInputTrack?.addEventListener("mute",this.onMute),this.audioInputTrack?.addEventListener("unmute",this.onUnmute),this.audioInputTrack?.addEventListener("ended",this.onEnded),this.audioInputTrack?.muted?this.onMute():this.onUnmute()):this.logger.warn("Unable to retrieve audio tracks from the default device controller")}tearDown(){this.audioInputTrack?.removeEventListener("mute",this.onMute),this.audioInputTrack?.removeEventListener("unmute",this.onUnmute),this.audioInputTrack?.removeEventListener("ended",this.onEnded)}onMute(){this.isAudioInputTrackMuted=!0,this.logger.warn("Audio input track is muted. Alerting the user"),this.observer.onAudioInputTrackMuted()}onUnmute(){this.isAudioInputTrackMuted&&this.logger.info("Audio input track is unmuted. Removing alert if there is one"),this.observer.onAudioInputTrackUnMuted(),this.isAudioInputTrackMuted=!1}onEnded(){this.logger.warn("Audio input track was ended - Device Manager will handle retry logic");let e=this.audioInputTrack?.getSettings()?.deviceId;e&&this.logger.info(`Audio input track ended for device: ${e}`)}};var en=a(0x1fb44c2bf),er=a(0xf5a3fff7),ei=((n={}).PERMISSION="permission",n.HARDWARE="hardware",n.CONSTRAINT="constraint",n.NOT_FOUND="not_found",n.UNKNOWN="unknown",n);function classifyError(e){let t=e.name||"UnknownError";switch(t){case"PermissionDeniedError":case"NotAllowedError":return{category:"permission",severity:"permanent",errorName:t};case"NotReadableError":return{category:"hardware",severity:"temporary",errorName:t};case"AbortError":return{category:"hardware",severity:"permanent",errorName:t};case"OverconstrainedError":return{category:"constraint",severity:"recoverable",errorName:t};case"NotFoundError":return{category:"not_found",severity:"recoverable",errorName:t};default:return{category:"unknown",severity:"permanent",errorName:"DeviceUnknownError"}}}function reportDeviceError(e,t,a){t===J.lW.Microphone?e.onAudioDeviceError(a):e.onVideoDeviceError(a)}function isRetryableError(e){return"temporary"===e.severity||"recoverable"===e.severity}var el=a(0x7eaf2e36);function calculateBackoffDelay(e,t){return Math.min(t.baseDelay*t.backoffFactor**(e-1),t.maxDelay)}async function retryAttempt(e,t,a,n,r,i=1){let l=r??Date.now();if(t.timeout&&Date.now()-l>t.timeout){let e=Error(`${a.operationName} retry timed out after ${t.timeout}ms`);return a.logger.warn(`${a.operationName} retry timed out after ${t.timeout}ms`),{success:!1,attempts:i-1,error:e}}if(i>t.maxAttempts)return a.logger.error(`${a.operationName} failed after ${i-1} attempts. Final error: ${n?.name} - ${n?.message}`),{success:!1,attempts:i-1,error:n};if(i>1){let e=calculateBackoffDelay(i,t);await (0,el.yy)(e)}try{let t=await e();return a.logger.info(`${a.operationName} succeeded after ${i} attempts`),{success:!0,result:t,attempts:i}}catch(r){let n=(0,L.iT)(r);if(n.message&&n.message.includes("cancelled"))return a.logger.info(`${a.operationName} attempt ${i} cancelled: ${n.message}`),{success:!1,attempts:i,error:n};return a.logger.warn(`${a.operationName} attempt ${i} failed: ${n.name} - ${n.message}`),retryAttempt(e,t,a,n,l,i+1)}}async function retryWithBackoff(e,t,a){return retryAttempt(e,t,a)}let DeviceErrorRecovery=class DeviceErrorRecovery{static async attemptRecovery(e){let{error:t,deviceType:a,logger:n,observer:r,operation:i,operationName:l,retryConfig:o}=e,s=classifyError(t);if(!isRetryableError(s))return n.error(`${l} failed with non-retryable error: ${t.name} - ${t.message}`),reportDeviceError(r,a,s.errorName),{success:!1,attempts:1,error:t};let c="NotReadableError"===t.name&&a===J.lW.Camera;c&&reportDeviceError(r,a,s.errorName);let d=await retryWithBackoff(i,o,{logger:n,operationName:l});return"OverconstrainedError"===t.name&&a===J.lW.Microphone?{success:!1,tryFallbackDevice:!0,attempts:1}:(d.success||c||reportDeviceError(r,a,s.errorName),d)}};let DeviceStateManager=class DeviceStateManager{logger;disconnectedDevices=new Map;constructor(e){this.logger=e}recordDeviceDisconnection(e,t){this.disconnectedDevices.set(e,{deviceId:t,disconnectedAt:Date.now()}),this.logger.info(`Recorded disconnection: ${e} device ${t}`)}shouldAutoReconnectDevice(e,t){let a=this.disconnectedDevices.get(e);if(!a||a.deviceId!==t)return!1;let n=Date.now()-a.disconnectedAt,r=n<=15e3;return this.logger.info(`Auto-reconnect check: ${e} device ${t} disconnected ${n}ms ago, window=15000ms, shouldReconnect=${r}`),r}clearDeviceDisconnection(e){this.disconnectedDevices.delete(e),this.logger.info(`Cleared disconnection record for ${e}`)}};let DeviceRetryManager=class DeviceRetryManager{options;stateManager;constructor(e){this.options=e,this.stateManager=new DeviceStateManager(e.logger)}async handleDeviceInit(e){let{operation:t,deviceType:a,deviceId:n,operationName:r,abortController:i,retryConfig:l}=e,{logger:o,observer:s}=this.options;if(i?.signal.aborted)return o.info(`${r} cancelled before start`),{success:!1,attempts:0,error:Error("Operation cancelled before start")};try{let e=await this.executeWithCancellation(t,i);return{success:!0,result:e,attempts:1}}catch(c){let e=(0,L.iT)(c);if(i?.signal.aborted)return o.info(`${r} cancelled: ${e.message}`),{success:!1,attempts:1,error:Error("Operation cancelled")};return o.error(`${r} initial ${n} attempt failed: ${e.message}`),await DeviceErrorRecovery.attemptRecovery({error:(0,L.iT)(c),deviceType:a,logger:o,observer:s,operation:()=>this.executeWithCancellation(t,i),operationName:r,retryConfig:l})}}async executeWithCancellation(e,t){if(t?.signal.aborted)throw Error("Operation cancelled");return new Promise((a,n)=>{let abortHandler=()=>{n(Error("Operation cancelled"))};t?.signal.addEventListener("abort",abortHandler,{once:!0}),e().then(a).catch(n).finally(()=>{t?.signal.removeEventListener("abort",abortHandler)})})}};let eo={STANDARD_CAMERA:{maxAttempts:5,baseDelay:200,maxDelay:2e3,backoffFactor:1.5,deviceType:J.lW.Camera},STANDARD_MICROPHONE:{maxAttempts:3,baseDelay:200,maxDelay:1e3,backoffFactor:1.8,deviceType:J.lW.Microphone},MICROPHONE_NO_FALLBACK:{maxAttempts:5,baseDelay:200,maxDelay:2e3,backoffFactor:1.5,deviceType:J.lW.Microphone}};var es=a(0xef5ec459);async function handleDeviceInitError({callLogger:e,error:t,deviceType:a,observer:n}){let r=classifyError(t),i=`Device error for ${a}: ${r.errorName} (${t.message}). Category: ${r.category}, Severity: ${r.severity}`;return(e.error(i),r.category===ei.PERMISSION)?n.onSelfPermissionUpdated(!0,a):reportDeviceError(n,a,r.errorName),{success:!1,errorName:r.errorName,shouldTerminate:!0}}var ec=a(0x152e2322a),ed=a(0x1da5e2fd),em=a(0x1806236df),eu=a(0xab5d2f25),ep=a(0x9c32dee);let AudioLevelMonitor=class AudioLevelMonitor{previewAudioAnalyser;timeoutId=-1;deviceId;constructor(){this.monitorAudioLevel()}monitorAudioLevel=()=>{this.previewAudioAnalyser&&ep.B.subscriberCount>0&&ep.B.publish({level:this.previewAudioAnalyser.getLevel(),deviceId:this.deviceId}),this.timeoutId=window.setTimeout(this.monitorAudioLevel,300)};stop(){this.previewAudioAnalyser=void 0,clearTimeout(this.timeoutId)}setPreviewAudioAnalyser(e,t){this.previewAudioAnalyser=e,this.deviceId=t}};var eh=a(0x24aafb965);let AudioAnalyser=class AudioAnalyser{analyserNode;data;constructor(e){this.analyserNode=e,this.data=new Uint8Array(this.analyserNode.fftSize)}getLevel(){return this.analyserNode.getByteTimeDomainData(this.data),(0,eh.n2)(this.data)/eh.Ep}};var e_=a(0x90c529f0),ef=((r=ef||{}).START_PREVIEW="start-preview",r.STOP_PREVIEW="stop-preview",r.ENABLE="enable",r.DISABLE="disable",r);let DeviceManager=class DeviceManager{audioVideoFacade;audioOutputElement;observer;options;isStartMutedBarrierActive;chimeLogger;defaultDeviceController;voiceFocusManager;callLogger=(0,k.Jt)("DEVICES");prefs;audioLevelMonitor;isCameraEnabled;videoStreamBindingRetryTimeout;videoStreamBindingRetryCount=0;MAX_VIDEO_STREAM_BINDING_RETRIES=3;waitForCameraReady=(0,c.u)();audioInputDeviceRefreshTimer;videoInputDeviceRefreshTimer;isAudioOutputElementBound=!1;audioInputTrackHandler;voiceFocusDevice;videoProcessingManager;cameraPreviewVideoElement;isShuttingDown=!1;huddleEventsTrace;cameraMetricsTimeout=null;micPermissionDenied=!1;retryManager;ongoingOperations=new Map;activeMicrophoneDeviceId;activeMicrophoneDeviceLabel;activeAudioOutputDeviceId;constructor(e,t,a,n,r=!1,i,l,o){this.audioVideoFacade=e,this.audioOutputElement=t,this.observer=a,this.options=n,this.isStartMutedBarrierActive=r,this.chimeLogger=i,this.defaultDeviceController=l,this.voiceFocusManager=o,this.updateMicrophone=serialGuard(this,this.updateMicrophone,{skipIntermediatePendingRuns:!1}),this.updateSpeaker=serialGuard(this,this.updateSpeaker,{skipIntermediatePendingRuns:!1}),this.updateCamera=serialGuard(this,this.updateCamera,{skipIntermediatePendingRuns:!1}),this.handleCameraChanges=serialGuard(this,this.handleCameraChanges,{skipIntermediatePendingRuns:!1}),this.audioElementErrorHandler=this.audioElementErrorHandler.bind(this),this.audioVideoFacade.addDeviceChangeObserver(this),this.prefs=(0,er.Bh)(),this.addAudioElementErrorHandler(),this.audioLevelMonitor=new AudioLevelMonitor,this.voiceFocusManager?this.callLogger.info(`Voice Focus available?: ${this.voiceFocusManager.isAvailable()}`):this.callLogger.warn("Voice Focus manager not available"),this.prefs.audio&&this.callLogger.info(`Noise suppression setting: ${this.prefs.audio.enableNoiseSuppression}`),this.videoProcessingManager=new eu.Q(this.chimeLogger);const{huddleEventsTrace:s}=(0,F.A)().getAllTraceHandlers();this.huddleEventsTrace=s,this.retryManager=new DeviceRetryManager({logger:this.callLogger,observer:this.observer}),(0,Z.L)().logAllNativeDeviceDetails()}async shutdown(){this.isShuttingDown=!0,this.videoStreamBindingRetryTimeout&&(clearTimeout(this.videoStreamBindingRetryTimeout),this.videoStreamBindingRetryTimeout=void 0,this.videoStreamBindingRetryCount=0),this.activeAudioOutputDeviceId=void 0,this.activeMicrophoneDeviceId=void 0,this.activeMicrophoneDeviceLabel=void 0,this.voiceFocusDevice&&(await this.voiceFocusDevice.stop(),await this.voiceFocusManager?.tearDown(),this.voiceFocusDevice=void 0),this.observer.onClearAllAlerts(),this.audioVideoFacade.removeDeviceChangeObserver(this),this.audioVideoFacade.stopLocalVideoTile(),this.audioVideoFacade.unbindAudioElement(),this.removeAudioElementErrorHandler(),await this.videoProcessingManager?.shutdown(),this.audioInputDeviceRefreshTimer&&(clearTimeout(this.audioInputDeviceRefreshTimer),this.audioInputDeviceRefreshTimer=null),this.videoInputDeviceRefreshTimer&&(clearTimeout(this.videoInputDeviceRefreshTimer),this.videoInputDeviceRefreshTimer=null),this.cameraMetricsTimeout&&(clearTimeout(this.cameraMetricsTimeout),this.cameraMetricsTimeout=null),await (0,f._R)()?.getAudioContext()?.suspend(),this.callLogger.info("Audio context suspended"),this.audioLevelMonitor?.stop(),delete this.audioLevelMonitor,this.audioInputTrackHandler&&(this.audioInputTrackHandler.tearDown(),delete this.audioInputTrackHandler),(0,d._)().stopLocalMonitor(),this.callLogger.info("Device manager shutdown complete")}resetCameraReadyState(){this.callLogger.info("Resetting camera ready state to allow retry after errors"),this.waitForCameraReady=(0,c.u)()}async ensureVideoTileStarted(e){let t=this.audioVideoFacade.hasStartedLocalVideoTile()&&this.hasLocalTileWithoutBoundStream(),a=!this.audioVideoFacade.hasStartedLocalVideoTile();if(t||a){this.callLogger.info(`${e} - ${t?"Restarting":"Starting"} video tile`),t&&this.audioVideoFacade.stopLocalVideoTile(),this.waitForCameraReady=(0,c.u)();try{this.audioVideoFacade.startLocalVideoTile()}catch(t){throw this.callLogger.error(`${e} - Error starting video tile:`,t),t instanceof Error&&"NotReadableError"===t.name&&this.observer.onVideoDeviceError("NotReadableError"),t}if(!this.isCameraEnabled)return this.callLogger.info(`${e} - Camera disabled before waiting for video tile, aborting early`),this.waitForCameraReady.reject(Error("Camera disabled")),this.audioVideoFacade.hasStartedLocalVideoTile()&&this.audioVideoFacade.stopLocalVideoTile(),!0;try{await this.waitForCameraReady}catch(e){throw this.callLogger.info("Camera disabled before self video stream was properly bound. Cleaning up."),this.audioVideoFacade.hasStartedLocalVideoTile()&&this.audioVideoFacade.stopLocalVideoTile(),e}return!0}return!1}cancelOngoingOperation(e){let t=this.ongoingOperations.get(e);t&&(this.callLogger.info(`Cancelling ongoing ${e} operation`),t.abort(),this.ongoingOperations.delete(e))}async init(){!this.checkShutdownState("device manager initialization")&&(await this.determineInitialMicrophonePermissionState(),this.enumerateDevices(),this.logDevices(),await this.updateMicrophone(),await this.updateSpeaker(),this.isCameraEnabled&&await this.updateCamera())}async determineInitialMicrophonePermissionState(){(0,I.y3)()?await this.determineInitialMicrophonePermissionStateForDesktop():await this.determineInitialMicrophonePermissionStateForBrowser()}async determineInitialMicrophonePermissionStateForBrowser(){let e,{status:t}=ec.Ay.canAccessMediaResource(N.mT.MICROPHONE);(t===J.eJ.Prompt||t===J.eJ.NotDetermined||t===J.eJ.Unknown)&&(await this.audioVideoFacade.listAudioInputDevices(!0),e=ec.Ay.canAccessMediaResource(N.mT.MICROPHONE).status),(t===J.eJ.Denied||e===J.eJ.Denied)&&(this.observer.onBrowserMediaDeviceAccessDenied(N.mT.MICROPHONE),this.callLogger.warn("setting microphone to muted as microphone permission was not available during initialization"),this.setStartMutedBarrier(!0))}async determineInitialMicrophonePermissionStateForDesktop(){let e=await this.maybeCheckSystemMediaAccess(N.mT.MICROPHONE);(0,I.j9)()||!(0,I.uF)()&&e&&e?.status===J.eJ.Denied&&(this.callLogger.warn("setting microphone to muted as microphone permission was not available during initialization"),this.setStartMutedBarrier(!0))}async setAGC(e){this.prefs.audio&&this.prefs.audio.enableAGC!==e&&(this.callLogger.info(`AGC setting changed: ${e}`),this.prefs.audio.enableAGC=e,(0,er.i4)(this.prefs),await this.updateMicrophone())}async setPreferredDevice(e,t){switch(this.cancelOngoingOperation(t),t){case J.lW.Microphone:await this.updateMicrophone();break;case J.Q4:await this.updateSpeaker();break;case J.lW.Camera:this.isCameraEnabled?(this.callLogger.info("setPreferredDevice - Camera is enabled, updating camera after device switch"),await this.updateCamera(),await this.ensureVideoTileStarted("setPreferredDevice")):this.callLogger.info("setPreferredDevice - Camera is disabled, skipping camera update")}}async setPreferredCameraDeviceForPreview(e){this.enumerateDevices(),await this.updateCamera()}async setVideoBackgroundEffect({effect:e,effectBgKey:t,customBgImg:a}){this.prefs.video&&(this.callLogger.info(`Video background effect changed: ${e} bgKey: ${t} customBgImg: ${!!a}`),this.prefs.video.effect=e,this.prefs.video.effectBgKey=t,this.prefs.video.customBgImg=a,(0,er.i4)(this.prefs),this.isCameraEnabled&&await this.updateCamera())}async setNoiseSuppression(e){this.prefs.audio&&this.prefs.audio.enableNoiseSuppression!==e&&(this.callLogger.info(`Noise suppression setting changed: ${e}`),this.prefs.audio.enableNoiseSuppression=e,(0,er.i4)(this.prefs),await this.updateMicrophone())}async setStartMutedBarrier(e){!this.isStartMutedBarrierActive&&e?this.callLogger.warn("ALERT: Audio input will be muted until the start muted barrier is released"):this.isStartMutedBarrierActive&&!e&&this.callLogger.info("Start muted barrier released"),this.isStartMutedBarrierActive=e}async setMicrophone(e){if(!this.checkShutdownState("setMicrophone")){if(this.voiceFocusManager){let t=this.options.useHuddlesVoiceFocusSwap?!e:e;await this.voiceFocusManager.setMute(t)}if(!e){this.audioVideoFacade.realtimeMuteLocalAudio(),this.huddleEventsTrace?.update({name:$.p.MICROPHONE,type:$.G.STOP});return}this.isStartMutedBarrierActive&&this.setStartMutedBarrier(!1),this.audioVideoFacade.realtimeUnmuteLocalAudio(),this.huddleEventsTrace?.update({name:$.p.MICROPHONE,type:$.G.START})}}requestPreviewStreamForDeviceId(e,t,a){t===J.lW.Camera&&this.handleCameraChanges({type:"start-preview",deviceId:e,videoElement:a})}stopVideoPreviewForVideoInput(e){this.handleCameraChanges({type:"stop-preview",videoElement:e||this.cameraPreviewVideoElement})}setCamera(e){if(!this.checkShutdownState("setCamera")&&e!==this.isCameraEnabled){if(!e&&this.waitForCameraReady)try{this.waitForCameraReady.reject(Error("Camera disabled")),this.callLogger.info("setCamera - Rejecting waitForCameraReady deferred due to camera disable")}catch{}this.isCameraEnabled=e,this.isCameraEnabled?(this.handleCameraChanges({type:"enable"}),this.maybeCheckSystemMediaAccess(N.mT.CAMERA)):this.handleCameraChanges({type:"disable"})}}setCameraQuality(e,t,a,n,r=!1){!this.checkShutdownState("setCameraQuality")&&(this.callLogger.info(`Camera quality settings changed: ${e}x${t}@${a}fps ${n}kbps`),this.audioVideoFacade.chooseVideoInputQuality(e,t,a),r||this.audioVideoFacade.setVideoMaxBandwidthKbps(n))}localVideoTileDidUpdate(e){e.isContent||this.isCameraEnabled?this.waitForCameraReady.resolve():this.waitForCameraReady.reject(Error("Camera disabled"))}async maybeBindAudioOutputElement(){if(!this.checkShutdownState("maybeBindAudioOutputElement")&&!this.isAudioOutputElementBound&&this.audioOutputElement){try{await this.audioVideoFacade.bindAudioElement(this.audioOutputElement)}catch(t){let e=(0,L.iT)(t);this.callLogger.info(`bindAudioElement failed: error: ${e.name}, message: ${e.message}`);return}this.isAudioOutputElementBound=!0}}async maybeCheckSystemMediaAccess(e){if(!(0,I.y3)()){let{status:t}=ec.Ay.canAccessMediaResource(e);if(t===J.eJ.Granted)return{isAvailable:!1,status:J.eJ.Granted}}if((0,I.cX)())try{let t,a=ec.Ay.canAccessMediaResource(e);if(this.callLogger.info(`DeviceManager::getMediaAccessStatus ${e} electron API available: ${a.isAvailable} and status: ${a.status}`),!a.isAvailable)return{isAvailable:!1,status:J.eJ.NotDetermined};if(a.status===J.eJ.Granted)return this.observer.onDeviceAccessApproved(e),a;if((!a.status||a.status===J.eJ.NotDetermined)&&(a.status||this.callLogger.info(`DeviceManager::getMediaAccessStatus ${e} status is missing. Re-requesting media access`),t="screen"===e?null:await ec.Ay.requestMediaAccess(e),this.callLogger.info(`DeviceManager::askForMediaAccess ${e} electron API available: ${!!t?.isAvailable} and isConsentGranted: ${t?.isGranted}`),"screen"!==e&&t?.isGranted))return this.observer.onDeviceAccessApproved(e),{status:J.eJ.Granted,isAvailable:!0};return(a.status===J.eJ.Denied||t&&!t.isGranted)&&(this.micPermissionDenied=!0,this.observer.onCheckSystemMediaAccess(e)),a}catch(t){this.callLogger.info(`DeviceManager::Error retrieving system access for ${e}: ${t}`)}return{isAvailable:!1,status:J.eJ.NotDetermined}}audioInputsChanged=async()=>{if(!this.checkShutdownState("audioInputsChanged")){if(await (0,ed.es)(),this.logDevices([J.lW.Microphone]),this.activeMicrophoneDeviceId&&this.options.useHuddlesAlertDeviceWarningUpdates){let e=(0,ed.T5)();if(!(e?.microphone||[]).some(e=>e.id===this.activeMicrophoneDeviceId)){let e=(0,ed.Nj)(J.lW.Microphone);e&&e.id!==this.activeMicrophoneDeviceId&&this.activeMicrophoneDeviceLabel&&(this.callLogger.warn(`Microphone device ${this.activeMicrophoneDeviceId} with label ${this.activeMicrophoneDeviceLabel} is no longer available and has been switched to ${e.id} with label ${e.label}`),this.observer.onAudioDeviceError("AudioSwitched",e.label,this.activeMicrophoneDeviceLabel))}}this.observer.onClearNoMediaInput(N.mT.MICROPHONE)}};audioInputMuteStateChanged(e,t){this.callLogger.info(`DeviceManager::audioInputMuteStateChanged: device: ${e}, ${t?"muted":"unmuted"}`)}audioInputStreamEnded(e){e&&(this.callLogger.info("DeviceManager::audioInputStreamEnded"),(0,ed.Nj)(J.lW.Microphone)?.id===e&&(this.callLogger.warn("Call audio stream ended unexpectedly"),this.observer.onSetNoMediaInput(N.mT.MICROPHONE)))}audioOutputsChanged=async()=>{if(!this.checkShutdownState("audioOutputsChanged")){if(this.callLogger.info("DeviceManager::audioOutputsChanged"),await (0,ed.es)(),this.logDevices([J.Q4]),this.activeAudioOutputDeviceId&&this.options.useHuddlesAlertDeviceWarningUpdates){let e=(0,ed.T5)();if(!(e?.[J.Q4]||[]).some(e=>e.id===this.activeAudioOutputDeviceId)){let e=(0,ed.Nj)(J.Q4);e&&e.id!==this.activeAudioOutputDeviceId&&(this.callLogger.warn(`Audio output device ${this.activeAudioOutputDeviceId} is no longer available and has been switched to ${e.id}`),this.observer.onAudioDeviceError("AudioOutputSwitched",e.label))}}this.observer.onClearNoAudioOutput(N.NS.AUDIO_ELEMENT_ERROR)}};tryToReconnectCamera=(0,X.A)(async()=>{try{if(this.retryManager){let e=this.retryManager.stateManager.disconnectedDevices.get(J.lW.Camera);if(e&&this.retryManager.stateManager.shouldAutoReconnectDevice(J.lW.Camera,e.deviceId)){await (0,ed.es)();let t=(0,ed.T5)();if(!t?.camera?.some(t=>t.id===e.deviceId&&t.type===J.lW.Camera))return void this.callLogger.info(`Camera: ${e.deviceId} is not available, skipping auto-reconnection`);this.callLogger.info(`Auto-reconnecting camera: ${e.deviceId} (disconnected ${Date.now()-e.disconnectedAt}ms ago)`),this.observer.onClearNoMediaInput(N.mT.CAMERA),await this.updateCamera(),this.observer.onToggleVideo(!0)}}}catch(e){this.callLogger.error("Error during camera reconnection:",e)}},2500,{leading:!1,trailing:!0});videoInputsChanged=async()=>{this.checkShutdownState("videoInputsChanged")||(this.callLogger.info("DeviceManager::videoInputsChanged"),await (0,ed.es)(),this.logDevices([J.lW.Camera]),await this.tryToReconnectCamera())};async videoInputStreamEnded(e){this.checkShutdownState("videoInputStreamEnded")||e&&(this.callLogger.info("DeviceManager::videoInputStreamEnded"),this.retryManager&&this.retryManager.stateManager.recordDeviceDisconnection(J.lW.Camera,e),this.observer.onSetNoMediaInput(N.mT.CAMERA),this.observer.onVideoDeviceError("NotFoundError"))}logDevices(e=en.LL){let t=(0,ed.T5)();t?(0,en.my)(this.callLogger,t,e):this.callLogger.error("No devices found")}getPreferredDevice(e){let t=(0,ed.Nj)(e);return this.callLogger.info(`getPreferredDevice - type=${e}, device=${t?.id||"undefined"}, label=${t?.label||"undefined"}`),t}enumerateDevices(){if(this.checkShutdownState("enumerateDevices"))return;let e=(0,ed.T5)();e?(this.callLogger.info("V2 devices found. Updating device store"),(0,Z.L)().enumerateDevices(),this.observer.onDevicesUpdated(e)):this.callLogger.error("No devices found in v2 device manager")}async handleCameraChanges(e){switch(e.type){case"start-preview":await this.runCameraActivityStartPreview(e);break;case"stop-preview":await this.runCameraActivityStopPreview(e);break;case"enable":await this.runCameraActivityEnable();break;case"disable":await this.runCameraActivityDisable()}}async swapVoiceFocusDevice(e){if(this.checkShutdownState("swapVoiceFocusDevice"))return;this.callLogger.info("swapVoiceFocusDevice - Starting voice focus device swap");let t=!!this.prefs.audio&&this.prefs.audio.enableNoiseSuppression;if(!(this.voiceFocusManager&&this.voiceFocusManager.isAvailable()&&t))return void this.callLogger.info("Voice Focus manager not found or not available or noise suppression is disabled");try{if(this.checkShutdownState("swapVoiceFocusDevice"))return void this.callLogger.warn("Device manager shutting down, aborting voice focus swap");if(await this.voiceFocusManager.swapToVoiceFocusDevice(e),this.voiceFocusDevice=this.voiceFocusManager.getCurrentVoiceFocusDevice(),!this.voiceFocusDevice)return void this.callLogger.warn("Voice focus device is null after swap, audio will continue without noise suppression");if(this.checkShutdownState("swapVoiceFocusDevice"))return void this.callLogger.warn("Device manager shutting down, aborting startAudioInput");let t=await this.audioVideoFacade.startAudioInput(this.voiceFocusDevice);this.onAudioStreamSuccessfullyInitialized(t),this.callLogger.info("started with Voice focus after swap")}catch(e){this.callLogger.error("Voice focus swap failed, audio will continue without noise suppression",e)}}async updateMicrophone(){let e;this.callLogger.info("updateMicrophone - Starting microphone update");let t=this.getPreferredDevice(J.lW.Microphone);if(!t)return void this.callLogger.info("No audio input device found");let{id:a,label:n}=t;this.callLogger.info(`updateMicrophone - Selected audio input device: ${t.label||t.id}, deviceId: ${a}, deviceLabel: ${n}`),this.micPermissionDenied&&this.callLogger.error("Microphone permission is denied. The user must grant permissions and fully quit and restart Slack to join the Huddle");let r=!this.prefs.audio||this.prefs.audio.enableAGC;this.options.useHuddlesExactDeviceIdConstraint?(this.callLogger.info("Applying track constraints with useHuddlesExactDeviceIdConstraint experiment enabled"),e={autoGainControl:{ideal:r},deviceId:{exact:a}}):e={autoGainControl:{ideal:r},deviceId:a},this.options.useHuddlesExactDeviceIdConstraint?this.callLogger.info(`updateMicrophone - Track constraints: deviceId=${a}, autoGainControl=${r}`):this.callLogger.info(`updateMicrophone - Track constraints: deviceId=${e.deviceId}, autoGainControl=${e.autoGainControl}`);let i=!0,l=!!this.prefs.audio&&this.prefs.audio.enableNoiseSuppression;if(this.voiceFocusManager&&this.voiceFocusManager.isAvailable()&&l&&!this.options.useHuddlesVoiceFocusSwap){if(this.voiceFocusDevice||(this.callLogger.info("Getting Voice Focus transform device as it did not exist"),this.voiceFocusDevice=await this.voiceFocusManager.getTransformDevice(),this.voiceFocusDevice?.addObserver(this.voiceFocusManager)),this.voiceFocusDevice){let t=await this.voiceFocusDevice.chooseNewInnerDevice(e);this.voiceFocusDevice=t}this.voiceFocusDevice||(this.callLogger.warn("Could not get Voice Focus transform, setting noise suppression to false"),i=!1)}else i=!1;this.voiceFocusDevice&&(0,em.Y)({name:em.R1.VoiceFocusDevice,ref:this.voiceFocusDevice}),this.callLogger.info(`Voice focus setup: ${i} noise suppression: ${l}`);try{if(this.isStartMutedBarrierActive&&(this.callLogger.info("Start muted barrier active"),this.audioVideoFacade.realtimeMuteLocalAudio()),i)if(this.voiceFocusDevice)await this.initAudioInput(this.voiceFocusDevice);else throw Error("Trying noise suppression with no voice focus transform device");else navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&Object.prototype.hasOwnProperty.call(navigator.mediaDevices.getSupportedConstraints(),"noiseSuppression")&&l&&(e.noiseSuppression=!0),await this.initAudioInput(e)}catch(t){let e=(0,L.iT)(t);this.callLogger.error(`chooseAudioInputDevice failed: error: ${e.name}, message: ${e.message}`),await handleDeviceInitError({callLogger:this.callLogger,error:e,deviceType:J.lW.Microphone,observer:this.observer});return}this.observer.onClearAudioDeviceErrors(),this.initAudioAnalyserForPreview(),((e,t,a,n)=>{let{isSuccessfulUpdate:r,deviceId:i}=(0,ea.uW)(e,a);i?.startsWith("WebAudio-")?n.info("WebAudio device ID detected, suppressing device selection check."):r?n.info(`Used audio input track device id matches the preferred device id (${a})`):(n.warn(`Used audio input track device id (${i}) does not match the preferred device id (${a}). 
            Preferred device is unavailable. User may report issues with other participants hearing them.`),t.onAudioDeviceError("DeviceReverted"))})(this.defaultDeviceController,this.observer,a,this.callLogger),this.setupAudioInputTrackHandler(),this.observer.onSelfPermissionUpdated(this.micPermissionDenied,J.lW.Microphone),this.attemptToInitMicrophoneNative(t.label),(0,Z.L)().logNativeDeviceDetails(t.id),this.callLogger.info("updateMicrophone - Microphone update completed successfully")}attemptToInitMicrophoneNative=(0,X.A)(async e=>{if((0,Z.L)().isNativeDeviceManagerAvailable())return void(0,Z.L)().attemptToInitMicrophoneNative(e);try{if(!e)return;let{error:t,canInit:a}=await (0,e_.Lh)(e);(0,ee.A)(t)?t.includes("Method not available")||t.includes("only supported on Windows")?this.callLogger.info("Microphone init test not supported on this client"):a||this.callLogger.warn(`ALERT! Possible init failure for microphone with device: ${e}: ${t}`):this.callLogger.info(`Successfully initialized microphone with device: ${e}`)}catch(e){this.callLogger.error("Error attempting to init audio device",e)}},1e3);async updateSpeaker(){if(this.checkShutdownState("updateSpeaker"))return;let e=this.getPreferredDevice(J.Q4);if(!e)return void this.callLogger.info("No audio output device found");let{id:t,label:a}=e;this.callLogger.info(`Selected audio output device id: ${e.label||e.id}, deviceId: ${t}, deviceLabel: ${a}`),await this.audioVideoFacade.chooseAudioOutput(t),this.activeAudioOutputDeviceId=t,this.callLogger.info(`Tracking active audio output device: ${this.activeAudioOutputDeviceId}`),this.observer.onOutputDeviceChanged({id:e.id,type:J.Q4}),(0,ed.i_)(t,J.Q4)}async updateCamera(e){if(this.checkShutdownState("updateCamera"))return;this.retryManager?.stateManager.clearDeviceDisconnection(J.lW.Camera);let t=e||this.getPreferredDevice(J.lW.Camera);if(!t)return void this.callLogger.info("No video input device found");this.callLogger.info(`Selected video input device id: ${t.label||t.id}`);try{await this.setCameraVideoInputDevice(t),this.observer.onClearVideoDeviceErrors()}catch(e){await handleDeviceInitError({callLogger:this.callLogger,error:(0,L.iT)(e),deviceType:J.lW.Camera,observer:this.observer});return}this.observer.onSelfPermissionUpdated(!1,J.lW.Camera)}async setCameraVideoInputDevice(e){let t;if(await this.videoProcessingManager?.clearVideoTransformDeviceRefs(),!this.checkShutdownState("setCameraVideoInputDevice")){if(this.options.backgroundVideoFilteringSetting===J.uT.NONE)return void await this.initVideoInput(e.id);switch(this.prefs.video.effect){case es.t.Blur:t=await this.videoProcessingManager.processVideoWithBackgroundBlur(e);break;case es.t.Background:this.options.backgroundVideoFilteringSetting!==J.uT.Both?t=e.id:("BEACH"===this.prefs.video.effectBgKey&&(this.prefs.video.effectBgKey="LIVING_ROOM",(0,er.i4)(this.prefs)),t=await this.videoProcessingManager.processVideoWithBackgroundReplacement({videoDevice:e,selectedBackgroundImageKey:this.prefs.video.effectBgKey,customBgImg:this.prefs.video.customBgImg}));break;default:t=e.id}await this.initVideoInput(t)}}async initVideoInputDevices(){let e=(await this.audioVideoFacade.listVideoInputDevices()).length>0;return e||this.observer.onSelfPermissionUpdated(!0,J.lW.Camera),this.prefs=(0,er.Bh)(),this.enumerateDevices(),e}async runCameraActivityStartPreview(e){let t=e.deviceId,a=e.videoElement;t&&a&&(this.cameraPreviewVideoElement=a,await this.setPreferredCameraDeviceForPreview(t),await this.startCameraPreview())}async runCameraActivityStopPreview(e){let t=e.videoElement;t&&(t!==this.cameraPreviewVideoElement&&this.callLogger.warn("Mismatch in preview video element"),this.audioVideoFacade.hasStartedLocalVideoTile()?this.detachStreamFromCameraPreview():this.stopCameraPreview(),delete this.cameraPreviewVideoElement)}async runCameraActivityEnable(){let e;this.callLogger.info("runCameraActivityEnable - Starting camera enablement"),await (0,ed.es)(),!this.audioVideoFacade.hasStartedLocalVideoTile()&&this.cameraPreviewVideoElement&&(this.callLogger.info("runCameraActivityEnable - Stopping camera preview before enabling"),this.stopCameraPreview()),this.callLogger.info("runCameraActivityEnable - Updating camera device"),await this.updateCamera();try{e=await this.ensureVideoTileStarted("runCameraActivityEnable")}catch(e){if(e instanceof Error&&e.message?.includes("Camera disabled"))return void this.callLogger.info("runCameraActivityEnable - Camera disabled during initialization, aborting enable");throw e}e||this.callLogger.info("runCameraActivityEnable - Local video tile already started and bound"),this.callLogger.info("runCameraActivityEnable - Attaching stream to camera preview"),this.attachStreamToCameraPreview(),this.huddleEventsTrace?.update({name:$.p.VIDEO,type:$.G.START}),this.callLogger.info("runCameraActivityEnable - Camera enablement completed")}async runCameraActivityDisable(){this.detachStreamFromCameraPreview(),this.audioVideoFacade.stopLocalVideoTile(),await this.audioVideoFacade.stopVideoInput(),this.huddleEventsTrace?.update({name:$.p.VIDEO,type:$.G.STOP}),this.cameraPreviewVideoElement&&(this.isShuttingDown||(await this.updateCamera(),await this.startCameraPreview()))}async startCameraPreview(){this.cameraPreviewVideoElement&&(this.waitForCameraReady=(0,c.u)(),this.audioVideoFacade.startVideoPreviewForVideoInput(this.cameraPreviewVideoElement),this.cameraPreviewVideoElement.addEventListener("canplay",e=>{this.waitForCameraReady.resolve()}),await this.waitForCameraReady)}async stopCameraPreview(){this.cameraPreviewVideoElement&&(this.audioVideoFacade.stopVideoPreviewForVideoInput(this.cameraPreviewVideoElement),await this.audioVideoFacade.stopVideoInput())}attachStreamToCameraPreview(){if(!this.cameraPreviewVideoElement)return;let e=this.audioVideoFacade.getLocalVideoTile()?.state();e&&e.boundVideoStream?(this.callLogger.info("Attaching video stream to camera preview"),f.xc.connectVideoStreamToVideoElement(e.boundVideoStream,this.cameraPreviewVideoElement,!0)):this.callLogger.warn(`Cannot attach video stream to camera preview: ${!e?"no video tile state":"no bound video stream"}`)}detachStreamFromCameraPreview(){this.cameraPreviewVideoElement&&f.xc.disconnectVideoStreamFromVideoElement(this.cameraPreviewVideoElement,!0)}addAudioElementErrorHandler(){this.audioOutputElement.addEventListener("error",this.audioElementErrorHandler)}removeAudioElementErrorHandler(){this.audioOutputElement.removeEventListener("error",this.audioElementErrorHandler)}audioElementErrorHandler(e){let t=e.target?.error?.code||"unavailable",a=e.target?.error?.message||e.message;this.callLogger.warn(`HTML_AUDIO_ELEMENT_ERROR code: ${t}, message: ${a}`),this.observer.onSetNoAudioOutput(N.NS.AUDIO_ELEMENT_ERROR)}initAudioAnalyserForPreview(){let e=(0,f._R)().getAudioContext();if(!e)return void this.callLogger.warn("Unable to get AudioContext");e.resume();let t=this.audioVideoFacade.createAnalyserNodeForAudioInput();if(t){let e=new AudioAnalyser(t);this.audioLevelMonitor?.setPreviewAudioAnalyser(e)}}setupAudioInputTrackHandler(){this.audioInputTrackHandler&&(this.callLogger.info("Tearing down previous Audio Input Track Handler"),this.audioInputTrackHandler.tearDown(),this.audioInputTrackHandler=void 0),this.callLogger.info("Setting up new audio input track handler"),this.audioInputTrackHandler=new AudioInputTrackHandler(this.defaultDeviceController,this.observer,this.callLogger),this.audioInputTrackHandler.initialize()}initAudioInput=async e=>{if(!e)return void this.callLogger.info("initAudioInput no audio input device was provided");this.cancelOngoingOperation(J.lW.Microphone);let t=new AbortController;this.ongoingOperations.set(J.lW.Microphone,t);let a=performance.now(),n=setTimeout(()=>{this.callLogger.warn("startAudioInput took longer than 5000ms")},5e3),r=setTimeout(()=>{this.callLogger.warn("startAudioInput possibly failed took longer than 15000ms"),this.observer.onAudioInitPossiblyFailed()},15e3);try{let a=((0,ed.ty)(J.lW.Microphone)||[]).filter(e=>"default"!==e.id).length>1,n=await this.retryManager?.handleDeviceInit({operation:()=>this.audioVideoFacade.startAudioInput(e),deviceType:J.lW.Microphone,deviceId:(0,ea.IP)(e),operationName:"Audio input initialization",abortController:t,retryConfig:a?eo.STANDARD_MICROPHONE:eo.MICROPHONE_NO_FALLBACK});if(n?.success&&(this.onAudioStreamSuccessfullyInitialized(n?.result),this.options.useHuddlesVoiceFocusSwap&&await this.swapVoiceFocusDevice(e)),n?.tryFallbackDevice&&this.options.useHuddlesExactDeviceIdConstraint){this.callLogger.info("startAudioInput - Trying fallback device by removing exact constraint. This will revert to default device.");let t=JSON.parse(JSON.stringify(e));t.device.exact&&(t.device.ideal=t.device.exact,delete t.device.exact);let a=await this.audioVideoFacade.startAudioInput(t);this.onAudioStreamSuccessfullyInitialized(a),this.options.useHuddlesVoiceFocusSwap&&(await this.swapVoiceFocusDevice(t),this.callLogger.info("started with Voice focus after fallback"))}else if(!n?.success)throw n?.error||Error("Audio input initialization failed");(0,d._)().setAudioDeviceSuccessfullyInitialized()}catch(e){throw this.callLogger.error("startAudioInput failed",e),e}finally{clearTimeout(n),clearTimeout(r);let e=performance.now();this.observer.onAudioInitTimeTaken(e-a),this.ongoingOperations.delete(J.lW.Microphone)}};onAudioStreamSuccessfullyInitialized(e){if(!e)return void this.callLogger.warn("Audio stream is undefined, no audio detection will be triggered");let t=(0,ed.Nj)(J.lW.Microphone);t?.id&&(this.activeMicrophoneDeviceId=t.id,this.activeMicrophoneDeviceLabel=t.label,this.callLogger.info(`Tracking active microphone device: ${this.activeMicrophoneDeviceId} with label: ${this.activeMicrophoneDeviceLabel}`)),this.callLogger.info("Setting local audio monitor"),(0,d._)().startLocalMonitor(e)}initVideoInput=async e=>{if(this.checkShutdownState("initVideoInput")||!e)return;this.cancelOngoingOperation(J.lW.Camera);let t=new AbortController;this.ongoingOperations.set(J.lW.Camera,t),this.callLogger.info(`initVideoInput - Starting video input for device: ${(0,ea.IP)(e)}`);try{this.callLogger.info("initVideoInput - Using retry logic for video input initialization");let a=await this.retryManager?.handleDeviceInit({operation:()=>this.audioVideoFacade.startVideoInput(e),deviceType:J.lW.Camera,deviceId:(0,ea.IP)(e),operationName:"Video input initialization",abortController:t,retryConfig:eo.STANDARD_CAMERA});if(a?.success)this.callLogger.info(`initVideoInput - Video input initialization successful with retry (attempts: ${a.attempts})`);else throw this.callLogger.error(`initVideoInput - Video input initialization failed: ${a?.error?.message}`),a?.error||Error("Video input initialization failed")}finally{this.ongoingOperations.delete(J.lW.Camera)}this.recordCameraResolution();let a=(0,et.A)(e,"device",e);"string"==typeof a&&(0,ed.i_)(a,J.lW.Camera),this.hasLocalTileWithoutBoundStream()&&(this.callLogger.info("initVideoInput - Video tile created but no bound stream, will restart after delay"),this.videoStreamBindingRetryTimeout&&clearTimeout(this.videoStreamBindingRetryTimeout),this.videoStreamBindingRetryCount=0,this.videoStreamBindingRetryTimeout=setTimeout(async()=>{await this.retryVideoStreamBinding()},1e3))};hasLocalTileWithoutBoundStream(){let e=this.audioVideoFacade.getLocalVideoTile(),t=e?.state();return!!e&&!!t&&e&&t&&!t.boundVideoStream}async retryVideoStreamBinding(){if(!this.checkShutdownState("retryVideoStreamBinding")){if(!this.hasLocalTileWithoutBoundStream()||!this.isCameraEnabled){this.callLogger.info("retryVideoStreamBinding - Video stream already bound or camera disabled, skipping retry"),this.videoStreamBindingRetryCount=0;return}if(this.videoStreamBindingRetryCount+=1,this.callLogger.info(`retryVideoStreamBinding - Attempt ${this.videoStreamBindingRetryCount}/${this.MAX_VIDEO_STREAM_BINDING_RETRIES} to bind video stream`),this.videoStreamBindingRetryCount>this.MAX_VIDEO_STREAM_BINDING_RETRIES){this.callLogger.error("retryVideoStreamBinding - Max retries exceeded. Video stream binding failed."),this.observer.onVideoDeviceError("VideoNotFoundError"),this.videoStreamBindingRetryCount=0;return}try{await this.ensureVideoTileStarted("retryVideoStreamBinding"),this.callLogger.info("retryVideoStreamBinding - Video tile restart successful"),this.videoStreamBindingRetryCount=0}catch(t){this.callLogger.error(`retryVideoStreamBinding - Error ensuring video tile started (attempt ${this.videoStreamBindingRetryCount}):`,t);let e=1e3*2**(this.videoStreamBindingRetryCount-1);this.callLogger.info(`retryVideoStreamBinding - Scheduling next retry in ${e}ms`),this.videoStreamBindingRetryTimeout=setTimeout(async()=>{await this.retryVideoStreamBinding()},e)}}}recordCameraResolution=()=>{this.cameraMetricsTimeout=setTimeout(()=>{try{if(this.isShuttingDown||!this.audioVideoFacade?.hasStartedLocalVideoTile())return;let e=this.audioVideoFacade.getLocalVideoTile(),t=e?.state()?.boundVideoStream,a=t?.getVideoTracks()[0];if(a instanceof CanvasCaptureMediaStreamTrack)return void K.A.publish({type:z.lx.CameraResolution,update:{isCanvasStream:!0}});let n=a?.getSettings(),r=a?.getCapabilities(),i=n?.width,l=n?.height,o=n?.frameRate,s=r?.width?.max,c=r?.height?.max,d=r?.frameRate?.max;s&&c&&K.A.publish({type:z.lx.CameraResolution,update:{cameraWidth:i,cameraHeight:l,cameraFrameRate:o,cameraMaxWidth:s,cameraMaxHeight:c,cameraMaxFrameRate:d,isCanvasStream:!1}})}catch{}},5e3)};checkShutdownState(e){return!!this.isShuttingDown&&(this.callLogger.info(`Skipping ${e} - device manager is shutting down`),!0)}};var eb=a(0x2529f534e),eg=a(0x4f6e90b4),ey=a(0xf8dd7f80);let eA=null;let HuddleDisconnectObserver=class HuddleDisconnectObserver{observer;callLogger=(0,k.Jt)("DISCONNECT-OBSERVER");genericLogger=(0,ey.getGenericLogger)({label:"DISCONNECT-OBSERVER"});peerConnection=null;webSocket=null;shouldIgnoreDisconnectEvents=!1;ignoreDisconnectTimeout=null;hasEverConnected=!1;constructor(e){this.observer=e,this.callLogger.info("Disconnection observer initialized. Monitoring for disconnections..."),eA=e=>this.testNetworkDrop(e)}getPeerConnectionRef=e=>{let t=e?.audioVideoController?.meetingSessionContext;return t?.peer};getWebSocketRef=e=>{let t=e?.audioVideoController?.meetingSessionContext;return t?.signalingClient?.webSocket?.connection};onConnectionUpdate=(e,t=!1)=>{t&&(this.brieflyIgnoreDisconnectEvents(),this.genericLogger.debug("Connection restored. Ignoring disconnection events for 5 seconds."));try{this.resetConnectionRefs(e),this.registerAllEventHandlers(),this.genericLogger.debug("Reconnected and monitoring for future disconnections.")}catch(e){this.callLogger.error("Error updating connection references on reconnection:",e)}};brieflyIgnoreDisconnectEvents=()=>{this.shouldIgnoreDisconnectEvents=!0,this.ignoreDisconnectTimeout&&clearTimeout(this.ignoreDisconnectTimeout),this.ignoreDisconnectTimeout=setTimeout(()=>{this.shouldIgnoreDisconnectEvents=!1,this.genericLogger.debug("Reconnection delay over. Now responding to disconnection events.")},5e3)};resetConnectionRefs=e=>{this.unregisterAllEventHandlers(),this.peerConnection=this.getPeerConnectionRef(e)||null,this.webSocket=this.getWebSocketRef(e)||null,this.webSocket?this.genericLogger.debug("WebSocket reference obtained successfully."):this.callLogger.error("WebSocket reference not available.")};broadcastDisconnection=(0,X.A)(()=>{this.shouldIgnoreDisconnectEvents?this.genericLogger.debug("Disconnection event ignored due to recent reconnection."):(this.genericLogger.info("Disconnection detected. Informing the user."),this.observer?.onSelfDisconnected())},1e3,{leading:!0,trailing:!1});broadcastReconnection=()=>{this.genericLogger.info("Peer connection successfully established. Informing the user."),this.hasEverConnected=!0,this.observer?.onSelfConnected()};onHuddleEnd=()=>{this.genericLogger.debug("Huddle ended. Cleaning up event handlers and connection references.");try{this.broadcastDisconnection.cancel(),this.ignoreDisconnectTimeout&&(clearTimeout(this.ignoreDisconnectTimeout),this.ignoreDisconnectTimeout=null),this.unregisterAllEventHandlers()}catch(e){this.callLogger.error(`Error during Huddle end cleanup: ${e}`)}if(this.peerConnection&&"closed"!==this.peerConnection.connectionState)try{this.peerConnection.close()}catch(e){this.callLogger.warn("Error closing peer connection:",String(e))}this.webSocket=null,this.peerConnection=null,this.hasEverConnected=!1,eA=null};testNetworkDrop=(e={ws:!0,pc:!0})=>{this.genericLogger.info("Simulating network drop by closing WebSocket and PeerConnection."),e.ws&&this.webSocket?.close(),e.pc&&this.peerConnection?.close()};registerAllEventHandlers=()=>{this.genericLogger.debug("Registering event handlers for WebSocket and PeerConnection."),this.registerPeerConnectionEventHandlers(),this.registerWebSocketEventHandlers()};unregisterAllEventHandlers=()=>{this.genericLogger.debug("Unregistering event handlers for WebSocket and PeerConnection."),this.unregisterPeerConnectionEventHandlers(),this.unregisterWebSocketEventHandlers()};registerPeerConnectionEventHandlers=()=>{this.peerConnection?.addEventListener("connectionstatechange",this.handlePeerConnectionStateChange),this.peerConnection?.addEventListener("iceconnectionstatechange",this.handleIceConnectionStateChange)};registerWebSocketEventHandlers=()=>{this.webSocket?.addEventListener("close",this.handleWebSocketClose),this.webSocket?.addEventListener("error",this.handleWebSocketError)};unregisterPeerConnectionEventHandlers=()=>{this.peerConnection?.removeEventListener("connectionstatechange",this.handlePeerConnectionStateChange),this.peerConnection?.removeEventListener("iceconnectionstatechange",this.handleIceConnectionStateChange)};unregisterWebSocketEventHandlers=()=>{this.webSocket?.removeEventListener("close",this.handleWebSocketClose),this.webSocket?.removeEventListener("error",this.handleWebSocketError)};handleIceConnectionStateChange=()=>{this.peerConnection?.iceConnectionState==="disconnected"||this.peerConnection?.iceConnectionState==="failed"?(this.hasEverConnected||this.peerConnection?.iceConnectionState!=="failed"||this.callLogger.warn("ICE connection failed before ever successfully connecting. This indicates network configuration issues."),this.logDisconnectionWarning("ICE connection state is either disconnected or failed."),this.broadcastDisconnection()):this.callLogger.info(`ICE connection state changed to: ${this.peerConnection?.iceConnectionState}.`)};handlePeerConnectionStateChange=()=>{this.peerConnection?.connectionState==="disconnected"||this.peerConnection?.connectionState==="failed"?(this.hasEverConnected||this.peerConnection?.connectionState!=="failed"||this.callLogger.warn("Peer connection failed before ever successfully connecting. This indicates network configuration issues."),this.logDisconnectionWarning("Peer connection has either disconnected or failed."),this.broadcastDisconnection()):this.peerConnection?.connectionState==="connected"?(this.callLogger.info("Peer connection established."),this.broadcastReconnection()):this.callLogger.info(`peer connection state changed: ${this.peerConnection?.connectionState}`)};handleWebSocketClose=e=>{this.logDisconnectionWarning(`WebSocket connection closed unexpectedly (Code: ${e.code}, Reason: ${e.reason||"None provided"}).`),this.broadcastDisconnection()};handleWebSocketError=e=>{this.callLogger.error(`WebSocket encountered an error: ${e}.`)};logDisconnectionWarning=e=>{this.callLogger.warn(`ALERT! ${e} This may result in temporary audio/video disruption. Possible causes include network instability, network congestion, and security software (like VPNs, firewalls, or proxies) blocking or dropping the connection. If the issue persists, users should check their network or security settings and contact their IT team if necessary.`),(0,Y.C)().recordDisconnectionWarning(e)}};(0,eg.ul)("huddleDisconnectObserver",{dropNetwork:()=>eA?.(),dropWebsocket:()=>eA?.({ws:!0,pc:!1}),dropPeerConnection:()=>eA?.({ws:!1,pc:!0})});var ex=a(0x18eb54473),eE=a(0x1bc651545);let eC=(0,a(0x1ec68d6a3).Wo)({label:"HUDDLE-VIDEO-CODECS"}),setCameraVideoCodec=async({audioVideoFacade:e,h264BaselineProfileEnabled:t,disableVp9:a})=>{let n=[];(0,I.gm)()||a||n.push(f.KK.vp9()),t&&n.push(f.KK.h264BaselineProfile()),n.push(f.KK.h264()),eC.info(`Setting preferred camera video codec to ${n[0]?.codecName}`),eC.debug("Setting camera video codec preferences",n),e.setVideoCodecSendPreferences?.(n)},setScreenshareVideoCodec=async({audioVideoFacade:e})=>{let t=[];t.push(f.KK.av1()),t.push(f.KK.h264()),eC.info(`Setting preferred content share video codec to ${t[0]?.codecName}`),eC.debug("Setting content share video codec preferences",t),e.setContentShareVideoCodecPreferences?.(t)};let VideoDownlinkManager=class VideoDownlinkManager{logger=new ex.k("Huddles Video Downlink Manager");selfAttendeeId;videoDownlinkPolicy;videoSources;isAudioOnlyMode=!1;constructor({selfAttendeeId:e,videoDownlinkPolicy:t}){this.videoDownlinkPolicy=t,this.selfAttendeeId=e}addObserver(e){this.videoDownlinkPolicy?.addObserver?.(e)}removeObserver(e){this.videoDownlinkPolicy?.removeObserver?.(e)}remoteVideoSourcesDidChange(e){this.videoSources=e,this.updateChimeVideoPreferences()}toggleAllIncomingVideo=e=>{this.isAudioOnlyMode=e,this.updateChimeVideoPreferences()};updateChimeVideoPreferences(){if(!this.videoSources||!this.videoDownlinkPolicy)return;let e=[];this.videoSources.forEach(t=>{let a=t.attendee?.attendeeId;a!==this.selfAttendeeId&&a&&(a.includes("#content")||!this.isAudioOnlyMode)&&e.push(t)}),this.sendChimeVideoPreferences(e)}sendChimeVideoPreferences=e=>{try{this.logger.debug(`Sending updated video preferences to chime: ${JSON.stringify(e)}`)}catch{}this.videoDownlinkPolicy?.chooseRemoteVideoSources(e)}};var ek=a(0x20621f25a);function subscribeToCpuCompetitionScore(e){let handler=t=>{if(t.type===z.lx.AppMetrics){let a=t.update.huddleStateSnapshot,{cpuCompetitionScore:n}=(0,ek.fv)(a);void 0!==n&&e(n)}};return K.A.subscribe(handler),()=>K.A.unsubscribe(handler)}let VideoPriorityDownlinkManager=class VideoPriorityDownlinkManager{logger=new ex.k("Huddles Priority Manager");selfAttendeeId;videoPriorityBasedPolicy;videoSources;isAudioOnlyMode=!1;activeSpeakers=[];previousVideoPreferences=null;attendeeIdsWithTargetDisplaySize=new Map;pinnedVideosAttendeeIds=new Set;debouncedUpdateChimeVideoPreferences;isLiteModeFlagOn;isLiteModeEnabled=!1;lastPreferredAttendeeId=null;cpuCompetitionScore=100;isDesktop;useIntelligentUplinkCoordinator;unsubscribeCpuScore;constructor({selfAttendeeId:e,videoPriorityBasedPolicy:t,useHuddlesLiteMode:a,useIntelligentUplinkCoordinator:n}){this.videoPriorityBasedPolicy=t,this.selfAttendeeId=e,this.debouncedUpdateChimeVideoPreferences=(0,X.A)(this.updateChimeVideoPreferences.bind(this),250),this.isLiteModeFlagOn=a,this.isDesktop=(0,I.y3)(),this.useIntelligentUplinkCoordinator=n,this.useIntelligentUplinkCoordinator&&(this.unsubscribeCpuScore=subscribeToCpuCompetitionScore(e=>this.setCpuCompetitionScore(e)))}setCpuCompetitionScore(e){if(!this.useIntelligentUplinkCoordinator||!this.isDesktop)return;let t=this.cpuCompetitionScore;this.cpuCompetitionScore=e,e<50&&t>=50?this.logger.warn(`CPU competition high (downlink): score ${e}`):e>=50&&t<50&&this.logger.info(`CPU competition normalized (downlink): score ${e}`),Math.abs(e-t)>5&&(this.debouncedUpdateChimeVideoPreferences.cancel(),this.updateChimeVideoPreferences())}getCpuTargetDisplaySizeCap(){return this.useIntelligentUplinkCoordinator&&this.isDesktop&&!(this.cpuCompetitionScore>=75)?this.cpuCompetitionScore>=50?f.Vr.High:this.cpuCompetitionScore>=25?f.Vr.Medium:f.Vr.Low:null}cleanup(){this.unsubscribeCpuScore?.()}setAttendeeIdWithTileWidth(e,t){let a=f.Vr.Maximum;t<250?a=f.Vr.Low:t<350?a=f.Vr.Medium:t<450&&(a=f.Vr.High),this.attendeeIdsWithTargetDisplaySize.set(e,a),this.debouncedUpdateChimeVideoPreferences()}triggerVideoPreferenceUpdateForScreenshare(){this.logger.debug("Triggering video preference update for screenshare"),this.debouncedUpdateChimeVideoPreferences.cancel(),this.updateChimeVideoPreferences()}addObserver(e){this.videoPriorityBasedPolicy.addObserver?.(e)}removeObserver(e){this.videoPriorityBasedPolicy.removeObserver?.(e)}remoteVideoSourcesDidChange(e){this.updateVideoSources(e)}updateVideoSources(e){this.videoSources=e,this.lastPreferredAttendeeId&&(this.videoSources.some(e=>{let t=e.attendee?.attendeeId;return this.isValidRemotePeer(t)&&t===this.lastPreferredAttendeeId})||(this.lastPreferredAttendeeId=null)),this.debouncedUpdateChimeVideoPreferences.cancel(),this.updateChimeVideoPreferences()}setActiveSpeakers(e){if(this.activeSpeakers=e,this.isLiteModeEnabled&&e.length>0){let t=e.find(e=>this.isValidRemotePeer(e));t&&(this.lastPreferredAttendeeId=t)}this.debouncedUpdateChimeVideoPreferences()}isPinnedVideo(e){return this.pinnedVideosAttendeeIds.has(e)}pinVideo(e){this.pinnedVideosAttendeeIds.add(e),this.debouncedUpdateChimeVideoPreferences()}unPinVideo(e){this.pinnedVideosAttendeeIds.delete(e),this.debouncedUpdateChimeVideoPreferences()}toggleAllIncomingVideo=e=>{this.isLiteModeFlagOn?this.isLiteModeEnabled=e:this.isAudioOnlyMode=e,this.updateChimeVideoPreferences()};getTargetDisplaySizeAndPriority(e,t){let a,n=this.activeSpeakers.includes(t),r=this.isPinnedVideo(t);a=this.isLiteModeEnabled?e?f.Vr.High:f.Vr.Low:e?f.Vr.Maximum:this.attendeeIdsWithTargetDisplaySize.get(t);let i=this.getCpuTargetDisplaySizeCap();null!==i&&void 0!==a&&(a=Math.min(a,i));let l={targetDisplaySize:a??f.Vr.Low,priority:e?10:30};return n?l.priority-=10:r&&(l.priority-=10),l}isScreenshare(e){return e?.includes("#content")||!1}isValidRemotePeer(e){return!!e&&e!==this.selfAttendeeId&&!this.isScreenshare(e)}updateChimeVideoPreferences(){if(!this.videoSources)return;let e=[],t=this.isLiteModeEnabled?this.videoSources.filter(e=>this.isValidRemotePeer(e.attendee?.attendeeId)).length:0;this.videoSources.forEach(a=>{let n=a.attendee?.attendeeId;if(this.isScreenshare(n))return void e.push(a);if(!this.isAudioOnlyMode&&this.isValidRemotePeer(n))if(this.isLiteModeEnabled){let r=this.activeSpeakers.includes(n),i=this.isPinnedVideo(n),l=null!==this.lastPreferredAttendeeId&&this.lastPreferredAttendeeId===n;1===t?this.logger.debug(`Lite mode: skipping attendee ${n} - two-person huddle audio-only mode`):r||i||l?e.push(a):this.logger.debug(`Lite mode: skipping attendee ${n} - not active/pinned/lastPreferred`)}else this.attendeeIdsWithTargetDisplaySize.has(n)?e.push(a):this.logger.debug(`Skipping video source for attendee ${n} - not visible in UI`)}),this.sendChimeVideoPreferences(e)}areVideoPreferencesEqual(e,t){return null===e&&null===t||null!==e&&null!==t&&e.equals(t)}sendChimeVideoPreferences=e=>{try{this.logger.debug(`Sending updated video preferences to chime: ${JSON.stringify(e)}`)}catch{}let t=f.uP.prepare();e.forEach(e=>{let a=e.attendee?.attendeeId;if(!a)return;let{targetDisplaySize:n,priority:r}=this.getTargetDisplaySizeAndPriority(this.isScreenshare(a),a);t.add(new f.fX(a,r,n))});let a=t.build();this.areVideoPreferencesEqual(this.previousVideoPreferences,a)||(this.previousVideoPreferences=a,this.videoPriorityBasedPolicy.chooseRemoteVideoSources(a))}};let ev={name:"1:1",targetBitrate:1400},eS={name:"Small Group (2-4)",targetBitrate:1e3},eI={name:"Large Group (5+)",targetBitrate:600},ew={name:"With Screenshare",targetBitrate:400},eT={ONE_ON_ONE:{width:1280,height:720,frameRate:30},SMALL_GROUP:{width:960,height:540,frameRate:30},LARGE_GROUP:{width:800,height:450,frameRate:24},WITH_SCREENSHARE:{width:640,height:360,frameRate:20}};let VideoUplinkManager=class VideoUplinkManager{nScalePolicy;selfAttendeeId;logger=new ex.k("VideoUplinkManager");deviceManager;participantCount=1;isScreenSharingActive=!1;currentMOSScore=4;cpuCompetitionScore=100;isDesktop;currentProfile=ev;lastQualityUpdateTime=0;qualityUpdateDebounceMs=2e3;lastAppliedBitrate=null;lastHasPriority=null;isDev=(0,o.Cu)();unsubscribeCpuScore;constructor(e){this.nScalePolicy=e.nScalePolicy,this.selfAttendeeId=e.selfAttendeeId;const t=e.tuning;t?.qualityUpdateDebounceMs!==void 0&&(this.qualityUpdateDebounceMs=t.qualityUpdateDebounceMs),this.isDesktop=(0,I.y3)(),this.logger.info(`VideoUplinkManager initialized selfAttendeeId: ${this.selfAttendeeId} isDesktop: ${this.isDesktop}`),this.unsubscribeCpuScore=subscribeToCpuCompetitionScore(e=>this.setCpuCompetitionScore(e)),this.applyQualityProfileInternal()}setCpuCompetitionScore(e){let t=this.cpuCompetitionScore;this.cpuCompetitionScore=e,this.isDesktop&&(e<50&&t>=50?this.logger.warn(`CPU competition high: score ${e}`):e>=50&&t<50?this.logger.info(`CPU competition normalized: score ${e}`):this.isDev&&Math.abs(e-t)>10&&this.logger.debug(`CPU competition score update: ${e}`),Math.abs(e-t)>5&&this.applyQualityProfile())}setDeviceManager(e){this.deviceManager=e,this.logger.info("DeviceManager connected to VideoUplinkManager")}applyCameraQuality(){if(!this.deviceManager)return;let e=eT[this.currentProfile.name];e&&(this.deviceManager.setCameraQuality(e.width,e.height,e.frameRate,0,!0),this.isDev&&this.logger.debug(`Camera quality applied: ${e.width}x${e.height}@${e.frameRate}fps`))}overrideCameraQuality(e,t,a,n){this.deviceManager?.setCameraQuality(e,t,a,n,!0),this.logger.info(`Camera quality overridden: ${e}x${t}@${a}fps ${n}kbps`)}updateParticipantCount(e){e!==this.participantCount&&(this.isDev&&this.logger.info(`Participant count changed ${this.participantCount} -> ${e}`),this.participantCount=e,this.applyQualityProfile())}setScreenSharingActive(e){e!==this.isScreenSharingActive&&(this.isDev&&this.logger.debug(`Screen sharing state changed ${this.isScreenSharingActive} -> ${e}`),this.isScreenSharingActive=e,this.applyQualityProfileInternal())}selectBaseProfile(){return this.isScreenSharingActive?ew:this.participantCount<=2?ev:this.participantCount<=4?eS:eI}getCpuMultiplier(){return!this.isDesktop||this.cpuCompetitionScore>=75?1:this.cpuCompetitionScore>=50?.9:this.cpuCompetitionScore>=25?.75:.6}calculateOptimalBitrate(){let e=this.selectBaseProfile(),t=this.getCpuMultiplier(),a=Math.floor(e.targetBitrate*t),n=Math.max(250,Math.min(a,1400));return this.isDev&&this.logger.debug(`Bitrate calculation profile: ${e.name} baseBitrate: ${e.targetBitrate} cpuMultiplier: ${t} cpuCompetitionScore: ${this.cpuCompetitionScore} targetBitrate: ${a} finalBitrate: ${n} constraintApplied: ${n!==a}`),n}applyQualityProfile(){Date.now()-this.lastQualityUpdateTime<this.qualityUpdateDebounceMs?this.logger.debug("Quality update debounced"):this.applyQualityProfileInternal()}applyQualityProfileInternal(){let e=Date.now();try{this.currentProfile=this.selectBaseProfile();let t=this.calculateOptimalBitrate(),a=!this.isScreenSharingActive,n=eT[this.currentProfile.name];this.lastAppliedBitrate!==t&&(this.nScalePolicy.setIdealMaxBandwidthKbps(t),this.lastAppliedBitrate=t),this.lastHasPriority!==a&&(this.nScalePolicy.setHasBandwidthPriority(a),this.lastHasPriority=a),this.applyCameraQuality(),this.lastQualityUpdateTime=e,this.isDev&&this.logger.info(`Uplink profile applied profile=${this.currentProfile.name} bitrateKbps=${t} hasPriority=${a} cameraQuality=${n?.width}x${n?.height}@${n?.frameRate}fps participantCount=${this.participantCount} mosScore=${this.currentMOSScore} cpuCompetitionScore=${this.cpuCompetitionScore}`)}catch(e){this.logger.error(`Failed to apply quality profile error: ${e instanceof Error?e.message:String(e)}`)}}cleanup(){this.unsubscribeCpuScore(),this.logger.debug("Unsubscribed from huddle perf metric updates")}};var eN=a(0x19a57be55),eM=a(0x1f7834687),eR=a(0xca924ee1),eP=a(0x118917a70);let JukeboxDucker=class JukeboxDucker{defaultVolume;audioContext;gainNode;fadeOutTime=20;fadeInTimeLocal=.2;waitForFadeOutTime=3e3;duckingAudioAdjustmentLevel=.2;audioLevelActivationThreshold=.04;currentDuckingEndTimeout;constructor(e){this.defaultVolume=e,this.onAudioLevelUpdated=this.onAudioLevelUpdated.bind(this),eP.A.subscribe("*",this.onAudioLevelUpdated)}initialize(e,t){this.gainNode=t,this.audioContext=e}onAudioLevelUpdated(e){isNaN(e)||e<this.audioLevelActivationThreshold||(this.currentDuckingEndTimeout&&clearTimeout(this.currentDuckingEndTimeout),this.startDucking())}startDucking(){if(!this.gainNode||!this.audioContext)return;let e=this.defaultVolume*this.duckingAudioAdjustmentLevel;this.gainNode.gain.cancelScheduledValues(this.audioContext.currentTime),this.gainNode.gain.exponentialRampToValueAtTime(e,this.audioContext.currentTime+this.fadeInTimeLocal),this.currentDuckingEndTimeout=setTimeout(()=>{this.endDucking()},this.waitForFadeOutTime)}endDucking(){!this.gainNode||this.audioContext&&this.gainNode?.gain.exponentialRampToValueAtTime(this.defaultVolume,this.audioContext.currentTime+this.fadeOutTime)}};let eL=class{defaultVolume=.3;localAudio;localAudioUrl;audioContext;audioDestination;localMediaStreamAudioDestinationNode;gainNode;audioBufferSourceNode;jukeboxDucker;callLogger=(0,k.Jt)("HUDDLE-JUKEBOX");constructor(){this.callLogger.info("Huddle Jukebox Manager created."),this.jukeboxDucker=new JukeboxDucker(this.defaultVolume)}async startLocalJukebox({song:e,volume:t}){let a=this.getSongUrl({song:e});if(a===this.localAudioUrl)return;this.callLogger.info(`Starting local jukebox song key: ${e.key}.`),this.audioContext||(this.audioContext=new AudioContext),this.cleanup(),this.localAudioUrl=a;let n=await window.fetch(a),r=await n.arrayBuffer(),i=await this.audioContext.decodeAudioData(r);this.audioBufferSourceNode=this.audioContext.createBufferSource(),this.audioBufferSourceNode.buffer=i,this.localAudio=new Audio,this.localAudio.volume=t,await this.localAudio.setSinkId((0,ed._o)()),this.localMediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.gainNode=this.audioContext.createGain(),this.jukeboxDucker?.initialize(this.audioContext,this.gainNode),this.gainNode.gain.value=this.defaultVolume,this.audioBufferSourceNode.connect(this.gainNode),this.gainNode.connect(this.localMediaStreamAudioDestinationNode),this.localAudio.srcObject=this.localMediaStreamAudioDestinationNode.stream,this.audioBufferSourceNode.loop=!0,this.audioBufferSourceNode.start(),this.localAudio.play()}async startContentShareJukebox({song:e}){this.audioContext||(this.audioContext=new AudioContext),this.audioDestination||(this.audioDestination=this.audioContext.createMediaStreamDestination()),this.callLogger.info(`Starting jukebox song key: ${e.key}`),this.cleanup();let t=this.getSongUrl({song:e}),a=await window.fetch(t),n=await a.arrayBuffer(),r=await this.audioContext.decodeAudioData(n);return this.audioBufferSourceNode=this.audioContext.createBufferSource(),this.audioBufferSourceNode.buffer=r,this.localAudio=new Audio,await this.localAudio.setSinkId((0,ed._o)()),this.localMediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.gainNode=this.audioContext.createGain(),this.jukeboxDucker?.initialize(this.audioContext,this.gainNode),this.gainNode.gain.value=this.defaultVolume,this.audioBufferSourceNode.connect(this.gainNode),this.gainNode.connect(this.audioDestination),this.gainNode.connect(this.localMediaStreamAudioDestinationNode),this.localAudio.srcObject=this.localMediaStreamAudioDestinationNode.stream,this.audioBufferSourceNode.loop=!0,this.audioBufferSourceNode.start(),this.localAudio.play(),this.audioDestination?.stream}stopJukebox(){this.callLogger.info(`Stopping jukebox for song: ${this.localAudioUrl||""}`),this.cleanup(),this.audioContext=void 0,this.audioDestination=void 0}cleanup(){this.audioBufferSourceNode?.stop(),this.audioBufferSourceNode=void 0,this.localAudio?.pause(),this.localAudio=void 0,this.localAudioUrl=void 0,this.gainNode?.disconnect(),this.gainNode=void 0,this.audioDestination?.disconnect()}hasAudio(){return!!this.localAudio}getVolume(){return this.localAudio?.volume}getSongUrl({song:e}){return e.url}},eO=(0,eR.A)(()=>new eL);var eD=a(0x1ca6e332b);let FreeWillySdk=class FreeWillySdk{observer;audioOutputElement;loggerName;TURN_PORT_UDP=3478;pendingVideoBindings=new Map;videoElementToTileId=new Map;videoTileUpdateCallbacks=new Set;OVERRIDE_TURN_PORT_UDP=22466;meeting;attendee;options;transportProtocols;videoDownlinkPolicy;meetingSessionConfiguration;defaultDeviceController;session;sessionExp;chimeLogger;callLogger;deviceManager;audioVideoFacadeSubscriber;audioVideoObserver;contentShareManager;screenManager;voiceFocusManager;dataChannelSubscribers;selfAttendeeId;meetingEventObserver;waitForInit=(0,c.u)();waitForStop=(0,c.u)();videoDevicePermissionStatus;isPrejoin;useHuddlesUseUDPPort3478;useHuddlesDualUDPSupport;videoDownlinkManager;videoPriorityDownlinkManager;videoUplinkManager;disconnectObserver;handleBeforeUnload=()=>{this.stopSessionSync()};constructor(e,t,a="FREE-WILLY-SDK"){this.observer=e,this.audioOutputElement=t,this.loggerName=a,this.videoDevicePermissionStatus="INITIAL"}async initialize(e,t,a,n,r,l){let o;r&&(this.waitForStop=r),l&&(this.dataChannelSubscribers=l),this.observer.onInit(),this.options=e;let{serverConfig:c,useChimeSdkExp:m,useSimulcast:u}=this.options;await (0,f.ZT)(m),this.chimeLogger=new ex.k(this.loggerName),this.callLogger=(0,k.Jt)(this.loggerName),this.callLogger?.info(`user agent: ${navigator.userAgent}`);let p=(0,s.HF)();this.callLogger?.info(`Version TS: ${p}`);let h=document?.documentElement?.dataset?.versionHash||"unknown";this.callLogger?.info(`Version Hash: ${h}`),this.callLogger?.info(`Chime SDK Version: ${f.zF.sdkVersion}${m?" (Experimental)":""}`),this.meeting=c.meeting,this.attendee=c.attendee,this.selfAttendeeId=this.attendee.AttendeeId;let _=(0,eM.Y)(c.attendee.ExternalUserId);try{let t=JSON.stringify((0,i.A)(e,"serverConfig"),null,2);this.callLogger?.debug(`Huddle SDK [${_}] initialized with options: ${t}`)}catch(e){this.callLogger?.error("Error stringifying options",e)}if(this.transportProtocols=c.transportProtocols,this.isPrejoin=this.options.isPrejoin,this.meetingSessionConfiguration=new f.QJ(this.meeting,this.attendee),this.options.useSVC&&(this.meetingSessionConfiguration.enableSVC=!0),this.options.useHuddlesUseUDPPort3478&&(this.useHuddlesUseUDPPort3478=!0,this.callLogger?.info("Use UDP port 3478 experiment enabled. Will not munge UDP port.")),this.options.useHuddlesDualUDPSupport&&(this.useHuddlesDualUDPSupport=!0,this.callLogger?.info("Huddles Dual UDP Support experiment enabled. Will use dual UDP support.")),this.options.useHuddlesNativeDeviceManager&&(this.callLogger?.info("Native Device Manager is enabled"),(0,Z.L)().init({isEnabled:!0})),u&&this.meetingSessionConfiguration&&(this.callLogger?.info("Simulcast enabled"),this.meetingSessionConfiguration.enableSimulcastForUnifiedPlanChromiumBasedBrowsers=!0),this.options.usePriorityDownlinkPolicy&&!this.options.useCustomDownlinkPolicy&&(this.videoDownlinkPolicy=new f.gi(this.selfAttendeeId),this.meetingSessionConfiguration.videoDownlinkBandwidthPolicy=this.videoDownlinkPolicy,this.meetingSessionConfiguration.keepLastFrameWhenPaused=!0,this.videoDownlinkManager=new VideoDownlinkManager({selfAttendeeId:this.selfAttendeeId,videoDownlinkPolicy:this.videoDownlinkPolicy})),this.options.useIntelligentUplinkCoordinator){this.callLogger?.info("Intelligent Uplink Coordinator enabled");let e=new f.em(this.selfAttendeeId??"");e.setSVCEnabled(!0),this.videoUplinkManager=new VideoUplinkManager({nScalePolicy:e,selfAttendeeId:this.selfAttendeeId??""}),this.meetingSessionConfiguration.videoUplinkBandwidthPolicy=e}if(this.meetingSessionConfiguration.urls&&(this.useHuddlesDualUDPSupport?(this.callLogger?.info("Using urlRewriterMulti for dual UDP support"),this.meetingSessionConfiguration.urls.urlRewriterMulti=this.urlRewriterMulti.bind(this)):this.meetingSessionConfiguration.urls.urlRewriter=this.urlRewriter.bind(this)),this.meetingSessionConfiguration&&this.meetingSessionConfiguration.connectionHealthPolicyConfiguration){let e=new G(this.options.expectAv1EncoderFreeze||!1);Object.assign(this.meetingSessionConfiguration.connectionHealthPolicyConfiguration,e.getConfiguration())}this.meetingSessionConfiguration.disablePeriodicKeyframeRequestOnContentSender=!0,await this.initVoiceFocus();let b={audio:t.includes(N.mT.MICROPHONE),video:t.includes(N.mT.CAMERA)};f.vB.disable();let g=!!this.voiceFocusManager?.isAvailable();if(m){let e=(0,f.Q_)(),t=(0,f.RM)();this.defaultDeviceController=new t(this.chimeLogger,{enableWebAudio:g}),this.defaultDeviceController.setDeviceLabelTrigger(()=>navigator.mediaDevices.getUserMedia(b)),this.sessionExp=new e(this.meetingSessionConfiguration,this.chimeLogger,this.defaultDeviceController),o=this.sessionExp.audioVideo;let a=(0,f.Ls)();o.setAudioProfile(a.fullbandSpeechMono(!0)),o.setContentAudioProfile(new a(null,!0))}else{let e=(0,f.of)(),t=(0,f.zg)();this.defaultDeviceController=new t(this.chimeLogger,{enableWebAudio:g}),this.defaultDeviceController.setDeviceLabelTrigger(()=>navigator.mediaDevices.getUserMedia(b)),this.session=new e(this.meetingSessionConfiguration,this.chimeLogger,this.defaultDeviceController),o=this.session.audioVideo;let a=(0,f.j3)();o.setAudioProfile(a.fullbandSpeechMono(!0)),o.setContentAudioProfile(new a(null,!0))}if(this.options.useCustomDownlinkPolicy){let e=new f.jV(this.chimeLogger);this.videoPriorityDownlinkManager=new VideoPriorityDownlinkManager({selfAttendeeId:this.selfAttendeeId??"",videoPriorityBasedPolicy:e,useHuddlesLiteMode:!!this.options.useHuddlesLiteMode,useIntelligentUplinkCoordinator:!!this.options.useIntelligentUplinkCoordinator}),this.meetingSessionConfiguration.videoDownlinkBandwidthPolicy=e}await this.populateDeviceInfoCache(),setCameraVideoCodec({audioVideoFacade:o,h264BaselineProfileEnabled:this.options.useH264Baseline||!1,disableVp9:!!this.options.disableVp9}),setScreenshareVideoCodec({audioVideoFacade:o});let y={backgroundVideoFilteringSetting:J.uT.Both,useHuddlesExactDeviceIdConstraint:this.options.useHuddlesExactDeviceIdConstraint,useHuddlesAlertDeviceWarningUpdates:this.options.useHuddlesAlertDeviceWarningUpdates,useHuddlesVoiceFocusSwap:this.options.useHuddlesVoiceFocusSwap};(0,d._)().setIsHuddlesUpdatedAudioDetectionTriggerEnabled(this.options.useHuddlesUpdatedAudioDetection||!1),this.deviceManager=new DeviceManager(o,this.audioOutputElement,this.observer,y,a,this.chimeLogger,this.defaultDeviceController,this.voiceFocusManager),this.videoUplinkManager&&this.deviceManager&&this.videoUplinkManager.setDeviceManager(this.deviceManager),this.dataChannelSubscribers?.forEach(e=>e.onInitializeDataChannelSubscriber()),this.disconnectObserver=new HuddleDisconnectObserver(this.observer),this.audioVideoObserver=new AudioVideoObserverImpl(this.selfAttendeeId,this.meeting.MeetingId,this.meeting.MediaRegion,_,o,this.observer,this.deviceManager,this.videoDownlinkManager,this.disconnectObserver,n,this.waitForStop,this.dataChannelSubscribers,this.videoPriorityDownlinkManager,e=>this.onVideoTileDidUpdate(e),this.options.useHuddlesInitialConnectionTimeout??!1);let A=this.options.huddlesJukeboxEnabled;A&&this.callLogger?.info("Huddles Jukebox experiment enabled (prototype)"),this.contentShareManager=new ContentShareManager(o,this.observer,!!A,!!this.options.useHuddlesScreensharePermissionHandlingV2,this.videoUplinkManager),this.audioVideoFacadeSubscriber=new AudioVideoFacadeSubscriber(this.selfAttendeeId,o,this.observer,this.videoPriorityDownlinkManager,this.videoUplinkManager),(0,H.Ay)().initialize(),this.connect(),this.screenManager=new eE.S,this.observer.onMeetingSessionInitialized(),this.setupMeetingEventObserver(),(0,eb.p)().setHuddleStarted(),(0,d._)().setHuddleStarted(),this.waitForInit.resolve()}initVoiceFocus=async()=>{let e=0,t=Date.now();this.voiceFocusManager=new eN.Q(this.chimeLogger,void 0),await this.voiceFocusManager.init({configOnly:!1}),e=Date.now()-t,this.observer.onMaybeVoiceFocusInitialized(e)};populateDeviceInfoCache=async()=>{let e=Date.now(),t=await this.defaultDeviceController?.listAudioInputDevices(),a=await this.defaultDeviceController?.listAudioOutputDevices(),n=await this.defaultDeviceController?.listVideoInputDevices(),r=ec.Ay.canAccessMediaResource(N.mT.MICROPHONE).status===J.eJ.Granted&&!t?.length,i=ec.Ay.canAccessMediaResource(N.mT.CAMERA).status===J.eJ.Granted&&!n?.length;r&&this.callLogger?.error("No microphone devices found, though permissions have been granted previously. Permissions have likely been revoked or cleared mid-session"),i&&this.callLogger?.error("No camera devices found, though permissions have been granted previously. Permissions have likely been revoked or cleared mid-session");let l=Date.now()-e;this.callLogger?.info(`Populated device info cache in ${l}ms with ${t?.length} microphones, ${a?.length} speakers, and ${n?.length} cameras`)};cleanupDataChannelSubscribers=()=>{this.dataChannelSubscribers&&(this.dataChannelSubscribers.forEach(e=>e.onShutdownDataChannelSubscriber()),this.dataChannelSubscribers=void 0)};cleanupDefaultDeviceControllerRefs=async()=>{if(!this.defaultDeviceController)return;await this.defaultDeviceController.destroy();let e=this.defaultDeviceController?.eventController;if(e){this.meetingEventObserver&&(e.removeObserver(this.meetingEventObserver),this.meetingEventObserver=void 0);let t=e.configuration?.urls;t&&(t.urlRewriter=void 0)}this.defaultDeviceController.deviceLabelTrigger=void 0,delete this.defaultDeviceController};async shutdown(e){this.callLogger?.info("Huddles SDK shutdown initiated"),l.J.removeEventListener("beforeunload",this.handleBeforeUnload),this.disconnectObserver?.onHuddleEnd(),delete this.disconnectObserver,await this.waitForInit,this.cleanupDataChannelSubscribers(),this.clearAllPendingBindings(),await this.contentShareManager?.stop(),this.audioVideoObserver?.stop(),await this.waitForStop,await this.deviceManager?.shutdown(),eD.F.doesInstanceExist()&&eD.F.getInstance()?.release(),this.audioVideoFacadeSubscriber?.destroy(),delete this.session,delete this.sessionExp,delete this.meetingSessionConfiguration,await this.cleanupDefaultDeviceControllerRefs(),this.callLogger?.info("Huddles SDK shutdown completed"),this.videoDownlinkManager&&this.audioVideoObserver&&this.videoDownlinkManager.removeObserver(this.audioVideoObserver),this.videoPriorityDownlinkManager&&this.audioVideoObserver&&(this.videoPriorityDownlinkManager.removeObserver(this.audioVideoObserver),this.videoPriorityDownlinkManager.cleanup()),this.videoUplinkManager&&this.videoUplinkManager.cleanup(),this.voiceFocusManager&&await this.voiceFocusManager.tearDown(),this.screenManager?.getCurrentlyActiveScreenTrack()&&this.screenManager.stopCapturingScreen(),delete this.chimeLogger,delete this.callLogger,delete this.deviceManager,delete this.audioVideoFacadeSubscriber,delete this.audioVideoObserver,delete this.contentShareManager,delete this.screenManager,delete this.voiceFocusManager,delete this.videoDownlinkManager,delete this.videoPriorityDownlinkManager,delete this.videoUplinkManager,delete this.videoDownlinkPolicy,e&&e()}handleClientOffline=()=>{this.audioVideoObserver?.audioVideoDidStartConnecting(!0)};selfMicrophoneEnabled(e){this.deviceManager?.setMicrophone(e)}selfVideoEnabled(e,t,a,n){this.callLogger?.info(`selfVideoEnabled called isCameraEnabled: ${e} isScreenshareEnabled: ${t}`),this.deviceManager?.setCamera(e),this.contentShareManager?.setScreenshare(t,a,n)}toggleAllIncomingVideo=e=>{this.videoDownlinkManager?.toggleAllIncomingVideo(e),this.videoPriorityDownlinkManager?.toggleAllIncomingVideo(e)};async startContentShareJukebox({song:e}){let t=await eO().startContentShareJukebox({song:e});t&&this.contentShareManager?.setSongStream(t)}async selfStopJukebox(){eO().stopJukebox(),this.contentShareManager?.stopMusic({cleanObserver:!1})}setCameraQuality(e,t,a,n){this.deviceManager?.setCameraQuality(e,t,a,n)}setAGC(e){this.deviceManager?.setAGC(e)}setNewPreferredDevice(e,t){this.deviceManager?.setPreferredDevice(e,t)}setNoiseSuppression(e){this.deviceManager?.setNoiseSuppression(e)}setVideoBackgroundEffect(e){this.deviceManager?.setVideoBackgroundEffect(e)}setVideoTileWidth(e,t){this.videoPriorityDownlinkManager?.setAttendeeIdWithTileWidth(e,t)}pinVideo(e){this.videoPriorityDownlinkManager?.pinVideo(e)}unpinVideo(e){this.videoPriorityDownlinkManager?.unPinVideo(e)}triggerVideoPreferenceUpdateForScreenshare(){this.videoPriorityDownlinkManager?.triggerVideoPreferenceUpdateForScreenshare()}requestPreviewStreamForDeviceId(e,t,a){this.deviceManager?.requestPreviewStreamForDeviceId(e,t,a)}stopVideoPreviewForVideoInput(e){this.deviceManager?.stopVideoPreviewForVideoInput(e)}async getScreenThumbnails(e){return await this.screenManager?.getScreenThumbnails(e?.thumbnailDimensions,e?.isRefetch)}selfDrawEnabled(e){this.audioVideoFacadeSubscriber?.selfDrawEnabled(e)}sendReacji(e,t,a){this.audioVideoFacadeSubscriber?.sendReacji(e,t,a)}sendBackground(e){this.audioVideoFacadeSubscriber?.sendBackground(e)}sendMuteRequest(e){this.audioVideoFacadeSubscriber?.sendMuteRequest(e)}sendJukeboxRequest(e){this.audioVideoFacadeSubscriber?.sendJukeboxRequest(e)}sendJukeboxStopRequest(){this.audioVideoFacadeSubscriber?.sendJukeboxStopRequest()}sendDrawMessage(e){this.audioVideoFacadeSubscriber?.sendDrawMessage(e)}sendContentShareDetails(e){this.audioVideoFacadeSubscriber?.sendContentShareDetails(e)}sendRecordingStartNotification(){this.audioVideoFacadeSubscriber?.sendRecordingStartNotification()}maybeBindAudioOutputElement(){this.deviceManager?.maybeBindAudioOutputElement()}maybeCheckSystemMediaAccess(e){return this.deviceManager?.maybeCheckSystemMediaAccess(e)}setIncludeSelfAndNoneActiveSpeaker(e,t){this.audioVideoFacadeSubscriber?.setIncludeSelfAndNoneActiveSpeaker(e,t)}bindVideo(e,t){this.callLogger?.info(`bindVideo called tileId: ${e}`);let a=this.session||this.sessionExp;if(!a)return void this.callLogger?.error("bindVideo called but no session found");let n=a.audioVideo.getVideoTile(e)?.state();n?.boundVideoStream?(this.callLogger?.info(`bindVideo connected stream to video element tileId: ${e}`),f.xc.connectVideoStreamToVideoElement(n.boundVideoStream,t,!1),this.clearPendingBinding(e)):this.addPendingBinding(e,t)}unbindVideo(e){if(this.callLogger?.info("unbindVideo called"),!(this.session||this.sessionExp))return void this.callLogger?.info("unbindVideo called but no session found");this.callLogger?.info("unbindVideo disconnected stream from video element"),f.xc.disconnectVideoStreamFromVideoElement(e,!0);let t=this.videoElementToTileId.get(e);void 0!==t&&this.clearPendingBinding(t)}onVideoTileUpdate(e){return this.videoTileUpdateCallbacks.add(e),()=>this.videoTileUpdateCallbacks.delete(e)}onVideoTileDidUpdate(e){let t=this.pendingVideoBindings.get(e);if(t&&!t.isConnected)this.callLogger?.info(`onVideoTileDidUpdate clearing pending binding for tileId: ${e}`),this.clearPendingBinding(e);else if(t){let a=this.session||this.sessionExp;if(a){let n=a.audioVideo.getVideoTile(e)?.state();n?.boundVideoStream&&(this.callLogger?.info(`onVideoTileDidUpdate connected stream to video element tileId: ${e}`),f.xc.connectVideoStreamToVideoElement(n.boundVideoStream,t,!1))}this.clearPendingBinding(e)}this.videoTileUpdateCallbacks.forEach(t=>t(e))}addPendingBinding(e,t){this.callLogger?.info(`addPendingBinding called tileId: ${e}`),this.clearPendingBinding(e),this.pendingVideoBindings.set(e,t),this.videoElementToTileId.set(t,e)}clearPendingBinding(e){this.callLogger?.info(`clearPendingBinding called tileId: ${e}`);let t=this.pendingVideoBindings.get(e);t&&(this.pendingVideoBindings.delete(e),this.videoElementToTileId.delete(t))}clearAllPendingBindings(){this.callLogger?.info("clearAllPendingBindings called"),this.pendingVideoBindings.clear(),this.videoElementToTileId.clear()}pauseVideo(e){this.callLogger?.info("pauseVideo called");let t=this.session||this.sessionExp;if(!t)return;let a=t.audioVideo.getVideoTile(e),n=a?.state();!n?.isContent&&n?.active&&a?.pause()}unpauseVideo(e){this.callLogger?.info("unpauseVideo called");let t=this.session||this.sessionExp;if(!t)return;let a=t.audioVideo.getVideoTile(e),n=a?.state();n?.paused&&a?.unpause()}getMeetingMediaRegion(){return this.meeting?.MediaRegion}async completePrejoin(e){let{isStartMuted:t}=e;return!!this.isPrejoin&&(t&&this.deviceManager?.setStartMutedBarrier(t),this.audioVideoObserver?.start(),l.J.addEventListener("beforeunload",this.handleBeforeUnload),this.maybeBindAudioOutputElement(),this.setIncludeSelfAndNoneActiveSpeaker(!0,!0),this.isPrejoin=!1,!0)}urlRewriter(e){if(!e)return e;if(this.transportProtocols){let t=this.transportProtocols;if(e.includes("?transport=udp")&&!t.includes("udp"))return this.callLogger?.info("Dropping UDP transport"),"";if(e.includes("?transport=tcp")){if(e.includes("turns:")){if(!t.includes("tls"))return this.callLogger?.info("Dropping TLS transport"),""}else if(!t.includes("tcp"))return this.callLogger?.info("Dropping TCP transport"),""}}return this.useHuddlesUseUDPPort3478?e:e.replace(`:${this.TURN_PORT_UDP}`,`:${this.OVERRIDE_TURN_PORT_UDP}`)}urlRewriterMulti(e){if(!e)return null;if(this.transportProtocols){let t=this.transportProtocols;if(e.includes("?transport=udp")&&!t.includes("udp"))return this.callLogger?.info("Dropping UDP transport"),[];if(e.includes("?transport=tcp")){if(e.includes("turns:")){if(!t.includes("tls"))return this.callLogger?.info("Dropping TLS transport"),[]}else if(!t.includes("tcp"))return this.callLogger?.info("Dropping TCP transport"),[]}}if(e.includes(`:${this.TURN_PORT_UDP}`)){let t=e.replace(`:${this.TURN_PORT_UDP}`,`:${this.OVERRIDE_TURN_PORT_UDP}`);return this.callLogger?.info(`urlRewriterMulti returning both ports: ${e} and ${t}`),[e,t]}return[e]}hasSession(){return!!this.session||!!this.sessionExp}stopSessionSync(){l.J.removeEventListener("beforeunload",this.handleBeforeUnload),this.audioVideoObserver&&(this.disconnectObserver?.onHuddleEnd(),this.audioVideoObserver.stopSync())}setupVideoDeviceLabelTrigger(){let callback=async()=>{try{this.videoDevicePermissionStatus="IN_PROGRESS";let e=await navigator.mediaDevices.getUserMedia({video:!0});return this.callLogger?.info("Video device permissions granted"),this.videoDevicePermissionStatus="GRANTED",e}catch(e){throw this.videoDevicePermissionStatus="DENIED",this.observer.onSetNoMediaInput(N.mT.CAMERA),this.callLogger?.info("Video device permissions denied"),e}};this.defaultDeviceController?.setDeviceLabelTrigger(callback)}async maybeEnableSelfCamera({isScreenshareEnabled:e}={}){await this.initVideoPermission()&&("INITIAL"===this.videoDevicePermissionStatus||"GRANTED"===this.videoDevicePermissionStatus)&&(this.selfVideoEnabled(!0,!!e),this.observer.onPeerCameraActive("self",!0),this.callLogger?.info("maybeEnableSelfCamera:: enabling camera function executed"))}async initVideoPermission(){return this.setupVideoDeviceLabelTrigger(),await this.deviceManager?.initVideoInputDevices()}getSelfAttendeeId(){return this.selfAttendeeId}connect=async()=>{if(this.callLogger?.info(`FreeWilly connect called isPreJoin: ${this.isPrejoin}`),this.audioVideoObserver?.startWithSignalingOnly(),await this.deviceManager?.init(),!this.isPrejoin){if(!ec.Ay.canAccessMediaResource(N.mT.MICROPHONE))return void this.callLogger?.error("Missing microphone permissions. Not connecting to huddle");this.audioVideoObserver?.start(),l.J.addEventListener("beforeunload",this.handleBeforeUnload)}};getAttributesString(e){try{return JSON.stringify(e)}catch(e){return this.callLogger?.warn("Failed to stringify attributes",e),"[Unable to stringify attributes]"}}setupMeetingEventObserver(){this.defaultDeviceController?.eventController&&(this.meetingEventObserver={eventDidReceive:(e,t)=>{this.callLogger?.info(`Received meeting event: ${e}`);let a=this.getAttributesString(t),{huddleMeetingEventsTrace:n}=(0,F.A)().getAllTraceHandlers();n?.recordMeetingEvent(e);let processInputError=(e,t)=>{for(let a of(n?.recordMeetingEvent(e),["NotAllowedError","NotReadableError","NotFoundError","AbortError","OverconstrainedError"]))if(e.includes(a)){n?.recordInputErrorEvent(a,t);break}};switch(e){case"audioInputFailed":this.callLogger?.error(`Failed to choose microphone: ${t.audioInputErrorMessage} ${a}`),t.audioInputErrorMessage&&processInputError(t.audioInputErrorMessage,"audio");break;case"videoInputFailed":this.callLogger?.error(`Failed to choose camera: ${t.videoInputErrorMessage} ${a}`),t.videoInputErrorMessage&&processInputError(t.videoInputErrorMessage,"video");break;case"meetingStartFailed":this.callLogger?.error(`Failed to start a meeting: ${t.meetingErrorMessage} ${a}`);break;case"meetingFailed":this.callLogger?.error(`Failed during a meeting: ${t.meetingErrorMessage} ${a}`);break;case"deviceLabelTriggerFailed":this.callLogger?.error(`Device label trigger failed ${a}`);break;case"signalingDropped":this.callLogger?.error(`Signaling connection dropped ${a}`);break;case"receivingAudioDropped":this.callLogger?.warn(`Receiving audio packets dropped significantly ${a}`);break;case"sendingAudioFailed":this.callLogger?.error(`Sending audio failed ${a}`);break;default:((0,o.Cu)()||(0,o.b3)())&&this.callLogger?.info(`Meeting event: ${e} ${a}`)}}},this.defaultDeviceController.eventController.addObserver(this.meetingEventObserver))}}},0x23cc52559:(e,t,a)=>{"use strict";a.d(t,{s:()=>r});let n=(0,a(0x1ec68d6a3).Wo)({label:"HUDDLE-CONNECTION-MANAGER"}),r=class HuddleConnectionManager{isShutdownInProgress=!1;isConnecting=!1;huddlesSdk=null;static instance=null;reset(){this.isShutdownInProgress=!1,this.isConnecting=!1,this.huddlesSdk=null}setIsShutdownInProgress(e){this.isShutdownInProgress=e}setIsConnecting(e){this.isConnecting=e}getIsShutdownInProgress(){return this.isShutdownInProgress}getIsConnecting(){return this.isConnecting}setHuddlesSdk(e){this.huddlesSdk?n.warn("Blocking huddles init since a huddlesSdk is already active",this.getConnectionState()):this.huddlesSdk=e}getHuddlesSdk(){return this.huddlesSdk}getConnectionState(){return{isShutdownInProgress:this.getIsShutdownInProgress(),isConnecting:this.isConnecting,hasActiveSdk:!!(this.huddlesSdk&&this.huddlesSdk.hasSession())}}static getInstance(){return HuddleConnectionManager.instance||(HuddleConnectionManager.instance=new HuddleConnectionManager),HuddleConnectionManager.instance}canConnect(){return this.huddlesSdk&&this.huddlesSdk.hasSession()?(n.warn("Singleton enabled: SDK already has active session",this.getConnectionState()),!1):this.getIsShutdownInProgress()?(n.warn("Singleton enabled: Shutdown in progress, ignoring connect request",this.getConnectionState()),!1):!this.isConnecting||(n.warn("Singleton enabled: Already connecting",this.getConnectionState()),!1)}}},0x193ebb7ca:(e,t,a)=>{"use strict";a.d(t,{Kp:()=>l,Nb:()=>r,RN:()=>s,Sq:()=>i,ZT:()=>n,e6:()=>o,jt:()=>c});let n=1e4,r="2.6",i="huddles_perf",l="app_metrics",o="state_change",s="client_metrics",c=5},0x154370b7c:(e,t,a)=>{"use strict";a.d(t,{$c:()=>p,h7:()=>h,t5:()=>s,KG:()=>_,q4:()=>c,_N:()=>l,sI:()=>y,Ap:()=>i,kq:()=>x,ik:()=>u,No:()=>g,fB:()=>A,Ye:()=>d,RI:()=>n,Fq:()=>b,oj:()=>r,qf:()=>f,Fu:()=>o,Tg:()=>m});let makeDeduction=e=>(t,...a)=>{if("string"==typeof t||"number"==typeof t)return e(t,...a)},n=makeDeduction(e=>e>30?e/5:void 0);makeDeduction(e=>e>400?e/20:void 0),makeDeduction(e=>e>1?e:void 0);let r=makeDeduction(e=>e>300?e/7.5:void 0),i=makeDeduction(e=>e>1?10*e:void 0),l=makeDeduction(e=>e>30?e/2:void 0),o=makeDeduction(e=>e>100?e/2:void 0),s=makeDeduction(e=>e>30?1.25*e:void 0),c=makeDeduction(e=>e>300?e/10:void 0),d=makeDeduction(e=>e>30?1.5*e:void 0),m=makeDeduction(e=>e>10?1.5*e:void 0);makeDeduction(e=>2*e);let u=makeDeduction(e=>"tls"===e||"tcp"===e?40:void 0);makeDeduction(e=>e&&e>500?e/100:void 0);let p=makeDeduction(e=>e>150?e/5:void 0),h=makeDeduction(e=>e>15?2*e:void 0);makeDeduction(e=>e>5?e:void 0);let _=makeDeduction(e=>e>20?e/5:void 0),f=makeDeduction(e=>{let t=15-e;return t>1?2.5*t:void 0}),b=makeDeduction(e=>e&&"none"!==e?25:void 0),g=makeDeduction(e=>e>0?20*e:void 0),y=makeDeduction(e=>e>1?1.25*e:void 0);makeDeduction(e=>e>300?e/10:void 0);let A=makeDeduction(e=>e&&e>30?1.5*e:void 0),x=makeDeduction(e=>e>1?Math.round(7.5*e):void 0)},0x20621f25a:(e,t,a)=>{"use strict";let n;a.d(t,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,fv:()=>getCpuCompetitionScoreTags,hi:()=>resetMosSmoothing});var r=a(0x106809bc6),i=a(0x18f2150ea),l=a(0x19ab1d23a),o=a(0x193ebb7ca),s=a(0x154370b7c);function trimComma(e){return e.endsWith(",")?e.slice(0,-1):e}let trackScoreAndReasons=()=>{let e=100,t="";return{deductFromScoreForReason:(a,n)=>{a&&(e-=a,t+=`${n},`)},getScore:()=>(0,r.A)(e,0,100),getReasons:()=>trimComma(t)}},getScreenshareDownstreamQualityScore=(e,t=!1)=>{let{deductFromScoreForReason:a,getScore:n,getReasons:r}=trackScoreAndReasons();if(t){let{screenshareVideoDownstreamPacketLossPercent2:t,screenshareVideoDownstreamJitterMs2:i,screenshareVideoDownstreamDelayMs2:l,screenshareVideoDownstreamFrameHeight2:o}=e;if(!o)return;return a((0,s.Tg)(t),"screenshareVideoDownstreamPacketLossPercent2"),a((0,s.Fu)(i),"screenshareVideoDownstreamJitterMs2"),a((0,s.q4)(l),"screenshareVideoDownstreamDelayMs2"),{screenshareVideoDownstreamQualityScore2:n(),screenshareVideoDownstreamQualityScoreReasons2:r()}}let{screenshareVideoDownstreamPacketLossPercent:i,screenshareVideoDownstreamJitterMs:l,screenshareVideoDownstreamDelayMs:o,screenshareVideoDownstreamFrameHeight:c}=e;if(c)return a((0,s.Tg)(i),"screenshareVideoDownstreamPacketLossPercent"),a((0,s.Fu)(l),"screenshareVideoDownstreamJitterMs"),a((0,s.q4)(o),"screenshareVideoDownstreamDelayMs"),{screenshareVideoDownstreamQualityScore:n(),screenshareVideoDownstreamQualityScoreReasons:r()}},getCpuCompetitionScoreTags=e=>{let{cpuUse:t,gpuUse:a,cpuUseRelative:n,longTasksPercentage:r}=e,{deductFromScoreForReason:i,getScore:l,getReasons:o}=trackScoreAndReasons();return i((0,s.sI)(r),"longTasksPercentage"),i((0,s.$c)(t),"cpuUse"),i((0,s.KG)(a),"gpuUse"),i((0,s.h7)(n),"cpuUseRelative"),{cpuCompetitionScore:l(),cpuCompetitionScoreReasons:o()}},getMetricAverage=(...e)=>{let t=e.filter(i.A);return t.length?Math.round((0,l.A)(t)):0},resetMosSmoothing=()=>{n=void 0},__WEBPACK_DEFAULT_EXPORT__=e=>{let t,a,l=(e=>{let{networkCurrentRoundTripTimeMs:t,networkNackCountReceivedPerSecond:a,networkSocketPacketsDiscardedOnSend:n,networkProtocol:r,networkRelayProtocol:i,audioDownstreamJitterMs:l,audioDownstreamPacketLossPercent:o,audioUpstreamPacketLossPercent:c,audioUpstreamJitterMs:d,videoDownstreamPacketLossPercent:m,screenshareDownstreamPacketLossPercent:u,screenshareUpstreamPacketLossPercent:p,selfVideoPacketLossPercent:h}=e,{deductFromScoreForReason:_,getScore:f,getReasons:b}=trackScoreAndReasons();_((0,s.ik)(r),"networkProtocol"),_((0,s.ik)(i),"networkRelayProtocol"),_((0,s.No)(n),"networkSocketPacketsDiscardedOnSend"),_((0,s.oj)(t),"networkCurrentRoundTripTimeMs");let g=getMetricAverage(l,d);_((0,s._N)(g),"networkJitterMs"),_((0,s.Ap)(a),"networkNackCountReceivedPerSecond");let y=getMetricAverage(o,m,u,c,h,p);return _((0,s.kq)(y),"networkPacketLossPercent"),{networkJitterMs:g,networkPacketLossPercent:y,networkQualityScore:f(),networkQualityScoreReasons:b()}})(e),{networkCurrentRoundTripTimeMs:c,networkTotalRoundTripTime:d}=e,m=getMetricAverage(d,c),u=((e,t,a)=>{if(!(0,i.A)(e)&&!(0,i.A)(t)&&!(0,i.A)(a))return;let n=e??0,l=t??0,o=(a??0)/2,s=.024*o;o>177.3&&(s+=.11*(o-177.3));let c=93.2-s-2.5*n-.1*l,d=1+.035*(c=(0,r.A)(c,0,100))+c*(c-60)*(100-c)*7*1e-6;return Math.round(10*(d=(0,r.A)(d,1,4.5)))/10})(l.networkPacketLossPercent,l.networkJitterMs,m);return n=void 0!==u?t=void 0!==n?Math.round((.3*u+.7*n)*10)/10:u:void 0,{...(e=>{let{audioDownstreamDecoderLoss:t,audioDownstreamJitterBufferDelay:a,audioDownstreamPacketLossPercent:n}=e,{deductFromScoreForReason:r,getScore:i,getReasons:l}=trackScoreAndReasons();return r((0,s.t5)(t),"audioDownstreamDecoderLoss"),r((0,s.q4)(a),"audioDownstreamJitterBufferDelay"),r((0,s.Ye)(n),"audioDownstreamPacketLossPercent"),{audioDownstreamQualityScore:i(),audioDownstreamQualityScoreReasons:l()}})(e),...l,...(e=>{let{audioUpstreamPacketLossPercent:t,audioUpstreamRoundTripTimeMs:a,audioUpstreamJitterMs:n,audioUpstreamNonNetworkPacketLossPercent:r}=e;if(!a)return;let{deductFromScoreForReason:i,getScore:l,getReasons:o}=trackScoreAndReasons();return i((0,s.Ye)(t),"audioUpstreamPacketLossPercent"),i((0,s.oj)(a),"audioUpstreamRoundTripTimeMs"),i((0,s._N)(n),"audioUpstreamJitterMs"),i((0,s.fB)(r),"audioUpstreamNonNetworkPacketLossPercent"),{audioUpstreamQualityScore:l(),audioUpstreamQualityScoreReasons:o()}})(e),...(e=>{let{selfVideoPacketLossPercent:t,selfVideoJitterMs:a,isSelfVideoEnabled:n,selfVideoOutboundFramesPerSecond:r,selfVideoBitrate:i}=e;if(!n||!i)return;let{deductFromScoreForReason:l,getScore:o,getReasons:c}=trackScoreAndReasons();return l((0,s.Tg)(t),"selfVideoPacketLossPercent"),l((0,s.Fu)(a),"selfVideoJitterMs"),l((0,s.qf)(r),"selfVideoOutboundFramesPerSecond"),{selfVideoQualityScore:o(),selfVideoQualityScoreReasons:c()}})(e),...(a={},e.screenshareVideoDownstreamFrameHeight2&&Object.assign(a,getScreenshareDownstreamQualityScore(e,!0)),{...getScreenshareDownstreamQualityScore(e),...a}),...(e=>{let{deductFromScoreForReason:t,getScore:a,getReasons:n}=trackScoreAndReasons(),{screenshareUpstreamBitrate:r,screenshareUpstreamPacketLossPercent:i,screenshareUpstreamJitter:l,screenshareUpstreamPacketSendDelay:o,screenshareUpstreamQualityLimitationReason:c}=e;if(r)return t((0,s.Tg)(i),"screenshareUpstreamPacketLossPercent"),t((0,s.Fu)(l),"screenshareUpstreamJitter"),t((0,s.RI)(o),"screenshareUpstreamPacketSendDelay"),t((0,s.Fq)(c),"screenshareUpstreamQualityLimitationReason"),{screenshareUpstreamQualityScore:a(),screenshareUpstreamQualityScoreReasons:n()}})(e),...getCpuCompetitionScoreTags(e),...(e=>{let{videoDownstreamPacketLossPercent:t,videoDownstreamFramesDecodedPerSecond:a,videoDownstreamBitrate:n,videoDownstreamJitterMs:r,videoDownstreamDelayMs:i}=e;if(!n)return;let{deductFromScoreForReason:l,getScore:o,getReasons:c}=trackScoreAndReasons();return l((0,s.Tg)(t),"videoDownstreamPacketLossPercent"),l((0,s.q4)(i),"videoDownstreamDelayMs"),l((0,s.Fu)(r),"videoDownstreamJitterMs"),l((0,s.qf)(a),"videoDownstreamFramesDecodedPerSecond"),{videoDownstreamQualityScore:o(),videoDownstreamQualityScoreReasons:c()}})(e),...void 0!==t&&{mos:t},qualityScoringVersion:o.Nb}}},0x1552169ad:(e,t,a)=>{"use strict";let n;a.d(t,{ZR:()=>resetJoinTimingMetrics,jm:()=>updateJoinTimingMetrics,s2:()=>getJoinTimingMetrics});let updateJoinTimingMetrics=e=>{n||(n={}),Object.assign(n,e)},getJoinTimingMetrics=()=>n,resetJoinTimingMetrics=()=>{n=void 0}},0x1f06b0cba:(e,t,a)=>{"use strict";a.d(t,{lx:()=>l,zu:()=>i});var n,r,i=((n={})[n.AUDIO=0]="AUDIO",n[n.VIDEO=1]="VIDEO",n),l=((r={}).RtmMetrics="rtm-metrics",r.RenderTiming="render-timing",r.BluetoothDevices="bluetooth-devices",r.MemoryLeaks="memory-leaks",r.SelectedMediaRegion="selected-media-region",r.PreferredMediaRegion="preferred-media-region",r.VoiceFocusConfig="voice-focus-config",r.NetworkDisconnect="network-disconnect",r.CallId="call-id",r.ScreenshareContentType="screenshare-content-type",r.AppMetrics="app-metrics",r.NoAudio="no-audio",r.CameraResolution="max-camera-resolution",r.SetIsDebugApp="set-is-debug-app",r.TroubleshootingContactUsClicked="troubleshooting-contact-us-clicked",r.TroubleshootingEntryPoint="troubleshooting-entry-point",r.TroubleshootingExitHealthSnapshot="troubleshooting-exit-health-snapshot",r)},0x5186d4e:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=new(a(0x16a98fd3c)).D},0x1e32c017b:(e,t,a)=>{"use strict";a.d(t,{U:()=>i,p:()=>getTroubleshootingMetricsFromTags});var n=a(0x154370b7c),r=a(0x2431c415c);let i=80,getTroubleshootingMetricsFromTags=e=>{let t,{audioDownstreamQualityScore:a,networkQualityScore:l,networkType:o,networkProtocol:s,networkRelayProtocol:c,networkAvailableOutgoingBitrate:d,networkJitterMs:m,audioDownstreamJitterBufferDelay:u,networkCurrentRoundTripTimeMs:p,mediaRegionSelected:h,mediaRegionPreferred:_,cpuUse:f,cpuUseRelative:b,cpuCompetitionScore:g,gpuUse:y,batteryIsUsing:A,selectedMicrophone:x,selectedCamera:E,selectedSpeakers:C,cameraIsBlocked:k,cameraIsAvailable:v,microphoneIsBlocked:S,microphoneIsAvailable:I,isMicrophoneBluetooth:w,isSpeakerBluetooth:T,isMicrophoneAndSpeakerOnSameDevice:N,isHardwareAccelerationEnabled:M,isDisconnected:R,noAudioInput:P,osIsThrottlingCpu:L,networkPacketLossPercent:O,powerThrottlingActive:D,mos:F}=e;switch(!0){case l<=0:t=r.bz.Bad;break;case l<=i:t=r.bz.Warn;break;default:t=r.bz.Good}return{metrics:{stable:{mediaRegionSelected:h,mediaRegionPreferred:_,selectedMicrophone:x,selectedCamera:E,selectedSpeakers:C},unstable:{cpuCompetitionScore:g,cpuUse:f,gpuUse:y,cpuUseRelative:b,audioQualityScore:a,jitterMs:m,audioDelayMs:u,roundTripTimeMs:p,packetLossPercent:O,incomingBandwidth:d,networkQualityScore:l,networkRelayProtocol:c,mos:F}},warnings:{stable:{isVpnEnabled:"vpn"===o,isSuboptimalProtocol:!!(0,n.ik)(s)||!!(0,n.ik)(c),isMediaRegionSuboptimal:!!h&&!!_&&h!==_,isUsingBatteryPower:A,isMicrophoneBluetooth:w,isMicrophoneAndSpeakerOnSameDevice:N,isSpeakerBluetooth:T,isCameraProbablyIphone:/iphone/.test(E?.toLowerCase()),isHardwareAccelerationDisabled:!1===M,isOSThrottlingCpu:!!L},unstable:{isCpuUsePoor:!!(0,n.$c)(f),isCpuUseRelativePoor:!!(0,n.h7)(b),isGpuUsePoor:!!(0,n.KG)(y),isJitterPoor:!!(0,n._N)(m),isRTTPoor:!!(0,n.oj)(p),isAudioDelayPoor:!!(0,n.q4)(u),isPacketLossPoor:!!(0,n.kq)(O)}},alerts:{stable:{isCameraBlocked:k||!v,isMicrophoneBlocked:S||!I,isMicrophoneNotSendingAudio:!!P,isDisconnected:R,isPowerThrottlingActive:!!D},unstable:{networkQualityHealth:t,isNetworkQualityPoor:l<=i,isAudioQualityPoor:a<=20,isCpuCompetitionPoor:g<=60,isMosQualityPoor:void 0!==F&&F<=3.2}}}}},0x1806236df:(e,t,a)=>{"use strict";a.d(t,{N5:()=>detectMemoryLeaks,R1:()=>s,Y:()=>monitorObjectForMemoryLeaks});var n,r=a(0x188b5b258),i=a(0x1f06b0cba),l=a(0x5186d4e),o=a(0x6a506842),s=((n={}).HuddlesSdk="huddles-sdk",n.ChimeChannelListener="chime-channel-listener",n.ChimeChannelBroadcaster="chime-channel-broadcaster",n.VoiceFocusDevice="voice-focus-device",n.VideoTransformDevice="video-transform-device",n.VideoFrameProcessor="video-frame-processor",n);let c=new Map([["huddles-sdk",r.Y.create({name:"huddles-sdk"})],["chime-channel-listener",r.Y.create({name:"chime-channel-listener"})],["chime-channel-broadcaster",r.Y.create({name:"chime-channel-broadcaster"})],["voice-focus-device",r.Y.create({name:"voice-focus-device"})],["video-transform-device",r.Y.create({name:"video-transform-device"})],["video-frame-processor",r.Y.create({name:"video-frame-processor"})]]),d=(0,o.Jt)("HUDDLE-LEAK-MONITOR"),monitorObjectForMemoryLeaks=({name:e,ref:t})=>{let a=c.get(e);if(!a)return;let n=a.getMetrics();if(n){let{numberOfObjects:t,numberOfExpiredObjects:a}=n,r=t-a;a>3&&(d.warn(`Detected ${a} memory leak(s) for ${e}${r?` (with another ${r} instances in memory)`:""}`),l.A.publish({type:i.lx.MemoryLeaks,update:{name:e,leakCount:a}}))}a.watch(t)},detectMemoryLeaks=()=>{for(let[,e]of c)e.expectGCAll()}},0xea8d1901:(e,t,a)=>{"use strict";a.d(t,{Hf:()=>combineSurveyTags,c8:()=>reportHuddleSurveyResultsTrace,py:()=>u,qZ:()=>cacheNetworkMetrics});var n,r=a(0x19e23da64),i=a(0xf87a4e28),l=a(0xf8dd7f80),o=a(0x193ebb7ca),s=a(0xd4defaa9),c=a(0x1ec68d6a3),d=a(0x157ccdb87),m=a(0x1489fdf8f),u=((n={}).Good="good",n.Bad="bad",n.Dismiss="dismiss",n);let p="HUDDLES-SURVEY-TRACE",h={},_=["networkRelayProtocol","networkProtocol","networkType","networkCandidateType","networkLocalAddress","networkLocalPort","networkFoundation","networkUsernameFragment","networkBytesSent","networkBytesReceived","networkBytesDiscardedOnSend","networkTotalRoundTripTime","networkPriority","networkAvailableIncomingBitrate","networkAvailableOutgoingBitrate","networkNackCountReceivedPerSecond","networkSocketPacketsDiscardedOnSend","networkCurrentRoundTripTimeMs"],cacheNetworkMetrics=e=>{let t,a=(t={},_.forEach(a=>{void 0!==e[a]&&(t[a]=e[a])}),t);Object.keys(a).length>0&&(h={...h,...a})},combineSurveyTags=e=>{h={...h,...e}},reportHuddleSurveyResultsTrace=({teamId:e,callId:t,results:a})=>{let n=e?(0,c.Ay)({label:p,teamId:e}):(0,l.getGenericLogger)({label:p});if(!e)return void n.warn("Missing team id. Exiting early");let u=(0,d.E)({teamOrEnterpriseId:e}),_=u.createTrace({traceName:o.Sq,tags:{__dataset:o.RN},samplingOptions:{sampleRate:1,sampleType:i.tS.SESSION}}),f=_.startSpan("survey"),b={...a};(0,r.A)(b,"comments");let{notOkResponses:g,summary:y,surveyType:A}=b||{};if(!t)return void n.warn("Missing callId. Exiting early");if(!y)return void n.warn("Missing summary. Exiting early");try{n.info(`Processing huddle survey response. callId: ${t} - traceId: ${_.getTraceId()} - results: ${JSON.stringify(b)}`)}catch(e){n.error(e)}let x={};g?.forEach(e=>{x[e]=!0});let E={teamId:e,callId:t,surveySummary:y,surveyType:A,surveyResponseCount:g?.length||0,surveyResponses:g?.join(" "),...x,...h},C=(0,s.tT)({...E,...(0,m.vP)()});f.addTags(C),f.close(),n.info(`Reporting huddle survey trace with ${Object.keys(C).length} tags (${_.getTraceId()})`),n.debug("Tags attached",C),u.reportTrace(_),u.clearTrace(_),h={}}},0x43a6c25d:(e,t,a)=>{"use strict";let n,r,i,l;a.d(t,{A:()=>eU});var o,s,c=a(0xca924ee1),d=a(0xf87a4e28),m=a(0xf8dd7f80),u=a(0x193ebb7ca),p=a(0x1bbc0c9bf),h=a(0x178533105),_=a(0x1598e5174),f=a(0x839ba347),b=a(0xf4930165),g=a(0xd6ebaea7),y=a(0x7a13daf2),A=a(0x18f2150ea),x=a(0x19ab1d23a),E=a(0xdf8554bd),C=a(0xb77a689a);let k=(0,m.getGenericLogger)({label:"HUDDLE-METRICS-CACHE"}),v=[],getMetricsSummary=()=>{let e=(e=>{try{if(!e.length)return{};let t=Date.now(),a=(0,h.A)(e,(e,t)=>{if(!(0,_.A)(t))throw Error(`metrics cache reports are not correctly formatted. Expected object, got ${typeof t}`);return(0,f.A)(t,(t,a)=>{a in e?e[a].push(t):e[a]=[t]}),e},{}),n=(0,b.A)(a,e=>{let t=e.find(e=>null!=e),getMostCommon=e=>{let t=(0,g.A)(e);return(0,y.A)(Object.entries(t),([e,t])=>t)?.[0]};if((0,A.A)(t))return(0,x.A)(e.filter(A.A));if((0,E.A)(t)){let t=getMostCommon(e);return"true"===t}return(0,C.A)(t)?getMostCommon(e):e[0]});k.info(`Aggregating huddle metric reports took ${Date.now()-t}ms for reports ${e.length}`);let r=Object.keys(e[0]).filter(e=>!(e in n));return r.length&&k.warn(`Keys missing from summary: ${r.length}`),n}catch(t){return k.error("Error merging reports into summary",t),e[0]||{}}})(v);return v.length=0,e},S=["cpuCount","isHardwareAccelerationEnabled","audioInitPossiblyFailed","audioInitTime","deviceRecordsAudioInputCount","deviceRecordsAudioOutputCount","deviceRecordsCameraCount","deviceRecordsTotalCount","deviceRecordsWebAudioCount","deviceRecordsWebAudioSelectedCount","deviceRecordsWebAudioUsedCount","mediaRegion","mediaRegionMatches","mediaRegionMatchesPreference","mediaRegionPreferred","mediaRegionSelected","preferredMediaRegion","roomsJoinTime","sdkInitializedTime","audioConnectedTime","voiceFocusInitializedTime","credentialsToVoiceFocusInitializedTime","firstPresenceTime","secondsSinceJoining","subAppName","sessionId","userId","workspaceCount","chimeSdkVersion","teamTier","isPreWarmed","isPrejoin","isTranscriptAllowed","osVersion","envIsJsPath","envIsQa","xwsChannelCount"],I={},cacheStableSummaryTags=e=>{for(let t of S)t in e&&(I[t]=e[t])};var w=a(0x9e671ad),T=a(0x18dac2b8e);let AlertUpdater=class AlertUpdater{logger;currentUnstableAlerts={};currentAlerts={networkQualityHealth:[],isNetworkQualityPoor:[],isAudioQualityPoor:[],isCpuCompetitionPoor:[],isMosQualityPoor:[]};updateInterval=1e4;updateIntervalIncrements=0;constructor(e){this.logger=e}maybeIncrementUpdateInterval=()=>{this.updateIntervalIncrements+=1,this.updateIntervalIncrements%3==0&&(this.updateInterval=Math.min(3e4,this.updateInterval+1e3))};getStableAlerts=(e,t)=>{let nextAlert=a=>{let n=e[a],r=this.currentAlerts[a],i=Date.now();r.push({timestamp:i,value:n}),r=r.filter(({timestamp:e})=>i-e<=3e4),this.currentAlerts[a]=r,r=r.filter(({timestamp:e})=>i-e<=t.interval);let l=new Map;for(let e of r)l.has(e.value)||l.set(e.value,0),l.set(e.value,l.get(e.value)+1);let o=Array.from(l.entries()),[s,c]=o[0];for(let[e,t]of o.slice(1))t>c&&(c=t,s=e);return o.length?s:this.currentUnstableAlerts[a]};return{isAudioQualityPoor:nextAlert("isAudioQualityPoor"),isCpuCompetitionPoor:nextAlert("isCpuCompetitionPoor"),isNetworkQualityPoor:nextAlert("isNetworkQualityPoor"),networkQualityHealth:nextAlert("networkQualityHealth"),isMosQualityPoor:nextAlert("isMosQualityPoor")}};getStabilityConfig=()=>({interval:this.updateInterval});getAlertUpdates=({alerts:e})=>{let t=this.getStableAlerts(e,this.getStabilityConfig()),a=!(0,w.A)(t,this.currentUnstableAlerts);if(this.maybeIncrementUpdateInterval(),a)return this.currentUnstableAlerts=t,this.logger.debug("Updated alerts and metrics will be dispatched to redux"),t}};let N="https://slack.com/help/articles/115003538426-Troubleshoot-audio-and-video-issues-in-Slack",M={isNetworkQualityPoor:"The user's network quality is poor, which can cause delays or degraded audio or video, drops in connectivity, and audio/video desynchronization. Guide them through improving network stability, for instance, moving closer to their Wi-Fi router, switching to a wired connection if possible, limiting other bandwidth-intensive activities, or trying to connect with a different network.",isCpuCompetitionPoor:"The user\u2019s device is experiencing high CPU usage, causing audio or video delays, connectivity drops, or desynchronization. Suggest they close unnecessary applications, tabs, limit other CPU-intensive activities, ensure their computer has adequate airflow around it, and check if their hardware meets the recommended specifications.",isDisconnected:"The user is disconnected from the Huddle and can't send or receive audio or video. This might be due to network instability, incorrect configurations, hardware issues, or connectivity problems. Guide them through checking their network connection, suggest they limit other bandwidth-intensive activities, try connecting with a different network, move closer to their router, and suggest restarting the call.",isMicrophoneBlocked:"Slack can't access the user's microphone, possibly due to permission or settings issues. Verify that Slack has been granted permission to use the microphone, and ensure no other application is using it. They can check this by going to System Preferences (on macOS) or Sound settings (on Windows) and ensuring that Slack is checked.",isMicrophoneNotSendingAudio:"The user's microphone is connected, but isn't sending any audio, possibly due to another application using it, being muted, or system-level settings. Suggest they unplug and replug their device, restart Slack, limit other CPU-intensive activities, ensure their computer has adequate airflow around it, close unnecessary applications or tabs, and check for conflicting settings.",isCameraBlocked:"Slack can't access the user's camera, likely due to settings or permissions issues. Verify that Slack has permission to use their camera, and ensure no other application is using it. They can check this by going to System Preferences (on macOS) or Camera Privacy Settings (on Windows) and ensuring that Slack is checked.",...{isMicrophoneBluetooth:"The user is using a Bluetooth microphone, which could cause audio delays, reduce audio quality, or cause audio and video to fall out of sync. If these problems occur, suggest they switch to a wired or built-in microphone.",isCameraProbablyIphone:'The user might be unknowingly using their iPhone camera, which could lead to issues like a black screen or missing video. To prevent this, they can disable the "Continuity Camera" feature on their device. Guide them to go to Settings > Camera > Continuity and turn off the option.',isVpnEnabled:`The user is connected via a VPN, which can increase latency or cause connectivity issues if the VPN isn't optimized for video conferencing. Suggest they disable the VPN or ask their IT team to allow Slack traffic to bypass it. More details can be found here: ${N}`,isSuboptimalProtocol:`The user's connection protocol is TLS/TCP, not UDP, which may be due to a VPN, proxy, or firewall not configured for video conferencing. Suggest they disable their VPN or proxy, or ask their IT team to allow Slack traffic to bypass it. More details can be found here: ${N}`,isHardwareAccelerationDisabled:"Hardware acceleration seems to be disabled on the user's device, which could degrade performance. Suggest they re-enable hardware acceleration in their Slack preferences. They can do this by going to Preferences > Advanced > Enable hardware acceleration.",isUsingBatteryPower:"The user's device is running on battery power, which could limit device performance and cause audio, video, or application lag. If they report such issues, suggest they connect their device to a power source.",isMediaRegionSuboptimal:"The user is in a different region from the Huddle host, potentially causing increased latency and instability. This geographical disparity can't be controlled by users but network stability and connectivity can be improved. Suggest that they move closer to their Wi-Fi router, switch to a wired connection if possible, limit other bandwidth-intensive activities on their computer or network, or try connecting with a different network.",isOSThrottlingCpu:"The operating system is throttling CPU to manage heat or conserve battery power, which could lead to degraded audio or video quality and/or a general sense that Slack is slow or unresponsive. This might manifest as video freezing frequently, audio cutting out frequently, or audio-video sync issues. In more extreme cases, it can even trigger disconnections from the Chime media server. To mitigate this, ensure the user's device is well-ventilated, that they avoid running unnecessary applications during the call, and, if they are on a laptop, they should connect it to a power source. Adjusting power settings to prefer maximum performance (even when battery is being used) can also help. For detailed steps, please refer to your device's power management settings."}};var R=a(0x1e32c017b),P=a(0x119ad2a26);let L={isNetworkQualityPoor:"networkQualityScoreReasons",isCpuCompetitionPoor:"cpuCompetitionScoreReasons"};let HuddlePerfObserver=class HuddlePerfObserver{logger;callLogger;dispatch;isDev=(0,T.Cu)();isJsPath=(0,T.b3)();loggedHuddleConfigInfo=!1;lastProcessedTagsTs=null;alertUpdater;lastProcessedStats=null;lastUnstableMetricsUpdateTs=0;lastLoggedTagsTs=Date.now();constructor({callLogger:e,logger:t,dispatch:a}){this.callLogger=e,this.logger=t,this.dispatch=a,this.alertUpdater=new AlertUpdater(t),this.callLogger.info("huddle perf observer initialized")}logHuddleConfigInfo=e=>{if(this.loggedHuddleConfigInfo||!this.lastProcessedTagsTs)return;let{isIA4Prod:t,isUnifiedGrid:a,visibleSidebarItemCount:n,networkType:r,networkProtocol:i,networkRelayProtocol:l,isHardwareAccelerationEnabled:o,batteryIsUsing:s}=e;this.callLogger.info(`Initial Huddle Config: Network Type=${r}; Network Protocol=${i}; Network Relay Protocol=${l}; IA4=${t}; Unified Grid=${a}; Hardware Acceleration=${o??"unknown (browser)"}; Using Battery Power=${s}; Sidebar Size=${n};`),this.loggedHuddleConfigInfo=!0};logWarningAndAlertUpdates=(e,t)=>{Object.entries(e).forEach(([a,n])=>{if(n&&this.isRelevantWarning(a,e)&&M[a]){let e;if(a in L){let n=L[a];n&&t?.[n]&&(e=t[n])}this.logger.warn(`\u{1F6A8} WARNING! ${M[a]}${e?` reasons: (${e})`:""}`)}})};isRelevantWarning=(e,t)=>"isNetworkQualityPoor"!==e&&"isCpuCompetitionPoor"!==e||"isAudioQualityPoor"in t&&!!t.isAudioQualityPoor;logTags=e=>{let t=Date.now();this.isJsPath||this.isDev?this.logger.info(`Recorded ${u.Sq}:${u.Kp} event span tags`,e):t-this.lastLoggedTagsTs>1e4&&(this.logger.debug(`Recorded ${u.Sq}:${u.Kp} event span tags`,e),this.lastLoggedTagsTs=t)};getStatsDiff=e=>{let t=this.lastProcessedStats;return(0,b.A)(e,(e,a)=>({stable:t?!(0,w.A)(t[a]?.stable,e?.stable):null,unstable:t?!(0,w.A)(t[a]?.unstable,e?.unstable):null}))};maybeUpdateTroubleshootingPanel=e=>{let t=Date.now(),a=(0,R.p)(e),n=this.getStatsDiff(a);if(this.lastProcessedStats=a,(n.alerts?.stable||n.alerts?.stable===null)&&a.alerts.stable&&(this.dispatch((0,P._6)(a.alerts.stable)),n.alerts.stable&&this.logWarningAndAlertUpdates(a.alerts.stable)),(n.metrics?.stable||n.metrics?.stable===null)&&a.metrics.stable&&this.dispatch((0,P.qO)(a.metrics.stable)),(n.warnings?.stable||n.warnings?.stable===null)&&a.warnings.stable&&(this.dispatch((0,P.it)(a.warnings.stable)),this.logWarningAndAlertUpdates(a.warnings.stable)),a.alerts?.unstable){let t=this.alertUpdater.getAlertUpdates({alerts:a.alerts.unstable});t&&(this.dispatch((0,P.Li)(t)),this.logWarningAndAlertUpdates(t,e))}a.metrics.unstable&&a.warnings.unstable&&(!this.lastUnstableMetricsUpdateTs||t-this.lastUnstableMetricsUpdateTs>1e4&&(n.warnings?.unstable||n.metrics?.unstable))&&(this.dispatch((0,P.bW)({metrics:a.metrics.unstable,warnings:a.warnings.unstable})),this.lastUnstableMetricsUpdateTs=t)};processTags=e=>{this.maybeUpdateTroubleshootingPanel(e),this.logHuddleConfigInfo(e),this.logTags(e),this.lastProcessedTagsTs=Date.now()}};var O=a(0x1383b91ba);let D={longTasksPercentage:0,longTasksPeakDuration:0,longTasksCount:0,longTasksTotalDuration:0},F=class{report={...D};lastReportTime=performance.now();observer=null;isSupported;constructor(){this.isSupported=this.isLongTaskTimingSupported()}initializeReport(){this.report={...D},this.lastReportTime=performance.now()}onReceiveLongTaskList=e=>{let t=e.getEntries(),a=0,n=0;t.forEach(e=>{let t=e.duration;a+=t,t>n&&(n=t)}),this.report.longTasksTotalDuration+=a,this.report.longTasksCount+=t.length,n>this.report.longTasksPeakDuration&&(this.report.longTasksPeakDuration=n)};isLongTaskTimingSupported(){return"u">typeof PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("longtask")}start(){!this.observer&&this.isSupported&&(this.observer=new PerformanceObserver(this.onReceiveLongTaskList),this.observer.observe({entryTypes:["longtask"]}),this.observer.takeRecords())}stop(){this.observer&&(this.observer.disconnect(),this.observer=null)}getReportSinceLastCall(){if(!this.observer||!this.isSupported)return;let e=performance.now()-this.lastReportTime;this.report.longTasksCount>0&&(this.report.longTasksPercentage=Math.round(this.report.longTasksTotalDuration/e*100));let t={...this.report};return this.initializeReport(),t}};var U=a(0x220a941b7),B=a(0x21f3c49e8),H=a(0x210d62337),W=a(0x30d0b075),V=a(0x6497d5b5),G=a(0x1f06b0cba);let removeUndefinedValues=e=>Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e)),getScrubbedMetricValue=e=>"string"==typeof e||"boolean"==typeof e?e:isNaN(e)?void 0:null!=e?Math.round(e):void 0,getNonObservedMetric=(e,t,a,n,r)=>{let i=e?.getMetricMap(t,a)[n];if(i?.transform)return i.transform(n,r)},calculateNonNetworkPacketLoss=(e,t=50,a=0)=>{if(!(0,A.A)(t)||!(0,A.A)(e))return 0;let n=isNaN(a)?0:a;return e===t||e>t?0:Math.round((t-e)/t*100-n)};var q=a(0xd4defaa9),j=((o=j||{})[o.UPSTREAM=0]="UPSTREAM",o[o.DOWNSTREAM=1]="DOWNSTREAM",o),z=((s=z||{})[s.AUDIO=0]="AUDIO",s[s.VIDEO=1]="VIDEO",s);let getNextStat=(e,t,a,n=!1)=>{if(!e||!t)return;let r=(t.timestamp-e.timestamp)/1e3,i=t[a]-e[a];return n?i/r:i},mapCodecIdToName=(e,t)=>{if(void 0!==e)return t[String(e)]?.mimeType},processRtpStats=(e,t,a,n)=>{let r="upstream"===a?"self":"",i="video"===n?"video":"audio",l="upstream"===a?"Upstream":"Downstream",o={[`${r}${i}${l}CodecId`]:e.codecId,[`${r}${i}${l}FirCount`]:e.firCount,[`${r}${i}${l}PliCount`]:e.pliCount,[`${r}${i}${l}SliCount`]:e.sliCount,[`${r}${i}${l}NackCount`]:e.nackCount};return{...t,...o}},processCodecStats=(e,t)=>{let a={...t};return e.id&&void 0!==e.payloadType&&e.mimeType&&void 0!==e.clockRate&&(a[e.id]={payloadType:e.payloadType,mimeType:e.mimeType,clockRate:e.clockRate,channels:e.channels,sdpFmtpLine:e.sdpFmtpLine}),a},K=["nackCountReceivedPerSecond","currentRoundTripTimeMs","availableOutgoingBitrate","availableIncomingBitrate"];var $=a(0x20621f25a),Y=a(0x6a506842),Q=a(0x16a98fd3c);let Z=(0,a(0x1ec68d6a3).Wo)({label:"COMPUTE-PRESSURE"}),J={nominal:1,fair:2,serious:3,critical:4};let ComputePressureObserver=class ComputePressureObserver{static isSupported=()=>"PressureObserver"in globalThis;defaultSampleRate=.5;pressureObserver;pubSub=new Q.D;isObserving=!1;currentLevel=null;constructor(){Z.info("Compute Pressure API is supported. Initializing pressure observer.");try{this.pressureObserver=new PressureObserver(this.pressureObserverCallback,{sampleRate:this.defaultSampleRate})}catch(e){Z.error("An error occurred creating a new instance of the PressureObserver",e)}if(!this.pressureObserver)return void Z.error("Compute pressure observer not created, though PressureObserver API should be supported");this.startObserving()}startObserving=async()=>{if(!this.isObserving){try{this.isObserving=!0,await this.pressureObserver?.observe("cpu")}catch(e){this.isObserving=!1,Z.error("An error occurred while attempting to observe compute pressure",e)}Z.info("Observing compute pressure")}};getPressureLevelFromRecord=e=>{if(e)return J[e.state]};pressureObserverCallback=e=>{let t=e.pop();if(!t)return;let a=this.getPressureLevelFromRecord(t);a&&(this.currentLevel=a,1===a?Z.debug(`Compute pressure updated to ${t.state} (${a} of 4)`):Z.warn(`Compute pressure updated to ${t.state} (${a} of 4)`),this.pubSub.publish(a))};subscribe=async e=>{this.pubSub.subscribe(e),await this.startObserving()};unsubscribe=e=>{if(this.pubSub.unsubscribe(e),!this.pubSub.subscriberCount)try{this.pressureObserver?.disconnect(),Z.debug("No longer observing compute pressure.")}catch(e){Z.error("An error occurred attempted to disconnect from the compute pressure observer",e)}};getCurrentLevel=()=>{let e;if(this.currentLevel)return this.currentLevel;try{e=this.pressureObserver?.takeRecords()}catch(e){Z.error("An error occurred attempting to get latest compute pressure reports",e)}let t=e?this.getPressureLevelFromRecord(e.pop()):void 0;return t&&(this.currentLevel=t),t}};let X=0,ee={traceName:u.Sq},et="HUDDLES-PERF",ea={troubleshootingEntryPoint:null,troubleshootingContactUsClicked:!1},en=class{callLogger=(0,Y.tZ)(et);logger=(0,m.getGenericLogger)({label:et});sharedTags=ee;transientTags={};renderTimings=[];rtmProcessingTimings=[];troubleshootingTags={...ea};lastAppMetricsRecordingTs=Date.now();currentTags={};computePressureObserver;computePressure=null;longTaskObserver=new F;constructor(){this.initSharedTags(),this.initComputePressureObserver(),this.longTaskObserver?.start()}initSharedTags=()=>{X+=1,this.updateSharedTags({huddlesCountSinceRefresh:X})};initComputePressureObserver=()=>{this.computePressureObserver=(()=>{if(i)return i;if(!ComputePressureObserver.isSupported())return void Z.info("Compute Pressure API is not supported.");try{i=new ComputePressureObserver}catch(e){Z.error("An error occurred while attempting to create compute pressure observer",e);return}return i})(),this.computePressureObserver&&this.computePressureObserver.subscribe(this.updateComputePressure).then(()=>{let e=this.computePressureObserver?.getCurrentLevel();this.computePressure=e})};updateSharedTags=e=>{this.sharedTags={...this.sharedTags,...e}};updateTransientTags=e=>{this.transientTags={...this.transientTags,...e}};updateComputePressure=e=>{let t,a=this.computePressure;switch(this.computePressure=e,e){case 1:t="System workload is minimal, operating at lower clock speed to conserve power.";break;case 2:t="System is performing well but under a fair amount of pressure. Still able to take on additional workload without issues.";break;case 3:t="System is experiencing significant pressure but remains sustainable; close to operational limits.";break;case 4:t="System is now about to reach its operational limits; continued pressure may lead to CPU throttling.";break;default:t="Unknown system workload condition."}e>2?this.callLogger.warn(`Compute pressure updated to level ${e} of 4. This is a measure of the strain on the user's computer's processing capacity, which may or may not be caused by Slack or Huddles, but will likely impact performance. A score of ${e} suggests that: ${t}. If this warning is frequent, suggest that the user close unused tabs or applications on their computer, ensure their computer is not in battery-saving mode, and/or give other general advice around reducing CPU use.`):a&&a>2&&this.logger.debug(`Compute pressure updated to level ${e} of 4 from ${a}. ${t}`)};updateState=e=>{switch(e.type){case G.lx.RenderTiming:this.renderTimings.push(e.update);break;case G.lx.RtmMetrics:this.rtmProcessingTimings.push(e.update);break;case G.lx.AppMetrics:this.updateMetrics(e.update);break;case G.lx.TroubleshootingEntryPoint:this.troubleshootingTags.troubleshootingEntryPoint=e.update;break;case G.lx.TroubleshootingContactUsClicked:this.troubleshootingTags.troubleshootingContactUsClicked=!0;break;default:(({type:e,update:t},a)=>{switch(e){case G.lx.BluetoothDevices:case G.lx.PreferredMediaRegion:case G.lx.CameraResolution:case G.lx.CallId:case G.lx.ScreenshareContentType:Object.assign(a.sharedTags,t);break;case G.lx.MemoryLeaks:{let e=a.sharedTags.memoryLeakCount;Object.assign(a.sharedTags,{type:"shared",tags:{[`memoryLeaks-${t.name}`]:t.leakCount,memoryLeakCount:e?e+t.leakCount:t.leakCount}});break}case G.lx.SelectedMediaRegion:{let{mediaRegionPreferred:e}=a.sharedTags,n=!e||!t.mediaRegionSelected||e===t.mediaRegionSelected;Object.assign(a.sharedTags,{mediaRegionSelected:t.mediaRegionSelected,mediaRegionMatchesPreference:n});break}case G.lx.VoiceFocusConfig:Object.assign(a.sharedTags,{vfSimdSupported:t.model.simd,vfModelVariant:t.model.variant,vfSupported:t.supported});break;case G.lx.NetworkDisconnect:"self"===t.peerId&&Object.assign(a.transientTags,{selfDisconnectCount:(a.transientTags.selfDisconnectCount||0)+1});break;case G.lx.NoAudio:{let e="send"===t.direction?{noAudioInput:t.noAudio}:{noAudioOutput:t.noAudio};Object.assign(a.sharedTags,e);break}case G.lx.SetIsDebugApp:Object.assign(a.sharedTags,{isDebugApp:!0});break;default:(0,Y.tZ)("HUDDLES-PERF").error(Error(`Unexpected type: ${e}`))}})(e,{sharedTags:this.sharedTags,transientTags:this.transientTags})}};updateMetrics=({huddleStateSnapshot:e,clientMetricReport:t,screenshareRtcStats:a})=>{let i=t?(({clientMetricReport:e,selfAttendeeId:t})=>{let a=(({clientMetricReport:e,selfAttendeeId:t})=>{let a=e.getObservableVideoMetrics();if(!a||!t)return;let n=0,r={},i=[];if((0,f.A)(a,(a,l)=>{let o=Number(Object.keys(a)?.[0]);if(!o)return;let s=a[o];if(l.endsWith("#content")){n+=1,(0,f.A)(s,(e,t)=>{r[(0,U.A)(`screenshare_${(0,q._3)(t)}${n>1?`${n}_`:""}`)]=getScrubbedMetricValue(e)}),Object.assign(r,{screenshareVideoDownstreamDecoderImplementation:e.streamMetricReports[o]?.currentStringMetrics?.decoderImplementation,screenshareVideoDownstreamFramesReceivedPerSecond:e.countPerSecond("framesReceived",o),screenshareVideoDownstreamFramesDroppedPerSecond:getNonObservedMetric(e,1,1,"framesDropped",o),screenshareVideoDownstreamFreezeCount:getNonObservedMetric(e,1,1,"freezeCount",o),screenshareVideoDownstreamTotalDecodeTime:getNonObservedMetric(e,1,1,"totalDecodeTime",o),screenshareVideoDownstreamTotalFreezesDuration:getNonObservedMetric(e,1,1,"totalFreezesDuration",o)});return}if(t===l)0!==s.videoUpstreamBitrate&&((0,f.A)(s,(e,t)=>{let a;r[`self${(a=t.replace("Upstream","")).charAt(0).toUpperCase()+a.slice(1)}`]=getScrubbedMetricValue(e)}),Object.assign(r,{selfVideoHardwareEncoder:getNonObservedMetric(e,1,0,"encoderImplementation",o),selfVideoEncoderImplementation:e.streamMetricReports[o]?.currentStringMetrics?.encoderImplementation,selfVideoTotalEncodeTime:getNonObservedMetric(e,1,0,"totalEncodeTime",o)}));else{let t=getNonObservedMetric(e,1,1,"totalDecodeTime",o);if(t){let e="number"==typeof r.videoDownstreamTotalDecodeTime?r.videoDownstreamTotalDecodeTime:0;r.videoDownstreamTotalDecodeTime=e+t}Object.assign(r,{videoDownstreamDecoderImplementation:e.streamMetricReports[o]?.currentStringMetrics?.decoderImplementation});let a={videoDownstreamBitrate:s.videoDownstreamBitrate??0,videoDownstreamPacketLossPercent:s.videoDownstreamPacketLossPercent??0,videoDownstreamPacketsReceived:s.videoDownstreamPacketsReceived??0,videoDownstreamFramesDecodedPerSecond:s.videoDownstreamFramesDecodedPerSecond??0,videoDownstreamFrameHeight:s.videoDownstreamFrameHeight??0,videoDownstreamFrameWidth:s.videoDownstreamFrameWidth??0,videoDownstreamJitterMs:s.videoDownstreamJitterMs??0,videoDownstreamDelayMs:s.videoDownstreamDelayMs??0,videoDownstreamFramesReceivedPerSecond:e.countPerSecond("framesReceived",o),videoDownstreamFramesDroppedPerSecond:getNonObservedMetric(e,1,1,"framesDropped",o)};i.push(a)}}),!(0,B.A)(i)){let e=(e=>{if((0,B.A)(e))return;let t=(0,h.A)(e,(e,t)=>(0,V.A)(e,t,(e,t)=>(e||0)+t),{});return(0,b.A)(t,t=>t/e.length)})(i);e&&Object.assign(r,(0,b.A)(e,e=>getScrubbedMetricValue(e)))}return removeUndefinedValues(r)})({clientMetricReport:e,selfAttendeeId:t}),n=(({clientMetricReport:e})=>{let t,{audioDecoderLoss:a,audioPacketLossPercent:n,audioPacketsReceived:r,audioPacketsReceivedFractionLoss:i,audioPacketsSent:l,audioSpeakerDelayMs:o,audioDownstreamJitterMs:s,videoUpstreamBitrate:c,videoPacketSentPerSecond:d,currentRoundTripTimeMs:m,availableIncomingBitrate:u,availableOutgoingBitrate:p,nackCountReceivedPerSecond:h,audioUpstreamRoundTripTimeMs:_,audioUpstreamJitterMs:f}=e.getObservableMetrics(),g=calculateNonNetworkPacketLoss(r,50,i),y=calculateNonNetworkPacketLoss(l,50,n),A=(0,H.A)({audioDownstreamDecoderLoss:a,audioUpstreamPacketLossPercent:n,audioDownstreamPacketsReceived:r,audioDownstreamPacketLossPercent:i,audioDownstreamJitterMs:s,audioUpstreamPacketsSent:l,audioDownstreamNonNetworkPacketLossPercent:g,audioUpstreamNonNetworkPacketLossPercent:y,audioDownstreamJitterBufferDelay:o,selfVideoBitrate:c,selfVideoPacketsSentPerSecond:d,audioUpstreamRoundTripTimeMs:_,audioUpstreamJitterMs:f,networkCurrentRoundTripTimeMs:m,networkAvailableIncomingBitrate:u,networkAvailableOutgoingBitrate:p,networkNackCountReceivedPerSecond:h},(e,t)=>K.indexOf(t)>-1?(0,U.A)(`network_${t}`):t),x=e.globalMetricReport.currentMetrics.packetsDiscardedOnSend,E=(({clientMetricReport:e,direction:t})=>{let a;return Object.keys(e.streamMetricReports).forEach(n=>{let r=Number(n),i=e.streamMetricReports[r];i.direction===t&&i.mediaType===G.zu.AUDIO&&(a=r)}),a})({clientMetricReport:e,direction:1});if(E){let a=getNonObservedMetric(e,0,1,"concealedSamples",E);t={audioDownstreamTotalSamplesReceived:getNonObservedMetric(e,0,1,"totalSamplesReceived",E),audioDownstreamConcealedSamples:a}}return removeUndefinedValues((0,b.A)({...A,networkSocketPacketsDiscardedOnSend:x,...t},e=>getScrubbedMetricValue(e)))})({clientMetricReport:e});return removeUndefinedValues({...a,...n})})({clientMetricReport:t,selfAttendeeId:t.selfAttendeeId}):{},l=t?(e=>{var t;let a,r,i,l={},o=new Map,s=new Map,c={};if(!e)return n=void 0,l;if(e.forEach(e=>{switch(e.type){case"local-candidate":o.set(e.id,e);break;case"media-source":"audio"===e.kind?Object.assign(l,{audioUpstreamTotalSamplesDuration:e.totalSamplesDuration,audioUpstreamAudioLevel:e.audioLevel,audioUpstreamTotalAudioEnergy:e.totalAudioEnergy,audioUpstreamEchoReturnLoss:e.echoReturnLoss,audioUpstreamEchoReturnLossEnhancement:e.echoReturnLossEnhancement}):"video"===e.kind&&(l.selfVideoSourceFramesPerSecond=e.framesPerSecond);break;case"candidate-pair":s.set(e.id,e);break;case"inbound-rtp":"audio"===e.kind?Object.assign(l,{audioDownstreamLevel:e.audioLevel,audioDownstreamCodecId:e.codecId}):"video"===e.kind&&Object.assign(l,processRtpStats(e,l,"downstream","video"));break;case"outbound-rtp":"video"===e.kind?(Object.assign(l,{selfVideoQualityLimitationDurations:e.qualityLimitationDurations&&(0,W.Zf)(e.qualityLimitationDurations),selfVideoOutboundFramesPerSecond:e.framesPerSecond,selfVideoTargetBitrate:e.targetBitrate,selfVideoScalabilityMode:e.scalabilityMode,selfVideoFrameWidth:e.frameWidth,selfVideoFrameHeight:e.frameHeight}),Object.assign(l,processRtpStats(e,l,"upstream","video")),l.selfVideoPacketSendDelay=getNextStat(n,e,"totalPacketSendDelay"),l.selfVideoUpstreamBitrate=getNextStat(n,e,"bytesSent",!0),n=e):"audio"===e.kind&&(l.audioUpstreamCodecId=e.codecId);break;case"track":Object.assign(l,((e,t)=>{let{kind:a,remoteSource:n}=e;return"video"===a?n?{...t,videoDownstreamFramesCorrupted:e.framesCorrupted,videoDownstreamJitterBufferDelay:e.jitterBufferDelay,videoDownstreamHugeFramesReceived:e.hugeFramesSent}:{...t,videoUpstreamHugeFramesSent:e.hugeFramesSent}:"audio"===a&&n?{...t,audioDownstreamConcealmentEvents:e.concealmentEvents,audioDownstreamJitterBufferDelay:e.jitterBufferDelay}:t})(e,l));break;case"transport":Object.assign(l,{...l,transportSelectedCandidatePairId:e.selectedCandidatePairId,transportDtlsState:e.dtlsState,transportIceState:e.iceState,transportIceGatheringState:e.iceGatheringState,transportConnectionState:e.connectionState}),a=e.selectedCandidatePairId;break;case"codec":c=processCodecStats(e,c)}}),a){let e=s.get(a);e&&e.localCandidateId&&(r=e.localCandidateId,Object.assign(l,{networkBytesSent:e.bytesSent,networkBytesReceived:e.bytesReceived,networkBytesDiscardedOnSend:e.bytesDiscardedOnSend,networkTotalRoundTripTime:e.totalRoundTripTime,networkPriority:e.priority}))}let d=r?o.get(r):void 0;if(d){let{networkType:e,protocol:t,relayProtocol:a,candidateType:n,address:r,port:i,foundation:o,usernameFragment:s}=d;Object.assign(l,{networkType:e,networkProtocol:t,networkRelayProtocol:a,networkCandidateType:n,networkLocalAddress:r,networkLocalPort:i,networkFoundation:o,networkUsernameFragment:s})}Object.assign(l,(t=c,i={...l},[{idKey:"videoDownstreamCodecId",nameKey:"videoDownstreamCodec"},{idKey:"videoUpstreamCodecId",nameKey:"videoUpstreamCodec"},{idKey:"audioDownstreamCodecId",nameKey:"audioDownstreamCodec"},{idKey:"audioUpstreamCodecId",nameKey:"audioUpstreamCodec"}].forEach(({idKey:e,nameKey:a})=>{let n=mapCodecIdToName(i[e],t);n&&(i[a]=n)}),i));let m=l.selfVideoQualityLimitationDurations;if(m&&"string"==typeof m){let e=(e=>{try{let t=JSON.parse(e),a=Object.keys(t);if(0===a.length)return;return a.reduce((e,a)=>(t[e]||0)>(t[a]||0)?e:a)}catch{return}})(m);e&&(l.videoUpstreamQualityLimitationReason=e)}return removeUndefinedValues(l)})(t.getRTCStatsReport()):{},o=(e=>{if(!e){r=void 0;return}let t={},a={};return e.forEach(e=>{switch(e.type){case"remote-inbound-rtp":"video"===e.kind&&Object.assign(t,{screenshareUpstreamJitter:1e3*e.jitter,screenshareUpstreamPacketLossPercent:100*e.fractionLost,screenshareUpstreamRoundTripTime:1e3*e.roundTripTime});break;case"inbound-rtp":"video"===e.kind&&Object.assign(t,{screenshareDownstreamFirCount:e.firCount,screenshareDownstreamPliCount:e.pliCount,screenshareDownstreamNackCount:e.nackCount,screenshareDownstreamCodecId:e.codecId});break;case"outbound-rtp":if("video"===e.kind){let{frameHeight:a,frameWidth:n,framesPerSecond:i,targetBitrate:l,encoderImplementation:o,scalabilityMode:s,powerEfficientEncoder:c}=e;if(Object.assign(t,{screenshareUpstreamTargetBitrate:l,screenshareUpstreamFrameWidth:n,screenshareUpstreamFrameHeight:a,screenshareUpstreamFramesPerSecond:i,screenshareUpstreamEncoderImplementation:o,screenshareUpstreamPowerEfficientEncoder:c,screenshareUpstreamScalabilityMode:s,screenshareUpstreamCodecId:e.codecId}),!r){r=e;return}let d=getNextStat(r,e,"totalEncodeTime",!0);Object.assign(t,{screenshareUpstreamPacketsSent:getNextStat(r,e,"packetsSent"),screenshareUpstreamPacketSendDelay:getNextStat(r,e,"totalPacketSendDelay"),screenshareUpstreamKeyFramesEncoded:getNextStat(r,e,"keyFramesEncoded"),screenshareUpstreamBitrate:getNextStat(r,e,"bytesSent",!0),screenshareUpstreamTotalEncodeTime:d&&1e3*d}),r=e}break;case"codec":a=processCodecStats(e,a)}}),[{idKey:"screenshareDownstreamCodecId",nameKey:"screenshareDownstreamCodec"},{idKey:"screenshareUpstreamCodecId",nameKey:"screenshareUpstreamCodec"}].forEach(({idKey:e,nameKey:n})=>{let r=mapCodecIdToName(t[e],a);r&&(t[n]=r)}),removeUndefinedValues((0,b.A)(t,e=>getScrubbedMetricValue(e)))})(a),s={...e,...i,...o,...l,...this.sharedTags,...this.transientTags,...this.getRtmMetricTags(),...this.getRenderTimingTags(),...this.getTimestampTags(),...this.getComputePressureTags(),...this.getLongTaskTags(),...this.getTroubleshootingTags()},c=(0,$.Ay)(s);this.currentTags={...s,...c},this.clearTransientTags(),this.lastAppMetricsRecordingTs=Date.now()};getCurrentTags=()=>({...this.currentTags});clearTransientTags=()=>{this.transientTags={}};getLongTaskTags=()=>this.longTaskObserver?.getReportSinceLastCall();getTimestampTags=()=>{let{huddleStartTimestamp:e}=this.currentTags;return e?{secondsSinceJoining:Math.floor((Date.now()-e)/1e3)}:{}};getRtmMetricTags=()=>{let e=this.rtmProcessingTimings.length;return this.rtmProcessingTimings=[],{rtmMessagesProcessed:e}};getTroubleshootingTags=()=>{let e={...this.troubleshootingTags};return this.troubleshootingTags={...ea},e};getComputePressureTags=()=>({computePressure:this.computePressure});getRenderTimingTags=()=>{let e=Date.now()-this.lastAppMetricsRecordingTs,t=(0,O.A)(this.renderTimings),a=this.renderTimings.length;return t&&e?(this.renderTimings=[],{uiRenderTimePercent:Number((t/e*100).toFixed(1)),uiRenderCount:a}):{uiRenderTimePercent:0,uiRenderTimeMs:0}};cleanup=()=>{this.computePressureObserver?.unsubscribe(this.updateComputePressure),delete this.computePressureObserver,this.longTaskObserver?.stop(),delete this.longTaskObserver,(0,$.hi)()}};var er=a(0x1552169ad),ei=a(0x5186d4e),el=a(0x658a411c),eo=a(0x2286acf6c);let StatsAveragesTracker=class StatsAveragesTracker{logger=(0,Y.Jt)("STATS-AVERAGES-TRACKER");averages={};sampleWindows={};WINDOW_SIZE=12;constructor(){this.logger.info("Stats averages tracker initialized")}updateStatsFromSnapshot(e){["networkCurrentRoundTripTimeMs","networkJitterMs","networkPacketLossPercent","networkAvailableOutgoingBitrate","networkAvailableIncomingBitrate","networkBytesReceived","networkBytesSent","networkQualityScore","audioDownstreamQualityScore","audioUpstreamQualityScore","audioDownstreamJitterMs","audioUpstreamJitterMs","audioDownstreamPacketLossPercent","audioUpstreamPacketLossPercent","audioUpstreamRoundTripTimeMs","audioDownstreamConcealedSamples","audioDownstreamDecoderLoss","selfVideoQualityScore","videoDownstreamQualityScore","selfVideoJitterMs","videoDownstreamJitterMs","selfVideoPacketLossPercent","videoDownstreamPacketLossPercent","selfVideoRoundTripTimeMs","selfVideoFramesEncodedPerSecond","videoDownstreamFramesDecodedPerSecond","selfVideoTotalEncodeTimePerSecond","videoDownstreamTotalDecodeTime","screenshareUpstreamBitrate","screenshareUpstreamFrameHeight","screenshareUpstreamFrameWidth","screenshareUpstreamFramesPerSecond","screenshareUpstreamJitter","screenshareUpstreamKeyFramesEncoded","screenshareUpstreamPacketLossPercent","screenshareUpstreamPacketSendDelay","screenshareUpstreamPacketsSent","screenshareUpstreamQualityScore","screenshareUpstreamRoundTripTime","screenshareUpstreamTargetBitrate","screenshareUpstreamTotalEncodeTime","mos","cpuCompetitionScore"].forEach(t=>{if("number"==typeof e[t]){let a=`average${t.charAt(0).toUpperCase()+t.slice(1)}`,n=e[t];this.averages[a]=this.calculateLinearWeightedRollingAverage(t,n)}})}calculateLinearWeightedRollingAverage(e,t){this.sampleWindows[e]||(this.sampleWindows[e]=[]),this.sampleWindows[e].push(t),this.sampleWindows[e].length>this.WINDOW_SIZE&&(this.sampleWindows[e]=this.sampleWindows[e].slice(-this.WINDOW_SIZE));let a=this.sampleWindows[e];if(1===a.length)return t;let n=0,r=0;return a.forEach((e,t)=>{let a=t+1;n+=e*a,r+=a}),n/r}getAllAverages(){return{...this.averages}}getTags(){return this.getAllAverages()}setHuddleEnded(){this.averages={},this.sampleWindows={},this.logger.info("Stats averages reset")}};let getStatsAveragesTracker=()=>(l||(l=new StatsAveragesTracker),l),es=new Set(["is_microphone_enabled","is_active_speaker","active_speaker_user_id","is_someone_speaking","is_self_video_enabled","is_peer_video_enabled","is_sharing_screen","is_peer_sharing_screen","is_dual_screenshare_active","is_someone_sharing_screen","is_disconnected","remote_peer_count","remote_peers_with_video_count","peers_screensharing_count","active_screenshare_count","battery_is_using","is_speaker_bluetooth","is_troubleshooting_panel_open","is_video_enabled_for_someone","microphone_is_available","microphone_is_blocked","network_protocol","network_relay_protocol","network_type","selected_camera","selected_microphone","selected_speakers","is_noise_suppression_enabled","is_background_blur_active","is_custom_video_background_active"]),ec=new Set(["cpu_count","os_version","is_hardware_acceleration_enabled","audio_init_possibly_failed","audio_init_time","device_records_audio_input_count","device_records_audio_output_count","device_records_camera_count","device_records_total_count","device_records_web_audio_count","device_records_web_audio_selected_count","device_records_web_audio_used_count","is_closed_captions_enabled","is_side_by_side_captions_enabled","media_region","media_region_matches","media_region_matches_preference","media_region_preferred","media_region_selected","preferred_media_region","rooms_join_time","sdk_initialized_time","audio_connected_time","voice_focus_initialized_time","credentials_to_voice_focus_initialized_time","first_presence_time","seconds_since_joining","sub_app_name","session_id","user_id","workspace_count","chime_sdk_version","team_tier","is_pre_warmed","is_prejoin","is_transcript_allowed","env_is_js_path","env_is_qa","xws_channel_count"]),ed=new Set(["team_id","call_id","huddle_id","huddle_channel_id","trace_name"]),filterAppMetricsTags=e=>{let t={};for(let[a,n]of Object.entries(e))es.has(a)||ec.has(a)||ed.has(a)||(t[a]=n);return t};let HuddlePerfTracer=class HuddlePerfTracer{logger;trace;tracer;parentSpan;parentSpanId;callLogger;callId;lastRecordedSpanTs=0;reportingInterval=u.ZT;isShutdown=!1;perfDataStartTimestamp=Date.now();constructor({logger:e,callLogger:t,trace:a,tracer:n}){this.trace=a,this.tracer=n,this.logger=e,this.callLogger=t,this.parentSpan=this.trace.startSpan("huddle_perf"),this.parentSpanId=this.parentSpan.getId()}getSpanCount=()=>{let e=this.trace.getSpans();return e?Object.keys(e).length:0};getUnreportedPerfSpans=()=>{let e=this.trace.getSpans();return e?Object.values(e).filter(e=>!e.isActive()&&e.getParentId()===this.parentSpanId):[]};reportIncrementalSpans=()=>{if(this.isShutdown)return;let e=this.getUnreportedPerfSpans();if(0===e.length)return;this.tracer.reportSpans(e,this.trace.getTags());let t=this.trace.getSpans();e.forEach(e=>{let a=e.getId();delete t[a]}),this.logger.debug(`Incrementally reported ${e.length} huddle_perf spans`)};async recordAppMetrics(e){var t;let a=Date.now(),n=a-this.lastRecordedSpanTs;if(getStatsAveragesTracker().updateStatsFromSnapshot(e),t=(0,q.tT)(e),v.push(t),this.logQualityScoreWarnings(e),n<this.reportingInterval)return;this.logger.debug(`Adding new ${u.Sq}:${u.Kp} span`);let r=filterAppMetricsTags(getMetricsSummary()),i=this.trace.startSpan(u.Kp,{parentSpanId:this.parentSpanId}),l=Object.keys(r).length;i.addTags(r),i.close(),this.logger.debug(`Added new ${u.Sq}:${u.Kp} span with ${l} tags`),this.getSpanCount()>u.jt&&this.reportIncrementalSpans(),this.lastRecordedSpanTs=a}recordStateChange=e=>{let t=this.trace.startSpan(u.e6,{parentSpanId:this.parentSpanId}),a=(0,q.tT)(e);t.addTags(a),t.close(),this.logger.debug(`Added ${u.e6} span with keys: ${Object.keys(e).join(", ")}`)};maybeRecordLeftEarly=()=>{Date.now()-this.perfDataStartTimestamp<3e4&&(this.callLogger.warn("Leaving huddle less than 30 seconds after joining."),this.trace.addTags({left_early:!0}))};flushRemainingMetrics=()=>{let e=getMetricsSummary();if(0===Object.keys(e).length)return;let t=filterAppMetricsTags(e);if(0===Object.keys(t).length)return;let a=this.trace.startSpan(u.Kp,{parentSpanId:this.parentSpanId});a.addTags(t),a.close(),this.logger.debug(`Flushed final ${u.Kp} span with ${Object.keys(t).length} tags`)};report=()=>{this.callLogger.debug(`Huddle ${this.callId} is ending. Reporting remaining unreported spans`),this.maybeRecordLeftEarly(),this.flushRemainingMetrics(),this.isShutdown=!0,this.parentSpan.close()};logQualityScoreWarnings=({audioDownstreamQualityScore:e,audioUpstreamQualityScore:t,selfVideoQualityScore:a,videoDownstreamQualityScore:n,screenshareUpstreamQualityScore:r,screenshareDownstreamQualityScore:i,networkQualityScore:l,cpuCompetitionScore:o})=>{let toScore=e=>(0,A.A)(e)?e:void 0,s={"audio-incoming":toScore(e),"audio-outgoing":toScore(t),network:toScore(l),cpu:toScore(o),"video-outgoing":toScore(a),"video-incoming":toScore(n),"screenshare-outgoing":toScore(r),"screenshare-incoming":toScore(i)},makeLogString=e=>Object.entries(e).filter(([,e])=>(0,A.A)(e)).map(([e,t])=>`${e}=${t}`).join(" ");(0,el.A)(s,e=>(0,A.A)(e)&&e<=50)?this.logger.warn(`quality scores: ${makeLogString(s)}`):this.debouncedInfoLog(makeLogString(s))};debouncedInfoLog=(0,eo.A)(e=>{this.logger.info(`quality scores: ${e}`)},1e4,{leading:!0,trailing:!1,maxWait:1e4})};var em=a(0xea8d1901);let eu="HUDDLES-PERF",ep=["microphoneIsAvailable","microphoneIsBlocked","networkProtocol","networkRelayProtocol","networkType","selectedCamera","selectedMicrophone","selectedSpeakers"];let HuddlePerfManager=class HuddlePerfManager{huddlePerfTrace;huddlePerfObserver;huddlePerfState;logger=(0,m.getGenericLogger)({label:eu});callLogger=(0,Y.tZ)(eu);errorReported=!1;reportCounts={recorded:0};pendingAppMetrics=null;nextReportingTask=null;previousEventTags=null;constructor({logger:e,dispatch:t,trace:a,tracer:n}){this.huddlePerfTrace=new HuddlePerfTracer({logger:e,callLogger:this.callLogger,trace:a,tracer:n}),this.huddlePerfObserver=new HuddlePerfObserver({logger:e,callLogger:this.callLogger,dispatch:t}),this.huddlePerfState=new en,ei.A.subscribe(this.reportUpdate),this.scheduleNextReport()}reportUpdate=e=>{e.type===G.lx.AppMetrics?this.recordAppMetrics(e):this.huddlePerfState.updateState(e)};recordAppMetrics=e=>{this.pendingAppMetrics=e};scheduleNextReport=()=>{this.nextReportingTask=()=>{try{this.processPendingMetrics()}catch(e){this.callLogger.error("Error in processPendingMetrics",e)}finally{this.nextReportingTask&&this.scheduleNextReport()}},(0,p.nD)(this.nextReportingTask,{priority:"background",delay:1e3,useDelayFallback:!0})};processPendingMetrics=()=>{if(!this.pendingAppMetrics)return void this.logger.debug("No pending metrics to process");this.logger.debug("Processing app metrics",this.reportCounts.recorded),this.huddlePerfState.updateState(this.pendingAppMetrics);let e=this.huddlePerfState.getCurrentTags();(0,em.qZ)(e),cacheStableSummaryTags(e),this.detectAndEmitStateChanges(e),this.huddlePerfTrace.recordAppMetrics(e);try{this.huddlePerfObserver.processTags(e)}catch(e){this.errorReported||(this.callLogger.error("An error occurred while processing tags",e),this.errorReported=!0)}this.reportCounts.recorded+=1,this.pendingAppMetrics=null};detectAndEmitStateChanges=e=>{let t={};for(let a of ep)a in e&&(t[a]=e[a]);if(null===this.previousEventTags){if(Object.keys(t).length>0){let a={...t};"secondsSinceJoining"in e&&(a.secondsSinceJoining=e.secondsSinceJoining),this.huddlePerfTrace.recordStateChange(a)}}else{let a={};for(let e of ep)t[e]!==this.previousEventTags[e]&&(a[e]=t[e]);Object.keys(a).length>0&&("secondsSinceJoining"in e&&(a.secondsSinceJoining=e.secondsSinceJoining),this.huddlePerfTrace.recordStateChange(a))}this.previousEventTags=t};report=()=>{this.nextReportingTask=null,this.pendingAppMetrics=null,this.huddlePerfTrace.report(),ei.A.unsubscribe(this.reportUpdate),this.huddlePerfState.cleanup(),(0,er.ZR)()}};var eh=a(0x7fa3cc8f),e_=a(0x23255e234),ef=a(0x9b971e7e),eb=a(0x691ce3ab),eg=a(0x1266f1359),ey=a(0x19c76d181),eA=a(0x7c2e2ba1),ex=a(0x7b0b485),eE=a(0xe684f705),eC=a(0xd93ecf94),ek=a(0x1ea5cc025);let ev={topicName:"huddle",userAgent:navigator.userAgent,family:"vhq"};let HuddleEventsTracer=class HuddleEventsTracer{teamId;sharedTags=ev;trace;logger;parentSpan;joinSpanId;constructor({teamId:e,logger:t,trace:a}){this.trace=a,this.teamId=e,this.logger=t,this.parentSpan=this.trace.startSpan("huddle_events"),this.logger.debug(`Created huddle_events trace: ${this.trace.getTraceId()}`),this.addInitialSpans()}get spansList(){return(0,eh.A)(this.trace?.getSpans())||[]}getSpanByName=e=>this.spansList.find(t=>e===t.getOperationName());addInitialSpans=()=>{this.update({name:ek.p.JOIN,type:ek.G.START,tags:{}}),this.update({name:ek.p.MINIPLAYER_VIEW,type:ek.G.START})};isSurfaceChange=e=>e===ek.p.MINIPLAYER_VIEW||e===ek.p.WINDOW_COMPACT_VIEW||e===ek.p.WINDOW_FULL_VIEW;handleSurfaceChange=({name:e,type:t})=>{t===ek.G.START&&this.isSurfaceChange(e)&&this.spansList.filter(e=>this.isSurfaceChange(e.getOperationName())).forEach(t=>{t.getOperationName()!==e&&this.closeSpan(t)})};update=({name:e,type:t,tags:a})=>{if(this.trace)if(t===ek.G.START||t===ek.G.ONCE){let n=this.joinSpanId||this.parentSpan.getId(),r=this.trace.startSpan(e,{parentSpanId:n});a&&r.addTags(a),e===ek.p.JOIN&&(this.joinSpanId=r.getId()),this.isSurfaceChange(e)&&this.handleSurfaceChange({name:e,type:t}),this.logger.debug(`started new span for huddle_events trace: ${e}`),t===ek.G.ONCE&&this.closeSpan(r)}else{let t=this.getSpanByName(e);this.closeSpan(t),this.logger.debug(`closed span for huddle_events trace: ${e}`)}};closeSpan=e=>{e&&(e.getCloseTimeMs()||e.close())};recordEntryPoint=e=>{Object.assign(this.sharedTags,{entryPoint:e})};report(){try{let e={...this.sharedTags,...(({teamId:e})=>{let t=(0,eg.oK)(e).getState(),a=(0,eb.en)().getState(),n=(0,ex.E9)(a),r=(0,ex.hc)(a),i=(0,ef.jV)(t),l=(0,eA.ok)(t,{huddleId:n}),o=(0,eA.Zg)(t,{huddleId:n}),s=(0,ey.WR)(t),c=o?(o?.timestamps||[]).map(e=>r?(0,eC.Ld)(t,r,e):void 0).filter(e=>e?.user===s):[],d=c[0]?.ts,m=c.slice(-1)[0]?.ts,u=c.length,p=(0,eE.nv)(t,s);return{huddleId:n,channelId:r,enterpriseId:i,threadId:l,threadReplyCnt:u,threadFirstReplyTs:d,threadLastReplyTs:m,isGuest:(0,e_.P)(p)}})({teamId:this.teamId})},t=(0,q.tT)(e);Object.keys(t).length>0&&(this.parentSpan.addTags(t),(0,T.Cu)()&&this.logger.debug(`Reporting huddle_events trace: ${this.trace.getTraceId()} with ${this.spansList.length} spans`,t))}catch(e){this.logger.error("Error while reporting huddle_events trace",{error:e})}this.parentSpan.close()}};var eS=a(0x205dfed38);let HuddleMeetingEventsTracer=class HuddleMeetingEventsTracer{trace;logger;eventCounts={};constructor({logger:e,trace:t}){this.logger=e,this.trace=t,this.logger.debug("Initialized meeting events tracer for huddle")}capatalizeFirstLetter(e){return(0,eS.ZH)(e,!1)}incrementEventCount(e){this.eventCounts[e]=(this.eventCounts[e]||0)+1}recordMeetingEvent(e){let t=this.capatalizeFirstLetter(e);this.incrementEventCount(`meetingEvents${t}Count`)}recordInputErrorEvent(e,t){let a=this.capatalizeFirstLetter(t),n=this.capatalizeFirstLetter(e),r=`meetingEvents${a}InputFailed${n}`;this.incrementEventCount(r)}report(){let e=this.trace.startSpan("huddle_meeting_events_metrics");try{let t={...this.eventCounts},a=(0,q.tT)(t);Object.keys(a).length>0&&e.addTags(a)}catch(t){this.logger.error(`Error while reporting huddle_meeting_events trace: ${t}`),e.close(),this.eventCounts={};return}e.close(),this.eventCounts={}}};var eI=a(0x5fc81c19);let HuddleReconnectTracer=class HuddleReconnectTracer{trace;logger;parentSpan;reconnectSpan;reconnectSuccessSpan;reconnectFailureSpan;reconnectCount=0;reconnectSuccessCount=0;reconnectFailureCount=0;constructor({trace:e,logger:t}){this.trace=e,this.logger=t,this.trace&&(this.parentSpan=this.trace.startSpan("huddle_reconnect")),this.initializeHuddleReconnectTracer()}initializeHuddleReconnectTracer(){let e=this.parentSpan?.getId();this.reconnectSpan=this.trace?.startSpan(eI.xN,{parentSpanId:e}),this.reconnectSuccessSpan=this.trace?.startSpan(eI.xx,{parentSpanId:e}),this.reconnectFailureSpan=this.trace?.startSpan(eI.cJ,{parentSpanId:e})}traceReconnectAttemptOutcome({isSuccess:e}){e?this.reconnectSuccessCount+=1:this.reconnectFailureCount+=1,this.logger?.debug(`Registered huddle reconnect attempt outcome - isSuccess: ${e}`)}traceReconnectAttempt(){this.reconnectCount+=1,this.logger?.debug("Counted huddle reconnect attempt")}report(){try{this.reconnectSpan&&(this.reconnectSpan.addTags({metric_value:this.reconnectCount}),this.reconnectSpan.close()),this.reconnectSuccessSpan&&(this.reconnectSuccessSpan.addTags({metric_value:this.reconnectSuccessCount}),this.reconnectSuccessSpan.close()),this.reconnectFailureSpan&&(this.reconnectFailureSpan.addTags({metric_value:this.reconnectFailureCount}),this.reconnectFailureSpan.close())}catch(e){this.logger?.error(`Error while reporting huddle_reconnect trace: ${e}`)}this.parentSpan?.close(),this.logger?.debug("Reported reconnect attempt metric trace")}};var ew=a(0x308014ed),eT=a(0x2529f534e),eN=a(0xf9cb31c6);let eM=[{selector:eN.OV,key:"isChimeSdkExpEnabled"},{selector:eN.MJ,key:"isHuddlesLaterEnabled"},{selector:eN.nC,key:"isHuddlesIncreaseMaxParticipantsEnabled"},{selector:eN.pA,key:"isSVCEnabled"},{selector:eN.uc,key:"isCustomDownlinkPolicyExpEnabled"},{selector:eN.Wj,key:"isHuddlesLiteModeExpEnabled"},{selector:eN.az,key:"isShowBadQualitySurveyExpEnabled"},{selector:eN.kP,key:"isUseUDPPort3478Enabled"},{selector:eN.ZN,key:"isHuddlesPreviewV2ExpEnabled"},{selector:eN.NX,key:"isHuddlesDualUDPSupportExpEnabled"},{selector:eN.uW,key:"isHuddlesEnumerateDevicesRetryExpEnabled"},{selector:eN.q3,key:"isHuddlesDevicePreferredLabelExpEnabled"},{selector:eN.mY,key:"isHuddlesVoiceFocusSwapExpEnabled"},{selector:eN.e0,key:"isIntelligentUplinkCoordinatorExpEnabled"}];var eR=a(0x18d2488e1),eP=a(0x1a2667164);let HuddleSummaryTracer=class HuddleSummaryTracer{trace;logger;isTinySpeck;teamState;constructor({logger:e,trace:t,isTinySpeck:a,teamState:n}){this.logger=e,this.trace=t,this.isTinySpeck=a,this.teamState=n,this.logger.debug("Initialized summary tracer for huddle")}report(){let e=this.trace.startSpan("huddles_summary");try{let t,a=(0,ew._)(),n=(0,eT.p)(),r=(0,eR.C)(),i=getStatsAveragesTracker(),l=(0,eP.O)(),o=(t={...I},I={},t),s={...a.getTags(),...n.getTags(),...r.getTags(),...i.getTags(),...l.getTags(),...o,isTinySpeck:this.isTinySpeck};if(this.teamState){let e,t=(e=this.teamState,Object.fromEntries(eM.map(({selector:t,key:a})=>[a,t(e)])));Object.assign(s,t)}(0,em.Hf)(s),a.setHuddleEnded(),n.setHuddleEnded(),r.setHuddleEnded(),i.setHuddleEnded(),l.setHuddleEnded();let c=(0,q.tT)(s);(0,T.b3)()&&this.logger.debug("Summary tags",c),Object.keys(c).length>0&&e.addTags(c)}catch(t){this.logger.error(`Error while reporting huddle summary trace: ${t}`),e.close();return}e.close()}};let HuddleTTITracer=class HuddleTTITracer{trace;logger;parentSpan;fetchCredentialsSpan;connectToMediaServiceSpan;traceReported=!1;preferredMediaRegion;constructor({logger:e,trace:t}){this.trace=t,this.logger=e,this.parentSpan=this.trace.startSpan("huddle_tti")}addTTIMetaTags({entryPoint:e,preferredMediaRegion:t,isPrejoin:a,isCreate:n}){this.preferredMediaRegion=t,this.parentSpan.addTags({entry_point:e,preferred_media_region:t,is_prejoin:a,is_create:n,success:!1}),cacheStableSummaryTags({preferredMediaRegion:t,isPrejoin:a})}createFetchCredentialsSpan(){this.fetchCredentialsSpan=this.trace.startSpan(eI.xl,{parentSpanId:this.parentSpan.getId()})}setCachedTag({cached:e}){this.parentSpan.addTags({cached:e})}closeFetchCredentialsSpan(){this.fetchCredentialsSpan?.close()}createConnectToMediaServiceSpan(){this.connectToMediaServiceSpan=this.trace.startSpan(eI.xA,{parentSpanId:this.parentSpan.getId()})}closeConnectToMediaServiceSpan(){this.connectToMediaServiceSpan?.close(),this.parentSpan.addTags({success:!0}),this.traceReported=!0,this.logger.debug("TTI metric trace completed")}getTTITraceId(){return this.trace.getTraceId()}getFetchCredentialsSpanId(){return this.fetchCredentialsSpan?.getId()}setMediaRegionTag(e){let t=e===this.preferredMediaRegion;this.parentSpan.addTags({media_region:e,media_region_matches:t}),cacheStableSummaryTags({mediaRegion:e,mediaRegionMatches:t})}report(){this.traceReported||(this.traceReported=!0,this.logger.debug("TTI metric trace completed in final clean up")),this.parentSpan.close()}};var eL=a(0x157ccdb87),eO=a(0x1489fdf8f);let eD=(0,m.getGenericLogger)({label:"HUDDLE-TRACE-MANAGER"}),eF=class{tracer;trace;rootSpan;callId;teamId;reconnectTrace;ttiTrace;huddlePerfTraceManager;huddleEventsTrace;huddleMeetingEventsTrace;huddleSummaryTracer;constructor(){eD.debug("Huddle Trace Manager created")}initializeTraces({teamId:e,isTinySpeck:t,isDebugApp:a}){let n=(0,eg.oK)(e);this.teamId=e;let r=n.getState();this.tracer=(0,eL.E)({teamOrEnterpriseId:this.teamId}),this.trace=this.tracer.createTrace({traceName:u.Sq,samplingOptions:{sampleType:d.tS.ALWAYS},tags:{__dataset:u.RN}}),this.rootSpan=this.trace.startSpan("huddle_session"),a||(this.reconnectTrace=new HuddleReconnectTracer({tracer:this.tracer,trace:this.trace,logger:eD}),this.ttiTrace=new HuddleTTITracer({trace:this.trace,logger:eD}),this.huddleEventsTrace=new HuddleEventsTracer({teamId:this.teamId,trace:this.trace,logger:eD}),this.huddleMeetingEventsTrace=new HuddleMeetingEventsTracer({logger:eD,trace:this.trace}),this.huddleSummaryTracer=new HuddleSummaryTracer({logger:eD,trace:this.trace,isTinySpeck:t,teamState:r})),this.huddlePerfTraceManager=new HuddlePerfManager({logger:eD,dispatch:n.dispatch,trace:this.trace,tracer:this.tracer})}setCallId(e){this.callId=e,this.trace?.addTags({callId:this.callId});let t=(0,eO.vP)();if(t){let{teamId:e,huddleId:a,huddleChannelId:n}=t,r=(0,q.tT)({teamId:e,huddleId:a,huddleChannelId:n});this.trace?.addTags(r)}e&&ei.A.publish({type:G.lx.CallId,update:{callId:e}})}getAllTraceHandlers(){return{reconnectTrace:this.reconnectTrace,ttiTrace:this.ttiTrace,huddlePerfTraceManager:this.huddlePerfTraceManager,huddleEventsTrace:this.huddleEventsTrace,huddleMeetingEventsTrace:this.huddleMeetingEventsTrace,huddleSummaryTracer:this.huddleSummaryTracer}}cleanup(){try{this.reconnectTrace?.report(),this.ttiTrace?.report(),this.huddlePerfTraceManager?.report(),this.huddleEventsTrace?.report(),this.huddleMeetingEventsTrace?.report(),this.huddleSummaryTracer?.report(),this.rootSpan?.close(),this.trace&&(this.tracer?.reportTrace(this.trace),this.tracer?.clearTrace(this.trace))}catch(e){eD.error(`Error during trace cleanup ${e}`)}finally{delete this.reconnectTrace,delete this.ttiTrace,delete this.huddlePerfTraceManager,delete this.huddleEventsTrace,delete this.huddleMeetingEventsTrace,delete this.huddleSummaryTracer,delete this.rootSpan,this.callId=null}}},eU=(0,c.A)(()=>new eF)},0x1ea5cc025:(e,t,a)=>{"use strict";a.d(t,{G:()=>i,p:()=>l});var n,r,i=((n={}).START="start",n.STOP="stop",n.ONCE="once",n),l=((r={}).JOIN="session_join",r.VIDEO="video",r.SCREENSHARE="screenshare",r.REACTION="reaction_posted",r.MESSAGE="message_posted",r.MICROPHONE="microphone",r.MINIPLAYER_VIEW="mini_player_view",r.WINDOW_COMPACT_VIEW="window_compact_view",r.WINDOW_FULL_VIEW="window_full_view",r.THREAD_VIEW="thread_flexpane_view",r.TRANSCRIPT="trxn",r)},0xd4defaa9:(e,t,a)=>{"use strict";a.d(t,{_3:()=>formatTag,tT:()=>formatTags});var n=a(0xf90b35a5),r=a(0x210d62337);a(0xe874a88a);let formatTag=e=>(0,n.A)(e),formatTags=(e,t="peer_video")=>(0,r.A)(e,(e,a)=>a.indexOf(t)>-1?a:formatTag(a))},0x18d2488e1:(e,t,a)=>{"use strict";let n;a.d(t,{C:()=>getHuddlesSummaryTracker});var r=a(0x1c6b56d20),i=a(0x6a506842);let l=class{logger=(0,i.Jt)("HUDDLES-TRACKER");lastDisconnectErrorMessage;disconnectCount=0;isTcp=void 0;isUdp=void 0;switchFromTcpToUdpCount=0;switchFromUdpToTcpCount=0;screenShareFailedCount=0;screenShareFailedNotReadableCount=0;screenShareFailedAbortErrorCount=0;screenShareFailedInvalidStateErrorCount=0;screenShareFailedNotAllowedErrorCount=0;screenShareFailedUnknownErrorCount=0;screenShareSuccessCount=0;nativeDeviceMutedCount=0;nativeDeviceVolumeScalar0Count=0;nativeDeviceNotInitializableCount=0;nativeDeviceUnpluggedCount=0;nativeDeviceDisabledCount=0;nativeDeviceNotPresentCount=0;nativeDeviceUnknownCount=0;constructor(){this.logger.debug("Huddles summary tracker initialized")}recordDisconnectionWarning(e){this.disconnectCount+=1,this.lastDisconnectErrorMessage=e}getTags(){return{lastDisconnectErrorMessage:this.lastDisconnectErrorMessage,disconnectCount:this.disconnectCount.toString(),isTcp:this.isTcp?.toString(),isUdp:this.isUdp?.toString(),switchFromTcpToUdpCount:this.switchFromTcpToUdpCount.toString(),switchFromUdpToTcpCount:this.switchFromUdpToTcpCount.toString(),screenShareFailedCount:this.screenShareFailedCount.toString(),screenShareFailedNotReadableCount:this.screenShareFailedNotReadableCount.toString(),screenShareFailedAbortErrorCount:this.screenShareFailedAbortErrorCount.toString(),screenShareFailedInvalidStateErrorCount:this.screenShareFailedInvalidStateErrorCount.toString(),screenShareFailedNotAllowedErrorCount:this.screenShareFailedNotAllowedErrorCount.toString(),screenShareFailedUnknownErrorCount:this.screenShareFailedUnknownErrorCount.toString(),screenShareSuccessCount:this.screenShareSuccessCount.toString(),nativeDeviceMutedCount:this.nativeDeviceMutedCount.toString(),nativeDeviceVolumeScalar0Count:this.nativeDeviceVolumeScalar0Count.toString(),nativeDeviceNotInitializableCount:this.nativeDeviceNotInitializableCount.toString(),nativeDeviceUnpluggedCount:this.nativeDeviceUnpluggedCount.toString(),nativeDeviceDisabledCount:this.nativeDeviceDisabledCount.toString(),nativeDeviceNotPresentCount:this.nativeDeviceNotPresentCount.toString(),nativeDeviceUnknownCount:this.nativeDeviceUnknownCount.toString()}}recordIsTcp(){this.isTcp=!0,!0===this.isUdp&&(this.switchFromUdpToTcpCount+=1,this.isUdp=!1)}recordIsUdp(){this.isUdp=!0,!0===this.isTcp&&(this.switchFromTcpToUdpCount+=1,this.isTcp=!1)}recordScreenShareSuccess(){this.screenShareSuccessCount+=1}recordScreenShareFailed(e){this.screenShareFailedCount+=1,"NotReadableError"===e?this.screenShareFailedNotReadableCount+=1:"AbortError"===e?this.screenShareFailedAbortErrorCount+=1:"InvalidStateError"===e?this.screenShareFailedInvalidStateErrorCount+=1:"NotAllowedError"===e?this.screenShareFailedNotAllowedErrorCount+=1:this.screenShareFailedUnknownErrorCount+=1}recordNativeDeviceIssue(e){switch(e){case r.ZB.DeviceMuted:this.nativeDeviceMutedCount+=1;break;case r.ZB.DeviceVolumeScalar0:this.nativeDeviceVolumeScalar0Count+=1;break;case r.ZB.DeviceNotInitializable:this.nativeDeviceNotInitializableCount+=1;break;case r.ZB.DeviceUnplugged:this.nativeDeviceUnpluggedCount+=1;break;case r.ZB.DeviceDisabled:this.nativeDeviceDisabledCount+=1;break;case r.ZB.DeviceNotPresent:this.nativeDeviceNotPresentCount+=1;break;case r.ZB.DeviceUnknown:this.nativeDeviceUnknownCount+=1}}setHuddleEnded(){this.lastDisconnectErrorMessage=void 0,this.disconnectCount=0,this.isUdp=void 0,this.isTcp=void 0,this.switchFromTcpToUdpCount=0,this.switchFromUdpToTcpCount=0,this.screenShareFailedCount=0,this.screenShareFailedNotReadableCount=0,this.screenShareFailedAbortErrorCount=0,this.screenShareFailedInvalidStateErrorCount=0,this.screenShareFailedNotAllowedErrorCount=0,this.screenShareFailedUnknownErrorCount=0,this.screenShareSuccessCount=0,this.nativeDeviceMutedCount=0,this.nativeDeviceVolumeScalar0Count=0,this.nativeDeviceNotInitializableCount=0,this.nativeDeviceUnpluggedCount=0,this.nativeDeviceDisabledCount=0,this.nativeDeviceNotPresentCount=0,this.nativeDeviceUnknownCount=0}},getHuddlesSummaryTracker=()=>(n||(n=new l),n)},0x1bc651545:(e,t,a)=>{"use strict";a.d(t,{S:()=>ScreenManager});var n=a(0x62a17882),r=a(0x16998c9bf),i=a(0xdf7a57c3),l=a(0x6a506842);window.RTCPeerConnection,window.MediaStream,window.RTCIceCandidate;let o=window.navigator;var s=a(0x120e75720),c=a(0x1059ba41d),d=a(0x3711e82d),m=a(0x30164a1e);let u={height:116,width:168},p=[{maxFrameRate:15,maxWidth:1920,maxHeight:1080},{maxFrameRate:10,maxWidth:1280,maxHeight:720},{maxFrameRate:5,maxWidth:640,maxHeight:480}];let ScreenManager=class ScreenManager{log=(0,l.tZ)("SCREENS");screenTrack;async getScreenThumbnails(e,t=!1){let a,i=await (0,c.zxd)();t||logDisplays(this.log,i);let l=["screen"];l.push("window"),u.width=e?.width||200,u.height=e?.height||150;try{a=await (0,c.Yx3)(u,l)}catch(e){this.log.error(`Could not get screen thumbnails: ${(0,r.u1)(e)}`)}return a?a.map((e,t)=>{let a=i.find(t=>parseInt(e.display_id,10)===t.id);a||(0,n.tR)()||(0,n.cX)()||e.id?.startsWith("window:")||this.log.error(`Could not find matching display for screen ${t} with id ${e.display_id}`);let r=a||((0,n.tR)()||(0,n.cX)()?i[t]:void 0);return{mediaSourceId:e.id,thumbnail:e.thumbnail,displayId:r&&r.id,bounds:r&&r.bounds,name:e.name}}):[]}getCurrentlyActiveScreenTrack(){return this.screenTrack}async tryGetScreenMedia(e,t,a=-1){try{return await o.mediaDevices.getUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,...t}}})}catch(n){if(a===p.length-1)throw n;let t=a+1;return this.log.warn(`Failed to get screen media with constraint ${a}. Trying next constraint.`),this.tryGetScreenMedia(e,p[t],t)}}async startCapturingScreen(e){if((0,m.M)(!this.screenTrack,"Screen track should not already be active"),!e){if(!o.mediaDevices.getDisplayMedia)throw this.log.error("Error: getDisplayMedia unavailable while trying to screen share in browser"),Error("browser screenshare unavailable");try{let e=await o.mediaDevices.getDisplayMedia({audio:!1,video:{frameRate:{max:15}}});return this.screenTrack=e.getVideoTracks()[0],this.log.info(`Start screen sharing with track id: ${this.screenTrack.id} in browser`),this.screenTrack}catch(t){let e=(0,r.iT)(t);if("NotAllowedError"===e.name)return null;throw this.log.error(`Error: ${e.name} while trying to screen share in browser`),(0,i.k)(d.EventId.CALLS_GET_USER_MEDIA_ERROR_SCREEN,{error:e.name}),t}}try{let t={chromeMediaSource:"desktop",chromeMediaSourceId:e,maxFrameRate:15},a=await this.getScreenDetailsByMediaSourceId(e);a&&a.bounds&&(t.maxWidth=a.bounds.width,t.maxHeight=a.bounds.height);let n=await this.tryGetScreenMedia(e,t);return this.screenTrack=n.getTracks()[0],this.log.info("Start screen sharing with track id:",this.screenTrack.id,"and mediaSourceId:",e),this.screenTrack}catch(a){let t=(0,r.iT)(a);throw this.log.error(`Error: ${t.name} for screen ${e}`),(0,i.k)(d.EventId.CALLS_GET_USER_MEDIA_ERROR_SCREEN,{error:t.name}),a}}stopCapturingScreen(){if(!this.screenTrack)return void(0,m.M)("No screenTrack to stop.");this.screenTrack.stop();let e=this.screenTrack.id;return delete this.screenTrack,this.log.info("Stop screen sharing track id:",e),e}clearScreenTrack(){delete this.screenTrack}async getScreenDetailsByMediaSourceId(e){let t=await this.getScreenThumbnails();if(t)return t.find(t=>t.mediaSourceId===e)}};function logDisplays(e,t){if(!t.length)return void e.error("No screens available");let a=new s.M(["id","width","height","x","y","scaleFactor","rotation"]);t.forEach(e=>{a.add([e.id,e.bounds.width,e.bounds.height,e.bounds.x,e.bounds.y,e.scaleFactor,e.rotation].map(String))}),e.info(`Available screens:
${a.report()}`)}},0xab5d2f25:(e,t,a)=>{"use strict";a.d(t,{Q:()=>VideoProcessingManager});var n,r=a(0x14466d83e),i=a(0x62a17882),l=a(0x16998c9bf),o=a(0x24643ca4),s=a(0x6a506842);function isWebGLContextLikelyToFail(){try{let e=window.document.createElement("canvas");return!(e.getContext("webgl2")||e.getContext("webgl"))}catch{return!0}}let BackgroundWorkerVideoTransformDevice=class BackgroundWorkerVideoTransformDevice{device;worker=null;inputMediaStream;logger;generatorVideoTrack=null;outputMediaStream;bgImg;isCleaned=!1;workerError=null;cleanupHandler;fallbackCallback;preloadCallback;shouldUseFallback=!1;fallbackReason=null;constructor(e,t,a){this.device=e,this.bgImg=t,this.fallbackCallback=a,this.logger=(0,s.tZ)("BACKGROUND-WORKER-VIDEO-TRANSFORM-DEVICE"),(isWebGLContextLikelyToFail()||(0,i.gm)())&&(this.shouldUseFallback=!0,this.fallbackReason="WebGL context unavailable",this.logger.warn(`Early fallback triggered: ${this.fallbackReason}`)),this.generatorVideoTrack=new MediaStreamTrackGenerator({kind:"video"}),this.outputMediaStream=new MediaStream([this.generatorVideoTrack]),this.cleanupHandler=()=>this.cleanup(!1),window.addEventListener("beforeunload",this.cleanupHandler)}initWorker=()=>{if(!this.worker){if(this.shouldUseFallback)return void this.logger.warn(`Skipping worker initialization due to fallback: ${this.fallbackReason}`);if(this.worker=new Worker(new URL("/boot/"+a.u("background.worker"),a.b)),!this.worker)throw this.shouldUseFallback=!0,this.fallbackReason="Worker initialization failed",Error("Failed to initiate background worker");this.worker.addEventListener("error",this.handleWorkerError),this.worker.addEventListener("message",this.handleWorkerMessage)}};preload=e=>{this.preloadCallback=e,this.initWorker(),this.worker?.postMessage({type:"preload"})};handleWorkerError=e=>{this.logger.error("Worker error:",e.message),this.workerError=Error(`Worker error: ${e.message}`),this.shouldUseFallback=!0,this.fallbackReason=`Worker error: ${e.message}`,this.fallbackCallback?.(),this.cleanup(!1)};handleWorkerMessage=e=>{let t=e.data;if(t&&t.type)switch(t.type){case"init-error":case"worker-error":case"update-background-error":this.logger.error(`Worker reported error (${t.type}):`,t.error),this.workerError=Error(`Worker error: ${t.error}`),this.shouldUseFallback=!0,this.fallbackReason=`Worker internal error: ${t.error}`,this.fallbackCallback?.(),this.cleanup(!1);break;case"preload-error":this.logger.info(`Preload failed: (${t.type}):`,t.error),this.preloadCallback?.(!1),this.cleanup(!1);break;case"preload-complete":this.logger.info("Preload complete"),this.preloadCallback?.(!0),this.cleanup(!1)}};async intrinsicDevice(){return this.device}updateEffect(e){if(this.isCleaned||!this.worker)throw this.workerError||Error("Device has been cleaned up");if(this.shouldUseFallback)return void this.logger.warn(`Skipping effect update due to fallback mode: ${this.fallbackReason}`);this.bgImg=e;let t=[];e&&t.push(e),this.worker.postMessage({type:"updateBackgroundImage",bgImg:e},t)}isNewDevice=e=>(0,o.IP)(this.device)!==(0,o.IP)(e);cleanup(e=!0){this.isCleaned||(this.fallbackCallback=void 0,this.preloadCallback=void 0,window.removeEventListener("beforeunload",this.cleanupHandler),this.generatorVideoTrack&&(this.generatorVideoTrack.stop(),this.generatorVideoTrack=null),e&&this.inputMediaStream&&(this.inputMediaStream.getTracks().forEach(e=>e.stop()),this.inputMediaStream=void 0),this.worker&&(this.worker.postMessage({type:"cleanup"}),this.worker.removeEventListener("error",this.handleWorkerError),this.worker.removeEventListener("message",this.handleWorkerMessage),this.worker.terminate(),this.worker=null),this.bgImg&&(this.bgImg=void 0),this.isCleaned=!0)}async stop(){this.cleanup()}onOutputStreamDisconnect(){let e=!(this.device instanceof MediaStream);this.cleanup(e)}async transformStream(e){if(this.isCleaned||!this.generatorVideoTrack)throw this.workerError||Error("Device has been cleaned up");if(this.shouldUseFallback)return this.logger.warn(`Using fallback mode (no video processing): ${this.fallbackReason}`),e||this.outputMediaStream;if(!this.worker)return this.logger.warn("Worker not available, falling back to original stream"),e||this.outputMediaStream;if(this.inputMediaStream=e,e)try{let t=e.getVideoTracks()[0];if(!t)throw Error("No video track found in input stream");let a=new MediaStreamTrackProcessor({track:t}),n=[a.readable,this.generatorVideoTrack.writable];this.bgImg&&n.push(this.bgImg),this.worker.postMessage({type:"init",input:a.readable,output:this.generatorVideoTrack.writable,width:t.getSettings().width,height:t.getSettings().height,bgImg:this.bgImg},n),this.bgImg&&(this.bgImg=void 0)}catch(e){throw this.logger.error("Transform stream error:",e),this.shouldUseFallback=!0,this.fallbackReason=`Transform stream error: ${(0,l.u1)(e)}`,this.fallbackCallback?.(),this.cleanup(),e}return this.outputMediaStream}isInFallbackMode(){return this.shouldUseFallback}getFallbackReason(){return this.fallbackReason}clearFallbackCallback(){this.fallbackCallback=void 0}};function isHuddlesBackgroundWorkerSupported(){return!!("MediaStreamTrackProcessor"in globalThis&&"MediaStreamTrackGenerator"in globalThis&&"OffscreenCanvas"in globalThis&&"ImageBitmap"in globalThis&&"createImageBitmap"in globalThis)}(n={}).Blur="BLUR",n.Image="IMAGE",n.None="NONE";var c=a(0x6db8f551);let d="medium";let VideoProcessingManager=class VideoProcessingManager{chimeLogger;callLogger=(0,s.Jt)("VIDEO-PROCESSING-MANAGER");backgroundWorkerVideoTransformDevice;currentVideoTransformDevice;currentVideoFrameProcessors;currentVideoFrameProcessor;currentVideoFrameProcessorObserver;videoFxProcessor;isMidProcessingFallbackInProgress=!1;isHuddlesBackgroundWorkerSupported=isHuddlesBackgroundWorkerSupported();defaultVideoProcessorOptions;constructor(e){this.chimeLogger=e,this.defaultVideoProcessorOptions={filterCPUUtilization:30,reportingPeriodMillis:1e4,logger:this.chimeLogger}}createFallbackCallback(){return()=>{this.backgroundWorkerVideoTransformDevice&&this.handleMidProcessingFallback()}}async handleMidProcessingFallback(){if(this.isMidProcessingFallbackInProgress)return void this.callLogger.warn("Mid-processing fallback already in progress, skipping");this.isMidProcessingFallbackInProgress=!0,this.callLogger.warn("Handling mid-processing fallback - switching to fallback processor");try{this.backgroundWorkerVideoTransformDevice&&(this.backgroundWorkerVideoTransformDevice.clearFallbackCallback(),await this.backgroundWorkerVideoTransformDevice.stop(),this.backgroundWorkerVideoTransformDevice=void 0),this.callLogger.info("Mid-processing fallback completed successfully")}catch(e){this.callLogger.error("Error during mid-processing fallback:",e)}finally{this.isMidProcessingFallbackInProgress=!1}}async tryBackgroundWorkerDevice(e,t){if(!this.isHuddlesBackgroundWorkerSupported||this.isMidProcessingFallbackInProgress)return null;try{if(!await this.initBackgroundWorkerVideoTransformDevice(e,t)||!this.backgroundWorkerVideoTransformDevice)return this.callLogger.warn("Background worker creation failed, attempting fallback to old processor."),null;if(this.backgroundWorkerVideoTransformDevice.isInFallbackMode()){let e=this.backgroundWorkerVideoTransformDevice.getFallbackReason();return this.callLogger.warn(`Background worker in fallback mode: ${e}. Attempting fallback to old processor.`),await this.backgroundWorkerVideoTransformDevice.stop(),this.backgroundWorkerVideoTransformDevice=void 0,null}return this.backgroundWorkerVideoTransformDevice}catch(e){return this.callLogger.error("Error creating background worker video transform device",e),this.callLogger.warn("Attempting fallback to old processor."),null}}async initBackgroundWorkerVideoTransformDevice(e,t){try{if(this.backgroundWorkerVideoTransformDevice?.isNewDevice(e.id)&&(this.callLogger.info("Device changed, creating new background worker video transform device"),await this.backgroundWorkerVideoTransformDevice.stop(),this.backgroundWorkerVideoTransformDevice=void 0),this.backgroundWorkerVideoTransformDevice)try{this.backgroundWorkerVideoTransformDevice.updateEffect(t),this.callLogger.info("Successfully updated effect on existing background worker device")}catch(a){this.callLogger.warn("Failed to update effect on existing device, creating new one",String(a)),await this.backgroundWorkerVideoTransformDevice.stop(),this.backgroundWorkerVideoTransformDevice=void 0,this.backgroundWorkerVideoTransformDevice=new BackgroundWorkerVideoTransformDevice(e.id,t,this.createFallbackCallback()),this.backgroundWorkerVideoTransformDevice.initWorker(),this.callLogger.info("Successfully created new background worker video transform device")}else this.callLogger.info("Creating new background worker video transform device"),this.backgroundWorkerVideoTransformDevice=new BackgroundWorkerVideoTransformDevice(e.id,t,this.createFallbackCallback()),this.backgroundWorkerVideoTransformDevice.initWorker(),this.callLogger.info("Successfully created new background worker video transform device");if(this.backgroundWorkerVideoTransformDevice.isInFallbackMode()){let e=this.backgroundWorkerVideoTransformDevice.getFallbackReason();this.callLogger.warn(`Background worker video transform device is in fallback mode: ${e}. Using original video input without effects.`)}return!0}catch(e){if(this.callLogger.error("Error creating background worker video transform device",e),this.backgroundWorkerVideoTransformDevice){try{this.backgroundWorkerVideoTransformDevice.clearFallbackCallback(),await this.backgroundWorkerVideoTransformDevice.stop()}catch(e){this.callLogger.warn("Error stopping background worker device during cleanup",String(e))}this.backgroundWorkerVideoTransformDevice=void 0}return!1}}preload=()=>{let e=new BackgroundWorkerVideoTransformDevice("default");return new Promise(t=>{e.preload(e=>{e&&t(e)})})};setupVideoBackgroundFrameProcessor({processor:e,backgroundEffect:t}){this.clearVideoBackgroundFrameProcessor()}clearVideoBackgroundFrameProcessor(){}setVideoTransformDeviceRefs({transformDevice:e,processors:t}){this.currentVideoTransformDevice=e,this.currentVideoFrameProcessors=t}async clearVideoTransformDeviceRefs(){this.clearVideoBackgroundFrameProcessor(),this.currentVideoFrameProcessors&&(this.currentVideoFrameProcessors.forEach(e=>{e.destroy()}),this.currentVideoFrameProcessors.length=0,this.currentVideoFrameProcessors=void 0),this.currentVideoTransformDevice&&(await this.currentVideoTransformDevice.stop(),this.currentVideoTransformDevice=void 0)}async handleErrorApplyVideoEffects(e,t){let a=t.label||t.id;return this.callLogger.info(`${e}: ${a}`),t.id}async processVideoWithBackgroundReplacement({videoDevice:e,selectedBackgroundImageKey:t,customBgImg:a}){let n=e.label||e.id;if(void 0===t)return this.callLogger.info(`No background image key provided id: ${n}`),e.id;let i=c.g.find(e=>e.key===t);if(void 0===i&&!a)return this.handleErrorApplyVideoEffects("Image could not be found, switching to default input for device",e);this.callLogger.info(`Enabling video input device with background image filter id: ${n}`);let l=i?.url||a,o=await fetch(l),s=await o.blob(),m=await createImageBitmap(s),u=await this.tryBackgroundWorkerDevice(e,m);if(u)return u;let p=(0,r.jq)(),h=(0,r.px)(),_=[];if(!await r.i3.isSupported(this.chimeLogger))return this.handleErrorApplyVideoEffects("VideoFxProcessor is not supported on host device. Defaulting to non image replaced background",e);await h.isSupported(),this.defaultVideoProcessorOptions;if(this.videoFxProcessor=await r.i3.create(this.chimeLogger,{backgroundBlur:{isEnabled:!1,strength:d},backgroundReplacement:{isEnabled:!0,backgroundImageURL:l,defaultColor:void 0}},50),!this.videoFxProcessor)return this.handleErrorApplyVideoEffects("VideoFxProcessor could not be created defaulting to normal input for device",e);this.callLogger.info(`VideoFxProcessor background image replacement enabled for device id: ${n}`),_.push(this.videoFxProcessor),this.callLogger.info(`Enabling video input device with background image replacement id: ${n}`);let f=new p(this.chimeLogger,e.id,_);return this.setVideoTransformDeviceRefs({transformDevice:f,processors:_}),f}async processVideoWithBackgroundBlur(e){let t=(0,r.jq)(),a=((0,r.kM)(),e.label||e.id);this.callLogger.info(`Enabling video input device with background blur filter id: ${a}`);let n=await this.tryBackgroundWorkerDevice(e);if(n)return n;let i=[];if(!await r.i3.isSupported(this.chimeLogger))return this.handleErrorApplyVideoEffects("VideoFxProcessor is not supported on host device. Defaulting to non blurred background",e);if(this.videoFxProcessor=await r.i3.create(this.chimeLogger,{backgroundBlur:{isEnabled:!0,strength:d},backgroundReplacement:{isEnabled:!1,backgroundImageURL:"",defaultColor:void 0}},50),!this.videoFxProcessor)return this.handleErrorApplyVideoEffects("VideoFxProcessor could not be created defaulting to normal input for device",e);this.callLogger.info(`VideoFxProcessor background blur enabled for device id: ${a}`),i.push(this.videoFxProcessor),this.callLogger.info(`Enabling video input device with background blur filter id: ${a}`);let l=new t(this.chimeLogger,e.id,i);return this.setVideoTransformDeviceRefs({transformDevice:l,processors:i}),l}async shutdown(){this.backgroundWorkerVideoTransformDevice&&(this.backgroundWorkerVideoTransformDevice.clearFallbackCallback(),await this.backgroundWorkerVideoTransformDevice.stop(),this.backgroundWorkerVideoTransformDevice=void 0),await this.clearVideoTransformDeviceRefs(),this.videoFxProcessor&&(await this.videoFxProcessor.destroy(),this.videoFxProcessor=void 0),this.callLogger.info("Video processing manager shutdown complete")}async debugTriggerFallback(){}}},0x19a57be55:(e,t,a)=>{"use strict";a.d(t,{Q:()=>VoiceFocusManager});var n=a(0x16998c9bf),r=a(0x14466d83e),i=a(0xf5a3fff7),l=a(0x1f06b0cba),o=a(0x5186d4e),s=a(0x6a506842);let c="voiceFocusCache";function createDefaultVoiceFocusCapability(){return{userAgent:"unknown",sdkVersion:"unknown",isSupported:"unknown"}}function createDefaultVoiceFocusCachedConfig(){return{vfConfig:"unknown",lastUpdateTimeMs:0}}function readVoiceFocusCache(e=window?.navigator?.userAgent,t){let a,r=localStorage.getItem(c),i={version:2,voiceFocusCapability:createDefaultVoiceFocusCapability(),voiceFocusCachedConfig:createDefaultVoiceFocusCachedConfig()};if(!r)return i;try{a=JSON.parse(r)}catch(e){return(0,s.tZ)("VOICE-FOCUS-CACHE").error("Could not parse voice focus cache from localStorage: ",(0,n.u1)(e)),i}return 2!==a.version?i:(a.voiceFocusCapability&&(a.voiceFocusCapability.userAgent!==e||a.voiceFocusCapability.sdkVersion!==t)&&(a.voiceFocusCapability=i.voiceFocusCapability,a.voiceFocusCachedConfig=i.voiceFocusCachedConfig),{...i,...a})}function writeVoiceFocusCache(e){try{localStorage.setItem(c,JSON.stringify(e))}catch(e){(0,s.tZ)("VOICE-FOCUS-CACHE").error("Could not write voice focus cache to localStorage: ",(0,n.u1)(e))}}var d=a(0x1a2667164),m=a(0x3711e82d),u=a(0x45012309),p=a(0x103783718);let VoiceFocusManager=class VoiceFocusManager{chimeLogger;allowMaxModelsToBeUsed;callLogger=(0,s.Jt)("VOICE-FOCUS-MANAGER");cache;isSupported=!1;voiceFocusConfigPromise;voiceFocusDeviceTransformerPromise;voiceFocusTransformDevicePromise;voiceFocusDevice=void 0;isTornDown=!1;loggedInsufficientResources=!1;isMuted=!1;constructor(e,t){this.chimeLogger=e,this.allowMaxModelsToBeUsed=t,this.cache=readVoiceFocusCache((0,p.A)(),r.zF.sdkVersion)}async init({configOnly:e}){this.loggedInsufficientResources=!0,e||this.callLogger.info(`VF cache: ${!!this.cache}`),this.isSupported=await this.isCapable(!!e),this.isSupported&&this.prepare(e)}isAvailable(){return this.isSupported}async getTransformDevice(){if(this.isSupported){if(this.voiceFocusConfigPromise&&await this.voiceFocusConfigPromise,this.voiceFocusDeviceTransformerPromise){try{await this.voiceFocusDeviceTransformerPromise}catch{this.callLogger.error("Could not get VoiceFocusDeviceTransformer");return}if(this.voiceFocusTransformDevicePromise)try{return await this.voiceFocusTransformDevicePromise}catch{this.callLogger.error("Could not get VoiceFocusTransformDevice")}}}}shouldDisable(){return!1}async setMute(e){this.isMuted=e;let t=await this.getTransformDevice();t&&await t.mute(e)}async swapToVoiceFocusDevice(e){if(!e)return;if(this.voiceFocusConfigPromise&&(await this.voiceFocusConfigPromise,this.callLogger.info("VoiceFocusConfigPromise finished")),this.voiceFocusDeviceTransformerPromise||(this.callLogger.info("Voice focus device transformer not initialized, triggering full setup for swap"),this.prepare(!1)),this.voiceFocusDeviceTransformerPromise)try{await this.voiceFocusDeviceTransformerPromise,this.callLogger.info("voiceFocusDeviceTransformerPromise finished")}catch{this.callLogger.error("Could not get VoiceFocusDeviceTransformer for device swap");return}let t=await this.getTransformDevice();if(!t)return void this.callLogger.warn("Transform device not available for device swap");let a=!!this.voiceFocusDevice;try{this.voiceFocusDevice=await t.chooseNewInnerDevice(e),this.voiceFocusDevice&&!a&&this.voiceFocusDevice.addObserver(this),this.callLogger.info("swapped to voice focus device given device"),this.setMute(this.isMuted),this.callLogger.info(`muted new voice focus device ${this.isMuted}`)}catch(e){this.callLogger.error(`Failed to swap to voice focus device: ${(0,n.iT)(e).name}: ${(0,n.iT)(e).message}`)}}async isCapable(e){if(this.isIFramed())return e||this.callLogger.warn("not supported due to IFrame"),!1;let t=!1;switch(this.cache.voiceFocusCapability.isSupported){case"yes":e||this.callLogger.info("cache says supported"),t=!0;break;case"no":e||this.callLogger.info("cache says not supported"),t=!1;break;case"unknown":e||this.callLogger.info("cache says unknown, determining support..."),this.cache.voiceFocusCapability.userAgent=(0,p.A)(),this.cache.voiceFocusCapability.sdkVersion=r.zF.sdkVersion,(t=await (0,r.w2)().isSupported())?this.cache.voiceFocusCapability.isSupported="yes":this.cache.voiceFocusCapability.isSupported="no",writeVoiceFocusCache(this.cache),e||this.callLogger.info(`determined supported=${this.cache.voiceFocusCapability.isSupported}, writing to cache`);break;default:this.callLogger.warn(`Voice Focus capability pref bad: ${this.cache.voiceFocusCapability.isSupported}`)}return t}isIFramed(){try{return window.frameElement?.nodeName==="IFRAME"||parent!==top}catch{return!0}}isStale(e){let t=this.cache.voiceFocusCachedConfig.lastUpdateTimeMs,a=this.allowMaxModelsToBeUsed?0x1889c37c8fb:0x181f3792077;return 0===t||!!(e-t>6048e5)||!!(t<a)}prepare(e=!1){let t=Date.now(),a=this.cache.voiceFocusCachedConfig.vfConfig,i=this.isStale(t),l={},o={logger:this.chimeLogger};"unknown"===a||i?this.voiceFocusConfigPromise?this.callLogger.info("Skipping Voice Focus setup because voiceFocusConfigPromise is already set"):(this.callLogger.info("Initializing VoiceFocusDeviceTransformer afresh"),this.voiceFocusConfigPromise=Promise.resolve((0,r.w2)().configure(l,o)),this.voiceFocusConfigPromise.then(a=>{a.supported?a?.model?.simd?(this.callLogger.info(`Got new config, variant: ${a.model.variant}, simd: ${a.model.simd}, executionQuanta: ${a.executionQuanta}`),this.storeVfConfig(t,a),e||this.setupDevice(l,o,a)):this.callLogger.error("VF not enabled because device is not expected to be able to perform adequately"):this.callLogger.error(`VF Config was provided as unsupported Reason: ${a.reason}`)}).catch(t=>{this.callLogger.info(`Could not get configuration of voice device transformer: ${(0,n.iT)(t).name}: ${(0,n.iT)(t).message}`),e||this.setupDevice(l,o)})):e?this.callLogger.info("Skipping Voice Focus setup because configOnly is true"):a.supported?this.setupDevice(l,o,a):this.callLogger.warn("Unsupported config was returned from the cache")}storeVfConfig(e,t){this.cache.voiceFocusCachedConfig.vfConfig=t,this.cache.voiceFocusCachedConfig.lastUpdateTimeMs=e,writeVoiceFocusCache(this.cache)}async updateCacheWithUpdatedConfig(e){this.callLogger.info("Updating VF cache with new modified model");let t={logger:this.chimeLogger},a=await (0,r.w2)().configure({variant:e},t);a.supported?this.storeVfConfig(Date.now(),a):this.callLogger.warn("VF configuration is not supported, skipping cache update")}setupDevice(e,t,a){let s,c,p=a;a?(s=a.model.variant,c=!0):(this.callLogger.info("No VFConfig provided defaulting base model to c10"),s="c10",c=!1);let h=!0;this.allowMaxModelsToBeUsed&&(h=!1);let _=this.chooseModelVariant(s,c,h);if(_.modelWasAdjusted&&(e.variant=_.chosenModel,p=void 0,this.callLogger.info(`VF Model was adjusted from ${a?.model.variant} to ${_.chosenModel} Reason: ${_.adjustmentReason}`),this.updateCacheWithUpdatedConfig(_.chosenModel)),a){(0,u.eo)().track(m.EventId.CALLS_VOICE_FOCUS_CONFIG,{model_variant_determined:a.model.variant,model_variant_override:e.variant,simd:a.model.simd,execution_quanta:a.executionQuanta,hw_concurrency:navigator?.hardwareConcurrency});let t={...a};t.model.variant=_.chosenModel,o.A.publish({type:l.lx.VoiceFocusConfig,update:t}),this.callLogger.info(`model_variant_determined: ${a.model.variant}, model_variant_override: ${_.chosenModel}, simd: ${a.model.simd}, execution_quanta: ${a.executionQuanta}, hw_concurrency: ${navigator?.hardwareConcurrency}`)}else this.callLogger.info("No VFConfig provided during setupDevice");let f=(0,i.Bh)();(0,d.O)().setSelectedModel(_.chosenModel),this.voiceFocusDeviceTransformerPromise=Promise.resolve((0,r.w2)().create(e,t,p));let b={useVoiceFocusAGC:!1,useBuiltInAGC:f.audio.enableAGC};this.voiceFocusDeviceTransformerPromise.then(async e=>{this.voiceFocusTransformDevicePromise=Promise.resolve(e.createTransformDevice(null,{agc:b})),(0,d.O)().setVoiceFocusSetup()}).catch(e=>{this.callLogger.warn(`Could not create voice device transformer exp: ${(0,n.iT)(e).name}: ${(0,n.iT)(e).message}`)})}getCurrentVoiceFocusDevice(){return this.voiceFocusDevice}chooseModelVariant(e,t,a){let n,r={c10:1,c20:2,c50:3,c100:4},i=navigator?.hardwareConcurrency;return i?r[n=i<=4?"c10":i<=6?"c20":i<=8?"c50":"c100"]<r[e]&&!a?{modelWasAdjusted:this.wasModelAdjusted(n,e,t),chosenModel:n,adjustmentReason:"Using CPU restricted model variant which is weaker"}:r[n]>r[e]&&(this.callLogger.info(`using self-determined model variant which is weaker: ${e}`),n=e,!a)?{modelWasAdjusted:!1,chosenModel:e,adjustmentReason:""}:"c100"===n?{modelWasAdjusted:this.wasModelAdjusted("c20",e,t),chosenModel:"c20",adjustmentReason:"Model selection was determined to be c100 capping the model at C20"}:{modelWasAdjusted:this.wasModelAdjusted("c10",e,t),chosenModel:"c10",adjustmentReason:"Model selection was determined to be less than c100 capping the model at C10"}:(this.callLogger.info(`Hardware concurrency not available, using self-determined model variant: ${e}`),{modelWasAdjusted:!1,chosenModel:e,adjustmentReason:""})}wasModelAdjusted(e,t,a){return e===t&&!a||e!==t}async cleanupVoiceFocusDevice(){try{this.voiceFocusDevice&&(this.voiceFocusDevice?.removeObserver(this),await this.voiceFocusDevice.stop(),this.voiceFocusDevice=void 0)}catch(e){this.callLogger.error(`Failed to cleanup old voice focus device: ${(0,n.iT)(e).name}: ${(0,n.iT)(e).message}`)}}async tearDown(){if(this.isTornDown)return void this.callLogger.info("tearDown called multiple times, already torn down");this.isTornDown=!0,await this.cleanupVoiceFocusDevice();let e=await this.getTransformDevice();e&&(this.callLogger.info("Attempting to destroyVoiceFocus"),await r.wV.destroyVoiceFocus(e),this.callLogger.info("Voice Focus tore down successfully"))}voiceFocusInsufficientResources(){this.loggedInsufficientResources||(this.loggedInsufficientResources=!0,this.callLogger.warn("Voice Focus reported insufficient resources"),(0,d.O)().setInsufficientResourcesWarningTriggered(!0))}voiceFocusFellBackToInnerStream(e,t){this.callLogger.warn("Voice Focus fell back to inner stream"),this.callLogger.warn(t),(0,d.O)().setFellBackToInnerStream(!0)}}},0x1a2667164:(e,t,a)=>{"use strict";let n;a.d(t,{O:()=>getVoiceFocusStatsTracker});var r=a(0x6a506842);let VoiceFocusStatsTracker=class VoiceFocusStatsTracker{logger=(0,r.Jt)("STATS-AVERAGES-TRACKER");selectedModel="";insufficientResourcesWarningTriggered=!1;voiceFocusEnabled=!1;fellBackToInnerStream=!1;constructor(){this.logger.info("Stats averages tracker initialized")}setVoiceFocusSetup(){this.voiceFocusEnabled=!0}setSelectedModel(e){this.selectedModel=e}setInsufficientResourcesWarningTriggered(e){this.insufficientResourcesWarningTriggered=e}setFellBackToInnerStream(e){this.fellBackToInnerStream=e}getTags(){return{vfInsufficientResourcesWarning:this.insufficientResourcesWarningTriggered,vfSelectedModel:this.selectedModel,vfEnabled:this.voiceFocusEnabled,vfFellBackToInnerStream:this.fellBackToInnerStream}}setHuddleEnded(){this.selectedModel="",this.insufficientResourcesWarningTriggered=!1,this.voiceFocusEnabled=!1,this.fellBackToInnerStream=!1}};let getVoiceFocusStatsTracker=()=>(n||(n=new VoiceFocusStatsTracker),n)},0xdf7a57c3:(e,t,a)=>{"use strict";a.d(t,{k:()=>trackCallsClog});var n=a(0x45012309),r=a(0xb40e439e),i=a(0xb090c889),l=a(0x19c76d181);function trackCallsClog(e,t,a=!0,o=!1){let s=(0,i.KA)()?.getState();if(!s)return;let c=(0,n.eo)({state:s}).setUser((0,l.WR)(s));if(a){let a={...t,room_id:(0,r.G0)(s)};c.track(e,a,{sendImmediately:o})}else c.track(e,t,{sendImmediately:o})}},0xf75135e5:(e,t,a)=>{"use strict";a.d(t,{w:()=>LogReporter});var n=a(0xd6ba6894),r=a(0xe874a88a),i=a(0x19efc8b50),l=a(0x22a29f141),o=a(0x2023ea712),s=a(0x30164a1e),c=a(0x19a70d6a8),d=a(0x11c82607b),m=a(0xe684f705),u=a(0x1ee439e69);let p="screenhero.rooms.proxyLogs",h=(0,d.Ay)("Send call logs to the server",(e,t,{logs:a,useSendBeacon:n=!1,callId:d})=>{let h,_=t();if(d?h=d:_.activeCall&&_.activeCall.id&&(h=_.activeCall.id),!h)return(0,s.M)(!1,"There should be an active call in progress in order to send logs."),r.S.reject(Error("SendLogs: no call"));let f=(0,m.cA)(_),b=(0,u.H7)(_);if(!b)return r.S.reject(Error("SendLogs: no current team"));let g={data:JSON.stringify({data:{room_id:h,user_id:f.id,team_id:b.id,ua:window.navigator.userAgent,event_type:"calls_js_logs",encoding:"none",logs:a}}.data)};return n?(0,o.A)({apiUrl:"/api/",method:p,token:(0,c.F)(_),versionTs:(0,i.HF)(),versionUid:(0,i.X3)(),args:g})?r.S.resolve():r.S.reject(Error("SendLogs: beacon failed")):e((0,l.apiCall)({method:p,reason:"calls-logging",args:g}))});h.meta={name:"sendLogs",key:"createThunkSendLogs",description:"Send call logs to the server"};var _=a(0x1ace3e992),f=a(0x1ec68d6a3),b=a(0xb090c889);let LogReporter=class LogReporter{buffer;intervalHandle;callId;unloadHandler=()=>{n.J.Cypress||this.report(!0)};constructor(e=_.tt){this.buffer=e}start(e){(0,s.M)(!this.intervalHandle,"Log reporter already started."),this.callId=e,this.intervalHandle=n.J.setInterval(()=>this.report(!1),6e4),n.J.addEventListener("beforeunload",this.unloadHandler)}stop=async(e=!1,t=!1)=>{this.intervalHandle&&n.J.clearInterval(this.intervalHandle),this.intervalHandle=void 0,n.J.removeEventListener("beforeunload",this.unloadHandler),await this.emptyBuffer(t),this.callId=void 0};emptyBuffer=async(e=!1)=>{this.buffer.hasItems()&&(await this.report(e),await this.emptyBuffer(e))};joinLogs(e){return e.map(e=>e.join(" ")).join(`
`)}report=async(e=!1)=>{let{dispatch:t}=(0,b.KA)(),a=this.buffer.flush();if(!a.length)return;let n=this.joinLogs(a);await t(h({logs:n,useSendBeacon:e,callId:this.callId})).catch(()=>{(0,f.Wo)().error("Failed to send Huddle logs")})}}},0xe9a7487f:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=new(a(0x16a98fd3c)).D},0x26c802c7:(e,t,a)=>{"use strict";a.d(t,{D8:()=>o,WY:()=>l,d2:()=>r,gJ:()=>i});var n=a(0xcf658893);let r=(0,n.Ay)("Binds video tile to a video element");r.meta={name:"bindVideo",key:"createActionBindVideo",description:"Binds video tile to a video element"};let i=(0,n.Ay)("Unbinds video tile from a video element");i.meta={name:"unbindVideo",key:"createActionUnbindVideo",description:"Unbinds video tile from a video element"};let l=(0,n.Ay)("Pauses video tile");l.meta={name:"pauseVideo",key:"createActionPauseVideo",description:"Pauses video tile"};let o=(0,n.Ay)("Unpauses video tile");o.meta={name:"unpauseVideo",key:"createActionUnpauseVideo",description:"Unpauses video tile"}},0x157bc0648:(e,t,a)=>{"use strict";a.d(t,{q:()=>shouldLaunchAppNatively});var n=a(0x21f3c49e8),r=a(0x62a17882),i=a(0x1059ba41d);async function shouldLaunchAppNatively(e){if(!e)return!1;try{let t=await (0,i.l$e)(e);return(0,r.y3)()&&!(0,n.A)(t)}catch{return!1}}},0x19f65e865:(e,t,a)=>{"use strict";a.d(t,{t3:()=>x});var n=a(0x62a17882),r=a(0x8c8bafa3),i=a(0x20482ad21),l=a(0x15a05e998),o=a(0x1b543542c),s=a(0x189393d41),c=a(0x22a29f141),d=a(0xc67f3d80),m=a(0x157ccdb87),u=a(0x16ed1b0dc),p=a(0x11c82607b),h=a(0x157bc0648),_=a(0x19895585a),f=a(0x9271cc31),b=a(0x15176067);let g=new i.Ay("start_call"),y=(0,p.Ay)("Handle calls.request error",(e,t,{text:a,conversationId:n})=>{e((0,b.A)({temporary:!0,message:{text:a,channel:n}}))});function getAppNameByAppId(e,t){let a=(0,o.wZ)(e);for(let e=0;e<a.length;e++)if(a[e].id===t)return a[e].name}y.meta={name:"handleCallsRequestError",key:"createThunkHandleCallsRequestError",description:"Handle calls.request error"};let A=(0,p.Ay)("Creates a new platform call",async(e,t,a={})=>{let i,{channelId:o}=a,s=t(),m=(0,f.e6)(s),p=(0,f.F8)(s,{tab:m,container:_.mq.Primary}),b=p?.id,A=(0,u.A)(b)?b:null,x=o||A,E=a.appId;if(!E||E===d.rq)return;let C=getAppNameByAppId(s,E),k=["AD6B97QES","A9SD542KA","ABE6T3L7Q","ADHD298UB","A5P5FDK33"].concat(["AN2CSGQUR","ANAAG9CKA","AN1CDQZKL","AN80VL39P"]).indexOf(E)>=0;try{let t;a&&a.traceOptions&&(i=a.traceOptions.trace?.startSpan("calls:initiate_calls_request",{tags:{http_method:"calls.request",file:"start-or-join-call.ts",function:"startPlatformCall"},parentSpanId:a.traceOptions.parentSpanId}));let o=await e((0,c.apiCall)({method:"calls.request",reason:"call-button-clicked",args:{channel:x,app:E,type:a.type,phone_number:a.type===d.Hu.audio?a.phoneNumber:void 0},traceId:a?.traceOptions?.trace?.getTraceId(),parentSpanId:i?.getId()})).finally(()=>{i&&i.close()});if((0,l.kx)(s)&&["A01770DAECA","ARRK29W8N","ARAKAD3C2"].indexOf(E)>=0)return;t=await (0,h.q)(o.desktop_protocol_url)?o.desktop_protocol_url:k?o.url:encodeURI(o.url);let m=window.open(t,C);try{m.focus()}catch{if(!(0,n.y3)()){let t=g.t("Please allow pop-ups in your browser to make a call. You can <{url}|contact Slack> if you need help.",{url:`https://my.${(0,r.qF)()}/help/requests/new`,fallbackHash:"3fdef2430e4c413f1c7ad15aa0f200067f6b0a5d",fallbackHashNs:"utility"});e(y({text:t,conversationId:x}))}}}catch(t){e(y({text:t.response||g.t("Darn, that didn\u2019t work. Try your call again or <{url}|contact us> if it\u2019s still not working.",{url:`https://my.${(0,r.qF)()}/help/requests/new`,fallbackHash:"978df40dadeeb46bdb243a1f396d9233bc51c1b2",fallbackHashNs:"utility"}),conversationId:x}))}});A.meta={name:"startPlatformCall",key:"createThunkStartPlatformCall",description:"Creates a new platform call"};let x=(0,p.Ay)("Creates a new platform call",(e,t,a={})=>{let n,r=t(),i=(0,m.E)({state:r}),l=i.createTrace({traceName:"calls:start_call",tags:{call_app_id:a.appId,call_type:a.type,has_phone_number:(0,s.A)(a.phoneNumber||"")}}),o=l.startSpan("calls:start_platform_call",{tags:{filename:"start-or-join-call",function:"startCall"}});return(n={trace:l,parentSpanId:o?.getId()},e(A({...a,traceOptions:n}))).finally(()=>{o&&o.close(),l&&i.reportTrace(l)})});x.meta={name:"startCall",key:"createThunkStartCall",description:"Creates a new platform call"}},0x44f8fc76:(e,t,a)=>{"use strict";a.d(t,{Rv:()=>isCallButtonDisabledForChannel,Xk:()=>isCallButtonVisibleForChannel,hL:()=>canCallMember,j7:()=>getTipForStartCall,tw:()=>getTipSubtitleForStartCall,uI:()=>getCallConfirmationStrings,vf:()=>isAnyCallAppEnabled});var n=a(0x20482ad21),r=a(0x1e864b930),i=a(0x1b543542c),l=a(0x1ec69ee01),o=a(0x12185e091),s=a(0x1ecc7f772),c=a(0x280afe13),d=a(0x6f213e53),m=a(0x245dcaf6b),u=a(0x1e79c438d),p=a(0xebdd009e),h=a(0x1b9d5cc0c),_=a(0x2378cf6ec),f=a(0x21d85d6e5),b=a(0x143fb6398),g=a(0x1a4a1f2c0),y=a(0xa1832ae4),A=a(0x5738b4bc),x=a(0xc67f3d80),E=a(0x1d600678),C=a(0x217553e42),k=a(0x17a41206b),v=a(0xe684f705),S=a(0x1ee439e69);let I=new n.Ay("calls");function isCallsAllowedByAdmin(e){return!!(0,E.x)(e,"allow_calls")}function canCallMember(e,t,a){let n=(0,C.Pu)(e,t.id);return!(!isCallsAllowedByAdmin(e)&&!(0,p.Bn)(e,n)||(0,h.fy)(t)&&!a||!(0,h._W)(t)||!(0,g.S)(e,t.id)||(0,l.Mi)(n))}function isCallButtonVisibleForChannel(e,t,a=!0){let n=(0,v.nv)(e,(0,c.e)(t)),r=a&&isThirdPartyCallEnabled(e);return!(!isCallsAllowedByAdmin(e)&&!(0,p.Bn)(e,t)&&!r||(0,m.Zz)(t)||(0,o.LI)(t)&&(!n||!canCallMember(e,n)))&&!!(0,l.Ez)(t)&&(0,A.c)(e,t)}function isCallButtonDisabledForChannel(e,t){return!(0,k.Pb)(e)||((0,l.bU)(t)||(0,d.F)(t))&&!shouldEnableForSponsoredConnections(t)}function getTipSubtitleForStartCall(e,t,a){let n=(0,u.V)(t),r=(0,i.q8)(e,n),l=(0,v.nv)(e,a,{preferNonExistentToNull:!1,fetchIfMissing:!0}),o=(0,h.v8)(l),s=(0,i.OJ)({callsApp:r,memberPhoneNumber:o,hideVideoApps:!1}),c=s.length,d=(0,p.Bn)(e,t),m=c;return(d&&(m+=1),m>1)?I.t("{numCallApps} calling options",{numCallApps:m}):1===m?0===c?"":I.t("using {appName}",{appName:s[0].name}):""}function getTipForIm(e,t,a){let n=(0,_.I)(e,(0,c.e)(t));return a?I.t("Huddle with {name}",{name:n,__react:!0}):I.t("Call {name}",{name:n,__react:!0})}function getTipForMpim(e,t,a){let n=(0,l.d3)(e,t).map(t=>(0,f.sE)(e,t)),i=(0,r.A)(n,{noEscape:!0}).join("");return a?I.t("Huddle with {listOfNamesWithConjunction}",{listOfNamesWithConjunction:i}):I.t("Call {listOfNamesWithConjunction}",{listOfNamesWithConjunction:i,__react:!0})}function getTipForChannel(e,t,a){return(0,o.LI)(t)?getTipForIm(e,t,a):(0,o.yz)(t)?getTipForMpim(e,t,a):a?I.t("Huddle in {channelName}",{channelName:(0,s.SB)(e,t)}):I.t("Start a call")}function getTipForStartCall(e,t){let a=(0,S.H7)(e),n=(0,y.qR)(a),r=isThirdPartyCallEnabled(e),i=n||r,o=(0,p.Bn)(e,t)&&!isAnyCallAppEnabled(e);return(0,k.Pb)(e)?i&&(0,d.F)(t)?I.t("Unarchive this channel to start a huddle"):i&&(0,l.bU)(t)?I.t("Join this channel to start a huddle"):getTipForChannel(e,t,o):I.t("Go online to start a huddle")}function isThirdPartyCallEnabled(e){let t=(0,i.wZ)(e);for(let e=0;e<t.length;e++)if(t[e].id!==x.rq)return!0;return!1}function isAnyCallAppEnabled(e){return(0,i.wZ)(e).length>0}function getCallConfirmationStrings(e){let t=I.t("Start a call?");return{title:t,description:I.t("You\u2019ll be starting a call that all {count} members of this channel can join.",{count:e}),confirm:I.t("Start Call"),cancel:I.t("Cancel")}}function shouldEnableForSponsoredConnections(e){return(0,b.ju)(e)&&!(0,o.LI)(e)}},0x1f7834687:(e,t,a)=>{"use strict";function getCallIdFromExternalId(e){let t=(e||"").split("-");return t&&(3===t.length||4===t.length)?t[1]:null}a.d(t,{Y:()=>getCallIdFromExternalId})},0x14b6e238a:(e,t,a)=>{"use strict";function cssForRect({width:e,height:t,top:a,left:n}){return{position:"absolute",width:`${e}px`,height:`${t}px`,top:`${a}px`,left:`${n}px`}}a.d(t,{n:()=>cssForRect})},0x15a05e998:(e,t,a)=>{"use strict";a.d(t,{BD:()=>isCallsOrgAppsSettingsExperimentEnabled,XY:()=>isCallsLocationLockEnabled,kx:()=>isCallsWindowSuppressed,wn:()=>isCallsTracingDisabled});var n=a(0x14149c126);let isCallsOrgAppsSettingsExperimentEnabled=e=>"treatment"===(0,n._Z)(e,"calls_org_app_settings"),isCallsTracingDisabled=e=>"treatment"===(0,n._Z)(e,"calls_tracing_disabled"),isCallsWindowSuppressed=e=>"treatment"===(0,n._Z)(e,"call_button_suppress_window"),isCallsLocationLockEnabled=e=>"treatment"===(0,n._Z)(e,"calls_location_lock")},0x881d3c20:(e,t,a)=>{"use strict";a.d(t,{P:()=>filterVirtualAudioDevices});let n=["ZoomAudioDevice (Virtual)"];function filterVirtualAudioDevices(e){return e.filter(e=>-1===n.indexOf(e.label))}},0x23acb8e0f:(e,t,a)=>{"use strict";a.d(t,{$:()=>createInterWindowMessageSender,Y:()=>logInterWindowMessage});var n=a(0x6a506842),r=a(0x1ec68d6a3),i=a(0x1036bc040);function logInterWindowMessage({direction:e,type:t,payload:a}){let l=(0,i.A)()?"slack":"call",o="INTER-WINDOW-MESSAGE";((0,i.A)()?(0,n.tZ)(o):(0,r.Wo)({label:o})).info(`${"send"===e?"Sending":"Received"} ${t} ${"send"===e?"to":"from"} the ${l} window${a?`, with payload: ${JSON.stringify(a)}`:""}`)}function createInterWindowMessageSender(e){return function(t,a,n,r=!0){e(a,n,r),t.sendData({type:a,payload:n})}}},0x1be489b6a:(e,t,a)=>{"use strict";a.d(t,{A:()=>isDrawSupported});var n=a(0x62a17882);function isDrawSupported(){return!(0,n.j9)()&&(0,n.y3)()}},0x22ddfce0b:(e,t,a)=>{"use strict";a.d(t,{X:()=>showBorderForWindowOrScreenId,a:()=>hideScreenShareWindowBorder});var n=a(0x62a17882),r=a(0xf8dd7f80),i=a(0x6a506842),l=a(0x21c434145),o=a(0x1036bc040);let s=255/265,c="SCREEN-SHARE",showBorderForWindowOrScreenId=e=>{!(0,n.j9)()&&(0,n.dY)("4.13.1")&&((0,l.$m)(e,2e3),(0,l.VR)(e),(0,l.D0)(6),(0,l.Mh)(0,s,.2,1),(0,l.Ac)(),((0,o.A)()?(0,i.tZ)(c):(0,r.getGenericLogger)({label:c})).info("Screenshare border added"))},hideScreenShareWindowBorder=()=>{!(0,n.j9)()&&(0,n.dY)("4.13.1")&&((0,l.th)(),((0,o.A)()?(0,i.tZ)(c):(0,r.getGenericLogger)({label:c})).info("Screenshare border removed"))}},0x1c40e1088:(e,t,a)=>{"use strict";a.d(t,{R:()=>l});var n=a(0x23acb8e0f),r=a(0x30164a1e),i=a(0x1036bc040);let l=(0,n.$)((e,t,a=!0)=>{(0,r.M)(!(0,i.A)(),"Expected to send message from the slack window"),(0,n.Y)({direction:"send",type:e,payload:a?t:"REDACTED"})})},0x120e75720:(e,t,a)=>{"use strict";a.d(t,{M:()=>StringTable});var n=a(0x21f83e7e5);let StringTable=class StringTable{columnNames;separator;padding=[];rows=[];constructor(e,t="|"){this.columnNames=e,this.separator=t,this.columnNames&&this.adjustPadding(this.columnNames)}add(e){this.rows.push(e),this.adjustPadding(e)}report(){let e=this.padding.map(e=>"-".repeat(e));return(this.columnNames?[e,this.columnNames,e]:[]).concat(this.rows).reduce((e,t)=>e+t.reduce((e,a,r)=>e+(0,n.A)(a,this.padding[r])+(r!==t.length-1?` ${this.separator} `:`
`),""),"")}adjustPadding(e){this.padding=e.map((e,t)=>Math.max(e.length,this.padding[t]||0))}}},0x98358620:(e,t,a)=>{"use strict";function getUserIdFromExternalId(e){let t=(e||"").split("-");return t&&(3===t.length||4===t.length)?t[2]:null}a.d(t,{l:()=>getUserIdFromExternalId})},0x13d3d6803:(e,t,a)=>{"use strict";a.d(t,{i:()=>getVideoDeviceBackgroundPrefs});var n=a(0xf5a3fff7),r=a(0xef5ec459);function getVideoDeviceBackgroundPrefs(){let e=(0,n.Bh)(),t=e?.video?.effect===r.t.Blur;return{backgroundEffectBgKey:e?.video?.effectBgKey,blurEffectIsEnabled:t,customBgImg:e?.video?.customBgImg}}},0x13cb90c09:(e,t,a)=>{"use strict";a.d(t,{A:()=>withDarkMode});var n=a(0xbad225b5),r=a(0x17d13b2a8),i=a(0x1c91944c9),l=a(0x1fb2d2a87);function withDarkMode(e){let t=class extends n.Component{componentDidMount(){"dark"===this.props.clientTheme&&document.documentElement.classList.add(r.RD)}componentDidUpdate(e){this.props.clientTheme!==e.clientTheme&&("dark"===this.props.clientTheme?document.documentElement.classList.add(r.RD):document.documentElement.classList.remove(r.RD))}render(){return n.createElement(e,this.props)}};return t.displayName="DarkMode",(0,i.N)(e=>({clientTheme:(0,l.to)(e)}))(t)}withDarkMode.displayName="withDarkMode"},0x178cbe8bc:(e,t,a)=>{"use strict";a.d(t,{A:()=>TrackTimeSpent});var n=a(0xbad225b5),r=a(0x162afc153),i=a(0x839ba347),l=a(0xd6ba6894),o=a(0x1f355b555),s=a(0xb9c8096),c=a(0x3711e82d),d=a(0x45012309);let m=["focus","focusin","touchstart","mousedown","mouseup","wheel","keydown","keyup","beforeinput","input","scroll","compositionstart","compositionupdate","compositionend"];function listenForUserEvents(e){let t={capture:!0,passive:!0},a=setInterval(()=>performHeartbeat(e),6e4),n=(0,r.A)(()=>{l.J.document.hasFocus&&l.J.document.hasFocus()&&(0,s.qF)((0,s.NI)(e()))},5e3,{leading:!0,trailing:!0});return m.forEach(e=>{l.J.addEventListener(e,n,t)}),()=>{m.forEach(e=>{l.J.removeEventListener(e,n,t)}),clearInterval(a)}}function makeClogClientSession(e){return{uid:e.id,timestamp_start:(0,o.Ay)(e.startTime).unix(),timestamp_refresh:(0,o.Ay)(e.lastActivity).unix(),seconds_offline:(0,s.D9)(e),version:0}}function performHeartbeat(e){let t=e(),a=(0,s.MF)((0,s.NI)(t)),n=(0,d.eo)({state:t});(0,i.A)(a,e=>{null===e.lastLogged?n.track(c.EventId.SESSION_START,{client_session:makeClogClientSession(e)}):e.isActive&&e.needsRefresh&&n.track(c.EventId.SESSION_REFRESH,{client_session:makeClogClientSession(e)}),e.isActive||n.track(c.EventId.SESSION_END,{client_session:makeClogClientSession(e)})})}let TrackTimeSpent=class TrackTimeSpent extends n.Component{static defaultProps={children:null};removeListener;constructor(e){super(e),this.removeListener=null}componentDidMount(){this.removeListener=listenForUserEvents(()=>this.props.store.getState())}componentWillUnmount(){this.removeListener&&(this.removeListener(),this.removeListener=null)}render(){return this.props.children}};TrackTimeSpent.displayName="TrackTimeSpent"},0x24de9bd60:(e,t,a)=>{"use strict";a.d(t,{u:()=>apiCloseBootQueue});var n=a(0xe874a88a);async function apiCloseBootQueue({apiCalls:e,contextualInfo:t}){return n.S.all(Object.values(e)).catch(()=>{}).finally(()=>{t.bootQueue.stop()}),{apiCalls:e,contextualInfo:t}}},0x1627f1de7:(e,t,a)=>{"use strict";a.d(t,{v:()=>connectToSocket});var n,r=a(0x113d3998c),i=a(0x19ab1d23a),l=a(0x8588bca7),o=a(0x14d52fedb),s=a(0x4f6e90b4),c=a(0xe874a88a),d=a(0x6c3e75c1),m=a(0x62a17882),u=a(0x21b7b6046),p=a(0x19efc8b50),h=a(0x1805097c),_=a(0x18dac2b8e),f=a(0xd35ac109),b=a(0x12c020c3),g=a(0x5a5c86cb),y=a(0xb5e49867),A=a(0x16998c9bf),x=a(0x208477787),E=a(0x1ec68d6a3),C=((n={}).flannelOverHttp="flannelOverHttp",n.socketUrl="socketUrl",n);let k=1,v={subtype:"endpoint_manager"},S={};function getEndpointManagerInstance(e){return S[e]||(S[e]=new EndpointManager(e)),S[e]}function clearInstances(){Object.keys(S).forEach(e=>{delete S[e]})}function isValidEndpoint({url:e,expiry:t,error:a}={}){return!!(e&&t&&t>Date.now()&&!a)}function isValidEndpointName(e){return!!C[e]}function getExpiryFromNow(e=0,t=2500){return Date.now()+1e3*e-t}function fetchEndpoint({method:e,teamId:t,token:a=(0,h.hf)(t),args:n={}}){return x.Ay.fetch({method:e,teamId:t,args:{...n,token:a}})}let I={socketUrl:e=>fetchEndpoint({method:"client.getWebSocketURL",teamId:e}).then(e=>({url:e.primary_websocket_url,fallbackUrl:e.fallback_websocket_url,ttlSeconds:e.ttl_seconds,context:e.routing_context})),flannelOverHttp:e=>{let t=Error("Not yet implemented");return c.S.reject(t)}};let EndpointManager=class EndpointManager{teamId;logger;storage;storageKey;endpoints;pendingPromises;constructor(e){this.teamId=e,this.logger=(0,E.Ay)({label:"ENDPOINT-MANAGER",teamId:e}),this.storage=window.localStorage||window.sessionStorage||null,this.storageKey=this.buildStorageKey(k),this.endpoints=this.getStoredEndpoints(),this.pendingPromises={},this.clearInvalidEndpoints(),this.clearStaleEndpoints()}set(e,t){isValidEndpointName(e)&&(this.endpoints[e]={...t,expiry:t.expiry||getExpiryFromNow(t.ttlSeconds)},this.store())}async get(e){return isValidEndpoint(this.endpoints[e])||this.clearInvalidEndpoints(),this.endpoints[e]||this.getPending(e)||this.fetch(e)}async fetch(e){let t;this.logger.info(`${e} - fetching endpoint`);let a=I[e](this.teamId);this.setPending(e,a);try{t=await a,this.logger.info(`${e} - got endpoint`)}catch(a){t={error:(0,A.u1)(a,"error")||"_unknown"},this.logger.error(`${e} - could not get endpoint`,a,v)}return this.set(e,t),t}buildStorageKey(e){return`endpoints-v${e}-${this.teamId}`}store(){if(this.storage){this.clearInvalidEndpoints();try{this.storage.setItem(this.storageKey,JSON.stringify(this.endpoints))}catch(e){this.logger.error(e,"Could not store endpoints",v)}}}getStoredEndpoints(){if(this.storage){let e;try{if(e=JSON.parse(this.storage.getItem(this.storageKey)))return e}catch(e){this.logger.error(e,"Could not get endpoints from storage",v)}}return{}}setPending(e,t){isValidEndpointName(e)&&(t.finally(()=>{delete this.pendingPromises[e]}),this.pendingPromises[e]=t)}getPending(e){return this.pendingPromises[e]}clearInvalidEndpoints(){this.endpoints=(0,g.A)(this.endpoints,isValidEndpoint)}clearStaleEndpoints(){if(this.storage)try{let e=(0,y.A)(1,k);if(!e.length)return void this.logger.info("No stale versions to clear.");e.forEach(e=>{let t=this.buildStorageKey(e);this.storage?.removeItem(t),this.logger.info(`Removed stale endpoints from key: ${t}`)})}catch(e){this.logger.error(e,"Could not clear stale endpoints from storage",v)}}};Object.defineProperty({instances:S,endpointFetchers:I,clearInstances,isValidEndpoint,isValidEndpointName,getExpiryFromNow,STARTING_STORAGE_KEY_VERSION:1},"STORAGE_KEY_VERSION",{get:()=>k,set:e=>{k=e}});var w=a(0x1d30b0ef7);async function getSocketUrl({teamId:e,enterpriseId:t,baseUrl:a,useFallback:n=!1,token:r=(0,h.hf)(e),excludeEvents:i=[],startArgs:l={},wsRegion:o,lastPrimaryRegion:s,fastReconnectToken:c,batchPresenceAware:d=!0,slackRoute:m}){let u;if(!r)throw Error("Cannot getSocketUrl with out a token");let p=await getEndpointManagerInstance(e).get(C.socketUrl);if(a?u=a:(u=n?p.fallbackUrl:p.url,u=u?.replace(/\/$|$/,"/")),!u)throw Error("Could not get getSocketUrl endpoint");return u=(0,b.M6)(u,"token",r),u=(0,b.M6)(u,"sync_desync","1"),u=(0,b.M6)(u,"slack_client","desktop"),u=setFlannelSpecificParams(u=(0,b.M6)(u,"start_args",(0,f.iU)({...getDefaultStartArgs(),...l}))),p.context&&(u=(0,b.M6)(u,"gateway_server",p.context)),t&&(u=(0,b.M6)(u,"enterprise_id",t)),i.length&&(u=(0,b.M6)(u,"exclude_events",i.join(","))),o&&(u=(0,b.M6)(u,"ws_region",o)),n&&(u=(0,b.M6)(u,"is_backup","1")),n&&s&&(u=(0,b.M6)(u,"last_primary_region",s)),c&&(u=(0,b.M6)(u,"frt",c)),d&&(u=(0,b.M6)(u,"batch_presence_aware","1")),m&&(u=(0,b.M6)(u,"slack_route",m)),u}function setFlannelSpecificParams(e){let t=e;if(t=(0,b.M6)(t,"no_query_on_subscribe","1"),(0,_.Cu)()||(0,_.$i)()){let e=window.location.hostname.split(".").slice(1).join("."),a=`${window.location.protocol}//${e}`;t=(0,b.M6)(t,"api_url",a)}return t=(0,b.M6)(t,"flannel","3"),t=(0,b.M6)(t,"lazy_channels","1")}function getDefaultStartArgs(){let e={agent:(0,w.fj)()||"not-gantry"},t=(0,b.qN)(window.location.href);return Object.keys(t).filter(e=>0===e.indexOf("feature_")).forEach(a=>{e[a]=t[a]}),e}var T=a(0x9b971e7e),N=a(0x19c76d181),M=a(0x141589b4d);async function getSocketUrlFromState(e,{useFallback:t,baseUrl:a,fastReconnectToken:n,excludeEvents:r=[]}={}){let i=(0,N.tV)(e,"singleChannelBootWebsocketUrl");if(i)return i;let l=[...r],o=(0,T.ZT)(e),s=(0,N.tV)(e,"enterprise_id"),c={org_wide_aware:!0,...getFlannelSpecificStartArgs(e)};return getSocketUrl({teamId:o,enterpriseId:s,baseUrl:a,lastPrimaryRegion:(0,M.WO)(e),useFallback:t,excludeEvents:l,fastReconnectToken:n,startArgs:c})}function getFlannelSpecificStartArgs(e){let t={agent_version:(0,p.HF)(),eac_cache_ts:!0,cache_ts:0,name_tagging:!0,only_self_subteams:!0,connect_only:!0,ms_latest:!0};return(0,N.TZ)(e)||(t.no_presence=!0),(0,N.uv)(e)&&(t.no_subteams=!0),t}var R=a(0x111f730ec),P=a(0xed7645e3),L=a(0x1aba66b56),O=a(0xb77a689a),D=a(0x18f2150ea),F=a(0x1626b8eae),U=a(0xf90b35a5),B=a(0x1c6b91d55),H=a(0x318bb66b),W=a(0x1daf4b9c),V=a(0x138a48c44),G=a(0x12af72ca4),q=a(0x11439744b),j=a(0x9982f7ed),z=a(0x1266f1359);let K={4100:"disconnect requested",4101:"an error occurred",4106:'received an "error" message from socket',4103:"error during fast reconnect flow",4104:"received goodbye from server",4110:"socket activity halted",4102:"client is going to sleep",4105:"client went offline",4107:"client state machine got stuck",[V.Do]:"pong timeout",4108:"unexpected socket closure",4109:"no reason provided",[V._z]:"unexpected socket closure from SlackSocket"},$=(0,H.A)(10),Y=(0,H.A)(1),Q="SOCKET-MANAGER",Z=["tickle","typing","user_typing"],J=[G.tV.HALT,G.tV.HALTING,G.tV.HALTED];let BaseSocketManager=class BaseSocketManager{_token;_fastReconnectUrl;_fastReconnectUrlReceivedAtTime;_teamId;_logger;_telemeter;_connectFailureCount=0;_connectStartTs;_firstConnectFailureTs;_didDispatchTroubleConnecting=!1;_didCountTroubleConnecting=!1;_currentState=G.tV.NEVER_CONNECTED;_debugSocketConnectFlakiness=0;_debugSocketSendFlakiness=0;_fastReconnectsEnabled=!0;_backoffMs=0;_socket;_startState=G.tV.PROV_CONNECT;_stuckStateTimer;_waitForConnectivityP;_waitForRateLimitTimer;_waitingForRateLimitActionInterval;_hasConnected=!1;_failoverMode=!1;_useBackupRegion=!1;_isWaitForRateLimitTimerCurrentlyRunning=!1;_successfulQueryCount=0;_failedQueryCount=0;_responseSizes=[];_errorSetStateTimeout;constructor(e,t,a){if(this._token=e,this._fastReconnectUrl=t,this._fastReconnectUrlReceivedAtTime=a,!this._token)throw Error("SocketManager requires a token");this._teamId=(0,h.Nx)(this._token),this._logger=(0,E.Ay)({teamOrEnterpriseId:this._teamId}),(0,W.A)()||this._logger.error(Error("BaseSocketManager constructed by a non-Gantry page"));const n=(0,z.$D)(this._teamId);this._telemeter=(0,q.Cy)({state:n}),this._isClientOnline=this._isClientOnline.bind(this),this._fastReconnectUrl&&(this._startState=G.tV.CONNECT)}debugGetState(){return this._currentState}debugResetRateLimit(){this._backoffMs=0}debugSetFastReconnectsEnabled(e){this._fastReconnectsEnabled=!!e}debugSetSocketConnectFlakiness(e){if(e<0||e>1)throw Error("Flakiness must be a number between 0 and 1");this._debugSocketConnectFlakiness=e}debugSetSocketSendFlakiness(e){if(e<0||e>1)throw Error("Flakiness must be a number between 0 and 1");this._debugSocketSendFlakiness=e}debugSlowReconnect(){this._fastReconnectUrl=void 0,this.disconnect()}debugTriggerMessageHandler(e){this._handleSocketMessage(e)}debugTriggerError(){this._setState(G.tV.ERROR)}getTeamId(){return this._teamId}isHalted(){return J.includes(this._currentState)}start(){if(this._currentState!==G.tV.NEVER_CONNECTED)throw Error("SocketManager can only be started once");window.addEventListener("offline",()=>{this._info("got offline event; moving to DISCONNECT as needed"),this._transitionSafely({state:G.tV.DISCONNECT,noopStates:[G.tV.ASLEEP,G.tV.SLEEP,G.tV.SLEEPING,G.tV.HALTED,G.tV.HALTING,G.tV.HALT,G.tV.DISCONNECT,G.tV.DISCONNECTING,G.tV.DISCONNECTED,G.tV.WAIT_FOR_CONNECTIVITY]})}),window.addEventListener("sleep",()=>{this.sleep()},!1),window.addEventListener("wake",()=>{this.wake()},!1),this._shouldStartAsleep()&&(this._startState=G.tV.SLEEP),this._transitionSafely({state:this._startState,allowableSourceStates:[G.tV.NEVER_CONNECTED,G.tV.WAIT_FOR_RATE_LIMIT,G.tV.ERROR,G.tV.DISCONNECTED],noopStates:[G.tV.PROV_CONNECT,G.tV.PROV_CONNECTING,G.tV.PROV_CONNECTED,G.tV.CONNECTED,G.tV.CHECKING_FAST_RECONNECT,G.tV.FAST_RECONNECTING,G.tV.WAIT_FOR_CONNECTIVITY]}),this._maybeEnableDebuggingFlakinessFromQueryParams()}disconnect(){this._transitionSafely({state:G.tV.DISCONNECT,noopStates:[G.tV.HALTED,G.tV.ASLEEP,G.tV.DISCONNECTED,G.tV.DISCONNECTING,G.tV.WAIT_FOR_CONNECTIVITY,G.tV.WAIT_FOR_RATE_LIMIT]})}finalizeProvisionalConnection(){this._telemeter.count("sm_flow_finalize_prov_10");let e=this._currentState;if(this._transitionSafely({state:G.tV.PROV_FINALIZE,allowableSourceStates:[G.tV.PROV_CONNECTED]}),this._currentState!==G.tV.CONNECTED){let t=this._currentState;throw this._telemeter.count("sm_flow_finalize_prov_error_10"),this._setState(G.tV.ERROR),Error(`Failed to finalize connection -- expected to be connected but actually ${t} (start state was ${e})`)}this._telemeter.count("sm_flow_finalize_prov_ok_10")}failProvisionalConnection(){this._transitionSafely({state:G.tV.ERROR,allowableSourceStates:[G.tV.PROV_CONNECTED]})}reconnectImmediately(){this._transitionSafely({state:G.tV.CONNECT,noopStates:[G.tV.CONNECT,G.tV.CONNECTED,G.tV.CHECKING_FAST_RECONNECT,G.tV.FAST_RECONNECTING,G.tV.PROV_CONNECT,G.tV.PROV_CONNECTED,G.tV.PROV_CONNECTING,G.tV.PROV_FINALIZE,G.tV.PROV_FINALIZING,G.tV.HALT,G.tV.HALTING,G.tV.HALTED]})}halt(){this._telemeter.count("sm_flow_halt"),this._info("Halting"),this._transitionSafely({state:G.tV.HALT,noopStates:J})}unhalt(){this._telemeter.count("sm_flow_unhalt"),this._info("Unhalting"),this._transitionSafely({state:G.tV.CONNECT,allowableSourceStates:[G.tV.HALTED]})}sleep(){this._shouldSleepWake()?(this._telemeter.count("sm_flow_sleep"),this._info("Sleeping"),this._transitionSafely({state:G.tV.SLEEP,noopStates:[G.tV.ASLEEP,G.tV.SLEEPING,G.tV.HALT,G.tV.HALTING,G.tV.HALTED]})):this._info("Ignoring sleep")}wake(){if(!this._shouldSleepWake())return void this._info("Ignoring wake");if(!this.isHalted()){if(this._currentState!==G.tV.ASLEEP)return void this._warn("Got asked to wake but we are not asleep; ignoring");this._telemeter.count("sm_flow_wake"),this._info("Waking"),this._transitionSafely({state:G.tV.CONNECT,allowableSourceStates:[G.tV.ASLEEP]})}}clearFastReconnectUrl(){this._fastReconnectUrl=void 0,this._fastReconnectUrlReceivedAtTime=void 0}getFastReconnectUrl(){if(this._fastReconnectsEnabled&&this._fastReconnectUrl&&this._fastReconnectUrlReceivedAtTime){if(Date.now()-this._fastReconnectUrlReceivedAtTime>285e3){this._fastReconnectUrl=void 0;return}return this._fastReconnectUrl}}getFastReconnectUrlReceivedAtTime(){return this._fastReconnectUrlReceivedAtTime}send(e){let{type:t}=e;if(!this._socket){this._warn(`Cannot send data when we do not have a socket; state = ${this._currentState}`);let e=Error(V.qk);return c.S.reject(e)}if(this._debugSocketSendFlakiness&&Math.random()<=this._debugSocketSendFlakiness){this._info("Intentionally throwing error to simulate flakiness");let t=e.subtype?`${e.type}.${e.subtype}`:e.type,a=Error(`Socket send failed due to intentional flakiness for debugging; message type was ${t}`);return a.msg={},a.msg.SENT_MSG=e,c.S.reject(a)}(0,L.A)(Z,t)&&this._updateLastSocketActivity();let a=this._socket.send(e);return this._maybeMeasureReliabilityMetrics(a),a}getStats(){return{successfulQueryCount:this._successfulQueryCount,failedQueryCount:this._failedQueryCount,responseSizes:this._responseSizes,totalQueryCount:this._successfulQueryCount+this._failedQueryCount}}clearStats(){this._successfulQueryCount=0,this._failedQueryCount=0,this._responseSizes=[]}shouldMeasureReliabilityMetrics(){return Y}failover(){this._failoverMode=!0,this._setFailoverMode(this._failoverMode),this.disconnect()}updateToken(e){if(e===this._token)return!1;let t=(0,h.Nx)(e);if(t!==this._teamId)throw Error(`Cannot update token: new token does not point to the same team id ('${this._teamId}' != '${t}')`);return this._token=e,!0}_maybeEnableDebuggingFlakinessFromQueryParams(){let{ws_flakiness:e}=(0,f.nT)(window.location.search);if(e)try{let t=(0,O.A)(e)?parseFloat(e):e;(0,D.A)(t)&&t>0&&(this.debugSetSocketConnectFlakiness(t),this.debugSetSocketSendFlakiness(t),1===t&&this.disconnect())}catch{}}_closeSocket(e){if(!this._socket)return;this._socket.onConnectCallback=void 0,this._socket.onCloseCallback=void 0,this._socket.onErrorMessageCallback=void 0;let t=K[e]||"generic error",a=e?`#${e}: ${t}`:t,n=this._socket;this._socket=void 0,n.isClosingOrClosed?this._warn(`Socket was closed because ${a}`):(this._info(`Closing socket because ${a}`),n.close(e,t)),this._telemeter.count(`ws_cr_${e||4109}_10`)}async _createSlackSocketWithUrl(e){if(this._socket)throw Error("We already have a socket");if(this._debugSocketConnectFlakiness&&Math.random()<=this._debugSocketConnectFlakiness){this._info("Intentionally closing socket to simulate flakiness"),this._handleSocketClosed();return}let t=await this._getConnectionUrl({baseUrl:e,useBackup:this._useBackupRegion});this._socket=new V.Ay(t),this._connectStartTs=Date.now(),this._socket.onCloseCallback=(0,F.A)(this._handleSocketClosed.bind(this)),this._socket.onConnectCallback=(0,F.A)(this._handleSocketConnected.bind(this)),this._socket.onErrorMessageCallback=(0,F.A)(this._handleSocketErrorMessage.bind(this))}_handleGoodbye(){(this._info("goodbye: disconnecting from the MS next time it is convenient"),this._isWindowFocused())?this._info("received a goodbye message but window is focused, so ignoring it -- Flannel will hang up on us after a while"):(this._info("goodbye: disconnecting now"),this._closeSocket(4104),this.disconnect())}_handleSocketClosed(e=4108){this._telemeter.count("sm_flow_unexpected_close_10"),this._closeSocket(e),this._handleUnexpectedSocketClosure(),this._transitionSafely({state:G.tV.ERROR})}_transitionSafely(e){(0,G.Qj)(this._currentState,e,this._setState.bind(this))}_handleSocketConnected(){$&&this._connectStartTs&&this._telemeter.store("sm_connect_to_hello_time",Date.now()-this._connectStartTs);let e=this._currentState===G.tV.FAST_RECONNECTING?G.tV.CONNECTED:G.tV.PROV_CONNECTED;this._telemeter.count(`sm_flow_connected_${e}`),this._transitionSafely({state:e,allowableSourceStates:[G.tV.FAST_RECONNECTING,G.tV.PROV_CONNECTING]})}_handleSocketErrorMessage({code:e,msg:t,retry_after:a}){if(this._info(`received an error of type ${e}: ${t}`),this._telemeter.count("ws_err_10"),this._telemeter.count(`ws_err_${(0,U.A)(t)}_10`),this.isHalted())return void this._info("ignoring error because state is halted");let n=!0;switch(t){case"rate_limited":case"ratelimited":case"Ratelimited":case"backend_overloaded":case"unknown":a?(this._info(`rate limited for ${a} seconds`),this._backoffMs=1e3*a):(this._info("adding delay of 30000 ms"),this._backoffMs=3e4);break;case"Subscription failure from the CS":this.clearFastReconnectUrl();break;case"Socket URL has expired":this.clearFastReconnectUrl(),n=!1;break;case"invalid_auth":this._currentState===G.tV.FAST_RECONNECTING&&(this._info("Got invalid_auth when trying to fast reconnect; clearing fast reconnect URL and trying slow reconnection instead"),this.clearFastReconnectUrl(),n=!1)}this._closeSocket(4106),this._setState(G.tV.ERROR),n&&this._handleSocketErrorMessageReceived(t)}_handleSocketMessage(e){switch(e&&e.type){case"goodbye":this._handleGoodbye();return;case"reconnect_url":this._fastReconnectUrl=e.url,this._fastReconnectUrlReceivedAtTime=Date.now();return;case void 0:this._warn("Received an invalid message; dropping it");return}this._handleSocketMessageReceived(e)}_leaveState(e,t){switch(e){case G.tV.FAST_RECONNECTING:case G.tV.PROV_CONNECTING:case G.tV.PROV_CONNECTED:t===G.tV.ERROR&&(this._connectFailureCount+=1,1===this._connectFailureCount&&(this._firstConnectFailureTs=Date.now(),this._didDispatchTroubleConnecting=!1,this._didCountTroubleConnecting=!1),this._maybeDispatchTroubleConnectingAction(),this._maybeSetFailoverMode());break;case G.tV.CONNECTED:this._handleDisconnectedSocket();break;case G.tV.WAIT_FOR_CONNECTIVITY:this._waitForConnectivityP&&(this._waitForConnectivityP.cancel(),this._waitForConnectivityP=void 0);break;case G.tV.WAIT_FOR_RATE_LIMIT:this._waitForRateLimitTimer&&(clearTimeout(this._waitForRateLimitTimer),this._waitForRateLimitTimer=void 0,this._isWaitForRateLimitTimerCurrentlyRunning=!1),this._waitingForRateLimitActionInterval&&(clearInterval(this._waitingForRateLimitActionInterval),this._waitingForRateLimitActionInterval=void 0),t===G.tV.CONNECT&&this._handleWaitingForRateLimit(0)}}_runState(e,t){switch(e){case G.tV.NEVER_CONNECTED:if(!this._shouldUseSocket())return;this._info("Attempting initial connection to primary region"),this._telemeter.count("sm_flow_primary_connecting_10"),this._setState(G.tV.PROV_CONNECT);break;case G.tV.CONNECT:{this._setState(G.tV.CHECKING_FAST_RECONNECT),this._maybeToggleRegion();let e=this._useBackupRegion?"backup":"primary";this._info(`Attempting to connect to ${e} region`),this._telemeter.count(`sm_flow_${e}_connecting_10`);let t=this.getFastReconnectUrl();if(!t)return void this._setState(G.tV.PROV_CONNECT);this._telemeter.count("sm_flow_fast_reconnect_10");try{this._setState(G.tV.FAST_RECONNECTING),this._createSlackSocketWithUrl(t).then(()=>{this._socket.messageDelegate=this._handleSocketMessage.bind(this)})}catch{this._closeSocket(4103),this._setState(G.tV.PROV_CONNECT)}break}case G.tV.FAST_RECONNECTING:break;case G.tV.CONNECTED:{this._clearErrorCount(),this._backoffMs=0,this._didDispatchTroubleConnecting=!1,this._didCountTroubleConnecting=!1,this._hasConnected=!0;let e=this._useBackupRegion?"backup":"primary";this._info(`Connected to ${e} region`),this._telemeter.count(`sm_flow_${e}_connected_10`);let a=!this._useBackupRegion;this._socket.startData.then((e={})=>{a&&e.region&&this._setLastConnectedPrimaryRegion(e.region)}),this._failoverMode=!1,this._setFailoverMode(!1),this._useBackupRegion=!1,this._setShouldUseBackupRegion(!1),t!==G.tV.CONNECTED&&this._setConnected(t);break}case G.tV.CHECKING_FAST_RECONNECT:break;case G.tV.PROV_CONNECT:this._telemeter.count("sm_flow_connect_prov_10"),this._info(`Connecting with token ending: ${this._token.substring(this._token.length-4)}`),this._setState(G.tV.PROV_CONNECTING),this._getConnectionUrl({useBackup:this._useBackupRegion}).then(e=>{this._createSlackSocketWithUrl(e)});break;case G.tV.PROV_CONNECTING:break;case G.tV.PROV_CONNECTED:this._handleProvisionallyConnected();break;case G.tV.PROV_FINALIZE:this._setState(G.tV.PROV_FINALIZING),this._setState(G.tV.CONNECTED),this._socket.messageDelegate=this._handleSocketMessage.bind(this);break;case G.tV.PROV_FINALIZING:break;case G.tV.DISCONNECT:{let e=this._isClientOnline()?4100:4105;this._setState(G.tV.DISCONNECTING),this._closeSocket(e),this._setState(G.tV.DISCONNECTED);break}case G.tV.DISCONNECTING:break;case G.tV.DISCONNECTED:this._info(`Disconnected! Online? ${this._isClientOnline()}`),this._setState(G.tV.WAIT_FOR_RATE_LIMIT);break;case G.tV.ERROR:this._closeSocket(4101),this._setState(G.tV.WAIT_FOR_RATE_LIMIT);break;case G.tV.HALT:this._setState(G.tV.HALTING),this._closeSocket(4110),this._setState(G.tV.HALTED);break;case G.tV.HALTING:case G.tV.HALTED:break;case G.tV.SLEEP:this._setState(G.tV.SLEEPING),this._closeSocket(4102),this._setState(G.tV.ASLEEP);break;case G.tV.SLEEPING:case G.tV.ASLEEP:break;case G.tV.WAIT_FOR_CONNECTIVITY:this._telemeter.count("sm_flow_wait_for_connectivity"),this._waitForConnectivityP=this._awaitReconnection(),this._clearErrorCount(),this._waitForConnectivityP.then(()=>{this._currentState===G.tV.WAIT_FOR_CONNECTIVITY&&this._setState(G.tV.CONNECT)}).catch(()=>{this._currentState===G.tV.WAIT_FOR_CONNECTIVITY&&(this._info("Waited too long for connectivity to come back"),this._setState(G.tV.ERROR))});break;case G.tV.WAIT_FOR_RATE_LIMIT:{let e=(0,B.vF)({last:this._backoffMs,cap:6e4,base:1e3});if(this._info(`backing off: will wait for ${e} ms`),this._telemeter.count("sm_flow_wait_for_rate_limit",e),!this._waitingForRateLimitActionInterval){let t=Date.now()+e;this._waitingForRateLimitActionInterval=window.setInterval(()=>{let e=Math.ceil((t-Date.now())/1e3);this._handleWaitingForRateLimit(e)},1e3)}this._waitForRateLimitTimer=window.setTimeout(()=>{this._isWaitForRateLimitTimerCurrentlyRunning||(this._isWaitForRateLimitTimerCurrentlyRunning=!0,clearInterval(this._waitingForRateLimitActionInterval),this._currentState===G.tV.WAIT_FOR_RATE_LIMIT&&(this._isClientOnline()?this._setState(G.tV.CONNECT):this._setState(G.tV.WAIT_FOR_CONNECTIVITY)))},e),this._backoffMs=e}}}_setState(e){if(!(0,G.cw)(e))throw Error("Invalid state");this._info(`Changing from ${this._currentState} to ${e}`);let t=this._currentState;this._currentState=e;try{this._leaveState(t,e),this._maybeStartStuckStateTimeout(e),this._stateChanged(),this._runState(e,t)}catch(e){if(this._error("Caught an error while trying to change states",e instanceof Error?e:void 0),this._currentState===G.tV.ERROR)this._error("we were already trying to change to an error state; unsure how to proceed");else{this._info("will switch to ERROR in 1000 ms"),clearTimeout(this._errorSetStateTimeout);let e=this._currentState;this._errorSetStateTimeout=window.setTimeout(()=>{(this._errorSetStateTimeout=void 0,this._currentState!==e)?this._info(`will NOT switch to error because current state is ${this._currentState} when we expected ${e}`):(this._info("switching to ERROR just in case"),this._setState(G.tV.ERROR))},1e3)}}}_awaitReconnection(){return new c.S((e,t)=>{this._dispatchToUse(j.A).then(e).catch(t)})}_maybeDispatchTroubleConnectingAction(){if(this._didDispatchTroubleConnecting&&this._didCountTroubleConnecting||this._connectFailureCount<this._getConnectionAttemptCountTroubleThreshold()||!this._firstConnectFailureTs)return;let e=Date.now()-this._firstConnectFailureTs;e<this._getConnectionTroubleThreshold()||(!this._didCountTroubleConnecting&&this._connectFailureCount>=3&&e>=3e4&&(this._telemeter.count("sm_flow_trouble_connecting_10"),this._didCountTroubleConnecting=!0),this._didDispatchTroubleConnecting||(this._didDispatchTroubleConnecting=!0,this._info("will dispatch troubleConnectingSig"),this._dispatchTroubleConnectingAction()))}_maybeStartStuckStateTimeout(e){this._maybeCancelStuckStateTimeout();let t={[G.tV.CONNECTED]:1/0,[G.tV.ASLEEP]:1/0,[G.tV.HALTED]:1/0,[G.tV.FAST_RECONNECTING]:2e4,[G.tV.PROV_CONNECTING]:35e3,[G.tV.PROV_CONNECTED]:6e4,[G.tV.CHECKING_FAST_RECONNECT]:6e4,[G.tV.WAIT_FOR_CONNECTIVITY]:3e5,[G.tV.WAIT_FOR_RATE_LIMIT]:12e4}[e]||1e4;this._info(`will stay in ${e} state for up to ${t} ms`),t!==1/0&&(this._stuckStateTimer=window.setTimeout(()=>{e!==this._currentState?this._error(`Incorrect stuck status: Socket is no longer in ${e}, currently in ${this._currentState}.`):(this._warn(`Closing socket because we spent ${t} ms in ${e} state; giving up`),e===G.tV.PROV_CONNECTED&&(this._dispatchProvisionallyConnectedTimeout(),this._telemeter.count("sm_flow_prov_timeout_10")),this._closeSocket(4107),this._setState(G.tV.ERROR),this._telemeter.count("sm_flow_stuck_10"),this._telemeter.count(`sm_flow_stuck_${e}_10`))},t))}_maybeSetFailoverMode(){if(this._failoverMode)return;let e=this._hasConnected?3:1;(this._connectFailureCount>=e||this._didDispatchTroubleConnecting)&&(this._failoverMode=!0,this._setFailoverMode(!0),this._telemeter.count("sm_flow_failover_mode"),this._info(`Failed to connect ${this._connectFailureCount} times; going into failover mode until we connect`))}_maybeCancelStuckStateTimeout(){this._stuckStateTimer&&(clearTimeout(this._stuckStateTimer),this._stuckStateTimer=void 0)}_maybeToggleRegion(){this._failoverMode&&(this._useBackupRegion=!this._useBackupRegion,this._setShouldUseBackupRegion(this._useBackupRegion))}_getConnectionTroubleThreshold(){return 3e4*!!this._hasConnected}_getConnectionAttemptCountTroubleThreshold(){return this._hasConnected?3:1}_maybeMeasureReliabilityMetrics(e){this.shouldMeasureReliabilityMetrics()&&e.tap(e=>{this._successfulQueryCount+=1;let t=JSON.stringify(e).length;this._responseSizes.push(t)}).catch(e=>{e&&e.message===V.qk||(this._failedQueryCount+=1)})}_clearErrorCount(){this._connectFailureCount=0,this._firstConnectFailureTs=void 0}_error(e,t){this._logger.error(Q,e,t)}_info(e){this._logger.info(Q,e)}_warn(e){this._logger.warn(Q,e)}};var X=a(0x209e067d1),ee=a(0x691ce3ab),et=a(0x1df746993),ea=a(0x99e4d4e6),en=a(0x17a41206b),er=a(0x357cac43),ei=a(0x185ca5bfc),el=a(0xe822f938);let eo=getSocketUrlFromState,es=d.kv,ec=N.wb,ed={};Object.defineProperty(ed,"getSocketUrlFromState",{get:()=>eo,set:e=>{eo=e}}),Object.defineProperty(ed,"isBrowserOnline",{get:()=>es,set:e=>{es=e}}),Object.defineProperty(ed,"shouldUseSocket",{get:()=>ec,set:e=>{ec=e}});let SocketManager=class SocketManager extends BaseSocketManager{constructor(e,t,a){super(e,t,a),this._dispatchReduxAction=this._dispatchReduxAction.bind(this),this._telemeter.count("initializing_regular_socket_v1")}_setFailoverMode(e){this._dispatchReduxAction((0,ei._7)(e))}_setShouldUseBackupRegion(e){this._dispatchReduxAction((0,ei.rx)(e))}_setConnected(e){let t=e===G.tV.FAST_RECONNECTING;this._dispatchReduxAction((0,ei.aW)(t))}_isClientOnline(){let e=(0,z.$D)(this._teamId);return(0,en.Pb)(e)}_dispatchReduxAction(e){return(0,z.Qw)(this._teamId,e)}_isWindowFocused(){let e=(0,z.$D)(this._teamId);return!!(0,el.ko)(e)}_handleUnexpectedSocketClosure(){this._dispatchReduxAction((0,ei.Yv)())}_handleSocketConnected({useFlannel:e,region:t}={useFlannel:!0,region:""}){if($&&this._connectStartTs){let a=this._currentState===G.tV.FAST_RECONNECTING?"frt":"full",n=e?`flannel_${t}_${a}`:`faded_flannel_${t}_${a}`;this._telemeter.store(`sm_connect_to_hello_time_${n}`,Date.now()-this._connectStartTs)}this._dispatchToUse(ea.hM),super._handleSocketConnected()}_handleSocketErrorMessageReceived(e){this._dispatchReduxAction((0,ei._f)(e))}_handleSocketMessageReceived(e){try{(0,R.GC)({teamId:this._teamId,msg:e})}catch{}(0,P.lI)(this._teamId,[e]),(0,u.mo)(this._teamId,e),(0,et.V3)(this._teamId,this._currentState)}_handleDisconnectedSocket(){this._dispatchReduxAction((0,ei.ux)())}_handleWaitingForRateLimit(e){this._dispatchReduxAction((0,ei.uy)(e))}_shouldUseSocket(){let e=(0,z.$D)(this._teamId);return ec(e)}_setLastConnectedPrimaryRegion(e){this._dispatchReduxAction((0,ei.Su)(e))}_handleProvisionallyConnected(){this._dispatchReduxAction((0,ei.tM)())}_stateChanged(){this._dispatchReduxAction((0,ei.Sx)(this._currentState))}async _getConnectionUrl({baseUrl:e,useBackup:t}){let a=(0,z.$D)(this._teamId);return eo(a,{baseUrl:e,useFallback:t})}_updateLastSocketActivity(){this._dispatchReduxAction((0,ea.Uj)())}_shouldSleepWake(){return(0,m.y3)()}_shouldStartAsleep(){return!!this._shouldSleepWake()&&!((0,er.LV)((0,ee.en)().getState())??!0)}_dispatchToUse(e){return(0,X.A)()?(0,ee.dispatchForClientStore)(e()):this._dispatchReduxAction(e())}_dispatchTroubleConnectingAction(){this._dispatchReduxAction((0,ei.SF)()),this._telemeter.count("socket_trouble_connecting")}_dispatchProvisionallyConnectedTimeout(){this._dispatchReduxAction((0,ei.Iv)())}};var em=a(0x7438c14),eu=a(0x11c82607b),ep=a(0x1ff9f365c);let createSocketManager=(e,t,a)=>new SocketManager(e,t,a);Object.defineProperty({createSocketManager},"createSocketManager",{get:()=>createSocketManager,set:e=>{createSocketManager=e}});let eh=(0,eu.Ay)("Initialize Socket Manager instance",(e,t,a)=>{let n,r,d;c.S.resolve().then(()=>{e((0,ep.G2)()),e((0,et.Bj)())});let m=t(),u=(0,T.ZT)(m),p=(0,E.Ay)({teamOrEnterpriseId:u,label:"SOCKET-MANAGER-MIDDLEWARE"});if((0,em.iE)(u))throw Error("Received start action when have already created a Socket Manager instance; this is a programming error");"object"==typeof a?(n=a.token,r=a.fastReconnectUrl,d=a.fastReconnectUrlReceivedAtTime):n=a;let h=createSocketManager(n,r,d);(0,em.WG)(u,h),h.start(),p.info("Initialized Socket Manager instance"),(0,s.GW)(u,"socketManager",h),h.shouldMeasureReliabilityMetrics()&&setInterval(()=>{let{totalQueryCount:e,successfulQueryCount:a,failedQueryCount:n,responseSizes:r}=h.getStats();if(!e)return;let s=(0,i.A)(r)||0,c=(0,l.A)(r)||0,d=(0,q.Cy)({getState:t});d.count("ws_sr_total_queries_0",e),d.count("ws_sr_successful_queries_0",a),d.count("ws_sr_failed_queries_0",n),d.count("ws_sr_avg_response_size_0",(0,o.A)(s,4)),d.count("ws_sr_max_response_size_0",c),h.clearStats()},6e4)});async function connectToSocket({store:e,contextualInfo:t}){let{token:a,teamId:n}=t;return n&&((0,r.IH)(n),e.dispatch(eh(a))),{store:e,contextualInfo:t}}eh.meta={name:"start",key:"createThunkStart",description:"Initialize Socket Manager instance"}},0x1967c6e0c:(e,t,a)=>{"use strict";a.r(t),a.d(t,{bootData:()=>i.A,channels:()=>s.Ay,experiments:()=>l.A,members:()=>c.Ay,presence:()=>d.Ay,route:()=>r.A,selfTeamIds:()=>n.A,sideEffects:()=>o.A});var n=a(0xf93c2cec),r=a(0x11a8d2a3d),i=a(0x15567493f),l=a(0x1d8169534),o=a(0x28be8432),s=a(0x5c3977a6),c=a(0x24d31328f),d=a(0x11cad2003)},0x65ad62a8:(e,t,a)=>{"use strict";a.d(t,{H:()=>clearAllPersistedDataForUserId,Z:()=>clearAllPersistedDataExceptForTeamIds});var n=a(0xe0cd1761),r=a(0x14a2ffd1d);function clearAllPersistedDataForUserId({teamId:e,userId:t}){return(0,r.Tn)(e).finally(()=>(0,n.JZ)({teamId:e,userId:t}))}async function clearAllPersistedDataExceptForTeamIds(e){if(!Array.isArray(e))throw Error("teamIds in clearAllPersistedDataExceptForTeamIds must be an array");return(0,r.aw)(e).finally(()=>(0,n.Jv)(e))}},0xe0cd1761:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getImmediatelyPersistedState,JZ:()=>clearImmediatelyPersistedStateForUserId,Jv:()=>clearImmediatelyPersistedStateExceptForTeamIds});var n=a(0x20bafd237),r=a(0x77727995),i=a(0x13d24b8d1),l=a(0x4a7c6275),o=a(0x60b3d20),s=a(0x3c419559),c=a(0x963994f4),d=a(0x1c5304369),m=a(0x1ec68d6a3);let u="get-immediately-persisted-state",getReducerKey=e=>(0,n.A)(e.split("::")),getReducerByKey=(e,t)=>{let a=t.replace(/\./g,`.${d.E7}.`);return(0,r.A)(e,a)};function getLocalStorageKeys(){return Object.keys(localStorage)}function getImmediatePersistKeysForClient(){return getLocalStorageKeys().filter(e=>(0,d.Rj)({key:e}))}function getImmediatePersistKeysForTeamId({teamId:e}){return getLocalStorageKeys().filter(t=>(0,d.G0)({key:t,teamId:e}))}let getImmediatePersistKeysForUserId=({teamId:e,userId:t})=>getLocalStorageKeys().filter(a=>(0,d.Em)({teamId:e,userId:t,key:a}));function getImmediatelyPersistedState({teamId:e,userId:t,reducerConfig:a,state:n={}}){if(!(0,l.A)("localStorage")||!e||!t)return n;let r=(0,m.Ay)({teamId:e});return getImmediatePersistKeysForUserId({teamId:e,userId:t}).forEach(t=>{let l,m=getReducerKey(t);if(!m)return void r.error(Error("No reducer key found for local storage key"),{localStorageKey:t});let p=getReducerByKey(a,m);if(!(0,d.wD)(p))return;try{let e=localStorage.getItem(t);if(!e)return void r.error(Error("No object found for local storage key"),{localStorageKey:t});l=JSON.parse(e)}catch{(0,s.H)({successState:!1,spanName:u})}l=(0,c.U)(l,p.initialState||{});let h=(0,d.ZY)(p);h&&(l=h(l,e)),(0,o.M)({logger:r,reducer:p,reducerKey:m,reducerState:l,teamId:e})&&(0,i.A)(n,m,l)}),(0,s.H)({successState:!0,spanName:u}),n}function clearImmediatelyPersistedStateForUserId({teamId:e,userId:t}){let a=(0,m.Ay)({teamId:e,label:"LOCAL_STORAGE_CLEAR"});a.info(`Purging all data in localStorage for user ${t}, teamId ${e}...`),e&&(getImmediatePersistKeysForUserId({teamId:e,userId:t}).forEach(e=>localStorage.removeItem(e)),a.info(`localStorage purging for user ${t}, teamId ${e} is complete!`))}function clearImmediatelyPersistedStateExceptForTeamIds(e){if(!Array.isArray(e))throw Error("teamIds in clearImmediatelyPersistedStateExceptForTeamIds must be an array");let t=getImmediatePersistKeysForClient(),a=e.reduce((e,t)=>{let a=getImmediatePersistKeysForTeamId({teamId:t});return e.concat(a)},[]);t.filter(e=>!1===a.includes(e)).forEach(e=>localStorage.removeItem(e))}let p={getReducerKey,getReducerByKey,getLocalStorageKeys:void 0,getImmediatePersistKeysForClient:void 0,getImmediatePersistKeysForTeamId:void 0};Object.defineProperty(p,"getLocalStorageKeys",{get:()=>getLocalStorageKeys,set:e=>{getLocalStorageKeys=e}}),Object.defineProperty(p,"getImmediatePersistKeysForClient",{get:()=>getImmediatePersistKeysForClient,set:e=>{getImmediatePersistKeysForClient=e}}),Object.defineProperty(p,"getImmediatePersistKeysForTeamId",{get:()=>getImmediatePersistKeysForTeamId,set:e=>{getImmediatePersistKeysForTeamId=e}})},0x60b3d20:(e,t,a)=>{"use strict";a.d(t,{M:()=>isReducerStateValid});var n=a(0x1c5304369),r=a(0x2780f09f),i=a(0x12e383cfb);function isReducerStateValid({enterpriseId:e,logger:t,reducer:a,reducerKey:i,reducerState:l,teamId:o}){let s=`${n.Is}${i}`;if((0,r.E)(s)&&!(0,r.i)(s,l,{logErrorOnFailure:!1}))return beaconStoreInvalidation({enterpriseId:e,method:"schema",reducerKey:i,teamId:o}),t.info(n.JY,`${i} persisted data does not pass schema validation, throwing away persisted data for it`),!1;let{validateFn:c}=(0,n.jZ)(a)||{};return!c||!!c(l)||(beaconStoreInvalidation({enterpriseId:e,method:"validateFn",reducerKey:i,teamId:o}),t.info(n.JY,`${i} persisted data does not pass validateFn validation, throwing away persisted data for it`),!1)}function beaconStoreInvalidation({enterpriseId:e,method:t,reducerKey:a,teamId:n}={}){let r=(0,i.F)(),l=r.createMetricsTrace({label:"redux-persistence"});l.count({name:"store-invalidated"}).addTags({team_id:n,enterprise_id:e,method:t,store:a}),r.reportTrace(l)}},0x963994f4:(e,t,a)=>{"use strict";function setReducerStateDefaults(e,t){return null==e?t:!t||"object"!=typeof e||Array.isArray(e)?e:{...t,...e}}a.d(t,{U:()=>setReducerStateDefaults})},0x1098edadd:(e,t,a)=>{"use strict";a.d(t,{_:()=>et});var n=a(0xb041cb4d),r=a(0x1384f171),i=a(0xe0376d2),l=a(0xf8dd7f80),o=a(0x22ceff42e),s=a(0xc371e63c),c=a(0x11c82607b),d=a(0x105f056cd),m=a(0x168994719),u=a(0x5294713e);let p=(0,l.getGenericLogger)({label:"BOOT"}),h=(0,c.Ay)("Fetch selected boot elements from client.extras",async e=>{let t=(0,i.A)((0,s.I)());if(0===t.length)return void p.info("No client.extras to fetch");p.info("Fetching client.extras",{extras:t});let a=await e((0,o.E)({extras:t,reason:"fetch-client-extras"}));return a.salesforce_features&&e((0,u.V5)(a.salesforce_features)),a.team_prefs&&e((0,m.i)({clientExtrasTeamPrefs:a.team_prefs})),a.plan_info&&e((0,d.M)(a.plan_info)),a});h.meta={name:"fetchClientExtras",key:"createThunkFetchClientExtras",description:"Fetch selected boot elements from client.extras"};var _=a(0x45a875a6),f=a(0x13404c1ac),b=a(0x1ac169e62),g=a(0x840597c2);let y=(0,c.Ay)("fetch and upsert priority user ids to priority store",(e,t,{reason:a})=>{e((0,b.K)({reason:a})).then(t=>{if(!t.ok)return;let a=t.users.manual_provenance;e((0,g.BY)({userIds:a}))})});y.meta={name:"fetchAndUpsertPriorityUsers",key:"createThunkFetchAndUpsertPriorityUsers",description:"fetch and upsert priority user ids to priority store"};var A=a(0x18fe5b996),x=a(0xbb590ca7),E=a(0x17d261fbd),C=a(0x214f0471d),k=a(0x14149c126),v=a(0x225dac9b1),S=a(0x180230774),I=a(0x10bb8e96f);let w=(0,c.Ay)("fetch user owned triggers, where user is owner or collaborator",async(e,t)=>{let a=await e((0,S.l8)({query:void 0,filters:{},sort:"desc",cursorMark:void 0}));e((0,I.Wg)({triggers:a?.items??[]}))});w.meta={name:"fetchUserOwnedTriggers",key:"createThunkFetchUserOwnedTriggers",description:"fetch user owned triggers, where user is owner or collaborator"};var T=a(0x70de3606),N=a(0x21d4b7fa9);let M=(0,c.Ay)("Maybe fetches user lists data",(e,t,{reason:a})=>{let n=t();(0,T.hk)(n)&&e((0,N.E)({reason:a}))});M.meta={name:"maybeFetchLists",key:"createThunkMaybeFetchLists",description:"Maybe fetches user lists data"};var R=a(0x1f3226107),P=a(0x382cbff6),L=a(0x1ccef1c6f),O=a(0x2503ae161),D=a(0x18d7b9b56);let F=(0,c.Ay)("Maybe fetches my task list",async(e,t)=>{let a=t();if(!(0,T.tl)(a)&&!(0,P.d9)(a))return;let n=(0,L.N$)(a),r=n?.[0]??void 0;r&&e((0,R.B2)({fileId:r,reason:"fetch-my-tasks-list"})).then(async()=>{await e((0,D.D)({listId:r})),e((0,O.g)())})});F.meta={name:"maybeFetchMyTasksList",key:"createThunkMaybeFetchMyTasksList",description:"Maybe fetches my task list"};var U=a(0x22ef89887),B=a(0xafce781a),H=a(0x203f8f1b),W=a(0x214517841),V=a(0xbc562055);a(0x1b4ecf8e7);var G=a(0x20085de45);let q=(0,c.Ay)("Fetch and upsert user expectations last triggered pref",async e=>{let t=await e((0,V.jH)({prefs:["user_expectations_survey_last_trigger_attempt"],reason:"fetch-user-expectation-last-triggered-pref"}));t?e((0,G.it)(t)):(0,l.getGenericLogger)().warn("Failed to fetch user expectation last triggered pref")});q.meta={name:"loadUserExpectationLastTriggeredPref",key:"createThunkLoadUserExpectationLastTriggeredPref",description:"Fetch and upsert user expectations last triggered pref"};var j=a(0x91e15f37),z=a(0x1ac1baa29),K=a(0x8a3a3e01),$=a(0x18daa0163),Y=a(0xd0d1ff6b);let Q=(0,c.Ay)("Fetch saved searches",(e,t,{reason:a})=>e((0,$.z)({reason:a})).then(t=>{t.ok&&t.saved_searches&&e((0,Y.qd)({savedSearches:t.saved_searches}))}));Q.meta={name:"fetchSavedSearches",key:"createThunkFetchSavedSearches",description:"Fetch saved searches"};let Z=(0,c.Ay)("Maybe fetch saved searches",(e,t)=>{let a=t();"on"===(0,k._Z)(a,"saved_search")&&e(Q({reason:"maybe-fetch-saved-searches-on-boot"}))});Z.meta={name:"maybeFetchSavedSearches",key:"createThunkMaybeFetchSavedSearches",description:"Maybe fetch saved searches"};var J=a(0x1cc14e4db),X=a(0x18a17ca8f),ee=a(0x1357599a2);let et=(0,c.Ay)("Fetch deferred data for messaging clients",(e,t,{reason:a,megaphoneReason:i,isForegroundTeam:l})=>{let o=t(),s=(0,r.Q3)(o);(0,_.cR)()||e(h()),e((0,H.yh)()),e((0,E.A)({preserveCache:!0,reason:a})),e((0,C.u)({caller:a})),e((0,v.P)()),e(w());let c="on"===(0,k._Z)(o,"ai_apps_list_fe"),d="on"===(0,k._Z)(o,"ai_apps_list_split_sidekicks");!l||(0,X.Li)(o)||(0,J.S6)(o)||e((0,B.yJ)({megaphoneReason:i})).then(()=>e((0,U.Py)())),e((0,z.A)({reason:a})).then(()=>{(0,j.S8)(t())&&e((0,K.D)())}),e((0,W.g)()),e(q()),e(M({reason:a})),e(F()),(0,n.Gn)(t())&&e(y({reason:"fetch-priority-users-on-boot-render"})),s&&e((0,f.a)({reason:"fetch-deferred-messaging-client-data"})),e((0,A.n)({reason:"fetch-deferred-messaging-client-data",useBackendCache:!0})),c&&(d?(e((0,x.L)({reason:"fetch-deferred-messaging-client-data-1",excludeSidekick:!0})),e((0,x.L)({reason:"fetch-deferred-messaging-client-data-2",sidekickOnly:!0,loadInBackground:!0}))):e((0,x.L)({reason:"fetch-deferred-messaging-client-data",onlyfetchIfMissing:!0}))),e(Z()),e((0,ee.U)())});et.meta={name:"fetchedDeferredMessagingClientData",key:"createThunkFetchedDeferredMessagingClientData",description:"Fetch deferred data for messaging clients"}},0x1d1de3ca5:(e,t,a)=>{"use strict";a.d(t,{G:()=>eS});var n,r=a(0xdb4e8459),i=a(0x11c82607b),l=a(0x172f17a0b),o=a(0x1c252c976),s=a(0x1416f5ec2),c=a(0x1266f1359),d=a(0x36db9c4e),m=a(0x109246c07),u=a(0x986c27f7),p=a(0x185ca5bfc);let h=(0,i.Ay)("tear down client for removed workspaces",(e,t,{payload:a})=>{a.forEach(e=>{(0,c.Qw)(e,(0,l.ib)())})});h.meta={name:"internalWorkspacesRemovedClientTearDownHandler",key:"createThunkInternalWorkspacesRemovedClientTearDownHandler",description:"tear down client for removed workspaces"};let _=(0,s.fs)([r.internalWorkspacesRemoved],h),f=(0,i.Ay)("tear down client when removing a workspace",(e,t,{payload:a})=>{(0,c.Qw)(a,(0,l.ib)())});f.meta={name:"internalRemoveWorkspaceClientTearDownHandler",key:"createThunkInternalRemoveWorkspaceClientTearDownHandler",description:"tear down client when removing a workspace"};let b=(0,s.fs)([r.internalRemoveWorkspace],f),g=(0,i.Ay)("subscribe to document events when connected",(e,t,a)=>{let n=t();(0,m.oj)(n).forEach(t=>{let a=(0,u.R)(n,t);if(a){let r=Date.now();e((0,d.T)({fileId:a,lastUpdatedTimeInMs:r})),o.R.get(n)?.onReceiveDocumentEvent(t,"","backlog")}})});g.meta={name:"subscribeToDocumentEventsHandler",key:"createThunkSubscribeToDocumentEventsHandler",description:"subscribe to document events when connected"};let y=(0,s.fs)([p.aW],g);var A=a(0xbe0b63ff),x=a(0x6c6f5902),E=a(0x2291c5d37),C=a(0x9cdedc15);let k=(0,i.Ay)("Upsert a Quip thread ID for a given file ID",(e,t,{fileId:a,quipThreadId:n})=>e((0,C.iJ)({objects:[{id:a,quipThreadId:n}]})));k.meta={name:"upsertQuipIdForFileId",key:"createThunkUpsertQuipIdForFileId",description:"Upsert a Quip thread ID for a given file ID"};var v=a(0x218771dd5);let S=(0,i.Ay)("addFileIdsHandler",(e,t,{payload:{objects:a}})=>{a.forEach(a=>{if((0,A.lv)(a))return;let{id:n,fileId:r}=a;(0,E.X)(t(),r,!1)!==n&&e(k({fileId:r,quipThreadId:n}))})});S.meta={name:"addFileIdsHandler",key:"createThunkAddFileIdsHandler",description:"addFileIdsHandler"};let I=(0,s.fs)([v.Gc],S),w=(0,i.Ay)("addThreadIdsHandler",(e,t,{payload:{objects:a}})=>{let n=[];a.forEach(e=>{if((0,A.lv)(e))return;let{id:a,quipThreadId:r}=e;(0,u.R)(t(),r)!==a&&n.push({id:r,fileId:a})}),n.length&&e((0,v.Gc)({objects:n}))});w.meta={name:"addThreadIdsHandler",key:"createThunkAddThreadIdsHandler",description:"addThreadIdsHandler"};let T=(0,s.fs)([x.qJ],w);var N=a(0xc26f5c40),M=a(0x7d48dd65),R=a(0x20ef3966f),P=a(0x303de21b),L=a(0x1ec69ee01),O=a(0x12185e091),D=a(0xbd3de346),F=a(0x9b971e7e),U=a(0x11248a541),B=a(0x217553e42),H=a(0x8468bab2),W=a(0x14ea3ce99),V=a(0xaa8c4ddd),G=a(0x174a5556e),q=a(0x3fb00b9a);let j=(0,i.Ay)("addMessagesHandler",(e,t,{payload:a})=>{let n=(0,F.ZT)(t());if(!n)return;let r=(0,M.A)(a,e=>!!e.document_unfurl),i=(0,R.A)(r,e=>({type:N.SlackObjectType.UNFURL,teamId:n,id:e.ts,channelId:e.channel}));i.length&&U.xk.get(t())?.onSlackObjectsUpdated(i)});j.meta={name:"addMessagesHandler",key:"createThunkAddMessagesHandler",description:"addMessagesHandler"};let z=(0,i.Ay)("addCanvasEphemeralMessagesHandler",(e,t,{payload:a})=>{let n=(0,F.ZT)(t());if(!n)return;let r=(0,R.A)(a,({originalMsgTs:e,channelId:t})=>({type:N.SlackObjectType.UNFURL,teamId:n,id:e,channelId:t}));r.length&&U.xk.get(t())?.onSlackObjectsUpdated(r)});z.meta={name:"addCanvasEphemeralMessagesHandler",key:"createThunkAddCanvasEphemeralMessagesHandler",description:"addCanvasEphemeralMessagesHandler"};let K=(0,i.Ay)("removeShareFromFileHandler",async(e,t,{payload:a})=>{if(!(0,F.ZT)(t()))return;let n=(0,W.Lp)(t(),a.fileId);if(!(0,D.wL)(n))return;let r=await e((0,q.A)({fileId:a.fileId,reason:"update-share"}));if(!r)return;let i=N.SlackObjectType.DOCUMENT_USER_ACCESS;if("member"===a.entityType){let e={type:i,id:a.entityId,threadOrFileId:r,access:"not_found",isExplicitlySharedWith:!1};U.xk.get(t())?.receivedSlackObjects([e])}});K.meta={name:"removeShareFromFileHandler",key:"createThunkRemoveShareFromFileHandler",description:"removeShareFromFileHandler"};let $=(0,i.Ay)("shareFileHandler",async(e,t,{payload:a})=>{if(!(0,F.ZT)(t()))return;let n=(0,W.Lp)(t(),a.fileId);if(!(0,D.wL)(n))return;let r=await e((0,q.A)({fileId:a.fileId,reason:"update-share"}));if(!r)return;let i=N.SlackObjectType.DOCUMENT_USER_ACCESS,l=(0,B.OL)(t(),a.channelId);if((0,O.JM)(l)){let e=(0,L.Hd)(l);if(e){let a=e.map(e=>({type:i,id:e,threadOrFileId:r,access:"write",isExplicitlySharedWith:!0}));U.xk.get(t())?.receivedSlackObjects(a)}}else((0,O.Zp)(l)||(0,O.rW)(l))&&e((0,P.AD)({channelId:a.channelId})).then(e=>{let a=e.members.map(e=>({type:i,id:e.id,threadOrFileId:r,access:"write",isExplicitlySharedWith:!0}));U.xk.get(t())?.receivedSlackObjects(a)})});$.meta={name:"shareFileHandler",key:"createThunkShareFileHandler",description:"shareFileHandler"};let Y=(0,s.fs)([V.Kc],j),Q=(0,s.fs)([G.DU],z),Z=(0,s.fs)([H.cy],K),J=(0,s.fs)([H.s8],$);var X=a(0xe8efe2c1),ee=a(0x21d6ed371);let et=(0,i.Ay)("addMessagesHandler",(e,t,{payload:a})=>{let n=t(),r=[];(0,R.A)(a,e=>{let t=(0,ee.DL)(e),a=(0,ee.WY)(e),i=a?(0,X.f)(n,a):"",l=i?(0,W.Lp)(n,i,!1):null,o=!l||(0,A.mX)(l)||(0,D.DQ)(l);t&&a&&o&&r.push({originalMsgTs:t,ephemeralMsgTs:e.ts,channelId:e.channel})}),r.length&&e((0,G.DU)(r))});et.meta={name:"addMessagesHandler",key:"createThunkAddMessagesHandler",description:"addMessagesHandler"};let ea=(0,i.Ay)("deleteMessagesHandler",(e,t,{payload:a})=>{let n=a?.ts;(0,F.JY)(t())&&n&&(e((0,G.hk)({originalMsgTs:n})),e((0,G.Bv)({ephemeralMsgTs:n})))});ea.meta={name:"deleteMessagesHandler",key:"createThunkDeleteMessagesHandler",description:"deleteMessagesHandler"};let en=(0,s.fs)([V.Kc],et),er=(0,s.fs)([V.QN],ea);var ei=a(0x937c068d),el=a(0x158809687),eo=a(0x1d43eb6d7),es=a(0xc60c25fe),ec=((n={}).PRIVATE_MESSAGE="privateMessage",n.UNKNOWN="unknown",n);let ed=(0,i.Ay)("addMessagesHandler",(e,t,{payload:a})=>{let n=t();if(!(0,F.JY)(n))return;let r=(0,eo.Ay)({getState:t});(0,R.A)(a,t=>{if(t.is_ephemeral){if((0,el.n)(t))return;let{channel:a}=t,i=(0,X.f)(n,a),l=t.ts;r.info(ei.o7,`Ephemeral message with timestamp:${l} in file channel for fileId:${i}`),(0,ei.Qx)(t)===ei.II.PRIVATE_MESSAGE&&(r.info(ei.o7,`Private message unfurl ephemeral message with timestamp:${l} in file channel for fileId:${i}`),e((0,es.c)({fileId:i,messageTs:l,unfurlType:ec.PRIVATE_MESSAGE})))}})});ed.meta={name:"addMessagesHandler",key:"createThunkAddMessagesHandler",description:"addMessagesHandler"};let em=(0,i.Ay)("deleteMessagesHandler",(e,t,{payload:a})=>{let{ts:n,channel:r}=a.message,i=t(),l=r&&(0,X.f)(i,r),o=(0,eo.Ay)({getState:t});n&&l&&(o.info(ei.o7,`Maybe remove ephemeral message with timestamp: ${n}`),e((0,es.l)({fileId:l,messageTs:n})))});em.meta={name:"deleteMessagesHandler",key:"createThunkDeleteMessagesHandler",description:"deleteMessagesHandler"};let eu=(0,s.fs)([V.Kc],ed),ep=(0,s.fs)([V.QN],em);var eh=a(0x66a0f59a),e_=a(0x99e4d4e6),ef=a(0x59ac6c23),eb=a(0x3e050aef);let eg=(0,i.Ay)("toggleOnline side effect handler",(e,t,{payload:a})=>{e(a?(0,eb.iG)():(0,eb.lm)())});eg.meta={name:"toggleOnline",key:"createThunkToggleOnline",description:"toggleOnline side effect handler"};let ey=(0,s.fs)([e_.pm,e_.p9],eg),eA=(0,i.Ay)("Socket trouble connecting side effect handler",e=>{e((0,eb.mR)())});eA.meta={name:"setDegradedMode",key:"createThunkSetDegradedMode",description:"Socket trouble connecting side effect handler"};let ex=(0,i.Ay)("Socket connected side effect handler",e=>{e((0,eb.ps)())});ex.meta={name:"clearDegradedMode",key:"createThunkClearDegradedMode",description:"Socket connected side effect handler"};let eE=(0,s.fs)([p.aW,p.tM],ex),eC=(0,s.fs)([p.SF],eA),ek=(0,i.Ay)("addMessagesHandler",(e,t,{payload:a})=>{let n=t();(0,R.A)(a,t=>{if(!(0,ee.DL)(t)&&(0,ee.aw)(t)){let a=(0,ef.gG)(n,t.ts),r=(0,eh.A)(t);if(!a&&!r){let a=(0,X.f)(n,t.channel);e((0,eb.Z)({fileId:a,messageTs:t.ts}))}}})});ek.meta={name:"addMessagesHandler",key:"createThunkAddMessagesHandler",description:"addMessagesHandler"};let ev=(0,i.Ay)("deleteMessagesHandler",(e,t,{payload:a})=>{let n=a?.ts,r=a?.channel,i=r&&(0,X.f)(t(),r);n&&i&&e((0,eb.C8)({fileId:i,messageTs:n}))});ev.meta={name:"deleteMessagesHandler",key:"createThunkDeleteMessagesHandler",description:"deleteMessagesHandler"};let eS=[I,T,Y,Q,Z,J,_,b,y,en,er,ey,eE,eC,(0,s.fs)([V.Kc],ek),(0,s.fs)([V.QN],ev),eu,ep]},0x177e0ca26:(e,t,a)=>{"use strict";let n,r;a.d(t,{TiW:()=>pD.accessibility,O9O:()=>pD.accessibilityPersistent,I5D:()=>pD.accountTypePermissions,X90:()=>pD.accountTypes,rZ0:()=>pD.actionItems,Oib:()=>pD.activeDownloads,EbG:()=>pD.activity,UGD:()=>pD.activityIA4,j_n:()=>pD.addToMpdmHistoryPreview,E1g:()=>pD.adminAdvisor,s7Y:()=>pD.adminAppFunctions,iuw:()=>pD.adminAppsConfigLookupInfo,cA2:()=>pD.adminAppsLookupInfo,v_v:()=>pD.adminAppsManage,arh:()=>pD.adminAppsRequests,t7p:()=>pD.adminContext,CXZ:()=>pD.adminExportApps,i2r:()=>pD.adminFeatureAccess,hVH:()=>pD.adminFunctionsPermissions,t5S:()=>pD.adminHome,uV:()=>pD.adminInvites,nar:()=>pD.adminMembers,p81:()=>pD.adminRoles,ZVQ:()=>pD.adminTriggerTypesPermissions,roT:()=>pD.adminUserGroups,QWw:()=>pD.adminWorkflowsPermissions,iH5:()=>pD.agentBrowser,J09:()=>pD.agentHome,Xuq:()=>pD.agentThreads,zuB:()=>pD.aiApps,RqC:()=>pD.aiComposer,G7j:()=>pD.aiExplain,oP2:()=>pD.aiMemories,_Yw:()=>pD.aiProfile,COF:()=>pD.aiSearchSuggestions,VA6:()=>pD.aiSummary,vCL:()=>pD.aiTranslations,vVb:()=>pD.allCalls,q2d:()=>pD.allDMs,HHB:()=>pD.allThreads,IrP:()=>pD.allUnreads,E9w:()=>pD.analyticsOverview,tRc:()=>pD.appActions,f1w:()=>pD.appCollaborators,UOF:()=>pD.appConfig,zDz:()=>pD.appConnections,vuJ:()=>pD.appContext,shR:()=>pD.appDefaultScopes,Qew:()=>pD.appGlobalActions,XmI:()=>pD.appHomeContextTeam,Bct:()=>pD.appHomesMeta,YBP:()=>pD.appLauncher,Xhf:()=>pD.appManifest,d$q:()=>pD.appOrgAwareness,OmU:()=>pD.appPermissions,MM8:()=>pD.appProfiles,Axc:()=>pD.appRecommendations,PF5:()=>pD.appSettings,qLC:()=>pD.appSuggestedPrompts,Qnt:()=>pD.appTabs,qHg:()=>pD.appViews,bcS:()=>pD.approvals,lAu:()=>pD.apps,R9Q:()=>pD.appsAnalytics,LEA:()=>pD.appsIndex,emk:()=>pD.appsProfileLookupInfo,Apj:()=>pD.assistantThreads,smE:()=>pD.awareness,kfr:()=>pD.bbm,vhB:()=>pD.bbmSettings,cRx:()=>pD.blockFileDownload,kCL:()=>pD.blockKit,kNt:()=>pD.blockKitModals,UdH:()=>pD.blockKitModalsWindow,FJo:()=>pD.blockKitState,xL4:()=>pD.blockUnfurls,Y9m:()=>pD.blockedSlackConnectEmails,FL1:()=>pD.bookmarksStore,LN8:()=>pD.bootData,Pkb:()=>pD.bots,CRi:()=>pD.botsMetadata,yMv:()=>pD.browseRecent,Ow4:()=>pD.browsers,BJj:()=>pD.calendar,avB:()=>pD.calendarEvents,dvW:()=>pD.calendarPrefs,bcp:()=>pD.canInteract,dbC:()=>pD.canvasEmbeds,xGj:()=>pD.canvasTopicSuggestions,jqY:()=>pD.cfm,tNj:()=>pD.channelActions,m0A:()=>pD.channelAnalytics,sIK:()=>pD.channelConnect,lR6:()=>pD.channelCursors,br1:()=>pD.channelEmails,gHN:()=>pD.channelHistory,qnX:()=>pD.channelInvites,ofW:()=>pD.channelJoin,emn:()=>pD.channelLatests,qG6:()=>pD.channelLoading,GKW:()=>pD.channelManagers,FSn:()=>pD.channelMgmt,_rD:()=>pD.channelMutationTimestamps,nzJ:()=>pD.channelNamesToIds,gX0:()=>pD.channelPrefixes,KvL:()=>pD.channelPrefs,M3R:()=>pD.channelSections,cD9:()=>pD.channelSidebar,BM7:()=>pD.channels,B4U:()=>pD.channelsPriority,JSR:()=>pD.checkoutFlow,tdL:()=>pD.clientTheme,XFb:()=>pD.clipAnalytics,bM6:()=>pD.clipsNux,OwJ:()=>pD.commsImpact,GSG:()=>pD.composerPage,Er1:()=>pD.composerToolbarButtonUI,xKr:()=>pD.connectInvites,K02:()=>pD.connectableContacts,WmP:()=>pD.connectedApps,U8Z:()=>pD.connectivity,SOJ:()=>pD.connectorAppsInfo,XMQ:()=>pD.consistency,$Pi:()=>pD.contextBar,Y3K:()=>pD.conversationsEligibility,re2:()=>pD.conversationsListPrefs,eCK:()=>pD.createRecord,Uau:()=>pD.crmProvisioning,WOQ:()=>pD.customStatus,eTk:()=>pD.customizeEmoji,kIq:()=>pD.decoratedWorkflowTemplates,WRX:()=>pD.deletedMessages,L_K:()=>pD.desktop,cl8:()=>pD.developerActions,jOB:()=>pD.device,Cdk:()=>pD.disconnectedUsers,WTe:()=>pD.dlpFileProcessing,its:()=>pD.dmBrowser,aPl:()=>pD.dmsTab,KRY:()=>pD.dmsToast,lY6:()=>pD.dndV2,BRr:()=>pD.downgradeStats,HCi:()=>pD.downmarketCrm,RS_:()=>pD.draftContactUnfurls,ohd:()=>pD.draftImageThumbnails,tvJ:()=>pD.draftOffline,mRz:()=>pD.draftPendingDestinations,F8N:()=>pD.draftPendingFileIds,gU1:()=>pD.draftSending,RYL:()=>pD.draftUnfurls,zLV:()=>pD.drafts,oOb:()=>pD.draftsExpansion,ymH:()=>pD.eac,b9C:()=>pD.ekmChanges,iW6:()=>pD.emailDomains,O74:()=>pD.emojiCollections,f23:()=>pD.enablePopupsBanner,vZp:()=>pD.endpoints,m8W:()=>pD.enterprisePrefs,DOU:()=>pD.enterpriseSearchSettings,cAP:()=>pD.environment,QDD:()=>pD.ephemeralMessages,fSf:()=>pD.eventlog,w6p:()=>pD.expandables,rCs:()=>pD.experiments,E_n:()=>pD.extSharedChannelTeams,UH_:()=>pD.externalConnectorFilters,Acb:()=>pD.externalConnectors,LXD:()=>pD.externalDirectory,a$E:()=>pD.externalFileProviders,vey:()=>pD.externalTeamIds,mEw:()=>pD.externalTeamsChannels,Hmy:()=>pD.featureAccess,mpH:()=>pD.feedback,CJ9:()=>pD.fileAclChanging,REL:()=>pD.filePermissions,oEX:()=>pD.fileRefresh,j04:()=>pD.fileShares,UMy:()=>pD.fileUpload,aqJ:()=>pD.files,bRB:()=>pD.filesFlexpane,cOG:()=>pD.flaggedContent,xd2:()=>pD.flannelEmoji,cFh:()=>pD.folderUpload,Y5J:()=>pD.fullscreen,AXk:()=>pD.fullscreenHistory,ci$:()=>pD.gifUnfurls,yjE:()=>pD.help,nL:()=>pD.hermesAiWorkflows,h2F:()=>pD.hermesAppsAuth,zDD:()=>pD.hermesFunctionAuth,yCu:()=>pD.hermesFunctions,OE2:()=>pD.hermesTriggerPreviews,QUj:()=>pD.hermesTriggers,Tzz:()=>pD.hermesWorkflowExecutions,Rzh:()=>pD.hermesWorkflows,zZ1:()=>pD.hermesWorkflowsOpenInSessionStore,$eq:()=>pD.hiddenUsers,D0U:()=>pD.huddleAnalytics,wZB:()=>pD.huddleEvents,HmQ:()=>pD.huddleHistory,qjg:()=>pD.huddlePage,qtL:()=>pD.huddleReadinessChecker,aMe:()=>pD.huddleScheduled,vpX:()=>pD.huddleTroubleshooting,efH:()=>pD.huddles,EOp:()=>pD.huddlesCanvas,Y1$:()=>pD.iaTheme,qG7:()=>pD.idpGroups,mLu:()=>pD.imAndMpimCount,VWk:()=>pD.imports,nD7:()=>pD.informationBarriers,tRG:()=>pD.inlineFilePreviews,jrI:()=>pD.integrationApps,Gnp:()=>pD.integrations,Gv3:()=>pD.inviteToWorkspace,TD$:()=>pD.invites,RgP:()=>pD.justInTime,YEx:()=>pD.lastUsedSlashCommand,k8Q:()=>pD.lists,sWJ:()=>pD.listsOpen,dGv:()=>pD.mcCallV2,quL:()=>pD.mcContentReviewTool,uiG:()=>pD.mediaProgress,nf6:()=>pD.mediaReactions,pBg:()=>pD.meetings,Sd8:()=>pD.megaphoneNotification,X7j:()=>pD.memberAnalytics,VBP:()=>pD.memberDirectoryFlexpane,olW:()=>pD.members,xU_:()=>pD.membership,x21:()=>pD.membershipCounts,C76:()=>pD.membershipOrdered,ZeL:()=>pD.messageActivity,DTo:()=>pD.messageEditPendingFileIds,oHp:()=>pD.messageEditWindow,G_r:()=>pD.messageFocus,QMb:()=>pD.messagePane,GJx:()=>pD.messagePlaceholders,DZr:()=>pD.messages,CYh:()=>pD.messagesMeta,yl5:()=>pD.modal,U2H:()=>pD.modernSelling,HIk:()=>pD.multiChannelGuestInviteModal,SYs:()=>pD.mutedChannels,mim:()=>pD.networkAcquisition,QK9:()=>pD.newWhatsNew,lQ1:()=>pD.noop,$eb:()=>pD.notifications,Gec:()=>pD.onboarding,qlp:()=>pD.openPopoversCount,_Ic:()=>pD.openedThisSession,Tr9:()=>pD.orgApps,mnF:()=>pD.orgAppsSearchWorkspace,e4Q:()=>pD.orgMembers,J3L:()=>pD.orgMembersChannelCounts,uez:()=>pD.orgMembersChannels,ITV:()=>pD.overlays,CQv:()=>pD.paidFeatures,osp:()=>pD.peers,wPF:()=>pD.pendingFileUploads,EyH:()=>pD.pendingFileUploadsMap,Pay:()=>pD.permissions,Rjw:()=>pD.persistedApiCalls,hm6:()=>pD.pins,MS5:()=>pD.planInfo,N_0:()=>pD.prefs,ING:()=>pD.presence,Nhg:()=>pD.pricingPlans,Lr6:()=>pD.priority,sTq:()=>pD.promo,y0$:()=>pD.queueableRecordToast,mev:()=>pD.quickReactions,J3D:()=>pD.quipCommentStream,Iaf:()=>pD.quipDocEmbeds,tAq:()=>pD.quipEditorUiConnectors,fUg:()=>pD.quipFileMentionActivity,KpH:()=>pD.quipMostRecent,pg_:()=>pD.quipUnreadCounts,kzJ:()=>pD.reacjiTriggers,PxC:()=>pD.reactionAnimations,Br_:()=>pD.reactions,sEl:()=>pD.reactionsToast,$eE:()=>pD.readOnlyChannels,kbv:()=>pD.recentlyJoinedChannels,tuX:()=>pD.recentlySharedFilesPicker,_3v:()=>pD.recordDetails,Iz:()=>pD.recordDigestSummaries,Zdh:()=>pD.recordRelated,BCG:()=>pD.recordRelatedConversations,Ow:()=>pD.reminders,Lp2:()=>pD.remoteFilePreviewTokens,Exu:()=>pD.remoteFilePreviewUrl,$df:()=>pD.rimetoOrgChart,vUi:()=>pD.rolesMgmt,wE6:()=>pF.A,iLk:()=>pD.salesforce,JWk:()=>pD.salesforceAgentforceAdmin,dpS:()=>pD.salesforceConnections,PIR:()=>pD.salesforceDataCloud,qo$:()=>pD.salesforceDataFieldLastSelection,Tw1:()=>pD.salesforceEditRecord,r9K:()=>pD.salesforceFeatures,nE3:()=>pD.salesforceFrontdoorSession,qdp:()=>pD.salesforceKit,GQ5:()=>pD.salesforceSearchRecords,_CH:()=>pD.saved,O6Y:()=>pD.savedSearches,m9b:()=>pD.scdmEducation,Ovk:()=>pD.scrollmarks,T2$:()=>pD.searchHistory,rPJ:()=>pD.searchInChannel,v98:()=>pD.searchInProductEducation,EtS:()=>pD.searchInputBox,V_0:()=>pD.searchResults,Hae:()=>pD.searchSession,aUY:()=>pD.searchSharedFacets,r2i:()=>pD.searchUi,zm8:()=>pD.seasonalStatusSections,Ih_:()=>pD.securityAlerts,IrR:()=>pD.selfTeamIds,ddS:()=>pD.sentMessages,PAo:()=>pD.setupCreation,szM:()=>pD.sfdcLayouts,Zjf:()=>pD.sfdcObjectImport,v70:()=>pD.sfdcOrgInfo,v9s:()=>pD.sfdcRecordActivities,DzW:()=>pD.sfdcRecordEvents,VxX:()=>pD.sharedPrompts,Nfq:()=>pD.shortcutsMenu,GOu:()=>pD.sideEffects,OzV:()=>pD.sidebarSweeper,fvE:()=>pD.sidekickThreads,S_Q:()=>pD.silentSidebar,q_S:()=>pD.siwsDomains,hL5:()=>pD.slackAiAnalytics,$rd:()=>pD.slackConnectApprovals,IDA:()=>pD.slackConnectEligibility,cEv:()=>pD.slackConnectExternalTeamsCounts,AAU:()=>pD.slackConnectExternalTeamsList,UNC:()=>pD.slackConnectGuidelines,AfY:()=>pD.slackConnectPendingInvites,XQy:()=>pD.slackConnectPrefs,kEu:()=>pD.slackbotAi,ewU:()=>pD.slackbotResponses,YmW:()=>pD.slackiversary,HOC:()=>pD.slashCommand,sZW:()=>pD.socket,lNV:()=>pD.solutions,WjQ:()=>pD.ssoAuth,K_N:()=>pD.starredChannels,uf5:()=>pD.stars,U9Y:()=>pD.stateMachines,HiO:()=>pD.storyView,pxm:()=>pD.streamingMessages,Fln:()=>pD.suggestedChannelSections,kI$:()=>pD.summaryDetail,uJh:()=>pD.tableMetadata,$T7:()=>pD.tableauSdkConfig,q6q:()=>pD.teamAnalytics,nCu:()=>pD.teamCompanyInfo,Tl7:()=>pD.teamCreation,GhN:()=>pD.teamPrefs,knZ:()=>pD.teamSiteNav,cKM:()=>pD.teamTargetingCriteria,rXv:()=>pD.teams,Gsr:()=>pD.templateCollaborators,U1K:()=>pD.threadMetadata,Xus:()=>pD.threadOnlyChannels,d4m:()=>pD.threadSub,oRP:()=>pD.toast,EcE:()=>pD.today,VJt:()=>pD.todayEvents,Qw9:()=>pD.todos,vpW:()=>pD.topics,_Au:()=>pD.tspEmailDelivery,IWp:()=>pD.typing,ZsX:()=>pD.uiSerialization,_Ag:()=>pD.undoSendMessage,mls:()=>pD.unfurls,i01:()=>pD.unifiedFilesBrowser,Q4g:()=>pD.unreadCounts,vTJ:()=>pD.unreadMarkers,q70:()=>pD.unreadsView,oKU:()=>pD.userAccountTypes,xMQ:()=>pD.userAlerts,HpJ:()=>pD.userGroupMembership,WPv:()=>pD.userGroups,dnR:()=>pD.userGroupsFlexpane,xdA:()=>pD.userInteractions,oXz:()=>pD.userPrefs,UpL:()=>pD.view,w27:()=>pD.viewLayout,LJP:()=>pD.viewSetMetadata,Qs:()=>pD.widgets,xa8:()=>pD.window,Li6:()=>pD.windowHistory,EHX:()=>pD.workObjects,eQO:()=>pD.workflowAnalytics,MNk:()=>pD.workflowApps,DOq:()=>pD.workflowBuilder,A5S:()=>pD.workflowHistory,$2l:()=>pD.workflowTemplates,GlT:()=>pD.workspace,n3h:()=>pD.workspaceManagement});var i=a(0x1527aca05),l=a(0x6019b546),o=a(0xa82f51d5);(0,i.d1)("agentforce_agent_status_updated",(e,t)=>{e?.app_id&&e?.status&&(t((0,l.vg)({appId:e.app_id,isAvailable:e.is_available,status:e.status})),t((0,o.Fk)({appId:e.app_id,status:e.status,isAvailable:e.is_available}))),e?.app_id&&e?.assistant_description&&t((0,o.Ms)({appId:e.app_id,assistantDescription:e.assistant_description}))});var s=a(0x9b971e7e),c=a(0xb176f8dc),d=a(0x14c8e09fa),m=a(0x175a77c46);function appActionsUpdated(e,t,a){let{is_uninstall:n,app_id:r}=e??{};r&&(appGlobalActionsUpdated({is_uninstall:n,app_id:r},t),n?t((0,d.gB)([r])):(0,c.k6)((0,s.ZT)(a())??""))}function appGlobalActionsUpdated({is_uninstall:e,app_id:t},a){a((0,d.Iw)({isUninstall:e,appId:t})),e&&a((0,m.xT)([t]))}(0,i.d1)("app_actions_updated",appActionsUpdated);var u=a(0x17bf87dc4),p=a(0x3711e82d),h=a(0x45012309),_=a(0x9641cf92);(0,i.d1)("dialog_opened",(e,t,a)=>{let{app_id:n,client_token:r,dialog_id:i,dialog_submit_label:l,dialog_title:o,timeout_range:s}=e,c=u.A.check(a(),r);if(!c)return;let{delta:d,nowTs:m,tokenTs:f}=u.A.getTimeDelta(r);(0,h.eo)().track(p.EventId.APP_DIALOG_OPEN_ATTEMPTED,{app_id:n,dialog_id:i,dialog_client_token_ts:f,dialog_ms_event_received_ts:m}),d>=s||(c.onDialogOpen&&c.onDialogOpen(),t((0,_.A)({appId:n,id:i,submitLabel:l,title:o,onSubmitResolved:c.onDialogSubmit})))});var f=a(0xbad225b5),b=a(0x1db69cda),g=a(0x1cbdfeceb),y=a(0x77727995),A=a(0x1d6936809),x=a(0xb97b797e),E=a(0x20482ad21),C=a(0x16ac9b089),k=a(0x89500067),v=a(0xb96cef01),S=a(0x1b9d5cc0c),I=a(0x82980ab8),w=a(0x1aad32b98),T=a(0x167bc3887),N=a(0x1c91944c9),M=a(0xe684f705);let R=new E.Ay("apps"),P=class extends f.PureComponent{static defaultProps={appId:void 0,appName:void 0,fetchAppPermissionsAddScope:g.A,fetchAppPermissionsAddUser:g.A,hasChannelScopes:!1,isUserRequest:!1};referringEventId;referringUiContext;constructor(e){super(e),this.referringEventId=null,this.referringUiContext=null,(0,x.v)(this,["handleClose","handleCancel","handleGo"])}componentDidMount(){this.props.appId&&this.trackClog(p.UiAction.IMPRESSION)}componentDidUpdate({appId:e}){!e&&this.props.appId&&this.trackClog(p.UiAction.IMPRESSION)}getHandler({didConfirm:e}){let{isUserRequest:t,scopeInfo:a,triggerId:n}=this.props,r=t?this.props.fetchAppPermissionsAddUser:this.props.fetchAppPermissionsAddScope,i=a.map(({scopes:e}={})=>e).join(","),l=e?p.UiAction.ALLOW:p.UiAction.DO_NOT_ALLOW;return this.trackClog(l),r({didConfirm:e,scopes:i,triggerId:n})}handleCancel(){this.getHandler({didConfirm:!1})}handleClose(){this.trackClog(p.UiAction.CLOSE)}handleGo(){this.getHandler({didConfirm:!0})}trackClog(e){let{appId:t,clogger:a,isUserRequest:n}=this.props,r=n?p.EventId.APP_USER_REQUEST_DIALOG:p.EventId.APP_PERMISSION_REQUEST_DIALOG,i={action:e};a.track(r,{contexts:{ui_context:i,referring_ui_context:this.referringUiContext,core:{app_id:t}},referring_event_id:this.referringEventId}),this.referringEventId=r,this.referringUiContext=i}renderTitle(){let{appName:e,isUserRequest:t}=this.props;return e?t?R.t("{appName} would like to:",{appName:(0,C.Ay)(e)}):R.rt("{appName} would like to do the following in <strong>all channels it\u2019s a member of</strong>:",{appName:e}):""}render(){let{appIcon:e,scopeInfo:t}=this.props,a={appIcon:e,onAuthorize:this.handleGo,onClose:this.handleClose,onDismiss:this.handleCancel,scopeInfo:t,title:this.renderTitle()};return f.createElement(k.A,a)}};P.displayName="AppPermissionRequestDialog";let L=(0,N.N)((e,{appUserId:t})=>{let a=(0,M.nv)(e,t);return{appIcon:(0,T.Ay)({size:48,teamOrEnterpriseId:(0,w.Ux)(e,a),memberId:t,avatarHash:(0,y.A)(a,"profile.avatar_hash")}).imageUrl||"",appId:(0,S.PV)(a),appName:(0,I.wg)(a),clogger:(0,h.eo)({state:e})}},e=>(0,A.zH)({fetchAppPermissionsAddScope:v.V3,fetchAppPermissionsAddUser:v.IY},e))(P);var O=a(0x12185e091),D=a(0x16ed1b0dc),F=a(0x119e7e627),U=a(0xe874a88a),B=a(0x17ea0fa2c),H=a(0x15f4f83cf),W=a(0x1ec68d6a3),V=a(0x11c82607b),G=a(0x17952256d),q=a(0xca924ee1),j=a(0x1e2051844),z=a(0x1a8cc04e1),K=a(0x1cf0d97e1),$=a(0x1266f1359),Y=a(0x19c76d181);let arrayToObjectKeys=e=>{let t={};return e.forEach(e=>{t[e]=!0}),t},Q=(0,V.Ay)("Fetches app permission related data and adds it to store",(e,t,a)=>U.S.all([e((0,v.AM)({serviceId:a})),e((0,v.iZ)({serviceId:a})),e((0,v.nz)({serviceId:a,userId:(0,Y.WR)(t())}))]).then(([e,t,n])=>{let r=(0,y.A)(t,"group.resources.ids",[]),i=(0,y.A)(t,"im.resources.ids",[]),l=(0,y.A)(t,"mpim.resources.ids",[]),o=arrayToObjectKeys((0,y.A)(t,"channel.resources.ids",[])),s=arrayToObjectKeys(r.concat(l,i)),c=arrayToObjectKeys((0,y.A)(t,"channel.resources.excluded_ids",[])),d={};(0,y.A)(e,"resource_type_access",[]).forEach(e=>{d["group"===e?"private":e]=!0});let m=(0,y.A)(e,"user_count",0);return{id:a,appUserId:(0,y.A)(e,"app_user_id"),channelScopeInfo:(0,y.A)(e,"channel_scope_info",[]),currentUserScopeInfo:n||[],exclusionIds:c,hiddenChannelCount:(0,y.A)(e,"hidden_channel_count",0),privateChannelCount:(0,y.A)(e,"private_channel_count",0),privateChannelIds:s,publicChannelCount:(0,y.A)(e,"public_channel_count",0),publicChannelIds:o,resourceTypeAccess:d,serviceId:a,userCount:m,userScopeInfo:(0,y.A)(e,"user_scope_info",[]),userSearchResults:{isLoading:!1,nextCursor:null,query:"",results:[],total:m},wildcardEnabled:(0,y.A)(e,"wildcard_enabled",!1),workspaceScopeInfo:(0,y.A)(e,"team_scope_info",[])}}));Q.meta={name:"fetchAppPermissionsByServiceId",key:"createThunkFetchAppPermissionsByServiceId",description:"Fetches app permission related data and adds it to store"};let Z=(0,V.Ay)("Fetches app permissions for multiple apps given an array of service IDs",(e,t,a=[])=>U.S.map(a,t=>e(Q(t))));Z.meta={name:"bulkFetchAppPermissions",key:"createThunkBulkFetchAppPermissions",description:"Fetches app permissions for multiple apps given an array of service IDs"};let J=(0,V.Ay)("Upserts app permissions for multiple apps given an array of app permissions objects",(e,t,a=[])=>{a.forEach(t=>e((0,G.Rm)({serviceId:t.id,appPermissions:t})));let n=a.filter(H.uz).map(e=>e.id);return en().markObjectsAsFresh((0,s.ZT)(t()),n),a});J.meta={name:"bulkUpsertAppPermissions",key:"createThunkBulkUpsertAppPermissions",description:"Upserts app permissions for multiple apps given an array of app permissions objects"};let X=(0,V.Ay)("Fetchs and upserts app permissions for multiple apps given an array of serviceIds",(e,t,a=[])=>e(Z(a)).then(t=>e(J(t))));X.meta={name:"bulkFetchAndUpsertAppPermissions",key:"createThunkBulkFetchAndUpsertAppPermissions",description:"Fetchs and upserts app permissions for multiple apps given an array of serviceIds"};let withTeamId=e=>(t,a)=>(0,$.Qw)(t,e(a)),ee=(0,q.A)(()=>new H.Ay({fetch:withTeamId(Z),upsertKnown:withTeamId(J),upsertNonExistent:withTeamId(J)})),et=(0,K.Ay)((e,t)=>{let a=e&&e.appPermissions&&e.appPermissions[t],n=(0,s.ZT)(e);return a?(en().maybeRefetch(n,t),a):ee().fetchObjectWithId(n,t)});et.meta={name:"getAppPermissionsByServiceId",key:"createSelectorGetAppPermissionsByServiceId",description:(e,t)=>{let a=e&&e.appPermissions&&e.appPermissions[t],n=(0,s.ZT)(e);return a?(en().maybeRefetch(n,t),a):ee().fetchObjectWithId(n,t)}};let ea=(0,K.Ay)((e,t)=>e&&e.appPermissions&&(0,j.A)(e.appPermissions,{appUserId:t})||null);ea.meta={name:"getAppPermissionsByAppUserId",key:"createSelectorGetAppPermissionsByAppUserId",description:(e,t)=>e&&e.appPermissions&&(0,j.A)(e.appPermissions,{appUserId:t})||null},(0,K.Ay)((e,t)=>{let a=et(e,t);if(!(0,H.uz)(a))return null;let{userSearchResults:n}=a;return n||null}).meta={name:"getAppPermissionsUserSearchResultsByServiceId",key:"createSelectorGetAppPermissionsUserSearchResultsByServiceId",description:(e,t)=>{let a=et(e,t);if(!(0,H.uz)(a))return null;let{userSearchResults:n}=a;return n||null}};let en=(0,q.A)(()=>new z.Ay({storeKey:"appPermissions",fetch:withTeamId(X),isEnabled:()=>!0}));var er=a(0x217553e42);let ei=(0,V.Ay)("Updates channel related permission data after an app user is added to a channel",(e,t,{appUserId:a,channelId:n}={})=>{let r=t(),i=ea(r,a);if(i){let{serviceId:t,wildcardEnabled:a}=i,l=(0,er.OL)(r,n),o=(0,O.rW)(l);if(a&&o){if(!i.exclusionIds[n])return;e((0,G.F1)({serviceId:t,channelId:n})),e((0,G.TU)({serviceId:t,countDelta:1}))}else{if(i[o?"publicChannelIds":"privateChannelIds"][n])return;let a=o?G.tY:G.PO,r=o?G.TU:G.Jw;e(a({channelId:n,serviceId:t})),e(r({serviceId:t,countDelta:1}))}}});ei.meta={name:"maybeUpdateAppPermissionsAfterChannelAdd",key:"createThunkMaybeUpdateAppPermissionsAfterChannelAdd",description:"Updates channel related permission data after an app user is added to a channel"};let el=(0,V.Ay)("Updates channel related permission data after an app user is removed from a channel",(e,t,{appUserId:a,channelId:n}={})=>{let r=t(),i=ea(r,a);if(i){let{serviceId:t,wildcardEnabled:a}=i,l=(0,er.OL)(r,n),o=(0,O.rW)(l);if(a&&o){if(i.exclusionIds[n])return;e((0,G.ZG)({serviceId:t,channelId:n})),e((0,G.TU)({serviceId:t,countDelta:-1}))}else{if(!i[o?"publicChannelIds":"privateChannelIds"][n])return;let a=o?G.Dy:G.fU,r=o?G.TU:G.Jw;e(a({channelId:n,serviceId:t})),e(r({serviceId:t,countDelta:-1}))}}});el.meta={name:"maybeUpdateAppPermissionsAfterChannelRemove",key:"createThunkMaybeUpdateAppPermissionsAfterChannelRemove",description:"Updates channel related permission data after an app user is removed from a channel"},(0,V.Ay)("Calls API to revoke an app\u2018s access to the current user\u2018s data and updates store accordingly",(e,t,{serviceId:a}={})=>{let n=t(),r=(0,Y.WR)(n);return e((0,v.jI)({serviceId:a,userId:r})).then(()=>{e((0,G.l6)(a)),e((0,G.tU)({serviceId:a,userId:r}))})}).meta={name:"fetchAppRevokeUserAndUpdateAppPermissions",key:"createThunkFetchAppRevokeUserAndUpdateAppPermissions",description:"Calls API to revoke an app\u2018s access to the current user\u2018s data and updates store accordingly"};let eo=(0,V.Ay)("Updates channel related permission data after a the wildcard is changed",(e,t,{appUserId:a,wildcardEnabled:n}={})=>{let r=ea(t(),a);if(r){let{serviceId:t}=r;e((0,G.Y8)({serviceId:t,wildcardEnabled:n}))}});eo.meta={name:"maybeUpdateAppPermissionsAfterWildcardChange",key:"createThunkMaybeUpdateAppPermissionsAfterWildcardChange",description:"Updates channel related permission data after a the wildcard is changed"};let es={entities:{channels:{includeArchived:!1,includeFromAnotherTeam:!1,includePrivate:!0,includePublic:!0,includeMpims:!0,onlyIfMember:!1,onlyVisibleMpims:!0},members:{includeBots:!1,includeDeleted:!1,includeSelf:!0,includeSlackbot:!1,onlyLocalTeam:!1}},limit:24,allowEmptyQuery:!0,sort:{frecency:!0,preferChannelsUserBelongsTo:!0,preferExactMatch:!0}};(0,V.Ay)("Search for channels based on query and return model objects for channels to be displayed in the selectors",(e,t,{serviceId:a,query:n,forExclusions:r}={})=>{let i=t(),l=et(i,a);if((0,H.uz)(l)){let{resourceTypeAccess:t,publicChannelIds:a,privateChannelIds:o,exclusionIds:s,wildcardEnabled:c}=l,d=(0,b.A)(es);return r?(d.entities.channels.includePrivate=!1,delete d.entities.mpims,delete d.entities.members):(t.channel||(d.entities.channels.includePublic=!1),t.private||(d.entities.channels.includePrivate=!1),t.mpim||delete d.entities.mpims,t.im||delete d.entities.members),e((0,B.$P)({query:n,options:d})).then(e=>e.reduce((e,t={})=>{if(!t)return e;let n=t;if((0,S.NB)(t)){let a=(0,er.Pu)(i,t.id);if(!a)return e;n=a}let{id:l}=n,d=[...e,n];return c?r?s[l]?e:d:(0,O.rW)(n)?s[l]?d:e:o[l]?e:d:a[l]||o[l]?e:d},[]))}return U.S.resolve([])}).meta={name:"searchChannelsForApp",key:"createThunkSearchChannelsForApp",description:"Search for channels based on query and return model objects for channels to be displayed in the selectors"},(0,V.Ay)("Search for users based on a query and updates permissions store with user IDs and theirs scopes",(e,t,{serviceId:a,query:n="",nextPage:r=!1}={})=>{let i=et(t(),a);if(!i)return U.S.resolve();let{userSearchResults:l,currentUserScopeInfo:o}=i;return l&&o&&(!l.results.length||l.query!==n||r&&l.nextCursor)?(e((0,G.GX)({isLoading:!0,query:n,results:r?l.results:[],serviceId:a,total:r?l.total:0})),e((0,v.u5)({cursor:r?l.nextCursor:"",limit:50,query:r?l.query:n,serviceId:a})).then(({user_info:n,next_cursor:i,total:s}={})=>{let c=n;if(o.length>0){let e=(0,Y.WR)(t());c=n.filter(({user_id:t}={})=>t!==e),r||(c=[{user_id:e,scopes:o.map(({scopes:e}={})=>e[0])},...c])}e((0,G.GX)({isLoading:!1,results:r?[...l.results,...c]:c,nextCursor:i,serviceId:a,total:s}))}).catch(()=>{e((0,G.GX)({isLoading:!1,serviceId:a})),(0,W.Ay)({getState:t}).error(`Error fetching users for app with service ID: ${a}`)})):U.S.resolve()}).meta={name:"searchUsersForApp",key:"createThunkSearchUsersForApp",description:"Search for users based on a query and updates permissions store with user IDs and theirs scopes"};var ec=a(0x212d58282),ed=a(0xc1360909),em=a(0x1d5973b1c),eu=a(0x11edcf721),ep=a(0x12d2784bc),eh=a(0x46dbff89),e_=a(0x1e974bbde);let ef="app_wildcard_added",eb="app_permission_user_request";function updateMembershipAndCountsAfterAppWildcardChange({app_user:e,type:t},a,n){if(!e||!t)return;let r=n(),i=t===ef,l=(0,s.ZT)(r);if(!l)return;let o=(0,e_.Z)(r)?.viewSet?.primary?.id,c=o&&(0,D.A)(o)?o:null,d=c&&(0,er.gT)(r,c)?(0,er.OL)(r,c):null,m=c?(0,b.A)((0,ed.q8)(r,c)):null,u=c?(0,ep.Sv)(r,c,e):{isKnown:!1,isMember:!1},p=d&&(0,O.rW)(d)&&u.isKnown&&i!==u.isMember;a((0,eu.R5)(e)),(0,ec.qH)(l),p&&c&&m?.counts&&a((0,em.G)({channelId:c,appCountDelta:i?1:-1})),a(eo({appUserId:e,wildcardEnabled:i}))}function startAppPermissionRequest({app_user:e,client_token:t,scope_info:a,timeout_range:n,trigger_id:r,type:i},l,o){if(!e||!t||!a||!n||!r||!i||!u.A.check(o(),t))return;let{delta:s}=u.A.getTimeDelta(t);if(s>=n)return;let c=f.createElement(L,{appUserId:e,isUserRequest:i===eb,scopeInfo:a,triggerId:r,hasChannelScopes:!1});l((0,eh.q)({element:c}))}function startAppChannelInviteRequest({app_user:e,channel_id:t,client_token:a,invite_message_ts:n,scope_info:r,timeout_range:i},l,o){if(!e||!t||!a||!r||!i||!u.A.check(o(),a))return;let{delta:s}=u.A.getTimeDelta(a);s>=i||l((0,F.A)({appUserId:e,channelId:t,inviteMessageTs:n,referringEventId:p.EventId.MSG_LINK_CLICKED,scopeInfo:r}))}(0,i.d1)(ef,updateMembershipAndCountsAfterAppWildcardChange),(0,i.d1)("app_wildcard_removed",updateMembershipAndCountsAfterAppWildcardChange),(0,i.d1)("app_permission_request",startAppPermissionRequest),(0,i.d1)(eb,startAppPermissionRequest),(0,i.d1)("app_conversation_invite_request",startAppChannelInviteRequest),a(0xeb62ec20);var eg=a(0x1dcfefeba),ey=a(0x101db4695),eA=a(0x70de3606),ex=a(0x71e68ec7),eE=a(0x11439744b),eC=a(0xd6f0064d),ek=a(0x876c9ad2);let beaconApprovalsNotification=(e,{approvalId:t,description:a})=>{let n={approvalId:t,description:a};Object.keys(n).forEach(t=>{(0,eE.Cv)({state:e}).recordMetric(t,n[t])})};async function handleApprovalNotification(e,t,a){let n=a(),r=e.reference,i=r&&(0,ey.sc)(r)&&(0,ey.Vr)(r),l=(0,W.Ay)({state:n,label:ek.Z}),o=(0,eA.ci)(n);if(l.info(`approval_response_requested RTM received, approvals enabled: ${o}`,e),!o||!i||!(0,ey.iB)(i))return;let s=(0,ex.pK)(n);if(s===eC.Z.NONE)l.info("approval_response_requested RTM dispatching notification",e),t((0,eg.zU)({approvalReference:i,userId:e.user_id,isRequest:"approval_response_requested"===e.type,experimentApprovalsInTodosGroupOn:o})),beaconApprovalsNotification(n,{approvalId:i.sfdcRecord.id,description:"Approval desktop notification shown"});else{let e=(0,eC.Q)(s);l.info("approval_response_requested RTM suppressed",e),beaconApprovalsNotification(n,{approvalId:i.sfdcRecord.id,description:`approval_response_requested RTM suppressed: ${e}`})}}(0,i.d1)("approval_response_requested",handleApprovalNotification),(0,i.d1)("approval_response_reviewed",handleApprovalNotification);var ev=a(0x1ac57f111),eS=a(0x3626cdc6),eI=a(0x10d4ddcc9),ew=a(0x21d99e321),eT=a(0x1bca0c567),eN=a(0x1f70a7686);function sharedUpsertAppFromImsg(e,t){0!==e.length&&e.forEach(e=>{let{app:a}=e,n=(0,$.jp)(t),r=n.getState();(0,ew.T)(r)?a.id&&(0,eI.D1)(t,[a.id]):n.dispatch((0,eT.G)([{...a,is_installed:!0}]));let i=a.home_tab_enabled;"boolean"==typeof i&&(0,eN.NP)({teamOrEnterpriseId:t,action:(0,ev.Dk)({appId:a.id,homeTabEnabled:i})})})}function sharedAppUninstalled(e,t){0!==e.length&&e.forEach(e=>{let{app_id:a}=e;a&&(0,$.jp)(t).dispatch((0,o.oN)([a])),(0,$.jp)(t).dispatch((0,eS.A)(a))})}(0,i.uH)("apps_installed",sharedUpsertAppFromImsg),(0,i.uH)("apps_changed",sharedUpsertAppFromImsg),(0,i.uH)("apps_uninstalled",sharedAppUninstalled);var eM=a(0x318bb66b),eR=a(0x22a29f141);let eP=(0,a(0x1dfdeb1c8).A)("Runs a benchmark on a RTM event",(e,t,{method:a,identifier:n,loadtest:r,args:i}={})=>e((0,eR.apiCall)({method:"api.benchmark",args:{m:a,id:n,lt:r,a:i}})).catch(g.A));eP.meta={name:"runBenchmark",key:"createFetcherRunBenchmark",description:"Runs a benchmark on a RTM event"};var eL=a(0x197e6f5cb),eO=a(0x209e067d1),eD=a(0x11d0b0bd1),eF=a(0x141589b4d),eU=a(0x25799808);let eB=["fast_disco","fetch_auth","reload","slow_disco","fast_failover","slow_failover","min_version","cancel_min_version"];function sonicBenchmark(e={},t,a){let{m:n,pct:r,sub:i,id:l}=e;if(!(0,eO.A)()||!(0,eM.A)(r)||!(0,eM.A)(i))return;let o=a();if(document.hasFocus()&&"E5NUFGUK0"!==(0,s.jV)(o)||(0,eU.LH)()||!(0,eF.UJ)(o))return;(0,eE.Cy)({state:o}).count("sbb_start");let c=(0,W.Ay)({state:o});if(c.info(`Performing Sonic benchmark '${n}' with run id '${l}'`),l){if(window.sessionStorage.getItem(`sonic_benchmarks_${l}`))return;window.sessionStorage.setItem(`sonic_benchmarks_${l}`,1)}switch(n){case"fast_disco":t((0,eL.Zf)());break;case"slow_disco":t((0,eL.ej)()),t((0,eL.Zf)());break;case"fast_failover":t((0,eL.bE)());break;case"slow_failover":t((0,eL.ej)()),t((0,eL.bE)());break;case"fetch_auth":(0,eU.K1)();break;case"reload":(0,eD.yQ)({reason:"sonic_benchmark"});break;default:c.warn(`Unable to run Sonic benchmark command '${n}'`)}}function benchmark(e={},t,a){let{m:n,pct:r,sub:i,lt:l,a:o,id:s}=e;eB.indexOf(n)>=0?sonicBenchmark(e,t,a):(0,eM.A)(r)&&(0,eM.A)(i)&&t(eP({method:n,loadtest:l,args:o,id:s}))}(0,i.d1)("benchmark",benchmark);var eH=a(0x171ed3eca),eW=a(0xd8fe84cf);function extractBookmark(e){let{bookmark:t,image_url:a,emoji:n,link:r,title:i,entity_id:l,rank:o,channel:s,date_create:c,date_update:d,bookmark_type:m,parent_id:u,last_updated_by_user_id:p,last_updated_by_team_id:h,app_id:_,app_action_id:f,shortcut_id:b,quip_section_id:g}=e;return{id:t,channelId:s,iconUrl:a,emoji:n,url:r,title:i,entityId:l,rank:o,dateCreate:c,dateUpdate:d,type:m,parentId:u,lastUpdatedByUserId:p,lastUpdatedByTeamId:h,appId:_,appActionId:f,shortcutId:b,quipSectionId:g}}function handleBookmarkAdded(e,t){let a=extractBookmark(e);t((0,eH.KI)(a))}function handleBookmarkUpdated(e,t){let a=extractBookmark(e);t((0,eH.mK)(a))}function handleBookmarkRemoved(e,t,a){let n=a(),r=(0,eW.n7)(n,{channelId:e.channel,id:e.bookmark});r&&t((0,eH.l7)(r))}(0,i.d1)("bookmark_added",handleBookmarkAdded),(0,i.d1)("bookmark_removed",handleBookmarkRemoved),(0,i.d1)("bookmark_updated",handleBookmarkUpdated);var eV=a(0x201c9c7f),eG=a(0xf741057c);function botChanged({bot:e},t,a){let n=a(),r=(0,ew.T)(n);t((0,eG.s)({bots:[e]})),r?e.app_id&&t((0,eS.A)(e.app_id)):t((0,eV.A)([e.id]))}function sharedBotUpserted(e,t){if(!e.length)return;let a=(0,$.jp)(t),n=e.map(e=>e.bot);a.dispatch((0,eG.s)({bots:n}))}(0,i.d1)("bot_changed",botChanged),(0,i.uH)("bot_added",sharedBotUpserted);var eq=a(0x1feee1711),ej=a(0x2286acf6c),ez=a(0xe0376d2),eK=a(0x2006c4c29),e$=a(0xae1a570c),eY=a(0x139aa1a7),eQ=a(0x18def662b),eZ=a(0x12a7ec44a),eJ=a(0x154933c60),eX=a(0x1a02c72b5),e0=a(0xd6a16321),e1=a(0x1d73a63ad),e2=a(0x1ec69ee01),e4=a(0x73d7ee71),e5=a(0x280afe13),e3=a(0x6f213e53),e6=a(0xf6ed6f31),e8=a(0x100fb9ff5),e7=a(0x16df7a1d3),e9=a(0x1a115a2e4),te=a(0xbe2be077),tt=a(0x4b8e0952),ta=a(0x143fb6398),tn=a(0x49e911f4),tr=a(0x1919f382c),ti=a(0xed6365de),tl=a(0xb2ae11b7),to=a(0x16a1fe8b4),ts=a(0x1ca537536);let tc=(0,V.Ay)("Advance the historyInvalidTs on the given channel, indicating the last time the channel history was modified and needs to be purged (e.g. retention deletions).",(e,t,{channelId:a,eventTs:n})=>{let r=t();if(!(0,eF.wq)(r))return;let{historyInvalidTs:i}=(0,ts.Dk)(r,a);n&&n>(i||"0000000000.000000")&&e((0,ts.UJ)({channelId:a,historyInvalidTs:n}))});tc.meta={name:"maybeAdvanceChannelHistoryInvalidTimestamp",key:"createThunkMaybeAdvanceChannelHistoryInvalidTimestamp",description:"Advance the historyInvalidTs on the given channel, indicating the last time the channel history was modified and needs to be purged (e.g. retention deletions)."};var td=a(0x78f144a5);let tm=(0,V.Ay)("Open a conversation by channel and member ID",(e,t,{channel:a,user:n}={})=>{let r=t(),i=(0,er.gT)(r,a)&&(0,er.OL)(r,a);i?(a&&e((0,td.b)({id:a,is_open:!0})),(0,O.LI)(i)&&!((0,M.TO)(r,n)&&(0,M.nv)(r,n)))?(0,W.Ay)({getState:t}).warn(`Unknown member ${n}`):a&&(e((0,td.b)({id:a,opened_this_session:!0})),e((0,tl.u)({channelId:a,openedThisSession:!0}))):(0,W.Ay)({getState:t}).warn(`Unknown channel ${a}`)});tm.meta={name:"setConversationOpen",key:"createThunkSetConversationOpen",description:"Open a conversation by channel and member ID"};var tu=a(0x8bf2baac),tp=a(0xac05ef17),th=a(0x16ffed5ab);function bulkLeaveChannelsCompleted(e,t,a){e.failures?.length&&(0,W.Ay)({getState:a}).warn(`Failed to leave channels with IDs: ${e.failures.join(", ")}`);let n=0;if(e.successes?.length){let t=a();e.successes.forEach(e=>{let a=(0,er.OL)(t,e);((0,O.Zp)(a)||(0,O.Zx)(a))&&(n+=1)})}t((0,th.M)({element:(0,f.createElement)(tp.h,{privateChannelCount:n,channelCount:e.successes?.length||0,error:!!e.failures?.length})}))}var t_=a(0x1595bdd0),tf=a(0x1673f3229),tb=a(0x18af67efb),tg=a(0x357885ff),ty=a(0xbe0b63ff),tA=a(0x11f7a4d96),tx=a(0x1a72b26e6),tE=a(0xf3719a28),tC=a(0x1ccef1c6f),tk=a(0x12f41fc32),tv=a(0x691ce3ab),tS=a(0x14ea3ce99),tI=a(0x7c2e2ba1),tw=a(0x7b0b485);let tT=(0,V.Ay)("If canvas edited in a huddle count the usage",(e,t,{msg:a})=>{let n=t(),r=a?.file_id,i=a?.event_ts;if(!r||!i||!(0,Y.TZ)(n))return;let l=(0,tv.Ry)(),o=(0,tw.hc)(l);if(!o||!(0,tI.JE)(n))return;let s=(0,tC.ty)(n,"num_clicked_cuddles_button")??0,c=(0,tC.ty)(n,"cuddles_button_first_seen")??"",d=new Date(c),m=new Date,u=new Date(m);if(u.setDate(m.getDate()-7),s>=tx.b||""!==c&&d<u)return;let p=(0,er.OL)(n,o);if(!p)return;let h=(0,tE.H)(p),_=h?.fileId,f=(0,tS.Lp)(n,_||"");if(!f)return;let b=f.editors?.[0]??void 0,g=(0,Y.WR)(t()),y=(0,tw.cN)(l)/1e3;r!==f.id||b!==g||y>i||e((0,tk.AZ)({pref:"num_clicked_cuddles_button",value:tx.b}))});tT.meta={name:"maybeCountCuddleUsage",key:"createThunkMaybeCountCuddleUsage",description:"If canvas edited in a huddle count the usage"};var tN=a(0x1f3226107),tM=a(0x798b166a),tR=a(0xa794f9e1),tP=a(0x23fb5a202),tL=a(0xbd3de346),tO=a(0x20679dcfc),tD=a(0x114a9d369),tF=a(0x224811973),tU=a(0x4f725d55),tB=a(0x1f262aa81),tH=a(0x24083f639),tW=a(0xbcd5d85a),tV=a(0x1c252c976),tG=a(0x127cb13be),tq=a(0x21f3c49e8),tj=a(0x19293de57),tK=a(0x17bc5d846),t$=a(0x1c2eef3c8),tY=a(0x1e64b5881),tQ=a(0xe091c793),tZ=a(0x145d6ed90),tJ=a(0x2e5f9a3f);function handleDraftCreate({draft:e},t,a){if((0,tq.A)(e))return;let n=(0,tR.i5)(e),{info:r}=(0,W.Ay)({getState:a,label:"DRAFTS"}),i=(0,tR.iS)(e);(r(`RTM: draft_create - ${i}`),(0,tJ.eh)(n))?r(`Ignoring a 'draft_create' event triggered by a local change: ${n}`):t((0,tY.K)({fetchedDraft:e}))}function handleDraftDelete({draft_id:e,client_msg_id:t},a,n){let{info:r}=(0,W.Ay)({getState:n,label:"DRAFTS"});r(`RTM: draft_delete/draft_send - ${e} - ${t}`),t&&!(0,tK.Wb)(n(),{draftId:t})&&a((0,tj.Uv)({draftId:t}));let i=(0,t$.f3)(n(),e),l=(0,tR.ue)(i);l&&a((0,tQ.g)({clientDraftId:l}))}function handleDraftUpdate({draft:e},t,a){if((0,tq.A)(e))return;let{info:n}=(0,W.Ay)({getState:a,label:"DRAFTS"}),r=(0,tR.iS)(e)||"";n(`RTM: draft_update - ${r}`);let i=(0,t$.f3)(a(),r),l=(0,tR.ue)(i);if(l){if((0,tJ.eh)(r))return void n(`Ignoring a 'draft_update' event triggered by a local change: ${r}`);t((0,tZ.n)({clientDraftId:l,fetchedDraft:e}))}}(0,i.d1)("draft_create",handleDraftCreate),(0,i.d1)("draft_delete",handleDraftDelete),(0,i.d1)("draft_update",handleDraftUpdate),(0,i.d1)("draft_send",handleDraftDelete);var tX=a(0x23939c0c2),t0=a(0x2474049a1),t1=a(0x2b1dedd6),t2=a(0xc6b969e1),t4=a(0x839ba347),t5=a(0x21da4684a),t3=a(0x16475a65c),t6=a(0x18f183d32);let t8=(0,V.Ay)("Detaches any file ids for deleted files that were attached to drafts",(e,t,{fileIds:a}={})=>{if((0,tq.A)(a))return;let n=(0,t$.Hw)(t());if((0,tq.A)(n))return;let r=(0,W.Ay)({getState:t,label:"DRAFTS"});(0,t4.A)(n,t=>{let n=(0,tP.A)(t),i=(0,t5.A)(n,a);if((0,tq.A)(i))return;let l=(0,tR.ue)(t);r.info(`Removing the file ids of deleted files from a draft (${l}): ${i}`);let o=(0,t3.A)(n,a),s={...t,file_ids:o};e((0,t6.i)({draft:s,reason:"removeDeletedFilesFromDrafts"}))})});t8.meta={name:"removeDeletedFilesFromDrafts",key:"createThunkRemoveDeletedFilesFromDrafts",description:"Detaches any file ids for deleted files that were attached to drafts"};var t7=a(0x14149c126),t9=a(0xaa51370c),ae=a(0x1fd2fe918),at=a(0x114605f21),aa=a(0x4529b342),an=a(0x8468bab2),ar=a(0x1b84e54bb),ai=a(0xef525d4a),al=a(0x13654559a),ao=a(0x236fd74f1),as=a(0xd93ecf94),ac=a(0x1f57aea47),ad=a(0x1fcbb004d),am=a(0x109246c07),au=a(0x18753d76),ap=a(0x3883ab6d),ah=a(0x10b691d3),a_=a(0x6c6f5902),af=a(0x2291c5d37),ab=a(0x3fb00b9a),ag=a(0x253dbb177),ay=a(0x986c27f7),aA=a(0x17e63c876),ax=a(0x4479e27b);let aE=(0,V.Ay)("Update a file in a collection client-only",(e,t,{fileId:a,collectionId:n})=>{let r=t();if("on"!==(0,t7._Z)(r,"custom_file_sections"))return;let i=(0,ax.IN)(r,a);i?.id&&e((0,aA.Mb)({collectionId:i.id,fileIds:[a]})),n&&e((0,aA.$4)({collectionId:n,fileId:a}))});aE.meta={name:"moveFileToCollectionClientOnly",key:"createThunkMoveFileToCollectionClientOnly",description:"Update a file in a collection client-only"};let aC=(0,V.Ay)("Remove a file from a collection client-only",(e,t,{fileId:a,collectionId:n})=>{let r=t();"on"===(0,t7._Z)(r,"custom_file_sections")&&n&&e((0,aA.Mb)({collectionId:n,fileIds:[a]}))});aC.meta={name:"removeFileFromCollectionClientOnly",key:"createThunkRemoveFileFromCollectionClientOnly",description:"Remove a file from a collection client-only"};var ak=a(0x19895585a),av=a(0xe822f938),aS=a(0x1caa1d54b);function filesChanged(e,t,a){let n=a(),r=(0,s.ZT)(n);if(!r)return;let i=new Map;for(let a of e){let e=a.file_id;if(!e)return;let n=a?.membership_change??!1,r=i.get(e),l=r?.membershipChange??!1;i.set(e,{membershipChange:n||l}),t(tT({msg:a}))}if(i.size)for(let[e,{membershipChange:t}]of i.entries())(0,aa.Nd)(r,e),(0,tX.Nd)(r,e),"on"===(0,t7._Z)(n,"canvas_file_change_mark_file_channel_stale")&&t&&(0,aa.Nd)(r,(0,tO.p)(e))}function fileChanged(e,t,a){let n=a(),r=(0,s.ZT)(n);if(!r)return;let i=e.file_id;if(!i)return;let l=e?.membership_change??!1;(0,aa.Nd)(r,i),(0,tX.Nd)(r,i),"on"===(0,t7._Z)(n,"canvas_file_change_mark_file_channel_stale")&&l&&(0,aa.Nd)(r,(0,tO.p)(i))}function filesUnshared(e,t,a){filesChanged(e,t,a);let n=a(),r=(0,s.ZT)(n);if(!r)return;let i=(0,t_.A)(e.map(e=>e?.file_id));i.length&&(0,ae.D1)(r,i)}function filesShared(e,t,a){let n=a(),r=(0,s.ZT)(n);if(!r)return;let i=new Set((0,t_.A)(e.map(e=>e?.file_id)));if(!i.size)return;let l=[...i];l.forEach(e=>{(0,aa.Nd)(r,e)}),(0,tX.D1)(r,l),(0,ae.D1)(r,l);let o=l.filter(e=>{let t=(0,af.C)(n,e,!1);return t&&(0,ty.lv)(t)});removeQuipThreadIds(n,t,o),t((0,t0.ye)(l))}function removeQuipThreadIds(e,t,a){if(!(0,tF.y)(e)||!a.length)return;let n=(0,am.oj)(e),r=(0,t_.A)(n.map(t=>(0,ay.R)(e,t))),i=(0,tf.A)(a,...r);i.length&&t((0,a_.bb)({ids:i}))}function filesCreated(e,t,a){let n=a(),r=(0,s.ZT)(n);if(!r)return;let i=new Set((0,t_.A)(e.map(e=>e?.file_id)));i.size&&((0,aa.D1)(r,[...i]),(0,tM.hC)(r,[...i][0]))}function filesPermissionsRevoked(e,t,a){let n=a(),r=(0,s.ZT)(n);if(!r)return;let i=new Set((0,t_.A)(e.map(e=>e?.file_id)));if(!i.size)return;let l=new Set((0,t_.A)(e.map(e=>e?.entity_id)).filter(e=>(0,tU.A)(e))),o=new Set((0,t_.A)(e.map(e=>e?.entity_id)).filter(e=>(0,D.A)(e))),c=[...i];(0,aa.D1)(r,c),(0,ae.D1)(r,c);let d=c.filter(e=>(0,tL.wL)((0,tS.Lp)(n,e,!1)));(0,tX.D1)(r,d),d.forEach(e=>{let a=(0,tS.Lp)(n,e,!1);if(!a)return;let r=(0,ap.xN)(n,e),i=new Set(a.dm_mpdm_users_with_file_access?.map(e=>e.user_id)),s=(a.groups??[]).filter(e=>(0,O.Zp)((0,er.OL)(n,e))),c=new Set([...a.channels??[],...s]);o.forEach(e=>c.delete(e)),l.forEach(e=>i.delete(e));let d=[];r.forEach(e=>{i.has(e)||[...c].some(t=>{let a=(0,ep.Sv)(n,t,e);return a.isKnown&&a.isMember})||d.push(e)}),t((0,ah.bL)({docId:e,removedViewers:[...d]})),t((0,tG.A)({fileId:e}))});let m=(0,Y.WR)(a()),u=(0,av.pA)(n)??ak.N2;(0,ac.wc)(n,u).find(e=>e?.name===tW.u)&&((0,tb.A)(e,e=>`${e.file_id}_${e.entity_id}`).forEach(e=>{let{file_id:a,type:n}=e;if("file_permissions_removed"!==n)return;let r=(0,ar.W)(e.entity_type);if(!r)return;let i=e.entity_id;t((0,an.pv)({fileId:a,entityId:i,entityType:r}))}),t((0,tN._H)({fileIds:c,reason:"files-permissions-changed"})).then(e=>{e.forEach(e=>{(0,tL.sR)(e)&&t((0,ad.O)())})})),(l.has(m)||[...o].some(e=>{let t=(0,ep.Sv)(n,e,m);return t.isKnown&&t.isMember}))&&(removeQuipThreadIds(n,t,d),updateQuipFileMentions(d,t))}function filePermissionsAdded(e,t,a){let n=a();if(!(0,s.ZT)(n))return;let r=(0,av.pA)(n)??ak.N2;(0,ac.wc)(n,r).find(e=>e?.name===tW.u)&&(0,tb.A)(e,e=>`${e.file_id}_${e.entity_id}`).forEach(e=>{let{file_id:a,access_level:r,grant_exists:i}=e,l=(0,ar.W)(e.entity_type);if(!l)return;let o=e.entity_id,s=(0,er.OL)(n,o);t((0,an.ac)({fileId:a,entityId:o,entityType:l,grant:r,grantExists:i,isPrivateChannel:(0,O.Zp)(s)}))})}function filePermissionsEdited(e,t,a){let n=a();if(!(0,s.ZT)(n))return;let r=(0,av.pA)(n)??ak.N2;(0,ac.wc)(n,r).find(e=>e?.name===tW.u)&&(0,tb.A)(e,e=>`${e.file_id}_${e.entity_id}`).forEach(e=>{let{file_id:a,access_level:r}=e,i=(0,ar.W)(e.entity_type);if(!i)return;let l=e.entity_id,o=(0,er.OL)(n,l);t((0,an.ac)({fileId:a,entityId:l,entityType:i,grant:r,grantExists:!0,isPrivateChannel:(0,O.Zp)(o),isUpdate:!0}))})}function getFileIdsFromMsg(e){return e.file_ids??[e.file_id]}function filesDeleted(e,t,a){let n=new Set((0,t_.A)((0,tg.A)(e.map(getFileIdsFromMsg))));if(!n.size)return;let r=a();"on"===(0,t7._Z)(r,"dlp_async_file_processing")&&t((0,t0.ye)([...n]));let i=(0,tS.Pz)(r)||{},l=[...n].filter(e=>i[e]);if(!l.length)return;let o=(0,s.ZT)(r);o&&(0,tB.E)({teamId:o}).handleFileDeletion(l);let c=l.filter(e=>(0,tL.wL)(i[e])||(0,tL.aK)(i[e]));t((0,ai.T)({fileIds:l})),t(t8({fileIds:l})),t((0,t1.l)({fileIds:l})),updateQuipFileMentions(c,t);let d=l.filter(e=>(0,tL.l7)(i[e]));t((0,al.KJ)({listsIds:d})),"on"===(0,t7._Z)(a(),"custom_file_sections")&&t((0,aA.Mb)({fileIds:l}))}function filesUndeleted(e,t,a){let n=new Set((0,t_.A)((0,tg.A)(e.map(getFileIdsFromMsg))));n.size&&t((0,an.kr)({ids:[...n]}))}function filesProcessingFailed(e,t,a){let n=new Set((0,t_.A)((0,tg.A)(e.map(getFileIdsFromMsg))));if(n.size&&e[0].reason===tD.R.MalwareDetected){let e=(0,s.ZT)(a());(0,tM.hC)(e,[...n][0]);let onGoOrClose=()=>{t(t8({fileIds:[...n]})),t((0,t1.l)({fileIds:[...n]}))};t((0,tH.A)({error:tD.R.MalwareDetected,onClose:onGoOrClose,onGo:onGoOrClose}))}}function fileCommentDeleted(e,t,a){let{file_id:n,comment:r}=e;null!==(0,tS.yd)(a(),n,r)&&t((0,an.iE)({fileId:n,commentId:r}))}function fileOpened(e,t,a){if(!(0,eO.A)())return;let n=a(),r=(0,Y.WR)(n),i=e.map(({event_ts:e,file:{id:t},viewer:{user_id:a}})=>({eventTs:e,fileId:t,viewer:{userId:a}}));(0,tb.A)(i,e=>e.fileId).forEach(({fileId:e,viewer:a})=>{if(t((0,at.K2)({fileId:e,viewer:a})),a.userId!==r&&t((0,ah.o0)({docId:e,viewers:[a.userId]})),a.userId===r){let a=(0,tS.Lp)(n,e,!1);(0,tL.DQ)(a)&&(t((0,ag.k)({mentionCount:0,channelId:(0,tO.p)(e),shouldSuppress:!1})),a?.show_badge&&t((0,an.g4)({fileId:e})))}})}function fileClosed(e,t,a){if(!(0,eO.A)())return;let n=a(),r=(0,Y.WR)(n),i=e.map(({file:{id:e},viewer:{user_id:t}})=>({fileId:e,viewer:{userId:t}}));(0,tb.A)(i,e=>e.fileId).forEach(({fileId:e,viewer:a})=>{let i=(0,tS.Lp)(n,e,!1);t((0,at.l)({fileId:e,viewer:a})),t((0,ah.bL)({docId:e,removedViewers:[a.userId]})),a.userId===r&&i?.show_badge&&t((0,an.g4)({fileId:e}))})}function fanOutSharedEvent(e){return(t,a)=>{t.forEach(t=>e(t,a))}}async function documentChanged(e,t){let a=e.channel,n=await (0,$.Qw)(t,(0,ab.A)({fileId:a,reason:"fetch quip thread id for document event"}));tV.R.doForEachInOrg((0,$.$D)(t),t=>t.onReceiveDocumentEvent(n,e.payload??"","transient"))}async function documentUpdated(e,t){let a=e.file_id,n=await (0,$.Qw)(t,(0,ab.A)({fileId:a,reason:"fetch quip thread id for document event"}));tV.R.doForEachInOrg((0,$.$D)(t),t=>t.onReceiveDocumentEvent(n,e.payload??"","update"))}async function updateQuipFileMentions(e,t){e.length&&e.forEach(e=>{t((0,ag.k)({channelId:(0,tO.p)(e),mentionCount:0,shouldSuppress:!1})),t((0,ag.al)({channelId:(0,tO.p)(e)})),t((0,au.zq)({fileId:e}))})}function channelJoinedProcessFiles(e,t){let a=(0,tS.Pz)(t())||{},n=Object.keys(a).filter(e=>{let t=a[e];return t.access===t9.z.Read||(0,tL.sR)(t)||(0,ty.lv)(t)});n.length>0&&e((0,an.kr)({ids:n,isCacheEviction:!0}))}function channelLeftProcessFiles(e,t){let a=Object.keys((0,tS.Pz)(t())||{});a.length>0&&e((0,an.kr)({ids:a,isCacheEviction:!0}))}function fileFavoriteUpdated(e,t){e?.is_favorited?(t((0,aA.AP)({fileId:e?.file_id})),t(aE({fileId:e?.file_id,collectionId:e?.collection_id}))):(t((0,aA.f_)({fileId:e?.file_id})),t(aC({fileId:e?.file_id,collectionId:e?.collection_id})))}function ensureAndGetDraft(e,t,a){let n;return e.draft_create?.draft&&((n=(0,t$.f3)(a(),e.draft_create.draft.id??""))||(handleDraftCreate({draft:e.draft_create.draft},t,a),n=(0,t$.f3)(a(),e.draft_create.draft_id??""))),n}function removeFileIdsFromProcessingListAndCleanupPlaceholder(e,t,a,n){let r=(0,ao.I)(n,e?.client_msg_id??""),i=[];if(t)i=(0,tP.A)(t)??[];else{let e=(0,as.Ld)(n,r?.channelId??"",r?.ts??"");e&&(i=[...e.files??[],...e.pendingFiles??[]])}a((0,t0.ye)(i)),r&&a((0,t2.W)(r))}function fileDlpCatastrophicErrorProcessing(e,t,a){let n=a();if("on"!==(0,t7._Z)(n,"dlp_async_file_processing"))return;let r=ensureAndGetDraft(e,t,a);removeFileIdsFromProcessingListAndCleanupPlaceholder(e,r,t,n),r&&t((0,t0._Y)(r.client_draft_id??"")),t((0,tH.A)({error:tA.X.DLPFileScanningCatastrophicError,draftId:r?.id??r?.client_draft_id,eventDestinations:r?(0,tR.l7)(r):[{channel_id:e?.channel_id}],onGo:()=>r?t((0,aS.A)({draftId:r?.id??r?.client_draft_id,overrideAndSkipDlpUserWarning:!1})):t((0,eX.o)((0,e0.pr)(e?.channel_id))),goToDrafts:!!r}))}function fileDlpUserWarning(e,t,a){let n=a();if("on"!==(0,t7._Z)(n,"dlp_async_file_processing"))return;let r=ensureAndGetDraft(e,t,a);removeFileIdsFromProcessingListAndCleanupPlaceholder(e,r,t,n),r&&(t((0,t0.ii)(r.client_draft_id??"")),t((0,tH.A)({error:tA.X.DlpFileScanningUserWarning,draftId:r.id??"",eventDestinations:e?.draft_create?.draft?.destinations,dlpCustomMessage:e?.custom_message,onGo:()=>{t((0,aS.A)({draftId:r.id??"",overrideAndSkipDlpUserWarning:!0}))},goToDrafts:!0})))}function fileThumbnailGenerated(e,t,a){let n=a();if(!(0,s.ZT)(n))return;let{file_id:r}=e;if(!r||!(0,tS.Lp)(n,r,!1))return;let i={};e.thumb_url&&(i.thumb_url=e.thumb_url),e.thumb_64&&(i.thumb_64=e.thumb_64),e.thumb_80&&(i.thumb_80=e.thumb_80),e.thumb_160&&(i.thumb_160=e.thumb_160),e.thumb_360&&(i.thumb_360=e.thumb_360),e.thumb_480&&(i.thumb_480=e.thumb_480),e.thumb_720&&(i.thumb_720=e.thumb_720),e.thumb_800&&(i.thumb_800=e.thumb_800),e.thumb_960&&(i.thumb_960=e.thumb_960),e.thumb_1024&&(i.thumb_1024=e.thumb_1024),Object.keys(i).length&&t((0,an.Hi)({fileId:r,thumbnails:i}))}(0,i.dj)("file_created",filesCreated),(0,i.dj)("file_public",filesChanged),(0,i.dj)("file_change",filesChanged),(0,i.dj)("file_shared",filesShared),(0,i.dj)("file_unshared",filesUnshared),(0,i.dj)("file_permissions_removed",filesPermissionsRevoked),(0,i.dj)("file_deleted",filesDeleted),(0,i.dj)("file_processing_failed",filesProcessingFailed),(0,i.dj)("file_opened",fileOpened),(0,i.dj)("file_closed",fileClosed),(0,i.dj)("file_enable_link_sharing",filesChanged),(0,i.dj)("file_disable_link_sharing",filesPermissionsRevoked),(0,i.d1)("file_comment_deleted",fileCommentDeleted),(0,i.uH)("document_change",fanOutSharedEvent(documentChanged)),(0,i.uH)("document_update",fanOutSharedEvent(documentUpdated)),(0,i.d1)("file_channel_canvas_reset",fileChanged),(0,i.dj)("file_permissions_added",filePermissionsAdded),(0,i.dj)("file_permissions_edited",filePermissionsEdited),(0,i.dj)("file_undeleted",filesUndeleted),(0,i.d1)("file_favorite_updated",fileFavoriteUpdated),(0,i.d1)("dlp_user_warning",fileDlpUserWarning),(0,i.d1)("dlp_error_processing",fileDlpCatastrophicErrorProcessing),(0,i.d1)("file_thumbnail_generated",fileThumbnailGenerated);var aI=a(0x103c67cea),aw=a(0xd7f466dd),aT=a(0xb218b979),aN=a(0x1529cf960),aM=a(0x1a6e59198),aR=a(0x20c4967e1),aP=a(0x4fd16568),aL=a(0x11ea712ca),aO=a(0x1aad5a225);let aD=(0,V.Ay)(aL.rd.CONVERT_TO_SHARED,(e,t,a)=>{if(!a)return void(0,W.Ay)({getState:t}).warn("convertToShared: Payload not provided - ignoring");let{channel:n}=a;if(!n||!n.id)return void(0,W.Ay)({getState:t}).warn("convertToShared: Channel and/or channel ID missing - ignoring");let r=t(),i=(0,er.OL)(r,n.id,!1);if(!i||(0,e3.F)(i))return void(0,W.Ay)({getState:t}).warn(`convertToShared: Channel ${n.id} not known, or channel is archived - ignoring`);let l={...n,is_member:i.is_member};e((0,aO.F)({channel:l,reason:aL.rd.CONVERT_TO_SHARED}))});aD.meta={name:"convertToShared",key:"createThunkConvertToShared",description:aL.rd.CONVERT_TO_SHARED};var aF=a(0x12b734ec1),aU=a(0x222ccf6f4),aB=a(0x12167876d),aH=a(0xef408850),aW=a(0xe67fcf33);let aV=(0,V.Ay)(aL.rd.UNARCHIVE_CHANNEL,(e,t,a)=>{let n=t();if(!a||!a.id)return;let r=(0,er.OL)(n,a.id,!1);if(!r||!(0,e3.F)(r))return;let i={...r,is_archived:!1};(0,aW.A)(a,"isMoved")&&(i.is_moved=!0===a.isMoved),i.was_archived_this_session=!1,(0,aW.A)(a,"isFrozen")&&(i.is_frozen=!0===a.isFrozen),(0,aW.A)(a,"frozenReason")&&(i.frozen_reason=a.frozenReason),e((0,aO.F)({channel:i,reason:aL.rd.UNARCHIVE_CHANNEL}))});aV.meta={name:"unarchiveChannel",key:"createThunkUnarchiveChannel",description:aL.rd.UNARCHIVE_CHANNEL};var aG=a(0x22a4fd9db),aq=a(0x1154fe521),aj=a(0xbc99301d),az=a(0x89df441b),aK=a(0x1c07a5a0),a$=a(0x1511d1e5e),aY=a(0x1d3f62751);let aQ=(0,V.Ay)("verify channel is active and call thunk to mark objects as stale",(e,t,{teamId:a,ids:n}={})=>{n.forEach(t=>e((0,aY.Nd)({teamId:a,channelId:t})))});aQ.meta={name:"verifyActiveChannelAndMarkObjectsAsStale",key:"createThunkVerifyActiveChannelAndMarkObjectsAsStale",description:"verify channel is active and call thunk to mark objects as stale"};var aZ=a(0x15e55b5ca),aJ=a(0x22aa624f9);let{addObjects:aX,removeObjects:a0,clearObjects:a1}=a(0xebd62653).o1;var a2=a(0xf2dbd4fb),a4=a(0x1b222590c),a5=a(0x9271cc31),a3=a(0x9168058f),a6=a(0x41a72513);let a8="CHANNEL-STATUS";function getMovedAndFrozenDataFromPayload(e){let t={};return e?.is_moved&&(0,tr.z)(e.is_moved)&&(t.isMoved=!0===e.is_moved),e?.is_frozen&&(t.isFrozen=!0===e.is_frozen,t.frozenReason=e.is_frozen?e.frozen_reason:void 0),e.is_frozen||(0,eq.A)(e?.is_frozen)||(t.isFrozen=!1),e.is_moved||(0,eq.A)(e?.is_moved)||(t.isMoved=!1),t}function channelArchived(e,t,a){let n,{channel:r}=e,i=a(),l=(0,er.gT)(i,r)&&(0,er.OL)(i,r);if(!l)return void(0,W.Ay)({getState:a}).warn(`Received archive event for an unknown channel: ${r}`);if((0,e3.F)(l))return;(0,W.Ay)({getState:a}).info(a8,`Archived channel ${r}`),(0,O.rW)(l)?n=!(0,tn.DM)(i)&&(0,e6.bl)(l):(0,O.Zp)(l)&&(n=!!(0,e2.nT)(l));let o={id:r,wasArchivedThisSession:n},s=getMovedAndFrozenDataFromPayload(e);t((0,aP.K)({...o,...s})),t((0,aI.d3)({channelId:r}))}function channelMembershipChanged(e,t,a){if(!e)return;let n=a(),r=(0,s.ZT)(n)||"";(0,W.Ay)({teamId:r,label:a8}).info(`Channel ${e} known to have changed membership; marking as stale so it will be refetched when needed`),(0,aR.D1)(r,[e]),t((0,eu.NA)(e)),(0,ec.D1)(r,[e]),t(aQ({teamId:r,ids:[e]})),(0,tn.DM)(n)&&((0,a$.D1)(r,(0,a$.Hw)(r)),(0,a$.mY)(r,[(0,Y.WR)(n)]))}function channelChanged(e,t,a){let n=e?e.channel:null;if(!n||!n.id){let t=(0,s.ZT)(a()),n=(0,W.Ay)({teamId:t,label:a8});try{n.warn(`Received a backfill with no channel ID: ${JSON.stringify(e)}`)}catch(e){n.warn("Tried to log a backfill with no channelID, but it errored")}return}channelMembershipChanged(n.id,t,a)}function channelCreated({channel:e},t,a){if((0,O.LI)(e)){t((0,aO.F)({channel:e})),t((0,td.b)({id:e.id,opened_this_session:!0})),t((0,tl.u)({channelId:e.id,openedThisSession:!0}));return}(0,tn.DM)(a())||((0,W.Ay)({getState:a}).info(a8,`Created channel ${e.id}`),t((0,aO.F)({channel:e})))}async function channelOpened({channel:e,user:t},a){a(tm({channel:e,user:t}))}function recordChannelOpened({channel:e},t,a){let n=(0,er.OL)(a(),e);(0,e2.nT)(n)||t((0,eZ.H)({channel:n,reason:"record-channel-opened-rtm"}))}async function channelClosed({channel:e,converted_to:t},a,n){let r,i=n();if(!((0,er.gT)(i,e)&&(0,er.OL)(i,e)))return void(0,W.Ay)({getState:n}).warn(`Unknown channel ${e}`);t&&(a((0,aT.b)({channelId:e,ts:void 0})),r=t,a((0,aN.Kc)({oldChannelId:e,newChannelId:t})));let l=(0,a5.e6)(i);if((0,a5.F8)(i,{tab:l,container:ak.mq.Primary})?.id===e)if((0,Y.TZ)(n())&&r)a((0,to.A)({id:r}));else{let e=(0,aZ.EI)(i,{mainView:!0});await a((0,eX.o)((0,e0.pr)(e)))}a((0,td.b)({id:e,is_open:!1}))}function channelDeleted({channel:e,new_channel_id:t},a,n){let r=n(),i=(0,er.gT)(r,e)&&(0,er.OL)(r,e),l=(0,W.Ay)({getState:n,label:a8}),o=(0,a3.l)(r,{filterFunction:({view:t})=>t.id===e});if(!i)return void l.warn(`Received deleted event for an unknown channel: ${e}`);t&&a((0,aN.Kc)({oldChannelId:e,newChannelId:t})),a((0,aq.f)({channelId:e}));let c=(0,s.ZT)(r)||"";if((0,aj.Dq)(c,e),t&&o?.length){if(l.info(`Received deleted event for converting channel from ${e} to ${t}`),o?.length){let n;for(let{view:r,windowId:i}of o)n=i===ak.N2?a((0,e$.k)({windowId:i,id:r?.id,viewType:eY.D.Channel})):a((0,eK.B)({windowId:i,id:r?.id,viewType:eY.D.Channel})),n?.catch(a=>l.error(`Error handling deleted event for converting channel from ${e} to ${t}:`,a)).finally(()=>{a((0,aM.dM)({ids:[e]}))})}return}if((0,eO.A)()&&(0,a6.T2)(r))for(let{windowId:e}of o)if(e===ak.N2){let e=(0,aZ.EI)(n(),{mainView:!0});a((0,eX.o)((0,e0.pr)(e)))}else{let t=(0,e1.ZF)(e);t?.cleanup()}l.info(`Removing channel ${e}`),a((0,aM.dM)({ids:[e]})),a((0,aI.d3)({channelId:e}))}function imDeleted({channel:e},t,a){let n=a(),r=(0,er.gT)(n,e)&&(0,er.OL)(n,e,!1),i=(0,W.Ay)({getState:a,label:a8});if(!r)return void i.warn(`Received im_deleted event for an unknown im ${e}, ignoring`);if(!(0,O.LI)(r))return void i.warn(`Received im_deleted event for a non-im channel ${e}, ignoring`);let l=(0,e5.e)(r)||"",o=(0,M.nv)(n,l,{preferNonExistentToNull:!1,fetchIfMissing:!1});!o||(0,tt.z1)(o)?i.warn(`Received im_deleted event for im (${e}) with non-existent or unknown member (${l}), ignoring.`):(i.info(`Received im_deleted event for im (${e}) with member (${l}), removing member (${l}).`),t((0,aK.yq)({ids:[l]}))),i.info(`Received im_deleted event for im (${e}) with member (${l}), removing channel (${e}).`),t((0,aM.dM)({ids:[e]})),t((0,ti.n)({channelId:e}))}function channelJoined({channel:e,old_channel_id:t},a,n){(0,W.Ay)({getState:n}).info(a8,`You joined channel ${e.id}`);let r=n();((0,O.yz)(e)||(0,O.Zp)(e))&&!(0,ta.ju)(e)&&(0,er.gT)(r,e.id)&&(0,er.OL)(r,e.id)&&(0,W.Ay)({getState:n}).warn(`Received join event for an mpim or group we already know about (${e.id}); ignoring it.`);let i={...e,is_member:!0};void 0!==t&&(i.isConverted=!0);let l=a((0,aO.F)({channel:i}));if(a((0,aM.Cg)(l)),(0,tn.DM)(r)){let e=(0,s.ZT)(r)||"";(0,a$.D1)(e,(0,a$.Hw)(e)),(0,a$.mY)(e,[(0,Y.WR)(r)])}a(aX({objects:[{id:e.id,dateJoined:Date.now()}]})),(0,ej.A)(()=>{channelJoinedProcessFiles(a,n)},2e3)}function channelLeft({channel:e},t,a){(0,W.Ay)({getState:a}).info(a8,`You left channel ${e}`);let n=a(),r=(0,er.gT)(n,e)&&(0,er.OL)(n,e);if(!r)return;(0,e6.bl)(r)&&t((0,aF.n)(r));let i=(0,tn.DM)(n);if(((0,O.Zp)(r)||i)&&t((0,aM.dM)({ids:[r.id]})),(0,O.Zp)(r)&&t((0,az.Ay)(e)),i){let e=(0,s.ZT)(n)||"";(0,a$.D1)(e,(0,a$.Hw)(e)),(0,a$.mY)(e,[(0,Y.WR)(n)])}t(a0({ids:[r.id]})),t((0,a2.Pw)({channelId:e})),(0,ej.A)(()=>{channelLeftProcessFiles(t,a)},2e3)}function channelRenamed({channel:e},t,a){let n=a();(0,er.gT)(n,e.id)&&(0,er.OL)(n,e.id)?((0,W.Ay)({getState:a}).info(a8,`Renamed channel ${e.id}`),t((0,aU.c)({id:e.id,name:e.name,name_normalized:e.name_normalized,is_mpim:(0,O.yz)(e)||!1,_name_lc:e.name?.toLowerCase()}))):(0,W.Ay)({getState:a}).warn(`Received rename event for an unknown channel: ${e.id}`)}function channelPurposeChanged({channel:e,user:t,ts:a,purpose:n},r,i){let l=i();(0,er.gT)(l,e)&&(0,er.OL)(l,e)&&e?((0,W.Ay)({getState:i}).info(a8,`${t} changed purpose for channel ${e}`),r((0,aB.G)({id:e,purpose:{creator:t,last_set:a,value:n||""}}))):(0,W.Ay)({getState:i}).warn(`Received channel purpose change event for an unknown channel: ${e}`)}function channelUnarchived(e,t,a){let{channel:n}=e,r=a(),i=(0,er.gT)(r,n)&&(0,er.OL)(r,n);i?(0,e3.F)(i)&&((0,W.Ay)({getState:a}).info(a8,`Unarchived channel ${n}`),t(aV({id:n,...getMovedAndFrozenDataFromPayload(e)}))):(0,W.Ay)({getState:a}).warn(`Received unarchive event for an unknown channel: ${n}`)}function channelTopicChanged({channel:e,user:t,ts:a,topic:n},r,i){let l=i();(0,er.gT)(l,e)&&(0,er.OL)(l,e)&&e?((0,W.Ay)({getState:i}).info(a8,`${t} changed topic for ${e}`),r((0,aH.$)({id:e,topic:{creator:t,last_set:a,value:n||""}}))):(0,W.Ay)({getState:i}).warn(`Received topic change event for an unknown channel: ${e}`)}function conversationMarked(e,t,a){let{channel:n,ts:r,type:i}=e,l=a(),o=(0,er.gT)(l,n)&&(0,er.OL)(l,n);o&&"group_marked"===i&&(0,O.yz)(o)||((0,eQ.Jz)(l)&&(0,eg.uV)(r,n),t((0,tu.$4)({id:n,ts:r})))}function channelConvertedToShared(e,t,a){let n=(0,W.Ay)({getState:a,label:a8}),r=e&&e.channel&&e.channel.id;if(!r)return void n.warn("Received channel_converted_to_shared without a channel, ignoring.");let i=a();(0,er.gT)(i,r)&&(0,er.OL)(a(),r)?(0,e8.t)(e.channel)||(0,e7.S)(e.channel)?(n.info(`Received channel_converted_to_shared for ${r}`),t(aD({channel:e.channel}))):n.warn(`Received channel_converted_to_shared for a non-org-shared, non-global-shared channel: ${r}, ignoring.`):n.info(`Received channel_converted_to_shared on missing channel: ${r}, ignoring.`)}function groupConvertedToShared({group:e,...t},a,n){let r=(0,W.Ay)({getState:n,label:a8});e?channelConvertedToShared({...t,channel:e},a,n):r.warn("Received group_converted_to_shared without a group, ignoring.")}function channelHistoryChanged(e,t,a){let n=e&&e.type,r=e&&e.channel;if(!r)return void(0,W.Ay)({getState:a}).warn(`Received ${n} without a 'channel' id.`);let i=a(),l=(0,er.gT)(i,r)&&(0,er.OL)(i,r);if(!l)return void(0,W.Ay)({getState:a}).warn(`Received ${n} for an unknown channel: ${r}`);if(t((0,aw.fp)({channelId:r,timestamp:e.latest})),t(tc({channelId:r,eventTs:e?.event_ts})),(0,O.yz)(l)){let e=(0,s.ZT)(i)||"";(0,a4.D1)(e),(0,aJ.G)().markObjectsAsStale(e,[r])}if(n){let e="im_history_changed"===n;(e||"mpim_history_changed"===n)&&(0,e9.f5)(i,l)&&t((0,eJ.iS)({channelId:l.id,noMembers:!0,timezoneCount:!1,displayCounts:!1,reason:e?"imHistoryChanged_isMigrating":"mpimHistoryChanged_isMigrating"})).then(({channel:e})=>{e&&t((0,aO.F)({channel:{...e,is_migrating:!!e.is_migrating}}))})}}function channelOrgAccessChanged({channel:e,is_global_shared:t,teams:a,type:n},r,i){let l=i(),o=(0,W.Ay)({getState:i,label:a8});if(!n)return void o.warn("Received teams_*_shared_channel without a type, ignoring.");if(!(0,te.k)(l))return void o.warn(`Received ${n} on a non-enterprise, ignoring.`);if(!e)return void o.warn(`Received ${n} without a channel, ignoring.`);let c=(0,er.OL)(i(),e,!1);if(!c)return void o.info(`Received ${n} on missing channel: ${e}, ignoring.`);if(!(0,e8.t)(c))return void o.warn(`Received ${n} on non-org shared channel: ${e}, ignoring.`);if(o.info(`Received ${n} for ${e}`),"teams_left_shared_channel"===n){let t=(0,s.kN)(l);if(!t?.some(e=>a.includes(e))){o.info(`Handling ${n}, all my workspaces (${t}) were removed from ${e}, removing channel from store.`),r((0,aM.dM)({ids:[e]}));return}}let d=a;if("teams_joined_shared_channel"===n&&!t){let e=(0,e4.R)(l,c)||[];d=(0,ez.A)([...d,...e])}r((0,aG.a)({channelId:e,orgWide:t,internalTeamIds:d}))}let a7={};Object.defineProperty(a7,"channelArchived",{get:()=>channelArchived,set:e=>{channelArchived=e}}),Object.defineProperty(a7,"channelUnarchived",{get:()=>channelUnarchived,set:e=>{channelUnarchived=e}}),Object.defineProperty(a7,"channelMembershipChanged",{get:()=>channelMembershipChanged,set:e=>{channelMembershipChanged=e}}),(0,i.d1)("channel_archive",channelArchived),(0,i.d1)("channel_created",channelCreated),(0,i.d1)("channel_rename",channelRenamed),(0,i.d1)("channel_unarchive",channelUnarchived),(0,i.d1)("group_archive",channelArchived),(0,i.d1)("group_rename",channelRenamed),(0,i.d1)("group_unarchive",channelUnarchived),(0,i.d1)("mpim_open",channelOpened),(0,i.d1)("record_channel_open",recordChannelOpened),(0,i.d1)("im_created",channelCreated),(0,i.d1)("im_open",channelOpened),(0,i.d1)("mpim_close",channelClosed),(0,i.d1)("im_close",channelClosed),(0,i.d1)("record_channel_close",channelClosed),(0,i.d1)("channel_marked",conversationMarked),(0,i.d1)("group_marked",conversationMarked),(0,i.d1)("mpim_marked",conversationMarked),(0,i.d1)("im_marked",conversationMarked),(0,i.d1)("teams_joined_shared_channel",channelOrgAccessChanged),(0,i.d1)("teams_left_shared_channel",channelOrgAccessChanged),(0,i.d1)("channel_history_changed",channelHistoryChanged),(0,i.d1)("im_history_changed",channelHistoryChanged),(0,i.d1)("mpim_history_changed",channelHistoryChanged),(0,i.d1)("group_history_changed",channelHistoryChanged),(0,i.d1)("im_deleted",imDeleted),(0,i.d1)("channel_left",channelLeft),(0,i.d1)("channels_bulk_leave_completed",bulkLeaveChannelsCompleted),(0,i.d1)("channel_changed",channelChanged),(0,i.d1)("channel_deleted",channelDeleted),(0,i.d1)("channel_joined",channelJoined),(0,i.d1)("group_deleted",channelDeleted),(0,i.d1)("group_joined",channelJoined),(0,i.d1)("group_left",channelLeft),(0,i.d1)("mpim_joined",channelJoined),(0,i.d1)("channel_converted_to_shared",channelConvertedToShared),(0,i.d1)("group_converted_to_shared",groupConvertedToShared);var a9=a(0x1a525ed2c);function handleChannelContextBar(e,t,a){let{action_url:n,channel:r,toast_type:i}=e??{};if("dnd-override"===i){(0,W.Ay)({getState:a}).info("CHANNEL_CONTEXTBAR",`setting dnd-override for ${r}. Has actionUrl ${!!n}`),t((0,a9.Nv)({channelId:r,overrideUrl:n}));return}(0,W.Ay)({getState:a}).warn("CHANNEL_CONTEXTBAR",`Unrecognized type "${i}"`)}(0,i.d1)("channel_contextbar",handleChannelContextBar);var ne=a(0x6258badf);function extractChannelEmail(e){return{...(0,ne.A)(e,["type","conversation_id","event_ts","ts"]),channelId:e.conversation_id}}function handleChannelEmailAdded(e,t,a){let n=a(),r=extractChannelEmail(e);(0,e_.Z)(n)?.viewSet?.primary?.id===r.channelId&&t((0,aI.$G)(r))}function handleChannelEmailChanged(e,t){let a=extractChannelEmail(e);t((0,aI.J6)(a))}function handleChannelEmailRemoved(e,t){t((0,aI.d3)({channelId:e.conversation_id}))}(0,i.d1)("channel_address_added",handleChannelEmailAdded),(0,i.d1)("channel_address_changed",handleChannelEmailChanged),(0,i.d1)("channel_address_removed",handleChannelEmailRemoved);var nt=a(0x1be9380c8),na=a(0x115aa5ac3),nn=a(0x169b11478),nr=a(0x17df192e7),ni=a(0x11692ff38),nl=a(0x1c7ceb697),no=a(0x24b37e04d),ns=a(0xb9604b6),nc=a(0xafce781a),nd=a(0x5b1935a6);let nm=(0,V.Ay)("Fetch target section for the coachmark",async(e,t,{targetSectionId:a})=>{a&&(await e((0,nc.iR)({event:{type:nd.jo.USERGROUP_SECTION_ADDED}})),(0,ns.Hp)(t(),nd.xu.EDUCATION_USER_GROUP_SECTIONS_COACHMARK)===nd.ze.EDUCATION_USERGROUP_SECTIONS&&e((0,no.pc)(a)))});nm.meta={name:"triggerAddedUserGroupSectionCoachmark",key:"createThunkTriggerAddedUserGroupSectionCoachmark",description:"Fetch target section for the coachmark"};var nu=a(0x235f8ef73),np=a(0x1e7b3305d),nh=a(0x11bcaa7eb),n_=a(0x1853f0e7c),nf=a(0x40c0d834),nb=a(0x1faa3f1ac),ng=a(0x2501a2cee),ny=a(0x6e87d4ec),nA=a(0x12f1a6c38),nx=a(0x188544c76),nE=a(0x226892387),nC=a(0x1d104c491),nk=a(0xab9fedea),nv=a.n(nk);let nS=new E.Ay("slackforce"),nI={onClick:{enableClogAction:!0},elementName:"bulk-grid-contacts-ready-toast-link"},BulkGridContactsReadyToast=({contactsListCompositeId:e})=>{let t=(0,nE.d4)(eA.Ix),a=(0,nA.o)(),n=(0,f.useCallback)(()=>{let{rawRecordId:t,salesforceOrgId:n}=(0,nx.D)(e);a({id:t,salesforceOrgId:n,label:"Contacts",objectType:nC.Dj.Contact},{openInHome:!0})},[e,a]);return e?f.createElement(nf.A,{clogImpression:!0,eventId:p.EventId.LOB_DOWNMARKET,uiComponentName:p.UiComponentName.BULK_GRID_CONTACTS_READY_TOAST},f.createElement(ny.A,{showCloseButton:!0},f.createElement("div",{className:nv().contactsReadyToastContent},f.createElement("span",{className:nv().contactsReadyToastIcon},f.createElement(ng.Ah,{name:"check",color:(0,n_.HK)("DT_COLOR_CONTENT_INV_HGL_2"),inline:!0,size:"18"})),f.createElement("div",null,f.createElement("div",null,t?nS.t("Your contacts list is ready to go."):"Your contacts list is ready to go."),f.createElement(nb.A,{onClick:n,autoClogProps:nI},t?nS.t("View contacts"):"View contacts"))))):null};BulkGridContactsReadyToast.displayName="BulkGridContactsReadyToast";var nw=a(0x6ea1f0ed);let nT=(0,V.Ay)("Shows the contacts ready toast",(e,t,{contactsListCompositeId:a})=>{let n=t();(0,eA.Ix)(n)&&(e((0,nw.Z)()),e((0,th.M)({element:f.createElement(BulkGridContactsReadyToast,{contactsListCompositeId:a})})))});nT.meta={name:"showContactsReadyToast",key:"createThunkShowContactsReadyToast",description:"Shows the contacts ready toast"};(0,i.d1)("channel_section_upserted",(e,t,a)=>{let n=e.channel_section_type;if(!(0,eQ.cq)(a())&&n===na.Ri.UserGroup)return;let r=(0,nl.t)({...e,type:e.channel_section_type},{experimentExternalWorkspacePilotGroupOn:(0,nn.i)(a())});if(n===na.Ri.UserGroup&&e.usergroup_id){let a=[e.usergroup_id];t((0,nh.A)({userGroupIds:a})),r?.id!==void 0&&t(nm({targetSectionId:r?.id}))}r&&t((0,aN.UP)({channelSection:r}))}),(0,i.d1)("channel_section_deleted",({channel_section_id:e}={},t)=>{t((0,aN._m)({channelSectionId:e}))}),(0,i.d1)("channel_sections_channels_upserted",({channel_section_id:e,channel_ids:t}={},a)=>{a((0,aN.wX)({channelSectionId:e,channelIds:t}))}),(0,i.d1)("channel_sections_channels_removed",({channel_section_id:e,channel_ids:t}={},a)=>{a((0,aN.P)({channelSectionId:e,channelIds:t}))}),(0,i.d1)("channel_section_reset",(e,t,a)=>{let n=(0,s.ZT)(a());n&&(0,nr.D1)(n)}),(0,i.d1)("channel_sections_entities_upserted",(e,t,a)=>{let n=e.channel_section_id,r=e.entities.map(e=>({...e,channel_section_id:n})),i=a();if((0,nt.pc)(i)&&n&&r?.length&&(t((0,ni.y)({entities:r})),(0,eA.Ix)(i))){let e=r[0],a=r[1],n=e?.entity_id,i=a?.entity_id;t((0,nu.y)({status:np.M.COMPLETE,...i&&{contactsListCompositeId:i},...n&&{accountsListCompositeId:n}})),t(nT({contactsListCompositeId:i}))}}),(0,i.d1)("channel_sections_entities_removed",(e,t,a)=>{let n=e.channel_section_id,r=e.entities.map(e=>({entityType:e.entity_type,entityId:e.entity_id}));(0,nt.pc)(a())&&n&&r?.length&&r.forEach(e=>{t((0,aN.lO)({entity:e}))})});var nN=a(0xbb0c5132);function handleChannelToast(e,t,a){let{channel:n,dismissed_snackbar_ts:r,text:i}=e??{};i?(r&&t((0,a9.wJ)({channelId:n})),t((0,th.M)({element:f.createElement(nN.Ay,null,i)}))):(0,W.Ay)({getState:a}).warn("CHANNEL_TOAST",'Missing required "text" param')}(0,i.d1)("channel_toast",handleChannelToast);var nM=a(0x162afc153),nR=a(0x1fea7ac86),nP=a(0x1046b9f07);function getThrottleLoadSlashCommands(e,t){if(!n){let e=(0,nR.A)(6e4,0,1);n=(0,nM.A)(()=>{(0,c.n0)((0,s.ZT)(t()))},e,{leading:!1,trailing:!0})}return n}function commandsChanged(e,t,a){let{commands_removed:n,commands_updated:r,commands_cache_ts:i}=e;n||r?((0,t4.A)(n,e=>t((0,nP.mR)({commandName:e.name}))),r&&t((0,nP.RQ)({commands:r,cacheTs:i}))):getThrottleLoadSlashCommands(t,a)()}(0,i.d1)("commands_changed",commandsChanged);var nL=a(0x1a6b96b0f);function handleRecentStatusChanged(e,t){let{statuses:a}=e??{};t((0,nL.C)(a))}(0,i.d1)("recent_status_changed",handleRecentStatusChanged);var nO=a(0x1626b8eae),nD=a(0x22562bec6),nF=a(0x17a41206b);let nU="RELOAD",nB=!1;async function awaitOnline({isClientOnline:e,logger:t}={}){return!!e()||(t.info(nU,"Waiting to come back online to reload"),(0,nD.A)("online"))}async function awaitBlur({hasFocus:e,logger:t}={}){return!e()||(t.info(nU,"Waiting for blur event to reload"),(0,nD.A)("blur").timeout(108e5).catch(()=>{t.info(nU,"Waited the max 10800000 ms for a blur event"),nB=!0}))}function isSafeToReloadRightNow({isClientOnline:e,hasFocus:t}={}){return e()&&!t()}async function awaitSafeTimeToReload({isClientOnline:e,hasFocus:t,logger:a,timesCalled:n=0}={}){return!!isSafeToReloadRightNow({isClientOnline:e,hasFocus:t})&&0===n||U.K.all([awaitOnline({isClientOnline:e,logger:a}),awaitBlur({hasFocus:t,logger:a})]).tap(()=>{a.info(nU,"Online and unfocused, waiting 10000 ms to reload")}).delay(1e4).then(()=>!!isSafeToReloadRightNow({isClientOnline:e,hasFocus:t})||(a.info(nU,"Waited 10000 ms but now it is no longer safe to reload, trying again",{isClientOnline:e(),hasFocus:t(),timesCalled:n}),awaitSafeTimeToReload({isClientOnline:e,hasFocus:t,logger:a,timesCalled:n+1})))}function forceReload(e,t,a){let n=(0,W.Ay)({getState:a});awaitSafeTimeToReload({isClientOnline:()=>(0,nF.Pb)(a()),hasFocus:()=>!nB&&document.hasFocus(),logger:n}).then(()=>{let e="Online and unfocused, completing cold boot reload";n.info(nU,e),(0,eD.As)({reason:e})})}(0,i.d1)("force_reload",(0,nO.A)(forceReload)),(0,i.d1)("user_device_access_changed",(e,t,a)=>{forceReload(e,t,a)});var nH=a(0x7c2646f7);function dndUpdated({user:e},t,a){let n=a(),r=(0,s.ZT)(n)??"";(0,nH.D1)(r,[e])}function dndUpdatedUser({user:e},t,a){let n=a(),r=(0,s.ZT)(n)??"";(0,nH.D1)(r,[e])}function dndInvalidatedRtmHandler(e,t){if(!e?.length)return;let a=e.map(({user:e})=>e).filter(e=>!!e).map(e=>e.id);(0,nH.D1)(t,a)}(0,i.d1)("dnd_updated",dndUpdated),(0,i.d1)("dnd_updated_user",dndUpdatedUser),(0,i.uH)("dnd_invalidated",dndInvalidatedRtmHandler);var nW=a(0x5294713e);function downmarketCrmEnabled(e,t){t((0,nW.tt)(e.is_enabled))}(0,i.d1)("downmarket_crm_enabled",downmarketCrmEnabled);var nV=a(0xb3ae72ca),nG=a(0x87aa85af),nq=a(0x1ae9b422e);function isAddEvent(e){return"add"===e.subtype}function isRemoveEvent(e){return"remove"===e.subtype}function isRenameEvent(e){return"rename"===e.subtype}function batchEmojiChanged(e,t){if(!e?.length)return;let a=(0,$.oK)(t);if(!a)return;let{dispatch:n,getState:r}=a,i=r();e.forEach(e=>{let a=[],r=[];if(isAddEvent(e))r.push(e.name);else if(isRemoveEvent(e)){let t=e.names??[];a=t,r=t}else if(isRenameEvent(e)){let t=e.old_name;a.push(t),r.push(t),(0,nq.TS)(i).forEach(e=>{e.isAlias&&e.aliasOf===t&&r.push(e.name)})}a.length&&n((0,nG.j0)({ids:a})),r.length&&(0,nV.D1)(t,r)})}(0,i.uH)("emoji_changed",batchEmojiChanged);var nj=a(0x1b86f8de5);(0,i.d1)("emoji_collection_added",(e,t,a)=>{if(!e)return;let n=a(),r=(0,W.Ay)({teamId:(0,s.ZT)(n)||""}),{collection:i}=e;if(!i)return void r.warn("RTM","emoji_collection_added: missing collection object");let l=i.collection_id;l?t((0,nj.o2)({collectionId:l.toString(),emoji:i.emoji})):r.warn("RTM","emoji_collection_added: missing collection id")}),(0,i.d1)("emoji_collection_removed",(e,t,a)=>{if(!e)return;let n=a(),r=(0,W.Ay)({teamId:(0,s.ZT)(n)||""}),i=e.collection_id;i?t((0,nj.$x)({collectionId:i.toString()})):r.warn("RTM","emoji_collection_removed: missing collection id")});var nz=a(0xbea6f915);function enterpriseRename({name:e}={name:void 0},t){t((0,nz.Ek)(e)),t((0,nz.Mx)(e))}(0,i.d1)("enterprise_rename",enterpriseRename);let nK="RTM-SHARED-CHANNELS";function externalOrgMigrationFinished(e,t,a){let{team:n}=e;(0,W.Ay)({getState:a,label:nK}).info(`Received external_org_migration_finished for ${n.id}.`),t((0,nz.no)({teamId:n.id,externalOrgMigrated:!0,isMigrating:!1})),t((0,nz.eF)())}function externalOrgMigrationStarted(e,t,a){let{team:n}=e;(0,W.Ay)({getState:a,label:nK}).info(`Received external_org_migration_started for ${n.id}.`),t((0,nz.Ry)({teamId:n.id,isMigrating:n.is_migrating})),t((0,nz.eF)())}(0,i.d1)("external_org_migration_finished",externalOrgMigrationFinished),(0,i.d1)("external_org_migration_started",externalOrgMigrationStarted);var n$=a(0xa37a2662);function fileCollectionUpdated(e,t){let{collection:a}=e;a?.id&&t((0,aA.IX)((0,n$.a1)(a)))}function fileCollectionDeleted(e,t){let{collection:a}=e;a?.id&&t((0,aA.rV)({collectionId:a.id}))}function fileCollectionCreated(e,t){let{collection:a}=e;a?.id&&t((0,aA.CQ)((0,n$.a1)(a)))}(0,i.d1)("file_collection_updated",fileCollectionUpdated),(0,i.d1)("file_collection_deleted",fileCollectionDeleted),(0,i.d1)("file_collection_created",fileCollectionCreated);var nY=a(0x36e1a49c),nQ=a(0x237b52624),nZ=a(0x24f9c89b6),nJ=a(0x17e2f11b6),nX=a(0x10bb8e96f),n0=a(0xb76add93),n1=a(0x22f6a086f),n2=a(0x84f6646a);function hermesTriggerUpdated(e,t,a){let n=a(),{trigger_id:r,is_deleted:i,is_workflow_published:l}=e,o=(0,s.ZT)(n);if(!o)return;let c=(0,n1.bn)(n,{triggerId:r},!1);(!c||c.error)&&(c=(0,nJ.x)(n,{triggerId:r},!1));let d=c?.workflow?.workflow_id;(i||!l)&&(t((0,nX.d1)({triggerId:r})),t((0,nX.L4)({triggerId:r})),d&&t((0,nX.Lj)({workflowId:d})),t((0,nQ.v)({triggerId:r}))),(0,n0.X)().markObjectsAsStale(o,[r]),(0,nZ.z)().markObjectsAsStale(o,[r]),d&&(0,n2.G)().markObjectsAsStale(o,[d]),t((0,nX.tl)({triggerId:r})),(0,nY.X)(n).reset()}(0,i.d1)("hermes_trigger_updated",hermesTriggerUpdated),a(0x23b840b30);var n4=a(0x7d48dd65),n5=a(0x15ce7705d),n3=a(0x22190f6c),n6=a(0x82c0a263),n8=a(0x168f7af82);(0,i.d1)("invited_user_created",(e,t,a)=>{let n=a();if(!e)return;let r=(0,h.eo)({getState:a}),i=(0,W.Ay)({getState:a}),{email:l,user_encoded_id:o}=e;l&&o&&(0,n8.tQ)(n,{email:l}).forEach(e=>{let a=(0,t$.YI)(n,e);if(!a)return void i.error(Error(`Draft not found: ${e}`));let s=[...(0,tR.KL)(a),o],c=(0,tR.h0)({memberIds:s}),d={...a,destinations:c};t((0,t6.i)({draft:d,reason:"ComposerPage:inviteMemberFromCompose"}));let m=(0,n8.CO)(n,{draftId:e}),u=(0,n4.A)(m,e=>(0,n5.gQ)(e)!==l);t((0,n6.w)({draftId:e,pendingDestinations:u})),r.track(p.EventId.COMPOSE_FLOW,{draft_id:e,draft_invited_member_id:o,contexts:{ui_context:{ui_step:p.UiStep.COMPOSE_FLOW_INVITE_FROM_EMAIL_RESOLVED}}}),(0,tK.He)(n,{draftId:e})&&(0,tq.A)(u)&&(t((0,tj.qA)({draftId:e})),(0,tK.jq)(n,{draftId:e})&&t((0,n3.K)({draft:d})))})});var n7=a(0x225c42ab6),n9=a(0x14ebefff8);function issueChange(e,t,a){let{issue:n}=e;t((0,n7.D8)({...n,state:(()=>{switch(n.state){case"open":case"resolved":case"read":case"unread":return n.state;default:return"open"}})()}));let r=a(),i=(0,s.ZT)(r);(0,$.Qw)(i,(0,n9.w)())}(0,i.d1)("issue_change",issueChange);var re=a(0x14fde54c),rt=a(0x57d5a5b5),ra=a(0x8d0a2ff1),rn=a(0x5ec6afa5);let rr=(0,V.Ay)("Maybe apply AI generated Todos action item",async(e,t,{listId:a,recordId:n,todoBlocks:r})=>{let i=t();(0,eA.tl)(i)&&(0,ra.XB)(i,a,n)&&e((0,rn.k)({listId:a,rowId:n,columnKey:"name",value:r}))});rr.meta={name:"maybeApplyAiTodoSummary",key:"createThunkMaybeApplyAiTodoSummary",description:"Maybe apply AI generated Todos action item"};var ri=a(0x2503ae161);let rl=(0,V.Ay)("Maybe builds the reference tracker for my tasks list",async(e,t,{myTasksListId:a})=>{let n=t();if(!(0,eA.tl)(n))return;let r=(0,tC.N$)(n);a===(r?.[0]??void 0)&&e((0,ri.g)())});rl.meta={name:"maybeBuildMyTasksListReferenceTracker",key:"createThunkMaybeBuildMyTasksListReferenceTracker",description:"Maybe builds the reference tracker for my tasks list"},(0,i.d1)("list_record_removed",(e,t,a)=>{let n=a();(0,eA.Fh)(n)&&(t((0,al.GI)({listId:e.list_id,id:e.id})),t(rl({myTasksListId:e.list_id})))}),(0,i.d1)("list_records_archived",(e,t,a)=>{let n=a();(0,eA.Fh)(n)&&e.ids?.forEach(n=>{t((0,al.k$)({listId:e.list_id,id:n,restore:e.restore,listsPerfTwoEnabled:(0,eA.SP)(a())}))})}),(0,i.d1)("list_record_updated",(e,t,a)=>{let n=a();if(!(0,eA.Fh)(n))return;if(e.deleted)return void t((0,al.GI)({listId:e.list_id,id:e.id}));let r=(0,re.wy)(n,e.record?.fields||[]),i=(0,re.yJ)({listId:e.list_id,state:n});if(!e.record)return;let l=(0,rt.jG)(e.record,i);if(t((0,al.$W)({listId:e.list_id,record:l,listsPerfTwoEnabled:(0,eA.SP)(a())})),r){let a={listId:e.list_id,record:l};t((0,al.FV)({myItem:a}))}}),(0,i.d1)("list_record_created",(e,t,a)=>{let n=a();if(!(0,eA.Fh)(n))return;let r=(0,re.wy)(n,e.record?.fields||[]),i=(0,re.yJ)({listId:e.list_id,state:n}),l=(0,rt.jG)(e.record,i);if(t((0,al.$W)({listId:e.list_id,record:l,listsPerfTwoEnabled:(0,eA.SP)(a())})),r){let a={listId:e.list_id,record:l};t((0,al.FV)({myItem:a}))}t(rl({myTasksListId:e.list_id}))}),(0,i.d1)("list_cells_updated",(e,t,a)=>{let n=a(),r=(0,re.yJ)({listId:e.list_id,state:n}),i=e.list_id,l=(0,ra.vS)(a(),i);if(l){if(e.column){let a=(0,tS.Lp)(n,i),r=a&&a.list_metadata?.schema.findIndex(t=>t.key===e.column?.key);if(r&&-1!==r){let n=a.list_metadata?.schema?.map((t,a)=>a!==r?t:e.column);t((0,an.sM)({...a,list_metadata:{...a.list_metadata,schema:n}}))}}t((0,al.VR)({list:l,cells:e.cells,shouldUseTimestamp:r,listsPerfTwoEnabled:(0,eA.SP)(a())})),t(rl({myTasksListId:e.list_id}))}}),(0,i.d1)("ai_todo_created",(e,t,a)=>{let n=e.todo_blocks;n&&t(rr({listId:e.list_id,recordId:e.record_id,todoBlocks:n}))});var ro=a(0x3be5e673),rs=a(0x8b361941),rc=a(0x2e0b73c5),rd=a(0x2310bbdde);function mediaReactionAdded(e,t,a){let n=a();if(!(0,ro.v)(n))return;let{channel:r,file:i,message_ts:l}=e.media,o=e.reaction;(0,rs.V)(n,{channelId:r,ts:l,fileId:i,fetchIfMissing:!1})&&t((0,rc.b)({channelId:r,ts:l,fileId:i,reaction:{name:o.name,offsetMs:o.offset_ms,user:o.user}}))}function mediaReactionRemoved(e,t,a){let n=a();if(!(0,ro.v)(n))return;let{channel:r,file:i,message_ts:l}=e.media,o=e.reaction;(0,rs.V)(n,{channelId:r,ts:l,fileId:i,fetchIfMissing:!1})&&t((0,rd.W)({channelId:r,ts:l,fileId:i,reaction:{name:o.name,offsetMs:o.offset_ms,user:o.user}}))}(0,i.d1)("media_reaction_added",mediaReactionAdded),(0,i.d1)("media_reaction_removed",mediaReactionRemoved);var rm=a(0x424ce7f7),ru=a(0x20ef3966f),rp=a(0x50ff7328),rh=a(0xbaaab71e),r_=a(0x303de21b),rf=a(0x1c030e023),rb=a(0x4cd7b414);let rg=(0,V.Ay)("Adds Instant Slack channel members to sidebar if in an Instant Slack workspace",async(e,t,{memberId:a,isJoined:n},r)=>{let i=t();if(!(0,rp.A)(i))return;let addDMToSidebar=t=>{e((0,rb.Z)({memberId:t,shouldNavigateToChannel:!1}))},removeDMFromSidebar=t=>{let a=(0,er.o2)(i,t);a&&e((0,rf.U)({channelId:a}))};if(a)n?addDMToSidebar(a):removeDMFromSidebar(a);else{let{getSiblingView:t}=r(rh.U),a=t(i,{container:ak.mq.Primary})?.id??"",{members:n}=await e((0,r_.AD)({channelId:a})),l=(0,er._B)(i),o=n.map(({id:e})=>e),s=l.map(({user:e})=>e);o.filter(e=>!s.includes(e)).forEach(e=>addDMToSidebar(e)),s.filter(e=>!o.includes(e||"")).forEach(e=>e&&removeDMFromSidebar(e))}});rg.meta={name:"maybeUpdateInstantSlackChannelMembersInSidebar",key:"createThunkMaybeUpdateInstantSlackChannelMembersInSidebar",description:"Adds Instant Slack channel members to sidebar if in an Instant Slack workspace"};var ry=a(0xdb0ffe37),rA=a(0x16d4244ae),rx=a(0x730f4091),rE=a(0x1400f598e),rC=a(0x1e3eb45fd),rk=a(0x12b31912f),rv=a(0x8f3c4496),rS=a(0x175e414e7),rI=a(0x203f8f1b),rw=a(0xb04c4a12),rT=a(0x1a8f65ec3);let rN=(0,V.Ay)("Reload Slack Connect Message Input Inviter Banner when invitee joins slack connect channel",(e,t,{channelId:a,memberId:n})=>{let r=t(),i=(0,M.nv)(r,n);if(!a||!(0,ry.g)(i)||!(0,rT.N)(r,a,rw.Y.MESSAGE_PANE))return;let l=(0,ns.OL)(r,nd.xu.MESSAGE_INPUT,a);l?.inviteeHasJoinedSlackConnectChannel||e((0,nc.iR)({channelId:a,event:{type:nd.jo.SLACK_CONNECT_CHANNEL_INVITEE_JOINED},reason:"slack-connect-channel-invitee-joined"}))});rN.meta={name:"reloadSlackConnectMessageInputInviterBannerOnInviteeJoin",key:"createThunkReloadSlackConnectMessageInputInviterBannerOnInviteeJoin",description:"Reload Slack Connect Message Input Inviter Banner when invitee joins slack connect channel"};var rM=a(0xfb05a202),rR=a(0x24f362e8f),rP=a(0x1bb02f2c4),rL=a(0x1a54d5ba1);function batchMemberJoinedChannel(e,t,a){batchProcessChannelMembers({events:e,dispatch:t,getState:a,isJoined:!0})}function batchMemberLeftChannel(e,t,a){batchProcessChannelMembers({events:e,dispatch:t,getState:a,isJoined:!1})}function batchProcessChannelMembers({events:e,isJoined:t,dispatch:a,getState:n}){let r=n(),i=(0,s.ZT)(r),l={},o=[];e.forEach(e=>{let{channel:n,user:i}=e,s=(0,er.gT)(r,n)&&(0,er.OL)(r,n);l[n]||(l[n]={}),l[n][i]=t;let c=(0,rk.zP)(r,i),d=t?!c:c;if(s&&!(0,O.JM)(s)&&d){let e=(0,M.TO)(r,i)&&(0,M.nv)(r,i);e&&((0,ry.g)(e)||(0,tn.sV)(r))&&o.push(e.id)}t?memberJoinedChannel({rtmEvent:e,dispatch:a,state:r}):memberLeftChannel({rtmEvent:e,dispatch:a,state:r}),a(rg({memberId:i,isJoined:t}))});let c=Object.keys(l);a(aQ({teamId:i,ids:c})),c.forEach(e=>{let t=l[e];a((0,rS.D)({channelId:e,membershipInfo:t})),a((0,em.G)({channelId:e}))}),o.length>0&&(0,a$.D1)(i,(0,ez.A)(o))}function memberJoinedChannel({rtmEvent:e,dispatch:t,state:a}){let{user:n,channel:r,inviter:i}=e,l=(0,er.gT)(a,r)&&(0,er.OL)(a,r),o=(0,W.Ay)({state:a});if(t(ei({appUserId:n,channelId:r})),l&&!(0,O.JM)(l)){if(!(0,e6.bl)(l))return void o.info(`${n} joined channel ${r} but we are not a member; ignoring`,[]);t(rN({channelId:r,memberId:n}));let e=n===(0,Y.WR)(a),s=(0,rC.JJ)(a);e&&s&&i&&t((0,rE.K7)({channelId:r,inviterId:i})),o.info(`${n} joined channel ${r}`,[])}}function memberLeftChannel({rtmEvent:e,dispatch:t,state:a}){let{user:n,channel:r}=e,i=(0,er.gT)(a,r)&&(0,er.OL)(a,r),l=(0,W.Ay)({state:a});if(t(el({appUserId:n,channelId:r})),i&&!(0,O.JM)(i)){if(!(0,e6.bl)(i))return void l.info(`${n} left channel ${r} but we are not a member; ignoring`,[]);l.info(`${n} left channel ${r}`,[])}}function userChange({user:e},t,a){if(!e)return;let n=a(),r=(0,s.ZT)(n);(0,a$.D1)(r,[e.id]);let i=(0,Y.WR)(n);e.id===i&&(t((0,rI.at)({teamId:r,markStaleImmediately:!0})),e.enterprise_id||t((0,rx.Y)(e)),t((0,rR.N)({user:e})))}function batchUserTypingInner(e,t,a){let n=a();if(!(0,tC.ty)(n,"show_typing"))return;let r=(0,rm.A)(e,"channel");for(let e of Object.keys(r)){let a=(0,rv.s)(n,e);if(!a)continue;let i=(0,rm.A)(r[e],"thread_ts");for(let r of Object.keys(i)){let l="undefined"===r?void 0:r,o=(0,rA.Pw)({channelId:e,threadTs:l}),s=(0,O.JM)(a)&&!l,c=(0,a5.e6)(n)===ak.k6.ActivityInbox&&(0,rL.Tn)?.(n,e,l);if(o||s||c){let a=(0,ru.A)(i[l],"user").filter(e=>(0,M.TO)(n,e));a.length&&t((0,rM.W)({channelId:e,threadTs:l,memberIds:a}))}}}}function userInvalidated(e,t){let a=e.map(({user:e})=>e).filter(e=>!!e).map(e=>e.id);(0,a$.D1)(t,a)}(0,i.d1)("user_change",userChange),(0,i.dj)("member_joined_channel",batchMemberJoinedChannel),(0,i.dj)("member_left_channel",batchMemberLeftChannel),(0,V.Ay)("calls the team-level member_joined_channel rtm handler",(e,t,a)=>batchMemberJoinedChannel(a,e,t)).meta={name:"legacyMemberJoinedChannelThunk",key:"createThunkLegacyMemberJoinedChannelThunk",description:"calls the team-level member_joined_channel rtm handler"},(0,V.Ay)("calls the team-level member_left_channel rtm handler",(e,t,a)=>batchMemberLeftChannel(a,e,t)).meta={name:"legacyMemberLeftChannelThunk",key:"createThunkLegacyMemberLeftChannelThunk",description:"calls the team-level member_left_channel rtm handler"},(0,i.uH)("user_invalidated",userInvalidated);var rO=a(0x2e869367),rD=a(0x1f9d0e196);function meetingEventRtmHandler(e,t,a){let n=a();(0,rD.wh)(n)&&("created"===e.subtype||"updated"===e.subtype?e.meeting&&t((0,rO.m)({meeting:e.meeting})):"deleted"===e.subtype&&e.meeting?.event_info?.id&&t((0,rO.GX)({meetingId:e.meeting.event_info.id})))}(0,i.d1)("meeting_event",meetingEventRtmHandler);var rF=a(0xf2e7528e),rU=a(0xb77a689a),rB=a(0xdf8554bd),rH=a(0x1f9f7c77b),rW=a(0x130c2e810),rV=a(0x1fda0b46e),rG=a(0x23a67ace),rq=a(0xb3026e7a),rj=a(0x96de2457),rz=a(0x1b650032f),rK=a(0x10027d8bc),r$=a(0x243435af9),rY=a(0x22ce977f1),rQ=a(1927545e3),rZ=a(0x21dd74f4c),rJ=a(0x21d6ed371),rX=a(0x1b21facf3);let isHuddleNotesAutostartChangedMessage=e=>!!e.user&&!!e.channel&&("automatic_ai_huddle_notes_enabled"===e.subtype||"automatic_ai_huddle_notes_disabled"===e.subtype);var r0=a(0xde270041),r1=a(0x1c24816a5),r2=a(0xe7f7bccf),r4=a(0x66a0f59a),r5=a(0x1337d9fa2),r3=a(0x2537c7ec5),r6=a(0x1591157c4),r8=a(0x12b2867d0),r7=a(0x1aba66b56),r9=a(0x13815c0d1);let ie={message_reaction:!0,external_channel_invite:!0,external_dm_invite:!0,list_user_mentioned:!0,list_record_assigned:!0,list_record_edited:!0,list_todo_notification:!0,list_approval_request:!0,list_approval_reviewed:!0,saved_reminder:!0,internal_channel_invite:!0,team_joiner_invite:!0,generic_system_alert:!0,prejoin_dm_welcome_party_alert:!0};var it=a(0xb041cb4d),ia=a(0x1384f171),ir=a(0x16c433bef),ii=a(0x11427fba3),il=a(0x131598af9),io=a(0x28c6a9ff);let is={at_user:"mentions",keyword:"mentions",at_everyone:"mentions",at_user_group:"mentions",at_channel:"mentions",message_reaction:"reactions",invitations:"invitations"},ic=[""],id=(0,V.Ay)("Upserts activity item to activityIa4 store if the activity view is open",(e,t,a)=>{let{messageTs:n,feedTs:r,threadTs:i,channel:l,type:o,reactionUser:c,reactionName:d,invite:m}=a,u=t(),p=(0,it.Gn)(u),h=(0,ia.Lh)(u),_=(0,rL.Xf)(u);if(!(0,r7.A)(ic,o))return;if("external_channel_invite"===o||"external_dm_invite"===o){let getInvitePayload=(e=is.invitations)=>({items:[{feed_ts:r,is_unread:!0,item:{type:o,invite:m}}],nextCursor:u.activityIA4?.nextCursors[e],filter:e});e((0,ii.j)(getInvitePayload())),e((0,ii.j)(getInvitePayload("all"))),e((0,ii.j)(getInvitePayload("unreadAll"))),e((0,ii.j)(getInvitePayload(`unread${(0,r9.A)(is.invitations)}`)));return}if(!l)return;let f=(0,as.Ld)(u,l,n),b=(0,Y.WR)(u),g=(0,il.A)(u),y=(0,s.ZT)(u),A=(0,er.OL)(u,l);if(!f||(0,rJ.aw)(f))return;if("at_user"===o||"keyword"===o||"at_user_group"===o){if((0,O.LI)(A)&&!f.thread_ts)return;let e=!1;if(!f.thread_ts||(0,io.Ov)(u,{ts:f.thread_ts,channelId:l})||(0,io.R1)(u,{ts:f.thread_ts,channelId:l})||(e=!0),(0,O.yz)(A)&&(e=!0),!(0,rX.I)(f,b,g,y,{ignoreAtHereMentions:!0,ignoreHighlightWords:e}))return}if(i&&"at_user"===o){let t=(0,rL.iG)(u,{threadTs:i});t&&e((0,r8.vz)({channelId:l,messageTs:t?.messageTs}))}let getPayload=e=>({items:[{feed_ts:r,is_unread:"message_reaction"!==o,item:{message:{thread_ts:i,ts:n,channel:l},reaction:{user:c,name:d},type:o}}],nextCursor:t().activityIA4?.nextCursors[e],filter:e});if(e((0,ii.j)(getPayload(is[o]))),(!h||ie[o])&&(e((0,ii.j)(getPayload("all"))),e((0,ii.j)(getPayload("unreadAll"))),e((0,ii.j)(getPayload(`unread${(0,r9.A)(is[o])}`)))),p&&"message_reaction"===o&&e((0,ii.j)(getPayload("other"))),h){if("message_reaction"===o&&_?.filterUnreadsSelected)return;"message_reaction"===o&&e((0,ii.j)(getPayload("everythingElse")));let t=ir.G$[o];((0,tq.A)(_?.filterActivityTypes)||(0,r7.A)(_?.filterActivityTypes,is[o])||(0,r7.A)(_?.filterActivityTypes,t))&&e((0,ii.j)(getPayload("multipleFilters")))}});id.meta={name:"maybeUpdateActivityIA4Store",key:"createThunkMaybeUpdateActivityIA4Store",description:"Upserts activity item to activityIa4 store if the activity view is open"};var im=a(0x8baf11b5),iu=a(0x1d0e0dd4c);let ip=(0,V.Ay)("Advance the updatedTs on the given channel, indicating the last time the channel history was modified and requires refetch (e.g. reaction events).",(e,t,{channelId:a,eventTs:n})=>{let r=t();if(!(0,eF.wq)(r))return;let{updatedTs:i}=(0,ts.Dk)(r,a);n&&n>(i||"0000000000.000000")&&e((0,ts.UJ)({channelId:a,updatedTs:n}))});ip.meta={name:"maybeAdvanceChannelUpdatedTimestamp",key:"createThunkMaybeAdvanceChannelUpdatedTimestamp",description:"Advance the updatedTs on the given channel, indicating the last time the channel history was modified and requires refetch (e.g. reaction events)."};var ih=a(0x19cf06bed),i_=a(0x19d55d0e1),ib=a(0x3104066f);let ig=(0,V.Ay)("Calls preload function for data in notification",(e,t,{message:a,channel:n})=>{let r=t();if(!(0,tF.y)(r))return;let i=n??((0,er.gT)(r,a.channel)&&(0,er.OL)(r,a.channel));if((0,i_.OR)(r,i.id)&&"subtype"in a&&"document_mention"===a.subtype){let t=(0,tO.l)(i.id);e((0,ib.eU)({fileIds:[t],reason:"mention"}))}if("message"===a.type&&a.files){let t=a.files.filter(e=>(0,tL.wL)(e)).map(e=>e.id);t.length&&e((0,ib.eU)({fileIds:t,reason:"message-notification"}))}});ig.meta={name:"maybePrefetchCanvasFromNotification",key:"createThunkMaybePrefetchCanvasFromNotification",description:"Calls preload function for data in notification"};var iy=a(0x5e3083e4),iA=a(0x22f33987a),ix=a(0x15a8bc52c),iE=a(0xcaa08ff7),iC=a(0x4790a9e9),ik=a(0xadcef495),iv=a(0x850bedf0),iS=a(0xcdd2c06d),iI=a(0x10b52336d),iw=a(0x93bbf622),iT=a(0x7053db8a),iN=a(0x105ecbbed),iM=a(0x894679d7),iR=a(0x20c81ddcb),iP=a(0x1f4bff87c),iL=a(0x21c11a1dc),iO=a(0x1d23c7f2c),iD=a(0x1423d1276);function isMessageInActiveView(e,t){let{viewId:a,windowId:n}=(0,iS.f)(e);if(!(0,av.ko)(e,n)||!n||!(0,a6.T2)(e))return!1;if(!t.thread_ts)return!!(0,iD.e)(e,{filterFunction:({view:e})=>e.id===t.channel}).length;return!!t.thread_ts&&!!(isMessageInMainWindowThread(e,n,t)||isMessageInHuddleWindow(e,n,t)||isMessageInChildWindowThread(e,n,t)||"Vall_threads"===a&&iT.A.has(t.thread_ts))}function isMessageInMainWindowThread(e,t,a){if(!a.thread_ts||t!==ak.N2)return!1;let n=(0,a5.F8)(e,{tab:(0,a5.e6)(e),container:ak.mq.Primary}),r=n?.params?.threadId,i=(0,a5.F8)(e,{tab:(0,a5.e6)(e),container:ak.mq.Secondary}),l=i?.params?.threadId,o=(0,a5.F8)(e,{container:ak.mq.Split,tab:(0,a5.e6)(e)}),s=o?.params?.threadId;return!!(r&&isMessageFromThread(e,r,a)||l&&isMessageFromThread(e,l,a)||s&&isMessageFromThread(e,s,a))||((0,rK.Dj)(e)?isMessageFromSlackbotThread(e,n,a)||isMessageFromSlackbotThread(e,i,a)||isMessageFromSlackbotThread(e,o,a):!!((e,{mainViewPrimary:t,mainViewSplit:a,message:n})=>{let{threadTs:r}=(0,iR.VP)(e,n.user??"",iP.v.ChatView),{threadTs:i}=(0,iR.VP)(e,n.user??"",iP.v.SplitView),l=t?.viewType===eY.D.AppSpace&&t?.id===n.channel&&r===n.thread_ts,o=a?.viewType===eY.D.AiApp&&a?.id==="AiApp"&&i===n.thread_ts;return!!l||!!o})(e,{mainViewPrimary:n,mainViewSplit:o,message:a}))}function isMessageInHuddleWindow(e,t,a){let n=(0,iw.q)(a.channel)===t,r=a.channel?(0,iL.it)(e,a.channel):null;return n&&r&&a.thread_ts===r}function isMessageInChildWindowThread(e,t,a){let n=(0,a5.Yi)(e,{windowId:t.toString(),container:ak.mq.Primary}),r=(0,a5.Yi)(e,{windowId:t.toString(),container:ak.mq.Secondary});if(n&&n.params?.threadId){if(n.id===a.channel||isMessageFromThread(e,n.params.threadId,a))return!0}else if(r&&r.params?.threadId&&(r.id===a.channel||isMessageFromThread(e,r.params.threadId,a)))return!0;return!1}function isMessageFromThread(e,t,a){if(!(0,iM.A)(t))return!1;let{channelId:n,threadTs:r}=(0,iN.xm)(e,t);return!!n&&!!r&&a.channel===n&&a.thread_ts===r}function isMessageFromSlackbotThread(e,t,a){if(!t||!(0,r4.A)(a)||!(0,r5.Iu)(a))return!1;let n=(0,iO.Ep)(e);return t.viewType===eY.D.Channel&&t.id===a.channel&&n===a.thread_ts}var iF=a(0x1b66417d),iU=a(0x1420931ea);let iB=(0,V.Ay)("maybe play a sound on the client for message sent",(e,t)=>{let a=t();if((0,tC.ty)(a,"mute_sounds"))return!1;let n=(0,iU.kd)(a);return!!n&&n!==iI.Bk&&(0,iF.ZH)((0,ex.Q7)(n))});iB.meta={name:"maybePlayMessageSentNoise",key:"createThunkMaybePlayMessageSentNoise",description:"maybe play a sound on the client for message sent"};let iH=(0,V.Ay)("maybe play a sound on the client for message arrived",(e,t)=>{let a=t();if(!(0,ex.Px)(a))return!1;let n=(0,iU.u$)(a);return!!n&&n!==iI.Bk&&(0,iF.ZH)((0,ex.DJ)(n))});iH.meta={name:"maybePlayMessageArrivalNoise",key:"createThunkMaybePlayMessageArrivalNoise",description:"maybe play a sound on the client for message arrived"};let iW=(0,V.Ay)("maybe play a sound on the client for message sent or arrived",async(e,t,{message:a,modelObject:n})=>{let r=t();if(!a||!n||a?.type==="desktop_notification"||a?.no_display||(0,rJ.dK)(a)||!(0,Y.TZ)(r))return!1;let{windowId:i}=(0,iS.f)(r);return!!(0,av.ko)(r,i)&&!!i&&!!(0,a6.T2)(r)&&!!(0,e6.bl)(n)&&!!isMessageInActiveView(r,a)&&e((0,rJ.vZ)(a,(0,Y.WR)(r))?iB():iH())});iW.meta={name:"maybePlayMessageSentOrArrivedNoise",key:"createThunkMaybePlayMessageSentOrArrivedNoise",description:"maybe play a sound on the client for message sent or arrived"};var iV=a(0xbfbd57a9),iG=a(0xaa8c4ddd);let iq=new Set,ij=!1;function maybeShowNotification(e,t,a){let n,r=a();if(!(0,Y.TZ)(r))return null;let i=(0,W.Ay)({label:"NOTIFICATIONS",state:r});if(!(0,ex.u0)(r,e.channel))return i.info("Skip pref-disabled push notification"),null;let l=(0,er.gT)(r,e.channel)?(0,er.OL)(r,e.channel):void 0,o=uniqueKeyForMessage(e),s=(0,i_.jT)(l)&&"subtype"in e&&"document_mention"===e.subtype;if((0,e6.bl)(l)||s?"desktop_notification"===e.type?(n=(0,ex.gA)(r,e),i.info(`shouldShowNotificationForDesktopNotification: '${n}'`)):(0,O.LI)(l)?(n=(0,ex.RM)(r,e,l),i.info(`shouldShowNotificationForDirectMessage: '${n}'`)):"is_ephemeral"in e&&e.is_ephemeral&&(0,i_.jT)(l)?n=eC.Z.FILE_CHANNEL_EPHEMERAL_MESSAGE:(n=(0,ex.rr)(r,e,l),i.info(`shouldShowNotificationForChannelMessage: '${n}'`)):n=eC.Z.NOT_A_MEMBER,n===eC.Z.NONE&&iq.has(o)&&(n=eC.Z.ALREADY_SHOWN),n!==eC.Z.NONE){t(iW({message:e,modelObject:l}));let a=(0,eC.Q)(n),o=!0;n===eC.Z.PERMISSION_DENIED&&(ij?o=!1:ij=!0),a&&o&&((0,iy.A)()||i.warn(`Notification (${e.type}) suppressed because:
${a}`),beaconNotification(r,{channel:l?.id,timestamp:e.ts||e.msg,description:a}))}else{let a={},n=(0,ix.fU)(r,{message:e});n&&(a.notificationTracePassthroughData=n),"desktop_notification"===e.type&&(a={...a,skip_formatting:!0,launch_uri:"launchUri"in e?e.launchUri:void 0,image_uri:"imageUri"in e?e.imageUri:void 0,avatar_image:"avatarImage"in e?e.avatarImage:void 0}),t((0,eg.Ds)({message:e,modelObject:l,options:a})),iq.add(o),"on"===(0,t7._Z)(r,"fe_notification_clogging")&&clogPushNotificationShown(r,e,l),t(ig({message:e,channel:l})),beaconNotification(r,{channel:l?.id,timestamp:e.ts||e.msg,description:"Desktop notification shown"})}return n}function handleDndOverride({channel:e,timestamp:t},a,n){let r=n();(0,iv.UG)(r)&&e&&a((0,ik.J6)(e));let i=(0,as.Ld)(r,e,t);if(!i||i._ignore_dnd)return;a((0,iG.Kc)([{...i,_ignore_dnd:!0}]));let l=(0,as.Ld)(n(),e,t);l&&maybeShowNotification(l,a,n)}function uniqueKeyForMessage({channel:e,msg:t,ts:a}={}){return e&&(a||t)?`${e}:${a||t}`:Date.now().toString()}function hasShownNotificationForMessage(e){let t=uniqueKeyForMessage(e);return iq.has(t)}function clogPushNotificationShown(e,t,a){let n=(0,h.eo)({state:e}),r=("user"in t?t.user:void 0)||("bot_profile"in t?t.bot_profile?.user_id:void 0)||("inviter"in t?t.inviter:void 0),i=!!(0,it.Gn)(e)&&!!r&&(0,iE.mF)(e,r),l=t.channel?(0,ex.gn)(e,t.channel):void 0,o="message"===t.type&&(0,iA.A)(e,t),s=new iV.mv().setNotificationType(t.type).setSender(r).setReceiver((0,Y.WR)(e)).setIsVIPNotification(i).setChannelId(t.channel).setConversationContext(a,t,o).setIsStarredConversation(!!t.channel&&(0,iC.ng)(e,t.channel)).setNotificationSettingOfChannel(l).setMessageTs(t.ts||("msg"in t?t.msg:void 0));n.track(s.getEventId(),s.build())}function beaconNotification(e,{channel:t,timestamp:a,description:n}={}){let r={channel:t,msg_ts:a,desc:n};Object.keys(r).forEach(t=>{(0,eE.Cv)({state:e}).recordMetric(t,r[t])})}(0,i.d1)("desktop_notification",maybeShowNotification),(0,i.d1)("dnd_override",handleDndOverride),Object.defineProperty({},"beaconNotification",{get:()=>beaconNotification,set:e=>{beaconNotification=e}});let iz=(0,V.Ay)("Calls preload function for canvas in message change",(e,t,{message:a})=>{a.files&&hasShownNotificationForMessage(a)&&(0,ih.A)(uniqueKeyForMessage(a),()=>e(ig({message:a})),500)});iz.meta={name:"maybePrefetchCanvasFromMessageChange",key:"createThunkMaybePrefetchCanvasFromMessageChange",description:"Calls preload function for canvas in message change"};var iK=a(0x658a411c),i$=a(0x20bafd237),iY=a(0x77d15e7e),iQ=a(0x1d34bec20),iZ=a(0x22a2e6d31),iJ=a(0x1d07238c8),iX=a(0x6327b0da),i0=a(0x812355f4),i1=a(0xe505b125);let i2=(0,V.Ay)("Upsert a single subscription and mark it as fresh",(e,t,a)=>{e((0,i1.S)({subscriptions:[a]}))});i2.meta={name:"upsertSubscriptionAndMarkAsFresh",key:"createThunkUpsertSubscriptionAndMarkAsFresh",description:"Upsert a single subscription and mark it as fresh"};let i4=(0,V.Ay)("Return a promise that resolves when we know the subscribed state for a thread",(e,t,a)=>{let{channelId:n,threadTs:r}=a||{},i=(0,s.ZT)(t()),l=(0,io.uV)(t(),{channelId:n,ts:r});return l&&"boolean"==typeof l.subscribed&&(0,i0.GD)().isObjectFresh(i,l.id)?U.S.resolve(l.subscribed):e((0,iX.Nf)({channelId:n,threadTs:r})).then(t=>{let{subscriptions:a}=t||{},i=(0,r7.A)(a,r);return e(i2({channelId:n,ts:r,subscribed:i})),i})});i4.meta={name:"promiseToGetSubscribed",key:"createThunkPromiseToGetSubscribed",description:"Return a promise that resolves when we know the subscribed state for a thread"};let i5=(0,V.Ay)("If all threads is open, maybe update it after a new message arrives",(e,t,{channelId:a,threadTs:n}={},r)=>{let i=(0,iN.Iu)(a,n)??"",l=(0,W.Ay)({getState:t,label:"MAYBE-ALL-THREADS"}),o=t(),{getSiblingView:s}=r(rh.U);if(!(0,Y.TZ)(t()))return U.S.resolve();let c=s(o,{container:ak.mq.Primary})?.id,d=(0,a6.T2)(t())||!(0,a6.vB)(t());return c===iY.EN.allThreads&&d?e(i4({channelId:a,threadTs:n})).then(r=>{if(!r)return U.S.resolve();l.info(`Incrementing new reply count with ${i}`),e((0,iQ.X5)());let o=(0,iZ.A3)(t());return(0,iK.A)(o,{threadKey:i})?U.S.resolve():e((0,iJ.a)({channelId:a,threadTs:n,limit:5})).then(({msgs:t}={msgs:[]})=>{if(!t||!t.length)return;let a=(0,i$.A)(t)?.ts??"";l.info(`Prepending ${i}`),e((0,iQ.fe)({thread:{threadKey:i,sortTs:a,hasUnreads:!0}}))})}):U.S.resolve()});i5.meta={name:"maybeUpdateAllThreadsOnNewMessage",key:"createThunkMaybeUpdateAllThreadsOnNewMessage",description:"If all threads is open, maybe update it after a new message arrives"};var i3=a(0x1cf0861f2),i6=a(0x11cdf8541),i8=a(0x4801eff7),i7=a(0xecade3b6),i9=a(0x1ef125c78),le=a(0x1f3db393);function shouldAbortMessageEdit(e,t){return!!((0,r5.SM)(e)&&!(0,r5.SM)(t)||!(0,r5.aK)(e)&&(0,r5.aK)(t))}let lt=(0,V.Ay)("Bulk replace messages",(e,t,a,n)=>{let r=t(),{windowId:i}=n(i6.C),l=e((0,le.A)({imsgs:a.map(e=>e.message)}));return e((0,iG.Kc)(l)),a.forEach(({message:a,channelId:n,fromEventLog:l,prevMessage:o})=>{let{ts:c}=a,d={channelId:n,timestamps:[c],fromEvtLog:l};e((0,aw.VG)(d));let m=(0,s.JY)(t());(0,i8.mY)(m,n,d.timestamps),shouldAbortMessageEdit(o,a)&&(0,i9.Kx)(r,{channelId:n,ts:c,ignoreViewContext:!0,windowId:i})&&e((0,i7.pn)({windowId:i}))}),l});lt.meta={name:"replaceMessages",key:"createThunkReplaceMessages",description:"Bulk replace messages"},(0,V.Ay)("Replace message in store with single raw / unprocessed message",(e,t,a)=>e(lt([a]))[0]).meta={name:"replaceMessage",key:"createThunkReplaceMessage",description:"Replace message in store with single raw / unprocessed message"};var la=a(0x190cc4463),ln=a(0x7a13daf2),lr=a(0xb62e6bf4),li=a(0xbc76db4d),ll=a(0xf8fef59f),lo=a(0xb2b38ac2),ls=a(0x1d9f1ec43),lc=a(0xf707ed1a),ld=a(0x2207a1e7d);let lm=(0,V.Ay)("Update unread counts",(e,t,{channelId:a,messageTs:n}={})=>{let r=t(),i=(0,er.OL)(r,a,!1);if(!i||!(0,lc.w)(r,i,{countFileChannels:!0}))return U.S.resolve(!0);let l=(0,M.cA)(r),o="away"===(0,ld.gd)(r,l.id),s=l._presence_last_changed||(0,Y.tV)(r,"start_ms"),c=(0,ls.L)(r,{messages:[(0,as.Ld)(r,i.id,n)],channel:i,currentUserId:l.id,userIsAway:o,userPresenceLastChanged:s,highlightWords:(0,il.A)(r)}),d=c?.unreadHighlightCnt;return d!==i.unread_highlight_cnt&&((0,W.Ay)({state:r}).info("COUNTS",`Updated unread_highlight_cnt for ${i.id}: ${d}`),e((0,td.b)({id:i.id,unread_highlight_cnt:d}))),U.S.resolve(!1)});lm.meta={name:"updateUnreadCountsForThreadMentionBroadcasts",key:"createThunkUpdateUnreadCountsForThreadMentionBroadcasts",description:"Update unread counts"};var lu=a(0x74cf0ed5),lp=a(0xc386ba5),lh=a(0xa5e5c090);let l_="RTM-THREADS",messageReplied=(e,t,a)=>{let n,r=a(),{channel:i,message:l}=e,o=i&&l?.ts?(0,as.Ld)(r,i,l.ts,!1):null;if(l&&l.latest_reply?n=l.latest_reply:l&&l.replies&&l.replies.length&&(n=(0,ln.A)(l.replies,"ts")?.ts),(0,li.l)(a())&&l&&"assistant_thread"===l.subtype&&o?.thread_ts&&t((0,ll.Al)({threadTs:o.thread_ts})),o&&o.reply_count){let e;if(o&&o.latest_reply?e=o.latest_reply:o&&o.replies&&o.replies.length&&(e=(0,ln.A)(o.replies,"ts")?.ts),n<e)return void(0,W.Ay)({getState:a}).info(l_,`Not processing an older message_replied event, ${n} < ${e}, in ${i}`)}let s=t((0,le.A)({imsgs:l?[l]:[],channelId:i}));t((0,iG.Kc)(s)),i&&t(ip({channelId:i,eventTs:e?.event_ts}))};function threadSubscribed(e,t,a){let{channel:n,thread_ts:r,last_read:i}=e.subscription||{};n&&r&&((0,W.Ay)({getState:a}).info(l_,`thread_subscribed ${n} ${r}`),t(i2({channelId:n,ts:r,subscribed:!0,lastRead:i})),t(i5({channelId:n,threadTs:r})))}function threadUnsubscribed(e,t,a){let{channel:n,thread_ts:r,last_read:i}=e.subscription||{};n&&r&&((0,W.Ay)({getState:a}).info(l_,`thread_unsubscribed ${n} ${r}`),t(i2({channelId:n,ts:r,subscribed:!1,lastRead:i})))}function threadMarked(e,t,a){let{channel:n,thread_ts:r,last_read:i}=e.subscription||{};if(!n||!r)return;(0,eQ.Jz)(a())&&(0,eg.uV)(i,n,r),t((0,lu.C)({channelId:n,ts:r,lastRead:i}));let l=(0,iN.Iu)(n,r);t((0,lo.f)({lastReadCursor:i,threadKey:l}));let o=(0,as.Ld)(a(),n,r,!1);o?.latest_reply&&t(lm({channelId:n,messageTs:o?.latest_reply}))}function updateThreadState(e,t,a){let{type:n,has_unreads:r,unread_count_by_channel:i,timestamp:l,channel_badges:o,mention_count:s,mention_count_by_channel:c,org_wide:d}=e,m=(0,W.Ay)({getState:a});m.info(l_,`${n} has_unreads:${r} mention_count:${s} ts:${l}`);let u=(0,lr.ss)(a());if("update_thread_state"===n){if(u)return void m.info(l_,"rejecting update_thread_state with org unified enabled");if(!!d!==(0,te.k)(a()))return void m.info(l_,`rejecting update_thread_state with org_wide: ${d}`)}else if("update_global_thread_state"!==n)return void m.error(l_,`unexpected event type ${n}`);else if(!u)return void m.info(l_,"rejecting update_global_thread_state with org unified disabled");o&&t((0,lp.$m)(o)),t((0,lh._)({threadsHasUnreads:r,threadsUnreadCountByChannel:i,threadsMentionCountByChannel:c,threadsLastUpdatedTimestamp:l}))}(0,i.d1)("thread_subscribed",threadSubscribed),(0,i.d1)("thread_unsubscribed",threadUnsubscribed),(0,i.d1)("thread_marked",threadMarked),(0,i.d1)("update_thread_state",updateThreadState),(0,i.d1)("update_global_thread_state",updateThreadState);var lf=a(0x3d75f87c),lb=a(0x1804d4b8b),lg=a(0x181e01ee6),ly=a(0x185a7134f);let lA=(0,V.Ay)("Maybe clear ai app assistant status on new message",async(e,t,{channelId:a,threadTs:n})=>{let r=t(),i=(0,r$.Ag)(r),l="on"!==(0,t7._Z)(r,"ai_apps_animated_streaming_roots_fe")||n?(0,iN.Iu)(a,n):a,o=(0,iR.Y2)(r,l);!i&&l?e((0,ly.XI)(l)):l&&!o?.isOptimistic&&e((0,ly.XI)(l))});lA.meta={name:"maybeClearAssistantStatusOnNewMessage",key:"createThunkMaybeClearAssistantStatusOnNewMessage",description:"Maybe clear ai app assistant status on new message"};var lx=a(0x214aa5e11),lE=a(0x72f6f21f),lC=a(0x13fb32a49);let lk=(0,V.Ay)("maybe gets translated message for message change rtm event",(e,t,{message:a})=>{let n=t();(0,lx.ot)(n)&&a.channel&&a.ts&&(0,lE.wM)(n,a.channel,a.ts)&&e((0,lC.I)({channelId:a.channel,messageTs:a.ts}))});lk.meta={name:"maybeTranslateMessageFromMessageChangeHandler",key:"createThunkMaybeTranslateMessageFromMessageChangeHandler",description:"maybe gets translated message for message change rtm event"};let lv=(0,V.Ay)("Debounced call to maybeTranslateMessage in message change",(e,t,{message:a,prevMessage:n})=>{(a&&a.text)!==(n&&n.text)&&(0,ih.A)(uniqueKeyForMessage(a),()=>e(lk({message:a})),500)});lv.meta={name:"maybeTranslateMessageFromMessageChange",key:"createThunkMaybeTranslateMessageFromMessageChange",description:"Debounced call to maybeTranslateMessage in message change"};var lS=a(0x209da79fc),lI=a(0x30d0b075),lw=a(0x54bc7020);let lT=(0,V.Ay)(aL.rd.SET_CHANNEL_PROPERTIES_PREJOIN_DM_WELCOME_PARTY_USER_WELCOME_CARD_SENT_TS,(e,t,{channelId:a,userWelcomeCardSentTs:n})=>{let r=t(),i=(0,er.OL)(r,a,!1);if(!a||!i)return void(0,W.Ay)({getState:t}).warn("Cannot set prejoin_dm_welcome_party property: channel not found");let l=(0,lI.Zf)({prejoin_dm_welcome_party:{user_welcome_card_sent_ts:n}}),o={...i,properties:{...i.properties,prejoin_dm_welcome_party:{...i.properties?.prejoin_dm_welcome_party,user_welcome_card_sent_ts:n}}};return e((0,lw.D)({channelId:a,props:l,reason:"set_channel_prejoin_dm_welcome_party_user_welcome_card_sent_ts"})).then(()=>{e((0,aO.F)({channel:o,reason:aL.rd.SET_CHANNEL_PROPERTIES_PREJOIN_DM_WELCOME_PARTY_USER_WELCOME_CARD_SENT_TS}))&&e((0,nc.iR)({event:{type:nd.jo.REQUEST_SPACES,spaces:[nd.xu.MESSAGE_COMPOSER,nd.xu.MESSAGE_INPUT]}}))})});lT.meta={name:"setChannelPropertiesUserWelcomeCardSentTs",key:"createThunkSetChannelPropertiesUserWelcomeCardSentTs",description:aL.rd.SET_CHANNEL_PROPERTIES_PREJOIN_DM_WELCOME_PARTY_USER_WELCOME_CARD_SENT_TS};var lN=a(0x1f665c253),lM=a(0x1b35e60a5);let lR=(0,V.Ay)("Push a dm key to the back of the queue if it's not in the queue already",(e,t,a)=>{e((0,lM._j)(a))});lR.meta={name:"queueDmsToast",key:"createThunkQueueDmsToast",description:"Push a dm key to the back of the queue if it's not in the queue already"};let lP=(0,ej.A)((e,t,{toast:a})=>e(lR(a||{})),lN.J.DISPLAY,{leading:!0,maxWait:lN.J.DISPLAY+lN.J.WAIT}),lL=(0,V.Ay)("Push a dm key to the back of the queue with debounced wait",(e,t,{toast:a})=>lP(e,t,{toast:a}));lL.meta={name:"debouncedQueueDmToast",key:"createThunkDebouncedQueueDmToast",description:"Push a dm key to the back of the queue with debounced wait"};var lO=a(0x166aaf930),lD=a(0x15c7516a2),lF=a(0x249e56eed);let lU=(0,V.Ay)("possibly flag a message from an rtm event to be aria announced",(e,t,{msg:a})=>{let n=t();if(!(0,iU.gR)(n))return!1;let r=(0,er.gT)(n,a.channel)&&(0,er.OL)(n,a.channel);if(!r||!(0,Y.TZ)(n))return!1;let{windowId:i}=(0,iS.f)(n);if(!(0,av.ko)(n,i)||!i||!(0,a6.T2)(n)||(0,O.mz)(r)===O.Cu.unknown||(0,rJ.vZ)(a,(0,Y.WR)(n))||!isMessageInActiveView(n,a)||(0,rJ.dK)(a))return!1;let l=(0,lD.j)(a);return!!l&&(e((0,lF.F8)(l)),!0)});lU.meta={name:"maybeFlagMessageToBeAriaAnnounced",key:"createThunkMaybeFlagMessageToBeAriaAnnounced",description:"possibly flag a message from an rtm event to be aria announced"};var lB=a(0x69771167),lH=a(0x1d24ec95f),lW=a(0x1d10dc8cb),lV=a(0x15fbb80be),lG=a(0xe8efe2c1),lq=a(0x1daadbc89),lj=a(0x173c13db4),lz=a(0x1211d4f87),lK=a(0xf10d544a),l$=a(0x2b4a00ff);let isCommentStreamVisible=e=>(0,lK.A)(e,{viewType:eY.D.QuipCommentStream})||(0,l$.D8)?.(e)===lW.wA,getViews=(e,t)=>{let a=e.quipCommentStream?Object.entries(e.quipCommentStream).map(([e,t])=>({viewId:e,fileId:t.fileId})).filter(e=>e.fileId===t):[],[n,r]=(0,lH.A)(a,t=>(0,lj.My)(e,t.viewId)===lz.L.ARCHIVED);return[n,r]},lY=(0,V.Ay)("maybe updates the quip comment stream data from and RTM message_change event",(e,t,{event:a})=>{let n=t();if(!isCommentStreamVisible(n))return;let r=a.message,i=a.previous_message,l=a.channel,o=(0,lG.f)(n,l??""),s=(0,tS.Lp)(n,o,!1);if(!r||!i||!s||!l||!(0,lj.ih)(n,o))return;let c=r.latest_reply,d=r.ts,m={...i,channel:l},u=(0,as.Ld)(n,l,d??"",!1);if((0,r5.O0)(u)&&(0,tL.DQ)(s)){let t=(0,as.Ld)(n,l,c??"",!1),a=(0,rJ.$Q)(m)!==(0,rJ.$Q)(u);u&&t&&a&&e((0,lq.BV)({fileId:o,reply:t,root:u}))}});lY.meta={name:"maybeUpdateQuipCommentStreamFromMessageChangeEvent",key:"createThunkMaybeUpdateQuipCommentStreamFromMessageChangeEvent",description:"maybe updates the quip comment stream data from and RTM message_change event"};let lQ=(0,V.Ay)("maybe updates the quip comment stream data from and RTM event",(e,t,{message:a})=>{let n=t(),r=a?.channel??"";if(!isCommentStreamVisible(n)||!a)return;let i=(0,as.Ld)(n,r,a?.thread_ts??"",!1);if(!(0,r5.O0)(i))return;let l=(0,lG.f)(n,r);if(!(0,lj.ih)(n,l))return;let o=(0,tS.Lp)(n,l,!1);if(!(0,tL.DQ)(o))return;let[s,c]=getViews(n,l),d=(0,rJ.$Q)(i),m=(0,as.Ld)(n,r,i?.latest_reply??"",!1);d&&s.length&&i&&m?s.forEach(t=>{e((0,lq.Xu)({reply:m,root:i,viewId:t.viewId}))}):!d&&c.length&&i&&m&&c.forEach(t=>{e((0,lq.Xu)({reply:m,root:i,viewId:t.viewId}))})});lQ.meta={name:"maybeUpdateQuipCommentStreamFromMessageEvent",key:"createThunkMaybeUpdateQuipCommentStreamFromMessageEvent",description:"maybe updates the quip comment stream data from and RTM event"};let lZ=(0,V.Ay)("maybe updates the quip comment stream data from message_deleted RTM event",async(e,t,{channelId:a,prevMessage:n})=>{let r=t();if(!isCommentStreamVisible(r)||!n)return;let i=(0,as.Ld)(r,a,n.thread_ts??"",!1);if(!(0,r5.O0)(i))return;let l=(0,lG.f)(r,a);if(!(0,lj.ih)(r,l))return;let o=(0,tS.Lp)(r,l,!1);if(!i?.latest_reply||!(0,tL.DQ)(o))return;let updateStore=({messages:t,viewId:n})=>{let r=e((0,le.A)({imsgs:t,channelId:a}));if(1===r.length)e((0,lq.Yl)({viewId:n,tsToRemove:i.ts}));else{let t=r.find(r5.O0),a=r.find(e=>!(0,r5.O0)(e)&&e.ts===t?.latest_reply);if(e((0,iG.Kc)(r)),!t)return;e((0,lq.Xu)({root:t,reply:a,viewId:n}))}},fetchMessages=()=>e((0,lV.M)({channel:a,ts:i.ts,limit:1,reason:"quip comment stream delete"})),[s,c]=getViews(r,l),d=(0,rJ.$Q)(i);if((({state:e,views:t,rootTs:a,replyTs:n})=>t.some(t=>{let r=(0,lj.nX)(e,t.viewId);return!!r?.find(e=>e.ts===a)?.replies.find(e=>e.ts===n)}))({views:s.concat(c),state:r,rootTs:i.ts,replyTs:n.ts})){if(d&&s.length){let{messages:e}=await fetchMessages();s.forEach(t=>{updateStore({viewId:t.viewId,messages:e})})}else if(!d&&c.length){let{messages:e}=await fetchMessages();c.forEach(t=>{updateStore({viewId:t.viewId,messages:e})})}}});lZ.meta={name:"maybeUpdateQuipCommentStreamFromMessageDeletedEvent",key:"createThunkMaybeUpdateQuipCommentStreamFromMessageDeletedEvent",description:"maybe updates the quip comment stream data from message_deleted RTM event"};var lJ=a(0x18a17ca8f),lX=a(0x19dffa924),l0=a(0x23d3aac67),l1=a(0x113d1778),l2=a(0x74bbb29a);let l4=(0,V.Ay)("Maybe update current Progressive Disclosure tip messageTs value based on last received message",(e,t,{messageTs:a,channelId:n})=>{let r=t(),i=(0,lJ.$O)(r);if(!(0,lJ.qh)(r)&&!i)return;let l=(i?.tip?l2.z8[i?.tip]:null)||(0,ns.Hp)(r,nd.xu.PROGRESSIVE_DISCLOSURE),o=l?l2.Nh[l]:null;if(!o||o===l2.ml.FirstMessage&&(0,lX.RB)(r,n))return;let s=(0,lJ.Y8)(r,{tip:o}),c=(0,lJ.zE)(r);(!s||!c)&&l2.UO.includes(o)&&l2._B[o]&&e((0,l1.jy)(a))});l4.meta={name:"maybeUpdateProgressiveDisclosureTipMessageTsForLastMessage",key:"createThunkMaybeUpdateProgressiveDisclosureTipMessageTsForLastMessage",description:"Maybe update current Progressive Disclosure tip messageTs value based on last received message"};var l5=a(0xeb4f1a4d),l3=a(0x1eb98d98a),l6=a(0x507d338f),l8=a(0x1b5331131),l7=a(0x5aeed42b);function messageReceived(e,t,a,n=!1){if(!e||!e.length)return;let r=a(),i=(0,Y.WR)(r),l=(0,il.A)(r),o=(0,s.ZT)(r),c=(0,rj.wP)(r),d="on"===(0,t7._Z)(r,"ai_apps_animated_streaming_roots_fe");switch(e[0].subtype){case"message_changed":messageChanged(e,t,a);return;case"message_deleted":for(let a of e)messageDeleted(a,t);return;case"message_replied":for(let n of e)messageReplied(n,t,a);return;case"message_locked":for(let a of e)messageLocked(a,t);return;case"thread_broadcast":break;case"channel_history_changed":case"group_history_changed":case"im_history_changed":case"mpim_history_changed":return;case"channel_purpose":case"group_purpose":for(let n of e)channelPurposeChanged(n,t,a);break;case"channel_topic":case"group_topic":for(let n of e)channelTopicChanged(n,t,a);break;case"document_mention":for(let a of e)if(a.user!==i&&!(0,r4.A)(a)&&(0,rX.I)(a,i,l,o,{ignoreAtHereMentions:!0,ignoreHighlightWords:!0,ignoreAtEveryoneMentions:!0,ignoreAtChannelMentions:!0})){let e=a.document_mention?.file_id?(0,tS.Lp)(r,a.document_mention?.file_id):void 0;if((0,tL.DQ)(e)){let e=(0,r3.d$)(r,(0,er.OL)(r,a.channel));!e&&a.ts&&t(id({feedTs:a.ts,messageTs:a.ts,channel:a.channel,type:"at_user"})),a.channel&&t((0,ag.uo)({channelId:a.channel,shouldSuppress:e})),a.document_mention?.file_id&&a.ts&&t((0,au.hQ)({fileId:a.document_mention?.file_id,mentioningUser:{mentioningUserId:a.document_mention?.mentioning_user_ids[0],ts:a.ts,sectionId:a.document_mention?.section_id}}))}}break;case"channel_canvas_updated":for(let a of e){let e=(0,er.OL)(r,a.channel);a.canvas_update_user_ids?.includes(i)&&(0,e2.H9)(e)&&a.channel&&a.ts&&t((0,tu.CW)({id:a.channel,ts:a.ts,reason:"user_updated_channel_canvas"}))}break;case"tabbed_canvas_updated":for(let a of e){let e=(0,er.OL)(r,a.channel);a.canvas_update_user_ids?.includes(i)&&(0,e2.H9)(e)&&a.channel&&a.ts&&t((0,tu.CW)({id:a.channel,ts:a.ts,reason:"user_updated_canvas_tab"}))}break;case"channel_tab_added":for(let a of e){let e=(0,er.OL)(r,a.channel);a.tab_added_user_id===i&&(0,e2.H9)(e)&&a.channel&&a.ts&&t((0,tu.CW)({id:a.channel,ts:a.ts,reason:"channel_tab_added"}))}break;case"folder_item_added":for(let a of e){let e=(0,er.OL)(r,a.channel);a.item_added_user_id===i&&(0,e2.H9)(e)&&a.channel&&a.ts&&t((0,tu.CW)({id:a.channel,ts:a.ts,reason:"folder_item_added"}))}}for(let s of(n||messageReceivedDefault(e,t,a),e)){if(t(lU({msg:s})),maybeShowNotification(s,t,a),maybeResolveUpload(s,a),s&&s.channel&&s.user&&t((0,l8.b)({channelId:s.channel,threadTs:s.thread_ts,memberIds:[s.user]})),"channel_join"===s.subtype&&(0,rJ.NZ)(s,i)&&s.inviter!==i&&s.ts&&t(id({feedTs:s.ts,messageTs:s.ts,threadTs:s.thread_ts,channel:s.channel,type:"internal_channel_invite"})),"prejoin_dm_welcome_party_notification"===s.subtype&&s.ts&&s.channel&&!(0,rJ.vZ)(s,i)){let e=(0,er.OL)(r,s.channel);(0,O.LI)(e)&&!(0,rZ.G)(r,s.channel)&&t(id({feedTs:s.ts,messageTs:s.ts,threadTs:s.thread_ts,channel:s.channel,type:"dm"}))}if(!(0,rJ.vZ)(s,i)&&(s.ts&&(0,rX.I)(s,i,l,o,{})&&t(id({feedTs:s.ts,messageTs:s.ts,threadTs:s.thread_ts,channel:s.channel,type:"at_user"})),!(0,rJ.vZ)(s,i)&&!(0,im.B)(r,s.channel))){let e=(0,er.OL)(r,s.channel);(0,O.JM)(e)&&!(0,rZ.G)(r,s.channel)&&!s.thread_ts&&s.user&&t(lL({toast:{key:s.client_msg_id||"",userId:s.user}}))}s.ts&&s.channel&&(0,rJ.vZ)(s,i)&&((0,l0.o)(r,s.channel)&&s.client_msg_id===(0,lJ.EH)(r)&&t(lT({channelId:s.channel,userWelcomeCardSentTs:s.ts})),(0,lX.xl)(r,s.channel)&&s.client_msg_id===(0,lJ.Pn)(r)&&t((0,lS.HR)({channelId:s.channel,welcomeMessageTs:s.ts})),(0,lX.XM)(r,s.channel)&&t((0,lS.pL)({channelId:s.channel,shouldClog:!0})),((0,lJ.qh)(r)||(0,lJ.$O)(r))&&t(l4({messageTs:s.ts,channelId:s.channel}))),s.thread_ts&&s.channel&&t(i5({channelId:s.channel,threadTs:s.thread_ts})),(c&&s.thread_ts||d&&s.channel)&&t(lA({channelId:s.channel,threadTs:s.thread_ts})),t(lQ({message:s}))}}function messageReceivedDefault(e,t,a){if(!(0,r6.A)()||!e||!e.length)return;let n=a(),r=e;(0,l7.P5)(n).forEach(e=>{let a=(0,W.Ay)({state:n}),i=r?.find(t=>t?.client_msg_id===e);i&&i.channel&&i.ts&&(a?.info("MSG-RTM",`UNDO-SEND-MESSAGE: Deleting incoming message (that was previously-pending and deleted with CMD+Z) with client message ID ${e}`),t((0,rY.A)({channelId:i.channel,ts:i.ts,broadcastDelete:!1,reason:"message-received-default"})),r=r?.filter(t=>t?.client_msg_id!==e))});let i=(0,W.Ay)({state:n});r.forEach(e=>{if(!e?.client_msg_id)return;let t=(0,ao.I)(n,e?.client_msg_id);if(!t)return;let{channelId:a,ts:r}=t,l=(0,as.Ld)(n,a,r);if(!l)return void i.warn("FILES",`Placeholder data missing for ${e?.channel}, ${e?.ts}`);let o=(0,rF.A)(l?.files,l?.pendingFiles).sort();if(o.length){let t=o.join(","),a=e.files?.map(e=>"string"==typeof e?e:e&&e.id).sort().join(",");t!==a&&(0,W.Ay)({state:n}).error("FILES",`Placeholder file IDs mismatch for ${e?.channel}, ${e?.ts}. Expected ${t}, got ${a}`)}});let l=t((0,iu.A)(r));r.forEach((e,n)=>{let r=l?l[n]:void 0;r&&(0,la.IY)(a,t,r,e)});let o=(0,Y.WR)(n);if((0,rV.g)(n)){let e=r.filter(e=>!!e.channel&&!!((0,rW.Hm)(n,e.channel)||(0,r$.W)(n)&&(0,iR.tJ)(n,e.channel))&&((0,r$.W)(n)||!e.thread_ts));e.length&&(t((0,lg.oz)({threads:e,upsertAgentThreadsForAgentBrowser:(0,r$.W)(n)})),(0,rG.oO)(n)&&(0,rG.ET)(n)&&1===e.length&&e[0].user===o&&(e[0].channel&&e[0].ts&&t((0,lf.R)({channelId:e[0].channel,threadTs:e[0].ts})),e[0].channel&&t((0,lb.L)({channelId:e[0].channel,isLoading:!1,isSplitView:!1}))))}let s=r.find(isHuddleNotesAutostartChangedMessage);if(s){let{subtype:e,user:a,channel:n}=s;t((0,lO.zw)({actionType:e,userId:a,channelId:n,timestamp:Date.now()}))}let c=(0,a5.e6)(n),d=(0,a5.Le)(n,{tab:c}),m=(0,r$.mr)(n),u=!1,p="";if(m&&d?.primary?.id===rQ.c.Composer&&d.primary.params?.draftId){let e=(0,t$.YI)(n,d.primary.params.draftId);e&&(p=(0,rq.A)(n,e));let t=!!p&&(0,rW.Hm)(n,p);u=p&&t}if(d&&d.primary&&d.primary.viewType===eY.D.AgentHomeConversation&&d.primary.params?.isFromAgentforceTab&&!d.primary.params?.threadTs||u){let e=r.find(e=>(e.channel===d.primary?.params?.channelId||e.channel===p)&&!!e.channel&&!!(0,rW.Hm)(n,e.channel)&&e.user===o);e&&e.channel&&e.ts&&t((0,rH.u)({channelId:e.channel,threadTs:e.ts}))}}function messageChanged(e,t,a){let n=a(),r=(0,Y.WR)(n),i=(0,il.A)(n),l=(0,s.ZT)(n),o=(0,rK.ZE)(n),c="on"===(0,t7._Z)(n,"animated_text_streaming"),d=!1,m=e.filter(e=>e.channel&&e.message&&e.message.ts).map(e=>(e.previous_message&&(d=(0,rX.I)(e.previous_message,r,i,l,{})),{message:{channel:e.channel,...e.message},channelId:e.channel||"",fromEventLog:e._from_evt_log,prevMessage:(0,as.Ld)(n,e.channel||"",e.message?.ts||"",!1)}));t(lt(m)),m.forEach(({message:e,prevMessage:a,channelId:s})=>{((0,r5.aK)(e)||(0,r1.o)(e))&&t((0,r8.vz)({channelId:s,messageTs:e.ts})),d&&!(0,rX.I)(e,r,i,l,{})&&t((0,r8.vz)({channelId:s,messageTs:e.ts})),(0,r5.Dv)(a)&&!(0,r5.Dv)(e)&&l&&s&&e.ts&&(0,i8.D1)(l,s,[e.ts]),t(iz({message:e})),t(lv({message:e,prevMessage:a}));let m=(0,r2.A)(e),u=e.ai_context?.uses_remaining;m&&"number"==typeof u&&(0,rz.Cr)(n)&&(u<=rz.ns&&u>0&&!(0,rz.$h)(n)&&t((0,nc.iR)({event:{type:nd.jo.REQUEST_SPACES,spaces:[nd.xu.SLACKBOT_AI_DM_THREAD_HEADER]}})),t((0,l5.t_)({usesRemaining:u})));let p=e.ai_context?.agentforce_active_agents;if(m&&o&&p?.length){let a=e.thread_ts||e.ts,r=new Set((0,iO.Vx)(n,a).map(e=>e.botUserId));for(let e of p){let n=!r.has(e.bot_user_id);t((0,l5.vQ)({threadTs:a,agent:{botUserId:e.bot_user_id,agentName:e.agent_name,appId:e.app_id}})),n&&e.excluded&&t((0,l5.Ee)({threadTs:a,botUserId:e.bot_user_id}))}}let h=!1;e.ai_context?.result_status==="complete"&&a?.ai_context?.result_status!=="complete"&&(t(lU({msg:e})),h=!0);let _=(0,l6._)(n,{channelId:s,ts:e.ts});c&&_&&(0,r0.b)(e)&&(t((0,l3.O)({channelId:s,ts:e.ts})),h||t(lU({msg:e})))}),e.forEach(e=>{e?.channel&&e?.event_ts&&(t(ip({channelId:e.channel,eventTs:e.event_ts})),t(lY({event:e})))})}function messageLocked(e,t){if(!e||!t)return;let{channel:a,thread_ts:n,is_locked:r,locked_by_team_id:i}=e;(0,rU.A)(a)&&(0,rU.A)(n)&&(0,rB.A)(r)&&t((0,i3.V)({channelId:a,threadTs:n,isLocked:r,lockedByTeamId:i}))}function messageDeleted(e,t){let{deleted_ts:a,channel:n,_from_evt_log:r,previous_message:i,event_ts:l}=e;n&&t((0,lB.j)({deleted_ts:a,channel:n,_from_evt_log:r,previous_message:i})),t((0,r8.vz)({channelId:n,messageTs:a})),n&&t(tc({channelId:n,eventTs:l})),n&&t(lZ({channelId:n,prevMessage:i}))}function maybeResolveUpload(e,t){let a=(0,s.ZT)(t()),n=e.client_msg_id;(0,tM.Cp)(a,n)}let l9=(0,V.Ay)("calls the team-level message rtm handler",(e,t,{msgs:a,skipDefault:n})=>messageReceived(a,e,t,n));l9.meta={name:"legacyMessageReceivedHandlerThunk",key:"createThunkLegacyMessageReceivedHandlerThunk",description:"calls the team-level message rtm handler"},(0,i.uH)("message",(e,t)=>{(0,$.Qw)(t,l9({msgs:e,skipDefault:!1}))});var oe=a(0x2264e6ea3),ot=a(0xe0c9f9ec),oa=a(0x8ed587af),on=a(0x190a9df19),or=a(0x2f16f599),oi=a(0x149ced429),ol=a(0x165774b3f);let addTeamPermissionsAndMarkAsStale=(e,{permissions:t,teamId:a})=>{e((0,ol.N7)({permissions:t,teamId:a})),e((0,rI.P7)({permissions:t,markStaleImmediately:!0}))};function permissionsAdded(e,t,a){let{entity_type:n,entity_id:r,permissions:i}=e,l=a();"on"===(0,t7._Z)(l,"enterprise_search_rtm_events")&&"TEAM_OR_ORG"===n&&handleEnterpriseSearchPermissionAddition({dispatch:t,state:l,permissions:i}),"TEAM_OR_ORG"===n&&(0,oe.JV)(r)?(addTeamPermissionsAndMarkAsStale(t,{permissions:i,teamId:r}),t((0,rI.P7)({permissions:i,markStaleImmediately:!0}))):"TEAM_OR_ORG"===n?addTeamPermissionsAndMarkAsStale(t,{permissions:i,teamId:r}):"CHANNEL"===n&&t((0,ol.di)({permissions:i,channelId:r}))}function permissionsRemoved(e,t,a){let{entity_type:n,entity_id:r,permissions:i}=e,l=a();"on"===(0,t7._Z)(l,"enterprise_search_rtm_events")&&"TEAM_OR_ORG"===n&&handleEnterpriseSearchPermissionDeletion({dispatch:t,state:l,permissions:i,isDeleted:!0,removePermissionsAction:e=>{t((0,ol.w7)({permissions:e,teamId:r}))}}),"TEAM_OR_ORG"===n&&(0,oe.JV)(r)?(t((0,ol.w7)({permissions:i,teamId:r})),t((0,rI.P7)({permissions:i,markStaleImmediately:!0,teamId:r})),t((0,rI.P7)({permissions:i,markStaleImmediately:!0}))):"TEAM_OR_ORG"===n?t((0,ol.w7)({permissions:i,teamId:r})):"CHANNEL"===n&&t((0,rI.LC)({permissions:i,markStaleImmediately:!0,channelId:r}))}function permissionsInvalidated(e,t,a){let{entity_type:n,entity_id:r,permissions:i}=e,l=a();"on"===(0,t7._Z)(l,"enterprise_search_rtm_events")&&"TEAM_OR_ORG"===n&&handleEnterpriseSearchPermissionDeletion({dispatch:t,state:l,permissions:i,isDeleted:!0,removePermissionsAction:e=>{t((0,ol.w7)({permissions:e,teamId:r}))}}),"TEAM_OR_ORG"===n&&(0,oe.JV)(r)?t((0,rI.P7)({permissions:i,markStaleImmediately:!0})):"TEAM_OR_ORG"===n?t((0,rI.P7)({permissions:i,markStaleImmediately:!0,teamId:r})):"CHANNEL"===n&&t((0,rI.LC)({permissions:i,markStaleImmediately:!0,channelId:r}))}function doesUserMatchAccountType({state:e,accountType:t,teamId:a}){switch(t){case oi.UH.workspacePrimary:return(0,on.$G)(e,a);case oi.bW.workspaceOwner:return(0,on.p2)(e,a)&&!(0,on.$G)(e,a);case oi.bW.workspaceAdmin:return(0,on.Zo)(e,a)&&!(0,on.p2)(e,a);case oi.bW.orgOwner:return(0,on.hu)(e);case oi.bW.orgAdmin:return(0,on.FQ)(e)&&!(0,on.hu)(e);case oi.bW.mcg:return(0,tn.sV)(e)&&!(0,tn.AB)(e);case oi.bW.scg:return(0,tn.AB)(e);case oi.bW.member:return!(0,tn.DM)(e);default:return!1}}function filterEnterpriseSearchPermissions(e){return e.filter(e=>"string"==typeof e&&e.startsWith("ACCESS_ENTERPRISE_SEARCH_"))}function handleEnterpriseSearchPermissionAddition({dispatch:e,state:t,permissions:a}){if(0===filterEnterpriseSearchPermissions(a).length)return;let n=(0,lK.A)(t,{viewType:eY.D.Search});e((0,oa.v4)(t)&&n?(0,ot.w)({reason:"enterprise-search-permissions-added"}):(0,or.ZZ)())}function handleEnterpriseSearchPermissionDeletion({dispatch:e,state:t,permissions:a,isDeleted:n,removePermissionsAction:r}){if(!n||"on"!==(0,t7._Z)(t,"enterprise_search_rtm_events"))return;let i=filterEnterpriseSearchPermissions(a);if(0===i.length)return;r(i);let l=(0,lK.A)(t,{viewType:eY.D.Search});e((0,oa.v4)(t)&&l?(0,ot.w)({reason:"enterprise-search-permissions-deleted"}):(0,or.ZZ)())}function accountTypePermissionsChanged(e,t,a){let{entity_type:n}=e,r=a();if("on"===(0,t7._Z)(r,"enterprise_search_rtm_events")&&"TEAM_OR_ORG"===n){let{permissions:a,entity_id:n,is_deleted:i,is_allowed:l}=e;!0!==l||i||handleEnterpriseSearchPermissionAddition({dispatch:t,state:r,permissions:a}),handleEnterpriseSearchPermissionDeletion({dispatch:t,state:r,permissions:a,isDeleted:i,removePermissionsAction:e=>{t((0,ol.w7)({permissions:e,teamId:n}))}})}if("TEAM_OR_ORG"===n){let{permissions:a,account_type:n,entity_id:i}=e,l=doesUserMatchAccountType({state:r,accountType:n,teamId:i});(0,oe.JV)(i)?t((0,rI.P7)({permissions:a,markStaleImmediately:!0})):l&&t((0,rI.P7)({markStaleImmediately:!0,permissions:a,teamId:i}))}else if("CHANNEL"===n){let{permissions:a,entity_id:n}=e;t((0,rI.LC)({permissions:a,markStaleImmediately:!0,channelId:n}))}}(0,i.d1)("user_permissions_added",permissionsAdded),(0,i.d1)("user_permissions_removed",permissionsRemoved),(0,i.d1)("user_permissions_invalidated",permissionsInvalidated),(0,i.d1)("account_type_permissions_changed",accountTypePermissionsChanged);var oo=a(0x234a0ac4d),os=a(0xb90908),oc=a(0xe0477493);function findMatchFromPinnedItems(e,t){let a=t.type;if(a!==e.type)return!1;switch(a){case oc.R.MESSAGE:return e.message?.ts===t.message?.ts;case oc.R.FILE:return e.file?.id===t.file?.id;case oc.R.FILE_COMMENT:return e.comment.id===t.comment.id;default:return!1}}function filterPinnedItemMatches(e,t){return(0,os.A)(e,e=>findMatchFromPinnedItems(e,t))}var od=a(0x2bba3a0);function findPinnedItemMatchIndex(e,t){return(0,od.A)(e,e=>findMatchFromPinnedItems(e,t))}let om=(0,V.Ay)("Update the pinned_items field for a channel",(e,t,{pinned:a,item:n,channelId:r})=>{let i=(0,W.Ay)({getState:t,label:"UPDATE_CHANNEL_PINNED_ITEMS"}),l=(0,er.OL)(t(),r,!1);if(!l)return void i.warn(`Channel matching ${r} not found.`);let o={...l,pinned_items:l.pinned_items||[],pinned_items_count:l.pinned_items_count||0};a?-1===findPinnedItemMatchIndex(o.pinned_items||[],n)&&(o.pinned_items=[n,...o.pinned_items||[]],e((0,oo.B)({channel:o}))):(o.pinned_items=filterPinnedItemMatches(o.pinned_items,n),e((0,oo.B)({channel:o})))});om.meta={name:"updateChannelPinnedItems",key:"createThunkUpdateChannelPinnedItems",description:"Update the pinned_items field for a channel"};let get_file_from_pinned_item=function(e,t){let{file:a}=t;return a&&1===Object.keys(a).length?(0,tS.Ow)(e,a.id)?(0,tS.Lp)(e,a.id):null:a};var ou=a(0x102172771),op=a(0x23e1fed85),oh=a(0x22e855bef);let o_=(0,V.Ay)("Upserts a file after a change in a file comment pinned status and returns the new message event",(e,t,{item:a,pinned:n,channelId:r})=>{let i,l=get_file_from_pinned_item(t(),a);if(!l)return a;let{comment:o}=a,s=(0,od.A)(l.comments,e=>e.id===o.id),c={...l};if(!(s>-1)||(0,eq.A)(l.comments)||(0,eq.A)(c.comments))i=o,c=(0,oh.A)(o,l);else{let e=(0,ou.A)(n,l.comments[s],r);i={...e},c.comments[s]={...e}}return e((0,op.b)({files:[c]})),{...a,comment:i}});o_.meta={name:"upsertFileCommentPinnedStatus",key:"createThunkUpsertFileCommentPinnedStatus",description:"Upserts a file after a change in a file comment pinned status and returns the new message event"};let of=(0,V.Ay)("Upserts a file after a change in the pinned status and returns the new message event",(e,t,{item:a,pinned:n,channelId:r,pinnedInfo:i})=>{let l=get_file_from_pinned_item(t(),a);if(!l)return a;let o=(0,tL.Dn)(l,r,i);if(!o)return a;let s=(0,ou.A)(n,o,r);return e((0,op.b)({files:[s]})),{...a,file:s}});of.meta={name:"upsertFilePinnedStatus",key:"createThunkUpsertFilePinnedStatus",description:"Upserts a file after a change in the pinned status and returns the new message event"};var ob=a(0x40216ce3);let og=(0,V.Ay)("Updates local state when pin status on a channel has changed",(e,t,{pinned:a,item:n,channelId:r,pinnedInfo:i})=>{let l;a&&i&&(l={pinnedBy:i.pinned_by,pinnedTs:i.pinned_ts});let{type:o}=n,s=n;switch(o){case"message":s=e((0,ob.A)({pinned:a,item:n,channelId:r,pinnedInfo:l||{}}));break;case"file_comment":s=e(o_({pinned:a,item:n,channelId:r}));break;case"file":s=e(of({pinned:a,item:n,channelId:r,pinnedInfo:l||{}}))}e(om({pinned:a,item:s,channelId:r}))});og.meta={name:"upsertEntityPinnedStatus",key:"createThunkUpsertEntityPinnedStatus",description:"Updates local state when pin status on a channel has changed"};var oy=a(0x1895092e5),oA=a(0x237a55f00),ox=a(0x1b28f03b9),oE=a(0x14f629f0c);function pinAdded(e,t,a){let n=(0,W.Ay)({getState:a,label:"PIN_ADDED_RTM"});if(!e||!e.channel_id)return void n.warn("RTM event missing, or missing channel_id.");let r=a(),i=e.channel_id;if(!(0,er.OL)(r,i,!1))return void n.warn(`Channel matching ${i} not found.`);let{item:l,pin_count:o,pinned_info:s}=e;if(t(og({pinned:!0,item:l,channelId:e.channel_id,pinnedInfo:s})),(0,oA.A_)(r,i)===oc.b.LOADED){let e=(0,oE.B)(l);e&&t((0,oy.qH)({item:e,channelId:i}))}t((0,ox.K)({count:o,channelId:i})),t(ip({channelId:i,eventTs:e.event_ts}))}function pinRemoved(e,t,a){let n=(0,W.Ay)({getState:a,label:"PIN_REMOVED_RTM"});if(!e||!e.channel_id)return void n.warn("RTM event missing, or missing channel_id.");let r=a(),i=e.channel_id;if(!(0,er.OL)(r,i,!1))return void n.warn(`Channel matching ${i} not found.`);let{item:l,pin_count:o,pinned_info:s}=e;if(t(og({pinned:!1,item:l,channelId:e.channel_id,pinnedInfo:s})),(0,oA.A_)(r,i)===oc.b.LOADED){let e=(0,oE.B)(l);e&&t((0,oy.us)({item:e,channelId:i}))}t((0,ox.K)({count:o,channelId:i})),t(ip({channelId:i,eventTs:e.event_ts}))}(0,i.d1)("pin_added",pinAdded),(0,i.d1)("pin_removed",pinRemoved);var oC=a(0x1624919a);function onboardingPrefChange(e,t){t((0,oC.S)({pref:e.name,value:e.value,reason:"onboarding_pref_change"}))}(0,i.d1)("onboarding_pref_change",onboardingPrefChange);var ok=a(0x1500b5f62);function onboardingTeamPrefChange(e,t){t((0,ok.h)({pref:e.name,value:e.value,reason:"onboarding_team_pref_change"}))}(0,i.d1)("onboarding_team_pref_change",onboardingTeamPrefChange);let ov=(0,V.Ay)("refresh Megaphone notification data for the Quick Reactions space",(e,t,{name:a,value:n})=>{let r,i,l=t(),o="admin_customized_quick_reactions"===a;if(!o){let e=(0,tC.ty)(l,a);i=`${e}`,r=`${n}`}(i!==r||o)&&e((0,nc.iR)({event:{type:nd.jo.REQUEST_SPACES,spaces:[nd.xu.QUICK_REACTIONS]}}))});ov.meta={name:"maybeRefreshQuickReactionsNotificationData",key:"createThunkMaybeRefreshQuickReactionsNotificationData",description:"refresh Megaphone notification data for the Quick Reactions space"};var oS=a(0x62a17882),oI=a(0x12c020c3),ow=a(0x1059ba41d),oT=a(0xbc562055),oN=a(0x2075f0dab),oM=a(0x199201270);async function handleSignal(e,t){if(!(0,oS.y3)()||!t)return;(0,W.Ay)({teamId:e}).info("DESKTOP_DEEPLINK_SIGNALS","Received signal",t);let a=(0,oN.r$)(e,t),n=(0,ow.sST)(),r=Date.now();for(let t of a){if(t.desktopId!==n||t.isDesktopIdRequest||r-t.timestamp>oN.jP||oN.WN.has(t.id))continue;let i=(0,oI.qN)(t.url).team,l=(0,tv.en)(),o=(0,rP.getBootedWorkspaces)(l?.getState())??[];if(i&&e!==i&&o.includes(i)){(0,W.Ay)({teamId:e}).info("DESKTOP_DEEPLINK_SIGNALS","Deferring to target team",i);continue}(0,W.Ay)({teamId:e}).info("DESKTOP_DEEPLINK_SIGNALS","Handling signal",t),(0,eE.rh)().count("desktop_deeplink_handled_from_signal"),oN.WN.add(t.id);let s=await U.S.resolve((0,ow.Xgz)());(0,ow.hN0)(s),(0,$.Qw)(e,(0,oM.HB)({uri:t.url}));try{(0,$.Qw)(e,(0,oT.CI)({pref:"desktop_deeplink_signals",value:JSON.stringify((0,oN.tP)(a)),reason:"desktop_deeplink_signals"}));return}catch(t){(0,W.Ay)({teamId:e}).error("DESKTOP_DEEPLINK_SIGNALS","Could not beacon back pref",t)}}}var oR=a(0xf4930165),oP=a(0x5a5c86cb),oL=a(0x9e671ad),oO=a(0x204fe6114);let oD=(0,V.Ay)("Update muted channels when notification pref changes",(e,t,a)=>{let n=t(),r=(0,W.Ay)({state:n,label:"MUTED-CHANNELS"});if(!a||!a.channels)return;let i=(0,oR.A)((0,oP.A)(a.channels,e=>e.muted),()=>!0),l=(0,im.m)(n);(0,oL.A)(i,l)?r.info("Muted channels haven't changed, returning early"):(r.info(`Muted channels changed, new muted channels: ${Object.keys(i).join(",")}`),e((0,oO.k)(i)))});oD.meta={name:"updateMutedChannelsFromPref",key:"createThunkUpdateMutedChannelsFromPref",description:"Update muted channels when notification pref changes"};var oF=a(0xf1527618),oU=a(0xe9b0e82e),oB=a(0x3c2dea9),oH=a(0x1b4ecf8e7),oW=a(0x20085de45),oV=a(0x1de4133);function isPrefWithName(e,t){return e.name===t}function prefChange(e,t,a){let n=a(),r=(0,s.ZT)(n);if("media_muted"!==e.name&&"enable_media_captions"!==e.name&&!("arrow_history"===e.name&&(0,eO.A)())){if(isPrefWithName(e,oH.zw)&&t(oD((0,oU.Lr)(e.name,e.value))),isPrefWithName(e,"hidden_users"))return void t((0,oB.h)(e.value));if(isPrefWithName(e,"onboarding_state"))return void t((0,oF.sY)(e.value));r&&isPrefWithName(e,"desktop_deeplink_signals")&&handleSignal(r,e.value),(isPrefWithName(e,"user_customized_quick_reactions_display_feature")||isPrefWithName(e,"user_customized_quick_reactions_display_feature")||isPrefWithName(e,"user_customized_quick_reactions_emoji_1")||isPrefWithName(e,"user_customized_quick_reactions_emoji_2")||isPrefWithName(e,"user_customized_quick_reactions_emoji_3"))&&t(ov({name:e.name,value:e.value})),isPrefWithName(e,"later_show_upcoming_reminders")&&t((0,oV.Rk)()),t((0,oW.rX)({pref:e.name,value:(0,oU.Lr)(e.name,e.value)}))}}(0,i.d1)("pref_change",prefChange);var oG=a(0x17a77d778),oq=a(0x16cea8941),oj=a(0x1615b3b59),oz=a(0x19d0d2f2a);let oK=["can_accept_slack_connect_channel_invites","who_can_accept_slack_connect_channel_invites","can_create_external_limited_invite","who_can_create_external_limited_invite","can_create_slack_connect_channel_invite","who_can_create_slack_connect_channel_invite","who_can_manage_ext_shared_channels","channel_email_addresses_enabled"],o$=["who_can_dm_anyone","slack_connect_allowed_workspaces","max_guest_duration"];function handleWhoCanDmAnyone(e,t,a){let n=(0,s.ZT)(a());n&&(0,oz.Xr)(n)}function handleAdminCustomizedQuickReactions(e,t,a){let n=a(),r=(0,tC.ty)(n,"user_customized_quick_reactions_has_customized"),i=(0,tC.ty)(n,"user_customized_quick_reactions_use_frequently_used_emoji");r||(i||t((0,oj.GC)(e.value)),t(ov({name:e.name})))}function teamPrefChange(e,t,a){let n=a(),r=(0,s.ZT)(n),i=e.team_id;if(!(0,lr.ss)(n)&&i&&r&&i!==r)return void(0,W.Ay)({state:n,label:"RTM_TEAM_PREF_CHANGE"}).info(`rejecting team_pref_change event (${e.name}) with teamId: ${i}`);"who_can_dm_anyone"===e.name&&handleWhoCanDmAnyone(e,t,a),"admin_customized_quick_reactions"===e.name&&handleAdminCustomizedQuickReactions(e,t,a);let{name:l,value:o}=e;oK.includes(l)?t((0,oq.SM)({orgPrefs:{[l]:o}})):o$.includes(l)&&t((0,oq.UE)({lockedPrefs:{[l]:o}})),t((0,oG.JN)({pref:l,value:o,teamId:i}))}(0,i.d1)("team_pref_change",teamPrefChange);var oY=a(0x1cb3a1d29),oQ=a(0x219d80a29),oZ=a(0x94dc6585);let oJ="PRESENCE";function manualPresenceChange(e,t){let a=(0,i$.A)(e);if(!a)return;let{presence:n,type:r}=a,i=(0,W.Ay)({teamOrEnterpriseId:t,label:oJ});(0,oY.o)(n)?(i.info(`Received a ws manual_presence_change event. Will update current member's presence to ${n}`),(0,$.Qw)(t,(0,oQ.A)({presence:n}))):i.error(oJ,`An unknown presence was received in the '${r}' event: '${n}'`)}function presenceChange(e=[],t){let a=(0,W.Ay)({teamOrEnterpriseId:t,label:oJ}),n=e.reduce((e,{presence:t,type:n,users:r})=>((0,oY.o)(t)?!r||(0,tq.A)(r)?a.error(oJ,`The '${n}' event did not contain an array of users to update the presence for`):(a.debug(`Received a ws presence_change event. Will update the following users to a status of "${t}": ${r.join(", ")}`),r.forEach(a=>{e[a]=t})):a.error(oJ,`An unknown presence was received in the '${n}' event: '${t}'`),e),{});(0,$.Qw)(t,(0,oZ.H)(n))}(0,i.uH)("manual_presence_change",manualPresenceChange),(0,i.uH)("presence_change",presenceChange);var oX=a(0x22ef89887);(0,i.d1)("megaphone_notifications_team_refresh",(e,t)=>{t((0,oX.kd)()),t((0,nc.DN)({}))}),(0,i.d1)("megaphone_notifications_user_refresh",(e,t)=>{let{spaces:a}=e;if(a){let e=(0,ow.Z9F)();t((0,nc.iR)({reason:"user_refresh",event:{type:nd.jo.REQUEST_SPACES,spaces:a,isAppStoreBuild:e,iaVersion:4}}))}else t((0,nc.AD)({megaphoneReason:"user_refresh"}))}),(0,i.d1)("clear_megaphone_notification",(e,t)=>{t((0,oX.i0)(e))});var o0=a(0x1598e5174),o1=a(0x1ff5b60c4),o2=a(0x1aee5d32e);function isItemInSimpleFormat({type:e,ts:t,file:a,comment:n}={}){switch(e){case"message":return!!t;case"file":return"string"==typeof a;case"file_comment":return"string"==typeof a&&!!n;default:return!1}}function getContentReactedTo(e,{type:t,ts:a,channel:n,file:r,comment:i}){switch(t){case"message":return(0,as.Ld)(e,n,a,!1)||void 0;case"file":return(0,tS.Lp)(e,r,!1)||void 0;case"file_comment":return(0,tS.yd)(e,r,i)||void 0;default:return}}function reactionRemoved({item:e,reaction:t,user:a,event_ts:n},r,i){let l=i();if(!(0,o0.A)(e))return void(0,W.Ay)({state:l}).error("reaction_removed has no item");if(!isItemInSimpleFormat(e)||(e.channel&&r(ip({channelId:e.channel,eventTs:n})),!getContentReactedTo(l,e)))return;let{channel:o,type:s,ts:c,file:d,comment:m}=e,u=(0,o1.B)(s,c||m||d,o);r((0,o2.e)({key:u,name:t,userId:a}))}(0,i.d1)("reaction_removed",reactionRemoved);var o4=a(0x1c2067ad7),o5=a(0xe009643),o3=a(0x26183c55),o6=a(0x1faf30cb0);let o8=(0,V.Ay)("Push a reaction key to the back of the queue if it's not in the queue already",(e,t,a)=>{let n=t(),r=(0,er.OL)(n,a.channelId);if(!(0,r3.WK)(n,r))return;let i=(0,o6.l)(n),l=(0,j.A)(i,e=>e.key===a.key&&e.emoji===a.emoji);if(l){let t={...l,otherUsers:{...l.otherUsers,[a.userId]:!0}},n=i.map(e=>e===l?t:e);e((0,o3.D4)(n));return}e((0,o3._j)(a))});o8.meta={name:"queueToast",key:"createThunkQueueToast",description:"Push a reaction key to the back of the queue if it's not in the queue already"};let o7=(0,ej.A)((e,t,{toast:a})=>e(o8(a||{})),o5.d.DISPLAY,{leading:!0,maxWait:o5.d.DISPLAY+o5.d.WAIT}),o9=(0,V.Ay)("Push a reaction key to the back of the queue with debounced wait",(e,t,{toast:a})=>o7(e,t,{toast:a}));o9.meta={name:"debouncedQueueToast",key:"createThunkDebouncedQueueToast",description:"Push a reaction key to the back of the queue with debounced wait"};let se="REACTIONS-SHARED-RTM",st=`[${se}] Not a gantry context`;(0,i.uH)("reaction_added",(e,t)=>{if(!rP.getFocusedWorkspace||!rP.getWorkspacesByOrg||!eN.wE)throw Error(st);let a=(0,W.Ay)({teamOrEnterpriseId:t,label:se}),n=(0,$.jp)(t).getState(),r=(0,Y.WR)(n);e.forEach(e=>{let n=((e,t)=>{let{item:a,reaction:n,user:r,item_user:i,event_ts:l,url:o}=e;if(!(0,o0.A)(a))return t.error("reaction_added has no item"),null;let{type:s,channel:c,ts:d}=a;return c&&(0,rU.A)(c)&&d&&(0,rU.A)(d)?{name:n,contentUserId:i,userId:r,eventTs:l,key:(0,o1.B)(s,d,c),item:a,type:s,channelId:c,ts:d,url:o}:(t.error(`handler requires ts and channelId to process reaction_added, received: { channelId: ${c}, ts: ${d} }`),null)})(e,a);if(!n)return;let{name:i,contentUserId:l,userId:o,key:s,type:c,channelId:d,url:m}=n;if("message"!==c||!(0,$.Qw)(t,(0,o4.B)({key:s,name:i,userId:o,url:m})))return;let u=r===o;r!==l||u||(0,eN.wE)({action:o9({toast:{key:s,emoji:i,url:m,userId:o,channelId:d}}),teamOrEnterpriseId:t})})});var sa=a(0x19f152bf8),sn=a(0x1b5338cd8),sr=a(0x16b708a7f);(0,i.d1)("sales_home_report_run_complete",({report_id:e},t,a)=>{let n=a(),r=(0,sa.JZ)(n),i=r.find(t=>t.insight.reportId===e)?.salesforce_org_id;i?t((0,sn.A)({reportId:e,salesforceOrgId:i,skipSfdcApi:!0})):(0,W.Ay)({getState:a}).error(`Failed to find insight with reportId: ${e}. Skipping handleSalesHomeReportRunComplete RTM handler!`,{numberOfInsights:r.length,reportId:e,userInsights:r.map(e=>({reportId:e.insight.reportId,salesforceOrgId:e.salesforce_org_id}))})}),(0,i.d1)("sales_home_notification_updated",({notification_ts:e,notification_body:t},a)=>{a((0,sr.$M)({createdTs:e,body:t}))});var si=a(0xdd4fbdde),sl=a(0x121459a2),so=a(0xa985ed31),ss=a(0x1ee2e1f1b),sc=a(0x686c1128),sd=a(0xcb8fd068),sm=a(0x2cc80141),su=a(0xfcb945dc),sp=a(0x80f07ede),sh=a(0x1b9ff23fe),s_=a(0x214d747c),sf=a(0xb8c5c3c3);let beaconLaterNotification=(e,{itemId:t,itemType:a,savedState:n,description:r})=>{let i={saved_item_id:t,saved_type:a,saved_state:n,description:r};Object.keys(i).forEach(t=>{(0,eE.Cv)({state:e}).recordMetric(t,i[t])})};async function handleSavedDue(e,t,a){let n=a(),r=(0,W.Ay)({state:n,label:si.o7});r.info("saved_due received",e),(0,eA.$V)(n)&&t((0,s_.O)({savedReminders:[(0,sf.mY)(e.saved)]}));let i=(0,ss.x)(e.saved),l=(0,sf.Fz)(i);(0,sh.dc)(n,l)||t((0,su.B5)(i)),(0,so.A)(l)&&await t((0,sd.A)({fileId:l,reason:"savedDue"})),(i.itemType===sl.ll.list_record||i.itemType===sl.ll.list_record_field)&&await t((0,sd.A)({fileId:i.itemId,reason:"savedDue"})),i.itemType===sl.ll.canvas_section&&await t((0,sd.A)({fileId:i.itemId,reason:"savedDue"})),i.itemType===sl.ll.message&&(await t((0,sc.a)({channelIds:[i.itemId],reason:"handleSavedDue"})),await t((0,sm.p)({timestamps:[{channelId:i.itemId,ts:i.ts}]})));let o=(0,ex.x6)(n,i);if(o===eC.Z.NONE)r.info("saved_due dispatching notification",e),t((0,eg.T4)({savedItem:i})),beaconLaterNotification(n,{itemId:l,itemType:i.itemType,savedState:i.state,description:"Later desktop notification shown"});else{let e=(0,eC.Q)(o);r.info("saved_due suppressed",e),beaconLaterNotification(n,{itemId:l,itemType:i.itemType,savedState:i.state,description:`saved_due suppressed: ${e}`})}t((0,sp.L)({counts:e.counts}))}(0,i.d1)("saved_added",(e,t,a)=>{let n=a();(0,W.Ay)({state:n,label:si.o7}).info("saved_added received",e),(0,eA.$V)(n)&&t((0,s_.O)({savedReminders:[(0,sf.mY)(e.saved)]}));let r=(0,ss.x)(e.saved),i=e?.client_id,l=i&&(0,sh.dc)(n,i);if(l){let e={...l,itemId:r.itemId};t((0,su.fk)({itemId:i,updatedItem:e}))}else{if(t((0,su.B5)(r)),r.itemType===sl.ll.message&&r.ts){let e=(0,as.Ld)(n,r.itemId,r.ts);if(e&&!(0,rJ.ow)(e)){let a={...e,saved:(0,sf.Y3)(r)};t((0,iG.Kc)([a]))}}if(r.itemType===sl.ll.file&&r.itemId){let e=(0,tS.Lp)(n,r.itemId);if(e){let a={...e,saved:(0,sf.Y3)(r)};t((0,op.b)({files:[a]}))}}if(r.itemType===sl.ll.list_record&&r.itemId&&r.recordId){let e=(0,ra.ll)(n,r.itemId,r.recordId);if(e){let n={...e,saved:(0,sf.Y3)(r)};t((0,al.$W)({listId:r.itemId,record:n,listsPerfTwoEnabled:(0,eA.SP)(a())}))}}if(r.itemType===sl.ll.list_record_field&&r.itemId&&r.recordId&&r.columnId){let e=(0,ra.ll)(n,r.itemId,r.recordId);if(e){let n={...e,savedFields:{...e.savedFields,[r.columnId]:(0,sf.Y3)(r)}};t((0,al.$W)({listId:r.itemId,record:n,listsPerfTwoEnabled:(0,eA.SP)(a())}))}}if(r.itemType===sl.ll.canvas_section&&r.itemId&&r.sectionId){let e=(0,tS.Lp)(a(),r.itemId);if(e){let a={...e,savedSections:{...e.savedSections,[r.sectionId]:(0,sf.Y3)(r)}};t((0,op.b)({files:[a]}))}}}t((0,sp.L)({counts:e.counts}))}),(0,i.d1)("saved_updated",(e,t,a)=>{let n=a();(0,W.Ay)({state:n,label:si.o7}).info("saved_updated received",e),(0,eA.$V)(n)&&t((0,s_.O)({savedReminders:[(0,sf.mY)(e.saved)]}));let r=(0,ss.x)(e.saved),i=(0,sf.Fz)(r);if(t((0,su.fk)({itemId:i,updatedItem:r})),r.itemType===sl.ll.message&&r.ts){let e=(0,as.Ld)(n,r.itemId,r.ts);if(e){let a={...e,saved:(0,sf.Y3)(r)};t((0,iG.Kc)([a]))}}if(r.itemType===sl.ll.file&&r.itemId){let e=(0,tS.Lp)(n,r.itemId);if(e){let a={...e,saved:(0,sf.Y3)(r)};t((0,op.b)({files:[a]}))}}if(r.itemType===sl.ll.list_record&&r.itemId&&r.recordId){let e=(0,ra.ll)(n,r.itemId,r.recordId);if(e){let n={...e,saved:(0,sf.Y3)(r)};t((0,al.$W)({listId:r.itemId,record:n,listsPerfTwoEnabled:(0,eA.SP)(a())}))}}if(r.itemType===sl.ll.list_record_field&&r.itemId&&r.recordId&&r.columnId){let e=(0,ra.ll)(n,r.itemId,r.recordId);if(e){let n={...e,savedFields:{...e.savedFields,[r.columnId]:(0,sf.Y3)(r)}};t((0,al.$W)({listId:r.itemId,record:n,listsPerfTwoEnabled:(0,eA.SP)(a())}))}}if(r.itemType===sl.ll.canvas_section&&r.itemId&&r.sectionId){let e=(0,tS.Lp)(a(),r.itemId);if(e){let a={...e,savedSections:{...e.savedSections,[r.sectionId]:(0,sf.Y3)(r)}};t((0,op.b)({files:[a]}))}}t((0,sp.L)({counts:e.counts}))}),(0,i.d1)("saved_deleted",(e,t,a)=>{let n=a();if((0,W.Ay)({state:n,label:si.o7}).info("saved_deleted received",e),(0,eA.$V)(n)){let a=(0,sf.Tv)(e.saved);t((0,su.tU)({compoundKey:a}))}let r=e.saved.item_id,i=e.saved.item_type,l=e.saved.item_detail,o=e.saved.ts;if(i===sl.ll.message){t((0,su.Ai)({itemId:r,messageTs:o}));let e=(0,as.Ld)(n,r,o);e&&(delete e.saved,t((0,iG.Kc)([e])))}if(i===sl.ll.list_record){t((0,su.Ai)({itemId:r,recordId:o}));let e=(0,ra.ll)(n,r,o);e&&(delete e.saved,t((0,al.$W)({listId:r,record:e,listsPerfTwoEnabled:(0,eA.SP)(a())})))}if(i===sl.ll.list_record_field){t((0,su.Ai)({itemId:r,recordId:o,columnId:l}));let e=(0,ra.ll)(n,r,o);e&&l&&e.savedFields?.[l]&&(delete e.savedFields[l],t((0,al.$W)({listId:r,record:e,listsPerfTwoEnabled:(0,eA.SP)(a())})))}if(i===sl.ll.canvas_section){t((0,su.Ai)({itemId:r,sectionId:l}));let e=(0,tS.Lp)(a(),r);if(e&&l){let a={...e,savedSections:{...e.savedSections,[l]:null}};t((0,op.b)({files:[a]}))}}if(i===sl.ll.file){t((0,su.Ai)({itemId:r}));let e=(0,tS.Lp)(n,r);e&&(delete e.saved,t((0,op.b)({files:[e]})))}i===sl.ll.reminder&&t((0,su.Ai)({itemId:r,messageTs:o})),t((0,sp.L)({counts:e.counts}))}),(0,i.d1)("saved_due",handleSavedDue),(0,i.d1)("saved_clear",(e,t,a)=>{let n=a();(0,W.Ay)({state:n,label:si.o7}).info("saved_clear received",e),t((0,oV.IU)())});var sb=a(0x214517841);function handleSearchFrecencyPrefsUpdate(e,t,a){"on"===(0,t7._Z)(a(),"merge_frecency_from_clients")&&"updated"===e.value&&t((0,sb.g)())}(0,i.d1)("search_frecency",handleSearchFrecencyPrefsUpdate);var sg=a(0x15333c41a);function handleGuidelinesUpdate(e,t,a){let{guideline_type:n}=e;(0,sg.Sc)((0,s.ZT)(a()),n)}function handleSlackConnectPrefsUpdate(e,t,a){let{pref_name:n}=e,r=a(),i=(0,s.ZT)(r);if("shared_channel_invite_requested"!==n)switch(n){case"allow_sc_file_uploads":case"external_awareness_context_bar":case"shared_channel_invite_requested":return handlePrefUpdated(r,i)}}function handlePrefUpdated(e,t){let a=(0,er.DM)(e).reduce((e,t)=>((0,ta.ju)(t)&&e.push(t.id),e),[]);(0,aj.YO)(t,a)}(0,i.d1)("slack_connect_guidelines_updated",handleGuidelinesUpdate),(0,i.d1)("slack_connect_pref_changed",handleSlackConnectPrefsUpdate);var sy=a(0x213850b13),sA=a(0x16441eef7),sx=a(0xa5b9082a);(0,i.d1)("solution_started",(e,t)=>{t((0,a2.M1)({channelId:e.solution.channel_id,provisioningState:{templateId:e.solution.channel_template_id}}))}),(0,i.d1)("solution_completed",(e,t,a)=>{let n=a(),r=(0,h.eo)({getState:a}),i=(0,sx.L6)(n,e.solution.channel_id),l=(0,sx.iX)(n,e.solution.channel_id);i&&t(e.error?(0,a2.M1)({channelId:e.solution.channel_id,provisioningState:{templateId:e.solution.channel_template_id,error:e.error}}):(0,a2.M1)({channelId:e.solution.channel_id,provisioningState:{templateId:e.solution.channel_template_id,complete:!0}})),l&&r.track(p.EventId.SOLUTIONS_SETUP,{contexts:{ui_context:{step:p.UiStep.CONFIRMATION,ui_properties:{element_name:e.error?"provisioning_error":"provisioning_success"}}},tracking_id:l,channel_id:e.solution.channel_id})}),(0,i.d1)("solution_template_deleted",(e,t)=>{t((0,a2.I7)({templateId:e.template_id}))}),(0,i.d1)("solution_template_updated",(e,t,a)=>{let n=a(),r=(0,s.ZT)(n);r&&(0,sA.G)().markObjectsAsStale(r,[e.template_id])}),(0,i.d1)("solution_assets_created",(e,t,a)=>{let n=a();(0,lJ.Sp)(n)&&t((0,sy.X)({reason:"solutions_rtm_assets_created"}))});var sE=a(0x209d60fc8),sC=a(0x10f60d682);let sk="RTM-STARS",sv="message",sS="file",sI="channel",sw="group";(0,i.d1)("star_added",(e,t,a)=>{if(e){if(!e.item)return void(0,W.Ay)({getState:a}).info(sk,`imsg type "${e.type}" has no item`);if(t((0,sC.GM)(e.item)),e.item.type===sv){let n=t((0,le.A)({imsgs:[e.item.message],channelId:e.item.channel}));t((0,iG.Kc)(n)),(0,W.Ay)({getState:a}).info(sk,"star_added for message")}else e.item.type===sS?(t((0,op.b)({files:[e.item.file]})),(0,W.Ay)({getState:a}).info(sk,"star_added for file")):(e.item.type===sI||"im"===e.item.type||e.item.type===sw)&&(t((0,sE.bd)(e.item.channel)),(0,W.Ay)({getState:a}).info(sk,`star_added for channel ${e.item.channel}`))}}),(0,i.d1)("star_removed",(e,t,a)=>{if(!e?.item)return void(0,W.Ay)({getState:a}).info(sk,`${e.type} has no item`);if(t((0,sC.tJ)(e.item)),e.item.type===sv){let a=t((0,le.A)({imsgs:[{...e.item.message,is_starred:!1}],channelId:e.item.channel}));t((0,iG.Kc)(a))}else if(e.item.type===sS){let t=(0,s.ZT)(a());if(!t)return;(0,aa.D1)(t,[e.item.file.id])}else(e.item.type===sI||"im"===e.item.type||e.item.type===sw)&&t((0,sE.wX)(e.item.channel));(0,W.Ay)({getState:a}).info(sk,"star_removed")});var sT=a(0x1daf4b9c),sN=a(0xd7e604c9),sM=a(0x10079cc7),sR=a(0xcd225243),sP=a(0x1c22ac01b),sL=a(0x46e70238),sO=a(0x1c93af6de),sD=a(0x178533105),sF=a(0x1126392c1),sU=a(0x1dd1bbe23);let sB=(0,V.Ay)("delete profile fields from a team and its members",(e,t,{teamId:a,fieldsToDelete:n=[]})=>{let r=t(),i=a||(0,s.ZT)(r);e((0,nz.ZO)({teamId:i,fieldsToDelete:n}));let l=(0,sD.A)((0,M.I_)(r),(e,t)=>((0,S.jm)(t)&&(0,iK.A)(n,e=>!(0,eq.A)(t?.profile?.fields?.[e]))&&e.push((0,sU.A)(t,n)),e),[]);(0,tq.A)(l)||e((0,sF.Ay)({members:l}))});sB.meta={name:"deleteProfileFields",key:"createThunkDeleteProfileFields",description:"delete profile fields from a team and its members"};var sH=a(0x20e84ea0e),sW=a(0xb14f04f1),sV=a(0x105f056cd),sG=a(0x3ea72b02),sq=a(0x1ac1baa29),sj=a(0x185452ca6),sz=a(0x20061cab9),sK=a(0x1cf38bd02);let s$=(0,V.Ay)("Dismiss the Slack Connect Straight to Paid Modal if it is currently visible",(e,t,{plan:a})=>{let n=t();a!==sM.F2.FREE&&(0,sK.YM)(n)&&(0,ns.Hp)(n,nd.xu.LAUNCH_MODAL)===nd.ze.SLACK_CONNECT_STRAIGHT_TO_PAID_MODAL&&(e((0,sz.Ay)({spaceName:nd.xu.LAUNCH_MODAL,action:nd.hw.DISMISS})),e((0,oG.Kj)({pref:sj.I,value:"completed",reason:"team-plan-changed"})))});s$.meta={name:"maybeDismissSlackConnectStraightToPaidModal",key:"createThunkMaybeDismissSlackConnectStraightToPaidModal",description:"Dismiss the Slack Connect Straight to Paid Modal if it is currently visible"};var sY=a(0x1ee439e69),sQ=a(0x23a11dd28),sZ=a(0x164ee0b8e);let sJ=sZ.W6,sX=sZ.t2;function accountsChanged(e,t,a){if(!(0,eO.A)())return;t((0,sO.A)()),(0,sR.Rk)(a);let n=e.event_ts?parseInt(e.event_ts,10):0;(0,eU.YG)(n)}function addedToTeam({team_id:e},t,a){let n=(0,W.Ay)({getState:a,label:"RTM"});if((0,eO.A)()){let r=(0,M.cA)(a());r.enterprise_user&&r.enterprise_user.teams&&t((0,sF.Ay)({members:[{...r,enterprise_user:{...r.enterprise_user,teams:(0,rF.A)(r.enterprise_user.teams,[e])}}]})),n.info(`User was added to team ${e}; re-fetching auth`),(0,sR.i$)(t,a,e)}}function removedFromTeam({team_id:e},t,a){let n=(0,W.Ay)({getState:a,label:"RTM"}),r=(0,M.cA)(a());r.enterprise_user&&r.enterprise_user.teams&&t((0,sF.Ay)({members:[{...r,enterprise_user:{...r.enterprise_user,teams:(0,tf.A)(r.enterprise_user.teams,e)}}]}));let i=(0,s.ZT)(a()),l=Object.keys(sJ("teams")||{}).indexOf(e)>=0,o=(0,eO.A)()?l:e===i;if((0,sT.A)()&&(0,lr.ss)(a())){n.info(`User was removed from team ${e}. Opening removed from workspace modal before cold booting`),t((0,sN.R)({workspaceId:e,source:"leave"}));return}o?(n.info(`User was removed from team ${e}; re-fetching auth`),(0,sR.zv)(t,a,e)):n.info(`User was removed from team ${e} but it is not relevant to us; ignoring`)}function migrationUnblocked({enterprise_id:e},t,a){(0,W.Ay)({getState:a,label:"RTM"}).info(`Migration was completed for enterprise ${e}. Display banner to refresh.`),t((0,oX.G0)({spaceName:nd.xu.CLIENT_FOOTER,notificationName:nd.ze.MIGRATION_UNBLOCKED_REFRESH_BANNER}))}function teamRenamed({team_id:e,source_team:t,name:a},n,r){let i=r(),l=(0,sY.H7)(i);if(!l)return;let o=e||t||l.id;n((0,nz.IA)({teamId:o,name:a})),l.id===o&&(0,ow.ec1)(a)}function teamIconChanged({team_id:e,source_team:t,icon:a},n,r){let i=(0,sY.H7)(r());if(!i)return;let l=e||t||i.id;n((0,nz.qq)({teamId:l,icon:a}))}function teamProfileChanged({profile:e},t){t((0,sH.A)({fields:e.fields}))}function teamProfileReorder({profile:e},t){t((0,nz.$e)({fields:e.fields}))}function teamProfileDelete({profile:e},t){t(sB({fieldsToDelete:e.fields}))}function teamEmailDomainChanged(e,t,a){let n=(0,sY.H7)(a());t((0,sQ.XS)({team:{...n,email_domain:e.email_domain}}))}function teamPlanChanged({plan:e,can_add_ura:t,paid_features:a},n,r){let i=r(),l=(0,sY.H7)(i),o=(0,s.ZT)(i),c="rtm_team_plan_change";n((0,sQ.XS)({team:{...l,plan:e,can_add_ura:t}})),n((0,sG.uJ)()),n((0,aw.hX)()),o&&(0,oz.Xr)(o),a&&n((0,sW.C)(a)),n((0,sq.A)({reason:c,forceFetch:!0})),n((0,sP.u)({teamId:o,reason:c})),e===sM.F2.PLUS&&(n((0,rI.yh)({teamId:o})),n((0,l5.J5)(!0))),n(s$({plan:e}))}function teamPlanFreezeStateChanged({is_plan_frozen:e},t){t((0,sV.M)({is_plan_frozen:e})),t((0,sG.uJ)())}function teamDomainChanged(e,t,a){let n=(0,sY.H7)(a()),r=e.team_id;(!r||r===n.id)&&(t((0,sQ.XS)({team:{...n,domain:e.domain,url:e.url}})),(0,ow.v1z)(e.url),sX&&sX(n.id,"url",e.url))}function teamConnectionSevered(e,t,a){let n=(0,sY.H7)(a());(0,tf.A)(e.team_ids,n.id).forEach(e=>{t((0,sL.P8)({teamId:e}))})}function teamVerifiedChanged({is_verified:e,public_url:t,source_team:a},n,r){let i=r(),l=t,o=e,s=a?(0,sY._J)(i,a):(0,sY.Yc)(i);s&&(o&&!l&&(o=!1),o||(l=void 0),n((0,sQ.XS)({team:{...s,is_verified:!!o,public_url:l}})))}(0,i.d1)("accounts_changed",accountsChanged),(0,i.d1)("user_added_to_team",addedToTeam),(0,i.d1)("user_removed_from_team",removedFromTeam),(0,i.d1)("team_plan_change",teamPlanChanged),(0,i.d1)("team_plan_freeze_state_changed",teamPlanFreezeStateChanged),(0,i.d1)("team_rename",teamRenamed),(0,i.d1)("team_icon_change",teamIconChanged),(0,i.d1)("team_profile_reorder",teamProfileReorder),(0,i.d1)("team_profile_change",teamProfileChanged),(0,i.d1)("team_profile_delete",teamProfileDelete),(0,i.d1)("email_domain_changed",teamEmailDomainChanged),(0,i.d1)("team_domain_change",teamDomainChanged),(0,i.d1)("team_connection_severed",teamConnectionSevered),(0,i.d1)("team_verified_changed",teamVerifiedChanged),(0,i.d1)("migration_unblocked",migrationUnblocked);let s0={};Object.defineProperty(s0,"getLocalConfigByKey",{get:()=>sJ,set:e=>{sJ=e}}),Object.defineProperty(s0,"setLocalConfigForTeamWithKey",{get:()=>sX,set:e=>{sX=e}});let s1=(0,V.Ay)("Upsert a team description",(e,t,{teamId:a,description:n})=>{let r=t();if(!a)return;let i=(0,sY._J)(r,a,!1);if(!i)return;let l={...i,description:n};e((0,sQ.XS)({team:l}))});s1.meta={name:"upsertTeamDescription",key:"createThunkUpsertTeamDescription",description:"Upsert a team description"},(0,i.d1)("team_description_changed",(e,t,a)=>{let{team_id:n,description:r}=e;(0,W.Ay)({getState:a,label:"RTM-TEAM-DESCRIPTION-CHANGED"}).info(`Received team_description_changed for ${n}.`),t(s1({teamId:n,description:r}))});var s2=a(0x144d69fbd),s4=a(0x11933cb4b),s5=a(0x10fd1d7a8),s3=a(0x55467c4f),s6=a(0x21b7b6046),s8=a(0x3dbb4e84),s7=a(0x119439f97),s9=a(0xd19d108a),ce=a(0x155dd4038);function invalidateSome(e,t=[]){let a=(0,$.$D)(e),n=(0,i8.Hw)(e).reduce((e,{channelId:t,ts:a}={})=>(t&&a&&(e[t]||(e[t]=[])).push(a),e),{});if(t.length){let r=t.reduce((e,t)=>(e[t]=!0,e),{}),i=(0,aa.Hw)(e).filter(e=>(0,tL.o3)((0,tS.Lp)(a,e,!1)).some(e=>r[e]));(0,aa.D1)(e,i),(0,aR.D1)(e,t),t.forEach(t=>{let a=n[t];a&&((0,i8.D1)(e,t,a),(0,$.Qw)(e,(0,aw.Jt)({channelId:t})))})}else(0,aa.D1)(e,(0,aa.Hw)(e)),(0,aR.D1)(e,(0,aR.Hw)(e)),Object.keys(n).forEach(t=>{let a=n[t];a&&(0,i8.D1)(e,t,a)}),(0,$.Qw)(e,(0,aw.Jt)({}))}function invalidateAll(e){(0,eO.A)()?(0,$.Qw)(e,(0,s2.Ky)()):(0,sT.A)()&&((0,$.Qw)(e,(0,s7.j)()),(0,$.Qw)(e,(0,s2.C7)()))}function replayTeamTopicEvents(e){let t=(0,$.$D)(e),a=(0,ez.A)(s3.bQ).join(","),n=(0,s9.t)(t);if(!n)return;let r=(0,$.oK)(e);r&&r.getState&&(0,s6.aQ)(r.getState,{start:n,include:a,reason:"invalidateResyncedTopics"})}function invalidateTopics(e){let t=(0,ce.mr)(e);(0,ce.nE)(e);let a=(0,$.$D)(e),n=(0,Y.WR)(a),r=[],i=[],l=[],o=[],s=[],c=t.length;for(let e=0;e<c;e++){let a=t[e];if(a===n){r.push(a);break}if((0,D.A)(a))i.push(a);else if((0,oe.JV)(a))o.push(a);else if((0,oe.Ay)(a))l.push(a);else{s.push(a);break}}let d=!!(r.length||s.length),m=!!(o.length||l.length),u=!!i.length;d?invalidateAll(e):m?(invalidateSome(e),replayTeamTopicEvents(e)):u&&invalidateSome(e,(0,ez.A)(i)),(0,$.Qw)(e,(0,s2.ac)(t)),(0,s5.s)((0,$.$D)(e))||((0,eE.Cy)({state:a}).measureAndClear(s4.b8),(0,$.Qw)(e,(0,s8.x0)({delay:s4.SV})))}let ct=(r=(0,q.A)(()=>(0,nM.A)(invalidateTopics,s4.Ks)),e=>r()(e)),ca=(0,V.Ay)("Invalidate client caches for topics",(e,t,a=[])=>{let n=t(),r=(0,s.ZT)(n);if(!r)return;let i=(0,ce.mr)(r);(0,ce.Wz)(r,i.concat(a)),ct(r)});ca.meta={name:"invalidateResyncedTopics",key:"createThunkInvalidateResyncedTopics",description:"Invalidate client caches for topics"};let cn={};function desync({channel_ids:e=[]}={},t,a){let n=a(),r=(0,eE.Cy)({state:n}),i=(0,W.Ay)({state:n}),l=e.filter(e=>!(0,s5.N)(n,e));if(!l.length)return;(0,s5.s)(n)||r.mark(s4.b8);let o=`desynced topics (${l})`;i.info(s4.b8,o),r.count(s4.kI,l.length),t((0,s2.at)(l))}function resync({channel_ids:e=[]}={},t,a){let n=a(),r=(0,eE.Cy)({state:n}),i=(0,W.Ay)({state:n}),l=`resynced topics (${e})`;i.info(s4.b8,l),r.count(s4.y4,e.length),t(ca(e))}Object.defineProperty(cn,"invalidateSome",{get:()=>invalidateSome,set:e=>{invalidateSome=e}}),Object.defineProperty(cn,"invalidateAll",{get:()=>invalidateAll,set:e=>{invalidateAll=e}}),Object.defineProperty(cn,"invalidateTopics",{get:()=>invalidateTopics,set:e=>{invalidateTopics=e}}),Object.defineProperty(cn,"invalidateTopicsThrottled",{get:()=>ct,set:e=>{ct=e}}),Object.defineProperty(cn,"replayTeamTopicEvents",{get:()=>replayTeamTopicEvents,set:e=>{replayTeamTopicEvents=e}}),(0,i.d1)("desync",desync),(0,i.d1)("resync",resync);var cr=a(0x6affae29),ci=a(0x1c9df904f),cl=a(0xc6f9b126),co=a(0xa44c362),cs=a(0x1a9fe3e86),cc=a(0x1ff460f29),cd=a(0x23cb9f46a);async function userAlertRtmHandler(e,t){let a,n=e.alert_type,r=e.unread_count;switch(n){case cl.e.SharedWorkspaceInvite:break;case cl.e.ExternalChannelInvite:case cl.e.ExternalDmInvite:if(t((0,cd.g)({alertType:n,unreadCount:r})),e.external_dm_invite?a=e.external_dm_invite:e.external_channel_invite&&(a=e.external_channel_invite),a){switch(a.action){case ci.q.InviteReceived:t(id({messageTs:e.event_ts||"",feedTs:e.event_ts||"",invite:a.invite_id,type:e.alert_type}));break;case ci.q.InviteAcknowledged:t((0,r8.A2)({inviteId:a.invite_id,value:!1}))}let n=a.connect_invite,r=!!n&&(0,co.vv)(n);switch(a.action){case ci.q.InviteReceived:t((0,cc.R)({connectInvites:[n]})),t((0,cs.Dn)({connectInvite:n})),t((0,cs.Ci)({connectInvite:n}));break;case ci.q.InviteAcknowledged:t((0,cc.R)({connectInvites:[n]})),r||(t((0,cs.Dn)({connectInvite:n})),t((0,cs.Ci)({connectInvite:n})));break;case ci.q.InviteAccepted:case ci.q.InviteApproved:case ci.q.InviteRejected:case ci.q.InviteExpired:t((0,cc.R)({connectInvites:[n]})),t((0,cs.Dn)({connectInvite:n})),t((0,cs.RX)({connectInviteId:a.invite_id}));break;case ci.q.InviteRemoved:t((0,cs.qE)({connectInviteId:a.invite_id}));break;default:(0,cr.Kh)(a.action)}}break;case cl.e.SalesHomeNotification:case cl.e.ListsUserMentioned:case cl.e.ListsRecordAssigned:case cl.e.ListsTodoNotification:case cl.e.ListsRecordEdited:case cl.e.HuddlesMissedHuddle:case cl.e.SavedReminder:case cl.e.CalendarUpcomingEvent:case cl.e.UnjoinedChannelMention:case cl.e.ListsApprovalRequest:case cl.e.ListsApprovalReviewed:case cl.e.TeamJoinerInvite:case cl.e.GenericSystemAlert:case cl.e.PrejoinDmWelcomePartyAlert:t((0,cd.g)({alertType:n,unreadCount:r}));break;default:(0,cr.Kh)(n)}}async function user_alert_notifications_maybeShowNotification(e,t,a){let n=a();if(!(0,ia.zO)(n)||!(0,Y.TZ)(n))return null;"unjoined_channel_mention"===e.alert_type&&t((0,eg.Br)(e)),"generic_system_alert"===e.alert_type&&t((0,eg.HC)(e))}(0,i.d1)("user_alert",userAlertRtmHandler),(0,i.d1)("user_alert_notification",user_alert_notifications_maybeShowNotification);var cm=a(0x9eb59ccf),cu=a(0xaac3cc35),cp=a(0x475c9cfe),ch=a(0x24d1dd698);function subteamUpdated(e,t,a){let n=a();if(!e||!e.subteam||!e.subteam.id)return void(0,W.Ay)({getState:a}).warn("subteam_updated: No message event provided, or no subteam provided in the message event.");let r=e.subteam,i=e.subteam.id,l=(0,cp.JO)(n,i)&&(0,cp.lJ)(n,i);if(!l)return;let o=computeUpdatedUserGroup({knownUserGroup:l,newUserGroup:r});t((0,ch.A)({userGroups:[o]}))}function computeUpdatedUserGroup({knownUserGroup:e,newUserGroup:t}){return e?{...t,users:"users"in e&&e.users||[]}:t}function subteamMembersChanged(e,t,a){if((0,eO.A)())return;if(!e||!e.subteam_id)return void(0,W.Ay)({getState:a}).warn("subteam_members_changed: No message event provided, or no subteam_id provided in the message event.");let n=e.subteam_id,r=(0,cp.JO)(a(),n)&&(0,cp.lJ)(a(),n);if(!r)return void(0,W.Ay)({getState:a}).warn(`subteam_members_changed: Received event for an unknown user group: ${n}`);let i="users"in r&&r.users||[],{added_users:l=[],removed_users:o=[]}=e,s=i;l.length&&(s=(0,rF.A)(s,l)),o.length&&(s=(0,t3.A)(s,o)),t((0,cu.zz)({groupId:r.id,users:s}))}function subteamCreated(e,t,a){e&&e.subteam?t((0,ch.A)({userGroups:[e.subteam]})):(0,W.Ay)({getState:a}).warn("subteam_created: No message event provided, or no subteam provided in the message event.")}function subteamDeleted(e,t,a){if(!e||!e.subteam||!e.subteam.id)return void(0,W.Ay)({getState:a}).warn("subteam_deleted: No message event provided, or no subteam provided in the message event.");let n=e.subteam.id;t((0,cu.Yp)(n))}function subteamSelfAdded(e,t,a){if(!e||!e.subteam_id)return void(0,W.Ay)({getState:a}).warn("subteam_self_added: No message event provided, or no subteam id provided in the message event.");let n=(0,Y.WR)(a()),r={groupId:e.subteam_id,memberId:n};t((0,cu.ES)(r)),t((0,cm.L3)({groupId:e.subteam_id,isMember:!0}))}function subteamSelfRemoved(e,t,a){if(!e||!e.subteam_id)return void(0,W.Ay)({getState:a}).warn("subteam_self_removed: No message event provided, or no subteam id provided in the message event.");let n=(0,Y.WR)(a());if(!n)return;let r={groupId:e.subteam_id,memberId:n};t((0,cu.S9)(r)),t((0,cm.L3)({groupId:e.subteam_id,isMember:!1}))}(0,i.d1)("subteam_updated",subteamUpdated),(0,i.d1)("subteam_members_changed",subteamMembersChanged),(0,i.d1)("subteam_created",subteamCreated),(0,i.d1)("subteam_deleted",subteamDeleted),(0,i.d1)("subteam_self_added",subteamSelfAdded),(0,i.d1)("subteam_self_removed",subteamSelfRemoved);var c_=a(0xe747dd27),cf=a(0x20670d932);(0,i.d1)("user_interaction_changed",(e,t)=>{let a=(0,c_.XK)(e.interaction);a&&t((0,cf.po)([a]))});var cb=a(0x12edaa96a),cg=a(0x6c77973e),cy=a(0x11513084e),cA=a(0x1fcd1dcfb),cx=a(0x1039e8d4e),cE=a(0x22d51fee8),cC=a(0xedbc2765),ck=a(0x1fa458710),cv=a(0x1d774a049),cS=a(0x137455c3d),cI=a(0x12f329028),cw=a(0x2125020cf),cT=a(0x8389ebba),cN=a(0x2406b591),cM=a(0x365a4cc3),cR=a(0x1eaf180f0),cP=a(0xb2eafc44),cL=a(0xc938b90e),cO=a(0x59bcdfd6),cD=a(0x24429189c);let cF=new E.Ay("search"),cU=(0,V.Ay)("Set all search summary labels",(e,t,{topics:a})=>a?a.reduce((t,a)=>{var n;let r,i=a.blocks?(n=a.blocks,r=e((0,cD.f)({blocks:n})).map(e=>{let t=e?.attributes,a=cF.t("Source");return t&&Object.keys(t)?.some(e=>"link"===e)?{...e,insert:`${a} ${e.insert}`}:{...e}}),(0,cO.f)({contents:r})):"",l=a.topic;return t[a.id]={collapsedLabel:l,expandedLabel:`${l} ${i}`},t},{}):{});cU.meta={name:"setSearchSummaryTopicLabels",key:"createThunkSetSearchSummaryTopicLabels",description:"Set all search summary labels"};var cB=a(0x16cf1da63),cH=a(0x11a296110),cW=a(0x167c26d3),cV=a(0x1fdec3e16),cG=a(0x247cf31a2),cq=a(0x5eedb646),cj=a(0xe1644a69),cz=a(0x12334bacc),cK=a(0x1ecc7f772),c$=a(0x8688a5a),cY=a(0x1f48e3aa4);let cQ=new E.Ay("assistant"),AiSummaryReadyToastItem=({aiSummary:e,toastIndex:t})=>{let a=(0,f.useRef)(),n=(0,cB.wA)(),r=(0,nE.d4)(rC.Jd),i=(0,f.useCallback)(e=>{a.current=e},[]),l=(0,nE.d4)(t=>(0,er.OL)(t,e.channelId)),o=(0,nE.d4)(e=>(0,cK.SB)(e,l)),s=(0,O.mz)(l),c="im"===s||"mpim"===s?o:f.createElement(cG.A,{channelId:e.channelId}),d=(0,cj.T)({type:"summary"}),m=(0,f.useCallback)(()=>{a.current?.({elementName:cq.H.SUMMARY_TOAST,action:p.UiAction.CLICK}),n((0,rE.OB)({id:e.id})),n((0,c$.x)({aiSummaryId:e.id}))},[e,n]),u=(0,f.useCallback)(()=>{n((0,rE.OB)({id:e.id})),a.current?.({elementName:cq.H.SUMMARY_TOAST_DISMISS,action:p.UiAction.CLICK})},[e.id,n]),h=(0,f.useMemo)(()=>(0,cz.vU)(e),[e]),_=cQ.t("Summary");e.type===cY.Tj.Thread?_=cQ.t("Your thread summary is ready."):e.type===cY.Tj.Channel&&(e.subtype===cY.KY.Unreads?_=cQ.t("Your unreads summary is ready."):e.subtype===cY.KY.Week?_=cQ.t("Your last 7 days summary is ready."):e.subtype===cY.KY.CustomRange&&e.startTs&&e.endTs&&(_=cQ.t("Your custom date summary is ready")));let b="";b="im"===s||"mpim"===s?cQ.rt("Open in a DM with {channelName}",{channelName:c}):cQ.rt("Open in {channelName}",{channelName:c});let g=(0,f.useMemo)(()=>f.createElement(cH.Nm,{className:"p-ai_summary_ready_toast__item",onClick:m},f.createElement("span",{className:"p-ai_summary_ready_toast__subtitle"},f.createElement(cV.A,{lines:1},b))),[m,b]);return r?f.createElement(cW.A,{svgIconProps:d,svgIconClassName:"p-ai_summary_ready_toast__icon",offsetY:85*t+80,shouldSkipToastDismissal:!0,onCloseComplete:u,toastClasses:"p-ai_summary_ready_toast__wrapper",closeButtonClasses:"p-ai_summary_ready_toast__close_button",customButton:g},f.createElement(nf.A,{trackClogRef:i,clogImpression:!0,eventId:p.EventId.NATIVE_AI,elementName:cq.H.SUMMARY_TOAST,...h},f.createElement("div",{className:"flex_one overflow_hidden"},f.createElement("div",{className:"bold"},_)))):null};AiSummaryReadyToastItem.displayName="AiSummaryReadyToastItem";let cZ=f.memo(AiSummaryReadyToastItem),AiSummaryReadyToast=()=>{let e=(0,nE.d4)(rC.Jd),t=(0,nE.Z2)(cM.t7);return e?f.createElement("div",{className:"p-ai_summary_ready_toast__container"},t.map((e,t)=>e?f.createElement(cZ,{key:e?.id,aiSummary:e,toastIndex:t}):null)):null};AiSummaryReadyToast.displayName="AiSummaryReadyToast";let cJ=f.memo(AiSummaryReadyToast),cX=(0,V.Ay)("Show a toast for new summaries",async(e,t,{aiSummaryId:a})=>{(0,cM.xD)(t(),{id:a})&&(e((0,rE.MF)({id:a})),1===(0,cM.t7)(t()).length&&e((0,th.M)({element:f.createElement(cJ,null)})))});cX.meta={name:"showSummaryReadyToast",key:"createThunkShowSummaryReadyToast",description:"Show a toast for new summaries"};let c0=(0,V.Ay)("Start TTL timer for given summary",async(e,t,{id:a})=>{let n=(0,cM.xD)(t(),{id:a})||(0,cM.Vu)(t(),{id:a});n&&setTimeout(()=>{n.type===cY.Tj.Search?e((0,rE.V9)(a)):e((0,rE.dW)(a))},864e5)});c0.meta={name:"startTtlTimerForSummary",key:"createThunkStartTtlTimerForSummary",description:"Start TTL timer for given summary"};var c1=a(0x46d45d6d),c2=a(0x1472af90a);function handleAiSummaryTrigger(e,t){e.summary_id&&e.summary_metadata?.type==="search"?t((0,rE.ME)({id:e.summary_id,hasSummary:!!e.has_summary,isKeywordSearch:!!e.summary_metadata?.is_keywords,query:e.summary_metadata?.query,clientReqId:e.client_req_id,hasSourceDifferentFromUserLang:e.summary_metadata.has_source_different_from_user_lang,searchAiFeature:e.summary_metadata.search_ai_feature})):e.summary_id&&e.summary_metadata?.type==="canvas"?t((0,rE.kI)({id:e.summary_id,hasSummary:!!e.has_summary,clientReqId:e.client_req_id,focusedSectionId:e.focused_section_id,prompt:e.summary_metadata?.query})):e.has_summary||t((0,rE.ME)({id:(0,cb.A)(),hasSummary:!1,isKeywordSearch:!0,query:"",clientReqId:e.client_req_id,hasSourceDifferentFromUserLang:e.summary_metadata?.has_source_different_from_user_lang,searchAiFeature:e.summary_metadata?.search_ai_feature})),t((0,rE.cg)({remainingAiSearchSamples:e.num_samples_remaining})),t((0,cL.V)({component:c2.G7.SlackAiNfxSearch}))}function handleAiSummaryStart(e,t){"channel"===e.summary_metadata.type&&e.summary_metadata.channel?.type==="channel_join"&&(t((0,rE.S2)({id:e.summary_id,channelId:e.summary_metadata.channel_id||"",type:cY.Tj.Channel,subtype:cY.KY.ChannelJoin,hasSourceDifferentFromUserLang:e.summary_metadata.has_source_different_from_user_lang})),t((0,nc.iR)({event:{type:nd.jo.PUSH_SUMMARY_TRIGGERED},channelId:e.summary_metadata.channel_id||""})))}function handleAiSummaryCompletion(e,t,a){if(e.summary?.metadata?.type==="crm_email_draft"&&e.summary.id)return void("failed"===e.summary.ai_context_result_status?(0,cg.Sn)(e.summary.id,e.summary.error||"Something went wrong. Please try again."):(0,cg.Ph)(e.summary.id,e.summary.result?.text||""));if(e.summary?.metadata?.type==="search_suggestions"&&(0,cx.Tc)(a()))return void t((0,cT.K)(e));if(e.summary?.metadata?.type==="ai_explain"){if(!e.summary.id||!(0,cI.b)(a(),e.summary.id))return;let n=(0,cy.JR)(e.summary.ai_context_result_status);t((0,cS.Yt)({summaryId:e.summary.id,content:{text:e.summary.result?.text||"",blocks:e.summary.result?.blocks},error:e.summary.error})),t((0,cS.jG)({summaryId:e.summary.id,status:n}));return}if(e.summary.id){let n;switch(e.summary.ai_context_result_status){case"complete":n=cY.nM.Complete;break;case"no_answer":n=cY.nM.NoAnswer;break;case"failed":n=e?.summary?.error==="channel_excluded"&&(0,rC.uO)(a())?cY.nM.ChannelExcluded:cY.nM.Error;break;default:n=cY.nM.Error}if(e.summary.metadata?.type==="search"){let r,i=t(cU({topics:e.summary.result.topics}));e.summary.metadata.channel_id&&e.summary.metadata.thread&&(r={channelId:e.summary.metadata.channel_id,threadTs:e.summary.metadata.thread.start_ts});let l={id:e.summary.id,status:n,content:{text:e.summary.result.text,blocks:e.summary.result.blocks},topics:e.summary.result.topics,error:e.summary.error||void 0,isKeywordSearch:!!e.summary.metadata.is_keywords,relevantEntities:(0,c_.XK)({...e.summary.metadata?.relevant_entities}),topicLabels:i,hasSourceDifferentFromUserLang:e.summary.metadata.has_source_different_from_user_lang,suggestedPrompts:e.summary.suggested_prompts,conversationalSearchThread:r};t((0,cM.Vu)(a(),{id:e.summary.id})?(0,rE.Sr)(l):(0,rE.ES)(l))}else if(e.summary.metadata?.type==="canvas"){let{id:r}=e.summary.metadata?.canvas??{};if("SLACKBOT_CANVAS_AUTO_OPEN"===e.summary.id){if(r&&(0,cE.ei)(a())){if((0,cE.fN)(a())){let a=(0,cA.Dv)();t((0,rE.pq)({fileId:r,sessionId:a}));let{clientReqId:i}=t((0,cR.hd)({sessionId:a}));t((0,rE.kI)({id:e.summary.id,hasSummary:!0,clientReqId:i}));let l={id:e.summary.id,status:n,content:{blocks:e.summary.result.blocks,text:e.summary.result.text},clientReqId:i,hasSummary:!0};t((0,rE.oE)(l))}t((0,ck.A)({fileId:r,source:cv.f.SLACKBOT_CANVAS_AUTO_OPEN,considerOpeningExistingViewInSplitView:!0}))}return}let i=(0,cM.Qt)(a(),{id:e.summary.id});if(r&&i&&i.clientReqId&&!(0,cM.y1)(a(),{fileId:r,clientReqId:i.clientReqId}))return;let{query:l}=e.summary.metadata,o={id:e.summary.id,status:n,content:{blocks:e.summary.result.blocks,text:e.summary.result.text},error:e.summary.error||void 0,metadata:e.summary.metadata?{messageCount:e.summary.metadata.message_count,fileCount:e.summary.metadata.file_count}:void 0,fileSources:e.summary.file_sources?.map(c_.XK),messageSources:e.summary.message_sources?.map(c_.XK),prompt:l};t(i?(0,rE.oE)(o):(0,rE.y1)(o)),n===cY.nM.Complete&&l&&r&&t((0,rE.n)({fileId:r,prompt:l}))}else if(e.summary.metadata?.type==="today_topic"){if(e.summary.result?.topics?.[0]){let a=e.summary.result.topics[0].id;if(a){let n=e.event_ts?Math.floor(parseFloat(e.event_ts)):void 0;t((0,c1.et)({itemId:a,summaryBlocks:e.summary.result.topics[0].blocks,dateUpdated:n}))}}}else if(e.summary.metadata?.type==="composer"){let a={id:e.summary.id,status:n,content:{blocks:e.summary.result.blocks,text:e.summary.result.text},error:e.summary.error||void 0};t((0,rE.k5)({...a,hasSeen:!1}))}else{let r=(0,cM.xD)(a(),{id:e.summary.id});if(r?.type===cY.Tj.Thread&&cC.LI.stop({label:cC.gC.SlackAiThreadSummary,id:r.threadTs}),r?.type===cY.Tj.Channel&&cC.LI.stop({label:cC.gC.SlackAiChannelSummary,id:r.channelId}),r?.status==="error")return;if(r){let i={id:e.summary.id,status:n,content:{text:e.summary.result.text},description:e.summary.result.description_blocks,topics:(0,cN.PO)(e.summary.result?.topics),error:e.summary.error||void 0,metadata:{messageCount:e.summary.metadata?.message_count,threadCount:e.summary.metadata?.channel?.thread_count,startTs:e.summary.metadata?.channel?.start_ts||e.summary.metadata?.thread?.start_ts,endTs:e.summary.metadata?.channel?.end_ts||e.summary.metadata?.thread?.end_ts,mostActiveUsers:e.summary.metadata?.most_active_users,totalInvolvedUsers:e.summary.metadata?.total_involved_users,fileCount:e.summary.metadata?.file_count,totalMessageCount:e.summary.metadata?.total_message_count,channels:e.summary.metadata?.channels?.map(e=>(0,c_.XK)(e))},hasSourceDifferentFromUserLang:e.summary.metadata?.has_source_different_from_user_lang},l=(0,a5.e6)(a()),o=(0,a3.l)(a(),{filterFunction:({view:t})=>t.viewType===eY.D.AiSummaryDetails&&t.params?.aiSummaryId===e.summary.id}).filter(e=>e.windowId!==ak.N2||e.tab===l),s=r.hasSeen||o.length>0;t((0,rE.k5)({...i,hasSeen:s}));let c=r.type===cY.Tj.Channel&&r.subtype===cY.KY.ChannelJoin,d=r.type===cY.Tj.Thread&&r.entryPoint===cY.lZ.AutoThreadSummary,m=r.type===cY.Tj.Recap,u=!!r.concurrentSummaryId;if(m){t((0,cP.$)());let a=e?.summary?.metadata?.channel_id;a&&t((0,rE._4)(a))}!(0,rC.Jd)(a())||s||c||d||m||u||t(cX({aiSummaryId:e.summary.id}))}}t(c0({id:e.summary.id}))}}function handleAiSummaryTokensAdded(e,t,a){if(e.summary?.metadata?.type==="crm_email_draft"&&e.summary.id)return void(0,cg.sz)(e.summary.id,e.summary.result?.text||"");if(e.summary?.metadata?.type==="ai_explain"){if(!e.summary.id||!(0,cI.b)(a(),e.summary.id))return;let n=(0,cy.JR)(e.summary.ai_context_result_status);t((0,cS.Yt)({summaryId:e.summary.id,content:{text:e.summary.result?.text||"",blocks:e.summary.result?.blocks},error:e.summary.error})),t((0,cS.jG)({summaryId:e.summary.id,status:n}));return}let n=!(0,tC.ty)(a(),"a11y_animations"),r=(0,tC.ty)(a(),"slack_ai_channel_thread_summary_streaming_disabled");if(!n&&!r&&e.summary?.id){let n,r=(0,cM.xD)(a(),{id:e.summary.id}),i=r?.channelId,l=r?.threadTs,o=r?.isStreaming,s=(0,cM.Vu)(a(),{id:e.summary.id}),c=(0,cM.Qt)(a(),{id:e.summary.id}),d=r||s||c;if(!d||d?.status==="error")return;switch(e.summary.ai_context_result_status){case"complete":n=cY.nM.Complete;break;case"pending":n=cY.nM.InProgress;break;case"no_answer":n=cY.nM.NoAnswer;break;default:n=cY.nM.Error}if([cY.nM.InProgress,cY.nM.Error].includes(n)){if(d.type===cY.Tj.Channel||d.type===cY.Tj.Recap||d.type===cY.Tj.WorkObject){let a;i&&d.type===cY.Tj.Channel&&!o&&(a=cC.LI.get({label:cC.gC.SlackAiChannelSummary,id:i})?.createChildSpan({name:"slack_ai:channel_summary_first_tokens_added"})),t((0,rE.RF)({id:e.summary.id,content:{text:e.summary.result.text},topics:(0,cN.PO)(e.summary.result.topics),error:e.summary.error||void 0,status:n,metadata:{messageCount:e.summary.metadata?.message_count,totalMessageCount:e.summary_metadata?.total_message_count||e.summary.metadata?.total_message_count,channels:e.summary.metadata?.channels?.map(e=>(0,c_.XK)(e))}})),a?.close()}else if(d.type===cY.Tj.Thread){let a;l&&d.type===cY.Tj.Thread&&!o&&(a=cC.LI.get({label:cC.gC.SlackAiThreadSummary,id:l})?.createChildSpan({name:"slack_ai:thread_summary_first_tokens_added"})),t((0,rE.RF)({id:e.summary.id,content:{text:e.summary.result.text},topics:(0,cN.PO)(e.summary.result.topics),error:e.summary.error||void 0,status:n})),a?.close()}else if(d.type===cY.Tj.Search){let a=t(cU({topics:e.summary.result.topics})),r={id:e.summary.id,status:n,content:{text:e.summary.result.text},topics:e.summary.result.topics,error:e.summary.error||void 0,isKeywordSearch:!1,relevantEntities:(0,c_.XK)({...e.summary.metadata?.relevant_entities}),topicLabels:a,hasSourceDifferentFromUserLang:!1,suggestedPrompts:[]};t((0,rE.Sr)(r))}else if(d.type===cY.Tj.CanvasContentCreation){let a={id:e.summary.id,status:n,content:{text:e.summary.result.text,blocks:e.summary.result.blocks},error:e.summary.error||void 0,metadata:e.summary.metadata?{messageCount:e.summary.metadata.message_count,fileCount:e.summary.metadata.file_count,infoMessage:e.summary.metadata.info_message}:void 0};t((0,rE.oE)(a))}else if(e.summary.metadata?.type==="composer"){let a={id:e.summary.id,status:n,content:{blocks:e.summary.result.blocks,text:e.summary.result.text},error:e.summary.error||void 0};t((0,rE.RF)({...a}))}}}}function handleAiWorkObjectSummaryCompleted(e,t,a){if(e.summary.id){let n;switch(e.summary.ai_context_result_status){case"complete":n=cY.nM.Complete;break;case"no_answer":n=cY.nM.NoAnswer;break;default:n=cY.nM.Error}let r=(0,cM.xD)(a(),{id:e.summary.id});if(r?.status!=="error"&&r?.type===cY.Tj.WorkObject&&r){let a={id:e.summary.id,status:n,content:{text:e.summary.result.text},description:e.summary.result.description_blocks,topics:(0,cN.PO)(e.summary.result?.topics),error:e.summary.error||void 0,metadata:{messageCount:e.summary.metadata?.message_count,threadCount:e.summary.metadata?.channel?.thread_count,startTs:e.summary.metadata?.channel?.start_ts||e.summary.metadata?.thread?.start_ts,endTs:e.summary.metadata?.channel?.end_ts||e.summary.metadata?.thread?.end_ts,mostActiveUsers:e.summary.metadata?.most_active_users,totalInvolvedUsers:e.summary.metadata?.total_involved_users,fileCount:e.summary.metadata?.file_count},hasSourceDifferentFromUserLang:e.summary.metadata?.has_source_different_from_user_lang};t((0,rE.k5)({...a,hasSeen:r.hasSeen}))}}}function handleAiToolStatus(e,t,a){if("slack_crm"===e.source&&e.task_id)return void(0,cg.Ki)(e.task_id,e.text||"");if("ai_explain"===e.source){let n=e.task_id;if(!n||!(0,cI.b)(a(),n))return;t((0,cS.kE)({summaryId:n,toolProgress:e.blocks}))}}(0,i.d1)("entity_refs_summary_completed",handleAiWorkObjectSummaryCompleted),(0,i.d1)("ai_summary_trigger",handleAiSummaryTrigger),(0,i.d1)("ai_summary_started",handleAiSummaryStart),(0,i.d1)("ai_summary_completed",handleAiSummaryCompletion),(0,i.d1)("ai_summary_tokens_added",handleAiSummaryTokensAdded),(0,i.d1)("ai_tool_status",handleAiToolStatus),(0,i.d1)("ai_profile_summary_update",(e,t)=>{t((0,cw.oC)({status:e.status,summary:e.summary,userId:e.user_id}))});var c4=a(0x1f4d21497),c5=a(0x1234f216f);function isAiAssistantListsEnabled(e){return"on"===(0,t7._Z)(e,"ai_assistant_lists")}let c3=(0,V.Ay)("Changes the current view refinements from the assistant output",async(e,t,{listId:a,filters:n,sorts:r})=>{let i=t(),l=(0,ra.hL)(i,ak.N2.toString());l&&(n&&e((0,al.ab)({listId:a,viewId:l,filters:n})),r&&e((0,al.C2)({listId:a,viewId:l,sorts:r})))});c3.meta={name:"changeViewRefinementsFromAssistant",key:"createThunkChangeViewRefinementsFromAssistant",description:"Changes the current view refinements from the assistant output"};var c6=a(0xd62b5ad9),c8=a(0x1c7074227),c7=a(0xc561af5),c9=a(0xe28011fa),de=a(0x4513653f);function handleAiAssistantProgress(e,t,a){t((0,c8.Yw)({taskId:e.task_id,threadTs:e.thread_ts,status:e.status,payload:e.payload,source:e.source}));let n=a();if(isAiAssistantListsEnabled(n)&&"list_refinements"===e.source&&"output_available"===e.status&&e.payload)try{let a=JSON.parse(e.payload);if(a&&a.result){let e=JSON.parse(a.result);if(e&&e.refinements&&e.refinements.listId){let a=e.refinements.listId,n=e.refinements.filters,r=e.refinements.sorts;t(c3({listId:a,filters:n,sorts:r}))}}}catch{return null}let r=(0,rC.nS)(n);if("output_available"===e.status&&e.payload&&e.event_ts&&r)try{let a=JSON.parse(e.payload),n=a?.arguments?.section_id,r=JSON.parse(a.result),i=r?.canvas_id,l=r?.content,o=Object.keys(r?.section_id_mapping);r?.ui_action==="preview_canvas_update"&&t((0,rE.e5)({canvasId:i,mappedSectionIds:o??[],targetSectionId:n,content:l,updateStep:cY.a5.LOADED}))}catch(e){return}let i=(0,li.l)(n),l=(0,s.ZT)(n);if(!i)return null;let o="USLACKBOT",c=(0,er.Pu)(n,o);if(!c?.id||!e?.status)return null;let d=`${c?.id}-${e.thread_ts}`,m=(0,c7.T_)(n,d),u=m?.slices?m?.slices[0]?.timestamps.filter(e=>(0,c5.A)(e)):[],p=u.length>0?u[0]:`${Math.floor(Date.now()/1e3)}.aaaaaa`,h=`${e?.status.charAt(0).toUpperCase()}${e?.status.slice(1)}...`;return t((0,aw.VG)({channelId:d,timestamps:[p]})),t((0,iG.tT)([{thread_ts:e.thread_ts,reply_count:0,source_team_id:l,suppress_notification:!0,type:"message",subtype:"slack_assistant_progress",ts:p,channel:c?.id,no_display:!1,user:o,text:h}])),null}let dt=[eY.D.AppSpace,eY.D.Channel];function handleAiAssistantStatus(e,t,a){let n=a(),r="on"===(0,t7._Z)(n,"ai_apps_animated_streaming_roots_fe"),i=(0,rj.wP)(n),o=(0,rj.Uv)(n),s=(0,rj.xq)(n);if(!i||!e)return null;let{bot_user_id:c,thread_ts:d,status:m,channel_id:u,status_type:p}=e;if(!c)return null;if(o&&d){let e,a,r=(e=(0,a5.Oy)(n),a=(0,a5.F8)(n,{tab:(0,a5.e6)(n),container:ak.mq.Primary}),!!(e&&dt.includes(e.viewType)&&e.id===u||a&&dt.includes(a.viewType)&&a.id===u)),i=(0,as.Ld)(n,u,d);if(r&&i){let{reply_count:e,user:a}=i,r=(0,Y.WR)(n);0===e&&a===r&&t((0,eX.o)({...(0,e0.UX)({channelId:u,threadTs:d}),options:{rtmSource:c4.u.AiAssistant}}))}}let h=r&&!d?u:`${u}-${d}`,_={threadKey:h,isShown:!0,loadingMessages:e.loading_messages},f=(0,de.fF)(n);if(f){let e=Object.keys(f).reduce((e,t)=>(f[t].memberId===c&&f[t].channelId===u&&f[t].threadTs===d&&e.push(t),e),[]);e.length&&t((0,c9.$7)(e))}return m?(t((0,l.MY)({threadKey:h,status:m,statusType:p,botUserId:c,username:s?e.username:void 0})),t((0,l.Vz)(s?{..._,iconEmoji:e.icon_emoji,iconUrl:e.icon_url,username:e.username}:_)),t((0,ly.ph)(h))):t((0,ly.XI)(h)),null}function handleAiAssistantThreadsSuggestedPrompts(e,t,a){let n=a(),r=(0,rj.wP)(n),i=(0,rj.yw)(n);if(!r||!e)return null;let o=(0,iN.Iu)(e.channel_id,e.thread_ts);return o?t((0,l.TH)({threadKey:o,suggestedPrompts:e.prompts,title:e.title})):e.channel_id&&(0,rW.Hm)(n,e.channel_id)&&t((0,l.cl)({agentChannelId:e.channel_id,suggestedPrompts:e.prompts,title:e.title})),i&&!e?.thread_ts&&e.channel_id&&t((0,c6.s)({channelId:e.channel_id,prompts:e.prompts,title:e.title,botUserId:e.bot_user_id})),null}(0,i.d1)("ai_assistant_progress",handleAiAssistantProgress),(0,i.d1)("ai_assistant_status",handleAiAssistantStatus),(0,i.d1)("ai_assistant_threads_suggested_prompts",handleAiAssistantThreadsSuggestedPrompts);var da=a(0xa74eef17);async function handleAiDigestReady(e,t,a){(0,rC.hS)(a())&&((0,rC.YX)(a())?(await t((0,da.F)({reason:"ai_digest_ready_rtm"})),await t((0,cP.$)()),t((0,rE.nW)(!1))):t((0,da.F)({reason:"ai_digest_ready_rtm"})),t((0,rE.Nb)(!1)))}function handleAiDigestChannelsAdded(e,t,a){(0,rC.hS)(a())&&t((0,rE.GI)({channelIds:e.channel_ids}))}function handleAiDigestChannelsRemoved(e,t,a){(0,rC.hS)(a())&&t((0,rE.Pb)({channelIds:e.channel_ids}))}function handleAiDigestMarkedRead(e,t,a){(0,rC.hS)(a())&&t((0,rE.Dr)({dailyDigestId:e.digest_id,isRead:!0}))}function handleAiDigestMarkedUnread(e,t,a){(0,rC.hS)(a())&&t((0,rE.Dr)({dailyDigestId:e.digest_id,isRead:!1}))}function handleAiDigestChannelsMarkedRead(e,t,a){if((0,rC.hS)(a())){let a={},n={};e.channel_digest_ids.forEach(e=>{a[e]=!0,n[e]=!0}),t((0,rE.Je)({dailyDigestId:e.digest_id,channelDigestReadStates:a,channelDigestInteractedStates:n}))}}function handleAiDigestChannelsMarkedUnread(e,t,a){if((0,rC.hS)(a())){let a={};e.channel_digest_ids.forEach(e=>{a[e]=!1}),t((0,rE.Je)({dailyDigestId:e.digest_id,channelDigestReadStates:a}))}}function handleAiDigestChannelSummaryReady(e,t,a){if(!(0,rC.hS)(a())||!(0,rC.YX)(a()))return;let n=e.digest_id,r=e.channel_digest;if(!n||!r)return;let i=(0,c_.XK)(r),l=(0,cM.vh)(a()).filter(t=>t.channel_id!==e.channel_digest.channel_id);t((0,rE.$t)({dailyDigestId:n,channelDigest:i})),t((0,rE.$v)({channels:l})),t((0,rE._4)(i.channelId))}(0,i.d1)("ai_digest_ready",handleAiDigestReady),(0,i.d1)("ai_digest_channels_added",handleAiDigestChannelsAdded),(0,i.d1)("ai_digest_channels_removed",handleAiDigestChannelsRemoved),(0,i.d1)("ai_digest_marked_read",handleAiDigestMarkedRead),(0,i.d1)("ai_digest_marked_unread",handleAiDigestMarkedUnread),(0,i.d1)("ai_digest_channels_marked_read",handleAiDigestChannelsMarkedRead),(0,i.d1)("ai_digest_channels_marked_unread",handleAiDigestChannelsMarkedUnread),(0,i.d1)("ai_digest_channel_summary_ready",handleAiDigestChannelSummaryReady);let dn=(0,V.Ay)("Fetches megaphone spaces for Slack AI trial offer notifications",e=>{e((0,nc.iR)({event:{type:nd.jo.REQUEST_SPACES,spaces:[nd.xu.SIDEBAR_MENU_HEADER,nd.xu.WORKSPACE_MENU_SECONDARY_PLAN_INFO,nd.xu.LAUNCH_MODAL,nd.xu.SEARCH_MODAL_HEADER,nd.xu.SEARCH_RESULTS_HEADER,nd.xu.MESSAGE_INPUT]}}))});dn.meta={name:"fetchSlackAiTrialOfferMegaphoneNotifications",key:"createThunkFetchSlackAiTrialOfferMegaphoneNotifications",description:"Fetches megaphone spaces for Slack AI trial offer notifications"};var dr=a(0x81efe003);function handleAiProvisionChanged(e,t){t((0,dr.Z)({isSlackAiEnabled:e.enabled})),t(dn())}(0,i.d1)("ai_provision_changed",handleAiProvisionChanged);var di=a(0x18eb54473),dl=a(0x19a57be55),ds=a(0x21c8f6272),dc=a(0xebdd009e),dd=a(0x173c04d58),dm=a(0x222719d7),du=a(0x16f981890),dp=a(0x1c40e1088);let dh=(0,V.Ay)("Send call name to call window",(e,t,{id:a,name:n})=>{let r=(0,dm.H6)(t(),a);if(r){let e=(0,dm.Ms)(r);e&&!e.isClosed()&&(0,dp.R)(e,"updateCallName",{name:n})}});dh.meta={name:"maybeUpdateCallName",key:"createThunkMaybeUpdateCallName",description:"Send call name to call window"};var d_=a(0xcd2cb20f);let df=(0,W.Wo)({label:d_.o7}),db=(0,V.Ay)("Update knock to enter user requests",async(e,t,{knockingUsers:a,channelId:n})=>{let r=t(),i=(0,Y.WR)(r),l=Object.fromEntries(Object.entries(a).filter(([e])=>e!==i)),o=(0,tI.Bz)(t(),{channelId:n});if(!((0,tq.A)(o)&&(0,tq.A)(l))){let e=Object.keys(l).filter(e=>!(e in o)),t=Object.keys(o).filter(e=>!(e in l)),a=Object.keys(l).filter(e=>e in o&&o[e]!==l[e]);e.forEach(e=>{df.info(`Huddles knock to enter new request added UserID: ${e} state: ${l[e]}`)}),t.forEach(e=>{df.info(`Huddles knock to enter request removed UserID: ${e}`)}),a.forEach(e=>{df.info(`Huddles knock to enter request state changed UserID: ${e} previous: ${o[e]} new: ${l[e]}`)})}e((0,lO.V_)({knockingUsers:l,channelId:n}))});db.meta={name:"updateKnockingUsers",key:"createThunkUpdateKnockingUsers",description:"Update knock to enter user requests"};var dg=a(0xc304cdec),dy=a(0x10b2ff883),dA=a(0xed916c53),dx=a(0x1bc3b97c1),dE=a(0x36b4a164),dC=a(0xf9cb31c6),dk=a(0xf8dd7f80);let dv=(0,dk.getGenericLogger)({label:d_.o7}),dS=(0,V.Ay)("Handle declined invite status for a user",async(e,t,{huddleId:a,userId:n})=>{let r=t();(0,tI.Z3)(r,{huddleId:a,userId:n})&&(dv.info(`Clearing declined invite status for user.   huddleId: ${a}, userId: ${n}`),e((0,lO.Hw)({huddleId:a,userId:n})))});dS.meta={name:"handleDeclinedInviteStatusForUser",key:"createThunkHandleDeclinedInviteStatusForUser",description:"Handle declined invite status for a user"};var dI=a(0x21d85d6e5),dw=a(7854195),dT=a(0xfc8cc63f);let dN=(0,dk.getGenericLogger)({label:d_.o7}),dM=new E.Ay("huddles"),dR={},dP=(0,V.Ay)("Update knock to enter user requests",async(e,t,{lastInviteStatusByUser:a,huddleId:n})=>{let r=t(),i=(0,tI.Hp)(r,{huddleId:n})||{};a&&Object.keys(a).length>0&&Object.keys(a).forEach(l=>{let o=a[l],s=i[l];if(s!==dw.qt.DeclinedAcknowledged&&o!==s){if((!s||o===dw.qt.Declined&&s!==dw.qt.Declined)&&o===dw.qt.Declined){let a=(0,M.nv)(r,l),i=(0,dI.sE)(r,a);if(!(0,tt.z1)(a)&&i){let a=dM.t("{userName} has declined the huddle invite.",{userName:i});dN.info(`Notifying user that invited user has declined the huddle invite. userId: ${l} huddleId: ${n}`),e((0,dT.f)({content:a,duration:1e4,huddleToastType:dT.y.DeclinedInvite})),dR[n]?.[l]&&clearTimeout(dR[n][l]),dR[n]||(dR[n]={}),dR[n][l]=setTimeout(()=>{let a=t();((0,tI.Hp)(a,{huddleId:n})||{})[l]===dw.qt.Declined&&(e((0,lO.Eq)({huddleId:n,userId:l,status:dw.qt.DeclinedAcknowledged})),dN.info(`Declined invite for user marked as acknowledged. huddleId: ${n}, userId: ${l}`),dR[n]?.[l]&&delete dR[n][l])},6e4)}else dN.warn(`Not Notifying user of declined huddle invite member or member name not resolved userId: ${l}`)}e((0,lO.Eq)({huddleId:n,userId:l,status:o}))}})});dP.meta={name:"handleLastInviteStatusForHuddleUsers",key:"createThunkHandleLastInviteStatusForHuddleUsers",description:"Update knock to enter user requests"};var dL=a(0x1862e217b),dO=a(0x32ccfdb1);let dD=new E.Ay("huddles"),dF=(0,V.Ay)("Handle user`s knock to enter request being accepted",async(e,t,{channelId:a,mediaServerCredentials:n})=>{let r=t(),i=(0,dC.a$)(r);!(0,tI.mU)(r)&&(e((0,lO.Gb)({accepted:!0,channelId:a})),e((0,lO.WA)({channelId:a,mediaServerCredentials:n})),e((0,dO.s5)()),e((0,dL.e)()),i&&e((0,eg.P9)({title:dD.t("Join the Slack huddle"),content:dD.t("Your request to join the huddle is approved. Welcome! Join whenever you\u2019re ready.")})))});dF.meta={name:"handleHuddleKnockToEnterRequestAccepted",key:"createThunkHandleHuddleKnockToEnterRequestAccepted",description:"Handle user`s knock to enter request being accepted"};let dU=new E.Ay("huddles"),dB=(0,V.Ay)("Handle user`s knock to enter request expiring",async(e,t)=>{let a=t(),n=(0,dC.a$)(a);!(0,tI.K8)(a)&&(e((0,lO.kd)({expired:!0})),e((0,dO.gV)()),n&&e((0,eg.P9)({title:dU.t("Slack huddle"),content:dU.t("Your huddle request has expired. If you would like to join the huddle please send a new request")})))});dB.meta={name:"handleHuddleKnockToEnterRequestExpired",key:"createThunkHandleHuddleKnockToEnterRequestExpired",description:"Handle user`s knock to enter request expiring"};let dH=(0,V.Ay)("Handle pending knocking users for when a huddle has not started",async(e,t,{channelId:a,waitingKnockingUserIds:n})=>{let r=t();(0,dC.a$)(r)&&e((0,lO.PZ)({waitingKnockingUserIds:n,channelId:a}))});dH.meta={name:"handlePendingKnockUsersForNotStartedHuddle",key:"createThunkHandlePendingKnockUsersForNotStartedHuddle",description:"Handle pending knocking users for when a huddle has not started"};let dW=new E.Ay("huddles"),dV=(0,V.Ay)("Handle displaying a missed call inivite OS notification at a delay",(e,t,{callId:a,channelId:n,inviterUserId:r})=>{let i=t();if(!(0,dC.Z0)(i))return;let l=(0,tw.aQ)((0,tv.Ry)());setTimeout(()=>{i=t();let o=(0,tw.aQ)((0,tv.Ry)());if(o&&l!==o)return;let s=(0,dm.H6)(i,a);if(!s)return;let c=(0,Y.WR)(i),d=(s.pendingUsers||{})[c];s.hasEnded||"pending"!==d||e((0,eg.hl)({title:dW.t("Huddle missed"),content:dW.t("{displayName} invited you to a huddle",{displayName:(0,dc.A5)(i,r)}),userId:c,channelId:n}))},3e4)});dV.meta={name:"handleHuddleMissedCallNotification",key:"createThunkHandleHuddleMissedCallNotification",description:"Handle displaying a missed call inivite OS notification at a delay"};var dG=a(0x51fc3908),dq=a(0x192f113bc),dj=a(0x1b02505ff);let dz=(0,V.Ay)("Maybe prejoin huddle",async(e,t,{channelId:a,muted:n,callId:r})=>{let i=(0,tv.en)();if((0,tw.EG)(i.getState())!==dj.RJ.NOT_STARTED||(0,dm.J2)(t())||(0,tw.hc)(i.getState()))return;if((0,dG.WT)()||(0,dG.yh)())return U.S.resolve();let l=t(),o=(0,s.ZT)(l);return(0,dq.A)().prejoin(o,a,n,r)});dz.meta={name:"maybePrejoinHuddle",key:"createThunkMaybePrejoinHuddle",description:"Maybe prejoin huddle"};var dK=a(0x13d894892);function shouldIgnoreMsg({state:e,channel:t}){return!!(t&&(0,dd.Y)(e,t))&&((0,W.Ay)({state:e}).info(d_.o7,`Ignoring suppressed org channel for ${t.id}`),!0)}function huddleInviteRtmHandler(e,t,a){let n=a();if(!(0,eO.A)())return;let r=(0,W.Ay)({state:n}),i=(0,er.OL)(n,e.channel_id);if(shouldIgnoreMsg({state:n,channel:i}))return;let l=(0,tv.Ry)(),{huddleState:o,channelId:c}=(0,tw.Qn)(l)||{},{channelId:d,callId:m}=(0,tw.Ak)(l)||{};if(d===e.channel_id&&m===e.call_id&&o&&!(0,dc.Ft)(o))return void r.info(d_.o7,"Ignoring invite to active huddle");let{channelId:u,callId:p}=(0,tw.aQ)(l)||{};if(u===e.channel_id&&p===e.call_id)return void r.info(d_.o7,"Ignoring invite to active invite");(0,tv.dispatchForClientStore)((0,dE.VU)(!0));let h=e.team_id,_=!!(0,$.jm)()[h];r.info(d_.o7,_?"Using invite team ID for invite":"Using local team ID for invite");let f=(i?(0,s.ZT)(n):(0,a6.vB)(n))||"";(0,tv.dispatchForClientStore)((0,dE.hB)({teamId:f,channelId:e.channel_id,senderUserId:e.sender_user_id,callId:e.call_id}));let b=(0,tI.jr)(n),g=(0,tI.bs)(n);if(e.free_willy){if(b&&e.channel_id===g)return void t(dF({channelId:e.channel_id,mediaServerCredentials:e.free_willy}));(0,tv.dispatchForClientStore)((0,dE.FX)({channelId:e.channel_id,joinCredentials:e.free_willy,expiry:Date.now()+d_.nq,fromInvite:!0})),(o===dj.RJ.SURVEY||o===dj.RJ.SURVEY_GOOD)&&(0,tv.dispatchForClientStore)((0,dE.Rh)({channelId:c,optimisticHuddleState:null,huddleState:dj.RJ.NOT_STARTED})),t(dz({channelId:e.channel_id}))?.catch(e=>{(0,W.Ay)({getState:a}).error("Could not prejoin huddle",e)})}let y=(0,ex.HW)(n,e.channel_id);y===eC.Z.NONE?((0,W.Ay)({getState:a}).info(d_.o7,`Showing huddle notification for ${e.channel_id}`),t((0,eg.BB)({channelId:e.channel_id,userId:e.sender_user_id,notifIsFromInvite:!0})),t(dV({channelId:e.channel_id,inviterUserId:e.sender_user_id,callId:e.call_id}))):(0,W.Ay)({getState:a}).warn(d_.o7,`Notification (huddle) suppressed for ${e.channel_id} because: ${y}, ${(0,eC.Q)(y)}`)}function huddleRecommendRtmHandler(e,t,a){let n=a();if(!(0,eO.A)())return;let r=(0,W.Ay)({state:n}),i=(0,tv.Ry)(),{channelId:l}=(0,tw.Ak)(i)||{};if(l===e.channel_id)return void r.info(d_.o7,"Ignoring recommend notification for active huddle");let o=(0,ex.HW)(n,e.channel_id);o===eC.Z.NONE?((0,W.Ay)({getState:a}).info(d_.o7,`Showing huddle recommendation notification for ${e.channel_id}`),t((0,eg.NE)({channelId:e.channel_id,talkingUsers:e.talking_users}))):(0,W.Ay)({getState:a}).warn(d_.o7,`Notification (huddle recommendation) for ${e.channel_id} suppressed because: ${o}, ${(0,eC.Q)(o)}`)}function huddleInviteCancelRtmHandler(e,t,a){let n=a();(0,dc.pt)(n)&&(0,eO.A)()&&((0,W.Ay)({state:n}).info(d_.o7,"Cancelling huddle invite"),(0,tv.dispatchForClientStore)((0,dE.u8)(e.channel_id)))}async function updateHuddleRtmHandler(e,t,a){if(!(0,eO.A)())return;let n=(0,tv.en)(),r=n.getState(),i=a(),l=(0,W.Ay)({state:i}),o=(0,s.ZT)(i),c=(0,Y.WR)(i),d=e.user===c,m=e.huddle?.channel_id,u=e.room?.id,p=e.room?.has_ended,{teamId:h,channelId:_,callId:f,huddleState:b}=(0,tw.Qn)(r)||{};if(m===_&&l.info(d_.o7,`${e.type}, channelId: ${m}, participants: ${e.room?.participants?.length}`),d&&m&&u&&(f?u===f:m===_)&&b&&(0,dc.Ft)(b)&&e?.type==="sh_room_join"){let e=(0,dm.H6)(i,u);if(await new U.S(e=>setTimeout(e,1e4)),(0,dm.H6)(a(),u)!==e)return}let g=(0,du.Q)(e.room);t((0,dm.oU)({...g,isHuddle:!0}));let y=(0,dm.H6)(a(),g.id);if(!m)return;if(y){let r=(0,tI.dj)(a(),{huddleId:y.id}),i=(0,tI.LR)(a(),{huddleId:y.id}),l=(0,tI.Kj)(a(),{huddleId:y.id});if(t((0,dx.mr)({call:y,channelId:m})),t((0,lO._n)({call:y,channelId:m})),(0,tw.E9)(n.getState())===y.id&&!(0,tw.$V)(n.getState())&&(0,iL.E$)(a(),y.id)&&["sh_room_join","sh_room_update"].includes(e?.type)){let a=d&&e?.type==="sh_room_join",n=y.recording?.summary,o=y.recording?.isPaused;if(n&&(!r&&(!d||d&&!l)||!o&&(i||a))){if(t((0,dO.Wf)()),a||!r){let e=`huddle-recording-on-sound-participant${a?"-joining":""}`;t((0,ds.L)({huddleId:y.id,reason:e}))}}else(n&&o&&!i||!n&&r&&!i)&&t((0,dO.OF)())}}let A=y?.activeParticipants,x=!1;if("sh_room_leave"===e.type&&A&&0===A.length&&((0,tv.dispatchForClientStore)((0,dE.WB)({channelId:m})),m&&(x=!0)),("sh_room_update"===e.type||"sh_room_join"===e.type)&&e.room?.knocks!==void 0&&t(db({channelId:e.huddle.channel_id,knockingUsers:e.room.knocks})),"sh_room_update"===e.type&&e.room?.last_invite_status_by_user!==void 0){let a=e?.room?.id;if((0,tw.E9)(n.getState())!==a)return;a&&t(dP({huddleId:a,lastInviteStatusByUser:e.room.last_invite_status_by_user}))}if("sh_room_join"===e.type&&e.user){let a=e?.room?.id;if((0,tw.E9)(n.getState())!==a)return;a&&t(dS({huddleId:a,userId:e.user}))}let E=(0,tw.aQ)(r),C=e.room?.pending_invitees;if("sh_room_update"===e.type&&E?.channelId===m&&E?.callId===u&&void 0!==C&&(C[c]||"joining_soon"!==(0,dm.Ck)(a(),u,c)&&(x=!0)),x&&(0,tv.dispatchForClientStore)((0,dE.u8)(m)),"sh_room_join"===e.type){let e=new di.k("VOICE-FOCUS-LOADER"),t=new dl.Q(e);await t.init({configOnly:!0})}e.room?.pending_invitees&&t((0,dm.oU)({id:u,pendingUsers:C})),h!==o||_!==m||!d&&p&&(b===dj.RJ.PRE_JOINED&&_===m&&f===u||e.room?.participants.includes(c))&&(l.info(d_.o7,`Attempt to end huddle, channelId: ${m}, callId: ${u}, huddleState: ${b}`),t((0,az.kb)({channelId:m,callId:u})))}function huddleScheduledRtmHandler(e,t,a){let n=a();if(!(0,dc.pt)(n)||!(0,dC.MJ)(n)||!(0,eO.A)())return;let r=(0,er.OL)(n,e.schedule.channel_id);shouldIgnoreMsg({state:n,channel:r})||t((0,dA.ls)({scheduledHuddle:e.schedule}))}function huddleStartRtmHandler(e,t,a){let n=a();if(!(0,dc.pt)(n)||!(0,eO.A)())return;let r=(0,er.OL)(n,e.channel_id),i=e.channel_id;shouldIgnoreMsg({state:n,channel:r})||(0,tI.bb)(n,{channelId:i})||t((0,lO.l3)({hasHuddleStarted:!0,channelId:i}))}function huddleRoomUpdatedHandler(e,t,a){let n=a(),r=(0,Y.WR)(n);(0,dc.pt)(n)&&("accepted"===e.knock_status&&e.free_willy&&t(dF({channelId:e.channel_id,mediaServerCredentials:e.free_willy})),"expired"===e.knock_status&&e.knocking_users.includes(r)&&t(dB()),e.knocking_users&&t(dH({waitingKnockingUserIds:e.knocking_users,channelId:e.channel_id})))}function endedHuddleUpdateHandler(e,t){t((0,dg.VZ)()),t((0,dy.T)({}))}function huddleAiNotesAutostartErrorHandler(e,t){t((0,lO.b8)({timestamp:Date.now(),error:e.error,channelId:e.channel_id,huddleId:e.huddle_id}))}function updateCallState(e,t,a){let n=a();if(e&&e.huddle&&((0,dc.pt)(n)||(0,dK.s)(n)))return void updateHuddleRtmHandler(e,t,a);let r=(0,du.Q)(e.room),i=(0,dm.H6)(a(),r.id);i&&i.name!==r.name&&t(dh({id:r.id,name:r.name})),t((0,dm.oU)(r)),t((0,dm.F$)())}function updateCallBlockState(e,t){let a=e.block;a&&t((0,dm.oU)((0,du.a)(a.call.v1,a.call.media_backend_type)))}(0,i.d1)("huddle_invite",huddleInviteRtmHandler),(0,i.d1)("huddle_invite_cancel",huddleInviteCancelRtmHandler),(0,i.d1)("huddle_recommend",huddleRecommendRtmHandler),(0,i.d1)("huddle_scheduled",huddleScheduledRtmHandler),(0,i.d1)("room_update",huddleRoomUpdatedHandler),(0,i.d1)("ended_huddle_update",endedHuddleUpdateHandler),(0,i.d1)("huddle_start",huddleStartRtmHandler),(0,i.d1)("ai_automatic_huddle_notes_error",huddleAiNotesAutostartErrorHandler),(0,i.d1)("call_block_updated",updateCallBlockState),(0,i.d1)("sh_room_join",updateCallState),(0,i.d1)("sh_room_leave",updateCallState),(0,i.d1)("sh_room_update",updateCallState);let processMessageItem=(e,t,a)=>{if(a&&a?.type==="message"){let e=t((0,le.A)({imsgs:[a.message],channelId:a.channel}));t((0,iG.Kc)(e))}};function reminderAddedRtmEventHandler(e,t,a){processMessageItem(a(),t,e?.item)}function reminderRemovedRtmEventHandler(e,t,a){processMessageItem(a(),t,e?.item)}function reminderCompletedRtmEventHandler(e,t,a){processMessageItem(a(),t,e?.item)}function reminderSnoozedRtmEventHandler(e,t,a){processMessageItem(a(),t,e?.item)}function reminderFiredRtmEventHandler(e,t,a){processMessageItem(a(),t,e?.item)}(0,i.d1)("reminder_added",reminderAddedRtmEventHandler),(0,i.d1)("reminder_deleted",reminderRemovedRtmEventHandler),(0,i.d1)("reminder_completed",reminderCompletedRtmEventHandler),(0,i.d1)("reminder_snoozed",reminderSnoozedRtmEventHandler),(0,i.d1)("reminder_fired",reminderFiredRtmEventHandler);(0,i.uH)("user_typing",(e,t)=>{if(!(0,eO.A)())return;if(!eN.wE)throw Error("[USER-TYPING-ORG-RTM] Not a gantry context");if("hidden"===document.visibilityState)return;let a=(0,tv.Ry)();if(!(0,rP.isFocusedWorkspaceInTeamOrEnterprise)(a,t))return;let{dispatch:n,getState:r}=(0,$.oK)((0,rP.getFocusedWorkspace)(a));batchUserTypingInner(e,n,r)});let d$=(0,V.Ay)("Sets the canvas thread of an active huddle only",(e,t,{huddleId:a,channelId:n,ts:r})=>{e((0,lO.ZL)({huddleId:a,thread:{channelId:n,ts:r}})),e((0,iX.KN)({channelId:n,threadTs:r,lastRead:r,reason:"canvas-created-rtm-event"})),e((0,iJ.a)({channelId:n,threadTs:r,oldest:r}))});function canvasCreatedRtmHandler(e,t,a){if(!(0,eO.A)()||!e||!e.thread)return;let n=e.call_id,r=e.thread.channel_id,i=e.thread.ts,l=(0,tv.Ry)();l&&n===(0,tw.E9)(l)&&t(d$({huddleId:n,channelId:r,ts:i}))}d$.meta={name:"setActiveCanvasThread",key:"createThunkSetActiveCanvasThread",description:"Sets the canvas thread of an active huddle only"},(0,i.d1)("canvas_created",canvasCreatedRtmHandler);var dY=a(0x8eb6366c);let getChannelSpaceFileId=(e,t)=>{let a=(0,er.OL)(e,t);return(0,tE.H)(a)?.fileId??null};(0,V.Ay)("Get fileId for a channel space given a channelId ",(e,t,{channelId:a})=>getChannelSpaceFileId(t(),a)).meta={name:"getChannelSpaceFileIdThunk",key:"createThunkGetChannelSpaceFileIdThunk",description:"Get fileId for a channel space given a channelId "};var dQ=a(0xb4ea2806),dZ=a(0xc824cd6a),dJ=a(0xf49f1b26),dX=a(0x3ae26f4a),d0=a(0x24194f718);let d1=(0,V.Ay)(aL.rd.SET_CHANNEL_PROPERTIES_CANVAS_FILE_ID,(e,t,{id:a,fileId:n})=>{let r=t(),i=(0,er.OL)(r,a,!1);if(!a||!i)return;let l={...i,properties:{...i?.properties,canvas:{...i?.properties?.canvas,file_id:n,is_linked_canvas_deleted:!1}}};e((0,aO.F)({channel:l,reason:aL.rd.SET_CHANNEL_PROPERTIES_CANVAS_FILE_ID}))});d1.meta={name:"setChannelPropertiesCanvasFileId",key:"createThunkSetChannelPropertiesCanvasFileId",description:aL.rd.SET_CHANNEL_PROPERTIES_CANVAS_FILE_ID};var d2=a(0x9b3b5c3b),d4=a(0x1209733a7);let d5=(0,V.Ay)("Closes the meeting notes within the huddle if an rtm arrives saying it has been unset",(e,t,{fileId:a,channelId:n})=>{if("on"!==(0,t7._Z)(t(),"cuddles_unset_property")||(0,tw.hc)(t())!==n||!n)return;let r=(0,er.OL)(t(),n);r?.properties?.meeting_notes?.file_id&&""===a&&((0,tI.JE)(t())&&e((0,lO.ff)({isMeetingNotesOpen:!1})),e((0,d4.x)({peerId:"self",contentViewType:dw.cM.None})))});d5.meta={name:"maybeCloseHuddleMeetingNotes",key:"createThunkMaybeCloseHuddleMeetingNotes",description:"Closes the meeting notes within the huddle if an rtm arrives saying it has been unset"};var d3=a(0x12219f474),d6=a(0x1f8f05a48),d8=a(0x1defa8f11),d7=a(0x54ef0daa),d9=a(0x1b6d1042b);let me=(0,V.Ay)("Check and fetch AI workspace file IDs if not available",(e,t,{channelId:a})=>{let n=t();return(0,d3.R)(n)&&(0,lJ.te)(n)===a?(0,d8.ax)(n,d7.wq)?Promise.resolve():(e((0,d9.Z)({shouldFetchMegaphoneDataImmediately:!1})),e((0,sy.X)({includeTeamData:!0,reason:"ai-workspace-team-creation"}))):void 0});me.meta={name:"maybeFetchAiWorkspaceFileIds",key:"createThunkMaybeFetchAiWorkspaceFileIds",description:"Check and fetch AI workspace file IDs if not available"};let mt=(0,d6.Je)(me,1500,!0,void 0,!1);var ma=a(0xded2b65c);function channelUpdated({channel:e,channels:t,updates:a},n,r){let i=r(),l=(0,W.Ay)({getState:r,label:a8}),o=[];t?o=t:e&&(o=[e]);let c=(0,lJ.te)(i);o&&o.length?o.forEach(e=>{let t=(0,er.OL)(i,e,!1);if(!t)return void l.info(`Received channel_updated on missing channel: ${e}, ignoring.`);if(!a||!(0,o0.A)(a))return void l.warn(`Received channel_updated with no updates for channel: ${e}, ignoring.`);let o=(0,dY.A)(a);if((0,aW.A)(a,"properties.has_slack_connect_invite_created")&&a?.properties?.has_slack_connect_invite_created&&n((0,ma.R)({channelId:e})),(0,aW.A)(a,"is_archived")){let t={channel:e,...a};a.is_archived?channelArchived(t,n,r):channelUnarchived(t,n,r)}if(a.permissions){let{isReadOnly:r,isThreadOnly:l}=(0,dQ.x)(i,{prefValuePost:a.permissions.post,prefValueThread:a.permissions.thread,channel:t});o={...o,is_read_only:r,is_thread_only:l},n((0,dJ.m)({channelId:e,isReadOnly:r})),n((0,dX.C)({channelId:e,isThreadOnly:l}))}if(a.space){o={...(0,ne.A)(o,["space"])};let{space_icon:t,space_file_id:r,space_is_primary:i}=a.space;t&&n((0,dZ.z)({channelId:e,pref:"space_icon",value:t})),r&&n((0,dZ.z)({channelId:e,pref:"space_file_id",value:r})),i&&n((0,dZ.z)({channelId:e,pref:"space_is_primary",value:i}))}if((0,aW.A)(a,"unlinked")||(0,aW.A)(a,"connected_team_ids")){let t=(0,s.ZT)(i);t&&((0,d2.D1)(t,[e]),(0,aj.Dq)(t,e))}if((0,aW.A)(a,"is_migrating")&&!0===t.is_migrating&&!1===a.is_migrating&&n((0,d0.o)({channelId:e,needsReload:!0})),(0,aW.A)(a,"is_mpim")&&!1===a.is_mpim&&n((0,aM.oV)({id:t.id})),(0,aW.A)(a.properties,"meeting_notes")&&n(d5({fileId:a.properties?.meeting_notes?.file_id,channelId:e})),(0,aW.A)(a,"membership")&&channelMembershipChanged(e,n,r),a?.properties?.canvas){let{file_id:t}=a.properties.canvas;!getChannelSpaceFileId(i,e)&&t&&n(d1({id:e,fileId:t}))}if(a.topic&&(0,O.cb)(t)){o={...(0,ne.A)(o,["topic"])};let{value:t,creator:r,last_set:i}=a.topic;t&&r&&i&&n((0,aH.$)({id:e,topic:{value:t,creator:r,last_set:i}}))}l.info(`Received channel_updated for ${e}`);let d={...o,id:e};if((0,D.A)(d?.id)){if((0,e3.F)(d))return void l.info(`Handling channel_updated, but ${e} is not known or is archived, ignoring.`);if((0,O.Zp)(d)&&!(0,e6.bl)(t)){l.info(`Handling channel_updated, channel ${e} was converted to private and you aren\u{2019}t a member of it, removing it.`),n((0,aM.dM)({ids:[e],reason:aL.rd.CHANNEL_UPDATED}));return}if((0,aW.A)(a,"properties.record_channel.minimum_access_level")&&(0,O.U_)(t)&&!(0,e6.bl)(t)){l.info(`Handling channel_updated, Salesforce channel ${e} has changed minimum access level and you aren\u{2019}t a member of it, removing it.`),n((0,aM.dM)({ids:[e],reason:aL.rd.CHANNEL_UPDATED}));return}l.info(`Handling channel_updated, upserting channel ${e}.`),n((0,aO.F)({channel:d,reason:aL.rd.CHANNEL_UPDATED})),(0,d3.R)(i)&&e===c&&n(mt({channelId:e}))}}):l.warn("Received channel_updated without a channel, ignoring.")}(0,i.d1)("channel_updated",channelUpdated);var mn=a(0x2379130e),mr=a(0xec0282d8),mi=a(0x9dd9da39),ml=a(0x16d432f0a);let mo=(0,V.Ay)("Update the current user",(e,t,{calendarReminder:a})=>e((0,ml.DY)(a)));function calendarReminderRtmHandler(e,t,a){let n=a();!(0,mn.A)(n)||(0,eO.A)()&&t(mo({calendarReminder:e}))}mo.meta={name:"addCalendarReminder",key:"createThunkAddCalendarReminder",description:"Update the current user"},(0,i.d1)("calendar_reminder",calendarReminderRtmHandler),(0,i.d1)("calendar_event",(e,t,a)=>{("updated"===e.subtype||"created"===e.subtype)&&e.event&&t((0,mr.R)(e.event)),"deleted"===e.subtype&&t((0,rO.ag)({calendarEventId:e.event_id}))}),(0,i.d1)("calendar_user_status",(e,t)=>{if(e.status){let{cal_app_type:a,user_status:n}=e.status,r=a.toLowerCase();if("provider_connected"===n&&("gcal"===r||"ocal"===r))return void t((0,rO.wL)({appType:r,authenticationConnectingState:mi.a.ProviderConnected}));t((0,rO.CD)({[a]:{userStatus:n,isDwa:e.status?.is_dwa,calAppUserId:e.status?.calapp_user_id,authUrl:e.status?.auth_url,userCanInstallApp:e.status?.user_can_install_app,isCalendarAppInstalled:e.status?.is_calendar_app_installed,primaryCalendarInfo:e.status?.calendar}}))}});var ms=a(0x134a8ab2f),mc=a(0x588ae9bb);function handleCalendarJitNotificationRTMEvent(e,t,a){let n=(0,ms.e)(a),{subtype:r,entry:i}=e;n.debug("Received calendar_jit_notification RTM",{subtype:r,eventId:i.item?.linked_item_id,isUnread:i.is_unread});let l=(0,ms.H)(i,n);if(!l)return void n.warn("Failed to transform calendar_jit_notification to JIT event",{subtype:r,entry:i});switch(r){case"created":case"updated":t((0,mc.s)({event:l,isUnread:i.is_unread}));break;case"dismissed":t((0,mc.s)({event:l,isUnread:!1}));break;default:n.warn("Unknown calendar_jit_notification subtype",{subtype:r})}}(0,i.d1)("calendar_jit_notification",(e,t,a)=>{handleCalendarJitNotificationRTMEvent(e,t,a)}),a(0x5f6ee27d);var md=a(0x1e34a5540),mm=a(0x1f0c0afcc);function isAlertsCountKey(e,t){return Object.keys(t).includes(e)}function handleBadgeCountsUpdatedRTMEvent(e,t,a){let n=a();if((0,W.Ay)({getState:a}).info("RTM-BADGE-COUNTS-UPDATED","badge_counts_updated"),(0,ia.IW)(n)){e.activity_v2&&t((0,r8.Ql)(e.activity_v2)),0===Object.values(e.activity_v2||{}).reduce((e,t)=>e+t,0)&&((0,md.Sv)(n)||[]).filter(e=>e.isUnread).forEach(e=>{t((0,mm.m)({activityItem:e,isActivityRead:!0,isLocalOnlyUpdate:!0}))});return}if(t((0,lp.$m)((0,ne.A)(e.counts))),e.alerts){let a=e.alerts;Object.values(cl.e).forEach(e=>{if(isAlertsCountKey(e,a)){let n=a[e];void 0!==n&&t((0,cd.g)({alertType:e,unreadCount:n}))}})}[...Object.values(e.counts||{}),...Object.values(e.alerts||{})].every(e=>0===e)&&((0,md.ES)(n)||[]).filter(e=>e.isUnread).forEach(e=>{t((0,mm.m)({activityItem:e,isActivityRead:!0,isLocalOnlyUpdate:!0}))})}(0,i.d1)("badge_counts_updated",handleBadgeCountsUpdatedRTMEvent);var mu=a(0x1365ef56e);(0,i.d1)("widget_run_completed",(e,t)=>{t((0,mu.nD)({widgetPlacementId:e.widget_placement_id,blocks:e.blocks,error:e.error}))});var mp=a(0x1e864b930),mh=a(0x102edf836),m_=a(0x15a4ffb05),mf=a(0x1dc84ebc7),mb=a(0x1393a17ca),mg=a(0x238efd016),my=a(0x16c0f7de4),mA=a(0x1b6608bb5),mx=a(0x20e80190e),mE=a(0x157b4a886),mC=a(0x18fcd8e2a);let mk=new E.Ay("hermes_shortcuts"),mv=(0,V.Ay)("Resumes a workflow execution by ID and refreshes client token",(e,t,{channelId:a,messageTs:n})=>{e((0,mA.R)({messageTs:n,channel:a,clientToken:u.A.generateAndEnqueue(t()),reason:"step-auth-speedbump/resume-execution"}))});mv.meta={name:"resumeWorkflowExecutionThunk",key:"createThunkResumeWorkflowExecutionThunk",description:"Resumes a workflow execution by ID and refreshes client token"};let WorkflowStepSpeedbumpModal=({thirdPartyAuths:e,workflowId:t,triggerId:a,channelId:n,messageTs:r,buttonText:i})=>{let l=(0,cB.wA)(),o=(0,mg.Z)(e.auths),s=(0,nE.d4)(e=>(0,mE.WZ)(e,o)),c=(0,f.useMemo)(()=>{let e=Array.from(new Set(s.map(e=>e.providerName)));return(0,mp.A)(e)},[s]),d=(0,nE.d4)(e=>(0,n1.bn)(e,{triggerId:a},!0)),m=(0,nE.d4)(e=>(0,mC.g)(e,t)),u=(0,f.useMemo)(()=>(0,mf.j)({trigger:d,workflow:m}),[d,m]),p=(0,f.useMemo)(()=>1===c.length?mk.t("This workflow uses a {providerNameList} step. Connect your account to continue.",{providerNameList:c}):mk.rt("This workflow uses steps from {providerNameList}. Connect your account to continue.",{providerNameList:c}),[c]),h=(0,f.useMemo)(()=>s.every(({validTokens:e})=>e.length),[s]),_=(0,f.useCallback)(()=>{l(mv({channelId:n,messageTs:r})),l((0,ad.O)())},[l,n,r]),b=(0,f.useCallback)(()=>{l((0,ad.O)())},[l]);return f.createElement(mx.aF,{contentLabel:mk.t("Connect accounts"),centered:!0,onClose:b},f.createElement(mx.rQ,null,f.createElement(mx.Rc,{title:mk.t("Connect accounts")})),f.createElement(mx.$m,null,f.createElement(mx.qf,null,f.createElement(mb.A,{shortcutInfo:u,showCopyWorkflowLink:!1}),f.createElement("p",null,p),f.createElement(my.j,{selectedAuths:s,workflowId:t}))),f.createElement(mx.jl,null,f.createElement(mx.ox,{className:"display_flex"},f.createElement(mx.s_,{type:"outline",onClick:b,"aria-label":mk.t("Cancel")},mk.t("Cancel")),f.createElement(mh.Ay,{onClick:_,disabled:!h,type:"primary",className:"display_flex"},f.createElement("div",{className:"margin_right_25"},f.createElement(ng.Ah,{name:"play",inline:!0,size:"18"})),f.createElement(m_.A,{text:i})))))};WorkflowStepSpeedbumpModal.displayName="WorkflowStepSpeedbumpModal";var mS=a(0x1c7cb6e50),mI=a(0x244a4de90);function externalAuthRequiredRtmHandler(e,t,a){let n=a();if((0,mI.A)()||!e.show_speedbump||!e.workflow.id||!e.trigger_id||!u.A.check(n,e?.client_token))return;let r={thirdPartyAuths:(0,mS.t)(e.third_party_auths,3),workflowId:e.workflow.id,triggerId:e.trigger_id,channelId:e?.channel,messageTs:e.message_ts,buttonText:e.button_text.text},i=f.createElement(WorkflowStepSpeedbumpModal,r);t((0,eh.q)({element:i}))}(0,i.d1)("external_auth_required",externalAuthRequiredRtmHandler);var mw=a(0x145d46a61),mT=a(0x1166590a3),mN=a(0x8ec82b29),mM=a(0x10a5eb591);let mR=["SUCCESS","ERROR","EXPIRED","CANCELED","ABANDONED"];(0,i.d1)("workflow_execution_outcome_changed",(e,t,a)=>{t((0,mM.I)({workflowHistoryItem:e,workflowId:e.workflow_id}));let n=a(),r=(0,mw.fS)(n),i=(0,mN.C7)(n),l=(0,mN.te)(n);r&&i.has(e.trigger_execution_id)&&!l.has(e.trigger_execution_id)&&mR.includes(e.workflow_instance_status)&&(t((0,nw.Z)()),t((0,mT.Vi)({triggerExecutionId:e.trigger_execution_id,workflowId:e.workflow_id})))});var mP=a(0xf4ce7435);function featureAccessUpdate(e,t){t((0,mP.$)(e?.feature_access_policies))}(0,i.d1)("feature_access_policies_updated",featureAccessUpdate);var mL=a(0x1d06e350e),mO=a(0x9c34eb0b),mD=a(0x209bc8f97);function isWorkflowTemplatePublished(e){return"draft"===e||"published"===e}function workflowTemplateCreated(e,t,a){let n=a(),r=(0,s.ZT)(n);(0,mw.kY)(n)&&r&&((0,mO.G)().markObjectsAsStale(r,[mL.ej.YOUR_WORKFLOW_TEMPLATES]),(0,mO.G)().markObjectsAsStale(r,[mL.ej.WORKFLOW_TEMPLATES]))}function workflowTemplateUpdated(e,t,a){let n=a(),r=(0,s.ZT)(n),i=(0,Y.WR)(n);if(!(0,mw.kY)(n)||!r)return;let l=e.template_id,o=e.collaborator_ids.includes(i),c=isWorkflowTemplatePublished(e.published_state);"workflow"===e.template_type&&((o||c)&&(0,mD.G)().markObjectsAsStale(r,[l]),(0,mD.G)().markObjectsAsStale(r,[l]))}function workflowTemplateDeleted(e,t,a){let n=a(),r=(0,s.ZT)(n),i=(0,Y.WR)(n);if(!(0,mw.kY)(n)||!r)return;let l=e.collaborator_ids.includes(i),o=isWorkflowTemplatePublished(e.published_state);l&&(0,mO.G)().markObjectsAsStale(r,[mL.ej.YOUR_WORKFLOW_TEMPLATES]),o&&(0,mO.G)().markObjectsAsStale(r,[mL.ej.WORKFLOW_TEMPLATES])}(0,i.d1)("template_created",workflowTemplateCreated),(0,i.d1)("template_updated",workflowTemplateUpdated),(0,i.d1)("template_deleted",workflowTemplateDeleted),(0,i.d1)("resurrected_user_web_push_summary_notification",(e,t,a)=>{let n=a(),r=(0,h.eo)({getState:a}),i=(0,W.Ay)({state:n,label:si.o7}),l=(0,ex._7)(n);if(l===eC.Z.NONE){i.info("activities summary dispatching notification",e);let{data:a,event_ts:n}=e;t((0,eg.kt)({summaryItem:a,eventId:n}))}else{let e=(0,eC.Q)(l);i.info("activities summary  suppressed",e),r.track(p.EventId.RESURRECTED_USER_WEB_PUSH_SUMMARY_NOTIFICATION,{contexts:{ui_context:{action:p.UiAction.IMPRESSION,step:p.UiStep.RESURRECTED_USER_WEB_PUSH_SUMMARY_NOTIFICATION_REJECTED}},reason:e})}});var mF=a(0x840597c2);function vipUsersUpdated(e,t,a){t((0,mF.DU)(e.vip_users))}(0,i.d1)("vip_users_updated",vipUsersUpdated);var mU=a(0x94e8342),mB=a(0x596b2fda),mH=a(0x167fa6898),mW=a(0x1de66e9e2);function handleAiSuggestedTopicsAdded(e,t,a){if((0,rC.d2)(a())){let a=e.channel_id,n=e.event_ts,r=e.topics;a&&n&&r&&t((0,rE.FB)({channelId:a,eventTs:n,topics:r}))}}(0,i.d1)("ai_message_translation_ready",(e,t,a)=>{let n=a(),r=(0,lx.ot)(n),i=(0,as.Ld)(n,e.channel_id,e.ts);if(!r||!i)return;if(e.error)return void t((0,mB.dm)({channelId:e.channel_id,messageTimestamp:e.ts,error:e.error}));if(!e.blocks)return;let l=(0,lE.wM)(n,e.channel_id,e.ts),o=!!i?.document_comment&&!!i?.document_comment?.is_archived,s=i&&(!i?.document_comment||o)?(0,rJ.M8)(i):void 0,c=!(0,mU.A)(i.blocks,!1),d=(0,mW.R)({blocks:e.blocks,suppressRichTextEditedLabel:c,isArchived:o,editedTs:s}),m=1;l&&e.num_translations>1&&(l.numTranslationsComplete+=1,m=l.numTranslationsComplete);let u=m>=e.num_translations?mH.Ex.COMPLETE:mH.Ex.PENDING,p={...l,channelId:e.channel_id,ts:e.ts,text:e.text,showTranslation:l?.showTranslation??!0,blocks:e.blocks,blocksProcessed:d,eventTs:e.event_ts,status:u,translationId:e.translation_id,targetLanguage:e.target_language,numTranslations:e.num_translations,numTranslationsComplete:m,...e.source_language&&{sourceLanguage:{locale:e.source_language.locale,localeLabel:e.source_language.locale_label,isReliable:e.source_language.is_reliable}}};t((0,mB.$E)({aiTranslation:p})),p.status===mH.Ex.COMPLETE&&cC.LI.stop({label:cC.gC.SlackAiMessageTranslation,id:p.ts})}),(0,i.d1)("ai_attached_message_translation_ready",(e,t,a)=>{let n=a(),r=(0,as.Ld)(n,e.channel_id,e.parent_message_ts);if(!e.blocks||!r)return;let i=(0,lE.wM)(n,e.channel_id,e.parent_message_ts);if(!i){let a={channelId:e.channel_id,ts:e.parent_message_ts,status:mH.Ex.PENDING,showTranslation:!0,numTranslationsComplete:0};t((0,mB.$E)({aiTranslation:a})),i=a}let l=1;i&&(i.numTranslationsComplete+=1,l=i.numTranslationsComplete),t((0,mB.vE)({channelId:e.channel_id,messageTimestamp:e.parent_message_ts,attachedMessageTimestamp:e.attached_message_ts,blocks:e.blocks})),i.numTranslations===l&&(t((0,mB.SR)({channelId:e.channel_id,messageTimestamp:e.parent_message_ts})),cC.LI.stop({label:cC.gC.SlackAiMessageTranslation,id:e.parent_message_ts}))}),(0,i.d1)("ai_file_summary_translation_ready",(e,t,a)=>{let n=a();if(!(0,lx.tG)(n)||!e.text)return;let r={...(0,lE.dC)(n,e.file_id,e.summary_id),fileId:e.file_id,summaryId:e.summary_id,translationId:e.translation_id,status:mH.Ex.COMPLETE,blocks:e.blocks,text:e.text,fileName:e.file_name};t((0,mB.xy)({aiFileSummaryTranslation:r})),cC.LI.stop({label:cC.gC.SlackAiFileSummaryTranslation,id:r.fileId})}),(0,i.d1)("ai_suggest_topics_ready",handleAiSuggestedTopicsAdded);var mV=a(0x13fe778e8),mG=a(0x93c830b7),mq=a(0x382cbff6),mj=a(0x5932bb18),mz=a(0x15482e67);function upsertItemsFromApi(e,t){let a=(0,c_.XK)(e);t((0,c1.dI)(a))}function handleAiTodayItemCreated(e,t,a){let n=a();if(!(0,mq.d9)(n))return;let r=(0,W.Ay)({state:n}),i=(0,mq.me)(n);if(e.items&&e.items.length>0){let a=(0,mj.kj)(n),l=e.items;if(i&&a.length>0){let r=new Set(a);if(0===(l=e.items.filter(e=>{let t=e.id;return!r.has(t)})).length){(0,mj.t5)(n)&&t((0,c1._l)());return}}r.info("AI-TODAY",`Received ${l.length} today item(s) from RTM event: ai_today_item_created (after filtering dismissed)`),upsertItemsFromApi(l,t);let o=l.some(e=>e.type===mG.S.LatestUnreadAndActivity);o&&(0,mV.te)(),(0,mj.t5)(n)&&o&&t((0,c1._l)())}else e.items&&0===e.items.length&&(r.info("AI-TODAY","Received empty items array from RTM event: ai_today_item_created"),(0,mj.t5)(n)&&t((0,c1._l)()))}function handleAiTodayItemUpdated(e,t,a){let n=a();if(!(0,mq.d9)(n))return;let r=(0,W.Ay)({state:n}),i=(0,mq.me)(n);if(e.items&&e.items.length>0){let a=(0,mj.kj)(n),l=e.items;if(i&&a.length>0){let t=new Set(a);l=e.items.filter(e=>{let a=e.id;return!t.has(a)})}l.length>0&&(r.info("AI-TODAY",`Received ${l.length} today item(s) from RTM event: ai_today_item_updated (after filtering dismissed)`),upsertItemsFromApi(l,t))}}function handleAiTodayItemDeleted(e,t,a){let n=a();if(!(0,mq.d9)(n))return;let r=(0,W.Ay)({state:n});e.item_ids&&e.item_ids.length>0&&(r.info("AI-TODAY",`Received ${e.item_ids.length} today item ID(s) from RTM event: ai_today_item_deleted`),t((0,c1.q5)(e.item_ids)))}function handleAiTodayItemStateChanged(e,t,a){let n=a();if(!(0,mq.d9)(n))return;let r=(0,W.Ay)({state:n});e.item_id&&(r.info("AI-TODAY",`Received state change for item ${e.item_id} from RTM event: ai_today_item_state_changed (new state: ${e.state})`),t("responded"===e.state?(0,mz.w)({itemId:e.item_id,reason:"responded to"}):(0,c1.ry)({itemId:e.item_id,newState:e.state})))}function handleLlmTaskStreamUpdated(e,t,a){let n=a();if(!(0,mq.d9)(n))return;let r=(0,W.Ay)({state:n});"today_unreads_and_activity"===e.task_type&&("STREAM_START"===e.event?(r.info("AI-TODAY",`Streaming started for today unreads at ${e.event_ts}`),(0,mV.Bf)()):"STREAM_SUCCESS"===e.event?(r.info("AI-TODAY",`Streaming completed for today unreads at ${e.event_ts}`),(0,mV.D)(),t((0,c1.C6)(e.event_ts||""))):("STREAM_ERROR"===e.event||"STREAM_FAILURE"===e.event)&&(r.warn("AI-TODAY",`Streaming failed for today unreads at ${e.event_ts}: ${e.event}`),t((0,c1.SO)())))}(0,i.d1)("ai_today_item_created",handleAiTodayItemCreated),(0,i.d1)("ai_today_item_updated",handleAiTodayItemUpdated),(0,i.d1)("ai_today_item_deleted",handleAiTodayItemDeleted),(0,i.d1)("ai_today_item_state_changed",handleAiTodayItemStateChanged),(0,i.d1)("llm_task_stream_updated",handleLlmTaskStreamUpdated);var mK=a(0x1eecf130e),m$=a(0xbddcdea8),mY=a(0x1ada9b76b);let beaconTodosNotification=(e,{listId:t,recordId:a,description:n})=>{let r={list_id:t,record_id:a,description:n};Object.keys(r).forEach(t=>{(0,eE.Cv)({state:e}).recordMetric(t,r[t])})};async function handleTodoDue(e,t,a){let n=a(),r=(0,W.Ay)({state:n,label:mY.s}),i=(0,eA.tl)(n);if(r.info(`todo_due RTM received, todos enabled: ${i}`,e),!i)return;t((0,m$.L)({counts:e.counts})),t((0,mK.ZG)(e.row_id));let l=(0,ex.K0)(n);if(l===eC.Z.NONE)r.info("todo_due RTM dispatching notification",e),t((0,eg.hi)({listId:e.list_id,recordId:e.row_id})),beaconTodosNotification(n,{listId:e.list_id,recordId:e.row_id,description:"Todos due desktop notification shown"});else{let t=(0,eC.Q)(l);r.info("todo_due RTM suppressed",t),beaconTodosNotification(n,{listId:e.list_id,recordId:e.row_id,description:`todo_due RTM suppressed: ${t}`})}}async function handleTodoCountsUpdated(e,t,a){let n=a(),r=(0,W.Ay)({state:n,label:mY.s}),i=(0,eA.tl)(n);r.info(`todo_counts_updated RTM received, todos enabled: ${i}`,e),i&&e.counts&&t((0,m$.L)({counts:e.counts}))}(0,i.d1)("todo_due",handleTodoDue),(0,i.d1)("todo_counts_updated",handleTodoCountsUpdated);var mQ=a(0x18fe5b996);function appsPermissionsChanged(e,t){e&&t((0,mQ.n)({reason:"apps-permissions-changed-rtm"}))}(0,i.d1)("apps_permissions_changed",appsPermissionsChanged);var mZ=a(0x1b6f39a31),mJ=a(0x1ec1d09bd),mX=a(0xf0256151),m0=a(0xe9460abe),m1=a(0x901ae535),m2=a(0x8ca8865d),m4=a(0x15bd01ec9),m5=a(0x2180443d9),m3=a(0x1f5c53bc),m6=a(0xc9b196b3),m8=a(0xab77543),m7=a(0x1ad6b19a9),m9=a(0x1c5116e43);let workObjectEntityResponseRtmHandler=async(e,t,a)=>{if(e.ext_error||"live"===e.data_freshness){let n=e.entity_id,r=a(),i=(0,s.ZT)(r);if(!i)return;let l=(0,m5.a)(r,n),o=(0,m3.j_)(r,n);if(e.ext_error?.status==="edit_error"){let r=e.entity_url;t((0,m2.mu)({isSaving:!1,entityId:n})),t((0,m2.yT)({hasError:!0,entityId:n})),t((0,m2.PB)({errorMessage:e.ext_error.message,entityId:n}));try{if((0,mZ.jH)(l)){let e=(0,m0.uz)(a(),l.viewId),{view_id:i,service_id:o}=await t((0,mX.k)({reason:"work-objects-edit-entity-fetch",entityId:n,entityUrl:r}));t((0,m2.m9)({mode:m9.Gk.Form,entityId:n,viewId:i,serviceId:o})),t((0,m1.s)({containerId:i,blockId:"work-object-block",actionId:"work-object-action",blockState:e}))}}catch{t((0,m2.U$)({pendingChanges:{},entityId:n})),t((0,m8.o)({entityId:n,entityUrl:r}))}return}(!l||(0,m4.nY)(l)||(0,mZ.yg)(l)||(0,m4.z9)(l)||(0,mZ.jH)(l)&&l.awaitingSave||(0,mZ.jH)(l)&&l.awaitingRefresh||o||e.ext_error?.status==="user_not_authed")&&((0,m4.Fy)(i,[{...e,id:e.entity_id}]),t((0,m2.C$)({entityId:n,isLoading:!1})),t((0,m6.xf)({entityId:n})),(0,mZ.jH)(l)&&l.awaitingSave&&t((0,m8.o)({entityId:n,entityUrl:e.entity_url})),(0,mZ.jH)(l)&&l.manualRefresh&&t((0,m2.Hx)({entityId:n,manualRefresh:l.manualRefresh})),(0,mZ.jH)(l)&&l.awaitingRefresh&&t((0,m2.lP)({awaitingRefresh:!1,entityId:n})),e.ext_error?.status!=="user_not_authed"||o||"unfurl_action"!==e.source||t((0,m7.P)({entityId:e.entity_id,id:e.entity_id,appId:(0,mJ.a)(e.entity_id)?.appId||"",source:m9.tL.Unfurl,entityUrl:e.entity_url})))}};function handleAiChannelJoinReasonCompleted(e,t,a){if(!(0,rC.JJ)(a()))return;let{summary:n,channel_id:r,message_ts:i,inviter_id:l}=e;if(!l)return;let{id:o,result:s,ai_context_result_status:c}=n;t((0,rE.Sz)({channelId:r,isLoading:!1})),s?.blocks&&"complete"===c?(t((0,rE.cF)({channelId:r,error:!1})),t((0,rE.Io)({channelId:r,reasonData:{id:o,result:s,inviterId:l,messageTs:i,aiContextResultStatus:c}}))):t((0,rE.cF)({channelId:r,error:!0}))}(0,i.d1)("entity_details_present",workObjectEntityResponseRtmHandler),(0,i.d1)("ai_channel_join_reason_completed",handleAiChannelJoinReasonCompleted);var ue=a(0x1d047f5ce);(0,i.d1)("ai_recent_channel_summary_ready",(e,t)=>{let{channel_id:a,status:n}=e;"complete"===n&&t((0,ue.x)({channelIds:[a],updateSingle:!0}))}),(0,i.d1)("file_view_ready",(e,t,a)=>{t((0,m2.RH)({filePreview:e}));let n=a();if("treatment"===(0,t7._Z)(n,"tab_3p_files")){let t=(0,tS.Lp)(n,e.file?.id??""),a=t?.entity_id??"",r=t?.external_url??"",i=(0,m3.Ne)(n,{recordId:a,entityUrl:r,fetchIfMissing:!1}),l=(0,s.JY)(n)??"";(0,mZ.yg)(i)&&!e.error&&(0,m4.vD)(l,a)&&(0,m4.e_)(l,[a])}});var ut=a(0x1cccf90c9),ua=a(0x83f48212),un=a(0xf4040274),ur=a.n(un);let ui=new E.Ay("slack_first_crm"),BulkGridImportCompletionToast=()=>{let e=(0,nE.d4)(e=>"on"===(0,t7._Z)(e,"salesforce_app_notifications")),t=(0,nE.d4)(ua.Y4),a=(0,nA.o)(),n=(0,f.useCallback)(()=>{if(!t)return;let{rawRecordId:e,salesforceOrgId:n}=(0,nx.D)(t);a({id:e,salesforceOrgId:n,label:"Contacts",objectType:nC.Dj.Contact},{openInHome:!0})},[t,a]);return f.createElement(ny.A,{shouldAutoFade:!0,offsetY:55},f.createElement("div",{className:ur().toastContentWrapper},f.createElement(ut.P,{recordIconType:"Contact",status:"check"}),f.createElement("div",{className:ur().toastContent},f.createElement("div",{className:ur().title},ui.t("Contact import complete",{fallbackHash:"f132267b76b529555987bc6548dbc6bc0b46989d",fallbackHashNs:"modernselling"})),f.createElement("div",{className:ur().subtitle},e?ui.t("Your contacts list is ready to go."):ui.t("Your contacts have been successfully imported to your contacts page.",{fallbackHash:"e7d78ab4dc891da72175f71826f75aeb5446b442",fallbackHashNs:"modernselling"})),e&&t&&f.createElement(nb.A,{onClick:n},e?ui.t("View contacts"):"View contacts"))))};BulkGridImportCompletionToast.displayName="BulkGridImportCompletionToast";let ul=new E.Ay("slack_first_crm"),BulkGridImportFailureToast=()=>{let e=(0,nE.d4)(e=>"on"===(0,t7._Z)(e,"salesforce_app_notifications")),t=(0,nE.d4)(ua.Y4),a=(0,nA.o)(),n=(0,f.useCallback)(()=>{if(!t)return;let{rawRecordId:e,salesforceOrgId:n}=(0,nx.D)(t);a({id:e,salesforceOrgId:n,label:"Contacts",objectType:nC.Dj.Contact},{openInHome:!0})},[t,a]),r=e?ul.t("Please try again."):"Please try again.";return f.createElement(ny.A,{shouldAutoFade:!0,offsetY:55},f.createElement("div",{className:ur().toastContentWrapper},f.createElement(ut.P,{recordIconType:"Contact",status:"warn"}),f.createElement("div",{className:ur().toastContent},f.createElement("div",{className:ur().title},e?ul.t("Contact import failed"):"Contact import failed"),f.createElement("div",{className:ur().subtitle},e?ul.t("There was a problem uploading your CSV file."):"There was a problem uploading your CSV file."," ",t?f.createElement(nb.A,{onClick:n},r):r))))};BulkGridImportFailureToast.displayName="BulkGridImportFailureToast";var uo=a(0x22efab6f7),us=a(0x1380694ee),uc=a(0x226879b47),ud=a(0x4f86f8f5),um=a(0x4be97ba3);function ensureContactsCompositeIdPopulated(e,t){let a=t();if((0,ua.Y4)(a))return;let n=(0,us.VH)(a),r=(0,uo.uF)(n);if(!r)return;let i=(0,uc.Lz)(a,r.id).filter(e=>e.entityType===ud.FN.SalesforceList),l=i[0]?.entityId,o=i[1]?.entityId;o&&e((0,nu.y)({status:np.M.COMPLETE,...o&&{contactsListCompositeId:o},...l&&{accountsListCompositeId:l}}))}(0,i.d1)("salesforce_contacts_imported",(e,t,a)=>{t((0,um.MG)({isImportInProgress:!1})),t((0,um.wU)({isImportWaitingForCsvMapping:!1})),t((0,um.rK)({shouldRefreshData:!0}));let n="on"===(0,t7._Z)(a(),"salesforce_app_notifications");n&&ensureContactsCompositeIdPopulated(t,a),t(n&&("failed"===e.state||"aborted"===e.state)?(0,th.M)({element:f.createElement(BulkGridImportFailureToast)}):(0,th.M)({element:f.createElement(BulkGridImportCompletionToast)}))});let uu=new E.Ay("slack_first_crm"),CrmProvisioningFailureToast=()=>{let e=(0,nE.d4)(e=>"on"===(0,t7._Z)(e,"salesforce_app_notifications"));return f.createElement(ny.A,{showCloseButton:!0,svgIconProps:{name:"warning"}},f.createElement("div",null,e?uu.t("Setup failed. Something went wrong while setting up customer management."):"Setup failed. Something went wrong while setting up customer management."))};CrmProvisioningFailureToast.displayName="CrmProvisioningFailureToast",(0,i.d1)("salesforce_org_provisioning_failed",(e,t)=>{t((0,nu.y)({status:np.M.ERROR})),t((0,th.M)({element:f.createElement(CrmProvisioningFailureToast)}))});var up=a(0x4444f986),uh=a(0x15257bc0b);(0,i.d1)("admin_advisor_count_change",(e,t,a)=>{let n=a();if(!(0,uh.HP)(n))return;let r=(0,uh.i9)(n)??{recommendations:[],numToReview:0};t((0,up.i)({...r,numToReview:e.count}))});var u_=a(0xc9567660),uf=a(0xf7c5eb46);(0,i.d1)("onboarding_tasks_updated",(e,t,a)=>{let n=a();if((0,ns.Hp)(n,nd.xu.SIDEBAR_MENU_ONBOARDING_TASKS_LINK)!==nd.ze.ONBOARDING_TASKS_TRIGGER)return;let r=(0,ns.OL)(n,nd.xu.SIDEBAR_MENU_ONBOARDING_TASKS_LINK);t((0,nc.iR)({event:{type:nd.jo.REQUEST_SPACES,spaces:[nd.xu.SIDEBAR_MENU_ONBOARDING_TASKS_LINK]}})).then(()=>{let e=(0,ns.OL)(a(),nd.xu.SIDEBAR_MENU_ONBOARDING_TASKS_LINK);if(!(0,u_._)(a()))for(let a of e.tasks){let e=r.tasks.find(e=>e.id===a.id);a.completed&&!e?.completed&&t((0,uf.ZJ)())}})}),(0,i.d1)("onboarding_tasks_reminder",(e,t,a)=>{let n=a(),r=(0,h.eo)({getState:a}),i=(0,W.Ay)({state:n,label:si.o7}),l=(0,ex.KH)(n);if(l===eC.Z.NONE){let{tasks_remaining:a,event_ts:n}=e;t((0,eg.Qj)({tasksRemaining:a,eventId:n}))}else{let e=(0,eC.Q)(l);i.info("onboarding tasks reminder suppressed",e),r.track(p.EventId.ONBOARDING_TASKS_REMINDER_NOTIFICATION,{contexts:{ui_context:{action:p.UiAction.IMPRESSION,step:p.UiStep.ONBOARDING_TASKS_REMINDER_NOTIFICATION_REJECTED}},reason:e})}});var ub=a(0x536ccc50);function handleAppUserConnectionChanged(e,t,a){let n=a(),r=(0,lK.A)(n,{viewType:eY.D.Search});t((0,oa.Hn)(n)&&(0,oa.v4)(n)&&r?(0,ot.w)({reason:"external-user-connection-updated"}):(0,or.ZZ)())}function addAppUserConnectionChangedRtmHandlers(){(0,i.d1)("app_user_connection_changed",handleAppUserConnectionChanged)}(0,i.d1)("seasonal_delight_web_push_notification",(e,t,a)=>{let n=a(),r=(0,tv.Ry)();if((0,rP.getFocusedWorkspace)(r)!==(0,s.ZT)(n)||"treatment"!==(0,t7._Z)(n,"seasonal_delight_january"))return;let i=(0,W.Ay)({state:n,label:"SEASONAL_DELIGHT_WEB_PUSH_NOTIFICATION"}),l=(0,ex.Ug)(n);if(l===eC.Z.NONE){i.info("seasonal january delight web push notification dispatching notification",e);let{data:a,event_ts:n}=e,{header:r,content:l,seasonal_delight_type:o}=a;"january_delight"===o&&t((0,eg.wp)({title:r,content:l,eventId:n}))}else{let e=(0,eC.Q)(l);i.info("seasonal january delight web push notification suppressed",e),t((0,ub.H)({action:p.UiAction.IMPRESSION,ui_step:p.UiStep.SEASONAL_DELIGHT_WEB_PUSH_NOTIFICATION_REJECTED,reason:e??void 0}))}}),(0,i.d1)("welcome_party_web_push_notification",(e,t,a)=>{let n=a(),r=(0,h.eo)({getState:a}),i=(0,W.Ay)({state:n,label:si.o7}),l=(0,ex.xS)(n);if(l===eC.Z.NONE){let{joiner_id:a,channel_id:n,message_ts:r,event_ts:i}=e;t((0,eg.DL)({joinerId:a,channelId:n,messageTs:r,eventId:i}))}else{let e=(0,eC.Q)(l);i.info("welcome party web push notification suppressed",e),r.track(p.EventId.WELCOME_PARTY_NOTIFICATION,{contexts:{ui_context:{action:p.UiAction.IMPRESSION,step:p.UiStep.WELCOME_PARTY_WEB_PUSH_NOTIFICATION_REJECTED}},reason:e})}});var ug=a(0x2331492d2);let uy="PLATFORM-CHANNEL-ACTIONS",formatActionPayload=e=>{let t=e.channel,a=e.app_id,n=e.action_id,r=e.app,i="action"in e&&void 0!==e.action?e.action:void 0;return{action:i?{appId:a,id:n.toString(),name:i.name,description:i.description,type:i.type,channelId:t,app:r,installTeamId:i.install_team_id,installTeamName:i.install_team_name}:void 0,channelId:t,appId:a,actionId:n.toString(),app:r}};var uA=a(0x2a920c83),ux=a(0x8ecd9914),uE=a(0x481bf926),uC=a(0x2050b73b9);function unfurlPreviewUpdatedHandler({client_msg_id:e,attachments:t},a,n){let r=(0,W.Ay)({getState:n,label:"DRAFT_UNFURLS"}),i=(0,t$.V4)(n(),e);if(!i)return void r.info(`Ignoring unfurl_preview_updated for clientMsgId ${e}: draft does not exist in store`);let l=(0,tR.ue)(i);l&&Object.entries(t).forEach(([t,i])=>{let o=(0,uC.PC)(n(),{draftId:l,url:t});if(!o||o.status===uE.Xq)return void r.info(`Ignoring unfurl from unfurl_preview_updated for ${t}: no matching unfurl found for clientMsgId ${e}`);if((0,uA.a)(i)){let e=i.blocks?.find(e=>"file"===e.type&&"remote"===e.source);a((0,op.b)({files:[e?.file]}))}a((0,ux.rl)({draftId:l,url:t,data:i,status:i.user_auth_required?uE.dz:uE.Wz}))})}var uk=a(0x2266f1ba8);function handleEmailAttachmentsUploadedFromSearchConnector(e,t){t((0,m2.F$)({emailAttachments:e}))}function addEmailAttachmentsUploadedFromSearchConnectorRtmHandler(){(0,i.d1)("email_attachments_uploaded_from_search_connector",handleEmailAttachmentsUploadedFromSearchConnector)}function handleEmailBodyUploadedFromSearchConnector(e,t){e.file_id&&t((0,m2.$1)({emailBody:e}))}function addEmailBodyUploadedFromSearchConnectorRtmHandler(){(0,i.d1)("email_body_uploaded_from_search_connector",handleEmailBodyUploadedFromSearchConnector)}function handleEmailUploadedFromSearchConnector(e,t,a){(0,oa.C6)(a())&&e.file_id&&t((0,m2.rC)({emailFile:e}))}function addEmailUploadedFromSearchConnectorRtmHandler(){(0,i.d1)("email_uploaded_from_search_connector",handleEmailUploadedFromSearchConnector)}var uv=a(0x24e98a449),uS=a(0x198572436),uI=a(0xf3c65e54);let uw=(0,V.Ay)("Maybe clear Gmail or Outlook notification events",async(e,t,{appId:a})=>{let n=t();a&&("on"===(0,t7._Z)(n,"enterprise_search_google_mail")&&(0,uv._q)(a)&&(e((0,uI.A)({notificationName:nd.ze.ENTERPRISE_SEARCH_NUX_EMAIL_CONNECTOR_BANNER,action:nd.hw.DISMISS})),e((0,uS.J)({badgeName:"enterprise_search_email_connector_new_badge"}))),"on"===(0,t7._Z)(n,"enterprise_search_microsoft_outlook")&&(0,uv.NY)(a)&&(e((0,uI.A)({notificationName:nd.ze.ENTERPRISE_SEARCH_NUX_EMAIL_CONNECTOR_BANNER,action:nd.hw.DISMISS})),e((0,uS.J)({badgeName:"enterprise_search_email_connector_new_badge"}))))});uw.meta={name:"maybeClearGmailOutlookNotificationEvents",key:"createThunkMaybeClearGmailOutlookNotificationEvents",description:"Maybe clear Gmail or Outlook notification events"};var uT=a(0x19b946539),uN=a(0x1fe086707),uM=a(0x7f148aa6),uR=a(0x141c1c56a),uP=a(0x237e0ebef);let uL=(0,V.Ay)("Maybe remove work object from redux state and navigate to Enterprise Search connector",async(e,t,{connectorAppId:a})=>{if(!(0,oa.YR)(t())||!(0,oa.v4)(t())||!(0,uN.NP)((0,uP.id)(t())))return;let n=(0,uT.Kf)(a),r=(0,uP.l7)(t()),i=Object.keys(r).find(e=>r[e]===a);if(i){delete r[i],e((0,uR.xx)({workObjectAppIdToConnectorAppIdMap:r}));let a=(0,uP.QA)(t()).filter(e=>e!==i);e((0,uR.W3)({appIds:a})),e((0,uM.s)({tab:n}))}});uL.meta={name:"maybeRemoveWorkObjectAndNavigateToConnector",key:"createThunkMaybeRemoveWorkObjectAndNavigateToConnector",description:"Maybe remove work object from redux state and navigate to Enterprise Search connector"};var uO=a(0x15e922395),uD=a(0x15b4a156e);function handleExternalAuthCompleted(e,t,a){let n=(0,lK.A)(a(),{viewType:eY.D.Search});t((0,uO.D)(e)),(0,oa.v4)(a())&&n?(t((0,ot.w)({reason:"external-auth-completed"})),t(uL({connectorAppId:e.app_id}))):t((0,or.ZZ)()),"on"===(0,t7._Z)(a(),"app_connect")&&t((0,uD.TA)()),("on"===(0,t7._Z)(a(),"enterprise_search_google_mail")||"on"===(0,t7._Z)(a(),"enterprise_search_microsoft_outlook"))&&t(uw({appId:e.app_id}))}function addExternalAuthCompletedRtmHandlers(){(0,i.d1)("external_auth_completed",handleExternalAuthCompleted)}var uF=a(0x1ba481d95),uU=a(0x1a8f4f31a),uB=a(0x2041e47fc),uH=a(0xf3f67393);function identityLinksPrefsPermissionChangeHandler(e,t){t((0,uH.t)())}function identityLinksTransferCompleteHandler(e,t,a){let{client_msg_id:n,app_id:r}=e,i=(0,W.Ay)({getState:a,label:"IDENTITY_LINKS"});r&&t((0,uB.zL)({appId:r}));let l=(0,t$.V4)(a(),n),o=(0,tR.ue)(l);if(o){let e=(0,uC.y3)(a(),o);e?.forEach(e=>{e?.app_id===r&&t((0,ux.rl)({draftId:o,url:e?.app_unfurl_url??"",status:uE.yR,data:e}))}),t((0,uU.A)({draftId:o,channelId:(0,D.A)(o)?o:void 0}))}else i.info(`Ignoring identity_links_transfer_complete for clientMsgId ${n}: draft does not exist in store`)}var uW=a(0x1bac5de2),uV=a(0x198ecdf97),uG=a(0xc270896e);async function handleReconnectGracePeriodStarted(e,t){if(!e.disconnected_channel_ids||0===e.disconnected_channel_ids.length||!e.team_id)return;let[a,n]=await Promise.allSettled([t((0,uV.b)({team:e.team_id,reason:"reconnect-grace-period-started"})),t((0,uW.V)({channels:e.disconnected_channel_ids.join(","),reason:"reconnect-grace-period-started"}))]);"fulfilled"===a.status&&a.value.ok&&"team"in a.value&&a.value.team&&t((0,sQ.XS)({team:a.value.team})),"fulfilled"===n.status&&n.value.ok&&n.value.channels&&t((0,uG.U)({channels:n.value.channels,reason:"reconnect-grace-period-started"}))}var uq=a(0x2413005f6),uj=a(0x2507e6b5d);function handleRecordChannelDigestSummaryUpdate({summary:e},t,a){let n=a(),r=(0,W.Ay)(n);(0,nt.Pm)(n)?e&&t((0,uj.hy)({summaries:(0,uq.uR)([e])})):r.warn("Ignoring record_channel_digest_summary_updated event: feature not enabled.")}function addRecordChannelDigestSummaryUpdatedRtmHandlers(){(0,i.d1)("record_channel_digest_summary_updated",handleRecordChannelDigestSummaryUpdate)}var uz=a(0xa43abd4a),uK=a(0x8ed8ca46),u$=a(0x91728dda),uY=a(0xe8015073),uQ=a(0x1c8beab7f),uZ=a(0x609b6779),uJ=a(0xbd196b81),uX=a(0xd0eb5473),u0=a(0xe4af74fc),u1=a(0x1a204ce4e);let u2=(0,V.Ay)("Updates access to Sales Home tab and data",async(e,t,{reason:a})=>{let n=(0,uX.Jr)((0,u0.tA)(t(),{permission:uY.p.MANAGE_SALES_HOME})),r=(0,uK.AQ)(t())||n;(0,u$.hx)(t())!==r&&await e((0,nW.me)(r)),(0,u$.hx)(t())||(0,a5.e6)(t())!==ak.k6.SalesHome||e((0,u1.A)({tab:ak.k6.Home,reason:u1.m.AutoSwitch})),(0,u$.hx)(t())?await e((0,uZ.$)({forceFetch:!0,reason:a??"update-sales-home-access"})):(0,uQ.tV)(t())||(e((0,sr.iH)([])),e((0,uJ.T)({salesforceOrgId:null})))});u2.meta={name:"updateSalesHomeAccess",key:"createThunkUpdateSalesHomeAccess",description:"Updates access to Sales Home tab and data"};let u4=(0,V.Ay)("Called after Salesforce org/user permissions change",async(e,t,{changedSalesforceOrg:a})=>{let n=(0,uK.m6)(t(),a.salesforce_org_id);if(!n)return;let r={...n,...a};await e((0,uz.FW)({salesforceOrg:r})),await e(u2({reason:"salesforce-org-access-changed"}))});u4.meta={name:"salesforceOrgAccessChanged",key:"createThunkSalesforceOrgAccessChanged",description:"Called after Salesforce org/user permissions change"};var u5=a(0x1337f8f40),u3=a(0x6aa2c358);let u6=(0,V.Ay)("Called after a user is successfully connected to a Salesforce organization",async(e,t,{salesforceOrgId:a})=>{(0,uK.m6)(t(),a)&&((0,W.Ay)({label:"SALESFORCE-CONNECTIONS",state:t()}).info(`Running connect tasks for user org ${a}`),(0,u$.hx)(t())&&(0,a5.e6)(t())===ak.k6.SalesHome&&await e((0,uZ.$)({reason:"salesforce-org-connected"})),(0,uK.GQ)(t())||e((0,uz.LS)(a)),e((0,u3.T)({salesforceOrgId:a})))});u6.meta={name:"salesforceOrgConnected",key:"createThunkSalesforceOrgConnected",description:"Called after a user is successfully connected to a Salesforce organization"};let u8=(0,V.Ay)("Called after a Salesforce org config is updated",async(e,t,{salesforceOrgId:a,isGlobalLoginEnabled:n})=>{let r=(0,uK.m6)(t(),a);r&&((0,W.Ay)({label:"SALESFORCE-CONNECTIONS",state:t()}).info(`Updating config for Salesforce org ${a}.`),e((0,uz.FW)({salesforceOrg:{...r,is_global_login_enabled:n}})))});u8.meta={name:"salesforceOrgConfigUpdated",key:"createThunkSalesforceOrgConfigUpdated",description:"Called after a Salesforce org config is updated"};var u7=a(0x10d00175d);let handleSalesforceOrgDisconnected=async(e,t,a)=>{let n=(0,W.Ay)({state:a(),label:"SALESFORCE-CONNECTIONS"}),{salesforce_org_id:r}={...e};r&&((0,uK.nG)(a(),r)||t((0,uz.tF)({salesforceOrgId:r})),await t((0,u7.p)({salesforceOrgId:r})),n.info(`Salesforce org ${r} disconnected.`))};var u9=a(0x24beb32cf),pe=a(0x23b952b9a);let pt=(0,V.Ay)("Called after a team is successfully disconnected from a Salesforce organization",async(e,t,{salesforceOrgId:a})=>{(0,uK.m6)(t(),a)&&((0,W.Ay)({label:"SALESFORCE-CONNECTIONS",state:t()}).info(`Running org unavailable tasks for Salesforce org ${a}`),e((0,u9.Hg)(a)),e((0,pe._)(a)),await e((0,uz.Uu)({salesforceOrgId:a})),await e(u2({reason:"salesforce-org-unavailable"})))});pt.meta={name:"salesforceOrgUnavailable",key:"createThunkSalesforceOrgUnavailable",description:"Called after a team is successfully disconnected from a Salesforce organization"};var pa=a(0x10f6683d3),pn=a(0x1d7960bf2);function handleServiceAuthCompleted(e,t,a){let{provider_key:n,user_id:r,app_id:i}=e,l=a();if((0,Y.WR)(l)!==r)return;let o=(0,pn.t8)(l,n);o&&o.app_id===i&&t((0,pa.hv)({providerKey:n,isConnected:!0}))}function addServiceAuthCompletedRtmHandlers(){(0,i.d1)("service_auth_completed",handleServiceAuthCompleted)}var pr=a(0x20cbec946),pi=a(0x1846f5916),pl=a(0x1ec8ed0f0),po=a(0x3ca4e1cc);function workObjectCommentsRtmHandler(e,t,a){(0,po.Y)(a())&&(t((0,m2.X_)({comments:e})),t((0,m6.xm)({entityId:e.entity_id})))}function addEntityCommentsPresentRtmHandler(){(0,i.d1)("entity_comments_present",workObjectCommentsRtmHandler)}var ps=a(0x1a5ac3a0c),pc=a(0x1fd7ae408),pd=a(0x7a2a96da),pm=a(0x72b537b5),pu=a(0x205f4fb61),pp=a(0x143f89715),ph=a(0x1d1a513a),p_=a(0xf4030543),pf=a(0x220757cb0),pb=a(0x13c8b082e),pg=a(0x22ade83e7),py=a.n(pg);let pA=new E.Ay("workflow-permissions"),PermissionsNotice=({isCollaborator:e})=>{let t=e?pA.t("Update the workflow permissions if you\u2019d like all channel members to be able to use it."):pA.t("Ask a manager to update the workflow permissions if you\u2019d like all channel members to be able to use it.");return f.createElement("div",{className:py().notice},f.createElement("div",{className:"bold"},pA.t("Not everyone in this channel can find and use this workflow")),t)};PermissionsNotice.displayName="PermissionsNotice";var px=a(0x1ecbdc24),pE=a(0x23198a843),pC=a(0x17726a2a9),pk=a(0x1bb9b9e21),pv=a(0xa1832ae4),pS=a(0xb8504a42);let pI="WORKFLOW-EDITED-CLIENT-LABEL",pw=(0,V.Ay)("Update whether the current or given workflowId is restricted from execution by away team members in Slack Connect channels",async(e,t,{workflowId:a,reason:n})=>{let r=(0,W.Ay)({label:pI});try{await e((0,px.g)({workflowId:a,reason:n}))}catch(e){r.error(Error(`Fetch workflow is restricted failed: ${e}`))}});pw.meta={name:"updateWorkflowIsRestricted",key:"createThunkUpdateWorkflowIsRestricted",description:"Update whether the current or given workflowId is restricted from execution by away team members in Slack Connect channels"};let pT=(0,V.Ay)("Set Trigger Run Permissions",async(e,t,{trigger:a,workflowId:n,permissionType:r,userIds:i,channelIds:l,teamIds:o,orgIds:s})=>{let c=t(),d=(0,W.Ay)({label:pI});if("on"===(0,t7._Z)(c,"workflow_permissions_prompt")&&!a)return;let m={};r===pb.PW.named_entities?m={userIds:i,channelIds:l,teamIds:o,orgIds:s}:r===pb.PW.everyone&&(o||s)&&(m={permissionType:pb.PW.named_entities,teamIds:o,orgIds:s});try{await e((0,pE.z)({triggerId:a.id,permissionType:r,reason:"set-trigger-run-permission",...m})),e(pw({workflowId:n,reason:"set-trigger-run-permission"}))}catch(e){throw d.error(e),e}});pT.meta={name:"setTriggerRunPermission",key:"createThunkSetTriggerRunPermission",description:"Set Trigger Run Permissions"};var pN=a(0x20adb28cd);let pM=new E.Ay("workflow-permissions"),pR={clogImpression:!0,uiComponentName:"workflow_permissions_prompt_modal",eventId:p.EventId.WORKFLOW_PERMISSIONS_PROMPT_MODAL_PERMISSIONS_CHANGED,uiPage:p.UiPage.CHANNEL_TABS_WORKFLOWS},WorkflowPermissionsCollaboratorContent=({workflow:e,trigger:t,isCollaborator:a,collaborators:n,permissions:r})=>{let i=(0,pm.U)(),l=(0,cB.wA)(),o=(0,nE.d4)(sY.H7),s=(0,pv.ZT)(o),c=(0,pv.F1)(o),d=(0,pS.kA)(o),m=(0,nE.d4)(t=>(0,pk.X)(t,e)),u=(0,nE.d4)(e=>{let t=(0,sY._J)(e,m);if(t)return(0,pv.F1)(t)}),p=r?.permission_type?(e=>{switch(e){case"app_collaborators":return pb.PW.app_collaborators;case"named_entities":return pb.PW.named_entities;default:return pb.PW.everyone}})(r.permission_type):pb.PW.everyone,h=(e=>{if(!e)return[];let{user_ids:t=[],channel_ids:a=[],team_ids:n=[],org_ids:r=[]}=e;return t.concat(a,n,r)})(r),_=n?.slice()||[],[b,g]=(0,f.useState)(void 0),[y,A]=(0,f.useState)(void 0);(0,f.useEffect)(()=>{(async()=>{let[{trippable_by_slack_connected_teams:t},{is_restricted:a,restricted_by_connector_steps_only:n}]=await Promise.all([l((0,pC.n)({workflowId:e.id,reason:"load-workflow-editor"})),l((0,px.g)({workflowId:e.id,reason:"load-workflow-editor"}))]);g(t),A({is_restricted:a,restricted_by_connector_steps_only:n})})()},[l,e.id]);let[x,E]=(0,f.useState)(p),[C,k]=(0,f.useState)(h),[v,S]=(0,f.useState)(!1),[I,w]=(0,f.useState)(null),T=(0,f.useCallback)(()=>l((0,ad.O)()),[l]),N=0===C.length,M=C.length>p_.y||I===pE.S.TooManyNamedEntities,R=pM.t("You must select users, channels, or workspaces"),P=pM.t("Workflow access is limited to a total of {entitiesLimit} users, channels, or workspaces. Remove {amountToRemove} to save.",{entitiesLimit:(0,pu.ZV)(p_.y),amountToRemove:(0,pu.ZV)(C.length-p_.y)}),L=(0,nE.Z2)(e=>{let[t]=(0,pN.e5)(e,C);return t}),{isTeamValidSCWorkflowTarget:O}=(0,ph.u)(e.id,b,y),F=(0,f.useMemo)(()=>L.some(e=>!O(e)),[O,L]),U=(0,f.useMemo)(()=>{let e=[];return x===pb.PW.named_entities&&N&&e.push({id:"empty_entities_with_run_access",message:R}),M&&e.push({id:pE.S.TooManyNamedEntities,message:P}),e},[R,M,N,x,P]),B=(0,f.useMemo)(()=>F||(0,pp.A)(U,i)||(0,oL.A)(C,h)&&p===pb.PW.named_entities,[h,U,F,p,C,i]),H=(0,f.useCallback)((e,t,a,n)=>{let{user_ids:i=[],channel_ids:l=[],team_ids:o=[],org_ids:s=[]}=r??{},c=(0,t3.A)(e,i).length>0||(0,t3.A)(t,l).length>0||(0,t3.A)(a,o).length>0||(0,t3.A)(n,s).length>0,d=(0,t3.A)(i,e).length>0||(0,t3.A)(l,t).length>0||(0,t3.A)(o,a).length>0||(0,t3.A)(s,n).length>0;return c||d},[r]),W=(0,f.useCallback)(async()=>{S(!0),w(null);let a=[],n=[],i=[],o=[];C.forEach(e=>{(0,tU.A)(e)&&a.push(e),(0,D.A)(e)&&n.push(e),(0,oe.Ay)(e)&&i.push(e),(0,oe.JV)(e)&&o.push(e)});let c=a.length>0?a:void 0,m=n.length>0?n:void 0,u=i.length>0?i:void 0,p=o.length>0?o:void 0;if(x!==r.permission_type||H(a,n,i,o)){let a=x,n={};x===pb.PW.everyone&&(u||p)?(a=pb.PW.named_entities,n={teamIds:d?u:(0,rF.A)([s],u||[]),orgIds:d?(0,rF.A)([s],p||[]):p}):x===pb.PW.named_entities&&(n={userIds:c,channelIds:m,teamIds:u,orgIds:p});try{await l(pT({trigger:t,workflowId:e.id,permissions:r,permissionType:a,...n}))}catch(e){w(e.error)}finally{S(!1),T()}}else S(!1)},[T,s,l,d,r,C,x,t,e.id,H]),V=pM.t("Save"),G=p!==x?pM.t("Cancel"):pM.t("Skip");return f.createElement(f.Fragment,null,f.createElement(mx.$m,null,f.createElement(PermissionsNotice,{isCollaborator:a}),f.createElement("div",{className:py().permissionsSection},f.createElement(pf.B,{currentTeamId:s,teamName:u||c,overrideTrigger:t,selectedRunAccessOption:x,setRunAccessOption:E,selectedEntitiesWithRunAccess:C,setSelectedEntitiesWithRunAccess:k,entitiesWithRunAccessErrors:U,selectedExternalEntities:L,selectedCollaborators:_,overrideWorkflowConnectionsPrefs:b,overrideWorkflowRetrictions:y,hasExternalEntititesDriftedFromSCPrefs:F,overridePermissions:r}))),f.createElement(mx.jl,null,f.createElement(mx.ox,null,f.createElement(cH.Ay,{type:"outline","aria-label":G,onClick:T},G),f.createElement(cH.lV,{autoClogProps:pR,ariaLoadingMessage:pM.t("Saving"),loading:v,"aria-label":V,disabled:B,onClick:W},V))))};WorkflowPermissionsCollaboratorContent.displayName="WorkflowPermissionsCollaboratorContent";var pP=a(0x71c724c8);let WorkflowPermissionsNonCollaboratorContent=({isCollaborator:e,collaborators:t})=>{let a=(0,cB.wA)(),n=(0,nE.d4)(e=>(0,M.gA)(e,t)),r=(0,f.useCallback)(e=>()=>{a((0,ad.O)()),a((0,eX.o)((0,e0.Fo)({memberId:e})))},[a]);return n.length?f.createElement(mx.$m,null,f.createElement(PermissionsNotice,{isCollaborator:e}),f.createElement("div",{className:py().permissionsSection},f.createElement("div",{className:py().membersContainer,"data-qa":"workflow-permissions-collaborator-content"},f.createElement("div",{className:"bold"},"Workflow managers"),n.map(e=>(0,H.lv)(e)||(0,H.mX)(e)?null:f.createElement(cH.Nm,{className:py().collaborators,"data-qa":"workflow-permissions-collaborator-button",key:e.id,onClick:r(e.id)},f.createElement(pP.Ay,{member:e})))))):null};WorkflowPermissionsNonCollaboratorContent.displayName="WorkflowPermissionsNonCollaboratorContent";var pL=a(0x2194a793);let pO={clogImpression:!0,uiComponentName:"workflow_permissions_prompt_modal",eventId:p.EventId.WORKFLOW_PERMISSIONS_PROMPT_MODAL_OPENED,uiPage:p.UiPage.CHANNEL_TABS_WORKFLOWS},WorkflowPermissionsPromptModal=({triggerId:e,isCollaborator:t,collaborators:a,permissions:n})=>{let r=(0,nE.d4)(e=>"on"===(0,t7._Z)(e,"workflow_permissions_prompt",!1)),i=(0,nE.d4)(t=>(0,n1.bn)(t,{triggerId:e},!0)),l=(0,nE.d4)(e=>i?.workflow?.workflow_id?(0,mC.g)(e,i.workflow.workflow_id):void 0),o=(0,mf.j)({trigger:i,workflow:l}),s=(0,f.useMemo)(()=>f.createElement(pd.A,{shortcutInfo:o,size:36}),[o]);if(!r)return null;let c=t&&(0,pL.G)(i)&&!(0,ty.GU)(l)&&n;return f.createElement(mx.aF,{autoClogProps:pO},f.createElement(mx.rQ,null,f.createElement(mx.Rc,{icon:s,title:o.title,subtitle:o.description})),c?f.createElement(WorkflowPermissionsCollaboratorContent,{trigger:i,workflow:l,isCollaborator:t,collaborators:a,permissions:n}):f.createElement(WorkflowPermissionsNonCollaboratorContent,{isCollaborator:t,collaborators:a}))};WorkflowPermissionsPromptModal.displayName="WorkflowPermissionsPromptModal";(0,i.d1)("channel_action_updated",(e,t,a)=>{let{channelId:n,action:r}=formatActionPayload(e);(0,W.Ay)({getState:a}).info(uy,`updated channel action ${r.id} for channel ${n}`),t((0,ug.xP)({channelId:n,actions:[r]}))}),(0,i.d1)("channel_action_added",(e,t,a)=>{let{channelId:n,action:r}=formatActionPayload(e);(0,W.Ay)({getState:a}).info(uy,`added channel action ${r.id} to channel ${n}`),t((0,ug.xP)({channelId:n,actions:[r]}))}),(0,i.d1)("channel_action_removed",(e,t,a)=>{let{channelId:n,actionId:r}=formatActionPayload(e);(0,W.Ay)({getState:a}).info(uy,`removed channel action ${r} from channel ${n}`),t((0,ug.M$)({channelId:n,actionIds:[r]}))}),(0,i.d1)("unfurl_preview_updated",unfurlPreviewUpdatedHandler),(0,i.d1)("identity_links_prefs_permission_change",identityLinksPrefsPermissionChangeHandler),(0,i.d1)("identity_links_transfer_complete",identityLinksTransferCompleteHandler),(0,i.d1)("user_session_expiration",(e,t)=>{t((0,nc.iR)({event:{type:nd.jo.REQUEST_SPACES,spaces:[nd.xu.CLIENT_FOOTER]}}))}),addExternalAuthCompletedRtmHandlers(),(0,i.d1)("salesforce_org_access_changed",(e,t,a)=>{let n=(0,W.Ay)({state:a(),label:"SALESFORCE-CONNECTIONS"}),{salesforce_org:r}={...e},i=r.salesforce_org_id,l=r.can_access_elevate_features;i&&(t(u4({changedSalesforceOrg:r})),n.info(`Salesforce org ${i} Elevate enabled: ${l}.`))}),(0,i.d1)("salesforce_org_authed",(e,t,a)=>{let n=(0,W.Ay)({state:a(),label:"SALESFORCE-CONNECTIONS"}),{type:r,...i}=e,l={...i,is_migrating:!1},o=l.salesforce_org_id;o&&(t((0,uz.FW)({salesforceOrg:l})),(0,u5.Yv)(l)&&(n.info(`Salesforce org ${o} connected.`),t(u6({salesforceOrgId:o}))))}),(0,i.d1)("salesforce_org_disconnected",handleSalesforceOrgDisconnected),(0,i.d1)("salesforce_org_unavailable",(e,t,a)=>{let n=(0,W.Ay)({state:a(),label:"SALESFORCE-CONNECTIONS"}),{salesforce_org_id:r}={...e};r&&(t(pt({salesforceOrgId:r})),n.info(`Salesforce org ${r} is now unavailable (disconnected team-wide)`))}),(0,i.d1)("workflow_permissions_warning",(e,t,a)=>{let n=a(),r=(0,Y.TZ)(n);if("on"!==(0,t7._Z)(n,"workflow_permissions_prompt")||!r)return;let i={triggerId:e.trigger_id,isCollaborator:e.is_workflow_collaborator,collaborators:e.collaborator_ids,permissions:e.permissions},l=f.createElement(WorkflowPermissionsPromptModal,i);t((0,eh.q)({element:l}))}),(0,i.d1)("hermes_channel_reacji_trigger_updated",(e,t,a)=>{let n=a(),r=(0,s.ZT)(n);if(!r)return;let{channel_id:i}=e;(0,uF.l)().markObjectsAsStale(r,[i])}),(0,i.d1)("salesforce_org_config_updated",(e,t,a)=>{let n=(0,W.Ay)({state:a(),label:"SALESFORCE-CONNECTIONS"}),{salesforce_org_id:r,is_global_login_enabled:i}=e;n.info(`Salesforce org ${r} config updated.`),t(u8({salesforceOrgId:r,isGlobalLoginEnabled:i}))}),(0,pr.lm)(),addRecordChannelDigestSummaryUpdatedRtmHandlers(),(0,i.d1)("workflow_ai_step_response_updated",(e,t)=>{t((0,pl.uL)({status:e.completed?pi.uX.COMPLETE:pi.uX.PENDING,referenceId:e.reference_id}))}),(0,i.d1)("workflow_ai_step_response_changed",(e,t)=>{t((0,pl.uL)({status:e.status,blocks:e.blocks,referenceId:e.reference_id,responseCounter:e.response_counter,eventTs:e.event_ts,error:e.error,errorMessage:e.error_message}))}),(0,i.d1)("workflow_execution_step_started",(e,t,a)=>{let n=a(),r=(0,mw.fS)(n),i=(0,mN.te)(n);if(!r||i.has(e.trigger_execution_id))return;let l=(0,mC.g)(n,e.workflow_id),o=(0,ps.Dv)(e.step_id,l),s={id:e.workflow_execution_id,workflowId:e.workflow_id,triggerExecutionId:e.trigger_execution_id,stepId:e.step_id,stepNumber:e.step_number,stepTitle:e.step_title,totalSteps:e.total_steps,triggerId:e.trigger_id,callbackId:o&&"function"in o?o.function?.callback_id:void 0};t((0,pc.V1)({triggerExecutionId:e.trigger_execution_id,workflowExecutionStatus:s})),t((0,pc.rA)({triggerExecutionId:e.trigger_execution_id})),t((0,nw.Z)()),t((0,mT.Vi)({triggerExecutionId:e.trigger_execution_id,workflowId:e.workflow_id}))}),(0,i.d1)("reconnect_grace_period_started",handleReconnectGracePeriodStarted),addAppUserConnectionChangedRtmHandlers(),addEmailUploadedFromSearchConnectorRtmHandler(),addEmailBodyUploadedFromSearchConnectorRtmHandler(),addEmailAttachmentsUploadedFromSearchConnectorRtmHandler(),addEntityCommentsPresentRtmHandler(),addServiceAuthCompletedRtmHandlers(),(0,i.d1)("eac_oauth_completed",(e,t)=>{e.success&&e.eac_config&&t((0,uk.O)(e.eac_config))});var pD=a(0x1fd75f5b5),pF=a(0x11a8d2a3d)},0x11a1cdf77:(e,t,a)=>{"use strict";a.d(t,{uT:()=>X,ed:()=>Y,gv:()=>K,Nh:()=>G,ZQ:()=>Z,sZ:()=>b,bW:()=>_,cq:()=>p,Ui:()=>el,fT:()=>W,e0:()=>g.Ay,bL:()=>s,J5:()=>c.Ay,lS:()=>k,Nc:()=>j,nK:()=>R,dH:()=>F,ds:()=>E,uU:()=>r.Ay,wj:()=>I,KE:()=>A,BK:()=>m.Ay,HU:()=>d.Ay});var n,r=a(0x9cdedc15),i=a(0x6258badf),l=a(0xba77ecb9),o=a(0xad2442ff);let s=(0,l.Ay)({},{},{storeKey:"quipCommentSnippets",persistenceEnabled:!1}).on(o.x,(e,{quipCommentThreadId:t,snippet:a})=>({...e,[t]:a})).on(o.C,(e,{quipCommentThreadId:t})=>(0,i.A)(e,[t]));var c=a(0x235ad3721);a(0x63dd8aea);var d=a(0x1bcb561e7),m=a(0x218771dd5),u=a(0x114605f21);let p=(0,l.Ay)({},{},{persistenceEnabled:!1,storeKey:"fileViewers"}).on(u.U5,(e,{fileId:t,viewers:a})=>({...e,[t]:a})).on(u.Vj,(e,{fileId:t})=>({...e,[t]:void 0})).on(u.K2,(e,{fileId:t,viewer:a})=>{let n=[...e[t]??[]].filter(({userId:e})=>e!==a.userId);return n.push(a),{...e,[t]:n}}).on(u.l,(e,{fileId:t,viewer:a})=>{let n=(e[t]??[]).filter(({userId:e})=>e!==a.userId);return{...e,[t]:n}});var h=a(0x17aa64b24);let _=(0,l.Ay)({},{},{storeKey:"channelSpaces",persistenceEnabled:!0}).on(h.j2,()=>({})).on(h.Ic,(e,{channelId:t,layout:a})=>e[t]?.layout===a?e:{...e,[t]:{...e[t],layout:a,timeUpdated:Date.now()}}).on(h.ot,(e,{channelId:t,template:a})=>e[t]?.template===a?e:{...e,[t]:{...e[t],template:a}});var f=a(0x23175895b);let b=(0,l.Ay)({},{cannedTemplates:[],createdByUserTemplates:[],sharedWithUserTemplates:[],createdByOrgTemplates:[],createdBySalesTemplates:[],cannedTemplatesCollapsed:!1,isFetchingCannedTemplates:!1,isAllTemplatesFetched:!1,optimisticTemplateBadge:{},templatePreview:{}},{storeKey:"canvasTemplates",persistenceEnabled:!1}).on(f.SH,(e,{cannedTemplates:t})=>{let a=[...new Map([...e.cannedTemplates,...t].map(e=>[e.id,e])).values()];return e.cannedTemplates.length||a.length?{...e,cannedTemplates:a}:e}).on(f.CX,(e,{cannedTemplatesCollapsed:t})=>({...e,cannedTemplatesCollapsed:t})).on(f.bd,(e,{isFetchingCannedTemplates:t})=>({...e,isFetchingCannedTemplates:t})).on(f.yn,(e,{isAllTemplatesFetched:t})=>({...e,isAllTemplatesFetched:t})).on(f.wc,(e,{createdByUserTemplates:t})=>({...e,createdByUserTemplates:t})).on(f.jZ,(e,{createdByOrgTemplates:t})=>({...e,createdByOrgTemplates:t})).on(f.fI,(e,{createdBySalesTemplates:t})=>({...e,createdBySalesTemplates:t})).on(f.PZ,(e,{sharedWithUserTemplates:t})=>({...e,sharedWithUserTemplates:t})).on(f.vK,(e,{fileId:t,status:a})=>{if(!a){let{[t]:a,...n}=e.optimisticTemplateBadge;return{...e,optimisticTemplateBadge:n}}return{...e,optimisticTemplateBadge:{...e.optimisticTemplateBadge,[t]:!0}}}).on(f.QK,(e,{channelId:t,templateFileId:a})=>a?{...e,templatePreview:{...e.templatePreview,[t]:a}}:{...e,templatePreview:(0,i.A)(e.templatePreview,t)});var g=a(0xb86aa59a);a(0x83136645),a(0x48c14abc),a(0x613f64f4);var y=a(0x12acb1d55);let A=(0,l.Ay)({},{},{storeKey:"quipUpdates",persistenceEnabled:!1}).on(y.k,(e,{fileId:t,lastSaved:a})=>({...e,[t]:{...e[t],lastSaved:a}}));var x=a(0x1e4a28a4f);let E=(0,l.Ay)({},{},{storeKey:"quipTempId",persistenceEnabled:!1}).on(x.O,(e,{tempId:t,fileId:a})=>({...e,[t]:a}));var C=a(0x174a5556e);let k=(0,l.Ay)({},{originalMsgToEphemeralMsgs:{},ephemeralMsgToOriginalMsg:{}},{storeKey:"quipEphemeralMessages",persistenceEnabled:!1}).on(C.DU,(e,t)=>{let a={},n={};t.forEach(({originalMsgTs:t,ephemeralMsgTs:r})=>{let i=a[t]||e.originalMsgToEphemeralMsgs[t]||[];i.includes(r)||(i===a[t]?i.push(r):a[t]=[...i,r]),e.ephemeralMsgToOriginalMsg[r]||(n[r]=t)});let r=Object.keys(a).length>0,i=Object.keys(n).length>0;return r||i?{...e,originalMsgToEphemeralMsgs:r?{...e.originalMsgToEphemeralMsgs,...a}:e.originalMsgToEphemeralMsgs,ephemeralMsgToOriginalMsg:i?{...e.ephemeralMsgToOriginalMsg,...n}:e.ephemeralMsgToOriginalMsg}:e}).on(C.Bv,(e,t)=>{let{ephemeralMsgTs:a}=t,n=e.ephemeralMsgToOriginalMsg[a];if(!n)return e;let r=(0,i.A)(e.ephemeralMsgToOriginalMsg,[a]),l=e.originalMsgToEphemeralMsgs[n]||[];if(0===l.length||!l.includes(a))return e;let o=l.filter(e=>e!==a);return{...e,ephemeralMsgToOriginalMsg:r,originalMsgToEphemeralMsgs:{...e.originalMsgToEphemeralMsgs,[n]:o}}}).on(C.hk,(e,t)=>{let{originalMsgTs:a}=t,n=e.originalMsgToEphemeralMsgs[a]||[];if(0===n.length)return e;let r=(0,i.A)(e.originalMsgToEphemeralMsgs,[a]),l=e.ephemeralMsgToOriginalMsg;return n.forEach(t=>{let n=e.ephemeralMsgToOriginalMsg[t];n&&n===a&&(l=(0,i.A)(l,[t]))}),{...e,originalMsgToEphemeralMsgs:r,ephemeralMsgToOriginalMsg:l}});a(0x176b01ab1);var v=a(0x9e671ad),S=a(0x22aeab819);let I=(0,l.Ay)({},{},{storeKey:"quipTitle",persistenceEnabled:!1}).on(S.l,(e,{docId:t,newTitleString:a,isEmpty:n,newTitleBlocks:r})=>e[t]?.titleString===a&&(!r||(0,v.A)(e[t]?.titleBlocks,r))?e:{...e,[t]:{titleString:a,isEmpty:n,titleBlocks:r}});var w=a(0x238442d1c);let T=[],N={};var M=((n=M||{}).Add="add",n.Update="update",n);let handleNewViewers=({action:e,viewers:t,presenceStateByDoc:a})=>{let n=new Set(t),r=a?.presenceInfo??N,i={...r},l=a?.memberIds??T,o=[],s=!1;return n.forEach(e=>{i[e]?i[e].isFocused||(i[e]={...r[e],isFocused:!0},s=!0):(i[e]={isEditing:!1,isFocused:!0},o.push(e),s=!0)}),"update"===e&&l.forEach(e=>{n.has(e)||(i[e]={...r[e],isFocused:!1},s=!0)}),{changed:s,presenceInfo:i,memberIds:l.concat(o)}},R=(0,l.Ay)({},{},{storeKey:"quipPresence",persistenceEnabled:!1}).on(w.pv,(e,{docId:t,editors:a})=>{let n=e[t]?.presenceInfo??N,r=e[t]?.memberIds??T,i=[],l={},o=!1,s=new Set(a);if(s.forEach(e=>{n[e]?n[e].isEditing||(l[e]={...n[e],isEditing:!0},o=!0):(l[e]={isEditing:!0,isFocused:!0},i.push(e),o=!0)}),r.forEach(e=>{s.has(e)||(l[e]={...n[e],isEditing:!1},o=!0)}),o){let a=i.length?r.concat(i):r;return{...e,[t]:{presenceInfo:{...n,...l},memberIds:a}}}return e}).on(w.eA,(e,{docId:t,viewers:a})=>{let{changed:n,presenceInfo:r,memberIds:i}=handleNewViewers({action:"update",viewers:a,presenceStateByDoc:e[t]});return n?{...e,[t]:{presenceInfo:r,memberIds:i}}:e}).on(w.o0,(e,{docId:t,viewers:a})=>{let{changed:n,presenceInfo:r,memberIds:i}=handleNewViewers({action:"add",viewers:a,presenceStateByDoc:e[t]});return n?{...e,[t]:{presenceInfo:r,memberIds:i}}:e}).on(w.bL,(e,{docId:t,removedViewers:a})=>{let n={...e[t]??{memberIds:T,presenceInfo:N}},r=!1;return(a.forEach(e=>{n.presenceInfo[e]&&(delete n.presenceInfo[e],r=!0)}),r)?(n.memberIds=n.memberIds.filter(e=>n.presenceInfo[e]),{...e,[t]:n}):e}).on(w.zc,(e,{docId:t})=>{let a=e[t];return a&&0!==a.memberIds.length?{...e,[t]:{memberIds:T,presenceInfo:N}}:e});var P=a(0x1e2051844),L=a(0x7d48dd65),O=a(0x3e050aef),D=a(0x193577201);function addMessageForFileId(e,t,a){let n=e.fileSystemMessages[t]||[],r=(0,P.A)(n,e=>e.type===a);if(r&&!r.isClosed)return e;let i=(0,L.A)(n,e=>e.type!==a);return{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...i,{type:a,addedOn:Date.now(),isClosed:!1}]}}}function removeMessageForFileId(e,t,a){let n=e.fileSystemMessages[t]||[],r=n.findIndex(e=>e.type===a);return r<0?e:{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...n.slice(0,r),...n.slice(r+1)]}}}let F=(0,l.Ay)({},{isOffline:!1,isQuipOffline:!1,isDegraded:!1,fileSystemMessages:{}},{storeKey:"quipSystemMessages",persistenceEnabled:!1}).on(O.lm,e=>({...e,isOffline:!0})).on(O.iG,e=>({...e,isOffline:!1})).on(O.mR,(e,t)=>t?.fileId?addMessageForFileId(e,t.fileId,D.Y.degraded):{...e,isDegraded:!0}).on(O.ps,(e,t)=>t?.fileId?removeMessageForFileId(e,t.fileId,D.Y.degraded):{...e,isDegraded:!1}).on(O.S1,e=>({...e,isQuipOffline:!0})).on(O.pR,e=>({...e,isQuipOffline:!1})).on(O.Z,(e,{fileId:t,messageTs:a})=>{let n,r=e.fileSystemMessages[t]||[],i=(0,P.A)(r,e=>e.type===D.Y.ephemeralMessage),l=(0,L.A)(r,e=>e.type!==D.Y.ephemeralMessage);if(i){let e=i.ephemeralMessages||[];n=(0,P.A)(e,e=>e===a)?{...i,isClosed:!1}:{...i,ephemeralMessages:[...e,a],isClosed:!1}}else n={type:D.Y.ephemeralMessage,ephemeralMessages:[a],isClosed:!1,addedOn:Date.now()};return{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...l,n]}}}).on(O.C8,(e,{fileId:t,messageTs:a})=>{let n=e.fileSystemMessages[t]||[],r=(0,P.A)(n,e=>e.type===D.Y.ephemeralMessage),i=(0,L.A)(n,e=>e.type!==D.Y.ephemeralMessage);if(r){let n=r.ephemeralMessages?.filter(e=>e!==a)||[],l={...r,ephemeralMessages:n};return 0===n.length&&(l.isClosed=!0),{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...i,l]}}}return e}).on(O.a8,(e,{fileId:t})=>addMessageForFileId(e,t,D.Y.staticMode)).on(O.LA,(e,{fileId:t})=>removeMessageForFileId(e,t,D.Y.staticMode)).on(O.Ei,(e,{fileId:t})=>{let a=e.fileSystemMessages[t]||[],n=(0,P.A)(a,e=>e.type===D.Y.slackConnect),r=(0,L.A)(a,e=>e.type!==D.Y.slackConnect);return n?{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...r,{type:D.Y.slackConnect,addedOn:Date.now(),isClosed:!1}]}}:{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...a,{type:D.Y.slackConnect,addedOn:Date.now(),isClosed:!1}]}}}).on(O.rB,(e,{fileId:t})=>{let a=e.fileSystemMessages[t]||[],n=(0,L.A)(a,e=>e.type!==D.Y.slackConnect);return{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...n]}}}).on(O.BR,(e,{fileId:t,text:a,svgIcon:n})=>{let r=e.fileSystemMessages[t]||[],i=(0,P.A)(r,e=>e.type===D.Y.generic&&e.text===a),l=(0,L.A)(r,e=>e.type!==D.Y.generic||e.text!==a);return i?e:{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...l,{type:D.Y.generic,addedOn:Date.now(),isClosed:!1,text:a,svgIcon:n}]}}}).on(O.yf,(e,{fileId:t,text:a})=>{let n=e.fileSystemMessages[t]||[],r=(0,L.A)(n,e=>e.type!==D.Y.generic||e.text!==a);return{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...r]}}}).on(O.R8,(e,{fileId:t,addedOn:a})=>{let n=e.fileSystemMessages[t]||[],r=(0,P.A)(n,e=>e.addedOn===a),i=(0,L.A)(n,e=>e.addedOn!==a);return r?{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...i,{...r,isClosed:!0}]}}:e}).on(O.D,(e,{fileId:t})=>{let a=e.fileSystemMessages[t]||[];if((0,P.A)(a,e=>e.type===D.Y.postsMigration))return e;let n=(0,L.A)(a,e=>e.type!==D.Y.postsMigration);return{...e,fileSystemMessages:{...e.fileSystemMessages,[t]:[...n,{type:D.Y.postsMigration,addedOn:Date.now(),isClosed:!1}]}}});var U=a(0x17294c72a),B=a(0x15bbd15e5),H=a(0x19895585a);let W=(0,l.Ay)({},{},{storeKey:"quipActivityHistory",persistenceEnabled:!1}).on(B.J1,(e,{windowId:t,fileId:a,newestCreatedUsec:n,oldestCreatedUsec:r,versions:i,historyLimited:l,templateConvertedTs:o,isOwnerDisabled:s})=>{let c=t===H.N2?"main":t,d=(0,U.A)(Object.values(Object.fromEntries([...e[c]?.versions||[],...i].map(e=>[`${e.versionId}&&${e.sequence}`,e]))),e=>-e.createdMs),m=new Map,u=d.filter(e=>{let t=m.get(e.author),a=Math.floor(e.createdMs/6e4);return(t!==a||!!o&&(!(t<o)||!(e.createdMs<o))&&(!(t>o)||!(e.createdMs>o)))&&(m.set(e.author,a),!0)}),p=r??e[c]?.oldestCreatedUsec??(u.length?1e3*u[u.length-1].createdMs:null);return{...e,[c]:{fileId:a,newestCreatedUsec:u.length?1e3*u[0].createdMs:null,oldestCreatedUsec:p,selectedVersionId:e[c]?.selectedVersionId||u[0]?.versionId,hasOlder:-1!==p,hasNewer:-1!==n,isLimited:!!l,versions:u,isOwnerDisabled:s}}}).on(B.NA,(e,{windowId:t})=>{let a=t===H.N2?"main":t;return(0,i.A)(e,a)}).on(B.fw,(e,{windowId:t,versionId:a})=>{let n=t===H.N2?"main":t,r={...e};return e[n]&&(r[n].selectedVersionId=a),r});var V=a(0x1a7a2df41);let G=(0,l.Ay)({},{},{storeKey:"canvasReadOnly",persistenceEnabled:!1}).on(V.J,(e,{fileId:t,isReadOnly:a})=>e[t]===a?e:{...e,[t]:a});var q=a(0xc60c25fe);let j=(0,l.Ay)({},{ephemeralUnfurlMessages:{}},{storeKey:"quipEphemeralUnfurlMessages",persistenceEnabled:!1}).on(q.c,(e,{fileId:t,messageTs:a,unfurlType:n})=>{let r,i=e.ephemeralUnfurlMessages[t]||[],l=(0,P.A)(i,e=>e.ts===a),o=(0,L.A)(i,e=>e.ts!==a);return r=l?{...l,addedOn:Date.now()}:{type:n,ts:a,addedOn:Date.now()},{...e,ephemeralUnfurlMessages:{...e.ephemeralUnfurlMessages,[t]:[...o,r]}}}).on(q.l,(e,{fileId:t,messageTs:a})=>{let n=e.ephemeralUnfurlMessages[t]||[];if((0,P.A)(n,e=>e.ts===a)){let r=(0,L.A)(n,e=>e.ts!==a);return{...e,ephemeralUnfurlMessages:{...e.ephemeralUnfurlMessages,[t]:r}}}return e});var z=a(0xe89e2589);let K=(0,l.Ay)({},{},{storeKey:"canvasLastHighlightDismissed",persistenceEnabled:!1}).on(z.U,(e,{fileId:t,lastHighlightDismissedTs:a})=>e[t]===a?e:{...e,[t]:a});var $=a(0x18e8c4c8c);let Y=(0,l.Ay)({},{},{storeKey:"canvasHighlightedSections",persistenceEnabled:!1}).on($.i8,(e,{fileId:t,isFetching:a})=>({...e,[t]:{...e[t],isFetching:a}})).on($.Lh,(e,{fileId:t,sections:a})=>({...e,[t]:{...e[t],sections:a}})).on($.Ef,(e,{fileId:t})=>{if(!e[t])return e;let a=e[t]&&[...e[t].sections]?[...e[t].sections]:[],n=!1;return(a=a.map(e=>{let t={...e};return t.seen?e:(t.seen=!0,n=!0,t)}),n)?{...e,[t]:{...e[t],sections:a}}:e});var Q=a(6922920);let Z=(0,l.Ay)({},{},{storeKey:"canvasSectionRichText",persistenceEnabled:!1}).on(Q.Mv,(e,{sectionId:t,fileId:a,richText:n})=>({...e,[a]:{...e[a],[t]:n}})).on(Q.JE,(e,{fileId:t,sectionId:a})=>e[t]?.[a]?{...e,[t]:{...(0,i.A)(e[t],[a])}}:e).on(Q.Cf,(e,{fileId:t})=>(0,i.A)(e,[t]));var J=a(0x1a68c1972);let X=(0,l.Ay)({},{headerImages:[],hasFetchedOrFetchingAllHeaderImages:!1,isFetchingHeaderImage:[],hasErrorFetchingHeaderImages:!1},{storeKey:"canvasHeaderImages",persistenceEnabled:!1}).on(J.g1,(e,t)=>({...e,headerImages:t})).on(J.Bp,(e,t)=>e.headerImages.find(({id:e})=>e===t.id)?e:{...e,headerImages:[...e.headerImages,t]}).on(J.$F,(e,t)=>({...e,hasFetchedOrFetchingAllHeaderImages:t})).on(J.hh,(e,{headerImageId:t,isFetching:a})=>{if(a)return e.isFetchingHeaderImage.includes(t)?e:{...e,isFetchingHeaderImage:[...e.isFetchingHeaderImage,t]};let n=e.isFetchingHeaderImage.filter(e=>e!==t);return n.length===e.isFetchingHeaderImage.length?e:{...e,isFetchingHeaderImage:n}}).on(J.gG,(e,t)=>({...e,hasErrorFetchingHeaderImages:t}));var ee=a(0x1db69cda),et=a(0x1673f3229),ea=a(0xa985ed31),en=a(0x1529370e7),er=a(0x773ed904),ei=a(0xd8141fd6);let el=(0,l.Ay)({},{displayOrderedFileIds:[],cacheOrderedFileIds:[],idSet:new Set,recentlyViewedFiles:[],recentlyViewedFilesTimeLastFetched:void 0},{storeKey:"filesOpenInSessionStore",persistenceEnabled:!0}).on(er.Qx,(e,{fileId:t})=>{if(e.cacheOrderedFileIds.length&&e.cacheOrderedFileIds[0]===t||!(0,ea.A)(t)&&!(0,en.oH)(t))return e;let a=(0,ee.A)(e.cacheOrderedFileIds);if((a=(0,et.A)(a,t)).unshift(t),e.idSet.has(t))return{...e,cacheOrderedFileIds:a};let n=e.displayOrderedFileIds.slice(),r=(0,ee.A)(e.idSet);if(n.unshift(t),r.add(t),n.length>ei.Q2){let e=a.pop()??"";n=(0,et.A)(n,e),r.delete(e)}return{...e,displayOrderedFileIds:n,cacheOrderedFileIds:a,idSet:r}}).on(er.$e,(e,{fileIdToReplace:t,realFileId:a})=>{if(!(0,en.oH)(t)||!(0,ea.A)(a))return e;let n=e.displayOrderedFileIds.slice(),r=e.cacheOrderedFileIds.slice(),i=(0,ee.A)(e.idSet),l=n.indexOf(t),o=r.indexOf(t);return l<0||o<0?e:(n[l]=a,r[o]=a,i.delete(t),i.add(a),{...e,displayOrderedFileIds:n,cacheOrderedFileIds:r,idSet:i})}).on(er.UP,(e,{fileId:t})=>{if(!e.idSet.has(t))return e;let a=(0,et.A)(e.displayOrderedFileIds.slice(),t),n=(0,et.A)(e.cacheOrderedFileIds.slice(),t),r=(0,ee.A)(e.idSet);return r.delete(t),{...e,displayOrderedFileIds:a,cacheOrderedFileIds:n,idSet:r}}).on(er.k,(e,{displayOrderFileIds:t,cacheOrderFileIds:a})=>{if(0===t.length||0===a.length)return e;let n=new Set(a);return t.forEach(e=>{n.has(e)||a.push(e)}),{...e,displayOrderedFileIds:t,cacheOrderedFileIds:a,idSet:n}}).on(er.Gg,(e,{fileId:t})=>(0,ea.A)(t)?{...e,recentlyViewedFiles:[t,...(0,et.A)(e.recentlyViewedFiles,t)]}:e).on(er.OV,(e,{fileIds:t})=>({...e,recentlyViewedFilesTimeLastFetched:Date.now(),recentlyViewedFiles:t})).on(er.Er,(e,{fileId:t})=>(0,ea.A)(t)?{...e,recentlyViewedFiles:(0,et.A)(e.recentlyViewedFiles,t)}:e)},0x1661ff0ba:(e,t,a)=>{"use strict";a.d(t,{T:()=>i,w:()=>r});var n=a(0xcf658893);let r=(0,n.Ay)("Navigate to a route");r.meta={name:"updateCurrentRoute",key:"createActionUpdateCurrentRoute",description:"Navigate to a route"};let i=(0,n.Ay)("Set a value that represents whether the user navigated during a warm boot");i.meta={name:"setUserNavigatedDuringWarmBoot",key:"createActionSetUserNavigatedDuringWarmBoot",description:"Set a value that represents whether the user navigated during a warm boot"}},0x11a8d2a3d:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xba77ecb9),r=a(0x1661ff0ba);let i={routeName:"",params:{},userNavigatedDuringWarmBoot:!1},l=(0,n.Ay)({},i,{storeKey:"route",persistenceEnabled:!0,beforeWriteTransform:e=>({...e,userNavigatedDuringWarmBoot:i.userNavigatedDuringWarmBoot})}).on(r.w,(e,{routeName:t,params:a})=>({...e,routeName:t,params:a})).on(r.T,(e,t)=>({...e,userNavigatedDuringWarmBoot:t}))},0x21c71bcdd:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xbe505324),o=a(0xb1ea448c),s=a(0x344bb842),c=a(0x99233ecb),d=a(0x4c96e5d9);let ActionsMenuItem=({item:e,outline:t=!1,size:a="small"})=>{let{tooltip:r,href:i,onClick:l,ariaLabel:m,dataQa:u,dataId:p,isDisabled:h=!1,onMenuTriggerClick:_,menuProps:f,menuOffsetY:b=0,menuOffsetX:g=0,svgIconProps:y,autoClogProps:A,className:x,showSpinner:E}=e;if(E)return n.createElement(o.A,{className:"c-actions_menu__actions-spinner",size:"medium",color:"blue"});let C=n.createElement(d.Ay,{tip:r,delay:d.PK},n.createElement(s.A,{href:i,onClick:l,"aria-label":m??r,"aria-disabled":h,"data-id":p,"data-qa":u,autoClogProps:A,outline:t,className:x,svgIconProps:y,size:a}));return f?n.createElement(c.cQ,{onClick:_,position:"bottom-right",offsetY:b,offsetX:g,...f},C):C};ActionsMenuItem.displayName="ActionsMenuItem";let m=n.memo(ActionsMenuItem),ActionsMenu=({items:e,className:t,showOnlyOnHover:a=!1,isFocused:r=!1,outlined:o=!0,centerToTopLine:s=!1,outline:c=!1,size:d,toolbarAriaLabel:u})=>{let p=(0,n.useMemo)(()=>i()("c-actions_menu__actions",{"c-actions_menu__actions__hover":!a},{"c-actions_menu__actions__focus":r},{"c-actions_menu__actions__no-outline":!o},{"c-actions_menu__actions__center-top":s},t),[a,r,o,s,t]),h=(0,n.useCallback)(()=>e.map(e=>n.createElement(m,{key:e.key,item:e,outline:c,size:d})),[e,d,c]);return u?n.createElement(l.A,{"aria-label":u,className:p},h()):n.createElement("div",{className:p},h())};ActionsMenu.displayName="ActionsMenu";let u=n.memo(ActionsMenu)},0x7cf75cc8:(e,t,a)=>{"use strict";a.d(t,{RG:()=>v,f1:()=>BaseAvatar,fp:()=>getCustomBadgeIconRenderer});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x20482ad21),c=a(0x23619f41c),d=a(0xa6f3163b),m=a(0x15f8e452a),u=a(0x15e39ab9e),p=a(0x186b638d6),h=a(0x4c96e5d9),_=((n={}).BaseHeart="mask__base-heart",n.SmallHeart="mask__small-heart",n.BaseSingleChannelGuestDnd="mask__base-single-channel-guest-dnd",n.BaseSingleChannelGuest="mask__base-single-channel-guest",n.SmallSingleChannelGuestDnd="mask__small-single-channel-guest-dnd",n.SmallSingleChannelGuest="mask__small-single-channel-guest",n.BaseGuestDnd="mask__base-guest-dnd",n.BaseGuest="mask__base-guest",n.SmallGuestDnd="mask__small-guest-dnd",n.SmallGuest="mask__small-guest",n.BaseMemberDnd="mask__base-member-dnd",n.BaseMember="mask__base-member",n.SmallMemberDnd="mask__small-member-dnd",n.SmallMember="mask__small-member",n.NoAccess="mask__base-no-access",n);function AvatarMasks({size:e="base",userType:t="member",isDnd:a=!1,hasNoAccess:n=!1}){return n?r.createElement("svg",{className:"sr-only"},r.createElement("clipPath",{id:_.NoAccess,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.542 V0.825 C0.542,0.745,0.587,0.676,0.653,0.642 C0.662,0.481,0.795,0.353,0.958,0.353 C0.972,0.353,0.986,0.354,1,0.356 V0"}))):r.createElement("svg",{className:"sr-only"},"slackbot"===t&&("base"===e?r.createElement("clipPath",{id:_.BaseHeart,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M0,0 H1 V0.673 C0.986,0.669,0.971,0.667,0.954,0.667 C0.929,0.667,0.907,0.673,0.889,0.682 C0.87,0.673,0.849,0.667,0.824,0.667 C0.764,0.667,0.719,0.697,0.694,0.736 C0.672,0.77,0.667,0.807,0.667,0.832 C0.667,0.854,0.669,0.894,0.696,0.942 C0.707,0.962,0.721,0.981,0.739,1 H0 V0"})):r.createElement("clipPath",{id:_.SmallHeart,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.801 C0.75,0.958,0.714,0.915,0.69,0.872 C0.653,0.807,0.65,0.753,0.65,0.723 C0.65,0.689,0.658,0.64,0.687,0.594 C0.721,0.541,0.781,0.5,0.862,0.5 C0.896,0.5,0.925,0.508,0.95,0.521 C0.965,0.513,0.982,0.507,1,0.504 V0"}))),"ura"===t&&("base"===e?a?r.createElement("clipPath",{id:_.BaseSingleChannelGuestDnd,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.688 C0.673,0.958,0.68,0.907,0.718,0.87 L0.825,0.763 C0.821,0.752,0.819,0.741,0.819,0.729 C0.819,0.672,0.866,0.625,0.924,0.625 H1 V0"})):r.createElement("clipPath",{id:_.BaseSingleChannelGuest,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.688 C0.673,0.958,0.68,0.907,0.718,0.87 L0.87,0.718 C0.907,0.68,0.958,0.673,1,0.688 V0"})):a?r.createElement("clipPath",{id:_.SmallSingleChannelGuestDnd,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.707 C0.657,0.937,0.652,0.841,0.719,0.774 L0.864,0.63 C0.859,0.615,0.856,0.6,0.856,0.584 C0.856,0.507,0.919,0.444,0.997,0.444 H1 V0"})):r.createElement("clipPath",{id:_.SmallSingleChannelGuest,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.707 C0.657,0.937,0.652,0.841,0.719,0.774 L0.924,0.569 C0.947,0.546,0.973,0.532,1,0.525 V0"}))),("ra"===t||"external"===t)&&("base"===e?a?r.createElement("clipPath",{id:_.BaseGuestDnd,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.704 C0.698,0.985,0.694,0.969,0.694,0.951 V0.826 C0.694,0.754,0.753,0.695,0.825,0.694 C0.84,0.654,0.878,0.625,0.924,0.625 H1 V0"})):r.createElement("clipPath",{id:_.BaseGuest,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.704 C0.698,0.985,0.694,0.969,0.694,0.951 V0.826 C0.694,0.754,0.754,0.694,0.826,0.694 H0.951 C0.969,0.694,0.985,0.698,1,0.704 V0"})):a?r.createElement("clipPath",{id:_.SmallGuestDnd,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.73 C0.704,0.969,0.688,0.929,0.688,0.884 V0.716 C0.688,0.617,0.767,0.538,0.866,0.538 H1 V0"})):r.createElement("clipPath",{id:_.SmallGuest,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.73 C0.704,0.969,0.688,0.929,0.688,0.884 V0.716 C0.688,0.617,0.767,0.538,0.866,0.538 H1 V0"}))),"member"===t&&("base"===e?a?r.createElement("clipPath",{id:_.BaseMemberDnd,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.713 C0.692,0.968,0.681,0.93,0.681,0.889 C0.681,0.795,0.742,0.716,0.827,0.69 C0.843,0.652,0.88,0.625,0.924,0.625 H1 V0"})):r.createElement("clipPath",{id:_.BaseMember,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.713 C0.692,0.968,0.681,0.93,0.681,0.889 C0.681,0.774,0.774,0.681,0.889,0.681 C0.93,0.681,0.968,0.692,1,0.713 V0"})):a?r.createElement("clipPath",{id:_.SmallMemberDnd,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.752 C0.701,0.949,0.669,0.878,0.669,0.8 C0.669,0.674,0.752,0.567,0.867,0.531 C0.888,0.48,0.938,0.444,0.997,0.444 H1 V0"})):r.createElement("clipPath",{id:_.SmallMember,clipPathUnits:"objectBoundingBox"},r.createElement("path",{d:"M1,0 H0 V1 H0.752 C0.701,0.949,0.669,0.878,0.669,0.8 C0.669,0.645,0.795,0.519,0.95,0.519 C0.967,0.519,0.984,0.52,1,0.523 V0"}))))}AvatarMasks.displayName="AvatarMasks";var f=a(0x112e8a9c0),b=a(0x241e10207),g=a(0x2376ea9bb),y=a(0x1b3ecb90f),A=a(0xd6a16321),x=a(0x6d72337),E=a(0x23f7d45d6),C=a(0xa54733d1);let k=new s.Ay("avatar"),v={xlarge:72,large:56,medium:36,small:24,verySmall:20,tiny:16},S=r.memo(({botEmoji:e,canRenderEmoji:t})=>e?t?r.createElement(y.Ay,{className:"c-avatar__emoji",text:e,emojiSize:y.lw.LARGE,stopAnimations:!0,forceDisplay:!0}):r.createElement("img",{className:"c-avatar__image c-avatar__image--fallback",src:E,srcSet:`${C} 2x`,alt:""}):null);function getCustomBadgeIconRenderer({isExternal:e,teamId:t,team:a,showTooltip:n,badgeIconType:i,badgeIconClassName:o,allowTeamInitials:s=!0}){if(i){let e=o?{[o]:!!o}:{};return()=>r.createElement(m.A,{className:l()("c-avatar__icon c-avatar__nonteam_icon",{...e}),type:i})}return e&&t?()=>r.createElement(g.A,{className:"c-avatar__icon c-avatar__team_icon",id:t,team:a,size:16,showTooltip:n,allowTeamInitials:s,ariaHidden:!0}):()=>null}getCustomBadgeIconRenderer.displayName="getCustomBadgeIconRenderer";let BaseAvatar=({size:e,userId:t,isAdHocMember:a,botId:n,botProfile:i,imageUrl:s,imageUrl2x:m,additionalOverlay:g,onClick:y,className:E,teamId:C,isExternal:I=!1,isRestricted:w=!1,isUltraRestricted:T=!1,isInToken:N=!1,isDeleted:M=!1,tokenSize:R,memberOrBotName:P,showTooltip:L=!1,showCard:O=!1,showBadge:D=!0,showPresence:F=!1,badgeIconType:U,badgeIconClassName:B,isInteractive:H=!0,clogLinkClick:W=o.A,tabIndex:V=0,ariaHidden:G,team:q,botEmoji:j,canRenderEmoji:z,renderCustomBadge:K,autoClogProps:$,openProfile:Y=o.A,propagateClickEvent:Q=!1,fromQuipDoc:Z=!1,allowTeamInitials:J=!0,disableLink:X=!1,isUserHidden:ee=!1,onLoad:et=o.A,onError:ea=o.A,resetIA:en,userType:er,isDnd:ei,isSlackbot:el,hasNoAccess:eo,"data-qa":es,"data-stringify-ignore":ec,triggerId:ed,maybeOpenInSurface:em})=>{let eu,ep=(0,r.useCallback)(async e=>{if(e.preventDefault(),!H)return null;if(Q||e.stopPropagation(),W(),!Z){if(t&&em&&await em({e,navProps:(0,A.Fo)({memberId:t})}))return;Y({memberId:t,serviceId:n,botProfile:i,triggerId:ed})}return y?y(e):null},[H,Q,W,Z,y,em,t,Y,n,i,ed]),getSrcSetAttribute=()=>m?`${m} 2x`:"",renderAdditionalOverlay=()=>{if(g){let e=g>9?"9+":`+${g}`;return r.createElement("div",{className:"c-avatar__additional_overlay"},e)}return null};renderAdditionalOverlay.displayName="renderAdditionalOverlay";let renderBadgeElement=({tooltipText:e,className:t})=>{let a=r.createElement("span",{className:"c-avatar__badge_inner"});L&&(a=r.createElement(h.Ay,{tip:e},a));let n=l()("c-avatar__badge",t);return r.createElement("span",{className:n},a)};renderBadgeElement.displayName="renderBadgeElement";let renderBadgeOrPresence=()=>{let a=R?p.n[R]:e;if(void 0!==K&&a>=32){let e=K();if(e)return e}if(void 0===K&&a>=32){let e=getCustomBadgeIconRenderer({isExternal:I,teamId:C,team:q,showTooltip:L,badgeIconType:U,badgeIconClassName:B,allowTeamInitials:J})();if(e)return e}return F&&!el?r.createElement(b.A,{memberId:t,inline:!1,className:"c-avatar__presence",inheritIconSize:!0,hasNoAccess:eo}):T&&a>=32?renderBadgeElement({tooltipText:()=>k.rt("Single-Channel Guests <span>see a partial directory and can only access messages and files from the channel they belong to.</span>",null,({text:e})=>r.createElement("span",{className:"c-avatar__tooltip_detail"},e)),className:"c-avatar__badge--ultra_restricted"}):w&&a>=32?renderBadgeElement({tooltipText:()=>k.rt("Multi-Channel Guests <span>see only a partial directory and can only access messages and files from selected channels.</span>",null,({text:e})=>r.createElement("span",{className:"c-avatar__tooltip_detail"},e)),className:"c-avatar__badge--restricted"}):null};renderBadgeOrPresence.displayName="renderBadgeOrPresence";let renderTokenAvatar=()=>{let e=s||m;return R?("large"===R&&m&&(e=m),r.createElement(c.A,{image:e,classes:"c-base_icon--token",srcSet:getSrcSetAttribute(),size:p.n[R],ariaHidden:!0,ariaRole:"img",widthOnly:!0,onLoad:et,onError:ea,resetIA:en})):null};renderTokenAvatar.displayName="renderTokenAvatar";let renderImageTag=()=>s||m?R||N?renderTokenAvatar():r.createElement(c.A,{image:s||m,size:e,srcSet:getSrcSetAttribute(),ariaHidden:!0,widthOnly:!0,onLoad:et,onError:ea,resetIA:en}):null;renderImageTag.displayName="renderImageTag";let eh=j?r.createElement(S,{botEmoji:j,canRenderEmoji:z}):null,e_=e>26?"base":"small",ef="member"===er,eb="ra"===er||"external"===er,eg="ura"===er,ey=r.useMemo(()=>!F||el?"":eo?_.NoAccess:ef&&"base"===e_&&ei?_.BaseMemberDnd:ef&&"base"===e_?_.BaseMember:ef&&"small"===e_&&ei?_.SmallMemberDnd:ef&&"small"===e_?_.SmallMember:eb&&"base"===e_&&ei?_.BaseGuestDnd:eb&&"base"===e_?_.BaseGuest:eb&&"small"===e_&&ei?_.SmallGuestDnd:eb&&"small"===e_?_.SmallGuest:eg&&"base"===e_&&ei?_.BaseSingleChannelGuestDnd:eg&&"base"===e_?_.BaseSingleChannelGuest:eg&&"small"===e_&&ei?_.SmallSingleChannelGuestDnd:eg&&"small"===e_?_.SmallSingleChannelGuest:"",[F,ei,e_,eb,ef,eg,el,eo]),eA=l()(E,"c-avatar",{"c-avatar--no_image":!(s||m||eh),"c-avatar--interactive":H&&!a&&!X,"c-avatar--ad_hoc_member":a,"c-avatar--deleted_member":M,"c-avatar--resetIA":en}),ex=R?p.n[R]:e,eE={height:`${ex}px`,width:`${ex}px`};n&&(eu=H&&(t?`/team/${t}`:n&&!X?`/services/${n}`:""));let eC=P&&(H||eu)?k.t("View {name}\u2019s Profile",{name:P}):void 0,ek=(({fallback:e=null})=>{let t=e;return(s||m)&&(t=renderImageTag()),t})({fallback:eh}),ev={...eE,"--avatar-image-size":`${ex}px`},eS=(F||D)&&!el,eI=r.createElement(r.Fragment,null,F&&er&&r.createElement(AvatarMasks,{isDnd:ei,userType:el?"slackbot":er,hasNoAccess:eo,size:e_}),ee?r.createElement(f.A,{className:E,size:ex}):ek,eS&&renderBadgeOrPresence(),renderAdditionalOverlay());return(eI=eu?r.createElement(u.A,{href:eu,target:"_blank",rel:"noopener noreferrer",style:eE,className:eA,onClick:ep,tabIndex:V,"aria-hidden":G,"aria-label":eC,autoClogProps:$,"data-qa":es,"data-stringify-ignore":ec},eI):H&&!X?r.createElement(d.A,{style:eE,className:eA,"data-qa":es,"data-stringify-ignore":ec,"aria-hidden":G,"aria-label":eC,tabIndex:V,onClick:ep,autoClogProps:$},eI):r.createElement("span",{style:ev,className:eA,...ey?{"data-mask":ey}:{},"data-qa":es,"data-stringify-ignore":ec,"aria-hidden":G},eI),H&&O&&e>=v.medium)?(0,x.yN)({memberId:t,serviceId:n,botProfile:i,children:eI}):eI};BaseAvatar.displayName="BaseAvatar"},0x1ec256990:(e,t,a)=>{"use strict";a.d(t,{A:()=>z});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20b4dda68),l=a(0x18dac2b8e),o=a(0x7cf75cc8),s=a(0x111061bc6),c=a(0x21786854d),d=a(0x120c268ad),m=a.n(d),u=a(0x172dd1bf5),p=a(0x1807e7cb2),h=a.n(p);let SlackbotThinkingAvatar=({size:e,thinking:t})=>{let r=n.useRef(null),i=n.useRef(null),l=n.useRef(t),[o,s]=n.useState(t?"intro":"idle");n.useEffect(()=>{l.current=t},[t]);let c=n.useRef(o);n.useEffect(()=>{c.current=o},[o]);let d=n.useCallback(()=>{let e=i.current;e&&e.playSegments([0,40],!0)},[40]),p=n.useCallback(()=>{let e=i.current;e&&e.playSegments([40,400],!0)},[40,400]),_=n.useCallback(()=>{let e=i.current;e&&e.playSegments([400,420],!1)},[400,420]),f=n.useCallback(()=>{let e=i.current;e&&e.pause()},[]),b=n.useCallback(e=>{r.current=e,e?e.then(e=>{i.current=e,e.goToAndStop(0,!0),e.addEventListener("complete",()=>{if(i.current)switch(c.current){case"intro":c.current="loop",s("loop"),p();break;case"loop":l.current?p():(c.current="outro",s("outro"),_());break;case"outro":c.current="idle",s("idle"),f()}}),l.current&&"intro"===c.current&&d()}):i.current=null},[d,f,p,_]);n.useEffect(()=>{let e=i.current;t?("idle"===c.current||"outro"===c.current)&&(c.current="intro",s("intro"),e&&d()):("intro"===c.current||"loop"===c.current)&&(c.current="outro",s("outro"),e&&_())},[t,d,_]);let g=n.useMemo(()=>({"--box":`${e}px`}),[e]),y=m()(h().SlackbotThinkingAvatar,{[h().paused]:"idle"===o});return n.createElement("div",{className:y,style:g},n.createElement(u.e,{getAnimationImport:()=>a.e("lottie-slackbot-thinking.json").then(a.t.bind(a,0x46f830ad,23)),autoplay:!1,loop:!1,ref:b}))};SlackbotThinkingAvatar.displayName="SlackbotThinkingAvatar";var _=a(0xe20fc115),f=a(0x10027d8bc),b=a(0x41c2cf5b),g=a(0xaed97e33),y=a(0x1a02c72b5),A=a(0xd6a16321),x=a(0xd843ab47),E=a(0x1bd866cd7),C=a(0x2cbcf09d),k=a(0x1b9d5cc0c),v=a(0x21d85d6e5),S=a(0x350d87d7),I=a(0xf2964a91),w=a(0x1aad32b98),T=a(0x167bc3887),N=a(0x175eeece0),M=a(0x9b971e7e),R=a(0x1ccef1c6f),P=a(0x1cd12d16e),L=a(0x226892387),O=a(0x18476a827),D=a(0x1a1fb180c),F=a(0xa1d33e09),U=a(0x1e4ae349d),B=a(0x14149c126),H=a(0xb129c1d5),W=a(0x1d23c7f2c),V=a(0x1ee439e69),G=a(0x19895585a);let q=(0,n.forwardRef)((e,t)=>{let a,d,m,u,p,h,q,j=(0,r.wA)();n.useImperativeHandle(t,()=>({props:e}),[e]);let{user:z,userId:K,botId:$,botProfile:Y,triggerId:Q,size:Z,icons:J,emoji:X,team:ee,slackbotFeels:et,isSlackbotNotification:ea,isSlackbotAi:en,isSlackbotAiThinking:er,isUnknown:ei,showPresence:el,isExternal:eo,hasNoAccess:es,forceSlackbotNotification:ec,forceStandardSlackbotAvatar:ed,messageTs:em}=e,eu=null,ep=null,eh=X,{member:e_,bot:ef,memberIsHuman:eb}=(0,L.Z2)(e=>(0,O.Od)(e,{userId:K,botId:$,botProfile:Y})),{channelId:eg}=(0,n.useContext)(g.d),ey=(0,b.Y)(),{container:eA}=(0,n.useContext)(x.A),ex=z||K||ei,eE=ex?z||e_:void 0,eC=eE&&!eE.isUnknown&&!eE.is_unknown,ek=(0,L.d4)(e=>"on"===(0,B._Z)(e,"bot_team_id_from_member")),ev=(0,L.d4)(f.gT),eS=(0,L.d4)(f.FQ),eI=(0,L.d4)(_.rC)&&!ed,ew=(0,L.d4)(e=>!(0,R.ty)(e,"a11y_animations")),eT=(0,L.d4)(e=>(0,W.SW)(e,{messageTs:em,isSlackbotNotification:ea}));if(eC){let e;$||(h=ef?.id),e=ek?(0,w.dQ)(eE):(0,S.A)(eE)?(0,w.D5)(eE):(0,w.dQ)(eE);let t=(0,T.Ay)({size:Z,teamOrEnterpriseId:e,memberId:eE?.id,avatarHash:eE?.profile?.avatar_hash,slackbotFeels:et,isSlackbotNotification:ea,shouldShowLegacySlackbotRebranding:eI});eu=t?.imageUrl,ep=t?.imageUrl2x,a=eo||eE?.isExternal,d=eE?.is_restricted,m=eE.is_ultra_restricted,u=eE.id,p=(0,I.o)(eE)}q=(0,L.d4)(e=>eC&&a?(0,w.Ux)(e,eE):void 0);let eN=ex?void 0:J||Y&&Y.icons;if(!ex){if(ef){eN=eN||ef.icons;let e=(0,l.Cu)()?D.O:D.U;ef?.app_id===e&&(eN=ef?.icons||eN)}if(!eh&&eN&&(eh=eN.emoji),!eh){let e=(0,T.Ay)({size:Z,botImages:eN,isBot:!0});eu=e.imageUrl,ep=e.imageUrl2x}}q=(0,L.d4)(e=>ex?q:ee?.id||(0,C.s)(e,{bot:ef,botProfile:Y,botId:$})||void 0),a=(0,L.d4)(e=>ex?a:!!q&&q!==(0,M.Kc)(e));let eM=(0,L.d4)(e=>eC?(0,v.sE)(e,eE):ex?void 0:(0,E.Hg)(ef)),eR=(0,L.d4)(e=>{let t=eh&&q&&(0,U.ux)(e,{text:eh,teamId:q});if(!t&&eh&&q===(0,M.Kc)(e)){let a=(0,V.H7)(e),n=a&&a.id;n&&n!==q&&(t=(0,U.ux)(e,{text:eh,teamId:n}))}return t}),eP=(0,L.d4)(e=>el?(0,N.d)(e,K):void 0),eL=(0,L.d4)(e=>!!el&&(0,F.z)(e,K)),eO=K??u??"",eD=(0,L.d4)(e=>!!eO&&(0,H.a)(e,eO)),eF=(0,n.useCallback)(e=>j((0,P.U)(e)),[j]),eU=(0,n.useCallback)(e=>ey&&eg&&eA!==G.mq.Split?j((0,y.o)((0,A.sL)(e,eg,ey))):j((0,y.o)(e)),[j,ey,eg,eA]),eB=(0,n.useCallback)(e=>j((0,c.d)(e)),[j]);if(en&&!ew)return n.createElement(SlackbotThinkingAvatar,{size:Z,thinking:er??!1});if(ea&&(ev||ec))return n.createElement(s.u,{size:Z,showNotificationDot:eS&&eT});let eH=eb||ef&&!(0,k.v3)(ef)||Q;return n.createElement(o.f1,{...e,userId:K,imageUrl:eu||void 0,imageUrl2x:ep||void 0,botEmoji:eh,canRenderEmoji:!!eR,teamId:q,isRestricted:d,isUltraRestricted:m,isDeleted:p,memberOrBotName:eM,botId:h||$,disableLink:!eH,isExternal:a,isUserHidden:eD,userType:eP,isDnd:eL,isSlackbot:K===i.Q$,size:Z,openProfile:eF,navigate:eU,hasNoAccess:es,showPresence:el,triggerId:Q,maybeOpenInSurface:eB})}),j=n.memo(q);j.displayName="ConnectedAvatar";let z=j},0x1c659cbb1:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>i,RG:()=>r.RG,f1:()=>r.f1,fp:()=>r.fp});var n=a(0x1ec256990),r=a(0x7cf75cc8);let i=n.A},0x112e8a9c0:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee);function HiddenUserAvatar({className:e="",size:t,"data-qa":a}){return n.createElement("span",{className:i()(e,"c-hidden_user_avatar",{"c-hidden_user_avatar--small":16===t}),style:{width:`${t}px`,height:`${t}px`},"data-qa":a},n.createElement("span",{className:"c-hidden_user_avatar--icon"},n.createElement(l.Ah,{size:t<=24?"16":"24",name:"user-hide"})))}HiddenUserAvatar.displayName="HiddenUserAvatar";let o=n.memo(HiddenUserAvatar)},0x1e59f8138:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2501a2cee);let l=new r.Ay("members");function HiddenUserIconAndName(){return n.createElement("span",{className:"c-hidden_user_icon_and_name "},n.createElement(i.Ah,{name:"user-hide",inline:!0}),"\xa0",l.t("Name hidden"))}HiddenUserIconAndName.displayName="HiddenUserIconAndName";let o=n.memo(HiddenUserIconAndName)},0x57f4ed75:(e,t,a)=>{"use strict";a.d(t,{m:()=>UserHide48});var n=a(0xbad225b5);let UserHide48=({className:e})=>n.createElement("svg",{className:e,width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M18.8971 10.3883C17.6455 11.6382 16.8002 13.5167 16.8002 16.0153C16.8002 18.5532 17.8425 20.7735 19.3195 22.365C19.8878 22.9773 20.4974 23.4735 21.1096 23.8544C19.8353 25.5088 18.8984 27.4366 18.4022 29.5348C17.2213 29.8438 16.0444 30.2567 14.9279 30.7852C11.9899 32.1758 9.59993 34.2975 8.48898 37.3125C8.28982 37.853 8.40685 38.3386 8.7976 38.7709C9.22344 39.242 9.95904 39.6001 10.8002 39.6001H19.5263C20.1746 40.921 21.0115 42.1327 22.0018 43.2001H10.8002C8.99032 43.2001 7.26755 42.4469 6.12691 41.1849C4.95117 39.8842 4.39359 38.0148 5.11099 36.0679C6.64012 31.9179 9.87385 29.1945 13.3877 27.5313C14.8428 26.8426 16.3681 26.3238 17.8836 25.9526C17.4607 25.6016 17.058 25.2204 16.6808 24.8139C14.6579 22.6342 13.2002 19.5621 13.2002 16.0153C13.2002 12.6659 14.3548 9.83677 16.3532 7.84102C18.3449 5.85199 21.0661 4.80005 24.0002 4.80005C26.9342 4.80005 29.6554 5.85199 31.6471 7.84102C33.6455 9.83677 34.8002 12.6659 34.8002 16.0153C34.8002 16.7263 34.7416 17.4182 34.6316 18.0877C34.0957 18.0297 33.5513 18 33 18C32.305 18 31.6211 18.0473 30.9512 18.1388C31.1122 17.4628 31.2002 16.7524 31.2002 16.0153C31.2002 13.5167 30.3548 11.6382 29.1032 10.3883C27.8449 9.13173 26.0661 8.40005 24.0002 8.40005C21.9342 8.40005 20.1554 9.13173 18.8971 10.3883ZM33 40.8C37.3078 40.8 40.8 37.3078 40.8 33C40.8 31.4193 40.3298 29.9484 39.5216 28.7196L28.7196 39.5216C29.9484 40.3298 31.4193 40.8 33 40.8ZM26.2459 36.9041L36.9041 26.2459C35.7559 25.5807 34.4224 25.2 33 25.2C28.6922 25.2 25.2 28.6922 25.2 33C25.2 34.4224 25.5807 35.7559 26.2459 36.9041ZM33 44.4C39.296 44.4 44.4 39.296 44.4 33C44.4 26.704 39.296 21.6 33 21.6C26.704 21.6 21.6 26.704 21.6 33C21.6 39.296 26.704 44.4 33 44.4Z"}));UserHide48.displayName="UserHide48"},0x111061bc6:(e,t,a)=>{"use strict";a.d(t,{u:()=>SystemNotificationAvatar});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee),o=a(0x165e24b54),s=a.n(o);function SystemNotificationAvatar({size:e,iconSize:t="20",showNotificationDot:a=!1}){let r=(0,n.useMemo)(()=>void 0!==e&&e<Number(t)?"16":t,[e,t]);return n.createElement("span",{className:i()(s().container,{[s().xSmall]:16===e,[s().small]:20===e,[s().medium]:24===e})},n.createElement(l.Ah,{name:"notifications",size:r}),a&&n.createElement("div",{className:s().notificationDot}))}SystemNotificationAvatar.displayName="SystemNotificationAvatar"},0x46827f54:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0xb97b797e),i=a(0x1ebdf0db2),l=a(0x225941f71),o=a(0x25231d654),s=a(0x709dda87);let c=class extends n.PureComponent{static defaultProps={className:"",alpha:!1};constructor(e){super(e),this.state=this.getStateFromHex(e.value),(0,r.v)(this,["handleSVChange","handleHueChange","handleOpacityChange","getSaturationBrightness"])}getHexFromState(e){let{alpha:t}=this.props,{hue:a,saturation:n,brightness:r,opacity:i}=e,l=[a,n,r];return(0,s.Q3)(t?[...l,i]:l).substr(1)}getSaturationBrightness(){let{saturation:e,brightness:t}=this.state;return{saturation:e,brightness:t}}getStateFromHex(e){let{alpha:t}=this.props,[a,n,r,i]=(0,s.oH)(e);return{hue:a,saturation:n,brightness:r,opacity:t&&i?i:1}}handleChange(e){this.setState(t=>({...t,...e}),()=>{let e=this.getHexFromState(this.state);this.props.onChange(e)})}handleHueChange(e){this.handleChange({hue:e})}handleOpacityChange(e){this.handleChange({opacity:e})}handleSVChange({saturation:e,brightness:t}){this.handleChange({saturation:e,brightness:t})}maybeRenderOpacitySlider(){if(!this.props.alpha)return null;let{hue:e,saturation:t,brightness:a,opacity:r}=this.state,i=(0,s.Q3)([e,t,a]).slice(1);return n.createElement(l.A,{color:i,value:r,onChange:this.handleOpacityChange})}render(){let{className:e}=this.props,{hue:t}=this.state;return n.createElement("div",{className:e},n.createElement(o.A,{hue:t,value:this.getSaturationBrightness(),onChange:this.handleSVChange}),n.createElement(i.A,{value:t,onChange:this.handleHueChange}),this.maybeRenderOpacitySlider())}};c.displayName="HSVPicker";let d=c},0x1ebdf0db2:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x2414ac804);function HueSlider({value:e,onChange:t}){return n.createElement("span",{className:"c-color_slider"},n.createElement("span",{className:"c-color_slider__outer_hue_track"}),n.createElement("span",{className:"c-color_slider__inner_hue_track"}),n.createElement(r.A,{className:"c-color_slider__slider","data-qa":"hue_slider",min:0,max:359,step:1,value:e,onChange:t}))}HueSlider.displayName="HueSlider";let i=HueSlider},0x225941f71:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x2414ac804),i=a(0x709dda87);function OpacitySlider({color:e="FFFFFF",value:t,onChange:a}){let l=(0,n.useMemo)(()=>{let t;return{background:(t=(0,i.$2)(e,!1),`linear-gradient(to right,rgba(0,0,0,0),#${t})`)}},[e]),o=(0,n.useMemo)(()=>({background:`#${e}`}),[e]);return n.createElement("span",{className:"c-color_slider"},n.createElement("span",{className:"c-color_slider__opacity_checkerboard_track"}),n.createElement("span",{className:"c-color_slider__opacity_gradient_track",style:l}),n.createElement("span",{className:"c-color_slider__opacity_right_fill_track",style:o}),n.createElement(r.A,{className:"c-color_slider__slider","data-qa":"opacity_slider",min:0,max:1,step:.01,value:t,onChange:a}))}OpacitySlider.displayName="OpacitySlider";let l=OpacitySlider},0x25231d654:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xb97b797e),s=a(0x20482ad21),c=a(0x2343fde45),d=a(0x709dda87);let m=new s.Ay("color_picker"),u=class extends n.PureComponent{static defaultProps={hue:0,value:{saturation:0,brightness:1},onChange:l.A,onFocus:l.A,onBlur:l.A};top;left;isMouseDown;gradientBoxRef;constructor(e){super(e),this.state={width:160,height:160},this.top=0,this.left=0,this.isMouseDown=!1,this.gradientBoxRef=n.createRef(),(0,o.v)(this,["handleKeyDown","handleMouseDown","handleMouseUp","handleMouseMove","updateDimensions"])}componentDidMount(){requestAnimationFrame(this.updateDimensions)}componentDidUpdate(){requestAnimationFrame(this.updateDimensions)}componentWillUnmount(){this.removeDragListeners()}getAriaValue(){let{hue:e,value:t}=this.props,{saturation:a,brightness:n}=t,r=(0,d.Eq)([e,a,n]);return(0,d.Ob)(r)}addDragListeners(){window.addEventListener("mouseup",this.handleMouseUp),window.addEventListener("mousemove",this.handleMouseMove)}handleKeyDown(e){let t={ArrowUp:{saturationDelta:0,brightnessDelta:.01},ArrowDown:{saturationDelta:0,brightnessDelta:-.01},ArrowLeft:{saturationDelta:-.01,brightnessDelta:0},ArrowRight:{saturationDelta:.01,brightnessDelta:0}}[({Up:"ArrowUp",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight"})[e.key]||e.key];if(!t)return;e.stopPropagation(),e.preventDefault();let{saturationDelta:a,brightnessDelta:n}=t,{saturation:r,brightness:i}=this.props.value;this.updateValue({saturation:r+a,brightness:i+n})}handleMouseDown(e){this.isMouseDown=!0,this.addDragListeners(),this.handleMouseEvent(e)}handleMouseEvent(e){let{clientX:t,clientY:a}=e,{width:n,height:r}=this.state,i=t-this.left,l=a-this.top;this.updateValue({saturation:i/n,brightness:1-l/r})}handleMouseMove(e){this.isMouseDown&&this.handleMouseEvent(e)}handleMouseUp(){this.isMouseDown=!1,this.removeDragListeners()}removeDragListeners(){window.removeEventListener("mouseup",this.handleMouseUp),window.removeEventListener("mousemove",this.handleMouseMove)}updateDimensions(){if(this.gradientBoxRef.current){let{top:e,left:t,width:a,height:n}=this.gradientBoxRef.current.getBoundingClientRect();this.top=e,this.left=t,this.setState(()=>({width:a,height:n}))}}updateValue({saturation:e,brightness:t}){this.props.onChange({saturation:Number(Math.min(1,Math.max(0,e)).toFixed(2)),brightness:Number(Math.min(1,Math.max(0,t)).toFixed(2))})}renderAriaDescription(){let e=m.t("Use up and down to move the slider along the Y axis, left and right to move along the X axis.");return n.createElement("div",{id:"sv-picker-description",hidden:!0},e)}renderThumb(){let{width:e,height:t}=this.state,{saturation:a,brightness:r}=this.props.value,l=Math.min(1,Math.max(0,a)),o=Math.min(1,Math.max(0,r)),s=i()("c-sv_picker__thumb",{"c-sv_picker__thumb--focus-visible":this.props.hasKeyboardFocus}),c=m.t("color wheel"),d=this.getAriaValue();return n.createElement("span",{className:s,style:{left:l*e,top:(1-o)*t},role:"slider",tabIndex:0,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onKeyDown:this.handleKeyDown,"aria-describedby":"sv-picker-description","aria-label":c,"aria-valuenow":Number(d),"aria-valuetext":d})}render(){let{hue:e}=this.props,t=`linear-gradient(hsla(${e}, 100%, 100%, 0), hsla(${e}, 100%, 0%, 1)), linear-gradient(90deg, hsla(${e}, 0%, 100%), hsla(${e}, 100%, 50%))`;return n.createElement("div",{ref:this.gradientBoxRef,className:"c-sv_picker__gradient_box",style:{background:t},role:"presentation",onMouseDown:this.handleMouseDown,"data-qa":"sv_picker_gradient_box"},this.renderThumb(),this.renderAriaDescription())}};u.displayName="SVPicker";let p=(0,c.A)(u)},0x7cc399fd:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x1b3ecb90f),i=a(0x1b9d5cc0c),l=a(0x203cd5170),o=a(0x226892387),s=a(0xe684f705);function CustomStatusEmoji({memberId:e,className:t,emoji:a,emojiSize:c=r.lw.SMALL,showTooltips:d=!1,stopAnimations:m=!1}){let u=(0,o.d4)(t=>(0,s.nv)(t,e));if(!u||!a)return;let p=(0,i.q4)(u),h=(0,l.H)(a,p);return n.createElement(r.Ay,{className:t,emojiSize:c,iconInTextMode:!0,isEmojiInlineWithText:!0,showTooltip:d,stopAnimations:m,text:h.name,url:h.url})}CustomStatusEmoji.displayName="CustomStatusEmoji";let c=n.memo(CustomStatusEmoji)},0x248d2fb56:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x13776886e),i=a(0x20482ad21),l=a(0x1c91944c9),o=a(0x1ccef1c6f),s=a(0x1e14b8ab8);let c=new i.Ay("current_status");function CustomStatusExpiration({className:e,expiration:t,time24:a}){if(!t)return null;let i=c.t("Until {expirationDate}",{expirationDate:(0,r.A)(1e3*t,"{status_expiration}",{do24hrTime:a,shouldCapitalize:!1})});return n.createElement("span",{className:e,"data-qa-status-expiration":t},i)}function mapStateToProps(e,{memberId:t}){return{expiration:(0,s.A)(e,t||"")||0,time24:!!(0,o.ty)(e,"time24")}}CustomStatusExpiration.displayName="CustomStatusExpiration";let d=(0,l.N)(mapStateToProps)(CustomStatusExpiration)},0x2338b8604:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x1b3ecb90f),i=a(0x15a4ffb05),l=a(0x1b9d5cc0c),o=a(0x226892387),s=a(0xe684f705);function CustomStatusText({memberId:e,className:t,emojiSize:a,showTooltips:c,stopAnimations:d,text:m}){let u=(0,o.d4)(t=>(0,s.nv)(t,e));if(!m)return;let p=(0,l.q4)(u);return n.createElement("span",{className:t,"data-qa":"custom_status_text"},n.createElement(i.A,{text:m,inputIsEscaped:!0,emojiSize:a||r.lw.MEDIUM,showTooltips:!!c,stopAnimations:!!d,emojiDisplayInfo:p}))}CustomStatusText.displayName="CustomStatusText";let c=n.memo(CustomStatusText)},0x40bfc888:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x4c96e5d9),o=a(0x7cc399fd),s=a(0x248d2fb56),c=a(0x2338b8604),d=a(0x1b3ecb90f),m=a(0x1b9d5cc0c),u=a(0x203cd5170),p=a(0x226892387),h=a(0xe684f705),_=a(0x1b32efd32);let CustomStatusTooltipContent=({stopAnimations:e=!1,noText:t=!1,className:a,memberId:r="",showEmojiTooltip:l=!1,insertTextSpacing:s=!1,displayInMemberProfile:f=!1,displayEmojiTextAsFallbackIfNoText:b=!1,emoji:g})=>{let y=(0,p.d4)(e=>(0,_.A)(e,r)),A=(0,p.d4)(e=>(0,h.nv)(e,r)),x=b&&!y&&!t&&!f,E=g;if(x){let e=(0,m.q4)(A),t=(0,u.H)(g,e);t&&(E=t.name)}if(f){let s=(0,m.fy)(A);return n.createElement("span",{className:a},n.createElement(o.A,{memberId:r,emoji:g,stopAnimations:e,showTooltips:l,emojiSize:d.lw.MEDIUM,className:"c-custom_status__emoji_in_member_profile"}),y&&n.createElement(c.A,{memberId:r,className:i()("margin_left_50","padding_right_50",{margin_right_100:s}),emojiSize:d.lw.SMALL,stopAnimations:e,text:t?"":y}))}return n.createElement("span",{className:a},n.createElement(o.A,{memberId:r,showTooltips:l,emojiSize:d.lw.SMALL,emoji:g,stopAnimations:e}),y&&n.createElement(c.A,{memberId:r,className:s?"margin_left_50":"margin_left_25",emojiSize:d.lw.SMALL,stopAnimations:e,text:t?"":y}),x&&E&&n.createElement("span",{className:s?"margin_left_50":"margin_left_25"},E))};CustomStatusTooltipContent.displayName="CustomStatusTooltipContent";let f=n.memo(CustomStatusTooltipContent);var b=a(0xc4a84715);let CustomStatus=({animated:e=!1,tooltip:t=!0,tipPosition:a,noText:r=!1,className:c,memberId:m="",showEmojiTooltip:u=!1,insertTextSpacing:h=!1,displayInMemberProfile:_=!1,fallback:g})=>{let y=(0,p.d4)(e=>(0,b.A)(e,m)),A=(0,n.useCallback)(()=>n.createElement(n.Fragment,null,n.createElement(f,{className:"c-custom_status__tooltip",noText:r,memberId:m,showEmojiTooltip:u,insertTextSpacing:h,displayInMemberProfile:_,emoji:y,displayEmojiTextAsFallbackIfNoText:!0}),n.createElement(s.A,{className:"c-custom_status__expiration c-tooltip__subtitle",memberId:m})),[m,r,u,h,_,y]);return y?t?n.createElement(l.Ay,{tip:A,position:a,zIndex:"above_fs","data-qa":"custom_status_tooltip"},n.createElement("span",{className:i()("c-custom_status",c),"data-qa":"custom_status","data-stringify-ignore":!0},n.createElement(o.A,{memberId:m,showTooltips:!1,emojiSize:d.lw.SMALL,emoji:y,stopAnimations:!e}))):n.createElement(f,{className:i()(c,"c-custom_status","c-custom_status--inline",{display_flex:_}),"data-stringify-ignore":!0,stopAnimations:!e,noText:r,memberId:m,showEmojiTooltip:u,insertTextSpacing:h,displayInMemberProfile:_,emoji:y}):g||null};CustomStatus.displayName="CustomStatus";let g=n.memo(CustomStatus)},0x18bf902cb:(e,t,a)=>{"use strict";a.d(t,{A:()=>M});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x4c96e5d9),o=a(0x1b3ecb90f),s=a(0x34e1a173),c=a(0x16cf1da63),d=a(0x20482ad21),m=a(0x11a296110),u=a(0x2501a2cee),p=a(0x1a02c72b5),h=a(0xd6a16321),_=a(0xd66cda03),f=a(0x12185e091),b=a(0x1b9d5cc0c),g=a(0x1591157c4),y=a(0x226892387),A=a(0x217553e42),x=a(0x7b0b485),E=a(0xf9cb31c6),C=a(0x21c11a1dc),k=a(0x475fe7d6),v=a(0x1b02505ff),S=a(0xe684f705);let I=new d.Ay("huddles"),HuddleStatusIcon=({memberId:e,huddleChannelId:t,className:a,size:r,allowJoin:l=!1,viewContext:s,currentChannelId:d})=>{let w=(0,c.wA)(),T=(0,y.d4)(t=>{let a=(0,S.nv)(t,e);return(0,b.fy)(a)}),N=(0,y.d4)(e=>{let a=t?(0,A.OL)(e,t):null;return!!a&&!(0,f.t8)(a)&&!(0,f.QR)(a)}),M=(0,y.d4)(e=>{let a=t?(0,A.OL)(e,t):null;return!!a&&(0,f.LI)(a)&&!T&&"sidebar"===s}),R=(0,y.d4)(E.Ie),P=(0,y.d4)(e=>!!(t&&(0,g.A)())&&!!(0,C.Yw)(e,t)),L=(0,g.A)()?(0,_.cw)(x.hc):void 0,O=!T&&l&&t!==L&&N&&P,D=(0,n.useCallback)(()=>{O&&t&&(w((0,k.A)({channelId:t,entryPoint:v.su.HUDDLE_STATUS_BUTTON})),w((0,p.o)((0,h.pr)(t))))},[O,t,w]);if(!R||M)return null;let F=O?m.Nm:"div";return n.createElement(F,{onClick:D,className:i()("p-huddle_status_icon",a,{"p-huddle_status_icon--joinable":O,"p-huddle_status_icon--medium":r===o.lw.Medium,"p-huddle_status_icon--other":t!==d,"p-huddle_status_icon--no_theme":"sidebar"!==s})},n.createElement(u.Ah,{name:"headphones"}),O&&n.createElement("span",{className:"p-huddle_status_icon__label"},I.t("JOIN")))};HuddleStatusIcon.displayName="HuddleStatusIcon";let w=n.memo(HuddleStatusIcon);var T=a(0x1e5a5a10a),N=a(0x140b65eaf);let HuddleStatus=({tooltip:e=!0,tipPosition:t,noText:a=!1,className:r,memberId:c="",insertTextSpacing:d=!1,displayInMemberProfile:m=!1,isInteractive:u=!1,viewContext:p,currentChannelId:h})=>{let _=(0,y.d4)(e=>(0,N.A)(e,c)),f=(0,y.d4)(e=>(0,b.fy)((0,S.nv)(e,c))),A=(0,y.d4)(E.Ie),x=(0,n.useCallback)(({emojiSize:e})=>A&&_?n.createElement(w,{memberId:c,size:e,huddleChannelId:_,allowJoin:u,viewContext:p,currentChannelId:h}):null,[A,_,c,u,p,h]),C=(0,n.useCallback)(e=>m?n.createElement("span",{className:e},x({emojiSize:o.lw.MEDIUM}),A&&_&&!a&&n.createElement(T.A,{channelId:_,displayInMemberProfile:m,className:i()("margin_left_50","padding_right_50",{margin_right_100:f})})):n.createElement("span",{className:e},x({emojiSize:o.lw.SMALL}),A&&_&&!a&&n.createElement(T.A,{channelId:_,className:d?"margin_left_50":"margin_left_25"})),[m,A,x,_,d,f,a]),k=(0,n.useCallback)(()=>n.createElement(n.Fragment,null,A&&_&&(0,g.A)()&&n.createElement(s.z,{channelId:_}),C("c-custom_status__tooltip")),[A,C,_]);return A&&_?e?n.createElement(l.Ay,{tip:k,position:t,zIndex:"above_fs","data-qa":"custom_status_tooltip"},n.createElement("span",{className:i()("c-custom_status",r),"data-qa":"custom_status"},x({emojiSize:o.lw.SMALL}))):C(i()(r,"c-custom_status","c-custom_status--inline",{display_flex:m})):null};HuddleStatus.displayName="HuddleStatus";let M=n.memo(HuddleStatus)},0x29f0e1ee:(e,t,a)=>{"use strict";a.d(t,{A:()=>i,j:()=>r.A});var n=a(0x40bfc888),r=a(0x248d2fb56);let i=n.A},0x1ebfa1009:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>c,Xg:()=>o,YC:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let l={TopLeft:"top-left",Top:"top",TopRight:"top-right",BottomLeft:"bottom-left",Bottom:"bottom",BottomRight:"bottom-right",LeftTop:"left-top",Left:"left",LeftRight:"left-bottom",RightTop:"right-top",Right:"right",RightBottom:"right-bottom"},o=["top-left","top","top-right","bottom-left","bottom","bottom-right","left-top","left","left-bottom","right-top","right","right-bottom"],s=class extends n.PureComponent{anchorRef=n.createRef();constructor(e){super(e)}componentDidMount(){this.forceUpdate()}render(){let{children:e,coachmarkAnchorClassNames:t,coachmarkElement:a,orientation:r,style:l}=this.props,o=i()("c-coachmark-anchor",t);return n.createElement("div",{id:"c-coachmark-anchor",ref:this.anchorRef,className:o,style:l},e,a&&n.cloneElement(a,{anchorElement:this.anchorRef.current,orientation:r}))}};s.displayName="DeprecatedCoachmarkAnchor";let c=s},0x1fe44d86d:(e,t,a)=>{"use strict";a.d(t,{nf:()=>O,Ay:()=>D});var n=a(0xbad225b5),r=a(0x1853f0e7c),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x125763ad),c=a(0x217f0c263),d=a(0x1cf587e0a),m=a(0xe78822f2),u=a(0x1229d92d),p=a(0x40c0d834),h=a(0x6affae29),_=a(0xb97b797e),f=a(0x20482ad21),b=a(0x224f7f0e9),g=a(0x5739d664),y=a(0x12edaa96a),A=a(0x344bb842),x=a(0x1faa3f1ac),E=a(0x22097256c),C=a(0x2501a2cee),k=a(0x102edf836);let v=class extends n.PureComponent{buttonRef=n.createRef();constructor(e){super(e),this.focusOnButton=this.focusOnButton.bind(this)}componentDidMount(){this.focusOnButton()}focusOnButton(){this.buttonRef.current&&this.buttonRef.current.focus()}render(){let{children:e,...t}=this.props;return n.createElement(k.Ay,{ref:this.buttonRef,"data-qa":"coachmark_close_button",...t},e)}};v.displayName="DeprecatedCoachmarkCloseButton";var S=a(0x1d9716add),I=a(0x303eaaff),w=a(0x804abac1),T=a(0x3711e82d),N=a(0x1ec68d6a3);let M=new f.Ay("generic_dialog"),R=(0,g.A)(e=>({qa:e})),P=(0,g.A)((e,t)=>({overlay:e,content:t}),2),L=(0,g.A)(e=>[{elementName:`${e}_close_coachmark_button`,action:T.UiAction.CLOSE,onClick:{enableClogAction:!0}},{elementName:`${e}_secondary_cta`,onClick:{enableClogAction:!0}},{elementName:`${e}_primary_cta`,onClick:{enableClogAction:!0}}]),stopPropagation=e=>{e.stopPropagation()},maybeStopPropagation=e=>{e?.keyCode===b.wn&&e.stopPropagation()},O=[10,20,30,40,50,60,70,80,90,95];let DeprecatedBaseCoachmark=class DeprecatedBaseCoachmark extends n.PureComponent{static defaultProps={arrowPosition:50,closeCoachmark:o.A,qa:"coachmark",offsetX:0,offsetY:0,onClickPrimaryButton:o.A,onClickSecondaryButton:o.A,onClickTertiaryButton:o.A,primaryCallToActionType:"primary",secondaryCallToActionType:"outline",centerOnArrow:!1,autoClogProps:{elementName:"unset"},isMegaphoneCoachmark:!0,shouldCloseOnOverlayClick:!0,isModal:!1,enableSectionNavigation:!0};static contextType=d.$;id;contentRef=n.createRef();intervalId;lastAnchorPosition;lastWindowWidth;constructor(e){super(e),this.id=`Coachmark_${(0,y.A)()}`,(0,_.v)(this,["maybeUpdateCoachmarkPosition","onAfterOpen"])}componentDidMount(){this.props.isOpen&&(this.maybeUpdateCoachmarkPosition(),this.pollForChangesToAnchorPosition()),this.props.isMegaphoneCoachmark&&!this.context.isInMegaphoneContainerContext&&(0,m.b)(m.r.DeprecatedCoachmark,(0,N.Wo)())}componentDidUpdate(e){this.props.isOpen&&this.maybeUpdateCoachmarkPosition(),!e.isOpen&&this.props.isOpen&&this.pollForChangesToAnchorPosition(),e.isOpen&&!this.props.isOpen&&this.maybeClearInterval()}componentWillUnmount(){this.maybeClearInterval()}onAfterOpen(){let{anchorElement:e,onAfterOpen:t}=this.props;e&&t?.(e)}maybeClearInterval(){this.intervalId&&clearInterval(this.intervalId)}pollForChangesToAnchorPosition(){this.intervalId=this.props.windowRef.deref()?.setInterval(this.maybeUpdateCoachmarkPosition,50)}maybeUpdateCoachmarkPosition(){let{anchorElement:e,forceCoachmarkRefurbish:t,windowRef:a}=this.props;if(!e)return;let n=e.getBoundingClientRect(),r=a.deref()?.innerWidth||0;(!this.lastAnchorPosition||this.lastWindowWidth!==r||n.x!==this.lastAnchorPosition.x||n.y!==this.lastAnchorPosition.y||t&&(n.width!==this.lastAnchorPosition.width||n.height!==this.lastAnchorPosition.height))&&(this.lastAnchorPosition=n,this.lastWindowWidth=r,this.forceUpdate())}getComputedStyles(e,t){let{offsetX:a,offsetY:n,centerOnArrow:r,forceCoachmarkRefurbish:i,windowRef:l}=this.props,o=l.deref(),s=o?o.scrollX||o.pageXOffset:0,c=o?o.scrollY||o.pageYOffset:0,d=o?.innerWidth||0,m=o?.innerHeight||0,u={};if(i){switch(t){case"top-left":u.left=e.left+a,u.top=e.top-20+n;break;case"top":u.left=e.left+a,u.top=e.top-20+n,r&&(u.left+=e.width/2);break;case"top-right":u.left=e.left+a,u.top=e.top-20+n,r&&(u.left+=e.width);break;case"bottom-left":u.left=e.left+a,u.top=e.top+e.height+20+n;break;case"bottom":u.left=e.left+a,u.top=e.top+e.height+20+n,r&&(u.left+=e.width/2);break;case"bottom-right":u.left=e.left+a,u.top=e.top+e.height+20+n,r&&(u.left+=e.width);break;case"left-top":u.left=e.left+a+20,u.top=e.top+n;break;case"left":u.left=e.left+a+20,u.top=e.top+e.height/2+n;break;case"left-bottom":u.left=e.left+a+20,u.top=e.top+e.height+n;break;case"right-top":u.left=e.left+e.width+20+a,u.top=e.top+n;break;case"right":u.left=e.left+e.width+20+a,u.top=e.top+e.height/2+n;break;case"right-bottom":u.left=e.left+e.width+20+a,u.top=e.top+e.height+n;break;default:(0,h.Kh)(t)}return u}switch(t){case"top":u.left=e.left+s+a,u.top=e.top+c-e.height+n,r&&(u.left+=e.width/2);break;case"bottom":u.left=e.left+s+a,u.top=e.top+c+e.height+20+n,r&&(u.left+=e.width/2);break;case"right":u.left=e.left+s+e.width+20+a,u.top=e.top+c+e.height/2+n;break;case"left":u.left=e.left+s+a,u.top=e.top+c+e.height/2+n;break;case"bottom-left":u.right=d-e.right+a,u.top=e.top+c+e.height+20+n;break;case"top-left":u.right=d-e.right+a,u.bottom=m-e.top+n,r&&(u.left+=e.width/2);break;case"left-top":u.left=e.left+s+a,u.top=e.top+n}return u}renderModalContent(){let{children:e,closeCoachmark:t,isOpen:a,onClickPrimaryButton:r,onClickSecondaryButton:i,onClickTertiaryButton:l,primaryCallToActionText:s,secondaryCallToActionText:c,tertiaryCallToActionText:d,primaryCallToActionType:m,secondaryCallToActionType:u,autoClogProps:p,contentLabel:h,labelledby:_,describedby:f,hideCloseButton:b,enableSectionNavigation:g}=this.props,y=d||c||s,[E,k,T]=L(p?.elementName),N=n.createElement(S.A,null,!b&&n.createElement(A.A,{className:"c-coachmark__close",onClick:t,"aria-label":M.t("Close"),"data-qa":"close_coachmark_button",autoClogProps:E,autoFocus:!!(h||_||f)&&!y},n.createElement(C.Ah,{name:"close",size:"20"})),e,y&&n.createElement("div",{className:"c-coachmark__footer"},d&&n.createElement(n.Fragment,null,n.createElement(x.A,{onClick:l,"data-action-type":"tertiary"},d),n.createElement("div",{className:"flex_one"})),c&&n.createElement(v,{onClick:i,type:u,className:"margin_right_75","data-action-type":"secondary",autoClogProps:k},c),s&&n.createElement(v,{onClick:r,type:m,"data-action-type":"primary",autoClogProps:T},s)));return n.createElement(I.A,{id:this.id,index:w.A.SECONDARY_VIEW+.1,focusFn:o.A,onFocus:stopPropagation,enableSectionNavigation:g&&a,onKeyDown:maybeStopPropagation},N)}render(){let{anchorElement:e,arrowPosition:t,closeCoachmark:a,coachmarkClassNames:i,overlayClassNames:o,modalBodyOpenClassNames:d,qa:m,isOpen:u,orientation:h,centerOnArrow:_,style:f,overlayStyle:b,autoClogProps:g,contentLabel:y,labelledby:A,describedby:x,forceCoachmarkRefurbish:C,UNSAFE_parentSelector:k,shouldCloseOnOverlayClick:v,isModal:S,arrowColor:I}=this.props;if(!u||!e||!this.lastAnchorPosition)return null;let w=l()("c-coachmark",`c-coachmark--${h}`,{"c-coachmark--center_on_arrow":_,"c-coachmark--refurbish":C},i),T=l()("c-coachmark__overlay",o),N=l()(d),M=this.getComputedStyles(this.lastAnchorPosition,h),L=(0,s.A)({},M,f,{...t&&{"--arrow-position":`${t}%`},...I&&{"--arrow-color":(0,r.HK)(I)}}),O=(0,s.A)({position:"fixed",inset:0,backgroundColor:"transparent",zIndex:1e3},b),D={...g};return delete D.elementName,n.createElement(n.Fragment,null,n.createElement(p.A,{disableValidationWarnings:!0,enableClogImpressionOffScreen:!0,clogImpression:u,...D},n.createElement(c.A,{data:R(m),className:w,isOpen:u,onRequestClose:a,overlayClassName:T,bodyOpenClassName:N,ref:this.contentRef,shouldCloseOnEsc:!0,style:P(O,L),contentLabel:y,ariaHideApp:S,aria:{labelledby:A,describedby:x,modal:S},onAfterOpen:this.onAfterOpen,parentSelector:k,shouldCloseOnOverlayClick:v},this.renderModalContent())),n.createElement(E.J,{isOverlayOpen:u}))}};DeprecatedBaseCoachmark.displayName="DeprecatedBaseCoachmark";let D=(0,u.A)(DeprecatedBaseCoachmark)},0x1e5781b84:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x82980ab8),l=a(0x2378cf6ec),o=a(0x21d85d6e5),s=a(0x226892387),c=a(0xb129c1d5);let d=new r.Ay("files"),MemberName=({id:e,member:t,skipPrefCompliance:a,showMemberNameIfHidden:r=!1,isChannelFiles:m=!1,...u})=>{let p,h=(0,s.d4)(t=>(0,c.a)(t,e)),_=(0,s.d4)(e=>(0,o.sE)(e,t,!1,!1,!r)),f=(0,s.d4)(t=>(0,l.I)(t,e,!1,!1,!1,!r));if(p=a?(0,i.wg)(t):!r&&h?d.t("Name hidden"):t?_:f,m){let e=p;p=d.t("Shared by {memberName}",{memberName:e})}return n.createElement("span",u,p)};MemberName.displayName="MemberName";let m=MemberName},0x2d42cbee:(e,t,a)=>{"use strict";a.d(t,{A:()=>w});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x2bba3a0),s=a(0x2286acf6c),c=a(0x5a37951),d=a(0x77727995),m=a(0x22ba45688),u=a(0x18082cf3c),p=a(0x8601851c),h=a(0x1229d92d),_=a(0xd6ba6894),f=a(0xb97b797e),b=a(0x20482ad21),g=a(951303e3),y=a(0x1fc4d7d9f),A=a(0xb1ea448c),x=a(0x2469ec64e),E=a(0x1b3ecb90f),C=a(0x15a4ffb05),k=a(0x1c91944c9);let v=new b.Ay("form"),S="above-target",I=class extends y.B{static defaultProps={autoSelectFirstOption:!1,"aria-activedescendant":void 0,"data-qa":"options_list",emptyStateMessage:void 0,isAlwaysOpen:!1,maxListHeight:240,onActiveOptionUpdated:l.A,onOptionSelected:l.A,onScroll:l.A,optionClassName:void 0,optionGroups:void 0,options:void 0,optionsRowHeight:28,selectId:void 0,useFullWidthOptions:!1,value:void 0,hasFocus:!1,windowRef:(0,g.O)(_.J)};isMouseMoveEnabled=!0;listRows=[];list=null;listContainer=null;keyCommands;debouncedEnableMouseMove;debouncedOnScroll;_initialPosition;constructor(e){super(e),this.buildListRowsCache(this.props);let t=null;if(this.props.autoSelectFirstOption)t=0;else if(this.props.value){const e=(0,o.A)(this.listRows,e=>"option"===e.type&&e.option.value===this.props.value);e>=0&&(t=e)}this.state={activeRowIndex:t},(0,f.v)(this,["onKeyPressedDown","onKeyPressedEnter","onKeyPressedUp","onMouseLeftOption","onScroll","renderRow"]),this.debouncedEnableMouseMove=(0,s.A)(this.enableMouseMove,200),this.debouncedOnScroll=(0,s.A)(this.onScroll,200)}componentDidMount(){this.keyCommands=this.initKeyCommands(),this.sizeAndPosition(),this.list&&"number"==typeof this.state.activeRowIndex&&(this.list.forceUpdateGrid(),this.list.scrollToRow(this.state.activeRowIndex)),this.props.hasFocus&&this.listContainer&&this.listContainer.focus()}componentDidUpdate(e,t){let{activeRowIndex:a}=this.state,{onActiveOptionUpdated:n}=this.props;if(this.buildListRowsCache(this.props),this.sizeAndPosition(),t.activeRowIndex!==a){let e=this.listRows[a??0];n?.(e)}}componentWillUnmount(){this.keyCommands&&this.keyCommands.reset()}clearActive(){this.setState(()=>({activeRowIndex:null})),this.list&&this.list.forceUpdateGrid()}onKeyPressedDown=(e,t)=>{this.isMouseMoveEnabled=!1;let a=this.getNextActiveRowIndex(this.state.activeRowIndex);this.setState(()=>({activeRowIndex:a})),this.debouncedEnableMouseMove(),this.list&&(this.list.forceUpdateGrid(),this.list.scrollToRow(a))};onKeyPressedEnter=(e,t)=>{let a=this.listRows[this.state.activeRowIndex??0];a&&"option"===a.type&&this.props.onOptionSelected?.(a.option,e)};onKeyPressedUp=(e,t)=>{this.isMouseMoveEnabled=!1;let a=this.getPreviousActiveRowIndex(this.state.activeRowIndex);this.setState(()=>({activeRowIndex:a})),this.debouncedEnableMouseMove(),this.list&&(this.list.forceUpdateGrid(),this.list.scrollToRow(a))};onMouseEnteredOption(e){this.isMouseMoveEnabled&&(this.setState(()=>({activeRowIndex:e})),this.list&&this.list.forceUpdateGrid())}onMouseLeftOption(){this.isMouseMoveEnabled&&this.clearActive()}onOptionClicked=(e,t)=>{this.isMouseMoveEnabled&&this.props.onOptionSelected?.(e,t)};createOptionClickHandler=e=>t=>{this.onOptionClicked(e,t)};createOptionMouseEnterHandler=e=>()=>{this.onMouseEnteredOption(e)};onScroll(e){this.props.onScroll?.(e)}buildListRowsCache({options:e,optionGroups:t}){this.listRows=[],t?this.listRows=(0,c.A)(t.map(e=>[...e.isPlaceholder?[]:[{type:"group",group:e}],...(e.options||[]).map(e=>({type:"option",option:e}))])):e&&(this.listRows=e.map(e=>({type:"option",option:e})))}setListRef=e=>{this.list=e};setListContainerRef=e=>{this.listContainer=e};initKeyCommands(){let e=new p.A;return e.bindAll([{keys:["down"],handler:this.onKeyPressedDown},{keys:["enter"],handler:this.onKeyPressedEnter},{keys:["up"],handler:this.onKeyPressedUp}]),e}getDataQaTag({value:e}){let{"data-qa":t="options_list"}=this.props,a=e.replace(/[^\w\s]/g,"").replace(/\s/g,"_");return`${t}_option_${a}`}getNextActiveRowIndex(e){if(null===e)return 0;let t=e+1;for(;this.listRows[t]&&"option"!==this.listRows[t].type;)t+=1;return this.listRows[t]?t:0}getPreviousActiveRowIndex(e){let t=null===e?-1:e-1;for(;this.listRows[t]&&"option"!==this.listRows[t].type;)t-=1;return this.listRows[t]?t:this.listRows.length-1}enableMouseMove(){this.isMouseMoveEnabled=!0}sizeAndPosition(){let e;if(!this.listContainer)return;Object.assign(this.listContainer.style,{height:null});let{isAlwaysOpen:t}=this.props,{bottom:a,offsetBottom:n,offsetTop:r,left:i,top:l,width:o,height:s,relativeBottom:c,relativeLeft:d,relativeTop:m}=this.props.targetMeasurements,u=this.props.windowRef.deref();if(!u)return;let{marginBottom:p,marginTop:h}=u.getComputedStyle(this.listContainer),_=parseFloat(h)+parseFloat(p),f=this.listContainer.offsetHeight+_,b=l-r,g=u.innerHeight-a-n,y=f<g,A={left:`${t?d:i}px`,width:`${o}px`};if(this._initialPosition)e=this._initialPosition;else{e=b>g&&!y?S:"below-target";let{options:t,optionGroups:a}=this.props;(t&&t.length||a&&a.length)&&(this._initialPosition=e)}if(e===S){let e=Math.min(f,b)-_;t?(A.top=void 0,A.bottom=`${m}px`,A.height=`${Math.min(f,b)-_}px`):(A.bottom=void 0,A.top=`${l-e-_}px`,A.height=`${e}px`)}else{let e=Math.min(f,g)-_;t?(A.bottom=void 0,A.top=`${c}px`,A.height=`${Math.min(f,g)-_}px`):(A.bottom=void 0,A.top=`${l+_+s}px`,A.height=`${e}px`)}Object.assign(this.listContainer.style,A)}getEmptyStateMessage(){return this.props.emptyStateMessage||v.t("No items")}renderEmptyState(){let{pillarClassName:e}=this.props,t=i()("c-input_select_options_list__empty_state",{[`${e}_options_list__empty_state`]:e});return n.createElement("div",{className:t},this.getEmptyStateMessage())}renderGroupRow(e,t,a){let{pillarClassName:r}=this.props,{label:l}=a,o=i()("c-input_select_options_list__option_group_label",{[`${r}__option_group_label`]:r});return n.createElement("div",{className:o,key:e,style:t,"data-qa":"option-group"},l)}renderList(){let{maxListHeight:e,optionsRowHeight:t=28,useFullWidthOptions:a}=this.props,r=e||240,l=this.listRows.length*t,o=i()("c-input_select_options_list__virtualized_list",{"c-input_select_options_list__virtualized_list--full-width":a});return n.createElement(u.B8,{className:o,"aria-label":"",containerRole:"presentation",height:l<r?l:r,noRowsRenderer:this.renderEmptyState,onScroll:this.debouncedOnScroll,ref:this.setListRef,role:"presentation",rowCount:this.listRows.length,rowHeight:t,rowRenderer:this.renderRow,width:this.props.targetMeasurements.width-2,tabIndex:null})}renderListBody(){return this.props.isLoading?this.renderLoadingState():this.listRows&&this.listRows.length&&(this.listRows.length>1||!(0,d.A)(this.listRows[0],"option.isPlaceholder"))?this.renderList():this.renderEmptyState()}renderLoadingState(){let e=v.t("Loading results\u2026");return n.createElement("div",{className:"c-input_select_options_list__loading_state"},n.createElement(A.A,{size:"medium",inline:!0}),n.createElement("div",{className:"c-input_select_options_list__loading_state_message"},e))}renderOptionBody({label:e,description:t}){return(0,n.isValidElement)(e)?e:n.createElement(n.Fragment,null,n.createElement(C.A,{text:"string"==typeof e?e:"",inputIsEscaped:!0,showTooltips:!1,emojiSize:E.lw.MEDIUM}),!!t&&n.createElement("span",{className:"c-input_select_options_list__option_description"},n.createElement(C.A,{text:t||"",inputIsEscaped:!0,showTooltips:!1,emojiSize:E.lw.MEDIUM})))}renderOptionRow(e,t,a,r){let{optionClassName:l,pillarClassName:o,selectId:s,value:c}=this.props,{isPlaceholder:d,value:m}=r,u=this.listRows[this.state.activeRowIndex??0],p=u&&"option"===u.type&&u.option===r,h=m===c,_=i()("c-input_select_options_list__option",{"c-input_select_options_list__option--active":p,"c-input_select_options_list__option--placeholder":d,"c-input_select_options_list__option--selected":h},{[`${o}__option`]:o,[`${o}__option--active`]:p&&o,[`${o}__option--placeholder`]:d&&o,[`${o}__option--selected`]:h&&o},l);return n.createElement("div",{"aria-selected":p,className:_,"data-qa":this.getDataQaTag(r),id:s?(0,x.Es)(s,m):void 0,key:t,style:a,onClick:this.createOptionClickHandler(r),onMouseEnter:this.createOptionMouseEnterHandler(e),onMouseLeave:this.onMouseLeftOption,role:"option",tabIndex:-1,"data-is-active":p},this.renderOptionBody(r))}renderRow({index:e,key:t,style:a}){let n=this.listRows[e];return n&&"group"===n.type?this.renderGroupRow(t,a,n.group):n&&"option"===n.type?this.renderOptionRow(e,t,a,n.option):null}renderOptionsList(){let{pillarClassName:e,selectId:t,"aria-label":a,"aria-activedescendant":r}=this.props,l=i()("c-input_select_options_list_container",{"c-input_select_options_list_container--grouped":!!this.props.optionGroups,"c-input_select_options_list_container--always-open":this.props.isAlwaysOpen},{[`${e}_container--grouped`]:!!this.props.optionGroups&&e,[`${e}_container--always-open`]:this.props.isAlwaysOpen&&e}),o=i()("c-input_select_options_list",{[`${e}_options_list`]:e});return n.createElement("div",{"aria-label":a,"aria-activedescendant":r,id:t?(0,x.Es)(t,"listbox"):void 0,className:l,ref:this.setListContainerRef,role:"listbox",tabIndex:-1},n.createElement("div",{className:o,role:"presentation"},this.renderListBody()))}render(){let{isAlwaysOpen:e}=this.props;if(e)return this.renderOptionsList();let t=this.props.windowRef.deref();return t?(0,m.createPortal)(this.renderOptionsList(),t.document.body):this.renderOptionsList()}};I.displayName="DeprecatedOptionsList";let w=(0,k.N)(null,()=>({}),null,{forwardRef:!0})((0,h.A)(I))},0x696b26ef:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x2286acf6c),l=a(0xb97b797e),o=a(0x20482ad21),s=a(0x1c271979d);let c=new o.Ay("form"),d=class extends n.Component{static defaultProps={minQueryLength:0,optionsFetcher:void 0,prefetchOptions:!1,onClose:r.A,selectPlaceholder:void 0,isDisabled:!1,logSelectElementMenuOpen:r.A,value:void 0,selectedOption:void 0};select=null;pendingFetch;fetchOptions;constructor(e){super(e),this.state={isLoading:!e.minQueryLength,optionGroups:null,options:[]},(0,l.v)(this,["getOptionsListEmptyMessage","setRef","onSelectClosed","onSelectFilterInputedChanged","onSelectOpened","resetState","shouldPrefetchOptions","focusSelectInput","isValidOption","preserveSelectedOption"]),this.fetchOptions=(0,i.A)(this.fetchOptionsInternal,300,{leading:!0})}componentDidMount(){this.shouldPrefetchOptions()&&!this.props.isDisabled&&this.fetchOptions()}componentDidUpdate(e){e.optionsFetcher!==this.props.optionsFetcher&&this.resetState()}componentWillUnmount(){this.cancelPendingFetch()}onSelectClosed(){this.shouldPrefetchOptions()?this.fetchOptions():this.resetState(),this.props.onClose?.()}onSelectFilterInputedChanged(e){let{minQueryLength:t}=this.props,a=e||"";(this.cancelPendingFetch(),t&&a.length<t)?this.resetState():this.setState(()=>({isLoading:!0}),()=>{this.fetchOptions(a)})}onSelectOpened(){let{minQueryLength:e,prefetchOptions:t,logSelectElementMenuOpen:a}=this.props;a?.(),t||e||this.fetchOptions()}getOptionsListEmptyMessage(e){let{minQueryLength:t,selectPlaceholder:a}=this.props,r=e||"";return t&&r.length<t?a||c.t("{queryLength, plural, =0 {Start typing to see results\u2026} other {Keep typing to see results\u2026}}",{queryLength:r.length}):r?c.rt("No items matched <strong>{filterQuery}</strong>",{filterQuery:r},({text:e,key:t})=>n.createElement("strong",{key:t},e)):c.t("No items")}setRef=e=>{this.select=e};getCurrentlySelectedOption(){let{value:e}=this.props,{options:t,optionGroups:a}=this.state;if(!e)return null;if(a)for(let t of a){let a=t.options.find(t=>t.value===e);if(a)return a}return t&&t.find(t=>t.value===e)||null}isValidOption(e){return e&&"object"==typeof e&&("string"==typeof e.value||"number"==typeof e.value)&&("string"==typeof e.label||n.isValidElement(e.label))}preserveSelectedOption(e,t,a){if(!t||!a||!this.isValidOption(t))return e;if(e.options)return e.options.some(e=>e.value===a)?e:{...e,options:[t,...e.options]};if(e.optionGroups&&Array.isArray(e.optionGroups)&&!e.optionGroups.some(e=>e&&Array.isArray(e.options)&&e.options.some(e=>e&&e.value===a))){let a=[...e.optionGroups];if(!(a.length>0)||!a[0])return{...e,optionGroups:null,options:[t]};{let e=Array.isArray(a[0].options)?a[0].options:[];a[0]={...a[0],options:[t,...e]}}return{...e,optionGroups:a,options:e.options?[t,...e.options]:e.options}}return e}resetState(){let{selectedOption:e}=this.props,t=e||this.getCurrentlySelectedOption();this.setState(()=>({isLoading:!this.props.minQueryLength,optionGroups:null,options:t?[t]:[]}),()=>{this.shouldPrefetchOptions()&&this.fetchOptions()})}focus(){this.select&&this.select.focus()}focusSelectInput(){this.select&&this.select.focusSelectInput()}fetchOptionsInternal=(e="")=>{let{optionsFetcher:t}=this.props;if(!t)return;let a=t(e).then(e=>{if(this.pendingFetch!==a)return;let{optionGroups:t,options:n}=e,{value:r,selectedOption:i}=this.props,l=i||this.getCurrentlySelectedOption(),o=this.preserveSelectedOption(t?{optionGroups:t,options:null}:{optionGroups:null,options:n??null},l,r);this.setState(()=>({...o,isLoading:!1}))});this.pendingFetch=a};cancelPendingFetch(){this.pendingFetch&&this.pendingFetch.isCancellable&&this.pendingFetch.isCancellable()&&this.pendingFetch.cancel?.(),delete this.pendingFetch}shouldPrefetchOptions(){let{prefetchOptions:e,minQueryLength:t}=this.props;return!!(e&&!t)}render(){let{isLoading:e,optionGroups:t,options:a}=this.state,{minQueryLength:r,optionsFetcher:i,prefetchOptions:l,selectPlaceholder:o,...c}=this.props;return n.createElement(s.A,{...c,customGetOptionsListEmptyMessage:this.getOptionsListEmptyMessage,isLoading:e,onClose:this.onSelectClosed,onFilterInputChange:this.onSelectFilterInputedChanged,onOpen:this.onSelectOpened,optionGroups:t,options:a,ref:this.setRef})}};d.displayName="DeprecatedSelectContainer";let m=d},0x1c271979d:(e,t,a)=>{"use strict";a.d(t,{A:()=>P,Q:()=>T});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x77727995),c=a(0x5359476e),d=a(0x7d48dd65),m=a(0x21f3c49e8),u=a(0x1e2051844),p=a(0x1feee1711),h=a(0x8601851c),_=a(0x1c371dd8b),f=a(0xb97b797e),b=a(0x62a17882),g=a(0x1427e2c62),y=a(0x20482ad21),A=a(0x1fc4d7d9f),x=a(0x2b7f0bcc),E=a(0x2469ec64e),C=a(0x677a139e),k=a(0x15f8e452a),v=a(0x2d42cbee),S=a(0x1b3ecb90f),I=a(0x15a4ffb05),w=a(0x3711e82d),T=((n={}).default="default",n.short="short",n.large="large",n);let N=new y.Ay("form"),M={onOptionSelected:{action:w.UiAction.SELECT}},R=class extends A.B{static defaultProps={autoClogProps:void 0,className:null,customGetOptionsListEmptyMessage:void 0,"data-qa":"select",errorId:null,errorLevel:x.A_.error,errorText:null,errorType:x.QE.nestedBox,hintText:null,hintId:null,icon:null,id:`select-${(0,E.r9)()}`,isAlwaysOpen:!1,isDisabled:!1,isLoading:!1,isRequired:!1,focusInputOnMount:!1,labelId:null,maxOptionsListHeight:void 0,name:null,onBlur:o.A,onChange:o.A,onClose:o.A,onFilterInputChange:o.A,onFocus:o.A,onOutsideClick:o.A,onOpen:o.A,optionClassName:void 0,optionGroups:void 0,options:void 0,pillarClassName:void 0,optionsListOffsetBottom:0,optionsListOffsetTop:0,optionsListWidth:void 0,placeholder:void 0,placeholderText:"",selectedOption:void 0,selectedOptionClassName:void 0,selectedValueClassName:void 0,size:void 0,type:"default",useFilteredInput:!0,usePlaceholderOption:!0,wrapperClassName:null,value:"","aria-label":"Filter for option list",focusId:void 0};preventFocusAndBlur;closedViaShiftTab;filterInput;select;wrapper;keyCommands;constructor(e){if(!e.optionGroups&&!e.options)throw Error('Select requires an "optionGroups" or "options" prop.');super(e);const{id:t}=this.props,a=(0,s.A)(this.props,"errorId",(0,E.Es)(t,"error")),n=(0,s.A)(this.props,"hintId",(0,E.Es)(t,"hint"));this.preventFocusAndBlur=!1,this.filterInput=r.createRef(),this.select=r.createRef(),this.wrapper=r.createRef(),this.state={activeOption:null,errorId:a,filterQuery:"",hintId:n,isOpen:!1,isFocused:!1},(0,f.v)(this,["filterOption","onActiveOptionUpdated","onBlurred","onClicked","onFilterInputChanged","onFocused","onKeyPressedEnter","onKeyPressedBackspace","onKeyPressedEsc","onKeyPressedShiftTab","onKeyPressedTab","onKeyPressedUpOrDown","onOptionSelected","onOutsideClicked","onWrapperMouseDown","onWrapperMouseUp","setActiveOption","getPlaceholder"])}componentDidMount(){this.initKeyCommands(),this.props.isAlwaysOpen&&this.setState(()=>({isOpen:!0})),this.props.focusInputOnMount&&this.filterInput.current?.focus()}static getDerivedStateFromProps(e,t){return e.isAlwaysOpen?null:{isOpen:t.isOpen&&!e.isDisabled}}componentDidUpdate(e,t){let{isAlwaysOpen:a,onClose:n,onOpen:r,useFilteredInput:i}=this.props;this.state.isOpen||a?(document.addEventListener("click",this.onOutsideClicked),t.isOpen||a||(i&&this.filterInput.current?.focus(),r?.(this.filterInput.current))):(document.removeEventListener("click",this.onOutsideClicked),t.isOpen&&n?.())}componentWillUnmount(){document.removeEventListener("click",this.onOutsideClicked),this.resetKeyCommads()}onBlurred=e=>{this.preventFocusAndBlur||this.props.onBlur?.(e),this.setState(()=>({isFocused:!1}))};onClicked=e=>{let{isDisabled:t}=this.props,a=e.target===this.filterInput.current&&!!this.getFilterQuery();t||a||this.toggleOpenState()};onFilterInputChanged=e=>{let t=e.target?e.target.value:this.filterInput.current?.value;this.state.isOpen||this.toggleOpenState(!0),this.isControlledByParent()?(this.props.onFilterInputChange?.(t),this.props.options&&0===this.props.options.length&&this.forceUpdate()):this.setState(()=>({filterQuery:t}))};onFocused=e=>{if(this.closedViaShiftTab){this.closedViaShiftTab=!1;return}this.preventFocusAndBlur||(this.toggleOpenState(!0),this.props.onFocus?.(e)),this.setState(()=>({isFocused:!0}))};onKeyPressedEsc=e=>{this.state.isOpen&&!this.props.isAlwaysOpen&&(this.toggleOpenState(!1),this.props.useFilteredInput?this.focus():this.focusSelectInput(),e.stopPropagation())};onKeyPressedUpOrDown=e=>{this.select.current?.contains(e.target)&&(e.preventDefault(),this.state.isOpen||(this.toggleOpenState(!0),e.stopPropagation()))};onKeyPressedTab=()=>{this.state.isOpen&&this.toggleOpenState(!1)};onKeyPressedShiftTab=()=>{this.state.isOpen&&(this.closedViaShiftTab=!0,this.toggleOpenState(!1))};onKeyPressedEnter=e=>{this.state.isOpen?(this.props.useFilteredInput||this.focusSelectInput(),e.preventDefault()):(this.toggleOpenState(!0),e.stopPropagation())};onKeyPressedBackspace=e=>{this.props.useFilteredInput&&(this.state.isOpen||(this.isControlledByParent()&&this.filterInput.current&&(this.filterInput.current.value=""),this.setState(()=>({filterQuery:""})),this.toggleOpenState(!0),e.stopPropagation()))};onOptionSelected({value:e,label:t},a){let n=a&&"click"===a.type,r=a&&"keydown"===a.type;this.toggleOpenState(!1),(this.state.isFocused||n||r)&&this.props.onChange?.(e,t,a),this.focus()}onActiveOptionUpdated(e){if(!e||"option"!==e.type)return;let t=e?e.option.value:null;this.setActiveOption(t)}onOutsideClicked(e){this.wrapper.current&&!this.wrapper.current.contains(e.target)&&(this.toggleOpenState(!1),this.props.onOutsideClick?.())}onWrapperMouseDown(){this.preventFocusAndBlur=!0}onWrapperMouseUp(){this.preventFocusAndBlur=!1}getPlaceholder(){return this.props.placeholder||N.t("Choose an option\u2026")}setActiveOption(e){setTimeout(()=>{this.setState(()=>({activeOption:e}))},0)}getAriaLabelledBy(){let{errorText:e,labelId:t}=this.props;return e?`${t} ${this.state.errorId}`:t}getFilteredOptionGroups(){let{optionGroups:e,usePlaceholderOption:t}=this.props,a=this.getFilterQuery();return e?a&&!this.isControlledByParent()?(0,c.A)(e,({label:e,options:t})=>{let a=(0,d.A)(t,this.filterOption);return(0,m.A)(a)?[]:[{label:e,options:a}]}):!a&&t?[this.getPlaceholderOptionGroup(),...e]:e:null}getFilteredOptions(){let{options:e,usePlaceholderOption:t}=this.props,a=this.getFilterQuery();return e?a&&!this.isControlledByParent()?(0,d.A)(e,this.filterOption):!a&&t?[this.getPlaceholderOption(),...e]:e:null}getFilterQuery(){return this.isControlledByParent()?(0,s.A)(this,"filterInput.value",""):this.state.filterQuery}getOptionsListEmptyMessage(){let e=this.getFilterQuery(),{customGetOptionsListEmptyMessage:t}=this.props;return t?t(e):e?N.rt("No items matched <strong>{filterQuery}</strong>",{filterQuery:e},({text:e,key:t})=>r.createElement("strong",{key:t},e)):N.t("No items")}getOptionsListTargetMeasurements(){let{optionsListOffsetBottom:e=0,optionsListOffsetTop:t=0,optionsListWidth:a}=this.props,n=this.select.current;if(!n||!n.offsetParent)return{bottom:0,offsetBottom:0,offsetTop:0,relativeBottom:0,relativeLeft:0,relativeTop:0,top:0,left:0,width:0,height:0};let r=n.getBoundingClientRect(),i=n.offsetTop-(0,g.A)(n,n.offsetParent),l=n.offsetLeft,o=n.offsetParent.clientHeight-i,s=i+r.height,c=r.bottom,d=r.top;return{bottom:c,offsetBottom:e,offsetTop:t,relativeBottom:s,relativeLeft:l,relativeTop:o,top:d,left:r.left,width:a||r.width,height:r.height}}getPlaceholderOption(){return{isPlaceholder:!0,label:this.getPlaceholder(),value:""}}getPlaceholderOptionGroup(){return{isPlaceholder:!0,options:[this.getPlaceholderOption()]}}getSelectedOption(){let{optionGroups:e,options:t,selectedOption:a,value:n}=this.props;if(a)return a.value?a:null;if(!n)return null;let r=e?(0,c.A)(e,e=>e.options):t;return(0,u.A)(r,{value:n})}focus(){this.preventFocusAndBlur=!0,this.select.current?.focus(),this.preventFocusAndBlur=!1}focusSelectInput(){this.filterInput.current&&(this.preventFocusAndBlur=!0,this.filterInput.current.focus(),this.preventFocusAndBlur=!1)}filterOption(e){let t;if("string"==typeof e.label)t=e.label;else{if("string"!=typeof e.labelText)return!0;t=e.labelText}let a=t.toLowerCase(),n=this.getFilterQuery()?.toLowerCase();return!n||-1!==a.indexOf(n)}getAriaAutocompleteProps(){let{errorText:e,id:t,isRequired:a,useFilteredInput:n}=this.props,{activeOption:r}=this.state;return n?{role:"combobox","aria-autocomplete":"list","aria-owns":(0,E.Es)(t,"listbox"),"aria-activedescendant":r?(0,E.Es)(t,r):void 0,"aria-invalid":e?"true":"false","aria-required":a}:{}}initKeyCommands(){let e=this.wrapper.current;this.keyCommands=new h.A(e||void 0),this.keyCommands.bindAll([{keys:["esc"],handler:this.onKeyPressedEsc},{keys:["up","down"],handler:this.onKeyPressedUpOrDown},{keys:["tab"],handler:this.onKeyPressedTab},{keys:["shift+tab"],handler:this.onKeyPressedShiftTab},{keys:["enter"],handler:this.onKeyPressedEnter},{keys:["backspace"],handler:this.onKeyPressedBackspace}])}resetKeyCommads(){this.keyCommands&&this.keyCommands.reset()}toggleOpenState(e){this.props.isAlwaysOpen||this.setState(t=>{let a={isOpen:(0,p.A)(e)?!t.isOpen:e};return a.isOpen||(this.isControlledByParent()&&this.filterInput.current&&(this.filterInput.current.value=""),a.filterQuery=""),a})}isControlledByParent(){return this.props.onFilterInputChange!==o.A}renderErrorMaybe(){let{errorLevel:e,errorText:t,errorType:a}=this.props;return t?r.createElement(x.Ay,{id:this.state.errorId??void 0,level:e,type:a,className:"c-alert--error margin_bottom_100"},t):null}renderHintMaybe(){let{hintText:e}=this.props;return e?r.createElement(C.A,{id:this.state.hintId??void 0},e):null}renderOptionsListMaybe(){if(!this.state.isOpen)return null;let{autoSelectFirstOption:e,"data-qa":t,id:a,isAlwaysOpen:n,isLoading:i,maxOptionsListHeight:l,optionClassName:o,optionsRowHeight:s,pillarClassName:c,selectedOptionClassName:d,useFullWidthOptions:m,value:u,onScroll:p,optionsListAriaLabel:h,useFilteredInput:f,autoClogProps:b}=this.props,{activeOption:g}=this.state,y=f||!g?void 0:(0,E.Es)(a,g),A=r.createElement(v.A,{autoSelectFirstOption:e,"data-qa":t,"aria-label":h,"aria-activedescendant":y,emptyStateMessage:this.getOptionsListEmptyMessage(),isLoading:i,isAlwaysOpen:n,maxListHeight:l,pillarClassName:c,onOptionSelected:this.onOptionSelected,onActiveOptionUpdated:this.onActiveOptionUpdated,optionClassName:o,onScroll:p,optionGroups:this.getFilteredOptionGroups(),options:this.getFilteredOptions(),optionsRowHeight:s,selectId:a,selectedOptionClassName:d,targetMeasurements:this.getOptionsListTargetMeasurements(),useFullWidthOptions:m,value:u,hasFocus:!f});return b?r.createElement(_.A,{elementType:w.ElementType.DROPDOWN,actionProps:M,autoClogProps:b},A):A}renderFilterInput(){let{"data-qa":e,"aria-label":t,icon:a,isDisabled:n,useFilteredInput:i}=this.props,s=this.getSelectedOption(),c=!this.state.isOpen&&s||!i,d=l()("c-input_select__filter_input",{offscreen:c}),m=!this.state.isOpen&&s||"string"!=typeof this.getPlaceholder()?this.props.placeholderText:this.getPlaceholder(),u=this.getAriaAutocompleteProps();return r.createElement(r.Fragment,null,a?r.createElement(k.A,{legacy:!0,type:a,className:"c-input_select__icon"}):null,r.createElement("input",{type:i?"text":"button","aria-describedby":this.state.hintId,"aria-label":t,"aria-labelledby":this.getAriaLabelledBy(),"aria-expanded":this.state.isOpen,disabled:n,className:d,"data-qa":`${e}_input`,onBlur:this.onBlurred,onChange:i?this.onFilterInputChanged:o.A,onClick:this.onClicked,onFocus:this.onFocused,placeholder:m,ref:this.filterInput,...u}))}renderSelectedOption(){let{selectedValueClassName:e,"data-qa":t}=this.props,a=this.getSelectedOption(),n=(0,s.A)(a,"label",this.getPlaceholder()),i=(0,r.isValidElement)(n)?n:r.createElement("span",{className:"c-input_select__selected_value_mrkdwn"},r.createElement(I.A,{text:n,inputIsEscaped:!0,showTooltips:!1,emojiSize:S.lw.MEDIUM})),o=l()("c-input_select__selected_value",{"c-input_select__selected_value--placeholder":!a,...e?{[e]:e&&!!a}:{},"c-input_select__selected_value--active":this.state.isFocused&&!this.state.activeOption});return r.createElement("div",{className:o,role:"presentation","aria-hidden":"true",onClick:this.onClicked,"data-qa":`${t}_selected_option`},i)}renderSelectedOptionOrFilterInput(){let{useFilteredInput:e}=this.props,t=this.getSelectedOption();return e&&(this.state.isOpen||!t)?null:this.renderSelectedOption()}render(){let{autoClogProps:e,autoSelectFirstOption:t,className:a,customGetOptionsListEmptyMessage:n,errorId:i,errorLevel:o,errorText:s,errorType:c,hintId:d,hintText:m,icon:u,id:p,isAlwaysOpen:h,isDisabled:_,isLoading:f,isRequired:g,focusInputOnMount:y,labelId:A,maxOptionsListHeight:x,name:E,onChange:C,onClose:k,onFilterInputChange:v,onOutsideClick:S,onOpen:I,onScroll:w,optionClassName:T,options:N,optionsListAriaLabel:M,optionsListOffsetBottom:R,optionsListOffsetTop:P,optionsListWidth:L,optionsRowHeight:O,optionGroups:D,pillarClassName:F,placeholder:U,placeholderText:B,selectedOption:H,selectedOptionClassName:W,selectedValueClassName:V,size:G,type:q,useFilteredInput:j,useFullWidthOptions:z,usePlaceholderOption:K,wrapperClassName:$,"aria-label":Y,focusId:Q,logSelectElementMenuOpen:Z,...J}=this.props,X=l()("c-input_select__wrapper",$,{"c-input_select--open_panel":h,[`${F}_select__wrapper`]:!!F,[`${F}_select--open_panel`]:!!F&&h}),ee=l()("c-input_select",{"c-input_select--active":this.state.isOpen||this.state.isFocused,"c-input_select--always-open":h,"c-input_select--sans-filter":!j,"c-input_select--short":"short"===q,"c-input_select--large":"large"===q,[`c-input_select--with_${o}`]:s,"c-input_select--with_hint":m,"c-input_select--with_icon":u,"c-input_select--small":"small"===G,[`${F}_select`]:!!F,[`${F}_select--active`]:!!F&&this.state.isOpen,[`${F}_select--always-open`]:!!F&&h,[`${F}_select--sans-filter`]:!!F&&!j,[`${F}_select--short`]:!!F&&"short"===q,[`${F}_select--large`]:!!F&&"large"===q,[`${F}_select--with_${o}`]:!!F&&s,[`${F}_select--with_hint`]:!!F&&m,[`${F}_select--with_icon`]:!!F&&u,[`${F}_select--small`]:!!F&&"small"===G},a),et=window.FastClick&&(0,b.CI)();return r.createElement("div",{className:X,onMouseDown:et?void 0:this.onWrapperMouseDown,onMouseUp:et?void 0:this.onWrapperMouseUp,onTouchStart:et?this.onWrapperMouseDown:void 0,onTouchEnd:et?this.onWrapperMouseUp:void 0,ref:this.wrapper},r.createElement("div",{...J,className:ee,"data-name":E,id:p,ref:this.select},this.renderFilterInput(),this.renderSelectedOptionOrFilterInput(),!h&&r.createElement("div",{role:"presentation",className:"c-input_select__chevron c-deprecated-icon c-icon--chevron-down",onClick:this.onClicked})),this.renderOptionsListMaybe(),this.renderErrorMaybe(),this.renderHintMaybe())}};R.displayName="DeprecatedSelect";let P=R},0x8699e4b9:(e,t,a)=>{"use strict";a.d(t,{aI:()=>k,ox:()=>v,r6:()=>S,Ay:()=>I});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x696b26ef),l=a(0x125763ad),o=a(0x121f7fb37),s=a(0x17ea0fa2c),c=a(0x2378cf6ec),d=a(0x11c82607b);let m="Query members",u={allowEmptyQuery:!0,limit:100,sort:{frecency:!0}},p={entities:{channels:{includeArchived:!1,includePrivate:!0,includeMpims:!0},members:{includeSelf:!0}}},h={entities:{members:{includeSelf:!0}}},_={entities:{channels:{canPost:!0}}},f={entities:{members:{includeBots:!1,includeSlackbot:!1}}};function getModelOptionsFetcher(e,t){let a={...u,...t},n=(0,d.Ay)(e,(t,n,r="")=>t((0,s.$P)({query:r,options:a})).then(t=>({options:e.includes(m)?t.map(e=>{let t=n(),a=(0,c.I)(t,e.id,!1,!1,!1,!1);return(0,o.GD)(e,a)}):t.map(e=>(0,o.GD)(e))})));return n.meta={name:"thunk",key:"createThunkThunk",description:e},n}let b=getModelOptionsFetcher("Query channels",{entities:{channels:{includeArchived:!1,includePrivate:!1}}}),g=getModelOptionsFetcher("Query conversations",p),y=getModelOptionsFetcher("Query conversations (no apps)",(0,l.A)({},p,f)),A=getModelOptionsFetcher("Query conversations (can post)",(0,l.A)({},p,_)),x=getModelOptionsFetcher("Query conversations (can post, no apps)",(0,l.A)({},p,_,f)),E=getModelOptionsFetcher(m,h),C=getModelOptionsFetcher(`${m} (no apps)`,(0,l.A)({},h,f)),k=(0,n.forwardRef)((e,t)=>{let a=(0,r.wA)(),l=(0,n.useCallback)(e=>a(b(e)),[a]);return n.createElement(i.A,{...e,optionsFetcher:l,ref:t})}),v=(0,n.forwardRef)(({canPost:e=!1,includeApps:t=!0,...a},l)=>{let o=(0,r.wA)(),s=(0,n.useCallback)(a=>t?e?o(A(a)):o(g(a)):e?o(x(a)):o(y(a)),[o,t,e]);return n.createElement(i.A,{...a,optionsFetcher:s,ref:l})}),S=(0,n.forwardRef)(({includeApps:e=!0,...t},a)=>{let l=(0,r.wA)(),o=(0,n.useCallback)(t=>e?l(E(t)):l(C(t)),[l,e]);return n.createElement(i.A,{...t,optionsFetcher:o,ref:a})}),I=a(0x1c271979d).A},0x121f7fb37:(e,t,a)=>{"use strict";a.d(t,{GD:()=>formatModelOption,zJ:()=>formatStaticOption});var n=a(0xbad225b5),r=a(0x1acf9d7d9),i=a(0xaacd3809),l=a(0x52a2bc6d),o=a(0x82980ab8),s=a(0x4b8e0952),c=a(0x226892387),d=a(0xe684f705);function MemberSecondaryName({id:e}){let t=(0,c.d4)(t=>(0,d.nv)(t,e));return!t||(0,s.z1)(t)?null:n.createElement("span",{className:"c-input_select__secondary_member_name"},(0,o.Mu)(t))}function ModelOption({id:e,memberName:t,isMember:a=!1}){return a?n.createElement("span",{className:"display_flex"},n.createElement(i.Ay,{memberId:e,inheritIconSize:!0}),n.createElement(r.A,{name:t}),n.createElement(MemberSecondaryName,{id:e})):n.createElement(l.A,{channelId:e,inline:!0})}MemberSecondaryName.displayName="MemberSecondaryName",ModelOption.displayName="ModelOption";let m=ModelOption;var u=a(0x1b9d5cc0c);function formatModelOption(e,t){return{label:n.createElement(m,{id:e.id,memberName:t,isMember:(0,u.NB)(e)}),value:e.id}}function formatStaticOption({description:e,text:t,value:a}){return{description:e,label:t,value:a}}formatModelOption.displayName="formatModelOption"},0xc2b01de8:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x23619f41c),i=a(0x128d54e52),l=a(0x1535e80f3),o=a(0x2501a2cee),s=a(0x1fdec3e16),c=a(0x112707d90),d=a(0x17afadb2a),m=a(0x2376ea9bb),u=a(0x111e5c871),p=a(0x15f4f83cf),h=a(0xdf77b1c6),_=a(0x121a53a99),f=a(0xa1832ae4),b=a(0x3711e82d),g=a(0x45012309),y=a(0x1a769a9e8),A=a(0x1c91944c9),x=a(0x226892387),E=a(0x13cf3e8cb),C=a(0x5dd1c0f2),k=a(0x1ee439e69);let v=l.RG.small;function SmallAppActionEntity({className:e,"data-qa":t,"data-sk":a="small_app_action_entity",action:g,actionId:A,app:E,appId:C,applicableTeamId:S,isDeactivated:I=!1,invert:w=!1,clogger:T}){let N,M;(0,n.useEffect)(()=>{T.track(b.EventId.APP_SHORTCUTS,{app_id:C,action_id:A,trigger_id:A,type:u.gE,contexts:{ui_context:{action:b.UiAction.IMPRESSION,ui_properties:{element_name:u.n9}}}})},[A,C,T]);let R=w&&!I,P=(0,x.d4)(e=>S?(0,k._J)(e,S):null),L=(0,p.uz)(g)?(0,h.u)(g):null;if((0,p.uz)(E)&&(0,p.uz)(g)){N=(0,_.fj)(E);let e="icons"in E?(0,y.A)(E,v):void 0;M=t=>n.createElement(r.A,{...t,classes:t.className,image:e,ariaHidden:!0})}else N=n.createElement(c.A,{type:(0,p.mX)(E)?"unknown":"non-existent",invert:R}),M=e=>n.createElement(d.A,{...e,isNonExistent:(0,p.lv)(E),size:v,subtler:I,invert:R});let O=(0,n.useCallback)(e=>n.createElement("span",{className:"c-app_action_entity__avatar_container"},M(e),n.createElement("span",{className:"c-app_action_entity__bolt_icon"},n.createElement(o.Ah,{name:"bolt-filled"}))),[M]),D=(0,n.useMemo)(()=>{if(!P)return null;let e=(0,f.F1)(P),t=(0,f.Rf)(P);return n.createElement("span",null,n.createElement("span",{className:"c-app_action_entity__applicable_team_avatar_container"},n.createElement(m.U,{icon:t,size:16,teamName:e})),n.createElement("span",{className:"c-app_action_entity__applicable_team_label","data-qa":"action_entity_applicable_team_label"},e))},[P]),F=(0,n.useMemo)(()=>n.createElement("span",null,n.createElement(s.A,{lines:1},L?n.createElement("span",{className:"c-app_action_entity__action_label","data-qa":"action_entity_action_label"},L):null,n.createElement("span",{className:"c-app_action_entity__app_label","data-qa":"action_entity_app_label"},N))),[L,N]),U=I&&!w?l.pI.dim:void 0;return n.createElement(i.Ay,{avatar:O,className:e,"data-action-id":A,"data-app-id":C||E?.id,"data-qa":t,"data-sk":a,size:"small",style:U,text:F,subtext:D})}function mapStateToProps(e,{app:t,appId:a,action:n,actionId:r}){let i=t||(0,C.sO)(e,a),l=i?.id||a,o=n||(0,E.SW)(e,{appId:l,actionId:r});return{app:i,appId:l,action:o,actionId:r,clogger:(0,g.eo)({state:e})}}SmallAppActionEntity.displayName="SmallAppActionEntity";let S=(0,A.N)(mapStateToProps)(SmallAppActionEntity)},0x24da81246:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x23619f41c),i=a(0x128d54e52),l=a(0x1535e80f3),o=a(0x112707d90),s=a(0x17afadb2a),c=a(0x6e465d95),d=a(0x120c268ad),m=a.n(d),u=a(0x20482ad21),p=a(0x2173e1832),h=a(0x2501a2cee),_=a(0x4c96e5d9);let f=new u.Ay("slack_marketplace"),ApprovedAppIcon=({className:e,iconSize:t="16",hideTooltip:a})=>{let r=(0,n.useMemo)(()=>n.createElement("span",{className:m()("sk_lilypad_green",e)},n.createElement(h.Ah,{name:"check-circle-filled",size:t,inline:!0})),[e,t]);return a?r:n.createElement(_.Ay,{tip:f.t("Approved by your admin"),position:"top",zIndex:p.m.AboveFullScreen},r)};ApprovedAppIcon.displayName="ApprovedAppIcon";var b=a(0x15f4f83cf),g=a(0x121a53a99),y=a(0x1a769a9e8),A=a(0x1c91944c9),x=a(0x5dd1c0f2);function MediumAppEntity(e){let t,a,{className:d,"data-qa":m,"data-sk":u="medium_app_entity",app:p,id:h,isDeactivated:_=!1,invert:f=!1,showBadge:A=!1,showApprovedBadge:x=!1,showShortDescription:E=!1,imagePathPrefix:C}=e,k=(0,g.Ef)(p),v=f&&!_,S=(0,n.useCallback)(e=>{if(k){let t=(0,y.A)(p,36,y.i,C||"icons.image");return n.createElement(r.A,{...e,classes:e.className,image:t,size:36,ariaHidden:!0})}return n.createElement(s.A,{...e,isNonExistent:(0,b.lv)(p),size:36,subtler:_,invert:v})},[p,k,_,v,C]);if(!p)return null;k?(t=(0,g.fj)(p),a=E?(0,g.Ot)(p):""):t=n.createElement(o.A,{type:(0,g.it)(p)?"unknown":"non-existent",invert:v});let I=_&&!f?l.pI.dim:void 0;return n.createElement(i.Ay,{avatar:S,className:d,"data-id":h||p?.id,"data-qa":m,"data-sk":u,size:"medium",style:I,text:n.createElement(i.CG,null,n.createElement("span",{className:"c-app_entity__label","data-qa":"app-label"},t),A&&n.createElement(c.A,{inverse:v,isWorkflow:(0,g.Wm)(p)}),x&&n.createElement(ApprovedAppIcon,null)),subtext:a&&n.createElement(i.sT,{"data-qa":"app-description"},a)})}MediumAppEntity.displayName="MediumAppEntity";let E=(0,A.N)((e,{app:t,id:a})=>({app:t||(0,x.sO)(e,a)}))(MediumAppEntity)},0x93c5a2d7:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x24da81246);function MediumAppListEntity(e){let t,{className:a,"data-qa":o,app:s,id:c,isActive:d=!1,isDeactivated:m=!1,isDisabled:u=!1,showBadge:p=!0,secondaryContent:h,showShortDescription:_=!1,imagePathPrefix:f}=e;return d?t=u||m?i.pI.highlightDim:i.pI.highlightLight:(u||m)&&(t=i.pI.dim),n.createElement(r.A,{className:a,primaryContent:n.createElement(l.A,{app:s,"data-id":c||s?.id,"data-qa":o,"data-sk":"medium_app_list_entity",id:c||s?.id,className:a,isDeactivated:m,showBadge:p,showShortDescription:_,imagePathPrefix:f}),secondaryContent:h,style:t})}MediumAppListEntity.displayName="MediumAppListEntity";let o=MediumAppListEntity},0x125f9e5e:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x23619f41c),o=a(0x128d54e52),s=a(0x1535e80f3),c=a(0x112707d90),d=a(0x17afadb2a),m=a(0x6e465d95),u=a(0x15f4f83cf),p=a(0x121a53a99),h=a(0x1a769a9e8),_=a(0x226892387),f=a(0x5dd1c0f2);let b=s.RG.small,SmallAppEntity=e=>{let{className:t,"data-qa":a,"data-sk":r="small_app_entity",app:g,id:y,isDeactivated:A=!1,invert:x=!1,showBadge:E=!0,isBold:C=!0}=e,k=(0,_.wz)(e=>g||(0,f.sO)(e,y)),v=x&&!A,S=(0,n.useCallback)(e=>{if((0,p.Ef)(k)){let t=(0,h.A)(k,b);return n.createElement(l.A,{...e,classes:e.className,image:t,ariaHidden:!0})}return n.createElement(d.A,{...e,isNonExistent:(0,u.lv)(k),size:b,subtler:A,invert:v})},[k,A,v]),I=(0,n.useMemo)(()=>(0,p.Ef)(k)?(0,p.fj)(k):n.createElement(c.A,{type:(0,p.it)(k)?"unknown":"non-existent",invert:v}),[k,v]);if(!k)return null;let w=A&&!x?s.pI.dim:void 0;return n.createElement(o.Ay,{avatar:S,className:t,"data-id":y||k?.id,"data-qa":a,"data-sk":r,size:"small",style:w,text:n.createElement("span",null,n.createElement("span",{"data-qa":"app-label",className:i()("c-app_entity__label",{normal:!C})},I),E&&n.createElement(m.A,{inverse:v,isWorkflow:(0,p.Wm)(k)}))})};SmallAppEntity.displayName="SmallAppEntity";let g=n.memo(SmallAppEntity)},0x10227e98c:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x128d54e52),o=a(0x15f8e452a),s=a(0x1fdec3e16),c=a(0x5d26167d);function SmallBroadcastEntity({className:e,"data-qa":t,"data-sk":a="small_broadcast_entity",id:r,isDeactivated:d=!1,name:m,description:u,avatar:p}){let h=(0,n.useCallback)(e=>n.createElement(o.A,{...e,type:p||"broadcast",size:"inherit"}),[p]),_=(0,c.A)(r);if(!_)return null;let f=d?i.pI.dim:void 0;return n.createElement(l.Ay,{avatar:h,className:e,size:"small",style:f,"data-id":r,"data-qa":t,"data-sk":a,text:n.createElement(s.A,{lines:1},n.createElement("span",{className:"c-broadcast_entity__label"},"@",m||_.name),u||_.description)})}SmallBroadcastEntity.displayName="SmallBroadcastEntity";let d=SmallBroadcastEntity;function getBaseStyle(e,t,a){return e?t||a?i.pI.highlightDim:i.pI.highlightDark:t||a?i.pI.dim:void 0}function SmallBroadcastListEntity({className:e,"data-qa":t,id:a,isActive:i=!1,isDeactivated:l=!1,isDisabled:o=!1,secondaryContent:s,name:c,description:m,avatar:u}){return n.createElement(r.A,{className:e,primaryContent:n.createElement(d,{"data-id":a,"data-qa":t,"data-sk":"small_broadcast_list_entity",id:a,isDeactivated:l,name:c,description:m,avatar:u}),secondaryContent:s,size:"small",style:getBaseStyle(i,o,l)})}SmallBroadcastListEntity.displayName="SmallBroadcastListEntity";let m=SmallBroadcastListEntity},0x929229c1:(e,t,a)=>{"use strict";a.d(t,{A:()=>k,Q:()=>C});var n=a(0xbad225b5),r=a(0x4c96e5d9),i=a(0x247cf31a2),l=a(0xbd85f8df),o=a(0x15bd59d31),s=a(0xf4097f62),c=a(0x1a592c177),d=a(0x10d53599f),m=a(0x22eb73b0a),u=a(0x132bfadf),p=a(0x1bc5ae1c9),h=a(0x12185e091),_=a(0x280afe13),f=a(0x1e79c438d),b=a(0x1b9d5cc0c),g=a(0x16ed1b0dc),y=a(0x4f725d55),A=a(0x1c91944c9),x=a(0x217553e42),E=a(0xe684f705);let C={SMALL:"small",MEDIUM:"medium",INLINE:"inline"};function ConversationListEntity({id:e,model:t,type:a=C.SMALL,matchData:g=[],onlyBoldIfUnread:y=!1,showUnreadBadge:A=!1,shortenTooltipContents:x=!1,showTruncatedChannelNameTooltip:E=!1,showTeamForLocalChannel:k=!1,showDisambiguatingTeamName:v=!1,showIconIfMuted:S=!1,subtext:I,tooltipPosition:w=r.Zj.TopRight,badgeShape:T,className:N,...M}){let R=null;if((0,h.LI)(t)||(0,b.NB)(t)){let e,r;switch((0,b.NB)(t)?(e=t.id,r=t):e=(0,_.e)(t),a){case C.SMALL:R=n.createElement(d.A,{id:e,member:r,onlyBoldIfUnread:y,showUnreadCount:A,showBadge:!1,className:N,...M});break;case C.MEDIUM:R=n.createElement(c.A,{subtext:I,id:e,className:N,...M});break;case C.INLINE:R=n.createElement(s.A,{id:e,member:r,className:N,...M})}}else if((0,h.yz)(t))switch(a){case C.SMALL:R=n.createElement(p.M,{id:e,mpim:t,matchData:g,onlyBoldIfUnread:y,showUnreadBadge:A,shortenTooltipContents:x,tooltipPosition:w,className:N,...M});break;case C.MEDIUM:R=n.createElement(u.A,{id:e,mpim:t,className:N,...M});break;case C.INLINE:R=n.createElement(m.A,{id:e,mpim:t,className:N,...M})}else if((0,f.V)(t))switch(a){case C.SMALL:R=n.createElement(o.A,{channelId:e??"",channel:t,onlyBoldIfUnread:y,showUnreadBadge:A,showTruncatedChannelNameTooltip:E,showTeamForLocalChannel:k,showDisambiguatingTeamName:v,showIconIfMuted:S,badgeShape:T,className:N,...M});break;case C.MEDIUM:R=n.createElement(l.A,{channelId:e??"",channel:t,className:N,...M});break;case C.INLINE:R=n.createElement(i.A,{channelId:e,channel:t,className:N,...M,showDisambiguatingTeamName:v})}return n.createElement(n.Fragment,null,R)}function mapStateToProps(e,{id:t,model:a}){let n=a;if(!n)if((0,g.A)(t)){if(n=(0,x.OL)(e,t),(0,h.LI)(n)){let t=(0,_.e)(n);n=(0,E.nv)(e,t)}}else(0,y.A)(t)&&(n=(0,E.nv)(e,t));return{id:t||n&&n.id,model:n}}ConversationListEntity.displayName="ConversationListEntity";let k=(0,A.N)(mapStateToProps)(ConversationListEntity)},0xa2cd8b62:(e,t,a)=>{"use strict";a.d(t,{I:()=>d,a:()=>m});var n=a(0xbad225b5),r=a(0x15a4ffb05),i=a(0x12185e091),l=a(0x1ecc7f772),o=a(0x1fe886fee),s=a(0x226892387),c=a(0x217553e42);let d=n.memo(({name:e})=>n.createElement(r.A,{text:e,showTooltips:!1,inputIsEscaped:!0})),m=n.memo(({channel:e,channelId:t,name:a,displayNameOptions:r})=>{let m=(0,s.d4)(o.h),u=(0,s.d4)(a=>e??(0,c.OL)(a,t)),p=(0,i.yz)(u),h=(0,s.d4)(e=>a??(0,l.SB)(e,u,r));return m&&p?n.createElement(d,{name:h}):h})},0x247cf31a2:(e,t,a)=>{"use strict";a.d(t,{A:()=>y,k:()=>shouldUseInlineChannelEntity});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1a256ff50),o=a(0xd47730c5),s=a(0x1535e80f3),c=a(0x937dca65),d=a(0x107116627),m=a(0xc693ee83),u=a(0x252e80b0),p=a(0x12185e091),h=a(0x209fb16e4),_=a(0x6f213e53),f=a(0x1ec68d6a3),b=a(0x1c91944c9),g=a(0x217553e42);function shouldUseInlineChannelEntity(e){return!(0,p.LI)(e)&&!(0,p.yz)(e)}function InlineChannelEntity({className:e,channel:t,bestFormerName:a,displayFormerNames:r=s.P.false,logger:l,boldIcon:h=!1,showTeam:f=!0,truncate:b=!1,truncateWidth:g,overrideHiddenName:y,overrideHiddenIcon:A,withTruncationTooltip:x,channelNameClassName:E,omitNonExistentTooltip:C,channelHasNonUniqueName:k=!1,showDisambiguatingTeamName:v=!1,readChannelIcon:S=!1}){let I=(0,p.t8)(t),w=(0,p.QR)(t||null),T=(0,n.useCallback)(({className:e,...a})=>(!w||A)&&n.createElement(m.A,{...a,bold:h,className:e,channel:t,overrideHiddenIcon:A,readChannelIcon:S}),[t,h,w,A,S]);if(!shouldUseInlineChannelEntity(t||null))return l?.warn("INLINE-CHANNEL-ENTITY","InlineChannelEntity should not display IMs or MPIMs"),null;let N=i()(e,"c-inline_channel_entity"),M=(0,_.F)(t)?s.pI.dim:void 0,R=t&&y?{...t,name:y}:t||void 0,P=i()(E,"c-inline_channel_entity__content"),L=(I||w)&&!y?n.createElement(u.A,{"data-qa":"inline_channel_entity__missing",type:I?"unknown":"non-existent",size:"small",width:g,omitNonExistentTooltip:C}):n.createElement("span",{className:P},n.createElement(c.A,{bold:h,channel:R,bestFormerName:a,displayFormerNames:r,showTeam:f,showTeamForLocalChannel:k&&v,width:g,"data-qa":"inline_channel_entity__name",overrideHiddenName:y}));return n.createElement(o.A,{avatar:T,className:N,"data-qa":"inline_channel_entity","data-channel-id":t&&t.id,style:M,truncate:b,truncateWidth:g,withTruncationTooltip:x,primaryContent:L,secondaryContent:g&&n.createElement(n.Fragment,null,f&&n.createElement(d.A,{className:"c-inline_channel_entity__team",iconSize:14,channel:R,"data-qa":"inline_channel_entity__team"}))})}function propsContainsChannel(e){return Object.prototype.hasOwnProperty.call(e,"channel")}function mapStateToProps(e,t){let a,n=propsContainsChannel(t)?t.channel:(0,g.OL)(e,t.channelId);return t.showDisambiguatingTeamName&&(a=(0,h.i)((0,g.MS)(e),n)),{channel:n,channelHasNonUniqueName:a,logger:(0,f.Ay)({state:e})}}InlineChannelEntity.displayName="InlineChannelEntity";let y=(0,b.N)(mapStateToProps,null,null,{areStatePropsEqual:l.kt})(InlineChannelEntity)},0x1dca9a530:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x128d54e52),c=a(0x1535e80f3),d=a(0x410829f8),m=a(0x4031e124),u=a(0x937dca65),p=a(0xc693ee83),h=a(0x252e80b0),_=a(0x6cc5eee0),f=a(0x89c7949e),b=a(0x8b588d25),g=a(0x1ec69ee01),y=a(0x12185e091),A=a(0x6f213e53),x=a(0x1c91944c9),E=a(0x217553e42);let C=new l.Ay("search"),MaybeUnstyledButton=({className:e,onClick:t,children:a})=>t?n.createElement(o.Nm,{className:e,onClick:t},a):n.createElement("span",{className:e},a);function MediumChannelEntityBase({bestFormerName:e,className:t,channel:a,displayFormerNames:r=c.P.false,showPurpose:l=!0,truncatePurpose:o=!1,noLinkingInPurpose:x=!1,metadata:E,inlineNameSuffix:k,nameSuffix:v,showUnreadBadge:S=!1,badgeCount:I,onClick:w,memberCount:T,showTeam:N=!0,showTeamName:M=!0,useFilledIcon:R,showHashWhenLoading:P=!0}){let L=(0,g.z8)(a),O=(0,y.t8)(a),D=l&&L&&!O,F=E&&!O,U=!!(S&&I&&I>0&&!O),B=T&&T>=0,H=i()(t,"c-medium_channel_entity"),W=(0,A.F)(a)?c.pI.dim:void 0,V=D?n.createElement(_.A,{"data-qa":"medium_channel_entity_purpose",text:L,noJumbomoji:!0,noLinking:x}):null,G=(0,b.dM)(a),q=G?n.createElement(f.J,{recordType:G,recordLabel:(0,b.jT)(a)||G}):null;return n.createElement(s.Ay,{className:H,size:"medium",style:W,text:n.createElement("div",{className:"c-medium_channel_entity__info"},n.createElement(MaybeUnstyledButton,{onClick:w,className:"c-medium_channel_entity__name"},O?n.createElement(h.A,{type:"unknown",size:"medium",showHash:P}):n.createElement(n.Fragment,null,n.createElement(p.A,{channel:a,filled:!!R}),n.createElement(s.CG,null,n.createElement(u.A,{channel:a,bestFormerName:e,displayFormerNames:r,inlineNameSuffix:k,showTeamName:M,showTeam:N})),q,n.createElement("span",{className:"c-medium_channel_entity__channel_suffix"},k&&n.createElement("span",{className:"c-medium_channel_entity__inline_name_suffix","data-qa":"medium_channel_entity_inline_name_suffix"},k)))),n.createElement("div",{className:"c-medium_channel_entity__channel_suffix","data-qa":"medium_channel_entity_name_suffix"},!O&&v),U&&n.createElement(d.Gm,{count:I,className:"c-channel_entity__mentions c-channel_entity__mentions--medium c-channel_entity__mention--not-inverted",style:d.rY.red})),subtext:n.createElement(s.sT,null,B&&n.createElement("span",{className:"c-medium_channel_entity__member_count","data-qa":"medium_channel_entity_member_count"},C.t("{count, plural, =1 {# member} other {# members}}",{count:T}),D&&"\xa0\xa0\xb7\xa0\xa0"),D&&o?n.createElement(m.A,{tip:V,"data-qa":"medium_channel_entity_purpose_tooltip"},n.createElement("div",{className:"c-medium_channel_entity__channel_truncated_purpose","data-qa":"medium_channel_entity_purpose_tooltip_wrapper"},V)):null,D&&!o?V:null),metadata:F&&n.createElement(s.Q,{"data-qa":"medium_channel_entity_metadata"},E)})}function propsContainsChannel(e){return Object.prototype.hasOwnProperty.call(e,"channel")}MediumChannelEntityBase.displayName="MediumChannelEntityBase";let k=(0,x.N)((e,t)=>{let a=propsContainsChannel(t)?t.channel:(0,E.OL)(e,t.channelId),n=t.showUnreadBadge?t.badgeCount||(0,E.TJ)(e,a):void 0;return{channel:a,badgeCount:n}})(MediumChannelEntityBase)},0xbd85f8df:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x1dca9a530);function getBaseStyle(e,t,a){return e?t||a?i.pI.highlightDim:i.pI.highlightLight:t||a?i.pI.dim:void 0}function MediumChannelListEntity({className:e,secondaryContent:t,isActive:a=!1,isDeactivated:i=!1,isDisabled:o=!1,...s}){return n.createElement(r.A,{className:e,primaryContent:n.createElement(l.A,s),secondaryContent:t,size:"medium",style:getBaseStyle(a,o,i)})}MediumChannelListEntity.displayName="MediumChannelListEntity";let o=MediumChannelListEntity},0x193edc1da:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x18f2150ea),o=a(0x128d54e52),s=a(0x1535e80f3),c=a(0x1d6971063),d=a(0x937dca65),m=a(0x252e80b0),u=a(0x1ec69ee01),p=a(0x12185e091),h=a(0x209fb16e4),_=a(0x6f213e53),f=a(0x1ec68d6a3),b=a(0x1c91944c9),g=a(0x217553e42),y=a(0xc1360909);let A="SMALL-CHANNEL-ENTITY";function SmallChannelEntity({className:e,channel:t,bestFormerName:a,inlineNameSuffix:r,invert:h=!1,logger:f,displayFormerNames:b=s.P.false,showTeamForLocalChannel:g,showDraftIcon:y=!1,showFilledIcon:x=!1,showTeam:E,memberCount:C,onlyBoldIfUnread:k=!1,showTruncatedChannelNameTooltip:v=!1,"data-qa":S="small_channel_entity",channelHasNonUniqueName:I=!1,showDisambiguatingTeamName:w=!1,useIconOutline:T=!1,removeArchivedSuffix:N=!1}){let M=(0,n.useCallback)(e=>n.createElement(c.A,{...e,className:i()({"c-small_channel_entity__icon":!T}),channel:t,size:T?s.RG.smallListVariantOutline:s.RG.small,showDraftIcon:y,showFilledIcon:x}),[t,y,x,T]);if((0,p.LI)(t)||(0,p.yz)(t))return f?.warn(A,"SmallChannelEntity should not display IMs or MPIMs"),null;let R=i()(e,"c-small_channel_entity"),P=!k||(0,u.KJ)(t),L=(0,p.t8)(t),O=(0,p.QR)(t),D=(0,_.F)(t)?s.pI.dim:void 0;h&&(D=s.pI.highlightDark);let F=null;(0,l.A)(C)&&(F=n.createElement("span",{className:"c-small_channel_entity__inline_name_suffix normal"},"(",C,")"));let U=n.createElement(d.A,{channel:t,bestFormerName:a,inlineNameSuffix:r,displayFormerNames:b,showTeamForLocalChannel:g||I&&w,showTeam:E,removeArchivedSuffix:N,bold:!!P}),B=v?n.createElement(o.CG,{withTruncationTooltip:!0},U):U,H=i()("c-small_channel_entity__content","c-small_channel_entity__content--xws",{"c-small_channel_entity__content--show-truncated-tooltip":v});return n.createElement(o.Ay,{avatar:M,className:R,"data-qa":S,size:"small",style:D,text:n.createElement(o.CG,null,L||O?n.createElement(m.A,{type:L?"unknown":"non-existent",invert:h,size:"small"}):n.createElement("span",{className:H},B,r&&n.createElement("span",{className:"c-small_channel_entity__inline_name_suffix"},r),F)),useAvatarOutline:T})}function propsContainsChannel(e){return Object.prototype.hasOwnProperty.call(e,"channel")}function mapStateToProps(e,t){let a,n;if(t.showMemberCounts){let n=(0,y.q8)(e,propsContainsChannel(t)?(0,u.FB)(t.channel):t.channelId);a=n?.counts.member_count}let r=propsContainsChannel(t)?t.channel:(0,g.OL)(e,t.channelId);return t.showDisambiguatingTeamName&&(n=(0,h.i)((0,g.MS)(e),r)),{memberCount:a,channel:r,logger:(0,f.Ay)({state:e,label:A}),channelHasNonUniqueName:n}}SmallChannelEntity.displayName="SmallChannelEntity";let x=(0,b.N)(mapStateToProps)(SmallChannelEntity)},0x15bd59d31:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x410829f8),o=a(0x2501a2cee),s=a(0x193edc1da),c=a(0x1c91944c9),d=a(0x8baf11b5),m=a(0x226892387),u=a(0x217553e42);function getBaseStyle(e,t,a){return e?t||a?i.pI.highlightDim:i.pI.highlightDark:t||a?i.pI.dim:void 0}function SmallChannelListEntity({className:e,secondaryContent:t,isActive:a=!1,isDeactivated:c=!1,isDisabled:u=!1,showUnreadBadge:p=!1,badgeCount:h=0,onlyBoldIfUnread:_=!1,useIconOutline:f=!1,showIconIfMuted:b=!1,badgeShape:g=l.HY.pill,...y}){let A=(0,m.d4)(e=>(0,d.B)(e,y?.channel?.id)),x=(0,n.useMemo)(()=>p?n.createElement("div",{className:"c-small_channel_entity__secondary-content-badge"},t,n.createElement(l.Gm,{count:h,className:"c-channel_entity__mentions",style:a?l.rY.white:l.rY.themed,shape:g})):t,[h,a,t,p,g]),E=getBaseStyle(a,u,c),C=(0,n.useMemo)(()=>A&&b&&n.createElement(o.Ah,{"aria-hidden":"false","aria-label":"Channel muted",name:"notifications-off",role:"img"}),[A,b]),k=(0,n.useMemo)(()=>n.createElement(s.A,{invert:E===i.pI.highlightDark,onlyBoldIfUnread:_,useIconOutline:f,inlineNameSuffix:C,...y}),[E,C,_,y,f]);return n.createElement(r.A,{className:e,primaryContent:k,secondaryContent:x,size:"small",style:E})}function propsContainsChannel(e){return Object.prototype.hasOwnProperty.call(e,"channel")}function mapStateToProps(e,t){let a=propsContainsChannel(t)?t.channel:(0,u.OL)(e,t.channelId),n=t.showUnreadBadge?t.badgeCount||(0,u.TJ)(e,a):0;return{channel:a,badgeCount:n}}SmallChannelListEntity.displayName="SmallChannelListEntity";let p=(0,c.N)(mapStateToProps)(SmallChannelListEntity)},0x1d6971063:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1535e80f3),o=a(0x2501a2cee),s=a(0xc162e471),c=a(0x12185e091),d=a(0x226892387);function ChannelIcon({size:e=l.RG.medium,className:t,channel:a,showDraftIcon:r=!1,showFilledIcon:m=!1}){let u=(0,c.t8)(a),p=(0,d.d4)(e=>(0,s.Ay)(e,a,{filled:m,showDraftIcon:r})),h=(0,n.useMemo)(()=>{let t={...p};return e===l.RG.small&&(t.size="18"),e===l.RG.smallListVariantOutline&&(t.size="16"),t},[e,p]);return n.createElement("span",{className:i()("c-channel_icon",{"c-channel_icon--unknown":u,"c-channel_icon--with-background":e===l.RG.medium},t),"data-channel-type-icon":h?.name||"unknown"},!u&&n.createElement(o.Ah,h))}ChannelIcon.displayName="ChannelIcon";let m=ChannelIcon},0x937dca65:(e,t,a)=>{"use strict";a.d(t,{A:()=>I});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x21f3c49e8),o=a(0x181d663bb),s=a(0x20482ad21),c=a(0x1e864b930),d=a(0x1535e80f3),m=a(0x107116627),u=a(0xc693ee83),p=a(0x202fa5d55),h=a(0x1ec69ee01),_=a(0x1ecc7f772),f=a(0x6f213e53),b=a(0x19d55d0e1),g=a(0x245dcaf6b),y=a(0xbd3de346),A=a(0x20679dcfc),x=a(0xa1832ae4),E=a(0x6d72337),C=a(0x1c91944c9),k=a(0x14ea3ce99),v=a(0x1ee439e69);let S=new s.Ay("search");function ChannelName(e){let t,{bestFormerName:a,bold:r=!0,channel:s,channelName:_,overrideHiddenName:b,width:g,displayFormerNames:y=d.P.true,isChannelFrozenAndInGracePeriod:A,showTeam:x=!0,showTeamForLocalChannel:E=!1,showTeamName:C,titleBlocks:k,removeArchivedSuffix:v}=e,I=(0,f.F)(s)&&!A&&!v,w=`${b??_}${I?` ${S.t("(archived)")}`:""}`;if(y)if(a){let e=n.createElement(u.A,{bold:r,className:"c-channel_name__former_channel_icon",channel:s}),i=n.createElement("span",{className:"c-channel_name__former_name_text"},n.createElement(p.A,{text:a,showTooltips:!1}));t=a&&n.createElement("span",{className:"c-channel_name__suffix"},S.rt(" (formerly {icon}{name})",{icon:e,name:i}))}else{let e,t=(0,h.Hx)(s);if(t&&!(0,l.A)(t)){let a=t.map(e=>`#${e}`);e=(0,c.A)(a,{noConj:!0}).join("")}e&&(w+=` ${S.t("(formerly {names})",{names:e})}`)}let T=i()("c-channel_entity__name",{"c-channel_entity__name--bold":r});return n.createElement(n.Fragment,null,n.createElement("span",{className:T,...(0,o.A)(e)},k??n.createElement(n.Fragment,null,n.createElement(p.A,{text:w,showTooltips:!1}),y&&t)),!g&&n.createElement(n.Fragment,null,x&&n.createElement(m.A,{className:"c-channel_entity__team",iconSize:d.RG.inline,channel:s,"data-qa":"channel_entity__team",shouldRender:E,showTeamName:C})))}function mapStateToProps(e,{channel:t,includeChannelPrefix:a}){let n=(0,v.H7)(e)||(0,v.lp)(e),r=(0,x.ZT)(n),i=t&&(0,b.jT)(t)&&(0,A.l)(t.id),l=i?(0,k.Lp)(e,i):void 0,o=l&&(0,y.U9)(l)?(0,E.GU)({id:i,fileId:i,size:"caption",truncate:!1}):null;return{channelName:(0,_.SB)(e,t,{publicChannelIncludeHashSign:!!a,imIncludeAtSign:!1})??void 0,titleBlocks:o,isChannelFrozenAndInGracePeriod:(0,g.sP)(r,t)}}ChannelName.displayName="ChannelName";let I=(0,C.N)(mapStateToProps)(ChannelName)},0x107116627:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1ec69ee01),o=a(0x189391f29),s=a(0x7fae732f),c=a(0xa1832ae4),d=a(0x1c91944c9),m=a(0x217553e42),u=a(0x1ee439e69);let p=class extends n.Component{render(){let{shouldRender:e,team:t,className:a}=this.props;return e&&t?n.createElement("div",{className:i()("c-channel_team","c-channel_team--xws",a),"data-qa":"channel_team"},n.createElement("span",{className:"c-channel_team__name"},(0,c.F1)(t))):null}};p.displayName="ChannelTeam";let h=(0,d.N)((e,{channel:t,channelId:a,shouldRender:n})=>{let r,i=t||(0,m.OL)(e,a),c=(0,o.R)(e,i);if((0,l.lo)(i))r=(0,u._J)(e,(0,l.bK)(e,i));else if(n||c){let t=(0,s.n)(e,i);r=(t?(0,u._J)(e,t):void 0)||(0,u.H7)(e)}return{shouldRender:n||c||!!(0,l.lo)(i),team:r??void 0}})(p)},0xc693ee83:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x2501a2cee),s=a(0xc162e471),c=a(0x12185e091),d=a(0x226892387);let m=new l.Ay("channels"),InlineChannelIcon=({className:e,filled:t,bold:a,channel:r,disableArchived:l,overrideHiddenIcon:u,readChannelIcon:p,includeSpace:h=!0})=>{let _=(0,d.d4)(e=>u||(0,s.Ay)(e,r,{filled:t||(0,c.Zp)(r),bold:a,disableArchived:l})),f=i()(e,"c-inline_channel_icon",{"c-inline_channel_icon--space":h}),b=(0,c.Zp)(r),g=(0,n.useMemo)(()=>b?m.t("private channel ",{fallbackHash:"943992d03db8cad462814c3650217ac329a26742",fallbackHashNs:"channel_sidebar"}):m.t("channel ",{fallbackHash:"879f0b1bef59eeebf78cfd3a22f6f8077810cecf",fallbackHashNs:"huddles"}),[b]);return n.createElement(n.Fragment,null,p&&n.createElement("span",{className:"offscreen"},g),n.createElement("span",{className:f,"data-inline-channel-type-icon":_.name},n.createElement(o.Ah,{inline:!0,..._})))};InlineChannelIcon.displayName="InlineChannelIcon";let u=n.memo(InlineChannelIcon)},0xc162e471:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>getChannelIconType,PR:()=>C,pH:()=>x});var n=a(0xf01a9d50),r=a(0x1ec69ee01),i=a(0x12185e091),l=a(0x6f213e53),o=a(0x19d55d0e1),s=a(0x245dcaf6b),c=a(0xbd3de346),d=a(0x20679dcfc),m=a(0xa1832ae4),u=a(0x14ea3ce99),p=a(0x1ee439e69);let h={name:"archive"},_={name:"archive-filled"},f={name:"edit"},b={name:"edit-filled"},g={name:"file"},y={name:"lists"},A={name:"lock"},x={name:"lock-filled"},E={name:"channel"},C={name:"channel-filled"},k={name:"canvas"};function getChannelIconType(e,t,{filled:a,bold:v,disableArchived:S,showDraftIcon:I}={filled:!1,bold:!1,disableArchived:!1,showDraftIcon:!1}){let w=(0,p.H7)(e)||(0,p.lp)(e),T=(0,m.ZT)(w);if(!(0,s.sP)(T,t)&&((0,l.F)(t)&&!S||(0,s.Zz)(t)))return a?_:h;if(I&&(0,r.yc)(e,t.id))return a?b:f;if((0,o.jT)(t)){let a=(0,u.Lp)(e,(0,d.l)(t.id));return(0,c.wL)(a)?k:(0,c.l7)(a)?y:g}let N=(0,n.sc)(t);return N?N:(0,i.Zp)(t)?a?x:A:v?C:E}},0x11fda96e5:(e,t,a)=>{"use strict";a.d(t,{A:()=>FileEntityThumbnailIcon});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1535e80f3),o=a(0x20552c191),s=a(0xbd3de346);function FileEntityThumbnailIcon({className:e,file:t,forceIconThumbnail:a,size:r=l.RG.medium,"data-qa":c,hasNotification:d}){let m=i()("c-file_entity_thumbnail_icon",e,{"c-file_entity_thumbnail_icon--img-border":!a&&((0,s.sJ)(t)||(0,s._y)(t)||(0,s.pI)(t)),"c-file_entity_thumbnail_icon_with_notification":d,"c-file_entity_thumbnail_icon--img-border__audio":(0,s.pI)(t)});return n.createElement(o.N,{className:m,file:t,width:r,height:r,forceIconThumbnail:a,forceIconThumbnailForDocument:!0,cover:!0,suppressAnimations:!0,hasNotification:d,"data-qa":c})}FileEntityThumbnailIcon.displayName="FileEntityThumbnailIcon"},0x1e07de0dd:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1acf9d7d9),l=a(0x6c151463),o=a(0xbd3de346),s=a(0xbac48619),c=a(0x2378cf6ec),d=a(0x6960d8b9),m=a(0x1c91944c9),u=a(0x1ccef1c6f),p=a(0x226892387),h=a(0x19c76d181);let _=new r.Ay("files");function FileEntityUserTimestamp({file:e,time24:t,isChannelFiles:a,useSeparator:r,customSeparator:c,excludeTime:m,displaySharedBy:u,documentUnfurlTs:f,name:b,showYou:g,isCreator:y=!1}){let A,x,E,C,k,v=a||u,S="\xa0\xa0";A=v?null:r||c||f?[S,c??"\xb7",S]:S;let I=y&&e?.created?e.created:(0,o.VP)(e);if(I){let e,a=(0,d.Od)(I,{shortenMonth:!0});if(x=a,v)if("Today"===a||"Yesterday"===a){let t=a.toLowerCase();e=_.t("{newDate}",{newDate:t})}else e=_.t("on {date}",{date:a});else e=a;let r=m?e:_.t("{date} at {time}",{date:a,time:(0,d.Yq)(I,"{time}",{do24hrTime:t})});E=n.createElement(n.Fragment,null,A,n.createElement("span",{className:"c-file_entity-user-timestamp__timestamp","data-qa":"file-entity-metadata-timestamp"},r))}let w=(0,p.d4)(h.WR)===e.user,T=e.bot_id?n.createElement(l.A,{id:e.bot_id,isChannelFiles:v,"data-qa":"file-entity-metadata-user",className:"margin_right_0"}):n.createElement(i.A,{name:b,isChannelFiles:v,"data-qa":"file-entity-metadata-user",inline:!0,isBold:!1,isCreator:y,className:"margin_right_0",isSelf:!!g&&w}),N=f&&(0,d.Od)(f,{shortenMonth:!0}),M=!1;return(N&&(C=N.includes("Today")||N.includes("Yesterday")?_.t("Added {readableTs}",{readableTs:N}):_.t("Added on {readableTs}",{readableTs:N}),x&&(M=x===N)),C&&(k=n.createElement(n.Fragment,null,A,n.createElement("span",{className:"c-file_entity-user-timestamp__timestamp","data-qa":"file-entity-metadata-unfurl-in-canvas-timestamp"},C))),(0,s.A)(e)||(0,o.aK)(e)||(0,o.c4)(e))?null:n.createElement(n.Fragment,null,T,M?n.createElement(n.Fragment,null," ",k):n.createElement(n.Fragment,null," ",E,k))}FileEntityUserTimestamp.displayName="FileEntityUserTimestamp";let f=(0,m.N)((e,t)=>({time24:(0,u.ty)(e,"time24"),name:(0,c.I)(e,t.file.user||"",!1,!1,!1,!1)}))(FileEntityUserTimestamp)},0x1c403364b:(e,t,a)=>{"use strict";a.d(t,{A:()=>G});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x21f3c49e8),o=a(0x20482ad21),s=a(0x128d54e52),c=a(0x1535e80f3),d=a(0x2501a2cee),m=a(0x21cf37dc6),u=a(0x16cf1da63),p=a(0x20b4dda68),h=a(0x1fdec3e16),_=a(0x9613ff3a),f=a(0x4e1a3b33),b=a(0x1f93bb6a9),g=a(0x190011db1),y=a(0xbd3de346),A=a(0x21186af8),x=a(0x6d72337),E=a(0x226892387),C=a(0x1e3eb45fd),k=a(0xcd9e748),v=a.n(k);let FileEntityMetadata=({detailType:e,file:t,fileAction:a,isHovering:r,timestampProps:l,isDetailTextBold:o,detailTextOverride:c,documentUnfurlTs:d,allowLiveTitle:m,fileBadge:k,fromCanvasOrganization:S=!1,showCanvasIa4Metadata:I,showCanvasModalMetadata:w=!1,hasHighlightMarkers:T=!1,isSemanticHighlight:N=!1,showFileSummary:M=!1})=>{let R=!e||!t||c,P=(0,u.Pj)(),L=R?null:(0,_.A)(P.getState(),t,e,l,d),O=(0,E.F3)(e=>(0,A.A)(a,t,e)),D=(0,E.d4)(C.mI),F=(0,E.d4)(C.Lq)&&(0,y.b5)(t)&&M,U=null;if(c)U=c;else if(r&&!(0,y.Hn)(t))U=O;else if(L)if(Array.isArray(L)){let e=L.filter(e=>!!e);U=e.map((t,a)=>n.createElement("span",{key:t},t,a<e.length-1?" \xb7 ":null))}else U=L;U=n.createElement(s.CG,{className:i()("c-file_entity-user-timestamp",{"c-file-entity-bold-description":!o})},n.createElement(n.Fragment,null,U,N&&D&&n.createElement(b.y,{separatorPosition:"before"})));let B=!!k||I,H=n.createElement(f.A,{file:t,allowLiveTitle:m,fromCanvasOrganization:S,hasHighlightMarkers:T,size:"base"}),W=I&&!w?(0,x.KA)({quipFileId:t.id,target:H}):H;return n.createElement(n.Fragment,null,n.createElement(s.CG,{className:i()("c-file_entity__text c-file_entity__text--first-line",{"c-file_entity__text--first-line__flex":B}),"data-qa":"file-entity-metadata-title",inline:B},n.createElement("span",{className:i()({[v().has_completed_summary_flex]:(0,y.mb)(t)})},n.createElement(h.A,{lines:1,withTooltip:!0},W)),k),n.createElement("div",{className:"c-file_entity-user-timestamp","data-qa":"file-entity-metadata-description"},n.createElement(h.A,{lines:1,withTooltip:!0},U)),F&&n.createElement(g.A,{file:t,fileContainerType:p.zk.FILE_SEARCH}))};FileEntityMetadata.displayName="FileEntityMetadata";var S=a(0x11fda96e5),I=a(0x3796a18c),w=a(0x58199183),T=a(0x339b339c),N=a(0xbc05fc30),M=a(0x1e40425ab),R=a(0x124f71042),P=a(0x153e18eb9),L=a(0x18b479663),O=a(0xdd7fdd59),D=a(0xbac48619),F=a(0x224811973),U=a(0x1c91944c9),B=a(0x9b971e7e),H=a(0x14ea3ce99);let W=new o.Ay("files"),V={fontWeight:"bold"};function MediumFileEntity({className:e,"data-qa":t,"data-sk":a,fileFromPropsOrState:r,fileAction:o,hideActionText:u=!1,id:p,isDisabled:h,invert:_,detailType:f=I.s.FILETYPE,timestampProps:b,forceIconThumbnail:g,iconOverride:A,isDetailTextBold:C,detailTextOverride:k,hasNotification:v,allowLiveTitle:O,documentUnfurlTs:U,isViewOnly:H,preventHoverOver:G=!1,showCanvasIa4Metadata:q,noBadge:j,showCanvasModalMetadata:z=!1,hasHighlightMarkers:K=!1,showTags:$,exceptionText:Y,hideIcon:Q=!1,isSemanticHighlight:Z=!1,showFileSummary:J=!1}){let X=(0,E.d4)(F.y),ee=(0,E.d4)(B.ZT),et=(0,n.useCallback)(({className:e})=>{let t;return Q?null:(t=A||(H?n.createElement("span",{className:"c-file_entity__view_only_icon"},n.createElement(d.Ah,{name:"eye-open",size:"20","data-qa":"file_entity__view_only_icon"})):n.createElement(S.A,{className:e,file:r,size:c.RG.medium,forceIconThumbnail:g,hasNotification:v})),q&&!z)?(0,x.KA)({quipFileId:r.id,target:t}):t},[r,g,v,A,H,q,z,Q]),ea=(0,n.useContext)(R.A)?.viewContext,en=(0,n.useCallback)(e=>{if(Y)return n.createElement("span",null,Y);let t=ee?n.createElement(w.A,{id:ee,bold:!1}):"";if((0,D.A)(e))return n.createElement(n.Fragment,null,n.createElement(T.A,{dataQa:"file_unknown_missing_text"}),n.createElement("br",null),n.createElement(T.A,null));if((0,y.Sp)(e))return n.createElement("span",null,(0,y.tJ)(e));if((0,y.aK)(e))return n.createElement("span",null,W.t("This file was deleted."));if((0,y.sR)(e))return n.createElement("span",null,W.t("You don\u2019t have access to this file."));if((0,y.c4)(e))return n.createElement("span",null,W.t("This file was not found."));if((0,y.Ki)(e)){let a=W.t("You don\u2019t have permission to view this file."),r=W.rt("Sharing canvases with external organizations has been turned off by your admins.");return e.file_access===L.a.SlackConnectCanvasSharingBlocked||"canvas_slack_connect_blocked"===e.mode?(a=W.t("Can\u2019t view this canvas"),r=W.rt("Another team owns this canvas. Canvases from external organizations can\u2019t be viewed by members of {currentWorkspaceOrgName}.",{currentWorkspaceOrgName:t})):e.file_access===L.a.SlackConnectTeamBlocked?(a=W.t("You don\u2019t have permission to view this file."),r=W.rt("This feature is still being rolled out so your organization may not be able to view this canvas yet.")):(a=W.t("Can\u2019t view this canvas"),r=W.rt("Another team owns this canvas. Canvases from external organizations can\u2019t be viewed by members of {currentWorkspaceOrgName}.",{currentWorkspaceOrgName:t})),n.createElement("div",null,n.createElement("h4",{style:V},a),n.createElement("h5",null,r))}if((0,y.AL)(e)){let a=W.t("Can\u2019t view this list"),r=W.rt("Another team owns this list. Lists from external organizations can\u2019t be viewed by members of {currentWorkspaceOrgName}.",{currentWorkspaceOrgName:t});return e.file_access===L.a.SlackConnectListsTeamBlocked&&(a=W.t("You don\u2019t have permission to view this file."),r=W.rt("This feature is still being rolled out so your organization may not be able to view this list yet.")),n.createElement("div",null,n.createElement("h4",{style:V},a),n.createElement("h5",null,r))}if((0,y.Bp)(e)){let t=W.t("This file isn\u2019t visible to you."),a=W.t("This file is only visible to members of the conversation where it was originally shared");return X&&(0,y.wL)(e)&&(t=W.t("Need permission to view"),a=W.t("Another team owns this canvas. It\u2019s only been shared with specific people in your organization.")),(0,y.l7)(e)&&(t=W.t("Need permission to view"),a=W.t("Another team owns this list. It\u2019s only been shared with specific people in your organization.")),n.createElement("div",null,n.createElement("h4",{style:V},t),n.createElement("h5",null,a))}if((0,y.kn)(e)){let e="file_header";return ea&&(e=`${e}_${ea}`),n.createElement(P.A,{context:e})}return null},[Y,ee,X,ea]),[er,ei]=(0,n.useState)(!1),el=(0,n.useContext)(M.n),eo=(0,n.useCallback)(()=>{ei(!0)},[]),es=(0,n.useCallback)(()=>{ei(!1)},[]);if((0,l.A)(r))return null;let ec=en(r),ed=h?c.pI.dim:void 0;_&&(ed=c.pI.highlightDark);let em=i()("c-file_entity__medium_base_entity",{"c-file_entity__medium_base_entity--access-denied":(0,y.Bp)(r),"c-file_entity__medium_base_entity--storage-limit":(0,y.kn)(r),"c-file_entity__medium_base_entity--file-summary":(0,y.mb)(r),"c-file_entity__medium_base_entity--align-top":J}),eu=el?el.mouseOver:er,ep=r?r.id:p,eh=j?null:n.createElement(N.A,{id:ep,size:m.o.Small,showTags:$}),e_=n.createElement(s.Ay,{size:"medium",className:em,"data-id":p||r?.id,"data-sk":(0,l.A)(a)?"medium_file_entity":a,style:ed,avatar:et,text:ec?n.createElement("span",{"data-qa":"medium_file_entity_exception"},ec):n.createElement(FileEntityMetadata,{detailType:f,isHovering:!G&&eu,file:r,fileAction:u?null:o,timestampProps:b,isDetailTextBold:C,detailTextOverride:k,documentUnfurlTs:U,allowLiveTitle:O,fileBadge:eh,showCanvasIa4Metadata:q,showCanvasModalMetadata:z,hasHighlightMarkers:K,isSemanticHighlight:Z,showFileSummary:J})}),ef={className:i()("c-file_entity",e,{"c-file_entity--exception":ec}),onMouseEnter:eo,onMouseLeave:es,"data-qa":t};return n.createElement("div",ef,e_)}function mapStateToProps(e,{id:t,file:a,fileActionOverride:n}){let r=a||(0,H.Lp)(e,t),i=(0,y.Z0)(r)?null:(0,O.q)(e,r);return{fileAction:n??i,fileFromPropsOrState:r}}MediumFileEntity.displayName="MediumFileEntity";let G=(0,U.N)(mapStateToProps)(MediumFileEntity)},0x1c003781f:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x1c403364b);function MediumFileListEntity(e){let t,{className:a,"data-qa":o,file:s,id:c,isActive:d,isDisabled:m,secondaryContent:u,timestampProps:p,forceIconThumbnail:h,isDetailTextBold:_,detailTextOverride:f,detailType:b,hideActionText:g=!1,hasNotification:y,allowLiveTitle:A,isViewOnly:x,showCanvasIa4Metadata:E,showCanvasModalMetadata:C=!1}=e,k=c||s?.id;return k?(d?t=m?i.pI.highlightDim:i.pI.highlightDark:m&&(t=i.pI.dim),n.createElement(r.A,{style:t,className:a,padding:"0",primaryContent:n.createElement(l.A,{file:s,"data-id":k,"data-qa":o,"data-sk":"medium_file_list_entity",id:k,isDisabled:m,invert:t===i.pI.highlightDark,timestampProps:p,forceIconThumbnail:!!h,isDetailTextBold:_,detailType:b,detailTextOverride:f,hideActionText:g,hasNotification:y,allowLiveTitle:A,isViewOnly:x,showCanvasIa4Metadata:E,showCanvasModalMetadata:C}),secondaryContent:u})):null}MediumFileListEntity.displayName="MediumFileListEntity";let o=MediumFileListEntity},0x1346d4ed0:(e,t,a)=>{"use strict";a.d(t,{A:()=>P,I:()=>R});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x21f3c49e8),c=a(0x20482ad21),d=a(0x128d54e52),m=a(0x1535e80f3),u=a(0x15f8e452a),p=a(0x2501a2cee),h=a(0x3796a18c),_=a(0x9613ff3a),f=a(0xe5a35d38),b=a(0x1d3efd4ea),g=a(0x1b3ecb90f),y=a(0x4e1a3b33),A=a(0x1f2e34d8),x=a(0x1bc80af71),E=a(0xbd3de346),C=a(0x22fd0ecc8),k=a(0x11093cea9),v=a(0x1529370e7),S=a(0x1c91944c9),I=a(0x104da8270),w=a(0x14ea3ce99),T=a(0xc4ff06b2),N=a.n(T);let M=new c.Ay("files");var R=((n={})[n.NORMAL=0]="NORMAL",n[n.BLACK=1]="BLACK",n);function getLeadingEmojiFromTitleBlocks(e){let t=e?.[0]?.elements?.[0]?.elements?.[0];if(t&&t?.type==="emoji"){let e=t.display_alias??t.name;return{name:`:${e}:`,url:t.display_url||t.url}}return null}function SmallFileEntity({className:e,"data-qa":t,"data-sk":a,fileFromPropsOrState:n,id:l,isDisabled:c,detailText:h,shouldShowHighlight:_=!0,shouldShowDetailText:S=!0,fontWeight:w,useLeadingEmojiAsIcon:T,shouldCheckForTemporaryFiles:R,useLiveTitleForChannelCanvas:P,useMissingIconIfFileUnknown:L,hideRichTextEmojiTooltips:O=!1,useIconOutline:D=!1,useFilledIcon:F=!1,useMonochromeExternalFileIcon:U=!1,iconSize:B,labelOverride:H,textClassName:W}){let V,G=(0,i.wA)(),q=n?.filetype||n?.highlight_type,j=(0,v.oH)(l)&&R;"inherit"===B?V="inherit":"20"===B&&(V=20);let z=(0,r.useMemo)(()=>{let e=o()({"c-file_entity__icon":!D,[N().fileIconSearch]:D});return r.createElement(u.A,{className:e,file:"svgicon",type:q,size:V})},[q,D,V]),K=(0,r.useCallback)(()=>{if(!n)return null;let e=o()("c-file_entity__icon",{"c-file_entity__icon--contained":D});if(j)return r.createElement("span",{className:e},r.createElement(p.Ah,{name:F?"canvas-content-filled":"canvas-content",size:B}));if((0,E.uO)(n)||(0,E.aK)(n))return r.createElement("span",{className:e},r.createElement(p.Ah,{name:"trash",size:B}));if((0,E.kn)(n)||(0,E.Bp)(n)||(0,E.Ki)(n)||(0,E.AL)(n))return r.createElement("span",{className:e},r.createElement(p.Ah,{name:"eye-closed",size:B}));if(!(0,E.ZG)(n))return r.createElement(u.A,{className:e,type:"question",size:V});if(n.product_icon?.url)return r.createElement("span",null,r.createElement("img",{src:n.product_icon.url,alt:n.product_icon.alt_text,className:N().productIconImg}));if((0,E.Y8)(n))return r.createElement(x.A,{iconClassName:o()(e,"p-list_icon--search"),file:n,isFilled:F,size:B});if((0,E.l7)(n)){let[t,a]=(0,k.K)((0,C.V)(n)||"");return t&&G((0,I.D)(t))&&T?r.createElement("div",{className:o()(e,"c-file_entity_emoji_container")},r.createElement(g.Ay,{text:t,emojiSize:g.lw.SMALL,showTooltip:!1,stopAnimations:!0})):r.createElement(A.A,{iconClassName:o()(e,"p-list_icon--search"),file:n,isFilled:F,size:"inherit"})}if((0,E.DQ)(n)||"docs"===n.filetype){if(T){let t=getLeadingEmojiFromTitleBlocks(n.title_blocks),[a]=(0,k.K)((0,C.V)(n)||""),i=t?.name||a,l=t?.url;if(i&&(l||G((0,I.D)(i))))return r.createElement("div",{className:o()(e,"c-file_entity_emoji_container")},r.createElement(g.Ay,{text:i,url:l,emojiSize:g.lw.SMALL,showTooltip:!1,stopAnimations:!0}))}return r.createElement("span",{className:e},r.createElement(p.Ah,{name:F?"canvas-content-filled":"canvas-content",size:B}))}if(n?.filetype&&U){let t=f.W.get(n.filetype);return r.createElement("span",{className:e},r.createElement(p.Ah,{name:t?.svgIconProps.name||"file",size:B}))}if(q)return z;if(L){let t=16;return B&&"inherit"!==B&&(t=parseInt(B,10)),r.createElement("span",{className:o()(e,"c-file_entity__missing_icon_container")},r.createElement(b.A,{size:t}))}return r.createElement("span",{className:e},r.createElement(p.Ah,{name:"file",size:B}))},[n,D,j,q,L,B,F,V,G,T,z,U]),$=(0,r.useMemo)(()=>{if(S)return r.createElement(d.Q,{"data-qa":"file_detail_text"},h)},[h,S]),Y=c?m.pI.dim:void 0;if((0,s.A)(n))return null;let Q=K();return r.createElement(d.Ay,{size:"small",className:o()("c-file_entity",e),"data-id":l||n?.id,"data-qa":t,"data-sk":(0,s.A)(a)?"small_file_entity":a,style:Y,avatar:K,text:r.createElement(d.CG,{className:o()("c-file_entity__text",W,{normal:0===w,black:1===w})},H??(j?M.t("Untitled"):r.createElement(y.A,{file:n,shouldShowHighlight:_,useLeadingEmojiAsIcon:T,useLiveTitleForChannelCanvas:P,hideRichTextEmojiTooltips:O}))),metadata:$,useAvatarOutline:Q!==z&&D})}function mapStateToProps(e,{id:t,file:a,detailType:n=h.s.FILETYPE}){let r=a||(0,w.Lp)(e,t),i=(0,_.A)(e,r,n);return{fileFromPropsOrState:r,detailText:i}}SmallFileEntity.displayName="SmallFileEntity";let P=(0,S.N)(mapStateToProps)(SmallFileEntity)},0x408bdeff:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x1346d4ed0);function SmallFileListEntity(e){let t,{className:a,"data-qa":o,file:s,id:c,isActive:d,isDisabled:m,detailType:u,secondaryContent:p,shouldShowHighlight:h=!0,shouldShowDetailText:_=!0,fontWeight:f,useLeadingEmojiAsIcon:b,shouldCheckForTemporaryFiles:g,useLiveTitleForChannelCanvas:y,useMissingIconIfFileUnknown:A,hideRichTextEmojiTooltips:x=!1,useIconOutline:E=!1,useFilledIcon:C=!1,useMonochromeExternalFileIcon:k=!1,iconSize:v,labelOverride:S,textClassName:I}=e,w=c||s?.id,T=(0,n.useMemo)(()=>w?n.createElement(l.A,{shouldShowHighlight:h,file:s,"data-id":w,"data-qa":o,"data-sk":"small_file_list_entity",id:w,detailType:u,shouldShowDetailText:_,fontWeight:f,useLeadingEmojiAsIcon:b,shouldCheckForTemporaryFiles:g,useLiveTitleForChannelCanvas:y,useMissingIconIfFileUnknown:A,hideRichTextEmojiTooltips:x,useIconOutline:E,useFilledIcon:C,useMonochromeExternalFileIcon:k,iconSize:v,labelOverride:S,textClassName:I}):null,[w,h,s,o,u,_,f,b,g,y,A,x,E,C,k,v,S,I]);return w?(d?t=m?i.pI.highlightDim:i.pI.highlightDark:m&&(t=i.pI.dim),n.createElement(r.A,{size:"small",style:t,className:a,primaryContent:T,secondaryContent:p})):null}SmallFileListEntity.displayName="SmallFileListEntity";let o=SmallFileListEntity},0x3796a18c:(e,t,a)=>{"use strict";a.d(t,{h:()=>r,s:()=>n});let n={NONE:"none",OWNER:"owner",OWNER_TIMESTAMP:"owner-timestamp",CHANNEL:"channel",SHARER:"sharer",FILETYPE:"filetype",LAST_UPDATED:"last-updated",LAST_VIEWED:"last-viewed",CREATED_TIMESTAMP:"created-timestamp",SHARED_TIMESTAMP:"shared-timestamp",ACTIVITY_MENTION:"mention",READ_TIME:"read-time"},r={Detail:"detail",View:"view",Download:"download",Window:"window",Remote:"remote",Reveal:"reveal",External:"external",Open:"open",Show:"show"}},0x9613ff3a:(e,t,a)=>{"use strict";a.d(t,{A:()=>getFileDetail});var n=a(0xbad225b5),r=a(0x1e07de0dd),i=a(0x3796a18c),l=a(0x52a2bc6d),o=a(0x839ba347),s=a(0x20b4dda68),c=a(0x1ec69ee01),d=a(0x217553e42);let getMostRelevantShare=(e,t)=>{let a=t?.shares;if(!a)return null;let n=null,r=!1,i=!1;return(0,o.A)(a.private,(e,t)=>{i=!0;let a=e.find(({share_user_id:e})=>e!==s.Q$);if(a)r=!0;else{if(r)return;a=e[0]}let l=a.ts;l&&Number(l)>Number(n?.ts||0)&&(n={ts:l,channelId:t,shareUserId:e[0].share_user_id})}),(0,o.A)(a.public,(t,a)=>{let l=(0,d.OL)(e,a);if((0,c.Ez)(l))i||(n=null),i=!0;else if(i)return;let o=t.find(({share_user_id:e})=>e!==s.Q$);if(o)r=!0;else{if(r)return;o=t[0]}let m=o.ts;m&&Number(m)>Number(n?.ts||0)&&(n={ts:m,channelId:a,shareUserId:t[0].share_user_id})}),n};function getFileChannel(e,t){let a=getMostRelevantShare(e,t);if(!a)return null;let{channelId:r}=a;return n.createElement(l.A,{channelId:r,inline:!0})}getFileChannel.displayName="getFileChannel";var m=a(0x1b9d2a258),u=a(0x20482ad21),p=a(0x21d85d6e5),h=a(0x19c76d181),_=a(0xe684f705);let f=new u.Ay("file");function getShareName(e,t,a){if(!t||t===s.Q$)return(0,m.g)(e,a);let n=(0,_.nv)(e,t),r=(0,p.sE)(e,n);return t===(0,h.WR)(e)?f.rt("{name} (you)",{name:r}):r}function getFileSharer(e,t){let{shareUserId:a}=getMostRelevantShare(e,t)||{};return getShareName(e,a,t)}var b=a(0x215eaa76b),g=a(0x10d80dc07),y=a(0xbcfcc9c7);function getFileDetail(e,t,a,l,o){if(Array.isArray(a))return a.map(a=>getFileDetail(e,t,a,l,o));switch(a){case i.s.NONE:return"";case i.s.OWNER:return(0,m.g)(e,t);case i.s.OWNER_TIMESTAMP:return n.createElement(r.A,{file:t,documentUnfurlTs:o,...l});case i.s.CHANNEL:return getFileChannel(e,t);case i.s.SHARER:return getFileSharer(e,t);case i.s.LAST_UPDATED:case i.s.LAST_VIEWED:return(0,y.N)(e,t,a);case i.s.READ_TIME:return(0,b.O)(t);case i.s.FILETYPE:default:return(0,g.A)(e,t)}}getFileDetail.displayName="getFileDetail"},0x1b9d2a258:(e,t,a)=>{"use strict";a.d(t,{g:()=>getFileOwner});var n=a(0x20482ad21),r=a(0x4cdbb756),i=a(0x21d85d6e5),l=a(0x19c76d181),o=a(0x18476a827),s=a(0xe684f705);let c=new n.Ay("file");function getFileOwner(e,t){if(!t)return"";let a=t.canvas_creator_id??t.user,n=a?(0,s.nv)(e,a):null,d=n?(0,r.A)(e,n):null,m=t.bot_id||d;if(m){let t=(0,o.AF)(e,m);if(t&&t.name)return t.name}if(n){let t=(0,i.sE)(e,n);return a===(0,l.WR)(e)?c.rt("{name} (you)",{name:t}):t}return t.username||""}},0x185d29d70:(e,t,a)=>{"use strict";a.d(t,{FZ:()=>isZipPreviewAvailable,ZV:()=>isSVGIconAvailable,a3:()=>isImagePlaceholderAvailable,iL:()=>isTextPlaceholderAvailable,lZ:()=>isEmailPlaceholderAvailable});let n=new Set(["ai","archive","audio","avi","binary","bmp","cpp","code","css","csv","doc","docs","docx","email","eml","eps","flv","gdoc","generic","gpres","gsheet","html","indd","java","lucidchart","lucidpress","lucidspark","m4a","mov","mp3","mp4","ogg","post","png","jpeg","jpg","gif","pdf","php","ppt","pptx","psd","quip","sketch","snippet","space","spreadsheet","text","tiff","video","wav","xls","xlsm","xlsx","xltx","zip","zohoshow"]);function isSVGIconAvailable({fileTypeDescription:e}){return n.has(e?.toLowerCase())}let r=new Set(["ai","audio","avi","bmp","eps","png","jpeg","jpg","gif","flv","indd","mov","psd","video","wav"]),i=new Set(["eml","email"]),l=new Set(["code","cpp","css","csv","eps","flv","gdoc","html","indd","java","m4a","mp3","mp4","ogg","post","php","quip","snippet","space","spreadsheet","text","xltx"]),o=new Set(["archive","zip","binary"]);function isImagePlaceholderAvailable({fileTypeDescription:e}){let t=e?.toLowerCase();return!!t&&r.has(t)}function isEmailPlaceholderAvailable({fileTypeDescription:e}){let t=e?.toLowerCase();return!!t&&i.has(t)}function isTextPlaceholderAvailable({fileTypeDescription:e}){let t=e?.toLowerCase();return!!t&&l.has(t)}function isZipPreviewAvailable({fileTypeDescription:e}){let t=e?.toLowerCase();return!!t&&o.has(t)}},0xf4097f62:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xdf8554bd),o=a(0xd47730c5),s=a(0x1535e80f3),c=a(0x1acf9d7d9),d=a(0x15f4f83cf),m=a(0x1b9d5cc0c),u=a(0x82980ab8),p=a(0x350d87d7),h=a(0xf2964a91),_=a(0x1c91944c9),f=a(0x1af285d2e),b=a(0xb129c1d5),g=a(0xe684f705);function InlineMemberEntity(e){let{className:t,forceRealName:a=!1,id:r,member:l,truncate:_=!1,truncateWidth:f,withTruncationTooltip:b=!1,"data-qa":g="inline_member_entity",isBold:y=!0,showAppOrBotBadge:A,isUserHidden:x=!1,showDisabledText:E=!0}=e,C=i()(t,"c-inline_member_entity"),k=(0,p.A)(l),v=(0,m.v3)(l),S=(0,h.o)(l),I=(0,d.lv)(l),w=(0,d.mX)(l),T=(0,u.wg)(l),N=(0,u.Fh)(l),M=S?s.pI.dim:void 0;return n.createElement(o.A,{className:C,"data-qa":g,"data-member-id":r||l?.id,style:M,truncate:_,truncateWidth:f,withTruncationTooltip:b,primaryContent:n.createElement("span",{className:"c-inline_member_entity__content"},n.createElement(c.A,{isBold:y,name:a||!N?T:N,inline:!0,"data-qa":"inline_member_entity__name",isAppOrBot:k,isWorkflowBot:v,isDeleted:S,isNonExistent:I,isUnknown:w,showAppOrBotBadge:A,isUserHidden:x,showDisabledText:E}))})}function mapStateToProps(e,{forceRealName:t,member:a,id:n}){let r=a||(0,g.nv)(e,n);return{member:r??void 0,forceRealName:(0,l.A)(t)?t:(0,f.E)(e),isUserHidden:r&&(0,b.a)(e,r.id)}}InlineMemberEntity.displayName="InlineMemberEntity";let y=(0,_.N)(mapStateToProps)(InlineMemberEntity)},0x71c724c8:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>R,lP:()=>M});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xb97f3675),o=a(0x1eca5a06d),s=a(0x15811db89),c=a(0x42441247),d=a(0x1535e80f3),m=a(0x2501a2cee),u=a(0x1fdec3e16),p=a(0x1c659cbb1),h=a(0x29f0e1ee),_=a(0x1acf9d7d9),f=a(0xaacd3809),b=a(0x15f4f83cf),g=a(0x1ec69ee01),y=a(0x1b9d5cc0c),A=a(0x82980ab8),x=a(0x21d85d6e5),E=a(0x1c9a3c4c1),C=a(0x350d87d7),k=a(0xf2964a91),v=a(0x6d72337),S=a(0x1c91944c9),I=a(0x5dd1c0f2),w=a(0x217553e42),T=a(0xb129c1d5),N=a(0xe684f705);let M={right:"right",bottom:"bottom"};function MediumMemberEntity(e){let{className:t,id:a,invert:r=!1,member:g,memberPrimaryName:A,memberSecondaryName:x,secondaryContent:S,secondaryContentPosition:I=M.bottom,subtext:w,showSubtext:T=!0,showAvatar:N=!0,showDraftIcon:R=!1,showPresence:P=!0,showStatus:L=!0,showTooltip:O=!0,showAppOrBotBadge:D=!0,isDeactivated:F=!1,isDisabled:U=!1,useShortMode:B,showHoverCard:H=!1,forwardedRef:W,"data-sk":V="medium_member_entity","data-qa":G="medium_member_entity",isUserHidden:q=!1,noStatusText:j=!1,showBadgeOnTextTruncation:z,description:K="",showDisabledText:$=!0,isSlackChannelExpert:Y=!1}=e,Q=(0,C.A)(g),Z=(0,y.v3)(g),J=(0,k.o)(g),X=(0,y.fy)(g),ee=(0,y.hh)(g),et=(0,E.D)(g),ea=(0,b.lv)(g),en=(0,b.mX)(g),er=n.createElement(_.A,{"data-qa":"member-entity__primary-name",name:A,invert:r&&!F,isAppOrBot:Q,isWorkflowBot:Z,showAppOrBotBadge:D,isDeleted:J,isSelf:X,isNonExistent:ea,isUnknown:en,isUserHidden:q,showBadgeOnTextTruncation:z,isAgentforce:et,isAgent:Y,isDisabled:U,showDisabledText:$}),ei=(0,v.yN)({memberId:a,children:er}),el=!q&&n.createElement(c.A,{className:"c-member__secondary-name","data-qa":"member-entity__secondary-name"},x),eo=g&&n.createElement(s.A,{className:"c-member__title","data-qa":"member-entity__title"},(0,y.rN)(g)),es=!J&&!ee&&n.createElement(f.Ay,{memberId:a,className:"c-member__presence",invert:r&&!F,"data-qa":"member-entity__presence",inline:!1}),ec=n.createElement(h.A,{memberId:a,tooltip:O,animated:B,className:"c-member__current-status c-member__current-status--medium","data-qa":"member-entity__status",noText:j}),ed=I===M.bottom&&S?n.createElement(o.A,{"data-qa":"member-entity__metadata"},S):null,em=n.createElement("span",{className:"c-member__primary_content__description"},n.createElement(u.A,{lines:1,withTooltip:!0,breakWords:!1},K)),eu=n.createElement("span",{className:"c-member__primary_content"},H?ei:er,P&&es,!B&&el,L&&ec,K&&em),ep=J||F?d.pI.dim:void 0,eh=i()(t,"c-member","c-member--medium",{"c-member--with-presence":P}),e_=(0,n.useCallback)(e=>N?R?n.createElement("span",{className:"c-member__draft_icon"},n.createElement(m.Ah,{name:"edit"})):n.createElement(p.Ay,{...e,size:d.RG.medium,userId:a,"data-qa":"member-entity__avatar",isInteractive:!1}):null,[N,R,a]);return n.createElement(l.A,{avatar:e_,className:eh,size:"medium",style:ep,text:eu,subtext:T&&(w||eo),metadata:!J&&ed,"data-qa":G,"data-sk":V,forwardedRef:W})}function mapStateToProps(e,{id:t,isDraftContext:a,member:n,showStatus:r}){let i=n||(0,N.nv)(e,t),l=!1;if(a&&t){let a=(0,w.Pu)(e,t);l=!!(a&&(0,g.yc)(e,a.id))}let o=t||i?.id,s=(0,y.PV)(i),c=(0,I.rQ)(e,s);return{id:o,member:i??void 0,memberPrimaryName:(0,x.sE)(e,i,!1,!1),memberSecondaryName:(0,A.Mu)(e,i),showDraftIcon:l,showStatus:r&&(0,y.aH)(i),isUserHidden:!!o&&(0,T.a)(e,o),isSlackChannelExpert:c}}MediumMemberEntity.displayName="MediumMemberEntity";let R=(0,S.N)(mapStateToProps)(MediumMemberEntity)},0x8ef14dd3:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0x1a592c177),r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0xa6f3163b);function listEntityButton(e,t){let a=class extends r.PureComponent{constructor(e){super(e),this.state={isActive:!1},this.handleMouseEnter=this.handleMouseEnter.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this)}handleMouseEnter(){this.setState(()=>({isActive:!0}))}handleMouseLeave(){this.setState(()=>({isActive:!1}))}render(){let{id:a,listEntityProps:n,className:i,autoClogProps:s,...c}=this.props,{isActive:d}=this.state,m=l()(n?.className,t?.className);return r.createElement(o.A,{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:i,autoClogProps:s,...c},r.createElement(e,{id:a,isActive:d&&!this.props.disabled,isDisabled:this.props.disabled,...t,...n,className:m}))}};return a.displayName="ListEntityButton",a}listEntityButton.displayName="listEntityButton";let s=listEntityButton(n.A,{useShortMode:!0})},0x1a592c177:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x24f1e08bb),o=a(0x1535e80f3),s=a(0x410829f8),c=a(0x71c724c8),d=a(0x16d23a245),m=a(0x1c91944c9),u=a(0xe684f705);let p=class extends n.Component{render(){let e,{className:t,isActive:a=!1,isDeactivated:r=!1,isDisabled:d=!1,secondaryContent:m,secondaryContentPosition:u=c.lP.right,showUnreadCount:p=!1,showStatus:h,showPresence:_,useShortMode:f=!1,showHoverCard:b,forwardedRef:g,unreadCount:y}=this.props,A=p&&y&&n.createElement(s.Gm,{className:"c-member__unread_count",count:y,style:s.rY.red}),x=m&&n.createElement("span",{className:"c-member__details","data-qa":"member-entity__secondary-content"},m),E=(u===c.lP.right&&x||A)&&n.createElement("span",{className:"c-member__secondary_content"},u===c.lP.right&&x,A),C=i()(t,"c-medium_member_list_entity");return a?e=d||r?o.pI.highlightDim:o.pI.highlightLight:(d||r)&&(e=o.pI.dim),n.createElement(l.A,{"data-qa":"medium_member_list_entity",className:C,style:e,primaryContent:n.createElement(c.Ay,{...this.props,secondaryContent:u===c.lP.right?null:m,showStatus:h,showPresence:_,showHoverCard:b,useShortMode:f,forwardedRef:g}),secondaryContent:E,size:"medium"})}};function mapStateToProps(e,{id:t}){let a=(0,u.nv)(e,t);return{member:a??void 0,unreadCount:(0,d.A)(e,a)}}p.displayName="MediumMemberListEntity";let h=(0,m.N)(mapStateToProps,null,null,{forwardRef:!0})(p)},0x6d6f08a7:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb97f3675),l=a(0x24f1e08bb),o=a(0x2501a2cee);let s=new r.Ay("channel_invite"),SmallEmailInviteListEntity=({email:e})=>{let t=(0,n.useCallback)(()=>n.createElement("span",{className:"margin_right_50","data-qa":"small-email-entity-icon"},n.createElement(o.Ah,{name:"paper-plane",size:"20"})),[]),a=n.createElement("div",{"data-qa":"small-email-entity-invite-label"},s.rt("<strong>Invite</strong> {email}",{email:e}));return n.createElement(l.A,{primaryContent:n.createElement(i.A,{text:a,avatar:t,size:"small"}),size:"small"})};SmallEmailInviteListEntity.displayName="SmallEmailInviteListEntity";let c=SmallEmailInviteListEntity},0xc34fd270:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>W,Cg:()=>B});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xdf8554bd),o=a(0x20482ad21),s=a(0x42441247),c=a(0x128d54e52),d=a(0x1535e80f3),m=a(0x410829f8),u=a(0x2501a2cee),p=a(0x1c659cbb1),h=a(0x40bfc888),_=a(0x1acf9d7d9),f=a(0x17afadb2a),b=a(0xaacd3809),g=a(0x246bcdebc),y=a(0x243435af9),A=a(0x96dd42eb),x=a(0x15f4f83cf),E=a(0x1ec69ee01),C=a(0x1b9d5cc0c),k=a(0x16d23a245),v=a(0x82980ab8),S=a(0x1c9a3c4c1),I=a(0x350d87d7),w=a(0xf2964a91),T=a(0xdb0ffe37),N=a(0x50c6f5ae),M=a(0x1aad32b98),R=a(0x1c91944c9),P=a(0x1af285d2e),L=a(0x5dd1c0f2),O=a(0x217553e42),D=a(0x14149c126),F=a(0xb129c1d5),U=a(0xe684f705);let B=16,H=new o.Ay("members");function SmallMemberEntity(e){let t,a,{className:r,id:l,invert:o=!1,member:y,teamId:A,showAvatar:E=!0,showDraftIcon:k=!1,showPresence:M=!0,showBadge:R=!0,showStatus:P=!0,showTooltip:L=!0,showUnreadCount:O=!1,showDeactivated:D=!0,showAppOrBotBadge:F=!0,isDeactivated:U=!1,unreadCount:W,useShortMode:V=!1,forceRealName:G=!1,tokenSize:q,truncateStatus:j=!1,withTruncationTooltip:z,"data-sk":K="small_member_entity","data-qa":$="small_member_entity",isBold:Y,experimentSidebarPrefsApplyToMenusGroupOn:Q=!1,isUserHidden:Z=!1,hasNoAccess:J=!1,forceAvatarPresenceIndicator:X=!1,experimentAgentforceGroupOn:ee=!1,experimentSidekicksGroupOn:et=!1,avatarSize:ea=d.RG.small,useAtSymbolForDisplayName:en=!1,useSmallerDisplayName:er=!1,isSearchSuggestion:ei,allowTeamNameAriaLabelFromPrefix:el=!1,isSlackChannelExpert:eo=!1}=e,es=(0,I.A)(y),ec=(0,C.v3)(y),ed=(0,w.o)(y),em=(0,T.g)(y),eu=(0,C.fy)(y),ep=(0,C.hh)(y),eh=(0,S.D)(y),e_=(0,N.o)(y),ef=(0,x.lv)(y),eb=(0,x.mX)(y),eg=ef||eb,ey=o&&!U,eA=D&&ed,ex=(0,v.wg)(y),eE=(0,v.Fh)(y);Z?(t=H.t("Name hidden"),a=H.t("Name hidden")):G||!eE?(t=ex,a=eE?`${en?"@":""}${eE}`:void 0):(t=eE,a=ex);let eC=n.createElement(_.A,{"data-qa":"member-entity__primary-name",className:"c-member__member-name",name:t,invert:ey,isAppOrBot:es,isWorkflowBot:ec,isDeleted:eA,isSelf:eu,isNonExistent:ef,isUnknown:eb,withTruncationTooltip:z,isBold:Y,isAgentforce:ee&&eh,isAgent:eo,isSidekick:et&&e_,showAppOrBotBadge:F}),ek=!Z&&!ep&&n.createElement(s.A,{className:i()("c-member__secondary-name",{"c-member__secondary-name--smaller":er,"c-member__secondary-name--interpunct":ei}),"data-qa":"member-entity__secondary-name"},a),ev=(0,n.useMemo)(()=>Z||ed||ep?null:n.createElement(b.Ay,{memberId:l||y?.id,className:"c-member__presence",invert:ey,inline:!1}),[Z,ed,ep,l,ey,y]),eS=(0,n.useCallback)(e=>E?Z?n.createElement("span",{className:"c-search_autocomplete__hidden_member_icon "},n.createElement(u.Ah,{size:"20",name:"user-hide"})):eg?n.createElement(f.A,{...e,"data-qa":"member-entity__missing",isNonExistent:ef,size:20}):k?n.createElement("span",{className:"c-member__draft_icon"},n.createElement(u.Ah,{name:"edit"})):n.createElement(p.Ay,{...e,"data-qa":"member-entity__avatar",size:ea,userId:l,user:y,showBadge:R,tabIndex:-1,isInteractive:!1,tokenSize:q,hasNoAccess:J,showPresence:X}):M&&Q?ev:null,[E,l,ef,eg,y,q,k,Z,ev,M,R,Q,J,X,ea]),eI=em&&n.createElement(g.A,{...e,"data-qa":"member-entity__team-icon",id:A,size:B,className:"c-member__team_icon",allowTeamNameAriaLabelFromPrefix:el}),ew=n.createElement(h.A,{memberId:l||"",tooltip:L,animated:V,className:i()("c-member__current-status","c-member__current-status--small",{overflow_ellipsis:j}),"data-qa":"member-entity__status"}),eT=O&&!!W&&n.createElement(m.Gm,{className:"c-member__unread_count",count:W,style:ey?m.rY.white:m.rY.red,"data-qa":"member-entity__mention-badge"}),eN=n.createElement("span",{className:"c-member__primary_content"},eC,M&&!eg&&E&&ev,!V&&ek,P&&ew),eM=(eI||eT)&&n.createElement("span",{className:"c-member__secondary_content"},eI,eT),eR=ed&&!o?d.pI.dim:void 0,eP=i()(r,"c-member","c-member--small",{"c-member--with-presence":M,"c-member--deleted":ed,"c-base_entity--dim":Z});return n.createElement(c.Ay,{avatar:eS,className:eP,text:eN,size:"small",style:eR,subtext:eM,"data-qa":$,"data-sk":K})}function mapStateToProps(e,{forceRealName:t,member:a,id:n,isDraftContext:r,showStatus:i,onlyBoldIfUnread:o,useShortMode:s,neverBold:c}){let d,m,u=a||(0,U.nv)(e,n),p=n||u?.id;p&&(r||o)&&(d=(0,O.Pu)(e,p));let h=(0,F.a)(e,p),_=!0;h?_=!!s:o?_=!!(d&&(0,E.KJ)(d)):c&&(_=!1),r&&(m=!!(d&&(0,E.yc)(e,d.id)));let f=(0,C.PV)(u);return{id:n||u?.id,member:u??void 0,teamId:(0,M.Ux)(e,u),forceRealName:(0,l.A)(t)?t:(0,P.E)(e),unreadCount:(0,k.A)(e,u),showDraftIcon:m,showStatus:i&&(0,C.aH)(u),isBold:_,experimentSidebarPrefsApplyToMenusGroupOn:"on"===(0,D._Z)(e,"sidebar_prefs_apply_to_menus"),isUserHidden:h,experimentAgentforceGroupOn:(0,y.mr)(e),experimentSidekicksGroupOn:(0,A.Q)(e),isSlackChannelExpert:(0,L.rQ)(e,f)}}SmallMemberEntity.displayName="SmallMemberEntity";let W=(0,R.N)(mapStateToProps)(SmallMemberEntity)},0x10d53599f:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x24f1e08bb),o=a(0x1535e80f3),s=a(0xc34fd270);let c=class extends n.Component{render(){let e,{className:t,id:a,isActive:r=!1,isDeactivated:c=!1,isDisabled:d=!1,isDraftContext:m,showAvatar:u,showBadge:p,showPresence:h,showAppOrBotBadge:_,showStatus:f,showTooltip:b,withTruncationTooltip:g,showUnreadCount:y,useShortMode:A,secondaryContent:x,onlyBoldIfUnread:E=!1,forceRealName:C,hasNoAccess:k,forceAvatarPresenceIndicator:v,removePadding:S,avatarSize:I,useAtSymbolForDisplayName:w,useSmallerDisplayName:T,showDeactivated:N,isSearchSuggestion:M}=this.props;return r?e=d||c?o.pI.highlightDim:o.pI.highlightDark:(d||c)&&(e=o.pI.dim),n.createElement(l.A,{className:i()(t,"c-small_member_list_entity"),primaryContent:n.createElement(s.Ay,{id:a,invert:e===o.pI.highlightDark,isDeactivated:c,truncateStatus:!!x,showAvatar:u,showPresence:h,showBadge:p,showAppOrBotBadge:_,useShortMode:A,showStatus:f,showTooltip:b,withTruncationTooltip:g,showUnreadCount:y,isDraftContext:m,onlyBoldIfUnread:E,forceRealName:C,hasNoAccess:k,forceAvatarPresenceIndicator:v,avatarSize:I,useAtSymbolForDisplayName:w,useSmallerDisplayName:T,showDeactivated:N,isSearchSuggestion:M,...this.props}),secondaryContent:x,size:"small",style:e,padding:S?o.FK.none:o.FK.normal})}};c.displayName="SmallMemberListEntity";let d=c},0x1acf9d7d9:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x181d663bb),o=a(0x20482ad21),s=a(0x128d54e52),c=a(0xdc1367a8),d=a(0x6e465d95),m=a(0x202fa5d55);let u=new o.Ay("inline_member");function MemberName(e){let t,{className:a,multiline:r=!1,inline:o=!1,invert:p=!1,name:h,isSelf:_=!1,isAppOrBot:f=!1,isWorkflowBot:b=!1,showAppOrBotBadge:g=!0,isDeleted:y=!1,isUnknown:A=!1,isNonExistent:x=!1,isDisabled:E=!1,withTruncationTooltip:C=!1,isBold:k=!0,isUserHidden:v=!1,isChannelFiles:S=!1,isCreator:I=!1,showMemberNameIfHidden:w=!1,showBadgeOnTextTruncation:T,isAgentforce:N=!1,isAgent:M=!1,isSidekick:R=!1,showDisabledText:P=!0,highlightedDisplayName:L}=e;if(A||x)t=n.createElement(c.A,{type:x?"non-existent":"unknown","data-qa":"member_name__missing"});else if(v&&!w)t=u.t("Name hidden");else if(S){let e=u.rt("Created by {name}",{name:h});t=I?e:u.rt("Shared by {name}",{name:h})}else t=h;let O=i()(a,"c-member_name",{"c-member_name--deactivated":y||E,"c-member_name--inverted":p}),D=(f||b||R||M)&&g,F=u.t("(deactivated)");E&&(N||M)&&(F=u.t("(Unavailable)"));let U=t;return D&&T?U=n.createElement("span",{className:"c-member_name__text"},t):L&&(U=n.createElement(m.A,{text:L})),n.createElement(s.CG,{className:O,multiline:r,inline:o,withTruncationTooltip:C,...(0,l.A)(e)},n.createElement(k?"strong":"span",{className:i()({"c-member_name__container":D&&T}),"data-qa":"member_name"},U,_&&n.createElement("span",{className:"c-member_name__indicator","data-qa":"member_name__you"},u.t("(you)")),(y||E)&&P&&n.createElement("span",{className:"c-member_name__indicator","data-qa":"member_name__deactivated"},F),D&&n.createElement(d.A,{className:"c-member_name__indicator","data-qa":"member_name__app",inverse:p,isWorkflow:b,isAgent:M,isAgentforce:N,isSidekick:R})))}MemberName.displayName="MemberName";let p=MemberName},0x22eb73b0a:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xd47730c5),o=a(0x1535e80f3),s=a(0x12a234027),c=a(0x1c91944c9),d=a(0x217553e42);function InlineMpimEntity({id:e,isDeactivated:t=!1,className:a,mpim:r,truncate:c=!1,truncateWidth:d,withTruncationTooltip:m,"data-qa":u,"data-sk":p="inline_mpim_entity",matchData:h,equalizeMembersListToMatchData:_=!1}){let f=i()(a,"c-inline_mpim_entity"),b=e||r?.id,g=t?o.pI.dim:void 0;return n.createElement(l.A,{className:f,"data-id":b,"data-qa":u,"data-sk":p,style:g,truncate:c,truncateWidth:d,withTruncationTooltip:m,primaryContent:n.createElement("span",{className:"c-inline_mpim_entity__content"},n.createElement(s.A,{mpim:r,inline:!0,matchData:h,equalizeMembersListToMatchData:_}))})}function mapStateToProps(e,{id:t,mpim:a}){return{mpim:a||(0,d.OL)(e,t)}}InlineMpimEntity.displayName="InlineMpimEntity";let m=(0,c.N)(mapStateToProps)(InlineMpimEntity)},0x10865eb30:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x1673f3229),i=a(0x128d54e52),l=a(0x1535e80f3),o=a(0x12a234027),s=a(0x1eb7b2407),c=a(0x1ec69ee01),d=a(0x1c91944c9),m=a(0x19c76d181),u=a(0x217553e42);function MediumMpimEntity({className:e,currentUserId:t,id:a,isDeactivated:d=!1,mpim:m,subtext:u,"data-qa":p,"data-sk":h="medium_mpim_entity"}){let _=(0,r.A)((0,c.Ug)(m),t),f=d?l.pI.dim:void 0,b=a||m?.id,g=(0,n.useCallback)(e=>n.createElement(s.A,{...e,"data-qa":"avatar",primaryMemberId:_[0],secondaryMemberId:_[1]}),[_]);return n.createElement(i.Ay,{avatar:g,className:e,"data-id":b,"data-qa":p,"data-sk":h,size:"medium",style:f,text:m?n.createElement(o.A,{mpim:m,className:"c-medium-unified-mpim__name",multiline:!0}):void 0,subtext:u})}function mapStateToProps(e,{id:t,mpim:a}){return{currentUserId:(0,m.WR)(e),mpim:a||(0,u.OL)(e,t)}}MediumMpimEntity.displayName="MediumMpimEntity";let p=(0,d.N)(mapStateToProps)(MediumMpimEntity)},0x132bfadf:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x10865eb30);function MediumMpimListEntity({className:e,id:t,isActive:a=!1,isDeactivated:o=!1,isDisabled:s=!1,mpim:c,secondaryContent:d,subtext:m,"data-qa":u}){let p,h=t||c?.id;return a?p=s||o?i.pI.highlightDim:i.pI.highlightLight:(s||o)&&(p=i.pI.dim),n.createElement(r.A,{className:e,primaryContent:n.createElement(l.A,{id:h,"data-id":h,"data-qa":u,"data-sk":"medium_mpim_list_entity",isDeactivated:o,subtext:m,mpim:c}),secondaryContent:d,size:"medium",style:p})}MediumMpimListEntity.displayName="MediumMpimListEntity";let o=MediumMpimListEntity},0x1a76e2767:(e,t,a)=>{"use strict";a.d(t,{b:()=>G});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x128d54e52),o=a(0x1535e80f3),s=a(0x2469ec64e),c=a(0x410829f8),d=a(0x2173e1832),m=a(0x4c96e5d9),u=a(0x12b6a33fc),p=a(0x1fdec3e16),h=a(0x1c659cbb1),_=a(0x12a234027),f=a(0x1acf9d7d9),b=a(0x17afadb2a),g=a(0x15f4f83cf),y=a(0x1b9d5cc0c),A=a(0x21d85d6e5),x=a(0x350d87d7),E=a(0xf2964a91),C=a(0x1c91944c9),k=a(0xe684f705);let v=n.forwardRef((e,t)=>{let a,{id:r,invert:l=!1,member:s,memberPrimaryName:c,isDeactivated:d=!1,isHidden:m=!1}=e,u=(0,x.A)(s),p=(0,y.v3)(s),_=(0,E.o)(s),A=(0,g.lv)(s),C=(0,g.mX)(s),k=A||C,v=n.createElement(f.A,{"data-qa":"mpim-entity__name",name:c,invert:l&&!d,isAppOrBot:u,isWorkflowBot:p,isDeleted:_,isNonExistent:A,isUnknown:C});a=k?n.createElement(b.A,{isNonExistent:A,size:20}):n.createElement(h.Ay,{className:"c-small_mpim_entity__member_avatar","data-qa":"mpim-entity__avatar",size:o.RG.small,userId:r,tabIndex:-1,isInteractive:!1});let S=i()("c-small_mpim_entity__member",{"c-small_mpim_entity__member--deleted":_,"c-small_mpim_entity__member--hidden":m});return n.createElement("div",{className:S,"data-id":r,ref:t},a,v)}),S=(0,C.N)((e,{id:t})=>{let a=(0,k.nv)(e,t);return{member:a,memberPrimaryName:(0,A.sE)(e,a,!1,!1)}},null,null,{forwardRef:!0})(v);var I=a(0x807220a2),w=a(0x19bf376f9),T=a(0x20482ad21),N=a(0x1e864b930),M=a(0x149af4496),R=a(0x226892387),P=a(0x19c76d181);let L=new T.Ay("channel_token"),O=(0,I.Ar)()?e=>{let t,a=(0,w.c)(5),{memberIds:r}=e,i=(0,R.d4)(P.WR)??void 0;if(a[0]!==r||a[1]!==i){let e;a[3]!==i?(e=(e,t)=>n.createElement(M.A,{key:e,userId:e,isFirst:0===t,isSelf:i===e}),a[3]=i,a[4]=e):e=a[4];let l=r.map(e);r.length>11&&(l=l.slice(0,10).concat(L.rt("{count} others",{count:r.length-10}))),t=n.createElement(n.Fragment,null,(0,N.A)(l)),a[0]=r,a[1]=i,a[2]=t}else t=a[2];return t}:({memberIds:e})=>{let t=(0,R.d4)(P.WR)??void 0,a=e.map((e,a)=>n.createElement(M.A,{key:e,userId:e,isFirst:0===a,isSelf:t===e}));return e.length>11&&(a=a.slice(0,10).concat(L.rt("{count} others",{count:e.length-10}))),n.createElement(n.Fragment,null,(0,N.A)(a))};O.displayName="TooltipMemberNames";var D=a(0x1ec69ee01),F=a(0x1ecc7f772),U=a(0x1bf2e92ec),B=a(0x8baf11b5),H=a(0x217553e42),W=a(0x1fb2d2a87),V=a(0x14149c126);function MPIMMask({id:e}){return n.createElement("svg",{className:"sr-only"},n.createElement("clipPath",{id:e,clipPathUnits:"objectBoundingBox"},n.createElement("path",{d:"M1,0 H0 V1 H0.4 V0.625 C0.4,0.53,0.53,0.4,0.625,0.4 H1 V0"})))}MPIMMask.displayName="MPIMMask";let SmallMpimEntity=({className:e,"data-qa":t,"data-sk":a="small_mpim_entity",memberList:r=null,id:f,invert:y=!1,isDeactivated:A=!1,mpim:x,memberIds:E=[],clientTheme:C="light",matchData:k,onlyBoldIfUnread:v=!1,showUnreadBadge:I=!1,showMemberList:w=!1,unreadCount:T=0,shortenTooltipContents:N=!1,showAvatar:M=!0,experimentSidebarPrefsApplyToMenusGroupOn:R=!1,tooltipPosition:P=u.Zj.TopRight,disableTooltip:L=!1,isMpimSuggestion:F=!1,isMpimSearchInChannelSuggestion:U=!1,truncate:B=!0})=>{let H=(0,g.lv)(x),W=(0,g.mX)(x),V=(0,D.N4)(x),G=f||x?.id,q=y&&!A,j=I&&!!T&&n.createElement(c.Gm,{className:"c-member__unread_count",count:T,style:q?c.rY.white:c.rY.red,"data-qa":"member-entity__mention-badge"}),z=j&&n.createElement("span",{className:"c-member__secondary_content"},j),K=(0,n.useMemo)(()=>`mpim-mask-${(0,s.r9)()}`,[]),$=F?o.RG.smallListVariantOutline:o.RG.inline,Y=(0,n.useMemo)(()=>({"--mpim-size":`${$}px`}),[$]),Q=(0,n.useMemo)(()=>({"--mpim-mask":`url(#${K})`}),[K]),Z=(0,n.useCallback)(t=>{if(H||W)return n.createElement(b.A,{dataQa:t.dataQa,className:t.className,isNonExistent:H,size:o.RG.small,invert:q,subtler:t.subtler});let a=E?.[0],r=M&&n.createElement(h.Ay,{userId:a,className:"c-small_mpim_entity__mpim_avatars_mpim1",size:$,isInteractive:!1,"data-qa":"small-mpim-entity-mpim-avatar"}),l=n.createElement("div",{className:i()({"c-small_mpim_entity__mpim_counter":!F,"c-small_mpim_entity__mpim_counter--count-only":!M&&R,"c-small_mpim_entity__mpim_counter--updated":F}),"data-qa":"small-mpim-entity-mpim-counter"},n.createElement("div",{"aria-hidden":!0,className:"c-small_mpim_entity__mpim_counter_inner"},V));return n.createElement("span",{className:i()("c-small_mpim_entity__mpim_avatars","c-small_mpim_entity__count",e,{"c-small_mpim_entity__mpim_avatars--inverted":q,[`c-small_mpim_entity__mpim_avatars--${C}`]:"light"!==C,"c-small_mpim_entity__mpim_avatars--reduced-margin":U}),style:F?Y:void 0},F&&n.createElement(MPIMMask,{id:K}),F?n.createElement("div",{style:Q},r,l):n.createElement(n.Fragment,null,r,l))},[H,W,E,e,q,C,Y,K,F,Q,M,$,R,V,U]),J=(0,n.useCallback)(()=>{let e;return e=N?n.createElement(O,{memberIds:E}):E?.map(e=>n.createElement(S,{id:e,key:e})),n.createElement(n.Fragment,null,e)},[E,N]),X=A?o.pI.dim:void 0;q&&(X=o.pI.highlightDark);let ee=i()(e,{"c-small_mpim_entity__with_member_list":w}),et=n.createElement(l.Ay,{"data-id":G,"data-qa":t,"data-sk":a,avatar:Z,className:ee,size:o.ny.small,style:X,subtext:z,truncate:B,text:n.createElement(n.Fragment,null,n.createElement(_.A,{mpim:x,className:"c-small_mpim_entity__primary_name",invert:q,matchData:k,onlyBoldIfUnread:v,truncate:B}),w&&n.createElement("div",{className:"c-small_mpim_entity__member_list"},n.createElement(p.A,{lines:1},r)))});return L?et:n.createElement(m.Ay,{tip:J(),tipClassName:N?"":"c-small_mpim_entity__tooltip",position:P,shouldOnlyShowWhenTruncated:!0,zIndex:d.m.AboveFullScreen},n.createElement("div",null,et))};SmallMpimEntity.displayName="SmallMpimEntity";let G=(0,C.N)((e,{id:t,mpim:a,matchData:n})=>{let r=a||(0,H.OL)(e,t),i=(0,B.B)(e,t),l="on"===(0,V._Z)(e,"sidebar_prefs_apply_to_menus"),o=(0,U.M)({state:e,mpim:r,matchData:n}),s=(0,W.to)(e),c=(0,D.kR)(r,i);return{memberList:(0,F.Xx)(e,r,o,!0),mpim:r,experimentSidebarPrefsApplyToMenusGroupOn:l,memberIds:o,clientTheme:s,unreadCount:c}})(SmallMpimEntity)},0x1bc5ae1c9:(e,t,a)=>{"use strict";a.d(t,{M:()=>SmallMpimListEntity});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x12b6a33fc),o=a(0x1a76e2767);let SmallMpimListEntity=({className:e,"data-qa":t,id:a,isActive:s=!1,isDeactivated:c=!1,isDisabled:d=!1,matchData:m,mpim:u,secondaryContent:p,onlyBoldIfUnread:h=!1,showUnreadBadge:_=!1,shortenTooltipContents:f=!1,showAvatar:b=!0,showMemberList:g=!1,tooltipPosition:y=l.Zj.TopRight,truncate:A=!0,disableTooltip:x=!1,isMpimSuggestion:E=!1,isMpimSearchInChannelSuggestion:C=!1})=>{let k=a||u?.id,v=i.pI.normal;s?v=d||c?i.pI.highlightDim:i.pI.highlightDark:(d||c)&&(v=i.pI.dim);let getPrimaryContent=()=>n.createElement(o.b,{id:k,"data-id":k,"data-qa":t,"data-sk":"small_mpim_list_entity",invert:v===i.pI.highlightDark,isDeactivated:c,matchData:m,mpim:u,onlyBoldIfUnread:h,showUnreadBadge:_,shortenTooltipContents:f,showAvatar:b,showMemberList:g,tooltipPosition:y,disableTooltip:x,isMpimSuggestion:E,isMpimSearchInChannelSuggestion:C,truncate:A});return getPrimaryContent.displayName="getPrimaryContent",n.createElement(r.A,{className:e,style:v,primaryContent:getPrimaryContent(),secondaryContent:p,size:i.ny.small})};SmallMpimListEntity.displayName="SmallMpimListEntity"},0x12a234027:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x24c261bcb),i=a(0x658a411c),l=a(0x128d54e52),o=a(0xa2cd8b62),s=a(0x339b339c),c=a(0x15f4f83cf),d=a(0x1ec69ee01),m=a(0x1ecc7f772),u=a(0x1bf2e92ec),p=a(0x1c91944c9),h=a(0xe684f705);function MpimName({className:e,mpim:t,multiline:a=!1,name:i,invert:m=!1,isAnyMemberUnknown:u=!1,inline:p=!1,onlyBoldIfUnread:h=!1,truncate:_=!0}){let f=(0,c.mX)(t),b=(0,c.lv)(t),g=(0,d.N4)(t),y=!h||(0,d.KJ)(t),A=i;return f||b||u?A=(0,r.A)(g||4).map(e=>n.createElement(s.A,{key:e,className:"c-mpim_entity__missing_text",isNonExistent:b,size:"random",invert:m,dataQa:"mpim_name_missing"})):(A=n.createElement(o.a,{channel:t,name:i??""}),A=y?n.createElement("strong",{"data-qa":"mpim_name"},A):n.createElement("span",{"data-qa":"mpim_name"},A)),n.createElement(l.CG,{className:e,multiline:a,breakWords:!1,inline:p,truncate:_},A)}MpimName.displayName="MpimName";let _=(0,p.N)((e,{mpim:t,matchData:a,equalizeMembersListToMatchData:n=!1})=>{let r=(0,u.M)({state:e,mpim:t,matchData:a,equalizeMembersListToMatchData:n}),l=r&&r.map(t=>(0,h.nv)(e,t));return{name:(0,m.Xx)(e,t,r),isAnyMemberUnknown:(0,i.A)(l,c.GU)}})(MpimName)},0x5173f451:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x58199183).A},0x19f9319b4:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x120c268ad),o=a.n(l),s=a(0x128d54e52),c=a(0x15f8e452a),d=a(0x2501a2cee),m=a(0xe1644a69),u=a(0x1e8587960),p=a(1927545e3),h=a(0x20c703bc5),_=a(0x77d15e7e),f=a(0x226892387);function SmallViewEntity({className:e,id:t,isDisabled:a,useIconOutline:r,isViewSuggestion:l}){let b=(0,_.lI)(t),g=(0,u.w0)(t),y=(0,u.Mg)(t),A=(0,n.useCallback)(()=>{if(g)return n.createElement("div",{className:"c-page_view_entity__icon"},t===p.c.DailyDigest?n.createElement(m.o,{type:"summary",size:"20"}):n.createElement(d.Ah,{name:g,size:l?"16":"20"}));if(y)return n.createElement(c.A,{className:"c-page_view_entity__icon",type:y});let e="list";return"Vall_threads"===t&&(e="small-reply"),"Vapp_space"===t&&(e="gn-menu"),"Vhome"===t&&(e="home"),"Vactivity"===t&&(e="bell-o"),"Vmore"===t&&(e="small-ellipsis"),n.createElement(c.A,{className:"c-page_view_entity__icon",type:e})},[g,y,t,l]),x=(0,f.d4)(e=>{if(b)return b.name;let a=(0,h.X)(t);return"function"!=typeof a?"Unknown":a(e)}),E=a?i.pI.dim:void 0;return n.createElement(s.Ay,{size:"small",className:o()("c-page_view_entity",e),style:E,avatar:A,text:n.createElement("span",{className:"c-page_view_entity__text"},x),useAvatarOutline:r})}SmallViewEntity.displayName="SmallViewEntity";let b=SmallViewEntity;function SmallPageViewListEntity(e){let t,{className:a,id:l,isActive:o,isDisabled:s,secondaryContent:c,useIconOutline:d,isViewSuggestion:m}=e;return o?t=s?i.pI.highlightDim:i.pI.highlightDark:s&&(t=i.pI.dim),n.createElement(r.A,{size:"small",style:t,className:a,primaryContent:n.createElement(b,{id:l,isDisabled:s,useIconOutline:d,isViewSuggestion:m}),secondaryContent:c})}SmallPageViewListEntity.displayName="SmallPageViewListEntity";let g=SmallPageViewListEntity},0xfe01b0d8:(e,t,a)=>{"use strict";a.d(t,{A:()=>Q});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x16cf1da63),o=a(0x120c268ad),s=a.n(o),c=a(0x128d54e52),d=a(0x2501a2cee),m=a(0x1fdec3e16),u=a(0x12185e091),p=a(0x1ecc7f772),h=a(0x226892387),_=a(0x14149c126);let SearchQueryChannelMention=({channel:e})=>{let t=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),a=(0,h.d4)(a=>(0,p.SB)(a,e,{publicChannelIncludeHashSign:t,privateChannelUseHashSign:t}));return t?n.createElement("span",{className:"c-search_query_entity__token c-search_query_entity__token_unified"},n.createElement("span",{className:"c-search_query_entity__token_label"},a)):n.createElement("span",{className:"c-search_query_entity__token"},n.createElement("span",{className:"c-search_query_entity__token_label"},(0,u.Zp)(e)&&n.createElement("span",{className:"c-search_query_entity__token_label_icon"},n.createElement(d.Ah,{name:"lock-filled"})),(0,u.rW)(e)&&n.createElement("span",{className:"c-search_query_entity__token_label_icon"},n.createElement(d.Ah,{name:"channel"})),n.createElement("b",null,a)))};SearchQueryChannelMention.displayName="SearchQueryChannelMention";let f=n.memo(SearchQueryChannelMention);var b=a(0x108fb4e96);let SearchQueryDateFilter=({modifier:e,dateString:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens"));return n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":a})},n.createElement("span",{className:"c-search_query_entity__token_label"},a&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:"calendar",size:"inherit"})),(0,b.av)()[e],":",n.createElement("b",null,(0,b.L5)()[t]??t)))};SearchQueryDateFilter.displayName="SearchQueryDateFilter";var g=a(0x20482ad21),y=a(0x15a4ffb05),A=a(0x1454650c2);let x=new g.Ay("search"),SearchQueryHasFilter=({theAttribute:e,modifier:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),r=t&&(0,b.av)()[t]?`${(0,b.av)()[t]}:`:`${x.t("has")}:`;return n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":a})},n.createElement("span",{className:"c-search_query_entity__token_label"},a&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:A.T[e.toLowerCase()]??"reaction",size:"inherit"})),r,n.createElement("b",null,n.createElement(y.A,{text:e}))))};SearchQueryHasFilter.displayName="SearchQueryHasFilter";var E=a(0x339b339c),C=a(0x2376ea9bb),k=a(0x2430d55d5),v=a(0x1b3ecb90f),S=a(0x21d85d6e5),I=a(0x4b8e0952),w=a(0x2242cf9de),T=a(0x1c91944c9),N=a(0x131598af9),M=a(0x217553e42),R=a(0xb129c1d5),P=a(0xe684f705);let L=new g.Ay("search");let SearchQueryInFilterBase=class SearchQueryInFilterBase extends n.PureComponent{static defaultProps={channel:void 0,channelSection:void 0,team:void 0,modifier:void 0,fallbackName:void 0,displayName:void 0,isUnknown:!1,isNonExistent:!1,isUserHidden:!1,isMention:!1,experimentOmniUnifiedFilterTokensGroupOn:!1};render(){let{channel:e,displayName:t,fallbackName:a,isUnknown:r,isNonExistent:i,channelSection:l,team:o,member:c,isUserHidden:m,isMention:p,modifier:h,experimentOmniUnifiedFilterTokensGroupOn:_}=this.props,f=h&&(0,b.av)()[h]?`${(0,b.av)()[h]}:`:`${L.t("in")}:`;return r?n.createElement(E.A,{size:"random"}):n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":_,"c-search_query_entity__token_unified--mention":_&&p,"c-search_query_entity__team_token":o,"c-search_query_entity__member_token--hidden_user":m})},o&&!_&&n.createElement("span",{className:"c-search_query_entity__team_token_image"},n.createElement(C.A,{team:o})),_&&c&&n.createElement("span",{className:s()("c-search_query_entity__token_label_icon","c-search_query_entity__token_label_icon--prefix","c-search_query_entity__token_label--user")},n.createElement(d.Ah,{name:"user",size:"inherit"})),n.createElement("span",{className:"c-search_query_entity__token_label"},i&&`${f}${a}`,!i&&!t&&`${f}${a}`,!i&&t&&n.createElement(n.Fragment,null,_&&e&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:(0,u.Zp)(e)?"lock-filled":"channel",size:"inherit"})),f,(0,u.Zp)(e)&&!_&&n.createElement("span",{className:"c-search_query_entity__token_label_icon"},n.createElement(d.Ah,{name:"lock-filled"})),(0,u.rW)(e)&&!_&&n.createElement("span",{className:"c-search_query_entity__token_label_icon"},n.createElement(d.Ah,{name:"channel"})),l&&n.createElement("span",{className:s()("c-search_query_entity__channel_section_token_image",{"c-search_query_entity__channel_section_token_image--useIcon":!l.emoji})},l.emoji?n.createElement(v.Ay,{text:l.emoji,emojiSize:v.lw.SMALL}):n.createElement(k.v,{type:l.type,spacing:"none"})),n.createElement("b",null,t))))}};SearchQueryInFilterBase.displayName="SearchQueryInFilterBase";let O=(0,T.N)((e,{member:t,channel:a,channelSection:n,channelSectionName:r,team:i,fallbackName:l})=>{let o="",s=!1,c=!1,d=!1,m=l,h="on"===(0,_._Z)(e,"omni_unified_filter_tokens"),f=t&&(0,R.a)(e,t.id);if(t){let a=(0,P.nv)(e,t.id);s=(0,I.tJ)(a),c=(0,I.ow)(a),f?(o=`@${L.t("Name hidden")}`,m=`@${L.t("Name hidden")}`):o=s||c?"":`@${(0,S.sE)(e,a)}`,h&&(d=(0,w.A)(t.id,void 0,(0,N.A)(e)))}else if(a){let t=(0,M.OL)(e,a.id);s=(0,u.t8)(t),c=(0,u.QR)(t),o=s||c?"":(0,p.SB)(e,t,{publicChannelIncludeHashSign:!1})}else n?o=r:i&&(o=i.name);return{fallbackName:m,displayName:o,isUnknown:s,isNonExistent:c,isUserHidden:f,isMention:d,experimentOmniUnifiedFilterTokensGroupOn:h}})(SearchQueryInFilterBase),D=new g.Ay("search"),SearchQueryIsFilter=({theAttribute:e,modifier:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),r=t&&(0,b.av)()[t]?`${(0,b.av)()[t]}:`:`${D.t("is")}:`;return n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":a})},n.createElement("span",{className:"c-search_query_entity__token_label"},a&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:A.T[e.toLowerCase()],size:"inherit"})),r,n.createElement("b",null,n.createElement(y.A,{text:e}))))};SearchQueryIsFilter.displayName="SearchQueryIsFilter";let F=new g.Ay("search"),SearchQueryMyReactionFilter=({theAttribute:e,modifier:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),r=t&&(0,b.av)()[t]?`${(0,b.av)()[t]}:`:`${F.t("hasmy")}:`;return n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":a})},n.createElement("span",{className:"c-search_query_entity__token_label"},a&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:"reaction",size:"inherit"})),r,n.createElement("b",null,n.createElement(y.A,{text:e}))))};SearchQueryMyReactionFilter.displayName="SearchQueryMyReactionFilter";let U=new g.Ay("search"),SearchQueryThreadsFilter=({theAttribute:e,modifier:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),r=t&&(0,b.av)()[t]?`${(0,b.av)()[t]}:`:`${U.t("threads")}:`;return n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":a})},n.createElement("span",{className:"c-search_query_entity__token_label"},a&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:"threads",size:"inherit"})),r,n.createElement("b",null,n.createElement(y.A,{text:e}))))};SearchQueryThreadsFilter.displayName="SearchQueryThreadsFilter";let B=new g.Ay("search"),SearchQueryTypeFilter=({fileType:e,modifier:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),r=t&&(0,b.av)()[t]?`${(0,b.av)()[t]}:`:`${B.t("type")}:`;return n.createElement("span",{className:s()("c-search_query_entity__token","c-search_query_entity__type_token",{"c-search_query_entity__token_unified":a})},n.createElement("span",{className:"c-search_query_entity__token_label"},a&&n.createElement("span",{className:"c-search_query_entity__token_label_icon c-search_query_entity__token_label_icon--prefix"},n.createElement(d.Ah,{name:A.T[e.toLowerCase()],size:"inherit"})),r,n.createElement("b",null,e)))};SearchQueryTypeFilter.displayName="SearchQueryTypeFilter";var H=a(0x62a17882),W=a(0x1b9d5cc0c);let SearchQueryMemberImage=({member:e,isUserHidden:t})=>{let a=(0,H.X4)(),r=(0,W.po)(e),i=(a?e.profile?.image_48:e.profile?.image_24)??"",l=(0,n.useMemo)(()=>({backgroundImage:`url(${i})`}),[i]);return t?n.createElement("span",{className:"c-search_query_entity__member_token--hidden_user_icon"},n.createElement(d.Ah,{name:"user-hide",size:"20",inline:!0})):n.createElement("span",{className:s()({bot:r,member_preview_link:!r},"c-search_query_entity__member_token_image","thumb_24"),"data-member-id":e.id,"data-thumb-size":"24",style:l,"aria-hidden":"true"})};SearchQueryMemberImage.displayName="SearchQueryMemberImage";var V=a(0xf2964a91);let G=new g.Ay("search"),SearchQueryUserFilter=({user:e,modifier:t})=>{let a=(0,h.d4)(e=>"on"===(0,_._Z)(e,"omni_unified_filter_tokens")),r=(0,h.d4)(t=>(0,w.A)(e.id,void 0,(0,N.A)(t))),i=(0,V.o)(e),l=(0,h.d4)(t=>(0,R.a)(t,e.id)),o=(0,h.d4)(t=>(0,S.sE)(t,e));l&&(o=G.t("Name hidden"));let c=t&&(0,b.av)()[t]?`${(0,b.av)()[t]}:`:null,m=null;return m=a&&!t?null:a?n.createElement("span",{className:s()("c-search_query_entity__token_label_icon","c-search_query_entity__token_label_icon--prefix","c-search_query_entity__token_label--user")},n.createElement(d.Ah,{name:"user",size:"inherit"})):n.createElement(SearchQueryMemberImage,{member:e,isUserHidden:l}),n.createElement("span",{className:s()("c-search_query_entity__token",{"c-search_query_entity__token_unified":a,"c-search_query_entity__token_unified--mention":a&&r,"c-search_query_entity__member_token":!a,"c-search_query_entity__member_token_unified":a,"c-search_query_entity__member_token--deleted":i,"c-search_query_entity__member_token--hidden_user":l}),"data-member-id":e.id},m," ",n.createElement("span",{className:"c-search_query_entity__token_label"},c,a&&!t?n.createElement(n.Fragment,null,"@",o):n.createElement("b",null,"@",o)))};SearchQueryUserFilter.displayName="SearchQueryUserFilter";let q=n.memo(SearchQueryUserFilter);var j=a(0x1632f6a87),z=a(0x1f734e202),K=a(0x1fb2d2a87);let $={history:"clock",conversationalSearch:"ai-search",default:"search",inChannelEcho:"quick-switch",saved:"star"};function SmallSearchQueryEntity({className:e,"data-qa":t,"data-sk":a="small_search_query_entity",query:r,id:i,type:o="default",useIconOutline:u=!1,prefixText:p}){let _=(0,h.d4)(K.to),b=(0,l.wA)(),g=(0,n.useCallback)(()=>"slackbot"===o?null:n.createElement("span",{className:s()("c-search_query_entity__icon",{"c-search_query_entity__icon--outline":u})},n.createElement(d.Ah,{name:$[o]||"search","data-qa":"entity-icon",size:u?"16":"18"})),[o,u]),A=(0,n.useMemo)(()=>{if(!r)return null;let e=r.token_list;return"inChannelEcho"===o&&(e=r.token_list?.filter(e=>!(e.is_type_in_filter||e.modifier&&("in"===e.modifier||"-in"===e.modifier)))),(0,z.f)(e?.map((e,t)=>{switch(!0){case e.is_type_string:return n.createElement(m.A,{lines:1,key:t},n.createElement(y.A,{text:e.string}));case e.is_type_phrase:return n.createElement(m.A,{lines:1,key:t},"\u201C",e.phrase,"\u201D");case e.is_type_member_filter:return n.createElement(q,{key:t,modifier:e.modifier,user:e.user});case e.is_type_member:return n.createElement(q,{key:t,user:e.user});case e.is_type_channel:return e.channel?n.createElement(f,{key:t,channel:e.channel}):null;case e.is_type_in_filter:return n.createElement(O,{key:t,member:e.user,channel:e.channel,modifier:e.modifier,fallbackName:e.fallbackName,channelSection:e.channelSection,channelSectionName:b((0,j.i1)({channelSection:e.channelSection})),team:e.team});case e.is_type_has_filter:return n.createElement(SearchQueryHasFilter,{key:t,theAttribute:e.thing,modifier:e.modifier});case e.is_type_my_reaction_filter:return n.createElement(SearchQueryMyReactionFilter,{key:t,theAttribute:e.emoji,modifier:e.modifier});case e.is_type_is_filter:return n.createElement(SearchQueryIsFilter,{key:t,theAttribute:e.thing,modifier:e.modifier});case e.is_type_type_filter:return n.createElement(SearchQueryTypeFilter,{key:t,fileType:e.file_type,modifier:e.modifier});case e.is_type_date_filter:return n.createElement(SearchQueryDateFilter,{key:t,modifier:e.modifier,dateString:e.date_string_normalized});case e.is_type_threads_filter:return n.createElement(SearchQueryThreadsFilter,{key:t,theAttribute:e.thing,modifier:e.modifier});default:return null}}),e=>n.createElement(n.Fragment,{key:`space-${e}`},"\xa0"))},[r,o,b]),x=(0,n.useMemo)(()=>r?n.createElement("span",{className:s()("c-search_query_entity__text",{[`c-search_query_entity__text--${_}`]:"light"!==_})},n.createElement("span",{className:"c-search_query_entity__text_contents","data-qa":"search-query-entity-text-content"},p&&n.createElement("span",{className:"c-search_query_prefix"},p,"\xa0"),A)):null,[r,_,p,A]);return r?n.createElement(c.Ay,{avatar:g,className:s()(e,"c-small_search_query_entity"),"data-id":i||r.id,"data-qa":t,"data-sk":a,size:"small",text:x,useAvatarOutline:u}):null}SmallSearchQueryEntity.displayName="SmallSearchQueryEntity";let Y=SmallSearchQueryEntity;function SmallSearchQueryListEntity(e){let t,{className:a,"data-qa":l,query:o,id:s,isActive:c,isDisabled:d,secondaryContent:m,type:u="default",useIconOutline:p=!1,prefixText:h}=e;return c?t=d?i.pI.highlightDim:i.pI.highlightDark:d&&(t=i.pI.dim),n.createElement(r.A,{size:"small",style:t,className:a,primaryContent:n.createElement(Y,{className:a,query:o,"data-id":s||o?.id,"data-qa":l,"data-sk":"small_search_query_list_entity",id:s||o?.id||"",type:u,useIconOutline:p,prefixText:h}),secondaryContent:m})}SmallSearchQueryListEntity.displayName="SmallSearchQueryListEntity";let Q=SmallSearchQueryListEntity},0x116df0ed:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x128d54e52),i=a(0x1535e80f3),l=a(0x13d6152c9),o=a(0x58199183),s=a(0x40c0d834),c=a(0x20482ad21),d=a(0x15f8e452a),m=a(0x4c96e5d9),u=a(0x3711e82d);let p=new c.Ay("sponsored_connections"),SponsoredConnectionsManageSlackConnectTooltip=()=>{let e=p.t("This organization has access to Slack Connect through your company\u2019s paid plan.");return n.createElement(s.A,{eventId:u.EventId.UPGRDEXP_HIGHLIGHT_PAID_FEATURES,uiComponentName:u.UiComponentName.SPONSORED_CONNECTIONS_MANAGE_SLACK_CONNECT_TOOLTIP,clogImpression:!0},n.createElement("div",{className:"p-sponsored_connections_manage_slack_connect_tooltip_container","data-qa":"p-sponsored_connections_manage_slack_connect_tooltip_container"},n.createElement(m.Ay,{position:"bottom",tip:e},n.createElement(d.A,{type:"info-circle",className:"p-sponsored_connections_manage_slack_connect_tooltip__info_icon","aria-hidden":!1,"aria-label":e}))))};SponsoredConnectionsManageSlackConnectTooltip.displayName="SponsoredConnectionsManageSlackConnectTooltip";var h=a(0xa1832ae4),_=a(0x1c91944c9),f=a(0x1ee439e69);function MediumTeamEntity({className:e,teamNameClassName:t,id:a,subtext:s,subtextClassName:c,shouldMaybeShowVerified:d=!1,shouldMaybeOpenOrgCard:m=!1,shouldTruncateTeamName:u=!1,iconSize:p,bold:_=!0,team:f,"data-sk":b="medium_team_entity","data-qa":g,isSponsored:y=!1,role:A,"aria-level":x,callout:E}){let C=s&&!(0,h.Zx)(f),k=p||i.RG.medium,v=(0,n.useMemo)(()=>n.createElement(o.A,{team:f,shouldMaybeShowVerified:d,shouldMaybeOpenOrgCard:m,className:t,withTruncationTooltip:u,bold:_,role:A,"aria-level":x}),[x,_,A,m,d,u,f,t]),S=(0,n.useMemo)(()=>n.createElement("div",{className:"c-team_entity__base_text"},v,E&&n.createElement("span",{className:"c-app_badge margin_left_50"},E),y&&n.createElement(SponsoredConnectionsManageSlackConnectTooltip,null)),[E,y,v]),I=(0,n.useCallback)(e=>n.createElement(l.Pv,{...e,team:f,size:k}),[f,k]);return n.createElement(r.Ay,{avatar:I,className:e,size:"medium",style:void 0,text:S,subtext:C&&n.createElement(r.sT,{className:c},s),"data-team-id":a,"data-qa":g,"data-sk":b})}MediumTeamEntity.displayName="MediumTeamEntity";let b=(0,_.N)((e,t)=>{let a=t.team||(0,f._J)(e,t.id);return{team:a,id:a.id}})(MediumTeamEntity)},0x19e907f3f:(e,t,a)=>{"use strict";a.d(t,{o:()=>MediumTeamListEntity});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x116df0ed),o=a(0x226892387),s=a(0x1ee439e69);function MediumTeamListEntity({className:e,teamNameClassName:t,id:a,isActive:c=!1,isDisabled:d=!1,shouldMaybeShowVerified:m=!1,secondaryContent:u,team:p,...h}){let _,f=(0,o.d4)(e=>p||(0,s._J)(e,a)),b=f?.id||a;return c?_=d?i.pI.highlightDim:i.pI.highlightLight:d&&(_=i.pI.dim),n.createElement(r.A,{className:e,size:"medium",style:_,primaryContent:n.createElement(l.A,{...h,id:b,team:f,teamNameClassName:t}),secondaryContent:u,"data-team-id":b})}MediumTeamListEntity.displayName="MediumTeamListEntity"},0x1edd896c2:(e,t,a)=>{"use strict";a.d(t,{G:()=>SmallTeamEntity});var n=a(0xbad225b5),r=a(0x128d54e52),i=a(0x1535e80f3),l=a(0x2501a2cee),o=a(0x13d6152c9),s=a(0x58199183),c=a(0x226892387),d=a(0x1ee439e69);function SmallTeamEntity({className:e,teamNameClassName:t,id:a,invert:m=!1,team:u,isError:p=!1,bold:h=!0,shouldMaybeShowVerified:_=!1,allowInitials:f=!0,truncate:b=!1,"data-qa":g,"data-sk":y="small_team_entity"}){let A=(0,c.d4)(e=>u||(0,d._J)(e,a)),x=A?.id||a,E=m?i.pI.highlightDark:void 0,C=(0,n.useCallback)(e=>p?n.createElement("span",{className:"c-team_entity__icon--error"},n.createElement(l.Ah,{name:"warning",size:"20"})):n.createElement(o.Pv,{...e,team:A,size:i.RG.small,invert:m,allowTeamInitials:f}),[A,m,p,f]);return n.createElement(r.Ay,{avatar:C,className:e,size:"small",style:E,text:n.createElement(s.A,{team:A,shouldMaybeShowVerified:_,invert:m,bold:h,className:t,truncate:b}),"data-team-id":x,"data-qa":g,"data-sk":y})}SmallTeamEntity.displayName="SmallTeamEntity"},0x1de80d519:(e,t,a)=>{"use strict";a.d(t,{e:()=>SmallTeamListEntity});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x1edd896c2),o=a(0x226892387),s=a(0x1ee439e69);let SmallTeamListEntity=({bold:e=!0,className:t,"data-qa":a,id:c,includeHiddenTeams:d=!1,isActive:m=!1,isDisabled:u=!1,isError:p=!1,secondaryContent:h,shouldMaybeShowVerified:_=!1,team:f,teamNameClassName:b,truncate:g=!1})=>{let y=(0,o.d4)(e=>f||(0,s._J)(e,c,!0,d)),A=c||f?.id,x=i.pI.normal;m?x=u?i.pI.highlightDim:i.pI.highlightDark:u&&(x=i.pI.dim);let E=(0,n.useMemo)(()=>n.createElement(l.G,{"data-qa":a,bold:e,isError:p,shouldMaybeShowVerified:_,team:y,invert:x===i.pI.highlightDark,teamNameClassName:b,truncate:g}),[a,e,p,_,y,x,b,g]);return n.createElement(r.A,{className:t,size:i.ny.small,style:x,primaryContent:E,secondaryContent:h,"data-team-id":A})};SmallTeamListEntity.displayName="SmallTeamListEntity"},0x1b7a88972:(e,t,a)=>{"use strict";a.d(t,{a:()=>TeamDomain});var n=a(0xbad225b5),r=a(0x163e6b717),i=a(0x15f4f83cf),l=a(0xa1832ae4),o=a(0x226892387),s=a(0x1ee439e69);function TeamDomain({invert:e=!1,id:t,team:a}){let c=(0,o.d4)(e=>a||(0,s._J)(e,t)),d=c.id||t,m=(0,i.lv)(c),u=(0,i.mX)(c);if(m||u)return n.createElement(r.A,{type:m?"non-existent":"unknown",invert:e,"data-team-id":d});let p=(0,l.Ic)(c),h=d?(0,l.k7)(d,p):p;return n.createElement("span",{"data-team-id":d},h,".slack.com")}TeamDomain.displayName="TeamDomain"},0x13d6152c9:(e,t,a)=>{"use strict";a.d(t,{Pv:()=>TeamIcon});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xca924ee1),o=a(0x17afadb2a),s=a(0x15f4f83cf),c=a(0xa1832ae4),d=a(0x121a6a424),m=a(0x226892387),u=a(0x1ee439e69);let p=[230,132,102,88,68,44,34];function getImage({size:e,team:t}){let a=(0,c.Rf)(t);if(!a||a.image_default)return null;let n=(0,d.A)(2*e,p),r=t.icon?[...Object.values(t.icon).filter(Boolean)].pop():void 0;return a[`image_${n}`]||r}function getInitials(e){let t=(0,c.F1)(e);return(0,c.L_)(t,{limit:2})}let h=(0,l.A)((e,t)=>({backgroundImage:e&&`url(${e})`,fontSize:`${Math.round(t/1.8)}px`,height:t,lineHeight:`${t}px`,width:t}),(e,t)=>`${e}-${t}`);function TeamIcon({className:e,id:t,invert:a=!1,size:r,team:l,allowTeamInitials:c=!0}){let d=(0,m.d4)(e=>l||(0,u._J)(e,t)),p=d?.id,_=(0,s.lv)(d),f=(0,s.mX)(d);if(_||f)return n.createElement(o.A,{className:i()(e,"c-team_entity__icon"),isNonExistent:_,size:r,invert:a,"data-team-id":p});let b=getImage({size:r,team:d});if(!c&&!b)return null;let g=!b&&getInitials(d);return n.createElement("span",{"aria-hidden":"true",className:i()(e,"c-team_entity__icon",{"c-team_entity__icon--default":!b}),style:h(b,r),"data-team-id":p},g)}TeamIcon.displayName="TeamIcon"},0x14d6d0bb8:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x128d54e52),l=a(0x1535e80f3),o=a(0x2501a2cee),s=a(0x1680d129b),c=a(0x61f75169),d=a(0x1c91944c9),m=a(0x475c9cfe);let u=new r.Ay("user_groups");function MediumUserGroupEntity({className:e,userGroup:t,isDeactivated:a}){let r=a||!(0,c.V1)(t);if((0,c.t8)(t)||(0,c.QR)(t))return n.createElement(s.A,{type:(0,c.t8)(t)?"unknown":"non-existent",size:"medium"});let d=(0,c.ue)(t),m=n.createElement("div",{className:"c-user_group_medium__heading_container"},n.createElement("div",{className:"c-user_group_medium__icon"},n.createElement(o.Ah,{name:"user-groups",inline:!0})),n.createElement(i.CG,{className:"c-user_group__name"},d)),p=(0,c.NF)(t),h=n.createElement(i.sT,null,p),_=(0,c.x_)(t),f=(0,c.Br)(t),b=n.createElement(i.Q,null,n.createElement("span",{className:"c-user_group_medium__handle"},_),u.rt("{count} {count, plural, =1 {member} other {members}}",{count:f})),g=r?l.pI.dim:void 0;return n.createElement(i.Ay,{className:e,size:"medium",style:g,text:m,subtext:h,metadata:b})}MediumUserGroupEntity.displayName="MediumUserGroupEntity";let p=(0,d.N)((e,{id:t,userGroup:a})=>({userGroup:a||(0,m.lJ)(e,t)}))(MediumUserGroupEntity)},0x164aebd11:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var n=a(0xbad225b5),r=a(0x24f1e08bb),i=a(0x1535e80f3),l=a(0x120c268ad),o=a.n(l),s=a(0x20482ad21),c=a(0x2264e6ea3),d=a(0x128d54e52),m=a(0x4c96e5d9),u=a(0x1680d129b),p=a(0x7fbb7bb1),h=a(0xae0b47e2),_=a(0xa1832ae4),f=a(0xb8504a42),b=a(0x61f75169),g=a(0x1c91944c9),y=a(0x1ee439e69),A=a(0x475c9cfe);let x=new s.Ay("search");function BrowsePageUserGroupEntity({className:e,userGroup:t,userGroupTeamOrEnterpriseName:a}){let r=(0,n.useRef)(null),[l,s]=(0,n.useState)(0),[c,h]=(0,n.useState)(!1),_=(0,b.V1)(t)?void 0:i.pI.dim,f=(0,b.ue)(t),g=(0,b.x_)(t),y=(0,b.NF)(t),A=(0,b.Br)(t),E="\xa0\xa0\xb7\xa0\xa0",C=n.createElement(d.CG,null,n.createElement("span",{className:"p-browse_page_user_group_entity__name","data-qa":"browse_page_user_group_entity__name"},f),n.createElement("span",{className:"p-browse_page_user_group_entity__handle","data-qa":"browse_page_user_group_entity__handle"},g)),k=n.createElement("span",{className:"p-browse_page_user_group_entity__subtext","data-qa":"browse_page_user_group_entity__subtext",ref:r},n.createElement("span",{className:"browse_page_user_group_entity__subtext__contents","data-qa":"browse_page_user_group_entity__subtext__contents"},x.t("{count, plural, =1 {# member} other {# members}}",{count:A}),a&&E,a,y&&E,y)),v=n.createElement(p.A,null,({width:e,measureRef:t})=>(s(e),n.createElement("div",{ref:t},c?n.createElement(m.Ay,{tip:y},k):k)));return((0,n.useEffect)(()=>{r.current&&h(l<r.current.scrollWidth)},[l]),(0,b.t8)(t)||(0,b.QR)(t))?n.createElement(u.A,{type:(0,b.t8)(t)?"unknown":"non-existent",size:"medium"}):n.createElement(d.Ay,{className:o()(e,"p-browse_page_user_group_entity"),size:"medium",text:C,subtext:v,style:_})}BrowsePageUserGroupEntity.displayName="BrowsePageUserGroupEntity";let E=(0,g.N)((e,{id:t,userGroup:a})=>{let n=a||(0,A.lJ)(e,t),r=(0,b.$Q)(n),i=(0,y._J)(e,r),l=(0,c.JV)(r),o=(0,y.H7)(e),s=(0,f.r7)(o),d=r&&s,m=l?(0,h.v4)(i):(0,_.F1)(i);return{userGroup:n||void 0,userGroupTeamOrEnterpriseName:!!d&&m}})(BrowsePageUserGroupEntity);function MediumUserGroupListEntity(e){let t,{className:a,isActive:l,isDeactivated:o,isDisabled:s,secondaryContent:c}=e;return l?t=s||o?i.pI.highlightDim:i.pI.highlightLight:(s||o)&&(t=i.pI.dim),n.createElement(r.A,{className:a,primaryContent:n.createElement(E,e),secondaryContent:c,size:"medium",style:t})}MediumUserGroupListEntity.displayName="MediumUserGroupListEntity";let C=MediumUserGroupListEntity},0x213c0555e:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x2264e6ea3),s=a(0x128d54e52),c=a(0x1535e80f3),d=a(0x2501a2cee),m=a(0x1680d129b),u=a(0xae0b47e2),p=a(0xa1832ae4),h=a(0x61f75169),_=a(0x1c91944c9),f=a(0x9b971e7e),b=a(0x1ee439e69),g=a(0x475c9cfe);let y=new l.Ay("user_group_entity");function SmallUserGroupEntity({className:e,invert:t,showDescription:a=!0,userGroup:r,userGroupTeamName:l,isDeactivated:o}){let u,p=o||!(0,h.V1)(r),_=(0,n.useCallback)(e=>n.createElement("span",{className:"margin_right_50"},n.createElement(d.Ah,{...e,name:"user-groups",size:"18"})),[]);if((0,h.t8)(r)||(0,h.QR)(r)){let e=i()("c-small_user_group__missing_icon",{"c-small_user_group__missing_icon--inverted":t});return n.createElement("div",{className:"c-small_user_group__missing"},n.createElement("div",{className:e},n.createElement(d.Ah,{name:"user-groups",size:"18"})),n.createElement(m.A,{type:(0,h.t8)(r)?"unknown":"non-existent",invert:t}))}let f=(0,h.ue)(r),b=n.createElement("span",{className:"c-user_group__name c-small_user_group__name"},f),g=(0,h.Br)(r),A=l&&n.createElement(n.Fragment,null,"\xa0\xa0",n.createElement("span",{className:"c-small_user_group__team"},l)),x=n.createElement(n.Fragment,null,n.createElement("span",{className:"c-small_user_group__count"},"(",y.t("{userCount, plural, =1 {# member} other {# members}}",{userCount:g}),")"),A);return p?u=c.pI.dim:t&&(u=c.pI.highlightDark),n.createElement(s.Ay,{avatar:_,className:e,size:"small",style:u,text:n.createElement(s.CG,null,b,a&&x),"data-usergroup-id":r.id})}SmallUserGroupEntity.displayName="SmallUserGroupEntity";let A=(0,_.N)((e,{id:t,userGroup:a})=>{let n=a||(0,g.lJ)(e,t),r=(0,f.ZT)(e),i=(0,h.$Q)(n),l=(0,h.FW)(n),s=(0,b._J)(e,l||i);return{userGroup:n,userGroupTeamName:s&&((0,o.JV)(l)?(0,u.v4)(s):i!==r&&(0,p.F1)(s))}})(SmallUserGroupEntity)},0x161781f25:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x24f1e08bb),o=a(0x1535e80f3),s=a(0x213c0555e);function getBaseStyle(e,t,a){let n;return e?n=t||a?o.pI.highlightDim:o.pI.highlightDark:(t||a)&&(n=o.pI.dim),n}function SmallUserGroupListEntity(e){let{className:t,isActive:a,isDeactivated:r,isDisabled:c,secondaryContent:d}=e,m=(0,n.useMemo)(()=>n.createElement(s.A,{invert:getBaseStyle(a,c,r)===o.pI.highlightDark,...e}),[a,r,c,e]),u=getBaseStyle(a,c,r);return n.createElement(l.A,{className:i()("c-small_user_group_list_entity",t),style:u,primaryContent:m,secondaryContent:d,size:"small"})}SmallUserGroupListEntity.displayName="SmallUserGroupListEntity";let c=SmallUserGroupListEntity},0xee5bab5f:(e,t,a)=>{"use strict";a.d(t,{E:()=>WidgetEntity});var n=a(0xbad225b5),r=a(0x32d3ef3d),i=a(0xfa28400d),l=a(0xb59b1927),o=a(0x9798b7f),s=a(0x21955b88e),c=a.n(s);let WidgetHeaderContainer=({children:e})=>n.createElement("div",{className:c().widgetHeaderContainer},e);var d=a(0x7729d35b),m=a(0x12908d5fe),u=a.n(m);let WidgetIconContainer=({entityState:e="enabled",children:t})=>n.createElement("div",{className:u().widgetIconContainer},n.createElement(d.A,{entityState:e},t));var p=a(0x20482ad21),h=a(0x22b8621cf),_=a(0x11c86845f),f=a(0x226892387),b=a(0x14149c126);let g=new p.Ay("widgets"),WidgetsActionBar=({onRefresh:e,onCopy:t,onEdit:a,onRemove:r})=>{let i=(0,f.d4)(e=>"on"===(0,b._Z)(e,"widgets")),l=i?g.t("Refreshes the widget UI"):"Refreshes the widget UI",o=n.useMemo(()=>({name:"refresh"}),[]),s=i?g.t("Copies the widget URL to the clipboard"):"Copies the widget URL to the clipboard",c=n.useMemo(()=>({name:"link"}),[]),d=i?g.t("Edit"):"Edit",m=n.useMemo(()=>({name:"edit"}),[]),u=i?g.t("Delete"):"Delete",p=n.useMemo(()=>({name:"trash"}),[]);return n.createElement(_.A,null,e&&n.createElement(h.A,{"aria-label":"Refresh",svgIconProps:o,tooltipLabel:l,tooltipPosition:"top",onClick:e}),t&&n.createElement(h.A,{"aria-label":"Copy",svgIconProps:c,tooltipLabel:s,tooltipPosition:"top",onClick:t}),a&&n.createElement(h.A,{"aria-label":d,svgIconProps:m,tooltipLabel:d,tooltipPosition:"top",onClick:a}),r&&n.createElement(h.A,{"aria-label":u,svgIconProps:p,tooltipLabel:u,tooltipPosition:"top",onClick:r}))};WidgetsActionBar.displayName="WidgetsActionBar";let WidgetEntity=({size:e="expanded",entityState:t=r.w.enabled,isFullWidth:a=!1,withBorder:s=!0,onRefresh:c,onCopy:d,onEdit:m,onRemove:u,primaryLabel:p,secondaryLabel:h,icon:_,children:f})=>{let b=n.useMemo(()=>n.createElement(WidgetsActionBar,{onRefresh:c,onCopy:d,onEdit:m,onRemove:u}),[c,d,m,u]);return n.createElement(i.Ay,{size:e,entityState:t,isRemovable:!1,isFullWidth:a,withBorder:s,actionsBar:b},n.createElement(WidgetHeaderContainer,null,n.createElement(WidgetIconContainer,{entityState:t},_),n.createElement(o.A,{entityState:t,size:r.S.compact,primaryLabel:p,secondaryLabel:h})),"expanded"===e?n.createElement(l.A,{entityState:"enabled"},f):null)};WidgetEntity.displayName="WidgetEntity"},0x11cab3cb4:(e,t,a)=>{"use strict";a.d(t,{F:()=>FileGallery});var n=a(0xbad225b5),r=a(0x130d89881),i=a(0x32d3ef3d),l=a(0x1f152a7c3),o=a(0xea466c39),s=a(0x1fd6135f2),c=a(0xbfe351d6);let renderFile=(e,t)=>{var a;let r=(a=e).status===c.Y.Pending?a.type?.startsWith("image/")&&!a.thumbnailSrc?"loading":"processing":"enabled";return e.type?.startsWith("image/")?n.createElement(s.A,{key:e.id,data:e,entityState:r,size:i.S.thumbnail,onRemove:t,ariaLabel:e.name,thumbnailSrc:e.thumbnailSrc,altText:""}):n.createElement(o.A,{key:e.id,data:e,entityState:r,size:i.S.compact,primaryLabel:e.name,secondaryLabel:e.status===c.Y.Uploaded?e.prettyType:" ",type:(0,l.j)(e),onRemove:t,ariaLabel:e.name})};renderFile.displayName="renderFile";var d=a(0x14c22bca),m=a(0xed3181a2),u=a.n(m);let FileGallery=({files:e,onRemoveFile:t})=>n.createElement("div",{className:u().galleryContainer},n.createElement(r.A,{disableHeight:!0},({width:a})=>n.createElement(d.A,{width:a,pageSize:250},n.createElement("div",{className:u().filesContainer},e.map(e=>renderFile(e,t))))));FileGallery.displayName="FileGallery"},0x1f152a7c3:(e,t,a)=>{"use strict";a.d(t,{j:()=>getTypeFromFile});var n=a(0x1ba99e8c);let getTypeFromFile=e=>n.p[e.filetype]||n.p.generic},0x1f0e792f:(e,t,a)=>{"use strict";a.d(t,{zW:()=>FileEntityContainer,Ay:()=>g});var n=a(0xbad225b5),r=a(0x32d3ef3d),i=a(0xfa28400d),l=a(0x120c268ad),o=a.n(l),s=a(0x9798b7f),c=a(0x2501a2cee),d=a(0x13c579941),m=a.n(d);let OverlayErrorIcon=()=>n.createElement("div",{className:m().overlay},n.createElement(c.Ah,{name:"warning"}));var u=a(0xb1ea448c);let OverlaySpinner=()=>n.createElement(u.A,{size:"large",className:m().overlay}),getOverlayFromState=e=>{switch(e){case"processing":return OverlaySpinner;case"error":return OverlayErrorIcon;default:return null}},renderComponentOrElement=e=>"function"==typeof e&&(0,n.isValidElement)(e())?e():(0,n.isValidElement)(e)||"string"==typeof e?e:null;var p=a(0x7de30fcd),h=a.n(p);let Compact=({entityState:e,thumbnailImage:t,primaryLabel:a,secondaryLabel:i,children:l,showThumbnailForStates:c})=>{let d=o()(h().thumbnailImageContainer,h()[e]),m=getOverlayFromState(e),u=c.includes(e);return n.createElement("div",{className:h().compact},n.createElement("div",{className:d},u?renderComponentOrElement(t):null,m?.()),n.createElement(s.A,{size:"compact",entityState:e===r.w.loading?r.w.loading:r.w.enabled,primaryLabel:a,secondaryLabel:i}),l)};Compact.displayName="Compact";let Expanded=({children:e})=>n.createElement("div",null,e);Expanded.displayName="Expanded";var _=a(0x4a5a4a6),f=a.n(_);let Thumbnail=e=>{let{thumbnailImage:t,showThumbnailForStates:a,children:r,entityState:i}=e,l=o()(f().thumbnail,f()[i]),s=getOverlayFromState(i),c=a.includes(i);return n.createElement("div",{className:l},c?renderComponentOrElement(t):null,r,s?n.createElement("div",{className:f().overlayContainer},s()):null)};Thumbnail.displayName="Thumbnail";let b=[r.w.enabled],NoopContainer=()=>null,FileEntityContainer=({children:e,size:t,entityState:a,primaryLabel:l,secondaryLabel:o,thumbnailImage:s,showThumbnailForStates:c=b,ariaLabel:d,removeButtonTip:m,...u})=>{let p=(e=>{switch(e){case r.S.thumbnail:return Thumbnail;case r.S.compact:return Compact;case r.S.expanded:return Expanded;default:return NoopContainer}})(t);return n.createElement(i.Ay,{...u,size:t,ariaLabel:d,entityState:a,removeButtonTip:m},n.createElement(p,{entityState:a,thumbnailImage:s,primaryLabel:l,secondaryLabel:o,showThumbnailForStates:c}))};FileEntityContainer.displayName="FileEntityContainer";let g=FileEntityContainer},0xea466c39:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x1f0e792f),i=a(0x120c268ad),l=a.n(i),o=a(0x32d3ef3d),s=a(0x2501a2cee),c=a(0xe5a35d38),d=a(0x1efcc1f7c),m=a.n(d);let FileEntityIcon=({type:e,size:t})=>{let a=c.W.get(e);if(!a)return null;let r=l()(m().base,m()[a.palette],{[m().thumbnail]:t===o.S.thumbnail,[m().miniThumbnail]:t!==o.S.thumbnail});return n.createElement("div",{className:r},n.createElement(s.Ah,a.svgIconProps))};FileEntityIcon.displayName="FileEntityIcon";let GenericFileEntity=({size:e,type:t,...a})=>{let i=n.useCallback(()=>n.createElement(FileEntityIcon,{type:t,size:e}),[t,e]);return n.createElement(r.Ay,{...a,size:e,thumbnailImage:i})};GenericFileEntity.displayName="GenericFileEntity";let u=GenericFileEntity},0x1ba99e8c:(e,t,a)=>{"use strict";a.d(t,{p:()=>r});var n,r=((n={}).ai="ai",n.apk="apk",n.avi="avi",n.bmp="bmp",n.c="c",n.cpp="cpp",n.csharp="csharp",n.csv="csv",n.db="db",n.diff="diff",n.dmg="dmg",n.doc="doc",n.docx="docx",n.eps="eps",n.erb="erb",n.erlang="erlang",n.fla="fla",n.flv="flv",n.gdraw="gdraw",n.generic="generic",n.gif="gif",n.gfdorm="gfdorm",n.gfx3d="gfx3d",n.gdoc="gdoc",n.gpres="gpres",n.gsheet="gsheet",n.html="html",n.image="image",n.indd="indd",n.ipa="ipa",n.iso="iso",n.java="java",n.javascript="javascript",n.jpg="jpg",n.jpeg="jpeg",n.key="key",n.keynote="keynote",n.lucidchart="lucidchart",n.lucidpress="lucidpress",n.lucidspark="lucidspark",n.m4a="m4a",n.markdown="markdown",n.md="md",n.mov="mov",n.mp3="mp3",n.mp4="mp4",n.numbers="numbers",n.objc="objc",n.ogg="ogg",n.pages="pages",n.paper="paper",n.papert="papert",n.perl="perl",n.pdf="pdf",n.png="png",n.ppt="ppt",n.pptx="pptx",n.psd="psd",n.python="python",n.quip="quip",n.rb="rb",n.rtf="rtf",n.ruby="ruby",n.sql="sql",n.svg="svg",n.swf="swf",n.text="text",n.tiff="tiff",n.tsv="tsv",n.txt="txt",n.wav="wav",n.xls="xls",n.xlsm="xlsm",n.xlsx="xlsx",n.xltx="xltx",n.xml="xml",n.zip="zip",n.zohoshow="zohoshow",n)},0xe5a35d38:(e,t,a)=>{"use strict";a.d(t,{W:()=>r});var n=a(0x1ba99e8c);let r=new Map([[n.p.ai,{svgIconProps:{name:"brand-adobe-ai-filled"},palette:"tangerine"}],[n.p.apk,{svgIconProps:{name:"brand-android-filled"},palette:"jade"}],[n.p.avi,{svgIconProps:{name:"video-filled"},palette:"mojito"}],[n.p.bmp,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.c,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.cpp,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.csharp,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.csv,{svgIconProps:{name:"spreadsheet"},palette:"ocean"}],[n.p.db,{svgIconProps:{name:"database"},palette:"tomato"}],[n.p.diff,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.dmg,{svgIconProps:{name:"disc-image"},palette:"ocean"}],[n.p.doc,{svgIconProps:{name:"brand-microsoft-word-filled"},palette:"ocean"}],[n.p.docx,{svgIconProps:{name:"brand-microsoft-word-filled"},palette:"ocean"}],[n.p.eps,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.erb,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.erlang,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.fla,{svgIconProps:{name:"brand-adobe-fl-filled"},palette:"tomato"}],[n.p.flv,{svgIconProps:{name:"video-filled"},palette:"mojito"}],[n.p.gdraw,{svgIconProps:{name:"bulleted-list"},palette:"aubergine"}],[n.p.generic,{svgIconProps:{name:"file"},palette:"ocean"}],[n.p.gif,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.gfdorm,{svgIconProps:{name:"bulleted-list"},palette:"aubergine"}],[n.p.gfx3d,{svgIconProps:{name:"three-d-graphic"},palette:"ocean"}],[n.p.gdoc,{svgIconProps:{name:"document"},palette:"ocean"}],[n.p.gpres,{svgIconProps:{name:"presentation"},palette:"tangerine"}],[n.p.gsheet,{svgIconProps:{name:"spreadsheet"},palette:"mojito"}],[n.p.html,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.image,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.indd,{svgIconProps:{name:"brand-adobe-id-filled"},palette:"flamingo"}],[n.p.ipa,{svgIconProps:{name:"brand-apple-filled"},palette:"gray"}],[n.p.iso,{svgIconProps:{name:"media-archive"},palette:"ocean"}],[n.p.java,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.javascript,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.jpg,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.jpeg,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.key,{svgIconProps:{name:"presentation"},palette:"ocean"}],[n.p.keynote,{svgIconProps:{name:"presentation"},palette:"ocean"}],[n.p.lucidchart,{svgIconProps:{name:"brand-lucid-chart-filled"},palette:"tangerine"}],[n.p.lucidpress,{svgIconProps:{name:"brand-lucid-press-filled"},palette:"aquarium"}],[n.p.lucidspark,{svgIconProps:{name:"brand-lucid-spark-filled"},palette:"tomato"}],[n.p.m4a,{svgIconProps:{name:"sound-filled"},palette:"ocean"}],[n.p.markdown,{svgIconProps:{name:"brand-markdown-filled"},palette:"gray"}],[n.p.md,{svgIconProps:{name:"brand-markdown-filled"},palette:"gray"}],[n.p.mov,{svgIconProps:{name:"video-filled"},palette:"mojito"}],[n.p.mp3,{svgIconProps:{name:"sound-filled"},palette:"ocean"}],[n.p.mp4,{svgIconProps:{name:"video-filled"},palette:"mojito"}],[n.p.numbers,{svgIconProps:{name:"spreadsheet"},palette:"ocean"}],[n.p.objc,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.ogg,{svgIconProps:{name:"sound-filled"},palette:"ocean"}],[n.p.pages,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.paper,{svgIconProps:{name:"brand-dropbox-paper-filled"},palette:"ocean"}],[n.p.papert,{svgIconProps:{name:"brand-dropbox-paper-filled"},palette:"ocean"}],[n.p.perl,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.pdf,{svgIconProps:{name:"pdf-file-filled"},palette:"flamingo"}],[n.p.png,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.ppt,{svgIconProps:{name:"brand-microsoft-ppt-filled"},palette:"tomato"}],[n.p.pptx,{svgIconProps:{name:"brand-microsoft-ppt-filled"},palette:"tomato"}],[n.p.psd,{svgIconProps:{name:"brand-adobe-ps-filled"},palette:"ocean"}],[n.p.python,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.quip,{svgIconProps:{name:"quip"},palette:"tangerine"}],[n.p.rb,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.rtf,{svgIconProps:{name:"text"},palette:"ocean"}],[n.p.ruby,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.sql,{svgIconProps:{name:"database"},palette:"tomato"}],[n.p.svg,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.swf,{svgIconProps:{name:"brand-adobe-swf-filled"},palette:"tomato"}],[n.p.text,{svgIconProps:{name:"text"},palette:"ocean"}],[n.p.tiff,{svgIconProps:{name:"image-filled"},palette:"ocean"}],[n.p.tsv,{svgIconProps:{name:"spreadsheet"},palette:"ocean"}],[n.p.txt,{svgIconProps:{name:"text"},palette:"ocean"}],[n.p.wav,{svgIconProps:{name:"sound-filled"},palette:"ocean"}],[n.p.xls,{svgIconProps:{name:"brand-microsoft-excel-filled"},palette:"mojito"}],[n.p.xlsm,{svgIconProps:{name:"brand-microsoft-excel-filled"},palette:"mojito"}],[n.p.xlsx,{svgIconProps:{name:"brand-microsoft-excel-filled"},palette:"mojito"}],[n.p.xltx,{svgIconProps:{name:"brand-microsoft-excel-filled"},palette:"mojito"}],[n.p.xml,{svgIconProps:{name:"code"},palette:"tomato"}],[n.p.zip,{svgIconProps:{name:"zip"},palette:"ocean"}],[n.p.zohoshow,{svgIconProps:{name:"brand-zoho-filled"},palette:"tomato"}]])},0x1fd6135f2:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x1f0e792f),i=a(0x120c268ad),l=a.n(i),o=a(0x1b76a7dc5),s=a.n(o);let ImageFileThumbnailImage=({src:e,alt:t,entityState:a})=>{let r=l()(s().imageThumbnail,s()[a]);return n.createElement("img",{src:e,className:r,alt:t})};ImageFileThumbnailImage.displayName="ImageFileThumbnailImage";var c=a(0x32d3ef3d);let d=[c.w.enabled,c.w.processing],ImageFileEntity=({entityState:e,thumbnailSrc:t="",altText:a="",data:i,...l})=>{let o=n.useCallback(()=>n.createElement(ImageFileThumbnailImage,{entityState:e,src:t,alt:a}),[e,t,a]);return n.createElement(r.zW,{...l,entityState:e,data:i,thumbnailImage:o,showThumbnailForStates:d})};ImageFileEntity.displayName="ImageFileEntity";let m=ImageFileEntity},0x187063a6e:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0xd397dcb5),i=a(0xf84cc69);let ConnectedListEntityExpandedPreview=e=>{let{noTopBorder:t,noPadding:a,...l}=e,o=(0,r.A)(l);return n.createElement(i.A,{...o,noTopBorder:t,noPadding:a})};ConnectedListEntityExpandedPreview.displayName="ConnectedListEntityExpandedPreview";let l=n.memo(ConnectedListEntityExpandedPreview)},0x251a2acd0:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0xd397dcb5),i=a(0x16395d169);let ConnectedListEntity=e=>{let t=(0,r.A)(e);return n.createElement(i.A,t)};ConnectedListEntity.displayName="ConnectedListEntity";let l=n.memo(ConnectedListEntity)},0xd397dcb5:(e,t,a)=>{"use strict";a.d(t,{A:()=>useListEntityLogic});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x244f35bf8),o=a(0x155d02b1c),s=a(0x18af67efb),c=a(0x20482ad21),d=a(0x32d3ef3d),m=a(0x287da5a6),u=a(0x1dd284e05),p=a(0x8260e60b),h=a(0xd5e0f7b6),_=a(0x1783819f4),f=a(0x2200aa61c),b=a(0xbf7cc905),g=a(0x1c6fca489),y=a(0x1c1374e18),A=a(0x101db4695),x=a(0x153cbdf74),E=a(0x15e1a1041),C=a(0xbd3de346),k=a(0x22fd0ecc8),v=a(0xbac48619),S=a(0xe2111ccb),I=a(0x14fde54c),w=a(0x70de3606),T=a(0x1ec68d6a3),N=a(0x107c8ce7),M=a(0x57d5a5b5),R=a(0xb60a1b),P=a(0x17fb7c396),L=a(0x226892387),O=a(0x8d0a2ff1),D=a(0x18d7b9b56),F=a(0x2d1c8f66);let U=new c.Ay("lists");function useListEntityLogic({file:e,listRecordId:t,listViewId:a,size:c,isRemovable:B,draftId:H,channelId:W,url:V,onRemove:G,removeButtonTip:q,isFullWidth:j,isFullHeight:z,showActionsBar:K=!1,isInteractive:$,snapshot:Y,customWidth:Q,customMaxWidth:Z,customPreviewContainerHeight:J,shouldShrinkUnderDefaultWidth:X,withBorder:ee,withHover:et,listFileIsDeleted:ea=!1,listFileIsNotFound:en=!1,listViewIsDeleted:er=!1,maxNumOfRowsInPreview:ei=5,hideHeader:el=!1,dragRef:eo}){let es=(0,r.wA)(),ec=(0,L.d4)(w.Fh),[ed,em]=(0,n.useState)(!1),[eu,ep]=(0,n.useState)(!Y||a?d.w.loading:d.w.enabled),[eh,e_]=(0,n.useState)(!1),ef=(0,L.d4)(t=>a?(0,O.E4)(t,e.id,a):null),eb=(0,L.d4)(t=>a?(0,O.k7)(t,e.id,a):null),eg=(0,L.d4)(a=>t?(0,O.ll)(a,e?.id,t):void 0),ey=(0,L.d4)(t=>(0,S.X)(t,e)),eA=(0,L.d4)(t=>(0,O.vS)(t,e.id)),ex=(0,L.d4)(t=>(0,O.Rl)(t,e.id)),eE=(0,n.useMemo)(()=>(0,I.Qq)(e,a),[e,a]),eC=(0,L.d4)(t=>(0,O.P6)(t,e.id)),ek=(0,n.useMemo)(()=>t?p.F.record:p.F.list,[t]),ev=(0,n.useMemo)(()=>{let e=(0,I.nX)(eA);return e?.find(e=>e?.type===E.q.Record)},[eA]),eS=(0,n.useMemo)(()=>{if(Y&&!a&&!t)return Y?.listView?.columns?Y?.listView?.columns?.filter(e=>e.visible).map(e=>e?.key)||[]:Y?.listSchema?.map(e=>e?.key)||[];if(a){let t=e?.list_metadata?.views.find(e=>e.id===a);return t?.columns?.filter(e=>e.visible).map(e=>e?.key)||[]}return ek===p.F.record&&ev?.columns?.length?ev.columns.map(e=>e.key):e?.list_metadata?.schema?.map(e=>e?.key)||[]},[e.list_metadata?.views,e.list_metadata?.schema,Y,a,t,ev,ek]),eI=(0,n.useMemo)(()=>e?.list_metadata?.views.find(e=>e.is_all_items_view),[e.list_metadata?.views]),ew=(0,n.useMemo)(()=>(0,O.le)(e.id,a||eI?.id||""),[eI?.id,e.id,a]),eT=(0,n.useMemo)(()=>(0,O.jW)(e.id,a||eI?.id||""),[eI?.id,e.id,a]),eN=(0,L.d4)(ew),eM=(0,L.d4)(eT),{records:eR,columnMap:eP}=(0,h.o)({list:eA,listRecords:ex,filters:eN,sorts:eM,searchString:"",viewId:eE?.id??""}),eL=(0,n.useMemo)(()=>Y?.listSchema?Object.fromEntries(Y?.listSchema?.map(e=>[e.key,e])):{},[Y?.listSchema]),eO=(0,n.useMemo)(()=>!Y||a||t?eP:eL,[t,a,eP,Y,eL]),eD=(0,n.useMemo)(()=>{if((0,u.d3)(eO)&&ef?.groupBy)return eO[ef.groupBy]},[eO,ef]),{rowItems:eF}=(0,f.O)({records:eR,groupBy:eD,viewOnly:!1,filters:eN,includeTitleRow:!1,includeMainHeaderRow:!1,gridTitle:eC}),eU=(0,n.useCallback)(async()=>{await es((0,D.D)({listId:e?.id})).catch(e=>(0,T.Ay)({label:"lists"}).error("error fetching records for list view unfurls",e)).finally(()=>{em(!0)})},[es,e]);(0,n.useEffect)(()=>{ec&&(!Y||a)&&!t&&!ea&&!er&&!en&&!(0,v.A)(e)&&!ed&&(0,i.A)(ex)&&eU()},[a,ed,ec,Y,ea,er,t,en,e,eU,ex]),(0,n.useEffect)(()=>{!Y&&(t&&(eg?.isNonExistent&&ep(d.w.loading),eg?.isDeleted&&ep(d.w.error),eg&&!eg?.isDeleted&&ep(d.w.enabled)),!a&&!t&&(ed||ep(d.w.loading),(0,v.A)(e)&&ed&&ep(d.w.error),(0,v.A)(e)||!ed&&(0,i.A)(ex)||ep(d.w.enabled))),a&&(ed||ep(d.w.loading),((0,v.A)(e)||e&&!eE)&&ep(d.w.error),!(0,v.A)(e)&&eE&&(ed||!(0,i.A)(ex))&&ep(d.w.enabled)),((0,C.sR)(e)||(0,C.Bp)(e))&&ep(d.w.noAccess),(ea||er||en||Y?.listTombstone&&!eE)&&ep(d.w.error)},[e,eg,a,eE,t,ed,ec,Y,ea,er,en,ex]);let eB=(0,n.useMemo)(()=>{if(t&&Y){let e=Y?.listRecord?.record?.fields;if(!e?.length)return;return e.map(e=>e?.reference?.length?{key:e.key,value:(0,A.Zr)(e?.reference[0])}:{key:e.key,value:e.richText??e.value})}if(eg?.fields)return Object.entries(eg?.fields).map(([e,t])=>({key:e,value:t}))},[eg?.fields,Y,t]),eH=(0,n.useMemo)(()=>{if((0,u.d3)(eO))return eB?.filter(e=>(!(0,l.A)(e?.value)||!!e?.value?.length)&&("name"!==e.key&&!!eO[e.key]&&e?.value!==null&&e?.value!==void 0||eO[e.key]?.type===x.$.Vote)).sort((e,t)=>eS.indexOf(e.key)-eS.indexOf(t.key)).slice(0,7)},[eO,eS,eB]),eW=(0,n.useMemo)(()=>eF.slice(0,25).filter(e=>e.type===p.F.record).map(e=>e.record),[eF]),eV=(0,n.useMemo)(()=>a?eW.slice(0,ei):!Y||a||t?eR.slice(0,5):(Y?.listRecords??[]).map(e=>e.fields.reduce((e,t)=>({...e,[t.key]:t.richText??t.value}),{})),[eR,Y,a,t,ei,eW]),eG=(0,n.useMemo)(()=>{if(!t&&(0,u.d3)(eO)){if((0,I.Ux)(e)){let e=eS.filter(e=>eO?.[e]?.key!==x.$.TodoCompleted&&eO?.[e]?.type!==x.$.Reference).slice(0,2).map(e=>({key:eO[e].key}));return e.unshift({key:x.$.TodoCompleted}),e}return eS.filter(e=>eO[e]).slice(0,2).map(e=>({key:eO[e].key}))}return eH},[eH,t,eO,eS,e]),eq=(0,n.useMemo)(()=>!eG?.length&&(0,u.I6)()||null,[eG?.length]),ej=(0,n.useCallback)(n=>{eu===d.w.enabled&&(t?es((0,P.A)({listId:e?.id,recordId:t})):es((0,F.N)({listFileId:e?.id,listViewId:a,forceOpenInChildWindow:(0,N.A)(n),forceOpenInSplitView:(0,m.A)(n),source:R.B.LIST_UNFURL})))},[eu,t,es,e.id,a]),ez=(0,n.useCallback)(()=>{e_(!eh)},[eh]),eK=(0,n.useMemo)(()=>({file:e,listEntityType:ek,isActionsBarMenuOpen:eh,handleMenuToggle:ez,listViewId:a,record:eg,channelId:W}),[e,ek,eh,ez,a,eg,W]),e$=(0,n.useMemo)(()=>{if(Y){if(t)return(0,o.A)(Y?.authorName);if(!t&&!a)return(0,o.A)(Y?.title)}return eC},[Y,eC,t,a]),eY=(0,L.Z2)(e=>{let a=eB?(0,u.pI)({columnMap:eO,fields:eB}):void 0;if(t&&a&&(0,u.d3)(eO))return(0,y.y)({value:a?.value,column:eO[a.key],isUnfurl:!0},e)}),eQ=(0,n.useMemo)(()=>(0,u.TC)({fileTitle:e$,listViewName:eE?.name,fields:eB,listRecordId:t,entityState:eu,listViewIsDeleted:er,listFileIsNotFound:en,viewType:eb,columnMap:eO,listRecordAriaLabel:eY,isTombstone:Y?.listTombstone,isArchived:(Y?.listRecord?.record?.archived||eg?.isArchived)??!1,isSubtask:!!Y?.listRecord?.record?.parentRecordId}),[eu,eB,eE?.name,t,e$,er,eb,eO,eY,Y?.listTombstone,Y?.listRecord?.record?.archived,Y?.listRecord?.record?.parentRecordId,eg?.isArchived,en]),eZ=U.t("Open list",{fallbackHash:"7275350bfcafb49d33ab7ea8ae00a198ede915fe",fallbackHashNs:"lists"}),eJ=ey&&!!H,eX=(0,n.useMemo)(()=>(0,I.uA)(eA)||[],[eA]),e0=eX?.find(e=>e.key===ef?.groupBy),e1=(0,_.D)({list:eA,viewId:a,forcePrimaryColumnFirst:!0}).filter(e=>e.key!==e0?.key),e2=(0,n.useMemo)(()=>{let e;if(eb!==E.q.Board)return[];if(!e0)return[{label:U.t("Ungrouped"),value:""}];let t=e0.type;if(t===x.$.Select&&e0.options?.choices)e=e0.options.choices.map(e=>({label:e.label,value:e.value,color:e.color}));else if(t===x.$.Checkbox)e=[{label:"",value:!0}];else if(t===x.$.Rating&&e0.options?.max){e=[];for(let t=1;t<=e0.options.max;t++)e.push({label:"",value:t})}else{let t=[];(0,M.x0)(ex??{},a??"").filter(e=>!!e?.fields?.[e0.key]).forEach(e=>{(0,g.Hs)(e?.fields?.[e0.key],e0).forEach(e=>{t.push({label:e,value:e})})}),e=(0,s.A)(t,"value")}return e.unshift({label:"",value:""}),e},[e0,ex,a,eb]),e4=(0,n.useMemo)(()=>{if(eb!==E.q.Board)return[];if(!e0||!eE?.grouping?.order)return e2;let e=eE?.grouping?.order??[];return b.B_(e2,e,e0?.type??x.$.Select)},[e2,e0,eE?.grouping?.order,eb]),e5=(0,n.useMemo)(()=>{if(eb!==E.q.Board)return{};let e={};if(e4&&e0?.key&&eR)for(let t of e4)e[t.value]=eR.filter(e=>""!==t.value&&e[e0.key]===t.value||""!==t.value&&(0,g.Hs)(e[e0.key],e0).has(t.value)||""===t.value&&!e[e0.key]);if(!e0?.key)for(let t of e4)e[t.value]=eR??[];return e},[e0,e4,eR,eb]),e3=eu!==d.w.noAccess&&void 0!==Y&&(t?!eG?.length||eG?.length<6:!eV?.length||eV?.length<5),e6=U.t("Untitled list",{fallbackHash:"621521f9a8788695ec292cbec54d2792cfdf0a7d",fallbackHashNs:"files"}),e8=(0,k.SB)(e)||e6;return(0,n.useMemo)(()=>({listUnfurlLabelProps:eQ,entityState:eu,selectedFields:eG,columnMap:eO,emptyListLabel:eq,onClick:ej,listEntityType:ek,size:c,isRemovable:B,draftId:H,channelId:W,url:V,onRemove:G,removeButtonTip:q,isFullWidth:j,isFullHeight:z??e3,listRecords:eV,actionBarProps:eK,showActionsBar:K,isInteractive:$,file:e,showFilePermissions:eJ,customWidth:Q,customMaxWidth:Z,customPreviewContainerHeight:J,shouldShrinkUnderDefaultWidth:X,withBorder:ee,withHover:et,listFileIsDeleted:ea,listFileIsNotFound:en,listViewIsDeleted:er,maxNumOfRowsInPreview:ei,viewType:eb,listId:e?.id,boardViewVisibleColumns:e1,boardViewOrderedGroups:e4,boardViewColumns:e5,boardViewGroupByColumn:e0,ariaLabel:eZ,groupAriaLabel:e8,isTombstone:Y?.listTombstone,snapshot:Y,isRecordArchived:(Y?.listRecord?.record?.archived||eg?.isArchived)??!1,hideHeader:el,dragRef:eo}),[eK,eZ,e5,e0,e4,e1,eO,Z,J,Q,H,W,eq,eu,e,e8,z,j,$,B,ek,ea,en,eV,eQ,er,ei,G,q,ej,eG,e3,X,K,eJ,c,Y,V,eb,ee,et,eg?.isArchived,el,eo])}},0x1dd284e05:(e,t,a)=>{"use strict";a.d(t,{I6:()=>getEmptyListLabel,TC:()=>getListUnfurlLabelProps,_j:()=>getListSnapshotDataFromAttachment,bq:()=>getIdFromUnfurlUrl,d3:()=>isNonEmptyColumnMap,eb:()=>convertListAttachmentToCamelCase,h2:()=>isListViewDeleted,pI:()=>getPrimaryField});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x20482ad21),l=a(0x32d3ef3d),o=a(0x1c2d7de14),s=a(0x1b3ecb90f),c=a(0x15a4ffb05),d=a(0x1c7cb6e50);let m=new i.Ay("lists"),isNonEmptyColumnMap=e=>!(0,r.A)(e),convertListAttachmentToCamelCase=e=>{if(e)return(0,d.t)(e,20)},getIdFromUnfurlUrl=e=>{if(!e)return;let t=new URL(e);return{viewId:t.searchParams.get("view_id")??"",recordId:t.searchParams.get("record_id")??""}},getListSnapshotDataFromAttachment=(e,t)=>{if(e?.length&&t)return e.find(e=>e.original_url===t)},getEmptyListLabel=()=>m.rt("{emoji} There\u2019s nothing here",{emoji:n.createElement(s.Ay,{forceDisplay:!0,text:":see_no_evil:",emojiSize:s.lw.SMALL,showTooltip:!1})});getEmptyListLabel.displayName="getEmptyListLabel";let getPrimaryField=({columnMap:e,fields:t})=>t?.find(t=>e[t.key]?.isPrimaryColumn||e[t.key]?.is_primary_column),getListUnfurlLabelProps=({fileTitle:e=m.t("Untitled list"),fields:t,listRecordId:a,entityState:r,listViewName:i,listViewIsDeleted:s,viewType:d,columnMap:u,listRecordAriaLabel:p,isTombstone:h=!1,isArchived:_=!1,isSubtask:f=!1,listFileIsNotFound:b})=>{if(r===l.w.error){let e=m.t("List view not found");return a&&(e=m.t("Item not found"),h&&!b&&(e=m.t("This item was deleted"))),!a&&(s||h)&&(e=m.t("This list view was deleted")),{primaryLabel:e,ariaLabel:e}}if(a){let a,r=t?.length?getPrimaryField({columnMap:u,fields:t})?.value:null,i=r?r?.[0]?.elements:null,l=m.rt("Subtask in {fileTitle}",{fileTitle:n.createElement(c.A,{text:e}),fallbackHash:"b756ba011d9ac3d95a26b378a4c0898d853e2e13"}),s=m.rt("Item in {fileTitle}",{fileTitle:n.createElement(c.A,{text:e})}),d=_?m.t("Untitled (Archived)"):m.t("Untitled"),h=f?m.t("Open subtask",{fallbackHash:"da10569a7f5188040b5468b408ed08a8025c324a"}):m.t("Open item");return{secondaryLabel:f?l:s,primaryLabel:r&&i?n.createElement(o.A,{elements:_?(a=i[i.length-1],[...i.slice(0,-1),{...a,elements:a.elements.concat({text:m.t(" (Archived)"),type:"text"})}]):i}):d,hoveredSecondaryLabel:h,ariaLabel:p?`${p}, ${m.t("List item")}`:m.t("Untitled")}}let g=m.rt("{fileTitle}",{fileTitle:n.createElement(c.A,{text:e})});if(i)return{primaryLabel:g,secondaryLabel:m.rt("{listViewName} - {viewType} view",{listViewName:i,viewType:d&&d.charAt(0).toUpperCase()+d.slice(1)}),hoveredSecondaryLabel:m.t("Open view"),ariaLabel:m.t("{listViewName} in {fileTitle}",{listViewName:i,fileTitle:e})};return{primaryLabel:g,secondaryLabel:m.t("List"),hoveredSecondaryLabel:m.t("Open list"),ariaLabel:`${e}, ${m.t("List")}`}};getListUnfurlLabelProps.displayName="getListUnfurlLabelProps";let isListViewDeleted=(e,t)=>!e.some(e=>e.id===t)},0x20005055e:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xf27817c9),o=a(0x11a296110),s=a(0x32d3ef3d),c=a(0x9798b7f),d=a(0x7729d35b),m=a(0x2501a2cee),u=a(0x8260e60b),p=a(0x11ff2a0ed),h=a(0x1356f7294),_=a.n(h);let Compact=({listUnfurlLabelProps:e,listEntityType:t,entityState:a,file:r,draftId:h,channelId:f,onFilePermissionSelect:b,showFilePermissions:g,shouldShowLabelGap:y,listFileIsDeleted:A,listFileIsNotFound:x,listViewIsDeleted:E,noPadding:C=!1,isTombstone:k=!1,isRecordArchived:v=!1})=>{let S=null,{isHovered:I}=(0,l.r)(),w=i()({[_().listRecordThumbnail]:t===u.F.record,[_().listThumbnail]:t===u.F.list,[_().listRecordThumbnailArchived]:v}),T=t===u.F.list?"lists-filled":"list-item",N=(0,n.useMemo)(()=>x?"help":A||k||E?"trash":void 0,[A,k,E,x]),M=(0,n.useCallback)(e=>e.stopPropagation(),[]),R=I&&e?.hoveredSecondaryLabel?e?.hoveredSecondaryLabel:e?.secondaryLabel;switch(g&&r&&h&&(R=n.createElement(o.Nm,{onClick:M},n.createElement("div",{className:_().filePermissions},n.createElement(p.A,{file:r,draftId:h,onFilePermissionSelect:b,channelId:f})))),a){case s.w.enabled:S=n.createElement("div",{className:i()({[_().flexContainer]:!0,[_().withPadding]:!C})},n.createElement("div",{className:w},n.createElement(d.A,{entityState:s.w.enabled,suppressDefaultColors:!0},n.createElement(m.Ah,{name:T,size:"20"}))),n.createElement(c.A,{primaryLabel:e?.primaryLabel,secondaryLabel:R,size:s.S.compact,entityState:s.w.enabled,shouldShowLabelGap:y}));break;case s.w.loading:S=n.createElement("div",{className:i()(_().flexContainer,_().withPadding)},n.createElement(d.A,{entityState:s.w.loading}),n.createElement(c.A,{entityState:s.w.loading,size:s.S.compact}));break;case s.w.error:S=n.createElement("div",{className:i()(_().flexContainer,_().withPadding)},n.createElement(d.A,{customErrorIcon:N,entityState:s.w.error}),n.createElement(c.A,{...e,entityState:s.w.error,size:s.S.compact}))}return S};Compact.displayName="Compact";let f=Compact},0xf84cc69:(e,t,a)=>{"use strict";a.d(t,{A:()=>w});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x32d3ef3d),s=a(0xb59b1927),c=a(0x2501a2cee),d=a(0x15a4ffb05),m=a(0x17f6f3fce),u=a(0x1d92f4c5e),p=a(0xb5ab81b3),h=a(0x22d5e27a),_=a(0x125d2a5ed),f=a(0x1c6fca489),b=a(0x13d718530),g=a(0x153cbdf74),y=a(0x15e1a1041),A=a(0x14fde54c),x=a(0x70de3606),E=a(0x6d72337),C=a(0x226892387),k=a(0x8d0a2ff1),v=a(0x1ce5a81fa),S=a.n(v);let I=new l.Ay("lists"),ExpandedList=({selectedFields:e=[],columnMap:t,listRecords:a,customPreviewContainerHeight:r,maxNumOfRowsInPreview:l=5,viewType:v,listId:w,boardViewVisibleColumns:T,boardViewOrderedGroups:N,boardViewColumns:M,boardViewGroupByColumn:R,noTopBorder:P=!1,noPadding:L=!1,isFullHeight:O,snapshot:D})=>{let F=(0,C.d4)(e=>!!w&&(0,x.vc)(e,w)),U=(0,C.d4)(e=>w?(0,k.vS)(e,w):null),B=(0,n.useMemo)(()=>!!U&&(0,A.Ux)(U),[U]),H=(0,n.useCallback)(e=>{switch(e?.type){case g.$.Rating:return I.t("Not Rated");case g.$.Checkbox:return n.createElement("div",{className:"p-field_renderer__checkbox--unchecked"},n.createElement(c.Ah,{name:"icon-placeholder",inline:!0,size:"20"}));default:return I.t("Ungrouped",{fallbackHash:"4ef7d73c1a83464f50c8d1b29b43e85facfdf3ee"})}},[]),W=(0,n.useMemo)(()=>{let e=void 0!==D,t=(a??[])?.length<l;return e&&t?a?.length?a.length:0:l},[a,l,D]),V=(0,n.useCallback)(e=>1===e?456:2===e?240:220,[]),G=(0,n.useCallback)(()=>{if(!t)return null;let p=void 0!==D,h=r;r||W||!p||(h=0);let _=n.createElement("div",{className:i()(S().gridContainer,{[S().withPadding]:!L,[S().tasksGridContainer]:B,[S().snapshotBottomSizing]:p&&W<l})},n.createElement("div",{className:S().gridRow},e.length>0&&e.map(e=>n.createElement("div",{className:i()(S().gridCell,S().columnHeader),key:`header-${e.key}`},e.key===g.$.TodoCompleted?n.createElement(c.Ah,{name:"check-circle",size:"16"}):n.createElement(d.A,{text:t[e.key].name})))),Array.from({length:W}).map((r,l)=>{let o=a?.[l];return n.createElement("div",{className:i()(S().gridRow,{[S().singleGridRow]:p&&1===W}),key:`row-${l+1}`},e.length>0&&e.map(e=>{let a=o?.[e.key],r=t[e.key];return r?n.createElement("div",{className:i()(S().gridCell,{[S().gridCellEmpty]:(0,f.Po)(a),[S().gridCellCrossOut]:o&&r.isPrimaryColumn&&(0,u.G)({columnMap:t,record:o,isTodosEnabled:B})}),key:`${o?.id}-${e.key}-cell`},(0,f.Po)(a)&&e.key!==g.$.TodoCompleted?n.createElement(m.A,{column:r}):(0,E.sf)({column:r,value:a,isUnfurl:!0,listId:w})):null}))}));return p&&!W&&(_=null),n.createElement(s.A,{entityState:o.w.enabled,customHeight:h,noPadding:!0,noTopBorder:P||p&&!W,isFullHeight:O&&p},_)},[t,r,P,L,B,e,W,a,w,O,l,D]),q=(0,n.useCallback)(({column:e,value:r,className:l,recordId:o})=>{let s=null;if((0,A.Ke)(r)&&(s=n.createElement(m.A,{column:e})),s=n.createElement(h.A,{className:l,listId:w,column:e,value:r,isUnfurl:!0}),B){let r=t?.[g.$.TodoCompleted]?t[g.$.TodoCompleted]:null;if(w&&r&&o&&e.isPrimaryColumn){let e=a?.find(e=>e.id===o),t=e?.todo_completed;return n.createElement("div",{className:i()(S().boardPrimaryField,{[S().boardPrimaryFieldCrossOut]:t})},n.createElement(_.p,{listId:w,recordId:o,viewOnly:!0,column:r,marginTop:1,isUnfurl:!0}),s)}}return s},[w,B,t,a]),j=(0,n.useCallback)(()=>{if(!t||!N||!M)return null;let e=N.filter(e=>M[e.value].length>0).slice(0,4),a=V(e.length);return n.createElement(s.A,{entityState:o.w.enabled,customHeight:r,noPadding:!0,noTopBorder:P},n.createElement("div",{className:i()(S().boardContainer,"p-board_view--usability_prototype","p-grid--saturated-colors",{[S().withPadding]:!L,[S().tasksBoardContainer]:F})},e.map(e=>{let r=M[e.value],l=R?.options?.choices?.find(t=>t.value===e.value),o=l?.color??b.a.Gray,s=R?.key??"";return n.createElement("div",{className:i()(S().boardLaneContainer,`p-grouping_color__bg--${o}`),style:{width:a},key:e.value},n.createElement("div",{className:S().boardLaneHeaderWrapper},n.createElement("div",{className:S().boardLaneHeader},r&&n.createElement(n.Fragment,null,!e.value&&n.createElement("span",{className:"p-board_lane_header__empty_title"},H(t[s])),e.value&&n.createElement(h.A,{listId:w,column:t[s],value:e.value,isUnfurl:!0}),r.length>=0&&n.createElement("span",{className:i()("p-board_lane_header__title_count",`p-grouping_color__text--${o}`)},I.t("{recordCount, plural, =1 {# item} other {# items}}",{recordCount:r.length}))))),T&&r.slice(0,3).map(e=>n.createElement(p.j,{item:e,visibleColumns:T,columnMap:t,groupByColor:o,renderBoardField:q,key:e.id,experimentListsGridTodosEnabledForList:F})))})))},[t,r,q,w,M,N,T,R,V,P,L,H,F]);return v===y.q.Board?j():G()};ExpandedList.displayName="ExpandedList";let w=n.memo(ExpandedList)},0x9c690390:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x32d3ef3d),o=a(0xb59b1927),s=a(0x1fdec3e16),c=a(0x20482ad21),d=a(0x2501a2cee),m=a(0x8260e60b),u=a(0x1ce5a81fa),p=a.n(u);let h=new c.Ay("lists"),ListRecordEntityExpandedFooter=({footerMode:e})=>{let t={[m.n.Archived]:h.t("Archived item"),[m.n.Completed]:h.t("Completed item")},a={[m.n.Archived]:n.createElement(d.Ah,{name:"archive-filled",size:"16"}),[m.n.Completed]:n.createElement(d.Ah,{name:"check-circle-filled",size:"16"})};return n.createElement("div",{className:i()(p().listRecordEntityExpandedFooter,"bold",{[p().completedFooter]:e===m.n.Completed,[p().archivedFooter]:e===m.n.Archived})},a[e],t[e])};ListRecordEntityExpandedFooter.displayName="ListRecordEntityExpandedFooter";var _=a(0x15a4ffb05),f=a(0x22d5e27a),b=a(0x153cbdf74),g=a(0x14fde54c),y=a(0x226892387),A=a(0x8d0a2ff1);let ExpandedListRecord=({listId:e,selectedFields:t,columnMap:a,emptyListLabel:r,customPreviewContainerHeight:c,noTopBorder:d,noPadding:u,isFullHeight:h,snapshot:x,isRecordArchived:E})=>{let C=(0,y.d4)(t=>e?(0,A.vS)(t,e):null),k=(0,n.useMemo)(()=>t?.filter(e=>a?.[e.key]?.type!==b.$.TodoCompleted),[t,a]),v=(0,n.useMemo)(()=>!!C&&(0,g.Ux)(C),[C]),S=(0,n.useMemo)(()=>t?.find(e=>a?.[e.key]?.type===b.$.TodoCompleted&&e?.value),[a,t]),I=(0,n.useMemo)(()=>E?m.n.Archived:v&&S?m.n.Completed:void 0,[E,v,S]);if(!a)return null;let w=!!k?.length,T=void 0!==x,N=c;return c||w||!T||(N=0),n.createElement(n.Fragment,null,n.createElement(o.A,{centerContents:!w,entityState:l.w.enabled,customHeight:N,noPadding:!0,noTopBorder:d||T&&!w,isFullHeight:h&&T},w&&n.createElement("div",{className:i()({[p().expandedListRecordContent]:!0,[p().withPadding]:!u})},k?.map((t,r)=>{let l=a?.[t.key]?.type,o=k.length-1;return n.createElement("div",{key:t.key,className:i()(p().fieldContainer,{[p().fieldContainerAlignment]:l===b.$.Text||l===b.$.RichText,[p().marginBottom]:r!==o})},n.createElement("div",{className:p().fieldLabel},n.createElement(s.A,{lines:1,withTooltip:!0,breakWords:!1},n.createElement(_.A,{text:a?.[t.key]?.name}))),n.createElement("div",{className:p().fieldValue},a?.[t.key]&&n.createElement(f.A,{listId:e,column:a[t.key],value:t?.value,isUnfurl:!0})))})),!w&&!T&&n.createElement("div",{className:p().emptyLabel},r)),w&&I&&n.createElement(ListRecordEntityExpandedFooter,{footerMode:I}))};ExpandedListRecord.displayName="ExpandedListRecord";let x=ExpandedListRecord},0x8260e60b:(e,t,a)=>{"use strict";a.d(t,{F:()=>n,n:()=>i});let n={list:"list",record:"record",kanban:"kanban"};var r,i=((r={}).Completed="Completed",r.Archived="Archived",r)},0x16395d169:(e,t,a)=>{"use strict";a.d(t,{A:()=>ec});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x32d3ef3d),l=a(0xfa28400d),o=a(0x20005055e),s=a(0x120c268ad),c=a.n(s),d=a(0xf27817c9),m=a(0xb59b1927),u=a(0x9798b7f),p=a(0x7729d35b),h=a(0x2501a2cee),_=a(0xf84cc69),f=a(0x9c690390),b=a(0x8260e60b),g=a(0x2d389b17),y=a(0x6ba5f281),A=a(0x1eb57d5e9),x=a(0x1ce5a81fa),E=a.n(x);let Expanded=({listUnfurlLabelProps:e,listEntityType:t,entityState:a,selectedFields:r,columnMap:l,emptyListLabel:o,listRecords:s,file:x,isFullWidth:C,customPreviewContainerHeight:k,maxNumOfRowsInPreview:v,isInteractive:S=!0,listViewIsDeleted:I=!1,viewType:w,listId:T,boardViewVisibleColumns:N,boardViewOrderedGroups:M,boardViewColumns:R,boardViewGroupByColumn:P,isFullHeight:L,snapshot:O,isRecordArchived:D,listFileIsNotFound:F,hideHeader:U=!1})=>{let B=null,{isHovered:H}=(0,d.r)(),W=c()({[E().listRecordThumbnail]:t===b.F.record,[E().listThumbnail]:t===b.F.list,[E().listRecordThumbnailArchived]:D}),V=t===b.F.list?"lists-filled":"list-item",G=(0,n.useMemo)(()=>n.createElement("div",{className:E().listErrorPageContainer,style:{height:k??"100%"}},x&&t===b.F.list?n.createElement(g.A,{file:x,isUnfurl:!0,listViewIsDeleted:I}):n.createElement(y.A,{listRecordErrorCode:F?A.Q.ListNotFound:A.Q.RecordDeleted})),[x,t,k,I,F]);switch(a){case i.w.enabled:B=n.createElement("div",{className:E().container},!U&&n.createElement("div",{className:E().header},n.createElement("div",{className:W},n.createElement(p.A,{entityState:i.w.enabled,suppressDefaultColors:!0},n.createElement(h.Ah,{name:V,size:"20"}))),n.createElement(u.A,{primaryLabel:e?.primaryLabel,secondaryLabel:H&&S&&e?.hoveredSecondaryLabel?e?.hoveredSecondaryLabel:e?.secondaryLabel,size:i.S.expanded,entityState:i.w.enabled})),t===b.F.record&&n.createElement(f.A,{listId:T,selectedFields:r,columnMap:l,emptyListLabel:o,customPreviewContainerHeight:k,isFullHeight:L,snapshot:O,isRecordArchived:D}),t===b.F.list&&n.createElement(_.A,{columnMap:l,listRecords:s,selectedFields:r,customPreviewContainerHeight:k,maxNumOfRowsInPreview:v,viewType:w,listId:T,boardViewVisibleColumns:N,boardViewOrderedGroups:M,boardViewColumns:R,boardViewGroupByColumn:P,isFullHeight:L,snapshot:O}));break;case i.w.loading:B=n.createElement("div",{className:E().container},!U&&n.createElement("div",{className:E().header},n.createElement(p.A,{entityState:i.w.loading}),n.createElement(u.A,{...e,entityState:i.w.loading,size:i.S.compact})),n.createElement(m.A,{entityState:i.w.loading,customHeight:k,isFullWidth:C}));break;case i.w.noAccess:B=x?n.createElement("div",{className:E().listErrorPageContainer,style:{height:k??"100%"}},n.createElement(g.A,{isUnfurl:!0,file:x})):null;break;case i.w.error:B=G}return B};Expanded.displayName="Expanded";var C=a(0x16cf1da63),k=a(0x20482ad21),v=a(0x11c86845f),S=a(0x1e1bdd25f),I=a(0x125de1ee5),w=a(0x99233ecb),T=a(0x10ac11625),N=a(0x11015262),M=a(0xed563df0),R=a(0x2493bd395),P=a(0x3440462),L=a(0x1a02c72b5),O=a(0xd6a16321),D=a(0xd843ab47),F=a(0x1ede77aa4),U=a(0xbd3de346),B=a(0x14fde54c),H=a(0x5738b4bc),W=a(0x3711e82d),V=a(0x24558b75f),G=a(0xb60a1b),q=a(0x20b63020e),j=a(0x226892387),z=a(0x217553e42),K=a(0x14149c126),$=a(0x2d1c8f66),Y=a(0x21fd09382),Q=a(0x1de4133);let Z=new k.Ay("lists"),ListEntityMoreActionsMenu=({menuProps:e,listEntityType:t,listViewId:a,file:r,record:i,channelId:l})=>{let o=(0,C.wA)(),s=(0,j.d4)(e=>"on"===(0,K._Z)(e,"files_share_context")),{isChildWindow:c}=(0,n.useContext)(D.A),d=(0,T.b)(),m=(0,V.M2)(),u=(0,j.d4)(e=>(0,z.OL)(e,l)),p=(0,j.d4)(e=>(0,H.c)(e,u)),_=(0,j.d4)(e=>(0,F.K)(e,l)),f=(0,N.v$)(r.id,a),g=(0,N.Q$)(r.id),y=(0,N.R4)(r.id,i?.id),A=(0,R.i)(l??""),x=(0,M.E)({channelId:l??""}),E=!!i?.parentRecordId,k=Z.t("View list details"),v=E?Z.t("View subtask details",{fallbackHash:"4b7349c76e38a1e002c95dae5e89ffebc48fd363"}):Z.t("View item details"),S=Z.t("Copy link to list"),J=Z.t("Copy link to view"),X=E?Z.t("Copy link to subtask"):Z.t("Copy link to item"),ee=Z.t("Remove from later"),et=Z.t("Save for later"),ea=(0,B.Pe)(i)?ee:et,en=(0,U.Gs)(r)?ee:et,er=!!A.find(e=>e.data?.fileId===r.id),ei=(0,n.useCallback)(()=>{o((0,L.o)((0,O.EJ)(r.id)))},[o,r]),el=(0,n.useCallback)(()=>{i?.id&&o((0,L.o)((0,O.z0)({listId:r.id,recordId:i.id})))},[o,r,i]),eo=(0,n.useCallback)(()=>{t===b.F.record&&o((0,Y.I)({text:y})),t===b.F.list&&o((0,Y.I)({text:a?f:g}))},[f,g,o,t,a,y]),es=(0,n.useCallback)(()=>{(0,U.Gs)(r)?o((0,Q.U4)({itemId:r.id})):o((0,Q.jx)({fileId:r.id}))},[o,r]),ec=(0,n.useCallback)(()=>{i?.id&&o((0,Q.tS)({listId:r.id,recordId:i.id}))},[o,r,i]),ed=(0,n.useCallback)(e=>n.createElement(P.e1,{fileId:r.id,channelId:l,menuProps:e}),[r,l]),em=(0,n.useCallback)(()=>{o((0,q.Z)({channelId:l,fileId:r.id,listViewId:a,preventNavigation:!0,showToast:!0}))},[o,r,l,a]),eu=(0,n.useCallback)(()=>{o((0,I.p)({navProps:(0,O.st)({listId:r.id,listViewId:a}),clogParams:{entryPoint:"list-entity-more-actions-menu"}}))},[o,r.id,a]),ep=(0,n.useCallback)(()=>{o((0,$.N)({listFileId:r.id,listViewId:a,source:G.B.LIST_UNFURL,forceOpenInChildWindow:!0}))},[o,r.id,a]),eh=(0,n.useMemo)(()=>{let e=[];t===b.F.list&&(s||e.push({key:"view-list-details",click:ei,label:k,autoClogProps:{eventId:W.EventId.FILE_DETAILS,elementName:"view_file_details",onClick:{enableClogAction:!0},fileId:r.id,uiComponentVariant:"file_details"}}),e.push({key:"copy-list-link",click:eo,label:a?J:S}),e.push({key:"save-list-for-later",click:es,label:en})),t===b.F.record&&(e.push({key:"view-record-details",click:el,label:v}),e.push({key:"copy-record-link",click:eo,label:X}),e.push({key:"save-record-for-later",click:ec,label:ea}));let i=!!l&&!_&&x&&!er,o=!!l&&p&&!_;if((i||o)&&e.push({type:"separator",key:"separator-add-to-folder"}),i&&e.push({key:"add-to-tabs",label:Z.t("Add as tab"),click:em}),o&&e.push({label:Z.t("Add to folder"),type:"submenu",renderSubmenu:ed}),s){let t=m&&!c;(d||t)&&e.push({type:"separator",key:"separator-surfaces"}),d&&e.push({key:"open-in-split-view",label:Z.t("Open in split view"),icon:n.createElement(h.Ah,{name:"move-to-split-view",size:"16"}),click:eu}),t&&e.push({key:"open-in-new-window",label:Z.t("Open in new window"),icon:n.createElement(h.Ah,{name:"open-in-window",size:"16"}),click:ep})}return e},[t,l,p,_,ei,k,eo,a,J,S,es,en,el,v,X,ec,ea,ed,x,er,em,s,r.id,d,c,m,eu,ep]);return n.createElement(w.a,{...e,width:220,template:eh})};ListEntityMoreActionsMenu.displayName="ListEntityMoreActionsMenu";var J=a(0x171c34b90),X=a(0xf4f3c80f),ee=a(0x1266327e6),et=a(0x24fa87f69),ea=a(0x1d8f0e558),en=a(0x1c450e1a),er=a(0xf504efa8),ei=a(0x21bfacd01),el=a(0x97f7d1a1),eo=a(0x19895585a);let es=new k.Ay("lists"),ListEntityActionsBar=({listEntityType:e,file:t,record:a,listViewId:i,isSearchRecord:l,channelId:o})=>{let s,c=(0,C.wA)(),d=(0,j.d4)(e=>"on"===(0,K._Z)(e,"files_share_context")),m=(0,j.d4)(e=>"on"===(0,K._Z)(e,"custom_file_sections")),u=(0,j.d4)(e=>(0,en.GF)(e,t)),p=!!a?.parentRecordId,_=(0,j.d4)(ei.V),{isChildWindow:f,container:g}=(0,n.useContext)(D.A),y=(0,V.M2)();s=u?es.t("Sharing info"):i?es.t("Share list view"):es.t("Share list");let A=es.t("Open in new window"),x=es.t("Copy link"),E=p?es.t("Share subtask"):es.t("Share item"),k=es.t("More actions"),w=es.t("More list actions"),T=es.t("Open in new window"),M=(0,N.R4)(t.id,a?.id),R=(0,n.useCallback)(()=>{c((0,er.A)({fileId:t.id,isStackable:!0,viewId:i}))},[c,t,i]),P=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),a?.id&&c((0,er.A)({fileId:t.id,isStackable:!0,recordId:a.id}))},[c,t,a]),F=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c((0,$.N)({listFileId:t.id,listViewId:i,source:G.B.LIST_UNFURL,forceOpenInChildWindow:!0}))},[c,t,i]),B=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c((0,el.H)({listId:t.id,recordId:a?.id}))},[c,t.id,a?.id]),H=(0,n.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),e===b.F.record&&c((0,Y.I)({text:M}))},[c,e,M]),q=(0,n.useCallback)(r=>n.createElement(ListEntityMoreActionsMenu,{menuProps:r,listViewId:i,listEntityType:e,file:t,record:a,channelId:o}),[e,i,t,a,o]),z=(0,n.useCallback)(()=>{c((0,I.p)({navProps:(0,O.st)({listId:t?.id}),clogParams:{entryPoint:"list-entity-action-bar"}}))},[c,t?.id]),Q=(0,n.useCallback)(()=>{c((0,L.o)((0,O.EJ)(t.id)))},[c,t.id]),Z=(0,n.useMemo)(()=>{let a=[];if(e===b.F.list){a.push({onClick:R,"aria-label":s,svgIconProps:{name:"share-message"},tooltipLabel:s,tooltipPosition:"top"});let e=es.t("Open in split view");if(_||f||g===eo.mq.Split||d||a.push({onClick:z,"aria-label":e,svgIconProps:{name:"move-to-split-view"},tooltipLabel:e,tooltipPosition:"top"}),!y||f||d||a.push({onClick:F,"aria-label":T,svgIconProps:{name:"open-in-window"},tooltipLabel:T,tooltipPosition:"top"}),a.push({"aria-label":"star",svgIconProps:{name:"star"},tooltipPosition:"top"}),d){let e=(0,U.Vc)(t);a.push({onClick:Q,"aria-label":s,svgIconProps:{name:"info"},tooltipLabel:(0,J.u)(t,e,!1,d),tooltipPosition:"top",autoClogProps:{eventId:W.EventId.FILE_DETAILS,elementName:"view_file_details",onClick:{enableClogAction:!0},fileId:t.id,uiComponentVariant:"file_references"}})}a.push({onClick:r.A,"aria-label":w,svgIconProps:{name:"ellipsis-vertical-filled"},tooltipLabel:k,tooltipPosition:"top-right",renderMenu:q,isMenuTrigger:!0})}return e===b.F.record&&(a.push({onClick:P,"aria-label":E,svgIconProps:{name:"share-message"},tooltipLabel:E,tooltipPosition:"top"}),l?(a.push({onClick:B,"aria-label":A,svgIconProps:{name:"open-in-window"},tooltipLabel:A,tooltipPosition:"top"}),a.push({onClick:H,"aria-label":x,svgIconProps:{name:"link"},tooltipLabel:x,tooltipPosition:"top"})):a.push({onClick:r.A,"aria-label":w,svgIconProps:{name:"ellipsis-vertical-filled"},tooltipLabel:k,tooltipPosition:"top-right",renderMenu:q,isMenuTrigger:!0})),a?.map(e=>{if("star"===e["aria-label"])return m?n.createElement(ee.H,{key:e["aria-label"],fileId:t.id,size:"small",tooltipPosition:e.tooltipPosition,source:X.j.FILE_PILLOW}):n.createElement(et.$,{key:e["aria-label"],listId:t.id,asMessageActionButton:!0});let a=n.createElement(ea.A,{key:e["aria-label"],icon:n.createElement(h.Ah,{name:e.svgIconProps.name}),onClick:e.onClick,label:e.tooltipLabel,"aria-label":e["aria-label"],autoClogProps:e.autoClogProps,tooltipPosition:e.tooltipPosition});return e.isMenuTrigger?n.createElement(S.A,{key:e["aria-label"],renderMenu:q,position:"left-bottom"},a):a})},[e,R,s,_,f,g,d,y,F,T,w,k,q,z,t,Q,P,E,l,B,A,H,x,m]);return n.createElement(v.A,null,Z)};ListEntityActionsBar.displayName="ListEntityActionsBar";let ListEntity=e=>{let t=(0,n.useMemo)(()=>({size:e.size,entityState:e.entityState,ariaLabel:e.ariaLabel,groupAriaLabel:e.groupAriaLabel,data:{draftId:e.draftId||void 0,url:e.url||void 0},onClick:e.onClick,onRemove:e.onRemove||r.A,removeButtonTip:e.removeButtonTip,isRemovable:e.isRemovable,isFullWidth:e.isFullWidth,isFullHeight:e.isFullHeight,withBorder:e.withBorder,withHover:e.withHover,renderedInListVariant:e.renderedInListVariant,actionBarProps:e.actionBarProps,isActionsBarMenuOpen:e.actionBarProps?.isActionsBarMenuOpen,isInteractive:e.isInteractive,customWidth:e.customWidth,customMaxWidth:e.customMaxWidth,shouldShrinkUnderDefaultWidth:e.shouldShrinkUnderDefaultWidth,listFileIsDeleted:e.listFileIsDeleted,listFileIsNotFound:e.listFileIsNotFound,listViewIsDeleted:e.listViewIsDeleted,isTombstone:e.isTombstone,dragRef:e.dragRef}),[e.size,e.entityState,e.ariaLabel,e.onClick,e.isRemovable,e.draftId,e.url,e.onRemove,e.removeButtonTip,e.isFullWidth,e.isFullHeight,e.withBorder,e.withHover,e.renderedInListVariant,e.actionBarProps,e.isInteractive,e.customWidth,e.shouldShrinkUnderDefaultWidth,e.listFileIsDeleted,e.listFileIsNotFound,e.listViewIsDeleted,e.groupAriaLabel,e.isTombstone,e.customMaxWidth,e.dragRef]),a=(0,n.useMemo)(()=>({listUnfurlLabelProps:e.listUnfurlLabelProps,listEntityType:e.listEntityType,entityState:e.entityState,onClick:e.onClick,isRemovable:e.isRemovable,file:e.file,draftId:e.draftId,channelId:e.channelId,onFilePermissionSelect:e.onFilePermissionSelect,showFilePermissions:e.showFilePermissions,shouldShowLabelGap:e.shouldShowLabelGap,listFileIsDeleted:e.listFileIsDeleted,listFileIsNotFound:e.listFileIsNotFound,listViewIsDeleted:e.listViewIsDeleted,isTombstone:e.isTombstone,isRecordArchived:e.isRecordArchived}),[e.entityState,e.isRemovable,e.listEntityType,e.listUnfurlLabelProps,e.onClick,e.file,e.draftId,e.channelId,e.onFilePermissionSelect,e.showFilePermissions,e.shouldShowLabelGap,e.listFileIsDeleted,e.listFileIsNotFound,e.listViewIsDeleted,e.isTombstone,e.isRecordArchived]),s=(0,n.useMemo)(()=>({...a,selectedFields:e.selectedFields,columnMap:e.columnMap,emptyListLabel:e.emptyListLabel,listRecords:e.listRecords,file:e.file,isInteractive:e.isInteractive,isFullWidth:e.isFullWidth,customPreviewContainerHeight:e.customPreviewContainerHeight,listViewIsDeleted:e.listViewIsDeleted,maxNumOfRowsInPreview:e.maxNumOfRowsInPreview,viewType:e.viewType,listId:e.listId,boardViewVisibleColumns:e.boardViewVisibleColumns,boardViewOrderedGroups:e.boardViewOrderedGroups,boardViewColumns:e.boardViewColumns,boardViewGroupByColumn:e.boardViewGroupByColumn,isFullHeight:e.isFullHeight,snapshot:e.snapshot,isRecordArchived:e.isRecordArchived,listFileIsNotFound:e.listFileIsNotFound,hideHeader:e.hideHeader}),[a,e.columnMap,e.emptyListLabel,e.selectedFields,e.listRecords,e.file,e.isInteractive,e.isFullWidth,e.customPreviewContainerHeight,e.listViewIsDeleted,e.maxNumOfRowsInPreview,e.viewType,e.listId,e.boardViewVisibleColumns,e.boardViewOrderedGroups,e.boardViewColumns,e.boardViewGroupByColumn,e.isFullHeight,e.snapshot,e.isRecordArchived,e.listFileIsNotFound,e.hideHeader]);return n.createElement(l.Ay,{...t,actionsBar:e?.showActionsBar&&e.entityState===i.w.enabled?n.createElement(ListEntityActionsBar,e.actionBarProps):null},e.size===i.S.compact&&n.createElement(o.A,a),e.size===i.S.expanded&&n.createElement(Expanded,s))};ListEntity.displayName="ListEntity";let ec=n.memo(ListEntity)},0xcea4a81c:(e,t,a)=>{"use strict";a.d(t,{a:()=>R});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1771e0aa7),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x32d3ef3d),d=a(0x12f1a6c38),m=a(0x91728dda),u=a(0x1adcaea70),p=a(0x249d29fa),h=a(0x1f40c4cef),_=a(0x2059520a0),f=a(0x1be9380c8),b=a(0x249b1763),g=a(0x21afb988),y=a(0x754ea859),A=a(0x3ca4e1cc),x=a(0xb6f49241),E=a(0x24296355f),C=a(0x3711e82d),k=a(0x188544c76),v=a(0x226892387),S=a(0x216198dcb),I=a(0x46dbff89),w=a(0x1c8beab7f),T=a(0x8ed8ca46);let N=new s.Ay("modernselling"),M={name:"channel"},R=n.memo(({entityState:e,size:t,record:a,showActionsBar:i,isInteractive:s=!0,canvasStyling:R=!1,isFullWidth:P=!1,isDraft:L=!1,autoClogProps:O,referrer:D,channelId:F,messageTs:U,isForwardedMessage:B=!1,recordChannelId:H,isRemovable:W,onRemove:V,removeButtonTip:G})=>{let q=(0,v.d4)(m.mI),j=(0,v.d4)(b.$N),z=(0,v.d4)(f.S2),K=(0,v.d4)(A.lK),$=(0,v.d4)(m.k7),Y=(0,r.wA)(),Q=(0,d.o)(),Z=(0,v.d4)(e=>(0,T.tR)(e)||(0,w.tx)(e)),J=a.id,X=!a.fields||0===a.fields.length,ee="ListView"===a.sobject_api_name,et="EmailMessage"===a.sobject_api_name||"ListEmail"===a.sobject_api_name,{handleRefresh:ea,isRefreshing:en,canRefresh:er,refreshError:ei}=(0,x.R)({channelId:F,messageTs:U,entityId:J,updatedAt:a.updated_at,isForwardedMessage:B}),el={eventId:C.EventId.RECORDS_SALESFORCE_RECORD_VIEW,uiComponentName:C.UiComponentName.RECORD_UNFURL,clogImpression:!0,elementName:"record_id",elementValue:J,isListViewUnfurl:ee},eo=(0,n.useMemo)(()=>(0,u.B)({record:a,entityState:e,userHasMultipleOrgs:Z,isInteractive:s,experimentSlackforceListUnfurlsGroupOn:q}),[a,e,Z,s,q]),es=(0,n.useCallback)(()=>{let{rawRecordId:e,salesforceOrgId:t}=(0,k.D)(J);q&&ee?Q({id:e,salesforceOrgId:t,label:eo.primaryLabel,objectType:""},{isRestrictedListView:a.restricted,openInHome:!0}):j&&et?Y((0,I.q)({element:n.createElement(h.EmailModal,{emailMessageId:e,relatedToObjectApiName:a.parent?.sobject_api_name,salesforceOrgId:t})})):Y((0,y.c)({recordId:J,referrer:D}))},[q,j,ee,et,Q,J,eo.primaryLabel,a.parent?.sobject_api_name,a.restricted,Y,D]),ec=!R&&!L,ed=(0,n.useMemo)(()=>{if(L)return 310},[L]),em=(0,n.useMemo)(()=>{if(!L)return l().DT_STATIC_SPACE_3200},[L]),eu=(0,v.d4)(e=>(0,S.i)(e,J)),ep=z?eu?.id||H:eu?.id,eh=N.t("View channel"),e_=(0,n.useCallback)(()=>{if(ep){if(!z)return void Y((0,g.U)({recordId:J}));Y((0,E.V)({record:J,reason:"salesforce-record-entity-view-channel"})).then(e=>{e.channel&&Y((0,g.U)({recordId:J}))}).catch(e=>{let t=e?.name??e?.data?.error;("channel_not_found"===t||"channel_is_limited_access"===t)&&Y((0,I.q)({element:n.createElement(_.f,{recordId:J}),isStackable:!1}))})}},[ep,Y,J,z]);return n.createElement(o.A,{...el,...O},n.createElement(p.X,{entityState:e,size:X?c.S.compact:t,record:a,onClick:es,labelProps:eo,canvasStyling:R,isDraft:L,isInteractive:s,showActionsBar:i,customMaxWidth:em,customWidth:ed,isFullWidth:P,shouldShrinkUnderDefaultWidth:ec,onNavigateToRecordChannel:ep?e_:void 0,navigateToRecordChannelLabel:ep?eh:void 0,navigateToRecordChannelIcon:ep?M:void 0,isListViewRecord:ee,onRefresh:ea,isRefreshing:en,canRefresh:er,refreshError:ei,isRefreshUnfurlsEnabled:K&&$,isRemovable:W,onRemove:V,removeButtonTip:G}))})},0x1adcaea70:(e,t,a)=>{"use strict";a.d(t,{B:()=>getSalesforceRecordUnfurlLabelProps});var n=a(0x20482ad21),r=a(0x16ac9b089),i=a(0x32d3ef3d);let l=new n.Ay("modernselling"),getSalesforceRecordUnfurlLabelProps=({record:e,entityState:t,userHasMultipleOrgs:a,isInteractive:n=!0,experimentSlackforceListUnfurlsGroupOn:o})=>{if(o){let a="ListView"===e.sobject_api_name,r=a?l.t("Salesforce list view"):l.t("Salesforce record"),o=a?l.t("List view"):l.t("Record"),s=a?l.t("Open list view"):l.t("Open record");if(e.restricted)return e.object_label?{primaryLabel:e.object_label,secondaryLabel:e.org.name,hoveredSecondaryLabel:n?s:e.org.name,ariaLabel:e.object_label}:{primaryLabel:r,secondaryLabel:e.org.name,hoveredSecondaryLabel:n?s:e.org.name,ariaLabel:r};if(t===i.w.error)return{primaryLabel:l.t("Item not found"),ariaLabel:l.t("Item not found")};e.name&&(r=e.name),e.object_label&&(o=`${e.object_label}  \xb7  ${e.org.name}`),e.parent&&e.object_label&&(o=l.rt("{label} in {name}  \xb7  {orgName}",{label:e.object_label,name:e.parent.name,orgName:e.org.name}));let c=l.rt("Open {label}",{label:e.object_label?.toLowerCase()});return{primaryLabel:r,secondaryLabel:o,hoveredSecondaryLabel:e.object_label&&n?c:o,ariaLabel:e.object_label??r}}let s=l.t("Salesforce record");e.name&&(s=e.name),t===i.w.error&&(s=l.t("Item not found"));let c=l.t("Record"),d=c;e.object_label&&(d=e.object_label),e.parent&&(d=l.t("{label} in {name}",{label:e.object_label??c,name:(0,r.Ay)(e.parent.name)}));let m=e.restricted&&e?.sobject_api_name&&e?.object_label;e.restricted&&(d=e.org.name),m&&(s=l.t("Salesforce {name}",{name:e?.object_label?.toLowerCase()}),d=l.t("{label}  \xb7  {secondaryLabel}",{label:e.object_label,secondaryLabel:(0,r.Ay)(e.org.name)})),a&&!m&&(d=e.restricted?e.org.name:`${d}  \xb7  ${e.org.name}`);let u=l.rt("Open {label}",{label:e.object_label?.toLowerCase()});return{primaryLabel:s,secondaryLabel:d,hoveredSecondaryLabel:e.object_label&&n&&!m?u:d,ariaLabel:e.object_label??s}}},0x21700b903:(e,t,a)=>{"use strict";a.d(t,{a:()=>Compact});var n,r=a(0xbad225b5),i=a(0xf27817c9),l=a(0x11a296110),o=a(0x32d3ef3d),s=a(0x9798b7f),c=a(0x7729d35b),d=a(0x120c268ad),m=a.n(d),u=a(0x20482ad21),p=a(0x99233ecb),h=a(0x1e1bdd25f),_=a(0x2501a2cee),f=((n={}).private="Private",n.public="Public",n.shared="Shared",n),b=a(0x28933e48),g=a.n(b);let y=new u.Ay("slackforce"),ListViewSharingSettingSubtitle=({record:e})=>{let t,a=e.list_view?.visibility,n=e.list_view?.visibility_editable,i=(0,r.useCallback)(t=>r.createElement(p.Ay,{...t,width:280},r.createElement(p.Dr,{label:y.t("Manage access in Salesforce"),href:e.external_url,showLinkIndicatorIcon:!1,icon:r.createElement(_.Ah,{name:"new-window"}),autoClogProps:{onClick:{enableClogAction:!0},elementName:"manage_list_view_access_in_salesforce",elementValue:e.id,isListViewUnfurl:!0}})),[e.external_url,e.id]);switch(a){case f.private:t=y.t("Only you can open");break;case f.public:t=y.t("All Salesforce users can open");break;case f.shared:t=y.t("Only some Salesforce users can open")}return r.createElement("div",{className:m()(g().content,{[g().private]:a===f.private})},n?r.createElement(h.A,{renderMenu:i,position:"bottom-left"},r.createElement(l.Nm,{className:g().buttonContainer},r.createElement("span",{className:g().text},t),r.createElement("span",{className:g().caret},r.createElement(_.Ah,{name:"caret-down",inline:!0})))):r.createElement(r.Fragment,null,t))};ListViewSharingSettingSubtitle.displayName="ListViewSharingSettingSubtitle";var A=a(0x24f6a06c8),x=a(0x8387d235),E=a.n(x);let Compact=({entityState:e,labelProps:t,record:a,isDraft:n})=>{let{isHovered:d}=(0,i.r)(),m=null,u="ListView"===a.sobject_api_name,p=d?t.hoveredSecondaryLabel:t.secondaryLabel,h=(0,r.useCallback)(e=>e.stopPropagation(),[]);switch(u&&n&&(p=r.createElement(l.Nm,{onClick:h},r.createElement(ListViewSharingSettingSubtitle,{record:a}))),e){case o.w.enabled:m=r.createElement("div",{className:E().compactRecord},r.createElement(A.l,{type:a.sobject_api_name}),r.createElement(s.A,{primaryLabel:t.primaryLabel,secondaryLabel:p,size:o.S.compact,entityState:e}));break;case o.w.loading:m=r.createElement("div",{className:E().compactRecord},r.createElement(c.A,{entityState:e}),r.createElement(s.A,{entityState:e,size:o.S.compact}));break;case o.w.error:m=r.createElement("div",{className:E().compactRecord},r.createElement(c.A,{entityState:e}),r.createElement(s.A,{primaryLabel:t.primaryLabel,entityState:e,size:o.S.compact}))}return m};Compact.displayName="Compact"},0x15c77e8f0:(e,t,a)=>{"use strict";a.d(t,{q:()=>Expanded});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xf27817c9),o=a(0x20482ad21),s=a(0x11a296110),c=a(0xb1ea448c),d=a(0x32d3ef3d),m=a(0xb59b1927),u=a(0x9798b7f),p=a(0x7729d35b),h=a(0x186b638d6),_=a(0x1fdec3e16),f=a(0x249b1763),b=a(0x22170ca89),g=a(0x1282104f7),y=a(0x226892387),A=a(0x7318ec06),x=a.n(A);let E=new o.Ay("modernselling"),C={name:"user-filled"},k=n.memo(({fields:e})=>{let t=(0,y.d4)(f.FR),a=(0,n.useMemo)(()=>(e=>{let t={};if(!e)return t;for(let a of e)t[a.label]=a;return t})(e),[e]),r=a["From Address"],i=a["From Name"],l=a.To,o=a["Text Body"],s=r?.type===b.ls.SlackUser,c=(0,n.useMemo)(()=>{let e=l?.value;return e?e.split(";").map(e=>e.trim()).filter(e=>e.length>0):[]},[l]),renderFromValue=()=>s&&r?.value?n.createElement(g.A,{entityId:r.value,size:h.F.small,forceRealName:!0}):i?.value?n.createElement(g.A,{label:i.value,size:h.F.small,svgIcon:C}):r?.value?n.createElement(g.A,{label:r.value,size:h.F.small,svgIcon:C}):null;renderFromValue.displayName="renderFromValue";let renderToValue=()=>{if(0===c.length)return n.createElement("span",{className:x().noRecipientText},t?E.t("None entered"):"None entered");let e=c[0],a=c.length-1,r=t?E.t("and {count} {count, plural, =1 {other} other {others}}",{count:a}):`and ${a} ${1===a?"other":"others"}`;return n.createElement(n.Fragment,null,n.createElement(g.A,{label:e,size:h.F.small,svgIcon:C}),a>0&&n.createElement("span",{className:x().andOthers},r))};return renderToValue.displayName="renderToValue",n.createElement("div",{className:x().container},n.createElement("div",{className:x().fieldRow},n.createElement("span",{className:x().fieldLabel},"From:"),n.createElement("span",{className:x().fieldValue},renderFromValue())),n.createElement("div",{className:x().fieldRow},n.createElement("span",{className:x().fieldLabel},"To:"),n.createElement("span",{className:x().fieldValue},renderToValue())),o?.value&&n.createElement("div",{className:x().textBody},n.createElement(_.A,{lines:4,breakWords:!1},o.value)))});var v=a(0x1d24ec95f),S=a(0x2081d694d),I=a(0x41d2945c),w=a(0x212b8fec0),T=a(0x177b0fe1e),N=a(0x134c47230),M=a(0x760dd6a6),R=a(0x8caa0ca9),P=a(0x213172452),L=a(0x1314133b1),O=a(0x1b04844aa),D=a(0x23105d319),F=a(0xc74669a8),U=a(0x1d6fa7918),B=a(0x14f192ab),H=a(0xf54eb25c),W=a(0x1a70db76),V=a(0x140565d2b),G=a(0x2c4b53b6),q=a.n(G);let j=n.memo(({fields:e,salesforceOrgId:t,canvasStyling:a})=>{let r=a?10:3,[l,o]=(0,n.useMemo)(()=>(0,v.A)(e||[],e=>!(e=>{let t,a;return(e.type===b.ls.String||e.type===b.ls.TextArea)&&((t=document.createElement("div")).innerHTML=e.value,t.style.width="auto",t.style.position="absolute",t.style.whiteSpace="nowrap",document.body.appendChild(t),a=t.offsetWidth,document.body.removeChild(t),!(a<=175))})(e)),[e]),s=Math.min(2*r,l.length-l.length%2),c=s/2,d=Math.max(0,Math.min(r-c,o.length)),m=l.length%2==1&&c+d<r,u=(0,n.useCallback)(e=>e.type===b.ls.SlackUser?S.C.Reference:e.type,[]),p=(0,n.useCallback)(e=>{let r={fieldApiName:e.object_api_name||"",value:e.value,displayValue:e.value,htmlFormatted:e.html_formatted,richText:e.rich_text,dataType:u(e),displayDataType:e.type,referenceObjectApiName:e.object_api_name,slackUserId:e.type===b.ls.SlackUser?e.value:void 0,hidePlaceholder:!0};switch(e.type){case b.ls.Boolean:return n.createElement(I.t,{field:r,className:i()(q().checkbox,q().disabled),isReadOnly:!0});case b.ls.MultiPicklist:return n.createElement(P.w,{field:r});case b.ls.Picklist:return n.createElement(D.x,{field:r});case b.ls.SlackUser:case b.ls.ExternalLink:case b.ls.Reference:return n.createElement(_.A,{lines:1},n.createElement(F.L,{field:r,salesforceOrgId:t,tokenOnly:!a}));case b.ls.Url:return n.createElement(_.A,{lines:1},n.createElement(W.T,{field:r,isDisabled:!0}));case b.ls.TextArea:return n.createElement("div",{className:q().textDescription},n.createElement(_.A,{lines:2,breakWords:!1},n.createElement(B.U,{field:r,isUnfurl:!0})));case b.ls.String:return n.createElement("div",{className:q().textDescription},n.createElement(_.A,{lines:2,breakWords:!1},n.createElement(U.$,{field:r,isUnfurl:!0})));case b.ls.Phone:return n.createElement(_.A,{lines:1},n.createElement(O.S,{field:r}));case b.ls.Currency:return n.createElement(_.A,{lines:1},n.createElement(w.P,{field:r}));case b.ls.Email:return n.createElement(_.A,{lines:1},n.createElement(M.q,{field:r}));case b.ls.Double:case b.ls.Int:case b.ls.Percent:return n.createElement(_.A,{lines:1},n.createElement(L.D,{field:r}));case b.ls.Date:return n.createElement(_.A,{lines:1},n.createElement(N.i,{field:r}));case b.ls.DateTime:return n.createElement(_.A,{lines:1},n.createElement(T.R,{field:r}));case b.ls.Time:return n.createElement(_.A,{lines:1},n.createElement(H.Z,{field:r}));default:return n.createElement(_.A,{lines:1},e.value)}},[a,t,u]),renderField=(e,t)=>n.createElement("div",{"data-qa":"field-container",key:`${e.label}_${e.value}`,className:i()({[q().fieldContainer]:t,[q().fullWidth]:t})},n.createElement(R.c,{fieldApiName:e.object_api_name||"",dataType:u(e),label:e.label,layoutMode:V.l.vertical,size:V.q.medium,isReadOnly:!0}),n.createElement("div",{className:q().fieldValue},p(e)));return n.createElement("div",{"data-qa":"entity-content-container",className:i()(q().entityContentContainer,{[q().withSmallPaddingBottom]:a})},l.slice(0,s).map(e=>renderField(e,!1)),o.slice(0,d).map(e=>renderField(e,!0)),m&&l.slice(s,s+1).map(e=>renderField(e,!1)))});var z=a(0x24f6a06c8),K=a(0x70657567),$=a(0xe89390a),Y=a(0x6960d8b9),Q=a(0xeb1fd179),Z=a.n(Q);let J=new o.Ay("modernselling"),Expanded=({entityState:e,record:t,hideFooter:a,labelProps:r,canvasStyling:o,onRefresh:h,isRefreshing:_,canRefresh:b,refreshError:g,isRefreshUnfurlsEnabled:A})=>{let x=(0,y.d4)(f.FR),{isHovered:E}=(0,l.r)(),C=(0,n.useCallback)(e=>{e.stopPropagation(),h?.()},[h]),v=t.ts?(0,K.f)(t.ts):void 0,S=(t.updated_at?(0,$.L)(t.updated_at):void 0)??v,I=!_&&!g&&S,w=null,T=x&&"EmailMessage"===t.sobject_api_name;switch(e){case d.w.enabled:w=n.createElement("div",null,n.createElement("div",{className:Z().header},n.createElement(z.l,{type:t.sobject_api_name}),n.createElement(u.A,{primaryLabel:r.primaryLabel,secondaryLabel:E?r.hoveredSecondaryLabel:r.secondaryLabel,size:d.S.expanded,entityState:e})),n.createElement(m.A,{noPadding:!0,entityState:e,isFullHeight:o,isAutoHeight:!o},n.createElement(n.Fragment,null,T?n.createElement(k,{fields:t.fields}):n.createElement(j,{fields:t.fields,salesforceOrgId:t.org.id,canvasStyling:o}))),t.ts&&!a&&n.createElement("div",{className:i()(Z().footer)},!A&&J.rt("Details as of {date} at {time}",{date:(0,Y.Yq)(t.ts,"{date_short_pretty}",{shouldCapitalize:!1}),time:(0,Y.xe)(t.ts)}),A&&_&&n.createElement("div",{className:Z().timestampContainer},n.createElement(c.A,{size:"medium"}),n.createElement("span",{className:Z().timestampText},J.t("Refreshing\u2026"))),A&&g&&!_&&n.createElement("div",{className:Z().timestampContainer},n.createElement("span",{className:Z().timestampText},J.t("Failed to refresh"))),A&&I&&n.createElement("div",{className:Z().timestampWithRefresh},n.createElement("span",{className:Z().timestampText},S),E&&b&&n.createElement("span",{className:i()(Z().refreshButton,{[Z().show]:E,[Z().hide]:!E})},n.createElement(s.Nm,{onClick:C,className:`c-link--button ${Z().timestampText}`},J.t("Refresh"))))));break;case d.w.loading:w=n.createElement("div",null,n.createElement("div",{className:Z().header},n.createElement(p.A,{entityState:e}),n.createElement(u.A,{entityState:e,size:d.S.expanded})),n.createElement(m.A,{entityState:e,isFullWidth:!0}));break;case d.w.error:w=n.createElement("div",null,n.createElement("div",{className:Z().header},n.createElement(p.A,{entityState:e}),n.createElement(u.A,{primaryLabel:r.primaryLabel,entityState:d.w.error,size:d.S.expanded})),n.createElement(m.A,{entityState:e,isFullWidth:!0}))}return w};Expanded.displayName="Expanded"},0x35719ab7:(e,t,a)=>{"use strict";a.d(t,{s:()=>SalesforceRecordEntityActionsBar});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x118cdcdea),o=a.n(l),s=a(0xbe5e39b6),c=a(0x40c0d834),d=a(0x20482ad21),m=a(0x22b8621cf),u=a(0x11c86845f),p=a(0xa66de54e),h=a(0x927937a),_=a(0x22ee6a672),f=a(0x156eec78a),b=a(0x91728dda),g=a(0x139aa1a7),y=a(0x99233ecb),A=a(0x2501a2cee),x=a(0x11d55244f),E=a(0x70de3606),C=a(0x3711e82d),k=a(0x183e20f52),v=a(0x226892387);let S=new d.Ay("modernselling"),SalesforceEntityMoreActionsMenu=({menuProps:e,record:t,index:a,isOnSearchTab:i})=>{let l=(0,r.wA)(),o=(0,v.d4)(h.kC),s="ListView"===t.sobject_api_name,d=S.t("Copy link"),m=S.t("Open in Salesforce"),u=(0,x._)(t),p=(0,v.d4)(E.Ix),_=(0,n.useCallback)(()=>{window.open(t.external_url,"_blank"),i&&l((0,k.ME)({position:a,subtargetType:k.qq.openInSalesforce,recordId:t.id}))},[l,a,i,t.external_url,t.id]),f=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),i&&l((0,k.ME)({position:a,subtargetType:k.qq.copyLink,recordId:t.id})),u()},[l,u,a,i,t.id]),b=(0,n.useMemo)(()=>{let e=[{key:"copy-link-to-opportunity",onSelected:f,label:d,icon:n.createElement(A.Ah,{name:"link"}),autoClogProps:{onClick:{enableClogAction:!0},elementName:"copy_link",elementValue:t.id,isListViewUnfurl:s}}];return p&&(!p||o)||e.push({key:"open-in-salesforce",onSelected:_,label:m,icon:n.createElement(A.Ah,{name:"new-window"}),autoClogProps:{onClick:{enableClogAction:!0},elementName:"open_in_salesforce",elementValue:t.id,isListViewUnfurl:s}}),e.map(e=>n.createElement(y.Dr,{key:e.key,onSelected:e.onSelected,icon:e.icon,autoClogProps:e.autoClogProps},e.label))},[p,o,f,d,t.id,s,_,m]);return n.createElement(c.A,{eventId:C.EventId.RECORDS_SALESFORCE_RECORD_ACTION,uiComponentName:C.UiComponentName.RECORD_UNFURL},n.createElement(y.Ay,{...e,width:280},b))};SalesforceEntityMoreActionsMenu.displayName="SalesforceEntityMoreActionsMenu";var I=a(0x10027d8bc),w=a(0xa8dcaaaa),T=a(0xd843ab47),N=a(0x23255e234),M=a(0x1563c9b37),R=a(0x24558b75f),P=a(0x188544c76),L=a(0xe684f705),O=a(0x1d104c491),D=a(0x8ed8ca46),F=a(0x198f42c86),U=a(0x93a9f6f3),B=a(0x1ee439e69);let H=new d.Ay("modernselling"),SalesforceRecordEntityActionsBar=({record:e,handleMenuToggle:t,onNavigateToRecordChannel:a,navigateToRecordChannelLabel:l,navigateToRecordChannelIcon:d,index:y,isOnSearchTab:A,isListViewRecord:x})=>{let k=(0,v.d4)(b.mI),S=(0,v.d4)(E.Ix),W=(0,v.d4)(_.HN),V=(0,v.d4)(I.gT),G=(0,v.d4)(h.kC),q=(0,r.wA)(),j=(0,v.d4)(L.cA),z=(0,N.Ez)(j)||(0,N.Yd)(j),K=(0,v.d4)(B.H7),$=(0,v.d4)(t=>(0,D.D2)(t,e.org?.id||"")),Y=(0,v.d4)(t=>(0,p.r)(t,e)),Q=(0,w.y)({recordId:e?.id,index:y,isOnSearchTab:A,shouldDisplayToast:void 0,shareRecordModalType:Y,externalUrl:e?.external_url}),Z=(0,n.useCallback)(()=>{let t;if(W){let{salesforceOrgId:a,rawRecordId:n}=(0,P.D)(e.id),r=a&&n?(0,M._)({team:K,orgId:a,recordId:n}):null,i=e.sobject_api_name===O.Dj.Account?"account":"contact";t=r&&e.name?new(o())().insert(H.t("Research the ")).insert(e.name,{link:r}).insert(H.t(" {recordType} using the Salesforce Research Skill.",{recordType:i})):new(o())().insert(H.t("Research the {name} {recordType} using the Salesforce Research Skill.",{name:e.name,recordType:i}))}q((0,F.V)({entryPoint:e.sobject_api_name===O.Dj.Account?U.XM.DownmarketCrmUnfurlAccountRecord:U.XM.DownmarketCrmUnfurlContactRecord,canOpenNewView:!0,delta:t,recordId:e.id}))},[q,e.id,e.name,e.sobject_api_name,W,K]),{isMainWindow:J}=(0,n.useContext)(T.A),X=(0,v.d4)(R.n3),ee=k&&x&&J&&X,et=(0,f.Q)(),ea=(0,n.useCallback)(()=>{et({id:e.id,viewType:g.D.SalesBulkGrid})},[e.id,et]),en=(0,n.useCallback)(t=>n.createElement(SalesforceEntityMoreActionsMenu,{menuProps:t,record:e,index:y,isOnSearchTab:A}),[y,A,e]),er=(0,n.useMemo)(()=>{let r=[],o=W?H.t("Research {recordType} with Slackbot",{recordType:e.sobject_api_name?.toLowerCase()}):`Research ${e.sobject_api_name?.toLowerCase()} with Slackbot`,c={onClick:Z,"aria-label":o,svgIconProps:{name:"slackbot-color",size:"20"},tooltipLabel:o,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"salesforce_record_summarize_with_ai",elementValue:e.id}},u="ListView"===e.sobject_api_name,p=e.list_view?.sobject_api_name,h=e.sobject_api_name,_=u&&(p===O.Dj.Account||p===O.Dj.Contact),f=!u&&(h===O.Dj.Account||h===O.Dj.Contact);if(S&&_&&!z&&$){let t=H.t("Share");r.push({onClick:Q,"aria-label":t,svgIconProps:{name:"share-message",size:"16"},tooltipLabel:t,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"share_record",elementValue:e.id}})}else if(S&&!u&&!z&&$){let n=H.t("Share item");if(r.push({onClick:Q,"aria-label":n,svgIconProps:{name:"share-message",size:"16"},tooltipLabel:n,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"share_record",elementValue:e.id}}),W&&V&&f&&r.push(c),a&&l&&d&&r.push({onClick:a,"aria-label":l,svgIconProps:d,tooltipLabel:l,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"navigate_to_channel",elementValue:e.id}}),ee){let t=H.t("Open in new window");r.push({onClick:ea,"aria-label":t,svgIconProps:{name:"open-in-window",size:"16"},tooltipLabel:t,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"open_in_window",elementValue:e.id}})}G&&r.push({onClick:i.A,"aria-label":H.t("More list actions"),svgIconProps:{name:"ellipsis-vertical-filled",size:"16"},tooltipLabel:H.t("More actions"),tooltipPosition:s.yX.TopRight,renderMenu:en,isMenuTrigger:!0,onPopoverOpen:t,onPopoverClose:t})}else{if(!z&&!x&&$){let t=H.t("Share item");r.push({onClick:Q,"aria-label":t,svgIconProps:{name:"share-message",size:"16"},tooltipLabel:t,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"share_record",elementValue:e.id}})}if(a&&l&&d&&r.push({onClick:a,"aria-label":l,svgIconProps:d,tooltipLabel:l,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"navigate_to_channel",elementValue:e.id}}),ee){let t=H.t("Open in new window");r.push({onClick:ea,"aria-label":t,svgIconProps:{name:"open-in-window",size:"16"},tooltipLabel:t,tooltipPosition:s.yX.Top,autoClogProps:{onClick:{enableClogAction:!0},elementName:"open_in_window",elementValue:e.id}})}r.push({onClick:i.A,"aria-label":H.t("More list actions"),svgIconProps:{name:"ellipsis-vertical-filled",size:"16"},tooltipLabel:H.t("More actions"),tooltipPosition:s.yX.TopRight,renderMenu:en,isMenuTrigger:!0,onPopoverOpen:t,onPopoverClose:t})}return r.map(e=>n.createElement(m.A,{key:e["aria-label"],...e}))},[e.sobject_api_name,e.list_view?.sobject_api_name,e.id,S,W,z,$,Q,Z,a,l,d,ee,ea,x,en,t,V,G]);return n.createElement(c.A,{eventId:C.EventId.RECORDS_SALESFORCE_RECORD_ACTION,uiComponentName:C.UiComponentName.RECORD_UNFURL},n.createElement(u.A,null,er))};SalesforceRecordEntityActionsBar.displayName="SalesforceRecordEntityActionsBar"},0x249d29fa:(e,t,a)=>{"use strict";a.d(t,{X:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x32d3ef3d),l=a(0xfa28400d),o=a(0x21700b903),s=a(0x15c77e8f0),c=a(0x35719ab7);let d=new r.Ay("salesforce_record"),m={onClick:{enableClogAction:!0}},u=n.memo(({entityState:e,size:t,record:a,onClick:r,labelProps:u,isInteractive:p,showActionsBar:h,canvasStyling:_=!1,onNavigateToRecordChannel:f,navigateToRecordChannelLabel:b,navigateToRecordChannelIcon:g,shouldShrinkUnderDefaultWidth:y=!1,customWidth:A,customMaxWidth:x,isFullWidth:E,isListViewRecord:C,isDraft:k,onRefresh:v,isRefreshing:S,canRefresh:I,refreshError:w,isRefreshUnfurlsEnabled:T,isRemovable:N=!1,onRemove:M,removeButtonTip:R})=>{let[P,L]=(0,n.useState)(!1),O=(0,n.useCallback)(()=>{L(e=>!e)},[]);return n.createElement(l.Ay,{size:t,entityState:e,customMaxWidth:_?void 0:x,customWidth:_?void 0:A,isFullWidth:E||_,isFullHeight:_,isAutoHeight:!_,withBorder:!_,shouldShrinkUnderDefaultWidth:y,isRemovable:N,onRemove:M,removeButtonTip:R,onClick:r,isInteractive:p,isActionsBarMenuOpen:P,autoClogProps:m,groupAriaLabel:u.ariaLabel,ariaLabel:d.t("Open record",{fallbackHash:"114ef0270694aa3931de0c84c7dee79cca682f45",fallbackHashNs:"message"}),actionsBar:!_&&h&&a&&e===i.w.enabled?n.createElement(c.s,{record:a,handleMenuToggle:O,onNavigateToRecordChannel:f,navigateToRecordChannelLabel:b,navigateToRecordChannelIcon:g,isListViewRecord:C}):null},t===i.S.compact&&n.createElement(o.a,{entityState:e,record:a,labelProps:u,isDraft:k}),t===i.S.expanded&&n.createElement(s.q,{entityState:e,record:a,labelProps:u,canvasStyling:_,onRefresh:v,isRefreshing:S,canRefresh:I,refreshError:w,isRefreshUnfurlsEnabled:T}))})},0x194722c:(e,t,a)=>{"use strict";a.d(t,{V:()=>TemplateEntityExpanded});var n=a(0xbad225b5),r=a(0x2860f485),i=a(0x22b81c433),l=a(0x120c268ad),o=a.n(l),s=a(0x32d3ef3d),c=a(0x4df01f17),d=a(0xb59b1927),m=a(0x2501a2cee),u=a(0x1d08e7031),p=a(0x20cbb047a),h=a.n(p);let TemplatePreview=({children:e,backgroundImage:t,previewContent:a,backgroundLoadingHeight:r=195,isAutoHeight:i=!0,customPreviewHeight:l,noPreviewMargin:p=!1,backgroundImageShouldCover:_,backgroundImgPosition:f,...b})=>{let{entityState:g,isFullHeight:y}=b,A=null,x=(0,n.useCallback)(()=>n.createElement("div",{style:{height:r}}),[r]);switch(g){case s.w.enabled:A=n.createElement(n.Fragment,null,t&&n.createElement(u.A,{className:o()(h().templateImage,{[h().templateImageCover]:_,[h().templateImageTop]:"top"===f,[h().templateImageBottom]:"bottom"===f}),renderPending:x,src:t,alt:"",width:"100%",height:i?"auto":"100%"}),a&&n.createElement("div",{className:o()(h().previewContent,{[h().noPreviewMargin]:p})},a),e);break;case s.w.loading:A=n.createElement(c.A,{height:r,width:"100%"});break;case s.w.error:A=n.createElement(c.A,{height:r,width:"100%"},n.createElement(m.Ah,{name:"warning",size:"20"}))}let E=g===s.w.enabled;return n.createElement("div",{className:h().templatePreview},n.createElement(d.A,{noTopBorder:!0,addBottomBorder:!0,noPadding:!0,...b,isFullWidth:!0,isFullHeight:y||i,customHeight:E?l:r},A))};TemplatePreview.displayName="TemplatePreview";let TemplateEntityExpanded=({autoClogProps:e,backgroundImage:t,previewContent:a,size:l,entityState:o,primaryLabel:s,secondaryLabel:c,additionalMetadata:d=null,withBorder:m=!0,shouldShrinkUnderDefaultWidth:u,truncateLabels:p,isFullWidth:h,isAutoHeight:_,isFullHeight:f,backgroundLoadingHeight:b,isRemovable:g,onClick:y,customMinWidth:A,customPreviewHeight:x,noPreviewMargin:E,customMaxWidth:C,isInteractive:k,actionsBar:v,forceShowActionsBar:S,groupAriaLabel:I,backgroundImageShouldCover:w,backgroundImgPosition:T,previewIconUrl:N})=>n.createElement(r.A,{autoClogProps:e,size:l,actionsBar:v,entityState:o,isRemovable:g,isAutoHeight:_||!!x,isFullWidth:h,isFullHeight:f,withBorder:m,shouldShrinkUnderDefaultWidth:u,onClick:y,customMinWidth:A,customMaxWidth:C,isInteractive:k,groupAriaLabel:I,forceShowActionsBar:S},n.createElement(TemplatePreview,{entityState:o,backgroundImage:t,previewContent:a,backgroundLoadingHeight:b,isFullHeight:f,isAutoHeight:_,customPreviewHeight:x,noPreviewMargin:E,backgroundImageShouldCover:w,backgroundImgPosition:T}),n.createElement(i.A,{size:l,entityState:o,primaryLabel:s,secondaryLabel:c,additionalMetadata:d,truncateLabels:p,previewIconUrl:N}));TemplateEntityExpanded.displayName="TemplateEntityExpanded"},0x2860f485:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0xfa28400d);let TemplateContainer=({children:e,...t})=>n.createElement(r.Ay,t,e);TemplateContainer.displayName="TemplateContainer";let i=TemplateContainer},0x22b81c433:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x32d3ef3d),o=a(0x9798b7f),s=a(0x7729d35b),c=a(0x1a3980079),d=a.n(c);let TemplateMetadata=({primaryLabel:e,secondaryLabel:t,entityState:a,size:r,additionalMetadata:c=null,truncateLabels:m=!0,previewIconUrl:u})=>{let p=r===l.S.expanded?{primaryTruncateLines:+!!m,secondaryTruncateLines:2*!!m}:{primaryTruncateLines:+!!m,secondaryTruncateLines:+!!m};return n.createElement("div",{className:i()(d().metadataContainer,{[d().expanded]:r===l.S.expanded,[d().compact]:r===l.S.compact,[d().withThumbnail]:!!u})},u&&n.createElement(s.A,{entityState:a,suppressDefaultColors:!0},n.createElement("img",{src:u,alt:"",className:d().thumbnailImg})),n.createElement(o.A,{primaryLabel:e,secondaryLabel:t,size:r,entityState:a,...p}),a===l.w.enabled&&c)};TemplateMetadata.displayName="TemplateMetadata";let m=TemplateMetadata},0xf51a7b0e:(e,t,a)=>{"use strict";a.d(t,{C:()=>r});var n,r=((n={}).row="row",n.column="column",n)},0x19709d5e1:(e,t,a)=>{"use strict";a.d(t,{H:()=>N});var n,r=a(0xbad225b5),i=a(0x4665ef24),l=a.n(i),o=a(0x120c268ad),s=a.n(o),c=a(0x1f022ebd9),d=a(0x1407c6c2c),m=a(0xf3c40abe),u=a(0x102edf836),p=a(0x1faa3f1ac),h=a(0x2501a2cee),_=a(0xf51a7b0e),f=a(0x20482ad21),b=a(0x344bb842),g=a(0x1407d15fa),y=a.n(g);let A=new f.Ay("hero_banner"),x={name:"close"},HeroBannerContainer=({showBanner:e,canBeClosed:t,children:a,onCloseBanner:n,variation:i=_.C.row,closeButtonSize:l="medium",closeButtonAriaLabel:o})=>{let c=(0,r.useCallback)(()=>n(),[n]);return e?r.createElement("div",{"data-qa":"hero-banner-container",className:s()(y().heroBannerContainer,{[y().heroBannerContainerColumn]:i===_.C.column})},a,t?r.createElement(b.A,{"aria-label":o||A.t("close"),className:y().heroBannerCloseButton,onClick:c,svgIconProps:x,size:l}):null):null};HeroBannerContainer.displayName="HeroBannerContainer";var E=a(0x2e37ba27),C=a(0x7fbb7bb1),k=a(0x243d57606),v=a(0x1ccef1c6f),S=a(0x226892387),I=a(0x144455081),w=a.n(I),T=((n=T||{}).Horchata="horchata",n.Lagoon="lagoon",n.Mojito="mojito",n.Gray="gray",n.Campfire="campfire",n.Sunflower="sunflower",n.Rose="rose",n.Theme="theme",n);let HeroBanner=({wrapperClassName:e,title:t,content:a,showBanner:n,videoUrl:i,videoVtt:o,videoPoster:m,videoTitle:f,enableVideoControls:b=!0,autoplay:g=!1,videoContainerClassName:y,primaryImgSrc:A,primaryImgClassName:x,primaryImgMinHeight:I,primaryImgAnimation:T,primaryImgPosition:N,primaryImgAltText:M="",miniPrimaryImgSrc:R,primaryCTAButtonType:P="outline",primaryCTAButtonIconName:L,primaryCTAButtonText:O,primaryCTAButtonHref:D,primaryCTAOnClick:F,primaryCTAAutoClogProps:U,secondaryCTALinkHref:B,secondaryCTALinkText:H,secondaryCTAButtonIconName:W,secondaryCTAButtonText:V,secondaryCTAProBadge:G=!1,secondaryCTAOnClick:q,secondaryCTAAutoClogProps:j,onCloseBanner:z,onRestoreFocus:K,focusOnMount:$=!0,canBeClosed:Y=!0,hasKeyboardFocus:Q,backgroundColor:Z="horchata",isBackgroundGradient:J=!1,variation:X=_.C.row,containerRadius:ee,closeButtonSize:et,closeButtonAriaLabel:ea})=>{let en=(0,r.useRef)(null),er=(0,S.d4)(e=>(0,v.ty)(e,"a11y_animations")),ei=(0,r.useCallback)(()=>{K&&K(),z()},[z,K]),el=(0,r.useCallback)(()=>F&&F(),[F]),eo=(0,r.useCallback)(e=>q&&q(e),[q]),es=(0,r.useMemo)(()=>J?{[w().heroBannerBackgroundHorchataGradient]:"horchata"===Z,[w().heroBannerBackgroundLagoonGradient]:"lagoon"===Z,[w().heroBannerBackgroundMojitoGradient]:"mojito"===Z,[w().heroBannerBackgroundGrayGradient]:"gray"===Z,[w().heroBannerBackgroundCampfireGradient]:"campfire"===Z,[w().heroBannerBackgroundSunflowerGradient]:"sunflower"===Z,[w().heroBannerBackgroundRoseGradient]:"rose"===Z,[w().heroBannerBackgroundThemeGradient]:"theme"===Z}:{[w().heroBannerBackgroundHorchata]:"horchata"===Z,[w().heroBannerBackgroundLagoon]:"lagoon"===Z,[w().heroBannerBackgroundMojito]:"mojito"===Z,[w().heroBannerBackgroundGray]:"gray"===Z,[w().heroBannerBackgroundCampfire]:"campfire"===Z,[w().heroBannerBackgroundSunflower]:"sunflower"===Z,[w().heroBannerBackgroundRose]:"rose"===Z,[w().heroBannerBackgroundTheme]:"theme"===Z},[Z,J]),ec=(0,d.A)(),ed=(0,d.A)(),em=D?u.z9:u.Ay,eu=X===_.C.column;(0,c.A)(()=>{Q&&$&&en.current&&en.current.focus()},[$,en]);let ep=T&&er&&!i;return n?r.createElement(C.A,null,({measureRef:c,width:d})=>r.createElement("div",{ref:c,className:s()(w().heroBannerWrapper,e,es,{[w().heroBannerWrapperRoundBorders]:ee})},r.createElement("div",{ref:en,role:"dialog","aria-labelledby":ec,"aria-describedby":ed,tabIndex:-1,className:w().heroBannerFocusWrapper},r.createElement(HeroBannerContainer,{showBanner:n,canBeClosed:Y,onCloseBanner:ei,variation:X,closeButtonSize:et,closeButtonAriaLabel:ea},r.createElement("div",{className:s()(w().heroBannerLeft,{[w().heroBannerLeftAddPaddingLeft]:d<=1124&&!eu,[w().heroBannerLeftAddPaddingRight]:d<=+l().md&&!eu,[w().heroBannerLeftFullWidth]:d<+l().md&&!eu||d<775&&eu,[w().heroBannerLeftColumn]:eu})},r.createElement("div",{className:w().heroBannerTitleContainer},R&&d<=+l().md&&r.createElement("img",{src:R,alt:"","aria-hidden":!0,className:w().heroBannerPrimaryImgMini}),r.createElement("h2",{id:ec,className:s()(w().heroBannerTitle,{[w().heroBannerTitleColumn]:eu})},t)),a&&r.createElement("p",{id:ed,className:s()(w().heroBannerContent,{[w().heroBannerContentColumn]:eu})},a),r.createElement("div",{className:w().heroBannerCTAWrapper},O&&r.createElement(em,{type:P,onClick:el,...D?{href:D}:{},autoClogProps:U}," ",L&&r.createElement("span",{className:w().heroBannerButtonIcon},r.createElement(h.Ah,{name:L})),O),H&&r.createElement(p.A,{href:B,onClick:eo,autoClogProps:j},H),V&&r.createElement(u.Ay,{type:"outline",onClick:eo,autoClogProps:j},W&&r.createElement("span",{className:w().heroBannerButtonIcon},r.createElement(h.Ah,{name:W})),V," ",G&&r.createElement(k.a,{featurePlan:"std",className:"margin_left_50"})))),(d>+l().md||eu)&&r.createElement("div",{className:s()(w().heroBannerRight,{[w().heroBannerLeftAddPaddingRight]:d<=1124&&!eu}),style:N&&!eu?{position:"relative"}:{}},A&&!ep&&!i&&r.createElement("img",{src:A,alt:M,"aria-hidden":!0,className:s()(w().heroBannerPrimaryImg,x,{[w().heroBannerPrimaryImgFullHeight]:N&&!eu}),style:void 0===N||eu?{minHeight:I}:{position:"absolute",...N},"data-qa":"hero-banner-primary-img"}),ep?T:null,i&&r.createElement(E.A,{"data-qa":"hero-banner-video-player",src:i,vtt:o,videoPoster:m,title:f,autoPlay:g,enableControls:b,className:w().heroBannerPrimaryVideo,videoContainerClassName:y})))))):null};HeroBanner.displayName="HeroBanner";let N=(0,m.A)(HeroBanner)},0xcaee4748:(e,t,a)=>{"use strict";a.d(t,{A:()=>P});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x1faa3f1ac),c=a(0x4c96e5d9),d=a(0x1e59f8138),m=a(0xc34fd270),u=a(0x238ee6f5d),p=a(0x2df5c552),h=a(0xb2231927),_=a(0x1a02c72b5),f=a(0xd6a16321),b=a(0x1b9d5cc0c),g=a(0x4cdbb756),y=a(0x82980ab8),A=a(0x1c9a3c4c1),x=a(0x4b8e0952),E=a(0x6d72337),C=a(0x209e067d1),k=a(0x4f725d55),v=a(0x226892387),S=a(0x5dd1c0f2),I=a(0x19c76d181),w=a(0x1fb2d2a87),T=a(0x14149c126),N=a(0xb129c1d5),M=a(0xe684f705);let R=new o.Ay("members"),MemberSlug=({id:e,fallback:t,variableLabel:a,noHighlights:i,noLinking:o,onClick:P,showTooltip:L,clogLinkClick:O,clogCitationImpression:D,className:F,tabIndex:U=0,ariaHidden:B,supressLinkColors:H,supressMentionAtSymbol:W,forceRealNames:V,alwaysDisplayAsLink:G,fromLlm:q,isMemberOfContextChannel:j,contextChannelId:z})=>{let K=(0,r.wA)(),$=(0,v.d4)(w.to),Y=(0,v.d4)(I.WR),Q=(0,v.d4)(t=>(0,M.nv)(t,e)),Z=e===Y,J="on"===(0,v.d4)(e=>(0,T._Z)(e,"slackbot_ai_missing_slug")),X=V?(0,y.wg)(Q):(0,y.Gt)(Q),ee=(0,x.tJ)(Q),et=(0,x.ow)(Q),ea=o,en=(0,v.d4)(e=>(0,g.A)(e,Q)),er=(0,A.D)(Q),ei=(0,b.PV)(Q),el=(0,v.d4)(e=>(0,S.rQ)(e,ei)),eo=en&&!(er||el);!et||(0,k.A)(e)||a?a&&(X=a,ee=!1,et=!1,ea=!1):(X=e,ee=!1,et=!1,ea=!0);let es=(0,v.d4)(e=>(0,N.a)(e,Q.id)),ec=(0,n.useCallback)(t=>{t.preventDefault(),O?.({link_type:"user"}),(0,c.Ws)(),eo?K((0,_.o)((0,f.tp)({serviceId:en,memberId:Q.id}))):K((0,h.n)({e:t,navProps:(0,f.Fo)({memberId:e})})),P&&P(t,e)},[O,en,P,K,e,Q,eo]),ed=(0,n.useCallback)(()=>{D?.({link_type:"user",item_id:e})},[D,e]),em=`${W?"":"@"}${X||t}`,eu=l()("c-member_slug",F,`c-member_slug--${$}`,{"c-member_slug--link":G||!ea,"c-member_slug--mention":Z&&!i,"c-member_slug--grey":H}),ep=(0,n.useMemo)(()=>n.createElement(m.Ay,{id:e,invert:!0,showAvatar:!0,showPresence:!0,forceRealName:!0}),[e]),eh=(0,n.useMemo)(()=>(0,C.A)()?{"data-stringify-type":"mention","data-stringify-id":e,"data-stringify-label":em}:{"data-stringify-text":`@${e}`},[e,em]),e_=n.useMemo(()=>n.createElement(s.A,{className:eu,href:`/team/${e}`,"data-member-id":e,"data-member-label":em,...eh,onClick:ec,tabIndex:U,"aria-hidden":B},em),[eu,em,e,eh,ec,U,B]);return e?q&&J?n.createElement(p.A,{type:"user",showTooltip:L,experimentSlackbotAiMissingSlugGroupOn:!0}):ee?n.createElement(u.A,{type:"unknown","data-qa":"member-slug-unknown"}):et?n.createElement(u.A,{type:"non-existent","data-qa":"member-slug-non-existent"}):es?L?n.createElement(c.Ay,{tip:R.t("You\u2019ve hidden this person"),tipClassName:"c-member_slug__tooltip c-member_slug__tooltip--member"},n.createElement("span",null,n.createElement(d.A,null))):n.createElement(d.A,null):ea?n.createElement("span",{className:eu},em):L?P?n.createElement(c.Ay,{tip:ep,tipClassName:"c-member_slug__tooltip c-member_slug__tooltip--member"},n.createElement("span",{dir:"ltr"},e_)):(0,E.yN)({memberId:e,serviceId:en||void 0,children:e_,noStyling:!0,onOpen:ed,isMemberOfContextChannel:j,contextChannelId:z}):e_:null};MemberSlug.displayName="MemberSlug";let P=n.memo(MemberSlug)},0x112707d90:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x237e1464c).A},0x237e1464c:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x4c96e5d9),s=a(0x21cf37dc6);let c=new l.Ay("app_token"),{Unknown:d,Nonexistent:m}=s.A,MissingApp=({type:e=d,subtler:t=!1,invert:a=!1})=>{let r=i()("c-missing_app",{"c-missing_app--unknown":e===d,"c-missing_app--non_existent":e===m,"c-missing_app--subtler":t,"c-missing_app--unknown_inverted":e===d&&a,"c-missing_app--non_existent_inverted":e===m&&a});return e===d?n.createElement(o.Ay,{tip:c.t("Loading\u2026")},n.createElement("span",{className:r})):e===m?n.createElement(o.Ay,{tip:c.t("Private app info")},n.createElement("span",{className:r})):null};MissingApp.displayName="MissingApp";let u=n.memo(MissingApp)},0x252e80b0:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x1f9582e28).A},0x1f9582e28:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x2501a2cee),s=a(0x4c96e5d9),c=a(0x21cf37dc6),d=a(0x339b339c);let m=new l.Ay("channel_token"),MissingChannel=({type:e=c.A.Unknown,subtler:t=!1,size:a=c.o.Small,width:r="random",invert:l=!1,showHash:u=!0,showTooltip:p=!0,omitNonExistentTooltip:h=!1,applyShimmer:_=!1})=>{let f,b=i()("c-missing_channel",{"c-missing_channel--unknown":e===c.A.Unknown,"c-missing_channel--nonexistent":e===c.A.Nonexistent,"c-missing_channel--subtler":t,"c-missing_channel--medium":a===c.o.Medium,"c-missing_channel--unknown_inverted":e===c.A.Unknown&&l,"c-missing_channel--non_existent_inverted":e===c.A.Nonexistent&&l}),g=i()("c-missing_channel--medium_hash",{"c-missing_channel--subtler":t});if(p&&(e===c.A.Unknown?f=m.t("Loading\u2026"):e===c.A.Nonexistent&&(f=m.t("You don\u2019t have access to this channel (ex. it\u2019s private or in a workspace you\u2019re not a part of), so its name isn\u2019t shown"))),e===c.A.Nonexistent){let e=n.createElement("span",{className:"c-missing_channel--private"},n.createElement(o.Ah,{inline:!0,name:"lock"}),m.t("private channel"));return h?e:n.createElement(s.Ay,{tip:f},e)}return a===c.o.Medium?n.createElement("div",null,n.createElement("div",{className:"c-missing_channel--medium-top"},u&&n.createElement("span",{className:g},n.createElement(o.Ah,{inline:!0,name:"channel"})),n.createElement(d.A,{tooltip:f,isNonExistent:!1,size:r,className:b,applyShimmer:_})),n.createElement(d.A,{tooltip:f,isNonExistent:!1,size:r,className:b,applyShimmer:_})):n.createElement(d.A,{tooltip:f,isNonExistent:!1,size:r,className:b,applyShimmer:_})};MissingChannel.displayName="MissingChannel";let u=n.memo(MissingChannel)},0x1d3efd4ea:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x17afadb2a).A},0x17afadb2a:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x21cf37dc6);let MissingIcon=({className:e,isNonExistent:t=!1,size:a,subtler:r=!1,invert:o=!1,dataQa:s})=>{let{Unknown:c,Nonexistent:d}=l.A,m=t?d:c,u=(0,n.useMemo)(()=>({height:a,width:a}),[a]);return n.createElement("span",{className:i()(e,"c-missing_icon",`c-missing_icon--${m}`,{"c-missing_icon--unknown_inverted":m===c&&o,"c-missing_icon--non_existent_inverted":m===d&&o,"c-missing_icon--subtler":r}),style:u,"data-qa":s})};MissingIcon.displayName="MissingIcon";let o=MissingIcon},0x238ee6f5d:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0xdc1367a8).A},0xdc1367a8:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x21cf37dc6),l=a(0x339b339c),o=a(0xbda07447);let s=new r.Ay("member_token"),{Unknown:c,Nonexistent:d}=i.A,MissingMember=({type:e=c,subtler:t=!1,className:a,"data-qa":r})=>{let i=e===c?s.t("Loading\u2026"):s.t("Private user info");return n.createElement(n.Fragment,null,n.createElement(o.h,null),n.createElement(l.A,{className:a??"",isNonExistent:e===d,subtler:t,tooltip:i,dataQa:r}))};MissingMember.displayName="MissingMember";let m=n.memo(MissingMember)},0x2df5c552:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2501a2cee),l=a(0x4c96e5d9),o=a(0x24192361b),s=a.n(o);let c=new r.Ay("missing_slug"),MissingSlug=({type:e,showTooltip:t=!0,experimentSlackbotAiMissingSlugGroupOn:a=!1})=>{let r,o=a?c.t("This content was removed because it was inaccurate info generated by AI, known as a hallucination. Take extra care to verify info in this message."):"This content was removed because it was inaccurate info generated by AI, known as a hallucination. Take extra care to verify info in this message.";switch(e){case"user":r=a?c.t("user not found"):"user not found";break;case"channel":r=a?c.t("channel not found"):"channel not found";break;default:r=a?c.t("link not found"):"link not found"}let d=n.createElement("span",{className:s().missingSlug},n.createElement(i.Ah,{inline:!0,name:"warning"}),r);return t?n.createElement(l.Ay,{tip:o},d):d};MissingSlug.displayName="MissingSlug";let d=n.memo(MissingSlug)},0x1680d129b:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x21cf37dc6),l=a(0x339b339c),o=a(0xe69dbb22),s=a(0x226892387);let c=new r.Ay("user_group_token"),{Unknown:d,Nonexistent:m}=i.A,{Small:u,Medium:p}=i.o,MissingUserGroup=({invert:e=!1,size:t=u,type:a=d,subtler:r=!1})=>{let i=(0,s.d4)(o.PG)?c.t("Unavailable user group info"):c.t("Private user group info"),h=a===d?c.t("Loading\u2026",{fallbackHash:"b04ba49f848624bb97ab094a2631d2ad74913498"}):i;return t===p?n.createElement("div",{className:"p-browse_page_user_group_entity--missing"},n.createElement("div",null,n.createElement(l.A,{tooltip:h,isNonExistent:a===m,size:"small",invert:e})," ",n.createElement(l.A,{tooltip:h,isNonExistent:a===m,size:"small",invert:e})),n.createElement("div",null,n.createElement(l.A,{tooltip:h,isNonExistent:a===m,size:"small",invert:e}),"\xa0\xa0\xb7\xa0\xa0",n.createElement(l.A,{tooltip:h,isNonExistent:a===m,size:"large",invert:e}))):n.createElement(l.A,{tooltip:h,isNonExistent:a===m,size:"random",subtler:r,invert:e})};MissingUserGroup.displayName="MissingUserGroup";let h=MissingUserGroup},0xf35bbf32:(e,t,a)=>{"use strict";a.d(t,{i:()=>c,m:()=>m});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11253e6a6),l=a(0x1ed767a16),o=a(0x1c91944c9);let s=new r.Ay("message");function BaseCopyCodeBlockContextMenuTrigger({children:e,blockType:t,...a}){let r,o=n.Children.only(e),c=n.cloneElement(o,{...a,ref:e=>{e&&(r=e)}}),d=(0,n.useCallback)(()=>[{label:"codeBlock"===t?s.t("Copy this code block"):s.t("Copy this code"),click:()=>r&&(0,l.x3)(r.innerText)}],[t,r]);return n.createElement(i.A,{getTemplate:d},c)}BaseCopyCodeBlockContextMenuTrigger.displayName="BaseCopyCodeBlockContextMenuTrigger";let c=(0,o.N)(null,()=>({}))(BaseCopyCodeBlockContextMenuTrigger),d=n.forwardRef(({children:e,...t},a)=>{let r=n.Children.only(e);return n.cloneElement(r,{...t,ref:a,onMouseDown:selectContentsOnTripleMouseDown})});function selectContentsOnTripleMouseDown(e){if(0!==e.button||e.detail<3)return;e.preventDefault();let t=window.getSelection(),a=document.createRange();t?.removeAllRanges(),a.selectNodeContents(e.currentTarget),t?.addRange(a)}let m=(0,o.N)(null,()=>({}),null,{forwardRef:!0})(d)},0x15611c98f:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1a65aae75),l=a(0xd35eec38),o=a(0x6960d8b9),s=a(0x1eae030b2);function DateCommand({ts:e,format:t,fallback:a,link:c,noLinking:d=!1,do24hrTime:m=!1,timezone:u}){let p=(0,r.wA)(),h=(0,o.Yq)(e,t,{fallbackString:a,do24hrTime:m,timezone:u}),_=(0,n.useCallback)(e=>{c&&h&&(0,i.A)(h,c)&&(p((0,s.A)({text:h,url:c})),e.preventDefault())},[p,h,c]);return h&&h!==t?!c||d?n.createElement("span",{"data-qa":"mrkdwn_date",className:"c-mrkdwn__date"},h):n.createElement(l.A,{"data-qa":"mrkdwn_date",href:c,maybeOpenSuspiciousLinkDialog:_},h):null}DateCommand.displayName="DateCommand";let c=n.memo(DateCommand)},0x1631a607b:(e,t,a)=>{"use strict";function isMrkdwnWhitespace({text:e,type:t}){return!(!e||e.trim())||"paragraph_break"===t||"line_break"===t||"space_hard"===t}a.d(t,{A:()=>isMrkdwnWhitespace})},0x1f13c844e:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xbc759429);let o=class extends n.PureComponent{static defaultProps={noHighlights:!1,noLinking:!1};render(){let{type:e,noHighlights:t,noLinking:a}=this.props,r=(0,l.Y)({type:e,tsfMode:"NORMAL"}),o=i()("c-mrkdwn__broadcast",{"c-mrkdwn__broadcast--link":!a,"c-mrkdwn__broadcast--mention":!t});return n.createElement("span",{className:o,"data-broadcast-id":`BK${e}`,"data-stringify-text":r},r)}};o.displayName="MrkdwnBroadcastCommand";let s=o},0x45ad3b82:(e,t,a)=>{"use strict";a.d(t,{A:()=>H});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x1faa3f1ac),c=a(0x2501a2cee),d=a(0x247cf31a2),m=a(0x252e80b0),u=a(0x2df5c552),p=a(0xadd564f8),h=a(0xb13c1a),_=a(0xb2231927),f=a(0x14dbdd890),b=a(0xf01a9d50),g=a(0x8b588d25),y=a(0xd6a16321),A=a(0x182c9b0b0),x=a(0x1ec69ee01),E=a(0x12185e091),C=a(0x209fb16e4),k=a(0x1ecc7f772),v=a(0xf6ed6f31),S=a(0x6d72337),I=a(0x3f9b1657),w=a(0xbecc4543),T=a(0xb2fd4d95),N=a(0x1c91944c9),M=a(0x217553e42),R=a(0x16d481b37),P=a(0x14149c126),L=a(0x1ee439e69);let O=new o.Ay("recordchannels"),D={channelName:void 0,className:void 0,fallbackName:void 0,showTooltip:!0,noLinking:!1,isPrivate:!1,isChannelImOrMpim:!1,isRecord:!1,recordChannelIconProps:null,isNonExistent:!1,isFromAnotherTeam:!1,team:null,isMember:!1,isUnknown:!1,clogLinkClick:l.A,mpimMemberNames:[],teamName:"",channelHasNonUniqueName:!1,noTabbableContent:!1,alwaysDisplayAsLink:!1,fromLlm:!1},F=class extends n.PureComponent{constructor(e){super(e),this.clogLinkClick=this.clogLinkClick.bind(this),this.handleHoverCardOpen=this.handleHoverCardOpen.bind(this),this.onClick=this.onClick.bind(this),this.getTooltipContent=this.getTooltipContent.bind(this),this.renderChannelHoverCard=this.renderChannelHoverCard.bind(this),this.renderChannelHoverCardTrigger=this.renderChannelHoverCardTrigger.bind(this)}static defaultProps=D;async onClick(e){let{id:t,tabId:a,experimentBkChannelTabsGroupOn:n}=this.props;e.preventDefault(),e.stopPropagation();let r=n&&a?(0,y.id)(t,{tabId:a}):(0,y.pr)(t);this.props.maybeOpenInSurfaceOrNavigate({e,navProps:r})}getTooltipContent(){let{id:e,isRecord:t,isChannelImOrMpim:a,mpimMemberNames:r,teamName:i,channelHasNonUniqueName:l,recordLabel:o}=this.props;return a?r.join(", "):t?n.createElement("div",{className:"c-mrkdwn__record_channel--tooltip"},O.t("{recordLabel} channel ",{recordLabel:o,recordType:o}),n.createElement(f.r,{channelId:e})):n.createElement(n.Fragment,null,n.createElement(d.A,{channelId:e}),l&&n.createElement("br",null),l&&n.createElement("span",{className:"c-member_slug__tooltip_subheader"},i))}clogLinkClick(){this.props.clogLinkClick?.({item_id:this.props.id,item_type:"C",link_type:"channel",is_member:this.props.isMember})}handleHoverCardOpen(){this.props.clogCitationImpression?.({link_type:"channel",item_id:this.props.id})}renderChannelHoverCard(){let{id:e}=this.props;return(0,S.Q$)({channelId:e,enableButtons:!0})}renderChannelHoverCardTrigger(e){return n.createElement(h.d,{renderCard:this.renderChannelHoverCard,onOpen:this.handleHoverCardOpen},e)}render(){let e,t,a,{channelName:r,className:l,fallbackName:o,showTooltip:d,id:h,isPrivate:_,isChannelImOrMpim:f,isRecord:b,recordChannelIconProps:g,isMember:y,isNonExistent:A,isUnknown:x,noLinking:E,isFromAnotherTeam:C,team:k,noTabbableContent:v,alwaysDisplayAsLink:S,fromLlm:N,experimentSlackbotAiMarkInvalidIdsGroupOn:M,experimentSlackbotAiMissingSlugGroupOn:R}=this.props;if(N){if(R)return n.createElement(u.A,{type:"channel",showTooltip:d,experimentSlackbotAiMissingSlugGroupOn:!0});if(M)return n.createElement(m.A,{showTooltip:!1,type:"unknown"})}if(x)return d?this.renderChannelHoverCardTrigger(n.createElement(m.A,{showTooltip:!1,type:"unknown"})):n.createElement(m.A,{showTooltip:d,type:"unknown"});if(A&&!o)return d?this.renderChannelHoverCardTrigger(n.createElement(m.A,{showTooltip:!1,type:"non-existent"})):n.createElement(m.A,{showTooltip:d,type:"non-existent"});let P=!_||y||b;if(!P)return d?this.renderChannelHoverCardTrigger(n.createElement(m.A,{showTooltip:!1,type:"non-existent"})):n.createElement(m.A,{showTooltip:d,type:"non-existent"});let L=(0,I.A)({channelName:r,fallbackName:o,isUnknown:x,isNonExistent:A,includePrefix:!_&&!f&&!g});e=!E&&!A&&P,_&&(t=(0,w.A)({channelName:r,isPrivate:_})),e&&C&&(e=!!k);let O=i()("c-mrkdwn__channel c-member_slug",{internal_channel_link:e,"c-member_slug--link":S||e},l);if(!e)return n.createElement("span",{className:O},_&&n.createElement(c.Ah,{name:"lock-filled",inline:!0}),L);g?a=n.createElement(c.Ah,{inline:!0,...g}):_&&(a=n.createElement(c.Ah,{name:"lock-filled",inline:!0}));let D=C&&k?(0,T.Kk)({team:k,channelId:h}):(0,T.iu)({channelId:h}),F=D?{href:D,clogLinkClick:this.clogLinkClick}:{},U=n.createElement(s.A,{className:O,"data-channel-name":L,"data-channel-id":h,"data-qa":"channel_link","data-stringify-type":"channel","aria-label":t,onClick:this.onClick,...F,...v&&{tabIndex:-1}},a,L);return d?n.createElement(p.A,{id:h},this.renderChannelHoverCardTrigger(U)):n.createElement(p.A,{id:h},U)}};function mapStateToProps(e,{id:t}){let a,n,r,i,l,o,s,c,d,m,u,p=null,h=(0,M.OL)(e,t),_=null,f=[],y="on"===(0,P._Z)(e,"bk_channel_tabs"),A="on"===(0,P._Z)(e,"slackbot_ai_mark_invalid_ids"),S="on"===(0,P._Z)(e,"slackbot_ai_missing_slug");return h?(a=(0,k.SB)(e,h,{publicChannelIncludeHashSign:!1,imIncludeAtSign:!1,truncateMpimNames:!0}),l=(0,E.t8)(h),n=(0,E.Zp)(h),i=(0,v.bl)(h),s=(0,E.JM)(h),c=(0,E.rI)(h),_=(0,b.sc)(h),r=(0,E.QR)(h),p=(o=(0,x.lo)(h))?(0,L._J)(e,(0,x.bK)(e,h)):null,f=(0,x.Zu)(e,t),m=(0,C.i)((0,M.MS)(e),h),u=(0,g.jT)(h),m&&(d=(0,R.a)(e,{channel:h}))):r=!0,{channelName:a,isPrivate:n,isChannelImOrMpim:s,isRecord:c,recordChannelIconProps:_,isNonExistent:r,isMember:i,isUnknown:l,isFromAnotherTeam:o,team:p,mpimMemberNames:f,channelHasNonUniqueName:m,teamName:d,recordLabel:u,experimentBkChannelTabsGroupOn:y,experimentSlackbotAiMarkInvalidIdsGroupOn:A,experimentSlackbotAiMissingSlugGroupOn:S}}F.displayName="BaseMrkdwnChannel";let U={maybeOpenInSurfaceOrNavigate:_.n},B=(0,N.N)(mapStateToProps,U),H=(0,A.A)(B(F))},0x1353250a6:(e,t,a)=>{"use strict";a.d(t,{A:()=>P});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x247cf31a2),l=a(0x1e07de0dd),o=a(0x6cc5eee0),s=a(0x1b6f39a31);function WorkObjectLinkTooltip({href:e,entity:t}){let a=(0,s.Kr)(t);if(a){let t=a.full(),r=a.compact(),i=a.expanded();if(t)return n.createElement(n.Fragment,null,n.createElement("div",{className:"sk_foreground_high_solid overflow_ellipsis"},n.createElement("b",{className:"bold sk_white_always"},t.title())),n.createElement("div",null,n.createElement("span",{className:"normal"},t.headerSubtitle()," | ",t.headerTitle())),n.createElement("div",{className:"sk_foreground_high_solid break_all"},e));if(r)return n.createElement(n.Fragment,null,n.createElement("div",{className:"sk_foreground_high_solid overflow_ellipsis"},n.createElement("b",{className:"bold sk_white_always"},r.title())),n.createElement("div",null,n.createElement("span",{className:"normal"},r.subtitle()," ")),n.createElement("div",{className:"sk_foreground_high_solid break_all"},e));if(i)return n.createElement(n.Fragment,null,n.createElement("div",{className:"sk_foreground_high_solid overflow_ellipsis"},n.createElement("b",{className:"bold sk_white_always"},i.title())),n.createElement("div",null,n.createElement("span",{className:"normal"},i.subtitle()," ")),n.createElement("div",{className:"sk_foreground_high_solid break_all"},e))}return n.createElement("div",{className:"sk_foreground_high_solid break_all"},e)}WorkObjectLinkTooltip.displayName="WorkObjectLinkTooltip";var c=a(0xcd092f8c),d=a(0x1a917cc3b),m=a(0x1b3ecb90f),u=a(0x17bc3dd75),p=a(0x15f4f83cf),h=a(0x12185e091),_=a(0x1ecc7f772),f=a(0x6f213e53),b=a(0xbd3de346),g=a(0x21d6ed371),y=a(0x1dde06271),A=a(0xa88049da),x=a(0x203beba52),E=a(0x1c24816a5),C=a(0xd0109e4f),k=a(0xa9a523c4),v=a(0x1337d9fa2),S=a(0x6e20c837),I=a(0x1c91944c9),w=a(0x217553e42),T=a(0x14ea3ce99),N=a(0xd93ecf94),M=a(0x1f5c53bc);let R=new r.Ay("linkify_emails");function MrkdwnLinkTooltip({href:e,isMsgPermalink:t=!1,msg:a,channelDisplayName:r,msgSenderName:s,permalinkChannelId:u,channel:_,isFilePermalink:A=!1,file:S,isWorkObject:I,entity:w}){let T,N=e.length>500?`${e.substr(0,500)}\u{2026}`:e;if(N=t?N:N?.toLowerCase(),I&&w)return n.createElement(WorkObjectLinkTooltip,{entity:w,href:e});if(A&&S){let t=S?.title,a=(0,b.Hx)(S);return n.createElement(n.Fragment,null,n.createElement("div",{className:"sk_foreground_high_solid overflow_ellipsis"},n.createElement("b",{className:"bold sk_white_always"},t)),n.createElement("div",null,n.createElement("span",{className:"normal"},a," | "),n.createElement("span",{className:"normal"},n.createElement(l.A,{file:S,displaySharedBy:!0,excludeTime:!0}))),n.createElement("div",{className:"sk_foreground_high_solid break_all"},e))}if(!t||(0,p.lv)(a)||(0,g.ow)(a)||(0,f.F)(_)||(0,x.A)(a?.subtype)||"tombstone"===(0,v.ys)(a)||(0,v.s7)(a)||(0,v.Dv)(a)||(0,v.TD)(a)||(0,E.o)(a)||!(0,g.iM)(a)&&!a?.text){if(e.startsWith("mailto:")){let t=e.split("mailto:")[1]?e.split("mailto:")[1]:e;return R.rt("Contact {emailAddress} in Slack",{emailAddress:t})}return n.createElement(n.Fragment,null,N)}if(a&&(0,C.A)(a,!0)&&(0,d.n)(a.blocks)&&!(0,k.A)(a))T=n.createElement(c.y,{richTextBlock:a?.blocks&&a.blocks[0],emojiSize:m.lw.SMALL,truncateLength:125});else{let e=a&&(0,y.A)(a);e&&(T=n.createElement(o.A,{text:e,noHighlights:!0,noHexColors:!0,noJumbomoji:!0,noLinking:!0,noCode:!0,noQuotes:!0,customLineEnding:"\u2026",maxNewlines:1,emojiSize:m.lw.SMALL,maxCharacters:125}))}let M=(0,h.LI)(_)||(0,h.yz)(_)?r:n.createElement(i.A,{className:"normal",channelId:u});return n.createElement(n.Fragment,null,n.createElement("div",{className:"sk_foreground_high_solid overflow_ellipsis"},n.createElement("b",{className:"bold sk_white_always"},s),n.createElement("span",{className:"normal"}," | ",M)),T&&n.createElement("div",{className:"normal"},T),n.createElement("div",{className:"sk_foreground_high_solid break_all"},e))}function mapStateToProps(e,{href:t}){let a=(0,S.$N)(e,t),n=!!(a&&"message"===a.type&&a.ts),r=n?a.channelId:void 0,i=!!(a&&a?.fileId),l=a?.fileId?(0,T.Lp)(e,a.fileId):void 0,o=n&&a.channelId&&a.ts&&(0,N.Ld)(e,a.channelId,a.ts),s=o&&(0,A.A)(e,o),c=!!(a&&a.type===S.im.WORK_OBJECT),d=c&&(0,M.Ne)(e,{recordId:a?.entityId,lookupFunction:a?.lookupFunction,entityUrl:a?.entityUrl??""})||void 0;return{isFilePermalink:i,file:l,isMsgPermalink:n,msg:o||void 0,permalinkChannelId:r||void 0,channel:r?(0,w.OL)(e,r)??void 0:void 0,channelDisplayName:n?(0,_.SB)(e,(0,w.OL)(e,r)):void 0,msgSenderName:s?(0,u.A)(e,{userId:s.userId,botId:s.botId,username:s.username,botProfile:o.bot_profile}):void 0,isWorkObject:c,entity:d}}MrkdwnLinkTooltip.displayName="MrkdwnLinkTooltip";let P=(0,I.N)(mapStateToProps)(MrkdwnLinkTooltip)},0x4abbd599:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>j});var n=a(0xbad225b5),r=a(0xa560007e),i=a(0x1cbdfeceb),l=a(0x155d02b1c),o=a(0x20b4dda68),s=a(0x15a3ad20c),c=a(0x185876941),d=a(0x20482ad21),m=a(0x1d5f57074),u=a(0x210cf696f),p=a(0x4c96e5d9),h=a(0x1b81e2549),_=a(0x2334f665b),f=a(0x124f71042),b=a(0x118e9b326),g=a(0x11ed04fa0),y=a(0xd35eec38),A=a(0x226892387);function DraggableMrkdwnLink(e){let{url:t,children:a,href:r,...i}=e,l=(0,n.useContext)(f.A),o=(0,A.d4)(g.TW)&&!!t,s="string"==typeof a?a:t,[,c,d]=(0,h.i)({type:b.M.MESSAGE_LINK,item:()=>({url:t,linkText:s,channelId:l.channelId,messageTs:l.ts,type:b.M.MESSAGE_LINK}),canDrag:()=>o});return((0,n.useEffect)(()=>{d((0,_.n)(),{captureDraggingState:!0})},[d]),o)?n.createElement("span",{ref:c,className:"c-mrkdwn__draggable-link"},n.createElement(y.A,{href:r,...i},a)):n.createElement(y.A,{href:r,...i},a)}DraggableMrkdwnLink.displayName="DraggableMrkdwnLink";var x=a(0x1353250a6),E=a(0x16cf1da63),C=a(0x120c268ad),k=a.n(C),v=a(0x1faa3f1ac),S=a(0x754ea859);let MrkdwnSalesforceRecord=({orgId:e,recordId:t,url:a,children:r,className:i,noLinking:l})=>{let o=(0,E.wA)(),s=(0,n.useCallback)(a=>{a.preventDefault(),a.stopPropagation();let n=`S:${e}:${t}`;o((0,S.c)({recordId:n}))},[o,e,t]);return l?n.createElement("span",{className:k()("c-mrkdwn__salesforce_record",i)},r):n.createElement(v.A,{className:k()("c-mrkdwn__salesforce_record c-member_slug--link",i),"data-salesforce-record-id":t,"data-salesforce-org-id":e,"data-qa":"salesforce-record-link",onClick:s,href:a},r)};MrkdwnSalesforceRecord.displayName="MrkdwnSalesforceRecord";var I=a(0x18460d15c),w=a(0x16218f27e),T=a(0x74791de4),N=a(0x1aad32b98),M=a(0x6e20c837),R=a(0x6d72337),P=a(0xc8023a66),L=a(0x1ec68d6a3),O=a(0x240abc170);function parseSlackSalesforcePermalink(e){let t=e.split("/salesforce/")[1];if(!t)return null;let a=t.split("/records/");if(2!==a.length)return null;let n=a[0],r=a[1];return n&&r?{orgId:n,recordId:r}:null}var D=a(0x1c91944c9),F=a(0x1ccef1c6f),U=a(0x20d52272),B=a(0x18476a827),H=a(0x14149c126),W=a(0xac9561bb),V=a(0xe684f705),G=a(0x6c4a6444);function getUrlType({url:e,origin:t,botId:a,urlIsSIWSLink:n,experimentWebIdentityLinksGroupTreatment:i,isFileQuipAndNotAccessible:l,isFileListAndNotAccessible:s,permalinkType:c}){return n&&i?"siws":l?"quip-inaccessible":s?"list-inaccessible":a?"bot":c===M.im.SALESFORCE_RECORD_FLEXPANE?c:(0,r.A)(e,"javascript:")?"javascript":(0,r.A)(e,`${t}/messages`)?"messages":(0,r.A)(e,`${o.SQ}chat.help`)?"old-slack-action":(0,r.A)(e,`${o.Rw}`)?"slack-action":"external"}let q=(0,c.A)();function getCitationItemId({permalinkType:e,permalinkFileId:t,permalinkTs:a,permalinkMemberId:n,permalinkRoomId:r,permalinkChannelId:i,permalinkArticleId:l,permalinkRecordId:o,permalinkEntityId:s}){switch(e){case M.im.FILE:case M.im.QUIP:case M.im.LIST:case M.im.CHANNEL_CANVAS:return t;case M.im.MESSAGE:return a;case M.im.MEMBER:return n;case M.im.ROOM:return r;case M.im.CHANNEL_SECTION:return i;case M.im.SLACKHELP:return l;case M.im.WORK_OBJECT:return o??s;default:return}}function BaseMrkdwnLink({botId:e,botName:t,children:a,origin:r=q,doSlackAction:o,doSlackActionLinks:s=!0,requestAccessModalThunk:c,noLinking:m=!1,url:h,maybeOpenSuspiciousLinkDialog:_=i.A,maybeOpenLlmLinkDialog:b=i.A,clogCitationImpression:g,clogLinkClick:A=i.A,urlIsSIWSLink:E=!1,explicitlyRenameBotLink:C=!1,showTooltip:k=!1,suppressLinkWarningPref:v=!1,experimentWebIdentityLinksGroupTreatment:S=!1,isShortcutLinkTrigger:I=!1,triggerId:N,isFileQuipAndNotAccessible:P=!1,isFromAppHome:L=!1,permalinkType:O=null,permalinkTs:D=null,permalinkFileId:F,permalinkMemberId:U,permalinkRoomId:B,permalinkChannelId:H,permalinkArticleId:V,permalinkRecordId:G,permalinkEntityId:j,isFileListAndNotAccessible:z=!1,noTabbableContent:K=!1,appId:$,experimentFeLinkTokenizationGroupOn:Y=!1,experimentChannelTabDragMessageAttachmentsGroupOn:Q=!1}){let Z,J=(0,n.useContext)(f.A),X=!!J.ts&&!!J.channelId,ee=(0,n.useCallback)(()=>{o(h)},[o,h]),et=(0,n.useCallback)(e=>{e.preventDefault(),c({url:h})},[c,h]),ea=(0,n.useCallback)(e=>{let t,a;O===M.im.FILE&&F&&(t={item_id:F,item_type:"F",link_action:"file_preview_link"}),O===M.im.WORK_OBJECT&&(a={appId:$}),A({...e,...t,...a,link_type:O||"external"})},[O,F,A,$]),en=(0,n.useCallback)(()=>{if(!g||m)return;let e=O??"external",t=getCitationItemId({permalinkType:O,permalinkTs:D,permalinkFileId:F,permalinkMemberId:U,permalinkRoomId:B,permalinkChannelId:H,permalinkArticleId:V,permalinkRecordId:G,permalinkEntityId:j})??void 0;g({link_type:e,item_id:t})},[g,m,O,F,D,U,B,H,V,G,j]),er=(0,n.useCallback)(()=>{let e=(0,l.A)(h);return n.createElement(x.A,{href:e})},[h]);if(m)return n.createElement("span",null,a);let ei=getUrlType({url:h,origin:r,botId:e,urlIsSIWSLink:E,experimentWebIdentityLinksGroupTreatment:S,isFileQuipAndNotAccessible:P,isFileListAndNotAccessible:z,permalinkType:O}),el=(0,l.A)(h),eo=null,es=!1,ec=!1,ed=a,em=!1;if("slack-action"===ei)ec=!0,s?eo=ee:(es=!0,Z="(Disabled) ");else if("old-slack-action"===ei)es=!0,Z="(Disabled) ";else if("quip-inaccessible"===ei||"list-inaccessible"===ei){let e=new d.Ay("request_access").t("Request access"),t=n.createElement(y.A,{className:"c-mrkdwn__quip_and_list_file_request_access_link","data-stringify-link":el,"data-qa":"file-request-access-link",href:el,onClick:et,onMouseEnter:en,isFromAppHome:L,tabIndex:K?-1:void 0},a);return k?n.createElement(p.Ay,{tip:e,position:"top",zIndex:"above_fs",tipClassName:"c-tooltip__tip--link","data-qa":"quip-file-request-access-tooltip"},t):t}else if("javascript"===ei)ec=!0,eo=i.A;else if("bot"===ei&&C)ec=!0,ed=t||a,em=!0;else if("siws"===ei){let renderBaseLink=(e,t)=>n.createElement(y.A,{autoClogProps:t,clogLinkClick:ea,className:"c-mrkdwn__identity_trigger",onClick:e,onMouseEnter:en,"data-stringify-link":el,href:el},ed),e=renderBaseLink;return k&&(e=(e,t)=>n.createElement(p.Ay,{tip:er,position:"top",zIndex:"above_fs",tipClassName:"c-tooltip__tip--link"},renderBaseLink(e,t))),n.createElement(w.A,{url:el},e)}else if(ei===M.im.SALESFORCE_RECORD_FLEXPANE){let e=parseSlackSalesforcePermalink(h),t=e?.orgId||"",r=e?.recordId||"";return n.createElement(MrkdwnSalesforceRecord,{orgId:t,recordId:r,url:h},a)}if(ec){let t=n.createElement(u.A,{onClick:eo&&!es?eo:i.A,onMouseEnter:en,disabled:es,renderAsSpan:!0},Z,ed);return em&&(t=n.createElement(T.A,{botId:e,onClick:!es&&eo?eo:void 0},t)),t}let eu=O===M.im.MESSAGE&&D&&Y,ep=Q&&X?DraggableMrkdwnLink:y.A,eh=n.createElement(ep,{"data-stringify-link":el,href:el,url:h,clogLinkClick:ea,onMouseEnter:eu?void 0:en,maybeOpenSuspiciousLinkDialog:v?i.A:_,maybeOpenLlmLinkDialog:b,isFromAppHome:L,tabIndex:K?-1:void 0},a);return I&&N?n.createElement(f.A.Consumer,null,({...e})=>{let t={triggerId:N,url:h},r=(0,W.P)(e),l=(0,W.S)(e,t);return(0,R.sh)({shortcutInfo:t,channelId:e.channelId,hermesLinkTriggerUIContext:r,autoClogEntryPoint:l?.entryPoint||"other",children:n.createElement(y.A,{"data-stringify-link":el,href:el,clogLinkClick:ea,onMouseEnter:en,autoClogProps:l,hermesLinkTriggerUIContext:r,maybeOpenSuspiciousLinkDialog:v?i.A:_,maybeOpenLlmLinkDialog:b},a)})}):k?eu?(0,R.OS)({permalink:el,dataQa:"mrkdwn-link-message-hover",children:eh,onOpen:en}):n.createElement(p.Ay,{tip:er,position:"top",zIndex:"above_fs",tipClassName:"c-tooltip__tip--link"},eh):eh}BaseMrkdwnLink.displayName="BaseMrkdwnLink";let j=(0,D.N)((e,{children:t,memberId:a,url:n})=>{let r,i="treatment"===(0,H._Z)(e,"web_identity_links"),l="on"===(0,H._Z)(e,"fe_link_tokenization"),o="on"===(0,H._Z)(e,"channel_tab_drag_message_attachments"),c=(0,s.A)(n),d=(0,m.Ay)(n),u=d?(0,M.XN)(e,d):null;if(c&&!(r=(0,B.vu)(e,c))&&a){let n=(0,V.nv)(e,a);(0,N.Ux)(e,n)&&(r=t),r||(0,L.Ay)({state:e}).warn(`MrkdwnLink: no bot name found for ${c}`)}let p=u?.type===M.im.SHORTCUT_LINK_TRIGGER,h=d&&null!==(0,O.dR)(e,d),_=d&&null!==(0,P.W4)(e,d);return{botId:c??void 0,botName:r,appId:u?.appId,experimentWebIdentityLinksGroupTreatment:i,suppressLinkWarningPref:!!(0,F.ty)(e,"suppress_link_warning"),urlIsSIWSLink:!!d&&(0,G.Ls)(e,d),isShortcutLinkTrigger:p,triggerId:u?.triggerId,permalinkType:u?.type,permalinkTs:u?.ts,permalinkFileId:u?.fileId,permalinkMemberId:u?.memberId,permalinkRoomId:u?.roomId,permalinkChannelId:u?.channelId,permalinkArticleId:u?.articleId,permalinkRecordId:u?.recordId,permalinkEntityId:u?.entityId,isFileQuipAndNotAccessible:h,isFileListAndNotAccessible:_,experimentFeLinkTokenizationGroupOn:l,experimentChannelTabDragMessageAttachmentsGroupOn:o}},e=>({doSlackAction:t=>e((0,U.A)(t)),requestAccessModalThunk:t=>e((0,I.A)(t))}))(BaseMrkdwnLink);Object.defineProperty({},"getUrlType",{get:()=>getUrlType,set:e=>{getUrlType=e}})},0x6cc5eee0:(e,t,a)=>{"use strict";a.d(t,{A:()=>q});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x18f2150ea),l=a(0x211fc28d8),o=a(0x20ef3966f),s=a(0x21f3c49e8),c=a(0x5359476e),d=a(0xf8dd7f80),m=a(0x20482ad21),u=a(0x4c96e5d9),p=a(0xcaee4748),h=a(0xf35bbf32),_=a(0x15611c98f),f=a(0x1f13c844e),b=a(0x45ad3b82),g=a(0x4abbd599),y=a(0x14b2bf87b),A=a(0x7160cab5),x=a(0x1a65aae75),E=a(0x1b3ecb90f),C=a(0x16dc93e4b),k=a(0x203cd5170),v=a(0x22a75d737),S=a(0x2174d91c0),I=a(0x2048e7b71),w=a(0x223ac29bb),T=a(0x209e067d1),N=a(0xbfebdd7c),M=a(0x1c91944c9),R=a(0xb7a990a9),P=a(0x13d13a68b),L=a(0x1ccef1c6f),O=a(0x1af285d2e),D=a(0xdeaf4051),F=a(0x1eae030b2),U=a(0x14149c126);let B,H=/\ue000|\ue001/,W=new m.Ay("message"),V=(0,d.getGenericLogger)(),G=class extends n.PureComponent{static defaultProps={text:"",tsfMode:"NORMAL",emojiMode:"default",emojiDisplayInfo:{},emojiSize:void 0,isEmojiInlineWithText:!0,do24hrTime:!1,suppressLinkWarningPref:!1,noJumbomoji:!1,noLinking:!1,noSpecials:!1,noHighlights:!1,noEmojiText:!1,iconInTextMode:void 0,noHexColors:!1,noCode:!1,noQuotes:!1,preventCopyPaste:!1,transformMissingEmoji:!1,showIconForEmojiInAsTextMode:!1,stopAnimations:!1,customLineEnding:"",showTooltips:!0,doInlineImages:!1,doSlackActionLinks:!1,origin:void 0,memberId:void 0,sourceTeamId:void 0,customFormatHandler:void 0,customContentHandler:void 0,clogLinkClick:r.A,addDirectionAttr:!0,ariaAssertive:void 0,maxCharacters:1/0,maxNewlines:1/0,onRender:r.A,onMouseEnter:r.A,onMouseLeave:r.A,explicitlyRenameBotLink:!1,onUserGroupClick:r.A,onOpenSuspiciousLinkDialog:r.A,refToForward:void 0,"data-qa":void 0,isExpandableStateKnown:!1,isExpanded:!1,experimentTsfSnitchGroupOn:!1,isFromAppHome:!1,forceRealNames:!1,supressMentionAtSymbol:!1,useUserNamePrefs:!1};uid=0;numCharactersUsed=0;numNewlinesUsed=0;componentDidMount(){let{onRender:e}=this.props;e?.({isTruncated:this.isTruncated()})}componentDidUpdate(){let{onRender:e}=this.props;e?.({isTruncated:this.isTruncated()})}handleUserGroupClick=(e,t)=>{let{onUserGroupClick:a}=this.props;e.preventDefault(),a?.(t)};isTruncated=()=>this.numCharactersUsed>=this.props.maxCharacters||this.numNewlinesUsed>=this.props.maxNewlines;nextKey=()=>(this.uid+=1,this.uid);renderBold=({contents:e})=>{let t="ja-JP"===(0,w.Yp)()?"\uFF0A":"*",a=(0,T.A)()?{"data-stringify-type":"bold"}:{"data-stringify-prefix":t,"data-stringify-suffix":t,"data-stringify-requires-siblings":!0};return n.createElement("b",{key:this.nextKey(),...a},this.renderMrkdwnFormatting(e))};renderChannel=({id:e="",name:t=""})=>{let{noLinking:a,clogLinkClick:r,showTooltips:i}=this.props;return this.numCharactersUsed+=(t||e).length+1,n.createElement(b.A,{key:this.nextKey(),id:e,noLinking:a,clogLinkClick:r,showTooltip:i})};renderCode=({contents:e})=>{if(this.props.noCode)return n.createElement("span",{key:this.nextKey()},this.renderMrkdwnFormatting(e));let t="ja-JP"===(0,w.Yp)()?"\uFF40":"`",a=(0,T.A)()?{"data-stringify-type":"code"}:{"data-stringify-prefix":t,"data-stringify-suffix":t,"data-stringify-requires-siblings":!0};return n.createElement(h.i,{blockType:"code",key:this.nextKey()},n.createElement(h.m,null,n.createElement("code",{key:this.nextKey(),className:"c-mrkdwn__code",...a},this.renderMrkdwnFormatting(e))))};renderCommand=({data:e})=>{let{type:t,label:a,...r}=e,{noHighlights:i,noLinking:l,do24hrTime:o}=this.props;switch(t){case"here":case"channel":case"everyone":case"group":return this.numCharactersUsed+=t.length+1,n.createElement(f.A,{...r,key:this.nextKey(),type:t,noHighlights:i,noLinking:l});case"subteam":return this.numCharactersUsed+=(a||t).length,n.createElement(y.Ay,{...r,key:this.nextKey(),fallback:a,noHighlights:i,noLinking:l,onClick:this.handleUserGroupClick});case"date":if(this.numCharactersUsed+=(a||t).length,!r.ts||!r.format)return a?n.createElement("span",{key:this.nextKey()},a):null;return n.createElement(_.A,{...r,key:this.nextKey(),fallback:a,do24hrTime:o});case"salesforce_data_field":return this.numCharactersUsed+=(a||t).length,n.createElement(A.A,{element:e,key:this.nextKey(),noLinking:l});default:return B}};renderEmoji=({name:e=""})=>{let{showTooltips:t,stopAnimations:a,emojiDisplayInfo:r,emojiSize:i=E.lw.MEDIUM,isEmojiInlineWithText:l,iconInTextMode:o,sourceTeamId:s}=this.props;this.numCharactersUsed+=1;let{name:c=e,url:d}=(0,k.H)(e,r);return n.createElement(E.Ay,{key:this.nextKey(),text:c,emojiSize:i,showTooltip:t,stopAnimations:a,iconInTextMode:o,sourceTeamId:s,isEmojiInlineWithText:l,url:d})};renderHardSpace=e=>this.props.customLineEnding?"\xa0":["\xa0",n.createElement("wbr",{key:this.nextKey()})];renderHex=({color:e=""})=>{let{noHexColors:t}=this.props;return(this.numCharactersUsed+=e.length,t)?null:n.createElement("div",{key:this.nextKey(),className:"c-mrkdwn__hex",style:{background:e}})};renderHighlight=e=>n.createElement("span",{key:this.nextKey(),className:"c-mrkdwn__mention"},e);renderHighlightMarkers=({contents:e})=>n.createElement("span",{className:"c-mrkdwn__highlight",key:this.nextKey()},this.renderMrkdwnFormatting(e));renderHighlights=({text:e=""},t)=>{let{highlightWords:a,noHighlights:n,maxCharacters:r}=this.props,{isLastItem:o}=t;if((0,i.A)(r)&&this.numCharactersUsed<r){let a=r-this.numCharactersUsed;if(a<e.length||a===e.length&&!o){let n=(0,l.A)((0,l.A)(e.slice(0,a)),"\u2026.,_-");return this.numCharactersUsed=r,[this.renderHighlights({text:n},t),"\u2026"]}this.numCharactersUsed+=e.length}if(!e||!a||n)return(0,N.A)(e);let s=(0,v.Ay)(e,a),c=[],d=0;if(s.forEach(({index:t,length:a})=>{let n=(0,N.A)(e.slice(d,t));c.push(n);let r=(0,N.A)(e.substr(t,a));c.push(this.renderHighlight(r)),d=t+a}),d!==e.length){let t=(0,N.A)(e.slice(d));c.push(t)}return c};renderItalic=({contents:e})=>{let t="ja-JP"===(0,w.Yp)()?"\uFF3F":"_",a=(0,T.A)()?{"data-stringify-type":"italic"}:{"data-stringify-prefix":t,"data-stringify-suffix":t,"data-stringify-requires-siblings":!0};return n.createElement("i",{key:this.nextKey(),...a},this.renderMrkdwnFormatting(e))};renderJumbomoji=({name:e})=>{let{showTooltips:t,stopAnimations:a,sourceTeamId:r}=this.props;return this.numCharactersUsed+=1,n.createElement(E.Ay,{key:this.nextKey(),text:e,emojiSize:E.lw.LARGE,showTooltip:t,stopAnimations:a,sourceTeamId:r})};renderLineBreak=()=>{let{customLineEnding:e,maxNewlines:t}=this.props,a=n.createElement("br",{key:this.nextKey()});return(this.numNewlinesUsed+=1,e&&(t===1/0||this.isTruncated()))?[n.createElement("span",{key:this.nextKey()},e),a]:a};onMaybeOpenSuspiciousLinkDialog=(e,{url:t="",contents:a=[]})=>{let{onOpenSuspiciousLinkDialog:n,suppressLinkWarningPref:r}=this.props;if(r)return;let textFromContents=e=>e?.text?e.text:e?.name?e.name:e?.contents?e.contents.map(textFromContents):"",i=a.map(textFromContents).join(""),l=i.replace(/&amp;/g,"&"),o=t.replace(/&amp;/g,"&");(0,x.A)(i,t)&&(n?.({text:l,url:o}),e.preventDefault())};renderLink=({url:e="",contents:t=[]})=>{let{doSlackActionLinks:a,noLinking:r,origin:i,memberId:l,clogLinkClick:o,explicitlyRenameBotLink:s,isFromAppHome:c,showTooltips:d}=this.props;return n.createElement(g.Ay,{key:this.nextKey(),url:e,noLinking:r,doSlackActionLinks:a,origin:i,memberId:l,clogLinkClick:o,explicitlyRenameBotLink:s,showTooltip:d,maybeOpenSuspiciousLinkDialog:a=>{this.onMaybeOpenSuspiciousLinkDialog(a,{url:e,contents:t})},isFromAppHome:c},this.renderMrkdwnFormatting(t))};renderLongQuotePrefix=()=>(0,T.A)()?null:n.createElement("span",{key:this.nextKey(),className:"copy_only"},">>>");renderMember=({id:e="",fallback:t})=>{let{noHighlights:a,noLinking:r,showTooltips:i,clogLinkClick:l,forceRealNames:o,supressMentionAtSymbol:s}=this.props;return this.numCharactersUsed+=e.length,n.createElement(p.A,{key:this.nextKey(),forceRealNames:o,id:e,fallback:t,showTooltip:i,noHighlights:a,noLinking:r,clogLinkClick:l,supressMentionAtSymbol:s})};renderMrkdwnFormatting=(e,t=!1)=>{let{customFormatHandler:a}=this.props;return(0,o.A)(e,(r,i)=>{let l;if(this.isTruncated())return!1;let o=r.type,s=o&&this.FORMAT_HANDLERS[o]||this.renderHighlights,getDefaultOutput=()=>{let a=!!(t&&e&&i===e.length-1);return s(r,{index:i,isLastItem:a})};try{a?(l=a({item:r,getDefaultOutput}),n.isValidElement(l)&&(l=n.cloneElement(l,{key:this.nextKey()}))):l=getDefaultOutput()}catch(e){V.error(e)}return l===B&&(l=this.renderUnknownItem(r)),l})};renderParagraphBreak=()=>{let{customLineEnding:e}=this.props;return e?this.renderLineBreak():(0,T.A)()?n.createElement("span",{key:this.nextKey(),className:"c-mrkdwn__br","data-stringify-type":"paragraph-break"}):n.createElement("span",{key:this.nextKey(),className:"c-mrkdwn__br"},n.createElement("i",{className:"copy_only"},n.createElement("br",null)))};renderPre=({contents:e},{index:t})=>{if(this.props.noCode)return this.renderUnformattedBlock({contents:e,index:t});let a="ja-JP"===(0,w.Yp)()?"\uFF40\uFF40\uFF40":"```",r=(0,T.A)()?{"data-stringify-type":"pre"}:{"data-stringify-prefix":a,"data-stringify-suffix":a,"data-stringify-requires-siblings":!0};return n.createElement(h.i,{blockType:"codeBlock"},n.createElement(h.m,null,n.createElement("pre",{key:this.nextKey(),className:"c-mrkdwn__pre",...r},this.renderMrkdwnFormatting(e))))};renderQuote=({contents:e},{index:t})=>{if(this.props.noQuotes)return this.renderUnformattedBlock({contents:e,index:t});let a={};if((0,T.A)()&&!(0,s.A)(e)){let t=e?.[0].type==="long_quote_prefix"?"blockquote":"quote";a["data-stringify-type"]=t}return n.createElement("blockquote",{key:this.nextKey(),className:"c-mrkdwn__quote",...a},this.renderMrkdwnFormatting(e))};renderQuotePrefix=()=>(0,T.A)()?null:n.createElement("span",{key:this.nextKey(),className:"copy_only"},">");renderStrike=({contents:e})=>{let t=(0,T.A)()?{"data-stringify-type":"strike"}:{"data-stringify-prefix":"~","data-stringify-suffix":"~","data-stringify-requires-siblings":!0};return n.createElement("strike",{key:this.nextKey(),...t},this.renderMrkdwnFormatting(e))};renderUnformattedBlock=({contents:e,index:t})=>{let a=n.createElement("span",{key:this.nextKey()},this.renderMrkdwnFormatting(e));if(0===t)return a;let r=this.renderLineBreak();return this.isTruncated()?r:[r,a]};renderUnknownItem=({token:e})=>{let{showTooltips:t}=this.props;return t?n.createElement(u.Ay,{key:this.nextKey(),tip:W.t("Sorry! This part didn\u2019t render correctly.")},n.createElement("code",{className:"sk_primary_foreground"},e)):n.createElement("code",{key:this.nextKey(),className:"sk_primary_foreground"},e)};FORMAT_HANDLERS={bold:this.renderBold,italic:this.renderItalic,strike:this.renderStrike,code:this.renderCode,pre:this.renderPre,quote:this.renderQuote,quote_prefix:this.renderQuotePrefix,long_quote_prefix:this.renderLongQuotePrefix,line_break:this.renderLineBreak,paragraph_break:this.renderParagraphBreak,space_hard:this.renderHardSpace,link:this.renderLink,command:this.renderCommand,member:this.renderMember,channel:this.renderChannel,emoji:this.renderEmoji,jumbomoji:this.renderJumbomoji,hex:this.renderHex,highlight:this.renderHighlightMarkers,unknown:this.renderUnknownItem};render(){let{text:e,className:t,noJumbomoji:a,noSpecials:r,customContentHandler:i,addDirectionAttr:l,refToForward:o,onMouseEnter:s,onMouseLeave:d,"data-qa":m,experimentTsfSnitchGroupOn:u}=this.props;if(!e)return null;this.uid=0,this.numCharactersUsed=0,this.numNewlinesUsed=0;let p=r?"NOMRKDWN":this.props.tsfMode,h=this.props.ariaAssertive?"assertive":void 0,_=(0,I.sm)(e,p,{jumbomoji:!a,allow_intra_word_formatting:!0});H.test(e)&&(_=(0,c.A)(_,e=>e.replace(/\ue000/g,"<HIGHLIGHT:START>").replace(/\ue001/g,"<HIGHLIGHT:END>").split(/(<HIGHLIGHT:START>|<HIGHLIGHT:END>)/g).filter(Boolean)));let f=(0,S.A)(_);return i&&(f=i(f)),n.createElement("span",{className:u?`c-mrkdwn__snitch ${t||""}`:t,ref:o,"aria-live":h,dir:l?"auto":void 0,"data-qa":m,onMouseEnter:s,onMouseLeave:d},this.renderMrkdwnFormatting(f,!0))}};G.displayName="BaseMrkdwn";let q=(0,M.N)((e,t)=>{let{emojiMode:a,noHexColors:n,noJumbomoji:r,useUserNamePrefs:i}=t,l=a||(0,C.w)(e),o=(0,P.A)(e);return{emojiMode:l,noJumbomoji:r||!o,highlightWords:(0,R.A)(e),noHexColors:n||(0,L.ty)(e,"hide_hex_swatch"),do24hrTime:(0,L.ty)(e,"time24"),suppressLinkWarningPref:(0,L.ty)(e,"suppress_link_warning"),experimentTsfSnitchGroupOn:"on"===(0,U._Z)(e,"tsf_snitch"),forceRealNames:i&&(0,O.E)(e)}},e=>({onUserGroupClick:t=>e((0,D.q)({groupId:t})),onOpenSuspiciousLinkDialog:({text:t,url:a})=>e((0,F.A)({text:t,url:a}))}))(G)},0x14b2bf87b:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>A});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1faa3f1ac),s=a(0x1680d129b),c=a(0xe69dbb22),d=a(0xa1832ae4),m=a(0x61f75169),u=a(0xc39d85ac),p=a(0x209e067d1),h=a(0x1c91944c9),_=a(0xdeaf4051),f=a(0x226892387),b=a(0x1ee439e69),g=a(0x687556ae),y=a(0x475c9cfe);function UserGroup({id:e,className:t,fallback:a,handle:r,isUserInGroup:m=!1,onClick:h=l.A,noHighlights:_=!1,noLinking:b=!1,isNonExistent:g=!1,isUnknown:y=!1,isDeactivated:A=!1,isNotVisible:x=!1,team:E,showUserGroupDetailsProps:C,alwaysDisplayAsLink:k=!1,noTabbableContent:v=!1}){let S=(0,f.d4)(c.PG),I=(0,n.useCallback)(t=>{C(e),t.preventDefault(),h(t,e)},[e,h,C]);if(y)return n.createElement(s.A,{type:"unknown"});if(g&&!a||x&&S)return n.createElement(s.A,{type:"non-existent"});let w=!b&&!g&&!A,T=(0,u.k)({userGroupHandle:r,fallbackHandle:a,isUnknown:y,isNonExistent:g}),N=m&&!_,M=i()("c-mrkdwn__user_group",t,{"c-mrkdwn__user_group--link":k||w,"c-mrkdwn__user_group--mention":N});if(!w)return n.createElement("span",{"data-user-group-id":e,"data-qa-user-group-mrkdwn-is-linked":w,"data-qa-user-group-mrkdwn-is-mention":N,className:M},T);let R={};return(0,p.A)()?(R["data-stringify-type"]="mention",R["data-stringify-id"]=e,R["data-stringify-label"]=T):R["data-stringify-text"]=T,n.createElement(o.A,{className:M,"data-user-group-id":e,"data-qa-user-group-mrkdwn-is-linked":w,"data-qa-user-group-mrkdwn-is-mention":N,href:`${(0,d.Zl)(E)}admin/user_groups`,onClick:I,...v&&{tabIndex:-1},...R},T)}function mapStateToProps(e,{id:t}){let a,n=(0,y.lJ)(e,t);if(n){let t=(0,m.t8)(n),r=(0,m.QR)(n),i=!(0,m.V1)(n),l=!(0,m.p2)(n);a={handle:n.handle||void 0,isUnknown:t,isNonExistent:r,isNotVisible:l,isDeactivated:i,isUserInGroup:(0,g.nc)(e,n.id)&&!i,team:(0,b.H7)(e)??void 0}}else a={isNonExistent:!0};return a}UserGroup.displayName="UserGroup";let A=(0,h.N)(mapStateToProps,e=>({showUserGroupDetailsProps:t=>e((0,_.q)({groupId:t}))}))(UserGroup)},0x241e10207:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0x20b4dda68),r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x1cbdfeceb),o=a(0x1f022ebd9),s=a(0x36d9f560),c=a(0x1c1ded90c);let d=(0,r.memo)(({addMemberToPresenceSubscription:e=l.A,memberId:t,removeMemberFromPresenceSubscription:a=l.A,renderDoublePresence:n=!1,firstElementExtraClassName:d="",...m})=>{let u=(0,i.wA)();return((0,r.useEffect)(()=>{u((0,c.n$)())},[u]),(0,o.A)(()=>(e(t),()=>a(t)),[t]),n)?r.createElement(r.Fragment,null,r.createElement(s.Ay,{...m,className:`${m.className||""} ${d}`}),r.createElement(s.Ay,m)):r.createElement(s.Ay,m)});d.displayName="PresenceWithSubscriptions";var m=a(0x18def662b),u=a(0x175eeece0),p=a(0x1c91944c9),h=a(0x12d51aeb9),_=a(0x19c76d181),f=a(0xa1d33e09),b=a(0x2207a1e7d);let g=(0,p.N)((e,t)=>{let a=(0,b.gd)(e,t.memberId),r=(0,u.d)(e,t.memberId),i=(0,f.z)(e,t.memberId),l=(0,_.WR)(e)===t.memberId,o=(0,m.in)(e);return{...t,userType:r,isDnd:i,isSelf:l,isSlackbot:t.memberId===n.Q$,isActive:"active"===a,experimentSidebarVisualUpdatesM1Enabled:o}},e=>({addMemberToPresenceSubscription:t=>e((0,h.xz)(t)),removeMemberFromPresenceSubscription:t=>e((0,h.Fd)(t))}))(d)},0xaacd3809:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>r});var n=a(0x241e10207);a(0x36d9f560);let r=n.A},0x36d9f560:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>m,Jc:()=>getPresenceText});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0xa6f3163b),s=a(0x2501a2cee),c=a(0x4c96e5d9);let d=new l.Ay("presence");function getPresenceText(e,t){return e?t?d.t("Active, notifications snoozed"):d.t("Active"):t?d.t("Away, notifications snoozed"):d.t("Away")}let Presence=({inheritIconSize:e=!1,inline:t=!0,isActive:a=!1,isDnd:r=!1,isSelf:l=!1,isSlackbot:d=!1,invert:m=!1,userType:u="member",focusable:p=!1,showText:h=!1,resetIA:_=!1,hasNoAccess:f=!1,className:b,size:g,experimentSidebarVisualUpdatesM1Enabled:y})=>{let A=a?{name:"status-member-filled"}:{name:"status-member"},x=i()(b,"c-presence",{"c-presence--active":a&&!m,"c-presence--resetIA":_,"c-presence--away":!a&&!m,"c-presence--inverted":m,"is-inline":t,"c-presence--visual-updates-m1":y,block:!t}),E=getPresenceText(a,r);f?A={name:"lock-filled"}:"member"===u?r?A=a?{name:"status-member-dnd-filled"}:{name:"status-member-dnd"}:d&&(A={name:"status-slackbot-filled"}):"ra"===u||"external"===u?A=r?a?{name:"status-guest-dnd-filled"}:{name:"status-guest-dnd"}:a?{name:"status-guest-filled"}:{name:"status-guest"}:"ura"===u&&(A=r?a?{name:"status-single-channel-guest-dnd-filled"}:{name:"status-single-channel-guest-dnd"}:a?{name:"status-single-channel-guest-filled"}:{name:"status-single-channel-guest"});let C=n.createElement("span",{className:x},n.createElement(s.Ah,{...A,title:E,"aria-label":E,"aria-hidden":"false",size:g??(e?"inherit":"20"),inline:t,"data-qa":"presence_indicator","data-qa-type":A.name,"data-qa-presence-self":l,"data-qa-presence-active":a,"data-qa-presence-dnd":r}));return p?n.createElement(n.Fragment,null,n.createElement(c.Ay,{tip:E},n.createElement(o.A,null,C)),h&&n.createElement("span",{className:"padding_left_50","aria-hidden":"true"},E)):n.createElement(n.Fragment,null,C,h&&n.createElement("span",{className:"padding_left_50","aria-hidden":"true"},E))};Presence.displayName="Presence";let m=n.memo(Presence)},0xca73eb84:(e,t,a)=>{"use strict";a.d(t,{S:()=>Pulse});var n=a(0xbad225b5),r=a(0x1853f0e7c),i=a(0x1ccef1c6f),l=a(0x226892387);let Pulse=({children:e,color:t,pulseRadius:a})=>{let o=(0,l.d4)(e=>!(0,i.ty)(e,"a11y_animations")),s=(0,n.useMemo)(()=>({borderRadius:`${a}px`,"--pulse-color":(0,r.HK)(t)}),[t,a]);return o?n.createElement(n.Fragment,null,e):n.createElement("div",{className:"c-pulse",style:s,"data-qa":"pulse"},e)};Pulse.displayName="Pulse"},0xd892f394:(e,t,a)=>{"use strict";a.d(t,{A:()=>ReactionAddButton});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x4c96e5d9),c=a(0x1faaed399),d=a(0x20acb5cc8),m=a(0x74bbb29a);let u=new l.Ay("emoji");function ReactionAddButton({onClick:e,onEmojiSelected:t,showProgressiveDisclosureTip:a,isProgressiveDisclosureTipInEmptyState:r,shouldPropagateOnClose:l,shouldShowReacjiTriggers:p,channelId:h}){let[_,f]=(0,n.useState)(!1),b=(0,n.useRef)(null);(0,n.useEffect)(()=>(a&&f(!0),!a&&_&&(b.current=window.setTimeout(()=>{f(!1)},200)),()=>{b.current&&clearTimeout(b.current)}),[a,_]);let g=n.createElement(s.Ay,{tip:u.t("Add reaction\u2026"),delay:s.PK},_?n.createElement("div",{className:"inline_block"},n.createElement(d.Ay,{className:i()({"p-setup_prog_disc_icon_action--exiting":!a&&_}),tip:m.ml.Reacji,onClick:e,isEmptyState:r})):n.createElement(o.Nm,{className:"c-reaction_add",onClick:e,"aria-label":u.t("Add reaction\u2026"),"data-qa":"add_reaction_button"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"none"},n.createElement("path",{className:"c-reaction_add__bg",fill:"currentColor",d:"M10.28 4.117a7 7 0 1 0 5.604 5.604A2.5 2.5 0 0 1 13 7.25v-.251h-.251a2.5 2.5 0 0 1-2.47-2.883Z"}),n.createElement("path",{className:"c-reaction_add__fg",fill:"currentColor",fillRule:"evenodd",d:"M15.5 1a.75.75 0 0 1 .75.75v2h2a.75.75 0 0 1 0 1.5h-2v2a.75.75 0 0 1-1.5 0v-2h-2a.75.75 0 0 1 0-1.5h2v-2A.75.75 0 0 1 15.5 1Zm-13 10a6.5 6.5 0 0 1 7.166-6.466.75.75 0 0 0 .152-1.493 8 8 0 1 0 7.14 7.139.75.75 0 0 0-1.492.152A6.525 6.525 0 0 1 15.5 11a6.5 6.5 0 1 1-13 0Zm4.25-.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm4.5 0a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM9 15c1.277 0 2.553-.724 3.06-2.173.148-.426-.209-.827-.66-.827H6.6c-.452 0-.808.4-.66.827C6.448 14.276 7.724 15 9 15Z",clipRule:"evenodd"}))));return n.createElement(c.A,{onEmojiSelected:t,showHandyReactions:!0,onClick:e,shouldPropagateOnClose:l,shouldShowReacjiTriggers:p,channelId:h},g)}ReactionAddButton.displayName="ReactionAddButton"},0x859d03c:(e,t,a)=>{"use strict";a.d(t,{A:()=>D});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x24316e946),o=a(0x16475a65c),s=a(0x130d89881),c=a(0x16c170c3b),d=a(0x1df96de4c),m=a(0x20482ad21),u=a(0xf3c40abe),p=a(0xaf3d0552),h=a(0xd892f394),_=a(0x11a296110);let f=new m.Ay("emoji");function ReactionCollapseButton({onClick:e}){return n.createElement(_.Nm,{className:"c-reaction_expand c-reaction_expand--collapse",onClick:e,"aria-label":f.t("Show fewer reactions"),"aria-expanded":"true","data-qa":"expand_reaction_button"},n.createElement("div",{className:"c-reaction_expand__overlay"},f.t("Show less")))}ReactionCollapseButton.displayName="ReactionCollapseButton";var b=a(0x4c96e5d9);let g=new m.Ay("emoji");function ReactionExpandButton({onClick:e,number:t,selected:a,refToForward:r}){return n.createElement(b.Ay,{tip:g.t("Show more reactions"),delay:b.PK},n.createElement(_.Nm,{className:i()("c-reaction_expand",{"c-reaction_expand--reacted":a}),onClick:e,"aria-label":g.t("More reactions"),"aria-expanded":"false","data-qa":"expand_reaction_button",ref:r},n.createElement("div",{className:"c-reaction_expand__overlay"},g.rt("{number} more",{number:t}))))}ReactionExpandButton.displayName="ReactionExpandButton";let y=n.forwardRef((e,t)=>n.createElement(ReactionExpandButton,{...e,refToForward:t}));var A=a(0x3999262f),x=a(0xd897374a),E=a(0x46aa31ce),C=a(0x239139fef),k=a(0x1c91944c9),v=a(0x46b45b2e),S=a(0x19c76d181),I=a(0x2015b5207),w=a(0x2132c5285),T=a(0xd93ecf94),N=a(0x1beeaa71e),M=a(0x18a17ca8f),R=a(0x207167a29),P=a(0x74bbb29a);let L=new m.Ay("reactions"),O=class extends n.PureComponent{static getDerivedStateFromProps(e,t){let a=!e.isExpanded;if(e.reactions&&e.reactions.length<5||!t.width)return t;let n=(0,x.A)({reactions:e.reactions}),r=0,i=[];n&&n.forEach(e=>{let t=8*Math.floor(Math.log10(e.count)+1)+18*e.reactions.length+18;r+=t,i.push(r)});let s=(0,l.A)(i,t.width),c=(0,l.A)(i,i[s-1]+t.width-38),d=(0,l.A)(i,i[s-1]+t.width-38-64),m=(n||[]).filter(t=>t.users.includes(e.currentUser)).map(e=>e.name);if(!t.collapsed||!n||n.length<=c)return{...t,collapsed:a,selectedReactionNames:m,collapseLimit:c,collapseTarget:d};let u=n.slice(d).filter(t=>t.users.includes(e.currentUser)).map(e=>e.name),p=t.selectedReactionNames,h=!!(0,o.A)(u,p).length;return{...t,collapsed:!h&&a,selectedReactionNames:m,collapseLimit:c,collapseTarget:d}}reactionBarRef;reactionExpandRef;constructor(e){super(e),this.onAddReaction=this.onAddReaction.bind(this),this.handleReactionClick=this.handleReactionClick.bind(this),this.onReactionClick=this.onReactionClick.bind(this),this.onReactionEmojiPickerSelected=this.onReactionEmojiPickerSelected.bind(this),this.onExpand=this.onExpand.bind(this),this.onCollapse=this.onCollapse.bind(this),this.reactionBarRef=n.createRef(),this.reactionExpandRef=n.createRef(),this.state={collapsed:!e.isExpanded,selectedReactionNames:(e.reactions||[]).filter(t=>t.users.includes(e.currentUser)).map(e=>e.name),width:0,collapseLimit:0,collapseTarget:0}}componentDidUpdate(e,t){this.maybeUpdateCollapseFocus(t.collapsed)}onAddReaction(){this.props.isProgressiveDisclosureEnabled&&!this.props.showProgressiveDisclosureTip&&this.props.handleProgressiveDisclosureOrganicUse({tip:P.ml.Reacji}),this.props.clogReactionClick&&this.props.clogReactionClick()}onCollapse(){this.props.setExpanded({key:this.props.reactionKey||"",isExpanded:!1})}onExpand(){this.props.setExpanded({key:this.props.reactionKey||"",isExpanded:!0})}onReactionClick(e,t,a){this.props.handleReactionClick({name:e,reacted:t,reactionKey:this.props.reactionKey,actionSource:a})}onReactionEmojiPickerSelected(e,t){this.props.handleReactionClick({name:t,reactionKey:this.props.reactionKey,fromEmojiPicker:!0})}maybeUpdateCollapseFocus(e){if(this.props.hasKeyboardFocus){if(e&&!this.state.collapsed){let e=this.reactionBarRef.current&&this.reactionBarRef.current.children,t=e&&e[this.state.collapseTarget];t&&t.focus()}if(!e&&this.state.collapsed){let e=this.reactionExpandRef&&this.reactionExpandRef.current;e&&e.focus()}}}handleReactionClick(e){this.onReactionClick(e,void 0,v.mV.reactionToggleButton),this.props.clogReactionClick&&this.props.clogReactionClick()}render(){let e,t,{eligibleForRendering:a,reactions:r,currentUser:l,canReact:o,showProgressiveDisclosureTip:d,alwaysExpand:m,positionAddReactionButtonLeft:u,shouldPropagateOnAddReactionClose:_,reactionKey:f,shouldShowReacjiTriggers:b,channelId:g}=this.props,{collapseLimit:A,collapseTarget:E}=this.state;if(!a)return null;let C=(0,x.A)({reactions:r})||[];if(e=C.map(({count:e,name:t,users:a,tooltip:r,reactions:i})=>n.createElement(p.A,{name:t,count:e,users:a,tooltip:r,reactions:i,currentUser:l,key:t,onClick:this.handleReactionClick,canReact:o,reactionKey:f,shouldShowReacjiTriggers:b})),!m&&C.length>5&&C.length>A)if(this.state.collapsed){e=e.slice(0,E);let t=C.length-E,a=C.slice(E).some(e=>e.users.includes(l));e.push(n.createElement(y,{onClick:this.onExpand,number:t,selected:a,ref:this.reactionExpandRef,key:"reaction-expand-button"}))}else e.push(n.createElement(ReactionCollapseButton,{onClick:this.onCollapse,key:"reaction-collapse-button"}));let k=n.createElement(h.A,{onClick:this.onAddReaction,onEmojiSelected:this.onReactionEmojiPickerSelected,key:"reaction-add-button",showProgressiveDisclosureTip:d,isProgressiveDisclosureTipInEmptyState:d&&0===(r||[]).length,shouldPropagateOnClose:_,shouldShowReacjiTriggers:b,channelId:g});o&&!u&&e.push(k);let v=i()(this.props.className,"c-reaction_bar",{"c-reaction_bar--collapsed":this.state.collapsed,display_flex:u}),S=L.t("Reactions");return(r||"").length>5&&(t=n.createElement(s.A,{disableHeight:!0},({width:e})=>{if(!(0,c.W)(this.state.width,e,.5))return this.setState(()=>({width:e}))}),this.state.width||m||(e=null)),n.createElement("div",{className:v,role:"group","data-qa":"reaction_bar","aria-label":S,ref:this.reactionBarRef,"data-stringify-ignore":!0},t,n.createElement("span",null,e),u&&o?k:null)}};O.displayName="ReactionBar";let D=(0,k.N)((e,{reactionKey:t,showWhenEmpty:a,canReactOverride:n=!0})=>{let{type:r,entityId:i,channelId:l}=(0,C.O)(t),o=(0,M.qh)(e),s=(0,M.zE)(e),c=!!(s&&s===i),m=c&&(0,M.jv)(e,{tip:P.ml.Reacji}),u=(0,N.bk)(e,t);u&&u.length||(u=d.Ml);let p=a||!!(u&&u.length)||c&&(m||(0,M.Wg)(e,{tip:P.ml.Reacji})),h=n;if(h&&p&&"message"===r){let t=(0,T.Ld)(e,l,i);h=!!(t&&(0,E.A)(e,t))}return{eligibleForRendering:p,canReact:h,reactions:u,currentUser:(0,S.WR)(e),isProgressiveDisclosureEnabled:o,showProgressiveDisclosureTip:o&&m,isExpanded:!!(0,I.A)(e,t||"")}},{handleReactionClick:e=>(0,A.U)(e),setExpanded:e=>(0,w.o)(e),handleProgressiveDisclosureOrganicUse:e=>(0,R.F)(e)})((0,u.A)(O))},0x22293baf1:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x128c3200c),i=a(0x1db69cda),l=a(0xe0376d2),o=a(0x20482ad21),s=a(0x1e864b930),c=a(0xdabe58cf),d=a(0x19ab18890),m=a(0x149af4496),u=a(0x21c50a68b),p=a(0xedbc2765),h=a(0x7bc42e7e),_=a(0x1d06c44fe),f=a(0x1c91944c9),b=a(0x9b971e7e),g=a(0x19c76d181),y=a(0x1e4ae349d);let A=new o.Ay("reactions");function getTip({users:e,emojiName:t,selfUserId:a,isOverflow:r,showClickToRemove:i,reacjiTriggersForEmoji:l}){let o=e.includes(a),c=l?.length===1,d=l?.length&&l.length>0,u=c?l?.[0]?.name:void 0,getStartedWithString=()=>d?c&&u?A.rt('reacted with {emoji} to start <span className="c-tooltip__subtitle">{name}</span> workflow',{emoji:t,name:u}):A.rt('reacted with {emoji} to start <span className="c-tooltip__subtitle">{count}</span> workflows',{emoji:t,count:l?.length}):"";if(1===e.length){if(o)return d?i?A.rt("You (click to remove) {started_string}",{started_string:getStartedWithString()}):A.rt("You {started_string}",{started_string:getStartedWithString()}):i?A.rt('You (click to remove) <span className="c-tooltip__subtitle">reacted with {emoji}</span>',{emoji:t}):A.rt('You <span className="c-tooltip__subtitle">reacted with {emoji}</span>',{emoji:t});return d?A.rt("{user} {started_string}",{user:n.createElement(m.A,{userId:e[0],isFirst:!0,isSelf:!1}),started_string:getStartedWithString()}):A.rt('{user} <span className="c-tooltip__subtitle">reacted with {emoji}</span>',{user:n.createElement(m.A,{userId:e[0],isFirst:!0,isSelf:!1}),emoji:t})}let p=e.map((e,t)=>n.createElement(m.A,{key:e,userId:e,isFirst:0===t,isSelf:a===e}));r&&p.push(A.rt("others"));let h=(0,s.A)(p,{react:!0});return o?d?A.rt("{users_and_you} {started_string}",{users_and_you:h,started_string:getStartedWithString()}):A.rt('{users_and_you} <span className="c-tooltip__subtitle">reacted with {emoji}</span>',{users_and_you:h,emoji:t}):d?A.rt("{users} {started_string}",{users:h,started_string:getStartedWithString()}):A.rt('{users} <span className="c-tooltip__subtitle">reacted with {emoji}</span>',{users:h,emoji:t})}getTip.displayName="getTip";let ReactionTip=({count:e=0,dispatchConvertEmojiInStringToLocalizedThunk:t,shouldRenderEmoji:a=!1,reactions:o=[],isMultiSkintone:s=!1,showClickToRemove:m=!0,selfUserId:h,showImportTip:_,shouldTruncate:f,importReaction:b,reacjiTriggersForEmoji:g})=>{let y=!!g?.length;(0,n.useEffect)(()=>(p.LI.start({label:p.gC.ReactionsTooltipOpenDuration,options:{tags:{is_reacji_trigger:y}}}),()=>{p.LI.stop({label:p.gC.ReactionsTooltipOpenDuration})}),[y]);let x=f&&o.length>23,E=(0,r.A)(x?o.slice(0,23):o,8),C=E.map((e,t)=>n.createElement("div",{key:o.map(e=>e.name).join("-"),className:"c-reaction__tip--emoji"},e.map(e=>n.createElement("span",{key:e.name},n.createElement(d.Ay,{text:e.name,emojiSize:1===o.length?d.lw.LARGER:d.lw.LARGE,url:e.url,shouldFallbackOnLoadError:!0}))),x&&t===E.length-1&&n.createElement("span",{className:"c-emoji__large c-reaction__tip--emoji-truncated-icon"},`+${o.length-23}`))),k=o;s&&((k=(0,i.A)(o.slice(0,1)))[0].users=(0,l.A)(o.map(e=>e.users||[]).flat()),k[0].name=k[0].baseName);let v=f&&k.length>10,S=k.length;v&&(k=k.slice(0,10));let I=e>50&&o.length>1,w=n.createElement("div",{className:"c-reaction__tip_group_container"},k.map(e=>{let a=t({locale:(0,u.JK)(),text:`:${e.name}:`}),r=I?(e.users||[]).slice(0,10):e.users||[],i=I?e.count>10:e.count>50;return n.createElement("div",{className:"c-reaction__tip_group",key:e.name},getTip({emojiName:a,users:r,selfUserId:h,isOverflow:i,showClickToRemove:m,reacjiTriggersForEmoji:g}))}),v&&n.createElement("div",{className:"c-tooltip__subtitle"},A.t("+ {additionalDescriptionsCount} more",{additionalDescriptionsCount:S-10}))),T=a?n.createElement(n.Fragment,null,n.createElement("div",{className:"c-reaction__tip--emoji_wrapper"},C),w):w;return n.createElement("div",{className:"c-reaction__tip"},T,_&&n.createElement(c.K,{emojiName:b?.name??o?.[0]?.name,emojiUrl:b?.url??o?.[0]?.url}))};ReactionTip.displayName="ReactionTip";let x=(0,f.N)((e,{reactions:t})=>({selfUserId:(0,g.WR)(e),shouldRenderEmoji:!(0,h.P)(e),isMultiSkintone:!!(0,y.pA)(e,{text:t[0]?.baseName,teamId:(0,b.ZT)(e)||""})}),{dispatchConvertEmojiInStringToLocalizedThunk:e=>(0,_.m$)(e)})(ReactionTip)},0xaf3d0552:(e,t,a)=>{"use strict";a.d(t,{A:()=>F});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x1aba66b56),c=a(0x20ef3966f),d=a(0x20482ad21),m=a(0x205f4fb61),u=a(0x11a296110),p=a(0x4c96e5d9),h=a(0x10a8a0371),_=a(0x1b3ecb90f),f=a(0xe5a46141),b=a(0x7c6dcbee),g=a(0x9b971e7e),y=a(0x1ccef1c6f),A=a(0x226892387),x=a(0x1706ab179),E=a(0x13b570a00);let{getObjectById:C}=x.Tp,k=(0,a(0x11c82607b).Ay)("Clear reaction animation",(e,t,{reactionKey:a,emojiName:n})=>{let r=(0,E.y)(a,n);e((0,x.zt)({ids:[r]}))});k.meta={name:"clearReactionAnimation",key:"createThunkClearReactionAnimation",description:"Clear reaction animation"};var v=a(0x1bf101256);let S={opacity:1,y:0,x:0,scale:1},I={opacity:0,y:-70,x:[0,-15,15,-15],scale:[1,.7,.4,0]},w={duration:1.5,opacity:{duration:1.5,ease:"easeOut"},y:{duration:1.5,ease:"easeOut"},x:{duration:1.5,ease:"easeInOut",times:[0,.33,.66,1]},scale:{duration:1.5,ease:"easeOut",times:[0,.33,.66,1]}},ReactionAnimation=({name:e,reactionKey:t})=>{let a=(0,r.wA)(),i=(0,f.pc)(),l=(0,A.d4)(a=>!!t&&void 0!==C(a,(0,E.y)(t,e))),o=(0,A.d4)(e=>!(0,y.ty)(e,"a11y_animations")),s=(0,A.d4)(v.a3),c=(0,A.d4)(e=>(0,y.ty)(e,"preferred_skin_tone"))||"",d=(0,A.d4)(g.ZT),m=(0,b.A)(e,c,d),u=t&&l&&!o,p=(0,n.useCallback)(()=>{t&&a(k({reactionKey:t,emojiName:e}))},[t,e,a]);return s&&u?n.createElement(i.div,{initial:S,animate:I,transition:w,onAnimationComplete:p,className:"c-reaction--animated","data-qa":"reaction-animation"},n.createElement(_.Ay,{text:m,emojiSize:_.lw.MEDIUM,showTooltip:!1})):null};ReactionAnimation.displayName="ReactionAnimation";var T=a(0x22293baf1),N=a(0x21c50a68b),M=a(0x239139fef),R=a(0x1d06c44fe),P=a(0x1a0bfaf78),L=a(0x558ba5a6);let O=new d.Ay("reactions"),D=[],Reaction=({count:e,name:t,users:a,reactions:i=D,currentUser:d=null,onClick:f=o.A,canReact:b=!0,clientTheme:g="light",tooltip:y=null,reactionKey:x,shouldShowReacjiTriggers:E})=>{let C=(0,r.wA)(),{channelId:k}=(0,M.O)(x),v=(0,A.d4)(e=>E?(0,L.N)(e,{channelId:k,emojiName:t}):void 0),S=(0,s.A)(a,d),I=i?.[0]?.url,w=(0,n.useCallback)(()=>n.createElement(T.A,{count:e,reactions:i,reacjiTriggersForEmoji:v,showImportTip:!0}),[e,v,i]),F=(0,N.JK)(),U=(0,A.d4)(e=>(0,R.bR)({state:e,locale:F,name:t})),B=O.t("{count} {count, plural, =1 {reaction} other {reactions}}, to start workflow",{count:e}),H=O.t("{count} {count, plural, =1 {reaction} other {reactions}}, started a {numberWorkflows} workflow",{count:e,numberWorkflows:v?.length}),W=v?.length&&v.length>1?H:B,V=v?.length?W:O.t("{count} {count, plural, =1 {reaction} other {reactions}}, react with {emojiName}",{count:e,emojiName:(0,P.A)(U||"")}),G=i.length>10,q=(0,c.A)(G?i.slice(0,10):i,e=>n.createElement(_.Ay,{text:`:${e.name}:`,key:e.name,url:e.url,showTooltip:!1,emojiSize:_.lw.SMALL})),j=(0,n.useCallback)(e=>(e.preventDefault(),e.stopPropagation(),b&&f(t,S)),[b,f,t,S]),z=(0,n.useCallback)(e=>{e?.altKey||C((0,h.a)({emojiName:t,emojiUrl:I,event:e}))},[C,t,I]),K=e>9||i.length>4,$=(0,n.useCallback)(()=>{if(I)return z},[z,I]);return n.createElement(p.Ay,{tip:y||w,delay:p.PK,maxWidth:K?"large":"small"},n.createElement(u.Nm,{className:l()("c-reaction",`c-reaction--${g}`,{"c-reaction--reacted":S,"c-reaction--zero":0===e}),onClick:j,onContextMenu:$(),"aria-label":V,"aria-pressed":S,disabled:!b,"data-qa":"reactji"},q,G&&n.createElement("span",{"data-qa":"reaction-truncation",className:"c-reaction__truncation"},"\u2026"),n.createElement("span",{className:"c-reaction__count"},(0,m.Ay)(e)),n.createElement(ReactionAnimation,{name:t,reactionKey:x})))};Reaction.displayName="Reaction";let F=n.memo(Reaction)},0x3999262f:(e,t,a)=>{"use strict";a.d(t,{U:()=>f});var n=a(0xdafb3627),r=a(0x3711e82d),i=a(0x45012309),l=a(0x11c82607b),o=a(0x46b45b2e),s=a(0x1b86f8de5),c=a(0x3c749200),d=a(0xb9604b6),m=a(0xafce781a),u=a(0xf3c65e54),p=a(0x5b1935a6),h=a(0x18a17ca8f),_=a(0x74bbb29a);let f=(0,l.Ay)("handle click on reaction in reaction bar",(e,t,{name:a,reactionKey:l,reacted:f,actionSource:b,fromEmojiPicker:g})=>{let y=t(),A=(0,i.eo)({state:y}),x=!1;if(g){let e=(0,d.Hp)(y,p.xu.EMOJI_DRAWER)===p.ze.PRODUCTIVITY_REACJI,t=(0,d.Hp)(y,p.xu.QUICK_REACTIONS)===p.ze.QUICK_REACTIONS;(e||t)&&(x=!0)}e((0,o.Ay)({key:l,name:a,actionSource:b,useDefaultSkinToneForMultiSkinToneEmoji:b===o.mV.reactionToggleButton}));let E=(0,d.OL)(y,p.xu.QUICK_REACTIONS),{customEmoji1:C,customEmoji2:k,customEmoji3:v}=E,S=(0,d.Hp)(y,p.xu.QUICK_REACTIONS);S===p.ze.QUICK_REACTIONS&&f&&[C,k,v].includes(a)&&A.track(r.EventId.EDUCATION_MESSAGE_ACTIONS,{contexts:{ui_context:{step_variant:a,step:"quick_reaction",action:r.UiAction.REMOVE}}});let I=(0,d.Hp)(y,p.xu.EMOJI_DRAWER),w=(0,d.OL)(y,p.xu.EMOJI_DRAWER),T=(0,c.Ur)(y);I===p.ze.PRODUCTIVITY_REACJI&&w.autoscrollToProductivity&&T<n.V3&&!x&&!f&&(e((0,s.j_)()),e((0,u.A)({notificationName:p.ze.PRODUCTIVITY_REACJI,action:p.hw.CLICK}))),S!==p.ze.QUICK_REACTIONS||!E.sendClickDataForReactions||x||f||e((0,u.A)({notificationName:p.ze.QUICK_REACTIONS,action:p.hw.CLICK,step:"reaction"}));let N=(0,d.Hp)(y,p.xu.PROGRESSIVE_DISCLOSURE);(0,h.Wg)(y,{tip:_.ml.Reacji})&&N&&e((0,m.iR)({event:{type:p.jo.REACJI,current_notification:N}}))});f.meta={name:"handleReactionClick",key:"createThunkHandleReactionClick",description:"handle click on reaction in reaction bar"}},0xd897374a:(e,t,a)=>{"use strict";a.d(t,{A:()=>getReactionGroups});var n=a(0x424ce7f7),r=a(0xf4930165),i=a(0x178533105),l=a(0xe0376d2),o=a(0x5359476e),s=a(0x1e2051844);function getReactionGroups({reactions:e}={}){if(!e)return null;let t=(0,n.A)(e,e=>e?.baseName),a=(0,r.A)(t,(e,t)=>({name:t,count:(0,i.A)(e,(e,t)=>e+t.count,0),users:(0,l.A)((0,o.A)(e,e=>e.users)),tooltip:(0,s.A)(e,e=>!!e.tooltip)?.tooltip,reactions:e}));return(0,l.A)(e.map(e=>e?.baseName)).map(e=>a[e])}},0x2e37ba27:(e,t,a)=>{"use strict";a.d(t,{A:()=>j});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x125763ad),d=a(0x839ba347),m=a(0x1f022ebd9),u=a(0x12edaa96a),p=a(0xb1ea448c),h=a(0x147939a6),_=a(0x230670247),f=a(0x238b287cf),b=a(0xf5bbd10a),g=a(0xa12b0a9a),y=a(0x3711e82d),A=a(0x1ccef1c6f),x=a(0x226892387);let E=new s.Ay("slack_kit_video"),C=(0,n.forwardRef)(({src:e,vtt:t,videoPoster:a,title:r,label:l,autoPlay:o=!0,enableMediaCaptions:s,onLoadedMetadata:C,isLoading:k,setIsLoading:v,isPlaying:S,setIsPlaying:I,duration:w,setDuration:T,setElapsed:N,enableControls:M=!1,controlsList:R,shiftCaptionsUp:P,setHasError:L,videoContainerClassName:O},D)=>{let F=(0,b.A)(),U=(0,f.A)(),B=(0,n.useRef)(null),H=(0,g.d)(u.A),[W,V]=(0,n.useState)(!1),G=(0,n.useRef)(),q=(0,n.useRef)(0),[j,z]=(0,n.useState)(null),K=(0,x.d4)(e=>(0,A.ty)(e,"media_muted")),$=(0,x.d4)(e=>(0,A.ty)(e,"media_volume"))??1,Y=(0,x.d4)(e=>(0,A.ty)(e,"media_playback_speed")),Q=(0,n.useRef)({});(0,n.useEffect)(()=>{!B.current||j&&(Q.current={file_src:j,media_type:"video",duration_ms:1e3*w,playback_session:H,title:r})},[H,j,r,w]),(0,n.useEffect)(()=>{fetch(e).then(e=>e.blob()).then(e=>{z(URL.createObjectURL(e))}).catch(e=>{F.error(`Video player err: ${e}`),L(!0)})},[F,L,z,e]);let Z=(0,n.useRef)(!1),J=(0,n.useCallback)(()=>{!Z.current&&W&&(G.current&&(q.current+=Date.now()-G.current,G.current=void 0),U.track(y.EventId.SK_VIDEO_PLAYER,(0,c.A)({},Q.current,{contexts:{ui_context:{action:"impression",ui_properties:{element_type:"video",element_name:"playback_finished"}}},closed_captions:s?"on":"off",playback_speed:`${Y??1}x`,duration_watched_ms:q.current})),Z.current=!0,q.current=0)},[U,W,s,Y]),X=(0,n.useRef)(J);X.current=J,(0,m.A)(()=>()=>X.current(),[]);let ee=(0,n.useCallback)(()=>{J()},[J]);(0,n.useEffect)(()=>{if(!B.current)return;let onWaiting=()=>{S&&I(!1),v(!0)},onPlay=()=>{v(!1),I(!0),U.track(y.EventId.SK_VIDEO_PLAYER,(0,c.A)({},Q.current,{contexts:{ui_context:{action:"click",ui_properties:{element_type:"button",element_name:"play"}}}})),W||(V(!0),U.track(y.EventId.SK_VIDEO_PLAYER,(0,c.A)({},Q.current,{contexts:{ui_context:{action:"impression",ui_properties:{element_name:"media"}}}}))),G.current=Date.now()},onPause=()=>{I(!1),v(!1),U.track(y.EventId.MEDIA_PLAYER,(0,c.A)({},Q.current,{contexts:{ui_context:{action:"click",ui_properties:{element_type:"button",element_name:"pause"}}}})),G.current&&(q.current+=Date.now()-G.current,G.current=void 0)},e=B.current,onProgress=()=>{e.buffered&&T(e.duration||0)},onTimeUpdate=()=>{v(!1),T(e.duration),N(e.currentTime)},handleRateChange=()=>{let t=e.playbackRate;_.Cv.includes(t)&&(e.playbackRate=t)};return e.addEventListener("waiting",onWaiting),e.addEventListener("progress",onProgress),e.addEventListener("timeupdate",onTimeUpdate),e.addEventListener("play",onPlay),e.addEventListener("playing",onPlay),e.addEventListener("pause",onPause),e.addEventListener("ratechange",handleRateChange),e.addEventListener("ended",ee),()=>{e.addEventListener("waiting",onWaiting),e.removeEventListener("progress",onProgress),e.removeEventListener("timeupdate",onTimeUpdate),e.removeEventListener("play",onPlay),e.removeEventListener("playing",onPlay),e.removeEventListener("pause",onPause),e.removeEventListener("ratechange",handleRateChange),e.removeEventListener("ended",ee)}},[B,k,S,T,v,N,I,W,V,ee,U]),(0,n.useEffect)(()=>{let e=B.current?.textTracks[0];e&&(e.mode=s?"showing":"hidden")},[s]),(0,n.useEffect)(()=>{if(s){let e=B.current?.textTracks[0];if(!e)return;let t=B.current?.clientWidth<500?50:80;e.mode="hidden",P?(0,d.A)(e?.cues,e=>{(e.text.match(/\n/g)||[]).length>=2||e.text.length>t?e.line=-6:e.line=-5}):(0,d.A)(e?.cues,e=>{e.line="auto"}),e.mode="showing"}},[s,P]);let et=(0,n.useCallback)((e,t=!0)=>{B?.current&&(B.current.currentTime=e,t&&B.current.play())},[B]),ea=(0,n.useCallback)(()=>{B?.current&&(B.current.paused?B.current.play():B.current.pause())},[B]),en=(0,n.useCallback)(()=>{B?.current&&B.current?.pause()},[B]),er=(0,n.useCallback)(e=>{B?.current&&(B.current.muted=e)},[B]),ei=(0,n.useCallback)(e=>{B?.current&&(B.current.volume=e)},[B]),el=(0,n.useCallback)(e=>{!B?.current||_.Cv.includes(e)&&(B.current.playbackRate=e)},[B]);(0,n.useImperativeHandle)(D,()=>({setCurrentTime:et,togglePlayPause:ea,setMuted:er,setVolume:ei,setPlaybackRate:el,pause:en})),(0,n.useEffect)(()=>{K&&er(K),$&&ei($),Y&&!M&&el(Y)});let eo=(0,n.useCallback)(()=>{let e=B.current?.error;e&&(L(!0),F.error(`error code: ${e.code}, msg: ${e.message}`))},[B,F,L]),es=(0,n.useCallback)(()=>{v(!1)},[v]),ec=i()("c-video_player-video-container",O);return n.createElement("div",{className:ec,"data-media-focus-container":!0,tabIndex:-1},k&&n.createElement("div",{className:"c-video_player-video-container_spinner"},n.createElement(p.A,{color:"white"})),n.createElement("video",{preload:"auto",autoPlay:o,"aria-label":l,className:"c-video_player-video",controls:!!M&&!k||void 0,controlsList:M?R:void 0,title:r,ref:B,poster:a,disablePictureInPicture:!0,onLoadedMetadata:C,onCanPlay:es,onError:eo},j&&n.createElement("source",{src:j,type:"video/mp4"}),E.t("Your browser does not support the video tag"),t&&n.createElement(h.A,{vtt:t,enableMediaCaptions:s})))});var k=a(0x17e16c48b),v=a(0x15e48057c),S=a(0x11a296110),I=a(0x2501a2cee),w=a(0x16cf1da63),T=a(0xa6f3163b),N=a(0xe7ed96ac),M=a(0x4c96e5d9),R=a(0xe1300f34),P=a(0x12f41fc32);let L=new s.Ay("video_player"),VideoCaptionsButton=({vtt:e,isInlinePlayer:t,className:a,backgroundStyle:r})=>{let l=(0,w.wA)(),o=(0,x.d4)(e=>(0,A.ty)(e,"enable_media_captions")),s=(0,x.d4)(R.y0),c=(0,n.useCallback)(()=>{l((0,P.AZ)({pref:"enable_media_captions",value:!o}))},[l,o]),d=o&&e?L.t("Turn off captions"):L.t("Turn on captions"),m=L.t("Display captions"),u=(0,n.useMemo)(()=>({name:o?"closed-caption-filled":"closed-caption"}),[o]);return s?n.createElement(M.Ay,{tip:d,position:"top",delay:M.n1,hideFromScreenReader:!0},t?n.createElement(T.A,{className:i()("c-video_controls_overlay__controls__button c-video_controls_overlay__controls__caption"),"aria-label":m,"aria-pressed":o,onClick:c},n.createElement(I.Ah,{name:u.name,size:"inherit"})):n.createElement(N.A,{"aria-label":m,"aria-pressed":o,svgIconProps:u,onClick:c,size:"medium",className:a,backgroundStyle:r})):null};VideoCaptionsButton.displayName="VideoCaptionsButton";var O=a(0x137d8e1fe),D=a(0x15b9e2997);let F=new s.Ay("video_scrubber"),VideoControlsScrubber=({elapsed:e,duration:t,setTime:a})=>{let r=(0,n.useRef)(null);(0,n.useEffect)(()=>{r.current?.toggleAttribute("data-no-drag-on-mouse-move",!0)},[r]);let i=(0,n.useCallback)(e=>n.createElement("div",{className:"c-video_player_controls_scrubber c-video_player_controls_overlay__hover",ref:r,...e}),[]),l=(0,n.useCallback)(e=>n.createElement("div",{className:"c-video_player_controls_scrubber__track",...e}),[]),o=(0,n.useCallback)(e=>n.createElement("div",{className:"c-video_player_controls_scrubber__elapsed",...e}),[]);return n.createElement(D.A,{value:e,max:t,onChange:a,renderContainer:i,renderTrack:l,renderInner:o,"aria-label":F.t("Time scrubber",{currentTime:(0,O.A)(e),totalTime:(0,O.A)(t),fallbackHash:"638b3954642581b284074f5e0f0f6dd701690df1",fallbackHashNs:"stories_av"}),"aria-valuetext":(0,O.A)(e)})};VideoControlsScrubber.displayName="VideoControlsScrubber";var U=a(0x7fbb7bb1),B=a(0x201c48a95),H=a(0x147cd508f),W=a(0x9c77718),V=a(0xf2309c3);let G=new s.Ay("slack_kit_video"),VideoOverlay=({onClickOverlay:e,showControls:t=!0,duration:a,elapsed:r,setTime:o,isPlaying:s,isLoading:c,videoRef:d,vtt:m,setShiftCaptionsUp:u=l.A,onFullscreenButtonClicked:h,isFullScreen:_})=>{let f=(0,n.useContext)(v.A),[b,g]=(0,n.useState)(!1),[y,A]=(0,n.useState)(!1),x=(0,n.useRef)(null),E=(0,n.useRef)(null),C=s?G.t("Pause"):G.t("Play"),w=(0,n.useCallback)(e=>{let t=e.target;A(!!(f&&(x.current?.contains(t)||E.current?.contains(t))))},[f]),T=(0,n.useCallback)(e=>{let t=e.relatedTarget;A(!!(f&&(x.current?.contains(t)||E.current?.contains(t))))},[f]),{mouseIsOverElement:N,onMouseLeave:M,onMouseEnter:R,onMouseMove:P,onMouseOver:L}=(0,V.A)(),O=(0,n.useCallback)(()=>{R()},[R]);(0,n.useEffect)(()=>{u(N)},[N,u]);let D=r?(0,k.A)(1e3*r):a?(0,k.A)(1e3*a):G.t("Video"),F=c?n.createElement(p.A,{size:"medium",color:"white",className:"c-video_player_controls_overlay__controls__spinner",noMargin:!0}):n.createElement(I.Ah,{name:s?"pause-filled":"play-filled",inline:!0});return t?n.createElement(U.A,null,({measureRef:t,width:l})=>{let c=l||360;return n.createElement("div",{className:i()("c-video_player_controls_overlay","c-video_player_controls_overlay--controls",{"c-video_player_controls_overlay--active":y,"p-video_player_controls_overlay--vertical_volume_active":b}),onFocus:w,onBlur:T,onMouseEnter:O,onMouseLeave:M,onMouseMove:P,onMouseOver:L,"data-prevent-fade":"true",role:"group",ref:t},n.createElement(S.Nm,{className:"c-video_player_controls_overlay__button",onClick:e,tabIndex:-1,"aria-hidden":"true"}),n.createElement("div",{className:"c-video_player_controls_overlay__controls_container",ref:x},n.createElement(VideoControlsScrubber,{elapsed:r,duration:a,setTime:o}),n.createElement("div",{className:"c-video_player_controls_overlay--controls"},n.createElement(S.Nm,{className:i()("c-video_player_controls_overlay__controls__pill",{"c-video_player_controls_overlay__controls__pill--playing":s}),"aria-label":C,"aria-pressed":s,onClick:e},F,n.createElement("div",{className:"c-video_player_controls_overlay__time"},D)),n.createElement(W.A,{className:"c-video_player_media_volume_slider",isInlinePlayer:!0,useVerticalVolume:!!(c&&c<=330),setIsVerticalVolumeActive:g,videoRef:d}),n.createElement("div",{className:"c-video_player_controls--right-controls"},n.createElement(H.A,{isInlinePlayer:!0,videoRef:d}),m&&n.createElement(VideoCaptionsButton,{vtt:m,isInlinePlayer:!0})))),n.createElement("div",{className:"c-video_player_controls_overlay__corner c-video_controls_overlay__hover",ref:E},!_&&h&&n.createElement(B.A,{classPrefix:"c-video_player",onClick:h})))}):null};VideoOverlay.displayName="VideoOverlay";let q=new s.Ay("slack_kit_video"),VideoPlayer=({className:e,styleProps:t,title:a,label:r,src:s,vtt:c,enableMediaCaptions:d=!1,autoPlay:m,videoPoster:u,enableControls:p=!1,controlsList:h,bubbleErrorOrLoadingStateToParent:_=l.A,videoContainerClassName:f})=>{let b=(0,n.useRef)(null),[g,E]=(0,n.useState)(!1),[k,v]=(0,n.useState)(!1),[S,I]=(0,n.useState)(!0),[w,T]=(0,n.useState)(0),[N,M]=(0,n.useState)(0),[R,P]=(0,n.useState)(!1),L=(0,x.d4)(e=>(0,A.ty)(e,"enable_media_captions"))||d;(0,n.useEffect)(()=>{_&&_({hasError:k,isLoading:S})},[k,S,_]);let O=(0,n.useCallback)(e=>{b?.current?b.current?.setCurrentTime(e,!1):T(e)},[b,T]),D=(0,n.useCallback)((e,t)=>{t&&M(t)},[]),F=(0,n.useCallback)(e=>{e.stopPropagation(),b.current?.togglePlayPause()},[b]);return n.createElement(o.A,{clogImpression:!0,eventId:y.EventId.SK_VIDEO_PLAYER},n.createElement("div",{className:i()("c-video_player",e),style:t},n.createElement(C,{title:a,label:r,src:s,vtt:c,ref:b,autoPlay:m,videoPoster:u,enableControls:p,controlsList:h,setIsLoading:I,isLoading:S,isPlaying:g,setIsPlaying:E,duration:N,setDuration:M,setElapsed:T,onLoadedMetadata:D,enableMediaCaptions:L,shiftCaptionsUp:R,setHasError:v,videoContainerClassName:f}),k&&n.createElement("div",{className:"c-video_player__error_overlay"},n.createElement("p",null,q.t("Error loading video. Please try again later."))),n.createElement(VideoOverlay,{onClickOverlay:F,elapsed:w,duration:N,showControls:!p,setTime:O,isPlaying:g,isLoading:S,videoRef:b,vtt:c,setShiftCaptionsUp:P,onFullscreenButtonClicked:l.A,isFullScreen:!1})))};VideoPlayer.displayName="VideoPlayer";let j=n.memo(VideoPlayer)},0x19dc73101:(e,t,a)=>{"use strict";a.d(t,{$:()=>o,h:()=>l});var n=a(0xa7ec93c2),r=a(0xf006b40c),i=a(0x271494e0);let l=(0,i.A)(n.yW),o=(0,i.A)((0,r.A)(n.yW))},0x226d2c646:(e,t,a)=>{"use strict";a.d(t,{A:()=>o,u:()=>l});var n=a(0x1d1911997),r=a(0xf006b40c),i=a(0x271494e0);let l=(0,i.A)(n.JJ),o=(0,i.A)((0,r.A)(n.JJ))},0x271494e0:(e,t,a)=>{"use strict";a.d(t,{A:()=>withSearcher});var n=a(0xbad225b5),r=a(0x162afc153),i=a(0x1cbdfeceb),l=a(0x7d48dd65),o=a(0x1595bdd0),s=a(0x20ef3966f),c=a(0x2286acf6c),d=a(0x9e671ad),m=a(0x21f3c49e8),u=a(0x237b6a339),p=a(0xe0376d2),h=a(0x839ba347),_=a(0x1e2051844),f=a(0x103edac79),b=a(0x8eb6366c),g=a(0x244f35bf8),y=a(0xe874a88a),A=a(0xf8dd7f80),x=a(0x20482ad21),E=a(0x1e864b930),C=a(0x2264e6ea3),k=a(0x1a256ff50),v=a(0x9f7220f0),S=a(0x17ea0fa2c),I=a(0x1834c7b6b),w=a(0xf78ca02),T=a(0x144c78e7);function sortTokens(e){return[...e.filter(e=>!e.isError&&!e.isUnknown),...e.filter(e=>!e.isError&&e.isUnknown),...e.filter(e=>e.isError)]}var N=a(0x1ed767a16),M=a(0x45012309),R=a(0x4f725d55),P=a(0xd2fa49d0),L=a(0x15c6cd54f),O=a(0x1c91944c9),D=a(0x9b971e7e),F=a(0x24cd37000);let U=(0,A.getGenericLogger)(),B=new x.Ay("form_inputs");function withSearcher(e){let t=class extends n.Component{searchPromise;updateAriaTextThrottled=(0,r.A)(this.updateAriaText,3e4);lastShownSearchDetails=null;inputRef=null;_isMounted=!1;static defaultProps={isRequired:!0,selectedOptions:void 0,selectedOption:void 0,inputRef:void 0,isExpanded:!1,isDisabled:!1,isInvalid:!1,focusOnMount:!1,searchOnPaste:!1,expandOnFocus:void 0,expandOnClick:void 0,searchBatchSize:1,debounceWaitPeriod:50,onFilterQueryPaste:i.A,onInputFocused:i.A,onSearch:i.A,onSearchError:i.A,onSearchResolved:i.A,onOptionsListClose:i.A,splitPastedQuery:w.I,processOptions:e=>y.S.resolve(e),processSelectedOptions:void 0,showConfirmDialog:void 0,restrictedSelectedTokenIndexes:[],disabledSelectedTokenIndexes:[],invalidSelectedTokenIndexes:[],useBulkSearch:!1,shouldRefocusInputAfterSelection:void 0};constructor(e){super(e),this.searchPromise=null,this.setSelectState=this.setSelectState.bind(this),this.onOptionsListClose=this.onOptionsListClose.bind(this),this.onFilterQueryPaste=this.onFilterQueryPaste.bind(this),this.onTokenSelect=this.onTokenSelect.bind(this),this.onInputFocused=this.onInputFocused.bind(this);const{selectedOptions:t,searchOnPaste:a}=e,r=(0,l.A)(t,e=>(0,T.iC)(e));let i=[];a&&(i=(0,o.A)((0,s.A)(r,e=>e.label&&e.queryId?{query:e.label,queryId:e.queryId,initial:!0}:null))),this.state={filterQuery:"",options:[],isExpanded:e.isExpanded??!1,selectId:e.selectId,selectedOptions:e.selectedOptions||[],selectedOption:e.selectedOption||null,isRequired:e.isRequired??!0,isLoading:!1,isDisabled:e.isDisabled??!1,isInvalid:e.isInvalid??!1,pendingQueries:i||[],loadInBackground:!1,ariaText:"",shouldRefocusInputAfterSelection:!!e.showConfirmDialog||!!e.shouldRefocusInputAfterSelection,pendingEscapeQueries:[],selectedTokenIndexes:[],restrictedSelectedTokenIndexes:e.restrictedSelectedTokenIndexes||[],disabledSelectedTokenIndexes:e.disabledSelectedTokenIndexes||[],invalidSelectedTokenIndexes:e.invalidSelectedTokenIndexes||[]},this.searchQuery=(0,c.A)(this.searchQuery,e.debounceWaitPeriod),this.lastShownSearchDetails=null,this.inputRef=e.inputRef||n.createRef(),this._isMounted=!0}componentDidMount(){this.props.focusOnMount&&this.setState(()=>({isLoading:!0})),this.searchQuery(this.state.filterQuery)}componentDidUpdate(e,t){let{isDisabled:a,isInvalid:n,selectedOptions:r,selectedOption:i,searchOnPaste:l,expandOnFocus:o,expandOnClick:s,restrictedSelectedTokenIndexes:c,disabledSelectedTokenIndexes:u,invalidSelectedTokenIndexes:p}=this.props,h={};e.isInvalid!==n&&(h.isInvalid=n),e.isDisabled!==a&&(h.isDisabled=a),(0,d.A)(e.selectedOptions,r)||(h.selectedOptions=r),(0,d.A)(e.selectedOption,i)||(h.selectedOption=i),(e.expandOnFocus&&!o||e.expandOnClick&&!s)&&(h.isExpanded=!1),this.wasUnknownTokenResolved(this.state.selectedOptions,t.selectedOptions)&&(h.selectedTokenIndexes=[this.getNextUnknownTokenIndex()],this.inputRef?.current?.focus()),e.restrictedSelectedTokenIndexes!==c&&(h.restrictedSelectedTokenIndexes=c),e.disabledSelectedTokenIndexes!==u&&(h.disabledSelectedTokenIndexes=u),e.invalidSelectedTokenIndexes!==p&&(h.invalidSelectedTokenIndexes=p);let{isLoading:_,pendingQueries:f,selectedOptions:b,pendingEscapeQueries:g,filterQuery:y}=this.state;if(l&&!_)if((0,m.A)(f)){if(t.isLoading){if(this.updateDisabled(!1),g.length>0&&""===y){let e=(0,E.A)(g.map(e=>e.query),{noConj:!0}).join(""),t=g[0],{options:a}=t,getUpdatedOptions=t=>t.map(t=>{let{query:a,options:n,...r}=t,i=n?{options:getUpdatedOptions(n)}:{};return{...r,...i,query:e}}),n={...t,options:getUpdatedOptions(a),query:e};h.pendingEscapeQueries=[],h.options=n.options,h.filterQuery=e,h.isExpanded=!0,h.isLoading=!1}if(b.length){let e=b.filter(e=>e.isError||e.isUnknown).length,t=e?B.t("Loading complete. There {count, plural, =1 {is # unknown entry} other {are # unknown entries}}.",{count:e}):B.t("Loading complete.");this.updateAriaTextThrottled.cancel&&this.updateAriaTextThrottled.cancel(),this.updateAriaTextThrottled(t)}}}else h.isLoading=!0,h.loadInBackground=!0,this.searchQueryObjects(f);(0,m.A)(h)||this.setSelectState(()=>h)}componentWillUnmount(){this.updateAriaTextThrottled.cancel(),this.searchPromise&&this.searchPromise.cancel&&this.searchPromise.cancel(),this._isMounted=!1}async onFilterQueryPaste(e){let{searchOnPaste:t,searcherOptions:a}=this.props,n=this.props.splitPastedQuery,r=this.props.onFilterQueryPaste,i=this.props.processOptions;if(!t||!e.clipboardData)return;e.preventDefault();let l=e.clipboardData.getData("text/plain")?"text/plain":"Text",o=(0,N.i_)(e),s=n(o.text.trimEnd(),{...a,fromMetadata:o.text!==e.clipboardData.getData(l)});r(s);let c=[],d=[];await y.S.all(s.map(e=>{let t=this.getQueryId();return(0,R.A)(e)||(0,P.A)(e)||(0,C.Ay)(e)?i([{key:t,pasted:!0,fromMetadata:!0,value:e,label:o.members?o.members[e]:e}]).then(e=>(e[0]&&d.push(e[0]),y.S.resolve())):(c.push({query:e,queryId:t,pasted:!0}),d.push({label:e,queryId:t,isLoading:!0,key:t,pasted:!0}),y.S.resolve())})),this.setSelectState(e=>({pendingQueries:e.pendingQueries.concat(c),selectedOptions:e.selectedOptions.concat(d),filterQuery:""})),this.updateDisabled(!(0,m.A)(c)),this.updateAriaTextThrottled.cancel&&this.updateAriaTextThrottled.cancel()}onInputFocused(){this.props.onInputFocused(),this.props.expandOnClick||this.shouldExpandOnFocus()||this.setState(()=>({isExpanded:!1,options:[]}))}onOptionsListClose(e){let{isLoading:t,isExpanded:a,filterQuery:n}=this.state;!t&&a&&n.length>0&&this.clogSearcherResults(),this.props.onOptionsListClose(e)}async onTokenSelect(e){let{expandOnClick:t}=this.props,a=this.props.processOptions;if(!(t||this.shouldExpandOnFocus())){if(e&&!e.isUnknown)this.setState(()=>({isExpanded:!1,options:[]}));else if(e){let t=await a(e.resultOptions.map(e=>({...e,fromUnknown:!0})),e.label);this.lastShownSearchDetails=e.searcher,this.setState(()=>({isExpanded:!0,options:t}))}}}getQueryId(){return(0,u.A)("query__")}async setSelectState(e,t){let{processSelectedOptions:a}=this.props,n=e(this.state),{selectedOption:r,selectedOptions:i,shouldRefocusInputAfterSelection:l}=this.state;l&&(n.shouldRefocusInputAfterSelection=!0),void 0!==n.filterQuery&&n.filterQuery!==this.state.filterQuery&&(n.isLoading=!0,n.loadInBackground=!1,this.searchQuery(n.filterQuery));let{searchOnPaste:s}=this.props;if(s&&n.selectedOptions){let e=n.selectedOptions.map(({key:e})=>e),t=(0,p.A)((0,o.A)(e.filter(t=>e.indexOf(t)!==e.lastIndexOf(t))));(0,h.A)(t,e=>{let t=(0,_.A)(n.selectedOptions,({key:t,isUnknown:a})=>t===e&&!a),a=(0,o.A)(n.selectedOptions.map(a=>a.key===e?a.isUnknown?t:null:a));n.selectedOptions=a})}if(void 0!==n.selectedOptions&&!(0,d.A)(n.selectedOptions,i)){let e=n.selectedOptions.filter(({isLoading:e,isUnknown:t})=>!e&&!t),[t]=(0,f.A)(e,i,"value");t&&this.clogSearcherResults(t)}void 0!==n.selectedOption&&null!==n.selectedOption&&n.selectedOption?.value!==r?.value&&this.clogSearcherResults(n.selectedOption);let c=!!n.removalInitiator;if(n.selectedOptions&&!c&&a){if(void 0!==(n=(0,b.A)(n)).isLoading){let e=n.isLoading;this.setState(()=>({isLoading:e})),delete n.isLoading}n.selectedOptions=await a(n.selectedOptions)}this.setState(e=>({...e,...n}),t)}getNextUnknownTokenIndex(){return this.state.selectedOptions.findIndex(e=>e.isUnknown&&e.queryId)}wasUnknownTokenResolved(e,t){return e.filter(e=>e.isUnknown).length<t.filter(e=>e.isUnknown).length}shouldExpandOnFocus(){let{expandOnFocus:e}=this.props,{selectedOptions:t}=this.state,a=(0,I.A)(t);return e&&!a}clogSearcherResults(e){if(null===this.lastShownSearchDetails)return;let{clogger:t,selectId:a,teamId:n}=this.props,{query:r,results:i}=this.lastShownSearchDetails,l={source:a,query:r,results:i};e?(l.selectedItemId=e.value,(0,L.A)({teamId:n,key:a}).clogSearcherAccept({clogger:t,data:l})):(0,L.A)({teamId:n,key:a}).clogSearcherReject({clogger:t,data:l})}processSearchResults(e){let{searchOnPaste:t,searcherOptions:a}=this.props,n=this.props.onSearchResolved,{escapeHatchEnabled:r,escapeHatchKeys:i}=a,l=this.state.selectedOptions.slice(0);t&&e.forEach(({queryId:e,options:t,searcher:a})=>{let o=l.findIndex(t=>t.queryId===e),s=l[o],c=null;if(s){let e;if(this.lastShownSearchDetails=a,1===t.length)e=t[0],r&&a&&a.results&&0===a.results.length&&a.pasted&&i&&i[e.key]&&this.setState(t=>({pendingEscapeQueries:[...t.pendingEscapeQueries,{query:a.query,options:[e]}]})),this.clogSearcherResults(e);else if(t.length){let{isMCGInvitationAllowedTeam:a}=this.props;t.find(e=>e.entity?.is_ultra_restricted===!0)&&a||(e={isUnknown:!0})}else e={isError:!0},this.clogSearcherResults();c={...s,...e,resultOptions:t,searcher:a,isLoading:!1},l[o]=c}n({result:t,selectedOption:c})}),this.setState(t=>{if((0,k.Ay)(t.selectedOptions,l,2)){let{options:a,searcher:n}=e[0];return this.lastShownSearchDetails=n,t.loadInBackground?null:{...t,options:a}}return{...t,selectedOptions:sortTokens(l)}})}runBatchedSearch(e){let t=e.slice(0,this.props.searchBatchSize);if(e.length>1&&this.props.useBulkSearch){let e=t.some(e=>!!e.pasted),a=t.some(e=>!!e.initial);return this.runSingleSearch({query:t,pasted:e,initial:a})}let a=t.map(({query:e,queryId:t,pasted:a,initial:n})=>this.runSingleSearch({query:e,queryId:t,pasted:a,initial:n}));return y.S.all(a)}runSingleSearch({query:e,queryId:t,pasted:a,initial:n}){let r,{searcherOptions:i,selectId:l,teamId:o,useBulkSearch:s}=this.props,c=this.props.onSearch,d=this.props.onSearchError,m=this.props.processOptions,u=[],p="",h=!1,f=t||this.getQueryId(),b=new Map;return((0,g.A)(e)&&s?(u=e.map(e=>(b.set(e.queryId,e.query),{query:(0,w.t)(e.query,i),queryId:e.queryId})),h=!0):p=(0,w.t)(e,i),p&&!1===c(e))?y.S.resolve(m([],p)).then(e=>({queryId:f,options:e,searcher:this.lastShownSearchDetails})):(r=!a||h?(0,L.A)({teamId:o,key:n?f:l}).search({query:h?u:p,options:{...i,sort:{source:l,...i.sort},returnMetadata:!0}}):this.props.search({query:h?u:p,options:{...i,sort:{source:l,...i.sort},returnMetadata:!0}}),y.S.resolve(r).then(async t=>{this.lastShownSearchDetails={query:h?u:p,results:t};let n=(t||[]).map((t,a)=>({key:h?t.queryId:`${f}_${a}`,value:t.item.id,label:t.name||t.item?.name||(h?b.get(t.queryId):e),entity:t.item,matchData:t.subqueryScoresByMember})),{selectedOption:r}=this.state;return""===p&&r&&((0,_.A)(n,["value",r.value])||n.unshift(r)),{queryId:f,options:await m(n,e,{pasted:a}),searcher:{...this.lastShownSearchDetails,pasted:a}}}).catch(e=>{U.error(`Error when searching for select id: ${l}, error: ${e}`),d(e);let t=[];return{queryId:f,options:t,searcher:{query:h?u:p,results:t,pasted:a,isError:!0}}}))}searchQuery(e){this._isMounted&&this.searchQueryObjects([{query:e}])}searchQueryObjects(e){if((0,m.A)(e))return;if(this.searchPromise&&this.searchPromise.cancel&&this.searchPromise.cancel(),!this.props.searchOnPaste){let{query:t,queryId:a}=e[0];this.searchPromise=this.runSingleSearch({query:t,queryId:a}).then(({options:e})=>{this.setSelectState(()=>({options:e})),this.setState(()=>({isLoading:!1}))});return}this.searchPromise=this.runBatchedSearch(e).then(e=>{let t=e;this.props.useBulkSearch&&(t=this.generateBulkSearchResultsArray(t)),this.processSearchResults(t);let a=t.map(({queryId:e})=>e);this.setState(e=>({pendingQueries:e.pendingQueries.filter(({queryId:e})=>!a.includes(e)),isLoading:!1}))});let t=B.t("Loading {count, plural, =1 {# more entry} other {# more entries}}",{count:e.length});this.updateAriaTextThrottled(t)}updateAriaText(e){this.setState(t=>t.ariaText===e?null:{ariaText:e})}updateDisabled(e){this.setState(t=>t.isDisabled===e?null:{isDisabled:e})}generateBulkSearchResultsArray(e){if(!e?.options?.length)return e.splice(0);let{options:t,searcher:a}=e,{pasted:n,query:r,results:i}=a;return r.map(e=>({options:t.filter(t=>t.key===e.queryId),queryId:e.queryId,searcher:{pasted:n,query:e.query,results:i.filter(t=>t.queryId===e.queryId)}}))}render(){return n.createElement(n.Fragment,null,n.createElement(e,{...this.props,expandOnFocus:this.shouldExpandOnFocus(),inputRef:this.inputRef,selectState:this.state,setSelectState:this.setSelectState,onOptionsListClose:this.onOptionsListClose,onFilterQueryPaste:this.onFilterQueryPaste,onTokenSelect:this.onTokenSelect,onInputFocused:this.onInputFocused,isLoading:this.state.isLoading}),n.createElement(v.A,{message:this.state.ariaText}))}};return t.displayName="SearcherSelectWrapper",(0,O.N)(e=>({clogger:(0,M.eo)({state:e}),teamId:(0,D.JY)(e),isMCGInvitationAllowedTeam:(0,F.ke)(e)}),e=>({search:(...t)=>e((0,S.$P)(...t))}))(t)}withSearcher.displayName="withSearcher"},0x1f8893105:(e,t,a)=>{"use strict";a.d(t,{Ac:()=>isTableauWorkObjectLiveVisualizationPreviewEnabled,Ay:()=>isTableauUnfurlsEnabled,EU:()=>isTableauWorkObjectLiveDashboardPreviewEnabled,Wy:()=>isTableauWorkobjectGaEnabled,d1:()=>isTableauSdkWithLoEnabled,nB:()=>isTableauUnfurlsEmbedCachingEnabled,uw:()=>isTableauWorkobjectEntityIdSwitchOverEnabled});var n=a(0x14149c126);function isTableauUnfurlsEnabled(e){return"on"===(0,n._Z)(e,"tableau_unfurls")}function isTableauUnfurlsEmbedCachingEnabled(e){return"on"===(0,n._Z)(e,"tableau_unfurls_embed_caching")}function isTableauSdkWithLoEnabled(e){return"on"===(0,n._Z)(e,"tableau_sdk_with_lo")}function isTableauWorkObjectLiveDashboardPreviewEnabled(e){return"on"===(0,n._Z)(e,"tableau_workobject_live_dashboard_preview")}function isTableauWorkObjectLiveVisualizationPreviewEnabled(e){return"on"===(0,n._Z)(e,"tableau_workobject_live_visualization_preview")}function isTableauWorkobjectGaEnabled(e){return"on"===(0,n._Z)(e,"tableau_workobject_ga")}function isTableauWorkobjectEntityIdSwitchOverEnabled(e){return"on"===(0,n._Z)(e,"tableau_workobject_entity_id_switch_over")}},0x22f598cda:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x18dac2b8e),l=a(0x102edf836),o=a(0xb1ea448c),s=a(0x1b89a091f),c=a(0x1f8893105),d=a(0xa1832ae4),m=a(0x226892387),u=a(0x1e8a588f),p=a(0x41a5c610),h=a(0x11c82607b),_=a(0x1cb85d28a),f=a(0xf5fd3bc8);let b=(0,h.Ay)("Fetch Tableau embed token for the provided URL if needed (using canvases.getEmbedToken)",async(e,t,a)=>{let n=(e=>{try{return new URL(e)}catch{return null}})(a.url);if(!n)return;let r=(0,f.gv)(n),i=t();if(r in i.canvasEmbeds[f.zy.TABLEAU]){var l;let e;if(l=i.canvasEmbeds[f.zy.TABLEAU][r].auth,e=Date.now()/1e3,void 0===l.expiration||!(e>l.expiration))return}e((0,_.UX)({key:r,status:f.jD.LOADING}));try{let t=await e((0,p.k)({url:a.url,reason:"maybe-fetch-tableau-embed-token-for-url"}));if(t.ok)e((0,_.UX)({key:r,status:f.jD.SUCCESS,token:t.token,expiration:t.expiration}));else{let t=Date.now()/1e3+10;e((0,_.UX)({key:r,status:f.jD.ERROR,expiration:t}))}}catch(i){let t=f.jD.ERROR,a=i?.data;a&&"auth_required"===a.error&&(t=f.jD.AUTHREQUIRED);let n=Date.now()/1e3+10;e((0,_.UX)({key:r,status:t,expiration:n}))}});b.meta={name:"maybeFetchTableauEmbedTokenForUrl",key:"createThunkMaybeFetchTableauEmbedTokenForUrl",description:"Fetch Tableau embed token for the provided URL if needed (using canvases.getEmbedToken)"};var g=a(0x1a7c0453a),y=a(0x1ee439e69);let TableauContainer=e=>{let{url:t,height:a,width:p}=e,h=(0,m.d4)(c.Ay),_=new URL(t),A=(0,m.d4)(y.fu),x=(0,d.Zl)(A),E="tableaueinstein",C=(0,r.wA)();C(b({url:t}));let k=(0,m.d4)(e=>(0,u.c)(e,_)),v=(0,n.useCallback)(async()=>{let e=(0,i.KV)()?"A07M6BDFSFQ":"A0170NQMAH0",a=t.startsWith("https://sdb44com.test13.")?"tableaueinstein-sdb44com-test13":"tableaueinstein";await C((0,g.x)({appId:e,providerKey:a,reason:"tableau-container/login"}))},[C,t]),S=(0,n.useMemo)(()=>{if(!h)return n.createElement(s.Ay,null);if(k){if(k.auth.status===f.jD.LOADING)return n.createElement(o.A,null);if(k.auth.status===f.jD.AUTHREQUIRED)return n.createElement("div",{className:"p-tableau_container__authrequired","data-qa":"tableau_login_required"},n.createElement("p",null,"You are required to login once to Tableau before this embed can render."),n.createElement("p",null,"Note that reloading the canvas is needed once auth is completed, as we have not yet built autoreloading the credentials on login success."),n.createElement(l.Ay,{type:"primary",onClick:v},"Login to Tableau"));if(k.auth.status===f.jD.SUCCESS)return n.createElement("iframe",{src:((e,t,a,n="")=>`${t}iframe_embed?url=${encodeURIComponent(e)}&type=${a}&token=${n}`)(t,x,E,k.auth.token),width:p,height:a,title:"Tableau","data-qa":"tableau-viz",sandbox:"allow-scripts allow-same-origin",className:"p-tableau_container"})}return n.createElement(s.Ay,null)},[h,k,a,p,t,E,v,x]);return n.createElement("div",null,S)};TableauContainer.displayName="TableauContainer";let A=n.memo(TableauContainer)},0x5e152d00:(e,t,a)=>{"use strict";a.d(t,{G:()=>getTableauObjectTypeLabel});var n=a(0x20482ad21),r=a(0x207eb3801);let i=new n.Ay("tableau");function getTableauObjectTypeLabel(e,t){let a=getTableauObjectType(e,t);return"dashboard"===a?i.t("dashboard"):"visualization"===a?i.t("visualization"):i.t("metric")}function getTableauObjectType(e,t=""){return(0,r.Tc)(e)||(0,r.MH)(t)?"dashboard":(0,r.bw)(e)||(0,r.Cw)(t)?"visualization":"metric"}},0x3eee9173:(e,t,a)=>{"use strict";a.d(t,{Y:()=>L});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x14fad6485),s=a(0x1407c6c2c),c=a(0x18dac2b8e),d=a(0x20482ad21),m=a(0x1b89a091f),u=a(0x1f8893105),p=a(0x7105f110),h=a(0x267d8753),_=a(0x238b287cf),f=a(0x207eb3801),b=a(0x1c5116e43);let g={componentVisibility:{comparison:!0,title:!1,value:!0,insights:!0,chart:!0}},y=class{clogger;embed;props;embedType;clogProperties;eventListeners={};constructor(e,t,a,n){this.clogger=e,this.embed=t,this.props=a,this.embedType=n,this.clogProperties={embed_type:this.embedType,id_or_api_name:this.props.idOrApiName,org_url:this.props.orgUrl}}removeEventListeners(){Object.entries(this.eventListeners).forEach(([e,t])=>{this.embed.removeEventListener(e,t)})}clogError(e,t){this.clogger.track(e,{...this.clogProperties,...t})}clogEvent(e){this.clogger.track(e,{...this.clogProperties})}onComponentLoaded(e){this.eventListeners[p.Ur.COMPONENT_LOADED]=e,this.embed.addEventListener(p.Ur.COMPONENT_LOADED,e)}onError(e){this.eventListeners[p.Ur.ERROR]=e,this.embed.addEventListener(p.Ur.ERROR,e)}refresh(){return this.embed.reload?.()??Promise.resolve()}render(){return this.embed.render?.()??Promise.resolve()}};y.displayName="TableauAnalyticsEmbedEntity";var A=a(0x1052ca4f9),x=a(0x177c6bf9e),E=a(0xc4307c22),C=a(0x4d9b2df9),k=a(0x3711e82d),v=a(0x226892387),S=a(0x3be1c4f9),I=a(0xa4086de4),w=a(0x66ca2077),T=a(0x19895585a),N=a(0x105ceccf1),M=a.n(N);let R=(0,c.Cu)()?3e4:1e4,P=new d.Ay("tableau"),L=n.memo((0,n.forwardRef)(({salesforceOrgId:e,tableau:t,submetricId:a,url:i,source:c,onEmbedComplete:d,loaderComponent:N,errorComponent:L,analyticType:O},D)=>{let F,U,B,H,W,V,G=(0,v.d4)(u.Wy),q=(0,r.wA)(),j=!t,z=(0,n.useRef)(null),K=(0,s.A)(),$=(0,n.useRef)(null),Y=(0,s.A)(),Q=(0,n.useRef)(null),Z=(0,s.A)(),[J,X]=(0,n.useState)("loading"),ee=(0,v.d4)(t=>(0,I.o0)(t,{orgId:e??""})),et=(0,n.useCallback)(e=>{X(e.state),d?.({...e,salesforceOrgUrl:ee?.salesforceUrl})},[d,ee?.salesforceUrl,X]),ea=(0,n.useRef)(!1),{windowRef:en}=(0,o.ox)(),er=(0,n.useMemo)(()=>en.deref()?.name??T.N2,[en]),ei=(0,n.useRef)(void 0),{createEmbed:el,createMetricEmbed:eo,createDashboardEmbed:es}=(F=(0,h.to)(),U=(0,h.rG)(),B=(0,h.Hs)(),H=(0,_.A)(),W=(0,n.useCallback)(e=>{let t=new F({...e,isSubmetric:!0,layout:g,range:(e=>{let t=e.split("&").at(-1)?.split("=")[1]??"";if(t)try{return{...JSON.parse(atob(decodeURIComponent(t))),fieldName:""}}catch{}return{fieldName:"",operator:p.tl.LastNDays,values:[30]}})(e.analyticLink)});return t.borderRadius=e.source!==b.tL.FileViewer?"0":"12px",new y(H,t,e,"metric")},[F,H]),V=(0,n.useCallback)(e=>new y(H,new B({...e,hideHeader:!0}),e,"dashboard"),[B,H]),{createEmbed:(0,n.useCallback)((e,t)=>{let a=null;if((0,f.Ry)(e)?a=W(t):(0,f.Tc)(e)?a=new y(H,new B({...t,hideHeader:!0}),t,"dashboard"):(0,f.bw)(e)&&(a=new y(H,new U(t),t,"visualization")),!a)throw Error("Failed to create embed entity");return a},[B,U,H,W]),createMetricEmbed:W,createDashboardEmbed:V}),ec=(0,n.useCallback)(()=>{ei.current&&(en.deref()?.clearTimeout(ei.current),ei.current=void 0)},[en]),ed=(0,v.d4)(t=>e?(0,I.GP)(t,{windowId:er}):void 0),em=(0,n.useRef)(null);(0,n.useImperativeHandle)(D,()=>({refresh:()=>{let e=em.current;return e?.refresh?new Promise((t,a)=>{e.onComponentLoaded(()=>{e.removeEventListeners(),t(),X(x.xn.SUCCESS)}),e.onError(t=>{e.removeEventListeners(),a(t.detail?.originalError||Error("Reload failed")),X(x.xn.FAIL)}),e.refresh()}):Promise.resolve()}}));let eu=(0,n.useCallback)(e=>{"metric"===e&&z.current?z.current.innerHTML="":"dashboard"===e&&$.current?$.current.innerHTML="":"visualization"===e&&Q.current&&(Q.current.innerHTML="")},[z,$,Q]),ep=(0,n.useCallback)(()=>{let e;if(!t&&(!j||!a))return;let n=K;j&&"dashboard"===O?n=Y:(0,f.bw)(t)?n=Z:(0,f.Tc)(t)&&(n=Y);let r={analyticLink:i,idOrApiName:a||t?.submetric_id||t?.name||"",orgUrl:ee?.salesforceUrl||"",parentIdOrElement:n,source:c??void 0};return eu((e=t&&!j?el(t,r):"dashboard"===O?es(r):eo(r)).embedType),ec(),e.clogEvent(k.EventId.TABLEAU_SDK_INIT),e.onComponentLoaded(()=>{et({state:x.xn.SUCCESS}),ec(),e.clogEvent(k.EventId.TABLEAU_SDK_LOAD_SUCCESS)}),e.onError(t=>{ec();let a=t.detail?.originalError;a?.type==="INVALID_SESSION"&&ee?(et({state:x.xn.SESSION_CLOSED}),q((0,S.eS)({orgConfigs:[{...ee,status:w.n.SESSION_CLOSED}]})),e.clogError(k.EventId.TABLEAU_SDK_SESSION_CLOSED,{sdkError:a})):(et({state:x.xn.FAIL}),e.clogError(k.EventId.TABLEAU_SDK_LOAD_ERROR,{sdkError:a?.message}))}),e.render(),ei.current=en.deref()?.setTimeout(()=>{"loading"===J&&(et({state:x.xn.FAIL}),e.clogError(k.EventId.TABLEAU_SDK_TIMEOUT,{timeout:R}),eu(e.embedType))},R),em.current=e,()=>{ec(),e?.removeEventListeners()}},[O,ec,eu,es,el,eo,q,Y,K,Z,J,et,j,ee,c,a,t,i,en]);if((0,n.useEffect)(()=>{let e=!ea.current||ee?.status===w.n.AUTH_REDIRECT;G&&ee?.status&&e&&(ed===w.n.SDK_INITIALIZED&&ee.status===w.n.SDK_INITIALIZED?(ea.current=!0,ep()):ee.status===w.n.AUTH_REDIRECT?(ea.current=!0,et({state:x.xn.AUTH_REDIRECT,redirectUrl:ee.redirectUrl})):ed===w.n.SESSION_CLOSED?(ea.current=!0,et({state:x.xn.SESSION_CLOSED})):ed===w.n.SDK_ERROR&&(ea.current=!0,et({state:(e=>{switch(e){case w.n.AUTH_REQUIRED:return x.xn.AUTH_REQUIRED;case w.n.SESSION_CLOSED:return x.xn.SESSION_CLOSED;case w.n.TABLEAU_SETUP_REQUIRED:return x.xn.TABLEAU_SETUP_REQUIRED;default:return x.xn.FAIL}})(ee.status)})))}),j){let t=J===x.xn.FAIL||J===x.xn.SESSION_CLOSED||J===x.xn.AUTH_REQUIRED;return c===b.Xv.Canvas?n.createElement("div",null,"loading"===J&&n.createElement("div",{className:M().loadingContainer},n.createElement("div",{className:M().tableauEmbedLoader,"data-qa":"tableau-embed-loader"})),t&&n.createElement("div",{className:M().tableauEmbedContainerError},n.createElement(A.i,{link:i,salesforceOrgId:e||""})),!t&&n.createElement("div",{ref:z,id:K,"data-qa":"tableau-live-embed-metric-container",className:M().tableauEmbedContainer})):"dashboard"===O?n.createElement(n.Fragment,null,"loading"===J&&N,t&&L,n.createElement("div",{ref:$,id:Y,"data-qa":"tableau-live-embed-dashboard-container",className:l()(M().liveDashboardOrVisualization,{[M().hidden]:J!==x.xn.SUCCESS})})):n.createElement(n.Fragment,null,"loading"===J&&N,t&&L,n.createElement("div",{ref:z,id:K,"data-qa":"tableau-live-embed-metric-container",className:l()(M().analyticsMetricContainer,{[M().hidden]:J!==x.xn.SUCCESS})}))}return n.createElement(n.Fragment,null,!G&&n.createElement(m.Ay,null),G&&n.createElement("div",{className:l()(M().tableauEmbedContainer,{[M().isFullSizePreview]:c===b.tL.FileViewer,[M().liveDashboardOrVisualization]:(0,f.bw)(t)||(0,f.Tc)(t)})},"loading"===J&&c!==b.tL.FileViewer&&n.createElement("div",{className:M().loadingContainer},n.createElement("div",{className:M().tableauEmbedLoader,"data-qa":"tableau-embed-loader"})),"loading"===J&&c===b.tL.FileViewer&&n.createElement(E.N,{forceLightMode:!0,primaryText:P.t("Loading preview\u2026"),renderType:C.P.LOADER}),(0,f.bw)(t)&&n.createElement("div",{ref:Q,id:Z,"data-qa":"tableau-live-embed-visualization-container",className:M().liveDashboardOrVisualization}),(0,f.Ry)(t)&&n.createElement("div",{ref:z,id:K,"data-qa":"tableau-live-embed-metric-container",className:l()(M().tableauEmbed,{[M().rendered]:J===x.UN.SUCCESS})}),(0,f.Tc)(t)&&n.createElement("div",{ref:$,id:Y,"data-qa":"tableau-live-embed-dashboard-container",className:M().liveDashboardOrVisualization})))}))},0x24453110d:(e,t,a)=>{"use strict";a.d(t,{l:()=>I});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x14fad6485),s=a(0x20b4dda68),c=a(0x20482ad21),d=a(0x32d3ef3d),m=a(0xb59b1927),u=a(0x3be5855c),p=a(0x1f8893105),h=a(0x3eee9173),_=a(0x1052ca4f9),f=a(0x177c6bf9e),b=a(0xbed542d2),g=a(0x226892387),y=a(0x14ea3ce99),A=a(0x3be1c4f9),x=a(0xa4086de4),E=a(0x66ca2077),C=a(0x1c5116e43),k=a(0x1f8a63054),v=a.n(k);let S=new c.Ay("tableau"),I=n.memo(({tableauSubtype:e,tableau:t,link:a,fileContainerType:i=s.zk.FILE_MESSAGE_ACTION,showInsight:c=!0,isLive:k=!1,isLoading:I,status:w,salesforceOrgName:T,salesforceOrgId:N,source:M,onEmbedComplete:R,embedRef:P})=>{let L=(0,r.wA)(),{windowRef:O}=(0,o.ox)(),D=(0,g.d4)(p.EU),F=(0,g.d4)(p.Ac),U=(0,g.d4)(p.Wy),B=e===f.Go.SUBMETRIC,H=e===f.Go.DASHBOARD,W=e===f.Go.VISUALIZATION,V=U&&k&&(B||D&&H||F&&W),G=t?.preview_img_file_id||"",q=(0,g.d4)(e=>(0,y.Lp)(e,G)),j=!V&&B,z=(0,g.d4)(e=>(0,x.o0)(e,{orgId:N??""})),[K,$]=(0,n.useState)(null),Y=[E.n.AUTH_CONTINUE,E.n.SDK_INITIALIZING],Q=d.w.enabled;I&&!t||Y.includes(z?.status)?Q=d.w.loading:(!w||w===f.UN.SUCCESS)&&(t||I)||(Q=d.w.error);let Z=(0,n.useCallback)(e=>{e.state!==f.xn.SUCCESS?$(e):$(null),R?.(e.state)},[R,$]),J=(0,n.useCallback)(()=>{N&&(L((0,A.Cw)({orgId:N,redirectUrl:void 0,status:E.n.AUTH_CONTINUE})),$(null))},[L,N]),X=(0,n.useCallback)((e,t,a)=>{let n,handleAuthRedirectComplete=e=>{"lo.loaded"===e.data.type&&n&&(O.deref()?.removeEventListener("message",handleAuthRedirectComplete),n.close(),n=null,J())};return e&&((n=O.deref()?.open(e,"_blank","popup,width=500,height=750"))?O.deref()?.addEventListener("message",handleAuthRedirectComplete):$({state:f.UN.MANUAL_AUTH_REDIRECT,salesforceOrgUrl:a,redirectUrl:t})),()=>{O.deref()?.removeEventListener("message",handleAuthRedirectComplete)}},[J,O]),ee=S.t("Tableau metric preview");H?ee=S.t("Tableau dashboard preview"):W&&(ee=S.t("Tableau visualization preview",{ns:"tableau"}));let et=(0,n.useCallback)(()=>t?.file_contents&&t?.file_type?n.createElement("img",{alt:ee,src:`data:image/${t?.file_type};base64,${t?.file_contents}`,className:v().previewImg,"data-qa":"static-preview"}):n.createElement(u.A,{file:q,fileContainerType:i,shouldUseFileAspectRatio:!0,useFullSizeImage:!0,className:l()(v().fileCardPreview,{[v().allowHiddenVerticalOverflow]:H})}),[q,i,ee,H,t?.file_contents,t?.file_type]),ea=(0,n.useCallback)(()=>V?n.createElement(h.Y,{salesforceOrgId:N,tableau:t,url:a,source:M,onEmbedComplete:Z,ref:P}):et(),[P,Z,a,et,N,M,t,V]),en=(0,n.useMemo)(()=>{if(!t?.sentiment||!t?.change)return t?.change;let e=t.change.indexOf("%")+1;return n.createElement(n.Fragment,null,n.createElement("span",{className:v()[`${t.sentiment}Sentiment`],"data-qa":"metric-change-percent"},t.change.substring(0,e)," "),t.change.substring(e))},[t]),{metricBadge:er,metricGoalStatus:ei}=(0,n.useMemo)(()=>{if(!(0,b.Sm)(t))return{metricBadge:void 0,metricGoalStatus:void 0};let{metricBadge:e,metricGoalStatus:a}=t;return{metricBadge:e?n.createElement("span",{className:v().tableauMetricBadge,style:{backgroundColor:e.backgroundColor,color:e.color}},e.label):void 0,metricGoalStatus:a}},[t]);return K||Q!==d.w.enabled&&Q!==d.w.loading?n.createElement(m.A,{centerContents:!V,entityState:Q,isFullHeight:!0,isFullWidth:!0,noPadding:!0,noTopBorder:M===C.tL.FileViewer},(Q===d.w.error||K)&&n.createElement(_.i,{link:a,source:M,tableau:t,status:w,embedFailureDetails:K,salesforceOrgName:T,salesforceOrgId:N||"",onAuthRedirectAction:X,onAuthRedirectResolution:J})):n.createElement("div",{className:l()(v().tableauContainer,{[v().staticContainer]:!V,[v().isStaticMetric]:j,[v().loadedStaticEmbed]:!k&&Q===d.w.enabled})},!K&&j&&t?.value&&n.createElement("div",{className:v().tableauMetricInfo},n.createElement("div",{className:v().tableauMetricValueBadgeContainer},n.createElement("div",{className:v().tableauMetricValue},t?.value),n.createElement("div",null,er)),n.createElement("div",{className:v().tableauUnfurlText},t.subtitle),n.createElement("div",{className:v().tableauUnfurlText},ei??en)),!K&&ea(),!K&&j&&t?.insight&&c&&n.createElement("div",{className:v().insightsContainer},t?.insight))})},0xa3d98ffc:(e,t,a)=>{"use strict";a.d(t,{h:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x32d3ef3d),l=a(0xfa28400d),o=a(0xf8cb949e),s=a(0x177c6bf9e),c=a(0x24e61ced2),d=a.n(c);let m=new r.Ay("tableau"),u=n.memo(({tableau:e,isLoading:t,status:a})=>{let r=i.w.enabled;return t?r=i.w.loading:(!e||a&&a!==s.UN.SUCCESS)&&(r=i.w.error),n.createElement("div",{className:d().tableauCompactEntity},n.createElement(l.Ay,{size:i.S.compact,entityState:r,isRemovable:!1,customMinWidth:260,isFullWidth:!0},n.createElement(o.H,{tableau:e,entityState:r,subtitle:m.t("Preview includes applied filters.")})))})},0x1052ca4f9:(e,t,a)=>{"use strict";a.d(t,{i:()=>TableauEntityError});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x14cbd83d1),l=a(0x120c268ad),o=a.n(l),s=a(0x62a17882),c=a(0x20482ad21),d=a(0x102edf836),m=a(0x1faa3f1ac),u=a(0xec8d5140),p=a(0x1f8893105),h=a(0x177c6bf9e),_=a(0x207eb3801),f=a(0x1ed767a16),b=a(0x226892387),g=a(0x330e5328),y=a(0x1c5116e43),A=a(0x1ece179fb),x=a.n(A);let E=new c.Ay("tableau"),TableauEntityError=({link:e,tableau:t,embedFailureDetails:a,status:l,salesforceOrgName:c,salesforceOrgId:A,source:C,onAuthRedirectAction:k,onAuthRedirectResolution:v})=>{let S,I,w=(0,r.wA)(),T=(0,b.d4)(p.Wy),{redirectUrl:N,salesforceOrgUrl:M}=a??{},R=((0,s.y3)()?M:N)??"",P=a?.state??l,L=(0,n.useCallback)(async()=>{await w((0,g.m)({salesforceOrgId:A}))},[w,A]),O=(0,n.useCallback)(e=>{e.stopPropagation(),P===h.UN.AUTH_REDIRECT?N&&k?.(R,N,M??""):P===h.UN.MANUAL_AUTH_REDIRECT&&v?.()},[R,P,k,v,N,M]),D=(0,n.useCallback)(()=>{(0,f.x3)(R),w((0,u.M)())},[R,w]),F=C===y.tL.FileViewer,U=E.t("Tableau logo"),B="object";t?.subtype===h.Go.SUBMETRIC||(0,_.e3)(e)?B="metric":t?.subtype===h.Go.DASHBOARD||(0,_.MH)(e)?B="dashboard":(t?.subtype===h.Go.VISUALIZATION||(0,_.Cw)(e))&&(B="visualization");let H=E.t("Set up multifactor authentication"),W=E.t("Update your password"),V=E.t("Something\u2019s missing"),G=E.t("Something went wrong"),q=E.t("Something went wrong when sharing this {tableauType}.",{tableauType:B});switch(P){case h.UN.ACCESS_DENIED:G=E.t("Hmm\u2026something isn\u2019t right"),q=E.t("You don\u2019t have access to view this {tableauType}. Your Tableau Next admin can help with that.",{tableauType:B});break;case h.UN.AUTH_REDIRECT:F&&(N&&h.Fi.test(N)?(G=H,q=c?E.t("That looks like a Tableau Next link to {salesforceOrgName}. To view this {tableauType} in Slack, you need to set up multifactor authentication (MFA). Do you want to use MFA?",{salesforceOrgName:c,tableauType:B}):E.t("That looks like a Tableau Next link. To view this {tableauType} in Slack, you need to set up multifactor authentication (MFA). Do you want to use MFA?",{tableauType:B}),S=E.t("Set up MFA"),I=E.rt("If you already set up MFA, <a>click here</a>.",{},({key:e,text:t})=>n.createElement(m.A,{onClick:v,key:e},t))):N&&h.El.test(N)?(G=W,q=c?E.t("That looks like a Tableau Next link to {salesforceOrgName}. To view this {tableauType} in Slack, you need to update your Tableau Next password. Would you like to update your Tableau Next password?",{salesforceOrgName:c,tableauType:B}):E.t("That looks like a Tableau Next link. To view this {tableauType} in Slack, you need to update your Tableau Next password. Would you like to update your Tableau Next password?",{tableauType:B}),S=E.t("Update Password"),I=E.rt("If you already updated your password, <a>click here</a>.",{},({key:e,text:t})=>n.createElement(m.A,{onClick:v,key:e},t))):(G=V,q=c?E.t("That looks like a Tableau Next link to {salesforceOrgName}. To view this {tableauType} in Slack, you need to configure your Tableau user. Would you like to open Tableau Next?",{salesforceOrgName:c,tableauType:B}):E.t("That looks like a Tableau Next link. To view this {tableauType} in Slack, you need to configure your Tableau user. Would you like to open Tableau Next?",{tableauType:B}),S=E.t("Open Tableau Next"),I=E.rt("If you already configured your user, <a>click here</a>.",{},({key:e,text:t})=>n.createElement(m.A,{onClick:v,key:e},t))));break;case h.UN.MANUAL_AUTH_REDIRECT:F&&(S=E.t("Yes, Let\u2019s Go"),I=E.rt("You can also open <a>this link</a> in your browser.",{},({key:e,text:t})=>n.createElement(m.A,{onClick:D,key:e},t)),N&&h.Fi.test(N)?(G=H,q=c?E.t("That looks like a Tableau Next link to {salesforceOrgName}. To view this {tableauType} in Slack, you need to set up multifactor authentication (MFA). Have you set up MFA?",{salesforceOrgName:c,tableauType:B}):E.t("That looks like a Tableau Next link. To view this {tableauType} in Slack, you need to set up multifactor authentication (MFA). Have you set up MFA?",{tableauType:B})):N&&h.El.test(N)?(G=W,q=c?E.t("That looks like a Tableau Next link to {salesforceOrgName}. To view this {tableauType} in Slack, you need to update your Tableau Next password. Have you updated your Tableau Next password?",{salesforceOrgName:c,tableauType:B}):E.t("That looks like a Tableau Next link. To view this {tableauType} in Slack, you need to update your Tableau Next password. Have you updated your Tableau Next password?",{tableauType:B})):(G=V,q=c?E.t("That looks like a Tableau Next link to {salesforceOrgName}. To view this {tableauType} in Slack, you need to configure your Tableau Next user and then reload this page. Have you configured your Tableau Next user?",{salesforceOrgName:c,tableauType:B}):E.t("That looks like a Tableau Next link. To view this {tableauType} in Slack, you need to configure your Tableau Next user and then reload this page. Have you configured your Tableau Next user?",{tableauType:B}),S=E.t("Yes, Reload")));break;case h.UN.AUTH_REQUIRED:G=E.t("Connect to Tableau Next"),q=E.t("{authLinkDescription} To view this {tableauType} in Slack, you need to connect your Slack account to Tableau Next. Would you like to connect to Tableau Next?",{tableauType:B,authLinkDescription:c?E.t("That looks like a Tableau Next link to {orgName}.",{orgName:c}):E.t("That looks like a Tableau Next link.")});break;case h.UN.SETUP_REQUIRED:G=E.t("Salesforce is not connected"),q=E.t("Because Salesforce isn\u2019t connected to this Slack workspace, the {tableauType} card is not visible to others. Your Slack admin can help with that.",{tableauType:B});break;case h.UN.NOT_FOUND:G=E.t("{tableauType} unavailable",{tableauType:B}),q=E.t("This {tableauType} was moved or deleted.",{tableauType:B});break;case h.UN.SESSION_CLOSED:G=E.t("Tableau Next session closed"),q=E.t("Live embeds cannot be displayed as your Tableau Next session has been closed.");break;case h.UN.IP_RESTRICTED:G=E.t("Something\u2019s missing"),q=T?E.t("Logins from this IP range can\u2019t perform certain actions. Your Salesforce admin can help with that."):"Logins from this IP range can\u2019t perform certain actions. Your Salesforce admin can help with that.";break;case h.UN.TABLEAU_SETUP_REQUIRED:G=T?E.t("You\u2019re almost there"):"You\u2019re almost there",q=T?E.t("A Salesforce admin needs to connect Tableau Next and Slack for you to interact with live data in Slack."):"A Salesforce admin needs to connect Tableau Next and Slack for you to interact with live data in Slack.";break;default:F&&(G=E.t("This Tableau {tableauType} cannot be previewed.",{tableauType:B}),q=E.t("We couldn\u2019t preview this {tableauType}. Try opening it in Tableau Next.",{tableauType:B}))}return n.createElement("div",{className:o()(x().errorContainer,F?x().previewErrorContainer:void 0)},F&&n.createElement("img",{className:x().tableauIcon,alt:U,src:i}),n.createElement("div",{className:x().errorTitle},G),n.createElement("div",{className:x().errorDescription},q),P===h.UN.AUTH_REQUIRED&&n.createElement(d.Ay,{type:"primary",onClick:L},E.t("Connect to Tableau Next")),(P===h.UN.AUTH_REDIRECT||P===h.UN.MANUAL_AUTH_REDIRECT)&&n.createElement(d.Ay,{type:"primary",onClick:O},S),F&&P===h.UN.FAIL&&e&&n.createElement(d.Ay,{type:"primary",href:e},E.t("Open in Tableau Next")),I&&n.createElement("div",{className:x().errorSubtitle},I))};TableauEntityError.displayName="TableauEntityError"},0xf8cb949e:(e,t,a)=>{"use strict";a.d(t,{H:()=>b});var n=a(0xbad225b5),r=a(0x14cbd83d1),i=a(0xf27817c9),l=a(0x13776886e),o=a(0x20482ad21),s=a(0x32d3ef3d),c=a(0x9798b7f),d=a(0x7729d35b),m=a(0x2501a2cee),u=a(0x5e152d00),p=a(0x6960d8b9),h=a(0x21b6d97ec),_=a.n(h);let f=new o.Ay("tableau"),b=n.memo(({entityState:e=s.w.enabled,isInteractive:t=!1,link:a,previewOnClick:o=!0,showTimestamp:h=!1,subtitle:b,tableau:g})=>{let{isHovered:y}=(0,i.r)(),A=(e=>{if(e)return(0,p.cK)(e)?(0,l.A)(e,"{time}"):(0,l.A)(e,"{date_short_pretty}")})(g?.timestamp),x=(0,u.G)(g,a),E=g?.title??f.t("Tableau {tableauType}",{tableauType:x}),C=f.t("Preview in Slack",{fallbackHash:"e405d5134442d75748efac434f2b7d484da26cd9",fallbackHashNs:"work-objects"}),k=f.t("Open in Tableau",{fallbackHash:"bb6c94857decc014ea9f3db87d87170318c1adb8"}),v=f.t("Tableau"),S=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,o?C:k," ",n.createElement(m.Ah,{inline:!0,name:o?"caret-right":"new-window"})),[k,C,o]);return n.createElement("div",{className:_().headerContainer,"data-qa":"tableau-entity-header"},n.createElement(d.A,{entityState:e,suppressDefaultColors:!0},n.createElement("div",{className:`${_().tableauThumbnail} display_flex`},n.createElement("img",{alt:f.t("Tableau logo"),src:r}))),n.createElement(c.A,{entityState:e,primaryLabel:E,primaryTruncateLines:1,secondaryLabel:b??(t&&y?S:v),secondaryTruncateLines:1,size:s.S.expanded}),h&&n.createElement("div",{className:_().timestampContainer},A))})},0xc8be17d1:(e,t,a)=>{"use strict";a.d(t,{q:()=>X});var n=a(0xbad225b5),r=a(0x32d3ef3d),i=a(0xa3d98ffc),l=a(0x16cf1da63),o=a(0x120c268ad),s=a.n(o),c=a(0x14fad6485),d=a(0x40c0d834),m=a(0xbe0b63ff),u=a(0x20b4dda68),p=a(0x20482ad21),h=a(0x11a296110),_=a(0x22b8621cf),f=a(0x11c86845f),b=a(0x2501a2cee),g=a(0x4c96e5d9),y=a(0x139aa1a7),A=a(0x217a7a62d),x=a(0x131d9874e),E=a(0xec8d5140),C=a(0x1f8893105),k=a(0x5e152d00);let v={onClick:{enableClogAction:!0},elementName:"copy_link"},S={onClick:{enableClogAction:!0},elementName:"external_link"},I={onClick:{enableClogAction:!0},elementName:"open_work_object_details"},w={onClick:{enableClogAction:!0},elementName:"share"},T={onClick:{enableClogAction:!0},elementName:"ask_agentforce"};var N=a(0x9cfa8498),M=a(0x177c6bf9e),R=a(0xbed542d2),P=a(0x1a02c72b5),L=a(0xd6a16321),O=a(0x8b05b5ea),D=a(0x226892387),F=a(0x1c2a1a838),U=a(0xb02fc1da),B=a(0x238c0d7af),H=a(0xd843ab47),W=a(0x207eb3801),V=a(0x1ed767a16),G=a(0x3711e82d),q=a(0x1f8a63054),j=a.n(q),z=a(0x17588a0d),K=a.n(z);let $=new p.Ay("tableau"),Y={name:"share-message",size:"16"},Q={name:"agentforce",size:"16"},Z={name:"copy",size:"16"},J=n.memo(({tableauObjectId:e,entityRefId:t,link:a,tableau:r,fileContainerType:i=u.zk.FILE_MESSAGE_ACTION,showInsight:o=!0,isLive:p=!1,handleRefreshTableau:q,isLoading:z,entityKey:J,status:X,autoClogProps:ee,messageChannelId:et,messageTs:ea,canvasId:en,sectionId:er})=>{let ei=(0,l.wA)(),el=(0,D.d4)(C.Wy),eo=r?.sfdc_org_id||(0,R.CK)(e)?.salesforceOrgId,es=(0,R.CK)(e)?.tableauSubtype,ec=(0,D.d4)(e=>(0,A.hc)(e,eo,es)),{view:ed}=(0,n.useContext)(H.A),em=(0,D.d4)(t=>(0,F.kO)(t,(0,R.CK)(e)?.salesforceOrgId)),eu=(0,m.uz)(em)?em.name:void 0,ep=(0,n.useMemo)(()=>({clogImpression:!0,eventId:G.EventId.APP_WORK_OBJECT_UNFURL,uiComponentName:G.UiComponentName.TABLEAU_EXPANDED_ENTITY,workObjectType:"tableau",...ee}),[ee]),eh=(0,U.N)({tableau:r,link:a}),{openAgentInSplitView:e_}=(0,x.D)({agentUserId:ec,messageChannelId:et,messageTs:ea}),ef=ed?.viewType!==y.D.TableauDetails&&(!X||X===M.UN.SUCCESS),{viewTableauEntityDetails:eb}=(({canvasId:e,entityKey:t,entityRefId:a,isLive:r=!1,link:i,sectionId:o,showInsight:s,status:c,tableau:d,tableauObjectId:u})=>{let p=(0,l.wA)(),h=(0,D.d4)(C.Wy),_=(0,D.d4)(C.EU),f=(0,D.d4)(C.Ac),b=(0,R.CK)(u),g=d?.sfdc_org_id||b?.salesforceOrgId,y=(0,D.d4)(e=>b&&(0,F.kO)(e,b.salesforceOrgId)),A=(0,m.uz)(y)?y.name:void 0,x=b?.tableauSubtype;return{viewTableauEntityDetails:(0,n.useCallback)(n=>{let l={tableauObjectId:u,entityRefId:a,link:i,entityKey:t,canvasId:e,sectionId:o,showInsight:s,salesforceOrgName:A,salesforceOrgId:g,tableauSubtype:x,status:c,tab:n};h&&(x===M.Go.SUBMETRIC||x===M.Go.DASHBOARD&&_||x===M.Go.VISUALIZATION&&f)?p((0,O.A)({tableau:d,isLive:!0,...l})):x===M.Go.DASHBOARD||x===M.Go.VISUALIZATION?p((0,O.A)({tableau:d,isLive:!1,...l})):p((0,P.o)((0,L.gf)({tableauObjectId:u,entityRefId:a,link:i,tableauDetails:d,isLive:r,entityKey:t})))},[u,a,i,t,e,o,s,A,g,x,c,r,h,_,f,p,d])}})({canvasId:en,entityKey:J,entityRefId:t,isLive:p,link:a,showInsight:o,sectionId:er,status:X,tableau:r,tableauObjectId:e}),eg=(0,n.useCallback)(()=>{(0,V.x3)(a),ei((0,E.M)())},[a,ei]),ey=ed?.viewType!==y.D.TableauDetails?I:S,eA=(0,k.G)(r,a),ex=$.t("Explore in Tableau Next"),eE=$.t("Share {tableauType}",{tableauType:eA}),eC=$.t("Copy link to {tableauType}",{tableauType:eA}),ek=ef&&(!el||el&&!(0,W.Tc)(r)),{windowRef:ev}=(0,c.ox)(),eS=(0,n.useCallback)(()=>{ev.deref()?.open(a,"_blank","noreferrer,noopener")},[a,ev]),eI=(0,n.useCallback)(e=>{e.stopPropagation(),ek?eb():eS()},[eb,eS,ek]),ew=(0,n.useCallback)(()=>{eb()},[eb]),eT=n.createElement(f.A,null,ek?n.createElement(n.Fragment,null,n.createElement(g.Ay,{tip:ex,position:"top","aria-label":ex,delay:g.n1,hideFromScreenReader:!0},n.createElement(h.Ay,{"aria-label":ex,autoClogProps:S,className:s()(K().actionBarTextButton,j().actionBarTextButton),onClick:eS,size:"small",type:"outline"},n.createElement("span",{className:"padding_right_25"},n.createElement(b.Ah,{name:"new-window",size:"16"})),n.createElement("div",{className:j().actionBarTextButtonText},ex))),n.createElement("div",{className:s()(K().actionBarDivider,j().actionBarDivider)})):n.createElement(B.P,{handlePreview:ew,autoClogProps:I}),n.createElement(_.A,{tooltipLabel:eE,"aria-label":eE,onClick:eh,svgIconProps:Y,autoClogProps:w}),ec?n.createElement(_.A,{tooltipLabel:$.t("Ask Agentforce for Analytics"),"aria-label":$.t("Ask Agentforce for Analytics"),onClick:e_,svgIconProps:Q,autoClogProps:T}):null,n.createElement(_.A,{"aria-label":eC,autoClogProps:v,tooltipLabel:eC,onClick:eg,svgIconProps:Z}));return n.createElement(d.A,ep,n.createElement("div",{className:s()(j().tableauExpandedEntity,"p-tableau_expanded_entity",{[j().isLive]:p})},n.createElement(N.e,{fileContainerType:i,actionsBar:eT,onContainerClick:eI,containerAutoClogProps:ey,showInsight:o,tableauSubtype:es,tableau:r,link:a,isLive:p,isLoading:z,status:X,salesforceOrgName:eu,salesforceOrgId:eo,handleRefreshTableau:q,previewOnClick:ek})))}),X=n.memo(({size:e=r.S.expanded,...t})=>{switch(e){case r.S.expanded:return n.createElement(J,t);case r.S.compact:return n.createElement(i.h,t);default:return null}})},0x9cfa8498:(e,t,a)=>{"use strict";a.d(t,{e:()=>y});var n=a(0xbad225b5),r=a(0x20b4dda68),i=a(0x32d3ef3d),l=a(0xfa28400d),o=a(0x1f8893105),s=a(0x24453110d),c=a(0xf8cb949e),d=a(0x177c6bf9e),m=a(0xa3fb9039),u=a(0x226892387),p=a(0xe684f705),h=a(0x1c5116e43),_=a(0x105ceccf1),f=a.n(_),b=a(0x1f8a63054),g=a.n(b);let y=n.memo(({tableauSubtype:e,tableau:t,link:a,fileContainerType:_=r.zk.FILE_MESSAGE_ACTION,showInsight:b=!0,actionsBar:y,onContainerClick:A,handleRefreshTableau:x,isActionsBarMenuOpen:E,isLive:C=!1,isLoading:k,status:v,salesforceOrgName:S,salesforceOrgId:I,containerAutoClogProps:w,previewOnClick:T=!0})=>{let N=(0,u.d4)(o.Wy),[M,R]=(0,n.useState)(!1),[P,L]=(0,n.useState)(void 0),[O,D]=(0,n.useState)(void 0),F=t?.timestamp;F&&!P?L(F):F&&F!==P&&F!==O&&D(F);let U=(0,u.d4)(e=>t?.user_id&&"string"==typeof t.user_id?(0,p.nv)(e,t.user_id):void 0),B=i.w.enabled;k&&!t?B=i.w.loading:(!v||v===d.UN.SUCCESS)&&(t||k)||(B=i.w.error);let H=_===r.zk.FILE_EMBEDDED_UNFURL?"426px":"100%",W=(0,n.useCallback)(()=>{x&&(R(!0),x().then(()=>{R(!1)}))},[x]);return n.createElement(l.Ay,{actionsBar:k?void 0:y,entityState:B,onClick:A,isRemovable:!1,isActionsBarMenuOpen:E,size:i.S.expanded,withBorder:_!==r.zk.FILE_EMBEDDED_UNFURL,isFullWidth:!C,customWidth:C?426:480,customMaxWidth:H,shouldShrinkUnderDefaultWidth:C,isAutoHeight:!0,autoClogProps:w},n.createElement(c.H,{entityState:B,isInteractive:N,link:a,previewOnClick:N&&T,showTimestamp:!N,tableau:t}),M||B===i.w.loading?n.createElement("div",{className:f().tableauEmbedContainer},n.createElement("div",{className:f().loadingContainer},n.createElement("div",{className:f().tableauEmbedLoader}))):n.createElement(s.l,{tableauSubtype:e,tableau:t,link:a,fileContainerType:_,showInsight:b,isLive:C,isLoading:k,status:v,salesforceOrgName:S,salesforceOrgId:I,source:h.tL.Unfurl}),t&&N&&n.createElement("div",{className:g().embedFooter},n.createElement(m.b,{canRefresh:!!x,isInteractive:!0,isRefreshing:M,isTableauWO:!0,onRefresh:W,sourceMessageTs:P?.toString(),perspectiveUser:U,updatedAt:O})))})},0x192f25319:(e,t,a)=>{"use strict";a.d(t,{a:()=>TableauFlexpaneAdditionalButtons});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0xd6ba6894),c=a(0x40c0d834),d=a(0x20482ad21),m=a(0xa6f3163b),u=a(0x22b8621cf),p=a(0x99233ecb),h=a(0xb90d5858),_=a(0x2501a2cee),f=a(0x4c96e5d9),b=a(0x5e152d00),g=a(0xb02fc1da),y=a(0x15f443392),A=a(0x1ed767a16),x=a(0x3711e82d),E=a(0x6960d8b9),C=a(0x1fcbb004d),k=a(0x1c5116e43),v=a(0x2382c92e5),S=a.n(v);let I={name:"ellipsis-vertical-filled",size:"20"},w={name:"close",size:"20"},T=new d.Ay("work-objects"),N=new d.Ay("tableau"),TableauFlexpaneAdditionalButtons=({handleRefresh:e=o.A,link:t,tableau:a,isLoading:i=!1,shouldNudgeRefresh:d=!1,source:v,showRefresh:M=!0})=>{let R=(0,r.wA)(),P=(0,n.useCallback)(()=>R((0,C.O)()),[R]),L=(0,b.G)(a,t),O=a?.timestamp?T.rt("Synced {timeAgo} from {appName}",{appName:T.t("Tableau"),timeAgo:(0,E.YY)(a?.timestamp)}):"",D=T.rt("Data may be stale. Synced over {timeAgo} from {appName}",{appName:T.t("Tableau"),timeAgo:(0,E.YY)(a?.timestamp)}),F=T.t("Syncing with {appName}",{appName:T.t("Tableau")}),U=v===k.tL.FileViewer,B=(0,n.useMemo)(()=>i?F:d?D:O,[d,i,D,F,O]),H=(0,n.useMemo)(()=>n.createElement(f.Ay,{tip:B,position:"bottom",hideFromScreenReader:!0,delay:f.n1},n.createElement(m.A,{"aria-label":T.t("Refresh"),onClick:e,autoClogProps:y.lN,className:l()("c-icon_button","c-icon_button--size_medium","p-flexpane_header__control","c-icon_button--default",{[S().flexpaneRefreshIcon]:i,margin_right_150:i})},n.createElement("div",{className:"display_flex align_items_center gap_25"},n.createElement(_.Ah,{name:"refresh",size:"20",inline:!0}),i&&n.createElement("span",{className:l()(S().flexpaneSyncingLabel,"margin_right_100")},T.t("Syncing\u2026"))),d&&!i&&n.createElement("div",{"data-qa":"flexpane-refresh-badge",className:l()("c-icon_button__badge",S().flexpaneBadgeIcon)}))),[e,i,d,B]),getMenuIcon=({name:e})=>n.createElement(_.Ah,{name:e});getMenuIcon.displayName="getMenuIcon";let W=(0,n.useCallback)(()=>{(0,A.x3)(t)},[t]),V=(0,n.useMemo)(()=>n.createElement(h.A,{key:"copy",label:N.t("Copy link to {tableauType}",{tableauType:L}),onSelected:W,icon:getMenuIcon({name:"link"}),autoClogProps:y.tZ}),[W,L]),G=(0,g.N)({tableau:a,link:t}),q=(0,n.useMemo)(()=>n.createElement(h.A,{key:"share",label:T.t("Share {workObjectDisplayType}",{workObjectDisplayType:L}),onSelected:G,icon:getMenuIcon({name:"share-message"}),autoClogProps:y.tZ}),[G,L]),j=(0,n.useCallback)(e=>{t&&(e.stopPropagation(),s.J.open(t,"_blank"))},[t]),z=(0,n.useMemo)(()=>n.createElement(h.A,{key:"open",label:T.t("View in {appName}",{appName:N.t("Tableau")}),onSelected:j,icon:getMenuIcon({name:"link"}),autoClogProps:y.tZ}),[j]),K=(0,n.useCallback)(e=>n.createElement(c.A,{uiComponentName:x.UiComponentName.WORK_OBJECT_FLEXPANE_MENU},n.createElement(p.Ay,e,!U&&q,V,n.createElement(p.bX,null),z)),[V,U,z,q]);return n.createElement("div",{className:"flex_shrink_none display_flex align_items_center justify_content_center"},M&&H,n.createElement(u.A,{"aria-label":T.t("More actions"),isMenuTrigger:!0,onClick:o.A,renderMenu:K,svgIconProps:I,autoClogProps:y.C1}),U&&n.createElement(u.A,{"aria-label":T.t("Close"),onClick:P,svgIconProps:w}))};TableauFlexpaneAdditionalButtons.displayName="TableauFlexpaneAdditionalButtons"},0x10cf80636:(e,t,a)=>{"use strict";a.d(t,{y:()=>TableauFlexpaneLoading});var n=a(0xbad225b5),r=a(0x14cbd83d1),i=a(0x20482ad21),l=a(0xb1ea448c),o=a(0x22a286f97),s=a.n(o);let c=new i.Ay("tableau"),TableauFlexpaneLoading=()=>n.createElement("div",{className:"display_flex full_height align_items_center flex_direction_column justify_content_center gap_100"},n.createElement("img",{alt:c.t("Tableau logo"),src:r,className:s().appIcon}),n.createElement("div",{className:s().flexpaneLoadingTitle},c.t("Getting the latest from {appName}",{appName:c.t("Tableau")})),n.createElement("span",{className:s().flexpaneSpinnerWrapper},n.createElement(l.A,{size:"large",color:"blue"})))},0x228c98b4c:(e,t,a)=>{"use strict";a.d(t,{s:()=>TableauMessageDetails});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x14cbd83d1),l=a(0x40c0d834),o=a(0x20482ad21),s=a(0xf3b0bc58),c=a(0x1faa3f1ac),d=a(0x2501a2cee),m=a(0x24573b3ff),u=a(0x1f8893105),p=a(0x120c268ad),h=a.n(p),_=a(0x130d89881),f=a(0x20b4dda68),b=a(0x181214caa),g=a(0x3be5855c),y=a(0x217e2881),A=a(0x470fe2e6),x=a(0x15f4f83cf),E=a(0x1282104f7),C=a(0x3711e82d),k=a(0x226892387),v=a(0x14ea3ce99),S=a(0x1c5116e43),I=a(0x1f8a63054),w=a.n(I),T=a(0x22a286f97),N=a.n(T),M=a(0x17588a0d),R=a.n(M);let P=new o.Ay("search"),TableauDetailsBody=({children:e})=>n.createElement(l.A,{uiPage:C.UiPage.WORK_OBJECT_FLEXPANE_DETAILS},n.createElement("div",{className:"full_height full_width"},n.createElement(_.A,null,({width:t,height:a})=>n.createElement(b.A,{width:t,height:a},n.createElement("div",{className:N().detailsBody},e)))));TableauDetailsBody.displayName="TableauDetailsBody";let TableauEntityDetails=({salesforceOrg:e,source:t,tableau:a})=>{let r=a?.preview_img_file_id||"",i=(0,k.d4)(e=>(0,v.Lp)(e,r)),l=a?.subtype==="dashboard",o=a?.subtype==="visualization",s=P.t("Tableau metric preview");l?s=P.t("Tableau dashboard preview"):o&&(s=P.t("Tableau visualization preview",{ns:"tableau",fallbackHash:"9c5d4d8b73689af32cb59b2a06e1709b3908b2cd"}));let c=(0,n.useMemo)(()=>{if(!a?.sentiment||!a?.change)return a?.change;let e=a.change.indexOf("%")+1;return n.createElement(n.Fragment,null,n.createElement("span",{className:w()[`${a.sentiment}Sentiment`],"data-qa":"metric-change-percent"},a.change.substring(0,e)," "),a.change.substring(e))},[a]),d=(0,n.useMemo)(()=>a?l||o?[{key:"filtersApplied",label:P.t("Filters Applied"),value:a.subtitle??P.t("None")},{key:"createdDate",label:P.t("Created Date"),value:a?.createdDate?n.createElement(A.B,{value:a.createdDate}):P.t("None")},{key:"createdBy",label:P.t("Created By"),value:n.createElement(E.A,{entityId:a.createdBy?.id,label:a.createdBy?.label,size:"small",className:N().token})}]:[{key:"filtersApplied",label:P.t("Filters Applied"),value:a.subtitle??P.t("None")},{key:"value",label:P.t("Value"),value:a.value},{key:"change",label:P.t("Change"),value:c},{key:"insight",label:P.t("Insight"),value:a.insight},{key:"salesforceOrg",label:P.t("Salesforce Org"),value:(0,x.uz)(e)?e.name:""}]:[],[l,o,e,c,a]);return n.createElement(TableauDetailsBody,null,t!==S.tL.FileViewer&&n.createElement("div",{className:h()(R().contentItem,R().full),key:a?.submetric_id},n.createElement("span",{className:h()(R().contentItemLabel,R().full)},P.t("Preview")),n.createElement("span",{className:h()(N().preview,R().full)},!!a?.preview_img_file_id&&n.createElement(g.A,{file:i,fileContainerType:f.zk.FILE_EMBEDDED_UNFURL,shouldUseFileAspectRatio:!0,useFullSizeImage:!0,className:l||o?N().dashboardPreviewImg:N().previewImg}),!a?.preview_img_file_id&&n.createElement("img",{alt:s,src:`data:image/${a?.file_type};base64,${a?.file_contents}`,className:l||o?N().dashboardPreviewImg:N().previewImg,"data-qa":"static-preview"}))),d.map(e=>n.createElement("div",{className:h()(R().contentItem,R().full),key:e.key},n.createElement("span",{className:h()(R().contentItemLabel,R().full)},e.label),n.createElement("span",{className:h()(R().contentItemValue,R().full)},e.value))),a?.timestamp&&n.createElement("div",{className:h()(R().contentItem,R().full)},n.createElement("span",{className:h()(R().contentItemLabel,R().full)},P.t("Last Refreshed")),n.createElement("span",{className:h()(R().contentItemValue,R().full)},n.createElement(y.Y,{value:1e3*a.timestamp}))))};TableauEntityDetails.displayName="TableauEntityDetails";var L=a(0x1052ca4f9),O=a(0x10cf80636),D=a(0x177c6bf9e),F=a(0xbed542d2),U=a(0x15f443392),B=a(0xb7471cc3),H=a(0x2519dacdb),W=a(0x1a02c72b5),V=a(0xd6a16321),G=a(0x1c2a1a838),q=a(0x1631ca244),j=a.n(q);let z=new o.Ay("search"),TableauFlexpaneBody=({tableauObjectId:e,entityRefId:t,entityKey:a,entityStatus:o,tableau:p,link:h,title:_,tab:f=D.cv.Details,source:b,onOpenRelatedThread:g,onTabChange:y,isLoading:A,showDetailsTab:E=!0})=>{let v=(0,r.wA)(),I=(0,k.d4)(u.uw),w=(0,n.useMemo)(()=>{let e;if(!I||!p)return t;let a=p.sfdc_org_id;switch(p.subtype){case D.Go.SUBMETRIC:e=p.parent_metric_id;break;case D.Go.DASHBOARD:e=p.dashboard_id;break;case D.Go.VISUALIZATION:e=p.visualization_id;break;default:e=void 0}return a&&"string"==typeof e&&e?`S:${a}:${e}`:t},[I,p,t]),{isLoading:T,relatedThreadKeys:N}=(0,B.U)({entityId:w}),M=_||z.t("Tableau Metric"),R=(0,k.d4)(t=>(0,G.kO)(t,(0,F.CK)(e)?.salesforceOrgId)),P=(0,n.useCallback)(n=>{b===S.tL.FileViewer?y?.(n):v((0,W.o)({...(0,V.gf)({tableauObjectId:e,entityRefId:t||"",link:h,tableauDetails:p,entityKey:a,tab:Object.values(D.cv).find(e=>e===n)}),options:{navigateInPlace:!0}}))},[v,a,t,h,y,b,p,e]),q=(0,n.useMemo)(()=>{if(A)return n.createElement(O.y,null);if(o&&o!==D.UN.SUCCESS){let{id:e,name:t}=(0,x.uz)(R)?R:{};return n.createElement(L.i,{tableau:p,status:o,link:h,salesforceOrgName:t??"",salesforceOrgId:e??""})}return n.createElement(TableauEntityDetails,{salesforceOrg:R,source:b,tableau:p})},[o,h,R,b,p,A]),K=(0,n.useMemo)(()=>{let e=[{autoClogProps:U.BC,content:n.createElement(H.g,{relatedThreadKeys:N,isLoading:T,onOpenRelatedThread:g}),className:"no_margin",id:D.cv.Threads,titleCount:N.length,title:z.t("Conversations")}];return E&&e.unshift({autoClogProps:U.DX,className:"no_margin",content:q,id:D.cv.Details,title:z.t("Details")}),e},[q,T,g,N,E]);return p||o?n.createElement("div",{className:j().flexpane},n.createElement("div",{className:j().header},n.createElement("div",{role:"heading","aria-level":1,className:j().entityTitle},M),n.createElement(c.A,{href:h,target:"_blank",autoClogProps:U.CC,autoFocus:!0,className:j().tableauAnchor},n.createElement("div",{className:j().entityIconWrapper},n.createElement("img",{className:j().entityIcon,alt:z.t("Tableau logo"),src:i})),z.t("Tableau"),n.createElement(d.Ah,{size:"16",name:"new-window"}))),n.createElement(l.A,{uiComponentName:C.UiComponentName.TABLEAU_FLEXPANE},n.createElement(m.A,{fullHeight:!0,fullWidthMenu:!0,tabs:K,defaultTabId:f,ariaLabel:z.t("Details tabs"),tabMenuClassnames:j().tabMenu,onTabChange:P}))):n.createElement(s.A,{className:j().emptyState,title:z.t("Cannot find this item"),isExtended:!0})};TableauFlexpaneBody.displayName="TableauFlexpaneBody";let TableauMessageDetails=({tableauObjectId:e,entityRefId:t,entity:a,entityStatus:r,link:i,entityKey:l="",source:o,tab:s,onOpenRelatedThread:c,onTabChange:d,isLoading:m,showDetailsTab:u})=>{let p=(0,n.useRef)(a?.title),h=(0,n.useMemo)(()=>a?.title?(p.current=a.title,a.title):p.current,[a?.title]);return n.createElement(TableauFlexpaneBody,{tableauObjectId:e,entityRefId:t,link:i,title:h,tableau:a,entityKey:l,entityStatus:r,source:o,tab:s,onOpenRelatedThread:c,onTabChange:d,isLoading:m,showDetailsTab:u})};TableauMessageDetails.displayName="TableauMessageDetails"},0x11a6c59ba:(e,t,a)=>{"use strict";a.d(t,{A:()=>TableauSessionNotification});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x40c0d834),o=a(0x62a17882),s=a(0x20482ad21),c=a(0xd9faf062),d=a(0x1faa3f1ac),m=a(0x3711e82d),u=a(0x226892387),p=a(0x18b9b7061),h=a(0x987c2ffc);let _=new s.Ay("tableau"),TableauSessionNotification=()=>{let e=(0,r.wA)(),t=(0,u.d4)(h.O),a=Object.entries(t).map(([e,t])=>t),s=(0,n.useCallback)(()=>{a.forEach(t=>{e((0,p.kc)({salesforceOrgId:t.orgId}))})},[e,a]);if((0,o.y3)()||(0,i.A)(t)||a.some(e=>!0===e.notificationIsDismissed))return null;let f=`${a[0]?.salesforceUrl}/tableau`;return n.createElement(l.A,{clogImpression:!0,uiComponentName:m.UiComponentName.TABLEAU_CANVAS_SESSION_NOTIFICATION},n.createElement(c.Ay,{type:"info",isFixedPosition:!1,onClose:s},n.createElement("span",{"data-qa":"tableau-session-notification"},_.rt("You\u2019ve been signed into Salesforce to view this data. When logging out, be sure to also log out of <t1>Tableau Next</t1>.",{fallbackHash:"6d9d1ad61eec2f427ad412e67dff0c97e870185c"},({key:e,text:t})=>n.createElement(d.A,{href:f,target:"_blank",underlineStyle:"underline",key:e},t)))))};TableauSessionNotification.displayName="TableauSessionNotification"},0xb02fc1da:(e,t,a)=>{"use strict";a.d(t,{N:()=>useShareTableauMetric});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x4ae5f5cf);let l=n.lazy(()=>Promise.resolve().then(a.bind(a,0x44b34605)));function useShareTableauMetric({tableau:e,link:t}){let a=(0,r.wA)();return(0,n.useCallback)(async()=>{e&&a((0,i.A)({element:n.createElement(l,{tableau:e,link:t}),name:"tableau_share_dialog"}))},[a,t,e])}useShareTableauMetric.displayName="useShareTableauMetric"},0x53de82ab:(e,t,a)=>{"use strict";a.d(t,{_:()=>useTableauAnalyticsSdk});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x7105f110),l=a(0x14fad6485),o=a(0x1df96de4c),s=a(0x18dac2b8e),c=a(0x12edaa96a),d=a(0x2093b3a1e),m=a(0x267d8753),u=a(0x1f8893105),p=a(0xdd98407a),h=a(0x238b287cf),_=a(0x207eb3801),f=a(0x3711e82d),b=a(0x226892387),g=a(0xd93ecf94),y=a(0x18b9b7061),A=a(0x3be1c4f9),x=a(0xa4086de4),E=a(0x66ca2077);let C="AUTH_REDIRECT",getOrgStateResponse=(e,t)=>e.orgStates?.get(t.salesforceUrl)??{state:"",reason:""},k={...p.T,SetupRequired:"setup_required"};function useTableauAnalyticsSdk({quipDoc:e,channelId:t,quipHasRendered:a,quipThreadId:v,singleOrgDetails:S,isCanvas:I,isPreview:w,isWorkObjectView:T}){let N=(0,r.wA)(),M=(0,h.A)(),R=(0,b.d4)(u.Wy),P=(0,b.d4)(u.d1),L=(0,n.useMemo)(()=>w||!R||T||I&&!P,[P,R,I,w,T]),O=(0,b.d4)(u.EU),D=(0,b.d4)(u.Ac),[F,U]=(0,n.useState)([]),[B,H]=(0,n.useState)(),W=t??F[0]?.channelId,V=(0,b.d4)(e=>(0,g.zG)(e,W,F.map(e=>e.id))),G=(0,b.d4)(e=>W?(0,g.h8)(e,W):o.t0);(0,n.useEffect)(()=>{a&&e&&v&&e.findSlackUnfurls(v).then(e=>{U(e)})},[e,a,v]);let q=(0,n.useMemo)(()=>{if(S)return S;let e=Object.values(V),t=Object.values(G);if(L||!e.length&&!t.length)return[];let a=Date.now()/1e3;return((e.length?e:t.filter(e=>a-Number(e?.ts)<=600))||[]).sort((e,t)=>Number(e?.ts)-Number(t?.ts)).filter(e=>e?.subtype==="document_unfurl"&&(0,d.n)({attachments:e?.attachments})?.some(e=>(0,_.XI)(e))).map(e=>(0,d.n)({attachments:e?.attachments})?.find(e=>(0,_.XI)(e))).reduce((e,t)=>(t?.tableau&&((0,_.PO)(t)||O&&(0,_.to)(t)||D&&(0,_.jJ)(t))&&!e.some(e=>e.orgId===t.tableau?.sfdc_org_id)&&e.push({orgId:t.tableau.sfdc_org_id,salesforceUrl:t.link.split(/\/tableau\//)[0]}),e),[])},[G,L,O,D,S,V]),{windowRef:j}=(0,l.ox)(),z=(0,n.useMemo)(()=>j.deref()?.name,[j]),K=(0,m.$X)(),$=(0,m.AY)(),Y=(0,b.d4)(e=>z?(0,x.GP)(e,{windowId:z}):void 0),Q=(0,b.d4)(x.Lk),Z=(0,n.useMemo)(()=>q.reduce((e,t)=>(e[t.orgId]=Q[t.orgId]?.status??E.n.SDK_NOT_INITIALIZED,e),{}),[Q,q]),J=(0,n.useMemo)(()=>(e,t)=>{N((0,A.wj)({sdkStatus:t,windowId:e}))},[N]),X=(0,n.useMemo)(()=>(e,t=q)=>{let a=t.map(t=>({...t,status:e}));N((0,A.eS)({orgConfigs:a}))},[N,q]),ee=(0,n.useCallback)(e=>N((0,p.Q)({url:e.salesforceUrl,reason:"get-sfdc-front-door-url"})).then(t=>t.ok?{...e,frontdoorUrl:t.frontdoor_uri}:{...e,error:t.error}).catch(t=>({...e,error:t})),[N]),et=(0,n.useCallback)(e=>Promise.all(e.map(e=>ee(e).then(t=>t.error?(M.track(f.EventId.TABLEAU_SDK_ORG_AUTH_ERROR,{orgId:e.orgId,error:t.error,salesforceUrl:e.salesforceUrl}),{...e,error:t.error,orgUrl:e.salesforceUrl}):{...e,authCredential:t.frontdoorUrl,orgUrl:e.salesforceUrl}).catch(t=>(M.track(f.EventId.TABLEAU_SDK_ORG_AUTH_ERROR,{orgId:e.orgId,error:t,salesforceUrl:e.salesforceUrl}),{...e,error:t,orgUrl:e.salesforceUrl})))).then(e=>{let t=e.filter(e=>!!e.error);return t.length>0&&N((0,A.eS)({orgConfigs:t.map(e=>({...e,status:e.error===k.SetupRequired?E.n.TABLEAU_SETUP_REQUIRED:E.n.SDK_ERROR}))})),e.filter(e=>!e.error&&!!e.authCredential).map(e=>({...e,authCredential:e.authCredential,orgUrl:e.orgUrl}))}),[M,N,ee]);(0,n.useEffect)(()=>{if(L)return;let e=setInterval(()=>{H((0,c.A)())},9e5);return()=>clearInterval(e)},[L,z]),(0,n.useEffect)(()=>{0!==q.length&&z&&B&&!L&&et(q).then(e=>{e.length>0&&$({orgConfigs:e,windowId:z})})},[et,L,B,$,q,z]);let ea=(0,n.useCallback)((e,t)=>{let a=[],n=[],r=!1;if(e.status===i.nW.SUCCESS){let e=t.map(e=>({...e,redirectUrl:void 0,status:E.n.SDK_INITIALIZED}));a.push(...e),n.push(...e)}else e.status===i.nW.PARTIAL_SUCCESS?q.forEach(t=>{let r=getOrgStateResponse(e,t);if("INITIALIZATION_SUCCESS"===r.state){let e={...t,redirectUrl:void 0,status:E.n.SDK_INITIALIZED};a.push(e),n.push(e)}else r.state===C?a.push({...t,redirectUrl:`${r.redirectOrigin}${r.redirectUrl}`,status:E.n.AUTH_REDIRECT}):a.push({...t,status:E.n.SDK_ERROR})}):1===q.length&&e.status===i.nW.FAILURE&&e.message.toLowerCase().includes("user configuration is missing")?a.push({...q[0],status:E.n.AUTH_REQUIRED}):q.forEach(t=>{let n=getOrgStateResponse(e,t);n.state===C?(a.push({...t,redirectUrl:`${n.redirectOrigin}${n.redirectUrl}`,status:E.n.AUTH_REDIRECT}),r=!0):a.push({...t,status:E.n.SDK_ERROR})});return N((0,A.eS)({orgConfigs:a})),n.length&&z&&N((0,y._n)({orgConfigs:n,windowId:z})),e.status!==i.nW.FAILURE||r?Promise.resolve():Promise.reject()},[N,q,z]);return(0,n.useEffect)(()=>{if(L)return;let e=q.filter(e=>[E.n.SDK_NOT_INITIALIZED,E.n.AUTH_CONTINUE].includes(Z[e.orgId]));q.length>0&&Y===E.n.SDK_NOT_INITIALIZED&&z?(J(z,E.n.SDK_INITIALIZING),et(q).then(e=>e.length>0?K({orgConfigs:e,debug:(0,s.Cu)()}).then(e=>ea(e,q)).then(()=>J(z,E.n.SDK_INITIALIZED)):Promise.reject()).catch(()=>J(z,E.n.SDK_ERROR))):e.length>0&&Y===E.n.SDK_INITIALIZED&&z&&(X(E.n.SDK_INITIALIZING,e),et(e).then(t=>{if(t.length>0)return $(t).then(t=>ea(t,e))}).catch(()=>X(E.n.SDK_ERROR,e)))},[et,N,J,X,L,ee,ea,K,Z,$,q,Y,z,j]),{hasLiveEmbeds:q.length>0&&!L}}},0x1c000b4e5:(e,t,a)=>{"use strict";a.d(t,{xd:()=>i});var n,r=a(0x7ef54618);r.K9.PTO_REQUEST,r.K9.WEEKLY_REMINDER,r.K9.STANDUP,r.K9.KUDOS;var i=((n={}).GALLERY="gallery",n.MESSAGE_PANE="message_pane",n.WORKFLOWS_TAB="workflows_tab",n)},0x12384c75b:(e,t,a)=>{"use strict";a.d(t,{_:()=>ListDueDateFilterTab,e:()=>m});var n,r=a(0xbad225b5),i=a(0x20482ad21),l=a(0x1d2cd7755),o=a(0x15014e268),s=a(0x70de3606),c=a(0x226892387);let d=new i.Ay("lists");var m=((n={}).NEXT_SEVEN_DAYS="filter_by_due_next_seven_days",n.TOMORROW="filter_by_due_tomorrow",n.TODAY="filter_by_due_today",n.YESTERDAY="filter_by_due_yesterday",n.OVERDUE="filter_by_items_overdue",n);function ListDueDateFilterTab({selectedDueDateFilter:e,onDueDateFilterSelect:t}){let a=(0,c.d4)(s.Dq),n=(0,r.useMemo)(()=>[{value:"filter_by_due_next_seven_days",label:a?d.t("In the next 7 days"):"In the next 7 days"},{value:"filter_by_due_tomorrow",label:a?d.t("The next day"):"The next day"},{value:"filter_by_due_today",label:a?d.t("The same day"):"The same day"},{value:"filter_by_due_yesterday",label:a?d.t("The previous day"):"The previous day"},{value:"filter_by_items_overdue",label:a?d.t("Any time in the past"):"Any time in the past"}],[a]),i=(0,r.useCallback)(({value:e})=>{t(e)},[t]),m=(0,r.useMemo)(()=>n.find(t=>t.value===e),[e,n]);return r.createElement(l.A,{htmlFor:"dueDateFilter",text:a?d.t("Select field"):"Select field",className:"bold margin_bottom_150"},r.createElement(o.Ay,{options:n,placeholderText:"-",ariaLabel:a?d.t("Select field"):"Select field",selectId:"dueDateFilter",width:"100%",minOptionsListWidth:250,isRequired:!0,onOptionSelected:i,selectedOption:m}))}ListDueDateFilterTab.displayName="ListDueDateFilterTab"},0x262d0579:(e,t,a)=>{"use strict";a.d(t,{a:()=>FormPreviewModal});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x24129bf7);let FormPreviewModal=({formTitle:e,formQuestions:t,toggleShowFullPreview:a,formBackButtonLabel:l})=>{let o=(0,n.useCallback)(()=>(0,r.A)(),[]);return n.createElement(i.V,{formTitle:e,formQuestions:t,onClose:o,toggleShowFullPreview:a,formBackButtonLabel:l})};FormPreviewModal.displayName="FormPreviewModal"},0x158a17c7b:(e,t,a)=>{"use strict";a.d(t,{N:()=>transformFormFieldsForFormPreview});var n=a(0x20ef3966f),r=a(0x23465d793);function mapElementValuesToOptions(e){return(0,n.A)(e,(e,t)=>({id:`${t}-${e?.title||e}`,label:e?.title||e,elementValue:e?.value||e}))}function transformFormFieldsForFormPreview(e,t=[]){return e.map(e=>{let a=e;e?.choices?.length&&(a={...e,options:mapElementValuesToOptions(e?.choices)}),e?.items&&(a={...e,options:mapElementValuesToOptions(e?.items?.enum)});let n=(0,r.l)(a),i=!t.includes(a.name);return{...a,optional:i,questionType:n}})}},0x1ea972917:(e,t,a)=>{"use strict";a.d(t,{O:()=>ListTaskCompletionStateTab,k:()=>m});var n,r=a(0xbad225b5),i=a(0x20482ad21),l=a(0x1d2cd7755),o=a(0x15014e268),s=a(0x70de3606),c=a(0x226892387);let d=new i.Ay("lists");var m=((n={}).COMPLETE="complete",n.NOT_COMPLETE="not_complete",n);function ListTaskCompletionStateTab({selectedTaskCompletionFilter:e,onTaskCompletionFilterSelect:t}){let a=(0,c.d4)(s.Dq),n=(0,r.useMemo)(()=>[{value:"complete",label:a?d.t("Complete"):"Complete"},{value:"not_complete",label:a?d.t("Not complete"):"Not complete"}],[a]),i=(0,r.useCallback)(e=>{t(e.value)},[t]);return r.createElement(l.A,{htmlFor:"taskCompletionFilterSelect",text:a?d.t("Select status"):"Select status",className:"bold margin_bottom_150"},r.createElement(o.Ay,{options:n,placeholderText:"-",ariaLabel:a?d.t("Select status"):"Select status",selectId:"taskCompletionFilterSelect",width:"100%",minOptionsListWidth:250,isRequired:!0,onOptionSelected:i,selectedOption:n.find(t=>t.value===e)}))}ListTaskCompletionStateTab.displayName="ListTaskCompletionStateTab"},0x1e22e34a7:(e,t,a)=>{"use strict";a.d(t,{l:()=>convertStringToRichTextBlocks});let convertStringToRichTextBlocks=e=>[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:e}]}]}]},0x2c42751e:(e,t,a)=>{"use strict";a.d(t,{w:()=>getHardcodedTemplates});var n=a(0x20482ad21),r=a(0x211404397),i=a(0x12384c75b),l=a(0x1ea972917),o=a(0x1568a775);let s=a.p+"share-workflow-cfde4c9.png",c=a.p+"standup-cc34983.svg";var d=a(0x7ef54618),m=a(0x1e22e34a7);let u=a.p+"weekly-reminder-85bf7e8.png";var p=a(0x414ccfbd),h=a(0x55931807),_=a(0x95b86906),f=a(0x143eabf7e),b=a(0xabc88677),g=a(0xb7f860b8);let y=new n.Ay("express_templates_hardcoded"),getHardcodedTemplates=()=>{let e={id:d.K9.ADD_RECORD_TO_LIST,title:y.t("Form with an alert",{fallbackHash:"7bbee69dc547eb2ce16ea81a559583c2bcf0ecbd",fallbackHashNs:"lists"}),madLibDescription:y.t("Send a notification to [[channel_id]] when a [[column_ids_to_add_to_form]] is recorded"),confirmationMessage:y.t("We\u2019ll send a notification in [[channel_id]] when a form response is recorded"),inputs:{channel_id:{type:r.g.Channel},list_id:{type:r.g.ListId},column_ids_to_add_to_form:{type:r.g.ListColumnIdsToAddToForm,initialValue:[]}},previewImg:g};return{[d.K9.WEEKLY_REMINDER]:{id:d.K9.WEEKLY_REMINDER,title:y.t("Collect Weekly Updates"),madLibDescription:y.t("Asks members of [[channel|channel_id]] for [[update on this week\u2019s progress|message]] every [[week|schedule]]"),confirmationMessage:y.t("We\u2019ll ask [[channel_id]] for updates every [[schedule]]."),inputs:{message:{type:r.g.Message,placeholder:y.t("an update on this week\u2019s progress"),initialValue:(0,m.l)(y.t("Collecting weekly updates! Please share highlights, progress, and personal updates from the week?"))},channel_id:{type:r.g.Channel},schedule:{type:r.g.RecurringDate}},previewImg:u},[d.K9.KUDOS]:{id:d.K9.KUDOS,title:y.t("Team Kudos"),madLibDescription:y.t("Send a message to [[channel_id]] asking for [[message]] every [[schedule]]"),confirmationMessage:y.t("We\u2019ll ask [[channel_id]] to share kudos every [[schedule]]."),inputs:{message:{type:r.g.Message,placeholder:y.t("kudos"),initialValue:(0,m.l)(y.t("It\u2019s that time of the week! Recognize people who went above and beyond this week and deserve some kudos"))},channel_id:{type:r.g.Channel},schedule:{type:r.g.RecurringDate}},previewImg:o},[d.K9.PTO_REQUEST]:{id:d.K9.PTO_REQUEST,title:"",madLibDescription:y.t("Attach a workflow that lets channel members log time off."),confirmationMessage:y.t("You\u2019ve shared the PTO workflow with this message."),inputs:{},previewImg:s},[d.K9.STANDUP]:{id:d.K9.STANDUP,title:y.t("Virtual Standup"),madLibDescription:y.t("Ask members of [[channel_id]] for [[message]] every [[schedule]]"),confirmationMessage:y.t("We\u2019ll start a standup thread in [[channel_id]] every [[schedule]]."),inputs:{message:{type:r.g.Message,placeholder:y.t("an update on what they\u2019re working on"),initialValue:(0,m.l)(y.t("Time for virtual standup! What are you working on this week? Any key milestones reached or blockers you need help resolving?"))},channel_id:{type:r.g.Channel},schedule:{type:r.g.RecurringDate}},previewImg:c},[d.K9.LISTS_COLUMN_CHANGED]:{id:d.K9.LISTS_COLUMN_CHANGED,title:y.t("Alert to channel",{fallbackHash:"f23c8a2f8e256e1635abbebc02595b3336d91281",fallbackHashNs:"lists"}),madLibDescription:y.t("When [[column_key_and_value]], send a notification to [[channel_id]]"),confirmationMessage:y.t("We\u2019ll send a notification in [[channel_id]] when [[column_key_and_value]]."),inputs:{channel_id:{type:r.g.Channel},column_key_and_value:{type:r.g.ListColumnKeyAndValue},list_id:{type:r.g.ListId}},previewImg:h},[d.K9.LISTS_COLUMN_CHANGED_USER]:{id:d.K9.LISTS_COLUMN_CHANGED_USER,title:y.t("Status Alert to user"),madLibDescription:y.t("When [[column_key_and_value]], send a notification to [[user_id]]"),confirmationMessage:y.t("We\u2019ll send a notification in [[user_id]] when [[column_key_and_value]]."),inputs:{user_id:{type:r.g.UserId},column_key_and_value:{type:r.g.ListColumnKeyAndValue},list_id:{type:r.g.ListId}}},[d.K9.LISTS_COLUMN_CHANGED_ACTIVITY]:{id:d.K9.LISTS_COLUMN_CHANGED_ACTIVITY,title:y.t("Alert to activity feed",{fallbackHash:"528cd71f642143baa03bee970e39759851889e6c",fallbackHashNs:"lists"}),madLibDescription:y.t("When [[column_key_and_value]], notify me in my activity feed"),confirmationMessage:y.t("We\u2019ll send a notification to your activity feed when [[channel_id]] when [[column_key_and_value]]."),inputs:{column_key_and_value:{type:r.g.ListColumnKeyAndValue},list_id:{type:r.g.ListId}},previewImg:p},[d.K9.ADD_RECORD_TO_LIST_NO_NOTIFICATION]:{id:d.K9.ADD_RECORD_TO_LIST_NO_NOTIFICATION,title:y.t("Form",{fallbackHash:"80446347ede53cf9ce56b3d59fda4b5c96dc25c4",fallbackHashNs:"lists"}),madLibDescription:y.t("Adds an item to your list from a [[column_ids_to_add_to_form]]"),confirmationMessage:y.t("Adds an item to your list when from a form"),inputs:{column_ids_to_add_to_form:{type:r.g.ListColumnIdsToAddToForm,initialValue:[]},list_id:{type:r.g.ListId}},previewImg:b},[d.K9.ADD_RECORD_TO_LIST]:e,[d.K9.FEEDBACK_FORM_FOR_LIST]:{...e,id:d.K9.FEEDBACK_FORM_FOR_LIST,inputs:{...e.inputs,column_ids_to_add_to_form:{type:r.g.ListColumnIdsToAddToForm,initialValue:["name","details","type","severity"]}}},[d.K9.BUG_FORM_FOR_LIST]:{...e,id:d.K9.BUG_FORM_FOR_LIST,inputs:{...e.inputs,column_ids_to_add_to_form:{type:r.g.ListColumnIdsToAddToForm,initialValue:["name","details","type","severity"]}}},[d.K9.HELP_FORM_FOR_LIST]:{...e,id:d.K9.HELP_FORM_FOR_LIST,inputs:{...e.inputs,column_ids_to_add_to_form:{type:r.g.ListColumnIdsToAddToForm,initialValue:["name","details","severity"]}}},[d.K9.LISTS_DUE_DATE_NOTIFICATIONS]:{id:d.K9.LISTS_DUE_DATE_NOTIFICATIONS,title:y.t("Due Date Notifications",{fallbackHash:"faf452001bbc4c1ccde4a3ec41d8001c508af4df"}),madLibDescription:y.t("Every [[recurring_date]], send an activity notification to assignee when an item is not complete and its due date is [[due_date_filter]]",{fallbackHash:"fe5a6f946e2871bd8e7d435b21a514186c19857f"}),confirmationMessage:y.t("We\u2019ll send notifications to assignees when items are due [[recurring_date]] and the due date is [[due_date_filter]].",{fallbackHash:"fe5a6f946e2871bd8e7d435b21a514186c19857f"}),inputs:{recurring_date:{type:r.g.RecurringDate},due_date_filter:{type:r.g.DueDateFilter,placeholder:y.t("in the next 7 days",{fallbackHash:"2da0e2fd46a45f3d4bfdeedfa71167c3a7fad1e6",fallbackHashNs:"lists"}),initialValue:i.e.NEXT_SEVEN_DAYS}},previewImg:_},[d.K9.LISTS_DUE_DATE_SUMMARIES]:{id:d.K9.LISTS_DUE_DATE_SUMMARIES,title:y.t("Due Date Summaries",{fallbackHash:"faf452001bbc4c1ccde4a3ec41d8001c508af4df"}),madLibDescription:y.t("Every [[recurring_date]], send a message to [[channel]], with a summary of items that are [[task_completion_state]] whose due dates are [[due_date_filter]]",{fallbackHash:"fe5a6f946e2871bd8e7d435b21a514186c19857f"}),confirmationMessage:y.t("We\u2019ll send summaries of items that are due [[recurring_date]] and [[task_completion_state]] and the due date is [[due_date_filter]] to [[channel]].",{fallbackHash:"fe5a6f946e2871bd8e7d435b21a514186c19857f"}),inputs:{recurring_date:{type:r.g.RecurringDate},channel:{type:r.g.Channel,placeholder:y.t("a channel",{fallbackHash:"ae408453ae615e0c0fa7bad8b221d00fcdf21ba5",fallbackHashNs:"modernselling"})},task_completion_state:{type:r.g.TaskCompletionState,placeholder:y.t("not complete",{fallbackHash:"2da0e2fd46a45f3d4bfdeedfa71167c3a7fad1e6",fallbackHashNs:"lists"}),initialValue:l.k.NOT_COMPLETE},due_date_filter:{type:r.g.DueDateFilter,placeholder:y.t("in the next 7 days",{fallbackHash:"2da0e2fd46a45f3d4bfdeedfa71167c3a7fad1e6",fallbackHashNs:"lists"}),initialValue:i.e.NEXT_SEVEN_DAYS}},previewImg:f}}}},0x1d5b32854:(e,t,a)=>{"use strict";a.d(t,{C4:()=>ensureFutureDate,SJ:()=>getDayOfWeek,iv:()=>getDefaultScheduleObject,j_:()=>r,se:()=>i});var n=a(0x1f355b555);let r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function getDayOfWeek(e){let t=e.weekday();return t<0||t>6?"INVALID DAY":r[t]}function getDayNumberOfWeek(e){return r.indexOf(e)}let i="YYYY-MM-DD[T]HH:mmZ";function getDefaultScheduleObject(e){let t=(0,n.Ay)(),a=getDayOfWeek(t);return{start_time:(t.minute()||t.second()||t.millisecond()?t.add(1,"hour").startOf("hour"):t.startOf("hour")).add(1,"week").toISOString(),timezone:e||n.Ay.tz.guess(),frequency:{type:"weekly",on_days:[a]}}}function ensureFutureDate(e,t){let a=e?.timezone||n.Ay.tz.guess(),r=t||a,l=e?.frequency?.on_days?.[0],o=(0,n.Ay)().day();if(l){let e=getDayNumberOfWeek(l);-1!==e&&(o=e)}let s=(0,n.Ay)(e.start_time,i).tz(a,!1),c=(0,n.Ay)().day(o).hour(s.hour()).minute(s.minute()).second(s.second()).tz(r,!0);return c.isBefore((0,n.Ay)().tz(r,!1))&&(c=c.add(1,"week")),{...e,timezone:r,start_time:c.format(i)}}},0x19d8c4161:(e,t,a)=>{"use strict";a.d(t,{b:()=>m});var n=a(0xb77a689a),r=a(0x1a02c72b5),i=a(0xd6a16321),l=a(0x94d4d4bb),o=a(0x1edb6b65f),s=a(0x11c82607b),c=a(0x14149c126),d=a(0x19895585a);let m=(0,s.Ay)("Launches external workspace onboarding for newly invited users.",(e,t,{externalWorkspaceId:a})=>{if(!a||!(0,n.A)(a))return;let s=t();if(!(0,o.B)(s,a))return;let m="on"===(0,c._Z)(s,"external_workspaces_add_to_home_default");e((0,r.o)({...(0,i.n5)(a),options:{forceTab:m?d.k6.Home:(0,l.L)(s,{workspaceId:a})}}))});m.meta={name:"maybeLaunchExternalWorkspaceOnboarding",key:"createThunkMaybeLaunchExternalWorkspaceOnboarding",description:"Launches external workspace onboarding for newly invited users."}},0x141db8b68:(e,t,a)=>{"use strict";a.d(t,{D1:()=>d,Xw:()=>m,aG:()=>p,b4:()=>h,mE:()=>u,t5:()=>c});var n,r,i,l,o,s,c=((n={}).ExternalOnly="EXTERNAL_ONLY",n.InternalAndExternal="INTERNAL_AND_EXTERNAL",n.InternalOnly="INTERNAL_ONLY",n.UserDefined="USER_DEFINED",n),d=((r={}).CurrentLocation="CURRENT_LOCATION",r.Date="DATE",r.File="FILE",r.Image="IMAGE",r.Link="LINK",r.LongText="LONG_TEXT",r.Person="PERSON",r.Tags="TAGS",r.Text="TEXT",r),m=((i={}).Api="API",i.Scim="SCIM",i.Ui="UI",i),u=((l={}).AdditionalInfo="ADDITIONAL_INFO",l.Affiliations="AFFILIATIONS",l.Contact="CONTACT",l.Custom="CUSTOM",l.Header="HEADER",l.OtherScimFields="OTHER_SCIM_FIELDS",l.People="PEOPLE",l),p=((o={}).External="EXTERNAL",o.Internal="INTERNAL",o),h=((s={}).Extended="EXTENDED",s.Limited="LIMITED",s)},0x1925a4419:(e,t,a)=>{"use strict";a.d(t,{iY:()=>withNamespace,n8:()=>useMaxLengthString,qi:()=>o,x0:()=>l});var n,r,i=a(0x21e7a0211),l=((n={}).LABEL="label",n.HINT="hint",n.IS_INDEXED="isIndexed",n.IS_FILTERABLE="isFilterable",n.IS_SCIM_MANAGED="isScimManaged",n.ARE_CELEBRATIONS_ENABLED="areCelebrationsEnabled",n.LINK="link",n.PERSON="person",n.TEXT="text",n.PERMISSIONS="permissions",n.PERMISSIONS_UI="ui",n.PERMISSIONS_SCIM="scim",n.PERMISSIONS_API="api",n.VALID_DATA_SOURCES="validDataSources",n),o=((r={}).LABEL="label",r.PROFILE_ADMIN_ELEMENTS="profileAdminElements",r.IS_HIDDEN="isHidden",r);function withNamespace(e,t){return e?`${e}.${t}`:t}let useMaxLengthString=()=>i.Yj()},0x1a820df26:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x344bb842),i=a(0x4c96e5d9),l=a(0x252dd886b),o=a(0x2f4e09f8),s=a(0x3711e82d),c=a(0x226892387),d=a(0x14ea3ce99);let NamePronunciationAudioPlayer=({member:e,fileId:t})=>{let a=(0,o.yQ)(),[m,u]=(0,n.useState)(!1),p=(0,c.d4)(e=>(0,d.Lp)(e,t)),h=(0,n.useRef)();(0,n.useEffect)(()=>{p.url_private&&(h.current=new Audio(p.url_private),h.current?.addEventListener("ended",()=>u(!1)))},[p]),(0,n.useEffect)(()=>{let e=h.current;e&&(m?(e.currentTime=0,e.play(),p.url_private&&l.A.playbackStarted(p.url_private)):e.pause())},[m,p]),(0,n.useEffect)(()=>()=>{let e=h.current;e?.pause(),e?.removeEventListener("ended",()=>u(!1))},[]),(0,n.useEffect)(()=>{let e=h.current,t=p.url_private;if(e&&t)return l.A.register({id:t,src:t,play:()=>{e.currentTime=0,e.play()},pause:()=>{e.pause(),u(!1)},seek:()=>{}}),()=>{l.A.unregister(t)}},[p]);let _=(0,n.useCallback)(()=>u(!m),[m]);if(!p.url_private)return null;let f={size:"small",onClick:_,"aria-label":a.playNamePronunciation,"aria-pressed":!1,autoClogProps:{elementName:"audio_name_pronunciation_button",eventId:s.EventId.USER_PROFILE_PRONOUNCE_NAME_CLICK,onClick:{enableClogAction:!0},profileId:e.id,uiComponentName:"name_pronunciation_audio_player"},icon:"volume-medium",className:"p-r_member_profile_name_pronunciation--unstyled_button"},b={...f,className:"p-r_member_profile--animated-sound-icon-child p-r_member_profile_name_pronunciation--unstyled_button"};return m?n.createElement("div",{className:"p-r_member_profile--animated-sound-icon p-r_member_profile_name_pronunciation--unstyled_button"},n.createElement(r.A,{...b,"aria-label":a.playNamePronunciation,"aria-pressed":!0,svgIconProps:{name:"sound-down"}}),n.createElement(r.A,{...b,"aria-hidden":!0,svgIconProps:{name:"sound-medium"}}),n.createElement(r.A,{...b,"aria-hidden":!0,svgIconProps:{name:"sound-up"}})):n.createElement(i.Ay,{tip:a.playNamePronunciation,position:"top"},n.createElement(r.A,{...f,svgIconProps:{name:"sound-medium"}}))};NamePronunciationAudioPlayer.displayName="NamePronunciationAudioPlayer";let m=NamePronunciationAudioPlayer},0xaeaa0021:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0xe874a88a),l=a(0xa516e097),o=a(0x15f8e452a),s=a(0xbefa9255),c=a(0x4a120eb2);let d={className:"p-field_freeform_multi_select__input--token"},useNoCustomSearch=e=>{let t=e?.map(e=>({label:e,value:e}))??[],[a,r]=(0,n.useState)(new Set([...t.map(e=>e.value)])),[l,c]=(0,n.useState)(!1),{createOptionText:d}=(0,s.Cq)(),m=(0,n.useCallback)(e=>{let t=l?e.label:d(e.label),a=l?null:n.createElement(o.A,{type:"plus"});return n.createElement("div",{id:e.label,className:"display_flex align_items_center"},a,t)},[l,d]);return{renderOption:m,search:(0,n.useCallback)(e=>{let t=e.trim();return a.has(t)?c(!0):c(!1),i.S.resolve([{label:t,value:t}])},[c,a]),onSelectedItemsChange:(0,n.useCallback)(e=>{r(new Set(...e.map(({value:e})=>e)))},[])}};useNoCustomSearch.displayName="useNoCustomSearch";let WithAdaptedProps=e=>{var t,a;let i,l,o,{name:s}=e,{validateOnBlur:m,value:u,search:p,renderOption:h,maxLength:_,maxLengthMessage:f,...b}=e,{setFieldValue:g,handleBlur:y,setFieldTouched:A}=(0,r.j7)(),x=useNoCustomSearch(u),E=(t=_??0,a=f??"",i={errors:[],onKeyDown:void 0},l=u?.length??0,o=(0,n.useCallback)(e=>{if(!(l<t))return e.preventDefault()},[t,l]),l&&t&&l===t?{errors:[{id:"max_length",message:a}],onKeyDown:o}:i),C=(0,n.useCallback)(e=>{g(s,e.map(({value:e})=>e)),x.onSelectedItemsChange(e)},[s,g,x]);return n.createElement(c.x,{...b,width:"100%",search:p??x.search,renderOption:h??x.renderOption,onSelectedItemsChange:C,selectedOptions:u?.map(e=>({label:e,value:e})),...m?{onBlur:()=>{y(s),A(s,!0)}}:{onBlur:()=>{A(s,!1)}},isDisabled:e.isDisabled??!1,disableIdParsing:!0,customizeTokenProps:d,errors:E.errors,isInvalid:E.errors.length>0,onKeyDown:E.onKeyDown})};WithAdaptedProps.displayName="WithAdaptedProps";let __WEBPACK_DEFAULT_EXPORT__=e=>n.createElement(l.A,{component:WithAdaptedProps,...e})},0x1c6c9c8b3:(e,t,a)=>{"use strict";a.d(t,{s:()=>useUserProfileSections}),a(0xbad225b5),a(0x16cf1da63);var n=a(0x1ec68d6a3),r=a(0x219c2ced),i=a(0xea37e940),l=a(0x2b531d89),o=a(0x2486aac56),s=a(0x63f13250),c=a(0x9154bcbd),d=a.n(c),m=a(0x11cbe069b),u=a(0x11c82607b),p=a(0x9b971e7e);let h={};(0,u.Ay)("Load the Apollo client, initializing it if necessary.",(e,t)=>{let a=(0,p.ZT)(t());a||((0,n.Wo)({label:"graphql"}).error('Missing teamId when loading apollo client, falling back to "unknown" teamId'),a="unknown");let c=h[a];!c&&(c=new l.R({link:new r.C(t=>{let{variables:a,query:n}=t,r=(0,s.yy)(n);return new i.c(t=>{e((0,m.L)({query:r,variables:a,reason:"apollo-graphql"})).then(e=>{let a=e.errors??void 0;return t.next({errors:a,...e}),t.complete(),e})})}),cache:new o.D({possibleTypes:d().possibleTypes})}),h[a]=c);return c}).meta={name:"loadClient",key:"createThunkLoadClient",description:"Load the Apollo client, initializing it if necessary."};var _=a(0x191a354b6);let f=(0,_.J1)`
	fragment ProfileElementFragment on ProfileElement {
		id
		hint
		isFilterable
		isScimManaged
		isMissing
		isHidden # Need isHidden for release 2 while we don't show a dedicated contact information section
		label
		order
		type
		elementKey
		elementId
		legacyFieldId
		defaultVisibility
		permissions {
			ui
			scim
			api
		}
		... on ProfileTagsElement {
			tags
		}
		... on ProfileCurrentLocationElement {
			city
			country
			description
			state
		}

		... on ProfileTextElement {
			text
			options
		}

		... on ProfileDateElement {
			date
		}

		... on ProfileLinkElement {
			displayText
			uri
		}

		... on ProfilePersonElement {
			persons
		}

		... on ProfileLongTextElement {
			blocks
		}

		... on ProfileFileElement {
			fileId
		}
	}
`,b=(0,_.J1)`
	fragment ProfileSectionFragment on ProfileSection {
		id
		sectionId
		label
		order
		type
		canEdit
		profileElements {
			...ProfileElementFragment
		}
	}
	${f}
`;(0,_.J1)`
	query GetUserProfileSections(
		$userId: String!
		$teamId: String
		$previewMode: PreviewMode
		$includeHidden: Boolean
	) {
		user(user_id: $userId, team_id: $teamId) {
			id
			isSelf
			profileSections(preview_mode: $previewMode, include_hidden: $includeHidden) {
				...ProfileSectionFragment
			}
			team {
				prefs {
					scVisibility
				}
			}
		}
	}
	${b}
`;var g=a(0x1e78d390c),y=a(0x1c2358c11),A=a(0xdb0ffe37),x=a(0x1aad32b98),E=a(0x226892387),C=a(0xe684f705);let useUserProfileSections=(e,t,a)=>{let n,r,i;return n=(0,E.d4)(t=>(0,C.nv)(t,e)),r=(0,A.g)(n)?{team:(0,x.dQ)(n)}:{},i=(0,y.L)({fetcher:g.F,args:{...r,user:e,preview_mode:t??void 0,reason:"profiles",include_hidden:a??void 0},skip:!e}),{data:i?.data?.result?.data,loading:i?.loading,refetch:i?.refetch}}},0x1110e9591:(e,t,a)=>{"use strict";a.d(t,{A:()=>useSetHeaderFields,B:()=>useSetUserProfileSection});var n=a(0x16cf1da63),r=a(0x141db8b68),i=a(0x1c6c9c8b3),l=a(0x11c46e4be),o=a(0x12df2eae0);let useSetUserProfileSection=()=>{let e;return e=(0,n.wA)(),t=>e((0,o.P)({user:t.variables.input.user_id,section:t.variables.input.section_id??void 0,elements:t.variables.input.elements,reason:"edit-profile-form-pane"}))},useSetHeaderFields=e=>{let{data:t,refetch:a,loading:n}=(0,i.s)(e),o=useSetUserProfileSection(),s=t?.user?.profileSections,c=s?.find(e=>e.type===r.mE.Header);if(!c||!e)return{};let d=(0,l.z)(c),{namePronunciationTextElement:m,namePronunciationFileIdElement:u,titleElement:p}=getHeaderFieldValues(c),setGraphQLHeaderFields=async(t,n,r)=>{let i=d.map(e=>{if(m?.elementId&&e.element_id===m?.elementId)return{...e,text:{text:n??""}};if(u?.elementId&&e.element_id===u?.elementId){if(t)return{...e,file:{fileId:t}};if(null===t)return{...e,file:null}}return p?.elementId&&e.element_id===p?.elementId?{...e,text:{text:r??""}}:e});await o({variables:{input:{user_id:e,section_id:c.sectionId??"",elements:i}}}),a()};return{hasNamePronunciationText:!!m?.elementId,isNamePronunciationTextDisabled:!m?.permissions?.ui,isNameRecordingEnabled:!!u?.elementId,setGraphQLHeaderFields,initialNamePronunciationFileId:u?.fileId,initialNamePronunciationText:m?.text,titleElement:p,loading:n}};function getHeaderFieldValues(e){let t=null,a=null,n=null;for(let r of e?.profileElements??[])"Name Pronunciation"===r.elementKey&&"ProfileTextElement"===r.__typename&&(t=r),"Name Recording"===r.elementKey&&"ProfileFileElement"===r.__typename&&(a=r),"title"===r.elementKey&&"ProfileTextElement"===r.__typename&&(n=r);return{namePronunciationTextElement:t,namePronunciationFileIdElement:a,titleElement:n}}},0xb2e0f4b1:(e,t,a)=>{"use strict";a.d(t,{A:()=>tT});var n,r,i,l,o=a(0xbad225b5),s=a(0x19b3ba9fd),c=a(0x20482ad21),d=a(0x1faa3f1ac),m=a(0x8109936f),u=a(0x22fe0c196),p=a(0x1ad23edb7),h=a(0x1595bdd0),_=a(0x839ba347),f=a(0x3fe04406),b=a(0x2221c4a86);let g={fontWeight:"bold"},RimetoProfileCurrentLocation=({currentLocation:e})=>{let t=(0,o.useMemo)(()=>{let e=new Map;return(0,_.A)((0,f.X)(),t=>{e.set(t.shortCode,t.name)}),e},[]),{city:a,state:n,country:r,description:i}=e,l=(0,h.A)([a,n]).join(", "),s=t.get(r)??"",c=o.createElement(o.Fragment,null,o.createElement("div",null,l),o.createElement("div",{className:"p-rimeto_member_profile_field__country--text"},s)),d=o.createElement("div",null,o.createElement("div",{style:g},i??""),c);return o.createElement(b.A,{label:e.label??"",value:d})};RimetoProfileCurrentLocation.displayName="RimetoProfileCurrentLocation";var y=a(0x92dd8e79),A=a(0x16cf1da63),x=a(0x2b7f0bcc),E=a(0x11a296110),C=a(0x131e3c39e),k=a(0xbefa9255),v=a(0xdd502980),S=a(0x76eb49bb),I=a(0x3711e82d),w=a(0x226892387),T=a(0x19c76d181),N=a(0xf9538a9f);let M=new c.Ay("rimeto_atlas_user"),RimetoProfileScimPeople=({memberId:e,managerLabel:t,reportLabel:a,managerElementPersons:n,reportElementPersons:r})=>{let i=(0,A.wA)(),l=(0,o.useMemo)(()=>({elementValue:e,onClick:{enableClogAction:!0},profileId:e}),[e]),s=(0,o.useMemo)(()=>({...l,displayName:"View Full Organization",elementName:"org_chart_link",eventId:I.EventId.RIMETO_PROFILE_ORG_VIEW_ORG_LINK_CLICK,uiComponentName:"rimeto_profile_org"}),[l]),c=(0,o.useMemo)(()=>({...l,displayName:"See More Direct Reports",elementName:"more_direct_reports_link",uiComponentName:"rimeto_profile_more_direct_reports"}),[l]),[m,u]=(0,o.useState)(7),p=(0,w.d4)(T.WR),h=(0,S.jo)([...n]),_=(0,S.jo)([...r]),f=(0,C.p)(),b=(0,w.d4)(e=>(0,v.s)(e,p)),g=f&&b,R=!1,P=!1;_?.length>m&&(m<100?R=!0:P=!0);let L=_.length-m,{sectionButton:O,seeMoreLink:D}=(0,k.GK)({moreCount:L,maxViewableDirectReports:100}),F=(0,o.useCallback)(()=>{i((0,N.E)({rimetoId:"",id:e}))},[i,e]),U=(0,o.useCallback)(()=>{u(100)},[]);return h.length||_.length?o.createElement(o.Fragment,null,!!h?.length&&o.createElement(y.A,{label:t??"",memberIds:h}),!!_?.length&&o.createElement(y.A,{label:a??"",memberIds:_.slice(0,m),count:_.length}),R&&o.createElement(d.A,{className:"p-r_member_profile_scim_people__org_chart_link",onClick:g?F:U,autoClogProps:g?s:c},D),P&&o.createElement(x.Ay,{level:x.A_.default,className:"margin_top_25"},M.t("You\u2019ve reached the maximum number of viewable direct reports.")),g&&o.createElement(E.Ay,{className:"p-r_member_profile_scim_people__org_chart_button",type:"outline",onClick:F,autoClogProps:s},O)):null};RimetoProfileScimPeople.displayName="RimetoProfileScimPeople";var R=a(0x1caf0ba8c),P=a(0x205f4fb61),L=a(0x8169c2ef),O=a(0x14149c126);function isProfileTrailblazerEnabled(e){return"on"===(0,O._Z)(e,"profile_trailblazer")}var D=a(0x235ff1eab);let F=new c.Ay("team"),RimetoProfileTrailheadSection=({trailblazerId:e})=>{let t=(0,A.wA)(),a=(0,w.d4)(isProfileTrailblazerEnabled),[n,r]=(0,o.useState)(null);(0,o.useEffect)(()=>{!async function(){n||r(await t((0,L.h)({id:e,reason:"get-rank"})))}()},[t,e,n]);let i=n?.stats?.rank?.imageUrl,l=(0,w.d4)((0,o.useCallback)(e=>i?(0,D.Ay)(e,{url:i}):null,[i])),s=n?.stats?.learnerStatusLevels?.[0],c=s?.imageUrl,d=(0,w.d4)((0,o.useCallback)(e=>c?(0,D.Ay)(e,{url:c}):null,[c])),m=`${s?.statusName} ${s?.title}`;return a?o.createElement(o.Fragment,null,n?.stats?.rank?.title&&o.createElement(b.A,{key:"trailhead-rank",label:F.t("Rank"),value:n.stats.rank.title}),l&&o.createElement("div",{className:"p-rimeto_member_profile_field"},o.createElement("img",{src:l,alt:n?.stats?.rank?.title,width:133})),n?.stats?.earnedBadgesCount&&o.createElement(b.A,{key:"trailhead-badges",label:F.t("Badges"),value:(0,P.ZV)(n.stats.earnedBadgesCount)}),n?.stats?.earnedPointsSum&&o.createElement(b.A,{key:"trailhead-points",label:F.t("Points"),value:(0,P.ZV)(n.stats.earnedPointsSum)}),d&&o.createElement("div",{className:"p-rimeto_member_profile_field"},o.createElement("img",{src:d,alt:m,width:250}))):null};RimetoProfileTrailheadSection.displayName="RimetoProfileTrailheadSection";let U=o.memo(RimetoProfileTrailheadSection);var B=a(0x141db8b68),H=a(0x10b5318b2),W=a(0xd4787de9),V=a(0x21f3c49e8),G=a(0x15f8e452a),q=a(0x4c96e5d9),j=a(0x1f35a0f5),z=a(0x7fa3cc8f),K=a(0x21e7a0211),$=a(0x5a97f6e0),Y=a(0x1dcaa81f9);let Q="city",Z="description",J="state",X="country",ee="The value must be at least 2 characters long",EditCurrentLocationElementForm=({namespace:e})=>{let{setFieldValue:t}=(0,W.j7)(),withNamespace=t=>e?`${e}.${t}`:t,a=(0,o.useMemo)(()=>(0,z.A)((0,f.X)()).map(({name:e,shortCode:t})=>({label:e,value:t})),[]),n=o.createElement(Y.A,{id:"description",labelText:"Location description (optional)",name:withNamespace(Z),size:"large",validateOnBlur:!0}),r=o.createElement("div",{className:"p-edit_profile_section_form_pane__current_location_flex--input"},o.createElement(Y.A,{id:"city",labelText:"City (optional)",name:withNamespace(Q),size:"large",validateOnBlur:!0})),i=o.createElement("div",{className:"p-edit_profile_section_form_pane__current_location_flex--input"},o.createElement(Y.A,{id:"state",labelText:"State (optional)",name:withNamespace(J),size:"large",validateOnBlur:!0})),l=o.createElement($.A,{id:"country",ariaLabel:"Country select",labelText:"Country (optional)",options:a,name:withNamespace(X),size:"large",validateOnBlur:!0}),s=o.createElement("div",{className:"p-edit_profile_section_form_pane__current_location_clear--div"},o.createElement(E.Nm,{className:"p-edit_profile_section_form_pane__current_location_clear--text",onClick:()=>{[Q,X,Z,J].forEach(e=>t(withNamespace(e),""))}},"Clear Location"));return o.createElement("div",{className:"p-edit_profile_section_form_pane__curent_location--container"},o.createElement("div",{className:"p-edit_profile_section_form_pane__curent_location--subtitle"},"Current Location"),n,o.createElement("div",{className:"p-edit_profile_section_form_pane__current_location_city_state--input"},r,i),l,s)};EditCurrentLocationElementForm.displayName="EditCurrentLocationElementForm";var et=a(0x53a8fdbe);let ea=new c.Ay("date_picker"),EditDateElementForm=({namespace:e,label:t,isDisabled:a,hints:n,shouldAutoFocus:r})=>{let i;return o.createElement(et.A,{name:(i="date",e?`${e}.${i}`:i),labelText:t,id:"date-picker-select-input",datePickerDisabled:a,datePlaceholder:ea.t("Select date"),size:"large",hints:n,focusOnMount:r})};EditDateElementForm.displayName="EditDateElementForm";var en=a(0x10d53599f),er=a(0x1df96de4c),ei=a(0xa516e097),el=a(0x19dc73101);let WithAdaptedProps=e=>{let{name:t}=e,{validateOnBlur:a,value:n,...r}=e,{setFieldValue:i,handleBlur:l,setFieldTouched:s}=(0,W.j7)();return o.createElement(el.h,{...r,width:"100%",selectId:"person-multi-select-input",selectedOptions:n?.map(e=>({label:e,value:e}))??er.Ml,onSelectedItemsChange:e=>{i(t,e.map(e=>e.value))},...a?{onBlur:()=>{l(t),s(t,!0)}}:{onBlur:()=>{s(t,!1)}}})};WithAdaptedProps.displayName="WithAdaptedProps";let field_searcher_multi_select=e=>o.createElement(ei.A,{component:WithAdaptedProps,...e}),eo={allowEmptyQuery:!0,entities:{channels:!1,members:{includeProfileOnlyUsers:!0,includeSlackbot:!1,includeBots:!1,includeGuests:!1,includeExternal:!1},userGroups:!1}},EditPersonElementForm=({namespace:e,label:t,hints:a,shouldAutoFocus:n,isDisabled:r})=>{let i;return o.createElement(field_searcher_multi_select,{isDisabled:r,className:"margin_0",name:(i="persons",e?`${e}.${i}`:i),selectId:"searcher-multi-select-input",size:"large",labelText:t,hints:a,renderOption:(e,t)=>o.createElement(en.A,{id:e.value,isActive:t.isActive}),searcherOptions:eo,focusOnMount:n})};EditPersonElementForm.displayName="EditPersonElementForm";var es=a(0x20b4dda68),ec=a(0x214833d87),ed=((n=ed||{}).TEXT="text",n);let EditTextElementForm=({label:e,namespace:t,options:a,hints:n,isDisabled:r,shouldAutoFocus:i,ariaLabel:l,placeholder:s})=>{let withNamespace=e=>t?`${t}.${e}`:e;return a&&a.length?o.createElement($.A,{className:"margin_0",ariaLabel:l,labelText:e,options:a,name:withNamespace("text"),size:"large",validateOnBlur:!0,isRequired:!1,width:"large",hints:n,focusOnMount:!!i,isDisabled:!!r}):o.createElement(Y.A,{className:"margin_0",labelText:e,name:withNamespace("text"),size:"large",validateOnBlur:!0,hints:n,isDisabled:!!r,autoFocus:!!i,placeholder:s})};EditTextElementForm.displayName="EditTextElementForm";var em=a(0xa5d8361b);let eu=new c.Ay("edit_profile");var ep=((r=ep||{}).DISPLAY_TEXT="displayText",r.URI="uri",r);let EditLinkElementForm=({namespace:e,label:t,shouldAutoFocus:a,hints:n,isDisabled:r})=>{let withNamespace=t=>e?`${e}.${t}`:t;return o.createElement(o.Fragment,null,o.createElement("div",{className:"p-edit_profile_section_form_pane__link--subtitle"},t),o.createElement(Y.A,{labelText:eu.t("Display Text"),name:withNamespace("displayText"),size:"large",validateOnBlur:!0,autoFocus:!!a,isDisabled:r}),o.createElement(Y.A,{labelText:eu.t("URL"),name:withNamespace("uri"),size:"large",validateOnBlur:!0,hints:n,isDisabled:r}),o.createElement(j.A,null))};EditLinkElementForm.displayName="EditLinkElementForm";var eh=a(0x677a139e),e_=a(0x1925a4419),ef=a(0x120c268ad),eb=a.n(ef),eg=a(0x118cdcdea),ey=a.n(eg),eA=a(0x14fad6485),ex=a(0x1d2cd7755),eE=a(0x16401accf),eC=a(0x1b77d8ef3),ek=a(0x14705d91b),ev=a(0x2c5a5afa),eS=a(0x2162236ad),eI=a(0x24429189c);function useDeltaFromFieldInitialValue(e){let{getFieldMeta:t}=(0,W.j7)(),a=(e=>{try{return JSON.parse(e)}catch{return[]}})(t(e)?.initialValue??"");return(0,w.d4)(e=>(0,eS.A)(e,a))}let field_texty_input_WithAdaptedProps=e=>{let{name:t,labelText:a,maxLength:n,numMinLines:r,isDisabled:i,validateOnBlur:l,placeholder:s,focusOnMount:c}=e,{setFieldValue:d,handleBlur:m,setFieldTouched:u}=(0,W.j7)(),p=(0,eE.A)(t).length>0,h=(0,o.useRef)(null),{windowRef:_}=(0,o.useContext)(eA._0),f=(0,A.wA)(),b=(0,o.useCallback)(()=>{if(h?.current?.getContents()){let e=new(ey())(h?.current?.getContents().contents),a=f((0,eI.y)({delta:e})).blocks;if(a)try{d(t,JSON.stringify(a))}catch{}else d(t,"")}},[f,t,d]),g=useDeltaFromFieldInitialValue(t),y=o.createElement(ev.A,{windowRef:_,completeOnEmoji:!0,completeOnMembers:!0,completeOnChannels:!0,completeOnSlackFiles:!0,ariaLabel:a??"",forceEnterCreatesNewline:!0,initialText:{contents:g.ops},maxLength:n,onTextChange:b,ref:h,useWysiwyg:!0,isDisabled:i,placeholder:s,focusOnMount:c,...l?{onBlur:()=>{m(t),u(t,!0)}}:{onBlur:()=>{u(t,!1)}}});return i?o.createElement(o.Fragment,null,o.createElement(ex.A,{text:a??""}),o.createElement(eC.A,{isInvalid:p,isDisabled:!0,numMinLines:r,className:"p-field-texty-input-no-label"},y)):o.createElement(o.Fragment,null,o.createElement(ex.A,{text:a??""}),o.createElement(ek.A,{isInvalid:p,className:eb()("p-field-texty-input-no-label",{"p-field-texty-input-error":p,"p-field-texty-input-border":!p}),enableEmojiButton:!0,enableComposerButton:!0,numMinLines:r},y))};field_texty_input_WithAdaptedProps.displayName="WithAdaptedProps";let field_texty_input=e=>o.createElement(ei.A,{component:field_texty_input_WithAdaptedProps,...e});var ew=a(0x20e77676b);let eT=new c.Ay("member_profile"),SlackConnectVisibilityMessage=({forceOpenInBrowser:e=!1})=>o.createElement(q.Ay,{tip:eT.t("Only people at other organizations can see this info on your profile")},o.createElement("span",{className:"caption"},eT.rt("Only shown to external people from organizations you\u2019re connected to. {slackConnectHelpLink}",{slackConnectHelpLink:o.createElement(ew.A,{articleId:0x1ac6c815a3,forceOpenInBrowser:e},eT.t("Learn more"))})));SlackConnectVisibilityMessage.displayName="SlackConnectVisibilityMessage";var eN=a(0x2001af3ac),eM=((i=eM||{}).BLOCKS="blocks",i);let EditLongTextElementForm=({namespace:e,label:t,placeholder:a,isDisabled:n,hints:r,shouldAutoFocus:i,shouldShowSlackConnectVisibilityMessage:l})=>{let s=(0,e_.iY)(e,"blocks"),c=(0,A.wA)(),d=(0,o.useCallback)(e=>{if(e)try{let t=JSON.parse(e),a=c((0,eI.f)({blocks:t}));if((0,eN.A)(a)>5e3)return(0,ec.A)({type:"error_max_length",maxLength:5e3})??"";return}catch{return}},[c]);return o.createElement(o.Fragment,null,o.createElement(field_texty_input,{validate:d,name:s,labelText:t,maxLength:5e3,validateOnBlur:!0,numMinLines:5,placeholder:a??void 0,isDisabled:!!n,focusOnMount:i,labelSubtext:l&&o.createElement(SlackConnectVisibilityMessage,{forceOpenInBrowser:!0})}),o.createElement(eh.A,{className:"margin_top_50 margin_bottom_25"},r))};EditLongTextElementForm.displayName="EditLongTextElementForm";var eR=a(0xe874a88a),eP=a(0xaeaa0021),eL=a(0x2f4e09f8),eO=a(0xca5d2115);let eD="tags",EditTagsElementForm=({label:e,namespace:t,placeholder:a,isDisabled:n,elementId:r,shouldAutoFocus:i,ariaLabel:l})=>{let withNamespace=e=>t?`${t}.${e}`:e,{createTagText:s,errorMaxTags:c}=(0,eL.Yc)({maxTags:75}),d=(0,A.wA)(),[m,p]=(0,o.useState)(""),h=(0,o.useCallback)((e,{isSelected:t,isActive:a})=>{let n=eb()("p-user_profile_tags_element_edit__option--create",{"p-user_profile_tags_element_edit__option--active":a});return m&&e.label&&e.label===m?o.createElement("div",{className:n},o.createElement(G.A,{type:"plus-circle",className:"margin_right_75"}),s(e.label)):o.createElement("div",{id:e.label,className:t?"p-user_profile_tags_element_edit__option_selected--label":"p-user_profile_tags_element_edit__option--label"},t&&o.createElement(G.A,{type:"check-small",className:"p-user_profile_tags_element_edit__option_selected--icon"}),e.label)},[m,s]),_=(0,o.useCallback)(e=>{if(!r)return eR.S.resolve([]);let t=e.trim();return t?eR.S.resolve(d((0,eO.n)({reason:`search.autocomplete.tags.${r}`,query:t,elementId:r}))).then(e=>{let a=[],n=!1,r=!1,i="";for(let l of e.tags)l===t?n=!0:l.toLowerCase()===t.toLowerCase()?(r=!0,i=l):a.push({label:l,value:l});return n?(p(""),a.splice(0,0,{label:t,value:t})):r?(p(t),a.splice(0,0,{label:t,value:t,overrides:{useHoverStyles:!0}}),a.splice(0,0,{value:"-",label:"-",type:"divider"}),a.splice(0,0,{label:i,value:i})):(p(t),a.length&&a.splice(0,0,{value:"-",label:"-",type:"divider"}),a.splice(0,0,{label:t,value:t,overrides:{useHoverStyles:!0}})),eR.S.resolve(a)}):eR.S.resolve([])},[r,d]),f=((e,t)=>{let{getFieldProps:a}=(0,W.j7)(),n=75-a(e).value.length,{editTagsHint:r,editTagsLeftHint:i,editTagsLeftHintSingular:l}=(0,eL.Yc)({tagsLeft:n});return t?[]:n>3?[r]:1===n?[l]:n>0?[i]:[]})(withNamespace(eD),n);return(0,w.d4)(u.A)?o.createElement("div",{className:"p-user_profile_tags_element_edit__container"},o.createElement(eP.A,{validateOnBlur:!0,name:withNamespace(eD),className:"margin_0",selectId:"tag-multi-select-input",size:"large",ariaLabel:l,labelText:e,placeholderText:a??"",isDisabled:n??!1,maxHeight:850,search:_,renderOption:h,classPrefix:"p-user_profile_tags_element_edit",focusOnMount:!!i,hints:f,maxLength:75,maxLengthMessage:c})):null};EditTagsElementForm.displayName="EditTagsElementForm";var eF=a(0x20e80190e);let eU=new c.Ay("edit_profile"),eB={marginRight:"2px"},EditProfileSectionModal=({formValues:e,metadataMap:t,section:a,title:n,onClose:r,focusedElementId:i})=>{let{errors:l,dirty:s,submitForm:c}=(0,W.j7)(),d=(0,eL.Wu)(),m=(0,w.d4)(isProfileTrailblazerEnabled),getNamespace=(e,t)=>`elements[${t}].${e}`,u=(0,eL.du)(),p=eU.t("What should external people know about your role?"),h=(0,o.useMemo)(()=>[p],[p]),_=e.elements.map((e,n)=>{let r=t.get(e.element_id),l=!r?.permissions?.ui,s=l?o.createElement(o.Fragment,null,o.createElement(q.Ay,{position:"top",tip:u.tooltipLockIconText},o.createElement(G.A,{type:"lock",style:eB})),o.createElement("span",{className:"bold"},r?.label??"")):o.createElement(o.Fragment,null,r?.label??""),c=r?.id===i,d=`${e.element_id}-form`,p=r?.hint?[r?.hint]:[];if(e.currentLocation)return o.createElement("div",{key:d},o.createElement(EditCurrentLocationElementForm,{namespace:getNamespace("currentLocation",n)}),o.createElement(j.A,null));if(e.tags)return o.createElement("div",{key:d,className:"margin_bottom_125"},o.createElement(EditTagsElementForm,{label:s,namespace:getNamespace("tags",n),placeholder:r?.hint??"",isDisabled:l,elementId:e.element_id,shouldAutoFocus:c,ariaLabel:r?.label??""}));if(e.text){if(r?.__typename!=="ProfileTextElement")return null;let t=(r?.options??[]).map(e=>({label:e,value:e})),i="";return m&&a.type===B.mE.Custom&&("Trailhead"===a.label||"Trailblazer information"===a.label)&&("Trailblazer Id"===r.label||"Trailblazer ID"===r.label)&&(i=eU.t("Ex. https://www.salesforce.com/trailblazer/myprofile")),o.createElement("div",{key:`${e.element_id}-form`,className:"margin_bottom_125"},o.createElement(EditTextElementForm,{label:s,namespace:getNamespace("text",n),options:t,hints:p,isDisabled:l,shouldAutoFocus:c,ariaLabel:r?.label??"",placeholder:i}))}if(e.date)return o.createElement("div",{key:d,className:"margin_bottom_125"},o.createElement(EditDateElementForm,{label:s,namespace:getNamespace("date",n),hints:p,isDisabled:l,shouldAutoFocus:c}));if(e.link)return o.createElement("div",{key:d,className:"margin_bottom_125"},o.createElement(EditLinkElementForm,{label:s,namespace:getNamespace("link",n),shouldAutoFocus:c,hints:p,isDisabled:l}));if(e.person)return o.createElement("div",{key:d,className:"margin_bottom_125"},o.createElement(EditPersonElementForm,{label:s,namespace:getNamespace("person",n),hints:p,shouldAutoFocus:c,isDisabled:l}));if(e.long_text){let e=p;return r?.defaultVisibility==="EXTERNAL_ONLY"&&r?.elementKey==="Role Description"&&(e=h),o.createElement("div",{key:d,className:"margin_bottom_125"},o.createElement(EditLongTextElementForm,{namespace:getNamespace("long_text",n),label:s,placeholder:r?.hint,isDisabled:l,hints:e,shouldAutoFocus:c,shouldShowSlackConnectVisibilityMessage:r?.defaultVisibility===B.t5.ExternalOnly}))}return null}),f=(0,o.useCallback)(()=>{c()},[c]);return o.createElement(eF.dW,{closeModal:r,forceSpeedBumpEnabled:s},o.createElement(eF.rQ,null,o.createElement(eF.Rc,{title:n})),o.createElement("div",{className:"p-edit_profile_section_form_pane__modal-content padding_top_125"},o.createElement(eF.qf,null,a.type===B.mE.People&&o.createElement("div",{className:"padding_bottom_100"},d),_)),o.createElement(eF.jl,{renderSpeedBump:({cancel:e})=>o.createElement(eF.ty,{onContinue:r,onCancel:e})},o.createElement(eF.ox,null,o.createElement(E.Ay,{type:"outline",onClick:r},eU.t("Cancel")),o.createElement(E.Ay,{htmlType:"submit",disabled:!(0,V.A)(l),onClick:f},eU.t("Save Changes")))))};EditProfileSectionModal.displayName="EditProfileSectionModal";var eH=a(0x1110e9591),eW=a(0x11c46e4be);let EditProfileSectionForm=({memberId:e,section:t,onClose:a,focusedElementId:n,refetch:r})=>{let i,l,s,c,d,{editSectionTitle:m}=(0,k.Cq)({sectionLabel:t.label??""}),u=(0,eH.B)(),p=(0,o.useMemo)(()=>{let e=new Map([]);return t.profileElements?.forEach(t=>{let a=t.id?.split(":")[3];a&&e.set(a,t)}),e},[t.profileElements]),h=(0,o.useMemo)(()=>(0,eW.z)(t),[t]),_=(0,o.useCallback)(async e=>{let n=[...e.elements];t.type===B.mE.Contact&&(n=e.elements.filter(e=>{let t=p.get(e.element_id);return t&&"email"!==t.elementKey}));let i={...e,elements:n.map(e=>e.currentLocation&&Object.values(e.currentLocation).every(e=>!e)?{...e,currentLocation:null}:e.text&&!e.text.text?{...e,text:null}:e.date&&!e.date.date?{...e,date:null}:e.link&&!e.link.uri?{...e,link:null}:e.person&&e.person.persons.every(e=>!e)?{...e,person:null}:e.long_text&&!e.long_text.blocks?{...e,long_text:null}:e)};await u({variables:{input:i}}),r(),a()},[a,u,t.type,p,r]),f=(i=K.Ik().shape({text:K.Yj().nullable().max(es._w.CUSTOM,(0,ec.A)({type:"error_max_length",maxLength:es._w.CUSTOM})??"")}),l=K.Ik().shape({displayText:K.Yj().max(es._w.CUSTOM,(0,ec.A)({type:"error_max_length",maxLength:es._w.CUSTOM})??""),uri:K.Yj().test({name:"link-url-test",message:(0,ec.A)({type:"error_is_url"})??"",test:e=>!e||!!(0,em.A)(e)})}),s=(e=>{let{errorMaxTags:t}=(0,eL.Yc)({maxTags:e});return K.Ik().shape({[eD]:K.YO().of(K.Yj()).max(e,t)})})(75),c=K.Ik({[Q]:K.Yj().min(2,ee),[Z]:K.Yj().min(2,ee),[J]:K.Yj().min(2,ee),[X]:K.Yj()}),d=K.Ik().shape({currentLocation:c,link:l,text:i,tags:s}),K.Ik().shape({elements:K.YO().of(d)}));return o.createElement(H.A,{initialValues:{user_id:e,section_id:t.id?.split(":")[2]??"",elements:h},onSubmit:_,validationSchema:f},({values:e})=>o.createElement(EditProfileSectionModal,{title:m,formValues:e,metadataMap:p,section:t,onClose:a,focusedElementId:n}))};EditProfileSectionForm.displayName="EditProfileSectionForm";var eV=a(0x1c371dd8b),eG=a(0x12edaa96a),eq=a(0x14abc22b0),ej=a(0x12b6a33fc),ez=a(0x110b4f809),eK=a(0x1ed767a16),e$=a(0x21bfacd01),eY=((l={}).Phone="phone",l.Email="email",l);function RimetoCopyContactTooltip({label:e,value:t,type:a,profileId:n}){let[r,i]=(0,ez.A)(!1,2e3),{sendMessageToAnnouncerAPI:l}=(0,o.useContext)(eq.A),s=ej.YU.Info,c=(0,eL.ge)(),d=(0,eL.ND)(),m=(0,w.d4)(e$.V);if(r&&(s=ej.YU.Success),!(0,eK.tD)())return null;let u=I.EventId.USERPROFILE_CONTACT_SECTION_COPY_PHONE_BUTTON_CLICK,p="copy_phone_button",h=I.UiComponentName.USERPROFILE_CONTACT_SECTION_COPY_PHONE_BUTTON;return"email"===a&&(u=I.EventId.USERPROFILE_CONTACT_SECTION_COPY_EMAIL_BUTTON_CLICK,p="copy_email_button",h=I.UiComponentName.USERPROFILE_CONTACT_SECTION_COPY_EMAIL_BUTTON),o.createElement("div",{className:eb()("p-rimeto_member_profile_field__copy",{"p-bbm_rimeto_member_profile_field__copy":m})},o.createElement(q.Ay,{status:s,tip:r?d:c,zIndex:"above_fs",hideFromScreenReader:!0},o.createElement(E.Ay,{onClick:()=>{(0,eK.x3)(t),i(!0),l({message:`${e} ${d}`,assertive:!0,uuid:(0,eG.A)()})},"aria-label":`${e} ${c}`,icon:"all-files",type:"outline",autoClogProps:{eventId:u,elementName:p,uiComponentName:h,profileId:n,onClick:{enableClogAction:!0}}})))}RimetoCopyContactTooltip.displayName="RimetoCopyContactTooltip";let eQ=RimetoCopyContactTooltip,RimetoProfileContactInfoField=({label:e,value:t,isSelf:a,isDeleted:n,autoClogProps:r,type:i,profileId:l})=>{let s=n?t:o.createElement(d.A,{href:`${i===eY.Phone?"tel:":"mailto:"}${t}`,autoClogProps:r},t);return o.createElement(o.Fragment,null,o.createElement(b.A,{label:e,value:s}),(0,p.bS)()||!a&&o.createElement(eQ,{label:e,value:t,type:i,profileId:l}))};RimetoProfileContactInfoField.displayName="RimetoProfileContactInfoField";var eZ=a(0x189393d41),eJ=a(0x52c99391),eX=a(0xf2964a91),e0=a(0x1bac8c9e9),e1=a(0xe684f705);let e2=new c.Ay("team"),e4={onClick:{action:I.UiAction.CLICK}},e5={display:"flex"};function getIconTypeByElementKey(e){switch(e){case"phone":case"primaryPhone":case"mobilePhone":case"Alternate Phone":return"phone";default:return"envelope-o"}}let ContactInformationSection=({isSelf:e,onOpenEditModal:t,section:a,memberId:n})=>{let r=(0,w.d4)(e=>(0,e1.nv)(e,n)),i=(0,eX.o)(r),l=(0,p.bS)(),s=(0,w.d4)(p.x5);if(!a||(0,e0.U)(r))return null;let c=!l&&e?o.createElement(d.A,{"aria-label":e2.t("Edit Contact Information Section"),onClick:()=>t(a,null),autoClogProps:{profileId:n,uiComponentName:`${I.UiComponentName.USERPROFILE_EDIT_LINK_SECTION}_CONTACT`,displayName:"",elementName:"userprofile_edit_link",eventId:I.EventId.USERPROFILE_EDIT_LINK_CLICK,onClick:{enableClogAction:!0}}},o.createElement("span",{className:"bold"},e2.t("Edit"))):null,m=(a.profileElements??[]).map(r=>{let c;if("ProfileTextElement"!==r.__typename)return null;let d={eventId:I.EventId.RIMETO_PROFILE_CONTACT_OPTION_CLICK,displayName:r.label??"",elementName:"contact_information_element_name",elementValue:r.elementKey??"",uiComponentName:"contact_information_profile_section",onClick:{enableClogAction:!0},profileId:n},m=getIconTypeByElementKey(r.elementKey??"");if(r.isMissing&&r.permissions?.ui)return o.createElement("div",{key:`${r.label??""}-contactinformation-element`,style:e5},o.createElement("div",{className:"padding_right_100 padding_top_50 padding_bottom_50"},o.createElement(eJ.A,{profileId:n,element:r,onOpenEditModal:()=>e&&t(a,r.id??null)})));if(!(0,eZ.A)(r.text??""))return null;switch(r.elementKey??""){case"phone":case"primaryPhone":case"mobilePhone":case"Alternate Phone":c=o.createElement(RimetoProfileContactInfoField,{label:r.label??"",value:r.text??"",isSelf:e,isDeleted:i,type:eY.Phone,autoClogProps:{eventId:I.EventId.USERPROFILE_CONTACT_SECTION_PHONE_LINK_CLICK,elementName:"phone_contact_link",uiComponentName:I.UiComponentName.USERPROFILE_CONTACT_SECTION_PHONE_LINK,profileId:n,onClick:{enableClogAction:!0}},profileId:n});break;case"email":case"secondEmail":if(l&&!s)return;c=o.createElement(RimetoProfileContactInfoField,{label:r.label??"",value:r.text??"",isSelf:e,isDeleted:i,type:eY.Email,autoClogProps:{eventId:I.EventId.USERPROFILE_CONTACT_SECTION_EMAIL_LINK_CLICK,elementName:"email_contact_link",uiComponentName:I.UiComponentName.USERPROFILE_CONTACT_SECTION_EMAIL_LINK,profileId:n,onClick:{enableClogAction:!0}},profileId:n});break;default:return}return o.createElement("div",{key:`${r.label??""}-contactinformation-element`,className:"p-rimeto_member_profile_field__contact_info"},o.createElement("div",{className:"p-rimeto_member_profile_field__contact_icon"},o.createElement(G.A,{type:m})),o.createElement(eV.A,{autoClogProps:d,actionProps:e4,elementType:I.ElementType.LINK},c))});return m.length?o.createElement(R.A,{key:`${a.id}-contactinformation`,title:a.label??"",titleBarSecondary:a.canEdit&&c},m):null};ContactInformationSection.displayName="ContactInformationSection";var e3=a(0x1075d3a9c),e6=a.n(e3);let e8=new c.Ay("rimeto_user_profile");function getTenureDate(e,t){let a,n=e6().relativeTimeRounding();e6().relativeTimeRounding(Math.floor);let r=e6()(e,"YYYY-MM-DD"),i=e6()();if(r>i)return"";let l=i.diff(r,"years"),o=i.diff(r,"months")%12,s=e8.t("{years, plural, =1 {{years} year } =0 {} other {{years} years }}{months, plural, =0 {} =1 {{months} month} other {{months} months}} ago",{years:l,months:o});if(t){let e=i.diff(r,"days");if(e<1)return"";let t=e8.t("{days, plural, =1 {{days} day} =0 {} other {{days} days}} ago",{days:e});a=l||o?` (${s})`:` (${t})`}else a=l||o?` (${s})`:` (${r.fromNow()})`;return e6().relativeTimeRounding(n),a}var e7=a(0x205775ede);let DateElement=({section:e,element:t,onEdit:a,isDeleted:n,profileId:r})=>{let i=(0,w.d4)(e=>"on"===(0,O._Z)(e,"remove_fromnow_translations")),l=n?"":getTenureDate(t.date??"",i),s=e6()(t.date??"").format("MMM D, YYYY")+l,c=(0,o.useMemo)(()=>[t.date??""],[t]),d=(0,o.useCallback)(()=>a(e,t.id??null),[e,t.id,a]);if(t.isMissing)return o.createElement(eJ.A,{profileId:r,key:`${t.id}`,element:t,onOpenEditModal:d});let m="Start Date"===t.elementKey?I.EventId.USERPROFILE_START_DATE_LINK_CLICK:I.EventId.USERPROFILE_GENERIC_DATE_LINK_CLICK,u=t.isFilterable&&t.legacyFieldId?o.createElement(e7.A,{fieldId:t.legacyFieldId,fieldValue:c,fieldDisplay:s,autoClogProps:{eventId:m,profileId:r,elementName:"userprofile_date_element",uiComponentName:I.UiComponentName.USERPROFILE_DATE_ELEMENT_LINK,onClick:{enableClogAction:!0}}}):s;return o.createElement(b.A,{key:`${t.id}`,label:t.label??"",value:u})};DateElement.displayName="DateElement";var e9=a(0x1a65aae75),te=a(0xd35eec38),tt=a(0x1ccef1c6f),ta=a(0x1eae030b2);let tn={location:"user_profile"},ProfileLinkElement=({section:e,element:t,eventId:a,elementName:n,uiComponentName:r,profileId:i,onEdit:l})=>{let s=(0,A.wA)(),c=t.displayText?.length?t.displayText:t.label??"",d=t.uri?.trim()??"",m=(0,w.d4)(e=>(0,tt.ty)(e,"suppress_link_warning")),u=(0,o.useCallback)(e=>{d&&c&&!m&&(0,e9.A)(c,d)&&(s((0,ta.A)({text:c,url:d})),e.preventDefault())},[s,c,d,m]),p=o.createElement("div",{className:"p-rimeto_profile_sections__element--edit"},o.createElement(te.A,{href:t.uri??"",autoClogProps:{eventId:a,elementName:n,uiComponentName:r,profileId:i,onClick:{enableClogAction:!0}},hermesLinkTriggerUIContext:tn,maybeOpenSuspiciousLinkDialog:u},c));return t.isMissing?o.createElement(eJ.A,{key:`${t.id}`,element:t,profileId:i,onOpenEditModal:()=>l(e,t.id??null)}):o.createElement(b.A,{key:`${t.id}`,label:t.label??"",value:p})};ProfileLinkElement.displayName="ProfileLinkElement";var tr=a(0x1ee15af19),ti=a(0x1cbdfeceb),tl=a(0x129074070);let ExpandedModal=({children:e,title:t,onClose:a})=>o.createElement(eF.dW,{closeModal:a},o.createElement(eF.rQ,null,o.createElement(eF.Rc,{title:t})),o.createElement(eF.$m,{className:"p-rimeto_profile_sections__element--show_more"},o.createElement(eF.qf,null,e)));function TruncatedRichTextModal({label:e,elements:t,teamId:a,highlightWords:n,isJumbomojiEnabled:r=!1,isEmojiDisplayedAsText:i=!1,clogLinkClick:l=ti.A,sourceTeamId:s,editedTs:c,maxChars:d=700,maxLines:m=5}){let[u,p]=(0,o.useState)(!1),h=(0,o.useCallback)(e=>{e?.link_type==="message_expand"&&p(!0),l(e)},[l]),_=(0,o.useCallback)(()=>p(!1),[]),f=o.createElement(tl.A,{elements:t,teamId:a,highlightWords:n,isJumbomojiEnabled:r,isEmojiDisplayedAsText:i,inline:!1,clogLinkClick:h,sourceTeamId:s,editedTs:c,addDirectionAttr:!0,isExpanded:!1,truncateMaxCharacters:d,truncateMaxNewLines:m}),b=o.createElement(tl.A,{elements:t,teamId:a,highlightWords:n,isJumbomojiEnabled:r,isEmojiDisplayedAsText:i,inline:!1,sourceTeamId:s,editedTs:c,addDirectionAttr:!0});return o.createElement(o.Fragment,null,u&&o.createElement(ExpandedModal,{title:e,onClose:_},b),f)}TruncatedRichTextModal.displayName="TruncatedRichTextModal";var to=a(0x94e8342);let ProfileLongTextElement=({section:e,element:t,profileId:a,onEdit:n})=>{if(t.isMissing)return o.createElement(eJ.A,{key:`${t.id}`,element:t,profileId:a,onOpenEditModal:()=>n(e,t.id??null)});try{let e=t.blocks?JSON.parse(t.blocks):[];if((0,to.A)(e,!1)){let a=(0,tr.A)(e)?.elements||[],n=t.blocks?o.createElement(TruncatedRichTextModal,{elements:a,label:t.label??"",maxChars:200}):"",r=t?.defaultVisibility===B.t5.ExternalOnly?o.createElement(SlackConnectVisibilityMessage,null):null;return o.createElement(b.A,{className:"p-rimeto_profile_sections__element--long_text",key:`${t.id}`,label:t.label??"",value:n,labelSubtext:r})}return null}catch{return null}};ProfileLongTextElement.displayName="ProfileLongTextElement";var ts=a(0x15fb82076),tc=a(0xc34fd270),td=a(0x1a76e2767),tm=a(0xa4ac512),tu=a(0x1a02c72b5),tp=a(0xd6a16321),th=a(0x12185e091),t_=a(0x280afe13),tf=a(0xf51a309e),tb=a(0xdf40908a),tg=a(0x1b27a6205),ty=a(0xc57ffe04),tA=a(0x217553e42),tx=a(0x141c1c56a),tE=a(0x1950da728);let tC=new c.Ay("recent-dms-section"),RecentDmsSection=({isSelf:e,section:t,memberId:a,experimentProfileSectionRecentDMGroupOn:n})=>{let r=(0,A.wA)(),i=(0,A.Pj)(),l=(0,w.d4)(e=>(0,e1.nv)(e,a)),s=(0,w.d4)(e=>(0,e1._7)(e,a)),c=(0,w.d4)(e=>"on"===(0,O._Z)(e,"omni_unified_filter_tokens")),{imMpimIds:d=[],hasMoreMpims:m=!1}=(0,tm.i)({member:l,requestedKeys:["im_mpim_ids"]}),u=(0,w.d4)(e=>(0,tA.LO)(e,d)),p=(0,o.useCallback)(e=>()=>{r((0,tu.o)((0,tp.pr)(e)))},[r]),h=(0,o.useCallback)(()=>{let e=[{insert:"with:"},{insert:"@username",attributes:{slackmention:(0,tb.A)(l)}}],t=tf.dn.fromOps(i.getState(),e);r((0,ty.S)({displayQueryOps:t.toTextyOps({experimentOmniUnifiedFilterTokensGroupOn:c}),requestQuery:t.toString(),mode:tE.R5.DMS})),r((0,tg.A)({shouldReturnFocus:!1,inputId:tE.Jx.OMNISWITCHER})),r((0,tx.O6)({tab:"dms"}))},[r,l,i,c]),_=(0,o.useMemo)(()=>({dm:{eventId:I.EventId.USERPROFILE_DM_CLICK,elementName:"userprofile_dm_link",uiComponentName:I.UiComponentName.USERPROFILE_DM_LINK,onClick:{enableClogAction:!0},profileId:a},seeAllDms:{eventId:I.EventId.USERPROFILE_SEE_ALL_DMS_CLICK,elementName:"userprofile_see_all_dms_link",uiComponentName:I.UiComponentName.USERPROFILE_SEE_ALL_DMS_LINK,onClick:{enableClogAction:!0},profileId:a}}),[a]);if(!n||!t||(0,e0.U)(l)||e||0===u.length)return null;let f=u.map(e=>o.createElement(ts.A,{key:e.id,className:"p-r_member_profile--link",autoClogProps:_.dm,onClick:p(e.id)},(0,th.LI)(e)?o.createElement(tc.Ay,{className:"p-r_member_profile_dm_member_entity",id:(0,t_.e)(e),onlyBoldIfUnread:!0,showAvatar:!0,useShortMode:!0,showPresence:!1,showStatus:!1}):o.createElement(td.b,{id:e.id,className:"p-r_member_profile_dm_member_entity",mpim:e,onlyBoldIfUnread:!0,showAvatar:!0,disableTooltip:!0,truncate:!1}))),b=m&&o.createElement(ts.A,{className:"p-r_member_profile_conversations_entity",autoClogProps:_.seeAllDms,onClick:h},tC.t("See all conversations with "),s);return o.createElement(R.A,{key:`${t.id}-recentDMs`,title:tC.t("Recent DMs")},f,b)};RecentDmsSection.displayName="RecentDmsSection";var tk=a(0x2357b6329),tv=a(0xc05a06ac);let ProfileTagsElement=({section:e,element:t,memberId:a,onEdit:n})=>{let[r,i]=(0,o.useState)(!1),l=(0,eL.Yc)(),s=(0,o.useCallback)(()=>n(e,t.id??null),[e,t.id,n]),c=(0,o.useCallback)(()=>{i(!r)},[r]);if(t.isMissing)return o.createElement(eJ.A,{key:`${t.id}`,element:t,profileId:a,onOpenEditModal:s});let m=(t.tags??[]).map(e=>o.createElement(tv.S,{key:`${t.id}:${e}`,tag:e,filterFieldValue:e,element:t,memberId:a})),u=m.length>10,p=r?l.showLess:l.showMore,h={elementName:"profile_tags_element_show_more",eventId:I.EventId.USER_PROFILE_SHOW_MORE_TAGS_CLICK,onClick:{enableClogAction:!0},profileId:a,uiComponentName:"profile_multi_value_tags"},_=o.createElement(d.A,{className:"profile_tags_element_expand_link",onClick:c,autoClogProps:h},p),f=u?m.slice(0,10):m,g=o.createElement(o.Fragment,null,o.createElement(tk.d,{className:"margin_left_25_negative"},r?m:f),u&&_);return o.createElement(b.A,{key:`${t.id}`,label:t.label??"",value:g,dataQA:"profile-tags-element",labelClassName:"margin_bottom_25"})};ProfileTagsElement.displayName="ProfileTagsElement";var tS=a(0x1b3ecb90f),tI=a(0x15a4ffb05);let TextElement=({section:e,element:t,onEdit:a,disableFiltering:n,isDeleted:r,profileId:i})=>{let l=(0,o.useMemo)(()=>[t.text??""],[t]),s=(0,o.useCallback)(()=>a(e,t.id??null),[e,t.id,a]);if(t.isMissing)return o.createElement(eJ.A,{key:`${t.id}`,element:t,profileId:i,onOpenEditModal:s});let c=`userprofile_${e.type}_link`.toLowerCase(),d=I.EventId.USERPROFILE_GENERIC_SECTION_LINK_CLICK,m=I.UiComponentName.USERPROFILE_GENERIC_SECTION_LINK;e.type===B.mE.Affiliations&&(d=I.EventId.USERPROFILE_AFFILIATIONS_SECTION_LINK_CLICK,m=I.UiComponentName.USERPROFILE_AFFILIATIONS_SECTION_LINK);let u=t.isFilterable&&t.legacyFieldId&&!n&&!r?o.createElement(e7.A,{fieldId:t.legacyFieldId,fieldValue:l,autoClogProps:{eventId:d,elementName:c,uiComponentName:m,profileId:i,onClick:{enableClogAction:!0}}}):o.createElement(tI.A,{text:t?.text||"",inputIsEscaped:!1,emojiSize:tS.lw.MEDIUM});return o.createElement(b.A,{key:`${t.id}`,label:t.label??"",value:u})};TextElement.displayName="TextElement";let tw=new c.Ay("team"),RimetoProfileSections=({memberId:e,queryData:t,refetch:a,isDeleted:n=!1})=>{let[r,i]=(0,o.useState)(!1),[l,c]=(0,o.useState)(),[h,_]=(0,o.useState)(null),f=(0,p.bS)(),onOpenEditModal=(e,t)=>{c(e),_(t),i(!0)},b=r&&l?o.createElement(EditProfileSectionForm,{key:"profile-sections-edit-modal",onClose:()=>{i(!1)},section:l,memberId:e,focusedElementId:h,refetch:a}):null,g=(0,w.d4)(u.A),A=(0,w.d4)(m.A),x=(0,w.d4)(isProfileTrailblazerEnabled),E=(0,w.d4)(e=>"on"===(0,O._Z)(e,"profile_section_recent_dm"));if(!t?.user||!t.user.profileSections)return null;let C=t.user.isSelf,k=t.user.profileSections.map(t=>{if(t.type===B.mE.Header)return null;if(t.type===B.mE.Contact)return E?o.createElement(o.Fragment,null,o.createElement(ContactInformationSection,{key:`${t.id}-section`,section:t??null,memberId:e,isSelf:C??null,onOpenEditModal:onOpenEditModal}),o.createElement(RecentDmsSection,{key:`${t.id}-recent-dms`,section:t??null,memberId:e,isSelf:C??null,experimentProfileSectionRecentDMGroupOn:E})):o.createElement(ContactInformationSection,{key:`${t.id}-section`,section:t??null,memberId:e,isSelf:C??null,onOpenEditModal:onOpenEditModal});let a=t.type?`_${t.type}`:"",r=`Edit${t.label}Section`;a===B.mE.People?r=tw.t("Edit People Section"):a===B.mE.AdditionalInfo?r=tw.t("Edit About Me Section"):a===B.mE.Affiliations?r=tw.t("Edit Affiliations Section"):a===B.mE.OtherScimFields&&(r=tw.t("Edit Other Scim Field Section"));let i=C?o.createElement(d.A,{"aria-label":r,onClick:()=>onOpenEditModal(t,null),autoClogProps:{profileId:e,uiComponentName:`${I.UiComponentName.USERPROFILE_EDIT_LINK_SECTION}${a}`,displayName:"",elementName:"userprofile_edit_link",eventId:I.EventId.USERPROFILE_EDIT_LINK_CLICK,onClick:{enableClogAction:!0}}},o.createElement("span",{className:"bold"},tw.t("Edit"))):null,l=[],mapElements=a=>(t.profileElements??[]).map(r=>{switch(r.__typename){case"ProfileCurrentLocationElement":return o.createElement(RimetoProfileCurrentLocation,{key:`${r.id}`,currentLocation:r});case"ProfileTagsElement":if(!g)return null;return o.createElement(ProfileTagsElement,{key:r.id,element:r,section:t,memberId:e,onEdit:onOpenEditModal});case"ProfileTextElement":return o.createElement(TextElement,{key:r.id,element:r,section:t,profileId:e,onEdit:onOpenEditModal,disableFiltering:a,isDeleted:n});case"ProfileDateElement":return o.createElement(DateElement,{key:r.id,element:r,section:t,profileId:e,onEdit:onOpenEditModal,isDeleted:n});case"ProfileLinkElement":return o.createElement(ProfileLinkElement,{key:r.id,element:r,section:t,onEdit:onOpenEditModal,eventId:I.EventId.USERPROFILE_GENERIC_SECTION_LINK_CLICK,elementName:"userprofile_generic_link",uiComponentName:I.UiComponentName.USERPROFILE_GENERIC_SECTION_LINK,profileId:e});case"ProfileLongTextElement":return o.createElement(ProfileLongTextElement,{key:r.id,element:r,section:t,profileId:e,onEdit:onOpenEditModal});default:return null}});if(mapElements.displayName="mapElements",t.type===B.mE.People){let a=(t?.profileElements??[]).filter(e=>"manager"===e.elementKey)?.[0]??null,n=(t?.profileElements??[]).filter(e=>"report"===e.elementKey)?.[0],r=a?.__typename==="ProfilePersonElement"?a?.persons??[]:[],i=n?.__typename==="ProfilePersonElement"&&A?n?.persons??[]:[];(r.length||i.length)&&l.push(o.createElement(RimetoProfileScimPeople,{key:`${t.id}-scim-people`,managerLabel:a?.label??"",reportLabel:n?.label??"",memberId:e,reportElementPersons:i,managerElementPersons:r})),(t.profileElements?.filter(e=>!e.isScimManaged)??[]).forEach(a=>{a.type===B.D1.Person&&a.isMissing&&l.push(o.createElement(eJ.A,{profileId:e,key:`${a.id}`,element:a,onOpenEditModal:()=>onOpenEditModal(t,a.id??null)})),"ProfilePersonElement"===a.__typename&&l.push(o.createElement(y.A,{key:`${a.id}-org-section`,label:a?.label??"",memberIds:(a?.persons??[]).filter(s.b),truncationCount:7}))})}else l=mapElements(t.type===B.mE.Affiliations&&!A);if(l?.length===0)return null;if(x&&t.type===B.mE.Custom&&("Trailhead"===t.label||"Trailblazer information"===t.label)){let a=(t?.profileElements??[]).filter(e=>"Trailblazer Id"===e.label||"Trailblazer ID"===e.label)?.[0]??null,n=a?.text??"";if(n){let r=n,i=n;n.indexOf("://")>0?r=n.slice(n.lastIndexOf("/")+1):i=`https://www.salesforce.com/trailblazer/${n}`;let s={displayText:r,uri:i,...a};(l=[o.createElement(ProfileLinkElement,{key:a.id,element:s,section:t,onEdit:onOpenEditModal,eventId:I.EventId.USERPROFILE_GENERIC_SECTION_LINK_CLICK,elementName:"userprofile_generic_link",uiComponentName:I.UiComponentName.USERPROFILE_GENERIC_SECTION_LINK,profileId:e})]).push(o.createElement(U,{trailblazerId:n}))}}return o.createElement(R.A,{key:`${t.id}-section`,title:t.label??"",titleBarSecondary:!f&&t.canEdit&&i},l)});return o.createElement(o.Fragment,null,k,b)};RimetoProfileSections.displayName="RimetoProfileSections";let tT=RimetoProfileSections},0x52c99391:(e,t,a)=>{"use strict";a.d(t,{A:()=>c,w:()=>AddLink});var n=a(0xbad225b5),r=a(0x11a296110),i=a(0x2501a2cee),l=a(0x2221c4a86),o=a(0x2f4e09f8),s=a(0x3711e82d);let AddLink=({label:e,type:t,profileId:a,onClick:l})=>n.createElement(r.Nm,{className:"p-rimeto_profile_sections__element--edit",onClick:l,autoClogProps:{profileId:a,uiComponentName:`${s.UiComponentName.USERPROFILE_ADD_MISSING_ELEMENT}_${t}`,elementName:"add_missing_element_link",eventId:s.EventId.USERPROFILE_ADD_MISSING_ELEMENT_LINK_CLICK,onClick:{enableClogAction:!0}}},n.createElement("div",null,n.createElement(i.Ah,{name:"plus-filled",inline:!0}),n.createElement("span",{className:"p-rimeto_profile-sections__element--add"},"\xa0",e))),MissingElement=({element:e,profileId:t,onOpenEditModal:a})=>{let r=(0,o.dA)(e.label??""),i=n.createElement(AddLink,{onClick:()=>a(),label:r,type:e.type??null,profileId:t});return e.permissions?.ui?n.createElement(l.A,{className:"p-rimeto_profile_sections__set_profile_field",key:`${e.id}`,value:i}):null};MissingElement.displayName="MissingElement";let c=MissingElement},0xc05a06ac:(e,t,a)=>{"use strict";a.d(t,{S:()=>ProfileTag});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x205775ede),o=a(0x1282104f7),s=a(0x3711e82d);let ProfileTag=({tag:e,element:t,memberId:a,filterFieldValue:r})=>{let c=i()({cursor_default:!t?.isFilterable}),d=i()("p-user_profile_tags_element_token",{"p-user_profile_tags_element_token--background":!t?.isFilterable}),m=n.createElement(o.A,{size:"small",label:e,className:d,contentInnerClassName:c}),u=(0,n.useMemo)(()=>r?[r]:[],[r]);if(void 0===t||void 0===r||!t?.isFilterable)return m;let p=t.legacyFieldId??"";return n.createElement(l.A,{autoClogProps:{elementName:"userprofile_tags_element_tag",eventId:s.EventId.USERPROFILE_SMART_TAGS_CLICK,onClick:{enableClogAction:!0},profileId:a,uiComponentName:s.UiComponentName.USERPROFILE_SMART_TAGS_ELEMENT_TAG},fieldId:p,fieldValue:u,fieldDisplay:m,inheritLinkColor:!0})};ProfileTag.displayName="ProfileTag"},0x2f4e09f8:(e,t,a)=>{"use strict";a.d(t,{ND:()=>useAtlasI18nConfirmContactInfoCopied,Wu:()=>useAtlasI18nAddPersonSubtext,Yc:()=>useAtlasI18nProfileTagsLabels,dA:()=>useAtlasI18nUserAddElement,du:()=>useAtlasI18nEditSectionLabels,ge:()=>useAtlasI18nCopyContactInfo,yQ:()=>useAtlasAddAudioRecordingText});var n=a(0x20482ad21),r=a(0x22fe0c196),i=a(0x226892387);let l=new n.Ay("rimeto_user_profile");function useAtlasI18nUserAddElement(e){return l.t("Add {data_element_label}",{data_element_label:e,__react:!0})}function useAtlasI18nAddPersonSubtext(){return l.t("Add the names of people you work with. When you add a related teammate to your profile, your relationship may also appear on their profile.")}function useAtlasI18nCopyContactInfo(){return l.t("Copy")}function useAtlasI18nConfirmContactInfoCopied(){return l.t("Copied!")}function useAtlasAddAudioRecordingText(){return{addAudioLabel:l.t("Record Audio Clip"),stopRecording:l.t("Stop recording"),attachRecording:l.t("Attach recording"),cancelRecording:l.t("Cancel recording"),playNamePronunciation:l.t("Play name pronunciation")}}function useAtlasI18nEditSectionLabels(){return{tooltipLockIconText:l.t("This information is provided by your Slack administrator.")}}function useAtlasI18nProfileTagsLabels(e){let t=(0,i.d4)(r.A);return{showMore:t?l.t("Show more"):"",showLess:t?l.t("Show less"):"",errorMaxTags:t?l.t("{maxTags} tags maximum",{maxTags:e?.maxTags??0,__react:!0}):"",editTagsHint:t?l.t("Hit Enter to add tag"):"",editTagsLeftHint:t?l.t("{tagsLeft} tags left",{tagsLeft:e?.tagsLeft??0,__react:!0}):"",editTagsLeftHintSingular:t?l.t("{tagsLeft} tag left",{tagsLeft:e?.tagsLeft??0,__react:!0}):"",createTagText:e=>t?l.t('Create "{option}"',{option:e,__react:!0}):""}}},0x11c46e4be:(e,t,a)=>{"use strict";a.d(t,{z:()=>convertSectionToProfileInput});var n=a(0x19b3ba9fd);function convertSectionToProfileInput(e){return(e.profileElements?.map(e=>{let t=e.elementId;if(!t)return null;switch(e.__typename){case"ProfileCurrentLocationElement":return{element_id:t,currentLocation:{city:e.city??"",country:e.country??"",description:e.description??"",state:e.state??""}};case"ProfileTagsElement":return{element_id:t,tags:{tags:e.tags??[]}};case"ProfileTextElement":return{element_id:t,text:{text:e.text??""}};case"ProfileDateElement":return{element_id:t,date:{date:e.date??""}};case"ProfileLinkElement":return{element_id:t,link:{displayText:e.displayText??"",uri:e.uri??""}};case"ProfilePersonElement":return e.isScimManaged?null:{element_id:t,person:{persons:e.persons??[]}};case"ProfileLongTextElement":return{element_id:t,long_text:{blocks:e.blocks??""}};case"ProfileFileElement":return{element_id:t,file:e.fileId?{fileId:e.fileId}:null};default:return null}})??[]).filter(n.b)}},0x19eab7fe0:(e,t,a)=>{"use strict";a.d(t,{A:()=>V});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1595bdd0),o=a(0x20482ad21),s=a(0x1e864b930),c=a(0x205f4fb61),d=a(0x16ac9b089),m=a(0x11a296110),u=a(0x2501a2cee),p=a(0x4c96e5d9),h=a(0x1c659cbb1),_=a(0x238ee6f5d),f=a(0x10cf39bbb),b=a(0x1372bbdf7),g=a(0x12185e091),y=a(0x280afe13),A=a(0xf6ed6f31),x=a(0xbd3de346),E=a(0x1b9d5cc0c),C=a(0x2378cf6ec),k=a(0x4b8e0952),v=a(0x22bc2c520),S=a(0x3711e82d),I=a(0x1529370e7),w=a(0x107e97a6b),T=a(0x1c91944c9),N=a(0x162ff0093),M=a(0x217553e42),R=a(0x14149c126),P=a(0x14ea3ce99),L=a(0x21c11a1dc),O=a(0xe684f705),D=a(0xc1360909),F=a(0x2207a1e7d);let U=new o.Ay("channel_header"),B={uiStep:S.UiStep.VIEW_HEADER_ACTION,elementName:"avatar_stack_avatars",elementValue:"avatar_stack",onClick:{enableClogAction:!0}},H=class extends n.PureComponent{static defaultProps={showFiveAvatars:!1,showPresence:!1,inBanner:!1,showIconOnly:!1,refToForward:void 0,hideOutline:!1,showAgents:!1,experimentAgentChannelHeaderGroupOn:!1,experimentViewHeaderButtonPolishGroupOn:!1};constructor(e){super(e),this.onClick=this.onClick.bind(this)}onClick(){let{channelId:e}=this.props;this.props.showAgents?this.props.openAboutChannelModal({id:e,defaultTab:f.n.Agents}):this.props.openAboutChannelModal({id:e,defaultTab:f.n.Members})}makeImageStackAriaLabel(){let{member1:e,member2:t,member3:a,member4:n,member5:r,memberName1:i,memberName2:l,memberName3:o,memberName4:c,memberName5:m,memberCount:u}=this.props,p=[{member:e,name:i},{member:t,name:l},{member:a,name:o},{member:n,name:c},{member:r,name:m}].filter(({member:e})=>!(0,k.z1)(e)).map(({name:e})=>e).filter(e=>void 0!==e);return U.t("View {memberCount, plural, =1 {# member} other {all # members}}. Includes {users}.",{memberCount:u,users:(0,d.Ay)((0,s.A)(p,{noEscape:!0}).join(""))})}renderAvatars(){let{member1:e,member2:t,member3:a,member4:r,member5:l,memberIsActive1:o,memberIsActive2:s,memberIsActive3:c,memberIsActive4:d,memberIsActive5:m,showFiveAvatars:u,showPresence:p,memberCount:_,inBanner:f}=this.props;if(!_||!e)return n.createElement(n.Fragment,null,n.createElement("div",{className:"p-avatar_stack__avatar p-avatar_stack__avatar--placeholder"}),n.createElement("div",{className:"p-avatar_stack__avatar p-avatar_stack__avatar--placeholder"}),n.createElement("div",{className:"p-avatar_stack__avatar p-avatar_stack__avatar--placeholder"}),u&&n.createElement(n.Fragment,null,n.createElement("div",{className:"p-avatar_stack__avatar p-avatar_stack__avatar--placeholder"}),n.createElement("div",{className:"p-avatar_stack__avatar p-avatar_stack__avatar--placeholder"})));let b=[{memberId:(0,E.K6)(e),isActive:o},{memberId:(0,E.K6)(t),isActive:s},{memberId:(0,E.K6)(a),isActive:c},{memberId:(0,E.K6)(r),isActive:d},{memberId:(0,E.K6)(l),isActive:m}];return p?b.slice(0,5).map((e,t)=>e.memberId&&n.createElement("div",{className:"p-avatar_stack__with_presence",style:{zIndex:b.length-t},key:e.memberId},n.createElement(h.Ay,{className:i()("p-avatar_stack__avatar",{"p-avatar_stack__avatar--in_banner":f}),userId:e.memberId,size:20,isInteractive:!1,showPresence:e.isActive}))):b.slice(0,5).map(e=>e.memberId&&n.createElement(h.Ay,{className:i()("p-avatar_stack__avatar",{"p-avatar_stack__avatar--in_banner":f}),userId:e.memberId,size:20,key:e.memberId,isInteractive:!1}))}renderImageStackLabel(){let{memberCount:e,memberName1:t,memberName2:a,memberName3:r,memberName4:i,memberName5:o,isQuipDoc:c,showAgents:d,experimentAgentChannelHeaderGroupOn:m}=this.props;return d&&m?m?U.t("View and add agents to this {entity}",{entity:c?"canvas":"channel"}):"View and add agents":U.rt("View all members of this {entity}<t1>Includes {users}</t1>",{memberCount:e,entity:c?"canvas":"channel",users:(0,s.A)((0,l.A)([t,a,r,i,o]),{noEscape:!0,react:!0}),"<t1>":({text:e})=>n.createElement("div",{className:"c-tooltip__subtitle"},e)})}renderDetailsAvatarStack(){let e,{channelIsIm:t,memberCount:a,inBanner:r,showIconOnly:l,isQuipDoc:o,refToForward:s,hideOutline:d,hasHuddleParticipants:h,showAgents:_,experimentAgentChannelHeaderGroupOn:f,experimentViewHeaderButtonPolishGroupOn:b}=this.props;if(t)return null;let g=this.renderImageStackLabel(),y=this.makeImageStackAriaLabel(),A=i()("p-avatar_stack--details",{"p-avatar_stack--no-outline":d,"p-avatar_stack--active_huddle":h,"p-avatar_stack--icon_only":l,margin_right_50:o,"p-avatar_stack--details--polish":b}),x=_&&f,E=x?{...B,elementName:"avatar_stack_agents"}:B;e=x?a&&a>0?a:null:void 0===a||isNaN(a)?"\u2013":(0,c.Ay)(a);let C="user";return x&&(C=a&&a>0?"bot":"add-bot"),n.createElement(p.Ay,{tip:g,position:"bottom",hideFromScreenReader:!0},n.createElement(m.Nm,{className:A,onClick:this.onClick,"aria-label":y,"data-qa":"avatar_stack",autoClogProps:E,ref:s},n.createElement("span",{className:"p-avatar_stack__stack__user_icon"},n.createElement(u.Ah,{inline:!0,size:"20",name:C})),n.createElement("div",{className:"p-avatar_stack__stack__avatars"},!l&&this.renderAvatars(),e&&n.createElement("span",{className:i()("p-avatar_stack__count",{"p-avatar_stack__count--in_banner":r})},e))))}render(){let{channelId:e}=this.props;return e?this.renderDetailsAvatarStack():null}};H.displayName="AvatarStack";let mapStateToProps=(e,{channelId:t,showFiveAvatars:a,showPresence:r,showAgents:i})=>{let l,o=a?5:3,s=(0,I.Ay)(t),c=(0,M.OL)(e,t),d="on"===(0,R._Z)(e,"agent_channel_header"),m="on"===(0,R._Z)(e,"view_header_button_polish"),u=[];if((0,g.LI)(c)){let t=(0,y.e)(c);l=1,u=[(0,O.nv)(e,t)]}else if(s){let a=(0,w.QY)(t),n=(0,P.Lp)(e,a??"");l=(u=(0,x.Df)(n).map(t=>(0,O.nv)(e,t.user_id))).length}else if(!(0,g.Zp)(c)||(0,A.bl)(c)){let a=(0,D.q8)(e,t);l=i?a?.counts?.agent_count??0:a?.counts?.member_count,u=(0,v.A)(e,t,o,Math.max((0,b.UL)(),o),r??!1)}let p=u.map(t=>(0,E.fy)(t)?U.t("you"):(0,k.tJ)(t)?n.createElement(_.A,{key:t.id,type:"unknown",subtler:!0}):(0,k.ow)(t)?n.createElement(_.A,{key:t.id,type:"non-existent",subtler:!0}):(0,C.I)(e,(0,E.K6)(t))),h=[];r&&(h=u.map(t=>"active"===(0,F.gd)(e,(0,E.K6)(t))));let f=!!t&&(0,L.LY)(e,t)>0;return{channelId:t,memberCount:l,member1:u.at(0),member2:u.at(1),member3:u.at(2),member4:u.at(3),member5:u.at(4),memberName1:p.at(0),memberName2:p.at(1),memberName3:p.at(2),memberName4:p.at(3),memberName5:p.at(4),memberIsActive1:h.at(0)??!1,memberIsActive2:h.at(1)??!1,memberIsActive3:h.at(2)??!1,memberIsActive4:h.at(3)??!1,memberIsActive5:h.at(4)??!1,channelIsIm:(0,g.LI)(c),isQuipDoc:s,hasHuddleParticipants:f,experimentAgentChannelHeaderGroupOn:d,experimentViewHeaderButtonPolishGroupOn:m}};mapStateToProps.displayName="mapStateToProps";let W={openAboutChannelModal:N.A},V=(0,T.N)(mapStateToProps,W)(H)},0x10b603e91:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xd9faf062);let o=class extends n.PureComponent{static defaultProps={...l.Gs,type:l.QE.neutral,preventTypeOverride:!1};bannerType;banner;constructor(e){super(e),this.bannerType=e.type,this.focus=this.focus.bind(this),this.banner=n.createRef(),e.preventTypeOverride||(this.bannerType=e.type&&e.type===l.QE.urgent?l.QE.urgent:l.QE.neutral)}focus(){this.banner.current?.focus()}render(){let{type:e,className:t,...a}=this.props,r=i()("p-ia_banner",t);return n.createElement(l.Ay,{ref:this.banner,type:this.bannerType,...a,className:r})}};o.displayName="IABanner";let s=o},0x9a9ebaeb:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x102edf836);let o=n.forwardRef(({onClick:e,children:t,className:a,size:r="small",...o},s)=>n.createElement(l.Ay,{ref:s,className:i()(a,"margin_left_50"),onClick:e,size:r,type:"outline",...o},t))},0x1c5dfed61:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x99233ecb),l=a(0x2501a2cee),o=a(0x9a9ebaeb);let ViewHeaderPrimaryDropdownButton=({title:e,svgIconProps:t,renderCreateMenu:a,onPopoverOpen:s,onPopoverClose:c,position:d="bottom",autoClogProps:m})=>n.createElement(i.cQ,{position:d,onPopoverOpen:s,renderMenu:a,onPopoverClose:c},n.createElement(o.A,{className:"p-explorer_controls__button_drop_down",onClick:r.A,autoClogProps:m},t&&n.createElement("span",{className:"margin_right_25"},n.createElement(l.Ah,{size:"16",...t})),e));ViewHeaderPrimaryDropdownButton.displayName="ViewHeaderPrimaryDropdownButton";let s=ViewHeaderPrimaryDropdownButton},0x19729544:(e,t,a)=>{"use strict";a.d(t,{o:()=>n});let n=(0,a(0xbad225b5).createContext)({shouldUseLeadingEmojiForIcon:!1,stopAnimations:!1,disableSelection:!1,disableHighlights:!1})},0x13b8c2941:(e,t,a)=>{"use strict";a.d(t,{Vw:()=>i,ZV:()=>l});var n,r=a(1927545e3),i=((n={}).HOME="home",n.DMS="dms",n.ACTIVITY="activity",n.ACTIVITY_INBOX="activity-inbox",n.LATER="later",n.ASSISTANT="assistant",n.SEARCH="search",n.BROWSE="browse",n.BROWSE_PEOPLE="browse_people",n.BROWSE_CHANNELS="browse_channels",n.BROWSE_APPS="browse_apps",n.BROWSE_SHORTCUTS="browse_shortcuts",n.WORKFLOW_TEMPLATES="workflow_templates",n.BROWSE_USER_GROUPS="browse_user_groups",n.BROWSE_SLACK_CONNECT="browse_slack_connect",n.BROWSE_ORG_DIRECTORY="browse_org_chart",n.BROWSE_EXTERNAL_WORKSPACES="browse_external_workspaces",n.BROWSE_HUDDLES="browse_huddles",n.PLATFORM="platform",n.INBOX="inbox",n);r.c.BrowseChannels,r.c.BrowsePeople,r.c.Apps,r.c.Shortcuts,r.c.BrowseWorkflowTemplates,r.c.BrowseUserGroups,r.c.SlackConnect,r.c.BrowseOrgChart,r.c.Recents,r.c.BrowseExternalWorkspaces,r.c.Huddles;let l={browse:r.c.Recents,browse_channels:r.c.BrowseChannels,browse_slack_connect:r.c.SlackConnect,browse_people:r.c.BrowsePeople,browse_user_groups:r.c.BrowseUserGroups,browse_org_chart:r.c.BrowseOrgChart,browse_apps:r.c.Apps,browse_shortcuts:r.c.Shortcuts,browse_external_workspaces:r.c.BrowseExternalWorkspaces,browse_huddles:r.c.Huddles}},0x16de15c4e:(e,t,a)=>{"use strict";a.d(t,{C1:()=>looksLikeInstantSlackTeam,lR:()=>clearInstantSlackSessionData,o7:()=>getInstantSlackSessionData,y0:()=>i}),a(0x1ecc7f772);let n=/^IS\d{19}$/,r="instantSlackSessionData",i="save_instant_slack_conversation",looksLikeInstantSlackTeam=e=>n.test(e?.name??""),getInstantSlackSessionData=()=>{try{let e=localStorage.getItem(r);return e?JSON.parse(e):{}}catch{return{}}},clearInstantSlackSessionData=()=>{localStorage.removeItem(r)}},0x3be5e673:(e,t,a)=>{"use strict";a.d(t,{v:()=>isClipsSuperReactionsExperimentEnabled});var n=a(0x14149c126);let isClipsSuperReactionsExperimentEnabled=e=>"on"===(0,n._Z)(e,"clips_super_reactions")},0xb29800d7:(e,t,a)=>{"use strict";a.d(t,{A:()=>use_reactions});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1aba66b56),l=a(0x1df96de4c),o=a(0x3be5e673),s=a(0x1e2051844),c=a(0x658a411c),d=a(0x226892387),m=a(0xd93ecf94);let use_original_message_context=function({channelId:e,ts:t,fileId:a}){let r=(0,d.d4)(o.v),l=(0,d.d4)(a=>r&&e&&t?(0,m.Ld)(a,e,t):null),{originalChannelId:u,originalMessageTs:p}=(0,n.useMemo)(()=>{let n={originalChannelId:e,originalMessageTs:t};if(l&&a){if((0,i.A)(l.files,a))return n;let e=(0,s.A)(l.attachments,e=>(0,c.A)(e.files,{id:a}));if(e&&e.channel_id&&e.ts)return{originalChannelId:e.channel_id,originalMessageTs:e.ts}}return n},[l,a,e,t]);return{originalChannelId:u,originalMessageTs:p}};var u=a(0x52307e1f),p=a(0x1d3c4f4d8),h=a(0xf5bbd10a),_=a(0xbd3de346),f=a(0x3fb798cf),b=a(0xa985ed31),g=a(0x19c76d181),y=a(0x8b361941),A=a(0x2e0b73c5),x=a(0x2310bbdde);let use_reactions=function({channelId:e,ts:t,file:a,clogButton:s,duration:c}){let m=(0,h.A)(),E=(0,r.wA)(),C=(0,d.d4)(o.v),k=(0,d.d4)(g.WR),v=a?.id,{originalChannelId:S,originalMessageTs:I}=use_original_message_context({channelId:e,ts:t,fileId:v}),w=C&&S&&I&&v&&(0,b.A)(v)&&(0,_._y)(a),T=(0,d.d4)(e=>{if(w&&S&&I&&v&&!(0,f.A)(I))return(0,y.V)(e,{channelId:S,ts:I,fileId:v})});(T?.isUnknown||T?.isNonExistent)&&(w=!1);let N=T?.reactions,M=(0,n.useCallback)(e=>{if(!w||!S||!I||!v)return;let t=e.offsetMs,a=N?.find(a=>a.name===e.name&&500>Math.abs(t-a.offsetMs));a&&(0,i.A)(a.users,k)?m.info("MEDIA-REACTIONS","ignoring duplicate"):(E((0,A.b)({channelId:S,fileId:v,ts:I,reaction:{offsetMs:t,name:e.name,user:k}})),E((0,u.N)({channel:S,messageTimestamp:I,file:v,name:e.name,offsetMs:e.offsetMs,reason:"useMediaReactions"})),s("add_reaction",{duration_reacted_ms:t,progress_percent:Math.floor((c?t/(1e3*c):0)*100),quick_reaction:e.isQuickReaction,custom_emoji:!e.isQuickReaction}))},[w,S,I,v,N,E,k,s,c,m]),R=(0,n.useCallback)(({name:e,offsetMs:t})=>{w&&S&&I&&v&&N&&N.find(a=>a.offsetMs===t&&a.name===e&&(0,i.A)(a.users,k))&&(E((0,x.W)({channelId:S,fileId:v,ts:I,reaction:{offsetMs:t,name:e,user:k}})),E((0,p.Q)({channel:S,messageTimestamp:I,file:v,name:e,offsetMs:t,reason:"useMediaReactions"})),s("remove_reaction"))},[w,S,s,k,E,v,N,I]);return{reactions:N??l.Ml,addReaction:w?M:void 0,removeReaction:w?R:void 0}}},0x39d78206:(e,t,a)=>{"use strict";a.d(t,{A:()=>v});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x17294c72a),o=a(0x7d48dd65),s=a(0x1aba66b56),c=a(0x20bafd237),d=a(0x839ba347),m=a(0x24c261bcb),u=a(0x153c664af),p=a(0xe180a236),h=a(0x6258badf),_=a(0x7fa3cc8f),f=a(0x1b3ecb90f),b=a(0xa12b0a9a),g=a(0x32f90b85);function MediaReactionsConfettiItem({reaction:e,size:t,id:a,removeItem:r}){let{x:i,y:l,angle:o}=(0,b.d)(()=>{let e=30*Math.random()+5,t=-1*e*(Math.PI/180);return{x:0*Math.cos(t)-150*Math.sin(t),y:150*Math.cos(t)+0*Math.sin(t),angle:e}}),s=(0,n.useCallback)(()=>{r(a)},[a,r]);(0,g.Z)(s,2100,[s]);let c={"--media_reactions_confetti_x":`${i}px`,"--media_reactions_confetti_y":`-${l}px`,"--media_reactions_confetti_rotation":`${o/2}deg`};return n.createElement("div",{style:c,className:"p-media_reactions_confetti__emoji_container",onAnimationEnd:s},n.createElement(f.Ay,{className:"p-media_reactions_confetti__emoji",text:e.name,emojiSize:t,renderEmojiFallback:!0}))}MediaReactionsConfettiItem.displayName="MediaReactionsConfettiItem";let y=MediaReactionsConfettiItem;var A=a(0x7bc42e7e),x=a(0x1ccef1c6f),E=a(0x226892387),C=a(0x19c76d181),k=a(0x3384beeb);function MediaReactionsConfetti({className:e,reactions:t,elapsed:a,isPlaying:r,size:f=k.lw.MEDIUM}){let b=(0,E.d4)(C.WR),g=(0,E.d4)(A.P),v=(0,E.d4)(e=>!(0,x.ty)(e,"a11y_animations")),S=(0,n.useCallback)(({reaction:e,index:t})=>`${e.name}-${e.offsetMs}-${t}`,[]),I=(0,n.useMemo)(()=>{let e=(0,l.A)(t,"offsetMs"),a=(0,o.A)(e,e=>!(0,s.A)(e.users,b)),n=[];return(0,d.A)(a,e=>{(0,m.A)(Math.min(10,e.users?.length||1)).forEach(t=>{let a;void 0===(a=(0,c.A)(n)?.offsetMs)||e.offsetMs-a>125?n.push({offsetMs:e.offsetMs,reaction:e,index:t}):n.push({offsetMs:a+125,reaction:e,index:t})})}),n},[b,t]),[w,T]=(0,n.useState)({});(0,n.useEffect)(()=>{if(!r||g||v)return;let e={},t=1e3*a,n=(0,u.A)(I,{offsetMs:t},"offsetMs");for(let a=n-1;a>=0;a--){let n=I[a];if(n.offsetMs>=t-500){let t=S(n);w[t]||(e[t]=n)}else break}(0,p.A)(e)>0&&T({...w,...e})},[r,a,I,w,S,g,v]);let N=(0,n.useCallback)(e=>{T(t=>t[e]?(0,h.A)(t,e):t)},[]);return n.createElement("div",{className:i()("p-media_reactions_confetti__container",e)},(0,_.A)(w).map(e=>{let t=S(e);return n.createElement(y,{key:t,reaction:e.reaction,size:f,id:t,removeItem:N})}))}MediaReactionsConfetti.displayName="MediaReactionsConfetti";let v=MediaReactionsConfetti},0xdf10f0d0:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xe0376d2),o=a(0x20ef3966f),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x15f8e452a),m=a(0x4c96e5d9),u=a(0x1b3ecb90f),p=a(0x3be5e673),h=a(0x1faaed399);function MediaReactionsEmojiPickerTrigger({pauseOnOpen:e=!0,videoRef:t,addReaction:a,setIsEmojiMenuOpen:r,children:i,clogButton:l}){let o=(0,n.useRef)(!1),s=(0,n.useCallback)(()=>{r?.(!0);let a=t.current;e&&a&&a.isPlaying()?(o.current=!0,a.pause()):o.current=!1,l("reaction_picker")},[r,t,e,l]),c=(0,n.useCallback)(()=>{r?.(!1),o.current&&t.current?.play()},[t,r]),d=(0,n.useCallback)((e,n)=>{a({name:n,offsetMs:Math.floor(1e3*(t.current?.getCurrentTime()||0)),isQuickReaction:!1})},[a,t]);return n.createElement(h.A,{onClick:s,onClose:c,onEmojiSelected:d,position:"bottom-right",hideAddEmojiButton:!0},i)}MediaReactionsEmojiPickerTrigger.displayName="MediaReactionsEmojiPickerTrigger";let _=MediaReactionsEmojiPickerTrigger;var f=a(0x226892387),b=a(0x1c9a3f62b);let g=new s.Ay("stories_av");function MediaReactionsOneClickBar({className:e,addReaction:t,reactionsSummary:a,videoRef:r,setIsEmojiMenuOpen:s,isCompact:u,clogButton:p}){let h=(0,n.useCallback)(e=>{t({name:e,offsetMs:Math.floor(1e3*(r.current?.getCurrentTime()||0)),isQuickReaction:!0})},[t,r]),y=(0,f.d4)(b.H_),A=(0,l.A)([...(0,o.A)(a,"name"),...y,"heart","joy","+1"]),x=g.t("Add reaction\u2026");return n.createElement("div",{className:i()("p-media_reactions_one_click_bar",e)},n.createElement(EmojiButton,{name:A[0],addReaction:h}),!u&&n.createElement(EmojiButton,{name:A[1],addReaction:h}),!u&&n.createElement(EmojiButton,{name:A[2],addReaction:h}),n.createElement(_,{pauseOnOpen:!0,videoRef:r,addReaction:t,setIsEmojiMenuOpen:s,clogButton:p},n.createElement(m.Ay,{tip:x},n.createElement(c.Nm,{className:"p-media_reactions_one_click_bar__button p-media_reactions_one_click_bar__emoji_picker_trigger","aria-label":x},n.createElement(d.A,{type:"add-reaction",size:"inherit"})))))}MediaReactionsOneClickBar.displayName="MediaReactionsOneClickBar";let y=n.memo(MediaReactionsOneClickBar);function EmojiButton({name:e,addReaction:t}){let a=(0,n.useCallback)(()=>{t(e)},[t,e]);return(0,f.d4)(p.v)?n.createElement(m.Ay,{tip:g.t("React with {emoji}",{emoji:e})},n.createElement(c.Nm,{className:"p-media_reactions_one_click_bar__button",onClick:a},n.createElement(u.Ay,{text:e,emojiSize:u.lw.MEDIUM,renderEmojiFallback:!0}))):null}EmojiButton.displayName="EmojiButton"},0x248ad3403:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x17294c72a),o=a(0x7d48dd65),s=a(0x1aba66b56),c=a(0x153c664af),d=a(0x20482ad21),m=a(0xa6f3163b),u=a(0x1b3ecb90f),p=a(0x3be5e673),h=a(0x226892387),_=a(0x3384beeb);let f=new d.Ay("stories_av");function MediaReactionsReelItem({reaction:e,removeReaction:t,size:a}){let r,l=(0,h.d4)(p.v),o=e.users?.length||1,s=(0,n.useCallback)(()=>{t({name:e.name,offsetMs:e.offsetMs})},[e.name,e.offsetMs,t]);return l?(r=o>1?n.createElement("span",{className:"p-media_reactions_reel__item_name"},f.rt("<strong>You and {othersCount, plural, =1 {1 other} other {# others}}</strong> (click to remove)",{othersCount:o-1})):n.createElement("span",{className:"p-media_reactions_reel__item_name"},f.rt("<strong>You</strong> (click to remove)")),n.createElement("div",{className:i()("p-media_reactions_reel__item_container",{"p-media_reactions_reel__item_container--small":a===_.lw.SMALL})},n.createElement(m.A,{className:"p-media_reactions_reel__item",onClick:s},n.createElement(u.Ay,{className:"p-media_reactions_reel__item_emoji",text:e.name,showTooltip:!1,emojiSize:a}),r))):null}MediaReactionsReelItem.displayName="MediaReactionsReelItem";let b=MediaReactionsReelItem;var g=a(0x19c76d181);function MediaReactionsReel({className:e,elapsed:t,reactions:a,removeReaction:r,size:d=_.lw.MEDIUM}){let m=(0,h.d4)(g.WR),u=(0,n.useMemo)(()=>{let e=(0,l.A)(a,"offsetMs");return(0,o.A)(e,e=>(0,s.A)(e.users,m))},[a,m]),p=(0,n.useMemo)(()=>u.map(e=>{let t=e.offsetMs;return{start:t,end:t+5e3,reaction:e}}),[u]),f=1e3*t,y=(0,c.A)(p,{start:f},"start"),A=[];for(let e=y-1;e>=0;e--)if(p[e].start<=f&&p[e].end>=f)A.unshift(p[e]);else break;for(let e=y;e<p.length;e++)if(p[e].start<=f&&p[e].end>=f)A.push(p[e]);else break;return n.createElement(n.Fragment,null,n.createElement("div",{className:i()("p-media_reactions_reel",e)},A.map(({reaction:e})=>n.createElement(b,{key:`${e.offsetMs}-${e.name}`,reaction:e,removeReaction:r,size:d}))))}MediaReactionsReel.displayName="MediaReactionsReel";let y=MediaReactionsReel},0x22450bd9c:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x424ce7f7),o=a(0x7fa3cc8f),s=a(0xe0376d2),c=a(0x357885ff),d=a(0x1595bdd0),m=a(0x20ef3966f),u=a(0x65455bc3),p=a(0x17294c72a),h=a(0x1480e7c40),_=a(0x4c96e5d9),f=a(0x22293baf1),b=a(0x1b3ecb90f),g=a(0x7fbb7bb1),y=a(0x3be5e673),A=a(0x226892387),x=a(0x19c76d181);let MediaScrubberReactionsOverlay=({duration:e,reactions:t,className:a})=>{let r=(0,A.d4)(y.v),E=(0,A.d4)(x.WR);if(!r||!e||e===1/0)return null;let renderDots=a=>{if(!a)return null;let r=e/Math.floor(a/18)||1,g=new Map;for(let a of t){let t=(Math.ceil((Math.min(a.offsetMs,1e3*e-1)+1)/1e3/r)-1)*r,n=a.users?.includes(E)??!1,i=g.get(t);i?(i.reactions.push(a),i.count+=a.count,i.reacted=i.reacted||n):g.set(t,{bucket:t,reactions:[a],count:a.count,reacted:n})}let y=5;for(let e of g.values())e.count>y&&(y=e.count);return[...g.values()].map(t=>{let a=(0,l.A)(t.reactions,"name"),r=(0,o.A)(a).map(e=>{let t=(0,s.A)((0,c.A)((0,d.A)((0,m.A)(e,"users"))));return{...e[0],baseName:e[0].name?.split("::")[0],users:t,reacted:t.includes(E)}}),g=(0,u.A)((0,p.A)(r,["reacted","users.length"]));return n.createElement(_.Ay,{tip:()=>n.createElement(f.A,{reactions:(0,h.A)(g,6),showClickToRemove:!1}),key:`${t.bucket}-${t.count}`},n.createElement("div",{className:i()("p-media_scrubber_reactions_overlay__dot",{"p-media_scrubber_reactions_overlay__dot--reacted":t.reacted,"p-media_scrubber_reactions_overlay__dot--single":1===t.reactions.length&&t.reactions[0].users?.length===1}),style:{left:`${(t.bucket/e*100).toFixed(2)}%`,height:Math.max(16,(t.count/y)**.75*35)}},n.createElement(b.Ay,{className:"p-media_scrubber_reactions_overlay__dot_emoji",text:g[0].name,emojiSize:b.lw.SMALL,renderEmojiFallback:!0,showTooltip:!1})))})};return renderDots.displayName="renderDots",n.createElement(g.A,null,({width:e,measureRef:t})=>n.createElement("div",{className:i()("p-media_scrubber_reactions_overlay",a),ref:t},renderDots(e)))};MediaScrubberReactionsOverlay.displayName="MediaScrubberReactionsOverlay";let E=n.memo(MediaScrubberReactionsOverlay)},0xec2b80f0:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x1e2051844),r=a(0x1df96de4c);let __WEBPACK_DEFAULT_EXPORT__=function(e,t){if(e.media_reactions_summary?.[t])return e.media_reactions_summary?.[t];let a=(0,n.A)(e.attachments,e=>e.media_reactions_summary?.[t]);return a?a.media_reactions_summary?.[t]:r.Ml}},0x37451d7:(e,t,a)=>{"use strict";a.d(t,{U:()=>isPollsEnabled});var n=a(0x14149c126);function isPollsEnabled(e){return"on"===(0,n._Z)(e,"polls")}},0x1bc80af71:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee),o=a(0xf5bbd10a),s=a(0xbd3de346),c=a(0x1abdfd657),d=a(0x226892387),m=a(0x1fb2d2a87),u=a(0x216054933),p=a.n(u);function PollIcon({iconClassName:e,file:t,isFilled:a=!0,size:r="20"}){let u=(0,o.A)(),h=(0,d.d4)(m.to);return t&&!(0,s.Y8)(t)?(u.error(`[PollIcon] Expected Poll file, got ${(0,c.t)(t)}`),null):n.createElement("div",{className:i()(e,p().pollIcon,{[p().pollIconDark]:"dark"===h})},n.createElement(l.Ah,{name:a?"form-filled":"form",size:r}))}PollIcon.displayName="PollIcon";let h=n.memo(PollIcon)},0x1fb48eb63:(e,t,a)=>{"use strict";a.d(t,{A:()=>H});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x15fb82076),d=a(0x2501a2cee),m=a(0x1b3ecb90f),u=a(0x15a4ffb05),p=a(0x1cc55a0eb),h=a(0x37451d7),_=a(0x102edf836),f=a(0x10d53599f),b=a(0x1ecc7f772),g=a(0x82980ab8),y=a(0x20e80190e),A=a(0x226892387),x=a(0x19c76d181),E=a(0x217553e42),C=a(0x14ea3ce99),k=a(0x8d0a2ff1),v=a(0x18d7b9b56),S=a(0xe684f705),I=a(0x1fcbb004d),w=a(0x6f2766a4),T=a.n(w);let N=new o.Ay("polls");function PollResponsesModal({fileId:e,channelId:t}){let a=(0,r.wA)(),i=(0,A.d4)(h.U),l=(0,A.d4)(t=>(0,C.Lp)(t,e)),o=(0,A.d4)(e=>t?(0,E.OL)(e,t):void 0),s=(0,A.d4)(e=>o?(0,b.SB)(e,o):""),c=(0,n.useCallback)(()=>a((0,I.O)()),[a]),[d,p]=(0,n.useState)(!1),w=(0,A.d4)(e=>(0,k.Rl)(e,l.id)),M=l.list_metadata?.schema[1],R=(0,A.d4)(x.WR),P=(0,A.d4)(e=>(0,S.nv)(e,l?.user)),L=(0,n.useMemo)(()=>{let e=new Map;return M?.options?.choices?.forEach(t=>{e.set(t.value,t.label)}),e},[M?.options?.choices]),O=(0,n.useMemo)(()=>{let e=new Map;return M&&w&&Object.values(w).forEach(t=>{t.fields?.[M.key]&&t.fields[M.key].split("|").forEach(a=>{let n=e.get(a);n?n.add(t.createdBy||""):e.set(a,new Set([t.createdBy||""]))})}),e},[M,w]);(0,n.useEffect)(()=>{(async()=>{d||(await a((0,v.D)({listId:l.id,currentUserId:R})),p(!0))})()},[a,l.id,d,p,R]);let D=(0,n.useCallback)(()=>{},[]);return i?n.createElement(y.dW,{maxWidth:520,shouldReturnFocusAfterClose:!0,closeModal:c},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:l?.title,subtitle:o?`Poll in ${s}`:void 0})),n.createElement(y.$m,null,n.createElement(y.qf,null,[...O.keys()].map(e=>{let t=O.get(e),a=t?[...t.values()]:void 0;return n.createElement("div",{key:e,className:T().questionGroup},n.createElement("div",{className:T().questionHeader},n.createElement("span",{className:T().question},n.createElement(u.A,{text:L.get(e),emojiSize:m.lw.SMALL})),n.createElement("span",{className:T().votes},N.t("{count, plural, =1 {# vote} other {# votes}}",{count:O.get(e)?.size}))),a&&a.map(e=>n.createElement(f.A,{className:T().member,key:e,id:e,isActive:!1,showPresence:!1,showAvatar:!0})))}))),n.createElement(y.jl,null,n.createElement("div",{className:T().author},`${(0,g.Fh)(P)||(0,g.wg)(P)} created this poll`),n.createElement(y.ox,null,n.createElement(_.Ay,{onClick:D,type:"outline"},N.t("Share"))))):null}PollResponsesModal.displayName="PollResponsesModal";let M=n.memo(PollResponsesModal);var R=a(0x11c82607b),P=a(0x46dbff89);let L=(0,R.Ay)("Opens poll response viewer",(e,t,{channelId:a,fileId:r})=>{e((0,P.q)({element:n.createElement(M,{channelId:a,fileId:r})}))});L.meta={name:"openPollResponsesModal",key:"createThunkOpenPollResponsesModal",description:"Opens poll response viewer"};var O=a(0x76b3e518),D=a(0x153cbdf74),F=a(0x516421e2),U=a.n(F);let B=new o.Ay("polls"),PollViewer=({file:e,viewContext:t,channelId:a})=>{let i=(0,r.wA)(),o=(0,A.d4)(h.U),[_,f]=(0,n.useState)(!1),b=(0,A.d4)(t=>(0,k.Rl)(t,e.id)),g=(0,A.d4)(x.WR),y=e.list_metadata?.schema[1],E=(0,n.useMemo)(()=>{let e=new Set;return y&&b&&Object.values(b).some(t=>!!(t.createdBy===g&&t.fields?.[y.key])&&(t.fields[y.key].split("|").forEach(t=>e.add(t)),!0)),e},[y,b,g]),C=(0,n.useMemo)(()=>{let e=new Map;return y&&b&&Object.values(b).forEach(t=>{t.fields?.[y.key]&&t.fields[y.key].split("|").forEach(a=>{let n=e.get(a);n?n.add(t.createdBy||""):e.set(a,new Set([t.createdBy||""]))})}),e},[y,b]),S=(0,n.useMemo)(()=>+[...C.values()].reduce((e,t)=>e+t.size,0),[C]),I=(0,n.useCallback)(t=>{let a=new Set(E);a.has(t.value)?a.delete(t.value):(y?.type===D.F.Select&&a.clear(),a.add(t.value)),i((0,O.S)({fileId:e.id,choices:[...a.values()],reason:"rock-the-vote"}))},[y?.type,i,e.id,E]);(0,n.useEffect)(()=>{(async()=>{_||(await i((0,v.D)({listId:e.id,currentUserId:g})),f(!0))})()},[i,e.id,_,f,g]);let w=(0,n.useCallback)(e=>E.has(e),[E]),T=(0,n.useCallback)(()=>{i(L({channelId:a,fileId:e.id}))},[a,i,e.id]),N=(0,n.useCallback)(e=>{if(0===S)return"0%";let t=C.get(e),a=t?+t.size:0;return`${a/S*100}%`},[C,S]),M=(0,n.useCallback)(e=>{let t=C.get(e);return t?[...t.values()]:void 0},[C]);if(!y||!o)return null;let R=y.type===D.F.Select?B.t("Select one option"):B.t("Select one or more options");return n.createElement("div",{className:l()(U().pollViewer,{[U().pollViewerInCanvas]:"canvas"===t})},n.createElement("div",{className:U().title},e.title),n.createElement("div",{className:U().instructions},R),y.options?.choices?.map(e=>{let t=M(e.value);return n.createElement(s.Nm,{onClick:()=>I(e),key:e.value,className:U().choiceButton},n.createElement("div",null,n.createElement("div",{className:U().choiceHeader},n.createElement("div",{className:l()(U().vote,{[U().voteActive]:w(e.value)})},w(e.value)&&n.createElement(d.Ah,{name:"check-filled",inline:!0,size:"inherit"})),n.createElement("span",{className:l()({[U().choiceLabelActive]:w(e.value)})},n.createElement(u.A,{text:e.label,emojiSize:m.lw.SMALL})),t&&n.createElement(n.Fragment,null,n.createElement(p.A,{className:U().facepile,participants:t,avatarSize:20,maxNumFaces:3}),n.createElement("span",{className:l()({[U().choiceLabelActive]:w(e.value)})},M(e.value)?.length))),n.createElement("div",{className:U().progressBar},n.createElement("div",{className:l()(U().progress,{[U().progressActive]:w(e.value)}),style:{width:N(e.value)}}))))}),n.createElement("div",{className:U().viewAll},n.createElement(c.A,{onClick:T},"View all votes")))};PollViewer.displayName="PollViewer";let H=n.memo(PollViewer)},0x2af5332d:(e,t,a)=>{"use strict";a.d(t,{A:()=>O});var n=a(0xbad225b5),r=a(0x3796a18c),i=a(0x20482ad21),l=a(0xc34fd270),o=a(0x74791de4);let ActivityItemMember=({id:e,name:t})=>e?n.createElement(o.A,{userId:e},n.createElement("button",{className:"c-button-unstyled p-notifications_page__item__link",type:"button","aria-label":t},n.createElement(l.Ay,{id:e,showPresence:!1,showAvatar:!1,showStatus:!1,useShortMode:!0}))):null;ActivityItemMember.displayName="ActivityItemMember";var s=a(0x82980ab8),c=a(0x1c91944c9),d=a(0xe684f705),m=a(0x7a13daf2),u=a(0xfd43ac2c),p=a(0x1df96de4c),h=a(0x1cf0d97e1),_=a(0x9b971e7e),f=a(0xca924ee1),b=a(0xe874a88a),g=a(0x1a8cc04e1),y=a(0x1266f1359),A=a(0xc24023c9),x=a(0x20679dcfc),E=a(0x11c82607b),C=a(0x18753d76);let k=(0,E.Ay)("Fetch the Quip Mentions for final ID and upsert",async(e,t,{fileId:a,reason:n="get-and-upsert-quip-thread-id"})=>{let r=(0,x.p)(a);return e((0,A.a)({channelIds:[r],reason:n})).then(t=>{if(0===t.channel_ids.length)return;let n=[];return t.channel_ids.forEach(({mentions:e})=>{e&&e.forEach(e=>{n.push({mentioningUserId:e.mentioning_user_id,ts:e.message_timestamp,sectionId:e.quip_section_id})})}),e((0,C.a4)({fileId:a,mentioningUsers:n})),n})});k.meta={name:"upsertQuipFileMentions",key:"createThunkUpsertQuipFileMentions",description:"Fetch the Quip Mentions for final ID and upsert"};let v=(0,f.A)(e=>new g.Ay({storeKey:"quipFileMentionActivity",fetch:t=>{let a=(0,y.Qw)(t,k({fileId:e}));return v(e).markObjectsAsFresh(t,["quipFileMentionActivity"]),b.S.resolve(a)},isEnabled:()=>!0})),S=(0,h.Ay)((e,t)=>{let a=(0,_.ZT)(e);return v(t).maybeRefetch(a,"quipFileMentionActivity"),e&&e.quipFileMentionActivity&&e.quipFileMentionActivity.items});S.meta={name:"getQuipFileMentionsActivity",key:"createSelectorGetQuipFileMentionsActivity",description:(e,t)=>{let a=(0,_.ZT)(e);return v(t).maybeRefetch(a,"quipFileMentionActivity"),e&&e.quipFileMentionActivity&&e.quipFileMentionActivity.items}};let I=(0,h.Ay)((e,t)=>{let a=e?.quipFileMentionActivity[t],n=new Set;return a&&a.forEach(e=>{n.add(e.mentioningUserId)}),n.size});I.meta={name:"getUniqueQuipFileMentioningUsers",key:"createSelectorGetUniqueQuipFileMentioningUsers",description:(e,t)=>{let a=e?.quipFileMentionActivity[t],n=new Set;return a&&a.forEach(e=>{n.add(e.mentioningUserId)}),n.size}};let w=(0,h.Ay)((e,t)=>{let a=e?.quipFileMentionActivity[t];return a?(0,m.A)(a,e=>e.ts):null});w.meta={name:"getQuipFileLatestMention",key:"createSelectorGetQuipFileLatestMention",description:(e,t)=>{let a=e?.quipFileMentionActivity[t];return a?(0,m.A)(a,e=>e.ts):null}},(0,h.Ay)((e,t)=>{let a=e?.quipFileMentionActivity[t];return a?(0,u.A)(a,e=>e.ts):null}).meta={name:"getQuipFileEarliestMention",key:"createSelectorGetQuipFileEarliestMention",description:(e,t)=>{let a=e?.quipFileMentionActivity[t];return a?(0,u.A)(a,e=>e.ts):null}};let T=(0,h.Ay)((e,{fileId:t})=>t?S(e,t)??p.Ml:p.Ml);T.meta={name:"getAndUpsertQuipFileMentions",key:"createSelectorGetAndUpsertQuipFileMentions",description:(e,{fileId:t})=>t?S(e,t)??p.Ml:p.Ml};let N=new i.Ay("file");function FileEntityUserMention({member:e,numNotifications:t,numberOfPeopleMentioning:a}){return e&&a>1?N.rt("{numNotifications} mentions from {member} and {numberOfPeopleMentioning} others",{member:n.createElement(ActivityItemMember,{id:e.id,name:(0,s.Fh)(e)}),numNotifications:t,numberOfPeopleMentioning:a-1}):e&&1===a?N.rt("{numNotifications} {mentionText} from {member}",{member:n.createElement(ActivityItemMember,{id:e.id,name:(0,s.Fh)(e)}),mentionText:1===t?"mention":"mentions",numNotifications:t,numberOfPeopleMentioning:a}):null}FileEntityUserMention.displayName="FileEntityUserMention";let M=(0,c.N)((e,{fileId:t})=>{T(e,{fileId:t});let a=w(e,t),n=null,r=null;return a&&(n=(0,d.nv)(e,a.mentioningUserId),r=I(e,t)),{member:n,numberOfPeopleMentioning:r}})(FileEntityUserMention);var R=a(0x226892387),P=a(0x14ea3ce99),L=a(0xbcfcc9c7);function FileDetailOverride({fileId:e,detailType:t,numNotifications:a,createdByUserId:i}){let l,o=(0,R.d4)(t=>(0,P.Lp)(t,e)),s=(0,R.d4)(e=>(0,d._7)(e,i)),c=(0,R.d4)(e=>t!==r.s.ACTIVITY_MENTION?(0,L.N)(e,o,t):""),m=s&&`${s} \xb7 `;switch(t){case r.s.LAST_UPDATED:case r.s.LAST_VIEWED:case r.s.CREATED_TIMESTAMP:case r.s.SHARED_TIMESTAMP:l=n.createElement(n.Fragment,null,m,c);break;case r.s.ACTIVITY_MENTION:l=n.createElement(M,{fileId:e,numNotifications:a});break;default:l=null}return l}FileDetailOverride.displayName="FileDetailOverride";let O=FileDetailOverride},0x138f86e9e:(e,t,a)=>{"use strict";a.d(t,{r:()=>NonExistentRecordEmptyState});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xf3b0bc58),o=a(0x1b3ecb90f),s=a(0x1083c8470),c=a.n(s);function NonExistentRecordEmptyState({title:e,emoji:t,imageSrc:a,children:r,description:s}){let d=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,t&&n.createElement(o.Ay,{className:c().non_existent_record_emoji,emojiSize:o.lw.LARGE,text:t}),n.createElement("p",{className:c().non_existent_record_title},e)),[t,e]);return n.createElement("div",{className:i()(c().non_existent_record,{[c().non_existent_record_no_image]:!a})},n.createElement(l.A,{imageUrl:a,title:d,description:s}),r)}NonExistentRecordEmptyState.displayName="NonExistentRecordEmptyState"},0x1d3ad9d8a:(e,t,a)=>{"use strict";a.d(t,{l:()=>NonExistentRecord});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1faa3f1ac),o=a(0x1d213b206),s=a(0x109818edc),c=a(0x1e40d79f1),d=a(0xc0442058),m=a(0x138f86e9e),u=a(0x15a86fbc3),p=a(0x1d9ec3e7b),h=a(0xddef663),_=a(0x2059520a0),f=a(0x1be9380c8),b=a(0x754ea859),g=a(0x8b588d25),y=a(0x24296355f),A=a(0x1a02c72b5),x=a(0xd6a16321),E=a(0xb0245531),C=a(0x3711e82d),k=a(0x188544c76),v=a(0x226892387),S=a(0x216198dcb),I=a(0x1aad5a225),w=a(0x2421d0362),T=a(0xd93ecf94),N=a(0x46dbff89),M=a(0x204000df3),R=a(0x8ed8ca46),P=a(0x210501b8f);let L=new i.Ay("recordchannels");function NonExistentRecord({record:e,channel:t,compositeId:a,isPreview:i=!1,isSecondaryView:O=!1,objectType:D,isList:F=!1,referrer:U}){let{salesforceOrgId:B}=(0,k.D)(e.id),H=(0,v.d4)(e=>(0,o.E)(e,B)),W=(0,v.d4)(e=>(0,b.B)(U)?(0,T.Ld)(e,U?.channelId,U?.timestamp):void 0),V=(0,v.d4)(e=>!!W?.source_team_id&&(0,w.R)(e,W?.source_team_id)),G=W?.attachments?.reduce((e,t)=>{let a=t?.salesforce_record;return a&&e.push(a),e},[]),q=G?.find(t=>t.id===e.id),j=(0,v.d4)(e=>q?.org.id&&(0,R.m6)(e,q.org.id)),z=(0,n.useMemo)(()=>(0,b.B)(U)?{entryPoint:C.UiComponentName.RECORD_UNFURL}:void 0,[U]),K=(0,r.wA)(),[$,Y]=(0,n.useState)(!1),[Q,Z]=(0,n.useState)(!1),J=(0,v.d4)(t=>(0,S.i)(t,e.id));(0,n.useEffect)(()=>{!J&&e.id&&O&&(Z(!0),K((0,y.V)({record:e.id,reason:"non-existent-record-fetch-channel"})).then(e=>{e.channel&&K((0,I.F)({channel:e.channel})),Z(!1)}).catch(e=>{("channel_not_found"===e.name||"channel_is_limited_access"===e.name)&&Y(!0),Z(!1)}))},[K,e.id,J,O]);let X=(0,n.useMemo)(()=>(0,g.dM)(J)||(0,g.dM)(t)||D,[J,t,D]),ee=(0,n.useMemo)(()=>J?.id||t?.id,[J?.id,t?.id]),handleChannelClick=t=>{ee?(t.preventDefault(),K((0,A.o)((0,x.pr)(ee)))):$&&(t.preventDefault(),K((0,N.q)({element:n.createElement(_.f,{recordId:e.id}),isStackable:!1})))};handleChannelClick.displayName="handleChannelClick";let et=(0,v.d4)(e=>(0,E.b)(e,J)),ea=(0,v.d4)(f.S2);if(!(0,M.x6)(e)||Q)return null;let en=(0,g.jT)(t)||X||L.t("record");if((0,M.S8)(e))return n.createElement(u.c,{variant:F?"list":"record",compositeId:a||e.id,objectType:D,showImage:!i});if((0,M.FB)(e))return et||V&&!j?n.createElement(p.Z,{isPreview:i,linkHref:q?.external_url}):n.createElement(m.r,{title:L.t("Record not available"),description:L.t("Shoot. It looks like this {recordLabel} may have moved or been deleted. You can try searching in Salesforce to find where it went.",{recordLabel:en})});if((0,M.H9)(e)){let description=()=>O&&ea?ee||$?L.rt("To start a conversation with the {recordLabel} team, <a>view the {recordLabel} channel</a>.",{fallbackHash:"7024816c839a23706751476a3f53ba562c83aed9",recordLabel:en.toLowerCase()},({tag:e,text:t})=>{if("a"===e)return n.createElement(l.A,{onClick:handleChannelClick},t)}):void 0:L.rt("It looks like you don\u2019t have permission to view additional fields for this {recordLabel}.",{recordLabel:en.toLowerCase()});return description.displayName="description",n.createElement(m.r,{title:L.t("It looks like you don\u2019t have access to this record in Salesforce.",{fallbackHash:"9a448e3426a5d67aabeb3b11b5f8505c6a09dda7"}),description:description(),imageSrc:ea?P:void 0})}return(0,M.CK)(e)?n.createElement(s.x,{isPeek:i}):(0,M.Mo)(e)?H?n.createElement(c.z,{salesforceOrgId:B}):n.createElement(d.t,{autoClogProps:z,isPeek:i,itemType:F?"list":"record",salesforceOrgId:B,recordChannelId:ee,recordType:X,handleChannelClick:handleChannelClick,showRequestAccessModal:$,isSecondaryView:O}):(0,M.ff)(e)?n.createElement(m.r,{title:L.t("This record can\u2019t be viewed in Slack"),description:L.rt("Some types of records can\u2019t be viewed in Slack. To see this record, open it in Salesforce.")},!!e.salesforceUrl&&n.createElement(l.A,{href:e.salesforceUrl},L.t("Open it in Salesforce"))):n.createElement(h.A,null)}NonExistentRecord.displayName="NonExistentRecord"},0x15a86fbc3:(e,t,a)=>{"use strict";a.d(t,{c:()=>SalesforceContentRestrictedEmptyState});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb1ea448c),l=a(0x1faa3f1ac),o=a(0x138f86e9e),s=a(0x211fc28d8),c=a(0x188544c76);function trimTrailingSlash(e){return(0,s.A)(e,"/")}function constructSalesforceRecordUrl({instanceUrl:e,compositeId:t}){let{rawRecordId:a}=(0,c.D)(t);return e&&a?`${trimTrailingSlash(e)}/${a}`:null}function constructSalesforceListUrl({instanceUrl:e,compositeId:t,objectType:a}){let{rawRecordId:n,relatedListId:r}=(0,c.D)(t);return e&&a&&n?r?`${trimTrailingSlash(e)}/lightning/r/${a}/${n}/related/${r}/view`:`${trimTrailingSlash(e)}/lightning/o/${a}/list?filterName=${n}`:null}var d=a(0x15f4f83cf),m=a(0x226892387),u=a(0x1c2a1a838),p=a(0x11faf8909),h=a(0x1083c8470),_=a.n(h);let f=new r.Ay("recordchannels");function SalesforceContentRestrictedEmptyState({compositeId:e,objectType:t="",showImage:a=!0,variant:r}){let s="list"===r,{salesforceOrgId:h}=(0,c.D)(e),b=(0,m.d4)(e=>(0,u.kO)(e,h)),g=(0,d.uz)(b)?b.instance_url:"",y=(0,n.useMemo)(()=>s?constructSalesforceListUrl({instanceUrl:g,compositeId:e,objectType:t}):constructSalesforceRecordUrl({instanceUrl:g,compositeId:e}),[s,g,e,t]);if((0,d.mX)(b))return n.createElement("div",{className:_().non_existent_record},n.createElement(i.A,null));let A=s?f.t("list"):f.t("record"),x=s?f.t("lists"):f.t("records"),E=f.t("You don\u2019t have access to this {item}",{item:A}),C=f.t("As a guest, you don\u2019t have access to Salesforce {itemPlural} in Slack. You can still view the {item} in Salesforce.",{item:A,itemPlural:x});return n.createElement(o.r,{imageSrc:a?p:void 0,title:E,description:C},y&&n.createElement(l.A,{href:y},f.t("Open {item} in Salesforce",{item:A})))}SalesforceContentRestrictedEmptyState.displayName="SalesforceContentRestrictedEmptyState"},0x1d9ec3e7b:(e,t,a)=>{"use strict";a.d(t,{Z:()=>SlackConnectEmptyState});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1faa3f1ac),l=a(0x138f86e9e),o=a(0x11faf8909);let s=new r.Ay("recordchannels");function SlackConnectEmptyState({isPreview:e,linkHref:t}){return n.createElement(l.r,{imageSrc:e?void 0:o,title:s.t("Can\u2019t access this record in Slack"),description:s.t("You don\u2019t have access to the organization that owns this record. You can still view the record in Salesforce.")},t&&n.createElement(i.A,{href:t},s.t("Open it in Salesforce")))}SlackConnectEmptyState.displayName="SlackConnectEmptyState"},0xddef663:(e,t,a)=>{"use strict";a.d(t,{A:()=>UnknownRecordError});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1faa3f1ac),l=a(0x138f86e9e),o=a(0x11d0b0bd1);let s=new r.Ay("recordchannels");function UnknownRecordError(){let e=(0,n.useCallback)(()=>(0,o.yQ)(),[]);return n.createElement(l.r,{title:s.t("Something went wrong"),emoji:"thinking_face",description:s.rt("We\u2019re not quite sure what, but please try again in a bit.")},n.createElement("div",{className:"align_center"},s.rt("You can also try <a>reloading</a> to clear things up.",{},({key:t,text:a})=>n.createElement(i.A,{key:t,onClick:e,renderAsSpan:!0},a))))}UnknownRecordError.displayName="UnknownRecordError"},0x1f40c4cef:(e,t,a)=>{"use strict";a.r(t),a.d(t,{EmailModal:()=>EmailModal});var n,r,i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x120c268ad),s=a.n(o),c=a(0x21f3c49e8),d=a(0x237b6a339),m=a(0x130d89881),u=a(0x14fad6485),p=a(0x40c0d834),h=a(0x20482ad21),_=a(0x2b7f0bcc),f=a(0x102edf836),b=a(0xb1ea448c),g=a(0xf3b0bc58),y=a(0x2501a2cee),A=a(0x1fdec3e16),x=a(0x9c0c23e6),E=a(0x19c9be351),C=a(0x1d2cd7755),k=a(0x126f22530),v=a(0x226892387),S=a(0x14149c126),I=a(0x1ec9adeaa),w=a.n(I);let T=new h.Ay("slackforce"),PromptBarError=()=>{let e=(0,v.d4)(e=>"on"===(0,S._Z)(e,"slack_crm_emails"));return i.createElement("div",{className:w().promptBarErrorBanner},i.createElement(_.Ay,{level:_.A_.error},i.createElement("div",{className:"display_flex flex_direction_column"},i.createElement("div",{className:w().promptBarErrorTitle},e?T.t("Something went wrong drafting the email"):"Something went wrong drafting the email"),i.createElement("div",{className:w().promptBarErrorSubtitle},e?T.t("Give it another try"):"Give it another try"))))};PromptBarError.displayName="PromptBarError";var N=a(0x6c77973e),M=a(0x16998c9bf),R=a(0x2029cd966),P=a(0x1ec68d6a3),L=a(0x11c82607b);let O=(0,L.Ay)("Requests an AI-drafted email via ai.crm.draftEmail",async(e,t,a)=>{let n=(0,P.Ay)({label:"CRM-EMAIL-DRAFT-AI"});try{let t={recordId:a.recordId,salesforceOrgId:a.salesforceOrgId,userPrompt:a.userPrompt,draftBody:a.draftBody,emailThreadId:a.emailThreadId,attachmentIds:a.attachmentIds,reason:"draft-email-with-ai"},r=await e((0,R.p)(t));if(r.ok&&r.task_id)return{taskId:r.task_id,error:null};return n.error("ai.crm.draftEmail failed with ok=false"),{taskId:null,error:"unknown_error"}}catch(e){return n.error("ai.crm.draftEmail request failed",e),{taskId:null,error:(0,M.eh)(e,"error")??"request_failed"}}});O.meta={name:"draftEmailWithAi",key:"createThunkDraftEmailWithAi",description:"Requests an AI-drafted email via ai.crm.draftEmail"};let D=new h.Ay("slackforce");var F=((n={}).Idle="idle",n.Pending="pending",n.Streaming="streaming",n.Complete="complete",n.Error="error",n);function useEmailDraftWithAi(){let e=(0,l.wA)(),t=(0,v.d4)(e=>"on"===(0,S._Z)(e,"slack_crm_emails")),[a,n]=(0,i.useState)("idle"),[r,o]=(0,i.useState)(""),[s,c]=(0,i.useState)(null),[d,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)(null),[h,_]=(0,i.useState)(void 0),f=(0,i.useRef)("idle"),b=(0,i.useRef)(null),g=(0,i.useRef)(null),y=(0,i.useRef)(null),A=(0,i.useCallback)(()=>{null!==g.current&&(clearTimeout(g.current),g.current=null),null!==y.current&&(clearTimeout(y.current),y.current=null),m(!1),p(null)},[]),x=(0,i.useCallback)(()=>{A(),b.current&&(b.current(),b.current=null)},[A]);(0,i.useEffect)(()=>x,[x]),(0,i.useEffect)(()=>{f.current=a},[a]);let E=(0,i.useCallback)(()=>{x(),n("idle"),f.current="idle",o(""),c(null),p(null),_(void 0)},[x]);return{status:a,draftText:r,errorMessage:s,isStillWorking:d,toolStatusText:u,requestDraft:(0,i.useCallback)(async a=>{if("pending"===f.current||"streaming"===f.current)return;x(),f.current="pending",n("pending"),o(""),c(null),_(void 0);let r=await e(O(a));if(!r.taskId){n("error"),c(r.error??(t?D.t("Something went wrong. Please try again."):"Something went wrong. Please try again."));return}_(r.taskId),b.current=(0,N.XT)(r.taskId,{onTokensAdded:e=>{n("streaming"),o(e),p(null),null!==g.current&&(clearTimeout(g.current),g.current=null,m(!1))},onToolStatus:e=>{e&&p(e),null!==y.current&&(clearTimeout(y.current),y.current=setTimeout(()=>{("pending"===f.current||"streaming"===f.current)&&(c(t?D.t("The request timed out. You can compose the email manually."):"The request timed out. You can compose the email manually."),n("error"),x())},6e4)),null!==g.current&&(clearTimeout(g.current),g.current=null,m(!1))},onComplete:e=>{A(),o(e),n("complete"),b.current&&(b.current(),b.current=null)},onError:e=>{A(),c(e||(t?D.t("Something went wrong. Please try again."):"Something went wrong. Please try again.")),n("error"),b.current&&(b.current(),b.current=null)}}),g.current=setTimeout(()=>{m(!0)},15e3),y.current=setTimeout(()=>{("pending"===f.current||"streaming"===f.current)&&(c(t?D.t("The request timed out. You can compose the email manually."):"The request timed out. You can compose the email manually."),n("error"),x())},6e4)},[e,x,A,t]),reset:E,taskId:h}}var U=a(0x168d4289d);let B=new h.Ay("slackforce"),PromptBarFooter=({promptState:e,prompt:t,taskId:a,emailThreadId:n})=>{let r=(0,v.d4)(e=>"on"===(0,S._Z)(e,"slack_crm_emails")),l=(0,i.useMemo)(()=>{if(a||n)return{taskId:a??"",emailThreadId:n??""}},[a,n]);if(e===F.Idle||e===F.Error)return null;if(e===F.Streaming||e===F.Pending)return i.createElement("div",{className:s()(w().promptBarFooter,w().promptBarStreamingFooter)},t);let o=r?B.t("This tool uses AI to generate responses, so some information may be inaccurate."):"This tool uses AI to generate responses, so some information may be inaccurate.";return i.createElement("div",{className:s()(w().promptBarFooter,w().promptBarFooterDisclaimer)},i.createElement("div",null,o),l&&i.createElement(U.A,{emailDraft:l}))};PromptBarFooter.displayName="PromptBarFooter";var H=a(0xa6f3163b),W=a(0x1340892e2);let V=new h.Ay("slackforce"),G=i.createElement(y.Ah,{name:"slackbot-color",size:"16"}),q={elementName:"prompt_bar_stop_button",onClick:{enableClogAction:!0}},PromptBarHeader=({draftState:e,lastSubmittedPrompt:t,onStop:a})=>{let n=(0,v.d4)(e=>"on"===(0,S._Z)(e,"slack_crm_emails"));return e===F.Idle||e===F.Error?null:e===F.Streaming||e===F.Pending?i.createElement("div",{className:s()(w().promptBarHeader,w().promptBarStreamingHeader)},i.createElement(W.r,{icon:G,text:n?V.t("Working on it\u2026"):"Working on it\u2026",forceDisableIconSlotMachineAnimation:!0,className:s()(w().shimmerText,"ql-editor")}),i.createElement(H.A,{onClick:a,size:"small",className:s()(w().stopButton,"c-button-unstyled"),autoClogProps:q},i.createElement(y.Ah,{name:"stop",size:"16"}),n?V.t("Stop"):"Stop")):i.createElement("div",{className:s()(w().promptBarHeader,"border_bottom")},t)};PromptBarHeader.displayName="PromptBarHeader";var j=a(0x11a296110),z=a(0xe7ed96ac),K=a(0x4c96e5d9),$=a(0x2c5a5afa);let Y={name:"close"},Q=new h.Ay("slackforce"),Z={elementName:"prompt_bar_submit_button",onClick:{enableClogAction:!0}},J={elementName:"prompt_bar_clear_button",onClick:{enableClogAction:!0}},X={elementName:"prompt_bar_close_button",onClick:{enableClogAction:!0}},ee={elementName:"prompt_bar_discard_button",onClick:{enableClogAction:!0}},et={elementName:"prompt_bar_keep_button",onClick:{enableClogAction:!0}},PromptBarInput=({draftState:e,onClose:t,onSubmit:a,onDiscard:n,onKeep:r})=>{let[l,o]=(0,i.useState)(null),s=(0,i.useRef)(null),{windowRef:c}=(0,i.useContext)(u._0),d=(0,v.d4)(e=>"on"===(0,S._Z)(e,"slack_crm_emails")),m=d?Q.t("Describe what you\u2019d like Slackbot to do"):"Describe what you\u2019d like Slackbot to do",p=d?Q.t("Any changes to your email?"):"Any changes to your email?",h=(0,i.useCallback)(()=>{s.current&&o(s.current.getText())},[]),_=(0,i.useCallback)(()=>{o(null),s.current&&s.current.setText("")},[]),f=(0,i.useCallback)(()=>{l?.length&&(a(l),_())},[a,l,_]),b=(0,i.useCallback)(()=>{f()},[f]),g=(0,i.useMemo)(()=>l?.length?J:X,[l?.length]);if(e===F.Streaming||e===F.Pending)return null;let A=d?Q.t("Clear"):"Clear",x=d?Q.t("Close"):"Close";return i.createElement("div",{className:w().promptBarInput},i.createElement(y.Ah,{name:"slackbot-color",size:"20"}),i.createElement($.A,{ref:s,placeholder:e===F.Idle?m:p,ariaLabel:e===F.Idle?m:p,onTextChange:h,onEnter:b,windowRef:c,maxLength:2e3,"data-qa":"email_composer_draft_input",focusOnMount:!0}),i.createElement("div",{className:w().accessories},(e===F.Idle||e===F.Error||e===F.Complete&&!!l?.length)&&i.createElement(i.Fragment,null,i.createElement(j.Ay,{type:"primary",onClick:f,disabled:!l?.length,size:"small","data-qa":"email_composer_draft_submit","aria-label":d?Q.t("Submit"):"Submit",autoClogProps:Z},d?Q.t("Generate"):"Generate"),i.createElement(K.Ay,{tip:l?.length?A:x,position:"top"},i.createElement(z.A,{svgIconProps:Y,onClick:l?.length?_:t,"data-qa":l?.length?"email_composer_draft_clear":"email_composer_draft_close",size:"x-small",outline:!1,"aria-label":l?.length?A:x,autoClogProps:g}))),e===F.Complete&&!l?.length&&i.createElement("div",{className:w().accessories},i.createElement(j.Ay,{onClick:n,size:"small",type:"outline","data-qa":"email_composer_draft_discard",autoClogProps:ee},d?Q.t("Discard"):"Discard"),i.createElement(j.Ay,{onClick:r,size:"small",type:"primary","data-qa":"email_composer_draft_keep",autoClogProps:et},i.createElement("span",{className:w().buttonWithIcon},i.createElement(y.Ah,{name:"check",size:"16"}),d?Q.t("Keep"):"Keep")))))};PromptBarInput.displayName="PromptBarInput";var ea=a(0x3711e82d);let en=i.memo(({onClose:e,recordId:t,salesforceOrgId:a,emailThreadId:n,draftBody:r,attachmentIds:l,updateEmailContent:o,onKeep:s,onDiscard:c,onDraftStateChange:d})=>{let[m,u]=(0,i.useState)(null),{status:h,draftText:_,requestDraft:f,reset:b,taskId:g}=useEmailDraftWithAi();(0,i.useEffect)(()=>{d?.(h)},[h,d]),(0,i.useEffect)(()=>{(h===F.Streaming||h===F.Complete)&&o(_)},[h,_,o]);let y=(0,i.useCallback)(e=>{u(e),f({recordId:t,salesforceOrgId:a,userPrompt:e??"",emailThreadId:n,draftBody:r,attachmentIds:l?.slice(0,25)})},[t,a,n,r,l,f]),A=(0,i.useCallback)(()=>{b()},[b]),x=(0,i.useCallback)(()=>{b(),c()},[b,c]);return i.createElement(p.A,{clogImpression:!0,eventId:ea.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:ea.UiComponentName.EMAIL_DRAFT_AI_PROMPT_BAR},i.createElement("div",{className:"c-wysiwyg_container__draft"},i.createElement("div",{className:w().borderStyles},i.createElement("div",{className:w().emailPromptContainer},i.createElement(PromptBarHeader,{draftState:h,onStop:A,lastSubmittedPrompt:m}),h===F.Error&&i.createElement(PromptBarError,null),i.createElement(PromptBarInput,{onClose:e,draftState:h,onSubmit:y,onDiscard:x,onKeep:s}),i.createElement(PromptBarFooter,{promptState:h,prompt:m,taskId:g,emailThreadId:n})))))});var er=a(0x91728dda),ei=a(0x10a716a94),el=a(0x16ed49ded),eo=a(0x14c22bca),es=a(0x20f97f5f9),ec=a(0x14705d91b),ed=a(0x2463eeca0),em=a.n(ed),eu=a(0xa985ed31),ep=a(0x14ea3ce99);let eh=(0,L.Ay)("Converts a Salesforce file attachment ID to a temporary Slack file ID",(e,t,a)=>{let n=`FSF${a.slice(-12).toUpperCase()}`,r=99;for(;r>0&&(!(0,eu.A)(n)||(0,ep.Lp)(t(),n,!1));)r-=1,n=`FSF${em()(5).toString("hex").toUpperCase()}`;return n});eh.meta={name:"getFileIdForAttachment",key:"createThunkGetFileIdForAttachment",description:"Converts a Salesforce file attachment ID to a temporary Slack file ID"};var e_=a(0x2112fdea9);let ef=(0,L.Ay)("Sends an email via Salesforce",async(e,t,{toEmailAddresses:a,emailSubject:n,emailBody:r,relatedToRecordId:i,salesforceOrgId:l,attachmentIds:o,threadId:s})=>{if(!l||0===a.length||!i)return(0,P.Ay)({label:"SALES-HOME-EMAILS"}).warn("Missing required arguments for sending email"),{isSuccess:!1,error:{code:"missing_required_arguments",message:"Missing required arguments for sending email"}};try{let t=await e((0,e_.v)({toEmailAddresses:a,emailSubject:n,emailBody:r,salesforceOrgId:l,relatedToRecordId:i,attachmentIds:o??void 0,threadId:s,reason:"send-email-from-composer"}));if(t.ok&&t.is_success)return(0,P.Ay)({label:"SALES-HOME-EMAILS"}).info("Email sent successfully"),{isSuccess:!0,threadId:t.thread_id,error:void 0};return(0,P.Ay)({label:"SALES-HOME-EMAILS"}).error("Email sending failed"),{isSuccess:!1,error:{code:"email_sending_failed",message:"Email sending failed"}}}catch(t){(0,P.Ay)({label:"SALES-HOME-EMAILS"}).error("Error sending email",t);let e=t.data;return{isSuccess:!1,error:{code:e?.error??"email_sending_failed",message:"Email sending failed"}}}});ef.meta={name:"sendEmail",key:"createThunkSendEmail",description:"Sends an email via Salesforce"};var eb=a(0x6e87d4ec),eg=a(0x78e4b754),ey=a.n(eg);let eA=new h.Ay("slackforce"),EmailSentSuccessToast=({recipient:e,relatedToRecordId:t})=>{let a=(0,v.d4)(e=>(0,er.Fm)(e,t));return i.createElement(eb.A,{showCloseButton:!0},i.createElement("div",{className:ey().emailSentSuccessToastContent},i.createElement("span",{className:ey().emailSentSuccessToastIcon},i.createElement(y.Ah,{name:"email-up",inline:!0,size:"18"})),i.createElement("div",null,i.createElement("div",null,a?eA.t("Email sent to {recipient}",{recipient:e}):i.createElement(i.Fragment,null,"Email sent to ",e)))))};EmailSentSuccessToast.displayName="EmailSentSuccessToast";var ex=a(0x6ea1f0ed),eE=a(0x16ffed5ab);let eC=(0,L.Ay)("Shows the email sent success toast",(e,t,{recipient:a,relatedToRecordId:n})=>{let r=t();(0,er.Fm)(r,n)&&(e((0,ex.Z)()),e((0,eE.M)({element:i.createElement(EmailSentSuccessToast,{recipient:a,relatedToRecordId:n})})))});eC.meta={name:"showEmailSentSuccessToast",key:"createThunkShowEmailSentSuccessToast",description:"Shows the email sent success toast"};var ek=a(0x1a5ae1fea);let ev=(0,L.Ay)("Uploads a file to be used as an CRM email attachment via Salesforce",async(e,t,{pendingFileUploadsRecord:a,salesforceOrgId:n})=>{if(!n)return{isSuccess:!1,pendingFileUploadsRecord:a,error:{code:"missing_required_arguments"}};let r=a.file;try{let t=await e((0,ek.W)({file:r,salesforceOrgId:n,reason:"upload-email-attachment"}));if(t.ok)return{isSuccess:!0,salesforceFileId:t.salesforce_file_id,pendingFileUploadsRecord:a};return{isSuccess:!1,pendingFileUploadsRecord:a,error:{code:"unable_to_upload_email_attachment"}}}catch{return{isSuccess:!1,pendingFileUploadsRecord:a,error:{code:"unable_to_upload_email_attachment"}}}});ev.meta={name:"uploadEmailAttachment",key:"createThunkUploadEmailAttachment",description:"Uploads a file to be used as an CRM email attachment via Salesforce"};var eS=a(0x8468bab2),eI=a(0x23e1fed85),ew=a(0x107a27f7),eT=a(0x1a352b5d),eN=a.n(eT);let eM=new h.Ay("slackforce");var eR=((r=eR||{}).NONE="none",r.SINGLE_FILE_TOO_LARGE="single_file_too_large",r.MULTI_FILE_TOO_LARGE="multi_file_too_large",r.EMAIL_LIMIT_EXCEEDED="email_limit_exceeded",r.DEFAULT_EMAIL_ERROR="default_email_error",r);let eP=i.memo(({toEmailAddress:e,toDisplayValue:t,fromDisplayValue:a,emailThreadId:n,relatedToRecordId:r,salesforceOrgId:o,parentEmailSubject:c,onEmailSent:d,onEmailSubjectChange:h,onHasUnsavedChangesChange:f,initialEmailContent:b,initialEmailSubject:g,initialUploadedFiles:y,initialEmailAttachmentsMap:A,onEmailContentChange:x,onUploadedFilesChange:E,onEmailAttachmentsMapChange:S,onDraftModeChange:I})=>{let w=(0,l.wA)(),T=(0,i.useRef)(null),N=(0,i.useRef)(""),M=(0,i.useRef)(null),R=(0,i.useRef)([]),{windowRef:P}=(0,i.useContext)(u._0),[L,O]=(0,i.useState)(!1),[D,U]=(0,i.useState)(!1),[B,H]=(0,i.useState)(!1),[W,V]=(0,i.useState)(b??""),[G,q]=(0,i.useState)(g??c??""),[j,z]=(0,i.useState)(y??[]),[K,Y]=(0,i.useState)(A??{}),[Q,Z]=(0,i.useState)("none"),J=(0,v.d4)(e=>(0,er.Fm)(e,r)),X=(0,i.useRef)(),ee=(0,i.useCallback)(e=>{X.current=e},[]),et=(0,i.useMemo)(()=>j.reduce((e,t)=>e+(t.file?.size??0),0),[j]),ed=(0,i.useMemo)(()=>"none"!==Q,[Q]),em=(0,i.useMemo)(()=>{let t=j.some(e=>e.status===ew.U.PROCESSING);return!e||B||t},[e,B,j]),eu=(0,i.useMemo)(()=>!n&&""!==G.trim()||""!==W.trim()||j.length>0,[W,G,j,n]),ep=(0,i.useCallback)(e=>e?.map(e=>({id:e.pendingFileId??"",filetype:e.file.type,is_salesforce_file:!0,name:e.file.name,pretty_type:e.file.pretty_type,title:e.file.name})),[]),e_=(0,i.useCallback)(()=>{M.current&&V(M.current.value().trim()??"")},[]),eb=(0,i.useCallback)(e=>{q(e),h?.(e)},[h]),eg=(0,i.useCallback)(()=>{X?.current?.({action:ea.UiAction.CLICK,elementName:"send"})},[]),ey=(0,i.useCallback)(async()=>{if(e&&!B){H(!0);try{eg();let a=await w(ef({toEmailAddresses:[e],emailSubject:G.trim()||(J?eM.t("(no subject)"):"(no subject)"),emailBody:W.trim(),relatedToRecordId:r,salesforceOrgId:o,attachmentIds:Object.values(K),threadId:n}));a?.isSuccess?(V(""),q(""),Z("none"),w(eC({recipient:t,relatedToRecordId:r})),d?.({threadId:a.threadId})):a?.error?.code==="email_limit_exceeded"?Z("email_limit_exceeded"):Z("default_email_error")}catch(e){Z("default_email_error")}finally{H(!1)}}},[w,eg,K,W,G,n,J,B,d,r,o,e,t]),eA=(0,i.useCallback)(()=>{O(!0),I?.(!0),N.current=W},[W,I]),ex=(0,i.useCallback)(async e=>{let t=e.reduce((e,t)=>{let a=t.size;return e.total+a<=0x1900000&&(e.files.push(t),e.total+=a),e},{files:[],total:et}).files;t.length<e.length?Z(e.length>1?"multi_file_too_large":"single_file_too_large"):Z("none");let a=t.map(e=>{let t=w(eh(""));return e.id=t,R.current.push(t),e.pretty_type=e.type,{pendingFileId:t,file:e,status:ew.U.PROCESSING}});z([...j,...a]);let n=ep(a);w((0,eI.b)({files:n})),(await Promise.allSettled(a.map(e=>w(ev({pendingFileUploadsRecord:e,salesforceOrgId:o}))))).forEach(e=>{if("fulfilled"===e.status){let t=e.value,a=t.pendingFileUploadsRecord.pendingFileId,n=t.salesforceFileId;t.isSuccess&&a&&n?(Y(e=>({...e,[a]:n})),z(e=>e.map(e=>e.pendingFileId===a?{...e,status:ew.U.COMPLETE}:e))):z(e=>e.map(e=>e.pendingFileId===a?{...e,status:ew.U.ERROR}:e))}})},[w,j,et,o,ep]),eE=(0,i.useCallback)(({pendingFileId:e})=>{e&&(z(j.filter(t=>t.pendingFileId!==e)),Y(t=>{let a={...t};return delete a[e],a}))},[j]),ek=(0,i.useCallback)(e=>{e&&ex(e)},[ex]);(0,i.useEffect)(()=>{f?.(eu)},[eu,f]),(0,i.useEffect)(()=>{x?.(W)},[W,x]),(0,i.useEffect)(()=>{E?.(j)},[j,E]),(0,i.useEffect)(()=>{S?.(K)},[K,S]),(0,i.useEffect)(()=>{if(y&&y.length>0){let e=ep(y);w((0,eI.b)({files:e})),R.current=y.map(e=>e.pendingFileId).filter(e=>!!e)}},[w,y,ep]),(0,i.useEffect)(()=>()=>{R.current.forEach(e=>{w((0,eS.nM)(e))})},[w]);let eT=(0,i.useCallback)(()=>"multi_file_too_large"===Q?J?eM.rt("<strong>Files too large</strong>. The size limit for attachments is {maxEmailAttachmentsSizeLimitInMb}MB total. One or more files can\u2019t be uploaded.",{maxEmailAttachmentsSizeLimitInMb:25}):i.createElement(i.Fragment,null,i.createElement("strong",null,"Files too large"),". The size limit for attachments is"," ",25,"MB total. One or more files can\u2019t be uploaded."):"single_file_too_large"===Q?J?eM.rt("<strong>File too large</strong>. The size limit for attachments is {maxEmailAttachmentsSizeLimitInMb}MB total.",{maxEmailAttachmentsSizeLimitInMb:25}):i.createElement(i.Fragment,null,i.createElement("strong",null,"File too large"),". The size limit for attachments is"," ",25,"MB total."):"email_limit_exceeded"===Q?J?eM.rt("<strong>Monthly email limit reached</strong>. Your team has sent the maximum number of emails for this month. You can still receive email. The limit resets on the first day of every month."):i.createElement(i.Fragment,null,i.createElement("strong",null,"Monthly email limit reached"),". Your team has sent the maximum number of emails for this month. You can still receive email. The limit resets on the first day of every month."):J?eM.rt("<strong>Email couldn\u2019t be sent</strong>. There was a problem sending the email. Wait a moment and try again."):i.createElement(i.Fragment,null,i.createElement("strong",null,"Email couldn\u2019t be sent"),". There was a problem sending the email. Wait a moment and try again."),[Q,J]),eR=(0,i.useCallback)(()=>0!==j.length||ed?i.createElement("div",{className:"c-wysiwyg_container__attachments c-message__editor__composer_attachments"},j.length>0&&i.createElement(m.A,{disableHeight:!0},({width:e})=>i.createElement(eo.A,{width:e},i.createElement(es.A,{hasPreviewNavigation:!0,composerFiles:j,onRemoveFile:eE,showAddFile:!1,renderGalleryScroller:!1,disableFileEditOptions:!0,disableContextMenu:!0}))),ed&&i.createElement("div",{className:eN().emailComposerAttachmentsError},i.createElement(_.Ay,{type:"boxed",level:"error",align:"left"},i.createElement("span",null,eT())))):null,[j,eE,ed,eT]),eP=(0,i.useCallback)(()=>{U(!1),O(!1),I?.(!1)},[I]),eL=(0,i.useCallback)(e=>{U(e===F.Streaming||e===F.Complete)},[]),eO=(0,i.useCallback)(e=>{V(e),M.current?.setText(e),requestAnimationFrame(()=>{let e=T.current;if(e)for(let t of[e.querySelector(".ql-editor"),e.querySelector(".c-basic_container__body")])t&&(t.scrollTop=t.scrollHeight)})},[]),eD=(0,i.useCallback)(()=>{N.current="",U(!1),O(!1),I?.(!1)},[I]),eF=(0,i.useCallback)(()=>{V(N.current),M.current?.setText(N.current),U(!1),O(!1),I?.(!1)},[I]),eU=(0,i.useCallback)(()=>{if(!r||!o)return null;let e=Object.values(K);return i.createElement(en,{onClose:eP,recordId:r,salesforceOrgId:o,emailThreadId:n,draftBody:M.current?.value().trim(),attachmentIds:e.length>0?e:void 0,updateEmailContent:eO,onKeep:eD,onDiscard:eF,onDraftStateChange:eL})},[eP,r,o,n,K,eO,eD,eF,eL]);return i.createElement(ei.A,{subtype:"slack_first_crm"},i.createElement(p.A,{trackClogRef:ee},i.createElement("div",{ref:T,className:s()(eN().emailComposerContainer,{[eN().emailComposerNewEmailThread]:!n})},i.createElement("div",{className:eN().emailComposerMetadataContainer},i.createElement("div",{className:eN().emailComposerMetadataRow},i.createElement(C.A,{className:eN().emailComposerToLabel,text:J?eM.t("To:"):"To:"},t)),i.createElement("div",{className:eN().emailComposerMetadataRow},i.createElement(C.A,{className:eN().emailComposerFromLabel,text:J?eM.t("From:"):"From:"},a)),!n&&i.createElement("div",{className:eN().emailComposerMetadataRow},i.createElement(C.A,{className:eN().emailComposerSubjectLabel,text:J?eM.t("Subject:"):"Subject:"},i.createElement(k.A,{id:"email-subject",name:"email-subject",className:eN().emailComposerSubjectInput,focusOnMount:!0,value:G,onChange:eb,placeholder:J?eM.t("Subject"):"Subject","aria-label":J?eM.t("Email subject"):"Email subject"})))),i.createElement(el.Ay,{onDrop:ek,location:el.ij.EMAILS_CRM},i.createElement(ec.A,{className:s()(eN().emailComposerWysiwygContainer,{[eN().emailComposerDraftHighlight]:D}),forceToolbarDisabled:!0,enableSendEmailButton:!L,enableShortcutsButton:!L,onSubmit:ey,onFilesSelected:ex,onEmailDraftButtonClicked:eA,limitShortcutsMenuToFileUpload:!0,isSendingDisabled:em,enableEmailDraftButton:!L,numMaxLines:n?16:void 0,numMinLines:n?3:void 0},i.createElement($.A,{isDisabled:L,windowRef:P,isSingleLine:!1,maxLines:n?16:void 0,minLines:n?3:void 0,ref:M,useStickyComposer:!1,onTextChange:e_,initialText:b||void 0,placeholder:J?eM.t("Enter email content here"):"Enter email content here",ariaLabel:J?eM.t("Email editor"):"Email editor",focusOnMount:!!n,useWysiwyg:!1,disableSlugging:!0,forceEnterCreatesNewline:!0}),eR(),L&&eU())))))});var eL=a(0x18a03595d),eO=a(0x139aa1a7),eD=a(0x483ff0d),eF=a(0x1d01572a2),eU=a(0xfe5aa224),eB=a(0x210cf696f),eH=a(0x15fb82076),eW=a(0x1c403364b),eV=a(0x1b481369f),eG=a(0x1c18c5d4e),eq=a(0x1d8f0e558),ej=a(0x1059ba41d);let ez=new h.Ay("slackforce"),eK={onClick:{enableClogAction:!0},elementName:"file_attachment_download"},e$={onClick:{enableClogAction:!0},elementName:"file_attachment_open_in_salesforce"},EmailFileActions=({downloadToFileSystem:e,salesforceUrl:t})=>{let a=(0,v.d4)(eG.I),n=ez.t("Download file"),r=ez.t("Open in Salesforce"),l=(0,i.useCallback)(t=>{t.stopPropagation(),t.preventDefault(),e().catch(()=>{})},[e]),o=(0,i.useCallback)(e=>{e.stopPropagation()},[]),c=(0,ej.g9M)();return i.createElement("div",{className:"c-pillow_file__actions"},i.createElement("div",{className:s()("c-file__actions","c-message_actions__group")},!c&&i.createElement(eq.A,{icon:"download",onClick:l,label:n,"aria-label":n,autoClogProps:eK}),!a&&i.createElement(eq.A,{icon:"new-window",href:t,onClick:o,label:r,"aria-label":r,autoClogProps:e$})))};EmailFileActions.displayName="EmailFileActions";var eY=a(0x11fda96e5),eQ=a(0x1d9627ee3),eZ=a(0x10fb9a645),eJ=a(0x249b1763),eX=a(0xecd94623),e0=a(0xbd3de346),e1=a(0x20e80190e),e2=a(0xeeae4283),e4=a(0x248b8ff1a),e5=a(0x1fb2d2a87),e3=a(0x1fcbb004d),e6=a(0x4e42a58a),e8=a.n(e6);let e7=new h.Ay("slackforce"),e9=i.createElement(y.Ah,{inline:!0,name:"new-window"}),te={elementName:"download",onClick:{enableClogAction:!0}},tt={elementName:"open_in_salesforce",onClick:{enableClogAction:!0}},ta={elementName:"close",onClick:{enableClogAction:!0}},EmailFileAttachmentDownloadModal=({downloadFileFromSalesforce:e,fileId:t,fromIdentifier:a,renderAvatar:n})=>{let r=(0,l.wA)(),[o,c]=(0,i.useState)(!0),[d,m]=(0,i.useState)(""),u=(0,v.d4)(eJ.$N),h=(0,v.d4)(eG.I),_=(0,v.d4)(e5.to),g=(0,v.d4)(e=>(0,ep.Lp)(e,t)),{id:y,external_url:A,timestamp:x,title:E,url_private_download:C}=g,k=(0,ej.g9M)()||!C,S=(0,i.useMemo)(()=>i.createElement("span",{className:e8().fromName},a),[a]),I=(0,i.useRef)(null);(0,i.useEffect)(()=>()=>{I.current?.abort(),I.current=null},[]),(0,eF.A)(()=>{let t=new AbortController;I.current=t,e().then(e=>{!t.signal.aborted&&((0,e0.sJ)(e)||(0,e0.F1)(e)?(r((0,e3.O)()),r((0,e4.A)({customAvatar:n(),customName:S,disableContextMenu:!0,fileId:y,hideDownload:(0,ej.g9M)()||!e.url_private_download,isStackable:!0}))):(0,e0._y)(e)&&(r((0,e3.O)()),r((0,eQ.A)({customAvatar:n(),customName:S,disableContextMenu:!0,fileId:y,hidePip:!0,hideTranscription:!0,isStackable:!0}))))}).catch(e=>{m(e.name)}).finally(()=>{c(!1)})});let w=(0,i.useCallback)(()=>{r((0,e3.O)())},[r]),T=(0,i.useCallback)(()=>{r((0,e2.A)({file:g}))},[r,g]),N=(0,i.useCallback)(()=>i.createElement("div",{className:s()("p-media_viewer_modal__header",e8().modalHeader)},n(),i.createElement("div",{className:"p-media_viewer_modal__header__info"},S,i.createElement("div",{className:"p-media_viewer_modal__header__channel_info"},i.createElement(eZ.A,{timestamp:x||0,relative:!0}),"\xa0 \u2013 ",E))),[S,n,x,E]),M=(0,i.useCallback)(()=>{if(!u)return null;let e=e7.t("This file cannot be previewed.");return d&&(e=d===eX.k.FileSizeTooLarge?e7.t("This file is too big to open in Slack."):e7.rt("Slack is unable to open this file at this time.<br></br>Our team is working to address this issue quickly.")),i.createElement(i.Fragment,null,i.createElement("div",{className:e8().errorMessage},e),i.createElement("div",{className:e8().buttonContainer},!k&&i.createElement(f.Ay,{autoClogProps:te,onClick:T},e7.t("Download")),h&&!k&&i.createElement(f.Ay,{autoClogProps:ta,onClick:w,type:"outline"},e7.t("Close"))),A&&!h&&i.createElement(eH.A,{autoClogProps:tt,className:e8().link,href:A},e7.t("Open in Salesforce"),"\xa0",e9))},[d,w,h,u,A,T,k]),R=(0,i.useCallback)(()=>i.createElement("div",{className:e8().modalBody},i.createElement(eY.A,{file:g,forceIconThumbnail:!0}),i.createElement("div",{className:e8().fileName},E),o&&i.createElement(b.A,{color:"white"}),!o&&M()),[g,E,o,M]),P=(0,i.useCallback)(()=>i.createElement("div",{className:e8().modal},N(),R()),[R,N]);return i.createElement(p.A,{eventId:ea.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:ea.UiComponentName.SLACKFORCE_EMAIL_FILE_ATTACHMENT_DOWNLOAD_MODAL,fileType:g?.filetype},i.createElement(e1.dW,{className:"p-media_viewer_modal",closeModal:w,closeButtonTone:"light"===_?"dark":void 0,contentLabel:e7.t("Media viewer"),fullscreen:!0},P()))};EmailFileAttachmentDownloadModal.displayName="EmailFileAttachmentDownloadModal";var tn=a(0x1535e80f3),tr=a(0x1cccf90c9),ti=a(0xdacd9bc3),tl=a.n(ti);let to=new h.Ay("slackforce"),ts={elementName:"try_again",onClick:{enableClogAction:!0}},tc={elementName:"open_in_salesforce",onClick:{enableClogAction:!0}},EmailFileSaveToast=({fileId:e,onTryAgain:t,status:a})=>{let n=(0,l.wA)(),r=(0,v.d4)(eJ.FR),o=(0,v.d4)(eG.I),s=(0,v.d4)(t=>e?(0,ep.Lp)(t,e,!1):null),c=s?.name||to.t("File"),d=s?.pretty_type,m=s?.external_url,u=(0,i.useMemo)(()=>s?i.createElement(eY.A,{file:s,forceIconThumbnail:!0,size:tn.RG.medium}):null,[s]),h=(0,i.useCallback)(()=>{n((0,ex.Z)())},[n]),_=(0,i.useCallback)(()=>{t?.(),h()},[h,t]),f=(0,i.useCallback)(()=>i.createElement(tr.P,{icon:u,status:"success"===a?"check":"warn"}),[u,a]),b=(0,i.useCallback)(()=>"success"!==a&&m&&r?i.createElement("div",{className:tl().footerCtas},i.createElement(eB.A,{autoClogProps:ts,onClick:_},to.t("Try Again")),!o&&i.createElement(eH.A,{autoClogProps:tc,href:m,onClick:h},to.t("Open in Salesforce"))):null,[o,r,h,m,_,a]);if(!r)return null;let g="success"===a?d:to.t("Download failed");return i.createElement(p.A,{eventId:ea.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:ea.UiComponentName.SLACKFORCE_EMAIL_FILE_ATTACHMENT_DOWNLOAD_TOAST},i.createElement(eb.A,null,i.createElement("div",{className:"display_flex"},f(),i.createElement("div",null,i.createElement(A.A,{lines:1,withTooltip:!0},i.createElement("div",{className:tl().title},c)),i.createElement("div",{className:tl().subtitle},g))),b()))};EmailFileSaveToast.displayName="EmailFileSaveToast";let td=(0,L.Ay)("Queues a toast to indicate file save success or failure",async(e,t,{fileId:a,onTryAgain:n,status:r})=>{e((0,eE.M)({element:i.createElement(EmailFileSaveToast,{fileId:a,onTryAgain:n,status:r})}))});td.meta={name:"showFileSaveToast",key:"createThunkShowFileSaveToast",description:"Queues a toast to indicate file save success or failure"};var tm=a(0x13e5a2b05),tu=a(0x19a70d6a8);let tp=new h.Ay("slackforce"),th=(0,L.Ay)("Streams file from Salesforce and optionally triggers browser download",async(e,t,{slackFileId:a,salesforceFileId:n,salesforceOrgId:r,onTryAgain:i,previewMode:l,reason:o})=>{let s,c=(0,ep.Lp)(t(),a),d=c.url_private_download||c.url_private;if(d){if(l)return c;try{let e=await fetch(d).then(e=>e.blob()),t=c?.name||tp.t("File"),a=c?.mimetype||"application/octet-stream";return(0,tm.A)({data:e,type:a,name:t}),c}catch{}}let m=(0,P.Ay)({getState:t,label:"SFDC-FILES-DOWNLOAD"}),u=(0,tu.F)(t())||"",p=new FormData;p.append("token",u),p.append("salesforce_file_id",n),p.append("salesforce_org_id",r),p.append("output_type","binary"),p.append("reason",o);try{s=await fetch("/api/sfdc.files.download",{method:"POST",credentials:"same-origin",body:p})}catch(t){throw e(td({fileId:c?.id,onTryAgain:i,status:"error"})),m.error(t,{salesforceFileId:n,salesforceOrgId:r,slackFileId:a}),t}let h=s.headers.get("content-type")||"application/octet-stream",_=s.headers.get("content-disposition");if(h.includes("application/json")){let e=await s.json();if(!1===e.ok){let t=Error(`File download failed: ${e.error||"Unknown error"}`);throw m.error(t),t}}let f=s.headers.get("content-length"),b=f?parseInt(f,10):void 0,g=await s.blob(),y=URL.createObjectURL(g),A=(e=>{if(!e)return null;let t=e.match(/filename[*]=(?:UTF-8''|utf-8'')([^;]+$)/i);if(t)return decodeURIComponent(t[1]);let a=e.match(/filename="?([^";]+)"?/i);if(a)try{return decodeURIComponent(a[1])}catch{return a[1]}return null})(_)||c?.name||tp.t("File"),x={...c,url_private:y,url_private_download:y,thumb_360:y,mimetype:h,size:b??c?.size??g.size};return(e(td({fileId:x.id,status:"success"})),l)?(0,e0.sJ)(x)?new Promise(t=>{let a=new Image;a.src=y,a.onload=()=>{x.original_h=a.height,x.original_w=a.width,e((0,eI.b)({files:[x]})),t(x)},a.onerror=()=>{e((0,eI.b)({files:[x]})),t(x)}}):(e((0,eI.b)({files:[x]})),x):((0,tm.A)({data:g,type:h,name:A}),e((0,eI.b)({files:[x]})),x)});th.meta={name:"streamAttachmentToFileSystem",key:"createThunkStreamAttachmentToFileSystem",description:"Streams file from Salesforce and optionally triggers browser download"};var t_=a(0x46dbff89),tf=a(0x219c3727d),tb=a.n(tf);let tg=new h.Ay("slackforce"),EmailFileAttachment=({attachment:e,fromIdentifier:t,renderAvatar:a,salesforceOrgId:n,slackFileId:r,isFileDownloadBlocked:o})=>{let c=(0,l.wA)(),[d,m]=(0,i.useState)(!1),[u,h]=(0,i.useState)(!1),_=e.salesforce_record_id||"",f=(0,v.d4)(eJ.$N),g=(0,v.d4)(e=>(0,ep.Lp)(e,r,!1)),[A,x]=(0,i.useState)(!1),E=(0,i.useRef)(),C=(0,i.useCallback)(e=>{E.current=e},[]),k=(0,i.useCallback)(()=>c(th({reason:"email-attachment",salesforceFileId:_,salesforceOrgId:n,slackFileId:r,previewMode:!0})),[c,_,n,r]),S=(0,i.useRef)(null),I=(0,i.useRef)(),w=(0,i.useCallback)(()=>(S.current||(m(!0),h(!1),S.current=c(th({onTryAgain:I.current,reason:"email-attachment-download",salesforceFileId:_,salesforceOrgId:n,slackFileId:r})).catch(()=>{h(!0)}).finally(()=>{m(!1),S.current=null})),S.current),[c,_,n,r]);(0,i.useEffect)(()=>{I.current=w},[w]);let T=(0,i.useCallback)(()=>{E?.current?.({action:ea.UiAction.CLICK,elementName:"file_attachment"})},[]),N=(0,i.useCallback)(()=>{T(),e.external_url&&window.open(e.external_url,"_blank")},[T,e.external_url]),M=(0,i.useCallback)(()=>{!0===o?N():(T(),c((0,t_.q)({element:i.createElement(EmailFileAttachmentDownloadModal,{downloadFileFromSalesforce:k,fileId:r,fromIdentifier:t,renderAvatar:a}),isStackable:!0})))},[o,N,T,c,k,t,a,r]),R=(0,i.useMemo)(()=>!0===o&&A?tg.t("Open in Salesforce"):d?f?tg.t("Preparing download"):"Preparing download":u?f?tg.t("Error downloading."):"Error downloading.":void 0,[f,u,d,o,A]),P=(0,i.useMemo)(()=>{let e;return d?e=i.createElement(b.A,{size:"large"}):u&&(e=i.createElement(y.Ah,{name:"warning",size:"20"})),e?i.createElement("div",{className:tb().iconContainer},e):null},[u,d]),L=(0,i.useCallback)(()=>i.createElement(EmailFileActions,{downloadToFileSystem:w,salesforceUrl:e.external_url??""}),[w,e.external_url]),O=(0,i.useCallback)(()=>{x(!0)},[]),D=(0,i.useCallback)(()=>{x(!1)},[]);return g?i.createElement("div",{onMouseEnter:O,onMouseLeave:D},i.createElement(p.A,{fileType:g?.filetype,trackClogRef:C},i.createElement(eV.A,{className:s()(tb().fileAttachment,{[tb().fileAttachmentBlocked]:!0===o}),file:g,href:"#",onClick:M,overrideActions:L(),showActions:!o},i.createElement(eW.A,{detailTextOverride:R,file:g,forceIconThumbnail:!0,iconOverride:P,id:_})))):null};EmailFileAttachment.displayName="EmailFileAttachment";var ty=a(0x22b8621cf),tA=a(0x99233ecb),tx=a(0xa8dcaaaa),tE=a(0x1ed767a16);let tC=new h.Ay("slackforce"),tk={name:"ellipsis-vertical-filled",size:"16"},tv={name:"share-message",size:"16"},tS={elementName:"share_email",onClick:{enableClogAction:!0}},tI={elementName:"copy_link",onClick:{enableClogAction:!0}},tw={elementName:"open_in_salesforce",onClick:{enableClogAction:!0}};function EmailPreviewActionsMenu({compositeRecordId:e,externalUrl:t,onShareComplete:a}){let n=(0,v.d4)(eG.I),r=(0,v.d4)(eJ.$N),{windowRef:l}=(0,u.ox)(),o=(0,tx.y)({recordId:e,externalUrl:t,onShareComplete:a}),s=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),o()},[o]),c=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),(0,tE.x3)(t,l.deref())},[t,l]),d=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),l.deref()?.open(t,"_blank")},[t,l]),m=(0,i.useMemo)(()=>[{autoClogProps:tI,label:r?tC.t("Copy link"):"Copy link",click:c,icon:i.createElement(y.Ah,{name:"link",size:"16"})},{autoClogProps:tw,label:r?tC.t("Open in Salesforce"):"Open in Salesforce",click:d,showLinkIndicatorIcon:!1,icon:i.createElement(y.Ah,{name:"new-window",size:"16"})}],[r,c,d]),p=r?tC.t("More actions"):"More actions",h=(0,i.useCallback)(e=>i.createElement(tA.a,{...e,width:212,template:m}),[m]);return i.createElement(i.Fragment,null,i.createElement(ty.A,{svgIconProps:tv,"aria-label":r?tC.t("Share email"):"",tooltipLabel:r?tC.t("Share email"):"",tooltipPosition:"top",onClick:s,buttonSize:"small",autoClogProps:tS}),!n&&i.createElement(ty.A,{"aria-label":p,"data-qa":"email-preview-actions-menu",isMenuTrigger:!0,renderMenu:h,svgIconProps:tk,tooltipLabel:p,tooltipPosition:"top",buttonSize:"small"}))}EmailPreviewActionsMenu.displayName="EmailPreviewActionsMenu";var tT=a(0x13776886e);let getDateTS=e=>e?Math.floor(new Date(e).getTime()/1e3):0,getDatePretty=e=>{if(!e)return"";let t=e;return"string"==typeof e&&(t=getDateTS(e)),(0,tT.A)(t,"{date_pretty} {time}")};var tN=a(0x1595bdd0),tM=a(0x1e864b930);let tR=new h.Ay("slackforce");var tP=a(0x9237fce3),tL=a(0xc0b7c558),tO=a(0x1b66e7465),tD=a.n(tO);let tF=new h.Ay("slackforce"),tU={name:"caret-down-filled"},tB={name:"caret-right-filled"},tH={elementName:"email_item_expand",onClick:{enableClogAction:!0}},tW={elementName:"email_item_collapse",onClick:{enableClogAction:!0}},tV={elementName:"email_body_expand",onClick:{enableClogAction:!0}},tG={elementName:"email_body_collapse",onClick:{enableClogAction:!0}},tq={elementName:"file_attachments_expand",onClick:{enableClogAction:!0}},tj={elementName:"file_attachments_collapse",onClick:{enableClogAction:!0}},tK={elementName:"view_all_attachments",onClick:{enableClogAction:!0}},EmailPreview=({email:e,hasFocus:t,highlight:a,initialState:n,onEmailStateChange:r,onShareComplete:o,isFileDownloadBlocked:c,salesforceOrgId:d})=>{let m,u=(0,l.wA)(),{id:p,external_url:h,file_attachments:_,from_name:f,from_address:b,from_slack_user_id:g,message_date:A,text_body:x}=e,E=(0,tL.j)(d,p),C=_.records.length||0,k=!!_.has_more,[S,I]=(0,i.useState)(n.bodyIsVisible),[w,T]=(0,i.useState)(n.bodyIsExpanded),[N,M]=(0,i.useState)(n.attachmentsAreExpanded),[R,P]=(0,i.useState)(!1),[L,O]=(0,i.useState)();(0,i.useEffect)(()=>{r?.(p,{bodyIsVisible:S,bodyIsExpanded:w,attachmentsAreExpanded:N})},[p,S,w,N,r]);let D=(0,v.d4)(eJ.$N),F=(0,i.useRef)(null);(0,i.useLayoutEffect)(()=>{!R&&S&&F.current&&F.current.scrollHeight>330&&P(!0)},[S,R,x]);let U=(0,i.useMemo)(()=>((e,t)=>{if(!t)return"";let{bcc_address:a,cc_address:n,to_address:r}=e,i=r?tR.t("to {to}",{to:(0,tM.A)(r.split("; "),{noConj:!0}).join("")}):"",l=n?tR.t("cc: {cc}",{cc:(0,tM.A)(n.split("; "),{noConj:!0}).join("")}):"",o=a?tR.t("bcc: {bcc}",{bcc:(0,tM.A)(a.split("; "),{noConj:!0}).join("")}):"";return(0,tM.A)((0,tN.A)([i,l,o]),{noConj:!0}).join("")})(e,D),[e,D]),B=(0,i.useMemo)(()=>getDateTS(A),[A]),H=(0,i.useMemo)(()=>getDatePretty(B),[B]);(0,eF.A)(()=>{let e=[],t=_.records.map(t=>{let a=u(eh(t.salesforce_record_id||""));return e.push(a),{...t,id:a}});O(e),u((0,eI.b)({files:t}))}),(0,i.useEffect)(()=>()=>{L?.forEach(e=>{u((0,eS.nM)(e))})},[u,L]);let W=(0,i.useCallback)(()=>{I(e=>!e)},[]),V=(0,i.useCallback)(()=>{T(e=>!e)},[]),G=(0,i.useCallback)(()=>{M(e=>!e)},[]),q=(0,i.useCallback)(()=>{if(!D)return null;let e=k?tF.t("Many attachments Toggle {attachmentCount} files",{attachmentCount:C}):tF.t("{attachmentCount, plural, =1 {Toggle file} other {Toggle # files}}",{attachmentCount:C}),t=k?tF.t("Many attachments (showing {attachmentCount})",{attachmentCount:C}):tF.t("{attachmentCount, plural, =1 {# file} other {# files}}",{attachmentCount:C}),a=N?tU:tB;return i.createElement("div",{className:tD().attachmentsHeader},t,"\xa0",i.createElement(z.A,{autoClogProps:N?tj:tq,className:tD().attachmentsCollapseButton,onClick:G,"aria-label":e,"aria-expanded":N,svgIconProps:a}),k&&i.createElement("div",{className:tD().viewAllAttachmentsLink},i.createElement("div",{className:"margin_left_75"},i.createElement(eH.A,{autoClogProps:tK,href:h},tF.t("View all in Salesforce"),"\xa0",i.createElement(y.Ah,{inline:!0,name:"new-window"})))))},[N,C,D,h,k,G]),K=f||b,$=(0,i.useCallback)(()=>i.createElement(tP.A,{userId:g,identifierString:K}),[K,g]),Y=(0,i.useCallback)(()=>i.createElement("div",{className:"padding_top_50"},q(),N&&i.createElement("div",{className:tD().attachmentsBody},_.records.map((e,t)=>{let a=L?.[t];return a?i.createElement(EmailFileAttachment,{key:`${p}.${a}`,attachment:e,fromIdentifier:K,renderAvatar:$,salesforceOrgId:d,slackFileId:a,isFileDownloadBlocked:c}):null}))),[N,p,_,L,K,c,q,$,d]),Q=!w&&R,Z=S&&(Q||w),[J,X]=(0,i.useState)(!1),ee=(0,i.useCallback)(()=>{X(!0)},[]),et=(0,i.useCallback)(()=>{X(!1)},[]),ea=(0,i.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||X(!0)},[]),en=(0,i.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||X(!1)},[]),er=(0,i.useContext)(eU.A),ei=J||t&&er;return D?(S?w||(m=330):m=22,i.createElement("div",{className:s()(tD().container,{"c-message_kit__background--highlight":a})},i.createElement("div",{className:tD().headerWrapper,onFocus:ea,onBlur:en,onMouseOver:ee,onMouseOut:et},i.createElement(j.Nm,{autoClogProps:S?tW:tH,className:tD().header,onClick:W},i.createElement("div",{className:tD().headerContent},$(),i.createElement("div",{className:tD().toFromSection},i.createElement("div",{className:tD().sender},f),i.createElement("div",{className:tD().recipients},U)),i.createElement("div",{className:s()(tD().previewTimestamp,{[tD().previewTimestampHidden]:ei})},C>0&&i.createElement(y.Ah,{inline:!0,name:"attachment",size:"16"}),i.createElement("span",{className:tD().date},H)))),i.createElement("div",{className:s()(tD().previewActions,{[tD().previewActionsHidden]:!ei})},i.createElement(EmailPreviewActionsMenu,{compositeRecordId:E,externalUrl:h,onShareComplete:o}))),i.createElement("div",{className:tD().bodyWrapper},i.createElement("div",{className:s()(tD().body,{[tD().bodyFade]:Q}),ref:F,style:m?{maxHeight:`${m}px`}:void 0},x),Z&&i.createElement("div",{className:tD().expandBodyLink},Q&&i.createElement(eB.A,{autoClogProps:tV,onClick:V},tF.t("See more")),w&&i.createElement(eB.A,{autoClogProps:tG,onClick:V},tF.t("See less"))),S&&C>0&&Y()))):null};EmailPreview.displayName="EmailPreview";var t$=a(0x16a94b15d),tY=a(0x18af67efb),tQ=a(0x1df96de4c);let tZ="preceding",tJ="subsequent";var tX=a(0x1c533701);function useFetchEmailHistory({emailMessageId:e,emailThreadId:t,isComposingEmails:a,salesforceOrgId:n,refetchTrigger:r}){let o=(0,l.wA)(),[s,c]=(0,i.useState)(t),d=(0,i.useRef)(s);d.current=s;let[m,u]=(0,i.useState)(!a),[p,h]=(0,i.useState)(""),[_,f]=(0,i.useState)(!1),[b,g]=(0,i.useState)(""),[y,A]=(0,i.useState)(""),[x,E]=(0,i.useState)(!1),[C,k]=(0,i.useState)(!1),[v,S]=(0,i.useState)([]),[I,w]=(0,i.useState)([]),[T,N]=(0,i.useState)(!1),[M,R]=(0,i.useState)(null),[P,L]=(0,i.useState)(!1),[O,D]=(0,i.useState)(!1),[F,U]=(0,i.useState)(""),[B,H]=(0,i.useState)(0),[W,V]=(0,i.useState)(void 0),G=(0,i.useRef)(!1),q=(0,i.useRef)(null),j=(0,i.useRef)(null),z=(0,i.useCallback)(async({referenceEmailId:e,pageDirection:t,limit:a,reason:r})=>{try{return await o((0,tX.X)({emailMessageId:e,pageDirection:t,limit:a,salesforceOrgId:n,reason:r}))}catch{f(!0);return}},[o,n]);(0,i.useEffect)(()=>{let t=d.current;(e||t)&&(!e&&t?(async()=>{u(!0),w([]);try{let e=await o((0,tX.X)({emailThreadId:t,salesforceOrgId:n,reason:"fetch-emails-for-thread-id"})),a=(e.records??[]).reverse();S(a),E(e?.has_more??!1),g(e?.page_key??""),h(e?.related_reply_record_id??""),U(a[0]?.subject||""),e?.thread_identifier&&c(e.thread_identifier),H(e?.total_count??0),V(e?.latest_reply_date)}catch{f(!0)}u(!1)})():e&&(async()=>{u(!0);let t=await z({referenceEmailId:e,pageDirection:"lt",limit:10,reason:"fetch-preceding-for-email-message-id"}),a=t?.records?.length??0,n=t?.total_count??0,r=Math.max(0,10-a),i=n>a?await z({referenceEmailId:e,pageDirection:"gt",limit:10+r,reason:"fetch-subsequent-for-email-message-id"}):null;w(i?.records??[]),S((t?.records??[]).reverse()),A(i?.page_key??""),g(t?.page_key??""),E(t?.has_more??!1),k(i?.has_more??!1),h(t?.related_reply_record_id||i?.related_reply_record_id||"");let l=t?.records?.find(t=>t.id===e)||i?.records?.find(t=>t.id===e);l&&U(l.subject||"");let o=t?.thread_identifier??i?.thread_identifier;o&&c(o),H(t?.total_count??i?.total_count??0),V(t?.latest_reply_date??i?.latest_reply_date),u(!1)})())},[o,e,z,r,n]);let K=(0,i.useMemo)(()=>0===v.length&&0===I.length?tQ.Ml:(0,tY.A)([...v,...I],"id"),[v,I]),$=(0,i.useCallback)(async()=>{if(!G.current&&x&&b&&q.current!==b){G.current=!0,q.current=b,N(!0),R(tZ),L(!1);try{let e=await o((0,tX.X)({emailThreadId:s,pageKey:b,pageDirection:"lt",limit:10,salesforceOrgId:n,reason:"fetch-more-preceding"}));if(e){if(e.records.length>0){let t=e.records.reverse()??[];S(e=>[...t,...e])}g(e.page_key??""),E(e.has_more??!1)}}catch{L(!0)}finally{G.current=!1,N(!1),R(null)}}},[x,b,s,n,o]),Y=(0,i.useCallback)(async()=>{if(!G.current&&C&&y&&j.current!==y){G.current=!0,j.current=y,N(!0),R(tJ),D(!1);try{let e=await o((0,tX.X)({emailThreadId:s,pageKey:y,pageDirection:"gt",limit:10,salesforceOrgId:n,reason:"fetch-more-subsequent"}));if(e){if(e.records.length>0){let t=e.records??[];w(e=>[...e,...t])}A(e.page_key??""),k(e.has_more??!1)}}catch{D(!0)}finally{G.current=!1,N(!1),R(null)}}},[C,y,s,n,o]),{keys:Q,rows:Z}=(0,i.useMemo)(()=>{let e=[],t=[];return(M===tZ||P)&&(e.push(P?"error-preceding":"loader-preceding"),t.push({type:"loader",direction:tZ,hasError:P})),K.forEach((a,n)=>{e.push(a.id),t.push({type:"email",email:a,index:n})}),(M===tJ||O)&&(e.push(O?"error-subsequent":"loader-subsequent"),t.push({type:"loader",direction:tJ,hasError:O})),{keys:e,rows:t}},[K,M,P,O]);return{isLoading:m,isError:_,emailHistoryRecords:K,emailSubject:F,emailThreadId:s,setEmailThreadId:c,keys:Q,rows:Z,totalCount:B,latestReplyDate:W,fetchMorePreceding:x?$:void 0,fetchMoreSubsequent:C?Y:void 0,isLoadingMore:T,loadingDirection:M,relatedToRecordId:p}}var t0=a(0x14961934a),t1=a(0x1d600678),t2=a(0xd843ab47),t4=a(0x2120d7f64),t5=a(0x196f1f233),t3=a(0x180827d1b),t6=a(0xccb7b166),t8=a.n(t6);let t7=new h.Ay("slackforce"),t9={elementName:"reply",onClick:{enableClogAction:!0}},ae={continueButton:{elementName:"speedbump_discard",onClick:{enableClogAction:!0}},cancelButton:{elementName:"speedbump_keep_editing",onClick:{enableClogAction:!0}}},EmailModal=({emailMessageId:e,emailThreadId:t,salesforceOrgId:a,relatedToObjectApiName:n,relatedToRecordId:r,viewContext:o,channelId:h})=>{let C=(0,l.wA)(),{isChildWindow:k,view:S}=(0,i.useContext)(t2.A),{windowRef:I}=(0,i.useContext)(u._0),w=!(0,c.A)(S)&&k,T=(0,E.S)(),{composerEmailSubject:N,composerEmailContent:M,composerUploadedFiles:R,composerEmailAttachmentsMap:P,emailMessageId:L,emailThreadId:O,isComposingEmails:D,relatedToObjectApiName:F,relatedToRecordId:U,salesforceOrgId:B}=S?.params??{},H=a||B,W=n||F,V=(0,i.useRef)(null),G=(0,i.useRef)(new Map),[q,j]=(0,i.useState)(e||L),z=t||O,[K,$]=(0,i.useState)(D??(!q&&!z)),[Y,Q]=(0,i.useState)(null),[Z,J]=(0,i.useState)(0),[X,ee]=(0,i.useState)(N??""),[et,en]=(0,i.useState)(M??""),[ei,el]=(0,i.useState)(R??[]),[eo,es]=(0,i.useState)(P??{}),[ec,ed]=(0,i.useState)(!1),[em,eu]=(0,i.useState)(!1),{isLoading:ep,isError:eh,emailSubject:e_,emailThreadId:ef,setEmailThreadId:eb,keys:eg,rows:ey,totalCount:eA,latestReplyDate:ex,fetchMorePreceding:eE,fetchMoreSubsequent:eC,relatedToRecordId:ek}=useFetchEmailHistory({emailMessageId:q,emailThreadId:z,isComposingEmails:K,salesforceOrgId:H,refetchTrigger:Z}),ev=r||U||ek,{isLoading:eS,isError:eI,toEmailAddress:eT,toDisplayValue:eN,fromDisplayValue:eM}=(({relatedToRecordId:e,salesforceOrgId:t})=>{let a=(0,l.wA)(),n=(0,v.d4)(t=>(0,er.Fm)(t,e)),[r,o]=(0,i.useState)(!1),[s,c]=(0,i.useState)(!1),[d,m]=(0,i.useState)(!1),[u,p]=(0,i.useState)({toEmailAddress:"",toDisplayValue:"",fromDisplayValue:""});(0,i.useEffect)(()=>{let fetchEmailComposerDefaults=async()=>{try{o(!0);let{recipient:n,sender:r}=await a((0,t$.X)({salesforceOrgId:t,recordId:e,reason:"email-preview-modal"})),i=n?.email_address??"",l=r?.email_address_with_trial_branding??"",s=n?.name?`${n.name} (${i})`:i,c=r?.name?`${r.name} (${l})`:l;p({toEmailAddress:i,toDisplayValue:s,fromDisplayValue:c})}catch{m(!0)}finally{o(!1),c(!0)}};n&&fetchEmailComposerDefaults()},[a,e,t,n]);let h=n&&!!e&&!s;return{isLoading:r||h,isError:d,toEmailAddress:u?.toEmailAddress,toDisplayValue:u?.toDisplayValue,fromDisplayValue:u?.fromDisplayValue}})({relatedToRecordId:ev,salesforceOrgId:H}),{isFileDownloadBlocked:eR,checkPermission:eF}=(e=>{let t=(0,l.wA)(),a=(0,v.d4)(e=>(0,t1.x)(e,"block_file_download")),[n,r]=(0,i.useState)(!1),[o,s]=(0,i.useState)(null);(0,i.useEffect)(()=>{a||(s(null),r(!1))},[a]);let c=(0,i.useCallback)(async()=>{if(!a)return!0;r(!0);try{let a=(await t((0,t0.i)({reason:"EmailFileAttachment_checkIP",fileId:e||""}))).ip_allowed;return s(a),a}catch{return s(!1),!1}finally{r(!1)}},[t,e,a]),d=null;return a?null!==o&&(d=!o):d=!1,{isFileDownloadBlocked:d,isLoading:n,checkPermission:c}})();(0,i.useEffect)(()=>{null===eR&&eF()},[eR,eF]);let eU=(0,v.d4)(eJ.$N),eB=(0,v.d4)(e=>(0,er.Fm)(e,ev)),eH=ep||eS,eW=eh||eI,{speedBumpState:eV,closeSpeedBump:eG,openSpeedBump:eq}=(0,t4.v)(),ej=(0,i.useCallback)(()=>e_||X||(eU?t7.t("New Email"):"New Email"),[e_,eU,X]),ez=(0,i.useMemo)(()=>({emailMessageId:q,emailThreadId:ef,emailSubject:e_,salesforceOrgId:H,relatedToObjectApiName:W,relatedToRecordId:ev,isComposingEmails:K,composerEmailSubject:X,composerEmailContent:et,composerEmailAttachmentsMap:eo,composerUploadedFiles:ei}),[q,ef,e_,H,W,ev,K,X,et,ei,eo]),eK=(0,i.useMemo)(()=>em||ei.some(e=>e.status===ew.U.PROCESSING),[em,ei]),e$=(0,i.useRef)(void 0),eY=(0,i.useRef)(!1);(0,i.useEffect)(()=>()=>{e$.current&&I.deref()?.clearTimeout(e$.current)},[I]),(0,i.useEffect)(()=>{!eH&&q&&V.current&&!eY.current&&(eY.current=!0,I.deref()?.requestAnimationFrame(()=>{I.deref()?.requestAnimationFrame(()=>{V.current?.scrollToKey(q,{animate:!0}),eA>1&&Q(q)})}))},[eH,q,eA,I]),(0,i.useEffect)(()=>{Y&&(e$.current=I.deref()?.setTimeout(()=>{Q(null)},eL.jL))},[Y,I]);let eQ=(0,i.useCallback)(()=>{ec?eq():w?T():C((0,e3.O)())},[T,ec,w,eq,C]),eZ=(0,i.useCallback)(()=>{C((0,e3.O)())},[C]),eX=(0,i.useCallback)(()=>{eG()},[eG]),e0=(0,i.useCallback)(()=>{C((0,e3.O)())},[C]),e2=(0,i.useCallback)(()=>{$(!0)},[]),e4=(0,i.useCallback)(({threadId:e})=>{eb(e),j(void 0),$(!1),ed(!1),J(e=>e+1),eU&&C((0,t3.$)({compositeId:(0,tL.j)(H,ev),limit:t5.v,reason:"email-preview-modal"}))},[C,eU,ev,H,eb]),e5=(0,i.useCallback)(e=>{ee(e)},[]),e6=(0,i.useCallback)(e=>{ed(e)},[]),e8=(0,i.useCallback)(e=>{en(e)},[]),e7=(0,i.useCallback)(e=>{el(e)},[]),e9=(0,i.useCallback)(e=>{es(e)},[]),te=(0,i.useMemo)(()=>eB&&H?i.createElement("div",{className:s()(t8().replySection,{[t8().replySectionEmptyEmailThread]:0===eA})},!eT&&i.createElement("div",{style:{padding:"12px",color:"#616061",textAlign:"center"}},eB?t7.t("Email address not available for reply"):"Email address not available for reply"),eT&&K&&i.createElement("div",{className:s()(t8().emailComposer,{[t8().emailComposerEmptyEmailThread]:0===eA})},i.createElement(eP,{toEmailAddress:eT,toDisplayValue:eN,fromDisplayValue:eM,onEmailSent:e4,emailThreadId:ef,relatedToRecordId:ev,salesforceOrgId:H,parentEmailSubject:e_,onEmailSubjectChange:e5,onHasUnsavedChangesChange:e6,initialEmailContent:M,initialEmailSubject:N,initialUploadedFiles:R,initialEmailAttachmentsMap:P,onEmailContentChange:e8,onUploadedFilesChange:e7,onEmailAttachmentsMapChange:e9,onDraftModeChange:eu})),eT&&!K&&i.createElement(f.Ay,{autoClogProps:t9,type:"outline",size:"medium",onClick:e2},i.createElement(y.Ah,{name:"email-reply",size:"20"}),"\xa0",eB?t7.t("Reply to Email"):"Reply to Email")):null,[ef,eB,K,e2,e4,H,ev,e_,e5,e6,e8,e7,e9,eT,eN,eM,M,N,R,P,eA]),tt=!eE,ta=!eC,tn=(0,i.useMemo)(()=>{for(let e=ey.length-1;e>=0;e--){let t=ey[e];if("email"===t.type)return t.index}return -1},[ey]),tr=(0,i.useCallback)((e,t)=>{G.current.set(e,t)},[]),ti=(0,i.useCallback)((e,t)=>{let a=G.current.get(e),n=0===t&&tt,r=t===tn&&ta,i=n||r||q===e;return a??{attachmentsAreExpanded:!0,bodyIsExpanded:!1,bodyIsVisible:i}},[q,tt,ta,tn]),tl=(0,i.useCallback)((e,{hasFocus:t})=>{let a=ey[e];if(!a)return null;if("loader"===a.type)return a.hasError?i.createElement(_.Ay,{type:_.QE.inlineBoxed,level:_.A_.default,icon:"info",className:t8().inlineErrorRow},i.createElement("span",null,i.createElement("strong",null,eU?t7.t("Can\u2019t load email."):"Can\u2019t load email.")," ",i.createElement("span",null,eU?t7.rt("Contact your admin if you continue to see this error."):"Contact your admin if you continue to see this error."))):i.createElement("div",{className:t8().loaderRow},i.createElement(b.A,{noMargin:!0,size:"medium"}));let{email:n,index:r}=a;return i.createElement(EmailPreview,{key:n.id,email:n,salesforceOrgId:H,initialState:ti(n.id,r),onEmailStateChange:tr,highlight:n.id===Y,hasFocus:t,onShareComplete:eQ,isFileDownloadBlocked:eR})},[eQ,eU,ti,Y,eR,tr,ey,H]),to=(0,i.useMemo)(()=>i.createElement("div",{className:t8().errorTitle},i.createElement("span",{className:"margin_right_50"},i.createElement(y.Ah,{name:"warning",inline:!0,size:"24"})),eU?t7.t("Can\u2019t load email"):""),[eU]),ts=(0,i.useCallback)(()=>eW?i.createElement("div",{className:t8().errorContent},i.createElement(g.A,{title:to,description:eU?t7.rt("Contact your admin if you continue to see this error."):""})):!eH&&0===eA&&te?i.createElement("div",{className:t8().emailModalContent},te):i.createElement("div",{className:s()(t8().emailModalContent,{[t8().emailComposerEnabled]:K})},eH?i.createElement("div",{className:t8().loadingSpinner},i.createElement(b.A,null)):i.createElement(m.A,null,({width:e,height:t})=>i.createElement(x.A,{ref:V,width:e,height:t,keys:eg,rowRenderer:tl,siblingNode:te,loadPre:eE,loadPost:eC}))),[eW,eH,eA,to,eU,eg,tl,te,eE,eC,K]),tc=(0,i.useMemo)(()=>getDatePretty(ex),[ex]),td=(0,i.useMemo)(()=>eH||eW?null:i.createElement(i.Fragment,null,i.createElement("div",{className:t8().titleContainer},i.createElement("span",{className:t8().titleIcon},i.createElement(y.Ah,{inline:!0,name:"email-filled",size:"20"})),i.createElement(A.A,{lines:3,withTooltip:!0},ej())),eA>0&&i.createElement("div",{className:t8().subtitle},eU?t7.rt("{numEmails, plural, =1 {# email} other {# emails}} \u2022 Last reply sent {date}",{numEmails:eA,date:tc}):"")),[eH,eW,ej,eA,eU,tc]),tm=(0,i.useMemo)(()=>ef??q??(0,d.A)(),[q,ef]),tu=q?(0,tL.j)(H,q):void 0,tp=w?i.createElement("div",{className:t8().modalChildWindow},i.createElement("div",{className:t8().modalChildWindowTitle},td),i.createElement("div",{className:t8().modalChildWindowContent},ts())):i.createElement(e1.dW,{className:t8().modal,closeModal:eQ},i.createElement(e1.rQ,{className:t8().header},i.createElement(e1.Rc,{title:td},i.createElement(eD.A,{className:t8().newWindowButton,onOpen:eZ,params:ez,viewId:`${eO.D.SalesEmailView}-${tm}`,viewType:eO.D.SalesEmailView,disabled:eK}))),i.createElement("div",{className:t8().content},ts()),eV.isVisible&&i.createElement(e1.ty,{...eV,autoClogProps:ae,description:eU?t7.rt("<strong>Discard changes?</strong> Your work will not be saved."):i.createElement(i.Fragment,null,i.createElement("strong",null,"Discard changes?")," Your work will not be saved."),onCancel:eX,cancelButtonLabel:eU?t7.t("Keep Editing"):"Keep Editing",onContinue:e0,continueButtonType:"danger",continueButtonLabel:eU?t7.t("Close and Discard"):"Close and Discard"}));return i.createElement(p.A,{eventId:ea.EventId.LOB_SALESFORCE_INTEGRATIONS,elementValue:W,uiComponentName:ea.UiComponentName.SLACKFORCE_EMAIL_MODAL,channelId:h,salesforceRecordId:tu,viewContext:o},tp)};EmailModal.displayName="EmailModal"},0x9237fce3:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x2501a2cee),i=a(0x1c659cbb1);function hashString(e){let t=5381;for(let a=0;a<e.length;a++)t=33*t^e.charCodeAt(a);return t>>>0}function getAvatarUrlForIdentifier(e){if(!e)return"/img/avatars/ava_0002-48.png";let t=String(hashString(e.toLowerCase())%27).padStart(4,"0");return`/img/avatars/ava_${t}-48.png`}var l=a(0x3be338f2),o=a.n(l);let s=n.memo(({size:e=36,userId:t,identifierString:a,icon:l})=>{let s=(0,n.useMemo)(()=>getAvatarUrlForIdentifier(a),[a]);return n.createElement("div",{className:o().avatarContainer},t?n.createElement(i.Ay,{userId:t,size:e,isInteractive:!1}):n.createElement(i.f1,{size:e,isInteractive:!1,imageUrl:s}),l&&n.createElement("div",{className:o().avatarIconContainer},n.createElement(r.Ah,{name:l,size:"16"})))})},0x20f19247f:(e,t,a)=>{"use strict";a.d(t,{D:()=>RecordBreadcrumb,Y:()=>RecordBreadcrumbsLayout});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x11a296110),o=a(0x2501a2cee),s=a(0x339b339c),c=a(0x1b3054a4a),d=a.n(c);function Separator(){return n.createElement(o.Ah,{name:"caret-right",size:"16"})}function RecordBreadcrumb({crumb:e}){let{label:t,onClick:a,className:r,iconProps:s}=e;return n.createElement("div",{className:i()(d().record_breadcrumb,r)},s&&n.createElement(o.Ah,{...s,inline:!0}),!a&&n.createElement("span",{className:d().record_breadcrumb_label},t),a&&n.createElement(l.jV,{className:d().record_breadcrumb_label,onClick:a},t))}function RecordBreadcrumbsLayout({className:e,crumbs:t,isLoading:a}){return t.length||a?n.createElement("div",{className:i()(d().record_breadcrumbs,e)},a&&n.createElement(s.A,{dataQa:"record-breadcrumbs-missing-text",size:"large"}),!a&&t.map((e,a)=>n.createElement(n.Fragment,{key:e.label},n.createElement(RecordBreadcrumb,{crumb:e}),!e.noSeparator&&a!==t.length-1&&n.createElement(Separator,null)))):null}Separator.displayName="Separator",RecordBreadcrumb.displayName="RecordBreadcrumb",RecordBreadcrumbsLayout.displayName="RecordBreadcrumbsLayout"},0x14dbdd890:(e,t,a)=>{"use strict";a.d(t,{r:()=>x});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1595bdd0),l=a(0xbe0b63ff),o=a(0x20482ad21),s=a(0x20f19247f),c=a(0x4a5b4937),d=a(0x754ea859),m=a(0xf01a9d50),u=a(0x8b588d25),p=a(0x188544c76),h=a(0x226892387),_=a(0x217553e42),f=a(0x204000df3),b=a(0x14236acae),g=a(0x8ed8ca46),y=a(0x1c2a1a838);let A=new o.Ay("recordchannels");function BaseRecordChannelBreadcrumbs({className:e,channelId:t,includePrefix:a}){let o=(0,r.wA)(),x=(0,h.d4)(e=>(0,_.OL)(e,t)),E=(0,u.iJ)(x),C=(0,u.dM)(x),k=(0,u.jT)(x),v=(0,h.d4)(e=>(0,b.PQ)(e,E)),S=v.parent,{salesforceOrgId:I}=(0,p.D)(E||""),w=(0,h.d4)(e=>(0,y.kO)(e,I)),T=(0,h.d4)(e=>(0,g.m6)(e,I)),N=(0,c.x)(I),M=(0,l.mX)(x),R=N?!T:(0,l.mX)(w)||(0,f.Eh)(v),P=(0,n.useMemo)(()=>{let e=(0,m.C)(C),t=(0,m.C)(S?.object_api_name),n=(0,m.C)("Org"),r=(0,l.uz)(w)&&w.name||N&&T?.name;return(0,i.A)([a&&{label:A.t("{recordLabel} in",{recordLabel:k,recordType:k}),className:"margin_right_25",iconProps:e,noSeparator:!0},S?.name&&{label:S.name,iconProps:t,onClick:()=>{S.id&&o((0,d.c)({recordId:S.id}))}},r&&{label:r,iconProps:n}])},[o,a,w,S,C,k,N,T?.name]);return n.createElement(s.Y,{className:e,crumbs:P,isLoading:M||R})}BaseRecordChannelBreadcrumbs.displayName="BaseRecordChannelBreadcrumbs";let x=n.memo(BaseRecordChannelBreadcrumbs)},0x2059520a0:(e,t,a)=>{"use strict";a.d(t,{f:()=>RecordChannelNoAccessModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x2b7f0bcc),d=a(0x1be9380c8),m=a(0x1f86e0fc5),u=a(0x20e80190e),p=a(0x3711e82d),h=a(0x226892387),_=a(0x1fcbb004d),f=a(0x1d0dac6e2),b=a.n(f);let g=new s.Ay("recordchannels"),RecordChannelNoAccessModal=({recordId:e,onRequestSent:t})=>{let a=(0,r.wA)(),[i,s]=(0,n.useState)(!1),[f,y]=(0,n.useState)(!1),[A,x]=(0,n.useState)(!1),E=(0,n.useRef)(()=>{}),C=(0,h.d4)(d.Sl),k=(0,h.d4)(d.S2),v=(0,n.useMemo)(()=>({eventId:p.EventId.RECORDS_SALESFORCE_RECORD_ACTION,uiComponentName:p.UiComponentName.SALESFORCE_RECORD_CHANNEL_REQUEST_ACCESS_MODAL,uiComponentVariant:"request_access",elementName:"record_id",elementValue:e,clogImpression:!0,trackClogRef:e=>{E.current=e}}),[e]),S=(0,n.useCallback)(async()=>{if(i)return a((0,_.O)());if(!e)return void y(!0);E.current({action:p.UiAction.CLICK,elementType:p.ElementType.BUTTON,elementName:"request_access"}),y(!1),x(!0);try{await a((0,m._)({recordId:e,reason:"record-channel-no-access-modal-request-access"})),s(!0),t?.()}catch(e){y(!0)}finally{x(!1)}},[a,e,i,t]);if(!C)return null;let getButtonLabel=()=>k?i?g.t("OK"):g.t("Request Access"):"";return n.createElement(o.A,v,n.createElement(u.aF,{isOpen:!0,centered:!0,fullscreen:!1,showCloseButton:!1},n.createElement(u.rQ,null,n.createElement("div",{className:b().headerContainer},n.createElement("div",{role:"presentation",className:l()(b().modalIllustration,{[b().modalIllustrationRequestSent]:i})})),n.createElement(u.Rc,{title:C?i?k?g.rt("Request sent"):"":g.rt("You don\u2019t have access to this Salesforce channel"):""})),n.createElement(u.$m,null,n.createElement(u.qf,null,n.createElement("p",null,C?i?k?g.rt("You\u2019ll be added to the channel once someone accepts your request."):"":g.rt("You\u2019ll need to request access to join the conversation."):"")),f&&n.createElement(u.qf,{className:"margin_bottom_100"},n.createElement(c.Ay,{type:c.QE.boxed,level:c.A_.error,align:c.AO.left},k?g.t("Something went wrong and we weren\u2019t able to send your access request. Try again in a few minutes."):""))),n.createElement(u.jl,{isAdaptive:!0},k?n.createElement(u.ox,null,!i&&n.createElement(u.s_,{type:"outline","aria-label":g.t("Cancel")},g.t("Cancel")),n.createElement(u.s_,{type:"primary",autoFocus:!0,"aria-label":getButtonLabel(),loading:A,onClick:S},getButtonLabel())):n.createElement(u.s_,{type:"primary",autoFocus:!0,"aria-label":g.t("OK")},g.t("OK")))))};RecordChannelNoAccessModal.displayName="RecordChannelNoAccessModal"},0x15c06cbce:(e,t,a)=>{"use strict";a.r(t),a.d(t,{RecordChannelNewBadge:()=>RecordChannelNewBadge});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x3711e82d),s=a(0xf3c65e54),c=a(0x5b1935a6),d=a(0x325072cc),m=a.n(d);let u=new l.Ay("recordchannels"),RecordChannelNewBadge=({hasBeenSeen:e,notificationName:t,shouldShowNewBadge:a,autoClogProps:l})=>{let d=(0,r.wA)();(0,n.useEffect)(()=>{e||d((0,s.A)({notificationName:t,action:c.hw.IMPRESSION}))},[d,t,e]);let p=(0,n.useMemo)(()=>({eventId:o.EventId.RECORDS_SALESFORCE_NUX,...l}),[l]);return a?n.createElement(i.A,{clogImpression:!0,...p},n.createElement("span",{className:m().badge},u.t("NEW"))):null};RecordChannelNewBadge.displayName="RecordChannelNewBadge"},0x19beeed95:(e,t,a)=>{"use strict";a.r(t),a.d(t,{RecordChannelRelatedConversationsTabBanner:()=>RecordChannelRelatedConversationsTabBanner});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x7a249fa8),l=a(0x3711e82d),o=a(0x5b1935a6);let s=new r.Ay("recordchannels"),c={uiComponentName:l.UiComponentName.SALESFORCE_RECORD_RELATED_CONVERSATIONS_TAB_BANNER},RecordChannelRelatedConversationsTabBanner=({channelId:e,className:t,recordTypeLabel:a,shouldShowNewBadge:r})=>{let l=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,n.createElement("div",null,s.rt("<strong>Never miss important conversations about this {recordTypeLabel}</strong>",{recordTypeLabel:a.toLowerCase()})),n.createElement("div",null,s.t("Quickly find a list of all related messages and channels in one place. By connecting channels you also make your AI summaries more powerful."))),[a]);return n.createElement("div",{"data-qa":"record_channel_related_conversations_tab_banner_container",className:t},n.createElement(i.O,{channelId:e,bodyText:l,shouldShowNewBadge:r,spaceName:o.xu.RECORD_CHANNEL_RELATED_CONVERSATIONS_TAB_HEADER,notificationName:o.ze.RECORD_CHANNELS_RELATED_CONVERSATIONS_TAB_BANNER,autoClogProps:c}))};RecordChannelRelatedConversationsTabBanner.displayName="RecordChannelRelatedConversationsTabBanner"},0x7a249fa8:(e,t,a)=>{"use strict";a.d(t,{O:()=>RecordChannelTabBanner});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x2b7f0bcc),o=a(0x3711e82d),s=a(0xafce781a),c=a(0x20061cab9),d=a(0xf3c65e54),m=a(0x5b1935a6);let RecordChannelTabBanner=({bodyText:e,channelId:t,shouldShowNewBadge:a,spaceName:u,notificationName:p,autoClogProps:h})=>{let _=(0,r.wA)();(0,n.useEffect)(()=>{a&&(_((0,d.A)({notificationName:p,action:m.hw.CLICK})),_((0,s.iR)({event:{type:m.jo.CHANNEL_OPEN,channelId:t},channelId:t})))},[_,t,p,a]);let f=(0,n.useCallback)(()=>{_((0,c.Ay)({spaceName:u,action:m.hw.DISMISS}))},[_,u]),b=(0,n.useMemo)(()=>({eventId:o.EventId.RECORDS_SALESFORCE_NUX,...h}),[h]);return n.createElement(i.A,{clogImpression:!0,...b},n.createElement(l.Ay,{"data-qa":"record_channel_tab_alert",showCloseButton:!0,onClose:f,level:"info",isIconVisible:!1},e))};RecordChannelTabBanner.displayName="RecordChannelTabBanner"},0x2c06e550:(e,t,a)=>{"use strict";a.r(t),a.d(t,{RecordChannelsSidebarSectionLabelNux:()=>RecordChannelsSidebarSectionLabelNux});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1d01572a2),l=a(0x40c0d834),o=a(0x20482ad21),s=a(0x1fdec3e16),c=a(0x3711e82d),d=a(0x1a07e694d),m=a(0x5b1935a6),u=a(0x1d2aa0320),p=a.n(u);let h=new o.Ay("recordchannels");function RecordChannelsSidebarSectionLabelNux({channelSectionName:e,hasBeenSeen:t,renderSidebarSection:a}){let o=(0,r.wA)();return(0,i.A)(()=>{t||o((0,d.A)({action:m.hw.IMPRESSION,spaceName:m.xu.RECORD_CHANNEL_SIDEBAR_SECTION}))}),a({label:(0,n.useMemo)(()=>n.createElement("div",{className:p().section},n.createElement(s.A,{lines:1},e),n.createElement(l.A,{clogImpression:!0,eventId:c.EventId.RECORDS_SALESFORCE_NUX,uiComponentName:c.UiComponentName.SALESFORCE_RECORD_SIDEBAR_SECTION_NEW_BADGE},n.createElement("span",{className:p().badge},h.t("NEW")))),[e]),alwaysShowTooltip:!0,tooltipContents:h.t("To keep things tidy, we put your Salesforce channels here. You can move them to another section any time.")})}RecordChannelsSidebarSectionLabelNux.displayName="RecordChannelsSidebarSectionLabelNux"},0x133cba782:(e,t,a)=>{"use strict";a.d(t,{i:()=>processRecordUpdateError});var n=a(0xa2c00dd4),r=a(0x18a03595d);function processRecordUpdateError(e){let t,a,i,l=e.error.errorData,o=e.error.updateRecordError,s=n.d.default;switch(o){case r.zH.additional_fields_error:a={},i=[],l.forEach(e=>{e.field?a[e.field]=e.error_message:i.push(e.error_message)}),t=l.map(e=>e.error_message);break;case r.zH.validation_go_to_salesforce_error:s=n.d.go_to_salesforce,t=l.map(e=>e.error_message);break;case r.zH.field_level_error:t=Object.values(a=Object.entries(l).reduce((e,[t,a])=>(e[t]=a.map(e=>e.message),e),{}));break;case r.zH.collision:s=n.d.collision;break;default:t=Object.values(l||{}).map(e=>e.message)}return{messages:t,speedBump:s,initialErrors:a,pageLevelErrors:i}}},0x19b447382:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x6e87d4ec);let l=new r.Ay("recordchannels"),o={name:"sf-cloud-error"},s={name:"sf-cloud"},RecordRefreshToast=({isError:e})=>n.createElement(i.A,{duration:2500,svgIconProps:e?o:s},n.createElement("span",{className:"margin_left_50"},e?l.t("Unable to sync record."):l.t("Record data synced.")));RecordRefreshToast.displayName="RecordRefreshToast";let c=RecordRefreshToast},0x70f53a0a:(e,t,a)=>{"use strict";a.d(t,{E:()=>i,i:()=>n});let n=["SCHEDULED","PERFORMED","CANCELLED","ERRORED","INVALIDATED"];var r,i=((r={}).PageHeader="page-header",r.DateHeader="date-header",r.SummaryCard="summary-card",r.AiDisclaimer="ai-disclaimer",r)},0x2413005f6:(e,t,a)=>{"use strict";a.d(t,{Pz:()=>p,Xg:()=>m,YM:()=>u,bY:()=>getSortedSummaryRows,im:()=>intersectsRectTop,uR:()=>getNormalizedDigest,yW:()=>isNotOkaySummaryStatus});var n=a(0x24c261bcb),r=a(0x424ce7f7),i=a(0x12edaa96a),l=a(0x70f53a0a),o=a(0x6960d8b9);function isRecordSummaryStatus(e){return!!e&&l.i.some(t=>t===e)}function getSummaryStatusCheck(e){return t=>e===t}let s=getSummaryStatusCheck("CANCELLED"),c=getSummaryStatusCheck("ERRORED"),d=getSummaryStatusCheck("INVALIDATED"),m=getSummaryStatusCheck("PERFORMED"),u=getSummaryStatusCheck("SCHEDULED"),isNotOkaySummaryStatus=e=>s(e)||c(e)||d(e);function getDateRow(e){return{id:`date-${(0,i.A)()}`,type:l.E.DateHeader,data:e}}function getCardRow(e){return{id:`card-${(0,i.A)()}`,type:l.E.SummaryCard,data:e}}function summaryEndTsSort(e,t){return t.end_ts-e.end_ts}let p=[getDateRow(null),...(0,n.A)(3,()=>getCardRow({id:(0,i.A)(),channel_id:"",end_ts:Date.now(),message_count:0,start_ts:Date.now(),status:"SCHEDULED",topics:[]}))];function getNormalizedDigest(e){return e.map(({id:e,status:t,...a})=>({...a,id:e||(0,i.A)(),status:isRecordSummaryStatus(t)?t:"PERFORMED"}))}function intersectsRectTop(e,t,a=1){return Math.trunc(t.top)>=Math.trunc(e.top+e.height/(1/a))}function getSortedSummaryRows(e){let t=[];for(let[a,n]of Object.entries((0,r.A)([...e].sort(summaryEndTsSort),e=>(0,o.Yq)(e.end_ts,"{date_short_pretty}"))))t.push(getDateRow(a)),t.push(...n.map(getCardRow));return t}},0x23d75f12b:(e,t,a)=>{"use strict";a.d(t,{B:()=>getFormattedRecords,r:()=>getCustomRenderForField});var n=a(0xbad225b5),r=a(0x2501a2cee),i=a(0x1fdec3e16),l=a(0x2081d694d),o=a(0xf01a9d50),s=a(0x41d2945c),c=a(0x212b8fec0),d=a(0x177b0fe1e),m=a(0x134c47230),u=a(0x760dd6a6),p=a(0x213172452),h=a(0x1314133b1),_=a(0x1b04844aa),f=a(0x23105d319),b=a(0xc74669a8),g=a(0x1d6fa7918),y=a(0x14f192ab),A=a(0xf54eb25c),x=a(0x1a70db76),E=a(0x16c59013b),C=a.n(E);function getFormattedRecords(e,t){return Object.fromEntries(e.map(e=>{let a=t.map(t=>({value:t[e.field_api_name]?t[e.field_api_name].value:"",displayValue:t[e.field_api_name]?t[e.field_api_name].display_value:"",listType:e.object_type,dataType:e.lookup_id?"Reference":e.type,fieldApiName:e.field_api_name}));return[e.label,a]}))}function getCustomRenderForField(e,t){let a={fieldApiName:e.fieldApiName||"",value:e.value,displayValue:e.displayValue,dataType:e.dataType,hidePlaceholder:!0};switch(e.dataType){case l.C.Boolean:return n.createElement(s.t,{field:a,isReadOnly:!0});case l.C.MultiPicklist:return n.createElement(p.w,{field:a});case l.C.Picklist:return n.createElement(f.x,{field:a});case l.C.Reference:return n.createElement(i.A,{lines:1},n.createElement(b.L,{field:a,salesforceOrgId:t,tokenOnly:!0}));case l.C.Url:return n.createElement(i.A,{lines:1},n.createElement(x.T,{field:a,isDisabled:!0}));case l.C.TextArea:return n.createElement(i.A,{lines:1,breakWords:!1},n.createElement(y.U,{field:a,isUnfurl:!0}));case l.C.String:return n.createElement(n.Fragment,null,e.listType&&n.createElement("span",{className:C().recordIcon},n.createElement(r.Ah,{size:"18",...(0,o.C)(e.listType)})),n.createElement(i.A,{lines:1,breakWords:!1},n.createElement(g.$,{field:a,isUnfurl:!0})));case l.C.Phone:return n.createElement(i.A,{lines:1},n.createElement(_.S,{field:a}));case l.C.Currency:return n.createElement(i.A,{lines:1},n.createElement(c.P,{field:a}));case l.C.Email:return n.createElement(i.A,{lines:1},n.createElement(u.q,{field:a}));case l.C.Double:case l.C.Int:case l.C.Percent:return n.createElement(i.A,{lines:1},n.createElement(h.D,{field:a}));case l.C.Date:return n.createElement(i.A,{lines:1},n.createElement(m.i,{field:a}));case l.C.DateTime:return n.createElement(i.A,{lines:1},n.createElement(d.R,{field:a}));case l.C.Time:return n.createElement(i.A,{lines:1},n.createElement(A.Z,{field:a}));default:return n.createElement(i.A,{lines:1},e.value)}}getCustomRenderForField.displayName="getCustomRenderForField"},0x2334834ea:(e,t,a)=>{"use strict";a.d(t,{W:()=>RecordOverviewPeek});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0xb1ea448c),s=a(0xf3b0bc58),c=a(0x32d3ef3d),d=a(0xfa28400d),m=a(0x91728dda),u=a(0x1adcaea70),p=a(0x15c77e8f0),h=a(0x3711e82d),_=a(0x2354af51),f=a.n(_);let b=new l.Ay("slackforce"),AutoHotPeekNuxBanner=()=>n.createElement(i.A,{uiComponentName:h.UiComponentName.RECORD_HOT_PEEK_NUX_BANNER,clogImpression:!0},n.createElement("div",{className:f().bannerContainer},b.t("\u261D\uFE0F Update Salesforce info right in Slack")));AutoHotPeekNuxBanner.displayName="AutoHotPeekNuxBanner";var g=a(0xe75a33c2),y=a(0x188544c76),A=a(0x226892387),x=a(0x1c8beab7f),E=a(0x8ed8ca46),C=a(0x2dbddb48),k=a.n(C);let v=new l.Ay("slackforce"),RecordOverviewPeek=({isAutoHotPeek:e,onError:t,recordId:a})=>{let l=(0,A.d4)(m.mI),_=(0,r.wA)(),f=c.w.enabled,[b,C]=(0,n.useState)(),[S,I]=(0,n.useState)(!1),{salesforceOrgId:w}=(0,y.D)(a),T=(0,A.d4)(e=>(0,E.tR)(e)||(0,x.tx)(e));(0,n.useEffect)(()=>{(async()=>{try{let e=await _((0,g.x)({ignoreUnfurlsSettings:!0,record:a,reason:"record-overview-peek"}));e?.ok&&C(e.salesforce_record)}catch{I(!0),t?.()}})()},[_,t,a]);let N=(0,n.useCallback)(e=>(0,u.B)({record:e,entityState:f,userHasMultipleOrgs:T,isInteractive:!1,experimentSlackforceListUnfurlsGroupOn:l}),[f,l,!1,T]);return n.createElement(i.A,{eventId:h.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:h.UiComponentName.RECORD_OVERVIEW_PEEK,clogImpression:!0,salesforceOrgId:w},!S&&!b&&n.createElement(o.A,{className:k().loadingSpinner}),S&&!b&&!e&&n.createElement(s.A,{title:v.t("Something went wrong"),description:v.t("You can refresh and try again in a few minutes."),className:k().emptyState}),b&&n.createElement(d.Ay,{entityState:f,size:c.S.expanded,isInteractive:!1,isRemovable:!1,withBorder:!1,isFullWidth:!0,isAutoHeight:!0},n.createElement(p.q,{entityState:f,hideFooter:!0,record:b,labelProps:N(b)}),e&&n.createElement(AutoHotPeekNuxBanner,null)))};RecordOverviewPeek.displayName="RecordOverviewPeek"},0x89c7949e:(e,t,a)=>{"use strict";a.d(t,{J:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee),o=a(0xf01a9d50),s=a(0xbe93ca1c),c=a.n(s);function BaseRecordTypeBadge({recordType:e,recordLabel:t,className:a}){return n.createElement("span",{className:i()(c().record_type_badge,a)},n.createElement("span",{className:"padding_right_25"},n.createElement(l.Ah,(0,o.C)(e))),t)}BaseRecordTypeBadge.displayName="BaseRecordTypeBadge";let d=(0,n.memo)(BaseRecordTypeBadge)},0x24f6a06c8:(e,t,a)=>{"use strict";a.d(t,{l:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee),o=a(0xf01a9d50),s=a(0x1727bf0da),c=a.n(s);let d=n.memo(({colorScheme:e,type:t,className:a,size:r="20",includeUserAndGroupIcons:s})=>n.createElement("div",{className:i()(c().recordTypeIcon,a,{[c().grayTone]:"gray-tone"===e,[c().grayToneInverse]:"gray-tone-inverse"===e}),"data-qa":"record-type-icon"},n.createElement(l.Ah,{...(0,o.C)(t,!0,s),size:r})))},0x1132910c6:(e,t,a)=>{"use strict";a.d(t,{$:()=>eH});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x20482ad21),o=a(0xb1ea448c),s=a(0x339b339c),c=a(0x1d3ad9d8a),d=a(0x20e80190e),m=a(0x1fcbb004d),u=a(0x11eae4d05),p=a(0x204000df3);let h=new l.Ay("recordchannels");function BaseRecordChannelCreationLoadingModal({record:e}){let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,m.O)()),[t]),n=(0,p.Eh)(e),l=(0,p._s)(e),u=(0,p.x6)(e),renderTitle=()=>r.createElement(r.Fragment,null,!n&&!l&&h.t("Unknown Record"),n&&r.createElement(s.A,{size:"medium"}));return renderTitle.displayName="renderTitle",r.createElement(r.Fragment,null,(n||u)&&r.createElement(d.dW,{isOpen:!0,closeModal:a,dataQa:"record-channel-creation-loading-modal",fullscreen:!1,labelledby:"record-channel-creation-modal-title-bar"},r.createElement(d.rQ,null,r.createElement(d.Rc,{id:"record-channel-creation-modal-title-bar",title:renderTitle()})),r.createElement(d.$m,null,r.createElement(d.qf,null,n&&r.createElement(o.A,null),u&&r.createElement(c.l,{record:e}))),r.createElement(d.jl,null,r.createElement(d.ox,null,r.createElement(d.s_,{type:"outline","aria-label":h.t("Cancel")},h.t("Cancel")),r.createElement(d.s_,{disabled:!0,"aria-label":void 0},r.createElement(s.A,{size:"small"}))))))}BaseRecordChannelCreationLoadingModal.displayName="BaseRecordChannelCreationLoadingModal";let _=r.memo(BaseRecordChannelCreationLoadingModal);(0,u.e)(_);var f=a(0x40c0d834),b=a(0x2b7f0bcc),g=a(0xa5dbe09b);let y={elementName:"cancel_button",onClick:{enableClogAction:!0}},A={elementName:"continue_button",onClick:{enableClogAction:!0}},x={elementName:"cancel_button",onClick:{enableClogAction:!0}},E={elementName:"continue_button",onClick:{enableClogAction:!0}},C={elementName:"cancel_button",onClick:{enableClogAction:!0}},k={elementName:"continue_button",onClick:{enableClogAction:!0}},v={cancelButton:{elementName:"speed_bump_cancel_button",onClick:{enableClogAction:!0}},continueButton:{elementName:"speed_bump_continue_button",onClick:{enableClogAction:!0}}};var S=a(0x1407c6c2c),I=a(0x1df96de4c),w=a(0x1d2cd7755),T=a(0x15bd59d31),N=a(0x226d2c646),M=a(0xbe0b63ff),R=a(0xa8e001b7),P=a(0x1ec68d6a3);let L=new l.Ay("recordchannels"),O=(0,P.Wo)({label:"RECORD_CHANNELS"});function useConvertChannelToRecordChannelErrorAlert(){let[e,t]=(0,r.useState)(null);return[e,(0,r.useCallback)((e,a)=>{if(!e||!a)return void t(null);switch(e.name){case R.i.ChannelIsArchived:t({info:L.t("Make sure the channel is not archived and try again."),level:"error"});break;case R.i.RecordChannelAlreadyExists:t({info:L.rt("It looks like this {recordLabel} already has a Salesforce channel.",{recordLabel:a.object_label.toLocaleLowerCase()}),level:"error"});break;case R.i.ChannelSharedWithNonapprovedTeam:t({info:L.rt("Oops! Converting this channel is not possible because this channel is shared with an external organization."),level:"error"});break;case R.i.InvalidChannelType:t({info:L.rt("It looks like this type of channel can\u2019t be linked to Salesforce."),level:"error"});break;default:O.error(Error(`Encountered an unexpected error while converting channel to record channel: ${e.message}`)),t({info:L.rt("Something went wrong and we couldn\u2019t convert the channel. Try again in a few minutes."),level:"error"})}},[])]}var D=a(0x11c82607b),F=a(0x24296355f),U=a(0x1a02c72b5),B=a(0xd6a16321),H=a(0x11ea712ca),W=a(0x1aad5a225);let V=(0,D.Ay)(H.rd.GET_RECORD_CHANNEL_AND_NAVIGATE,async(e,t,{recordId:a})=>{if(!a)return;let n=await e((0,F.V)({record:a,reason:"get-record-channel"}));if(!n.channel)return e((0,U.o)((0,B.Mt)({recordId:a})));let r=e((0,W.F)({channel:n.channel}));return e((0,U.o)((0,B.pr)(r.id)))});V.meta={name:"getRecordChannelAndNavigate",key:"createThunkGetRecordChannelAndNavigate",description:H.rd.GET_RECORD_CHANNEL_AND_NAVIGATE};let G=(0,D.Ay)("Convert an existing channel to a record channel",async(e,t,{channelId:a,reason:n,recordId:r})=>{await e((0,R.v)({channel:a,reason:n??"convert-channel-to-record-channel",recordId:r})),await e(V({recordId:r}))});function useConvertChannelToRecordChannel(e,t){let a=(0,i.wA)(),[n,l]=(0,r.useState)(!1),[o,s]=useConvertChannelToRecordChannelErrorAlert();return(0,r.useEffect)(()=>{s(null),l(!1)},[e.id,s]),{onConvert:(0,r.useCallback)(async n=>{if(!n||!(0,M.uz)(e))return!1;l(!0),s(null);try{return await a(G({channelId:n,recordId:e.id,reason:t})),!0}catch(t){return l(!1),s(t instanceof Error?t:Error(String(t)),e),!1}},[e,s,a,t]),isLoading:n,errorAlert:o}}G.meta={name:"convertChannelToRecordChannel",key:"createThunkConvertChannelToRecordChannel",description:"Convert an existing channel to a record channel"};var q=a(0x249b1763),j=a(0x16df7a1d3),z=a(0xbe2be077),K=a(0x14c522187),$=a(0x5738b4bc),Y=a(0x1cf0d97e1),Q=a(0x217553e42);let Z=(0,Y.Ay)((e,{channelId:t})=>{let a=(0,Q.OL)(e,t);return(0,$.c)(e,a)&&((0,q.kI)(e)||!(0,z.k)(e)||(0,K.vB)(e)||(0,j.S)(a))});Z.meta={name:"canUserLinkChannel",key:"createSelectorCanUserLinkChannel",description:(e,{channelId:t})=>{let a=(0,Q.OL)(e,t);return(0,$.c)(e,a)&&((0,q.kI)(e)||!(0,z.k)(e)||(0,K.vB)(e)||(0,j.S)(a))}};var J=a(0x2120d7f64),X=a(0x12185e091),ee=a(0x3711e82d),et=a(0x226892387),ea=a(0x209a696ae),en=a.n(ea);let er=new l.Ay("recordchannels"),searcherOptionsFilter=e=>(0,X.jq)(e)&&!(0,X.rI)(e);function getSearcherOptions(){return{entities:{channels:{canPost:!0,includeArchived:!1,includeOnlyExternallyShared:!1,includeRequired:!1},userGroups:!1},sort:{frecency:!0,preferChannelsUserBelongsTo:!0},allowEmptyQuery:!0,filter:searcherOptionsFilter}}function BaseRecordChannelConvertModal({record:e}){let t=(0,i.wA)(),a=(0,S.A)(),n=(0,S.A)(),{onConvert:l,isLoading:o,errorAlert:s}=useConvertChannelToRecordChannel(e),{speedBumpState:c,closeSpeedBump:u,openSpeedBump:p}=(0,J.v)(),[h,_]=(0,r.useState)(),g=(0,r.useMemo)(()=>getSearcherOptions(),[]),y=(0,et.d4)(e=>!!h?.value&&Z(e,{channelId:h.value})),A=(0,r.useMemo)(()=>r.createElement("div",{className:en().record_channel_creation_modal_conversion_speedbump_description},er.rt("Are you sure you want to convert the channel <strong>#{channelName}</strong> to <strong>#{recordName}</strong>?",{recordName:e.name,channelName:h?.label})),[e.name,h?.label]),x=(0,r.useMemo)(()=>[{id:"permission-error",message:er.t("Looks like you don\u2019t have permission to link that channel.")}],[]),E=(0,r.useCallback)(()=>t((0,m.O)()),[t]),M=(0,r.useCallback)(async()=>{if(h)return await l(h.value)?E():u()},[u,E,l,h]),R=(0,r.useCallback)(e=>r.createElement(T.A,{channelId:e.value}),[]),P=!h||!y,L=(0,r.useCallback)(async()=>{p({cancelButtonLabel:er.t("Cancel"),continueButtonLabel:er.t("Link Channel"),heading:null,message:null,onCancel:u,onContinue:M})},[u,M,p]),O=(0,r.useMemo)(()=>({...v,continueButton:{...v.continueButton,elementValue:h?.value}}),[h?.value]);return r.createElement(f.A,{eventId:ee.EventId.RECORDS_SALESFORCE_CHANNEL_CREATION,uiComponentName:ee.UiComponentName.RECORD_CHANNEL_CREATION_LINK_MODAL,uiStep:ee.UiStep.RECORD_CHANNEL_CREATION_LINK_EXISTING_CHANNEL},r.createElement(d.dW,{closeModal:E,labelledby:a,isOpen:!0},r.createElement(d.rQ,null,r.createElement(d.Rc,{id:a,title:er.t("Link an existing channel")})),r.createElement(d.$m,null,s&&r.createElement(d.qf,null,r.createElement(b.Ay,{level:s.level,className:"margin_bottom_100"},s.info)),r.createElement(d.qf,null,r.createElement("p",{className:"break_word"},er.rt("Linking an existing channel will bring Salesforce data into the channel and <strong>rename the channel to #{name}.</strong>",{name:e.name})),r.createElement(w.A,{className:en().record_channel_creation_modal_conversion_select_label,htmlFor:n,text:er.t("Choose existing channel")},r.createElement(N.u,{isRequired:!0,onOptionSelected:_,placeholderText:"Select a channel",renderOption:R,searcherOptions:g,selectedOption:h,selectId:n,width:"100%",errors:h?.value&&!y?x:I.Ml})))),r.createElement(d.jl,null,c.isVisible&&r.createElement(d.ty,{...c,autoClogProps:O,continueButtonIsLoading:o,description:A}),r.createElement(d.ox,null,r.createElement(d.s_,{type:"outline","aria-label":er.t("Cancel"),autoClogProps:C},er.t("Cancel")),r.createElement(d.s_,{disabled:P,loading:o,onClick:L,"aria-label":er.t("Link Channel"),autoClogProps:k},er.t("Link Channel"))))))}BaseRecordChannelConvertModal.displayName="BaseRecordChannelConvertModal";let ei=r.memo(BaseRecordChannelConvertModal),el=(0,u.e)(ei);var eo=a(0x120c268ad),es=a.n(eo),ec=a(0x11a296110),ed=a(0x139c79d16);let em="record_channel_creation_method";function RecordChannelCreationRadioCard({checked:e,disabled:t,imageSrc:a,label:n,method:i,onChange:l,subtext:o}){let s=`${em}__${i}`,c=(0,r.useMemo)(()=>r.createElement("strong",null,n),[n]),d=(0,r.useCallback)(()=>{t||l(i)},[i,l,t]);return r.createElement(ec.Nm,{className:en().record_channel_creation_modal_radio_card,onClick:d,tabIndex:-1},r.createElement("img",{alt:n,src:a,className:es()({[en().record_channel_creation_modal_radio_card_image]:!0,[en().record_channel_creation_modal_radio_card_image_disabled]:t})}),r.createElement(w.A,{className:en().record_channel_creation_modal_radio_card_label,cursor:"pointer",htmlFor:s,isDisabled:t,subtext:o,text:c,type:"inline"},r.createElement(ed.A,{id:s,checked:!t&&e,disabled:t,name:em,onChange:d,value:i})))}RecordChannelCreationRadioCard.displayName="RecordChannelCreationRadioCard",new l.Ay("recordchannels");var eu=((n={}).CREATE="create_new",n.LINK="link_existing",n),ep=a(0x203f0793b);let eh=new l.Ay("recordchannels"),e_=(0,P.Wo)({label:"RECORD_CHANNELS"});function useCreateRecordChannelErrorAlert(){let[e,t]=(0,r.useState)(null);return[e,(0,r.useCallback)(e=>{e?e.name===ep.W.FeatureNotEnabled?t({level:"warning",info:eh.t("Looks like you\u2019re unable to create this channel. Please contact your Sales admin to learn more.")}):(e_.error(Error(`Encountered an unexpected error while creating record channel: ${e.message}`)),t({level:"error",info:eh.t("Something went wrong creating the channel, please try again.")})):t(null)},[])]}let ef=(0,D.Ay)("Create a new record channel",async(e,t,{recordId:a,reason:n,navInPlace:r=!0})=>{let i=await e((0,ep.$)({record:a,reason:n??"create-record-channel"})),l=i.channel.id;return e((0,W.F)({channel:i.channel})),r?await e((0,U.o)((0,B.zp)((0,B.pr)(l)))):await e((0,U.o)((0,B.pr)(l))),i.channel});ef.meta={name:"createRecordChannel",key:"createThunkCreateRecordChannel",description:"Create a new record channel"};var eb=a(0x1d24ec95f),eg=a(0xe0376d2),ey=a(0x17d5374a6),eA=a(0x3793f9af),ex=a(0x149cc1304),eE=a(0x15f4f83cf),eC=a(0xe684f705),ek=a(0x46dbff89);let ev=new l.Ay("recordchannels"),eS=(0,D.Ay)("Opens the channel invite modal populated with record team members.",async(e,t,{channelId:a,record:n})=>{let i=(await e((0,ex.o)({recordId:n.id,reason:"open-record-team-modal"}))).members.filter(e=>!!e.slack_member_id&&!e.is_record_channel_member);if(!i.length)return;let l=i.map(e=>e.slack_member_id),o=t(),[s,c]=(0,eb.A)(l,e=>(0,eE.GU)((0,eC.nv)(o,e,{fetchIfMissing:!1,preferNonExistentToNull:!1}))),d=[];if(s.length){let t=await e((0,eA.Y)({ids:s}));t&&d.push(...t.resolved)}let m=(0,eg.A)([...c,...d]);m.length&&e((0,ek.q)({element:r.createElement(ey.s,{channelId:a,initialSelectedMemberIds:m,title:ev.t("Invite {recordType} team",{recordType:n.object_label})})}))});function useCreateRecordChannel(e){let t=(0,i.wA)(),[a,n]=(0,r.useState)(!1),[l,o]=useCreateRecordChannelErrorAlert();return(0,r.useEffect)(()=>{o(null),n(!1)},[e.id,o]),{onCreate:(0,r.useCallback)(async()=>{if(!(0,p._s)(e))return!1;n(!0),o(null);try{let a=await t(ef({navInPlace:!1,recordId:e.id}));return t(eS({record:e,channelId:a.id})),!0}catch(e){return n(!1),o(e instanceof Error?e:Error(String(e))),!1}},[t,e,o]),isLoading:a,errorAlert:l}}eS.meta={name:"openRecordTeamModal",key:"createThunkOpenRecordTeamModal",description:"Opens the channel invite modal populated with record team members."};let eI=a.p+"link-channel-9992638.svg",ew=a.p+"new-channel-b12786f.svg",eT=new l.Ay("recordchannels");function BaseRecordChannelCreationModal({record:e}){let t=(0,i.wA)(),[a,n]=(0,r.useState)(eu.CREATE),{onCreate:l,isLoading:o,errorAlert:s}=useCreateRecordChannel(e),c=(0,r.useCallback)(()=>t((0,m.O)()),[t]),u=(0,r.useCallback)(e=>n(e),[]),p=(0,r.useCallback)(async()=>{switch(a){case eu.LINK:t(el({record:e}));break;case eu.CREATE:l().then(e=>{e&&c()})}},[t,e,l,a,c]),h=(0,r.useMemo)(()=>({...E,elementValue:a}),[a]);return r.createElement(f.A,{eventId:ee.EventId.RECORDS_SALESFORCE_CHANNEL_CREATION,uiComponentName:ee.UiComponentName.RECORD_CHANNEL_CREATION_MODAL,uiStep:ee.UiStep.RECORD_CHANNEL_CREATION_SELECT_METHOD},r.createElement(d.dW,{isOpen:!0,className:en().record_channel_creation_modal,closeModal:c,dataQa:"record-channel-creation-modal",fullscreen:!1,labelledby:"record-channel-creation-modal-title-bar"},r.createElement(d.rQ,{className:en().record_channel_creation_modal_header},r.createElement(d.Rc,{id:"record-channel-creation-modal-title-bar",title:eT.t("Create a Salesforce Channel")})),r.createElement(d.$m,{className:en().record_channel_creation_modal_content},s&&r.createElement(d.qf,null,r.createElement(b.Ay,{level:s.level,className:"margin_bottom_125"},s.info)),r.createElement(d.qf,null,r.createElement(g.A,{className:en().record_channel_creation_modal_radio_group},r.createElement(RecordChannelCreationRadioCard,{checked:a===eu.CREATE,imageSrc:ew,label:eT.t("Create a new channel"),method:eu.CREATE,onChange:u,subtext:eT.t("Start fresh with a new channel and add your team")}),r.createElement(RecordChannelCreationRadioCard,{checked:a===eu.LINK,imageSrc:eI,label:eT.t("Link an existing channel"),method:eu.LINK,onChange:u,subtext:eT.rt("Bring Salesforce data into the channel and rename it to # {name}",{name:e.name})})))),r.createElement(d.jl,{className:en().record_channel_creation_modal_footer},r.createElement(d.ox,null,r.createElement(d.s_,{type:"outline","aria-label":eT.t("Cancel"),autoClogProps:x},eT.t("Cancel")),r.createElement(d.s_,{disabled:o,loading:o,onClick:p,"aria-label":eT.t("Create Channel"),autoClogProps:h},eT.t("Create Channel"))))))}BaseRecordChannelCreationModal.displayName="BaseRecordChannelCreationModal";let eN=r.memo(BaseRecordChannelCreationModal),eM=(0,u.e)(eN);var eR=a(0x1faa3f1ac),eP=a(0x247cf31a2);let eL=new l.Ay("recordchannels");function BaseRecordChannelCreationParentNudgeModal({record:e}){let t=(0,i.wA)();(0,r.useEffect)(()=>{e.parent?.channel_id||t(eM({record:e}))},[t,e]);let a=(0,r.useCallback)(()=>t((0,m.O)()),[t]),n=(0,r.useCallback)(async()=>{t(eM({record:e}))},[t,e]),l=(0,r.useCallback)(()=>{e.parent?.channel_id&&(t((0,U.o)((0,B.pr)(e.parent?.channel_id))),a())},[t,a,e.parent?.channel_id]);return r.createElement(f.A,{eventId:ee.EventId.RECORDS_SALESFORCE_CHANNEL_CREATION,uiComponentName:ee.UiComponentName.RECORD_CHANNEL_CREATION_PARENT_NUDGE_MODAL,uiStep:ee.UiStep.RECORD_CHANNEL_CREATION_PARENT_NUDGE},r.createElement(d.dW,{closeModal:a,dataQa:"record-channel-creation-parent-nudge-modal",fullscreen:!1,isOpen:!0,labelledby:"record-channel-creation-parent-nudge-modal-title"},r.createElement(d.rQ,null,r.createElement(d.Rc,{id:"record-channel-creation-parent-nudge-modal-title",title:eL.rt("Create a channel for {name}?",{name:e.name})})),r.createElement(d.$m,null,r.createElement(d.qf,null,r.createElement("p",null,eL.rt("Your teammates are already collaborating in {channel}. Consider using that channel unless you need a more focused conversation.",{channel:r.createElement(eR.A,{onClick:l},r.createElement(eP.A,{channelId:e.parent?.channel_id}))})))),r.createElement(d.jl,null,r.createElement(d.ox,null,r.createElement(d.s_,{type:"outline","aria-label":eL.t("Cancel"),autoClogProps:y},eL.t("Cancel")),r.createElement(d.s_,{onClick:n,"aria-label":eL.t("Continue"),autoClogProps:A},eL.t("Continue"))))))}BaseRecordChannelCreationParentNudgeModal.displayName="BaseRecordChannelCreationParentNudgeModal";let eO=r.memo(BaseRecordChannelCreationParentNudgeModal);(0,u.e)(eO);var eD=a(0x1eaf25708),eF=a(0x22170ca89),eU=a(0x14236acae);function BaseRecordChannelCreationStartModal({recordId:e}){let t=(0,et.d4)(t=>(0,eU.PQ)(t,e,!0)),a=(0,p.Eh)(t),n=(0,p._s)(t),i=(0,p.x6)(t),l=(0,et.d4)(eD.f),o=!!(t.parent?.channel_id&&t.parent?.object_api_name===eF.hM.Account&&t.object_api_name===eF.hM.Account);return l?null:r.createElement(r.Fragment,null,(a||i)&&r.createElement(_,{record:t}),n&&o&&r.createElement(eO,{record:t}),n&&!o&&r.createElement(eN,{record:t}))}BaseRecordChannelCreationStartModal.displayName="BaseRecordChannelCreationStartModal";let eB=r.memo(BaseRecordChannelCreationStartModal),eH=(0,u.e)(eB)},0x11d55244f:(e,t,a)=>{"use strict";a.d(t,{_:()=>useCopyRecordLink});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xbe0b63ff),l=a(0x927937a),o=a(0x1563c9b37),s=a(0x188544c76),c=a(0x226892387),d=a(0x21fd09382),m=a(0x1ee439e69);function useCopyRecordLink(e){let t=(0,i.uz)(e),a=(0,r.wA)(),u=(0,c.d4)(l.kC),p=(0,c.d4)(m.H7);return(0,n.useCallback)(()=>{if(t){let t=e.external_url;if(u){let{salesforceOrgId:a,rawRecordId:n}=(0,s.D)(e.id);a&&n&&p&&(t=(0,o._)({team:p,orgId:a,recordId:n}))}a((0,d.I)({text:t}))}},[a,t,e.external_url,e.id,u,p])}},0x135860f25:(e,t,a)=>{"use strict";a.d(t,{T:()=>p,W:()=>useOpenRecordInNewWindow});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xbaaab71e),l=a(0xd6a16321),o=a(0xd843ab47),s=a(0x6d72337),c=a(0x24558b75f),d=a(0x11c82607b),m=a(0x226892387),u=a(0x19895585a);let p=(0,d.Ay)("Opens a given channel tab in a new window",(e,t,{record:a,recordViewTab:n},r)=>{let{windowId:o,container:c}=r(i.U),d={[u.mq.Primary]:(0,l.Mt)({recordId:a.id,recordViewTab:n,openedFrom:{windowId:o,viewContainer:c}})};e((0,s.Bb)({viewSet:d,shouldShowSearch:!1,shouldShowHistory:!0,shouldNavigateInContext:!0}))});function useOpenRecordInNewWindow({record:e,recordViewTab:t}){let a=(0,r.wA)(),{isMainWindow:i}=(0,n.useContext)(o.A),l=(0,m.d4)(c.n3)&&i,s=(0,n.useCallback)(()=>{l&&a(p({record:e,recordViewTab:t}))},[a,l,e,t]);return{canOpenInNewWindow:l,openInNewWindow:s}}p.meta={name:"openRecordInNewWindow",key:"createThunkOpenRecordInNewWindow",description:"Opens a given channel tab in a new window"}},0x4a5b4937:(e,t,a)=>{"use strict";a.d(t,{x:()=>useSalesforceOrgMigrationStatus});var n=a(0x226892387),r=a(0x8ed8ca46);let useSalesforceOrgMigrationStatus=e=>{let t=(0,n.d4)(t=>e?(0,r.m6)(t,e):void 0);return t?.is_migrating??!1}},0x2430fe39b:(e,t,a)=>{"use strict";a.d(t,{m:()=>useSalesforceRecordOptions});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1595bdd0),l=a(0x103edac79),o=a(0x20482ad21),s=a(0x5cea7998),c=a.n(s);let SelectOptionSkeleton=()=>n.createElement("span",{className:c().skeleton});SelectOptionSkeleton.displayName="SelectOptionSkeleton";var d=a(0x226892387),m=a(0x162fb02d7),u=a(0x1ec68d6a3),p=a(0x11c82607b),h=a(0x1cfd855a2),_=a(0xcf8ebf2b);let f=(0,p.Ay)("Fetch and cache all searchable record options for an org if not already fetched",async(e,t,{salesforceOrgId:a})=>{let n=(0,u.Ay)({label:"SALESFORCE-FETCH-ALL-RECORD-OPTIONS"}),r=(0,m.zh)(t(),a),i=(0,m.o7)(t(),a);r||i||(e((0,h.eW)({isFetching:!0,salesforceOrgId:a})),e((0,_.x)({passedSalesforceOrgId:a})).then(t=>{e((0,h.MB)({salesforceOrgId:a,options:t.objects}))}).catch(()=>{n.error(Error("Fetching all searchable record options via searchRecordTypes failed!"))}).finally(()=>{e((0,h.eW)({isFetching:!1,salesforceOrgId:a}))}))});f.meta={name:"maybeFetchAllRecordOptions",key:"createThunkMaybeFetchAllRecordOptions",description:"Fetch and cache all searchable record options for an org if not already fetched"};var b=a(0xb77a689a),g=a(0x2172ff7ff);let sortOptions=(e,t)=>(0,b.A)(e.label)&&(0,b.A)(t.label)?(0,g.Ay)(e.label,t.label):0,y=(0,p.Ay)("Fetch and cache relevant record options for an org if not already fetched",async(e,t,{salesforceOrgId:a})=>{let n=(0,u.Ay)({label:"SALESFORCE-FETCH-RELEVANT-RECORD-OPTIONS"}),r=(0,m.Nx)(t(),a),i=(0,m.qI)(t(),a);r||i||(e((0,h.K2)({isFetching:!0,salesforceOrgId:a})),e((0,_.x)({filters:{relevantItemsOnly:!0,isSearchable:!0},passedSalesforceOrgId:a})).then(t=>{e((0,h.Q3)({salesforceOrgId:a,options:t.objects.sort(sortOptions)}))}).catch(()=>{n.error(Error("Fetching relevant record options via searchRecordTypes failed!"))}).finally(()=>{e((0,h.K2)({isFetching:!1,salesforceOrgId:a}))}))});y.meta={name:"maybeFetchRelevantRecordOptions",key:"createThunkMaybeFetchRelevantRecordOptions",description:"Fetch and cache relevant record options for an org if not already fetched"};var A=a(0x1ed154a66);let x=new o.Ay("search"),useSalesforceRecordOptions=({salesforceOrgId:e,selectedSalesforceRecordType:t,extraFilters:a,showRelevantOptions:o=!0,skipFetchingObjects:s})=>{let c=(0,r.wA)(),u=(0,d.Z2)(t=>(0,m.Rg)(t,e)),p=(0,d.Z2)(t=>(0,m.zM)(t,e)),h=(0,d.Z2)(t=>(0,m.LM)(t,e)),_=(0,d.d4)(t=>(0,m.qI)(t,e)),b=(0,d.d4)(t=>(0,m.Nx)(t,e)),g=(0,d.d4)(t=>(0,m.o7)(t,e)),E=(0,d.d4)(t=>(0,m.zh)(t,e)),[C,k]=(0,n.useState)((!b||_)&&o),[v,S]=(0,n.useState)(!E||g);(0,n.useEffect)(()=>{!s&&e&&(c(f({salesforceOrgId:e})),o&&c(y({salesforceOrgId:e})))},[c,e,o,s]);let I=(0,n.useRef)(!0);(0,n.useEffect)(()=>{I.current||S(g)},[g]),(0,n.useEffect)(()=>{I.current||k(_)},[_]),(0,n.useEffect)(()=>{I.current&&(I.current=!1)},[]);let w=(0,n.useMemo)(()=>(0,A.Z)(p),[p]),T=(0,n.useMemo)(()=>(0,A.Z)(h),[h]),N=(0,n.useMemo)(()=>(0,i.A)(u.map(e=>T.find(t=>t.value===e))),[T,u]),M=(0,n.useMemo)(()=>[{label:x.t("All suggested objects ({numSuggested})",{numSuggested:w.length}),value:""},...w],[w]),R=(0,n.useMemo)(()=>{let e=[{label:x.t("Search for any type of record"),options:[],value:""},...a||[],...N.length?[{label:x.t("Recent"),options:N,value:""}]:[],...o?[{label:x.t("Suggested objects"),options:M,value:""}]:[]],t=(0,l.A)(T,M,N,e=>e.value);return v?e.push({label:x.t("All objects"),options:[void 0,void 0,void 0].map(()=>({label:n.createElement(SelectOptionSkeleton,null),nonInteractive:!0,value:"loader"})),value:""}):t.length&&e.push({label:x.t("All objects"),options:t,value:""}),e},[T,a,v,M,N,o]),P=(0,n.useMemo)(()=>{let findOption=e=>e.value===t,e=a?.find(findOption)||T.find(findOption)||w.find(findOption);return C?{label:x.t("Objects",{fallbackHash:"72a83add2c5ede877c10d23f302d3e17accbadab",fallbackHashNs:"emoji"}),value:""}:!e&&t?{label:t,value:t}:o&&!e?.value?{label:x.t("{numSuggested, plural, =1 {# object} other {# objects}}",{numSuggested:w.length}),value:""}:e},[a,T,w,C,t,o]);return{isLoadingSalesforceRelevantOptions:C,salesforceRecordTypeOptions:R,selectedSalesforceRecordTypeOption:P}};useSalesforceRecordOptions.displayName="useSalesforceRecordOptions"},0xa8dcaaaa:(e,t,a)=>{"use strict";a.d(t,{y:()=>useShareRecord});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xe75a33c2),l=a(0xf5bbd10a),o=a(0x199e02a8a),s=a(0x183e20f52),c=a(0x10a716a94),d=a(0x120c268ad),m=a.n(d),u=a(0x20482ad21),p=a(0x209ca9ff),h=a(0x20e80190e),_=a(0x1fcbb004d),f=a(0x1de419498),b=a.n(f);let g=new u.Ay("modernselling"),ShareRecordErrorModal=({externalUrl:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,_.O)())},[t]),i=g.t("There was a problem sharing this record",{fallbackHash:"8d886c0ba6f2b683daba5f19568a316226ce3e4c",fallbackHashNs:"recordchannels"}),l=e?g.t("It\u2019s possible that you don\u2019t have access to this record, or the record has been deleted. You can go to Salesforce for more information.",{fallbackHash:"dbd28b0e3bdae5487a2a2326226d9142b6814bd0",fallbackHashNs:"recordchannels"}):g.t("It\u2019s possible that you don\u2019t have access to this record, or the record has been deleted.",{fallbackHash:"dbd28b0e3bdae5487a2a2326226d9142b6814bd0",fallbackHashNs:"recordchannels"}),o=g.t("Cancel");return n.createElement(h.aF,null,n.createElement(h.rQ,null,n.createElement(h.Rc,{title:i})),n.createElement(h.$m,null,n.createElement("div",{className:m()(b().content,"break_word")},l)),n.createElement(h.jl,null,n.createElement(h.ox,null,e&&n.createElement(p.A,{url:e}),n.createElement(h.s_,{type:"outline",onClick:a,"aria-label":o},o))))};ShareRecordErrorModal.displayName="ShareRecordErrorModal";var y=a(0x11c82607b),A=a(0x46dbff89);let x=(0,y.Ay)("Opens the ignore this modal",(e,t,a)=>{e((0,A.q)({element:n.createElement(c.A,{subtype:"share_record_error_modal"},n.createElement(ShareRecordErrorModal,a))}))});function useShareRecord({recordId:e,index:t,isOnSearchTab:a,shouldDisplayToast:c,shareRecordModalType:d=o.F.DEFAULT,externalUrl:m,onShareComplete:u}){let p=(0,r.wA)(),h=(0,l.A)();return(0,n.useCallback)(async()=>{try{let n=await p((0,i.x)({record:e,reason:"get-share-record-blocks"}));if(n?.ok){let{content_blocks:t,salesforce_record:a}=n;p((0,o.A)({record:e,contentBlocks:t,salesforceRecord:a,shouldDisplayToast:c,shareRecordModalType:d,onShareComplete:u}))}a&&p((0,s.ME)({position:t,subtargetType:s.qq.shareItem,recordId:e}))}catch(e){h.error(Error(`Failed to share record: ${e}`),{error:e}),p(x({externalUrl:m}))}},[p,e,a,c,d,t,h,m,u])}x.meta={name:"openShareRecordErrorModal",key:"createThunkOpenShareRecordErrorModal",description:"Opens the ignore this modal"}},0x24a5796af:(e,t,a)=>{"use strict";a.d(t,{f:()=>l});var n=a(0x1cf0d97e1),r=a(0x216198dcb),i=a(0x204000df3);let l=(0,n.Ay)((e,t)=>!!t&&(0,i._s)(t)&&t.record_channels_supported&&!t.record_channel_id&&!(0,r.i)(e,t.id));l.meta={name:"canCreateRecordChannelForRecord",key:"createSelectorCanCreateRecordChannelForRecord",description:(e,t)=>!!t&&(0,i._s)(t)&&t.record_channels_supported&&!t.record_channel_id&&!(0,r.i)(e,t.id)}},0x21afb988:(e,t,a)=>{"use strict";a.d(t,{U:()=>d});var n=a(0x1132910c6),r=a(0x24296355f),i=a(0x1a02c72b5),l=a(0xd6a16321),o=a(0x11c82607b),s=a(0x216198dcb),c=a(0x1aad5a225);let d=(0,o.Ay)("Navigates to a record channel if it exists or starts the record channel creation flow",async(e,t,{recordId:a,isFromDeepLink:o})=>{let d=t(),m=(0,s.i)(d,a);if(m)return e((0,i.o)((0,l.pr)(m.id)));let u=await e((0,r.V)({record:a,reason:"navigate-to-or-create-record-channel"}));return u.channel?(e((0,c.F)({channel:u.channel})),e((0,i.o)((0,l.pr)(u.channel.id)))):e(o?(0,i.o)((0,l.Mt)({recordId:a,startCreationFlow:!0})):(0,n.$)({recordId:a}))});d.meta={name:"navigateToOrCreateRecordChannel",key:"createThunkNavigateToOrCreateRecordChannel",description:"Navigates to a record channel if it exists or starts the record channel creation flow"}},0x754ea859:(e,t,a)=>{"use strict";a.d(t,{B:()=>isMessageUnfurlReferrer,c:()=>p});var n=a(0x139aa1a7),r=a(0xbaaab71e),i=a(0x1a02c72b5),l=a(0xd6a16321),o=a(0x12185e091),s=a(0x16ed1b0dc),c=a(0x11c82607b),d=a(0x9b971e7e),m=a(0x217553e42),u=a(0x204000df3);function isMessageUnfurlReferrer(e){return e?.type==="messageUnfurl"}let p=(0,c.Ay)("Navigate to a Record in the Flexpane",async(e,t,{listViewId:a,recordId:c,shouldPersistOnRecordChannel:p=!0,referrer:h,recordViewTab:_,options:f,formValues:b,errors:g,fieldToScrollTo:y},A)=>{let x,E=t(),C=(0,d.ZT)(E);C&&(0,u.D1)(C,[c]);let{getPrimaryView:k,windowId:v,container:S}=A(r.U);if(p){let e=k(E),t=e?.id;x=t&&e?.viewType===n.D.Channel&&(0,s.A)(t)&&(0,o.rI)((0,m.OL)(E,t,!1))?t:void 0}let I=(0,l.We)({listViewId:a,recordId:c,recordViewTab:_});return e((0,i.o)({...I,params:{...I.params,parentTab:x,referrer:h,formValues:b,errors:g,fieldToScrollTo:y,openedFrom:b?void 0:{windowId:v,viewContainer:S}},options:f}))});p.meta={name:"navigateToRecord",key:"createThunkNavigateToRecord",description:"Navigate to a Record in the Flexpane"}},0x12a7ec44a:(e,t,a)=>{"use strict";a.d(t,{H:()=>o});var n=a(0x81f3a3a7),r=a(0x11c82607b),i=a(0x78f144a5),l=a(0x1aad5a225);let o=(0,r.Ay)("Open a record channel",async(e,t,{channel:a,reason:r})=>{try{e((0,i.b)({id:a.id,is_open:!0}));let t=await e((0,n.j)({channel:a.id,reason:r}));t.ok&&e((0,l.F)({channel:t.channel}))}catch{e((0,i.b)({id:a.id,is_open:!1}))}});o.meta={name:"openRecordChannel",key:"createThunkOpenRecordChannel",description:"Open a record channel"}},0x1b351f9ab:(e,t,a)=>{"use strict";a.d(t,{x:()=>formatStructuredField});var n=a(0x22170ca89);function stripHtmlTags(e){let t=e.replace(/<br\s*?\/?>/gi," ").replace(/<\/(p|div|li|h[1-6]|tr|td|th|blockquote|section|article|header|footer|nav|aside|main)>/gi," "),a=new DOMParser().parseFromString(t,"text/html");return(a.body.textContent||a.body.innerText||"").split(/\s/).filter(Boolean).join(" ")}function formatStructuredField(e){let t=e.display_value;return"boolean"==typeof e.value?t=e.value?"true":"false":t&&e.data_type===n.ls.Percent?t=`${t}%`:e.html_formatted&&(t=stripHtmlTags(t)),{label:e.label,value:t,apiName:e.api_name}}},0xf01a9d50:(e,t,a)=>{"use strict";a.d(t,{C:()=>getSalesforceIconPropsForType,sc:()=>getRecordChannelOverrideIconProps});var n=a(0x22170ca89),r=a(0x8b588d25),i=a(0x12185e091),l=a(0x1d104c491);let o={name:"user"},s={name:"user-groups"},c={name:"sf-record"},d={name:"user-filled"},m={name:"user-groups-filled"},u={name:"sf-record-filled"},p={name:"headphones-filled"},h={[l.Dj.Account]:{name:"sf-account"},[l.Dj.Case]:{name:"sf-case"},[l.Dj.Contact]:{name:"sf-contact"},[l.Dj.Lead]:{name:"sf-lead"},[l.Dj.Opportunity]:{name:"sf-opportunity"},ListView:{name:"sf-record-list"},Org:{name:"sf-cloud"},Record:c,Bolt:{name:"bolt"}},_={[l.Dj.Account]:{name:"sf-account-filled"},[l.Dj.Case]:{name:"sf-case-filled"},[l.Dj.Contact]:{name:"sf-contact-filled"},[l.Dj.Lead]:{name:"sf-lead-filled"},[l.Dj.Opportunity]:{name:"sf-opportunity-filled"},ListView:{name:"sf-record-list-filled"},Org:{name:"sf-cloud-filled"},Record:u,Bolt:{name:"bolt-filled"}},getSalesforceIconPropsForType=(e,t,a)=>{if(a){if("User"===e)return t?d:o;if("Group"===e)return t?m:s}return t?e&&_[e]||u:e&&h[e]||c};function getRecordChannelOverrideIconProps(e){if(!(0,i.rI)(e))return null;let t=(0,r.LJ)(e);return(0,r.fI)(t?.record_id)===n.B4.Huddle?p:null}},0x9ccef20a:(e,t,a)=>{"use strict";a.d(t,{e:()=>ViewHeaderRecordType});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x89c7949e),o=a(0x8b588d25),s=a(0x226892387),c=a(0x217553e42),d=a(0x1d6165588),m=a.n(d);function ViewHeaderRecordType({channelId:e,className:t}){let a=(0,s.d4)(t=>(0,c.OL)(t,e)),r=(0,o.dM)(a),d=(0,o.jT)(a);return r?n.createElement(l.J,{recordType:r,recordLabel:d||r,className:i()(m().header_record_type_badge,t)}):null}ViewHeaderRecordType.displayName="ViewHeaderRecordType"},0x141fe3659:(e,t,a)=>{"use strict";a.d(t,{F:()=>ScopeableSelect});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x237b6a339),s=a(0x1595bdd0),c=a(0x20482ad21),d=a(0x11a296110),m=a(0x6aeae8a3),u=a(0x2173e1832),p=a(0x2501a2cee),h=a(0x1952a5c50),_=a(0x1e3c7661);let f="bottom-right",b="__NO_RESULTS__",g="__SCOPE_OPTION__";var y=a(0x21f3c49e8),A=a(0x72b537b5),x=a(0x543a781e),E=a(0x1df96de4c),C=a(0xfbe3141b),k=a(0x99233ecb),v=a(0x1229d92d),S=a(0x178788799);let I=class extends S.Vf{onMouseEnterMenuItem(e){let t=this.preventMenuItemHighlight?e:this.state.highlightedMenuItemIndex;this.menuItemPreventedFromHighlight=e,this.setState(()=>({highlightedMenuItemIndex:t,highlightedMenuItemKbNavActive:!1,isKeyboardHighlight:!1}))}},w=(0,v.A)(I);var T=a(0xf962ece8),N=a.n(T);let M=new c.Ay("salesforce-kit"),ScopeSelector=({selectedScope:e,hint:t,allOptions:a,noScopeOption:n,onOptionSelected:i,onClose:o,placeholderText:c,noAvailableOptionsText:d,noMatchingOptionsText:m=d,suggestedOptions:u})=>{let p=(0,A.U)(),h=(0,r.useMemo)(()=>a.map(e=>({...e,lowerCaseValue:e.value.toLowerCase()})),[a]),_=(0,r.useMemo)(()=>n&&{...n,lowerCaseValue:n.value.toLowerCase()},[n]),[f,b]=(0,r.useState)(""),g=(0,x.A)(f,100),v=(0,r.useMemo)(()=>(0,s.A)([_,...u?.map(e=>({...e,lowerCaseValue:e.value.toLowerCase()}))||E.Ml]),[_,u]),[S,I]=(0,r.useState)(h),T=(0,r.useCallback)(e=>{b(e.target.value)},[]),R=(0,r.useCallback)(e=>{" "===e.key&&e.stopPropagation()},[]);(0,r.useEffect)(()=>{if(!g)return void I(v.length?v:h);let e=g.toLowerCase();I(()=>h.filter(t=>!!(!e||(0,y.A)(e))||t.lowerCaseValue.includes(e)))},[g,h,v]);let P=(0,r.useCallback)(e=>()=>{i(e),o?.()},[i,o]),L=(0,r.useCallback)(t=>t.length?t.map(t=>{let a=t.value===e?.value;return r.createElement(k.Dr,{className:l()(N().menuItem,{[N().checked]:a}),type:"compact_item",key:t.value,onSelected:P(t)},t.label)}):r.createElement(k.Dr,{type:"compact_item"},f.length?m:d),[e?.value,f,P,m,d]),O=(0,r.useMemo)(()=>!f&&v.length?r.createElement(r.Fragment,null,r.createElement(k.c$,{label:M.t("Suggestions")}),L(v)):L(S),[S,f,L,v]),D=(0,r.useCallback)(e=>{e&&setTimeout(()=>{e.focus()},10)},[]);return r.createElement(w,{menuClassNames:N().scopeMenu,logger:p},r.createElement("div",{className:N().inputContainer},r.createElement(C.A,{autoFocus:!0,ref:D,placeholder:c,value:f,icon:"search",onChange:T,onKeyDown:R,size:"medium","aria-label":c})),t&&!f&&r.createElement(k.c$,{className:N().hint,label:t}),!f&&r.createElement(k.bX,null),O)};ScopeSelector.displayName="ScopeSelector";var R=a(0x1d1911997),P=a(0x1e42a4875);let L=class extends r.Component{currentQuery;currentScopeValue;constructor(e){super(e)}componentDidUpdate(){let{selectState:e}=this.props;if(e.selectedOption?.value===g)return void this.props.setSelectState(()=>({...e,filterQuery:this.currentQuery,selectedOption:void 0}));if(this.currentQuery=e.filterQuery,(this.currentScopeValue||this.props.scopeValue)&&this.currentScopeValue!==this.props.scopeValue&&(0,h.u)(this.currentQuery)){let t=this.currentQuery;this.currentScopeValue=this.props.scopeValue,setTimeout(()=>{this.props.setSelectState(()=>({...e,filterQuery:`${t} `}))},0),setTimeout(()=>{this.props.setSelectState(()=>({...e,filterQuery:t,isExpanded:!0,isLoading:!0}))})}}render(){return r.createElement(R.JJ,{...this.props,className:l()("full_width",this.props.className)})}};L.displayName="BaseScopeableSingleSelect";let O=(0,P.A)(L);var D=a(0x1703fd552),F=a.n(D),U=((n=U||{})[n.None=0]="None",n[n.Loading=1]="Loading",n[n.Complete=2]="Complete",n[n.Error=3]="Error",n);let B=new c.Ay("salesforce-kit"),ScopeableSelect=({ariaLabel:e,currentSelection:t,errorContent:a,expandOnFocusWhenValuePresent:n,getScopeSelectorLinkText:i,handleSearch:c,hints:y,isDisabled:A,isRequired:x,onOptionSelected:E,placeholderText:C,renderOption:k,scopeAriaLabel:v,scopeStateFromParent:S,scopeSelectorProps:I,searchSelectProps:w})=>{let[T,N]=(0,r.useState)(0),M=(0,r.useRef)(),{scope:R,setScope:P}=S||{},[L,D]=(0,r.useState)(R||I.noScopeOption),U=(0,r.useRef)(!1),H=(0,r.useCallback)(e=>(M.current=e,N(1),c({query:e,scope:L,currentSelection:t,hasSelectedValueChanged:U.current}).then(e=>[{value:g,label:"",height:40},...e.length?e:[{value:b,label:B.t("No items"),isDisabled:!0,nonInteractive:!0}]]).finally(()=>{M.current===e&&N(2)})),[c,t,L]),W=(0,r.useCallback)(()=>N(3),[]),V=(0,r.useCallback)(e=>A||3===T?null:e&&!(0,h.u)(e)?B.t("Keep typing\u2026"):null,[A,T]),G=(0,r.useRef)(null);(0,r.useEffect)(()=>{G.current?.focus(),P?.(L)},[L,P]);let q=(0,r.useCallback)(e=>r.createElement(m.Ay,{...e,ariaLabel:v,ariaRole:"dialog",offsetY:_.uo,position:f,shouldCloseOnOverlayClick:!0,zIndex:u.m.AboveFullScreen,isOpen:!0,id:"scope-popover"},r.createElement(ScopeSelector,{selectedScope:L,onOptionSelected:D,onClose:e.onClose,...I})),[L,v,I,D]),j=(0,r.useRef)(),z=(0,r.useRef)(null),K=(0,r.useCallback)(e=>{z.current&&j.current&&(j.current.ref?.(z.current),j.current.onClick?.(e))},[]),$=(0,r.useMemo)(()=>r.createElement(m.Wv,{position:f,renderPopover:q},e=>(j.current=e,r.createElement(d.Ay,{type:"outline",className:F().scopeSelectorButton,ref:z,onClick:K},r.createElement(p.Ah,{name:"filters"})))),[q,K]),Y=(0,r.useMemo)(()=>r.createElement("div",{className:F().errorContent},r.createElement("div",{className:F().errorText},a),r.createElement("div",{className:F().errorIcon},r.createElement(p.Ah,{name:"warning"}))),[a]),Q=(0,r.useMemo)(()=>{let e=y?.map(e=>({id:(0,o.A)(),message:e,className:F().regularHintElement})),t=3===T?{id:(0,o.A)(),message:Y}:void 0;return(0,s.A)([t,...e||[]])},[Y,y,T]),Z=(0,r.useCallback)((e,{isActive:t})=>e.value===g?r.createElement("div",{className:l()(F().scopeSelectorLink,{[F().active]:t}),"data-qa":"scope-selector","data-is-scope-selector":!0},i(L),r.createElement(p.Ah,{name:"caret-right",inline:!0})):e.value===b?e.label:k(e,{isActive:t}),[i,k,L]),J=(0,r.useCallback)(e=>e.value===g?K():(U.current=!0,E(e)),[E,K]),X=(0,r.useMemo)(()=>r.createElement(O,{...w,ariaLabel:e,classPrefix:"salesforceScopeableSearchSelect",expandOnFocus:t&&n,focusOnMount:!0,hints:Q,isDisabled:A,isRequired:x,emptyStateMessage:V,inputRef:G,onOptionSelected:J,onSearchError:W,optionsRowHeight:48,placeholderText:C||B.t("Type to search\u2026",{fallbackHash:"4548321f156f19dea4c995a69e9194bba5c59ad2",fallbackHashNs:"select"}),renderOption:Z,search:H,scopeValue:L?.value,showDropdownIcon:!1,selectedOption:Array.isArray(t)?void 0:t}),[Q,e,t,n,V,A,x,J,W,C,Z,L,H,w]);return r.createElement("div",{className:F().searchSelectContainer},X,$)};ScopeableSelect.displayName="ScopeableSelect"},0x41d2945c:(e,t,a)=>{"use strict";a.d(t,{t:()=>SalesforceCheckboxDisplay});var n=a(0xbad225b5),r=a(0x45bd075),i=a(0x133d74732);let SalesforceCheckboxDisplay=({field:e,className:t,isReadOnly:a})=>{let l=e?.value,o=(0,i.j)(l),s=(0,i.m)(l);return n.createElement(r.A,{"aria-disabled":a,"aria-label":o,checked:!!s,value:o,className:t})};SalesforceCheckboxDisplay.displayName="SalesforceCheckboxDisplay"},0x6bf58777:(e,t,a)=>{"use strict";a.d(t,{Z:()=>SalesforceComboBox});var n=a(0xbad225b5),r=a(0xd4787de9),i=a(0x20482ad21),l=a(0xdfbfd8e5),o=a(0x23105d319);let SalesforceComboBoxDisplay=({field:e})=>n.createElement(o.x,{field:e});SalesforceComboBoxDisplay.displayName="SalesforceComboBoxDisplay";var s=a(0xfbeb1e08),c=a(0x13d718530);function filterOptionsWithCustomValue({rawFormValue:e,filterQuery:t,availableOptions:a}){let n=e??"",r=a.map(e=>({...e,value:e.value?.toString()||""})),i={value:n,label:n,color:c.a.Indigo,isCustom:!0},l=n.toLowerCase(),o=!!r.find(e=>e.value.toLowerCase()===l);if(n&&!t&&!o)return[i];if(!t)return r;let d={value:t,label:t,color:c.a.Indigo,isCustom:!0},m=(0,s.f)(t,r);if(0===m.length)return[d];let u=t.toLowerCase();return m.find(e=>e.value.toLowerCase()===u)?r:[...m,d]}var d=a(0xd9baabad),m=a(0x827afcd2),u=a(0xbf5746fa);function renderPicklistOption(e){let t=n.createElement(u.A,{label:e.label?.toString()||"",color:e.color??c.a.Gray,className:"inline_flex align_items_baseline"});return e.isCustom?e.label?.toString():t}renderPicklistOption.displayName="renderPicklistOption";let p=new i.Ay("slackforce"),SalesforceComboBox=({currentlySubmittingField:e,options:t,field:a,hints:i,isAlwaysEditMode:o,isDisabled:s,isEditing:u,isReadOnly:h,isRequired:_,label:f,maxLength:b,onBlur:g,validate:y,focusOnMount:A})=>{let x=(0,n.useRef)(a.value),{setFieldValue:E}=(0,r.j7)(),C=(0,n.useCallback)((e,t)=>filterOptionsWithCustomValue({rawFormValue:a.value,filterQuery:e,availableOptions:t}),[a.value]),k=(0,n.useMemo)(()=>{let e=t.map((e,t)=>({...e,color:(0,m.C)({index:t+1})}));return a.value&&a.value===x.current&&!t.find(e=>e.value&&e.value.toString().toLowerCase()===a.value.toLowerCase())?[...e,{value:a.value,label:a.value,color:c.a.Indigo,isCustom:!0}]:e},[a.value,t]),v=(0,n.useCallback)(e=>{E(a.fieldApiName,e.value||""),g?.({nativeEvent:{relatedTarget:null}})},[a.fieldApiName,g,E]),S=(0,n.useCallback)(()=>{g?.({nativeEvent:{relatedTarget:null}})},[g]);return n.createElement(d.X,{isReadOnly:h,isEditing:u,isAlwaysEditMode:o,isRequired:_,field:a},!u&&n.createElement(SalesforceComboBoxDisplay,{field:a}),u&&n.createElement(l.A,{name:a.fieldApiName,className:"full_width",label:f,options:k,labelText:"",hints:i,isDisabled:h||s||!!e,isRequired:_,maxLength:b,validate:y,filterOptions:C,renderOption:renderPicklistOption,shouldAllowUnselectInSingleSelectMode:!1,placeholderText:p.t("Type or select an option"),focusOnMount:A,onOptionSelected:v,onOptionsListClose:S}))};SalesforceComboBox.displayName="SalesforceComboBox"},0x212b8fec0:(e,t,a)=>{"use strict";a.d(t,{P:()=>SalesforceCurrencyDisplay});var n=a(0xbad225b5);let SalesforceCurrencyDisplay=({field:e})=>n.createElement("span",{"data-qa":e["data-qa"]},e.displayValue||e.value);SalesforceCurrencyDisplay.displayName="SalesforceCurrencyDisplay"},0x177b0fe1e:(e,t,a)=>{"use strict";a.d(t,{R:()=>SalesforceDateTimeDisplay});var n=a(0xbad225b5),r=a(0x13776886e);let i=new(a(0x20482ad21)).Ay("modernselling"),SalesforceDateTimeDisplay=({field:e})=>{let t=e.value,a=e.displayValue||t,l=t?Date.parse(t):void 0;return n.createElement("div",{"data-qa":e["data-qa"]},l&&!isNaN(l)?i.t("{date} at {time}",{date:(0,r.A)(l,"{date_short_full}"),time:(0,r.A)(l,"{time}")}):a)};SalesforceDateTimeDisplay.displayName="SalesforceDateTimeDisplay"},0x134c47230:(e,t,a)=>{"use strict";a.d(t,{i:()=>SalesforceDateDisplay});var n=a(0xbad225b5),r=a(0x1f355b555),i=a(0x6960d8b9);let SalesforceDateDisplay=({field:e})=>{if(e.value.includes("/")||e.value.includes("."))return n.createElement("span",{"data-qa":e["data-qa"]},e.displayValue);let t=e.value?Date.parse((0,r.Ay)(e.value).toISOString()):void 0;return n.createElement("span",{"data-qa":e["data-qa"]},t&&!isNaN(t)?(0,i.Yq)(t,"{date_short_full}"):"")};SalesforceDateDisplay.displayName="SalesforceDateDisplay"},0x760dd6a6:(e,t,a)=>{"use strict";a.d(t,{q:()=>SalesforceEmailDisplay});var n=a(0xbad225b5),r=a(0x1faa3f1ac);let SalesforceEmailDisplay=({field:e})=>{let t=(0,n.useCallback)(e=>{e.nativeEvent.stopImmediatePropagation()},[]);return e.value?n.createElement(r.A,{"data-qa":e["data-qa"],onClick:t,href:`mailto:${e.value}`},e.value):null};SalesforceEmailDisplay.displayName="SalesforceEmailDisplay"},0xd9baabad:(e,t,a)=>{"use strict";a.d(t,{X:()=>SalesforceFieldContainer});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1598e5174),o=a(0x21f3c49e8),s=a(0x8716533d),c=a(0x2081d694d),d=a(0x2501a2cee),m=a(0x20482ad21),u=a(0x22170ca89);let p=new m.Ay("recordchannels"),h=new m.Ay("recordchannels");var _=a(0xef5f4ac9),f=a.n(_);let SalesforceFieldPlaceholder=({"data-qa":e,dataType:t,displayDataType:a,editablePlaceholderOverride:r,hints:l,isReadOnly:o})=>{let s=i()(f().placeholder,"p-salesforce_kit__placeholder");if(o)return n.createElement("span",{className:s,"data-qa":e},l?.length?l:(({fieldDisplayDataType:e,fieldDataType:t})=>{let a=p.t("Nothing entered"),n=p.t("None selected");switch(e){case u.ls.Picklist:case u.ls.MultiPicklist:case u.ls.Reference:return n;case u.ls.String:if(t===c.C.Reference)return n;return a;default:return a}})({fieldDataType:t,fieldDisplayDataType:a}));let{text:m,icon:_}=(({fieldDataType:e})=>{switch(e){case c.C.Currency:return{text:h.t("Add amount"),icon:{name:"currency"}};case c.C.Double:case c.C.Integer:case c.C.Int:case c.C.Long:return{text:h.t("Add number"),icon:{name:"number"}};case c.C.Percent:return{text:h.t("Add percent"),icon:{name:"percent"}};case c.C.Picklist:return{text:h.t("Select option"),icon:{name:"caret-dropdown"}};case c.C.MultiPicklist:return{text:h.t("Select option(s)"),icon:{name:"caret-dropdown"}};case c.C.Url:return{text:h.t("Add URL"),icon:{name:"link"}};case c.C.Phone:return{text:h.t("Add phone number"),icon:{name:"call"}};case c.C.ComboBox:return{text:h.t("Type or select"),icon:{name:"caret-dropdown"}};case c.C.Date:return{text:h.t("Add date"),icon:{name:"calendar"}};case c.C.Time:return{text:h.t("Add time"),icon:{name:"clock"}};case c.C.DateTime:return{text:h.t("Add date and time"),icon:{name:"calendar"}};case c.C.Email:return{text:h.t("Add email"),icon:{name:"email"}};case c.C.Reference:return{text:h.t("Add record",{fallbackHash:"a5113d8c37d7c22e06abc971147dfbc27552909d"}),icon:{name:"search"}};default:return{text:h.t("Add text"),icon:{name:"text-snippet"}}}})({fieldDataType:t});return n.createElement("span",{className:s,"data-qa":e},n.createElement(d.Ah,{name:_.name,inline:!0}),n.createElement("span",{className:"margin_left_50"},r||m))};SalesforceFieldPlaceholder.displayName="SalesforceFieldPlaceholder";var b=a(0x140565d2b),g=a(0xdc081e53),y=a(0x86a74e1),A=a.n(y);let SalesforceFieldContainer=({children:e,editablePlaceholderOverride:t,field:a,hints:r,isAlwaysEditMode:d,isEditing:m,isInline:u,isReadOnly:p,size:h=b.q.medium})=>{let _=!(a.value||a.value?.toString()==="0")||(0,l.A)(a.value)&&(0,o.A)(a.value),f=a.dataType===c.C.Boolean&&p,y=!a?.hidePlaceholder&&_&&!a.displayValue&&!m&&!f,x=!m&&!(0,o.A)(a.errors),E=d||!y;return n.createElement("div",{className:"full_width"},n.createElement("div",{className:i()(A().field,{[A().small]:h===b.q.small,[A().medium]:h===b.q.medium,[A().large]:h===b.q.large,[A().vertical]:!u,[A().horizontal]:u,[A().hoverBackground]:!p,[A().error]:x})},p&&!E&&n.createElement(g.y,{className:A().placeholderLock}),y&&n.createElement(SalesforceFieldPlaceholder,{dataType:a.dataType,"data-qa":a["data-qa"],editablePlaceholderOverride:t,hints:r,displayDataType:a?.displayDataType,isReadOnly:p}),!y&&n.createElement("div",{className:i()({[A().editableContentContainer]:m,full_width:m&&a.dataType!==c.C.Boolean})},e),p&&E&&n.createElement(g.y,{className:i()("margin_left_50",{[A().showLockOnHover]:!d})})),x&&a.errors&&n.createElement(s.A,{errors:a.errors,className:A().alert}))};SalesforceFieldContainer.displayName="SalesforceFieldContainer"},0x8caa0ca9:(e,t,a)=>{"use strict";a.d(t,{c:()=>SalesforceFieldLabel});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1feee1711),o=a(0x1fdec3e16),s=a(0x2081d694d),c=a(0x140565d2b),d=a(0x15525222f),m=a.n(d);let SalesforceFieldLabel=({className:e,containerClassName:t,fieldApiName:a,dataType:r,label:d,size:u=c.q.medium,layoutMode:p,isReadOnly:h,isRequired:_,htmlFor:f,hideRequiredGuidance:b=!1})=>{let g=(0,n.useMemo)(()=>b||h||(0,l.A)(_)?null:_&&r!==s.C.Boolean?n.createElement("span",{"aria-hidden":"true",className:m().requiredAsterisk},"*"):null,[r,_,h,b]);return n.createElement("div",{className:i()(m().labelContainer,t,{[m().medium]:u===c.q.medium||!u,[m().large]:u===c.q.large,[m().vertical]:p===c.l.vertical,[m().horizontal]:p===c.l.inline})},n.createElement("label",{htmlFor:f,className:i()(m().label,e,"c-label--block",{"c-label--pointer":!h}),"data-qa":`${a}-label`},n.createElement("span",{className:m().labelText,"data-qa-label-text":!0},n.createElement(o.A,{lines:2,withTooltip:!0,breakWords:!1},d,g))))};SalesforceFieldLabel.displayName="SalesforceFieldLabel"},0x190b383d6:(e,t,a)=>{"use strict";a.d(t,{m:()=>SalesforceRequiredFieldLegend});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x197bfc8cc),l=a.n(i);let o=new r.Ay("modernselling"),SalesforceRequiredFieldLegend=()=>n.createElement("div",{className:l().requiredLegend,"aria-hidden":"true"},n.createElement("div",{className:l().requiredAsterisk},"*"),o.t("Indicates a required field"));SalesforceRequiredFieldLegend.displayName="SalesforceRequiredFieldLegend"},0x213172452:(e,t,a)=>{"use strict";a.d(t,{w:()=>SalesforceMultiPicklistDisplay});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xbe5e39b6),o=a(0x20482ad21),s=a(0x1e864b930),c=a(0x4c96e5d9),d=a(0x23105d319),m=a(0x17ce2eea8),u=a.n(m);let p=new o.Ay("modernselling"),SalesforceMultiPicklistDisplay=({field:e,options:t,noTruncate:a})=>{let r=(0,n.useCallback)(e=>t?.find(t=>t.value===e)||{value:e,label:e},[t]);if(!e.value)return null;let o="string"==typeof e.value?e.value.split(";"):e.value,m=o.length;return 0===m?null:a?n.createElement("div",{className:i()(u().multiPicklist,"flex_wrap")},o.map(t=>n.createElement(d.x,{field:e,option:r(t),key:t}))):n.createElement("div",{className:i()(u().multiPicklist)},n.createElement(d.x,{field:e,option:r(o[0]),className:u().fieldOption}),2===m&&n.createElement(d.x,{field:e,option:r(o[1]),className:u().fieldOption}),m>2&&n.createElement(c.Ay,{position:l.yX.Top,tip:(0,s.A)(o.slice(1),{conj:"and"})},n.createElement("div",{className:"no_wrap sk_highlight"},p.rt("+{truncatedOptionsCount} more",{truncatedOptionsCount:m-1}))))};SalesforceMultiPicklistDisplay.displayName="SalesforceMultiPicklistDisplay"},0x1314133b1:(e,t,a)=>{"use strict";a.d(t,{D:()=>SalesforceNumberDisplay});var n=a(0xbad225b5),r=a(0x2081d694d);let SalesforceBaseNumberDisplay=({field:e})=>n.createElement("span",{"data-qa":e["data-qa"]},e.value);SalesforceBaseNumberDisplay.displayName="SalesforceBaseNumberDisplay";var i=a(0x1db986400);function formatPercentage(e){let t=(0,i.$)(e);return isNaN(t)?"":`${t}%`}let SalesforcePercentNumberDisplay=({field:e})=>n.createElement("span",{"data-qa":e["data-qa"]},formatPercentage(e.value));SalesforcePercentNumberDisplay.displayName="SalesforcePercentNumberDisplay";let SalesforceNumberDisplay=({field:e})=>e.dataType===r.C.Percent||"percent"===e.dataType.toLowerCase()?n.createElement(SalesforcePercentNumberDisplay,{field:e}):n.createElement(SalesforceBaseNumberDisplay,{field:e});SalesforceNumberDisplay.displayName="SalesforceNumberDisplay"},0x1b04844aa:(e,t,a)=>{"use strict";a.d(t,{S:()=>SalesforcePhoneDisplay});var n=a(0xbad225b5),r=a(0x223ac29bb);function formatPhoneNumber(e){if("en-US"!==(0,r.Yp)())return e;let t=e.match(/^1?([2-9][0-9]{2})([0-9]{3})([0-9]{4})$/);return t?`(${t[1]}) ${t[2]}-${t[3]}`:e}let SalesforcePhoneDisplay=({field:e})=>n.createElement("span",{"data-qa":e["data-qa"]},formatPhoneNumber(e.value));SalesforcePhoneDisplay.displayName="SalesforcePhoneDisplay"},0x23105d319:(e,t,a)=>{"use strict";a.d(t,{x:()=>SalesforcePicklistDisplay});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xbf5746fa),o=a(0xeb1fef96),s=a.n(o);let SelectFieldOption=({className:e,...t})=>n.createElement(l.A,{className:i()(s().option,e),...t});SelectFieldOption.displayName="SelectFieldOption";var c=a(0x13d718530);let SalesforcePicklistDisplay=({field:e,option:t,className:a,noTruncate:r})=>{let l=t?.label||e.displayValue||e.value||"";return n.createElement(SelectFieldOption,{"data-qa":e["data-qa"],label:l,color:t?.color??c.a.Indigo,className:i()(a,"inline_flex"),noTruncate:r})};SalesforcePicklistDisplay.displayName="SalesforcePicklistDisplay"},0x19b2b86b7:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});let n={ADD_NEW_ITEM:"add_new_item",ERROR_CREATING_RECORD:"error_creating_record"}},0xc74669a8:(e,t,a)=>{"use strict";a.d(t,{L:()=>SalesforceReferenceDisplay});var n=a(0xbad225b5),r=a(0x91728dda),i=a(0x22170ca89),l=a(0x16cf1da63),o=a(0x1faa3f1ac),s=a(0x186b638d6),c=a(0x1282104f7),d=a(0x6d72337),m=a(0x13638bd77);let SalesforceMappedSlackUserReference=({"data-qa":e,hideButtons:t,slackUserId:a,tokenOnly:r})=>{let i=(0,l.wA)(),u=n.createElement(c.A,{className:"margin_0","data-qa":e,entityId:a,size:s.F.small,forceRealName:!0}),p=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),i((0,m.b)({memberId:a}))},[i,a]);return r?u:(0,d.yN)({children:n.createElement(o.A,{onClick:p},u),hideButtons:t,memberId:a})};SalesforceMappedSlackUserReference.displayName="SalesforceMappedSlackUserReference";var u=a(0xf01a9d50),p=a(0x30d0b075),h=a(0x15fb82076),_=a(0x754ea859);let OpenRecordFlexpaneLink=({recordId:e,objectApiName:t,children:a,compositeListId:r})=>{let i=(0,l.wA)(),o=(0,n.useCallback)(e=>{e.stopPropagation()},[]),s=(0,n.useCallback)(t=>{t.stopPropagation(),i((0,_.c)({listViewId:r,recordId:e}))},[r,i,e]),c=(0,n.useMemo)(()=>({elementName:"open_record_flexpane",elementValue:(0,p.Zf)({record_type:t||""}),onClick:{enableClogAction:!0}}),[t]);return n.createElement(h.A,{onClick:s,onFocus:o,autoClogProps:c},a)};OpenRecordFlexpaneLink.displayName="OpenRecordFlexpaneLink";let SalesforceRecordReference=({"data-qa":e,recordId:t,objectApiName:a,label:r,tokenOnly:i,compositeListId:l})=>{let o=(0,u.C)(a),d=(0,n.useMemo)(()=>n.createElement(c.A,{className:"margin_0","data-qa":e,label:r,size:s.F.small,svgIcon:o}),[e,r,o]);return i?d:n.createElement(OpenRecordFlexpaneLink,{recordId:t,objectApiName:a,compositeListId:l},d)};SalesforceRecordReference.displayName="SalesforceRecordReference";let SalesforceUserReference=({"data-qa":e,recordId:t,objectApiName:a,label:r,tokenOnly:i,compositeListId:l})=>{let o=(0,n.useMemo)(()=>({name:"user"}),[]),d=(0,n.useMemo)(()=>n.createElement(c.A,{className:"margin_0","data-qa":e,label:r,size:s.F.small,svgIcon:o}),[e,r,o]);return i?d:n.createElement(OpenRecordFlexpaneLink,{recordId:t,objectApiName:a,compositeListId:l},d)};SalesforceUserReference.displayName="SalesforceUserReference";var f=a(0x73ad00d),b=a(0xb77a689a),g=a(0x2081d694d),y=a(0xc0b7c558),A=a(0x1d104c491);function isUser(e,t){return e===g.C.User||t===A.Dj.Lead||t===A.Dj.Contact||"User"===t||"Group"===t}function identifyReference(e,t){let{dataType:a,displayValue:n,referenceObjectApiName:r,slackUserId:i,value:l}=e;if(i)return{referenceType:"SlackUser",slackUserId:i};let o=(0,b.A)(l)?l:String(l.label),s=(0,y.j)(t,o),c=(0,b.A)(n)&&n||o;return isUser(a,r)?{referenceType:"User",recordId:s,objectApiName:r,label:c}:{referenceType:"Record",objectApiName:r,recordId:s,label:c}}var x=a(0x226892387);let SalesforceReferenceDisplay=({field:e,salesforceOrgId:t,tokenOnly:a=!1,hideSlackUserButtons:l=!1,compositeListId:o})=>{let s=(0,x.d4)(r.Y7);if(!e.value)return null;if(e.displayDataType===i.ls.String&&s)return n.createElement(f.M,{field:{...e,value:e.displayValue??e.value}});let c=identifyReference(e,t);return"SlackUser"===c.referenceType?n.createElement(SalesforceMappedSlackUserReference,{"data-qa":e["data-qa"],hideButtons:l,slackUserId:c.slackUserId,tokenOnly:a}):"User"===c.referenceType?n.createElement(SalesforceUserReference,{"data-qa":e["data-qa"],recordId:e.slackRecordId??c.recordId,objectApiName:c.objectApiName,label:c.label,tokenOnly:a,compositeListId:o}):n.createElement(SalesforceRecordReference,{"data-qa":e["data-qa"],objectApiName:c.objectApiName,recordId:e.slackRecordId??c.recordId,label:c.label,tokenOnly:a,compositeListId:o})};SalesforceReferenceDisplay.displayName="SalesforceReferenceDisplay"},0x1a57563c6:(e,t,a)=>{"use strict";a.d(t,{a:()=>SalesforceReferenceAddRecordOption});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2501a2cee),l=a(0x1c18c5d4e),o=a(0x226892387),s=a(0xf2d37b2a),c=a.n(s);let d=new r.Ay("modernselling"),SalesforceReferenceAddRecordOption=({newItemName:e})=>{let t=(0,o.d4)(l.I);return n.createElement("div",{className:c().addRecordOption},n.createElement(i.Ah,{name:"plus",size:"16"}),n.createElement("span",null,t?d.t("Create"):"Create"),n.createElement("span",{className:c().accountName},n.createElement(i.Ah,{name:"sf-account",size:"16"}),e))};SalesforceReferenceAddRecordOption.displayName="SalesforceReferenceAddRecordOption"},0x11ff7b04d:(e,t,a)=>{"use strict";a.d(t,{C:()=>SalesforceReferenceSelectOption});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x128d54e52),o=a(0x1c659cbb1),s=a(0x24f6a06c8),c=a(0x173e58c5b),d=a.n(c);let SalesforceReferenceSelectOption=({option:e,includeSalesforceRecordTypeIcon:t,includeUserAndGroupIcons:a,isActive:r,slackUserId:c})=>{let m=(0,n.useMemo)(()=>{if(e.extras)return n.createElement(l.CG,{withTruncationTooltip:!0},n.createElement("span",{className:i()(d().subtext,{[d().subtextActive]:r})},e.extras))},[e.extras,r]),u=(0,n.useMemo)(()=>n.createElement(l.CG,{withTruncationTooltip:!0},n.createElement("span",{className:d().text},e.label)),[e.label]),p=(0,n.useCallback)(()=>t?n.createElement("div",{className:d().avatarIcon},n.createElement(s.l,{type:e.type,colorScheme:r?"gray-tone-inverse":"gray-tone",includeUserAndGroupIcons:a})):null,[t,r,e.type,a]),h=(0,n.useCallback)(()=>n.createElement("div",{className:d().slackIcon},n.createElement(o.Ay,{userId:c,size:o.RG.medium,isInteractive:!1,tabIndex:-1})),[c]),_=(0,n.useMemo)(()=>c?h:t?p:void 0,[c,t,h,p]);return n.createElement("div",{className:"display_flex align_items_center"},n.createElement(l.Ay,{size:"medium",className:i()({[d().baseEntity]:!t&&!c,[d().baseEntityWithIconAvatar]:!!t||!!c,"display_flex align_items_center":!m}),text:u,subtext:m,avatar:_}))};SalesforceReferenceSelectOption.displayName="SalesforceReferenceSelectOption"},0x1d6fa7918:(e,t,a)=>{"use strict";a.d(t,{$:()=>SalesforceStringDisplay});var n=a(0xbad225b5),r=a(0x73ad00d),i=a(0x120c268ad),l=a.n(i),o=a(0x21c8c64ab),s=a(0x19336f998),c=a.n(s);let SalesforceRichStringDisplay=({field:e,isUnfurl:t})=>n.createElement("span",{className:l()(c().string,{[c().unfurlRichText]:t?c().unfurlRichText:void 0}),"data-qa":e["data-qa"]},n.createElement(o.$,{value:e.richText,noInlineLinks:t}));SalesforceRichStringDisplay.displayName="SalesforceRichStringDisplay";let SalesforceStringDisplay=({field:e,isUnfurl:t})=>e?.htmlFormatted&&e?.richText?.length?n.createElement(SalesforceRichStringDisplay,{field:e,isUnfurl:t}):n.createElement(r.M,{field:e});SalesforceStringDisplay.displayName="SalesforceStringDisplay"},0x106731e95:(e,t,a)=>{"use strict";a.d(t,{x:()=>SalesforceString});var n=a(0xbad225b5),r=a(0x1dcaa81f9),i=a(0xd9baabad),l=a(0x1d6fa7918);let SalesforceString=({field:e,isEditing:t,isReadOnly:a,isDisabled:o,isRequired:s,hints:c,isAlwaysEditMode:d,maxLength:m,autoFocus:u,validate:p,validateOnBlur:h})=>n.createElement(i.X,{field:e,isEditing:t,isReadOnly:a,isAlwaysEditMode:d,isRequired:s},!t&&n.createElement(l.$,{field:e}),t&&n.createElement(r.A,{name:e.fieldApiName,id:e.fieldApiName,className:"margin_0",labelText:"",size:"medium",value:e.value,hints:c,isDisabled:a||o,ariaRequired:s,maxLength:m,type:"text",autoFocus:u,validateOnBlur:h,validate:p}));SalesforceString.displayName="SalesforceString"},0x73ad00d:(e,t,a)=>{"use strict";a.d(t,{M:()=>SalesforceBaseStringDisplay});var n=a(0xbad225b5),r=a(0x401e34e9),i=a(0x226892387),l=a(0x14149c126),o=a(0x210bb1c6f),s=a.n(o);let SalesforceBaseStringDisplay=({field:e})=>{let t=(0,i.d4)(e=>"on"===(0,l._Z)(e,"slack_crm_parse_url_in_record_text"))?(0,r.k)(e.value):e.value;return n.createElement("span",{className:s().string,"data-qa":e["data-qa"]},t)};SalesforceBaseStringDisplay.displayName="SalesforceBaseStringDisplay"},0x14f192ab:(e,t,a)=>{"use strict";a.d(t,{U:()=>SalesforceTextAreaDisplay});var n=a(0xbad225b5),r=a(0x21be02f61),i=a(0x120c268ad),l=a.n(i),o=a(0x21c8c64ab),s=a(0xe1b0970),c=a.n(s);let SalesforceRichTextAreaDisplay=({field:e,isUnfurl:t})=>n.createElement("span",{className:l()(c().textArea,{[c().unfurlRichText]:t?c().unfurlRichText:void 0}),"data-qa":e["data-qa"]},n.createElement(o.$,{value:e.richText,noInlineLinks:t}));SalesforceRichTextAreaDisplay.displayName="SalesforceRichTextAreaDisplay";let SalesforceTextAreaDisplay=({field:e,isUnfurl:t,stripNewlines:a})=>e?.htmlFormatted&&e?.richText?.length?n.createElement(SalesforceRichTextAreaDisplay,{field:e,isUnfurl:t}):n.createElement(r.l,{stripNewlines:a,field:e});SalesforceTextAreaDisplay.displayName="SalesforceTextAreaDisplay"},0x21be02f61:(e,t,a)=>{"use strict";a.d(t,{l:()=>SalesforceBaseTextAreaDisplay});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1f90ceebe),o=a(0x401e34e9),s=a(0x226892387),c=a(0x14149c126),d=a(0x24ba8eead),m=a.n(d);let SalesforceBaseTextAreaDisplay=({field:e,stripNewlines:t})=>{let a,r=(0,s.d4)(e=>"on"===(0,c._Z)(e,"slack_crm_parse_url_in_record_text")),d=t?(a=e.value,(0,l.A)(a).replace(/[\r\n]+?/g," ")):e.value,u=r?(0,o.k)(d):d;return n.createElement("span",{className:i()({[m().withNewLines]:!t}),"data-qa":e["data-qa"]},u)};SalesforceBaseTextAreaDisplay.displayName="SalesforceBaseTextAreaDisplay"},0xf54eb25c:(e,t,a)=>{"use strict";a.d(t,{Z:()=>SalesforceTimeDisplay});var n=a(0xbad225b5),r=a(0x1f355b555);let SalesforceTimeDisplay=({field:e})=>{let t=r.Ay.utc(e.value,"HH:mm:ss.SSS[Z]").format("LT"),a=(0,r.Ay)(e.value,"HH:mm").format("h:mm A"),i="";return i="Invalid Date"!==t?t:"Invalid Date"!==a?a:e.displayValue||e.value,n.createElement("span",{"data-qa":e["data-qa"]},i)};SalesforceTimeDisplay.displayName="SalesforceTimeDisplay"},0x1a70db76:(e,t,a)=>{"use strict";a.d(t,{T:()=>SalesforceUrlDisplay});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1faa3f1ac),o=a(0x4c69b9f6);function formatUrl(e){return e?(0,o.A)({input:e,ignoreEmailMatches:!0,ignorePhoneMatches:!0})[0]?.url:""}var s=a(0xb27fe48e),c=a.n(s);let SalesforceUrlDisplay=({field:e,isDisabled:t=!1})=>{let a=(0,n.useCallback)(e=>{e.nativeEvent.stopImmediatePropagation()},[]);if(!e.value)return null;if(t)return n.createElement("span",{className:i()(c().hyperlinkColor,c().wrap),"data-qa":e["data-qa"]},e.value);let r=formatUrl(e.value);return r?n.createElement(l.A,{"data-qa":e["data-qa"],onClick:a,href:r,className:c().wrap},e.value):n.createElement("span",{"data-qa":e["data-qa"],className:c().wrap},e.value)};SalesforceUrlDisplay.displayName="SalesforceUrlDisplay"},0x140565d2b:(e,t,a)=>{"use strict";a.d(t,{l:()=>r,q:()=>n});let n={small:"small",medium:"medium",large:"large"},r={inline:"inline",vertical:"vertical",responsive:"responsive"}},0x1705bde3b:(e,t,a)=>{"use strict";a.d(t,{r:()=>formatReferenceOptions});var n=a(0x17294c72a),r=a(0x223382168);let formatReferenceOptions=({options:e,referenceTypes:t})=>1===t.length?e.records.map(e=>({label:e.name,value:e.id,extras:(0,r.c)({subtextFields:e.fields}),type:e.type,slackUserId:e.slack_user_id})):(0,n.A)(e.records,e=>e.type).map(e=>{let a=t.filter(t=>t.object_api_name===e.type)[0];return{label:e.name,value:e.id,extras:(0,r.c)({subtextFields:e.fields,referenceType:a}),type:e.type,slackUserId:e.slack_user_id}})},0x223382168:(e,t,a)=>{"use strict";a.d(t,{c:()=>formatReferenceSubtext});let formatReferenceSubtext=({subtextFields:e,referenceType:t})=>{let a=t?.object_label||t?.object_api_name||t?.object_label_plural,n=(e||[]).filter(e=>e.display_value&&"Name"!==e.api_name&&!e.display_value.includes("<img src=")).map(e=>e.display_value);if(!n.length)return a||void 0;let r=1===n.length?n[0]:n.reduce((e,t,a)=>0===a?t:e=`${e}\u{30FB}${t}`,"");return t?`${a}\u{30FB}${r}`:r}},0x827afcd2:(e,t,a)=>{"use strict";a.d(t,{C:()=>getPicklistColorByIndex});var n=a(0x13d718530);let r=[n.a.Indigo,n.a.Purple,n.a.Orange,n.a.Brown,n.a.Yellow,n.a.Blue],getPicklistColorByIndex=({index:e})=>{let t=e%r.length;return r[t]}},0x1915df7c3:(e,t,a)=>{"use strict";a.d(t,{t:()=>OptionalTooltipWrapper});var n=a(0xbad225b5),r=a(0x4c96e5d9);let OptionalTooltipWrapper=({isEnabled:e=!1,children:t,...a})=>e?n.createElement(r.Ay,a,t):t;OptionalTooltipWrapper.displayName="OptionalTooltipWrapper"},0x401e34e9:(e,t,a)=>{"use strict";a.d(t,{k:()=>parseTextWithLinks});var n=a(0xbad225b5),r=a(0x237b6a339),i=a(0x1faa3f1ac),l=a(0x1aee7b9ef);let stopFocusPropagation=e=>{e.stopPropagation()},parseTextWithLinks=e=>{if(!e)return e;let t=(0,l.A)(e,{ignoreLinksWithoutHttp:!1,ignoreUnbalancedParentheses:!1});if(0===t.length)return e;let a=[...t].sort((e,t)=>e.offset-t.offset),o=[],s=0;if(a.forEach(t=>{let{offset:a,text:l,url:c}=t;if(a>s){let t=e.substring(s,a);t&&o.push(t)}o.push(n.createElement(i.A,{key:(0,r.A)(),href:c,target:"_blank",onFocus:stopFocusPropagation},l)),s=a+l.length}),s<e.length){let t=e.substring(s);t&&o.push(t)}return o};parseTextWithLinks.displayName="parseTextWithLinks"},0xdc081e53:(e,t,a)=>{"use strict";a.d(t,{y:()=>SalesforceFieldLockIcon});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee),o=a(0x1210bf555),s=a.n(o);let SalesforceFieldLockIcon=({className:e})=>n.createElement("span",{className:i()(s().lockIcon,e),"data-qa":"salesforce-field-lock"},n.createElement(l.Ah,{name:"lock",inline:!0}))},0xadcef495:(e,t,a)=>{"use strict";a.d(t,{Af:()=>o,J6:()=>l,MC:()=>r,oT:()=>i});var n=a(0xcf658893);let r=(0,n.Ay)("Update the user's default silent sidebar theme");r.meta={name:"setSilentSidebarThemeOption",key:"createActionSetSilentSidebarThemeOption",description:"Update the user's default silent sidebar theme"};let i=(0,n.Ay)("Set focus mode active state");i.meta={name:"setFocusModeActive",key:"createActionSetFocusModeActive",description:"Set focus mode active state"};let l=(0,n.Ay)("Add DND override channel");l.meta={name:"addDndOverrideChannel",key:"createActionAddDndOverrideChannel",description:"Add DND override channel"};let o=(0,n.Ay)("Remove DND override channel");o.meta={name:"removeDndOverrideChannel",key:"createActionRemoveDndOverrideChannel",description:"Remove DND override channel"}},0x850bedf0:(e,t,a)=>{"use strict";a.d(t,{Pn:()=>i,Q$:()=>o,UG:()=>l,ul:()=>s});var n=a(0x1cf0d97e1),r=a(0x14149c126);let i=(0,n.Ay)(e=>"on"===(0,r._Z)(e,"silent_sidebar"));i.meta={name:"isExperimentSilentSidebarGroupOn",key:"createSelectorIsExperimentSilentSidebarGroupOn",description:e=>"on"===(0,r._Z)(e,"silent_sidebar")};let l=(0,n.Ay)(e=>i(e)&&e.silentSidebar.isFocusModeActive);l.meta={name:"isSilentSidebarActive",key:"createSelectorIsSilentSidebarActive",description:e=>i(e)&&e.silentSidebar.isFocusModeActive};let o=(0,n.Ay)(e=>e.silentSidebar.selectedSilentSidebarTheme);o.meta={name:"getDefaultSilentSidebarTheme",key:"createSelectorGetDefaultSilentSidebarTheme",description:e=>e.silentSidebar.selectedSilentSidebarTheme};let s=(0,n.Ay)((e,t)=>!!e.silentSidebar.dndOverrideChannelIds[t]);s.meta={name:"isChannelDndOverride",key:"createSelectorIsChannelDndOverride",description:(e,t)=>!!e.silentSidebar.dndOverrideChannelIds[t]}},0x2a68104b:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>I});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1075d3a9c),l=a.n(i),o=a(0x21343fa5a),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x344bb842),m=a(0x1fdec3e16),u=a(0x247cf31a2),p=a(0x44124499),h=a(0x21c52c333),_=a(0xe1644a69),f=a(0x226892387),b=a(0x1400f598e),g=a(0x1e3eb45fd),y=a(0x54b5fc4b),A=a(0x1f48e3aa4),x=a(0x217553e42),E=a(0x20061cab9),C=a(0xf3c65e54),k=a(0x5b1935a6);let v=new s.Ay("assistant"),S={name:"close",size:"20"},AiPushSummaryBanner=({channelScopedId:e})=>{let t=(0,r.wA)(),a=(0,f.d4)(g.Z2),i=(0,f.d4)(t=>(0,x.OL)(t,e)),s=(0,n.useCallback)(()=>t((0,E.Ay)({spaceName:k.xu.MESSAGE_INPUT,channelId:e,action:k.hw.DISMISS})),[e,t]),I=(0,n.useCallback)(()=>{let a=`${l()().subtract(1,"month").unix()}.000000`,n=`${l()().endOf("day").unix()}.000000`;t((0,E.Ay)({spaceName:k.xu.MESSAGE_INPUT,channelId:e,action:k.hw.DISMISS})),t((0,b.wW)()),t((0,b.bJ)(!0)),t((0,y.i)({channelId:e,type:A.Tj.Channel,subtype:A.KY.CustomRange,startTs:a,endTs:n,entryPoint:A.lZ.ChannelJoinBanner}))},[e,t]);return((0,o.A)(()=>{t((0,C.A)({notificationName:k.ze.SLACK_AI_PUSH_SUMMARIES_PROMPT,action:k.hw.IMPRESSION}))},a),a)?n.createElement("div",{className:"p-ai_push_summary_banner"},n.createElement("div",{className:"p-ai_push_summary_banner__container"},n.createElement("div",{className:"p-ai_push_summary_banner__content"},n.createElement(h.N,null),n.createElement("span",{className:"p-ai_push_summary_banner__header_title"},v.rt("Welcome to {channelName}",{channelName:n.createElement(u.A,{channel:i,truncate:!0,showDisambiguatingTeamName:!0})})),n.createElement("span",{className:""},v.t("Get the AI scoop on this channel"))),n.createElement("div",{className:"p-ai_push_summary_banner__actions"},n.createElement(p.A,{channelId:e,showNotificationPrefs:!1,className:"p-ai_push_summary_banner__channel_actions"}),n.createElement(c.Ay,{className:"p-ai_push_summary_banner__actions_summarize",onClick:I},n.createElement(_.o,{type:"summary",size:"20"}),n.createElement(m.A,{lines:1,withTooltip:!0},n.createElement("div",{className:""},v.t("Summarize Channel"))))),n.createElement(d.A,{className:"p-ai_push_summary_banner__close",onClick:s,"aria-label":v.t("Dismiss"),svgIconProps:S}))):null};AiPushSummaryBanner.displayName="AiPushSummaryBanner";let I=n.memo(AiPushSummaryBanner)},0xf8fef59f:(e,t,a)=>{"use strict";a.d(t,{Al:()=>f,QQ:()=>_});var n=a(0xe874a88a),r=a(0x1234f216f),i=a(0xbc76db4d),l=a(0xbaaab71e),o=a(0x21efa95bc),s=a(0x1a02c72b5),c=a(0xd6a16321),d=a(0x11c82607b),m=a(0xd7f466dd),u=a(0xc561af5),p=a(0x217553e42),h=a(0x19895585a);(0,d.Ay)("Open an assisted thread from given context",(e,t,{context:a,action:r,reason:l})=>(0,i.l)(t())?e((0,o.S)({context:a,action:r,reason:l})).then(t=>{let n=a?.search_follow_up?void 0:{forceTab:h.k6.Assistant};return e((0,s.o)({...(0,c.oH)({channelId:t.channel_id,threadTs:t.thread_ts}),options:n})),t}):n.S.reject(Error("isAssistantThreadsEnabled not enabled"))).meta={name:"openAssistantThread",key:"createThunkOpenAssistantThread",description:"Open an assisted thread from given context"};let _=(0,d.Ay)("Open a assistant thread detail",async(e,t,a,n)=>{let{activeTab:r}=n(l.U),{channelId:i,threadTs:o}=a;i&&o&&e((0,s.o)({options:{forceTab:r},...(0,c.cp)({aiSummaryId:"",channelId:i,threadTs:o,openInPlace:!0,isAssistantThread:!0})}))});_.meta={name:"openAssistantThreadDetail",key:"createThunkOpenAssistantThreadDetail",description:"Open a assistant thread detail"};let f=(0,d.Ay)("Open a assistant thread detail",async(e,t,a)=>{let{threadTs:n}=a,i=(0,p.Pu)(t(),"USLACKBOT"),l=`${i?.id}-${n}`,o=(0,u.T_)(t(),l),s=o?.slices?o?.slices[0]?.timestamps.filter(e=>(0,r.A)(e)):[],c=s.length>0?s[0]:null;c&&e((0,m.Np)({channelId:l,timestamp:c}))});f.meta={name:"clearAssistantThreadTempTimestampsForThread",key:"createThunkClearAssistantThreadTempTimestampsForThread",description:"Open a assistant thread detail"}},0x13a3c0470:(e,t,a)=>{"use strict";a.d(t,{s:()=>G});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0xb1ea448c),s=a(0x20e77676b),c=a(0x473f70ba),d=a(0x27742d55),m=a(0x5eedb646),u=a(0x99233ecb),p=a(0x133aaa7da),h=a(0x3711e82d),_=a(0x223ac29bb),f=a(0x1f48e3aa4),b=a(0xe97344d1),g=a.n(b);let y=new i.Ay("huddles"),SlackAiHuddleLanguageSetting=({selectedLocale:e,onChangeLocale:t})=>{let a=(0,c.Ay)(),r=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:h.EventId.NATIVE_AI,elementName:m.H.HUDDLE_SUMMARY_CHANGE_LANGUAGE_BUTTON,nativeAiSummaryType:f.Tj.Huddle,...a}),[a]),i=(0,n.useCallback)(a=>{let r=_.W_.map(a=>({key:a,type:p.A.radio,label:_.K4[a],click:()=>t(a),checked:a===e}));return r.unshift({key:"huddle-language-setting-menu-header",type:p.A.header,label:y.t("The huddle language applies to AI notes, transcription and captions.")}),n.createElement(u.a,{...a,template:r})},[t,e]);return n.createElement("div",{className:g().root},y.rt("The canvas will be generated in {language}. <a>Change huddle language</a>",{"<a>":({text:e})=>n.createElement(u.cQ,{renderMenu:i,position:"top-left"},n.createElement(l.jV,{autoClogProps:r},e)),language:_.K4[e],fallbackHash:"c89ab35be5c52bb655c52034c0de67819dcca5ef"}))};SlackAiHuddleLanguageSetting.displayName="SlackAiHuddleLanguageSetting";var A=a(0x247cf31a2),x=a(0x52a2bc6d),E=a(0x12185e091),C=a(0x226892387),k=a(0x217553e42);let v=a.p+"bell-c9b4a0a.svg",S=a.p+"notepad-ec87ed5.svg",I=a.p+"speaker-cc5310e.svg";var w=a(0x1349ade65),T=a.n(w);let N=new i.Ay("huddles"),SlackAIHuddleRecordingLegalModalSimplifiedContent=({channelId:e,isInitiator:t,isEnablingAiNotesAutoStart:a})=>{let r=(0,C.d4)(t=>(0,k.OL)(t,e)),i=(0,n.useMemo)(()=>(0,A.k)(r)?n.createElement(A.A,{channel:r,truncate:!0,showDisambiguatingTeamName:!0}):n.createElement(x.A,{channel:r}),[r]),l=(0,n.useMemo)(()=>a?(0,E.cb)(r)?N.rt("<strong>You\u2019ll be notified when it\u2019s ready.</strong> Soon after each huddle ends, it\u2019ll be available in the huddle thread.",{fallbackHash:"61ba55c22d82b70f56f60d18e78c1e26dcb76e35"}):N.rt("<strong>You\u2019ll be notified when it\u2019s ready.</strong> Soon after each huddle ends, it\u2019ll be available in {channelDisplayName}. Everyone in the channel will be able to view the notes and transcript.",{channelDisplayName:i,fallbackHash:"7bbb49fbe436641f741e68d220311a8389c0d8b1"}):(0,E.cb)(r)?N.rt("<strong>You\u2019ll be notified when it\u2019s ready.</strong> Soon after the huddle ends, it\u2019ll be available in the huddle thread.",{fallbackHash:"61ba55c22d82b70f56f60d18e78c1e26dcb76e35"}):N.rt("<strong>You\u2019ll be notified when it\u2019s ready.</strong> Soon after the huddle ends, it\u2019ll be available in {channelName}.",{fallbackHash:"7bbb49fbe436641f741e68d220311a8389c0d8b1",channelName:i}),[r,i,a]);return n.createElement(n.Fragment,null,n.createElement("div",{className:"margin_bottom_50"},a?N.rt("AI notes will automatically start for all huddles in this channel. Here\u2019s what to expect:",{fallbackHash:"482b10362a753485c0b873d804e936d438de0629"}):N.rt("Here\u2019s what to expect:")),n.createElement("ul",null,n.createElement("li",null,a?N.rt("<strong>We\u2019ll start a notes canvas for each huddle.</strong> That\u2019s where AI will generate a summary with action items and save the transcript.",{fallbackHash:"4d18f313c59060067a797269514d381f03f75e9b"}):N.rt("<strong>We\u2019ll start a notes canvas.</strong> That\u2019s where AI will generate a summary with action items and save the transcript.")),n.createElement("li",null,l),n.createElement("li",null,t?N.rt("<strong>Here\u2019s the legal stuff:</strong> You\u2019re agreeing to being transcribed, so make sure that everyone else is cool with that, too. Don\u2019t worry \u2014 you say smart things."):N.rt("<strong>Here\u2019s the legal stuff:</strong> By participating, you\u2019re agreeing to being transcribed. Don\u2019t worry \u2014 you say smart things."))))};SlackAIHuddleRecordingLegalModalSimplifiedContent.displayName="SlackAIHuddleRecordingLegalModalSimplifiedContent";let SlackAIHuddleRecordingLegalModalExtendedContent=({channelId:e,isInitiator:t,isEnablingAiNotesAutoStart:a})=>{let r=(0,C.d4)(t=>(0,k.OL)(t,e)),i=(0,n.useMemo)(()=>(0,A.k)(r)?n.createElement(A.A,{channel:r,truncate:!0,showDisambiguatingTeamName:!0}):n.createElement(x.A,{channel:r}),[r]),l=(0,n.useMemo)(()=>a?(0,E.cb)(r)?N.rt("Soon after each huddle ends, it\u2019ll be available in the huddle thread.",{fallbackHash:"f80ec626a2dfca8648a3644db5509f65c1530379"}):N.rt("Soon after each huddle ends, it\u2019ll be available in {channelName}.",{fallbackHash:"116c63c1bc28279342471dd1018c2d1ec38abd70",channelName:i}):(0,E.cb)(r)?N.rt("Soon after the huddle ends, it\u2019ll be available in the huddle thread."):N.rt("Soon after the huddle ends, it\u2019ll be available in {channelName}.",{channelName:i}),[r,i,a]),o=[{asset:S,header:a?N.t("We\u2019ll start a notes canvas for each huddle."):N.t("We\u2019ll start a notes canvas."),body:N.t("That\u2019s where AI will generate a summary with action items and save the transcript.")},{asset:v,header:N.t("You\u2019ll be notified when it\u2019s ready."),body:l},{asset:I,header:N.t("Here\u2019s the legal stuff:"),body:t?N.t("You\u2019re agreeing to being transcribed, so make sure that everyone else is cool with that, too. Don\u2019t worry \u2014 you say smart things."):N.t("By participating, you\u2019re agreeing to being transcribed. Don\u2019t worry \u2014 you say smart things.")}];return n.createElement("div",{className:"padding_top_50"},a?n.createElement("div",{className:"margin_bottom_100 margin_left_100"},N.rt("AI notes will automatically start for all huddles in this channel."),n.createElement("br",null),n.createElement("strong",null,N.rt("Here\u2019s what to expect:"))):null,o.map(({asset:e,header:t,body:a},r)=>n.createElement("div",{key:r,className:"display_flex margin_bottom_100 align_items_center"},n.createElement("div",{className:T().asset},n.createElement("img",{src:e,alt:""})),n.createElement("div",null,n.createElement("div",{className:"bold margin_bottom_4"},t),n.createElement("div",{className:T().body},a)))))};SlackAIHuddleRecordingLegalModalExtendedContent.displayName="SlackAIHuddleRecordingLegalModalExtendedContent";var M=a(0x1d01572a2),R=a(0x1472af90a),P=a(0xf052d367),L=a(0x18632f75a);let O=R.G7.SlackAiHuddleSummariesLegalModal;var D=a(0x1ecc7f772),F=a(0x20e80190e),U=a(0x183e72453),B=a(0x1fcbb004d);let H=new i.Ay("huddles"),SlackAIHuddleRecordingLegalModal=({isInitiator:e,isEnablingAiNotesAutoStart:t,onConfirmRecord:a,channelId:i})=>{let u,p,_,b=(0,r.wA)(),g=(0,C.d4)(e=>(0,D.SB)(e,(0,k.OL)(e,i))),{isLoadingCounter:y,showSimplifiedVersion:A}=(u=(0,r.wA)(),p=(0,C.d4)(e=>(0,P.kI)(e,O,R.X8.Impression)),_=(0,C.d4)(e=>(0,P.rD)(e,O,R.X8.Impression,4)),(0,M.A)(()=>{u((0,L.b)({interactions:[{component:O,type:R.X8.Impression}],useCache:!0,cacheFilter:P.kI,reason:"slackAiHuddleSummariesLegalModalCounter"}))}),(0,n.useEffect)(()=>{p&&!_&&u((0,L.z)({component:O,type:R.X8.Impression,reason:"slackAiHuddleSummariesLegalModalCounter"}))}),{isLoadingCounter:!p,showSimplifiedVersion:p&&_}),x=(0,c.Ay)(),{currentHuddleLocale:E}=(0,d.U)(),[v,S]=(0,n.useState)(E),I=(0,n.useMemo)(()=>({eventId:h.EventId.NATIVE_AI,elementName:m.H.HUDDLE_SUMMARY_RECORDING_MODAL,...x,isHuddleRecordingInitiator:e??!1,nativeAiSummaryType:f.Tj.Huddle}),[x,e]),w=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:h.EventId.NATIVE_AI,elementName:m.H.HUDDLE_SUMMARY_CONFIRM_CANCEL_BUTTON,nativeAiSummaryType:f.Tj.Huddle,...x}),[x]),T=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:h.EventId.NATIVE_AI,elementName:m.H.HUDDLE_SUMMARY_LEAVE_HUDDLE_BUTTON,nativeAiSummaryType:f.Tj.Huddle,...x}),[x]),N=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:h.EventId.NATIVE_AI,elementName:t?m.H.HUDDLE_SUMMARY_CONFIRM_AUTOSTART_BUTTON:m.H.HUDDLE_SUMMARY_CONFIRM_START_BUTTON,nativeAiSummaryType:f.Tj.Huddle,...x}),[x,t]),W=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:h.EventId.NATIVE_AI,elementName:m.H.HUDDLE_SUMMARY_CONSENT_START_BUTTON,nativeAiSummaryType:f.Tj.Huddle,...x}),[x]),V=(0,n.useCallback)(()=>{b((0,B.O)())},[b]),G=(0,n.useCallback)(()=>{V(),a?.(v,{isEnablingAiNotesAutoStart:t})},[V,a,v,t]),q=(0,n.useCallback)(()=>{V(),b((0,U.A)())},[b,V]),j=(0,n.useCallback)(()=>{V()},[V]),z="";return z=A?e?H.t("Everyone ready to start AI notes?",{fallbackHash:"0e1e166410aa2b818c2261127888c64e588d1740"}):H.t("Heads up \u2014 AI notes are on",{fallbackHash:"b048a3339db63afcdb8ecbcc6fb5fbc2e0cf7c52"}):e?H.t("What to expect with AI notes",{fallbackHash:"c53ce71ba6969ca9bce812c7829a30713522b7bc"}):H.t("AI notes are on \u2014 what to expect",{fallbackHash:"d1bc99f0cdfa3be8d954d70a14e7385da7ca3c60"}),e&&t&&(z=H.t("Start AI notes automatically for every huddle in {channelDisplayName}?",{channelDisplayName:g})),n.createElement(F.dW,{closeModal:V,shouldCloseOnOverlayClick:!1,centered:!0,autoClogProps:I,dataQa:"slack_ai_huddles__legal_modal"},y?n.createElement("div",{className:"margin_top_400 margin_bottom_400"},n.createElement(o.A,{size:"jumbo"})):n.createElement(n.Fragment,null,n.createElement(F.rQ,null,n.createElement(F.Rc,{title:z})),n.createElement(F.$m,null,n.createElement(F.qf,null,A?n.createElement(SlackAIHuddleRecordingLegalModalSimplifiedContent,{channelId:i,isInitiator:e,isEnablingAiNotesAutoStart:t}):n.createElement(SlackAIHuddleRecordingLegalModalExtendedContent,{channelId:i,isInitiator:e,isEnablingAiNotesAutoStart:t}),e&&n.createElement(SlackAiHuddleLanguageSetting,{selectedLocale:v,onChangeLocale:S}))),n.createElement(F.jl,null,!A&&n.createElement(s.A,{articleId:0x1c89927bbc93},H.t("Learn more")),n.createElement(F.ox,null,e?n.createElement(l.$n,{onClick:j,type:"outline",autoClogProps:w},H.t("Cancel")):n.createElement(l.$n,{onClick:q,type:"outline",autoClogProps:T},H.t("Leave Huddle")),e?n.createElement(l.$n,{onClick:G,type:"primary",autoClogProps:N,"data-qa":"slack_ai_huddles__start_notes_button",autoFocus:!0},t?H.t("Always Start AI Notes"):H.t("Start Notes")):n.createElement(l.$n,{onClick:V,type:"primary",autoClogProps:W,"data-qa":"slack_ai_huddles__participant_confirm_button",autoFocus:!0},H.t("Got It"))))))};SlackAIHuddleRecordingLegalModal.displayName="SlackAIHuddleRecordingLegalModal";var W=a(0x11c82607b),V=a(0x46dbff89);let G=(0,W.Ay)("Open the Huddle recording legal notification modal",(e,t,{isInitiator:a,isEnablingAiNotesAutoStart:r,onConfirmRecord:i,channelId:l})=>{e((0,V.q)({element:n.createElement(SlackAIHuddleRecordingLegalModal,{isInitiator:a,isEnablingAiNotesAutoStart:r,onConfirmRecord:i,channelId:l})}))});G.meta={name:"openHuddleRecordingLegalModal",key:"createThunkOpenHuddleRecordingLegalModal",description:"Open the Huddle recording legal notification modal"}},0x1a1835cce:(e,t,a)=>{"use strict";a.d(t,{X:()=>b});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x473f70ba),s=a(0x5eedb646),c=a(0x20e80190e),d=a(0x3711e82d),m=a(0x1f48e3aa4),u=a(0x183e72453),p=a(0x1fcbb004d);let h=new i.Ay("huddles"),SlackAIHuddleRecordingLegalResumeModal=({isInitiator:e,onConfirmRecord:t})=>{let a=(0,r.wA)(),i=(0,o.Ay)(),_=(0,n.useCallback)(()=>{a((0,p.O)())},[a]),f=(0,n.useCallback)(()=>{_(),a((0,u.A)())},[a,_]),b=(0,n.useCallback)(()=>{_(),t?.()},[t,_]),g=(0,n.useMemo)(()=>({eventId:d.EventId.NATIVE_AI,elementName:s.H.HUDDLE_SUMMARY_RESUME_RECORDING_MODAL,...i,isHuddleRecordingInitiator:e??!1,nativeAiSummaryType:m.Tj.Huddle}),[i,e]),y=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:d.EventId.NATIVE_AI,elementName:e?s.H.HUDDLE_SUMMARY_CONFIRM_RESUME_BUTTON:s.H.HUDDLE_SUMMARY_CONSENT_RESUME_BUTTON,nativeAiSummaryType:m.Tj.Huddle,...i}),[e,i]),A=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:d.EventId.NATIVE_AI,elementName:s.H.HUDDLE_SUMMARY_CANCEL_RESUME_BUTTON,nativeAiSummaryType:m.Tj.Huddle,...i}),[i]),x=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0},eventId:d.EventId.NATIVE_AI,elementName:s.H.HUDDLE_SUMMARY_LEAVE_HUDDLE_BUTTON,nativeAiSummaryType:m.Tj.Huddle,...i}),[i]),E=e?h.t("Resume taking notes with AI?",{fallbackHash:"0ae26fd4ef95e52c390777b8c19aa0156d93a477"}):h.t("AI notes are back on",{fallbackHash:"31e5d9dc5b459af08378eb78cc1da42ee5a96f4d"}),C=e?h.t("Transcription will be turned back on and will be included in the AI summary. By participating, you agree to being transcribed. Make sure everyone else is cool with that, too."):h.t("Transcription is now back on and will be included in the AI summary. By participating, you agree to being transcribed.");return n.createElement(c.dW,{closeModal:_,showCloseButton:!1,shouldCloseOnOverlayClick:!1,centered:!0,autoClogProps:g},n.createElement(c.rQ,null,n.createElement(c.Rc,{title:E})),n.createElement(c.$m,null,n.createElement(c.qf,null,C)),n.createElement(c.jl,null,n.createElement(c.ox,null,e?n.createElement(l.$n,{onClick:_,type:"outline",autoClogProps:A},h.t("Close")):n.createElement(l.$n,{onClick:f,type:"outline",autoClogProps:x},h.t("Leave Huddle")),n.createElement(l.$n,{onClick:b,type:"primary",autoClogProps:y},h.t("Continue")))))};SlackAIHuddleRecordingLegalResumeModal.displayName="SlackAIHuddleRecordingLegalResumeModal";var _=a(0x11c82607b),f=a(0x46dbff89);let b=(0,_.Ay)("Open the Huddle recording legal resume notification modal",(e,t,{isInitiator:a,onConfirmRecord:r})=>{e((0,f.q)({element:n.createElement(SlackAIHuddleRecordingLegalResumeModal,{isInitiator:a,onConfirmRecord:r})}))});b.meta={name:"openHuddleRecordingLegalResumeModal",key:"createThunkOpenHuddleRecordingLegalResumeModal",description:"Open the Huddle recording legal resume notification modal"}},0x91ece895:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SlackAiHuddleNuxCoachmark:()=>SlackAiHuddleNuxCoachmark,default:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xb90de824),o=a(0x13953efe6),s=a(0x3989021c),c=a(0x5eedb646),d=a(0x21c52c333),m=a(0x3711e82d),u=a(0x226892387),p=a(0x1e3eb45fd),h=a(0x1f48e3aa4),_=a(0x21c11a1dc),f=a(0x5b1935a6),b=a(0x1472af90a),g=a(0x18632f75a);let y=new i.Ay("huddles"),SlackAiHuddleNuxCoachmark=({children:e})=>{let t=(0,r.wA)(),a=(0,u.d4)(_.UR),i=(0,u.d4)(_.Es),A=(0,u.d4)(p.Z2),x=(0,n.useMemo)(()=>({eventId:m.EventId.NATIVE_AI,elementName:c.H.HUDDLE_SUMMARY_NUX_COACHMARK,nativeAiSummaryType:h.Tj.Huddle,clogImpression:!0}),[]),E=a||i,C=y.t("Take notes with AI"),{isOpen:k,closeCoachmark:v}=(0,s.A)(f.ze.SLACK_AI_HUDDLES_NUX_COACHMARK,f.xu.HUDDLE_TOOLBAR),S=(0,n.useCallback)(()=>v(),[v]);(0,n.useEffect)(()=>()=>{E||t((0,g.z)({type:b.X8.Impression,component:b.G7.SlackAiHuddlesNuxCoachmark,reason:"slack-ai-huddles-nux-seen"}))},[t,E]);let I=(0,n.useMemo)(()=>n.createElement("div",null,A&&n.createElement(d.N,{className:"margin_bottom_25"}),n.createElement("div",null,C)),[A,C]),w=(0,n.useMemo)(()=>n.createElement(l.Ay,{isOpen:k,width:400,arrowPosition:10,offsetY:-5,title:I,ariaLabel:C,bodyText:y.t("When Slack takes notes for you, everyone gets to stay focused on the conversation.",{fallbackHash:"81c687c6817356ae78ec4a5f75bea94b4cc17375"}),hideCloseButton:!1,closeCoachmark:S,autoClogProps:x}),[k,I,C,S,x]);return E?e:n.createElement(o.Ay,{coachmarkElement:w,orientation:o.YC.Bottom},e)};SlackAiHuddleNuxCoachmark.displayName="SlackAiHuddleNuxCoachmark";let A=SlackAiHuddleNuxCoachmark},0x23279293b:(e,t,a)=>{"use strict";a.d(t,{c:()=>b});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x6e87d4ec),o=a(0x58199183),s=a(0x20e80190e),c=a(0x22d3b4662),d=a(0x1ed767a16),m=a(0x11c82607b),u=a(0x226892387),p=a(0x1fcbb004d),h=a(0x46dbff89),_=a(0x16ffed5ab);let f=new i.Ay("shared_workspaces"),ShareToExternalWorkspaceErrorModal=({blocks:e,topLevelTeamId:t})=>{let a=(0,r.wA)(),i=(0,u.d4)(t=>(0,c.A)(t,e)),m=i&&(0,d.tD)(),h=(0,n.useCallback)(()=>{(0,d.x3)(i),a((0,_.M)({element:n.createElement(l.A,{svgIconProps:{name:"check-circle"}},f.t("Text copied."))})),a((0,p.O)())},[a,i]),b=(0,n.useCallback)(()=>a((0,p.O)()),[a]);return n.createElement(s.aF,null,n.createElement(s.rQ,null,n.createElement(s.Rc,{title:f.t("Can\u2019t share message"),className:"break_word"})),n.createElement(s.$m,{className:"margin_0"},n.createElement(s.qf,null,n.createElement("p",null,t?f.rt("Can\u2019t share this message outside of {teamName}.",{teamName:n.createElement(o.A,{id:t})}):f.t("Can\u2019t share this message outside of your workspace.")),m&&n.createElement("p",null,f.t("If you\u2019d like, you can copy your message to your clipboard in order to send it separately.")))),n.createElement(s.jl,null,n.createElement(s.ox,null,m&&n.createElement(s.s_,{type:"primary",onClick:h,"aria-label":f.t("Copy Text & Close")},f.t("Copy Text & Close")),n.createElement(s.s_,{type:m?"danger":"primary",onClick:b,"aria-label":f.t("Close")},f.t("Close")))))};ShareToExternalWorkspaceErrorModal.displayName="ShareToExternalWorkspaceErrorModal";let b=(0,m.Ay)("Opens the Share to External Workspace Error Modal",(e,t,a)=>{e((0,h.q)({element:n.createElement(ShareToExternalWorkspaceErrorModal,a),isStackable:!1}))});b.meta={name:"openShareToExternalWorkspaceErrorModal",key:"createThunkOpenShareToExternalWorkspaceErrorModal",description:"Opens the Share to External Workspace Error Modal"}},0x1d99e9583:(e,t,a)=>{"use strict";a.d(t,{GG:()=>h,g9:()=>p,om:()=>m,qx:()=>f,rd:()=>d,uF:()=>u,wg:()=>_});var n,r,i,l,o,s,c,d=((n={}).TermsOfServiceModalAccept="shared-workspace-invite-received-terms-of-service-modal-accept-data-qa",n),m=((r={}).AcceptButton="shared-workspace-received-invitation-actions-data-qa-accept",r.IgnoreButton="shared-workspace-received-invitation-actions-data-qa-ignore",r),u=((i={}).Invite="slack-connect-workspace-received-invite-accept",i),p=((l={}).Modal="slack-connect-workspace-invite-accept-modal",l.Header="slack-connect-workspace-invite-accept-modal-header",l.HeaderIcon="slack-connect-workspace-invite-accept-modal-header-icon",l.TitleBar="slack-connect-workspace-invite-accept-modal-title-bar",l.Content="slack-connect-workspace-invite-accept-modal-content",l.Footer="slack-connect-workspace-invite-accept-modal-footer",l.FooterActions="slack-connect-workspace-invite-accept-modal-footer-actions",l.CloseButton="slack-connect-workspace-invite-accept-modal-close-button",l),h=((o={}).Modal="slack-connect-workspace-invite-accept-error-modal",o.Header="slack-connect-workspace-invite-accept-error-modal-header",o.HeaderIcon="slack-connect-workspace-invite-accept-error-modal-header-icon",o.TitleBar="slack-connect-workspace-invite-accept-error-modal-title-bar",o.Content="slack-connect-workspace-invite-accept-error-modal-content",o.Footer="slack-connect-workspace-invite-accept-error-modal-footer",o.FooterActions="slack-connect-workspace-invite-accept-error-modal-footer-actions",o.CloseButton="slack-connect-workspace-invite-accept-error-modal-close-button",o),_=((s={}).Modal="slack-connect-workspace-invite-ignore-modal",s.Header="slack-connect-workspace-invite-ignore-modal-header",s.HeaderIcon="slack-connect-workspace-invite-ignore-modal-header-icon",s.TitleBar="slack-connect-workspace-invite-ignore-modal-title-bar",s.Content="slack-connect-workspace-invite-ignore-modal-content",s.Footer="slack-connect-workspace-invite-ignore-modal-footer",s.FooterActions="slack-connect-workspace-invite-ignore-modal-footer-actions",s.CloseButton="slack-connect-workspace-invite-ignore-modal-close-button",s),f=((c={}).Modal="slack-connect-workspace-invite-ignore-error-modal",c.Header="slack-connect-workspace-invite-ignore-error-modal-header",c.HeaderIcon="slack-connect-workspace-invite-ignore-error-modal-header-icon",c.TitleBar="slack-connect-workspace-invite-ignore-error-modal-title-bar",c.Content="slack-connect-workspace-invite-ignore-error-modal-content",c.Footer="slack-connect-workspace-invite-ignore-error-modal-footer",c.FooterActions="slack-connect-workspace-invite-ignore-error-modal-footer-actions",c.CloseButton="slack-connect-workspace-invite-ignore-error-modal-close-button",c)},0x12d16c402:(e,t,a)=>{"use strict";a.d(t,{A:()=>u,a:()=>d});var n=a(0xbad225b5),r=a(0x8c8bafa3),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x1faa3f1ac),s=a(0x569a8d1e);let c=new i.Ay("shared_workspaces"),d={...s.J},m=n.memo(({error:e})=>{if(!e)return null;let contactUsCallback=({tag:e,text:t})=>n.createElement(o.A,{key:e,target:"_blank",href:`https://${(0,r.qF)()}/help/requests/new`},t);return e.name===d.ActiveInvite?c.rt("<b>Can\u2019t send another invitation.</b> This person already has a pending invitation."):e.name===d.AlreadyInWorkspace?c.rt("<b>Can\u2019t send another invitation.</b> This person is already in the space.",{fallbackHash:"e0d7d961c5ddfd4d983dcef9c5110718fb3609fd"}):"externalWorkspaces.invites.sendByUser"===e.method?c.rt("Your invitation couldn\u2019t be sent. Try again later, or <a>contact us</a>.",null,contactUsCallback):"externalWorkspaces.kick"===e.method?c.rt("The user couldn\u2019t be removed. Try again later, or <a>contact us</a>.",null,contactUsCallback):"externalWorkspaces.leave"===e.method?c.rt("You couldn\u2019t leave this workspace. Try again later, or <a>contact us</a>.",null,contactUsCallback):c.rt("There was an error. Try again later, or <a>contact us</a>.",null,contactUsCallback)}),SlackConnectWorkspaceInlineError=e=>n.createElement(l.Ay,{level:l.A_.error,type:l.QE.inline,className:"margin_bottom_125"},n.createElement(m,{error:e.error}));SlackConnectWorkspaceInlineError.displayName="SlackConnectWorkspaceInlineError";let u=SlackConnectWorkspaceInlineError},0x1fe8a7017:(e,t,a)=>{"use strict";a.d(t,{b:()=>isSlackKitPlaygroundEnabled});var n=a(0x18dac2b8e);function isSlackKitPlaygroundEnabled(){return(0,n.b3)()}},0x243148816:(e,t,a)=>{"use strict";a.d(t,{O:()=>n});let n={userMenu:"external_workspace_user_menu",emptyDms:"external_workspace_empty_dms",createMenu:"external_workspace_create_menu",postEvent:"external_workspace_post_event"}},0x1dda05e1b:(e,t,a)=>{"use strict";a.d(t,{a:()=>isStickersEnabled,j:()=>isStickersViewOnlyEnabled});var n=a(0x14149c126);function isStickersEnabled(e){return"on"===(0,n._Z)(e,"stickers_word_art")}function isStickersViewOnlyEnabled(e){return"on"===(0,n._Z)(e,"stickers_word_art_view_only")}},0x1f960c750:(e,t,a)=>{"use strict";a.d(t,{M:()=>AddTabMenu});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x21f3c49e8),o=a(0x1595bdd0),s=a(0x1d01572a2),c=a(0x40c0d834),d=a(0x20482ad21),m=a(0x99233ecb),u=a(0x2501a2cee),p=a(0x9b29cfd8),h=a(0x4ff5f593),_=a(0x10cf39bbb),f=a(0x1189daa8d),b=a(0x1bb79a9ad),g=a(0x11ed04fa0),y=a(0x1c760ba43),A=a(0x1dfbc7c4c),x=a(0x1f022ebd9),E=a(0x2b7f0bcc),C=a(0xce378727),k=a(0x13eedc190),v=a(0x23b496ae9),S=a(0xf225ecf2),I=a(0x96920791),w=a(0x16d221c7f),T=a(0x142775427),N=a(0x1f803375e),M=a(0x1f8f18921),R=a(0x77da682b),P=a(0x12ab7bd50),L=a(0x8ed587af),O=a(0x1d06e350e),D=a(0x23811873d),F=a(0x1950da728);let U="unified-file-picker-modal";var B=((n={}).FILES="files",n.LISTS="lists",n.CANVAS="canvas",n.DOCUMENTS="documents",n.SPREADSHEETS="spreadsheets",n.PRESENTATIONS="presentations",n.PDFS="pdfs",n);let H={files:[F.$Z.LISTS,F.$Z.CANVASES,F.$Z.DOCUMENTS,F.$Z.SPREADSHEETS,F.$Z.PRESENTATIONS,F.$Z.PDFS],lists:[F.$Z.LISTS],canvas:[F.$Z.CANVASES],pdfs:[F.$Z.PDFS],documents:[F.$Z.DOCUMENTS],spreadsheets:[F.$Z.SPREADSHEETS],presentations:[F.$Z.PRESENTATIONS]},W={files:O.ej.UNIFIED_FILE_PICKER_ALL_FILES,lists:O.ej.UNIFIED_FILE_PICKER_LISTS,canvas:O.ej.UNIFIED_FILE_PICKER_CANVASES,pdfs:O.ej.UNIFIED_FILE_PICKER_PDFS,documents:O.ej.UNIFIED_FILE_PICKER_DOCUMENTS,spreadsheets:O.ej.UNIFIED_FILE_PICKER_SPREADSHEETS,presentations:O.ej.UNIFIED_FILE_PICKER_PRESENTATIONS},V={[D.r.GOOGLE_DRIVE]:O.ej.UNIFIED_FILE_PICKER_GOOGLE_DRIVE,[D.r.MICROSOFT_ONEDRIVE]:O.ej.UNIFIED_FILE_PICKER_MICROSOFT_ONEDRIVE};var G=a(0x11a296110),q=a(0x178788799),j=a(0xb90d5858),z=a(0x1e1bdd25f),K=a(0x70de3606),$=a(0x167d76333),Y=a(0x226892387),Q=a(0x14149c126),Z=a(0x1fcbb004d);let J=new d.Ay("files"),X=r.createElement(u.Ah,{name:"canvas",size:"20"}),ee=r.createElement(u.Ah,{name:"lists",size:"20"});function CreateNewCanvasOrListMenu({onInsertNewCanvas:e,onInsertNewList:t}){let a=(0,i.wA)(),n=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),l=(0,Y.d4)($.F),o=(0,Y.d4)(K.Il),s=(0,r.useCallback)(()=>{a((0,Z.O)()),e?.()},[a,e]),c=(0,r.useCallback)(()=>{a((0,Z.O)()),t?.()},[a,t]),d=(0,r.useCallback)(a=>r.createElement(q.Ay,a,l&&e&&r.createElement(j.A,{label:J.t("Canvas"),icon:X,onSelected:s}),o&&t&&r.createElement(j.A,{label:J.t("List"),icon:ee,onSelected:c})),[l,o,s,c,e,t]),m=o&&t;return l&&e||m?r.createElement(z.A,{renderMenu:d,position:"bottom-left"},r.createElement(G.$n,{type:"outline","aria-haspopup":"menu"},n?J.t("Create New"):"",r.createElement(u.Ah,{name:"caret-down",size:"16"}))):null}CreateNewCanvasOrListMenu.displayName="CreateNewCanvasOrListMenu";var et=a(0xbf7cc905),ea=a(0x7eaf2e36),en=a(0x24e98a449),er=a(0x1b6f39a31),ei=a(0x1ec68d6a3),el=a(0x15bd01ec9),eo=a(0x2180443d9);async function waitForWorkObjectToLoad(e,t,a,n=1e4,r=2e3){let i=Date.now();for(;Date.now()-i<n;){let n=e(),i=(0,eo.a)(n,a);if((0,el.BX)(i)&&(0,el.vD)(t,a)||(0,er.jH)(i)&&i.entity_details)return!0;await (0,ea.yy)(r)}return(0,ei.Ay)({teamOrEnterpriseId:t,label:en.t6}).error(Error("Timeout waiting for work object to load"),{entityId:a,timeoutMs:n}),!1}var es=a(0x165af5ef7),ec=a(0x11c82607b),ed=a(0x20b63020e);let em=(0,ec.Ay)("adds new channel tab or shows speed bump",async(e,t,{fileId:a,channelId:n,listViewId:r,listViewName:i})=>{let insertFileHandler=async()=>{e((0,ed.Z)({channelId:n,fileId:a,listViewId:r,listViewName:i,isNewFile:!1}))},l=await e((0,es.e)({fileId:a,channelId:n}));return l?{canInsert:!1,speedBump:l}:(insertFileHandler(),{canInsert:!0})});em.meta={name:"maybeInsertCanvasOrListAsChannelTab",key:"createThunkMaybeInsertCanvasOrListAsChannelTab",description:"adds new channel tab or shows speed bump"};var eu=a(0x22ee3e0e1),ep=a(0x1f3226107),eh=a(0xa011d509);function isExternalProviderKey(e){return D.r.GOOGLE_DRIVE===e||D.r.MICROSOFT_ONEDRIVE===e}function getExternalProviderAppId(e){return e?.app_id}function getExternalProviderDisplayName(e){return e?.display_name}function getExternalProviderIsConnected(e){return e?.is_connected??!1}function getExternalProviderIsInstalled(e){return e?.is_installed??!1}function getExternalProviderAuthUrl(e){return e?.auth_url}function getExternalProviderInstallUrl(e){return e?.install_url}function getExternalProviderKey(e){return e?.provider_key}var e_=a(0xbd3de346),ef=a(0x120d0398b),eb=a(0x14fde54c),eg=a(0x9b971e7e),ey=a(0x228691cd3),eA=a(0x1d7960bf2),ex=a(0x14ea3ce99),eE=a(0x6ee3decf);function useFileInsert({channelId:e,selectedFileId:t,selectedFile:a,selectedExternalFile:n,currentSearchTabId:l,selectedListViewOption:o,showListViewPicker:s=!0,setSpeedBump:c,setIsLoading:d,setError:m}){let u=(0,i.wA)(),{getState:p}=(0,i.Pj)(),h=(0,e_.DQ)(a),_=(0,e_.l7)(a),f=(0,Y.d4)(e=>(0,ef.u)(e,a)),b=(0,Y.d4)(eA.cl);return{onInsert:(0,r.useCallback)(async()=>{d?.(!0),m?.(void 0);try{if(n&&l&&isExternalProviderKey(l)){let t=b.find(e=>e.provider_key===l)?.app_id,a=await u((0,eh.B)({appId:t??"",externalUrl:n.link,reason:"unified-file-picker-insert-external"}));if(a?.file_id){await u((0,ep.B2)({fileId:a.file_id,reason:"unified-file-picker-external-file-insert"}));let t=(0,ex.Lp)(p(),a.file_id);if(t){let e=(0,eE.I)(p(),t),a=(0,eu.E)(t,e),n=t.url_private??t.external_url??"";if(a&&n){let e=(0,eg.JY)(p())??"";await u((0,el.mn)({recordId:a,entityUrl:n,reason:"unified-file-picker-external-file-insert"})),await waitForWorkObjectToLoad(p,e,a)}}let n=await u((0,ey.r)({fileId:a.file_id,channelId:e}));n.success||m?.(n.error);return}}if(h&&a){let a=await u(em({fileId:t,channelId:e}));if(a.speedBump)return void c(a.speedBump);a.canInsert&&u((0,Z.O)({closeNamed:[U]}))}else if(_&&a){let n=(0,eb.Br)(a),r=n?.find(e=>(0,et.B)(e)),i=r?.name??"",l=await u(em({fileId:t,channelId:e,...s?{listViewId:o?.value??r?.id,listViewName:((e,t)=>{if(!e?.title)return;let a=e?.title;return t?`${a}: ${t}`:a})(a,o?.label??i)}:{}}));if(l.speedBump)return void c(l.speedBump);l.canInsert&&u((0,Z.O)({closeNamed:[U]}))}else if(a&&(0,e_.ge)(a)&&f){let a=await u((0,ey.r)({fileId:t,channelId:e}));a.success||m?.(a.error)}}finally{d?.(!1)}},[h,t,e,a,f,_,o,n,l,s,u,c,d,m,p,b])}}var eC=a(0x1c56fcf95),ek=a(0x1c211ad70),ev=a(0x164e27b8c);let eS=(0,ec.Ay)("initialize unified file picker browsers",(e,t,{searchTabs:a})=>{let n=t();a.forEach(t=>{if((0,eC.ET)(n,W[t])){let{isBooted:e,isLoading:a}=(0,eC.gK)(n,W[t]);if(e||a)return}if(W[t])t===B.CANVAS?e((0,ek.X)({browserInstanceId:W[t],entityType:O.ri.QUIP_FILES,options:{isInfinitePagination:!0,sort:O.QX.RECENTLY_VIEWED,filters:{excludedFileType:[F.$Z.CANVAS_TEMPLATE]}}})):t===B.LISTS?e((0,ek.X)({browserInstanceId:W[t],entityType:O.ri.LISTS,options:{isInfinitePagination:!0,sort:O.QX.RECENTLY_VIEWED}})):(e((0,ek.X)({browserInstanceId:W[t],entityType:O.ri.FILES,options:{isInfinitePagination:!0,restrictions:{fileTypesAllowed:H[t]||[]},sort:O.QX.LAST_ENGAGED}})),e((0,ev.I)({browserInstanceId:W[t],value:O.QX.LAST_ENGAGED})));else if(isExternalProviderKey(t)){let a=V[t],r=(0,eA.t8)(n,t),i=(0,eA.jr)(n,t),l=getExternalProviderAppId(r);i&&l&&e((0,ek.X)({browserInstanceId:a,entityType:O.ri.UNIFIED_FILES_EXTERNAL_FILES,options:{sort:O.QX.RECENTLY_VIEWED,filters:{appId:l}}}))}})});eS.meta={name:"initializeUnifiedFilePickerBrowsers",key:"createThunkInitializeUnifiedFilePickerBrowsers",description:"initialize unified file picker browsers"};var eI=a(0x1a0b49dc0),ew=a(0x4c79b03f),eT=a(0x2bfcf5dd);let eN=(0,ec.Ay)("update query and fetch for all unified file picker browsers",(e,t,{searchTabs:a,query:n,selectedSearchTabId:r})=>{let i=t();a.forEach(t=>{let a=isExternalProviderKey(t)?V[t]:W[t];if(!(0,eC.ET)(i,a))return;let{sort:l,isBooted:o}=(0,eC.gK)(i,a);o&&t!==r&&(W[t]?(e((0,eT.o)({browserInstanceId:W[t],value:n})),n?l===O.QX.LAST_ENGAGED?e((0,ev.I)({browserInstanceId:a,value:O.QX.RELEVANT})):e((0,eI.d)({browserInstanceId:W[t]})):(e((0,ew.Q)({browserInstanceId:a})),t===B.CANVAS||t===B.LISTS?l===O.QX.RELEVANT&&e((0,ev.I)({browserInstanceId:a,value:O.QX.RECENTLY_VIEWED})):l===O.QX.RELEVANT||l===O.QX.RECENTLY_VIEWED?e((0,ev.I)({browserInstanceId:a,value:O.QX.LAST_ENGAGED})):e((0,eI.d)({browserInstanceId:W[t]})))):isExternalProviderKey(t)&&(e((0,eT.o)({browserInstanceId:a,value:n})),e((0,eI.d)({browserInstanceId:a}))))})});eN.meta={name:"updateQueryAndFetch",key:"createThunkUpdateQueryAndFetch",description:"update query and fetch for all unified file picker browsers"};var eM=a(0x19d27e99e),eR=a(0xea23b7d3),eP=a(0x2493bd395);function useCanvasExplorerContext({channelId:e}){let t=(0,eP.i)(e,!0).filter(e=>e.type===y.Xy.Canvas&&e.data?.fileId).map(e=>e.data?.fileId||"");return{explorerContext:{channelId:e,omitOtherChannelCanvasRows:!0,filteredCanvasIdSet:t.length?new Set(t):void 0,browserHasBeenPreFetched:!0}}}var eL=a(0x84a5226c);let eO=r.memo(()=>r.createElement(r.Fragment,null,r.createElement(eL.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),Array.from({length:18},(e,t)=>r.createElement(eL.A,{key:t,className:"p-explorer_result--list"})),r.createElement(eL.A,{className:"p-explorer_result--list p-explorer_result--list--last"})));var eD=a(0x3711e82d);let eF=new d.Ay("files"),eU=r.createElement(eO,null),UnifiedFilePickerSearchCanvases=({onFileSelected:e,channelId:t})=>{let a=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),{explorerContext:n}=useCanvasExplorerContext({channelId:t});return a?r.createElement(eM.A,{context:n,useExplorer:eR.A,listLoadingFragment:eU,inputId:F.Jx.UNIFIED_FILE_PICKER,inputSearchyMode:F.R5.FILES,inputPlaceholderText:eF.t("Search canvases"),resultListAriaLabel:eF.t("Canvas results"),clogUiPage:eD.UiPage.UNIFIED_FILE_PICKER_CANVASES,onItemSelected:e}):null};UnifiedFilePickerSearchCanvases.displayName="UnifiedFilePickerSearchCanvases";var eB=a(0x1cbdfeceb),eH=a(0xd6ba6894),eW=a(0x13c4ed245),eV=a(0x171478a87),eG=a(0x6e0e2fb2),eq=a(0x814278bf),ej=a(0x120c268ad),ez=a.n(ej),eK=a(0x32d3ef3d),e$=a(0x7729d35b),eY=a(0xb97f3675),eQ=a(0x128d54e52),eZ=a(0x24f1e08bb),eJ=a(0x1535e80f3),eX=a(0x15f8e452a),e0=a(0x1fdec3e16),e1=a(0xcfa85c93),e2=a(0x6960d8b9);let e4=new d.Ay("files"),FileIcon=({className:e,iconType:t})=>r.createElement("span",{className:ez()("c-file_entity_thumbnail_icon",e)},r.createElement(e$.A,{entityState:eK.w.enabled,suppressDefaultColors:!0},r.createElement(eX.A,{className:ez()("c-icon__file","p-file_thumbnail__file_icon"),file:"svgicon",type:t}))),FilePickerExternalFileItem=({file:e,appId:t,isFirst:a,isLast:n,isSelected:i,sort:l="timestamp"})=>{let o=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),s=(0,r.useMemo)(()=>{if(!o)return null;let t=e.timestamp,a=(0,e2.Od)(t,{uncapitalizedRelativeDay:!0}),n=(0,e2.rK)(t);return"last_read"===l?n?e4.t("Last viewed {time}",{time:a}):e4.t("Last viewed on {time}",{time:a}):n?e4.t("Last modified {time}",{time:a}):e4.t("Last modified on {time}",{time:a})},[e.timestamp,l,o]),c=(0,r.useMemo)(()=>(0,e1.T)(e.mimetype,t),[e.mimetype,t]),d=(0,r.useCallback)(({className:e})=>r.createElement(FileIcon,{className:e,iconType:c}),[c]),m=i?eJ.pI.highlightDark:void 0,u=(0,r.useMemo)(()=>r.createElement(r.Fragment,null,r.createElement(eQ.CG,{className:"c-file_entity__text c-file_entity__text--first-line","data-qa":"file-entity-metadata-title"},r.createElement(e0.A,{lines:1},e.title)),r.createElement("div",{className:"c-file_entity-user-timestamp","data-qa":"file-entity-metadata-description"},r.createElement(e0.A,{lines:1},r.createElement(eQ.CG,{className:"c-file_entity-user-timestamp c-file-entity-bold-description"},s)))),[e.title,s]),p=(0,r.useMemo)(()=>r.createElement(eY.A,{size:"medium",className:"c-file_entity__medium_base_entity","data-sk":"file_picker_external_file_item",style:m,avatar:d,text:u}),[m,d,u]);return o?r.createElement("div",{className:ez()({"p-explorer_result--list":!0,"p-explorer_result--list--first":a,"p-explorer_result--list--last":n,"p-explorer_result--list--active":i}),"data-qa":"file-picker-external-file-item"},r.createElement("div",{className:"c-pillow_file_container"},r.createElement("div",{className:"c-pillow_file c-pillow_file--clickable"},r.createElement(eZ.A,{style:m,padding:"0",primaryContent:p,className:"p-contextual_file p-contextual_file--list-item"})))):null};FilePickerExternalFileItem.displayName="FilePickerExternalFileItem";var e5=a(0x1befa7c4);let e3=new d.Ay("files"),useExternalFileModalExplorer=({appId:e,providerKey:t,appName:a,onFileSelected:n})=>{let[l,o]=(0,r.useState)(null),s=(0,i.wA)(),c=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),d=V[t],{results:m,query:u,isLoading:p,error:h,sort:_}=(0,eq.A)(d,O.ri.UNIFIED_FILES_EXTERNAL_FILES,{isInfinitePagination:!0,filters:{appId:e},sort:O.QX.RECENTLY_VIEWED},!0),f=(0,r.useCallback)(()=>{s((0,ew.Q)({browserInstanceId:d}))},[s,d]),b=(0,r.useCallback)(({selectedIndex:e,suggestions:t,userQuery:a})=>{a?null===e||t[e].is_type_query_completion&&(s((0,eT.o)({browserInstanceId:d,value:a})),s((0,eI.d)({browserInstanceId:d}))):f()},[s,f,d]),g=(0,r.useMemo)(()=>({allowEmptyQuery:!0,tiered:!1,limit:0,returnMetadata:!1,searchViewContext:"autocomplete:external-file-picker-modal",entities:{}}),[]),y=(0,r.useCallback)(e=>{o(e.external_id??e.link),n(e)},[n]);return(0,r.useCallback)(t=>{if(!c)return{rows:[],onSearch:b,onResetSearch:f,searcherOptions:g,isZeroState:!0};let n=[],i=!u;return p&&n.push({key:"list-loading",type:e5.MA.ListLoading,role:e5.N3.Presentation,scrollToTop:!0}),h&&"none"!==h&&n.push({key:"error-state",type:e5.MA.EmptyState,data:{title:e3.t("Unable to load files"),description:e3.t("There was a problem connecting to {appName}.",{appName:a})},role:e5.N3.Presentation}),!p&&"none"===h&&m.length>0&&m.forEach((t,a)=>{let i=t.external_id??t.link,o=a===m.length-1;n.push({key:i,type:e5.MA.GenericComponent,data:{component:r.createElement(FilePickerExternalFileItem,{file:t,appId:e,isFirst:0===a,isLast:o,isSelected:l===i,sort:_===O.QX.RECENTLY_VIEWED?"last_read":"timestamp"})},onListItemSelect:()=>y(t),autoClogProps:{elementIndex:a,elementName:"external_file_result"},role:e5.N3.ListItem})}),p||"none"!==h||0!==m.length||n.push({key:"empty-state",type:e5.MA.EmptyState,data:{title:u?e3.t("No files found"):e3.t("No recent files in {appName}",{appName:a}),description:u?e3.t("Try adjusting your search."):e3.t("Files you recently viewed or modified will appear here.")},role:e5.N3.Presentation}),{rows:n,onSearch:b,onResetSearch:f,searcherOptions:g,isZeroState:i}},[e,a,h,m,y,p,f,b,u,g,l,_,c])};useExternalFileModalExplorer.displayName="useExternalFileModalExplorer";var e6=a(0xc9b196b3);let e8=new d.Ay("files"),e7=r.createElement(eO,null),UnifiedFilePickerSearchExternal=({externalProvider:e,onExternalFileSelected:t})=>{let a=(0,i.wA)(),n=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),l=getExternalProviderAppId(e)??"",o=n?e8.t("External"):"External",s=getExternalProviderDisplayName(e)??o,c=getExternalProviderIsConnected(e),d=getExternalProviderIsInstalled(e),m=getExternalProviderAuthUrl(e),u=getExternalProviderInstallUrl(e),p=useExternalFileModalExplorer({providerKey:getExternalProviderKey(e)??"",appId:l,appName:s,isConnected:c,onFileSelected:t}),h=(0,r.useCallback)(()=>{!d&&u?eH.J.open(u,"_blank","popup,noopener,noreferrer"):l&&m&&a((0,e6.Zf)({appId:l,authUrl:m,reason:"unified-file-picker-connect-oauth"}))},[l,m,u,d,a]);if(!n)return null;if(!c){let e=e8.t("Connecting your account will let you see {appName} results here.",{appName:s});return r.createElement(r.Fragment,null,r.createElement(eW.A,{inputId:F.Jx.UNIFIED_FILE_PICKER,inputSearchyMode:F.R5.FILES,inputPlaceholderText:e8.t("Search {appName}",{appName:s}),onSearch:eB.A,onReset:eB.A,canReset:!1,hideAutocomplete:!0}),r.createElement("div",{className:"p-explorer_results"},r.createElement("div",{className:"display_flex flex_direction_column align_items_center justify_content_center height_100 padding_300","data-qa":"external-file-picker-connect"},r.createElement(eV.v,{providerName:s,hasValidOAuth:!1,customExpandedSubtext:e,loadingStatus:eG.r.FINISHED,onUpdateOAuth:h,appId:l,isOAuthTokenInvalid:!0,showDisconnectedBorder:!1,align:"center",isFullWidth:!0,isAppNotInstalled:!d}))))}return r.createElement(eM.A,{useExplorer:p,listLoadingFragment:e7,inputId:F.Jx.UNIFIED_FILE_PICKER,inputSearchyMode:F.R5.FILES,inputPlaceholderText:e8.t("Search {appName}",{appName:s}),resultListAriaLabel:e8.t("{appName} files results",{appName:s}),clogUiPage:eD.UiPage.UNIFIED_FILE_PICKER_ALL_FILES})};UnifiedFilePickerSearchExternal.displayName="UnifiedFilePickerSearchExternal";var e9=a(0x1f6b8d4b1),te=a(0x23e174be6),tt=a(0x19c76d181),ta=a(0x16f1f4c74),tn=a(0x1fa577313),tr=a(0x206e601f5);let ti=new d.Ay("quip-files-browser"),tl=new d.Ay("files"),to=r.createElement(eO,null),UnifiedFilePickerSearchFileType=({onFileSelected:e,fileTypes:t})=>{let a=(({context:e})=>{let t=(0,i.wA)(),a=(0,Y.d4)(tt.WR),[n,l]=(0,r.useState)(void 0),o=(0,i.Pj)(),s=(0,r.useCallback)(()=>{if(e?.fileTypesAllowed?.length!==1)return O.ej.UNIFIED_FILE_PICKER_ALL_FILES;switch(e?.fileTypesAllowed[0]){case F.$Z.PDFS:return O.ej.UNIFIED_FILE_PICKER_PDFS;case F.$Z.DOCUMENTS:return O.ej.UNIFIED_FILE_PICKER_DOCUMENTS;case F.$Z.SPREADSHEETS:return O.ej.UNIFIED_FILE_PICKER_SPREADSHEETS;case F.$Z.PRESENTATIONS:return O.ej.UNIFIED_FILE_PICKER_PRESENTATIONS;default:return O.ej.UNIFIED_FILE_PICKER_ALL_FILES}},[e]),c=(0,r.useMemo)(()=>s(),[s]),{handleSortSelect:d,handleInfinitePagination:m,results:u,pageCount:p,sort:h,isLoading:_,metadata:f,isZeroState:b,filters:g,totalCount:y,page:A,query:x}=(0,eq.A)(c,O.ri.FILES,{isInfinitePagination:!0,restrictions:e?.fileTypesAllowed?{fileTypesAllowed:e.fileTypesAllowed}:void 0,filters:{excludedFileType:[F.$Z.CANVAS_TEMPLATE]}},!0),E=g?.notFrom?.includes(a)&&g?.onlyMyChannels===!0&&g?.with?.includes(a),C=g?.from?.includes(a)&&!1===g.onlyMyChannels,k=(0,r.useMemo)(()=>E?"shared_with_you_files_filter":C?"created_by_you_files_filter":"file_type_filter",[C,E]),v=(0,r.useCallback)(()=>{t((0,ew.Q)({browserInstanceId:c})),(h===O.QX.RELEVANT||h===O.QX.RECENTLY_VIEWED)&&t((0,ev.I)({browserInstanceId:c,value:O.QX.LAST_ENGAGED}))},[c,t,h]),S=(0,e9.A)(h),I=(0,r.useCallback)(({value:e})=>{"file_type_filter"===e?h!==O.QX.RELEVANT&&h!==O.QX.RECENTLY_VIEWED||x?t((0,tn.q)({browserInstanceId:c})):(t((0,tn.q)({browserInstanceId:c,fetch:!1})),t((0,ev.I)({browserInstanceId:c,value:O.QX.LAST_ENGAGED}))):"shared_with_you_files_filter"===e?t((0,tr.d)({browserInstanceId:c,filters:{from:[],notFrom:[a],onlyMyChannels:!0,with:[a]},sort:h===O.QX.LAST_ENGAGED?O.QX.RECENTLY_VIEWED:h})):"created_by_you_files_filter"===e&&t((0,tr.d)({browserInstanceId:c,filters:{from:[a],notFrom:[],onlyMyChannels:!1,with:[]},sort:h===O.QX.LAST_ENGAGED?O.QX.RECENTLY_VIEWED:h}))},[t,a,h,x,c]),w=(0,r.useCallback)(({selectedIndex:e,suggestions:a,userQuery:n})=>{n?null===e||a[e].is_type_query_completion&&(t((0,eT.o)({browserInstanceId:c,value:n})),t((0,ta.d1)({browserInstanceId:c,value:O.QX.RELEVANT})),t((0,eI.d)({browserInstanceId:c}))):v()},[t,v,c]),T=(0,r.useMemo)(()=>({allowEmptyQuery:!0,tiered:!0,entities:{files:{onlyCanvases:!1,excludeTemplateCanvases:!0,excludeCannedCanvasTemplates:!0,excludeChannelCanvases:!0}},limit:30,returnMetadata:!0,sort:{frecency:!0,model:(0,te.I)(),preferExactMatch:!0},searchViewContext:"autocomplete:unified-file-picker-modal",filter:e?.searcherFilter}),[e.searcherFilter]),N=o.getState();return(0,r.useCallback)(()=>{let e=[],t=[{label:ti.t("All"),value:"file_type_filter"},{label:ti.t("Shared with you"),value:"shared_with_you_files_filter"},{label:ti.t("Created by you"),value:"created_by_you_files_filter"}],a=[{label:ti.t("Recently viewed"),value:O.QX.LAST_ENGAGED},{label:ti.t("Last updated"),value:O.QX.NEWEST}],r=[{label:ti.t("Most relevant",{ns:"browsers"}),value:O.QX.RELEVANT},{label:ti.t("Recently viewed"),value:O.QX.RECENTLY_VIEWED},{label:ti.t("Last updated"),value:O.QX.NEWEST}];return e.push({key:"controls",type:e5.MA.Controls,data:{selects:[{id:"filter",title:ti.t("Filter"),value:k,onChange:I,type:e5.jc.EXPANDED,options:t},{id:"sort",title:ti.t("Sort"),value:h,onChange:d,options:b?a:r,position:"right"}]},role:e5.N3.Presentation}),_&&A<2&&e.push({key:"list-loading",type:e5.MA.ListLoading,role:e5.N3.Presentation,scrollToTop:!0}),u.length&&u.forEach((t,a)=>{let{detailType:r,fromOrganization:i}=S(t),o=(0,ex.Lp)(N,t);e.push({key:t,type:e5.MA.UnifiedFileResult,data:{fileId:t,isFirst:0===a,isLast:a===u.length-1,filePropertyOverride:f?.[t]?{title:f?.[t]?.title,name:f?.[t]?.name,iid:f?.[t]?.iid}:void 0,detailType:r,notificationCount:0,fromOrganization:i,showCanvasModalMetadata:!0,isActiveItem:n===t,createdByUserId:o?.user},onListItemSelect:()=>{l(t)},autoClogProps:{elementIndex:a,elementName:"unifed_file_picker_result"},role:e5.N3.ListItem})}),_||y||e.push({key:"zero-empty",type:e5.MA.EmptyState,data:{title:ti.t("No results"),description:ti.t("You may want to try adjusting your filters.")},role:e5.N3.Presentation}),p>1&&e.push({key:"pagination",type:e5.MA.InfinitePagination,data:{isLoading:_,onLoadMore:m},role:e5.N3.Presentation}),{rows:e,onSearch:w,onResetSearch:v,searcherOptions:T,isZeroState:b}},[k,S,I,m,d,_,b,f,v,w,A,p,u,T,n,h,y,N])})({context:{fileTypesAllowed:t}});return(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker"))?r.createElement(eM.A,{useExplorer:a,listLoadingFragment:to,inputId:F.Jx.UNIFIED_FILE_PICKER,inputSearchyMode:F.R5.FILES,inputPlaceholderText:tl.t("Search files"),resultListAriaLabel:tl.t("Search files"),clogUiPage:eD.UiPage.UNIFIED_FILE_PICKER_ALL_FILES,onItemSelected:e}):null};UnifiedFilePickerSearchFileType.displayName="UnifiedFilePickerSearchFileType";var ts=a(0x245ab5a06),tc=a(0x1e3c7661);let td=new d.Ay("files"),tm=r.createElement(eO,null),UnifiedFilePickerSearchLists=({onFileSelected:e})=>{let t=(0,ts.A)({context:tc.SP.UnifiedFilePicker});return(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker"))?r.createElement(eM.A,{useExplorer:t,listLoadingFragment:tm,inputId:F.Jx.UNIFIED_FILE_PICKER,inputSearchyMode:F.R5.FILES,inputPlaceholderText:td.t("Search lists"),resultListAriaLabel:td.t("List results"),clogUiPage:eD.UiPage.UNIFIED_FILE_PICKER_LISTS,onItemSelected:e}):null};UnifiedFilePickerSearchLists.displayName="UnifiedFilePickerSearchLists";var tu=a(0x506398b6),tp=a.n(tu);let UnifiedFilePickerSearch=({selectedSearchTabId:e,onFileSelected:t,onExternalFileSelected:a,channelId:n})=>{let i=(0,Y.d4)(eA.cl);return r.createElement("div",{className:tp().filePickerSearch},(()=>{if(isExternalProviderKey(e)){let t=i.find(t=>t.provider_key===e);return t?r.createElement(UnifiedFilePickerSearchExternal,{externalProvider:t,onExternalFileSelected:a}):null}return e===B.LISTS?r.createElement(UnifiedFilePickerSearchLists,{onFileSelected:t}):e===B.CANVAS?r.createElement(UnifiedFilePickerSearchCanvases,{channelId:n,onFileSelected:t}):r.createElement(UnifiedFilePickerSearchFileType,{key:e,onFileSelected:t,fileTypes:H[e]})})())};UnifiedFilePickerSearch.displayName="UnifiedFilePickerSearch";var th=a(0x18ee7321c),t_=a(0x11243fb75),tf=a(0x45a2e30),tb=a(0xb1ea448c),tg=a(0x344bb842),ty=a(0x4c96e5d9),tA=a(0x1d9a37519),tx=a(0x13e9d41b4),tE=a(0x12d522820),tC=a.n(tE);let tk=new d.Ay("files"),SidebarListItem=({autoClogProps:e,isSelected:t,title:a,id:n,provider:i})=>{let l=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),o=isExternalProviderKey(n),{totalCount:s,isLoading:c}=(0,Y.d4)(e=>{let t=o?V[n]:W[n];return(0,eC.gK)(e,t)}),d=(0,r.useMemo)(()=>(0,tf.$k)(s??0,{lowercase:!0}),[s]),m=(0,r.useCallback)(()=>{let e=getExternalProviderAppId(i);return e?r.createElement(tA.z,{appId:e,size:20,width:20,height:20,imageClassName:tC().appIcon}):r.createElement("img",{alt:l?tk.t("Slack logo"):"Slack logo",className:tC().slackIcon,src:tx})},[i,l]);if(!l)return null;let renderCountOrConnectButton=()=>o&&!getExternalProviderIsConnected(i)?r.createElement("span",null,r.createElement(ty.Ay,{tip:tk.t("Connect app"),position:"top"},r.createElement(tg.A,{className:tC().connectButton,svgIconProps:{name:"plus"},size:"x-small","aria-label":tk.t("Connect app"),outline:!0}))):c?r.createElement("span",{className:tC().isLoading},r.createElement(tb.A,{size:"small",inline:!0,color:t?"white":"blue"})):r.createElement("span",{"data-qa":"tabs_item_render_count",className:ez()(tC().resultCount)},d);renderCountOrConnectButton.displayName="renderCountOrConnectButton";let renderSourceLabel=()=>r.createElement(r.Fragment,null,r.createElement("div",{className:ez()(tC().iconContainer,{[tC().hideIcon]:!t&&!o})},m()),r.createElement("span",{className:ez()(tC().filterLabel)},r.createElement(e0.A,{lines:1,withTooltip:!0},a)),renderCountOrConnectButton());return renderSourceLabel.displayName="renderSourceLabel",r.createElement(G.Nm,{"data-qa":`file_picker_sidebar_list_item_${a}`,className:ez()(tC().itemButton,{[tC().itemButtonSelected]:t,[tC().alwaysHideBorder]:o}),autoClogProps:e},renderSourceLabel())};SidebarListItem.displayName="SidebarListItem";let tv=new d.Ay("files");function UnifiedFilePickerSidebar({onSearchTabIdChange:e,selectedSearchTabId:t,tabIds:a}){let n=(0,r.useRef)(null),i=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),l=(0,Y.d4)(eA.cl),o=(0,r.useCallback)(e=>{if(!i)return e;switch(e){case B.FILES:return tv.t("All Files");case B.CANVAS:return tv.t("Canvases");case B.LISTS:return tv.t("Lists");case B.PDFS:return tv.t("PDFs");case B.DOCUMENTS:return tv.t("Documents");case B.SPREADSHEETS:return tv.t("Spreadsheets");case B.PRESENTATIONS:return tv.t("Presentations");default:return l?.find(t=>t.provider_key===e)?.display_name??""}},[i,l]),s=(0,r.useMemo)(()=>a.map(e=>({id:e,title:o(e)})),[a,o]),d=(0,r.useCallback)(t=>()=>e(t),[e]),m=(0,r.useCallback)(e=>r.createElement(t_.c,{id:e.id,"aria-label":i?tv.t("Search all {title} in Slack",{title:e.title}):e.title,onClick:d(e.id)},r.createElement(SidebarListItem,{id:e.id,title:e.title,isSelected:t===e.id,provider:l?.find(t=>t.provider_key===e.id)})),[t,i,d,l]);return i?r.createElement(c.A,{uiComponentName:eD.UiComponentName.UNIFIED_FILE_PICKER_MODAL_SIDEBAR},r.createElement("div",{className:tC().sidebar},r.createElement(th.A,{renderItem:m,items:s,"aria-label":tv.t("Filter by file type"),ref:n}))):null}UnifiedFilePickerSidebar.displayName="UnifiedFilePickerSidebar";var tS=a(0x209e067d1),tI=a(0xa985ed31),tw=a(0x19e4a8feb),tT=a(0xe6970e83),tN=a(0x1eae5fa6e),tM=a(0x1b3a0dc38),tR=a(0xe80ed487);let tP=new d.Ay("files");function UnifiedFilePicker({channelId:e,showListViewPicker:t=!0,onInsertNewCanvas:a,onInsertNewList:n}){let l=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),o=(0,Y.d4)(L.v4),s=(0,Y.d4)($.F),c=(0,Y.d4)(K.Il),[d,m]=(0,r.useState)(B.FILES),u=(0,i.wA)(),[p,h]=(0,r.useState)(""),_=(0,Y.d4)(e=>(0,ex.Lp)(e,p)),[f,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(null),[A,O]=(0,r.useState)(),[D,U]=(0,r.useState)(),[H,V]=(0,r.useState)(!1),[G,q]=(0,r.useState)(),j=(0,r.useCallback)(({item:e,itemSource:a})=>{if((0,tI.A)(e)){if("list"===a&&(h(e),t&&(d===B.LISTS||d===B.FILES))){let t=u((0,P.p)({fileId:e}));t&&U(t)}"search"===a&&(h(e),b(!0))}},[h,t,d,u,U]),z=(0,r.useCallback)(e=>{h(""),y(null),O(void 0),U(void 0),m(e)},[h,y,O,U,m]),Z=(0,r.useCallback)(e=>{y(e),h("")},[y,h]),{onInsert:J}=useFileInsert({channelId:e,selectedFileId:p,selectedFile:_,selectedExternalFile:g,currentSearchTabId:d,selectedListViewOption:A,showListViewPicker:t,setSpeedBump:U,setIsLoading:V,setError:q});(0,r.useEffect)(()=>{f&&p&&J()},[f,J,p,b]);let X=(0,Y.d4)(eA.cl),ee=(0,Y.d4)(eA.ed),et=(0,r.useRef)(!1);(0,r.useEffect)(()=>{o&&(!et.current||ee)&&(et.current=!0,u((0,tM.k)({reason:ee?"unified-file-picker-external-auth-completed":"unified-file-picker",querySource:"third_party_files_tab_in_channel"})))},[u,o,ee]);let ea=(0,r.useMemo)(()=>{let e=[B.FILES,...s?[B.CANVAS]:[],...c?[B.LISTS]:[],B.PDFS,B.DOCUMENTS,B.SPREADSHEETS,B.PRESENTATIONS];return o&&X.length&&e.push(...X.map(e=>e.provider_key)),e},[o,s,c,X]);(0,x.A)(()=>(u(eS({searchTabs:ea})),()=>{ea.forEach(e=>{W[e]&&u((0,tN.p)({browserInstanceId:W[e],forceCleanup:!0}))})}),[ea]);let en=(0,Y.d4)(e=>(0,tR.l)(e,F.Jx.UNIFIED_FILE_PICKER));(0,x.A)(()=>{u(eN({searchTabs:ea,query:en?(0,tw.Q)(en).trim():"",selectedSearchTabId:d}))},[en]);let er=(0,r.useCallback)(()=>{b(!1),U(void 0)},[]),ei=(0,r.useCallback)(()=>{O(void 0),h(""),U(void 0)},[O,h]),el=(0,r.useCallback)(e=>{O(e)},[O]);if(!l)return null;let renderSpeedBump=()=>D?D===R.e.PICK_LIST_VIEW_SPEEDBUMP?r.createElement(R.k,{file:_,onCancel:ei,onContinue:J,onOptionSelected:el,modalSubtitle:tP.t("This will be the default view for anyone who opens the list")}):r.createElement(M.A,{speedBumpType:D,file:_,onCancel:er}):null;return renderSpeedBump.displayName="renderSpeedBump",r.createElement(k.A,{maxWidth:850},r.createElement(T.A,null,r.createElement(N.A,{title:tP.t("Attach a file")})),r.createElement(S.A,null,G&&r.createElement("div",{className:"margin_left_100 margin_right_100"},r.createElement(E.Ay,{level:"error","data-qa":"unified-file-picker-error-alert"},l?tP.t("We couldn\u2019t add this file as a tab. Please try again."):"We couldn\u2019t add this file as a tab. Please try again.")),r.createElement("div",{className:tp().filePickerModalContent},r.createElement(UnifiedFilePickerSidebar,{selectedSearchTabId:d,onSearchTabIdChange:z,tabIds:ea}),r.createElement(UnifiedFilePickerSearch,{channelId:e,selectedSearchTabId:d,onFileSelected:j,onExternalFileSelected:Z}))),renderSpeedBump(),r.createElement(I.A,null,r.createElement(CreateNewCanvasOrListMenu,{onInsertNewCanvas:a,onInsertNewList:n}),r.createElement(w.A,null,r.createElement(v.A,{type:"outline","aria-label":tP.t("Close")},tP.t("Cancel")),r.createElement(C.A,{onClick:J,type:"primary",disabled:!p&&!g,loading:H},tP.t("Insert")))))}UnifiedFilePicker.displayName="UnifiedFilePicker";let tL=(0,tT.A)(UnifiedFilePicker,{modalName:U,renderInChildWindow:!(0,tS.A)(),isStackable:!0});var tO=a(0x151755090),tD=a(0x243d57606),tF=a(0x12c3f8cea),tU=a(0xc49900a),tB=a(0x1786eb8be),tH=a(0xf01a9d50),tW=a(0x130d89881),tV=a(0xd5e26907),tG=a(0xfbe3141b),tq=a(0x1a043bf26),tj=a(0x20d613de9),tK=a(0xe8e28706),t$=a(0x990bc6be),tY=a(0x82980ab8),tQ=a(0x20e80190e),tZ=a(0xe684f705),tJ=a(0x172d74529),tX=a.n(tJ);let t0=new d.Ay("agents"),AgentPicker=({channelId:e,onAddTab:t})=>{let a=(0,i.wA)(),n=(0,Y.d4)(p.i5),[l,o]=(0,r.useState)(void 0),[s,c]=(0,r.useState)(void 0),[d,m]=(0,r.useState)(""),u=(0,Y.d4)(tK.nn),h=(0,Y.d4)(e=>(0,tZ.nv)(e,l)),_=(0,Y.d4)(t=>(0,t$.G)(t,{channelId:e})),f=n?t0.t("Add an Agent"):"Add an Agent",b=(0,r.useCallback)(()=>{a((0,Z.O)())},[a]),g=(0,r.useMemo)(()=>_.reduce((e,t)=>(t.type===y.Xy.Agent&&t.data?.appId&&(e[t.data.appId]=!0),e),{}),[_]),A=(0,r.useMemo)(()=>{let e=u.reduce((e,t)=>(t.app_id in g||e.push(t),e),[]);if(!d)return e.sort((e,t)=>{let a=e.botUser?.real_name||e.app_id,n=t.botUser?.real_name||t.app_id;return a.localeCompare(n)});let t=new tV.Ay(d);return e.map(e=>({aiApp:e,score:t.normalizeAndScore([e.appProfile?.profile.name,e.appProfile?.legacy_app?.assistant_description].join(" "))})).filter(({score:e})=>isFinite(e)).sort((e,t)=>e.score-t.score).map(({aiApp:e})=>e)},[g,u,d]),x=(0,r.useMemo)(()=>A.map(e=>e.app_id),[A]),E=(0,r.useCallback)(e=>{let t=A[e];return r.createElement(tj.Z,{botUserId:t.bot_user_id,containerClass:ez()(tX().listItem,{[tX().selectedListItem]:s===t.app_id}),hideActionBar:!0,isFirstItem:!1,isLastItem:!1,onClick:eB.A,withBorder:!1})},[s,A]),k=(0,r.useCallback)(e=>{let t=A.find(t=>t.app_id===e.id);t&&(o(t.bot_user_id),c(t.app_id))},[A]),v=n?t0.t("Add Tab"):"Add Tab",S=n?t0.t("Search by Agent name or description"):"Search by Agent name or description",I=(0,r.useCallback)(e=>{m(e.target.value)},[]),w=(0,r.useCallback)(()=>{l&&s&&(t({botUserId:l,appId:s,label:(0,tY.wg)(h)}),a((0,Z.O)()))},[a,h,t,s,l]);return r.createElement(tQ.aF,{maxWidth:650},r.createElement(tQ.rQ,{className:tX().modalHeader},r.createElement(tQ.Rc,{title:f})),r.createElement(tQ.$m,{tabIndex:0},r.createElement(tG.A,{className:"margin_100",placeholder:S,icon:"search",onChange:I,hasResetButton:!0,autoFocus:!0,"aria-label":S}),r.createElement(tW.A,{disableHeight:!0},({width:e})=>r.createElement(tq.A,{"aria-label":n?t0.t("Agents"):"Agents",keys:x,width:e,height:300,rowRenderer:E,onItemClick:k}))),r.createElement(tQ.jl,{className:tX().modalFooter},r.createElement(tQ.ox,null,r.createElement(tQ.s_,{type:"outline","aria-label":t0.t("Cancel"),onClick:b},t0.t("Cancel")),r.createElement(C.A,{type:"primary",onClick:w,disabled:!l,"aria-label":v},v))))};AgentPicker.displayName="AgentPicker";let t1=(0,tT.A)(AgentPicker,{renderInChildWindow:!(0,tS.A)()});(0,tT.A)(AgentPicker,{renderInChildWindow:!(0,tS.A)(),isStackable:!0});var t2=a(0x7bfcb519),t4=a(0x1a02c72b5),t5=a(0xd6a16321),t3=a(0x1ab61ed0d);function useCreateAgentTab(e,t){let a=(0,i.wA)(),n=(0,Y.d4)(p.i5);return(0,r.useCallback)(()=>{if(!n)return;let onAddTab=async({botUserId:n,appId:r,label:i})=>{let l=await a((0,t3.Z)({channelId:e,type:t2.Xy.Agent,data:{botUserId:n,appId:r},label:i}));if(t?.preventNavigation)return;let o=(l.tabz||l.tabz||[]).find(e=>e.type===t2.Xy.Agent&&e.data?.app_id===r);if(o?.id)return a((0,t4.o)((0,t5.id)(e,{tabId:o.id})))};a(t1({channelId:e,onAddTab}))},[n,a,e,t?.preventNavigation])}var t6=a(0x1bfd1c416),t8=a(0x30d0b075),t7=a(0xf5bbd10a),t9=a(0x1af2bed61),ae=a(0x1cdfe2b),at=a(0x41a56f6d);function useInsertNewCanvasTab(e,t){let a=(0,t7.A)(),n=(0,i.wA)(),l=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"canvas_tab_optimistic_creation"));return(0,r.useCallback)(async()=>{try{if(l)n((0,t9.h)({channelId:e,preventNavigation:t?.preventNavigation}));else{let a=new Promise((e,t)=>{n((0,ae.A)({onCreate:e,source:at.P.BOOKMARKS_BAR_CREATE})).catch(t)}),r=await a,i=await n((0,ep.PF)({fileId:r?.fileId}));if(!i?.permalink)return;n((0,ed.Z)({channelId:e,fileId:i.id,isNewFile:!0,preventNavigation:t?.preventNavigation}))}}catch(e){a.error(Error(`Error inserting a new canvas from channel tab, error: ${(0,t8.Zf)(e)}`))}},[e,n,l,a,t])}var aa=a(0xf3719a28),an=a(0x217553e42);function useCreateCanvasTab(e,t){let a=(0,i.wA)(),n=(0,Y.d4)(t=>(0,an.OL)(t,e,!1)),l=(0,eP.i)(e,!0),o=!!l&&l.some(e=>e.isDisabled&&e.id===y.fY.ChannelCanvas),{fileId:s}=(0,aa.H)(n),c=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"channel_tabs_preload_files")),d=useInsertNewCanvasTab(e,t),m=O.ej.CHANNEL_TAB_CANVAS,u={filters:{fileType:[F.$Z.QUIP],excludedFileType:[F.$Z.CANVAS_TEMPLATE]}},p=(0,r.useRef)(!1);return(0,x.A)(()=>c?(a((0,ek.X)({browserInstanceId:m,entityType:O.ri.QUIP_FILES,options:u})),()=>{p.current||a((0,tN.p)({browserInstanceId:m}))}):()=>{},[]),(0,r.useCallback)(()=>{let insertCanvas=async(n,r)=>{a((0,ed.Z)({channelId:e,fileId:n,isNewFile:r,preventNavigation:t?.preventNavigation}))};p.current=!0;let n=[];!o&&s&&n.push(s),l.forEach(e=>{"canvas"===e.type&&e.data?.fileId&&n.push(e.data.fileId)});let r={channelId:e,omitOtherChannelCanvasRows:!0,filteredCanvasIdSet:n.length?new Set(n):void 0,browserHasBeenPreFetched:c};t?.isStackable?a((0,t6.Yr)({explorerContext:r,onInsertCanvas:insertCanvas,onInsertNewCanvas:d,source:"channel-tab",customBrowserInstanceId:O.ej.CHANNEL_TAB_CANVAS})):a((0,t6.Ay)({explorerContext:r,onInsertCanvas:insertCanvas,onInsertNewCanvas:d,source:"channel-tab",customBrowserInstanceId:O.ej.CHANNEL_TAB_CANVAS}))},[o,s,e,t,a,d,l,c])}var ar=a(0xa178a8f4),ai=a(0xf30afc61),al=a(0x95a18a22),ao=a(0xa076e611),as=a(0x1ed2fb210),ac=a(0x11e302e7a);function useInsertNewListTab(e,t){let a=(0,i.wA)(),n=(0,Y.d4)(t=>(0,an.OL)(t,e,!1)),l=(0,as.$)(n);return(0,r.useCallback)(async()=>{let n=l?e:void 0,r=await a((0,ac.D)({templateId:ao.K.Blank,reason:"create-list-from-channel-tabs",todoMode:!0,contextChannelId:n}));return t?.preventNavigation?a((0,t3.Z)({channelId:e,type:t2.Xy.List,data:{fileId:r?.id}})):a((0,al.P)({channelId:e,type:y.qu.List,fileId:r?.id}))},[e,a,l,t?.preventNavigation])}function useCreateListTab(e,t){let a=(0,i.wA)(),n=useInsertNewListTab(e,t);return(0,r.useCallback)(()=>{let onInsertList=async({fileId:n,listViewId:r,listViewName:i})=>{a((0,ed.Z)({channelId:e,fileId:n,listViewId:r,listViewName:i,preventNavigation:t?.preventNavigation}))};t?.isStackable?a((0,ai.wZ)({source:"channel-tab",onInsertList,onInsertNewList:n,channelId:e,explorerContext:{excludeTemplatesInSearchResult:!0}})):a((0,ai.Ay)({source:"channel-tab",onInsertList,onInsertNewList:n,channelId:e,explorerContext:{excludeTemplatesInSearchResult:!0}}))},[t?.isStackable,t?.preventNavigation,a,e,n])}var ad=a(0x2888df66),am=a(0x1aa98de78),au=a(0x238b287cf),ap=a(0x5738b4bc),ah=a(0x10079cc7),a_=a(0x147fb8c90),af=a(0x162ff0093),ab=a(0x46dbff89),ag=a(0x1cec50b3c),ay=a(0x13622df41),aA=a(0xa5b9082a),ax=a(0x3abac890),aE=a(0x22ce0af5f),aC=a.n(aE);let ak=new d.Ay("tabbed-channel");function filterTemplateItems(e){return e.filter(({enabled:e=!0})=>e)}let av=["PROJECT_SOLUTION","BUGS_SOLUTION","HELP_SOLUTION"];function AddTabMenu({channelId:e,isManageTabsMenu:t=!1,...a}){let n=(0,i.wA)(),d=(0,au.A)(),x=(0,Y.d4)(g.U6),E=(0,Y.d4)(p.i5),C=(0,Y.d4)(ay.r),k=(0,Y.d4)(e=>(0,a_.G2)(e,"canvas_standalone__create")),v=(0,Y.d4)(aA.yv),S=(0,Y.d4)(t=>(0,an.OL)(t,e)),I=(0,Y.d4)(e=>!!S&&(0,b.C)(e,S)),w=(0,Y.d4)(e=>(0,tB.qD)(e,S)),T=I&&!(0,l.A)(v),N=!(0,g.ml)(S,y.Xy.Canvas)&&!(0,g.ml)(S,y.Xy.List),M=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_file_picker")),R=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"tab_3p_files_fe_allow_add")),P=M&&R,L=(0,Y.d4)(e=>"on"===(0,Q._Z)(e,"channel_tabs_polish")),O=(0,eP.i)(e),D=O.find(e=>e.id===y.fY.Workflows),F=O.filter(e=>e.type===y.Xy.Canvas).length,U=useCreateListTab(e,{preventNavigation:t,isStackable:t}),B=(0,ad.Y)(e),H=useCreateCanvasTab(e,{preventNavigation:t,isStackable:t}),W=(0,r.useCallback)(()=>{n((0,t9.h)({channelId:e}))},[e,n]),V=(0,am.n)(e,t),G=useCreateAgentTab(e,{preventNavigation:t,isStackable:t}),q=(0,ar.S)({channelId:e,isStackable:t,navigateToNewFolder:!t}),j=(0,r.useCallback)(()=>{q()},[q]),z=useInsertNewCanvasTab(e,{preventNavigation:t}),Z=useInsertNewListTab(e,{preventNavigation:t}),J=(0,r.useCallback)(()=>n((0,tO.A)()),[n]),X=(0,r.useCallback)(e=>{let t={canvas:ah.zG.Canvas,list:ah.zG.List,workflow:ah.zG.WorkflowBuilder};n((0,ag.r)({promoType:ah.ZO.PaidFeatureTrial,promoSubtype:t[e],entryPoint:tU.T[e]}))},[n]),ee=(0,Y.d4)(t=>(0,ap.E)(t,e)),et=(0,Y.d4)($.F),ea=(0,Y.d4)(K.Il);(0,s.A)(()=>{I&&(0,l.A)(v)&&n((0,ax.QK)())});let en=(0,r.useCallback)(()=>{n((0,af.A)({id:e,defaultTab:_.n.Tabs}))},[e,n]),er=(0,r.useCallback)(()=>{n(tL({channelId:e,onInsertNewCanvas:z,onInsertNewList:Z}))},[n,e,z,Z]),ei=(0,r.useCallback)((t,a)=>()=>{n((0,f.y)({channelId:e,selectedTemplateId:a,entryPoint:t}))},[e,n]),el=(0,r.useCallback)(t=>({eventId:eD.EventId.CHANNEL_TABS_TAB_ADDED,elementType:eD.ElementType.MENU_ITEM,elementName:t,channelId:e,onClick:{enableClogAction:!0}}),[e]),eo=(0,r.useCallback)(()=>{d.track(eD.EventId.CHANNEL_TABS_BOOKMARK_ADDED,{contexts:{tab_type:y.Xy.Bookmarks,channel_id:e,ui_context:{ui_page:eD.UiPage.CHANNEL_TABS_BOOKMARKS}}})},[e,d]),es=(0,r.useCallback)((a,i=ak.t("Add a bookmark"))=>{n((0,ab.q)({element:r.createElement(h.A,{channelId:e,modalHeaderTitle:i,onSave:eo,showSetFolder:!0,navigateToNewFolder:!0}),isStackable:t}))},[e,eo,n,t]),ec=(0,r.useMemo)(()=>{if(!x)return[];let e=[];return C?filterTemplateItems((0,o.A)([{label:ak.t("Canvas"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"canvas-content",size:"20"})),description:t?ak.t("Write and organize content"):void 0,click:W,enabled:0===F,autoClogProps:el("add_canvas_tab_item")},{label:ak.t("Salesforce list"),key:"salesforce-list-item",icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{...(0,tH.C)("ListView"),size:"20"})),click:B,enabled:w,autoClogProps:el("add_salesforce_list_tab_item")},{label:ak.t("Link"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"link",size:"20"})),click:es,autoClogProps:el("add_link")},{label:ak.t("Folder"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"folder",size:"20"})),description:t?ak.t("Easily find your team\u2019s important files and links"):void 0,click:j,autoClogProps:el("create_a_channel_folder")},{label:ak.t("Customize tabs"),click:en,autoClogProps:el("edit_tab_item"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"settings",size:"20"}))},{type:"separator"},{type:"header",label:r.createElement("div",{className:"display_flex flex_direction_column"},r.createElement(tF.J,null),r.createElement("span",{className:aC().do_more_with_pro},ak.t("Do more with Pro")))},{label:ak.t("Canvas"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"canvas-content",size:"20"})),description:t?ak.t("Write and organize content"):void 0,click:()=>X("canvas"),enabled:F>0,autoClogProps:el("add_canvas_tab_item")},{label:ak.t("List"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"lists",size:"20"})),description:t?ak.t("Track projects or gather feedback"):void 0,click:()=>X("list"),autoClogProps:el("add_list_tab_item")},{label:ak.t("Workflow"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"bolt",size:"20"})),description:t?ak.t("Automate everyday tasks"):void 0,click:()=>X("workflow"),autoClogProps:el("create_a_workflow_item")},{label:r.createElement("div",{className:"display_flex"},r.createElement("span",{className:"padding_right_25"},ak.t("Templates"))),enabled:T,icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"tools",size:"20"})),click:ei(A.o.TabPlusAddSolutionToChannel),autoClogProps:el("use_template_tab_menu")}])):(T&&(e=[{type:"separator"}],N?(e=e.concat([{type:"header",label:r.createElement("div",{className:"display_flex flex_direction_column padding_bottom_25"},r.createElement("span",{className:aC().try_template_badge},ak.t("Try a template")))}]),av.forEach(t=>{let a=v[t];if(a){let n=A.o.TabPlusProject;"BUGS_SOLUTION"===t&&(n=A.o.TabPlusBugs),"HELP_SOLUTION"===t&&(n=A.o.TabPlusHelp),e.push({label:a.name,click:ei(n,a.id),autoClogProps:el(n)})}}),e=e.concat([{label:ak.t("Explore more templates"),enabled:T,click:ei(A.o.TabPlusMoreSolutions),autoClogProps:el(A.o.TabPlusMoreSolutions)}])):e=e.concat([{label:ak.t("Add template to channel"),click:ei(A.o.TabPlusAddSolutionToChannel),autoClogProps:el(A.o.TabPlusAddSolutionToChannel),badgeVariant:"inverted"}])),filterTemplateItems((0,o.A)([{label:ak.t("Canvas"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"canvas-content",size:"20"})),description:t?ak.t("Write and organize content"):void 0,click:H,enabled:et&&k&&!C&&!P,autoClogProps:el("add_canvas_tab_item")},{label:r.createElement("span",{className:aC().add_tab_menu_cta},ak.t("Canvas"),r.createElement(tD.a,{featurePlan:"std"})),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"canvas-content",size:"20"})),description:t?ak.t("Write and organize content"):void 0,click:J,enabled:C,autoClogProps:el("add_canvas_tab_item")},{label:ak.t("List"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"lists",size:"20"})),description:t?ak.t("Track projects or gather feedback"):void 0,click:U,enabled:ea&&!C&&!P,autoClogProps:el("add_list_tab_item")},{label:ak.t("File"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"files",size:"20"})),enabled:P,autoClogProps:el("add_file_tab_item"),click:er},{label:r.createElement("span",{className:aC().add_tab_menu_cta},ak.t("List"),r.createElement(tD.a,{featurePlan:"std"})),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"lists",size:"20"})),description:t?ak.t("Track projects or gather feedback"):void 0,click:J,enabled:C,autoClogProps:el("add_list_tab_item")},{label:ak.t("Salesforce list"),key:"salesforce-list-item",icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{...(0,tH.C)("ListView"),size:"20"})),click:B,enabled:w,autoClogProps:el("add_salesforce_list_tab_item")},{label:ak.t("Link"),click:e=>es(e,ak.t("Add a link")),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"link",size:"20"})),autoClogProps:el("add_link"),enabled:L},{label:ak.t("Workflow"),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"bolt",size:"20"})),description:t?ak.t("Automate everyday tasks"):void 0,click:V,autoClogProps:el("create_a_workflow_item"),enabled:ee&&!D&&!C},{label:r.createElement("span",{className:aC().add_tab_menu_cta},ak.t("Workflow"),r.createElement(tD.a,{featurePlan:"std"})),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"bolt",size:"20"})),description:t?ak.t("Automate everyday tasks"):void 0,click:J,enabled:C,autoClogProps:el("create_a_workflow_item")},{label:r.createElement("div",{className:"display_flex"},ak.t("Folder")),click:j,icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"folder",size:"20"})),description:t?ak.t("Easily find your team\u2019s important files and links"):void 0,autoClogProps:el("create_a_channel_folder")},{label:ak.t("Link"),click:e=>es(e,ak.t("Add a link")),icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"link",size:"20"})),autoClogProps:el("add_link"),enabled:!L},{label:ak.t("Agent"),click:G,icon:r.createElement("div",{className:aC().add_tab_menu_list_item_icon},r.createElement(u.Ah,{name:"bot",size:"20"})),enabled:E,autoClogProps:el("add_an_agent")},...e,{type:"separator",enabled:!t},{label:ak.t("Edit tabs"),click:en,autoClogProps:el("edit_tab_item"),enabled:!t}])))},[x,C,T,H,et,k,el,J,U,ea,B,w,V,ee,D,j,G,E,en,W,F,es,ei,X,N,v,t,P,er,L]);return r.createElement(c.A,null,r.createElement(m.a,{...a,template:ec,width:t?360:void 0}))}AddTabMenu.displayName="AddTabMenu"},0xaf13bc6a:(e,t,a)=>{"use strict";a.d(t,{V:()=>ChannelTabAddedMessageAvatar});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee);let ChannelTabAddedMessageAvatar=({size:e})=>n.createElement("span",{className:i()("p-huddle_msg_avatar",{"p-huddle_msg_avatar--small":16===e})},n.createElement(l.Ah,{name:"folder",size:"20"}));ChannelTabAddedMessageAvatar.displayName="ChannelTabAddedMessageAvatar"},0xa0337198:(e,t,a)=>{"use strict";a.d(t,{A:()=>ChannelTabAddedMessage});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0xa41e4e91),c=a(0x11ed04fa0),d=a(0x990bc6be),m=a(0x21f8b9118),u=a(0x2378cf6ec),p=a(0x226892387),h=a(0x233157fdc);let _=new o.Ay("message"),ChannelTabAddedMessage=e=>{let t,a=(0,r.wA)(),i="msg"in e,o=(i?e.msg.tab_id:e.unfurl.channel_folder_tab_id)??"",f=(i?e.msg.channel:e.unfurl.channel_id)??"",b=(i?e.msg.tab_added_user_id:e.unfurl.channel_folder_user_id)??"",g=(0,p.d4)(e=>(0,u.I)(e,b)),y=(0,p.d4)(e=>(0,d.G)(e,{channelId:f})),A=(0,n.useMemo)(()=>(0,c.Fi)(y,o),[y,o]),x=A?.data?.folderBookmarkId,E=(0,p.d4)(e=>x?(0,h.Um)(e,{channelId:f,folderBookmarkId:x}):void 0),C=E?.title,k=(0,n.useCallback)(()=>{i&&a((0,m.F)({folderId:x??"",channelId:f}))},[f,a,x,i]),v=!!o&&!A;if(C)t=n.createElement(s.T,{folderName:C,onClick:k});else if(v){let e=_.t("Deleted folder");t=n.createElement(s.T,{folderName:e,isDeleted:!0})}else t=n.createElement(s.T,{folderName:A?.label??"",isDeleted:!0});return n.createElement("div",{className:l()("c-message__body","c-message__body--automated")},_.rt("{userName} added the folder {folderLink}",{userName:g,folderLink:t}))};ChannelTabAddedMessage.displayName="ChannelTabAddedMessage"},0xa455f85d:(e,t,a)=>{"use strict";a.d(t,{u:()=>el});var n=a(0xbad225b5),r=a(0x10027d8bc),i=a(0x120c268ad),l=a.n(i),o=a(0xbe5e39b6),s=a(0x1d01572a2),c=a(0x20482ad21),d=a(0x2501a2cee),m=a(0x4c96e5d9),u=a(0x1fdec3e16),p=a(0x88d7fe76),h=a(0x408bdeff),_=a(0x16cf1da63),f=a(0x1c659cbb1),b=a(0x5cda1a03),g=a(0x3271b95e),y=a(0x226892387),A=a(0x19c76d181),x=a(0x14ea3ce99),E=a(0x253dbb177),C=a(0x152efebe6),k=a(0xde62a275),v=a.n(k);let AnimatedEditorAvatar=({fileId:e,size:t=18})=>{let[a,r]=(0,n.useState)(!1),i=(0,_.wA)(),l=(0,n.useRef)(!1),o=(0,y.d4)(t=>(0,x.Lp)(t,e??"")),s=(0,b.A)(e)?.getTime(),c=(0,g.A)(e),d=o.editors?.[0]??c,m=(0,y.d4)(A.WR),u=(0,n.useCallback)(()=>{s&&(r(!0),i((0,E.Kt)({fileId:e,timestamp:s??Date.now()}))),setTimeout(()=>r(!1),3400)},[s,i,e]),p=(0,y.d4)(t=>(0,C.Im)(t,{fileId:e})||0);return((0,n.useEffect)(()=>{s&&(l.current?l.current&&o.show_badge&&s&&s>p&&u():(l.current=!0,o.show_badge&&s>p&&setTimeout(()=>{u()},2e3)))},[o.show_badge,u,s,p]),a&&d&&d!==m)?n.createElement("div",{className:v().avatar_toast},n.createElement(f.Ay,{userId:d,size:t,isInteractive:!1})):null};AnimatedEditorAvatar.displayName="AnimatedEditorAvatar";var S=a(0xfd00162b),I=a(0x1789e94fa),w=a(0x48253604),T=a(0x1c760ba43),N=a(0x3711e82d),M=a(0x5b1935a6);let R={spaceName:M.xu.RECORD_CHANNEL_DETAILS_TAB_HEADER,notifications:{[M.ze.RECORD_CHANNELS_DETAILS_TAB_BANNER]:{component:n.lazy(()=>Promise.resolve().then(a.bind(a,0x15c06cbce)).then(e=>({default:e.RecordChannelNewBadge})))}}},P={spaceName:M.xu.RECORD_CHANNEL_SUMMARY_TAB_HEADER,notifications:{[M.ze.RECORD_CHANNELS_SUMMARY_TAB_BANNER]:{component:n.lazy(()=>Promise.resolve().then(a.bind(a,0x15c06cbce)).then(e=>({default:e.RecordChannelNewBadge})))}}},L={spaceName:M.xu.RECORD_CHANNEL_RELATED_RECORD_LIST_TAB_HEADER,notifications:{[M.ze.RECORD_CHANNELS_RELATED_RECORD_LIST_TAB_BANNER]:{component:n.lazy(()=>Promise.resolve().then(a.bind(a,0x15c06cbce)).then(e=>({default:e.RecordChannelNewBadge})))}}},O={[T.fY.RecordOverview]:{uiComponentName:N.UiComponentName.SALESFORCE_RECORD_DETAILS_TAB_NEW_BADGE},[T.fY.RecordSummary]:{uiComponentName:N.UiComponentName.SALESFORCE_RECORD_SUMMARY_TAB_NEW_BADGE},[T.fY.RecordRelatedConversations]:{uiComponentName:N.UiComponentName.SALESFORCE_RECORD_RELATED_CONVERSATIONS_TAB_NEW_BADGE},[T.fY.RecordRelatedList]:{uiComponentName:N.UiComponentName.SALESFORCE_RECORD_RELATED_RECORD_LIST_TAB_NEW_BADGE}},RecordChannelNewBadgeWrapper=({tabId:e,isFirstRelatedListTab:t})=>e===T.fY.RecordOverview?n.createElement(I.A,{spaceName:R.spaceName,notifications:R.notifications,autoClogProps:O[e]}):e===T.fY.RecordSummary?n.createElement(I.A,{spaceName:P.spaceName,notifications:P.notifications,autoClogProps:O[e]}):e===T.fY.RecordRelatedConversations?n.createElement(I.A,{spaceName:w.q.spaceName,notifications:w.q.notifications,autoClogProps:O[e]}):e===T.fY.RecordRelatedList&&t?n.createElement(I.A,{spaceName:L.spaceName,notifications:L.notifications,autoClogProps:O[e]}):null;RecordChannelNewBadgeWrapper.displayName="RecordChannelNewBadgeWrapper";var D=a(0x11ed04fa0),F=a(0x238b287cf),U=a(0x14149c126),B=a(0x18431be77),H=a.n(B);let W=new c.Ay("tabbed-channel");function StyledChannelTabLabel({tab:e,iconProps:t,label:a,renderPeek:r,hasBadge:i,isSelected:c,fileId:_,className:f,labelClassName:b,peekIdPrefix:g,preventTooltip:A=!1,hideRichTextEmojiTooltips:x=!1,isFirstRelatedListTab:E,isManageChannelTabsMenu:C=!1,isRecordPrimaryView:k=!1}){let v=(0,n.useRef)(null),[I,w]=(0,n.useState)(!1),M=(0,y.d4)(t=>(0,S.V)(t,{fileId:_,tabId:e.id})),R=(0,y.d4)(e=>"on"===(0,U._Z)(e,"channel_tabs_peek_open_clog")),P=(0,y.d4)(e=>"treatment"===(0,U._Z)(e,"tab_3p_files")),[L,O]=(0,n.useState)(-1),B=(0,F.A)();(0,s.A)(()=>{w(!!v.current?.parentElement?.classList.contains("c-menu_item__label"))});let V=(0,n.useCallback)(()=>{O(Date.now())},[]),G=(0,n.useCallback)(()=>{if(_&&L>-1){let e=Date.now()-L;B.track(N.EventId.CHANNEL_TABS_PEEK,{file_id:_,duration_ms:e})}},[L,B,_]),q=t?n.createElement("span",{className:H().channel_tab_label_icon},n.createElement(d.Ah,{...t,inline:!0})):null,j=_&&(e.id!==T.fY.ChannelCanvas||M);if(e.id!==T.fY.ChannelCanvas){let t=e.type===T.Xy.ExternalFiles;j=j&&(t||!e.label?.length)}let z=_&&!e.isDisabled&&(e.type===T.Xy.Canvas||e.id===T.fY.ChannelCanvas),K=e.type===T.Xy.ExternalFiles&&e.label?.length?a:void 0,$=_&&j?n.createElement("div",{className:l()(H().channel_tab_document_label,{[H().channel_tab_label_disabled]:e.isDisabled})},z&&n.createElement("div",{className:H().channel_tab_label__animated_avatar},n.createElement(AnimatedEditorAvatar,{fileId:_})),n.createElement(h.A,{id:_,shouldShowDetailText:!1,shouldShowHighlight:!1,useLeadingEmojiAsIcon:!0,className:f,useLiveTitleForChannelCanvas:M,useMissingIconIfFileUnknown:!0,hideRichTextEmojiTooltips:x,useFilledIcon:c,useMonochromeExternalFileIcon:P,iconSize:t?.size,labelOverride:K}),i&&n.createElement("div",{className:"p-channel_tab_unread_badge"})):n.createElement("div",{className:l()(H().channel_tab_label,b,{[H().channel_tab_label_disabled]:e.isDisabled})},q,z&&n.createElement("div",{className:H().channel_tab_label__animated_avatar},n.createElement(AnimatedEditorAvatar,{fileId:_})),I?n.createElement("span",{className:H().channel_tab_label_text},a):n.createElement(u.A,{lines:1},a),!C&&!k&&n.createElement(RecordChannelNewBadgeWrapper,{tabId:e.id,isFirstRelatedListTab:E}),i&&n.createElement("div",{className:"p-channel_tab_unread_badge"}));return!r||I||c||!(0,D.me)(e)?r||A||e.type!==T.Xy.ChannelCanvas?n.createElement("div",{ref:v},$):n.createElement(m.Ay,{tip:W.t("Create a canvas")},$):n.createElement("div",{ref:v},n.createElement(p.A,{offsetX:-8,offsetY:-6,position:o.yX.BottomLeft,renderContent:r,triggerDelay:300,peekId:`${g}-${e.id}`,onOpen:R?V:void 0,onClose:R?G:void 0},$))}StyledChannelTabLabel.displayName="StyledChannelTabLabel";var V=a(0x41c2cf5b),G=a(0x108a078ae),q=a(0x1fd3f6e20),j=a(0x4e1a3b33),z=a(0x15a4ffb05),K=a(0x22d51fee8),$=a(0x410829f8),Y=a(0x1067595c0),Q=a(0x221261d6a),Z=a.n(Q);let J=new c.Ay("tabbed-channel");function ThreadsTabLabel({channelId:e,isManageChannelTabsMenu:t=!1}){let a=(0,y.d4)(t=>(0,Y.aX)(t)?.[e]??0),r=(0,y.d4)(t=>(0,Y.rM)(t)?.[e]??0);return(0,y.d4)(D.BJ)?n.createElement(n.Fragment,null,n.createElement("span",{className:l()({[Z().unread]:a>0})},J.t("Threads")),!t&&r>0?n.createElement($.Gm,{count:r,style:$.rY.themed}):null):null}ThreadsTabLabel.displayName="ThreadsTabLabel";var X=a(0x3ca4e1cc),ee=a(0xbd3de346);let et=new c.Ay("tabbed-channel");function useTabLabel(e,t,a){let i=(0,y.d4)(t=>(0,D.vT)(t,e)),l=(0,y.d4)(X.BX),o=(0,y.d4)(e=>"ai_forward"===(0,U._Z)(e,"canvas_ai_channel_tab")),s=(0,y.d4)(K.c9),c=(0,y.d4)(e=>"on"===(0,U._Z)(e,"channel_links_in_files_tab")),d=(0,y.d4)(r.Dj),m=(0,y.d4)(e=>t.data?.fileId?(0,x.Lp)(e,t.data.fileId):null),u=(0,ee.sR)(m)||(0,ee.Bp)(m)||(0,ee.AL)(m)||(0,ee.Ki)(m);if((t.type===T.Xy.Canvas||t.type===T.Xy.List)&&t.label?.length)return m&&u?n.createElement(j.A,{file:m,shouldShowHighlight:!1}):n.createElement(z.A,{text:t.label,showTooltips:!1});if(m&&m.title&&(t.type===T.Xy.Canvas||t.type===T.Xy.List)&&!t.label?.length)return n.createElement(j.A,{file:m,shouldShowHighlight:!1});if(!i)return t.label;if(t.type===T.Xy.Folder&&!t.data?.folderBookmarkId&&!t.label)return et.t("Bookmarks");switch(t.id){case T.fY.Bookmarks:return et.t("Pins");case T.fY.Channel:return et.t("Messages");case T.fY.AddCanvas:return o&&s?et.t("Create canvas with AI"):et.t("Add canvas");case T.fY.Files:return c?et.t("Files & links"):et.t("Files");case T.fY.Pins:return et.t("Pins");case T.fY.RecordSummary:return et.t("Summary");case T.fY.WorkObjectOverview:return l?et.t("Record details"):"Record details";case T.fY.Workflows:return et.t("Workflows");case T.fY.Threads:return n.createElement(ThreadsTabLabel,{channelId:e,isManageChannelTabsMenu:a});case T.fY.Huddles:return et.t("Huddles");case T.fY.SlackbotAiSkills:return d?"Skills":et.t("Skills");case T.fY.SlackbotAiAutomations:return n.createElement(n.Fragment,null,et.t("Automations",{fallbackHash:"82542d6d0a0aa0c1e9afdbe2f29d3057618daec2",fallbackHashNs:"client"}),n.createElement("span",{className:"margin_left_25"},n.createElement(q.v,{isMicro:!0,style:q.u.Informative},et.t("BETA",{fallbackHash:"28d6304dd6d05d172bd2c2ad4fe98d0bebabf4de",fallbackHashNs:"workflow_builder"}))));default:return t.label||et.t("Untitled")}}useTabLabel.displayName="useTabLabel";var ea=a(0x1ec69ee01),en=a(0xf3719a28),er=a(0x217553e42),ei=a(0x1d23c7f2c);function ChannelTabLabelBaseComponent({tab:e,channelId:t,hideBadge:a=!1,className:i="",labelClassName:l="",renderPeek:o,preventTooltip:s,hideRichTextEmojiTooltips:c=!1,isFirstRelatedListTab:d,isManageChannelTabsMenu:m}){let u=(0,V.Y)()===e.id,p=useTabLabel(t,e,m),h=(0,G.S)(e,u),_=(0,y.d4)(e=>(0,er.OL)(e,t,!1)),{fileId:f}=(0,en.H)(_),b=e.data?.fileId||e.type===T.Xy.ChannelCanvas&&f,g=(0,y.d4)(e=>b?(0,x.Lp)(e,b):null),A=(0,y.d4)(e=>(0,Y.aX)(e)?.[t]??0),E=(0,y.d4)(e=>(0,Y.rM)(e)?.[t]??0),C=e.type===T.Xy.Threads&&A>0&&E<1,k=(0,y.d4)(r.Dj),v=(0,y.d4)(ei.VR),S=k&&e.type===T.Xy.SlackbotAiHistory&&v>0,I=e.type===T.Xy.Channel&&(0,ea.KJ)(_),w=!!(g?.show_badge||I||C||S)&&!u&&!a;e.type===T.Xy.AddCanvas&&h&&(h.name="add-channel-canvas"),e.id===T.fY.AddCanvas&&h&&(h.name="add-channel-canvas"),((0,ee.sR)(g)||(0,ee.Bp)(g)||(0,ee.AL)(g)||(0,ee.Ki)(g))&&h&&(h.name="eye-closed");let N=(0,n.useMemo)(()=>{let a={tab:e,label:p,hasBadge:w,iconProps:h,isSelected:u,className:i,labelClassName:l,peekIdPrefix:t,preventTooltip:s,hideRichTextEmojiTooltips:c,isFirstRelatedListTab:d,isManageChannelTabsMenu:m};return o&&(a.renderPeek=o),b&&(a.fileId=b),a},[e,p,w,h,u,i,l,t,s,o,b,c,d,m]);return n.createElement(StyledChannelTabLabel,N)}ChannelTabLabelBaseComponent.displayName="ChannelTabLabelBaseComponent";let el=n.memo(ChannelTabLabelBaseComponent)},0xa2155654:(e,t,a)=>{"use strict";a.d(t,{K:()=>k});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x99233ecb),d=a(0x2501a2cee),m=a(0x144aa29c),u=a(0x4c96e5d9),p=a(0x1f960c750),h=a(0x11ed04fa0),_=a(0x3711e82d),f=a(0x1ccef1c6f),b=a(0x226892387),g=a(0x1472af90a),y=a(0x18632f75a),A=a(0x220569946),x=a.n(A);let E=new s.Ay("tabbed-channel"),C={elementName:"add_a_tab_or_pin_button",onClick:{enableClogAction:!0}};function AddTabItemBase({channelId:e,isFocused:t},a){let i,s=(0,r.wA)(),A=(0,b.d4)(h.U6),k=(0,b.d4)(h.FI),v=(0,b.d4)(e=>!(0,f.ty)(e,"a11y_animations")),[S,I]=(0,n.useState)(!1),w=(0,n.useCallback)(()=>{I(!0),s((0,y.z)({component:g.G7.ChannelTabsAddItemClicked,type:g.X8.Click,reason:"channel-tabs-plus-clicked"}))},[s]),T=(0,n.useCallback)(()=>I(!1),[]),N=(0,n.useCallback)(t=>n.createElement(p.M,{channelId:e,...t}),[e]);i=k?n.createElement("div",null,n.createElement("div",null,E.t("Add new tab")),n.createElement("div",{className:x().toolTipSecondaryText},E.t("Drag files, canvases, and lists in here too!"))):E.t("Add new tab");let M=(0,n.useMemo)(()=>n.createElement(u.Ay,{position:"top",tip:i},n.createElement("div",{className:l()("display_flex align_items_center")},n.createElement("div",{className:l()(x().addTabIcon,{[x().addTabIconOpen]:S,[x().addTabNoAnimation]:v})},n.createElement(d.Ah,{name:"plus-filled",size:"16"})))),[i,S,v]);return A?n.createElement(o.A,{eventId:_.EventId.CHANNEL_TABS_TAB_ADDED,channelId:e},n.createElement(c.cQ,{onPopoverOpen:w,onPopoverClose:T,onTriggerClose:T,renderMenu:N,position:"bottom-left"},n.createElement(m.A,{id:"add-channel-tab",label:M,isSelected:S,isFocused:t,className:x().addTab,ref:a,autoClogProps:C,"aria-label":E.t("Add and Edit Channel Tabs"),ariaRole:"button",ariaHaspopup:!0}))):null}AddTabItemBase.displayName="AddTabItemBase";let k=n.forwardRef(AddTabItemBase)},0x23c595eb1:(e,t,a)=>{"use strict";a.r(t),a.d(t,{ChannelTabsAddCanvasCoachmark:()=>ChannelTabsAddCanvasCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63);let i=a.p+"canvas-hero-video@2x-d1a1ad8.jpg",l=a.p+"canvas-nux-1af3870.mp4";var o=a(0x20482ad21),s=a(0x13953efe6),c=a(0x23f2a501b),d=a(0x245208d6a),m=a(0xfbede66),u=a(0x20e77676b),p=a(0x3989021c),h=a(0x990bc6be),_=a(0x8b60780c),f=a(0x1c760ba43),b=a(0x3711e82d),g=a(0x226892387),y=a(0x14149c126),A=a(0xf3c65e54),x=a(0x5b1935a6),E=a(0x23f4759d),C=a.n(E);let k=new o.Ay("tabbed-channel"),v=C().channelTabsAddCanvasCoachmark;function ChannelTabsAddCanvasCoachmark({children:e,tabId:t,channelId:a}){let o=(0,g.d4)(e=>"on"===(0,y._Z)(e,"canvas_new_user_experience")),E=(0,g.d4)(e=>(0,h.G)(e,{channelId:a})),C=E?.some(e=>e.id===f.fY.ChannelCanvas),S=E?.find(e=>e.type===f.Xy.Canvas),I={elementName:"add_canvas_tab_coachmark",uiComponent:b.UiComponentName.CANVAS_ADD_CANVAS,elementType:b.ElementType.COACHMARK,eventId:b.EventId.CANVAS_CREATE_NEW},w=(0,r.wA)();(0,n.useEffect)(()=>{w((0,A.A)({notificationName:x.ze.CANVAS_ADD_CANVAS_COACHMARK,action:x.hw.IMPRESSION}))},[w]);let{onAfterOpen:T}=(0,m.j)({className:v,backgroundClassName:"p-decorate_general_random_coachmark__overlay"}),{isOpen:N,closeCoachmark:M,renderCoachmark:R}=(0,p.A)(x.ze.CANVAS_ADD_CANVAS_COACHMARK,x.xu.IN_PRODUCT_COACHMARK),{clogDismissFromOverlay:P}=(0,d.V)(v,I),L=(0,n.useCallback)(e=>{P(e),M()},[P,M]),O=(0,n.useCallback)(()=>{w((0,_.D)({tabId:t,channelId:a})),L()},[w,t,a,L]),D=o?k.t("Get everyone on the same page. Literally."):null,F=R({autoClogProps:I,className:v,title:D,bodyText:o?k.rt("With canvases, your team can stay up to date on need-to-know info like team resources, meeting notes, and more. <a>Learn more about canvases</a>",null,({key:e,text:t})=>n.createElement(u.A,{key:e,articleId:0xc280952},t)):null,closeCoachmark:L,arrowPosition:10,onAfterOpen:T,isModal:!0,primaryCallToActionText:o?k.t("Check It Out"):null,onClickPrimaryButton:O,hero:n.createElement(c.A,{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:i},n.createElement("source",{type:"video/mp4",src:l}))}),U=C&&t===f.fY.ChannelCanvas,B=!C&&t===S?.id;return N&&o&&(U||B)?n.createElement(s.Ay,{coachmarkElement:F,orientation:"bottom-right"},e):n.createElement(n.Fragment,null,e)}ChannelTabsAddCanvasCoachmark.displayName="ChannelTabsAddCanvasCoachmark"},0x1154308dd:(e,t,a)=>{"use strict";a.r(t),a.d(t,{ChannelTabsNewFilesTabCoachmark:()=>ChannelTabsNewFilesTabCoachmark});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb90de824),l=a(0x13953efe6),o=a(0x22024135f),s=a(0x11ed04fa0),c=a(0x226892387);let d=new r.Ay("tabbed-channel");function ChannelTabsNewFilesTabCoachmark({children:e,channelScopedId:t,tabId:a}){let r=(0,c.d4)(s.wz),{shouldShowNewFilesTabCoachmark:m,dismissNewFilesTabCoachmark:u}=(0,o.C)(t),p=m(a),h=(0,n.useCallback)(()=>{u()},[u]),_=(0,n.useMemo)(()=>n.createElement(i.Ay,{arrowPosition:95,offsetX:30,isOpen:p,title:r?d.t("Find files and images your team has shared"):"",bodyText:r?d.t("See all the docs, photos and videos that have been shared or added to this channel."):"",closeCoachmark:h}),[r,h,p]);return r?n.createElement(l.Ay,{coachmarkElement:_,orientation:"bottom-left"},e):n.createElement(n.Fragment,null,e)}ChannelTabsNewFilesTabCoachmark.displayName="ChannelTabsNewFilesTabCoachmark"},0xa59d05f0:(e,t,a)=>{"use strict";a.r(t),a.d(t,{ChannelTabsNewPinsTabCoachmark:()=>ChannelTabsNewPinsTabCoachmark});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb90de824),l=a(0x13953efe6),o=a(0x22024135f),s=a(0x11ed04fa0),c=a(0x226892387);let d=new r.Ay("tabbed-channel");function ChannelTabsNewPinsTabCoachmark({children:e,channelScopedId:t,tabId:a}){let r=(0,c.d4)(s.wz),{shouldShowNewPinsTabCoachmark:m,dismissNewPinsTabCoachmark:u}=(0,o.C)(t),p=m(a),h=(0,n.useCallback)(()=>{u()},[u]),_=(0,n.useMemo)(()=>n.createElement(i.Ay,{arrowPosition:95,offsetX:30,isOpen:p,title:r?d.t("Keep tabs on your important messages"):"",bodyText:r?d.t("Pin messages your team likes to have on hand \u2014 helpful or humorous."):"",closeCoachmark:h}),[r,h,p]);return r?n.createElement(l.Ay,{coachmarkElement:_,orientation:"bottom-left"},e):n.createElement(n.Fragment,null,e)}ChannelTabsNewPinsTabCoachmark.displayName="ChannelTabsNewPinsTabCoachmark"},0x243942c20:(e,t,a)=>{"use strict";a.d(t,{d:()=>E,t:()=>C});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x99233ecb),d=a(0x2501a2cee),m=a(0x144aa29c),u=a(0x4c96e5d9),p=a(0x3711e82d),h=a(0x1ccef1c6f),_=a(0x226892387),f=a(0x1472af90a),b=a(0x18632f75a),g=a(0x220569946),y=a.n(g);let A=new s.Ay("tabbed-channel"),x={elementName:"add_a_tab_or_pin_button",onClick:{enableClogAction:!0}},E={MENU:"menu",MODAL:"modal"};function AddTabItemBase({isFocused:e,customAddTabProps:t},a){let i=(0,r.wA)(),[s,g]=(0,n.useState)(!1),C=(0,n.useCallback)(()=>{g(!0),i((0,b.z)({component:f.G7.ChannelTabsAddItemClicked,type:f.X8.Click,reason:"channel-tabs-plus-clicked"}))},[i]),k=(0,n.useCallback)(()=>g(!1),[]),v=(0,_.d4)(e=>!(0,h.ty)(e,"a11y_animations")),{tooltipText:S,isAddTabDisabled:I,addTabType:w,onMenuClickHandler:T,onModalClickHandler:N,renderCoachmark:M,"aria-label":R,className:P}=t,L=A.t("Add new tab"),O=S||L,D=(0,n.useMemo)(()=>n.createElement(u.Ay,{position:"top",tip:O},n.createElement("div",{className:l()("display_flex align_items_center")},n.createElement("div",{className:l()(y().addTabIcon,{[y().addTabIconOpen]:s,[y().addTabNoAnimation]:v})},n.createElement(d.Ah,{name:"plus-filled",size:"16"})))),[O,v,s]),F=R??A.t("Add and Edit Channel Tabs"),U=(0,n.useMemo)(()=>{let t=N?()=>N():void 0,r=N&&w===E.MODAL?t:void 0;return n.createElement("div",{className:l()(y().addTab,P)},n.createElement(m.A,{id:"add-channel-tab",label:D,isSelected:s,isFocused:e,ref:a,autoClogProps:x,"aria-label":F,ariaRole:"button",ariaHaspopup:!0,onClick:r,isDisabled:I}))},[w,D,s,e,a,F,I,N,P]),B=(0,n.useMemo)(()=>M?M(U):U,[M,U]);return n.createElement(o.A,{eventId:p.EventId.CHANNEL_TABS_TAB_ADDED},w===E.MENU&&T?n.createElement(c.cQ,{onPopoverOpen:C,onPopoverClose:k,onTriggerClose:k,renderMenu:T,position:"bottom-left",isDisabled:I,dangerouslyQuietNonFocusableElementWarning:!0},B):B)}AddTabItemBase.displayName="AddTabItemBase";let C=n.forwardRef(AddTabItemBase)},0x18561444f:(e,t,a)=>{"use strict";a.d(t,{F:()=>DraggableDroppableTabs});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1aa941557),s=a(0x1407c6c2c),c=a(0x20482ad21),d=a(0x1b916e0d8),m=a(0x5ed1effc),u=a(0x1789e94fa),p=a(0xa48bc2a6),h=a(0x89261c05),_=a(0x1a541bd25),f=a(0x22d51fee8),b=a(0xa2155654),g=a(0x243942c20),y=a(0x854f5389),A=a(0x21a39e2e1),x=a(0x144aa29c),E=a(0xd8ecde5d),C=a(0x1d76c51f9),k=a(0x118e9b326),v=a(0xfbbace2d),S=a.n(v);let I=n.forwardRef(({className:e,draggingClassName:t,index:a,isFocused:r,isHidden:i,isSelected:o,observer:s,onClick:c,tab:d,tabsId:m,onDrop:u,onAttachmentDrop:p,onFolderDrop:h,setIsDragging:_,isLastVisibleTab:f,isFolderTab:b,folderBookmarkId:g,children:v},I)=>{let{id:w,renderWrapper:T=y.A,content:N,isDragDisabled:M,...R}=d,P=l()({[S().draggable_tab]:!0,[S().draggable_tab_hidden]:i});return n.createElement(C.l,{className:P,observer:s,tabsId:m,isHidden:i},M&&n.createElement(n.Fragment,null,T(n.createElement(x.A,{...R,id:w,ref:(0,A.A)(I),isFocused:r,isSelected:o,onClick:c,className:l()(d.className,!1,e)}),i),v&&n.createElement("div",{className:S().draggable_tabs_children},v)),!M&&n.createElement(n.Fragment,null,n.createElement(E.x,{className:P,id:w,index:a,onDrop:u,onAttachmentDrop:p,onFolderDrop:h,setIsDragging:_,type:k.M.TAB,label:R.label,isLastVisibleTab:f,isFolderTab:b,folderBookmarkId:g},T(n.createElement(x.A,{...R,id:w,ref:(0,A.A)(I),isFocused:r,isSelected:o,onClick:c,className:l()(d.className,!1,e)}),i)),v&&n.createElement("div",{className:S().draggable_tabs_children},v)))});var w=a(0x1f02fc584),T=a(0x22ba45688),N=a(0xd6ba6894),M=a(0x2501a2cee),R=a(0x1fdec3e16),P=a(0x4e1a3b33),L=a(0xbd3de346),O=a(0x226892387),D=a(0x14ea3ce99);let F={position:"fixed",pointerEvents:"none",left:0,top:0,zIndex:2500};function getItemStyles(e,t){if(null==e||null==t)return{display:"none"};let{x:a,y:n}=t,r=`translate(${a}px, ${n}px)`;return{transform:r,WebkitTransform:r}}function DraggingTabPreviewLayer({draggingClassName:e}){let t,{isDragging:a,item:r,itemType:i,initialOffset:o,currentOffset:s}=(0,w.V)(e=>({item:e.getItem(),itemType:e.getItemType(),initialOffset:e.getInitialClientOffset(),currentOffset:e.getClientOffset(),isDragging:e.isDragging()})),c=i===k.M.MESSAGE_FILE_ATTACHMENT,d=i===k.M.MESSAGE_LINK,m=c?r:null,u=d?r:null,p=(0,O.d4)(e=>m?(0,D.Lp)(e,m.fileId):null),h=i===k.M.FOLDER_FILE_BOOKMARK,_=i===k.M.FOLDER_LINK_BOOKMARK;if(!a||!r||h||_)return null;if(d&&u){let a=n.createElement(M.Ah,{name:"link",size:"16",inline:!0}),r=n.createElement(R.A,{lines:1},u.linkText),i=n.createElement("span",{className:S().message_file_attachment_label},a," ",r);t=n.createElement(x.A,{id:u.url,label:i,className:l()(S().channel_tab_dragging,S().draggable_tab,S().link_label,e)})}else if(c&&m){let a=p&&(0,L.l7)(p),i=n.createElement(M.Ah,{name:a?"lists":"canvas-content",size:"16",inline:!0});r.productIcon&&(i=n.createElement("img",{src:r.productIcon.image_url,alt:r.productIcon.alt_text,className:S().productIconImg}));let o=n.createElement("span",{className:S().message_file_attachment_label},i," ",p&&n.createElement(P.A,{file:p}));t=n.createElement(x.A,{id:m.fileId,label:o,className:l()(S().channel_tab_dragging,S().draggable_tab,e)})}else t=n.createElement(x.A,{id:r.id,label:r.label,className:l()(S().channel_tab_dragging,S().draggable_tab,e)});return(0,T.createPortal)(n.createElement("div",{style:F},n.createElement("div",{style:getItemStyles(o,s)},t)),N.J.document.body)}DraggingTabPreviewLayer.displayName="DraggingTabPreviewLayer";var U=a(0x9e38a344),B=a(0x543a781e),H=a(0x40c0d834),W=a(0x99233ecb),V=a(0x3711e82d),G=a(0x132d4c7bf),q=a.n(G);let j={onClick:{enableClogAction:!0}},z=(0,n.forwardRef)(({renderMenu:e,position:t,label:a,id:r,isSelected:i,isFocused:o,isOverOverflowMenu:s,onDrop:c,onAttachmentDrop:d,tabsCount:m=0},u)=>{let[{isOver:p,isDragging:h,canDrop:_},f]=(0,U.H)({accept:[k.M.TAB,k.M.OVERFLOW_MENU,k.M.MESSAGE_FILE_ATTACHMENT,k.M.MESSAGE_LINK,k.M.FOLDER_FILE_BOOKMARK,k.M.FOLDER_LINK_BOOKMARK],drop(e){(e.type===k.M.MESSAGE_FILE_ATTACHMENT||e.type===k.M.FOLDER_FILE_BOOKMARK)&&"fileId"in e?d?.(e.fileId,m,"bookmark"in e?e.bookmark:void 0):e.type!==k.M.MESSAGE_FILE_ATTACHMENT&&"index"in e&&c?.(e.index,m-1)},collect:e=>({isOver:e.isOver(),isDragging:null!==e.getItem(),canDrop:e.canDrop()}),canDrop:e=>(e.type!==k.M.MESSAGE_FILE_ATTACHMENT&&e.type!==k.M.FOLDER_FILE_BOOKMARK||!("isExternalFile"in e)||!e.isExternalFile)&&e.type!==k.M.MESSAGE_LINK&&e.type!==k.M.FOLDER_LINK_BOOKMARK}),b=(0,n.useMemo)(()=>n.createElement("span",{className:q().overflow_label},a,n.createElement(M.Ah,{name:"caret-down"})),[a]),g=l()("c-tabs__tab_overflow",q().draggable_overflow_menu,{[q().draggable_overflow_menu_hovered]:p&&_}),y=(0,B.A)(p||s,500);return n.createElement(H.A,{eventId:V.EventId.CHANNEL_TABS_MORE_CLICKED},n.createElement(W.cQ,{renderMenu:e,position:t||"bottom-left",isOverlayInteractive:!h,isContentInteractive:h,shouldCloseOnOverlayMouseDown:!0,isOpen:y,dangerouslyQuietNonFocusableElementWarning:!0},n.createElement("div",{ref:f},n.createElement(x.A,{id:r,label:b,isSelected:i,isFocused:o,className:g,ref:u,autoClogProps:j,ariaHaspopup:!0}))))});var K=a(0x16ced5c1b),$=a(0xfdb48d4e),Y=a(0xd8480358),Q=a(0x65226bf3),Z=a(0x22024135f),J=a(0x579a6c21),X=a(0x11ed04fa0),ee=a(0x267897ec),et=a(0x15fb82076),ea=a(0x6e87d4ec),en=a(0xeeb01a46),er=a(0x138453164),ei=a(0x21f8b9118),el=a(0x871b0727),eo=a(0x1c760ba43),es=a(0x22fb75fe3),ec=a(0x45012309),ed=a(0x11c82607b),em=a(0xd8fe84cf),eu=a(0x18c9d2489),ep=a(0x860cba83),eh=a(0x217553e42),e_=a(0x14149c126),ef=a(0x16ffed5ab);let eb=new c.Ay("tabbed-channel");function mapTabToBookmarkData(e,t){switch(e.type){case eo.Xy.Canvas:case eo.Xy.List:case eo.Xy.ExternalFiles:case eo.Xy.Files:{let a=e.data?.file_id;if(!a)return null;let n=(0,D.Lp)(t,a);return{type:es.x.FILE,entityId:a,title:e.label||n?.title,url:n?.permalink}}default:return null}}function isItemAlreadyInFolder(e,t,a,n){if(!(0,en.bt)(e))return!1;let r=Object.values(e);return n===es.x.LINK?r.some(e=>e.url===t&&e.parentId===a&&e.type===es.x.LINK):r.some(e=>e.entityId===t&&e.parentId===a&&e.type===es.x.FILE)}let eg=(0,ed.Ay)("Adds item to folder and shows success toast",async(e,t,{channelId:a,folderBookmarkId:r,folderName:i,tabId:l,fileId:o,fileTitle:s,filePermalink:c,linkUrl:d,linkTitle:m,bookmark:u})=>{let p=t(),h=(0,eh.OL)(p,a),_="on"===(0,e_._Z)(p,"channel_tabs_drop_into_folder");if(_)try{let t,f;if(!h)return;let b=(0,em.M4)(p,{channelId:a});if(l){if(!(f=h.properties?.tabz?.find(e=>e.id===l)))return;let o=mapTabToBookmarkData(f,p);if(!o)return;let s=f.data?.file_id,c=s?(0,D.Lp)(p,s):null;if(t=c?.title||f.label||eb.t("Tab",{fallbackHash:"2a4d562b1d9a9c90bdede6fac8ce4f7402462b86",fallbackHashNs:"channel_details"}),o.entityId&&isItemAlreadyInFolder(b,o.entityId,r))return void e((0,ef.M)({element:n.createElement(ea.A,{duration:er.xj},n.createElement("div",null,eb.t("{folderName} already includes {itemName}",{folderName:i,itemName:t})))}));await e((0,eu.eV)({channelId:a,parentId:r,...o})),(0,ec.eo)().track(V.EventId.CHANNEL_TABS_TAB_ADDED,{contexts:{ui_context:{ui_component_name:V.UiComponentName.CHANNEL_TABS_TAB,action:V.UiAction.DRAG_AND_DROP},core:{channel_id:a,dragged_tab_id:l,dragged_item_to_folder:!0}}}),await e((0,el.i)({channelId:a,tabId:l,elementName:"drag_tab_to_folder"}))}else if(o){if(t=s||eb.t("File"),isItemAlreadyInFolder(b,o,r))return void e((0,ef.M)({element:n.createElement(ea.A,{duration:er.xj},n.createElement("div",null,eb.t("{folderName} already includes {itemName}",{folderName:i,itemName:t})))}));await e((0,eu.eV)({channelId:a,parentId:r,type:es.x.FILE,entityId:o,title:s,url:c})),(0,ec.eo)({state:p}).track(V.EventId.CHANNEL_TABS_TAB_ADDED,{contexts:{ui_context:{ui_component_name:V.UiComponentName.CHANNEL_TABS_TAB,action:V.UiAction.DRAG_AND_DROP,ui_element:V.UiElement.MESSAGE_FILE_ATTACHMENT},core:{channel_id:a,file_id:o,dragged_item_to_folder:!0}}})}else{if(!d)return;if(t=m||d,isItemAlreadyInFolder(b,d,r,es.x.LINK))return void e((0,ef.M)({element:n.createElement(ea.A,{duration:er.xj},n.createElement("div",null,eb.t("{folderName} already includes this link",{folderName:i})))}));await e((0,eu.eV)({channelId:a,parentId:r,type:es.x.LINK,title:m,url:d})),(0,ec.eo)({state:p}).track(V.EventId.CHANNEL_TABS_TAB_ADDED,{contexts:{ui_context:{ui_component_name:V.UiComponentName.CHANNEL_TABS_TAB,action:V.UiAction.DRAG_AND_DROP,ui_element:V.UiElement.MESSAGE_LINK_ATTACHMENT},core:{channel_id:a,dragged_item_to_folder:!0}}})}u&&e((0,ep.G)(u));let g=_&&t?eb.rt("Added {itemName} to <link>{folderName}</link>",{itemName:t,folderName:i},({tag:t,text:i})=>"link"===t?n.createElement(et.A,{onClick:t=>{t.preventDefault(),r&&e((0,ei.F)({channelId:a,folderId:r}))}},i):null):null;g&&e((0,ef.M)({element:n.createElement(ea.A,{duration:er.xj},n.createElement("span",null,g))}))}catch{e((0,ef.M)({element:n.createElement(ea.A,{duration:er.xj},n.createElement("div",null,_?eb.t("Unable to add item to folder"):"Unable to add item to folder"))}))}});eg.meta={name:"addItemToFolder",key:"createThunkAddItemToFolder",description:"Adds item to folder and shows success toast"};var ey=a(0x1ec68d6a3),eA=a(0x20b63020e);let ex=(0,ed.Ay)("Adds a new tab from attachment at a specific position",async(e,t,{channelId:a,fileId:n,afterTabId:r,bookmark:i})=>{let l=(0,ey.Ay)({getState:t});try{let t=await e((0,eA.Z)({channelId:a,fileId:n,preventNavigation:!0,showToast:!0,optimisticToast:!0,reason:"drag-attachment-to-tab-bar",afterTabId:r,clogAction:V.UiAction.DRAG_AND_DROP,clogUiComponentName:V.UiComponentName.DRAGGED_MESSAGE_FILE_ATTACHMENT}));return i&&e((0,ep.G)(i)),t}catch(e){throw l.error(Error(`addTabFromAttachmentAtIndex error for file ${n}: ${e}`)),e}});ex.meta={name:"addTabFromAttachmentAtIndex",key:"createThunkAddTabFromAttachmentAtIndex",description:"Adds a new tab from attachment at a specific position"};var eE=a(0xb6143a72),eC=a(0x238b287cf),ek=a(0x1ecc7f772),ev=a(0xf6ed6f31),eS=a(0x5738b4bc),eI=a(0x24558b75f);let ew=new c.Ay("tabbed-channel");function DraggableDroppableTabs({currentTabId:e,defaultTabId:t,onTabChange:a,onTabDragEnd:i,tabClassName:c,tabDraggingClassName:y,tabs:A,channelId:x,isTabEditingEnabled:E,customAddTabProps:C,forceShowAddTab:v=!1,"aria-label":w}){let T=(0,r.wA)(),N=(0,s.A)(),M=(0,s.A)(),R=(0,n.useRef)(null),P=(0,n.useMemo)(()=>(0,o.A)(A,"id"),[A]),[L,D]=(0,n.useState)(!1),F=(0,O.d4)(X.U6),U=(0,O.d4)(e=>(0,eh.OL)(e,x)),B=(0,ev.bl)(U),H=(0,O.d4)(e=>!!B&&!!x&&(0,eS.E)(e,x)),W=(0,O.d4)(f.UG),G=(0,eC.A)(),q=(0,O.d4)(X.Mz),j=(0,O.d4)(e=>q&&x?(0,ee.t)(e,x):void 0),et=(0,n.useRef)({}),{shouldShowNewFilesTabCoachmark:ea,shouldShowNewPinsTabCoachmark:en}=(0,Z.C)(x),{clearCanvasTabHighlight:er,shouldShowPrefillDmCanvasTabHighlight:ei}=(0,J.b)(x),{clearAllCompanyNameTemplatesTabHighlight:el,showAllCompanyNameTemplatesTabHighlight:es}=(0,Q.G)(),ec=(0,m.i)(x),ed=(0,n.useCallback)(e=>e.id===eo.fY.AddCanvas&&(!H||!E),[H,E]),em=(0,n.useMemo)(()=>A.filter(e=>!ed(e)),[ed,A]),eu=(0,n.useCallback)(e=>em.findIndex(({id:t})=>e.id===t),[em]),ep=(0,O.d4)(X.Fp),[e_,ef]=(0,n.useState)(!1),eb=(0,n.useMemo)(()=>P[e||t||A[0].id]||A[0]||{},[e,t,A,P]),[ey,eA]=(0,n.useState)(()=>eu(eb)),[eT,eN]=(0,n.useState)(em.length-1),eM=Math.max(eT,0),eR=eM<em.length-1,eP=!!x&&!!E||!!C,eL=eM+1,eO=eR?eM+2:eM+1,eD=(0,n.useCallback)((e,t)=>{let n=P[e];(0,eI.Cz)(t)?a?.(e,t):!n||n.isExternalLink||n.id===eb.id||(n.id!==eo.fY.ChannelCanvas||!W)&&(eA(eu(n)),a?.(e,t),n.onClick?.(e,t),e===eo.fY.ChannelCanvas&&er(),es(e)&&el())},[P,eb.id,eu,a,es,er,el,W]),eF=(0,n.useCallback)(e=>{ef(e)},[]),eU=(0,Y.V)(A,N,R,eN),eB=(0,n.useMemo)(()=>{let e=0;return eR&&(e+=1),eP&&(e+=1),eM+e},[eP,eR,eM]),eH=(0,K.V)(eA,eB,e_),eW=(0,n.useCallback)(e=>{P[e.target.id]&&eA(eu(P[e.target.id]))},[P,eu]),eV=(0,n.useCallback)((e,t)=>{e!==t&&x&&(T((0,eE.w)({channelId:x,sourceIndex:e,destinationIndex:t})),G.track(V.EventId.CHANNEL_TABS_TAB_REORDERED,{contexts:{ui_context:{ui_component_name:V.UiComponentName.CHANNEL_TABS_TAB,action:V.UiAction.DRAG_AND_DROP},core:{channel_id:x,dragged_tab_id:em[e]?.id}}}))},[x,T,G,em]),eG=x?eV:i,eq=(0,n.useCallback)((e,t,a)=>{x&&t&&T(ex({channelId:x,fileId:e,afterTabId:t<1||t>=em.length?void 0:em[t-1].id,bookmark:a}))},[x,T,em]),ej=(0,n.useCallback)(async(e,t)=>{if(!x||!t||!q)return;let a=j?.find(e=>e.data?.folderBookmarkId===t),n=a?.label;"id"in e?await T(eg({channelId:x,tabId:e.id,folderBookmarkId:t,folderName:n})):(e.type===k.M.MESSAGE_FILE_ATTACHMENT||e.type===k.M.FOLDER_FILE_BOOKMARK)&&"fileId"in e?await T(eg({channelId:x,fileId:e.fileId,fileTitle:"fileTitle"in e?e.fileTitle:void 0,filePermalink:e.filePermalink,folderBookmarkId:t,folderName:n,bookmark:"bookmark"in e?e.bookmark:void 0})):e.type===k.M.MESSAGE_LINK&&"url"in e?await T(eg({channelId:x,linkUrl:e.url,linkTitle:e.linkText,folderBookmarkId:t,folderName:n})):e.type===k.M.FOLDER_LINK_BOOKMARK&&"url"in e&&await T(eg({channelId:x,linkUrl:e.url,linkTitle:e.linkText,folderBookmarkId:t,folderName:n,bookmark:e.bookmark}))},[x,T,j,q]),ez=(0,$.W)(eb,A,eM,eD,x||"",eF,D,eG,eq,j,ej),eK=eu(eb)>eM,e$=F?ew.t("More"):"More",eY=ep?ew.t("{channelName} views",{channelName:(0,ek.Mn)(U)}):`${(0,ek.Mn)(U)} views`,eQ=(0,n.useMemo)(()=>C?n.createElement(g.t,{isFocused:ey===eO,customAddTabProps:C}):null,[ey,eO,C]);return n.createElement("div",{"data-draggable-tabs":N,className:S().draggable_tabs},n.createElement(u.A,{spaceName:p.HL.spaceName,notifications:p.HL.notifications,shouldAlwaysRenderChildren:!0},n.createElement(d.A,null,n.createElement("div",{ref:R,role:"tablist","aria-orientation":"horizontal",className:S().draggable_tabs_container,onFocus:eW,onKeyDown:eH,"aria-label":w??eY},em.map((e,t)=>{let a=t===eM,r=ea(e.id),i=en(e.id),o=ei(e.id),s=ec(e.id),d=es(e.id),m=j?.find(t=>t.id===e.id),f=!!m,g=m?.data?.folderBookmarkId;return ed(e)?null:n.createElement(u.A,{spaceName:p.qp.spaceName,notifications:p.qp.notifications,key:e.id,channelId:x,tabId:e.id,tabsContainerRef:R,tabIndex:t,shouldAlwaysRenderChildren:!0},n.createElement(u.A,{spaceName:p.QK.spaceName,notifications:p.QK.notifications,channelScopedId:x,tabId:e.id,shouldAlwaysRenderChildren:!0},n.createElement(h.H,{tabId:e.id,channelId:x},n.createElement(_.v,{tabId:e.id},n.createElement(I,{key:`${x}-${e.id}`,tab:e,tabsId:N,className:l()(c,{[S().resource_tabs_nux]:s,[S().draggable_tabs_nux]:r||i||o||d}),draggingClassName:y,index:t,isFocused:t===ey,isHidden:t>eM,isSelected:e.id===eb.id,observer:eU,onClick:eD,ref:t=>{et.current[e.id]=t},onDrop:eG,onAttachmentDrop:eq,onFolderDrop:f?ej:void 0,setIsDragging:eF,isLastVisibleTab:a,isFolderTab:f,folderBookmarkId:g},a&&eR&&n.createElement(z,{id:M,isFocused:ey===eL,isSelected:eK,label:e$,position:"bottom-left",renderMenu:ez,isOverOverflowMenu:L,onDrop:eG,onAttachmentDrop:eq,tabsCount:em.length}),a&&x&&eP&&n.createElement(b.K,{channelId:x,isFocused:ey===eO}),a&&eP&&eQ)))))}),v&&0===em.length&&eQ))),n.createElement(DraggingTabPreviewLayer,{draggingClassName:y}))}DraggableDroppableTabs.displayName="DraggableDroppableTabs"},0xd8ecde5d:(e,t,a)=>{"use strict";a.d(t,{x:()=>DraggableDroppable});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x9e38a344),o=a(0x1b81e2549),s=a(0x2334f665b),c=a(0x21a39e2e1),d=a(0x118e9b326);function calculateHorizontalDropPosition(e){let{relativePosition:t,deadZone:a,isLastItem:n}=e;return t<.25-a?"left":n&&t>.75+a?"right":t>.25+a&&t<.75-a?"center":null}function calculateVerticalDropPosition(e){let{relativePosition:t,deadZone:a,isLastItem:n}=e;return t<.25-a?"top":n&&t>.75+a?"bottom":t>.25+a&&t<.75-a?"center":null}function calculateDropIndex(e){let{baseIndex:t,dropPosition:a,itemType:n,draggedItemType:r,draggedItemIndex:i,isLastVisibleTab:l,isLastItemInOverflowMenu:o}=e,s=t;return n===d.M.OVERFLOW_MENU&&"top"===a&&o&&r!==d.M.MESSAGE_FILE_ATTACHMENT&&r!==d.M.FOLDER_FILE_BOOKMARK&&(s-=1),n===d.M.OVERFLOW_MENU&&"bottom"===a&&o&&(r===d.M.MESSAGE_FILE_ATTACHMENT||r===d.M.FOLDER_FILE_BOOKMARK)&&(s+=1),n===d.M.TAB&&"left"===a&&l&&r===d.M.TAB&&(s-=1),n===d.M.TAB&&"right"===a&&l&&(r===d.M.OVERFLOW_MENU||r===d.M.MESSAGE_FILE_ATTACHMENT||r===d.M.FOLDER_FILE_BOOKMARK)&&(s+=1),n===d.M.TAB&&r===d.M.TAB&&void 0!==i&&i<t&&!l&&(s-=1),s}function getHoverClassNames(e,t){if(!e.shouldShowHover)return{};let{isFolderTab:a,dropPosition:n,type:r,isLastVisibleTab:i,isLastItemInOverflowMenu:l}=e;if(a){if("center"===n)return{[t.channel_tab_folder_hovered]:!0};if("left"===n)return{[t.channel_tab_hovered]:!0};if("right"===n)return{[t.channel_tab_hovered_right__last_visible_tab]:!0};if("top"===n)return{[t.channel_tab_menu_item_hovered]:!0};if("bottom"===n)return{[t.channel_tab_menu_item_hovered_bottom__last_item]:!0}}if(r===d.M.TAB&&!i)return{[t.channel_tab_hovered]:!0};if(r===d.M.TAB&&i){if("left"===n)return{[t.channel_tab_hovered_left__last_visible_tab]:!0};if("right"===n)return{[t.channel_tab_hovered_right__last_visible_tab]:!0}}if(r===d.M.OVERFLOW_MENU){if(!l)return{[t.channel_tab_menu_item_hovered]:!0};if(l&&"top"===n)return{[t.channel_tab_menu_item_hovered_top__last_item]:!0};if(l&&"bottom"===n)return{[t.channel_tab_menu_item_hovered_bottom__last_item]:!0}}return{}}function isExternalFileOrLink(e){return(e.type===d.M.MESSAGE_FILE_ATTACHMENT||e.type===d.M.FOLDER_FILE_BOOKMARK)&&"isExternalFile"in e&&!!e.isExternalFile||e.type===d.M.MESSAGE_LINK||e.type===d.M.FOLDER_LINK_BOOKMARK}function shouldPreventDropIntoFolder(e){return"isFolderTab"in e&&!!e.isFolderTab||"id"in e&&("workflows"===e.id||"files"===e.id||"bookmarks"===e.id||"huddles"===e.id)}function canDropItem(e,t,a){return"channel"!==t&&(!isExternalFileOrLink(e)||a)}var m=a(0x11ed04fa0),u=a(0x226892387),p=a(0xfbbace2d),h=a.n(p);function DraggableDroppable({className:e,id:t,index:a,onDrop:r,onAttachmentDrop:p,onFolderDrop:_,children:f,setIsDragging:b,type:g,label:y,isLastItemInOverflowMenu:A,isLastVisibleTab:x,isFolderTab:E,folderBookmarkId:C}){let k=(0,n.useRef)(null),[v,S]=(0,n.useState)(g===d.M.TAB?"left":"top"),I=(0,u.d4)(m.Mz),[{isOver:w,canDrop:T},N]=(0,l.H)({accept:[d.M.TAB,d.M.OVERFLOW_MENU,d.M.MESSAGE_FILE_ATTACHMENT,d.M.MESSAGE_LINK,d.M.FOLDER_FILE_BOOKMARK,d.M.FOLDER_LINK_BOOKMARK],drop(e){if(!k.current)return;if(I&&E&&"center"===v)return _?.(e,C);let t=calculateDropIndex({baseIndex:a,dropPosition:v,itemType:g,draggedItemType:e.type,draggedItemIndex:"index"in e?e.index:void 0,isLastVisibleTab:x||!1,isLastItemInOverflowMenu:A||!1});return e.type===d.M.MESSAGE_FILE_ATTACHMENT&&"fileId"in e?p?.(e.fileId,t):e.type===d.M.FOLDER_FILE_BOOKMARK&&"fileId"in e?p?.(e.fileId,t,e.bookmark):"index"in e?r?.(e.index,t):void 0},hover(e,t){if(!k.current||!A&&!x&&!E)return;let a=t.getClientOffset();if(!a)return;if(isExternalFileOrLink(e))return void S("center");let n=k.current.getBoundingClientRect();if(I&&E&&!shouldPreventDropIntoFolder(e)){let e=null;g===d.M.TAB?e=calculateHorizontalDropPosition({relativePosition:(a.x-n.left)/(n.right-n.left),deadZone:.1,isLastItem:x||!1}):g===d.M.OVERFLOW_MENU&&(e=calculateVerticalDropPosition({relativePosition:(a.y-n.top)/(n.bottom-n.top),deadZone:.1,isLastItem:A||!1})),e&&e!==v&&S(e);return}if(E&&shouldPreventDropIntoFolder(e)){if(g===d.M.TAB){let e=(a.x-n.left)/(n.right-n.left),t=null;x?e<.4?t="left":e>.6&&(t="right"):t="left",t&&t!==v&&S(t);return}if(g===d.M.OVERFLOW_MENU){let e=(a.y-n.top)/(n.bottom-n.top),t=null;A?e<.4?t="top":e>.6&&(t="bottom"):t="top",t&&t!==v&&S(t);return}}if(A){let e=(a.y-n.top)/(n.bottom-n.top),t=null;e<.4?t="top":e>.6&&(t="bottom"),t&&t!==v&&S(t)}if(x){let e=(a.x-n.left)/(n.right-n.left),t=null;e<.4?t="left":e>.6&&(t="right"),t&&t!==v&&S(t)}},collect:e=>({isOver:e.isOver({shallow:!0}),canDrop:e.canDrop()}),canDrop:e=>canDropItem(e,t,E||!1)}),[{isDragging:M},R,P]=(0,o.i)({type:g,item:()=>(b?.(!0),{id:t,label:y,index:a,type:g,isFolderTab:E}),collect:e=>({isDragging:e.isDragging()}),end:()=>{b?.(!1)},canDrag:()=>"channel"!==t});(0,n.useEffect)(()=>{P((0,s.n)(),{captureDraggingState:!0})},[P]);let L=M&&w,O=getHoverClassNames({shouldShowHover:w&&T&&!L,isFolderTab:E||!1,dropPosition:v,type:g,isLastVisibleTab:x||!1,isLastItemInOverflowMenu:A||!1},h()),D=i()(e,O,{[h().channel_tab_is_dragging]:M});return n.createElement("div",{ref:(0,c.A)(R,N,k),className:D},f)}DraggableDroppable.displayName="DraggableDroppable"},0xa2a49056:(e,t,a)=>{"use strict";a.d(t,{C:()=>DraggableTabs});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1aa941557),o=a(0x1407c6c2c),s=a(0x21a39e2e1),c=a(0x20482ad21),d=a(0x1b916e0d8),m=a(0x5ed1effc),u=a(0x1789e94fa),p=a(0xa48bc2a6),h=a(0x5475ff55),_=a(0x89261c05),f=a(0x1a541bd25),b=a(0x22d51fee8),g=a(0xa2155654),y=a(0x243942c20),A=a(0x40c0d834),x=a(0x99233ecb),E=a(0x2501a2cee),C=a(0x144aa29c),k=a(0x3711e82d),v=a(0x132d4c7bf),S=a.n(v);let I={onClick:{enableClogAction:!0}},w=(0,n.forwardRef)(({renderMenu:e,position:t,label:a,id:r,isSelected:i,isFocused:l},o)=>{let s=(0,n.useMemo)(()=>n.createElement("span",{className:S().overflow_label},a,n.createElement(E.Ah,{name:"caret-down"})),[a]);return n.createElement(A.A,{eventId:k.EventId.CHANNEL_TABS_MORE_CLICKED},n.createElement(x.cQ,{renderMenu:e,position:t||"bottom-left"},n.createElement(C.A,{id:r,label:s,isSelected:i,isFocused:l,className:"c-tabs__tab_overflow",ref:o,autoClogProps:I,ariaHaspopup:!0})))});var T=a(0x854f5389),N=a(0x1d76c51f9),M=a(0xfbbace2d),R=a.n(M);let P=n.forwardRef(({children:e,className:t,draggingClassName:a,index:r,isFocused:l,isHidden:o,isSelected:c,observer:d,onClick:m,tab:u,tabsId:p},_)=>{let{id:f,renderWrapper:b=T.A,content:g,isDragDisabled:y,...A}=u,x=i()({[R().draggable_tab]:!0,[R().draggable_tab_hidden]:o}),wrapper=(r,d)=>n.createElement(n.Fragment,null,b(n.createElement(C.A,{...r?.draggableProps,...r?.dragHandleProps,...A,id:f,ref:(0,s.A)(r?.innerRef,_),isFocused:l,isSelected:c,onClick:m,className:i()(u.className,d&&a,t)}),o),e&&n.createElement("div",{className:R().draggable_tabs_children},e));return n.createElement(N.l,{className:x,isHidden:o,observer:d,tabsId:p},y&&wrapper(),!y&&n.createElement(h.lO,{key:f,index:r,draggableId:f,disableInteractiveElementBlocking:!0},(e,{isDragging:t})=>wrapper(e,t)))});var L=a(0x16ced5c1b),O=a(0xfdb48d4e),D=a(0xd8480358),F=a(0x65226bf3),U=a(0x22024135f),B=a(0x579a6c21),H=a(0x11ed04fa0),W=a(0x1c760ba43),V=a(0x1ecc7f772),G=a(0xf6ed6f31),q=a(0x5738b4bc),j=a(0x24558b75f),z=a(0x226892387),K=a(0x217553e42);let $=new c.Ay("tabbed-channel");function DraggableTabs({currentTabId:e,defaultTabId:t,onTabChange:a,onTabDragEnd:r,onTabDragStart:c,tabClassName:A,tabDraggingClassName:x,tabs:E,channelId:C,isTabEditingEnabled:k,customAddTabProps:v,forceShowAddTab:S=!1,"aria-label":I}){let T=(0,o.A)(),N=(0,o.A)(),M=(0,o.A)(),Y=(0,n.useRef)(null),Q=(0,n.useMemo)(()=>(0,l.A)(E,"id"),[E]),[Z,J]=(0,n.useState)(!1),X=(0,z.d4)(H.U6),ee=(0,z.d4)(e=>(0,K.OL)(e,C)),et=(0,G.bl)(ee),ea=(0,z.d4)(e=>!!et&&!!C&&(0,q.E)(e,C)),en=(0,z.d4)(H.Oj),er=(0,z.d4)(b.UG),ei=(0,n.useRef)({}),{shouldShowNewFilesTabCoachmark:el,shouldShowNewPinsTabCoachmark:eo}=(0,U.C)(C),{clearCanvasTabHighlight:es,shouldShowPrefillDmCanvasTabHighlight:ec}=(0,B.b)(C),{clearAllCompanyNameTemplatesTabHighlight:ed,showAllCompanyNameTemplatesTabHighlight:em}=(0,F.G)(),eu=(0,m.i)(C),ep=(0,n.useCallback)(e=>e.id===W.fY.AddCanvas&&(!ea||!k),[ea,k]),eh=(0,n.useMemo)(()=>E.filter(e=>!ep(e)),[ep,E]),e_=(0,n.useCallback)(e=>eh.findIndex(({id:t})=>e.id===t),[eh]),ef=(0,z.d4)(H.Fp),[eb,eg]=(0,n.useState)(!1),ey=(0,n.useMemo)(()=>Q[e||t||E[0].id]||E[0]||{},[e,t,E,Q]),[eA,ex]=(0,n.useState)(()=>e_(ey)),[eE,eC]=(0,n.useState)(eh.length-1),ek=Math.max(eE,0),ev=ek<eh.length-1,eS=!!C&&!!k||!!v,eI=ek+1,ew=ev?ek+2:ek+1,eT=(0,n.useCallback)((e,t)=>{let n=Q[e];(0,j.Cz)(t)?a?.(e,t):!n||n.isExternalLink||n.id===ey.id||(n.id!==W.fY.ChannelCanvas||!er)&&(ex(e_(n)),a?.(e,t),n.onClick?.(e,t),e===W.fY.ChannelCanvas&&es(),em(e)&&ed())},[Q,ey.id,e_,a,em,es,ed,er]),eN=(0,D.V)(E,T,Y,eC),eM=(0,O.W)(ey,E,ek,eT,C||""),eR=(0,n.useMemo)(()=>{let e=0;return ev&&(e+=1),eS&&(e+=1),ek+e},[eS,ev,ek]),eP=(0,L.V)(ex,eR,eb),eL=(0,n.useCallback)(e=>{Q[e.target.id]&&ex(e_(Q[e.target.id]))},[Q,e_]),eO=(0,n.useCallback)(()=>eg(!0),[]),eD=(0,n.useCallback)((e,t)=>{eg(!1),r?.(e,t),J(!1);let a=Q[e?.draggableId],n=ei.current?.[e?.draggableId]?.textContent;if(en)if("CANCEL"===e.reason){let r=$.t("Movement cancelled. {tabLabel} has returned to its starting position of {startPosition}",{tabLabel:n??a["aria-label"],startPosition:e?.source.index});t.announce(r)}else{let r=$.t("You have dropped {tabLabel}. It has moved from position {startPosition} to {endPosition}",{tabLabel:n??a["aria-label"],startPosition:e?.source.index,endPosition:e?.destination.index});t.announce(r)}},[en,r,Q]),eF=(0,n.useCallback)((e,t)=>{if(c?.(e,t),e?.draggableId===W.Xy.Channel&&J(!0),en){let a=Q[e?.draggableId],n=ei.current[e?.draggableId]?.textContent,r=$.t("You have lifted {tabLabel} in position {startPosition}.",{tabLabel:n??a["aria-label"],startPosition:e?.source.index});t.announce(r)}},[en,c,Q]),eU=(0,n.useCallback)((e,t)=>{if(en){let a=Q[e?.draggableId],n=ei.current[e?.draggableId]?.textContent,r=$.t("You have moved {tabLabel} from position {startPosition} to position {endPosition}",{tabLabel:n??a["aria-label"],startPosition:e?.source.index,endPosition:e?.destination.index});t.announce(r)}},[en,Q]),eB=e_(ey)>ek,eH=X?$.t("More"):"More",eW=ef?$.t("{channelName} views",{channelName:(0,V.Mn)(ee)}):`${(0,V.Mn)(ee)} views`,eV=I??eW;return n.createElement(h.MR,{onDragEnd:eD,onDragStart:eF,onDragUpdate:eU,onBeforeCapture:eO},n.createElement(h.zv,{droppableId:N,direction:"horizontal",isDropDisabled:Z},e=>n.createElement("div",{"data-draggable-tabs":T,className:R().draggable_tabs},n.createElement(u.A,{spaceName:p.HL.spaceName,notifications:p.HL.notifications,shouldAlwaysRenderChildren:!0},n.createElement(d.A,null,n.createElement("div",{ref:(0,s.A)(e.innerRef,Y),role:"tablist","aria-orientation":"horizontal",className:R().draggable_tabs_container,onFocus:eL,onKeyDown:eP,"aria-label":eV,...e.droppableProps},eh.map((e,t)=>{let a=!eb&&t===ek,r=el(e.id),l=eo(e.id),o=ec(e.id),s=eu(e.id),c=em(e.id);return ep(e)?null:n.createElement(u.A,{spaceName:p.qp.spaceName,notifications:p.qp.notifications,key:e.id,channelId:C,tabId:e.id,tabsContainerRef:Y,tabIndex:t,shouldAlwaysRenderChildren:!0},n.createElement(u.A,{spaceName:p.QK.spaceName,notifications:p.QK.notifications,channelScopedId:C,tabId:e.id,shouldAlwaysRenderChildren:!0},n.createElement(_.H,{tabId:e.id,channelId:C},n.createElement(f.v,{tabId:e.id},n.createElement(P,{tab:e,tabsId:T,className:i()(A,{[R().resource_tabs_nux]:s,[R().draggable_tabs_nux]:r||l||o||c}),draggingClassName:x,index:t,isFocused:t===eA,isHidden:t>ek,isSelected:e.id===ey.id,observer:eN,onClick:eT,ref:t=>{ei.current[e.id]=t}},a&&ev&&n.createElement(w,{id:M,isFocused:eA===eI,isSelected:eB,label:eH,position:"bottom-left",renderMenu:eM}),a&&C&&eS&&n.createElement(g.K,{channelId:C,isFocused:eA===ew}),a&&v&&n.createElement(y.t,{isFocused:eA===ew,customAddTabProps:v}))))))}),S&&v&&0===eh.length&&n.createElement(y.t,{isFocused:eA===ew,customAddTabProps:v}),e.placeholder))))))}DraggableTabs.displayName="DraggableTabs"},0x1d76c51f9:(e,t,a)=>{"use strict";a.d(t,{l:()=>Observed});var n=a(0xbad225b5);function Observed({children:e,className:t,isHidden:a,observer:r,tabsId:i}){let l=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=l.current;if(e)return r?.observe(e),()=>{r?.unobserve(e)}},[r]),n.createElement("div",{ref:l,role:"none","aria-hidden":!!a||void 0,className:t,"data-draggable-tabs-id":i},e)}Observed.displayName="Observed"},0x118e9b326:(e,t,a)=>{"use strict";a.d(t,{M:()=>r});var n,r=((n={}).TAB="tab",n.OVERFLOW_MENU="overflow_menu",n.CHANNEL_TAB="channel_tab",n.MESSAGE_FILE_ATTACHMENT="message_file_attachment",n.MESSAGE_LINK="message_link",n.FOLDER_FILE_BOOKMARK="folder_file_bookmark",n.FOLDER_LINK_BOOKMARK="folder_link_bookmark",n)},0x16ced5c1b:(e,t,a)=>{"use strict";a.d(t,{V:()=>useTabsKeydownListener});var n=a(0xbad225b5);function useTabsKeydownListener(e,t,a){return(0,n.useCallback)(n=>{if(n.shiftKey||n.metaKey||n.ctrlKey||n.altKey||a)return;let incrementFocusedTabIndexBy=a=>{n.preventDefault(),e(e=>{let n=e+a;return n>t?0:n<0?t:n})};switch(n.key){case"ArrowLeft":return incrementFocusedTabIndexBy(-1);case"ArrowRight":return incrementFocusedTabIndexBy(1);case"End":return e(t);case"Home":return e(0)}},[a,e,t])}},0xfdb48d4e:(e,t,a)=>{"use strict";a.d(t,{W:()=>useTabsOverflowMenuRenderer});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x9e38a344),l=a(0x20482ad21),o=a(0x99233ecb),s=a(0x133aaa7da),c=a(0x2501a2cee),d=a(0x10cf39bbb),m=a(0xb90d5858),u=a(0x1ed656589),p=a(0xd8ecde5d);function DraggableOverflowMenuTabItem({id:e,label:t,icon:a,index:r,isSelected:i,onTabClick:l,setIsDragging:o,draggableType:c,onDrop:d,onAttachmentDrop:u,isLastItem:h,isFolderTab:_,folderBookmarkId:f,handleFolderDrop:b,highlighted:g,onMouseEnter:y,activeMenuId:A,menuCallback:x}){let E=(0,n.useCallback)(t=>{l(e,t)},[l,e]);return n.createElement(p.x,{id:e,index:r,setIsDragging:o,type:c,onDrop:d,onAttachmentDrop:u,label:t,isLastItemInOverflowMenu:h,isFolderTab:_,folderBookmarkId:f,onFolderDrop:b},n.createElement(m.A,{label:t,icon:a,checked:i,onSelected:E,highlighted:g,onMouseEnter:y,activeMenuId:A,type:s.A.radio,menuCallback:x}))}DraggableOverflowMenuTabItem.displayName="DraggableOverflowMenuTabItem",(0,u.Ay)(DraggableOverflowMenuTabItem);var h=a(0x118e9b326),_=a(0x11ed04fa0),f=a(0x1ba23e63c),b=a(0x226892387);let g=new l.Ay("tabbed-channel");function useTabsOverflowMenuRenderer(e,t,a,l,m,u,p,y,A,x,E){let C=(0,r.wA)(),k=(0,b.d4)(_.FI),v=(0,n.useRef)(!1),[,S]=(0,i.H)({accept:[h.M.TAB,h.M.MESSAGE_FILE_ATTACHMENT,h.M.MESSAGE_LINK,h.M.FOLDER_FILE_BOOKMARK,h.M.FOLDER_LINK_BOOKMARK],collect:e=>{let t=e.isOver();t!==v.current&&(v.current=t,p?.(t))}});return(0,n.useCallback)(r=>{let i=t.slice(a+1).map((r,i)=>{let{id:o,svgIcon:d,label:m}=r;if(k){let r=x?.find(e=>e.id===o),p=!!r,_=r?.data?.folderBookmarkId;return{type:s.A.custom,ariaHidden:!1,key:o,children:n.createElement(DraggableOverflowMenuTabItem,{id:o,label:m,icon:d?n.createElement(c.Ah,{size:"18",...d}):null,index:i+a+1,isSelected:o===e.id,onTabClick:l,setIsDragging:u??(()=>{}),draggableType:h.M.OVERFLOW_MENU,onDrop:y,onAttachmentDrop:A,isLastItem:t.length-1===i+a+1,isFolderTab:p,folderBookmarkId:_,handleFolderDrop:p?E:void 0})}}return{id:o,key:o,label:m,type:s.A.radio,icon:d?n.createElement(c.Ah,{size:"18",...d}):null,checked:o===e.id,click:e=>l(o,e)}});return m&&i.push({type:s.A.separator},{label:g.t("Edit tabs"),icon:n.createElement(c.Ah,{name:"edit",size:"18"}),click:()=>C((0,f.A)({id:m,defaultTab:d.n.Tabs}))}),n.createElement("div",{ref:S},n.createElement(o.a,{menuClassNames:"c-channel_tabs_overflow_menu",width:"200px",...r,template:i}))},[t,a,k,e.id,l,C,m,y,u,S,A,x,E])}useTabsOverflowMenuRenderer.displayName="useTabsOverflowMenuRenderer"},0xd8480358:(e,t,a)=>{"use strict";a.d(t,{V:()=>useTabsIntersectionObserver});var n=a(0xbad225b5),r=a(0x14fad6485);function isBoundedBy(e,t){return t.left<=e.left&&t.right+1>=e.right}function isHTMLElement(e,t){let a=e.deref();return!!a&&!!t&&t instanceof a.window.HTMLElement}function getTabButtonRect(e){let t=e.querySelector("button");return t?t.getBoundingClientRect():e.getBoundingClientRect()}function getObserverCallback(e,t,a){return(n,r)=>{let i=r.root;if(!isHTMLElement(a,i))return;let l=i.getBoundingClientRect(),o=Array.from(i.querySelectorAll(`div[data-draggable-tabs-id="${e}"]`)),s=o.length,c=0;for(let e of o)isBoundedBy(getTabButtonRect(e),l)&&(c+=1);if(c>=s)return void t(c-1);let d=l.right-80,m=0;for(let e of o){let t=getTabButtonRect(e);l.left<=t.left&&d+1>=t.right&&(m+=1)}t(m-1)}}function useTabsIntersectionObserver(e,t,a,i){let[l,o]=(0,n.useState)(null),{windowRef:s}=(0,n.useContext)(r._0);return(0,n.useEffect)(()=>{if(!a.current)return;let e=new IntersectionObserver(getObserverCallback(t,i,s),{root:a.current,threshold:[0,1]});return o(e),()=>e.disconnect()},[e,t,a,i,s]),l}},0x10cd505f3:(e,t,a)=>{"use strict";a.d(t,{d:()=>FolderItemAddedMessage});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1e864b930),o=a(0x210cf696f),s=a(0x4c96e5d9),c=a(0xdede1f0e),d=a(0xa41e4e91),m=a(0x253acf1e2),u=a(0x17348142),p=a(0x209559510),h=a(0x21f8b9118),_=a(0xbd3de346),f=a(0x2378cf6ec),b=a(0x226892387),g=a(0x233157fdc),y=a(0x14ea3ce99);let A=new i.Ay("message"),FolderItemAddedMessage=e=>{let t,a,i,x,E,C=(0,r.wA)(),{msg:k,unfurl:v}=e;k?(t=k.channel,a=k.item_added_user_ids??[],i=k.folder_item_id??"",x=k.folder_id??""):(t=v.channel_id??"",a=v.item_added_user_ids??[],i=v.folder_item_id??"",x=v.folder_id??"");let S=(0,b.Z2)(e=>a.map(t=>(0,f.I)(e,t))),I=(0,b.d4)(e=>x?(0,g.Um)(e,{channelId:t,folderBookmarkId:x}):void 0),w=(0,b.d4)(e=>i?(0,g.Um)(e,{channelId:t,folderBookmarkId:i}):void 0),T=(0,b.d4)(e=>(0,y.Lp)(e,w?.entityId??"")),N=(0,n.useCallback)(e=>{w&&C((0,p.m)({e,bookmark:w}))},[C,w]),M=(0,n.useMemo)(()=>({file_id:T.id,type:"canvas"}),[T.id]),R=(0,n.useMemo)(()=>({file_id:T.id,type:"list_record"}),[T.id]),P=(0,n.useCallback)(()=>(0,_.DQ)(T)?n.createElement(c.A,{element:M}):(0,_.l7)(T)?n.createElement(m.A,{element:R}):i&&!w?n.createElement(u.d,{label:A.t("Removed item"),iconName:"trash",noLinking:!0,isDisabled:!0}):n.createElement(o.A,{onClick:N},w?.title),[T,N,i,w,M,R]),L=(0,n.useCallback)(()=>{k&&C((0,h.F)({folderId:x,channelId:t}))},[t,C,x,k]),O=(0,n.useCallback)(({text:e})=>n.createElement(s.Ay,{tip:(0,l.A)(S.slice(2))},n.createElement("span",null,e)),[S]);if(!S.length)return null;let D=n.createElement(d.T,{folderName:I?I?.title||"":A.t("Deleted folder"),onClick:L,isDeleted:!!(x&&!I)}),F={userName1:S[0],userName2:S[1],otherCount:S.length-2,"<tooltip>":O,itemName:w?.title||"","<a>":P,folderLink:D};switch(S.length){case 1:E=A.rt("{userName1} added <a>{itemName}</a> to the folder {folderLink}",F);break;case 2:E=A.rt("{userName1} and {userName2} added items to the {folderLink} folder.",F);break;default:E=A.rt("{userName1}, {userName2}, and <tooltip>{otherCount, plural, =1 {# other user} other {# others}}</tooltip> added items to the {folderLink} folder.",F)}return n.createElement("div",{className:"c-message__body c-message__body--automated"},E)};FolderItemAddedMessage.displayName="FolderItemAddedMessage"},0xc8338f53:(e,t,a)=>{"use strict";a.d(t,{V:()=>RenameTabModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x1d2cd7755),s=a(0x126f22530),c=a(0x344bb842),d=a(0x109b915b1),m=a(0x1c760ba43),u=a(0x20e80190e),p=a(0x3711e82d),h=a(0x226892387),_=a(0x14ea3ce99),f=a(0x1fcbb004d),b=a(0x197f580ad),g=a.n(b);let y=new l.Ay("tabbed-channel"),A={elementName:"cancel_rename_tab",onClick:{enableClogAction:!0}},x={elementName:"submit_rename_tab",onClick:{enableClogAction:!0}},RenameTabModal=({tab:e,isRenameFolder:t})=>{let a=(0,r.wA)(),l=e?.data?.fileId,b=(0,h.d4)(e=>(0,_.Lp)(e,l||"")),[E,C]=(0,n.useState)(e?.label||b?.title||""),k=E.length>256,v=(0,n.useRef)(null),S=(0,n.useCallback)(async()=>{a((0,d.Z)({label:E,tabId:e.id})),a((0,f.O)())},[a,E,e.id]),I=(0,n.useCallback)(e=>{"Enter"===e.key&&S()},[S]),w=(0,n.useCallback)(()=>{C(""),v?.current?.focus()},[]),T=e?.type===m.Xy.Canvas,N=T?y.t("Clear text to default to file name"):"",M=(0,n.useMemo)(()=>({name:"close-circle-filled"}),[]),R=n.createElement(o.A,{text:t?y.t("Folder name"):y.t("Tab name"),htmlFor:"text-tab-label",id:"text-label-1"},n.createElement("div",{className:g().inputContainer},n.createElement(s.A,{inputRef:v,name:"text-tab-label",id:"text-tab-label",hintText:N,onChange:C,size:"medium",value:E,focusOnMount:!0,onKeyDown:I,forceSelectAll:!0,errorText:(()=>{if(k)return t?y.t("Folder name can\u2019t be longer than 256 characters."):y.t("Tab name can\u2019t be longer than 256 characters.")})()}),E&&n.createElement(c.A,{className:g().clearButton,svgIconProps:M,size:"small",onClick:w,"aria-label":y.t("Clear text")}))),P=(0,n.useCallback)(()=>a((0,f.O)()),[a]);return n.createElement(i.A,{eventId:p.EventId.CHANNEL_TABS_TAB_RENAMED},n.createElement(u.aF,null,n.createElement(u.Rc,{title:t?y.t("Rename folder"):y.t("Rename tab")}),n.createElement(u.$m,null,n.createElement(u.qf,null,R)),n.createElement(u.jl,null,n.createElement(u.ox,null,n.createElement(u.s_,{type:"outline",onClick:P,autoClogProps:A,"aria-label":y.t("Cancel")},y.t("Cancel")),n.createElement(u.s_,{type:"primary",onClick:S,autoClogProps:x,disabled:!E.length&&!T||k,"aria-label":y.t("Save")},y.t("Save"))))))};RenameTabModal.displayName="RenameTabModal"},0xf950bcef:(e,t,a)=>{"use strict";a.d(t,{P:()=>isPcxFeaturedWorkflowsApiToggleEnabled});var n=a(0x14149c126);let isPcxFeaturedWorkflowsApiToggleEnabled=e=>"on"===(0,n._Z)(e,"pcx_featured_workflows_api")},0x65226bf3:(e,t,a)=>{"use strict";a.d(t,{G:()=>useAllCompanyNameTemplatesChannelTab});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x226892387),l=a(0x113d1778),o=a(0x18a17ca8f);let useAllCompanyNameTemplatesChannelTab=()=>{let e=(0,r.wA)(),t=(0,i.d4)(o.FN);return{clearAllCompanyNameTemplatesTabHighlight:(0,n.useCallback)(()=>{e((0,l.pX)(""))},[e]),showAllCompanyNameTemplatesTabHighlight:(0,n.useCallback)(e=>!!e&&!!t&&e===t,[t])}}},0x9d9c4dfb:(e,t,a)=>{"use strict";a.d(t,{c:()=>useBookmarkCallbacks});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xb77a689a),l=a(0x20482ad21),o=a(0x6e87d4ec),s=a(0xeeb01a46),c=a(0x1589eb96),d=a(0x22fb75fe3),m=a(0x233157fdc),u=a(0x171ed3eca),p=a(0x1c82edabd),h=a(0x1ade7239c),_=a(0x16ffed5ab);let f=new l.Ay("tabbed-channel"),useBookmarkCallbacks=()=>{let e=(0,r.wA)();return{onMoveBookmark:(0,n.useCallback)((t,a,n)=>{let r=a.parentId;return e((0,m.mK)({...a,parentId:n})),e((0,c.No)({channelId:t,parentId:n,center:a.id,left:void 0,right:void 0,entityId:a.entityId,type:a.type})).then(t=>{if(!t.ok)return;let a=(0,h.uN)(t.bookmark);e((0,m.mK)(a))}).catch(t=>{throw e((0,m.mK)({...a,parentId:r})),t})},[e]),onReorderBookmarkInFolder:(0,n.useCallback)(({index:t,bookmark:a},{bookmark:r},l,c)=>{if((0,i.A)(r.parentId)&&(0,i.A)(a.parentId)&&r.parentId!==a.parentId)return;let{channelId:h,parentId:b}=r,g={...r,tempOrder:t},{reorderedBookmarks:y,bookmarkToRestore:A}=(0,s._M)(l,g,!0);e((0,u.CM)({channelId:h,bookmarks:y}));let x=(0,s.oQ)(y),E=(0,s.lx)(x.filter(e=>e.parentId===b)),C=E.findIndex(e=>e.id===g.id),k={channelId:h,center:g.id,parentId:b,left:E[C-1]?.id||void 0,right:E[C+1]?.id||void 0,type:g.type,entityId:g.entityId},v=r.type===d.x.FILE?f.t("Something went wrong while reordering the file."):f.t("Something went wrong while reordering the link.");c&&(v=r.type===d.x.FILE?f.t("Only channel managers can reorder the file."):f.t("Only channel managers can reorder the link.")),e((0,p.V)(k)).then(()=>{A&&e((0,m.mK)(A))}).catch(()=>{e((0,u.CM)({channelId:h,bookmarks:l})),e((0,_.M)({element:n.createElement(o.A,{showCloseButton:!0},v)}))})},[e])}};useBookmarkCallbacks.displayName="useBookmarkCallbacks"},0xed563df0:(e,t,a)=>{"use strict";a.d(t,{E:()=>useCanEditTabs});var n=a(0x11ed04fa0),r=a(0x226892387),i=a(0x217553e42);function useCanEditTabs({channelId:e}){let t=(0,r.d4)(t=>(0,i.OL)(t,e,!1)),a=(0,r.d4)(e=>(0,n.Ln)(e,t));return!!e&&a}},0x22024135f:(e,t,a)=>{"use strict";a.d(t,{C:()=>useNewChannelTabsNux});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x14fad6485),o=a(0x3989021c),s=a(0xd473073a),c=a(0x11ed04fa0),d=a(0x1c760ba43),m=a(0x990bc6be),u=a(0x11c82607b),p=a(0xafce781a),h=a(0x5b1935a6);let _=(0,u.Ay)("Maybe load megaphone notifications for message pinned event if the pins tab is visible",(e,t,{channelId:a})=>{let n=t();(0,m.G)(n,{channelId:a}).some(e=>e.type===d.Xy.Bookmarks)||e((0,p.u2)({event:{type:h.jo.MESSAGE_PINNED},channelId:a}))});_.meta={name:"maybeTriggerMessagePinnedMegaphoneEvent",key:"createThunkMaybeTriggerMessagePinnedMegaphoneEvent",description:"Maybe load megaphone notifications for message pinned event if the pins tab is visible"};var f=a(0x226892387),b=a(0x1f57aea47),g=a(0x1af369576);function useNewChannelTabsNux(e){let t=(0,r.wA)(),a=(0,f.d4)(c.wz),m=(0,s.g)(e),{windowId:u}=(0,n.useContext)(l._0),p=(0,f.d4)(e=>(0,b.oY)(e,u)),y=(0,n.useCallback)(()=>{a&&t(_({channelId:e}))},[t,e,a]),{isOpen:A,closeCoachmark:x}=(0,o.A)(h.ze.CHANNEL_TABS_FILES_TAB_COACHMARK,h.xu.IN_PRODUCT_COACHMARK,e),{isOpen:E,closeCoachmark:C}=(0,o.A)(h.ze.CHANNEL_TABS_PINS_TAB_COACHMARK,h.xu.IN_PRODUCT_COACHMARK,e),k=(0,n.useCallback)(e=>{let t=e?(0,c.Fi)(m,e):void 0,a=t?.type===d.Xy.Bookmarks;return!p&&a&&E},[p,E,m]),v=(0,n.useCallback)(e=>{let t=e?(0,c.Fi)(m,e):void 0,a=t?.type===d.Xy.Files;return!p&&a&&A},[p,A,m]);return((0,n.useEffect)(()=>((0,g.ny)(e,y),()=>{(0,g._B)(e,y)}),[e,y]),a)?{shouldShowNewFilesTabCoachmark:v,dismissNewFilesTabCoachmark:x,shouldShowNewPinsTabCoachmark:k,dismissNewPinsTabCoachmark:C}:{shouldShowNewFilesTabCoachmark:()=>!1,dismissNewFilesTabCoachmark:i.A,shouldShowNewPinsTabCoachmark:()=>!1,dismissNewPinsTabCoachmark:i.A}}},0xa178a8f4:(e,t,a)=>{"use strict";a.d(t,{S:()=>useCreateFolder});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x4ff5f593),o=a(0x1b88224f9),s=a(0x10cf39bbb),c=a(0x162ff0093),d=a(0x1fcbb004d);let m=new i.Ay("tabbed-channel");function AddFolderMaxTabErrorDialog({channelId:e}){let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,d.O)())},[t]),i=(0,n.useCallback)(()=>{t((0,c.A)({id:e,defaultTab:s.n.Tabs}))},[e,t]),l=m.t("The channel has the maximum number of tabs."),u=m.t("Can\u2019t add a new folder");return n.createElement(o.A,{title:u,"data-qa":"add-folder-error-dialog-content",showCancelButton:!0,submitButtonText:m.t("Edit Tabs"),onClose:a,onCancel:a,onSubmit:i},l)}AddFolderMaxTabErrorDialog.displayName="AddFolderMaxTabErrorDialog";var u=a(0x1f8d7b265),p=a(0x226892387),h=a(0x217553e42),_=a(0x46dbff89);let f=new i.Ay("tabbed-channel"),useCreateFolder=({channelId:e,navigateToNewFolder:t,onSave:a,isStackable:i=!1})=>{let o=(0,r.wA)(),s=(0,p.d4)(t=>(0,h.OL)(t,e)),c=(0,p.d4)(e=>(0,u.B)(e,s));return(0,n.useCallback)(()=>{c?o((0,_.q)({element:n.createElement(AddFolderMaxTabErrorDialog,{channelId:e}),isStackable:i})):e&&o((0,_.q)({element:n.createElement(l.A,{channelId:e,folderMode:!0,modalHeaderTitle:f.t("Create a folder"),nameIsRequiredForBookmarkFolder:!0,navigateToNewFolder:t,onSave:a}),isStackable:i}))},[e,o,t,a,c,i])};useCreateFolder.displayName="useCreateFolder"},0x2888df66:(e,t,a)=>{"use strict";a.d(t,{Y:()=>useCreateSalesforceListTab});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1e2051844),l=a(0x20482ad21),o=a(0xce378727),s=a(0x1d6bd08c3),c=a(0x1dd89c232),d=a(0x2469becba),m=a(0x11a296110),u=a(0x126f22530),p=a(0x1faa3f1ac),h=a(0xe1f2db0b),_=a(0x20e80190e),f=a(0x209e067d1),b=a(0xe6970e83),g=a(0x226892387),y=a(0x14a407c25),A=a(0x1fcbb004d),x=a(0x25dee083),E=a.n(x);let C=new l.Ay("modernselling"),RenameSalesforceListTabModal=({onInsertRelatedList:e,onInsertSalesforceList:t,channelId:a,selectedSalesforceListViewData:i})=>{let l=(0,r.wA)(),s="rename_tab_modal_label_id",c="rename_tab_modal_input_id",d=(0,n.useRef)(null),f=(0,g.d4)(e=>(0,y.A)(e,a)),[b,x]=(0,n.useState)(i.label),k=(0,n.useCallback)(()=>{x(""),d?.current?.focus()},[]),v=(0,n.useCallback)(()=>{t({data:{salesforce_list_view_id:i.id,object_api_name:i.objectType},label:b,salesforceOrgId:i.salesforceOrgId}),l((0,A.O)())},[l,t,i.id,i.objectType,i.salesforceOrgId,b]),S=(0,n.useCallback)(()=>{l(Z({channelId:a,onInsertRelatedList:e,onInsertSalesforceList:t}))},[a,l,e,t]),I=i.url||f.external_url,w=(0,n.useMemo)(()=>({elementName:`insert_${h.q.StandaloneList}`,elementValue:i.id,onClick:{enableClogAction:!0}}),[i.id]);return n.createElement(_.aF,{dataQa:"rename_tab_modal",maxWidth:650,labelledby:s},n.createElement(_.rQ,null,n.createElement(_.Rc,{title:C.t("Name the channel tab"),id:s})),n.createElement(_.$m,null,n.createElement("div",{className:E().input},n.createElement(u.A,{className:"margin_bottom_50","aria-label":C.t("Channel tab name",{fallbackHashNs:"tabbed-channel",fallbackHash:"c36f4cb92387ddc2234cd719729bbc64ef517df4"}),inputRef:d,id:c,"data-qa":c,onChange:x,name:c,value:b,autoComplete:"off",focusOnMount:!0,useInlineAlert:!0}),b&&n.createElement(m.Nm,{className:E().inputClearButton,onClick:k,"data-qa":"search_input_clear","aria-label":C.t("Clear text")},C.t("Clear")),n.createElement("span",{className:E().description},C.t("People in this channel will see the list tab, but only people with access to the list in Salesforce will be able to see the list content.")))),n.createElement(_.jl,null,n.createElement(_.ox,{className:"display_flex align_items_center full_width"},n.createElement(p.A,{href:I},C.t("Edit access in Salesforce")),n.createElement("div",{className:"flex_one",role:"presentation"}),n.createElement(o.A,{type:"outline",onClick:S,"aria-label":C.t("Back")},C.t("Back")),n.createElement(o.A,{type:"primary",onClick:v,disabled:!b.trim(),autoClogProps:w,"aria-label":C.t("Add")},C.t("Add")))))};RenameSalesforceListTabModal.displayName="RenameSalesforceListTabModal";let k=(0,b.A)(RenameSalesforceListTabModal,{renderInChildWindow:!(0,f.A)(),modalName:"RenameSalesforceListTabModal"});RenameSalesforceListTabModal.displayName="RenameSalesforceListTabModal";var v=a(0x217d64ae8),S=a(0x256e816e),I=a(0x1d01572a2),w=a(0x21343fa5a),T=a(0x2b7f0bcc),N=a(0x1789e94fa),M=a(0x18776fee),R=a(0x1f0396942),P=a(0xe3ac081e),L=a(0x1befa7c4),O=a(0x188544c76),D=a(0x11c2f2e45),F=a(0xafce781a),U=a(0x5b1935a6),B=a(0x14236acae),H=a(0x1ee439e69),W=a(0xb4d0a8c2),V=a.n(W);let G=new l.Ay("recordchannels"),q={ListLoading:"list-loading",ErrorState:"error-state",ZeroEmpty:"zero-empty",NoRelatedListsEmptyState:"no-related-lists-empty-state",SearchHeaderRelatedList:"search-header-related-list",SearchHeaderSalesforceList:"search-header-salesforce-list",Footer:"list_view_page_footer",Zero:"zero",Controls:"controls",OnboardingMultiOrgCoachmark:"onboarding-multi-org-coachmark"},useRecordRelatedListsExplorer=({relatedListsCallback:e,channelId:t})=>{let a=(0,r.wA)(),i=(0,g.d4)(H.Dz);(0,I.A)(()=>{i&&a((0,F.iR)({event:{type:U.jo.REQUEST_SPACES,spaces:[U.xu.ADD_SALESFORCE_LIST_MODAL_HEADER]}}))});let{relatedListTabIds:l}=(0,v.r)(t),o=(0,g.d4)(e=>(0,D.Zl)(e,t)),s=(0,g.d4)(e=>(0,D.KP)(e,t)),c=(0,g.d4)(e=>(0,B.PQ)(e,s,!0)),{salesforceOrgId:d}=(0,O.D)(s),[m,u]=(0,n.useState)(null),[p,h]=(0,n.useState)([]),[_,f]=(0,n.useState)([]),[b,y]=(0,n.useState)(null),[A,x]=(0,P.V)(()=>a((0,R.S)({salesforceOrgId:d,parentObjectApiName:o,recordTypeId:c.record_type_id??void 0,reason:"use-record-related-lists-explorer"}))),E=(0,n.useCallback)(()=>{u(null),y(null),f(p)},[p]),C=(0,n.useCallback)(({userQuery:e,selectedIndex:t})=>{if(null===t)return;if(u(e),!e)return void E();let a=e.toLowerCase().split(" ");f(p.filter(({label:e,entity_plural_label:t})=>{let n=e?.toLowerCase()||t.toLowerCase();return a.some(e=>n.includes(e))}))},[E,p,f]),k=(0,n.useMemo)(()=>({allowEmptyQuery:!1,entities:{},returnMetadata:!1}),[]),S=(0,n.useCallback)(e=>{y(e.id)},[y]);(0,w.A)(()=>{x().then(({related_lists:t})=>{h(t),f(t),e(t)})});let W=(0,n.useMemo)(()=>i?[{key:"education-banner",type:L.MA.GenericFullWidthComponent,data:{component:n.createElement(N.A,{...M.F,location:"AddRelatedList",salesforceOrgId:d})},role:L.N3.Presentation,fullWidth:!0}]:[],[i,d]),j=(0,n.useMemo)(()=>A.isLoading?[{key:q.ListLoading,type:L.MA.ListLoading,role:L.N3.Presentation,scrollToTop:!0}]:A.error?[{key:q.ErrorState,type:L.MA.Alert,role:L.N3.Presentation,data:{type:T.QE.inlineBoxed,align:T.AO.center,children:G.t("Error fetching related list from Salesforce. Try again later."),level:T.A_.error,icon:"info-circle","data-qa":q.ErrorState,className:V().error_state_related_list},scrollToTop:!0}]:0===_.length&&m?[{key:q.ZeroEmpty,type:L.MA.EmptyState,data:{className:"p-list_view_browser__empty_state--wide",title:G.t("No results"),description:G.t("You may want to try adjusting your search term.")},role:L.N3.Presentation}]:0!==_.length||m?_.map((e,t)=>{let a=l.includes(e.related_list_id);return{key:e.related_list_id,type:L.MA.RecordRelatedListResult,data:{isFirst:0===t,isLast:t===_.length-1,relatedListLabel:e?.label||e.entity_plural_label,isActiveItem:!a&&b===e.related_list_id,hintText:a?G.t("Already added"):void 0},onListItemSelect:S,autoClogProps:{elementValue:e.related_list_id,elementName:"available_related_list_type"},role:L.N3.ListItem}}):[{key:q.NoRelatedListsEmptyState,type:L.MA.EmptyState,data:{className:"p-list_view_browser__empty_state--wide",description:G.t("There aren\u2019t any related lists assigned to this record."),"data-qa":q.NoRelatedListsEmptyState},role:L.N3.Presentation}],[m,A.error,A.isLoading,_,S,l,b]);return(0,n.useCallback)(()=>({isZeroState:!m,rows:[...W,...j],onSearch:C,onResetSearch:E,searcherOptions:k}),[m,W,E,C,j,k])};useRecordRelatedListsExplorer.displayName="useRecordRelatedListsExplorer";var j=a(0x10beb4c1b),z=a(0x1c1c45c18),K=a(0x234d0f539),$=a(0x22bbc5c16),Y=a.n($);let Q=new l.Ay("recordchannels"),BaseSalesforceListViewPicker=({channelId:e,onInsertRelatedList:t,onInsertSalesforceList:a})=>{let l=(0,r.wA)(),m="list_picker_modal_label_id",u=c.i.PickerModal,p=(0,d.Y)(u),f=(0,g.d4)(e=>(0,K.V1)(e,p)),b=(0,g.d4)(e=>(0,K.QI)(e,p)),{salesforceListTabIds:y,relatedListTabIds:x}=(0,v.r)(e),E=(0,g.d4)(K.Up),C=(0,n.useMemo)(()=>Object.values(E),[E]),S=(0,g.d4)(t=>(0,j.J)(t,{channelId:e})),[I,w]=(0,n.useState)([]),T=(0,n.useCallback)(e=>{w(e)},[]),N=(0,n.useCallback)(e=>{let t=e.id,a=!Object.values(q).includes(t),n=t.split("-"),r=a&&n.length>=3,i=r?y:x,o=r?n[1]:n[0];(r?y.some(e=>(0,O.D)(e).rawRecordId===o):i.includes(o))?l((0,z._X)({instanceKey:p,listViewId:void 0,listViewType:void 0})):a&&l((0,z._X)({instanceKey:p,listViewId:o,listViewType:r?h.q.StandaloneList:h.q.RelatedList}))},[l,p,x,y]),M=(0,n.useMemo)(()=>({elementName:`insert_${h.q.RelatedList}`,elementValue:f,onClick:{enableClogAction:!0}}),[f]),R=(0,n.useCallback)(({listId:e})=>{if(!e)return;let a=(0,i.A)(I,t=>t.related_list_id===e)||{entity_label:"",entity_plural_label:"",related_list_id:"",object_api_name:""};t({data:a,label:a?.label||a.entity_plural_label}),l((0,A.O)())},[l,t,I]),P=(0,n.useCallback)(({listId:e})=>{let t=(0,i.A)(C,t=>t.id===e)||{id:"",objectType:"",label:"",url:"",salesforceOrgId:""};return{...t,salesforceOrgId:t.salesforceOrgId}},[C]),L=(0,n.useCallback)(({listId:n})=>{n&&l(k({selectedSalesforceListViewData:P({listId:n}),onInsertRelatedList:t,onInsertSalesforceList:a,channelId:e}))},[l,P,t,a,e]),D=(0,n.useCallback)(({listId:e,listType:t})=>{let a=e||f,n=t||b;if(a)return n===h.q.StandaloneList?L({listId:a}):R({listId:a})},[f,b,R,L]);return(0,n.useEffect)(()=>()=>{l((0,z._X)({instanceKey:p,listViewId:void 0,listViewType:void 0}))},[l,p]),n.createElement(_.aF,{dataQa:"salesforce_list_picker--modal",maxWidth:650,labelledby:m,className:Y().modal},n.createElement(_.rQ,{className:Y().header},n.createElement(_.Rc,{title:Q.t("Add a Salesforce list"),id:m})),n.createElement(_.$m,{className:Y().content},n.createElement(s.Y,{hidePageTitle:!0,onListItemSelect:N,onListItemAdd:D,origin:u,channelId:e,relatedListsCallback:T,salesElevateOrgsOnly:!1})),n.createElement(_.jl,{className:Y().footer},n.createElement(_.ox,null,n.createElement(_.s_,{type:"outline","aria-label":Q.t("Cancel")},Q.t("Cancel")),n.createElement(o.A,{type:"primary",onClick:D,disabled:!b||!f,autoClogProps:b===h.q.RelatedList?M:void 0,"aria-label":S?Q.t("Add"):Q.t("Insert")},S?Q.t("Add"):Q.t("Insert")))))};BaseSalesforceListViewPicker.displayName="BaseSalesforceListViewPicker";let SalesforceListViewPicker=e=>n.createElement(S.G,null,n.createElement(BaseSalesforceListViewPicker,e));SalesforceListViewPicker.displayName="SalesforceListViewPicker";let Z=(0,b.A)(SalesforceListViewPicker,{renderInChildWindow:!(0,f.A)()}),J=(0,b.A)(SalesforceListViewPicker,{renderInChildWindow:!(0,f.A)(),isStackable:!0});var X=a(0x91728dda),ee=a(0x19d27e99e),et=a(0x84a5226c),ea=a(0x3711e82d),en=a(0x1950da728);let er=new l.Ay("recordchannels"),RecordRelatedListPicker=({channelId:e,onInsertList:t})=>{let a=(0,r.wA)(),[l,s]=(0,n.useState)(void 0),c="list_picker_modal_label_id",{relatedListTabIds:d}=(0,v.r)(e),[m,u]=(0,n.useState)([]),p=useRecordRelatedListsExplorer({relatedListsCallback:(0,n.useCallback)(e=>{u(e)},[]),channelId:e}),h=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,n.createElement(et.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),[...Array(18)].map((e,t)=>n.createElement(et.A,{key:t,className:"p-explorer_result--list"})),n.createElement(et.A,{className:"p-explorer_result--list p-explorer_result--list--last"})),[]),f=(0,n.useCallback)(({item:e})=>{d.includes(e)?s(void 0):s(e)},[d]),b=(0,n.useMemo)(()=>({elementName:"insert_related_list",elementValue:l,onClick:{enableClogAction:!0}}),[l]),g=(0,n.useCallback)(()=>{if(l){a((0,A.O)());let e=(0,i.A)(m,e=>e.related_list_id===l)||{entity_label:"",entity_plural_label:"",related_list_id:"",object_api_name:""};t({data:e,label:e?.label||e.entity_plural_label})}},[a,t,m,l]);return n.createElement(_.aF,{dataQa:"record_related_list_picker--modal",maxWidth:650,labelledby:c,className:Y().modal},n.createElement(_.rQ,{className:Y().header},n.createElement(_.Rc,{title:er.t("Add related list"),id:c})),n.createElement(_.$m,{className:Y().content},n.createElement(ee.A,{useExplorer:p,listLoadingFragment:h,inputId:en.Jx.RELATED_LISTS_EXPLORER,inputSearchyMode:en.R5.DEFAULT,inputPlaceholderText:er.t("Search for a related list by name"),resultListAriaLabel:er.t("Lists results",{fallbackHash:"d4af0c72e277ad84c290cd67e1dcf95ce72b9761",fallbackHashNs:"slack_docs"}),clogUiPage:ea.UiPage.RECORD_RELATED_LISTS_BROWSER,context:"related_list_picker",onItemSelected:f,backgroundTint:!1,inputPreventUpstreamSync:!0})),n.createElement(_.jl,{className:Y().footer},n.createElement(_.ox,null,n.createElement(_.s_,{type:"outline","aria-label":er.t("Cancel")},er.t("Cancel")),n.createElement(o.A,{type:"primary",onClick:g,disabled:!l||Object.values(q).includes(l),autoClogProps:b,"aria-label":er.t("Insert")},er.t("Insert")))))};RecordRelatedListPicker.displayName="RecordRelatedListPicker";let ei=(0,b.A)(RecordRelatedListPicker,{renderInChildWindow:!(0,f.A)()}),el=(0,b.A)(RecordRelatedListPicker,{renderInChildWindow:!(0,f.A)(),isStackable:!0});RecordRelatedListPicker.displayName="RecordRelatedListPicker";var eo=a(0x1786eb8be),es=a(0x95a18a22),ec=a(0x7bfcb519),ed=a(0xc0b7c558),em=a(0x1ab61ed0d),eu=a(0x609b6779),ep=a(0x74e7afbd),eh=a(0x74bbb29a);let useCreateSalesforceListTab=(e,t)=>{let a=(0,r.wA)(),i=(0,g.d4)(X.hx),l=(0,g.d4)(eo.f5);i&&a((0,eu.S)({reason:"salesforce-list-view-picker"}));let o=(0,n.useCallback)(({data:n,label:r,salesforceOrgId:i})=>{let l="create-salesforce-list-tab",o=n.object_api_name||"",s=(0,ed.j)(i,n.salesforce_list_view_id);return(t?.isFromAutoSlackLaunchpad&&a((0,ep.c)({machineName:eh.qO.AUTOSLACK_ONBOARDING_LAUNCHPAD_SALESFORCE_LISTS_BUTTON})),t?.preventNavigation)?a((0,em.Z)({channelId:e,type:ec.Xy.SalesforceListView,data:{salesforceListViewId:s,objectType:o},label:r,reason:l})):a((0,es.P)({channelId:e,type:ec.Xy.SalesforceListView,data:{salesforceListViewId:s,objectType:o},label:r,reason:l}))},[t,a,e]),s=(0,n.useCallback)(({data:n,label:r})=>{let i="create-related-list-tab",l=n.object_api_name||"";return(t?.isFromAutoSlackLaunchpad&&a((0,ep.c)({machineName:eh.qO.AUTOSLACK_ONBOARDING_LAUNCHPAD_SALESFORCE_LISTS_BUTTON})),t?.preventNavigation)?a((0,em.Z)({channelId:e,type:ec.Xy.RecordRelatedList,data:{recordRelatedListId:n.related_list_id,objectType:l},label:r,reason:i})):a((0,es.P)({channelId:e,type:ec.Xy.RecordRelatedList,data:{recordRelatedListId:n.related_list_id,objectType:l},label:r,reason:i}))},[t,a,e]);return(0,n.useCallback)(()=>{l?a((t?.isStackable?J:Z)({channelId:e,onInsertSalesforceList:o,onInsertRelatedList:s})):a((t?.isStackable?el:ei)({channelId:e,onInsertList:s}))},[e,a,t?.isStackable,l,s,o])};useCreateSalesforceListTab.displayName="useCreateSalesforceListTab"},0x1aa98de78:(e,t,a)=>{"use strict";a.d(t,{n:()=>useCreateWorkflow});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1c760ba43),l=a(0x15d55664b),o=a(0x1a02c72b5),s=a(0xd6a16321),c=a(0x22fb75fe3),d=a(0x3711e82d),m=a(0x18c9d2489);function useCreateWorkflow(e,t){let a=(0,r.wA)(),u=l.Ay;return t&&(u=l.LP),(0,n.useCallback)(()=>a(u({source:d.UiPage.CHANNEL_WORKFLOWS,frecency:!0,includeAutomatedTriggers:!0,onInsertWorkflow:(n,r)=>a((0,m.VV)({channelId:e,type:c.x.SHORTCUT,title:r?.name??n,reason:"channel-tab-add-bookmark",shortcutId:n,url:r?.shortcut_url})).then(()=>t?Promise.resolve():a((0,o.o)((0,s.id)(e,{tabId:i.fY.Workflows}))))})),[a,u,e,t])}},0x41c2cf5b:(e,t,a)=>{"use strict";a.d(t,{Y:()=>useCurrentChannelTabId});var n=a(0xbad225b5),r=a(0xaed97e33);function useCurrentChannelTabId(){let{currentTabId:e}=(0,n.useContext)(r.d);return e}},0x1e19d7430:(e,t,a)=>{"use strict";a.d(t,{u:()=>useCurrentlySelectedTab});var n=a(0xbad225b5),r=a(0x41c2cf5b),i=a(0x24cf04c24),l=a(0xaed97e33),o=a(0xf5bbd10a),s=a(0x226892387);function useCurrentlySelectedTab(){let e=(0,o.A)(),{channelId:t}=(0,n.useContext)(l.d),a=(0,r.Y)(),c=(0,s.d4)(e=>{if(t)return(0,i.b)(e,{channelId:t,currentTabId:a})});if(t)return c||e.error(Error("No current channel tab selected.")),c}},0x7dc98d62:(e,t,a)=>{"use strict";a.d(t,{N:()=>useDefaultFolderForChannel});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xd473073a),l=a(0x1c760ba43);let o=new r.Ay("tabbed-channel"),useDefaultFolderForChannel=({channelId:e})=>{let t=(0,i.g)(e);return(0,n.useMemo)(()=>{let e=t.filter(e=>e.type===l.Xy.Folder),a=e.findIndex(e=>!e.data?.folderBookmarkId),n=a>-1?e[a]:void 0,r=n?.label||o.t("Bookmarks");return{tab:n,label:r,folderIndex:a}},[t])}},0xd473073a:(e,t,a)=>{"use strict";a.d(t,{g:()=>useDynamicChannelTabs});var n=a(0xbad225b5),r=a(0x1df96de4c),i=a(0x11ed04fa0),l=a(0xb28e7c89),o=a(0x226892387),s=a(0x217553e42);function useDynamicChannelTabs(e){let t=(0,o.d4)(t=>(0,s.OL)(t,e,!1)),a=(0,o.d4)(a=>(0,i.xA)(a,t)?(0,l.G)(a,e):r.Ml);return(0,n.useMemo)(()=>t?[...a?.filter(e=>!e.isDisabled)||[]]:[],[a,t])}},0x18bfdc00c:(e,t,a)=>{"use strict";a.d(t,{T:()=>u,a:()=>useFolder});var n,r=a(0xbad225b5),i=a(0x1df96de4c),l=a(0xeeb01a46),o=a(0xfce322e2),s=a(0x22fb75fe3),c=a(0x226892387),d=a(0x233157fdc),m=a(0x23587e872),u=((n={}).FILE="FILE",n.HEADING="HEADING",n.LINK="LINK",n.INFO="INFO",n.FILES_UPLOADING="FILES_UPLOADING",n);let getRowVariant=(e,t)=>1===t?"single":0===e?"first":e===t-1?"last":"middle",useFolder=({channelId:e,folderBookmarkId:t,folderName:a,includeHeader:n=!0,includeInfo:u=!0})=>{let p=(0,c.d4)(t=>(0,d.M4)(t,{channelId:e})),h=(0,c.d4)(e=>(0,m.cq)(e,t)),_=h?.tempFileIds??i.Ml,f=null===p,b=(0,r.useMemo)(()=>!p||"error"in p||p.isNonExistent?null:p,[p]),g=(0,r.useMemo)(()=>b?Object.values(b):[],[b]),y=(0,r.useMemo)(()=>{let e=g.filter(e=>!!(0,o.x)(g,e)&&e.type!==s.x.FOLDER&&(!t&&!e.parentId||t===e.parentId));return(0,l.lx)(e)},[g,t]),A=(0,r.useMemo)(()=>g.filter(e=>e.parentId===t).some(e=>e.type===s.x.SHORTCUT||e.type===s.x.AUTO_GEN_SHORTCUT||e.type===s.x.LEGACY_WORKFLOW||e.type===s.x.AUTO_GEN_LEGACY_WORKFLOW),[g,t]),x=(0,r.useMemo)(()=>{let e=n?[{key:"heading",label:a,type:"HEADING"}]:[];return A&&u&&e.push({key:"workflows-in-folder-info-banner",type:"INFO"}),[...y,..._].forEach((t,a,n)=>{"string"!=typeof t&&"string"!=typeof t&&t?.id!==void 0&&t?.type!==void 0?e.push({bookmark:t,key:t.id,renderedInListVariant:getRowVariant(a,n.length),type:t.type===s.x.LINK?"LINK":"FILE"}):"string"==typeof t&&e.push({key:t,type:"FILES_UPLOADING",renderedInListVariant:getRowVariant(a,n.length)})}),e},[y,a,A,n,u,_]),E=(0,r.useMemo)(()=>x.map(e=>e.key),[x]);return{isEmpty:!y.length&&!h?.tempFileIds?.length,isLoading:f,keys:E,rows:x,bookmarks:p,hasBookmarkedWorkflows:A}}},0xc00d891a:(e,t,a)=>{"use strict";a.d(t,{L:()=>useFoldersForChannel});var n=a(0xbad225b5),r=a(0xd473073a),i=a(0xfce322e2),l=a(0x22fb75fe3),o=a(0x226892387),s=a(0x233157fdc),c=a(0xe0477493),d=a(0x237a55f00);let m=new Set([c.R.FILE_COMMENT]),useFoldersForChannel=({channelId:e})=>{let{folders:t,isLoading:a}=(({channelId:e})=>{let t=(0,o.d4)(t=>(0,d.jR)(t,e)),a=(0,o.d4)(t=>(0,s.M4)(t,{channelId:e})),r=(0,n.useMemo)(()=>t?.filter(e=>!m.has(e.type)),[t]),c=(0,o.d4)(t=>(0,d.A_)(t,e)),u=null===a,p=(0,n.useMemo)(()=>!a||"error"in a||a.isNonExistent?null:a,[a]),h=(0,n.useMemo)(()=>p?Object.values(p):[],[p]),_=(0,n.useMemo)(()=>h.filter(e=>(0,i.x)(h,e)).sort((e,t)=>{let a=e.title??e.url,n=t.title??t.url;return a.localeCompare(n)}),[h]),f=(0,n.useMemo)(()=>_.filter(e=>!e.parentId),[_]);return{bookmarksState:p,folders:(0,n.useMemo)(()=>f.filter(e=>e.type===l.x.FOLDER),[f]),pinnedItems:r,sortedBookmarks:_,topLevelBookmarks:f,isLoading:"loaded"!==c||u}})({channelId:e}),c=(0,r.g)(e);return(0,n.useMemo)(()=>({folders:t.sort((e,t)=>c.findIndex(t=>t.data?.folderBookmarkId===e.id)-c.findIndex(e=>e.data?.folderBookmarkId===t.id)),isLoading:a}),[t,a,c])}},0x2493bd395:(e,t,a)=>{"use strict";a.d(t,{i:()=>useGetTabs});var n=a(0x1df96de4c),r=a(0x990bc6be),i=a(0x16ed1b0dc),l=a(0x226892387);function useGetTabs(e,t){let a=(0,i.A)(e);return(0,l.d4)(i=>a?t?(0,r.v)(i,{channelId:e}):(0,r.G)(i,{channelId:e}):n.Ml)}},0xe083fb5a:(e,t,a)=>{"use strict";a.d(t,{V:()=>useIsViewInAChannelTab});var n=a(0x1b08f0db6);function useIsViewInAChannelTab(){let e=(0,n.m)();return!!e?.params?.tabId}},0x579a6c21:(e,t,a)=>{"use strict";a.d(t,{b:()=>usePrefillDmCanvasChannelTab});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x990bc6be),l=a(0x1c760ba43),o=a(0x226892387),s=a(0x113d1778),c=a(0x18a17ca8f);function usePrefillDmCanvasChannelTab(e){let t=(0,r.wA)(),a=(0,o.d4)(c.lh),d=(0,o.d4)(t=>(0,i.G)(t,{channelId:e??""})),m=(0,n.useCallback)(()=>{t((0,s.PC)(!0))},[t]);return{addCanvasTabHighlight:m,clearCanvasTabHighlight:(0,n.useCallback)(()=>{a&&t((0,s.PC)(!1))},[a,t]),shouldShowPrefillDmCanvasTabHighlight:(0,n.useCallback)(e=>d.some(({id:t,type:a})=>a===l.Xy.Canvas&&t===e)&&a,[d,a])}}},0x154eaa784:(e,t,a)=>{"use strict";a.d(t,{T:()=>useRemoveTab});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x217a7a62d),l=a(0x130c2e810),o=a(0x20482ad21),s=a(0xce378727),c=a(0x1c7997c1),d=a(0x1b9d5cc0c),m=a(0x20e80190e),u=a(0x14cb5efef),p=a(0x226892387),h=a(0xe684f705),_=a(0x1fcbb004d);let f=new o.Ay("channel_tabs"),CannotDeleteCkaFolderModal=()=>{let e=(0,p.d4)(u.N),t=(0,p.d4)(t=>(0,h.nv)(t,e)),a=(0,d.wg)(t),i=(0,r.wA)(),l=(0,n.useCallback)(()=>i((0,_.O)()),[i]);return n.createElement(m.aF,{isOpen:!0,centered:!0},n.createElement(m.rQ,null,n.createElement(m.Rc,{title:f.t("You\u2019ll need to remove the {agentName} agent first",{agentName:a})})),n.createElement(m.$m,null,n.createElement(c.A,null,f.t("The {agentName} uses this folder to generate replies. Remove the agent in channel settings first, then you can remove this folder.",{agentName:a}))),n.createElement(m.jl,null,n.createElement(m.ox,null,n.createElement(s.A,{type:"primary",onClick:l},f.t("OK")))))};CannotDeleteCkaFolderModal.displayName="CannotDeleteCkaFolderModal";var b=a(0x303de21b),g=a(0x121a53a99),y=a(0x11c82607b),A=a(0x46dbff89);let x=(0,y.Ay)("Potentially show a modal that tells the user they cannot delete the CKA folder",async(e,t,{tabId:a,channelId:r,removeTab:o})=>{let s=t(),c=(0,i.nj)(s,r),m=(0,u.wL)(s),p=(0,l.ls)(s,m),h=(0,i.Qh)(s,r),_=(0,g.fj)(p),f=a&&a===c?.id;if(!m||!f||!h||"selected_sources"!==h.knowledge_source||!(await e((0,b.AD)({channelId:r,searchQuery:_,filter:"apps"}))).members.some(e=>(0,d.PV)(e)===m))return o();e((0,A.q)({element:n.createElement(CannotDeleteCkaFolderModal,null)}))});x.meta={name:"maybeShowCannotDeleteCkaFolder",key:"createThunkMaybeShowCannotDeleteCkaFolder",description:"Potentially show a modal that tells the user they cannot delete the CKA folder"};var E=a(0x10bae7b36),C=a(0x937dca65),k=a(0xc693ee83),v=a(0x871b0727),S=a(0x12185e091),I=a(0xbd3de346),w=a(0x217553e42),T=a(0x14149c126),N=a(0x14ea3ce99);let M=new o.Ay("channel_tabs"),RemoveFileTabConfirmationModal=({channelId:e,tab:t,noOptimisticUpdate:a,elementName:i,onRemoveTab:l})=>{let o=(0,r.wA)(),s=(0,p.d4)(t=>(0,w.OL)(t,e)),c=(0,p.d4)(e=>t.data?.fileId?(0,N.Lp)(e,t.data.fileId):null),d=(0,p.d4)(e=>"on"===(0,T._Z)(e,"channel_tabs_polish")),u=(0,n.useCallback)(n=>{o((0,v.i)({channelId:e,tabId:t.id,noOptimisticUpdate:a,elementName:i,keepFileShare:n})),o((0,_.O)()),l?.()},[o,e,t.id,a,i,l]),h=(0,n.useCallback)(()=>{u()},[u]),f=(0,n.useCallback)(()=>{u(!0)},[u]),b=(0,n.useCallback)(()=>{o((0,_.O)())},[o]),renderDescription=()=>{if(!d)return null;if((0,S.JM)(s))return n.createElement("p",null,M.rt("Since it hasn\u2019t been shared anywhere else in this conversation, you can remove access if you\u2019d like."));let e=n.createElement("span",null,n.createElement(k.A,{channel:s}),n.createElement(C.A,{channel:s,displayFormerNames:!1,bold:!1}));return n.createElement("p",null,M.rt("Since it hasn\u2019t been shared anywhere else in {channelName}, you can remove access if you\u2019d like.",{channelName:e}))};return renderDescription.displayName="renderDescription",n.createElement(E.A,{title:d?(0,I.DQ)(c)?M.t("Also remove access to this canvas?"):(0,I.l7)(c)?M.t("Also remove access to this list?"):null:null,submitButtonText:M.t("Remove"),showCancelButton:!0,cancelButtonText:M.t("Keep"),submitButtonType:"primary",onSubmit:h,onCancel:f,onClose:b},n.createElement(m.$m,null,renderDescription()))};RemoveFileTabConfirmationModal.displayName="RemoveFileTabConfirmationModal";var R=a(0x109607538);let P=(0,y.Ay)("Maybe open remove file tab confirmation modal",async(e,t,{channelId:a,tab:r,noOptimisticUpdate:i,elementName:l,onRemoveTab:o})=>{let s=t(),submitDeletion=()=>{let t=e((0,v.i)({channelId:a,tabId:r.id,noOptimisticUpdate:i,elementName:l}));return t?.then(()=>{o?.()})};if("on"!==(0,T._Z)(s,"channel_tabs_polish"))return submitDeletion();let c=r.data?.fileId?(0,N.Lp)(s,r.data.fileId):null;return!c?.id||!(0,I.DQ)(c)&&!(0,I.l7)(c)||(await e((0,R.H)({fileId:c.id,channelId:a,excludeChannelTabShares:!0,reason:"remove_file_tab_confirmation_modal"}))).has_shares||(0,I.Si)(c)?submitDeletion():e((0,A.q)({element:n.createElement(RemoveFileTabConfirmationModal,{channelId:a,tab:r,noOptimisticUpdate:i,elementName:l,onRemoveTab:o}),isStackable:!0}))});P.meta={name:"maybeOpenRemoveFileTabConfirmationModal",key:"createThunkMaybeOpenRemoveFileTabConfirmationModal",description:"Maybe open remove file tab confirmation modal"};let L=new o.Ay("channel_tabs"),TabDeleteConfirmationModal=({channelId:e,tab:t,bookmarksCount:a,noOptimisticUpdate:i,elementName:l,onRemoveTab:o})=>{let s=(0,r.wA)(),c=(0,p.d4)(t=>(0,w.OL)(t,e)),d=(0,n.useCallback)(()=>{s((0,v.i)({channelId:e,tabId:t.id,noOptimisticUpdate:i,elementName:l})),s((0,_.O)()),o?.()},[s,e,t.id,i,l,o]),u=(0,n.useCallback)(()=>{s((0,_.O)())},[s]),h=L.t("Are you sure you want to delete this folder with {bookmarksCount, plural, =1 {1 item} other {# items}}?",{bookmarksCount:a}),f=L.rt("Deleting <b>{folderName}</b> from <b>{channelName}</b> will unshare any files and remove saved links for all members of the channel.",{folderName:t.label,channelName:n.createElement(C.A,{channel:c,includeChannelPrefix:!0,bold:!1})});return n.createElement(E.A,{title:h,submitButtonText:L.t("Delete"),showCancelButton:!0,submitButtonType:"danger",onSubmit:d,onCancel:u,onClose:u},n.createElement(m.$m,null,n.createElement("p",null,f)))};TabDeleteConfirmationModal.displayName="TabDeleteConfirmationModal";var O=a(0x1e19d7430),D=a(0x2493bd395),F=a(0x11ed04fa0),U=a(0x8b60780c),B=a(0x1c760ba43),H=a(0x233157fdc);function useRemoveTab(e,t,a){let l=(0,r.wA)(),o=(0,r.Pj)(),s=(0,D.i)(e),c=(0,O.u)(),d=t??c?.id,m=!!(0,i.nj)(o.getState(),e),u=(0,p.d4)(e=>"on"===(0,T._Z)(e,"channel_tabs_polish")),h=(0,n.useCallback)(({id:t,noOptimisticUpdate:n,elementName:r})=>{let i=l((0,v.i)({channelId:e,tabId:t,noOptimisticUpdate:n,elementName:r}));return i?.then(()=>{a?.()})},[e,l,a]),_=(0,n.useCallback)(({id:t,removedTab:r,noOptimisticUpdate:i,elementName:s})=>{let c=o.getState(),d=(0,H.Iz)(c,{channelId:e,folderBookmarkId:r?.data?.folderBookmarkId});return r?0===d?h({id:t,noOptimisticUpdate:i,elementName:s}):(l((0,A.q)({element:n.createElement(TabDeleteConfirmationModal,{channelId:e,tab:r,bookmarksCount:d,noOptimisticUpdate:i,elementName:s,onRemoveTab:a}),isStackable:!0})),Promise.resolve()):Promise.reject()},[e,l,o,h,a]),f=(0,n.useCallback)(({removedTab:t,noOptimisticUpdate:n,elementName:r,skipNavigation:i})=>{if(!t)return Promise.reject();let o=(0,F.Fi)(s,B.fY.Channel);return l(P({channelId:e,tab:t,noOptimisticUpdate:n,elementName:r,onRemoveTab:()=>{d!==t.id||i||l((0,U.D)({channelId:e,tab:o,tabId:B.fY.Channel})),a?.()}}))},[e,l,a,d,s]),b=(0,n.useCallback)(({id:t,noOptimisticUpdate:a,elementName:n,skipNavigation:r})=>{let i=(0,F.Fi)(s,t),o=(0,F.Fi)(s,B.fY.Channel);return i?.type===B.Xy.Folder?_({id:t,removedTab:i,noOptimisticUpdate:a,elementName:n}):u&&(i?.type===B.Xy.Canvas||i?.type===B.Xy.List)?f({removedTab:i,noOptimisticUpdate:a,elementName:n,skipNavigation:r}):(d===t&&(i||t===B.fY.ChannelCanvas)&&!r&&l((0,U.D)({channelId:e,tab:o,tabId:B.fY.Channel})),h({id:t,noOptimisticUpdate:a,elementName:n}))},[s,d,h,l,e,_,u,f]);return(0,n.useCallback)(({id:t,noOptimisticUpdate:a,elementName:n,skipNavigation:r})=>m?l(x({tabId:t,channelId:e,removeTab:()=>b({id:t,noOptimisticUpdate:a,elementName:n,skipNavigation:r})})):b({id:t,noOptimisticUpdate:a,elementName:n,skipNavigation:r}),[m,l,e,b])}useRemoveTab.displayName="useRemoveTab"},0x108a078ae:(e,t,a)=>{"use strict";a.d(t,{S:()=>useTabIconProps});var n=a(0xe1644a69),r=a(0x1c760ba43),i=a(0xf5bbd10a);function useTabIconProps(e,t){let a=(0,i.A)(),l=(0,n.T)({type:"summary",useFilledIcon:t});switch(e.type){case r.Xy.Bookmarks:return{name:t?"pin-filled":"pin",size:"16"};case r.Xy.Canvas:return{name:t?"canvas-content-filled":"canvas-content",size:"16"};case r.Xy.Channel:return{name:t?"message-filled":"message",size:"16"};case r.Xy.ChannelCanvas:return{name:t?"canvas-content-filled":"canvas-content",size:"16"};case r.Xy.CreateCanvas:return{name:"add-channel-canvas",size:"16"};case r.Xy.ExternalFiles:return{name:t?"file-filled":"file",size:"16"};case r.Xy.Files:return{name:t?"file-browser-filled":"file-browser",size:"16"};case r.Xy.Folder:return{name:t?"folder-open-filled":"folder",size:"16"};case r.Xy.List:return{name:t?"lists-filled":"lists",size:"16"};case r.Xy.RecordOverview:return{name:t?"sf-record-filled":"sf-record",size:"16"};case r.Xy.RecordSummary:return{...l,size:"16"};case r.Xy.Pins:return{name:t?"pin-filled":"pin",size:"16"};case r.Xy.Workflows:return{name:t?"bolt-filled":"bolt",size:"16"};case r.Xy.SalesforceListView:case r.Xy.RecordRelatedList:return{name:t?"sf-record-list-filled":"sf-record-list",size:"16"};case r.Xy.Threads:case r.Xy.RecordRelatedConversations:return{name:t?"threads-filled":"threads",size:"16"};case r.Xy.Agent:return{name:"bot",size:"16"};case r.Xy.SlackbotAiConversation:return{name:t?"message-filled":"message",size:"16"};case r.Xy.SlackbotAiHistory:return{name:t?"clock-filled":"clock",size:"16"};case r.Xy.SlackbotAiSkills:return{name:t?"ai-sparkle-alt-filled":"ai-sparkle-alt",size:"16"};case r.Xy.SlackbotAiAutomations:return{name:t?"ai-workflow-filled":"ai-workflow",size:"16"};case r.Xy.Huddles:return{name:t?"headphones-filled":"headphones",size:"16"};case r.Xy.AppHome:return{name:t?"home-filled":"home",size:"16"};case r.Xy.AppAbout:return{name:t?"info-filled":"info",size:"16"};case r.Xy.AppChat:return{name:t?"message-filled":"message",size:"16"};case r.Xy.AppHistory:return{name:t?"threads-filled":"threads",size:"16"};case r.Xy.AppMemories:return{name:t?"bookmark-filled":"bookmark",size:"16"};case r.Xy.AppTasks:return{name:t?"check-circle-filled":"check-circle",size:"16"};default:a.warn(`No icon props defined for tab type: ${e.type}`)}}},0x1d982d12d:(e,t,a)=>{"use strict";a.d(t,{Y:()=>r});var n=a(0xc4c44125);let r=(0,a(0x1cf0d97e1).Ay)((e,t)=>!!t&&(0,n.M)(e,{channelId:t}).length>=15);r.meta={name:"getChannelHasReachedFeaturedWorkflowLimit",key:"createSelectorGetChannelHasReachedFeaturedWorkflowLimit",description:(e,t)=>!!t&&(0,n.M)(e,{channelId:t}).length>=15}},0x267897ec:(e,t,a)=>{"use strict";a.d(t,{t:()=>s});var n=a(0x5739d664),r=a(0xb28e7c89),i=a(0x1c760ba43),l=a(0x1cf0d97e1);let o=(0,n.A)(e=>e.filter(e=>e.type===i.Xy.Folder)),s=(0,l.Ay)((e,t)=>o((0,r.G)(e,t)));s.meta={name:"getFolderTabs",key:"createSelectorGetFolderTabs",description:(e,t)=>o((0,r.G)(e,t))}},0xaed97e33:(e,t,a)=>{"use strict";a.d(t,{H:()=>TabbedChannelProvider,d:()=>l});var n=a(0xbad225b5),r=a(0xf4d381c8),i=a(0x1c760ba43);let l=(0,n.createContext)({});function TabbedChannelProvider({channelId:e,currentTabId:t,children:a}){let o=(0,n.useMemo)(()=>({channelId:e,currentTabId:t??i.fY.Channel}),[e,t]);return e?n.createElement(l.Provider,{value:o},n.createElement(r.j.Provider,{value:o},a)):a}TabbedChannelProvider.displayName="TabbedChannelProvider"},0x95a18a22:(e,t,a)=>{"use strict";a.d(t,{P:()=>s});var n=a(0x20bafd237),r=a(0x11ed04fa0),i=a(0x8b60780c),l=a(0x11c82607b),o=a(0x1ab61ed0d);let s=(0,l.Ay)("Adds a tab to a channel and navigates to that tab",(e,t,{channelId:a,type:l,label:s,fileId:c,accessLevel:d,data:m,reason:u="add-channel-tab",showToastOnError:p=!0})=>{let h=c||d||m?{channelId:a,type:l,label:s,data:{fileId:c,accessLevel:d,...m},reason:u,showToastOnError:p}:{channelId:a,label:s,type:l,reason:u,showToastOnError:p};return e((0,o.Z)(h)).then(t=>{let l=t.tabz,o=(0,n.A)(l);if(c&&!m?.listsChannelTabDefaultRefineViewId?o=l?.find(({data:e})=>e?.file_id===c&&!e?.lists_channel_tab_default_refine_view_id):m?.recordRelatedListId?o=l?.find(({data:e})=>e?.record_related_list_id===m.recordRelatedListId):m?.salesforceListViewId?o=l?.find(({data:e})=>e?.salesforce_list_view_id===m.salesforceListViewId):c&&m?.listsChannelTabDefaultRefineViewId&&(o=l?.find(({data:e})=>e?.file_id===c&&e?.lists_channel_tab_default_refine_view_id===m?.listsChannelTabDefaultRefineViewId)),o){let t=(0,r._f)(o);e((0,i.D)({tabId:t.id,tab:o,channelId:a}))}return t}).catch(e=>{throw e})});s.meta={name:"addTabToChannelAndNavigate",key:"createThunkAddTabToChannelAndNavigate",description:"Adds a tab to a channel and navigates to that tab"}},0x165af5ef7:(e,t,a)=>{"use strict";a.d(t,{e:()=>f});var n=a(0x21f3c49e8),r=a(0x14d4b0787),i=a(0x1f3226107),l=a(0x115aa5ac3),o=a(0x4965b489),s=a(0xbd3de346),c=a(0x1c450e1a),d=a(0x124cb69d5),m=a(0x183b9ee61),u=a(0x9b7b6ba5),p=a(0x11c82607b),h=a(0x14149c126),_=a(0x14ea3ce99);let f=(0,p.Ay)("gets share canvas or list speedbump type",async(e,t,{fileId:a,channelId:p})=>{let f=t(),b="on"===(0,h._Z)(f,"file_share_limit"),g=(0,_.Lp)(f,a),y=(0,c.kE)(f,g),A=(0,m.A)(f,{file:g}),x=(0,d.A)(f,{file:g});if(A||x)return r.w.CANNOT_SHARE_FROM_EXTERNAL_ORG;switch(y){case c.yq.CANNOT_SHARE_FILE_RESTRICTED_SHARING_ENABLED:return r.w.CANNOT_SHARE_FILE_RESTRICTED_SHARING_ENABLED;case c.yq.CANNOT_SHARE_TEAM_CANVAS_RESTRICTED_SHARING_ENABLED:return r.w.CANNOT_SHARE_TEAM_CANVAS_RESTRICTED_SHARING_ENABLED;case c.yq.CANNOT_SHARE_TEAM_LIST_RESTRICTED_SHARING_ENABLED:return r.w.CANNOT_SHARE_TEAM_LIST_RESTRICTED_SHARING_ENABLED}if((0,n.A)((0,s.o3)(g))&&b&&(g=await e((0,i.B2)({fileId:a,reason:"get-channel-tab-add-canvas-speedbump"}))),(0,u.O)(f,p)||b&&(0,s.YB)(g)){let t=await e((0,o._)({reason:"canShare",fileId:a,channelId:p}));if(!t.can_share)switch(t.reason){case l.Vq.CannotShareContainFileUpload:return r.w.CANNOT_SHARE_CONTAIN_FILE_UPLOAD;case l.Vq.CannotShareFileShareLimitReached:return r.w.CANNOT_SHARE_FILE_SHARE_LIMIT_REACHED;default:return r.w.CANNOT_SHARE_UNKNOWN_REASON}}});f.meta={name:"getChannelTabAddCanvasOrListSpeedbump",key:"createThunkGetChannelTabAddCanvasOrListSpeedbump",description:"gets share canvas or list speedbump type"}},0x2e5f2678:(e,t,a)=>{"use strict";a.d(t,{E:()=>u});var n=a(0x287da5a6),r=a(0x11ed04fa0),i=a(0x990bc6be),l=a(0x200d043fb),o=a(0x8b60780c),s=a(0x117791e5d),c=a(0x24971930a),d=a(0xbaaab71e),m=a(0x24558b75f);let u=(0,a(0x11c82607b).Ay)("Handles a channel tab being clicked",async(e,t,{channelId:a,clickedTabId:u,event:p,fromAISuggestion:h},_)=>{let f=t(),b=await e((0,l.I)()),g=(0,i.G)(f,{channelId:a}),{windowId:y}=_(d.U),A=(0,r.Fi)(g,u),x=A?.data?.isSuggested??!1;A&&(0,n.A)(p)?e((0,c.i)({tab:A,channelId:a})):A&&(0,m.Cz)(p)&&(0,s.E)(A.type,y)&&!x?e((0,s.l)({tab:A,channelId:a})):A&&b?.id!==u&&(A.onSelected?A.onSelected():e((0,o.D)({tabId:A.id,tab:A,channelId:a,fromAISuggestion:h})))});u.meta={name:"handleTabChange",key:"createThunkHandleTabChange",description:"Handles a channel tab being clicked"}},0x8b60780c:(e,t,a)=>{"use strict";a.d(t,{D:()=>g});var n=a(0x11ed04fa0),r=a(0x1c760ba43),i=a(0x207d915f6),l=a(0x1a02c72b5),o=a(0xd6a16321),s=a(0x280afe13),c=a(0x107e97a6b),d=a(0x11c82607b),m=a(0x7b4d5d7),u=a(0xb60a1b),p=a(0x1f7597e39),h=a(0x1d774a049),_=a(0x6019b546),f=a(0x1f4bff87c),b=a(0x217553e42);let g=(0,d.Ay)("Navigate to a channel tab",(e,t,{tabId:a,tab:d,channelId:g,docSource:y,sectionIdsToHighlightOverride:A,autoStartAiGeneration:x,fromAISuggestion:E,entryPoint:C})=>{let k=t(),v=d||(0,n.kt)(k,g,a);if(v?.data){let t="fileId"in v.data&&v.data.fileId||"file_id"in v.data&&v.data.file_id,n="listsChannelTabDefaultRefineViewId"in v.data&&v.data.listsChannelTabDefaultRefineViewId||"lists_channel_tab_default_refine_view_id"in v.data&&v.data.lists_channel_tab_default_refine_view_id||void 0;if(t){if(v.type===r.Xy.Canvas){let n={fileId:t,source:y??h.f.CHANNEL_TAB,channelId:g,entryPoint:C};return e((0,l.o)((0,o.sL)((0,o.mo)({id:(0,c.Lo)({id:t}),clogParams:n,sectionIdsToHighlightOverride:A,autoStartAiGeneration:x}),g,a,void 0,E)))}if(v.type===r.Xy.List)return e((0,m.w)({listId:t,source:u.B.CHANNEL_TAB,channelId:g,entryPoint:C})),e((0,l.o)((0,o.sL)((0,o.st)({listId:t,listViewId:n}),g,a,void 0,E)));if(v.type===r.Xy.ExternalFiles)return e((0,l.o)((0,o.id)(g,{tabId:a,tabParams:{fileId:t}})))}if(v.type===r.Xy.SalesforceListView){let t="salesforceListViewId"in v.data&&v.data.salesforceListViewId||"salesforce_list_view_id"in v.data&&v.data.salesforce_list_view_id||void 0;return e((0,l.o)((0,o.sL)((0,o.i0)({salesforceListViewId:t,tabData:v.data,channelId:g}),g,a)))}}if(a===r.fY.AppHome)e((0,i.K1)({channelId:g}));else if(a===r.fY.AppChat){let t=(0,b.OL)(k,g),a=(0,s.e)(t);a&&e((0,_.h6)({botUserId:a,aiAppSurface:f.v.ChatView,aiAppState:{threadTs:void 0,skipReusingRecentMessage:!1}}))}return(v?.type===r.Xy.AddCanvas||a===r.fY.AddCanvas)&&e((0,p.A)({channelId:g,preventNavigation:!1})),e((0,l.o)((0,o.id)(g,{tabId:a,tabParams:{...v?.data,...!!C&&{entryPoint:C}}})))});g.meta={name:"navigateToChannelTab",key:"createThunkNavigateToChannelTab",description:"Navigate to a channel tab"}},0x21f8b9118:(e,t,a)=>{"use strict";a.d(t,{F:()=>l});var n=a(0x8b60780c),r=a(0x11c82607b),i=a(0x217553e42);let l=(0,r.Ay)("Navigate to a tabbed folder",(e,t,{folderId:a,channelId:r})=>{let l=(0,i.OL)(t(),r),o=(l?.properties?.tabz||[]).find(e=>"folder"===e.type&&e.data?.folder_bookmark_id===a);o?.id&&e((0,n.D)({tabId:o.id,channelId:r}))});l.meta={name:"navigateToTabbedFolder",key:"createThunkNavigateToTabbedFolder",description:"Navigate to a tabbed folder"}},0x117791e5d:(e,t,a)=>{"use strict";a.d(t,{E:()=>isTabWindowable,l:()=>x});var n=a(0x139aa1a7),r=a(0x81187f00),i=a(0x135860f25),l=a(0x22170ca89),o=a(0x1c760ba43),s=a(0xf3719a28),c=a(0x3711e82d),d=a(0x45012309),m=a(0x6d72337),u=a(0x11c82607b),p=a(0x185059e6b),h=a(0x1d774a049),_=a(0x217553e42),f=a(0x11c2f2e45),b=a(0x14a407c25),g=a(0x2d1c8f66),y=a(0x19895585a);let A=[o.Xy.Channel,o.Xy.ChannelCanvas,o.Xy.Canvas,o.Xy.List,o.Xy.RecordRelatedList,o.Xy.RecordOverview,o.Xy.RecordRelatedConversations];function isTabWindowable(e,t){return(e!==o.Xy.Channel||t===y.N2)&&A.includes(e)}let x=(0,u.Ay)("Opens a given channel tab in a new window",(e,t,{tab:a,channelId:u})=>{let A=t(),x=(0,d.eo)({state:A}),E=(0,_.OL)(A,u),C=(0,b.A)(A,u);switch(a.type){case o.Xy.Channel:e((0,r.s)({viewId:u}));break;case o.Xy.ChannelCanvas:{let{fileId:t}=(0,s.H)(E);t&&e((0,p.S)({fileId:t,source:h.f.PROTOTYPE}));break}case o.Xy.Canvas:a.data&&a.data.fileId&&e((0,p.S)({fileId:a.data.fileId,source:h.f.PROTOTYPE}));break;case o.Xy.List:a.data&&a.data.fileId&&e((0,g.N)({listFileId:a.data.fileId,forceOpenInChildWindow:!0}));break;case o.Xy.RecordRelatedList:if(a.data&&a.data.recordRelatedListId){let r=(0,f.KP)(t(),u),i=`${r}:${a.data.recordRelatedListId}`;e((0,m.Bb)({viewSet:{[y.mq.Primary]:{id:i,params:{recordId:r,tab:a},viewType:n.D.RecordChannelRelatedList}},shouldShowSearch:!1,shouldShowHistory:!1}))}break;case o.Xy.RecordOverview:e((0,i.T)({record:C}));break;case o.Xy.RecordRelatedConversations:e((0,i.T)({record:C,recordViewTab:l.Zw.Conversations}));break;case o.Xy.Files:case o.Xy.Bookmarks:case o.Xy.Pins:case o.Xy.Workflows:default:return}x.track(c.EventId.CHANNEL_TABS_OPEN_NEW_WINDOW,{contexts:{file_id:a.data?.fileId,type:a.type,channel_id:u,tab_id:a.id}})});x.meta={name:"openTabInNewWindow",key:"createThunkOpenTabInNewWindow",description:"Opens a given channel tab in a new window"}},0x24971930a:(e,t,a)=>{"use strict";a.d(t,{W:()=>isTabSplittable,i:()=>h});var n=a(0x125de1ee5),r=a(0x1c760ba43),i=a(0xd6a16321),l=a(0xf3719a28),o=a(0x11c82607b),s=a(0x1fa458710),c=a(0x1d774a049),d=a(0x21bfacd01),m=a(0x217553e42),u=a(0x2d1c8f66);let p=[r.Xy.Channel,r.Xy.ChannelCanvas,r.Xy.Canvas,r.Xy.List];function isTabSplittable(e){return p.includes(e)}let h=(0,o.Ay)("Opens a given channel tab in a split view",(e,t,{tab:a,channelId:o})=>{let p=t(),h=(0,m.OL)(p,o),_=(0,d.V)(p);switch(a.type){case r.Xy.Channel:e((0,n.p)({navProps:(0,i.id)(o,{tabId:r.Xy.Channel,tabParams:{}})}));break;case r.Xy.ChannelCanvas:{let{fileId:t}=(0,l.H)(h);t&&e((0,s.A)({fileId:t,forceSplitView:!_,source:c.f.PROTOTYPE}));break}case r.Xy.Canvas:a.data&&a.data.fileId&&e((0,s.A)({fileId:a.data.fileId,forceSplitView:!_,source:c.f.PROTOTYPE}));break;case r.Xy.List:a.data&&a.data.fileId&&e((0,u.N)({listFileId:a.data.fileId,forceOpenInSplitView:!_}))}});h.meta={name:"openTabInSplitView",key:"createThunkOpenTabInSplitView",description:"Opens a given channel tab in a split view"}},0x871b0727:(e,t,a)=>{"use strict";a.d(t,{i:()=>d});var n=a(0x11ed04fa0),r=a(0x125046c44),i=a(0x3711e82d),l=a(0x45012309),o=a(0x11c82607b),s=a(0x217553e42),c=a(0x1aad5a225);let d=(0,o.Ay)("Removes a channel tab",(e,t,a)=>{let o=t();if(!(0,n.U6)(o))return;let{channelId:d,tabId:m,keepFileShare:u,noOptimisticUpdate:p=!1,elementName:h}=a,_=(0,s.OL)(o,d,!1);if(!_)return;let{properties:f}=_,b={...f,tabz:f?.tabz?.filter(e=>e.id!==m)},g=f?.tabz?.find(e=>e.id===m);return p||e((0,c.F)({channel:{..._,properties:b}})),e((0,r.T)({id:m,channelId:d,keepFileShare:u,reason:"remove-channel-tab"})).then(()=>{(0,l.eo)().track(i.EventId.CHANNEL_TABS_TAB_REMOVED,{contexts:{ui_context:{ui_component_name:i.UiComponentName.CHANNEL_TABS_TAB,ui_component_variant:g?.type,ui_properties:{element_value:g?.id,...h?{element_name:h}:{}},action:i.UiAction.REMOVE},file_id:g?.data?.file_id,type:g?.type,channel_id:d,tab_id:g?.id,core:{dragged_item_to_folder:"drag_tab_to_folder"===h||void 0}},file_id:g?.data?.file_id,channel_id:d},{sendImmediately:!0})}).catch(t=>{throw e((0,c.F)({channel:{..._,properties:f}})),t})});d.meta={name:"removeTab",key:"createThunkRemoveTab",description:"Removes a channel tab"}},0x831dc15b:(e,t,a)=>{"use strict";a.d(t,{e:()=>u});var n=a(0x658a411c),r=a(0x30d0b075),i=a(0xf950bcef),l=a(0x54bc7020),o=a(0x22c4e25d5),s=a(0xc4c44125),c=a(0x6520489e),d=a(0x11c82607b),m=a(0x22f6a086f);let u=(0,d.Ay)("Set workflow as primary actions for channel",(e,t,{channelId:a,triggerId:d})=>{let u=t(),p=(0,m.bn)(u,{triggerId:d}),h=(0,s.M)(u,{channelId:a});if((0,n.A)(h,e=>e.workflow_trigger_id===p.id))return Promise.reject(Error("Can not add workflow that is already a channel workflow"));if(!(0,c.y)(u,a))return Promise.reject(Error("User does not have permission to setChannelWorkflowActions."));let _=[...h,{workflow_trigger_id:p.id,title:p.name}],f=(0,r.Zf)({channel_workflows:_});return f?e((0,i.P)(u)?(0,o.B)({triggerIds:[p.id],channelId:a,reason:"set_channel_workflow_as_workflow_actions"}):(0,l.D)({props:f,reason:"set_channel_workflow_as_workflow_actions",channelId:a})):Promise.reject(Error("Unable to set workflow as featured workflow."))});u.meta={name:"setChannelWorkflowActions",key:"createThunkSetChannelWorkflowActions",description:"Set workflow as primary actions for channel"}},0x13b93ff11:(e,t,a)=>{"use strict";a.d(t,{o:()=>u});var n=a(0xf4d381c8),r=a(0x922fdaa7),i=a(0x1c760ba43),l=a(0x968e030d),o=a(0x1ec68d6a3),s=a(0x11c82607b),c=a(0x11ea712ca),d=a(0x217553e42),m=a(0x1aad5a225);let u=(0,s.Ay)("updateListTabDefaultViewId",async(e,t,a,s)=>{let{label:u,value:p,targetTabId:h}=a,_=(0,o.Ay)({getState:t}),f=t(),{channelId:b}=s(n.j),g=await e((0,r.X)()),y=a.currentTabId??g,A=(0,d.OL)(f,b),x=A?.properties?.tabz;if(!x)return;let E=[...x],C=E.findIndex(e=>h?e.id===h:e.id===y);if(C<0)return;E[C].data={...E[C].data,lists_channel_tab_default_refine_view_id:p},E[C].label=u;let k=(0,d.OL)(f,b),v={...k,properties:{...k.properties,tabz:E}};e((0,m.F)({channel:v,reason:c.rd.SET_CHANNEL_PROPERTIES_TABS}));try{(await e((0,l.k)({id:h||y||i.fY.Channel,channelId:b,label:u,reason:"updateListTabDefaultViewId",data:{...E[C].data,listsChannelTabDefaultRefineViewId:p}}))).ok||e((0,m.F)({channel:k,reason:c.rd.SET_CHANNEL_PROPERTIES_TABS}))}catch(t){throw e((0,m.F)({channel:k,reason:c.rd.SET_CHANNEL_PROPERTIES_TABS})),_.error(Error(`updateListTabDefaultViewId error: ${t}`)),t}});u.meta={name:"updateListTabDefaultViewId",key:"createThunkUpdateListTabDefaultViewId",description:"updateListTabDefaultViewId"}},0x109b915b1:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(0xf4d381c8),r=a(0x1c760ba43),i=a(0x968e030d),l=a(0x1ec68d6a3),o=a(0x11c82607b),s=a(0x11ea712ca),c=a(0x217553e42),d=a(0x1aad5a225);let m=(0,o.Ay)("Updates a channel tab label",async(e,t,a,o)=>{let m=(0,l.Ay)({getState:t}),u=t(),{label:p,reason:h="updateTabLabel"}=a,_=o(n.j).channelId,f=(0,c.OL)(u,_),b=a.tabId||r.fY.Channel,g=[...f?.properties?.tabz??[]],y=g.find(e=>e.id===b);if(!y)return;y.label=p;let A=[...f?.properties?.tabs??[]],x=A.find(e=>e.id===b);if(!x||(x.label=p,!p&&x.type!==r.Xy.Canvas))return;let E={...f},C={...f,properties:{...f?.properties,tabs:A,tabz:g}};e((0,d.F)({channel:C,reason:s.rd.SET_CHANNEL_PROPERTIES_TABS}));try{let t=await e((0,i.k)({id:b,channelId:_,label:p,reason:h}));return t.ok||e((0,d.F)({channel:E,reason:s.rd.SET_CHANNEL_PROPERTIES_TABS})),t}catch(t){throw e((0,d.F)({channel:E,reason:s.rd.SET_CHANNEL_PROPERTIES_TABS})),m.error(Error(`updateTabLabel error: ${t}`)),t}});m.meta={name:"updateTabLabel",key:"createThunkUpdateTabLabel",description:"Updates a channel tab label"}},0xb6143a72:(e,t,a)=>{"use strict";a.d(t,{w:()=>i});var n=a(0x990bc6be),r=a(0x562adb4f);let i=(0,a(0x11c82607b).Ay)("Updates channel tab order by index",async(e,t,{channelId:a,sourceIndex:i,destinationIndex:l})=>{let o=t(),s=(0,n.G)(o,{channelId:a}),c=s[i],d=s[i>l?l-1:l];return e((0,r.x)({channelId:a,targetTab:c,afterTab:d}))});i.meta={name:"updateTabOrderByIndex",key:"createThunkUpdateTabOrderByIndex",description:"Updates channel tab order by index"}},0x562adb4f:(e,t,a)=>{"use strict";a.d(t,{x:()=>h});var n=a(0xc8b3fd9b),r=a(0x20482ad21),i=a(0x11ed04fa0),l=a(0x1c760ba43),o=a(0x14a9e2901),s=a(0x1ec68d6a3),c=a(0x11c82607b),d=a(0x11ea712ca),m=a(0x217553e42),u=a(0x1aad5a225);let p=new r.Ay("tabbed-channel"),h=(0,c.Ay)("Updates channel tab order",async(e,t,a)=>{let r=t(),c=(0,s.Ay)({getState:t}),{targetTab:h,afterTab:_,channelId:f,optimisticUpdate:b=!0}=a;if(!(0,i.g3)(h))return;let g=(0,m.OL)(r,f,!1);if(!g)return;let y=g?.properties?.tabz,A=g?.properties?.tabs,setTabs=(t,a)=>{e((0,u.F)({channel:{...g,properties:{...g?.properties,tabz:t??y,tabs:a??A}},reason:d.rd.SET_CHANNEL_PROPERTIES_TABS}))},x=y?.findIndex(e=>(0,i._f)(e).id===h.id)??0,E=y?.findIndex(e=>(0,i._f)(e).id===_?.id)??0,C=0;-1===x&&h.type===l.Xy.ChannelCanvas?C=_?E+1:0:E>-1&&(C=x>E?E+1:E);let k=[...y||[]],v=[...A||[]];if(b){let[t]=(0,n.A)(k,e=>(0,i._f)(e).id===h.id),[a]=(0,n.A)(v,e=>e.id===h.id);if(t)k?.splice(C,0,t),v?.splice(C,0,a);else{if(h.type!==l.Xy.ChannelCanvas)return void c.error(Error(`updateTabOrder error: targetTab ${h.id} ${h.type} not found for ${g.id}`));C=_?E+1:0,k?.splice(C,0,{type:l.Xy.ChannelCanvas,label:p.t("Canvas")}),v?.splice(C,0,{id:l.fY.ChannelCanvas,type:l.Xy.ChannelCanvas,label:p.t("Canvas")})}let r={...g,properties:{...g?.properties,tabz:k,tabs:v}};e((0,u.F)({channel:r,reason:d.rd.SET_CHANNEL_PROPERTIES_TABS}))}try{let t={channelId:f,id:h.id,reason:"updateTabOrder"};_&&E>-1&&!(0,i.PN)(_)&&(t.after=_.id);let a=await e((0,o.i)(t));if(!a.ok)return setTabs(),a;let n=a?.tabz,r=a?.tabs,l=!n||n.some((e,t)=>{let a=k[t];return e.id?e.id!==a.id:e.type!==a.type});if(b&&l&&setTabs(n,r),!b){let t={...g,properties:{...g?.properties,tabz:n,tabs:r}};e((0,u.F)({channel:t}))}return a}catch(e){throw setTabs(),c.error(Error(`updateTabOrder error: ${e}`)),e}});h.meta={name:"updateTabOrder",key:"createThunkUpdateTabOrder",description:"Updates channel tab order"}},0x18a04b6e4:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});var n=a(0x968e030d),r=a(0x1ec68d6a3);let i=(0,a(0x11c82607b).Ay)("Updates a channel tab",async(e,t,{channelId:a,tabId:i,data:l,label:o,reason:s="updateTab"})=>{let c={ok:!1,tabs:[],tabz:[]};try{c=await e((0,n.k)({id:i,...(o||""===o)&&{label:o},...l&&{data:l},channelId:a,reason:s}))}catch(e){(0,r.Ay)({label:"channel_tabs"}).error("error updating tab",e)}return c});i.meta={name:"updateTab",key:"createThunkUpdateTab",description:"Updates a channel tab"}},0x1f8d7b265:(e,t,a)=>{"use strict";a.d(t,{B:()=>hasMaxTabs});var n=a(0x11ed04fa0),r=a(0xb28e7c89);function hasMaxTabs(e,t){return(0,r.G)(e,t?.id).filter(e=>!(0,n.FZ)(e)).length>=n.eO}},0xf513d24f:(e,t,a)=>{"use strict";a.d(t,{j:()=>isTriggerWithNonAccessDeniedError});let isTriggerWithNonAccessDeniedError=e=>e.error&&"access_denied"!==e.error},0xa589521c:(e,t,a)=>{"use strict";a.d(t,{Y:()=>r});var n,r=((n={}).Bookmark="bookmark",n.WorkflowChannel="workflow-channel",n.AccessDeniedWorkflow="access-denied-workflow",n)},0x12c909be9:(e,t,a)=>{"use strict";a.d(t,{X:()=>useFetchExternalPreview});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x24e98a449),l=a(0x1b6f39a31),o=a(0x219e88a18),s=a(0x226892387),c=a(0x1f5c53bc);let useFetchExternalPreview=({fileId:e,appId:t,reason:a,entity:d,fullSizePreview:m,onError:u,onRtmEvent:p})=>{let h=(0,r.wA)(),[_,f]=(0,n.useState)(null),[b,g]=(0,n.useState)(!1),[y,A]=(0,n.useState)(null),x=(0,s.d4)(t=>(0,c.wr)(t,e)),E=(0,n.useCallback)(e=>{A(e??null),u?.(e)},[u]),C=(0,n.useCallback)(()=>A(null),[]),k=(0,n.useCallback)(e=>{p?.(e),e.error&&E({code:e.error,message:e.error,source:"file_view_ready_rtm_event"}),g(!1)},[E,p]);(0,n.useEffect)(()=>{e&&x&&((0,i.Qp)(t)||(0,i.VA)(t))&&k(x)},[e,x,k,t]),(0,n.useEffect)(()=>{(0,l.jH)(d)&&(d.ext_error?(g(!1),E({code:"custom"===d.ext_error.status?"flexpane_custom_error":d.ext_error.status,message:d.ext_error?.message,source:"entity_details_present"})):m?.error?.code?(g(!1),E({code:m.error.code,message:m.error?.message,source:"entity_details_present_full_size_preview"})):y?.source==="entity_details_present"&&E(void 0))},[d,y?.source,m?.error?.code,m?.error?.message,E]);let v=(0,n.useCallback)(async()=>{t&&e&&(g(!0),A(null),h((0,o.G)({appId:t,fileId:e,reason:a})).then(e=>{f(e),(0,i.Qp)(t)||(0,i.VA)(t)||g(!1)}).catch(e=>{g(!1),E({code:e.name??"internal_error",message:"Failed to fetch file preview URL",source:"file_preview_url_api"})}))},[h,e,t,a,E]);return{clearError:C,data:_,isLoadingPreview:b,error:y,fetchPreviewData:v,setIsLoadingPreview:g,filePreviewRTMEvent:x,handleError:E}}},0x3440462:(e,t,a)=>{"use strict";a.d(t,{HH:()=>getAutoClogProps,SP:()=>MoveToFolderMenuItems,e1:()=>AddToFolderMenuItems});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x20482ad21),o=a(0x15fb82076),s=a(0x99233ecb),c=a(0x2501a2cee),d=a(0x6e87d4ec),m=a(0x1fdec3e16),u=a(0x339b339c),p=a(0x1d40432fa),h=a(0x4e1a3b33),_=a(0x138453164),f=a(0x9d9c4dfb),b=a(0xed563df0),g=a(0xa178a8f4),y=a(0x1e19d7430),A=a(0x7dc98d62),x=a(0xc00d891a),E=a(0x8b60780c),C=a(0x21f8b9118),k=a(0xd843ab47),v=a(0x238b287cf),S=a(0x22fb75fe3),I=a(0x3711e82d),w=a(0x226892387),T=a(0x18c9d2489),N=a(0x14ea3ce99),M=a(0x46dbff89),R=a(0x16ffed5ab);let P=n.createElement(c.Ah,{name:"folder",size:"20"}),L=n.createElement(c.Ah,{name:"plus",size:"20"}),O=new l.Ay("tabbed-channel"),getAutoClogProps=(e,t,a)=>({eventId:I.EventId.CONTEXT_MENU_ACTION,elementName:e,onClick:{enableClogAction:!0},uiComponentVariant:t,uiPage:a}),AddOrMoveToFolderMenuItems=e=>{let t,a,l=(0,r.wA)(),c=(0,v.A)(),{channelId:D="",context:F,menuProps:U,onAddorMoveToFolder:B=i.A}=e,H="bookmark"in e?e.bookmark:void 0,W="fileId"in e?e.fileId:void 0;H&&H.type===S.x.FILE&&(W=H.entityId);let V=H&&H.type===S.x.LINK,{onMoveBookmark:G}=(0,f.c)(),q=!!H,j=H?.parentId,z=(0,w.d4)(e=>(0,N.Lp)(e,W??"")),{getPrimaryView:K}=(0,n.useContext)(k.A),$=(0,w.d4)(K),Y=(0,y.u)();q?(t=I.UiPage.CHANNEL_TABS_CHANNEL_FOLDER,a=V?"link":"file"):(t=$?.viewType??"Other","channel"===(a=F||Y?.type||"channel")&&(a=F||"message"));let{folders:Q,isLoading:Z}=(0,x.L)({channelId:D}),{tab:J,label:X,folderIndex:ee}=(0,A.N)({channelId:D}),{validFolders:et,finalDefaultBookmarksFolderIndex:ea}=(0,n.useMemo)(()=>{let e=ee;return{validFolders:Q.filter((t,a)=>{let n=!q||j!==t.id;return!n&&a<ee&&(e-=1),n}),finalDefaultBookmarksFolderIndex:e}},[Q,q,j,ee]),en=(0,b.E)({channelId:D}),er=(0,n.useCallback)((e,t)=>{let onClick=()=>{e&&(e.type===S.x.FOLDER?l((0,C.F)({folderId:e.id,channelId:D})):l((0,E.D)({tabId:e.id,channelId:D})))},a={fileName:V?H.title??H.url:n.createElement(h.A,{file:z}),folderName:e.type===S.x.FOLDER?e.title:X},handler=({tag:e,text:t})=>"link"===e?n.createElement(o.A,{onClick:onClick},t):null;handler.displayName="handler";let r=O.rt("Added {fileName} to folder <link>{folderName}</link>",a,handler);"move"===t?r=O.rt("Moved {fileName} to folder <link>{folderName}</link>",a,handler):"remove"===t&&(r=O.rt("Removed {fileName} from folder <link>{folderName}</link>",a,handler)),r&&l((0,R.M)({element:n.createElement(d.A,{duration:_.xj},n.createElement("span",null,r))}))},[H?.title,H?.url,D,X,l,z,V]),ei=(0,n.useCallback)((e,t)=>{z&&t&&l((0,M.q)({element:n.createElement(p.A,{error:e?.name,file:z,folderTitle:t.type===S.x.FOLDER?t.title:X})}))},[X,l,z]),el=(0,n.useCallback)(e=>{z&&e&&D&&l((0,T.eV)({channelId:D,parentId:e.type===S.x.FOLDER?e.id:void 0,title:z.title,url:z.permalink,type:"file",entityId:z.id})).then(()=>{c.track(I.EventId.CHANNEL_TABS_FOLDER_FILE_ADDED,{contexts:{ui_context:{action:I.UiAction.CLICK,ui_component_name:"add_file_from_add_to_folder",ui_component_variant:a,ui_page:t,ui_properties:{element_type:I.ElementType.MENU_ITEM,element_name:"add_to_folder_menu"}}}}),er(e,"add"),B(e)}).catch(t=>ei(t,e))},[D,a,c,l,z,ei,er,t,B]),eo=(0,n.useCallback)(e=>{e&&q&&D&&G(D,H,e.type===S.x.FOLDER?e.id:void 0).then(()=>{er(e,"move"),B(e)}).catch(t=>ei(t,e))},[q,D,G,H,er,ei,B]),es=(0,g.S)({channelId:D,navigateToNewFolder:!1,onSave:q?eo:el}),ec=(0,n.useCallback)(()=>{if(!Z&&(q||!(et.length>0)&&!J))return q&&et.length>0||J?n.createElement(s.c$,{label:O.t("Move to\u2026")}):n.createElement(s.c$,{label:O.t("No folders available")})},[J,Z,q,et.length]),ed=(0,n.useCallback)(()=>{if(Z)return n.createElement(u.A,{className:"margin_left_150 margin_right_150",dataQa:"add_to_folder_menu_loading"});let e=q?"move_to_folder":"add_file_to_channel_folder",r=et.map(r=>n.createElement(s.Dr,{key:r.id,label:n.createElement(m.A,{lines:1},r.title),icon:P,onSelected:e=>{e.stopPropagation(),q?eo(r):el(r)},autoClogProps:getAutoClogProps(e,a,t)}));return J&&(!q||j)&&r.splice(ea,0,n.createElement(s.Dr,{key:"defaultBookmarksFolder",label:X,icon:P,onSelected:e=>{e.stopPropagation(),q?eo(J):el(J)},autoClogProps:getAutoClogProps(e,a,t)})),r},[Z,q,et,J,j,a,t,eo,el,ea,X]),em=(0,n.useCallback)(e=>{e.stopPropagation(),es()},[es]),eu=(0,n.useCallback)(()=>{if(!en)return;let e=q?"move_file_to_new_channel_folder":"add_file_to_new_channel_folder";return n.createElement(n.Fragment,null,n.createElement(s.bX,null),n.createElement(s.Dr,{key:"addFileToFolder",label:O.t("New folder"),icon:L,onSelected:em,autoClogProps:getAutoClogProps(e,a,t)}))},[en,q,em,a,t]);if(z&&D)return n.createElement(s.Ay,{...U,width:"auto","data-qa":"add_to_folder_menu"},ec(),ed(),eu())};AddOrMoveToFolderMenuItems.displayName="AddOrMoveToFolderMenuItems";let MoveToFolderMenuItems=({channelId:e,context:t,bookmark:a,menuProps:r,onAddorMoveToFolder:i})=>n.createElement(AddOrMoveToFolderMenuItems,{channelId:e,context:t,bookmark:a,menuProps:r,onAddorMoveToFolder:i}),AddToFolderMenuItems=({fileId:e,channelId:t,context:a,menuProps:r,onAddorMoveToFolder:i})=>n.createElement(AddOrMoveToFolderMenuItems,{fileId:e,channelId:t,context:a,menuProps:r,onAddorMoveToFolder:i})},0x24c7981a4:(e,t,a)=>{"use strict";a.d(t,{e:()=>FolderCreateMenu,W:()=>getOverflowMenuAutoClogProps});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x344bb842),c=a(0x99233ecb),d=a(0x1e1bdd25f),m=a(0x2501a2cee),u=a(0x6e87d4ec),p=a(0x4c96e5d9),h=a(0x1a3d24c8a),_=a(0x543a781e),f=a(0xd6ba6894),b=a(0x18dac2b8e),g=a(0x2b7f0bcc),y=a(0x102edf836),A=a(0xb1ea448c),x=a(0x1d2cd7755),E=a(0x126f22530),C=a(0x1faa3f1ac),k=(a(0x15014e268),a(0x120c268ad)),v=a.n(k),S=a(0x11bf9a8fe),I=a(0xbd3de346);let GoogleDocIcon=({size:e=24,url:t})=>{let a=t?(0,S._9)(t):null,r=(0,I.C0)(a||"gdoc");return n.createElement("div",{className:"display_flex",style:{width:e,height:e}},n.createElement("i",{className:v()("full_width","full_height","c-icon","c-icon__file","c-icon--filetype-svgicon",`c-icon--${r}`,`c-icon--${r}-svgicon`)}))};GoogleDocIcon.displayName="GoogleDocIcon";var w=a(0x32d3ef3d),T=a(0xfa28400d),N=a(0x9798b7f),M=a(0x7729d35b),R=a(0x21d85d6e5),P=a(0x226892387),L=a(0x14149c126),O=a(0xe684f705);let D=new l.Ay("channel_details"),ChannelExpertSettingsAddGoogleDocPreview=({title:e,url:t})=>{let a=(0,P.d4)(e=>"on"===(0,L._Z)(e,"ce_google_drive_support")),r=(0,P.d4)(e=>(0,R.sE)(e,(0,O.cA)(e))),i=a?D.t("Unknown document title"):"Unknown document title",l=e||i,o=a?D.t("Shared by {name}",{name:r}):`Shared by ${r}`;return n.createElement(T.Ay,{ariaLabel:l,size:w.S.compact,entityState:w.w.enabled,isInteractive:!1,isRemovable:!1,isFullWidth:!0},n.createElement("div",{className:"display_flex padding_75 gap_75"},n.createElement(M.A,{entityState:w.w.enabled,suppressDefaultColors:!0},n.createElement(GoogleDocIcon,{size:36,url:t})),n.createElement(N.A,{primaryLabel:l,secondaryLabel:o,size:w.S.compact,entityState:w.w.enabled,primaryTruncateLines:1,secondaryTruncateLines:1})))};ChannelExpertSettingsAddGoogleDocPreview.displayName="ChannelExpertSettingsAddGoogleDocPreview";var F=a(0x1d3e059f2),U=a(0x1589eb96),B=a(0x72e29ef),H=a(0x20e80190e),W=a(0xcba12504),V=a(0xa3a6a13f),G=a(0x1d7960bf2),q=a(0x1b3a0dc38),j=a(0x1fcbb004d),z=a(0x11931264),K=a.n(z);let $=new l.Ay("channel_details"),ChannelExpertSettingsAddGoogleDocModal=({channelId:e,folderBookmarkId:t})=>{let a=(0,n.useId)(),i=((0,n.useId)(),(0,n.useId)()),l=(0,r.wA)(),[s,c]=(0,n.useState)(""),[d,u]=(0,n.useState)(),[p,h]=(0,n.useState)(),[k,v]=(0,n.useState)(!1),[I,w]=(0,n.useState)(!1),[T,N]=(0,n.useState)(void 0),[M,R]=(0,n.useState)(),[L,O]=(0,n.useState)(!1),D=(0,_.A)(s,350),z=(0,n.useCallback)(()=>{l((0,j.O)())},[l]),Y=(0,n.useCallback)(async()=>{w(!0),N(void 0);let a=s.trim(),r=$.rt("This file\u2019s permissions are restricted. <a>Update share settings in Google</a>.",null,({text:e})=>n.createElement(C.A,{target:"_blank",rel:"noopener noreferrer",href:s||"https://support.google.com/drive/answer/2494893"},e)),i=$.t("An unknown error occurred.");try{let n=await l((0,B._)({externalUrl:a,channel:e,serviceAppId:(0,b.KV)()?W.u5:W.C5,reason:"channel-expert-add-google-doc"}));n.ok?l((0,V.V)({channelId:e,parentId:t,fileId:n.file,channelTab:void 0,isStackable:!0,onCloseCallback:(e,t)=>{e&&t&&l((0,j.O)())}})):N(i)}catch(e){switch(e instanceof Error?e.name:"unknown"){case B.r.GoogleAuthMissing:i=$.t("Please reconnect your Google Drive account and try again.");break;case B.r.RestrictedPermissions:i=r;break;case B.r.UnidentifiedExternalUrl:i=$.t("Invalid Google Drive link. Please check the URL and try again.");break;case B.r.FailedToFetchFile:i=$.t("Something went wrong while connecting Google Drive. Wait a few minutes, and then try again.");break;case B.r.FailedToDownloadFile:i=$.t("Something went wrong adding with Google Drive. Wait a few minutes, and then try again.");break;case B.r.TeamNotFound:i=$.t("Team not found. Check the team settings and try again.");break;case B.r.UserNotFound:i=$.t("User not found. Check the user settings and try again.");break;case B.r.UserWrongTeam:i=$.t("User is not on the team. Check the user settings and try again.");break;case B.r.Unsupported:i=$.t("Google Drive files are not supported.");break;case B.r.FailedToGetServicePlugin:i=$.t("Failed to get service plugin. Please try again.");break;case B.r.CannotLoadPlugin:i=$.t("Cannot load plugin. Please try again.");break;case B.r.ErrorFetchingPermissions:i=$.t("Couldn\u2019t update sharing settings. Please change permissions manually in Google Docs.");break;case B.r.EmptyPermissions:i=$.t("Empty permissions. Check the permissions and try again.");break;case B.r.InvalidChannel:i=$.t("Invalid channel. Check the channel settings and try again.");break;case B.r.DomainMismatch:i=r;break;case B.r.UnsupportedFileMimeType:i=$.t("This file type is not supported. You can add links to Google Docs, Google Slides, or files uploaded to Google Drive in .pdf, .txt, .doc, .docx, or .csv formats.",{fallbackHash:"8d886c0ba6f2b683daba5f19568a316226ce3e4c"});break;default:i=$.t("Something went wrong. Wait a few minutes, and then try again.")}N(i)}finally{w(!1)}},[l,s,e,t]),Q=(0,n.useCallback)(e=>{c(e),h(void 0),T&&N(void 0)},[T]),Z=(0,n.useCallback)(()=>{if(s.trim()){let e=(0,S.hF)(s);h(e??void 0),!e&&T&&N(void 0)}},[s,T]);(0,n.useEffect)(()=>{if(!D.trim()){R(void 0),O(!1);return}(0,S.hF)(D)?(R(void 0),O(!1)):(O(!0),l((0,U.Pt)({link:D,channelId:e,reason:"channel-expert-add-google-doc"})).then(e=>{e?.ok&&e?.preview&&R(e.preview),O(!1)}).catch(()=>{R(void 0),O(!1)}))},[D,e,l]),(0,n.useCallback)(e=>{u(e)},[]);let J=(0,n.useCallback)(e=>{switch(e){case F.ii.INVALID_URL:return $.t("Enter a link to a Google Doc, Google Slides, or uploaded Google Drive file.");case F.ii.INVALID_DOMAIN:return $.t("Please enter a valid Google Drive URL.");case F.ii.UNSUPPORTED_FILE_TYPE:return $.t("This file type is not supported. You can add links to Google Docs, Google Slides, or files uploaded to Google Drive in .pdf, .txt, .doc, .docx, or .csv formats.",{fallbackHash:"8d886c0ba6f2b683daba5f19568a316226ce3e4c"});default:return}},[]),X=(0,n.useMemo)(()=>null===(0,S.hF)(s),[s]),ee=(0,P.d4)(G.mF),et=(0,P.d4)(G.Rk),ea=(0,P.d4)(G.b3);(0,n.useEffect)(()=>{l((0,q.k)({reason:"channel-expert-settings-modal",querySource:"channel_expert_config_ui"}))},[l]);let en=(0,n.useCallback)(e=>{e.preventDefault(),v(!0),f.J.open(et?.auth_url,"_blank","noopener,noreferrer")},[et?.auth_url]),er=J(p),ei=$.t("Add a Google Drive file"),el=$.t("Paste a Google Drive link"),eo=$.t("Google Drive link"),es=($.t("Share settings"),ee||!ea||!s.trim()||!X||I);return n.createElement(H.aF,{centered:!0,maxWidth:520,labelledby:a},n.createElement(H.rQ,null,n.createElement(H.Rc,{id:a,title:ei})),n.createElement(H.$m,null,n.createElement(H.qf,null,T&&n.createElement("div",{className:"margin_bottom_50 margin_top_25"},n.createElement(g.Ay,{level:g.A_.error},T)),ee&&n.createElement("div",{className:"display_flex justify_content_center padding_top_200 padding_bottom_200"},n.createElement(A.A,{size:"large"})),!ee&&ea&&n.createElement(n.Fragment,null,n.createElement(x.A,{text:eo,htmlFor:i},n.createElement(E.A,{name:i,id:i,size:"medium",placeholder:el,value:s,onChange:Q,onBlur:Z,errorText:er,icon:L?"spinner":void 0})),X&&M&&n.createElement("div",{className:"margin_top_025"},n.createElement(ChannelExpertSettingsAddGoogleDocPreview,{title:M.title,url:s})),!1),!ee&&!ea&&n.createElement("div",{className:"padding_top_125 padding_bottom_125"},n.createElement("div",{className:K().connectContainer},n.createElement("div",{className:K().iconContainer},n.createElement(GoogleDocIcon,{size:56}),n.createElement("div",{className:K().plugIconWrapper},n.createElement(m.Ah,{name:"plug",size:"16"}))),n.createElement("div",{className:K().connectContent},n.createElement("h3",{className:"margin_bottom_50"},$.t("Connect your Google Account")),k?n.createElement("p",null,$.t("Go to your web browser to sign in, so you can use Google files in Slack.",{fallbackHash:"c98c425759e8e33382afb21136ee4478e527815e"})):n.createElement("p",null,$.t("To add files from Google, sign in to your account from your web browser.",{fallbackHash:"fb97db3e2328e1bdfaaa9b3ac0ddcd84b685e88d"})),n.createElement(o.lV,{type:"primary",onClick:en,loading:k},$.t("Connect"))))))),n.createElement(H.jl,null,n.createElement(H.ox,null,n.createElement(y.Ay,{type:"outline",onClick:z},$.t("Cancel")),n.createElement(o.lV,{type:"primary",onClick:Y,disabled:es,loading:I},$.t("Save")))))};ChannelExpertSettingsAddGoogleDocModal.displayName="ChannelExpertSettingsAddGoogleDocModal";var Y=a(0x22809c249),Q=a(0x1e19d7430),Z=a(0x70de3606),J=a(0x1c2e38de1),X=a(0x167d76333),ee=a(0x3711e82d),et=a(0x147fb8c90),ea=a(0x9b971e7e),en=a(0x4c444437),er=a(0x1e4f36d40),ei=a(0x226609a31),el=a(0x46dbff89),eo=a(0x16ffed5ab),es=a(0xdaeae807),ec=a.n(es);let ed=new l.Ay("tabbed-channel"),em={name:"plus-filled"},useOpenAddFileModal=({channelId:e,folderBookmarkId:t,hiddenFileInputRef:a,currentTab:i,onFileAdded:l,uiPage:o,isStackable:s,disableNewFileCreation:c,fileTypesAllowed:d,resultsFilter:m})=>{let u=(0,r.wA)();return(0,n.useMemo)(()=>{let openModalByFileType=a=>{u((0,el.q)({element:n.createElement(h.J,{channelId:e,parentId:t,fileType:a,onFileAdded:l,channelTab:i,clogUiPage:o,isStackable:s,disableNewFileCreation:c,fileTypesAllowed:d,resultsFilter:m}),isStackable:s}))};openModalByFileType.displayName="openModalByFileType";let onAddGoogleDoc=()=>{u((0,el.q)({element:n.createElement(ChannelExpertSettingsAddGoogleDocModal,{channelId:e,folderBookmarkId:t}),isStackable:s}))};return onAddGoogleDoc.displayName="onAddGoogleDoc",{onAddFile:()=>{openModalByFileType(h.S.File)},onAddCanvas:()=>{openModalByFileType(h.S.Canvas)},onAddList:()=>{openModalByFileType(h.S.List)},onUploadFile:()=>{a?.current?.click()},onAddGoogleDoc}},[u,e,t,l,i,o,s,c,a,d,m])};useOpenAddFileModal.displayName="useOpenAddFileModal";let getOverflowMenuAutoClogProps=({key:e,isEmptyState:t,uiComponentName:a,uiPage:n})=>{let r="";switch(a){case ee.UiComponentName.CHANNEL_FOLDER_EMPTY_STATE_ADD_BUTTON:case ee.UiComponentName.CHANNEL_FOLDER_HEADER_ADD_BUTTON:r=t?"channel_folder_empty_state":"channel_folder";break;case ee.UiComponentName.CHANNEL_EXPERT_CONFIG_ADD_BUTTON:r=t?"channel_expert_config_empty_state":"channel_expert_config"}return{eventId:ee.EventId.CONTEXT_MENU_ACTION,elementName:e,onClick:{enableClogAction:!0},uiComponentVariant:r,uiComponentName:a,uiPage:n}},FolderCreateMenu=({channelId:e,folderBookmarkId:t,onAddLink:a,addBookmarkButtonRef:l,onFileAdded:h,disableLinks:_,disableAdd:f,disableAddReason:b,addFileLabel:g,isEmptyState:y,uiComponentName:A,uiPage:x=ee.UiPage.CHANNEL_TABS_CHANNEL_FOLDER,children:E,isStackable:C=!1,disableNewFileCreation:k=!1,fileUploadAccept:v,fileTypesAllowed:S,resultsFilter:I,isChannelExpertSettings:w=!1,isPeek:T=!1})=>{let N=(0,r.wA)(),M=(0,P.d4)(ea.ZT),R=(0,P.d4)(X.F),O=(0,P.d4)(Z.Il),D=(0,P.d4)(e=>(0,et.G2)(e,"canvas_standalone__create")),F=(0,P.d4)(e=>"treatment"===(0,L._Z)(e,"multi_file_upload_to_folder")),U=(0,P.d4)(e=>"on"===(0,L._Z)(e,"channel_tabs_polish")),B=(0,P.d4)(e=>"on"===(0,L._Z)(e,"ce_google_drive_support"))&&w,H=(0,P.d4)(J.p)!==J.v.DISABLE_ALL,W=!_,G=(0,n.useRef)(null),q=(0,Q.u)(),{onAddCanvas:j,onAddFile:z,onAddList:K,onUploadFile:$,onAddGoogleDoc:el}=useOpenAddFileModal({channelId:e,folderBookmarkId:t,hiddenFileInputRef:G,currentTab:q,onFileAdded:h,uiPage:x,isStackable:C,disableNewFileCreation:k,fileTypesAllowed:S,resultsFilter:I}),es=ed.t("Error uploading the file."),eu=(0,n.useCallback)(e=>{let t={label:ed.t("Canvas"),icon:n.createElement("div",{className:ec().add_tab_menu_list_item_icon},n.createElement(m.Ah,{name:"canvas-content",size:"20"})),autoClogProps:getOverflowMenuAutoClogProps({key:"canvas",isEmptyState:y,uiComponentName:A,uiPage:x}),click:j},r={label:ed.t("List"),icon:n.createElement("div",{className:ec().add_tab_menu_list_item_icon},n.createElement(m.Ah,{name:"lists",size:"20"})),autoClogProps:getOverflowMenuAutoClogProps({key:"list",isEmptyState:y,uiComponentName:A,uiPage:x}),click:K},i={label:ed.t("File"),icon:n.createElement("div",{className:ec().add_tab_menu_list_item_icon},n.createElement(m.Ah,{name:"file",size:"20"})),autoClogProps:getOverflowMenuAutoClogProps({key:"file",isEmptyState:y,uiComponentName:A,uiPage:x}),click:z},l={label:ed.t("Link"),icon:n.createElement("div",null,n.createElement(m.Ah,{name:"link",size:"20"})),autoClogProps:getOverflowMenuAutoClogProps({key:"link",isEmptyState:y,uiComponentName:A,uiPage:x}),click:a},o={label:ed.t("Upload file"),icon:n.createElement("div",null," ",n.createElement(m.Ah,{name:"laptop",size:"20"})),autoClogProps:getOverflowMenuAutoClogProps({key:"upload",isEmptyState:y,uiComponentName:A,uiPage:x}),click:$},s={label:ed.t("Google Drive",{fallbackHash:"07c2964c41f409a224efb389f282268e4928b85f",fallbackHashNs:"enterprise_search_admin"}),icon:n.createElement("div",null,n.createElement(m.Ah,{name:"brand-google-drive-filled",size:"20"})),autoClogProps:getOverflowMenuAutoClogProps({key:"google_drive",isEmptyState:y,uiComponentName:A,uiPage:x}),click:el},d=U?[...R&&D?[t]:[],...O?[r]:[],i,...W?[l]:[],...H?[o]:[],...B?[s]:[]]:[i,...W?[l]:[],...R&&D?[t]:[],...O?[r]:[],...H?[o]:[]];return n.createElement(c.a,{template:d,...e,width:"200px"})},[y,A,x,j,K,z,a,$,W,R,D,O,H,U,el,B]),ep=(0,n.useCallback)(e=>{e&&h&&h(e.entityId,!1)},[h]),eh=(0,n.useCallback)(async a=>{if(!(0,i.A)(a)&&M)try{let n=F?a:[a[0]];if(F)return void N((0,er.KQ)({channelId:e,filesToUpload:a,parentId:t}));let r=await N((0,en.A)({selectedFiles:n}));if((0,i.A)(r))throw Error("Invalid file");let l=await N((0,ei.Z)({teamId:M,files:r})),o=l.fileIds?.[0];if(!l.fileIds.length)throw Error("Upload failed");N((0,V.V)({channelId:e,parentId:t,fileId:o,channelTab:q,isStackable:C,onCloseCallback:ep}))}catch{N((0,eo.M)({element:n.createElement(u.A,{showCloseButton:!0},es)}))}},[M,F,N,e,t,q,C,es,ep]),e_=(0,n.useCallback)(()=>{let e=A===ee.UiComponentName.CHANNEL_FOLDER_EMPTY_STATE_ADD_BUTTON?"add_button_on_empty_page":"add_button_in_header",t=g??ed.t("Add file or link to folder"),a=g??ed.t("Add",{ns:"tabbed-channel"}),r=g?n.createElement(o.Ay,{ref:l,"aria-label":t,"data-qa":e,disabled:f,size:"small",className:T?ec().addToChannelFolderButtonPeek:void 0},n.createElement(m.Ah,{name:"plus"}),n.createElement("span",{className:"margin_left_25"},a)):n.createElement(s.A,{size:"small",svgIconProps:em,className:ec().addToChannelFolderButton,"aria-label":t,ref:l,disabled:f,"data-qa":e});return f?n.createElement(p.Ay,{tip:b,position:"top"},n.createElement("div",null,r)):r},[l,g,f,b,A,T]);return n.createElement(n.Fragment,null,n.createElement(d.A,{renderMenu:eu,position:A===ee.UiComponentName.CHANNEL_FOLDER_EMPTY_STATE_ADD_BUTTON?"bottom-left":"bottom",isDisabled:f},E||e_()),n.createElement(Y.A,{ref:G,onFilesSelectedHandler:eh,multiple:F,accept:v}))};FolderCreateMenu.displayName="FolderCreateMenu"},0xfce322e2:(e,t,a)=>{"use strict";a.d(t,{x:()=>shouldShowBookmark});var n=a(0x22fb75fe3);let shouldShowBookmark=(e,t)=>t.type===n.x.LINK||t.type===n.x.FILE||t.type===n.x.FOLDER&&("Workflows"!==t.title||"Workflows"===t.title&&e.some(a=>a.parentId===t.id&&shouldShowBookmark(e,a)))},0x16aa7b49b:(e,t,a)=>{"use strict";a.r(t),a.d(t,{WfbAiStepToolsRailTabDot:()=>WfbAiStepToolsRailTabDot});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x190e60a66),o=a(0x24357b9d4),s=a(0x5b1935a6),c=a(0x1f0b9c2c3),d=a.n(c);let WfbAiStepToolsRailTabDot=()=>{(0,o.A)(s.ze.UNIFIED_TOOLS_TAB_WFB_AI_STEP_TOOLS_TAB_BADGE);let e=(0,n.useMemo)(()=>(0,l.F)().getLocaleForLastViewedTeam(),[]);return n.createElement("span",{className:i()(d().railTabDot,{[d().toolsRailTabDotEn]:"en-GB"===e||"en-US"===e})})};WfbAiStepToolsRailTabDot.displayName="WfbAiStepToolsRailTabDot"},0xc06d92e:(e,t,a)=>{"use strict";a.r(t),a.d(t,{WfbAiStepToolsBadge:()=>WfbAiStepToolsBadge});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1fd3f6e20),l=a(0x24357b9d4),o=a(0x5b1935a6);let s=new r.Ay("workflow_builder"),WfbAiStepToolsBadge=()=>{let e=s.t("New");return(0,l.A)(o.ze.UNIFIED_TOOLS_TAB_WFB_AI_STEP_TOOLS_TAB_BADGE),n.createElement("span",{className:"margin_left_50"},n.createElement(i.v,{isMicro:!0,style:i.u.InverseInformative},e))};WfbAiStepToolsBadge.displayName="WfbAiStepToolsBadge"},0x15f443392:(e,t,a)=>{"use strict";a.d(t,{BC:()=>b,Be:()=>l,C1:()=>_,CC:()=>c,DX:()=>r,E4:()=>L,FG:()=>O,Fz:()=>N,G0:()=>f,GF:()=>k,GQ:()=>u,G_:()=>P,Gi:()=>clogWoRemoveAsChannelTab,Gy:()=>E,Gz:()=>U,IH:()=>T,K_:()=>R,PB:()=>p,PC:()=>clogWoAddAsChannelTab,Ru:()=>H,SH:()=>W,SS:()=>M,Y_:()=>w,Zh:()=>m,aS:()=>S,av:()=>I,bC:()=>d,cU:()=>F,el:()=>v,gc:()=>y,kU:()=>B,ky:()=>A,lN:()=>x,md:()=>g,qi:()=>h,tZ:()=>o,vd:()=>D,x5:()=>i,xH:()=>C,yn:()=>s});var n=a(0x3711e82d);let r={elementName:"open_work_object_details",uiComponentVariant:"preview_button",onClick:{enableClogAction:!0}},i={...r,uiComponentVariant:"external_link"},l={...r,uiComponentVariant:"info_button"},o={elementName:"share",onClick:{enableClogAction:!0}},s={elementName:"copy_link",onClick:{enableClogAction:!0}},c={elementName:"external_link",onClick:{enableClogAction:!0}},d={elementName:"feedback",onClick:{enableClogAction:!0}},m={elementName:"unfurl_app_action",onClick:{enableClogAction:!0}},u={elementName:"flexpane_app_action",onClick:{enableClogAction:!0}},p={elementName:"menu_app_action",onClick:{enableClogAction:!0}},h={elementName:"flexpane_menu_app_action",onClick:{enableClogAction:!0}},_={elementName:"more_menu",onClick:{enableClogAction:!0}},f={elementName:"more_menu_reference",onClick:{enableClogAction:!0}},b={elementName:"related_threads",onClick:{enableClogAction:!0}},g={elementName:"click_behavior_pref_slack",onClick:{enableClogAction:!0}},y={elementName:"click_behavior_pref_browser",onClick:{enableClogAction:!0}},A={elementName:"work_object_comments",onClick:{enableClogAction:!0}},x={elementName:"refresh",onClick:{enableClogAction:!0}},E={elementName:"refresh_unfurl",onClick:{enableClogAction:!0}},C={elementName:"new_window",onClick:{enableClogAction:!0}},k={elementName:"file_preview_close",onClick:{enableClogAction:!0}},v={elementName:"file_preview_expanded_action",onClick:{enableClogAction:!0}},S={elementName:"file_preview_wo_flex_pane_action",onClick:{enableClogAction:!0}},I={elementName:"file_preview_slack_thread_action",onClick:{enableClogAction:!0}},w={elementName:"edit_start",onClick:{enableClogAction:!0}},T={elementName:"edit_cancel",onClick:{enableClogAction:!0}},N={elementName:"edit_save",onClick:{enableClogAction:!0}},M={elementName:"edit_discard",onClick:{enableClogAction:!0}},R={elementName:"message_history_upgrade",onClick:{enableClogAction:!0}},P={elementName:"message_history_compare_plans",onClick:{enableClogAction:!0}},L={elementName:"message_history_learn_more",onClick:{enableClogAction:!0}},O={eventId:n.EventId.APP_WORK_OBJECT_AUTH,elementName:"auth_flexpane_overlay",clogImpression:!0},D={eventId:n.EventId.APP_WORK_OBJECT_AUTH,elementName:"auth_ui_connect_button",onClick:{enableClogAction:!0}},F={eventId:n.EventId.APP_WORK_OBJECT_AUTH,elementName:"auth_redirect_flexpane_overlay",clogImpression:!0},U={elementName:"view_conversations",onClick:{enableClogAction:!0}},B={elementName:"error_primary_action",onClick:{enableClogAction:!0}},clogWoAddAsChannelTab=({fileType:e})=>({elementName:"add_as_channel_tab",fileType:e,onClick:{enableClogAction:!0}}),clogWoRemoveAsChannelTab=({fileType:e})=>({elementName:"remove_as_channel_tab",fileType:e,onClick:{enableClogAction:!0}}),H={elementName:"comments_error_state",clogImpression:!0},W={elementName:"comments_refresh",onClick:{enableClogAction:!0}}},0x8de0dc82:(e,t,a)=>{"use strict";a.d(t,{q:()=>ExtError});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x11a296110),o=a(0x113cdbbd7),s=a(0x944e06df),c=a(0x1d9a37519),d=a(0x15f443392),m=a(0x170453bed);let u=a.p+"popsicle-illustration-8e5eaba.svg";var p=a(0x2309268e8),h=a.n(p);let ExtError=({appId:e,entity:t,entityUrl:a,displayMode:r="overlay",messageTs:p,channelId:_,isEphemeral:f})=>{let b="entity_id"in t?t.entity_id:"",g="entity_url"in t?t.entity_url:a,y="ext_error"in t?t.ext_error:void 0,A=y?.actions?.block_payload,x=y?.actions?.error_actions?.[0],{onActionButtonClick:E}=(0,m.b)({entityId:b??"",serviceId:A?.service_id,serviceTeamId:A?.service_team_id,containerType:A?.container?.type,messageTs:p,channelId:_,entityUrl:g,isEphemeral:f}),[C,k]=(0,n.useState)(!1),v=(0,n.useCallback)(()=>{k(!0),E(x)(),setTimeout(()=>{k(!1)},3e4)},[E,x]);if(!y)return null;let S="overlay"===r,I=y.rich_text_message?[y.rich_text_message]:void 0;return n.createElement("div",{className:i()(h().container,{[h().containerCenter]:!S})},S?n.createElement(c.z,{appId:e,size:128,width:56,height:56,imageClassName:h().appIcon,badgeIconName:"lock"}):n.createElement("img",{src:u,alt:"","aria-hidden":"true",className:h().image}),n.createElement("div",null,y.title&&n.createElement("h3",{className:h().title},y.title),I?n.createElement("div",{className:h().message},n.createElement(s.A,{blocks:I,container:o.pi.view,blocksContainerContext:o.pi.slab_grid_cell,inline:!1})):n.createElement("p",{className:h().message},y.message)),n.createElement("div",{className:h().actions},x&&n.createElement(l.lV,{type:x.style||"outline",onClick:v,"aria-label":x.accessibility_label||x?.text.text,loading:C&&x.processing_state?.enabled&&S,autoClogProps:d.kU},x?.text.text||"")))};ExtError.displayName="ExtError"},0x470fe2e6:(e,t,a)=>{"use strict";a.d(t,{B:()=>WorkObjectDate});var n=a(0xbad225b5),r=a(0x12edaa96a),i=a(0x1af490f63),l=a(0x153cbdf74);let WorkObjectDate=({value:e,hideDateIcon:t})=>{let a=(0,n.useMemo)(()=>({id:(0,r.A)(),name:"",key:(0,r.A)(),type:l.F.Date,isPrimaryColumn:!1,options:{format:"single",dateFormat:"default"}}),[]);return n.createElement(i.i,{startDateRange:e,column:a,hideDateIcon:t})};WorkObjectDate.displayName="WorkObjectDate"},0x13fbcf481:(e,t,a)=>{"use strict";a.d(t,{BB:()=>getCollapsedAddressees,Hp:()=>isEmailAttachmentItem,wn:()=>getEmailDetailsFromFields});var n=a(0x1480e7c40),r=a(0x24e98a449),i=a(0xa985ed31);let isEmailAttachmentItem=e=>"object"==typeof e&&null!==e&&!(0,i.A)(e.id),getEmailDetailsFromFields=e=>e.reduce((e,t)=>{if(t.isText()||t.isTimestamp()){let a=t.label().toLowerCase(),n=t.value();if(a in e){let t=n;try{"string"==typeof t&&(t=JSON.parse(t))}catch{t=n}finally{e[a]=t}}}return e},{from:{name:"",email:""},to:[],cc:[],bcc:[],subject:"",sent:0,attachments:{items:[],app_id:"",message_id:""}}),getCollapsedAddressees=({to:e,cc:t,bcc:a})=>{if(e.length+t.length+a.length<=r.DR)return{to:e,cc:t,bcc:a};let i={to:[],cc:[],bcc:[]},l=r.DR;return i.to=(0,n.A)(e,l),(l-=i.to.length)>0&&(i.cc=(0,n.A)(t,l),l-=i.cc.length),l>0&&(i.bcc=(0,n.A)(a,l)),i}},0xceb4914:(e,t,a)=>{"use strict";a.d(t,{O:()=>WorkObjectImage});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x113cdbbd7),o=a(0x944e06df),s=a(0x24e98a449),c=a(0xbd3de346),d=a(0x207eb3801),m=a(0x1ec68d6a3),u=a(0x226892387),p=a(0x14149c126),h=a(0x14ea3ce99),_=a(0x17588a0d),f=a.n(_);let WorkObjectImage=({imageBlock:e,displayImageWithoutLink:t,displayImageWithBorder:a,classNames:r,ariaLabel:_,ariaHidden:b,resizeToPreview:g,isIcon:y=!1,externalUrl:A})=>{let x=(0,u.d4)(e=>(0,m.Ay)({state:e})),E="on"===(0,u.d4)(e=>(0,p._Z)(e,"file_thumb_refresh")),C=(0,u.d4)(t=>{if(e?.slack_file?.id)return(0,h.Lp)(t,e.slack_file.id)}),k=(0,n.useMemo)(()=>(0,c.WA)(C,{containerWidth:s.h2,containerHeight:s.Gm,cover:!0,suppressAnimations:!0}),[C]),[v,S]=(0,n.useState)(k?.src);(0,n.useEffect)(()=>{if(C&&k?.src)try{let e=new URL(k.src);e.searchParams.set("xts",Date.now().toString()),S(e.toString())}catch(e){x.warn("Failed to force reload file thumbnail",{error:e,thumbnail:k})}},[C,x,k]);let I=(0,n.useMemo)(()=>{if(!k?.src)return;let e=new URL(k.src);return C?.updated&&e.searchParams.set("xts",C.updated.toString()),e.toString()},[k,C]),w=E?I||e.image_url:v||e.image_url,T=(0,n.useMemo)(()=>{let{image_url:t,slack_file:a,...n}=e;return k?.src&&!e.image_width&&!e.image_height||g&&e.image_width&&e.image_height?[{...n,image_url:w,image_width:s.h2,image_height:s.Gm}]:[{...n,image_url:w}]},[k,e,g,w]),N=!!A&&(0,d.Cw)(A);return n.createElement("div",{className:i()(f().image,r,{[f().previewImage]:!y,[f().tableauVisualizationImage]:N}),role:"img","aria-label":_,"aria-hidden":b},n.createElement(o.A,{blocks:T,blocksContainerContext:l.pi.work_object,isInAppView:!0,displayImageWithoutLink:t,displayImageWithBorder:a}))};WorkObjectImage.displayName="WorkObjectImage"},0x5f0e06d4:(e,t,a)=>{"use strict";a.d(t,{Z3:()=>WorkObjectMetadataUserThumbnail,m5:()=>WorkObjectMetadataUsersList,nx:()=>WorkObjectMetadataUser});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x32d3ef3d),o=a(0xfa28400d),s=a(0x9798b7f),c=a(0x7729d35b),d=a(0x210cf696f),m=a(0x2501a2cee),u=a(0x1b024850b),p=a(0x3ca4e1cc),h=a(0x5929da28),_=a(0x1a02c72b5),f=a(0xd6a16321),b=a(0x226892387),g=a(0xe684f705),y=a(0x8b3d4022),A=a.n(y);let x=new i.Ay("work-objects"),E={color:"var(--dt_color-content-hgl-2)",backgroundColor:"var(--dt_color-base-pry)"},C={color:"var(--dt_color-content-hgl-2)",backgroundColor:"var(--dt_color-base-pry)",width:"8px",height:"8px",borderRadius:"50%",padding:"2px"},k={color:"var(--dt_color-content-ter)",backgroundColor:"var(--dt_color-base-pry)"},v={color:"var(--dt_color-content-ter)",backgroundColor:"var(--dt_color-base-pry)",width:"12px",height:"12px",borderRadius:"50%"},S={color:"var(--dt_color-content-imp)",backgroundColor:"var(--dt_color-base-pry)"},I={color:"var(--dt_color-content-imp)",backgroundColor:"var(--dt_color-base-pry)",width:"8px",height:"8px",borderRadius:"50%",padding:"2px"},AttendanceBadge=({overlayIcon:e,isExpanded:t})=>"check-circle"===e?n.createElement(m.Ah,{name:t?"check-filled":"check-circle-filled",style:t?C:E}):"help"===e?n.createElement(m.Ah,{name:t?"help":"help-filled",style:t?v:k}):"close-circle"===e?n.createElement(m.Ah,{name:t?"close-filled":"close-circle-filled",style:t?I:S}):null;AttendanceBadge.displayName="AttendanceBadge";let getTitle=({title:e,userRole:t})=>t?n.createElement("div",{className:A().titleWithRole},n.createElement("div",{className:A().title},e),n.createElement("div",{className:A().userRole},t)):n.createElement("div",{className:A().title},e);getTitle.displayName="getTitle";let MetadataUserObject=({image:e,title:t,secondaryLabel:a,overlayIcon:r,userRole:i,"data-entity-list-index":d,onClick:m})=>n.createElement(o.Ay,{size:l.S.compact,entityState:l.w.enabled,isRemovable:!1,isAutoHeight:!0,isFullWidth:!0,"data-entity-list-index":d,onClick:m,isInteractive:!!m},n.createElement("div",{className:A().metadataUserObjectContainer},n.createElement("div",{className:A().userImage},n.createElement(c.A,{entityState:l.w.enabled,suppressDefaultColors:!0},n.createElement("img",{src:e,alt:t,className:A().productIconImg})),r&&n.createElement("div",{className:A().attendanceBadge},n.createElement(AttendanceBadge,{overlayIcon:r,isExpanded:!1}))),n.createElement("div",{className:A().metadataUserObjectLabels},n.createElement(s.A,{primaryLabel:getTitle({title:t,userRole:i}),primaryTruncateLines:1,secondaryLabel:a,secondaryTruncateLines:1,entityState:l.w.enabled,size:l.S.expanded}))));MetadataUserObject.displayName="MetadataUserObject";let WorkObjectMetadataUser=({user:e,"data-entity-list-index":t})=>{let a=(0,r.wA)(),i=(0,b.d4)(t=>"slack"===e.user_type?(0,g.nv)(t,e.user_id):null),l=e.metadata?.overlay_icon&&"icon_name"in e.metadata.overlay_icon?e.metadata.overlay_icon.icon_name:void 0,{imageUrl:o,title:s,secondaryLabel:c}=(0,h.N)(e,i),d=e.metadata?.role??"",m="slack"===e.user_type?e.user_id:void 0,u=(0,n.useCallback)(()=>{"slack"===e.user_type&&m?a((0,_.o)({...(0,f.Fo)({memberId:m})})):a((0,_.o)({...(0,f.x0)({name:s,imageUrl:o,email:d,url:void 0})}))},[e.user_type,m,a,s,o,d]);return n.createElement(MetadataUserObject,{image:o,title:s,secondaryLabel:c||void 0,"data-entity-list-index":t,userRole:d,overlayIcon:l,onClick:u})};WorkObjectMetadataUser.displayName="WorkObjectMetadataUser";let WorkObjectMetadataUserThumbnail=({user:e})=>{let t=(0,b.d4)(t=>"slack"===e.user_type?(0,g.nv)(t,e.user_id):null),a=e.metadata?.overlay_icon&&"icon_name"in e.metadata.overlay_icon?e.metadata.overlay_icon.icon_name:void 0,{imageUrl:r,title:i}=(0,h.N)(e,t);return n.createElement("div",{className:A().userImageThumbnail},n.createElement("img",{src:r,alt:i,className:A().productIconImgThumbnail}),a&&n.createElement("div",{className:A().attendanceBadgeThumbnail},n.createElement(AttendanceBadge,{overlayIcon:a,isExpanded:!0})))};WorkObjectMetadataUserThumbnail.displayName="WorkObjectMetadataUserThumbnail";let WorkObjectMetadataUsersList=({users:e,entityId:t,entityUrl:a})=>{let i=(0,r.wA)(),l=(0,b.d4)(p.GR),o=(0,n.useCallback)(()=>{i((0,_.o)((0,f.mL)({entityId:t??"",entityUrl:a??""})))},[i,t,a]);if(e.length<=5)return n.createElement(u.u,null,e.map(e=>n.createElement(WorkObjectMetadataUser,{key:"slack"===e.user_type?e.user_id:e.text,user:e})));let s=e.slice(0,5);return n.createElement(u.u,null,[...s.map(e=>n.createElement(WorkObjectMetadataUser,{key:"slack"===e.user_type?e.user_id:e.text,user:e})),n.createElement("div",{key:"see-all-attendees-button",className:A().seeAllAttendeesButton},n.createElement(d.A,{onClick:o},l?x.t("See all {count, plural, =1 {# attendee} other {# attendees}}",{count:e.length}):"See all attendees"))])};WorkObjectMetadataUsersList.displayName="WorkObjectMetadataUsersList"},0x21311882d:(e,t,a)=>{"use strict";a.d(t,{Y:()=>WOFilePreviewEventChronometerProvider,c:()=>useEventChronometer});var n=a(0xbad225b5),r=a(0x3711e82d);let i=(0,n.createContext)({logEventTime:()=>{},trackClogRef:null}),WOFilePreviewEventChronometerProvider=({children:e,trackClogRef:t})=>{let[a,l]=(0,n.useState)(performance.now()),o=(0,n.useCallback)((e,n)=>{if(!a)return;let i=(performance.now()-a)/1e3;t?.current?.({action:r.UiAction.PERFORMANCE,elementValue:e,impressionDuration:i,...n})},[a,t]),s=(0,n.useMemo)(()=>({logEventTime:o,trackClogRef:t}),[o,t]);return n.createElement(i.Provider,{value:s},e)};WOFilePreviewEventChronometerProvider.displayName="WOFilePreviewEventChronometerProvider";let useEventChronometer=()=>(0,n.useContext)(i)},0x14e354fcb:(e,t,a)=>{"use strict";a.d(t,{BN:()=>useWOModelFromUnfurl,aI:()=>useWOUnfurlFileThumbnail,cg:()=>useSlackFile});var n=a(0xbad225b5),r=a(0x2093b3a1e),i=a(0x1457bb420),l=a(0x15f4f83cf),o=a(0xad43722c),s=a(0xbd3de346),c=a(0x92599c42),d=a(0x24a2e2ed),m=a(0x22fd0ecc8),u=a(0x1c5663457),p=a(0x8edc8141),h=a(0x1ccef1c6f),_=a(0x226892387),f=a(0x14ea3ce99),b=a(0xd93ecf94);let getExtension=e=>{if(!e)return"none";try{let t=new URL(e),a=t.searchParams.get("file_name"),n=t.pathname.split(".").pop()?.toLowerCase();return a&&(n=a.split(".").pop()?.toLowerCase()),n||"none"}catch{return e.split(".").pop()?.toLowerCase()||"none"}},useSlackFile=({slackFileId:e,fullSizePreviewURL:t,mimeType:a})=>{let r=(0,_.d4)(t=>e?(0,f.Lp)(t,e):null),i=(0,_.d4)(e=>!!r&&(0,d.S)(e,r)),o=(0,_.d4)(e=>!!r&&(0,p.A)(e,r)),{image:b,fileError:g}=(({imageURL:e,slackFileId:t,slackFile:a,canPreviewRemoteImageForFile:r,shouldUseCustomFileStoreForFile:i,mimeType:o})=>{let getMetaData=async e=>{let t=new Image;return t.src=e,await t.decode(),t},[d,p]=(0,n.useState)(null),[f,b]=(0,n.useState)(null),g=o??getExtension(e),y=o?.toLowerCase().startsWith("image/")||c.hp.includes(g),A=(0,_.d4)(e=>!(0,h.ty)(e,"a11y_animations"));return(0,n.useEffect)(()=>{e&&!t&&!a&&y&&getMetaData(e).then(t=>{p({src:t.src,width:t.width,height:t.height,altText:(0,m.dh)(a)??void 0,isAnimated:!1,thumbnailUrl:e})}).catch(()=>{p(null),b({code:"file_not_supported"})})},[e,y,t,a]),(0,n.useEffect)(()=>{t&&a&&(0,l.uz)(a)&&(0,s.sJ)(a)&&p((0,u.Ee)(a,{suppressAnimations:A,canPreviewRemoteImage:r,shouldUseCustomFileStore:i})??null)},[t,a,r,A,i]),{image:d,suppressAnimations:A,fileError:f}})({imageURL:t,slackFile:r,slackFileId:e,canPreviewRemoteImageForFile:i,shouldUseCustomFileStoreForFile:o,mimeType:a}),{pdf:y}=(({pdfURL:e,slackFileId:t,slackFile:a,mimeType:r})=>{let[i,o]=(0,n.useState)(null),d=r??getExtension(e),m=(0,n.useMemo)(()=>c.bc.concat(c.TT),[]);return(0,n.useEffect)(()=>{e&&m.includes(d)&&o({src:e,isConvertedPdf:!1})},[e,d,m]),(0,n.useEffect)(()=>{t&&a&&(0,l.uz)(a)&&(0,s.F1)(a)&&o({src:(0,s.fX)(a)??"",isConvertedPdf:(0,s.Ts)(a)})},[t,a]),{pdf:i,fileExtension:d}})({pdfURL:t,slackFileId:e,slackFile:r,mimeType:a});return{slackFile:r,image:b,pdf:y,fileError:g}},useWOUnfurlFileThumbnail=({channelId:e,messageTs:t,entityId:a})=>{let[l,s]=(0,n.useState)(null),{thumbnailImage:c,slackFile:d}=(({model:e})=>{let[t,a]=(0,n.useState)(null),[r,i]=(0,n.useState)(null),l=(0,_.d4)(e=>t?.slack_file?.id?(0,f.Lp)(e,t?.slack_file?.id):null);return(0,n.useEffect)(()=>{let t=e?.unfurlLayout()||e?.full();if(t?.hasFields()&&t?.hasImage()){let e=t?.fields().find(e=>e.isImage())?.value()[0];e&&(a(e),e.slack_file?.id||i(e.image_url))}},[e]),(0,n.useEffect)(()=>{t&&l&&i(t.image_width&&l?.[`thumb_${t.image_width}`]||l?.thumb_800||l?.thumb_480||t.image_url)},[l,t]),{thumbnailImage:r,slackFile:l}})({model:l}),m=(0,_.d4)(a=>e&&t?(0,b.Ld)(a,e,t):null),u=(0,r.n)({attachments:m?.attachments}),p=u?.find(e=>"external"===e.work_object_type&&e.entity_id===a);return(0,n.useEffect)(()=>{p&&(0,i.W)(p)&&null===l&&s(o.cV.create(p)||null)},[p,l]),{thumbnailImage:c,slackFile:d}},useWOModelFromUnfurl=({channelId:e,messageTs:t,entityId:a})=>{let l=(0,_.d4)(a=>e&&t?(0,b.Ld)(a,e,t):null),s=(0,r.n)({attachments:l?.attachments}),c=s?.find(e=>"external"===e.work_object_type&&e.entity_id===a);return(0,n.useMemo)(()=>{if(c&&(0,i.W)(c))return o.cV.create(c)},[c])}},0x107ab9ee6:(e,t,a)=>{"use strict";a.d(t,{g:()=>useSlackFilePreviewEmptyStateConfig});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x4d9b2df9),l=a(0x1d8e3fa37);let o=new r.Ay("work-objects"),useSlackFilePreviewEmptyStateConfig=({error:e,productIcon:t,fileType:a,fileThumbnailURL:r,appName:s,productName:c,fileName:d,externalUrl:m,fallbackIconType:u})=>{let p=o.t("Open in {productName}",{productName:c||s}),h=o.t("This file is too big to preview"),_=o.t("Sorry, we couldn\u2019t load this file"),[f,b]=(0,n.useState)({renderType:i.P.LOADER,renderProps:{primaryText:o.t("Loading preview\u2026"),showOpenInAppAction:!1,openInAppComponentType:"link",externalUrl:m,openInAppActionText:p,productIcon:t}});return(0,n.useEffect)(()=>{if(e||b({renderType:i.P.LOADER,renderProps:{primaryText:o.t("Loading preview\u2026"),showOpenInAppAction:!1,openInAppComponentType:"link",externalUrl:m,openInAppActionText:p,productIcon:t}}),e)switch(e?.code){case"access_denied":case"restricted":b({renderType:i.P.ERROR,renderProps:{isRestricted:!0}});break;case"auth_redirect":case"auth_required":case"manual_auth_redirect":case"user_not_authed":case"flexpane_custom_error":case"app_not_installed":case"custom":case"not_found":case"edit_error":b({renderType:i.P.ERROR,renderProps:{fallbackIconType:u}});break;case"file_size_exceeded":b({renderType:i.P.ERROR,renderProps:{fileThumbnailURL:r,primaryText:a?o.t("This {display_type} is too big to preview",{display_type:a}):h,showOpenInAppAction:!0,openInAppActionText:p,openInAppComponentType:"button",externalUrl:m}});break;case"file_not_supported":case"preview_not_supported":case"unable_to_process":b({renderType:i.P.ERROR,renderProps:{productIcon:t,primaryText:o.t("This file cannot be previewed"),secondaryText:d,showOpenInAppAction:!0,openInAppActionText:p,openInAppComponentType:"button",externalUrl:m}});break;case"session_closed":b({renderType:i.P.ERROR,renderProps:{fallbackImageUrl:l,primaryText:o.t("Tableau Next session closed",{fallbackHashNs:"tableau",fallbackHash:"74c2d814a1c404dd58deeaac431f951f817a84aa"}),secondaryText:o.t("Live embeds cannot be displayed as your Tableau Next session has been closed.",{fallbackHashNs:"tableau",fallbackHash:"1fc8b5d3b4b7b5e37eda0ca94ea3bf34499cc03f"}),showOpenInAppAction:!0,openInAppActionText:p,openInAppComponentType:"button",externalUrl:m}});break;default:b({renderType:i.P.ERROR,renderProps:{fallbackImageUrl:l,primaryText:a?o.t("Sorry, we couldn\u2019t load this {fileType}.",{fileType:a}):_,secondaryText:o.t("Something went wrong with {productName}.",{productName:c||s}),showOpenInAppAction:!0,openInAppActionText:p,openInAppComponentType:"button",externalUrl:m}})}},[e,t,d,r,a,c,m,p,h,_,s,u]),f}},0xc4307c22:(e,t,a)=>{"use strict";a.d(t,{N:()=>SlackFileViewerEmptyState});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1d08e7031),o=a(0x1d9a37519),s=a(0xceb4914),c=a(0x17d13b2a8),d=a(0x1cefa8f4c),m=a(0x1b869f061),u=a.n(m);let p=["var(--dt_color-brand-core-slack-blue)","var(--dt_color-brand-core-slack-green)","var(--dt_color-brand-core-slack-red)","var(--dt_color-brand-core-slack-yellow)"],LoaderBar=({percentage:e=0,showIndeterminate:t=!0})=>{let[a,r]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(t){let e=setInterval(()=>{r(e=>(e+1)%p.length)},1350);return()=>clearInterval(e)}return()=>{}},[t]);let l=(0,n.useMemo)(()=>{let n=Math.max(0,Math.min(100,e));return t?{backgroundColor:{backgroundColor:p[a]},motionProps:{initial:{x:"-100%"},animate:{x:"100%"},transition:{duration:.55,ease:"easeInOut"}}}:{backgroundColor:{backgroundColor:"rgb(var(--dt_color-plt-lagoon-50))"},motionProps:{initial:{width:"0%"},animate:{width:`${n}%`},transition:{duration:.2,ease:"easeOut"}}}},[a,e,t]);return n.createElement("div",{className:i()(u().loaderBar,c.RD)},n.createElement(d.P.div,{key:t?a:"progress",className:u().loaderBarFill,style:l.backgroundColor,...l.motionProps}))};LoaderBar.displayName="LoaderBar";var h=a(0x20482ad21),_=a(0x11a296110),f=a(0x1faa3f1ac),b=a(0x2501a2cee),g=a(0x15f443392),y=a(0x15ef02801),A=a.n(y);let x=new h.Ay("work-objects"),OpenInAppAction=({externalUrl:e,openInAppActionText:t,openInAppComponentType:a="button"})=>{let r=x.t("Open in app");return"link"===a?n.createElement(f.A,{href:e,className:A().openInAppLink,autoClogProps:g.CC},n.createElement(b.Ah,{size:"16",name:"new-window"}),t??r):n.createElement(_.Ay,{href:e,className:"c-link c-button c-button--outline c-button--medium empty-state-href",autoClogProps:g.CC},n.createElement("div",{className:A().openInAppButton},n.createElement(b.Ah,{size:"16",name:"new-window"}),t??r))};OpenInAppAction.displayName="OpenInAppAction";let HourGlassIllustration=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"198",height:"128",viewBox:"0 0 198 128",fill:"none"},n.createElement("path",{d:"M81.9241 125.59L69.928 124.604V119.935H84.0614L81.9241 125.59Z",fill:"black"}),n.createElement("mask",{id:"mask0_6786_176",maskUnits:"userSpaceOnUse",x:"10",y:"26",width:"188",height:"102"},n.createElement("path",{d:"M10.767 89.7454L126.799 26.9851L198 65.2397L81.9511 128L10.767 89.7454Z",fill:"white"})),n.createElement("g",{mask:"url(#mask0_6786_176)"},n.createElement("path",{d:"M190.142 61.0167L134.608 31.167C133.212 30.4234 131.54 29.9564 129.816 29.6624C128.834 29.5587 127.817 29.4549 126.765 29.4549C126.179 29.4895 125.559 29.5241 124.973 29.5587C123.525 29.697 122.129 29.9564 120.871 30.4234C120.216 30.6309 119.613 30.8903 119.027 31.2016C118.441 31.5129 117.958 31.8415 117.562 32.2047C117.424 32.2739 117.424 32.343 117.303 32.4122L108.306 37.2719C97.0509 43.3594 92.9315 52.1967 97.499 60.3595L102.049 68.5223C103.066 70.1998 102.204 71.9638 99.8948 73.209C97.5852 74.4542 94.2586 74.8865 91.2079 74.385L76.0748 71.9465C60.9245 69.5081 44.5332 71.7563 33.2954 77.8438L20.4547 84.7788C19.7825 85.0036 19.1965 85.2457 18.6105 85.557C18.0245 85.8683 17.5418 86.1969 17.1454 86.5601L16.4905 86.9232L16.8179 86.8541C14.4566 89.1023 15.1116 92.025 18.6622 93.9446L74.1961 123.794C76.4023 124.97 79.1773 125.558 81.9695 125.558C83.8137 125.558 85.6924 125.316 87.3471 124.797L87.8124 124.642C88.4846 124.417 89.1396 124.14 89.6739 123.846C90.2082 123.552 90.6563 123.275 91.2079 122.878C91.3285 122.791 91.5354 122.67 91.656 122.566L104.031 115.874C114.752 110.011 118.94 101.139 114.855 92.7859L110.288 84.6231C109.271 82.9456 110.133 81.1816 112.442 79.9364C114.752 78.6912 118.01 78.2243 121.129 78.7604L136.28 81.1989C151.413 83.6374 167.804 81.3718 179.059 75.2843L188.694 70.0788C189.194 69.8885 189.694 69.681 190.124 69.4562C190.573 69.2141 191.072 68.9374 191.503 68.5742L191.641 68.505C191.848 68.3148 192.038 68.1245 192.193 67.9516C192.744 67.3982 193.072 66.7929 193.279 66.1876C193.537 65.3229 193.468 64.4236 193.003 63.6108C192.538 62.6423 191.607 61.7776 190.193 61.034",fill:"black"})),n.createElement("mask",{id:"mask1_6786_176",maskUnits:"userSpaceOnUse",x:"0",y:"1",width:"188",height:"109"},n.createElement("path",{d:"M0 68.7188L116.049 1.04692L187.233 42.2934L71.1841 109.965L0 68.7188Z",fill:"white"})),n.createElement("g",{mask:"url(#mask1_6786_176)"},n.createElement("path",{d:"M179.371 37.7411L123.837 5.55681C122.441 4.74398 120.786 4.24245 119.045 3.93116C118.046 3.8101 117.046 3.70634 115.977 3.68904C115.391 3.72363 114.788 3.75822 114.185 3.8101C112.72 3.94845 111.341 4.22516 110.083 4.72669C109.428 4.95151 108.825 5.22822 108.239 5.5741C107.653 5.91998 107.17 6.26586 106.791 6.64634C106.653 6.73281 106.653 6.80198 106.515 6.88845L97.5178 12.1286C86.2801 18.683 82.1607 28.2121 86.6937 37.0148L91.2612 45.8175C92.2609 47.6334 91.4163 49.5184 89.0895 50.8674C86.7627 52.2163 83.4534 52.6833 80.4026 52.1471L65.2523 49.5184C50.1192 46.907 33.7279 49.3282 22.4729 55.8827L9.6322 63.371C8.97724 63.5958 8.37398 63.8725 7.78796 64.2184C7.20194 64.5643 6.71934 64.9102 6.32291 65.3079L5.66795 65.6884L5.99543 65.6192C3.63412 68.0404 4.27185 71.1879 7.83967 73.2632L63.3736 105.43C65.5626 106.693 68.3548 107.315 71.147 107.315C72.974 107.315 74.8699 107.056 76.5246 106.485L76.3867 106.658L76.9727 106.312C77.6449 106.087 78.2999 105.776 78.8514 105.465C79.403 105.154 79.9028 104.773 80.506 104.427C80.6095 104.306 80.7301 104.202 80.8163 104.081L93.1916 96.8697C103.912 90.54 108.101 80.9764 104.016 71.9835L99.4483 63.1808C98.4486 61.3649 99.2931 59.4798 101.62 58.1309C103.947 56.782 107.187 56.2804 110.307 56.8511L125.457 59.4798C140.625 62.0912 156.999 59.6701 168.237 53.1156L177.871 47.495C178.388 47.3048 178.888 47.0627 179.302 46.8205C179.75 46.5611 180.25 46.2671 180.664 45.8521L180.802 45.7656C181.008 45.5754 181.198 45.3678 181.388 45.1603C181.922 44.5723 182.267 43.9151 182.456 43.258C182.732 42.3414 182.646 41.3729 182.18 40.4736C181.732 39.436 180.784 38.5021 179.388 37.7065",fill:"#611F69"})),n.createElement("path",{d:"M179.374 37.9125L123.84 5.72821C122.444 4.91539 120.789 4.36198 119.048 4.10256C118.049 3.94692 117.049 3.84315 115.98 3.86045C115.394 3.87774 114.791 3.92962 114.188 3.98151C112.723 4.10256 111.344 4.43115 110.086 4.89809C109.431 5.14021 108.828 5.39962 108.242 5.7455C107.656 6.09139 107.225 6.48915 106.794 6.81774C106.656 6.9215 106.656 6.97339 106.518 7.05986L97.5209 12.3C86.2831 18.8544 82.1637 28.3835 86.6968 37.1862L91.2643 45.9889C92.2639 47.8048 91.4194 49.6898 89.0925 51.0388C86.7657 52.3877 83.4564 52.8547 80.4057 52.3185L65.2554 49.6898C50.1223 47.0784 33.731 49.4996 22.476 56.0541L9.63525 63.5424C8.98029 63.7672 8.37703 64.0439 7.79101 64.3898C7.20499 64.7357 6.72239 65.0816 6.32597 65.4794L5.671 65.8598L5.99848 65.7907C3.63717 68.2118 4.2749 71.3593 7.84272 73.4346L63.3766 105.602C63.6524 105.757 63.9627 105.913 64.2557 106.069C66.2895 107.037 68.7198 107.504 71.1328 107.504C71.5464 107.504 71.9601 107.504 72.3738 107.469C73.8043 107.383 75.2349 107.124 76.5104 106.691L76.3725 106.847L76.9585 106.501C77.6307 106.276 78.2857 105.965 78.8372 105.654C79.3888 105.342 79.9403 105.048 80.4919 104.616C80.6125 104.512 80.7159 104.391 80.8021 104.27L93.1774 97.0584C103.898 90.7288 108.086 81.1651 104.002 72.1722L99.4341 63.3695C98.4344 61.5536 99.2789 59.6685 101.606 58.3196C103.933 56.9707 107.173 56.4691 110.293 57.0398L125.443 59.6685C140.611 62.2799 156.985 59.8588 168.222 53.3043L177.857 47.6837C178.374 47.4935 178.874 47.2514 179.288 47.0092C179.736 46.7498 180.236 46.4558 180.649 46.0408L180.787 45.9543C180.994 45.7641 181.184 45.5565 181.373 45.349C181.908 44.7437 182.252 44.1038 182.442 43.4467C182.718 42.5301 182.597 41.5789 182.166 40.6623C181.666 39.642 180.77 38.6908 179.374 37.8952",fill:"#611F69"}),n.createElement("path",{d:"M179.374 38.0762L123.84 5.8919C122.444 5.07907 120.789 4.52566 119.048 4.26625C118.049 4.1106 117.049 4.00684 115.98 4.02413C115.394 4.04143 114.791 4.09331 114.188 4.14519C112.723 4.26625 111.344 4.59484 110.086 5.06178C109.431 5.3039 108.828 5.56331 108.242 5.90919C107.656 6.25507 107.225 6.65284 106.794 6.98143C106.656 7.08519 106.656 7.13707 106.518 7.22354L97.5209 12.4637C86.2831 19.0181 82.1637 28.5472 86.6968 37.3499L91.2643 46.1526C92.2639 47.9685 91.4194 49.8535 89.0925 51.2025C86.7657 52.5514 83.4564 53.0183 80.4057 52.4822L65.2554 49.8535C50.1223 47.2421 33.731 49.6633 22.476 56.2177L9.63525 63.7061C8.98029 63.9309 8.37703 64.2076 7.79101 64.5535C7.20499 64.8994 6.72239 65.2453 6.32597 65.643L5.671 66.0235L5.99848 65.9543C3.63717 68.3755 4.2749 71.523 7.84272 73.5983L63.3594 105.765C63.6352 105.921 63.9454 106.094 64.2384 106.232C66.2723 107.201 68.7025 107.668 71.1155 107.668C71.5292 107.668 71.9429 107.668 72.3565 107.633C73.7871 107.547 75.2349 107.287 76.5104 106.855L76.3897 107.011L76.9757 106.665C77.6479 106.44 78.3029 106.129 78.8544 105.817C79.406 105.506 79.9575 105.212 80.5091 104.78C80.6297 104.676 80.7332 104.555 80.8193 104.434L93.1947 97.2221C103.915 90.8924 108.104 81.3288 104.019 72.3359L99.4513 63.5332C98.4516 61.7173 99.2962 59.8322 101.623 58.4833C103.95 57.1343 107.19 56.6328 110.31 57.2035L125.46 59.8322C140.628 62.4436 157.002 60.0224 168.24 53.468L177.874 47.8474C178.392 47.6572 178.891 47.415 179.305 47.1729C179.753 46.9135 180.253 46.6195 180.667 46.2045L180.805 46.118C181.011 45.9278 181.201 45.7202 181.391 45.5127C181.925 44.9074 182.27 44.2675 182.459 43.6103C182.735 42.6938 182.614 41.7426 182.183 40.826C181.684 39.8056 180.787 38.8545 179.391 38.0589",fill:"#611F69"}),n.createElement("path",{d:"M179.374 38.2598L123.84 6.07549C122.444 5.26267 120.789 4.70926 119.048 4.44985C118.049 4.2942 117.049 4.19044 115.98 4.20773C115.394 4.22503 114.791 4.27691 114.188 4.32879C112.723 4.44985 111.344 4.77844 110.086 5.24538C109.431 5.4875 108.828 5.74691 108.242 6.09279C107.656 6.43867 107.225 6.83644 106.794 7.16502C106.656 7.26879 106.656 7.32067 106.518 7.40714L97.5209 12.6473C86.2831 19.2017 82.1637 28.7308 86.6968 37.5335L91.2643 46.3362C92.2639 48.1521 91.4194 50.0371 89.0925 51.386C86.7657 52.735 83.4564 53.2019 80.4057 52.6658L65.2554 50.0371C50.1223 47.4257 33.731 49.8469 22.476 56.4013L9.63525 63.8897C8.98029 64.1145 8.37703 64.3912 7.79101 64.7371C7.20499 65.083 6.72239 65.4289 6.32597 65.8266L5.671 66.2071L5.99848 66.1379C3.63717 68.5591 4.2749 71.7066 7.84272 73.7819L63.3594 105.949C63.6352 106.105 63.9454 106.278 64.2384 106.416C66.2723 107.384 68.6853 107.851 71.1155 107.869C71.5292 107.869 71.9429 107.869 72.3565 107.834C73.8043 107.748 75.2349 107.488 76.5276 107.056L76.407 107.211L76.993 106.866C77.6652 106.641 78.3201 106.329 78.8717 106.018C79.4232 105.707 79.9748 105.413 80.5263 104.98C80.647 104.877 80.7504 104.756 80.8366 104.635L93.2119 97.423C103.933 91.0933 108.121 81.5297 104.036 72.5367L99.4685 63.734C98.4688 61.9182 99.3134 60.0331 101.64 58.6842C103.967 57.3352 107.207 56.8337 110.327 57.4044L125.477 60.0331C140.645 62.6445 157.019 60.2233 168.257 53.6689L177.892 48.0483C178.409 47.8581 178.909 47.6159 179.322 47.3738C179.77 47.1144 180.27 46.8204 180.684 46.4053L180.822 46.3189C181.029 46.1286 181.218 45.9211 181.408 45.7136C181.942 45.1083 182.287 44.4684 182.476 43.8112C182.752 42.8946 182.632 41.9435 182.201 41.0269C181.701 40.0065 180.805 39.0554 179.408 38.2598",fill:"#611F69"}),n.createElement("path",{d:"M179.374 38.4062L123.84 6.23918C122.444 5.42636 120.789 4.87295 119.048 4.61353C118.049 4.45789 117.049 4.35412 115.98 4.37142C115.394 4.38871 114.791 4.44059 114.188 4.49247C112.723 4.61353 111.344 4.94212 110.086 5.40906C109.431 5.65118 108.828 5.91059 108.242 6.25647C107.656 6.60236 107.225 7.00012 106.794 7.32871C106.656 7.43247 106.656 7.48436 106.518 7.57083L97.5209 12.8109C86.2831 19.3654 82.1637 28.8945 86.6968 37.6972L91.2643 46.4999C92.2639 48.3157 91.4194 50.2008 89.0925 51.5497C86.7657 52.8987 83.4564 53.3656 80.4057 52.8295L65.2554 50.2008C50.1223 47.5894 33.731 50.0106 22.476 56.565L9.63525 64.0534C8.98029 64.2782 8.37703 64.5549 7.79101 64.9008C7.20499 65.2467 6.72239 65.5925 6.32597 65.9903L5.671 66.3708L5.99848 66.3016C3.63717 68.7228 4.2749 71.8703 7.84272 73.9456L63.3422 106.095C63.6179 106.251 63.9282 106.424 64.2212 106.562C66.255 107.531 68.6681 108.015 71.0983 108.015C71.512 108.015 71.9256 108.015 72.3393 107.98C73.7871 107.894 75.2349 107.635 76.5104 107.202L76.3897 107.358L76.9757 107.012C77.6479 106.787 78.3029 106.476 78.8544 106.165C79.406 105.853 79.9575 105.559 80.5091 105.127C80.6297 105.023 80.7332 104.902 80.8366 104.781L93.2119 97.5693C103.933 91.2397 108.121 81.6761 104.036 72.6831L99.4685 63.8804C98.4688 62.0645 99.3134 60.1795 101.64 58.8306C103.967 57.4816 107.207 56.9801 110.327 57.5508L125.477 60.1795C140.645 62.7909 157.019 60.3697 168.257 53.8153L177.892 48.1947C178.409 48.0044 178.909 47.7623 179.322 47.5202C179.77 47.2608 180.27 46.9668 180.684 46.5517L180.822 46.4653C181.029 46.275 181.218 46.0675 181.408 45.86C181.942 45.2547 182.287 44.6148 182.476 43.9576C182.752 43.041 182.632 42.0899 182.201 41.1733C181.701 40.1529 180.805 39.2017 179.408 38.4062",fill:"#611F69"}),n.createElement("path",{d:"M179.374 38.5843L123.84 6.41729C122.444 5.60446 120.789 5.05105 119.048 4.79164C118.049 4.63599 117.049 4.53223 115.98 4.54952C115.394 4.56682 114.791 4.6187 114.188 4.67058C112.723 4.79164 111.344 5.12023 110.086 5.58717C109.431 5.82929 108.828 6.0887 108.242 6.43458C107.656 6.78046 107.225 7.17823 106.794 7.50682C106.656 7.61058 106.656 7.66246 106.518 7.74893L97.5209 12.989C86.2831 19.5435 82.1637 29.0726 86.6968 37.8753L91.2643 46.678C92.2639 48.4939 91.4194 50.3789 89.0925 51.7278C86.7657 53.0768 83.4564 53.5437 80.4057 53.0076L65.2554 50.3789C50.1223 47.7675 33.731 50.1887 22.476 56.7431L9.63525 64.2315C8.98029 64.4563 8.37703 64.733 7.79101 65.0789C7.20499 65.4248 6.72239 65.7707 6.32597 66.1684L5.671 66.5489L5.99848 66.4797C3.63717 68.9009 4.2749 72.0484 7.84272 74.1237L63.3422 106.273C63.6179 106.429 63.9282 106.602 64.2212 106.74C66.2378 107.709 68.6681 108.193 71.0983 108.193C71.512 108.193 71.9256 108.193 72.3393 108.159C73.7871 108.072 75.2349 107.813 76.5276 107.363L76.407 107.519L76.993 107.19C77.6652 106.965 78.3201 106.654 78.8717 106.343C79.4232 106.031 79.9748 105.737 80.5263 105.305C80.647 105.201 80.7504 105.08 80.8538 104.959L93.2291 97.7302C103.95 91.4005 108.138 81.8369 104.053 72.844L99.4858 64.0413C98.4861 62.2254 99.3306 60.3403 101.657 58.9914C103.984 57.6424 107.225 57.1409 110.344 57.7116L125.495 60.3403C140.662 62.9517 157.036 60.5305 168.274 53.9761L177.909 48.3555C178.426 48.1653 178.926 47.9231 179.339 47.681C179.788 47.4216 180.287 47.1276 180.701 46.7126L180.839 46.6261C181.046 46.4359 181.235 46.2283 181.425 46.0208C181.959 45.4155 182.304 44.7756 182.494 44.1184C182.769 43.2019 182.649 42.2507 182.218 41.3341C181.718 40.3137 180.822 39.3626 179.426 38.567",fill:"#611F69"}),n.createElement("path",{d:"M179.374 38.7593L123.84 6.59223C122.444 5.7794 120.789 5.22599 119.048 4.96658C118.049 4.81093 117.049 4.70717 115.98 4.72446C115.394 4.74176 114.791 4.79364 114.188 4.84552C112.723 4.96658 111.344 5.29517 110.086 5.76211C109.431 6.00423 108.828 6.26364 108.242 6.60952C107.656 6.9554 107.225 7.35317 106.794 7.68176C106.656 7.78552 106.656 7.8374 106.518 7.92387L97.5209 13.164C86.2831 19.7185 82.1637 29.2475 86.6968 38.0502L91.2643 46.8529C92.2639 48.6688 91.4194 50.5538 89.0925 51.9028C86.7657 53.2517 83.4564 53.7187 80.4057 53.1826L65.2554 50.5538C50.1223 47.9424 33.731 50.3636 22.476 56.9181L9.63525 64.4064C8.98029 64.6313 8.37703 64.908 7.79101 65.2538C7.20499 65.5997 6.72239 65.9456 6.32597 66.3434L5.671 66.7238L5.99848 66.6547C3.63717 69.0758 4.2749 72.2234 7.84272 74.2987L63.3249 106.448C63.5835 106.604 63.911 106.777 64.204 106.915C66.2378 107.884 68.6508 108.368 71.0638 108.368C71.4775 108.368 71.8912 108.368 72.3048 108.333C73.7526 108.247 75.2177 107.988 76.5104 107.538L76.3897 107.694L76.9757 107.365C77.6479 107.14 78.3029 106.829 78.8544 106.518C79.406 106.206 79.9575 105.912 80.5091 105.48C80.6297 105.376 80.7332 105.255 80.8366 105.134L93.2119 97.9051C103.933 91.5755 108.121 82.0118 104.036 73.0189L99.4685 64.2162C98.4688 62.4003 99.3134 60.5153 101.64 59.1663C103.967 57.8174 107.207 57.3158 110.327 57.8866L125.477 60.5153C140.645 63.1267 157.019 60.7055 168.257 54.151L177.892 48.5304C178.409 48.3402 178.909 48.0981 179.322 47.856C179.77 47.5966 180.27 47.3026 180.684 46.8875L180.822 46.801C181.029 46.6108 181.218 46.4033 181.408 46.1957C181.942 45.5904 182.287 44.9506 182.476 44.2934C182.752 43.3768 182.632 42.4256 182.201 41.509C181.701 40.4887 180.805 39.5375 179.408 38.742",fill:"#611F69"}),n.createElement("path",{d:"M179.374 38.9285L123.84 6.7615C122.444 5.94868 120.789 5.39527 119.048 5.13586C118.049 4.98021 117.049 4.87645 115.98 4.89374C115.394 4.91103 114.791 4.96292 114.188 5.0148C112.723 5.13586 111.344 5.46445 110.086 5.93139C109.431 6.1735 108.828 6.43292 108.242 6.7788C107.656 7.12468 107.225 7.52244 106.794 7.85103C106.656 7.9548 106.656 8.00668 106.518 8.09315L97.5209 13.3333C86.2831 19.8877 82.1637 29.4168 86.6968 38.2195L91.2643 47.0222C92.2639 48.8381 91.4194 50.7231 89.0925 52.0721C86.7657 53.421 83.4564 53.8879 80.4057 53.3518L65.2554 50.7231C50.1223 48.1117 33.731 50.5329 22.476 57.0873L9.63525 64.5757C8.98029 64.8005 8.37703 65.0772 7.79101 65.4231C7.20499 65.769 6.72239 66.1149 6.32597 66.5126L5.671 66.8931L5.99848 66.8239C3.63717 69.2451 4.2749 72.3926 7.84272 74.4679L63.3249 106.6C63.5835 106.756 63.9282 106.929 64.204 107.067C66.2206 108.036 68.6508 108.52 71.0638 108.537C71.4775 108.537 71.8912 108.537 72.3048 108.503C73.7699 108.416 75.2177 108.157 76.5104 107.707L76.3897 107.863L76.9757 107.534C77.6479 107.309 78.3029 106.998 78.8544 106.687C79.406 106.376 79.9575 106.082 80.5091 105.649C80.6297 105.545 80.7332 105.424 80.8366 105.303L93.2119 98.0744C103.933 91.7447 108.121 82.1811 104.036 73.1882L99.4685 64.3855C98.4688 62.5696 99.3134 60.6845 101.64 59.3356C103.967 57.9866 107.207 57.4851 110.327 58.0558L125.477 60.6845C140.645 63.2959 157.019 60.8748 168.257 54.3203L177.892 48.6997C178.409 48.5095 178.909 48.2674 179.322 48.0252C179.77 47.7658 180.27 47.4718 180.684 47.0568L180.822 46.9703C181.029 46.7801 181.218 46.5725 181.408 46.365C181.942 45.7597 182.287 45.1198 182.476 44.4627C182.752 43.5461 182.632 42.5949 182.201 41.6783C181.701 40.658 180.805 39.7068 179.408 38.9112",fill:"#611F69"}),n.createElement("path",{d:"M179.374 39.1035L123.84 6.93644C122.444 6.12362 120.789 5.57021 119.048 5.31079C118.049 5.15515 117.049 5.05138 115.98 5.06868C115.394 5.08597 114.791 5.13785 114.188 5.18974C112.723 5.31079 111.344 5.63938 110.086 6.10632C109.431 6.34844 108.828 6.60785 108.242 6.95373C107.656 7.29962 107.225 7.69738 106.794 8.02597C106.656 8.12973 106.656 8.18162 106.518 8.26809L97.5209 13.5082C86.2831 20.0627 82.1637 29.5917 86.6968 38.3944L91.2643 47.1971C92.2639 49.013 91.4194 50.8981 89.0925 52.247C86.7657 53.5959 83.4564 54.0629 80.4057 53.5268L65.2554 50.8981C50.1223 48.2867 33.731 50.7078 22.476 57.2623L9.63525 64.7506C8.98029 64.9755 8.37703 65.2522 7.79101 65.5981C7.20499 65.9439 6.72239 66.2898 6.32597 66.6876L5.671 67.068L5.99848 66.9989C3.63717 69.4201 4.2749 72.5676 7.84272 74.6429L63.3077 106.775C63.5662 106.931 63.911 107.104 64.1867 107.242C66.2033 108.211 68.6336 108.695 71.0466 108.712C71.4603 108.712 71.8739 108.712 72.2876 108.678C73.7526 108.591 75.2177 108.332 76.5104 107.882L76.3897 108.038L76.9757 107.709C77.6479 107.484 78.3029 107.173 78.8544 106.862C79.406 106.55 79.9575 106.256 80.5091 105.824C80.6297 105.72 80.7332 105.599 80.8366 105.478L93.2119 98.2493C103.933 91.9197 108.121 82.356 104.036 73.3631L99.4685 64.5604C98.4688 62.7445 99.3134 60.8595 101.64 59.5105C103.967 58.1616 107.207 57.6601 110.327 58.2308L125.477 60.8595C140.645 63.4709 157.019 61.0497 168.257 54.4952L177.892 48.8746C178.409 48.6844 178.909 48.4423 179.322 48.2002C179.77 47.9408 180.27 47.6468 180.684 47.2317L180.822 47.1452C181.029 46.955 181.218 46.7475 181.408 46.5399C181.942 45.9347 182.287 45.2948 182.476 44.6376C182.752 43.721 182.632 42.7698 182.201 41.8532C181.701 40.8329 180.805 39.8817 179.408 39.0862",fill:"#611F69"}),n.createElement("path",{d:"M179.374 39.2757L123.84 7.10868C122.444 6.29586 120.789 5.74245 119.048 5.48304C118.049 5.32739 117.049 5.22363 115.98 5.24092C115.394 5.25822 114.791 5.3101 114.188 5.36198C112.723 5.48304 111.344 5.81163 110.086 6.27857C109.431 6.52069 108.828 6.7801 108.242 7.12598C107.656 7.47186 107.225 7.86962 106.794 8.19821C106.656 8.30198 106.656 8.35386 106.518 8.44033L97.5209 13.6804C86.2831 20.2349 82.1637 29.764 86.6968 38.5667L91.2643 47.3694C92.2639 49.1852 91.4194 51.0703 89.0925 52.4192C86.7657 53.7682 83.4564 54.2351 80.4057 53.699L65.2554 51.0703C50.1223 48.4589 33.731 50.8801 22.476 57.4345L9.63525 64.9229C8.98029 65.1477 8.37703 65.4244 7.79101 65.7703C7.20499 66.1162 6.72239 66.462 6.32597 66.8598L5.671 67.2403L5.99848 67.1711C3.63717 69.5923 4.2749 72.7398 7.84272 74.8151L63.3077 106.948C63.5662 107.103 63.911 107.276 64.1867 107.414C66.2033 108.383 68.6163 108.867 71.0466 108.884C71.4603 108.884 71.8739 108.884 72.2876 108.85C73.7526 108.763 75.2177 108.504 76.5276 108.054L76.407 108.21L76.993 107.881C77.6652 107.657 78.3201 107.345 78.8717 107.034C79.4232 106.723 79.9748 106.429 80.5263 105.996C80.647 105.893 80.7504 105.772 80.8538 105.65L93.2291 98.4216C103.95 92.0919 108.138 82.5283 104.053 73.5353L99.4858 64.7326C98.4861 62.9168 99.3306 61.0317 101.657 59.6828C103.984 58.3338 107.225 57.8323 110.344 58.403L125.495 61.0317C140.662 63.6431 157.036 61.2219 168.274 54.6675L177.909 49.0469C178.426 48.8567 178.926 48.6145 179.339 48.3724C179.788 48.113 180.287 47.819 180.701 47.4039L180.839 47.3175C181.046 47.1272 181.235 46.9197 181.425 46.7122C181.959 46.1069 182.304 45.467 182.494 44.8098C182.769 43.8932 182.649 42.9421 182.218 42.0255C181.718 41.0051 180.822 40.054 179.426 39.2584",fill:"#611F69"}),n.createElement("path",{d:"M179.374 39.445L123.84 7.27796C122.444 6.46514 120.789 5.91173 119.048 5.65232C118.049 5.49667 117.049 5.3929 115.98 5.4102C115.394 5.42749 114.791 5.47937 114.188 5.53126C112.723 5.65232 111.344 5.9809 110.086 6.44784C109.431 6.68996 108.828 6.94937 108.242 7.29526C107.656 7.64114 107.225 8.0389 106.794 8.36749C106.656 8.47126 106.656 8.52314 106.518 8.60961L97.5209 13.8497C86.2831 20.4042 82.1637 29.9332 86.6968 38.7359L91.2643 47.5386C92.2639 49.3545 91.4194 51.2396 89.0925 52.5885C86.7657 53.9375 83.4564 54.4044 80.4057 53.8683L65.2554 51.2396C50.1223 48.6282 33.731 51.0494 22.476 57.6038L9.63525 65.0922C8.98029 65.317 8.37703 65.5937 7.79101 65.9396C7.20499 66.2855 6.72239 66.6313 6.32597 67.0291L5.671 67.4096L5.99848 67.3404C3.63717 69.7616 4.2749 72.9091 7.84272 74.9844L63.2905 107.117C63.549 107.272 63.8937 107.445 64.1695 107.584C66.1861 108.552 68.5991 109.036 71.0294 109.054C71.443 109.054 71.8567 109.054 72.2703 109.019C73.7354 108.933 75.2177 108.673 76.5276 108.224L76.407 108.379L76.993 108.051C77.6652 107.826 78.3201 107.515 78.8717 107.203C79.4232 106.892 79.9748 106.598 80.5263 106.166C80.647 106.062 80.7504 105.941 80.8538 105.82L93.2291 98.5908C103.95 92.2612 108.138 82.6976 104.053 73.7046L99.4858 64.9019C98.4861 63.086 99.3306 61.201 101.657 59.852C103.984 58.5031 107.225 58.0016 110.344 58.5723L125.495 61.201C140.662 63.8124 157.036 61.3912 168.274 54.8368L177.909 49.2162C178.426 49.0259 178.926 48.7838 179.339 48.5417C179.788 48.2823 180.287 47.9883 180.701 47.5732L180.839 47.4868C181.046 47.2965 181.235 47.089 181.425 46.8815C181.959 46.2762 182.304 45.6363 182.494 44.9791C182.769 44.0625 182.649 43.1114 182.218 42.1948C181.718 41.1744 180.822 40.2232 179.426 39.4277",fill:"#611F69"}),n.createElement("path",{d:"M179.374 39.6232L123.84 7.43885C122.444 6.62603 120.789 6.07262 119.048 5.81321C118.049 5.65756 117.049 5.55379 115.98 5.57109C115.394 5.58838 114.791 5.64027 114.188 5.69215C112.723 5.81321 111.344 6.14179 110.086 6.60874C109.431 6.85085 108.828 7.11026 108.242 7.45615C107.656 7.80203 107.225 8.19979 106.794 8.52838C106.656 8.63215 106.656 8.68403 106.518 8.7705L97.5209 14.0106C86.2831 20.5651 82.1637 30.0941 86.6968 38.8968L91.2643 47.6995C92.2639 49.5154 91.4194 51.4005 89.0925 52.7494C86.7657 54.0984 83.4564 54.5653 80.4057 54.0292L65.2554 51.4005C50.1223 48.7891 33.731 51.2102 22.476 57.7647L9.63525 65.2531C8.98029 65.4779 8.37703 65.7546 7.79101 66.1005C7.20499 66.4463 6.72239 66.7922 6.32597 67.19L5.671 67.5705L5.99848 67.5013C3.63717 69.9225 4.2749 73.07 7.84272 75.1453L63.2905 107.26C63.549 107.399 63.8937 107.589 64.1695 107.727C66.1861 108.696 68.5991 109.197 71.0121 109.215C71.4258 109.215 71.8395 109.215 72.2531 109.18C73.7182 109.094 75.2004 108.834 76.5104 108.385L76.3897 108.54L76.9585 108.212C77.6307 107.987 78.2857 107.676 78.8372 107.364C79.3888 107.053 79.9403 106.759 80.4919 106.327C80.6125 106.223 80.7159 106.102 80.8193 105.981L93.1947 98.7517C103.915 92.4221 108.104 82.8585 104.019 73.8655L99.4513 65.0628C98.4516 63.2469 99.2962 61.3619 101.623 60.0129C103.95 58.664 107.19 58.1625 110.31 58.7332L125.46 61.3619C140.628 63.9733 157.002 61.5521 168.24 54.9976L177.874 49.3771C178.392 49.1868 178.891 48.9447 179.305 48.7026C179.753 48.4432 180.253 48.1492 180.667 47.7341L180.805 47.6477C181.011 47.4574 181.201 47.2499 181.391 47.0424C181.925 46.4371 182.27 45.7972 182.459 45.14C182.735 44.2234 182.614 43.2722 182.183 42.3557C181.684 41.3353 180.787 40.3841 179.391 39.5886",fill:"#611F69"}),n.createElement("path",{d:"M179.374 39.7955L123.84 7.6112C122.444 6.79838 120.789 6.24496 119.048 5.98555C118.049 5.82991 117.049 5.72614 115.98 5.74344C115.394 5.76073 114.791 5.81261 114.188 5.86449C112.723 5.98555 111.344 6.31414 110.086 6.78108C109.431 7.0232 108.828 7.28261 108.242 7.62849C107.656 7.97437 107.225 8.37214 106.794 8.70073C106.656 8.80449 106.656 8.85637 106.518 8.94285L97.5209 14.183C86.2831 20.7374 82.1637 30.2665 86.6968 39.0692L91.2643 47.8719C92.2639 49.6878 91.4194 51.5728 89.0925 52.9218C86.7657 54.2707 83.4564 54.7376 80.4057 54.2015L65.2554 51.5728C50.1223 48.9614 33.731 51.3826 22.476 57.9371L9.63525 65.4254C8.98029 65.6502 8.37703 65.9269 7.79101 66.2728C7.20499 66.6187 6.72239 66.9646 6.32597 67.3623L5.671 67.7428L5.99848 67.6736C3.63717 70.0948 4.2749 73.2423 7.84272 75.3176L63.2732 107.433C63.5145 107.571 63.8937 107.779 64.1523 107.9C66.1689 108.868 68.5819 109.37 70.9949 109.387C71.4086 109.387 71.8222 109.387 72.2359 109.352C73.7182 109.266 75.2004 109.007 76.5104 108.557L76.3897 108.695L76.9585 108.367C77.6307 108.142 78.2857 107.831 78.8372 107.519C79.3888 107.208 79.9403 106.914 80.4919 106.482C80.6125 106.378 80.7159 106.257 80.8193 106.136L93.1774 98.9068C103.898 92.5771 108.086 83.0135 104.002 74.0206L99.4341 65.2179C98.4344 63.402 99.2789 61.5169 101.606 60.168C103.933 58.8191 107.173 58.3175 110.293 58.8882L125.443 61.5169C140.611 64.1283 156.985 61.7072 168.222 55.1527L177.857 49.5321C178.374 49.3419 178.874 49.0998 179.288 48.8576C179.736 48.5982 180.236 48.3042 180.649 47.8892L180.787 47.8027C180.994 47.6125 181.184 47.4049 181.373 47.1974C181.908 46.5921 182.252 45.9522 182.442 45.2951C182.718 44.3785 182.597 43.4273 182.166 42.5107C181.666 41.4904 180.77 40.5392 179.374 39.7436",fill:"#611F69"}),n.createElement("path",{d:"M179.374 39.9705L123.84 7.78614C122.444 6.97331 120.789 6.4199 119.048 6.16049C118.049 6.00484 117.049 5.90108 115.98 5.91837C115.394 5.93567 114.791 5.98755 114.188 6.03943C112.723 6.16049 111.344 6.48908 110.086 6.95602C109.431 7.19814 108.828 7.45755 108.242 7.80343C107.656 8.14931 107.225 8.54708 106.794 8.87566C106.656 8.97943 106.656 9.03131 106.518 9.11778L97.5209 14.3579C86.2831 20.9124 82.1637 30.4414 86.6968 39.2441L91.2643 48.0468C92.2639 49.8627 91.4194 51.7478 89.0925 53.0967C86.7657 54.4456 83.4564 54.9126 80.4057 54.3765L65.2554 51.7477C50.1223 49.1363 33.731 51.5575 22.476 58.112L9.63525 65.6003C8.98029 65.8251 8.37703 66.1018 7.79101 66.4477C7.20499 66.7936 6.72239 67.1395 6.32597 67.5373L5.671 67.9177L5.99848 67.8486C3.63717 70.2697 4.2749 73.4173 7.84272 75.4926L63.2732 107.608C63.5145 107.746 63.8937 107.954 64.1523 108.075C66.1689 109.043 68.5819 109.545 70.9949 109.562C71.4086 109.562 71.8222 109.562 72.2359 109.527C73.7182 109.441 75.2005 109.181 76.5276 108.732L76.407 108.87L76.9757 108.542C77.6479 108.317 78.3029 108.005 78.8544 107.694C79.406 107.383 79.9575 107.089 80.5091 106.657C80.6297 106.553 80.7332 106.432 80.8366 106.311L93.1947 99.0817C103.915 92.7521 108.104 83.1884 104.019 74.1955L99.4513 65.3928C98.4516 63.5769 99.2962 61.6919 101.623 60.3429C103.95 58.994 107.19 58.4925 110.31 59.0632L125.46 61.6919C140.628 64.3033 157.002 61.8821 168.24 55.3276L177.874 49.707C178.392 49.5168 178.891 49.2747 179.305 49.0326C179.753 48.7732 180.253 48.4792 180.667 48.0641L180.805 47.9776C181.011 47.7874 181.201 47.5799 181.391 47.3723C181.925 46.767 182.27 46.1272 182.459 45.47C182.735 44.5534 182.614 43.6022 182.183 42.6856C181.684 41.6653 180.787 40.7141 179.391 39.9186",fill:"#611F69"}),n.createElement("path",{d:"M179.374 40.14L123.84 7.95569C122.444 7.14286 120.789 6.58945 119.048 6.33004C118.049 6.17439 117.049 6.07063 115.98 6.08792C115.394 6.10522 114.791 6.1571 114.188 6.20898C112.723 6.33004 111.344 6.65863 110.086 7.12557C109.431 7.36769 108.828 7.6271 108.242 7.97298C107.656 8.31886 107.225 8.71663 106.794 9.04521C106.656 9.14898 106.656 9.20086 106.518 9.28733L97.5209 14.5274C86.2831 21.0819 82.1637 30.611 86.6968 39.4137L91.2643 48.2164C92.2639 50.0322 91.4194 51.9173 89.0925 53.2662C86.7657 54.6152 83.4564 55.0821 80.4057 54.546L65.2554 51.9173C50.1223 49.3059 33.731 51.7271 22.476 58.2815L9.63525 65.7699C8.98029 65.9947 8.37703 66.2714 7.79101 66.6173C7.20499 66.9632 6.72239 67.3091 6.32597 67.7068L5.671 68.0873L5.99848 68.0181C3.63717 70.4393 4.2749 73.5868 7.84272 75.6621L63.256 107.76C63.4973 107.898 63.8765 108.106 64.135 108.227C66.1516 109.195 68.5646 109.697 70.9777 109.714C71.3913 109.714 71.805 109.714 72.2186 109.68C73.7009 109.593 75.2004 109.334 76.5104 108.884L76.3897 109.022L76.9585 108.694C77.6307 108.469 78.2857 108.158 78.8372 107.846C79.3888 107.535 79.9403 107.241 80.4919 106.809C80.6125 106.705 80.7159 106.584 80.8193 106.463L93.1774 99.234C103.898 92.9043 108.086 83.3407 104.002 74.3478L99.4341 65.5451C98.4344 63.7292 99.2789 61.8441 101.606 60.4952C103.933 59.1462 107.173 58.6447 110.293 59.2154L125.443 61.8441C140.611 64.4555 156.985 62.0344 168.222 55.4799L177.857 49.8593C178.374 49.6691 178.874 49.427 179.288 49.1848C179.736 48.9254 180.236 48.6314 180.649 48.2164L180.787 48.1299C180.994 47.9397 181.184 47.7321 181.373 47.5246C181.908 46.9193 182.252 46.2794 182.442 45.6222C182.718 44.7057 182.597 43.7545 182.166 42.8379C181.666 41.8175 180.77 40.8664 179.374 40.0708",fill:"#611F69"}),n.createElement("path",{d:"M179.374 40.2919L123.84 8.12486C122.444 7.31204 120.789 6.75863 119.048 6.49922C118.049 6.34357 117.049 6.2398 115.98 6.2571C115.394 6.27439 114.791 6.32627 114.188 6.37816C112.723 6.49922 111.344 6.8278 110.086 7.29474C109.431 7.53686 108.828 7.79627 108.242 8.14216C107.656 8.48804 107.225 8.8858 106.794 9.21439C106.656 9.31815 106.656 9.37004 106.518 9.45651L97.5209 14.6966C86.2831 21.2511 82.1637 30.7801 86.6968 39.5828L91.2643 48.3855C92.2639 50.2014 91.4194 52.0865 89.0925 53.4354C86.7657 54.7844 83.4564 55.2513 80.4057 54.7152L65.2554 52.0865C50.1223 49.4751 33.731 51.8962 22.476 58.4507L9.63525 65.9391C8.98029 66.1639 8.37703 66.4406 7.79101 66.7865C7.20499 67.1324 6.72239 67.4782 6.32597 67.876L5.671 68.2565L5.99848 68.1873C3.63717 70.6085 4.2749 73.756 7.84272 75.8313L63.256 107.929C63.4973 108.068 63.8765 108.275 64.135 108.396C66.1516 109.365 68.5474 109.866 70.9777 109.901C71.3913 109.901 71.805 109.901 72.2186 109.866C73.7009 109.78 75.2004 109.52 76.5276 109.071L76.4242 109.209L76.993 108.898C77.6652 108.673 78.3201 108.362 78.8717 108.05C79.4232 107.739 79.9748 107.445 80.5263 107.013C80.647 106.909 80.7504 106.788 80.8538 106.667L93.2119 99.4378C103.933 93.1081 108.121 83.5445 104.036 74.5515L99.4685 65.7488C98.4688 63.933 99.3134 62.0479 101.64 60.6989C103.967 59.35 107.207 58.8485 110.327 59.4192L125.477 62.0479C140.645 64.6593 157.019 62.2381 168.257 55.6837L177.892 50.0631C178.409 49.8728 178.909 49.6307 179.322 49.3886C179.77 49.1292 180.27 48.8352 180.684 48.4201L180.822 48.3337C181.029 48.1434 181.218 47.9359 181.408 47.7284C181.942 47.1231 182.287 46.4832 182.476 45.826C182.752 44.9094 182.632 43.9583 182.201 43.0417C181.701 42.0213 180.805 41.0701 179.408 40.2746",fill:"#611F69"}),n.createElement("path",{d:"M179.374 40.4669L123.84 8.2999C122.444 7.48708 120.789 6.93367 119.048 6.67425C118.049 6.51861 117.049 6.41484 115.98 6.43214C115.394 6.44943 114.791 6.50131 114.188 6.5532C112.723 6.67426 111.344 7.00284 110.086 7.46978C109.431 7.7119 108.828 7.97131 108.242 8.3172C107.656 8.66308 107.225 9.06084 106.794 9.38943C106.656 9.49319 106.656 9.54508 106.518 9.63155L97.5209 14.8717C86.2831 21.4261 82.1637 30.9552 86.6968 39.7579L91.2643 48.5606C92.2639 50.3765 91.4194 52.2615 89.0925 53.6105C86.7657 54.9594 83.4564 55.4263 80.4057 54.8902L65.2554 52.2615C50.1223 49.6501 33.731 52.0713 22.476 58.6258L9.63525 66.1141C8.98029 66.3389 8.37703 66.6156 7.79101 66.9615C7.20499 67.3074 6.72239 67.6533 6.32597 68.051L5.671 68.4315L5.99848 68.3623C3.63717 70.7835 4.2749 73.931 7.84272 76.0063L63.2388 108.104C63.4801 108.243 63.8593 108.45 64.1178 108.571C66.1344 109.54 68.5302 110.041 70.9432 110.076C71.3569 110.076 71.7705 110.076 72.1842 110.041C73.6837 109.955 75.1832 109.695 76.5104 109.246L76.407 109.384L76.9757 109.073C77.6479 108.848 78.3029 108.537 78.8544 108.225C79.406 107.914 79.9575 107.62 80.5091 107.188C80.6297 107.084 80.7332 106.98 80.8366 106.842L93.1947 99.6128C103.915 93.2831 108.104 83.7195 104.019 74.7266L99.4513 65.9239C98.4516 64.108 99.2962 62.2229 101.623 60.874C103.95 59.525 107.19 59.0235 110.31 59.5942L125.46 62.2229C140.628 64.8343 157.002 62.4132 168.24 55.8587L177.874 50.2381C178.392 50.0479 178.891 49.8058 179.305 49.5636C179.753 49.3042 180.253 49.0102 180.667 48.5952L180.805 48.5087C181.011 48.3185 181.201 48.1109 181.391 47.9034C181.925 47.2981 182.27 46.6582 182.459 46.0011C182.735 45.0845 182.614 44.1333 182.183 43.2167C181.684 42.1964 180.787 41.2452 179.391 40.4496",fill:"#611F69"}),n.createElement("path",{d:"M179.374 40.6392L123.84 8.47214C122.444 7.65932 120.789 7.10591 119.048 6.8465C118.049 6.69085 117.049 6.58709 115.98 6.60438C115.394 6.62167 114.791 6.67356 114.188 6.72544C112.723 6.8465 111.344 7.17509 110.086 7.64203C109.431 7.88414 108.828 8.14356 108.242 8.48944C107.656 8.83532 107.225 9.23309 106.794 9.56167C106.656 9.66544 106.656 9.71732 106.518 9.80379L97.5209 15.0439C86.2831 21.5984 82.1637 31.1274 86.6968 39.9301L91.2643 48.7328C92.2639 50.5487 91.4194 52.4338 89.0925 53.7827C86.7657 55.1316 83.4564 55.5986 80.4057 55.0625L65.2554 52.4338C50.1223 49.8224 33.731 52.2435 22.476 58.798L9.63525 66.2863C8.98029 66.5112 8.37703 66.7879 7.79101 67.1338C7.20499 67.4796 6.72239 67.8255 6.32597 68.2233L5.671 68.6038L5.99848 68.5346C3.63717 70.9558 4.2749 74.1033 7.84272 76.1786L63.2388 108.259C63.4801 108.397 63.8593 108.605 64.1178 108.726C66.1344 109.695 68.5302 110.196 70.9432 110.231C71.3568 110.231 71.7705 110.231 72.1842 110.196C73.6837 110.11 75.1832 109.867 76.5276 109.401L76.4242 109.539L76.993 109.228C77.6652 109.003 78.3201 108.691 78.8717 108.38C79.4232 108.069 79.9748 107.775 80.5263 107.343C80.647 107.239 80.7504 107.135 80.8538 107.014L93.2119 99.785C103.933 93.4554 108.121 83.8917 104.036 74.8988L99.4685 66.0961C98.4688 64.2802 99.3134 62.3952 101.64 61.0462C103.967 59.6973 107.207 59.1958 110.327 59.7665L125.477 62.3952C140.645 65.0066 157.019 62.5854 168.257 56.0309L177.892 50.4104C178.409 50.2201 178.909 49.978 179.322 49.7359C179.77 49.4765 180.27 49.1825 180.684 48.7674L180.822 48.6809C181.029 48.4907 181.218 48.2832 181.408 48.0756C181.942 47.4704 182.287 46.8305 182.476 46.1733C182.752 45.2567 182.632 44.3055 182.201 43.3889C181.701 42.3686 180.805 41.4174 179.408 40.6219",fill:"#611F69"}),n.createElement("path",{d:"M179.374 40.8142L123.84 8.64718C122.444 7.83436 120.789 7.28095 119.048 7.02154C118.049 6.86589 117.049 6.76213 115.98 6.77942C115.394 6.79672 114.791 6.8486 114.188 6.90048C112.723 7.02154 111.344 7.35013 110.086 7.81707C109.431 8.05918 108.828 8.3186 108.242 8.66448C107.656 9.01036 107.225 9.40813 106.794 9.73671C106.656 9.84048 106.656 9.89236 106.518 9.97883L97.5209 15.2189C86.2831 21.7734 82.1637 31.3025 86.6968 40.1052L91.2643 48.9079C92.2639 50.7237 91.4194 52.6088 89.0925 53.9577C86.7657 55.3067 83.4564 55.7736 80.4057 55.2375L65.2554 52.6088C50.1223 49.9974 33.731 52.4186 22.476 58.973L9.63525 66.4614C8.98029 66.6862 8.37703 66.9629 7.79101 67.3088C7.20499 67.6547 6.72239 68.0006 6.32597 68.3983L5.671 68.7788L5.99848 68.7096C3.63717 71.1308 4.2749 74.2783 7.84272 76.3536L63.2215 108.434C63.4456 108.573 63.8593 108.78 64.1006 108.901C66.1171 109.87 68.5129 110.388 70.926 110.406C71.3396 110.406 71.7533 110.406 72.1669 110.371C73.6665 110.285 75.1832 110.043 76.5104 109.576L76.407 109.714L76.9757 109.403C77.6479 109.178 78.3029 108.867 78.8544 108.555C79.406 108.244 79.9575 107.95 80.5091 107.518C80.6297 107.414 80.7332 107.31 80.8366 107.189L93.1947 99.9601C103.915 93.6304 108.104 84.0668 104.019 75.0738L99.4513 66.2711C98.4516 64.4553 99.2962 62.5702 101.623 61.2213C103.95 59.8723 107.19 59.3708 110.31 59.9415L125.46 62.5702C140.628 65.1816 157.002 62.7604 168.24 56.206L177.874 50.5854C178.392 50.3952 178.891 50.153 179.305 49.9109C179.753 49.6515 180.253 49.3575 180.667 48.9424L180.805 48.856C181.011 48.6657 181.201 48.4582 181.391 48.2507C181.925 47.6454 182.27 47.0055 182.459 46.3483C182.735 45.4317 182.614 44.4806 182.183 43.564C181.684 42.5436 180.787 41.5925 179.391 40.7969",fill:"#611F69"}),n.createElement("path",{d:"M179.374 40.9865L123.84 8.81943C122.444 8.00661 120.789 7.45319 119.048 7.19378C118.049 7.03814 117.049 6.93437 115.98 6.95167C115.394 6.96896 114.791 7.02084 114.188 7.07273C112.723 7.19378 111.344 7.52237 110.086 7.98931C109.431 8.23143 108.828 8.49084 108.242 8.83672C107.656 9.18261 107.225 9.58037 106.794 9.90896C106.656 10.0127 106.656 10.0646 106.518 10.1511L97.5209 15.3912C86.2831 21.9457 82.1637 31.4747 86.6968 40.2774L91.2643 49.0801C92.2639 50.896 91.4194 52.781 89.0925 54.13C86.7657 55.4789 83.4564 55.9459 80.4057 55.4098L65.2554 52.781C50.1223 50.1696 33.731 52.5908 22.476 59.1453L9.63525 66.6336C8.98029 66.8584 8.37703 67.1352 7.79101 67.481C7.20499 67.8269 6.72239 68.1728 6.32597 68.5706L5.671 68.951L5.99848 68.8819C3.63717 71.303 4.2749 74.4506 7.84272 76.5259L63.2215 108.606C63.4456 108.745 63.8592 108.952 64.1006 109.073C66.1171 110.042 68.5129 110.561 70.926 110.578C71.3396 110.578 71.7533 110.578 72.1669 110.543C73.6665 110.457 75.1832 110.215 76.5276 109.748L76.4242 109.886L76.993 109.575C77.6652 109.35 78.3201 109.039 78.8717 108.727C79.4232 108.416 79.9748 108.122 80.5263 107.69C80.647 107.586 80.7676 107.482 80.8538 107.361L93.2119 100.132C103.933 93.8027 108.121 84.239 104.036 75.2461L99.4685 66.4434C98.4688 64.6275 99.3134 62.7425 101.64 61.3935C103.967 60.0446 107.207 59.543 110.327 60.1137L125.477 62.7424C140.645 65.3539 157.019 62.9327 168.257 56.3782L177.892 50.7576C178.409 50.5674 178.909 50.3253 179.322 50.0832C179.77 49.8238 180.27 49.5298 180.684 49.1147L180.822 49.0282C181.029 48.838 181.218 48.6305 181.408 48.4229C181.942 47.8176 182.287 47.1778 182.476 46.5206C182.752 45.604 182.632 44.6528 182.201 43.7362C181.701 42.7159 180.805 41.7647 179.408 40.9692",fill:"#611F69"}),n.createElement("path",{d:"M179.374 41.1583L123.84 8.9913C122.444 8.17847 120.789 7.62506 119.048 7.36565C118.049 7.21 117.049 7.10624 115.98 7.12353C115.394 7.14083 114.791 7.19271 114.188 7.24459C112.723 7.36565 111.344 7.69424 110.086 8.16118C109.431 8.4033 108.828 8.66271 108.242 9.00859C107.656 9.35447 107.225 9.75224 106.794 10.0808C106.656 10.1846 106.656 10.2365 106.518 10.3229L97.5209 15.5631C86.2831 22.1175 82.1637 31.6466 86.6968 40.4493L91.2643 49.252C92.2639 51.0679 91.4194 52.9529 89.0925 54.3019C86.7657 55.6508 83.4564 56.1177 80.4057 55.5816L65.2554 52.9529C50.1223 50.3415 33.731 52.7627 22.476 59.3171L9.63525 66.8055C8.98029 67.0303 8.37703 67.307 7.79101 67.6529C7.20499 67.9988 6.72239 68.3447 6.32597 68.7424L5.671 69.1229L5.99848 69.0537C3.63717 71.4749 4.2749 74.6224 7.84272 76.6977L63.2043 108.778C63.4284 108.917 63.842 109.124 64.0833 109.245C66.0827 110.214 68.4957 110.733 70.9087 110.767C71.3224 110.767 71.736 110.767 72.1497 110.733C73.6665 110.646 75.1832 110.404 76.5276 109.937L76.4242 110.075L76.993 109.764C77.6652 109.539 78.3201 109.228 78.8717 108.917C79.4232 108.605 79.9748 108.311 80.5263 107.879C80.647 107.775 80.7676 107.671 80.8538 107.55L93.2119 100.321C103.933 93.9918 108.121 84.4282 104.036 75.4353L99.4685 66.6326C98.4688 64.8167 99.3134 62.9316 101.64 61.5827C103.967 60.2337 107.207 59.7322 110.327 60.3029L125.477 62.9316C140.645 65.543 157.019 63.1218 168.257 56.5674L177.892 50.9468C178.409 50.7566 178.909 50.5144 179.322 50.2723C179.77 50.0129 180.27 49.7189 180.684 49.3039L180.822 49.2174C181.029 49.0272 181.218 48.8196 181.408 48.6121C181.942 48.0068 182.287 47.3669 182.476 46.7097C182.752 45.7932 182.632 44.842 182.201 43.9254C181.701 42.905 180.805 41.9539 179.408 41.1583",fill:"#611F69"}),n.createElement("path",{d:"M179.374 41.331L123.84 9.16392C122.444 8.35109 120.789 7.79768 119.048 7.53827C118.049 7.38262 117.049 7.27886 115.98 7.29615C115.394 7.31345 114.791 7.36533 114.188 7.41721C112.723 7.53827 111.344 7.86686 110.086 8.3338C109.431 8.57592 108.828 8.83533 108.242 9.18121C107.656 9.52709 107.225 9.92486 106.794 10.2534C106.656 10.3572 106.656 10.4091 106.518 10.4956L97.5209 15.7357C86.2831 22.2901 82.1637 31.8192 86.6968 40.6219L91.2643 49.4246C92.2639 51.2405 91.4194 53.1255 89.0925 54.4745C86.7657 55.8234 83.4564 56.2904 80.4057 55.7542L65.2554 53.1255C50.1223 50.5141 33.731 52.9353 22.476 59.4898L9.63525 66.9781C8.98029 67.2029 8.37703 67.4796 7.79101 67.8255C7.20499 68.1714 6.72239 68.5173 6.32597 68.915L5.671 69.2955L5.99848 69.2263C3.63717 71.6475 4.2749 74.795 7.84272 76.8703L63.2043 108.934C63.4284 109.055 63.842 109.297 64.0833 109.401C66.0827 110.369 68.4785 110.888 70.8915 110.922C71.3051 110.922 71.7188 110.922 72.1325 110.888C73.6492 110.819 75.166 110.559 76.5104 110.092L76.407 110.231L76.9757 109.919C77.6479 109.695 78.3029 109.383 78.8544 109.072C79.406 108.761 79.9575 108.467 80.5091 108.034C80.6297 107.931 80.7504 107.827 80.8366 107.706L93.1947 100.477C103.915 94.1471 108.104 84.5835 104.019 75.5906L99.4513 66.7879C98.4516 64.972 99.2962 63.0869 101.623 61.738C103.95 60.3891 107.19 59.8875 110.31 60.4582L125.46 63.0869C140.628 65.6983 157.002 63.2772 168.24 56.7227L177.874 51.1021C178.392 50.9119 178.891 50.6698 179.305 50.4276C179.753 50.1682 180.253 49.8742 180.667 49.4592L180.805 49.3727C181.011 49.1825 181.201 48.9749 181.391 48.7674C181.925 48.1621 182.27 47.5222 182.459 46.8651C182.735 45.9485 182.614 44.9973 182.183 44.0807C181.684 43.0604 180.787 42.1092 179.391 41.3137",fill:"#611F69"}),n.createElement("path",{d:"M179.374 41.5031L123.84 9.31877C122.444 8.50595 120.789 7.95254 119.048 7.69313C118.049 7.53748 117.049 7.43371 115.98 7.45101C115.394 7.4683 114.791 7.52018 114.188 7.57207C112.723 7.69313 111.344 8.02171 110.086 8.48865C109.431 8.73077 108.828 8.99018 108.242 9.33607C107.656 9.68195 107.225 10.0797 106.794 10.4083C106.656 10.5121 106.656 10.5639 106.518 10.6504L97.5209 15.8905C86.2831 22.445 82.1637 31.974 86.6968 40.7767L91.2643 49.5795C92.2639 51.3953 91.4194 53.2804 89.0925 54.6293C86.7657 55.9783 83.4564 56.4452 80.4057 55.9091L65.2554 53.2804C50.1223 50.669 33.731 53.0902 22.476 59.6446L9.63525 67.133C8.98029 67.3578 8.37703 67.6345 7.79101 67.9804C7.20499 68.3263 6.72239 68.6721 6.32597 69.0699L5.671 69.4504L5.99848 69.3812C3.63717 71.8024 4.2749 74.9499 7.84272 77.0252L63.1871 109.088C63.4111 109.21 63.8248 109.452 64.0661 109.555C66.0654 110.524 68.4612 111.043 70.8742 111.077C71.2879 111.077 71.7016 111.077 72.1152 111.06C73.632 110.991 75.166 110.731 76.5104 110.264L76.407 110.386L76.9757 110.074C77.6479 109.849 78.3029 109.538 78.8544 109.227C79.406 108.916 79.9575 108.622 80.5091 108.189C80.6297 108.085 80.7504 107.982 80.8366 107.861L93.1947 100.632C103.915 94.302 108.104 84.7384 104.019 75.7454L99.4513 66.9427C98.4516 65.1269 99.2962 63.2418 101.623 61.8929C103.95 60.5439 107.19 60.0424 110.31 60.6131L125.46 63.2418C140.628 65.8532 157.002 63.432 168.24 56.8776L177.874 51.257C178.392 51.0667 178.891 50.8246 179.305 50.5825C179.753 50.3231 180.253 50.0291 180.667 49.614L180.805 49.5276C181.011 49.3373 181.201 49.1298 181.391 48.9223C181.925 48.317 182.27 47.6771 182.459 47.0199C182.735 46.1033 182.614 45.1522 182.183 44.2356C181.684 43.2152 180.787 42.264 179.391 41.4685",fill:"#611F69"}),n.createElement("path",{d:"M179.374 41.6812L123.84 9.49688C122.444 8.68406 120.789 8.13065 119.048 7.87123C118.049 7.71559 117.049 7.61182 115.98 7.62912C115.394 7.64641 114.791 7.69829 114.188 7.75018C112.723 7.87123 111.344 8.19982 110.086 8.66676C109.431 8.90888 108.828 9.16829 108.242 9.51417C107.656 9.86006 107.225 10.2578 106.794 10.5864C106.656 10.6902 106.656 10.7421 106.518 10.8285L97.5209 16.0686C86.2831 22.6231 82.1637 32.1522 86.6968 40.9549L91.2643 49.7576C92.2639 51.5734 91.4194 53.4585 89.0925 54.8074C86.7657 56.1564 83.4564 56.6233 80.4057 56.0872L65.2554 53.4585C50.1223 50.8471 33.731 53.2683 22.476 59.8227L9.63525 67.3111C8.98029 67.5359 8.37703 67.8126 7.79101 68.1585C7.20499 68.5044 6.72239 68.8503 6.32597 69.248L5.671 69.6285L5.99848 69.5593C3.63717 71.9805 4.2749 75.128 7.84272 77.2033L63.1871 109.267C63.4111 109.388 63.8248 109.63 64.0661 109.734C66.0654 110.702 68.4612 111.221 70.8742 111.255C71.2879 111.255 71.7016 111.255 72.1152 111.238C73.632 111.169 75.166 110.91 76.5276 110.443L76.4242 110.564L76.993 110.252C77.6652 110.028 78.3201 109.716 78.8717 109.405C79.4232 109.094 79.9748 108.8 80.5263 108.367C80.647 108.264 80.7676 108.16 80.8538 108.039L93.2119 100.81C103.933 94.4801 108.121 84.9165 104.036 75.9235L99.4685 67.1208C98.4688 65.305 99.3134 63.4199 101.64 62.071C103.967 60.722 107.207 60.2205 110.327 60.7912L125.477 63.4199C140.645 66.0313 157.019 63.6101 168.257 57.0557L177.892 51.4351C178.409 51.2449 178.909 51.0027 179.322 50.7606C179.77 50.5012 180.27 50.2072 180.684 49.7922L180.822 49.7057C181.029 49.5154 181.218 49.3079 181.408 49.1004C181.942 48.4951 182.287 47.8552 182.476 47.198C182.752 46.2814 182.632 45.3303 182.201 44.4137C181.701 43.3933 180.805 42.4422 179.408 41.6466",fill:"#611F69"}),n.createElement("path",{d:"M179.374 41.8504L123.84 9.66606C122.444 8.85323 120.789 8.29982 119.048 8.04041C118.049 7.88476 117.049 7.781 115.98 7.79829C115.394 7.81559 114.791 7.86747 114.188 7.91935C112.723 8.04041 111.344 8.369 110.086 8.83594C109.431 9.07806 108.828 9.33747 108.242 9.68335C107.656 10.0292 107.225 10.427 106.794 10.7556C106.656 10.8593 106.656 10.9112 106.518 10.9977L97.5209 16.2378C86.2831 22.7923 82.1637 32.3213 86.6968 41.124L91.2643 49.9267C92.2639 51.7426 91.4194 53.6277 89.0925 54.9766C86.7657 56.3256 83.4564 56.7925 80.4057 56.2564L65.2554 53.6277C50.1223 51.0163 33.731 53.4374 22.476 59.9919L9.63525 67.4802C8.98029 67.7051 8.37703 67.9818 7.79101 68.3277C7.20499 68.6735 6.72239 69.0194 6.32597 69.4172L5.671 69.7977L5.99848 69.7285C3.63717 72.1497 4.2749 75.2972 7.84272 77.3725L63.1698 109.418C63.3939 109.54 63.8248 109.782 64.0488 109.885C66.0482 110.854 68.444 111.39 70.857 111.425C71.2707 111.425 71.6843 111.425 72.098 111.407C73.6148 111.338 75.166 111.079 76.5276 110.612L76.4242 110.733L76.9757 110.422C77.6479 110.197 78.3029 109.885 78.8544 109.574C79.406 109.263 79.9575 108.969 80.5091 108.536C80.6297 108.433 80.7504 108.329 80.8366 108.208L93.1947 100.979C103.915 94.6493 108.104 85.0856 104.019 76.0927L99.4513 67.29C98.4516 65.4741 99.2962 63.5891 101.623 62.2401C103.95 60.8912 107.19 60.3897 110.31 60.9604L125.46 63.5891C140.628 66.2005 157.002 63.7793 168.24 57.2248L177.874 51.6043C178.392 51.414 178.891 51.1719 179.305 50.9298C179.753 50.6704 180.253 50.3764 180.667 49.9613L180.805 49.8749C181.011 49.6846 181.201 49.4771 181.391 49.2696C181.925 48.6643 182.27 48.0244 182.459 47.3672C182.735 46.4506 182.614 45.4994 182.183 44.5829C181.684 43.5625 180.787 42.6113 179.391 41.8158",fill:"#611F69"}),n.createElement("path",{d:"M179.374 42.0253L123.84 9.84099C122.444 9.02817 120.789 8.47476 119.048 8.21535C118.049 8.0597 117.049 7.95593 115.98 7.97323C115.394 7.99052 114.791 8.0424 114.188 8.09429C112.723 8.21535 111.344 8.54393 110.086 9.01087C109.431 9.25299 108.828 9.5124 108.242 9.85829C107.656 10.2042 107.225 10.6019 106.794 10.9305C106.656 11.0343 106.656 11.0862 106.518 11.1726L97.5209 16.4128C86.2831 22.9672 82.1637 32.4963 86.6968 41.299L91.2643 50.1017C92.2639 51.9175 91.4194 53.8026 89.0925 55.1515C86.7657 56.5005 83.4564 56.9674 80.4057 56.4313L65.2554 53.8026C50.1223 51.1912 33.731 53.6124 22.476 60.1668L9.63525 67.6552C8.98029 67.88 8.37703 68.1567 7.79101 68.5026C7.20499 68.8485 6.72239 69.1944 6.32597 69.5921L5.671 69.9726L5.99848 69.9034C3.63717 72.3246 4.2749 75.4721 7.84272 77.5474L63.1698 109.593C63.3767 109.714 63.8248 109.957 64.0488 110.06C66.0482 111.029 68.444 111.565 70.857 111.6C71.2707 111.6 71.6843 111.6 72.098 111.582C73.632 111.513 75.166 111.254 76.5276 110.787L76.4242 110.908L76.9757 110.596C77.6479 110.372 78.3029 110.06 78.8544 109.749C79.406 109.438 79.9575 109.144 80.5091 108.711C80.6297 108.608 80.7504 108.504 80.8366 108.383L93.1947 101.154C103.915 94.8242 108.104 85.2606 104.019 76.2676L99.4513 67.4649C98.4516 65.6491 99.2962 63.764 101.623 62.4151C103.95 61.0661 107.19 60.5646 110.31 61.1353L125.46 63.764C140.628 66.3754 157.002 63.9542 168.24 57.3998L177.874 51.7792C178.392 51.589 178.891 51.3468 179.305 51.1047C179.753 50.8453 180.253 50.5513 180.667 50.1363L180.805 50.0498C181.011 49.8596 181.201 49.652 181.391 49.4445C181.925 48.8392 182.27 48.1993 182.459 47.5421C182.735 46.6256 182.614 45.6744 182.183 44.7578C181.684 43.7374 180.787 42.7863 179.391 41.9907",fill:"#611F69"}),n.createElement("path",{d:"M179.374 42.1804L123.84 10.0133C122.444 9.20052 120.789 8.6471 119.048 8.38769C118.049 8.23205 117.049 8.12828 115.98 8.14557C115.394 8.16287 114.791 8.21475 114.188 8.26663C112.723 8.38769 111.344 8.71628 110.086 9.18322C109.431 9.42534 108.828 9.68475 108.242 10.0306C107.656 10.3765 107.225 10.7743 106.794 11.1029C106.656 11.2066 106.656 11.2585 106.518 11.345L97.5209 16.5851C86.2831 23.1396 82.1637 32.6686 86.6968 41.4713L91.2643 50.274C92.2639 52.0899 91.4194 53.975 89.0925 55.3239C86.7657 56.6728 83.4564 57.1398 80.4057 56.6037L65.2554 53.975C50.1223 51.3635 33.731 53.7847 22.476 60.3392L9.63525 67.8275C8.98029 68.0524 8.37703 68.3291 7.79101 68.6749C7.20499 69.0208 6.72239 69.3667 6.32597 69.7645L5.671 70.1449L5.99848 70.0758C3.63717 72.4969 4.2749 75.6445 7.84272 77.7198L63.1526 109.766C63.3594 109.887 63.8075 110.129 64.0316 110.233C66.031 111.201 68.4095 111.737 70.8225 111.772C71.2362 111.772 71.6499 111.772 72.0635 111.755C73.5975 111.685 75.1487 111.426 76.5104 110.959L76.407 111.08L76.9585 110.786C77.6307 110.561 78.2857 110.25 78.8372 109.939C79.3888 109.627 79.9403 109.333 80.4919 108.901C80.6125 108.797 80.7332 108.694 80.8366 108.572L93.1947 101.326C103.915 94.9966 108.104 85.4329 104.019 76.44L99.4513 67.6373C98.4516 65.8214 99.2962 63.9364 101.623 62.5874C103.95 61.2385 107.19 60.7369 110.31 61.3077L125.46 63.9364C140.628 66.5478 157.002 64.1266 168.24 57.5721L177.874 51.9515C178.392 51.7613 178.891 51.5192 179.305 51.2771C179.753 51.0177 180.253 50.7237 180.667 50.3086L180.805 50.2221C181.011 50.0319 181.201 49.8244 181.391 49.6168C181.925 49.0115 182.27 48.3717 182.459 47.7145C182.735 46.7979 182.614 45.8467 182.183 44.9301C181.684 43.9098 180.787 42.9586 179.391 42.1631",fill:"#611F69"}),n.createElement("path",{d:"M179.374 42.3581L123.84 10.1911C122.444 9.37825 120.789 8.82484 119.048 8.56543C118.049 8.40978 117.049 8.30602 115.98 8.32331C115.394 8.3406 114.791 8.39249 114.188 8.44437C112.723 8.56543 111.344 8.89401 110.086 9.36096C109.431 9.60307 108.828 9.86248 108.242 10.2084C107.656 10.5542 107.225 10.952 106.794 11.2806C106.656 11.3844 106.656 11.4362 106.518 11.5227L97.5209 16.7628C86.2831 23.3173 82.1637 32.8463 86.6968 41.649L91.2643 50.4517C92.2639 52.2676 91.4194 54.1527 89.0925 55.5016C86.7657 56.8506 83.4564 57.3175 80.4057 56.7814L65.2554 54.1527C50.1223 51.5413 33.731 53.9625 22.476 60.5169L9.63525 68.0053C8.98029 68.2301 8.37703 68.5068 7.79101 68.8527C7.20499 69.1986 6.72239 69.5444 6.32597 69.9422L5.671 70.3227L5.99848 70.2535C3.63717 72.6747 4.2749 75.8222 7.84272 77.8975L63.1526 109.943C63.3594 110.065 63.8075 110.307 64.0316 110.41C66.031 111.379 68.4095 111.915 70.8225 111.95C71.2362 111.95 71.6499 111.95 72.0635 111.932C73.5975 111.863 75.1487 111.604 76.5276 111.137L76.4242 111.258L76.9757 110.964C77.6479 110.739 78.3029 110.428 78.8544 110.116C79.406 109.805 79.9575 109.511 80.5091 109.079C80.6297 108.975 80.7504 108.871 80.8538 108.75L93.2119 101.504C103.933 95.1743 108.121 85.6107 104.036 76.6177L99.4685 67.815C98.4688 65.9991 99.3134 64.1141 101.64 62.7651C103.967 61.4162 107.207 60.9147 110.327 61.4854L125.477 64.1141C140.645 66.7255 157.019 64.3043 168.257 57.7499L177.892 52.1293C178.409 51.939 178.909 51.6969 179.322 51.4548C179.77 51.1954 180.27 50.9014 180.684 50.4863L180.822 50.3999C181.029 50.2096 181.218 50.0021 181.408 49.7946C181.942 49.1893 182.287 48.5494 182.476 47.8922C182.752 46.9756 182.632 46.0245 182.201 45.1079C181.701 44.0875 180.805 43.1363 179.408 42.3408",fill:"#611F69"}),n.createElement("path",{d:"M179.374 42.5277L123.84 10.3606C122.444 9.5478 120.789 8.99439 119.048 8.73498C118.049 8.57933 117.049 8.47556 115.98 8.49286C115.394 8.51015 114.791 8.56203 114.188 8.61392C112.723 8.73497 111.344 9.06356 110.086 9.5305C109.431 9.77262 108.828 10.032 108.242 10.3779C107.656 10.7238 107.225 11.1216 106.794 11.4501C106.656 11.5539 106.656 11.6058 106.518 11.6923L97.5209 16.9324C86.2831 23.4868 82.1637 33.0159 86.6968 41.8186L91.2643 50.6213C92.2639 52.4372 91.4194 54.3222 89.0925 55.6712C86.7657 57.0201 83.4564 57.4871 80.4057 56.9509L65.2554 54.3222C50.1223 51.7108 33.731 54.132 22.476 60.6865L9.63525 68.1748C8.98029 68.3996 8.37703 68.6763 7.79101 69.0222C7.20499 69.3681 6.72239 69.714 6.32597 70.1118L5.671 70.4922L5.99848 70.423C3.63717 72.8442 4.2749 75.9917 7.84272 78.067L63.1353 110.096C63.3422 110.217 63.7903 110.459 64.0144 110.563C66.0137 111.531 68.3923 112.067 70.8053 112.119C71.219 112.119 71.6326 112.119 72.0463 112.102C73.5803 112.033 75.1487 111.773 76.5104 111.306L76.4242 111.427L76.9757 111.133C77.6479 110.909 78.3029 110.597 78.8544 110.286C79.406 109.975 79.9575 109.681 80.5091 109.248C80.6297 109.145 80.7504 109.041 80.8538 108.92L93.2119 101.673C103.933 95.3439 108.121 85.7802 104.036 76.7873L99.4685 67.9846C98.4688 66.1687 99.3134 64.2836 101.64 62.9347C103.967 61.5858 107.207 61.0842 110.327 61.6549L125.477 64.2836C140.645 66.895 157.019 64.4739 168.257 57.9194L177.892 52.2988C178.409 52.1086 178.909 51.8665 179.322 51.6244C179.77 51.3649 180.27 51.0709 180.684 50.6559L180.822 50.5694C181.029 50.3792 181.218 50.1716 181.408 49.9641C181.942 49.3588 182.287 48.7189 182.476 48.0618C182.752 47.1452 182.632 46.194 182.201 45.2774C181.701 44.2571 180.805 43.3059 179.408 42.5104",fill:"#611F69"}),n.createElement("path",{d:"M179.374 42.6968L123.84 10.5298C122.444 9.71697 120.789 9.16356 119.048 8.90415C118.049 8.7485 117.049 8.64474 115.98 8.66203C115.394 8.67933 114.791 8.73121 114.188 8.78309C112.723 8.90415 111.344 9.23274 110.086 9.69968C109.431 9.9418 108.828 10.2012 108.242 10.5471C107.656 10.893 107.225 11.2907 106.794 11.6193C106.656 11.7231 106.656 11.775 106.518 11.8614L97.5209 17.1016C86.2831 23.656 82.1637 33.1851 86.6968 41.9878L91.2643 50.7905C92.2639 52.6064 91.4194 54.4914 89.0925 55.8404C86.7657 57.1893 83.4564 57.6562 80.4057 57.1201L65.2554 54.4914C50.1223 51.88 33.731 54.3012 22.476 60.8556L9.63525 68.344C8.98029 68.5688 8.37703 68.8455 7.79101 69.1914C7.20499 69.5373 6.72239 69.8832 6.32597 70.2809L5.671 70.6614L5.99848 70.5922C3.63717 73.0134 4.2749 76.1609 7.84272 78.2362L63.1353 110.265C63.3422 110.386 63.7903 110.628 64.0144 110.732C66.0137 111.7 68.3923 112.236 70.8053 112.288C71.219 112.288 71.6326 112.288 72.0463 112.271C73.5975 112.202 75.1487 111.942 76.5276 111.475L76.4414 111.597L76.993 111.303C77.6652 111.078 78.3201 110.766 78.8717 110.455C79.4232 110.144 79.9748 109.85 80.5263 109.417C80.647 109.314 80.7676 109.21 80.871 109.089L93.2291 101.843C103.95 95.513 108.138 85.9494 104.053 76.9565L99.4858 68.1538C98.4861 66.3379 99.3306 64.4528 101.657 63.1039C103.984 61.7549 107.225 61.2534 110.344 61.8241L125.495 64.4528C140.662 67.0642 157.036 64.6431 168.274 58.0886L177.909 52.468C178.426 52.2778 178.926 52.0357 179.339 51.7935C179.788 51.5341 180.287 51.2401 180.701 50.8251L180.839 50.7386C181.046 50.5484 181.235 50.3408 181.425 50.1333C181.959 49.528 182.304 48.8881 182.494 48.2309C182.769 47.3144 182.649 46.3632 182.218 45.4466C181.718 44.4262 180.822 43.4751 179.426 42.6795",fill:"#611F69"}),n.createElement("path",{d:"M179.374 42.8718L123.84 10.7047C122.444 9.89191 120.789 9.3385 119.048 9.07909C118.049 8.92344 117.049 8.81968 115.98 8.83697C115.394 8.85426 114.791 8.90615 114.188 8.95803C112.723 9.07909 111.344 9.40768 110.086 9.87462C109.431 10.1167 108.828 10.3761 108.242 10.722C107.656 11.0679 107.225 11.4657 106.794 11.7943C106.656 11.898 106.656 11.9499 106.518 12.0364L97.5209 17.2765C86.2831 23.831 82.1637 33.36 86.6968 42.1627L91.2643 50.9654C92.2639 52.7813 91.4194 54.6664 89.0925 56.0153C86.7657 57.3642 83.4564 57.8312 80.4057 57.2951L65.2554 54.6664C50.1223 52.0549 33.731 54.4761 22.476 61.0306L9.63525 68.5189C8.98029 68.7438 8.37703 69.0205 7.79101 69.3663C7.20499 69.7122 6.72239 70.0581 6.32597 70.4559L5.671 70.8363L5.99848 70.7672C3.63717 73.1883 4.2749 76.3359 7.84272 78.4112L63.1181 110.44C63.3249 110.561 63.7903 110.803 63.9971 110.907C65.9965 111.875 68.375 112.411 70.7881 112.463C71.2017 112.463 71.6154 112.463 72.029 112.446C73.5803 112.377 75.1487 112.117 76.5276 111.65L76.4414 111.771L76.993 111.477C77.6652 111.253 78.3201 110.941 78.8717 110.63C79.4232 110.319 79.9748 110.025 80.5263 109.592C80.647 109.489 80.7676 109.385 80.871 109.264L93.2291 102.018C103.95 95.688 108.138 86.1243 104.053 77.1314L99.4858 68.3287C98.4861 66.5128 99.3306 64.6278 101.657 63.2788C103.984 61.9299 107.225 61.4283 110.344 61.9991L125.495 64.6278C140.662 67.2392 157.036 64.818 168.274 58.2635L177.909 52.6429C178.426 52.4527 178.926 52.2106 179.339 51.9685C179.788 51.7091 180.287 51.4151 180.701 51L180.839 50.9135C181.046 50.7233 181.235 50.5158 181.425 50.3082C181.959 49.7029 182.304 49.0631 182.494 48.4059C182.769 47.4893 182.649 46.5381 182.218 45.6215C181.718 44.6012 180.822 43.65 179.426 42.8545",fill:"#611F69"}),n.createElement("path",{d:"M179.374 43.0495L123.84 10.8825C122.444 10.0696 120.789 9.51623 119.048 9.25682C118.049 9.10117 117.049 8.99741 115.98 9.0147C115.394 9.032 114.791 9.08388 114.188 9.13576C112.723 9.25682 111.344 9.58541 110.086 10.0524C109.431 10.2945 108.828 10.5539 108.242 10.8998C107.656 11.2456 107.225 11.6434 106.794 11.972C106.656 12.0758 106.656 12.1276 106.518 12.2141L97.5209 17.4542C86.2831 24.0087 82.1637 33.5377 86.6968 42.3404L91.2643 51.1431C92.2639 52.959 91.4194 54.8441 89.0925 56.193C86.7657 57.542 83.4564 58.0089 80.4057 57.4728L65.2554 54.8441C50.1223 52.2327 33.731 54.6538 22.476 61.2083L9.63525 68.6967C8.98029 68.9215 8.37703 69.1982 7.79101 69.5441C7.20499 69.89 6.72239 70.2358 6.32597 70.6336L5.671 71.0141L5.99848 70.9449C3.63717 73.3661 4.2749 76.5136 7.84272 78.5889L63.1181 110.6C63.3077 110.721 63.7903 110.981 63.9971 111.067C65.9965 112.036 68.375 112.589 70.7708 112.624C71.1845 112.624 71.5981 112.624 72.0118 112.606C73.563 112.537 75.1315 112.278 76.5276 111.811L76.4414 111.932L76.993 111.638C77.6652 111.413 78.3201 111.102 78.8717 110.791C79.4232 110.479 79.9748 110.185 80.5263 109.753C80.647 109.649 80.7676 109.545 80.871 109.424L93.2291 102.178C103.95 95.8484 108.138 86.2848 104.053 77.2918L99.4858 68.4891C98.4861 66.6733 99.3306 64.7882 101.657 63.4393C103.984 62.0903 107.225 61.5888 110.344 62.1595L125.495 64.7882C140.662 67.3996 157.036 64.9784 168.274 58.424L177.909 52.8034C178.426 52.6131 178.926 52.371 179.339 52.1289C179.788 51.8695 180.287 51.5755 180.701 51.1604L180.839 51.074C181.046 50.8837 181.235 50.6762 181.425 50.4687C181.959 49.8634 182.304 49.2235 182.494 48.5663C182.769 47.6497 182.649 46.6986 182.218 45.782C181.718 44.7616 180.822 43.8104 179.426 43.0149",fill:"#611F69"}),n.createElement("path",{d:"M179.374 43.2191L123.84 11.052C122.444 10.2392 120.789 9.68578 119.048 9.42637C118.049 9.27072 117.049 9.16696 115.98 9.18425C115.394 9.20155 114.791 9.25343 114.188 9.30531C112.723 9.42637 111.344 9.75496 110.086 10.2219C109.431 10.464 108.828 10.7234 108.242 11.0693C107.656 11.4152 107.225 11.813 106.794 12.1415C106.656 12.2453 106.656 12.2972 106.518 12.3837L97.5209 17.6238C86.2831 24.1782 82.1637 33.7073 86.6968 42.51L91.2643 51.3127C92.2639 53.1286 91.4194 55.0136 89.0925 56.3626C86.7657 57.7115 83.4564 58.1785 80.4057 57.6423L65.2554 55.0136C50.1223 52.4022 33.731 54.8234 22.476 61.3779L9.63525 68.8662C8.98029 69.091 8.37703 69.3677 7.79101 69.7136C7.20499 70.0595 6.72239 70.4054 6.32597 70.8032L5.671 71.1836L5.99848 71.1144C3.63717 73.5356 4.2749 76.6832 7.84272 78.7584L63.1009 110.77C63.2905 110.874 63.7731 111.15 63.9799 111.237C65.9793 112.205 68.3406 112.759 70.7536 112.811C71.1673 112.811 71.5809 112.811 71.9946 112.811C73.5458 112.741 75.1315 112.482 76.5104 112.015L76.4242 112.136L76.9757 111.842C77.6479 111.617 78.3029 111.306 78.8544 110.995C79.406 110.683 79.9575 110.389 80.5091 109.957C80.6297 109.853 80.7504 109.749 80.8538 109.628L93.2119 102.382C103.933 96.0526 108.121 86.4889 104.036 77.496L99.4685 68.6933C98.4688 66.8774 99.3134 64.9923 101.64 63.6434C103.967 62.2945 107.207 61.7929 110.327 62.3636L125.477 64.9923C140.645 67.6037 157.019 65.1826 168.257 58.6281L177.892 53.0075C178.409 52.8173 178.909 52.5752 179.322 52.333C179.77 52.0736 180.27 51.7796 180.684 51.3646L180.822 51.2781C181.029 51.0879 181.218 50.8803 181.408 50.6728C181.942 50.0675 182.287 49.4276 182.476 48.7705C182.752 47.8539 182.632 46.9027 182.201 45.9861C181.701 44.9658 180.805 44.0146 179.408 43.2191",fill:"#611F69"}),n.createElement("path",{d:"M179.374 43.3888L123.84 11.2045C122.444 10.3916 120.789 9.83822 119.048 9.57881C118.049 9.42316 117.049 9.3194 115.98 9.33669C115.394 9.35398 114.791 9.40587 114.188 9.45775C112.723 9.57881 111.344 9.90739 110.086 10.3743C109.431 10.6165 108.828 10.8759 108.242 11.2217C107.656 11.5676 107.225 11.9654 106.794 12.294C106.656 12.3977 106.656 12.4496 106.518 12.5361L97.5209 17.7762C86.2831 24.3307 82.1637 33.8597 86.6968 42.6624L91.2643 51.4651C92.2639 53.281 91.4194 55.1661 89.0925 56.515C86.7657 57.864 83.4564 58.3309 80.4057 57.7948L65.2554 55.1661C50.1223 52.5547 33.731 54.9758 22.476 61.5303L9.63525 69.0186C8.98029 69.2435 8.37703 69.5202 7.79101 69.8661C7.20499 70.2119 6.72239 70.5578 6.32597 70.9556L5.671 71.3361L5.99848 71.2669C3.63717 73.6881 4.2749 76.8356 7.84272 78.9109L63.1009 110.922C63.2905 111.026 63.7731 111.303 63.9799 111.389C65.9793 112.358 68.3406 112.911 70.7536 112.963C71.1673 112.963 71.5809 112.963 71.9946 112.963C73.563 112.894 75.1315 112.634 76.5276 112.167L76.4414 112.271L76.993 111.977C77.6652 111.752 78.3201 111.441 78.8717 111.13C79.4232 110.819 79.9748 110.525 80.5263 110.092C80.647 109.988 80.7676 109.885 80.871 109.764L93.2291 102.517C103.95 96.1877 108.138 86.624 104.053 77.6311L99.4858 68.8284C98.4861 67.0125 99.3306 65.1275 101.657 63.7785C103.984 62.4296 107.225 61.9281 110.344 62.4988L125.495 65.1275C140.662 67.7389 157.036 65.3177 168.274 58.7632L177.909 53.1427C178.426 52.9524 178.926 52.7103 179.339 52.4682C179.788 52.2088 180.287 51.9148 180.701 51.4997L180.839 51.4132C181.046 51.223 181.235 51.0155 181.425 50.808C181.959 50.2027 182.304 49.5628 182.494 48.9056C182.769 47.989 182.649 47.0378 182.218 46.1213C181.718 45.1009 180.822 44.1497 179.426 43.3542",fill:"#611F69"}),n.createElement("path",{d:"M179.374 43.5665L123.84 11.3822C122.444 10.5694 120.789 10.016 119.048 9.75654C118.049 9.60089 117.049 9.49713 115.98 9.51442C115.394 9.53172 114.791 9.5836 114.188 9.63548C112.723 9.75654 111.344 10.0851 110.086 10.5521C109.431 10.7942 108.828 11.0536 108.242 11.3995C107.656 11.7454 107.225 12.1431 106.794 12.4717C106.656 12.5755 106.656 12.6274 106.518 12.7138L97.5209 17.9539C86.2831 24.5084 82.1637 34.0375 86.6968 42.8402L91.2643 51.6429C92.2639 53.4588 91.4194 55.3438 89.0925 56.6927C86.7657 58.0417 83.4564 58.5086 80.4057 57.9725L65.2554 55.3438C50.1223 52.7324 33.731 55.1536 22.476 61.708L9.63525 69.1964C8.98029 69.4212 8.37703 69.6979 7.79101 70.0438C7.20499 70.3897 6.72239 70.7356 6.32597 71.1333L5.671 71.5138L5.99848 71.4446C3.63717 73.8658 4.2749 77.0133 7.84272 79.0886L63.0836 111.1C63.2732 111.204 63.7558 111.48 63.9627 111.584C65.9448 112.553 68.3233 113.106 70.7364 113.158C71.15 113.158 71.5637 113.158 71.9773 113.158C73.5458 113.089 75.1315 112.829 76.5276 112.362L76.4414 112.466L76.993 112.172C77.6652 111.947 78.3201 111.636 78.8717 111.325C79.4232 111.014 79.9748 110.72 80.5263 110.287C80.647 110.183 80.7676 110.08 80.871 109.959L93.2291 102.712C103.95 96.3827 108.138 86.8191 104.053 77.8261L99.4858 69.0234C98.4861 67.2076 99.3306 65.3225 101.657 63.9736C103.984 62.6246 107.225 62.1231 110.344 62.6938L125.495 65.3225C140.662 67.9339 157.036 65.5127 168.274 58.9583L177.909 53.3377C178.426 53.1475 178.926 52.9053 179.339 52.6632C179.788 52.4038 180.287 52.1098 180.701 51.6948L180.839 51.6083C181.046 51.418 181.235 51.2105 181.425 51.003C181.959 50.3977 182.304 49.7578 182.494 49.1006C182.769 48.184 182.649 47.2329 182.218 46.3163C181.718 45.2959 180.822 44.3448 179.426 43.5492",fill:"#611F69"}),n.createElement("path",{d:"M179.374 43.7334L123.84 11.549C122.444 10.7362 120.789 10.1828 119.048 9.9234C118.049 9.76775 117.049 9.66399 115.98 9.68128C115.394 9.69857 114.791 9.75046 114.188 9.80234C112.723 9.9234 111.344 10.252 110.086 10.7189C109.431 10.961 108.828 11.2205 108.242 11.5663C107.656 11.9122 107.225 12.31 106.794 12.6386C106.656 12.7423 106.656 12.7942 106.518 12.8807L97.5209 18.1208C86.2831 24.6753 82.1637 34.2043 86.6968 43.007L91.2643 51.8097C92.2639 53.6256 91.4194 55.5107 89.0925 56.8596C86.7657 58.2085 83.4564 58.6755 80.4057 58.1394L65.2554 55.5107C50.1223 52.8992 33.731 55.3204 22.476 61.8749L9.63525 69.3632C8.98029 69.5881 8.37703 69.8648 7.79101 70.2106C7.20499 70.5565 6.72239 70.9024 6.32597 71.3002L5.671 71.6806L5.99848 71.6115C3.63717 74.0326 4.2749 77.1802 7.84272 79.2555L63.0836 111.25C63.2732 111.353 63.7731 111.63 63.9627 111.734C65.9448 112.702 68.3233 113.256 70.7191 113.308C71.1328 113.308 71.5464 113.308 71.9601 113.308C73.5286 113.238 75.1143 112.979 76.5104 112.512L76.4242 112.616L76.9757 112.322C77.6479 112.097 78.3029 111.786 78.8544 111.474C79.406 111.163 79.9575 110.869 80.5091 110.437C80.6297 110.333 80.7504 110.229 80.8538 110.108L93.1947 102.862C103.915 96.5323 108.104 86.9686 104.019 77.9757L99.4513 69.173C98.4516 67.3571 99.2962 65.4721 101.623 64.1231C103.95 62.7742 107.19 62.2727 110.31 62.8434L125.46 65.4721C140.628 68.0835 157.002 65.6623 168.24 59.1078L177.874 53.4873C178.392 53.297 178.891 53.0549 179.305 52.8128C179.753 52.5534 180.253 52.2594 180.667 51.8443L180.805 51.7578C181.011 51.5676 181.201 51.3601 181.391 51.1525C181.925 50.5473 182.27 49.9074 182.459 49.2502C182.735 48.3336 182.614 47.3824 182.183 46.4658C181.684 45.4455 180.787 44.4943 179.391 43.6988",fill:"#611F69"}),n.createElement("path",{d:"M179.374 43.9111L123.84 11.7268C122.444 10.914 120.789 10.3605 119.048 10.1011C118.049 9.94548 117.049 9.84172 115.98 9.85901C115.394 9.87631 114.791 9.92819 114.188 9.98007C112.723 10.1011 111.344 10.4297 110.086 10.8967C109.431 11.1388 108.828 11.3982 108.242 11.7441C107.656 12.09 107.225 12.4877 106.794 12.8163C106.656 12.9201 106.656 12.972 106.518 13.0584L97.5209 18.2985C86.2831 24.853 82.1637 34.3821 86.6968 43.1848L91.2643 51.9875C92.2639 53.8033 91.4194 55.6884 89.0925 57.0373C86.7657 58.3863 83.4564 58.8532 80.4057 58.3171L65.2554 55.6884C50.1223 53.077 33.731 55.4982 22.476 62.0526L9.63525 69.541C8.98029 69.7658 8.37703 70.0425 7.79101 70.3884C7.20499 70.7343 6.72239 71.0801 6.32597 71.4779L5.671 71.8584L5.99848 71.7892C3.63717 74.2104 4.2749 77.3579 7.84272 79.4332L63.0664 111.427C63.256 111.531 63.7558 111.808 63.9454 111.912C65.9276 112.88 68.3061 113.433 70.7019 113.503C71.1156 113.503 71.5292 113.503 71.9429 113.503C73.5113 113.433 75.1143 113.174 76.5104 112.707L76.4242 112.811L76.9757 112.534C77.6479 112.309 78.3029 111.998 78.8544 111.687C79.406 111.375 79.9575 111.081 80.5091 110.649C80.6297 110.545 80.7504 110.442 80.8538 110.32L93.1947 103.074C103.915 96.7446 108.104 87.181 104.019 78.188L99.4513 69.3853C98.4516 67.5694 99.2962 65.6844 101.623 64.3354C103.95 62.9865 107.19 62.485 110.31 63.0557L125.46 65.6844C140.628 68.2958 157.002 65.8746 168.24 59.3202L177.874 53.6996C178.392 53.5093 178.891 53.2672 179.305 53.0251C179.753 52.7657 180.253 52.4717 180.667 52.0566L180.805 51.9702C181.011 51.7799 181.201 51.5724 181.391 51.3649C181.925 50.7596 182.27 50.1197 182.459 49.4625C182.735 48.5459 182.614 47.5948 182.183 46.6782C181.684 45.6578 180.787 44.7066 179.391 43.9111",fill:"#611F69"}),n.createElement("path",{d:"M179.374 44.0715L123.84 11.9045C122.444 11.0917 120.789 10.5383 119.048 10.2789C118.049 10.1232 117.049 10.0195 115.98 10.0367C115.394 10.054 114.791 10.1059 114.188 10.1578C112.723 10.2789 111.344 10.6075 110.086 11.0744C109.431 11.3165 108.828 11.5759 108.242 11.9218C107.656 12.2677 107.225 12.6654 106.794 12.994C106.656 13.0978 106.656 13.1497 106.518 13.2362L97.5209 18.4763C86.2831 25.0307 82.1637 34.5598 86.6968 43.3625L91.2643 52.1652C92.2639 53.9811 91.4194 55.8661 89.0925 57.2151C86.7657 58.564 83.4564 59.0309 80.4057 58.4948L65.2554 55.8661C50.1223 53.2547 33.731 55.6759 22.476 62.2304L9.63525 69.7187C8.98029 69.9435 8.37703 70.2202 7.79101 70.5661C7.20499 70.912 6.72239 71.2579 6.32597 71.6556L5.671 72.0361L5.99848 71.9669C3.63717 74.3881 4.2749 77.5356 7.84272 79.6109L63.0664 111.605C63.2388 111.709 63.7558 111.986 63.9454 112.089C65.9276 113.058 68.3061 113.611 70.7019 113.68C71.1156 113.68 71.5292 113.68 71.9429 113.68C73.5113 113.611 75.1143 113.352 76.5276 112.885L76.4414 112.989L76.9757 112.712C77.6479 112.487 78.3029 112.176 78.8544 111.864C79.406 111.553 79.9575 111.259 80.5091 110.827C80.6297 110.723 80.7504 110.637 80.8538 110.516L93.1947 103.269C103.915 96.9396 108.104 87.376 104.019 78.3831L99.4513 69.5804C98.4516 67.7645 99.2962 65.8794 101.623 64.5305C103.95 63.1815 107.19 62.68 110.31 63.2507L125.46 65.8794C140.628 68.4908 157.002 66.0696 168.24 59.5152L177.874 53.8946C178.392 53.7044 178.891 53.4622 179.305 53.2201C179.753 52.9607 180.253 52.6667 180.667 52.2517L180.805 52.1652C181.011 51.975 181.201 51.7674 181.391 51.5599C181.925 50.9546 182.27 50.3147 182.459 49.6575C182.735 48.741 182.614 47.7898 182.183 46.8732C181.684 45.8528 180.787 44.9017 179.391 44.1061",fill:"#611F69"}),n.createElement("path",{d:"M179.374 44.241L123.84 12.074C122.444 11.2611 120.789 10.7077 119.048 10.4483C118.049 10.2927 117.049 10.1889 115.98 10.2062C115.394 10.2235 114.791 10.2754 114.188 10.3273C112.723 10.4483 111.344 10.7769 110.086 11.2438C109.431 11.486 108.828 11.7454 108.242 12.0913C107.656 12.4371 107.225 12.8349 106.794 13.1635C106.656 13.2672 106.656 13.3191 106.518 13.4056L97.5209 18.6457C86.2831 25.2002 82.1637 34.7292 86.6968 43.5319L91.2643 52.3346C92.2639 54.1505 91.4194 56.0356 89.0925 57.3845C86.7657 58.7335 83.4564 59.2004 80.4057 58.6643L65.2554 56.0356C50.1223 53.4242 33.731 55.8453 22.476 62.3998L9.63525 69.8881C8.98029 70.113 8.37703 70.3897 7.79101 70.7356C7.20499 71.0814 6.72239 71.4273 6.32597 71.8251L5.671 72.2056L5.99848 72.1364C3.63717 74.5576 4.2749 77.7051 7.84272 79.7804L63.0492 111.757C63.2215 111.861 63.7386 112.138 63.9282 112.241C65.9103 113.21 68.2716 113.781 70.6847 113.832C71.0983 113.832 71.512 113.832 71.9256 113.832C73.5113 113.763 75.1143 113.521 76.5276 113.037L76.4414 113.141L76.9757 112.864C77.6479 112.639 78.3029 112.328 78.8544 112.017C79.406 111.705 79.9575 111.411 80.5091 110.979C80.6297 110.875 80.7504 110.789 80.8538 110.668L93.1947 103.421C103.915 97.0918 108.104 87.5281 104.019 78.5352L99.4513 69.7325C98.4516 67.9166 99.2962 66.0316 101.623 64.6826C103.95 63.3337 107.19 62.8322 110.31 63.4029L125.46 66.0316C140.628 68.643 157.002 66.2218 168.24 59.6673L177.874 54.0467C178.392 53.8565 178.891 53.6144 179.305 53.3723C179.753 53.1129 180.253 52.8189 180.667 52.4038L180.805 52.3173C181.011 52.1271 181.201 51.9196 181.391 51.712C181.925 51.1068 182.27 50.4669 182.459 49.8097C182.735 48.8931 182.614 47.9419 182.183 47.0253C181.684 46.005 180.787 45.0538 179.391 44.2583",fill:"#611F69"}),n.createElement("path",{d:"M179.374 44.4187L123.84 12.2517C122.444 11.4389 120.789 10.8855 119.048 10.626C118.049 10.4704 117.049 10.3666 115.98 10.3839C115.394 10.4012 114.791 10.4531 114.188 10.505C112.723 10.626 111.344 10.9546 110.086 11.4216C109.431 11.6637 108.828 11.9231 108.242 12.269C107.656 12.6149 107.225 13.0126 106.794 13.3412C106.656 13.445 106.656 13.4969 106.518 13.5833L97.5209 18.8234C86.2831 25.3779 82.1637 34.907 86.6968 43.7097L91.2643 52.5124C92.2639 54.3282 91.4194 56.2133 89.0925 57.5622C86.7657 58.9112 83.4564 59.3781 80.4057 58.842L65.2554 56.2133C50.1223 53.6019 33.731 56.0231 22.476 62.5775L9.63525 70.0659C8.98029 70.2907 8.37703 70.5674 7.79101 70.9133C7.20499 71.2592 6.72239 71.6051 6.32597 72.0028L5.671 72.3833L5.99848 72.3141C3.63717 74.7353 4.2749 77.8828 7.84272 79.9581L63.0492 111.935C63.2215 112.039 63.7386 112.315 63.9282 112.419C65.9103 113.388 68.2716 113.958 70.6847 114.01C71.0983 114.01 71.512 114.01 71.9256 114.01C73.5113 113.941 75.1143 113.699 76.5276 113.215L76.4414 113.318L76.9757 113.042C77.6479 112.817 78.3029 112.506 78.8544 112.194C79.406 111.883 79.9575 111.589 80.5091 111.157C80.6297 111.053 80.7504 110.966 80.8538 110.845L93.1947 103.599C103.915 97.2695 108.104 87.7059 104.019 78.7129L99.4513 69.9102C98.4516 68.0944 99.2962 66.2093 101.623 64.8604C103.95 63.5114 107.19 63.0099 110.31 63.5806L125.46 66.2093C140.628 68.8207 157.002 66.3995 168.24 59.8451L177.874 54.2245C178.392 54.0342 178.891 53.7921 179.305 53.55C179.753 53.2906 180.253 52.9966 180.667 52.5815L180.805 52.4951C181.011 52.3048 181.201 52.0973 181.391 51.8898C181.925 51.2845 182.27 50.6446 182.459 49.9874C182.735 49.0708 182.614 48.1197 182.183 47.2031C181.684 46.1827 180.787 45.2315 179.391 44.436",fill:"#611F69"}),n.createElement("path",{d:"M179.374 44.5852L123.84 12.4182C122.444 11.6053 120.789 11.0519 119.048 10.7925C118.049 10.6369 117.049 10.5331 115.98 10.5504C115.394 10.5677 114.791 10.6196 114.188 10.6715C112.723 10.7925 111.344 11.1211 110.086 11.5881C109.431 11.8302 108.828 12.0896 108.242 12.4355C107.656 12.7813 107.225 13.1791 106.794 13.5077C106.656 13.6115 106.656 13.6633 106.518 13.7498L97.5209 18.9899C86.2831 25.5444 82.1637 35.0735 86.6968 43.8762L91.2643 52.6788C92.2639 54.4947 91.4194 56.3798 89.0925 57.7287C86.7657 59.0777 83.4564 59.5446 80.4057 59.0085L65.2554 56.3798C50.1223 53.7684 33.731 56.1895 22.476 62.744L9.63525 70.2324C8.98029 70.4572 8.37703 70.7339 7.79101 71.0798C7.20499 71.4257 6.72239 71.7715 6.32597 72.1693L5.671 72.5498L5.99848 72.4806C3.63717 74.9018 4.2749 78.0493 7.84272 80.1246L63.0319 112.101C63.2043 112.205 63.7214 112.499 63.911 112.586C65.8931 113.554 68.2544 114.125 70.6502 114.194C71.0638 114.194 71.4775 114.194 71.8912 114.194C73.4769 114.142 75.097 113.883 76.5104 113.398L76.4242 113.502L76.9585 113.226C77.6307 113.001 78.2857 112.689 78.8372 112.378C79.3888 112.067 79.9403 111.773 80.4919 111.34C80.6125 111.237 80.7332 111.15 80.8366 111.029L93.1774 103.783C103.898 97.4533 108.086 87.8896 104.002 78.8967L99.4341 70.094C98.4344 68.2781 99.2789 66.3931 101.606 65.0441C103.933 63.6952 107.173 63.1937 110.293 63.7644L125.443 66.3931C140.611 69.0045 156.985 66.5833 168.222 60.0288L177.857 54.4083C178.374 54.218 178.874 53.9759 179.288 53.7338C179.736 53.4744 180.236 53.1804 180.649 52.7653L180.787 52.6788C180.994 52.4886 181.184 52.2811 181.373 52.0736C181.908 51.4683 182.252 50.8284 182.442 50.1712C182.718 49.2546 182.597 48.3034 182.166 47.3869C181.666 46.3665 180.77 45.4153 179.374 44.6198",fill:"#611F69"}),n.createElement("path",{d:"M179.374 44.7575L123.84 12.5904C122.444 11.7776 120.789 11.2242 119.048 10.9648C118.049 10.8091 117.049 10.7054 115.98 10.7227C115.394 10.7399 114.791 10.7918 114.188 10.8437C112.723 10.9648 111.344 11.2934 110.086 11.7603C109.431 12.0024 108.828 12.2618 108.242 12.6077C107.656 12.9536 107.225 13.3514 106.794 13.6799C106.656 13.7837 106.656 13.8356 106.518 13.9221L97.5209 19.1622C86.2831 25.7166 82.1637 35.2457 86.6968 44.0484L91.2643 52.8511C92.2639 54.667 91.4194 56.552 89.0925 57.901C86.7657 59.2499 83.4564 59.7169 80.4057 59.1807L65.2554 56.552C50.1223 53.9406 33.731 56.3618 22.476 62.9163L9.63525 70.4046C8.98029 70.6294 8.37703 70.9061 7.79101 71.252C7.20499 71.5979 6.72239 71.9438 6.32597 72.3416L5.671 72.722L5.99848 72.6528C3.63717 75.074 4.2749 78.2216 7.84272 80.2968L63.0319 112.256C63.2043 112.36 63.7386 112.654 63.911 112.741C65.8931 113.709 68.2544 114.28 70.6502 114.349C71.0638 114.349 71.4775 114.349 71.8912 114.349C73.4769 114.297 75.097 114.038 76.5276 113.553L76.4414 113.657L76.9757 113.38C77.6479 113.156 78.3029 112.844 78.8544 112.533C79.406 112.222 79.9575 111.928 80.5091 111.495C80.6297 111.392 80.7676 111.305 80.8538 111.184L93.1947 103.938C103.915 97.6082 108.104 88.0446 104.019 79.0517L99.4513 70.249C98.4516 68.4331 99.2962 66.548 101.623 65.1991C103.95 63.8501 107.19 63.3486 110.31 63.9193L125.46 66.548C140.628 69.1594 157.002 66.7383 168.24 60.1838L177.874 54.5632C178.392 54.373 178.891 54.1309 179.305 53.8887C179.753 53.6293 180.253 53.3353 180.667 52.9203L180.805 52.8338C181.011 52.6436 181.201 52.436 181.391 52.2285C181.925 51.6232 182.27 50.9833 182.459 50.3262C182.735 49.4096 182.614 48.4584 182.183 47.5418C181.684 46.5215 180.787 45.5703 179.391 44.7747",fill:"#611F69"}),n.createElement("path",{d:"M179.374 44.9325L123.84 12.7655C122.444 11.9526 120.789 11.3992 119.048 11.1398C118.049 10.9842 117.049 10.8804 115.98 10.8977C115.394 10.915 114.791 10.9669 114.188 11.0188C112.723 11.1398 111.344 11.4684 110.086 11.9353C109.431 12.1775 108.828 12.4369 108.242 12.7827C107.656 13.1286 107.225 13.5264 106.794 13.855C106.656 13.9587 106.656 14.0106 106.518 14.0971L97.5209 19.3372C86.2831 25.8917 82.1637 35.4207 86.6968 44.2234L91.2643 53.0261C92.2639 54.842 91.4194 56.7271 89.0925 58.076C86.7657 59.425 83.4564 59.8919 80.4057 59.3558L65.2554 56.7271C50.1223 54.1157 33.731 56.5368 22.476 63.0913L9.63525 70.5797C8.98029 70.8045 8.37703 71.0812 7.79101 71.4271C7.20499 71.7729 6.72239 72.1188 6.32597 72.5166L5.671 72.8971L5.99848 72.8279C3.63717 75.2491 4.2749 78.3966 7.84272 80.4719L63.0147 112.431C63.1871 112.535 63.7214 112.829 63.8937 112.916C65.8758 113.884 68.2372 114.455 70.6329 114.524C71.0466 114.524 71.4603 114.524 71.8739 114.524C73.4769 114.472 75.097 114.213 76.5104 113.728L76.4414 113.832L76.9757 113.556C77.6479 113.331 78.3029 113.019 78.8544 112.708C79.406 112.397 79.9575 112.103 80.5091 111.67C80.6297 111.567 80.7676 111.48 80.8538 111.359L93.1947 104.113C103.915 97.7833 108.104 88.2196 104.019 79.2267L99.4513 70.424C98.4516 68.6081 99.2962 66.7231 101.623 65.3741C103.95 64.0252 107.19 63.5237 110.31 64.0944L125.46 66.7231C140.628 69.3345 157.002 66.9133 168.24 60.3588L177.874 54.7382C178.392 54.548 178.891 54.3059 179.305 54.0638C179.753 53.8044 180.253 53.5104 180.667 53.0953L180.805 53.0088C181.011 52.8186 181.201 52.6111 181.391 52.4035C181.925 51.7982 182.27 51.1584 182.459 50.5012C182.735 49.5846 182.614 48.6334 182.183 47.7168C181.684 46.6965 180.787 45.7453 179.391 44.9498",fill:"#611F69"}),n.createElement("path",{d:"M179.374 45.099L123.84 12.9319C122.444 12.1191 120.789 11.5657 119.048 11.3063C118.049 11.1506 117.049 11.0469 115.98 11.0642C115.394 11.0815 114.791 11.1333 114.188 11.1852C112.723 11.3063 111.344 11.6349 110.086 12.1018C109.431 12.3439 108.828 12.6033 108.242 12.9492C107.656 13.2951 107.225 13.6929 106.794 14.0215C106.656 14.1252 106.656 14.1771 106.518 14.2636L97.5209 19.5037C86.2831 26.0582 82.1637 35.5872 86.6968 44.3899L91.2643 53.1926C92.2639 55.0085 91.4194 56.8936 89.0925 58.2425C86.7657 59.5914 83.4564 60.0584 80.4057 59.5223L65.2554 56.8936C50.1223 54.2821 33.731 56.7033 22.476 63.2578L9.63525 70.7461C8.98029 70.971 8.37703 71.2477 7.79101 71.5935C7.20499 71.9394 6.72239 72.2853 6.32597 72.6831L5.671 73.0635L5.99848 72.9944C3.63717 75.4155 4.2749 78.5631 7.84272 80.6384L63.0147 112.598C63.1698 112.684 63.7214 112.996 63.8937 113.082C65.8758 114.068 68.2372 114.621 70.6329 114.69C71.0466 114.69 71.4603 114.69 71.8739 114.69C73.4769 114.639 75.097 114.379 76.5276 113.895L76.4587 113.999L76.993 113.722C77.6652 113.497 78.3201 113.186 78.8717 112.875C79.4232 112.563 79.9748 112.269 80.5263 111.837C80.647 111.733 80.7849 111.647 80.871 111.526L93.2119 104.279C103.933 97.9498 108.121 88.3861 104.036 79.3932L99.4685 70.5905C98.4688 68.7746 99.3134 66.8896 101.64 65.5406C103.967 64.1917 107.207 63.6901 110.327 64.2608L125.477 66.8895C140.645 69.501 157.019 67.0798 168.257 60.5253L177.892 54.9047C178.409 54.7145 178.909 54.4724 179.322 54.2303C179.77 53.9709 180.27 53.6768 180.684 53.2618L180.822 53.1753C181.029 52.9851 181.218 52.7776 181.408 52.57C181.942 51.9647 182.287 51.3249 182.476 50.6677C182.752 49.7511 182.632 48.7999 182.201 47.8833C181.701 46.863 180.805 45.9118 179.408 45.1163",fill:"#611F69"}),n.createElement("path",{d:"M179.374 45.2745L123.84 13.0901C122.444 12.2773 120.789 11.7239 119.048 11.4645C118.049 11.3088 117.049 11.2051 115.98 11.2224C115.394 11.2397 114.791 11.2915 114.188 11.3434C112.723 11.4645 111.344 11.7931 110.086 12.26C109.431 12.5021 108.828 12.7615 108.242 13.1074C107.656 13.4533 107.225 13.8511 106.794 14.1797C106.656 14.2834 106.656 14.3353 106.518 14.4218L97.5209 19.6619C86.2831 26.2164 82.1637 35.7454 86.6968 44.5481L91.2643 53.3508C92.2639 55.1667 91.4194 57.0518 89.0925 58.4007C86.7657 59.7496 83.4564 60.2166 80.4057 59.6805L65.2554 57.0518C50.1223 54.4403 33.731 56.8615 22.476 63.416L9.63525 70.9043C8.98029 71.1292 8.37703 71.4059 7.79101 71.7517C7.20499 72.0976 6.72239 72.4435 6.32597 72.8413L5.671 73.2217L5.99848 73.1526C3.63717 75.5737 4.2749 78.7213 7.84272 80.7966L62.9975 112.756C63.1526 112.843 63.7041 113.154 63.8765 113.24C65.8586 114.226 68.2027 114.779 70.6157 114.849C71.0294 114.849 71.443 114.849 71.8567 114.849C73.4596 114.797 75.097 114.537 76.5276 114.053L76.4587 114.14L76.993 113.863C77.6652 113.638 78.3201 113.327 78.8717 113.015C79.4232 112.704 79.9748 112.41 80.5263 111.978C80.647 111.874 80.7849 111.788 80.871 111.667L93.2119 104.42C103.933 98.0907 108.121 88.527 104.036 79.5341L99.4685 70.7314C98.4688 68.9155 99.3134 67.0305 101.64 65.6815C103.967 64.3326 107.207 63.831 110.327 64.4018L125.477 67.0304C140.645 69.6419 157.019 67.2207 168.257 60.6662L177.892 55.0456C178.409 54.8554 178.909 54.6133 179.322 54.3712C179.77 54.1118 180.27 53.8178 180.684 53.4027L180.822 53.3162C181.029 53.126 181.218 52.9185 181.408 52.7109C181.942 52.1056 182.287 51.4658 182.476 50.8086C182.752 49.892 182.632 48.9408 182.201 48.0242C181.701 47.0039 180.805 46.0527 179.408 45.2572",fill:"#611F69"}),n.createElement("path",{d:"M179.374 45.4495L123.84 13.2652C122.444 12.4524 120.789 11.8989 119.048 11.6395C118.049 11.4839 117.049 11.3801 115.98 11.3974C115.394 11.4147 114.791 11.4666 114.188 11.5185C112.723 11.6395 111.344 11.9681 110.086 12.4351C109.431 12.6772 108.828 12.9366 108.242 13.2825C107.656 13.6283 107.225 14.0261 106.794 14.3547C106.656 14.4585 106.656 14.5103 106.518 14.5968L97.5209 19.8369C86.2831 26.3914 82.1637 35.9205 86.6968 44.7232L91.2643 53.5259C92.2639 55.3417 91.4194 57.2268 89.0925 58.5757C86.7657 59.9247 83.4564 60.3916 80.4057 59.8555L65.2554 57.2268C50.1223 54.6154 33.731 57.0366 22.476 63.591L9.63525 71.0794C8.98029 71.3042 8.37703 71.5809 7.79101 71.9268C7.20499 72.2727 6.72239 72.6186 6.32597 73.0163L5.671 73.3968L5.99848 73.3276C3.63717 75.7488 4.2749 78.8963 7.84272 80.9716L62.9975 112.914C63.1526 113 63.7041 113.312 63.8765 113.398C65.8586 114.384 68.2027 114.955 70.5985 115.024C71.0121 115.024 71.4258 115.024 71.8395 115.024C73.4424 114.972 75.0798 114.712 76.5276 114.211L76.4587 114.297L76.993 114.021C77.6652 113.796 78.3201 113.485 78.8717 113.173C79.4232 112.862 79.9748 112.568 80.5263 112.136C80.647 112.032 80.7849 111.945 80.871 111.824L93.2119 104.578C103.933 98.2484 108.121 88.6848 104.036 79.6918L99.4685 70.8891C98.4688 69.0733 99.3134 67.1882 101.64 65.8393C103.967 64.4903 107.207 63.9888 110.327 64.5595L125.477 67.1882C140.645 69.7996 157.019 67.3784 168.257 60.824L177.892 55.2034C178.409 55.0131 178.909 54.771 179.322 54.5289C179.77 54.2695 180.27 53.9755 180.684 53.5604L180.822 53.474C181.029 53.2837 181.218 53.0762 181.408 52.8687C181.942 52.2634 182.287 51.6235 182.476 50.9663C182.752 50.0497 182.632 49.0986 182.201 48.182C181.701 47.1616 180.805 46.2104 179.408 45.4149",fill:"#611F69"}),n.createElement("path",{d:"M179.374 45.6163L123.84 13.4319C122.444 12.6191 120.789 12.0657 119.048 11.8063C118.049 11.6506 117.049 11.5469 115.98 11.5642C115.394 11.5815 114.791 11.6333 114.188 11.6852C112.723 11.8063 111.344 12.1349 110.086 12.6018C109.431 12.8439 108.828 13.1033 108.242 13.4492C107.656 13.7951 107.225 14.1929 106.794 14.5215C106.656 14.6252 106.656 14.6771 106.518 14.7636L97.5209 20.0037C86.2831 26.5582 82.1637 36.0872 86.6968 44.8899L91.2643 53.6926C92.2639 55.5085 91.4194 57.3935 89.0925 58.7425C86.7657 60.0914 83.4564 60.5584 80.4057 60.0222L65.2554 57.3935C50.1223 54.7821 33.731 57.2033 22.476 63.7578L9.63525 71.2461C8.98029 71.4709 8.37703 71.7476 7.79101 72.0935C7.20499 72.4394 6.72239 72.7853 6.32597 73.1831L5.671 73.5635L5.99848 73.4944C3.63717 75.9155 4.2749 79.0631 7.84272 81.1383L62.9802 113.081C63.1354 113.167 63.6869 113.478 63.8593 113.565C65.8414 114.551 68.1855 115.121 70.5812 115.19C70.9949 115.19 71.4086 115.19 71.8222 115.19C73.4424 115.139 75.0798 114.879 76.5104 114.378L76.4414 114.464L76.9757 114.187C77.6479 113.963 78.3029 113.651 78.8544 113.34C79.406 113.029 79.9575 112.735 80.5091 112.302C80.6297 112.199 80.7676 112.112 80.8538 111.991L93.1947 104.728C103.915 98.3979 108.104 88.8342 104.019 79.8413L99.4513 71.0386C98.4516 69.2227 99.2962 67.3377 101.623 65.9887C103.95 64.6398 107.19 64.1382 110.31 64.7089L125.46 67.3376C140.628 69.9491 157.002 67.5279 168.24 60.9734L177.874 55.3528C178.392 55.1626 178.891 54.9205 179.305 54.6784C179.753 54.419 180.253 54.125 180.667 53.7099L180.805 53.6234C181.011 53.4332 181.201 53.2257 181.391 53.0181C181.925 52.4128 182.27 51.773 182.459 51.1158C182.735 50.1992 182.614 49.248 182.183 48.3314C181.684 47.3111 180.787 46.3599 179.391 45.5644",fill:"#611F69"}),n.createElement("path",{d:"M179.374 45.7913L123.84 13.607C122.444 12.7941 120.789 12.2407 119.048 11.9813C118.049 11.8257 117.049 11.7219 115.98 11.7392C115.394 11.7565 114.791 11.8084 114.188 11.8603C112.723 11.9813 111.344 12.3099 110.086 12.7769C109.431 13.019 108.828 13.2784 108.242 13.6243C107.656 13.9701 107.225 14.3679 106.794 14.6965C106.656 14.8003 106.656 14.8521 106.518 14.9386L97.5209 20.1787C86.2831 26.7332 82.1637 36.2622 86.6968 45.0649L91.2643 53.8676C92.2639 55.6835 91.4194 57.5686 89.0925 58.9175C86.7657 60.2665 83.4564 60.7334 80.4057 60.1973L65.2554 57.5686C50.1223 54.9572 33.731 57.3784 22.476 63.9328L9.63525 71.4212C8.98029 71.646 8.37703 71.9227 7.79101 72.2686C7.20499 72.6145 6.72239 72.9603 6.32597 73.3581L5.671 73.7386L5.99848 73.6694C3.63717 76.0906 4.2749 79.2381 7.84272 81.3134L62.9802 113.256C63.1353 113.342 63.7041 113.653 63.8592 113.74C65.8414 114.726 68.1855 115.296 70.5812 115.365C70.9949 115.365 71.4086 115.365 71.8222 115.365C73.4424 115.314 75.0798 115.054 76.5276 114.553L76.4587 114.639L76.993 114.38C77.6652 114.155 78.3201 113.844 78.8717 113.532C79.4232 113.221 79.9748 112.927 80.5263 112.495C80.647 112.391 80.7849 112.304 80.871 112.183L93.2119 104.92C103.933 98.5902 108.121 89.0266 104.036 80.0336L99.4685 71.2309C98.4688 69.415 99.3134 67.53 101.64 66.181C103.967 64.8321 107.207 64.3306 110.327 64.9013L125.477 67.53C140.645 70.1414 157.019 67.7202 168.257 61.1658L177.892 55.5452C178.409 55.3549 178.909 55.1128 179.322 54.8707C179.77 54.6113 180.27 54.3173 180.684 53.9022L180.822 53.8158C181.029 53.6255 181.218 53.418 181.408 53.2105C181.942 52.6052 182.287 51.9653 182.476 51.3081C182.752 50.3915 182.632 49.4404 182.201 48.5238C181.701 47.5034 180.805 46.5522 179.408 45.7567",fill:"#611F69"}),n.createElement("path",{d:"M179.374 45.9572L123.84 13.7902C122.444 12.9774 120.789 12.424 119.048 12.1645C118.049 12.0089 117.049 11.9051 115.98 11.9224C115.394 11.9397 114.791 11.9916 114.188 12.0435C112.723 12.1645 111.344 12.4931 110.086 12.9601C109.431 13.2022 108.828 13.4616 108.242 13.8075C107.656 14.1534 107.225 14.5511 106.794 14.8797C106.656 14.9835 106.656 15.0354 106.518 15.1218L97.5209 20.362C86.2831 26.9164 82.1637 36.4455 86.6968 45.2482L91.2643 54.0509C92.2639 55.8667 91.4194 57.7518 89.0925 59.1007C86.7657 60.4497 83.4564 60.9166 80.4057 60.3805L65.2554 57.7518C50.1223 55.1404 33.731 57.5616 22.476 64.116L9.63525 71.6044C8.98029 71.8292 8.37703 72.1059 7.79101 72.4518C7.20499 72.7977 6.72239 73.1436 6.32597 73.5413L5.671 73.9218L5.99848 73.8526C3.63717 76.2738 4.2749 79.4213 7.84272 81.4966L62.963 113.422C63.1181 113.508 63.6869 113.819 63.842 113.906C65.8069 114.892 68.1682 115.462 70.564 115.531C70.9777 115.531 71.3913 115.531 71.805 115.531C73.4251 115.48 75.0798 115.22 76.5276 114.719L76.4587 114.805L76.993 114.546C77.6652 114.321 78.3201 114.01 78.8717 113.698C79.4232 113.387 79.9748 113.093 80.5263 112.661C80.647 112.557 80.7849 112.47 80.8883 112.349L93.2291 105.086C103.95 98.7561 108.138 89.1925 104.053 80.1996L99.4858 71.3969C98.4861 69.581 99.3306 67.6959 101.657 66.347C103.984 64.998 107.225 64.4965 110.344 65.0672L125.495 67.6959C140.662 70.3073 157.036 67.8861 168.274 61.3317L177.909 55.7111C178.426 55.5209 178.926 55.2787 179.339 55.0366C179.788 54.7772 180.287 54.4832 180.701 54.0682L180.839 53.9817C181.046 53.7915 181.235 53.5839 181.425 53.3764C181.959 52.7711 182.304 52.1312 182.494 51.474C182.769 50.5575 182.649 49.6063 182.218 48.6897C181.718 47.6693 180.822 46.7182 179.426 45.9226",fill:"#611F69"}),n.createElement("path",{d:"M179.374 46.1267L123.84 13.9596C122.444 13.1468 120.789 12.5934 119.048 12.334C118.049 12.1783 117.049 12.0746 115.98 12.0919C115.394 12.1092 114.791 12.1611 114.188 12.2129C112.723 12.334 111.344 12.6626 110.086 13.1295C109.431 13.3716 108.828 13.631 108.242 13.9769C107.656 14.3228 107.225 14.7206 106.794 15.0492C106.656 15.1529 106.656 15.2048 106.518 15.2913L97.5209 20.5314C86.2831 27.0859 82.1637 36.6149 86.6968 45.4176L91.2643 54.2203C92.2639 56.0362 91.4194 57.9213 89.0925 59.2702C86.7657 60.6191 83.4564 61.0861 80.4057 60.55L65.2554 57.9213C50.1223 55.3098 33.731 57.731 22.476 64.2855L9.63525 71.7738C8.98029 71.9986 8.37703 72.2754 7.79101 72.6212C7.20499 72.9671 6.72239 73.313 6.32597 73.7108L5.671 74.0912L5.99848 74.0221C3.63717 76.4432 4.2749 79.5908 7.84272 81.6661L62.963 113.591C63.1009 113.677 63.6869 114.006 63.842 114.075C65.8069 115.061 68.1682 115.632 70.564 115.718C70.9777 115.718 71.3913 115.718 71.805 115.718C73.4251 115.666 75.0798 115.407 76.5276 114.905L76.4587 114.992L76.993 114.732C77.6652 114.508 78.3201 114.196 78.8717 113.885C79.4232 113.574 79.9748 113.28 80.5263 112.847C80.647 112.744 80.7849 112.657 80.8883 112.536L93.2291 105.273C103.95 98.9429 108.138 89.3792 104.053 80.3863L99.4858 71.5836C98.4861 69.7677 99.3306 67.8827 101.657 66.5337C103.984 65.1848 107.225 64.6832 110.344 65.254L125.495 67.8827C140.662 70.4941 157.036 68.0729 168.274 61.5184L177.909 55.8978C178.426 55.7076 178.926 55.4655 179.339 55.2234C179.788 54.964 180.287 54.67 180.701 54.2549L180.839 54.1684C181.046 53.9782 181.235 53.7707 181.425 53.5631C181.959 52.9578 182.304 52.318 182.494 51.6608C182.769 50.7442 182.649 49.793 182.218 48.8764C181.718 47.8561 180.822 46.9049 179.426 46.1094",fill:"#611F69"}),n.createElement("path",{d:"M179.374 46.3017L123.84 14.1347C122.444 13.3219 120.789 12.7684 119.048 12.509C118.049 12.3534 117.049 12.2496 115.98 12.2669C115.394 12.2842 114.791 12.3361 114.188 12.388C112.723 12.509 111.344 12.8376 110.086 13.3046C109.431 13.5467 108.828 13.8061 108.242 14.152C107.656 14.4979 107.225 14.8956 106.794 15.2242C106.656 15.328 106.656 15.3799 106.518 15.4663L97.5209 20.7064C86.2831 27.2609 82.1637 36.79 86.6968 45.5927L91.2643 54.3954C92.2639 56.2112 91.4194 58.0963 89.0925 59.4452C86.7657 60.7942 83.4564 61.2611 80.4057 60.725L65.2554 58.0963C50.1223 55.4849 33.731 57.9061 22.476 64.4605L9.63525 71.9489C8.98029 72.1737 8.37703 72.4504 7.79101 72.7963C7.20499 73.1422 6.72239 73.488 6.32597 73.8858L5.671 74.2663L5.99848 74.1971C3.63717 76.6183 4.2749 79.7658 7.84272 81.8411L62.9458 113.766C63.0836 113.852 63.6697 114.181 63.8248 114.25C65.7897 115.236 68.1337 115.807 70.5295 115.893C70.9432 115.893 71.3569 115.893 71.7705 115.893C73.3907 115.841 75.0626 115.582 76.5104 115.08L76.4414 115.167L76.9585 114.907C77.6307 114.683 78.2857 114.371 78.8372 114.06C79.3888 113.749 79.9403 113.455 80.4919 113.022C80.6125 112.919 80.7504 112.832 80.8538 112.711L93.1947 105.448C103.915 99.1179 108.104 89.5543 104.019 80.5613L99.4513 71.7586C98.4516 69.9428 99.2962 68.0577 101.623 66.7088C103.95 65.3598 107.19 64.8583 110.31 65.429L125.46 68.0577C140.628 70.6691 157.002 68.2479 168.24 61.6935L177.874 56.0729C178.392 55.8826 178.891 55.6405 179.305 55.3984C179.753 55.139 180.253 54.845 180.667 54.4299L180.805 54.3435C181.011 54.1532 181.201 53.9457 181.391 53.7382C181.925 53.1329 182.27 52.493 182.459 51.8358C182.735 50.9192 182.614 49.9681 182.183 49.0515C181.684 48.0311 180.787 47.0799 179.391 46.2844",fill:"#611F69"}),n.createElement("path",{d:"M179.374 46.4682L123.84 14.3012C122.444 13.4883 120.789 12.9349 119.048 12.6755C118.049 12.5199 117.049 12.4161 115.98 12.4334C115.394 12.4507 114.791 12.5026 114.188 12.5545C112.723 12.6755 111.344 13.0041 110.086 13.471C109.431 13.7132 108.828 13.9726 108.242 14.3185C107.656 14.6643 107.225 15.0621 106.794 15.3907C106.656 15.4945 106.656 15.5463 106.518 15.6328L97.5209 20.8729C86.2831 27.4274 82.1637 36.9564 86.6968 45.7591L91.2643 54.5618C92.2639 56.3777 91.4194 58.2628 89.0925 59.6117C86.7657 60.9607 83.4564 61.4276 80.4057 60.8915L65.2554 58.2628C50.1223 55.6514 33.731 58.0725 22.476 64.627L9.63525 72.1154C8.98029 72.3402 8.37703 72.6169 7.79101 72.9628C7.20499 73.3086 6.72239 73.6545 6.32597 74.0523L5.671 74.4328L5.99848 74.3636C3.63717 76.7848 4.2749 79.9323 7.84272 82.0076L62.9458 113.932C63.0836 114.019 63.6697 114.348 63.8248 114.417C65.7897 115.403 68.1337 115.99 70.5295 116.06C70.9432 116.06 71.3568 116.06 71.7705 116.06C73.4079 116.008 75.0626 115.748 76.5276 115.247L76.4587 115.333L76.9757 115.074C77.6479 114.849 78.3029 114.538 78.8544 114.227C79.406 113.915 79.9575 113.621 80.5091 113.189C80.6297 113.085 80.7676 112.999 80.871 112.878L93.2119 105.614C103.933 99.2844 108.121 89.7207 104.036 80.7278L99.4685 71.9251C98.4688 70.1092 99.3134 68.2242 101.64 66.8752C103.967 65.5263 107.207 65.0248 110.327 65.5955L125.477 68.2242C140.645 70.8356 157.019 68.4144 168.257 61.8599L177.892 56.2394C178.409 56.0491 178.909 55.807 179.322 55.5649C179.77 55.3055 180.27 55.0115 180.684 54.5964L180.822 54.51C181.029 54.3197 181.218 54.1122 181.408 53.9047C181.942 53.2994 182.287 52.6595 182.476 52.0023C182.752 51.0857 182.632 50.1345 182.201 49.218C181.701 48.1976 180.805 47.2464 179.408 46.4509",fill:"#611F69"}),n.createElement("path",{d:"M179.374 46.6431L123.84 14.4761C122.444 13.6633 120.789 13.1099 119.048 12.8505C118.049 12.6948 117.049 12.591 115.98 12.6083C115.394 12.6256 114.791 12.6775 114.188 12.7294C112.723 12.8505 111.344 13.179 110.086 13.646C109.431 13.8881 108.828 14.1475 108.242 14.4934C107.656 14.8393 107.225 15.237 106.794 15.5656C106.656 15.6694 106.656 15.7213 106.518 15.8077L97.5209 21.0479C86.2831 27.6023 82.1637 37.1314 86.6968 45.9341L91.2643 54.7368C92.2639 56.5527 91.4194 58.4377 89.0925 59.7867C86.7657 61.1356 83.4564 61.6025 80.4057 61.0664L65.2554 58.4377C50.1223 55.8263 33.731 58.2475 22.476 64.8019L9.63525 72.2903C8.98029 72.5151 8.37703 72.7918 7.79101 73.1377C7.20499 73.4836 6.72239 73.8295 6.32597 74.2272L5.671 74.6077L5.99848 74.5385C3.63717 76.9597 4.2749 80.1072 7.84272 82.1825L62.9285 114.09C63.0664 114.177 63.6697 114.505 63.8075 114.574C65.7724 115.56 68.1165 116.148 70.5123 116.217C70.926 116.217 71.3396 116.217 71.7533 116.217C73.3907 116.165 75.0626 115.906 76.5276 115.405L76.4587 115.491L76.9757 115.232C77.6479 115.007 78.3029 114.695 78.8544 114.384C79.406 114.073 79.9575 113.779 80.5091 113.347C80.6297 113.243 80.7676 113.156 80.871 113.035L93.2119 105.772C103.933 99.442 108.121 89.8784 104.036 80.8855L99.4685 72.0828C98.4688 70.2669 99.3134 68.3818 101.64 67.0329C103.967 65.6839 107.207 65.1824 110.327 65.7531L125.477 68.3818C140.645 70.9932 157.019 68.5721 168.257 62.0176L177.892 56.397C178.409 56.2068 178.909 55.9647 179.322 55.7225C179.77 55.4631 180.27 55.1691 180.684 54.7541L180.822 54.6676C181.029 54.4774 181.218 54.2698 181.408 54.0623C181.942 53.457 182.287 52.8171 182.476 52.16C182.752 51.2434 182.632 50.2922 182.201 49.3756C181.701 48.3552 180.805 47.4041 179.408 46.6085",fill:"#611F69"}),n.createElement("path",{d:"M179.374 46.8182L123.84 14.6511C122.444 13.8383 120.789 13.2849 119.048 13.0255C118.049 12.8698 117.049 12.7661 115.98 12.7834C115.394 12.8007 114.791 12.8525 114.188 12.9044C112.723 13.0255 111.344 13.3541 110.086 13.821C109.431 14.0631 108.828 14.3225 108.242 14.6684C107.656 15.0143 107.225 15.4121 106.794 15.7407C106.656 15.8444 106.656 15.8963 106.518 15.9828L97.5209 21.2229C86.2831 27.7774 82.1637 37.3064 86.6968 46.1091L91.2643 54.9118C92.2639 56.7277 91.4194 58.6127 89.0925 59.9617C86.7657 61.3106 83.4564 61.7776 80.4057 61.2415L65.2554 58.6128C50.1223 56.0013 33.731 58.4225 22.476 64.977L9.63525 72.4653C8.98029 72.6902 8.37703 72.9669 7.79101 73.3127C7.20499 73.6586 6.72239 74.0045 6.32597 74.4023L5.671 74.7827L5.99848 74.7136C3.63717 77.1347 4.2749 80.2823 7.84272 82.3576L62.9285 114.265C63.0664 114.334 63.6697 114.68 63.8075 114.749C65.7724 115.735 68.1165 116.323 70.5123 116.41C70.926 116.41 71.3396 116.41 71.7533 116.41C73.3907 116.358 75.0626 116.098 76.5276 115.597L76.4587 115.683L76.9757 115.424C77.6479 115.199 78.3029 114.888 78.8544 114.576C79.406 114.265 79.9575 113.971 80.5091 113.539C80.6297 113.435 80.7676 113.349 80.871 113.228L93.2119 105.964C103.933 99.6344 108.121 90.0707 104.036 81.0778L99.4685 72.2751C98.4688 70.4592 99.3134 68.5742 101.64 67.2252C103.967 65.8763 107.207 65.3747 110.327 65.9455L125.477 68.5742C140.645 71.1856 157.019 68.7644 168.257 62.2099L177.892 56.5893C178.409 56.3991 178.909 56.157 179.322 55.9149C179.77 55.6555 180.27 55.3615 180.684 54.9464L180.822 54.8599C181.029 54.6697 181.218 54.4622 181.408 54.2546C181.942 53.6493 182.287 53.0095 182.476 52.3523C182.752 51.4357 182.632 50.4845 182.201 49.5679C181.701 48.5476 180.805 47.5964 179.408 46.8009",fill:"#611F69"}),n.createElement("path",{d:"M179.374 46.9847L123.84 14.8176C122.444 14.0048 120.789 13.4514 119.048 13.192C118.049 13.0363 117.049 12.9326 115.98 12.9499C115.394 12.9671 114.791 13.019 114.188 13.0709C112.723 13.192 111.344 13.5206 110.086 13.9875C109.431 14.2296 108.828 14.489 108.242 14.8349C107.656 15.1808 107.225 15.5786 106.794 15.9071C106.656 16.0109 106.656 16.0628 106.518 16.1493L97.5209 21.3894C86.2831 27.9438 82.1637 37.4729 86.6968 46.2756L91.2643 55.0783C92.2639 56.8942 91.4194 58.7792 89.0925 60.1282C86.7657 61.4771 83.4564 61.944 80.4057 61.4079L65.2554 58.7792C50.1223 56.1678 33.731 58.589 22.476 65.1435L9.63525 72.6318C8.98029 72.8566 8.37703 73.1333 7.79101 73.4792C7.20499 73.8251 6.72239 74.171 6.32597 74.5687L5.671 74.9492L5.99848 74.88C3.63717 77.3012 4.2749 80.4487 7.84272 82.524L62.9113 114.432C63.0492 114.501 63.6524 114.847 63.7903 114.916C65.7552 115.902 68.0993 116.49 70.4951 116.576C70.9087 116.576 71.3224 116.576 71.736 116.576C73.3734 116.524 75.0626 116.265 76.5276 115.763L76.4587 115.832L76.9757 115.573C77.6479 115.348 78.3029 115.037 78.8544 114.726C79.406 114.414 79.9575 114.12 80.5091 113.688C80.6297 113.584 80.7676 113.498 80.871 113.377L93.2119 106.113C103.933 99.7836 108.121 90.2199 104.036 81.227L99.4685 72.4243C98.4688 70.6084 99.3134 68.7233 101.64 67.3744C103.967 66.0255 107.207 65.5239 110.327 66.0946L125.477 68.7233C140.645 71.3348 157.019 68.9136 168.257 62.3591L177.892 56.7385C178.409 56.5483 178.909 56.3062 179.322 56.0641C179.77 55.8046 180.27 55.5106 180.684 55.0956L180.822 55.0091C181.029 54.8189 181.218 54.6114 181.408 54.4038C181.942 53.7985 182.287 53.1586 182.476 52.5015C182.752 51.5849 182.632 50.6337 182.201 49.7171C181.701 48.6968 180.805 47.7456 179.408 46.9501",fill:"#611F69"}),n.createElement("path",{d:"M179.374 47.1656L123.84 14.9813C122.444 14.1685 120.789 13.6151 119.048 13.3557C118.049 13.2 117.049 13.0962 115.98 13.1135C115.394 13.1308 114.791 13.1827 114.188 13.2346C112.723 13.3557 111.344 13.6842 110.086 14.1512C109.431 14.3933 108.828 14.6527 108.242 14.9986C107.656 15.3445 107.225 15.7422 106.794 16.0708C106.656 16.1746 106.656 16.2265 106.518 16.313L97.5209 21.5531C86.2831 28.1075 82.1637 37.6366 86.6968 46.4393L91.2643 55.242C92.2639 57.0579 91.4194 58.9429 89.0925 60.2919C86.7657 61.6408 83.4564 62.1077 80.4057 61.5716L65.2554 58.9429C50.1223 56.3315 33.731 58.7527 22.476 65.3071L9.63525 72.7955C8.98029 73.0203 8.37703 73.297 7.79101 73.6429C7.20499 73.9888 6.72239 74.3347 6.32597 74.7324L5.671 75.1129L5.99848 75.0437C3.63717 77.4649 4.2749 80.6124 7.84272 82.6877L62.9113 114.578C63.0319 114.647 63.6524 114.993 63.7903 115.062C65.7552 116.048 68.0993 116.636 70.4778 116.723C70.8915 116.723 71.3051 116.723 71.7188 116.723C73.3734 116.671 75.0453 116.411 76.5276 115.91L76.4759 115.979L76.993 115.719C77.6652 115.495 78.3201 115.183 78.8717 114.872C79.4232 114.561 79.9748 114.267 80.5263 113.834C80.647 113.731 80.7849 113.644 80.8883 113.523L93.2291 106.26C103.95 99.9299 108.138 90.3663 104.053 81.3734L99.4858 72.5707C98.4861 70.7548 99.3306 68.8697 101.657 67.5208C103.984 66.1719 107.225 65.6703 110.344 66.241L125.495 68.8697C140.662 71.4811 157.036 69.06 168.274 62.5055L177.909 56.8849C178.426 56.6947 178.926 56.4526 179.339 56.2105C179.788 55.951 180.287 55.657 180.701 55.242L180.839 55.1555C181.046 54.9653 181.235 54.7577 181.425 54.5502C181.959 53.9449 182.304 53.305 182.494 52.6479C182.769 51.7313 182.649 50.7801 182.218 49.8635C181.718 48.8432 180.822 47.892 179.426 47.0965",fill:"#611F69"}),n.createElement("path",{d:"M179.374 47.3352L123.84 15.1509C122.444 14.338 120.789 13.7846 119.048 13.5252C118.049 13.3696 117.049 13.2658 115.98 13.2831C115.394 13.3004 114.791 13.3523 114.188 13.4042C112.723 13.5252 111.344 13.8538 110.086 14.3207C109.431 14.5629 108.828 14.8223 108.242 15.1682C107.656 15.514 107.225 15.9118 106.794 16.2404C106.656 16.3441 106.656 16.396 106.518 16.4825L97.5209 21.7226C86.2831 28.2771 82.1637 37.8061 86.6968 46.6088L91.2643 55.4115C92.2639 57.2274 91.4194 59.1125 89.0925 60.4614C86.7657 61.8104 83.4564 62.2773 80.4057 61.7412L65.2554 59.1125C50.1223 56.5011 33.731 58.9222 22.476 65.4767L9.63525 72.9651C8.98029 73.1899 8.37703 73.4666 7.79101 73.8125C7.20499 74.1583 6.72239 74.5042 6.32597 74.902L5.671 75.2825L5.99848 75.2133C3.63717 77.6345 4.2749 80.782 7.84272 82.8573L62.894 114.748C63.0147 114.817 63.6352 115.163 63.7731 115.232C65.738 116.218 68.0648 116.806 70.4606 116.892C70.8742 116.892 71.2879 116.892 71.7016 116.892C73.3562 116.84 75.0453 116.581 76.5104 116.079L76.4587 116.148L76.9757 115.889C77.6479 115.664 78.3029 115.353 78.8544 115.042C79.406 114.73 79.9575 114.436 80.5091 114.004C80.6297 113.9 80.7676 113.814 80.871 113.693L93.2119 106.429C103.933 100.1 108.121 90.5359 104.036 81.5429L99.4685 72.7402C98.4688 70.9244 99.3134 69.0393 101.64 67.6904C103.967 66.3414 107.207 65.8399 110.327 66.4106L125.477 69.0393C140.645 71.6507 157.019 69.2295 168.257 62.6751L177.892 57.0545C178.409 56.8642 178.909 56.6221 179.322 56.38C179.77 56.1206 180.27 55.8266 180.684 55.4115L180.822 55.3251C181.029 55.1348 181.218 54.9273 181.408 54.7198C181.942 54.1145 182.287 53.4746 182.476 52.8174C182.752 51.9008 182.632 50.9497 182.201 50.0331C181.701 49.0127 180.805 48.0615 179.408 47.266",fill:"#611F69"}),n.createElement("path",{d:"M179.374 47.5017L123.84 15.3173C122.444 14.5045 120.789 13.9511 119.048 13.6917C118.049 13.536 117.049 13.4323 115.98 13.4496C115.394 13.4669 114.791 13.5187 114.188 13.5706C112.723 13.6917 111.344 14.0203 110.086 14.4872C109.431 14.7293 108.828 14.9887 108.242 15.3346C107.656 15.6805 107.225 16.0783 106.794 16.4069C106.656 16.5106 106.656 16.5625 106.518 16.649L97.5209 21.8891C86.2831 28.4436 82.1637 37.9726 86.6968 46.7753L91.2643 55.578C92.2639 57.3939 91.4194 59.279 89.0925 60.6279C86.7657 61.9768 83.4564 62.4438 80.4057 61.9077L65.2554 59.279C50.1223 56.6675 33.731 59.0887 22.476 65.6432L9.63525 73.1315C8.98029 73.3564 8.37703 73.6331 7.79101 73.9789C7.20499 74.3248 6.72239 74.6707 6.32597 75.0685L5.671 75.4489L5.99848 75.3798C3.63717 77.8009 4.2749 80.9485 7.84272 83.0238L62.894 114.914C63.0147 114.983 63.6352 115.329 63.7731 115.398C65.738 116.384 68.0648 116.972 70.4606 117.076C70.8742 117.076 71.2879 117.076 71.7016 117.076C73.3562 117.024 75.0453 116.765 76.5276 116.263L76.4759 116.332L76.993 116.09C77.6652 115.865 78.3201 115.554 78.8717 115.243C79.4232 114.931 79.9748 114.637 80.5263 114.205C80.647 114.101 80.7849 114.015 80.8883 113.894L93.2119 106.63C103.933 100.301 108.121 90.7369 104.036 81.744L99.4685 72.9413C98.4688 71.1254 99.3134 69.2404 101.64 67.8914C103.967 66.5425 107.207 66.041 110.327 66.6117L125.477 69.2404C140.645 71.8518 157.019 69.4306 168.257 62.8761L177.892 57.2555C178.409 57.0653 178.909 56.8232 179.322 56.5811C179.77 56.3217 180.27 56.0277 180.684 55.6126L180.822 55.5261C181.029 55.3359 181.218 55.1284 181.408 54.9208C181.942 54.3155 182.287 53.6757 182.476 53.0185C182.752 52.1019 182.632 51.1507 182.201 50.2341C181.701 49.2138 180.805 48.2626 179.408 47.4671",fill:"#611F69"}),n.createElement("path",{d:"M179.374 47.6821L123.84 15.4978C122.444 14.6849 120.789 14.1315 119.048 13.8721C118.049 13.7165 117.049 13.6127 115.98 13.63C115.394 13.6473 114.791 13.6992 114.188 13.7511C112.723 13.8721 111.344 14.2007 110.086 14.6676C109.431 14.9098 108.828 15.1692 108.242 15.5151C107.656 15.8609 107.225 16.2587 106.794 16.5873C106.656 16.6911 106.656 16.7429 106.518 16.8294L97.5209 22.0695C86.2831 28.624 82.1637 38.153 86.6968 46.9557L91.2643 55.7584C92.2639 57.5743 91.4194 59.4594 89.0925 60.8083C86.7657 62.1573 83.4564 62.6242 80.4057 62.0881L65.2554 59.4594C50.1223 56.848 33.731 59.2691 22.476 65.8236L9.63525 73.312C8.98029 73.5368 8.37703 73.8135 7.79101 74.1594C7.20499 74.5052 6.72239 74.8511 6.32597 75.2489L5.671 75.6294L5.99848 75.5602C3.63717 77.9814 4.2749 81.1289 7.84272 83.2042L62.8768 115.095C62.9975 115.164 63.6352 115.527 63.7558 115.579C65.7207 116.565 68.0476 117.17 70.4433 117.256C70.857 117.256 71.2707 117.256 71.6843 117.256C73.339 117.204 75.0453 116.945 76.5276 116.443L76.4759 116.513L76.993 116.271C77.6652 116.046 78.3201 115.734 78.8717 115.423C79.4232 115.112 79.9748 114.818 80.5263 114.385C80.647 114.282 80.7849 114.213 80.8883 114.091L93.2119 106.828C103.933 100.498 108.121 90.9346 104.036 81.9417L99.4685 73.139C98.4688 71.3231 99.3134 69.4381 101.64 68.0891C103.967 66.7402 107.207 66.2387 110.327 66.8094L125.477 69.4381C140.645 72.0495 157.019 69.6283 168.257 63.0738L177.892 57.4533C178.409 57.263 178.909 57.0209 179.322 56.7788C179.77 56.5194 180.27 56.2254 180.684 55.8103L180.822 55.7239C181.029 55.5336 181.218 55.3261 181.408 55.1186C181.942 54.5133 182.287 53.8734 182.476 53.2162C182.752 52.2996 182.632 51.3484 182.201 50.4319C181.701 49.4115 180.805 48.4603 179.408 47.6648",fill:"#611F69"}),n.createElement("path",{d:"M179.374 47.8516L123.84 15.6673C122.444 14.8545 120.789 14.3011 119.048 14.0417C118.049 13.886 117.049 13.7823 115.98 13.7996C115.394 13.8168 114.791 13.8687 114.188 13.9206C112.723 14.0417 111.344 14.3703 110.086 14.8372C109.431 15.0793 108.828 15.3387 108.242 15.6846C107.656 16.0305 107.225 16.4283 106.794 16.7568C106.656 16.8606 106.656 16.9125 106.518 16.999L97.5209 22.2391C86.2831 28.7935 82.1637 38.3226 86.6968 47.1253L91.2643 55.928C92.2639 57.7439 91.4194 59.6289 89.0925 60.9779C86.7657 62.3268 83.4564 62.7938 80.4057 62.2576L65.2554 59.6289C50.1223 57.0175 33.731 59.4387 22.476 65.9932L9.63525 73.4815C8.98029 73.7063 8.37703 73.983 7.79101 74.3289C7.20499 74.6748 6.72239 75.0207 6.32597 75.4185L5.671 75.7989L5.99848 75.7297C3.63717 78.1509 4.2749 81.2984 7.84272 83.3737L62.8768 115.247C62.9975 115.316 63.6352 115.679 63.7558 115.731C65.7207 116.717 68.0476 117.322 70.4433 117.409C70.857 117.409 71.2707 117.426 71.6843 117.409C73.3562 117.357 75.0453 117.115 76.5448 116.596L76.4931 116.665L77.0102 116.423C77.6824 116.198 78.3374 115.887 78.8889 115.575C79.4405 115.264 79.992 114.97 80.5436 114.538C80.6642 114.434 80.8021 114.365 80.9055 114.244L93.2291 106.98C103.95 100.651 108.138 91.0869 104.053 82.094L99.4858 73.2913C98.4861 71.4754 99.3306 69.5903 101.657 68.2414C103.984 66.8925 107.225 66.3909 110.344 66.9616L125.495 69.5903C140.662 72.2018 157.036 69.7806 168.274 63.2261L177.909 57.6055C178.426 57.4153 178.926 57.1732 179.339 56.931C179.788 56.6716 180.287 56.3776 180.701 55.9626L180.839 55.8761C181.046 55.6859 181.235 55.4783 181.425 55.2708C181.959 54.6655 182.304 54.0256 182.494 53.3685C182.769 52.4519 182.649 51.5007 182.218 50.5841C181.718 49.5638 180.822 48.6126 179.426 47.8171",fill:"#611F69"}),n.createElement("path",{d:"M179.374 48.0066L123.84 15.8396C122.444 15.0267 120.789 14.4733 119.048 14.2139C118.049 14.0583 117.049 13.9545 115.98 13.9718C115.394 13.9891 114.791 14.041 114.188 14.0929C112.723 14.2139 111.344 14.5425 110.086 15.0094C109.431 15.2516 108.828 15.511 108.242 15.8569C107.656 16.2027 107.225 16.6005 106.794 16.9291C106.656 17.0329 106.656 17.0847 106.518 17.1712L97.5209 22.4113C86.2831 28.9658 82.1637 38.4948 86.6968 47.2975L91.2643 56.1002C92.2639 57.9161 91.4194 59.8012 89.0925 61.1501C86.7657 62.4991 83.4564 62.966 80.4057 62.4299L65.2554 59.8012C50.1223 57.1898 33.731 59.6109 22.476 66.1654L9.63525 73.6537C8.98029 73.8786 8.37703 74.1553 7.79101 74.5012C7.20499 74.847 6.72239 75.1929 6.32597 75.5907L5.671 75.9712L5.99848 75.902C3.63717 78.3232 4.2749 81.4707 7.84272 83.546L62.8596 115.419C62.9802 115.488 63.618 115.851 63.7386 115.903C65.7035 116.889 68.0303 117.494 70.4089 117.581C70.8225 117.581 71.2362 117.598 71.6499 117.581C73.3217 117.546 75.0281 117.287 76.5104 116.768L76.4587 116.837L76.9757 116.595C77.6479 116.37 78.3029 116.059 78.8544 115.748C79.406 115.436 79.9575 115.142 80.5091 114.71C80.6297 114.606 80.7676 114.537 80.871 114.416L93.1947 107.152C103.915 100.823 108.104 91.2591 104.019 82.2662L99.4513 73.4635C98.4516 71.6476 99.2962 69.7626 101.623 68.4136C103.95 67.0647 107.19 66.5632 110.31 67.1339L125.46 69.7626C140.628 72.374 157.002 69.9528 168.24 63.3983L177.874 57.7778C178.392 57.5875 178.891 57.3454 179.305 57.1033C179.753 56.8439 180.253 56.5499 180.667 56.1348L180.805 56.0484C181.011 55.8581 181.201 55.6506 181.391 55.4431C181.925 54.8378 182.27 54.1979 182.459 53.5407C182.735 52.6241 182.614 51.6729 182.183 50.7564C181.684 49.736 180.787 48.7848 179.391 47.9893",fill:"#611F69"}),n.createElement("path",{d:"M179.374 48.1843L123.84 16.0173C122.444 15.2045 120.789 14.6511 119.048 14.3916C118.049 14.236 117.049 14.1322 115.98 14.1495C115.394 14.1668 114.791 14.2187 114.188 14.2706C112.723 14.3916 111.344 14.7202 110.086 15.1872C109.431 15.4293 108.828 15.6887 108.242 16.0346C107.656 16.3805 107.225 16.7782 106.794 17.1068C106.656 17.2106 106.656 17.2625 106.518 17.3489L97.5209 22.5891C86.2831 29.1435 82.1637 38.6726 86.6968 47.4753L91.2643 56.278C92.2639 58.0939 91.4194 59.9789 89.0925 61.3278C86.7657 62.6768 83.4564 63.1437 80.4057 62.6076L65.2554 59.9789C50.1223 57.3675 33.731 59.7887 22.476 66.3431L9.63525 73.8315C8.98029 74.0563 8.37703 74.333 7.79101 74.6789C7.20499 75.0248 6.72239 75.3707 6.32597 75.7684L5.671 76.1489L5.99848 76.0797C3.63717 78.5009 4.2749 81.6484 7.84272 83.7237L62.8596 115.597C62.963 115.666 63.6179 116.029 63.7386 116.081C65.7035 117.067 68.0303 117.672 70.4089 117.776C70.8225 117.776 71.2362 117.793 71.6499 117.776C73.3217 117.741 75.0281 117.482 76.5276 116.963L76.4759 117.032L76.993 116.79C77.6652 116.565 78.3201 116.254 78.8717 115.943C79.4232 115.631 79.9748 115.337 80.5263 114.905C80.647 114.801 80.7849 114.732 80.8883 114.611L93.2119 107.347C103.933 101.018 108.121 91.4542 104.036 82.4612L99.4685 73.6585C98.4688 71.8427 99.3134 69.9576 101.64 68.6087C103.967 67.2597 107.207 66.7582 110.327 67.3289L125.477 69.9576C140.645 72.569 157.019 70.1478 168.257 63.5934L177.892 57.9728C178.409 57.7826 178.909 57.5404 179.322 57.2983C179.77 57.0389 180.27 56.7449 180.684 56.3298L180.822 56.2434C181.029 56.0531 181.218 55.8456 181.408 55.6381C181.942 55.0328 182.287 54.3929 182.476 53.7357C182.752 52.8191 182.632 51.868 182.201 50.9514C181.701 49.931 180.805 48.9799 179.408 48.1843",fill:"#611F69"}),n.createElement("path",{d:"M179.374 48.3453L123.84 16.1783C122.444 15.3655 120.789 14.812 119.048 14.5526C118.049 14.397 117.049 14.2932 115.98 14.3105C115.394 14.3278 114.791 14.3797 114.188 14.4316C112.723 14.5526 111.344 14.8812 110.086 15.3482C109.431 15.5903 108.828 15.8497 108.242 16.1956C107.656 16.5415 107.225 16.9392 106.794 17.2678C106.656 17.3716 106.656 17.4235 106.518 17.5099L97.5209 22.75C86.2831 29.3045 82.1637 38.8336 86.6968 47.6363L91.2643 56.439C92.2639 58.2548 91.4194 60.1399 89.0925 61.4888C86.7657 62.8378 83.4564 63.3047 80.4057 62.7686L65.2554 60.1399C50.1223 57.5285 33.731 59.9497 22.476 66.5041L9.63525 73.9925C8.98029 74.2173 8.37703 74.494 7.79101 74.8399C7.20499 75.1858 6.72239 75.5317 6.32597 75.9294L5.671 76.3099L5.99848 76.2407C3.63717 78.6619 4.2749 81.8094 7.84272 83.8847L62.8423 115.74C62.9457 115.81 63.6007 116.173 63.7214 116.225C65.669 117.21 67.9959 117.816 70.3916 117.92C70.8053 117.92 71.219 117.937 71.6326 117.92C73.3045 117.885 75.0281 117.626 76.5276 117.107L76.4759 117.176L76.993 116.934C77.6652 116.709 78.3201 116.398 78.8717 116.086C79.4232 115.775 79.9748 115.481 80.5263 115.049C80.647 114.945 80.7849 114.876 80.8883 114.755L93.2119 107.491C103.933 101.162 108.121 91.5979 104.036 82.605L99.4685 73.8022C98.4688 71.9864 99.3134 70.1013 101.64 68.7524C103.967 67.4034 107.207 66.9019 110.327 67.4726L125.477 70.1013C140.645 72.7127 157.019 70.2915 168.257 63.7371L177.892 58.1165C178.409 57.9263 178.909 57.6841 179.322 57.442C179.77 57.1826 180.27 56.8886 180.684 56.4736L180.822 56.3871C181.029 56.1968 181.218 55.9893 181.408 55.7818C181.942 55.1765 182.287 54.5366 182.476 53.8794C182.752 52.9628 182.632 52.0117 182.201 51.0951C181.701 50.0747 180.805 49.1236 179.408 48.328",fill:"#611F69"}),n.createElement("path",{d:"M179.374 48.5316L123.84 16.3646C122.444 15.5518 120.789 14.9983 119.048 14.7389C118.049 14.5833 117.049 14.4795 115.98 14.4968C115.394 14.5141 114.791 14.566 114.188 14.6179C112.723 14.7389 111.344 15.0675 110.086 15.5345C109.431 15.7766 108.828 16.036 108.242 16.3819C107.656 16.7278 107.225 17.1255 106.794 17.4541C106.656 17.5579 106.656 17.6097 106.518 17.6962L97.5209 22.9363C86.2831 29.4908 82.1637 39.0199 86.6968 47.8226L91.2643 56.6253C92.2639 58.4411 91.4194 60.3262 89.0925 61.6751C86.7657 63.0241 83.4564 63.491 80.4057 62.9549L65.2554 60.3262C50.1223 57.7148 33.731 60.136 22.476 66.6904L9.63525 74.1788C8.98029 74.4036 8.37703 74.6803 7.79101 75.0262C7.20499 75.3721 6.72239 75.7179 6.32597 76.1157L5.671 76.4962L5.99848 76.427C3.63717 78.8482 4.2749 81.9957 7.84272 84.071L62.8423 115.927C62.9457 115.996 63.6007 116.359 63.7214 116.411C65.669 117.397 67.9959 118.002 70.3916 118.106C70.8053 118.106 71.219 118.123 71.6326 118.106C73.3045 118.071 75.0281 117.812 76.5276 117.293L76.4759 117.362L76.993 117.12C77.6652 116.895 78.3201 116.584 78.8717 116.273C79.4232 115.961 79.9748 115.667 80.5263 115.235C80.647 115.131 80.8021 115.062 80.8883 114.941L93.2119 107.677C103.933 101.348 108.121 91.7842 104.036 82.7912L99.4685 73.9885C98.4688 72.1727 99.3134 70.2876 101.64 68.9387C103.967 67.5897 107.207 67.0882 110.327 67.6589L125.477 70.2876C140.645 72.899 157.019 70.4778 168.257 63.9234L177.892 58.3028C178.409 58.1125 178.909 57.8704 179.322 57.6283C179.77 57.3689 180.27 57.0749 180.684 56.6598L180.822 56.5734C181.029 56.3831 181.218 56.1756 181.408 55.9681C181.942 55.3628 182.287 54.7229 182.476 54.0657C182.752 53.1491 182.632 52.198 182.201 51.2814C181.701 50.261 180.805 49.3098 179.408 48.5143",fill:"#611F69"}),n.createElement("path",{d:"M179.374 48.7039L123.84 16.5368C122.444 15.724 120.789 15.1706 119.048 14.9112C118.049 14.7555 117.049 14.6518 115.98 14.6691C115.394 14.6863 114.791 14.7382 114.188 14.7901C112.723 14.9112 111.344 15.2398 110.086 15.7067C109.431 15.9488 108.828 16.2082 108.242 16.5541C107.656 16.9 107.225 17.2978 106.794 17.6263C106.656 17.7301 106.656 17.782 106.518 17.8685L97.5209 23.1086C86.2831 29.663 82.1637 39.1921 86.6968 47.9948L91.2643 56.7975C92.2639 58.6134 91.4194 60.4984 89.0925 61.8474C86.7657 63.1963 83.4564 63.6633 80.4057 63.1271L65.2554 60.4984C50.1223 57.887 33.731 60.3082 22.476 66.8627L9.63525 74.351C8.98029 74.5758 8.37703 74.8525 7.79101 75.1984C7.20499 75.5443 6.72239 75.8902 6.32597 76.288L5.671 76.6684L5.99848 76.5993C3.63717 79.0204 4.2749 82.168 7.84272 84.2432L62.8251 116.099C62.9285 116.151 63.6007 116.531 63.7041 116.583C65.6518 117.569 67.9786 118.174 70.3572 118.278C70.7708 118.278 71.1845 118.295 71.5982 118.278C73.2873 118.243 75.0108 117.984 76.5104 117.465L76.4587 117.534L76.9585 117.292C77.6307 117.067 78.2857 116.756 78.8372 116.445C79.3888 116.134 79.9403 115.84 80.4919 115.407C80.6125 115.303 80.7676 115.234 80.8538 115.113L93.1774 107.85C103.898 101.52 108.086 91.9564 104.002 82.9635L99.4341 74.1608C98.4344 72.3449 99.2789 70.4598 101.606 69.1109C103.933 67.762 107.173 67.2604 110.293 67.8311L125.443 70.4598C140.611 73.0713 156.985 70.6501 168.222 64.0956L177.857 58.475C178.374 58.2848 178.874 58.0427 179.288 57.8006C179.736 57.5411 180.236 57.2471 180.649 56.8321L180.787 56.7456C180.994 56.5554 181.184 56.3479 181.373 56.1403C181.908 55.535 182.252 54.8951 182.442 54.238C182.718 53.3214 182.597 52.3702 182.166 51.4536C181.666 50.4333 180.77 49.4821 179.374 48.6866",fill:"#611F69"}),n.createElement("path",{d:"M179.374 48.8703L123.84 16.7033C122.444 15.8905 120.789 15.3371 119.048 15.0777C118.049 14.922 117.049 14.8182 115.98 14.8355C115.394 14.8528 114.791 14.9047 114.188 14.9566C112.723 15.0777 111.344 15.4062 110.086 15.8732C109.431 16.1153 108.828 16.3747 108.242 16.7206C107.656 17.0665 107.225 17.4642 106.794 17.7928C106.656 17.8966 106.656 17.9485 106.518 18.0349L97.5209 23.2751C86.2831 29.8295 82.1637 39.3586 86.6968 48.1613L91.2643 56.964C92.2639 58.7799 91.4194 60.6649 89.0925 62.0139C86.7657 63.3628 83.4564 63.8297 80.4057 63.2936L65.2554 60.6649C50.1223 58.0535 33.731 60.4747 22.476 67.0291L9.63525 74.5175C8.98029 74.7423 8.37703 75.019 7.79101 75.3649C7.20499 75.7108 6.72239 76.0567 6.32597 76.4544L5.671 76.8349L5.99848 76.7657C3.63717 79.1869 4.2749 82.3344 7.84272 84.4097L62.8251 116.248C62.9285 116.3 63.6007 116.681 63.7041 116.732C65.6518 117.718 67.9786 118.341 70.3572 118.427C70.7708 118.427 71.1845 118.445 71.5982 118.427C73.2873 118.393 75.0109 118.133 76.5276 117.614L76.4759 117.666L76.9757 117.424C77.6479 117.199 78.3029 116.888 78.8544 116.577C79.406 116.265 79.9575 115.971 80.5091 115.539C80.6297 115.435 80.7849 115.366 80.871 115.245L93.1947 107.982C103.915 101.652 108.104 92.0883 104.019 83.0954L99.4513 74.2927C98.4516 72.4768 99.2962 70.5917 101.623 69.2428C103.95 67.8939 107.19 67.3923 110.31 67.963L125.46 70.5917C140.628 73.2031 157.002 70.782 168.24 64.2275L177.874 58.6069C178.392 58.4167 178.891 58.1746 179.305 57.9324C179.753 57.673 180.253 57.379 180.667 56.964L180.805 56.8775C181.011 56.6873 181.201 56.4797 181.391 56.2722C181.925 55.6669 182.27 55.027 182.459 54.3699C182.735 53.4533 182.614 52.5021 182.183 51.5855C181.684 50.5652 180.787 49.614 179.391 48.8185",fill:"#611F69"}),n.createElement("path",{d:"M179.374 49.0401L123.84 16.8557C122.444 16.0429 120.789 15.4895 119.048 15.2301C118.049 15.0744 117.049 14.9707 115.98 14.988C115.394 15.0053 114.791 15.0571 114.188 15.109C112.723 15.2301 111.344 15.5587 110.086 16.0256C109.431 16.2677 108.828 16.5271 108.242 16.873C107.656 17.2189 107.225 17.6167 106.794 17.9453C106.656 18.049 106.656 18.1009 106.518 18.1874L97.5209 23.4275C86.2831 29.982 82.1637 39.511 86.6968 48.3137L91.2643 57.1164C92.2639 58.9323 91.4194 60.8174 89.0925 62.1663C86.7657 63.5152 83.4564 63.9822 80.4057 63.4461L65.2554 60.8174C50.1223 58.2059 33.731 60.6271 22.476 67.1816L9.63525 74.6699C8.98029 74.8948 8.37703 75.1715 7.79101 75.5173C7.20499 75.8632 6.72239 76.2091 6.32597 76.6069L5.671 76.9873L5.99848 76.9182C3.63717 79.3393 4.2749 82.4869 7.84272 84.5622L62.8079 116.401C62.9113 116.452 63.5835 116.833 63.6869 116.885C65.6345 117.871 67.9614 118.493 70.3399 118.597C70.7536 118.614 71.1673 118.614 71.5809 118.597C73.27 118.562 75.0109 118.303 76.5276 117.784L76.4759 117.836L76.9757 117.594C77.6479 117.369 78.3029 117.058 78.8544 116.746C79.406 116.435 79.9575 116.141 80.5091 115.709C80.6297 115.605 80.7849 115.536 80.871 115.415L93.1947 108.151C103.915 101.822 108.104 92.258 104.019 83.2651L99.4513 74.4624C98.4516 72.6465 99.2962 70.7615 101.623 69.4125C103.95 68.0636 107.19 67.5621 110.31 68.1328L125.46 70.7615C140.628 73.3729 157.002 70.9517 168.24 64.3972L177.874 58.7767C178.392 58.5864 178.891 58.3443 179.305 58.1022C179.753 57.8428 180.253 57.5488 180.667 57.1337L180.805 57.0472C181.011 56.857 181.201 56.6495 181.391 56.4419C181.925 55.8367 182.27 55.1968 182.459 54.5396C182.735 53.623 182.614 52.6718 182.183 51.7552C181.684 50.7349 180.787 49.7837 179.391 48.9882",fill:"#611F69"}),n.createElement("path",{d:"M179.374 49.2205L123.84 17.0362C122.444 16.2233 120.789 15.6699 119.048 15.4105C118.049 15.2549 117.049 15.1511 115.98 15.1684C115.394 15.1857 114.791 15.2376 114.188 15.2895C112.723 15.4105 111.344 15.7391 110.086 16.206C109.431 16.4482 108.828 16.7076 108.242 17.0535C107.656 17.3993 107.225 17.7971 106.794 18.1257C106.656 18.2295 106.656 18.2813 106.518 18.3678L97.5209 23.6079C86.2831 30.1624 82.1637 39.6914 86.6968 48.4941L91.2643 57.2968C92.2639 59.1127 91.4194 60.9978 89.0925 62.3467C86.7657 63.6957 83.4564 64.1626 80.4057 63.6265L65.2554 60.9978C50.1223 58.3864 33.731 60.8075 22.476 67.362L9.63525 74.8504C8.98029 75.0752 8.37703 75.3519 7.79101 75.6978C7.20499 76.0437 6.72239 76.3895 6.32597 76.7873L5.671 77.1678L5.99848 77.0986C3.63717 79.5198 4.2749 82.6673 7.84272 84.7426L62.8079 116.581C62.9113 116.633 63.5835 117.031 63.6869 117.065C65.6345 118.051 67.9614 118.674 70.3399 118.777C70.7536 118.795 71.1673 118.795 71.5809 118.777C73.27 118.743 75.0109 118.483 76.5276 117.965L76.4759 118.016L76.9757 117.774C77.6479 117.55 78.3029 117.238 78.8544 116.927C79.406 116.616 79.9575 116.322 80.5091 115.889C80.6297 115.786 80.7849 115.716 80.871 115.595L93.1947 108.314C103.915 101.985 108.104 92.4212 104.019 83.4282L99.4513 74.6255C98.4516 72.8097 99.2962 70.9246 101.623 69.5757C103.95 68.2267 107.19 67.7252 110.31 68.2959L125.46 70.9246C140.628 73.536 157.002 71.1148 168.24 64.5604L177.874 58.9398C178.392 58.7495 178.891 58.5074 179.305 58.2653C179.753 58.0059 180.253 57.7119 180.667 57.2968L180.805 57.2104C181.011 57.0201 181.201 56.8126 181.391 56.6051C181.925 55.9998 182.27 55.3599 182.459 54.7027C182.735 53.7861 182.614 52.835 182.183 51.9184C181.684 50.898 180.787 49.9468 179.391 49.1513",fill:"#611F69"}),n.createElement("path",{d:"M179.374 49.3873L123.84 17.203C122.444 16.3902 120.789 15.8368 119.048 15.5774C118.049 15.4217 117.049 15.318 115.98 15.3353C115.394 15.3525 114.791 15.4044 114.188 15.4563C112.723 15.5774 111.344 15.906 110.086 16.3729C109.431 16.615 108.828 16.8744 108.242 17.2203C107.656 17.5662 107.225 17.964 106.794 18.2925C106.656 18.3963 106.656 18.4482 106.518 18.5347L97.5209 23.7748C86.2831 30.3292 82.1637 39.8583 86.6968 48.661L91.2643 57.4637C92.2639 59.2796 91.4194 61.1646 89.0925 62.5136C86.7657 63.8625 83.4564 64.3295 80.4057 63.7933L65.2554 61.1646C50.1223 58.5532 33.731 60.9744 22.476 67.5289L9.63525 75.0172C8.98029 75.242 8.37703 75.5187 7.79101 75.8646C7.20499 76.2105 6.72239 76.5564 6.32597 76.9542L5.671 77.3346L5.99848 77.2655C3.63717 79.6866 4.2749 82.8342 7.84272 84.9094L62.7906 116.748C62.8768 116.8 63.5662 117.198 63.6697 117.232C65.6173 118.218 67.9269 118.84 70.3227 118.944C70.7364 118.962 71.15 118.962 71.5637 118.944C73.27 118.91 75.0109 118.65 76.5276 118.131L76.4931 118.183L76.993 117.958C77.6652 117.734 78.3201 117.422 78.8717 117.111C79.4232 116.8 79.9748 116.506 80.5263 116.073C80.647 115.97 80.8021 115.9 80.8883 115.779L93.2119 108.499C103.933 102.169 108.121 92.6053 104.036 83.6124L99.4685 74.8097C98.4688 72.9938 99.3134 71.1087 101.64 69.7598C103.967 68.4109 107.207 67.9093 110.327 68.48L125.477 71.1087C140.645 73.7202 157.019 71.299 168.257 64.7445L177.892 59.1239C178.409 58.9337 178.909 58.6916 179.322 58.4495C179.77 58.19 180.27 57.8961 180.684 57.481L180.822 57.3945C181.029 57.2043 181.218 56.9968 181.408 56.7892C181.942 56.1839 182.287 55.5441 182.476 54.8869C182.752 53.9703 182.632 53.0191 182.201 52.1025C181.701 51.0822 180.805 50.131 179.408 49.3355",fill:"#611F69"}),n.createElement("path",{d:"M179.374 49.5623L123.84 17.378C122.444 16.5651 120.789 16.0117 119.048 15.7523C118.049 15.5967 117.049 15.4929 115.98 15.5102C115.394 15.5275 114.791 15.5794 114.188 15.6312C112.723 15.7523 111.344 16.0809 110.086 16.5478C109.431 16.79 108.828 17.0494 108.242 17.3952C107.656 17.7411 107.225 18.1389 106.794 18.4675C106.656 18.5712 106.656 18.6231 106.518 18.7096L97.5209 23.9497C86.2831 30.5042 82.1637 40.0332 86.6968 48.8359L91.2643 57.6386C92.2639 59.4545 91.4194 61.3396 89.0925 62.6885C86.7657 64.0374 83.4564 64.5044 80.4057 63.9683L65.2554 61.3396C50.1223 58.7282 33.731 61.1493 22.476 67.7038L9.63525 75.1921C8.98029 75.417 8.37703 75.6937 7.79101 76.0396C7.20499 76.3854 6.72239 76.7313 6.32597 77.1291L5.671 77.5095L5.99848 77.4404C3.63717 79.8615 4.2749 83.0091 7.84272 85.0844L62.7906 116.906C62.8768 116.957 63.5662 117.355 63.6697 117.407C65.6173 118.393 67.9269 119.015 70.3055 119.119C70.7191 119.136 71.1328 119.136 71.5464 119.119C73.2528 119.085 74.9936 118.825 76.5276 118.306L76.4931 118.358L76.993 118.133C77.6652 117.909 78.3201 117.597 78.8717 117.286C79.4232 116.975 79.9748 116.681 80.5263 116.248C80.647 116.145 80.8021 116.075 80.8883 115.954L93.2119 108.674C103.933 102.344 108.121 92.7802 104.036 83.7873L99.4685 74.9846C98.4688 73.1687 99.3134 71.2837 101.64 69.9347C103.967 68.5858 107.207 68.0843 110.327 68.655L125.477 71.2837C140.645 73.8951 157.019 71.4739 168.257 64.9194L177.892 59.2989C178.409 59.1086 178.909 58.8665 179.322 58.6244C179.77 58.365 180.27 58.071 180.684 57.6559L180.822 57.5695C181.029 57.3792 181.218 57.1717 181.408 56.9642C181.942 56.3589 182.287 55.719 182.476 55.0618C182.752 54.1452 182.632 53.194 182.201 52.2775C181.701 51.2571 180.805 50.3059 179.408 49.5104",fill:"#611F69"}),n.createElement("path",{d:"M179.374 49.7455L123.84 17.5612C122.444 16.7484 120.789 16.1949 119.048 15.9355C118.049 15.7799 117.049 15.6761 115.98 15.6934C115.394 15.7107 114.791 15.7626 114.188 15.8145C112.723 15.9355 111.344 16.2641 110.086 16.7311C109.431 16.9732 108.828 17.2326 108.242 17.5785C107.656 17.9244 107.225 18.3221 106.794 18.6507C106.656 18.7545 106.656 18.8064 106.518 18.8928L97.5209 24.1329C86.2831 30.6874 82.1637 40.2165 86.6968 49.0192L91.2643 57.8219C92.2639 59.6377 91.4194 61.5228 89.0925 62.8717C86.7657 64.2207 83.4564 64.6876 80.4057 64.1515L65.2554 61.5228C50.1223 58.9114 33.731 61.3326 22.476 67.887L9.63525 75.3754C8.98029 75.6002 8.37703 75.8769 7.79101 76.2228C7.20499 76.5687 6.72239 76.9145 6.32597 77.3123L5.671 77.6928L5.99848 77.6236C3.63717 80.0448 4.2749 83.1923 7.84272 85.2676L62.7734 117.089C62.8596 117.141 63.5662 117.538 63.6524 117.59C65.6001 118.576 67.9097 119.199 70.2882 119.32C70.7019 119.337 71.1155 119.337 71.5292 119.32C73.2356 119.285 74.9936 119.026 76.5104 118.507L76.4759 118.559L76.9757 118.334C77.6479 118.109 78.3029 117.798 78.8544 117.487C79.406 117.175 79.9575 116.881 80.5091 116.449C80.6297 116.345 80.7849 116.276 80.8883 116.155L93.2119 108.874C103.933 102.544 108.121 92.9808 104.036 83.9878L99.4685 75.1851C98.4688 73.3693 99.3134 71.4842 101.64 70.1353C103.967 68.7863 107.207 68.2848 110.327 68.8555L125.477 71.4842C140.645 74.0956 157.019 71.6744 168.257 65.12L177.892 59.4994C178.409 59.3092 178.909 59.067 179.322 58.8249C179.77 58.5655 180.27 58.2715 180.684 57.8564L180.822 57.77C181.029 57.5797 181.218 57.3722 181.408 57.1647C181.942 56.5594 182.287 55.9195 182.476 55.2623C182.752 54.3457 182.632 53.3946 182.201 52.478C181.701 51.4576 180.805 50.5064 179.408 49.7109",fill:"#611F69"}),n.createElement("path",{d:"M179.374 49.8919L123.84 17.7249C122.444 16.912 120.789 16.3586 119.048 16.0992C118.049 15.9436 117.049 15.8398 115.98 15.8571C115.394 15.8744 114.791 15.9263 114.188 15.9782C112.723 16.0992 111.344 16.4278 110.086 16.8947C109.431 17.1369 108.828 17.3963 108.242 17.7422C107.656 18.088 107.225 18.4858 106.794 18.8144C106.656 18.9182 106.656 18.97 106.518 19.0565L97.5209 24.2966C86.2831 30.8511 82.1637 40.3801 86.6968 49.1828L91.2643 57.9855C92.2639 59.8014 91.4194 61.6865 89.0925 63.0354C86.7657 64.3844 83.4564 64.8513 80.4057 64.3152L65.2554 61.6865C50.1223 59.0751 33.731 61.4962 22.476 68.0507L9.63525 75.5391C8.98029 75.7639 8.37703 76.0406 7.79101 76.3865C7.20499 76.7323 6.72239 77.0782 6.32597 77.476L5.671 77.8565L5.99848 77.7873C3.63717 80.2085 4.2749 83.356 7.84272 85.4313L62.7734 117.252C62.7734 117.252 63.5662 117.702 63.6524 117.754C65.6001 118.74 67.9097 119.38 70.2882 119.483C70.7019 119.501 71.1155 119.501 71.5292 119.483C73.2356 119.449 74.9936 119.189 76.5276 118.671L76.4931 118.722L76.993 118.498C77.6652 118.273 78.3201 117.961 78.8717 117.65C79.4232 117.339 79.9748 117.045 80.5263 116.613C80.647 116.509 80.8021 116.44 80.9055 116.319L93.2291 109.038C103.95 102.708 108.138 93.1445 104.053 84.1515L99.4858 75.3488C98.4861 73.5329 99.3306 71.6479 101.657 70.2989C103.984 68.95 107.225 68.4485 110.344 69.0192L125.495 71.6479C140.662 74.2593 157.036 71.8381 168.274 65.2837L177.909 59.6631C178.426 59.4728 178.926 59.2307 179.339 58.9886C179.788 58.7292 180.287 58.4352 180.701 58.0201L180.839 57.9337C181.046 57.7434 181.235 57.5359 181.425 57.3284C181.959 56.7231 182.304 56.0832 182.494 55.426C182.769 54.5094 182.649 53.5583 182.218 52.6417C181.718 51.6213 180.822 50.6701 179.426 49.8746",fill:"#611F69"}),n.createElement("path",{d:"M179.374 50.0615L123.84 17.8944C122.444 17.0816 120.789 16.5282 119.048 16.2688C118.049 16.1131 117.049 16.0094 115.98 16.0267C115.394 16.0439 114.791 16.0958 114.188 16.1477C112.723 16.2688 111.344 16.5974 110.086 17.0643C109.431 17.3064 108.828 17.5658 108.242 17.9117C107.656 18.2576 107.225 18.6554 106.794 18.9839C106.656 19.0877 106.656 19.1396 106.518 19.2261L97.5209 24.4662C86.2831 31.0206 82.1637 40.5497 86.6968 49.3524L91.2643 58.1551C92.2639 59.971 91.4194 61.856 89.0925 63.205C86.7657 64.5539 83.4564 65.0209 80.4057 64.4847L65.2554 61.856C50.1223 59.2446 33.731 61.6658 22.476 68.2203L9.63525 75.7086C8.98029 75.9334 8.37703 76.2101 7.79101 76.556C7.20499 76.9019 6.72239 77.2478 6.32597 77.6456L5.671 78.026L5.99848 77.9568C3.63717 80.378 4.2749 83.5255 7.84272 85.6008L62.7562 117.405C62.7562 117.405 63.549 117.854 63.6352 117.906C65.5828 118.892 67.8924 119.532 70.271 119.636C70.6846 119.653 71.0983 119.653 71.512 119.636C73.2356 119.601 74.9936 119.342 76.5276 118.823L76.4931 118.875L76.993 118.65C77.6652 118.425 78.3201 118.114 78.8717 117.802C79.4232 117.491 79.9748 117.197 80.5263 116.765C80.647 116.661 80.8021 116.592 80.9055 116.471L93.2291 109.19C103.95 102.86 108.138 93.2967 104.053 84.3038L99.4858 75.5011C98.4861 73.6852 99.3306 71.8001 101.657 70.4512C103.984 69.1023 107.225 68.6007 110.344 69.1714L125.495 71.8001C140.662 74.4116 157.036 71.9904 168.274 65.4359L177.909 59.8153C178.426 59.6251 178.926 59.383 179.339 59.1409C179.788 58.8814 180.287 58.5874 180.701 58.1724L180.839 58.0859C181.046 57.8957 181.235 57.6882 181.425 57.4806C181.959 56.8753 182.304 56.2354 182.494 55.5783C182.769 54.6617 182.649 53.7105 182.218 52.7939C181.718 51.7736 180.822 50.8224 179.426 50.0269",fill:"#611F69"}),n.createElement("path",{d:"M179.374 50.2365L123.84 18.0695C122.444 17.2566 120.789 16.7032 119.048 16.4438C118.049 16.2882 117.049 16.1844 115.98 16.2017C115.394 16.219 114.791 16.2709 114.188 16.3227C112.723 16.4438 111.344 16.7724 110.086 17.2393C109.431 17.4815 108.828 17.7409 108.242 18.0867C107.656 18.4326 107.225 18.8304 106.794 19.159C106.656 19.2627 106.656 19.3146 106.518 19.4011L97.5209 24.6412C86.2831 31.1957 82.1637 40.7247 86.6968 49.5274L91.2643 58.3301C92.264 60.146 91.4194 62.0311 89.0926 63.38C86.7657 64.7289 83.4564 65.1959 80.4057 64.6598L65.2554 62.0311C50.1223 59.4197 33.731 61.8408 22.476 68.3953L9.63525 75.8836C8.98029 76.1085 8.37703 76.3852 7.79101 76.7311C7.20499 77.0769 6.72239 77.4228 6.32597 77.8206L5.671 78.2011L5.99848 78.1319C3.63717 80.5531 4.2749 83.7006 7.84272 85.7759L62.7562 117.58C62.7562 117.58 63.549 118.029 63.6352 118.081C65.5828 119.067 67.8925 119.707 70.271 119.811C70.6847 119.828 71.0983 119.828 71.512 119.828C73.2356 119.793 74.9936 119.534 76.5448 119.015L76.5104 119.067L77.0102 118.842C77.6824 118.617 78.3374 118.306 78.8889 117.995C79.4405 117.684 79.992 117.389 80.5436 116.957C80.6642 116.853 80.8193 116.784 80.9228 116.663L93.2464 109.382C103.967 103.053 108.155 93.489 104.071 84.4961L99.503 75.6934C98.5033 73.8775 99.3479 71.9925 101.675 70.6435C104.002 69.2946 107.242 68.7931 110.362 69.3638L125.512 71.9925C140.679 74.6039 157.054 72.1827 168.291 65.6282L177.926 60.0077C178.443 59.8174 178.943 59.5753 179.357 59.3332C179.805 59.0738 180.305 58.7798 180.718 58.3647L180.856 58.2782C181.063 58.088 181.253 57.8805 181.442 57.6729C181.977 57.0677 182.321 56.4278 182.511 55.7706C182.787 54.854 182.666 53.9028 182.235 52.9862C181.735 51.9659 180.839 51.0147 179.443 50.2192",fill:"#611F69"}),n.createElement("path",{d:"M179.374 50.4114L123.84 18.2444C122.444 17.4316 120.789 16.8782 119.048 16.6187C118.049 16.4631 117.049 16.3593 115.98 16.3766C115.394 16.3939 114.791 16.4458 114.188 16.4977C112.723 16.6187 111.344 16.9473 110.086 17.4143C109.431 17.6564 108.828 17.9158 108.242 18.2617C107.656 18.6076 107.225 19.0053 106.794 19.3339C106.656 19.4377 106.656 19.4896 106.518 19.576L97.5209 24.8162C86.2831 31.3706 82.1637 40.8997 86.6968 49.7024L91.2643 58.5051C92.2639 60.321 91.4194 62.206 89.0925 63.555C86.7657 64.9039 83.4564 65.3708 80.4057 64.8347L65.2554 62.206C50.1223 59.5946 33.731 62.0158 22.476 68.5702L9.63525 76.0586C8.98029 76.2834 8.37703 76.5601 7.79101 76.906C7.20499 77.2519 6.72239 77.5978 6.32597 77.9955L5.671 78.376L5.99848 78.3068C3.63717 80.728 4.2749 83.8755 7.84272 85.9508L62.7389 117.755C62.7389 117.755 63.5318 118.204 63.6179 118.256C65.5656 119.242 67.858 119.882 70.2365 120.003C70.6502 120.02 71.0638 120.02 71.4775 120.02C73.2011 119.986 74.9764 119.726 76.5104 119.207L76.4759 119.259L76.9757 119.034C77.6479 118.81 78.3029 118.498 78.8544 118.187C79.406 117.876 79.9575 117.582 80.5091 117.149C80.6297 117.046 80.7849 116.976 80.8883 116.855L93.2119 109.575C103.933 103.245 108.121 93.6813 104.036 84.6884L99.4685 75.8857C98.4688 74.0698 99.3134 72.1847 101.64 70.8358C103.967 69.4868 107.207 68.9853 110.327 69.556L125.477 72.1847C140.645 74.7961 157.019 72.3749 168.257 65.8205L177.892 60.1999C178.409 60.0097 178.909 59.7675 179.322 59.5254C179.77 59.266 180.27 58.972 180.684 58.557L180.822 58.4705C181.029 58.2803 181.218 58.0727 181.408 57.8652C181.942 57.2599 182.287 56.62 182.476 55.9628C182.752 55.0463 182.632 54.0951 182.201 53.1785C181.701 52.1581 180.805 51.207 179.408 50.4114",fill:"#611F69"}),n.createElement("path",{d:"M179.374 50.5865L123.84 18.4194C122.444 17.6066 120.789 17.0532 119.048 16.7938C118.049 16.6381 117.049 16.5344 115.98 16.5517C115.394 16.569 114.791 16.6208 114.188 16.6727C112.723 16.7938 111.344 17.1224 110.086 17.5893C109.431 17.8314 108.828 18.0908 108.242 18.4367C107.656 18.7826 107.225 19.1804 106.794 19.509C106.656 19.6127 106.656 19.6646 106.518 19.7511L97.5209 24.9912C86.2831 31.5457 82.1637 41.0747 86.6968 49.8774L91.2643 58.6801C92.2639 60.496 91.4194 62.381 89.0925 63.73C86.7657 65.0789 83.4564 65.5459 80.4057 65.0098L65.2554 62.381C50.1223 59.7696 33.731 62.1908 22.476 68.7453L9.63525 76.2336C8.98029 76.4585 8.37703 76.7352 7.79101 77.081C7.20499 77.4269 6.72239 77.7728 6.32597 78.1706L5.671 78.551L5.99848 78.4819C3.63717 80.903 4.2749 84.0506 7.84272 86.1259L62.7217 117.93C62.7217 117.93 63.5318 118.379 63.6007 118.431C65.5484 119.417 67.8407 120.057 70.2193 120.178C70.6329 120.195 71.0466 120.213 71.4603 120.195C73.1838 120.161 74.9591 119.901 76.5104 119.382L76.4759 119.417L76.9757 119.192C77.6479 118.967 78.3029 118.656 78.8544 118.345C79.406 118.033 79.9575 117.739 80.5091 117.307C80.6297 117.203 80.7849 117.134 80.8883 117.013L93.2119 109.732C103.933 103.403 108.121 93.839 104.036 84.8461L99.4685 76.0434C98.4688 74.2275 99.3134 72.3424 101.64 70.9935C103.967 69.6446 107.207 69.143 110.327 69.7137L125.477 72.3425C140.645 74.9539 157.019 72.5327 168.257 65.9782L177.892 60.3576C178.409 60.1674 178.909 59.9253 179.322 59.6832C179.77 59.4238 180.27 59.1298 180.684 58.7147L180.822 58.6282C181.029 58.438 181.218 58.2305 181.408 58.0229C181.942 57.4176 182.287 56.7778 182.476 56.1206C182.752 55.204 182.632 54.2528 182.201 53.3362C181.701 52.3159 180.805 51.3647 179.408 50.5692",fill:"#611F69"}),n.createElement("path",{d:"M179.374 50.7587L123.84 18.5917C122.444 17.7789 120.789 17.2254 119.048 16.966C118.049 16.8104 117.049 16.7066 115.98 16.7239C115.394 16.7412 114.791 16.7931 114.188 16.845C112.723 16.966 111.344 17.2946 110.086 17.7616C109.431 18.0037 108.828 18.2631 108.242 18.609C107.656 18.9549 107.225 19.3526 106.794 19.6812C106.656 19.785 106.656 19.8369 106.518 19.9233L97.5209 25.1634C86.2831 31.7179 82.1637 41.247 86.6968 50.0497L91.2643 58.8524C92.2639 60.6682 91.4194 62.5533 89.0925 63.9022C86.7657 65.2512 83.4564 65.7181 80.4057 65.182L65.2554 62.5533C50.1223 59.9419 33.731 62.3631 22.476 68.9175L9.63525 76.4059C8.98029 76.6307 8.37703 76.9074 7.79101 77.2533C7.20499 77.5992 6.72239 77.945 6.32597 78.3428L5.671 78.7233L5.99848 78.6541C3.63717 81.0753 4.2749 84.2228 7.84272 86.2981L62.7217 118.085C62.7217 118.085 63.5318 118.552 63.6007 118.586C65.5311 119.572 67.8407 120.212 70.2193 120.333C70.6329 120.35 71.0466 120.367 71.4603 120.35C73.1838 120.316 74.9764 120.056 76.5276 119.537L76.4931 119.572L76.993 119.347C77.6652 119.122 78.3201 118.811 78.8717 118.5C79.4232 118.188 79.9748 117.894 80.5263 117.462C80.647 117.358 80.8021 117.289 80.9055 117.168L93.2291 109.887C103.95 103.558 108.138 93.994 104.053 85.001L99.4858 76.1983C98.4861 74.3825 99.3306 72.4974 101.657 71.1485C103.984 69.7995 107.225 69.298 110.344 69.8687L125.495 72.4974C140.662 75.1088 157.036 72.6876 168.274 66.1332L177.909 60.5126C178.426 60.3224 178.926 60.0802 179.339 59.8381C179.788 59.5787 180.287 59.2847 180.701 58.8697L180.839 58.7832C181.046 58.5929 181.235 58.3854 181.425 58.1779C181.959 57.5726 182.304 56.9327 182.494 56.2755C182.769 55.3589 182.649 54.4078 182.218 53.4912C181.718 52.4708 180.822 51.5197 179.426 50.7241",fill:"#611F69"}),n.createElement("path",{d:"M179.374 50.9339L123.84 18.7496C122.444 17.9368 120.789 17.3834 119.048 17.1239C118.049 16.9683 117.049 16.8645 115.98 16.8818C115.394 16.8991 114.791 16.951 114.188 17.0029C112.723 17.124 111.344 17.4525 110.086 17.9195C109.431 18.1616 108.828 18.421 108.242 18.7669C107.656 19.1128 107.225 19.5105 106.794 19.8391C106.656 19.9429 106.656 19.9948 106.518 20.0812L97.5209 25.3214C86.2831 31.8758 82.1637 41.4049 86.6968 50.2076L91.2643 59.0103C92.2639 60.8262 91.4194 62.7112 89.0925 64.0602C86.7657 65.4091 83.4564 65.876 80.4057 65.3399L65.2554 62.7112C50.1223 60.0998 33.731 62.521 22.476 69.0754L9.63525 76.5638C8.98029 76.7886 8.37703 77.0653 7.79101 77.4112C7.20499 77.7571 6.72239 78.103 6.32597 78.5007L5.671 78.8812L5.99848 78.812C3.63717 81.2332 4.2749 84.3807 7.84272 86.456L62.7045 118.243C62.7045 118.243 63.5145 118.71 63.5835 118.744C65.5139 119.73 67.8235 120.37 70.202 120.491C70.6157 120.508 71.0294 120.525 71.443 120.508C73.1839 120.474 74.9591 120.214 76.5104 119.695L76.4759 119.73L76.9585 119.505C77.6307 119.28 78.2857 118.969 78.8372 118.658C79.3888 118.346 79.9403 118.052 80.4919 117.62C80.6125 117.516 80.7676 117.447 80.871 117.326L93.1947 110.045C103.915 103.716 108.104 94.1519 104.019 85.159L99.4513 76.3563C98.4516 74.5404 99.2962 72.6553 101.623 71.3064C103.95 69.9574 107.19 69.4559 110.31 70.0266L125.46 72.6553C140.628 75.2667 157.002 72.8456 168.24 66.2911L177.874 60.6705C178.392 60.4803 178.891 60.2382 179.305 59.996C179.753 59.7366 180.253 59.4426 180.667 59.0276L180.805 58.9411C181.011 58.7509 181.201 58.5433 181.391 58.3358C181.925 57.7305 182.27 57.0906 182.459 56.4335C182.735 55.5169 182.614 54.5657 182.183 53.6491C181.684 52.6288 180.787 51.6776 179.391 50.882",fill:"#611F69"}),n.createElement("path",{d:"M179.374 51.109L123.84 18.9246C122.444 18.1118 120.789 17.5584 119.048 17.299C118.049 17.1433 117.049 17.0396 115.98 17.0569C115.394 17.0742 114.791 17.1261 114.188 17.1779C112.723 17.299 111.344 17.6276 110.086 18.0945C109.431 18.3366 108.828 18.5961 108.242 18.9419C107.656 19.2878 107.225 19.6856 106.794 20.0142C106.656 20.1179 106.656 20.1698 106.518 20.2563L97.5209 25.4964C86.2831 32.0509 82.1637 41.5799 86.6968 50.3826L91.2643 59.1853C92.2639 61.0012 91.4194 62.8863 89.0925 64.2352C86.7657 65.5841 83.4564 66.0511 80.4057 65.515L65.2554 62.8863C50.1223 60.2748 33.731 62.696 22.476 69.2505L9.63525 76.7388C8.98029 76.9637 8.37703 77.2404 7.79101 77.5862C7.20499 77.9321 6.72239 78.278 6.32597 78.6758L5.671 79.0562L5.99848 78.9871C3.63717 81.4082 4.2749 84.5558 7.84272 86.6311L62.7045 118.418C62.7045 118.418 63.5145 118.885 63.5835 118.919C65.5139 119.905 67.8235 120.562 70.202 120.683C70.6157 120.7 71.0294 120.718 71.443 120.7C73.1838 120.666 74.9764 120.406 76.5276 119.888L76.4931 119.922L76.9757 119.697C77.6479 119.473 78.3029 119.161 78.8544 118.85C79.406 118.539 79.9575 118.245 80.5091 117.812C80.6297 117.709 80.7849 117.639 80.8883 117.518L93.2119 110.238C103.933 103.908 108.121 94.3442 104.036 85.3513L99.4685 76.5486C98.4688 74.7327 99.3134 72.8477 101.64 71.4987C103.967 70.1498 107.207 69.6482 110.327 70.219L125.477 72.8477C140.645 75.4591 157.019 73.0379 168.257 66.4834L177.892 60.8628C178.409 60.6726 178.909 60.4305 179.322 60.1884C179.77 59.929 180.27 59.635 180.684 59.2199L180.822 59.1334C181.029 58.9432 181.218 58.7357 181.408 58.5281C181.942 57.9228 182.287 57.283 182.476 56.6258C182.752 55.7092 182.632 54.758 182.201 53.8414C181.701 52.8211 180.805 51.8699 179.408 51.0744",fill:"#611F69"}),n.createElement("path",{d:"M179.374 51.27L123.84 19.0856C122.444 18.2728 120.789 17.7194 119.048 17.46C118.049 17.3043 117.049 17.2006 115.98 17.2179C115.394 17.2352 114.791 17.287 114.188 17.3389C112.723 17.46 111.344 17.7886 110.086 18.2555C109.431 18.4976 108.828 18.757 108.242 19.1029C107.656 19.4488 107.225 19.8466 106.794 20.1752C106.656 20.2789 106.656 20.3308 106.518 20.4173L97.5209 25.6574C86.2831 32.2119 82.1637 41.7409 86.6968 50.5436L91.2643 59.3463C92.2639 61.1622 91.4194 63.0473 89.0925 64.3962C86.7657 65.7451 83.4564 66.2121 80.4057 65.676L65.2554 63.0472C50.1223 60.4358 33.731 62.857 22.476 69.4115L9.63525 76.8998C8.98029 77.1247 8.37703 77.4014 7.79101 77.7472C7.20499 78.0931 6.72239 78.439 6.32597 78.8368L5.671 79.2172L5.99848 79.1481C3.63717 81.5692 4.2749 84.7168 7.84272 86.7921L62.6872 118.561C62.6872 118.561 63.4973 119.028 63.5662 119.063C65.4967 120.049 67.789 120.706 70.1676 120.827C70.5812 120.844 70.9949 120.861 71.4086 120.844C73.1494 120.827 74.9419 120.55 76.5104 120.031L76.4759 120.066L76.9585 119.858C77.6307 119.634 78.2857 119.322 78.8372 119.011C79.3888 118.7 79.9403 118.406 80.4919 117.973C80.6125 117.87 80.7676 117.818 80.871 117.697L93.1774 110.416C103.898 104.086 108.086 94.5225 104.002 85.5296L99.4341 76.7269C98.4344 74.911 99.2789 73.0259 101.606 71.677C103.933 70.3281 107.173 69.8265 110.293 70.3972L125.443 73.0259C140.611 75.6374 156.985 73.2162 168.222 66.6617L177.857 61.0411C178.374 60.8509 178.874 60.6088 179.288 60.3667C179.736 60.1072 180.236 59.8132 180.649 59.3982L180.787 59.3117C180.994 59.1215 181.184 58.914 181.373 58.7064C181.908 58.1011 182.252 57.4612 182.442 56.8041C182.718 55.8875 182.597 54.9363 182.166 54.0197C181.666 52.9994 180.77 52.0482 179.374 51.2527",fill:"#611F69"}),n.createElement("path",{d:"M179.374 51.4535L123.84 19.2691C122.444 18.4563 120.789 17.9029 119.048 17.6435C118.049 17.4878 117.049 17.3841 115.98 17.4014C115.394 17.4187 114.791 17.4705 114.188 17.5224C112.723 17.6435 111.344 17.9721 110.086 18.439C109.431 18.6811 108.828 18.9405 108.242 19.2864C107.656 19.6323 107.225 20.0301 106.794 20.3587C106.656 20.4624 106.656 20.5143 106.518 20.6008L97.5209 25.8409C86.2831 32.3953 82.1637 41.9244 86.6968 50.7271L91.2643 59.5298C92.2639 61.3457 91.4194 63.2307 89.0925 64.5797C86.7657 65.9286 83.4564 66.3956 80.4057 65.8594L65.2554 63.2307C50.1223 60.6193 33.731 63.0405 22.476 69.595L9.63525 77.0833C8.98029 77.3081 8.37703 77.5848 7.79101 77.9307C7.20499 78.2766 6.72239 78.6225 6.32597 79.0203L5.671 79.4007L5.99848 79.3315C3.63717 81.7527 4.2749 84.9003 7.84272 86.9755L62.6872 118.745C62.6872 118.745 63.4973 119.212 63.5662 119.246C65.4967 120.232 67.789 120.889 70.1676 121.01C70.5812 121.028 70.9949 121.045 71.4086 121.028C73.1494 121.01 74.9591 120.751 76.5276 120.215L76.4931 120.249L76.9757 120.042C77.6479 119.817 78.3029 119.506 78.8544 119.194C79.406 118.883 79.9575 118.589 80.5091 118.157C80.6297 118.053 80.7849 118.001 80.8883 117.88L93.1947 110.599C103.915 104.27 108.104 94.706 104.019 85.7131L99.4513 76.9104C98.4516 75.0945 99.2962 73.2094 101.623 71.8605C103.95 70.5116 107.19 70.01 110.31 70.5807L125.46 73.2094C140.628 75.8209 157.002 73.3997 168.24 66.8452L177.874 61.2246C178.392 61.0344 178.891 60.7923 179.305 60.5501C179.753 60.2907 180.253 59.9967 180.667 59.5817L180.805 59.4952C181.011 59.305 181.201 59.0974 181.391 58.8899C181.925 58.2846 182.27 57.6447 182.459 56.9876C182.735 56.071 182.614 55.1198 182.183 54.2032C181.684 53.1829 180.787 52.2317 179.391 51.4362",fill:"#611F69"}),n.createElement("path",{d:"M179.374 51.6285L123.84 19.4442C122.444 18.6313 120.789 18.0779 119.048 17.8185C118.049 17.6629 117.049 17.5591 115.98 17.5764C115.394 17.5937 114.791 17.6456 114.188 17.6975C112.723 17.8185 111.344 18.1471 110.086 18.614C109.431 18.8562 108.828 19.1156 108.242 19.4615C107.656 19.8073 107.225 20.2051 106.794 20.5337C106.656 20.6375 106.656 20.6893 106.518 20.7758L97.5209 26.0159C86.2831 32.5704 82.1637 42.0994 86.6968 50.9021L91.2643 59.7048C92.2639 61.5207 91.4194 63.4058 89.0925 64.7547C86.7657 66.1037 83.4564 66.5706 80.4057 66.0345L65.2554 63.4058C50.1223 60.7944 33.731 63.2155 22.476 69.77L9.63525 77.2584C8.98029 77.4832 8.37703 77.7599 7.79101 78.1058C7.20499 78.4517 6.72239 78.7975 6.32597 79.1953L5.671 79.5758L5.99848 79.5066C3.63717 81.9278 4.2749 85.0753 7.84272 87.1506L62.67 118.92C62.67 118.92 63.4973 119.387 63.549 119.421C65.4794 120.407 67.7718 121.064 70.1503 121.185C70.564 121.203 70.9777 121.22 71.3913 121.203C73.1494 121.185 74.9419 120.926 76.5104 120.39L76.4759 120.424L76.9585 120.217C77.6307 119.992 78.2857 119.681 78.8372 119.37C79.3888 119.058 79.9403 118.764 80.4919 118.332C80.6125 118.228 80.7676 118.176 80.871 118.055L93.1774 110.774C103.898 104.445 108.086 94.8811 104.002 85.8881L99.4341 77.0854C98.4344 75.2695 99.2789 73.3845 101.606 72.0355C103.933 70.6866 107.173 70.1851 110.293 70.7558L125.443 73.3845C140.611 75.9959 156.985 73.5747 168.222 67.0203L177.857 61.3997C178.374 61.2094 178.874 60.9673 179.288 60.7252C179.736 60.4658 180.236 60.1718 180.649 59.7567L180.787 59.6703C180.994 59.48 181.184 59.2725 181.373 59.065C181.908 58.4597 182.252 57.8198 182.442 57.1626C182.718 56.246 182.597 55.2948 182.166 54.3783C181.666 53.3579 180.77 52.4067 179.374 51.6112",fill:"#611F69"}),n.createElement("path",{d:"M179.374 51.7804L123.84 19.6133C122.444 18.8005 120.789 18.2471 119.048 17.9877C118.049 17.832 117.049 17.7283 115.98 17.7456C115.394 17.7629 114.791 17.8148 114.188 17.8666C112.723 17.9877 111.344 18.3163 110.086 18.7832C109.431 19.0253 108.828 19.2848 108.242 19.6306C107.656 19.9765 107.225 20.3743 106.794 20.7029C106.656 20.8066 106.656 20.8585 106.518 20.945L97.5209 26.1851C86.2831 32.7396 82.1637 42.2686 86.6968 51.0713L91.2643 59.874C92.2639 61.6899 91.4194 63.575 89.0925 64.9239C86.7657 66.2728 83.4564 66.7398 80.4057 66.2037L65.2554 63.575C50.1223 60.9635 33.731 63.3847 22.476 69.9392L9.63525 77.4275C8.98029 77.6524 8.37703 77.9291 7.79101 78.2749C7.20499 78.6208 6.72239 78.9667 6.32597 79.3645L5.671 79.7449L5.99848 79.6758C3.63717 82.0969 4.2749 85.2445 7.84272 87.3198L62.67 119.089C62.67 119.089 63.4973 119.556 63.549 119.591C65.4794 120.576 67.7718 121.234 70.1503 121.372C70.564 121.389 70.9777 121.406 71.3913 121.389C73.1494 121.372 74.9591 121.112 76.5276 120.576V120.611L76.993 120.403C77.6652 120.179 78.3201 119.867 78.8717 119.556C79.4232 119.245 79.9748 118.951 80.5263 118.518C80.647 118.415 80.8021 118.363 80.9055 118.242L93.2119 110.961C103.933 104.631 108.121 95.0675 104.036 86.0746L99.4685 77.2719C98.4688 75.456 99.3134 73.5709 101.64 72.222C103.967 70.8731 107.207 70.3715 110.327 70.9422L125.477 73.5709C140.645 76.1824 157.019 73.7612 168.257 67.2067L177.892 61.5861C178.409 61.3959 178.909 61.1538 179.322 60.9117C179.77 60.6523 180.27 60.3583 180.684 59.9432L180.822 59.8567C181.029 59.6665 181.218 59.459 181.408 59.2514C181.942 58.6461 182.287 58.0063 182.476 57.3491C182.752 56.4325 182.632 55.4813 182.201 54.5647C181.701 53.5444 180.805 52.5932 179.408 51.7977",fill:"#611F69"}),n.createElement("path",{d:"M179.374 51.9612L123.84 19.7941C122.444 18.9813 120.789 18.4279 119.048 18.1685C118.049 18.0128 117.049 17.9091 115.98 17.9264C115.394 17.9437 114.791 17.9956 114.188 18.0474C112.723 18.1685 111.344 18.4971 110.086 18.964C109.431 19.2061 108.828 19.4656 108.242 19.8114C107.656 20.1573 107.225 20.5551 106.794 20.8837C106.656 20.9874 106.656 21.0393 106.518 21.1258L97.5209 26.3659C86.2831 32.9204 82.1637 42.4494 86.6968 51.2521L91.2643 60.0548C92.2639 61.8707 91.4194 63.7558 89.0925 65.1047C86.7657 66.4536 83.4564 66.9206 80.4057 66.3845L65.2554 63.7558C50.1223 61.1444 33.731 63.5655 22.476 70.12L9.63525 77.6083C8.98029 77.8332 8.37703 78.1099 7.79101 78.4558C7.20499 78.8016 6.72239 79.1475 6.32597 79.5453L5.671 79.9258L5.99848 79.8566C3.63717 82.2777 4.2749 85.4253 7.84272 87.5006L62.6527 119.253C62.6527 119.253 63.4801 119.719 63.5318 119.754C65.4622 120.74 67.7546 121.397 70.1331 121.535C70.5468 121.553 70.9604 121.57 71.3741 121.57C73.1321 121.553 74.9419 121.293 76.5276 120.757V120.792L76.993 120.584C77.6652 120.359 78.3201 120.048 78.8717 119.737C79.4232 119.426 79.9748 119.131 80.5263 118.699C80.647 118.595 80.8021 118.543 80.9055 118.422L93.2119 111.142C103.933 104.812 108.121 95.2483 104.036 86.2554L99.4685 77.4527C98.4688 75.6368 99.3134 73.7518 101.64 72.4028C103.967 71.0539 107.207 70.5523 110.327 71.1231L125.477 73.7518C140.645 76.3632 157.019 73.942 168.257 67.3875L177.892 61.7669C178.409 61.5767 178.909 61.3346 179.322 61.0925C179.77 60.8331 180.27 60.5391 180.684 60.124L180.822 60.0375C181.029 59.8473 181.218 59.6398 181.408 59.4322C181.942 58.8269 182.287 58.1871 182.476 57.5299C182.752 56.6133 182.632 55.6621 182.201 54.7455C181.701 53.7252 180.805 52.774 179.408 51.9785",fill:"#611F69"}),n.createElement("path",{d:"M179.374 52.1222L123.84 19.9551C122.444 19.1423 120.789 18.5889 119.048 18.3295C118.049 18.1738 117.049 18.0701 115.98 18.0874C115.394 18.1047 114.791 18.1565 114.188 18.2084C112.723 18.3295 111.344 18.6581 110.086 19.125C109.431 19.3671 108.828 19.6265 108.242 19.9724C107.656 20.3183 107.225 20.7161 106.794 21.0447C106.656 21.1484 106.656 21.2003 106.518 21.2868L97.5209 26.5269C86.2831 33.0814 82.1637 42.6104 86.6968 51.4131L91.2643 60.2158C92.2639 62.0317 91.4194 63.9168 89.0925 65.2657C86.7657 66.6146 83.4564 67.0816 80.4057 66.5455L65.2554 63.9168C50.1223 61.3053 33.731 63.7265 22.476 70.281L9.63525 77.7693C8.98029 77.9942 8.37703 78.2709 7.79101 78.6167C7.20499 78.9626 6.72239 79.3085 6.32597 79.7063L5.671 80.0868L5.99848 80.0176C3.63717 82.4387 4.2749 85.5863 7.84272 87.6616L62.6527 119.414C62.6527 119.414 63.4801 119.88 63.5318 119.915C65.4622 120.901 67.7546 121.558 70.1159 121.696C70.5295 121.714 70.9432 121.731 71.3569 121.731C73.1149 121.714 74.9419 121.454 76.5104 120.918V120.953L76.9757 120.745C77.6479 120.52 78.3029 120.209 78.8544 119.898C79.406 119.586 79.9575 119.292 80.5091 118.86C80.6297 118.756 80.7849 118.704 80.8883 118.583L93.1947 111.303C103.915 104.973 108.104 95.4093 104.019 86.4164L99.4513 77.6137C98.4516 75.7978 99.2962 73.9127 101.623 72.5638C103.95 71.2149 107.19 70.7133 110.31 71.284L125.46 73.9128C140.628 76.5242 157.002 74.103 168.24 67.5485L177.874 61.9279C178.392 61.7377 178.891 61.4956 179.305 61.2535C179.753 60.994 180.253 60.7001 180.667 60.285L180.805 60.1985C181.011 60.0083 181.201 59.8008 181.391 59.5932C181.925 58.9879 182.27 58.3481 182.459 57.6909C182.735 56.7743 182.614 55.8231 182.183 54.9065C181.684 53.8862 180.787 52.935 179.391 52.1395",fill:"#611F69"}),n.createElement("path",{d:"M179.374 52.2971L123.84 20.1301C122.444 19.3172 120.789 18.7638 119.048 18.5044C118.049 18.3488 117.049 18.245 115.98 18.2623C115.394 18.2796 114.791 18.3315 114.188 18.3834C112.723 18.5044 111.344 18.833 110.086 19.3C109.431 19.5421 108.828 19.8015 108.242 20.1474C107.656 20.4932 107.225 20.891 106.794 21.2196C106.656 21.3234 106.656 21.3752 106.518 21.4617L97.5209 26.7018C86.2831 33.2563 82.1637 42.7853 86.6968 51.588L91.2643 60.3907C92.2639 62.2066 91.4194 64.0917 89.0925 65.4406C86.7657 66.7896 83.4564 67.2565 80.4057 66.7204L65.2554 64.0917C50.1223 61.4803 33.731 63.9015 22.476 70.4559L9.63525 77.9443C8.98029 78.1691 8.37703 78.4458 7.79101 78.7917C7.20499 79.1376 6.72239 79.4834 6.32597 79.8812L5.671 80.2617L5.99848 80.1925C3.63717 82.6137 4.2749 85.7612 7.84272 87.8365L62.6355 119.588C62.6355 119.588 63.4628 120.073 63.5145 120.09C65.445 121.093 67.7201 121.75 70.0986 121.871C70.5123 121.889 70.926 121.906 71.3396 121.906C73.1149 121.889 74.9247 121.629 76.5104 121.076V121.11L76.9757 120.903C77.6479 120.678 78.3029 120.367 78.8544 120.055C79.406 119.744 79.9575 119.45 80.5091 119.018C80.6297 118.914 80.8021 118.862 80.8883 118.741L93.1947 111.46C103.915 105.131 108.104 95.567 104.019 86.574L99.4513 77.7713C98.4516 75.9554 99.2962 74.0704 101.623 72.7214C103.95 71.3725 107.19 70.871 110.31 71.4417L125.46 74.0704C140.628 76.6818 157.002 74.2606 168.24 67.7062L177.874 62.0856C178.392 61.8953 178.891 61.6532 179.305 61.4111C179.753 61.1517 180.253 60.8577 180.667 60.4426L180.805 60.3562C181.011 60.1659 181.201 59.9584 181.391 59.7509C181.925 59.1456 182.27 58.5057 182.459 57.8485C182.735 56.9319 182.614 55.9808 182.183 55.0642C181.684 54.0438 180.787 53.0926 179.391 52.2971",fill:"#611F69"}),n.createElement("path",{d:"M179.374 52.4721L123.84 20.3051C122.444 19.4923 120.789 18.9389 119.048 18.6795C118.049 18.5238 117.049 18.4201 115.98 18.4373C115.394 18.4546 114.791 18.5065 114.188 18.5584C112.723 18.6795 111.344 19.0081 110.086 19.475C109.431 19.7171 108.828 19.9765 108.242 20.3224C107.656 20.6683 107.225 21.0661 106.794 21.3946C106.656 21.4984 106.656 21.5503 106.518 21.6368L97.5209 26.8769C86.2831 33.4313 82.1637 42.9604 86.6968 51.7631L91.2643 60.5658C92.2639 62.3817 91.4194 64.2667 89.0925 65.6157C86.7657 66.9646 83.4564 67.4315 80.4057 66.8954L65.2554 64.2667C50.1223 61.6553 33.731 64.0765 22.476 70.631L9.63525 78.1193C8.98029 78.3441 8.37703 78.6208 7.79101 78.9667C7.20499 79.3126 6.72239 79.6585 6.32597 80.0562L5.671 80.4367L5.99848 80.3675C3.63717 82.7887 4.2749 85.9362 7.84272 88.0115L62.6355 119.746C62.6355 119.746 63.4628 120.23 63.5145 120.248C65.4449 121.251 67.7201 121.908 70.0986 122.046C70.5123 122.064 70.9259 122.081 71.3396 122.081C73.1149 122.064 74.9419 121.804 76.5276 121.251H76.5104L76.993 121.078C77.6652 120.853 78.3201 120.542 78.8717 120.23C79.4232 119.919 79.9748 119.625 80.5263 119.193C80.647 119.089 80.8193 119.037 80.9055 118.916L93.2119 111.635C103.933 105.306 108.121 95.742 104.036 86.7491L99.4685 77.9464C98.4688 76.1305 99.3134 74.2454 101.64 72.8965C103.967 71.5475 107.207 71.046 110.327 71.6167L125.477 74.2454C140.645 76.8568 157.019 74.4357 168.257 67.8812L177.892 62.2606C178.409 62.0704 178.909 61.8283 179.322 61.5861C179.77 61.3267 180.27 61.0327 180.684 60.6177L180.822 60.5312C181.029 60.341 181.218 60.1334 181.408 59.9259C181.942 59.3206 182.287 58.6807 182.476 58.0236C182.752 57.107 182.632 56.1558 182.201 55.2392C181.701 54.2189 180.805 53.2677 179.408 52.4721",fill:"#611F69"}),n.createElement("path",{d:"M179.374 52.6413L123.84 20.4743C122.444 19.6615 120.789 19.1081 119.048 18.8486C118.049 18.693 117.049 18.5892 115.98 18.6065C115.394 18.6238 114.791 18.6757 114.188 18.7276C112.723 18.8486 111.344 19.1772 110.086 19.6442C109.431 19.8863 108.828 20.1457 108.242 20.4916C107.656 20.8375 107.225 21.2352 106.794 21.5638C106.656 21.6676 106.656 21.7195 106.518 21.8059L97.5209 27.046C86.2831 33.6005 82.1637 43.1296 86.6968 51.9323L91.2643 60.735C92.2639 62.5508 91.4194 64.4359 89.0925 65.7849C86.7657 67.1338 83.4564 67.6007 80.4057 67.0646L65.2554 64.4359C50.1223 61.8245 33.731 64.2457 22.476 70.8001L9.63525 78.2885C8.98029 78.5133 8.37703 78.79 7.79101 79.1359C7.20499 79.4818 6.72239 79.8277 6.32597 80.2254L5.671 80.6059L5.99848 80.5367C3.63717 82.9579 4.2749 86.1054 7.84272 88.1807L62.6183 119.915C62.6183 119.915 63.4628 120.4 63.4973 120.417C65.4277 121.42 67.7028 122.077 70.0814 122.216C70.4951 122.233 70.9087 122.25 71.3224 122.25C73.0977 122.233 74.9247 121.973 76.5276 121.42H76.5104L76.993 121.247C77.6652 121.022 78.3201 120.711 78.8717 120.4C79.4232 120.088 79.9748 119.794 80.5263 119.362C80.647 119.258 80.8193 119.206 80.9055 119.085L93.2119 111.804C103.933 105.475 108.121 95.9112 104.036 86.9182L99.4685 78.1155C98.4688 76.2997 99.3134 74.4146 101.64 73.0657C103.967 71.7167 107.207 71.2152 110.327 71.7859L125.477 74.4146C140.645 77.026 157.019 74.6048 168.257 68.0504L177.892 62.4298C178.409 62.2396 178.909 61.9974 179.322 61.7553C179.77 61.4959 180.27 61.2019 180.684 60.7869L180.822 60.7004C181.029 60.5101 181.218 60.3026 181.408 60.0951C181.942 59.4898 182.287 58.8499 182.476 58.1927C182.752 57.2762 182.632 56.325 182.201 55.4084C181.701 54.388 180.805 53.4369 179.408 52.6413",fill:"#611F69"}),n.createElement("path",{d:"M179.374 52.8196L123.84 20.6353C122.444 19.8225 120.789 19.269 119.048 19.0096C118.049 18.854 117.049 18.7502 115.98 18.7675C115.394 18.7848 114.791 18.8367 114.188 18.8886C112.723 19.0096 111.344 19.3382 110.086 19.8052C109.431 20.0473 108.828 20.3067 108.242 20.6526C107.656 20.9985 107.225 21.3962 106.794 21.7248C106.656 21.8286 106.656 21.8805 106.518 21.9669L97.5209 27.207C86.2831 33.7615 82.1637 43.2906 86.6968 52.0933L91.2643 60.896C92.2639 62.7118 91.4194 64.5969 89.0925 65.9458C86.7657 67.2948 83.4564 67.7617 80.4057 67.2256L65.2554 64.5969C50.1223 61.9855 33.731 64.4067 22.476 70.9611L9.63525 78.4495C8.98029 78.6743 8.37703 78.951 7.79101 79.2969C7.20499 79.6428 6.72239 79.9886 6.32597 80.3864L5.671 80.7669L5.99848 80.6977C3.63717 83.1189 4.2749 86.2664 7.84272 88.3417L62.6183 120.076C62.6183 120.076 63.4628 120.561 63.4973 120.578C65.4277 121.581 67.7028 122.238 70.0814 122.376C70.4951 122.394 70.9087 122.411 71.3224 122.411C73.0977 122.394 74.9419 122.134 76.5276 121.581L77.0102 121.408C77.6824 121.183 78.3374 120.872 78.8889 120.561C79.4405 120.249 79.992 119.955 80.5436 119.523C80.6642 119.419 80.8366 119.367 80.9227 119.246L93.2291 111.948C103.95 105.619 108.138 96.0549 104.053 87.0619L99.4858 78.2592C98.4861 76.4434 99.3306 74.5583 101.657 73.2094C103.984 71.8604 107.225 71.3589 110.344 71.9296L125.495 74.5583C140.662 77.1697 157.036 74.7485 168.274 68.1941L177.909 62.5735C178.426 62.3832 178.926 62.1411 179.339 61.899C179.788 61.6396 180.287 61.3456 180.701 60.9305L180.839 60.8441C181.046 60.6538 181.235 60.4463 181.425 60.2388C181.959 59.6335 182.304 58.9936 182.494 58.3364C182.769 57.4198 182.649 56.4687 182.218 55.5521C181.718 54.5317 180.822 53.5805 179.426 52.785",fill:"#611F69"}),n.createElement("path",{d:"M179.374 52.9888L123.84 20.8045C122.444 19.9916 120.789 19.4382 119.048 19.1788C118.049 19.0232 117.049 18.9194 115.98 18.9367C115.394 18.954 114.791 19.0059 114.188 19.0578C112.723 19.1788 111.344 19.5074 110.086 19.9743C109.431 20.2165 108.828 20.4759 108.242 20.8217C107.656 21.1676 107.225 21.5654 106.794 21.894C106.656 21.9977 106.656 22.0496 106.518 22.1361L97.5209 27.3762C86.2831 33.9307 82.1637 43.4597 86.6968 52.2624L91.2643 61.0651C92.2639 62.881 91.4194 64.7661 89.0925 66.115C86.7657 67.4639 83.4564 67.9309 80.4057 67.3948L65.2554 64.7661C50.1223 62.1547 33.731 64.5758 22.476 71.1303L9.63525 78.6186C8.98029 78.8435 8.37703 79.1202 7.79101 79.4661C7.20499 79.8119 6.72239 80.1578 6.32597 80.5556L5.671 80.9361L5.99848 80.8669C3.63717 83.288 4.2749 86.4356 7.84272 88.5109L62.601 120.228C62.601 120.228 63.4456 120.712 63.4801 120.73C65.4105 121.733 67.6856 122.39 70.0469 122.528C70.4606 122.546 70.8742 122.563 71.2879 122.563C73.0632 122.563 74.9074 122.286 76.5104 121.733L76.993 121.56C77.6652 121.335 78.3201 121.024 78.8717 120.712C79.4232 120.401 79.9748 120.107 80.5263 119.675C80.647 119.571 80.8193 119.519 80.9055 119.398L93.2119 112.1C103.933 105.77 108.121 96.2067 104.036 87.2138L99.4685 78.4111C98.4688 76.5952 99.3134 74.7102 101.64 73.3612C103.967 72.0123 107.207 71.5108 110.327 72.0815L125.477 74.7102C140.645 77.3216 157.019 74.9004 168.257 68.3459L177.892 62.7254C178.409 62.5351 178.909 62.293 179.322 62.0509C179.77 61.7915 180.27 61.4975 180.684 61.0824L180.822 60.996C181.029 60.8057 181.218 60.5982 181.408 60.3907C181.942 59.7854 182.287 59.1455 182.476 58.4883C182.752 57.5717 182.632 56.6205 182.201 55.704C181.701 54.6836 180.805 53.7324 179.408 52.9369",fill:"#611F69"}),n.createElement("path",{d:"M179.374 53.1638L123.84 20.9795C122.444 20.1667 120.789 19.6133 119.048 19.3538C118.049 19.1982 117.049 19.0944 115.98 19.1117C115.394 19.129 114.791 19.1809 114.188 19.2328C112.723 19.3538 111.344 19.6824 110.086 20.1494C109.431 20.3915 108.828 20.6509 108.242 20.9968C107.656 21.3427 107.225 21.7404 106.794 22.069C106.656 22.1728 106.656 22.2247 106.518 22.3111L97.5209 27.5513C86.2831 34.1057 82.1637 43.6348 86.6968 52.4375L91.2643 61.2402C92.2639 63.056 91.4194 64.9411 89.0925 66.29C86.7657 67.639 83.4564 68.1059 80.4057 67.5698L65.2554 64.9411C50.1223 62.3297 33.731 64.7509 22.476 71.3053L9.63525 78.7937C8.98029 79.0185 8.37703 79.2952 7.79101 79.6411C7.20499 79.987 6.72239 80.3329 6.32597 80.7306L5.671 81.1111L5.99848 81.0419C3.63717 83.4631 4.2749 86.6106 7.84272 88.6859L62.601 120.403C62.601 120.403 63.4456 120.888 63.4801 120.905C65.4105 121.908 67.6856 122.565 70.0469 122.703C70.4606 122.721 70.8742 122.738 71.2879 122.738C73.0804 122.738 74.9247 122.461 76.5276 121.908L76.993 121.735C77.6652 121.51 78.3201 121.199 78.8717 120.888C79.4232 120.576 79.9748 120.282 80.5263 119.85C80.647 119.746 80.8193 119.694 80.9055 119.573L93.2119 112.275C103.933 105.945 108.121 96.3818 104.036 87.3889L99.4685 78.5862C98.4688 76.7703 99.3134 74.8852 101.64 73.5363C103.967 72.1873 107.207 71.6858 110.327 72.2565L125.477 74.8852C140.645 77.4966 157.019 75.0754 168.257 68.521L177.892 62.9004C178.409 62.7102 178.909 62.468 179.322 62.2259C179.77 61.9665 180.27 61.6725 180.684 61.2575L180.822 61.171C181.029 60.9808 181.218 60.7732 181.408 60.5657C181.942 59.9604 182.287 59.3205 182.476 58.6633C182.752 57.7468 182.632 56.7956 182.201 55.879C181.701 54.8586 180.805 53.9075 179.408 53.1119",fill:"#611F69"}),n.createElement("path",{d:"M179.374 53.3334L123.84 21.149C122.444 20.3362 120.789 19.7828 119.048 19.5234C118.049 19.3678 117.049 19.264 115.98 19.2813C115.394 19.2986 114.791 19.3505 114.188 19.4023C112.723 19.5234 111.344 19.852 110.086 20.3189C109.431 20.561 108.828 20.8205 108.242 21.1663C107.656 21.5122 107.225 21.91 106.794 22.2386C106.656 22.3423 106.656 22.3942 106.518 22.4807L97.5209 27.7208C86.2831 34.2753 82.1637 43.8043 86.6968 52.607L91.2643 61.4097C92.2639 63.2256 91.4194 65.1107 89.0925 66.4596C86.7657 67.8086 83.4564 68.2755 80.4057 67.7394L65.2554 65.1107C50.1223 62.4993 33.731 64.9204 22.476 71.4749L9.63525 78.9632C8.98029 79.1881 8.37703 79.4648 7.79101 79.8107C7.20499 80.1565 6.72239 80.5024 6.32597 80.9002L5.671 81.2807L5.99848 81.2115C3.63717 83.6327 4.2749 86.7802 7.84272 88.8555L62.5838 120.573C62.5838 120.573 63.4284 121.057 63.4628 121.074C65.376 122.077 67.6511 122.735 70.0297 122.89C70.4434 122.908 70.857 122.925 71.2707 122.925C73.0632 122.925 74.9074 122.648 76.5104 122.095L76.9757 121.922C77.6479 121.697 78.3029 121.386 78.8544 121.074C79.406 120.763 79.9575 120.469 80.5091 120.037C80.6297 119.933 80.8021 119.881 80.8883 119.76L93.1947 112.462C103.915 106.132 108.104 96.5686 104.019 87.5757L99.4513 78.773C98.4516 76.9571 99.2962 75.0721 101.623 73.7231C103.95 72.3742 107.19 71.8727 110.31 72.4434L125.46 75.0721C140.628 77.6835 157.002 75.2623 168.24 68.7078L177.874 63.0873C178.392 62.897 178.891 62.6549 179.305 62.4128C179.753 62.1534 180.253 61.8594 180.667 61.4443L180.805 61.3578C181.011 61.1676 181.201 60.9601 181.391 60.7526C181.925 60.1473 182.27 59.5074 182.459 58.8502C182.735 57.9336 182.614 56.9824 182.183 56.0658C181.684 55.0455 180.787 54.0943 179.391 53.2988",fill:"#611F69"}),n.createElement("path",{d:"M179.374 53.5169L123.84 21.3325C122.444 20.5197 120.789 19.9663 119.048 19.7069C118.049 19.5512 117.049 19.4475 115.98 19.4648C115.394 19.4821 114.791 19.534 114.188 19.5858C112.723 19.7069 111.344 20.0355 110.086 20.5024C109.431 20.7445 108.828 21.004 108.242 21.3498C107.656 21.6957 107.225 22.0935 106.794 22.4221C106.656 22.5258 106.656 22.5777 106.518 22.6642L97.5209 27.9043C86.2831 34.4588 82.1637 43.9878 86.6968 52.7905L91.2643 61.5932C92.2639 63.4091 91.4194 65.2942 89.0925 66.6431C86.7657 67.992 83.4564 68.459 80.4057 67.9229L65.2554 65.2942C50.1223 62.6828 33.731 65.1039 22.476 71.6584L9.63525 79.1467C8.98029 79.3716 8.37703 79.6483 7.79101 79.9942C7.20499 80.34 6.72239 80.6859 6.32597 81.0837L5.671 81.4642L5.99848 81.395C3.63717 83.8162 4.2749 86.9637 7.84272 89.039L62.5838 120.756C62.5838 120.756 63.4284 121.241 63.4628 121.258C65.376 122.261 67.6511 122.935 70.0297 123.074C70.4433 123.091 70.857 123.108 71.2707 123.108C73.0632 123.108 74.9247 122.832 76.5276 122.278L76.993 122.105C77.6652 121.88 78.3201 121.569 78.8717 121.258C79.4232 120.947 79.9748 120.653 80.5263 120.22C80.647 120.116 80.8193 120.065 80.9227 119.944L93.2291 112.645C103.95 106.316 108.138 96.7521 104.053 87.7592L99.4858 78.9565C98.4861 77.1406 99.3306 75.2556 101.657 73.9066C103.984 72.5577 107.225 72.0562 110.344 72.6269L125.495 75.2556C140.662 77.867 157.036 75.4458 168.274 68.8913L177.909 63.2708C178.426 63.0805 178.926 62.8384 179.339 62.5963C179.788 62.3369 180.287 62.0429 180.701 61.6278L180.839 61.5413C181.046 61.3511 181.235 61.1436 181.425 60.936C181.959 60.3308 182.304 59.6909 182.494 59.0337C182.769 58.1171 182.649 57.1659 182.218 56.2493C181.718 55.229 180.822 54.2778 179.426 53.4823",fill:"#611F69"}),n.createElement("path",{d:"M179.374 53.6661L123.84 21.499C122.444 20.6862 120.789 20.1328 119.048 19.8734C118.049 19.7177 117.049 19.614 115.98 19.6313C115.394 19.6486 114.791 19.7004 114.188 19.7523C112.723 19.8734 111.344 20.202 110.086 20.6689C109.431 20.911 108.828 21.1704 108.242 21.5163C107.656 21.8622 107.225 22.26 106.794 22.5885C106.656 22.6923 106.656 22.7442 106.518 22.8307L97.5209 28.0708C86.2831 34.6252 82.1637 44.1543 86.6968 52.957L91.2643 61.7597C92.2639 63.5756 91.4194 65.4606 89.0925 66.8096C86.7657 68.1585 83.4564 68.6255 80.4057 68.0893L65.2554 65.4606C50.1223 62.8492 33.731 65.2704 22.476 71.8249L9.63525 79.3132C8.98029 79.538 8.37703 79.8147 7.79101 80.1606C7.20499 80.5065 6.72239 80.8524 6.32597 81.2502L5.671 81.6306L5.99848 81.5614C3.63717 83.9826 4.2749 87.1302 7.84272 89.2054L62.5666 120.906C62.5666 120.906 63.4284 121.39 63.4456 121.407C65.3588 122.41 67.6339 123.085 70.0124 123.223C70.4261 123.24 70.8398 123.258 71.2534 123.258C73.046 123.258 74.9074 122.981 76.5276 122.427L76.993 122.254C77.6652 122.03 78.3201 121.718 78.8717 121.407C79.4232 121.096 79.9748 120.802 80.5263 120.369C80.647 120.266 80.8193 120.214 80.9227 120.093L93.2291 112.795C103.95 106.465 108.138 96.9013 104.053 87.9084L99.4858 79.1057C98.4861 77.2898 99.3306 75.4047 101.657 74.0558C103.984 72.7069 107.225 72.2053 110.344 72.776L125.495 75.4047C140.662 78.0162 157.036 75.595 168.274 69.0405L177.909 63.4199C178.426 63.2297 178.926 62.9876 179.339 62.7455C179.788 62.486 180.287 62.1921 180.701 61.777L180.839 61.6905C181.046 61.5003 181.235 61.2928 181.425 61.0852C181.959 60.4799 182.304 59.8401 182.494 59.1829C182.769 58.2663 182.649 57.3151 182.218 56.3985C181.718 55.3782 180.822 54.427 179.426 53.6315",fill:"#611F69"}),n.createElement("path",{d:"M179.374 53.8356L123.84 21.6686C122.444 20.8557 120.789 20.3023 119.048 20.0429C118.049 19.8873 117.049 19.7835 115.98 19.8008C115.394 19.8181 114.791 19.87 114.188 19.9219C112.723 20.0429 111.344 20.3715 110.086 20.8385C109.431 21.0806 108.828 21.34 108.242 21.6859C107.656 22.0317 107.225 22.4295 106.794 22.7581C106.656 22.8619 106.656 22.9137 106.518 23.0002L97.5209 28.2403C86.2831 34.7948 82.1637 44.3238 86.6968 53.1265L91.2643 61.9293C92.2639 63.7451 91.4194 65.6302 89.0925 66.9791C86.7657 68.3281 83.4564 68.795 80.4057 68.2589L65.2554 65.6302C50.1223 63.0188 33.731 65.44 22.476 71.9944L9.63525 79.4828C8.98029 79.7076 8.37703 79.9843 7.79101 80.3302C7.20499 80.6761 6.72239 81.0219 6.32597 81.4197L5.671 81.8002L5.99848 81.731C3.63717 84.1522 4.2749 87.2997 7.84272 89.375L62.5666 121.075C62.5666 121.075 63.4284 121.577 63.4456 121.577C65.3588 122.58 67.6339 123.254 69.9952 123.393C70.4089 123.41 70.8225 123.427 71.2362 123.427C73.046 123.427 74.9074 123.15 76.5276 122.597L76.993 122.424C77.6652 122.199 78.3201 121.888 78.8717 121.577C79.4232 121.265 79.9748 120.971 80.5263 120.539C80.647 120.435 80.8193 120.383 80.9227 120.262L93.2291 112.964C103.95 106.635 108.138 97.0709 104.053 88.0779L99.4858 79.2752C98.4861 77.4594 99.3306 75.5743 101.657 74.2254C103.984 72.8764 107.225 72.3749 110.344 72.9456L125.495 75.5743C140.662 78.1857 157.036 75.7645 168.274 69.2101L177.909 63.5895C178.426 63.3993 178.926 63.1571 179.339 62.915C179.788 62.6556 180.287 62.3616 180.701 61.9465L180.839 61.8601C181.046 61.6698 181.235 61.4623 181.425 61.2548C181.959 60.6495 182.304 60.0096 182.494 59.3524C182.769 58.4358 182.649 57.4847 182.218 56.5681C181.718 55.5477 180.822 54.5966 179.426 53.801",fill:"#611F69"}),n.createElement("path",{d:"M179.374 54.0219L123.84 21.8549C122.444 21.042 120.789 20.4886 119.048 20.2292C118.049 20.0736 117.049 19.9698 115.98 19.9871C115.394 20.0044 114.791 20.0563 114.188 20.1082C112.723 20.2292 111.344 20.5578 110.086 21.0247C109.431 21.2669 108.828 21.5263 108.242 21.8722C107.656 22.218 107.225 22.6158 106.794 22.9444C106.656 23.0482 106.656 23.1 106.518 23.1865L97.5209 28.4266C86.2831 34.9811 82.1637 44.5101 86.6968 53.3128L91.2643 62.1155C92.2639 63.9314 91.4194 65.8165 89.0925 67.1654C86.7657 68.5144 83.4564 68.9813 80.4057 68.4452L65.2554 65.8165C50.1223 63.2051 33.731 65.6262 22.476 72.1807L9.63525 79.6691C8.98029 79.8939 8.37703 80.1706 7.79101 80.5165C7.20499 80.8624 6.72239 81.2082 6.32597 81.606L5.671 81.9865L5.99848 81.9173C3.63717 84.3385 4.2749 87.486 7.84272 89.5613L62.5493 121.261C62.5493 121.261 63.4111 121.763 63.4284 121.763C65.3415 122.766 67.6167 123.44 69.978 123.596C70.3916 123.613 70.8053 123.631 71.219 123.631C73.0287 123.631 74.8902 123.354 76.5104 122.801L76.9757 122.628C77.6479 122.403 78.3029 122.092 78.8544 121.78C79.406 121.469 79.9575 121.175 80.5091 120.743C80.6297 120.639 80.8021 120.587 80.9055 120.466L93.2119 113.168C103.933 106.838 108.121 97.2745 104.036 88.2815L99.4685 79.4788C98.4688 77.6629 99.3134 75.7779 101.64 74.4289C103.967 73.08 107.207 72.5785 110.327 73.1492L125.477 75.7779C140.645 78.3893 157.019 75.9681 168.257 69.4137L177.892 63.7931C178.409 63.6028 178.909 63.3607 179.322 63.1186C179.77 62.8592 180.27 62.5652 180.684 62.1501L180.822 62.0637C181.029 61.8734 181.218 61.6659 181.408 61.4584C181.942 60.8531 182.287 60.2132 182.476 59.556C182.752 58.6394 182.632 57.6882 182.201 56.7717C181.701 55.7513 180.805 54.8001 179.408 54.0046",fill:"#611F69"}),n.createElement("path",{d:"M179.374 54.1825L123.84 22.0155C122.444 21.2027 120.789 20.6492 119.048 20.3898C118.049 20.2342 117.049 20.1304 115.98 20.1477C115.394 20.165 114.791 20.2169 114.188 20.2688C112.723 20.3898 111.344 20.7184 110.086 21.1854C109.431 21.4275 108.828 21.6869 108.242 22.0328C107.656 22.3787 107.225 22.7764 106.794 23.105C106.656 23.2088 106.656 23.2607 106.518 23.3471L97.5209 28.5872C86.2831 35.1417 82.1637 44.6708 86.6968 53.4735L91.2643 62.2762C92.2639 64.092 91.4194 65.9771 89.0925 67.326C86.7657 68.675 83.4564 69.1419 80.4057 68.6058L65.2554 65.9771C50.1223 63.3657 33.731 65.7869 22.476 72.3413L9.63525 79.8297C8.98029 80.0545 8.37703 80.3312 7.79101 80.6771C7.20499 81.023 6.72239 81.3688 6.32597 81.7666L5.671 82.1471L5.99848 82.0779C3.63717 84.4991 4.2749 87.6466 7.84272 89.7219L62.5493 121.405C62.5493 121.405 63.4111 121.906 63.4284 121.906C65.3415 122.909 67.6167 123.584 69.978 123.739C70.3916 123.774 70.8053 123.774 71.219 123.774C73.0287 123.774 74.9074 123.497 76.5276 122.944L76.993 122.771C77.6652 122.546 78.3201 122.235 78.8717 121.924C79.4232 121.612 79.9748 121.318 80.5263 120.886C80.647 120.782 80.8193 120.73 80.9227 120.609L93.2291 113.311C103.95 106.981 108.138 97.4178 104.053 88.4248L99.4858 79.6221C98.4861 77.8063 99.3306 75.9212 101.657 74.5723C103.984 73.2233 107.225 72.7218 110.344 73.2925L125.495 75.9212C140.662 78.5326 157.036 76.1114 168.274 69.557L177.909 63.9364C178.426 63.7462 178.926 63.504 179.339 63.2619C179.788 63.0025 180.287 62.7085 180.701 62.2935L180.839 62.207C181.046 62.0168 181.235 61.8092 181.425 61.6017C181.959 60.9964 182.304 60.3565 182.494 59.6993C182.769 58.7828 182.649 57.8316 182.218 56.915C181.718 55.8946 180.822 54.9435 179.426 54.1479",fill:"#611F69"}),n.createElement("path",{d:"M179.374 54.3575L123.84 22.1904C122.444 21.3776 120.789 20.8242 119.048 20.5648C118.049 20.4091 117.049 20.3054 115.98 20.3227C115.394 20.3399 114.791 20.3918 114.188 20.4437C112.723 20.5648 111.344 20.8934 110.086 21.3603C109.431 21.6024 108.828 21.8618 108.242 22.2077C107.656 22.5536 107.225 22.9514 106.794 23.2799C106.656 23.3837 106.656 23.4356 106.518 23.5221L97.5209 28.7622C86.2831 35.3166 82.1637 44.8457 86.6968 53.6484L91.2643 62.4511C92.2639 64.267 91.4194 66.152 89.0925 67.501C86.7657 68.8499 83.4564 69.3169 80.4057 68.7807L65.2554 66.152C50.1223 63.5406 33.731 65.9618 22.476 72.5163L9.63525 80.0046C8.98029 80.2294 8.37703 80.5061 7.79101 80.852C7.20499 81.1979 6.72239 81.5438 6.32597 81.9416L5.671 82.322L5.99848 82.2528C3.63717 84.674 4.2749 87.8215 7.84272 89.8968L62.5321 121.58C62.5321 121.58 63.3939 122.081 63.4111 122.081C65.3243 123.084 67.5822 123.759 69.9607 123.914C70.3744 123.949 70.7881 123.949 71.2017 123.949C73.0115 123.949 74.8902 123.672 76.5276 123.119L76.993 122.946C77.6652 122.721 78.3201 122.41 78.8717 122.098C79.4232 121.787 79.9748 121.493 80.5263 121.061C80.647 120.957 80.8193 120.905 80.9227 120.784L93.2291 113.486C103.95 107.156 108.138 97.5927 104.053 88.5998L99.4858 79.7971C98.4861 77.9812 99.3306 76.0961 101.657 74.7472C103.984 73.3983 107.225 72.8967 110.344 73.4674L125.495 76.0961C140.662 78.7076 157.036 76.2864 168.274 69.7319L177.909 64.1113C178.426 63.9211 178.926 63.679 179.339 63.4369C179.788 63.1774 180.287 62.8834 180.701 62.4684L180.839 62.3819C181.046 62.1917 181.235 61.9842 181.425 61.7766C181.959 61.1713 182.304 60.5314 182.494 59.8743C182.769 58.9577 182.649 58.0065 182.218 57.0899C181.718 56.0696 180.822 55.1184 179.426 54.3229",fill:"#611F69"}),n.createElement("path",{d:"M179.374 54.5239L123.84 22.3569C122.444 21.5441 120.789 20.9907 119.048 20.7313C118.049 20.5756 117.049 20.4718 115.98 20.4891C115.394 20.5064 114.791 20.5583 114.188 20.6102C112.723 20.7313 111.344 21.0598 110.086 21.5268C109.431 21.7689 108.828 22.0283 108.242 22.3742C107.656 22.7201 107.225 23.1178 106.794 23.4464C106.656 23.5502 106.656 23.6021 106.518 23.6885L97.5209 28.9287C86.2831 35.4831 82.1637 45.0122 86.6968 53.8149L91.2643 62.6176C92.2639 64.4335 91.4194 66.3185 89.0925 67.6675C86.7657 69.0164 83.4564 69.4833 80.4057 68.9472L65.2554 66.3185C50.1223 63.7071 33.731 66.1283 22.476 72.6827L9.63525 80.1711C8.98029 80.3959 8.37703 80.6726 7.79101 81.0185C7.20499 81.3644 6.72239 81.7103 6.32597 82.108L5.671 82.4885L5.99848 82.4193C3.63717 84.8405 4.2749 87.988 7.84272 90.0633L62.5321 121.746C62.5321 121.746 63.3939 122.248 63.4111 122.248C65.3243 123.251 67.5822 123.942 69.9435 124.081C70.3572 124.115 70.7708 124.115 71.1845 124.115C73.0115 124.115 74.8902 123.839 76.5104 123.285L76.9757 123.112C77.6479 122.888 78.3029 122.576 78.8544 122.265C79.406 121.954 79.9575 121.66 80.5091 121.227C80.6297 121.124 80.8021 121.072 80.9055 120.951L93.2119 113.652C103.933 107.323 108.121 97.7592 104.036 88.7663L99.4685 79.9636C98.4688 78.1477 99.3134 76.2626 101.64 74.9137C103.967 73.5647 107.207 73.0632 110.327 73.6339L125.477 76.2626C140.645 78.874 157.019 76.4529 168.257 69.8984L177.892 64.2778C178.409 64.0876 178.909 63.8455 179.322 63.6033C179.77 63.3439 180.27 63.0499 180.684 62.6349L180.822 62.5484C181.029 62.3582 181.218 62.1506 181.408 61.9431C181.942 61.3378 182.287 60.6979 182.476 60.0408C182.752 59.1242 182.632 58.173 182.201 57.2564C181.701 56.2361 180.805 55.2849 179.408 54.4893",fill:"#611F69"}),n.createElement("path",{d:"M179.374 54.694L123.84 22.5097C122.444 21.6969 120.789 21.1435 119.048 20.8841C118.049 20.7284 117.049 20.6247 115.98 20.6419C115.394 20.6592 114.791 20.7111 114.188 20.763C112.723 20.8841 111.344 21.2127 110.086 21.6796C109.431 21.9217 108.828 22.1811 108.242 22.527C107.656 22.8729 107.225 23.2707 106.794 23.5992C106.656 23.703 106.656 23.7549 106.518 23.8414L97.5209 29.0815C86.2831 35.6359 82.1637 45.165 86.6968 53.9677L91.2643 62.7704C92.2639 64.5863 91.4194 66.4713 89.0925 67.8203C86.7657 69.1692 83.4564 69.6361 80.4057 69.1L65.2554 66.4713C50.1223 63.8599 33.731 66.2811 22.476 72.8356L9.63525 80.3239C8.98029 80.5487 8.37703 80.8254 7.79101 81.1713C7.20499 81.5172 6.72239 81.8631 6.32597 82.2609L5.671 82.6413L5.99848 82.5721C3.63717 84.9933 4.2749 88.1408 7.84272 90.2161L62.5149 121.899L63.3939 122.4C65.3071 123.404 67.565 124.095 69.9263 124.251C70.3399 124.286 70.7536 124.286 71.1673 124.286C72.9943 124.286 74.873 124.009 76.5104 123.455L76.9757 123.282C77.6479 123.058 78.3029 122.746 78.8544 122.435C79.406 122.124 79.9575 121.83 80.5091 121.397C80.6297 121.294 80.8021 121.259 80.9055 121.138L93.2119 113.84C103.933 107.51 108.121 97.9466 104.036 88.9537L99.4685 80.151C98.4688 78.3351 99.3134 76.45 101.64 75.1011C103.967 73.7521 107.207 73.2506 110.327 73.8213L125.477 76.45C140.645 79.0614 157.019 76.6403 168.257 70.0858L177.892 64.4652C178.409 64.275 178.909 64.0329 179.322 63.7907C179.77 63.5313 180.27 63.2373 180.684 62.8223L180.822 62.7358C181.029 62.5456 181.218 62.338 181.408 62.1305C181.942 61.5252 182.287 60.8853 182.476 60.2282C182.752 59.3116 182.632 58.3604 182.201 57.4438C181.701 56.4235 180.805 55.4723 179.408 54.6767",fill:"#611F69"}),n.createElement("path",{d:"M179.374 54.8748L123.84 22.6905C122.444 21.8777 120.789 21.3243 119.048 21.0649C118.049 20.9092 117.049 20.8055 115.98 20.8227C115.394 20.84 114.791 20.8919 114.188 20.9438C112.723 21.0649 111.344 21.3935 110.086 21.8604C109.431 22.1025 108.828 22.3619 108.242 22.7078C107.656 23.0537 107.225 23.4515 106.794 23.78C106.656 23.8838 106.656 23.9357 106.518 24.0222L97.5209 29.2623C86.2831 35.8167 82.1637 45.3458 86.6968 54.1485L91.2643 62.9512C92.2639 64.7671 91.4194 66.6521 89.0925 68.0011C86.7657 69.35 83.4564 69.817 80.4057 69.2808L65.2554 66.6521C50.1223 64.0407 33.731 66.4619 22.476 73.0164L9.63525 80.5047C8.98029 80.7295 8.37703 81.0062 7.79101 81.3521C7.20499 81.698 6.72239 82.0439 6.32597 82.4416L5.671 82.8221L5.99848 82.7529C3.63717 85.1741 4.2749 88.3216 7.84272 90.3969L62.5149 122.062L63.3939 122.564C65.3071 123.567 67.565 124.259 69.9263 124.414C70.3399 124.449 70.7536 124.449 71.1673 124.449C72.9943 124.449 74.8902 124.172 76.5276 123.619L76.993 123.446C77.6652 123.221 78.3201 122.91 78.8717 122.599C79.4232 122.287 79.9748 121.993 80.5263 121.561C80.647 121.457 80.8193 121.423 80.9227 121.301L93.2291 114.003C103.95 107.674 108.138 98.1101 104.053 89.1172L99.4858 80.3145C98.4861 78.4986 99.3306 76.6135 101.657 75.2646C103.984 73.9157 107.225 73.4141 110.344 73.9848L125.495 76.6135C140.662 79.2249 157.036 76.8038 168.274 70.2493L177.909 64.6287C178.426 64.4385 178.926 64.1964 179.339 63.9542C179.788 63.6948 180.287 63.4008 180.701 62.9858L180.839 62.8993C181.046 62.7091 181.235 62.5015 181.425 62.294C181.959 61.6887 182.304 61.0488 182.494 60.3917C182.769 59.4751 182.649 58.5239 182.218 57.6073C181.718 56.587 180.822 55.6358 179.426 54.8403",fill:"#611F69"}),n.createElement("mask",{id:"mask2_6786_176",maskUnits:"userSpaceOnUse",x:"0",y:"18",width:"188",height:"110"},n.createElement("path",{d:"M0 86.026L116.049 18.3541L187.233 59.6006L71.1841 127.255L0 86.026Z",fill:"white"})),n.createElement("g",{mask:"url(#mask2_6786_176)"},n.createElement("path",{d:"M179.371 55.0538L123.837 22.8695C122.441 22.0567 120.786 21.5551 119.045 21.2438C118.046 21.1228 117.046 21.019 115.977 21.0017C115.391 21.0363 114.788 21.0709 114.185 21.1228C112.72 21.2611 111.341 21.5378 110.083 22.0394C109.428 22.2642 108.825 22.5409 108.239 22.8868C107.653 23.2327 107.17 23.5785 106.791 23.959C106.653 24.0455 106.653 24.1147 106.515 24.2011L97.5178 29.4412C86.2801 35.9957 82.1607 45.5248 86.6937 54.3275L91.2612 63.1302C92.2609 64.946 91.4163 66.8311 89.0895 68.18C86.7627 69.529 83.4534 69.9959 80.4026 69.4598L65.2523 66.8311C50.1192 64.2197 33.7279 66.6409 22.4729 73.1953L9.6322 80.6837C8.97724 80.9085 8.37398 81.1852 7.78796 81.5311C7.20194 81.877 6.71934 82.2229 6.32291 82.6206L5.66795 83.0011L5.99543 82.9319C3.63412 85.3531 4.27185 88.5006 7.83967 90.5759L63.3736 122.743C65.2351 123.815 67.5447 124.438 69.906 124.593C70.3197 124.628 70.7333 124.628 71.147 124.628C72.974 124.628 74.8699 124.369 76.5246 123.798L76.9899 123.625C77.6621 123.4 78.3171 123.089 78.8686 122.778C79.4202 122.466 79.92 122.086 80.5233 121.74C80.6267 121.619 80.8163 121.602 80.9197 121.48L93.2089 114.182C103.93 107.853 108.118 98.2891 104.033 89.2962L99.4655 80.4935C98.4658 78.6776 99.3104 76.7925 101.637 75.4436C103.964 74.0946 107.204 73.5931 110.324 74.1638L125.474 76.7925C140.642 79.4039 157.016 76.9827 168.254 70.4283L177.889 64.8077C178.406 64.6175 178.906 64.3753 179.319 64.1332C179.767 63.8738 180.267 63.5798 180.681 63.1648L180.819 63.0783C181.026 62.888 181.215 62.6805 181.405 62.473C181.939 61.885 182.284 61.2278 182.473 60.5706C182.749 59.6541 182.663 58.6856 182.198 57.7863C181.749 56.7486 180.801 55.8148 179.405 55.0192",fill:"#611F69"})),n.createElement("path",{d:"M71.5108 106.287V124.636C71.5108 124.636 70.4594 124.636 70.0458 124.619C69.2874 124.584 68.1498 124.394 68.1498 124.394C66.2883 124.135 64.7371 123.529 63.0997 122.578L8.03113 90.6707C5.94559 89.4428 4.6012 88.3359 4.6012 85.8975C4.6012 85.8975 4.6012 72.754 4.6012 68.3267C4.6012 68.1191 4.73908 67.5138 4.73908 67.5138L71.4936 106.27L71.5108 106.287Z",fill:"#A350AF"}),n.createElement("mask",{id:"mask3_6786_176",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"188",height:"109"},n.createElement("path",{d:"M0.0524902 67.7064L116.17 0L187.355 41.2464L71.2538 108.936L0.0524902 67.7064Z",fill:"white"})),n.createElement("g",{mask:"url(#mask3_6786_176)"},n.createElement("path",{d:"M77.1344 105.266C76.9965 105.335 76.8069 105.387 76.7379 105.422C76.7207 105.422 76.7035 105.422 76.669 105.439M6.1571 64.5729C6.1571 64.5729 6.20881 64.521 6.22605 64.5037C6.36393 64.4346 6.36393 64.3481 6.48459 64.2789M177.93 46.5006C177.809 46.5525 177.688 46.587 177.568 46.6389C177.43 46.7081 177.24 46.76 177.171 46.7946C175.517 47.3826 173.586 47.642 171.742 47.642C168.95 47.642 166.158 47.0194 163.951 45.7569L108.417 13.5726C104.832 11.4973 104.212 8.2806 106.659 5.85942L97.6623 11.0995C86.4073 17.654 82.2706 27.1831 86.8381 35.9858L91.4056 44.7885C92.4053 46.6043 91.5435 48.4894 89.2339 49.8383C86.9243 51.1873 83.5978 51.6542 80.5471 51.1181L65.3967 48.4894C50.2464 45.8607 33.8724 48.2992 22.6173 54.8536L9.77663 62.342C11.5692 61.6848 13.6202 61.3216 15.7402 61.3389C16.7744 61.3389 17.6707 61.4081 18.7048 61.5637C30.1322 59.1944 58.399 63.1894 69.6712 64.9707C71.1363 65.1955 72.4462 65.6624 73.4976 66.2677C74.549 66.873 75.3246 67.634 75.7383 68.4814C78.8062 74.984 85.7006 91.2058 81.8397 97.9505C81.8742 98.0197 81.9087 98.0889 81.9432 98.1581C82.7705 99.7664 82.4258 101.513 81.0124 103.035L93.3533 95.8407C104.074 89.511 108.262 79.9474 104.177 70.9544L99.6099 62.1517C98.6102 60.3359 99.472 58.4508 101.782 57.1019C104.091 55.7529 107.349 55.2514 110.468 55.8221L125.619 58.4508C140.752 61.0622 157.143 58.641 168.398 52.0866L177.964 46.5179M181.446 44.2696C181.325 44.3907 181.187 44.529 181.049 44.6501C180.998 44.7193 180.929 44.7712 180.86 44.8403L180.963 44.7712C181.136 44.5982 181.291 44.4426 181.446 44.2696Z",fill:"#F7F4F7"}),n.createElement("path",{d:"M59.1728 101.87L12.274 74.6835ZM73.513 66.244C72.4617 65.6387 71.1517 65.1891 69.6867 64.947C58.4144 63.183 30.1649 59.1707 18.7203 61.54C18.7547 61.54 18.7892 61.54 18.8237 61.54C20.5473 61.834 22.2019 62.3355 23.598 63.1484L79.1319 95.3154C80.4419 96.0763 81.3381 96.9238 81.838 97.8922C85.6988 91.1475 78.8044 74.9256 75.7365 68.4231C75.34 67.5757 74.5472 66.8147 73.4958 66.2094",fill:"#EABDFB"}),n.createElement("path",{d:"M79.1324 95.3556L23.5985 63.1886C22.2024 62.3757 20.5477 61.8742 18.8242 61.5802C18.7897 61.5802 18.7552 61.5802 18.7207 61.5802C17.7038 61.4246 16.8076 61.3554 15.7562 61.3554C13.6362 61.3554 11.5851 61.7013 9.79257 62.3585C9.12037 62.5833 8.53435 62.8427 7.9311 63.2059C7.32784 63.569 6.86247 63.8976 6.48329 64.2954C6.36263 64.3992 6.36263 64.4337 6.24198 64.5202C6.22475 64.5375 6.19028 64.5721 6.17304 64.5894C3.79449 67.0106 4.44945 70.1754 8.00004 72.2334L12.2918 74.7237L59.2078 101.91L63.5512 104.418C65.7574 105.697 68.5496 106.303 71.3418 106.303C73.1688 106.303 75.0648 106.043 76.7022 105.473C76.7194 105.473 76.7366 105.473 76.7711 105.455C76.8401 105.403 77.0469 105.369 77.1675 105.3C77.8225 105.075 78.4947 104.764 79.0118 104.452C79.5289 104.141 80.0804 103.761 80.6664 103.415C80.7871 103.294 80.9077 103.173 81.0284 103.051C82.4589 101.512 82.7864 99.7829 81.9591 98.1746C81.9246 98.1054 81.8902 98.0362 81.8557 97.967C81.3559 96.9986 80.4596 96.1511 79.1497 95.3902",fill:"#C474D3"}),n.createElement("path",{d:"M179.497 36.6712L123.963 4.50419C122.567 3.69137 120.913 3.18984 119.189 2.87854C118.189 2.77478 117.19 2.65372 116.121 2.65372C115.535 2.68831 114.932 2.7229 114.328 2.75749C112.863 2.91313 111.485 3.18984 110.226 3.67407C109.554 3.91619 108.968 4.1756 108.365 4.52148C107.762 4.86737 107.296 5.21325 106.917 5.59372C106.779 5.6629 106.796 5.74937 106.658 5.83584C104.211 8.25701 104.831 11.4737 108.417 13.549L163.95 45.716C166.157 46.9958 168.949 47.6011 171.741 47.6011C173.603 47.6011 175.516 47.3244 177.17 46.7537C177.239 46.7191 177.429 46.6845 177.567 46.598C177.687 46.5635 177.808 46.5116 177.929 46.4597C178.463 46.2522 178.98 45.9928 179.411 45.7506C179.876 45.4739 180.393 45.1799 180.824 44.7822C180.893 44.7303 180.945 44.6611 181.014 44.5919C181.152 44.4709 181.29 44.3498 181.41 44.2115C182.014 43.5889 182.376 42.9144 182.582 42.1881C182.841 41.2715 182.772 40.303 182.307 39.4037C181.824 38.3661 180.893 37.4322 179.497 36.6366",fill:"#C474D3"})));HourGlassIllustration.displayName="HourGlassIllustration";var E=a(0x4d9b2df9);let C=a.p+"restricted-illustration-4b8e19b.svg";var k=a(0x119bfe74a),v=a.n(k);let SlackFileViewerEmptyState=({fileThumbnailURL:e,productIcon:t,primaryText:a,secondaryText:r,showOpenInAppAction:c=!1,openInAppComponentType:d="button",externalUrl:m,openInAppActionText:u,fallbackImageUrl:p=null,fallbackIconType:h,appId:_,isLoading:f=!1,renderType:b,downloadProgress:g=0,isRangeRequestEnabled:y=!1,isRestricted:A=!1,forceLightMode:x=!1})=>{let k=(0,n.useMemo)(()=>b===E.P.LOADER||f,[b,f]),S=(0,n.useMemo)(()=>t?{...t,image_width:64,image_height:64}:null,[t]),I=(0,n.useCallback)(()=>n.createElement("div",{className:v().fallbackThumbnailContainer},n.createElement("div",{className:"c-message_attachment__image--error_container"},n.createElement("div",{className:`c-message_attachment__image--default_icon icon_${h}`}))),[h]),w=(0,n.useMemo)(()=>k?n.createElement("div",{className:v().hourGlassIllustration},n.createElement(HourGlassIllustration,null)):A?n.createElement("img",{src:C,alt:"","aria-hidden":"true"}):e||h?n.createElement(l.A,{className:v().thumbnailImage,src:e??"",alt:"",width:"100%",height:"auto",renderError:I}):S?n.createElement("div",{className:v().emptyStateImage},n.createElement(s.O,{imageBlock:S,displayImageWithoutLink:!0,classNames:v().productIconImage})):p?n.createElement("div",{className:v().emptyStateImage,key:p},n.createElement("img",{src:p,alt:"",className:v().fallbackImage})):n.createElement(o.z,{appId:_,width:64,height:64,imageClassName:v().productIconImage}),[k,A,e,h,S,p,_,I]);return n.createElement("div",{className:v().container},w,a&&n.createElement("div",{className:i()(v().primaryText,{[v().forceLightMode]:x})},a),r&&n.createElement("div",{className:v().secondaryText},r),k&&n.createElement(LoaderBar,{percentage:g,showIndeterminate:!y}),c&&n.createElement(OpenInAppAction,{externalUrl:m,openInAppActionText:u,openInAppComponentType:d}))};SlackFileViewerEmptyState.displayName="SlackFileViewerEmptyState"},0x1d00c179d:(e,t,a)=>{"use strict";a.d(t,{r:()=>SlackFileViewerError});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xc4307c22),l=a(0x1d8e3fa37);let o=new r.Ay("work-objects"),SlackFileViewerError=({fileType:e,appName:t,externalUrl:a,appId:r})=>n.createElement(i.N,{fallbackImageUrl:l,primaryText:o.t("Sorry, we couldn\u2019t load this {fileType}.",{fileType:e||"file"}),secondaryText:o.t("Something went wrong with {productName}.",{productName:t||""}),showOpenInAppAction:!0,openInAppComponentType:"button",externalUrl:a,appId:r});SlackFileViewerError.displayName="SlackFileViewerError"},0xc7a53054:(e,t,a)=>{"use strict";a.d(t,{t:()=>SlackFileViewer});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x40c0d834),o=a(0x10a716a94),s=a(0xe8e6ff7d),c=a(0xbc5eb268),d=a(0x198199619),m=a(0x159a9f27a),u=a(0x230670247),p=a(0x21311882d),h=a(0x14e354fcb),_=a(0x107ab9ee6),f=a(0xc4307c22),b=a(0x1d00c179d),g=a(0x1aba0bed8),y=a(0x3711e82d),A=a(0x17f03e906),x=a(0x226892387),E=a(0x5dd1c0f2),C=a(0x1fd61b7a6),k=a.n(C);let SlackFileViewer=({appId:e,slackFileId:t,fullSizePreviewURL:a,viewContext:r,hideZoomControls:C=!1,onDidZoomLevelChange:v,onCloseFileViewer:S,enableZoomInteractions:I=!0,handleCustomReset:w,showPrevFilePreviewButton:T=!1,showNextFilePreviewButton:N=!1,onPrevFilePreview:M,onNextFilePreview:R,showLoader:P=!0,thumbnailImage:L,mimeType:O,showFilmStrip:D=!1,externalUrl:F,entityId:U,error:B,onError:H,fileName:W,woFileType:V,reloadOnFileChange:G,onPDFDownloaded:q,productIcon:j,productName:z,isPDFURLReadToDownload:K=!1,fallbackIconType:$,withCredentials:Y=!0,isRangeRequestEnabled:Q=!1,isTableauAnalytic:Z,forceLightMode:J})=>{let[X,ee]=(0,n.useState)(0),[et,ea]=(0,n.useState)(5),{trackClogRef:en}=(0,p.c)(),er=(0,x.d4)(A.c),ei=(0,m.A)(),{image:el,pdf:eo,slackFile:es,fileError:ec}=(0,h.cg)({slackFileId:t,fullSizePreviewURL:a,mimeType:O}),ed=(0,n.useCallback)(e=>{v&&v(e),ee(e),en?.current?.({action:y.UiAction.CLICK,elementType:y.ElementType.BUTTON,elementName:"file_preview_image_zoom_level_change",elementValue:"file_preview_image_zoom_level_change"})},[v,en]),em=(!!B||!!ec)&&!P,eu=(0,x.d4)(t=>(0,E.sO)(t,e)),{renderProps:ep,renderType:eh}=(0,_.g)({error:P?null:B||ec,productIcon:j,fileType:V,fileThumbnailURL:L,fileName:W,appName:eu?.name,productName:z,externalUrl:F,fallbackIconType:$}),e_=(0,n.useCallback)(e=>{e.percentage>5&&ea(e.percentage)},[]),ef=(0,n.useMemo)(()=>n.createElement(f.N,{key:eh,fileThumbnailURL:ep.fileThumbnailURL,productIcon:ep.productIcon,primaryText:ep.primaryText,secondaryText:ep.secondaryText,showOpenInAppAction:ep.showOpenInAppAction,openInAppActionText:ep.openInAppActionText,openInAppComponentType:ep.openInAppComponentType,externalUrl:ep.externalUrl,fallbackImageUrl:ep.fallbackImageUrl,fallbackIconType:ep.fallbackIconType,isRestricted:ep.isRestricted,appId:e,isLoading:P,renderType:eh,downloadProgress:et,isRangeRequestEnabled:Q,forceLightMode:J}),[ep,J,eh,e,P,et,Q]),eb=(0,n.useMemo)(()=>n.createElement(b.r,{fileType:V,externalUrl:F,appName:eu?.name,appId:e}),[V,eu?.name,F,e]);(0,n.useEffect)(()=>{ei.imageViewerHandlers?.handleResize?.()},[ei.imageViewerHandlers]);let eg={backgroundImage:`url(${L})`};return er?n.createElement("div",{className:i()(k().slackFileViewer,{[k().hideSlackFileViewerFilmStrip]:!D})},n.createElement("div",{className:k().backgroundImage,style:eg}),n.createElement(o.A,{subtype:"files"},n.createElement(l.A,{eventId:y.EventId.SLACK_FILE_VIEWER_VIEW,uiComponentName:y.UiComponentName.SLACK_FILE_VIEWER,clogImpression:!0,clogImpressionDuration:!0},em&&ef,P&&!em&&ef,!P&&!em&&n.createElement(m.r.Provider,{value:ei},n.createElement(s.A,{image:el||void 0,pdf:eo||void 0,file:es||void 0,onDidZoomLevelChange:ed,hideZoomControls:C,viewContext:r,key:Z?U:t??a,closeFileViewer:S,withoutZoomInteractions:!I,customHandleReset:w,onPDFDownloaded:q,isLoading:!1,loaderComponent:ef,reloadOnFileChange:G},r!==u.wj&&r!==d.s.CANVAS&&n.createElement(c.V,{showPrev:T&&0===X,showNext:N&&0===X,onPrev:M,onNext:R})))))):n.createElement("div",{className:i()(k().slackFileViewer,{[k().hideSlackFileViewerFilmStrip]:!D})},n.createElement("div",{className:k().backgroundImage,style:eg}),n.createElement(o.A,{subtype:"files"},n.createElement(l.A,{uiComponentName:y.UiComponentName.SLACK_FILE_VIEWER,uiStep:y.UiStep.SLACK_FILE_VIEWER,clogImpression:!0,clogImpressionDuration:!0},em&&ef,!em&&n.createElement(m.r.Provider,{value:ei},n.createElement(g.A,{image:el,pdf:eo,file:es,onDidZoomLevelChange:ed,hideZoomControls:C,viewContext:r,key:Z?U:t??a,closeFileViewer:S,withoutZoomInteractions:!I,customHandleReset:w,onPDFDownloaded:q,loaderComponent:ef,errorComponent:eb,isPDFURLReadToDownload:K,showLoader:P,withCredentials:Y,onDownloadProgress:e_,isRangeRequestEnabled:Q,isTableauAnalytic:Z,entityId:U,externalUrl:F,onError:H},r!==u.wj&&r!==d.s.CANVAS&&n.createElement(c.V,{showPrev:T&&0===X,showNext:N&&0===X,onPrev:M,onNext:R}))))))};SlackFileViewer.displayName="SlackFileViewer"},0x1aba0bed8:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x14fad6485),o=a(0x1229d92d),s=a(0xb1ea448c),c=a(0xb5d4716b),d=a(0x8db27ef6),m=a(0x1f0d39659),u=a(0x3eee9173),p=a(0x177c6bf9e),h=a(0x53de82ab),_=a(0x70657567),f=a(0x207eb3801),b=a(0x1c5116e43),g=a(0x105ceccf1),y=a.n(g);let AnalyticsMetricViewer=({entityId:e,url:t,loaderComponent:a,errorComponent:r,onError:i})=>{let l=(0,f.f1)(e),o=(0,f.u2)(e),s=(0,f.C$)(e),c=t?.split(/\/tableau\//)[0],[d,m]=(0,n.useState)(),g=(0,n.useMemo)(()=>d?(0,_.f)(d,{showLiveUserContext:!0}):void 0,[d]),A=(0,n.useCallback)(e=>{(0,p.rl)(e.state)?i?.({code:e.state}):m(Date.now())},[i]);return(0,h._)({singleOrgDetails:[{orgId:l??"",salesforceUrl:c??""}]}),n.createElement("div",{className:y().analyticsMetricViewerContainer},n.createElement(u.Y,{salesforceOrgId:l,submetricId:o,url:t??"",loaderComponent:a,errorComponent:r,onEmbedComplete:A,source:b.tL.FileViewer,analyticType:s}),g&&n.createElement("div",{className:y().analyticsMetricTimestamp,"data-qa":"analytics-metric-viewer-timestamp"},g))};AnalyticsMetricViewer.displayName="AnalyticsMetricViewer";var A=a(0x120c268ad),x=a.n(A),E=a(0x18dac2b8e),C=a(0x20482ad21),k=a(0x230670247),v=a(0x15a8943a8);let S=new C.Ay("file_viewer"),SlackBrowserPDFViewer=({src:e,viewContext:t,isPDFURLReadToDownload:a,loaderComponent:r})=>{let i="themed_blur"!==(0,v.K5)(),l=(0,E.KV)()||(0,E.YG)()||(0,E.Yl)()||(0,E.f9)(),[o,c]=(0,n.useState)(!0),d=(0,n.useMemo)(()=>!o&&a?null:r||n.createElement("div",{className:"p-pdf_viewer__loading"},n.createElement(s.A,null)),[o,r,a]),m=(0,n.useCallback)(()=>{c(!1)},[]);return n.createElement("div",{className:x()("p-pdf_viewer",{"p-pdf_viewer--media_viewer":t===k.wj&&i})},d,a&&e&&n.createElement("iframe",{className:"p-pdf_viewer__frame",src:e??"",title:S.t("PDF Viewer"),onLoad:m,sandbox:l?"allow-scripts allow-popups":void 0,credentialless:l?"credentialless":void 0}))};SlackBrowserPDFViewer.displayName="SlackBrowserPDFViewer";var I=a(0x1a4d0dd52),w=a(0xbd3de346),T=a(0x226892387),N=a(0x14149c126),M=a(0x1fcbb004d);let SlackFileContainer=({file:e,image:t,pdf:a,youtube:o,children:u,onDidZoomLevelChange:p=i.A,closeFileViewer:h,withoutZoomInteractions:_=!1,viewContext:f,hideZoomControls:b=!1,customHandleReset:g=i.A,onPDFDownloaded:y=i.A,loaderComponent:A=null,errorComponent:x=null,isPDFURLReadToDownload:E=!1,showLoader:C=!1,withCredentials:k=!0,onDownloadProgress:v,isRangeRequestEnabled:S=!1,hideFilmStrip:R=!1,isTableauAnalytic:P=!1,entityId:L,externalUrl:O,onError:D})=>{let F=(0,r.wA)(),{windowRef:U}=(0,n.useContext)(l._0),B=h||((...e)=>F((0,M.O)(...e))),[H,W]=(0,n.useState)(t&&t.orientation?t.orientation:0),V=(0,T.d4)(e=>"on"===(0,N._Z)(e,"wo_browser_pdf_viewer")),G=(0,n.useMemo)(()=>t?{...t,orientation:H}:null,[t,H]),rotateImage=(e,t)=>{W(e),t(e)},renderAnalyticsMetricViewer=()=>P?n.createElement(AnalyticsMetricViewer,{entityId:L,url:O,loaderComponent:A,errorComponent:x,onError:D}):null;renderAnalyticsMetricViewer.displayName="renderAnalyticsMetricViewer";let renderImageViewer=()=>!t||P?null:n.createElement(m.Ay,{key:t.src,onDidZoomLevelChange:p,image:G,closeImageViewer:B,withoutZoomInteractions:_,viewContext:f,rotateImage:rotateImage,hideZoomControls:b,customHandleReset:g});renderImageViewer.displayName="renderImageViewer";let renderPDFViewer=()=>a?V?n.createElement(SlackBrowserPDFViewer,{key:a.src,src:a.src,viewContext:f,onPDFDownloaded:y,loaderComponent:A,errorComponent:x,isPDFURLReadToDownload:E}):n.createElement(I.A,{key:a.src,file:e,src:a.src,isConvertedPdf:a.isConvertedPdf,viewContext:f,windowRef:U,onPDFDownloaded:y,loaderComponent:A,errorComponent:x,isPDFURLReadToDownload:E,enableZoomControls:!b,onClose:B,withCredentials:k,onDownloadProgress:v,isRangeRequestEnabled:S,hideFilmStrip:R}):null;renderPDFViewer.displayName="renderPDFViewer";let renderCsvTsvViewer=()=>e&&((0,w.bB)(e)||(0,w.y)(e))?n.createElement(c.A,{fileId:e?.id,hideLineNum:!0}):null;renderCsvTsvViewer.displayName="renderCsvTsvViewer";let renderYoutubeViewer=()=>o?n.createElement(d.A,{src:o.src,closeViewer:B}):null;renderYoutubeViewer.displayName="renderYoutubeViewer";let renderLoader=()=>a||!C?null:A||n.createElement(s.A,null);return renderLoader.displayName="renderLoader",n.createElement("div",{className:"p-file_viewer__content"},renderLoader(),renderImageViewer(),renderPDFViewer(),renderCsvTsvViewer(),renderYoutubeViewer(),renderAnalyticsMetricViewer(),u)};SlackFileContainer.displayName="SlackFileContainer";let R=(0,o.A)(SlackFileContainer)},0x1a4d0dd52:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0xe874a88a),s=a(0x18dac2b8e),c=a(0x16998c9bf),d=a(0x20482ad21),m=a(951303e3),u=a(0xd35ac109),p=a(0xb1ea448c),h=a(0x15fb82076),_=a(0x6e87d4ec),f=a(0x230670247),b=a(0x21311882d);let g=(0,a(0xf8dd7f80).getGenericLogger)({label:"HTTP_RANGE_TRANSPORT"}),y=class{url;chunkSize;maxConcurrent;onProgress;withCredentials;totalSize=0;chunks=new Map;abortController=null;isDownloading=!1;isCancelled=!1;timings=[];constructor(e,t={}){this.url=e,this.chunkSize=t.chunkSize||1048576,this.maxConcurrent=t.maxConcurrent||3,this.onProgress=t.onProgress||null,this.withCredentials=t.withCredentials||!0,this.timings=[]}buildRequestUrl(e,t){let a=new URL(this.url);return void 0!==e&&void 0!==t&&a.searchParams.set("range",`${e}-${t}`),a.toString()}async getFileSize(){try{let e=this.buildRequestUrl(),t=await fetch(e,{method:"HEAD",credentials:this.withCredentials?"include":"same-origin",signal:this.abortController?.signal});if(!t.ok)throw Error(`HEAD request failed: ${t.status}`);let a=t.headers.get("content-length");if(!a)throw Error("Content-Length header not found");return parseInt(a,10)}catch(e){if(e instanceof Error&&"AbortError"===e.name)throw Error("Download cancelled");if(e instanceof TypeError&&"Failed to fetch"===e.message)throw Error("CORS_ERROR");throw g.error(Error((0,c.u1)(e)),{message:"Failed to get file size"}),e}}async downloadChunk(e,t,a,n=0){if(this.isCancelled)throw Error("Download cancelled");let r=Math.min(a,this.totalSize-1);try{g.info(`Downloading chunk ${e}: bytes ${t}-${r} (attempt ${n+1} of 3)`);let a=this.buildRequestUrl(t,r),i=await fetch(a,{method:"GET",headers:{Range:`bytes=${t}-${r}`},credentials:this.withCredentials?"include":"same-origin",signal:this.abortController?.signal});if(!i.ok)throw Error(`Chunk ${e} failed: ${i.status}`);let l=await i.arrayBuffer(),o=new Uint8Array(l),[s]=performance.getEntriesByName(a),c="transferSize"in s&&0===s.transferSize,d=s.responseStart-s.requestStart,m=s.responseEnd-s.responseStart;if(this.timings.push({chunk:e,ttfb:d,downloadTime:m,isCached:c}),this.isCancelled)throw Error("Download cancelled");this.chunks.set(e,o),g.info(`\u{2713} Chunk ${e} downloaded: ${o.length} bytes`),this.onProgress&&!this.isCancelled&&this.updateProgress()}catch(i){if(i instanceof Error&&"AbortError"===i.name)throw Error("Download cancelled");if(n+1>=3)throw g.error(i,{message:`Failed to download chunk ${e} after 3 attempts`}),i;g.warn(`Retrying chunk ${e} after error: ${i.message}`);let r=2**n*500;return await new Promise(e=>setTimeout(e,r)),this.downloadChunk(e,t,a,n+1)}}updateProgress(){if(!this.onProgress)return;let e=Array.from(this.chunks.values()).reduce((e,t)=>e+t.length,0);this.onProgress({downloaded:e,total:this.totalSize,percentage:this.totalSize?e/this.totalSize*100:0})}async processDownloads(e){let t=[];for(let a=0;a<e.length;a++){let n=(0,e[a])().then(()=>{let e=t.indexOf(n);e>-1&&t.splice(e,1)}).catch(e=>{let a=t.indexOf(n);throw a>-1&&t.splice(a,1),e});t.push(n),t.length>=this.maxConcurrent&&await Promise.race(t),a<e.length-1&&await new Promise(e=>setTimeout(e,10))}await Promise.all(t)}combineChunks(){g.info("Combining chunks into single array...");let e=new Uint8Array(this.totalSize),t=0;for(let[a,n]of Array.from(this.chunks.entries()).sort(([e],[t])=>e-t))e.set(n,t),t+=n.length;return g.info(`\u{2713} Final array created: ${e.length} bytes`),e.buffer}getProgress(){let e=Array.from(this.chunks.values()).reduce((e,t)=>e+t.length,0);return{downloaded:e,total:this.totalSize,percentage:this.totalSize?e/this.totalSize*100:0}}async download(){if(this.isDownloading)throw Error("Download already in progress");try{this.isDownloading=!0,this.isCancelled=!1,this.abortController=new AbortController,g.info("Starting parallel download..."),performance.clearResourceTimings();let e=performance.now();if(this.totalSize=await this.getFileSize(),g.info(`File size: ${this.totalSize} bytes (${(this.totalSize/1024/1024).toFixed(2)} MB)`),this.isCancelled)throw Error("Download cancelled");let t=Math.ceil(this.totalSize/this.chunkSize);g.info(`Downloading in ${t} chunks of ${this.chunkSize} bytes each`);let a=[];for(let e=0;e<t;e++){let t=e*this.chunkSize,n=t+this.chunkSize-1;a.push(()=>this.downloadChunk(e,t,n))}if(g.info(`Starting ${a.length} downloads with max ${this.maxConcurrent} concurrent...`),await this.processDownloads(a),this.isCancelled)throw Error("Download cancelled");let n=this.combineChunks();if(n.byteLength!==this.totalSize)throw g.error(Error(`Size mismatch: expected ${this.totalSize}, got ${n.byteLength}`),{message:"Download failed"}),Error(`Size mismatch: expected ${this.totalSize}, got ${n.byteLength}`);let r=performance.now()-e,i=this.totalSize/1024/1024/(r/1e3);return g.info(`\u{2713} Download completed in ${r.toFixed(2)}ms at ${i.toFixed(2)} MB/s`),this.cleanup(),n}catch(e){throw g.error(Error((0,c.u1)(e)),{message:"Download failed"}),this.cleanup(),e}finally{this.isDownloading=!1}}cleanup(){this.chunks.clear(),this.abortController=null,this.totalSize=0}cancel(){g.info("Cancelling download..."),this.isCancelled=!0,this.abortController&&this.abortController.abort(),this.cleanup(),g.info("Download cancelled")}isActive(){return this.isDownloading}wasCancelled(){return this.isCancelled}getTimings(){return this.timings}getTimingsSummary(){let e=this.timings.filter(e=>!e.isCached),t=this.timings.length-e.length;return{avgTtfb:e.length>0?e.reduce((e,t)=>e+t.ttfb,0)/e.length:0,avgDownloadTime:e.length>0?e.reduce((e,t)=>e+t.downloadTime,0)/e.length:0,cachedChunkCount:t,nonCachedChunkCount:e.length,totalChunkCount:this.timings.length}}};var A=a(0x15a8943a8),x=a(0x25005369a),E=a(0x3711e82d),C=a(0x1ec68d6a3),k=a(0x1d600678),v=a(0xeeae4283),S=a(0x226892387),I=a(0x15f2fd44c),w=a(0x1fb2d2a87),T=a(0x16ffed5ab);let N=new d.Ay("file_viewer");var M=((n=M||{}).IFRAME_READY="pdf_iframe_ready",n.CORRUPT_PDF="corrupt_pdf",n.CLOSE_FILE_VIEWER="close_file_viewer",n.PDF_PAGE_COUNT="pdf_pages",n.PDF_RENDERED="pdf_rendered",n);let SlackFilePDFViewer=({src:e=null,file:t,isConvertedPdf:a=!1,pdfViewerPath:n=null,viewContext:i=null,loaderComponent:d=null,errorComponent:g=null,onPDFDownloaded:M,windowRef:R,isPDFURLReadToDownload:P=!0,enableZoomControls:L=!1,onClose:O,enableDragScroll:D=!0,withCredentials:F=!0,onDownloadProgress:U,isRangeRequestEnabled:B=!1,hideFilmStrip:H=!1})=>{let{trackClogRef:W,logEventTime:V}=(0,b.c)(),[G,q]=(0,r.useState)(!0),[j,z]=(0,r.useState)(!1),K=(0,r.useRef)(null),$=(0,r.useRef)(null),Y=(0,r.useRef)(null),Q=(0,r.useRef)(null),Z="themed_blur"!==(0,A.K5)(),J=(0,S.d4)(e=>t?(0,x.S)(e,t):null),X=(0,S.d4)(e=>(0,k.x)(e,"block_file_download")),ee=(0,S.d4)(w.to),et=(0,S.d4)(C.Ay),ea=(0,s.KV)()||(0,s.YG)()||(0,s.Yl)()||(0,s.f9)(),onError=()=>{q(!1),z(!0)},en=(0,r.useCallback)(e=>{e.preventDefault(),t&&(0,v.A)({file:t,action:I.c.ViewFile})},[t]),er=(0,r.useCallback)(()=>e?new o.S((t,a,n)=>{try{V("file_preview_pdf_fetch_start_time");let r=new y(e,{onProgress:U,chunkSize:524288,maxConcurrent:15,withCredentials:F});n&&n(()=>r.cancel()),r.download().then(e=>{V("file_preview_pdf_fetch_end_time",{fileSize:Math.round(e.byteLength/1048576),apiData:r.getTimingsSummary()}),t(e)}).catch(e=>{if(W?.current?.({action:E.UiAction.FETCH,elementValue:"file_preview_pdf_fetch_error",httpStatusCode:e?.status,errorType:e?.message}),e instanceof Error&&"CORS_ERROR"===e.message)a(Error("CORS_ERROR"));else{let t=`PDF load request failed with status ${e?.status}`;a(Error(t))}})}catch(e){W?.current?.({action:E.UiAction.FETCH,elementValue:"file_preview_pdf_fetch_error",errorType:(0,c.u1)(e)}),a(Error((0,c.u1)(e)))}}):o.S.reject(Error("No PDF src specified")),[e,F,U,V,W]),ei=(0,r.useCallback)(()=>e?new o.S((t,a,n)=>{V("file_preview_pdf_fetch_start_time");let r=new XMLHttpRequest;r.addEventListener("load",()=>{V("file_preview_pdf_fetch_end_time",{fileSize:Math.round(r.response.byteLength??0)}),t(r.response)}),r.addEventListener("error",()=>{W?.current?.({action:E.UiAction.FETCH,elementValue:"file_preview_pdf_fetch_error",httpStatusCode:r.status,errorType:"fetch_pdf_error"}),a(Error(`PDF load request failed with status ${r.status}`))}),n&&n(()=>r.abort()),r.responseType="arraybuffer",r.withCredentials=F,r.open("GET",e),r.send()}):o.S.reject(Error("No PDF src specified")),[e,F,V,W]),el=(0,r.useCallback)((e,t)=>{if(!e||!t){et.error("PDF-VIEWER","wtf? no data or viewer",e,t),onError();return}et.debug("PDF-VIEWER","sending buffer to iframe",e,t),t.postMessage(e,"*",[e])},[et]),eo=(0,r.useCallback)(e=>{var t;if(!e.source||e.source instanceof Window&&e.source.parent!==(0,m.h)(R))return void et.warn("PDF-VIEWER","Received a message from a source that is not a child");switch("object"==typeof(t=e.data)&&"pdf_pages"in t?"pdf_pages":t){case"pdf_iframe_ready":et.debug("PDF-VIEWER","iframe ready"),Q.current&&e.source&&Q.current(e.source),V("file_preview_pdf_iframe_ready_time");break;case"close_file_viewer":et.debug("PDF-VIEWER","requesting close"),O?.();break;case"corrupt_pdf":et.error("PDF-VIEWER","corrupt PDF"),onError();break;case"pdf_pages":{if(!a||25!==("object"==typeof e.data&&e.data.pdf_pages))break;let t=X?{renderAsSpan:!0}:{href:J??"about:blank"},n=N.rt("You\u2019re previewing the first 25 pages of this file. <link>Download the file to see all pages.</link>",{},({key:e,text:a})=>r.createElement(h.A,{key:e,onClick:en,"data-qa":"pdf_viewer_download",...t},a));(0,T.M)({element:r.createElement(_.A,null,n)});break}case"pdf_rendered":et.info("PDF-VIEWER","pdf rendered"),V("file_preview_pdf_render_complete_time"),W?.current?.({elementValue:"file_preview_pdf_render_complete",elementType:E.ElementType.IFRAME});break;default:et.warn("PDF-VIEWER","not handling unknown message",e.data)}},[X,J,a,en,R,et,O,V,W]),es=(0,r.useCallback)(()=>{P&&Promise.all([K.current,$.current]).then(([e,t])=>{et.debug("PDF-VIEWER","all good! ready to send",e,t),q(!1),V("file_preview_pdf_viewer_hide_loader_time"),el(e,t),V("file_preview_pdf_send_data_time"),M&&M(t)}).catch(e=>{et.error(e),e instanceof Error&&"CORS_ERROR"===e.message||onError()})},[et,M,el,P,V]);(0,r.useEffect)(()=>{if(q(!0),z(!1),!e||!P)return;K.current=B?er():ei(),$.current=new o.S(e=>{Q.current=e}),es();let t=(0,m.h)(R);return t&&t.addEventListener("message",eo),()=>{K.current&&K.current.cancel(),$.current&&$.current.cancel(),t&&t.removeEventListener("message",eo)}},[e,er,ei,es,R,eo,P,B]);let ec=(0,r.useCallback)(()=>{V("file_preview_pdf_iframe_load_time"),W?.current?.({action:E.UiAction.FETCH,elementType:E.ElementType.IFRAME,elementValue:"file_preview_pdf_iframe_loaded"})},[V,W]),ed=(0,r.useMemo)(()=>g||r.createElement("div",{className:"p-pdf_viewer__error","data-qa":"pdf_viewer_error"}),[g]),em=(0,r.useMemo)(()=>G?d||r.createElement("div",{className:"p-pdf_viewer__loading","data-qa":"pdf_viewer_loading"},r.createElement(p.A,null)):null,[G,d]);if(!e||j)return ed;let eu={};if("dark"===ee&&(eu.theme="dark"),i&&Z&&(eu.viewContext=i),L&&(eu.enableZoomControls="true"),D&&(eu.enableDragScroll="true"),H&&(eu.hideFilmStrip="true"),(0,s.b3)()){let e=(0,m.h)(R),t=(0,u.nT)(e?.location?.search??"");t?.use_env_pdf_viewer||(eu.js_path=t?.js_path)}let ep=(0,u.iU)(eu),eh=`${n||"/pdf-viewer/v2"}${ep}`;return r.createElement("div",{className:l()("p-pdf_viewer",{"p-pdf_viewer--media_viewer":i===f.wj&&Z}),"data-qa":"pdf_viewer_container"},em,P&&r.createElement("iframe",{className:"p-pdf_viewer__frame",src:eh,title:N.t("PDF Viewer"),ref:Y,onLoad:ec,sandbox:ea?"allow-scripts allow-popups":void 0,credentialless:ea?"credentialless":void 0}))};SlackFilePDFViewer.displayName="SlackFilePDFViewer";let R=SlackFilePDFViewer},0x4d9b2df9:(e,t,a)=>{"use strict";a.d(t,{P:()=>l,o:()=>i});var n,r,i=((n={}).DETAILS="DETAILS",n.MAIN_THREAD="MAIN_THREAD",n.EXPANDED="EXPANDED",n.RELATED_THREAD="RELATED_THREAD",n),l=((r={}).ERROR="error",r.LOADER="loader",r)},0x1c77a4b25:(e,t,a)=>{"use strict";a.d(t,{CE:()=>startFilePreviewTrace,e1:()=>getFilePreviewSlackFileId});var n=a(0x24e98a449),r=a(0xedbc2765),i=a(0x157ccdb87),l=a(0x9b971e7e);let getFilePreviewSlackFileId=(e,t)=>{if(!t||!(0,n.Qp)(e)&&!(0,n.VA)(e))return null;try{return new URL(t).searchParams.get("file_id")}catch{return null}},startFilePreviewTrace=(e,t)=>r.LI.start({label:r.gC.WorkObjectsFilePreview,options:{traceName:r.gC.WorkObjectsFilePreview,tracer:(0,i.E)({state:e}),teamId:(0,l.ZT)(e),tags:{source:t}}})},0xb727ffe1:(e,t,a)=>{"use strict";a.d(t,{K:()=>WorkObjectFullSizePreviewContainer});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21343fa5a),l=a(0x40c0d834),o=a(0x20482ad21),s=a(0x1f8893105),c=a(0x11a6c59ba),d=a(0x21311882d),m=a(0x14e354fcb),u=a(0x4d9b2df9),p=a(0x14fad6485),h=a(0x230670247),_=a(0x12c909be9),f=a(0xc7a53054),b=a(0x1c77a4b25),g=a(0x120c268ad),y=a.n(g),A=a(0xa6f3163b),x=a(0x2501a2cee),E=a(0x4c96e5d9),C=a(0x15f443392),k=a(0x13953efe6),v=a(0x3989021c),S=a(0x24e98a449);let I=["PDF","ZIP"];var w=a(0x23e3d2669),T=a(0x1ec68d6a3),N=a(0x226892387),M=a(0xb9604b6),R=a(0x5b1935a6);let P=a.p+"view-details-coachmark-755c30f.png";var L=a(0x4ac22ef6),O=a.n(L);let D=new o.Ay("work-objects"),F=n.createElement("img",{className:O().img,src:P,alt:"","aria-hidden":!0}),ViewDetailsTabCoachmark=({children:e,entityId:t,entityUrl:a,displayType:i,productName:l})=>{let o=(0,r.wA)(),s=(0,N.d4)(e=>(0,T.Ay)({state:e,label:S.t6})),[c,d]=(0,n.useState)(!0),[m,u]=(0,n.useState)(),p=(0,n.useMemo)(()=>i&&(I.includes(i)?i:i.toLowerCase()),[i]),{closeCoachmark:h,renderCoachmark:_}=(0,v.A)(R.ze.WORK_OBJECT_VIEW_DETAILS_TAB,R.xu.IN_PRODUCT_COACHMARK),f=(0,N.d4)(e=>(0,M.Hp)(e,R.xu.IN_PRODUCT_COACHMARK))===R.ze.WORK_OBJECT_VIEW_DETAILS_TAB,b=(0,n.useCallback)(async()=>{d(!0);try{let{refs:e}=await o((0,w.J)({entityId:t,entityUrl:a,reason:"get-refs-for-view-details-tab-coachmark"}));u(e?.length??0)}catch(e){s.error(Error("Failed to fetch work object entity refs"),{error:e})}finally{d(!1)}},[o,t,a,s]);(0,n.useEffect)(()=>{f&&void 0===m?b():d(!1)},[b,m,f]);let g=(0,n.useMemo)(()=>m&&m>1?p&&"file"!==p?D.t("View real-time details and see what others are saying about this {displayType} right within Slack.",{displayType:p}):D.t("View real-time details and see what others are saying about this file right within Slack."):l&&p?D.t("View rich, real-time details about this {productName} {displayType} right within Slack.",{productName:l,displayType:p}):p&&"file"!==p?D.t("View rich, real-time details about this {displayType} right within Slack.",{displayType:p}):D.t("View rich, real-time details about this file right within Slack."),[p,l,m]);return c||!f?n.createElement(n.Fragment,null,e):n.createElement(k.Ay,{coachmarkElement:_({hero:F,title:D.t("The full context, right in Slack"),bodyText:g,width:400,offsetX:-25,arrowPosition:90,isMegaphoneCoachmark:!0,closeCoachmark:()=>h(!0),closeCoachmarkFromOutsideClick:()=>h(!1)}),orientation:k.YC.TopLeft,preventPropagation:!0},e)};ViewDetailsTabCoachmark.displayName="ViewDetailsTabCoachmark";var U=a(0x8c27d6c6),B=a.n(U);let H=new o.Ay("work-objects"),FileViewerFooterActionButton=({ariaLabel:e,onClick:t,svgIconProps:a,isSelected:r,tooltipText:i,autoClogProps:l})=>n.createElement(E.Ay,{tip:i,position:"top"},n.createElement(A.A,{className:y()(B().fileViewerActionsButton,{[B().fileViewerActionsButtonSelected]:r}),"aria-label":e,onClick:t,autoClogProps:l},n.createElement(x.Ah,{...a,inline:!0})));FileViewerFooterActionButton.displayName="FileViewerFooterActionButton";let WorkObjectFileViewerFooterActions=({entityId:e,entityUrl:t,hideExpandViewAction:a,onViewActionClick:r,currentPreviewFlexPaneView:i,messageTs:l,displayType:o,productName:s})=>{let c=(0,n.useMemo)(()=>({name:"info",size:"20"}),[]),d=(0,n.useMemo)(()=>({name:"threads",size:"20"}),[]),m=(0,n.useMemo)(()=>({name:"expand-diagonal",size:"20"}),[]),p=(0,n.useCallback)(e=>()=>r(e),[r]);return n.createElement("div",{className:B().fileViewerFooterActions},!a&&n.createElement(FileViewerFooterActionButton,{ariaLabel:H.t("Fullscreen"),onClick:p(u.o.EXPANDED),svgIconProps:m,isSelected:i===u.o.EXPANDED,tooltipText:H.t("Fullscreen"),autoClogProps:C.el}),n.createElement(ViewDetailsTabCoachmark,{entityId:e,entityUrl:t,displayType:o,productName:s},n.createElement(FileViewerFooterActionButton,{ariaLabel:H.t("View Entity Details"),onClick:p(u.o.DETAILS),svgIconProps:c,isSelected:i===u.o.DETAILS,tooltipText:H.t("Details"),autoClogProps:C.aS})),l&&n.createElement(FileViewerFooterActionButton,{ariaLabel:H.t("Show thread"),onClick:p(u.o.MAIN_THREAD),svgIconProps:d,isSelected:i===u.o.MAIN_THREAD,tooltipText:H.t("Show thread"),autoClogProps:C.av}))};WorkObjectFileViewerFooterActions.displayName="WorkObjectFileViewerFooterActions";let WorkObjectFileViewerFooter=({entityId:e,entityUrl:t,hideExpandViewAction:a=!0,onViewActionClick:r,currentPreviewFlexPaneView:i,messageTs:l,displayType:o,productName:s})=>n.createElement("div",{className:B().fileViewerFooter},n.createElement(WorkObjectFileViewerFooterActions,{entityId:e,entityUrl:t,hideExpandViewAction:a,onViewActionClick:r,currentPreviewFlexPaneView:i,messageTs:l,displayType:o,productName:s}));WorkObjectFileViewerFooter.displayName="WorkObjectFileViewerFooter";var W=a(0x17d13b2a8),V=a(0x1fdec3e16),G=a(0x3ca4e1cc),q=a(0x1b6f39a31),j=a(0x21109e926),z=a(0x1d48b23f7),K=a(0x1acec8789),$=a(0x1c7cb6e50),Y=a(0x5dd1c0f2),Q=a(0x15bd01ec9),Z=a(0x1f5c53bc),J=a(0x1c5116e43);let WorkObjectFileViewerHeader=({appId:e,model:t,entity:a,entityUrl:r,onOpenEditView:i,onFileViewerClose:l,messageTs:o,channelId:s,currentPreviewFlexPaneView:c,refreshButtonRef:d,onCoordinatedRefresh:m})=>{let p=(0,N.d4)(t=>(0,Y.sO)(t,e)),h=(0,N.d4)(G.KT),_=(0,q.jH)(a)?a.ext_error?.status!=="user_not_authed":a.error!==K.$.NotConnected,f=(0,N.d4)(e=>(0,Z.j_)(e,a.id)),b=(0,N.d4)(e=>(0,Z.hA)(e,a.id)),g=(0,n.useMemo)(()=>(0,Q.nY)(a),[a]),A=(0,n.useMemo)(()=>g||f,[g,f]),x=t?.full();return t?n.createElement("div",{className:y()(B().fileViewerHeader,W.RD),"data-prevent-fade":"true","data-qa":"work-object-file-viewer-header"},n.createElement("div",{className:B().modalHeaderInfo},n.createElement("div",{className:B().modalHeaderTitle},n.createElement(V.A,{lines:3,breakWords:!1},x?.title())),n.createElement("div",{className:B().modalHeaderAppInfo},n.createElement(z.c,{entity:a,model:t,app:p,entityURL:r}))),n.createElement("div",{className:B().modalHeaderActions},n.createElement(j.a,{appName:p.name,isLoading:A,isSynced:b,hasValidOAuth:_,entityId:a?.id,lookupFunction:(0,$.t)(t.lookupFunction()),workObjectType:t?.displayType(),appId:e,model:t,eventTs:(0,q.jH)(a)?a.event_ts:void 0,useLegacyUrl:!1,entityUrl:t.externalUrl(),isEditable:!h&&(x?.isEditable()||!1),flexpaneSource:J.tL.FileViewer,onEditClick:i,onClose:l,messageTs:o,channelId:s,currentPreviewFlexPaneView:c,buttonBackgroundStyle:"dark",...c===u.o.EXPANDED&&{refreshButtonRef:d,onCoordinatedRefresh:m}}))):null};WorkObjectFileViewerHeader.displayName="WorkObjectFileViewerHeader";var X=a(0xedbc2765),ee=a(0xbd3de346),et=a(0x207eb3801),ea=a(0x3711e82d),en=a(0x54eb2d82),er=a(0x14ea3ce99),ei=a(0xa4086de4),el=a(0x1ee439e69),eo=a(0x19895585a);let WorkObjectFileViewer=({appId:e,model:t,entity:a,channelId:i,messageTs:o,fullSizePreview:c,onViewActionClick:g,currentPreviewFlexPaneView:y,entityUrl:A,onOpenEditView:x,autoTrace:E,onFileViewerClose:C,workObjectType:k,onCoordinatedRefresh:v,onNewVersionDetected:I,onRegisterFileRefresh:w,refreshButtonRef:T})=>{let M=(0,r.wA)(),{windowRef:R}=(0,p.ox)(),{logEventTime:P}=(0,d.c)(),L=(0,N.d4)(el.H7),O=(0,N.d4)(s.EU),D=(0,et.GM)(t,O),F=R.deref()?.name??eo.N2,U=(0,N.d4)(e=>(0,Z.j_)(e,a.id)),H=(0,N.d4)(e=>(0,ei.KN)(e,a.id)),W=(0,N.d4)(e=>(0,ei.aT)(e,F)),V=D&&(W||H),j=(0,N.d4)(G.jc),z=(0,N.d4)(G.CF),[K,$]=(0,n.useState)(0),[Y,J]=(0,n.useState)(c?.preview_url??null),es=(0,b.e1)(e,Y),{thumbnailImage:ec,slackFile:ed}=(0,m.aI)({channelId:i,messageTs:o,entityId:a.id}),em=ec||(D?Y:void 0),eu=a.id.match(en.u),ep=eu?eu[2]:void 0,eh=(0,N.d4)(e=>ed??(0,er.YM)(e,ep)),e_=(0,S.VA)(e)||(0,S.Qp)(e),ef=(0,n.useCallback)(e=>{e&&E?.createChildSpan({name:X.gC.WorkObjectsFilePreviewError,additionalSpanOptions:{tags:{error_code:e?.code,error_source:e?.source}}})},[E]),eb=(0,n.useCallback)(e=>{if(e.file_id&&!e.error&&e.last_modified){let t=Date.parse(e.last_modified);t>K&&($(t),0!==K&&I?.())}},[K,I]),eg=!!eh&&((0,S.Qp)(e)||(0,S.VA)(e))&&j,{clearError:ey,data:eA,isLoadingPreview:ex,error:eE,setIsLoadingPreview:eC,filePreviewRTMEvent:ek,fetchPreviewData:ev,handleError:eS}=(0,_.X)({fileId:eh?.id??"",appId:e,reason:"fetch_file_preview_url",entity:a,fullSizePreview:c,onError:ef,onRtmEvent:eb});(0,n.useEffect)(()=>{V&&(0,et.rZ)(eE?.code)&&ey()},[ey,eE,V]),(0,n.useEffect)(()=>{eg&&ev()},[eg,ev]),(0,n.useEffect)(()=>{eA?.file_preview_url&&J(eA.file_preview_url)},[eA?.file_preview_url]);let eI=(0,n.useCallback)((t,a)=>{if(t){let n=new URL(t);((0,S.Qp)(e)||(0,S.VA)(e))&&(n.searchParams.set("xts",a.toString()),J(n.toString()))}},[e]),ew=(0,n.useCallback)(()=>{E?.createChildSpan({name:X.gC.WorkObjectsFilePreviewFileDownloadedClientSide,additionalSpanOptions:{tags:{file_downloaded_client_side:!0,app_id:e,slack_file_id:es}}}),eC(!1)},[E,e,es,eC]),eT=(0,n.useCallback)(()=>{Y&&eI(Y,K)},[Y,K,eI]);(0,n.useEffect)(()=>{w?.(eT)},[w,eT]),(0,n.useEffect)(()=>{c?.preview_url&&Y!==c.preview_url&&J(c?.preview_url)},[c?.preview_url,Y]),(0,n.useEffect)(()=>{(0,Q.e_)(L?.id,[a?.id])},[M,a?.id,L?.id]),(0,n.useEffect)(()=>{es&&ek&&((0,S.Qp)(e)||(0,S.VA)(e))&&E?.createChildSpan({name:X.gC.WorkObjectsFilePreviewFileViewReadyRTMEventReceived,additionalSpanOptions:{tags:{slack_file_id:es,file_view_ready_rtm_event_received:ek.event_ts,file_view_ready_rtm_event_last_modified:ek.last_modified,file_downloaded_server_side:!0,file_version:ek.last_modified}}})},[es,ek,E,e]),(0,n.useEffect)(()=>{(0,S.Qp)(e)||(0,S.VA)(e)||(eC(!1),E?.createChildSpan({name:X.gC.WorkObjectsFilePreviewSkipFileViewReadyRTMEvent,additionalSpanOptions:{tags:{skip_file_view_ready_rtm_event:!0,app_id:e}}}))},[e,E,eC]);let eN=t?.expanded()??t?.compact(),eM=t?.full(),eR="primary_source"in a?a.primary_source?.link:void 0,eP=eM?.subtitleUrl()??eR??A;(0,q.jH)(a)&&!eP&&(eP=a?.entity_url);let eL=t?.displayType()??"file",eO=eM?.title(),eD=eM?.subtitleImage()??eN?.productIcon(),eF=t?.productName(),eU=eh?(0,ee.$y)(eh):"file",eB=(0,n.useMemo)(()=>ex||U||!!eE,[ex,U,eE]),eH=eE?{code:eE.code,source:eE.source}:void 0,eW=!ex&&!U;j&&(eW=!ex&&!!Y),(0,n.useEffect)(()=>{Y&&P("file_preview_url_lookup_time")},[Y,P]),(0,n.useEffect)(()=>{eW&&P("file_preview_pdf_read_to_download_time")},[eW,P]),(0,n.useEffect)(()=>{ek?.file_id&&P("file_preview_file_view_ready_rtm_event_received_time",{experiments:{is_fresh_download:ek?.is_fresh_download,is_fetch_on_link_share:ek?.is_fetch_on_link_share}})},[ek?.file_id,P,ek?.is_fresh_download,ek?.is_fetch_on_link_share]),(0,n.useEffect)(()=>{ex||P("file_preview_hide_loader_time")},[ex,P]);let eV=z&&((0,S.Qp)(e)||(0,S.VA)(e)),eG=(0,n.useMemo)(()=>y===u.o.EXPANDED||y===u.o.MAIN_THREAD,[y]);return n.createElement(l.A,{eventId:ea.EventId.WORK_OBJECT_FILE_VIEWER,uiStep:ea.UiStep.WORK_OBJECT_FILE_VIEWER,uiComponentName:ea.UiComponentName.WORK_OBJECT_FILE_VIEWER,clogImpression:!0,clogImpressionDuration:!0,appId:e,workObjectType:k,channel_id:i,coreMessageTimestamp:o,filePreviewErrors:eH,viewType:y},n.createElement("div",{className:B().fileViewerWrapper,"data-qa":"work-object-file-viewer"},eG&&n.createElement(WorkObjectFileViewerHeader,{appId:e,model:t,entity:a,entityUrl:A,onOpenEditView:x,onFileViewerClose:C,messageTs:o,channelId:i,currentPreviewFlexPaneView:y,...y===u.o.EXPANDED&&{refreshButtonRef:T,onCoordinatedRefresh:v}}),n.createElement(f.t,{appId:e,slackFileId:null,fullSizePreviewURL:Y,viewContext:h.wj,hideZoomControls:!1,showFilmStrip:y===u.o.EXPANDED,showPrevFilePreviewButton:!1,showNextFilePreviewButton:!1,onCloseFileViewer:C,showLoader:ex||U||V,thumbnailImage:em,externalUrl:eP,entityId:a.id,isTableauAnalytic:D,onError:eS,woFileType:eL,mimeType:c?.mime_type,error:eE,fileName:eO,reloadOnFileChange:!0,onPDFDownloaded:ew,productIcon:eD,productName:eF,isPDFURLReadToDownload:eW,fallbackIconType:eU,withCredentials:e_,isRangeRequestEnabled:eV}),n.createElement(WorkObjectFileViewerFooter,{entityId:a.id,entityUrl:A,hideExpandViewAction:eB,onViewActionClick:g,currentPreviewFlexPaneView:y,messageTs:o,displayType:t?.displayType(),productName:eF})))};WorkObjectFileViewer.displayName="WorkObjectFileViewer";var es=a(0x1ac28e83e),ec=a(0x5c7737ab),ed=a(0xb04c4a12);let WorkObjectFileViewerFlexpane=({entityId:e,relatedConversationsEntityId:t,workObjectId:a,appId:r,lookupFunction:i,authProviderKey:o,workObjectType:s,entityUrl:c,channelId:d,messageTs:m,useLegacyUrl:p,fallbackTitle:h,onFileViewerClose:_,currentPreviewFlexPaneView:f,onBackClick:b,onOpenRelatedThread:g,previewSource:y,tab:A=J.FG.Details,showRefreshIndicators:x,onCoordinatedRefresh:E,onDismissIndicators:C,fileId:k,openedFromFilePreviewModal:v=!1})=>{let[S,I]=(0,n.useState)(A),w=(0,n.useCallback)(e=>{I(e)},[]);return n.createElement("div",{className:B().flexpaneWrapper},f===u.o.DETAILS&&n.createElement(l.A,{eventId:ea.EventId.WORK_OBJECT_FLEXPANE_DETAILS_VIEW,uiStep:ea.UiStep.WORK_OBJECT_FILE_PREVIEW_WO_FLEXPANE,uiComponentName:ea.UiComponentName.WORK_OBJECT_FILE_PREVIEW_WO_FLEXPANE,clogImpression:!0,clogImpressionDuration:!0,appId:r,workObjectType:s,channelId:d,coreMessageTimestamp:m},n.createElement(ec.U,{entityId:e,relatedConversationsEntityId:t,id:a,appId:r,lookupFunction:i,authProviderKey:o,workObjectType:s,entityUrl:c,channelId:d,tab:S,messageTs:m,useLegacyUrl:p,fallbackTitle:h,source:J.tL.FileViewer,onBackClick:b,onFlexpaneTabsChange:w,onOpenRelatedThread:g,onClose:_,showRefreshIndicators:x,onCoordinatedRefresh:E,onDismissIndicators:C,fileId:k,viewId:ed.Y.WORK_OBJECT_FULL_SIZE_PREVIEW,openedFromFilePreviewModal:v,currentPreviewFlexPaneView:f})),(f===u.o.MAIN_THREAD||f===u.o.RELATED_THREAD)&&d&&m&&n.createElement(l.A,{eventId:ea.EventId.WORK_OBJECT_FLEXPANE_THREADS_VIEW,uiStep:ea.UiStep.WORK_OBJECT_FILE_VIEWER_THREADS_VIEWER,uiComponentName:ea.UiComponentName.WORK_OBJECT_FILE_VIEWER_THREADS_VIEWER,clogImpression:!0,clogImpressionDuration:!0,appId:r,workObjectType:s,channelId:d,coreMessageTimestamp:m},n.createElement(es.w,{channelId:d,threadTs:m,onClose:_,displayBackButton:f===u.o.RELATED_THREAD,onBackClick:b,displayCloseButton:"woFilePreviewModal"===y})))};WorkObjectFileViewerFlexpane.displayName="WorkObjectFileViewerFlexpane";var em=a(0x20716123c),eu=a(0x1a02c72b5),ep=a(0xd6a16321),eh=a(0xd843ab47),e_=a(0x20679dcfc),ef=a(0xafce781a),eb=a(0x1fcbb004d),eg=a(0x987c2ffc);let ey=new o.Ay("work-objects"),WorkObjectFullSizePreviewContainer=({entityId:e,relatedConversationsEntityId:t,workObjectId:a,appId:o,lookupFunction:p,authProviderKey:h,workObjectType:_,entityUrl:f,channelId:b,messageTs:g,useLegacyUrl:y,fullSizePreview:A,fallbackTitle:x,onFileViewerClose:E,source:C,autoTrace:k,tab:v,fileId:S,flexpaneViewType:I=u.o.DETAILS,openedFromFilePreviewModal:w=!1})=>{let T=(0,r.wA)(),[M,P]=(0,n.useState)(performance.now()),L=(0,n.useRef)(null),O=(0,n.useCallback)(e=>{L.current=e},[]),{isChildWindow:D,closeView:F}=(0,n.useContext)(eh.A),[U,H]=(0,n.useState)(I),[W,V]=(0,n.useState)(null),[j,z]=(0,n.useState)(!1),K=(0,n.useRef)(null),$=(0,N.d4)(G.q_),Y=(0,N.d4)(G.CZ),Q=(0,N.d4)(G.jc),J=(0,N.d4)(G.CF),ee=(0,N.d4)(G.co);(0,n.useEffect)(()=>{k&&k.createChildSpan({name:X.gC.WorkObjectsFilePreviewInit,additionalSpanOptions:{tags:{work_object_id:a,entity_id:e,channel_id:b,message_ts:g,source:C,app_id:o,experiment_wo_browser_pdf_viewer:$,experiment_wo_file_preview_export_performance:Y,experiment_wo_file_preview_decouple_flexpane_rtm:Q,experiment_wo_file_preview_range_request:J,experiment_wo_file_preview_browser_cache:ee}}})},[a,e,b,g,C,o,k,$,Y,Q,J,ee]);let en=(0,n.useCallback)(()=>{let e=(performance.now()-M)/1e3;return(L?.current?.({action:ea.UiAction.PERFORMANCE,elementValue:"file_preview_close_time",impressionDuration:e}),E)?E():D&&F?F():()=>T((0,eb.O)())},[D,F,E,T,M,L]),er=(0,N.d4)(t=>(0,Z.Ne)(t,{recordId:e,lookupFunction:p,entityUrl:f,channelId:b,messageTs:g,useLegacyUrl:y,reason:"work-objects-full-size-preview"})),el=(0,N.d4)(t=>(0,ei.d4)(t,{entityId:e})),eo=(0,n.useMemo)(()=>(0,q.jH)(er)?er.ext_error?.status:void 0,[er]);(0,i.A)(()=>H(u.o.DETAILS),!!(eo||el)),(0,n.useEffect)(()=>{if(er&&(0,q.jH)(er)){let e=(performance.now()-M)/1e3;L?.current?.({action:ea.UiAction.PERFORMANCE,elementValue:"file_preview_entity_rtm_event_received_time",impressionDuration:e})}},[M,L,er]);let es=(0,m.BN)({channelId:b,messageTs:g,entityId:e}),ec=(0,q.Kr)(er)??es,ed=ec?.fileId()||S,eA=(0,et.f1)(e),ex=(0,N.d4)(e=>eA?(0,eg.f)(e,{orgId:eA}):void 0),eE=(0,N.d4)(s.EU),eC=(0,et.GM)(ec,eE)&&ex&&!ex.notificationIsDismissed,ek=ey.t("item",{ns:"solutions"}),ev=er&&"display_type"in er?er.display_type:void 0,eS=ec?.displayType(),eI=ev??eS??_??ek,ew=(0,n.useCallback)(e=>{U===u.o.EXPANDED&&e===u.o.EXPANDED||(e===u.o.MAIN_THREAD?(H(u.o.MAIN_THREAD),V(null)):H(e))},[U]),eT=(0,n.useCallback)(()=>{H(u.o.DETAILS),V(null)},[H]),eN=(0,n.useCallback)(e=>{e.channelId&&e.isCanvas&&!e.isReply&&(T((0,eu.o)((0,ep.mo)({id:(0,e_.l)(e.channelId)}))),en?.()),(!e.isCanvas||e.isCanvas&&e.isReply)&&(H(u.o.RELATED_THREAD),V(e))},[H,en,T]),eM=(0,n.useCallback)(()=>{H(u.o.DETAILS)},[H]),eR=(0,n.useRef)(null),eP=(0,n.useCallback)(()=>{z(!1),eR.current?.()},[]),eL=(0,n.useCallback)(()=>{z(!1)},[]),eO=(0,n.useCallback)(()=>{z(!0),T((0,ef.iR)({event:{type:R.jo.WORK_OBJECT_NEW_FILE_VERSION_DETECTED}}))},[T]),eD=(0,n.useCallback)(e=>{eR.current=e},[]),eF=(0,em.V)({refreshButtonRef:K,displayType:eI,viewTypeCheck:U===u.o.EXPANDED,onDismiss:eL}),eU=(0,n.useMemo)(()=>({wo_browser_pdf_viewer:$,wo_file_preview_export_performance:Y,wo_file_preview_decouple_flexpane_rtm:Q,wo_file_preview_range_request:J,wo_file_preview_browser_cache:ee}),[$,Y,Q,J,ee]);return n.createElement("div",{className:B().container},n.createElement("div",{className:B().contentWrapper},n.createElement(l.A,{eventId:ea.EventId.WORK_OBJECT_FILE_PREVIEW_OPEN,uiStep:ea.UiStep.WORK_OBJECT_FILE_PREVIEW_CONTAINER,uiComponentName:ea.UiComponentName.WORK_OBJECT_FILE_PREVIEW_CONTAINER,clogImpression:!0,clogImpressionDuration:!0,appId:o,workObjectType:_,woFilePreviewSource:C,channelId:b,coreMessageTimestamp:g,experiments:eU,trackClogRef:O,viewType:U,viewTab:v},n.createElement(d.Y,{trackClogRef:L},n.createElement(WorkObjectFileViewer,{appId:o,model:ec,entity:er,fullSizePreview:ec?.fullSizePreview()??A,channelId:b,messageTs:g,onViewActionClick:ew,currentPreviewFlexPaneView:U,entityUrl:f,onOpenEditView:eM,onFileViewerClose:en,autoTrace:k,workObjectType:_,onCoordinatedRefresh:eP,onNewVersionDetected:eO,onRegisterFileRefresh:eD,refreshButtonRef:K}),U!==u.o.EXPANDED&&n.createElement(WorkObjectFileViewerFlexpane,{entityId:e,relatedConversationsEntityId:t,workObjectId:a,appId:o,lookupFunction:p,authProviderKey:h,workObjectType:_,entityUrl:f,channelId:W?.channelId??b,messageTs:W?.threadTs??g,useLegacyUrl:y,onFileViewerClose:en,currentPreviewFlexPaneView:U,onBackClick:eT,fallbackTitle:x,onOpenRelatedThread:eN,previewSource:C,tab:v,showRefreshIndicators:j,onCoordinatedRefresh:eP,onDismissIndicators:eL,fileId:ed,openedFromFilePreviewModal:w}),eF))),eC&&n.createElement(c.A,null))};WorkObjectFullSizePreviewContainer.displayName="WorkObjectFullSizePreviewContainer"},0x1ac28e83e:(e,t,a)=>{"use strict";a.d(t,{w:()=>WorkObjectThreadsViewer});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x344bb842),l=a(0x4c96e5d9),o=a(0x1892b3b74),s=a(0x1b8308484),c=a(0xb04c4a12),d=a(0x226892387),m=a(0x1fb2d2a87),u=a(0xd93ecf94);let p={name:"close"},h=new r.Ay("work-objects"),WorkObjectThreadsViewer=({channelId:e,threadTs:t,onClose:a,displayBackButton:r=!1,onBackClick:_,displayCloseButton:f=!0})=>{let b=(0,d.d4)(m.to),g=h.t("Thread"),y=(0,d.d4)(a=>e&&t?(0,u.Ld)(a,e,t):void 0),A=y?.thread_ts??t,x=(0,n.useMemo)(()=>{let a=`threads-full-size-preview-${e}-${A}`;return n.createElement(s.A,{channelId:e,threadTs:A,scrollMarkTs:t,key:a,serializationKey:a,hideHeader:!0,viewContext:c.Y.WORK_OBJECT_FULL_SIZE_PREVIEW})},[e,A,t]),E=(0,n.useMemo)(()=>({viewIdForTileContents:"work-object-full-size-preview",viewParamsForTileContents:{channelId:e,threadTs:A},hideBottomBorder:!0,showCloseButton:!1,displayFlexBack:r,onBackClick:_}),[e,A,r,_]),C=(0,n.useMemo)(()=>f?n.createElement(l.Ay,{tip:h.t("Close"),position:"bottom-right",delay:l.PK,hideFromScreenReader:!0},n.createElement(i.A,{"aria-label":h.t("Close"),"data-prevent-fade":"true",svgIconProps:p,onClick:a,backgroundStyle:"dark"===b?"dark":void 0})):null,[b,a,f]);return n.createElement(o.Ay,{"aria-label":g,dataQa:"work-object-full-size-preview-flexpane-thread",titleContent:g,viewId:c.Y.WORK_OBJECT_FULL_SIZE_PREVIEW,additionalButtonsContent:C,bodyContent:x,headerProps:E})};WorkObjectThreadsViewer.displayName="WorkObjectThreadsViewer"},0xa3fb9039:(e,t,a)=>{"use strict";a.d(t,{b:()=>EntityFooter});var n=a(0xbad225b5),r=a(0x17d13b2a8),i=a(0x120c268ad),l=a.n(i),o=a(0xf27817c9),s=a(0xb1c0d55),c=a(940089e4),d=a(0x3dcad321),m=a(0x20482ad21),u=a(0x11a296110),p=a(0xb1ea448c),h=a(0x4c96e5d9),_=a(0x15f443392),f=a(0x24e98a449),b=a(0x3ca4e1cc),g=a(0x70657567),y=a(0xe89390a),A=a(0x18ef1d9e1),x=a(0x226892387),E=a(0x1c5116e43),C=a(0x11dd23337),k=a.n(C);let v=new m.Ay("work-objects"),EntityFooter=({actions:e,className:t,isInteractive:a=!1,onRefresh:i,sourceMessageTs:m,updatedAt:C,isRefreshing:S,canRefresh:I=!1,onRefreshButtonHoverChange:w,appId:T,perspectiveUser:N,source:M,refreshError:R=!1,isTableauWO:P,isActionsBarHovered:L})=>{let O=(0,A.A)(),{isHovered:D}=(0,o.r)(),F=(0,x.d4)(b.Ym),U=(0,x.d4)(b.lK),B=U||P,H=F||P,W=B&&a&&S,V=B&&a&&R,G=N?{perspectiveUserName:N?.real_name}:void 0,q=m?(0,g.f)(m,G):void 0,j=C?(0,y.L)(C):void 0,z=H&&q&&!C&&!W&&!V,K=H&&j&&!W&&!V,$=U&&a&&D&&!L&&!S&&I&&!(0,f.VA)(T)&&!(0,f.Qp)(T),Y=(0,n.useCallback)(e=>{if(e&&H)try{let t=(0,c.A)(e);if(!t)return;let a=(0,s.A)(t,{shortenDay:!0}),n=(0,d.A)(t,{includeSeconds:!0});return v.t("{date} at {time}",{date:a,time:n})}catch{return}},[H]),Q=(0,n.useMemo)(()=>Y(m),[Y,m]),Z=(0,n.useMemo)(()=>Y(C),[Y,C]),J=(0,n.useCallback)(e=>{e.stopPropagation(),i?.()},[i]),X=(0,n.useCallback)(e=>{w?.(e)},[w]),ee=(0,n.useCallback)(({text:e,tooltip:t})=>t?n.createElement(h.Ay,{delay:h.PK,tip:t,hideFromScreenReader:!0,maxWidth:"large"},n.createElement("span",{className:k().timestampText},e)):n.createElement("span",{className:k().timestampText},e),[]),et=(0,n.useCallback)(({text:e,tooltip:t})=>n.createElement("div",{className:k().timestampContainer},n.createElement(ee,{text:e,tooltip:t})),[ee]),ea=(0,n.useMemo)(()=>n.createElement("span",{className:l()(k().refreshButtonContainer,{[k().show]:$,[k().hide]:!$})},n.createElement(u.Nm,{onClick:J,onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1),className:`c-link--button ${k().timestampText}`,autoClogProps:_.Gy},v.t("Refresh"))),[$,J,X]);return n.createElement("div",{className:l()(k().footer,{[k().entityFooter]:H,[k().searchFooter]:M===E.Xv.WorkObjectSearch,[r.RD]:P&&"dark"===O},t)},W&&n.createElement("div",{className:l()(k().timestampContainer,k().refreshing)},n.createElement(p.A,{size:"medium"}),n.createElement("span",{className:k().timestampText},v.t("Refreshing\u2026"))),V&&n.createElement("div",{className:k().timestampContainer},n.createElement("span",{className:k().timestampText},v.t("Failed to refresh"))),!W&&!V&&z&&n.createElement("div",{className:k().timestampWithRefresh},n.createElement(et,{text:q,tooltip:Q}),ea),!W&&!V&&K&&n.createElement("div",{className:k().timestampWithRefresh},n.createElement(et,{text:j,tooltip:Z}),ea),n.createElement("div",{className:l()(k().buttonContainer,{[k().buttonContainerSmallGap]:H,[k().inactive]:W||V})},e))};EntityFooter.displayName="EntityFooter"},0x1f83a8c66:(e,t,a)=>{"use strict";a.d(t,{z:()=>EntityHeader});var n=a(0xbad225b5),r=a(0x14cbd83d1),i=a(0x17d13b2a8),l=a(0x120c268ad),o=a.n(l),s=a(0x32d3ef3d),c=a(0x9798b7f),d=a(0x7729d35b),m=a(0x1d9a37519),u=a(0x24e98a449),p=a(0x3ca4e1cc);function isUniqueProductIcon(e,t){return!!e&&(!t||0===Object.values(t).filter(e=>void 0!==e).filter(t=>t.image_url===e.image_url).length)}var h=a(0x18ef1d9e1),_=a(0x226892387),f=a(0x17588a0d),b=a.n(f);let EntityHeader=({entityState:e,productIcon:t,appId:a,entityTitle:l,secondaryLabel:f,timestampLabel:g,displayType:y,showBottomBorder:A,appIcons:x,isTableauWO:E})=>{let C=(0,_.d4)(p.p$),k=isUniqueProductIcon(t,x),v=C&&k&&!(0,u.Qp)(a)&&!(0,u.VA)(a),S=(0,h.A)();return n.createElement("div",{className:o()(b().header,{[b().bottomBorder]:A,[i.RD]:E&&"dark"===S})},n.createElement("div",{className:b().iconsContainer},E?n.createElement(d.A,{entityState:e,suppressDefaultColors:!0},n.createElement("img",{src:r,alt:"tableau-logo",className:b().productIconImg})):n.createElement(d.A,{entityState:e,suppressDefaultColors:!0},t&&k?n.createElement("img",{src:t.image_url,alt:t.alt_text,className:b().productIconImg}):n.createElement(m.z,{appId:a,size:72,imageClassName:b().slackThumbnailImage,alt:y}),v&&n.createElement("div",{className:b().productIconContainer},n.createElement(m.z,{appId:a,width:18,height:18,imageClassName:b().appIconBadge,alt:y})))),n.createElement("div",{className:b().labelsContainer},n.createElement(c.A,{primaryLabel:l,primaryTruncateLines:1,secondaryLabel:f,secondaryTruncateLines:1,entityState:e,size:s.S.expanded}),g&&n.createElement("span",{className:b().timestamp,"aria-hidden":"true"},g)))};EntityHeader.displayName="EntityHeader"},0x7bde3d37:(e,t,a)=>{"use strict";a.d(t,{d:()=>ExternalWorkObjectFields});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x6affae29),s=a(0x20b4dda68),c=a(0x20482ad21),d=a(0x11a296110),m=a(0xb1ea448c),u=a(0xd3bcbd3c),p=a(0x2501a2cee),h=a(0x4c96e5d9),_=a(0x1fdec3e16),f=a(0x113cdbbd7),b=a(0x944e06df),g=a(0x221091ef3),y=a(0x1b56e521c),A=a(0x1184a583d),x=a(0x1db69cda),E=a(0x1a256ff50),C=a(0x1ec68d6a3);let normalizeTextObject=e=>e?{type:e.type,text:e.text}:e,cloneWithoutFalsy=(e,t=4)=>{if(Array.isArray(e)&&0===e.length)return;if(0===t||!e||"object"!=typeof e||Array.isArray(e))return e;let a={};for(let n of Object.keys(e)){let r=cloneWithoutFalsy(e[n],t-1);r&&(a[n]=r)}return a},normalizeBlockState=e=>{if(!e)return e;let t=cloneWithoutFalsy(e);return"external_select"===t.type?t.selected_option&&t.selected_option.text&&(t.selected_option.text=normalizeTextObject(t.selected_option.text)):"multi_external_select"===t.type&&t.selected_options&&(t.selected_options=t.selected_options.reduce((e,t)=>(t&&t.text&&e.push({...t,text:normalizeTextObject(t.text)}),e),[])),t};var k=a(0x1b024850b),v=a(0x217e2881),S=a(0x111672506),I=a(0x15f443392),w=a(0x45bd075),T=a(0x1d2cd7755);let CheckboxFieldValue=({checkbox:e,showDescription:t=!1,truncateTitle:a=!1})=>{let r=a?n.createElement(_.A,{lines:1,breakWords:!1},e.text):e.text;return n.createElement(T.A,{text:r,type:"inline",cursor:"pointer",subtext:t?e.description:void 0,isDisabled:!0},n.createElement(w.A,{checked:e.checked,"aria-disabled":!0}))};CheckboxFieldValue.displayName="CheckboxFieldValue";var N=a(0x1f355b555),M=a(0x190e60a66),R=a(0xe91936b1);let P=new c.Ay("work-objects");function parseDateValue(e,t){if(void 0!==e)return"number"==typeof e?N.Ay.unix(e).tz(t):(0,N.Ay)(e)}function formatCalendarDate(e,t,a={}){let{shortenMonth:n=!1,shortenDay:r=!1,excludeYear:i=!1}=a,l=1===e.date(),o=R.nI[t].calendarDateFormat({firstOfTheMonth:l});return n&&r&&i?e.format(o.MMMD):n&&r?e.format(o.MMMDYYYY):!n&&r&&i?e.format(o.MMMMD):n&&i?e.format(o.MMMDo):n?e.format(o.MMMDoYYYY):i?e.format(o.MMMMDo):e.format(o.MMMMDoYYYY)}function formatShortDateWithTime(e,t,a){let n=formatCalendarDate(e,t,{shortenMonth:!0,shortenDay:!0,excludeYear:e.year()===(0,N.Ay)().year()});return`${n}, ${e.format(a)}`}function getDate(e,t,a,n,r,i=!0){let l=(0,M.F)().getLocaleForLastViewedTeam();if(e){let e=R.Sq[l],t=a.format(e.shortenDay?"ddd":"dddd"),n=formatCalendarDate(a,l,{shortenMonth:!1,excludeYear:a.year()===(0,N.Ay)().year()});return e.format.replace(/%1/,t).replace(/%2/,n)}if(t){let e=formatShortDateWithTime(a,l,n),t=r?formatShortDateWithTime(r,l,n):void 0;return t?i?P.t("{startDateTime} \u2013 {endDateTime}",{startDateTime:e,endDateTime:t}):`${e} \u2013 ${t}`:e}let o=formatCalendarDate(a,l,{shortenMonth:!0,shortenDay:!0,excludeYear:a.year()===(0,N.Ay)().year()}),s=r?formatCalendarDate(r,l,{shortenMonth:!0,shortenDay:!0,excludeYear:r.year()===(0,N.Ay)().year()}):"";return s?i?P.t("{startDate} \u2013 {endDate}",{startDate:o,endDate:s}):`${o} \u2013 ${s}`:o}function getFormattedContent(e,t,a,n,r,i,l,o){let s,c,d=getDate(o,i,e,l,t,r),m=e.format(l);if(o&&t&&i){let e=t.format(l);s=r?P.t("{startTime}\u2013{endTime}",{startTime:m,endTime:e}):`${m}\u2013${e}`}return a&&(c=r?P.t("All Day"):"All Day"),{dateLine:d,timeLine:s,allDayLine:c,recurrenceLine:n||void 0}}function getFormattedContentExpanded(e,t,a,n,r,i,l=!0){let o,s,c,d,m=(0,M.F)().getLocaleForLastViewedTeam();if(e){let e=a.format("MM/DD/YYYY");o=l?P.t("Date"):"Date",s=e}if(t){let t=formatShortDateWithTime(a,m,n),u=r?formatShortDateWithTime(r,m,n):void 0;if(e){c=l?P.t("Time"):"Time";let e=a.format(n);if(i)d=l?P.t("All Day"):"All Day";else if(r){let t=r.format(n);d=l?P.t("{startTime}\u2013{endTime}",{startTime:e,endTime:t}):`${e}\u2013${t}`}else d=e}else o=l?P.t("Start Date"):"Start Date",s=t,u&&(c=l?P.t("End Date"):"End Date",d=u)}else{let e=formatCalendarDate(a,m,{shortenMonth:!0,shortenDay:!0,excludeYear:a.year()===(0,N.Ay)().year()}),t=r?formatCalendarDate(r,m,{shortenMonth:!0,shortenDay:!0,excludeYear:r.year()===(0,N.Ay)().year()}):"";o=l?P.t("Start Date"):"Start Date",s=e,t&&(c=l?P.t("End Date"):"End Date",d=t)}return{dateTitle:o,dateValue:s,timeTitle:c,timeValue:d}}var L=a(0x3ca4e1cc),O=a(0x1ccef1c6f),D=a(0x226892387),F=a(0x233e552ae),U=a.n(F),B=a(0x17588a0d),H=a.n(B);let W=new c.Ay("work-objects"),DateTimeContentItem=({title:e,value:t})=>n.createElement("div",{className:l()(H().contentItem,H().expanded,H().displayColumn)},n.createElement("div",{className:l()(H().contentItemLabel,H().expanded)},e),n.createElement("div",{className:l()(H().contentItemValue,H().expanded)},t)),WorkObjectDateTimeRange=({ranges:e,isExpanded:t=!1})=>{let a=(0,D.d4)(L.GR),r=(0,D.d4)(e=>(0,O.ty)(e,"time24"))??!1,i=(0,D.d4)(e=>(0,O.ty)(e,"tz"))||N.Ay.tz.guess(),l=e[0];if(!l)return null;let{start:o,end:s,all_day:c,recurrence:d}=l,m=parseDateValue(o,i),u=parseDateValue(s,i);if(!m)return null;let p=!u||m.isSame(u,"day"),h=r?"HH:mm":"h:mm A",_="string"!=typeof o;if(t){let{dateTitle:e,dateValue:t,timeTitle:r,timeValue:i}=getFormattedContentExpanded(p,_,m,h,u,c,a);return n.createElement(n.Fragment,null,e&&t&&n.createElement(DateTimeContentItem,{title:e,value:t}),r&&i&&n.createElement(DateTimeContentItem,{title:r,value:i}),d&&n.createElement(DateTimeContentItem,{title:a?W.t("Recurrence"):"Recurrence",value:d}))}let{dateLine:f,timeLine:b,allDayLine:g,recurrenceLine:y}=getFormattedContent(m,u,c,d,a,_,h,p);return n.createElement("div",{className:U().textContainer},n.createElement("span",{className:U().dateLine},f),b&&n.createElement("span",null,b),g&&n.createElement("span",null,g),y&&n.createElement("span",{className:U().recurrenceLine},y))};WorkObjectDateTimeRange.displayName="WorkObjectDateTimeRange";var V=a(0x470fe2e6),G=a(0x1bca37972),q=a.n(G);let WorkObjectEmail=({email:e,inline:t})=>n.createElement(u.A,{href:`mailto:${e}`},n.createElement("div",{className:l()(q().emailFieldContent,{[q().inline]:t})},n.createElement(p.Ah,{name:"email",inline:!0,size:"16"}),n.createElement("div",{className:q().emailFieldContentText},n.createElement(_.A,{lines:1},e))));WorkObjectEmail.displayName="WorkObjectEmail";var j=a(0x1cbdfeceb),z=a(0x1ee9b0300),K=a(0xb13c1a),$=a(0x1a02c72b5),Y=a(0xd6a16321),Q=a(0x1c68b3eea),Z=a.n(Q);let J=new c.Ay("work-objects"),ExternalUserProfileCard=({externalUser:e})=>{let t=(0,r.wA)(),a=(0,z.w)(e.text),i=(0,n.useCallback)(()=>{t((0,$.o)({...(0,Y.x0)({name:e.text,imageUrl:e.image?.image_url,url:e.url,email:e.email})}))},[t,e.email,e.image?.image_url,e.text,e.url]),l=(0,n.useCallback)(e=>{e.stopPropagation()},[]);return n.createElement("div",{onClick:l,role:"presentation",className:Z().externalUserProfileCard},n.createElement("div",{className:Z().profileCardContainer},n.createElement("div",{className:Z().externalUserImgContainer},n.createElement("img",{src:e.image?.image_url||a,alt:e.image?.alt_text||e.text,className:Z().externalUserImg})),n.createElement("div",{className:Z().externalUserInfo},n.createElement("div",{className:Z().externalUserNameContainer},n.createElement(d.Nm,{className:Z().externalUserName,onClick:i},n.createElement(_.A,{lines:1,withTooltip:!0},e.text)),n.createElement("div",{className:Z().externalTag},J.t("External"))),e.email)),n.createElement("div",{className:Z().buttonContainer},e.email&&n.createElement(u.A,{href:`mailto:${e.email}`,style:{width:"100%"}},n.createElement(d.Ay,{type:"outline",size:"small",onClick:j.A,style:{width:"100%"}},n.createElement(p.Ah,{name:"email",inline:!0}),n.createElement("div",{className:"padding_left_25"},n.createElement(_.A,{lines:1},J.t("Email {name}",{name:e.text}))))),e.url&&n.createElement(d.Ay,{type:"outline",size:"small",href:e.url,onClick:j.A,style:{width:"100%"}},n.createElement(p.Ah,{name:"new-window",inline:!0}),n.createElement("div",{className:"padding_left_25"},J.t("View in App")))))};ExternalUserProfileCard.displayName="ExternalUserProfileCard";let WorkObjectExternalUser=({externalUser:e})=>{let t=(0,z.w)(e.text),a=(0,n.useCallback)(()=>n.createElement(ExternalUserProfileCard,{externalUser:e}),[e]);return n.createElement(K.d,{className:Z().hoverCard,position:"top-left",renderCard:a},n.createElement("div",{className:Z().externalUserField},n.createElement("div",{className:Z().externalUserHoverImgContainer},n.createElement("img",{src:e.image?.image_url||t,alt:e.image?.alt_text||e.text,className:Z().externalUserHoverImg})),n.createElement("span",{className:"padding_left_50 padding_right_50"},n.createElement(_.A,{lines:1},e.text))))};WorkObjectExternalUser.displayName="WorkObjectExternalUser";var X=a(0x32d3ef3d),ee=a(0x1f152a7c3),et=a(0xea466c39),ea=a(0x1fd6135f2),en=a(0x1d9627ee3),er=a(0xbd3de346),ei=a(0x14ea3ce99),el=a(0x4d9b2df9),eo=a(0x24e98a449),es=a(0x1b6f39a31),ec=a(0x11c82607b),ed=a(0x2180443d9),em=a(0x1ad6b19a9);let eu=(0,ec.Ay)("Opens a work object file in full-size preview",(e,t,{entityId:a,file:n,channelId:r,messageTs:i})=>{let l=t(),o=(0,ed.a)(l,a),s=(0,es.Kr)(o),c={entityId:a,fileId:n.id},d=(0,C.Ay)({getState:t,label:eo.t6});if(!s)return d.error(Error("Work object model not found for file preview"),c),!1;let m=n.app_id??s.appId(),u=n.external_id??"",p=n.url_private;if(!p)return d.error(Error("File does not have a file preview url"),c),!1;let h={is_supported:!0,preview_url:p,mime_type:n.mimetype};return e((0,em.P)({entityId:a,id:u,fileId:n.id,appId:m,entityUrl:p,channelId:r,messageTs:i,isFullSizePreviewEnabled:!0,fullSizePreview:h,flexpaneViewType:el.o.EXPANDED})),!0});function WorkObjectFile({fileId:e,isExpanded:t,entityId:a,channelId:i,messageTs:l}){let o=(0,r.wA)(),s=(0,D.d4)(t=>(0,ei.Lp)(t,e)),c=t?X.S.thumbnail:X.S.compact,d=(0,er.sJ)(s)||s.mimetype?.startsWith("image/"),m=(0,n.useMemo)(()=>d?(0,er.WA)(s,{containerWidth:80,containerHeight:80,cover:!0,suppressAnimations:!0}):null,[s,d]),u=(0,n.useCallback)(()=>{s&&!s.isUnknown&&!s.isNonExistent&&(a&&o(eu({entityId:a,file:s,channelId:i,messageTs:l}))||o((0,en.A)({fileId:s.id,channelId:i,threadTs:l,storyTs:l})))},[o,s,a,i,l]);if(!s||s.isNonExistent)return null;let p=X.w.enabled;return(s.isUnknown&&(p=d?X.w.loading:X.w.processing),d)?n.createElement(ea.A,{isFullWidth:!0,size:c,thumbnailSrc:m?.src||"",altText:s.name||"",ariaLabel:s.name||"",primaryLabel:s.name||"",secondaryLabel:s.pretty_type||s.filetype||"",isRemovable:!1,entityState:p,onClick:u,isFullHeight:t}):n.createElement(et.A,{isFullWidth:!0,type:(0,ee.j)(s),size:c,primaryLabel:s.name||"",secondaryLabel:s.pretty_type||s.filetype||"",ariaLabel:s.name||"",isRemovable:!1,entityState:p,onClick:u,isFullHeight:t})}eu.meta={name:"openWorkObjectFilePreview",key:"createThunkOpenWorkObjectFilePreview",description:"Opens a work object file in full-size preview"},WorkObjectFile.displayName="WorkObjectFile";var ep=a(0xceb4914),eh=a(0x8ca8865d),e_=a(0x1f5c53bc),ef=a(0xdfb68246),eb=a.n(ef);let WorkObjectInput=({input:e,renderBlocks:t,entityId:a})=>{let i=(0,n.useMemo)(()=>[e],[e]),l=(0,n.useRef)(null),o=(0,r.wA)(),s=(0,D.d4)(L.pM),c=(0,D.d4)(e=>(0,e_.lL)(e,a));return(0,n.useEffect)(()=>{s&&c&&c===e.block_id&&l.current&&requestAnimationFrame(()=>{let e=l.current?.querySelector('input, textarea, select, [tabindex]:not([tabindex="-1"])');e&&e.focus(),o((0,eh.cD)({entityId:a,focusBlockId:void 0}))})},[s,c,e.block_id,a,o]),n.createElement("div",{ref:l,className:eb().workObjectInput},t(i))};WorkObjectInput.displayName="WorkObjectInput";var eg=a(0x5f0e06d4),ey=a(0xf27817c9),eA=a(0x40c0d834),ex=a(0x62a17882),eE=a(0x22b8621cf),eC=a(0x11c86845f),ek=a(0xfa28400d),ev=a(0x99233ecb),eS=a(0x176a6b6c5),eI=a(0x1f83a8c66),ew=a(0x2417d1641),eT=a(0x3711e82d),eN=a(0x1fdf007c4),eM=a(0xb04c4a12),eR=a(0x5dd1c0f2),eP=a(0x15bd01ec9),eL=a(0xcc530c82),eO=a.n(eL);let eD=new c.Ay("work-objects"),eF={name:"ellipsis-vertical-filled",size:"18"},eU={name:"new-window",size:"18"},WorkObjectReferenceWithHover=({hoverCaption:e,appName:t,appId:a,title:r,icon:i,isLoading:l,displayType:o})=>{let{isHovered:s}=(0,ey.r)(),c=(0,n.useMemo)(()=>s?n.createElement("div",{className:eO().hoveredSubtitle},e):t,[s,e,t]);return n.createElement(eA.A,{eventId:eT.EventId.WORK_OBJECT_REFERENCE_UNFURL,workObjectType:o,appId:a,uiComponentName:eT.UiComponentName.WORK_OBJECT_REFERENCE_UNFURL,clogImpression:!0},n.createElement("div",{className:eO().workObjectReferenceContainer},n.createElement(eI.z,{appId:a,entityTitle:r,entityState:l?X.w.processing:X.w.enabled,secondaryLabel:c,productIcon:i})))};WorkObjectReferenceWithHover.displayName="WorkObjectReferenceWithHover";let WorkObjectReference=({entityReference:e,"data-entity-list-index":t})=>{let{entity_id:a,app_id:i,entity_url:l,title:o,icon:s,display_type:c}=e,d=(0,r.wA)(),m=c||"",u=(0,ex.y3)()||(0,eN.S)(),p=(0,D.d4)(e=>(0,eR.jH)(e,i)),h=eD.t("Preview in Slack"),[_,f]=(0,n.useState)(0),b=(0,n.useRef)(0),g=(0,D.d4)(e=>0===_?null:(0,e_.Ne)(e,{recordId:a,entityUrl:l,lookupFunction:void 0,useLegacyUrl:!1,reason:"work-objects-reference-on-click"})),y=(0,n.useContext)(eS.r4)===eM.Y.WORK_OBJECT_FULL_SIZE_PREVIEW,A=_>0&&(!g||(0,eP.nY)(g)),x=(0,D.d4)(L.GH);(0,n.useEffect)(()=>{if(0===_||!g||(0,eP.nY)(g)||b.current===_)return;b.current=_;let e=(0,es.Kr)(g);d((0,em.P)({entityId:a,relatedConversationsEntityId:e?.relatedConversationsEntityId(),id:a,appId:i,workObjectType:c||e?.displayType(),entityUrl:l,isFullSizePreviewEnabled:!!e?.isFullSizePreviewEnabled(x),fullSizePreview:e?.fullSizePreview(),authProviderKey:e?.authProviderKey(),useLegacyUrl:!1,fileId:e?.fileId(),openedFromFilePreviewModal:y}))},[d,a,i,c,l,g,_,y,x]);let E=(0,n.useCallback)(()=>{A||f(e=>e+1)},[A]),{copyLink:{menuItem:C},openInApp:{menuItem:k},share:{menuItem:v},openInWindow:{callback:S}}=(0,ew.A)({appId:i,authProviderKey:void 0,entityId:a,entityTitle:o,entitySubtitle:p,icon:s,externalUrl:l,lookupFunction:void 0,workObjectDisplayType:m,openedFromFilePreviewModal:y}),w=(0,n.useCallback)(e=>n.createElement(eA.A,{eventId:eT.EventId.WORK_OBJECT_REFERENCE_UNFURL,uiComponentName:eT.UiComponentName.WORK_OBJECT_REFERENCE_UNFURL_MENU},n.createElement(ev.Ay,e,v,C,n.createElement(ev.bX,null),k)),[v,C,k]),T=(0,n.useMemo)(()=>n.createElement(eC.A,null,u&&n.createElement(eE.A,{"aria-label":eD.t("Open in new window"),tooltipLabel:eD.t("Open in new window"),isMenuTrigger:!0,autoClogProps:I.G0,svgIconProps:eU,onClick:S,buttonSize:"small"}),n.createElement(eE.A,{"aria-label":eD.t("More actions"),tooltipLabel:eD.t("More actions"),isMenuTrigger:!0,autoClogProps:I.G0,svgIconProps:eF,onClick:j.A,renderMenu:w,buttonSize:"small"})),[w,u,S]);return n.createElement(ek.Ay,{size:X.S.compact,entityState:A?X.w.processing:X.w.enabled,actionsBar:T,isRemovable:!1,isAutoHeight:!0,isFullWidth:!0,onClick:E,"data-entity-list-index":t},n.createElement(WorkObjectReferenceWithHover,{appId:i,title:o,icon:s,isLoading:A,hoverCaption:h,appName:p,displayType:c}))};WorkObjectReference.displayName="WorkObjectReference";var eB=a(0x2043404b0);let WorkObjectRichText=({richTextBlock:e,maxLines:t=10,maxChars:a,hideTruncationExpandBtn:r})=>n.createElement(eB.A,{maxLines:t,maxChars:a,elements:e.elements,hideTruncationExpandBtn:r});WorkObjectRichText.displayName="WorkObjectRichText";var eH=a(0x11a8d0917),eW=a.n(eH);let TableauHeaderField=({value:e})=>{let{text:t,badge:a}=e,renderBadge=()=>a?n.createElement("span",{className:eW().badge,style:{backgroundColor:a.background_color,color:a.color}},a.text):null;return renderBadge.displayName="renderBadge",n.createElement("div",null,n.createElement("div",{className:eW().headerWithBadgeContainer},n.createElement("div",{className:eW().analyticsValue},t),renderBadge()))};TableauHeaderField.displayName="TableauHeaderField";let TableauTextField=({value:e})=>n.createElement("span",{className:eW().analyticsSubText},e);TableauTextField.displayName="TableauTextField";var eV=a(0xa089d16d),eG=a(0x253d294eb),eq=a(0x1e5b1d40b),ej=a.n(eq);let WorkObjectTag=({text:e,imageUrl:t,imageBlock:a,url:r,theme:i,truncate:o})=>{let s={[ej().informative]:i===eG.ES.Informative,[ej().flamingo]:i===eG.ES.Flamingo,[ej().honeycomb]:i===eG.ES.Honeycomb,[ej().grass]:i===eG.ES.Grass,[ej().gray]:i===eG.ES.Gray,[ej().indigo]:i===eG.ES.Indigo,[ej().lagoon]:i===eG.ES.Lagoon,[ej().jade]:i===eG.ES.Jade,[ej().horchata]:i===eG.ES.Horchata,[ej().aubergine]:i===eG.ES.Aubergine},c=(0,n.useMemo)(()=>a?n.createElement(ep.O,{classNames:l()({[H().tagImage]:!!i}),imageBlock:a,displayImageWithoutLink:!0}):t?n.createElement(eV.A,{src:t,alt:e,height:20,width:20}):null,[a,t,e,i]),m=n.createElement("div",{className:l()(H().tagField,s,{[H().tagLink]:!!r})},c,n.createElement("span",{className:"padding_left_25 padding_right_25"},o?n.createElement(_.A,{lines:1,withTooltip:!0},e):e));return r?n.createElement(h.Ay,{tip:r},n.createElement(d.jV,{href:r},m)):m};WorkObjectTag.displayName="WorkObjectTag";var ez=a(0xc4e87e00);function getRichTextFromChannelField(e,t){return{type:ez.Lv.RICH_TEXT,block_id:t,elements:[{type:ez.Lv.SECTION,elements:[{type:ez.Lv.CHANNEL,channel_id:e.channel_id}]}]}}var eK=a(0x1fc98bd03);function shouldDisplayIconLabel(e){return"Description"===e?"info":"Location"===e?"location":"Meeting URL"===e?"video":"Reminder"===e?"notifications":"Date & time"===e?"calendar":void 0}var e$=a(0x1282104f7),eY=a(0x121ede9d1),eQ=a(0x1c5116e43);let eZ=new c.Ay("work-objects");function getLayoutStyle(e){let t=e.key();switch(t){case"compact":case"minimal":return H().compact;case"expanded":return H().expanded;case"full":return H().full;default:(0,o.Kh)(t)}}function hasFieldInput(e){let t=e.inputs();return!!t&&t.length>0}let Value=({field:e,hasPreviewImage:t,isFieldAlone:a,includeTruncation:r,layout:i,isTableauEntityType:o,entityUrl:s,entityId:c,channelId:d,messageTs:m})=>{let p=(0,D.d4)(L.GR),h=(0,n.useRef)(null),[f,b]=(0,n.useState)(!1),g=!!i?.isFullLayout(),y=!!i?.isExpandedLayout();if((0,n.useEffect)(()=>{h.current&&b(h.current.scrollWidth>h.current.clientWidth)},[e]),e.isRichText()||e.isUnknown())return y?n.createElement(WorkObjectRichText,{richTextBlock:e.value(),maxLines:4,maxChars:160,hideTruncationExpandBtn:!0}):n.createElement(WorkObjectRichText,{richTextBlock:e.value()});if(e.isTimestamp())return n.createElement(v.Y,{value:e.value(),hideTimestampIcon:y,alwaysAgo:!1});if(e.isDate())return n.createElement(V.B,{value:e.value(),hideDateIcon:y});if(e.isHeaderWithBadge())return n.createElement(TableauHeaderField,{value:e.value()});if(e.isDateTimeRange())return n.createElement(WorkObjectDateTimeRange,{ranges:e.value()});let A=l()({[H().flexpaneTokenArray]:g,[H().unfurlTokenArray]:!g&&e.value().length>1});if(e.isImage()){let r=e.value();return 1===r.length?n.createElement(ep.O,{imageBlock:e.value()[0],displayImageWithoutLink:t,displayImageWithBorder:!o,ariaHidden:y,resizeToPreview:y&&a,externalUrl:s}):n.createElement("div",{ref:h,className:l()(H().thumbnailsContainer,A,{[H().showFade]:f})},r.map(e=>n.createElement(S.A,{key:e.alt_text,url:e.image_url,title:e.title?.text,originalWidth:e.image_width,originalHeight:e.image_height,width:36,height:36,displayImageWithoutLink:t,displayImageWithBorder:!0,backgroundSize:"cover",disableImageActions:!0})))}if(e.isUser()||e.isSlackUser()){let t={shouldStopPropagation:!0};return e.value().some(e=>"metadata"in e)&&p?y?n.createElement("div",{className:l()(A,{[H().showFade]:f})},e.value().map(e=>n.createElement(eg.Z3,{key:"slack"===e.user_type?e.user_id:e.text,user:e}))):n.createElement(eg.m5,{users:e.value(),entityId:i?.entityId(),entityUrl:s}):n.createElement("div",{ref:h,className:l()(H().userField,A,{[H().showFade]:f})},e.value().map(e=>"external"===e.user_type?n.createElement(WorkObjectExternalUser,{key:e.text,externalUser:e}):n.createElement(e$.A,{entityId:e.user_id,key:e.user_id,size:"small",forceRealName:!0,className:H().userToken,enableProfileHoverCard:!0,customizeProfileHoverCardProps:t})))}if(e.isEmail()){let t=e.value();return n.createElement("div",{ref:h,className:l()(H().userField,A,{[H().showFade]:f})},t.map(e=>n.createElement(WorkObjectEmail,{key:e,email:e})))}if(e.isFile()){let t=e.value();return n.createElement("div",{ref:h,className:l()(H().workObjectFileContainer,{[H().unfurlTokenArray]:!g,[H().showFade]:f,flex_direction_column:g,[H().workObjectFileExpandedContainer]:y})},t.map(e=>n.createElement(WorkObjectFile,{key:e.file_id,fileId:e.file_id,isExpanded:y,entityId:c,channelId:d,messageTs:m})))}if(e.isLink())return n.createElement("div",{ref:h,className:l()(H().userField,A,{[H().showFade]:f})},e.value().map(e=>n.createElement(u.A,{key:e,href:e,underlineStyle:"underline"},n.createElement(_.A,{lines:1},e))));if(e.isTag())return n.createElement("div",{ref:h,className:l()(H().tagField,A,{[H().showFade]:f})},e.value().map(e=>{let t=`${e.text}-${e.color||"no-color"}-${e.icon_url||"no-icon"}-${e.link||"no-link"}`;return n.createElement(WorkObjectTag,{key:t,theme:e.color,text:e.text,url:e.link,imageUrl:e.icon_url,truncate:y})}));if(e.isChannel())return n.createElement("div",{ref:h,className:l()(H().channelField,A,{[H().showFade]:f})},e.value().map((e,t)=>n.createElement("div",{key:e.channel_id,className:H().arraySpacing},n.createElement(WorkObjectRichText,{richTextBlock:getRichTextFromChannelField(e,t.toString())}))));if(e.isEntityRef())return y?n.createElement("div",{className:l()(A,{[H().showFade]:f})},e.value().map(e=>n.createElement(WorkObjectTag,{key:e.entity_id,text:e.title,imageBlock:e.icon,theme:"informative",truncate:y}))):n.createElement(k.u,null,e.value().map(e=>n.createElement(WorkObjectReference,{key:e.entity_id,entityReference:e})));if(e.isCheckbox())return n.createElement("div",null,e.value().map(e=>n.createElement(CheckboxFieldValue,{key:e.text,checkbox:e,showDescription:!y,truncateTitle:y})));let x=e.value();if(o)return n.createElement(TableauTextField,{value:x});if(!r)return x;let E=e.isLong(),C=E?2:1;return E&&a&&(C=4),n.createElement(_.A,{lines:C,breakWords:!1},x)};Value.displayName="Value";let ExternalWorkObjectFieldBlocks=({layout:e,renderBlocks:t,source:a=eQ.tL.Unfurl,entityUrl:i,channelId:o,messageTs:s,containerWidth:c,isTableauEntityType:u,isCalendarEntity:f})=>{let b=e.entityId(),g=(0,D.d4)(e=>(0,e_.G1)(e,b)),y=(0,D.d4)(e=>(0,e_.Vc)(e,b)),A=(0,D.d4)(e=>(0,e_.rP)(e,b)),x=getLayoutStyle(e),E="expanded"===e.key(),C=E&&!u,k=e.isFullLayout(),v=g===eQ.Gk.Form,S=(0,D.d4)(L.KT),w=(0,D.d4)(L.pM),T=(0,r.wA)(),N=(0,n.useCallback)(async e=>{i&&(w&&e&&T((0,eh.cD)({entityId:b,focusBlockId:e})),await T((0,eY.E)({entityId:b,entityUrl:i,messageTs:s,channelId:o})))},[T,i,s,o,b,w]),M=e.fields().find(e=>e.isImage());return(0,D.Z2)(t=>(0,eK.P$)(t,e)).map(r=>{let g=shouldDisplayIconLabel(r.label()),w=!!g&&k&&!!f&&!v,T=r.isImage()&&E||u||w,R=r.isLong(),P=eZ.rt("Can\u2019t edit in Slack"),L=v&&!hasFieldInput(r)&&k,O=!v&&hasFieldInput(r)&&k,D=r.isImage()&&M?.label()===r.label()&&a===eQ.tL.FileViewer,F=R||c&&r.isImage()&&r.value()[0].image_width>=c/2,U="Attendees"===r.label();if(D)return null;let B=!g||!k||!f||v,W=r.inputs();return v&&k&&W&&W.length>0&&y?W.map(e=>n.createElement("div",{className:l()(H().contentItem,x,{[H().gridItemLong]:F,[H().displayColumn]:B,[H().calendarEntity]:g&&k&&f}),key:e.block_id},n.createElement("span",{className:l()(H().contentItemLabel,x,H().bold)},n.createElement(_.A,{lines:1},e.label.text)),n.createElement("span",{className:l()(H().contentItemValue,x)},n.createElement(WorkObjectInput,{input:e,renderBlocks:t,entityId:b})))):E&&r.isDateTimeRange()?n.createElement(WorkObjectDateTimeRange,{key:r.label(),ranges:r.value(),isExpanded:E}):n.createElement("div",{className:l()(H().contentItem,x,{[H().gridItemLong]:F,[H().displayColumn]:B,[H().calendarEntity]:g&&k&&f}),key:r.label()},!T&&n.createElement("span",{className:l()(H().contentItemLabel,x,v&&k?H().bold:null)},L&&n.createElement(p.Ah,{name:"lock-filled",inline:!0,role:"tooltip",style:{marginRight:"3px",padding:"1px"}}),n.createElement(_.A,{lines:1},U&&r.isUser()||r.isSlackUser()?`${r.label()} (${r.value()?.length})`:r.label())),w&&n.createElement("div",null,n.createElement(p.Ah,{name:g,size:"20",inline:!0,style:{marginRight:"3px"}})),L?n.createElement(h.Ay,{position:"bottom",tip:P,key:r.label(),"aria-label":eZ.t("Can\u2019t edit in Slack")},n.createElement(d.Nm,{className:"full_width"},n.createElement("span",{className:l()(H().contentItemValue,x,L?H().fakeInput:null)},n.createElement(Value,{field:r,hasPreviewImage:E,isFieldAlone:1===e.fields().length,includeTruncation:C,layout:e,isTableauEntityType:u,entityUrl:i,entityId:b,channelId:o,messageTs:s})))):n.createElement("span",{className:l()(H().contentItemValue,x,L?H().fakeInput:null)},O&&S?n.createElement("div",{className:H().editableValueContainer},n.createElement(Value,{field:r,hasPreviewImage:E,isFieldAlone:1===e.fields().length,includeTruncation:C,layout:e,isTableauEntityType:u,entityUrl:i,entityId:b,channelId:o,messageTs:s}),n.createElement("div",{className:H().editButtonContainer},n.createElement(d.Nm,{className:H().editButton,onClick:()=>N(r.inputs()?.[0]?.block_id),autoClogProps:I.Y_,"aria-label":eZ.t("Edit")},A?n.createElement(m.A,{size:"medium",color:"blue"}):n.createElement(p.Ah,{name:"edit",width:16,height:16})))):n.createElement(Value,{field:r,hasPreviewImage:E,isFieldAlone:1===e.fields().length,includeTruncation:C,layout:e,isTableauEntityType:u,entityUrl:i,entityId:b,channelId:o,messageTs:s})))})};ExternalWorkObjectFieldBlocks.displayName="ExternalWorkObjectFieldBlocks";let eJ=[],ExternalWorkObjectFields=({layout:e,source:t=eQ.tL.Unfurl,entityUrl:a,channelId:i,messageTs:o,containerWidth:c,isTableauEntityType:d,isCalendarEntity:m})=>{let u,p=e.entityId(),h=(0,D.d4)(e=>(0,e_.G1)(e,p))===eQ.Gk.Form,_=(0,D.d4)(e=>(0,e_.Vc)(e,p)),k=(0,D.d4)(e=>(0,e_.zz)(e,p)),v=(0,D.d4)(e=>(0,e_.ov)(e,p));e.isFullLayout()&&(u=e?.titleInput());let S=(0,n.useMemo)(()=>({container:{type:f.pi.view,view_id:_},serviceId:k,serviceTeamId:v}),[_,k,v]),I=(0,n.useMemo)(()=>{let t=e.fields().flatMap(e=>h?e.inputs():null).filter(e=>!!e);return h&&u&&t.push(u),t},[e,h,u]),w=(0,n.useMemo)(()=>({id:_??"",type:s.cs.entity_details}),[_]),T=(0,D.d4)(e=>(0,e_.e3)(e,p)),N=(0,D.d4)(e=>(0,e_.Zr)(e,p)),M=(0,A.B)(I),R=(0,r.wA)(),P=(0,n.useCallback)(({errors:e})=>{R((0,eh.xD)({entityId:p,fieldErrors:e}))},[R,p]),L=(0,n.useCallback)(e=>{if(N){let t=((e,t,a)=>{let n=(0,x.A)(a);try{for(let a of Object.keys(t)){let r=!1;for(let n of Object.keys(t[a])){let i=normalizeBlockState(t[a][n]),l=normalizeBlockState(e[a]?.[n]);if(r=!(0,E.Ay)(l,i,4))break}n[a]=r}}catch(e){(0,C.Wo)().error(`Fatal error in block-kit-state-store/reducer. ${e}`)}return n})(M,e,N);R((0,eh.U$)({entityId:p,pendingChanges:t}))}},[R,p,M,N]);return n.createElement(g.A,{view:w,isStateEnabled:h,showErrors:!0,errorState:T?{errors:T}:void 0,onError:P},n.createElement(y.A,{key:_,blocks:I,containerIdKey:_,onChange:L},n.createElement(b.A,{blocks:eJ,container:f.pi.work_object,blocksContainerContext:f.pi.work_object,containerActionsPayload:S},({renderBlocks:r})=>n.createElement(n.Fragment,null,h&&u&&n.createElement("div",{className:l()(H().contentItem,H().full,H().displayColumn)},n.createElement("span",{className:l()(H().contentItemLabel,H().full,h?H().bold:null)},eZ.rt("Title")),n.createElement("span",{className:l()(H().contentItemValue,H().full)},n.createElement(WorkObjectInput,{input:u,renderBlocks:r,entityId:p}))),n.createElement(ExternalWorkObjectFieldBlocks,{layout:e,renderBlocks:r,source:t,entityUrl:a,channelId:i,messageTs:o,containerWidth:c,isTableauEntityType:d,isCalendarEntity:m})))))};ExternalWorkObjectFields.displayName="ExternalWorkObjectFields"},0xcdfe9538:(e,t,a)=>{"use strict";a.d(t,{c:()=>useClickBehaviorUserPref});var n=a(0xbad225b5),r=a(0x1e0ed7534),i=a(0x143f63057),l=a(0x226892387);let useClickBehaviorUserPref=({appId:e,productNameOrAppName:t})=>{let a=(0,l.d4)(i.h),o=(0,n.useMemo)(()=>(0,r.W)(e,t)??e,[e,t]),s=(0,n.useMemo)(()=>o?a[o]:void 0,[a,o]);return{workObjectClickBehaviorPrefs:a,clickBehaviorUserPrefKey:o,workObjectClickOpensUrlPref:s}}},0xb7471cc3:(e,t,a)=>{"use strict";a.d(t,{U:()=>useGetRelatedThreads});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x23e3d2669),l=a(0x105ecbbed);function useGetRelatedThreads({currentThreadKey:e,entityId:t,entityUrl:a,excludeUnjoinedChannels:o,excludeBots:s,skip:c}){let d=(0,r.wA)(),[m,u]=(0,n.useState)(!1),[p,h]=(0,n.useState)(!1),[_,f]=(0,n.useState)([]),b=(0,n.useCallback)(async()=>{u(!0);let n=await d((0,i.J)({entityId:t,entityUrl:a,excludeUnjoinedChannels:o,excludeBots:s,reason:"get-refs-for-entity"})),r=[];for(let{channel_id:t,timestamp:a}of(e&&r.push(e),n.refs)){let n=(0,l.Iu)(t,a);n&&e!==n&&r.push(n)}f(r),u(!1),h(!0)},[e,d,t,a,o,s]);return(0,n.useEffect)(()=>{c||b()},[d,t,b,c]),{isLoading:m,isComplete:p,relatedThreadKeys:_,refresh:b}}},0x170453bed:(e,t,a)=>{"use strict";a.d(t,{b:()=>useHandleWorkObjectActions});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xd6ba6894),l=a(0x184825275),o=a(0x8ca8865d);let useHandleWorkObjectActions=({entityId:e,serviceId:t,serviceTeamId:a,containerType:s,messageTs:c,channelId:d,entityUrl:m,isEphemeral:u})=>{let p=(0,r.wA)(),h=(0,n.useCallback)(n=>p((0,l.W)({serviceId:t,serviceTeamId:a,container:{type:s,entityId:e,messageTs:c,channelId:d,entityUrl:m,isEphemeral:u},actions:[n]})),[t,a,s,e,p,c,d,m,u]),_=(0,n.useCallback)(t=>()=>{t&&(t.url?i.J.open(t.url,"_blank"):(h(t),p((0,o.lP)({awaitingRefresh:!0,entityId:e}))))},[h,p,e]);return{handleBlockAction:h,onActionButtonClick:_}}},0xb6f49241:(e,t,a)=>{"use strict";a.d(t,{R:()=>useRefreshUnfurl});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1f8893105),l=a(0x177c6bf9e),o=a(0x24e98a449),s=a(0x21e98db88),c=a(0x1ec68d6a3),d=a(0x226892387),m=a(0x1c5116e43);let useRefreshUnfurl=({channelId:e,messageTs:t,entityId:a,updatedAt:u,isForwardedMessage:p=!1,updateTableauObject:h,tableauStatus:_,isTableauEntity:f,tableauEmbedRef:b,source:g})=>{let y=(0,r.wA)(),A=(0,d.d4)(e=>(0,c.Ay)({state:e,label:o.t6})),x=(0,d.d4)(i.d1),[E,C]=(0,n.useState)(!1),[k,v]=(0,n.useState)(!1),S=(0,n.useRef)(u),I=(0,n.useRef)(),w=(0,n.useRef)(),T=(0,n.useRef)(),N=g===m.Xv.Canvas&&(_===l.UN.SUCCESS||_===l.UN.FAIL),M=!!(e&&t&&a&&!p)&&(!f||N);return(0,n.useEffect)(()=>{E&&u&&u!==S.current&&(w.current&&clearTimeout(w.current),C(!1)),S.current=u},[u,E]),(0,n.useEffect)(()=>()=>{I.current&&clearTimeout(I.current),w.current&&clearTimeout(w.current),T.current?.abort()},[]),{handleRefresh:(0,n.useCallback)(async()=>{if(M){C(!0),v(!1),I.current&&clearTimeout(I.current),T.current=new AbortController,w.current=setTimeout(()=>{T.current?.abort(),A.error(Error("Refresh unfurl timed out"),{entityId:a,channelId:e,messageTs:t}),C(!1),v(!0),I.current=setTimeout(()=>{v(!1)},2e3)},1e4);try{f&&h&&b?(x&&await b.current?.refresh(),await h(),w.current&&clearTimeout(w.current),C(!1)):await y((0,s.L)({channel:e,ts:t,entityId:a,reason:"work-objects-manual-refresh",abortSignal:T.current.signal}))}catch(n){if(n instanceof Error&&"AbortError"===n.name)return;w.current&&clearTimeout(w.current),A.error(Error("Failed to refresh unfurl"),{error:n,entityId:a,channelId:e,messageTs:t}),C(!1),v(!0),I.current=setTimeout(()=>{v(!1)},2e3)}}},[M,A,a,e,t,f,h,b,x,y]),isRefreshing:E,canRefresh:M,refreshError:k}}},0x2417d1641:(e,t,a)=>{"use strict";a.d(t,{O:()=>et,A:()=>useWorkObjectContextMenuItems});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xd6ba6894),l=a(0x40c0d834),o=a(0x20482ad21),s=a(0x99233ecb),c=a(0x76230d58),d=a(0x2501a2cee),m=a(0x6e87d4ec),u=a(0x139aa1a7),p=a(0x2493bd395),h=a(0x154eaa784),_=a(0x3440462),f=a(0x15f443392),b=a(0x3ca4e1cc),g=a(0xcdfe9538),y=a(0xbd3de346),A=a(0xdd7fdd59),x=a(0x1fbf04ac9),E=a(0x1090ec8f9),C=a(0x226892387),k=a(0x14ea3ce99),v=a(0x2bdaffa8);function useShareWorkObject({entityId:e,lookupFunction:t,url:a,fallbackAppId:i,fallbackTitle:l,fallbackSubtitle:o,fallbackIcon:s,fallbackDisplayType:c,searchClogCallback:d}){let m=(0,r.wA)();return(0,n.useCallback)(async()=>{m((0,v.A)({fallbackAppId:i,fallbackTitle:l,fallbackSubtitle:o,fallbackIcon:s,url:a,fallbackDisplayType:c,entityId:e,lookupFunction:t})),d?.()},[m,i,l,o,s,a,c,e,t,d])}var S=a(0x21351909c),I=a(0x2516e26f3),w=a(0x1bc652f98),T=a(0xd6a16321),N=a(0xd843ab47),M=a(0x1c7cb6e50),R=a(0x1ed767a16),P=a(0x3711e82d),L=a(0xd89ed9da),O=a(0x6d72337),D=a(0x184deeba7),F=a(0x54eb2d82),U=a(0x143f63057),B=a(0x12f41fc32),H=a(0x228691cd3),W=a(0x11ce49797),V=a(0x5dd1c0f2),G=a(0x14149c126),q=a(0x8d0a2ff1),j=a(0x1de0c3949),z=a(0x1fcbb004d),K=a(0x16ffed5ab),$=a(0x19895585a),Y=a(0x8ca8865d),Q=a(0x15bd01ec9),Z=a(0xc9b196b3),J=a(0x1ad6b19a9),X=a(0x1c5116e43);let ee=new o.Ay("work-objects"),et={copyLink:"copyLink",feedback:"feedback",openInApp:"openInApp",syncData:"syncData",share:"share",viewDetails:"viewDetails",openInWindow:"openInWindow",todo:"todo",addToFolder:"addToFolder",viewRelatedConversations:"viewRelatedConversations",viewComments:"viewComments",addAsTab:"addAsTab",removeAsTab:"removeAsTab",clickBehaviorPref:"clickBehaviorPref"},getMenuIcon=({name:e})=>n.createElement(d.Ah,{name:e,size:"20"});getMenuIcon.displayName="getMenuIcon";let useWorkObjectContextMenuItems=({appId:e,authProviderKey:t,entityId:a,relatedConversationsEntityId:o,externalUrl:d,lookupFunction:v,workObjectDisplayType:et,channelId:ea,entityTitle:en,entitySubtitle:er,icon:ei,messageTs:el,useLegacyUrl:eo,refreshTs:es,isFullSizePreviewEnabled:ec,fullSizePreview:ed,isEphemeral:em,productName:eu,fileId:ep,openedFromFilePreviewModal:eh=!1,flexpaneViewType:e_,searchClogCallback:ef,entityType:eb,appUnfurlUrl:eg})=>{let ey=(0,C.d4)(b.ZS),eA=(0,C.d4)(e=>"on"===(0,G._Z)(e,"tab_3p_files_fe_allow_add")),ex=(0,r.wA)(),eE=(0,C.d4)(t=>e&&(0,V.jH)(t,e)),eC=eu||eE,ek=(0,C.d4)(e=>es?(0,L.A)(e,es,{uncapitalized:!0}):null),ev=(0,C.d4)(D.L),eS=a.match(F.u),eI=eS?eS[2]:void 0,ew=(0,C.d4)(e=>(0,k.YM)(e,eI)),eT=(0,C.d4)(e=>ep?(0,k.FD)(e,ep):void 0),{closeView:eN,getSecondaryView:eM}=(0,n.useContext)(N.A),eR=!!(0,C.d4)(eM),eP=(0,C.d4)(t=>(0,I.B)(t,{appId:e,file:ew,fullSizePreview:ed,productOrAppName:eC,workObjectEntityId:a})),{workObjectClickBehaviorPrefs:eL,workObjectClickOpensUrlPref:eO,clickBehaviorUserPrefKey:eD}=(0,g.c)({appId:e,productNameOrAppName:eC}),eF=(0,n.useMemo)(()=>void 0!==eO,[eO]),eU=(0,n.useMemo)(()=>eF?eO:eP,[eF,eO,eP]),eB=(0,S.B)({experimentEnabled:ey,appId:e,appUnfurlUrl:eg})?eg:d,eH=eb===w.C.SlackEntitiesTableauAnalytics,eW=(({fileId:e})=>{let t=(0,r.wA)(),a=(0,C.d4)(t=>e?(0,k.Lp)(t,e):null),i=(0,C.d4)(e=>(0,y.E$)(a)?(0,A.q)(e,a):void 0),l=(0,n.useMemo)(()=>{if(a&&i)return(0,x.v)(a,i)},[a,i]);return(0,n.useCallback)(()=>{a&&t((0,E.q)({file:a,payload:l}))},[t,a,l])})({fileId:ep}),eV=(0,p.i)(ea??""),eG=(0,h.T)(ea??""),eq=ee.t("Preview in Slack"),ej="eye-open",ez=(0,n.useCallback)(()=>{a&&e&&(eI||eH)&&(ex((0,J.P)({entityId:a,relatedConversationsEntityId:o,id:eI,appId:e,lookupFunction:(0,M.t)(v),authProviderKey:t,workObjectType:et,entityUrl:d,channelId:ea,messageTs:el,useLegacyUrl:eo,isEphemeral:em,isFullSizePreviewEnabled:ec,fullSizePreview:ed,fallbackTitle:en,fileId:ep,flexpaneViewType:e_})),ef?.())},[a,e,eH,o,eI,ex,v,t,et,d,ea,el,eo,em,ec,ed,en,ep,e_,ef]),eK=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"view",label:eq,onSelected:ez,icon:getMenuIcon({name:ej}),autoClogProps:f.DX}),[eq,ez]),e$=(0,n.useMemo)(()=>({menuItem:eK,label:eq,callback:ez,iconName:ej,autoClogProps:f.DX}),[eK,eq,ez,ej]),eY=ee.t("Share {workObjectDisplayType}",{workObjectDisplayType:et}),eQ="share-message",eZ=useShareWorkObject({url:eB,fallbackAppId:e,fallbackTitle:en??"",fallbackSubtitle:er??"",fallbackIcon:ei,fallbackDisplayType:et,entityId:a,lookupFunction:(0,M.t)(v),searchClogCallback:ef}),eJ=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"share",label:eY,onSelected:eZ,icon:getMenuIcon({name:eQ}),autoClogProps:f.tZ}),[eZ,eY,eQ]),eX=(0,n.useMemo)(()=>({menuItem:eJ,label:eY,callback:eZ,iconName:eQ,autoClogProps:f.tZ}),[eZ,eJ,eY,eQ]),e0=ee.t("Copy link"),e1=et?ee.t("Copy link to {workObjectDisplayType}",{workObjectDisplayType:et}):e0,e2="link",e4=(0,n.useCallback)(e=>{e.stopPropagation(),(0,R.x3)(eB),ex((0,W.A)()),ef?.()},[eB,ex,ef]),e5=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"copy",label:e1,onSelected:e4,icon:getMenuIcon({name:e2}),autoClogProps:f.yn}),[e1,e4,e2]),e3=(0,n.useMemo)(()=>({label:e1,menuItem:e5,callback:e4,iconName:e2,autoClogProps:f.yn}),[e1,e5,e4,e2]),e6=ee.t("Open in {productName}",{productName:eC}),e8="new-window",e7=(0,n.useCallback)(e=>{e.stopPropagation(),eB&&(i.J.open(eB,"_blank","noreferrer,noopener"),ep&&eW(),ef?.())},[eB,ep,ef,eW]),e9=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"open",label:e6,onSelected:e7,icon:getMenuIcon({name:e8}),autoClogProps:f.CC}),[e6,e8,e7]),te=(0,n.useMemo)(()=>({label:e6,menuItem:e9,callback:e7,iconName:e8,autoClogProps:f.CC}),[e7,e6,e8,e9]),tt=ee.t("Leave us feedback\u2026"),ta="megaphone",tn=(0,n.useCallback)(e=>{e.stopPropagation(),ev&&ex((0,Z.UR)()),ef?.()},[ex,ev,ef]),tr=(0,n.useMemo)(()=>ev?n.createElement(n.Fragment,null,n.createElement(s.bX,null),n.createElement(s.Dr,{key:"feedback",label:tt,icon:getMenuIcon({name:ta}),onSelected:tn,autoClogProps:f.bC})):null,[tn,tt,ev,ta]),ti=(0,n.useMemo)(()=>({menuItem:tr,label:tt,callback:tn,iconName:ta,autoClogProps:f.bC}),[tr,tt,tn,ta]),tl=ee.t("Open in new window"),to="open-in-window",ts=(0,n.useCallback)(()=>{if(ec)return ex((0,z.O)({closeAll:eh})),ef?.(),ex((0,O.Bb)({viewSet:{[$.mq.Primary]:{...(0,T.mm)({entityId:a,relatedConversationsEntityId:o,appId:e,id:u.D.WorkObjectFilePreview,lookupFunction:(0,M.t)(v),authProviderKey:t,workObjectType:et,entityUrl:d,useLegacyUrl:eo,workObjectId:eI,channelId:ea,messageTs:el,fullSizePreview:ed,flexpaneViewType:e_})}},shouldShowSearch:!1}));let n=(0,T.Vn)({entityId:a,appId:e,relatedConversationsEntityId:o,id:u.D.WorkObject,lookupFunction:(0,M.t)(v),authProviderKey:t,workObjectType:et,entityUrl:d,useLegacyUrl:eo}),r={[$.mq.Primary]:n};ex((0,O.Bb)({viewSet:r})),eR&&eN?.(),ef?.()},[ec,a,e,o,v,t,et,d,eo,ex,eR,eI,ea,el,eh,ed,e_,eN,ef]),tc=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"window",label:tl,onSelected:ts,icon:getMenuIcon({name:to}),autoClogProps:f.xH}),[ts,tl,to]),td=(0,n.useMemo)(()=>({menuItem:tc,label:tl,callback:ts,iconName:to,autoClogProps:f.xH}),[ts,tc,tl,to]),tm=(0,C.d4)(e=>(0,q.XF)(e,{workObject:{entityId:a,externalUrl:d,lookupFunction:(0,M.t)(v)}})),tu=tm?ee.t("Remove from your to-dos"):ee.t("Add to your to-dos"),tp=tm?"check-circle":"check-add",th=(0,n.useCallback)(()=>{ex((0,j.A)({reference:{workObject:{entityId:a,title:en,externalUrl:d,lookupFunction:(0,M.t)(v)}}})),ef?.()},[ex,a,d,v,en,ef]),t_=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"todo",label:tu,icon:getMenuIcon({name:tp}),onSelected:th}),[th,tp,tu]),tf=(0,n.useMemo)(()=>({menuItem:t_,label:tu,callback:th,iconName:tp}),[t_,tu,th,tp]),tb=ee.t("Sync data"),tg="refresh",ty=(0,n.useMemo)(()=>ek?ee.t("Last updated {lastSyncTimeFormatted}",{lastSyncTimeFormatted:ek}):null,[ek]),tA=(0,n.useCallback)(()=>{ex((0,Q.mn)({lookupFunction:(0,M.t)(v),entityUrl:d,recordId:a,useLegacyUrl:eo,messageTs:el,channelId:ea,reason:"work-objects-refresh"})),ef?.(),ex((0,Y.Hx)({entityId:a,manualRefresh:!0}))},[ex,a,d,v,eo,el,ea,ef]),tx=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"refresh",label:ee.t("Sync data"),onSelected:tA,icon:getMenuIcon({name:tg}),autoClogProps:f.lN,description:ty}),[tA,tg,ty]),tE=(0,n.useMemo)(()=>({menuItem:tx,label:tb,callback:tA,iconName:tg,autoClogProps:f.lN}),[tA,tx,tb,tg]),tC=ee.t("Add to folder"),tk=(0,n.useCallback)(e=>n.createElement(_.e1,{fileId:ep,channelId:ea,menuProps:e}),[ea,ep]),tv=(0,n.useCallback)(()=>{ex((0,H.r)({channelId:ea,fileId:ew?.id})),ef?.()},[ex,ea,ew?.id,ef]),tS=ee.t("Add as tab"),tI=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"add-as-tab",label:tS,onSelected:tv,icon:getMenuIcon({name:"plus"}),autoClogProps:(0,f.PC)({fileType:eT??void 0})}),[tv,tS,eT]),tw=(0,n.useMemo)(()=>({menuItem:tI,label:tS,callback:tv,iconName:"plus"}),[tI,tv,tS]),tT=(0,n.useCallback)(()=>{let e=eV.find(e=>e.data?.fileId===ew?.id);e&&eG({id:e.id}),ef?.()},[eV,ew?.id,eG,ef]),tN=eA?ee.t("Remove as tab"):"",tM=(0,n.useMemo)(()=>n.createElement(s.Dr,{key:"remove-as-tab",label:tN,onSelected:tT,icon:getMenuIcon({name:"close"}),autoClogProps:(0,f.Gi)({fileType:eT??void 0})}),[tT,tN,eT]),tR=(0,n.useMemo)(()=>({menuItem:tM,label:tN,callback:tT,iconName:"close"}),[tM,tT,tN]),tP=(0,n.useMemo)(()=>n.createElement(c.A,{icon:getMenuIcon({name:"folder"}),label:tC,renderSubmenu:tk}),[tC,tk]),tL=(0,n.useMemo)(()=>({menuItem:tP,label:tC,callback:()=>{},iconName:"folder"}),[tP,tC]),tO=ee.t("Clicking a preview preference saved"),tD=ee.t("Unable to save preview click preference, please try again"),tF=(0,n.useCallback)(e=>{ex((0,K.M)({element:n.createElement(m.A,{position:"bottom-right"},e)}))},[ex]),tU=(0,n.useCallback)(e=>{let t={};if(eD){try{t=JSON.stringify({...eL,[eD]:e})}catch{tF(tD);return}ex((0,B.AZ)({pref:U.g,value:t})),tF(tO)}},[ex,eL,eD,tD,tO,tF]),tB=(0,n.useCallback)(()=>{tU(!0)},[tU]),tH=(0,n.useCallback)(()=>{tU(!1)},[tU]),tW=ee.t("Clicking a {productOrAppName} preview\u2026",{productOrAppName:eC}),tV=ee.t("Opens in browser"),tG=ee.t("Opens in Slack"),tq=(0,n.useCallback)(e=>n.createElement(l.A,{uiComponentName:P.UiComponentName.WORK_OBJECT_CLICK_PREFERENCE_MENU,clogImpression:!0},n.createElement(s.Ay,{...e,width:"auto"},n.createElement(s.c$,{label:tW}),n.createElement(s.Dr,{key:"click-behavior-pref-slack",label:tG,type:"radio",checked:!eU,onSelected:tH,autoClogProps:f.md}),n.createElement(s.Dr,{key:"click-behavior-pref-browser",label:tV,type:"radio",checked:eU,onSelected:tB,autoClogProps:f.gc}))),[tW,eU,tV,tG,tH,tB]),tj=ee.t("Clicking {productOrAppName} previews",{productOrAppName:eC}),tK=eU?tV:tG,t$=(0,n.useMemo)(()=>n.createElement(c.A,{icon:getMenuIcon({name:"left-click"}),label:tj,description:tK,renderSubmenu:tq}),[tq,tj,tK]),tY=(0,n.useMemo)(()=>({menuItem:t$,label:tj,callback:()=>{},iconName:"left-click"}),[tj,t$]),tQ=(0,n.useCallback)(()=>{a&&e&&(eI||eH)&&(ex((0,J.P)({entityId:a,relatedConversationsEntityId:o,id:eI,appId:e,lookupFunction:(0,M.t)(v),authProviderKey:t,workObjectType:et,entityUrl:d,channelId:ea,messageTs:el,useLegacyUrl:eo,isEphemeral:em,isFullSizePreviewEnabled:ec,fullSizePreview:ed,fallbackTitle:en,tab:X.FG.Threads})),ef?.())},[a,o,e,eI,eH,ex,v,t,et,d,ea,el,eo,em,ec,ed,en,ef]),tZ=(0,n.useMemo)(()=>({menuItem:null,label:"",callback:tQ,iconName:"direct-messages",autoClogProps:f.Gz}),[tQ]),tJ=(0,n.useCallback)(()=>{a&&e&&eI&&(ex((0,J.P)({entityId:a,relatedConversationsEntityId:o,id:eI,appId:e,lookupFunction:(0,M.t)(v),authProviderKey:t,workObjectType:et,entityUrl:d,channelId:ea,messageTs:el,useLegacyUrl:eo,isEphemeral:em,isFullSizePreviewEnabled:ec,fullSizePreview:ed,fallbackTitle:en,fileId:ep,flexpaneViewType:e_,tab:"comments"})),ef?.())},[a,o,e,eI,ex,v,t,et,d,ea,el,eo,em,ec,ed,en,ep,e_,ef]);return{viewDetails:e$,share:eX,copyLink:e3,openInApp:te,feedback:ti,openInWindow:td,todo:tf,syncData:tE,addToFolder:tL,viewRelatedConversations:tZ,viewComments:(0,n.useMemo)(()=>({menuItem:null,label:"",callback:tJ,iconName:"comment"}),[tJ]),addAsTab:tw,removeAsTab:tR,clickBehaviorPref:tY}};useWorkObjectContextMenuItems.displayName="useWorkObjectContextMenuItems"},0x20716123c:(e,t,a)=>{"use strict";a.d(t,{V:()=>useWorkObjectNewVersionCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x3989021c),o=a(0xc9c97240),s=a(0xb9604b6),c=a(0x5b1935a6);let d=(0,o.Mz)(e=>(0,s.Hp)(e,c.xu.IN_PRODUCT_COACHMARK),e=>e===c.ze.WORK_OBJECT_NEW_FILE_VERSION_COACHMARK);var m=a(0x226892387),u=a(0xf3c65e54);let p=new i.Ay("work-objects"),useWorkObjectNewVersionCoachmark=({refreshButtonRef:e,displayType:t,viewTypeCheck:a=!0,onDismiss:i})=>{let o=(0,r.wA)(),s=(0,m.d4)(d),{closeCoachmark:h,renderCoachmark:_}=(0,l.A)(c.ze.WORK_OBJECT_NEW_FILE_VERSION_COACHMARK,c.xu.IN_PRODUCT_COACHMARK),f=p.t("Changes have been made to this {displayType}. Sync to get the latest version.",{displayType:t}),b=(0,n.useCallback)(()=>{h(),o((0,u.A)({action:c.hw.DISMISS,notificationName:c.ze.WORK_OBJECT_NEW_FILE_VERSION_COACHMARK})),i?.()},[h,o,i]);return s&&a?_({title:p.t("New version available"),bodyText:f,anchorRef:e,orientation:"bottom-left",width:294,arrowCenterOnAnchor:!0,offsetX:-30,arrowPosition:85,closeCoachmark:b}):null}},0x1b6f39a31:(e,t,a)=>{"use strict";a.d(t,{$q:()=>isWorkObjectAppNotInstalled,I0:()=>isExistingEntityRestricted,Jv:()=>l,Kr:()=>getWorkObjectModel,TX:()=>getEntityUrl,jH:()=>isEntityFromRTMEvent,t_:()=>getEntityId,yg:()=>isExistingEntityAwaitingUserAuth});var n,r=a(0x15f4f83cf),i=a(0xad43722c);let isEntityFromRTMEvent=e=>e?.type==="entity_details_present",isExistingEntityAwaitingUserAuth=e=>isEntityFromRTMEvent(e)&&e.ext_error?.status==="user_not_authed",isExistingEntityRestricted=e=>isEntityFromRTMEvent(e)&&e.ext_error?.status==="restricted",isWorkObjectAppNotInstalled=e=>isEntityFromRTMEvent(e)&&e.ext_error?.status==="app_not_installed",getWorkObjectDetails=e=>{if(!(0,r.GU)(e))return isEntityFromRTMEvent(e)?e.entity_details:e.work_object},getWorkObjectModel=e=>{let t=getWorkObjectDetails(e);return t?i.cV.create(t):void 0},getEntityId=e=>(0,r.GU)(e)?e.id:isEntityFromRTMEvent(e)?e.entity_id:e.record_id,getEntityUrl=e=>{let t="external_link"in e?e.external_link:void 0;return getWorkObjectDetails(e)?.external_url??t};var l=((n={}).NEWEST="newest",n.OLDEST="oldest",n)},0x19d06a55e:(e,t,a)=>{"use strict";a.d(t,{Y:()=>UpgradeMessageHistoryBanner});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x20e77676b),d=a(0x18a31435e),m=a(0x25354019b),u=a(0x151755090),p=a(0x17a2f6e0f),h=a(0x15f443392),_=a(0xa1832ae4),f=a(0x1b887bf79),b=a(0x10079cc7),g=a(0x226892387),y=a(0x91e15f37),A=a(0x1ee439e69),x=a(0x1ddb28a20),E=a.n(x);let C=new o.Ay("work-objects"),UpgradeMessageHistoryBanner=({className:e,displayType:t})=>{let a=(0,r.wA)(),i=(0,g.d4)(f.X),o=b.ZO.PaidFeatureTrial,x=b.zG.MessageLimit,k=(0,g.d4)(A.H7),v=(0,_.tc)(k),S=(0,g.d4)(e=>v&&(0,y.hq)(e,o,x)),I=(0,n.useCallback)(()=>{a((0,u.A)())},[a]);return v?n.createElement("div",{className:l()(E().container,e)},n.createElement(p.y,{className:"margin_bottom_25"}),n.createElement("div",{className:E().headerTitle},C.t("View messages older than 90 days")),n.createElement("div",{className:E().description},t?C.t("Messages and files on the free version of Slack are hidden after 90 days. Upgrade to a paid plan to show all messages related to this {displayType}.",{displayType:t}):C.t("Messages and files on the free version of Slack are hidden after 90 days. Upgrade to a paid plan to show all messages related to this file.")),n.createElement("div",{className:E().actions},i&&S?n.createElement(s.Ay,{onClick:I,type:"primary",size:"small"},C.t("Try Slack Pro",{fallbackHashNs:"lists",fallbackHash:"06e4cb15a831a4c84ebf3434fd44d951d2a9b078"})):n.createElement(n.Fragment,null,i?n.createElement(d.A,{type:"primary",size:"small",autoClogProps:h.K_,entryPoint:m.b.UPGRADE_MESSAGE_HISTORY_BANNER_UPGRADE},C.t("Upgrade Now",{fallbackHashNs:"lists",fallbackHash:"09a80c7a63cdefe5e5c7bccdc6bf4b894b15c07c"})):n.createElement(d.A,{type:"primary",size:"small",autoClogProps:h.G_,entryPoint:m.b.UPGRADE_MESSAGE_HISTORY_BANNER_COMPARE_PLANS},C.t("Compare Plans",{fallbackHashNs:"lists",fallbackHash:"ea963548740f94552d2327531fe22e09acc7c717"}))),n.createElement(c.A,{articleId:0x1ac08ac8e113,className:E().learn_more_link,autoClogProps:h.E4},C.t("Learn more",{fallbackHashNs:"lists",fallbackHash:"824d76b124e6289f372e2ff6bcba91e8939343bd"})))):null};UpgradeMessageHistoryBanner.displayName="UpgradeMessageHistoryBanner"},0x1ec1d09bd:(e,t,a)=>{"use strict";a.d(t,{a:()=>i});var n=a(0xca924ee1),r=a(0x54eb2d82);let i=(0,n.A)(e=>{if(!e)return null;let t=e.match(r.u);return t?{appId:t[1],objectId:t[2]}:null})},0x238c0d7af:(e,t,a)=>{"use strict";a.d(t,{P:()=>PreviewButton});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x11a296110),s=a(0xb1ea448c),c=a(0x2501a2cee),d=a(0x4c96e5d9),m=a(0x17588a0d),u=a.n(m);let p=new l.Ay("work-objects"),h=n.createElement(c.Ah,{name:"info",size:"16"}),_=n.createElement(c.Ah,{name:"eye-open",size:"16"}),PreviewButton=({handlePreview:e,autoClogProps:t,iconOnly:a=!1,showDivider:r=!0,variant:l="preview",isLoading:c})=>{let m="info"===l?h:_,f="info"===l?p.t("Details"):p.t("Preview"),b="info"===l?p.t("View latest details"):p.t("Preview in Slack"),g=(0,n.useMemo)(()=>a?m:n.createElement(n.Fragment,null,n.createElement("span",{className:"padding_right_25"},m),f),[f,a,m]),y=n.createElement(n.Fragment,null,n.createElement(o.Ay,{"aria-label":b,onClick:e,autoClogProps:t,className:i()(u().actionBarTextButton,{[u().actionBarIconButton]:a,[u().actionBarLoadingButton]:c}),size:"small",type:"outline",disabled:c},c?n.createElement(s.A,{size:"medium"}):g),r&&n.createElement("div",{className:u().actionBarDivider}));return a?n.createElement(d.Ay,{tip:b,position:"top","aria-label":b,delay:d.n1},n.createElement("div",{className:i()("c-message_actions__button")},y)):y};PreviewButton.displayName="PreviewButton"},0x70657567:(e,t,a)=>{"use strict";a.d(t,{f:()=>generateAsOfTimestamp});var n=a(0x71479775),r=a(0x13776886e),i=a(0x21f3d6033),l=a(0xb1c0d55),o=a(940089e4),s=a(0x1533b2385);let c=new(a(0x20482ad21)).Ay("work-objects");function generateAsOfTimestamp(e,t={}){if(e)try{let a=(0,o.A)(e);if(!a)return;let l=new Date,d=(0,r.A)(e,"{time}"),m=(0,n.A)(a,l),u=Math.floor(Math.abs(m)/1440),p=(0,i.A)(a,{uncapitalized:!0});if("today"===p){if(t.perspectiveUserName)return c.t("As of today at {time} from {sourceUserName}",{time:d,sourceUserName:t.perspectiveUserName});if(t.showLiveUserContext)return c.t("Your live view as of today at {time}",{time:d});return c.t("As of today at {time}",{time:d})}if("yesterday"===p){if(t.perspectiveUserName)return c.t("As of yesterday at {time} from {sourceUserName}",{time:d,sourceUserName:t.perspectiveUserName});if(t.showLiveUserContext)return c.t("Your live view as of yesterday at {time}",{time:d});return c.t("As of yesterday at {time}",{time:d})}if(u<=7){let e=(0,s.A)(a,{shortenDay:!1});if(t.perspectiveUserName)return c.t("As of {dayName} at {time} from {sourceUserName}",{dayName:e,time:d,sourceUserName:t.perspectiveUserName});if(t.showLiveUserContext)return c.t("Your live view as of {dayName} at {time}",{dayName:e,time:d});return c.t("As of {dayName} at {time}",{dayName:e,time:d})}if(a.getFullYear()===l.getFullYear()){if(t.perspectiveUserName)return c.t("As of {date} from {sourceUserName}",{date:toFormattedCalendarDate(a),sourceUserName:t.perspectiveUserName});if(t.showLiveUserContext)return c.t("Your live view as of {date}",{date:toFormattedCalendarDate(a)});return c.t("As of {date}",{date:toFormattedCalendarDate(a)})}if(t.perspectiveUserName)return c.t("As of {date} from {sourceUserName}",{date:(0,r.A)(e,"{date_short_full}"),sourceUserName:t.perspectiveUserName});if(t.showLiveUserContext)return c.t("Your live view as of {date}",{date:(0,r.A)(e,"{date_short_full}")});return c.t("As of {date}",{date:(0,r.A)(e,"{date_short_full}")})}catch{return}}function toFormattedCalendarDate(e){return(0,l.A)(e,{shortenMonth:!0,excludeYear:!0,shortenDay:!0})}},0x32685543:(e,t,a)=>{"use strict";a.d(t,{_:()=>generateTimestampLabel});var n=a(0x13776886e),r=a(0x6960d8b9);let generateTimestampLabel=e=>{if(e)return(0,r.cK)(e)?(0,n.A)(e,"{time}"):(0,n.A)(e,"{date_short_pretty}")}},0xe89390a:(e,t,a)=>{"use strict";a.d(t,{L:()=>generateUpdatedTimestamp});var n=a(0x13776886e),r=a(0xb1c0d55),i=a(940089e4),l=a(0x1533b2385);let o=new(a(0x20482ad21)).Ay("work-objects");function generateUpdatedTimestamp(e){if(e)try{let t=(0,i.A)(e);if(!t)return;let a=new Date,s=a.getTime()-t.getTime(),c=Math.floor(s/1e3),d=Math.floor(c/60),m=Math.floor(d/60),u=Math.floor(m/24);if(c<60)return o.t("Updated just now");if(d<60)return o.t("Updated {minutes} min ago",{minutes:d});if(m<24)return o.t("Updated {hours, plural, =1 {# hour} other {# hours}} ago",{hours:m});if(1===u)return o.t("Updated yesterday");if(u<=7){let e=(0,l.A)(t,{shortenDay:!1});return o.t("Updated on {dayName}",{dayName:e})}if(t.getFullYear()===a.getFullYear())return o.t("Updated on {date}",{date:(0,r.A)(t,{shortenMonth:!0,excludeYear:!0,shortenDay:!0})});return o.t("Updated on {date}",{date:(0,n.A)(e,"{date_short_full}")})}catch{return}}},0x1e0ed7534:(e,t,a)=>{"use strict";a.d(t,{K:()=>clickBehaviorUserPrefKeyRequiresProductName,W:()=>getClickBehaviorUserPrefKey});var n=a(0x24e98a449);let clickBehaviorUserPrefKeyRequiresProductName=e=>!!e&&((0,n.Qp)(e)||(0,n.VA)(e)),getClickBehaviorUserPrefKey=(e,t)=>{if(e){if(clickBehaviorUserPrefKeyRequiresProductName(e)&&t){let a=t.toLowerCase().replace(" ","_");return`${e}__${a}`}return`${e}`}}},0x1bb7ff163:(e,t,a)=>{"use strict";a.d(t,{g:()=>getFileForWorkObject});var n=a(0x1457bb420),r=a(0xad43722c),i=a(0x14ea3ce99);let getFileForWorkObject=(e,t)=>{if(!t||!(0,n.W)(t))return;let a=r.cV.create(t),l=a?.fileId();if(l)return(0,i.Lp)(e,l)}},0x22ee3e0e1:(e,t,a)=>{"use strict";a.d(t,{E:()=>getWorkObjectEntityIdForFile});var n=a(0xbd3de346);let getWorkObjectEntityIdForFile=(e,t)=>e.entity_id?e.entity_id:(0,n.NF)(e,t)?`W:${e.app_id}:${e.external_id}`:null},0x20e34fef7:(e,t,a)=>{"use strict";a.d(t,{m:()=>getWorkObjectForFile});var n=a(0x1457bb420),r=a(0xad43722c);let getWorkObjectForFile=(e,t)=>t?.find(t=>{if(!(0,n.W)(t))return!1;let a=r.cV.create(t);return t.external_url===e.external_url||a?.fileId()===e.id})},0x5929da28:(e,t,a)=>{"use strict";a.d(t,{N:()=>getMetadataUser});var n=a(0x1ee9b0300);let getMetadataUser=(e,t)=>{let a="",r="",i="";if("external"===e.user_type){let t=(0,n.w)(e.text);a=e.image?.image_url||t,r=e.text,i=e.caption||e.email||""}else a=t?.profile?.image_192||"",r=t?.profile?.real_name??t?.name??"",i=t?.profile?.title||t?.profile?.email||"";return{imageUrl:a,title:r,secondaryLabel:i}}},0x1fc98bd03:(e,t,a)=>{"use strict";a.d(t,{IQ:()=>layoutHasImageFieldPreview,P$:()=>filterImageFieldsWithoutPreview});var n=a(0x1df96de4c),r=a(0x24e98a449),i=a(0xbd3de346),l=a(0x14ea3ce99);let fieldHasImagePreview=(e,t)=>{if(!t.isImage())return!1;if(t.value()[0]?.image_width&&t.value()[0]?.image_height)return!0;let a=t.value()[0]?.slack_file?.id,n=a?(0,l.Lp)(e,a):void 0;return!!(0,i.WA)(n,{containerWidth:r.h2,containerHeight:r.Gm,suppressAnimations:!0})?.src},layoutHasImageFieldPreview=(e,t)=>!!t&&!!t.fields()&&t.fields().some(t=>fieldHasImagePreview(e,t)),filterImageFieldsWithoutPreview=(e,t)=>{let a=t.fields();if(!a)return n.Ml;let r=a.filter(t=>!(t.isImage()&&!fieldHasImagePreview(e,t)));return r.length===a.length?a:r}},0x1457bb420:(e,t,a)=>{"use strict";a.d(t,{W:()=>isExternalWorkObject});var n=a(0x24e98a449);let isExternalWorkObject=e=>e.work_object_type===n.R7.EXTERNAL},0x13dd2b9ca:(e,t,a)=>{"use strict";a.d(t,{Z:()=>isShareFileAsWorkObjectEnabledForApp});var n=a(0x24e98a449),r=a(0x1899cc468);let isShareFileAsWorkObjectEnabledForApp=(e,t)=>{let a=t?.app_id;return!!a&&!!((0,n.Qp)(a)||(0,n.VA)(a)||(0,r.Z)(e,a,t))}},0x22250659e:(e,t,a)=>{"use strict";a.d(t,{O:()=>shouldHideClickBehaviorMenuItem});var n=a(0x177c6bf9e),r=a(0x1b26458f7),i=a(0x1bc652f98),l=a(0x1a3aebc27),o=a(0x207eb3801);let shouldHideClickBehaviorMenuItem=(e,t,a,s)=>a===i.C.SlackEntitiesTableauAnalytics&&(0,o.C$)(s)===n.Go.DASHBOARD||!!e&&(0,l.rB)(e)&&!!t&&a===i.C.SlackEntitiesFile&&(0,r.h)(e,t)},0x1899cc468:(e,t,a)=>{"use strict";a.d(t,{Z:()=>shouldOpenBoxUrlOnUnfurlClick});var n=a(0x24b7f48bb),r=a(0x1a3aebc27);let shouldOpenBoxUrlOnUnfurlClick=(e,t,a,i)=>!!(0,r.rB)(t)&&(i&&"boolean"==typeof i.is_supported?!1===i.is_supported:a&&"boolean"==typeof a.full_size_preview_supported?!1===a.full_size_preview_supported:a?!(0,n.$)(e,a,!0):(0,r.rB)(t))},0x21351909c:(e,t,a)=>{"use strict";a.d(t,{B:()=>shouldUseAppUnfurlUrl});var n=a(0x24e98a449);let shouldUseAppUnfurlUrl=({experimentEnabled:e,appId:t,appUnfurlUrl:a})=>e&&!(0,n._d)(t)&&!!a},0x2516e26f3:(e,t,a)=>{"use strict";a.d(t,{B:()=>workObjectShouldOpenUrlAsPrimaryAction});var n=a(0x177c6bf9e),r=a(0x24e98a449),i=a(0x3ca4e1cc),l=a(0x1e0ed7534),o=a(0x22ee3e0e1),s=a(0x1899cc468),c=a(0x207eb3801),d=a(0x143f63057),m=a(0x6ee3decf),u=a(0x15bd01ec9),p=a(0x1f5c53bc);let workObjectShouldOpenUrlAsPrimaryAction=(e,{appId:t,file:a,fullSizePreview:h,productOrAppName:_,workObjectEntityId:f})=>{if(!t)return!1;if((0,c.k6)(f)&&(0,c.C$)(f)===n.Go.DASHBOARD)return!0;if((0,i.V9)(e)){let n=_;if((0,l.K)(t)&&a&&!n){let t=(0,m.I)(e,a),r=(0,o.E)(a,t),i=(0,p.Ne)(e,{recordId:r??void 0,entityUrl:a?.external_url??""});n=i&&!(0,u.nY)(i)&&"entity_details"in i?i.entity_details?.product_name:void 0}let r=(0,d.h)(e),i=(0,l.W)(t,n),c=i?r[i]:void 0;return void 0!==c?c:(0,s.Z)(e,t,a,h)}return(0,r.Qp)(t)||(0,r.VA)(t)||(0,s.Z)(e,t,a,h)}},0x17635f0aa:(e,t,a)=>{"use strict";a.d(t,{C:()=>WorkObjectEntity});var n,r,i=a(0xbad225b5),l=a(0xc8be17d1),o=a(0x16cf1da63),s=a(0x17d13b2a8),c=a(0x120c268ad),d=a.n(c),m=a(0x1cbdfeceb),u=a(0xf27817c9),p=a(0x14fad6485),h=a(0x40c0d834),_=a(0x21a39e2e1),f=a(0x1df96de4c),b=a(0x62a17882),g=a(0x3bc7bbd5),y=a(0x20482ad21),A=a(0x11a296110),x=a(0x22b8621cf),E=a(0x11c86845f),C=a(0x32d3ef3d),k=a(0xfa28400d),v=a(0xb59b1927),S=a(0x99233ecb),I=a(0x2501a2cee),w=a(0x1fdec3e16),T=a(0x217a7a62d),N=a(0x131d9874e),M=a(0x18c2d4c6f),R=a(0x202fa5d55),P=a(0x1d9a37519),L=a(0x2493bd395),O=a(0x1f8893105),D=a(0x3eee9173),F=a(0x53de82ab),U=a(0x7bde3d37),B=a(0x207eb3801),H=a(0x226892387),W=a(0x1c5116e43);let AnalyticsWorkObjectPreview=({layout:e,externalUrl:t,channelId:a,ts:n,fieldsClassNames:r,fieldsRef:l,fieldsContainerWidth:o,source:s,tableauEmbedRef:c})=>{let d=(0,B.f1)(e.entityId()),m=(0,B.u2)(e.entityId()),u=(0,B.C$)(e.entityId()),p=(0,H.d4)(O.d1),h=s===W.Xv.Canvas;return((0,F._)({singleOrgDetails:[{orgId:d??"",salesforceUrl:t}],isCanvas:h,isWorkObjectView:!h}),p&&h&&"metric"===u)?i.createElement(D.Y,{salesforceOrgId:d,submetricId:m,url:t,source:W.Xv.Canvas,ref:c}):i.createElement("div",{className:r,ref:l},i.createElement(U.d,{layout:e,entityUrl:t,channelId:a,messageTs:n,containerWidth:o,isTableauEntityType:!0}))};AnalyticsWorkObjectPreview.displayName="AnalyticsWorkObjectPreview";var V=a(0x15f443392),G=a(0xceb4914),q=a(0x1c403364b),j=a(0x1b481369f),z=a(0xbd3de346),K=a(0x309fcb30),$=a.n(K);let Y=new y.Ay("work-objects"),FileErrorState=({file:e})=>e&&((0,z.aK)(e)||(0,z.uO)(e))?i.createElement(j.A,{file:e,fullWidth:!0,showActions:!1},i.createElement(q.A,{id:e.id,file:e,preventHoverOver:!0,exceptionText:Y.t("This attachment was deleted."),className:$().fileEntity})):null;FileErrorState.displayName="FileErrorState";var Q=a(0x4d9b2df9),Z=a(0x24e98a449),J=a(0xa3fb9039),X=a(0x1f83a8c66),ee=a(0x3ca4e1cc),et=a(0xb6f49241),ea=a(0x2417d1641),en=a(0x4c96e5d9),er=a(0x21351909c),ei=a(0x17588a0d),el=a.n(ei);let eo=new y.Ay("work-objects"),OpenExternalLinkButton=({appId:e,appUnfurlUrl:t,externalUrl:a,autoClogProps:n,iconOnly:r=!1,showDivider:l=!0})=>{let o=(0,H.d4)(ee.ZS),s=eo.t("Open"),c=(0,er.B)({experimentEnabled:o,appId:e,appUnfurlUrl:t})?t:a,u=(0,i.useMemo)(()=>r?i.createElement(I.Ah,{name:"new-window",size:"16"}):i.createElement(i.Fragment,null,i.createElement("span",{className:"padding_right_25"},i.createElement(I.Ah,{name:"new-window",size:"16"})),s),[r,s]),p=i.createElement(i.Fragment,null,i.createElement(A.Ay,{"aria-label":eo.t("Open in browser"),autoClogProps:n,href:c,onClick:m.A,className:d()(el().actionBarTextButton,{[el().actionBarIconButton]:r}),size:"small",type:"outline"},u),l&&i.createElement("div",{className:el().actionBarDivider}));return r?i.createElement(en.Ay,{tip:eo.t("Open in browser"),position:"top","aria-label":eo.t("Open in browser"),delay:en.n1},i.createElement("div",{className:d()("c-message_actions__button")},p)):p};OpenExternalLinkButton.displayName="OpenExternalLinkButton";var es=a(0x1ec1d09bd),ec=a(0x238c0d7af),ed=a(0x32685543),em=a(0x1fc98bd03),eu=a(0x1b26458f7),ep=a(0x22250659e),eh=a(0x2516e26f3),e_=a(0x184825275),ef=a(0x1bc652f98),eb=a(0xad43722c),eg=a(0x120d0398b),ey=a(0x2158e0ec3),eA=a(0x1a3aebc27),ex=a(0x70de3606),eE=a(0x1b0a362c3),eC=a(0x3711e82d),ek=a(0x1fdf007c4),ev=a(0xbfebdd7c),eS=a(0x5dd1c0f2),eI=a(0x217553e42),ew=a(0x14149c126),eT=a(0x14ea3ce99),eN=a(0xe684f705),eM=a(0xd93ecf94),eR=((n=eR||{}).Default="default",n.Small="small",n.Large="large",n.XLarge="xlarge",n),eP=((r=eP||{})[r.Default=83]="Default",r[r.Small=62]="Small",r[r.Large=119]="Large",r[r.XLarge=191]="XLarge",r);let eL=new y.Ay("work-objects"),eO={name:"share-message",size:"18"},eD={name:"ellipsis-vertical-filled",size:"18"},eF={name:"info",size:"18"},eU={name:"reference",size:"18"},eB={name:"comment",size:"18"},eH={name:"agentforce",size:"18"},eW=i.createElement(I.Ah,{name:eF.name,size:"20"}),EntityContent=({model:e,layout:t,ts:a,appId:n,appName:r,entityState:l,isInteractive:o,size:s,shouldOpenUrlOnUnfurlClick:c,source:m,channelId:h,showPreviewInfoButton:_,isActionsBarHovered:f,entityTitle:b,isTableauEntity:y,tableauEmbedRef:A})=>{let{windowRef:x}=(0,p.ox)(),{isHovered:E}=(0,u.r)(),k=(0,H.d4)(ee.Ym),S=m&&[W.Xv.Search,W.Xv.WorkObjectSearch].includes(m),T=(0,i.useMemo)(()=>S?t.title():b||t.title(),[b,t,S]),N=S?i.createElement(R.A,{text:T,inputIsEscaped:!0,showTooltips:!1}):T,M=t instanceof eb.E6,P=(0,i.useRef)(null),L=(0,i.useRef)(null),[O,D]=(0,i.useState)(!1),[F,B]=(0,i.useState)(!1),[V,G]=(0,i.useState)("default"),[q,j]=(0,i.useState)(0),z=(0,H.Z2)(e=>(0,em.P$)(e,t)),K=(0,i.useMemo)(()=>0===z.length,[z]),$=(0,H.d4)(e=>(0,em.IQ)(e,t)),Y=(0,i.useCallback)(()=>{P.current&&D(P.current.getBoundingClientRect().height>300)},[]);(0,i.useLayoutEffect)(()=>{let e=(0,g.A)(Y);if(!e||!P.current||!M)return;x.deref()?.requestAnimationFrame(()=>{Y()});let t=P.current;return e.observe(t),()=>{t&&e.unobserve(t)}},[P,Y,M,x]);let Q=(0,i.useCallback)((e,t,a)=>e>=2*a+24+t,[]),J=(0,i.useCallback)(()=>{if(j(P.current?.offsetWidth??0),L.current&&P.current){let e=P.current.offsetWidth,t=12+($||e<240?12:60),a=L.current.offsetWidth+t,n=Array.from(L.current.children).reduce((t,a)=>{let n=a.getBoundingClientRect().width;return n>e?t:Math.max(t,n)},0),r="default";a>e?(B(!0),n<=62?r="small":n>119&&Q(e,t,191)?r="xlarge":n>83&&(r="large")):B(!1),G(r)}},[$,Q]);(0,i.useLayoutEffect)(()=>{if(!M||!P.current||!L.current)return;x.deref()?.requestAnimationFrame(()=>{J()});let e=(0,g.A)(J);return e.observe(P.current),e.observe(L.current),()=>{e.disconnect()}},[M,J,x]);let et=e.externalUrl(),ea=(0,i.useMemo)(()=>!y&&F,[F,y]),en=(0,i.useMemo)(()=>{let a=_?eL.t("View latest details"):eL.t("Preview in Slack"),n=eL.t("Open in {productName}",{productName:e.productName()||r}),l=i.createElement("div",{className:el().defaultSubtitle},i.createElement(w.A,{lines:1},S?i.createElement(R.A,{text:t.subtitle(),inputIsEscaped:!0,showTooltips:!1}):t.subtitle())),s=i.createElement("div",{className:el().hoveredSubtitle},c?n:a,c&&i.createElement("span",{className:el().openUrlIconPadding},i.createElement(I.Ah,{style:Z.aC,name:"new-window"}))),m=o&&E&&!f;return i.createElement("div",{className:el().secondaryLabelWrapper},i.createElement("span",{className:d()(el().defaultSubtitleContainer,{[el().show]:!m,[el().hide]:m})},l),i.createElement("span",{className:d()(el().hoveredSubtitleContainer,{[el().show]:m,[el().hide]:!m})},s))},[_,e,r,S,t,c,o,E,f]),er=(0,i.useMemo)(()=>O&&ea,[O,ea]),ei=t.productIcon(),eo=s===C.S.expanded&&t.hasFields(),es=(0,ed._)(a),ec=d()({[el().previewContainer]:t.hasFields(),[el()[V]]:!0,[el().gridLayout]:ea,[el().thinPadding]:$,[el().noPadding]:K,[el().analyticsLayout]:y}),eu=(0,i.useMemo)(()=>M&&!K,[K,M]);return i.createElement("div",{className:el().contentContainer},i.createElement(X.z,{appId:n,entityTitle:N,entityState:l,secondaryLabel:en,productIcon:ei,timestampLabel:k?void 0:es,displayType:e.displayType(),showBottomBorder:eo&&!$&&!K,appIcons:e.appIcons(),isTableauWO:y}),eo&&i.createElement(i.Fragment,null,er&&i.createElement("div",{className:el().gradient}),i.createElement(v.A,{entityState:l,noPadding:!0,noTopBorder:!0,isFullWidth:!0,isAutoHeight:!$,isFullHeight:$},y?i.createElement(AnalyticsWorkObjectPreview,{layout:t,externalUrl:et,channelId:h,ts:a,fieldsClassNames:ec,fieldsRef:P,fieldsContainerWidth:478,source:m,tableauEmbedRef:A}):i.createElement(i.Fragment,null,i.createElement("div",{className:ec,ref:P},i.createElement(U.d,{layout:t,entityUrl:et,channelId:h,messageTs:a,containerWidth:q,isCalendarEntity:e.entityTypeForClogging()===ef.C.SlackEntitiesCalendarEvent})),i.createElement("div",{className:d()(el().preview,el().hiddenPreview),ref:L},eu&&i.createElement(U.d,{layout:t,entityUrl:et,channelId:h,messageTs:a,containerWidth:q,isCalendarEntity:e.entityTypeForClogging()===ef.C.SlackEntitiesCalendarEvent}))))))};EntityContent.displayName="EntityContent";let ExternalWorkObjectEntity=({model:e,ts:t,originalTs:a,isInteractive:n=!0,size:r,channelId:l,originalChannelId:c,attachmentId:u,threadTs:y,isEphemeral:v=!1,source:I,searchClogCallback:R,isSelected:O,isForwardedMessage:D,dragRef:F,appUnfurlUrl:U,updateTableauObject:q,tableauStatus:j,isRemovable:z=!1,onRemove:K,removeButtonTip:$})=>{let{windowRef:Y}=(0,p.ox)(),X=(0,i.useRef)(null),en=(0,H.d4)(ee.dr),er=(0,H.d4)(ex.tl),ei=(0,H.d4)(ee.z9),eo=(0,H.d4)(ee.Y),ed=(0,H.d4)(ee.Ym),em=(0,H.d4)(ee.lK),eR=(0,H.d4)(e=>"on"===(0,ew._Z)(e,"tab_3p_files_fe_allow_add")),eP=(0,H.d4)(ee.GH),eV=(0,H.d4)(ee.V9),eG=e.entityTypeForClogging(),eq=eG===ef.C.SlackEntitiesFile,ej=eG===ef.C.SlackEntitiesTableauAnalytics,ez=C.w.enabled,eK=(0,i.useMemo)(()=>e.expanded()??e.compact()??e.minimal(),[e]),e$=e.appId(),eY=e.entityId(),eQ=(0,o.wA)(),eZ=e.comments()?.count,eJ=(0,B.k6)(eY)?(0,B.C$)(eY):void 0,eX=(0,B.f1)(eY),e0=(0,H.d4)(e=>(0,T.hc)(e,eX,eJ)),e1=ej&&e0,{openAgentInSplitView:e2}=(0,N.D)({agentUserId:e0,messageChannelId:l,messageTs:t}),e4=eK instanceof eb.E6||eK instanceof eb.ay,e5=(0,H.d4)(e=>(0,eI.OL)(e,l)),e3=e.externalUrl(),e6=eq?(0,es.a)(e.entityId())?.objectId:void 0,e8=e.fileId(),e7=(0,H.d4)(e=>e8?(0,eT.Lp)(e,e8):(0,eT.YM)(e,e6)),e9=(0,i.useMemo)(()=>eV&&!(0,ep.O)(e$,e7,eG,eY),[eV,e$,e7,eG,eY]),te=FileErrorState({file:e7}),[tt,ta]=(0,i.useState)(n),[tn,tr]=(0,i.useState)(!1),[ti,tl]=(0,i.useState)(!1),[to,ts]=(0,i.useState)(0),tc=(0,i.useRef)(null),td=(0,i.useCallback)(e=>{tr(e)},[]),tm=(0,i.useCallback)(()=>{tl(!0)},[]),tu=(0,i.useCallback)(()=>{tl(!1)},[]);(0,i.useEffect)(()=>{te?ta(!1):ta(n)},[te,n]);let tp=(0,i.useCallback)(()=>{tc.current&&ts(tc.current.getBoundingClientRect().width)},[]);(0,i.useLayoutEffect)(()=>{let e=(0,g.A)(tp);if(!e||!tc.current)return;Y.deref()?.requestAnimationFrame(()=>{tp()});let t=tc.current;return e.observe(t),()=>{t&&e.unobserve(t)}},[tp,Y]);let th=(0,H.d4)(e=>(0,ey.M)(e,e7,e5)),t_=(0,L.i)(l??""),tf=!!t_?.find(e=>e.data?.fileId===e7?.id),tb=(0,H.d4)(e=>(0,eg.u)(e,e7)&&!tf),tg=(0,H.d4)(e=>(0,eg.u)(e,e7)&&tf),ty=e.isFullSizePreviewEnabled(eP)&&!(0,eu.h)(e$,e7),tA=(0,H.d4)(e=>e$&&(0,eS.jH)(e,e$)),tx=e.productName()??tA,tE=(0,H.d4)(t=>(0,eh.B)(t,{appId:e$,file:e7,fullSizePreview:e.fullSizePreview(),productOrAppName:tx,workObjectEntityId:e.entityId()})),tC=(0,b.y3)()||(0,ek.S)(),tk=(0,H.d4)(e=>l&&t?(0,eM.Ld)(e,l,t,!0):void 0),tv=(0,H.d4)(e=>{let t=(0,eE.L)(tk);return l&&t?(0,eM.Ld)(e,l,t,!0):void 0}),tS=(0,i.useMemo)(()=>{if(ty)return tv?.reply_count||tk?.reply_count?Q.o.MAIN_THREAD:Q.o.EXPANDED},[ty,tk?.reply_count,tv?.reply_count]),tI=(e7?.title?(0,ev.A)(e7.title):void 0)||eK?.title(),tw=eK?.subtitle(),tT=eK?.productIcon(),tN=I===W.Xv.Canvas,tM=(0,i.useMemo)(()=>({...tE?V.x5:V.DX,eventId:eC.EventId.APP_WORK_OBJECT_UNFURL,workObjectType:e.type(),appId:e$,workObjectEntityType:e.entityTypeForClogging(),uiComponentName:eC.UiComponentName.WORK_OBJECT_MSG_UNFURL}),[tE,e,e$]),{copyLink:{menuItem:tR},feedback:{menuItem:tP},openInApp:{menuItem:tL,callback:tO},share:{menuItem:tD,label:tF,callback:tU,autoClogProps:tB},viewDetails:{menuItem:tH,callback:tW},openInWindow:{menuItem:tV,callback:tG},todo:{menuItem:tq},addToFolder:{menuItem:tj},addAsTab:{menuItem:tK},removeAsTab:{menuItem:t$},viewRelatedConversations:{callback:tY,autoClogProps:tQ},viewComments:{callback:tZ},clickBehaviorPref:{menuItem:tJ}}=(0,ea.A)({appId:e$,authProviderKey:e.authProviderKey(),entityId:e.entityId(),relatedConversationsEntityId:e.relatedConversationsEntityId(),entityTitle:tI,entitySubtitle:tw,icon:tT,externalUrl:e3,lookupFunction:e.lookupFunction(),workObjectDisplayType:e.displayType(),channelId:l,messageTs:t,isEphemeral:v,useLegacyUrl:!1,isFullSizePreviewEnabled:ty,fullSizePreview:e.fullSizePreview(),productName:e.productName(),fileId:e.fileId(),flexpaneViewType:tS,searchClogCallback:R,entityType:eG,appUnfurlUrl:U}),tX=(0,i.useCallback)(e=>{if(tE)tO(e);else{if(e.metaKey||e.ctrlKey)return tG(e);tW(e)}},[tE,tO,tW,tG]),t0=e4?eK.actions():void 0,t1=(0,i.useMemo)(()=>e4?t0?.primary_actions??[]:[],[t0,e4]),t2=(0,i.useMemo)(()=>e4?t0?.overflow_actions?.app_actions??[]:[],[t0,e4]),t4=(0,i.useCallback)(e=>{if(!t0||!u)return;let a="number"==typeof u?u:parseInt(u,10),n={serviceId:t0.block_payload.service_id,serviceTeamId:t0.block_payload.service_team_id,container:{type:t0.block_payload.container.type,messageTs:t,channelId:l,isEphemeral:v,attachmentId:a,threadTs:y},actions:[e]};return eQ((0,e_.W)(n))},[t0,eQ,u,l,y,t,v]),t5=(0,i.useCallback)(e=>t=>{t.stopPropagation(),e.url?window.open(e.url,"_blank"):t4(e)},[t4]),t3=(0,H.d4)(e=>e$&&(0,eS.jH)(e,e$)),t6=(0,i.useMemo)(()=>eP?e.entityTypeForClogging()===ef.C.SlackEntitiesFile&&!ty:(0,eA.rB)(e$)&&!ty,[e$,eP,ty,e]),t8=(0,i.useCallback)(e=>{let t=eL.t("{appName}",{appName:t3});return i.createElement(h.A,{eventId:eC.EventId.APP_WORK_OBJECT_UNFURL,uiComponentName:eC.UiComponentName.WORK_OBJECT_MSG_UNFURL_MENU},i.createElement(S.Ay,e,t6?i.createElement(S.Dr,{key:"info",label:eL.t("View latest details"),onSelected:tW,icon:eW,autoClogProps:V.Be}):tH,i.createElement(S.bX,null),tD,tR,i.createElement(S.bX,null),en&&er&&i.createElement(i.Fragment,null,tq,!th&&i.createElement(S.bX,null)),th&&i.createElement(i.Fragment,null,eR&&tb&&tK,eR&&tg&&t$,tj,i.createElement(S.bX,null)),!th&&eR&&i.createElement(i.Fragment,null,tb&&tK,tg&&t$,(tb||tg)&&i.createElement(S.bX,null)),t2.length>0&&i.createElement(i.Fragment,null,i.createElement(S.c$,{label:t}),t2.map(e=>i.createElement(S.Dr,{key:e.action_id,label:e.text?.text,onSelected:t5(e),autoClogProps:V.PB,ariaLabel:e.accessibility_label||e.text?.text,icon:tT&&(0,Z.VA)(e$)&&(0,Z.Qp)(e$)?i.createElement(G.O,{imageBlock:tT,displayImageWithoutLink:!0,classNames:el().menuItemIcon}):i.createElement(P.z,{appId:e$,size:20})})),i.createElement(S.bX,null)),tC&&tV,tL,e9&&i.createElement(i.Fragment,null,i.createElement(S.bX,null),tJ),tP))},[t3,t6,tW,tH,tD,tR,en,er,e9,tJ,tq,th,tj,t2,tC,tV,tL,tP,t5,tT,e$,tK,t$,eR,tb,tg]),t7=(0,i.useMemo)(()=>{let t,a=to>0&&to<400,openQuickActionButton=()=>!eP&&t6?i.createElement(x.A,{"aria-label":eL.t("View latest details"),tooltipLabel:eL.t("View latest details"),svgIconProps:eF,onClick:tW,autoClogProps:V.Be,buttonSize:"small"}):tE?i.createElement(ec.P,{handlePreview:tW,autoClogProps:t6?V.Be:V.DX,iconOnly:a,showDivider:!a,variant:t6?"info":"preview"}):i.createElement(OpenExternalLinkButton,{appId:e$,appUnfurlUrl:U,externalUrl:e3,autoClogProps:V.CC,iconOnly:a,showDivider:!a});openQuickActionButton.displayName="openQuickActionButton";let n=i.createElement(x.A,{"aria-label":tF,tooltipLabel:eL.t("Share\u2026"),svgIconProps:eO,onClick:tU,autoClogProps:tB,buttonSize:"small"}),r=ei&&i.createElement(x.A,{"aria-label":eL.t("View conversations"),tooltipLabel:eL.t("View conversations"),svgIconProps:eU,onClick:tY,autoClogProps:tQ,buttonSize:"small"}),l=e.comments(),o=e.productName()||t3;t=eZ&&o?eo?eL.t("{commentCount} Comments in {appOrProductName}",{commentCount:eZ,appOrProductName:o}):`${eZ} Comments in ${o}`:eo?eL.t("Comments"):"Comments";let s=eo&&l?i.createElement(x.A,{"aria-label":t,tooltipLabel:t,svgIconProps:eB,onClick:tZ,buttonSize:"small"}):null,c=e1&&i.createElement(x.A,{"aria-label":eL.t("Ask Agentforce for Analytics",{fallbackHash:"994530873be4b0f75ca0d7c913fcafbd34677560",fallbackHashNs:"tableau"}),tooltipLabel:eL.t("Ask Agentforce for Analytics",{fallbackHash:"994530873be4b0f75ca0d7c913fcafbd34677560",fallbackHashNs:"tableau"}),svgIconProps:eH,onClick:e2,buttonSize:"small"}),d=i.createElement(E.A,null,openQuickActionButton(),n,s,r,c,i.createElement(x.A,{"aria-label":eL.t("More actions"),tooltipLabel:eL.t("More actions"),isMenuTrigger:!0,autoClogProps:V.C1,svgIconProps:eD,onClick:m.A,renderMenu:t8,buttonSize:"small",onPopoverClose:tu}));return i.createElement("div",{onMouseEnter:tm,onMouseLeave:tu},d)},[to,tF,tU,tB,ei,eo,tY,tZ,tQ,t8,eP,t6,tE,e$,U,e3,tW,tm,tu,e,t3,eZ,e1,e2]),{handleRefresh:t9,isRefreshing:ae,canRefresh:at,refreshError:aa}=(0,et.R)({channelId:c??l,messageTs:a??t,entityId:e.entityId(),updatedAt:eK?.updatedAt(),isForwardedMessage:D,updateTableauObject:q,tableauStatus:j,isTableauEntity:ej,tableauEmbedRef:X,source:I}),an=e.perspectiveUserId(),ar=(0,H.d4)(e=>an?(0,eN.nv)(e,an):void 0),ai=r??(eK instanceof eb.u9?"compact":eK?.key()??"compact"),al=(0,i.useMemo)(()=>{if(!tt||!e4||ai!==C.S.expanded||0===t1.length&&!ed)return null;let e=t1.length>0?t1.filter(e=>"action_id"in e&&"block_id"in e).map(e=>{let t=i.createElement(w.A,{lines:1},e.text?.text);return i.createElement(A.Ay,{key:e.action_id,onClick:t5(e),type:e.style||"outline",size:"small",autoClogProps:V.Zh,"aria-label":e.accessibility_label||e.text?.text},t)}):[];return i.createElement(J.b,{actions:e,sourceMessageTs:a??t,updatedAt:eK.updatedAt(),isInteractive:tt,onRefresh:t9,isRefreshing:ae,canRefresh:at,onRefreshButtonHoverChange:td,appId:e$,source:I,refreshError:aa,isTableauWO:ej,isActionsBarHovered:ti,perspectiveUser:ar})},[tt,e4,ai,e$,t1,ed,t5,t,a,eK,t9,ae,at,td,ar,I,aa,ej,ti]);if(!eK)return null;let ao=I===W.Xv.WorkObjectSearch,as=tN||ao?void 0:Z.mG;return tN&&ej&&(as=426),i.createElement(M.A,null,i.createElement(h.A,{eventId:eC.EventId.APP_WORK_OBJECT_UNFURL,workObjectType:e.type(),appId:e$,appName:tx,workObjectEntityType:e.entityTypeForClogging(),uiComponentName:eC.UiComponentName.WORK_OBJECT_MSG_UNFURL,clogImpression:!0},i.createElement(k.Ay,{size:ai,entityState:ez,actionsBar:tt?t7:null,isRemovable:z,onRemove:K,removeButtonTip:$,isAutoHeight:!0,isFullWidth:!0,withBorder:!tN&&!te,withHover:tt&&!(em&&tn),customMaxWidth:as,customMinWidth:Z.Uc,isInteractive:tt,autoClogProps:tt?tM:f.t0,onClick:tt?tX:void 0,groupAriaLabel:tI},te??i.createElement("div",{ref:(0,_.A)(tc,F),className:d()(el().contentWrapper,{[el().workObjectSearchItem]:I===W.Xv.WorkObjectSearch,[el().workObjectSearchItemSelected]:O&&I===W.Xv.WorkObjectSearch,[s.Pn]:ej})},i.createElement(EntityContent,{model:e,layout:eK,ts:t,appId:e$,appName:t3,entityState:ez,isInteractive:tt,size:ai,channelId:l,shouldOpenUrlOnUnfurlClick:tE,source:I,showPreviewInfoButton:t6,isActionsBarHovered:ti,entityTitle:tI,isTableauEntity:ej,tableauEmbedRef:X}),al))))};ExternalWorkObjectEntity.displayName="ExternalWorkObjectEntity";var eV=a(0x1457bb420);let WorkObjectEntity=({entity:e,ts:t,originalTs:a,fileContainerType:n,size:r,isInteractive:o,channelId:s,originalChannelId:c,attachmentId:d,threadTs:m,isEphemeral:u,source:p,searchClogCallback:h,isSelected:_,isForwardedMessage:f,dragRef:b,model:g,appUnfurlUrl:y,updateTableauObject:A,tableauStatus:x,isRemovable:E,onRemove:C,removeButtonTip:k})=>{if(e&&(0,B.XI)(e)){let a=e.tableau?.lookup_params?.tableau_id??e.entity_id;return i.createElement(l.q,{tableauObjectId:a,entityRefId:e.entity_id,link:e.link,tableau:e.tableau,fileContainerType:n,size:r,messageTs:t,messageChannelId:s})}if(e&&(0,eV.W)(e)){let n=g||eb.cV.create(e);return n?i.createElement(ExternalWorkObjectEntity,{model:n,ts:t,originalTs:a,isInteractive:o,size:r,channelId:s,originalChannelId:c,attachmentId:d,threadTs:m,isEphemeral:u,source:p,searchClogCallback:h,isSelected:_,isForwardedMessage:f,dragRef:b,appUnfurlUrl:y,updateTableauObject:A,tableauStatus:x,isRemovable:E,onRemove:C,removeButtonTip:k}):null}return null};WorkObjectEntity.displayName="WorkObjectEntity"},0x21109e926:(e,t,a)=>{"use strict";a.d(t,{a:()=>WorkObjectFlexpaneAdditionalButtons});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cefa8f4c),s=a(0x62a17882),c=a(0x20482ad21),d=a(0x11a296110),m=a(0xb1ea448c),u=a(0x22b8621cf),p=a(0x2501a2cee),h=a(0x4c96e5d9),_=a(0x139aa1a7),f=a(0x15f443392),b=a(0x4d9b2df9),g=a(0x3ca4e1cc),y=a(0x2b7f0bcc),A=a(0x203f0793b),x=a(0x1a02c72b5),E=a(0xd6a16321),C=a(0x1aad5a225),k=a(0x19895585a);function useCreateWorkObjectRecordChannel({recordId:e,lookupFunction:t}){let a=(0,r.wA)(),[i,l]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1);return{onCreate:(0,n.useCallback)(async()=>{l(!0),s(!1);try{let n=await a((0,A.$)({record:e,workObjectArgs:{lookupFunction:t},reason:"create-record-channel"}));if(n.channel){let e=a((0,C.F)({channel:n.channel}));return a((0,x.o)({...(0,E.pr)(e.id),options:{forceTab:k.k6.Home}}))}}catch{l(!1),s(!0)}},[a,e,t]),isLoading:i,isError:o}}var v=a(0x20e80190e),S=a(0x226892387),I=a(0x1fcbb004d),w=a(0x11eae4d05),T=a(0x15bd01ec9),N=a(0x1f5c53bc);let M=new c.Ay("work-objects");function BaseWorkObjectRecordChannelCreationModal({recordId:e,lookupFunction:t}){let a=(0,r.wA)(),i=(0,S.d4)(g.BX),{onCreate:l,isLoading:o,isError:s}=useCreateWorkObjectRecordChannel({recordId:e,lookupFunction:t}),c=(0,S.d4)(a=>(0,N.Ne)(a,{recordId:e,lookupFunction:t,entityUrl:"https://example.com"})),d=(0,n.useCallback)(()=>a((0,I.O)()),[a]),u=(0,n.useCallback)(async()=>{await l(),d()},[l,d]);return"title"in c?n.createElement(v.dW,{isOpen:!0,closeModal:d,dataQa:"work-object-record-channel-creation-modal",fullscreen:!1,labelledby:"work-object-record-channel-creation-modal-title-bar"},n.createElement(v.rQ,null,(0,T.nY)(c)&&n.createElement(m.A,null),(0,T.BX)(c)&&n.createElement(v.Rc,{id:"work-objectrecord-channel-creation-modal-title-bar",title:i?M.t("Create a Channel for {recordTitle}",{recordTitle:c.title}):`Create a channel for ${c.title}`})),n.createElement(v.$m,null,s&&n.createElement(v.qf,null,n.createElement(y.Ay,{level:"error",className:"margin_bottom_125"},i?M.t("Something went wrong creating the channel, please try again."):"Something went wrong creating the channel, please try again.")),!s&&n.createElement(v.qf,null)),n.createElement(v.jl,null,n.createElement(v.ox,null,n.createElement(v.s_,{type:"outline","aria-label":i?M.t("Cancel"):"Cancel"},i?M.t("Cancel"):"Cancel"),n.createElement(v.s_,{disabled:o,loading:o,onClick:u,"aria-label":i?M.t("Create Channel"):"Create Channel"},i?M.t("Create Channel"):"Create Channel")))):null}BaseWorkObjectRecordChannelCreationModal.displayName="BaseWorkObjectRecordChannelCreationModal";let R=n.memo(BaseWorkObjectRecordChannelCreationModal),P=(0,w.e)(R);var L=a(0x24296355f);function useOpenRecordChannel({recordId:e,lookupFunction:t}){let a=(0,r.wA)();return(0,n.useCallback)(async n=>{if(!e||!t)return;n.stopPropagation();let r=await a((0,L.V)({record:e,reason:"open-work-object-channel"}));if(r.channel){let e=a((0,C.F)({channel:r.channel}));return a((0,x.o)({...(0,E.pr)(e.id),options:{forceTab:k.k6.Home}}))}a(P({recordId:e,lookupFunction:t}))},[a,e,t])}var O=a(0x2417d1641),D=a(0x1e4cc8fc2),F=a(0xd843ab47),U=a(0x6960d8b9),B=a(0x1fdf007c4),H=a(0x1fb2d2a87),W=a(0x8ca8865d),V=a(0x121ede9d1),G=a(0x1c5116e43),q=a(0x2382c92e5),j=a.n(q);let z={name:"edit",size:"20"},K={name:"close",size:"20"},$={name:"open-in-window",size:"20"},Y={name:"channel-arrow-right",size:"20"},Q=new c.Ay("work-objects"),WorkObjectFlexpaneAdditionalButtons=({appName:e,isLoading:t,hasValidOAuth:a,isSynced:i,entityId:c,relatedConversationsEntityId:y,lookupFunction:A,authProviderKey:x,appId:E,model:C,workObjectType:k,useLegacyUrl:v,eventTs:w,entityUrl:T,isEditable:M,flexpaneSource:R=G.tL.Unfurl,onEditClick:P,onClose:L,messageTs:q,channelId:Z,refreshButtonRef:J,onCoordinatedRefresh:X,currentPreviewFlexPaneView:ee,buttonBackgroundStyle:et,iconButtonSize:ea="medium",suppressButtonStyles:en=!1,experimentViewHeaderButtonPolishGroupOn:er,activeTab:ei})=>{let el=(0,S.d4)(H.to),[eo,es]=(0,n.useState)(!1),ec=(0,S.d4)(g.BX),ed=(0,S.d4)(g.GH),em=(0,S.d4)(g.KT),eu=(0,S.d4)(g.Y),ep=(0,S.d4)(e=>(0,N.rP)(e,c)),eh=(0,S.d4)(e=>(0,N.nn)(e,c)),e_=(0,S.d4)(e=>(0,N.R0)(e,c)),ef=(0,S.d4)(e=>(0,N.hF)(e,c)),[eb,eg]=(0,n.useState)(!1),ey=(0,n.useRef)();(0,n.useEffect)(()=>(ef&&(eg(!1),ey.current&&clearTimeout(ey.current),ey.current=setTimeout(()=>{eg(!0)},3e5)),()=>{ey.current&&clearTimeout(ey.current)}),[ef]);let{isActiveLoading:eA,isActiveSynced:ex}=(0,n.useMemo)(()=>{switch(ei){case G.FG.Comments:return{isActiveLoading:eh,isActiveSynced:e_};case G.FG.Details:case G.FG.Threads:default:return{isActiveLoading:t,isActiveSynced:i}}},[ei,eh,e_,t,i]),eE=ei===G.FG.Comments?eb:eo,eC=(0,s.y3)()||(0,B.S)(),ek=C?.ts()||w,{isChildWindow:ev,view:eS}=(0,n.useContext)(F.A),eI=(0,n.useMemo)(()=>ee===b.o.MAIN_THREAD||ev&&eS?.viewType===_.D.WorkObjectFilePreview,[ee,ev,eS?.viewType]),ew=R===G.tL.FileViewer||C?.isFullSizePreviewEnabled(ed),eT=(0,n.useMemo)(()=>{if(ew)return ee},[ee,ew]),{openInWindow:{callback:eN,label:eM,autoClogProps:eR},syncData:{callback:eP,autoClogProps:eL}}=(0,O.A)({appId:E,authProviderKey:x,entityId:c,relatedConversationsEntityId:y,entityTitle:C?.full()?.title()||"",entitySubtitle:C?.full()?.subtitle()||"",icon:C?.full()?.subtitleImage(),externalUrl:T||"",lookupFunction:A,workObjectDisplayType:C?.displayType()||k||"",useLegacyUrl:v,messageTs:q,channelId:Z,productName:C?.productName(),isFullSizePreviewEnabled:ew,fullSizePreview:C?.fullSizePreview(),fileId:C?.fileId(),flexpaneViewType:eT}),eO=useOpenRecordChannel({recordId:c,lookupFunction:A}),eD=(0,r.wA)(),eF=(0,n.useCallback)(async()=>{await eD((0,V.E)({entityId:c,entityUrl:T,messageTs:q,channelId:Z})),P&&P()},[eD,c,T,P,q,Z]),eU=(0,n.useCallback)(()=>{eD((0,W.Or)({entityId:c,isLoading:!0})),eD((0,D.F)({reason:"work-object-comments-refresh",entityId:c,entityUrl:T})).catch(()=>{eD((0,W.Or)({entityId:c,isLoading:!1}))})},[eD,c,T]),eB=(0,n.useMemo)(()=>({[G.FG.Comments]:eU,[G.FG.Details]:eP,[G.FG.Threads]:eP}),[eU,eP]),eH=(0,n.useCallback)(e=>{eA||!a||ex||(ei===G.FG.Comments?eg(!1):es(!1),X?.(),e.stopPropagation(),(ei&&eB[ei]||eP)(e))},[eP,a,eA,ex,X,ei,eB]),eW=(0,n.useMemo)(()=>{if(!ek||!a)return null;es(!1);let e=(0,U.$4)(ek,{returnMoment:!0});return e?(0,U._T)(new Date,e.toDate()):0},[a,ek]);(0,n.useEffect)(()=>{if(!eW)return void es(!1);if(eW>=10)return void es(!0);let e=setTimeout(()=>{es(!0)},60*Math.abs(10-eW)*1e3);return()=>{clearTimeout(e)}},[eW]);let eV=Q.t("Syncing with {appName}",{appName:e}),eG=Q.t("Never synced"),eq=Q.t("Log in to get the latest"),ej=Q.t("Sync data"),ez=Q.t("Just synced from {appName}",{appName:e}),eK=(0,n.useCallback)(()=>{let e="",t="";return(eA?e=eV:a?eb?(e=ej,t=eu?Q.t("Comments may be out of date. Sync to get the latest."):"Comments may be out of date. Sync to get the latest."):ex||(e=ej):(e=eG,t=eq),e)?{toolTipLabel:e,subLabel:t,tooltipContent:n.createElement("div",null,n.createElement("span",{className:j().flexpaneRefreshTooltipLabel},e),t&&n.createElement("div",{className:j().flexpaneRefreshTooltipSubLabel},t))}:null},[a,eA,ex,eb,eu,eV,eG,eq,ej]),e$=(0,n.useCallback)(()=>{let t;if(ei===G.FG.Comments)return eK();let r=ek&&a?(t=(0,U.$4)(ek,{returnMoment:!0}))?(0,U._T)(new Date,t.toDate()):0:null,i=null!==r&&r<1&&!ex,l="",o="";return(eA?l=eV:a?null!==r&&r>=10?(l=ej,o=Q.rt("Data may be stale. Synced over {timeAgo} from {appName}",{appName:e,timeAgo:(0,U.YY)(ek)})):i?(l=ej,o=ez):ek&&!ex&&(l=ej,o=Q.rt("Synced {timeAgo} from {appName}",{appName:e,timeAgo:(0,U.YY)(ek)})):(l=eG,o=eq),l)?{toolTipLabel:l,subLabel:o,tooltipContent:n.createElement("div",null,n.createElement("span",{className:j().flexpaneRefreshTooltipLabel},l),o&&n.createElement("div",{className:j().flexpaneRefreshTooltipSubLabel},o))}:null},[ei,eK,ek,a,eA,ex,e,eV,eG,eq,ej,ez]),eY=(0,n.useMemo)(()=>eA?{animate:{width:["36px","95px"]},initial:{width:"36px"},transition:{duration:.08,ease:"easeOut",times:[.7,1]}}:ex?{animate:{width:["82px","36px"]},initial:{width:"82px"},transition:{duration:1.6,ease:"easeOut",times:[.9,1]}}:er?{animate:{width:"28px",height:"28px"},initial:{width:"28px",height:"28px"}}:{animate:{width:"36px"},initial:{width:"36px"}},[eA,ex,er]),eQ=(0,n.useMemo)(()=>{let e=ex?n.createElement(n.Fragment,null,n.createElement(p.Ah,{name:"check-circle-filled",size:"20",inline:!0}),n.createElement("span",{className:j().flexpaneSyncedLabel},Q.t("Synced"))):n.createElement(n.Fragment,null,n.createElement(p.Ah,{name:"refresh",size:"20",inline:!0}),eA&&n.createElement("span",{className:j().flexpaneSyncingLabel},Q.t("Syncing\u2026"))),t=!a&&!eA&&!ex,r=n.createElement(o.P.div,eY,n.createElement(d.Nm,{ref:J,"aria-label":e$()?.toolTipLabel,onClick:eH,autoClogProps:eL,disabled:t,className:l()("c-icon_button",`c-icon_button--size_${ea}`,"c-icon_button--default",j().flexpaneRefreshBtn,{[j().flexpaneRefreshCheckedBtn]:eA||ex,[j().flexpaneRefreshIcon]:eA&&!ex,[j().flexpaneCheckedIcon]:ex&&!eA,"c-button--disabled":t,"c-icon_button--light":"light"===el||"light"===et,"c-icon_button--dark":"dark"===el||"dark"===et})},n.createElement("div",{className:"display_flex align_items_center gap_25"},e),eE&&n.createElement("div",{"data-qa":"flexpane-refresh-badge",className:l()("c-icon_button__badge",j().flexpaneBadgeIcon)})));return eA||!ex?n.createElement(h.Ay,{tip:e$()?.tooltipContent,position:"bottom",delay:h.n1,"aria-label":`${e$()?.subLabel}`},r):r},[eH,eL,eE,eA,ex,a,e$,eY,J,et,el,ea]),eZ=(0,n.useCallback)(()=>{L?L():eD((0,I.O)())},[eD,L]),eJ=!t&&!eo&&M;return n.createElement("div",{className:l()("flex_shrink_none display_flex align_items_center justify_content_center",j().workObjectFlexpaneAdditionalButtonsContainer),"data-qa":"work-object-flexpane-additional-buttons"},ec&&R!==G.tL.FileViewer&&R!==G.tL.ChannelTab&&n.createElement(u.A,{"aria-label":Q.t("Open channel"),isMenuTrigger:!1,onClick:eO,svgIconProps:Y,tooltipLabel:Q.t("Open channel"),tooltipPosition:"bottom",suppressActionStyles:en,buttonSize:ea}),eQ,!ev&&a&&eC&&n.createElement("span",{className:j().flexpaneOpenInWindowBtn},n.createElement(u.A,{"aria-label":eM,isMenuTrigger:!1,onClick:eN,svgIconProps:$,autoClogProps:eR,isDisabled:t,tooltipLabel:eM,tooltipPosition:"bottom",suppressActionStyles:en,buttonSize:ea})),ep&&!em&&n.createElement("div",{className:j().loadingEdit},n.createElement(m.A,{size:"large",color:"blue"})),eJ&&!ep&&n.createElement(u.A,{"aria-label":Q.t("Edit"),isMenuTrigger:!1,onClick:eF,svgIconProps:z,autoClogProps:f.Y_,tooltipLabel:Q.t("Edit"),tooltipPosition:"bottom",suppressActionStyles:en,buttonSize:ea}),R===G.tL.FileViewer&&!eI&&n.createElement(u.A,{"aria-label":Q.t("Close"),isMenuTrigger:!1,onClick:eZ,svgIconProps:K,autoClogProps:f.GF,tooltipLabel:Q.t("Close"),tooltipPosition:"bottom",suppressActionStyles:en,buttonSize:ea}))};WorkObjectFlexpaneAdditionalButtons.displayName="WorkObjectFlexpaneAdditionalButtons"},0x1d48b23f7:(e,t,a)=>{"use strict";a.d(t,{c:()=>WorkObjectFlexpaneDocLink});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1faa3f1ac),o=a(0x2501a2cee),s=a(0x15f443392),c=a(0x24e98a449),d=a(0x3ca4e1cc),m=a(0xcdfe9538),u=a(0x226892387),p=a(0x8ca8865d),h=a(0x1f5c53bc),_=a(0x80a16bdd),f=a.n(_);let b=new i.Ay("work-objects");function WorkObjectFlexpaneDocLink({entity:e,model:t,app:a,entityURL:i}){let _=t?.full(),g=(0,r.wA)(),y=(0,u.d4)(d.jB),A=a.id,x=t?.productName()||a.name,E=(0,u.d4)(e=>(0,h.G9)(e,A,x)),C=_?.subtitleUrl()||i,k="primary_source"in e?e.primary_source?.text:void 0,v=(_?.subtitle()??k??t?.productName())||a.name,S=(0,n.useMemo)(()=>b.t("Open in {productName}",{productName:x}),[x]),{workObjectClickOpensUrlPref:I}=(0,m.c)({appId:A,productNameOrAppName:x}),w=(0,n.useMemo)(()=>y&&void 0===E&&!0!==I,[y,I,E]),T=(0,n.useCallback)(()=>{w&&g((0,p.hZ)({appId:A,productName:x,isStaged:!0}))},[g,A,x,w]);return C?n.createElement(l.A,{href:C,className:f().primarySourceLink,autoClogProps:s.CC,"aria-label":S,onClick:T},v,n.createElement(o.Ah,{style:c.oW,name:"new-window"})):null}WorkObjectFlexpaneDocLink.displayName="WorkObjectFlexpaneDocLink"},0x5c7737ab:(e,t,a)=>{"use strict";a.d(t,{U:()=>WorkObjectFlexpane});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x130d89881),c=a(0x40c0d834),d=a(0x3bc7bbd5),m=a(0x20482ad21),u=a(0x2b7f0bcc),p=a(0x11a296110),h=a(0xb1ea448c),_=a(0x1faa3f1ac),f=a(0x181214caa),b=a(0x2501a2cee),g=a(0x1fdec3e16),y=a(0x1892b3b74),A=a(0x1f2e22823),x=a(0x6e0e2fb2),E=a(0x7ab77f95),C=a.n(E);let ProgressiveBlur=()=>r.createElement("div",{className:C().container},r.createElement("div",{className:C().blur}));ProgressiveBlur.displayName="ProgressiveBlur";var k=a(0x15f443392),v=a(0xcc263d32),S=a(0x10fb9a645),I=a(0x8ed587af),w=a(0x1d9a37519),T=a(0x4504d718),N=a(0xa1832ae4),M=a(0x226892387),R=a(0x1fb2d2a87);let EmailDetailsBodyIframe=({entityId:e,emailFile:t,isFileReady:a})=>{let n=(0,M.d4)(I.fs),i=(0,M.d4)(e=>"dark"===(0,R.to)(e)),[l,o]=(0,r.useState)(!0),s=(0,M.d4)(N.FH),c=(0,r.useCallback)(()=>{o(!1)},[o]);if(n){let[t,a,n]=e?.split(":")||[];if(!a||!n)return null;let o=`${s}enterprise-search/email/${a}/${n}`;return r.createElement(r.Fragment,null,l&&r.createElement("div",{className:"full_height padding_125 display_flex align_items_center justify_content_center"},r.createElement(h.A,null)),r.createElement(T.A,{src:o,fullHeight:!0,isDarkTheme:i,onLoad:c}))}return a?r.createElement(T.A,{file:t,fullHeight:!0,isDarkTheme:i}):r.createElement("div",{className:"full_height padding_125 display_flex align_items_center justify_content_center"},r.createElement(h.A,null))};EmailDetailsBodyIframe.displayName="EmailDetailsBodyIframe";var P=a(0xd3bcbd3c),L=a(0x19ed4a6a3),O=a.n(L);let D={elementName:"email_address",onClick:{enableClogAction:!0}},EmailAddress=({email:e})=>r.createElement(P.A,{autoClogProps:D,href:`mailto:${e}`},r.createElement("span",{className:O().emailAddress},r.createElement(g.A,{lines:1},e)));EmailAddress.displayName="EmailAddress";var F=a(0x24e98a449),U=a(0x6c8b23ac),B=a.n(U);let EmailAddressees=({addresses:e,label:t,isExpanded:a})=>r.createElement("div",null,r.createElement("p",{className:B().label},t),r.createElement("ul",{className:B().addressList},(a?e:e.slice(0,F.DR)).map(e=>r.createElement("li",{className:B().addressListItem,key:e.email},e.name&&r.createElement("span",null,`${e.name}`),e.email&&r.createElement(EmailAddress,{email:e.email})))));var H=a(0x13fbcf481),W=a(0x1f35308af),V=a.n(W);let G=new m.Ay("work-objects"),EmailSenderAndRecipients=({from:e,to:t,cc:a,bcc:n,isExpanded:i,toggleExpanded:l})=>{let o=(0,r.useMemo)(()=>[e],[e]),[s,c,d]=[t,a,n],m=[...t,...a,...n].length>F.DR;if(m&&!i){let e=(0,H.BB)({to:t,cc:a,bcc:n});[s,c,d]=[e.to,e.cc,e.bcc]}let u=(0,r.useMemo)(()=>({elementName:"email_addresses_collapse_toggle_button",onClick:{enableClogAction:!0},elementValue:i?"show_less":"show_more"}),[i]);return r.createElement("div",{className:V().emailAddressees},r.createElement(EmailAddressees,{label:G.t("From"),isExpanded:i,addresses:o}),s.length>0&&r.createElement(EmailAddressees,{label:G.t("To"),isExpanded:i,addresses:s}),c.length>0&&r.createElement(EmailAddressees,{label:G.t("Cc"),isExpanded:i,addresses:c}),d.length>0&&r.createElement(EmailAddressees,{label:G.t("Bcc"),isExpanded:i,addresses:d}),m&&r.createElement(p.Nm,{autoClogProps:u,onClick:l,className:V().showMore},i?G.t("Show less"):G.t("Show more")))};EmailSenderAndRecipients.displayName="EmailSenderAndRecipients";var q=a(0xbd3de346),j=a(0x14ea3ce99),z=a(0x1f5c53bc),K=a(0x1ef57c248),$=a.n(K),Y=a(0x80a16bdd),Q=a.n(Y);let Z=new m.Ay("work-objects"),EmailDetailsFlexpane=({model:e,isLoading:t,additionalButtonsContent:a,entityId:n})=>{let[i,l]=(0,r.useState)(!1),o=(0,r.useCallback)(()=>l(!i),[i]),s=e?.appId(),c=e?.full(),d=e?.appIcons()?.image_36,m=(0,M.d4)(e=>(0,z.XT)(e,n)),u=(0,M.d4)(e=>(0,z.p_)(e,n)),p=m?.file_id,_=(0,M.d4)(e=>(0,j.Lp)(e,p??"",!0)),f=(0,q.ZG)(_),{subject:b,sent:g,from:A,to:x,cc:E,bcc:C,attachments:k}=(0,r.useMemo)(()=>(0,H.wn)(c?.fields()||[]),[c]),T=(0,M.d4)(I.fs),N=!T&&f&&m?.has_attachments&&!u,R=u?.file_ids??[],P=(0,M.d4)(e=>(0,j.bO)(e,R)),L=(0,r.useMemo)(()=>r.createElement("div",{className:"display_flex align_items_baseline gap_50"},r.createElement("div",{className:Q().flexpaneTitle},Z.t("Email Details"))),[]),O=(0,r.useMemo)(()=>t?r.createElement("div",{className:"full_height padding_125 display_flex align_items_center justify_content_center"},r.createElement(h.A,null)):r.createElement("div",{className:$().emailDetailsFlexpane},r.createElement("div",{className:$().emailSubject},s&&r.createElement(w.z,{appId:s,alt:d?.alt_text}),r.createElement("div",{className:"display_flex flex_direction_column"},r.createElement("p",{className:$().subject},b),r.createElement(S.A,{timestamp:g,full:!0,showWeekday:!0}))),r.createElement(EmailSenderAndRecipients,{from:A,to:x,cc:E,bcc:C,isExpanded:i,toggleExpanded:o}),T?r.createElement(EmailDetailsBodyIframe,{key:n,entityId:n}):r.createElement(EmailDetailsBodyIframe,{key:_?.id,emailFile:_,isFileReady:f})),[t,T,n,b,g,s,d,A,x,E,C,i,o,_,f]),D=(0,r.useMemo)(()=>{if(T){let{items:e,message_id:t}=k;return 0===e.length?null:r.createElement("div",{className:$().attachments},r.createElement("p",{className:$().attachmentsTitle},Z.t("Attachments")),r.createElement(v.A,{files:e,appId:s,emailId:t}))}return N?r.createElement("div",{className:$().attachments},r.createElement("p",{className:$().attachmentsTitle},Z.t("Attachments")),r.createElement(h.A,null)):0===P.length?null:r.createElement("div",{className:$().attachments},r.createElement("p",{className:$().attachmentsTitle},Z.t("Attachments")),r.createElement(v.A,{files:P}))},[k,s,T,N,P]);return r.createElement(y.Ay,{dataQa:"email-details-flexpane",className:Q().workObjectFlexpane,titleContent:L,bodyContent:O,"aria-label":Z.t("Email Details"),additionalButtonsContent:a,footerContent:D})};EmailDetailsFlexpane.displayName="EmailDetailsFlexpane";var J=a(0x1cbdfeceb),X=a(0xbe5e39b6),ee=a(0x62a17882),et=a(0x22b8621cf),ea=a(0x99233ecb),en=a(0x2417d1641),er=a(0xd843ab47),ei=a(0x3711e82d),el=a(0x1fdf007c4);let eo=new m.Ay("work-objects"),es={name:"ellipsis-vertical-filled",size:"20"},EmailDetailsFlexpaneActionsButton=({menuItems:e,hasValidOAuth:t=!1})=>{let{isChildWindow:a}=(0,r.useContext)(er.A),n=(0,ee.y3)()||(0,el.S)(),i=!a&&t&&n,l=(0,r.useCallback)(t=>r.createElement(c.A,{uiComponentName:ei.UiComponentName.WORK_OBJECT_FLEXPANE_MENU},r.createElement(ea.Ay,t,e[en.O.share].menuItem,i&&e[en.O.openInWindow].menuItem,r.createElement(ea.bX,null),e[en.O.openInApp].menuItem)),[e,i]);return r.createElement(et.A,{"aria-label":eo.t("More actions"),isMenuTrigger:!0,onClick:J.A,renderMenu:l,svgIconProps:es,autoClogProps:k.C1,tooltipLabel:eo.t("More actions"),menuPosition:X.yX.BottomLeft})};EmailDetailsFlexpaneActionsButton.displayName="EmailDetailsFlexpaneActionsButton";var ec=a(0x8de0dc82),ed=a(0x1d71c4455),em=a(0xe7ed96ac),eu=a(0x4c96e5d9),ep=a(0x1e1bdd25f),eh=a(0xb60f126e),e_=a.n(eh);let ActionMenuButton=({action:e,onOptionSelected:t})=>{let a=e.initial_option,n=a?.text??e.title,i=(0,r.useCallback)(a=>t({block_id:e.block_id,action_id:e.action_id,text:{type:"plain_text",text:a.text??"",emoji:!1},value:a.value,type:"button"}),[e,t]),l=(0,r.useCallback)(t=>r.createElement(ea.Ay,t,r.createElement(ea.Dr,{type:"checkbox",key:"menu-title",label:e.title,onSelected:i({text:e.title}),checked:!1,autoClogProps:k.qi,disabled:!0}),e.options.map(e=>r.createElement(ea.Dr,{type:"checkbox",key:e.value??e.text,label:e.text,onSelected:i(e),checked:null!=e.value&&e.value===a?.value,autoClogProps:k.qi}))),[e,a?.value,i]);return r.createElement(ep.A,{renderMenu:l,position:"top-left",closeOnSelect:!0},r.createElement(p.Ay,{type:ed.Q.outline,size:"medium","aria-label":n,autoClogProps:k.GQ,className:e_().actionButton},r.createElement(g.A,{lines:1},n),r.createElement(b.Ah,{name:"caret-down",size:"16"})))};ActionMenuButton.displayName="ActionMenuButton";var ef=a(0x102edf836),eb=a(0xab77543),eg=a(0x20b4dda68),ey=a(0x16998c9bf),eA=a(0x1b6f39a31),ex=a(0x11c82607b),eE=a(0x170cf6ee1),eC=a(0x1bb9c210c),ek=a(0xe9460abe),ev=a(0x14149c126);let eS=(0,ex.Ay)("Submit and upsert view with state from a container id",async(e,t,{view:a,containerId:n})=>{let r=(0,ek.uz)(t(),n);"on"===(0,ev._Z)(t(),"snake_case_view_apis")&&(r=(0,eE.T)(r)),await e((0,eC.m)({view:a,viewState:{values:r??{}}}))});eS.meta={name:"submitAndUpsertViewWithContainerId",key:"createThunkSubmitAndUpsertViewWithContainerId",description:"Submit and upsert view with state from a container id"};var eI=a(0x8ca8865d);let ew=(0,ex.Ay)("Save changes made to a work object to the external service ",async(e,t,{entityId:a,entityUrl:n})=>{let r=(0,z.Ne)(t(),{recordId:a,fetchIfMissing:!1,entityUrl:n});if(e((0,eI.yT)({hasError:!1,entityId:a})),e((0,eI.xD)({fieldErrors:void 0,entityId:a})),e((0,eI.PB)({errorMessage:void 0,entityId:a})),e((0,eI.U$)({pendingChanges:{},entityId:a})),!r||!(0,eA.jH)(r)||!r.viewId)throw e((0,eI.yT)({hasError:!0,entityId:a})),Error("Unable to get work object");let i=r.viewId,l={id:i,type:eg.cs.entity_details};e((0,eI.mu)({isSaving:!0,entityId:a}));try{await e(eS({view:l,containerId:i}))}catch(t){throw e((0,eI.mu)({isSaving:!1,entityId:a})),e((0,eI.yT)({hasError:!0,entityId:a})),"validation_failed"===(0,ey.iT)(t).name&&e((0,eI.xD)({fieldErrors:(0,ey.hl)(t)?t.data.errors:void 0,entityId:a})),Error(`Unable to save work object edits ${t}`)}setTimeout(()=>{if((0,z.Ro)(t(),a))throw e((0,eI.mu)({isSaving:!1,entityId:a})),e((0,eI.yT)({hasError:!0,entityId:a})),Error("Call to save work object edits timed out")},1e4)});ew.meta={name:"saveWorkObject",key:"createThunkSaveWorkObject",description:"Save changes made to a work object to the external service "};var eT=a(0x2539cccbc),eN=a.n(eT);let eM=new m.Ay("work-objects"),WorkObjectFlexpaneEditFooter=({entityId:e,entityUrl:t})=>{let a=(0,i.wA)(),n=(0,M.d4)(t=>(0,z.Ro)(t,e)),l=(0,M.d4)(t=>(0,z.$1)(t,e)),o=(0,M.d4)(t=>(0,z.e3)(t,e))||{},s=(0,M.d4)(t=>(0,z.u1)(t,e)),c=Object.keys(o).length>0,d=(0,M.d4)(t=>(0,z.Zr)(t,e)),m=d?Object.values(d).filter(e=>!0===e).length:0,u=n||c||0===m&&!l,p=(0,r.useCallback)(()=>{n||a(ew({entityId:e,entityUrl:t}))},[a,e,t,n]),_=(0,r.useCallback)(()=>{a((0,eb.o)({entityId:e,entityUrl:t}))},[a,e,t]),f=n?r.createElement(h.A,{size:"large",color:"blue"}):eM.t("Save Changes"),g=eM.t("Pending change on {numOfChanges, plural, =1 {# field} other {# fields}}",{numOfChanges:m,fallbackHash:"5167fe7b2f5398ad08e3d88da5e58e6f6370899b",fallbackHashNs:"workflow_builder"}),y=s||eM.t("Error saving to fields",{fallbackHash:"5167fe7b2f5398ad08e3d88da5e58e6f6370899b",fallbackHashNs:"workflow_builder"}),A=n?eM.t("Saving Changes\u2026"):null,x=0!==m&&!l&&!n,E=l&&!n;return r.createElement("div",{className:eN().editFooterContainer},A&&r.createElement("div",{className:eN().savingText},A),E&&r.createElement("div",{className:eN().errorText},r.createElement("div",{className:"padding_top_25"},r.createElement(b.Ah,{name:"info"})),y),x&&r.createElement("div",{className:eN().pendingChangesText},g),r.createElement("div",{className:eN().buttonsContainer},l&&r.createElement(ef.Ay,{type:"danger",onClick:_,className:eN().discardButton,autoClogProps:k.SS},eM.t("Discard")),r.createElement(ef.Ay,{type:"primary",onClick:p,className:eN().saveButton,disabled:u,autoClogProps:k.Fz},f)))};WorkObjectFlexpaneEditFooter.displayName="WorkObjectFlexpaneEditFooter";var eR=a(0x3ca4e1cc),eP=a(0xcdfe9538),eL=a(0x170453bed),eO=a(0xb90de824),eD=a(0x13953efe6),eF=a(0x3989021c),eU=a(0x5b1935a6);let BaseClickPreferenceCoachmark=({bodyText:e,children:t,closeBackgroundStyle:a,closeCoachmark:n,closeCoachmarkFromOutsideClick:i,hero:l,onClickPrimaryButton:o,onClickSecondaryButton:s,onAfterOpen:c,primaryCallToActionText:d,secondaryCallToActionText:m,title:u})=>{let{isOpen:p}=(0,eF.A)(eU.ze.WORK_OBJECT_CLICK_PREFERENCE_COACHMARK,eU.xu.IN_PRODUCT_COACHMARK),h=(0,r.useMemo)(()=>r.createElement(eO.Ay,{arrowPosition:92,alignActionsRight:!0,bodyText:e,closeBackgroundStyle:a,closeCoachmark:n,closeCoachmarkFromOutsideClick:i,hero:l,isMegaphoneCoachmark:!0,isOpen:p,offsetX:-16,onClickPrimaryButton:o,onClickSecondaryButton:s,primaryCallToActionText:d,secondaryCallToActionText:m,onAfterOpen:c,title:u,width:400}),[e,a,n,i,l,o,s,c,d,m,u,p]);return r.createElement(eD.Ay,{coachmarkElement:h,orientation:eD.YC.TopLeft},t)};BaseClickPreferenceCoachmark.displayName="BaseClickPreferenceCoachmark";var eB=((n={}).Dismissed="DEFAULT",n.First="STEP_1",n.Second="STEP_2",n);let eH=new m.Ay("work-objects"),ClickPreferenceSettingChangeConfirmationCoachmark=({children:e,closeCoachmark:t,dismissCoachmark:a,setCoachmarkStep:n,selectedOption:i,productName:l,onAfterOpen:o})=>{let s=(0,M.d4)(eR.jB),c=s?eH.t("Work Object"):"Work Object",d=l??c,m=s?eH.t("We\u2019ll open in the browser next time!"):"We\u2019ll open in the browser next time!",u=s?eH.t("We\u2019ll continue to preview in Slack."):"We\u2019ll continue to preview in Slack.",p=s?eH.t("{productName} previews will open in your browser. You can always change this setting in this menu.",{productName:d}):`${d} previews will open in your browser. You can always change this setting in this menu.`,h=s?eH.t("{productName} previews will open in Slack. You can always change this setting in this menu.",{productName:d}):`${d} previews will open in Slack. You can always change this setting in this menu.`,_=(0,r.useCallback)(()=>{a()},[a]),f=(0,r.useCallback)(()=>{n(eB.First)},[n]);return s?r.createElement(BaseClickPreferenceCoachmark,{bodyText:"browser"===i?p:h,closeBackgroundStyle:"light",closeCoachmark:a,closeCoachmarkFromOutsideClick:t,onClickPrimaryButton:_,onClickSecondaryButton:f,onAfterOpen:o,primaryCallToActionText:eH.t("Done"),title:"browser"===i?m:u},e):r.createElement(r.Fragment,null,e)};ClickPreferenceSettingChangeConfirmationCoachmark.displayName="ClickPreferenceSettingChangeConfirmationCoachmark";var eW=a(0x1d2cd7755),eV=a(0x139c79d16),eG=a(0xa5dbe09b);let eq=new m.Ay("work-objects"),ClickPreferenceSettingChangeSuggestionCoachmark=({children:e,closeCoachmark:t,dismissCoachmark:a,setCoachmarkStep:n,onAfterOpen:i,onSelectedOptionChange:l,selectedOption:o,productOrAppName:s})=>{let c=(0,M.d4)(eR.jB),d=(0,r.useCallback)(e=>{e.target.checked&&l("browser")},[l]),m=(0,r.useCallback)(e=>{e.target.checked&&l("preview")},[l]),u=c?eq.t("Work Object"):"Work Object",p=s??u,h=c?eq.t("Click preference options"):"Click preference options",_=c?eq.t("Your files, right where you want them"):"Your files, right where you want them",f=c?eq.t("Have a lot of editing to do? Change what happens when you click on a preview."):"Have a lot of editing to do? Change what happens when you click on a preview.",b=c?eq.t("Clicking a {productOrAppName} preview\u2026",{productOrAppName:p}):`Clicking a ${p} preview\u{2026}`,g=(0,r.useMemo)(()=>r.createElement(r.Fragment,null,r.createElement("div",{className:"margin_bottom_100"},f),r.createElement(eG.A,{"aria-label":h,legendText:b},r.createElement(eW.A,{text:c?eq.t("Opens a preview in Slack"):"Opens a preview in Slack",htmlFor:"click-preference-preview",type:"inline",cursor:"pointer"},r.createElement(eV.A,{id:"click-preference-preview",name:"click-preference",value:"preview",checked:"preview"===o,onChange:m})),r.createElement(eW.A,{text:c?eq.t("Opens in the browser"):"Opens in the browser",htmlFor:"click-preference-browser",type:"inline",cursor:"pointer"},r.createElement(eV.A,{id:"click-preference-browser",name:"click-preference",value:"browser",checked:"browser"===o,onChange:d})))),[f,o,h,c,d,m,b]),y=(0,r.useCallback)(()=>{n(eB.Second)},[n]);return c?r.createElement(BaseClickPreferenceCoachmark,{bodyText:g,closeBackgroundStyle:"light",closeCoachmark:a,closeCoachmarkFromOutsideClick:t,onClickPrimaryButton:y,onAfterOpen:i,primaryCallToActionText:eq.t("Next"),title:_},e):r.createElement(r.Fragment,null,e)};ClickPreferenceSettingChangeSuggestionCoachmark.displayName="ClickPreferenceSettingChangeSuggestionCoachmark";var ej=a(0x1e0ed7534),ez=a(0x218842a12),eK=a(0x1ec68d6a3),e$=a(0x143f63057),eY=a(0x12f41fc32),eQ=a(0x20061cab9),eZ=a(0xf3c65e54);ez.g.WORK_OBJECT_CLICK_PREFERENCE_COACHMARK;let ClickPreferenceCoachmarkContainer=({children:e,step:t,appId:a,productOrAppName:n})=>{let l=(0,eK.Ay)({label:F.t6}),o=(0,i.wA)(),[s,c]=(0,r.useState)(t),[d,m]=(0,r.useState)("browser"),u=(0,r.useCallback)(e=>{m(e)},[]),p=(0,M.d4)(e$.h),h=(0,r.useMemo)(()=>(0,ej.W)(a,n),[a,n]),_=(0,r.useMemo)(()=>h?p[h]:void 0,[p,h]),f=(0,r.useCallback)(e=>{o((0,eZ.j)({notificationName:eU.ze.WORK_OBJECT_CLICK_PREFERENCE_COACHMARK,action:eU.hw.IMPRESSION,step:e}))},[o]),b=(0,r.useCallback)(e=>{f(s)},[f,s]),g=(0,r.useCallback)(()=>{c(eB.Dismissed),o((0,eI.hZ)({appId:a,productName:n,isStaged:!1}))},[o,a,n]),y=(0,r.useCallback)(()=>{g(),o((0,eQ.Ay)({spaceName:eU.xu.IN_PRODUCT_COACHMARK,action:eU.hw.DISMISS}))},[g,o]),A=(0,r.useCallback)(e=>{if(h&&e!==_){let t;try{t=JSON.stringify({...p,[h]:e})}catch(e){l.error(Error(`Caught an error while setting browser click preference: ${e}`),{clickBehaviorUserPrefKey:h});return}void 0!==t&&o((0,eY.AZ)({pref:e$.g,value:t}))}},[h,o,l,p,_]),x=(0,r.useCallback)(e=>{c(e),e===eB.Second&&A("browser"===d)},[d,A]);switch(s){case eB.First:return r.createElement(ClickPreferenceSettingChangeSuggestionCoachmark,{closeCoachmark:g,dismissCoachmark:y,setCoachmarkStep:x,onSelectedOptionChange:u,selectedOption:d,onAfterOpen:b,productOrAppName:n},e);case eB.Second:return r.createElement(ClickPreferenceSettingChangeConfirmationCoachmark,{closeCoachmark:g,dismissCoachmark:y,setCoachmarkStep:x,selectedOption:d,productName:n,onAfterOpen:b},e);case eB.Dismissed:default:return r.createElement(r.Fragment,null,e)}};ClickPreferenceCoachmarkContainer.displayName="ClickPreferenceCoachmarkContainer";var eJ=a(0x1ec1d09bd),eX=a(0x22250659e),e0=a(0x14cbd83d1),e1=a(0xceb4914),e2=a(0x1bc652f98),e4=a(0x15bd01ec9),e5=a(0x17588a0d),e3=a.n(e5);function WorkObjectIcon({className:e,appId:t,entity:a,model:n}){let i=n?.full()?.subtitleImage();return n?.entityTypeForClogging()===e2.C.SlackEntitiesTableauAnalytics?r.createElement("img",{className:o()(e,e3().productIconImg),src:e0,alt:"tableau-logo"}):(0,e4.nY)(a)||(0,e4.WV)(a)?r.createElement(w.z,{imageClassName:e,appId:t,size:16}):i?r.createElement(e1.O,{classNames:e,imageBlock:i,displayImageWithoutLink:!0}):r.createElement(w.z,{imageClassName:e,appId:t,size:16})}WorkObjectIcon.displayName="WorkObjectIcon";var e6=a(0x2158e0ec3),e8=a(0x70de3606),e7=a(0x5dd1c0f2),e9=a(0x217553e42);let te=new m.Ay("work-objects"),tt={"open-in-app":en.O.openInApp,"share-link":en.O.share,"copy-link":en.O.copyLink,"add-to-folder":en.O.addToFolder,"add-to-todo":en.O.todo,"add-to-list":void 0,"save-for-later":void 0,"remind-me":void 0},ta={name:"ellipsis-vertical-filled",size:"20"},getActionByType=e=>{if(e)return tt[e]},getMenuItemIcon=(e,t,a)=>r.createElement(WorkObjectIcon,{className:eN().menuItemIcon,appId:a,entity:e,model:t});getMenuItemIcon.displayName="getMenuItemIcon";let getOverflowAppMenuItems=(e,t,a)=>{let{action_id:n,text:i}=e,l=i?.text;return r.createElement(ea.Dr,{key:n,className:eN().menuItemButton,onSelected:a(e),icon:t,label:l,autoClogProps:k.qi,ariaLabel:e.accessibility_label||l})};getOverflowAppMenuItems.displayName="getOverflowAppMenuItems";let CustomBlockActionButton=({action:e,callback:t,autoClogProps:a})=>{let n=e.text?.text,i=e?.accessibility_label??n;return r.createElement(p.Ay,{onClick:t,type:e.style||ed.Q.outline,size:"medium",className:"display_flex flex_one",autoClogProps:a,"aria-label":i},r.createElement(g.A,{lines:1},n))};CustomBlockActionButton.displayName="CustomBlockActionButton";let SlackActionButton=({type:e="default",entityId:t,relatedConversationsEntityId:a,entityUrl:n,model:l,authProviderKey:o,lookupFunction:s,appId:c,actionType:d,workObjectType:m,entity:u})=>{let h=(0,i.wA)(),_=(0,M.d4)(eR.GH),f=(0,M.d4)(eR.jB),y=(0,M.d4)(e=>c&&(0,e7.jH)(e,c)),A=l.productName()||y,x=(0,M.d4)(e=>(0,z.G9)(e,c,A)),{workObjectClickOpensUrlPref:E}=(0,eP.c)({appId:c,productNameOrAppName:A}),C=(0,r.useMemo)(()=>f&&void 0===x&&!0!==E,[f,E,x]),k=(0,en.A)({appId:c,authProviderKey:o,entityId:t,relatedConversationsEntityId:a,entityTitle:l.full()?.title()??"",entitySubtitle:l.full()?.subtitle()??"",icon:l.full()?.subtitleImage(),externalUrl:n??"",lookupFunction:s,workObjectDisplayType:l.displayType()||m||"",productName:l.productName(),isFullSizePreviewEnabled:l.isFullSizePreviewEnabled(_),fullSizePreview:l.fullSizePreview()}),v=getActionByType(d),{callback:S,iconName:I,label:w,autoClogProps:T}=v?k[v]:{callback:J.A,iconName:"new-window",label:te.t("Open in app")},N=(0,r.useCallback)(e=>{C&&v===en.O.openInApp&&h((0,eI.hZ)({appId:c,productName:A,isStaged:!0})),S(e)},[C,h,c,A,S,v]),R=(0,r.useMemo)(()=>f&&v===en.O.openInApp,[f,v]);return v?"icon"===e?r.createElement(eu.Ay,{tip:w,position:"top"},r.createElement(em.A,{"aria-label":w,onClick:S,svgIconProps:{name:I,size:"20"},outline:!0,className:"padding_50",autoClogProps:T})):r.createElement(p.Ay,{type:"outline",className:"display_flex flex_one",onClick:R?N:S,autoClogProps:T},r.createElement("div",{className:"margin_right_50"},v===en.O.openInApp?r.createElement(WorkObjectIcon,{className:eN().actionButtonIcon,appId:c,entity:u,model:l}):r.createElement(b.Ah,{name:I,size:"16"})),r.createElement(g.A,{lines:1},w)):null};SlackActionButton.displayName="SlackActionButton";let WorkObjectFlexpaneFooter=({appId:e,appName:t,entityId:a,relatedConversationsEntityId:n,entityUrl:i,model:l,lookupFunction:o,authProviderKey:s,workObjectType:d,useLegacyUrl:m,refreshTs:u,messageTs:p,channelId:h,isEphemeral:_,entity:f,isEditing:b,fileId:g})=>{let y=(0,M.d4)(eR.dr),A=(0,M.d4)(e8.tl),x=(0,M.d4)(eR.V9),E=l?.full(),C=E?.actions(),v=C?.block_payload?.service_id,S=C?.block_payload?.service_team_id,I=C?.block_payload?.container?.type,w=C?.primary_actions??[],T=C?.primary_actions_menu??[],N=(0,M.d4)(e=>(0,e9.OL)(e,h)),R=(0,eJ.a)(a)?.objectId,P=(0,M.d4)(e=>(0,j.YM)(e,R)),L=(0,M.d4)(e=>(0,e6.M)(e,P,N)),O=l?.entityTypeForClogging(),D=l?.productName()||t,F=(0,r.useMemo)(()=>x&&!(0,eX.O)(e,P,O,a),[x,e,P,O,a]),{onActionButtonClick:U}=(0,eL.b)({entityId:a,serviceId:v,serviceTeamId:S,containerType:I,messageTs:p,channelId:h,entityUrl:i,isEphemeral:_}),B=(0,en.A)({appId:e,authProviderKey:s,entityId:a,relatedConversationsEntityId:n,entityTitle:E?.title()??"",entitySubtitle:E?.subtitle()??"",icon:E?.subtitleImage(),externalUrl:i??"",lookupFunction:o,workObjectDisplayType:l?.displayType()||d||"",useLegacyUrl:m,refreshTs:u,isEphemeral:_,messageTs:p,channelId:h,productName:l?.productName(),fileId:l?.fileId()||g}),H=(0,r.useMemo)(()=>{if(!l)return;let t=l?.full()?.actions(),a=t?.overflow_actions?.app_actions??[],n=new Map((t?.overflow_actions?.slack_actions??[]).map(e=>[getActionByType(e.type),e])),i=a.map(t=>getOverflowAppMenuItems(t,getMenuItemIcon(f,l,e),U)),o=n.has(en.O.copyLink),s=n.has(en.O.share),c=y&&A&&n.has(en.O.todo),d=n.has(en.O.openInApp),m=n.has(en.O.openInWindow),u=L&&n.has(en.O.addToFolder);return r.createElement(r.Fragment,null,(o||s)&&r.createElement(r.Fragment,null,s&&B[en.O.share].menuItem,o&&B[en.O.copyLink].menuItem),(c||u)&&r.createElement(r.Fragment,null,r.createElement(ea.bX,null),c&&B[en.O.todo].menuItem,u&&B[en.O.addToFolder].menuItem),i.length>0&&r.createElement(r.Fragment,null,r.createElement(ea.bX,null),r.createElement(ea.c$,{label:l?.appName()}),i),(d||m)&&r.createElement(r.Fragment,null,r.createElement(ea.bX,null),m&&B[en.O.openInWindow].menuItem,d&&B[en.O.openInApp].menuItem),F&&r.createElement(r.Fragment,null,r.createElement(ea.bX,null),B[en.O.clickBehaviorPref].menuItem),B.feedback.menuItem,r.createElement(ea.bX,null),B.syncData.menuItem)},[l,y,A,F,B,L,f,e,U]),W=(0,r.useCallback)(e=>r.createElement(c.A,{uiComponentName:ei.UiComponentName.WORK_OBJECT_FLEXPANE_MENU},r.createElement(ea.Ay,e,H)),[H]);if(!l)return null;let V=T.map(e=>r.createElement(ActionMenuButton,{key:e.action_id,action:e,onOptionSelected:U})),G=w.map((t,c)=>"button"===t.type&&"action_id"in t&&"block_id"in t?r.createElement(CustomBlockActionButton,{key:t.action_id,action:t,callback:U(t),autoClogProps:k.GQ}):t.type in tt?r.createElement(SlackActionButton,{key:t.type,type:0===c?"default":"icon",entityId:a,relatedConversationsEntityId:n,entityUrl:i,model:l,lookupFunction:o,appId:e,actionType:t.type,workObjectType:d,entity:f,authProviderKey:s}):null);return b?r.createElement(WorkObjectFlexpaneEditFooter,{entityId:a,entityUrl:i}):r.createElement(r.Fragment,null,G,V,r.createElement(ClickPreferenceCoachmarkContainer,{appId:e,productOrAppName:D,step:eB.First},r.createElement(et.A,{"aria-label":te.t("More actions"),isMenuTrigger:!0,onClick:J.A,renderMenu:W,svgIconProps:ta,autoClogProps:k.C1,tooltipLabel:te.t("More actions")})))};WorkObjectFlexpaneFooter.displayName="WorkObjectFlexpaneFooter";var tn=a(0x13eedc190),tr=a(0xf225ecf2),ti=a(0x1c7997c1),tl=a(0x96920791),to=a(0x16d221c7f),ts=a(0x142775427),tc=a(0x1f803375e);let td=new m.Ay("work-objects");function PendingChangesModal({entityId:e,entityUrl:t}){let a=(0,i.wA)(),n=(0,r.useCallback)(()=>{a((0,eI.gQ)({entityId:e,showModal:!1}))},[a,e]),l=(0,r.useCallback)(()=>{a((0,eI.U$)({entityId:e,pendingChanges:{}})),a((0,eb.o)({entityId:e,entityUrl:t}))},[a,e,t]),o=td.rt("Continue without saving changes?",{fallbackHash:"ff57ab1e7da2549c09428fa8bf231f322927829c",fallbackHashNs:"slack_connect_mcp"}),s=td.rt("Your updates to this will be lost. We hate to see hard work go to waste.",{fallbackHash:"16f48d827e890882e6fb8f89eb5583ebb4c65367",fallbackHashNs:"rimeto_atlas_admin"});return r.createElement(tn.A,{onClose:n,isOpen:!0,centered:!0},r.createElement(ts.A,null,r.createElement(tc.A,{title:o})),r.createElement(tr.A,null,r.createElement(ti.A,null,r.createElement("p",null,s))),r.createElement(tl.A,null,r.createElement(to.A,null,r.createElement(p.Ay,{type:"outline",onClick:n},td.t("Go Back",{fallbackHash:"f03e2d07687c3f501c6eacf30e658f457a05be25",fallbackHashNs:"channel_invite"})),r.createElement(p.Ay,{type:"danger",onClick:l},td.t("Continue",{fallbackHash:"2e02623966f9391facf6eaefc8b079ed5b630bee",fallbackHashNs:"app_view"})))))}PendingChangesModal.displayName="PendingChangesModal";var tm=a(0x14fad6485),tu=a(0x1f8893105),tp=a(0x177c6bf9e),th=a(0x15f4f83cf),t_=a(0x1ed767a16),tf=a(0x11ce49797),tb=a(0x1c2a1a838),tg=a(0x3be1c4f9),ty=a(0xa4086de4),tA=a(0x66ca2077),tx=a(0x214d3bda8),tE=a.n(tx);let tC="password-reset",tk=new m.Ay("work-objects"),SalesforceAuthRedirect=({displayType:e,salesforceOrgId:t})=>{let a,n,l,o,s,c=(0,i.wA)(),{windowRef:d}=(0,tm.ox)(),m=(0,M.d4)(tu.Wy),[u,h]=(0,r.useState)(!1),f=(0,M.d4)(e=>(0,tb.kO)(e,t)),g=(0,th.uz)(f)?f.name:void 0,{redirectUrl:y,salesforceUrl:A}=(0,M.d4)(e=>(0,ty.o0)(e,{orgId:t})),x=((0,ee.y3)()?A:y)??"";y&&(a=tp.Fi.test(y)?"mfa":tp.El.test(y)?tC:"unknown");let E=(0,r.useCallback)(()=>{c((0,tg.Cw)({orgId:t,redirectUrl:void 0,status:tA.n.AUTH_CONTINUE})),h(!1)},[c,t]),C=(0,r.useCallback)(e=>{if(e.stopPropagation(),u)E();else{let e,handleAuthRedirectComplete=t=>{"lo.loaded"===t.data.type&&e&&(d.deref()?.removeEventListener("message",handleAuthRedirectComplete),e.close(),e=null,E())};x&&((e=d.deref()?.open(x,"_blank","popup,width=500,height=775"))?d.deref()?.addEventListener("message",handleAuthRedirectComplete):h(!0))}},[x,E,u,d]),k=(0,r.useCallback)(e=>{e.stopPropagation(),u?((0,t_.x3)(x),c((0,tf.A)())):E()},[x,c,E,u]);if(!a)return null;let v=m?tk.t("Copy link to open in your browser."):"Copy link to open in your browser.",S=m?tk.t("Tableau Next"):"Tableau Next";switch(a){case"mfa":s=tk.t("Set up multifactor authentication",{fallbackHash:"45bd7ef960b8324ce407d8f19c487ec27a0a1d44",fallbackHashNs:"tableau"}),u?(l=m?tk.t("Has multifactor authentication (MFA) been set up?"):"Has multifactor authentication (MFA) been set up?",o=v,n=tk.t("Yes, Let\u2019s Go",{fallbackHash:"35fce253dba1093818b6b2ddd9d34e4ae0b26664",fallbackHashNs:"tableau"})):(l=m?g?tk.t("To view this {displayType} in Slack, you need to set up multifactor authentication (MFA) to connect to {salesforceOrgName}.",{displayType:e,salesforceOrgName:g}):tk.t("To view this {displayType} in Slack, you need to set up multifactor authentication (MFA).",{displayType:e}):`To view this ${e} in Slack, you need to set up multifactor authentication (MFA).`,o=m?tk.t("Already set up MFA?"):"Already set up MFA?",n=tk.t("Set up MFA",{fallbackHash:"df9560ba4d2b13a71d8ec4f418dd73b55dc36ed1",fallbackHashNs:"tableau"}));break;case tC:s=tk.t("Update your password",{fallbackHash:"23d127a3e4b61b7dff499efb33b609c68f366cf0",fallbackHashNs:"tableau"}),u?(l=m?tk.t("Has your Tableau Next password been updated?"):`Has your ${e} password been updated?`,o=v,n=tk.t("Yes, Let\u2019s Go",{fallbackHash:"35fce253dba1093818b6b2ddd9d34e4ae0b26664",fallbackHashNs:"tableau"})):(l=m?g?tk.t("To view this {displayType} in Slack, you need to update your Tableau Next password to connect to {salesforceOrgName}.",{displayType:e,salesforceOrgName:g}):tk.t("To view this {displayType} in Slack, you need to update your Tableau Next password.",{displayType:e}):`To view this ${e} in Slack, you need to update your Tableau Next password.`,o=m?tk.t("Already updated your password?"):"Already updated your password?",n=tk.t("Update Password",{fallbackHash:"61dcf34e70921088cddc6b8a5de3610727725562",fallbackHashNs:"tableau"}));break;default:s=tk.t("Something\u2019s missing",{fallbackHash:"6e3e750306ec79592b7a8d9996ac6846497399ba",fallbackHashNs:"tableau"}),u?(l=m?tk.t("Has your Tableau Next user been configured?"):`Has your ${e} user been configured?`,o=v,n=tk.t("Yes, Reload",{fallbackHash:"6313663ee47493fcc84195719b3ea482ca0db2d0",fallbackHashNs:"tableau"})):(l=m?g?tk.t("To view this {displayType} in Slack, you need to configure your Tableau Next user to connect to {salesforceOrgName}.",{displayType:e,salesforceOrgName:g}):tk.t("To view this {displayType} in Slack, you need to configure your Tableau Next user.",{displayType:e}):`To view this ${e} in Slack, you need to configure your Tableau Next user.`,o=m?tk.t("Already configured your user?"):"Already configured your user?",n=m?tk.t("Open Tableau Next",{fallbackHash:"f9f61c51c56309699a6b12e9a35a4f0943bb42fc",fallbackHashNs:"tableau"}):"Open Tableau Next")}return r.createElement("div",{className:tE().salesforceAuthRedirectContainer},r.createElement("div",{className:tE().tableauIconContainer},r.createElement("img",{src:e0,className:tE().appIcon,alt:S}),r.createElement("div",{className:tE().plugIconContainer},r.createElement(b.Ah,{name:"plug"}))),r.createElement("div",{className:tE().title},s),r.createElement("div",{className:tE().appName},S),r.createElement("div",{className:tE().redirectDescription},l,o?r.createElement(r.Fragment,null," ",r.createElement(_.A,{onClick:k},o)):null),r.createElement("div",{className:tE().redirectAction},r.createElement(p.$n,{type:"primary",onClick:C},n)))};SalesforceAuthRedirect.displayName="SalesforceAuthRedirect";var tv=a(0x20716123c),tS=a(0x21109e926),tI=a(0x21343fa5a),tw=a(0x24573b3ff),tT=a(0xb7471cc3),tN=a(0x14705d91b),tM=a(0x2c5a5afa),tR=a(0x1ab793479),tP=a(0x1c7cb6e50),tL=a(0x19c76d181),tO=a(0x1851ee91d),tD=a(0x1b8a2ca0c),tF=a.n(tD);let tU=new m.Ay("work_objects"),WorkObjectCommentComposer=({entityId:e,entityUrl:t,workObjectModel:a,appName:n,onOptimisticComment:l,onRemoveOptimisticComment:o})=>{let s=(0,i.wA)(),{windowRef:c}=(0,r.useContext)(tm._0),d=(0,r.useRef)(null),[m,p]=(0,r.useState)(!1),[h,_]=(0,r.useState)(!1),f=(0,M.d4)(eR.Y),b=(0,M.d4)(tL.WR),g=(0,r.useCallback)(async()=>{let a=d.current?.getContents();if(!a)return;let n=s((0,tO.p)({textyContents:a}))[0];if(!n)return;let r=`optimistic-comment-${Date.now()}`;l({id:r,sender:{user_type:"slack",user_id:b},comment:{blocks:n},timestamp:Math.floor(Date.now()/1e3)}),d.current?.setContents({contents:[]}),p(!0),_(!1);try{await s((0,tR.I)({reason:"work-object-comment-post",entityId:e,entityUrl:t,comment:{blocks:(0,tP.t)(n)}}))}catch{o(r),_(!0)}finally{p(!1)}},[s,b,l,e,t,o]),y=(0,r.useCallback)(()=>{m||g()},[m,g]),A=a?.productName()||n,x=a?.displayType(),E=f?tU.t("Comment on {productName} {displayType}\u2026",{productName:A,displayType:x}):`Comment on ${A} ${x}\u{2026}`,C=f?tU.t("Comment on {productName} {displayType}",{productName:A,displayType:x}):`Comment on ${A} ${x}`,k=f?tU.t("Couldn\u2019t sync your comment to {productName}. Please try again.",{productName:A}):`Couldn't sync your comment to ${A}. Please try again.`;return r.createElement("div",{className:tF().composer},h&&r.createElement("div",{className:tF().errorBanner},r.createElement(u.Ay,{level:"error"},k)),r.createElement(tN.A,{enableSendButton:!0,enableComposerButton:!0,enableEmojiButton:!0,onSubmit:g},r.createElement(tM.A,{ref:d,windowRef:c,placeholder:E,ariaLabel:C,sendMessage:g,onEnter:y,completeOnMembers:!0,completeOnChannels:!0,completeOnEmoji:!0,useWysiwyg:!0})))};WorkObjectCommentComposer.displayName="WorkObjectCommentComposer";var tB=a(0x6792c5b4),tH=a(0x1f4fd9824),tW=a(0x11c86845f),tV=a(0x10ea414df),tG=a.n(tV);let tq=new m.Ay("work-objects"),tj={name:"edit",size:"16"},tK={name:"trash",size:"16"},WorkObjectCommentActions=({comment:e,onEdit:t,onDelete:a})=>{let n=e.can_edit,i=e.can_delete,l=(0,M.d4)(eR.Y),o=(0,r.useCallback)(()=>{t?.(e)},[t,e]),s=(0,r.useCallback)(()=>{a?.(e)},[a,e]);if(!n&&!i)return null;let c=l?tq.t("Edit"):"Edit",d=l?tq.t("Delete"):"Delete";return r.createElement("div",{className:tG().actions},r.createElement(tW.A,null,n?r.createElement(et.A,{"aria-label":c,tooltipLabel:c,svgIconProps:tj,onClick:o,buttonSize:"small"}):null,i?r.createElement(et.A,{"aria-label":d,tooltipLabel:d,svgIconProps:tK,onClick:s,buttonSize:"small"}):null))};WorkObjectCommentActions.displayName="WorkObjectCommentActions";var t$=a(0x1ec256990),tY=a(0x6cc5eee0),tQ=a(0x129074070),tZ=a(0x1ee9b0300),tJ=a(0x15a4ffb05);let CommentAvatar=({sender:e})=>{if("slack"===e.user_type)return r.createElement(t$.A,{userId:e.user_id,size:36});let t="external"===e.user_type?e.image?.image_url||(0,tZ.w)(e.text):void 0;return r.createElement("img",{src:t,alt:e.text,className:tG().externalAvatar})};CommentAvatar.displayName="CommentAvatar";let CommentBody=({comment:e})=>{let t=e.comment;if("blocks"in t&&t.blocks){let e=t.blocks.elements;return r.createElement("div",{className:"c-message_kit__blocks c-message_kit__blocks--rich_text"},r.createElement(tQ.A,{elements:e}))}return"value"in t&&"string"==typeof t.value?"markdown"===t.format?r.createElement(tY.A,{text:t.value}):r.createElement(tJ.A,{text:t.value}):null};CommentBody.displayName="CommentBody";let WorkObjectCommentItem=({comment:e,onEdit:t,onDelete:a})=>{let{sender:n,timestamp:i}=e,l="slack"===n.user_type;return r.createElement("div",{className:tG().commentItem},r.createElement(WorkObjectCommentActions,{comment:e,onEdit:t,onDelete:a}),r.createElement(tB.A,{light:r.createElement(CommentAvatar,{sender:n})},r.createElement("div",{className:tG().header},l?r.createElement(tH.A,{userId:n.user_id}):r.createElement("span",{className:tG().userName},n.text),r.createElement(S.A,{timestamp:i,relative:!0})),r.createElement("div",{className:tG().body},r.createElement(CommentBody,{comment:e}))))};WorkObjectCommentItem.displayName="WorkObjectCommentItem";var tX=a(0x339b339c),t0=a(0x1ccef1c6f),t1=a(0xbafc75b7),t2=a.n(t1);let t4={small:100,medium:200,large:280},t5=r.createElement("div",{className:t2().avatarSkeleton}),SkeletonItem=({lineCount:e,shouldAnimate:t})=>r.createElement("div",{className:t2().skeletonItem},r.createElement(tB.A,{light:t5},r.createElement("div",{className:t2().lines},r.createElement(tX.A,{className:t2().textSkeleton,size:"random",sizes:t4,applyShimmer:t}),r.createElement(tX.A,{className:t2().textSkeleton,size:"random",sizes:t4,applyShimmer:t}),3===e&&r.createElement(tX.A,{className:t2().textSkeleton,size:"random",sizes:t4,applyShimmer:t})))),WorkObjectCommentSkeleton=()=>{let e=(0,M.d4)(e=>!!(0,t0.ty)(e,"a11y_animations"));return r.createElement(r.Fragment,null,r.createElement(SkeletonItem,{lineCount:3,shouldAnimate:e}),r.createElement(SkeletonItem,{lineCount:3,shouldAnimate:e}),r.createElement(SkeletonItem,{lineCount:2,shouldAnimate:e}),r.createElement(SkeletonItem,{lineCount:3,shouldAnimate:e}),r.createElement(SkeletonItem,{lineCount:3,shouldAnimate:e}),r.createElement(SkeletonItem,{lineCount:2,shouldAnimate:e}))};WorkObjectCommentSkeleton.displayName="WorkObjectCommentSkeleton";var t3=a(0xf3b0bc58),t6=a(0x15fb82076);let t8=a.p+"empty-state-comments-bd2d790.svg";var t7=a(0x1d53b5b7c),t9=a.n(t7);let ae=new m.Ay("work-objects"),WorkObjectCommentsEmptyState=({workObjectModel:e})=>{let t,a=(0,M.d4)(eR.Y),n=e?.appId(),i=(0,M.d4)(e=>n&&(0,e7.jH)(e,n)),l=e?.productName(),o=e?.appName()||i,s=e?.displayType(),c=e?.externalUrl(),d=l||o||"app",m=s||"item",u=a?ae.t("Synced with {productName}",{productName:d}):`Synced with ${d}`;return t=c?a?ae.rt("Comments posted on this {itemType} will sync back to {productNameLink}.",{itemType:m,productNameLink:r.createElement(t6.A,{href:c,target:"_blank"},d)}):r.createElement(r.Fragment,null,"Comments posted on this ",m," will sync back to"," ",r.createElement(t6.A,{href:c,target:"_blank"},d),"."):a?ae.t("Comments posted on this {itemType} will sync back to {productName}.",{itemType:m,productName:d}):`Comments posted on this ${m} will sync back to ${d}.`,r.createElement("div",{className:t9().emptyState},r.createElement(t3.A,{imageUrl:t8,title:u,description:t,isExtended:!0}),n&&r.createElement(w.z,{appId:n,size:36,imageClassName:t9().productIconOverlay}))};WorkObjectCommentsEmptyState.displayName="WorkObjectCommentsEmptyState";let at=a.p+"error-state-comments-5114636.svg";var aa=a(0x1ee02af6d),an=a.n(aa);let ar=new m.Ay("work-objects"),WorkObjectCommentsErrorState=({workObjectModel:e,onRefresh:t})=>{let a=(0,M.d4)(eR.Y),n=e?.appId(),i=(0,M.d4)(e=>n&&(0,e7.jH)(e,n)),l=e?.productName(),o=e?.appName()||i,s=e?.displayType(),d=e?.externalUrl(),m=l||o||"app",u=s||"item",p=a?ar.t("Couldn\u2019t load {productName} comments.",{productName:m}):`Couldn't load ${m} comments.`,h=a?ar.t("There was an issue and we couldn\u2019t display the comments on this {itemType}. Try again in a few minutes.",{itemType:u}):`There was an issue and we couldn't display the comments on this ${u}. Try again in a few minutes.`,_=a?ar.t("Refresh"):"Refresh",f=a?ar.t("View in browser"):"View in browser";return r.createElement(c.A,k.Ru,r.createElement("div",{className:an().errorState},r.createElement(t3.A,{imageUrl:at,title:p,description:h,isExtended:!0,primaryActionText:_,onClickPrimaryAction:t,primaryActionAutoClogProps:k.SH,secondaryActionText:d?f:void 0,secondaryActionHref:d})))};WorkObjectCommentsErrorState.displayName="WorkObjectCommentsErrorState";var ai=a(0x10bae7b36),al=a(0x8c72322a),ao=a(0x1fcbb004d);let as=new m.Ay("work-objects"),WorkObjectDeleteCommentDialog=({comment:e,onConfirmDelete:t})=>{let a=(0,i.wA)(),n=(0,M.d4)(eR.Y),[l,o]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),d=(0,r.useCallback)(async()=>{o(!0),c(!1);try{await t(e),a((0,ao.O)())}catch{c(!0),o(!1)}},[t,e,a]),m=(0,r.useCallback)(()=>{a((0,ao.O)())},[a]),p=n?as.t("Delete comment"):"Delete comment",h=n?as.t("Delete"):"Delete",_=n?as.t("Cancel"):"Cancel",f=n?as.t("Are you sure you want to delete this comment? This cannot be undone."):"Are you sure you want to delete this comment? This cannot be undone.",b=n?as.t("Something went wrong. Please try again."):"Something went wrong. Please try again.",{sender:g,timestamp:y}=e,A="slack"===g.user_type,x=(0,r.useMemo)(()=>r.createElement(CommentAvatar,{sender:g}),[g]);return r.createElement(ai.A,{title:p,submitButtonText:h,submitButtonType:"danger",cancelButtonText:_,isSubmitButtonALoadingButton:!0,isSubmitting:l,onSubmit:d,onCancel:m,onClose:m},s?r.createElement("div",{className:"margin_bottom_50"},r.createElement(u.Ay,{level:"error"},b)):null,r.createElement("p",null,f),r.createElement("div",{className:"margin_top_100"},r.createElement(al.A,{className:"c-message_kit__message c-message_kit__contextual_message"},r.createElement(tB.A,{light:x},r.createElement("div",{className:tG().header},A?r.createElement(tH.A,{userId:g.user_id}):r.createElement("span",{className:tG().userName},g.text),r.createElement(S.A,{timestamp:y,relative:!0})),r.createElement("div",{className:tG().body},r.createElement(CommentBody,{comment:e}))))))};WorkObjectDeleteCommentDialog.displayName="WorkObjectDeleteCommentDialog";var ac=a(0x1e4cc8fc2),ad=a(0x46dbff89),am=a(0x10db4022c),au=a.n(am);let WorkObjectCommentsContainer=({children:e})=>r.createElement("div",{className:au().container},e);WorkObjectCommentsContainer.displayName="WorkObjectCommentsContainer";let WorkObjectComments=({entityId:e,entityUrl:t,workObjectModel:a,appName:n})=>{let l=(0,i.wA)(),o=(0,M.d4)(t=>(0,z.hF)(t,e)),s=(0,M.d4)(t=>(0,z.nn)(t,e)),[c,d]=(0,r.useState)(!1),[m,u]=(0,r.useState)([]),p=(0,r.useRef)(),h=(0,r.useCallback)(e=>{u(t=>[...t,e])},[]),_=(0,r.useCallback)(e=>{u(t=>t.filter(t=>t.id!==e))},[]),f=(0,r.useCallback)(()=>{l((0,eI.Or)({entityId:e,isLoading:!0})),l((0,ac.F)({reason:"work-object-comments-fetch",entityId:e,entityUrl:t})).catch(()=>{l((0,eI.Or)({entityId:e,isLoading:!1})),d(!0),p.current&&clearTimeout(p.current)})},[l,e,t]);(0,r.useEffect)(()=>{o||s||c||f()},[o,s,c,f]),(0,r.useEffect)(()=>(s&&!o&&(p.current=setTimeout(()=>{l((0,eI.Or)({entityId:e,isLoading:!1})),d(!0)},1e4)),()=>{p.current&&clearTimeout(p.current)}),[s,o,l,e]),(0,r.useEffect)(()=>{o&&(d(!1),u([]),p.current&&clearTimeout(p.current))},[o]);let b=(0,r.useCallback)(()=>{d(!1),f()},[f]),g=o?.delete_action,{handleBlockAction:y}=(0,eL.b)({entityId:e,serviceId:g?.service_id,serviceTeamId:g?.service_team_id,containerType:g?.container?.type,entityUrl:t}),A=(0,r.useCallback)(e=>g?.action?y({...g.action,value:e.id}):Promise.reject(Error("Delete action is not available")),[g,y]),x=(0,r.useCallback)(e=>{g?.action&&l((0,ad.q)({element:r.createElement(WorkObjectDeleteCommentDialog,{comment:e,onConfirmDelete:A})}))},[g,A,l]),E=[...o?.comments??[],...m],C=(0,r.useRef)(null),k=(0,r.useRef)(E.length);return((0,r.useEffect)(()=>{E.length>k.current&&C.current?.scrollIntoView({behavior:"smooth",block:"nearest"}),k.current=E.length},[E.length]),!s||o||c)?c?r.createElement(WorkObjectCommentsContainer,null,r.createElement(WorkObjectCommentsErrorState,{workObjectModel:a,onRefresh:b})):o?.comments?.length?r.createElement(r.Fragment,null,r.createElement(WorkObjectCommentsContainer,null,E.map(e=>r.createElement(WorkObjectCommentItem,{key:e.id,comment:e,onDelete:g?.action?x:void 0})),r.createElement("div",{ref:C})),r.createElement(WorkObjectCommentComposer,{entityId:e,entityUrl:t,workObjectModel:a,appName:n,onOptimisticComment:h,onRemoveOptimisticComment:_})):r.createElement(WorkObjectCommentsContainer,null,r.createElement(WorkObjectCommentsEmptyState,{workObjectModel:a})):r.createElement(WorkObjectCommentsContainer,null,r.createElement(WorkObjectCommentSkeleton,null))};WorkObjectComments.displayName="WorkObjectComments";var ap=a(0xb1c0d55),ah=a(940089e4),a_=a(0x3dcad321),af=a(0x247aba52d),ab=a.n(af);let SamplePills=({shimmer:e})=>{let t=o()(ab().span,{[ab().shimmer]:e});return r.createElement("div",{"data-qa":"wo-sample-pills"},r.createElement("p",null,r.createElement("span",{className:t},"Creator")),r.createElement("p",null,r.createElement("span",{className:t},"Example Creator")),r.createElement("p",null,r.createElement("span",{className:t},"Updated")),r.createElement("p",null,r.createElement("span",{className:t},"Updated Date")),r.createElement("p",null,r.createElement("span",{className:t},"Description")),r.createElement("p",null,r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"Lorem ipsum dolor sit amet, consectetur adipiscing elit.")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"Sed do eiusmod temporincididunt ut labore et dolore")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"magna aliqua. Ut enim ad minim veniam, quis nostrud")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"exercitation ullamco laboris nisi ut aliquip ex ea")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"commodo consequat."))),r.createElement("p",null,r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"Duis aute irure dolor in reprehenderit in voluptate velit")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"esse cillum dolore eu fugiat nulla pariatur.")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui")),r.createElement("span",{className:ab().row},r.createElement("span",{className:t},"officia deserunt mollit anim id est laborum."))))};SamplePills.displayName="SamplePills";var ag=a(0x7bde3d37),ay=a(0xe89390a),aA=a(0x1fc98bd03),ax=a(0x1c5116e43),aE=a(0xef2e73b8),aC=a.n(aE);let ak=new m.Ay("search"),av=new m.Ay("work-objects"),WorkObjectDetailsBody=({children:e})=>r.createElement(c.A,{eventId:ei.EventId.WORK_OBJECT_FLEXPANE_DETAILS_VIEW,uiPage:ei.UiPage.WORK_OBJECT_FLEXPANE_DETAILS},r.createElement("div",{className:"full_height full_width"},r.createElement("div",{className:aC().details},e)));WorkObjectDetailsBody.displayName="WorkObjectDetailsBody";let WorkObjectDetails=({appId:e,entity:t,entityUrl:a,model:n,messageTs:i,channelId:l,isEphemeral:o,source:s,refreshTs:c})=>{let d=(0,M.d4)(eR.Iz),m=(0,M.d4)(e=>(0,z.G1)(e,t.id))===ax.Gk.Form,p=n?.full(),h=c?(0,ay.L)(c):void 0,_=(0,M.d4)(e=>(0,aA.IQ)(e,p)),f=(0,r.useCallback)(e=>{if(e)try{let t=(0,ah.A)(e);if(!t)return;let a=(0,ap.A)(t,{shortenDay:!0}),n=(0,a_.A)(t,{includeSeconds:!0});return av.t("{date} at {time}",{date:a,time:n})}catch{return}},[]),b=(0,r.useMemo)(()=>f(c),[f,c]),g=null;(0,eA.jH)(t)&&(g=t);let{onActionButtonClick:y}=(0,eL.b)({entityId:n?.entityId()||g?.entity_id||"",serviceId:g?.ext_error?.actions?.block_payload?.service_id,serviceTeamId:g?.ext_error?.actions?.block_payload?.service_team_id,containerType:g?.ext_error?.actions?.block_payload?.container?.type,messageTs:i,channelId:l,entityUrl:n?.externalUrl()||g?.entity_url||a,isEphemeral:o});if((0,e4.nY)(t)||(0,e4.z9)(t))return r.createElement(WorkObjectDetailsBody,null,(0,e4.z9)(t)&&r.createElement("div",{className:"margin_bottom_100"},r.createElement(u.Ay,{level:"warning"},ak.t("This is taking a while but we haven\u2019t given up yet\u2026"))),r.createElement(SamplePills,{shimmer:!0}));if((0,e4.WV)(t))return r.createElement(t3.A,{className:aC().emptyState,title:ak.t("Cannot find this item"),isExtended:!0});if((0,eA.jH)(t)&&t.ext_error&&t.ext_error.show_partial_view)return r.createElement(WorkObjectDetailsBody,null,r.createElement(SamplePills,null));if((0,eA.jH)(t)&&t.ext_error)return d?r.createElement(ec.q,{appId:e,entity:t,entityUrl:a,messageTs:i,channelId:l,isEphemeral:o,displayMode:"center"}):r.createElement(t3.A,{className:aC().emptyState,title:t.ext_error.message,isExtended:!0,primaryActionButtonType:g?.ext_error?.actions?.error_actions?.[0]?.style||"outline",primaryActionText:g?.ext_error?.actions?.error_actions?.[0]?.text.text,onClickPrimaryAction:y(g?.ext_error?.actions?.error_actions?.[0]),primaryActionDataQA:"work-object-error-action"});if(p){let e=0===p.fields().length||1===p.fields().length&&_;return r.createElement(WorkObjectDetailsBody,null,r.createElement(ag.d,{layout:p,source:s,entityUrl:a,channelId:l,messageTs:i,isCalendarEntity:n?.entityTypeForClogging()===e2.C.SlackEntitiesCalendarEvent}),!e&&!m&&r.createElement("div",{className:aC().updatedTsFooter},r.createElement(eu.Ay,{delay:eu.PK,tip:b,hideFromScreenReader:!0,maxWidth:"large",position:"top-left"},r.createElement("div",{className:aC().updatedTsText},h))))}return r.createElement(WorkObjectDetailsBody,null,"description"in t&&t.description&&t.description.length&&r.createElement("div",{key:"description",className:aC().fieldset},r.createElement("div",{className:aC().label},ak.t("Description")),r.createElement("div",{className:aC().description},r.createElement(tY.A,{text:t.description}))),"fields"in t&&t.fields.length?t.fields.map(e=>r.createElement("div",{key:e.label,className:aC().fieldset},r.createElement("div",{className:aC().label},e.label),r.createElement("div",{className:aC().value},e.value))):r.createElement("div",null,ak.t("Coming soon")))};WorkObjectDetails.displayName="WorkObjectDetails";var aS=a(0x2519dacdb),aI=a(0x105ecbbed),aw=a(0xafce781a);let aT=new m.Ay("work-objects");function WorkObjectFlexpaneBody({appId:e,appName:t,entityId:a,relatedConversationsEntityId:n,entityUrl:l,entity:o,model:s,tab:c=ax.FG.Details,channelId:d,messageTs:m,isEphemeral:u,isAuthOverlayActive:p,onTabChange:h,flexpaneSource:_,onOpenRelatedThread:f,refreshTs:b}){let g=(0,i.wA)(),[y,A]=(0,r.useState)(),x=(0,M.d4)(e=>(0,z.G1)(e,a)),E=(0,M.d4)(e=>(0,z.Ro)(e,a)),C=(0,M.d4)(eR.Y),v=(0,M.d4)(e=>(0,z.hF)(e,a)),S=v?.comments?.length??s?.comments()?.count,I=(0,M.d4)(eR.jB),w=s?.productName()||t,T=(0,M.d4)(t=>(0,z.G9)(t,e,w)),{workObjectClickOpensUrlPref:N}=(0,eP.c)({appId:e,productNameOrAppName:w}),R=(0,r.useMemo)(()=>I&&!0===T&&!0!==N&&!p,[I,N,T,p]);(0,tI.A)(()=>{R&&g((0,aw.iR)({event:{type:eU.jo.WORK_OBJECT_OPENED_IN_FLEXPANE_AFTER_CLICKING_BROWSER_CTA}}))});let P=(0,aI.Iu)(d,m),L=n||a,{isLoading:O,relatedThreadKeys:D}=(0,tT.U)({entityId:L,entityUrl:l,currentThreadKey:P,...y}),F=(0,r.useCallback)(e=>{A(e)},[]),U=(0,r.useMemo)(()=>{let n=[{id:ax.FG.Details,title:aT.t("Details"),content:r.createElement(WorkObjectDetails,{appId:e,entity:o,model:s,source:_,entityUrl:l,refreshTs:b,channelId:d,messageTs:m}),className:"no_margin",autoClogProps:k.DX}],i=C?aT.t("Comments"):"Comments";return C&&n.push({id:ax.FG.Comments,title:i,content:r.createElement(WorkObjectComments,{entityId:a,entityUrl:l,workObjectModel:s,appName:t}),className:"no_margin",titleCount:S&&S>0?S:void 0,autoClogProps:k.ky}),n.push({id:ax.FG.Threads,title:aT.t("Conversations"),content:r.createElement(aS.g,{relatedThreadKeys:D,isLoading:O,workObjectModel:s,filterThreadsBy:F,entityId:L,currentThreadKey:P,threadFilters:y,onOpenRelatedThread:f,shouldShowFilter:!0}),className:"no_margin",titleCount:D.length>0?D.length:void 0,autoClogProps:k.BC}),n},[e,t,o,s,_,l,a,L,C,D,O,F,P,y,f,b,S,d,m]);return x===ax.Gk.None?r.createElement(tw.A,{fullHeight:!0,fullWidthMenu:!0,tabs:U,defaultTabId:c,ariaLabel:aT.t("Details tabs"),tabMenuClassnames:Q().tabMenu,onTabChange:h}):r.createElement("div",{className:E?Q().isSavingContainer:Q().editContainer},r.createElement(WorkObjectDetails,{appId:e,entity:o,model:s,messageTs:m,channelId:d,isEphemeral:u,source:_,entityUrl:l,refreshTs:b}))}WorkObjectFlexpaneBody.displayName="WorkObjectFlexpaneBody";var aN=a(0x1d48b23f7),aM=a(0x2382c92e5),aR=a.n(aM);let aP=new m.Ay("work-objects"),WorkObjectFlexpaneEditModeButtons=({entityId:e,entityUrl:t})=>{let a=(0,i.wA)(),n=(0,M.d4)(t=>(0,z.Ro)(t,e)),l=(0,r.useCallback)(()=>{a((0,eb.o)({entityId:e,entityUrl:t}))},[a,e,t]);return r.createElement("div",{"data-qa":"work-object-flexpane-edit-mode-buttons"},r.createElement(p.Nm,{size:"small",className:aR().cancelEditButton,onClick:l,disabled:n,autoClogProps:k.IH},aP.t("Cancel")))};WorkObjectFlexpaneEditModeButtons.displayName="WorkObjectFlexpaneEditModeButtons";var aL=a(0x1acec8789),aO=a(0x51b81145),aD=a(0x207eb3801),aF=a(0x242503693),aU=a(0x1d92b7a98),aB=a(0xb04c4a12),aH=a(0x9b971e7e),aW=a(0x1e14c198f),aV=a(0x9bb47ea1),aG=a(0x330e5328),aq=a(0xc9b196b3),aj=a(0x121ede9d1),az=a(0x1ad6b19a9);let aK=new m.Ay("work-objects"),WorkObjectFlexpaneContainer=({children:e,disableScroll:t})=>r.createElement("div",{className:"full_height full_width"},r.createElement(s.A,null,({width:a,height:n})=>t?r.createElement("div",{className:Q().scrollDisabledContainer,style:{width:a,height:n}},e):r.createElement(f.A,{width:a,height:n},e)));WorkObjectFlexpaneContainer.displayName="WorkObjectFlexpaneContainer";let WorkObjectFlexpane=({entityId:e,relatedConversationsEntityId:t,id:a,appId:n,lookupFunction:l,authProviderKey:s,workObjectType:m,tab:f=ax.FG.Details,entityUrl:E,channelId:C,messageTs:v,useLegacyUrl:S,isEphemeral:I,source:w=ax.tL.Unfurl,onBackClick:T,reason:N,onFlexpaneTabsChange:R,fallbackTitle:P,onOpenRelatedThread:L,onClose:O,onCoordinatedRefresh:D,onDismissIndicators:U,fileId:B,viewId:H=aB.Y.WORK_OBJECT,openedFromFilePreviewModal:W=!1,currentPreviewFlexPaneView:V})=>{let G=(0,i.wA)(),q=(0,r.useRef)(null),K=(0,M.d4)(aH.JY),$=(0,r.useRef)(null),Y=(0,r.useRef)(null),[Z,J]=(0,r.useState)(!1),X=(0,M.d4)(e=>"on"===(0,ev._Z)(e,"app_connect")),ee=(0,M.d4)(eR.KT),et=(0,M.d4)(eR.pM),ea=(0,M.d4)(t=>(0,z.rP)(t,e)),er=(0,M.d4)(e=>"on"===(0,ev._Z)(e,"view_header_button_polish")),el=(0,M.d4)(t=>(0,z.Ne)(t,{recordId:e,lookupFunction:l,entityUrl:E,channelId:C,messageTs:v,useLegacyUrl:S,reason:N??"work-objects-open-flexpane"})),eo=(0,M.d4)(t=>(0,z.j_)(t,e)),es=(0,M.d4)(t=>(0,z.hA)(t,e)),ed=(0,M.d4)(t=>(0,z.G1)(t,e)),em=(0,M.d4)(t=>(0,z.Ro)(t,e)),eu=(0,M.d4)(t=>(0,z.xB)(t,e)),ep=(0,M.d4)(t=>(0,z.s)(t,e)),[eh,e_]=(0,r.useState)(!1),ef=ed===ax.Gk.Form,eb=(0,eA.jH)(el)?el.ext_error?.status!=="user_not_authed":el.error!==aL.$.NotConnected,eg=(0,eA.$q)(el),ey=(0,eA.jH)(el)?el.event_ts:void 0;(0,r.useEffect)(()=>{X&&G((0,aW.A)({appId:n,connectionStatus:eb?aV.q.connected:aV.q.disconnected,connectUrl:(0,eA.jH)(el)&&el.auth_url||void 0}))},[n,G,el,X,eb]);let ex=(0,M.d4)(t=>(0,ty.d4)(t,{entityId:e})),eE=(0,eA.jH)(el)?el.ext_error:void 0,eC=!!eE&&eE?.status==="user_not_authed",ek=(0,r.useMemo)(()=>(0,e4.nY)(el),[el]),eS=eE&&K&&!(0,e4.vD)(K,e),ew=(0,r.useMemo)(()=>!!(ek||eo||eS),[ek,eo,eS]),eT=(0,r.useCallback)(t=>e===t?.id&&(q.current?.focusCloseButton(),!0),[e]);(0,aO.A)(aF.Ay.VIEW_WORK_OBJECT,eT);let eN=(0,eA.Kr)(el),eM=eN?.full(),eP=aK.t("item",{ns:"solutions"}),eL=el&&"display_type"in el?el.display_type:void 0,eO=eN?.displayType(),eD=eL??eO??m??eP,eF=eD.toLowerCase(),eU=eN?.fileId()||B,eB=(0,aD.k6)(e),eH=(0,r.useMemo)(()=>{if(em)return aK.t("Saving changes\u2026");let e=eM?.headerTitle();return e||(e=(e=eD??"").charAt(0).toUpperCase()+e.slice(1)),ef?aK.t("Editing {title}",{title:e}):e},[em,eM,ef,eD]),eW=(0,M.d4)(e=>(0,e7.sO)(e,n)),eV=(0,r.useCallback)(async t=>{E&&(et&&t&&G((0,eI.cD)({entityId:e,focusBlockId:t})),await G((0,aj.E)({entityId:e,entityUrl:E,messageTs:v,channelId:C})))},[G,E,v,C,e,et]),eG=(0,r.useMemo)(()=>eM?.headerSubtitle()??eN?.productName()??eW.name,[eW.name,eM,eN]),eq=(0,r.useCallback)(()=>{$.current&&J($.current.getBoundingClientRect().width<130)},[]),ej=(0,r.useMemo)(()=>({viewIdForTileContents:"entity",viewParamsForTileContents:{entityId:e,id:a,appId:n},showCloseButton:!ef,hideBottomBorder:!ef,onBackClick:T,toolbarAriaLabel:`${eG}, ${eO}`,openedFromFilePreviewModal:W}),[n,e,a,ef,T,eG,eO,W]);(0,r.useLayoutEffect)(()=>{let e=(0,d.A)(eq);if(!e||!$.current)return;let t=$.current;return e.observe(t),()=>{t&&e.unobserve(t)}},[eq,$]);let ez=(0,r.useMemo)(()=>r.createElement("div",{className:"display_flex align_items_baseline gap_50",ref:$},r.createElement("div",{className:Q().flexpaneTitle},eH),r.createElement("div",{className:o()(Q().flexpaneCaption,{[Q().flexpaneCaptionTruncated]:Z}),"data-qa":"work-object-flexpane-caption"},r.createElement(g.A,{lines:1},eG))),[eG,eH,Z]),eK=(0,aD.f1)(e),e$=(0,r.useCallback)(async()=>{if(eg)return void window.open(el.app_detail_page_url,"_blank","popup,noopener,noreferrer");let e={appId:n};(0,eA.jH)(el)&&el.auth_url?e.authUrl=el.auth_url:s&&(e.providerKey=s),eB?await G((0,aG.m)({salesforceOrgId:eK||""})):await G((0,aq.Zf)(e)),setTimeout(()=>e_(!0),1e3)},[n,el,eB,s,G,eg,eK]),eY=(0,r.useCallback)(r=>{if(R)return R(r);w!==ax.tL.FileViewer&&G((0,az.P)({entityId:e,relatedConversationsEntityId:t,id:a,appId:n,lookupFunction:l,authProviderKey:s,workObjectType:m||"",tab:r,entityUrl:E,messageTs:v,channelId:C,useLegacyUrl:S,fileId:eU,options:{navigateInPlace:!0,forceBackStack:!0}}))},[n,s,C,G,e,t,E,a,l,v,m,S,w,R,eU]),eQ=(0,en.A)({appId:n,authProviderKey:s,entityId:e,relatedConversationsEntityId:t,entityTitle:eN?.full()?.title()??"",entitySubtitle:eN?.full()?.subtitle()??"",icon:eN?.full()?.subtitleImage(),externalUrl:E??"",lookupFunction:l,workObjectDisplayType:eO||"",useLegacyUrl:S,refreshTs:eN?.ts()||ey,isEphemeral:I,messageTs:v,channelId:C,productName:eN?.productName(),fileId:eU}),{callback:eZ,autoClogProps:eJ}=eQ.syncData,eX=(0,r.useCallback)(()=>{D?.()},[D]),e0=(0,tv.V)({refreshButtonRef:Y,displayType:eD,onDismiss:U}),e1=(0,r.useMemo)(()=>{if(eh)return r.createElement(_.A,{onClick:eZ,"data-qa":"work-object-flexpane-refresh-link",autoClogProps:eJ},aK.t("Refresh"))},[eh,eJ,eZ]),e2=aK.t("Your {productName} account is needed to load the latest data and perform actions on this {displayType}.",{productName:eW.name,displayType:eF}),e5=eE&&!eC?eE?.message:e2,e6=(0,r.useMemo)(()=>r.createElement(c.A,{eventId:k.FG.eventId,elementName:k.FG.elementName,clogImpression:k.FG.clogImpression},r.createElement(A.v,{loadingStatus:x.r.FINISHED,providerName:eW.name,hasValidOAuth:!eg&&eb,onUpdateOAuth:e$,appId:n,isOAuthTokenInvalid:!0,showDisconnectedBorder:!1,customExpandedSubtext:e5,customExpandedButton:e1,isAppNotInstalled:eg,align:"left",isFullWidth:!0,buttonAutoClogProps:k.vd})),[eW.name,eg,eb,e$,n,e5,e1]),e8=(!eb||eg)&&f===ax.FG.Details,e9=(0,r.useMemo)(()=>{let a=eM?.title()??P??"",{formattedText:i}=(0,aU.A)(a);return r.createElement("div",{className:"full_height relative"},r.createElement("div",{className:Q().flexpane},r.createElement(WorkObjectFlexpaneContainer,{disableScroll:f===ax.FG.Comments},r.createElement("div",{className:Q().header},eM?.titleInput()&&!ef&&ee?r.createElement("div",{className:e3().editableValueContainer},r.createElement("div",{role:"heading","aria-level":1,className:Q().entityTitle},r.createElement(g.A,{lines:3,breakWords:!1,overflowWrap:!0},i)),r.createElement("div",{className:e3().editButtonContainer},r.createElement(p.Nm,{className:e3().editButton,onClick:()=>eV(eM?.titleInput()?.block_id),autoClogProps:k.Y_,"aria-label":aK.t("Edit")},ea?r.createElement(h.A,{size:"medium",color:"blue"}):r.createElement(b.Ah,{name:"edit",width:16,height:16})))):r.createElement("div",{role:"heading","aria-level":1,className:Q().entityTitle},r.createElement(g.A,{lines:3,breakWords:!1,overflowWrap:!0},i)),!ef&&r.createElement(aN.c,{entity:el,model:eN,app:eW,entityURL:E})),eu&&r.createElement(PendingChangesModal,{entityId:e,entityUrl:E}),es&&!ew&&!ep&&r.createElement("div",{className:Q().updateAlert},r.createElement(u.Ay,{type:"boxed",level:"success",align:"left"},aK.t("Updated just now"))),r.createElement(WorkObjectFlexpaneBody,{appId:n,appName:eW.name,entity:el,model:eN,entityId:e,relatedConversationsEntityId:t,entityUrl:E,onTabChange:eY,tab:f,channelId:C,messageTs:v,isEphemeral:I,isAuthOverlayActive:e8,flexpaneSource:w,onOpenRelatedThread:L,refreshTs:eN?.ts()||ey}))),e8&&r.createElement("div",{className:Q().authOverlay},r.createElement(ProgressiveBlur,null),r.createElement("div",{className:Q().authWrapper,"data-qa":"work-object-flexpane-auth"},e6)),!eg&&eb&&eE?.show_partial_view&&f===ax.FG.Details&&r.createElement("div",{className:Q().authOverlay},r.createElement(ProgressiveBlur,null),r.createElement("div",{className:Q().authWrapper},r.createElement(ec.q,{appId:n,entity:el,entityUrl:E,messageTs:v,channelId:C,isEphemeral:I}))),ex&&eK&&r.createElement("div",{className:Q().authOverlay},r.createElement(ProgressiveBlur,null),r.createElement("div",{className:Q().authWrapper,"data-qa":"work-object-flexpane-auth-redirect"},r.createElement(c.A,{eventId:k.cU.eventId,elementName:k.cU.elementName,clogImpression:k.cU.clogImpression},r.createElement(SalesforceAuthRedirect,{displayType:eD,salesforceOrgId:eK})))))},[eD,ex,eb,eg,eM,P,ef,el,eN,eW,E,eu,e,t,n,eY,f,C,v,I,w,L,e6,eE,ee,eV,ea,ey,ew,es,ep,eK,e8]),te=(0,r.useMemo)(()=>ef?r.createElement(WorkObjectFlexpaneEditModeButtons,{entityId:e,entityUrl:E}):r.createElement(tS.a,{appName:eW.name,isLoading:ew,isSynced:es,hasValidOAuth:eb,entityId:e,lookupFunction:l,workObjectType:m,authProviderKey:s,appId:n,model:eN,useLegacyUrl:S,eventTs:ey,entityUrl:E,isEditable:!ee&&(eM?.isEditable()||!1),flexpaneSource:w,onClose:O,messageTs:v,channelId:C,refreshButtonRef:Y,onCoordinatedRefresh:eX,currentPreviewFlexPaneView:V,iconButtonSize:er?"x-small":"medium",suppressButtonStyles:er,experimentViewHeaderButtonPolishGroupOn:er,activeTab:f}),[ef,eW.name,ew,es,eb,e,l,m,s,n,eN,S,ey,E,eM,w,O,v,C,eX,V,ee,er,f]),tt=(0,r.useMemo)(()=>{if(!ew&&eb&&!eE&&!ex)return r.createElement(WorkObjectFlexpaneFooter,{appId:n,appName:eW.name,entityId:e,relatedConversationsEntityId:t,model:eN,lookupFunction:l,workObjectType:m,authProviderKey:s,entityUrl:E,useLegacyUrl:S,refreshTs:eN?.ts()||ey,channelId:C,messageTs:v,isEphemeral:I,entity:el,isEditing:ed===ax.Gk.Form,fileId:eU})},[ew,eb,eE,n,eW.name,t,e,eN,l,m,s,E,S,ey,C,v,el,I,ed,eU,ex]),ta=(0,M.d4)(e=>eU?(0,j.FD)(e,eU):null),tn=(0,r.useMemo)(()=>r.createElement(EmailDetailsFlexpaneActionsButton,{menuItems:eQ,hasValidOAuth:eb}),[eQ,eb]),tr=r.createElement(y.Ay,{key:e,ref:q,dataQa:"work-object-flexpane",className:Q().workObjectFlexpane,additionalButtonsContent:te,titleContent:ez,bodyContent:e9,"aria-label":eH,viewId:H,headerProps:ej,footerContent:f===ax.FG.Details||ef?tt:void 0,footerClassName:"padding_left_125 padding_right_125 gap_50"});return(0,F.r3)(n)&&(tr=r.createElement(EmailDetailsFlexpane,{model:eN,isLoading:ew,additionalButtonsContent:tn,entityId:e})),r.createElement(r.Fragment,null,r.createElement(c.A,{eventId:ei.EventId.APP_WORK_OBJECT_FLEXPANE,clogImpression:!0,uiComponentName:ei.UiComponentName.WORK_OBJECT_FLEXPANE,appId:n,workObjectType:eN?.type(),workObjectEntityType:eN?.entityTypeForClogging(),fileId:eU,fileType:ta},tr),e0)};WorkObjectFlexpane.displayName="WorkObjectFlexpane"},0x2519dacdb:(e,t,a)=>{"use strict";a.d(t,{g:()=>WorkObjectThreads});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x151aef05f),d=a(0x2501a2cee),m=a(0x10f728c1c),u=a(0x168d4289d),p=a(0x5eedb646),h=a(0x1faa3f1ac),_=a(0x12334bacc),f=a(0x3ca4e1cc),b=a(0x3711e82d),g=a(0x226892387),y=a(0x25336c8d7),A=a(0x11c82607b),x=a(0x1400f598e),E=a(0x365a4cc3),C=a(0x1f48e3aa4);let k=(0,A.Ay)("Generate a workobject summary",async(e,t,a)=>{let{entityId:n,entityUrl:r,entityDisplayType:i,shouldRegenerate:l}=a;if(!(0,f.NX)(t()))return;let o=(0,E.wv)(t(),{entityId:n});if(!o||l){l&&o&&e((0,x.dW)(o.id));try{let t=await e((0,y.S)({reason:"generate-ai-workobject-summary",entityId:n,entityUrl:r}));if(!t?.ok||!t?.summary?.id)return;e((0,x.S2)({id:t.summary.id,type:C.Tj.WorkObject,entryPoint:C.lZ.WorkObjectView,entityId:n,entityUrl:r,entityDisplayType:i,channelId:""}))}catch(e){console.error("Failed to generate work object summary",e)}}});k.meta={name:"generateAiWorkObjectSummary",key:"createThunkGenerateAiWorkObjectSummary",description:"Generate a workobject summary"};var v=a(0x22678ff4d),S=a.n(v);let I=new s.Ay("ai-work-objects-summary"),AiWorkObjectSummaryError=({aiSummary:e})=>{let t=(0,r.wA)(),a=(0,g.d4)(f.NX),i=(0,n.useCallback)(()=>{e&&e.entityUrl&&e.entityDisplayType&&e.entityId&&t(k({entityId:e.entityId,entityUrl:e.entityUrl,entityDisplayType:e.entityDisplayType,shouldRegenerate:!0}))},[e,t]),l=(0,n.useMemo)(()=>(0,_.vU)(e),[e]),s=(0,n.useMemo)(()=>n.createElement("span",null,n.createElement(h.A,{onClick:i,"data-qa":"ai_workobject_summary_error_try_again_link"},I.t("Try again"))),[i]),c=a?I.rt("There was a problem summarizing conversations for this {displayType}. Give it another try in a few minutes. {tryAgainLink}.",{displayType:e.entityDisplayType,tryAgainLink:s}):n.createElement(n.Fragment,null,n.createElement("span",null,"There was a problem summarizing conversations for this",e.entityDisplayType,". Give it another try in a few minutes."),s);return a?n.createElement(o.A,{clogImpression:!0,eventId:b.EventId.NATIVE_AI,elementName:p.H.AI_WORK_OBJECT_SUMMARY_ERROR_STATE_VIEW,...l},n.createElement("div",{className:S().container,"data-qa":"ai_workobject_summary_error"},n.createElement("div",{className:S().title},n.createElement(d.Ah,{name:"ai-summary",size:"20",inline:!0}),n.createElement("div",null,I.t("Summary"))),n.createElement("div",null,c))):null};AiWorkObjectSummaryError.displayName="AiWorkObjectSummaryError";var w=a(0x1340892e2),T=a(0x1930e4228),N=a(0x32f90b85),M=a(0x1ccef1c6f);let R=new s.Ay("ai-work-objects-summary"),P=n.createElement(d.Ah,{inline:!0,name:"ai-summary",size:"20"}),AIWorkObjectSummaryLoading=({aiSummaryId:e,totalThreadCount:t,displayType:a})=>{let i=(0,r.wA)(),o=(0,g.d4)(e=>!(0,M.ty)(e,"a11y_animations")),s=(0,g.d4)(f.NX),c=((e,t,a)=>{let n=[];if(a.length>0){let t=e?R.t("Gathering information about this {displayType}\u2026",{displayType:a}):"Gathering information about this thread\u2026";n.push(t)}if(t>0){let a=e?R.t("{totalThreadCount} relevant sources found\u2026",{totalThreadCount:t}):`${t} relevant threads found\u{2026}`;n.push(a)}return n.push(e?R.t("Putting it all together\u2026"):"Putting it all together\u2026"),n})(s,t,a),d=(0,n.useCallback)(()=>i((0,x.oR)(e)),[i,e]);return((0,N.Z)(d,6e4),s)?n.createElement("div",{className:S().container,"data-qa":"ai-work-object-summary-loading"},n.createElement(w.r,{icon:P,text:R.t("Summarizing\u2026"),className:S().shimmerText}),n.createElement("span",{className:l()(S().loadingText,{[S().loadingTextNoAnimation]:o})},n.createElement(T.SZ,{loadingMessages:c}))):null};AIWorkObjectSummaryLoading.displayName="AIWorkObjectSummaryLoading";var L=a(0x1ce4b4f7c);let AiWorkObjectSummarySection=({aiSummaryId:e,topic:t,topicIndex:a,shouldStartStreamingAnimating:r,detailsSectionAnimationIndex:i,onStreamingAnimationEnd:l,summaryClogData:o})=>{let s=(0,g.d4)(f.NX),c=(0,g.d4)(t=>(0,E.xD)(t,{id:e})),d=c?.topics?.length||0,m=(0,n.useMemo)(()=>!!(c?.isStreaming&&a>i),[c,a,i]);return s&&!m&&c?n.createElement("div",{className:S().sectionContainer},n.createElement(L.A,{aiSummaryId:c?.id,topic:t,topicIndex:a,isStreaming:c?.isStreaming,enableStreamingAnimation:c?.isStreaming&&!c?.hasStreamingAnimationFinished,totalTopicsCount:d,aiSummaryStatus:c?.status,channelId:"",onStreamingAnimationEnd:l,shouldStartStreamingAnimating:r,summaryClogData:o,hasFinishedHeadersReveal:!0,isTopicOnly:!0})):null};AiWorkObjectSummarySection.displayName="AiWorkObjectSummarySection";let O=new s.Ay("ai-work-objects-summary"),AIWorkObjectSummary=({entityId:e,totalThreadCount:t,displayType:a})=>{let r=(0,g.d4)(f.NX),[i,l]=(0,n.useState)(0),s=(0,g.d4)(t=>(0,E.wv)(t,{entityId:e})),c=(0,_.vU)(s),h=(0,n.useMemo)(()=>s&&s.entityId&&s.entityUrl?{entityId:s.entityId,entityUrl:s.entityUrl,summaryId:s.id}:null,[s]),y=(0,n.useCallback)(e=>()=>{l(e)},[]),A=(0,n.useCallback)(()=>s&&s.topics&&0!==s.topics.length?s.topics.map((e,t)=>n.createElement(AiWorkObjectSummarySection,{key:`work-object-topic-${t}`,aiSummaryId:s.id,topic:e,topicIndex:t,shouldStartStreamingAnimating:i===t,detailsSectionAnimationIndex:i,onStreamingAnimationEnd:y(t+1),summaryClogData:c})):null,[s,i,y,c]);return r&&s?s.status===C.nM.InProgress?n.createElement(AIWorkObjectSummaryLoading,{aiSummaryId:s.id,totalThreadCount:t,displayType:a}):s.status===C.nM.Error||s.status===C.nM.Complete&&s.error?n.createElement(AiWorkObjectSummaryError,{aiSummary:s}):s.topics&&0!==s.topics.length?n.createElement(o.A,{clogImpression:!0,eventId:b.EventId.NATIVE_AI,elementName:p.H.AI_WORK_OBJECT_SUMMARY_VIEW,nativeAiSummaryType:C.Tj.WorkObject},n.createElement("div",{className:S().container},n.createElement("div",{className:S().title},n.createElement(d.Ah,{name:"ai-summary",size:"18",inline:!0}),n.createElement("div",null,O.t("Summary"))),A(),n.createElement("div",{className:S().feedbackContainer},n.createElement(m.H,{includeFeedbackText:!0}),h&&n.createElement(u.A,{className:S().feedbackButtonGroup,entityRefsSummary:h,size:"18"})))):null:null};AIWorkObjectSummary.displayName="AIWorkObjectSummary";var D=a(0x1b6f39a31),F=a(0x1651509ed),U=a(0x45bd075),B=a(0x1d2cd7755),H=a(0x99233ecb),W=a(0x1e1bdd25f),V=a(0x9b65d19d),G=a.n(V);let q=new s.Ay("work-objects"),j="sortType",z="excludeUnjoinedChannels",K="excludeBots",$={name:"refine"},filterReducer=(e,t)=>{switch(t.type){case"SET_SORT":return{...e,sortType:t.sortType};case"EXCLUDE_UNJOINED_CHANNELS":return{...e,excludeUnjoinedChannels:!e.excludeUnjoinedChannels};case"EXCLUDE_BOTS":return{...e,excludeBots:!e.excludeBots};default:return e}},CheckboxItem=({label:e,onChange:t,checked:a,id:r})=>n.createElement(B.A,{type:"inline",text:e,cursor:"pointer"},n.createElement(U.A,{checked:a,onChange:t,id:r})),WorkObjectThreadFilter=({filterThreadsBy:e,threadFilters:t})=>{let a={sortType:t?.sortType??D.Jv.NEWEST,excludeUnjoinedChannels:t?.excludeUnjoinedChannels,excludeBots:t?.excludeBots},[r,i]=(0,n.useReducer)(filterReducer,a),l=(0,n.useCallback)(a=>{let n=filterReducer(r,a);i(a),e?.({...t,sortType:n.sortType,excludeUnjoinedChannels:n.excludeUnjoinedChannels,excludeBots:n.excludeBots})},[e,t,r]),o=(0,n.useCallback)(()=>l({type:"EXCLUDE_UNJOINED_CHANNELS"}),[l]),s=(0,n.useCallback)(()=>l({type:"EXCLUDE_BOTS"}),[l]),c=(0,n.useCallback)(()=>l({type:"SET_SORT",sortType:D.Jv.NEWEST}),[l]),d=(0,n.useCallback)(()=>l({type:"SET_SORT",sortType:D.Jv.OLDEST}),[l]),m=(0,n.useMemo)(()=>+!!r.excludeUnjoinedChannels+ +!!r.excludeBots,[r.excludeUnjoinedChannels,r.excludeBots]),u="sorting-group-id",p="filtering-group-id",h=(0,n.useCallback)(e=>n.createElement(H.Ay,e,n.createElement("div",{className:G().work_objects_thread_filter_menu},n.createElement(H.c$,{for:u,label:q.t("Sort")}),n.createElement(H.Dr,{key:`${j}-${D.Jv.NEWEST}`,label:q.t("Newest"),type:"radio",ariaRole:"menuitemradio",checked:r.sortType===D.Jv.NEWEST,indeterminate:!1,onSelected:c,group:u}),n.createElement(H.Dr,{key:`${j}-${D.Jv.OLDEST}`,label:q.t("Oldest"),type:"radio",ariaRole:"menuitemradio",checked:r.sortType===D.Jv.OLDEST,indeterminate:!1,onSelected:d,group:u}),n.createElement(H.bX,null),n.createElement(H.c$,{for:p,label:q.t("Filter")}),n.createElement(H.Dr,{key:z,onSelected:o,group:p,checked:r.excludeUnjoinedChannels,indeterminate:!1,ariaRole:"menuitemcheckbox",ariaLabel:q.t("Only include channels I\u2019m in")},n.createElement(CheckboxItem,{label:q.t("Only my channels"),onChange:o,checked:r.excludeUnjoinedChannels,id:z})),n.createElement(H.Dr,{key:K,onSelected:s,group:p,checked:r.excludeBots,indeterminate:!1,ariaRole:"menuitemcheckbox",ariaLabel:q.t("Exclude apps, bots, and workflows")},n.createElement(CheckboxItem,{label:q.t("Exclude automations"),onChange:s,checked:r.excludeBots,id:K})))),[r,c,d,o,s]),_=q.t("Filter/Sort: {count, plural, =0 {No filters applied} =1 {Filtered by {onlyMyChannelsFilter}{excludeBotsLabel}} =2 {Filtered by {onlyMyChannelsFilter} and {excludeBotsLabel}} other {}}. Sorted by {sort}.",{count:m,sort:r.sortType,onlyMyChannelsFilter:r.excludeUnjoinedChannels?"Only include channels I\u2019m in":"",excludeBotsLabel:r.excludeBots?q.t("Exclude apps, bots, and workflows"):""});return n.createElement(W.A,{renderMenu:h,position:"bottom-left"},n.createElement(F.Fr,{icon:$,text:m>0?m:void 0,isSelected:m>0,variant:"menu",ariaLabel:_}))};WorkObjectThreadFilter.displayName="WorkObjectThreadFilter";var Y=a(0xf3b0bc58),Q=a(0x2417d1641),Z=a(0x19d06a55e),J=a(0x1fb2d2a87),X=a(0xb7224980),ee=a(0xce3c4162),et=a(0x1c412a275),ea=a.n(et);let en=new s.Ay("work-objects"),WorkObjectThreadsEmptyState=({workObjectModel:e,shouldShowHeader:t=!1,shouldShowFilter:a=!1,customFilter:r})=>{let i=(0,g.d4)(J.to),{share:{callback:o,iconName:s}}=(0,Q.A)({appId:e?.appId()||"",authProviderKey:e?.authProviderKey()||"",entityId:e?.entityId()||"",relatedConversationsEntityId:e?.relatedConversationsEntityId(),entityTitle:e?.full()?.title()||"",entitySubtitle:e?.full()?.subtitle()||"",icon:e?.full()?.subtitleImage(),externalUrl:e?.externalUrl()||"",lookupFunction:e?.lookupFunction()||void 0,workObjectDisplayType:e?.displayType()||"",productName:e?.productName(),fileId:e?.fileId()}),c=!!(e?.entityId()&&e?.externalUrl()),d=(0,n.useCallback)(e=>{e&&c&&(e.stopPropagation(),o(e))},[c,o]),m=en.t("It\u2019s quiet. Too quiet\u2026"),u=e?.displayType(),p=en.t("When this link is shared in other Slack messages, they will show up here."),h=en.t("When this {type} is shared in other Slack messages, they will show up here.",{type:u}),_=en.t("Share"),f=(0,n.useMemo)(()=>({name:s,size:"20"}),[s]);return n.createElement("div",{className:"p-list_item_threads"},t&&n.createElement("div",{className:"p-list_item_threads--header"},n.createElement("div",{className:"p-list_item_threads--header-title"},en.t("Across Slack")),a&&n.createElement("div",{className:"p-list_item_threads--header-filter"},r)),n.createElement(Z.Y,{className:"margin_bottom_50",displayType:e?.displayType()}),n.createElement(Y.A,{title:m,className:l()({[ea().work_object_threads_empty_state]:t}),description:u?h:p,isExtended:!0,primaryActionText:c?_:void 0,onClickPrimaryAction:c?d:void 0,primaryActionIcon:f,imageUrl:"dark"===i?X:ee}))};WorkObjectThreadsEmptyState.displayName="WorkObjectThreadsEmptyState";var er=a(0x1a02c72b5),ei=a(0xd6a16321),el=a(0x20679dcfc),eo=a(0x105ecbbed),es=a(0xddebf5cb);let ec=new s.Ay("work-objects"),WorkObjectThreadsContainer=({children:e})=>n.createElement(o.A,{eventId:b.EventId.WORK_OBJECT_FLEXPANE_THREADS_VIEW,uiPage:b.UiPage.WORK_OBJECT_FLEXPANE_THREADS},e);WorkObjectThreadsContainer.displayName="WorkObjectThreadsContainer";let WorkObjectThreads=({relatedThreadKeys:e,isLoading:t,workObjectModel:a,onRemoveEntityRef:i,filterThreadsBy:o,entityId:s,currentThreadKey:d,threadFilters:m,onOpenRelatedThread:u,shouldShowFilter:p=!1})=>{let h=(0,r.wA)(),_=(0,g.d4)(f.NX),b=(0,g.d4)(e=>(0,E.wv)(e,{entityId:s||""})),y=(0,n.useMemo)(()=>a?.externalUrl(),[a]),A=(0,n.useMemo)(()=>a?.displayType(),[a]),x=(0,n.useCallback)((e,t,a,n)=>{let{channelId:r,threadTs:i}=(0,eo.Sb)(e),l=n||i;if(u)return u({relatedThreadKey:e,isCanvas:t,channelId:r,threadTs:l,isReply:a});r&&t&&!a?h((0,er.o)((0,ei.mo)({id:(0,el.l)(r)}))):r&&l&&h((0,es.Q)({channelId:r,threadTs:l,dangerouslyOverrideRouting:!0,highlightTs:i}))},[h,u]),[C,...v]=e,S=!!(d&&C),I=(0,n.useMemo)(()=>({current:S?[C]:[],related:S?v:e}),[C,v,e,S]),w=(0,n.useMemo)(()=>m?.sortType?I.related.sort((e,t)=>{let a=(0,eo.Sb)(e)?.threadTs,n=(0,eo.Sb)(t)?.threadTs;return a&&n?m.sortType===D.Jv.NEWEST?n.localeCompare(a):a.localeCompare(n):0}):I.related,[I.related,m]),T=0===w.length;(0,n.useEffect)(()=>{_&&s&&y&&!T&&!b&&h(k({entityId:s,entityUrl:y,entityDisplayType:A||""}))},[_,s,y,b,h,A,T]);let N=(0,n.useMemo)(()=>n.createElement(WorkObjectThreadFilter,{filterThreadsBy:o,threadFilters:m}),[o,m]),M=(0,n.useMemo)(()=>{if(!T)return;let e=m?.excludeBots||m?.excludeUnjoinedChannels;return n.createElement(WorkObjectThreadsEmptyState,{workObjectModel:a,shouldShowHeader:S||!S&&e,shouldShowFilter:e,customFilter:N})},[T,a,S,m,N]),R=(0,n.useMemo)(()=>m?.sortType===D.Jv.OLDEST?ec.t("Oldest"):ec.t("Newest"),[m?.sortType]);return n.createElement(WorkObjectThreadsContainer,null,_&&s&&n.createElement(AIWorkObjectSummary,{entityId:s,totalThreadCount:T?0:w.length+1,displayType:a?.displayType()||""}),S&&n.createElement("div",{className:l()(ea().work_object_threads)},n.createElement(c.L,{relatedThreadKeys:I.current,isLoading:t,onOpenRelatedThread:x,onRemoveEntityRef:i,shouldShowHeader:!0,shouldShowFilter:!1,headerTitle:ec.t("This thread"),isCurrentThread:!0,isWorkObjectContext:!0})),n.createElement("div",{className:l()(ea().work_object_threads,{full_height:!S})},n.createElement(c.L,{relatedThreadKeys:w,isLoading:t,onOpenRelatedThread:x,onRemoveEntityRef:i,customEmptyState:M,shouldShowHeader:!0,shouldShowFilter:p,headerTitle:p?R:void 0,customFilter:p?N:void 0,isWorkObjectContext:!0,workObjectDisplayType:a?.displayType(),showUpgradeBanner:!T})))};WorkObjectThreads.displayName="WorkObjectThreads"},0x26d8881d:(e,t,a)=>{"use strict";a.d(t,{n:()=>Accordion});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xa6f3163b),s=a(0x2501a2cee),c=a(0x2173cfef),d=a.n(c);function Accordion({accordionItems:e,className:t,showImageCaret:a,autoClogProps:r,showItemBorder:c=!0,itemClassName:m="",itemHeaderClassName:u="",itemHeaderButtonClassName:p="",itemHeaderButtonContentClassName:h="",itemDescriptionClassName:_="",expandedIconClassName:f="",collapsedIconClassName:b="",imageCaretClassName:g="",applyCustomAnimation:y=!1,expandOnHover:A=!1}){let[x,E]=(0,n.useState)(!1),[C,k]=(0,n.useState)(e.map((e,t)=>({...e,isExpanded:0===t}))),[v,S]=(0,n.useState)(""),I=(0,n.useRef)({}),w=(0,n.useCallback)((e,t)=>()=>{x||E(!0),t.isExpanded||(k(C.map((t,a)=>({...t,isExpanded:a===e}))),S(t.id),"function"==typeof t.onExpand&&t.onExpand())},[C,x]),T=(0,n.useCallback)(e=>t=>{I.current[e]=t},[]);(0,n.useEffect)(()=>{v&&I.current[v]&&I.current[v]?.focus()},[v]);let N=(0,n.useCallback)((e,t)=>n.createElement("h2",{className:i()(d().header,{[u]:!!u,[d().customItemTextAnimation]:y&&t&&x,[d().customItemText]:y&&t&&!x}),"data-qa":"accordion-list-item-header"},e),[y,u,x]),M=(0,n.useCallback)((e,t,a)=>{let r=i()({[d().defaultShowDescriptionAnimation]:t&&x,[d().defaultShowDescription]:t&&!x});return y&&(r=i()({[d().customItemTextAnimation]:y&&t&&x,[d().customItemText]:y&&t&&!x})),n.createElement("div",{className:r},n.createElement("div",{className:d().description},n.createElement("div",{id:`description-${a}`,"aria-hidden":!t,"data-qa":"accordion-list-item-description",className:i()({[_]:!!_})},e)))},[y,_,x]),R=y?{[d().customItemTransition]:y}:{};return n.createElement("ul",{className:i()(d().accordion,t)},C.map((e,t)=>n.createElement("li",{key:e.id,"data-qa":"accordion-list-item",className:i()(d().item,{[d().expanded]:e.isExpanded,[d().noBorder]:!c,...R},m)},n.createElement(o.A,{"aria-expanded":e.isExpanded,"aria-controls":`description-${t}`,className:i()(d().itemHeader,{[p]:!!p}),onClick:w(t,e),autoClogProps:{...r,onClick:{enableClogAction:!e.isExpanded},elementValue:e.id},ref:T(e.id),"aria-label":"string"==typeof e.header?e.header:void 0,"aria-describedby":e.isExpanded?`description-${t}`:void 0,onMouseOver:A?w(t,e):l.A},n.createElement("div",{className:d().iconSpacer},e.isExpanded?n.createElement("span",{className:i()(d().expandedIcon,{[f]:!!f,[e.iconHighlightClassName||""]:!!e.iconHighlightClassName}),"data-qa":"accordion-list-item-expanded-icon"},e.iconProps?n.createElement(s.Ah,e.iconProps):n.createElement(s.Ah,{name:"check-filled"})):n.createElement("span",{className:i()({[b]:!!b,[e.iconHighlightClassName||""]:!!e.iconHighlightClassName})},e.collapsedIcon?n.createElement(s.Ah,e.collapsedIcon):n.createElement(s.Ah,{name:"caret-right-filled"}))),n.createElement("div",{className:i()("display_flex flex_direction_column",{[h]:!!h})},N(e.header,e.isExpanded),M(e.description,e.isExpanded,t))),a&&e.isExpanded&&n.createElement("div",{className:i()(d().imageCaret,g),"data-qa":"accordion-list-item-image-caret"}))))}Accordion.displayName="Accordion"},0x1b7d502f9:(e,t,a)=>{"use strict";a.d(t,{K8:()=>r,Q1:()=>n});let n=20,r={PREF:"activity_view",PAGE:"page",FLEXPANE:"flexpane"}},0x9391882d:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseAddWorkspacesToSSBModal:()=>AddWorkspacesToSSBModal,default:()=>O});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x189615fa),m=a(0x58199183),u=a(0x10bae7b36),p=a(0xa69ad0c3),h=a(0x1b9d5cc0c),_=a(0x3711e82d),f=a(0x226892387),b=a(0xe684f705),g=a(0x1fcbb004d);let y=a.p+"paper-airplane-75db1c7.png",A=new s.Ay("automatic_x_device_signin"),AddWorkspacesToSSBEmailConfirmationModal=({clientTheme:e})=>{let t=(0,r.wA)(),a=(0,f.d4)(b.cA),i=(0,n.useCallback)(()=>t((0,g.O)()),[t]),s=(0,h.zY)(a),c=A.t("paper plane"),d=A.t("Check your email for a link"),m=A.rt("For security purposes, we\u2019ve sent a confirmation link to <strong>{userEmail}</strong>. Click it soon \u2014 it expires in 24 hours.",{userEmail:s,fallbackHash:"03ad25c428d15593825a8ff7ffb3d4533034e77d",fallbackHashNs:"automatic_x_device_signin"}),x=l()("p-add_workspaces_to_ssb_email_confirmation_modal__content",{"p-add_workspaces_to_ssb_email_confirmation_modal__content--dark":"dark"===e}),E=null,C=(0,n.useCallback)(()=>{i(),E?.({action:_.UiAction.CLOSE,elementName:"close_add_workspaces_to_ssb_email_confirmation_modal"})},[i,E]),k=n.createElement("p",{id:"email-confirmation-modal-content",className:x},m),v=(0,n.useMemo)(()=>({elementName:"got_it_button",elementType:_.ElementType.BUTTON,onClick:{enableClogAction:!0}}),[]),S=n.createElement("div",{className:"c-sk-modal_image__container"},n.createElement(p.A,{alt:c,src:y}));return n.createElement(o.A,{eventId:_.EventId.EDUCATION_XDEVICE_SIGNIN_MOBILE_TO_SSB,uiStep:_.UiStep.ADD_WORKSPACES_TO_SSB_EMAIL_CONFIRMATION_MODAL,trackClogRef:e=>{E=e}},n.createElement(u.A,{onClose:C,"data-qa":"add_workspaces_to_ssb_email_confirmation_modal",className:"p-add_workspaces_to_ssb_email_confirmation_modal",showSubmitButton:!0,submitButtonText:A.t("Got It",{fallbackHash:"c8a487428d655b8f4d84feb9acdac446bb649d66",fallbackHashNs:"send_btn"}),showCancelButton:!1,title:d,onSubmit:C,submitAutoClogProps:v,headerImage:S,closeButtonTone:"dark"},k))};AddWorkspacesToSSBEmailConfirmationModal.displayName="AddWorkspacesToSSBEmailConfirmationModal";var x=a(0x45bd075),E=a(0x1d2cd7755),C=a(0x2376ea9bb),k=a(0xa1832ae4),v=a(0x9509dfce),S=a(0xf3c65e54),I=a(0x5b1935a6),w=a(0x1ee439e69);let WorkspaceOption=({currentIndex:e,handleCheckboxOnChange:t,isChecked:a,workspace:i,workspaceId:o,workspacesTotal:s})=>{let c=(0,r.wA)(),d=(0,f.d4)(e=>(0,w._J)(e,o)),u=(0,k.F1)(d),p=(0,v.nf)(i);(0,n.useEffect)(()=>{c((0,S.j)({notificationName:I.ze.ADD_WORKSPACES_TO_SSB_MODAL,action:I.hw.IMPRESSION,notificationParams:{workspace_users:[p]}}))},[c,p]);let h=l()("p-add_workspaces_to_ssb_modal__workspace_selection",{"p-add_workspaces_to_ssb_modal__workspace_selection--single-workspace":1===s}),_=(0,n.useCallback)(e=>t(e,o),[t,o]),b=(0,n.useMemo)(()=>({elementName:"select_workspaces",onChange:{enableClogAction:!0}}),[]);return n.createElement("div",{className:h},n.createElement(C.A,{id:o,size:32}),n.createElement(E.A,{text:n.createElement(m.A,{id:o,bold:!1}),type:"inline",cursor:"pointer","aria-label":u},s>1&&n.createElement(x.A,{focusOnMount:0===e,"data-qa":`workspace_check_box_${o}`,onChange:_,checked:a,autoClogProps:b})))};WorkspaceOption.displayName="WorkspaceOption";var T=a(0x12cda7c38),N=a(0x12f291cfb),M=a(0x20e80190e),R=a(0x1fb2d2a87),P=a(0x46dbff89);let L=new s.Ay("automatic_x_device_signin"),AddWorkspacesToSSBModal=({workspaces:e,workspacesData:t,clientTheme:a,handleCheckboxOnChange:r,handleAddWorkspaces:i,onRequestClose:s,UNSAFE_parentSelector:u})=>{let p=(0,n.useRef)(),h=Object.values(t).filter(e=>!0===e).length.toString(),f=(0,n.useMemo)(()=>({isPrimaryCTA:!0,elementName:"add_workspaces_to_ssb_button",elementValue:h,onClick:{enableClogAction:!0}}),[h]),b=(0,n.useCallback)(()=>{s(),p?.current?.({action:_.UiAction.CLOSE,elementName:"close_add_workspaces_to_ssb_modal"})},[s]),g=e.length,y=g>1?"multi_workspace":"single_workspace",A=Object.values(t).every(e=>!e),x=L.t("Want to add {workspacesCount, plural, =1 {this workspace} other {these workspaces}}?",{workspacesCount:g}),E=L.t("Add {workspacesCount, plural, =1 {Workspace} other {Workspaces}}",{workspacesCount:g}),C=g>1?L.rt("You recently signed in to {workspacesCount} other workspaces on your mobile device. Choose which ones you\u2019d like to add on desktop.",{workspacesCount:g}):L.rt("You recently signed in to {teamName} on your mobile device. Add it now for easy access on desktop.",{teamName:n.createElement(m.A,{id:e[0].workspaceId,bold:!0})}),k=l()("p-add_workspaces_to_ssb_modal",{"p-add_workspaces_to_ssb_modal--single-workspace":1===g}),v=l()("p-add_workspaces_to_ssb_modal__content",{"p-add_workspaces_to_ssb_modal__content--dark":"dark"===a}),getWorkspaceSelectionList=()=>e.map((e,a)=>{let i=e.workspaceId;return n.createElement(WorkspaceOption,{currentIndex:a,handleCheckboxOnChange:r,isChecked:t[i],key:i,workspace:e,workspaceId:i,workspacesTotal:g})});return getWorkspaceSelectionList.displayName="getWorkspaceSelectionList",n.createElement(o.A,{eventId:_.EventId.EDUCATION_XDEVICE_SIGNIN_MOBILE_TO_SSB,uiStep:_.UiStep.ADD_WORKSPACES_TO_SSB_MODAL,trackClogRef:e=>{p.current=e},uiComponentName:_.UiComponentName.ADD_WORKSPACES_TO_SSB_MODAL,uiComponentVariant:y,numShownWorkspaces:g},n.createElement(d.A,{closeModal:b,isOpen:!0,centered:!0,className:k,dataQa:"add_workspaces_to_ssb_modal",labelledby:x,describedby:"add_workspaces_to_ssb_modal__content",UNSAFE_parentSelector:u},n.createElement(M.rQ,null,n.createElement(M.Rc,{title:x}),n.createElement("p",{id:"add_workspaces_to_ssb_modal__content",className:v},C)),n.createElement(M.$m,null,n.createElement(M.qf,null,n.createElement("div",null,getWorkspaceSelectionList()))),n.createElement(M.jl,null,n.createElement(M.ox,null,n.createElement(c.Ay,{disabled:A,"data-qa":"add_workspaces_button",onClick:i,autoClogProps:f,autoFocus:1===g},E)))))};AddWorkspacesToSSBModal.displayName="AddWorkspacesToSSBModal";let getInitialWorkspacesData=e=>{let t={};return e.forEach(e=>{t[e.workspaceId]=!0}),t},ConnectedAddWorkspacesToSSBModal=({onRequestClose:e,workspaces:t})=>{let a=(0,r.wA)(),[i,l]=(0,n.useState)(()=>getInitialWorkspacesData(t)),o=(0,f.d4)(R.to);(0,n.useEffect)(()=>{l(getInitialWorkspacesData(t))},[t]);let s=(0,n.useCallback)(()=>a((0,P.q)({element:n.createElement(AddWorkspacesToSSBEmailConfirmationModal,{clientTheme:o})})),[a,o]),c=(0,n.useCallback)((e,t)=>{let{checked:a}=e.target,n={...i};n[t]=a,l(n)},[i]),d=(0,n.useCallback)(()=>{e(),s();let n=t.filter(e=>i[e.workspaceId]?e:null);a((0,N.v)({reason:T.wr.TRIGGER_BULK_SSB_MAGIC_LOGIN_EMAIL,eventHandler:T.ch.ADD_WORKSPACES_TO_SSB_EVENT_HANDLER,selectedWorkspaces:(0,v.nf)(n)}))},[a,e,s,t,i]),m=(0,f.d4)(e=>(0,w._J)(e,t[0].workspaceId));return"Unknown Workspace"===(0,k.F1)(m)?null:n.createElement(AddWorkspacesToSSBModal,{workspaces:t,workspacesData:i,clientTheme:o,handleCheckboxOnChange:c,handleAddWorkspaces:d,onRequestClose:e})};ConnectedAddWorkspacesToSSBModal.displayName="ConnectedAddWorkspacesToSSBModal";let O=ConnectedAddWorkspacesToSSBModal},0x232174142:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>d,O9:()=>o,Ph:()=>c,dy:()=>s});var n,r,i,l=((n=l||{}).REQUESTS="requests",n.PENDING="pending",n.ACCEPTED="accepted",n.INVITE_LINKS="invite_links",n),o=((r={}).EMAIL="email",r.DATE="date_create",r.ACTIONS="actions",r.INVITE_CODE="invite_code",r.DATE_CREATED="date_created",r.EXPIRATION="expiration",r.CREATOR="creator",r.NUM_SIGNUPS="num_signups",r.JOINERS="joiners",r.STATUS="status",r),s=((i={}).ASCENDING="ASC",i.DESCENDING="DESC",i);let c=400,d=l},0x1ef851df1:(e,t,a)=>{"use strict";a.d(t,{G:()=>WorkObjectUnfurlPreviewSettings});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1faa3f1ac),o=a(0x2501a2cee),s=a(0x18bebdcb1),c=a(0x135350d44),d=a(0xb92e7d87),m=a(0xbe2be077),u=a(0xa1832ae4),p=a(0xb1f0729f),h=a(0x1bf5674be),_=a(0x9b971e7e),f=a(0x17a77d778),b=a(0x226892387),g=a(0x5dcff741),y=a(0x21514295c),A=a(0x1fcbb004d),x=a(0x100313bb4),E=a(0x1887ed0ea),C=a(0x2425a9268),k=a(0x1ee439e69);let v=new i.Ay("work_objects_admin"),useTeamInfo=()=>{let e=(0,b.d4)(k.Yc),t=(0,b.d4)(k.H7),a=(0,u.F1)(e),n=(0,u.ZT)(t)??void 0;return{currentTopLevelTeam:e,currentTeam:t,currentTeamName:a,teamId:n,isOnOrgDash:(0,b.d4)(x.s$)}};function useWorkObjectPreview({appId:e,isSlackConnectSetting:t}){let a=(0,r.wA)(),i=(0,b.d4)(t=>e?(0,y.mI)(t,e):null),l=(0,b.d4)(e=>t?(0,E.PI)(e,"external_teams_work_object_unfurl_visibility"):null),o=(0,b.d4)(p.s7);null==o&&(o=c.R.RICH);let s=c.R.RICH;"limited_details"===i?s=c.R.COMPACT:"no_preview"===i?s=c.R.NO_UNFURL:("default_to_global_setting"===i||null===i)&&(s=o),null==l&&(l=c.R.COMPACT);let u=!!e,x=c.R.RICH;x=u?s:t?l:o;let[k,v]=(0,n.useState)(x),S=u&&"default_to_global_setting"!==i&&null!==i,[I,w]=(0,n.useState)(u&&("default_to_global_setting"===i||null===i)),T=(0,b.d4)(m.k),N=(0,b.d4)(_.JY),M=T?h.Kw:f.Kj,[R,P]=(0,n.useState)(!1),[L,O]=(0,n.useState)(!1),D=(0,n.useCallback)(e=>{v(e)},[v]),F=(0,n.useCallback)(e=>{w(e),e?v(o):v(s)},[s,o]),U=(0,n.useCallback)(async t=>{if(e){let n="no_preview";t===c.R.COMPACT?n="limited_details":t===c.R.RICH&&(n="all_details"),I&&(n="default_to_global_setting");let r=await a((0,d.N)({appId:e,richLinkPreviewType:n,reason:"set-rich-link-preview-type"}));if(!r?.ok)throw Error;N&&a((0,g.i)({id:e,config:{richLinkPreviewType:n}}))}},[e,a,N,I]),B=(0,n.useCallback)(async()=>{O(!0),P(!1);try{u?U(k):t?await a((0,C.I)({prefKey:"external_teams_work_object_unfurl_visibility",prefValue:{type:k,source:"ORG"},reason:"work_object_admin_sc_setting"})):await a(M({pref:"work_object_unfurl_visibility",value:k}))}catch{O(!1),P(!0);return}O(!1),a((0,A.O)())},[a,k,M,u,U,t]);return{selectedPreviewType:k,onPreviewTypeSelected:D,isAppLevelSetting:u,setShowError:P,showError:R,isSaving:L,setIsSaving:O,onSave:B,isOnEnterprise:T,globalLevelPreviewLayout:o,appLevelPreviewLayout:s,onGlobalMatchSelected:F,isGlobalMatchSelected:I,slackConnectLevelPreviewLayout:l,isAppLevelSettingCustomized:S}}function useSlackConnectStrings(){let e=(0,b.d4)(k.Yc),t=(0,u.F1)(e);return{slackConnectStrings:{noPreview:{description:v.rt("App links shared by members of {currentTeamName} with external people won\u2019t include a preview.",{currentTeamName:t})},compactPreview:{description:v.rt("App links shared by members of {currentTeamName} with external people will show a preview with the app\u2019s icon, name, and description only.",{currentTeamName:t})},detailedPreview:{stateLabel:v.t("Detailed preview"),description:v.rt("App links shared by members of {currentTeamName} with external people will show a preview with the app\u2019s icon, name, description, and all provided fields.",{currentTeamName:t})}}}}var S=a(0xce378727),I=a(0x2b7f0bcc),w=a(0x24f1e08bb),T=a(0x1d2cd7755),N=a(0x139c79d16),M=a(0xa5dbe09b),R=a(0x15014e268),P=a(0x24e98a449),L=a(0x5dd1c0f2);let O=new i.Ay("work_objects_admin");function WorkObjectsAdminPreviewDWAInfo({appId:e}){let t=!!e&&(0,P.mX)(e),a=(0,b.d4)(t=>e?(0,L.jH)(t,e):null),r=`/app_redirect?app=${e}`,{currentTopLevelTeam:i,currentTeam:o}=useTeamInfo(),s=(0,b.d4)(e=>(0,k.fz)(e,i?.id))??o,c=(0,b.d4)(e=>s?(0,u.ZN)(e,s?.id,r):null);return t&&a&&c?n.createElement(I.Ay,{level:I.A_.info,type:I.QE.inlineBoxed},O.rt("<b>Pro tip:</b> Automatically connect everyone\u2019s Slack accounts to {app_name} so they can see detailed previews \u2014 no need to log in individually. <a>Enable domain wide authentication</a>",{app_name:a},({key:e,text:t,tag:a})=>{switch(a){case"a":return n.createElement(l.A,{key:e,href:c,target:"_blank",className:"link"},t);case"b":return n.createElement("b",{key:e},t);default:return t}})):null}WorkObjectsAdminPreviewDWAInfo.displayName="WorkObjectsAdminPreviewDWAInfo";var D=a(0xb1ea448c),F=a(0x32d3ef3d);let U={work_object_type:"external",app_name:"Taskly",external_url:"http://example.com",entity_id:"W:A014MFY3L59:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:"A014MFY3L59",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"document",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Text Should Wrap, Not Rap"},subtitle:{text:"Taskly"},fields:{type:"fields",elements:[]},product_icon:{type:"image",block_id:"stable_id",image_url:"/img/work-objects/Taskly.svg",alt_text:"Taskly",image_width:36,image_height:36,fallback:"Taskly",is_animated:!1,image_bytes:32856}},expanded:{layout_type:"expanded",title:{text:"Text Should Wrap, Not Rap"},subtitle:{text:"Taskly"},hover_subtitle:{text:""},product_icon:{type:"image",block_id:"stable_id",image_url:"/img/work-objects/Taskly.svg",alt_text:"Taskly",image_width:36,image_height:36,fallback:"Taskly",is_animated:!1,image_bytes:32856},fields:{type:"fields",elements:[{type:"field",label:"Description",field_type:"text",long:!0,text:"We need to update our deadlines, as our go-to-market plan has changed."},{type:"field",label:"Status",field_type:"text",text:"Pending"},{type:"field",label:"Priority",field_type:"text",text:"Medium"},{type:"field",label:"Assignee",field_type:"text",text:"Megan"}]}}},auth_provider_key:"dummy_auth_provider_key"},B={work_object_type:"external",external_url:"http://example.com",entity_id:"W:A012XDE27GB:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:P.iw,app_name:"One Drive",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"Presentation",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Presentation in PowerPoint Presentation"},fields:{type:"fields",elements:[]}},expanded:{layout_type:"expanded",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Presentation in PowerPoint Presentation"},hover_subtitle:{text:""},fields:{type:"fields",elements:[{type:"field",label:"Preview",field_type:"image",text:"Pending",image:[{type:"image",block_id:"stable_id",image_url:"/img/work-objects/space_design_spec_wo_unfurl.png",alt_text:"OneDrive",image_width:410,image_height:256,fallback:"OneDrive",is_animated:!1,image_bytes:209597}]}]}}},auth_provider_key:"dummy_auth_provider_key"},H={work_object_type:"external",external_url:"http://example.com",entity_id:"W:A012XDE27GB:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:P.Xg,app_name:"Google Slides",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"Presentation",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Google Slides"},fields:{type:"fields",elements:[]},product_icon:{type:"image",block_id:"stable_id",image_url:"/img/wo-file-icons/icon_google_presentation.png",alt_text:"Google Slides",image_width:36,image_height:36,fallback:"Google Slides",is_animated:!1,image_bytes:533}},expanded:{layout_type:"expanded",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Google Slides"},hover_subtitle:{text:""},product_icon:{type:"image",block_id:"stable_id",image_url:"/img/wo-file-icons/icon_google_presentation.png",alt_text:"Google Slides",image_width:36,image_height:36,fallback:"Google Slides",is_animated:!1,image_bytes:533},fields:{type:"fields",elements:[{type:"field",label:"Preview",field_type:"image",text:"Pending",image:[{type:"image",block_id:"stable_id",image_url:"/img/work-objects/space_design_spec_wo_unfurl.png",alt_text:"Google Slides",image_width:410,image_height:256,fallback:"Google Slides",is_animated:!1,image_bytes:209597}]}]}}},auth_provider_key:"dummy_auth_provider_key"},W={work_object_type:"external",external_url:"http://example.com",entity_id:"W:A05QNBAB4UA:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:P.EO,app_name:"Box",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"Presentation",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Box"},fields:{type:"fields",elements:[]}},expanded:{layout_type:"expanded",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Box"},hover_subtitle:{text:""},fields:{type:"fields",elements:[{type:"field",label:"Preview",field_type:"image",text:"Pending",image:[{type:"image",block_id:"stable_id",image_url:"/img/work-objects/space_design_spec_wo_unfurl.png",alt_text:"Box",image_width:410,image_height:256,fallback:"Box",is_animated:!1,image_bytes:209597}]}]}}},auth_provider_key:"dummy_auth_provider_key"},V={work_object_type:"external",external_url:"http://example.com",entity_id:"W:A012XDE27GB:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:P.jU,app_name:"Jira",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"document",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Issue SP-943 in Jira"},fields:{type:"fields",elements:[]}},expanded:{layout_type:"expanded",title:{text:"Spacecraft Design Specification"},subtitle:{text:"Issue SP-943 in Jira"},hover_subtitle:{text:""},fields:{type:"fields",elements:[{type:"field",label:"Description",field_type:"text",long:!0,text:"Draft the primary technical requirements for the spacecraft, including propulsion type, payload..."},{type:"field",label:"Type",field_type:"rich_text",rich_text:{type:"rich_text",block_id:"blockid",elements:[{type:"rich_text_section",elements:[{type:"emoji",name:"check",display_url:"/img/checkbox_selected@2x.png",url:"/img/checkbox_selected@2x.png"},{type:"text",text:" "},{type:"text",text:"Task"}]}]}},{type:"field",label:"Priority",field_type:"rich_text",rich_text:{type:"rich_text",block_id:"blockid",elements:[{type:"rich_text_section",elements:[{type:"emoji",name:"priority",display_url:"/img/work-objects/priority.svg",url:"/img/work-objects/priority.svg"},{type:"text",text:" "},{type:"text",text:"Medium"}]}]}},{type:"field",label:"Assignee",field_type:"text",text:"Megan"}]}}},auth_provider_key:"dummy_auth_provider_key"},G={work_object_type:"external",external_url:"http://example.com",entity_id:"W:A012XDE27GB:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:P.YU,app_name:"Asana",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"document",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Meeting request: engage PMs + Jon D, RFM strategy"},subtitle:{text:"Open task"},fields:{type:"fields",elements:[]}},expanded:{layout_type:"expanded",title:{text:"Meeting request: engage PMs + Jon D, RFM strategy"},subtitle:{text:"Open task"},hover_subtitle:{text:""},fields:{type:"fields",elements:[{type:"field",label:"Description",field_type:"text",long:!0,text:"Set up meeting with Engage PMs (myself, @Court Morrison @Riley O\u2019Neill @Stefanos @Alex Lee) + Jon to discuss..."},{type:"field",label:"Status",field_type:"tag",tag:[{text:"Completed",color:"grass"}]},{type:"field",label:"Due Date",field_type:"timestamp",timestamp:[0x65786a80]},{type:"field",label:"Activity",field_type:"text",text:"3 likes, 4 comments"}]}}},auth_provider_key:"dummy_auth_provider_key"},q={work_object_type:"external",external_url:"http://example.com",entity_id:"W:A012XDE27GB:MDExOlB1bGxSZXF1ZXN0ODg4MDgy",app_id:P.Ny,app_name:"Pagerduty",lookup_function:{function_id:"dummy_function",inputs:{repo:"slack/webapp",id:"293812"}},display_type:"document",ts:0x67e00a2c,layouts:{compact:{layout_type:"compact",title:{text:"Safety Risk Assessment Overdue \u2014 Spacecraft Project"},subtitle:{text:"Incident in PagerDuty"},fields:{type:"fields",elements:[]}},expanded:{layout_type:"expanded",title:{text:"Safety Risk Assessment Overdue \u2014 Spacecraft Project"},subtitle:{text:"Incident in PagerDuty"},hover_subtitle:{text:""},fields:{type:"fields",elements:[{type:"field",label:"Description",field_type:"text",long:!0,text:"The task SP-498: Safety Risk Assessment is currently overdue. This assessment is critical for identifying and mitigating design...."},{type:"field",label:"Service",field_type:"text",text:"Safety Oversight"},{type:"field",label:"Due Date",field_type:"timestamp",timestamp:[0x65786a80]},{type:"field",label:"Urgency",field_type:"tag",tag:[{text:"High",color:"flamingo"}]}]}}},auth_provider_key:"dummy_auth_provider_key"};var j=a(0x11952bee7),z=a(0x1244c06f5),K=a(0x133367c12);let $=a.p+"zoe-9579343.png";var Y=a(0x1f78c1883),Q=a.n(Y);let Z=new i.Ay("work_objects_admin"),WorkObjectsUnfurlPreview=({isLoading:e,selectedPreviewType:t,appId:a})=>{let r=a===P.iw?B:a===P.Xg?H:a===P.EO?W:a===P.jU?V:a===P.YU?G:a===P.Ny?q:U,i=(0,n.useMemo)(()=>[r],[r]),l=t===c.R.COMPACT?F.S.compact:F.S.expanded,renderMessage=()=>{let e=Z.t("Zoe Maxwell"),t=Z.rt("Can someone please take a look at this <a>task</a>?",{},({key:e,text:t})=>n.createElement("a",{key:e,"aria-disabled":"true"},t)).props?.children;return n.createElement(K.A,{name:e,message:t,avatar:$})};renderMessage.displayName="renderMessage";let renderContent=()=>n.createElement(n.Fragment,null,renderMessage(),t!==c.R.NO_UNFURL?n.createElement("div",{className:Q().unfurlPreviewContainer},n.createElement(z.n,{workObjects:i},[r].map(e=>e?n.createElement(j.b,{ts:"1742937492.206429",key:`work-object-entity ${e.entity_id}`,workObject:e,isInteractive:!1,size:l}):null))):null);return renderContent.displayName="renderContent",n.createElement(n.Fragment,null,n.createElement("div",{className:Q().container},e?n.createElement("div",{className:Q().loading},n.createElement(D.A,{size:"medium"})):renderContent()),t!==c.R.NO_UNFURL?n.createElement("div",{className:Q().exampleSampleData},Z.t("This is just an example \u2014 no real data here!")):null)};WorkObjectsUnfurlPreview.displayName="WorkObjectsUnfurlPreview";var J=a(0x20e77676b);let X=new i.Ay("work_objects_admin"),ee="match-global-setting",ErrorAlert=()=>n.createElement(I.Ay,{className:"margin_bottom_100",level:"error"},X.t("Unable to save setting. Try again later.")),PreviewTypeOption=e=>n.createElement(w.A,{size:"small",key:e.value,primaryContent:e.label,secondaryContent:e.description,className:`display_flex align_items_baseline flex_direction_column normal_wrap ${Q().listOption}`}),GlobalMatchSelector=({currentTeamName:e,globalSettingSelectorLabel:t,appName:a,isGlobalMatchSelected:r,onMatchGlobalSelectionChange:i})=>n.createElement(M.A,{isRequired:!0},n.createElement(T.A,{text:`Match ${e} setting: ${t}`,htmlFor:"global-level-setting",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"global-level-setting",name:"global-level-setting",value:ee,checked:r,onChange:i})),n.createElement(T.A,{text:`Customize for ${a}`,htmlFor:"app-level-setting",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"app-level-setting",name:"app-level-setting",value:"app-level-etting",checked:!r,onChange:i}))),WorkObjectsAdminSetting=({globalPreviewLayout:e,selectedPreviewType:t,onPreviewTypeSelected:a,isTeamsite:r=!1,isDisabled:i,showError:o,appId:s,isSlackConnectSetting:d,onGlobalMatchSelected:m,isGlobalMatchSelected:p=!0})=>{let{slackConnectStrings:h}=useSlackConnectStrings(),[_,f]=(0,n.useState)(!1),{currentTopLevelTeam:g,currentTeam:y,currentTeamName:A,teamId:x,isOnOrgDash:E}=useTeamInfo(),C=(0,b.d4)(e=>s?(0,L.jH)(e,s):null),k=!!s,v=`/manage/${g?.id}/integrations/installed`,S=`https://app.${(0,u.S5)(y)}/apps-manage/${x}/integrations/installed`,I=X.t("Detailed preview (recommended)"),w=X.t("Show icon, name, description, and all provided fields"),N=X.t("Show icon, name and description only"),M=X.t("No preview"),P=(0,n.useMemo)(()=>[{value:c.R.RICH,label:d?h.detailedPreview.stateLabel:I,description:d?h.detailedPreview.description:w},{value:c.R.COMPACT,label:X.t("Compact preview"),description:d?h.compactPreview.description:N},k||d?{value:c.R.NO_UNFURL,label:X.t("No preview"),description:d?h.noPreview.description:M}:void 0].filter(e=>void 0!==e),[d,h.detailedPreview.stateLabel,h.detailedPreview.description,h.compactPreview.description,h.noPreview.description,I,w,N,k,M]),O=(0,n.useMemo)(()=>[{id:"hint",message:X.rt("You can customize this setting by app in <link>Installed Apps</link> \u2192 App Settings. Note that only some apps support the new preview types.",null,({key:e,text:t})=>n.createElement(l.A,{key:e,href:E?v:S},t))}],[E,v,S]),D=(0,n.useMemo)(()=>P.find(e=>e.value===t),[P,t]),F=(0,n.useCallback)(({value:e})=>{f(!0),setTimeout(()=>{a(e),f(!1)},300)},[a]),U=(0,n.useCallback)(e=>{"function"==typeof m&&m(e.target.value===ee)},[m]),B=e===c.R.RICH?h.detailedPreview.stateLabel:X.t("Compact preview"),H=X.t("Work object previews let members see key information from some connected apps like Jira, Google Drive and more \u2014 no extra click required."),W=n.createElement(J.A,{articleId:0x53d1c2fb60,className:Q().link},X.t("Learn more")),V=n.createElement(n.Fragment,null,H," ",W),G=n.createElement(T.A,{"data-qa":"unfurl-preview-type-label",htmlFor:"unfurl-preview-type-selection",text:X.t("Preview Settings"),"aria-label":X.t("Preview Settings"),subtext:V},k&&n.createElement(GlobalMatchSelector,{currentTeamName:A,globalSettingSelectorLabel:B,appName:C,isGlobalMatchSelected:p,onMatchGlobalSelectionChange:U}),(!p||r)&&n.createElement(R.Ay,{options:P,includePadding:!0,dynamicHeight:!0,forceMaxHeight:!0,width:r?"270px":"100",onOptionSelected:F,selectedOption:D,selectId:"unfurl-preview-type-selection","data-qa":"unfurl-preview-type-selection",renderOption:PreviewTypeOption,isDisabled:i,hints:s?void 0:O,maxListHeight:r?d?370:160:d?235:k?170:115}));return n.createElement(n.Fragment,null,o&&n.createElement(ErrorAlert,null),G,n.createElement("div",null,n.createElement("div",{className:Q().exampleText,"data-testid":"example-text"},X.t("Here\u2019s an example:")),n.createElement(WorkObjectsUnfurlPreview,{isLoading:_,selectedPreviewType:t,appId:s}),n.createElement("div",{className:Q().dwaContainer},n.createElement(WorkObjectsAdminPreviewDWAInfo,{appId:s}))))};WorkObjectsAdminSetting.displayName="WorkObjectsAdminSetting";var et=a(0x20e80190e);let ea=new i.Ay("work_objects_admin"),WorkObjectsAdminSettingModal=({appId:e,isSlackConnectSetting:t})=>{let a=(0,r.wA)(),{selectedPreviewType:i,onPreviewTypeSelected:l,showError:o,isSaving:s,onSave:c,globalLevelPreviewLayout:d,isGlobalMatchSelected:m,onGlobalMatchSelected:u}=useWorkObjectPreview({appId:e,isSlackConnectSetting:t}),p=(0,n.useCallback)(()=>{a((0,A.O)())},[a]);return n.createElement(et.dW,{closeModal:p,centered:!0,maxWidth:600},n.createElement(et.rQ,null,n.createElement(et.Rc,{title:ea.t("Work object previews")})),n.createElement(et.$m,null,n.createElement(et.qf,null,n.createElement(WorkObjectsAdminSetting,{globalPreviewLayout:d,selectedPreviewType:i,onPreviewTypeSelected:l,appId:e,showError:o,isGlobalMatchSelected:m,onGlobalMatchSelected:u,isSlackConnectSetting:t}))),n.createElement(et.jl,null,n.createElement(et.ox,null,n.createElement(et.s_,{type:"outline","aria-label":ea.t("Cancel")},ea.t("Cancel")),n.createElement(S.A,{type:"primary",loading:s,onClick:c,"aria-label":ea.t("Save")},ea.t("Save")))))};WorkObjectsAdminSettingModal.displayName="WorkObjectsAdminSettingModal";var en=a(0x9ccb753f),er=a(0x4433d67f),ei=a(0x751c205d),el=a.n(ei);let eo=new i.Ay("work_objects_admin"),WorkObjectUnfurlPreviewSettings=({isSlackConnectSetting:e,appId:t,appName:a})=>{let i=(0,r.wA)(),{currentTopLevelTeam:d}=useTeamInfo(),{appLevelPreviewLayout:m,globalLevelPreviewLayout:u,isAppLevelSetting:p,isAppLevelSettingCustomized:h,slackConnectLevelPreviewLayout:_}=useWorkObjectPreview({appId:t,isSlackConnectSetting:e}),[f,b]=(0,n.useState)(void 0);(0,n.useEffect)(()=>{(async()=>{try{let e=await i((0,en.f)({richLinkPreviewTypes:["all_details","limited_details","no_preview"],reason:"fetching-to-display-overrides"}));b(e)}catch{b(void 0)}})()},[i]);let g=!p&&!e,{slackConnectStrings:y}=useSlackConnectStrings(),A=a||"",x=`/manage/${d?.id}/integrations/installed`,E=eo.t("CUSTOMIZED"),C=eo.t("Members will see a preview showing icon, name, description and all provided fields."),k=eo.rt("Members will see a preview from {nameOfApp} showing icon, name, description and all provided fields",{nameOfApp:A}),v=eo.t("Detailed preview (recommended)"),S=eo.t("Members will see a preview showing icon, name and description only."),I=eo.rt("Members will see a preview from {nameOfApp} showing icon, name and description only",{nameOfApp:A}),w=eo.t("Compact preview"),T=eo.t("No preview"),N=eo.rt("Members will not see any previews for links from {nameOfApp}",{nameOfApp:A}),M=e&&_===c.R.NO_UNFURL||p&&m===c.R.NO_UNFURL,R=p&&(m===c.R.COMPACT||null===m&&u===c.R.COMPACT),P=g&&u===c.R.COMPACT,L=e&&_===c.R.COMPACT,O=!M&&(R||L||P),D=C,F=v;M||O||(e&&(F=y.detailedPreview.stateLabel,D=y.detailedPreview.description),p&&(h||(F=y.detailedPreview.stateLabel),D=k)),O&&(F=w,D=p?I:e?y.compactPreview.description:S),M&&(p&&(D=N),e&&(D=y.noPreview.description),F=T);let[U]=(0,er.A)(()=>({element:n.createElement(WorkObjectsAdminSettingModal,{isSlackConnectSetting:e,appId:t})})),B=(0,n.useMemo)(()=>({type:"button",editOnly:!0,editButtonText:eo.t("Edit"),onEdit:U}),[U]),H=eo.rt("You can customize this setting for individual apps by going to <link>Installed Apps</link> \u2192 App Settings.",null,({key:e,text:t})=>n.createElement(l.A,{key:e,href:x},t)),W=f?.configs.length||0,V=(0,n.useMemo)(()=>{let e={color:"var(--dt_color-content-hgl-1)",textDecoration:"none"},t=eo.rt("<strong>{number}</strong> apps have custom settings. <link>View installed apps</link>.",{number:W},({key:t,text:a,tag:r})=>"link"===r?n.createElement(l.A,{key:t,href:x,style:e},a):"strong"===r?n.createElement("strong",{key:t},a):a);return[n.createElement("div",{key:"description-alert",className:"display_flex"},n.createElement("div",{className:"padding_right_50"},n.createElement(o.Ah,{name:"info",inline:!0,size:"20"})),n.createElement("div",{className:el().alertFont},t))]},[x,W]);return n.createElement(s.A,{label:eo.t("Work object previews"),description:D,descriptionAlerts:g?V:void 0,state:F,type:"button",control:B,readonly:!1,readonlyText:eo.t("Org Owners"),readonlyTooltip:eo.t("Only Org Owners can edit this setting"),readonlyIconType:"lock-o",customizableCallout:g?eo.t("CUSTOMIZABLE"):void 0,customizableCalloutTooltip:g?H:void 0,customized:h?E:void 0})};WorkObjectUnfurlPreviewSettings.displayName="WorkObjectUnfurlPreviewSettings"},0x5dded68:(e,t,a)=>{"use strict";a.d(t,{M:()=>n});let n={MyAgents:"my-agents",AgentExchange:"agent-exchange",AgentActivity:"agent-activity"}},0x20d613de9:(e,t,a)=>{"use strict";a.d(t,{Z:()=>AgentListItem});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x22b8621cf),c=a(0x11c86845f),d=a(0x32d3ef3d),m=a(0xfa28400d),u=a(0x9798b7f),p=a(0x7729d35b),h=a(0x11243fb75),_=a(0x1fd3f6e20),f=a(0x1fdec3e16),b=a(0x130c2e810),g=a(0x9b29cfd8),y=a(0x99233ecb),A=a(0x2501a2cee),x=a(0x217a7a62d),E=a(0x1a02c72b5),C=a(0xd6a16321),k=a(0x190a9df19),v=a(0x226892387),S=a(0x1ed65ccda),I=a(0x4cd7b414),w=a(0x40564d24),T=a.n(w);let N=new o.Ay("agents"),M=n.createElement("div",{className:T().menuItemContent},"Manage Agent Settings",n.createElement("div",{className:T().menuIcon},n.createElement(A.Ah,{name:"settings",inline:!0,size:"16"}))),ManageAgentsMenu=({botUserId:e,agentId:t,agentStatus:a,isSFOrgConnected:i=!0,isDisabled:l=!1})=>{let o=(0,r.wA)(),c=(0,v.d4)(k.PY),d=(0,v.d4)(k.h3),m=(0,v.d4)(e=>(0,x.VZ)(e,"access",t??"")),u=(0,n.useCallback)(async(t,a)=>{a?.(t);let{id:n}=await o((0,I.Z)({memberId:e,shouldNavigateToChannel:!0}))||{};o((0,S.T)({channelId:n,isSplitView:!1}))},[e,o]),p=(0,n.useCallback)(async(t,a)=>{a?.(t),o((0,E.o)((0,C.Fo)({memberId:e})))},[e,o]),h=(0,n.useCallback)(e=>{let{onTriggerClose:r}=e;return n.createElement(y.Ay,null,n.createElement(y.Dr,{label:"Message Agent",onSelected:e=>u(e,r),disabled:"active"!==a||!i}),n.createElement(y.Dr,{label:"View Agent Profile",onSelected:e=>p(e,r)}),(d||c)&&t&&n.createElement(y.Dr,{label:M,href:m,showLinkIndicatorIcon:!1,disabled:!i}))},[t,a,u,p,i,d,c,m]);return n.createElement(s.A,{renderMenu:h,svgIconProps:{name:"ellipsis-vertical-filled"},"aria-label":"More actions",isMenuTrigger:!0,buttonSize:"small",autoClogProps:{elementName:"btn_more_actions",onClick:{enableClogAction:!0}},tooltipLabel:N.t("More actions"),isDisabled:l})};ManageAgentsMenu.displayName="ManageAgentsMenu";var R=a(0x1b9d5cc0c),P=a(0x1a769a9e8),L=a(0xe684f705),O=a(0x8ed8ca46),D=a(0x87843311),F=a.n(D);let U=new o.Ay("agents"),B=d.w.enabled,H=d.S.expanded,AgentListItem=({botUserId:e,containerClass:t,hideActionBar:a,onClick:i,isFirstItem:o,isLastItem:d,withBorder:y=!0,shouldShowOrgName:A=!1,shouldShowExpandedActionBar:x=!1})=>{let k=(0,r.wA)(),S=(0,v.d4)(t=>(0,b.O8)(t,e)),I=(0,v.d4)(e=>(0,O.h7)(e,S?.legacy_app?.agentforce?.salesforce_org_id||"")),w=(0,v.d4)(t=>(0,L.nv)(t,e)),T=(0,R.wg)(w),N=(0,v.d4)(e=>(0,O.gD)(e,S?.legacy_app?.agentforce?.salesforce_org_id)),M=!!(S?.legacy_app?.agentforce?.salesforce_bot_id&&N),D=(0,P.A)(S?.profile,512),W="middle";o&&(W="first"),d&&(W="last"),o&&d&&(W="single");let V=(0,n.useCallback)(()=>{k((0,E.o)((0,C.Fo)({memberId:e||""})))},[e,k]),G=(0,n.useCallback)(()=>{if(!M)return;let e=`${N}/AiCopilot/copilotStudio.app#/copilot/builder?copilotId=${S?.legacy_app?.agentforce.salesforce_bot_id}`;window.open(e,"_blank")},[S?.legacy_app?.agentforce,N,M]),getRedirectButtonLabel=()=>M?U.t("Open in Salesforce Agent Builder"):U.t("Salesforce org is not available"),q=(0,n.useMemo)(()=>a||x?null:n.createElement("div",{className:F().actionbarContainer},n.createElement(c.A,null,n.createElement(s.A,{"aria-label":U.t("Open profile for {name}",{name:(0,R.wg)(w)||"agent",fallbackHash:"b98795a246f09961ab85071a7f50013203007e9f",fallbackHashNs:"menu"}),svgIconProps:{name:"info"},tooltipLabel:U.t("Open profile",{fallbackHash:"b98795a246f09961ab85071a7f50013203007e9f",fallbackHashNs:"menu"}),tooltipPosition:"top",onClick:V,buttonSize:"small"}))),[a,V,x,w]),j=(0,n.useMemo)(()=>n.createElement("div",{className:"display_flex align_items_center"},n.createElement("span",{className:"margin_left_25 margin_right_25"},T),n.createElement(_.v,{isMicro:!0,style:_.u.Gray},n.createElement(f.A,{lines:1},U.t("UNAVAILABLE")))),[T]);return n.createElement(h.A,{id:e,"aria-label":T,manageTabIndex:!1},n.createElement(m.Ay,{entityState:B,isFullHeight:!0,isFullWidth:!0,isRemovable:!1,onClick:i||void 0,isInteractive:!!i,renderedInListVariant:W,size:H,actionsBar:q,withBorder:y},n.createElement("div",{className:l()(F().agentContainer,t)},n.createElement(p.A,{entityState:B,suppressDefaultColors:!0},n.createElement("div",{className:F().iconContainer},n.createElement("img",{className:F().icon,src:D,alt:""}))),n.createElement(u.A,{entityState:B,primaryLabel:M&&(0,g.KI)(S?.legacy_app?.agentforce?.status)?T:j,secondaryLabel:A?I:S?.legacy_app?.assistant_description,size:H}),x&&!a&&n.createElement("div",{className:F().expandedActionBarContainer},n.createElement(s.A,{key:"redirect","aria-label":getRedirectButtonLabel(),svgIconProps:{name:"new-window"},isDisabled:!M,onClick:G,buttonSize:"small",tooltipLabel:getRedirectButtonLabel(),autoClogProps:{elementName:"btn_sf_redirect",onClick:{enableClogAction:!0}}}),n.createElement(ManageAgentsMenu,{botUserId:e,agentId:S?.id,agentStatus:S?.legacy_app?.agentforce.status,isSFOrgConnected:M})))))};AgentListItem.displayName="AgentListItem"},0x19d70ce89:(e,t,a)=>{"use strict";a.r(t),a.d(t,{AgentforceTabRailCoachmark:()=>AgentforceTabRailCoachmark});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb90de824),l=a(0x13953efe6),o=a(0x3989021c),s=a(0x218842a12),c=a(0x5b1935a6);let d=new r.Ay("ai_apps"),m=s.g.AGENTFORCE_TAB_RAIL_COACHMARK,AgentforceTabRailCoachmark=({children:e})=>{let{isOpen:t,closeCoachmark:a}=(0,o.A)(m,c.xu.IN_PRODUCT_COACHMARK),r=(0,n.useCallback)(()=>{a()},[a]),s=d.t("AI agents are here to help"),u=d.t("See which tasks AI agents can take off your plate, so you can use the extra time for focus, creativity, a cup of coffee \u2014 the things that make humans shine."),p=(0,n.useMemo)(()=>n.createElement(i.Ay,{isOpen:t,title:s,bodyText:u,closeCoachmark:r}),[t,s,u,r]);return n.createElement(l.Ay,{coachmarkElement:p,orientation:"right"},e)};AgentforceTabRailCoachmark.displayName="AgentforceTabRailCoachmark"},0x1c8a8c1b6:(e,t,a)=>{"use strict";a.d(t,{o:()=>AgentDmView});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0xb77a689a),s=a(0x134e233cc),c=a(0x23619f41c),d=a(0x32d3ef3d),m=a(0xfa28400d),u=a(0x9798b7f),p=a(0x1fdec3e16),h=a(0x130c2e810),_=a(0x9b29cfd8),f=a(0x217a7a62d),b=a(0x6e465d95),g=a(0x18c2d4c6f),y=a(0x19f91e278),A=a(0x7434bb33),x=a(0x1e58a28f4),E=a(0x1b9d5cc0c),C=a(0x82980ab8),k=a(0x242503693),v=a(0x1ec68d6a3),S=a(0xb04c4a12),I=a(0x1cfcdb1db),w=a(0x226892387),T=a(0x216a87ae3),N=a(0x20c81ddcb),M=a(0x1916a2d4a),R=a(0x11e937aa8),P=a.n(R);let BaseAgentDmView=({channelId:e,onMessageSent:t,hideInput:a,promptsClassName:i,agentPromptMessageSourceType:g,className:R})=>{let L=(0,r.wA)(),O=(0,w.d4)(t=>(0,h.Qn)(t,e)),D=(0,w.d4)(t=>(0,h.rV)(t,e)),F=(0,w.d4)(e=>(0,f.Cq)(e,D?.app_id)),U=(0,w.d4)(t=>(0,N.Gd)(t,e)),B=D?.legacy_app?.assistant_description,H=O?(0,E.c2)(O):void 0,W=(0,C.wg)(O),V=(0,n.useMemo)(()=>n.createElement(c.A,{ariaHidden:!0,size:128,image:H??void 0}),[H]),{transitionFocusTo:G}=(0,n.useContext)(s.Ay),q=(0,w.d4)(t=>(0,T.YE)(t,e)),j=(0,w.d4)(M.ZU),z=(0,w.d4)(e=>(0,N.HE)(e,D));(0,n.useEffect)(()=>{G({focusKey:k.Ay.MESSAGE_PANE_MESSAGE_INPUT,focusMetadata:{id:e},forceFocus:!0})},[e,G]);let K=(0,n.useCallback)(async a=>{try{if(e){let n={};q&&(n.agent_related_message=q);let r=await L((0,I.Ay)({channelId:e,delta:new x.Ru().insert(a),agentMessageSourceType:g,xArgs:n}));if(!r||(0,o.A)(r))return;let i="ts"in r?r.ts:void 0;t?.(i)}}catch(e){(0,v.Ay)({label:"AGENT-DM-VIEW"}).error(e instanceof Error?e:Error(String(e)),void 0,{subtype:"agent-dm-view-ask-prompt"})}},[g,e,L,q,t]),$=(0,n.useCallback)(e=>()=>{K(e.message)},[K]),Y=(0,n.useCallback)(e=>{let a=e&&!(0,o.A)(e)?e.ts:void 0;t?.(a)},[t]),Q=j&&!!z&&!(0,_.KI)(z),Z=F||Q,J=(0,n.useCallback)(()=>a||Q?null:F?n.createElement(y.c,{viewContext:S.Y.AGENT_DM_CONVERSATION}):n.createElement("div",{className:P().messageInput},n.createElement(A.A,{channelId:e,onMessageSent:Y})),[e,a,Q,F,Y]);return n.createElement("div",{className:l()(P().dmView,R)},n.createElement("div",{className:P().hero},V,n.createElement("div",{className:P().heroHeader},n.createElement("h2",null,n.createElement(p.A,{lines:1},W)),n.createElement(b.A,{isAgentforce:!0,className:P().heroBadge})),n.createElement("p",{className:P().heroDescription},B)),Z?null:n.createElement("div",{className:l()(P().prompts,i),role:"group","aria-label":"prompts"},U.prompts.slice(0,4).map(e=>n.createElement("div",{key:e.title,className:P().promptWrapper},n.createElement(m.Ay,{size:d.S.expanded,entityState:"enabled",isFullHeight:!0,isFullWidth:!0,isRemovable:!1,onClick:$(e)},n.createElement("div",{className:P().prompt},n.createElement(u.A,{primaryLabel:e.title,primaryTruncateLines:2,secondaryTruncateLines:2,entityState:d.w.enabled,size:d.S.expanded})))))),J())};BaseAgentDmView.displayName="BaseAgentDmView";let AgentDmView=({channelId:e,onMessageSent:t,hideInput:a,promptsClassName:r,agentPromptMessageSourceType:i,className:l})=>n.createElement(g.A,{subtype:"agent-dm-view"},n.createElement(BaseAgentDmView,{channelId:e,onMessageSent:t,hideInput:a,promptsClassName:r,agentPromptMessageSourceType:i,className:l}));AgentDmView.displayName="AgentDmView"},0x952b3186:(e,t,a)=>{"use strict";a.d(t,{l:()=>AgentMessageFeedbackIcon});var n=a(0xbad225b5),r=a(0x2501a2cee),i=a(0xe1dd52e6),l=a.n(i);let o={up:{selected:"thumbs-up-filled",unselected:"thumbs-up"},down:{selected:"thumbs-down-filled",unselected:"thumbs-down"}},AgentMessageFeedbackIcon=({isActive:e,type:t,isContextMenu:a=!1})=>{let i=o[t][e?"selected":"unselected"];return a?n.createElement(r.Ah,{name:i}):n.createElement("span",{className:e?l().agentMessageFooterIconSelected:void 0},n.createElement(r.Ah,{name:i}))};AgentMessageFeedbackIcon.displayName="AgentMessageFeedbackIcon"},0x45e185be:(e,t,a)=>{"use strict";a.d(t,{$:()=>w});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0xd61e2baa),s=a(0x10b5318b2),c=a(0x1faa3f1ac),d=a(0x2501a2cee),m=a(0x198b6c13e),u=a(0x1ad2b0609),p=a(0x20e80190e),h=a(0x226892387),_=a(0x181e01ee6),f=a(0x30a6a4f3),b=a(0x21d6ed371),g=a(0x1ec68d6a3),y=a(0x11c82607b),A=a(0xd93ecf94);let x=(0,y.Ay)("send feedback for Agentforce response and call api sfdc.agentforce.feedback",(e,t,{isGood:a,appId:n,channelId:r,ts:i,feedbackType:l,feedbackText:o,reason:s})=>{let c=t();if(!r)return;let d=(0,A.Ld)(c,r,i);e((0,f.N)({isGood:a,appId:n,channelId:r,ts:i,feedbackType:l,feedbackText:o,isEphemeral:d?(0,b.aw)(d):void 0,reason:s})).catch(e=>{(0,g.Ay)({label:"SFDC-AGENTFORCE-FEEDBACK-FETCHER"}).error(e,void 0,{subtype:"sfdc.agentforce.feedback"})})});x.meta={name:"sendAgentforceFeedbackByApi",key:"createThunkSendAgentforceFeedbackByApi",description:"send feedback for Agentforce response and call api sfdc.agentforce.feedback"};var E=a(0x1fcbb004d),C=a(0x277d3dda),k=a.n(C);let v=new i.Ay("agents"),S={},AgentMessageFeedbackModal=({appId:e,channelId:t,ts:a,isGood:i=!1})=>{let f=(0,r.wA)(),b=(0,h.d4)(u.J),g=(0,n.useCallback)(async()=>{await f(x({isGood:i,appId:e,ts:a,channelId:t,feedbackType:"good_bad",reason:"message_action"})),f((0,E.O)())},[e,t,f,i,a]),y=(0,n.useCallback)(async n=>{await f(x({isGood:i,appId:e,ts:a,channelId:t,feedbackText:n.comments,feedbackType:"good_bad",reason:"message_action"})),f((0,_.Wq)({ts:a,isGood:i})),f((0,E.O)())},[e,t,f,i,a]),A=(0,n.useCallback)(()=>f((0,m.A)({ts:a,channelId:t})),[t,f,a]);return n.createElement(p.dW,{closeModal:g,showCloseButton:!0,centered:!0},n.createElement(s.A,{initialValues:S,onSubmit:y},({isSubmitting:e})=>n.createElement(n.Fragment,null,n.createElement(p.rQ,null,n.createElement(p.Rc,{title:v.t("Agentforce Feedback")})),n.createElement(p.$m,null,n.createElement(p.qf,{className:"margin_bottom_150"},v.t("Thanks for letting us know! Your feedback helps us improve Agentforce for everyone.")),n.createElement(p.qf,null,n.createElement(o.A,{name:"comments",id:"comments",className:k().comments,labelText:v.t("Anything else you want to add?"),optional:!0,maxLength:3e3,placeholder:v.t("Please provide details or suggest improvements")}))),n.createElement(p.jl,null,b&&n.createElement(c.A,{"data-qa":"report_to_slack_flag_dialog",onClick:A},v.t("Report to Slack"),n.createElement("span",{className:"p-flag_dialog__open_link_icon"},n.createElement(d.Ah,{inline:!0,name:"new-window"}))),n.createElement(p.ox,null,n.createElement(l.$n,{onClick:g,type:"outline"},v.t("Cancel",{fallbackHash:"77dfd2135f4db726c47299bb55be26f7f4525a46"})),n.createElement(l.lV,{htmlType:"submit",loading:e,disabled:e,"aria-label":v.t("Submit")},v.t("Submit")))))))};AgentMessageFeedbackModal.displayName="AgentMessageFeedbackModal";var I=a(0x46dbff89);let w=(0,y.Ay)("Open the Agent message feedback modal",(e,t,a)=>{e((0,I.q)({element:n.createElement(AgentMessageFeedbackModal,a)}))});w.meta={name:"openAgentMessageFeedbackModal",key:"createThunkOpenAgentMessageFeedbackModal",description:"Open the Agent message feedback modal"}},0x149260c3f:(e,t,a)=>{"use strict";a.d(t,{p:()=>AgentHomeTitleRow});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2162236ad),o=a(0x52bf7626),s=a(0x226892387),c=a(0xd93ecf94),d=a(0x1a5abe5cf),m=a.n(d);let AgentHomeTitleRow=({channelId:e,threadTs:t,activeConversation:a})=>{let r=(0,s.d4)(a=>e&&t?(0,c.Ld)(a,e,t):void 0),d=(0,s.d4)(e=>r?(0,l.A)(e,r.blocks):void 0);if(!r||!d)return null;let u=r.assistant_app_thread?.title,p=(0,o.A)(d.ops)??r.text;return u&&p?n.createElement("h4",{className:i()(m().titleRow,{[m().titleRowActiveConversation]:a})},u||p):null};AgentHomeTitleRow.displayName="AgentHomeTitleRow"},0x4315909c:(e,t,a)=>{"use strict";a.d(t,{T:()=>AgentHomeViewMessageInput});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x17478cdb7),s=a(0x20b4dda68),c=a(0x20482ad21),d=a(0x130c2e810),m=a(0x9b29cfd8),u=a(0x217a7a62d),p=a(0x1e9bed83a),h=a(0x19f91e278),_=a(0xbc0ac4cf),f=a(0x100c234f2),b=a(0x1d7dd452d),g=a(0x1e58a28f4),y=a(0x1435e8d07),A=a(0xd843ab47),x=a(0x51b81145),E=a(0xa794f9e1),C=a(0x9c7d2aa9),k=a(0x23fb5a202),v=a(0x16b50768c),S=a(0x242503693),I=a(0xb04c4a12),w=a(0x16d4244ae),T=a(0x820ea7f5),N=a(0x2001af3ac),M=a(0x52bf7626),R=a(0x1d8076771),P=a(0x1ccef1c6f),L=a(0x1cfcdb1db),O=a(0xf54147b),D=a(0x226892387),F=a(0x665ca02e),U=a(0x216a87ae3),B=a(0x20c81ddcb),H=a(0x1c321d98a),W=a(0x17bc5d846),V=a(0x22237e33e),G=a(0x1bca44972),q=a(0x1c2eef3c8),j=a(0xaf9d2265),z=a(0x1973dd8ce),K=a(0x1ac92c5a8),$=a(0xc53c0105),Y=a(0x1916a2d4a),Q=a(0x1bdc67917),Z=a(0xe1e441e4),J=a(0x19895585a);let X=new c.Ay("agent_home"),AgentHomeViewMessageInput=({channelId:e,threadTs:t,onMessageSent:a,onMessageDraftSending:i,onMessageInputUpArrow:c,editLastMessage:ee,agentMessageSourceType:et,customClientContext:ea,placeholder:en,className:er,shouldAutofocus:ei=!0})=>{let el=(0,r.wA)(),eo=(0,n.useContext)(A.A),es=(0,D.d4)(t=>(0,d.rV)(t,e)),ec=(0,D.d4)(e=>(0,B.HE)(e,es)),ed=(0,D.d4)(e=>(0,u.Cq)(e,es?.app_id)),em=(0,D.d4)(Y.ZU),[eu,ep]=(0,n.useState)(""),[eh,e_]=(0,n.useState)(0),ef=(0,D.d4)(t=>(0,U.YE)(t,e)),eb=(0,n.useRef)(),eg=(0,D.d4)(a=>(0,C.A)(a,e,t)||(0,z.Q)({channelId:e,threadTs:t})),ey=(0,D.d4)(e=>(0,q.YI)(e,eg)),eA=(0,D.d4)(e=>(0,v.A)(e,eg)),ex=(0,D.d4)(e=>(0,W.UQ)(e,{draftId:eg})),eE=(0,D.d4)(e=>(0,P.ty)(e,"show_typing")),eC=(0,D.d4)(a=>(0,u.bh)(a,e,t));(0,n.useEffect)(()=>{i?.(ex)},[ex,i]);let ek=(0,n.useCallback)(t=>!!t?.id&&t.id===e&&(eb.current?.focus(),!0),[e]);(0,x.A)(S.Ay.AGENT_HOME_MESSAGE_INPUT,ek);let ev=(0,n.useCallback)((a,n)=>{ep(a),e_((0,N.A)(new g.Ru(n)));let r=(0,M.A)((0,E._l)(ey));a&&0!==a.indexOf("/")&&(0,o.A)(a).length&&a!==r.trim()?el((0,Z.r)({channelId:e,threadTs:t})):el((0,Q.Q)({channelId:e,threadTs:t}))},[e,el,ey,t]),eS=(0,n.useCallback)(async()=>{let n=eb.current?.getContents(),r=new g.Ru(n?.contents),i=(0,k.A)(ey),l=el((0,G.f)({draftId:eg||(0,z.Q)({channelId:e,threadTs:t}),ops:n?.contents})),o=el((0,V._)({unfurls:l,draftId:eg})),s=el((0,H.G)({draftId:eg||(0,z.Q)({channelId:e})})),c=el((0,K.j)({draftId:eg||(0,z.Q)({channelId:e})})),d=(0,O.A)(ey);if(ef&&(d.agent_related_message=ef),ea&&(d.client_context=ea),ey){let e=(0,T.A)(r);el((0,j.A)({ids:[eg??""],reason:"AgentHomeMessageInput:sendMessage",syncDelete:e,disableGifUnfurlClearing:!0,disableBlockUnfurlClearing:!0}))}eb.current?.clear(),eb.current?.focus();let m=et;m||(m=eo.activeTab===J.k6.Agents?"composer_in_agents_tab":"composer_in_home");let u=await el((0,L.Ay)({channelId:e,delta:r,fileIds:i,unfurls:l,unfurlsWithData:o,contactUnfurls:s,filePermissions:c,replyToTs:t,pendingFileIds:eA,draftId:eg,draftUniqueId:(0,E.EF)(ey),xArgs:d,includeExternalMembersSpeedBump:!0,includeLoginInitiateRedirectLinkWarning:!0,includeThreadMentionWarning:!0,viewContext:I.Y.AGENT_HOME_DM_CONVERSATION,agentMessageSourceType:m}));eb.current?.clearHistory(),el((0,$.jb)({draftIds:[eg]})),el((0,R.O4)({draftIds:[eg]})),el((0,j.A)({ids:[eg||""],syncDelete:!1,reason:"sendAgentMessage"})),a?.(u),el((0,F.WZ)({channelId:e,context:void 0}))},[e,el,ey,eg,ef,t,a,eA,et,ea,eo.activeTab]),eI=(0,n.useMemo)(()=>en||(t?X.t("Reply\u2026"):n.createElement(f.A,{channelId:e||"",inputRef:eb,isSelfDm:!1})),[e,en,t]),ew=(0,n.useMemo)(()=>(0,b.a)({hasFiles:!1,hasTooManyFiles:!1,hasGifUnfurls:!1,isGifPickerEnabled:!1,hasBlockUnfurls:!1,textyValue:eu,textyWysiwygLength:eh}),[eu,eh]);return((0,n.useEffect)(()=>{ei&&eb.current?.focus()},[e,ei]),(0,n.useEffect)(()=>{let t=(0,w.bC)({channelId:e,getInputInstance:()=>eb.current,viewContext:I.Y.AGENT_HOME_DM_CONVERSATION});return()=>{t()}},[e]),eC)?n.createElement(_.A,{channelId:e,threadTs:t,viewContext:I.Y.AGENT_HOME_DM_CONVERSATION}):em&&ec&&!(0,m.KI)(ec)?n.createElement(_.A,{agentStatus:ec,channelId:e,viewContext:I.Y.AGENT_HOME_DM_CONVERSATION}):ed&&"agent_preview_conversation"!==et?n.createElement(h.c,{viewContext:I.Y.AGENT_HOME_DM_CONVERSATION}):n.createElement("div",{className:l()(er,"p-message_pane_input")},n.createElement("div",{className:"p-message_pane_input_inner"},n.createElement(p.A,{className:"p-message_pane_input_inner_main",channelId:e,threadTs:t,viewContext:I.Y.AGENT_HOME_DM_CONVERSATION,placeholder:eI,enableEmojiButton:!0,enableMentionButton:!0,enableComposerButton:!0,enableSendButton:!0,enableStoryButton:!0,enableAudioButton:!0,enableScheduleSendButton:!0,onTextChange:ev,sendMessage:eS,editLastMessage:ee,ref:eb,maxLines:16,maxLength:s.nb,draft:ey,onUpArrow:c,isSendingDisabled:ew}),t?n.createElement("div",{className:"p-thread_footer_typing_indicator"},eE&&n.createElement(y.A,{channelId:e,threadTs:t})):null))};AgentHomeViewMessageInput.displayName="AgentHomeViewMessageInput"},0x1acf63bd0:(e,t,a)=>{"use strict";a.d(t,{v:()=>AgentMessageActionButton});var n=a(0xbad225b5),r=a(0x4c96e5d9),i=a(0x1d8f0e558);let AgentMessageActionButton=e=>e.isDisabled?n.createElement(r.Ay,{tip:e.label,position:"top"},n.createElement("span",null,n.createElement(i.A,{...e,hideTooltip:!0}))):n.createElement(i.A,e);AgentMessageActionButton.displayName="AgentMessageActionButton"},0x217a7a62d:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>H,Cq:()=>L,Fg:()=>W,HM:()=>D,Kh:()=>z,Q_:()=>B,Qh:()=>U,Qj:()=>O,VZ:()=>j,ZF:()=>G,Zs:()=>F,_r:()=>q,bh:()=>T,hc:()=>R,nj:()=>P});var n=a(0xc9c97240),r=a(0x130c2e810),i=a(0x9b29cfd8),l=a(0xe8e28706),o=a(0x96dd42eb),s=a(0xb28e7c89),c=a(0x1ecc7f772),d=a(0x1c9a3c4c1),m=a(0x50c6f5ae),u=a(0x1902586d8),p=a(0xa1832ae4),h=a(0xb8504a42),_=a(0x16ed1b0dc),f=a(0x1cf0d97e1),b=a(0x14cb5efef),g=a(0xdf55e8f3),y=a(0x20c81ddcb),A=a(0x233157fdc),x=a(0x19c76d181),E=a(0x217553e42),C=a(0x21491cdb1),k=a(0x14149c126),v=a(0xe684f705),S=a(0xd93ecf94),I=a(0x8ed8ca46),w=a(0x1ee439e69);let T=(0,n.Mz)((e,t,a)=>t&&a?(0,S.Ld)(e,t,a):null,e=>!!e&&e.assistant_app_thread?.context?.is_session_expired),N=(0,g.eI)((e,t)=>{let a=(0,y.Qb)(e).filter(e=>{if(!(0,i.KI)(e.agentforce?.status))return!1;let a=e.agentforce?.salesforce_org_id;return!!a&&(18===a.length&&18===t.length?a.toLowerCase()===t.toLowerCase():a===t)&&e.assistant_topics?.some(e=>"Analytics__SemanticDataAnalysis"===e.plugin)});if(0===a.length)return;let n=a.sort((e,t)=>(e.date_installed??Number.MAX_SAFE_INTEGER)-(t.date_installed??Number.MAX_SAFE_INTEGER))[0];return n?.bot_user_id}),M=(0,g.eI)(e=>{let t=(0,b.R2)(e);if(t)return(0,y.Qb)(e).some(e=>e.bot_user_id===t)?t:void 0}),R=(0,f.Ay)((e,t,a)=>{if("on"!==(0,k._Z)(e,"tableau_workobject_disable_ask_agentforce_menu")&&("on"!==(0,k._Z)(e,"tableau_workobject_disable_agent_viz")||"visualization"!==a)){if("on"===(0,k._Z)(e,"agent_topics_in_profile")&&t){let a=N(e,t);if(a)return a}if("on"!==(0,k._Z)(e,"tableau_workobject_agentforce_ignore_team_pref"))return M(e)}});R.meta={name:"getTableauAgentId",key:"createSelectorGetTableauAgentId",description:(e,t,a)=>{if("on"!==(0,k._Z)(e,"tableau_workobject_disable_ask_agentforce_menu")&&("on"!==(0,k._Z)(e,"tableau_workobject_disable_agent_viz")||"visualization"!==a)){if("on"===(0,k._Z)(e,"agent_topics_in_profile")&&t){let a=N(e,t);if(a)return a}if("on"!==(0,k._Z)(e,"tableau_workobject_agentforce_ignore_team_pref"))return M(e)}}};let P=(0,f.Ay)((e,t)=>{let a=(0,b.wL)(e);if(a)return(0,s.G)(e,t).find(n=>{if(n.data?.appId===a)return!0;if(n.data?.folderBookmarkId){let r=(0,A.Um)(e,{channelId:t,folderBookmarkId:n.data?.folderBookmarkId});if(r?.appId===a)return!0}return!1})});P.meta={name:"getAgentforceChannelExpertFolderTab",key:"createSelectorGetAgentforceChannelExpertFolderTab",description:(e,t)=>{let a=(0,b.wL)(e);if(a)return(0,s.G)(e,t).find(n=>{if(n.data?.appId===a)return!0;if(n.data?.folderBookmarkId){let r=(0,A.Um)(e,{channelId:t,folderBookmarkId:n.data?.folderBookmarkId});if(r?.appId===a)return!0}return!1})}};let L=(0,f.Ay)((e,t)=>!!t&&t===(0,b.wL)(e));L.meta={name:"isAgentforceChannelExpert",key:"createSelectorIsAgentforceChannelExpert",description:(e,t)=>!!t&&t===(0,b.wL)(e)};let O=(0,f.Ay)(e=>{let t=(0,b.N)(e);if(t)return(0,E.o2)(e,t)});O.meta={name:"getAgentforceChannelExpertDmId",key:"createSelectorGetAgentforceChannelExpertDmId",description:e=>{let t=(0,b.N)(e);if(t)return(0,E.o2)(e,t)}};let D=(0,g.ow)(e=>{let t=(0,x.WR)(e),{userManagedProfiles:a,keysList:n}=(0,l.mK)(e).reduce((a,n)=>{let i=(0,r.ls)(e,n.app_id),l=(0,v.Eq)(e,n.app_id),o=l?.id||"";return i?.legacy_app?.owner_ids?.includes(t)&&i?.legacy_app?.agentforce.status!=="deleted"&&!L(e,n.app_id)&&(a.userManagedProfiles.push(i),i.app_id&&a.keysList.push({appId:i.app_id,botUserId:o})),a},{userManagedProfiles:[],keysList:[]});return{userManagedProfiles:a,keysList:n}}),F=(0,g.eI)((e,t)=>t.reduce((t,a)=>{let n=(0,I.h7)(e,a);return n&&(t[a]=n),t},{})),U=(0,g.eI)((e,t)=>{let a=(0,C.j)(e,t);return a?.channel_knowledge_agent}),B=(0,f.Ay)((e,t)=>{let a=U(e,t);return a?.handoff?.channel});B.meta={name:"getChannelExpertHandoffChannelId",key:"createSelectorGetChannelExpertHandoffChannelId",description:(e,t)=>{let a=U(e,t);return a?.handoff?.channel}};let H=(0,g.eI)((e,t)=>t.map(t=>{let a=(0,w._J)(e,t);return{teamId:t,icon:(0,p.Rf)(a),name:(0,p.F1)(a)}},{})),W=(0,g.eI)((e,t)=>t.map(t=>(0,v.Eq)(e,t))),V=(0,g.eI)((e,t)=>{let a=(0,u.xD)(t);return(0,v.gA)(e,a).filter(d.D)}),G=(0,g.eI)((e,t,a)=>{let n=(0,u.xD)(t),r=(0,v.gA)(e,n);return a?.includeSidekicks?r.filter(e=>(0,m.o)(e)||(0,d.D)(e)):r.filter(d.D)});(0,g.eI)((e,t)=>V(e,t)?.[0]);let q=(0,g.eI)((e,t,a,n)=>{if(!t||!a)return;let r=(0,S.Ld)(e,t,a);if(!r)return;let i=[r,...(0,S.oJ)(e,t,{thread_ts:a})],l=(0,o.Q)(e),s={};i.forEach(t=>{G(e,t,{includeSidekicks:l}).forEach(e=>{s[e.id]=e})});let c=Object.values(s);return n?n(c):c});(0,f.Ay)((e,t,a)=>q(e,t,a)?.[0]).meta={name:"getAgentToPrependMessageInComposerFromContextBar",key:"createSelectorGetAgentToPrependMessageInComposerFromContextBar",description:(e,t,a)=>q(e,t,a)?.[0]};let j=(0,f.Ay)((e,t,a)=>{let n=(0,w.H7)(e),r=(0,p.Zl)(n);return(0,h.r7)(n)?`${r}manage/salesforce/agentforce/profile/${a}/${t}`:`https://app.${(0,p.S5)(n)}/apps-manage/${n.id}/integrations/profile/${a}/${t}`});j.meta={name:"getAgentforceDashboardScopesRedirectionUrl",key:"createSelectorGetAgentforceDashboardScopesRedirectionUrl",description:(e,t,a)=>{let n=(0,w.H7)(e),r=(0,p.Zl)(n);return(0,h.r7)(n)?`${r}manage/salesforce/agentforce/profile/${a}/${t}`:`https://app.${(0,p.S5)(n)}/apps-manage/${n.id}/integrations/profile/${a}/${t}`}};let z=(0,f.Ay)((e,t)=>{if(!(0,_.A)(t))return!1;let a=(0,E.OL)(e,t);if(!a)return!1;let n=(0,c.SB)(e,a);return!!(n.includes("support")||n.includes("help")||n.includes("faq")||n.includes("ask"))});z.meta={name:"isChannelExpertAgentCoachmarkEligibleToShowForChannelId",key:"createSelectorIsChannelExpertAgentCoachmarkEligibleToShowForChannelId",description:(e,t)=>{if(!(0,_.A)(t))return!1;let a=(0,E.OL)(e,t);if(!a)return!1;let n=(0,c.SB)(e,a);return!!(n.includes("support")||n.includes("help")||n.includes("faq")||n.includes("ask"))}}},0x131d9874e:(e,t,a)=>{"use strict";a.d(t,{D:()=>useOpenAgentInSplitView});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x665ca02e),l=a(0x1ed65ccda),o=a(0x4cd7b414);let useOpenAgentInSplitView=({agentUserId:e,messageChannelId:t,messageTs:a})=>{let s=(0,r.wA)();return{openAgentInSplitView:(0,n.useCallback)(async n=>{if(n.stopPropagation(),!e)return;let r=await s((0,o.Z)({memberId:e,shouldNavigateToChannel:!1}));if(!r)return;let c=r.id;s((0,l.T)({channelId:c,isSplitView:!0})),t&&a&&s((0,i.WZ)({channelId:c,context:{channel_id:t,message_ts:a}}))},[s,e,t,a])}}},0x11513084e:(e,t,a)=>{"use strict";a.d(t,{JR:()=>mapRtmStateToExplainStatus,QU:()=>getAiExplainStatus,cX:()=>r});var n,r=((n={}).PENDING="pending",n.COMPLETE="complete",n.STREAMING="streaming",n.FAILED="failed",n.NONE="none",n);let mapRtmStateToExplainStatus=e=>{switch(e){case"pending":return"streaming";case"complete":return"complete";case"failed":return"failed";default:return"pending"}},getAiExplainStatus=e=>e?.status??null},0xe253e012:(e,t,a)=>{"use strict";a.d(t,{E:()=>AiProfileSummaryButton});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x2501a2cee),m=a(0x4c96e5d9),u=a(0x1fdec3e16),p=a(0x5eedb646),h=a(0x1039e8d4e),_=a(0x1a02c72b5),f=a(0xd6a16321),b=a(0x1b9d5cc0c),g=a(0x82980ab8),y=a(0x3711e82d),A=a(0x226892387),x=a(0xfbd3d8a1),E=a(0x661db0ba),C=a(0x11c82607b),k=a(0x2125020cf),v=a(0xc376d2ae);let S=(0,C.Ay)("Invokes and fetches an AI profile summary",async(e,t,{userId:a})=>{let n=t();if(!(0,h.NE)(n)||(0,v.EH)(n,a))return;e((0,k.gJ)({status:"pending",userId:a}));let r=await e((0,E.o)({reason:"ai-profile-summary",user:a}));e((0,k.GJ)({requestId:r.request_id,userId:a}))});S.meta={name:"fetchAiProfileSummary",key:"createThunkFetchAiProfileSummary",description:"Invokes and fetches an AI profile summary"};var I=a(0xe684f705),w=a(0x2560a900),T=a.n(w);let N=new s.Ay("team"),M={elementName:p.H.AI_PROFILE_SUMMARY_ACTION,eventId:y.EventId.SEARCH_AI_PROFILE_SUMMARY_CLICK,uiComponentName:y.UiComponentName.SLACK_AI_PROFILE_SUMMARY_CTA,onClick:{enableClogAction:!0}},AiProfileSummaryButton=({className:e,memberId:t,skipNavigation:a,uiComponentVariant:i})=>{let s=(0,r.wA)(),p=(0,A.d4)(e=>(0,I.nv)(e,t)),E=(0,b.XS)(p)||(0,g.wg)(p),C=(0,A.d4)(h.NE),k=(0,A.d4)(h.vH),v=(0,x.M)({userId:t}),w=(0,n.useCallback)(async()=>{await s(S({userId:t})),a||s((0,_.o)((0,f.Fo)({memberId:t})))},[s,t,a]),R=(0,n.useMemo)(()=>k?N.t("A brief summary of this teammate\u2019s recent work and focus areas, created using AI"):"A brief summary of this teammate\u2019s recent work and focus areas, created using AI",[k]),P=(0,n.useMemo)(()=>k?N.t("Only visible to you \xb7 Only uses public messages"):"Only visible to you \xb7 Only uses public messages",[k]),L=(0,n.useMemo)(()=>({...M,uiComponentVariant:i}),[i]);return v&&C?n.createElement(o.A,{clogImpression:!0,eventId:y.EventId.SEARCH_AI_PROFILE_SUMMARY_IMPRESSION,uiComponentName:y.UiComponentName.SLACK_AI_PROFILE_SUMMARY_CTA},n.createElement(m.Ay,{tip:n.createElement(n.Fragment,null,R,n.createElement("span",{className:l()("c-tooltip__subtitle",T().tooltipCaption)},P))},n.createElement(c.Ay,{autoClogProps:L,className:l()(T().cta,e),onClick:w,type:"outline"},n.createElement(d.Ah,{name:"ai-sparkle-filled"}),n.createElement(u.A,{lines:1},k?N.t("Learn more about {displayName}",{displayName:E}):`Learn more about ${E}`)))):null};AiProfileSummaryButton.displayName="AiProfileSummaryButton"},0x1b916e0d8:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xb90de824),o=a(0x13953efe6),s=a(0x2493bd395),c=a(0x8b60780c),d=a(0xd843ab47),m=a(0x3711e82d),u=a(0x226892387),p=a(0x18a17ca8f),h=a(0x19f74d539),_=a(0x1472af90a),f=a(0xf052d367),b=a(0x18632f75a);let g=new i.Ay("ai_workspace_setup"),y={elementType:m.ElementType.COACHMARK,eventId:m.EventId.NEWXP_TEAM_CREATE,elementName:"resources_tab_coachmark"},A=(0,n.memo)(({children:e})=>{let t=(0,r.wA)(),a=(0,u.d4)(p.Et),i=(0,u.d4)(h.CC),{getPrimaryView:m}=(0,n.useContext)(d.A),A=(0,u.d4)(e=>m(e)?.id),x=(0,s.i)(A,!0),E=(0,u.d4)(e=>(0,f.kI)(e,_.G7.AIWorkspaceResourceTabCoachmark,_.X8.Impression));(0,n.useEffect)(()=>{E||t((0,b.b)({interactions:[{component:_.G7.AIWorkspaceResourceTabCoachmark,type:_.X8.Impression}],reason:"ai_workspace_resource_tab_coachmark"}))},[t,E]);let C=(0,n.useCallback)(()=>{t((0,b.z)({component:_.G7.AIWorkspaceResourceTabCoachmark,type:_.X8.Impression,reason:"ai_workspace_resource_tab_coachmark"}))},[t]),k=i?g.t("The resources in this channel are AI generated and visible to everyone who joins the channel. Feel free to personalize it to your team."):"",v=i?g.t("Review your Channel Resources"):"",S=(0,n.useCallback)(()=>{let e=x.find(e=>e.data&&e.data.botUserId);e?.id&&t((0,c.D)({channelId:A,tabId:e?.id})),C()},[A,t,x,C]),I=(0,n.useMemo)(()=>n.createElement(l.Ay,{isOpen:a,arrowPosition:10,autoClogProps:y,bodyText:k,closeCoachmark:C,title:v,width:400,isMegaphoneCoachmark:!1,offsetX:200,offsetY:-10,secondaryCallToActionText:i?g.t("Review Content"):"",onClickSecondaryButton:S}),[a,k,i,C,v,S]);return a&&i?n.createElement(o.Ay,{coachmarkElement:I,orientation:o.YC.BottomRight},e):n.createElement(n.Fragment,null,e)})},0x5ed1effc:(e,t,a)=>{"use strict";a.d(t,{i:()=>useResourceTabCoachmark});var n=a(0xbad225b5),r=a(0x2493bd395),i=a(0x226892387),l=a(0x18a17ca8f),o=a(0x19f74d539);function useResourceTabCoachmark(e){let t=(0,i.d4)(o.CC),a=(0,i.d4)(l.Et),s=(0,r.i)(e,!0);return(0,n.useCallback)(e=>!!t&&!!s.find(t=>t.data&&t.data.botUserId&&t.id===e)&&a,[t,a,s])}},0x937c27d:(e,t,a)=>{"use strict";a.d(t,{DJ:()=>getTableColumnOrder,Df:()=>getDefaultVisibleColumns,FL:()=>getTableColumnSections,Fd:()=>d,K2:()=>c,OP:()=>s,RA:()=>u,TP:()=>_,Tn:()=>h,UA:()=>getColumnCellDefaultSort,aR:()=>f,ez:()=>getTableColumnSectionOrder,hJ:()=>p,jd:()=>m,pb:()=>b,pr:()=>getTableColumnCellType});var n,r=a(0x12f409c9c),i=a(0x11a95884d),l=a(0x42654967),o=a(2575912e3);let s=500,c="id",d=[o.BF.Name],m=o.BF.Name,u=r.Pg.ASC,p={name:"help",size:"inherit"},h=[o.BF.MemberReads,o.BF.ActiveUsers,o.BF.MessagesRead,o.BF.MessagesSent,o.BF.ActionsTaken,o.BF.MemberAutomations,o.BF.AutomationsExecuted,o.BF.MessagesConsumed,o.BF.FilesConsumed,o.BF.MessagesConsumedWeb,o.BF.MessagesConsumedDiscovery,o.BF.MessagesConsumedEvents,o.BF.MessagesConsumedRealTimeSearch,o.BF.MessagesConsumedAdminOversight],_={[l.Ph.Number]:r.nk.right,[l.Ph.Percentage]:r.nk.right,[l.Ph.Date]:r.nk.right,[l.Ph.String]:r.nk.left},getTableColumnCellType=e=>({[o.BF.DateCreated]:l.Ph.Date,[o.BF.DateInstalled]:l.Ph.Date,[o.BF.FirstMessageSentDate]:l.Ph.Date,[o.BF.FirstActiveDate]:l.Ph.Date,[o.BF.FirstAutomationDate]:l.Ph.Date,[o.BF.LastMessageSentDate]:l.Ph.Date,[o.BF.LastActiveDate]:l.Ph.Date,[o.BF.LastAutomationDate]:l.Ph.Date,[o.BF.MemberReads]:l.Ph.Number,[o.BF.ActiveUsers]:l.Ph.Number,[o.BF.MessagesRead]:l.Ph.Number,[o.BF.MessagesSent]:l.Ph.Number,[o.BF.ActionsTaken]:l.Ph.Number,[o.BF.MemberAutomations]:l.Ph.Number,[o.BF.AutomationsExecuted]:l.Ph.Number,[o.BF.MessagesConsumed]:l.Ph.Number,[o.BF.FilesConsumed]:l.Ph.Number,[o.BF.MessagesConsumedWeb]:l.Ph.Number,[o.BF.MessagesConsumedDiscovery]:l.Ph.Number,[o.BF.MessagesConsumedEvents]:l.Ph.Number,[o.BF.MessagesConsumedRealTimeSearch]:l.Ph.Number,[o.BF.MessagesConsumedAdminOversight]:l.Ph.Number})[e]??l.Ph.String,f={[o.BF.Name]:312,[o.BF.Id]:200,[o.BF.Categories]:216,[o.BF.Source]:168,[o.BF.DateCreated]:151,[o.BF.DateInstalled]:151,[o.BF.FirstMessageSentDate]:165,[o.BF.FirstActiveDate]:115,[o.BF.FirstAutomationDate]:154,[o.BF.LastMessageSentDate]:163,[o.BF.LastActiveDate]:113,[o.BF.LastAutomationDate]:152,[o.BF.MemberReads]:211,[o.BF.ActiveUsers]:171,[o.BF.MessagesRead]:151,[o.BF.MessagesSent]:125,[o.BF.ActionsTaken]:120,[o.BF.MemberAutomations]:215,[o.BF.AutomationsExecuted]:171,[o.BF.MessagesConsumed]:180,[o.BF.FilesConsumed]:180,[o.BF.MessagesConsumedWeb]:250,[o.BF.MessagesConsumedDiscovery]:250,[o.BF.MessagesConsumedEvents]:250,[o.BF.MessagesConsumedRealTimeSearch]:300,[o.BF.MessagesConsumedAdminOversight]:300};var b=((n={}).Management="management",n.Activity="activity",n.ActivityAggregated="activity_aggregated",n.ActivityRealTimeAggregated="activity_real_time_aggregated",n);let getTableColumnSectionOrder=({isTeamSite:e,experimentEinst5578GroupOn:t=!1})=>e||!t?["management","activity"]:["management","activity_real_time_aggregated","activity_aggregated"],getTableColumnSections=({isTeamSite:e,experimentEinst5578GroupOn:t=!1})=>!e&&t?{[o.BF.Name]:"management",[o.BF.Id]:"management",[o.BF.Categories]:"management",[o.BF.Source]:"management",[o.BF.FirstMessageSentDate]:"management",[o.BF.FirstActiveDate]:"management",[o.BF.FirstAutomationDate]:"management",[o.BF.LastMessageSentDate]:"management",[o.BF.LastActiveDate]:"management",[o.BF.LastAutomationDate]:"management",[o.BF.MessagesConsumed]:"activity_real_time_aggregated",[o.BF.MessagesConsumedDiscovery]:"activity_real_time_aggregated",[o.BF.MessagesConsumedWeb]:"activity_real_time_aggregated",[o.BF.MessagesConsumedEvents]:"activity_real_time_aggregated",[o.BF.MessagesConsumedRealTimeSearch]:"activity_real_time_aggregated",[o.BF.MessagesConsumedAdminOversight]:"activity_real_time_aggregated",[o.BF.FilesConsumed]:"activity_real_time_aggregated",[o.BF.MemberReads]:"activity_aggregated",[o.BF.ActiveUsers]:"activity_aggregated",[o.BF.MemberAutomations]:"activity_aggregated",[o.BF.MessagesSent]:"activity_aggregated",[o.BF.MessagesRead]:"activity_aggregated",[o.BF.ActionsTaken]:"activity_aggregated",[o.BF.AutomationsExecuted]:"activity_aggregated"}:{[o.BF.Name]:"management",[o.BF.Id]:"management",[o.BF.Categories]:"management",[o.BF.Source]:"management",[o.BF.DateCreated]:"management",[o.BF.DateInstalled]:"management",[o.BF.FirstMessageSentDate]:"management",[o.BF.FirstActiveDate]:"management",[o.BF.FirstAutomationDate]:"management",[o.BF.LastMessageSentDate]:"management",[o.BF.LastActiveDate]:"management",[o.BF.LastAutomationDate]:"management",[o.BF.MemberReads]:"activity",[o.BF.ActiveUsers]:"activity",[o.BF.MessagesRead]:"activity",[o.BF.MessagesSent]:"activity",[o.BF.ActionsTaken]:"activity",[o.BF.MemberAutomations]:"activity",[o.BF.AutomationsExecuted]:"activity",[o.BF.MessagesConsumed]:"activity",[o.BF.FilesConsumed]:"activity",[o.BF.MessagesConsumedWeb]:"activity",[o.BF.MessagesConsumedDiscovery]:"activity",[o.BF.MessagesConsumedEvents]:"activity",[o.BF.MessagesConsumedRealTimeSearch]:"activity",[o.BF.MessagesConsumedAdminOversight]:"activity"},getTableColumnOrder=({isTeamSite:e,experimentEinst5578GroupOn:t=!1})=>e?[o.BF.Id,o.BF.Categories,o.BF.Source,o.BF.FirstMessageSentDate,o.BF.FirstActiveDate,o.BF.FirstAutomationDate,o.BF.LastMessageSentDate,o.BF.LastActiveDate,o.BF.LastAutomationDate,o.BF.MemberReads,o.BF.ActiveUsers,o.BF.MemberAutomations,o.BF.MessagesSent,o.BF.MessagesRead,o.BF.ActionsTaken,o.BF.AutomationsExecuted]:t?[o.BF.Id,o.BF.Categories,o.BF.Source,o.BF.FirstMessageSentDate,o.BF.FirstActiveDate,o.BF.FirstAutomationDate,o.BF.LastMessageSentDate,o.BF.LastActiveDate,o.BF.LastAutomationDate,o.BF.MessagesConsumed,o.BF.MessagesConsumedDiscovery,o.BF.MessagesConsumedWeb,o.BF.MessagesConsumedEvents,o.BF.MessagesConsumedRealTimeSearch,o.BF.MessagesConsumedAdminOversight,o.BF.FilesConsumed,o.BF.MemberReads,o.BF.ActiveUsers,o.BF.MemberAutomations,o.BF.MessagesSent,o.BF.MessagesRead,o.BF.ActionsTaken,o.BF.AutomationsExecuted]:[o.BF.Id,o.BF.Categories,o.BF.Source,o.BF.MessagesConsumed,o.BF.FilesConsumed,o.BF.DateCreated,o.BF.DateInstalled,o.BF.FirstMessageSentDate,o.BF.FirstActiveDate,o.BF.FirstAutomationDate,o.BF.LastMessageSentDate,o.BF.LastActiveDate,o.BF.LastAutomationDate,o.BF.MemberReads,o.BF.ActiveUsers,o.BF.MemberAutomations,o.BF.MessagesSent,o.BF.MessagesRead,o.BF.ActionsTaken,o.BF.AutomationsExecuted,o.BF.MessagesConsumedWeb,o.BF.MessagesConsumedDiscovery,o.BF.MessagesConsumedEvents,o.BF.MessagesConsumedRealTimeSearch,o.BF.MessagesConsumedAdminOversight],getDefaultVisibleColumns=({isTeamSite:e,experimentEinst5578GroupOn:t=!1})=>e?[o.BF.Name,o.BF.Categories,o.BF.Source,o.BF.FirstActiveDate,o.BF.LastActiveDate,o.BF.MessagesRead,o.BF.ActionsTaken]:t?[o.BF.Name,o.BF.Categories,o.BF.Source,o.BF.FirstActiveDate,o.BF.LastMessageSentDate,o.BF.LastAutomationDate,o.BF.MessagesConsumed,o.BF.FilesConsumed,o.BF.MessagesRead,o.BF.ActionsTaken]:[o.BF.Name,o.BF.Categories,o.BF.Source,o.BF.MessagesConsumed,o.BF.FilesConsumed,o.BF.FirstActiveDate,o.BF.LastActiveDate,o.BF.MessagesRead,o.BF.ActionsTaken],getColumnCellDefaultSort=e=>{let t=getTableColumnCellType(e);return(0,i.A)(t)}},0x4189f1e4:(e,t,a)=>{"use strict";a.d(t,{BF:()=>d,C0:()=>h,DE:()=>f,DJ:()=>getTableColumnOrder,FL:()=>getTableColumnSections,TP:()=>u,UA:()=>getColumnCellDefaultSort,aR:()=>m,dT:()=>p,g8:()=>g,hm:()=>c,j:()=>b,pb:()=>getTableColumnSortable,pr:()=>getTableColumnCellType,zV:()=>_});var n,r=a(0x12f409c9c),i=a(0x11a95884d),l=a(0x42654967),o=a(0xb1f0729f),s=a(0x1d600678);let c="relevant";var d=((n={}).UserId="user_id",n.Username="username",n.DisplayName="display_name",n.Email="email",n.AccountType="account_type",n.DaysActive="days_active",n.Workspaces="workspaces",n.IncludedInBill="is_billable_seat",n.FilesUploadedCount="files_added_count",n.SearchesCount="search_count",n.DaysUsingAppsCount="days_active_apps",n.DaysUsingWorkflowsCount="days_active_workflows",n.DaysUsingSlackConnectCount="days_active_slack_connect",n.Name="real_name",n.AccountCreated="date_created",n.ClaimedDate="date_claimed",n.DateDeleted="date_deleted",n.DesktopDaysActive="days_active_desktop",n.AndroidDaysActive="days_active_android",n.IosDaysActive="days_active_ios",n.LastActivity="date_last_active",n.DesktopLastActivity="date_last_active_desktop",n.AndroidLastActivity="date_last_active_android",n.IosLastActivity="date_last_active_ios",n.MessagesPosted="messages_posted",n.ReactionsAdded="reactions_added",n.MessagesInChannelCount="messages_posted_in_channel",n.TotalCallsCount="total_calls_count",n.SlackCallsCount="slack_calls_count",n.SlackHuddlesCount="slack_huddles_count",n.Title="user_title",n.Department="department",n.CostCenter="cost_center",n.Division="division",n.PrimaryPhone="primary_phone",n.MobilePhone="mobile_phone",n.AlternateEmail="alternate_email",n.Role="role",n.UserType="user_type",n.EmployeeId="employee_number",n.Locale="locale",n.HonorificPrefix="honorific_prefix",n.ManagerId="manager_id",n.Organization="organization",n.PreferredLanguage="preferred_language",n.StreetAddress="street_address",n.Country="country",n.City="city",n.Zipcode="zip_code",n);let getTableColumnOrder=(e,t)=>e?["user_id","username","display_name","email","account_type","date_created","date_claimed","date_deleted",...t?[]:["is_billable_seat"],"days_active","days_active_desktop","days_active_android","days_active_ios","messages_posted","messages_posted_in_channel","reactions_added","date_last_active","date_last_active_desktop","date_last_active_android","date_last_active_ios"]:["user_id","username","display_name","email","account_type","date_created","date_claimed","date_deleted","is_billable_seat","workspaces","days_active","days_active_desktop","days_active_android","days_active_ios","days_active_apps","days_active_workflows","days_active_slack_connect","messages_posted","messages_posted_in_channel","reactions_added","files_added_count","total_calls_count","slack_calls_count","slack_huddles_count","search_count","date_last_active","date_last_active_desktop","date_last_active_android","date_last_active_ios","user_title","department","cost_center","division","street_address","role","primary_phone","mobile_phone","alternate_email","user_type","country","employee_number","honorific_prefix","locale","city","manager_id","organization","zip_code","preferred_language"],getTableColumnCellType=e=>{switch(e){case"days_active":case"days_active_desktop":case"days_active_android":case"days_active_ios":case"messages_posted":case"messages_posted_in_channel":case"reactions_added":case"files_added_count":case"total_calls_count":case"slack_calls_count":case"slack_huddles_count":case"search_count":case"days_active_apps":case"days_active_workflows":case"days_active_slack_connect":return l.Ph.Number;case"date_last_active":case"date_last_active_desktop":case"date_last_active_android":case"date_last_active_ios":case"date_claimed":case"date_deleted":case"date_created":return l.Ph.Date;default:return l.Ph.String}},getColumnCellDefaultSort=e=>{let t=getTableColumnCellType(e);return(0,i.A)(t)},m={real_name:264,user_id:184,username:176,display_name:176,email:264,account_type:192,date_created:144,date_claimed:144,date_deleted:144,is_billable_seat:116,workspaces:200,days_active:136,days_active_desktop:116,days_active_android:116,days_active_ios:116,messages_posted:144,messages_posted_in_channel:154,reactions_added:144,files_added_count:136,total_calls_count:132,slack_calls_count:132,slack_huddles_count:132,search_count:124,days_active_apps:160,days_active_workflows:122,days_active_slack_connect:135,date_last_active:128,date_last_active_desktop:128,date_last_active_android:128,date_last_active_ios:128,user_title:224,department:192,cost_center:192,division:192,street_address:192,role:192,primary_phone:168,mobile_phone:168,alternate_email:264,user_type:184,country:192,employee_number:184,honorific_prefix:144,locale:192,city:192,manager_id:184,organization:192,zip_code:160,preferred_language:168},u={[l.Ph.Number]:r.nk.right,[l.Ph.Percentage]:r.nk.right,[l.Ph.Date]:r.nk.right,[l.Ph.String]:r.nk.left},p=["is_billable_seat","days_active","days_active_desktop","days_active_android","days_active_ios","date_last_active","date_last_active_desktop","date_last_active_android","date_last_active_ios","messages_posted_in_channel","reactions_added","files_added_count","total_calls_count","slack_calls_count","slack_huddles_count","search_count","days_active_apps","days_active_workflows","days_active_slack_connect"],getTableColumnSortable=(e,t,a,n,r,i)=>{if(r)return t===n;if(a===l.Zq.AllTime&&p.includes(t))return!1;switch(t){case"real_name":case"username":case"display_name":case"messages_posted":case"messages_posted_in_channel":case"reactions_added":case"date_created":case"date_claimed":case"date_deleted":case"date_last_active":case"date_last_active_desktop":case"date_last_active_android":case"date_last_active_ios":case"days_active":case"days_active_desktop":case"days_active_android":case"days_active_ios":case"files_added_count":case"total_calls_count":case"slack_calls_count":case"slack_huddles_count":case"search_count":case"days_active_apps":case"days_active_workflows":case"days_active_slack_connect":return!0;case"email":return i?!!(0,s.x)(e,"display_email_addresses"):!!(0,o.D1)(e,"display_email_addresses")||!!(0,o.SI)(e,"display_email_addresses");default:return!1}},h={Basics:"basics",Activity:"activity",Custom:"custom"},_=[h.Basics,h.Activity,h.Custom],f=[h.Basics,h.Activity];function getTableColumnSections(e){return{real_name:h.Basics,user_id:h.Basics,username:h.Basics,display_name:h.Basics,email:h.Basics,account_type:e?h.Activity:h.Basics,date_created:h.Basics,date_claimed:e?h.Activity:h.Basics,date_deleted:e?h.Activity:h.Basics,workspaces:h.Basics,is_billable_seat:h.Basics,days_active:h.Activity,days_active_desktop:h.Activity,days_active_android:h.Activity,days_active_ios:h.Activity,messages_posted:h.Activity,messages_posted_in_channel:h.Activity,reactions_added:h.Activity,date_last_active:h.Activity,date_last_active_desktop:h.Activity,date_last_active_android:h.Activity,date_last_active_ios:h.Activity,files_added_count:h.Activity,total_calls_count:h.Activity,slack_calls_count:h.Activity,slack_huddles_count:h.Activity,search_count:h.Activity,days_active_apps:h.Activity,days_active_workflows:h.Activity,days_active_slack_connect:h.Activity,user_title:h.Custom,department:h.Custom,cost_center:h.Custom,division:h.Custom,street_address:h.Custom,role:h.Custom,primary_phone:h.Custom,mobile_phone:h.Custom,alternate_email:h.Custom,user_type:h.Custom,country:h.Custom,employee_number:h.Custom,honorific_prefix:h.Custom,locale:h.Custom,city:h.Custom,manager_id:h.Custom,organization:h.Custom,zip_code:h.Custom,preferred_language:h.Custom}}let b=["account_type","date_created","workspaces","days_active","messages_posted"],g=["user_id","username","display_name","email","date_created"]},0x11a95884d:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x15513c993),r=a(0x42654967);let __WEBPACK_DEFAULT_EXPORT__=e=>{switch(e){case r.Ph.Number:case r.Ph.Percentage:case r.Ph.Date:return n.Pg.DESC;default:return n.Pg.ASC}}},0x92eb6dc9:(e,t,a)=>{"use strict";a.d(t,{BF:()=>c,Ph:()=>d,RA:()=>b,TP:()=>_,UA:()=>getColumnCellDefaultSort,aR:()=>h,fc:()=>p,hm:()=>s,j:()=>g,jd:()=>f,pb:()=>m,zV:()=>u});var n,r,i=a(0x12f409c9c),l=a(0x11a95884d),o=a(0x42654967);let s="relevant";var c=((n={}).Name="name",n.Url="domain",n.DateCreated="date_created",n.TotalMembership="users_channels_count",n.FullMembers="full_members_count",n.Guests="guests_count",n.ActiveMembers="readers_count",n.ActiveMembersPercent="readers_percentage",n.ActiveMembersPercentChange="readers_change_prior_month",n.MembersWhoPosted="writers_count",n.Apps="apps_count",n.FilesUploaded="files_count",n.PublicSingleWorkspaceChannels="channels_count",n.PublicMultiWorkspaceChannels="shared_channels_count",n.MessagesSent="chats_count",n.MessagesSentInPublicSingleWorkspaceChannels="chats_channels_count",n.MessagesSentInPublicSingleWorkspaceChannelsPercent="chats_channels_count_percentage",n.MessagesReadInPublicSingleWorkspaceChannelsPercent="cursor_marks_percentage",n.MessagesSentInMultiWorkspaceChannels="chats_shared_channels_count",n.MessagesSentInPrivateChannels="chats_groups_count",n.MessagesSentInDMs="chats_dms_count",n);let getColumnCellDefaultSort=e=>{let t=(e=>{switch(e){case"domain":default:return o.Ph.String;case"date_created":return o.Ph.Date;case"users_channels_count":case"full_members_count":case"guests_count":case"readers_count":case"writers_count":case"apps_count":case"files_count":case"channels_count":case"shared_channels_count":case"chats_count":case"chats_channels_count":case"chats_shared_channels_count":case"chats_groups_count":case"chats_dms_count":return o.Ph.Number;case"chats_channels_count_percentage":case"cursor_marks_percentage":case"readers_percentage":case"readers_change_prior_month":return o.Ph.Percentage}})(e);return(0,l.A)(t)},d=["domain","date_created","users_channels_count","full_members_count","guests_count","readers_count","readers_percentage","readers_change_prior_month","writers_count","apps_count","files_count","channels_count","shared_channels_count","chats_count","chats_channels_count","chats_channels_count_percentage","cursor_marks_percentage","chats_shared_channels_count","chats_groups_count","chats_dms_count"];var m=((r={}).Basics="basics",r.Activity="activity",r);let u=["basics","activity"],p={name:"basics",domain:"basics",date_created:"basics",users_channels_count:"basics",full_members_count:"basics",guests_count:"basics",readers_count:"activity",readers_percentage:"activity",readers_change_prior_month:"activity",writers_count:"activity",apps_count:"basics",files_count:"activity",channels_count:"basics",shared_channels_count:"basics",chats_count:"activity",chats_channels_count:"activity",chats_channels_count_percentage:"activity",cursor_marks_percentage:"activity",chats_shared_channels_count:"activity",chats_groups_count:"activity",chats_dms_count:"activity"},h={name:270,domain:180,date_created:144,users_channels_count:150,full_members_count:140,guests_count:110,readers_count:160,readers_percentage:170,readers_change_prior_month:210,writers_count:170,apps_count:70,files_count:130,channels_count:155,shared_channels_count:140,chats_count:140,chats_channels_count:200,chats_channels_count_percentage:160,cursor_marks_percentage:160,chats_shared_channels_count:190,chats_groups_count:150,chats_dms_count:145},_={[o.Ph.Number]:i.nk.right,[o.Ph.Percentage]:i.nk.right,[o.Ph.Date]:i.nk.right,[o.Ph.String]:i.nk.left},f="name",b=i.Pg.ASC,g=["date_created","users_channels_count","guests_count","readers_count","readers_change_prior_month","writers_count","apps_count","channels_count","chats_count","cursor_marks_percentage"]},0x2162e3d39:(e,t,a)=>{"use strict";a.d(t,{BF:()=>c,DJ:()=>getTableColumnOrder,Df:()=>getDefaultVisibleColumns,FP:()=>u,Fd:()=>d,MW:()=>getTableColumnFormattedName,OS:()=>getTableColumnAriaLabel,UA:()=>getColumnCellDefaultSort,aR:()=>p,fc:()=>f,jd:()=>m,pb:()=>h,zV:()=>_});var n,r,i=a(0x20482ad21),l=a(0x12f409c9c),o=a(0x11a95884d),s=a(0x42654967),c=((n={}).Name="name",n.WorkflowId="workflow_id",n.Description="description",n.Collaborators="collaborators",n.Managers="managers",n.DateCreated="date_created",n.DateUpdated="date_updated",n.LastExecution="last_execution",n.FirstExecution="first_execution",n.DatePublished="date_published",n.IsPublished="is_published",n.IsDeleted="is_deleted",n.NumSteps="num_steps",n.NumTriggers="num_triggers",n.TriggerTypes="trigger_types",n.IsSalesElevate="is_sales_elevate",n.NumRuns="num_runs",n.ActiveUsers="active_users",n);let d=["name"],m="name";l.Pg.ASC;let u={ALL:"all",PUBLISHED:"published",UNPUBLISHED:"unpublished"},getTableColumnOrder=()=>["workflow_id","description","collaborators","managers","date_created","date_updated","last_execution","first_execution","date_published","is_published","is_deleted","num_steps","num_triggers","trigger_types","is_sales_elevate","num_runs","active_users"],p={name:300,workflow_id:175,description:350,collaborators:200,managers:175,date_created:175,date_updated:175,last_execution:175,first_execution:175,date_published:175,is_published:175,is_deleted:175,num_steps:175,num_triggers:175,trigger_types:300,is_sales_elevate:125,num_runs:150,active_users:150};var h=((r={}).WorkflowDetails="workflow_details",r.Activity="activity",r);let _=["workflow_details","activity"],f={name:"workflow_details",workflow_id:"workflow_details",description:"workflow_details",collaborators:"workflow_details",managers:"workflow_details",date_created:"workflow_details",date_updated:"workflow_details",last_execution:"workflow_details",first_execution:"workflow_details",date_published:"workflow_details",is_published:"workflow_details",is_deleted:"workflow_details",num_steps:"workflow_details",num_triggers:"workflow_details",trigger_types:"workflow_details",is_sales_elevate:"workflow_details",num_runs:"activity",active_users:"activity"},getDefaultVisibleColumns=()=>["date_published","trigger_types","num_runs","active_users"],getColumnCellDefaultSort=e=>{let t={date_created:s.Ph.Date,date_updated:s.Ph.Date,last_execution:s.Ph.Date,first_execution:s.Ph.Date,date_published:s.Ph.Date,num_steps:s.Ph.Number,num_triggers:s.Ph.Number,trigger_types:s.Ph.Number,num_runs:s.Ph.Number,active_users:s.Ph.Number}[e]??s.Ph.String;return(0,o.A)(t)},b=new i.Ay("enterprise_dashboard"),getTableColumnFormattedName=e=>({name:b.t("Workflow Name"),workflow_id:b.t("Workflow ID"),description:b.t("Workflow description"),collaborators:b.t("Manager ID"),managers:b.t("Managers"),date_created:b.t("Created on"),date_updated:b.t("Last updated on"),last_execution:b.t("Last run on"),first_execution:b.t("First run on"),date_published:b.t("Last published on"),is_published:b.t("Publication status"),is_deleted:b.t("Is deleted?"),num_steps:b.t("Number of steps"),num_triggers:b.t("Number of triggers"),trigger_types:b.t("Trigger type"),is_sales_elevate:b.t("Sales Elevate"),num_runs:b.rt("Daily<br></br>workflow runs"),active_users:b.rt("Daily workflow<br></br>active users")})[e]??"",getTableColumnAriaLabel=e=>({name:b.t("Workflow Name"),workflow_id:b.t("Workflow ID"),description:b.t("Workflow description"),collaborators:b.t("Manager ID"),managers:b.t("Managers"),date_created:b.t("Created on"),date_updated:b.t("Last updated on"),last_execution:b.t("Last run on"),first_execution:b.t("First run on"),date_published:b.t("Last published on"),is_published:b.t("Publication status"),is_deleted:b.t("Is deleted?"),num_steps:b.t("Number of steps"),num_triggers:b.t("Number of triggers"),trigger_types:b.t("Trigger type"),is_sales_elevate:b.t("Sales Elevate"),num_runs:b.t("Daily workflow runs"),active_users:b.t("Daily workflow active users")})[e]??""},0x49a56d32:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SlackDeveloperProgramSandboxWorkspaceBanner:()=>SlackDeveloperProgramSandboxWorkspaceBanner});var n=a(0xbad225b5),r=a(0x40c0d834),i=a(0x8c8bafa3),l=a(0x20482ad21),o=a(0xd9faf062),s=a(0x1faa3f1ac),c=a(0x2501a2cee),d=a(0x2be3dfd3),m=a(0x10b603e91),u=a(0x3711e82d);let p=new l.Ay("slack_developers"),h={elementName:"view_details",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},SlackDeveloperProgramSandboxWorkspaceBanner=()=>{let e=p.rt("You are currently using a Slack Developer sandbox. <viewDetailsLink>View details</viewDetailsLink>",{"<viewDetailsLink>":({text:e})=>n.createElement(s.A,{href:`https://api.${(0,i.Xk)()}/docs/developer-sandbox`,autoClogProps:h,target:"_blank"},e)});return n.createElement(r.A,{clogImpression:!0,uiComponentName:u.UiComponentName.SLACK_DEVELOPER_PROGRAM_SANDBOX_WORKSPACE_BANNER,enableClogImpressionOffScreen:!0},n.createElement(m.A,{className:"align_center",type:o.QE.neutral,preventTypeOverride:!0,isFixedPosition:!1,showCloseButton:!1},n.createElement(d.A,{justifyContent:"center",alignItems:"center",gap:8},n.createElement(c.Ah,{inline:!0,name:"code",size:"20"}),n.createElement("span",null,e))))};SlackDeveloperProgramSandboxWorkspaceBanner.displayName="SlackDeveloperProgramSandboxWorkspaceBanner"},0x19bfea7f8:(e,t,a)=>{"use strict";a.d(t,{T:()=>appActionFailToastFactory});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1faa3f1ac),l=a(0x6e87d4ec);let o=new r.Ay("app_actions"),s={name:"warning"},c=class extends n.PureComponent{constructor(e){super(e),this.onRetry=this.onRetry.bind(this)}onRetry(){this.props.onRetry()}render(){let{onRetry:e,...t}=this.props,a=o.rt("Sorry, that didn\u2019t work. <a>Try again?</a>",null,({text:e})=>n.createElement(i.A,{"data-qa":"app_action_toast_retry",onClick:this.onRetry},e));return n.createElement(l.A,{...t,duration:6e3,svgIconProps:s,svgIconClassName:"sk_raspberry_red"},n.createElement("span",{"data-qa":"app_action_fail_toast_msg"},a))}};c.displayName="AppActionFailToast";let appActionFailToastFactory=e=>n.createElement(c,e)},0x6e465d95:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let l=new(a(0x20482ad21)).Ay("members");function AppBadge({className:e,inverse:t=!1,isWorkflow:a=!1,isAgentforce:r=!1,isAgent:o=!1,isSidekick:s=!1,...c}){let d=l.t("WORKFLOW");s?d=l.t("EXPERIMENTAL"):r?d=l.t("AGENTFORCE"):o?d=l.t("AGENT"):a||(d=l.t("APP"));let m=i()(e,"c-app_badge",{"c-app_badge--inverse":t});return n.createElement("span",{...c,className:m,"data-stringify-suffix":" "},d)}AppBadge.displayName="AppBadge";let o=(0,n.memo)(AppBadge)},0x1510b26e9:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11a296110),l=a(0x2501a2cee),o=a(0xc4548bcd),s=a(0x226892387),c=a(0x14149c126),d=a(0x23a2c754b),m=a.n(d);let u=new r.Ay("app_connect");function AppConnectBadge({connectUrl:e}){let t=(0,n.useCallback)(()=>{(0,o.A)(e)},[e]),a=(0,s.d4)(e=>"on"===(0,c._Z)(e,"app_connect"));return n.createElement(i.Ay,{size:"small",className:m().appConnectBadge,onClick:t},n.createElement(l.Ah,{name:"plug",size:"18"}),"\xa0",a?u.t("Connect"):"Connect")}AppConnectBadge.displayName="AppConnectBadge";let p=(0,n.memo)(AppConnectBadge)},0x2216b39ea:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2264e6ea3),o=a(0xb62e6bf4),s=a(0x102edf836),c=a(0x128d54e52),d=a(0x2501a2cee),m=a(0x2376ea9bb),u=a(0x1bcf35bbd),p=a(0xa1832ae4),h=a(0x226892387),_=a(0x26e09454),f=a(0x1db88f2f4),b=a(0x1ee439e69),g=a(0x9e1a7494),y=a.n(g);let A=new i.Ay("app_launcher"),AppsIndexTeamPicker=({menuPosition:e,size:t})=>{let a=(0,r.wA)(),i=(0,h.d4)(o.ss),g=(0,h.d4)(b.lp),x=(0,h.d4)(b.FR),E=(0,n.useMemo)(()=>g?[g,...x]:x,[x,g]),C=(0,h.d4)(f.gc),k=(0,l.JV)(C),v=E.find(({id:e})=>e===C),S=k?A.t("All workspaces",{fallbackHash:"22e3fb740a3a827d03422129963866a10c9f97ee",fallbackHashNs:"ia4"}):(0,p.F1)(v),I=(0,n.useCallback)(e=>{e!==C&&a((0,_.S$)(e))},[C,a]),w=(0,n.useCallback)(({className:e})=>k?null:n.createElement("div",{className:e},n.createElement(m.A,{id:C,size:24,showTooltip:!0,className:"nudge_top_2"})),[k,C]);return i?n.createElement(u.A,{teamsList:E,handleTeamSelected:I,selectedTeamId:C,position:e},n.createElement(s.Ay,{type:"outline",size:t},n.createElement(c.Ay,{avatar:w,size:"small",text:S}),n.createElement("div",{className:y().svgContainer},n.createElement(d.Ah,{name:"caret-down",size:"small"===t?"inherit":"20"})))):null};AppsIndexTeamPicker.displayName="AppsIndexTeamPicker";let x=AppsIndexTeamPicker},0x89500067:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x77727995),l=a(0xb97b797e),o=a(0x20482ad21),s=a(0xe7ed96ac),c=a(0xa089d16d),d=a(0x52a2bc6d),m=a(0xe28ad2a3),u=a(0x21f3c49e8),p=a(0x120c268ad),h=a.n(p),_=a(0x11a296110),f=a(0x2501a2cee),b=a(0x4c96e5d9);let g=new o.Ay("apps"),y=class extends n.PureComponent{static defaultProps={isDangerous:!1,longDescription:null,scopes:[]};constructor(e){super(e),this.state={isExpanded:!1},(0,l.v)(this,["handleShowMoreClick"])}handleShowMoreClick=e=>{e.preventDefault(),this.setState(e=>({isExpanded:!e.isExpanded}))};renderLongDescriptionMaybe(){let{longDescription:e}=this.props,{isExpanded:t}=this.state;return e&&t?n.createElement("p",{className:"p-oauth_scope_info__scope_description no_bottom_margin small_top_margin"},e):null}renderShowMoreMaybe(){let{longDescription:e}=this.props,{isExpanded:t}=this.state,a=t?g.t("Show less"):g.t("Show more");return e?n.createElement(b.Ay,{tip:a,shouldFade:!1,zIndex:"above_fs"},n.createElement(_.Nm,{className:"left_margin",onClick:this.handleShowMoreClick},n.createElement(f.Ah,{name:t?"caret-down-filled":"caret-right-filled",inline:!0}))):null}render(){let{isDangerous:e,shortDescription:t,scopes:a=[]}=this.props,r=h()({"p-oauth_scope_info__safe_scope":!e,"p-oauth_scope_info__dangerous_scope":e});return n.createElement("div",{className:r,"data-qa-scopes":a.join(",")},n.createElement("div",{className:"display_flex"},e&&n.createElement(f.Ah,{name:"warning-filled",inline:!0}),n.createElement("span",{className:"p-oauth_scope_info__scope_description flex_one"},t),this.renderShowMoreMaybe()),this.renderLongDescriptionMaybe())}};y.displayName="OauthScopeDescription";let buildScopeDescriptions=(e,t)=>{let a=[],r=[];return t&&a.push(n.createElement(y,{key:"default",shortDescription:t})),e.forEach(({scopes:e,short_description:t,long_description:i,is_dangerous:l})=>{let o={key:e[0],shortDescription:t,longDescription:i,isDangerous:l,scopes:e},s=n.createElement(y,o);l?r.push(s):a.push(s)}),{safeScopeDescriptions:a,dangerousScopeDescriptions:r}};buildScopeDescriptions.displayName="buildScopeDescriptions";let OauthScopeInfo=({scopeInfo:e,defaultScopeDescription:t,"data-qa":a="oauth_scope_info"})=>{if((0,u.A)(e))return null;let{safeScopeDescriptions:r,dangerousScopeDescriptions:i}=buildScopeDescriptions(e,t);return n.createElement("div",{className:"p-oauth_scope_info","data-qa":a},!(0,u.A)(r)&&n.createElement("div",{className:"p-oauth_scope_info__safe_scopes"},r),!(0,u.A)(i)&&n.createElement("div",{className:"p-oauth_scope_info__dangerous_scopes"},i))};OauthScopeInfo.displayName="OauthScopeInfo",OauthScopeInfo.displayName="OauthScopeInfo";let A=n.memo(OauthScopeInfo);var x=a(0x12185e091),E=a(0x82980ab8),C=a(0x1aad32b98),k=a(0x167bc3887),v=a(0x1c91944c9),S=a(0x217553e42),I=a(0xe684f705),w=a(0x1fcbb004d);let T=new o.Ay("apps"),N=class extends n.PureComponent{static defaultProps={appName:void 0,goButtonText:void 0,cancelText:void 0,onClose:r.A,onDismiss:r.A,title:void 0,channelId:void 0,closeModal:r.A,shouldCloseOnGo:!0,children:void 0,isChannelImOrMpim:!1};closeIcon={name:"close"};constructor(e){super(e),(0,l.v)(this,["onGo","onCancel","onCloseButtonClick"]),this.state={confirmInProgress:!1}}onCancel(){let{onDismiss:e}=this.props;return e()}onCloseButtonClick(){this.props.closeModal?.(),this.props.onClose()}onGo(){let{onAuthorize:e,shouldCloseOnGo:t}=this.props;return t&&this.setState(()=>({confirmInProgress:!0})),e()}renderPendingImage(){return n.createElement("span",{className:"p-app_permission_dialog__app_icon--placeholder p-app_permission_dialog__app_icon"})}renderTitle(){let e,{appName:t,channelId:a,isChannelImOrMpim:r,title:i}=this.props;return i?e=i:t&&a&&(e=r?T.rt("{appName} would like to do the following in your direct message with {channelName}:",{appName:t,channelName:n.createElement(d.A,{channelId:a,inline:!0,className:"bold"})}):T.rt("{appName} would like to do the following in {channelName}:",{appName:t,channelName:n.createElement(d.A,{channelId:a,inline:!0,className:"bold"})})),n.createElement("h3",{className:"normal bottom_margin top_margin align_center"},e)}render(){let{appIcon:e,appName:t,cancelText:a,children:r,goButtonText:i,scopeInfo:l,onClose:o,shouldCloseOnGo:d}=this.props,{confirmInProgress:u}=this.state,p={onGo:this.onGo,onCancel:this.onCancel,onClose:o,goButtonIsPending:u,goButtonIsDisabled:u,contentLabel:T.t("Grant {appName} Access",{appName:t}),className:"p-app_permission_dialog",showCloseButton:!1,showHeader:!1,goButtonText:i||T.t("Allow"),cancelText:a||T.t("Don\u2019t Allow"),useSlackScrollbar:!1,"data-qa":"app_permission_dialog",shouldCloseOnGo:d};return n.createElement(m.Ay,p,n.createElement(s.A,{"aria-label":T.t("Close",{fallbackHash:"bbfa773e5a63a5ea58c9b6207e608ca0120e592a",fallbackHashNs:"generic_dialog"}),className:"c-dialog__close",onClick:this.onCloseButtonClick,svgIconProps:this.closeIcon}),n.createElement("div",{className:"align_center"},n.createElement(c.A,{className:"p-app_permission_dialog__app_icon",src:e,height:"48",width:"48",alt:t,renderPending:this.renderPendingImage})),this.renderTitle(),n.createElement(A,{scopeInfo:l}),r)}};N.displayName="AppPermissionDialog";let M={closeModal:w.O},R=(0,v.N)((e,{appUserId:t,channelId:a})=>{let n=(0,S.OL)(e,a),r={isChannelImOrMpim:(0,x.LI)(n)||(0,x.yz)(n)};if(!t)return r;let l=(0,I.nv)(e,t);if(!l)return r;let o=(0,k.Ay)({size:48,teamOrEnterpriseId:(0,C.Ux)(e,l),memberId:t,avatarHash:(0,i.A)(l,"profile.avatar_hash")});return{...r,appIcon:o.imageUrl,appName:(0,E.wg)(l)}},M)(N)},0x13d471931:(e,t,a)=>{"use strict";a.d(t,{A:()=>AppExternalTeamBanner});var n=a(0xbad225b5),r=a(0x2376ea9bb),i=a(0xa1832ae4);function AppExternalTeamBanner({externalTeam:e}){let t=(0,i.F1)(e),a=(0,i.ZT)(e);return e&&t?n.createElement("div",{className:"p-app_external_team_banner","data-qa":"app_external_team_banner"},a&&n.createElement(r.A,{id:a,className:"p-app_external_team_banner__team_icon"}),n.createElement("span",{className:"p-app_external_team_banner__team_name overflow_ellipsis bold"},t)):null}AppExternalTeamBanner.displayName="AppExternalTeamBanner"},0x9f8584f:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0xcaee4748),s=a(0x1b7bc2fc6);let c=new l.Ay("app_card");function AppProfileCardInstallationSummary({appType:e,memberId:t,appName:a="this app",isError:r,installerIsYou:l=!1,appHomeTeamDisplayName:d,isChannelEmailAddressApp:m=!1,showChannelEmailAddress:u=!1,isChannelEmailAddressEnabledByOrg:p=!1}){let h;if(l)h=c.rt("You added {appName} to this workspace.",{appName:a}),m&&u&&(h=c.t("Emails are sent to this channel by using the email address you created for it."));else{let r=t?n.createElement(o.A,{id:t}):"Unknown user";h=d?c.rt("{appName} is installed on {appHomeTeamDisplayName}.",{appHomeTeamDisplayName:d,appName:a}):e===s.uk.CustomIntegration?c.rt("{installer} added this custom integration to this workspace.",{installer:r,appName:a}):e===s.uk.Slack?c.rt("{installer} configured {appName} to post in this channel.",{installer:r,appName:a}):m&&u?c.rt("Emails are sent to this channel by using the email address {installer} created for it.",{installer:r}):c.rt("{installer} added {appName} to this workspace.",{installer:r,appName:a})}!m||p&&u||(h=c.t("Emails have been disabled for this channel"));let _=i()("p-app_profile_card__installation_summary",{"p-app_profile_card__installation_summary--channel_email":m});return r?null:n.createElement("div",{className:_,"data-qa":"app_card_installation_summary"},n.createElement("span",null,h))}AppProfileCardInstallationSummary.displayName="AppProfileCardInstallationSummary";let d=n.memo(AppProfileCardInstallationSummary)},0x17059c926:(e,t,a)=>{"use strict";a.d(t,{A:()=>tt});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xc48503ad),s=a.n(o),c=a(0x118cdcdea),d=a.n(c),m=a(0xbe5e39b6),u=a(0x40c0d834),p=a(0x1df96de4c),h=a(0x20482ad21),_=a(0x1a256ff50),f=a(0xb1ea448c),b=a(0x99233ecb),g=a(0x14eba15dc),y=a(0x2501a2cee),A=a(0x1feb18f19),x=a(0x139aa1a7),E=a(0x217a7a62d),C=a(0x23a67ace),k=a(0x11a296110),v=a(0x1fdec3e16),S=a(0x6e465d95),I=a(0x13d471931),w=a(0x709dda87);function AppProfileCardHeader({colorHex:e="#2C2D30",imageUrl:t,name:a,onClick:r,isError:o=!1,externalTeam:s,tagline:c,isAgentApp:d=!1,isAgentforceAgent:m=!1,shouldTruncateTagline:u=!1}){let p=(0,n.useMemo)(()=>{if(m)return{background:"none",backgroundColor:"none",color:"unset"};let t=(0,w.iN)(e)||[];return{background:`
			linear-gradient(
				136.53deg,
				rgba(255, 255, 255, 0.05) 0%,
				rgba(255, 255, 255, 0.2) 100%
			),
			linear-gradient(
				312.01deg,
				${e} 0%,
				rgba(${t.join(",")}, 0.75) 100%
			)
			`,backgroundColor:e}},[e,m]),h=i()("full_width",{"p-app_profile_card__agent":m,"p-app_profile_card__header--external":!m&&s,"p-app_profile_card__header":!m&&!s,cursor_pointer:r!==l.A});return o?null:n.createElement(k.Nm,{className:h,onClick:r,style:p,"data-qa":"app_card_header"},n.createElement(I.A,{externalTeam:s}),n.createElement("img",{className:i()({"p-app_profile_card__avatar--agent":m,"p-app_profile_card__avatar":!m}),src:t,alt:a,"data-qa":"app_header_icon"}),n.createElement("div",{className:"p-app_profile_card__title"},n.createElement("div",{className:"display_flex align_items_center padding_bottom_25"},n.createElement("strong",{className:"overflow_ellipsis","data-qa":"app_header_name"},a),n.createElement("span",{className:"margin_left_50"},n.createElement(S.A,{inverse:!m,"data-qa":"app_header_app_label",isAgentforce:m,isAgent:d}))),n.createElement("div",{className:"p-app_profile_card__description","data-qa":"app_header_description"},u?n.createElement(v.A,{lines:2},c):c)))}AppProfileCardHeader.displayName="AppProfileCardHeader";let T=n.memo(AppProfileCardHeader);var N=a(0x9f8584f),M=a(0x16cf1da63),R=a(0x9b29cfd8),P=a(0x10cf39bbb),L=a(0x1a89e0958),O=a(0x1b9d5cc0c),D=a(0x190a9df19),F=a(0x162ff0093),U=a(0x226892387),B=a(0x1ed65ccda),H=a(0x5dd1c0f2),W=a(0x4cd7b414),V=a(0x8ed8ca46);let G=new h.Ay("agentforce");function AgentProfileCardButtons({isAgentforceChannelExpert:e,canActLikeChannelManager:t,salesforceOrgId:a,channelId:r,isAgentforceAgent:i,isUserAgentManager:l,botUserId:o,agentId:s}){let c=[],d=(0,M.wA)(),m=(0,U.d4)(e=>(0,V.gD)(e,a)),u=(0,U.d4)(e=>(0,H.sO)(e,s)),p=(0,R.KI)(u),h=(0,n.useCallback)(()=>`${m}/AiCopilot/copilotStudio.app#/copilot/builder?copilotId=${a}`,[m,a]),_=(0,U.d4)(D.PY),f=(0,U.d4)(D.h3),b=_||f,g=(0,U.d4)(e=>(0,E.VZ)(e,"access",s??"")),y=(0,n.useCallback)(async(e,t)=>{t?.(e);let{id:a}=await d((0,W.Z)({memberId:o,shouldNavigateToChannel:!1}))||{};d((0,B.T)({channelId:a,isSplitView:!1}))},[o,d]);return e&&t&&p&&c.push({text:G.t("Edit Agent Settings"),icon:"settings",onSelected:()=>{d((0,F.A)({id:r,defaultTab:P.n.Agents}))},ariaLabel:G.t("Edit Agent Settings")}),!e&&i&&p&&c.push({text:G.t("Message"),icon:"chat",onSelected:()=>y({}),ariaLabel:G.t("Message {name}",{name:(0,O.wg)()})}),e||!i||p||c.push({text:G.t("View Message History"),icon:"chat",onSelected:()=>y({}),ariaLabel:G.t("View Message History")}),!e&&i&&l&&!b&&c.push({text:G.t("Agent Builder"),icon:"settings",link:h(),ariaLabel:G.t("Visit Agent Builder")}),!e&&i&&!p&&b&&c.push({text:G.t("Review"),icon:"new-window",link:g,ariaLabel:G.t("Review")}),e&&!p&&t&&c.push({text:G.t("Review Status"),icon:"new-window",link:g,ariaLabel:G.t("Review Status")}),n.createElement("div",{className:"p-member_profile_buttons p-r_member_profile__buttons padding_left_100 padding_top_50 padding_right_100"},c.map(e=>n.createElement(L.A,{label:e.text,icon:e.icon,iconSize:"16","aria-label":e.text,href:e.link,key:e.text,onClick:e.onSelected,className:"p-app_profile_card__direct_message_button",...{},useSmallButton:!0})))}AgentProfileCardButtons.displayName="AgentProfileCardButtons";var q=a(0x20b4dda68),j=a(0x52a2bc6d),z=a(0x1a02c72b5),K=a(0xd6a16321),$=a(0x12185e091),Y=a(0x1ecc7f772),Q=a(0x280afe13),Z=a(0x3711e82d),J=a(0x45012309),X=a(0x2513da192),ee=a(0x20ad372d7),et=a(0xa20fa9e5),ea=a(0x1266f1359),en=a(0xeeed8b91),er=a(0x1ee439e69);let ei=new h.Ay("app_card"),el=Z.EventId.USER_CARD_CLICK,eo={eventId:Z.EventId.REMOVE_PRIORITY_USER,onClick:{interaction:Z.Interaction.CLICK,enableClogAction:!0},entryPoint:"app_profile_card_menu",elementName:"remove_priority_user"},es={eventId:Z.EventId.ADD_PRIORITY_USER,onClick:{interaction:Z.Interaction.CLICK,enableClogAction:!0},entryPoint:"app_profile_card_menu",elementName:"add_priority_user"};function createAppProfileCardMenu({appId:e,appUser:t,channel:a,channelIdToRemoveFrom:r,dispatch:i,isActive:l,isExternal:o,isMemberRestricted:s,isMemberUltraRestricted:c,isXoxaApp:d,memberId:m,serviceId:u,showAboutApp:p,showAppSettings:h,appSettingsLink:_,appDirectoryLink:f,currentTeamId:b,currentUserId:g,locale:y,currentEnterpriseId:A,showChannelEmailAddress:x,openGetEmailAddressModal:E,isAgentforceAgent:C=!1,isSlackChannelExpert:k=!1,experimentAgentforceGroupOn:v,isAppVIP:S}){let I=(0,J.eo)({userId:g,teamId:b,locale:y,enterpriseId:A}),w=(0,ea.$D)(b),T=(0,er.H7)(w),N=k||C,M={app_id:e,bot_id:u},R=e===(0,en.a_)(),P=ei.rt("Get email address for {channelDisplayName}",{channelDisplayName:(0,Y.SB)(w,a)}),L=ei.t("Add to VIP"),O=ei.t("Remove from VIP");return(0,$.JM)(a)&&(P=ei.t("Get email address for conversation"),(0,Q.e)(a)===q.Q$&&(P=ei.t("Get email address for Slackbot"))),[{key:"about_app",label:N?ei.t("About this agent"):ei.t("About this app"),click:()=>{I.track(el,M),I.track(Z.EventId.APP_CLICK_LINK_APP_ABOUT_IN_USER_CARD,{...M,contexts:{ui_context:{step:"user_card",action:"click",ui_element:"link_app_about"}}}),C||k?i((0,z.o)((0,K.Fo)({memberId:m}))):i((0,z.o)((0,K.tp)({appId:e,serviceId:u,memberId:m})))},show:p,dataQa:"app_card_view_details",autoClogProps:{elementName:"ABOUT_APP",appId:e,botId:u,onClick:{enableClogAction:!0}}},{key:"app_directory_link",label:ei.t("View in slack marketplace"),href:`${f}?utm_source=in-prod&utm_medium=inprod-link_app_directory-user_card-click`,click:()=>{I.track(el,M),I.track(Z.EventId.APP_CLICK_LINK_APP_DIRECTORY_IN_USER_CARD,{...M,contexts:{ui_context:{step:"user_card",action:"click",ui_element:"link_app_directory"}}})},show:!!f&&!(h&&_)&&!p,dataQa:"app_card_view_app_directory"},{key:"get_email_address",label:P,click:()=>E({channel:a,team:T}),show:R&&x,dataQa:"open_get_email_address"},{key:"settings",label:ei.t("Configuration"),href:d?void 0:`${_}&utm_source=in-prod&utm_medium=inprod-link_app_settings-user_card-click`,click:()=>{I.track(el,M),I.track(Z.EventId.APP_CLICK_LINK_APP_SETTINGS_IN_USER_CARD,{contexts:{ui_context:{step:"user_card",action:"click",ui_element:"link_app_settings"}}})},show:h&&_&&!R,dataQa:"app_card_edit_settings",autoClogProps:{elementName:"SETTINGS",appId:e,botId:u,onClick:{enableClogAction:!0}}},{key:"channel_invite",label:N?ei.t("Add this agent to a channel\u2026",{fallbackHash:"60990bb101d5fcb62f90e6bfa9a210521d387344"}):ei.t("Add this app to a channel\u2026"),click:()=>{I.track(el,M),i((0,ee._)({memberId:t.id}))},show:t&&l&&(d?!s:!c)&&!(v&&C),dataQa:"app_card_invite_to_channel"},{key:"channel_remove",dataQa:"app_card_remove",click:()=>{let a={action:Z.UiAction.CLICK,ui_element:Z.UiElement.BTN_REMOVE_APP};I.track(el,{contexts:{ui_context:a,core:{app_id:e,bot_id:u,channel_id:r}}}),i((0,et.A)({memberId:t.id,channelId:r}))},label:N?ei.rt("Remove this agent from {channelName} \u2026",{fallbackHash:"7c8212e75012f7f38249c785c0639b1516e44afc",channelName:n.createElement("strong",null,n.createElement(j.A,{className:"cursor_pointer",inline:!0,channelId:r}))}):ei.rt("Remove this app from {channelName} \u2026",{channelName:n.createElement("strong",null,n.createElement(j.A,{className:"cursor_pointer",inline:!0,channelId:r}))}),show:!!r&&!o},{key:"toggle_vip",label:S?O:L,click:()=>{i((0,X.C)(t?.id))},show:t&&l&&!N,dataQa:S?"app_card_remove_from_vip":"app_card_add_to_vip",autoClogProps:S?eo:es}].filter(e=>e.show)}createAppProfileCardMenu.displayName="createAppProfileCardMenu";let ec=createAppProfileCardMenu;var ed=a(0x1faa3f1ac),em=a(0x1acf9d7d9),eu=a(0x8ef14dd3),ep=a(0xe28ad2a3),eh=a(0x74791de4);let e_=new h.Ay("workflow_builder"),CollaboratorsDialog=({collaborators:e,appName:t})=>{let a=(0,n.useCallback)(()=>e.map(e=>n.createElement(eh.A,{key:e,userId:e,position:"left-bottom"},n.createElement(eu.A,{id:e,className:"p-members_dialog__member_list_btn","data-qa":"collaborator_row_btn"}))),[e]);return n.createElement(ep.Ay,{title:e_.rt("{usernameCount} collaborators on {appName}",{usernameCount:e.length,appName:t}),overlayClassName:"p-collaborators_dialog__overlay",showGoButton:!1,cancelText:e_.t("Close")},a())};CollaboratorsDialog.displayName="CollaboratorsDialog";var ef=a(0x3e058968),eb=a(0x205563788),eg=a(0x121a53a99),ey=a(0x21d85d6e5),eA=a(0x2a0ba4c6),ex=a(0xe684f705),eE=a(0x46dbff89);let eC=new h.Ay("app_card"),ek={eventId:Z.EventId.REMOVE_PRIORITY_USER,onClick:{interaction:Z.Interaction.CLICK,enableClogAction:!0},entryPoint:"workflow_profile_card_menu",elementName:"remove_priority_user"},ev={eventId:Z.EventId.ADD_PRIORITY_USER,onClick:{interaction:Z.Interaction.CLICK,enableClogAction:!0},entryPoint:"workflow_profile_card_menu",elementName:"add_priority_user"},Collaborator=({memberId:e})=>{let t=(0,U.d4)(t=>(0,ex.nv)(t,e)),a=(0,U.d4)(e=>(0,ey.sE)(e,t,!1,!1));return n.createElement(eh.A,{userId:e,position:"left-bottom"},n.createElement(ed.A,{"data-qa":"workflow-profile-card-collaborator",className:"p-workflow_profile_card--collaborator"},n.createElement(em.A,{name:a,inline:!0,isBold:!1})))};Collaborator.displayName="Collaborator";let Collaborators=({collaborators:e,appName:t})=>{let a=(0,M.wA)(),r=e[0],i=e[1],l=(0,n.useCallback)(()=>{a((0,eE.q)({element:n.createElement(CollaboratorsDialog,{collaborators:e,appName:t})}))},[e,t,a]);switch(e.length){case 0:return"";case 1:return eC.rt("{username} created this workflow. ",{username:n.createElement(Collaborator,{memberId:r})});case 2:return eC.rt("{firstUser} and {secondUser} are managing this workflow.",{firstUser:n.createElement(Collaborator,{memberId:r}),secondUser:n.createElement(Collaborator,{memberId:i})});default:return eC.rt("{firstUser}, {secondUser} and {userCount, plural, =1 {# other person} other {# other people}} are <a>managing this workflow</a>.",{firstUser:n.createElement(Collaborator,{memberId:r}),secondUser:n.createElement(Collaborator,{memberId:i}),userCount:e.length-2},({text:e})=>n.createElement("span",{"data-qa":"collaborators-count"},n.createElement(ed.A,{onClick:l,"data-qa":"collaborators-count-link"},e)))}};Collaborators.displayName="Collaborators";let WorkflowProfileCardTypescript=({app:e,cardHeader:t,currentUserId:a,disabledMessage:r,isAppVIP:i})=>{let l=(0,M.wA)(),o=null===r,s=(0,n.useMemo)(()=>e?.legacy_app?.owner_ids??[],[e]),c=(0,n.useMemo)(()=>new Set(s),[s]).has(a),d=(0,eg.fg)(e),m=(0,U.d4)(ef.tb),u=(0,n.useCallback)(()=>l((0,eA.u)({appId:e.app_id,source:"workflow_profile_card"})),[e.app_id,l]),p=(0,n.useCallback)(()=>m?l((0,z.o)((0,K.Hf)({tabId:eb.l.ManagedByYou}))):l((0,z.o)((0,K.x6)())),[m,l]),h=e.app_user?.id,_=h&&o,f=(0,n.useCallback)(()=>l((0,X.C)(h)),[l,h]),y=eC.t("Add to VIP"),A=eC.t("Remove from VIP"),x=!d&&o&&c;return n.createElement("div",{className:"p-app_profile_card__container","data-qa":"app_profile_card_container"},n.createElement(b.Ay,{width:320,noMargin:!0},t,_&&n.createElement(b.Dr,{className:"p-workflow_profile_card--menu-item",key:"toggle_vip",label:i?A:y,onSelected:f,"data-qa":i?"workflow_card_remove_from_vip":"workflow_card_add_to_vip",autoClogProps:i?ek:ev}),n.createElement(n.Fragment,null,n.createElement(b.bX,{noPaddingAbove:!0}),r&&r,o&&s.length>0&&n.createElement("div",{className:"p-workflow_profile_card--body"},n.createElement("div",null,n.createElement(Collaborators,{collaborators:s,appName:e.profile?.name??""})))),!d&&(!c||r)&&n.createElement(n.Fragment,null,n.createElement(b.bX,{noPaddingAbove:!0}),n.createElement("div",{"data-qa":"workflow-profile-card-non-installer",className:"p-workflow_profile_card--body"},eC.rt("Created with <a>Workflow Builder</a>.",null,({text:e})=>n.createElement("span",{className:"margin_left_25"},n.createElement(ed.A,{onClick:p},e))))),x&&n.createElement("div",{"data-qa":"workflow-profile-card-installer"},n.createElement(b.bX,{noPaddingAbove:!0}),n.createElement(g.A,{onSelected:u,className:"margin_bottom_100"},eC.t("Open in Workflow Builder")))))};function WorkflowProfileCardHeader({colorHex:e="#2C2D30",imageUrl:t,name:a,isError:r=!1,externalTeam:l}){let o=(0,w.iN)(e)||[],s={background:`
			linear-gradient(
				136.53deg,
				rgba(255, 255, 255, 0.05) 0%,
				rgba(255, 255, 255, 0.2) 100%
			),
			linear-gradient(
				312.01deg,
				${e} 0%,
				rgba(${o.join(",")}, 0.75) 100%
			)
		`,backgroundColor:e},c=i()("full_width",{"p-app_profile_card__header--external":l,"p-app_profile_card__header":!l});return r?null:n.createElement("div",{className:c,style:s,"data-qa":"app_card_header"},n.createElement(I.A,{externalTeam:l}),n.createElement("img",{className:"p-app_profile_card__avatar",src:t,alt:a,"data-qa":"app_header_icon"}),n.createElement("div",{className:"padding_left_100"},n.createElement("div",{className:"padding_bottom_25"},n.createElement("strong",{"data-qa":"app_header_name"},a),n.createElement("span",{className:"margin_left_50"},n.createElement(S.A,{inverse:!0,"data-qa":"app_header_app_label",isWorkflow:!0})))))}WorkflowProfileCardTypescript.displayName="WorkflowProfileCardTypescript",WorkflowProfileCardHeader.displayName="WorkflowProfileCardHeader";var eS=a(0x6b745714),eI=a(0xde8f9418),ew=a(0x106a32624),eT=a(0x243435af9),eN=a(0x182c9b0b0),eM=a(0x15f4f83cf),eR=a(0x151a93a75),eP=a(0x1ede77aa4),eL=a(0x1c9a3c4c1),eO=a(0x298acb56),eD=a(0x105ecbbed),eF=a(0xf038462c),eU=a(0x19c76d181),eB=a(0xa5d7d903),eH=a(0x115687abb),eW=a(0x49e911f4),eV=a(0x1a769a9e8),eG=a(0x223ac29bb),eq=a(0x16ed1b0dc),ej=a(0xb04c4a12),ez=a(0x16d4244ae),eK=a(0xcaa08ff7),e$=a(0x1c91944c9),eY=a(0x61222c0e),eQ=a(0x13852a196),eZ=a(0x11bab834e),eJ=a(0x21d99e321),eX=a(0x10ed819ce),e0=a(0x1ffbda36f),e1=a(0xf184ac53),e2=a(0x217553e42),e4=a(0x1fb2d2a87),e5=a(0x12d2784bc),e3=a(0x1c2a1a838),e6=a(0x19895585a);let e8=new h.Ay("app_card"),e7={isError:s().bool,menuProps:s().object,serviceId:s().string.isRequired,memberId:s().string,homeWorkspaceId:s().string.isRequired,dispatch:s().func.isRequired,app:s().object,appUser:s().object,installedByMember:s().object,currentTeam:s().object.isRequired,installerIsYou:s().bool,externalTeam:s().shape({id:s().string,name:s().string}),clogger:s().object.isRequired,currentEnterpriseId:s().string,currentUserId:s().string,appHomeTeamDisplayName:s().string,shouldShowButDisableSlashCommands:s().bool.isRequired,defaultAppIcon:s().string.isRequired,viewContext:s().string,windowId:s().string,channelId:s().string,threadTs:s().string,isMemberRestricted:s().bool,isMemberUltraRestricted:s().bool,isActive:s().bool,isExternal:s().bool,isOrgShared:s().bool,showAboutApp:s().bool,showAppSettings:s().bool,appSettingsLink:s().string,appDirectoryLink:s().string,showSlashCommands:s().bool,showDirectMessageItem:s().bool,canBeRemovedFromChannel:s().bool,channel:s().object,showChannelEmailAddress:s().bool,isChannelEmailAddressEnabledByOrg:s().bool,openGetEmailAddressModal:s().func,fetchChannelManagers:s().func,commands:s().arrayOf(s().shape({name:s().string.isRequired,usage:s().string,description:s().string}).isRequired),inAppDm:s().bool.isRequired,experimentAgentforceGroupOn:s().bool,experimentAgentforceAgentHomeGroupOn:s().bool,isAppVIP:s().bool,isAgentforceAgent:s().bool,isSlackChannelExpert:s().bool,isAgentforceChannelExpert:s().bool,canActLikeChannelManager:s().bool,isUserSlackAdmin:s().bool,isUserAgentManager:s().bool,clientTheme:s().string,agentSalesforceOrg:s().object},e9={app:void 0,appUser:void 0,installedByMember:void 0,isError:!1,menuProps:{},memberId:void 0,installerIsYou:!1,externalTeam:{},currentEnterpriseId:void 0,currentUserId:void 0,appHomeTeamDisplayName:void 0,viewContext:ej.Y.MESSAGE_PANE,channel:{},channelId:void 0,openGetEmailAddressModal:l.A,fetchChannelManagers:l.A,showChannelEmailAddress:!1,isChannelEmailAddressEnabledByOrg:!1,threadTs:void 0,isMemberRestricted:!1,isMemberUltraRestricted:!1,isActive:!1,isExternal:!1,isOrgShared:!1,showAboutApp:!1,showAppSettings:!1,appSettingsLink:void 0,appDirectoryLink:void 0,showSlashCommands:!1,showDirectMessageItem:!1,canBeRemovedFromChannel:!1,commands:[],experimentAgentforceGroupOn:!1,experimentAgentforceAgentHomeGroupOn:!1,isAgentforceAgent:!1,isSlackChannelExpert:!1,isAppVIP:!1,windowId:void 0,isAgentforceChannelExpert:!1,canActLikeChannelManager:!1,isUserSlackAdmin:!1,isUserAgentManager:!1,clientTheme:"light",agentSalesforceOrg:void 0},te=class extends n.Component{constructor(e){super(e),this.onHeaderClick=this.onHeaderClick.bind(this),this.autoFillSlashCommand=this.autoFillSlashCommand.bind(this)}componentDidMount(){this.props.isAgentforceAgent&&this.props.fetchChannelManagers({channelId:this.props.channelId,shouldFetchMemberObjects:!0})}shouldComponentUpdate(e){let{commands:t,...a}=this.props,{commands:n,...r}=e;return!(0,_.Ay)(a,r)||!(0,_.Ay)(t,n)}onHeaderClick(){let{app:e,memberId:t,menuProps:{onTriggerClose:a},serviceId:n,clogger:r,dispatch:i,experimentAgentforceGroupOn:l,isAgentforceAgent:o}=this.props,{app_id:s}=e;r.track("USER_CARD_CLICK",{app_id:s,bot_id:n}),i(l&&o?(0,z.o)((0,K.Fo)({memberId:t})):(0,z.o)((0,K.tp)({appId:s,serviceId:n,memberId:t}))),a&&a()}autoFillSlashCommand(e){if(this.props.shouldShowButDisableSlashCommands)return;let t=(0,ez.zC)({viewContext:this.props.viewContext,channelId:this.props.channelId,threadTs:this.props.threadTs});t&&(t.prependContents({contents:new(d())().insert(`${e} `).ops}),t.focus())}render(){let e,{app:t,appUser:a,commands:r,channel:o,defaultAppIcon:s,menuProps:c,installedByMember:d,installerIsYou:p,isError:h,dispatch:_,serviceId:x,currentTeam:E,externalTeam:C,currentUserId:k,currentEnterpriseId:v,appHomeTeamDisplayName:S,shouldShowButDisableSlashCommands:I,isMemberRestricted:w,isMemberUltraRestricted:M,isActive:R,isExternal:P,isOrgShared:L,showAboutApp:O,showAppSettings:D,appSettingsLink:F,appDirectoryLink:U,showSlashCommands:H,showDirectMessageItem:V,channelId:G,canBeRemovedFromChannel:q,showChannelEmailAddress:j,isChannelEmailAddressEnabledByOrg:z,openGetEmailAddressModal:K,inAppDm:$,isAgentforceAgent:Y,memberId:Q,isAppVIP:J,experimentAgentforceGroupOn:X,isAgentforceChannelExpert:ee,isSlackChannelExpert:et,canActLikeChannelManager:ea,clientTheme:er,agentSalesforceOrg:ei,isUserSlackAdmin:el,isUserAgentManager:eo}=this.props;if((0,eM.mX)(t))return n.createElement("div",{className:"p-app_profile_card__container"},n.createElement(b.Ay,{menuClassNames:"p-app_profile_card p-app_profile_card--loading",width:320},n.createElement(f.A,null)));if(!(0,eM.uz)(t))return null;let es=(0,eV.A)(t.profile,192,s),ed=(0,eR.fj)(t),em=(0,eR.R7)(t)===(0,en.a_)(),eu=n.createElement(T,{colorHex:t.profile.color,imageUrl:es,name:ed,onClick:!R||P?l.A:this.onHeaderClick,tagline:(0,eR.Ij)(t),isError:h,externalTeam:C,isAgentforceAgent:Y,isAgentApp:et,shouldTruncateTagline:!0}),ep=R||L||P||w,eh=Y||et,e_=Y&&(0,eR.DZ)(t),ef=Y&&!!ei,eb=Y?ep&&e_:ep,ey=eb?null:n.createElement("div",{className:"c-menu_item__li p-app_profile_card__disabled_message","data-qa":"app_card_app_disabled"},eh?e8.t("This agent is unavailable"):e8.t("This app is unavailable")),eA=ec({appId:t.app_id,memberId:Q,appUser:a,channel:o,channelIdToRemoveFrom:q&&G,dispatch:_,homeWorkspaceId:t.home_workspace_id,isActive:R,isMemberRestricted:w,isMemberUltraRestricted:M,isXoxaApp:"xoxa"===t.app_type,isExternal:P,showAboutApp:O,showAppSettings:D,appSettingsLink:F,appDirectoryLink:U,legacyApp:t.legacy_app,serviceId:x,currentTeamId:E.id,currentUserId:k,locale:(0,eG.Yp)(),currentEnterpriseId:v,showChannelEmailAddress:j,openGetEmailAddressModal:K,isSlackChannelExpert:et,isAgentforceAgent:Y,experimentAgentforceGroupOn:X,isAppVIP:J}).map(e=>"separator"===e.type?n.createElement(b.bX,{key:e.key}):n.createElement(b.Dr,{key:e.key,label:e.label,onSelected:e.click,href:e.href,"data-qa":e.dataQa,autoClogProps:e.autoClogProps}));if((0,eg.Wm)(t)){let e=t.is_workflow_app&&"workspace_only"===t.org_status;return n.createElement(WorkflowProfileCardTypescript,{app:t,cardHeader:n.createElement(WorkflowProfileCardHeader,{colorHex:t.profile.color,imageUrl:es,name:ed,isError:h,externalTeam:C,isLegacyWorkflow:e}),currentUserId:k,disabledMessage:ey,isAppVIP:J})}let ex=r.slice(0,3),eE=H&&ex.length?ex.map(e=>n.createElement(b.Dr,{key:e.name,onSelected:()=>this.autoFillSlashCommand(e.name),disabled:I,"data-qa":I?"app_card_slash_command--disabled":"app_card_slash_command",autoClogProps:{elementName:"SLASH_COMMAND",appId:t.app_id,botId:x,onClick:{enableClogAction:!0}}},n.createElement(n.Fragment,null,n.createElement("div",{className:"block overflow_ellipsis"},n.createElement("strong",{className:"margin_right_25"},e.name),e.usage),n.createElement("div",{className:"p-app_profile_card__command_desc c-menu_item__description"},e.description)))):null,eC=(0,eR.DH)(t);(R&&eC||S||em)&&(e=n.createElement(N.A,{appType:(0,eR.Ov)(t),memberId:d&&d.id,appName:ed,isError:h,appHomeTeamDisplayName:S,installerIsYou:p,showChannelEmailAddress:j,isChannelEmailAddressEnabledByOrg:z,isChannelEmailAddressApp:em}));let ek=null;if(V&&a&&!$&&(ek=n.createElement(g.A,{className:"p-app_profile_card__direct_message_button",onSelected:async()=>{if(X&&Y){let{id:e}=await _((0,W.Z)({memberId:a.id,shouldNavigateToChannel:!1}));_((0,B.T)({channelId:e,isSplitView:!1}))}else _((0,W.Z)({memberId:a.id}))},autoClogProps:{elementName:"GO_TO_APP",appId:t.app_id,botId:x,onClick:{enableClogAction:!0}}},Y?e8.t("Message Agent"):e8.t("Go to App"))),em)return n.createElement(u.A,{eventId:Z.EventId.APP_PROFILE_CARD},n.createElement("div",{className:"p-app_profile_card__container","data-qa":"app_profile_card_container"},n.createElement(b.Ay,{...c,width:320,noMargin:!0,menuClassNames:"p-app_profile_card"},e,j&&n.createElement(b.bX,{noPaddingAbove:!0}),j&&eA)));if(Y){let e;if(!eb||!e_||!ef){let t;ef?e_||(t=e8.t("Temporarily unavailable, back online soon.")):t=e8.t("Slack and Salesforce are disconnected."),e=n.createElement("div",{className:i()("p-app_profile_card__deactivated_banner",{"p-app_profile_card__deactivated_banner_dark":er===m.Sx.Dark,"p-app_profile_card__deactivated_banner_light":er!==m.Sx.Dark})},n.createElement("div",{className:"p-app_profile_card__deactivated_banner_content"},n.createElement("div",{className:"p-app_profile_card__deactivated_banner_icon"},n.createElement(y.Ah,{name:"inactive",inline:!0})),n.createElement("span",{className:"p-app_profile_card__deactivated_banner_text"},e8.t("Unavailable"))),t&&n.createElement("div",{className:"p-app_profile_card__deactivated_banner_agent_unavailable"},t))}return n.createElement(u.A,{eventId:Z.EventId.APP_PROFILE_CARD},n.createElement("div",{className:i()("p-app_profile_card__container",{"p-app_profile_card--dim":!eb}),"data-qa":"app_profile_card_container"},n.createElement(b.Ay,{...c,width:320,noMargin:!0,menuClassNames:"p-app_profile_card"},e,eu,n.createElement(b.bX,{noPaddingAbove:!0,className:"padding_bottom_75"}),n.createElement(A.c,{space:"50"},ee?n.createElement("div",{className:"display_flex padding_left_100 padding_bottom_50"},n.createElement(y.Ah,{size:"20",inline:!0,name:"slack-logo"}),n.createElement("div",{className:"padding_left_50"},e8.t("Built by Slack"))):n.createElement("div",{className:"display_flex padding_left_100 padding_bottom_50"},n.createElement(y.Ah,{size:"20",inline:!0,name:"user"}),n.createElement("div",{className:"padding_left_50"},n.createElement(eI.i,{agentProfile:t})))),n.createElement(AgentProfileCardButtons,{isAgentforceChannelExpert:ee,channelId:G,isAgentforceAgent:Y,isActive:R,isUserSlackAdmin:el,canActLikeChannelManager:ea,isUserAgentManager:eo,salesforceOrgId:ei?.id,botUserId:Q||t.app_user?.id,agentId:t.app_id}),n.createElement("div",{className:"padding_left_100 padding_right_100 padding_top_25"},n.createElement("div",{className:"p-app_profile_card__ai_disclaimer"},e8.t("This tool uses generative AI, which can produce inaccurate or harmful responses."))))))}return n.createElement(u.A,{eventId:Z.EventId.APP_PROFILE_CARD},n.createElement("div",{className:"p-app_profile_card__container","data-qa":"app_profile_card_container"},n.createElement(b.Ay,{...c,width:320,noMargin:!0,menuClassNames:"p-app_profile_card"},eu,n.createElement(b.bX,{noPaddingAbove:!0}),ey,eA,eE&&n.createElement(b.bX,null),eE,e&&(ey||eE?.length||eA?.length)?n.createElement(b.bX,null):null,e,ek)))}};te.displayName="AppProfileCard",te.propTypes=e7,te.defaultProps=e9;let tt=(0,eN.A)((0,ew.em)((0,e$.N)((e,{serviceId:t,homeWorkspaceId:a,memberId:n,viewContext:r,getSiblingView:i,appId:l,getPrimaryView:o})=>{let s,c,d,m=(0,eJ.T)(e),u=i(e,{container:e6.mq.Primary})?.id,h=m?(0,H.sO)(e,{appId:l,memberId:n,serviceId:t,homeWorkspaceId:a,tryRefetchIfInstallationMissing:!0}):(0,eZ.G2)(e,{serviceId:t,homeWorkspaceId:a,memberId:n,appId:l}),_=(0,er.H7)(e),f=(0,eR.x$)(e,h),b=(0,eR.C9)(e,h),g=(0,eU.u8)(e)?(0,er.lp)(e).id:void 0,y=(0,eU.WR)(e),A=h&&(0,ex.nv)(e,(0,eR.DH)(h)),k=(0,eR.hY)(e,h),v=i(e,{container:e6.mq.Secondary}),S=[ej.Y.MESSAGE_PANE,ej.Y.CHANNEL_DETAILS_FLEXPANE,ej.Y.THREAD],I=o(e);if(v?.id===x.D.Thread){let e=(0,eD.Sb)(v?.params?.threadId);s=e?.channelId,c=e?.threadTs}else S.includes(r)&&(0,eq.A)(I?.id)&&(s=I?.id);let w=(0,e2.OL)(e,s),T=(0,ex.nv)(e,n||h&&h.app_user&&h.app_user.id),N=(0,e2.Pu)(e,T.id)?.id,M=s&&(0,e5.Sv)(e,s,n),R=s&&M.isKnown&&M.isMember&&(0,eH.I)(e,s,T),P=p.Ml;s&&h.commands&&(P=h.commands.filter(t=>(0,eO.mE)(e,t,{channelId:s,isThread:!!c}).isEnabled));let L=(0,eX.iL)(e),O=!1;if(w){let t=(0,e0.H)(e,{channelId:w.id}),a=!!t?.address;O=(0,eX.ut)(e,w)&&(a||L)}let D=(0,eR.w_)(e,h),F=D&&(0,eP.K)(e,s)&&(0,eY.A)(e,s)&&(0,eQ.A)(e,s),U=(0,eT.mr)(e),B=(0,C.oO)(e),W=(0,eL.D)(T),V=(0,E.Cq)(e,l),G=(0,H.rQ)(e,l),q=(0,eK.mF)(e,h.app_user?.id),j=(0,eR.JZ)(h),z=j?(0,e3.kO)(e,j):void 0;return{app:h,appUser:T,channelId:s,threadTs:c,commands:P,channel:w,defaultAppIcon:(0,H.Mu)(e),installedByMember:A,installerIsYou:(0,eR.UV)(e,h),isActive:(0,eR.KH)(h),isExternal:f,isOrgShared:(0,eR.nK)(e,h),showAboutApp:(0,eR.vu)(e,h),showAppSettings:(0,eR.xb)(e,h),appSettingsLink:(0,eR.FN)(e,h),appDirectoryLink:(0,eR.i1)(e,h),showSlashCommands:D,showDirectMessageItem:(0,eR.iV)(e,h),shouldShowButDisableSlashCommands:F,homeWorkspaceId:(0,eR.zq)(h)||a,currentTeam:_,externalTeam:b,clogger:(0,J.eo)({state:e}),currentEnterpriseId:g,currentUserId:y,appHomeTeamDisplayName:k,isMemberRestricted:(0,eW.sV)(e),isMemberUltraRestricted:(0,eW.AB)(e),canBeRemovedFromChannel:R,showChannelEmailAddress:O,isChannelEmailAddressEnabledByOrg:L,inAppDm:u===N,experimentAgentforceGroupOn:U,experimentAgentforceAgentHomeGroupOn:B,isAppVIP:q,isAgentforceAgent:W,isAgentforceChannelExpert:V,isSlackChannelExpert:G,canActLikeChannelManager:!!w?.id&&(0,eB.C)(e,w?.id),isUserSlackAdmin:(0,eF.Me)(e,w),isUserAgentManager:(d=(0,eU.WR)(e),h?.legacy_app?.owner_ids?.includes(d)),clientTheme:(0,e4.to)(e),agentSalesforceOrg:z}},e=>({dispatch:e,openGetEmailAddressModal:(...t)=>e((0,eS.v)(...t)),fetchChannelManagers:(...t)=>e((0,e1.y)(...t))}))(te)))},0x9a0c6349:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x21f3c49e8),l=a(0xb97b797e),o=a(0x20b4dda68),s=a(0x5739d664),c=a(0x113cdbbd7),d=a(0x944e06df),m=a(0x1b56e521c),u=a(0x18cffe646);function isInputBlock(e){return e.type===o.WP.input}var p=a(0x184825275),h=a(0x1c91944c9);let _=class extends n.Component{static defaultProps={view:void 0,renderBlockWrapper:void 0,containerId:void 0,onAction:r.A,showConfirmDialog:void 0,openFileViewer:void 0,blockKitLogPayload:void 0,viewContextTeamId:void 0};getContainerActionsPayload;constructor(e){super(e),this.getContainerActionsPayload=(0,s.A)(e=>({serviceId:e.botId,serviceTeamId:e.appInstalledTeamId,container:{type:c.pi.view,view_id:e.id}})),(0,l.v)(this,["handleAction","renderBlockWrapper"])}handleAction(e){let t,a,{view:n,onAction:r,viewContextTeamId:i}=this.props,l={serviceId:n.botId,serviceTeamId:i||n.appInstalledTeamId,container:{type:c.pi.view,view_id:n.id},actions:[e],isProfileAppView:n.type===o.cs.profile};return r&&r(e),(t=n.blocks,a=e.blockId,t.some(e=>!!isInputBlock(e)&&e.block_id===a&&!0!==e.dispatch_action))?Promise.resolve():this.props.dispatchSendActions(l)}renderBlockWrapper(e,t,a){return this.props.renderBlockWrapper?this.props.renderBlockWrapper(e,t,a):n.createElement("div",{key:t.blockId,className:`p-block_wrapper--${this.props.containerContext}_view p-${t.type}_block_wrapper--${this.props.containerContext}_view`},e)}render(){let{view:e,containerContext:t,containerId:a,showConfirmDialog:r,openFileViewer:l,blockKitLogPayload:o}=this.props;if(!e||(0,i.A)(e.blocks))return null;let s=this.getContainerActionsPayload(e);return n.createElement(m.A,{blocks:e.blocks,containerIdKey:(0,u.u)({...s?.container})},n.createElement(d.A,{serviceId:e.botId,isInAppView:!0,showConfirmDialog:r,openFileViewer:l,blocks:e.blocks,blocksContainerContext:t,container:c.pi.view,containerActionsPayload:s,onAction:this.handleAction,renderBlock:this.renderBlockWrapper,containerId:a,blockKitLogPayload:o,remountOnUpdate:!0}))}};_.displayName="AppView";let f=(0,h.N)(null,e=>({dispatchSendActions:t=>e((0,p.W)(t))}))(_)},0x13ce1b7e0:(e,t,a)=>{"use strict";a.d(t,{l:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x2286acf6c),l=a(0x20482ad21),o=a(0xfbe3141b),s=a(0x3711e82d),c=a(0x45012309),d=a(0x226892387),m=a(0x26e09454),u=a(0x1db88f2f4),p=a(0x1ccebc9ab),h=a(0x14149c126);let _=new l.Ay("apps_browser"),f=(0,n.forwardRef)(({isAppLauncher:e=!1,className:t=""},a)=>{let l=(0,r.wA)(),f=(0,d.d4)(e=>(0,c.eo)({state:e})),b=(0,d.d4)(u.RQ),g=(0,d.d4)(u.lE),y=(0,d.d4)(e=>"on"===(0,h._Z)(e,"app_gallery_refresh")),A=(0,n.useRef)((0,i.A)(t=>{t.length>0&&f.track(s.EventId.APP_INDEX_SEARCH),l((0,p.J)({isAppLauncher:e,searchInput:t}))},300));(0,n.useEffect)(()=>{let e=A.current;return()=>{e.cancel()}},[]);let x=(0,n.useCallback)(e=>{let t="";e.target.value&&(t=e.target.value),""===t.trim()&&(t=t.trim()),t!==g&&(l((0,m.X$)(t)),A.current(t))},[l,g]),E=y?_.t("Search by app name or category"):"Search by app name or category",C=_.t("Search by name or category (e.g. productivity, sales)"),k=_.t("App name or category");return n.createElement(o.A,{ref:a,className:t,placeholder:y?E:C,icon:"search",isLoading:!e&&b,onChange:x,value:g,"data-qa":"apps_browser__filter_input","aria-label":k})});f.displayName="AppsBrowserFilter"},0x1bc7b4e06:(e,t,a)=>{"use strict";a.d(t,{H:()=>deriveListVariant});let deriveListVariant=({length:e,index:t})=>{if(0!==e)return 1===e?"single":0===t?"first":t===e-1?"last":"middle"}},0x672b7add:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xbe5e39b6),l=a(0x20482ad21),o=a(0x344bb842),s=a(0x4c96e5d9),c=a(0x134520457),d=a(0x205570b9a),m=a(0x3711e82d),u=a(0x179c10470),p=a(0x226892387),h=a(0x217553e42),_=a(0xd93ecf94),f=a(0x8976310b);let b=new l.Ay("slack_docs");function ArchiveCommentButton({quipCommentThreadId:e,className:t}){let a=(0,p.d4)(t=>e?(0,f.r)(t,e):void 0),l=a?.threadTs,g=a?.channelId,y=(0,p.d4)(e=>(0,h.OL)(e,g)),A=(0,p.d4)(e=>g&&l?(0,_.Ld)(e,g,l):void 0),x=(0,p.d4)(e=>(0,c.A)(e,{message:A,channel:y})),E=(0,r.wA)(),C=(0,n.useCallback)(()=>{E((0,u.A)({channelId:g,ts:l}))},[g,l,E]),k=(0,p.d4)(d.H0),v=(0,n.useMemo)(()=>({name:"rotate"}),[]),S=(0,n.useMemo)(()=>({name:"check"}),[]);if(x){let e=A?.document_comment?.is_archived,a={uiStep:m.UiStep.VIEW_HEADER_ACTION,uiComponentVariant:e?"unarchive_comment":"archive_comment",onClick:{enableClogAction:!0}},r=k?b.t("Resolve thread"):b.t("Archive"),l=k?b.t("Re-open thread"):b.t("Unarchive"),c=e?l:r;return n.createElement(s.Ay,{tip:c,position:i.yX.BottomRight,delay:s.PK},n.createElement(o.A,{className:t,onClick:C,"aria-label":c,autoClogProps:a,svgIconProps:e?v:S}))}return null}ArchiveCommentButton.displayName="ArchiveCommentButton";let g=ArchiveCommentButton},0x1d08e7031:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x1f022ebd9),l=a(0x1bbd404d7);let o="pending",s="loaded",c="loading",d="error",AsyncImage=({renderError:e=l.Q,renderPending:t=l.Q,srcSet:a="",...m})=>{let{src:u="",...p}=m,[h,_]=(0,n.useState)(u),[f,b]=(0,n.useState)(a),g=(0,n.useRef)(new Image),[y,A]=(0,n.useState)(o);switch((0,i.A)(()=>(g.current.onload=()=>{_(g.current.src),b(g.current.srcset),A(s)},g.current.onerror=()=>{A(d)},g.current.src=u,g.current.srcset=a,()=>{g.current.onload=r.A,g.current.onerror=r.A,g.current.src="",g.current.srcset=""}),[]),(0,i.A)(()=>{y!==o&&(A(c),g.current.src=u,g.current.srcset=a)},[u,a]),y){case s:case c:return n.createElement("img",{alt:"",src:h,srcSet:f,...p});case d:return e();default:return t()}};AsyncImage.displayName="AsyncImage";let m=(0,n.memo)(AsyncImage)},0xa089d16d:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x1d08e7031).A},0x2a053a10:(e,t,a)=>{"use strict";a.d(t,{V:()=>n});let n=a(0xbad225b5).createContext(void 0)},0x63192578:(e,t,a)=>{"use strict";a.d(t,{A:()=>ec});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x237b6a339),s=a(0x1f022ebd9),c=a(0xf87a4e28),d=a(0x12edaa96a),m=a(0xc06ed72e),u=a(0x12303b2bd);function AudioPlayerHeader({id:e,name:t,size:a,duration:r,mini:i}){return n.createElement("div",{id:e,className:"c-audio_player_header"},n.createElement("div",{className:l()("c-audio_player_header__name",{"c-audio_player_header__name--mini":i}),"data-qa":"audio_player_header_name"},t),n.createElement("div",{className:"c-audio_player_header__metadata"},r&&!isNaN(r)?n.createElement("span",{className:"c-audio_player_header__time","data-qa":"audio_player_duration"},(0,m.A)(r)):"","(",n.createElement("span",{"data-qa":"audio_player_size"},(0,u.A)(a)),")"))}AudioPlayerHeader.displayName="AudioPlayerHeader";let p=AudioPlayerHeader;var h=a(0x20482ad21),_=a(0x11a296110),f=a(0x15f8e452a),b=a(0x3711e82d);let g=new h.Ay("audio_player"),y={onClick:{enableClogAction:!0},eventId:b.EventId.MSG_AUDIO_PLAY_CLICK};function AudioPlayerPlayButton({paused:e,disabled:t,onClick:a}){let r=g.t("Play",{fallbackHash:"b38828c0f94e91a25b3e7056b614ecaf60089597"});return n.createElement(_.Nm,{className:l()("c-audio_player_play_button",{"c-audio_player_play_button--disabled":t}),onClick:a,disabled:t,"aria-label":r,"aria-pressed":!e,autoClogProps:y,"data-qa":e?"audio_player_play_button":"audio_player_pause_button"},n.createElement(f.A,{type:e?"play-filled":"pause-bold"}))}AudioPlayerPlayButton.displayName="AudioPlayerPlayButton";let A=AudioPlayerPlayButton;var x=a(0xc26f5c40),E=a(0x14fad6485),C=a(0x224f7f0e9),k=a(0x137d8e1fe),v=a(0x2301c802e),S=a(0x7fbb7bb1),I=a(0x8ea23369);let w=new h.Ay("audio_player");function Scrubber({paused:e,duration:t,currentTime:a,setTime:r,waveformData:i}){let s=(0,n.useRef)(null),{embeddedUiData:c}=(0,n.useContext)(v.N),{windowRef:d}=(0,n.useContext)(E._0),m=(0,n.useCallback)(e=>{let a=s.current;if(!a)return;let n=a.getBoundingClientRect();r(Math.min(1,Math.max(0,e-n.x)/n.width)*t)},[t,r]),u=(0,n.useCallback)(e=>{m(e.pageX)},[m]),p=(0,n.useCallback)(()=>{d.deref()?.document.removeEventListener("mousemove",u),d.deref()?.document.removeEventListener("mouseup",p)},[u,d]),h=(0,n.useCallback)(e=>{0!==e.button||e.ctrlKey||(m(e.pageX),e.preventDefault(),d.deref()?.document.addEventListener("mousemove",u),d.deref()?.document.addEventListener("mouseup",p))},[u,p,m,d]),[_,f]=(0,n.useState)(!1),b=(0,n.useCallback)(()=>f(!0),[]),g=(0,n.useCallback)(()=>f(!1),[]);(0,n.useEffect)(()=>(s?.current?.toggleAttribute(x.EmbeddedUIAttributes.NO_DRAG_ON_MOUSE_MOVE,!!c),()=>{d.deref()?.document.removeEventListener("mousemove",u),d.deref()?.document.removeEventListener("mouseup",p)}),[c,u,p,d]);let y=(0,n.useCallback)(e=>{switch(e.which){case C.LE:case C.i7:r(a+1);break;case C.UQ:case C.n6:r(a-1);break;case C.w_:r(a+.1*t);break;case C.dB:r(a-.1*t);break;case C.yZ:r(0);break;case C.Kp:r(t);break;default:return}e.preventDefault()},[a,t,r]),A=t>0?a/t*100:0,T={width:`${A}%`},N=(0,n.useRef)();N.current||(N.current=(0,o.A)("scrubber-"));let M=n.createElement(n.Fragment,null,n.createElement("div",{className:"c-audio_player_scrubber__track c-audio_player_scrubber__track--elapsed",style:T}),n.createElement("div",{className:"c-audio_player_scrubber__track c-audio_player_scrubber__track--remaining"},n.createElement("div",{id:N.current,className:l()("c-audio_player_scrubber__thumb",{"c-audio_player_scrubber__thumb--paused":e}),tabIndex:0,role:"slider","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":a,"aria-valuetext":(0,k.A)(a),"aria-label":w.t("Time scrubber",{currentTime:(0,k.A)(a),totalTime:(0,k.A)(t)}),onKeyDown:y,onFocus:b,onBlur:g,"data-qa":"audio_player_scrubber__thumb"})));return n.createElement("div",{className:l()("c-audio_player_scrubber",{"c-audio_player_scrubber--with-waveform":i,"c-audio_player_scrubber--with-waveform-focus":i&&_}),onMouseDown:h,"data-qa":"audio_player_scrubber"},n.createElement("div",{className:"c-audio_player_scrubber__tracks",ref:s},i?n.createElement(S.A,null,({width:e,measureRef:t})=>{let a,r=e-e%3,l=r%6?r:r-3,o=(l+3)/6,s={width:`${l}px`};return e>0&&l>0&&o>0&&(a=n.createElement(n.Fragment,null,n.createElement(I.A,{style:s,className:"c-audio_player_scrubber__waveform",data:i.map(e=>e/100),width:o}),n.createElement("div",{className:"c-audio_player_scrubber__waveform_elapsed_wrapper",style:T},n.createElement(I.A,{style:s,data:i.map(e=>e/100),width:o})),n.createElement("div",{style:s,className:"no_opacity"},M))),n.createElement("div",{className:"full_width full_height display_flex align_items_center",ref:t},a)}):M))}Scrubber.displayName="Scrubber";let T=Scrubber;var N=a(0xb1ea448c);let M=new h.Ay("audio_player");function AudioPlayerStates({buffering:e,errored:t,mini:a}){if(t)return n.createElement("div",{className:"c-audio_player_states c-audio_player_states--error"},n.createElement(f.A,{type:"exclamation-circle-filled",className:"c-audio_player_states__error_icon",inline:!0}),!a&&M.t("Error"));if(e){let e=M.t("Buffering");return n.createElement("div",{className:"c-audio_player_states c-audio_player_states--buffering"},n.createElement(N.A,{color:"blue",size:"large",className:"c-audio_player_states__spinner"}),!a&&e)}return null}AudioPlayerStates.displayName="AudioPlayerStates";let R=AudioPlayerStates;var P=a(0xe7ed96ac),L=a(0x1d5dc623c),O=a(0x1e1bdd25f),D=a(0x1060b2cb),F=a(0x124f71042),U=a(0x1ad2b0609),B=a(0xa1832ae4),H=a(0x1ed767a16),W=a(0xc4548bcd),V=a(0xeeae4283),G=a(0xb2609f46),q=a(0x16a97f29c),j=a(0x22d443103),z=a(0x226892387),K=a(0x15f2fd44c),$=a(0x14ea3ce99),Y=a(0x1ee439e69);let Q=new h.Ay("file"),Z={name:"ellipsis-vertical-filled"},AudioClipOverflowMenu=({fileId:e})=>{let t=(0,r.wA)(),a=(0,z.d4)(Y.fu),i=(0,z.d4)(t=>(0,$.Lp)(t,e)),l=(0,D.H$)(i),o=(0,z.d4)(U.J),s=(0,n.useContext)(F.A),c=(0,n.useCallback)(r=>{let c=[{label:Q.t("Open in new window"),click:()=>{i.url_private&&(0,W.A)(i.url_private,"_blank")},show:l.open_original},{label:Q.t("Download"),show:l.download,click:()=>t((0,V.A)({file:i,action:K.c.ViewFile})),autoClogProps:{eventId:b.EventId.FILE_DOWNLOAD,elementName:"download_file",onClick:{enableClogAction:!0}}},{type:"separator",key:"separator-open-options"},{label:Q.t("Share clip\u2026"),show:l.share||l.share_private_file,click:()=>t((0,j.A)({fileId:e,isStackable:!0})),autoClogProps:{eventId:b.EventId.FILE_SHARE,elementName:"share_file",onClick:{enableClogAction:!0}}},{label:Q.t("Copy link to audio clip"),show:l.copy_file_link,click:()=>(0,H.x3)(i?.permalink),autoClogProps:{eventId:b.EventId.FILE_SHARE,elementName:"copy_link",onClick:{enableClogAction:!0}}},{label:Q.t("View details"),show:!0,click:()=>t((0,G.R)({fileId:e}))},{type:"separator",key:"separator-delete"},{label:Q.t("Delete clip"),show:l.delete_file,danger:!0,click:()=>t((0,q.A)({fileId:e,channelId:s?.channelId,threadTs:s?.threadTs,msgFileTs:s?.ts,viewContext:s?.viewContext,isStackable:!0}))},{type:"separator",key:"separator-report",show:o},{label:Q.t("Report to Slack"),click:()=>{(0,B.gC)(a,`/help/requests/report-content?u=${i?.permalink}&type=file`)},autoClogProps:{elementName:"report_audio_clip",onClick:{enableClogAction:!0}},show:l.report_file&&o&&!!i}].filter(e=>e.show||"separator"===e.type);return n.createElement(L.A,{...r,template:c,stripTerminalSeparators:!0})},[t,l,s,i,e,o,a]);return e?n.createElement(O.A,{renderMenu:c,position:"top-left"},n.createElement(P.A,{size:"small","aria-label":Q.t("More actions"),svgIconProps:Z})):null};AudioClipOverflowMenu.displayName="AudioClipOverflowMenu";var J=a(0xf2e8ab7f),X=a(0xa08c7515),ee=a(0x99320402),et=a(0x1dd9848bc),ea=a(0x252dd886b),en=a(0x238b287cf),er=a(0xf5bbd10a),ei=a(0xa12b0a9a),el=a(0x22eadb31b),eo=a(0x359ed628),es=a(0xd93ecf94);function AudioPlayer({fileId:e,fileType:t,src:a,ts:i,channelId:u,className:h,isAudioMessage:_,waveformData:f,renderTranscriptButton:g,name:y,size:x,initialDuration:E,initialPlaybackSpeed:C,audioPlaybackCoordinator:k,isPending:v,onPlay:S,onPause:I,audioPlayerStyle:w={style:"default",mini:!1},showActions:N=!0,onDurationLoad:M}){let P=(0,z.d4)(e=>u&&i?(0,es.Ld)(e,u,i):null),L=(0,r.wA)(),O=(0,n.useRef)(),[D,F]=(0,n.useState)(!1),[U,B]=(0,n.useState)(!0),[H,W]=(0,n.useState)(E),[V,G]=(0,n.useState)(),[q,j]=(0,n.useState)(!1),[K,$]=(0,n.useState)(!1);(0,n.useEffect)(()=>{H&&!isNaN(H)&&M&&M(H)},[H,M]);let Y=(0,z.d4)(X.n),Q=(0,n.useRef)();Q.current||(Q.current=(0,o.A)("audio-player-header-"));let Z=(0,en.A)(),ec=(0,n.useRef)();ec.current=Z;let ed=(0,er.A)(),em=(0,n.useRef)();em.current=ed;let eu=(0,n.useRef)(!1),ep=(0,n.useRef)(!1),eh=(0,n.useRef)(!1),e_=(0,n.useCallback)(()=>{eu.current&&ep.current&&!eh.current&&(ec.current?.track(b.EventId.MSG_AUDIO_PLAY_SUCCESS),eh.current=!0)},[]),ef=(0,ei.d)(d.A),eb=(0,n.useRef)(),eg=(0,n.useRef)(0),ey=(0,n.useRef)(!1),eA=(0,ei.d)(()=>_?{file_id:e,media_type:"audio",subtype:"slack_audio",playback_session:ef,duration_ms:H?1e3*H:void 0}:void 0),ex=(0,n.useCallback)(()=>{eA&&ep.current&&!ey.current&&(eb.current&&(eg.current+=Date.now()-eb.current,eb.current=void 0),ec.current?.track(b.EventId.MEDIA_PLAYER,{...eA,duration_watched_ms:eg.current,contexts:{ui_context:{ui_step:"embedded",action:"impression",ui_properties:{element_type:"audio",element_name:"playback_finished"}}}}),ey.current=!0)},[eA]),eE=(0,n.useCallback)(()=>{P&&L((0,eo.A)({msg:P,payload:{file_type:t,subtype:"audio_play",item_id:e,item_type:"F",contexts:{ui_context:{ui_properties:{element_name:"media_player",element_value:"play_audio_file"}}}}}))},[L,P,e,t]);(0,s.A)(()=>{eA&&(e&&(eA.file_id=e),H&&(eA.duration_ms=1e3*H))},[e,H]),(0,s.A)(()=>()=>ex(),[]),(0,n.useEffect)(()=>{U||(eb.current=Date.now()),U&&eb.current&&(eg.current+=Date.now()-eb.current,eb.current=void 0)},[U]);let eC=(0,el.x)(),ek=(0,ei.d)(()=>{if(!_)return;let t=eC.createMetricsTrace({label:"media_player:metrics",tags:{file:e,media_type:"audio"},samplingOptions:{sampleRate:.2,sampleType:c.tS.SESSION}});return t.count({name:"stall",value:0}),t}),ev=(0,ei.d)(()=>({}));(0,s.A)(()=>()=>{ek&&(ek.addTags({duration:O.current?.currentTime}),eC.reportTrace(ek))},[]);let eS=(0,n.useCallback)(e=>{O.current&&(O.current.currentTime=e,F(!0),O.current.paused&&O.current.play())},[]);(0,n.useEffect)(()=>{if(_)return ea.A.register({id:a,src:a,play:()=>{O?.current?.play()},pause:()=>{O?.current?.pause()},seek:e=>{O.current&&(O.current.currentTime=e)},audioRef:O}),()=>{ea.A.unregister(a)}},[_,a,eS]);let eI=(0,ee.A)({fileId:e});(0,et.A)({fileId:e,elapsedMs:(V??eI)*1e3,durationMs:(H??0)*1e3,isPlaying:!U}),(0,s.A)(()=>{k?O.current=k.getAudio(a):O.current=new Audio(a),"metadata"!==O.current.preload&&(O.current.preload="metadata"),Y?(O.current&&(O.current.currentTime=eI),G(eI)):G(O.current?.currentTime),B(O.current?.paused),O.current?.duration&&isFinite(O.current?.duration)&&W(O.current?.duration),O.current?.error&&$(!0);let onDurationChange=()=>{G(O.current?.currentTime),O.current?.duration&&isFinite(O.current?.duration)&&W(O.current?.duration)},onPlay=()=>{B(!1),ek&&ev.ttff?.start!==void 0&&void 0===ev.ttff.end&&(ev.ttff.end=performance.now(),ek.store({name:"time_to_first_frame_ms",value:ev.ttff.end-ev.ttff.start})),ep.current||ec.current?.track(b.EventId.MEDIA_PLAYER,{...eA,contexts:{ui_context:{ui_step:"embedded",action:"impression",ui_properties:{element_name:"media"}}}}),ep.current=!0,e_(),eE(),_&&ea.A.playbackStarted(a),S&&S()},onPause=()=>{B(!0),I&&I()},onTimeUpdate=()=>{G(O.current?.currentTime)},onCanPlay=()=>{j(!1),$(!1),eu.current=!0,e_()},onStalled=()=>{j(!0),ek&&O.current?.duration!==void 0&&O.current.duration>0&&ek.count({name:"stall"})},onError=()=>{$(!0),ec.current?.track(b.EventId.MSG_AUDIO_PLAY_FAILURE);let e=O.current;if(!e)return;let t=e.error;if(t){let a=`media error code: ${t.code}. message: "${t.message.replace(e.src,"[redacted-src]")}"`;em.current?.error("AUDIO-PLAYER",a)}},onEnded=()=>{ex()};return O.current.addEventListener("durationchange",onDurationChange),O.current.addEventListener("play",onPlay),O.current.addEventListener("pause",onPause),O.current.addEventListener("timeupdate",onTimeUpdate),O.current.addEventListener("canplay",onCanPlay),O.current.addEventListener("playing",onCanPlay),O.current.addEventListener("stalled",onStalled),O.current.addEventListener("error",onError),O.current.addEventListener("ended",onEnded),()=>{O.current?.removeEventListener("durationchange",onDurationChange),O.current?.removeEventListener("play",onPlay),O.current?.removeEventListener("pause",onPause),O.current?.removeEventListener("timeupdate",onTimeUpdate),O.current?.removeEventListener("canplay",onCanPlay),O.current?.removeEventListener("playing",onCanPlay),O.current?.removeEventListener("stalled",onStalled),O.current?.removeEventListener("error",onError),O.current?.addEventListener("ended",onEnded),k?k.releaseAudio(a):O.current?.paused||O.current?.pause()}},[a,e_,k,S,I]);let ew=(0,n.useCallback)(()=>{let e=O.current;if(!e)return;F(!0),C&&(e.playbackRate=C);let t=e.error?.code;if(t)switch(t){case 1:case 2:{let t=e.currentTime;e.load(),e.currentTime=t,e.play();return}case 3:case 4:return;default:return void em.current?.warn("AUDIO-PLAYER",`unknown error code ${t}`)}e.paused?(e.play(),ek&&!ev.ttff&&(ev.ttff={start:performance.now()}),eA&&ec.current?.track(b.EventId.MEDIA_PLAYER,{...eA,contexts:{ui_context:{ui_step:"embedded",action:"click",ui_properties:{element_type:"button",element_name:"play"}}}})):(e.pause(),eA&&ec.current?.track(b.EventId.MEDIA_PLAYER,{...eA,contexts:{ui_context:{ui_step:"embedded",action:"click",ui_properties:{element_type:"button",element_name:"pause"}}}}))},[C,ek,ev,eA]),eT=(0,n.useCallback)(e=>{O.current&&(O.current.playbackRate=e)},[]);if(!a)return null;let eN=!D||U&&0===V?H:V,eM=n.createElement(A,{paused:U||K,onClick:ew,disabled:v}),eR=void 0!==eN&&!isNaN(eN)&&eN!==1/0&&n.createElement("div",{className:"c-audio_player__time","data-qa":"audio_player_time"},(0,m.A)(eN)),eP=n.createElement(T,{paused:U,duration:H||0,currentTime:V||0,setTime:eS,waveformData:f}),{style:eL,mini:eO}=w;return n.createElement("div",{className:l()("c-audio_player",{"c-audio_player--flat":"default"===eL,"c-audio_player--audio_message":_},h),"data-qa":"audio_player"},"default"===eL?n.createElement(n.Fragment,null,eM,eP,eR,!eO&&g?.(eS),!eO&&n.createElement(J.A,{onSpeedChange:eT}),!eO&&N&&n.createElement(AudioClipOverflowMenu,{fileId:e})):n.createElement(n.Fragment,null,n.createElement("div",{className:"c-audio_player__header_container"},eM,n.createElement(p,{id:Q.current,name:y,size:x,duration:H,mini:eO}),n.createElement(R,{buffering:q&&!U,errored:D&&K,mini:eO})),!eO&&n.createElement("div",{className:"c-audio_player__controls","data-qa":"audio_player_controls"},eP,eR)))}AudioPlayer.displayName="AudioPlayer";let ec=AudioPlayer},0xc06ed72e:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__=function(e){let t=Math.floor(e/3600),a=Math.floor((e-3600*t)/60),n=Math.floor(e-3600*t-60*a),r=n<10?`0${n}`:`${n}`;if(t>0){let e=a<10?`0${a}`:`${a}`;return`${t}:${e}:${r}`}return`${a}:${r}`}},0x137d8e1fe:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});let n=new(a(0x20482ad21)).Ay("audio_player"),__WEBPACK_DEFAULT_EXPORT__=function(e){let t=Math.floor(e/3600),a=Math.floor((e-3600*t)/60),r=Math.floor(e-3600*t-60*a);return t>0?n.t("{hours} {hours, plural, =1 {hour} other {hours}}, {minutes} {minutes, plural, =1 {minute} other {minutes}}, {seconds} {seconds, plural, =1 {second} other {seconds}}",{seconds:r,minutes:a,hours:t}):a>0?n.t("{minutes} {minutes, plural, =1 {minute} other {minutes}}, {seconds} {seconds, plural, =1 {second} other {seconds}}",{seconds:r,minutes:a}):n.t("{seconds} {seconds, plural, =1 {second} other {seconds}}",{seconds:r})}},0x6508b5ff:(e,t,a)=>{"use strict";a.d(t,{D9:()=>createUsableStructShape,Qf:()=>cloggerTrackAutoClogRef,W$:()=>autoClogTrack,XZ:()=>callChildAutoClogAction,Xi:()=>getNewProps,hO:()=>setViewerDots,hp:()=>callChildActionFunction,nj:()=>sanitizePropValues,nv:()=>getViewerDots,oN:()=>getAutoClogTrackContexts,xZ:()=>removeViewerDots});var n=a(0xbad225b5),r=a(0x6258badf),i=a(0x1598e5174),l=a(0x21f3c49e8),o=a(0xca924ee1),s=a(0xca5fbbb6),c=a(0x18f2150ea),d=a(0x125763ad),m=a(0x77727995),u=a(0xb77a689a),p=a(0x839ba347),h=a(0x244f35bf8),_=a(0x13d24b8d1),f=a(0x33644bb7),b=a(0x18dac2b8e),g=a(0x22480f425),y=a(0x5c9a86a5),A=a(0x3711e82d);let x="slack_autoclog_last_clog",E="slack_autoclog_last_clog_set_on_action",C="slack_autoclog_viewer_dots",removeSessionStorageItemByKey=(e,t)=>{t.sessionStorage?.removeItem(e)},getViewerDots=(e,t)=>{let a=t.sessionStorage?t.sessionStorage.getItem(`${C}`):"";if(a)try{return JSON.parse(a)}catch(t){e?.validationLogger?.logValidationMessage(`Something is wrong with AutoClog-Utils getViewerDots, please contact #proj-auto-clogging and tell them about this error: ${t}`,e)}return null},setViewerDots=(e,t,a)=>{try{a.sessionStorage?.setItem(`${C}`,JSON.stringify(t))}catch(t){e?.validationLogger?.logValidationMessage(`Something is wrong with AutoClog-Utils setViewerDots, please contact #proj-auto-clogging and tell them about this error: ${t}`,e)}},removeViewerDots=e=>{removeSessionStorageItemByKey(`${C}`,e)},getLastClogData=(e,t,a)=>{let n=t.sessionStorage?t.sessionStorage.getItem(e):"";if(n)try{return JSON.parse(n)}catch(e){a?.validationLogger?.logValidationMessage(`Something is wrong with AutoClog getLastClogData, please contact #proj-auto-clogging and tell them about this error: ${e}`,a)}return null},setLastClogData=(e,t,a,n)=>{try{a.sessionStorage?.setItem(e,JSON.stringify(t))}catch(e){n?.validationLogger?.logValidationMessage(`Something is wrong with AutoClog-Utils setLastClogData, please contact #proj-auto-clogging and tell them about this error: ${e}`,n)}},isOmittableContextField=e=>void 0===e||""===e||null===e||(0,i.A)(e)&&(0,l.A)(e),k=(0,o.A)((e={})=>(0,s.A)(e)),sanitizePropValue=(e,t)=>{let a;switch(t){case"eventId":a=A.EventId;break;case"elementType":a=A.ElementType;break;case"action":a=A.UiAction;break;case"uiElement":a=A.UiElement}return k(a)[e]},sanitizePropValues=e=>{let t={};return["eventId","elementType","action","uiElement"].forEach(a=>{let n=e[a];(0,c.A)(n)&&(t[a]=sanitizePropValue(n,a))}),(0,l.A)(t)?e:(0,d.A)({},e,t)},v=["eventId","uiStep","uiPage"],S={},createTagPaths=(e,t="",a=!1)=>{a||(S={}),(0,p.A)(e,(a,n)=>{let r="";r=(0,h.A)(e)?0===t.length?`[${n}]`:`${t}[${n}]`:0===t.length?`${n}`:`${t}.${n}`,(0,u.A)(a)?S[a]=r:createTagPaths(a,r,!0)})},I={},createUsableStructShape=e=>{let t=e.struct,a=I[t.name];if(a)return{...t,shape:a};createTagPaths(t.shape);let n={...t,shape:S};return I[t.name]=S,n},w=new y.A(20),getAutoClogTrackContexts=(e,t)=>{var a;let n;if((0,l.A)(e))return null;let r=(0,b.KV)()||(0,g.A)()?e:sanitizePropValues(e),i={...((e,t)=>{let{eventId:a,disableAutoReferringUiContext:n,disableAutoEntryPoint:r}=e,i={},l=getLastClogData(E,t,e);if(l&&(i.referringUiContext=(0,m.A)(l,"contexts.ui_context",void 0),i.referringEventId=(0,m.A)(l,"event_id",void 0)),!n||!r){let o=getLastClogData(x,t,e);if(o){if(!n){let a,n;(a=e.autoReferringUiContextKeys||v,n=e.struct.shape,a.some(t=>e[t]!==(0,m.A)(o,n[t],void 0)))?(i.referringUiContext=(0,m.A)(o,"contexts.ui_context",void 0),i.referringEventId=(0,m.A)(o,"event_id",void 0),removeSessionStorageItemByKey(E,t)):l||(i.referringUiContext=(0,m.A)(o,"contexts.referring_ui_context",void 0),i.referringEventId=(0,m.A)(o,"referring_event_id",void 0))}r||(o.event_id!==a?i.entryPoint=(e=>{let t,a=(0,m.A)(e,"contexts.ui_context.ui_page",void 0);if(!a){let t=(0,m.A)(e,"event_id",void 0);t&&!(0,u.A)(t)&&(t=sanitizePropValue(t,"eventId")),t&&(a=t.toLowerCase())}if(!a)return;let n=(0,m.A)(e,"contexts.ui_context.ui_step",void 0);if(n){let a=(0,m.A)(e,"contexts.ui_context.step_variant",void 0);t=a?`${n}.${a}`:n}else{let a=(0,m.A)(e,"contexts.ui_context.ui_component_name",void 0);if(a){let n=(0,m.A)(e,"contexts.ui_context.ui_component_variant",void 0);t=n?`${a}.${n}`:a}}return t?`${a}-${t}`:a})(o):i.entryPoint=(0,m.A)(o,"contexts.ui_context.entry_point",void 0))}}return i})(r,t),...r};n={...a=i},(0,p.A)(n,(e,t)=>{(!a.struct.shape[t]||isOmittableContextField(e))&&delete n[t]});let o=((e,t)=>{if(e.customClogFunction)return null;try{return JSON.stringify(t)}catch(t){e.validationLogger?.logValidationMessage(`Something is wrong with AutoClog-Utils getAutoClogTrackContexts JSON.stringify(props), please contact #proj-auto-clogging and tell them about this error: ${t}`,e)}return null})(e,i=n);if(o){let e=w.read(o);if(e)return e}if(e.customClogFunction&&(!(i=e.customClogFunction({...i}))||(0,l.A)(i)))return null;let s={};return(0,p.A)(i,(t,a)=>{let n=e.struct.shape[a];if(e.struct.tagConfigs[a]?.isSpreadableCatchAll){let e,a=0===(e=n.split(".")).length?"":(e.pop(),e.join("."));(0,p.A)(t,(e,t)=>{if(!isOmittableContextField(e)){let n=0===a.length?`${t}`:`${a}.${t}`;(0,_.A)(s,n,e)}})}else(0,_.A)(s,n,t)}),o&&w.write(o,s),s},autoClogTrack=(e,t)=>{let{clogger:a,setSavedViewerClog:n,shouldSendDataAndEmptyQueueOnTrack:r}=e;if(a){let i=getAutoClogTrackContexts(e,t);if(!i)return null;let{event_id:l,...o}=i;return a.track(l,{...o,requireSession:e.requireSession}),(0,f.A)(n)&&n(i),r&&a.sendDataAndEmptyQueue(),i}return null},cloggerTrackAutoClogRef=(e,t,a)=>{(0,i.A)(a)?autoClogTrack((0,d.A)({},e,a),t):autoClogTrack(e,t)},getNewProps=(e,t)=>{let a={...e},n=(0,m.A)(e,"elementValue",void 0);return void 0===n&&(n=((e,t)=>{if(!e||(0,l.A)(t))return;let a=t[0];if(!((0,i.A)(a)&&(a=(0,u.A)(e)?a?.setElementValueOnAction:a?.target?.type==="checkbox"?a?.target?.checked:a?.value||a?.target?.value,(0,i.A)(a))))return a})(e.setElementValueOnAction,t),(0,_.A)(a,"elementValue",n)),void 0!==n&&e.setElementValueForAdditionalKey&&(0,_.A)(a,e.setElementValueForAdditionalKey,n),a},callChildActionFunction=(e,t,a)=>{if(n.isValidElement(e))return e.props[t]?.apply(e,a)},callChildAutoClogAction=(e,t,a,n)=>{let i=null;if(e.enableClogAction&&(e.sendOnlyOnce?0===a&&(i=autoClogTrack(e,n),t()):i=autoClogTrack(e,n),!i||e.disableAutoReferringUiContext&&e.disableAutoEntryPoint||setLastClogData(x,i,n,e)),e.setReferringUiContextOnAction){let t;i||(i=getAutoClogTrackContexts(e,n)),i&&(t=i,setLastClogData(E,(0,r.A)(t,["contexts.referring_ui_context"]),n,e))}}},0x476eff14:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n=a(0xbad225b5),r=a(0x6258badf),i=a(0x658a411c),l=a(0x217f0c263),o=a(0x1229d92d),s=a(0xb97b797e),c=a(0x16cf1da63),d=a(0xd4787de9),m=a(0x21f3c49e8),u=a(0xd4e00a1e),p=a(0x1f355b555),h=a(0x16998c9bf),_=a(0xb1ea448c);let f=n.lazy(()=>a.e("bar-chart").then(a.bind(a,0x253b67cfd))),BarChart=({analyticsResponseData:e})=>{let t=(0,n.useMemo)(()=>e?.map(e=>e?.ds||"error: unknown date").reverse()||[],[e]),a=(0,n.useMemo)(()=>e?.map(e=>e?.count||0).reverse()||[],[e]),r=(0,n.useMemo)(()=>[["count",...a]],[a]);return n.createElement(n.Suspense,{fallback:null},n.createElement(f,{id:"autoclog-analytics-bar-chart",columnNames:t,columnData:r,isEmpty:!1}))};BarChart.displayName="BarChart";var b=a(0x1e4ad58a2),g=a(0x1ee57b3a0),y=a(0x1fa67866c),A=a(0x2501a2cee),x=a(0x2be3dfd3);let CollapsibleDebugCard=({header:e,helpContent:t,content:a})=>{let[r,i]=(0,n.useState)(!1),l=(0,n.useCallback)(()=>{i(!r)},[r]);return n.createElement(b.A,null,n.createElement(g.A,null,n.createElement("div",{role:"button",onClick:l,"aria-expanded":r,tabIndex:0,style:{cursor:"pointer"}},n.createElement(x.A,{alignItems:"center"},n.createElement("h3",null,e),n.createElement(A.Ah,{name:r?"caret-up":"caret-down",inline:!0})))),r&&n.createElement(y.A,null,t&&n.createElement("div",{style:{marginBottom:"4px"}},t),n.createElement("pre",null,a)))};CollapsibleDebugCard.displayName="CollapsibleDebugCard";let E=["all","free","std","plus","enterprise","compliance"],C={all:"All product levels",free:"Free",std:"Pro",plus:"Business+",enterprise:"Enterprise",compliance:"Compliance"},k=new Set(["referring_ui_context","page_url","entry_point","product_id","promo_type","promo_subtype"]),getFlattenedPayloadKeyValues=({autoClogPayload:e,path:t="",flattenedPayloadKeyValuesArray:a=[],isIncludedByDefault:n=!0})=>{for(let[r,i]of Object.entries(e)){let e=n&&!k.has(r),l=""===t?`${r}`:`${t}.${r}`;"object"!=typeof i?a.push({value:i,path:l,isIncludedByDefault:e}):getFlattenedPayloadKeyValues({autoClogPayload:i,path:l,flattenedPayloadKeyValuesArray:a,isIncludedByDefault:e})}return a},v=new Set(["event_id","contexts.ui_context.action"]),Form=({isFetchingData:e,formValues:t,onChange:a,onSubmit:r,flattenedPayloadKeyValues:i=[]})=>n.createElement(n.Fragment,null,n.createElement("h2",null,"Clog Analytics Form"),n.createElement("div",{style:{fontSize:"14px",margin:"4px 0"}},`By clicking on the Run button below, you can fetch analytics results for this component's
				clogs! We write and run the SQL for you!`),n.createElement("form",{onSubmit:r},n.createElement("div",{style:{marginBottom:"12px"}},n.createElement(x.A,{flexDirection:"column"},n.createElement("div",{style:{marginBottom:"4px"}},n.createElement("strong",null,"Query Period")),n.createElement(x.A,{flexDirection:"row"},n.createElement("div",{style:{marginRight:"12px"}},n.createElement(x.A,{gap:4},n.createElement("label",{htmlFor:"startDate"},"Start Date"),n.createElement("input",{type:"date",id:"startDate",name:"startDate",onChange:a,value:t.startDate,max:(0,p.Ay)(t.endDate).format("YYYY-MM-DD"),required:!0}))),n.createElement(x.A,{gap:4},n.createElement("label",{htmlFor:"endDate"},"End Date"),n.createElement("input",{type:"date",id:"endDate",name:"endDate",onChange:a,value:t.endDate,min:(0,p.Ay)(t.startDate).format("YYYY-MM-DD"),max:(0,p.Ay)().subtract(1,"day").format("YYYY-MM-DD"),required:!0}))),n.createElement("div",{style:{fontSize:"14px",marginTop:"4px"}},"We recommend running queries for short periods, at least under one month. Long queries may time out. Also, analytics data is usually not available for today. So the most recent End Date you can select is yesterday. Sometimes data even from yesterday may not be available, which you may notice if your End Date is yesterday and the Run results bar chart does not have a bar for yesterday."),n.createElement("label",{htmlFor:"productLevel",style:{fontWeight:"bold",margin:"4px 0 8px"}},"Product Level"),n.createElement("select",{id:"productLevel",name:"productLevel",onChange:a,value:t.productLevel,style:{width:"250px"}},E.map(e=>n.createElement("option",{value:e,key:e},C[e]))),n.createElement("div",{style:{marginTop:"8px"}},n.createElement("div",null,n.createElement("strong",null,"Clog Payload Data Included In Query")),n.createElement("div",{style:{fontSize:"14px",margin:"4px 0 8px"}},"Choose what clog payload key-values to include in the SQL query. Some key-values cannot be excluded and are disabled because they are required or highly relevant. Others we uncheck by default because they are too specific to include for general analytics insights (but you can include/check them for a more specific query). Also, you may choose to uncheck/exclude certain key-values if you think they are too specific for the analytics results you want."),n.createElement(x.A,{flexDirection:"column",gap:4},i.map(e=>{let r;return n.createElement("div",{key:e.path},n.createElement(x.A,{alignItems:"end",gap:4},n.createElement("input",{type:"checkbox",onChange:a,value:e.path,name:"payloadCheckboxArray",disabled:(r=e.path,v.has(r)),checked:t.payloadCheckboxArray.includes(e.path)}),n.createElement("label",{htmlFor:e.path},`${e.path} = ${e.value}`)))}))),n.createElement("button",{className:"c-button c-button--primary c-button--medium",type:"submit",style:{margin:"20px 0"}},e?"Stop":"Run")))));Form.displayName="Form";var S=a(0x20dc45706),I=a(0x238b287cf),w=a(0x3711e82d);let InvalidColumnInfo=({invalidColumns:e})=>n.createElement("div",{className:"p-autoclog_analytics_viewer__invalid_column_info"},n.createElement("h4",null,"Clog Keys Excluded From SQL Query"),n.createElement("div",null,"Please note that the following clog data keys were excluded from the SQL query because we could not process them:"),n.createElement("div",{className:"p-autoclog_analytics_viewer__invalid_column_info_excluded_keys"},e?.join(", ")),n.createElement("div",null,"Please see the Clog Data Payload at top of the modal to find the corresponding excluded key-value pairs. If you visit the Data Warehouse Explorer, see below, you may want to try to include the excluded keys in your SQL query. You can try to find the excluded keys in the schema for the dw.daily_clog table. The schema is available in the Explorer tool. The excluded keys may be one of the column names for the table. Try finding the closest match and using it in your query. Also, please let us know about this issue in #proj-auto-clogging."));InvalidColumnInfo.displayName="InvalidColumnInfo";let AnalyticsPageInfo=({queryString:e})=>n.createElement(CollapsibleDebugCard,{header:"Analytics Page and SQL Query Information",helpContent:n.createElement(n.Fragment,null,"If you want to try to run the SQL query to obtain these analytics directly on the analytics page, please visit"," ",n.createElement("a",{href:"https://analytics.tinyspeck.com/v2/explore",target:"_blank",rel:"noreferrer"},"Data Warehouse Explorer")," ","and copy and paste this query into the query section and click on Run on that page:"),content:e});AnalyticsPageInfo.displayName="AnalyticsPageInfo";let QueryFailed=()=>n.createElement("div",{className:"p-autoclog_analytics_viewer__query_failed"},n.createElement("h4",null,"Query Failed"),n.createElement("div",null,"Something went wrong trying to fetch the analytics from the data warehouse. Please let us know about this issue in #proj-auto-clogging."));QueryFailed.displayName="QueryFailed";let QueryTimedOut=()=>n.createElement("div",{className:"p-autoclog_analytics_viewer__query_timed_out"},n.createElement("h4",null,"Query Timed Out"),n.createElement("div",null,"The query has timed out. Please try using analytics page below to run the query. Please let us know about this issue in #proj-auto-clogging."));QueryTimedOut.displayName="QueryTimedOut";let QueryPending=({queryTimeElapsed:e})=>n.createElement("div",{className:"p-autoclog_analytics_viewer__query_pending"},n.createElement("div",{className:"p-autoclog_analytics_viewer__query_pending_running_query"},n.createElement(_.A,{color:"blue",size:"medium"}),n.createElement("h4",null,"Running SQL query..."),n.createElement(_.A,{color:"blue",size:"medium"})),n.createElement("div",{style:{marginBottom:"4px"}},"The query has been running for ",Math.round(e/1e3)," seconds. Please note that these queries can take up to five minutes, or even more, to run. You can wait for results here or you can try visiting the analytics page and running the query there, but it likely will not be faster. See Analytics Page and SQL Query Information section below."));QueryPending.displayName="QueryPending";let AutoClogAnalyticsResultsSection=({analyticsResponseData:e,autoClogPayload:t,invalidColumns:a,queryString:r,queryError:i,queryTimeElapsed:l,isFetchingData:o,isQueryTimedOut:s})=>{let c=!(0,m.A)(a),d=!!(i&&i!==S.u.QueryIncomplete),u=o&&!e&&!d,p=!o&&e,h=0,_="";return p&&(_=t?.contexts?.ui_context?.action||"event",e.forEach(e=>{e?.count&&(h+=e.count)})),n.createElement("div",{className:"p-autoclog_analytics_viewer__results_section"},p&&n.createElement(n.Fragment,null,n.createElement("h4",null,`Analytics Results: In the date range you selected, the total number of ${_.toLowerCase()}s was ${h}.`," "),n.createElement(BarChart,{analyticsResponseData:e})),!o&&d&&n.createElement(QueryFailed,null),!o&&s&&n.createElement(QueryTimedOut,null),u&&n.createElement(QueryPending,{queryTimeElapsed:l}),r&&c&&n.createElement(InvalidColumnInfo,{invalidColumns:a}))};AutoClogAnalyticsResultsSection.displayName="AutoClogAnalyticsResultsSection";let AutoClogAnalyticsViewer=({autoClogPayload:e,context:t})=>{let a=(0,c.wA)(),r=(0,n.useRef)(null),i=(0,I.A)(),[l,o]=(0,n.useState)(null),[s,m]=(0,n.useState)(""),[_,f]=(0,n.useState)(0),[b,g]=(0,n.useState)(null),[y,A]=(0,n.useState)(null),[x,E]=(0,n.useState)(!1),[C,k]=(0,n.useState)(!1),[v,T]=(0,n.useState)(!1);(0,n.useEffect)(()=>()=>clearInterval(r.current),[r]);let N=(0,n.useCallback)(e=>{g(e),E(!1),T(!1)},[g,E,T]),M=(0,n.useCallback)(e=>{o(e),E(!1),T(!1)},[o,E,T]),R=(0,n.useCallback)(n=>{let l=(0,u.A)(e,n.payloadCheckboxArray),pollAnalyticsClogData=async({queryToken:e})=>{let i=0;f(0),r.current=setInterval(async()=>{(i+=1)>=90&&(clearInterval(r.current),k(!0),E(!1));try{let t=await a((0,S.h)({clogData:l,queryToken:e,reason:"fetch clog data - retry with queryToken",async:!0,queryFilters:{start_ds:n.startDate,end_ds:n.endDate,productLevel:"all"===n.productLevel?void 0:n.productLevel}}));t?.query_response&&(M(t.query_response),clearInterval(r.current))}catch(a){let e=(0,h.WY)(a);e!==S.u.QueryIncomplete&&(t?.validationLogger?.logValidationMessage(`Something went wrong in the setInterval fetch inside fetchAnalyticsClogData in AutoClogAnalyticsViewer, please contact #proj-auto-clogging and tell them about this error: ${e}, ${(0,h.u1)(a)}`,t),N(e),clearInterval(r.current))}f(2e3*i)},2e3)};(async()=>{i.track(w.EventId.ANALYTICS_EVENT,{contexts:{ui_context:{action:w.UiAction.CLICK,ui_properties:{element_value:"autoclog_analytics_viewer_run"}}}}),k(!1),o(null),E(!0);try{let e=await a((0,S.h)({clogData:l,reason:"fetch clog data",async:!0,queryFilters:{start_ds:n.startDate,end_ds:n.endDate,productLevel:"all"===n.productLevel?void 0:n.productLevel}})),t=e?.query||"";m(t.replace(/ AND/g,`
AND`)),A(e?.invalid_columns||null),e?.query_response?M(e.query_response):e?.query_token&&pollAnalyticsClogData({queryToken:e.query_token})}catch(e){t?.validationLogger?.logValidationMessage(`Something went wrong in fetchAnalyticsClogData in AutoClogAnalyticsViewer, please contact #proj-auto-clogging and tell them about this error: ${(0,h.WY)(e)},  ${(0,h.u1)(e)}`,t),N((0,h.WY)(e))}})()},[o,e,t,r,a,i,N,M]),P=(0,n.useCallback)(()=>{clearInterval(r.current),E(!1)},[E]),L=(0,n.useMemo)(()=>getFlattenedPayloadKeyValues({autoClogPayload:e}),[e]),O=(0,d.Wx)({initialValues:{startDate:(0,p.Ay)().subtract(5,"day").format("YYYY-MM-DD"),endDate:(0,p.Ay)().subtract(1,"day").format("YYYY-MM-DD"),productLevel:"all",payloadCheckboxArray:L.filter(e=>e.isIncludedByDefault).map(e=>e.path)},onSubmit:e=>{x?P():R(e)}}),D=(0,n.useCallback)(e=>{T(!0),O.handleChange(e)},[O]);return n.createElement("div",{className:"p-autoclog_analytics_viewer"},n.createElement(Form,{isFetchingData:x,flattenedPayloadKeyValues:L,formValues:O.values,onChange:D,onSubmit:O.handleSubmit}),(!v||x)&&n.createElement(AutoClogAnalyticsResultsSection,{isFetchingData:x,analyticsResponseData:l,autoClogPayload:e,invalidColumns:y,queryString:s,queryError:b,queryTimeElapsed:_,isQueryTimedOut:C}),s&&n.createElement(AnalyticsPageInfo,{queryString:s}))};AutoClogAnalyticsViewer.displayName="AutoClogAnalyticsViewer";var T=a(0x6508b5ff);let N={content:{top:"50%",left:"50%",right:"auto",bottom:"auto",transform:"translate(-50%, -50%)",border:0,padding:0,background:"transparent"},overlay:{backgroundColor:"rgba(208, 208, 208, 0.4)",zIndex:1e4}},M=class extends n.PureComponent{viewerDotElementRef=n.createRef();clogContext="";viewerDotKey="";viewerDots={};rect=null;constructor(e){super(e),this.state={style:e.style||{},isModalOpen:!1},(0,s.v)(this,["openModal","closeModal"])}componentDidMount(){let{context:e,windowRef:t}=this.props,a=this.viewerDotElementRef?.current?.getBoundingClientRect(),n=t.deref();a&&this.clogContext&&n&&(this.viewerDots=(0,T.nv)(e,n)||{},this.rect=this.setOverlappingStyle(a),this.viewerDotKey=this.getViewerDotKey(),(0,T.hO)(e,{...this.viewerDots,[this.viewerDotKey]:this.rect},n))}componentWillUnmount(){let{context:e,windowRef:t}=this.props,a=t.deref();a&&(0,T.hO)(e,{...(0,r.A)((0,T.nv)(e,a),this.viewerDotKey)},a)}getViewerDotKey(){let{context:e}=this.props,t=this.clogContext;try{t+=JSON.stringify(this.rect,null,2)}catch(t){e?.validationLogger?.logValidationMessage(`Something is wrong with the getViewerDotKey function in the AutoClog viewer, please contact #proj-auto-clogging and tell them about this error: ${t}`,e)}return t}getIsAnyOverlapping(e){return(0,i.A)(this.viewerDots,t=>this.getIsOverlapping(e,t))}getIsOverlapping(e,t){return!(e.right<t.left||e.left>=t.right||e.bottom<t.top||e.top>t.bottom)}getClogPayload(){let{context:e,windowRef:t}=this.props,a=(0,r.A)((0,T.oN)(e,t.deref()),["contexts.referring_ui_context","referring_event_id"]),n="";try{n=JSON.stringify(a,null,2)}catch(t){e?.validationLogger?.logValidationMessage(`Something is wrong with the getClogPayload function in the AutoClog viewer, please contact #proj-auto-clogging and tell them about this error: ${t}`,e)}return{stringifiedAutoClogPayload:n,autoClogPayload:a}}setLocalOverlappingStyle(e){this.setState(t=>{let a={...t.style},n=15*e;return a.left=t.style.left?`${+t.style.left+n}px`:`${n}px`,{...t,style:a}})}setOverlappingStyle(e){let t={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y},a=this.getIsAnyOverlapping(t),n=0;for(;a&&n<50;)t.left+=15,t.right+=15,t.x+=15,n+=1,a=this.getIsAnyOverlapping(t);return n&&this.setLocalOverlappingStyle(n),t}openModal(){this.setState(()=>({isModalOpen:!0}))}closeModal(){this.setState(()=>({isModalOpen:!1}))}render(){let{context:e}=this.props,{style:t,isModalOpen:a}=this.state,{stringifiedAutoClogPayload:r,autoClogPayload:i}=this.getClogPayload();return this.clogContext=r,n.createElement("div",{className:"p-autoclog__viewer_icon_and_details_container",style:t},n.createElement("span",{className:"p-autoclog__viewer_icon",ref:this.viewerDotElementRef,role:"button",tabIndex:0,"aria-label":"Open Viewer Modal",onClick:this.openModal}),n.createElement(l.A,{isOpen:a,onRequestClose:this.closeModal,style:N},n.createElement("div",{className:"p-autoclog__viewer_details"},n.createElement(AutoClogAnalyticsViewer,{autoClogPayload:i,context:e}),n.createElement(CollapsibleDebugCard,{header:"Clog Payload",helpContent:n.createElement(n.Fragment,null,"Please note this is the entire Clog Payload for this particular user and team. Clog payloads for this event may vary by user and team as payload key-values can be based on variables dependent on user or team status."),content:r}))))}};M.displayName="AutoClogViewer";let R=(0,o.A)(M)},0x1f9862641:(e,t,a)=>{"use strict";a.d(t,{ih:()=>P,Ay:()=>O});var n=a(0xbad225b5),r=a(0xa6799b78),i=a.n(r),l=a(0x77727995),o=a(0x1e2051844),s=a(0x658a411c),c=a(0x18f2150ea),d=a(0x33644bb7),m=a(0x1cbdfeceb),u=a(0x1229d92d),p=a(0xe874a88a),h=a(0xb97b797e),_=a(0x18dac2b8e),f=a(0x12c020c3),b=a(0x120c268ad),g=a.n(b),y=a(0x1ed767a16);let A=class extends n.PureComponent{static displayName="AutoClogSendViewerClog";toastTimeout=0;constructor(e){super(e),(0,h.v)(this,["onClear","onCopy","clearToast","onToggleCollapse","onMouseEnter","onMouseLeave"]),this.state={showCopyToast:!1,isCollapsed:!1}}componentWillUnmount(){this.clearTimeouts()}onMouseLeave(){this.props.onResetActiveClog()}onMouseEnter(){this.props.onSetActiveClog(this.props.index)}onClear(){let{id:e,clearClog:t}=this.props;t(e)}onCopy(){(0,y.x3)(this.getFormattedClogString()),this.setState(()=>({showCopyToast:!0})),this.clearTimeouts(),this.toastTimeout=this.props.windowRef.deref()?.setTimeout(this.clearToast,2e3)||0}onToggleCollapse(){this.setState(e=>({isCollapsed:!e.isCollapsed}))}getFormattedClogString(){let e;try{e=JSON.stringify(this.props.clogData,null,2)}catch(t){e=""}return e}clearTimeouts(){this.toastTimeout&&(this.props.windowRef.deref()?.clearTimeout(this.toastTimeout),this.toastTimeout=0)}clearToast(){this.setState(()=>({showCopyToast:!1}))}renderIcon(e){let t=g()("c-icon",`c-icon--${e}`);return n.createElement("i",{className:t})}renderButton({buttonType:e,iconType:t,callback:a}){let r=g()("c-button",`c-button--${e}`,"p-autoclog_send_viewer_clog__button");return n.createElement("button",{type:"button",className:r,onClick:a},this.renderIcon(t))}renderCopyButton(){return this.renderButton({buttonType:"outline",iconType:"save",callback:this.onCopy})}renderCollapseButton(){let{isCollapsed:e}=this.state;return this.renderButton({buttonType:"outline",iconType:e?"plus":"minus",callback:this.onToggleCollapse})}renderClearButton(){return this.renderButton({buttonType:"danger",iconType:"trash",callback:this.onClear})}renderUiControls(){let{showCopyToast:e}=this.state;return n.createElement("div",{className:"p-autoclog_send_viewer_clog__ui_controls"},this.renderCollapseButton(),this.renderCopyButton(),this.renderClearButton(),e&&this.renderCopyToast())}renderCopyToast(){return n.createElement("div",{className:"p-autoclog_send_viewer_clog__copy_toast"},this.renderIcon("caret-up"),n.createElement("span",null,"Copied to clipboard!"))}renderClog(){let{timestamp:e}=this.props,{isCollapsed:t}=this.state,a=t?"...":this.getFormattedClogString();return n.createElement("div",{className:"p-autoclog_send_viewer_clog__content"},n.createElement("pre",null,a," => ",n.createElement("em",null,e)))}render(){let{isActive:e}=this.props;return n.createElement("div",{className:"p-autoclog_send_viewer_clog",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},this.renderClog(),e&&this.renderUiControls())}};A.displayName="AutoClogSendViewerClog";let x=(0,u.A)(A),E=class extends n.PureComponent{static displayName="AutoClogToggle";static defaultProps={onChange:m.A};constructor(e){super(e),this.state={isToggled:e.isToggled},(0,h.v)(this,["handleOnChange"])}handleOnChange(){this.setState(e=>({isToggled:!e.isToggled})),this.props.onChange()}render(){return n.createElement("div",{onClick:this.handleOnChange,className:g()("autoclog_toggle",{"autoclog_toggle--active":this.state.isToggled})},n.createElement("div",{className:"autoclog_toggle__lever_container"},n.createElement("span",{className:"autoclog_toggle__lever"})))}};E.displayName="AutoClogToggle";let C=class extends n.PureComponent{static displayName="AutoClogSendViewer";viewerRef=n.createRef();constructor(e){super(e),(0,h.v)(this,["toggleSendViewer","onSetActiveClog","onResetActiveClog","onClearSavedViewerClogs"]),this.state={isShowing:!0,activeChildIndex:-1}}componentDidUpdate(e){this.viewerRef.current&&e.savedViewerClogs.length<this.props.savedViewerClogs.length&&(this.viewerRef.current.scrollTop=0)}onClearSavedViewerClogs(){this.props.clearSavedViewerClogs()}onSetActiveClog(e){this.setState(()=>({activeChildIndex:e}))}onResetActiveClog(){this.setState(()=>({activeChildIndex:-1}))}toggleSendViewer(){this.setState(e=>({...e,isShowing:!e.isShowing}))}renderClogs(){let{savedViewerClogs:e,clearSavedViewerClogs:t}=this.props,{activeChildIndex:a}=this.state,r=e.length,i=[...e].reverse().map((e,i)=>n.createElement(x,{id:r-i-1,index:i,key:e.ts,timestamp:e.ts,clogData:e.clogData,clearClog:t,isActive:a===i,onSetActiveClog:this.onSetActiveClog,onResetActiveClog:this.onResetActiveClog}));return n.createElement("div",{className:"p-autoclog_send_viewer__clog_container"},i)}renderClearAllButton(){let{savedViewerClogs:e}=this.props;if(!e.length)return null;let t=g()("c-button","c-button--danger","p-autoclog_send_viewer__clear_all"),a=g()("c-icon","c-icon--trash");return n.createElement("button",{type:"button",className:t,onClick:this.onClearSavedViewerClogs},n.createElement("i",{className:a}))}renderUiControls(){let{isShowing:e}=this.state;return n.createElement("div",{className:"p-autoclog_send_viewer__ui_controls"},e&&this.renderClearAllButton(),n.createElement(E,{isToggled:e,onChange:this.toggleSendViewer}))}render(){let{isShowing:e}=this.state;return n.createElement("div",{className:"p-autoclog_send_viewer",ref:this.viewerRef,"data-qa":"autoclog-send-viewer"},this.renderUiControls(),e&&this.renderClogs())}};C.displayName="AutoClogSendViewer";var k=a(0x6508b5ff),v=a(0xf8dd7f80),S=a(0x22480f425),I=a(0x3711e82d);let w="You can find more details on the AutoClog Guide: .",T={MISSING_EVENT_ID_ON_IMPRESSION_CLOG:`Looks like you wanted to clog an impression for this component. Unfortunately, we are missing the eventId. ${w}`,MISSING_ELEMENT_NAME_ON_CLICK_CLOG:`Looks like you wanted to clog a click event for this component. Unfortunately, we are missing an elementName value. ${w}`,MISSING_ELEMENT_TYPE_ON_CLICK_CLOG:`Looks like you wanted to clog a click event for this component. Unfortunately, we are missing an elementType value. ${w}`},N=class{logger;constructor(){this.logger=(0,v.getGenericLogger)()}logValidationMessage(e,t,a){if((0,S.A)())return;let n=[e];if(t&&(n=n.concat(["Clog Context Data:",(0,k.nj)(t)])),a)try{n=n.concat(["Component Instance:",a])}catch(e){this.logger.warn(`Failed to parse arg 'componentInstance': ${e}`)}this.logger.warn("[AUTOCLOG]:",...n)}logValidationMessages(e,t){if((0,S.A)())return;let{eventId:a,action:n,elementType:r,elementName:i}=e;a||n!==I.UiAction.IMPRESSION||this.logValidationMessage(T.MISSING_EVENT_ID_ON_IMPRESSION_CLOG,e,t),n===I.UiAction.CLICK&&(r||this.logValidationMessage(T.MISSING_ELEMENT_TYPE_ON_CLICK_CLOG,e,t),i||this.logValidationMessage(T.MISSING_ELEMENT_NAME_ON_CLICK_CLOG,e,t))}};var M=a(0x476eff14);let R=n.createContext({}),P=R,L=class extends n.Component{static displayName="BaseAutoClog";viewClogsQueue=[];autoClogDOMElementRef=n.createRef();clogImpressionOnlyInViewport=!0;reclogImpression;clogImpressionDuration;canClogImpression=!0;timedImpression=void 0;clogImpressionDurationTimeout=void 0;hasImpressionPropChangeOutOfViewport=!1;lastPropsCloggedInViewport=null;timedReclogImpression=void 0;impressionStartTime=null;passedActionProp;struct;requiredTagProps=[];tagPropsThatRetriggerImpression;newProps={};isRequiredPropMissing=!0;observer;isInViewport=!1;isDevOrJsPath=!(0,_.KV)()||(0,_.b3)();constructor(e){super(e);const t=[];this.isDevOrJsPath&&t.push("toggleViewer","setSavedViewerClog","clearSavedViewerClogs","removeViewerDotsOnUnload");const a="function"==typeof IntersectionObserver;this.clogImpressionOnlyInViewport=a&&!e.enableClogImpressionOffScreen,this.clogImpressionOnlyInViewport&&(t.push("observerCallback"),this.reclogImpression=0===e.reclogImpression||e.reclogImpression,this.clogImpressionDuration=e.clogImpressionDuration,this.clogImpressionDuration&&t.push("handleClogImpressionDuration")),this.struct=e.isTopParentAutoClog?(0,k.D9)(e):e.struct,this.requiredTagProps=e.requiredTagProps||this.getRequiredTagProps(),this.tagPropsThatRetriggerImpression=e.tagPropsThatRetriggerImpression||this.getTagPropsThatRetriggerImpression(),this.state={showClogViewer:!1,savedViewerClogs:[]},(0,h.v)(this,t)}componentDidMount(){if(!(0,l.A)(this,"newProps.disableValidationWarnings",!1)&&(0,l.A)(this,"newProps.validationLogger.logValidationMessages",null)&&this.newProps.validationLogger?.logValidationMessages(this.newProps,this),!this.isRequiredPropMissing&&!(0,l.A)(this,"newProps.disableAutoClog",!1)){let{clogImpression:e,windowRef:t}=this.props,a=t.deref();this.props.isTopParentAutoClog&&this.isDevOrJsPath&&(a.addEventListener("keydown",this.toggleViewer),a.addEventListener("beforeunload",this.removeViewerDotsOnUnload)),this.clogImpressionDuration&&a.addEventListener("beforeunload",this.handleClogImpressionDuration),e&&this.clogImpressionOnlyInViewport?this.setupObserver():e&&(0,k.W$)(this.newProps,a)}this.assignTrackClogRef()}componentDidUpdate(e){if(!this.isRequiredPropMissing&&!(0,l.A)(this,"newProps.disableAutoClog",!1)){let{clogImpression:t,disableClogImpressionOnTagChange:a,windowRef:n}=this.props,r=!a&&this.hasAnyImpressionPropChanged(e);this.clogImpressionOnlyInViewport?t?this.handleUpdateForClogImpressionOnlyInViewport(r):e.clogImpression&&(this.observer?.disconnect(),this.stopTimedImpression(),this.hasImpressionPropChangeOutOfViewport=!1,this.lastPropsCloggedInViewport=null,this.timedReclogImpression=void 0):r&&(t&&(0,k.W$)(this.newProps,n.deref()),this.assignTrackClogRef())}}componentWillUnmount(){let e=this.props.windowRef.deref();!this.isRequiredPropMissing&&(this.props.isTopParentAutoClog&&this.isDevOrJsPath&&(e?.removeEventListener("keydown",this.toggleViewer),e?.removeEventListener("beforeunload",this.removeViewerDotsOnUnload)),this.clogImpressionDuration&&(this.handleClogImpressionDuration(),e?.removeEventListener("beforeunload",this.handleClogImpressionDuration))),this.timedImpression&&e?.clearTimeout(this.timedImpression),this.timedReclogImpression&&e?.clearTimeout(this.timedReclogImpression),this.clogImpressionDurationTimeout&&e?.clearTimeout(this.clogImpressionDurationTimeout),this.observer?.disconnect()}getProviderProps(){let e=this.newProps.action;this.props.clogImpression?e=this.passedActionProp:this.newProps.action===I.UiAction.IMPRESSION&&(e=void 0);let t=this.props.isAutoClogAction?{}:{internalNavigationStateActiveTab:void 0,internalNavigationStateActiveViewContainer:void 0,internalNavigationStateViews:void 0};return{...this.newProps,action:e,...t}}getDefaultEntryPoint(){let{entry_point:e}=(0,f.qN)(this.props.windowRef.deref().location.href);return e}getTagProps(e){let t={};for(let[a,n]of Object.entries(e))this.struct.shape[a]&&(t[a]=n);return t}getRequiredTagProps(){let e=[];for(let[t,a]of Object.entries(this.struct.tagConfigs))a?.isRequired&&e.push(t);return e}getTagPropsThatRetriggerImpression(){let e=new Set(["clogImpression",...Object.keys(this.struct.shape)]);for(let[t,a]of Object.entries(this.struct.tagConfigs))(a?.referringConfig||a?.disableChangeRetriggersImpression)&&e.delete(t);return e}getNewProps(){let{isTopParentAutoClog:e,clogger:t,autoReferringUiContextKeys:a,showClogViewer:n,shouldSendDataAndEmptyQueueOnTrack:r,validationLogger:i,disableValidationWarnings:l,disableAutoClog:o,setSavedViewerClog:s,disableAutoReferringUiContext:c,disableAutoEntryPoint:d,requireSession:m,...u}=this.props,p={struct:this.struct,clogger:t,...this.getTagProps(u),requiredTagProps:this.requiredTagProps,tagPropsThatRetriggerImpression:this.tagPropsThatRetriggerImpression,entryPoint:this.props.entryPoint||this.getDefaultEntryPoint(),autoReferringUiContextKeys:a,showClogViewer:n||(this.isDevOrJsPath&&this.state.showClogViewer?this.state.showClogViewer:void 0),setSavedViewerClog:s||(this.isDevOrJsPath?this.setSavedViewerClog:void 0),shouldSendDataAndEmptyQueueOnTrack:r,validationLogger:l||!(0,_.Cu)()?void 0:i||(e?new N:void 0),disableValidationWarnings:l,disableAutoClog:o,disableAutoReferringUiContext:c,disableAutoEntryPoint:d,requireSession:m};for(let[e,t]of Object.entries(p))void 0===t&&delete p[e];return this.props.clogImpression?(this.props.enableClogAction&&p.action&&(this.passedActionProp=p.action),p.action=I.UiAction.IMPRESSION):p.action&&(this.passedActionProp=p.action),p}setupObserver(){this.observer?.disconnect(),this.observer=new IntersectionObserver(this.observerCallback,{root:null,rootMargin:"0px",threshold:0});let e=this.autoClogDOMElementRef?.current?.childNodes;if(e){let t=(0,o.A)(e,e=>null!==e.offsetParent);t&&this.observer.observe(t)}}getIsRequiredTagPropMissing(){return(0,s.A)(this.newProps.requiredTagProps,e=>void 0===this.props[e])}setSavedViewerClog(e){this.viewClogsQueue.push({ts:Date.now(),clogData:e}),this.updateSavedViewerClogs()}clearSavedViewerClogs(e){let t=this.state.savedViewerClogs.length;t&&(void 0===e?this.viewClogsQueue=[]:e<t&&this.viewClogsQueue.splice(e,1),this.updateSavedViewerClogs())}removeViewerDotsOnUnload(){(0,k.xZ)(this.props.windowRef.deref())}updateSavedViewerClogs(){(this.state.showClogViewer||this.props.showClogViewer)&&p.S.resolve().then(()=>this.setState(()=>({savedViewerClogs:this.viewClogsQueue.slice()})))}stopTimedImpression(){this.timedImpression&&(this.props.windowRef.deref()?.clearTimeout(this.timedImpression),this.timedImpression=void 0,this.canClogImpression=!0)}triggerClogImpressionOnlyInViewport(e=!1){let{screenTimeBeforeImpression:t,windowRef:a}=this.props,n=a.deref();t?(this.timedImpression&&n.clearTimeout(this.timedImpression),this.timedImpression=n.setTimeout(()=>{this.sendClogImpressionOnlyInViewport(e),this.timedImpression=void 0},t)):this.sendClogImpressionOnlyInViewport(e),this.canClogImpression=!1}sendClogImpressionOnlyInViewport(e){(0,k.W$)(this.newProps,this.props.windowRef.deref()),this.clogImpressionDuration&&(this.impressionStartTime=Date?.now(),"number"==typeof this.clogImpressionDuration&&(this.clogImpressionDurationTimeout=this.props.windowRef.deref().setTimeout(this.handleClogImpressionDuration,this.clogImpressionDuration))),this.lastPropsCloggedInViewport=this.props,e&&(this.hasImpressionPropChangeOutOfViewport=!1)}handleClogImpressionDuration(){if(this.impressionStartTime){let e=Date?.now()-this.impressionStartTime,t={...this.newProps,action:I.UiAction.IMPRESSION_DURATION,impressionDuration:e};(0,k.W$)(t,this.props.windowRef.deref()),this.impressionStartTime=null,"number"==typeof this.clogImpressionDuration&&(this.props.windowRef.deref()?.clearTimeout(this.clogImpressionDurationTimeout),this.clogImpressionDurationTimeout=void 0)}}handleUpdateForClogImpressionOnlyInViewport(e){let t=this.isInViewport;e&&(this.setupObserver(),this.canClogImpression=!0,t||(this.hasImpressionPropChangeOutOfViewport=!0),this.assignTrackClogRef()),this.canClogImpression&&t&&(this.hasImpressionPropChangeOutOfViewport?this.hasAnyImpressionPropChanged(this.lastPropsCloggedInViewport)&&this.triggerClogImpressionOnlyInViewport(!0):this.triggerClogImpressionOnlyInViewport())}handleReclogImpression(e){let t=this.props.windowRef.deref();e&&this.reclogImpression&&(0,c.A)(this.reclogImpression)?this.timedReclogImpression=t.setTimeout(()=>{this.canClogImpression=!0,this.timedReclogImpression&&t.clearTimeout(this.timedReclogImpression),this.timedReclogImpression=void 0},this.reclogImpression):e&&this.reclogImpression?this.canClogImpression=!0:!e&&this.timedReclogImpression&&(this.timedReclogImpression&&t.clearTimeout(this.timedReclogImpression),this.timedReclogImpression=void 0)}observerCallback(e){let t=this.isInViewport,a=e[0];void 0!==a&&t!==a.isIntersecting&&(t&&(this.stopTimedImpression(),this.handleClogImpressionDuration()),this.handleReclogImpression(t),this.isInViewport=a.isIntersecting,this.clogImpressionOnlyInViewport&&this.props.clogImpression&&this.handleUpdateForClogImpressionOnlyInViewport(!1))}hasAnyImpressionPropChanged(e){if(null===e)return!0;let t=Object.keys(this.props).filter(e=>this.newProps.tagPropsThatRetriggerImpression?.has(e));return(0,s.A)(t,t=>!i()(e[t],this.props[t]))}toggleViewer(e){e.ctrlKey&&e.shiftKey&&"C"===e.key&&this.setState(e=>({showClogViewer:!e.showClogViewer}),()=>{this.state.showClogViewer?this.updateSavedViewerClogs():(0,k.xZ)(this.props.windowRef.deref())})}assignTrackClogRef(){let{trackClogRef:e,windowRef:t}=this.props;(0,d.A)(e)&&e(this.isRequiredPropMissing?m.A:e=>(0,k.Qf)(this.newProps,t.deref(),e))}shouldRenderViewer(){return this.isDevOrJsPath&&this.newProps.showClogViewer&&(this.props.isTopParentAutoClog||this.newProps.action)}renderChildren(e){let{clogImpression:t}=this.props,a=this.clogImpressionOnlyInViewport&&t?n.createElement("div",{className:"p-autoclog__hook",ref:this.autoClogDOMElementRef},this.props.children):this.props.children;return n.createElement(R.Provider,{value:e},this.shouldRenderViewer()&&this.renderViewer(),a)}renderViewer(){return n.createElement("div",{className:"p-autoclog__viewer","data-qa":"base-autoclog-viewer"},this.props.isTopParentAutoClog&&n.createElement(C,{savedViewerClogs:this.state.savedViewerClogs,clearSavedViewerClogs:this.clearSavedViewerClogs}),this.newProps.action===I.UiAction.IMPRESSION&&n.createElement(M.A,{context:this.newProps}))}render(){if(this.isRequiredPropMissing=!0,this.newProps=this.getNewProps(),this.isRequiredPropMissing=this.getIsRequiredTagPropMissing(),this.isRequiredPropMissing)return n.createElement(n.Fragment,null,this.props.children);let e=this.getProviderProps();return this.renderChildren(e)}};L.displayName="BaseAutoClog";let O=(0,u.A)(L)},0x21dff4de1:(e,t,a)=>{"use strict";a.d(t,{G:()=>SlackAutoClogConfigProvider});var n=a(0xbad225b5),r=a(0x23586a3dd),i=a(0x16e80f9af),l=a(0x839ba347),o=a(0x658a411c),s=a(0x21f3c49e8),c=a(0x1229d92d),d=a(0x6508b5ff),m=a(0x476eff14),u=a(0x1f9862641);let p=class extends n.Component{static contextType=u.ih;static displayName="AutoClogAction";static defaultProps={setElementValueOnAction:!1};autoClogActionsTimeouts={};generalAutoClogProps={};specificActionAutoClogProps={};constructor(e){super(e),this.updateNumberOfActionCalls=this.updateNumberOfActionCalls.bind(this),this.state={numberOfActionCalls:0}}getActionFunctionsAndPropList(e){let{actionProps:t,children:a,windowRef:n}=this.props,r={},i=[];return(0,l.A)(t,(t,l)=>{let o=this.createCombinedProps(e,t,l);o.enableClogAction&&i.push(o),r[l]=(...e)=>{let t=`${l}`;this.autoClogActionsTimeouts[t]&&clearTimeout(this.autoClogActionsTimeouts[t]);let r=(0,d.Xi)(o,e),i=n.deref();r.throttleActionClogDuration?i&&(this.autoClogActionsTimeouts[t]=i.setTimeout(()=>{(0,d.XZ)(r,this.updateNumberOfActionCalls,this.state.numberOfActionCalls,i)},r.throttleActionClogDuration)):i&&(0,d.XZ)(r,this.updateNumberOfActionCalls,this.state.numberOfActionCalls,i),(0,d.hp)(a,l,e)}}),{clogActionFunctions:r,combinedPropsList:i}}getViewerElementKey(e){let t="";try{t=JSON.stringify(e)}catch(t){e?.validationLogger?.logValidationMessage(`Something is wrong with AutoClogAction's renderWithChildWithViewer function, please contact #proj-auto-clogging and tell them about this error: ${t}`,e)}return t}createCombinedProps(e,t,a){return{...e,setElementValueOnAction:this.props.setElementValueOnAction,...t,...this.generalAutoClogProps,...this.specificActionAutoClogProps[a]}}createGeneralAndSpecificAutoClogProps(){let{autoClogProps:e,actionProps:t}=this.props;this.generalAutoClogProps={isAutoClogAction:!0},this.specificActionAutoClogProps={},(0,l.A)(e,(e,a)=>{t[a]?this.specificActionAutoClogProps[a]=e:this.generalAutoClogProps[a]=e})}isClogActionOrSetReferringUiContextOnActionEnabled(){let{actionProps:e}=this.props;return!!(this.generalAutoClogProps.setReferringUiContextOnAction||(0,o.A)(this.specificActionAutoClogProps,"setReferringUiContextOnAction"))||!!(0,o.A)(e,(e,t)=>!!this.specificActionAutoClogProps[t]?.enableClogAction)}updateNumberOfActionCalls(){this.setState(e=>({numberOfActionCalls:e.numberOfActionCalls+1}))}isThisAPassThrough(){let{autoClogProps:e}=this.props,t=e&&!(0,s.A)(e),a=this.context&&!(0,s.A)(this.context);return!t||!a||this.context.disableAutoClog}renderChildWithNewActionFunctions(e){return n.isValidElement(this.props.children)?n.cloneElement(this.props.children,e):this.props.children}renderWithChildWithViewer(e,t){let{autoClogProps:a}=this.props;return n.createElement(n.Fragment,null,e.map((e,t)=>n.createElement("div",{className:"p-autoclog__viewer",key:this.getViewerElementKey(e)},n.createElement(m.A,{style:{left:`${15*t}px`,top:a?.clogImpression?"15px":0},context:e}))),this.renderChildWithNewActionFunctions(t))}renderChildrenWithActionHandler(){return n.createElement(u.ih.Consumer,null,e=>{let{clogActionFunctions:t,combinedPropsList:a}=this.getActionFunctionsAndPropList(e);return e.showClogViewer?this.renderWithChildWithViewer(a,t):this.renderChildWithNewActionFunctions(t)})}render(){let{children:e,elementType:t}=this.props;return this.isThisAPassThrough()?n.createElement(n.Fragment,null,e):(this.createGeneralAndSpecificAutoClogProps(),this.isClogActionOrSetReferringUiContextOnActionEnabled())?n.createElement(i.A,{elementType:t,...this.generalAutoClogProps},this.renderChildrenWithActionHandler()):n.createElement(i.A,{elementType:t,...this.generalAutoClogProps},e)}};p.displayName="AutoClogAction";let h=(0,c.A)(p),_={AutoClogComponent:i.A,AutoClogActionComponent:h},SlackAutoClogConfigProvider=({children:e})=>n.createElement(r.C.Provider,{value:_},e)},0x16e80f9af:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x22480f425),l=a(0x1f9862641);let o={name:"main_slack_struct",tagConfigs:{eventId:{isRequired:!0},entryPoint:{referringConfig:{}},referringUiContext:{referringConfig:{}},referringEventId:{referringConfig:{}}},shape:{event_id:"eventId",contexts:{ui_context:{ui_step:"uiStep",step_variant:"stepVariant",ui_page:"uiPage",ui_element:"uiElement",ui_component_name:"uiComponentName",ui_component_variant:"uiComponentVariant",is_primary_cta:"isPrimaryCTA",action:"action",action_status:"actionStatus",entry_point:"entryPoint",ui_properties:{element_type:"elementType",element_name:"elementName",display_name:"displayName",element_value:"elementValue",element_index:"elementIndex",view_context:"viewContext"},megaphone:{space_name:"megaphoneSpaceName",notification_name:"megaphoneNotificationName",eligible_notifications:"megaphoneEligibleNotifications"},navigation_state:{active_tab:"internalNavigationStateActiveTab",active_view_container:"internalNavigationStateActiveViewContainer",views:"internalNavigationStateViews"},user_journeys:"userJourneys"},block_kit:{app_id:"blockKitAppId",bot_id:"blockKitBotId",surface:{surface_type:"surfaceType",surface_id:"surfaceId",additional_info:"additionalInfo"},interaction:"interaction",interaction_element:"interactionElement",uuid:"uuid"},calls:{channel_id:"callsChannelId",channel_type:"callsChannelType",num_participants:"callsNumParticipants",room_id:"callsRoomId"},growth:{promo_type:"promoType",promo_subtype:"promoSubtype"},message_reads:{channel_id:"messageReadsChannelId",author_user_id:"messageReadsAuthorUserId",app_id:"messageReadsAppId",bot_id:"messageReadsBotId",msg_ts:"messageReadsTs",msg_thread_ts:"messageReadsThreadTs",msg_read_location:"messageReadsReadLocation"},siws_identity_links:{app_id:"idlAppId",domain:"idlDomain",event_id:"idlEventId"},oauth_siws_consent:{app_id:"siwsAppId",app_name:"siwsAppName",scopes:"siwsScopes",app_scopes:"siwsAppScopes",bot_scopes:"siwsBotScopes"},schedule_send:{draft_id:"scheduleSendDraftId",scheduling_date:"scheduleSendSchedulingDate",new_scheduling_date:"scheduleSendNewSchedulingDate",is_suggested:"scheduleSendIsSuggested",action_source:"scheduleSendActionSource"},core:{invite_id:"coreInviteId",tracking_id:"coreTrackingId",channel_id:"coreChannelId",message_timestamp:"coreMessageTimestamp",channel_set_length:"channelSetLength",file_id:"coreFileId"},quip:{source:"source",is_channel_canvas:"isChannelCanvas",canvas_new_notification_badge:"canvasNewNotificationBadge",canvas_file_id:"canvasFileId",is_dm_or_mpdm_channel_canvas:"isDmOrMpdmChannelCanvas"},referring_ui_context:"referringUiContext",workflow_builder:{workflow_id:"workflowBuilderWorkflowId",app_id:"workflowBuilderAppId",channel_id:"workflowBuilderChannelId",send_to:"workflowBuilderSendTo",num_of_questions:"workflowBuilderNumOfQuestions",message_text:"workflowBuilderMessageText",question_type:"workflowBuilderQuestionType",has_app_description:"workflowBuilderHasAppDescription",has_short_description:"workflowBuilderHasShortDescription",num_of_workflows:"workflowBuilderNumOfWorkflows",is_required:"workflowBuilderIsRequired",step_index:"workflowBuilderStepIndex",trigger_type:"workflowBuilderTriggerType",trigger_subtype:"workflowBuilderTriggerSubtype",template_id:"workflowBuilderTemplateId",step_type:"workflowBuilderStepType",num_of_collaborators:"workflowBuilderNumOfCollaborators",num_of_run_access_users:"workflowBuilderNumOfRunAccessUsers",copy_access:"workflowBuilderCopyAccess",run_access:"workflowBuilderRunAccess",num_changes_before_first_publish:"workflowBuilderNumChangesBeforeFirstPublish"}},referring_event_id:"referringEventId",invite_id:"inviteId",label:"label",is_channel_name_updated:"isChannelNameUpdated",prefilled:"prefilled",num_shown_workspaces:"numShownWorkspaces",billing_country:"billingCountry",company_address_region:"companyAddressRegion",zip_code:"companyAddressZip",experiment_type:"experimentType",credit:"credit",currency:"currency",paid_seats:"paidSeats",payment_method:"paymentMethod",product_id:"productId",current_product_level:"currentProductLevel",destination_name:"destinationName",product_term:"productTerm",total_charge:"totalCharge",tracking_id:"trackingId",referrer:"referrer",app_id:"appId",bot_id:"botId",channel_id:"channelId",num_delimiters:"numDelimiters",prefix_position:"prefixPosition",has_default_prefix:"hasDefaultPrefix",limit_meter_messages_count:"limitMeterMessagesCount",num_members_minus_bots:"numMembersMinusBots",num_of_channels:"numOfChannels",num_of_invites:"numOfInvites",successful_invites:"successfulInvites",failed_invites:"failedInvites",email_invite_errors:"emailInviteErrors",is_appmin:"isAppmin",is_aaa_enabled:"isAAAEnabled",is_admin:"isAdmin",is_owner:"isOwner",number_of_pending_full_member_invites:"numberOfPendingFullMemberInvites",number_of_external_emails:"numberOfExternalEmails",can_convert_to_external_shared_channel:"canConvertToExternalSharedChannel",is_able_to_invite_or_request_invites:"canInviteOrRequestInvites",is_able_to_add_single_channel_guests:"canAddSingleChannelGuests",selected_access_choice:"selectedAccessChoice",invite_to_workspace_instead:"inviteToWorkspaceInstead",draft_id:"draftId",impression_duration:"impressionDuration",page_url:"pageUrl",confirmation_code_error:"confirmationCodeError",number_of_users:"numberOfUsers",number_of_user_groups:"numberOfUserGroups",number_of_internal_emails:"numberOfInternalEmails",app_tab_name:"appTabName",existing_channel_id:"existingChannelId",article_id:"articleId",is_badged:"isBadged",can_accept_dm:"canAcceptDm",team_id:"teamId",selected_team_id:"selectedTeamId",notification_read_state:"notificationReadState",notification_subtype:"notificationSubtype",notification_filter:"notificationFilter",can_pref_be_controlled_by_ws_admins:"canPrefBeControlledByWsAdmins",invite_type:"inviteType",invite_to_workspace_view_type:"inviteToWorkspaceViewType",profile_id:"profileId",selected_access_type:"selectedAccessType",was_message_entered:"wasMessageEntered",email_count:"emailCount",funnel_step_number:"funnelStepNumber",number_of_shared_channel_invites:"numberOfSharedChannelInvites",number_of_member_invites:"numberOfMemberInvites",number_of_workspace_users_added:"numberOfWorkspaceUsersAdded",number_of_user_groups_added:"numberOfUserGroupsAdded",request_id:"requestId",selected_action:"selectedAction",selected_id:"selectedId",selected_id_v2:"selectedIdV2",selected_position:"selectedPosition",selected_type:"selectedType",zd_article_url:"zdArticleUrl",was_external_limited_toggled:"wasExternalLimitedToggled",search_terms:"searchTerms",order:"order",comprehensible_entry_point:"comprehensibleEntryPoint",email_classification:"emailClassification",item_count:"itemCount",is_renaming_workspace:"isRenamingWorkspace",is_changing_url:"isChangingUrl",file_id:"fileId",file_type:"fileType",num_results:"numResults",num_message_results:"numMessageResults",num_file_results:"numFileResults",num_channel_results:"numChannelResults",num_people_results:"numPeopleResults",num_canvas_results:"numCanvasResults",num_lists_results:"numListsResults",canvas_thread_channel_id:"canvasThreadChannelId",canvas_thread_id:"canvasThreadId",canvas_huddle_session_id:"canvasHuddleSessionId",canvas_ai_overlay_session_id:"canvasAiOverlaySessionId",canvas_ai_overlay_content_length:"canvasAiOverlayContentLength",canvas_ai_overlay_preview:"canvasAiOverlayPreview",canvas_ai_overlay_flow:"canvasAiOverlayFlow",canvas_current_length:"canvasCurrentLength",canvas_ai_content_id:"canvasAiContentId",interaction_id:"interactionId",deleted_user_id:"deletedUserId",deactivated_user_ids:"deactivatedUserIds",new_message_action_source:"newMessageActionSource",has_user_entered_custom_message:"hasUserEnteredCustomMessage",has_user_selected_channels:"hasUserSelectedChannels",list_id:"listId",list_record_id:"listRecordId",list_record_thread_id:"listRecordThreadId",list_parent_record_id:"listParentRecordId",list_column_type:"listColumnType",list_column_id:"listColumnId",list_template_id:"listTemplateId",workflow_trigger_id:"workflowTriggerId",workflow_id:"workflowId",native_ai_summary_channel_id:"nativeAiSummaryChannelId",native_ai_summary_thread_ts:"nativeAiSummaryThreadTs",native_ai_summary_type:"nativeAiSummaryType",native_ai_summary_subtype:"nativeAiSummarySubtype",native_ai_message_count:"nativeAiMessageCount",native_ai_channel_type:"nativeAiChannelType",native_ai_active_tab:"nativeAiActiveTab",native_ai_open_existing_summary:"nativeAiOpenExistingSummary",native_ai_channel_summary_start_ts:"nativeAiChannelSummaryStartTs",native_ai_channel_summary_end_ts:"nativeAiChannelSummaryEndTs",native_ai_summary_entry_point:"nativeAiSummaryEntryPoint",native_ai_summary_id:"nativeAiSummaryId",native_ai_summary_status:"nativeAiSummaryStatus",native_ai_auto_summary_lifecycle_event:"nativeAiAutoSummaryLifecycleEvent",native_ai_multi_turn_count:"nativeAiMultiTurnCount",native_ai_model:"nativeAiModel",slack_ai_summary_channel_section_id:"slackAiSummaryChannelSectionId",slack_ai_summary_trigger_ts:"slackAiSummaryTriggerTs",slack_ai_summary_status:"slackAiSummaryStatus",slack_ai_summary_is_streaming:"slackAiSummaryIsStreaming",slack_ai_daily_digest_id:"slackAiDailyDigestId",slack_ai_channel_digest_id:"slackAiChannelDigestId",slack_ai_license_type:"slackAiLicenseType",slack_ai_client_req_id:"slackAiClientReqId",slack_ai_has_file_source:"slackAiHasFileSource",slack_ai_recapped_unread_channels_count:"slackAiRecappedUnreadChannelsCount",slack_ai_recapped_unread_channels_local_ts:"slackAiRecappedUnreadChannelsLocalTs",slack_ai_activity_topic_type:"slackAiActivityTopicType",search_answers_is_question:"searchAnswersIsQuestion",search_answers_ai_feature_v2:"searchAnswersAiFeatureV2",search_answers_open_state_v2:"searchAnswersOpenStateV2",search_session_id:"searchSessionId",lob_notification_workflow_view:"lobNotificationWorkflowView",lob_notification_workflow_scope:"lobNotificationWorkflowScope",lob_notification_workflow_criteria_group:"lobNotificationWorkflowCriteriaGroup",is_lob_notification_workflow_admin:"isLobNotificationWorkflowAdmin",is_lob_notification_workflow_scheduled:"isLobNotificationWorkflowScheduled",lob_notification_type:"lobNotificationType",lob_activity_type:"lobActivityType",lob_activity_due_date:"lobActivityDueDate",lob_activity_related_record_type:"lobActivityRelatedRecordType",salesforce_org_id:"salesforceOrgId",related_channel_source:"relatedChannelSource",deal_win_stage:"dealWinStage",deal_win_account_name_included:"dealWinAccountNameIncluded",deal_win_deal_amount_included:"dealWinDealAmountIncluded",deal_win_close_date_included:"dealWinCloseDateIncluded",deal_win_has_advanced_conditions:"dealWinHasAdvancedConditions",sidebar_entity_channel_section_id:"sidebarEntityChannelSectionId",is_ephemeral_list_view:"isEphemeralListView",drag_channel_section_id:"dragChannelSectionId",drop_channel_section_id:"dropChannelSectionId",salesforce_record_id:"salesforceRecordId",fetched_event_count:"fetchedEventCount",suggestion_type:"suggestionType",saved_item_id:"savedItemId",saved_item_date_due:"savedItemDateDue",saved_item_state:"savedItemState",msg_ts:"msgTs",msg_thread_ts:"msgThreadTs",activity_item_key:"activityItemKey",addon_ids:"addonIds",canvas_type:"canvasType",canvas_template_type:"canvasTemplateType",canvas_template_label:"canvasTemplateLabel",canvas_template_footer_button_source:"canvasTemplateFooterButtonSource",accounts_to_add_permissions:"accountsToAddPermissions",accounts_to_remove_permissions:"accountsToRemovePermissions",encoded_invite_ids:"encodedInviteIds",encoded_invite_id:"encodedInviteId",is_huddle_recording_initiator:"isHuddleRecordingInitiator",is_copilot:"isCopilot",sfdc_org_connection_status:"sfdcOrgConnectionStatus",sfdc_org_connection_update_status:"sfdcOrgConnectionUpdateStatus",sfdc_org_slack_mapping_field:"sfdcOrgSlackMappingField",sfdc_org_salesforce_mapping_field:"sfdcOrgSalesforceMappingField",agentforce_agent_id:"agentforceAgentId",agentforce_agent_type:"agentforceAgentType",agentforce_api_app_id:"agentforceApiAppId",agentforce_agent_scope_names:"agentforceAgentScopeNames",agentforce_agent_subtype:"agentforceAgentSubtype",agentforce_agent_status:"agentforceAgentStatus",solution_template_id:"solutionTemplateId",calendar_meeting_provider:"calendarMeetingProvider",calendar_is_active:"calendarIsActive",calendar_is_paginated_jit:"calendarIsPaginatedJit",calendar_app_type:"calendarAppType",work_object_type:"workObjectType",work_object_entity_type:"workObjectEntityType",wo_file_preview_source:"woFilePreviewSource",file_preview_errors:"filePreviewErrors",file_size:"fileSize",api_data:"apiData",number_of_channels:"numberOfChannels",abandoned_team_id:"abandonedTeamId",experiments:"experiments",http_status_code:"httpStatusCode",error_type:"errorType",is_list_view:"isListView",is_list_view_unfurl:"isListViewUnfurl",num_muted_channels:"numMutedChannels",selected_topics:"selectedTopics",num_selected_topics:"numSelectedTopics",has_suggested_sections:"hasSuggestedSections",suggested_sections_mode:"suggestedSectionsMode",activity_inbox_saved_views:{view_id:"viewId",view_type:"viewType",position:"position",sort:"sort",density:"density",filters:{entry_types:"entryTypes",channel_section_ids:"channelSectionIds",channel_ids:"channelIds",archive_only:"archiveOnly",priority_only:"priorityOnly",unreads_only:"unreadsOnly"}},is_activity_item_unread:"isActivityItemUnread",api_request_id:"apiRequestId",is_desktop_app:"isDesktopApp",os:"os",browser:"browser",sidekick_has_instructions_populated:"sidekickHasInstructionsPopulated",sidekick_has_knowledge_populated:"sidekickHasKnowledgePopulated",sidekick_has_permissions_populated:"sidekickHasPermissionsPopulated",sidekick_has_tried_preview:"sidekickHasTriedPreview",completed_tasks:"completedTasks",available_tasks:"availableTasks",dragged_tab_id:"draggedTabId",dragged_item_to_folder:"draggedItemToFolder"}};var s=a(0xd843ab47),c=a(0x1686570b0),d=a(0x45012309),m=a(0x226892387);let AutoClogWithClogger=e=>{let{children:t}=e,a=(0,m.d4)(e=>(0,d.eo)({state:e},{clogType:c.HM.AUTO}));return n.createElement(l.Ay,{...e,clogger:a},t)};AutoClogWithClogger.displayName="AutoClogWithClogger";let AutoClog=e=>{let{children:t,clogger:a}=e;return a?n.createElement(l.Ay,e,t):(0,i.A)()?n.createElement(l.Ay,{...e,clogger:(0,d.eo)(void 0,{clogType:c.HM.AUTO})},t):n.createElement(AutoClogWithClogger,e,t)};AutoClog.displayName="AutoClog";let AutoClogWithNavigationState=e=>{let{children:t,clogImpression:a,disableClogImpressionOnTagChange:r}=e,{activeTab:i,container:l,getViewSet:o}=(0,n.useContext)(s.A),c=(0,m.rY)(e=>o(e)),d=(0,n.useMemo)(()=>{if(!c)return{};let e={};for(let[t,a]of Object.entries(c))a&&t&&(e[t]={id:a.id,type:a.viewType});return e},[c]),u=i&&l?{...e,internalNavigationStateActiveTab:i,internalNavigationStateActiveViewContainer:l,internalNavigationStateViews:d}:e;return n.createElement(AutoClog,{...u,disableClogImpressionOnTagChange:a||r},t)};AutoClogWithNavigationState.displayName="AutoClogWithNavigationState";let WrappedAutoClog=e=>{let{children:t,enableAutoNavigationState:a}=e,i=(0,n.useContext)(l.ih),s={...i,...e},c=s.struct||o,d={isTopParentAutoClog:(0,r.A)(i),...s,struct:c};return a?n.createElement(AutoClogWithNavigationState,d,t):n.createElement(AutoClog,d,t)};WrappedAutoClog.displayName="WrappedAutoClog";let u=WrappedAutoClog},0xbbf46293:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseCheckoutRescueBanner:()=>CheckoutRescueBanner,DataQa:()=>g,default:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0xd9faf062),s=a(0x1faa3f1ac),c=a(0x10b603e91),d=a(0x3711e82d),m=a(0x10079cc7),u=a(0x226892387),p=a(0x20061cab9),h=a(0x5b1935a6),_=a(0x1ee439e69);let f=new l.Ay("checkout_abandonment"),b="checkout_abandonment_banner",g={Banner:b,Link:`${b}_link`},y={isPrimaryCTA:!0,onClick:{enableClogAction:!0},elementName:"checkout_link"},CheckoutRescueBanner=({entryPoint:e,onClick:t,onClose:a,productId:r,team:l})=>{let u=(0,m.Qn)({team:l,entryPoint:e,productId:r});return n.createElement(i.A,{eventId:d.EventId.UPGRDEXP_CHECKOUT,elementType:d.ElementType.BANNER,clogImpression:!0,enableClogImpressionOffScreen:!0,uiComponentName:d.UiComponentName.CHECKOUT_RESCUE_BANNER},n.createElement(c.A,{className:"align_center",type:o.QE.info,preventTypeOverride:!0,isFixedPosition:!1,onClose:a,"data-qa":g.Banner},f.rt("Looks like you started upgrading to a more powerful paid plan, but didn\u2019t make it all the way through. <a>Finish checkout</a>",{"<a>":({text:e})=>n.createElement(s.A,{"data-qa":g.Link,autoClogProps:y,onClick:t,href:u},e)})))};CheckoutRescueBanner.displayName="CheckoutRescueBanner";let ConnectedCheckoutRescueBanner=e=>{let t=(0,u.d4)(_.H7),a=(0,r.wA)(),i=(0,n.useCallback)(e=>a((0,p.Ay)({spaceName:h.xu.CLIENT_FOOTER,action:e})),[a]),l=(0,n.useCallback)(()=>{i(h.hw.DISMISS)},[i]),o=(0,n.useCallback)(()=>{i(h.hw.CLICK)},[i]);return n.createElement(CheckoutRescueBanner,{team:t,onClick:o,onClose:l,...e})};ConnectedCheckoutRescueBanner.displayName="ConnectedCheckoutRescueBanner";let A=ConnectedCheckoutRescueBanner},0x1bfdf0f6d:(e,t,a)=>{"use strict";let n;a.r(t),a.d(t,{BaseBannerDownloadSsb:()=>BannerDownloadSsb,DAYS_TO_DIMISS:()=>N,default:()=>P});var r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x40c0d834),c=a(0xcc110d9),d=a(0x20482ad21),m=a(0x2343fde45),u=a(0x114ee16b3),p=a(0x50312485),h=a(0x12cda7c38),_=a(0x12f291cfb),f=a(0x10b603e91),b=a(0x1faa3f1ac),g=a(0xc660204e),y=a(0x20e80190e),A=a(0x3711e82d),x=a(0x1fcbb004d);let E=new d.Ay("pages_downloads"),C={elementName:"try_again",onClick:{enableClogAction:!0}},k={elementName:"done",onClick:{enableClogAction:!0}},DownloadAppModal=({downloadLink:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,x.O)()),[t]),n=E.t("Done",{fallbackHash:"e9b450d14bc2363d292c84f17cfad5cfbd58a458",fallbackHashNs:"usecase_onboarding"});return r.createElement(s.A,{eventId:A.EventId.NEWXP_SSB,uiStep:A.UiStep.DOWNLOAD_SSB_BANNER_MODAL},r.createElement(y.dW,{className:"p-download_modal__content_text p-download_modal__content_text--banner",closeModal:a,isOpen:!0,centered:!0},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:E.t("Done downloading? Next\u2026")})),r.createElement(y.$m,null,r.createElement(y.qf,null,r.createElement(g.A,null))),r.createElement(y.jl,null,r.createElement("p",{className:"p-download_modal__try_download_again align_center margin_bottom_0"},E.rt("Problems downloading? <a>Try again</a>",null,({text:t})=>r.createElement(b.A,{href:e,autoClogProps:C},t))),r.createElement(y.ox,null,r.createElement(y.s_,{type:"outline",autoClogProps:k,"aria-label":n},n)))))};DownloadAppModal.displayName="DownloadAppModal";var v=a(0x16c9d7cd9),S=a(0x12f41fc32),I=a(0x46dbff89);let w=a.p+"download_ssb-b7d2461.svg",T=new d.Ay("download_ssb_banner"),N=3650,{operatingSystemType:M,downloadLink:R}=(0,p.m)();switch(M){case p.p.MacOs:n=T.t("macOS");break;case p.p.Windows:n=T.t("Windows");break;case p.p.Linux:n=T.t("Linux");break;default:n=""}let BannerDownloadSsb=({enableSectionNavigation:e,handleDismissReminder:t,handleDownloadSlack:a,onBlur:i,onFocus:l})=>{let c=T.t("With the Slack app, your team is never more than a click away.",{fallbackHashNs:"straight_to_ssb",fallbackHash:"cca6605d5d226d0bec76ec2ffd267b02ba602480"}),d=r.createElement("span",{className:"p-workspace_banner__download_content_download_button_text"},T.rt("Download Slack for {operatingSystem}",{operatingSystem:n}));return r.createElement(s.A,{eventId:A.EventId.BANNER_ACTION,uiStep:A.UiStep.DOWNLOAD_SSB_BANNER,clogImpression:!0,uiComponentVariant:A.UiComponentVariant.STRAIGHT_TO_SSB_DOWNLOAD_SLACK_APP_TREATMENT,stepVariant:v.D.MIGRATED_NOTIFICATION},r.createElement("div",null,r.createElement(f.A,{enableSectionNavigation:e,className:o()("p-workspace_banner__download","p-workspace_banner__download_ia4"),isFixedPosition:!1,onFocus:l,onBlur:i,"data-qa":"download_ssb_banner",showCloseButton:!0,onClose:t},r.createElement("img",{alt:"",src:w,height:"28",width:"40",className:"margin_right_75"}),r.createElement(u.A,{downloadAppButtonLabel:d,downloadBannerTitle:c,downloadLink:R,downloadNativeApp:a,handleDismissReminder:t,primaryCtaDataQa:"download_slack",target:"_self"}))))};BannerDownloadSsb.displayName="BannerDownloadSsb";let ConnectedBannerDownloadSsb=e=>{let t=(0,i.wA)(),[a,n]=(0,r.useState)("1"===(0,c.v8)("show_download_ssb_banner")),l=(0,r.useCallback)(()=>{(0,c.n0)("no_download_ssb_banner","1",N,"slack.com"),n(!1),t((0,S.AZ)({pref:"dismissed_banner_download_ssb_prompt",value:!0}))},[t]),o=(0,r.useCallback)(()=>{t((0,_.f)({reason:h.wr.NOTIFY_BACKEND_OF_SSB_DOWNLOAD,eventHandler:h.ch.SSB_DOWNLOAD_FALLBACK_EVENT_HANDLER})),t((0,I.q)({element:r.createElement(DownloadAppModal,{downloadLink:R})})),(0,c.n0)("no_download_ssb_banner","1",N,"slack.com")},[t]);return a?r.createElement(BannerDownloadSsb,{...e,handleDismissReminder:l,handleDownloadSlack:o}):null};ConnectedBannerDownloadSsb.displayName="ConnectedBannerDownloadSsb";let P=(0,m.A)(ConnectedBannerDownloadSsb)},0x241b64743:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PerformanceSliderBanner:()=>PerformanceSliderBanner});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x18dac2b8e),l=a(0xd9faf062),o=a(0x1faa3f1ac),s=a(0x10b603e91),c=a(0x218842a12),d=a(0x20061cab9),m=a(0x5b1935a6);c.g.PERFORMANCE_SLIDER_BANNER;let PerformanceSliderBanner=()=>{let e=(0,r.wA)(),t=(0,n.useCallback)(()=>{e((0,d.Ay)({spaceName:m.xu.CLIENT_FOOTER,action:m.hw.DISMISS}))},[e]),a=(0,i.Cu)()?"-dev":"";return n.createElement(s.A,{className:"align_center",type:l.QE.info,preventTypeOverride:!0,isFixedPosition:!1,showCloseButton:!0,onClose:t},n.createElement("div",null,n.createElement("strong",null,"Your user is opted into a slower API experience via Performance Sliders. Head over to"," ",n.createElement(o.A,{href:`https://houston${a}.tinyspeck.com/profiling/sliders`,target:"_blank"},"Houston")," ","to view or change your settings.")))};PerformanceSliderBanner.displayName="PerformanceSliderBanner"},0x1e54e523f:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>U});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xd9faf062),o=a(0x1faa3f1ac),s=a(0x40c0d834),c=a(0x10b603e91),d=a(0x3711e82d),m=a(0x20061cab9),u=a(0x5b1935a6);let DunningNoticeBanner=({children:e,"data-qa":t,dunningSubtype:a,type:i})=>{let l=(0,r.wA)(),o=(0,n.useCallback)(()=>{l((0,m.Ay)({spaceName:u.xu.CLIENT_FOOTER,step:a,action:u.hw.DISMISS}))},[l,a]);return n.createElement(s.A,{eventId:d.EventId.UPGRDEXP_DUNNING_BANNER,elementType:d.ElementType.BANNER,clogImpression:!0,enableClogImpressionOffScreen:!0,uiComponentName:d.UiComponentName[a.toUpperCase()],uiStep:d.UiStep.BANNER_DUNNING},n.createElement(c.A,{type:i,preventTypeOverride:!0,isFixedPosition:!1,onClose:o,"data-qa":t},e))};DunningNoticeBanner.displayName="DunningNoticeBanner";let p="admin/billing/failed",h="help/requests/new";var _=a(0x1e796e769),f=a(0x1950da728);let b=new i.Ay("dunning_banners"),g={elementName:"show_members_admins",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},y={elementName:"contact_support",onClick:{enableClogAction:!0}},DunningNoticeDay14AdminBillingBanner=({dunningSubtype:e,onAdminLinkClick:t})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_14_admin_billing_banner",dunningSubtype:e,type:l.QE.urgent},b.rt("Payment for this workspace is overdue, and it will be downgraded soon. Questions? <a>Contact your Workspace Owner</a>, or <contact>contact support</contact>.",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:g,"data-qa":"banner-dunning_admin_members_link",onClick:t},e),"<contact>":({text:e})=>n.createElement(o.A,{autoClogProps:y,"data-qa":"banner-dunning_support_link",href:h},e)}));DunningNoticeDay14AdminBillingBanner.displayName="DunningNoticeDay14AdminBillingBanner";let ConnectedDunningNoticeDay14AdminBillingBanner=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,_.A)({filters:{accountType:f.Dx.admins}}))},[t]);return n.createElement(DunningNoticeDay14AdminBillingBanner,{onAdminLinkClick:a,...e})};ConnectedDunningNoticeDay14AdminBillingBanner.displayName="ConnectedDunningNoticeDay14AdminBillingBanner";let A=new i.Ay("dunning_banners"),x={elementName:"admin_billing_methods",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDay14OwnerCardholderBanner=({dunningSubtype:e})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_14_owner_cardholder_banner",dunningSubtype:e,type:l.QE.urgent},A.rt("Your payment is overdue, and your workspace will be downgraded soon. Keep your paid plan by <a>updating your payment details</a>.",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:x,"data-qa":"banner-dunning_billing_methods_link",href:p},e)}));DunningNoticeDay14OwnerCardholderBanner.displayName="DunningNoticeDay14OwnerCardholderBanner";let E=new i.Ay("dunning_banners"),C={elementName:"show_members_admins",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDay21AllUsersBanner=({dunningSubtype:e,onLinkClick:t})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_21_all_users_banner",dunningSubtype:e,type:l.QE.warning},E.rt("Your workspace may be downgraded soon, which will limit how many past messages you can see. Questions? <a>Contact your admins</a>",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:C,onClick:t,"data-qa":"banner-dunning_admin_members_link"},e)}));DunningNoticeDay21AllUsersBanner.displayName="DunningNoticeDay21AllUsersBanner";let ConnectedDunningNoticeDay21AllUsersBanner=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,_.A)({filters:{accountType:f.Dx.admins}}))},[t]);return n.createElement(DunningNoticeDay21AllUsersBanner,{onLinkClick:a,...e})};ConnectedDunningNoticeDay21AllUsersBanner.displayName="ConnectedDunningNoticeDay21AllUsersBanner";let k=new i.Ay("dunning_banners"),v={elementName:"admin_billing_methods",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},S={elementName:"contact_support",onClick:{enableClogAction:!0}},DunningNoticeDay21BillingStakeholdersBanner=({dunningSubtype:e,numDaysTilDowngrade:t})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_21_billing_stakeholders_banner",dunningSubtype:e,type:l.QE.urgent},k.rt("Your workspace will be downgraded if payment is not received within {numDaysTilDowngrade} days. <a>Update your payment details</a> or <contact>contact support</contact>.",{numDaysTilDowngrade:t,"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:v,"data-qa":"banner-dunning_billing_methods_link",href:p},e),"<contact>":({text:e})=>n.createElement(o.A,{autoClogProps:S,"data-qa":"banner-dunning_support_link",href:h},e)}));DunningNoticeDay21BillingStakeholdersBanner.displayName="DunningNoticeDay21BillingStakeholdersBanner";let I=new i.Ay("dunning_banners"),w={elementName:"admin_billing_methods",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDayOneBanner=({dunningSubtype:e})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_one_banner",dunningSubtype:e,type:l.QE.warning},I.rt("There was an issue processing your recent payment. <a>Update your payment details</a>",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:w,"data-qa":"banner-dunning_billing_methods_link",href:p},e)}));DunningNoticeDayOneBanner.displayName="DunningNoticeDayOneBanner";let T=new i.Ay("dunning_banners"),N={elementName:"show_members_admins",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDaySevenAdminBillingBanner=({dunningSubtype:e,onLinkClick:t})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_seven_admin_billing_banner",dunningSubtype:e,type:l.QE.warning},T.rt("There was an issue processing payment for this workspace. Please <a>ask your Workspace Owner</a> to update their payment details.",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:N,"data-qa":"banner-dunning_admin_members_link",onClick:t},e)}));DunningNoticeDaySevenAdminBillingBanner.displayName="DunningNoticeDaySevenAdminBillingBanner";let ConnectedDunningNoticeDaySevenAdminBillingBanner=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,_.A)({filters:{accountType:f.Dx.admins}}))},[t]);return n.createElement(DunningNoticeDaySevenAdminBillingBanner,{onLinkClick:a,...e})};ConnectedDunningNoticeDaySevenAdminBillingBanner.displayName="ConnectedDunningNoticeDaySevenAdminBillingBanner";let M=new i.Ay("dunning_banners"),R={elementName:"admin_billing_methods",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDaySevenOwnerCardholderBanner=({dunningSubtype:e})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_seven_owner_cardholder_banner",dunningSubtype:e,type:l.QE.warning},M.rt("Keep your paid plan for access to your full message history. <a>Update your payment details</a>",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:R,"data-qa":"banner-dunning_billing_methods_link",href:p},e)}));DunningNoticeDaySevenOwnerCardholderBanner.displayName="DunningNoticeDaySevenOwnerCardholderBanner";let P=new i.Ay("dunning_banners"),L={elementName:"show_members_admins",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDayThreeAdminBillingContactsBanner=({dunningSubtype:e,onLinkClick:t})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_three_admin_billing_contacts_banner",dunningSubtype:e,type:l.QE.warning},P.rt("There was an issue processing payment for this workspace. Please <a>ask your Workspace Owner</a> to update their payment details.",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:L,"data-qa":"banner-dunning_admin_billing_contacts_link",onClick:t},e)}));DunningNoticeDayThreeAdminBillingContactsBanner.displayName="DunningNoticeDayThreeAdminBillingContactsBanner";let ConnectedDunningNoticeDayThreeAdminBillingContactsBanner=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,_.A)({filters:{accountType:f.Dx.admins}}))},[t]);return n.createElement(DunningNoticeDayThreeAdminBillingContactsBanner,{onLinkClick:a,...e})};ConnectedDunningNoticeDayThreeAdminBillingContactsBanner.displayName="ConnectedDunningNoticeDayThreeAdminBillingContactsBanner";let O=new i.Ay("dunning_banners"),D={elementName:"admin_billing_methods",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},DunningNoticeDayThreeOwnerCardholderBanner=({dunningSubtype:e})=>n.createElement(DunningNoticeBanner,{"data-qa":"dunning_notice_day_three_owner_cardholder_banner",dunningSubtype:e,type:l.QE.warning},O.rt("Keep your workspace from being downgraded to the Free plan by <a>updating your payment details</a>.",{"<a>":({text:e})=>n.createElement(o.A,{autoClogProps:D,"data-qa":"banner-dunning_billing_methods_link",href:p},e)}));DunningNoticeDayThreeOwnerCardholderBanner.displayName="DunningNoticeDayThreeOwnerCardholderBanner";let F=(0,a(0x1ec68d6a3).Wo)(),DunningNoticeContainer=e=>{let{dunningSubtype:t}=e;switch(t){case u.p_.DUNNING_DAY_1_BANNER:return n.createElement(DunningNoticeDayOneBanner,e);case u.p_.DUNNING_DAY_3_OWNER_CARDHOLDER_BANNER:return n.createElement(DunningNoticeDayThreeOwnerCardholderBanner,e);case u.p_.DUNNING_DAY_3_ADMIN_BILLING_CONTACTS_BANNER:return n.createElement(ConnectedDunningNoticeDayThreeAdminBillingContactsBanner,e);case u.p_.DUNNING_DAY_7_OWNER_CARDHOLDER_BANNER:return n.createElement(DunningNoticeDaySevenOwnerCardholderBanner,e);case u.p_.DUNNING_DAY_7_ADMIN_BILLING_CONTACTS_BANNER:return n.createElement(ConnectedDunningNoticeDaySevenAdminBillingBanner,e);case u.p_.DUNNING_DAY_14_OWNER_CARDHOLDER_BANNER:return n.createElement(DunningNoticeDay14OwnerCardholderBanner,e);case u.p_.DUNNING_DAY_14_ADMIN_BILLING_CONTACTS_BANNER:return n.createElement(ConnectedDunningNoticeDay14AdminBillingBanner,e);case u.p_.DUNNING_DAY_21_BILLING_STAKEHOLDERS_BANNER:return n.createElement(DunningNoticeDay21BillingStakeholdersBanner,e);case u.p_.DUNNING_DAY_21_ALL_USERS_BANNER:return n.createElement(ConnectedDunningNoticeDay21AllUsersBanner,e);default:return F.error(u.cK,`${t} is not a recognized dunning subtype name for notification name ${u.ze.DUNNING_NOTICE}.`),null}};DunningNoticeContainer.displayName="DunningNoticeContainer";let U=DunningNoticeContainer},0x227492469:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseBannerDownloadMobileWithFocusTransitions:()=>T,default:()=>N});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x40c0d834),o=a(0xb97b797e),s=a(0x20482ad21),c=a(0x2343fde45),d=a(0x114ee16b3),m=a(0x12cda7c38),u=a(0x12f291cfb),p=a(0x23841455e),h=a(0x10b603e91),_=a(0xa1832ae4),f=a(0x242503693),b=a(0x6b345e37),g=a(0x3711e82d),y=a(0x1c91944c9),A=a(0x22ef89887),x=a(0x20061cab9),E=a(0xf3c65e54),C=a(0x5b1935a6),k=a(0x46dbff89),v=a(0x1ee439e69);let S=a.p+"download_mobile_app-a2913d5.svg",I=new s.Ay("banner_download_native_app"),w=class extends n.PureComponent{constructor(e){super(e),(0,o.v)(this,["openDownloadMobileAppModal","deferOrDismissReminder"])}componentDidMount(){let{setBannerDownloadMobileAsSeen:e}=this.props;e({notificationName:C.ze.MOBILE_AWARENESS_BANNER,action:C.hw.IMPRESSION,step:"default"})}openDownloadMobileAppModal(){let{recordAndClearBannerDownloadMobile:e,throttledSendFallbackEmail:t,openModal:a}=this.props;a({element:n.createElement(p.A,{eventId:g.EventId.EDUCATION_MOBILE_AWARENESS_BANNER})}),e(C.hw.CLICK),t({reason:m.wr.TRIGGER_MOBILE_FALLBACK_EMAIL,eventHandler:m.ch.MOBILE_PROMO_FALLBACK_EVENT_HANDLER,subtype:m.YB.MOBILE_AWARENESS_BANNER})}deferOrDismissReminder(e){let{recordAndClearBannerDownloadMobile:t,transitionFocusTo:a}=this.props;t(e),a({focusKey:f.Ay.MESSAGE_PANE_MESSAGE_INPUT})}renderDownloadMobileBanner(){let{onFocus:e,onBlur:t,signedInMobileOtherTeam:a,currentTeamName:r,enableSectionNavigation:l}=this.props,o=I.rt("Stay up to date from anywhere with the Slack mobile app"),s=I.t("Get the Slack Mobile App"),c="download_slack";return a&&(o=I.rt("Stay connected to {currentTeamName}, even when you\u2019re on the go",{currentTeamName:r}),s=I.t("Sign In to the Mobile App"),c="sent_magic_login_link"),s=n.createElement("span",{className:"p-workspace_banner__download_content_download_button_text"},s),n.createElement(h.A,{enableSectionNavigation:l,className:i()("p-workspace_banner__download","p-workspace_banner__download_ia4"),isFixedPosition:!1,onFocus:e,onBlur:t,showCloseButton:!0,onClose:()=>{this.deferOrDismissReminder(C.hw.DISMISS)}},n.createElement("img",{alt:"",src:S,height:"28",width:"28",className:"margin_right_75"}),n.createElement(d.A,{downloadAppButtonLabel:s,downloadBannerTitle:o,downloadNativeApp:this.openDownloadMobileAppModal,handleDismissReminder:()=>{this.deferOrDismissReminder(C.hw.DISMISS)},isMobileBannerVisible:!0,primaryCtaDataQa:c}))}render(){let{signedInMobileOtherTeam:e}=this.props,t=g.UiStep.DOWNLOAD_MOBILE_BANNER;return e&&(t=g.UiStep.DOWNLOAD_MOBILE_BANNER_EXISTING_HUMAN),n.createElement(l.A,{eventId:g.EventId.EDUCATION_MOBILE_AWARENESS_BANNER,uiStep:t,clogImpression:!0},n.createElement("div",null,this.renderDownloadMobileBanner()))}};w.displayName="BannerDownloadMobile";let T=(0,b.A)(w),N=(0,y.N)((e,{signedInMobileOtherTeam:t})=>{let a=(0,v.H7)(e);return{signedInMobileOtherTeam:t,currentTeamName:(0,_.F1)(a)}},e=>({openModal:(...t)=>e((0,k.q)(...t)),setBannerDownloadMobileAsSeen:(...t)=>e((0,E.j)(...t)),recordBannerDownloadMobileEvent:t=>e((0,E.A)({notificationName:C.ze.MOBILE_AWARENESS_BANNER,action:t,step:"default"})),recordAndClearBannerDownloadMobile:t=>e((0,x.Ay)({spaceName:C.xu.CLIENT_FOOTER,action:t,step:"banner"})),throttledSendFallbackEmail:(...t)=>e((0,u.f)(...t)),sendFallbackEmail:(...t)=>e((0,u.v)(...t)),dismissExistingHumansBanner:(...t)=>e((0,A.KT)(...t)),dismissBannerFromDirectDownloadModal:()=>e((0,x.Ay)({spaceName:C.xu.CLIENT_FOOTER,action:C.hw.CLICK,step:"dialog"}))}))((0,c.A)(T))},0x114ee16b3:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x5739d664),o=a(0x102edf836),s=a(0x242503693),c=a(0x7ad38cfb),d=a(0x1c91944c9);let m=class extends n.PureComponent{downloadNativeAppButtonRef=n.createRef();static defaultProps={isMobileBannerVisible:!1};constructor(e){super(e),this.getFocusTransitionListeners=(0,l.A)(this.getFocusTransitionListeners.bind(this))}getFocusTransitionListeners(e){return{[s.Ay.CLIENT_FOOTER_MOBILE_AWARENESS_BANNER]:()=>!!e&&(this.downloadNativeAppButtonRef?.current?.focus(),!0)}}render(){let{downloadAppButtonLabel:e,downloadBannerTitle:t,downloadLink:a,downloadNativeApp:r,isMobileBannerVisible:l,primaryCtaDataQa:s,target:d}=this.props;return n.createElement("div",{className:"p-workspace_banner__download_content","data-qa":"banner_download"},n.createElement(c.A,{listeners:this.getFocusTransitionListeners(l)},n.createElement("div",{className:"p-workspace_banner__download_content_main","data-qa":"banner_download_title",id:"banner-download-title"},t),n.createElement("div",{className:"p-workspace_banner__download_content_actions"},n.createElement(o.z9,{autoClogProps:{elementName:s,isPrimaryCTA:!0,onClick:{enableClogAction:!0}},className:i()("p-workspace_banner__download_content_download_button",{"p-workspace_banner__download_ssb_content_download_button":!l}),"data-qa":s,onClick:r,ref:this.downloadNativeAppButtonRef,type:"outline",...a?{href:a,target:d}:{}},e))))}};m.displayName="BannerDownload";let u=(0,d.N)()(m)},0xf28fc3c1:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x1e33662b),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0xb454ea59),c=a(0x1faa3f1ac),d=a(0x1e9c618f9);let m=new o.Ay("straight_to_ssb"),GetDownloadSSBCopy=({teamId:e,teamUrl:t="",onClickDownloadOrOpenAppBanner:a=l.A,includeLinks:r=!1})=>{let o=(0,s.W)()?"Chromium":i().osname,i18nTags=({tag:r,text:i})=>{switch(r){case"a":return n.createElement(c.A,{href:(0,d.J)({teamId:e}),onClick:()=>a("download")},i);case"c":return n.createElement(c.A,{href:`${t}ssb/redirect`,onClick:()=>a("open")},n.createElement("span",{className:"sk_inverted_foreground"},i));case"span":return n.createElement("span",{className:"p-workspace_banner__desktop_banner_contrasted_text"},i);default:return null}};i18nTags.displayName="i18nTags";let u=m.t("Slack is better with the app");return r&&(u=m.rt('Stop juggling tabs, download the Slack app. <a>Get Slack for {osType}</a> <span class="sk_foreground_max">(Already have the app? <c>Open Slack</c>.)</span>',{osType:o},i18nTags)),u};GetDownloadSSBCopy.displayName="GetDownloadSSBCopy";let u=GetDownloadSSBCopy},0x50312485:(e,t,a)=>{"use strict";a.d(t,{m:()=>getDownloadSsbLinkAndOs,p:()=>i});var n,r=a(0x62a17882),i=((n={}).MacOs="macOS",n.Windows="Windows",n.Linux="Linux",n.None="",n);let getDownloadSsbLinkAndOs=()=>{let e,t;switch((0,r.DC)()){case"mac":e="macOS",t="/api/desktop.latestRelease?arch=universal&variant=dmg&redirect=true";break;case"windows":e="Windows",t=(0,r.XG)()?"/api/desktop.latestRelease?arch=x64&variant=exe&redirect=true":"/api/desktop.latestRelease?arch=ia32&variant=exe&redirect=true";break;case"linux":e="Linux",t="/downloads/linux";break;default:e="",t=""}return{operatingSystemType:e,downloadLink:t}}},0x329bdba8:(e,t,a)=>{"use strict";a.d(t,{a:()=>shouldShowDownloadAppBannerBoot,f:()=>d});var n=a(0x1e33662b),r=a.n(n),i=a(0xcc110d9),l=a(0x62a17882),o=a(0x1cf0d97e1),s=a(0xf1527618),c=a(0x19c76d181);let shouldShowDownloadAppBannerBoot=e=>"1"!==(0,i.v8)("no_download_banner")&&"1"!==(0,i.v8)("defer_download_banner")&&!e,d=(0,o.Ay)(e=>{let t=(0,c.tV)(e,"userSawNotificationsBanner"),a=(0,i.en)();return(0,s.xr)(e)&&t&&"1"!==a.no_download_ssb_banner&&"1"!==a.defer_download_ssb_banner&&"1"!==a.no_download_banner&&"1"!==a.defer_download_banner&&!(0,l.y3)()&&!r().chromeBook});d.meta={name:"shouldShowDownloadAppBannerWorkspace",key:"createSelectorShouldShowDownloadAppBannerWorkspace",description:e=>{let t=(0,c.tV)(e,"userSawNotificationsBanner"),a=(0,i.en)();return(0,s.xr)(e)&&t&&"1"!==a.no_download_ssb_banner&&"1"!==a.defer_download_ssb_banner&&"1"!==a.no_download_banner&&"1"!==a.defer_download_banner&&!(0,l.y3)()&&!r().chromeBook}}},0x2015d41e5:(e,t,a)=>{"use strict";a.d(t,{x:()=>h});var n=a(0x1e33662b),r=a.n(n),i=a(0xcc110d9),l=a(0x62a17882),o=a(0xa1832ae4),s=a(0x1cf0d97e1),c=a(0x1ccef1c6f),d=a(0xb9604b6),m=a(0x5b1935a6),u=a(0x1ee439e69);let p=(0,s.Ay)(e=>(0,d.Hp)(e,m.xu.CLIENT_FOOTER)===m.ze.SSB_LITE_BANNER);p.meta={name:"shouldShowDownloadSsbBannerBasedOnMegaphone",key:"createSelectorShouldShowDownloadSsbBannerBasedOnMegaphone",description:e=>(0,d.Hp)(e,m.xu.CLIENT_FOOTER)===m.ze.SSB_LITE_BANNER};let h=(0,s.Ay)(e=>{if(p(e))return!0;let t=(0,u.H7)(e),a=(0,i.en)(),n=(0,c.ty)(e,"dismissed_banner_download_ssb_prompt");return!(0,o.Ny)(t)&&!n&&!(0,l.y3)()&&!r().chromeBook&&"1"!==a.no_download_banner&&"1"!==a.defer_download_banner&&"1"===a.show_download_ssb_banner&&"1"!==a.no_download_ssb_banner&&"1"!==a.defer_download_ssb_banner&&"1"===a.shown_ssb_redirect_page});h.meta={name:"shouldShowDownloadSsbBanner",key:"createSelectorShouldShowDownloadSsbBanner",description:e=>{if(p(e))return!0;let t=(0,u.H7)(e),a=(0,i.en)(),n=(0,c.ty)(e,"dismissed_banner_download_ssb_prompt");return!(0,o.Ny)(t)&&!n&&!(0,l.y3)()&&!r().chromeBook&&"1"!==a.no_download_banner&&"1"!==a.defer_download_banner&&"1"===a.show_download_ssb_banner&&"1"!==a.no_download_ssb_banner&&"1"!==a.defer_download_ssb_banner&&"1"===a.shown_ssb_redirect_page}}},0x9cc03cfb:(e,t,a)=>{"use strict";a.d(t,{K:()=>shouldShowNotificationBanner});var n=a(0xcc110d9),r=a(0x71e68ec7);let shouldShowNotificationBanner=(e,t)=>(0,r.e8)()&&"denied"!==e&&"1"!==(0,n.v8)("no_growl_banner")&&"1"!==(0,n.v8)("defer_growl_banner")&&!t},0x1db02e304:(e,t,a)=>{"use strict";a.d(t,{f:()=>BlockKitModalError});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x2b7f0bcc),s=a(0x1faa3f1ac);let c=new l.Ay("app_views");function BlockKitModalError({retryHandler:e,align:t=o.AO.left,message:a,type:r=o.QE.boxed,"data-qa":l="block-kit-modal-error"}){let d=c.rt("We had some trouble connecting. <a>Try again?</a>",null,({text:t})=>n.createElement(s.A,{onClick:e},t)),m=c.t("We had some trouble connecting. Please try again."),u=(0,n.useMemo)(()=>e?d:m,[e,d,m]),p="string"==typeof a&&a.includes(`
`),h=i()("margin_bottom_100",{"p-block_kit_modal__error--preline":p});return n.createElement(o.Ay,{type:r,align:t,level:o.A_.error,className:h,"data-qa":l},a||u)}BlockKitModalError.displayName="BlockKitModalError"},0x1c518f2d8:(e,t,a)=>{"use strict";a.d(t,{m:()=>eP,A:()=>eF});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x9e671ad),s=a(0x77727995),c=a(0x21f3c49e8),d=a(0x8601851c),m=a(0x1229d92d),u=a(0x40c0d834),p=a(0xb97b797e),h=a(0x20b4dda68),_=a(0x62a17882),f=a(0x20482ad21),b=a(0xb1ea448c),g=a(0x139aa1a7),y=a(0x6cc5eee0),A=a(0x9a0c6349);let x="block-kit-builder";var E=a(0x1db02e304),C=a(0x179bf3aea),k=a(0x10af3b48),v=a(0x1c7cb6e50);let get_initial_view_state=e=>{let{blocks:t=[]}=e,a={};return t.forEach(e=>{let{type:t,block_id:n}=e;if(t===h.WP.input&&"element"in e&&e.element){let{type:t,action_id:r}=e.element;a={...a,...(0,C.F)(t,n,r,(0,k.O)((0,v.A)(e.element)))}}}),{...e.state,values:a}};var S=a(0x113cdbbd7),I=a(0xa58e49e0),w=a(0x221091ef3),T=a(0x178109f89),N=a(0xf9f0d4cb);let blocksArrayContainsStatefulElement=e=>{if(!e)return!1;let t=!1;for(let a of e){switch(a.type){case h.WP.section:a.accessory&&a.accessory.type&&(0,N.d)(a.accessory.type)&&(t=!0);break;case h.WP.actions:for(let e of a.elements)if((0,N.d)(e.type)){t=!0;break}break;case h.WP.input:a.element&&a.element.type&&(0,N.d)(a.element.type)&&(t=!0)}if(t)break}return t};var M=a(0x108430f6d),R=a(0x170cf6ee1),P=a(0x23c853006),L=a(0x1cf0d97e1),O=a(0x14149c126);let D=(0,L.Ay)(e=>"on"===(0,O._Z)(e,"workflow_details_history"));D.meta={name:"isWorkflowDetailsHistoryOn",key:"createSelectorIsWorkflowDetailsHistoryOn",description:e=>"on"===(0,O._Z)(e,"workflow_details_history")};var F=a(0xd6ba6894),U=a(0x11a296110),B=a(0xe28ad2a3),H=a(0x101c0e66c);let W=new f.Ay("wizard_modal"),V="close",G="back",q="next",j=class extends n.Component{static defaultProps={backButton:void 0,showBackButton:!0,nextButton:void 0,showNextButton:!0,nextButtonTooltip:void 0,nextButtonIsDisabled:!1,nextButtonIsPending:!1,onClose:()=>{},onBack:()=>{},onNext:()=>{},isSpeedBumpEnabled:!0,getShouldShowSpeedBump:()=>!1,speedBumpHeader:void 0,speedBumpBody:void 0,speedBumpCancelButton:void 0,speedBumpContinueButtonType:"danger",speedBumpContinueButton:void 0,"data-qa":"wizard_modal",autoClogProps:void 0,windowId:void 0};static getDerivedStateFromProps(e){let{isSpeedBumpEnabled:t}=e;return t?null:{isShowingSpeedBump:!1,speedBumpButton:""}}closeButton;keyCommands;constructor(e){super(e),(0,p.v)(this,["handleNextClick","handleBackClick","handleClose","handleSpeedBumpCancel","handleSpeedBumpContinue","renderFooter"]),this.state={}}componentDidMount(){let{isSpeedBumpEnabled:e}=this.props;e&&F.J.requestAnimationFrame(()=>{this.closeButton=F.J.document.getElementsByClassName("c-dialog__close")[0]})}componentWillUnmount(){this.keyCommands&&this.keyCommands.reset()}handleBackClick(){this.props.getShouldShowSpeedBump?.(G)?this.setState(()=>({isShowingSpeedBump:!0,speedBumpButton:G})):this.props.onBack?.()}handleClose(e){let t=e&&"currentTarget"in e&&e.currentTarget.classList.contains("c-dialog__close");return this.props.getShouldShowSpeedBump?.(t?V:null)?this.setState(()=>({isShowingSpeedBump:!0,speedBumpButton:V})):this.props.onClose?.(),!1}handleNextClick(){this.props.getShouldShowSpeedBump?.(q)?this.setState(()=>({isShowingSpeedBump:!0,speedBumpButton:q})):this.props.onNext?.()}handleSpeedBumpCancel(){this.setState(()=>({isShowingSpeedBump:!1})),this.closeButton?.focus()}handleSpeedBumpContinue(){this.setState(()=>({isShowingSpeedBump:!1}));let{speedBumpButton:e}=this.state,{onNext:t,onBack:a,onClose:n}=this.props;e===q?t?.():e===G?a?.():e===V&&n?.(),this.closeButton&&this.closeButton.focus()}renderBackButton({cancelButtonRef:e}={}){let t=W.t("Back"),{showBackButton:a,backButton:r=t,autoClogProps:i,"data-qa":l}=this.props;return!!a&&n.createElement(U.Ay,{ref:e,type:"outline",className:"c-wizard_modal__back",onClick:this.handleBackClick,autoClogProps:i?.backButton,"data-qa":`${l}_back`},r)}renderFooter({goButtonRef:e,cancelButtonRef:t}={}){let{showBackButton:a,showNextButton:r}=this.props;return!!(a||r)&&n.createElement("div",{className:"c-wizard_modal__footer"},this.renderBackButton({cancelButtonRef:t}),this.renderNextButton({goButtonRef:e}))}renderNextButton({goButtonRef:e}={}){let t=W.t("Next"),{showNextButton:a,nextButton:r=t,nextButtonIsDisabled:i,nextButtonIsPending:l,autoClogProps:o,"data-qa":s}=this.props;return!!a&&n.createElement(U.lV,{ref:e,type:"primary",className:"c-wizard_modal__next ",onClick:this.handleNextClick,loading:l,disabled:i,autoClogProps:o?.nextButton,"data-qa":`${s}_next`},r)}renderSpeedBump(){let{speedBumpHeader:e,speedBumpBody:t,speedBumpCancelButton:a,speedBumpContinueButton:r,speedBumpContinueButtonType:i,autoClogProps:l,windowId:o}=this.props;return n.createElement(H.A,{header:e,body:t,cancelButton:a,continueButton:r,continueButtonType:i,onCancel:this.handleSpeedBumpCancel,onContinue:this.handleSpeedBumpContinue,autoClogProps:l?.speedBump,windowId:o})}render(){let{children:e,showBackButton:t,showNextButton:a,nextButton:r,backButton:i,isSpeedBumpEnabled:l,getShouldShowSpeedBump:o,onClose:s,...c}=this.props;return n.createElement(B.Ay,{overlayClassName:"c-wizard_modal",isSpeedBumpEnabled:!1,goOnEnterPressed:!1,showGoButton:!1,showCancelButton:!1,onClose:this.handleClose,customFooterContent:this.renderFooter,...c},e,this.state.isShowingSpeedBump&&this.renderSpeedBump())}};j.displayName="WizardModal";var z=a(0x1a7312abf),K=a(0x182c9b0b0),$=a(0xedbc2765),Y=a(0x15f4f83cf),Q=a(0x11bf9141b),Z=a(0x4d2e7b47),J=a(0x242503693),X=a(0x6b345e37),ee=a(0x3711e82d),et=a(0x1a769a9e8),ea=a(0x1ec68d6a3),en=a(0x2480888d1),er=a(0x1c91944c9),ei=a(0x11bab834e),el=a(0x1742c95b3),eo=a(0xbb9da753),es=a(0x5dd1c0f2),ec=a(0x22854503b),ed=a(0x1936e1c6a),em=a(0x6e87d4ec);let BlockKitModalSubmitCompleteToast=({message:e})=>n.createElement(em.A,{duration:5e3},n.createElement("span",null,e));BlockKitModalSubmitCompleteToast.displayName="BlockKitModalSubmitCompleteToast";var eu=a(0x11c82607b),ep=a(0x16ffed5ab);let eh=(0,eu.Ay)("eneuques a shortcut trigger run toast",async(e,t,a)=>e((0,ep.M)({element:n.createElement(BlockKitModalSubmitCompleteToast,{message:a})})));eh.meta={name:"enqueueBlockKitModalSubmitCompleteToast",key:"createThunkEnqueueBlockKitModalSubmitCompleteToast",description:"eneuques a shortcut trigger run toast"};var e_=a(0x11cdf8541),ef=a(0x6d72337),eb=a(0x19895585a);let eg=(0,eu.Ay)("Pops out the current app dialog into its own child window",async(e,t,{appId:a,title:n,submitButton:r,closeButton:i,onSubmitResolved:l,height:o,width:s},c)=>{let d=t(),{windowId:m="main"}=c(e_.C),u=(0,ed.pk)(d,m),p=(0,ed.JW)(d,m),h={[eb.mq.Primary]:{id:u||"app_popout",viewType:g.D.AppPopout,params:{appId:a,title:n,submitButton:r,closeButton:i,onSubmitResolved:l,activeViewId:u,errorState:p}}};e((0,ef.Bb)({viewSet:h,shouldShowSearch:!1,windowFeatures:{height:o||650,width:s||560}}))});eg.meta={name:"openAppDialogInChildWindow",key:"createThunkOpenAppDialogInChildWindow",description:"Pops out the current app dialog into its own child window"};var ey=a(0x1fcbb004d);let eA=(0,eu.Ay)("Pops out the current BK modal into its own window",(e,t,{appId:a,title:n,submitButton:r,closeButton:i,onSubmitResolved:l,height:o,width:s},c)=>{let d=t(),m=(0,ea.Ay)({state:d}),{windowId:u}=c(e_.C);return(0,ed.pk)(d,u)?e(eg({appId:a,title:n,submitButton:r,closeButton:i,onSubmitResolved:l,height:o,width:s})).then(()=>e((0,ey.O)())):(m.error("BLOCK_KIT_MODALS_POPOUT","Unable to pop out modal -- no active view"),null)});eA.meta={name:"popOutBlockKitModal",key:"createThunkPopOutBlockKitModal",description:"Pops out the current BK modal into its own window"};var ex=a(0x1bb9c210c),eE=a(0x16349a51f),eC=a(0xe9460abe),ek=a(0xe874a88a),ev=a(0x1f3226107),eS=a(0x798b166a),eI=a(0x9b971e7e),ew=a(0xd2640b92),eT=a(0x357dacc7);let eN=(0,eu.Ay)("",async(e,t,{containerId:a})=>{let n=t(),r=(0,eC.au)(n,a);if(!r||0===r.length)return;let i=[];for(let e of r)if(e.files?.length)for(let t of e.files)t.id&&i.push(t.id);let l=Object.keys((0,eT.hP)(t()));if(l.length){let t=(0,eI.ZT)(n),a=(0,eS.iE)(t);ek.S.all(l.map(t=>(a.cancelEagerUpload({pendingFileId:t}),e((0,ew.gO)({pendingFileId:t})))))}i.length&&ek.S.all(i.map(t=>e((0,ev.Ww)({reason:"bk_file_input_remove",fileId:t}))))});eN.meta={name:"removeAllFiles",key:"createThunkRemoveAllFiles",description:""};var eM=a(0x46dbff89);let eR=new f.Ay("app_view"),eP={update:"update",clear:"clear",push:"push",errors:"errors"},eL={activeView:void 0,errorState:void 0,app:void 0,appProfile:void 0,isLoading:!1,loadingFailed:!1,submitButton:void 0,closeButton:void 0,onSubmitResolved:l.A,source:void 0,transitionFocusTo:l.A,experimentSnakeCaseViewApisGroupOn:!1,isChildWindow:!1,isChildWindowPopout:!1,traceId:void 0},eO=class extends n.Component{static defaultProps=eL;mounted;submitAndUpsertViewPromise;initialViewState;shouldFocusOnUpdate;blockKitLogPayload;keyCommands;clogModalInteraction;constructor(e){super(e),this.submitAndUpsertViewPromise=void 0,this.clogModalInteraction=()=>{},this.initialViewState=(0,Y.uz)(this.props.activeView)?get_initial_view_state(this.props.activeView):{},this.shouldFocusOnUpdate=!1,this.blockKitLogPayload={},this.mounted=!1,this.state={submittingFailed:!1,isSubmitting:!1,showErrors:!1,errorMsg:void 0,errors:{},viewError:void 0,isShowingConfirm:!1,speedBumpHeader:void 0,speedBumpBody:void 0,speedBumpCancelButton:void 0,speedBumpContinueButton:void 0,speedBumpContinueButtonType:void 0,speedBumpOnContinue:void 0,blockToFocusAfterValidation:void 0},(0,p.v)(this,["renderTitle","retryLoad","showConfirmDialog","openFileViewer","getShouldShowSpeedBump","resetConfirmDialog","submit","maybeRenderError","maybeRenderConfirm","maybeRenderSpinner","handleKeyPressedCmdEnter","handleAction","handleConfirmContinue","handleConfirmCancel","handlePopOut","handleWizardClose","handleWizardNext","handleWizardBack","handleSubmitRejected","handleSubmitResolved"])}componentDidMount(){this.mounted=!0;let e=this.props.windowRef.deref(),t=e?.document;this.keyCommands=new d.A(t||void 0),this.keyCommands.bindAll([{keys:["command+enter"],handler:this.handleKeyPressedCmdEnter}]),this.focusOnContent(),this.props.activeView?.callbackId==="hermes_form"&&($.LI.stop({label:$.gC.WorkflowsStartWorkflowToOpenFormDuration}),$.LI.stop({label:$.gC.WorkflowsMessageButtonClickToOpenFormDuration})),this.props.windowRef.deref()?.addEventListener("beforeunload",this.handleWizardClose)}componentDidUpdate(e){if(this.props.activeView&&!(0,o.A)(e.activeView,this.props.activeView)&&(this.initialViewState=get_initial_view_state(this.props.activeView)),this.shouldFocusOnUpdate||e.activeView?.id!==this.props.activeView?.id){let{activeView:e,windowRef:t}=this.props;e&&e.blocks&&e.blocks.find(e=>{switch(e.type){case"actions":e.elements&&e.elements.forEach(e=>!!e.focus_on_load);break;case"section":if(e.accessory&&e.accessory?.focus_on_load)return!0;break;case"input":if(e.element&&e.element.focus_on_load)return!0}return!1})||(this.shouldFocusOnUpdate=!1,t.deref()?.requestAnimationFrame(()=>this.focusOnContent()))}let t=Object.keys(this.props.errorState?.errors??{}).length,a=Object.keys(e.errorState?.errors??{}).length;if(!this.state.blockToFocusAfterValidation&&this.state.showErrors&&(t||a)){if(0===t&&null!==this.state.blockToFocusAfterValidation)return void this.setState(()=>({blockToFocusAfterValidation:void 0}));let e=this.props.activeView?.blocks.find(e=>{let t=e.block_id;return this.props.errorState?.errors[t]});e&&e.block_id!==this.state.blockToFocusAfterValidation&&this.setState(()=>({blockToFocusAfterValidation:e.block_id}))}}componentWillUnmount(){this.mounted=!1,this.keyCommands.reset();let{activeView:e,windowId:t}=this.props;this.props.setActiveViewId({windowId:t,activeViewId:null}),this.props.removeErrorState({windowId:t,viewId:e?.id}),this.submitAndUpsertViewPromise&&this.submitAndUpsertViewPromise.cancel&&this.submitAndUpsertViewPromise.cancel(),(this.props.isChildWindow||this.props.isChildWindowPopout)&&this.handleWizardClose(),this.props.windowRef.deref()?.removeEventListener("beforeunload",this.handleWizardClose)}getShouldShowSpeedBump(e){let t;if(this.props.source===x)return!1;let{activeView:a,blockState:n}=this.props;e===G&&a?.id!==a?.rootViewId&&(t=eR.t("Continue")),this.setState(()=>({speedBumpContinueButton:t}));let r=!!a&&blocksArrayContainsStatefulElement(a.blocks);return e!==V&&e!==q&&!!a?.submit&&r&&!(0,o.A)(this.initialViewState?.values,n)}back(){let{activeView:e,windowId:t}=this.props;if(!e)return;let{clearOnClose:a,previousViewId:n,rootViewId:r}=e;a?(this.close(),this.removeView({rootViewId:r,shouldDeleteView:!0,hasFormData:this.hasPendingFormData()})):n?(this.props.setActiveViewId({windowId:t,activeViewId:n}),this.removeView({shouldDeleteView:!0})):(this.close(),this.removeView({shouldDeleteView:!0,hasFormData:this.hasPendingFormData()}))}close(){this.clogCloseInteraction(),this.props.closeModal()}focusOnContent(){this.props.transitionFocusTo({focusKey:J.Ay.MODAL_ACTIVE_FORM,forceFocus:!0})}hasPendingFormData(){let{activeView:e,blockState:t,experimentWorkflowDetailsHistoryGroupOn:a}=this.props,n=!!e&&blocksArrayContainsStatefulElement(e.blocks);return a?n&&!(0,o.A)(this.initialViewState?.values,t):void 0}handleAction(){this.mounted&&this.setState(()=>({submittingFailed:!1}))}handleConfirmCancel(){this.resetConfirmDialog()}handleConfirmContinue(e){this.resetConfirmDialog(),e()}handleKeyPressedCmdEnter(){(0,s.A)(this.props,"activeView.submit")&&this.submit()}handlePopOut({height:e,width:t}={}){this.props.popOutBlockKitModal({...this.props,height:e,width:t})}handleSubmitRejected(e){this.props.logger?.error("BLOCK-KIT-MODAL",e);let t=e.data;this.setState(()=>({errorMsg:t?.error,errors:t?.errors,viewError:t?.view_error,showErrors:!0,isSubmitting:!1,submittingFailed:!0}))}handleSubmitResolved({responseAction:e,toastMessage:t}={}){let{rootViewId:a,previousViewId:n}=this.props.activeView??{};this.props.onSubmitResolved?.(e),e===eP.update||e===eP.push?(this.shouldFocusOnUpdate=!0,this.setState(()=>({errorMsg:"",errors:{},showErrors:!1,isSubmitting:!1,submittingFailed:!1}))):e===eP.clear?(this.close(),this.removeView({rootViewId:a})):e||(n?(this.shouldFocusOnUpdate=!0,this.setState(()=>({errorMsg:"",errors:{},showErrors:!1,isSubmitting:!1,submittingFailed:!1})),this.props.setActiveViewId({windowId:this.props.windowId,activeViewId:n})):this.close(),this.removeView()),t&&this.props.enqueueBlockKitModalSubmitCompleteToast(t)}handleWizardBack(){this.handleModalClosedAndNotSubmitted(),this.clogModalInteraction({eventId:ee.EventId.BK_USER_INTERACTION,action:ee.UiAction.CLICK,interaction:ee.Interaction.CLOSE,interactionElement:ee.InteractionElement.MODAL}),this.back()}handleWizardClose(){this.handleModalClosedAndNotSubmitted(),this.close(),this.removeView({rootViewId:(0,s.A)(this.props,"activeView.rootViewId"),shouldDeleteView:!0,hasFormData:this.hasPendingFormData()})}handleWizardNext(){this.clogModalInteraction({eventId:ee.EventId.BK_USER_INTERACTION,action:ee.UiAction.CLICK,interaction:ee.Interaction.CONFIRM,interactionElement:ee.InteractionElement.MODAL}),this.submit()}clogCloseInteraction(){this.clogModalInteraction({eventId:ee.EventId.BK_USER_INTERACTION,action:ee.UiAction.CLICK,interaction:ee.Interaction.CLOSE,interactionElement:ee.InteractionElement.MODAL})}maybeRenderConfirm(){let{isShowingConfirm:e,speedBumpBody:t,speedBumpHeader:a,speedBumpCancelButton:r,speedBumpContinueButton:i,speedBumpContinueButtonType:l,speedBumpOnContinue:o}=this.state;return e&&n.createElement(H.A,{header:a,body:t,cancelButton:r,continueButton:i,continueButtonType:l,onContinue:o,onCancel:this.handleConfirmCancel,autoClogProps:{cancelButton:{eventId:ee.EventId.BK_USER_INTERACTION,interaction:ee.Interaction.DENY,interactionElement:ee.InteractionElement.CONFIRM_DIALOG,onClick:{enableClogAction:!0},...this.blockKitLogPayload},continueButton:{eventId:ee.EventId.BK_USER_INTERACTION,interaction:ee.Interaction.CONFIRM,interactionElement:ee.InteractionElement.CONFIRM_DIALOG,onClick:{enableClogAction:!0},...this.blockKitLogPayload}}})}maybeRenderError(){let{isSubmitting:e,submittingFailed:t,errorMsg:a,viewError:r}=this.state,{isLoading:i,loadingFailed:l}=this.props,o=t&&(r||a!==z.LY.validationFailed);return!i&&!e&&(l||o)&&n.createElement(E.f,{retryHandler:t?this.submit:this.retryLoad,message:r})}maybeRenderSpinner(){return(this.state.isSubmitting||this.props.isLoading)&&n.createElement(b.A,{size:"jumbo",className:"p-block_kit_modal__spinner"})}openFileViewer(e){this.props.openModal({element:n.createElement(P.A,{...e,...e.mediaItem||{}}),isStackable:!0})}removeView({rootViewId:e,shouldDeleteView:t,hasFormData:a}={}){let{id:n}=this.props.activeView??{},{experimentWorkflowDetailsHistoryGroupOn:r}=this.props;this.props.removeBlockState(n),e&&e!==n&&this.props.removeBlockState(e),this.props.removeView(e||n),t&&this.props.source!==x&&this.props.deleteView({viewId:n,rootViewId:e,...r?{optionalArgs:{has_form_data:a}}:{}})}resetConfirmDialog(){this.setState(()=>({isShowingConfirm:!1,speedBumpHeader:void 0,speedBumpBody:void 0,speedBumpCancelButton:void 0,speedBumpContinueButton:void 0,speedBumpContinueButtonType:void 0,speedBumpOnContinue:void 0}))}retryLoad(){this.props.reloadView({id:this.props.activeView?.id})}showConfirmDialog({confirm:e,onGo:t}){let a=eR.t("Are you sure?"),r=eR.t("Cancel"),i=eR.t("OK");this.setState(()=>({isShowingConfirm:!0,speedBumpHeader:n.createElement(T.A,{text:e?.title?.text}),speedBumpBody:e.text.type===h.ze.mrkdwn?n.createElement(y.A,{text:e?.text?.text||a}):n.createElement(T.A,{text:e?.text?.text||a}),speedBumpCancelButton:n.createElement(T.A,{text:e?.deny?.text||r}),speedBumpContinueButton:n.createElement(T.A,{text:e?.confirm?.text||i}),speedBumpContinueButtonType:e?.style??"primary",speedBumpOnContinue:()=>{this.handleConfirmContinue(t)}}))}handleModalClosedAndNotSubmitted(){this.props.removeAllFiles({containerId:this.props.activeView?.id})}submit(){if(this.props.source===x)this.close(),this.removeView();else if((0,c.A)(this.props.errorState?.errors)){this.setState(()=>({errorMsg:"",errors:{},showErrors:!1,isSubmitting:!0,submittingFailed:!1,blockToFocusAfterValidation:void 0}));let{experimentSnakeCaseViewApisGroupOn:e,activeView:t,blockState:a,traceId:n}=this.props,r=a;e&&(r=(0,R.T)(r)),this.submitAndUpsertViewPromise=this.props.submitAndUpsertView({view:t,viewState:{values:r||{}},traceId:n}).then(this.handleSubmitResolved).catch(this.handleSubmitRejected)}else{let e=this.props.activeView?.blocks.find(e=>this.props.errorState?.errors[e.block_id]);this.setState(()=>({showErrors:!0,blockToFocusAfterValidation:e?.block_id}))}}shouldDisableNextButton(){let{isSubmitting:e}=this.state;return e}renderBackButton(){let{closeButton:e,activeView:t}=this.props,a=t?.close||e;return a||(a={type:"plain_text",text:eR.t("Close"),emoji:!0}),n.createElement(T.A,a)}renderNextButton(){let{submitButton:e,activeView:t,isLoading:a,loadingFailed:r}=this.props,i=!a&&!r&&t?.submit||(a||r)&&e;return i&&n.createElement(T.A,i)}renderTitle(){let e,t=this.props.activeView?.title||this.props.title,{app:a}=this.props;return a&&(e=(0,et.A)(a,72)),n.createElement("div",{className:"p-block_kit_modal__title"},e?n.createElement("img",{alt:"",className:"p-block_kit_modal__title_icon",src:e}):null,n.createElement(T.A,{className:"p-block_kit_modal__title_text",...t}))}renderTitleAria(){let e=this.props.activeView?.title||this.props.title;return e?.text}renderViewContent(){let{activeView:e,errorState:t,isStateEnabled:a=!0,windowId:r}=this.props,{showErrors:i,errors:l,blockToFocusAfterValidation:o}=this.state;return e?n.createElement(w.A,{key:e.id,view:e,errorState:t,isStateEnabled:a,serverErrors:l,showErrors:i,blockToFocusAfterValidation:o,onError:t=>{this.props.updateErrorState({windowId:r,viewId:e.id,errorState:t})}},n.createElement(A.A,{view:e,containerId:e.id,containerContext:S.pi.modal,onAction:this.handleAction,showConfirmDialog:this.showConfirmDialog,openFileViewer:this.openFileViewer,blockKitLogPayload:this.blockKitLogPayload})):null}render(){let{isLoading:e,appPopoutsEnabled:t,appId:a,activeView:r,isChildWindow:l,isChildWindowPopout:o,windowId:s}=this.props,{isSubmitting:c,speedBumpHeader:d,speedBumpBody:m,speedBumpCancelButton:p,speedBumpContinueButton:h}=this.state,f=this.renderNextButton(),b=i()("p-block_kit_modal",{"p-block_kit_modal--loading":e,"p-block_kit_modal--submitting":c,"p-block_kit_modal--app_popout":o,"p-block_kit_modal--desktop":(0,_.y3)()});this.blockKitLogPayload={blockKitAppId:a,blockKitBotId:r?.botId,surfaceType:(0,en.A)()||o?ee.SurfaceType.POP_OUT:ee.SurfaceType.MODAL,surfaceId:r?.id,uuid:(0,M.l)(ee.SurfaceType.MODAL,{viewId:r?.id,viewHash:r?.hash})};let g=t&&!l;return n.createElement(u.A,{eventId:ee.EventId.BK_USER_IMPRESSION,...this.blockKitLogPayload,clogImpression:!0,enableClogImpressionOffScreen:!0,trackClogRef:e=>{this.clogModalInteraction=e},disableAutoReferringUiContext:!0},n.createElement(I.$.Consumer,null,({isAllAsyncActionsResolved:e})=>n.createElement(j,{className:b,autoClogProps:{popOutButton:{interactionElement:ee.InteractionElement.POP_OUT},onRequestClose:{enableClogAction:!0},context:{eventId:ee.EventId.APPVIEW_RENDERED,appId:a,viewId:r?.id,type:r?.type}},title:this.renderTitle(),titleAria:this.renderTitleAria(),showNextButton:!!f,nextButton:f,nextButtonIsDisabled:!e||this.shouldDisableNextButton(),onNext:this.handleWizardNext,backButton:this.renderBackButton(),onBack:this.handleWizardBack,onClose:this.handleWizardClose,showPopoutButton:g,showTooltipOnCloseButton:t,onPopOut:this.handlePopOut,getShouldShowSpeedBump:this.getShouldShowSpeedBump,speedBumpHeader:d,speedBumpBody:m,speedBumpCancelButton:p,speedBumpContinueButton:h,isChildWindowPopout:o,windowId:s,role:"dialog"},this.maybeRenderError(),this.renderViewContent(),this.maybeRenderConfirm(),this.maybeRenderSpinner())))}};eO.displayName="BlockKitModal";let eD={openModal:eM.q,closeModal:ey.O,removeView:el._A,deleteView:z.lD,reloadView:eo.A,submitAndUpsertView:ex.m,setActiveViewId:ec.DF,removeErrorState:ec.EO,popOutBlockKitModal:eA,removeBlockState:eE.dV,removeAllFiles:eN,enqueueBlockKitModalSubmitCompleteToast:eh,updateErrorState:ec.Ho},eF=(0,K.A)((0,m.A)((0,er.N)((e,{appId:t,windowId:a,getViewSet:n})=>{let r=(0,ed.OM)(e,a),i=n(e);return{activeView:r,errorState:(0,ed.JW)(e,a),app:(0,es.sO)(e,t),appProfile:t?(0,ei.UH)(e,t):void 0,isLoading:(0,Y.mX)(r)||(0,Z.X)(r),loadingFailed:(0,Y.lv)(r),logger:(0,ea.Ay)({state:e}),appPopoutsEnabled:(0,Q.HM)(),blockState:(0,eC.uz)(e,r?.id),isChildWindowPopout:i?.[eb.mq.Primary]?.viewType===g.D.AppPopout,experimentSnakeCaseViewApisGroupOn:"on"===(0,O._Z)(e,"snake_case_view_apis"),experimentWorkflowDetailsHistoryGroupOn:D(e)}},eD)((0,X.A)(eO))))},0x1c2291e12:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x20b4dda68),r=a(0x17e281cf9),i=a(0x10b9bda60),l=a(0x62fa095f),o=a(0x10af3b48),s=a(0x1c7cb6e50);let __WEBPACK_DEFAULT_EXPORT__=e=>{if(!e)return{};let{blocks:t=[]}=e,a={};return t.forEach(e=>{let{type:t,block_id:c,element:d}=e;if(t===n.WP.input){let t=(0,s.A)(d),n=(0,o.O)(t),m=(0,l._)(n,{...(0,r.hM)(t,e),type:d.type});m&&(a={...a,...(0,i.S)({blockId:c,error:m})})}}),a}},0x113cdbbd7:(e,t,a)=>{"use strict";a.d(t,{JV:()=>l,VY:()=>o,pi:()=>s});var n,r=a(0x20b4dda68),i=a(0x139aa1a7);let l=[r.ze.users_select,r.ze.conversations_select,r.ze.channels_select,r.ze.multi_users_select,r.ze.multi_conversations_select,r.ze.multi_channels_select,r.ze.multi_static_select,r.ze.multi_external_select,r.ze.external_select,r.ze.static_select,r.ze.datepicker,r.ze.timepicker,r.ze.plain_text_input,r.ze.number_input,r.ze.radio_buttons,r.ze.checkboxes,r.ze.password,r.ze.rich_text_input,r.ze.datetimepicker,r.ze.url_text_input,r.ze.email_text_input,r.ze.file_input],o=[r.ze.multi_static_select,r.ze.multi_channels_select,r.ze.multi_conversations_select,r.ze.multi_external_select,r.ze.multi_users_select];var s=((n={}).entity_detail="entity_detail",n.entity_comment="entity_comment",n.message="message",n.message_attachment="message_attachment",n.unfurl_modal="unfurl_modal",n.search="search",n[n.thread=i.D.Thread]="thread",n.block_kit_builder="block_kit_builder",n.delete_dialog="delete_dialog",n.flag_dialog="flag_dialog",n.remove_broadcast_dialog="remove_broadcast_dialog",n.share_dialog="share_dialog",n.app_actions="app_actions",n.app_home="app_home",n.block_kit_builder_template="block_kit_builder_template",n.workflow_message_preview="workflow_message_preview",n.workflow_extension_step="workflow_extension_step",n.all_threads="all_threads",n.all_unreads="all_unreads",n.shared_message="shared_message",n.starred_message="starred_message",n.activity="activity",n.pinned_items="pinned_items",n.modal="modal",n.app_notification_subscription_configuration="app_notification_subscription_configuration",n.view="view",n.draft="draft",n.welcome_message="welcome_message",n.board="board",n.condition="condition",n.profile="profile",n.slack_connect_hub="slack_connect_hub",n.slab_grid_cell="slab_grid_cell",n.channel_set="channel_set",n.quip_unfurl="quip_unfurl",n.workflow_builder="workflow_builder",n.canvas_title="canvas_title",n.sales_home_notification="sales_home_notification",n.search_summary="search_summary",n.ai_summary="ai_summary",n.wfb_preview="wfb_preview",n.widget="widget",n.lob_notification="lob_notification",n.record_channel="record_channel",n.ai_app="ai_app",n.flagged_content_comment="flagged_content_comment",n.delete_agent_thread_modal="delete_agent_thread_modal",n.canvas_ai_overlay="canvas_ai_overlay",n.conversational_search="conversational_search",n.work_object="work_object",n.expired_agent_message="expired_agent_message",n.joiner_launchpad_recent_channel_summary="joiner_launchpad_recent_channel_summary",n.app_message_actions="app_message_actions",n.slackbot_message="slackbot_message",n.resurrected_user_welcome_ai_channel_section="resurrected_user_welcome_ai_channel_section",n.inline_form="inline_form",n)},0x1b50b0090:(e,t,a)=>{"use strict";a.d(t,{M:()=>ExpandableContent});var n=a(0xbad225b5),r=a(0x70bb2ceb),i=a(0x1f5612527);let ExpandableContent=({initialHeight:e,className:t,isExpandedByDefault:a=!1,children:l})=>{let o=(0,n.useRef)(null),s=(0,i.w)(o,"height");return n.createElement(r.l,{initialState:a},({isToggled:a,toggle:r})=>{let i={height:`${s}px`,minHeight:`${e}px`};return n.createElement("div",{className:t,style:i},n.createElement("div",{ref:o},l({isExpanded:a,toggle:r})))})};ExpandableContent.displayName="ExpandableContent"},0x207b9aaaf:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0xb97b797e),i=a(0x20482ad21),l=a(0x4c96e5d9),o=a(0x113cdbbd7),s=a(0x182c9b0b0),c=a(0x12185e091),d=a(0xf6ed6f31),m=a(0x1c91944c9),u=a(0x217553e42),p=a(0x19895585a),h=a(0x9271cc31);let _=new i.Ay("block_kit");function withDisabledTooltip(e){let t=class extends n.PureComponent{constructor(e){super(e),(0,r.v)(this,["renderInTooltipMaybe"])}renderInTooltipMaybe(e){return this.props.isPreviewing?n.createElement(l.Ay,{tip:this.props.toolTipText,offsetY:5},n.createElement("span",{className:"inline_block","data-qa":"Tooltip"},e)):e}render(){return this.renderInTooltipMaybe(n.createElement(e,this.props))}};return t.displayName="DisabledTooltip",(0,s.A)((0,m.N)((e,{isInAppView:t=!1,isDisabled:a=!1,blocksContainerContext:n,channelId:r})=>{let i=(0,h.e6)(e),l=(0,h.F8)(e,{tab:i,container:p.mq.Primary})?.id,s=(0,u.OL)(e,r||l),m=!t&&(0,c.rW)(s)&&!(0,d.bl)(s),f=_.t("Join the channel to interact with this message",{ns:"attachment_actions"});return f=m?_.t("Join the channel to interact with this message"):_.t("View this message in channel to interact with it"),{isDisabled:a||m,isPreviewing:m||n===o.pi.search,toolTipText:f}})(t))}withDisabledTooltip.displayName="withDisabledTooltip";let f=withDisabledTooltip},0x194b11107:(e,t,a)=>{"use strict";a.d(t,{A9:()=>shouldStackTextFields,DD:()=>shouldDisableActions,DP:()=>shouldUseNarrowImageMaxWidth,FZ:()=>shouldBlockKitImageHaveActions,Ib:()=>shouldUseSmallStatusIndicators,M2:()=>shouldNotSupportRequiredInputs,R7:()=>shouldTruncateText,Xf:()=>shouldInputRenderMediumSizedElements,cf:()=>shouldSectionRenderMediumSizedElements,dC:()=>shouldRenderMultiSelectsInline,do:()=>shouldBlockKitImageBeCollapsible,mF:()=>shouldBlockKitImageBeFullWidth,mG:()=>shouldActionsRenderMediumSizedElements,pd:()=>shouldSupportDeleteAttachment,rh:()=>shouldBlockKitInputBeFullWidth,sS:()=>shouldAllowRichTextChecklist,vM:()=>getElementWidth,xR:()=>shouldBlockKitSectionMultiSelectAccessoryBeFullWidth});var n=a(0x113cdbbd7),r=a(0xdc4b7766);let i=[n.pi.activity,n.pi.starred_message,n.pi.thread,n.pi.pinned_items],l=[n.pi.quip_unfurl,n.pi.block_kit_builder,n.pi.canvas_ai_overlay,n.pi.message,n.pi.thread,n.pi.slackbot_message],o=[n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step,...i],s=[n.pi.delete_dialog,n.pi.share_dialog,n.pi.search,n.pi.app_actions,n.pi.shared_message,n.pi.activity,n.pi.expired_agent_message],c=[n.pi.delete_dialog,n.pi.share_dialog,n.pi.search,n.pi.app_actions,n.pi.shared_message,n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step,n.pi.message,n.pi.work_object,...i],d=[n.pi.work_object,n.pi.quip_unfurl],m=[n.pi.quip_unfurl],u=[n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step,n.pi.app_home,n.pi.message_attachment,n.pi.message,n.pi.slackbot_message,n.pi.wfb_preview,n.pi.work_object,...i],p=[n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step],h=[n.pi.message_attachment,n.pi.delete_dialog,n.pi.share_dialog,n.pi.all_threads,n.pi.all_unreads,...i],_=[n.pi.message_attachment,n.pi.message,n.pi.thread,n.pi.all_threads],f=[n.pi.delete_dialog,n.pi.share_dialog,n.pi.app_actions,...i],b=[n.pi.share_dialog,n.pi.delete_dialog,n.pi.app_actions,...i],g=[n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step,n.pi.wfb_preview,n.pi.work_object,n.pi.slackbot_message],y=[n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step,n.pi.slackbot_message],A=[n.pi.app_home],x=[n.pi.app_home,n.pi.slackbot_message],E=[n.pi.app_home,n.pi.modal,n.pi.app_notification_subscription_configuration,n.pi.workflow_extension_step,n.pi.wfb_preview,n.pi.work_object,n.pi.slackbot_message],C=[n.pi.app_home,n.pi.message,n.pi.message_attachment],shouldDisableActions=e=>s.includes(e),shouldBlockKitImageBeFullWidth=e=>c.includes(e),shouldBlockKitImageHaveActions=e=>!d.includes(e),shouldBlockKitImageBeCollapsible=e=>!m.includes(e),shouldBlockKitInputBeFullWidth=e=>u.includes(e),shouldBlockKitSectionMultiSelectAccessoryBeFullWidth=e=>p.includes(e),shouldTruncateText=e=>h.includes(e),shouldSupportDeleteAttachment=e=>_.includes(e),shouldStackTextFields=e=>f.includes(e),getElementWidth=e=>b.includes(e)?r.J.narrow:g.includes(e)?r.J.full:r.J.wide,shouldUseNarrowImageMaxWidth=({container:e})=>e===n.pi.message_attachment,shouldUseSmallStatusIndicators=e=>o.includes(e),shouldRenderMultiSelectsInline=e=>y.includes(e),shouldActionsRenderMediumSizedElements=e=>x.includes(e),shouldSectionRenderMediumSizedElements=e=>A.includes(e),shouldInputRenderMediumSizedElements=e=>E.includes(e),shouldNotSupportRequiredInputs=e=>C.includes(e),shouldAllowRichTextChecklist=e=>l.includes(e)},0xa58e49e0:(e,t,a)=>{"use strict";a.d(t,{$:()=>i,L:()=>BlockKitProvider});var n=a(0xbad225b5),r=a(0xc7f60cdd);let i=n.createContext({asyncActionsRegistrar:{addAction:()=>{},removeAction:()=>{},setActionReady:()=>{},setActionBusy:()=>{}},isAllAsyncActionsResolved:!0}),BlockKitProvider=({children:e})=>{let[t,a]=n.useState(new Map),addAction=(e,t=r.E.READY)=>a(a=>new Map(a.set(e,t))),removeAction=e=>a(t=>{let a=new Map(t);return a.delete(e),a}),setActionReady=e=>a(t=>new Map(t.set(e,r.E.READY))),setActionBusy=e=>a(t=>new Map(t.set(e,r.E.BUSY))),l=n.useMemo(()=>({addAction,removeAction,setActionReady,setActionBusy}),[]),o=n.useMemo(()=>{for(let e of t.values())if(e===r.E.BUSY)return!1;return!0},[t]),s=n.useMemo(()=>({asyncActionsRegistrar:l,isAllAsyncActionsResolved:o}),[l,o]);return n.createElement(i.Provider,{value:s},e)};BlockKitProvider.displayName="BlockKitProvider"},0xc7f60cdd:(e,t,a)=>{"use strict";a.d(t,{E:()=>r});var n,r=((n={})[n.READY=0]="READY",n[n.BUSY=1]="BUSY",n)},0x987f2e80:(e,t,a)=>{"use strict";a.d(t,{w:()=>BlockKitInlineFormButtons});var n=a(0xbad225b5),r=a(0x11a296110),i=a(0xf24db15e),l=a.n(i);function BlockKitInlineFormButtons({onSubmit:e,onCancel:t,isSubmitting:a,submitButtonText:i="Submit",cancelButtonText:o="Cancel",isDisabled:s=!1}){let c=a||s;return n.createElement("div",{className:l().buttons},t&&n.createElement(r.Ay,{type:"outline",onClick:t,disabled:c},o),n.createElement(r.lV,{type:"primary",onClick:e,loading:a,disabled:s},i))}BlockKitInlineFormButtons.displayName="BlockKitInlineFormButtons"},0x1608420cc:(e,t,a)=>{"use strict";a.d(t,{A:()=>N});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x854f5389),o=a(0x118cdcdea),s=a.n(o),c=a(0xe874a88a),d=a(0xb97b797e),m=a(0x5739d664),u=a(0x113cdbbd7),p=a(0x944e06df),h=a(0x1b56e521c),_=a(0x16cd5ae97),f=a(0x18cffe646),b=a(0x184825275),g=a(0x1bd866cd7),y=a(0x66a0f59a),A=a(0x21e751f7e),x=a(0x1c91944c9),E=a(0x9b971e7e),C=a(0x17268ff9b),k=a(0xd4df61da),v=a(0x18476a827),S=a(0x14149c126),I=a(0xe684f705),w=a(0xd93ecf94);let T=class extends n.Component{static defaultProps={msgIsOnlyRichText:!1,clogLinkClick:l.A,theme:"light",blocksContainerContext:u.pi.message_attachment,isSlackbotMessage:!1,isEphemeral:!1};getContainerActionsPayload;constructor(e){super(e),this.getContainerActionsPayload=(0,m.A)((e,t,a,n,r,i,l)=>{let o="number"==typeof n?n:parseInt(n,10);return{serviceId:e,serviceTeamId:t,container:{type:u.pi.message_attachment,messageTs:a,attachmentId:o,channelId:r,isEphemeral:!!i},functionExecutionId:l}}),(0,d.v)(this,["handleAction","handleSearchButtonAction"])}handleAction(e){let{service:t,dispatchSendActions:a,appUnfurlUrl:n,serviceTeamId:r,ts:i,id:l,channelId:o,isEphemeral:s,functionExecutionId:d}=this.props;if("run_search"===e.actionId&&"search_run_button"===e.blockId)return this.handleSearchButtonAction(e);let m=this.getContainerActionsPayload(t,r,i,l,o,s,d);return t?a({...m,actions:[e],appUnfurlUrl:n}):c.S.resolve()}handleSearchButtonAction(e){let{dispatchOpenSearch:t}=this.props,a="value"in e&&e.value;if(!a)return c.S.resolve();let n=(0,A.A)(a,{tagChannelsAsSearchGeneric:!0});return t({queryOps:n?.contents||new(s())().insert(a).ops})}renderBlockWrapper(e,t,a){let r=i()("p-block_kit_renderer__block_wrapper",{"p-block_kit_renderer__block_wrapper--first":0===a});return n.createElement("div",{key:t.blockId,className:r},e)}renderElementWrapper(e){return n.createElement(e,{clogLinkClick:this.props.clogLinkClick})}render(){let{blocks:e,channelId:t,ts:a,msgIsOnlyRichText:r,theme:l,blocksContainerContext:o,service:s,clogLinkClick:c,blockKitLogPayload:d,isSlackbotMessage:m,serviceTeamId:u,id:_,isEphemeral:b,functionExecutionId:g,appId:y}=this.props,A=i()("c-message__message_blocks",{"c-message__message_blocks--rich_text":r}),x=this.getContainerActionsPayload(s,u,a,_,t,b,g);return n.createElement("div",{className:A,"data-qa":"attachment-blocks-renderer"},n.createElement(h.A,{blocks:e,containerIdKey:(0,f.u)({...x?.container})},n.createElement(p.A,{blocks:e,blockLimit:5,onAction:this.handleAction,renderBlock:this.renderBlockWrapper,containerId:a,channelId:t,messageTs:a,blocksContainerContext:o,containerActionsPayload:x,inline:r&&"dense"===l,isInAttachment:!0,serviceId:s,clogLinkClick:c,blockKitLogPayload:d,remountOnUpdate:!0,isSlackbotMessage:m,appId:y})))}};function mapDispatchToProps(e){return{dispatchSendActions:t=>e((0,b.W)(t)),dispatchOpenSearch:t=>e((0,k.N1)(t))}}function mapStateToProps(e,t){let a,n="on"===(0,S._Z)(e,"platform_populate_bot_team_id"),{service:r,ts:i,channelId:l}=t,o=(0,v.AF)(e,r),s=l&&i?(0,w.Ld)(e,l,i,!1):null,c=!1;if(s){let r=(0,I.nv)(e,s.user);c=!!s.is_ephemeral;let i=(0,E.ZT)(e);a=n&&t.botTeamId?t.botTeamId:o?(0,g.AW)({bot:o,member:r,currentTeamId:i}):void 0}return{isEphemeral:c,serviceTeamId:a,theme:(0,C.A)(e),msgIsOnlyRichText:!!s&&(0,_.L)(s.blocks),isSlackbotMessage:(0,y.A)(s),appId:o?o?.app_id:void 0}}T.displayName="AttachmentBlocksRenderer";let N=(0,x.N)(mapStateToProps,mapDispatchToProps)(T)},0x17e281cf9:(e,t,a)=>{"use strict";a.d(t,{Rv:()=>adaptProps,hM:()=>adaptInputProps});var n=a(0x1aba66b56),r=a(0x20b4dda68),i=a(0x113cdbbd7),l=a(0x194b11107),o=a(0xdc4b7766);function adaptImageProps(e){let t,a;return e.blocksContainerContext===i.pi.modal?(t=464,a=464):(t=e.isMobile||(0,l.DP)(e)?360:600,a=400),e.blocksContainerContext===i.pi.work_object&&(t="100%",a="100%"),{maxHeight:a,maxWidth:t,isImageFullWidth:(0,l.mF)(e.blocksContainerContext),disableImageActions:!(0,l.FZ)(e.blocksContainerContext),canCollapseImage:(0,l.do)(e.blocksContainerContext)}}function adaptInteractiveProps(e,t){let{errorBlockIds:a,actionErrors:n,loadingBlockIds:i,blocksContainerContext:o,isDisabled:s}=e;return{isError:a&&-1!==a.indexOf(t.blockId),actionError:n&&n[t.blockId],isLoading:i&&-1!==i.indexOf(t.blockId),isDisabled:s||(0,l.DD)(o),elementWidth:(0,l.vM)(o),shouldUseSmallStatusIndicators:(0,l.Ib)(o),shouldRenderMultiSelectsInline:t.type===r.WP.input||(0,l.dC)(o)}}function adaptTopMargin(e,t){return{removeTopMargin:0===t||e.blocksContainerContext===i.pi.work_object}}function adaptSectionProps({isInAttachment:e,isMobile:t,blocksContainerContext:a},{accessory:i={},expand:s}){return{shouldStackTextFields:(0,l.A9)(a)||!!t,shouldTruncateText:!s&&(e||(0,l.R7)(a)),shouldStackAccessory:i.type!==r.ze.image&&t||(0,n.A)(i.type,"multi")&&(0,l.xR)(a)||i.type===r.ze.radio_buttons||i.type===r.ze.checkboxes,size:(0,l.cf)(a)?o.c.medium:o.c.small}}function adaptInputProps({blocksContainerContext:e},t){return{isRequired:!(0,l.M2)(e)&&!t.optional,hintText:t.hint,size:(0,l.Xf)(e)?o.c.medium:o.c.small,showOptionalLabel:!(0,l.M2)(e),type:t.element.type,...(0,l.rh)(e)?{elementWidth:o.J.full}:{}}}function adaptRichTextProps(e,t,a){let n=e.containerActionsPayload?.container||{},{lastRichTextBlockIndex:r}=e;return{disableHighlights:e.disableHighlights,inline:e.inline&&0===a,allowCheckList:e.blocksContainerContext&&(0,l.sS)(e.blocksContainerContext),containerMessageChannelId:n?.channelId,containerMessageTs:n?.messageTs,isMessagePreview:e.blocksContainerContext===i.pi.workflow_message_preview,blocksContainerContext:e.blocksContainerContext,noInlineLinks:e.noInlineLinks,blocksArePreProcessed:e.blocksArePreProcessed,stopAnimations:e.stopAnimations,isEmojiTooltipHidden:e.isEmojiTooltipHidden,suppressRichTextEditedLabel:e.suppressRichTextEditedLabel,disableJumboEmoji:e.disableJumboEmoji,suppressRichTextStoppedLabel:void 0===r||a!==r}}function adaptChannelSetProps(e,t){return{channelSetName:t?.channelSetName,channelIds:t?.channelIds}}function adaptActionsProps({blocksContainerContext:e}){return{size:(0,l.mG)(e)?o.c.medium:o.c.small}}function adaptEphemeralProps({containerActionsPayload:e}){return{isEphemeral:e?e?.container?.isEphemeral:void 0}}function adaptProps(e,t,a){let n=e;switch(t.type){case r.WP.image:n={...e,...adaptImageProps(e),...adaptTopMargin(e,a)};break;case r.WP.section:n={...e,...adaptInteractiveProps(e,t),...adaptSectionProps(e,t),...adaptTopMargin(e,a),...adaptEphemeralProps(e)};break;case r.WP.actions:n={...e,...adaptInteractiveProps(e,t),...adaptTopMargin(e,a),...adaptActionsProps(e),...adaptEphemeralProps(e)};break;case r.WP.input:n={...e,...adaptInteractiveProps(e,t),...adaptInputProps(e,t)};break;case r.WP.rich_text:n={...adaptRichTextProps(e,t,a)};break;case r.WP.timeline:n={...e,...adaptRichTextProps(e,t,a)};break;case r.WP.related_automation_decorator:n={...e};break;case r.WP.share_shortcut:case r.WP.share_prompt:n={...e,block:t};break;case r.WP.context:case r.WP.header:n={...e};break;case r.WP.channel_section:case r.WP.channel_set:n={...e,...adaptChannelSetProps(e,t)}}return n}},0x944e06df:(e,t,a)=>{"use strict";a.d(t,{A:()=>rs});var n,r,i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x1cbdfeceb),c=a(0x854f5389),d=a(0x9e671ad),m=a(0x2286acf6c),u=a(0x1c0dc4cab),p=a(0x92cac38d),h=a(0x125763ad),_=a(0x357885ff),f=a(0xb97b797e),b=a(0x20b4dda68),g=a(0x15279822),y=a(0x20482ad21),A=a(0x11a296110),x=a(0x113cdbbd7),E=a(0x17e281cf9),C=a(0x102edf836),k=a(0xb1ea448c),v=a(0x15f8e452a),S=a(0x4c96e5d9),I=a(0x1a95efb3),w=a(0x1cf0d97e1),T=a(0x14149c126);let N=(0,w.Ay)(e=>"on"===(0,T._Z)(e,"blockkit_button_visible_users"));N.meta={name:"isButtonVisibleUsersEnabled",key:"createSelectorIsButtonVisibleUsersEnabled",description:e=>"on"===(0,T._Z)(e,"blockkit_button_visible_users")};var M=a(0x1c91944c9),R=a(0xe684f705);let P=new y.Ay("block_kit"),L=class extends i.PureComponent{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.state={isExpanded:!1}}handleClick(){this.setState(()=>({isExpanded:!0}))}render(){let{elements:e,isLoading:t,isError:a,actionError:n,removeTopMargin:r,shouldUseSmallStatusIndicators:l,size:s=C.F0.small,isInGroupBlock:c=!1,blocksContainerContext:d,experimentBlockkitButtonVisibleUsersGroupOn:m,currentMemberId:u}=this.props,p=o()("p-action_block__icons",{"p-action_block__icons--small":l}),h=o()("p-block_kit_element__error",{"p-block_kit_element__error--small":l}),_=o()("p-block-kit-element__loading",{"p-block_kit_element__loading--small":l}),f=o()("p-actions_block",{"p-actions_block--no_top_margin":r,"p-actions_block--group":c}),g=o()("p-action_block_saleshome__icons",{"p-block_kit_element__error--small":l}),y=e.some(e=>e.type===b.ze.button&&"draft_message_insert"===e.actionId),A=e.length>=7,E=A?P.rt("+ {number} more",{number:e.length-5}):null,maybeRenderActionsElement=(e,t)=>{let a=o()("p-actions_block__action",{"p-actions_block__action--full_width":e.type===b.ze.radio_buttons||e.type===b.ze.checkboxes||e.type===b.ze.button&&"draft_message_insert"===e.actionId});return!(m&&e.type===b.ze.button&&e?.visibleToUserIds)||!(e.visibleToUserIds.length>0)||!u||e.visibleToUserIds.includes(u)?i.createElement(i.Fragment,{key:`actions-${e.actionId||t}`},A&&t<5||this.state.isExpanded||!A?i.createElement("div",{className:a,"data-qa":"bk_actions_block_action"},i.createElement(I.A,{parent:b.WP.actions,...this.props,...e})):null):null};maybeRenderActionsElement.displayName="maybeRenderActionsElement";let maybeRenderActionOverflowButton=()=>A&&!this.state.isExpanded?i.createElement("div",{"data-qa":"bk_actions_block_truncation",className:"p-actions_block__action"},i.createElement(C.Ay,{type:"outline",size:s,onClick:this.handleClick,"data-qa":"bk_actions_block_truncation_button"},E)):null,w=d===x.pi.sales_home_notification?g:p,T=null;"workflow_shutdown"===n&&(T=P.t("Legacy workflows are no longer available."),w="p-actions_block__action");let N=n?i.createElement(S.Ay,{tip:T??n},i.createElement(v.A,{type:"warning",inline:!0})):i.createElement(v.A,{type:"warning",inline:!0}),M=i.createElement("div",{className:h,"data-qa":"block_kit_error_icon"},N," ",T??""),R=i.createElement("div",{className:_,"data-qa":"block_kit_loading_icon"},i.createElement(k.A,{size:l?"small":"large"}));return i.createElement("div",{"data-qa":"bk_actions_block",className:f},i.createElement("div",{className:o()("p-actions_block_elements",{"p-actions_block_elements--full_width":y})},e.map((e,t)=>maybeRenderActionsElement(e,t)),maybeRenderActionOverflowButton()),i.createElement("div",{className:w},t?R:null,a?M:null))}};L.displayName="Actions";let O=(0,M.N)(e=>({experimentBlockkitButtonVisibleUsersGroupOn:N(e),currentMemberId:(0,R.cA)(e).id}),null)(L);var D=a(0x24898c14b),F=a(0x3711e82d);let Call=({callId:e,blockKitClogger:t})=>i.createElement("div",{"data-qa":`callblock-${e}`,className:"p-call_block"},i.createElement(D.A,{callId:e,clogJoinCallClick:a=>{t(F.EventId.BLOCK_KIT_ACTION,{contexts:{ui_context:{step:F.UiStep.CALLS_BLOCK_JOIN_CALL,action:F.UiAction.CLICK,ui_element:F.UiElement.CALL_BLOCK,ui_properties:{element_type:F.ElementType.BUTTON,element_name:"join_call_button"}}},call_id:e,app_id:a})}}));Call.displayName="Call";var U=a(0x9698909d),B=a(0xfa28400d),H=a(0x1c2d7de14),W=a(0xd31900af),V=a.n(W);let Card=({contents:e})=>{let t=i.createElement("div",{className:V().contentElement},i.createElement(H.A,{elements:e}));return i.createElement("div",{"data-qa":"bk_card_block",className:V().container},i.createElement(B.Ay,{size:"expanded",entityState:"enabled",isRemovable:!1,isInteractive:!1,isFullHeight:!0},t))};Card.displayName="Card";var G=a(0x253b7a8f3),q=a(0x16cf1da63),j=a(0x40c0d834),z=a(0x2501a2cee),K=a(0x81d6854c),$=a(0x8c8bafa3),Y=a(0x1faa3f1ac),Q=a(0xf4097f62),Z=a(0x859fc122),J=a(0xd0724366),X=a(0x20e80190e),ee=a(0x226892387);let et=new y.Ay("introductions"),ea="start_dm",en="save_info",ContactActionErrorModal=({memberId:e,action:t,error:a})=>{let n=(0,ee.d4)(t=>(0,R.nv)(t,e)),r=i.createElement(Q.A,{member:n??void 0}),l=et.t("Something\u2019s gone wrong\u2026",{fallbackHash:"bee54c9cc30c539ab2ed15c0c936e055cf8ef67e"}),o=et.rt("If the problem persists, please <a>drop us a line.</a>",{fallbackHash:"3a55dfcc54adfa2f130711671f2c9104303ecbf8",fallbackHashNs:"error_boundary"},({text:e,key:t})=>i.createElement(Y.A,{href:`https://${(0,$.qF)()}/help/contact`,key:t},e));(a===J.Z.CannotAddContactCard||a===J.Z.UserIsBlocked||"invalid_user_combination"===a||"user_not_found"===a)&&(t===en&&(o=et.rt("So you can\u2019t save {member}\u2019s contact info. But you can DM them if you are both in the same channel.",{member:r,fallbackHash:"7bcf5cf8f159e87d572dd7ee7a38a4545cb4a8af"})),t===ea&&(o=et.rt("You need to be in a channel with {member} to message them.",{member:r,fallbackHash:"b0a87cf887b10259cb4d460036daa62624aca93e"})));let s=et.t("Got It");return i.createElement(X.aF,{"data-qa":Z.um.Modal},i.createElement(X.rQ,{"data-qa":Z.um.Header},i.createElement(X.Rc,{"data-qa":Z.um.TitleBar,title:l,className:"p-contact_action_error_modal__title"})),i.createElement(X.$m,{"data-qa":Z.um.Content,className:"p-contact_action_error_modal__content"},o),i.createElement(X.jl,{"data-qa":Z.um.Footer},i.createElement(X.ox,{"data-qa":Z.um.FooterActions,className:"p-contact_action_error_modal__footer"},i.createElement(X.s_,{"data-qa":Z.um.CloseButton,type:"outline","aria-label":s},s))))};ContactActionErrorModal.displayName="ContactActionErrorModal";var er=a(0x45bd075),ei=a(0x1d2cd7755),el=a(0x1fcbb004d),eo=a(0x1472af90a),es=a(0x18632f75a);let ec=new y.Ay("slack_connect_save_contact"),SaveContactModal=({contactUserId:e})=>{let t=(0,q.wA)(),[a,n]=(0,i.useState)(!1),r=(0,i.useCallback)(()=>{a&&t((0,es.z)({component:eo.G7.SlackConnectSaveContactModal,type:eo.X8.Dismiss,reason:"slack-connect-save-contact-modal"})),t((0,el.O)())},[t,a]),l=ec.t("Saved contact"),o=ec.rt("Now you can message {name} whenever you\u2019d like \u2014 simply click <strong>compose</strong> and type their name.",{name:i.createElement(Q.A,{id:e})}),s=ec.t("Got It",{fallbackHash:"c8a487428d655b8f4d84feb9acdac446bb649d66",fallbackHashNs:"slack_connect"}),c=ec.t("Don\u2019t show me this again",{fallbackHash:"c7e769a352749fc79be21d3be755466d34214f11",fallbackHashNs:"groups"});return i.createElement(X.aF,{"data-qa":Z.Du.Modal},i.createElement(X.rQ,{"data-qa":Z.Du.Header},i.createElement(X.Rc,{title:l,"data-qa":Z.Du.TitleBar})),i.createElement(X.$m,null,i.createElement(X.qf,null,i.createElement("p",{className:"margin_bottom_100","data-qa":Z.Du.ContentText},o))),i.createElement(X.jl,{"data-qa":Z.Du.Footer},i.createElement(X.ox,{className:"p-save_contact_modal__footer_actions","data-qa":Z.Du.FooterActions},i.createElement("div",{className:"p-save_contact_modal__footer_actions--wrapper"},i.createElement(ei.A,{"data-qa":Z.Du.CheckboxLabel,text:c,className:"p-save_contact_modal__footer_actions--label",type:"inline"},i.createElement(er.A,{"data-qa":Z.Du.Checkbox,checked:a,onChange:e=>n(e.target.checked)})),i.createElement(X.s_,{"data-qa":Z.Du.CloseButton,type:"outline",onClick:r,"aria-label":s},s)))))};SaveContactModal.displayName="SaveContactModal";var ed=a(0x131e5f81a),em=a(0x1d8f0e558),eu=a(0x21b4d1d5),ep=a(0x1b9d5cc0c),eh=a(0x82980ab8),e_=a(0xf2964a91),ef=a(0x4b8e0952),eb=a(0x1348755b9),eg=a(0x13638bd77),ey=a(0x24f936d91),eA=a(0x12b31912f),ex=a(0x4cd7b414),eE=a(0x46dbff89),eC=a(0xf052d367);let ek=new y.Ay("attachment_media"),ev=i.createElement(z.Ah,{name:"direct-messages"}),eS=i.createElement(z.Ah,{name:"share-message"}),eI=i.createElement(z.Ah,{name:"user-directory-add"}),ContactCard=({contactUserId:e,contactCardId:t})=>{let a=(0,q.wA)(),n=(0,ee.d4)(t=>(0,R.nv)(t,e)),r=(0,ep.hh)(n),l=(0,ee.d4)(t=>(0,eA.zP)(t,e)),o=(0,ee.d4)(t=>(0,eb.VX)(t,e)),[s,c]=(0,i.useState)(!0),d=(0,ee.d4)(e=>(0,eC.Pg)(e,eo.G7.SlackConnectSaveContactModal));(0,i.useEffect)(()=>{a((0,es.b)({interactions:[{component:eo.G7.SlackConnectSaveContactModal,type:eo.X8.Dismiss}],reason:"load_slack_connect_save_contact_modal"})).then(()=>{c(!1)})},[a]);let m=(0,i.useCallback)((e="contact_card_interaction")=>a((0,J.o)({contactCardId:t,reason:e})),[a,t]),u=(0,i.useCallback)(({action:t,error:n})=>{let r=n?.data?.error;return a((0,eE.q)({element:i.createElement(ContactActionErrorModal,{memberId:e,action:t,error:r})}))},[a,e]),p=(0,i.useCallback)((t,n)=>(t.stopPropagation(),(l?a((0,ex.Z)({memberId:e})):m(n).then(()=>a((0,ex.Z)({memberId:e})))).catch(e=>{u({error:e,action:ea})})),[a,l,m,e,u]),h=(0,i.useCallback)((t,n)=>(t.stopPropagation(),m(n).then(()=>{s||d||a((0,eE.q)({element:i.createElement(SaveContactModal,{contactUserId:e})}))}).catch(e=>{u({error:e,action:en})})),[a,m,e,u,d,s]),_=(0,i.useCallback)(()=>{a((0,ey.A)({contactUserId:e}))},[a,e]),f=(0,i.useMemo)(()=>{let e=[];return t?(r||e.push({name:"message",label:ek.t("Message"),icon:ev,action:p}),o&&e.push({name:"share_contact",label:ek.t("Share contact\u2026"),icon:eS,action:_}),l||(0,e_.o)(n)||r||e.push({name:"save_info",label:ek.t("Save contact"),icon:eI,action:h}),e):[]},[o,l,p,h,_,t,n,r]);if(!n||(0,ef.ow)(n))return i.createElement(K.A,null);let b=i.createElement("div",{"data-qa":"bk_contact_card_block",className:"c-pillow_file_container p-contact_card__container",role:"button",tabIndex:0,onClick:()=>{(l||r)&&a((0,eg.b)({memberId:n.id}))},"aria-label":ek.t("View {name}\u2019s Profile",{name:(0,eh.wg)(n)})},i.createElement(ed.A,{contactUserId:e}),f?.length>0&&i.createElement(eu.A,{className:"c-file__actions"},f.map(e=>{let t=`contact_card_${e.name}`;return i.createElement(em.A,{key:e.name,icon:e.icon,onClick:a=>e.action(a,t),label:e.label,"aria-label":e.label,"data-qa":t,autoClogProps:{elementName:t,onClick:{enableClogAction:!0}}})})));return i.createElement(j.A,{eventId:F.EventId.SHARED_SLACK_CONNECT_INTRODUCTIONS,uiStep:F.UiStep.SLACK_CONNECT_CONTACT_CARD},b)};ContactCard.displayName="ContactCard";let ContextActions=({elements:e,blockId:t,onAction:a,blockKitLogPayload:n,blockKitClogger:r,channelId:l,messageTs:o})=>i.createElement("div",{className:"display_flex align_items_center justify_content_start"},e.map((e,s)=>i.createElement(I.A,{...e,key:`${t}-action-${s}`,parent:b.WP.context_actions,onAction:a,blockId:t,blockKitLogPayload:n,blockKitClogger:r,channelId:l,messageTs:o})));ContextActions.displayName="ContextActions";let Context=({elements:e,isInGroupBlock:t=!1,...a})=>{let n=o()("p-context_block",{"p-context_block--group":t}),r=e.map((e,t)=>i.createElement("div",{className:"p-context_block_element","data-qa":"bk_context_element",key:`${a.blockId}-${t}`},i.createElement(I.A,{parent:b.WP.context,...a,...e}),i.createElement("div",{className:`p-context_block_spacing--${e.type}`})));return i.createElement("div",{"data-qa":"bk_context_block",className:n},r)};Context.displayName="Context";var ew=a(0x1f35a0f5),eT=a(0x99233ecb),eN=a(0x143e03a71),eM=a(0x1867bf0de),eR=a(0x1aab9bb8c),eP=a(0x19d590052),eL=a(0x73c53039),eO=a(0x1d5eeff6d),eD=a(0x45012309),eF=a(0x22d443103);let eU=new y.Ay("event"),EventActions=({viewEventOnCalendarUrl:e,appType:t,clogger:a,openEventShareDialog:n,channelId:r,messageTs:l})=>{let o=eM.E[t],s=(0,i.useCallback)(()=>{window.open(e,"_blank","noopener,noreferrer"),(0,eN.ZK)(a,{appType:t})},[t,a,e]),c=(0,i.useCallback)(()=>{n({ts:l,channelId:r})},[r,l,n]),d=t===eR.vq?eU.t("View on {calApp}",{fallbackHash:"1170d8334f9ad58e398853e1305a1287c7908efb",calApp:o}):eU.t("View on {calApp} calendar",{calApp:o}),m=(0,i.useMemo)(()=>[{label:d,click:()=>s(),dataQa:"open_calendar_link"}],[s,d]),u=(0,i.useCallback)(e=>i.createElement(eT.a,{...e,template:m}),[m]),p=(0,i.useMemo)(()=>({name:"share-message"}),[]);return i.createElement(eO.A,{position:"inset"},i.createElement(eP.A,{svgIconProps:p,tooltip:eU.t("Share event",{fallbackHash:"c5bc86032ef607ba3f46335b08a9a8d98282187b"}),onClick:c}),i.createElement(eL.A,{position:"bottom-left",renderMenu:u}))};function event_actions_mapStateToProps(e){return{clogger:(0,eD.eo)({state:e})}}function mapDispatchToProps(e){return{openEventShareDialog:t=>e((0,eF.A)(t))}}EventActions.displayName="EventActions";let eB=(0,M.N)(event_actions_mapStateToProps,mapDispatchToProps)(EventActions);var eH=a(0xce378727),eW=a(0x1f333babe),eV=a(0x11c82607b);let eG=(0,eV.Ay)("Show calendar authentication modal",(e,t,{appType:a,authUrl:n})=>{e((0,eE.q)({element:i.createElement(eW.A,{appType:a,authUrl:n,popupType:eR.WZ.calendar_connect,launchedFrom:"event_block"})}))});eG.meta={name:"showAuthFlow",key:"createThunkShowAuthFlow",description:"Show calendar authentication modal"};var eq=a(0x22a29f141),ej=a(0x1ec68d6a3),ez=a(0x1dfdeb1c8);let eK=(0,ez.A)("Calls calendar.event.rsvp endpoint with chosen rsvp option",(e,t,{eventId:a,rsvp:n,messageTs:r,channelId:i})=>e((0,eq.apiCall)({method:"calendar.event.rsvp",args:{event_id:a,rsvp:n,message_ts:r,channel:i},reason:"calendar.event.rsvp"})).catch(()=>{(0,ej.Ay)({getState:t}).info("Event","Failed to register rsvp")}).then(e=>e||{}));eK.meta={name:"registerRsvp",key:"createFetcherRegisterRsvp",description:"Calls calendar.event.rsvp endpoint with chosen rsvp option"};let e$=(0,ez.A)("Calls calendar.event.copy endpoint to copy event to user's calendar",(e,t,{eventId:a,messageTs:n,channelId:r})=>e((0,eq.apiCall)({method:"calendar.event.copy",args:{event_id:a,message_ts:n,channel:r},reason:"calendar.event.copy"})));e$.meta={name:"copyToCalendar",key:"createFetcherCopyToCalendar",description:"Calls calendar.event.copy endpoint to copy event to user's calendar"};var eY=a(0x19c76d181);let eQ=new y.Ay("event"),EventCopyToCalendar=({event:e,eventId:t,channelId:a,messageTs:n,copyToCalendar:r,showAuthFlow:l,logger:o,isEventCopiedToCalendar:s,clogger:c})=>{let[d,m]=(0,i.useState)(!1),handleCopyToCalendarClick=async()=>{m(!0),r({eventId:t,messageTs:n,channelId:a}).then(t=>{t.ok&&t.auth_url&&l({appType:e.appType,authUrl:t.auth_url})}).catch(e=>{o.error("event-block","An error occurred while copying event to user's calendar",e.name,e.message)}).finally(()=>{m(!1),(0,eN.U6)(c,{appType:e.appType})})};return i.createElement("div",{className:"p-event_copy-to-calendar"},i.createElement("div",{className:"p-event_copy-to-calendar-button"},s?eQ.t("Copied to your primary calendar!"):i.createElement(eH.A,{type:"outline",onClick:handleCopyToCalendarClick,disabled:d,loading:d,"aria-label":eQ.t("Copy to your calendar")},eQ.t("Copy to your calendar"))))};function event_copy_to_calendar_mapStateToProps(e,{event:t}){return{logger:(0,ej.Ay)({state:e}),isEventCopiedToCalendar:t.copies.includes((0,eY.WR)(e)),clogger:(0,eD.eo)({state:e})}}EventCopyToCalendar.displayName="EventCopyToCalendar";let eZ=(0,M.N)(event_copy_to_calendar_mapStateToProps,e=>({copyToCalendar:t=>e(e$(t)),showAuthFlow:({appType:t,authUrl:a})=>e(eG({appType:t,authUrl:a}))}))(EventCopyToCalendar);var eJ=a(0x1075d3a9c),eX=a.n(eJ);let isEventHappeningNow=(e,t)=>eX()().isSameOrAfter(eX().unix(e))&&eX()().isSameOrBefore(eX().unix(t)),e0=a.p+"gcal-app-dir-icon-5e41690.png",e1=a.p+"ocal-app-dir-icon-3abff6d.png",e2=new y.Ay("event"),EventHeader=({event:e,isCancelledEvent:t,isPastEvent:a})=>{let{title:n,start:r,end:l}=e,s=eX().unix(r.dateTime),c=eX().unix(l.dateTime),getCalAppIcon=()=>{let{appType:t}=e;return i.createElement("img",{alt:"Calendar",className:"calendar-image",src:"gcal"===t?e0:e1})};return getCalAppIcon.displayName="getCalAppIcon",i.createElement("div",{className:"p-event_event-header"},i.createElement("div",{className:o()("p-event_row_left_side",{"p-event_tombstone":a})},getCalAppIcon()),i.createElement("div",{className:"p-event_summary p-event_right_side"},i.createElement("span",{className:o()("p-event_title",{"p-event_cancelled":t})},n||e2.t("(No title)")),i.createElement("span",{className:"p-event_datetime"},t?e2.t("Event cancelled"):i.createElement("span",null,isEventHappeningNow(e.start.dateTime,e.end.dateTime)&&i.createElement("span",{className:"p-event_status p-event_status-in-flight"},i.createElement("span",{className:"p-event_status-text"},e2.t("now"))),a&&i.createElement("span",{className:"p-event_status p-event_status-ended"},i.createElement("span",{className:"p-event_status-text"},e2.t("ended"))),i.createElement(i.Fragment,null,s.format("ddd")," ",s.format("MMM D")," ",i.createElement("span",null,"at")," "),`${s.format("h:mm")} \u{2013} ${c.format("h:mm A")}`))))};EventHeader.displayName="EventHeader";let e4=new y.Ay("event"),EventJoinCall=({event:e,clogger:t,isPastOrCancelledEvent:a})=>{let{meetingUrl:n}=e;return i.createElement("div",{className:"p-event_event-join-call","data-qa":"bk_event-join-call"},i.createElement("div",{className:"p-event_row_left_side"},isEventHappeningNow(e.start.dateTime,e.end.dateTime)?i.createElement("span",{className:"p-event_video-pulse-wrapper"},i.createElement(v.A,{type:"camera-on",className:"p-event_video--pulse",size:"inherit"}),i.createElement(v.A,{type:"video-camera",className:"sk_dark_gray"})):i.createElement(v.A,{type:"video-camera",className:"sk_dark_gray"})),i.createElement("div",{className:"p-event_join-call-section p-event_right_side"},n?i.createElement(Y.A,{onClick:()=>(0,eN.qK)(t,{appType:e.appType,callingAppName:e.meetingProvider}),target:"_blank",rel:"noopener noreferrer",href:e.meetingUrl,className:o()("p-event_join_call_text",{"p-event_past_event_meeting_link":a}),...{alwaysPerformDefaultOnClickBehavior:!0}},isEventHappeningNow(e.start.dateTime,e.end.dateTime)&&!a?(e=>{switch(e){case"slack":return e4.t("Join Slack Meeting",{fallbackHash:"598f00f6b82dbe191367e5da7a2a9cfb56e17b98"});case"zoom":return e4.t("Join Zoom Meeting",{fallbackHash:"c6f08f2bdb03f963b6afca76002ff2fcd22bd88c"});case"hangout":return e4.t("Join Hangout Meeting",{fallbackHash:"0357f7d7dae801f38f558fabd7a79dcb35270a63"});case"webex":return e4.t("Join Webex Meeting",{fallbackHash:"8b686661c6d14e3c83036026940cd1adfc264d55"});case"msft_teams":return e4.t("Join Microsoft Teams Meeting",{fallbackHash:"d556bb4c494f0dccdc7a269ff7fa44779ea20e62"});case"bluejeans":return e4.t("Join BlueJeans Meeting",{fallbackHash:"f09cb26d48207a521d99e8689209ee149e2a7998"});case"google_meet":return e4.t("Join Google Meet Meeting",{fallbackHash:"0fcf1704b8607044bf09f531d1e715e6a8a02186"});case"chime":return e4.t("Join Chime Meeting",{fallbackHash:"5b98b3760510f85cd29b0339b2ace17482280c02"});case"skype":return e4.t("Join Skype Meeting",{fallbackHash:"77f205ef998c04317179bd8460e3107302df5fda"});default:return e4.t("Join Meeting",{fallbackHash:"0ce652ed862fe9def8013ecf2f2b4d580ed770fb"})}})(e.meetingProvider):(e=>{switch(e){case"slack":return e4.t("Slack Meeting",{fallbackHash:"598f00f6b82dbe191367e5da7a2a9cfb56e17b98"});case"zoom":return e4.t("Zoom Meeting",{fallbackHash:"c6f08f2bdb03f963b6afca76002ff2fcd22bd88c"});case"hangout":return e4.t("Hangout Meeting",{fallbackHash:"0357f7d7dae801f38f558fabd7a79dcb35270a63"});case"webex":return e4.t("Webex Meeting",{fallbackHash:"8b686661c6d14e3c83036026940cd1adfc264d55"});case"msft_teams":return e4.t("Microsoft Teams Meeting",{fallbackHash:"d556bb4c494f0dccdc7a269ff7fa44779ea20e62"});case"bluejeans":return e4.t("BlueJeans Meeting",{fallbackHash:"f09cb26d48207a521d99e8689209ee149e2a7998"});case"google_meet":return e4.t("Google Meet Meeting",{fallbackHash:"0fcf1704b8607044bf09f531d1e715e6a8a02186"});case"chime":return e4.t("Chime Meeting",{fallbackHash:"5b98b3760510f85cd29b0339b2ace17482280c02"});case"skype":return e4.t("Skype Meeting",{fallbackHash:"77f205ef998c04317179bd8460e3107302df5fda"});default:return e4.t("Meeting",{fallbackHash:"0ce652ed862fe9def8013ecf2f2b4d580ed770fb"})}})(e.meetingProvider)):i.createElement("span",{className:"p-event_join_call_text_no_meeting"},e4.t("No meeting link available",{fallbackHash:"7898ee48394d254515dedd2bde96de195313fc4c"}))))};function event_join_call_mapStateToProps(e){return{clogger:(0,eD.eo)({state:e})}}EventJoinCall.displayName="EventJoinCall";let e5=(0,M.N)(event_join_call_mapStateToProps,e=>({postRsvp:t=>e(eK(t)),showAuthFlow:({appType:t,authUrl:a})=>e(eG({appType:t,authUrl:a}))}))(EventJoinCall);var e3=a(0xbb0c5132),e6=((n={}).Accepted="accepted",n.Declined="declined",n.Tentative="tentative",n.NeedsAction="needs_action",n),e8=((r={}).Confirmed="confirmed",r.Cancelled="cancelled",r.Tentative="tentative",r);let getCurrentAttendee=(e,t)=>e.find(e=>e.userId===t),getAttendeeByRSVPCategory=(e,t)=>e.filter(e=>e.rsvp===t);var e7=a(0x16ffed5ab);let e9=new y.Ay("event"),te={name:"info"},EventRSVP=({event:e,eventId:t,channelId:a,messageTs:n,postRsvp:r,showAuthFlow:l,logger:s,clogger:c,enqueueToast:d,attendee:m})=>{let[u,p]=(0,i.useState)(!1),[h,_]=(0,i.useState)(e6.NeedsAction),f=(0,i.useCallback)(()=>d({element:i.createElement(e3.Ay,{position:"bottom-right",shouldAutoFade:!1,svgIconProps:te,svgIconClassName:"sk_raspberry_red"},i.createElement("span",null,e9.t("Something\u2019s gone wrong. Mind trying again in a moment?")))}),[d]),b=(0,i.useCallback)(async i=>{i!==h&&(p(!0),_(i),r({eventId:t,rsvp:i,messageTs:n,channelId:a}).then(t=>{t.ok?t.auth_url&&l({appType:e.appType,authUrl:t.auth_url}):f()}).catch(e=>{f(),s.error("event-block","An error occurred while posting rsvp response",e.name,e.message)}).finally(()=>{p(!1),(0,eN.bY)(c,{appType:e.appType,rsvpOption:i})}))},[a,c,e.appType,t,s,n,r,h,l,f]);return i.createElement("div",{className:"p-event_event-rsvp","data-qa":"bk_event-rsvp"},i.createElement("div",{className:"p-event_rsvp-question"},e9.t("Going?",{fallbackHash:"a493b5fc3d7e397d85e4e8974948185d00574cea"})),i.createElement("div",{className:"p-event_rsvp-options"},i.createElement(Y.A,{onClick:()=>b(e6.Accepted),disabled:u,className:o()("p-event_rsvp-choice-yes",{"p-event_rsvp--selection":m?.rsvp===e6.Accepted})},u&&h===e6.Accepted?i.createElement(k.A,{inline:!0,size:"small",color:"blue",className:"p-event_rsvp-loader"}):e9.t("Yes")),i.createElement(Y.A,{onClick:()=>b(e6.Declined),disabled:u,className:o()("p-event_rsvp-choice-no",{"p-event_rsvp--selection":m?.rsvp===e6.Declined})},u&&h===e6.Declined?i.createElement(k.A,{inline:!0,size:"small",color:"blue",className:"p-event_rsvp-loader"}):e9.t("No")),i.createElement(Y.A,{onClick:()=>b(e6.Tentative),disabled:u,className:o()("p-event_rsvp-choice-maybe",{"p-event_rsvp--selection":m?.rsvp===e6.Tentative})},u&&h===e6.Tentative?i.createElement(k.A,{inline:!0,size:"small",color:"blue",className:"p-event_rsvp-loader"}):e9.t("Maybe"))))};function event_rsvp_mapStateToProps(e,{event:t}){return{logger:(0,ej.Ay)({state:e}),clogger:(0,eD.eo)({state:e}),attendee:getCurrentAttendee(t.attendees,(0,eY.WR)(e))}}EventRSVP.displayName="EventRSVP";let tt=(0,M.N)(event_rsvp_mapStateToProps,e=>({postRsvp:t=>e(eK(t)),showAuthFlow:({appType:t,authUrl:a})=>e(eG({appType:t,authUrl:a})),enqueueToast:t=>e((0,e7.M)(t))}))(EventRSVP);var ta=a(0x1c659cbb1);let tn=new y.Ay("event"),EventRSVPStatus=({event:e,currentUserId:t})=>{let{attendeeCount:a}=e,n=((e,t,a)=>{let n=getCurrentAttendee(e,a);if(n){let r=e.findIndex(e=>e.userId===a);-1!==r&&(e.splice(r,1),e.splice(t,0,n))}return e})(getAttendeeByRSVPCategory(e.attendees,e6.Accepted),0,t),r=n.length,l=getAttendeeByRSVPCategory(e.attendees,e6.Tentative).length,o=getAttendeeByRSVPCategory(e.attendees,e6.Declined).length,s=getAttendeeByRSVPCategory(e.attendees,e6.NeedsAction).length;return i.createElement("div",{className:"p-event_event-join-call"},i.createElement("div",{className:"p-event_row_left_side"},i.createElement(v.A,{type:"user-groups",className:"sk_dark_gray"})),i.createElement("div",{className:"p-event_join-call-section p-event_right_side"},i.createElement("div",null,n.slice(0,8).map((e,t)=>i.createElement("span",{key:e.userId,className:"p-event-avatar_wrapper"},i.createElement(ta.Ay,{userId:e.userId,size:20,additionalOverlay:7===t?n.length-8:void 0,showCard:!0,showBadge:!0,isInteractive:!0,className:"p-event-rsvp_accepted"}),i.createElement(v.A,{type:"form-checkbox-check",className:"p-event-avatar_badge"})))),i.createElement("span",{className:"p-event-rsvp_guests"},tn.t("{attendeeCount, plural, =1 {# guest:} other {# guests:}}",{attendeeCount:a})," ",i.createElement("span",{className:"p-event-rsvp_count"},[r&&tn.t("{yesCount} yes",{yesCount:r}),l&&tn.t("{maybeCount} maybe",{maybeCount:l}),o&&tn.t("{noCount} no",{noCount:o}),s&&tn.t("{notResponded, plural, =1 {# hasn\u2019t responded } other {# haven\u2019t responded}}",{notResponded:s})].filter(Boolean).join(", ")))))};function event_rsvp_status_mapStateToProps(e){return{currentUserId:(0,eY.WR)(e)}}EventRSVPStatus.displayName="EventRSVPStatus";let tr=(0,M.N)(event_rsvp_status_mapStateToProps,null)(EventRSVPStatus);var ti=a(0x1372bbdf7),tl=a(0xe38b5635);let to=class extends i.Component{constructor(e){super(e)}componentDidMount(){let{event:e,channelId:t,attendee:a,isOrganizerCurrentUser:n,fetchHistoryForNextSetOfAttendees:r,containerId:i,logger:l}=this.props,{needsRefetch:o}=e;a||n||!o||r({channelId:t,latest:i,limit:1,inclusive:!0,reason:"request-next-set-of-attendees"}).catch(e=>{l.error("event-block","An error occurred while fetching history for next set of attendees",e.name,e.message)})}render(){let{event:e,eventId:t,containerId:a,channelId:n,attendee:r,isPastEvent:l,isCancelledEvent:o,isOrganizerCurrentUser:s}=this.props,c=l||o;return i.createElement(tl.A,{elevation:2,key:"floating",size:"medium",className:"p-event-container"},i.createElement(i.Fragment,null,i.createElement("div",{className:"p-event"},i.createElement(EventHeader,{event:e,attendee:r,isCancelledEvent:o,isPastEvent:l}),i.createElement(tr,{event:e}),(r||s)&&i.createElement(e5,{event:e,isPastOrCancelledEvent:c}),r&&!c&&i.createElement(tt,{event:e,eventId:t,messageTs:a,channelId:n}),!r&&!s&&!c&&i.createElement(eZ,{event:e,eventId:t,messageTs:a,channelId:n}))),i.createElement(eB,{viewEventOnCalendarUrl:e.webLink,appType:e.appType,messageTs:a,channelId:n}))}};to.displayName="Event";let ts=(0,M.N)((e,t)=>{let a,{event:n,containerId:r}=t,{end:i,status:l,organizer:o}=n,{userId:s}=o;return{attendee:getCurrentAttendee(n.attendees,(0,eY.WR)(e)),isPastEvent:(a=i.dateTime,eX()().isAfter(eX().unix(a))),isCancelledEvent:l===e8.Cancelled,isOrganizerCurrentUser:s===(0,eY.WR)(e),logger:(0,ej.Ay)({state:e}),ts:r}},e=>({fetchHistoryForNextSetOfAttendees:t=>e((0,ti.Ay)(t))}))(to);var tc=a(0x10a716a94),td=a(0xfaeada07),tm=a(0xbd3de346),tu=a(0x14ea3ce99);let File=({fileId:e,blocksContainerContext:t,clogLinkClick:a=s.A})=>{let n=(0,ee.d4)(t=>(0,tu.Lp)(t,e));if(!n||!n.id)throw Error("File Block called without a file object or file id");let r=t===x.pi.quip_unfurl,l=(0,tm.DQ)(n)&&r?{showPreview:!1}:{};return i.createElement(tc.H,{subtype:"files"},i.createElement(td.A,{file:n,clogLinkClick:a,channelId:"",ts:"",showActions:!r,...l}))};File.displayName="File";let tp={1:"h1",2:"h2",3:"h3",4:"h4"},Header=({text:e,level:t,style:a,...n})=>{let r=tp[t??0]??"h3",l=t?`p-header_block--level_${t}`:"";return i.createElement(r,{className:`p-header_block ${l}`.trim(),"data-qa":"bk_header_block"},i.createElement(I.A,{parent:b.WP.header,...n,...e}))};Header.displayName="Header";var th=a(0x21f3c49e8),t_=a(0x178109f89),tf=a(0x1bed15d44),tb=a(0x111672506),tg=a(0x2e69033e),ty=a(0x220f327f7),tA=a(0x1f3e2995c),tx=a(0x18c9ce57f);let Image=({imageUrl:e,altText:t,isImageFullWidth:a,imageWidth:n,imageHeight:r,imageBytes:l,channelId:s,title:c,containerId:d,slackFile:m,maxWidth:u,maxHeight:p,blockId:h,openFileViewer:_,removeTopMargin:f,blockKitClogger:g,isInGroupBlock:y,isInAppView:A,blockKitLogPayload:x,senderMemberId:E,serviceId:C,disableImageActions:k,displayImageWithoutLink:v,displayImageWithBorder:S,canCollapseImage:I=!0})=>{let w=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"block_kit_gifs_thumbs")),N=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"expandable_trigger_aria_label")),M=(0,tA.A)("blockImage",d||h,{blockId:h}),R=(0,ee.d4)(e=>{if(m?.id)return(0,tu.Lp)(e,m.id)}),P=n&&R?.[`thumb_${n}`]||R?.thumb_800||R?.thumb_480,L=n&&R?.[`thumb_${n}_gif`]||R?.thumb_480_gif,O=w&&L||P||e,{width:D,height:U}=(0,i.useMemo)(()=>{if(n&&r){let e=n>u||r>p?Math.min(u/n,p/r):1;return{width:Math.floor(n*e),height:Math.floor(r*e)}}return{width:n,height:r}},[p,u,r,n]),B=(0,i.useMemo)(()=>{if(!(0,th.A)(x))return{eventId:F.EventId.BK_USER_INTERACTION,interaction:F.Interaction.CLICK,interactionElement:F.InteractionElement.IMAGE,...x}},[x]),H=o()("p-image_block_container",{"p-image_block_container--full_width":a}),W=o()("p-image_block",{"p-image_block--no_top_margin":f,"p-image_block--full_width":a,"p-image_block--group":y}),V=i.createElement(tb.A,{url:O,title:t||c?.text,originalWidth:n,originalHeight:r,width:D,height:U,messageTs:d,activeChannelId:s,blockKitClogger:g,expandableKey:A?void 0:M,openFileViewer:_,autoClogProps:B,botId:C,disableImageActions:k,displayImageWithoutLink:v,displayImageWithBorder:S});return i.createElement("div",{className:W},i.createElement("div",{className:H},!A&&i.createElement("div",{className:"p-image_block_title"},c?i.createElement(t_.A,{text:c.text,parent:b.WP.image}):null,I&&i.createElement(tg.A,{imageBytes:O&&!(0,tx.i)(O)?l:void 0,imageUrl:O,expandableKey:M,senderMemberId:E,tooLargeWarning:!0,"aria-label":(0,ty.U)({experimentExpandableTriggerAriaLabelGroupOn:N,isImage:!0})})),I?i.createElement(tf.A,{expandableKey:M,imageBytes:l,className:"p-image_block_container__expandable_container",shouldBeExpandedByDefault:A,useAttachmentRules:!A,senderMemberId:E,channelId:s},V):V,A&&i.createElement("div",{className:"p-image_block_title"},c?i.createElement(t_.A,{text:c.text,parent:b.WP.image}):null)))};Image.displayName="Image";var tE=a(0x194b11107),tC=a(0x77727995),tk=a(0x2469ec64e),tv=a(0xa6133ba9),tS=a(0x10b9bda60),tI=a(0x62fa095f);let getElementValue=e=>{let t;switch(e.type){case b.ze.channels_select:(0,th.A)(e.selectedChannel)||(t={selected_channel:e.selectedChannel},void 0!==e.requestedScope&&(t.requested_scope=e.requestedScope,t={selected_channel:e.selectedChannel}),void 0!==e.responseUrlEnabled&&(t.response_url_enabled=e.responseUrlEnabled));break;case b.ze.multi_channels_select:t=!(0,th.A)(e.selectedChannels)&&{selected_channels:e.selectedChannels};break;case b.ze.users_select:t=!(0,th.A)(e.selectedUser)&&{selected_user:e.selectedUser};break;case b.ze.multi_users_select:t=!(0,th.A)(e.selectedUsers)&&{selected_users:e.selectedUsers};break;case b.ze.conversations_select:(0,th.A)(e.selectedConversation)||(t={selected_conversation:e.selectedConversation},void 0!==e.requestedScope&&(t.requested_scope=e.requestedScope),void 0!==e.responseUrlEnabled&&(t.response_url_enabled=e.responseUrlEnabled));break;case b.ze.multi_conversations_select:t=!(0,th.A)(e.selectedConversations)&&{selected_conversations:e.selectedConversations};break;case b.ze.static_select:case b.ze.radio_buttons:case b.ze.external_select:t=!(0,th.A)(e.selectedOption)&&{selected_option:e.selectedOption};break;case b.ze.multi_static_select:case b.ze.multi_external_select:case b.ze.checkboxes:t=!(0,th.A)(e.selectedOptions)&&{selected_options:e.selectedOptions};break;case b.ze.datepicker:t=!(0,th.A)(e.selectedDate)&&{selected_date:e.selectedDate};break;case b.ze.timepicker:(0,th.A)(e.selectedTime)&&(0,th.A)(e.timezone)||(t={},(0,th.A)(e.selectedTime)||(t.selected_time=e.selectedTime),(0,th.A)(e.timezone)||(t.timezone=e.timezone));break;case b.ze.plain_text_input:case b.ze.number_input:case b.ze.url_text_input:case b.ze.email_text_input:case b.ze.password:t=!(0,th.A)(e.value)&&{value:e.value};break;case b.ze.rich_text_input:t=!(0,th.A)(e.richTextValue)&&{rich_text_value:e.richTextValue};break;case b.ze.datetimepicker:t=e.selectedDateTime&&{selected_date_time:e.selectedDateTime};break;case b.ze.file_input:t=e.files?.length?{files:e.files}:void 0}return t};var tw=a(0x2001af3ac),tT=a(0x24429189c);let registerBlockWithErrors=e=>{let t=class extends i.PureComponent{constructor(e){super(e),this.state={touched:!1},(0,f.v)(this,["handleAction","validateChange"])}static defaultProps={serverErrors:void 0,showErrors:void 0,errorState:void 0,setBlocksState:s.A,onAction:s.A,debounceWaitPeriod:300,blockToFocusAfterValidation:void 0,dispatchConvertBlocksToDelta:s.A};applyLocalErrors(){let{errorState:e,blockId:t}=this.props,a=(0,tC.A)(this.props.serverErrors,`${t}`)||(0,tC.A)(e,`errors['${t}']`);return{errorText:(this.props.showErrors||this.state.touched)&&a||void 0}}validateRichTextChange(e,{minLength:t,maxLength:a}){let n=getElementValue(e),r=this.props.dispatchConvertBlocksToDelta?.({blocks:n&&"object"==typeof n&&"rich_text_value"in n?[n.rich_text_value]:[]}),i=(0,tw.A)(r),l=null;return t&&i<t?l=(0,tk.r7)(t):a&&i>a&&(l=(0,tk.zI)(a)),l}validateChange(e){let{element:t,blockId:a,setBlocksState:n}=this.props,r=getElementValue(e),i=(0,tI._)(r,{...this.props,...t});return e.type!==b.ze.rich_text_input||i||(i=this.validateRichTextChange(e,{...this.props,...t})),this.setState(()=>({touched:!0})),n?.({elementError:(0,tS.S)({blockId:a,error:i??""})}),i}handleAction(e,t=!0){let{onAction:a}=this.props,n=this.validateChange(e);t&&!n&&a?.(e,t)}render(){let{errorState:t,showErrors:a,serverErrors:n,...r}=this.props;return i.createElement(e,{...r,...this.applyLocalErrors(),onAction:this.handleAction,validateChange:this.validateChange})}};t.displayName="BlockWithErrors";let a=(0,M.N)(null,e=>({dispatchConvertBlocksToDelta:(...t)=>e((0,tT.f)(...t))}))(t);return i.forwardRef((e,t)=>i.createElement(tv.A.Consumer,null,({errorState:n,serverErrors:r,showErrors:l,setBlocksState:o,blockToFocusAfterValidation:s})=>i.createElement(a,{refToForward:t,...e,errorState:n,serverErrors:r,showErrors:l,setBlocksState:o,blockToFocusAfterValidation:s})))};registerBlockWithErrors.displayName="registerBlockWithErrors";var tN=a(0x1e586fbba);function ElementValidationError({errorMessage:e,id:t}){return i.createElement(tN.A,{id:t,className:"margin_bottom_100"},i.createElement("span",null,e))}ElementValidationError.displayName="ElementValidationError";var tM=a(0x18defa93),tR=a(0x748f8565);let tP=new y.Ay("block_kit"),tL=class extends i.PureComponent{static defaultProps={isRequired:!0,errorText:void 0,hintText:void 0,blocksContainerContext:void 0,onAction:void 0,shouldUseSmallStatusIndicators:!1,isLoading:!1,isError:!1,actionError:void 0,dispatchAction:!1,showOptionalLabel:!0};ariaIdPrefix;constructor(e){super(e),this.ariaIdPrefix=`${e.element.actionId}-${e.blockId}`}maybeRenderError(){let{errorText:e}=this.props;return e&&i.createElement(ElementValidationError,{id:`${this.ariaIdPrefix}-error`,errorMessage:e})||null}maybeRenderEnterHelpText(){let{element:e,dispatchAction:t}=this.props;return e&&t&&e.type===b.ze.plain_text_input&&e.dispatchActionConfig&&(0,tR.T)(e.dispatchActionConfig)&&!(0,tM.$)(e.dispatchActionConfig)?i.createElement("div",{"data-qa":"input_help_text",className:"p-block_kit_input_block__enter_help_text"},tP.rt("{enter_icon} Press 'enter' to submit",{enter_icon:i.createElement(v.A,{type:"enter",size:"inherit"})})):null}maybeRenderHintText(){let e,t,{hintText:a}=this.props;if(!a||!a.text)return null;let n=(e={...a},-1===[".","?","!","\u3002"].indexOf((t=e.text?.trim()||"")[t.length-1])&&(e.text=t+="."),e);return a&&i.createElement(t_.A,{className:"p-block_kit_input_block__hint_text",noLinking:!0,"data-qa":"input_block_hint_text",...n})||null}maybeRenderHintTextAndEnterHelpText(){let{element:e}=this.props,t=e.type===b.ze.datetimepicker?`${this.ariaIdPrefix}-datepicker_hint`:`${this.ariaIdPrefix}-hint`;return i.createElement("div",{id:t},this.maybeRenderHintText(),this.maybeRenderEnterHelpText())}render(){let{label:e,errorText:t,hintText:a,element:n,blocksContainerContext:r,shouldUseSmallStatusIndicators:l,isLoading:s,isError:c,actionError:d,dispatchAction:m,showOptionalLabel:u,...p}=this.props,h=o()("p-block_kit_input_block",{"p-block_kit_input_block--full_width":r&&(0,tE.rh)(r),"p-block_kit_input_block--slackbot_message":r===x.pi.slackbot_message,"p-block_kit_input_block--invalid":!!t}),_=o()("p-block_kit_input_block__icons",{"p-block_kit_input_block__icons--small":l}),f=o()("p-block_kit_element__error",{"p-block_kit_element__error--small":l}),g=o()("p-block-kit-element__loading",{"p-block_kit_element__loading--small":l}),y=d?i.createElement(S.Ay,{tip:d},i.createElement("div",{className:f,"data-qa":"block_kit_error_icon"}," ",i.createElement(v.A,{type:"warning",inline:!0}))):i.createElement("div",{className:f,"data-qa":"block_kit_error_icon"}," ",i.createElement(v.A,{type:"warning",inline:!0})),E=n.type===b.ze.file_input,C=tP.t("The people who can edit this automation will also have access to any files shared here");return i.createElement("div",{className:h},i.createElement("div",{className:"p-block_kit_input_block__label_container"},i.createElement(ei.A,{id:`${this.ariaIdPrefix}-label`,text:i.createElement(t_.A,{noLinking:!0,className:"p-block_kit_input_block__label",...e}),htmlFor:`${n.actionId}-${p.blockId}`,optional:u&&!p.isRequired}),E&&i.createElement(S.Ay,{tip:C,position:"top"},i.createElement(A.Nm,null,i.createElement(z.Ah,{name:"info"})))),i.createElement(I.A,{...n,...p,dispatchAction:m,id:`${this.ariaIdPrefix}`,labelId:`${this.ariaIdPrefix}-label`,errorId:`${this.ariaIdPrefix}-error`,hintId:`${this.ariaIdPrefix}-hint`,errorText:t,type:n.type,className:"p-block_kit_input_block__element",parent:b.WP.input,blocksContainerContext:r}),this.maybeRenderError()||this.maybeRenderHintTextAndEnterHelpText(),i.createElement("div",{className:_},s&&m?i.createElement("div",{className:g,"data-qa":"block_kit_loading_icon"},i.createElement(k.A,{size:l?"small":"large"})):null,c&&m?y:null))}};tL.displayName="InputComponent";let tO=registerBlockWithErrors(tL),Loading=()=>i.createElement(k.A,{size:"jumbo",color:"blue",noMargin:!0});Loading.displayName="Loading";var tD=a(0x17bc3dd75),tF=a(0x14b4b9f10),tU=a(0x6d72337),tB=a(0x217553e42),tH=a(0xd93ecf94),tW=a(0x1ee439e69),tV=a(0xb96cde2b),tG=a.n(tV);function MessageEmbed({teamId:e,channel:t,ts:a}){let n=(0,ee.d4)(e=>(0,tB.OL)(e,t)),r=(0,ee.d4)(e=>(0,tH.Ld)(e,t,a)),l=(0,ee.d4)(t=>(0,tW._J)(t,e)),o=(0,ee.Z2)(e=>r?.files?.length?r.files.map(t=>(0,tu.Lp)(e,t)):[]),s=(0,ee.d4)(e=>(0,tD.A)(e,{userId:r?.user,botId:r?.bot_id,username:r?.username,botProfile:r?.bot_profile})),c=(0,i.useMemo)(()=>(0,tF.A)({channel:n||void 0,filesOnMessage:o,messageAuthorName:s,message:r||void 0,team:l}),[n,o,s,r,l]);return i.createElement("div",{className:tG().container},(0,tU.dK)({isMsgUnfurl:!0,messageTs:r?.ts,showDelete:!1,...c}))}MessageEmbed.displayName="MessageEmbed";var tq=a(0x13c7d13c1),tj=a(0x200b519b5),tK=a(0x67edd73a),t$=a(0x126cf60),tY=a(0x11c6e3140),tQ=a(0xa6f3163b),tZ=a(0xfe5aa224),tJ=a(0x344bb842),tX=a(0xe8e6ff7d),t0=a(0xf2309c3),t1=a(0x244448c3b),t2=a(0x15a8943a8);let t4=new y.Ay("image_grid_gallery_modal"),ImageGridGalleryModal=({images:e})=>{let[t,a]=(0,i.useState)(0),n=(0,q.wA)(),r=(0,i.useRef)(void 0),l=(0,i.useContext)(tZ.A),s=(0,i.useCallback)(()=>{n((0,el.O)())},[n]),c=(0,i.useCallback)(()=>{let e=t-1;e<0||a(e)},[t]),d=(0,i.useCallback)(()=>{let n=t+1;n<e.length&&a(n)},[e.length,t]),m=(0,i.useMemo)(()=>({name:"close"}),[]),u=(0,t2.K5)(),p="themed_blur"!==u,h=(0,i.useMemo)(()=>{let a=e[t];if(a)return{...a,src:a.imageUrl}},[e,t]),{mouseIsOverElement:_,onMouseLeave:f,onMouseEnter:b,onMouseMove:g,onMouseOver:y}=(0,t0.A)();return i.createElement(X.dW,{fullscreen:!0,showCloseButton:!1,closeModal:s,className:o()("p-media_viewer_modal",{[`p-media_viewer_modal--transparency_fix_${u}`]:u}),overlayRef:r,contentLabel:t4.t("Media viewer",{fallbackHash:"bef71108fdc9d1bf46f3fd25929ebc60d08f4a07",fallbackHashNs:"stories_av"})},i.createElement("div",{className:"p-media_viewer_modal__messages p-media_viewer_modal__multimedia"},i.createElement("div",{className:o()("p-media_viewer_modal__multimedia_video",{"p-media_viewer_modal__multimedia_video--not_hovering":!_,"p-media_viewer_modal__multimedia_video--has_keyboard_focus":l}),role:"group",onMouseEnter:b,onMouseLeave:f,onMouseMove:g,onMouseOver:y,"data-prevent-fade":"true"},i.createElement(tX.A,{image:h,alwaysShowZoomControls:!0}),i.createElement(t1.A,{showPrevious:t>0,showNext:t<e.length-1,onPrevious:c,onNext:d}),i.createElement("div",{className:o()("p-media_viewer_modal__footer","p-media_viewer_modal__footer--slide_over_content"),"data-prevent-fade":"true",role:"toolbar","aria-label":t4.t("Media controls",{fallbackHash:"f6f98cdfdb4c34811b8aa89ed549fe71ce3b4acd",fallbackHashNs:"files"})},i.createElement("div",{className:"p-media_viewer_modal__footer__gradient"}),i.createElement(S.Ay,{tip:t4.t("Close",{fallbackHash:"bbfa773e5a63a5ea58c9b6207e608ca0120e592a",fallbackHashNs:"generic_dialog"}),position:"bottom",delay:S.PK},i.createElement(tJ.A,{className:o()("p-media_viewer_modal__tabs_close",{"p-media_viewer_modal__icon_button":!0,"p-media_viewer_modal__tabs_close--fullscreen":!0,"p-media_viewer_modal__tabs_close--slide_over_content":!0}),svgIconProps:m,backgroundStyle:p?"dark":void 0,onClick:s,"aria-label":t4.t("Close",{fallbackHash:"bbfa773e5a63a5ea58c9b6207e608ca0120e592a",fallbackHashNs:"generic_dialog"}),"data-prevent-fade":"true"}))))))};ImageGridGalleryModal.displayName="ImageGridGalleryModal";var t5=a(0x44240292),t3=a(0x114c3624e),t6=a.n(t3);let ImageGridItem=({image:e})=>i.createElement("div",{className:t6().image},i.createElement(tb.A,{url:e.imageUrl,title:e.altText,originalWidth:e.width,originalHeight:e.height,width:e.width,height:e.height,unsetWidthStyle:!0,backgroundSize:"cover"}));ImageGridItem.displayName="ImageGridItem";let ImageGrid=({imageGrid:e})=>{let t=(0,ej.Ay)({label:"blockKitImageGrid"}),a=(0,q.wA)(),[n,r]=(0,i.useState)([]),[l,o]=(0,i.useState)(!1);(0,i.useEffect)(()=>{Promise.all(e.images.map(e=>(0,t5.A)(e.imageUrl).then(t=>({...e,width:t.width,height:t.height})))).then(e=>{r(e)}).catch(e=>{t.error(Error(`Error loading images: ${e}`))})},[e.images,t]);let s=(0,i.useCallback)(()=>{a((0,eE.q)({element:i.createElement(ImageGridGalleryModal,{images:n})})),o(!0)},[a,n]);if(n.length!==e.images.length)return i.createElement(k.A,null);let c=n.slice(0,4);return i.createElement("div",{className:t6().container},i.createElement("div",{className:t6().grid},c.map(e=>i.createElement(ImageGridItem,{key:e.imageUrl,image:e}))),e.images.length>4&&i.createElement(tQ.A,{className:t6().openGalleryButton,onClick:s},i.createElement(z.Ah,{name:"image-filled",size:"20"}),i.createElement("span",{className:t6().openGalleryButtonCount},e.images.length)))};ImageGrid.displayName="ImageGrid";var t8=a(0x1b50b0090),t7=a(0x220a941b7),t9=a(0xe4be167c),ae=a.n(t9);function normalizeElementStateKeys(e){let t={};for(let a of Object.keys(e))t[a.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)]=e[a];return t}function getDisplayValue(e){return e?null!=e.value?e.value:e.selected_option?e.selected_option.text?.text||e.selected_option.value||null:e.selected_options&&e.selected_options.length>0?e.selected_options.map(e=>e.text?.text||e.value||"").filter(Boolean).join(", "):e.selected_user?e.selected_user:e.selected_users&&e.selected_users.length>0?e.selected_users.join(", "):e.selected_conversation?e.selected_conversation:e.selected_conversations&&e.selected_conversations.length>0?e.selected_conversations.join(", "):e.selected_channel?e.selected_channel:e.selected_channels&&e.selected_channels.length>0?e.selected_channels.join(", "):e.selected_date?e.selected_date:e.selected_time?e.selected_time:null:null}function InlineFormResponses({blocks:e,submittedValues:t}){if(!e||!t)return null;let a=e.filter(e=>"input"===e.type).map(e=>{let a=e.block_id||e.blockId||"",n=e.label?.text||"",r=e.element?.action_id||e.element?.actionId||"",i=t[a]||t[(0,t7.A)(a)],l=i?i[r]||i[(0,t7.A)(r)]:void 0;return{blockId:a,label:n,displayValue:l?getDisplayValue(normalizeElementStateKeys(l)):null}});return i.createElement("div",{className:ae().doneView},a.map(e=>i.createElement("div",{key:e.blockId,className:ae().doneField},i.createElement("div",{className:ae().doneFieldLabel},e.label),e.displayValue?i.createElement("div",{className:ae().doneFieldValue},e.displayValue):i.createElement("div",{className:ae().doneFieldEmpty},"No response"))))}function InlineFormDoneView({blockId:e,title:t,subtitle:a,formBlocks:n,submittedValues:r,onEdit:l}){let o=(0,i.useCallback)(e=>{e.stopPropagation(),l()},[l]),s=(0,i.useMemo)(()=>r||{},[r]);return i.createElement(t8.M,{initialHeight:56,className:`${ae().inlineFormBlock} ${ae().inlineFormBlockDone} ${ae().doneContainer}`},({isExpanded:r,toggle:l})=>i.createElement(InlineFormDoneViewContent,{blockId:e,title:t,subtitle:a,editLabel:"Edit response",isExpanded:r,toggle:l,onEditClick:o,formBlocks:n,submittedValues:s}))}function InlineFormDoneViewContent({blockId:e,title:t,subtitle:a,editLabel:n,isExpanded:r,toggle:l,onEditClick:o,formBlocks:s,submittedValues:c}){let d=(0,i.useCallback)(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l())},[l]);return i.createElement("div",{className:ae().doneClickTarget,"data-qa":`inline-form-block-${e}`,role:"button",tabIndex:0,"aria-expanded":r,onClick:l,onKeyDown:d},i.createElement("div",{className:ae().doneHeaderRow},i.createElement("div",{className:ae().doneHeaderLeft},t&&i.createElement("div",{className:ae().title},i.createElement(I.A,t)),a&&i.createElement("div",{className:ae().doneSubtitle},i.createElement(I.A,a))),i.createElement("div",{className:ae().doneHeaderActions},i.createElement(S.Ay,{tip:n},i.createElement(A.Nm,{onClick:o,"aria-label":n,className:ae().editButton},i.createElement(z.Ah,{name:"edit",size:"16"}))),i.createElement("div",{className:ae().caretIcon},i.createElement(z.Ah,{name:r?"caret-up":"caret-down",size:"18"})))),r&&i.createElement("div",{className:ae().doneExpandedContent},i.createElement(InlineFormResponses,{blocks:s,submittedValues:c})))}InlineFormResponses.displayName="InlineFormResponses",InlineFormDoneView.displayName="InlineFormDoneView",InlineFormDoneViewContent.displayName="InlineFormDoneViewContent";var at=a(0x987f2e80),aa=a(0x221091ef3),an=a(0x1b56e521c),ar=a(0x8def90bc),ai=a(0x18cffe646),al=a(0x1a3a5713f),ao=a(0x9509dfce),as=a(0x22854503b),ac=a(0x1936e1c6a),ad=a(0x16349a51f),am=a(0xe9460abe),au=a(0x901ae535);let ap="main";function isElementValueEmpty(e){if(!e)return!0;let{type:t,...a}=e;return!!(0,th.A)(a)||Object.values(a).every(e=>null==e||""===e||Array.isArray(e)&&0===e.length)}function InlineFormEditableView({blockId:e,containerId:t,channelId:a,messageTs:n,callbackId:r,submitActionId:l,virtualView:o,formBlocks:s,submittedValues:c,mode:d,title:m,submitLabel:u,cancelLabel:p,renderBlocks:h,onAction:_,onSubmitAction:f,onCancel:b}){let g=(0,q.wA)(),y=(0,ai.u)({type:x.pi.message,channelId:a,messageTs:n})||"";(0,i.useState)(()=>"edit"!==d||(c&&s.length>0&&s.forEach(e=>{if("input"!==e.type)return;let t=e.blockId||e.block_id||"",a=e.element?.actionId||e.element?.action_id||"",n=c[t]||c[(0,t7.A)(t)],r=n?n[a]||n[(0,t7.A)(a)]:void 0;r&&g((0,au.s)({containerId:y,blockId:t,actionId:a,blockState:{[t]:{[a]:(0,ao.Ay)(r)}}}))}),!0));let[A,E]=(0,i.useState)(!1),[C,k]=(0,i.useState)(!1),[v,S]=(0,i.useState)(void 0),w=(0,ee.d4)(e=>(0,ac.Vf)(e,o.id,ap)),T=(0,ee.d4)(e=>(0,am.uz)(e,y));(0,i.useEffect)(()=>()=>{g((0,ad.dV)(y))},[y,g]);let N=(0,ar.s)({view:o,showErrors:C,setShowErrors:k,blockToFocusAfterValidation:v,setBlockToFocusAfterValidation:S,windowId:ap}),M=(0,i.useCallback)(()=>{let e,t={};return s.forEach(a=>{if("input"!==a.type||a.optional)return;let n=a.blockId||a.block_id||"",r=a.element?.actionId||a.element?.action_id||"",i=a.element?.type||"";isElementValueEmpty(T?.[n]?.[r])&&(t[n]=(0,al.$)(i),e||(e=n))}),!!(0,th.A)(t)||(g((0,as.Ho)({windowId:ap,viewId:o.id,errorState:{errors:t}})),k(!0),S(e),!1)},[s,T,o.id,g,k,S]),R=(0,i.useCallback)(async()=>{if(M()&&N.validateBeforeSubmit()){E(!0);try{await _({actionId:l,blockId:e,type:"button",text:{type:"plain_text",text:"submit"},value:"submit",callbackId:r}),f?.()}catch{E(!1)}}},[M,N,_,e,r,l,f]),P=(0,i.useCallback)(e=>{g((0,as.Ho)({windowId:ap,viewId:o.id,errorState:e}))},[g,o.id]),L=u?.text||"Submit";return i.createElement("div",{className:ae().inlineFormBlock,"data-qa":`inline-form-block-${e}`},m&&i.createElement("div",{className:ae().title},i.createElement(I.A,m)),i.createElement(an.A,{blocks:s,containerIdKey:y,containerContext:x.pi.inline_form},i.createElement(aa.A,{key:t,view:o,errorState:w,isStateEnabled:!0,showErrors:C,blockToFocusAfterValidation:v,onError:P},h(s))),i.createElement("div",{className:ae().buttons},i.createElement(at.w,{onSubmit:R,onCancel:b,isSubmitting:A,submitButtonText:L,cancelButtonText:p?.text,isDisabled:!1})))}InlineFormEditableView.displayName="InlineFormEditableView";var ah=a(0x124f71042);let a_=[];function InlineFormBlock({blockId:e,renderBlocks:t,onAction:a,mode:n="empty",title:r,subtitle:l,submitLabel:o,cancelLabel:s,callbackId:c,submitActionId:d,formBlocks:m=a_,submittedValues:u}){let p=(0,i.useContext)(ah.A),h=p.channelId||"",_=p.ts||"",f=`inline_form-${h}-${_}-${e}`,[g,y]=(0,i.useState)(!1),A=(0,i.useCallback)(()=>{y(!0)},[]),x=(0,i.useCallback)(()=>{y(!1)},[]),E=g?"edit":n,C=(0,i.useMemo)(()=>({id:f,rootViewId:f,teamId:"",type:b.cs.modal,title:r?{type:"plain_text",text:r.text,emoji:!!r.emoji}:void 0,submit:o?{type:"plain_text",text:o.text,emoji:!!o.emoji}:void 0,close:s?{type:"plain_text",text:s.text,emoji:!!s.emoji}:void 0,blocks:m,state:{values:u||{}},hash:""}),[f,r,o,s,m,u]);return"done"===E?i.createElement(InlineFormDoneView,{blockId:e,title:r,subtitle:l,formBlocks:m,submittedValues:u,onEdit:A}):i.createElement(InlineFormEditableView,{blockId:e,containerId:f,channelId:h,messageTs:_,callbackId:c,submitActionId:d,virtualView:C,formBlocks:m,submittedValues:u,mode:E,title:r,submitLabel:o,cancelLabel:s,renderBlocks:t,onAction:a,onSubmitAction:g?x:void 0,onCancel:g?x:void 0})}InlineFormBlock.displayName="InlineFormBlock";let OptimisticAdditiveBlock=({blocks:e,renderBlocks:t,customOnAction:a})=>i.createElement("div",null,t(e,void 0,{customOnAction:a},!1));OptimisticAdditiveBlock.displayName="OptimisticAdditiveBlock";var af=a(0x39c7a394),ab=a.n(af);let OptimisticReplacedBlock=({blocks:e,renderBlocks:t,onUndo:a,customOnAction:n})=>i.createElement("div",{className:ab().blockReplacedContainer},t(e,void 0,{customOnAction:n},!1),i.createElement("div",{className:ab().undoButtonContainer},i.createElement("span",null,"Changes applied"),i.createElement(A.Nm,{className:ab().undoButton,onClick:a,"aria-label":"Undo changes"},i.createElement(z.Ah,{name:"undo",size:"16"}),"Undo")));OptimisticReplacedBlock.displayName="OptimisticReplacedBlock";let addBlockIds=e=>e.map(e=>{let t,a=("string"==typeof e.blockId?e.blockId:void 0)||(t=e.type,`${t}_${Date.now()}_${Math.floor(1e6*Math.random())}`);return{...e,blockId:a}}),elementHasActionId=(e,t)=>"object"==typeof e&&null!==e&&"actionId"in e&&"string"==typeof e.actionId&&e.actionId===t,OptimisticUpdate=({renderBlocks:e,optimisticUpdates:t,onAction:a,containerId:n})=>{let{blocks:r,updates:l}=t,[s,c]=(0,i.useState)(!1),[d,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(()=>addBlockIds(r)),[h,_]=(0,i.useState)(!1),[f,b]=(0,i.useState)([]),[g,y]=(0,i.useState)(-1),[x,E]=(0,i.useState)(null),[C,k]=(0,i.useState)([]),[v,S]=(0,i.useState)([]),[I,w]=(0,i.useState)(()=>new Set),[T,N]=(0,i.useState)(()=>new Set),M=(0,ee.d4)(e=>(0,am.uz)(e,n)),R=(0,i.useCallback)(e=>{if(0===e.length)return e;for(let t=0;t<e.length;t++){let a=e[t];if(a.element&&"object"==typeof a.element){let n={...a,element:{...a.element,focusOnLoad:!0}};return[...e.slice(0,t),n,...e.slice(t+1)]}if(a.accessory&&"object"==typeof a.accessory){let n={...a,accessory:{...a.accessory,focusOnLoad:!0}};return[...e.slice(0,t),n,...e.slice(t+1)]}if(a.elements&&Array.isArray(a.elements)&&a.elements.length>0){let n=[...a.elements];n[0]={...n[0],focusOnLoad:!0};let r={...a,elements:n};return[...e.slice(0,t),r,...e.slice(t+1)]}}return e},[]),P=(0,i.useCallback)((e=100)=>{setTimeout(()=>{let e=document.querySelector(".p-optimistic_additive_block");if(e){let t=e.querySelector('input, textarea, button:not([disabled]), select, [tabindex]:not([tabindex="-1"])');t&&t.focus()}},e)},[]);(0,i.useEffect)(()=>{if(s&&d){let e=setTimeout(()=>{p(d)},150),t=setTimeout(()=>{c(!1),m(null)},300);return()=>{clearTimeout(e),clearTimeout(t)}}},[s,d]);let L=(0,i.useCallback)(e=>{if(!("object"==typeof e&&null!==e&&"actionId"in e&&"string"==typeof e.actionId&&"blockId"in e&&"string"==typeof e.blockId))return void a(e);let t=l.find(t=>{let a=t.actionId===e.actionId,n=!t.blockId||t.blockId===e.blockId;return a&&n});if(!t)return void a(e);if(t.whenValidState){let n=M?.[t.whenValidState.blockId]?.[t.whenValidState.actionId];if(n?.selected_option?.value?.length<=0)return void a(e)}let n=R(addBlockIds(t.blocks||[])),r="datepicker"===e.type||"static_select"===e.type||"external_select"===e.type||"users_select"===e.type||"conversations_select"===e.type||"channels_select"===e.type;switch(t.type){case"full_replace":S(C),N(I),c(!0),m(n),k([]),b([]),y(-1),_(!0),w(new Set);break;case"replace_block":{var i,o;let e;x||E(u);let{blocks:a,replacedIndex:r}=(i=t.actionId,o=[],e=-1,{blocks:u.map((t,a)=>-1!==e?t:"actions"===t.type&&"elements"in t&&t.elements.some(e=>elementHasActionId(e,i))||"section"===t.type&&"accessory"in t&&t.accessory&&elementHasActionId(t.accessory,i)?(e=a,o):elementHasActionId(t,i)?(e=a,o):t).flat(),replacedIndex:e});-1!==r&&(p(a),b(n),y(r));break}case"additive":{let e=t.blockId?`${t.actionId}-${t.blockId}`:t.actionId;!I.has(e)&&(k([...C,...n]),w(new Set(I).add(e)),r&&P(150))}}a({...e,isOptimistic:!0})},[u,a,x,l,C,M,R,P,I]),O=(0,i.useCallback)(()=>{c(!0),m(addBlockIds(r)),_(!1),k(v),w(T),b([]),y(-1)},[r,v,T]),D=(0,i.useCallback)(()=>{x&&(p(x),b([]),y(-1),E(null))},[x]);return i.createElement("div",{className:"p-optimistic_update"},h&&i.createElement("div",{className:ab().backButtonContainer},i.createElement(A.Nm,{className:ab().backButton,onClick:O,"aria-label":"Go back to original content"},i.createElement(z.Ah,{name:"arrow-left",size:"16"}),"Back")),i.createElement("div",{className:o()(ab().content,{[ab().animating]:s})},u.map((t,a)=>{let n=f.length>0&&a===g;return i.createElement(i.Fragment,{key:t.blockId||a},n&&i.createElement(OptimisticReplacedBlock,{blocks:f,renderBlocks:e,onUndo:D,customOnAction:L}),i.createElement("div",null,e([t],void 0,{customOnAction:L},!0)))}),f.length>0&&g>=(u||[]).length&&i.createElement(OptimisticReplacedBlock,{blocks:f,renderBlocks:e,onUndo:D,customOnAction:L})),C.length>0&&i.createElement(OptimisticAdditiveBlock,{blocks:C,renderBlocks:e,customOnAction:L}))};OptimisticUpdate.displayName="OptimisticUpdate";var ag=a(0x118cdcdea),ay=a.n(ag),aA=a(0xdf73dfa7),ax=a(0x154933c60),aE=a(0x1a02c72b5),aC=a(0xd6a16321),ak=a(0x105ecbbed),av=a(0xb04c4a12),aS=a(0x16d4244ae),aI=a(0x6fec4429),aw=a(0x1cfcdb1db),aT=a(0x1f4bff87c),aN=a(0xc79c5e11),aM=a(0x1aad5a225),aR=a(0x235c05c79),aP=a(0x19895585a);let sendMessagePrivately=async(e,t,a,n)=>{let r=(0,tB.Pu)(t,a),i=r?.id;if(!i){let t=await e((0,ax.jP)({memberIds:[a],reason:"suggested_prompts_button_click"})),n=t?.channel;if(!n)return;e((0,aM.F)({channel:n})),i=n.id}let l=await e((0,aw.Ay)({channelId:i,delta:n})),o="object"==typeof l&&l&&"ts"in l?l.ts:void 0;o&&((0,aN.FV)(t,a)?await e((0,aA.t)({appUserId:a,channelId:i,threadTs:o,entryPoint:aT.m.Chat})):e((0,aE.o)((0,aC.R9)(i,o,o))))},setContentsAndFocus=(e,t)=>{e.setContents({contents:t.ops}),e.focus()},populateComposer=async(e,t,a,n,r)=>{if(!n&&r){e((0,aE.o)((0,aC.UX)({channelId:t,threadTs:r})));let n=(0,ak.Iu)(t,r);e((0,aR.pJ)({windowId:aP.N2,threadKey:n}));let i=await ((e,t=20,a=100)=>new Promise(n=>{let r=0,check=()=>{let i=(0,aS.zC)(e);i||r>=t?n(i):(r+=1,setTimeout(check,a))};check()}))({viewContext:av.Y.THREAD,channelId:t,threadTs:r});i&&setContentsAndFocus(i,a)}else{let e=(0,aS.zC)({viewContext:av.Y.MESSAGE_PANE,channelId:t});e&&setContentsAndFocus(e,a)}},aL=(0,eV.Ay)("Handle suggested prompts button click",async(e,t,{prompt:a,privately:n,channelId:r,botUserId:i,messageTs:l})=>{let o=t(),s=((e,t)=>{try{return(0,aI.A)(e,t)}catch{return new(ay())([{insert:t}])}})(o,a),c=l?(0,tH.Ld)(o,r,l):void 0,d=c?.thread_ts||c?.ts,m=!!c?.is_ephemeral;if(((e,t,a)=>{if(!a)return!1;let n=(0,tB.Pu)(e,a);return n?.id===t})(o,r,i))await e((0,aw.Ay)({channelId:r,delta:s,replyToTs:d}));else if(n){if(!i)return;await sendMessagePrivately(e,o,i,s)}else await populateComposer(e,r,s,m,d)});aL.meta={name:"handleSuggestedPromptsButtonClick",key:"createThunkHandleSuggestedPromptsButtonClick",description:"Handle suggested prompts button click"};var aO=a(0x205724f89),aD=a.n(aO);let SuggestedPromptsButton=({text:e,prompt:t,privately:a,style:n,accessibilityLabel:r})=>{let l=(0,q.wA)(),o=(0,i.useContext)(ah.A),s=o?.channelId,c=(0,ee.d4)(e=>o?.channelId&&o?.ts?(0,tH.Ld)(e,o.channelId,o.ts):void 0),d=c?.user,m=(0,ee.d4)(e=>!!d&&!!s&&(0,tB.Pu)(e,d)?.id===s),u=o?.ts,p=(0,i.useCallback)(()=>{s&&l(aL({prompt:t,privately:a,channelId:s,botUserId:d,messageTs:u}))},[l,t,a,s,d,u]);return i.createElement("div",{className:aD().wrapper},i.createElement(A.Ay,{type:"primary"===n?"primary":"danger"===n?"danger":"outline",size:"small",onClick:p,"aria-label":r||e.text},i.createElement(t_.A,{text:e.text,emoji:e.emoji,noJumbomoji:!0}),a&&!m&&i.createElement("span",{className:aD().icon},i.createElement(z.Ah,{name:"move-to-split-view",inline:!0,"aria-hidden":"true"}))))};SuggestedPromptsButton.displayName="SuggestedPromptsButton";var aF=a(0x18c2d4c6f),aU=a(0x1c7cb6e50);let aB=i.lazy(()=>Promise.all([a.e("gantry-v2-vendors-async"),a.e("vendors-node_modules_recharts_es6_cartesian_CartesianGrid_js-node_modules_recharts_es6_chart_-553340"),a.e("prototype-chart-block")]).then(a.bind(a,0x2213b890f)).then(e=>({default:e.ChartBlock}))),PrototypeImpl=({renderBlocks:e,onAction:t,...a})=>{let n=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"block_kit_revamp_blocks")),r=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"bk_prototype_next"));switch(a.candidateType){case"card_v2":if(!n)return null;return i.createElement(t$.Z,(0,aU.t)(a));case"alert":if(!n)return null;return i.createElement(tK.E,(0,aU.t)(a));case"carousel":if(!n)return null;return i.createElement(tY.O,{...a,renderBlocks:e});case"optimistic_update":if(!r)return null;return i.createElement(OptimisticUpdate,{...a,renderBlocks:e,onAction:t});case"image_grid":if(!r)return null;return i.createElement(ImageGrid,(0,aU.t)(a));case"suggested_prompts_button":if(!r)return null;return i.createElement(SuggestedPromptsButton,(0,aU.t)(a));case"chart":if(!r)return null;return i.createElement(i.Suspense,{fallback:null},i.createElement(aB,(0,aU.t)(a)));case"inline_form":if(!r)return null;return i.createElement(InlineFormBlock,{...(0,aU.t)(a),renderBlocks:e,onAction:t});default:return null}};PrototypeImpl.displayName="PrototypeImpl";let renderError=()=>null,Prototype=e=>i.createElement(aF.A,{subtype:"block-kit-prototype",renderError:renderError},i.createElement(PrototypeImpl,e));Prototype.displayName="Prototype";var aH=a(0x47119420),aW=a(0xda39ef2b),aV=a.n(aW);let RelatedAutomationDecorator=({text:e})=>{let t=(0,ee.d4)(t=>(0,aH.A)(t,e));return i.createElement("div",{className:aV().workflowDecoration},i.createElement("div",{className:aV().workflowDecorationIcon},i.createElement(z.Ah,{name:"bolt"})),i.createElement("span",{className:aV().workflowDecorationText},t))};RelatedAutomationDecorator.displayName="RelatedAutomationDecorator";var aG=a(0x93f78b39),aq=a(0xc48503ad),aj=a.n(aq);let fields_fields=({fields:e,shouldStackTextFields:t=!0,...a})=>i.createElement("div",{"data-qa":"bk_fields",className:"p-section_block__fields"},e.map((e,n)=>i.createElement("div",{key:`field-item-${n}`,className:o()("p-field_section",{"p-field_section--stacked":t})},i.createElement(I.A,{...a,...e})))),az={text:aj().shape({type:aj().oneOf([b.ze.plain_text,b.ze.mrkdwn]).isRequired,text:aj().string.isRequired}),fields:aj().arrayOf(aj().shape({type:aj().oneOf([b.ze.plain_text,b.ze.mrkdwn]).isRequired,text:aj().string.isRequired})),accessory:aj().shape({type:aj().string.isRequired}),onAction:aj().func.isRequired,blockId:aj().string.isRequired,isLoading:aj().bool.isRequired,isError:aj().bool.isRequired,actionError:aj().string,isDisabled:aj().bool.isRequired,shouldTruncateText:aj().bool.isRequired,shouldStackTextFields:aj().bool.isRequired,shouldUseSmallStatusIndicators:aj().bool.isRequired,shouldStackAccessory:aj().bool,removeTopMargin:aj().bool.isRequired,fetchExternalSuggestions:aj().func,containerId:aj().string,isInGroupBlock:aj().bool},aK={text:void 0,fields:void 0,accessory:void 0,fetchExternalSuggestions:s.A,containerId:void 0,isInGroupBlock:!1,shouldStackAccessory:!1,actionError:void 0},Section=({text:e,fields:t,accessory:a,isLoading:n,isError:r,actionError:l,shouldStackTextFields:s,shouldTruncateText:c,removeTopMargin:d,shouldUseSmallStatusIndicators:m,isInGroupBlock:u,shouldStackAccessory:p,...h})=>{let _=o()("p-section_block__accessory",{"p-section_block__accessory--wrap":s,"p-section_block--stack-accessory":p||a&&"radio_buttons"===a.type||a&&"checkboxes"===a.type}),f=o()("p-section_block__icons",{"p-section_block__icons--small":m}),g=o()("p-block_kit_element__error",{"p-block_kit_element__error--small":m}),y=o()("p-block-kit-element__loading",{"p-block_kit_element__loading--small":m}),A=o()("p-section_block",{"p-section_block--wrap":s,"p-section_block--no_top_margin":d,"p-section_block--group":u,"p-section_block--stack-accessory-wrapper":p}),x=l?i.createElement(S.Ay,{tip:l},i.createElement("div",{className:g,"data-qa":"block_kit_error_icon"}," ",i.createElement(v.A,{type:"warning",inline:!0}))):i.createElement("div",{className:g,"data-qa":"block_kit_error_icon"}," ",i.createElement(v.A,{type:"warning",inline:!0})),E=a?i.createElement("div",{className:_},i.createElement(I.A,{parent:b.WP.section,...h,...a}),i.createElement("div",{className:f},n?i.createElement("div",{className:y,"data-qa":"block_kit_loading_icon"},i.createElement(k.A,{size:m?"small":"large"})):null,r?x:null)):null;return i.createElement(i.Fragment,null,i.createElement("div",{"data-qa":"bk_section_block",className:A},E,i.createElement("div",{className:"p-section_block_text_content"},e?i.createElement("div",{className:"p-section_block__text"},i.createElement(I.A,{"data-qa":"bk_section_block_mrkdwn",parent:b.WP.section,shouldTruncateText:c,...h,...e})):null,t?i.createElement(fields_fields,{...h,parent:b.WP.section,"data-qa":"bk_text_fields_block_mrkdwn",fields:t,shouldStackTextFields:s,shouldTruncateText:c}):null)),s?i.createElement("div",{className:"p-section_block__clearfix"}):null)};Section.displayName="Section",Section.propTypes=az,Section.defaultProps=aK;var a$=a(0x198201515);let SharePrompt=({block:e,blocksContainerContext:t})=>t!==x.pi.workflow_builder?i.createElement(a$.W,{prompt:e.prompt,promptRichText:e.promptRichText,label:e.label,appId:e.appId,isSlackbot:e.isSlackbot,promptId:e.promptId,canvasUnfurl:t===x.pi.quip_unfurl}):null;SharePrompt.displayName="SharePrompt";var aY=a(0x1393a17ca),aQ=a(0xbe0b63ff),aZ=a(0x930afbbd),aJ=a(0x2301c802e),aX=a(0x7a2a96da),a0=a(0x239cd8d69),a1=a(0x1eea27034),a2=a(0x19683d73f),a4=a(0x178ee06e3),a5=a(0x22b8621cf),a3=a(0x11c86845f);let a6=new y.Ay("workflows"),WorkflowActionBar=({onShare:e,renderMenu:t})=>{let a=a6.t("Forward workflow"),n=i.useMemo(()=>({name:"share-message"}),[]),r=a6.t("More actions"),l=i.useMemo(()=>({name:"ellipsis-vertical-filled"}),[]);return i.createElement(a3.A,null,i.createElement(a5.A,{"aria-label":a,svgIconProps:n,tooltipLabel:a,tooltipPosition:"top",onClick:e}),i.createElement(a5.A,{isMenuTrigger:!0,renderMenu:t,"aria-label":r,svgIconProps:l,tooltipLabel:r,tooltipPosition:"top"}))};WorkflowActionBar.displayName="WorkflowActionBar";var a8=a(0xa8e65990),a7=a.n(a8);let WorkflowButtonContainer=({children:e})=>{let t=i.useCallback(e=>{e.stopPropagation()},[]);return i.createElement("div",{className:a7().workflowButtonContainer,onClick:t},e)};WorkflowButtonContainer.displayName="WorkflowButtonContainer";var a9=a(0xa4f69faf),ne=a.n(a9);let WorkflowContentContainer=({children:e,isWithStartButton:t})=>i.createElement("div",{className:o()(ne().workflowContentContainer,{[ne().standardBottomPadding]:!t,[ne().withButtonBottomPadding]:!!t})},e);var nt=a(0x13eaf0489),na=a(0x2a037c8a),nn=a(0xcaa08ff7),nr=a(0x9b971e7e);let ni=new y.Ay("workflows"),WorkflowEntity=({channelId:e,shortcutInfo:t,hermesLinkTriggerUIContext:a})=>{let n=(0,q.wA)(),r=(0,ee.d4)(e=>(0,nn.mF)(e,t.botUserId)),{embeddedUiData:l}=(0,i.useContext)(aJ.N),o=(0,ee.d4)(e=>(0,R.nv)(e,t.botUserId)),s=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"new_workflow_trigger_contexts")),c="message"===a.location,d=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"hermes_next")),m=(0,ee.d4)(e=>(0,nr.Kc)(e)||"")===t.owningTeamId,u=d&&t.owningTeamId&&!m,p=(0,i.useCallback)(e=>l?i.createElement(aZ.A,{menuProps:e}):i.createElement(a1.A,{shortcutInfo:t,hermesLinkTriggerUIContext:a,showAddToChannelOption:c,menuProps:e}),[l,t,a,c]),h=(0,i.useCallback)(()=>{n((0,eF.A)({shortcutInfo:t}))},[n,t]),_=(0,e_.o)(o),f=(0,aQ.mX)(o),{description:b,url:g,appId:y,workflowId:A,triggerId:x,triggerType:E}=t,C=E===na.M.Shortcut&&g&&!_&&!f,k=ni.t("This workflow no longer exists."),v=(0,i.useMemo)(()=>i.createElement(a4.WL,{shortcutInfo:t}),[t]),S=(0,i.useMemo)(()=>_?i.createElement(z.Ah,{name:"trash",size:"20"}):i.createElement(aX.A,{shortcutInfo:t,size:36}),[_,t]),I=(0,i.useMemo)(()=>C?i.createElement(WorkflowButtonContainer,null,i.createElement(a2.Ay,{shortcutInfo:t,hermesLinkTriggerUIContext:a,ariaDescribedById:`workflow_card_title_${x}`})):void 0,[a,t,C,x]),w=(0,i.useMemo)(()=>i.createElement(WorkflowContentContainer,{isWithStartButton:!!C},b,u?i.createElement(a0.x,{owningTeamId:t.owningTeamId}):void 0),[b,C,u,t.owningTeamId]),N=i.useMemo(()=>_?void 0:i.createElement(WorkflowActionBar,{renderMenu:p,onShare:h}),[_,p,h]),M=(0,i.useCallback)(()=>n((0,aE.o)((0,aC.fX)({triggerId:x,hermesLinkTriggerUIContext:a,channelId:s?e:void 0,botUserId:t?.botUserId}))),[e,n,s,a,t.botUserId,x]);return i.createElement(j.A,{eventId:F.EventId.WORKFLOW_UNFURL_IMPRESSION,uiComponentName:F.UiComponentName.WORKFLOW_UNFURL,appId:y,workflowId:A,workflowTriggerId:x,clogImpression:!0},i.createElement(nt.w,{size:_?"compact":"expanded",width:420,entityState:f?"loading":"enabled",primaryLabel:_?void 0:t.title,secondaryLabel:_?k:v,isInteractive:!_,icon:S,content:_?void 0:w,interactiveContents:I,actionsBar:N,onClick:_?void 0:M,ariaLabel:ni.t("View details"),groupAriaLabel:t.title,isRemovable:!1,isAutoHeight:!0,contentHeight:f?86:void 0,renderVipBadge:r}))};WorkflowEntity.displayName="WorkflowEntity";var nl=a(0x19d55d0e1),no=a(0x20679dcfc),ns=a(0x66a0f59a),nc=a(0x1ec220982),nd=a(0x22f6a086f),nm=a(0x147c4c89b),nu=a(0xac9561bb);let ShareShortcut=({channelId:e,block:t,blocksContainerContext:a})=>{let n=(0,q.wA)(),r=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"new_workflow_trigger_contexts")),l=(0,ee.d4)(e=>(0,nd.Yl)(e,{block:t}));l?.workflowDetails||n((0,nm.R)({triggerId:t.functionTriggerId,reason:"cross-team-trigger"}));let o=(0,i.useContext)(ah.A),s=(0,ee.d4)(t=>o.ts&&e?(0,tH.Ld)(t,e,o.ts):null),c=(0,ee.d4)(t=>(0,tB.OL)(t,e)),d=(0,nl.jT)(c),m=(0,i.useMemo)(()=>e&&d?{location:"canvas",canvasId:(0,no.l)(e)}:(0,nu.P)(o),[e,o,d]),{triggerId:u}=l,p=(0,nc.A)(u),h="unknown";if(o&&o?.channelId&&(h="message"),d&&(h="canvas"),!p)return i.createElement(i.Fragment,null,"UNKNOWN SHORTCUT TYPE");let _={developerTraceId:t?.developerTraceId};return a===x.pi.share_dialog?i.createElement(j.A,{entryPoint:"share_dialog"},i.createElement(aY.A,{shortcutInfo:l,hermesLinkTriggerUIContext:m})):s&&(0,ns.A)(s)&&a===x.pi.message_attachment?i.createElement(j.A,{entryPoint:"message"},i.createElement(aY.A,{shortcutInfo:l,hermesLinkTriggerUIContext:m,errorInfo:_,showByline:!1})):i.createElement(j.A,{entryPoint:h},i.createElement(WorkflowEntity,{channelId:r?e:void 0,shortcutInfo:l,hermesLinkTriggerUIContext:m}))};ShareShortcut.displayName="ShareShortcut";var np=a(0x155d02b1c),nh=a(0x6e87d4ec),n_=a(0x125de1ee5),nf=a(0x35772d09),nb=a(0x10027d8bc),ng=a(0x1c760ba43),ny=a(0x1f3226107),nA=a(0x238b287cf),nx=a(0x12256831),nE=a(0x18f183d32),nC=a(0x1973dd8ce),nk=a(0xeb4f1a4d),nv=a(0x1d23c7f2c),nS=a(0x208ff08f6),nI=a(0x93a9f6f3),nw=a(0x155488593),nT=a.n(nw);let nN=new y.Ay("agents"),ShareSkillButton=({label:e,fileId:t,description:a,canvasUnfurl:n=!1,isPreview:r=!1})=>{let l=(0,q.wA)(),s=(0,nA.A)(),[c,d]=(0,i.useState)(!1),m=(0,ee.d4)(e=>(0,tB.o2)(e,b.Q$)),u=(0,ee.d4)(e=>(0,tu.Lp)(e,t)),p=(0,ee.d4)(e=>u?.user?(0,R.nv)(e,u.user):void 0),h=(0,ee.d4)(eY.WR),_=(0,ee.d4)(nv.Ep),f=(0,ee.d4)(nb.vP),g=p?.profile?.display_name||p?.profile?.real_name,y=(0,np.A)(e),A=(0,i.useCallback)(async()=>{d(!0);try{let e=u?.user===h,a=l((0,nS.T)()),n=_?(0,nx.A)(_):null;s.track(F.EventId.SLACKBOTAI_SKILL_INVOCATION,{contexts:{slackbotai:{slackbotai_skill_id:t,slackbotai_invocation_method:"skill_url",slackbotai_is_personal_skill:e,slackbotai_is_workspace_skill:!e,...a&&{slackbotai_session_id:a},...n&&{slackbotai_thread_id:n}},ui_context:{action:F.UiAction.CLICK,ui_properties:{skill_id:t,invocation_method:"skill_url"}}}}),await l((0,ny.B2)({fileId:t,reason:"share-skill-run-prepare"}));let r=m;if(!r){let e=await l((0,ex.Z)({memberId:b.Q$,shouldNavigateToChannel:!1,reason:"run-skill-from-link"}));r=e?.id}if(!r)throw Error("Failed to get Slackbot channel");l((0,nk.xM)({channelId:r,threadTs:null})),l((0,nk.Kb)({skillId:t}));let i=(0,nC.Q)({channelId:r,threadTs:nI.Xh});l((0,nE.i)({draft:{client_draft_id:i,is_from_composer:!1,ops:[{insert:"How to use this skill"}],cursor_index:21,file_ids:[],destinations:[{channel_id:r,thread_ts:nI.Xh}]},reason:"populate-skill-draft-text",syncImmediately:!0})),l((0,n_.p)({navProps:(0,aC.zd)(r,{tabId:ng.fY.SlackbotAiConversation},nI.XM.StartAgentOrAssistantThread,!0)}))}catch(e){l((0,e7.M)({element:i.createElement(nh.A,{showCloseButton:!0},f?nN.t("Failed to run skill. Please try again."):"Failed to run skill. Please try again.")}))}finally{d(!1)}},[l,t,m,f,s,u?.user,h,_]);return!f||r?null:i.createElement("div",{className:o()(nT().skillCard,{[nT().skillCardMaxWidth]:!r,[nT().skillCardMargin]:!n})},i.createElement(nf.V,{skillName:y,creatorName:g,description:a,onRunSkill:A,isRunning:c,withCardContainer:!n}))};ShareSkillButton.displayName="ShareSkillButton";let ShareSkill=({label:e,fileId:t,timestamp:a,description:n,blocksContainerContext:r})=>t&&r!==x.pi.workflow_builder?i.createElement(ShareSkillButton,{label:e||"Untitled Skill",fileId:t,timestamp:a?Number(a):void 0,description:n,canvasUnfurl:r===x.pi.quip_unfurl}):null;ShareSkill.displayName="ShareSkill";var nM=a(0x1d9a37519);let ShareWorkflow=({blocks:e})=>{let t=e[0].app_id;return i.createElement("div",{className:"p-share_workflow_block__container"},i.createElement("div",{className:"display_flex"},i.createElement(nM.z,{appId:t})))};ShareWorkflow.displayName="ShareWorkflow";var nR=a(0x1aa52e9c5),nP=a(0xe747dd27),nL=a(0x19f4f8a7c),nO=a.n(nL);let Cell=({children:e,isCenterAlign:t,isRightAlign:a,noWrap:n,fontBold:r,isEmpty:l,cellRef:s,isHeadingCell:c,isCellEditable:d=!1,...m})=>{let u=o()(nO().cell,{[nO().cellRight]:a,[nO().cellCenter]:t,[nO().cellNowrap]:n,[nO().cellBold]:r,[nO().emptyCell]:l&&!d,[nO().editableCell]:d});return i.createElement(c?"th":"td",{className:u,scope:c?"col":void 0,...m,ref:s},e)};Cell.displayName="Cell";let Table=({className:e,noMargin:t,fullWidth:a,children:n,...r})=>{let l=o()(nO().table,{[nO().tableMargin]:!t,full_width:!!a},e);return i.createElement("table",{className:l,...r},n)};Table.displayName="Table";var nD=a(0xc4c1b6f5);function getColumnSetting(e,t,a){if(e&&e[t])return e[t][a]||void 0}function isRightAlign(e,t){return"right"===getColumnSetting(e,t,"align")}function isCenterAlign(e,t){return"center"===getColumnSetting(e,t,"align")}let BaseTable=({rows:e,columnSettings:t,renderBlocks:a,className:n,fullWidth:r,role:l})=>{let renderRow=(e,n,r)=>i.createElement("tr",{key:`row-${n}`},e.map((e,l)=>{let o=`row-${n}-column-${l}`;return e?i.createElement(Cell,{key:o,isRightAlign:isRightAlign(t,l),isCenterAlign:isCenterAlign(t,l),noWrap:!getColumnSetting(t,l,"isWrapped"),isHeadingCell:r},("raw_text"===e.type||"cell_text"===e.type)&&i.createElement(nD.A,{element:e}),"rich_text"===e.type&&a([e],b.WP.table,{suppressRichTextEditedLabel:!0,disableJumboEmoji:!0})):i.createElement(Cell,{key:o,isEmpty:!0,isHeadingCell:r})})),[o,...s]=e;return i.createElement(Table,{className:n,fullWidth:r,role:l},o&&i.createElement("thead",null,renderRow(o,0,!0)),i.createElement("tbody",null,s.map((e,t)=>renderRow(e,t+1,!1))))};BaseTable.displayName="BaseTable";var nF=a(0x44cb0a94),nU=a.n(nF);let nB=new y.Ay("block_kit"),ViewTablePill=()=>i.createElement("div",{className:nU().viewTablePillContainer},i.createElement(tQ.A,{className:nU().viewTablePill},i.createElement(z.Ah,{name:"expand-diagonal"}),nB.t("Open full table")));ViewTablePill.displayName="ViewTablePill";var nH=a(0x5d4fd4ef),nW=a(0x11253e6a6),nV=a(0xc31f9833),nG=a(0x1d9627ee3),nq=a(0x1ed767a16);let nj=new y.Ay("block_kit"),TablePreview=({rows:e,columnSettings:t,renderBlocks:a,channelId:n,containerId:r,blockId:l,tableRole:o})=>{let s=(0,q.wA)(),c=(0,ee.d4)(e=>(0,nV.o)(e,{channelId:n,threadTs:r,ts:r})),d=(0,i.useMemo)(()=>{let e=c.find(e=>e.blockId===l);return e?.mediaId},[l,c]),m=(0,i.useCallback)(()=>[{label:nj.t("Copy table"),click:()=>{let t=s((0,nH.t)({rows:e}));return(0,nq.x3)(t)}}],[s,e]),u=(0,i.useCallback)(()=>{s((0,nG.A)({channelId:n,threadTs:r,mediaId:d}))},[s,n,r,d]),p=(0,i.useMemo)(()=>e.slice(0,10),[e]);return i.createElement(nW.A,{getTemplate:m},i.createElement("div",{role:"presentation",onClick:u},i.createElement(BaseTable,{rows:p,columnSettings:t,renderBlocks:a,className:nU().tablePreview,role:o}),i.createElement(ViewTablePill,null)))};TablePreview.displayName="TablePreview";var nz=a(0x1fe6de075),nK=a(0x8cc32fe7),n$=a.n(nK);let nY=new y.Ay("block_kit"),table_Table=({rows:e,columnSettings:t,renderBlocks:a,containerId:n,channelId:r,blockId:l,blocksContainerContext:s})=>{let c=(0,q.wA)(),d=s===x.pi.unfurl_modal,m=e.length>10&&!d,u=o()({full_width:d,[n$().tableContainerHorizontalOverflow]:!m,overflow_hidden:m}),p=!d,h=(0,i.useCallback)(()=>{let a=c((0,nH.t)({rows:e}));try{(0,nq.LJ)({"text/plain":a,"slack/block-kit":JSON.stringify([{type:"table",rows:(0,nP.VA)(e),column_settings:(0,nP.VA)(t||{})}])})}catch{(0,nq.x3)(a)}},[c,e,t]),_=(0,i.useCallback)(()=>{c((0,nz.Y)({rows:e}))},[c,e]),f=(0,i.useCallback)(()=>[{label:nY.t("Copy table"),click:h}],[h]),b=(0,i.useMemo)(()=>{let e=[];return p&&(e.push({name:"download",label:nY.t("Download table"),icon:i.createElement(z.Ah,{name:"download"}),action:_}),e.push({name:"copy",label:nY.t("Copy table"),icon:i.createElement(z.Ah,{name:"copy"}),action:h})),e},[p,h,_]),g=(0,i.useMemo)(()=>p?i.createElement(eu.A,{className:n$().tableActionsGroup},b.map(e=>i.createElement(em.A,{key:e.name,icon:e.icon,onClick:e.action,label:e.label,"aria-label":e.label}))):null,[p,b]),y=(0,i.useMemo)(()=>m?i.createElement(TablePreview,{rows:e,columnSettings:t,renderBlocks:a,containerId:n,channelId:r,blockId:l,tableRole:"none"}):i.createElement(BaseTable,{rows:e,columnSettings:t,renderBlocks:a,fullWidth:d,role:"none"}),[l,r,n,a,e,t,m,d]);return p?i.createElement(nW.A,{getTemplate:f},i.createElement("div",{className:n$().tableActionsContainer},g,i.createElement("div",{className:u,role:"table",...!m&&{tabIndex:0}},y))):i.createElement(nW.A,{getTemplate:f},i.createElement("div",{className:u,role:"table",...!m&&{tabIndex:0}},y))};table_Table.displayName="Table";var nQ=a(0x2469c2f8d),nZ=a(0x187d2e2b5),nJ=(a(0x62a17882),a(0x12edaa96a)),nX=a(0x6cc5eee0),n0=a(0x10602ace6),n1=a(0x148efa02a),n2=a(0x24a54f326),n4=a(0xb9e4d31e),n5=a(0x1f8091cd6);let VideoBlock=e=>{let{containerId:t,videoUrl:a,providerIconUrl:n,providerName:r,authorName:l,description:o,title:s,senderMemberId:c,channelId:d,blocksContainerContext:m,titleUrl:u,blockId:p,thumbnailUrl:h,altText:_,containerActionsPayload:f,blockIndex:b}=e,g=(0,ee.d4)(e=>"on"===(0,T._Z)(e,"expandable_trigger_aria_label")),[y,A]=(0,i.useState)(null);if((0,i.useEffect)(()=>{A((0,tA.A)("blockVideo",t,{blockId:p})||null)},[t,p]),!a)return null;function renderVideoExpander(){return y?i.createElement(tg.A,{expandableKey:y,senderMemberId:c,type:tg.Q.default,"aria-label":(0,ty.U)({experimentExpandableTriggerAriaLabelGroupOn:g,isVideo:!0})}):null}function renderTitle(){if(!s)return null;let e=i.createElement(nX.A,{text:s?.text,noJumbomoji:!0,noSpecials:!0}),t=u?i.createElement(Y.A,{href:u,target:"_blank","data-qa":"p-video_block_title_link p-video_block__author_subname",title:_},e):e;return i.createElement(i.Fragment,null,t,renderVideoExpander())}function renderProvider(){return i.createElement("div",{className:"p-video_block__row p-video_block__row--subtle_color"},r&&l&&i.createElement(n2.A,{icon:n,name:r,subname:l}),!r&&l&&i.createElement(n2.A,{name:l}))}function getAdjustedDimensions(){let[e,t]=[x.pi.modal,x.pi.app_home].includes(m)?[500,500]:[n5.rV,n5.Ex],a=450>e||354>t?Math.min(e/450,t/354):1;return{width:Math.floor(450*a),height:Math.floor(354*a)}}function renderVideo(){return i.createElement("div",{className:"p-video_block__video_row",title:_},i.createElement(tf.A,{expandableKey:y||"",senderMemberId:c,channelId:d},i.createElement(n0.A,{videoUrl:a,...getAdjustedDimensions(),messageTs:t,channelId:d,thumbnailUrl:h,showOverlayControls:!!d&&!f?.container?.isEphemeral,providerName:r,blockId:p,mediaId:(0,n1.QF)({ts:t,mediaIndex:b}),altText:_})))}function renderDescription(){let a;return o?(a=m===x.pi.thread?av.Y.THREAD:av.Y.MESSAGE_PANE,i.createElement("div",null,i.createElement(n4.A,{...e,text:o?.text,id:p,messageTs:t??(0,nJ.A)(),viewContext:a}))):null}return renderVideoExpander.displayName="renderVideoExpander",renderTitle.displayName="renderTitle",renderProvider.displayName="renderProvider",renderVideo.displayName="renderVideo",renderDescription.displayName="renderDescription",i.createElement("div",{className:"p-video_block__body"},renderProvider(),renderDescription(),renderTitle(),renderVideo())};function isDeprecatedCanvasTableCell(e){return void 0!==e.elements}VideoBlock.displayName="VideoBlock";let CanvasTable=({rows:e,renderBlocks:t})=>{let a=(0,i.useRef)(null),n=(0,i.useRef)(null);if(!(0,ee.d4)(e=>"on"===(0,T._Z)(e,"canvas_table_block_fe")))return null;let renderCells=e=>e.map((e,a)=>{let n=`cell-${a}`,r={width:e.width?`${e.width}px`:"auto"},l=isDeprecatedCanvasTableCell(e)?e?.elements:e?.childBlocks,o=l?.length?t(l,b.WP.canvas_table):i.createElement("div",{className:"p-canvas_table_block__table-cell-placeholder"});return e.header?i.createElement("th",{key:n,style:r},o):i.createElement("td",{key:n,style:r},o)});renderCells.displayName="renderCells";let renderRows=e=>e.map((e,t)=>i.createElement("tr",{key:`row-${t}`},renderCells(e.cells)));renderRows.displayName="renderRows";let r=!a.current?.offsetWidth||!n.current?.offsetWidth||a.current?.offsetWidth<n.current?.offsetWidth;return i.createElement("div",{ref:a,className:o()("p-canvas_table_block",{"p-canvas_table_block__col_overflow":r}),"data-qa":"bk_canvas_table_block"},i.createElement("table",{className:"p-canvas_table_block__table",ref:n},i.createElement("tbody",null,renderRows(e))))};CanvasTable.displayName="CanvasTable";let n3={[b.WP.card]:Card,[b.WP.canvas_table]:CanvasTable,[b.WP.callout]:U.P,[b.WP.context]:Context,[b.WP.context_actions]:ContextActions,[b.WP.section]:Section,[b.WP.image]:Image,[b.WP.video]:VideoBlock,[b.WP.divider]:ew.A,[b.WP.actions]:O,[b.WP.file]:File,[b.WP.message]:tq.A,[b.WP.error]:K.A,[b.WP.rich_text]:aG.A,[b.WP.call]:Call,[b.WP.input]:tO,[b.WP.header]:Header,[b.WP.event]:ts,[b.WP.contact_card]:ContactCard,[b.WP.prototype]:Prototype,[b.WP.share_workflow]:ShareWorkflow,[b.WP.share_shortcut]:ShareShortcut,[b.WP.channel_set]:G.A,[b.WP.channel_section]:G.A,[b.WP.sticker]:nR.A,[b.WP.table]:table_Table,[b.WP.loading]:Loading,[b.WP.share_prompt]:SharePrompt,[b.WP.share_skill]:ShareSkill,[b.WP.message_embed]:MessageEmbed,[b.WP.timeline]:nZ.K,[b.WP.plan]:tj.h,[b.WP.task_card]:nQ.y,[b.WP.related_automation_decorator]:RelatedAutomationDecorator},n6=new y.Ay("block_kit"),TopLevelErrorElement=({errorMessage:e})=>i.createElement("div",{"data-qa":"block_kit_top_level_error",className:"p-top_level_error_element"},e||n6.t("We can\u2019t fully display this message.")),n8={debounceMs:500,config:{leading:!0,trailing:!0}},n7={debounceMs:500,config:{leading:!1,trailing:!0}};var n9=a(0xedbc2765),re=a(0x252b73458),rt=a(0x6b345e37);let ra=(0,ej.Wo)(),rn=["condition_demo"];var rr=a(0x1ef19e2e2),ri=a(0xd55051a2);let rl=new y.Ay("attachments"),ro=class extends i.Component{_isMounted;containerKey;containerRef;prevBlocks;debouncers;static defaultProps={isExpanded:!1,onExpandBlocksClick:s.A,isInGroupBlock:!1,onActionsError:c.A,renderBlock:c.A,clogLinkClick:s.A,clogCitationImpression:s.A,inline:!1,isFocusTransitioning:()=>!1,noTabbableContent:!1,hideRichTextEmojiTooltips:!1,isInAttachment:!1,displayImageWithoutLink:!1,displayImageWithBorder:!1,streaming:!1};static getDerivedStateFromError(){return{replaceWithError:!0}}constructor(e){super(e),(0,f.v)(this,["handleExpandBlocksClick","renderExpandOrContractButton","onAction","clogLinkClick","clogCitationImpression","blockKitClogger","msgActionClogger","dispatchAction"]),this._isMounted=!0,this.prevBlocks=null,this.containerKey="bk-container-key",this.state={isExpanded:!1,loadingBlockIds:[],errorBlockIds:[],actionErrors:{},replaceWithError:!1},this.containerRef=i.createRef(),this.debouncers={},this.renderBlocks=this.renderBlocks.bind(this)}getSnapshotBeforeUpdate(e){if(this.props.blocks===e.blocks)return{};let t=this.containerRef.current;if(!t)return{};let a=document.activeElement;if(!a)return{};let n=t.contains(a);if(!n)return{};let r=Array.from(t.childNodes).findIndex(e=>e.contains(a));if(r<0)return{};let i=e.blocks[r]?.type,l=(0,g.Py)(t.childNodes[r]).indexOf(a);return l<0?{}:{prevActiveElement:a,prevFocusWithin:n,prevBlockType:i,prevBlockIndex:r,prevFocusIndex:l}}componentDidUpdate(e,t,{prevActiveElement:a=null,prevFocusWithin:n=!1,prevBlockType:r,prevBlockIndex:i,prevFocusIndex:l}={}){let o=!(0,d.A)(this.props.blocks,e.blocks),{serviceId:s,appId:c,dispatchPruneBlockState:m,containerActionsPayload:u}=this.props;o&&(this.setState(()=>({replaceWithError:!1})),(s||c)&&m({blocks:this.props.blocks,containerId:(0,ai.u)({...u?.container})}),n&&this.maybeRefocusOnPrevElement({prevActiveElement:a,prevBlockType:r,prevBlockIndex:i,prevFocusIndex:l}))}componentDidCatch(e,t){this.props.logger.error(e,t)}componentWillUnmount(){this._isMounted=!1}onAction(e){if("button"===e.type&&n9.LI.start({label:n9.gC.WorkflowsMessageButtonClickToOpenFormDuration,options:{tags:{skipped_precheck:this.props.experimentWorkflowProcessPrecheckInTripFEGroupOn}}}),!this.props.onAction)return Promise.resolve();let t=`${e.blockId}-${e.actionId}`;if(!this.debouncers[t]){var a;let n=(a=e.type,({[b.ze.rich_text_input]:n7,[b.ze.plain_text_input]:n7,[b.ze.number_input]:n7,[b.ze.password]:n7,[b.ze.multi_users_select]:n7,[b.ze.multi_conversations_select]:n7,[b.ze.multi_channels_select]:n7,[b.ze.multi_static_select]:n7,[b.ze.multi_external_select]:n7})[a]||n8);this.debouncers[t]=(0,m.A)(this.dispatchAction,n.debounceMs,n.config)}return this.debouncers[t](e)}getContainerKey(){let{blocks:e,remountOnUpdate:t}=this.props;if(!t||e===this.prevBlocks)return this.containerKey;try{this.containerKey=(0,rr.B)(JSON.stringify(e))}catch(e){this.props.logger.error(e)}return this.containerKey}dispatchAction(e){return this._isMounted&&this.setState(t=>{let a=t.actionErrors;return delete a[e.blockId],{loadingBlockIds:(0,u.A)(t.loadingBlockIds,[e.blockId]),errorBlockIds:(0,p.A)(t.errorBlockIds,[e.blockId]),actionErrors:a}}),this.props.onAction?.(e)?.then(()=>{this._isMounted&&this.setState(t=>({loadingBlockIds:(0,p.A)(t.loadingBlockIds,[e.blockId]),errorBlockIds:(0,p.A)(t.errorBlockIds,[e.blockId])}))}).catch(t=>{this._isMounted&&(this.props.logger.error(t),this.props.onActionsError(t),this.setState(a=>({loadingBlockIds:(0,p.A)(a.loadingBlockIds,[e.blockId]),errorBlockIds:(0,u.A)(a.errorBlockIds,[e.blockId]),actionErrors:{...a.actionErrors,[e.blockId]:t?.data?.message}})))})}msgActionClogger(e){this.props.clogger.track(F.EventId.MSG_ACTION,{...e})}blockKitClogger(e,t){let{clogger:a,serviceId:n,blocksContainerContext:r,containerId:i,appId:l}=this.props;this.msgActionClogger(t),a.track(e,(0,h.A)({contexts:{core:{app_id:l,bot_id:n}},app_id:l,bot_id:n,blocks_container_context:r,container_id:i},t))}clogLinkClick(e={}){let t={...e,type:"block_kit_link"};return this.props.clogLinkClick(t)}clogCitationImpression(e={}){let t={...e,type:"block_kit_citation_impression"};return this.props.clogCitationImpression(t)}handleExpandBlocksClick(e){this.props.blockLimit&&(this.setState(e=>({isExpanded:!e.isExpanded})),this.props.blocksContainerContext===x.pi.ai_app&&e.stopPropagation())}maybeRefocusOnPrevElement({prevActiveElement:e,prevBlockType:t,prevBlockIndex:a,prevFocusIndex:n}={}){if(!this.containerRef.current||void 0===a||void 0===n||document.activeElement&&document.activeElement!==document.body||document.body.contains(e||null)||this.props.isFocusTransitioning())return;if(e?.id){let t=document.getElementById(e.id);if(t)return void t.focus()}if(t!==this.props.blocks[a]?.type)return;let r=this.containerRef.current.childNodes[a];if(!r)return;let i=(0,g.Py)(r)[n];i&&i.nodeName===e?.nodeName&&i.getAttribute("role")===e?.getAttribute("role")&&i.focus()}renderExpandOrContractButton(e){let{blockLimit:t,blocks:a}=this.props;return void 0!==t&&a.length>t&&i.createElement(A.Nm,{className:"p-block_kit_renderer__expand_blocks",onClick:e},this.state.isBlockExpanded?rl.t("See less"):rl.t("See more"))}renderBlocks(e,t,a,n){let{blockLimit:r,onExpandBlocksClick:l,isInGroupBlock:s,blocksContainerContext:c,renderBlock:d,clogLinkClick:m,clogCitationImpression:u,clogger:p,blockKitLogPayload:h,containerActionsPayload:f,teamId:g,enterpriseId:y,resolveMissingBlock:x,dimmedUserIds:C,noTabbableContent:k,hideRichTextEmojiTooltips:v,isInAttachment:S,streaming:I,...w}=this.props,T=!!this.props.blocksProcessed,N=e||this.props.blocksProcessed||this.props.blocks;if(!N||0===N.length||this.state.replaceWithError||!c)return i.createElement(TopLevelErrorElement,null);N=(0,_.A)(N.map(e=>e&&e.type===b.WP.condition?(({conditionBlock:e,teamId:t,enterpriseId:a})=>{let evalCondition=e=>{switch(e.type){case"client":return"desktop"===e.value;case"content_type":return rn.includes(e.value);case"team":switch(e.op){case"=":return e.value===t||e.value===a;case"!=":return e.value!==t&&e.value!==a;default:return!1}default:return ra.error(`unknown block condition type ${e.type}`),!1}},n=e.cases.find(e=>e.conditions.every(evalCondition));return n?n.blocks:e.default})({conditionBlock:e,teamId:g,enterpriseId:y}):e)).filter(e=>null!=e);let M=void 0!==r&&N.length>r,R=this.state.isExpanded,P=-1;for(let e=N.length-1;e>=0;e--)if("rich_text"===N[e]?.type){P=e;break}let L=N.map((e,n)=>{if(M&&!R&&n>=r)return null;let l=this.props.blocksProcessed?e:(0,aU.t)(e,10),o=n3[l.type];if(!o)return x?x(l,this.renderBlocks):null;let s=l.blockId||n;I&&(s="streaming_key");let m=i.createElement(o,{key:s,...l,...(0,E.Rv)({loadingBlockIds:this.state.loadingBlockIds,errorBlockIds:this.state.errorBlockIds,actionErrors:this.state.actionErrors,blocksContainerContext:c,containerActionsPayload:f,blocksArePreProcessed:T,isEmojiTooltipHidden:v,isInAttachment:S,lastRichTextBlockIndex:P,...a,...w},l,n),onAction:a?.customOnAction||this.onAction,clogLinkClick:this.clogLinkClick,clogCitationImpression:this.clogCitationImpression,blockKitClogger:this.blockKitClogger,blockKitLogPayload:h,blockIndex:n,renderBlocks:this.renderBlocks,dimmedUserIds:C,noTabbableContent:k,streaming:I});return d(m,l,n,t)}),O=o()(this.props.className,"p-block_kit_renderer",{"p-block_kit_renderer--inline":this.props.inline});return!0===n?L:i.createElement("div",{key:this.getContainerKey(),ref:this.containerRef,className:O,"data-qa":"block-kit-renderer"},L,M?i.createElement(A.Nm,{className:"p-block_kit_renderer__expand_blocks","data-qa":"block_kit_block_truncation",onClick:this.handleExpandBlocksClick},R?rl.t("See less"):rl.t("See more")):null)}render(){return"function"==typeof this.props.children?this.props.children({renderBlocks:this.renderBlocks}):this.renderBlocks()}};ro.displayName="BlockKitRenderer";let rs=(0,M.N)((e,{appId:t})=>{let a="on"===(0,T._Z)(e,"workflow_process_precheck_in_trip_fe");return{clogger:(0,eD.eo)({state:e}),appId:t,logger:(0,ej.Ay)({state:e}),teamId:(0,nr.ZT)(e),enterpriseId:(0,nr.jV)(e),experimentWorkflowProcessPrecheckInTripFEGroupOn:a}},e=>({dispatchPruneBlockState:t=>e((0,ri.n)(t))}))((0,rt.A)((0,re.m)(ro,{name:"BlockKitRenderer"})))},0x10a6e6766:(e,t,a)=>{"use strict";a.d(t,{A:()=>L,Q:()=>renderMessageBlocks});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x854f5389),o=a(0x40c0d834),s=a(0xe874a88a),c=a(0x20b4dda68),d=a(0x5739d664),m=a(0x113cdbbd7),u=a(0x944e06df),p=a(0x1b56e521c),h=a(0x16cd5ae97),_=a(0x108430f6d),f=a(0x18cffe646),b=a(0x124f71042),g=a(0x184825275),y=a(0x1bd866cd7),A=a(0x21d6ed371),x=a(0xf0db20b2),E=a(0xd0109e4f),C=a(0x66a0f59a),k=a(0xd2efd513),v=a(0x94e8342),S=a(0x3711e82d),I=a(0x1c91944c9),w=a(0x9b971e7e),T=a(0x18476a827),N=a(0x14149c126),M=a(0xe684f705);let R=class extends n.Component{constructor(e){super(e);const{msg:t}=e;this.getContainerActionsPayload=(0,d.A)((e,t)=>({serviceId:e.bot_id,serviceTeamId:t,container:{type:m.pi.message,messageTs:e.ts,channelId:e.channel,isEphemeral:(0,A.aw)(e),...(0,A.aw)(e)&&e.thread_ts?{threadTs:e.thread_ts}:{}},functionExecutionId:e.function_execution_id}),2),this.shouldLog=!(0,k.A)(t)&&!(0,x.A)(t),this.getMessageContextProviderValue=(0,d.A)(this.getMessageContextProviderValue),this.suppressRichTextEditedLabel=!(0,v.A)(t.blocks,!1),!this.suppressRichTextEditedLabel&&(0,A.qL)(t)&&(this.suppressRichTextEditedLabel=e.blocksContainerContext===m.pi.ai_app),this.renderBlockWrapper=this.renderBlockWrapper.bind(this)}getContainerActionsPayload;shouldLog;suppressRichTextEditedLabel;getMessageContextProviderValue(e,t){return{channelId:e,ts:t}}handleAction=e=>{let{msg:t,serviceTeamId:a,dispatchSendActions:n}=this.props,r=this.getContainerActionsPayload(t,a);return t.bot_id?n({...r,actions:[e]}):s.S.resolve()};renderBlockWrapper(e,t,a){if(e.type===c.WP.prototype)return e;let r=i()("p-block_kit_renderer__block_wrapper",{"p-block_kit_renderer__block_wrapper--first":0===a}),l=e;return t.type===c.WP.rich_text&&(l=n.cloneElement(e,{suppressRichTextEditedLabel:this.suppressRichTextEditedLabel})),n.createElement("div",{key:t.blockId||a,className:r},l)}render(){let{msg:e,blocksContainerContext:t=m.pi.message,customFormatHandler:a,inline:r,serviceId:s,appId:c,serviceTeamId:d,clogLinkClick:g=l.A,blockLimit:y,experimentBkMixedRichTextFullWidthGroupOn:x,dimmedUserIds:k}=this.props,v=x?(0,E.A)(e,!0):(0,h.L)(e.blocks),I=i()("c-message__message_blocks",{"c-message__message_blocks--rich_text":v,"c-message__message_blocks--inline":r}),w=this.shouldLog?{blockKitAppId:c,blockKitBotId:s,surfaceType:S.SurfaceType.MESSAGE,surfaceId:e.ts,uuid:(0,_.l)(S.SurfaceType.MESSAGE,{channelId:e.channel,messageTs:e.ts,updatedMessageTs:(0,A.M8)(e)})}:{},T=this.getContainerActionsPayload(e,d),N=this.getMessageContextProviderValue(e.channel,e.ts);return n.createElement(o.A,{eventId:S.EventId.BK_USER_IMPRESSION,...w,clogImpression:this.shouldLog,screenTimeBeforeImpression:1e3,reclogImpression:6e4,disableAutoReferringUiContext:!0},n.createElement("div",{className:I,"data-qa":"message-text"},n.createElement(b.A.Provider,{value:N},n.createElement(p.A,{blocks:e.blocks,containerIdKey:(0,f.u)({...T?.container})},n.createElement(u.A,{blocks:e.blocks,blocksProcessed:e.blocksProcessed,onAction:this.handleAction,renderBlock:this.renderBlockWrapper,containerId:e.ts,customFormatHandler:a,blocksContainerContext:t,containerActionsPayload:T,inline:r,clogLinkClick:g,serviceId:s,isSlackbotMessage:(0,C.A)(e),channelId:e.channel,messageTs:e.ts,blockKitLogPayload:w,senderMemberId:e.user,blockLimit:y,dimmedUserIds:k,appId:c})))))}};function mapStateToProps(e,{msg:t}){let a,n,r,i="string"==typeof t.bot_id?(0,T.E6)(e,t):"",l=(0,w.ZT)(e);if(i){let o=(0,M.nv)(e,t.user);a=(0,y.AW)({bot:i,botProfile:t.bot_profile,member:o,currentTeamId:l}),i.id&&(n=i.id),i.app_id&&(r=i.app_id)}return{serviceTeamId:a,serviceId:n,appId:r,experimentBkMixedRichTextFullWidthGroupOn:"on"===(0,N._Z)(e,"bk_mixed_rich_text_full_width")}}function mapDispatchToProps(e){return{dispatchSendActions:t=>e((0,g.W)(t))}}R.displayName="MessageBlocksRenderer";let P=(0,I.N)(mapStateToProps,mapDispatchToProps)(R);function renderMessageBlocks(e){return n.createElement(P,{msg:e})}renderMessageBlocks.displayName="renderMessageBlocks";let L=P},0x1c5b5452b:(e,t,a)=>{"use strict";a.d(t,{Q:()=>n});let n=(0,a(0x12da80373).w)("render-message-blocks",()=>null,{useSingleton:!1})},0xa6133ba9:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x1cbdfeceb);let i=n.createContext({isStateEnabled:!0,showErrors:!1,serverErrors:{},setBlocksState:r.A})},0x221091ef3:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x1a256ff50),i=a(0xa6133ba9);let l={errors:{}};function BlocksErrorProvider({view:e,errorState:t,isStateEnabled:a=!0,showErrors:o=!1,serverErrors:s,children:c,blockToFocusAfterValidation:d,onError:m}){let[u,p]=(0,n.useState)(t);return(0,n.useEffect)(()=>{p(t)},[t]),n.createElement(i.A.Provider,{value:{view:e,errorState:u,isStateEnabled:a,serverErrors:s,showErrors:o,setBlocksState:({elementError:e})=>{if(!a)return;let n={...t?.errors||{}};Object.keys(e).forEach(t=>{e[t]?n[t]=e[t]:delete n[t]});let i={...t,errors:n};(0,r.kt)(i,l)&&(i=l),p(i),m?.(i)},blockToFocusAfterValidation:d}},c)}BlocksErrorProvider.displayName="BlocksErrorProvider";let o=BlocksErrorProvider},0x13f80610a:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x1cbdfeceb);let i=(0,n.createContext)({blocks:void 0,setBlocksStateGeneric:r.A,containerId:"",containerContext:void 0})},0x1b56e521c:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x13f80610a),l=a(0x1184a583d),o=a(0x1f75ad143),s=a(0x226892387),c=a(0xe9460abe),d=a(0x901ae535);function BlocksStateProvider({blocks:e,containerIdKey:t="",containerContext:a,children:m,onChange:u}){let p=(0,r.wA)(),h=(0,s.d4)(e=>(0,c.uz)(e,t)),_=(0,n.useCallback)(({containerId:t,blockId:a,actionId:n,blockState:r})=>{let i=r;if(!h){let t=(0,l.B)(e);i=(0,o.T)(t,r)}p((0,d.s)({containerId:t,blockId:a,actionId:n,blockState:i})),u?.(r)},[h,e,p,u]),f=(0,n.useMemo)(()=>({blocks:e,setBlocksStateGeneric:_,containerId:t,containerContext:a}),[e,_,t,a]);return n.createElement(i.A.Provider,{value:f},m)}BlocksStateProvider.displayName="BlocksStateProvider";let m=n.memo(BlocksStateProvider)},0x1184a583d:(e,t,a)=>{"use strict";a.d(t,{B:()=>getInitialBlockState});var n=a(0x20b4dda68),r=a(0x179bf3aea),i=a(0x10af3b48),l=a(0x113cdbbd7),o=a(0x2a3fb7ec);let isElementStateful=e=>(0,o.X)(l.JV,e&&Array.isArray(e)?e[0].type:e?.type);var s=a(0x1c7cb6e50);let getInitialBlockState=e=>{let t={};return e.forEach(e=>{let{type:a,block_id:l}=e;if(a===n.WP.section&&"accessory"in e&&e.accessory){if(!isElementStateful(e.accessory))return;t={...t,...(0,r.F)(e.accessory.type,l,e.accessory.action_id,(0,i.O)((0,s.A)(e.accessory)))}}else if(a===n.WP.actions&&"elements"in e){let a={};e.elements.forEach(e=>{if(!isElementStateful(e)||!l||!e.action_id)return;let{type:t,action_id:n}=e,r=(0,i.O)((0,s.A)(e));if(!r)return;let o={[l]:{...a[l],[n]:{type:t,...r}}};a={...a,...o}}),t={...t,...a}}else if(a===n.WP.input&&"element"in e){if(!isElementStateful(e.element))return;let{type:a,action_id:n}=e.element;t={...t,...(0,r.F)(a,l,n,(0,i.O)((0,s.A)(e.element)))}}}),t}},0x1552ed34f:(e,t,a)=>{"use strict";a.d(t,{H:()=>LegacyContainerIdProvider});var n=a(0xbad225b5);let r=n.createContext({containerId:""}),LegacyContainerIdProvider=({containerId:e,children:t})=>{let a=(0,n.useMemo)(()=>({containerId:e}),[e]);return n.createElement(r.Provider,{value:a},t)};LegacyContainerIdProvider.displayName="LegacyContainerIdProvider"},0x1abe989a0:(e,t,a)=>{"use strict";a.d(t,{Av:()=>l,Di:()=>d,NW:()=>o,Ot:()=>i,P$:()=>addActionIdsToActionsBlock,_x:()=>p,hE:()=>m,kP:()=>c,q$:()=>u,zg:()=>s});var n=a(0x20b4dda68),r=a(0xd8d34930);n.WP.actions,(0,r.bW)(),(0,r.bW)(),(0,r.bW)();let i={type:n.WP.actions,elements:[(0,r.fX)(),(0,r.h9)(),(0,r.v7)(),(0,r.t6)()]},l={type:n.WP.actions,elements:[(0,r.Au)("G12345678"),(0,r.Ao)("U12345678"),(0,r.sJ)("C12345678")]},o={type:n.WP.actions,elements:[(0,r.D)()]},s={type:n.WP.actions,elements:[(0,r.su)("Farmhouse"),(0,r.Rp)(void 0,{text:(0,r.jm)("Kin Khao")}),(0,r.Rp)(void 0,{text:(0,r.jm)("Ler Ros")})]};n.WP.actions,(0,r.vV)(),(0,r.hC)(),(0,r.bW)(),(0,r.bW)(),(0,r.bW)();let c={type:n.WP.actions,elements:[(0,r.VH)(),(0,r.VN)()]},d={type:n.WP.actions,elements:[(0,r.vV)(),(0,r.vV)()]},m={type:n.WP.actions,elements:[(0,r.bW)()]},u={type:n.WP.actions,elements:[(0,r.CJ)()]},p={type:n.WP.actions,elements:[(0,r.Im)(),(0,r.bW)()]},addActionIdsToActionsBlock=e=>{let t=e.elements.map((e,t)=>({...e,action_id:`actionId-${t}`}));return{...e,elements:t}}},0x9698909d:(e,t,a)=>{"use strict";a.d(t,{P:()=>Callout});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20b4dda68),o=a(0x226892387),s=a(0x14149c126),c=a(0x10872dea8),d=a.n(c);let Callout=({childBlocks:e,backgroundColor:t="green",renderBlocks:a})=>{if(!(0,o.d4)(e=>"on"===(0,s._Z)(e,"callout_block_fe")))return null;let r=i()(d().calloutBlock,(e=>{switch(e){case"indigo":return d().calloutBlockIndigo;case"blue":return d().calloutBlockBlue;case"jade":return d().calloutBlockJade;case"pink":return d().calloutBlockPink;case"gray":return d().calloutBlockGray;case"purple":return d().calloutBlockPurple;case"orange":return d().calloutBlockOrange;case"brown":return d().calloutBlockBrown;default:return d().calloutBlockGreen}})(t));return n.createElement("div",{className:r,"data-qa":"bk_callout_block"},e?.length&&e?.length>0?a(e,l.WP.callout):n.createElement("div",{className:d().calloutBlockEmpty}))};Callout.displayName="Callout"},0x253b7a8f3:(e,t,a)=>{"use strict";a.d(t,{A:()=>ChannelSetWithErrorBoundary});var n,r,i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0x120c268ad),s=a.n(o),c=a(0xf27817c9),d=a(0x1f355b555),m=a(0x1df96de4c),u=a(0x20482ad21),p=a(0x113cdbbd7),h=a(0x11a296110),_=a(0x2501a2cee),f=((n={}).ACCEPTED="accepted",n.INVITED="invited",n.EXPIRED="expired",n.PUBLIC_ONLY="public_only",n),b=((r={}).GENERIC="generic",r.NO_CHANNELS_INSERTED="no_channels_inserted",r.NONE="none",r),g=a(0x3711e82d);let y=new u.Ay("shareable_channel_sets"),ChannelSetActions=({addingToHome:e,channelSetInviteState:t,onAddToHomeClick:a,channelSectionWithNameAlreadyExists:n})=>{let r,l={eventId:n?g.EventId.ADD_SHARED_CHANNEL_SECTION_CLICK_NAME_CLASH:g.EventId.ADD_SHARED_CHANNEL_SECTION_CLICK,elementType:g.ElementType.BUTTON,elementName:"add_section_to_sidebar",onClick:{enableClogAction:!0},clogImpression:!1};switch(t){case f.ACCEPTED:r=i.createElement(h.Ay,{"data-qa":"shared-set-accepted-channel-new-section",autoClogProps:l,disabled:!0,className:"p-channel_set_block__accepted_actions"},i.createElement(_.Ah,{inline:!0,name:"check-circle",size:"20"}),y.t("Added",{fallbackHash:"61a0572c4893ef34311320d84c82df88bea83e11"}));break;case f.INVITED:case f.EXPIRED:case f.PUBLIC_ONLY:default:r=i.createElement(h.lV,{onClick:a,"data-qa":"shared-set-join-channel-new-section",autoClogProps:l,loading:e,className:"p-channel_set_block__accepted_actions"},i.createElement(_.Ah,{inline:!0,name:"plus",size:"20"}),y.t("Add Section",{fallbackHash:"f41d2aa63693dee5ec5446af09ebfea508f0f26c"}))}return i.createElement("div",{className:"p-channel_set_block__actions"},r)};ChannelSetActions.displayName="ChannelSetActions";let A=new u.Ay("shareable_channel_sets"),ChannelSetFooter=({channelSetAgeInDays:e,channelSetInviteState:t,noChannelsAvailableToJoin:a,acceptanceError:n})=>{let r=(()=>{if(n===b.GENERIC)return A.t("Something went wrong. Please try again.");if(n===b.NO_CHANNELS_INSERTED)return A.t("Can\u2019t be accepted. Try any public channels individually, or ask for a new invite.");if(a)return A.t("The channels in this section aren\u2019t available anymore, but you can request a new invite.");switch(t){case f.INVITED:{let t=14-e;switch(t){case 0:return A.rt("Private channel invitations expire <strong>today</strong>.",{daysRemaining:t});case 1:return A.rt("Private channel invitations expire <strong>tomorrow</strong>.",{daysRemaining:t});default:return A.rt("Private channel invitations expire in <strong>{daysRemaining} days.</strong>",{daysRemaining:t})}}case f.EXPIRED:return A.t("Private channel invitations have expired");case f.ACCEPTED:case f.PUBLIC_ONLY:default:return""}})();if(!r)return null;let l=n!==b.NONE;return i.createElement("div",{className:s()("p-channel_set_block__footer",{"p-channel_set_block__error":l,"p-channel_set_block__footer--no-channels-available":a&&!l}),"data-qa":"shared-set-footer"},l?i.createElement("div",{className:"p-channel_set_block__footer_content"},i.createElement(_.Ah,{size:"18",inline:!0,name:"info","data-qa":"shared-set-footer-error-icon"}),r):r)};ChannelSetFooter.displayName="ChannelSetFooter";var x=a(0xbe5e39b6),E=a(0x22b8621cf),C=a(0x11c86845f),k=a(0x99233ecb),v=a(0x1fdec3e16),S=a(0x1180921cd),I=a(0x9edd91a2),w=a(0x1b3ecb90f),T=a(0xf54a24af);let N=new u.Ay("shareable_channel_sets"),M={name:"ellipsis-vertical-filled",size:"20"},R={name:"share-message",size:"20"},P={eventId:g.EventId.CUSTOMIZE_CHANNEL_SECTION_CLICK,elementType:g.ElementType.BUTTON,elementName:"customize_channel_section",onClick:{enableClogAction:!0},clogImpression:!0},L={eventId:g.EventId.CHANNEL_SECTION_COPY_LINK_CLICK,elementType:g.ElementType.BUTTON,elementName:"channel_section_copy_link",onClick:{enableClogAction:!0},clogImpression:!0},O={eventId:g.EventId.CHANNEL_SECTION_RESHARE_CLICK,elementType:g.ElementType.BUTTON,elementName:"customize_channel_section",onClick:{enableClogAction:!0},clogImpression:!0},ChannelSetHeading=({channelSetName:e,emoji:t,onCustomizeSectionClick:a,channelSetInviteState:n,isSender:r,isHovered:o,channelIds:c,experimentSharedSectionsFollowupsGroupOn:d})=>{let m=(0,l.wA)(),u=(0,i.useCallback)(()=>{m((0,I.k)({sectionName:e,channels:c,emoji:t}))},[c,e,m,t]),p=(0,i.useMemo)(()=>{let e=[];return n===f.ACCEPTED||r||e.push({key:"customize-section",label:N.t("Edit section"),click:a,autoClogProps:P,icon:i.createElement(_.Ah,{name:"edit",size:"20"})}),d&&e.push({key:"copy-section",label:d?N.t("Copy section"):"",description:d?i.createElement(S.I,{text:N.t("Private channels won\u2019t be visible to people who aren\u2019t already in them")}):"",classNameListItem:"p-channel_set_block__copy_section_description",click:u,autoClogProps:L,icon:i.createElement(_.Ah,{name:"link",size:"20"})}),e},[n,d,r,u,a]),h=N.t("More actions"),b=(0,i.useCallback)(e=>i.createElement(k.a,{...e,width:240,template:p}),[p]),g=(0,i.useCallback)(()=>{m((0,T.y)({channelSectionName:e??"",channelIdsIncludedInSection:c,emoji:t,isReshare:!0}))},[m,e,c,t]),y=p.length>0||d;return i.createElement("div",{className:"p-channel_set_block__heading"},i.createElement("div",{className:"p-channel_set_block__heading_icon"},t?i.createElement(w.Ay,{className:"p-channel_set_block__heading_icon_size_override",emojiSize:w.lw.MEDIUM,text:t}):i.createElement(_.Ah,{name:"section",size:"20"})),i.createElement("div",null,i.createElement(v.A,{lines:2,withTooltip:!0},i.createElement("div",{className:"p-channel_set_block__heading_name"},e)),i.createElement("div",{className:"p-channel_set_block__heading_channels_count"},N.t("Channel section"))),y&&i.createElement("div",{className:s()("p-channel_set_block__heading_menu",{"p-channel_set_block__heading_menu_show":o})},i.createElement(C.A,null,d&&i.createElement(E.A,{"aria-label":d?N.t("Share section"):"Share section",tooltipLabel:d?N.t("Share section"):"Share section",onClick:g,svgIconProps:R,menuPosition:x.yX.BottomRight,autoClogProps:O}),p.length>0&&i.createElement(E.A,{"aria-label":h,tooltipLabel:h,isMenuTrigger:!0,renderMenu:b,svgIconProps:M,menuPosition:x.yX.BottomRight}))))};ChannelSetHeading.displayName="ChannelSetHeading";var D=a(0x929dab3a),F=a(0x1cefa8f4c),U=a(0xa6f3163b),B=a(0x128d54e52),H=a(0x4c96e5d9),W=a(0x15bd59d31),V=a(0xadd564f8),G=a(0x12185e091),q=a(0x53f531a4);let j=new u.Ay("shareable_channel_sets"),z={bounce:0,duration:.2,type:"spring"},K={collapsed:{height:0,overflow:"hidden"},expanded:{height:"auto",overflow:"hidden"}};function ChannelSetList({channelSetRows:e,onChannelClick:t,erroredKnownChannelIds:a,erroredUnknownChannelCount:n,channelSetInviteState:r,channelSetName:l}){let o,c=e.length>5,[d,m]=(0,i.useState)(!0),[u,p]=(0,i.useMemo)(()=>c?[e.slice(0,4),e.slice(4)]:[e,[]],[e,c]);c&&(o=d?j.t("Show {remainingCount} more",{remainingCount:e.length-u.length}):j.t("Show less"));let h=(0,i.useCallback)(e=>{let t=(0,q.j)(e);if(t){if((0,G.Zp)(e)){let e=j.t("private");return`${t} (${e})`}return t}},[]),b=(0,i.useCallback)(()=>{m(!d)},[d]);function renderRow(e){let l=j.t("Unable to join this channel. Permissions likely changed so try asking for a new invite.");switch(e.type){case"channel":{let n=a&&a.includes(e.channel.id);return i.createElement(V.A,{id:e.channel.id},i.createElement(U.A,{"data-channel-id":e.channel.id,onClick:n?void 0:t,className:s()("p-channel_set_block__item",{"p-channel_set_block__error":n}),"aria-label":h(e.channel)},i.createElement(W.A,{channel:e.channel,showTruncatedChannelNameTooltip:!0,className:"p-channel_set_block__padding",secondaryContent:n?i.createElement(H.Ay,{tip:l},i.createElement(_.Ah,{size:"18",inline:!0,name:"info"})):void 0})))}case"new_private":{let t=!!n,a=r===f.INVITED,o=j.t("See details about {numChannels, plural, =1 {this private channel} other {these private channels}} after joining.",{numChannels:e.count}),c=j.t("You\u2019ll need to receive an invite to {numChannels, plural, =1 {this private channel} other {these private channels}}.",{numChannels:e.count}),d=j.t("{numChannels} new private {numChannels, plural, =1 {channel} other {channels}}",{numChannels:e.count}),m=j.t("{numChannels} {numChannels, plural, =1 {channel} other {channels}} can\u2019t be joined",{numChannels:e.count});return i.createElement(H.Ay,{tip:a?o:c},i.createElement("div",{className:s()("p-channel_set_block__item p-channel_set_block__padding",{"p-channel_set_block__error":t})},i.createElement(_.Ah,{size:"18",inline:!0,name:"lock"}),i.createElement(B.CG,{className:"p-channel_set_block__generic_item_label"},a?d:m),t&&i.createElement(H.Ay,{tip:l},i.createElement(_.Ah,{size:"18",inline:!0,name:"info"}))))}default:return null}}function renderRows(e){return e.map(e=>{let t="channel"===e.type?e.channel.id:`${e.type}`;return i.createElement("div",{key:t,role:"group","aria-label":j.t("Shared channel section {name}",{name:l,fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368"})},renderRow(e))})}return renderRow.displayName="renderRow",renderRows.displayName="renderRows",i.createElement("div",{className:"p-channel_set_block__channels_list"},renderRows(u),i.createElement(D.N,null,p.length>0&&!d&&i.createElement(F.P.div,{animate:"expanded",exit:"collapsed",initial:"collapsed",transition:z,variants:K},renderRows(p))),c&&i.createElement(U.A,{className:"p-channel_set_block__button",onClick:b},i.createElement("div",{className:"p-channel_set_block__item p-channel_set_block__padding"},i.createElement(_.Ah,{size:"18",inline:!0,name:"ellipsis-horizontal-filled"}),i.createElement(B.CG,{className:"p-channel_set_block__generic_item_label"},o))))}ChannelSetList.displayName="ChannelSetList";var $=a(0x2172ff7ff);function getChannelSetContentRows({knownChannels:e,numChannels:t}){let a=e.sort(contentChannelRowSorter).map(e=>({type:"channel",channel:e})),n=Math.max(0,t-e.length);return n>0&&a.push({type:"new_private",count:n}),a}function contentChannelRowSorter(e,t){return(0,G.Zp)(e)&&!(0,G.Zp)(t)?1:!(0,G.Zp)(e)&&(0,G.Zp)(t)?-1:(0,$.Ay)(e.name,t.name)}var Y=a(0x22c5d61d5),Q=a(0xfadc3278),Z=a(0x18def662b),J=a(0x18c2d4c6f),X=a(0x124f71042),ee=a(0x81187f00),et=a(0x1a02c72b5),ea=a(0xd6a16321),en=a(0x23255e234),er=a(0x143fb6398),ei=a(0x45012309),el=a(0x1ec68d6a3),eo=a(0x23409b80b),es=a(0x226892387),ec=a(0x19c76d181),ed=a(0x1529cf960),em=a(0x1380694ee),eu=a(0x217553e42),ep=a(0xe684f705),eh=a(0xd93ecf94);let e_=new u.Ay("shareable_channel_sets");function ChannelSet(e){let t,a=(0,es.d4)(Z.QT),n=(0,es.d4)(Z.aL),r=(0,l.wA)(),o=(0,es.d4)(e=>(0,ei.eo)({state:e})),u=(0,es.d4)(el.Ay),h=(0,i.useContext)(X.A),[_,y]=(0,i.useState)(!1),[A,x]=(0,i.useState)(b.NONE),E=h.channelId,C=n?e.destinationChannelId??E:E,k=h.ts,v=(0,es.d4)(e=>(0,eu.OL)(e,E)),S=(0,es.d4)(e=>(0,em.dR)(e,C,k)),I=e?.linkId,w=!!I,T=S?.erroredKnownChannelIds||[],N=S?.erroredUnknownChannelCount||0;k&&C&&(t={ts:k,channelId:C},I&&(t.linkId=I));let M=(0,es.d4)(ec.WR),R=(0,es.d4)(ep.cA),P=(0,en.Ez)(R)||(0,en.Yd)(R),L=(0,es.d4)(e=>k&&C&&(0,eh.Ld)(e,C,k)),{knownChannels:O,unknownChannelCount:D,privateChannelCount:F}=(0,es.Z2)((0,i.useCallback)(t=>{let a=[],n=0,r=0;return e.channelIds?.forEach(e=>{let i=(0,eu.OL)(t,e);i&&!(0,G.Zx)(i)?(a.push(i),(0,G.Zp)(i)&&(r+=1)):n+=1}),{knownChannels:a,unknownChannelCount:n,privateChannelCount:r}},[e.channelIds])),{acceptedUserIds:U=m.Ml,targetUserIds:B=m.Ml}=e,H=L&&L?.user,W=(0,i.useMemo)(()=>!!B.find(e=>e===M),[B,M]),V=(0,i.useMemo)(()=>!!U.find(e=>e===M),[U,M]),q=D>0,j=H===M,z=(0,i.useMemo)(()=>{if(k){let e=(0,d.Ay)(),t=d.Ay.unix(Number(k));return e.diff(t,"day")}return 0},[k]),K=(0,i.useMemo)(()=>I?f.PUBLIC_ONLY:V?f.ACCEPTED:q&&W||j&&F?z>14?f.EXPIRED:f.INVITED:f.PUBLIC_ONLY,[V,q,W,j,F,z,I]),$=(0,i.useMemo)(()=>getChannelSetContentRows({knownChannels:O,numChannels:e.channelIds?.length??0}),[O,e.channelIds?.length]),J=(0,i.useMemo)(()=>O.map(e=>e.id),[O]),ef=Object.values((0,es.d4)(em.jV)).find(t=>t.name===e.channelSetName),eb=(0,i.useCallback)((e,t)=>{t&&r((0,ee.s)({viewId:e})),r((0,et.o)((0,ea.pr)(e)))},[r]),eg=(0,i.useCallback)(e=>{let t=e.currentTarget.getAttribute("data-channel-id");t&&(e.preventDefault(),eb(t,e.shiftKey))},[eb]),ey=(0,i.useCallback)(()=>{r((0,Q.i)({action:Y.TH.CREATE_AND_MOVE_SHARED_SECTION,channelIds:J,initialText:e.channelSetName||"",initialEmoji:e.emoji,enablePrePopulatedSectionNames:!0,isNewSectionFromSharedChannelSectionAttachment:!0,sharedChannelSectionArgs:t,isSharedChannelSectionNameTaken:!!ef,arePrivateChannelsJoinable:K===f.INVITED,unknownChannelCount:D,knownPrivateChannelCount:F,defaultAttachedChannelCount:e.channelIds?.length||0,isLinkUnfurl:w}))},[r,J,e.channelSetName,e.emoji,e.channelIds?.length,t,ef,K,D,F,w]),eA=(0,i.useCallback)(async()=>{try{y(!0),A&&x(b.NONE),o.track(g.EventId.ADD_SHARED_CHANNEL_SECTION_CLICK,{knownChannelsCount:J.length,unknownChannelCount:D,knownPrivateChannelCount:F,defaultAttachedChannelCount:e.channelIds?.length||0,isLinkUnfurl:w}),await r((0,eo.A)({channelIds:J,name:e.channelSetName,emoji:e.emoji,isNewSectionFromSharedChannelSectionAttachment:!0,sharedChannelSectionArgs:t,reason:"add-shared-channel-section"})).then(e=>{r((0,ed.jq)({sharedChannelSectionArgs:t,errors:e?.acceptanceErrors??{}}))}).catch(e=>{`${e}`.includes("no_channels_to_insert")?x(b.NO_CHANNELS_INSERTED):x(b.GENERIC)})}catch(e){u.error(e,void 0,{subtype:"sidebar-systems-add-shared-channel-section-to-home"})}finally{y(!1)}},[A,o,J,D,F,e.channelIds?.length,e.channelSetName,e.emoji,r,t,u,w]),ex=(0,i.useCallback)(()=>{ef?ey():eA()},[eA,ey,ef]);if(!a||P||!e.channelId&&!n||L&&!L?.attachments&&!n||(0,er.ju)(v))return i.createElement("div",{"data-qa":"bk_block_channel_set_fallback"},i.createElement("small",{className:"p-channel_set_block__fallback__message"},e_.t("We\u2019re working on something magical. You don\u2019t have access to this feature just yet.")));let eE=(e.blocksContainerContext===p.pi.message_attachment||e.blocksContainerContext===p.pi.thread||e.blocksContainerContext===p.pi.share_dialog&&n||e.blocksContainerContext===p.pi.quip_unfurl&&n)&&!e.isChannelSetPreview;return i.createElement(c.A,null,({isHovered:t,hoverProps:a,ref:r})=>i.createElement("div",{className:s()("p-channel_set_block",{"p-channel_set_block__canvas_unfurl":e.blocksContainerContext===p.pi.quip_unfurl}),ref:r,...a,role:"group","aria-label":e_.t("Shared channel section {name}",{name:e.channelSetName,fallbackHash:"5e9b888438eb8963c7b4d39544fca47adf762368"})},i.createElement(ChannelSetHeading,{channelSetName:e.channelSetName,emoji:e.emoji,onCustomizeSectionClick:ey,channelSetInviteState:K,isSender:j,isHovered:t,channelIds:J,experimentSharedSectionsFollowupsGroupOn:n}),$.length>0&&i.createElement(i.Fragment,null,i.createElement(ChannelSetList,{channelSetRows:$,onChannelClick:eg,erroredKnownChannelIds:T,erroredUnknownChannelCount:N,channelSetInviteState:K,channelSetName:e.channelSetName}),eE&&i.createElement(ChannelSetActions,{addingToHome:_,channelSetInviteState:K,onAddToHomeClick:ex,channelSectionWithNameAlreadyExists:!!ef})),eE&&i.createElement(ChannelSetFooter,{channelSetAgeInDays:z,channelSetInviteState:K,noChannelsAvailableToJoin:0===$.length,acceptanceError:A})))}function ChannelSetWithErrorBoundary(e){return i.createElement(J.A,{subtype:"sidebar-systems-channel-set"},i.createElement(ChannelSet,e))}ChannelSet.displayName="ChannelSet",ChannelSetWithErrorBoundary.displayName="ChannelSetWithErrorBoundary"},0x1f35a0f5:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);let Divider=({isInGroupBlock:e})=>{let t=i()("p-divider_block",{"p-divider_block--group":e});return n.createElement("div",{"data-qa":"bk_divider_block",className:t})};Divider.displayName="Divider";let l=Divider},0x143e03a71:(e,t,a)=>{"use strict";a.d(t,{JS:()=>handleConnectToCalendarClickClog,U6:()=>handleCopyToCalendarClickClog,ZK:()=>handleViewInCalendarMenuClickClog,bY:()=>handleRsvpClickClog,qK:()=>handleJoinCallClickClog});var n=a(0x3711e82d),r=a(0x1ec68d6a3);let i={accepted:"yes",declined:"no",tentative:"maybe",needs_action:"needs_action"},handleClog=(e,{uiArgs:t,uiProperties:a={},appType:i,details:l={}})=>{try{e.track(n.EventId.EVENT_BLOCK,{contexts:{ui_context:{...t,ui_properties:{...a}},calendar_app_name:i,...l}})}catch(e){(0,r.Wo)().error("EVENT BLOCK",`error sending clog ${e}`)}},handleViewInCalendarMenuClickClog=(e,{appType:t})=>((e,{appType:t,menuItemName:a})=>{handleClog(e,{uiArgs:{action:n.UiAction.CLICK,step:n.UiStep.EVENT_INFO},uiProperties:{element_name:a,element_type:n.ElementType.MENU},appType:t})})(e,{appType:t,menuItemName:"view_in_calendar"}),handleRsvpClickClog=(e,{appType:t,rsvpOption:a})=>{handleClog(e,{uiArgs:{action:n.UiAction.CLICK,step:n.UiStep.EVENT_RSVP},uiProperties:{element_name:i[a],element_type:n.ElementType.BUTTON},appType:t})},handleCopyToCalendarClickClog=(e,{appType:t})=>{handleClog(e,{uiArgs:{action:n.UiAction.CLICK,step:n.UiStep.EVENT_ACTION},uiProperties:{element_name:"copy_to_calendar",element_value:"calendar",element_type:n.ElementType.BUTTON},appType:t})},handleJoinCallClickClog=(e,{appType:t,callingAppName:a})=>{handleClog(e,{uiArgs:{action:n.UiAction.CLICK,step:n.UiStep.EVENT_ACTION},uiProperties:{element_name:"join_call",element_value:a,element_type:n.ElementType.BUTTON},appType:t})},handleConnectToCalendarClickClog=(e,{appType:t})=>{handleClog(e,{uiArgs:{action:n.UiAction.CLICK,step:n.UiStep.CALENDAR_AUTH},uiProperties:{element_name:"connect_calendar",element_value:t,element_type:n.ElementType.BUTTON},appType:t})}},0x1867bf0de:(e,t,a)=>{"use strict";a.d(t,{E:()=>r});var n,r=((n={}).gcal="Google",n.ocal="Outlook",n.ocal_gcc="Outlook Calendar GCC High",n)},0x13c7d13c1:(e,t,a)=>{"use strict";a.d(t,{A:()=>q,n:()=>renderMessageBlock});var n=a(0xbad225b5),r=a(0xe747dd27),i=a(0xb2e9dfa8),l=a(0x19683d73f),o=a(0x16bf7293e),s=a(0x20679dcfc),c=a(0x16e65360b);function MessageBlockDocumentUnfurl({message:e}){let t=e.attachments?e.attachments[0]:void 0;if(!t)return null;if((0,c.B)(t)){let a=(0,o.A)((0,r.XK)(t.blocks?.[0]||{}));return n.createElement("div",{className:"p-message_block_document_unfurl_shortcut"},n.createElement(l.Ay,{shortcutInfo:a,hermesLinkTriggerUIContext:{location:"canvas",canvasId:(0,s.l)(e.channel)},ariaDescribedById:`share_shortcut_${a.workflowId}`}))}let a=t.ts,d=t.channel_id;return n.createElement(i.A,{className:"p-message_block_document_unfurl",unfurl:t,ts:a,channelId:d,isLoading:!1})}MessageBlockDocumentUnfurl.displayName="MessageBlockDocumentUnfurl";var d=a(0xa361c357),m=a(0x1991a9b6d),u=a(0x136bf21),p=a(0x120c268ad),h=a.n(p),_=a(0x1480e7c40),f=a(0x17294c72a),b=a(0x2047dec93),g=a(0x20ef3966f),y=a(0x20482ad21),A=a(0x1b3ecb90f),x=a(0x1d37f5c8a),E=a(0x1c91944c9),C=a(0x1beeaa71e);let k=new y.Ay("message_kit"),v=class extends n.PureComponent{getReactions(){let{msg:e,reactions:t}=this.props;return t||e.reactions}render(){let e=this.getReactions();if(!e||0===e.length)return null;let t=(0,_.A)((0,f.A)(e,"count"),2),a=(0,b.A)(e,"count"),r=null;a>0&&(r=n.createElement("span",{className:"c-message_kit__reaction_condensed__reactions_count"},k.t("{totalReactionCount, plural, =1 {# reaction} other {# reactions}}",{totalReactionCount:a,fallbackHash:"12c03934cd5355b162026c4dea5c5090aec101ef",fallbackHashNs:"search"})));let i=h()(this.props.className,"c-message_kit__reaction_condensed c-message_kit__reaction_condensed--reactions");return n.createElement("div",{className:i},(0,g.A)(t,e=>n.createElement(A.Ay,{text:`:${e.name}:`,key:e.name,emojiSize:A.lw.SMALL})),r)}};v.displayName="CondensedReactionBar";let S=(0,E.N)((e,t)=>{let{msg:a}=t;if(!a)return null;let n=(0,x.J)(a);return{reactions:(0,C.bk)(e,n)}})(v);var I=a(0x807220a2),w=a(0x19bf376f9),T=a(0x16cf1da63),N=a(0xa6f3163b),M=a(0x15f8e452a),R=a(0x21d6ed371),P=a(0x5a0401a4);let L=new y.Ay("message_kit"),O=(0,n.memo)((0,I.Ar)()?e=>{let t,a,r,i,l=(0,w.c)(18),o=(0,T.wA)(),{msg:s,flexOrigin:c,flexOriginId:d,className:m}=e;l[0]!==s?(t=s??{},l[0]=s,l[1]=t):t=l[1];let{channel:u,ts:p}=t;l[2]!==u||l[3]!==o||l[4]!==c||l[5]!==d||l[6]!==p?(a=()=>{u&&p&&o((0,P.A)({channelId:u??null,threadTs:p??null,origin:c,originId:d}))},l[2]=u,l[3]=o,l[4]=c,l[5]=d,l[6]=p,l[7]=a):a=l[7];let _=a;l[8]!==m?(r=h()(m,"c-message_kit__replies_count"),l[8]=m,l[9]=r):r=l[9];let f=r;if(l[10]!==f||l[11]!==s||l[12]!==_){i=Symbol.for("react.early_return_sentinel");e:{let e=(0,R.UV)(s??void 0);if(e){let t,a;l[14]!==f||l[15]!==_?(t={className:f,onClick:_},l[14]=f,l[15]=_,l[16]=t):t=l[16],l[17]===Symbol.for("react.memo_cache_sentinel")?(a=n.createElement(M.A,{type:"comment-alt"}),l[17]=a):a=l[17],i=n.createElement(N.A,t,a,L.t("{replyCount, plural, =1 {# reply} other {# replies}}",{replyCount:e}));break e}}l[10]=f,l[11]=s,l[12]=_,l[13]=i}else i=l[13];return i!==Symbol.for("react.early_return_sentinel")?i:null}:e=>{let t=(0,T.wA)(),{msg:a,flexOrigin:r,flexOriginId:i,className:l}=e,{channel:o,ts:s}=a??{},c=(0,n.useCallback)(()=>{o&&s&&t((0,P.A)({channelId:o??null,threadTs:s??null,origin:r,originId:i}))},[o,s,r,i,t]),d=h()(l,"c-message_kit__replies_count"),m=(0,R.UV)(a??void 0);return m?n.createElement(N.A,{className:d,onClick:c},n.createElement(M.A,{type:"comment-alt"}),L.t("{replyCount, plural, =1 {# reply} other {# replies}}",{replyCount:m})):null});var D=a(0x1c8ee22b5),F=a(0x8c0f4d3),U=a(0xca4f3cec),B=a(0x19a6a6f6a),H=a(0x170214077),W=a(0xf271ff9b),V=a(0x226892387),G=a(0xd93ecf94);let Message=({channelId:e,timestamp:t,blocksContainerContext:a})=>{let r=(0,V.d4)(a=>(0,G.Ld)(a,e,t));if(!r)return null;if((0,R.Cy)(r))return n.createElement(MessageBlockDocumentUnfurl,{message:r});let i=n.createElement(n.Fragment,null,n.createElement(B.A,{msg:r}),n.createElement(m.A,{msg:r})),l=r.attachments&&r.attachments.length,o=r.reply_count&&r.attachments&&r.attachments.length,s=(0,R.ow)(r);return n.createElement(W.A,{msg:r},n.createElement("div",{"data-qa":"bk_message_block","data-needs-load":!!s||void 0},n.createElement(d.A,{msg:r,size:16,className:"c-message_attachment__author_icon"}),n.createElement(U.A,{msg:r}),"\xa0\xa0",n.createElement(H.A,{msg:r,full:!0}),n.createElement("br",null),i,n.createElement(u.A,{msg:r}),n.createElement(D.A,{msg:r,blocksContainerContext:a}),n.createElement(F.A,{msg:r}),n.createElement("div",{className:"p-starred_item_message__reactions_and_replies"},n.createElement(S,{msg:r}),n.createElement(O,{msg:r}),l?n.createElement("span",{className:"c-message_kit__replies_count"},o?n.createElement("span",null,"\xa0\xa0|\xa0\xa0"):null):null)))};function renderMessageBlock(e){return n.createElement(Message,e)}Message.displayName="Message",renderMessageBlock.displayName="renderMessageBlock";let q=n.memo(Message)},0x1933cd2d2:(e,t,a)=>{"use strict";a.d(t,{f:()=>isThinkingStepsBlocksEnabled});var n=a(0x14149c126);let isThinkingStepsBlocksEnabled=e=>"on"===(0,n._Z)(e,"pcx_thinking_steps_blocks")},0x200b519b5:(e,t,a)=>{"use strict";a.d(t,{h:()=>PlanBlock});var n=a(0xbad225b5),r=a(0x20b4dda68),i=a(0x20482ad21),l=a(0x18ee7321c),o=a(0x11243fb75),s=a(0x1b50b0090),c=a(0x1933cd2d2),d=a(0x10b0baa82),m=a(0xb7b18ffa),u=a(0x1cc66dceb),p=a(0x238b287cf),h=a(0x3711e82d),_=a(0x226892387),f=a(0x1e766438b),b=a.n(f);let g=new i.Ay("thinking_steps"),PlanBlock=({title:e,tasks:t,renderBlocks:a,appId:i,messageTs:f})=>{let y=(0,p.A)(),A=(0,_.d4)(c.f),x=(0,n.useMemo)(()=>t.some(e=>e.status===u.cl.InProgress||e.status===u.cl.Pending)?u.cl.InProgress:t.some(e=>e.status===u.cl.Error)?u.cl.Error:u.cl.Complete,[t]),E=(0,n.useMemo)(()=>t.length>0,[t]),C=(0,n.useMemo)(()=>t.map(e=>({id:e.taskId,title:e.title,status:e.status,details:e.details,output:e.output,sources:e.sources})),[t]),k=(0,n.useMemo)(()=>({app_id:i,message_ts:f}),[i,f]),v=(0,n.useCallback)(()=>{y.track(h.EventId.BK_USER_INTERACTION,{...k,contexts:{ui_context:{action:h.UiAction.CLICK,ui_element:h.UiElement.BK_PLAN_SOURCE}}})},[y,k]),S=(0,n.useCallback)(e=>{let t=`task-details-${e.id}`,i=`task-output-${e.id}`,l=`task-sources-${e.id}`,s=[e.details?t:null,e.output?i:null,e.sources?.length?l:null].filter(Boolean).join(" ");return n.createElement(o.A,{id:e.id,"aria-label":e.title,"aria-describedby":s},n.createElement(d.L,{item:e,blockType:r.WP.plan,renderBlocks:a,detailsId:t,outputId:i,sourcesId:l,onSourceClick:v}))},[a,v]),I=(0,n.useCallback)((e,t)=>{y.track(h.EventId.PLAN_BLOCK_INTERACTION,{...k,contexts:{ui_context:{action:e?h.UiAction.COLLAPSE:h.UiAction.EXPAND}}}),t()},[y,k]);return n.createElement(s.M,{initialHeight:40,className:b().block},({isExpanded:t,toggle:a})=>n.createElement(n.Fragment,null,n.createElement(m.s,{status:x,title:e,isExpanded:t,toggle:()=>I(t,a),experimentPcxThinkingStepsBlocksGroupOn:A,hasExpandableContent:E}),n.createElement("div",{className:b().blockContent},t&&n.createElement(l.A,{"data-qa":"plan-block-content",items:C,renderItem:S,"aria-label":A?g.t("Tasks"):"Tasks"}))))};PlanBlock.displayName="PlanBlock"},0x20ef5f1b9:(e,t,a)=>{"use strict";a.d(t,{Z:()=>TaskIcon});var n=a(0xbad225b5),r=a(0x2501a2cee),i=a(0x1cc66dceb),l=a(0x1340892e2);let TaskIcon=({elementType:e,status:t,size:a="inherit"})=>{let o=i.v3[e],s=t===i.cl.InProgress,c=(0,n.useMemo)(()=>n.createElement(l.r,{icon:n.createElement(r.Ah,{name:o[t],size:a,inline:!0}),text:"",inline:!0}),[o,t,a]);return s?c:n.createElement(r.Ah,{name:o[t],size:a})};TaskIcon.displayName="TaskIcon"},0x10b0baa82:(e,t,a)=>{"use strict";a.d(t,{L:()=>TaskItem});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20b4dda68),o=a(0x1faa3f1ac),s=a(0x2501a2cee),c=a(0x20ef5f1b9),d=a(0x450a4804),m=a(0x1cc66dceb),u=a(0x1fdb06097),p=a.n(u);let noop=()=>{},TaskItem=({item:e,blockType:t,renderBlocks:a,detailsId:r,outputId:u,sourcesId:h,onSourceClick:_=noop})=>{let f=e.status===m.cl.InProgress,b=e.status===m.cl.Error,g=t===l.WP.plan,y=(0,n.useCallback)(e=>e&&"object"==typeof e&&"type"in e&&"rich_text"===e.type?a([e],t,{suppressRichTextEditedLabel:!0,disableJumboEmoji:!0}):null,[t,a]),A=(0,n.useCallback)(e=>e?n.createElement("div",{"data-qa":"sources",id:h},e.map((e,t)=>{let a=`${e.url}-${t}`;return n.createElement("div",{key:a,"data-qa":"source"},n.createElement(o.A,{key:a,href:e.url,onClick:_},e.text))})):null,[h,_]);return n.createElement("div",{"data-qa":"task-item",className:p().taskItem},g&&n.createElement("div",{className:p().taskHeader},n.createElement("div",{className:i()(p().taskIcon,{[p().error]:b,[p().inProgress]:f})},n.createElement(c.Z,{elementType:"secondary",status:e.status})),n.createElement(d.h,{elementType:"secondary",status:e.status,title:e.title})),e.details&&n.createElement("div",{"data-qa":"details",className:p().taskContentSection,id:r},y(e.details)),n.createElement("div",{className:i()(p().taskContent,{[p().taskContentSection]:!e.output})},e.output&&n.createElement("div",{className:p().taskContentIcons},n.createElement("div",{className:p().placeholderIcon},n.createElement(s.Ah,{name:"icon-placeholder-filled",inline:!0})),n.createElement("div",{className:p().divider})),n.createElement("div",null,n.createElement("div",{"data-qa":"output",id:u},y(e.output)),A(e.sources))))};TaskItem.displayName="TaskItem"},0x450a4804:(e,t,a)=>{"use strict";a.d(t,{h:()=>Title});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cc66dceb),o=a(0x1340892e2),s=a(0x1fdb06097),c=a.n(s);let Title=({elementType:e,status:t,title:a})=>{let r="primary"===e,s=i()(r?c().headerTitle:c().subheaderTitle),d=t===l.cl.InProgress;return n.createElement("div",{"data-qa":"title"},d&&r?n.createElement(o.r,{text:a,className:s,inline:!0}):n.createElement("span",{className:s},a))};Title.displayName="Title"},0xb7b18ffa:(e,t,a)=>{"use strict";a.d(t,{s:()=>ToggleBar});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0xb1ea448c),s=a(0x2501a2cee),c=a(0x20ef5f1b9),d=a(0x450a4804),m=a(0x1cc66dceb),u=a(0x1fdb06097),p=a.n(u);let h=new l.Ay("thinking_steps"),ToggleBar=({status:e,title:t,isExpanded:a,toggle:r,experimentPcxThinkingStepsBlocksGroupOn:l,hasExpandableContent:u})=>{let _=l?h.t("Tasks performed: {title}",{title:t}):`Tasks performed: ${t}`;return n.createElement("div",{className:`${p().toggleBarButton} ${!u?p().disabled:""}`,role:"button",tabIndex:0,"aria-expanded":a,"aria-label":_,onClick:u?r:void 0,onKeyDown:u?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r())}:void 0},n.createElement("div",{className:i()(p().toggleBarIcon,{[p().error]:e===m.cl.Error,[p().inProgress]:e===m.cl.InProgress})},e===m.cl.InProgress?n.createElement(o.A,{className:p().spinner,size:"large",inline:!0}):n.createElement(c.Z,{elementType:"primary",status:e,size:"18"})),n.createElement("div",{className:p().toggleBarTitleContainer},n.createElement(d.h,{elementType:"primary",status:e,title:t})),u&&n.createElement("div",{className:p().toggleBarIcon},n.createElement(s.Ah,{name:a?"caret-up":"caret-down",size:"18"})))};ToggleBar.displayName="ToggleBar"},0x1cc66dceb:(e,t,a)=>{"use strict";a.d(t,{cl:()=>n,v3:()=>r});let n={Pending:"pending",InProgress:"in_progress",Complete:"complete",Error:"error"},r={primary:{[n.Complete]:"check-circle-filled",[n.Error]:"warning-filled"},secondary:{[n.Pending]:"hourglass",[n.InProgress]:"ai-sparkle-filled",[n.Complete]:"check-filled",[n.Error]:"warning"}}},0x67edd73a:(e,t,a)=>{"use strict";a.d(t,{E:()=>AlertBlock});var n=a(0xbad225b5),r=a(0x2b7f0bcc),i=a(0x1a95efb3);let AlertBlock=({blockId:e,text:t,level:a})=>n.createElement(r.Ay,{level:a,"data-qa":`alert-block-${e}`},n.createElement("div",null,n.createElement(i.A,{...t,parent:"alert"})));AlertBlock.displayName="AlertBlock"},0x126cf60:(e,t,a)=>{"use strict";a.d(t,{Z:()=>Card});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x14fad6485),o=a(0x3bc7bbd5),s=a(0xfa28400d),c=a(0x9798b7f),d=a(0x7729d35b),m=a(0x1a95efb3),u=a(0x1b59f1d56),p=a.n(u);let Card=({blockId:e,heroImage:t,icon:a,title:r,subtitle:u,body:h,actions:_})=>{let{windowRef:f}=(0,l.ox)(),b=!!r||!!u||!!a,g=(0,n.useRef)(null),[y,A]=(0,n.useState)(!1),x=(0,n.useCallback)(e=>{let t=e[0];t&&A(t.contentRect.height>=110)},[]);return(0,n.useLayoutEffect)(()=>{let e=(0,o.A)(x);if(!e||!g.current||!h)return;let t=g.current;return e.observe(t),()=>{t&&e.unobserve(t)}},[g,x,h,f]),n.createElement("div",{className:p().card,"data-qa":"bk_card_block",key:e},n.createElement(s.Ay,{size:"expanded",entityState:"enabled",isRemovable:!1,isInteractive:!1,isFullHeight:!0,isFullWidth:!0},n.createElement("div",{className:p().content},t&&n.createElement("img",{src:t.imageUrl,alt:t.altText,className:p().heroImage}),b&&n.createElement("div",{className:p().headerContainer},a?.imageUrl&&n.createElement("div",{className:p().iconContainer},n.createElement(d.A,{entityState:"enabled"},n.createElement("img",{src:a.imageUrl,alt:""}))),n.createElement(c.A,{entityState:"enabled",size:"expanded",shouldShowLabelGap:!1,primaryLabel:n.createElement(m.A,{...r,parent:"card"}),secondaryLabel:n.createElement(m.A,{...u,parent:"card"})})),!!h&&n.createElement("div",{className:i()(p().bodyContainer,{[p().withGradient]:y})},n.createElement("div",{className:p().bodyContent,ref:g},n.createElement(m.A,{...h,parent:"card"}))),!!_&&n.createElement("div",{className:p().actionsContainer},_.map(e=>n.createElement(m.A,{key:e.actionId,...e,parent:"card"}))))))};Card.displayName="Card"},0x11c6e3140:(e,t,a)=>{"use strict";a.d(t,{O:()=>CarouselBlock});var n=a(0xbad225b5),r=a(0x130d89881),i=a(0x14c22bca),l=a(0x1dd05c9fe),o=a.n(l);let CarouselBlock=({blockId:e,renderBlocks:t,childBlocks:a})=>n.createElement("div",{className:o().carousel,"data-qa":`carousel-block-${e}`},n.createElement(r.A,{disableHeight:!0},({width:e})=>n.createElement(i.A,{arrowsInside:!0,pageSize:e-e%356,width:e},(a||[]).map(e=>n.createElement("div",{key:e.blockId,className:o().cardWrapper},t([e],void 0,void 0,!0))))));CarouselBlock.displayName="CarouselBlock"},0x193332968:(e,t,a)=>{"use strict";let n;a.d(t,{N:()=>CodeBlock});var r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x20482ad21),o=a(0x344bb842),s=a(0x2501a2cee),c=a(0x6e87d4ec),d=a(0x4c96e5d9),m=a(0x20bbeb1cf);function formatLanguageName(e){if(void 0===n)for(let e of(n=new Map,m.WL))for(let t of(n.set(e.id,e.name),e.aliases??[]))n.set(t,e.name);return n.get(e)??e}var u=a(0x120c268ad),p=a.n(u),h=a(0x1853f0e7c);let _="slalabaster",f={name:_,settings:[{settings:{background:"transparent",foreground:(0,h.HK)("DT_COLOR_CONTENT_PRY")}},{scope:["comment","punctuation.definition.comment"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_TOMATO_70")}},{scope:["string","string.regexp","constant.other.symbol"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_CILANTRO_70")}},{scope:["constant.character.escape"],settings:{foreground:(0,h.HK)("DT_COLOR_CONTENT_TER")}},{scope:["constant.numeric","constant.character","constant.keyword","constant"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_INDIGO_70")}},{scope:["entity.name"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_AUBERGINE_70")}},{scope:["punctuation"],settings:{foreground:(0,h.HK)("DT_COLOR_CONTENT_TER")}},{scope:["invalid"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_TOMATO_90"),background:(0,h.HK)("DT_COLOR_PLT_TOMATO_0")}},{scope:["emphasis"],settings:{fontStyle:"italic"}},{scope:["strong"],settings:{fontStyle:"bold"}},{scope:["meta.diff.header","meta.diff.range"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_INDIGO_70"),background:(0,h.HK)("DT_COLOR_PLT_INDIGO_5")}},{scope:["markup.deleted","markup.deleted.diff","punctuation.definition.deleted.diff"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_TOMATO_70"),background:(0,h.HK)("DT_COLOR_PLT_TOMATO_5")}},{scope:["markup.inserted","markup.inserted.diff","punctuation.definition.inserted.diff"],settings:{foreground:(0,h.HK)("DT_COLOR_PLT_CILANTRO_70"),background:(0,h.HK)("DT_COLOR_PLT_CILANTRO_5")}}]};var b=a(0x1d6f77fb6);let g=["js","ts","json","html","css","md","diff"],y=new Set(g),A=null,x=null,E=new Map;for(let e of f.settings||[])"object"==typeof e&&null!==e&&"settings"in e&&e.settings?.foreground&&e.settings?.background&&E.set(e.settings.foreground.toUpperCase(),e.settings.background);let C={name:"background-colors",tokens(e){for(let t of e)for(let e of t){let t=E.get(e.color?.toUpperCase()||"");t&&(e.bgColor=t)}},span(e,t,a,n,r){if(r.bgColor){let t=e.properties.style||"";e.properties.style=`${t};background-color:${r.bgColor}`}}},getHighlighterSync=e=>A&&y.has(e)?A:null,getHighlighter=async e=>{let t=await (!x&&(x=(0,b.O_)({themes:[f],langs:g}).then(e=>(A=e,e))),x);return await t.loadLanguage(e),y.add(e),t},k={name:"sticky-line-numbers",line(e,t){let a={type:"element",tagName:"span",properties:{class:"line-number","aria-hidden":"true"},children:[{type:"text",value:String(t)}]};e.children.unshift(a)}};var v=a(0x1ec68d6a3),S=a(0x34f7089c),I=a.n(S);let ShikiComponent=({code:e,className:t,language:a,dataQa:n,ariaLabel:i})=>{let l=(0,v.Ay)({label:"ShikiComponent"}),[o,s]=(0,r.useState)(()=>getHighlighterSync(a));(0,r.useEffect)(()=>{if(getHighlighterSync(a))return;let e=!1;return getHighlighter(a).then(t=>{e||s(t)}).catch(e=>{l.error(Error(`Error loading highlighter for language: ${a}, error: ${e}`))}),()=>{e=!0}},[a,l]);let c=(0,r.useMemo)(()=>{if(!o)return null;try{let t={name:"accessibility",pre(e){e.properties["aria-label"]=i}};return o.codeToHtml(e,{lang:a,theme:_,transformers:"diff"===a?[C,k,t]:[k,t]})}catch(e){return l.error(Error(`Error highlighting code for language: ${a}, error: ${e}`)),null}},[o,e,a,l,i]),d=(0,r.useMemo)(()=>({__html:c}),[c]);return c?r.createElement("div",{"data-qa":`${n}_html`,className:t,dangerouslySetInnerHTML:d}):r.createElement("div",{"data-qa":`${n}_loading`,className:p()(t,I().loading)},r.createElement("pre",{className:p()("slalabaster",I().loadingPre),"aria-label":i},r.createElement("code",null,e.split(`
`).map((e,t)=>r.createElement(r.Fragment,{key:t},t>0&&`
`,r.createElement("span",{className:"line"},e))))))};ShikiComponent.displayName="ShikiComponent";var w=a(0x110b4f809),T=a(0x1ed767a16),N=a(0x226892387),M=a(0x14149c126),R=a(0x16ffed5ab);let CodeBlock=({code:e,language:t})=>{let a=(0,r.useMemo)(()=>new l.Ay("block_kit"),[]),n=(0,i.wA)(),m=(0,N.d4)(e=>"on"===(0,M._Z)(e,"code_block_strings")),[u,p]=(0,w.A)(!1,2e3),h=(0,r.useCallback)(()=>{(0,T.x3)(e),p(!0),n((0,R.M)({element:r.createElement(c.A,{svgIconProps:{name:"check"}},a.t("Code copied to clipboard"))}))},[e,n,a,p]),_=a.t("Copy code"),f=a.t("Copied!"),b=formatLanguageName(t),g=m?a.t("{language} code block",{language:b}):`${b} code block`,y=u?f:_;return r.createElement("div",{className:I().container,role:"group","aria-label":g},r.createElement("div",{className:I().header,"data-stringify-ignore":"true"},r.createElement("div",{className:I().language},b),r.createElement(d.Ay,{tip:y},r.createElement(o.A,{size:"small",onClick:h,"aria-label":y},r.createElement(s.Ah,{name:u?"check":"copy",size:"16"})))),r.createElement(ShikiComponent,{code:e,className:I().code,language:t,dataQa:"bk_code_element",ariaLabel:g}))};CodeBlock.displayName="CodeBlock"},0x129074070:(e,t,a)=>{"use strict";a.d(t,{A:()=>BaseRichText});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1c2d7de14),s=a(0x8eb6366c),c=a(0x1595bdd0),d=a(0x1db69cda),m=a(0xc8b3fd9b),u=a(0xc4e87e00),p=a(0x24cdb7bd5),h=a(0x2afd3d78),_=a(0x5a9acf69);function linkToText(e){return{type:u.Lv.TEXT,text:e.text||"",style:e.style}}var f=a(0x15681504d),b=a(0x99773ba7),g=a(0x19b0e0f0e),y=a(0x1e8b70c20),A=a(0x87da79b8),x=a(0x17690f291),E=a(0x1c9b4eab),C=a(0xb65e4259),k=a(0x1e2051844),v=a(0x20bafd237),S=a(0xd2ef9f49),I=a(0x133521e32),w=a(0x15570922b);let{_TRUNCATION_EXPAND_BUTTON:T}=u.Lv;function insertTruncationButton(e){if(!e||!(0,k.A)(e,e=>hasTruncation(e)))return e;let t=(0,d.A)(e),a=(0,v.A)(t);if(a){let e=(0,v.A)(a.elements);if((0,S.B)(a)&&e&&(0,w.NU)(a)&&(e.type=T),(0,S.B)(a))return e&&(0,w.NU)(e)?e.type=T:a.elements?.push({type:T}),t;(0,I.J)(a)&&a.elements&&a.elements.length&&(a.elements=insertTruncationButton(a.elements))}return t}function hasTruncation(e){return!!e&&(!!(0,w.NU)(e)||!!(0,I.J)(e)&&!!e.elements&&!!e.elements.length&&!!(0,k.A)(e.elements,e=>hasTruncation(e)))}let N=insertTruncationButton;var M=a(0xe56fc23c),R=a(0x1480e7c40),P=a(0x211fc28d8),L=a(0x3cf0f641),O=a(0x6258badf);let{SECTION:D,LIST:F,QUOTE:U,PREFORMATTED:B,USER:H,USERGROUP:W,CHANNEL:V,BROADCAST:G,DATE:q,COLOR:j,EMOJI:z,LINK:K,TEXT:$,TRUNCATION:Y,_TRUNCATION_EXPAND_BUTTON:Q,_TRUNCATION_COLLAPSE_BUTTON:Z}=u.Lv,J={type:Y,isMessageTruncation:!0},X={type:Q,isMessageTruncation:!0},ee={type:D,elements:[X]},et=[J,{type:$,text:" "},X];function getChunkLength(e){switch(e.type){case H:return e.userId?e.userId.length+1:10;case W:return e.usergroupId?e.usergroupId.length+1:10;case V:return e.channelId?e.channelId.length+1:10;case G:return e.range?e.range.length+1:10;case q:return e.fallback?.length||0;case j:return e.value?e.value.length+1:7;case z:return 1;case K:case $:return e.text?e.text.length:0;default:return 0}}function truncateRichTextElements(e,t,a,n){if(!e||!t||t<=0)return e;if(n)return e.concat([{type:D,elements:[{type:Z}]}]);let r=t,i=a>0?a:1/0,l="none",o=[];function processChunk(e){let t=(0,s.A)(e),a=getChunkLength(e);if(e.type===K||e.type===$){let n=e.text?e.text.split(`
`):[],o=e.text||"";if(n.length>i&&(o=(0,R.A)(n,i).join(`
`),i=0,l="section"),(a=o.length)>r&&(o=(0,P.A)((0,P.A)(e.text.substr(0,r)),"\u2026.,_-"),l="inline"),t.text=o,"none"===l){let e=(0,L.A)(o,`
`)?n.length-2:n.length-1;e>0&&(i-=e)}}return r-=a,t}for(let t=0;t<e.length;t++){let a=t===e.length-1;if(o[t]=(0,O.A)(e[t],"elements"),o[t].elements=[],e[t].type===F){for(let a=0;a<e[t].elements.length;a++){let n=a===e[t].elements.length-1;o[t].elements[a]=(0,O.A)(e[t].elements[a],"elements"),o[t].elements[a].elements=[];for(let n=0;n<e[t].elements[a].elements.length;n++){let r=e[t].elements[a].elements[n];if(o[t].elements[a].elements[n]=processChunk(r),"none"!==l)break}if(!n&&(i-=1,"none"===l&&i<=0&&(l="section")),"none"!==l)break}if("none"!==l)break}else{for(let a=0;a<e[t].elements.length;a++){let n=e[t].elements[a];if(o[t].elements[a]=processChunk(n),"none"!==l)break}if("none"!==l)break}if(!a&&(i-=1)<=0&&(l="section"),"none"!==l)break}if("section"===l)o.push(ee);else if("inline"===l){let e=(0,v.A)(o),t=o.length-1;if([U,B].includes(e.type))o[t].elements.push(J),o.push(ee);else if(e.type===F){let e=o[t].elements.length-1;o[t].elements[e].elements=o[t].elements[e].elements.concat(et)}else o[t].elements=o[t].elements.concat(et)}return o}function assignParent(e,t){let a=t.get(e.indent-1),n=a?.elements[(a?.elements.length||1)-1];n?.indent===e.indent?n?.elements?.push(...e.elements):a?.elements.push(e)}function isListLogical(e){let[t,...a]=e;if(0!==t.indent)return!1;let n=t.indent;for(let e of a){if(e.indent>n+1)return!1;n=e.indent}return!0}let isOrderedList=e=>"rich_text_list"===e.type&&("ordered"===e.style||"bullet"===e.style)&&!(0,u.BS)(e);function getOrderedListBoundaries(e){let t=null,a=[];for(let n=0;n<e.length;n+=1){let r=e[n],i=n>0?e[n-1]:null,l=isOrderedList(r),o=null!==i&&isOrderedList(i)&&l&&i.indent===r.indent&&i.style!==r.style;null===t&&l?t=n:null!==t&&o?(a.push([t,n]),t=n):null===t||l||(a.push([t,n]),t=null),null!==t&&l&&n===e.length-1&&(a.push([t,n+1]),t=null)}return a}function collapseOrderedList(e){if(e.every(isOrderedList)){let t=(0,d.A)(e),{...a}=t[0];a.elements=[];let n=new Map;for(let e=0;e<t.length;e+=1){let r=t[e];n.set(r.indent,r),0===r.indent?a.elements.push(...r.elements):(r.border&&(r.border=0),assignParent(r,n)),n.set(r.indent,r.elements[r.elements.length-1])}return a}return e}function processOrderedListElements(e){if(!e.find(isOrderedList))return e;let t=getOrderedListBoundaries(e),a=(0,d.A)(e);for(let[n,r]of t.reverse()){let t=e.slice(n,r);if(isListLogical(t)){let e=collapseOrderedList(t);a.splice(n,r-n,e)}}return a}var ea=a(0x1c1e8557c),en=a(0x1706ebf53),er=a(0x1bb04e660),ei=a(0x108d007e0);function richTextChunksMap(e,t){if(!e)return e;let a=(0,d.A)(e);for(let e=0;e<a.length;e++){let n=a[e];if((0,ei.C)(n))for(let e=0;e<n.elements.length;e++){let a=n.elements[e];a.elements=t(a.elements||[])}else n.elements=t(n.elements||[])}return a}var el=a(0x22a75d737),eo=a(0x1266f1359);let{SECTION:es,TEXT:ec,_EDITED_LABEL:ed}=u.Lv,isValidJumbomojiElement=e=>!(!(0,ea.E2)(e)&&!(0,en.P)(e)||(0,p.A)(e)>0);function filterAndAdaptHighlightMatchesForChunk(e,t,a){let n=e.map(e=>{let n=e.index+e.length;return e.index<t&&n-t>0?{index:0,length:n-t}:e.index>=t&&e.index<t+a?{index:e.index-t,length:e.length}:null});return(0,c.A)(n)}function getChunkTextForHighlights(e){return(0,en.P)(e)?e.text:(0,h._)(e)?e.text||e.url:" "}function processHighlightWords(e,t){let a=[],n=0;return e.forEach(e=>{let r=getChunkTextForHighlights(e),i=r?.length||0,l=filterAndAdaptHighlightMatchesForChunk(t,n,i);if(!l.length){a.push(e),n+=i;return}let o=0;if(l.forEach(t=>{if(t.index>0&&r){let n={...(0,d.A)(e),text:r.slice(o,t.index)};a.push(n)}let n={...(0,d.A)(e),style:{...e.style}};((0,en.P)(e)||(0,h._)(e))&&r&&((0,en.P)(e)&&(n.text=r.slice(t.index,t.index+t.length)),(0,h._)(e)&&(n.text=r.slice(t.index,t.index+t.length))),n?.style||(n.style={}),n.style.clientHighlight=!0,a.push(n),o=t.index+t.length}),o<i&&r){let t={...(0,d.A)(e),text:r.slice(o)};a.push(t)}n+=i}),{convertedElements:a,processedLength:n}}function markupHighlightWords(e,t){let a=(0,el.fw)({type:"rich_text",elements:e},t);if(!a.length)return e;let n=0;return richTextChunksMap(e,function(e){let{convertedElements:t,processedLength:r}=processHighlightWords(e,a.map(e=>({...e,index:e.index-n})));return n+=r,(0,m.A)(a,e=>e.index<n),n+=1,t})}function convertEmojiToText(e,{teamId:t}){let a=t&&(0,eo.$D)(t);function convertEmoji(e){if((0,ea.E2)(e)){let t={type:ec,text:(0,er.G)(e,{state:a,localize:!0})};return e.style&&(t.style=e.style),t}return e}return richTextChunksMap(e,e=>e.map(convertEmoji))}var em=a(0x10027d8bc),eu=a(0x22d51fee8),ep=a(0x1ccef1c6f),eh=a(0x226892387),e_=a(0x14149c126);function BaseRichText({elements:e=[],teamId:t,highlightWords:a=[],isJumbomojiEnabled:r=!1,isEmojiDisplayedAsText:c=!1,isEmojiImportEnabled:m=!1,isEmojiTooltipHidden:u=!1,inline:p=!1,clogLinkClick:k=l.A,clogCitationImpression:v,editedTs:I,meMessage:w=!1,addDirectionAttr:T=!0,isExpanded:R=!1,truncateMaxCharacters:P,truncateMaxNewLines:L,isArchived:O=!1,allowCheckList:D=!1,blocksContainerContext:F,noInlineLinks:U=!1,suppressRichTextEditedLabel:B=!1,hideTruncationExpandBtn:H,truncationExpandBtnCopy:W,blocksArePreProcessed:V,stopAnimations:G,dimmedUserIds:q,noTabbableContent:j=!1,alwaysDisplayMentionsAsLinks:z=!1,streaming:K=!1,isStopped:$=!1}){let Y=(0,n.useRef)(null),Q=(0,n.useRef)(R),Z=(0,eh.d4)(e=>"on"===(0,e_._Z)(e,"optimal_line_length")),J=(0,eh.d4)(eu.N6),X=(0,eh.d4)(e=>(0,ep.ty)(e,"a11y_line_length")),ee=(0,eh.d4)(em.zM);if((0,n.useEffect)(()=>{Q.current!==R&&(Y.current?.focus(),Q.current=R)},[R]),!e||!e.length)return null;let et=(({elements:e,teamId:t,editedTs:a,highlightWords:n,isJumbomojiEnabled:r,isEmojiDisplayedAsText:i,truncateMaxCharacters:l,truncateMaxNewLines:o,isExpanded:c,isArchived:m,suppressRichTextEditedLabel:u,blocksArePreProcessed:p,isStopped:k})=>{var v;let I=e;!i&&r&&(I=(({elements:e})=>{if(!e||!e.length||e.length>1)return e;let t=e[0];if(!t||!(0,S.B)(t))return e;let a=t.elements;if(!a||!a.length)return e;let n=[],r=0;for(let t=0;t<a.length;t++){let i=(0,s.A)(a[t]);if(i.type===ed){n.push(i);continue}if(!isValidJumbomojiElement(i)||((0,ea.E2)(i)&&(i.isJumbomoji=!0,r+=1),r>23))return e;n.push(i)}return[{type:es,elements:n}]})({elements:I})),i&&t&&(I=convertEmojiToText(I,{teamId:t})),n&&n.length&&(I=markupHighlightWords(I,n)),v=I,I=(0,_.A)(v,e=>{let t,a=e&&e.elements;if(!a?.length)return e;let n=[];return a.forEach(e=>{let a=(0,h._)(e)?(0,d.A)(e):e;if(t&&(0,h._)(t)&&(0,h._)(a)&&t.url===a.url){t.elements||(t.elements=[linkToText(t)],delete t?.style,delete t?.text),t.elements.push(linkToText(a));return}n.push(a),t=a}),{...e,elements:n}}),I=N(I=(0,g.M)(I)),!p&&(I=(0,f.H)(I),I=(0,y.A)(I),I=(0,b.A)(I),I=(0,M.A)(I),I=(0,C.QB)(I),!u&&(a||m)?I=(0,x.A)({elements:I,editedTs:a,isArchived:m}):k&&(I=(0,E.A)({elements:I})));let w=0,T=0;return l&&(w=l),o&&(T=o),(w>0||T>0)&&(I=truncateRichTextElements(I,w,T,c)),I=processOrderedListElements(I=(0,A.A)(I))})({elements:e,teamId:t,editedTs:I,highlightWords:a,isJumbomojiEnabled:r,isEmojiDisplayedAsText:c,isExpanded:R,truncateMaxCharacters:P,truncateMaxNewLines:L,isArchived:O,suppressRichTextEditedLabel:B,blocksArePreProcessed:V,isStopped:ee&&$}),en=i()("p-rich_text_block",{"p-rich_text_block--inline":p,"p-rich_text_block--me_message":w,"p-rich_text_block--optimal_line_length":Z&&X});return n.createElement("div",{ref:Y,className:en,...T?{dir:"auto"}:{}},n.createElement(o.A,{elements:et,clogLinkClick:k,clogCitationImpression:v,isEmojiImportEnabled:m,allowCheckList:D,blocksContainerContext:F,noInlineLinks:U,truncationExpandBtnCopy:W,hideTruncationExpandBtn:H,stopAnimations:G,dimmedUserIds:q,noTabbableContent:j,isEmojiTooltipHidden:u,alwaysDisplayMentionsAsLinks:z,streaming:K,experimentCanvasAiSourceNotationGroupOn:J}))}BaseRichText.displayName="BaseRichText"},0xdede1f0e:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x4c96e5d9),o=a(0x125de1ee5),s=a(0x139aa1a7),c=a(0xf9476ae0),d=a(0xf81d06c9),m=a(0xcd092f8c),u=a(0x122656dd4);let p=new i.Ay("canvas"),canvasSlugRichTextLabelResolver=(e,{variant:t,canvas:a,section:r,labelOverride:i,hideTitle:l})=>{let o=i??n.createElement(u.c,{file:a??void 0});switch(t){case"normal":return l?"":o;case"section":{let e=(0,d.N)(r),t=n.createElement(m.y,{richTextBlock:e,truncateLength:25});if(l)return t;return p.rt("{canvasName}: {sectionText}",{canvasName:o,sectionText:t})}case"section-missing":if(l)return p.t("\u2026");return p.rt("{canvasName}: \u2026",{canvasName:o});default:return(0,c.B)(e,{variant:t,canvas:a,section:r,labelOverride:i,hideTitle:l})}};canvasSlugRichTextLabelResolver.displayName="canvasSlugRichTextLabelResolver";var h=a(0x91cea13),_=a(0x7b75c8ef),f=a(0x17348142),b=a(0xc4e87e00),g=a(0x18460d15c),y=a(0xd6a16321),A=a(0xd843ab47),x=a(0xbd3de346),E=a(0x24558b75f),C=a(0x1fa458710),k=a(0x185059e6b),v=a(0x1d774a049),S=a(0x226892387),I=a(0x14149c126),w=a(0x14ea3ce99);let T=new i.Ay("canvas"),{_CANVAS_MENTION:N,CANVAS:M}=b.Lv,Canvas=({element:e,noTabbableContent:t,shouldStopPropagation:a=!1,onOpenDocHandler:i,noLinking:c,truncate:d=!1})=>{let m,u,p=(0,r.wA)(),b="on"===(0,S.d4)(e=>(0,I._Z)(e,"fe_link_tokenization")),{getPrimaryView:R}=(0,n.useContext)(A.A),P=(0,S.d4)(R),L="file_id"in e?e.file_id:e.fileId,O=(0,S.d4)(e=>(0,w.Lp)(e,L)),D=e.label;"hide_title"in e?m=e.hide_title:"hideTitle"in e&&(m=e.hideTitle),"section_id"in e?u=e.section_id:"sectionId"in e&&(u=e.sectionId);let{isDisabled:F,isLocked:U,label:B,iconName:H}=(0,S.Z2)(e=>(0,h.V)(e,{fileId:L,sectionId:u,labelOverride:D,hideTitle:m,labelResolver:canvasSlugRichTextLabelResolver})),W=!F&&!U,V=P?.viewType===s.D.List&&U,G=(0,n.useCallback)(()=>{p((0,g.A)({fileId:L,skipConfirmation:!1}))},[p,L]),q=(0,n.useCallback)(e=>{e.preventDefault(),a&&e.stopPropagation();let t=V&&e?.ctrlKey;(W||t)&&(i?i(e):p((0,C.A)({fileId:L,sectionId:u,source:v.f.RICH_TEXT_CANVAS_ELEMENT,considerOpeningExistingViewInSplitView:!0,forceNewWindow:(0,E.Cz)(e)})))},[a,V,W,i,p,L,u]),j=(0,n.useCallback)(()=>{p((0,o.p)({navProps:(0,y.mo)({id:L,clogParams:{fileId:L,source:v.f.RICH_TEXT_CANVAS_ELEMENT},...u&&{sectionIdsToHighlightOverride:[u]}})}))},[p,L,u]),z=(0,n.useCallback)(()=>{p((0,k.S)({fileId:L,sectionId:u,source:v.f.RICH_TEXT_CANVAS_ELEMENT}))},[p,L,u]);if(O&&(0,x.g9)(O)||e.type!==N&&e.type!==M||!b&&(O.mode||O.filetype)&&!(0,x.DQ)(O))return null;let K=U&&!((0,x.Bp)(O)||(0,x.Ki)(O)),$=n.createElement(f.d,{label:B,iconName:H,url:e.url,id:O.id,onClick:K?G:q,isDisabled:F,className:"p-rich_text_canvas",dataQa:"rich_text_canvas_element",noLinking:c,style:e.style,noTabbableContent:t,truncate:d});if(c||F)return $;if(!i&&(W||V))return n.createElement(_.v,{url:e.url,onOpenInSplitViewClick:j,onOpenInNewWindowClick:z},n.createElement("span",null,$));if(K){let e=T.t("Request access");return n.createElement(l.Ay,{tip:e,position:"top",zIndex:"above_fs",tipClassName:"c-tooltip__tip--link","data-qa":"quip-file-request-access-tooltip"},$)}return $};Canvas.displayName="Canvas";let R=Canvas},0x606e5546:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2501a2cee),o=a(0xc4f386da),s=a(0x4e1a3b33);let fileSlugRichTextLabelResolver=({variant:e,file:t})=>"normal"===e?t?n.createElement(s.A,{file:t}):"":(0,o.Z)({variant:e,file:t});fileSlugRichTextLabelResolver.displayName="fileSlugRichTextLabelResolver";var c=a(0x24a115b5a),d=a(0x7b75c8ef),m=a(0x17348142),u=a(0xc4e87e00),p=a(0xbd3de346),h=a(0xeeae4283),_=a(0x1a80146c8),f=a(0x226892387),b=a(0x14ea3ce99);let g=new i.Ay("message"),{_FILE_MENTION:y,FILE:A}=u.Lv,File=({element:e,noLinking:t})=>{let a=(0,r.wA)(),i="file_id"in e?e.file_id:e.fileId,o=(0,f.d4)(e=>(0,b.Lp)(e,i)),{isDisabled:s,label:u,iconName:x}=(0,f.Z2)(e=>(0,c.P)(e,{fileId:i,labelResolver:fileSlugRichTextLabelResolver})),E=(0,n.useCallback)(e=>{e.preventDefault(),s||a((0,_.A)({fileId:i}))},[a,i,s]),C=(0,n.useCallback)(e=>{e.preventDefault(),a((0,h.A)({file:o}))},[a,o]),k=(0,n.useMemo)(()=>[{label:g.t("Download"),icon:n.createElement(l.Ah,{name:"download"}),click:C}],[C]);if(o&&(0,p.g9)(o)||e.type!==y&&e.type!==A||!i)return null;let v=n.createElement(m.d,{label:u,iconName:x,url:e.url,id:i,onClick:E,isDisabled:s,dataQa:"rich_text_file_element",noLinking:t,style:e.style});return t||s?v:n.createElement(d.v,{url:e.url,additionalMenuItems:k},n.createElement("span",null,v))};File.displayName="File";let x=File},0xa41e4e91:(e,t,a)=>{"use strict";a.d(t,{T:()=>FolderMention});var n=a(0xbad225b5),r=a(0x17348142);let FolderMention=({folderName:e,onClick:t,isDeleted:a})=>n.createElement(r.d,{label:e,iconName:"folder-filled",onClick:t,isDisabled:a,dataQa:"rich_text_folder_element",noLinking:a});FolderMention.displayName="FolderMention"},0x253acf1e2:(e,t,a)=>{"use strict";a.d(t,{A:()=>w});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x4c96e5d9),o=a(0x125de1ee5),s=a(0x287da5a6),c=a(0x160ca5b34),d=a(0x176fb606c),m=a(0xcd092f8c),u=a(0x4e1a3b33),p=a(0x9509dfce);let h=new i.Ay("lists"),listSlugRichTextLabelResolver=(e,{variant:t,list:a,record:r,view:i})=>{let l=n.createElement(u.A,{file:a??void 0});switch(t){case"normal":return l;case"record":{let e=r?.fields?.name;if(!e?.length)return h.t("Untitled item");let t=(0,p.nf)(e[0]);return n.createElement(m.y,{richTextBlock:t,truncateLength:25})}case"view":{let e=i?.name??"";return h.rt("{listTitle}: {viewText}",{listTitle:l,viewText:e,canvasName:l,sectionText:e,fallbackHashNs:"canvas",fallbackHash:"fdc70818c6c79033cef9dc62338c093a7f0617c6"})}default:return(0,d.T)(e,{variant:t,list:a,record:r,view:i})}};listSlugRichTextLabelResolver.displayName="listSlugRichTextLabelResolver";var _=a(0x7b75c8ef),f=a(0x17348142),b=a(0xc4e87e00),g=a(0x18460d15c),y=a(0xd6a16321),A=a(0xbd3de346),x=a(0x24558b75f),E=a(0x226892387),C=a(0x14149c126),k=a(0x8d0a2ff1),v=a(0x2d1c8f66);let S=new i.Ay("lists"),{LIST_RECORD:I}=b.Lv,ListRecord=({element:e,noLinking:t})=>{let a,i,d="file_id"in e?e.file_id:e.fileId;"record_id"in e?a=e.record_id:"recordId"in e&&(a=e.recordId),"view_id"in e?i=e.view_id:"viewId"in e&&(i=e.viewId);let m=(0,r.wA)(),u="on"===(0,E.d4)(e=>(0,C._Z)(e,"fe_link_tokenization")),p=(0,E.d4)(e=>(0,k.vS)(e,d)),{isDisabled:h,isLocked:b,label:w,iconName:T}=(0,E.Z2)(e=>(0,c.Z)(e,{fileId:d,recordId:a,viewId:i,labelResolver:listSlugRichTextLabelResolver})),N=(0,n.useCallback)(()=>{m((0,g.A)({fileId:d,skipConfirmation:!1}))},[m,d]),M=(0,n.useCallback)((e,t=!1)=>{h||m((0,v.N)({listFileId:d,listViewId:i,focusRecordId:a,forceOpenInChildWindow:e,forceOpenInSplitView:t}))},[m,d,i,a,h]),R=(0,n.useCallback)(e=>{e.preventDefault(),M((0,x.Cz)(e),(0,s.A)(e))},[M]),P=(0,n.useCallback)(()=>{m((0,o.p)({navProps:(0,y.st)({listId:d,listViewId:i,focusRecordId:a}),clogParams:{entryPoint:"rich-text-slug"}}))},[m,d,a,i]),L=(0,n.useCallback)(()=>{M(!0)},[M]);if(e.type!==I||!d||!p||!u&&(p.mode||p.filetype)&&!(0,A.l7)(p))return null;let O=b&&!(0,A.Bp)(p),D=n.createElement(f.d,{label:w,iconName:T,url:e.url,id:d,onClick:O?N:R,isDisabled:h,dataQa:"rich_text_list_record_element",noLinking:t,style:e.style});if(t||h)return D;if(b&&!(0,A.Bp)(p)){let e=S.t("Request access");return n.createElement(l.Ay,{tip:e,position:"top",zIndex:"above_fs",tipClassName:"c-tooltip__tip--link","data-qa":"quip-file-request-access-tooltip"},D)}return n.createElement(_.v,{url:e.url,onOpenInSplitViewClick:P,onOpenInNewWindowClick:L},n.createElement("span",null,D))};ListRecord.displayName="ListRecord";let w=ListRecord},0xb5244e69:(e,t,a)=>{"use strict";a.d(t,{O:()=>MessageMention});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x125de1ee5),l=a(0x339b339c),o=a(0xd7587e61),s=a(0x20482ad21),c=a(0x2501a2cee),d=a(0x160280c1b),m=a(0xbbd161c9),u=a(0x12185e091),p=a(0x1ecc7f772),h=a(0x3f9b1657);let _=new s.Ay("block_kit"),messageSlugRichTextLabelResolver=(e,{variant:t,channel:a,isFromCurrentUser:r,messageAuthorName:i})=>{if(t!==m.eE.Normal)return(0,d.y)(e,{variant:t,channel:a,isFromCurrentUser:r,messageAuthorName:i});{let t=(0,p.SB)(e,a),r=(0,u.Zp)(a),l=(0,h.A)({channelName:t,isUnknown:(0,u.t8)(a),isNonExistent:(0,u.QR)(a),includePrefix:!1});return _.rt("{messageAuthorName} in {prefixIcon}{conversationName}",{messageAuthorName:i,conversationName:l,prefixIcon:r?n.createElement(c.Ah,{name:"lock-filled",inline:!0}):""})}};messageSlugRichTextLabelResolver.displayName="messageSlugRichTextLabelResolver";var f=a(0x7b75c8ef),b=a(0x17348142),g=a(0xc4e87e00),y=a(0xd6a16321),A=a(0x6d72337),x=a(0x24558b75f),E=a(0x9a5066aa),C=a(0x226892387);let{MESSAGE_MENTION:k}=g.Lv,MessageMention=({element:e,noLinking:t})=>{let a,s=(0,r.wA)(),{type:c,url:d,style:m}=e,u="channel_id"in e?e.channel_id:e.channelId,p="message_ts"in e?e.message_ts:e.messageTs;"thread_ts"in e?a=e.thread_ts:"threadTs"in e&&(a=e.threadTs);let{label:h,iconName:_,isDisabled:g,isLoading:v}=(0,C.d4)(e=>(0,o.Q)(e,{channelId:u,messageTs:p,labelResolver:messageSlugRichTextLabelResolver})),S=(0,n.useCallback)(e=>{s((0,E.A)({channelId:u,ts:p,threadTs:a,shouldOpenInTile:e}))},[s,u,p,a]),I=(0,n.useCallback)(e=>{e.preventDefault(),S((0,x.Cz)(e))},[S]),w=(0,n.useCallback)(()=>{s((0,i.p)({navProps:a?(0,y.UX)({channelId:u,threadTs:a,replyTs:p}):(0,y.R9)(u,p),clogParams:{entryPoint:"rich-text-slug"}}))},[u,s,p,a]),T=(0,n.useCallback)(()=>{S(!0)},[S]);if(c!==k||v)return n.createElement(l.A,null);let N=n.createElement(b.d,{label:h,iconName:_,url:d,id:p,onClick:I,dataQa:"rich_text_message_mention_element",noLinking:t,style:m,isDisabled:g});if(t)return N;let M=(0,A.OS)({channelId:u,ts:p,children:n.createElement("span",null,N)});return n.createElement(f.v,{url:d,onOpenInSplitViewClick:w,onOpenInNewWindowClick:T},n.createElement("span",null,M||N))};MessageMention.displayName="MessageMention"},0x1c2d7de14:(e,t,a)=>{"use strict";a.d(t,{A:()=>tS});var n=a(0xbad225b5),r=a(0x20ef3966f),i=a(0x113cdbbd7),l=a(0x1f13c844e),o=a(0xc4e87e00),s=a(0xae58aee9);let Broadcast=({element:e})=>e.type===o.Lv.BROADCAST&&e.range?n.createElement(s.A,{style:e.style},n.createElement(l.A,{type:e.range})):null;Broadcast.displayName="Broadcast";var c=a(0xdede1f0e),d=a(0x8eb6366c);let CanvasMention=e=>{let t,a,{element:r,shouldStopPropagation:i,noTabbableContent:l,onOpenDocHandler:o}=e;"is_same_document"in r?t=!!r.is_same_document:"isSameDocument"in r&&(t=!!r.isSameDocument),"section_id"in r?a=!!r.section_id:"sectionId"in r&&(a=!!r.sectionId);let s=!!(t&&a),m=(0,n.useMemo)(()=>{let e=(0,d.A)(r);return e.hideTitle=s,e},[r,s]);return n.createElement(c.A,{element:m,shouldStopPropagation:i,noTabbableContent:l,onOpenDocHandler:o})};CanvasMention.displayName="CanvasMention";var m=a(0x16cf1da63),u=a(0x120c268ad),p=a.n(u),h=a(0x20482ad21),_=a(0x128d54e52),f=a(0x1faa3f1ac),b=a(0x2501a2cee),g=a(0x1d798e7d1),y=a(0xbef42b3),A=a(0x17bc3dd75),x=a(0x9a5066aa),E=a(0x226892387),C=a(0xd93ecf94);let{_UNFURL_MENTION:k,CANVAS_MESSAGE_UNFURL:v}=o.Lv,S=new h.Ay("block_kit"),CanvasMessageUnfurl=({element:e})=>{let t,a,r=(0,m.wA)(),{type:i,style:l}=e;"root_message_channel"in e?(t=e.root_message_channel,a=e.root_message_ts):"rootMessageChannel"in e?(t=e.rootMessageChannel,a=e.rootMessageTs):"file_channel_id"in e?(t=e.file_channel_id,a=e.file_channel_message_ts):"fileChannelId"in e&&(t=e.fileChannelId,a=e.fileChannelMessageTs);let o=(0,E.d4)(e=>(0,C.Ld)(e,t,a)),c=o?(0,g.q)(o):null,d=(0,E.d4)(e=>(0,A.A)(e,{userId:c?.author_id,botId:c?.bot_id,username:c?.author_name})),u=!c,h=(0,n.useMemo)(()=>({...c?.message_blocks?.[0]?.message,channel:c?.channel_id||"",ts:c?.ts||"",text:c?.text||"",type:"message"}),[c]),I=(0,n.useCallback)(e=>{e.preventDefault(),u||r((0,x.A)({channelId:c?.channel_id||"",ts:c?.ts,threadTs:c?.thread_ts}))},[r,u,c?.channel_id,c?.thread_ts,c?.ts]),w=(0,n.useCallback)(()=>n.createElement(b.Ah,{name:u?"lock-filled":"threads-filled",inline:!0}),[u]),T=(0,n.useMemo)(()=>{let e;if(u)e=S.t("private message");else{let t=n.createElement(y.E,{msg:h,truncateLength:15});e=t?n.createElement(n.Fragment,null,`${d}: "`,t,'"'):d}return n.createElement(_.CG,null,e)},[u,d,h]),N=(0,n.useMemo)(()=>n.createElement(s.A,{style:l},n.createElement(_.Ay,{size:"small",className:p()("p-rich_text_canvas_message_unfurl",{"p-rich_text_canvas_message_unfurl--disabled":u}),"data-qa":"rich_text_canvas_message_unfurl_element",avatar:w,text:T})),[T,u,w,l]);return(i===k||i===v)&&o&&c?u?N:n.createElement(f.A,{onClick:I},N):null};CanvasMessageUnfurl.displayName="CanvasMessageUnfurl";var I=a(0xcaee4748),w=a(0x8c65a12f),T=a(0x986c27f7);let CanvasUserMention=({element:e,clogLinkClick:t,noLinking:a})=>{let{type:r,style:i}=e,l="user_id"in e?e.user_id:e.userId,c="thread_id"in e?e.thread_id:e.threadId,d=(0,E.d4)(e=>c?(0,T.R)(e,c):void 0),m=(0,E.d4)(e=>!!c&&!!l&&!!d&&(0,w.p)(e,{fileId:d,userId:l})),{_CANVAS_USER_MENTION:u,CANVAS_USER_MENTION:p}=o.Lv;return(r===u||r===p)&&l?n.createElement(s.A,{style:i},n.createElement(I.A,{id:l,noLinking:a,supressLinkColors:!m,showTooltip:!0,clogLinkClick:t})):null};CanvasUserMention.displayName="CanvasUserMention";var N=a(0x45ad3b82),M=a(0x52439b94);let Channel=({element:e,clogLinkClick:t,clogCitationImpression:a,noLinking:r,alwaysDisplayAsLink:i,noTabbableContent:l=!1,shouldUseStreamingAnimation:c=!1})=>{let d,m,u="channel_id"in e?e.channel_id:e.channelId;if("tab_id"in e?d=e.tab_id:"tabId"in e&&(d=e.tabId),e.type!==o.Lv.CHANNEL||!u)return null;"fromLlm"in e?m=e.fromLlm:"from_llm"in e&&(m=e.from_llm);let p=n.createElement(N.A,{id:u,tabId:d,noLinking:r,clogLinkClick:t,clogCitationImpression:a,alwaysDisplayAsLink:i,noTabbableContent:l,fromLlm:m}),h=c?n.createElement(M.R,null,p):p;return n.createElement(s.A,{style:e.style},h)};Channel.displayName="Channel";var R=a(0x4abbd599),P=a(0x19908cbe7),L=a.n(P);function ExternalCitation({element:e,renderLink:t}){let{index:a,text:r,url:i}=e,l="",o="";"citation_type"in e.details&&"external"===e.details.citation_type?(l=e.details.app_name,o=e.details.app_icon_url):"citationType"in e.details&&"external"===e.details.citationType&&(l=e.details.appName,o=e.details.appIconUrl);let s=(0,n.useMemo)(()=>n.createElement("div",{className:L().contents},n.createElement("b",null,a),"\xb7",n.createElement("img",{src:o,alt:l,width:16,className:L().appIcon}),n.createElement("div",null,l)),[a,l,o]);return n.createElement("span",{dir:"ltr"},t({text:r,url:i,contents:s}))}ExternalCitation.displayName="ExternalCitation";var O=a(0xbe5e39b6),D=a(0x88d7fe76),F=a(0xc162e471),U=a(0x23033658b),B=a(0x1ab7b4693),H=a(0xbd3de346),W=a(0x6e20c837),V=a(0x1a80146c8),G=a(0x14ea3ce99);let q=(0,U.A)(function(...e){return(0,B.C)(...e)});function FileCitationHoverCard({url:e}){let t=(0,m.wA)(),{fileId:a}=(0,E.d4)(t=>(0,W.$N)(t,e))||{},r=(0,E.d4)(e=>(0,G.Lp)(e,a??"")),i=(0,n.useMemo)(()=>!(0,H.ZG)(r),[r]),l=(0,n.useCallback)(e=>{e.stopPropagation(),i||t((0,V.A)({fileId:a}))},[a,i,t]);return a?n.createElement(q,{fileId:a,forceClickStyles:!1,useListStyling:!1,className:L().fileCard,onClick:l}):null}function FileCitation({element:e,renderLink:t,clogCitationImpression:a,usePrivateNotation:r}){let{index:i,url:l,text:o}=e,s="";"citation_type"in e.details&&"file"===e.details.citation_type?s=e.details.descriptor:"citationType"in e.details&&"file"===e.details.citationType&&(s=e.details.descriptor);let c=(0,E.d4)(e=>(0,W.$N)(e,l)),d=c?.fileId,m=(0,E.d4)(e=>(0,G.Lp)(e,d??"")),u=(0,H.DQ)(m),p=!!(0,H.Jq)(m).length,h=(0,n.useCallback)(()=>n.createElement(FileCitationHoverCard,{url:l}),[l]),_=(0,n.useCallback)(()=>{a?.({link_type:u?"quip":"file",item_id:d})},[a,d,u]),f=(0,n.useMemo)(()=>{if(r)return n.createElement("div",{className:L().contents},n.createElement("b",null,i),"\xb7",n.createElement("div",{className:L().fileLabel},!p&&n.createElement(b.Ah,F.pH)," ",s))},[r,i,s,p]);return n.createElement(D.A,{position:O.yX.Right,renderContent:h,offsetX:4,isInline:!0,onOpen:_},n.createElement("span",{dir:"ltr"},t({text:o,url:l,contents:f})))}FileCitationHoverCard.displayName="FileCitationHoverCard",FileCitation.displayName="FileCitation";var j=a(0x12185e091),z=a(0x6d72337),K=a(0x217553e42);function MessageCitation({element:e,renderLink:t,clogCitationImpression:a,usePrivateNotation:r}){let{index:i,text:l,url:o}=e,s="",c="";"citation_type"in e.details&&"message"===e.details.citation_type?(s=e.details.channel,c=e.details.message_ts):"citationType"in e.details&&"message"===e.details.citationType&&(s=e.details.channel,c=e.details.messageTs);let d=(0,E.d4)(e=>(0,K.OL)(e,s)),m=(0,j.Zp)(d)||(0,j.JM)(d),u=(0,n.useCallback)(()=>{a?.({link_type:"message",item_id:c})},[a,c]),p=(0,n.useMemo)(()=>{if(r)return n.createElement("div",{className:L().contents},n.createElement("b",null,i),m&&n.createElement(b.Ah,F.pH))},[r,i,m]),h=n.createElement("span",{dir:"ltr"},t({text:l,url:o,contents:p}));return(0,z.OS)({channelId:s,ts:c,children:h,onOpen:u,overflowStrategy:"scroll"})||h}MessageCitation.displayName="MessageCitation";var $=a(0x2df5c552),Y=a(0x1a65aae75),Q=a(0xa5d8361b),Z=a(0x11a296110),J=a(0x20e80190e);let X=new h.Ay("search"),LlmLinkWarning=({url:e,onClose:t})=>{let a=X.t("Double-check this link"),r=X.t("Open link"),i=X.t("Cancel"),l=X.t("This link does not come from data in your Slack workspace. Make sure you trust this link before continuing.");return n.createElement(J.dW,{closeModal:t,isOpen:!0,centered:!0},n.createElement(J.rQ,null,n.createElement(J.Rc,{title:a})),n.createElement(J.$m,null,n.createElement(J.qf,null,n.createElement("p",null,l),n.createElement("p",{className:"break_word"},n.createElement("strong",null,e)))),n.createElement(J.jl,null,n.createElement(J.ox,null,n.createElement(J.s_,{type:"outline","aria-label":i},i),n.createElement(Z.Ay,{type:"danger",href:e,onClick:t},r))))};LlmLinkWarning.displayName="LlmLinkWarning";var ee=a(0x11c82607b),et=a(0x1fcbb004d),ea=a(0x46dbff89);let en=(0,ee.Ay)("Display a warning when clicking an LLM-created link",(e,t,{url:a})=>{let r=n.createElement(LlmLinkWarning,{url:a,onClose:()=>{e((0,et.O)())}});e((0,ea.q)({element:r}))});en.meta={name:"openLlmLinkDialog",key:"createThunkOpenLlmLinkDialog",description:"Display a warning when clicking an LLM-created link"};var er=a(0x1eae030b2),ei=a(0x14149c126);let Link=({element:e,clogLinkClick:t,clogCitationImpression:a,renderRichText:r,isFromAppHome:i=!1,noLinking:l,noTabbableContent:c=!1,shouldUseStreamingAnimation:d=!1,hideTooltip:u=!1})=>{let p,h,_=(0,m.wA)(),{type:f,style:b,url:g,text:y}=e;"from_llm"in e?p=e.from_llm:"fromLlm"in e&&(p=e.fromLlm),"is_slack_url"in e?h=e.is_slack_url:"isSlackUrl"in e&&(h=e.isSlackUrl);let A="on"===(0,E.d4)(e=>(0,ei._Z)(e,"slackbot_ai_missing_slug")),x=g?.trim()||"",C=y||x,k=C;"elements"in e&&e.elements&&(C=r(e.elements),k=e.elements.map(e=>"text"in e?e.text:"").join("")||"");let v=(0,n.useCallback)(e=>{p&&!h&&(_(en({url:x})),e.preventDefault())},[_,x,p,h]),S=(0,n.useCallback)(e=>{x&&k&&(0,Y.A)(k,x)&&(_((0,er.A)({text:k,url:x})),e.preventDefault())},[_,k,x]);if(f!==o.Lv.LINK||!x)return null;if(A&&p&&h){let e=null;return"string"==typeof k&&(e=n.createElement(s.A,{style:b},n.createElement("span",null,`${k} `))),n.createElement(n.Fragment,null,e,n.createElement($.A,{type:"link",showTooltip:!u,experimentSlackbotAiMissingSlugGroupOn:A}))}let I=(0,Q.A)(x,{allowNoTLD:!0}),w=n.createElement(R.Ay,{url:x,maybeOpenSuspiciousLinkDialog:S,maybeOpenLlmLinkDialog:v,clogLinkClick:t,clogCitationImpression:a,noLinking:!I||l,showTooltip:I&&!u,memberId:void 0,isFromAppHome:i,noTabbableContent:c},C),T=d?n.createElement(M.R,null,w):w;return n.createElement(s.A,{style:b},T)};Link.displayName="Link";var el=a(0xc4c1b6f5);function Citation({element:e,shouldUseStreamingAnimation:t,clogLinkClick:a,clogCitationImpression:r,renderRichText:i,noLinking:l,isFromAppHome:s,noTabbableContent:c,usePrivateNotation:d}){let{type:m,text:u,details:h}=e,_="citation_type"in h?h.citation_type:h.citationType,f=(0,n.useCallback)(e=>{if(d){let i=e.url?.trim()||"",o=(0,Q.A)(i,{allowNoTLD:!0}),m=n.createElement("span",{className:p()(L().citationLink,{[L().privateNotation]:d})},n.createElement(R.Ay,{url:e.url,clogCitationImpression:r,clogLinkClick:a,noLinking:!o||l,isFromAppHome:s,noTabbableContent:c,showTooltip:"external"===_},e.contents));return t?n.createElement(M.R,null,m):m}let m={text:e.text,url:e.url,type:o.Lv.LINK};return n.createElement("span",{className:L().citationLink},n.createElement(Link,{element:m,renderRichText:i,clogLinkClick:a,noLinking:l,isFromAppHome:s,noTabbableContent:c,shouldUseStreamingAnimation:t,hideTooltip:!0}))},[a,s,l,c,i,t,d,r,_]),b=(0,n.useMemo)(()=>({text:u,type:o.Lv.TEXT}),[u]),g=(0,n.useMemo)(()=>{switch(_){case"file":return n.createElement(FileCitation,{element:e,renderLink:f,clogCitationImpression:r,usePrivateNotation:d});case"message":return n.createElement(MessageCitation,{element:e,renderLink:f,clogCitationImpression:r,usePrivateNotation:d});case"external":return n.createElement(ExternalCitation,{element:e,renderLink:f});default:return n.createElement(el.A,{element:b})}},[_,e,f,r,d,b]);return m!==o.Lv.CITATION?null:t?n.createElement(M.R,null,g):g}Citation.displayName="Citation";var eo=a(0x1ccef1c6f);let Color=({element:e})=>{let t=(0,E.d4)(e=>(0,eo.ty)(e,"hide_hex_swatch")),a=(0,n.useCallback)(()=>({background:e.value}),[e.value]);return e.type===o.Lv.COLOR&&e.value?n.createElement(s.A,{style:e.style},e.value,!t&&n.createElement("div",{className:"c-mrkdwn__hex",style:a()})):null};Color.displayName="Color";var es=a(0x15611c98f);let RichTextDate=({element:e})=>{let t=(0,E.d4)(e=>(0,eo.ty)(e,"time24"));if(e.type!==o.Lv.DATE||!e.timestamp||!e.format)return null;let a=e.timestamp.toString();return n.createElement(s.A,{style:e.style},n.createElement(es.A,{ts:a,format:e.format,link:e.url,fallback:e.fallback,do24hrTime:t,timezone:e.timezone}))};RichTextDate.displayName="RichTextDate";var ec=a(0x13776886e),ed=a(0x44520056),em=a(0x4c96e5d9),eu=a(0x205570b9a);let{_EDITED_LABEL:ep}=o.Lv,eh=new h.Ay("message_kit"),EditedLabel=({element:e})=>{let t=(0,E.d4)(eu.H0),{type:a,editedTs:r,omitWhitespace:i,isArchived:l}=e,o=(0,n.useCallback)(()=>r?eh.t("{date} at {time}",{date:(0,ed.A)(r,{shortenMonth:!0}),time:(0,ec.A)(r,"{time}")}):null,[r]);if(a!==ep)return null;let s=eh.t("(edited)");l&&(s=t?eh.t("(resolved)"):eh.t("(archived)"));let c=n.createElement("span",{key:"edited",className:"c-message__edited_label",dir:"ltr"},!i&&"\xa0",s,!i&&"\xa0");return r?n.createElement(em.Ay,{key:"edited",delay:em.PK,tip:o},c):c};EditedLabel.displayName="EditedLabel";var e_=a(0x1b3ecb90f);let Emoji=({element:e,isImportAllowed:t,stopAnimations:a,isEmojiTooltipHidden:r=!1})=>{let i,l,c,d;"skin_tone"in e?i=e.skin_tone:"skinTone"in e&&(i=e.skinTone),"display_url"in e?l=e.display_url:"displayUrl"in e&&(l=e.displayUrl),"display_alias"in e?c=e.display_alias:"displayAlias"in e&&(c=e.displayAlias),"display_team_id"in e?d=e.display_team_id:"displayTeamId"in e&&(d=e.displayTeamId);let m=!!("isJumbomoji"in e&&e.isJumbomoji),{type:u,name:p,unicode:h}=e;if(u!==o.Lv.EMOJI||!p&&!h)return null;let _=c??p,f="";i&&!h&&(f=`:${_}::skin-tone-${i}:`),i||h||(f=`:${_}:`);let b=m?e_.lw.LARGE:e_.lw.MEDIUM;return n.createElement(s.A,{style:e.style},n.createElement(e_.Ay,{text:f,emojiSize:b,isEmojiInlineWithText:!m,isImportAllowed:t,showTooltip:!r,sourceTeamId:d,url:l,unicode:h,stopAnimations:a}))};Emoji.displayName="Emoji";var ef=a(0xdafb3627),eb=a(0x1d06c44fe),eg=a(0x1a0bfaf78),ey=a(0x223ac29bb),eA=a(0x1c91944c9),ex=a(0x9b971e7e);let{_EMOJI_GROUP:eE}=o.Lv,eC={display:"inline"},ek={display:"contents"},EmojiGroup=({element:e,renderRichText:t,displayText:a})=>{let{type:r,elements:i,size:l}=e;if(r!==eE||!i||!i.length||!t)return null;let o=t(i);if(!l||l<ef.uz||!a)return o;let s=(0,eg.Y)(a,l);return s?n.createElement("div",{style:eC,role:"img","aria-label":s},n.createElement("div",{style:ek,"aria-hidden":"true"},o)):o};EmojiGroup.displayName="EmojiGroup";let ev=(0,eA.N)((e,t)=>{let a,{name:n,displayAlias:r,skinTone:i}=t.element,l=r??n;if(l){let t=i?`:${l}::skin-tone-${i}:`:`:${l}:`,n=(0,ex.ZT)(e)||"",r=(0,ey.Yp)({teamOrEnterpriseId:n,recalc:!1});a=(0,eb.bR)({state:e,locale:r,name:t})}return{displayText:a||""}})(EmojiGroup);var eS=a(0x606e5546),eI=a(0x253acf1e2),ew=a(0xb5244e69),eT=a(0x18f2150ea);let{ORDERED:eN,CHECK:eM}=o.L1,RichTextList=({element:e,allowCheckList:t,renderRichText:a})=>{let{type:r,elements:i,start:l,offset:s,indent:c,checked:d,border:m,style:u,checklist:h}=e,_="index"in e?e.index:void 0,f="noBorderTopCap"in e?e.noBorderTopCap:void 0,g="noBorderBottomCap"in e?e.noBorderBottomCap:void 0,y=l&&l>0||(0,eT.A)(s)&&s>=0,A=_?_+1:void 0;y&&(A=l||(s??0)+1);let x=(0,n.useMemo)(()=>y?{counterReset:`list-${c??0} ${(A??1)-1}`}:void 0,[A,c,y]),E=(0,o.BS)({style:u,checklist:h}),C=E&&t;if(r!==o.Lv.LIST||!i||!i.length)return null;let k=i.map((e,t)=>{let r=E?e.checked??d:void 0;return e.elements?n.createElement("li",{key:t,"data-stringify-indent":c,"data-stringify-border":m,"data-checked":r},C&&n.createElement("span",{className:"p-rich_text_list__check_icon"},n.createElement(b.Ah,{name:r?"checkbox-filled":"square",size:"16",inline:!0})),a(e.elements)):null}),v=p()("p-rich_text_list",`p-rich_text_list__${E&&!t?"bullet":E?eM:u}`,"p-rich_text_list--nested"),S=f?0:void 0,I=g?0:void 0;return u===eN?n.createElement("ol",{"data-stringify-type":"ordered-list","data-list-tree":!0,className:v,"data-indent":c,"data-border":m,start:A,style:x,"data-border-radius-top-cap":S,"data-border-radius-bottom-cap":I},k):t&&E?n.createElement("ul",{"data-stringify-type":"check-list","data-list-tree":!0,className:v,"data-indent":c,"data-checked":d},k):n.createElement("ul",{"data-stringify-type":"unordered-list","data-list-tree":!0,className:v,"data-indent":c,"data-border":m,"data-border-radius-top-cap":S,"data-border-radius-bottom-cap":I},k)};RichTextList.displayName="RichTextList";var eR=a(0xf35bbf32),eP=a(0x193332968);let RichTextPreformatted=({element:e,renderRichText:t})=>{let{type:a,elements:r,border:i,language:l}=e;if(a!==o.Lv.PREFORMATTED||!r||!r.length)return null;let s=i&&i>0?"1":void 0;if(l){let e=r.map(e=>"link"===e.type?e.text??e.url:("text"in e?e.text:"")??"").join("");return n.createElement(eR.m,null,n.createElement("div",{className:"c-mrkdwn__pre","data-stringify-type":"pre","data-stringify-border":s},n.createElement(eP.N,{code:e,language:l})))}return n.createElement(eR.i,{blockType:"codeBlock"},n.createElement(eR.m,null,n.createElement("pre",{className:"c-mrkdwn__pre","data-stringify-type":"pre","data-stringify-border":s},n.createElement("div",{className:"p-rich_text_block--no-overflow"},t(r)))))};RichTextPreformatted.displayName="RichTextPreformatted";let RichTextQuote=({element:e,noBorderBottomCap:t,noBorderTopCap:a,noBorder:r,renderRichText:i})=>{let{type:l,elements:s,border:c}=e;return l===o.Lv.QUOTE&&s&&s.length?n.createElement("blockquote",{type:"cite",className:"c-mrkdwn__quote","data-stringify-type":"quote","data-stringify-border":c&&c>0?"1":void 0,"data-no-border":r?"":void 0,"data-border-radius-top-cap":!r&&a?0:void 0,"data-border-radius-bottom-cap":!r&&t?0:void 0},i(s)):null};RichTextQuote.displayName="RichTextQuote";let RichTextSection=({element:e,isFirst:t,renderRichText:a})=>{let{elements:r,type:i}=e;return i===o.Lv.SECTION&&r&&r.length?n.createElement("div",{className:"p-rich_text_section"},a(r,t)):null};RichTextSection.displayName="RichTextSection";var eL=a(0x7160cab5),eO=a(0x10027d8bc);let{_STOPPED_LABEL:eD}=o.Lv,eF=new h.Ay("message_kit"),StoppedLabel=({element:e})=>{let t=(0,E.d4)(eO.zM),{type:a,omitWhitespace:r}=e;if(a!==eD)return null;let i=t?eF.t("(stopped)"):"(stopped)";return n.createElement("span",{key:"stopped",className:"c-message__stopped_label",dir:"ltr"},!r&&"\xa0",i,!r&&"\xa0")};StoppedLabel.displayName="StoppedLabel";var eU=a(0x192c7bd66);let eB=new h.Ay("search"),Truncation=({element:e,clogLinkClick:t})=>{let a=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),t&&t({link_type:"truncate"})},[t]);return"isMessageTruncation"in e&&e.isMessageTruncation?n.createElement(n.Fragment,null,"\u2026"):n.createElement(em.Ay,{tip:eB.t("Show more")},n.createElement(Z.Nm,{className:"c-search__expand",onClick:a},n.createElement("span",{className:"c-search__expand_ellipsis"},"...")))};Truncation.displayName="Truncation";let eH=new h.Ay("search"),TruncationCollapseButton=({clogLinkClick:e})=>{let t=(0,n.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),e&&e({link_type:"message_collapse"})},[e]);return n.createElement(f.A,{className:"c-rich_text_collapse_button",onClick:t},eH.t("Show less"))};TruncationCollapseButton.displayName="TruncationCollapseButton";let eW=new h.Ay("search"),TruncationExpandButton=({element:e,btnCopy:t,clogLinkClick:a})=>{let r=(0,n.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),a&&a({e:t,link_type:e.isMessageTruncation?"message_expand":"truncate"})},[a,e.isMessageTruncation]);return e.isMessageTruncation?n.createElement(f.A,{className:"c-rich_text_expand_button",onClick:r},t??eW.t("Show more")):n.createElement(Z.Nm,{className:"c-search__expand",onClick:r,"data-qa":"search_expand"},n.createElement("span",{className:"c-search__expand_ellipsis"},t??`... ${eW.t("Show more")}`))};TruncationExpandButton.displayName="TruncationExpandButton";let eV=(0,a(0xf8dd7f80).getGenericLogger)(),UnknownElement=e=>{let{type:t,text:a,url:r,isFirstElementInFirstSection:i,isFirstElementInSection:l,noLinking:s,noTabbableContent:c,isFromAppHome:d,shouldUseStreamingAnimation:m,renderRichText:u}=e,p=(0,n.useMemo)(()=>({text:a||"",type:o.Lv.TEXT}),[a]),h=(0,n.useMemo)(()=>({text:a||"",url:r||"",type:o.Lv.LINK}),[a,r]);return(eV.warn("RICH_TEXT",`Encountered unknown rich text element of type: ${t}`),r)?n.createElement(Link,{element:h,noLinking:s,noTabbableContent:c,isFromAppHome:d,shouldUseStreamingAnimation:m,renderRichText:u}):a?n.createElement(el.A,{element:p,isFirstElementInFirstSection:i,isFirstElementInSection:l,shouldUseStreamingAnimation:e.shouldUseStreamingAnimation}):null};UnknownElement.displayName="UnknownElement";var eG=a(0x13f80610a),eq=a(0x124f71042),ej=a(0x12d2784bc);let noop=()=>{},UserElement=({element:e,clogLinkClick:t,clogCitationImpression:a,noLinking:r,dimmedUserIds:l,alwaysDisplayAsLink:c,noTabbableContent:d=!1,shouldUseStreamingAnimation:m=!1})=>{let u,p=(0,n.useContext)(eG.A),{channelId:h}=(0,n.useContext)(eq.A),_="user_id"in e?e.user_id:e.userId,f=(0,E.d4)(e=>"on"===(0,ei._Z)(e,"inline_non_member_mention_indicator")),b=(0,E.d4)(e=>{if(!h||!_||!f)return!0;let t=(0,ej.Sv)(e,h,_);return!t.isKnown||!1!==t.isMember});if(e.type!==o.Lv.USER||!_)return null;"fromLlm"in e?u=e.fromLlm:"from_llm"in e&&(u=e.from_llm);let g=f&&!b,y=l&&l.has(_),A=p.containerContext===i.pi.block_kit_builder?noop:void 0,x=n.createElement(I.A,{id:_,noLinking:r,showTooltip:!0,clogLinkClick:t,clogCitationImpression:a,onClick:A,supressLinkColors:y||g,alwaysDisplayAsLink:c,fromLlm:u,...g&&{isMemberOfContextChannel:b,contextChannelId:h},...d&&{tabIndex:-1}}),C=m?n.createElement(M.R,null,x):x;return n.createElement(s.A,{style:e.style},C)};UserElement.displayName="UserElement";var ez=a(0x14b2bf87b),eK=a(0x1a02c72b5),e$=a(0xd6a16321),eY=a(0x182c9b0b0),eQ=a(0x242503693),eZ=a(0x6b345e37),eJ=a(0xdeaf4051);let UserGroupElement=({element:e,onUserGroupClick:t,transitionFocusTo:a,navigate:r,noInlineLinks:i,alwaysDisplayAsLink:l,noTabbableContent:c=!1})=>{let d="usergroup_id"in e?e.usergroup_id:e.usergroupId,m=(0,n.useCallback)(e=>{e.preventDefault(),r&&d?r((0,e$.cu)(d)):t&&d&&t(d),a&&a({focusKey:eQ.Ay.VIEW_USER_GROUPS})},[t,a,d,r]);return e.type===o.Lv.USERGROUP&&d?n.createElement(s.A,{style:e.style},n.createElement(ez.Ay,{id:d,onClick:m,noLinking:i,alwaysDisplayAsLink:l,noTabbableContent:c})):null};UserGroupElement.displayName="UserGroupElement";let eX=(0,eA.N)(null,e=>({onUserGroupClick:t=>e((0,eJ.q)({groupId:t})),navigate:t=>e((0,eK.o)(t))}))((0,eY.A)((0,eZ.A)(UserGroupElement)));var e0=a(0x1fdec3e16);let Variable=({element:e})=>{let{_VARIABLE:t}=o.Lv,{type:a,name:r,style:i}=e;return a===t&&r?n.createElement(s.A,{style:i},n.createElement("div",{className:"p-variable"},n.createElement(b.Ah,{name:"css",inline:!0}),n.createElement("span",{className:"p-variable__name","data-qa":"block_kit_rich_text_variable_element__name"},n.createElement(e0.A,{lines:1},r)))):null};Variable.displayName="Variable";var e1=a(0x2311e848e),e2=a(0x231441bf2),e4=a(0x18d0e5cc9),e5=a(0x1cb9a6a00);let{CANVAS_MESSAGE_UNFURL:e3,_UNFURL_MENTION:e6}=o.Lv;var e8=a(0x15e60cfcd),e7=a(0x937b29a1);let{CITATION:e9}=o.Lv;var te=a(0xd9d6b679),tt=a(0x16728c81d),ta=a(0x6be85b50);let{_EDITED_LABEL:tn}=o.Lv;var tr=a(0x1c1e8557c);let{_EMOJI_GROUP:ti}=o.Lv;var tl=a(0x746e8582),to=a(0x2afd3d78),ts=a(0x108d007e0),tc=a(0x806fe6c8),td=a(0x958e0da2),tm=a(0x244dacb16),tu=a(0x1d6059cc2),tp=a(0xd2ef9f49);let{_STOPPED_LABEL:th}=o.Lv;var t_=a(0x1706ebf53);let{_THEME_INSTALL_BUTTON:tf}=o.Lv;var tb=a(0x15570922b),tg=a(0x727d8d2d),ty=a(0xa0368533),tA=a(0x23a9df45f),tx=a(0x80759cc4),tE=a(0xf6eb05c),tC=a(0x242251ce6),tk=a(0x3264c4f4);let{_TRUNCATION_COLLAPSE_BUTTON:tv}=o.Lv,RichTextRenderer=({elements:e,isFirst:t,clogLinkClick:a,clogCitationImpression:l,isEmojiImportEnabled:o,allowCheckList:s,blocksContainerContext:d,noInlineLinks:m,hideTruncationExpandBtn:u,truncationExpandBtnCopy:p,stopAnimations:h,dimmedUserIds:_,noTabbableContent:f,isEmojiTooltipHidden:b=!1,alwaysDisplayMentionsAsLinks:g=!1,streaming:y=!1,experimentCanvasAiSourceNotationGroupOn:A=!1})=>{let x=(0,n.useCallback)((e,t)=>n.createElement(RichTextRenderer,{elements:e,isFirst:t,isEmojiImportEnabled:o,blocksContainerContext:d,hideTruncationExpandBtn:u,truncationExpandBtnCopy:p,dimmedUserIds:_,noTabbableContent:f,isEmojiTooltipHidden:b,streaming:y,experimentCanvasAiSourceNotationGroupOn:A,clogCitationImpression:l,clogLinkClick:a,noInlineLinks:m,stopAnimations:h,alwaysDisplayMentionsAsLinks:g}),[o,d,u,p,_,f,b,y,A,l,a,m,h,g]);return e&&e.length?n.createElement(n.Fragment,null,(0,r.A)(e,(e,r)=>{let E=0===r,C=y&&!("elements"in e)&&!h&&d&&[i.pi.search_summary,i.pi.conversational_search,i.pi.canvas_ai_overlay,i.pi.slackbot_message].includes(d);return(0,tA.pb)(e)||(0,tA.Ns)(e)?n.createElement(UserElement,{element:e,key:r,clogLinkClick:a,noLinking:m,dimmedUserIds:_,alwaysDisplayAsLink:g,noTabbableContent:f,shouldUseStreamingAnimation:C,clogCitationImpression:l}):(0,tx.wA)(e)||(0,tx.qg)(e)?n.createElement(eX,{element:e,key:r,noInlineLinks:m,alwaysDisplayAsLink:g,noTabbableContent:f}):(0,e7.XQ)(e)||(0,e7.VI)(e)?n.createElement(Channel,{element:e,key:r,clogLinkClick:a,noLinking:m,alwaysDisplayAsLink:g,noTabbableContent:f,shouldUseStreamingAnimation:C,clogCitationImpression:l}):(0,tr.wK)(e)||(0,tr.Gm)(e)?n.createElement(Emoji,{element:e,key:r,isImportAllowed:o,stopAnimations:h,isEmojiTooltipHidden:b}):(0,t_.G)(e)?n.createElement(el.A,{element:e,key:r,isFirstElementInFirstSection:t&&E,isFirstElementInSection:E,shouldUseStreamingAnimation:C}):(0,to.j)(e)?n.createElement(Link,{element:e,key:r,clogLinkClick:a,clogCitationImpression:l,renderRichText:x,isFromAppHome:d===i.pi.app_home,noLinking:m,noTabbableContent:f,shouldUseStreamingAnimation:C}):(0,ta.p)(e)?n.createElement(RichTextDate,{element:e,key:r}):(0,e4.e)(e)?n.createElement(Broadcast,{element:e,key:r}):(0,tt.m)(e)?n.createElement(Color,{element:e,key:r}):(0,tk.MQ)(e)||(0,tk.eW)(e)?n.createElement(e2.Ay,{key:r,element:e}):e?.type===tn?n.createElement(EditedLabel,{element:e,key:r}):e?.type===th?n.createElement(StoppedLabel,{element:e,key:r}):e.type===tv?n.createElement(TruncationCollapseButton,{key:r,clogLinkClick:a}):(0,tb.bd)(e)?u?null:n.createElement(TruncationExpandButton,{element:e,key:r,btnCopy:p,clogLinkClick:a}):(0,tb.S0)(e)?n.createElement(Truncation,{element:e,clogLinkClick:a,key:r}):e?.type===tf?n.createElement(eU.A,{element:e,key:r}):e?.type===ti?n.createElement(ev,{element:e,key:r,renderRichText:x}):(0,tl.eZ)(e)||(0,tl.Y1)(e)||(0,tl.v1)(e)?n.createElement(eS.A,{element:e,key:r}):(0,e5.Et)(e)||(0,e5.mj)(e)?n.createElement(c.A,{element:e,key:r}):(0,e5.Fb)(e)?n.createElement(CanvasMention,{element:e,key:r}):(0,tC.x6)(e)||(0,tC.NJ)(e)?n.createElement(e1.M,{element:e,key:r}):(0,tc.f9)(e)||(0,tc.tj)(e)?n.createElement(eI.A,{element:e,key:r}):(0,td.Vx)(e)||(0,td.Zs)(e)?n.createElement(ew.O,{element:e,key:r}):e?.type===e3&&"root_message_ts"in e||e?.type===e3&&"rootMessageTs"in e||e?.type===e6&&"file_channel_message_ts"in e||e?.type===e6&&"fileChannelMessageTs"in e?n.createElement(CanvasMessageUnfurl,{element:e,key:r}):(0,e8.$I)(e)||(0,e8.FK)(e)?n.createElement(CanvasUserMention,{element:e,key:r,clogLinkClick:a,noLinking:m}):(0,tE.uM)(e)||(0,tE.QJ)(e)||(0,tE._7)(e)?n.createElement(Variable,{element:e,key:r}):(0,tu.Ns)(e)||(0,tu.Bf)(e)?n.createElement(eL.A,{element:e,key:r,noLinking:m}):e?.type===e9&&"details"in e&&"citation_type"in e.details||e?.type===e9&&"details"in e&&"citationType"in e.details?n.createElement(Citation,{element:e,renderRichText:x,key:r,clogLinkClick:a,clogCitationImpression:l,noLinking:m,noTabbableContent:f,shouldUseStreamingAnimation:C,usePrivateNotation:A}):(0,tp.c)(e)?n.createElement(RichTextSection,{element:e,key:r,renderRichText:x,isFirst:E}):(0,tm.L)(e)?n.createElement(RichTextQuote,{element:e,key:r,renderRichText:x}):(0,te.h)(e)?n.createElement(RichTextPreformatted,{element:e,key:r,renderRichText:x}):(0,ts.x)(e)?n.createElement(RichTextList,{element:e,key:r,allowCheckList:s,renderRichText:x}):n.createElement(UnknownElement,{type:e?.type,text:(0,tg.v)(e)?e.text:void 0,url:(0,ty.v)(e)?e.url:void 0,key:r,isFirstElementInFirstSection:t&&E,isFirstElementInSection:E,renderRichText:x,isFromAppHome:d===i.pi.app_home,noLinking:m,noTabbableContent:f,shouldUseStreamingAnimation:C})})):null};RichTextRenderer.displayName="RichTextRenderer";let tS=RichTextRenderer},0x7160cab5:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x128d54e52),c=a(0x1faa3f1ac),d=a(0x2501a2cee),m=a(0xc4e87e00),u=a(0xae58aee9),p=a(0xd7b35c2f),h=a(0x754ea859),_=a(0x1b351f9ab),f=a(0x144561e68),b=a(0x226892387),g=a(0x204000df3),y=a(0x14236acae),A=a(0x139951ee1);let x=new o.Ay("slack-docs"),{SALESFORCE_DATA_FIELD:E}=m.Lv,C={...A.J1,FieldNotAvailable:"field_not_available",Loading:"loading"};function formatErrorString(e){switch(e){case C.FieldNotAvailable:return x.t("Field not available");case C.Loading:return x.t("Loading\u2026");case C.RecordNotFound:return x.t("Record was deleted");case C.TokenNotFound:case C.AccessTokenExchangeFailed:return x.t("Salesforce org not connected");case C.InsufficientRecordAccess:return x.t("Insufficient record access");case C.SalesHomeUserConfigNotFound:return x.t("Requires Sales Elevate access");case C.UnsupportedObject:return x.t("Object not supported");case C.RestrictedAction:return x.t("Insufficient permissions");case C.SalesforceOrgNotFound:return x.t("Salesforce org not found");case C.InvalidAccess:return x.t("Invalid session");case C.ApiDisabled:case C.SalesforceTimeout:case C.SalesforceRateLimited:return x.t("Loading error");case C.ResourceNotFound:default:return x.t("Data field error")}}let SalesforceDataField=({element:e,noLinking:t})=>{let a,i,o,m,A,x,k,v=(0,r.wA)(),{type:S,style:I}=e,w="salesforce_record_id"in e?e.salesforce_record_id:e.salesforceRecordId;"salesforce_field_api_name"in e?a=e.salesforce_field_api_name:"salesforceFieldApiName"in e&&(a=e.salesforceFieldApiName),"salesforce_field_label"in e?i=e.salesforce_field_label:"salesforceFieldLabel"in e&&(i=e.salesforceFieldLabel),"include_field_label"in e?o=e.include_field_label:"includeFieldLabel"in e&&(o=e.includeFieldLabel);let T=(0,f.E)(w)||w,N=(0,b.d4)(e=>(0,y.PQ)(e,T,!0,p.f,p.i)),M=N.fields?.map(_.x),R=!1;if(N.error)k=formatErrorString(N.error);else if((0,g.x6)(N))k=formatErrorString(C.RecordNotFound);else if((0,g.Eh)(N))k=formatErrorString(C.Loading);else if(M&&M.length>0){let e=!1;for(let t of M)if(a&&t.apiName===a||!a&&i&&t.label===i){0===t.value.length&&(R=!0),m=t.value,A=t.label,x=t.apiName,e=!0;break}e||(k=formatErrorString(C.FieldNotAvailable))}else k=formatErrorString(C.FieldNotAvailable);let P=(0,n.useMemo)(()=>R?n.createElement(d.Ah,{name:"sf-cloud",inline:!0}):n.createElement(d.Ah,{name:"sf-cloud-filled",inline:!0}),[R]),L=(0,n.useMemo)(()=>k||(o&&A&&m?`${A}: ${m}`:m||A),[k,o,A,m]),O=(0,n.useCallback)(()=>P,[P]),D=(0,n.useMemo)(()=>n.createElement(s.CG,null,L),[L]),F=(0,n.useCallback)(e=>{e.preventDefault(),v((0,h.c)({recordId:T,fieldToScrollTo:x}))},[v,T,x]),U=(0,n.useMemo)(()=>n.createElement(u.A,{style:I},n.createElement(s.Ay,{size:"small",className:l()("p-rich_text_salesforce_data_field",{"p-rich_text_salesforce_data_field--disabled":!!k}),"data-id":T,"data-qa":"rich_text_salesforce_data_field_element",avatar:O,text:D})),[T,k,O,D,I]);return S===E&&w&&(a||i)&&L?t?n.createElement("span",null,L):k?U:n.createElement(c.A,{onClick:F},U):null};SalesforceDataField.displayName="SalesforceDataField";let k=SalesforceDataField},0xc4c1b6f5:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0xe180a236),i=a(0x24c261bcb),l=a(0x68248169),o=a(0x12edaa96a),s=a(0x1e37e0bc1),c=a(0xc4e87e00),d=a(0xae58aee9),m=a(0x52439b94);let u=/(?:\n[ \t\u00A0]*)+\n/g,p=/\n/g,h=/^\n/g,_=`BREAK:PARA:${(0,o.A)()}`,f=`BREAK:LINE:${(0,o.A)()}`,b=(0,o.A)();function insertTextBreakPlaceholders({text:e,placeholderSeparator:t,isFirstElementInSection:a}){if(!e||-1===e.indexOf(`
`))return e;let n=`${t}${_}${t}`,l=`${t}${f}${t}`,o=e;return a&&e.match(h)&&(o=`
${e}`),o.replace(u,e=>{if(!e)return e;let t=e.match(p),a=(0,r.A)(t)-1;return(0,i.A)(a,()=>n).join("")}).replace(p,()=>l)}let Text=({element:e,isFirstElementInFirstSection:t,isFirstElementInSection:a,shouldUseStreamingAnimation:r})=>{if(!e||e.type!==c.Lv.TEXT&&"cell_text"!==e.type&&"raw_text"!==e.type)return null;let{text:i}=e;if(!i)return null;let o=t?(0,l.A)(i):i,u=("rawLineBreaks"in e&&e.rawLineBreaks?o:insertTextBreakPlaceholders({text:o,placeholderSeparator:b,isFirstElementInSection:a})).split(b).map((t,a)=>{if(t===f)return n.createElement("br",{"aria-hidden":"true",key:a});if(t===_)return n.createElement("span",{"aria-label":s.f,className:"c-mrkdwn__br",key:a,"data-stringify-type":"paragraph-break"});if("	"===t)return n.createElement("span",{className:"c-mrkdwn__tab",key:a},"	");let i=r?n.createElement(m.R,null,t):t;return n.createElement(d.A,{key:a,style:"style"in e?e.style:void 0},i)});return n.createElement(n.Fragment,null,u)};Text.displayName="Text";let g=n.memo(Text)},0x192c7bd66:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0xc4e87e00),i=a(0x807220a2),l=a(0x19bf376f9),o=a(0x16cf1da63),s=a(0xd4e00a1e),c=a(0x9e671ad),d=a(0x20482ad21),m=a(0x4c96e5d9),u=a(0x15ef9d1c3),p=a(0xf5bbd10a),h=a(0x20df09e0a),_=a(0x226892387),f=a(0x1671e85cd),b=a(0x22da5e114);let g=new d.Ay("string_format"),y=(0,i.Ar)()?e=>{let t,a,r,i,d=(0,l.c)(18),{colors:y}=e,A=(0,o.wA)(),x=(0,_.d4)(f.tq),E=(0,p.A)(),[C,k]=(0,n.useState)(null);d[0]!==y||d[1]!==x?(t=(0,h.kv)({themePref:x,colors:y}),d[0]=y,d[1]=x,d[2]=t):t=d[2];let v=t,S=(0,s.A)(x,["primary","highlight1","highlight2","important"]),I=(0,s.A)(v,["primary","highlight1","highlight2","important"]),w=(0,c.A)(S,I);d[3]!==A||d[4]!==v||d[5]!==x?(a=()=>{v&&(k(x),A((0,b.c)(v)))},d[3]=A,d[4]=v,d[5]=x,d[6]=a):a=d[6];let T=a;d[7]!==A||d[8]!==C?(r=async()=>{await A((0,b.c)(C)),k(null)},d[7]=A,d[8]=C,d[9]=r):r=d[9];let N=r;if(!y)return E.warn("RICH_TEXT","Theme update button not rendered because colors are not provided."),null;if(w){let e;if(d[10]!==N||d[11]!==C){let t,a;d[13]===Symbol.for("react.memo_cache_sentinel")?(t={className:"display_flex gap_50"},a=n.createElement(m.Ay,{tip:g.t("This is your current Slack theme")},n.createElement("span",null,n.createElement(u.A,{isDisabled:!0,text:g.t("Apply Slack theme")}))),d[13]=t,d[14]=a):(t=d[13],a=d[14]),e=n.createElement("div",t,a,C&&n.createElement(u.A,{onClick:N,text:g.t("Undo")})),d[10]=N,d[11]=C,d[12]=e}else e=d[12];return e}if(d[15]!==T){let e;d[17]===Symbol.for("react.memo_cache_sentinel")?(e=g.t("Apply Slack theme"),d[17]=e):e=d[17],i=n.createElement(u.A,{onClick:T,text:e}),d[15]=T,d[16]=i}else i=d[16];return i}:({colors:e})=>{let t=(0,o.wA)(),a=(0,_.d4)(f.tq),r=(0,p.A)(),[i,l]=(0,n.useState)(null),d=(0,n.useMemo)(()=>(0,h.kv)({themePref:a,colors:e}),[e,a]),y=(0,n.useMemo)(()=>(0,s.A)(a,["primary","highlight1","highlight2","important"]),[a]),A=(0,n.useMemo)(()=>(0,s.A)(d,["primary","highlight1","highlight2","important"]),[d]),x=(0,c.A)(y,A),E=(0,n.useCallback)(()=>{d&&(l(a),t((0,b.c)(d)))},[t,d,a]),C=(0,n.useCallback)(async()=>{await t((0,b.c)(i)),l(null)},[t,i]);return e?x?n.createElement("div",{className:"display_flex gap_50"},n.createElement(m.Ay,{tip:g.t("This is your current Slack theme")},n.createElement("span",null,n.createElement(u.A,{isDisabled:!0,text:g.t("Apply Slack theme")}))),i&&n.createElement(u.A,{onClick:C,text:g.t("Undo")})):n.createElement(u.A,{onClick:E,text:g.t("Apply Slack theme")}):(r.warn("RICH_TEXT","Theme update button not rendered because colors are not provided."),null)};y.displayName="ThemeIa4InstallButton";let ThemeInstallButton=({element:e})=>{let{type:t,colors:a}=e;return t===r.Lv._THEME_INSTALL_BUTTON&&a&&a.length&&a.every(e=>(0,h.o1)(e))?n.createElement("div",{className:"p-rich_text_block__theme_install_btn_wrapper"},n.createElement(y,{colors:a})):null};ThemeInstallButton.displayName="ThemeInstallButton";let A=ThemeInstallButton},0x2311e848e:(e,t,a)=>{"use strict";a.d(t,{M:()=>WorkflowMention});var n=a(0xbad225b5),r=a(0x339b339c),i=a(0x1a919df7f),l=a(0x7b75c8ef),o=a(0x17348142),s=a(0xc4e87e00),c=a(0x226892387);let{WORKFLOW_MENTION:d}=s.Lv,WorkflowMention=({element:e,noLinking:t})=>{let a="function_trigger_id"in e?e.function_trigger_id:e.functionTriggerId,s="workflow_id"in e?e.workflow_id:e.workflowId,{type:m,text:u,url:p,style:h}=e,{label:_,iconName:f,isDisabled:b,isLoading:g}=(0,c.Z2)(e=>(0,i.q)(e,{functionTriggerId:a,text:u}));if(m!==d||g)return n.createElement(r.A,null);let y=n.createElement(o.d,{label:_,iconName:f,url:p,id:s,dataQa:"rich_text_workflow_mention_element",noLinking:t,style:h,isDisabled:b});return t||b?y:n.createElement(l.v,{url:p},n.createElement("span",null,y))};WorkflowMention.displayName="WorkflowMention"},0x231441bf2:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>T,Dt:()=>PreviewMember,GZ:()=>PreviewChannel,UR:()=>PreviewText,Zs:()=>S,kA:()=>I,pE:()=>v,xH:()=>MissingData});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x1cbdfeceb),c=a(0x21f3c49e8),d=a(0x20482ad21),m=a(0x1faa3f1ac),u=a(0x2501a2cee),p=a(0x13f7d86f3),h=a(0x668181b3),_=a(0x20570d71a),f=a(0xcaee4748),b=a(0xc4c1b6f5),g=a(0xc4e87e00),y=a(0xae58aee9),A=a(0x145d46a61),x=a(0x1795d8821),E=a(0x192814923),C=a(0x1ec8ed0f0),k=a(0x226892387),v=((n={}).WORKFLOW_EDITOR="workflow_editor",n.WORKFLOW_TEMPLATES="workflow_templates",n.WORKFLOW_DETAILS="workflow_details",n);let S=(0,r.createContext)(null),I=(0,r.createContext)(null),w=new d.Ay("workflow_builder"),preventDefault=e=>{e.preventDefault()},buildLabel=({variable:e,defaultLabel:t,prependText:a})=>e?.label?`${a??""}${e?.label}`:t,MissingData=({style:e,workflowId:t})=>{let a=(0,i.wA)(),n=(0,k.d4)(A.eF);return(0,r.useEffect)(()=>(n&&a((0,C.rQ)({workflowId:t,hasMissingVariableData:!0})),()=>{n&&a((0,C.rQ)({workflowId:t,hasMissingVariableData:!1}))}),[a,n,t]),r.createElement(y.A,{style:e},r.createElement("span",{className:"p-workflowtoken--error"},r.createElement(u.Ah,{name:"css",inline:!0})," ",w.t("Missing Data")))};MissingData.displayName="MissingData";let PreviewText=({style:e,variable:t,showError:a=!1})=>{let n=buildLabel({variable:t,defaultLabel:w.t("Variable text")}),i=(0,r.useMemo)(()=>({text:n||"",style:e,type:g.Lv.TEXT}),[n,e]);return r.createElement("span",{className:"p-workflowtoken__text"},r.createElement(m.A,{href:"#",className:o()("c-member_slug c-member_slug--link",{"p-workflowtoken--error":a}),onClick:preventDefault,tabIndex:-1,"aria-hidden":!0,disabled:!0},r.createElement(b.A,{element:i})))};PreviewText.displayName="PreviewText";let PreviewMember=({style:e,showError:t=!1,variable:a,isWfbEditorContext:n})=>r.createElement("span",{className:"p-workflowtoken__user"},r.createElement(y.A,{style:e},r.createElement(f.A,{id:"preview-user",className:o()("c-link--disabled",{"p-workflowtoken--error":t}),tabIndex:-1,ariaHidden:!0,showTooltip:!1,onClick:s.A,variableLabel:n?buildLabel({variable:a,defaultLabel:""}):void 0,supressMentionAtSymbol:!!(n&&a)}))),PreviewChannel=({style:e,variable:t,showError:a=!1})=>r.createElement("span",{className:"p-workflowtoken__channel"},r.createElement(y.A,{style:e},r.createElement(m.A,{href:"#",className:o()("c-member_slug c-member_slug--link",{"p-workflowtoken--error":a}),onClick:preventDefault,tabIndex:-1,"aria-hidden":!0,disabled:!0},buildLabel({variable:t,defaultLabel:w.t("#variable-channel"),prependText:"#"}))));PreviewChannel.displayName="PreviewChannel";let WorkflowToken=({element:e})=>{let t="data_type"in e?e.data_type:e.dataType,{id:a,style:n}=e,i=(0,_.Y)(),l=(0,r.useContext)(S),o=(0,r.useContext)(I),s=(0,r.useMemo)(()=>{if(l&&"string"==typeof a)return(0,h.x)(l,a)},[l,a]);if(!a||!t||!l||(0,c.A)(l))return null;if(!s||s.isTombstone)return r.createElement(MissingData,{workflowId:i,style:n});let d=null,m=t,u=!s.isAvailable;switch((0,p.L4)(s)&&(u=!s.isAvailable||!(0,E.z)({id:a,type:t},s),m=s.type),m){case x.TE.SlackTypesUserId:case x.TE.SlackTypesUsergroupId:d=r.createElement(PreviewMember,{style:n,showError:u,variable:s,isWfbEditorContext:"workflow_editor"===o||"workflow_details"===o});break;case x.TE.SlackTypesChannelId:d=r.createElement(PreviewChannel,{style:n,variable:s,showError:u});break;default:d=r.createElement(PreviewText,{style:n,variable:s,showError:u})}return d};WorkflowToken.displayName="WorkflowToken";let T=WorkflowToken},0x93f78b39:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x20b4dda68),i=a(0x129074070),l=a(0xc4e87e00),o=a(0x7bc42e7e),s=a(0x21d6ed371),c=a(0x15c7516a2),d=a(0x1337d9fa2),m=a(0x9b971e7e),u=a(0xb7a990a9),p=a(0x13d13a68b),h=a(0x226892387),_=a(0xd93ecf94);let RichText=({containerMessageChannelId:e,containerMessageTs:t,type:a,elements:f,disableHighlights:b,inline:g,allowCheckList:y,clogLinkClick:A,clogCitationImpression:x,isMessagePreview:E=!1,blocksContainerContext:C,noInlineLinks:k,suppressRichTextEditedLabel:v,blocksArePreProcessed:S,stopAnimations:I,dimmedUserIds:w,noTabbableContent:T,disableJumboEmoji:N=!1,isEmojiTooltipHidden:M=!1,alwaysDisplayMentionsAsLinks:R=!1,streaming:P=!1,suppressRichTextStoppedLabel:L=!1})=>{let O=(0,h.d4)(a=>E?null:(0,_.Ld)(a,e||"",t||"")),D=(0,h.d4)(m.ZT),F=(0,h.d4)(p.A),U=(0,h.d4)(o.P),B=(0,h.d4)(u.A);if(a!==l.Lv.RICH_TEXT)return null;let H=!!O?.document_comment&&!!O?.document_comment?.is_archived;return n.createElement(i.A,{elements:f,teamId:D,highlightWords:b?void 0:B,isJumbomojiEnabled:!N&&F,isEmojiDisplayedAsText:U,isEmojiImportEnabled:!!O,inline:g,allowCheckList:y,clogLinkClick:A,clogCitationImpression:x,editedTs:(0,s.nZ)(O)?(0,s.M8)(O):void 0,meMessage:"me_message"===(0,d.ys)(O),addDirectionAttr:parseInt((0,c.j)(O)||"",10)>r.lj,isArchived:H,blocksContainerContext:C,noInlineLinks:k,suppressRichTextEditedLabel:v,blocksArePreProcessed:S,stopAnimations:I,dimmedUserIds:w,noTabbableContent:T,isEmojiTooltipHidden:M,alwaysDisplayMentionsAsLinks:R,streaming:P,isStopped:!L&&O?.ai_context?.result_status==="stopped_by_user"})};RichText.displayName="RichText";let f=n.memo(RichText)},0xcd092f8c:(e,t,a)=>{"use strict";a.d(t,{y:()=>SimpleRichTextPreview});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1595bdd0),l=a(0x15fb82076),o=a(0xcaee4748),s=a(0x15611c98f),c=a(0x1f13c844e),d=a(0x45ad3b82),m=a(0x14b2bf87b),u=a(0xdede1f0e),p=a(0x606e5546),h=a(0x253acf1e2),_=a(0xb5244e69),f=a(0x7160cab5),b=a(0x2311e848e),g=a(0xc4e87e00),y=a(0x1a65aae75),A=a(0x19b0e0f0e),x=a(0xae58aee9),E=a(0x1b3ecb90f),C=a(0x18d0e5cc9),k=a(0x1cb9a6a00),v=a(0x15e60cfcd),S=a(0x937b29a1),I=a(0x16728c81d),w=a(0x6be85b50),T=a(0x1c1e8557c),N=a(0x746e8582),M=a(0x2afd3d78),R=a(0x108d007e0),P=a(0x806fe6c8),L=a(0x958e0da2),O=a(0x1d6059cc2),D=a(0x1706ebf53),F=a(0x23a9df45f),U=a(0x80759cc4),B=a(0x242251ce6),H=a(0xf8862d23),W=a(0x89f31bdb),V=a(0x1266f1359),G=a(0x207424b3e);function getUnicodeNameFromEmojiString(e,t){if(!t||!e||!(0,H.d)(e))return"";let a=(0,V.$D)(t),n=(0,W.O)(a);return(0,G.v)(n)[e]}var q=a(0xc713b32c),j=a(0x9b971e7e),z=a(0x1ccef1c6f),K=a(0x1eae030b2),$=a(0x226892387);let SimpleRichTextPreview=({richTextBlock:e,emojiSize:t,truncateLength:a,maxNewlines:H=1,withFormattingStyles:W,withHighlights:V,withSlackLinks:G,withHyperlinks:Y})=>{let Q=(0,r.wA)(),Z=(0,$.d4)(e=>(0,z.ty)(e,"suppress_link_warning")),J=(0,$.d4)(e=>(0,z.ty)(e,"time24")),X=(0,$.d4)(j.JY),ee=(0,n.useCallback)(e=>{if(!Z){let{href:t,innerText:a}=e.target;Q((0,K.A)({text:a,url:t})),e.preventDefault()}},[Q,Z]);if(!e?.elements?.length)return null;let et=0,makeKey=()=>et+=1,ea=(0,A.M)(e.elements),en=[];for(let e of ea)(0,R.C)(e)?e.elements.forEach((t,a)=>{let r=e.style===g.L1.ORDERED?n.createElement(n.Fragment,{key:makeKey()},a+1,". "):n.createElement(n.Fragment,{key:makeKey()},"\u2022 ");en.push({section:t,listPrefix:r})}):en.push({section:e});if(!en.length)return null;let er=H-1,ei=!1,el=0,eo=[];for(let[e,{section:r,listPrefix:i}]of en.entries()){if(ei)break;if(r?.elements?.length){if(e>0){if(er<=0){ei=!0;break}er-=1,eo.push(n.createElement("br",{key:makeKey()}))}for(let e of(i&&eo.push(i),r.elements)){if(ei)break;let r=null;if((0,T.E2)(e)){el+=1;let a=e.name,i=e.skin_tone,l=e.display_team_id,o=e.display_alias,s=e?.unicode,c=o??a,d=(0,q.A)(c,X),m=i?`:${c}::skin-tone-${i}:`:`:${c}:`;if(d&&s){let e=getUnicodeNameFromEmojiString(s,X??"");e&&(m=`:${e}:`)}let u=e.display_url;r=n.createElement(E.Ay,{key:makeKey(),text:m,emojiSize:t||E.lw.MEDIUM,isEmojiInlineWithText:!0,showTooltip:!0,sourceTeamId:l,url:u})}else if((0,S.P9)(e)&&e?.channel_id)el+=e.channel_id.length,r=n.createElement(d.A,{key:makeKey(),id:e.channel_id,noLinking:!G});else if(((0,F.H1)(e)||(0,v.nn)(e)||e.type===g.Lv._CANVAS_USER_MENTION)&&"user_id"in e&&e?.user_id)el+=e.user_id.length,r=n.createElement(o.A,{key:makeKey(),id:e.user_id,noLinking:!G,noHighlights:!V});else if((0,U.GH)(e)&&e?.usergroup_id)el+=e.usergroup_id.length,r=n.createElement(m.Ay,{key:makeKey(),id:e.usergroup_id,noLinking:!G,noHighlights:!V});else if((0,C.V)(e)&&e?.range)el+=e.range.length,r=n.createElement(c.A,{key:makeKey(),type:e.range,noLinking:!G,noHighlights:!V});else if((0,N.Ai)(e))el+=e.file_id.length,r=n.createElement(p.A,{key:makeKey(),element:e,noLinking:!G});else if((0,k.c3)(e))el+=e.file_id.length,r=n.createElement(u.A,{key:makeKey(),element:e,noLinking:!G});else if((0,P.DW)(e))el+=e.file_id.length,r=n.createElement(h.A,{key:makeKey(),element:e,noLinking:!G});else if((0,L.hk)(e))el+=e.channel_id.length+e.message_ts.length,r=n.createElement(_.O,{key:makeKey(),element:e,noLinking:!G});else if((0,B.$K)(e))el+=e.text.length,r=n.createElement(b.M,{key:makeKey(),element:e,noLinking:!G});else if((0,w.i)(e)){let{timestamp:t,format:a,fallback:i,timezone:l}=e;if(!t||!a)continue;el+=i?i.length:0,r=n.createElement(s.A,{key:makeKey(),ts:t.toString(),format:a,fallback:i,do24hrTime:J,timezone:l,noLinking:!G})}else if((0,O.Vn)(e))el+=e.salesforce_field_label?.length??e.salesforce_field_api_name?.length??0,r=n.createElement(f.A,{key:makeKey(),element:e,noLinking:!0});else if((0,M._)(e)){let t="text"in e?e.text:"",a="url"in e?e.url:"",i=t||a||"";el+=i.length,r=Y?(0,y.A)(i,a)?n.createElement(l.A,{key:makeKey(),href:a,onClick:ee},i):n.createElement(l.A,{key:makeKey(),href:a},i):n.createElement(n.Fragment,{key:makeKey()},i)}else if((0,I.f)(e)&&e?.value)el+=e.value.length,r=n.createElement(n.Fragment,{key:makeKey()},e.value||"");else if((0,D.P)(e)&&e.text){let t=e.text.split(/\n/),i=[];for(let e=0;e<t.length;e++){if(e>0){if(er<=0){ei=!0;break}er-=1}let n=t[e],r=a?a-el:el;if(el=n?el+n.length:el,n&&a&&n.length>r&&(ei=!0,n=n.substr(0,r)),i.push(n),ei)break}i.length<t.length&&(ei=!0),r=n.createElement(n.Fragment,{key:makeKey()},i.map((e,t)=>n.createElement(n.Fragment,{key:makeKey()},t>0&&n.createElement("br",null),e)))}if(W&&(r=n.createElement(x.A,{key:makeKey(),style:e.style},r)),r){eo.push(r);continue}a&&!ei&&el>a&&(ei=!0)}}}return n.createElement(n.Fragment,null,(0,i.A)(eo),ei&&n.createElement(n.Fragment,null,"\u2026"))};SimpleRichTextPreview.displayName="SimpleRichTextPreview"},0x7b75c8ef:(e,t,a)=>{"use strict";a.d(t,{v:()=>MentionContextMenuTrigger});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2501a2cee),l=a(0x10ac11625),o=a(0x11253e6a6),s=a(0xd843ab47),c=a(0x1ed767a16),d=a(0x24558b75f),m=a(0x226892387),u=a(0x14149c126);let p=new r.Ay("message");function MentionContextMenuTrigger({children:e,url:t,onOpenInSplitViewClick:a,onOpenInNewWindowClick:r,additionalMenuItems:h}){let _=(0,m.d4)(e=>"on"===(0,u._Z)(e,"fe_link_tokenization")),f=(0,l.b)(),b=(0,d.M2)(),{isChildWindow:g}=(0,n.useContext)(s.A),y=b&&!g,A=(0,n.useCallback)(()=>{let e=[{label:_?p.t("Copy link"):"Copy link",icon:n.createElement(i.Ah,{name:"link"}),click:()=>(0,c.x3)(t)}];return f&&a&&e.push({label:_?p.t("Open in split view",{fallbackHashNs:"menu",fallbackHash:"03a322d0f4dc6adfdbcfacecb16845f9dc08a82f"}):"Open in split view",icon:n.createElement(i.Ah,{name:"move-to-split-view"}),click:a}),y&&r&&e.push({label:_?p.t("Open in new window"):"Open in new window",icon:n.createElement(i.Ah,{name:"open-in-window"}),click:r}),h?.length&&(e.push({type:"separator"}),e.push(...h)),e},[_,f,a,y,r,h,t]);return _&&t?n.createElement(o.A,{desktopAppOnly:!1,showSlackKitContextMenuOnDesktop:!0,getTemplate:A},e):e}MentionContextMenuTrigger.displayName="MentionContextMenuTrigger"},0x17348142:(e,t,a)=>{"use strict";a.d(t,{d:()=>RichTextSlug});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x128d54e52),o=a(0x1faa3f1ac),s=a(0x2501a2cee),c=a(0xae58aee9);function RichTextSlug({label:e,iconName:t,url:a,id:r,onClick:d,isDisabled:m,className:u,dataQa:p,noLinking:h,style:_,noTabbableContent:f,truncate:b=!1}){let g=(0,n.useCallback)(()=>n.createElement(s.Ah,{name:t,inline:!0}),[t]),y=(0,n.useCallback)(e=>{e.stopPropagation(),d?.(e)},[d]),A=(0,n.useMemo)(()=>n.createElement(l.CG,{truncate:b},n.createElement(c.A,{style:_},e)),[e,_,b]),x=n.createElement(l.Ay,{size:"small",avatar:g,text:A,className:i()("p-rich_text_slug",u,{"p-rich_text_slug--disabled":m,"p-rich_text_slug--truncate":b}),"data-id":r,"data-qa":p,"data-stringify-type":"replace","data-stringify-text":a});return!h&&(d||a)?d?n.createElement(o.A,{renderAsSpan:!b,underlineStyle:"inherit",onClick:y,...f&&{tabIndex:-1}},x):n.createElement(o.A,{href:a,underlineStyle:"inherit"},x):x}RichTextSlug.displayName="RichTextSlug"},0x2043404b0:(e,t,a)=>{"use strict";a.d(t,{A:()=>TruncatedRichText});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x129074070);function TruncatedRichText({elements:e,teamId:t,highlightWords:a,isJumbomojiEnabled:l=!1,isEmojiDisplayedAsText:o=!1,clogLinkClick:s=r.A,sourceTeamId:c,editedTs:d,isArchived:m=!1,maxChars:u=700,maxLines:p=5,doExpand:h=!0,onExpand:_=r.A,hideTruncationExpandBtn:f,truncationExpandBtnCopy:b,dimmedUserIds:g,streaming:y=!1,blocksContainerContext:A,isStopped:x=!1}){let[E,C]=(0,n.useState)(!1);return n.createElement(i.A,{elements:e,teamId:t,highlightWords:a,isJumbomojiEnabled:l,isEmojiDisplayedAsText:o,inline:!1,clogLinkClick:e=>{e?.link_type==="message_expand"&&(h&&C(!0),_(e?.e)),e?.link_type==="message_collapse"&&C(!1),s(e)},sourceTeamId:c,editedTs:d,addDirectionAttr:!0,isExpanded:E,truncateMaxCharacters:u,truncateMaxNewLines:p,isArchived:m,hideTruncationExpandBtn:f,truncationExpandBtnCopy:b,dimmedUserIds:g,streaming:y,blocksContainerContext:A,isStopped:x})}TruncatedRichText.displayName="TruncatedRichText"},0x19b0e0f0e:(e,t,a)=>{"use strict";a.d(t,{M:()=>decorateInlineCode});var n=a(0x1db69cda),r=a(0x5a9acf69);function decorateInlineCode(e){return(0,r.A)(e,e=>{let t=e&&e.elements;if(!t?.length)return e;let a=[],isCode=e=>e&&e.style&&e.style.code,r=null;return t.forEach(e=>{let t=isCode(e)?(0,n.A)(e):e;r&&r?.style&&t?.style&&isCode(r)&&isCode(t)&&(r.style.noRightCap=!0,t.style.noLeftCap=!0),a.push(t),r=t}),{...e,elements:a}})}},0xae58aee9:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xf35bbf32);let WithFormattingStyles=({children:e,style:t})=>{let a;if(!e)return null;let r=t||{},{bold:o,italic:s,underline:c,strike:d,code:m}=r;"clientHighlight"in r?a=r.clientHighlight:"client_highlight"in r&&(a=r.client_highlight);let u=!!("noLeftCap"in r&&r.noLeftCap),p=!!("noRightCap"in r&&r.noRightCap),h=e;if(d&&(h=n.createElement("s",{"data-stringify-type":"strike"},h)),s&&(h=n.createElement("i",{"data-stringify-type":"italic"},h)),c&&(h=n.createElement("u",{"data-stringify-type":"underline"},h)),o&&(h=n.createElement("b",{"data-stringify-type":"bold"},h)),a&&(h=n.createElement("span",{className:"c-mrkdwn__highlight"},h)),m){let e=i()("c-mrkdwn__code",{"c-mrkdwn__code--no_left_cap":u,"c-mrkdwn__code--no_right_cap":p});h=n.createElement(l.i,{blockType:"code"},n.createElement(l.m,null,n.createElement("code",{"data-stringify-type":"code",className:e},h)))}return n.createElement(n.Fragment,null,h)};WithFormattingStyles.displayName="WithFormattingStyles";let o=WithFormattingStyles},0x52439b94:(e,t,a)=>{"use strict";a.d(t,{R:()=>WithStreamingAnimation});var n=a(0xbad225b5),r=a(0x10027d8bc),i=a(0x226892387),l=a(0x14149c126);let WithStreamingAnimation=({children:e})=>{let[t,a]=(0,n.useState)("string"==typeof e?[e]:[]),[o,s]=(0,n.useState)("string"==typeof e?e:""),c=(0,i.d4)(e=>"on"===(0,l._Z)(e,"animated_text_streaming")),d=(0,i.d4)(r.aY),m=(0,n.useCallback)((e,t)=>d||c?`${e}-${t}`:e,[c,d]);return((0,n.useEffect)(()=>{"string"==typeof e&&e!==o&&(a([...t,e.split(o)[1]]),s(e))},[e,o,t]),e)?"string"!=typeof e?n.createElement("span",{className:"p-rich_text_block__fade-in"},e):n.createElement("span",{className:"p-rich_text_block__animate_container"},t.map((e,t)=>n.createElement("span",{key:m(e,t),className:"p-rich_text_block__animate"},e))):e};WithStreamingAnimation.displayName="WithStreamingAnimation"},0xf82edfcd:(e,t,a)=>{"use strict";a.d(t,{$Z:()=>m,D4:()=>x,E9:()=>f,EO:()=>g,FG:()=>E,GQ:()=>c,Gx:()=>l,Hh:()=>u,L1:()=>A,NO:()=>b,Nk:()=>_,Om:()=>h,PF:()=>addActionIdsToSectionBlock,RJ:()=>d,Yo:()=>C,_p:()=>s,fC:()=>o,i9:()=>r,mf:()=>i,oc:()=>p,rE:()=>y});var n=a(0xd8d34930);let r={type:"section",text:(0,n.jm)("This is a plain text section block.")},i={type:"section",text:(0,n.R4)("This is a mrkdwn section block :ghost: *this is bold*, and ~this is crossed out~, and <https://google.com|this is a link>")},l={type:"section",fields:(0,n.bT)()},o={type:"section",text:(0,n.R4)("Test block with users select"),accessory:(0,n.v7)()},s={type:"section",text:(0,n.R4)("Test block with multi conversations select"),accessory:(0,n.KH)()},c={type:"section",text:(0,n.R4)("Test block with multi static select"),accessory:(0,n.wt)()};(0,n.R4)("Pick your all time favorite slack channel"),(0,n.h9)();let d={type:"section",text:(0,n.R4)("Pick an item from the dropdown list"),accessory:(0,n.t6)()};(0,n.R4)("This is a section block with a conversations dropdown."),(0,n.fX)();let m={type:"section",text:(0,n.R4)("This is a section block with a button."),accessory:(0,n.bW)()},u={type:"section",text:(0,n.R4)("This is a section block with a button."),accessory:(0,n.Rp)()},p={type:"section",text:(0,n.R4)("This is a section block with an accessory image."),accessory:(0,n.g0)()},h={type:"section",text:(0,n.R4)("This is a section block with an accessory image."),accessory:(0,n.Id)()},_={type:"section",text:(0,n.R4)(`Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.

 *Please select a restaurant:*`)},f={type:"section",text:(0,n.R4)(`*Farmhouse Thai Cuisine*
:star::star::star::star: 1528 reviews
 They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here`),accessory:(0,n.ZM)("https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg")},b={type:"section",text:(0,n.R4)(`*Kin Khao*
:star::star::star::star: 1638 reviews
 The sticky rice also goes wonderfully with the caramelized pork belly, which is absolutely melt-in-your-mouth and so soft.`),accessory:(0,n.ZM)("https://s3-media2.fl.yelpcdn.com/bphoto/korel-1YjNtFtJlMTaC26A/o.jpg")},g={type:"section",text:(0,n.R4)(`*Ler Ros*
:star::star::star::star: 2082 reviews
 I would really recommend the  Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili & rice powder.`),accessory:(0,n.ZM)("https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg")},y={type:"section",text:(0,n.R4)("This is a section block with an overflow menu."),accessory:(0,n.hC)()},A={type:"section",text:(0,n.R4)("This is a section block with checkboxes."),accessory:(0,n.VN)()};(0,n.R4)("This is a section block with checkboxes."),(0,n.VH)();let x={type:"section",text:(0,n.R4)("Pick a date for the deadline."),accessory:(0,n.vV)()};(0,n.R4)("Section block with an external select"),(0,n.GX)();let E={type:"section",text:(0,n.R4)("Section block with radio buttons"),accessory:(0,n.D)()},C={type:"section",text:(0,n.R4)("Section block with a timepicker"),accessory:(0,n.Im)()},addActionIdsToSectionBlock=e=>({...e,accessory:{...e.accessory,action_id:`${e.accessory.type}-action`}})},0x1aa51a8e2:(e,t,a)=>{"use strict";a.r(t),a.d(t,{ForwardMessageShareablePromptsCoachmark:()=>ForwardMessageShareablePromptsCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xb90de824),o=a(0x13953efe6),s=a(0x1feae9b59),c=a(0x226892387),d=a(0x14149c126),m=a(0xb9604b6),u=a(0x20061cab9),p=a(0x5b1935a6),h=a(0x1d19775cc),_=a.n(h);let f=new i.Ay("shareable_prompts"),ForwardMessageShareablePromptsCoachmark=({children:e,channelScopedId:t})=>{let a=(0,r.wA)(),{setHover:i}=(0,s.rd)(),[h,b]=(0,n.useState)(o.YC.TopLeft),g="on"===(0,c.d4)(e=>(0,d._Z)(e,"shareable_prompt_slackbot")),y=(0,c.d4)(e=>(0,m.Hp)(e,p.xu.IN_PRODUCT_COACHMARK,t))===p.ze.PLATFORM_FORWARD_MESSAGE_SHAREABLE_PROMPTS_COACHMARK&&g,A=(0,n.useCallback)(e=>{let t=e.top<400?o.YC.BottomLeft:o.YC.TopLeft;b(e=>e!==t?t:e)},[]);(0,n.useEffect)(()=>(y&&i&&i(!0),()=>{y&&i&&i(!1)}),[y,i]);let x=(0,n.useCallback)(()=>{a((0,u.Ay)({spaceName:p.xu.IN_PRODUCT_COACHMARK,action:p.hw.DISMISS,channelId:t}))},[a,t]),E=f.t("You can forward any message in this conversation to create a prompt for others to use.",{fallbackHash:"8d326d841194f6ff8e51f6bc7b11eddf5e8322e8"}),C=(0,n.useMemo)(()=>n.createElement("p",{className:_().description},E),[E]),k=(0,n.useMemo)(()=>n.createElement(l.Ay,{isOpen:y,arrowPosition:95,bodyText:C,centerOnArrow:!1,alignActionsRight:!1,closeBackgroundStyle:"light",closeCoachmark:x,offsetX:-10,offsetY:0,title:g?f.t("You\u2019re onto something here"):"Youre onto something here",ariaLabel:E,width:400,primaryCallToActionText:g?f.t("Got it"):"Got it",onClickPrimaryButton:x,closeCoachmarkFromOutsideClick:x,onAnchorPositionChange:A,isMegaphoneCoachmark:!0,className:_().coachmarkWrapper}),[y,C,g,x,E,A]);return n.createElement(o.Ay,{coachmarkElement:k,orientation:h},e)};ForwardMessageShareablePromptsCoachmark.displayName="ForwardMessageShareablePromptsCoachmark"},0x198201515:(e,t,a)=>{"use strict";a.d(t,{W:()=>SharePromptButton});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20b4dda68),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x2501a2cee),m=a(0x1fdec3e16),u=a(0x12cef2078),p=a(0x2043404b0),h=a(0x190599afd),_=a.n(h);let f=new s.Ay("agents"),SharePromptButtonNoClickButton=({submitLabel:e,promptDescriptionId:t,loadingButtonContent:a})=>{let[r,i]=(0,n.useState)(!1),o=(0,n.useCallback)(()=>{r||i(!0)},[r]);(0,n.useEffect)(()=>{if(!r)return;let e=setTimeout(()=>{i(!1)},5e3);return()=>{e&&clearTimeout(e)}},[r]);let s=l()(_().sharePromptButtonNoClickButtonTooltip,{[_().sharePromptButtonNoClickButtonTooltipHidden]:!r});return n.createElement("div",{className:l()(_().sharePromptButtonNoClickButtonContainer,"margin_top_75")},n.createElement(c.lV,{size:"medium","data-qa":"share_prompt_button","aria-label":e,"aria-describedby":t,onClick:o,tabIndex:-1},a),n.createElement("div",{className:s},f.t("Just a preview here, friend!",{fallbackHash:"887f8958693265ee5d59cf7af1ccb45ffd9ce539",fallbackHashNs:"workflow_builder"})))};SharePromptButtonNoClickButton.displayName="SharePromptButtonNoClickButton";var b=a(0x1d0e768cb),g=a(0x10027d8bc),y=a(0x1734977ca),A=a(0x191c37045),x=a(0x238b287cf),E=a(0x1b9d5cc0c),C=a(0x1c9a3c4c1),k=a(0xe38b5635),v=a(0x3711e82d),S=a(0x4a795d66),I=a(0x4ae5f5cf),w=a(0x11c82607b);let T=n.lazy(()=>Promise.resolve().then(a.bind(a,0x55ba1e6)).then(e=>({default:e.SharePromptSlackbotEdModal}))),N=(0,w.Ay)("Open share prompt Slackbot education modal",e=>{e((0,I.A)({element:n.createElement(T,{}),isStackable:!1,name:"share-prompt-slackbot-ed-modal"}))});N.meta={name:"openSharePromptSlackbotEdModal",key:"createThunkOpenSharePromptSlackbotEdModal",description:"Open share prompt Slackbot education modal"};var M=a(0x226892387),R=a(0x20c81ddcb),P=a(0x14149c126),L=a(0xe684f705),O=a(0xdc7c7bc9),D=a(0x624c12c8),F=a(0x1472af90a),U=a(0xf052d367),B=a(0x18632f75a);let H=new s.Ay("agents"),SharePromptButton=({prompt:e,label:t,appId:a,promptId:i,promptRichText:s,canvasUnfurl:h,isSlackbot:f=!1,isPreview:I=!1})=>{let w=(0,r.wA)(),T=(0,x.A)(),W=(0,n.useRef)(null),[V,G]=(0,n.useState)(!1),[q,j]=(0,n.useState)(!1),z=(0,M.d4)(e=>(0,U.h$)(e,F.G7.ShareablePromptFooter)),K=(0,M.d4)(e=>(0,U.kI)(e,F.G7.ShareablePromptFooter,F.X8.Click)),$="on"===(0,M.d4)(e=>(0,P._Z)(e,"shareable_prompt_slackbot")),Y=(0,M.d4)(g.D3),Q=(0,M.d4)(g.gT)&&$&&f,Z=(0,M.d4)(e=>Q?(0,L.nv)(e,o.Q$):(0,L.Eq)(e,a)),J=(0,n.useMemo)(()=>!I&&Q&&!q&&K&&!z,[q,z,K,I,Q]),X=Z?(0,E.c2)(Z):null,ee=(0,C.D)(Z),et=(0,E.K6)(Z),ea=(0,M.d4)(e=>!!Y&&!!et&&(0,R.xq)(e,et)),en=ee||Q||ea,er=(0,E.wg)(Z),ei=`share-prompt-description-${i||"unknown"}`,el=$?H.t("Send to {agentName}",{agentName:er,__react:!0}):H.t("Ask agent"),eo=(0,n.useCallback)(async()=>{G(!0),await w((0,y.J)({appId:a,prompt:e,promptRichText:s,isSlackbot:f})),f&&w((0,D.w)({eventId:v.EventId.SLACKBOTAI_RUN_WITH_SLACKBOT,uiAction:v.UiAction.CLICK,promptId:i})),T.track(v.EventId.AGENTS_POMPT_MESSAGE_SENT,{contexts:{ui_context:{action:v.UiAction.SEND,ui_step:v.UiStep.AGENTS_ASK_VIA_SHAREABLE_PROMPT},item_id:i,source:h?"canvas":"message",app_id:a}}),G(!1)},[a,h,T,w,e,i,s,f]),es=(0,n.useCallback)(()=>{i&&w((0,S.A)({promptId:i}))},[w,i]),ec=(0,n.useCallback)(()=>{j(!0),w((0,B.z)({component:F.G7.ShareablePromptFooter,type:F.X8.Click,reason:"share-prompt-footer-education-click"})),w(N())},[w]);(0,n.useEffect)(()=>{Q&&!I&&w((0,B.b)({interactions:[{component:F.G7.ShareablePromptFooter,type:F.X8.Click}],reason:"check-shareable-prompt-footer-clicked",useCache:!0}))},[Q,I,w]),(0,n.useEffect)(()=>{i&&w((0,O.N)({id:i,sharedPrompt:{prompt:e,label:t,appId:a,appMemberId:et,isSlackbot:f,promptRichText:s}}))},[i,e,t,a,et,f,w,s]);let ed=(0,n.useMemo)(()=>{let t=null;return(t=s?n.createElement("div",{ref:W},n.createElement(p.A,{maxLines:3,maxChars:150,elements:s?.[0]?.elements,hideTruncationExpandBtn:!1})):n.createElement("div",{ref:W},n.createElement(A.A,{text:e,contractedLines:3,className:_().promptCardPreviewContent,viewFullMessageTextOverride:$?H.t("Show more"):"Show more"})),I)?n.createElement(u.X,{noPointerEvents:!0},t):t},[s,e,$,I]),em=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,$&&n.createElement("div",{className:"padding_right_25"},n.createElement(d.Ah,{name:"send-filled",size:"20"})),n.createElement(m.A,{lines:1,breakWords:!0,withTooltip:!0},el)),[$,el]),eu=(0,n.useMemo)(()=>I?n.createElement(SharePromptButtonNoClickButton,{submitLabel:el,promptDescriptionId:ei,loadingButtonContent:em}):n.createElement(c.lV,{className:"margin_top_75",size:h||$?"medium":"small",onClick:eo,"data-qa":"share_prompt_button",loading:V,"aria-label":el,"aria-describedby":ei},em),[h,$,V,I,em,eo,ei,el]);return X&&en?n.createElement(k.A,{className:l()(_().promptCard,{[_().promptCardMaxWidth]:!I&&!h,[_().promptCardMargin]:!h}),elevation:2,size:"medium"},n.createElement(b.d,{label:t,imageUrlBot:X,agentRealName:er,memberId:et,isPreview:I,onShare:es}),n.createElement("div",{className:_().promptCardBody},e&&ed,n.createElement("div",{id:ei,hidden:!0},e),eu),J&&n.createElement(c.Nm,{className:_().promptCardFooter,onClick:ec},n.createElement("span",{className:_().promptCardFooterText},n.createElement(d.Ah,{name:"help",size:"18",inline:!0}),n.createElement("span",null,H.t("Want to share your own prompt?"))))):null};SharePromptButton.displayName="SharePromptButton"},0x1d0e768cb:(e,t,a)=>{"use strict";a.d(t,{F:()=>y,d:()=>SharePromptHeader});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x20482ad21),l=a(0x23619f41c),o=a(0x22b8621cf),s=a(0x11c86845f),c=a(0x1faa3f1ac),d=a(0x2501a2cee),m=a(0x1fdec3e16),u=a(0x74791de4),p=a(0x226892387),h=a(0x14149c126),_=a(0x190599afd),f=a.n(_);let b=new i.Ay("agents"),g={name:"share-message"},y={width:"24px",height:"24px",color:"var(--dt_color-constants-white)"},SharePromptHeader=({label:e,imageUrlBot:t,agentRealName:a,memberId:i,isPreview:_,onShare:A})=>{let x="on"===(0,p.d4)(e=>(0,h._Z)(e,"shareable_prompt_slackbot")),E=b.t("Forward prompt"),C=b.t("Prompt",{fallbackHash:"31f51ba92737bac4640637b145948729f6864c24",fallbackHashNs:"agents"}),k=n.createElement(u.A,{userId:i,position:"left-bottom"},n.createElement(c.A,null,a));return n.createElement("div",{className:f().promptCardHeader},n.createElement("div",{className:f().promptCardHeaderInfo},n.createElement("div",{className:f().promptCardHeaderIcon},x?n.createElement("div",{className:f().promptCardHeaderIconBackground},n.createElement(d.Ah,{name:"ai-thread-summary",style:y})):n.createElement(l.A,{ariaHidden:!0,size:32,image:t})),n.createElement("div",{className:(0,r.A)(e)?f().promptCardHeaderInfoTitleEmpty:""},n.createElement(m.A,{lines:1,withTooltip:!0},n.createElement("div",{className:f().promptCardHeaderInfoTitle},e)),x?n.createElement("span",{className:f().promptCardHeaderInfoTitleAuthor},C):n.createElement("span",{className:f().promptCardHeaderInfoTitleAuthor},n.createElement(m.A,{lines:1,withTooltip:!0},b.rt("Prompt for {agentRealName}",{agentRealName:k}))))),x&&!_&&n.createElement("div",{className:f().promptCardActionsBar},n.createElement(s.A,null,n.createElement(o.A,{"aria-label":E,svgIconProps:g,tooltipLabel:E,tooltipPosition:"top",onClick:A}))))};SharePromptHeader.displayName="SharePromptHeader"},0x55ba1e6:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SharePromptSlackbotEdModal:()=>SharePromptSlackbotEdModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x189615fa),s=a(0xf225ecf2),c=a(0x1c7997c1),d=a(0x96920791),m=a(0x16d221c7f),u=a(0xa69ad0c3),p=a(0x1fcbb004d);let h=a.p+"slackbot_education-92cef0a.png";var _=a(0x82949345),f=a.n(_);let b=new i.Ay("agents"),SharePromptSlackbotEdModal=()=>{let e=(0,r.wA)(),[t,a]=(0,n.useState)(!1),i=(0,n.useCallback)(()=>{e((0,p.O)())},[e]),_=b.t("Forward any of your messages with Slackbot to make it a prompt that others can use.",{fallbackHash:"518fd1cb48fa2a3ae2934610368daf1b18b7d125",fallbackHashNs:"agents"});return(0,n.useEffect)(()=>{if(!h||t)return;let e=new Image;e.src=h,e.onload=()=>{a(!0)}},[t]),n.createElement(o.A,{closeModal:i},n.createElement(s.A,null,t&&n.createElement(c.A,{className:f().imageSection},n.createElement("div",{className:f().imageContainer},n.createElement(u.A,{src:h,alt:"Share prompt education"}),n.createElement("div",{className:f().animationOverlay},n.createElement("div",{className:f().pulsingCircle}))))),n.createElement(d.A,{className:f().footer},n.createElement("div",{className:f().footerText},_),n.createElement(m.A,null,n.createElement(l.Ay,{type:"primary",onClick:i},b.t("Close",{fallbackHash:"bbfa773e5a63a5ea58c9b6207e608ca0120e592a",fallbackHashNs:"huddles"})))))};SharePromptSlackbotEdModal.displayName="SharePromptSlackbotEdModal"},0x1aa52e9c5:(e,t,a)=>{"use strict";a.d(t,{A:()=>s,E:()=>o});var n,r=a(0xbad225b5),i=a(0x1dda05e1b),l=a(0x226892387),o=((n={}).rainbow="rainbow",n.blue="blue",n.superhero="superhero",n.butter="butter",n);let Sticker=({text:e,style:t})=>{let a=(0,l.d4)(i.j),n=r.createElement("span",{"data-text":e,className:`p-sticker_block p-sticker_block__${t}`},r.createElement("span",null,e));return a?n:r.createElement("span",null,e,r.createElement("span",{className:"caption sk_foreground_max_solid"}," - sent with sticker effect."))};Sticker.displayName="Sticker";let s=Sticker},0x5d4fd4ef:(e,t,a)=>{"use strict";a.d(t,{t:()=>i,v:()=>convertTableBlockToTsv});var n=a(0x22d3b4662),r=a(0x11c82607b);let convertTableBlockToTsv=(e,t)=>t.map(t=>t.map(t=>t?"raw_text"===t.type||"cell_text"===t.type?t.text:(0,n.A)(e,[t]):"").join("	")).join(`
`),i=(0,r.Ay)("Convert a table block to TSV",(e,t,{rows:a})=>convertTableBlockToTsv(t(),a));i.meta={name:"convertTableBlockToTsvThunk",key:"createThunkConvertTableBlockToTsvThunk",description:"Convert a table block to TSV"}},0x386198c9:(e,t,a)=>{"use strict";a.d(t,{bi:()=>g,hT:()=>y});var n=a(0x546e17c5),r=a(0x17478cdb7),i=a(0x658a411c),l=a(0x118cdcdea),o=a.n(l),s=a(0x20b4dda68),c=a(0x12edaa96a),d=a(0x17ea0fa2c),m=a(0x53f531a4),u=a(0x20fdda113),p=a(0x10d5cec41),h=a(0xfd520ca3),_=a(0x1ac0f9dc1),f=a(0x10a4fbb7f),b=a(0x11c82607b);let g={htmlParseFail:"html_parse_fail",invalidInput:"invalid_input",totalLengthExceeded:"total_length_exceeded",noTsvContent:"no_tsv_content",rowCountExceeded:"row_count_exceeded",columnCountExceeded:"column_count_exceeded",success:"success"};function validateRows(e){return!!e&&!(e.length<2)&&!(e[0].length<2)&&!!e.every(t=>t.length===e[0].length)}function validateColumns(e){let t=0;return(0,i.A)(e,e=>e.length>20&&(t=e.length,!0))?{ok:!1,errorValue:t}:{ok:!0}}function formatLinesAsBlock(e,t){return t.map((t,a)=>t.map(t=>{if(!t.length)return null;let n=new(o());n.insert(t,{bold:0===a});let r=(0,_.A)({state:e,contents:n,highlightWords:[],isEmojiDisplayedAsText:!1,useChannelTagging:!0,searchFunc:(t,a)=>a?"channel"===t?(0,d.G2)(e,{query:a,options:{entities:{channels:{includePrivate:!1,includeFromAnotherTeam:!0}},limit:s.zE,sort:{source:"convert-tsv-to-table-block"}}}).filter(e=>(0,m.j)(e)===a):"emoji"===t?(0,d.G2)(e,{query:a,options:{entities:{emoji:!0},limit:s.zE,sort:{source:"convert-tsv-to-table-block"}}}).filter(e=>(0,u.Y)(e)===a):(0,d.G2)(e,{query:a,options:{entities:{userGroups:{includeFromAnotherTeam:(0,f.J)(e)},members:{includeSelf:!0,includeSlackbot:!1}},limit:s.zE,sort:{source:"convert-tsv-to-table-block"}}}):[]});if(!(0,h.A)(n,r)){let t=(0,p.A)({state:e,delta:r,options:{convertEmpty:!1,trimEndingWhitespace:!0,trimStartingWhitespace:!1,expandTruncatedLinks:!1,useExpandedRichText:!1}});if("blocks"in t)return t.blocks[0]}return 0===a?{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:t,...0===a?{style:{bold:!0}}:void 0}]}]}:{type:"raw_text",text:t}}))}let y=(0,b.Ay)("Convert a TSV string to a table block",(e,t,{stringInput:a})=>((e,t)=>{var a;if(!t||-1===t.indexOf("	"))return{block:null,reason:g.noTsvContent};let i=(a=t||"",(0,r.A)(a,`
`).replace(/\n(\t|\n)*$/,""));if(i.replace(/\n|\t/g,"").length>1e4)return{block:null,reason:-1===i.indexOf("	")?g.noTsvContent:g.totalLengthExceeded};let l=(0,n.cP)(i);if(!validateRows(l))return{block:null,reason:g.invalidInput};if(l.length>100)return{block:null,reason:g.rowCountExceeded,errorValue:l.length};let o=validateColumns(l);return o.ok?{block:{type:"table",block_id:(0,c.A)(),rows:formatLinesAsBlock(e,l)},reason:g.success}:{block:null,reason:g.columnCountExceeded,errorValue:o.errorValue}})(t(),a));y.meta={name:"convertTsvToTableBlockThunk",key:"createThunkConvertTsvToTableBlockThunk",description:"Convert a TSV string to a table block"}},0x1fe6de075:(e,t,a)=>{"use strict";a.d(t,{Y:()=>i});var n=a(0x5d4fd4ef),r=a(0x11cdf8541);let i=(0,a(0x11c82607b).Ay)("Convert a table block to TSV",(e,t,{rows:a},i)=>{let{windowRef:l}=i(r.C),o=l.deref(),s=t(),c=(0,n.v)(s,a);if(!o)return;let d=o.document.createElement("a");d.setAttribute("href",`data:text/tab-separated-values;charset=utf-8,${encodeURIComponent(c)}`),d.setAttribute("download","table.tsv"),d.style.display="none",o.document.body.appendChild(d),d.click(),o.document.body.removeChild(d)});i.meta={name:"downloadTableAsTsv",key:"createThunkDownloadTableAsTsv",description:"Convert a table block to TSV"}},0x2469c2f8d:(e,t,a)=>{"use strict";a.d(t,{y:()=>TaskCard});var n=a(0xbad225b5),r=a(0x20b4dda68),i=a(0x1b50b0090),l=a(0x1933cd2d2),o=a(0x10b0baa82),s=a(0xb7b18ffa),c=a(0x1cc66dceb),d=a(0x238b287cf),m=a(0x3711e82d),u=a(0x226892387),p=a(0x1e766438b),h=a.n(p);let TaskCard=e=>{let{taskId:t,title:a,status:p,details:_,output:f,sources:b,renderBlocks:g,appId:y,messageTs:A}=e,x=(0,d.A)(),E=(0,n.useMemo)(()=>({id:t,title:a,status:p,details:_,output:f,sources:b}),[t,a,p,_,f,b]),C=(0,n.useMemo)(()=>!!_||!!f||!!b,[_,f,b]),k=(0,n.useMemo)(()=>p===c.cl.InProgress?c.cl.InProgress:p===c.cl.Error?c.cl.Error:c.cl.Complete,[p]),v=(0,u.d4)(l.f),S=(0,n.useMemo)(()=>({app_id:y,message_ts:A}),[y,A]),I=(0,n.useCallback)((e,t)=>{x.track(m.EventId.TASK_CARD_BLOCK_INTERACTION,{...S,contexts:{ui_context:{action:e?m.UiAction.COLLAPSE:m.UiAction.EXPAND}}}),t()},[x,S]),w=(0,n.useCallback)(()=>{x.track(m.EventId.BK_USER_INTERACTION,{...S,contexts:{ui_context:{action:m.UiAction.CLICK,ui_element:m.UiElement.BK_TASK_CARD_SOURCE}}})},[x,S]);return n.createElement(i.M,{initialHeight:40,className:h().block},({isExpanded:e,toggle:i})=>n.createElement(n.Fragment,null,n.createElement(s.s,{key:t,status:k,title:a,isExpanded:e,toggle:()=>I(e,i),experimentPcxThinkingStepsBlocksGroupOn:v,hasExpandableContent:C}),n.createElement("div",{className:h().blockContent},e&&n.createElement(o.L,{item:E,blockType:r.WP.task_card,renderBlocks:g,onSourceClick:w}))))};TaskCard.displayName="TaskCard"},0x187d2e2b5:(e,t,a)=>{"use strict";a.d(t,{K:()=>Timeline});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x18af67efb),s=a(0x14fad6485),c=a(0x20b4dda68),d=a(0x20482ad21),m=a(0x11a296110),u=a(0xb1ea448c),p=a(0x2501a2cee),h=a(0x2006c4c29),_=a(0xae1a570c),f=a(0x17348142),b=a(0x1340892e2),g=a(0xd6a16321),y=a(0x47119420),A=a(0x226892387),x=a(0x1e3eb45fd),E=a(0x217553e42),C=a(0x1fb2d2a87),k=a(0x19895585a),v=a(0x9271cc31),S=a(0x4469b29b),I=a.n(S);let w=new d.Ay("timeline"),T={"ai-sparkle":"ai-sparkle","agentforce-filled":"agentforce-filled",calendar:"calendar",book:"book",mentions:"mentions","ai-file-summary":"ai-file-summary",user:"user",search:"search",settings:"settings","canvas-content":"canvas-content",error:"warning",clock:"clock",lists:"lists"},getSourceKey=e=>{if("type"in e){if("message"===e.type)return`message-${e.channelId}-${e.timestamp}`;if("file"===e.type)return`file-${e.url}`;if("calendar_event"===e.type)return`calendar-${e.url}`}return`richtext-${"blockId"in e?e.blockId:""}`},renderTimelineContent=(e,t)=>{if("string"==typeof e)return e;if(e&&"object"==typeof e&&"type"in e&&"rich_text"===e.type)return t([e],c.WP.timeline,{suppressRichTextEditedLabel:!0,disableJumboEmoji:!0});try{return JSON.stringify(e)}catch{return"[Invalid content]"}},N={text:"#1d1c1d",highlight:"#868686"},M={text:"#ffffff",highlight:"#bbbabb"},TimelineIconAndText=({icon:e,text:t,renderBlocks:a,isInProgress:r})=>{let i="string"==typeof t,l="dark"===(0,A.d4)(C.to)?M:N,o=(0,A.d4)(e=>i?(0,y.A)(e,t):"");return i?n.createElement(n.Fragment,null,n.createElement("div",{className:I().timelineIcon},e),n.createElement("div",{className:I().timelineContent},r?n.createElement(b.r,{text:o,className:I().timelineTextShimmer,forceDisableIconSlotMachineAnimation:!0,textColor:l.text,highlightColor:l.highlight}):n.createElement("span",{className:I().timelineText},o))):n.createElement(n.Fragment,null,n.createElement("div",{className:I().timelineIcon},e),n.createElement("div",{className:I().timelineContent},n.createElement("span",{className:I().timelineText},renderTimelineContent(t,a))))};TimelineIconAndText.displayName="TimelineIconAndText";let TimelineStepSectionItem=({section:e,renderBlocks:t,slackbotChannelId:a,isSlackbotInSplitView:i,windowId:l})=>{let o=(0,r.wA)(),s=e.sources,c=s?.length??0,d=(0,n.useCallback)(t=>{if(t.stopPropagation(),s&&e.richTextTitle){let t=(0,g.RL)({sources:s,richTextTitle:e.richTextTitle,slackbotChannelId:a}),n=l===k.N2;o((n?_.k:h.B)({windowId:n?k.N2:l,sourceContainer:i?k.mq.Split:null,...t,options:i?{forceRenderInSplitView:!0}:void 0}))}},[o,s,e.richTextTitle,a,i,l]);return e.richTextTitle?n.createElement("div",null,renderTimelineContent(e.richTextTitle,t),c>0&&n.createElement("div",{className:I().timelineSourcesSlug},n.createElement(f.d,{iconName:"search",label:"Sources",onClick:d,dataQa:"timeline_sources_slug"}))):null};TimelineStepSectionItem.displayName="TimelineStepSectionItem";let TimelinePoint=({point:e,pointIndex:t,renderBlocks:a,experimentSlackbotAiBundleToolCallsGroupOn:r,slackbotChannelId:i,isSlackbotInSplitView:s,windowId:c})=>{let[d,h]=(0,n.useState)(!1),_="in_progress"===e.status,f="error"===e.status,b="canceled"===e.status,g=e.steps,y=r&&null!=g&&g.length>0,A=(0,n.useMemo)(()=>e.contents?.filter(e=>"object"==typeof e&&"type"in e&&"rich_text"===e.type),[e.contents]),x=A?.length||0,E=y||!y&&x>0,C=null;_?C=n.createElement("div",{className:`${I().timelineStatusIcon} ${I().timelineStatusIconInProgress}`},n.createElement(u.A,{size:"medium",color:"white"})):E&&(C=n.createElement(p.Ah,{name:d?"caret-up":"caret-down"}));let k=T[e.icon]||"ai-sparkle",v=n.createElement(p.Ah,{name:k});(f||b)&&(v=n.createElement(p.Ah,{name:"close"}));let S=x>0?`${x} result${1===x?"":"s"}`:null;b?S=w.t("Canceled",{fallbackHash:"f840ac65b3e56cbe7d49f5922ce51270404ec62c",fallbackHashNs:"workflow_details"}):f&&(S=w.t("Error",{fallbackHash:"7f2f6a15cf8da2b27e5a4af47b58e7ad71c0b3d9",fallbackHashNs:"workflow_details"}));let N=(0,n.useCallback)(()=>{E&&h(!d)},[E,d]),M=l()(I().timelinePoint,{[I().expandable]:E});return n.createElement(m.Nm,{className:M,onClick:N},n.createElement("div",{className:I().timelineLine},n.createElement(TimelineIconAndText,{icon:v,text:e.richTextTitle??e.text,renderBlocks:a,isInProgress:_}),n.createElement("div",{className:I().timelineStatus},S&&!y&&n.createElement("span",{className:I().timelineContentCount},S),n.createElement("div",{className:I().timelineStatusContainer},C))),y&&d&&n.createElement("div",{className:I().timelineSteps},g.map(e=>{let t=(e=>{let t=[];for(let a of e)a.sources&&a.sources.length>0&&t.push(...a.sources);if(0===t.length)return e;let a=(0,o.A)(t,getSourceKey),n=e.filter(e=>!e.sources||0===e.sources.length);return 0===n.length?e:n.map((e,t)=>0===t?{...e,sources:a}:e)})(e.sections??[]);return n.createElement("div",{key:e.id,className:I().timelineStepItem},n.createElement("div",{className:I().timelineStepIcons},n.createElement("div",{className:I().timelineStepPlaceholderIcon},n.createElement(p.Ah,{name:"icon-placeholder-filled",inline:!0})),n.createElement("div",{className:I().timelineStepDivider})),n.createElement("div",{className:I().timelineStepContent},t.map(t=>n.createElement(TimelineStepSectionItem,{key:`${e.id}-${t.richTextTitle.blockId}`,section:t,renderBlocks:a,slackbotChannelId:i,isSlackbotInSplitView:s,windowId:c}))))})),!y&&x>0&&d&&n.createElement("div",{className:I().timelineDropdownContents},A?.map((e,r)=>n.createElement("div",{key:"string"==typeof e?e:`${t}-${r}`,className:I().timelineDropdownItem},renderTimelineContent(e,a)))))};TimelinePoint.displayName="TimelinePoint";let Timeline=({points:e,renderBlocks:t})=>{let a=(0,A.d4)(x.UM),r=(0,A.d4)(e=>(0,E.o2)(e,"USLACKBOT")),i=(0,A.d4)(v.Oy),l=i?.id===r,{windowId:o}=(0,s.ox)();return n.createElement("div",{className:I().timelineBlock},e.map((e,i)=>n.createElement(TimelinePoint,{key:e.id||`point-${i}`,point:e,pointIndex:i,renderBlocks:t,experimentSlackbotAiBundleToolCallsGroupOn:a,slackbotChannelId:r,isSlackbotInSplitView:l,windowId:o})))};Timeline.displayName="Timeline"},0x10602ace6:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x8c8bafa3),o=a(0x236a5cd68),s=a(0x16cf1da63),c=a(0x20482ad21),d=a(0xa6f3163b),m=a(0x15f8e452a),u=a(0x134e233cc),p=a(0x344bb842),h=a(0x99233ecb),_=a(0x4c96e5d9),f=a(0x242503693),b=a(0x6b345e37),g=a(0x24558b75f),y=a(0x1deaf9033),A=a(0xc4548bcd),x=a(0xb9f80e40);let E=new c.Ay("video_block");function VideoMoreActions({channelId:e,messageTs:t,setIsOverlayActive:a,size:r,videoUrl:i}){let l=(0,s.wA)(),{transitionFocusTo:o}=(0,u.Gx)(),c=(0,n.useCallback)(a=>{e&&t&&(o({focusKey:f.Ay.THREAD_MESSAGE_LIST,focusMetadata:{id:"thread",params:{threadId:(0,y.H)({channel:e,ts:t}),replyTs:t}}}),l((0,x.O)({channelId:e,threadTs:t,requestFocus:!0,shouldOpenInTile:(0,g.Cz)(a)})))},[l,t,e,o]),d=(0,n.useMemo)(()=>[{label:E.t("Open in thread"),click:c,show:!!(t&&e)},{label:E.t("Open in new browser window"),click:()=>{l((0,A.A)(i,"_blank"))}}].filter(e=>void 0===e.show||e.show),[c,t,e,i,l]),m=(0,n.useCallback)(e=>n.createElement(h.a,{...e,template:d,stripTerminalSeparators:!0}),[d]),b=(0,n.useCallback)(()=>a?.(!0),[a]),C=(0,n.useCallback)(()=>a?.(!1),[a]),k=(0,n.useCallback)(()=>a?.(!1),[a]),v=(0,n.useCallback)(()=>a?.(!1),[a]),S=E.t("More actions");return n.createElement(h.cQ,{renderMenu:m,position:"bottom-left",onPopoverOpen:b,onPopoverClose:C,onTriggerClose:k,onMenuItemSelected:v},n.createElement(_.Ay,{tip:S,position:"top"},n.createElement(p.A,{className:"p-video_overlay__controls_ellipsis","aria-label":S,backgroundStyle:"dark",size:r,svgIconProps:{name:"ellipsis-vertical-filled"}})))}VideoMoreActions.displayName="VideoMoreActions";let C=(0,b.A)(VideoMoreActions);var k=a(0x201c48a95),v=a(0x1d9627ee3),S=a(0x3711e82d);let I=new c.Ay("video_block"),w={eventId:S.EventId.BK_USER_INTERACTION,interactionElement:S.InteractionElement.VIDEO,onClick:{enableClogAction:!0,interaction:S.Interaction.CLICK}},VideoOverlay=({onPlay:e,showOverlayControls:t,channelId:a,messageTs:r,videoUrl:l,mediaId:o})=>{let[c,u]=(0,n.useState)(!1),p=(0,s.wA)(),h=(0,n.useCallback)(()=>{p((0,v.A)({channelId:a,threadTs:r,mediaId:o}))},[p,a,r,o]),_=I.t("Play"),f=I.t("Video");return n.createElement("div",{className:i()("p-video_overlay","p-video_overlay--controls",{"p-video_overlay--active":c}),"data-qa":"bk_video-overlay"},n.createElement(d.A,{className:"p-video_overlay__button",onClick:e,"aria-label":_}),n.createElement("div",{className:"p-video_overlay__controls_container"},n.createElement(d.A,{className:"p-video_overlay__controls__play_button","aria-label":_,onClick:e,autoClogProps:w},n.createElement(m.A,{type:"play-filled"}),n.createElement("div",{className:"p-video_overlay__label"},f))),t&&n.createElement("div",{className:"p-video_overlay__corner p-video_overlay__hover"},n.createElement(k.A,{onClick:h,classPrefix:"p-video_overlay"}),n.createElement(C,{setIsOverlayActive:u,channelId:a,messageTs:r,videoUrl:l})))};VideoOverlay.displayName="VideoOverlay";var T=a(0x106632d1d),N=a(0x235ff1eab),M=a(0x1c91944c9);let VideoPlayer=e=>{let{width:t,height:a,proxiedThumbUrl:r,setMediaPlaybackInProgress:s,videoUrl:c,channelId:d,messageTs:m,showThumbnailImage:u=!0,showOverlayControls:p=!0,mode:h="default",blockId:_,mediaId:f,altText:b}=e,[g,y]=(0,n.useState)(u),A=(0,n.useCallback)(()=>{y(!1),s(!0)},[y,s]),x=(0,n.useCallback)(()=>{let e=encodeURI(c);return n.createElement("div",{className:"p-video_block__thumb","data-qa":"bk_video-thumbnail"},n.createElement("img",{src:r,className:"p-video_block__thumb_img",alt:b}),n.createElement(VideoOverlay,{onPlay:A,videoUrl:e,channelId:d,messageTs:m,showOverlayControls:p,mediaId:f}))},[A,r,c,d,m,p,f,b]),renderVideoHtml=()=>{let e=i()("p-video_block__html",{"p-video_block__html_fullscreen_mode":"fullscreen"===h}),r=`https://${(0,l.in)()}/video_embed?url=${encodeURIComponent(c)}`;return n.createElement("div",{className:e},n.createElement("iframe",{width:t,height:a,src:r,title:c,frameBorder:"0",allow:"autoplay;",allowFullScreen:!0,id:_,sandbox:"allow-scripts allow-same-origin"}))};return renderVideoHtml.displayName="renderVideoHtml",n.createElement(o.A,{className:"p-video_block__container",width:t,height:a},g?x():renderVideoHtml())};VideoPlayer.displayName="VideoPlayer";let R=(0,M.N)((e,{thumbnailUrl:t})=>({proxiedThumbUrl:(0,N.Ay)(e,{url:t,sizeForRetina:!0})}))((0,T.ay)(VideoPlayer))},0xdc4b7766:(e,t,a)=>{"use strict";a.d(t,{J:()=>n,c:()=>r});let n={narrow:120,wide:190,full:"100%"},r={small:"small",medium:"medium",large:"large"}},0x5df5385c:(e,t,a)=>{"use strict";a.d(t,{Y:()=>rb,A:()=>rg});var n,r,i=a(0x20b4dda68),l=a(0xbad225b5),o=a(0x1cbdfeceb),s=a(0x21f3c49e8),c=a(0x1aba66b56),d=a(0x237b6a339),m=a(0x155d02b1c),u=a(0x20482ad21),p=a(0x1a256ff50),h=a(0x11a296110),_=a(0x4c96e5d9),f=a(0x8b788bfc),b=a(0x16998c9bf),g=a(0x6e87d4ec),y=a(0x16cf1da63),A=a(0x2b7f0bcc),x=a(0x1faa3f1ac),E=a(0x10bae7b36),C=a(0x15014e268),k=a(0x71c724c8),v=a(0x21d85d6e5),S=a(0xa1832ae4),I=a(0x226892387),w=a(0x14149c126),T=a(0xe684f705),N=a(0x1fcbb004d),M=a(0x2174dd4ea),R=a(0x168096c35),P=a(0x1ee439e69);let L=new u.Ay("slack_first_crm"),RequestLicenseApprovalModal=({memberId:e,salesforceOrgId:t})=>{let a=(0,y.wA)(),n=(0,I.d4)(P.H7),r=(0,S.Zl)(n),i=(0,I.d4)(e=>"on"===(0,w._Z)(e,"slack_crm_onboarding_march")),o=(0,l.useMemo)(()=>`${r}admin/salesforce-organizations/${t}/users`,[r,t]),s=(0,I.d4)(t=>(0,T.nv)(t,e)),[c,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)(!1),p=i?L.t("Can manage records"):"Can manage records",h=i?L.t("Can manage records and customize lists"):"Can manage records and customize lists",f=i?L.t("Can configure Salesforce and add new users"):"Can configure Salesforce and add new users",b=(0,l.useMemo)(()=>[{label:f,value:R.gd.SYS_ADMIN},{label:h,value:R.gd.STD_USER_PLUS},{label:p,value:R.gd.STD_USER}],[p,h,f]),[g,O]=(0,l.useState)(b[1]),D=(0,l.useCallback)(()=>{a((0,N.O)())},[a]),F=(0,l.useCallback)(({value:e})=>{let t=b.find(t=>t.value===e);t&&O(t)},[b]),U=(0,l.useCallback)(async()=>{if(u(!1),g.value===R.gd.STD_USER_PLUS)return void D();d(!0);try{await a((0,M.A)({userId:e,salesforceOrgId:t,profile:g.value,experimentSlackforceAutoStarterGroupOn:i})),D()}catch{u(!0)}finally{d(!1)}},[g.value,D,a,e,t,i]),B=i?L.t("Confirm Salesforce permissions"):"Confirm Salesforce permissions",H=(0,I.d4)(e=>(0,v.sE)(e,s,!1,!1)),W=i?L.t("{ memberName } is now a Salesforce user and can manage records and lists. You can limit management to just records, or expand permissions to configure all of Salesforce, including adding new users.",{memberName:H}):`${H} is now a Salesforce user and can manage records and lists. You can limit management to just records, or expand permissions to configure all of Salesforce, including adding new users.`,V=i?L.t("Confirm"):"Confirm",G=i?L.t("There was a problem updating permissions, please try again."):"There was a problem updating permissions, please try again.",q=(0,l.useCallback)(e=>l.createElement("div",null,l.createElement(_.Ay,{tip:e.label,shouldOnlyShowWhenTruncated:!0,zIndex:"menu_above_fs"},l.createElement("span",{className:"overflow_ellipsis block no_wrap"},e.label))),[]),j=(0,l.useCallback)(()=>l.createElement(x.A,{href:o},i?L.t("Manage Salesforce users"):"Manage Salesforce users"),[o,i]);return s?l.createElement(E.A,{title:B,submitButtonText:V,onSubmit:U,showCancelButton:!1,onClose:D,isSubmitButtonALoadingButton:!0,isSubmitting:c,footerText:j()},l.createElement(l.Fragment,null,m&&l.createElement("div",{className:"margin_bottom_150"},l.createElement(A.Ay,{type:"boxed",level:"error",icon:"warning"},G)),l.createElement("div",{className:"margin_bottom_150"},W),l.createElement("div",{className:"display_flex align_items_center justify_content_between margin_bottom_100"},l.createElement(k.Ay,{member:s,showPresence:!1,showStatus:!1,useShortMode:!0}),l.createElement(_.Ay,{tip:g.label},l.createElement(C.Ay,{width:200,selectedOption:g,onOptionSelected:F,options:b,renderOption:q}))))):null};RequestLicenseApprovalModal.displayName="RequestLicenseApprovalModal";var O=a(0x14a862c41),D=a(0xa356e2f9),F=a(0x11c82607b),U=a(0x46dbff89),B=a(0x16ffed5ab);let H=[O.y.RequestNotFound,O.y.AlreadyReviewed],W=new u.Ay("salesforce_connections"),V={name:"warning"},G={name:"info"},q=(0,F.Ay)("Reviews (approves or denies) a license approval request",async(e,t,{salesforceOrgId:a,requestId:n,action:r,memberId:i,profile:o})=>{if(!a||!n||!r||"approve"===r&&(!o||!i))return;e((0,D.oy)({requestId:n}));let s="on"===(0,w._Z)(t(),"slack_crm_license_approval_requests");try{await e((0,O.P)({salesforceOrgId:a,requestId:n,action:r,profile:o,reason:"review-downmarket-crm-license-approval-request"})),"approve"===r&&i?e((0,U.q)({element:l.createElement(RequestLicenseApprovalModal,{memberId:i,salesforceOrgId:a})})):"deny"===r&&e((0,B.M)({element:l.createElement(g.A,{showCloseButton:!0,svgIconProps:G},s?W.t("Request denied."):"Request denied.")}))}catch(i){let t=(0,b.eh)(i,"error"),a=!t||!H.includes(t);a&&e((0,D.V)({requestId:n}));let r=W.t("We weren\u2019t able to process your request. Please try again.");a||(r=s?W.t("The request has already been reviewed."):"The request has already been reviewed."),e((0,B.M)({element:l.createElement(g.A,{showCloseButton:!0,svgIconProps:V},r)}))}});q.meta={name:"reviewDownmarketCrmLicenseApprovalRequest",key:"createThunkReviewDownmarketCrmLicenseApprovalRequest",description:"Reviews (approves or denies) a license approval request"};var j=a(0x1353250a6),z=a(0x113cdbbd7),K=a(0x207b9aaaf),$=a(0x1a65aae75),Y=a(0xdc4b7766),Q=a(0x178109f89);let getHtmlIdForStatefulBlock=({containerId:e,actionId:t,blockId:a})=>[e,t,a].join("-");var Z=a(0x5299a396),J=a(0xf4097f62),X=a(0x14c79fcb1),ee=a(0x20e80190e),et=a(0x3711e82d);let ea=new u.Ay("channel_invite"),en={elementName:"cancel",onClick:{enableClogAction:!0}},er={elementName:"deny_request",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},ei={eventId:et.EventId.SLACK_CONNECT_INVITE_REQUESTED_DENY_MODAL_OPEN,elementType:et.ElementType.MODAL};var el=((n=el||{}).IDLE="idle",n.LOADING="loading",n.ERROR="error",n);let ManualDenyRequestModal=({requestedInviteId:e,requestedInviteeEmail:t,requestedInviterUserId:a})=>{let n=(0,y.wA)(),r=(0,l.useRef)(null),[i,o]=(0,l.useState)(""),[s,c]=(0,l.useState)("idle"),d=l.createElement(J.A,{id:a,forceRealName:!0}),m=(0,l.useCallback)(e=>{o(e)},[]),u=l.createElement("div",{className:"margin_bottom_100"},ea.rt("<strong>{invitingUser}</strong> will be notified that their request to invite <strong>{requestedInviteeEmail}</strong> has been denied. You can optionally add a reason for the denial below.",{invitingUser:d,requestedInviteeEmail:t})),p=l.createElement("div",{className:"black margin_bottom_75"},ea.t("Reason for denial")),_=l.createElement("div",{className:"p-comprehensible_invites_invite_note_input"},l.createElement(Z.A,{id:"deny_reason_note_input",ref:r,name:"message-input",className:"margin_bottom_0",placeholder:ea.t("Ex. This is not for a legitimate business purpose"),value:i,maxCharacterLimit:560,"data-qa":"manual_deny_request_modal_message_input",useInlineAlert:!0,onChange:m,focusOnMount:!0})),f=(0,l.useCallback)(()=>{c("loading"),n((0,X.T)({inviteId:e,reason:"request-shared-invite-deny-with-reason",message:i})).then(()=>{c("idle"),n((0,N.O)())}).catch(()=>{c("error")})},[e,i,n]);return l.createElement(ee.aF,{autoClogProps:ei},l.createElement(ee.Rc,{title:"Deny request"}),l.createElement(ee.$m,null,"error"===s?l.createElement(ee.qf,{className:"margin_bottom_75"},l.createElement(A.Ay,{"data-qa":"deny-request-modal-error",type:A.QE.inline,level:A.A_.error},ea.t("Something went wrong. Please try again."))):null,l.createElement(ee.qf,null,u),l.createElement(ee.qf,null,p,_),l.createElement(ee.jl,null,l.createElement(ee.s_,{"data-qa":"manual-deny-request-modal-cancel-button",type:"outline",autoClogProps:en,"aria-label":ea.t("Cancel")},ea.t("Cancel")),l.createElement(h.lV,{"data-qa":"deny-invitation-request-button",type:"danger",className:"margin_left_100",onClick:f,loading:"loading"===s,disabled:i.length>560,autoClogProps:er,"aria-label":ea.t("Deny Request")},ea.t("Deny Request")))))};ManualDenyRequestModal.displayName="ManualDenyRequestModal";let eo=(0,F.Ay)("Open the manual deny request modal from Slackbot message",(e,t,a)=>{e((0,U.q)({element:l.createElement(ManualDenyRequestModal,a)}))});eo.meta={name:"openManualDenyRequestModal",key:"createThunkOpenManualDenyRequestModal",description:"Open the manual deny request modal from Slackbot message"};var es=a(0xee0b413f),ec=a(0x16218f27e),ed=a(0x124f71042),em=a(0x12ddd749a),eu=a(0x23695f813),ep=a(0x536ccc50),eh=a(0x2324166d),e_=a(0xd7f673f6),ef=a(0x1d01572a2),eb=a(0x344bb842),eg=a(0x93f78b39),ey=a(0x1b27d2c32);function extractPlainTextFromRichTextBlock(e){if(!e||!e.elements)return"";let extractFromElements=e=>e.map(e=>"text"===e.type?e.text||"":"link"===e.type?e.url||"":"emoji"===e.type?e.name?`:${e.name}:`:"":"user"===e.type?`<@${e.user_id}>`:"channel"===e.type?`<#${e.channel_id}>`:e.elements?extractFromElements(e.elements):"").join("");return e.elements.map(e=>e.elements?extractFromElements(e.elements):"").join(`
`)}var eA=a(0x238b287cf),ex=a(0x2912773d),eE=a(0x1d23c7f2c),eC=a(0x20343b2e6),ek=a.n(eC);function DraftMessageCard({draftInfo:e}){let t,a=(0,y.wA)(),n=(0,eA.A)(),[r,i]=(0,l.useState)(!1),s=!!e.channelId,c=!0===e.isStreaming,d=(0,I.d4)(eE.lm),m=(0,I.d4)(eE.Ep);(0,ef.A)(()=>{(0,ey.H2)(n,ey.vM,{sessionId:d,threadId:m,hasDestination:s,channelName:e.channelName})});let u=(0,l.useCallback)(()=>{e.channelId&&((0,ey.H2)(n,ey.Pp,{sessionId:d,threadId:m,hasDestination:s,channelName:e.channelName}),a((0,ex.D)({channel_id:e.channelId,thread_ts:e.threadTs,rich_text_block:e.richTextBlock})))},[a,e,n,d,m,s]),p=(0,l.useCallback)(async()=>{(0,ey.H2)(n,ey.Ji,{sessionId:d,threadId:m,hasDestination:s,channelName:e.channelName});let t=extractPlainTextFromRichTextBlock(e.richTextBlock);try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch{console.error("[DraftMessageCard] Failed to copy to clipboard")}},[e,n,d,m,s]),_=e.channelName||"";t=c?"Drafting\u2026":s&&e.threadTs?`Draft reply for ${_} thread`:s?`Draft for ${_}`:"Draft message";let f=(0,l.useMemo)(()=>e.richTextBlock?.elements??[],[e.richTextBlock]),b=(0,l.useMemo)(()=>({name:r?"check":"copy"}),[r]),g=e.threadTs?`Move draft to ${_} thread`:`Move draft to ${_}`;return l.createElement("div",{className:ek().card,"data-qa":"draft_message_card"},l.createElement("div",{className:ek().header},l.createElement("span",{className:ek().headerText},t),!c&&l.createElement(eb.A,{svgIconProps:b,"aria-label":r?"Copied!":"Copy draft text",onClick:p,size:"x-small","data-qa":"draft_message_copy_button"})),l.createElement("div",{className:ek().body},l.createElement(eg.A,{type:"rich_text",elements:f,disableHighlights:!0,inline:!1,clogLinkClick:o.A,isMessagePreview:!0})),!c&&s&&l.createElement("div",{className:ek().footer},l.createElement(h.Ay,{onClick:u,type:"primary",size:"small","data-qa":"draft_message_use_button"},g)))}DraftMessageCard.displayName="DraftMessageCard";var ev=a(0x21a78ce9d),eS=a(0x239e2ae8e),eI=a(0xe49b0f58),ew=a(0x182c9b0b0),eT=a(0x6e20c837),eN=a(0x9b7b6ba5),eM=a(0x16ef98cf),eR=a(0x1ed767a16),eP=a(0x6d72337),eL=a(0xb04c4a12),eO=a(0x16d4244ae),eD=a(0xe874a88a),eF=a(0x1acf9a6a2),eU=a(0x159a0d582),eB=a(0xc4548bcd),eH=a(0x19c76d181);let eW=(0,F.Ay)("Open the Manage Shared Channels modal to the organizations view with the given team opened",(e,t,{teamId:a}={teamId:""})=>{let n=t();if(!a||!(0,eH.TZ)(n)||!(0,eF.r)(n))return eD.S.resolve();let r=(0,P.Yc)(n),i=(0,S.Zl)(r,(0,eU.W)(n)?"manage/slack-connect/connections":"admin/slack-connect-connections");return(0,eB.A)(`${i}?team_id=${a}&open_modal=1`),eD.S.resolve()});eW.meta={name:"openApprovalSettingsModalForTeam",key:"createThunkOpenApprovalSettingsModalForTeam",description:"Open the Manage Shared Channels modal to the organizations view with the given team opened"};var eV=a(0xa5d8361b),eG=a(0x136ae8015),eq=a(0x8ed8ca46);let ej=(0,F.Ay)("Opens the Salesforce field mapping modal for modifying CSV column mappings",(e,t)=>{let a=t(),n=(0,eq.GQ)(a);if(!n)return;let r=`S:${n}:ALL_CONTACTS`;e((0,U.q)({element:l.createElement(eG.l,{compositeListId:r,withMapping:!0,isCompletePendingImport:!0})}))});ej.meta={name:"openSalesforceFieldMappingModal",key:"createThunkOpenSalesforceFieldMappingModal",description:"Opens the Salesforce field mapping modal for modifying CSV column mappings"};var ez=a(0xe97a4be4),eK=a(0x1c91944c9),e$=a(0x199201270),eY=a(0x1cf0861f2),eQ=a(0x24f5b5d9b),eZ=a(0x1eae030b2),eJ=a(0x118cdcdea),eX=a.n(eJ),e0=a(0x1ccef1c6f);let e1=(0,F.Ay)("show slackbot ephemeral message whether to show email in channel",(e,t,{channelId:a,permalink:n})=>{let r=t(),i=(0,eO.zC)({viewContext:eL.Y.MESSAGE_PANE,channelId:a});if(!i)return;let l=new u.Ay("slack-connect-email").t(":arrow-right: Here\u2019s the original email conversation:"),o=new(eX())().insert(`${l}
${n}`),s=new(eX())().insert(l).insert(`
`).insert(n,{link:n}),c=(0,e0.ty)(r,"plain_text_mode")?o:s;return i.setContents({contents:c.ops}),i.focus()});e1.meta={name:"prependMessageInputWithEmailConversation",key:"createThunkPrependMessageInputWithEmailConversation",description:"show slackbot ephemeral message whether to show email in channel"};var e2=a(0x24c41afd9),e4=a(0x1dff4f8b1),e5=a(0x1400f598e),e3=a(0x1e3eb45fd),e6=a(0x365a4cc3),e8=a(0x1f48e3aa4),e7=a(0x8c8bafa3),e9=a(0x1ecc7f772),te=a(0x1ffbda36f),tt=a(0x217553e42);let ta=(0,F.Ay)("prepend message input with channel email text",(e,t,{channelId:a})=>{let n=t(),r=(0,eO.zC)({viewContext:eL.Y.MESSAGE_PANE,channelId:a});if(!r)return;let i=(0,tt.OL)(n,a),l=(0,e9.SB)(n,i),o=(0,te.H)(n,{channelId:a}).address,s=new u.Ay("channel-email-addresses"),c=s.t(":wave: I\u2019ve set up an email address for this channel:"),d=s.t("Any email sent or forwarded to this address will be posted directly to {channelDisplayName} :sparkles:",{channelDisplayName:l}),m=s.t("Learn more"),p=s.t(" about sending email to Slack."),h=`https://${(0,e7.qF)()}/help/articles/206819278-Send-emails-to-Slack`,_=new(eX())().insert(`${c}

${o}

${d}`),f=new(eX())().insert(c).insert(`
`).insert(o,{italic:!0}).insert(`
`,{blockquote:!0}).insert(`
`).insert(d).insert(m,{link:h}).insert(p),b=(0,e0.ty)(n,"plain_text_mode")?_:f;return r.setContents({contents:b.ops}),r.focus()});ta.meta={name:"prePendMessageInputAboutChannelEmail",key:"createThunkPrePendMessageInputAboutChannelEmail",description:"prepend message input with channel email text"};var tn=a(0x206e4c7ed),tr=a(0x9b808018),ti=a(0x6dc64a9b),tl=a(0x14ea3ce99),to=a(0x10394ade5),ts=a(0x207f3d408),tc=a(0x6c4a6444),td=a(0xbb73f59),tm=a(0xcb27a3b7),tu=a(0xb47d3416);let tp=(0,F.Ay)("Ignore a file permission request",(e,t,a)=>{let n=a.message_ts;return e((0,tu.Y$)({messageTs:n})),e((0,tm.N)(a))});tp.meta={name:"ignoreFilePermissionRequest",key:"createThunkIgnoreFilePermissionRequest",description:"Ignore a file permission request"};let th=(0,F.Ay)("Accept a file permission request",(e,t,a)=>{let n=a.message_ts;return e((0,tu.Y$)({messageTs:n})),e((0,td.$)(a))});th.meta={name:"acceptFilePermissionRequest",key:"createThunkAcceptFilePermissionRequest",description:"Accept a file permission request"};let t_=new u.Ay("button-element"),tf={mention_cta:"mention_cta",cea_dismiss_cta:"cea_dismiss_cta",cea_share_email_cta:"cea_share_email_cta",post_email_cta:"post_email_cta",copy_to_clipboard:"copy_to_clipboard",remove_flagged_message_cta:"remove_flagged_message_cta",dismiss_flagged_message_cta:"dismiss_flagged_message_cta",edit_approval_settings:"edit_approval_settings",cancel_edit_approval_settings:"cancel_edit_approval_settings",actionable_launch_sc_hub:"actionable_launch_sc_hub",launch_channel_invite_modal:"launch_channel_invite_modal",dismiss:"dismiss",file_permissions_access_request_accept:"file_permissions_access_request_accept",file_permissions_access_request_ignore:"file_permissions_access_request_ignore",file_permissions_access_request_accept_edit:"file_permissions_access_request_accept_edit",file_permissions_access_request_accept_owner:"file_permissions_access_request_accept_owner",native_ai_feedback_positive:"native_ai_feedback_positive",native_ai_feedback_negative:"native_ai_feedback_negative",native_ai_feedback_neutral:"native_ai_feedback_neutral",launch_slack_connect_deny_request_modal:"launch_slack_connect_deny_request_modal",slack_connect_approve_shared_invite:"slack_connect_approve_shared_invite",slackbot_canvas_ai_action_update:"slackbot_canvas_ai_action_update",slackbot_canvas_ai_action_copy:"slackbot_canvas_ai_action_copy",slack_connect_invite_post_message_create_new_resource:"slack_connect_invite_post_message_create_new_resource",slack_connect_invite_post_message_upload_files:"slack_connect_invite_post_message_upload_files",salesforce_csv_field_mapping:"salesforce_csv_field_mapping",downmarket_crm_handraise_clicked:"downmarket_crm_handraise_clicked",sfdc_license_approval_approve:"sfdc_license_approval_approve",sfdc_license_approval_deny:"sfdc_license_approval_deny"},tb={say_my_name_action_blk:"say_my_name_action_blk",cea_actions_blk:"cea_actions_blk",post_email_actions_blk:"post_email_actions_blk",sc_invite_copy_ephemeral:"sc_invite_copy_ephemeral",moderate_message_action_blk:"moderate_message_action_blk",slack_connect_invite_approval_request:"slack_connect_invite_approval_request",slack_connect_invite_reminder:"slack_connect_invite_reminder",channel_invite_suggestions_file_shared_sb:"channel_invite_suggestions_file_shared_sb",file_permissions_access_request:"file_permissions_access_request",native_ai_feedback:"native_ai_feedback",slack_connect_invite_request:"slack_connect_invite_request",slack_connect_invite_post_message:"slack_connect_invite_post_message",salesforce_csv_field_mapping_blk:"salesforce_csv_field_mapping_blk",downmarket_crm_handraise_actions:"downmarket_crm:handraise_actions",sfdc_license_approval_request:"sfdc_license_approval_request"},tg=[tf.edit_approval_settings,tf.cancel_edit_approval_settings],ty={wfb_ai_answer_feedback_positive:"wfb_ai_answer_feedback_positive",wfb_ai_answer_feedback_negative:"wfb_ai_answer_feedback_negative"},tA={onAction:o.A,url:void 0,blockId:void 0,value:void 0,parent:void 0,showConfirmDialog:void 0,size:Y.c.small,style:void 0,isSlackbotMessage:!1,channelId:void 0,viewContext:eL.Y.MESSAGE_PANE,windowId:"",blockKitClogger:o.A,parsedPermalink:null,experimentExplainerSharedChannelsInviteLinkGroupTreatment:!1,experimentWebIdentityLinksGroupTreatment:!1,experimentBlockKitLinkButtonSpeedbumpGroupOn:!1,blockKitLogPayload:void 0,dismissEphemeralMessage:o.A,shareChannelEmailMessage:o.A,shareEmailLink:o.A,containerId:void 0,blocksContainerContext:void 0,openApprovalSettingsModalForTeam:o.A,removeMessage:o.A,dismissReport:o.A,urlIsSIWSLink:!1,accessibilityLabel:void 0,dispatchStartChannelInviteModal:void 0,dispatchRemoveMessageAndTimestamp:void 0,file:void 0,requestorId:void 0,dispatchAcceptFilePermissionRequest:o.A,dispatchIgnoreFilePermissionRequest:o.A,dispatchSearchSummaryFeedbackDialog:o.A,dispatchAiFeedbackDialog:o.A,dispatchManualDenyRequestModal:o.A,dispatchApproveSharedInvite:o.A,dispatchNavigateToExternalConnections:o.A,thirdPartyAuth:void 0,requestedInviteId:void 0,requestedInviteeEmail:void 0,requestedInviterUserId:void 0,accessLevel:void 0,appId:void 0,dispatchOpenSuspiciousLink:o.A,experimentRestructureAiFeedbackModalGroupOn:!1,experimentSlackAiPreviewUpdateGroupOn:!1,messageTs:void 0,canvasId:void 0,dispatchSetCanvasUpdateStep:o.A,dispatchOpenAIWorkflowFeedbackForm:o.A,canvasPreviewContent:void 0,experimentBkContainerIdGroupOn:!1,dispatchForceCreateNewResourceOpen:o.A,dispatchForceUploadFilesOpen:o.A,dispatchReviewDownmarketCrmLicenseApprovalRequest:o.A},tx={primary:"primary",danger:"danger"},tE=class extends l.PureComponent{static defaultProps=tA;static contextType=ed.A;constructor(e){super(e),this.state={copyClicked:!1,disabledText:void 0},this.handleClick=this.handleClick.bind(this),this.handleClickOrConfirmDialogGo=this.handleClickOrConfirmDialogGo.bind(this),this.handleAttentionEnter=this.handleAttentionEnter.bind(this),this.handleAttentionLeave=this.handleAttentionLeave.bind(this)}componentWillUnmount(){let{actionId:e,dispatchForceCreateNewResourceOpen:t,dispatchForceUploadFilesOpen:a}=this.props;if(this.isValidSlackbotMessageAction())switch(e){case tf.slack_connect_invite_post_message_create_new_resource:t(void 0);break;case tf.slack_connect_invite_post_message_upload_files:a(void 0)}}isValidSlackbotMessageAction(){let{actionId:e,blockId:t,isSlackbotMessage:a}=this.props;return a&&tf[e]&&tb[t]}onActionWrapper(){let{actionId:e,blockId:t,onAction:a,text:n,value:r,style:i,isSlackbotMessage:l,thirdPartyAuth:o,appId:d,experimentRestructureAiFeedbackModalGroupOn:m,dispatchAiFeedbackDialog:u,blockKitClogger:p,channelId:h,messageTs:_}=this.props,f={actionId:e,blockId:t,text:n,value:r,style:i,type:"button",thirdPartyAuth:void 0};if((0,s.A)(o)||(f.thirdPartyAuth=o),ty[e]){u({rating:e===ty.wfb_ai_answer_feedback_positive?e8.iz.POSITIVE:e8.iz.NEGATIVE,aiResultId:r,type:e8.ci.WorkflowAiAnswerStep,context:{workflow_ai_answer_step_context:{channel_id:h,message_ts:_}}}),p(et.EventId.NATIVE_AI,{contexts:{ui_context:{ui_component_name:et.UiComponentName.WORKFLOW_AI_ANSWER_FEEDBACK,ui_properties:{element_name:e===ty.wfb_ai_answer_feedback_positive?"ai_feedback_button_positive":"ai_feedback_button_negative"}}}});return}if(e===e_.kd&&t===e_.NI){let e;try{e={...JSON.parse(f.value),currentChannelId:h,messageTs:_,entrypointForClog:ep.m.MESSAGE_GREETING_CARD_BUTTON}}catch{e={}}p(et.EventId.SLACK_SEASONAL_DELIGHT,{contexts:{ui_context:{ui_properties:{element_name:"seasonal_january_delight_open_greeting_msg_button",element_type:et.ElementType.BUTTON},action:et.UiAction.CLICK}}}),this.props.dispatchOpenGreetingCard(e);return}e===tf.salesforce_csv_field_mapping&&t===tb.salesforce_csv_field_mapping_blk||e===tf.downmarket_crm_handraise_clicked&&t===tb.downmarket_crm_handraise_actions?this.handleSlackbotAction(e):(!l||!tf[e]||!tb[t]||(this.handleSlackbotAction(e),(0,c.A)(tg,e)))&&((0,em.c)(d)&&tf[e]&&!l&&m?this.handleSlackbotAiAction(e):a(f))}handleSlackbotAction(e){let{value:t,viewContext:a,channelId:n,containerId:r,blockKitClogger:i,dismissEphemeralMessage:l,shareChannelEmailMessage:o,shareEmailLink:s,removeMessage:c,dismissReport:d,dispatchNavigateToExternalConnections:m,dispatchRemoveMessageAndTimestamp:u,dispatchAcceptFilePermissionRequest:p,dispatchIgnoreFilePermissionRequest:h,dispatchOpenDownmarketCrmModalByPlan:_,dispatchSearchSummaryFeedbackDialog:f,dispatchAiFeedbackDialog:b,dispatchManualDenyRequestModal:g,dispatchApproveSharedInvite:y,file:A,requestorId:x,requestedInviteId:E,requestedInviteeEmail:C,requestedInviterUserId:k,accessLevel:v,experimentRestructureAiFeedbackModalGroupOn:S,dispatchForceCreateNewResourceOpen:I,dispatchForceUploadFilesOpen:w,dispatchOpenSalesforceFieldMappingModal:T,dispatchReviewDownmarketCrmLicenseApprovalRequest:N,windowId:M}=this.props,P=(0,eO.zC)({viewContext:a,channelId:n});switch(e){case tf.mention_cta:if(!P)return;P.focus(),P.maybeTriggerMentionAutocomplete?.(),i(et.EventId.EDUCATION_EPHEMERAL_MESSAGE,{contexts:{ui_context:{step:"ephemeral_message_gif",step_variant:"mention",ui_properties:{element_name:"try_it"}}}});break;case tf.cea_dismiss_cta:l();break;case tf.cea_share_email_cta:l(),o({channelId:n});break;case tf.post_email_cta:l(),s({channelId:n,permalink:t});break;case tf.copy_to_clipboard:this.handleCopyToClipboardAction();break;case tf.edit_approval_settings:case tf.cancel_edit_approval_settings:this.handleEditApprovalSettingsAction();break;case tf.remove_flagged_message_cta:c({channelId:n,containerId:r,info:t});break;case tf.dismiss_flagged_message_cta:d({channelId:n,containerId:r});break;case tf.actionable_launch_sc_hub:m();break;case tf.launch_channel_invite_modal:this.handleLaunchChannelInviteModal();break;case tf.dismiss:this.handleDismissClogging(),u({channelId:n,ts:r});break;case tf.file_permissions_access_request_accept:case tf.file_permissions_access_request_accept_edit:case tf.file_permissions_access_request_accept_owner:p({file_id:A.id,requestor_id:x,message_ts:r,access_level:v}),i(et.EventId.QUIP_PERMISSIONS_REQUEST,{contexts:{ui_context:{ui_component_name:et.UiComponentName.QUIP_PERMISSIONS_REQUEST_SLACKBOT,ui_component_variant:"request_accept",ui_properties:{element_name:"quip_permissions_request_button_accept"}}}});break;case tf.file_permissions_access_request_ignore:h({fileId:A.id,requestorId:x,message_ts:r}),i(et.EventId.QUIP_PERMISSIONS_REQUEST,{contexts:{ui_context:{ui_component_name:et.UiComponentName.QUIP_PERMISSIONS_REQUEST_SLACKBOT,ui_component_variant:"request_ignore",ui_properties:{element_name:"quip_permissions_request_button_ignore"}}}});break;case tf.downmarket_crm_handraise_clicked:_({shouldNavigateToProvisioning:!0,entryPoint:"handraise_slackbot_dm"});break;case tf.native_ai_feedback_positive:case tf.native_ai_feedback_negative:case tf.native_ai_feedback_neutral:i(et.EventId.NATIVE_AI,{contexts:{ui_context:{ui_component_name:et.UiComponentName.AI_INLINE_SEARCH,ui_properties:{element_name:e8.zh.Positive?"ai_feedback_button_positive":"ai_feedback_button_negative"}}}}),S?b({rating:e===e8.zh.Positive?e8.iz.POSITIVE:e8.iz.NEGATIVE,aiResultId:t,type:e8.ci.InlineSearch,context:{inline_search_answer_context:{encoded_channel_id:n}}}):f({rating:eu.j7[e],searchSummaryId:t,type:"inline search answer",encodedChannelId:n});break;case tf.slack_connect_approve_shared_invite:y({inviteId:E,reason:"request-shared-invite-approve"});break;case tf.launch_slack_connect_deny_request_modal:g({requestedInviteId:E,requestedInviteeEmail:C,requestedInviterUserId:k});break;case tf.slack_connect_invite_post_message_create_new_resource:i(et.EventId.GROWTH_SLACK_CONNECT,{contexts:{ui_context:{ui_component_name:et.UiComponentName.SLACK_CONNECT_SLACKBOT_MESSAGE_CREATE_NEW_RESOURCE_BUTTON,ui_step:a,ui_properties:{element_name:"slack_connect_invite_post_message_create_new_resource",element_type:et.ElementType.BUTTON},action:et.UiAction.CLICK}}}),I({viewContext:this.context?.viewContext??a,windowId:M,channelId:n});break;case tf.slack_connect_invite_post_message_upload_files:i(et.EventId.GROWTH_SLACK_CONNECT,{contexts:{ui_context:{ui_component_name:et.UiComponentName.SLACK_CONNECT_SLACKBOT_MESSAGE_UPLOAD_FILES_BUTTON,ui_step:a,ui_properties:{element_name:"slack_connect_invite_post_message_upload_files",element_type:et.ElementType.BUTTON},action:et.UiAction.CLICK}}}),w({viewContext:this.context?.viewContext??a,windowId:M,channelId:n});break;case tf.salesforce_csv_field_mapping:T(),i(et.EventId.LOB_DOWNMARKET,{contexts:{ui_context:{ui_component_name:et.UiComponentName.SALESFORCE_CSV_FIELD_MAPPING_BUTTON,ui_properties:{element_name:"salesforce_modify_field_mapping_button",element_type:et.ElementType.BUTTON},action:et.UiAction.CLICK}}});break;case tf.sfdc_license_approval_approve:{let e;try{e=JSON.parse(t),N({requestId:e.request_id,salesforceOrgId:e.salesforce_org_id,memberId:e.member_id,action:"approve",profile:R.gd.STD_USER_PLUS}),i(et.EventId.LOB_DOWNMARKET,{contexts:{ui_context:{ui_component_name:et.UiComponentName.SALESFORCE_LICENSE_APPROVAL_REVIEW_BUTTON,ui_properties:{element_name:"sfdc_license_approval_approve_button",element_type:et.ElementType.BUTTON},action:et.UiAction.CLICK}}})}catch(t){e={}}break}case tf.sfdc_license_approval_deny:{let e;try{e=JSON.parse(t),N({requestId:e.request_id,salesforceOrgId:e.salesforce_org_id,action:"deny"}),i(et.EventId.LOB_DOWNMARKET,{contexts:{ui_context:{ui_component_name:et.UiComponentName.SALESFORCE_LICENSE_APPROVAL_DENY_BUTTON,ui_properties:{element_name:"sfdc_license_approval_deny_button",element_type:et.ElementType.BUTTON},action:et.UiAction.CLICK}}})}catch(t){e={}}}}}handleSlackbotAiAction(e){let{channelId:t,blockKitClogger:a,dispatchAiFeedbackDialog:n,experimentRestructureAiFeedbackModalGroupOn:r,messageTs:i,dispatchSetCanvasUpdateStep:l,canvasId:o}=this.props;switch(e){case tf.native_ai_feedback_positive:case tf.native_ai_feedback_negative:case tf.native_ai_feedback_neutral:r&&(a(et.EventId.NATIVE_AI,{contexts:{ui_context:{ui_component_name:et.UiComponentName.AI_ASSISTANT,ui_properties:{element_name:e8.zh.Positive?"ai_feedback_button_positive":"ai_feedback_button_negative"}}}}),n({rating:e===e8.zh.Positive?e8.iz.POSITIVE:e8.iz.NEGATIVE,aiResultId:`${i}_${t}`,type:e8.ci.SlackAssistant,context:{slack_assistant_context:{channel_id:t,thread_ts_key:i,query:"Slack assistant session"}}}));break;case tf.slackbot_canvas_ai_action_update:l({canvasId:o,updateStep:e8.a5.TRIGGERED}),this.handleCanvasContentInsertionAction();break;case tf.slackbot_canvas_ai_action_copy:this.handleCopyToClipboardAction()}}handleDismissClogging(){let{blockId:e,blockKitClogger:t}=this.props;e===tb.channel_invite_suggestions_file_shared_sb&&t(et.EventId.MSG_CHANNEL_INVITE_SUGGESTIONS_SENT,{contexts:{ui_context:{step:et.UiStep.SLACKBOT,step_variant:"ephemeral",ui_properties:{element_name:`${tf.launch_channel_invite_modal}_dismiss`}}}})}handleLaunchChannelInviteModal(){let e,t,a,{blockKitClogger:n,channelId:r,dispatchStartChannelInviteModal:i,value:l}=this.props,isFieldValid=e=>Array.isArray(e)&&e.length>0;try{a=JSON.parse(l)}catch(e){a={}}let{emails:o,users:s}=a;isFieldValid(o)&&(e=o.map(e=>({key:e,label:e,isLoading:!0,queryId:(0,d.A)("query__")}))),isFieldValid(s)&&(t=s),n(et.EventId.MSG_CHANNEL_INVITE_SUGGESTIONS_SENT,{contexts:{ui_context:{step:et.UiStep.SLACKBOT,step_variant:"ephemeral",ui_properties:{element_name:tf.launch_channel_invite_modal}}}}),i({channelId:r,entryPoint:eM.kP.ChannelInviteSuggestionsFileShareSlackbotMessage,initialSelectedEmails:e,initialSelectedMemberIds:t})}handleCopyToClipboardAction(){let{value:e,blockKitClogger:t,canvasPreviewContent:a}=this.props,n=a?.content??e,r=t_.t("\u2714 Copied");(0,eR.x3)(n),this.setState(()=>({copyClicked:!0,disabledText:r})),setTimeout(()=>{this.setState(()=>({copyClicked:!1}))},5e3),t(et.EventId.CHANNEL_CREATE_FLOW,{contexts:{ui_context:{step:et.UiStep.SLACKBOT,step_variant:"ephemeral",ui_properties:{element_name:"shared_channel_url_copy"}}}})}handleCanvasContentInsertionAction(){let{experimentSlackAiPreviewUpdateGroupOn:e,text:t}=this.props,{text:a}=t,n=e?t_.t("Inserted"):"Inserted",r=e?t_.t("Replaced"):"Replaced",i="Replace"===a?r:n;this.setState(()=>({disabledText:i,buttonDisabledState:!0}))}handleOnCanvasContentHover(e){let{experimentSlackAiPreviewUpdateGroupOn:t,dispatchSetCanvasUpdateStep:a,canvasId:n}=this.props;t&&a({canvasId:n,updateStep:e?e8.a5.PREVIEWED:e8.a5.LOADED})}handleEditApprovalSettingsAction(){let{actionId:e,value:t,blockKitClogger:a}=this.props;a(et.EventId.SLACK_CONNECT_EDIT_APPROVAL_SETTINGS,{contexts:{ui_context:{step:"edit_approval_settings",action:e}}}),e===tf.edit_approval_settings&&this.props.openApprovalSettingsModalForTeam({teamId:t})}handleClick(e){let{blocksContainerContext:t,showConfirmDialog:a}=this.props;a?a({onGo:this.handleClickOrConfirmDialogGo}):this.handleClickOrConfirmDialogGo(),t===z.pi.ai_app&&e.stopPropagation()}handleClickOrConfirmDialogGo(){let{dispatchHandleDeepLink:e,dispatchHandleIdentityTransferLinkClick:t,dispatchOpenPermalink:a,dispatchOpenSuspiciousLink:n,experimentWebIdentityLinksGroupTreatment:r,experimentBlockKitLinkButtonSpeedbumpGroupOn:i,parsedPermalink:l,url:o,urlIsSIWSLink:s,blockId:c,actionId:d,containerId:m}=this.props,u=this.context.channelId;if(this.onActionWrapper(),!o||!(0,eV.A)(o))return;let p=this.props.blocksContainerContext===z.pi.app_home;if(o.startsWith("slack://"))e({uri:o,dangerouslyOverrideRouting:p});else if(l)a({permalink:o,hermesLinkTriggerUIContext:{location:"button",blockId:c,actionId:d,channelId:u,messageTs:m},dangerouslyOverrideRouting:p});else if(s&&r)t({url:o,channelId:u});else{let e=this.getButtonText()??"";i&&(0,$.A)(e,o)?n({url:o,text:e}):window.open(o,"_blank","noopener,noreferrer")}}handleAttentionEnter(){let{actionId:e}=this.props;e===tf.slackbot_canvas_ai_action_update&&this.handleOnCanvasContentHover(!0)}handleAttentionLeave(){let{actionId:e}=this.props;e===tf.slackbot_canvas_ai_action_update&&this.handleOnCanvasContentHover(!1)}getButtonText(){let{text:e}=this.props,{copyClicked:t,disabledText:a,buttonDisabledState:n}=this.state,{text:r}=e;return t||n?a:r}isExternalLink(){let{url:e,parsedPermalink:t,urlIsSIWSLink:a}=this.props;return e&&(0,eV.A)(e)&&!t&&!e.startsWith("slack://")&&!a}getAutoClogProps(){let{actionId:e,isSlackbotMessage:t,blockKitLogPayload:a}=this.props;if((0,s.A)(a))return;let n={eventId:et.EventId.BK_USER_INTERACTION,interaction:et.Interaction.CLICK,onClick:{enableClogAction:!0},interactionElement:et.InteractionElement.BUTTON,...a};return t&&(e===tf.slack_connect_invite_post_message_upload_files||e===tf.slack_connect_invite_post_message_create_new_resource)?{...n,eventId:et.EventId.GROWTH_SLACK_CONNECT,clogImpression:!0,elementName:e,action:et.UiAction.IMPRESSION}:n}render(){let{text:e,isDisabled:t,parent:a,style:n,size:r,blockId:i,actionId:o,containerId:s,experimentWebIdentityLinksGroupTreatment:c,url:d,urlIsSIWSLink:u,accessibilityLabel:p,experimentBlockKitLinkButtonSpeedbumpGroupOn:f,experimentBkContainerIdGroupOn:b,slackConnectFileSharingBlocked:g,value:y}=this.props;if("draft_message_insert"===o)try{let e=JSON.parse(y||"{}");return l.createElement(DraftMessageCard,{draftInfo:{channelId:e.channel_id,threadTs:e.thread_ts,richTextBlock:e.rich_text_block,channelName:e.channel_name||"",isStreaming:!0===e.streaming}})}catch{}let{copyClicked:A,buttonDisabledState:x}=this.state,{text:E,...C}=e,k=this.getButtonText(),v=b?getHtmlIdForStatefulBlock({containerId:s,actionId:o,blockId:i}):`${o}-${i}`,S=l.createElement(h.Ay,{"data-qa":"bk_button-element",id:v,"aria-label":p,className:"p-block_kit_button_element",type:tx[n]||"outline",size:r,onBlur:this.handleAttentionLeave,onClick:this.handleClick,onFocus:this.handleAttentionEnter,onMouseEnter:this.handleAttentionEnter,onMouseLeave:this.handleAttentionLeave,disabled:A||t||x,"data-qa-block-id":i,"data-qa-action-id":o,autoClogProps:this.getAutoClogProps()},l.createElement(Q.A,{"data-qa":"bk_button_mrkdwn",text:k,...C,parent:a,maxCharacters:30,emojiSize:r}));if(u&&c&&(S=l.createElement(ec.A,{url:d},S)),f&&this.isExternalLink()){let e=(0,m.A)(d);S=l.createElement(_.Ay,{tip:l.createElement(j.A,{href:e}),position:"top",zIndex:"above_fs",tipClassName:"c-tooltip__tip--link"},S)}return g?null:S}};tE.displayName="ButtonElement";let tC=(0,ew.A)((0,eK.N)((e,{url:t,actionId:a,value:n,containerId:r,isDisabled:i,canvasId:l,channelId:o})=>{let s,c,d,m,u,p,h=i,_=!1;if(a===tf.slack_connect_approve_shared_invite&&n){try{d=JSON.parse(n).invite_id}catch{}}if(a===tf.launch_slack_connect_deny_request_modal&&n){let e;try{d=(e=JSON.parse(n)).invite_id,m=e.target_email,u=e.actor_id}catch{e={}}}if((a===tf.file_permissions_access_request_accept||a===tf.file_permissions_access_request_accept_edit||a===tf.file_permissions_access_request_accept_owner||a===tf.file_permissions_access_request_ignore)&&n){let t;h=(0,ti.eh)(e,r)||i;try{let a=(t=JSON.parse(n)).file_id;s=(0,tl.Lp)(e,a),c=t.requestor_id,p=t.access_level}catch{t={}}}if((a===tf.sfdc_license_approval_approve||a===tf.sfdc_license_approval_deny)&&n)try{let t=JSON.parse(n).request_id;t&&(0,ez.$A)(e,t)&&(h=!0)}catch{}return a===tf.slack_connect_invite_post_message_upload_files&&(_=(0,eN.O)(e,o||"")),{experimentBlockKitLinkButtonSpeedbumpGroupOn:"on"===(0,w._Z)(e,"block_kit_link_button_speedbump"),experimentWebIdentityLinksGroupTreatment:"treatment"===(0,w._Z)(e,"web_identity_links"),experimentRestructureAiFeedbackModalGroupOn:(0,e3.EA)(e),experimentSlackAiPreviewUpdateGroupOn:(0,e3.nS)(e),urlIsSIWSLink:(0,tc.w$)(e,t),parsedPermalink:(0,eT.$N)(e,t),canvasPreviewContent:(0,e6.OL)(e,l),file:s,requestorId:c,isDisabled:h,requestedInviteId:d,requestedInviteeEmail:m,requestedInviterUserId:u,accessLevel:p,experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id"),slackConnectFileSharingBlocked:_}},e=>({dispatchHandleDeepLink:t=>e((0,e$.HB)(t)),dispatchOpenPermalink:t=>e((0,eP._J)(t)),dispatchOpenSuspiciousLink:t=>e((0,eZ.A)(t)),dismissEphemeralMessage:()=>e((0,tr.P)({ephemeralType:tn.F.tempSlashCmdFeedback})),shareChannelEmailMessage:t=>e(ta(t)),shareEmailLink:t=>e(e1(t)),openApprovalSettingsModalForTeam:t=>e(eW(t)),removeMessage:t=>e((0,eY.QN)(t)),dismissReport:t=>e((0,eY.vR)(t)),dispatchHandleIdentityTransferLinkClick:t=>e((0,to.C)(t)),dispatchNavigateToExternalConnections:t=>e((0,eQ.R)(t)),dispatchStartChannelInviteModal:t=>e((0,e4.A)(t)),dispatchRemoveMessageAndTimestamp:t=>e((0,e2.A)(t)),dispatchAcceptFilePermissionRequest:t=>e(th(t)).catch(()=>{e((0,es.A)())}),dispatchIgnoreFilePermissionRequest:t=>e(tp(t)).catch(()=>{e((0,es.A)())}),dispatchOpenDownmarketCrmModalByPlan:t=>e((0,f.w)(t)),dispatchSearchSummaryFeedbackDialog:t=>e((0,eS.CC)(t)),dispatchAiFeedbackDialog:t=>e((0,ev._)(t)),dispatchManualDenyRequestModal:t=>e(eo(t)),dispatchApproveSharedInvite:t=>e((0,eI.O)(t)),dispatchSetCanvasUpdateStep:t=>e((0,e5.W2)(t)),dispatchForceCreateNewResourceOpen:t=>e((0,ts.Dw)(t)),dispatchForceUploadFilesOpen:t=>e((0,ts.YV)(t)),dispatchOpenGreetingCard:t=>e((0,eh.d)(t)),dispatchOpenSalesforceFieldMappingModal:()=>e(ej()),dispatchReviewDownmarketCrmLicenseApprovalRequest:t=>e(q(t))}),null,{areStatePropsEqual:p.kt})((0,K.A)(tE)));var tk=a(0xb97b797e),tv=a(0x2264e6ea3),tS=a(0x193edc1da),tI=a(0x226d2c646),tw=a(0xbe2be077),tT=a(0x18d3df42a);let tN=new u.Ay("block_kit"),tM=class extends l.PureComponent{logSelectElementMenuOpen;static defaultProps={size:Y.c.small,isRequired:!1,onAction:o.A,responseUrlEnabled:!1,blockKitClogger:o.A,showEnterpriseOptions:!1,focusOnLoad:!1,experimentBkContainerIdGroupOn:!1};constructor(e){super(e),(0,tk.v)(this,["onAction","renderEmptyStateMessage","renderChannelOption"]);const{savedChannel:t,initialChannel:a,blockKitClogger:n,type:r}=e;this.state={selectedChannel:void 0===t?a:t},this.logSelectElementMenuOpen=()=>n?.("BLOCK_KIT_SELECT_SCREEN_SHOW",{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:r}}})}componentDidUpdate(e){this.props.initialChannel!==e.initialChannel&&this.setState(()=>({selectedChannel:this.props.initialChannel}))}onAction({value:e}){let{blockId:t,actionId:a,onAction:n,initialChannel:r}=this.props,l={type:i.ze.channels_select,actionId:a,blockId:t,selectedChannel:e||null};r&&(l.initialChannel=r),this.props.responseUrlEnabled&&(l.responseUrlEnabled=this.props.responseUrlEnabled),n?.(l),this.setState(()=>({selectedChannel:e}))}createChannelSearchOptions(){let{containerActionsPayload:e,showEnterpriseOptions:t}=this.props;return{entities:{channels:{includeArchived:!1,includePrivate:!1,allowedInternalTeams:t&&e?.serviceTeamId&&!(0,tv.JV)(e?.serviceTeamId)?[e?.serviceTeamId]:null,shouldAllowedInternalTeamsMatchAny:t&&!(0,tv.JV)(e?.serviceTeamId)}},allowEmptyQuery:!0}}renderEmptyStateMessage(e){let t=e?tN.t("\u{1F615} No channel matches these keywords."):tN.t("\u{1F615} No channel found");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}renderChannelOption(e){return l.createElement(tS.A,{channelId:e.value})}render(){let{size:e,parent:t,isRequired:a,isDisabled:n,placeholder:r,showConfirmDialog:o,elementWidth:c,containerId:d,actionId:m,connectedReplaceTextEmojiWithNative:u,blockId:p,blockKitLogPayload:h,focusOnLoad:_,experimentBkContainerIdGroupOn:f}=this.props,b=tN.t("Select a channel"),g=r?.text&&r?.emoji?u(r.text):r?.text,y=t===i.WP.input&&!a,A=this.createChannelSearchOptions(),x=f?getHtmlIdForStatefulBlock({containerId:d,actionId:m,blockId:p}):`${m}-${p}`;return l.createElement(tI.A,{searcherOptions:A,selectId:x,ariaLabel:r?.text??b,renderOption:this.renderChannelOption,renderSelectedOption:this.renderChannelOption,size:e,width:c,onOptionSelected:this.onAction,selectedOption:this.state.selectedChannel?{value:this.state.selectedChannel}:void 0,isDisabled:n,isRequired:!y,placeholderText:g??b,onOpen:this.logSelectElementMenuOpen,showConfirmDialog:o,minOptionsListWidth:300,emptyStateMessage:this.renderEmptyStateMessage,focusOnMount:_,autoClogProps:(0,s.A)(h)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.CHANNELS_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{interaction:et.Interaction.CLOSE,enableClogAction:!0},...h}})}};tM.displayName="ChannelsSelectElement";let tR=(0,eK.N)(e=>({showEnterpriseOptions:(0,tw.k)(e),experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t))}))((0,K.A)(tM));var tP=a(0x45bd075),tL=a(0x15698ed2),tO=a(0x1d2cd7755),tD=a(0xd3fcb4c1),tF=a(0x18018a3b8);let tU={plain_text:Q.A,mrkdwn:tD.q},tB=class extends l.PureComponent{static defaultProps={initialOptions:void 0,savedOptions:void 0,showConfirmDialog:void 0,isDisabled:!1,blockKitLogPayload:void 0,focusOnLoad:!1,labelId:void 0,experimentBkContainerIdGroupOn:!1};constructor(e){super(e),(0,tk.v)(this,["handleClick","onActionWrapper"]);const{savedOptions:t,initialOptions:a}=e;this.state={selectedOptions:t||a||[]}}onActionWrapper(e,t){let{actionId:a,blockId:n,onAction:r}=this.props,l={actionId:a,blockId:n,type:i.ze.checkboxes},setStateCallback=()=>{r({selectedOptions:this.state.selectedOptions,...l})};e?this.setState(e=>({selectedOptions:e.selectedOptions.concat([t])}),setStateCallback):this.setState(e=>({selectedOptions:e.selectedOptions.filter(e=>e.value!==t.value)}),setStateCallback)}handleClick(e,t){let{showConfirmDialog:a}=this.props,n=e.target.checked;a?a({onGo:()=>this.onActionWrapper(n,t)}):this.onActionWrapper(n,t)}render(){let{options:e,containerId:t,actionId:a,blockId:n,isDisabled:r,blockKitLogPayload:i,focusOnLoad:o,labelId:c,experimentBkContainerIdGroupOn:d}=this.props,createTextElement=e=>{let t=tU[e.type];return l.createElement(t,{noLinking:!0,...e})};return createTextElement.displayName="createTextElement",l.createElement("div",{className:"p-checkboxes_element","data-qa":"bk-checkboxes_element"},l.createElement(tL.A,{isDisabled:r,legendId:c},e.map((e,c)=>{let m=this.state.selectedOptions&&!!this.state.selectedOptions.find(t=>t.value===e.value),u=(({containerId:e,blockId:t,actionId:a,optionValue:n,index:r,useContainerId:i})=>i?[e,a,t,n,r].join("-"):`${a}-${t}-${n}-${r}`)({containerId:t,blockId:n,actionId:a,optionValue:e.value,index:c,useContainerId:!!d});return l.createElement("div",{key:`${a}-${n}-${e.value}-${c}`},l.createElement(tO.A,{isDisabled:r,className:"p-checkboxes_element__label",cursor:"pointer",type:"inline",subtext:e.description?createTextElement(e.description):null,htmlFor:u,text:createTextElement(e.text)},l.createElement(tP.A,{name:`${a}-${n}`,checked:m,onChange:t=>this.handleClick(t,e),id:u,focusOnMount:0===c&&o,autoClogProps:(0,s.A)(i)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.CHECKBOXES,interaction:m?et.Interaction.DESELECT:et.Interaction.SELECT,onChange:{enableClogAction:!0},...i}})))})))}};tB.displayName="Checkboxes";let tH=(0,tF.N)(e=>({experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),null)((0,K.A)(tB));var tW=a(0x854f5389),tV=a(0x929229c1),tG=a(0xb77a689a);let tq={entities:{channels:{includeArchived:!1,includePublic:!0,includePrivate:!0,includeMpims:!0,includeExternallyShared:!0},members:{includeSelf:!0,includeSlackbot:!0}},allowEmptyQuery:!0};var tj=a(0x1edb6b65f);let tK=new u.Ay("block_kit"),t$=class extends l.PureComponent{static defaultProps={isRequired:!1,parent:void 0,size:Y.c.small,onAction:o.A,placeholder:void 0,initialConversation:void 0,savedConversation:void 0,responseUrlEnabled:!1,showConfirmDialog:void 0,blockKitClogger:o.A,connectedReplaceTextEmojiWithNative:tW.A,filter:void 0,blockKitLogPayload:void 0,focusOnLoad:!1,experimentBkContainerIdGroupOn:!1};constructor(e){super(e),(0,tk.v)(this,["onAction","renderEmptyStateMessage"]);const{savedConversation:t,initialConversation:a}=e;this.state={selectedConversation:void 0===t?a:t}}componentDidUpdate(e){this.props.initialConversation!==e.initialConversation&&this.setState(()=>({selectedConversation:this.props.initialConversation}))}logSelectElementMenuOpen=()=>{let{blockKitClogger:e=o.A,type:t}=this.props;e("BLOCK_KIT_SELECT_SCREEN_SHOW",{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:t}}})};onAction({value:e}){let{blockId:t,actionId:a,onAction:n=o.A,initialConversation:r,responseUrlEnabled:l}=this.props,s={type:i.ze.conversations_select,actionId:a,blockId:t,selectedConversation:e||null};r&&(s.initialConversation=r),l&&(s.responseUrlEnabled=l),n(s),this.setState(()=>({selectedConversation:e}))}renderEmptyStateMessage(e){let t=e?tK.t("\u{1F615} No conversation matches these keywords."):tK.t("\u{1F615} No conversation found");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}render(){let{size:e=Y.c.small,parent:t,isRequired:a=!1,isDisabled:n,placeholder:r,showConfirmDialog:o,elementWidth:c,containerId:d,actionId:m,connectedReplaceTextEmojiWithNative:u=tW.A,blockId:p,filter:h,blockKitLogPayload:_,focusOnLoad:f=!1,experimentBkContainerIdGroupOn:b=!1}=this.props,g=tK.t("Select a conversation"),y=r&&r.text&&r.emoji?u(r.text):r&&r.text,renderConversationOption=e=>l.createElement(tV.A,{id:e.value}),A=t===i.WP.input&&!a,x=(e=>{if(!e||(0,s.A)(e))return tq;let t={allowEmptyQuery:!0,entities:{}},a={includeExternallyShared:!e.excludeExternalSharedChannels,onlyFromTeamId:e.onlyFromTeamId};return t.entities.channels=a,e.include&&!(0,s.A)(e.include)&&(t.entities.channels={...a,includeArchived:!1,includePublic:e.include.includes("public"),includePrivate:e.include.includes("private"),includeMpims:e.include.includes("mpim")},(0,tG.A)(e?.onlyFromExternalWorkspaceId)&&(t.entities.channels.onlyFromExternalWorkspaceId=e.onlyFromExternalWorkspaceId)),((0,s.A)(e.include)||e.include?.includes("im"))&&(t.entities.members={includeSelf:!0,includeSlackbot:!e.excludeBotUsers,includeBots:!e.excludeBotUsers,onlyFromExternalTeamId:e.onlyFromTeamId},(0,tG.A)(e?.onlyFromExternalWorkspaceId)&&(t.entities.members.onlyFromExternalWorkspaceId=e.onlyFromExternalWorkspaceId)),t})(h),E=b?getHtmlIdForStatefulBlock({containerId:d,actionId:m,blockId:p}):`${m}-${p}`,C=(0,s.A)(_)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.CONVERSATIONS_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{interaction:et.Interaction.CLOSE,enableClogAction:!0},..._};return l.createElement(tI.A,{searcherOptions:x,selectId:E,ariaLabel:r&&r.text||g,renderOption:renderConversationOption,renderSelectedOption:renderConversationOption,size:e,width:c,onOptionSelected:this.onAction,selectedOption:this.state.selectedConversation?{value:this.state.selectedConversation}:void 0,isDisabled:n,isRequired:!A,placeholderText:y||g,onOpen:this.logSelectElementMenuOpen,showConfirmDialog:o,minOptionsListWidth:300,emptyStateMessage:this.renderEmptyStateMessage,focusOnMount:f,autoClogProps:C})}};t$.displayName="ConversationsSelectElementInner";let tY=(0,eK.N)((e,t)=>{let{filter:a}=t,n={connectedReplaceTextEmojiWithNative:tW.A,experimentBkContainerIdGroupOn:!1};return a&&a?.onlyFromTeamId&&(0,tj.B)(e,a.onlyFromTeamId)&&(n.filter={...a,onlyFromExternalWorkspaceId:a.onlyFromTeamId},delete n.filter.onlyFromTeamId),n.experimentBkContainerIdGroupOn="on"===(0,w._Z)(e,"bk_container_id"),n},e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t))}))((0,K.A)(t$));var tQ=a(0x1075d3a9c),tZ=a.n(tQ),tJ=a(0x40c0d834),tX=a(0x2503b7c1);let t0=new u.Ay("block_kit"),DatePicker=({onDateChange:e,onDatePickerOpen:t=o.A,blockKitClogger:a=o.A,id:n,onDatePickerClose:r=o.A,date:s,dateDisplayFormat:c,placeholder:d,disabled:m=!1,isRequired:u=!0,size:p="small",style:h,autoClogProps:_,ariaLabel:f,focusOnMount:b=!1})=>{let g=(0,l.useCallback)(()=>{t(),a(et.EventId.BLOCK_KIT_DATEPICKER_SHOW,{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:i.ze.datepicker}}})},[t,a]);return l.createElement("div",{className:"p-block_kit_date_picker"},l.createElement(tX.b,{id:n,selectedDate:s,displayFormat:c,dateFormat:"YYYY-MM-DD",onDateChange:e,onClick:g,onClose:r,datePickerDisabled:m,required:u,datePlaceholder:d||t0.t("Select a date"),size:p,containerStyle:h,autoClogProps:_,"aria-label":f,focusOnMount:b}))};DatePicker.displayName="DatePicker";let t1=new u.Ay("block_kit"),t2=class extends l.Component{static defaultProps={isRequired:!1,parent:void 0,onAction:o.A,placeholder:{},initialDate:void 0,savedDate:void 0,showConfirmDialog:void 0,size:Y.c.small,blockKitClogger:o.A,blockKitLogPayload:void 0,ariaLabel:void 0,focusOnLoad:!1};clogDatepickerInteraction;constructor(e){super(e),(0,tk.v)(this,["handleDateChange","handleDatepickerClose","handleDatepickerOpen","dispatchAction"]),this.state={selectedDate:e.savedDate||e.initialDate||void 0}}componentDidUpdate(e){this.props.initialDate!==e.initialDate&&this.setState(()=>({selectedDate:this.props.initialDate??void 0}))}setSelectedDateAndDispatchAction(e){this.dispatchAction(e)}dispatchAction(e){let{blockId:t,actionId:a,onAction:n,initialDate:r}=this.props,l={type:i.ze.datepicker,actionId:a,blockId:t,selectedDate:e||null};r&&(l.initialDate=r),n?.(l),this.setState(()=>({selectedDate:e}))}handleDateChange(e){let{showConfirmDialog:t}=this.props;t?t({onGo:()=>{this.setSelectedDateAndDispatchAction(e),this.clogDatepickerInteraction?.({interaction:et.Interaction.SELECT})}}):(this.setSelectedDateAndDispatchAction(e),this.clogDatepickerInteraction?.({interaction:et.Interaction.SELECT}))}handleDatepickerClose(){this.clogDatepickerInteraction?.({interaction:et.Interaction.CLOSE})}handleDatepickerOpen(){this.clogDatepickerInteraction?.({interaction:et.Interaction.CLICK})}render(){let{actionId:e,isDisabled:t,isRequired:a,initialDate:n,placeholder:r,parent:c,size:d,elementWidth:m,blockKitClogger:u=o.A,containerId:p,blockId:h,blockKitLogPayload:_,ariaLabel:f,focusOnLoad:b,experimentBkContainerIdGroupOn:g}=this.props,y=this.state.selectedDate&&tZ()(this.state.selectedDate).format("L")||n&&tZ()(n).format("L");y===tZ()().format("L")&&(y=t1.t("Today"));let A=c===i.WP.input,x=(0,s.A)(_),E=g?getHtmlIdForStatefulBlock({containerId:p,actionId:e,blockId:h}):`${e}-${h}`;return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.DATEPICKER,..._,disableAutoClog:x,trackClogRef:e=>{this.clogDatepickerInteraction=e},disableAutoReferringUiContext:!0},l.createElement(DatePicker,{id:E,date:this.state.selectedDate,disabled:t,placeholder:r?.text,onDateChange:this.handleDateChange,onDatePickerClose:this.handleDatepickerClose,onDatePickerOpen:this.handleDatepickerOpen,dateDisplayFormat:A?void 0:"L",size:d,style:{minWidth:m},isRequired:!(A&&!a),blockKitClogger:u,focusOnMount:b,autoClogProps:x?void 0:{onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0}},ariaLabel:f||t1.t("Date")}))}};t2.displayName="DatepickerElement";let t4=(0,eK.N)(e=>({experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),null)((0,K.A)(t2));var t5=a(0x1c4816103),t3=a(0x1b1820b2c),t6=a(0x21c50a68b),t8=a(0x4fab9fd4);let t7=new u.Ay("block_kit"),DateTimePickerComponent=({value:e,required:t,onChange:a,id:n,labelId:r="",errorId:i=""})=>{let o=(0,l.useCallback)(e=>{a(e)},[a]),s=(0,t6.JK)(),c=(0,l.useMemo)(()=>{let e=(0,t8.A)(),t=e?e.zoneId:"";return(0,t5.j)(t,s)},[s]);return l.createElement(t3.A,{"data-qa":"bk_datetime_picker",onChange:o,className:"p-block_kit_datetime_picker",valueFormat:"X",value:e,"aria-label":t7.t("Select",{fallbackHash:"eb9a4bc1c0c153e4e4b042a79113b815b7e3021d",fallbackHashNs:"date_time_picker"}),"aria-labelledby":`${r} ${i}`,isRequired:t,showTimeZone:!0,timezone:c,id:n})};function DateTimePickerElement({id:e,blockId:t,actionId:a,initialDateTime:n,savedDateTime:r,isRequired:o,onAction:s,labelId:c,errorId:d}){let[m,u]=(0,l.useState)(r||n);return l.createElement(DateTimePickerComponent,{onChange:e=>{var r;let l;r=parseInt(e,10),l={type:i.ze.datetimepicker,actionId:a,blockId:t,selectedDateTime:r||null},n&&(l.initialDateTime=n),s(l),u(r)},value:m>0?m.toString():"",required:o,id:e,labelId:c,errorId:d})}DateTimePickerComponent.displayName="DateTimePickerComponent",DateTimePickerElement.displayName="DateTimePickerElement";let t9=(0,K.A)(DateTimePickerElement);var ae=a(0x126f22530);let removeUndefinedPropertiesFromObject=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,"object"==typeof t?removeUndefinedPropertiesFromObject(t):t]));var at=a(0x18defa93),aa=a(0x748f8565);let InputElement=e=>{let[t,a]=l.useState(e.savedValue||e.initialValue||""),n=removeUndefinedPropertiesFromObject({id:e.id,name:e.actionId,hintId:e.hintId,"aria-labelledby":e.labelId,errorId:e.errorId,errorText:e.errorText,isDisabled:e.isDisabled,isRequired:e.isRequired,focusOnMount:e.focusOnLoad,placeholder:e.placeholder,type:e.type,icon:e.icon,showError:e.showError??!1,autoComplete:e.autoComplete??"off",value:e.savedValue||e.initialValue||"",size:e.size||"medium"}),{actionId:r,blockId:i,onChange:o,onAction:s,dispatchActionConfig:c}=e;l.useEffect(()=>{e.initialValue&&o?.({value:t,actionId:r,blockId:i,onAction:s,initialValue:e.initialValue,shouldDispatch:!1})},[]);let d=l.useCallback(e=>{a(e),o?.({value:e,actionId:r,blockId:i,onAction:s,shouldDispatch:(0,at.$)(c)})},[r,i,c,s,o]),m=l.useCallback(e=>{let a="Enter"===e.key,n=(0,aa.T)(c);a&&n&&(e.preventDefault(),o?.({value:t,actionId:r,blockId:i,onAction:s,shouldDispatch:!0}))},[r,i,c,s,o,t]);return l.createElement(ae.A,{...n,"aria-label":n.ariaLabel,value:t,onChange:d,onKeyDown:m})};InputElement.displayName="InputElement";let an=(0,K.A)(InputElement),ar=new u.Ay("block_kit"),EmailInputElement=({placeholder:e,...t})=>{let a=ar.t("Enter an email address",{fallbackHash:"e61b6eae7b3294d71eed349d7f1509d20ce35162",fallbackHashNs:"forgot_password"}),n=e?.text||a,r=l.useCallback(({actionId:e,blockId:t,onAction:a,value:n,initialValue:r,shouldDispatch:l})=>{a({type:i.ze.email_text_input,actionId:e,blockId:t,value:n,initialValue:r},l)},[]);return l.createElement(an,{...t,placeholder:n,onChange:r,type:"email",icon:"envelope-o"})};EmailInputElement.displayName="EmailInputElement";var ai=a(0x2286acf6c),al=a(0x9e671ad),ao=a(0xf8dd7f80),as=a(0x1d1911997);let formatSingleOption=(e,t)=>{if(!e)return;let a="object"==typeof e.text&&"rich_text"===e.text.type,n=e.text&&"text"in e.text?e.text.text:"";return{originalOption:e,description:e.description?.text,label:a?e.value??"":n??"",value:`${t?"bk-":""}${e.value??""}`,isPlaceholder:!!e.isPlaceholder}},formatActionElementSelectOptions=(e=[],t)=>e.map(e=>formatSingleOption(e,t)).filter(e=>void 0!==e),formatActionElementSelectOptionGroups=(e=[],t)=>e.map(({label:e,options:a})=>({label:e.text,options:formatActionElementSelectOptions(a,t)}));var ac=a(0x184825275);let ad=new u.Ay("block_kit"),am=(0,ao.getGenericLogger)(),au=class extends l.PureComponent{static defaultProps={size:Y.c.small,isRequired:!1,parent:void 0,onAction:o.A,placeholder:void 0,initialOption:void 0,savedOption:void 0,showConfirmDialog:void 0,minQueryLength:3,dispatchFetchExternalSuggestions:void 0,blockKitClogger:o.A,debounceWaitPeriod:500,connectedReplaceTextEmojiWithNative:tW.A,containerActionsPayload:{},blockKitLogPayload:void 0,focusOnLoad:!1,experimentBkContainerIdGroupOn:!1};inputRef;searchWithoutDebounce;logSelectElementMenuOpen;searchPromise;search;constructor(e){super(e),this.inputRef=l.createRef(),(0,tk.v)(this,["onAction","setSelectState","searchOnFocus","renderOption","renderEmptyStateMessage"]);const{savedOption:t,initialOption:a,debounceWaitPeriod:n,blockKitClogger:r,type:i}=e;this.state={selectedOption:void 0===t?a:t,filterQuery:"",isLoading:!1},this.searchWithoutDebounce=this.searchImpl,this.search=(0,ai.A)(this.searchImpl,n,{trailing:!0}),this.logSelectElementMenuOpen=()=>r?.("BLOCK_KIT_SELECT_SCREEN_SHOW",{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:i}}})}componentDidUpdate(e){(0,al.A)(this.props.initialOption,e.initialOption)||this.setState(()=>({selectedOption:this.props.initialOption}))}componentWillUnmount(){this.searchPromise&&this.searchPromise.cancel(),this.search.cancel()}onAction({originalOption:e}){let{blockId:t,actionId:a,onAction:n,initialOption:r,placeholder:l}=this.props,o=e||null,s={type:i.ze.external_select,actionId:a,blockId:t,selectedOption:o||null};r&&(s.initialOption=r),l&&(s.placeholder=l),n?.(s),this.setState(()=>({selectedOption:o}))}setSelectState(e,t){let a=e();void 0!==a.filterQuery&&a.filterQuery!==this.state.filterQuery&&(a={...a,isLoading:a.filterQuery.length>=(this.props.minQueryLength??0)},this.search(a.filterQuery)),this.setState(()=>a,t)}searchImpl(e){let{actionId:t,blockId:a,minQueryLength:n,dispatchFetchExternalSuggestions:r,containerActionsPayload:i}=this.props;(e?.length??0)<(n??0)||(this.setState(()=>({isLoading:!0})),this.searchPromise&&this.searchPromise.cancel(),this.searchPromise=r?.({serviceId:i?.serviceId??"",serviceTeamId:i?.serviceTeamId,container:i?.container??{},functionExecutionId:i?.functionExecutionId,actionId:t,blockId:a,value:e}).then(({options:e,optionGroups:t})=>(t&&this.setState(()=>({options:formatActionElementSelectOptionGroups(t),isRequired:!0})),e&&this.setState(()=>({options:formatActionElementSelectOptions(e),isRequired:!0})),this.setState(()=>({isLoading:!1})),{})).catch(e=>{this.setState(()=>({isLoading:!1})),am.error(`Error when searching for select id: ${this.props.actionId}, error: ${e}`)}))}searchOnFocus(){(!this.state.options||(0,s.A)(this.state.options))&&this.searchWithoutDebounce(this.state.filterQuery)}renderOption(e){return e.originalOption?l.createElement("div",{className:"p-block-kit-select_options"},l.createElement(Q.A,{noLinking:!0,...e.originalOption.text}),e.originalOption.description?l.createElement("span",{className:"p-block-kit-select_options__description"},l.createElement(Q.A,{noLinking:!0,...e.originalOption.description})):null):"heading"===e.type?l.createElement(Q.A,{noLinking:!0,text:e.label,emoji:!0}):e.label}renderEmptyStateMessage(e){let t,{minQueryLength:a}=this.props;return t=a&&(e?.length??0)<a?ad.t("Type a minimum of {minQueryLength} characters to see options.",{minQueryLength:a}):e?ad.t("\u{1F615} Nothing could be found."):ad.t("\u{1F615} No result"),l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}render(){let{size:e,parent:t,isRequired:a,isDisabled:n,placeholder:r,showConfirmDialog:o,elementWidth:c,containerId:d,actionId:m,connectedReplaceTextEmojiWithNative:u,blockId:p,blockKitLogPayload:h,focusOnLoad:_,experimentBkContainerIdGroupOn:f}=this.props,b=ad.t("Pick an option"),g=r&&r.text&&r.emoji?u?.(r.text):r&&r.text,y=t===i.WP.input&&!a,A=this.state.selectedOption&&formatSingleOption(this.state.selectedOption),x=f?getHtmlIdForStatefulBlock({containerId:d,actionId:m,blockId:p}):`${m}-${p}`,E=(0,s.A)(h)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.EXTERNAL_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{interaction:et.Interaction.CLOSE,enableClogAction:!0},...h},C={selectId:x,...this.state,selectedOption:A,isRequired:a};return l.createElement(as.Fw,{selectId:x,selectDataQa:m,placeholderText:g||b,selectState:C,setSelectState:this.setSelectState,inputRef:this.inputRef,isLoading:this.state.isLoading,isDisabled:n,isRequired:!y,onOptionSelected:this.onAction,ariaLabel:r&&r.text||b,size:e,width:c,onFocus:this.searchOnFocus,onOpen:this.logSelectElementMenuOpen,showConfirmDialog:o,minOptionsListWidth:300,renderOption:this.renderOption,renderSelectedOption:this.renderOption,emptyStateMessage:this.renderEmptyStateMessage,focusOnMount:_,autoClogProps:E})}};function external_select_mapDispatchToProps(e){return{connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchFetchExternalSuggestions:t=>e((0,ac.z)(t))}}au.displayName="ExternalSelectElement";let ap=(0,eK.N)(e=>({experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),external_select_mapDispatchToProps)((0,K.A)(au));var ah=((r=ah||{}).POSITIVE="positive",r.NEGATIVE="negative",r);let a_=(0,K.A)(({positiveButton:e,negativeButton:t,onAction:a,actionId:n,blockId:r,channelId:i,messageTs:o,blockKitLogPayload:c,blockKitClogger:d})=>{let m=(0,y.wA)(),[u,p]=(0,l.useState)(null),h=e.text.text,f=t.text.text,b=e.accessibilityLabel,g=t.accessibilityLabel,A=(0,l.useMemo)(()=>l.createElement(Q.A,{"data-qa":"bk_icon_button_tooltip",text:h}),[h]),x=(0,l.useMemo)(()=>l.createElement(Q.A,{"data-qa":"bk_icon_button_tooltip",text:f}),[f]),E=(0,l.useMemo)(()=>({name:"thumbs-up"}),[]),C=(0,l.useMemo)(()=>({name:"thumbs-up-filled"}),[]),k=(0,l.useMemo)(()=>({name:"thumbs-down"}),[]),v=(0,l.useMemo)(()=>({name:"thumbs-down-filled"}),[]),S=(0,l.useCallback)(e=>{a({type:"feedback_buttons",actionId:n,blockId:r,...e})},[a,n,r]),I=(0,l.useCallback)(e=>{if("wfb_ai_answer_feedback"===n){m((0,ev._)({rating:e.isPositive?e8.iz.POSITIVE:e8.iz.NEGATIVE,aiResultId:e.actionPayload.value,type:e8.ci.WorkflowAiAnswerStep,context:{workflow_ai_answer_step_context:{channel_id:i,message_ts:o}}})),d(et.EventId.NATIVE_AI,{contexts:{ui_context:{ui_component_name:et.UiComponentName.WORKFLOW_AI_ANSWER_FEEDBACK,ui_properties:{element_name:e.isPositive?"ai_feedback_button_positive":"ai_feedback_button_negative"}}}});return}S(e.actionPayload)},[n,S,m,i,o,d]),w=(0,l.useCallback)(()=>{p("positive"),I({isPositive:!0,actionPayload:{value:e.value,text:e.text}})},[I,e]),T=(0,l.useCallback)(()=>{p("negative"),I({isPositive:!1,actionPayload:{value:t.value,text:t.text}})},[I,t]);return l.createElement("div",{role:"group","aria-label":"feedback buttons",className:"display_flex align_items_center justify_content_center"},l.createElement(_.Ay,{tip:A},l.createElement(eb.A,{"data-qa":"bk_feedback_button_positive","aria-label":b??h,svgIconProps:"positive"===u?C:E,size:"small",onClick:w,autoClogProps:(0,s.A)(c)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interaction:et.Interaction.CLICK,onClick:{enableClogAction:!0},interactionElement:et.InteractionElement.FEEDBACK_BUTTONS_POSITIVE,...c}})),l.createElement(_.Ay,{tip:x},l.createElement(eb.A,{"data-qa":"bk_feedback_button_negative","aria-label":g??f,svgIconProps:"negative"===u?v:k,size:"small",onClick:T,autoClogProps:(0,s.A)(c)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interaction:et.Interaction.CLICK,onClick:{enableClogAction:!0},interactionElement:et.InteractionElement.FEEDBACK_BUTTONS_NEGATIVE,...c}})))});var af=a(0x11cab3cb4),ab=a(0xa58e49e0),ag=a(0xc7f60cdd),ay=a(0x120c268ad),aA=a.n(ay),ax=a(0x14fad6485),aE=a(0x2501a2cee),aC=a(0xddc78dc5),ak=a(0x2278818de),av=a(0x219fbae62),aS=a(0xabbe611c),aI=a.n(aS);let aw=new u.Ay("block_kit");function FileInputDialog({uploadFiles:e,existingFiles:t,filetypes:a,maxFiles:n,maxFileSizeBytes:r,isUploadDisabled:i,isUploadImageOnly:o}){let s=(0,y.wA)(),{windowRef:c}=(0,l.useContext)(ax._0),d=(0,l.useRef)(null),[m,u]=(0,l.useState)(!1),[p,_]=(0,l.useState)(null),f=(0,l.useCallback)(()=>{u(!0),_(null)},[]),b=(0,l.useCallback)(e=>{e.preventDefault()},[]),g=(0,l.useCallback)(e=>{e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget)||u(!1)},[]),A=(0,l.useCallback)(()=>{u(!1)},[]),x=(0,l.useCallback)(l=>{if(i)return;let c=Array.from(l).filter(e=>{if(!e.size||o&&!e.type.startsWith("image/"))return!1;if(a?.length){let t=e.name.split("."),n=t[t.length-1];if(!a.some(e=>e===n.toLowerCase()))return!1}return!0});if(!c.length)return void _(aw.t("The file type you attempted to upload is not supported"));let d=(0,ak.l)({filesToUpload:c,existingFiles:t,maxFiles:n,maxFileSizeBytes:r});d?_(d.message):(e(c),s((0,N.O)({closeNamed:["workflow-file-input-dialog"]})))},[i,t,n,r,e,s,o,a]),E=(0,l.useCallback)(e=>{x(e.dataTransfer.files),u(!1)},[x]),C=(0,l.useCallback)(e=>{let t=e.clipboardData?.files;t&&(e.preventDefault(),x(t))},[x]),k=(0,l.useCallback)(e=>{let t=e.target.files;t&&x(t)},[x]),v=(0,l.useCallback)(()=>{d.current?.click()},[]),S=(0,l.useCallback)(()=>{_(null)},[]);return(0,l.useEffect)(()=>(c.deref()?.addEventListener("paste",C),()=>{c.deref()?.removeEventListener("paste",C)}),[c,C]),l.createElement(l.Fragment,null,l.createElement(ee.aF,{maxWidth:720},l.createElement(ee.Rc,{title:aw.t("Add file",{fallbackHash:"dcf4cc69bca4a7d7d766c3221a8e9f2fff5f9bb0"})}),l.createElement(ee.$m,null,l.createElement("div",{className:aA()(aI().dropTarget,{[aI().dropTargetActive]:m,[aI().dropTargetError]:!!p}),onDragEnter:f,onDragOver:b,onDragLeave:g,onDragEnd:A,onDrop:E},l.createElement("div",{className:aI().animContainer},l.createElement("div",{className:aA()(aI().animCard,aI().animCard3)}),l.createElement("div",{className:aA()(aI().animCard,aI().animCard2)}),l.createElement("div",{className:aA()(aI().animCard,aI().animCard1)}),l.createElement("img",{width:112,className:aI().sadCloud,alt:"",src:av,draggable:"false"})),l.createElement("div",{"aria-hidden":!m,className:aI().dropPrompt},aw.t("Drop to upload")),p?l.createElement("div",{className:aI().uploadPrompt},l.createElement("div",null,p),l.createElement(h.Ay,{type:"outline",className:aI().uploadButton,onClick:S},aw.t("Try Another File"))):l.createElement("div",{"aria-hidden":m,className:aI().uploadPrompt},l.createElement("div",null,aw.t("Paste or drag a file here, or")),l.createElement(h.Ay,{className:aI().uploadButton,onClick:v,"data-qa":"file-input-dialog__upload-button"},l.createElement(aE.Ah,{name:"file-upload",size:"20"}),aw.t("Upload File")))))),l.createElement("input",{type:"file",className:"p-hidden_file_input",id:"file-input-dialog-hidden-input",multiple:n>1,tabIndex:-1,onChange:k,ref:d,accept:(0,aC.y)({filetypes:a,isUploadDisabled:i,isUploadImageOnly:o})?.accept}))}FileInputDialog.displayName="FileInputDialog";var aT=a(0x18785321b),aN=a(0x9337a79a),aM=a.n(aN);let aR=new u.Ay("block_kit"),UploadButton=({onClick:e,disabled:t})=>l.createElement(h.Ay,{type:"outline",size:"medium",onClick:e,disabled:t},l.createElement("div",{className:aM().content},l.createElement("div",{className:aM().icon},l.createElement(aE.Ah,{name:"file-upload"})),aR.t("Upload File")));UploadButton.displayName="UploadButton";var aP=a(0x139d8d26e),aL=a(0x1d24ec95f),aO=a(0x1a2b0bc8d),aD=a(0x1c2e38de1),aF=a(0x3143105f),aU=a(0x113ec6ce5);let aB=new u.Ay("block_kit"),FileInputElement=({onAction:e,actionId:t,blockId:a,files:n=[],filetypes:r,maxFiles:o=aP.$,maxFileSizeBytes:s=aP.e})=>{let c=(0,y.wA)(),[d,m]=(0,l.useState)([]),[u,p]=(0,l.useState)(n),h=((e=ag.E.READY)=>{let{asyncActionsRegistrar:t}=l.useContext(ab.$),{current:a}=l.useRef(Symbol("blockKitAsyncAction"));return l.useEffect(()=>(t.addAction(a,e),()=>{t.removeAction(a)}),[t,e,a]),{setBusy:()=>t.setActionBusy(a),setReady:()=>t.setActionReady(a)}})(),_=(0,l.useCallback)(n=>{e({type:i.ze.file_input,actionId:t,blockId:a,files:n})},[t,a,e]),{uploadFiles:f,removeFile:b,files:g,errors:A,isUploadDisabled:x,isUploadImageOnly:E}=(({maxFiles:e,maxFileSizeBytes:t,onFilePending:a,onFileUploaded:n,onFileRemoved:r,onPendingFileRemoved:i,processFiles:o}={})=>{let s=(0,y.wA)(),c=(0,I.d4)(aD.p),d=(0,l.useMemo)(()=>c===aD.v.DISABLE_ALL,[c]),m=(0,I.d4)(aO.$),u=o?.(m)||m,[p,h]=(0,l.useState)(d?[{id:"disable_all_error",message:aB.t("File uploads to this workspace have been disabled at the request of your administrator.",{fallbackHash:"41d8a72765fefd26701060f61016d5614c19f486",fallbackHashNs:"files"})}]:[]),_=(0,l.useCallback)(e=>{let t={id:e.id,message:aB.t("There was a problem uploading the file {filename}. Please try again in a few minutes.",{filename:e.name})};h(e=>[t,...e])},[]);return{uploadFiles:(0,l.useCallback)(r=>{h([]);let l=(0,ak.l)({filesToUpload:r,existingFiles:u,maxFiles:e,maxFileSizeBytes:t}),[o]=t?(0,aL.A)(r,e=>e.size<=t):[r],c=!l||"too-many-files"!==l.id;l&&h(e=>[...e,l]),c&&o.length&&s((0,aU.Z)({filesToUpload:o,onFilePending:a,onFileUploaded:n,onPendingFileRemoved:i,onUploadError:_}))},[u,e,t,s,a,n,i,_]),removeFile:(0,l.useCallback)(e=>{1===u.length&&h([]),s((0,aF.n)({file:e,onFileRemoved:r,onPendingFileRemoved:i}))},[s,u,r,i]),files:u,errors:p,isUploadDisabled:d,isUploadImageOnly:c===aD.v.IMAGES_ONLY}})({maxFiles:o,maxFileSizeBytes:s,onFilePending:e=>{m(t=>[...t,e.id]),h.setBusy()},onFileUploaded:e=>{p(t=>{let a=[...t,{id:e.id}];return _(a),a})},onPendingFileRemoved:e=>{m(t=>{let a=t.filter(t=>t!==e.id);return 0===a.length&&h.setReady(),a})},onFileRemoved:e=>{p(t=>{let a=t.filter(t=>t.id!==e.id);return _(a),a})},processFiles:e=>{let t=[...u.map(({id:e})=>e),...d];return e.filter(e=>t.includes(e.id))}}),C=l.useRef(null),k=(0,l.useCallback)(()=>{c((0,U.q)({element:l.createElement(FileInputDialog,{uploadFiles:f,filetypes:r,existingFiles:g,maxFiles:o,maxFileSizeBytes:s,isUploadDisabled:x,isUploadImageOnly:E}),name:"workflow-file-input-dialog",isStackable:!0}))},[c,f,r,g,o,s,x,E]),v=(0,l.useCallback)(()=>{let e=C?.current?.files;!e||(f(Array.from(e)),C&&C.current&&(C.current.value=""))},[f]),S=l.useCallback((e,t)=>{b(t)},[b]);return l.createElement(l.Fragment,null,g.length>0?l.createElement(af.F,{files:g,onRemoveFile:S}):null,l.createElement(aT.M,{errors:A}),l.createElement(UploadButton,{onClick:k,disabled:x}),l.createElement("input",{className:"p-hidden_file_input",id:`${a}-file-input`,"data-qa":"bk_file_upload",type:"file",multiple:o>1,onChange:v,tabIndex:-1,ref:C,...(0,aC.y)({filetypes:r,isUploadImageOnly:E,isUploadDisabled:x})}))};FileInputElement.displayName="FileInputElement";let aH=(0,K.A)(FileInputElement),aW={trash:"trash"},aV=(0,K.A)(({text:e,icon:t,value:a,onAction:n,actionId:r,blockId:i,showConfirmDialog:o,visibleToUserIds:c,blockKitLogPayload:d})=>{let m=(0,I.d4)(T.cA);if(c&&c.length>0&&!c.includes(m?.id))return null;let u=e.text,p=(0,l.useMemo)(()=>l.createElement(Q.A,{"data-qa":"bk_icon_button_tooltip",text:u}),[u]),h=(0,l.useMemo)(()=>({name:(e=>{let t=aW[e];if(!t)throw Error(`Icon name ${e} not found in ICON_NAME_MAP`);return t})(t)}),[t]),f=(0,l.useCallback)(()=>{n({type:"icon_button",actionId:r,blockId:i,icon:t,text:e,value:a})},[n,r,i,t,e,a]),b=(0,l.useCallback)(()=>{o?o({onGo:f}):f()},[o,f]);return l.createElement(_.Ay,{tip:p},l.createElement(eb.A,{"data-qa":"bk_icon_button","aria-label":u,svgIconProps:h,size:"small",onClick:b,autoClogProps:(0,s.A)(d)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interaction:et.Interaction.CLICK,onClick:{enableClogAction:!0},interactionElement:et.InteractionElement.ICON_BUTTON,...d}}))});var aG=a(0x40d8c576),aq=a(0xd290b595),aj=a(0x235ff1eab);let az=new u.Ay("block_kit"),ImageElement=({proxiedImageUrl:e,altText:t,parent:a,small:n=!1})=>{let r=az.t("missing image"),{isValidImage:o}=(0,aG.l)(e),s=aA()("p-section_block__image",{"p-context_block_group__image":a===i.WP.context||n}),c=o?e:aq,d=t?"img":"presentation";return l.createElement("div",{"data-qa":"bk_section_block_image_element",className:s,style:{backgroundImage:`url("${CSS.escape(c)}")`},role:o?d:r,"aria-label":t,title:t,alt:t})};function image_element_mapStateToProps(e,{imageUrl:t,height:a,width:n}){return{proxiedImageUrl:(0,aj.Ay)(e,{url:t,width:n,height:a})}}ImageElement.displayName="ImageElement";let aK=(0,eK.N)(image_element_mapStateToProps)(ImageElement);var a$=a(0x77727995),aY=a(0x15bd59d31),aQ=a(0xa7ec93c2),aZ=a(0x19dc73101),aJ=a(0x2120ded37);let aX=new u.Ay("block_kit"),MaxSelectedItemsAlert=({multiSelectType:e,maxSelectedItems:t,selectedOptionsCount:a=0,parent:n})=>{let r,o=(0,aJ.h)({multiSelectType:e,maxSelectedItems:t});switch(e){case i.ze.multi_conversations_select:r=aX.t("You can select up to {maxSelectedItems} conversations.",{maxSelectedItems:t});break;case i.ze.multi_users_select:r=aX.t("You can select up to {maxSelectedItems} people.",{maxSelectedItems:t});break;case i.ze.multi_channels_select:r=aX.t("You can select up to {maxSelectedItems} channels.",{maxSelectedItems:t});break;default:r=aX.t("You can select up to {maxSelectedItems} items.",{maxSelectedItems:t})}return n!==i.WP.input&&a>t?l.createElement(A.Ay,{className:"p-block_kit_max_selected_items_alert",level:"warning",type:"inline"},o):l.createElement("p",{className:"p-block_kit_max_selected_items__info"},r)};MaxSelectedItemsAlert.displayName="MaxSelectedItemsAlert";let a0=(0,a(0x1cf0d97e1).Ay)((e,{reduxKey:t}={})=>e?.blockKit?.[t]?.selectedOptionsCount);a0.meta={name:"getSelectedOptionsCount",key:"createSelectorGetSelectedOptionsCount",description:(e,{reduxKey:t}={})=>e?.blockKit?.[t]?.selectedOptionsCount};let a1={[i.ze.multi_users_select]:aZ.$,[i.ze.multi_conversations_select]:aZ.$,[i.ze.multi_channels_select]:aZ.$,[i.ze.multi_external_select]:aQ.Gn,[i.ze.multi_static_select]:aQ.Ay},BlockKitMultiSelectComponent=({type:e,parent:t,className:a="",containerId:n,blockId:r,actionId:s,placeholder:c,isRequired:d=!1,isDisabled:m,showConfirmDialog:u,maxSelectedItems:p,options:h,selectedOptions:_,selectedOptionsCount:f=0,renderOption:b,onAction:g=o.A,blockKitClogger:y=o.A,reduxKey:A,onOptionsListOpen:x=o.A,onOptionsListClose:E=o.A,labelId:C,experimentBkContainerIdGroupOn:k=!1,...v})=>{let S=t===i.WP.input&&!d,I=null!=p&&f>p,w=a1[e];if(!w)return null;let T=v?.selectState?{...v.selectState,isInvalid:I}:void 0,N=k?getHtmlIdForStatefulBlock({containerId:n,actionId:s,blockId:r}):`${s}-${r}`;return l.createElement("div",{className:"multi_select_element_container","data-qa":"bk_multi_select"},p&&l.createElement(MaxSelectedItemsAlert,{multiSelectType:e,maxSelectedItems:p,selectedOptionsCount:f,parent:t}),l.createElement(w,{className:a,selectId:N,selectDataQa:s,ariaLabel:C?void 0:c,ariaLabelledBy:C,options:h,width:Y.J.full,size:Y.c.medium,isDisabled:m,isInvalid:I,isRequired:!S,placeholderText:c,selectedOptions:_,onSelectedItemsChange:g,renderOption:b,renderSelectedOption:b,onOptionsListOpen:x,onOptionsListClose:E,showConfirmDialog:u,customControlledMultiSelectComponent:u?aQ.Gn:void 0,expandOnFocus:!0,...v,selectState:T}))};BlockKitMultiSelectComponent.displayName="BlockKitMultiSelectComponent";let a2=(0,eK.N)((e,{reduxKey:t})=>({selectedOptionsCount:a0(e,{reduxKey:t})??0,experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),null)(BlockKitMultiSelectComponent);var a4=a(0xe28ad2a3);let MultiSelectElementDialog=({submitAction:e,cancelAction:t=o.A,placeholderText:a,element:n,multiConfirmProps:r,maxSelectedItems:i=0,selectedOptionsCount:c=0,blockKitLogPayload:d})=>{let m={onGo:e,onCancel:t,title:a||"Pick options",goButtonIsDisabled:!!i&&c>i,...r},u=(0,s.A)(d);return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,...d,disableAutoClog:u,disableAutoReferringUiContext:!0},l.createElement(a4.Ay,{autoClogProps:u?void 0:{goButton:{interaction:et.Interaction.CONFIRM}},...m},n))};MultiSelectElementDialog.displayName="MultiSelectElementDialog";let a5=(0,eK.N)((e,t)=>({selectedOptionsCount:a0(e,{reduxKey:t.reduxKey})}),null)(MultiSelectElementDialog);var a3=a(0x1d71c4455);let a6=new u.Ay("block_kit"),multi_select_input=({openMultiSelectModal:e,placeholder:t,selectedValues:a,size:n=a3.F.small})=>l.createElement(h.Ay,{type:"outline",size:n,onClick:e},l.createElement(Q.A,{text:a&&0!==a.length?a6.t("{selectedItemCount} selected",{selectedItemCount:a.length}):t,maxCharacters:30,emoji:!0,dataQA:"bk-multi_select_input"})),a8=new u.Ay("block_kit"),processPlaceholder=({placeholder:e={},emojiProcessor:t,fallback:a=a8.t("Choose an option",{fallbackHash:"45b9ce6e2d695ff2c034093f4531d40c366e7b04",fallbackHashNs:"admin"})})=>{let n=((e={})=>e.text)(e);return n&&e.emoji&&t?t(e.text??""):n||a};var a7=a(0xbedf2b7b);let a9=new u.Ay("block_kit"),ne={entities:{channels:{includeArchived:!1,includePrivate:!1}},allowEmptyQuery:!0},nt=class extends l.PureComponent{static defaultProps={className:"",isRequired:!1,parent:void 0,onAction:o.A,placeholder:void 0,initialChannels:void 0,savedChannels:void 0,shouldRenderMultiSelectsInline:!1,multiConfirmProps:void 0,maxSelectedItems:void 0,showConfirmDialog:void 0,blockKitLogPayload:void 0,size:Y.c.small,focusOnLoad:!1};formattedPlaceholder;reduxKey;previousSelectedChannels;clogSelectInteraction;constructor(e){super(e),(0,tk.v)(this,["onAction","submitAction","cancelAction","openMultiSelectModal","renderMultiChannelsSelectElement","handleOptionsListClose","renderEmptyStateMessage"]);const{savedChannels:t,initialChannels:a,placeholder:n,connectedReplaceTextEmojiWithNative:r}=e;this.formattedPlaceholder=processPlaceholder({placeholder:n,emojiProcessor:r,fallback:a9.t("Select channels")}),this.reduxKey=e.blockId+e.actionId+e.containerId;const i=t??a??[];this.previousSelectedChannels=i,this.state={selectedChannels:i,isInvalid:!1}}componentDidUpdate(e){let{initialChannels:t}=this.props;t&&!(0,al.A)(t,e.initialChannels)&&this.setState(()=>({selectedChannels:this.props.initialChannels??[]}))}onAction(e=[]){let{maxSelectedItems:t,shouldRenderMultiSelectsInline:a}=this.props,n=e.map(e=>e.value);this.setState(()=>({selectedChannels:n}),()=>{let e=(0,a$.A)(this.state,"selectedChannels.length");this.props.setSelectedOptionsCount({selectedOptionsCount:e,reduxKey:this.reduxKey}),this.setState(()=>({isInvalid:void 0!==t&&e>t}),()=>{a&&this.submitAction()})})}cancelAction(){this.setState(()=>({selectedChannels:this.previousSelectedChannels}),()=>{this.props.setSelectedOptionsCount({selectedOptionsCount:this.state.selectedChannels?.length??0,reduxKey:this.reduxKey})})}openMultiSelectModal(){let{maxSelectedItems:e,dispatchOpenModal:t,multiConfirmProps:a,blockKitLogPayload:n}=this.props;this.previousSelectedChannels=this.state.selectedChannels,t({element:l.createElement(a5,{element:this.renderMultiChannelsSelectElement(),placeholderText:this.formattedPlaceholder,submitAction:this.submitAction,cancelAction:this.cancelAction,multiConfirmProps:a,maxSelectedItems:e,reduxKey:this.reduxKey,blockKitLogPayload:(0,s.A)(n)?void 0:{interactionElement:et.InteractionElement.MULTI_STATIC_SELECT,...n}})})}submitAction(){let{parent:e,blockId:t,actionId:a,onAction:n,initialChannels:r}=this.props,{selectedChannels:l,isInvalid:o}=this.state,s={type:i.ze.multi_channels_select,actionId:a,blockId:t,selectedChannels:l};r&&(s.initialChannels=r),o&&e!==i.WP.input||n?.(s)}handleOptionsListClose(){(0,al.A)(this.previousSelectedChannels,this.state.selectedChannels)&&!(0,s.A)(this.props.blockKitLogPayload)&&this.clogSelectInteraction?.({interaction:et.Interaction.CLOSE})}renderEmptyStateMessage(e){let t=e?a9.t("\u{1F615} No channel matches these keywords."):a9.t("\u{1F615} No channel found");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}renderMultiChannelsSelectElement(){let{parent:e,isRequired:t,isDisabled:a,className:n,containerId:r,actionId:o,blockId:c,maxSelectedItems:d,blockKitClogger:m,showConfirmDialog:u,blockKitLogPayload:p,focusOnLoad:h}=this.props,_=this.state.selectedChannels.map(e=>({value:e}));return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,trackClogRef:e=>{this.clogSelectInteraction=e},disableAutoReferringUiContext:!0},l.createElement(a2,{type:i.ze.multi_channels_select,parent:e,className:n,blockId:c,containerId:r,actionId:o,isRequired:t,isDisabled:a,placeholder:this.formattedPlaceholder,maxSelectedItems:d,searcherOptions:ne,selectedOptions:_,renderOption:e=>l.createElement(aY.A,{channelId:e.value}),onOptionsListClose:this.handleOptionsListClose,onAction:this.onAction,reduxKey:this.reduxKey,blockKitClogger:m,emptyStateMessage:this.renderEmptyStateMessage,showConfirmDialog:this.props.shouldRenderMultiSelectsInline?u:void 0,focusOnMount:h,autoClogProps:(0,s.A)(p)?void 0:{interactionElement:et.InteractionElement.MULTI_CHANNELS_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{enableClogAction:!1},removeToken:{interaction:et.Interaction.DESELECT,onClick:{enableClogAction:!0}},...p}}))}render(){return this.props.shouldRenderMultiSelectsInline?this.renderMultiChannelsSelectElement():l.createElement(multi_select_input,{openMultiSelectModal:this.openMultiSelectModal,placeholder:this.formattedPlaceholder,selectedValues:this.state.selectedChannels,size:this.props.size})}};nt.displayName="MultiChannelsSelect";let na=(0,eK.N)(null,e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchOpenModal:t=>e((0,U.q)(t)),setSelectedOptionsCount:t=>e((0,a7.B)(t))}))((0,K.A)(nt)),nn=new u.Ay("block_kit"),nr={entities:{channels:{includeArchived:!1,includePrivate:!0,includeMpims:!0},members:{includeSelf:!0}},allowEmptyQuery:!0},ni=class extends l.PureComponent{static defaultProps={className:"",isRequired:!1,parent:void 0,onAction:o.A,placeholder:void 0,initialConversations:void 0,savedConversations:void 0,connectedReplaceTextEmojiWithNative:tW.A,shouldRenderMultiSelectsInline:!1,multiConfirmProps:void 0,maxSelectedItems:void 0,filter:void 0,showConfirmDialog:void 0,blockKitLogPayload:void 0,size:Y.c.small,focusOnLoad:!1};formattedPlaceholder;reduxKey;previousSelectedConversations;clogSelectInteraction;constructor(e){super(e),(0,tk.v)(this,["onAction","submitAction","cancelAction","openMultiSelectModal","handleOptionsListClose","renderEmptyStateMessage","renderMultiConversationsSelectElement"]);const{savedConversations:t,initialConversations:a,placeholder:n,connectedReplaceTextEmojiWithNative:r}=e;this.formattedPlaceholder=processPlaceholder({placeholder:n,emojiProcessor:r,fallback:nn.t("Pick your options")}),this.reduxKey=e.blockId+e.actionId+e.containerId;const i=t||a||[];this.previousSelectedConversations=i,this.state={selectedConversations:i,isInvalid:!1}}componentDidUpdate(e){let{initialConversations:t}=this.props;t&&!(0,al.A)(t,e.initialConversations)&&this.setState(()=>({selectedConversations:this.props.initialConversations||[]}))}onAction(e=[]){let{maxSelectedItems:t,shouldRenderMultiSelectsInline:a}=this.props,n=e.map(e=>e.value);this.setState(()=>({selectedConversations:n}),()=>{let e=(0,a$.A)(this.state,"selectedConversations.length");this.props.setSelectedOptionsCount({selectedOptionsCount:e,reduxKey:this.reduxKey}),this.setState(()=>({isInvalid:!!t&&e>t}),()=>{a&&this.submitAction()})})}cancelAction(){this.setState(()=>({selectedConversations:this.previousSelectedConversations}),()=>{this.props.setSelectedOptionsCount({selectedOptionsCount:this.state.selectedConversations&&this.state.selectedConversations.length,reduxKey:this.reduxKey})})}getModalBlockKitLogPayload(){let{blockKitLogPayload:e}=this.props;return(0,s.A)(e)?void 0:{interactionElement:et.InteractionElement.MULTI_CONVERSATIONS_SELECT,...e}}openMultiSelectModal(){let{maxSelectedItems:e,dispatchOpenModal:t,multiConfirmProps:a}=this.props;this.previousSelectedConversations=this.state.selectedConversations,t({element:l.createElement(a5,{element:this.renderMultiConversationsSelectElement(),placeholderText:this.formattedPlaceholder,submitAction:this.submitAction,cancelAction:this.cancelAction,multiConfirmProps:a,maxSelectedItems:e,reduxKey:this.reduxKey,blockKitLogPayload:this.getModalBlockKitLogPayload()})})}submitAction(){let{parent:e,blockId:t,actionId:a,onAction:n,initialConversations:r}=this.props,{selectedConversations:l,isInvalid:o}=this.state,s={type:i.ze.multi_conversations_select,actionId:a,blockId:t,selectedConversations:l};r&&(s.initialConversations=r),o&&e!==i.WP.input||n?.(s)}handleOptionsListClose(){(0,al.A)(this.previousSelectedConversations,this.state.selectedConversations)&&!(0,s.A)(this.props.blockKitLogPayload)&&this.clogSelectInteraction?.({interaction:et.Interaction.CLOSE})}renderEmptyStateMessage(e){let t=e?nn.t("\u{1F615} No conversation matches these keywords."):nn.t("\u{1F615} No conversation found");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}handleTrackClogRef=e=>{this.clogSelectInteraction=e};renderConversationOption=e=>l.createElement(tV.A,{id:e.value});getConversationSearchOptions(){let{filter:e}=this.props;if(e&&!(0,s.A)(e)){let t={allowEmptyQuery:!0,entities:{channels:{includeExternallyShared:!e.excludeExternalSharedChannels,onlyFromTeamId:e.onlyFromTeamId}}};if(e.include&&!(0,s.A)(e.include)){let a=t.entities,n=a?.channels instanceof Object?a?.channels:{};t.entities={...a,channels:{...n,includeArchived:!1,includePublic:e.include.includes("public"),includePrivate:e.include.includes("private"),includeMpims:e.include.includes("mpim")}}}if(!e.include||(0,s.A)(e.include)||e.include.includes("im")){let a=t.entities;t.entities={...a,members:{includeSelf:!0,includeSlackbot:!e.excludeBotUsers,includeBots:!e.excludeBotUsers,onlyFromExternalTeamId:e.onlyFromTeamId}}}return t}return nr}getAutoClogProps(){let{blockKitLogPayload:e}=this.props;return(0,s.A)(e)?void 0:{interactionElement:et.InteractionElement.MULTI_CONVERSATIONS_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{enableClogAction:!1},removeToken:{interaction:et.Interaction.DESELECT,onClick:{enableClogAction:!0}},...e}}renderMultiConversationsSelectElement(){let{parent:e,isRequired:t,isDisabled:a,className:n,containerId:r,actionId:o,blockId:s,maxSelectedItems:c,blockKitClogger:d,showConfirmDialog:m,focusOnLoad:u}=this.props,p=this.state.selectedConversations.map(e=>({value:e}));return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,trackClogRef:this.handleTrackClogRef,disableAutoReferringUiContext:!0},l.createElement(a2,{type:i.ze.multi_conversations_select,parent:e,className:n,containerId:r,blockId:s,actionId:o,isRequired:t,isDisabled:a,placeholder:this.formattedPlaceholder,maxSelectedItems:c,searcherOptions:this.getConversationSearchOptions(),selectedOptions:p,onOptionsListClose:this.handleOptionsListClose,renderOption:this.renderConversationOption,onAction:this.onAction,reduxKey:this.reduxKey,blockKitClogger:d,emptyStateMessage:this.renderEmptyStateMessage,showConfirmDialog:this.props.shouldRenderMultiSelectsInline?m:void 0,focusOnMount:u,autoClogProps:this.getAutoClogProps()}))}render(){return this.props.shouldRenderMultiSelectsInline?this.renderMultiConversationsSelectElement():l.createElement(multi_select_input,{openMultiSelectModal:this.openMultiSelectModal,placeholder:this.formattedPlaceholder,selectedValues:this.state.selectedConversations,size:this.props.size})}};ni.displayName="MultiConversationsSelectElement";let nl=(0,eK.N)(null,e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchOpenModal:t=>e((0,U.q)(t)),setSelectedOptionsCount:t=>e((0,a7.B)(t))}))((0,K.A)(ni));var no=a(0x7fa3cc8f),ns=a(0xc48503ad),nc=a.n(ns);let nd=new u.Ay("block_kit"),nm=(0,ao.getGenericLogger)(),nu=nc().shape({type:nc().oneOf([i.ze.plain_text]),text:nc().string,placeholder:nc().bool}),np={className:nc().string,blockId:nc().string.isRequired,actionId:nc().string.isRequired,containerId:nc().string.isRequired,isDisabled:nc().bool.isRequired,isRequired:nc().bool,parent:nc().string,onAction:nc().func,placeholder:nu,initialOptions:nc().arrayOf(nc().shape({text:nu,value:nc().string})),savedOptions:nc().arrayOf(nc().shape({text:nu,value:nc().string})),showConfirmDialog:nc().func,blockKitClogger:nc().func,connectedReplaceTextEmojiWithNative:nc().func,shouldRenderMultiSelectsInline:nc().bool,debounceWaitPeriod:nc().number,minQueryLength:nc().number,dispatchFetchExternalSuggestions:nc().func.isRequired,containerActionsPayload:nc().object,onChangeSelectedOptions:nc().func,multiConfirmProps:nc().object,maxSelectedItems:nc().number,setSelectedOptionsCount:nc().func.isRequired,blockKitLogPayload:nc().object,experimentBkContainerIdGroupOn:nc().bool},nh={className:"",containerId:"",isRequired:!1,parent:void 0,onAction:o.A,placeholder:void 0,initialOptions:void 0,savedOptions:void 0,blockKitClogger:o.A,connectedReplaceTextEmojiWithNative:tW.A,shouldRenderMultiSelectsInline:!1,debounceWaitPeriod:500,minQueryLength:3,containerActionsPayload:{},onChangeSelectedOptions:o.A,multiConfirmProps:void 0,maxSelectedItems:void 0,showConfirmDialog:void 0,blockKitLogPayload:void 0,experimentBkContainerIdGroupOn:!1},renderOption=e=>e.originalOption?l.createElement("div",{className:"p-block-kit-select_options"},l.createElement(Q.A,{noLinking:!0,...e.originalOption?.text??{}}),e.originalOption.description?l.createElement("span",{className:"p-block-kit-select_options__description"},l.createElement(Q.A,{noLinking:!0,...e.originalOption?.description??{}})):null):"heading"===e.type?l.createElement(Q.A,{noLinking:!0,text:e.label,emoji:!0}):e.label;renderOption.displayName="renderOption";let n_=class extends l.PureComponent{static propTypes=np;static defaultProps=nh;optionGroups;options;inputRef;formattedPlaceholder;reduxKey;previousSelectedOptions;searchPromise;debounceSearch;constructor(e){super(e),this.optionGroups=[],this.options=[],this.inputRef=l.createRef(),(0,tk.v)(this,["submitAction","setSelectState","renderExternalMultiSelect","cancelAction","renderEmptyStateMessage","searchOnFocus"]);const{placeholder:t,connectedReplaceTextEmojiWithNative:a,debounceWaitPeriod:n,showConfirmDialog:r,savedOptions:i,initialOptions:o}=e;this.formattedPlaceholder=processPlaceholder({placeholder:t,emojiProcessor:a,fallback:nd.t("Pick your options")}),this.state={filterQuery:"",isLoading:!1,options:this.options||this.optionGroups,selectedOptions:i||o||[],isInvalid:!1,shouldRefocusInputAfterSelection:!!r,lastLoggedSelectedOptions:o||[]},this.reduxKey=e.blockId+e.actionId+e.containerId,this.previousSelectedOptions=this.state.selectedOptions,this.debounceSearch=(0,ai.A)(this.search,n,{trailing:!0}),this.searchPromise=void 0}componentDidUpdate(e,t){let{initialOptions:a,maxSelectedItems:n,shouldRenderMultiSelectsInline:r,onChangeSelectedOptions:i}=this.props,{selectedOptions:l}=this.state;if(a&&!(0,al.A)(a,e.initialOptions)&&this.setSelectState(()=>({selectedOptions:a})),!(0,al.A)(l,t.selectedOptions)){i&&i(l);let e=l?.length??0;this.props.setSelectedOptionsCount({selectedOptionsCount:e,reduxKey:this.reduxKey}),this.setState(()=>({isInvalid:e>(n??Number.MAX_SAFE_INTEGER)}),()=>{r&&this.submitAction()})}}componentWillUnmount(){this.searchPromise&&this.searchPromise.cancel(),this.debounceSearch&&this.debounceSearch.cancel&&this.debounceSearch.cancel()}setSelectState(e,t){let a=e();a.selectedOptions&&!(0,al.A)(a.selectedOptions,this.state.selectedOptions)&&(a={...a,selectedOptions:a.selectedOptions.map(e=>(0,a$.A)(e,"originalOption")??e)}),void 0!==a.filterQuery&&a.filterQuery!==this.state.filterQuery&&(a={...a,isLoading:a.filterQuery.length>=this.props.minQueryLength},this.debounceSearch(a.filterQuery??"")),this.setState(()=>a,t)}cancelAction(){this.props.onChangeSelectedOptions?.(this.previousSelectedOptions),this.setState(()=>({selectedOptions:this.previousSelectedOptions}))}search(e){let{actionId:t,blockId:a,minQueryLength:n,dispatchFetchExternalSuggestions:r,containerActionsPayload:i}=this.props;e.length<(n??3)||(this.setState(()=>({isLoading:!0})),this.searchPromise&&this.searchPromise.cancel(),this.searchPromise=r({serviceId:i.serviceId,serviceTeamId:i.serviceTeamId,container:i.container,functionExecutionId:i.functionExecutionId,actionId:t,blockId:a,value:e}).then(({options:e,optionGroups:t})=>(t&&(this.optionGroups=t,this.setState(()=>({options:formatActionElementSelectOptionGroups(t,!0)}))),e&&(this.options=e,this.setState(()=>({options:formatActionElementSelectOptions(e,!0)}))),this.setState(()=>({isLoading:!1})),{})).catch(e=>{this.setState(()=>({isLoading:!1})),nm.error(`Error when searching for select id: ${this.props.actionId}, error: ${e}`)}))}searchOnFocus(){(!this.state.options||(0,s.A)(this.state.options))&&this.debounceSearch(this.state.filterQuery)}submitAction(){let{parent:e,initialOptions:t,onAction:a,placeholder:n,actionId:r,blockId:l}=this.props,{selectedOptions:o,isInvalid:s}=this.state,c={type:i.ze.multi_external_select,actionId:r,blockId:l,selectedOptions:o};t&&(c.initialOptions=t),n&&(c.placeholder=n),a&&(!s||e===i.WP.input)&&a(c)}renderEmptyStateMessage(e){let t,{minQueryLength:a}=this.props;return t=a&&e.length<a?nd.t("Type a minimum of {minQueryLength} characters to see options.",{minQueryLength:a}):e?nd.t("\u{1F615} Nothing could be found."):nd.t("\u{1F615} No result"),l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}renderExternalMultiSelect(){let{parent:e,isRequired:t,isDisabled:a,className:n,containerId:r,actionId:o,blockId:c,maxSelectedItems:d,blockKitClogger:m,showConfirmDialog:u,blockKitLogPayload:p,experimentBkContainerIdGroupOn:h}=this.props,handleOptionsListOpen=()=>{this.setSelectState(()=>({lastLoggedSelectedOptions:this.state.selectedOptions}))},_=this.state.selectedOptions&&this.state.selectedOptions.length>0&&formatActionElementSelectOptions(this.state.selectedOptions,!0)||[],f=(0,al.A)(this.state.lastLoggedSelectedOptions,this.state.selectedOptions),b=h?getHtmlIdForStatefulBlock({containerId:r,actionId:o,blockId:c}):`${o}-${c}`;return l.createElement(a2,{parent:e,className:n,type:i.ze.multi_external_select,containerId:r,actionId:o,blockId:c,isRequired:t,isDisabled:a,placeholder:this.formattedPlaceholder,maxSelectedItems:d,onOptionsListOpen:handleOptionsListOpen,onInputFocused:this.searchOnFocus,renderOption:renderOption,reduxKey:this.reduxKey,selectState:{selectId:b,...this.state,selectedOptions:_,isDisabled:a},setSelectState:this.setSelectState,inputRef:this.inputRef,isLoading:this.state.isLoading,blockKitClogger:m,emptyStateMessage:this.renderEmptyStateMessage,showConfirmDialog:this.props.shouldRenderMultiSelectsInline?u:void 0,autoClogProps:(0,s.A)(p)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.MULTI_EXTERNAL_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{interaction:et.Interaction.CLOSE,enableClogAction:f},removeToken:{interaction:et.Interaction.DESELECT,onClick:{enableClogAction:!0}},...p}})}render(){let{shouldRenderMultiSelectsInline:e,multiConfirmProps:t,maxSelectedItems:a,blockKitLogPayload:n}=this.props,r=nd.t("Pick your options");return e?this.renderExternalMultiSelect():l.createElement(a5,{element:this.renderExternalMultiSelect(),placeholderText:this.formattedPlaceholder||r,submitAction:this.submitAction,cancelAction:this.cancelAction,multiConfirmProps:t,maxSelectedItems:a,reduxKey:this.reduxKey,blockKitLogPayload:(0,s.A)(n)?void 0:{interactionElement:et.InteractionElement.MULTI_EXTERNAL_SELECT,...n}})}};n_.displayName="MultiExternalSelectElement";let nf=(0,eK.N)(e=>({experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchFetchExternalSuggestions:t=>e((0,ac.z)(t)),setSelectedOptionsCount:t=>e((0,a7.B)(t))}))((0,K.A)(n_)),nb=new u.Ay("block_kit"),ng=nc().shape({type:nc().oneOf([i.ze.plain_text]),text:nc().string,placeholder:nc().bool}),ny={placeholder:ng,connectedReplaceTextEmojiWithNative:nc().func,dispatchOpenModal:nc().func.isRequired,initialOptions:nc().arrayOf(nc().shape({text:ng,value:nc().string})),shouldRenderMultiSelectsInline:nc().bool,size:nc().oneOf((0,no.A)(Y.c))},nA={placeholder:void 0,connectedReplaceTextEmojiWithNative:tW.A,initialOptions:void 0,shouldRenderMultiSelectsInline:!1,size:Y.c.small},nx=class extends l.PureComponent{static propTypes=ny;static defaultProps=nA;formattedPlaceholder;constructor(e){super(e),(0,tk.v)(this,["openMultiSelectModal","updateSelectedOptions","renderMultiExternalSelect"]),this.formattedPlaceholder=processPlaceholder({placeholder:this.props.placeholder,emojiProcessor:this.props.connectedReplaceTextEmojiWithNative,fallback:nb.t("Pick your options")});const t=e.initialOptions;this.state={selectedOptions:t}}componentDidUpdate(e){let{initialOptions:t}=this.props;(0,al.A)(t,e.initialOptions)||this.setState(()=>({selectedOptions:t}))}openMultiSelectModal(){let{dispatchOpenModal:e}=this.props;e({element:this.renderMultiExternalSelect()})}updateSelectedOptions(e){this.setState(()=>({selectedOptions:e.map(e=>(0,a$.A)(e,"originalOption")??e)}))}renderMultiExternalSelect(){return l.createElement(nf,{onChangeSelectedOptions:this.updateSelectedOptions,...this.props,initialOptions:this.state.selectedOptions})}render(){return this.props.shouldRenderMultiSelectsInline?this.renderMultiExternalSelect():l.createElement(multi_select_input,{openMultiSelectModal:this.openMultiSelectModal,placeholder:this.formattedPlaceholder,selectedValues:this.state.selectedOptions,size:this.props.size})}};nx.displayName="MultiExternalSelectInput";let nE=(0,eK.N)(null,e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchOpenModal:t=>e((0,U.q)(t))}))((0,K.A)(nx)),nC=new u.Ay("block_kit"),nk=class extends l.PureComponent{static defaultProps={className:"",isRequired:!1,parent:void 0,onAction:o.A,placeholder:void 0,optionGroups:void 0,options:void 0,initialOptions:void 0,savedOptions:void 0,blockKitClogger:o.A,connectedReplaceTextEmojiWithNative:tW.A,shouldRenderMultiSelectsInline:!1,multiConfirmProps:void 0,maxSelectedItems:void 0,showConfirmDialog:void 0,blockKitLogPayload:void 0,size:Y.c.small,focusOnLoad:!1};formattedPlaceholder;reduxKey;previousSelectedOptions;constructor(e){super(e),(0,tk.v)(this,["onAction","submitAction","cancelAction","renderMultiSelect","openMultiSelectModal","renderEmptyStateMessage"]);const{savedOptions:t,initialOptions:a,placeholder:n,connectedReplaceTextEmojiWithNative:r}=e;this.formattedPlaceholder=processPlaceholder({placeholder:n,emojiProcessor:r,fallback:nC.t("Pick your options")}),this.reduxKey=e.blockId+e.actionId+e.containerId;const i=t||a;this.previousSelectedOptions=i,this.state={selectedOptions:i,isInvalid:!1}}componentDidUpdate(e){let{initialOptions:t}=this.props;t&&!(0,al.A)(t,e.initialOptions)&&this.setState(()=>({selectedOptions:this.props.initialOptions}))}onAction(e){let{maxSelectedItems:t,shouldRenderMultiSelectsInline:a}=this.props;this.setState(()=>({selectedOptions:e.map(e=>e.originalOption)}),()=>{let e=(0,a$.A)(this.state,"selectedOptions.length");this.props.setSelectedOptionsCount({selectedOptionsCount:e,reduxKey:this.reduxKey}),this.setState(()=>({isInvalid:!!t&&e>t}),()=>{a&&this.submitAction()})})}cancelAction(){this.setState(()=>({selectedOptions:this.previousSelectedOptions}),()=>{this.props.setSelectedOptionsCount({selectedOptionsCount:this.state.selectedOptions?.length||0,reduxKey:this.reduxKey})})}openMultiSelectModal(){let{maxSelectedItems:e,dispatchOpenModal:t,multiConfirmProps:a,blockKitLogPayload:n}=this.props;this.previousSelectedOptions=this.state.selectedOptions,t({element:l.createElement(a5,{element:this.renderMultiSelect(),placeholderText:this.formattedPlaceholder,submitAction:this.submitAction,cancelAction:this.cancelAction,multiConfirmProps:a,maxSelectedItems:e,reduxKey:this.reduxKey,blockKitLogPayload:(0,s.A)(n)?void 0:{interactionElement:et.InteractionElement.MULTI_STATIC_SELECT,...n}})})}submitAction(){let{parent:e,initialOptions:t,onAction:a,placeholder:n,actionId:r,blockId:l}=this.props,{selectedOptions:o,isInvalid:s}=this.state,c={type:i.ze.multi_static_select,actionId:r,blockId:l,selectedOptions:o,initialOptions:t,placeholder:n};s&&e!==i.WP.input||a?.(c)}renderEmptyStateMessage(e){let t=e?nC.t("\u{1F615} Nothing could be found."):nC.t("\u{1F615} No result");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}renderMultiSelect(){let{parent:e,isRequired:t,isDisabled:a,options:n,optionGroups:r,className:o,containerId:c,actionId:d,blockId:m,maxSelectedItems:u,blockKitClogger:p,showConfirmDialog:h,blockKitLogPayload:_,focusOnLoad:f}=this.props,renderOption=e=>(0,s.A)(e.originalOption)?"heading"===e.type?l.createElement(Q.A,{noLinking:!0,text:e.label,emoji:!0}):e.label:l.createElement("div",{className:"p-block-kit-select_options"},l.createElement(Q.A,{noLinking:!0,...e.originalOption?.text}),e.originalOption?.description?l.createElement("span",{className:"p-block-kit-select_options__description"},l.createElement(Q.A,{noLinking:!0,...e.originalOption.description})):null);renderOption.displayName="renderOption";let b=this.state.selectedOptions&&formatActionElementSelectOptions(this.state.selectedOptions,!0),g=[];return n&&n.length?g=formatActionElementSelectOptions(n,!0):r&&r.length&&(g=formatActionElementSelectOptionGroups(r,!0)),l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,disableAutoReferringUiContext:!0},l.createElement(a2,{type:i.ze.multi_static_select,parent:e,className:o,blockId:m,containerId:c,actionId:d,isRequired:t,isDisabled:a,placeholder:this.formattedPlaceholder,maxSelectedItems:u,options:g,optionGroups:r,selectedOptions:b,renderOption:renderOption,onAction:this.onAction,reduxKey:this.reduxKey,blockKitClogger:p,emptyStateMessage:this.renderEmptyStateMessage,showConfirmDialog:this.props.shouldRenderMultiSelectsInline?h:void 0,focusOnMount:f,autoClogProps:(0,s.A)(_)?void 0:{interactionElement:et.InteractionElement.MULTI_STATIC_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{enableClogAction:!1},removeToken:{interaction:et.Interaction.DESELECT,onClick:{enableClogAction:!0}},..._}}))}render(){return this.props.shouldRenderMultiSelectsInline?this.renderMultiSelect():l.createElement(multi_select_input,{openMultiSelectModal:this.openMultiSelectModal,placeholder:this.formattedPlaceholder,selectedValues:this.state.selectedOptions,size:this.props.size})}};nk.displayName="MultiStaticSelectElement";let nv=(0,eK.N)(null,e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchOpenModal:t=>e((0,U.q)(t)),setSelectedOptionsCount:t=>e((0,a7.B)(t))}))((0,K.A)(nk));var nS=a(0x10d53599f);let nI=new u.Ay("block_kit"),nw={entities:{members:{includeSelf:!0}},allowEmptyQuery:!0},nT=class extends l.PureComponent{formattedPlaceholder;reduxKey;previousSelectedUsers;clogSelectInteraction;constructor(e){super(e),(0,tk.v)(this,["onAction","cancelAction","submitAction","openMultiSelectModal","handleOptionsListClose","renderMultiUsersSelectElement","renderEmptyStateMessage","renderUserOption","trackClogRef"]);const{savedUsers:t,initialUsers:a,placeholder:n,connectedReplaceTextEmojiWithNative:r}=e;this.formattedPlaceholder=processPlaceholder({placeholder:n,emojiProcessor:r,fallback:nI.t("Select users")}),this.reduxKey=e.blockId+e.actionId+e.containerId;const i=t||a||[];this.previousSelectedUsers=i,this.state={selectedUsers:i,isInvalid:!1}}componentDidUpdate(e){let{initialUsers:t}=this.props;t&&!(0,al.A)(t,e.initialUsers)&&this.setState(()=>({selectedUsers:this.props.initialUsers||[]}))}onAction(e=[]){let{maxSelectedItems:t,shouldRenderMultiSelectsInline:a}=this.props,n=e.map(e=>e.value);this.setState(()=>({selectedUsers:n}),()=>{let e=(0,a$.A)(this.state,"selectedUsers.length");this.props.setSelectedOptionsCount({selectedOptionsCount:e,reduxKey:this.reduxKey}),this.setState(()=>({isInvalid:!!t&&e>t}),()=>{a&&this.submitAction()})})}cancelAction(){this.setState(()=>({selectedUsers:this.previousSelectedUsers}),()=>{this.props.setSelectedOptionsCount({selectedOptionsCount:this.state.selectedUsers&&this.state.selectedUsers.length,reduxKey:this.reduxKey})})}openMultiSelectModal(){let{maxSelectedItems:e,dispatchOpenModal:t,multiConfirmProps:a,blockKitLogPayload:n}=this.props;this.previousSelectedUsers=this.state.selectedUsers,t({element:l.createElement(a5,{element:this.renderMultiUsersSelectElement(),placeholderText:this.formattedPlaceholder,submitAction:this.submitAction,cancelAction:this.cancelAction,multiConfirmProps:a,maxSelectedItems:e,reduxKey:this.reduxKey,blockKitLogPayload:(0,s.A)(n)?void 0:{interactionElement:et.InteractionElement.MULTI_STATIC_SELECT,...n}})})}submitAction(){let{parent:e,blockId:t,actionId:a,onAction:n,initialUsers:r}=this.props,{selectedUsers:l,isInvalid:o}=this.state,s={type:i.ze.multi_users_select,actionId:a,blockId:t,selectedUsers:l};r&&(s.initialUsers=r),o&&e!==i.WP.input||n?.(s)}handleOptionsListClose(){(0,al.A)(this.previousSelectedUsers,this.state.selectedUsers)&&!(0,s.A)(this.props.blockKitLogPayload)&&this.clogSelectInteraction({interaction:et.Interaction.CLOSE})}renderEmptyStateMessage(e){let t=e?nI.t("\u{1F615} No member matches these keywords."):nI.t("\u{1F615} No member found");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))}renderUserOption(e){return l.createElement(nS.A,{id:e.value})}trackClogRef(e){this.clogSelectInteraction=e}renderMultiUsersSelectElement(){let{parent:e,isRequired:t,isDisabled:a,className:n,containerId:r,actionId:o,blockId:c,maxSelectedItems:d,blockKitClogger:m,showConfirmDialog:u,blockKitLogPayload:p,focusOnLoad:h,labelId:_}=this.props,f=this.state.selectedUsers.map(e=>({value:e}));return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,trackClogRef:this.trackClogRef,disableAutoReferringUiContext:!0},l.createElement(a2,{labelId:_,type:i.ze.multi_users_select,parent:e,className:n,containerId:r,blockId:c,actionId:o,isRequired:t,isDisabled:a,placeholder:this.formattedPlaceholder,maxSelectedItems:d,searcherOptions:nw,selectedOptions:f,onOptionsListClose:this.handleOptionsListClose,renderOption:this.renderUserOption,onAction:this.onAction,reduxKey:this.reduxKey,blockKitClogger:m,emptyStateMessage:this.renderEmptyStateMessage,showConfirmDialog:this.props.shouldRenderMultiSelectsInline?u:void 0,focusOnMount:h,autoClogProps:(0,s.A)(p)?void 0:{interactionElement:et.InteractionElement.MULTI_USERS_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{enableClogAction:!1},removeToken:{interaction:et.Interaction.DESELECT,onClick:{enableClogAction:!0}},...p}}))}render(){return this.props.shouldRenderMultiSelectsInline?this.renderMultiUsersSelectElement():l.createElement(multi_select_input,{openMultiSelectModal:this.openMultiSelectModal,placeholder:this.formattedPlaceholder,selectedValues:this.state.selectedUsers,size:this.props.size})}};nT.displayName="MultiUsersSelect";let nN=(0,eK.N)(null,e=>({connectedReplaceTextEmojiWithNative:t=>e((0,tT.F)(t)),dispatchOpenModal:t=>e((0,U.q)(t)),setSelectedOptionsCount:t=>e((0,a7.B)(t))}))((0,K.A)(nT));var nM=a(0x1f1fa28b);let nR=/(\.[0-9]*?[1-9])0+$|\.0*$/,nP=new u.Ay("block_kit");function NumberInputElement({id:e,initialValue:t,savedValue:a,actionId:n,blockId:r,hintId:o,labelId:s,onAction:c,errorId:d,errorText:m,isDisabled:u,isRequired:p,minValue:h=-1/0,maxValue:_=1/0,placeholder:f,dispatchAction:b,dispatchActionConfig:g={triggerActionsOn:["on_enter_pressed"]},focusOnLoad:y,isDecimalAllowed:A,size:x="medium"}){let[E,C]=(0,l.useState)(a||t),k=(0,l.useCallback)(e=>{b&&"Enter"===e.key&&(0,aa.T)(g)&&(e.preventDefault(),c({type:i.ze.number_input,actionId:n,blockId:r,value:E?.length?E:null}))},[b,r,n,c,E,g]),v=(0,l.useCallback)(e=>{let a=e.trim(),l="."===a||"-"===a||""===a,o="-"===a||""===a;if(a!==E?.trim()||!b){let e={type:i.ze.number_input,actionId:n,blockId:r,value:a?.length?Number(a).toString():null};t&&(e.initialValue=t),b&&l?c(e,!1):b&&(0,at.$)(g)?c(e,!0):c(e,!1)}A&&(!Number.isNaN(Number(a))||l)&&C(a),A||a.includes(".")||Number.isNaN(Number(a))&&!o||C(a)},[b,r,n,c,t,A,E,g]),S=(0,l.useCallback)(()=>{let e=E.includes(".")&&(E.endsWith("0")||E.endsWith("."))?E.replace(nR,"$1"):E;if(e!==E){let a={type:i.ze.number_input,actionId:n,blockId:r,value:e?.length?e:null};t&&(a.initialValue=t),c(a,b),C(e)}},[b,r,n,c,t,E]),I=nP.t("Enter a number");return l.createElement(ae.A,{name:n,id:e,hintId:o,"aria-labelledby":s,value:E||"",type:"number",onChange:e=>v(e),onKeyDown:k,onBlur:S,errorId:d,showError:!1,min:(0,nM.A)(h),max:(0,nM.A)(_),autoComplete:"off",errorText:m,isDisabled:u,isRequired:p,placeholder:f&&f.text||I,focusOnMount:y,size:x,"data-qa":"block-kit-number-input-element"})}NumberInputElement.displayName="NumberInputElement";let nL=(0,K.A)(NumberInputElement);var nO=a(0x178788799),nD=a(0xb90d5858),nF=a(0x1e1bdd25f);let nU=new u.Ay("block_kit"),nB={size:Y.c.small,onAction:o.A,showConfirmDialog:void 0,blockKitLogPayload:void 0},nH=class extends l.Component{static defaultProps=nB;clogOverflowInteraction;constructor(e){super(e),this.handleOverflowClose=this.handleOverflowClose.bind(this),this.handleMenuItemSelected=this.handleMenuItemSelected.bind(this)}handleOverflowClose(){this.clogOverflowInteraction?.({interaction:et.Interaction.CLOSE})}handleMenuItemSelected(){}render(){let{onAction:e,options:t,blockId:a,isDisabled:n,actionId:r,size:i,showConfirmDialog:o,blockKitLogPayload:c,dispatchHandleDeepLink:d}=this.props,onActionWrapper=({optionText:t,optionValue:n,optionUrl:i})=>{e?.({type:"overflow",actionId:r,blockId:a,selectedOption:{text:t,value:n}}),i&&(0,eV.A)(i)&&(i.startsWith("slack://")?d({uri:i}):window.open(i,"_blank","noopener,noreferrer"))},m=t.map(e=>({...e,text:e.text&&e.text.text,description:e.description&&e.description.text,originalOptionShape:e})),u=(0,s.A)(c);return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.OVERFLOW,...c,disableAutoClog:u,trackClogRef:e=>{this.clogOverflowInteraction=e},disableAutoReferringUiContext:!0},l.createElement(nF.A,{position:"bottom-left",offsetY:4,onTriggerClose:this.handleOverflowClose,onPopoverClose:this.handleOverflowClose,onMenuItemSelected:this.handleMenuItemSelected,renderMenu:e=>l.createElement(nO.Ay,{width:250,...e},m.map(e=>{let t;return l.createElement(nD.A,{key:`option-menu-item-${e.value}-${e.url}`,"data-qa":"block_kit_overflow_element_menu_item",label:l.createElement(Q.A,{noLinking:!0,text:(0,a$.A)(e,"originalOptionShape.text.text"),emoji:(0,a$.A)(e,"originalOptionShape.text.emoji"),showTooltips:!1}),disabled:n,onSelected:(t={optionText:e.originalOptionShape.text,optionDescription:e.originalOptionShape.description,optionValue:e.value,optionUrl:e.url},()=>{o?o({onGo:()=>onActionWrapper(t)}):onActionWrapper(t)}),autoClogProps:u?void 0:{interaction:et.Interaction.SELECT,onClick:{enableClogAction:!0}}})}))},l.createElement(h.Ay,{"aria-label":nU.t("More options"),className:"p-block_kit_overflow_element__button","data-qa":"block_kit_overflow_element_button",type:"outline",size:i,disabled:n,autoClogProps:u?void 0:{interaction:et.Interaction.CLICK,onClick:{enableClogAction:!0}}},l.createElement(aE.Ah,{name:"ellipsis-horizontal-filled"}))))}};nH.displayName="OverflowElement";let nW=(0,eK.N)(null,e=>({dispatchHandleDeepLink:({uri:t})=>e((0,e$.HB)({uri:t}))}))((0,K.A)(nH)),nV=new u.Ay("block_kit"),nG=class extends l.Component{static defaultProps={hintId:void 0,labelId:void 0,errorId:void 0,errorText:null,isRequired:!1,placeholder:void 0,onAction:o.A,savedValue:void 0,className:"",maxLength:void 0,minLength:void 0,blockKitLogPayload:void 0,size:"medium",focusOnLoad:!1};interactionFiredValue;clogInputInteraction=o.A;constructor(e){super(e),(0,tk.v)(this,["handleChange","handleBlur"]);const{savedValue:t}=this.props;this.interactionFiredValue=t||void 0,this.state={value:t||void 0}}handleChange=(e="")=>{let{blockId:t,actionId:a,onAction:n}=this.props,r=e.trim();if(r!==this.state.value?.trim()){let e={type:i.ze.password,actionId:a,blockId:t,value:r?.length?r:null};n?.(e,!1)}this.setState(()=>({value:e}))};handleBlur=()=>{this.interactionFiredValue!==this.state.value&&(this.clogInputInteraction({interaction:et.Interaction.ENTER_TEXT,interactionElement:et.InteractionElement.PASSWORD,...this.props.blockKitLogPayload}),this.interactionFiredValue=this.state.value)};render(){let{id:e,labelId:t,errorId:a,hintId:n,actionId:r,isDisabled:i,isRequired:o,errorText:c,className:d,placeholder:m,maxLength:u,minLength:p,blockKitLogPayload:h,size:_,focusOnLoad:f}=this.props,b=nV.t("Write something"),g=aA()("p-password_element",d),y=l.createElement(ae.A,{id:e,"aria-labelledby":t,errorId:a,hintId:n,name:r,className:g,isDisabled:i,isRequired:o,errorText:c,showError:!1,onChange:this.handleChange,onBlur:this.handleBlur,value:this.state.value||"",placeholder:m&&m.text||b,maxCharacterLimit:u,minCharacterLimit:p,autoComplete:"off",type:"password",size:_,focusOnMount:f,"data-qa":"bk-password_input_element"});return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,disableAutoClog:(0,s.A)(h),trackClogRef:e=>{this.clogInputInteraction=e},disableAutoReferringUiContext:!0},y)}};nG.displayName="PasswordElement";let nq=(0,K.A)(nG);var nj=a(0x24beea7c3);let nz=new u.Ay("block_kit"),nK=class extends l.Component{interactionFiredValue;clogInputInteraction;static defaultProps={hintId:void 0,labelId:void 0,errorId:void 0,errorText:void 0,isRequired:!1,placeholder:void 0,multiline:!1,onAction:o.A,initialValue:void 0,savedValue:void 0,className:"",maxLength:void 0,minLength:void 0,dispatchActionConfig:{triggerActionsOn:["on_enter_pressed"]},dispatchAction:!1,blockKitLogPayload:void 0,size:"medium",focusOnLoad:!1};constructor(e){super(e),(0,tk.v)(this,["handleChange","handleKeyDown","handleBlur"]);const{savedValue:t,initialValue:a}=this.props;this.interactionFiredValue=e.initialValue,this.state={value:void 0===t?a:t}}handleKeyDown=e=>{let{blockId:t,actionId:a,onAction:n,initialValue:r,dispatchAction:l}=this.props;if(!l)return;let o=(0,nj.A)({shiftKey:e.shiftKey,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey});if("Enter"===e.key&&!o){e.preventDefault();let l={type:i.ze.plain_text_input,actionId:a,blockId:t,value:this.state.value?.length?this.state.value:null};r&&(l.initialValue=r),n?.(l,!0)}};handleChange=(e="")=>{let{blockId:t,actionId:a,onAction:n,initialValue:r,dispatchActionConfig:l,dispatchAction:o}=this.props,s=e.trim();if(s!==this.state.value?.trim()||!o){let e={type:i.ze.plain_text_input,actionId:a,blockId:t,value:s?.length?s:null};r&&(e.initialValue=r),o&&(0,at.$)(l)?n?.(e,!0):(o&&(0,aa.T)(l),n?.(e,!1))}this.setState(()=>({value:e}))};handleBlur=()=>{this.interactionFiredValue!==this.state.value&&(this.clogInputInteraction?.({interaction:et.Interaction.ENTER_TEXT,interactionElement:et.InteractionElement.PLAIN_TEXT_INPUT,...this.props.blockKitLogPayload}),this.interactionFiredValue=this.state.value)};render(){let{id:e,labelId:t,errorId:a,hintId:n,actionId:r,isDisabled:i,isRequired:o,errorText:c,className:d,placeholder:m,multiline:u,maxLength:p,minLength:h,blockKitLogPayload:_,size:f,focusOnLoad:b}=this.props,g=nz.t("Write something"),y=aA()("p-block_kit_plain_text_input_element",d),A=l.createElement(u?Z.A:ae.A,{id:e,"aria-labelledby":t,errorId:a,hintId:n,name:r,className:y,isDisabled:i,isRequired:o,errorText:c,showError:!1,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,value:this.state.value||"",placeholder:m&&m.text||g,maxCharacterLimit:p,minCharacterLimit:h,autoComplete:"off",size:f,focusOnMount:b});return l.createElement(tJ.A,{eventId:et.EventId.BK_USER_INTERACTION,disableAutoClog:(0,s.A)(_),trackClogRef:e=>{this.clogInputInteraction=e},disableAutoReferringUiContext:!0},A)}};nK.displayName="PlainTextInputElement";let n$=(0,K.A)(nK);var nY=a(0x1e2051844),nQ=a(0x139c79d16),nZ=a(0xa5dbe09b);let nJ={plain_text:Q.A,mrkdwn:tD.q},nX=class extends l.PureComponent{constructor(e){super(e),this.state={selectedOptionValue:e.savedOption&&e.savedOption.value||e.initialOption&&e.initialOption.value},(0,tk.v)(this,["onActionWrapper","handleClick"])}onActionWrapper=e=>{let{initialOption:t,options:a,actionId:n,blockId:r,onAction:l}=this.props,o=(0,nY.A)(a,t=>t.value===e),s={actionId:n,blockId:r,selectedOption:o||null,type:i.ze.radio_buttons};t&&(s.initialOption=t),this.setState(()=>({selectedOptionValue:o?.value})),l(s)};handleClick=e=>{let{showConfirmDialog:t}=this.props;t?t({onGo:()=>this.onActionWrapper(e)}):this.onActionWrapper(e)};render(){let{options:e,containerId:t,actionId:a,blockId:n,isDisabled:r,blockKitLogPayload:i,focusOnLoad:o,labelId:c,experimentBkContainerIdGroupOn:d}=this.props,createTextElement=e=>{if(!e)return l.createElement("span",null);let t=nJ[e.type];return l.createElement(t,{noLinking:!0,...e})};return createTextElement.displayName="createTextElement",l.createElement("div",{className:"p-radio_buttons_element","data-qa":"bk-radio_buttons_element"},l.createElement(nZ.A,{isDisabled:r,"aria-labelledby":c},e.map((e,c)=>{let m=d?getHtmlIdForStatefulBlock({containerId:t,actionId:a,blockId:n}):`${a}-${n}`,u=d?(({containerId:e,actionId:t,blockId:a,index:n,option:r})=>[e,t,a,r.value,n].join("-"))({containerId:t,blockId:n,actionId:a,option:e,index:c}):`${a}-${n}-${e.value}-${c}`;return l.createElement("div",{key:u},l.createElement(tO.A,{isDisabled:r,className:"p-radio_buttons_element__label",cursor:"pointer",type:"inline",subtext:e.description?createTextElement(e.description):null,htmlFor:u,text:createTextElement(e.text)},l.createElement(nQ.A,{name:m,checked:e.value===this.state.selectedOptionValue,onChange:()=>this.handleClick(e.value),id:u,autoFocus:0===c&&o,autoClogProps:(0,s.A)(i)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interaction:et.Interaction.SELECT,onChange:{enableClogAction:!0},interactionElement:et.InteractionElement.RADIO_BUTTONS,...i}})))})))}};nX.displayName="RadioButtons";let n0=(0,tF.N)(e=>({experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id")}),null)(l.memo((0,K.A)(nX)));var n1=a(0x5bddc46f),n2=a(0x2469ec64e),n4=a(0x85e904d5),n5=a(0xc4e87e00);let findSelectedValue=(e,t)=>e.find(e=>e.value===t),find_selected_options_findSelectedOptionFromOptionGroups=(e,t)=>findSelectedValue(e.flatMap(e=>e.options),t),find_selected_options_findSelectedOptionFromOptions=(e,t)=>findSelectedValue(e,t);var n3=a(0x5359476e);a(0xf9f0d4cb);let utils_findSelectedValue=(e,t)=>e.find(e=>e.value===t),utils_findSelectedOptionFromOptionGroups=(e,t)=>utils_findSelectedValue((0,n3.A)(e,e=>e.options),t),utils_findSelectedOptionFromOptions=(e,t)=>utils_findSelectedValue(e,t),simpleOptionLabelFilter=(e,t)=>{if(t.filterQuery){let a=t.filterQuery.trim().toLowerCase(),n=e.filter(e=>"string"==typeof e.label&&e.label.toLowerCase().indexOf(a)>=0);return{...t,options:n}}return{...t,options:e}};var n6=a(0x9509dfce),n8=a(0x59bcdfd6),n7=a(0x24429189c);let n9=new u.Ay("block_kit"),re=class extends l.PureComponent{inputRef;logSelectElementMenuOpen;static defaultProps={isRequired:!1,className:"",size:Y.c.small,focusOnLoad:!1};constructor(e){super(e),(0,tk.v)(this,["onAction","renderOption","renderEmptyStateMessage"]);const{savedOption:t,initialOption:a}=this.props;this.state={selectedOption:void 0===t?a:t,selectKey:(0,n2.r9)()},this.logSelectElementMenuOpen=()=>{e.blockKitClogger&&e.blockKitClogger("BLOCK_KIT_SELECT_SCREEN_SHOW",{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:e.type}}})},this.inputRef=l.createRef()}componentDidUpdate(e){if((0,al.A)(this.props.initialOption,e.initialOption)||this.setState(()=>({selectedOption:this.props.initialOption,selectKey:(0,n2.r9)()})),!(0,al.A)(this.props.options,e.options)||!(0,al.A)(this.props.optionGroups,e.optionGroups)){if(this.setState(()=>({selectKey:(0,n2.r9)()})),!this.state.selectedOption)return;let e=this.props.experimentPlatformTsConversionBatch2GroupOn?find_selected_options_findSelectedOptionFromOptions:utils_findSelectedOptionFromOptions,t=this.props.experimentPlatformTsConversionBatch2GroupOn?find_selected_options_findSelectedOptionFromOptionGroups:utils_findSelectedOptionFromOptionGroups;(this.props.options&&!e(this.props.options,this.state.selectedOption?.value)||this.props.optionGroups&&!t(this.props.optionGroups,this.state.selectedOption?.value))&&this.setState(()=>({selectedOption:null}))}}onAction({value:e}){let t,{initialOption:a,onAction:n,optionGroups:r,options:l,placeholder:o,actionId:s,blockId:c}=this.props,d=this.props.experimentPlatformTsConversionBatch2GroupOn?find_selected_options_findSelectedOptionFromOptions:utils_findSelectedOptionFromOptions,m=this.props.experimentPlatformTsConversionBatch2GroupOn?find_selected_options_findSelectedOptionFromOptionGroups:utils_findSelectedOptionFromOptionGroups;e&&(r?t=m(r,e):l&&(t=d(l,e)));let u={type:i.ze.static_select,actionId:s,blockId:c,selectedOption:t||null};a&&(u.initialOption=a),o&&(u.placeholder=o),n?.(u),this.setState(()=>({selectedOption:t?t.originalOption:void 0}),()=>{this.inputRef?.current?.focus()})}renderOption=e=>{if(e&&"object"==typeof e&&"originalOption"in e&&!(0,s.A)(e.originalOption)){if(e.originalOption.text?.type===n5.Lv.RICH_TEXT){let t=e.originalOption.text.type,a=e.originalOption.text.elements;return l.createElement("div",{className:"p-block-kit-select_options"},l.createElement(eg.A,{type:t,elements:a,disableJumboEmoji:!0,noInlineLinks:!0,disableHighlights:!1,alwaysDisplayMentionsAsLinks:!0,inline:!0,clogLinkClick:o.A}))}return l.createElement("div",{className:"p-block-kit-select_options"},l.createElement(Q.A,{noLinking:!0,text:e.originalOption.text.text,emoji:e.originalOption.text.emoji,customLineEnding:" "}),e.originalOption.description?l.createElement("span",{className:"p-block-kit-select_options__description"},l.createElement(Q.A,{noLinking:!0,text:e.originalOption.description.text,emoji:e.originalOption.description.emoji})):null)}return"heading"===e.type?l.createElement(Q.A,{noLinking:!0,text:e.label,emoji:!0}):e.label};renderEmptyStateMessage=e=>{let t=e?n9.t("\u{1F615} Nothing could be found."):n9.t("\u{1F615} No result");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))};render(){let{isRequired:e,isDisabled:t,parent:a,options:n,optionGroups:r,placeholder:o,showConfirmDialog:c,elementWidth:d,className:m,size:u,containerId:p,actionId:h,connectedReplaceTextEmojiWithNative:_,blockId:f,blockKitLogPayload:b,focusOnLoad:g,labelId:y,dispatchConvertBlocksToDelta:A,experimentBkContainerIdGroupOn:x}=this.props,E=n9.t("Pick an option"),C=[];n?.length?C=formatActionElementSelectOptions(n):r?.length&&(C=formatActionElementSelectOptionGroups(r));let k=o?.text&&o.emoji?_(o.text):o?.text,v=a===i.WP.input&&!e,S=!!(n?.length&&n[0].text?.type===n5.Lv.RICH_TEXT);S&&(C=C.map(e=>{let t=A({blocks:[(0,n6.nf)(e.originalOption?.text,0,{maxDepth:20})]}),a=(0,n8.f)({contents:t.ops});return{...e,label:a}}));let I=x?getHtmlIdForStatefulBlock({containerId:p,actionId:h,blockId:f}):`${h}-${f}`;return l.createElement(as.Ay,{inputRef:this.inputRef,key:this.state.selectKey,selectId:I,selectDataQa:h,ariaLabel:o?.text??E,ariaLabelledBy:y,options:C,className:m,width:d,size:u,isDisabled:t,placeholderText:k??E,onOptionSelected:this.onAction,selectedOption:this.props.experimentPlatformTsConversionBatch1GroupOn?formatSingleOption(this.state.selectedOption||void 0,!1):((e,t)=>{if(!e)return;let a="object"==typeof e?.text&&"rich_text"===e.text.type;return{originalOption:e,description:e.description&&e.description.text,label:a?e.value:e.text&&e.text.text,value:`${t?"bk-":""}${e.value}`,isPlaceholder:e.isPlaceholder||!1}})(this.state.selectedOption||void 0,!1),onOpen:this.logSelectElementMenuOpen,isRequired:!v,showConfirmDialog:c,minOptionsListWidth:300,renderOption:this.renderOption,renderSelectedOption:this.renderOption,emptyStateMessage:this.renderEmptyStateMessage,focusOnMount:g,autoClogProps:(0,s.A)(b)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.STATIC_SELECT,onChange:{enableClogAction:!0},onOptionSelected:{enableClogAction:!0},onOpen:{enableClogAction:!0},onClose:{enableClogAction:!0},...b},filter:S?simpleOptionLabelFilter:(...e)=>(0,n4.k)(e[0],e[1],{fuzzyJumpLimit:20}),shouldAllowUnselectInSingleSelectMode:!1})}};re.displayName="StaticSelectElement";let rt={connectedReplaceTextEmojiWithNative:tT.F,dispatchConvertBlocksToDelta:n7.f},ra=(0,eK.N)(e=>({experimentBkContainerIdGroupOn:"on"===(0,w._Z)(e,"bk_container_id"),experimentPlatformTsConversionBatch1GroupOn:"on"===(0,w._Z)(e,"platform_ts_conversion_batch_1"),experimentPlatformTsConversionBatch2GroupOn:"on"===(0,w._Z)(e,"platform_ts_conversion_batch_2")}),rt)((0,K.A)(re));var rn=a(0x18e87117e),rr=a.n(rn);let StyledText=({text:e,size:t,color:a,fontWeight:n,textDecoration:r,bold:i,style:o={}})=>{({size:t=t,color:a=a,fontWeight:n=n,textDecoration:r=r}=o);let s=aA()("bk-styled-text-element",{[rr().micro]:"micro"===t,[rr().caption]:"caption"===t,[rr().body]:"body"===t,[rr().subtitle]:"subtitle"===t,[rr().title]:"title"===t,[rr().headline]:"headline"===t||"large"===t,[rr().primary]:"primary"===a,[rr().secondary]:"secondary"===a,[rr().tertiary]:"tertiary"===a,[rr().highlight1]:"highlight-1"===a,[rr().highlight2]:"highlight-2"===a,[rr().highlight3]:"highlight-3"===a,[rr().important]:"important"===a,[rr().regular]:"regular"===n,[rr().bold]:"bold"===n||i,[rr().bolder]:"bolder"===n,[rr().underline]:"underline"===r,[rr().strikethrough]:"strikethrough"===r});return l.createElement("div",{className:s},e)};StyledText.displayName="StyledText";var ri=a(0x9154b87c);let rl=new u.Ay("date_time_picker"),ro=class extends l.Component{constructor(e){super(e),(0,tk.v)(this,["handleTimeChange","dispatchAction"]),this.state={selectedTime:e.savedTime||e.initialTime}}componentDidUpdate(e){this.props.initialTime!==e.initialTime&&this.setState(()=>({selectedTime:this.props.initialTime}))}setSelectedTimeAndDispatchAction(e){this.dispatchAction(e)}dispatchAction(e){let{blockId:t,actionId:a,onAction:n,initialTime:r,timezone:l}=this.props,o={type:i.ze.timepicker,actionId:a,blockId:t,selectedTime:e||null};r&&(o.initialTime=r),l&&(o.timezone=l),n?.(o),this.setState(()=>({selectedTime:e}))}handleTimeChange(e){let{showConfirmDialog:t}=this.props;t?t({onGo:()=>{this.setSelectedTimeAndDispatchAction(e)}}):this.setSelectedTimeAndDispatchAction(e)}render(){let{isDisabled:e,isRequired:t,parent:a,placeholder:n,size:r,elementWidth:o,blockKitLogPayload:c,focusOnLoad:d,timezone:m}=this.props,u=a===i.WP.input,p=m?(0,t5.j)(m,(0,t6.JK)()):void 0;return l.createElement(ri.Ay,{value:this.state.selectedTime||void 0,isDisabled:e,placeholderText:n?.text||void 0,ariaLabel:n?.text||rl.t("Time"),onChange:this.handleTimeChange,size:r||"small",width:o,isRequired:!(u&&!t),showTimeZone:!!m,timeZone:p,timeZoneClassName:"p-block_kit_time_picker_element_timezone",selectDataQa:"bk_time_picker",allowCustomInput:!0,do24hrTime:!1,focusOnMount:d,autoClogProps:(0,s.A)(c)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.TIMEPICKER,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{interaction:et.Interaction.CLOSE,enableClogAction:!0},...c}})}};ro.displayName="TimepickerElement";let rs=(0,K.A)(ro),rc=new u.Ay("block_kit"),UrlInputElement=({placeholder:e,...t})=>{let a=rc.t("Enter a URL",{fallbackHash:"3585bb6979e0490e012c1f0ea06b95541cbe4f1b",fallbackHashNs:"slack_functions"}),n=e?.text||a,r=l.useCallback(({actionId:e,blockId:t,onAction:a,value:n,initialValue:r,shouldDispatch:l})=>{a({type:i.ze.url_text_input,actionId:e,blockId:t,value:n,initialValue:r},l)},[]);return l.createElement(an,{...t,placeholder:n,onChange:r,type:"url",icon:"link"})};UrlInputElement.displayName="UrlInputElement";let rd=new u.Ay("block_kit"),rm={entities:{members:{includeSelf:!0}},allowEmptyQuery:!0},UsersSelect=({size:e=Y.c.small,isRequired:t=!1,parent:a,onAction:n=o.A,placeholder:r,initialUser:c,savedUser:d,showConfirmDialog:m,blockKitClogger:u=o.A,blockKitLogPayload:p,focusOnLoad:h=!1,type:_,containerId:f,blockId:b,actionId:g,isDisabled:A,elementWidth:x})=>{let E=(0,y.wA)(),C=(0,I.d4)(e=>"on"===(0,w._Z)(e,"bk_container_id")),k=void 0===d?c:d,[v,S]=(0,l.useState)(k),T=l.useRef(c);(0,l.useEffect)(()=>{T.current!==c&&(S(c),T.current=c)},[c]);let N=(0,l.useCallback)(e=>E((0,tT.F)(e)),[E]),M=(0,l.useCallback)(()=>u?.("BLOCK_KIT_SELECT_SCREEN_SHOW",{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:_}}}),[u,_]),R=(0,l.useCallback)(({value:e})=>{let t={type:i.ze.users_select,actionId:g,blockId:b,selectedUser:e??null};c&&(t.initialUser=c),n?.(t),S(e)},[g,b,c,n]),P=(0,l.useCallback)(e=>{let t=e?rd.t("\u{1F615} No member matches these keywords."):rd.t("\u{1F615} No member found");return l.createElement("div",{className:"p-block_kit_element__no-results-message"},l.createElement("p",{className:"margin_0"},t))},[]),L=rd.t("Select a user"),O=r&&r.text&&r.emoji?N(r.text):r?.text,D=(0,l.useCallback)(e=>l.createElement(nS.A,{id:e.value}),[]),F=a===i.WP.input&&!t,U=C?getHtmlIdForStatefulBlock({containerId:f,actionId:g,blockId:b}):`${g}-${b}`,B=(0,l.useMemo)(()=>v&&{value:v},[v]),H=(0,l.useMemo)(()=>(0,s.A)(p)?void 0:{eventId:et.EventId.BK_USER_INTERACTION,interactionElement:et.InteractionElement.USERS_SELECT,onChange:{interaction:et.Interaction.ENTER_TEXT,enableClogAction:!0},onOptionSelected:{interaction:et.Interaction.SELECT,enableClogAction:!0},onOpen:{interaction:et.Interaction.CLICK,enableClogAction:!0},onClose:{interaction:et.Interaction.CLOSE,enableClogAction:!0},...p},[p]);return l.createElement(tI.A,{searcherOptions:rm,selectId:U,ariaLabel:r?.text??L,renderOption:D,renderSelectedOption:D,size:e,width:x,onOptionSelected:R,selectedOption:B,isDisabled:A,isRequired:!F,placeholderText:O??L,onOpen:M,showConfirmDialog:m,minOptionsListWidth:300,emptyStateMessage:P,focusOnMount:h,autoClogProps:H})};UsersSelect.displayName="UsersSelect";let ru=(0,K.A)(UsersSelect);var rp=a(0x17cc44ffa);let rh=new u.Ay("button-element");function WorkflowButtonElement({blockId:e,actionId:t,channelId:a,containerId:n,text:r,style:i,workflow:o,accessibilityLabel:s,blocksContainerContext:c,blockKitLogPayload:d,blockKitClogger:m,isEphemeral:u}){let p=(0,y.wA)(),h=o?.trigger?.url,_=(0,I.d4)(e=>h?(0,eT.$N)(e,h)?.triggerId:void 0),f=(0,l.useCallback)(()=>{p((0,rp.L)({linkTriggerUrl:o.trigger.url,hermesLinkTriggerUIContext:{actionId:t,blockId:e,channelId:a,location:"button",messageTs:n,customizableInputParameters:u?o.trigger.customizableInputParameters:void 0},reason:"trip-trigger-from-bk-workflow-button"}))},[t,e,a,n,p,u,o.trigger.customizableInputParameters,o.trigger.url]),b=l.createElement(tC,{actionId:t,text:r,style:i,containerId:n,blockKitLogPayload:d,blockKitClogger:m,blocksContainerContext:c,onAction:f,accessibilityLabel:rh.t("Start workflow \u2013 {title}",{title:s||r.text,fallbackHash:"43500c8a847229230c0d3341352d090447de3e4e",fallbackHashNs:"hermes_shortcuts"})});return _?(0,eP.sh)({shortcutInfo:{triggerId:_,url:h},channelId:a,hermesLinkTriggerUIContext:{actionId:t,blockId:e,channelId:a,location:"button",messageTs:n,customizableInputParameters:u?o.trigger.customizableInputParameters:void 0},autoClogEntryPoint:c===z.pi.message?"message":"other",children:b}):b}WorkflowButtonElement.displayName="WorkflowButtonElement";let r_=WorkflowButtonElement,rf={[i.ze.button]:tC,[i.ze.overflow]:nW,[i.ze.users_select]:ru,[i.ze.multi_users_select]:nN,[i.ze.conversations_select]:tY,[i.ze.multi_conversations_select]:nl,[i.ze.channels_select]:tR,[i.ze.multi_channels_select]:na,[i.ze.external_select]:ap,[i.ze.multi_external_select]:nE,[i.ze.static_select]:ra,[i.ze.multi_static_select]:nv,[i.ze.datepicker]:t4,[i.ze.timepicker]:rs,[i.ze.image]:aK,[i.ze.plain_text_input]:n$,[i.ze.number_input]:nL,[i.ze.mrkdwn]:tD.q,[i.ze.plain_text]:Q.A,[i.ze.radio_buttons]:n0,[i.ze.checkboxes]:tH,[i.ze.password]:nq,[i.ze.rich_text_input]:n1.A,[i.ze.datetimepicker]:t9,[i.ze.url_text_input]:UrlInputElement,[i.ze.email_text_input]:EmailInputElement,[i.ze.workflow_button]:r_,[i.ze.file_input]:aH,[i.ze.styled_text]:StyledText,[i.ze.icon_button]:aV,[i.ze.feedback_buttons]:a_},rb={[i.ze.button]:tC,[i.ze.overflow]:nW,[i.ze.users_select]:ru,[i.ze.multi_users_select]:nN,[i.ze.conversations_select]:tY,[i.ze.multi_conversations_select]:nl,[i.ze.channels_select]:tR,[i.ze.multi_channels_select]:na,[i.ze.external_select]:ap,[i.ze.multi_external_select]:nE,[i.ze.static_select]:ra,[i.ze.multi_static_select]:nv,[i.ze.datepicker]:t4,[i.ze.timepicker]:rs,[i.ze.plain_text_input]:n$,[i.ze.number_input]:nL,[i.ze.radio_buttons]:n0,[i.ze.checkboxes]:tH,[i.ze.password]:nq,[i.ze.rich_text_input]:n1.A,[i.ze.datetimepicker]:t9,[i.ze.url_text_input]:UrlInputElement,[i.ze.email_text_input]:EmailInputElement,[i.ze.file_input]:aH,[i.ze.icon_button]:aV,[i.ze.feedback_buttons]:a_},rg=rf},0x1a95efb3:(e,t,a)=>{"use strict";a.d(t,{A:()=>V});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x33644bb7),l=a(0x21f3c49e8),o=a(0xc48503ad),s=a.n(o),c=a(0x40c0d834),d=a(0x20b4dda68),m=a(0x20482ad21),u=a(0x102edf836),p=a(0x8e01ba73),h=a(0x3711e82d),_=a(0x1c91944c9),f=a(0x46dbff89);let b=new m.Ay("attachment_actions"),g={goButton:{interaction:h.Interaction.CONFIRM,interactionElement:h.InteractionElement.CONFIRM_DIALOG},cancelButton:{interaction:h.Interaction.DENY,interactionElement:h.InteractionElement.CONFIRM_DIALOG},closeButton:{interaction:h.Interaction.CLOSE,interactionElement:h.InteractionElement.CONFIRM_DIALOG}},y={children:s().node.isRequired,showConfirmDialog:s().func,confirm:s().shape({title:s().shape({type:s().oneOf([d.ze.plain_text]),text:s().string}),text:s().shape({type:s().oneOf([d.ze.plain_text,d.ze.mrkdwn]),text:s().string}),confirm:s().shape({type:s().oneOf([d.ze.plain_text]),text:s().string}),deny:s().shape({type:s().oneOf([d.ze.plain_text]),text:s().string}),type:s().string,style:s().oneOf([u.QE.danger,u.QE.primary])}).isRequired,openModal:s().func.isRequired,blockKitClogger:s().func,onActionWrapperWithConfirm:s().func,blockKitLogPayload:s().object},A={blockKitClogger:void 0,showConfirmDialog:void 0,onActionWrapperWithConfirm:r.A,blockKitLogPayload:void 0},generatePlainTextElement=e=>({type:"plain_text",emoji:!1,text:e}),x=class extends n.PureComponent{static propTypes=y;static defaultProps=A;defaultText;constructor(e){super(e),this.showConfirmDialog=this.showConfirmDialog.bind(this),this.defaultText={deny:b.t("Cancel"),confirm:b.t("OK"),body:b.t("Are you sure?")}}showConfirmDialog({onGo:e}){let{blockKitClogger:t,blockKitLogPayload:a,confirm:{title:r,text:i,confirm:o,deny:s,type:m,style:_}}=this.props;if(this.props.showConfirmDialog){let t={...this.props.confirm,deny:s??generatePlainTextElement(this.defaultText.deny),confirm:o??generatePlainTextElement(this.defaultText.confirm),text:i??generatePlainTextElement(this.defaultText.body)};this.props.showConfirmDialog({confirm:t,onGo:e});return}let logConfirmDialogAction=e=>t&&t(e,{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:m}}}),f={noJumbomoji:!0,isEmojiInlineWithText:!0,showTooltips:i?.type===d.ze.mrkdwn,tsfMode:"NOMRKDWN"};i?.type===d.ze.plain_text&&(f={...f,tsfMode:i?.emoji?"NOMRKDWN":"EDIT"});let b={dismissText:s?.text,okText:o?.text,onGo:()=>{logConfirmDialogAction("BLOCK_KIT_CONFIRM_SUBMIT"),e()},onCancel:()=>{logConfirmDialogAction("BLOCK_KIT_CONFIRM_CANCEL")},text:i?.text,title:r?.text,dangerGoButton:_===u.QE.danger,isMrkdwnText:!0,confirmTextProps:f};logConfirmDialogAction("BLOCK_KIT_CONFIRM_SHOW"),this.props.openModal({element:(0,l.A)(a)?n.createElement(p.A,b):n.createElement(c.A,{eventId:h.EventId.BK_USER_INTERACTION,...a,disableAutoReferringUiContext:!0},n.createElement(p.A,{...b,autoClogProps:g}))})}render(){let{children:e,onActionWrapperWithConfirm:t,confirm:{title:a,text:r,confirm:i,deny:l,style:o}}=this.props;return(0,n.cloneElement)(n.Children.only(e),{showConfirmDialog:this.showConfirmDialog,onAction:t,multiConfirmProps:{getShouldShowSpeedBump:e=>"go"===e,speedBumpContinueButtonType:o??u.QE.primary,speedBumpContinueButtonText:i?.text||this.defaultText.confirm,speedBumpCancelButtonText:l?.text||this.defaultText.deny,speedBumpTitleText:a?.text,speedBumpBodyText:r?.text||this.defaultText.body}})}};x.displayName="WithConfirmDialog";let E=(0,_.N)(null,e=>({openModal:t=>e((0,f.q)(t))}))(x);var C=a(0x210cf696f),k=a(0x1f3e2995c),v=a(0x2015b5207),S=a(0x2132c5285);let I=new m.Ay("attachments"),w=class extends n.PureComponent{static defaultProps={isExpanded:!1,blockKitClogger:r.A,blockKitLogPayload:void 0};deferredSetStateHandle;constructor(e){super(e),this.onClick=this.onClick.bind(this),this.onMrkdwnRender=this.onMrkdwnRender.bind(this),this.state={text:e.text,isExpandableStateKnown:!1},this.deferredSetStateHandle=null}componentWillUnmount(){null!==this.deferredSetStateHandle&&clearTimeout(this.deferredSetStateHandle)}static getDerivedStateFromProps(e,t){let a={text:e.text};return e.text!==t.text&&(a.isExpandableStateKnown=!1),a}onClick(e){let{isExpanded:t,expandKey:a,blockKitClogger:n,type:r}=this.props;e.preventDefault(),e.target.blur(),n(t?h.EventId.BLOCK_KIT_TRUNCATION_CLOSE:h.EventId.BLOCK_KIT_TRUNCATION_OPEN,{contexts:{ui_context:{step:"block_kit_element",action:"click",ui_element:r}}}),this.props.setExpanded({isExpanded:!t,key:a})}onMrkdwnRender({isTruncated:e}){let{isExpandableStateKnown:t}=this.state;t||(null!==this.deferredSetStateHandle&&clearTimeout(this.deferredSetStateHandle),this.deferredSetStateHandle=window.setTimeout(()=>{this.deferredSetStateHandle=null,this.setState(()=>({isExpandableStateKnown:!0,isExpandable:e}))},16))}renderButtonMaybe(){let e,t,a,{isExpanded:r}=this.props,{isExpandable:i}=this.state;return i?(r?(e=I.rt("See less"),t="div"):(e=I.rt("See more"),t="span",a=" "),n.createElement(t,null,a,n.createElement(C.A,{"data-qa":"block_kit_text_truncation",className:"c-message_attachment__text_expander","aria-expanded":r,onClick:this.onClick},e))):null}render(){let e,t,{isExpanded:a,children:r}=this.props,{isExpandableStateKnown:i}=this.state;return i&&a||(e=300,t=5),n.createElement("span",{className:"c-message_attachment__text"},(0,n.cloneElement)(n.Children.only(r),{onRender:this.onMrkdwnRender,maxNewlines:t,maxCharacters:e}),this.renderButtonMaybe())}};w.displayName="WithTextTruncation";let T={setExpanded:S.o},N=(0,_.N)((e,{containerId:t,blockId:a})=>{let n=(0,k.A)("blockText",t,{blockId:a});return{isExpanded:!!(0,v.A)(e,n),expandKey:n}},T)(w);var M=a(0x113cdbbd7),R=a(0x13f80610a),P=a(0x179bf3aea),L=a(0x18cffe646),O=a(0x10af3b48),D=a(0x2a3fb7ec),F=a(0xf9f0d4cb),U=a(0xe9460abe),B=a(0x901ae535);let registerStatefulElement=e=>{let t=class extends n.PureComponent{blockContainerId;isMessageContainer;constructor(e){super(e),this.handleAction=this.handleAction.bind(this),this.blockContainerId=(0,L.u)({...e.containerActionsPayload?.container??{}})??"",this.isMessageContainer=e.blocksContainerContext===M.pi.message||e.blocksContainerContext===M.pi.message_attachment}static defaultProps={element:void 0,actionId:void 0,channelId:void 0,containerId:void 0,containerActionsPayload:void 0,type:void 0,onAction:r.A,setBlocksStateGeneric:r.A,blockState:{}};componentDidMount(){let{blockId:e,actionId:t,type:a,blockState:n}=this.props,r=n?.[e]?.[t??""];if(!this.isMessageContainer&&!r){let n=a?(0,O.O)(this.props):void 0,r=a&&(0,F.d)(a)?(0,P.F)(a,e,t,n):{};this.props.dispatchUpsertBlockState({containerId:this.blockContainerId,blockId:e,actionId:t,blockState:r})}}handleAction(e,t=!0){let{onAction:a,setBlocksStateGeneric:n}=this.props,r=(e=>{let t;switch(e.type){case d.ze.channels_select:t={selected_channel:e.selectedChannel},void 0!==e.requestedScope&&(t.requested_scope=e.requestedScope,t={selected_channel:e.selectedChannel}),void 0!==e.responseUrlEnabled&&(t.response_url_enabled=e.responseUrlEnabled);break;case d.ze.multi_channels_select:t={selected_channels:e.selectedChannels};break;case d.ze.users_select:t={selected_user:e.selectedUser};break;case d.ze.multi_users_select:t={selected_users:e.selectedUsers};break;case d.ze.conversations_select:t={selected_conversation:e.selectedConversation},void 0!==e.requestedScope&&(t.requested_scope=e.requestedScope),void 0!==e.responseUrlEnabled&&(t.response_url_enabled=e.responseUrlEnabled);break;case d.ze.multi_conversations_select:t={selected_conversations:e.selectedConversations};break;case d.ze.static_select:case d.ze.radio_buttons:case d.ze.external_select:t={selected_option:e.selectedOption};break;case d.ze.multi_static_select:case d.ze.multi_external_select:case d.ze.checkboxes:t={selected_options:e.selectedOptions};break;case d.ze.datepicker:t={selected_date:e.selectedDate};break;case d.ze.timepicker:t={selected_time:e.selectedTime},e.timezone&&(t.timezone=e.timezone);break;case d.ze.plain_text_input:case d.ze.number_input:case d.ze.url_text_input:case d.ze.email_text_input:case d.ze.password:t={value:e.value};break;case d.ze.rich_text_input:t={rich_text_value:e.richTextValue};break;case d.ze.datetimepicker:t={selected_date_time:e.selectedDateTime};break;case d.ze.file_input:t={files:e.files}}return t})(e),i=(0,F.d)(e.type)?(0,P.F)(e.type,e.blockId,e.actionId,r):{};n?.({containerId:this.blockContainerId,blockId:e.blockId,actionId:e.actionId,blockState:i}),a?.(e,t)}render(){return n.createElement(e,{...this.props,...(e=>{let t={},{type:a,blockState:n,blockId:r,actionId:i}=e,l=n?.[r]?.[i];if(!l)return t;switch(a){case d.ze.channels_select:t={savedChannel:e.savedChannel??l.selected_channel??void 0};break;case d.ze.multi_channels_select:t={savedChannels:e.savedChannels??l.selected_channels??void 0};break;case d.ze.users_select:t={savedUser:e.savedUser??l.selected_user??void 0};break;case d.ze.multi_users_select:t={savedUsers:e.savedUsers??l.selected_users??void 0};break;case d.ze.conversations_select:t={savedConversation:e.savedConversation??l.selected_conversation??void 0};break;case d.ze.multi_conversations_select:t={savedConversations:e.savedConversations??l.selected_conversations??void 0};break;case d.ze.static_select:case d.ze.external_select:case d.ze.radio_buttons:t={savedOption:e.savedOption??l.selected_option??void 0};break;case d.ze.multi_static_select:case d.ze.multi_external_select:case d.ze.checkboxes:t={savedOptions:e.savedOptions??l.selected_options??void 0};break;case d.ze.datepicker:t={savedDate:e.savedDate??l.selected_date??void 0};break;case d.ze.timepicker:t={savedTime:e.savedTime??l.selected_time??void 0};break;case d.ze.plain_text_input:case d.ze.number_input:case d.ze.password:t={savedValue:e.savedValue??l.value??void 0};break;case d.ze.rich_text_input:t={savedValue:e.savedValue??l.rich_text_value??void 0};break;case d.ze.datetimepicker:t={savedDateTime:e.savedDateTime??l.selected_date_time??void 0};break;case d.ze.file_input:t={files:e.files??l.files??void 0}}return t})(this.props),onAction:this.handleAction})}};t.displayName="StatefulElement";let a=(0,_.N)((e,t)=>({blockState:(0,U.uz)(e,(0,L.u)({...t?.containerActionsPayload?.container}))}),e=>({dispatchUpsertBlockState:(...t)=>e((0,B.s)(...t))}))(t);return n.forwardRef((t,r)=>{let MaybeConnectStatefulElement=t=>{let i;return t.type&&(i=t.type,(0,D.X)([...M.JV,d.ze.button,d.ze.overflow],i))?n.createElement(R.A.Consumer,null,({blocks:e,setBlocksStateGeneric:i})=>n.createElement(a,{refToForward:r,...t,blocks:e,setBlocksStateGeneric:i})):n.createElement(e,t)};return MaybeConnectStatefulElement.displayName="MaybeConnectStatefulElement",MaybeConnectStatefulElement(t)})};registerStatefulElement.displayName="registerStatefulElement";var H=a(0x5df5385c);let W=(0,n.createContext)(null),Element=({confirm:e,shouldTruncateText:t=!1,blockKitClogger:a,showConfirmDialog:l,blockKitLogPayload:o,blockToFocusAfterValidation:s,onAction:c=r.A,...d})=>{let m=(0,n.useContext)(W),u=(0,n.useCallback)((e,t)=>(c(e,t),a&&a("BLOCK_KIT_ACTION",{contexts:{ui_context:{action:"click",ui_element:"block_kit_element",ui_component:`block_kit_${d.type}`}}})),[c,a,d.type]),p=(0,n.useCallback)((t,a)=>{u({confirm:e,showConfirmDialog:l,...t},a)},[u,e,l]),h=H.A[d.type];if(!h)return null;let _={...d,key:d.actionId,onAction:u,blockKitClogger:a,blockKitLogPayload:o,focusOnLoad:s?d.blockId===s:d.focusOnLoad},f=m&&(0,i.A)(m)?m({type:d.type,props:_}):null;return(f||(f=n.createElement(h,_)),t)?n.createElement(N,{...d,type:d.type,blockKitClogger:a},f):e?n.createElement(E,{showConfirmDialog:l,confirm:e,blockKitClogger:a,onActionWrapperWithConfirm:p,blockKitLogPayload:o},f):f};Element.displayName="Element";let V=registerStatefulElement(Element)},0x18785321b:(e,t,a)=>{"use strict";a.d(t,{M:()=>FileInputErrors});var n=a(0xbad225b5),r=a(0x2b7f0bcc),i=a(0x1545708d9),l=a.n(i);let FileInputErrors=({errors:e})=>e?.length?n.createElement(n.Fragment,null,e.map(({id:e,message:t})=>n.createElement("div",{className:l().alertContainer,key:e},n.createElement(r.Ay,{level:r.A_.error,type:r.QE.boxed},n.createElement("span",null,t))))):null;FileInputErrors.displayName="FileInputErrors"},0x139d8d26e:(e,t,a)=>{"use strict";a.d(t,{$:()=>n,e:()=>r});let n=10,r=1e7},0x1a2b0bc8d:(e,t,a)=>{"use strict";a.d(t,{$:()=>c});var n=a(0xc9c97240),r=a(0xbfe351d6),i=a(0x1aba66b56),l=a(0x107a27f7),o=a(0x14ea3ce99),s=a(0x357dacc7);let c=(0,n.Mz)(s.hP,o.Pz,(e,t)=>{let a=Object.values(e).filter(e=>!!(0,i.A)([l.U.IDLE,l.U.UPLOADING,l.U.PROCESSING],e.status)).map(e=>({status:r.Y.Pending,name:e.file.name||"",id:e.pendingFileId||"",thumbnailSrc:e.previewData?.dataUrl||"",type:e.file.type}));return[...t?Object.values(t).map(e=>({status:r.Y.Uploaded,name:e.name??"",id:e.id,thumbnailSrc:(e.thumb_64||e.thumb_80||e.thumb_video||e.thumb_160||e.thumb_360||e.thumb_pdf)??"",type:e.mimetype||" ",prettyType:e.pretty_type||" ",filetype:e.filetype||" "})):[],...a]})},0xbfe351d6:(e,t,a)=>{"use strict";a.d(t,{Y:()=>r});var n,r=((n={}).Uploaded="Uploaded",n.Pending="Pending",n.Error="Error",n)},0xddc78dc5:(e,t,a)=>{"use strict";a.d(t,{y:()=>createFileInputAttributes});let createFileInputAttributes=({filetypes:e,isUploadImageOnly:t,isUploadDisabled:a})=>a?{}:t?{accept:"image/*"}:Array.isArray(e)&&e.length?{accept:e.map(e=>`.${e}`).join()}:{}},0x2278818de:(e,t,a)=>{"use strict";a.d(t,{l:()=>deriveFileUploadError});var n=a(0x1d24ec95f),r=a(0x20482ad21),i=a(0x12303b2bd);let l=new r.Ay("block_kit"),deriveFileUploadError=({filesToUpload:e,existingFiles:t,maxFiles:a,maxFileSizeBytes:r})=>(({filesToUpload:e,existingFiles:t,maxFiles:a})=>void 0===a?null:e.length+t.length>a?{id:"too-many-files",message:l.t("You have selected too many files. The limit is {number}.",{number:a})}:null)({filesToUpload:e,existingFiles:t,maxFiles:a})||(({filesToUpload:e,maxFileSizeBytes:t})=>{if(!t)return null;let[a]=(0,n.A)(e,e=>e.size>t);if(a.length){let e=(0,i.A)(t),n=a.length,r=a[0].name,o=a.map(({name:e})=>e).slice(0,-1).join(", "),s=a[n-1].name;return{id:"files-too-large",message:l.t("The {numberOfTooLargeFiles, plural, =1 {file} other {files}} {numberOfTooLargeFiles, plural, =1 {{singleFileName}} other {{allFileNamesExceptLast} and {lastFileName}}} {numberOfTooLargeFiles, plural, =1 {is} other {are}} too large. Our max file size is {maxFileSize}.",{allFileNamesExceptLast:o,singleFileName:r,lastFileName:s,maxFileSize:e,numberOfTooLargeFiles:n})}}return null})({filesToUpload:e,maxFileSizeBytes:r})},0xd3fcb4c1:(e,t,a)=>{"use strict";a.d(t,{q:()=>MrkdwnElement});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20b4dda68),o=a(0x6cc5eee0),s=a(0x113cdbbd7),c=a(0x1b3ecb90f);let MrkdwnElement=({text:e,parent:t,maxNewlines:a,maxCharacters:r,onRender:d,clogLinkClick:m,customFormatHandler:u,customLineEnding:p,noJumbomoji:h=!0,noLinking:_=!1,emojiDisplayInfo:f,blocksContainerContext:b})=>{let g=t===l.WP.context,y=i()("p-mrkdwn_element",{"p-context_block__text":g});return n.createElement("div",{className:y},n.createElement(o.A,{"data-qa":"bk_markdown_element",text:e,onRender:d,maxCharacters:r,maxNewlines:a,clogLinkClick:m,customFormatHandler:u,customLineEnding:p,noJumbomoji:h,emojiSize:g?c.lw.SMALL:void 0,isEmojiInlineWithText:!g,noLinking:_,emojiDisplayInfo:f,isFromAppHome:b===s.pi.app_home}))};MrkdwnElement.displayName="MrkdwnElement"},0x178109f89:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20b4dda68),s=a(0x6cc5eee0),c=a(0x1b3ecb90f);let PlainText=({id:e,text:t,parent:a,emoji:r=!0,emojiSize:d,maxNewlines:m,maxCharacters:u,onRender:p=l.A,noJumbomoji:h=!0,className:_,showTooltips:f=!0,noLinking:b=!1,customLineEnding:g,dataQA:y="bk-plain_text_element",noHighlights:A,noHexColors:x,noCode:E,noQuotes:C})=>{let k=a===o.WP.context,v=i()("p-plain_text_element",_,{"p-context_block__text":k,"p-image_block__title":a===o.WP.image});return n.createElement("div",{id:e,className:v,"data-qa":y},n.createElement(s.A,{tsfMode:r?"NOMRKDWN":"EDIT",text:t,onRender:p,maxCharacters:u,maxNewlines:m,noJumbomoji:h,showTooltips:f,noLinking:b,noHighlights:A,noHexColors:x,noCode:E,noQuotes:C,emojiSize:k?c.lw.SMALL:d,isEmojiInlineWithText:!k,customLineEnding:g}))};PlainText.displayName="PlainText";let d=n.memo(PlainText)},0x5bddc46f:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1ee15af19),l=a(0x118cdcdea),o=a.n(l),s=a(0x14fad6485),c=a(0x20b4dda68),d=a(0x20482ad21),m=a(0x207b9aaaf),u=a(0x18defa93),p=a(0x14705d91b),h=a(0x2c5a5afa),_=a(0x9509dfce),f=a(0x24429189c);let b=new d.Ay("block_kit");function RichTextInputElement({blockId:e,actionId:t,onAction:a,initialValue:l,savedValue:d,focusOnLoad:m,dispatchActionConfig:g={triggerActionsOn:["on_enter_pressed"]},placeholder:y,labelId:A,isDisabled:x}){let E=(0,r.wA)(),C=(0,n.useRef)(),{windowRef:k}=(0,n.useContext)(s._0),v=(0,n.useCallback)(()=>{let a;if(C?.current?.getContents()){let e=new(o())(C?.current?.getContents().contents);a=E((0,f.y)({delta:e})).blocks}return{type:c.ze.rich_text_input,actionId:t,blockId:e,richTextValue:(0,i.A)(a)}},[t,e,E]),S=(0,n.useCallback)(()=>{a(v())},[v,a]),I=(0,n.useCallback)(()=>{let e=v();(0,u.$)(g)?a(e,!0):a(e,!1)},[v,g,a]),w=d??l,T=w?(0,_.nf)(w,0,{maxDepth:10}):w,N=E((0,f.f)({blocks:[T]})),M=w?{contents:N.ops}:null,R=b.t("Write something");return n.createElement(p.A,{forcePlainTextModeDisabled:!0,numMaxLines:8,enableEmojiButton:!0,enableComposerButton:!0},n.createElement(h.A,{windowRef:k,ariaLabel:"",ariaLabelledBy:A,completeOnMembers:!0,completeOnChannels:!0,completeOnEmoji:!0,forcePlainTextModeDisabled:!0,useWysiwyg:!0,ref:C,onEnter:S,onTextChange:I,initialText:M||void 0,placeholder:y?.text||R,focusOnMount:m,isDisabled:x,forceEnterCreatesNewline:!0,"data-qa":"block_kit_rich_text_input_element--input",disableSlugging:!0}))}RichTextInputElement.displayName="RichTextInputElement";let g=(0,m.A)(RichTextInputElement)},0x81d6854c:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5);let r=new(a(0x20482ad21)).Ay("block_kit"),__WEBPACK_DEFAULT_EXPORT__=()=>n.createElement("div",{"data-qa":"bk_block_error",className:"p-block_kit_unknown_block_error"},n.createElement("small",{className:"p-block_kit_error_message"},r.t("This content could not be displayed.")))},0x16c7d0bca:(e,t,a)=>{"use strict";a.d(t,{n:()=>getFirstTextContentFromBlocks});var n=a(0x1e2051844),r=a(0x585c90a8);function getFirstTextContentFromBlocks(e){return(0,n.A)(e,e=>(0,r.JA)(e)||(0,r.XR)(e)?!!e.text:!!(0,r.bZ)(e)&&!!e.elements?.length)}},0x8def90bc:(e,t,a)=>{"use strict";a.d(t,{s:()=>useBlockKitValidation});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x226892387),l=a(0x1936e1c6a);function useBlockKitValidation(e){let{view:t,setShowErrors:a,setBlockToFocusAfterValidation:o,windowId:s="main"}=e,c=(0,i.d4)(e=>(0,l.JW)(e,s)),d=!(0,r.A)(c?.errors),m=(0,n.useCallback)(()=>{if(d&&t){let e=t.blocks?.find(e=>c?.errors?.[e.block_id]);return a(!0),e&&o(e.block_id),!1}return!0},[d,t,c,a,o]);return{hasErrors:d,validateBeforeSubmit:m}}},0x40d8c576:(e,t,a)=>{"use strict";a.d(t,{l:()=>useIsValidImage});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1f3226107),l=a(0x2469fa4ab),o=a(0x1ec68d6a3),s=a(0x226892387);let c=(0,o.Wo)({label:"USE-IS-VALID-IMAGE"});function useIsValidImage(e){let t=(0,r.wA)(),[a,o]=(0,n.useState)(!0),d=(0,s.d4)(t=>(0,l.A)(t,e)),m=null;try{m=new URL(e).searchParams}catch{c.debug("Invalid URL",e)}let u=d&&null!==m&&!m.get("pub_secret");return(0,n.useEffect)(()=>{u&&t((0,i.PF)({fileId:d,reason:"message_attachment_image"})).then(e=>{["tombstone","not_found","access_denied"].includes(e.mode||"")?o(!1):o(!0)}).catch(()=>{o(!1)})},[t,d,u]),{isValidImage:!u||a}}},0x16a2f8123:(e,t,a)=>{"use strict";a.d(t,{t:()=>PreviewBlockText});var n=a(0xbad225b5),r=a(0x155d02b1c),i=a(0x6cc5eee0),l=a(0xcd092f8c),o=a(0x585c90a8),s=a(0x15a4ffb05);let PreviewBlockText=({blockToRender:e,prefix:t,truncateLength:a,maxNewlines:c=1,withFormattingStyles:d,withHighlights:m,withSlackLinks:u,withHyperlinks:p})=>{if((0,o.bZ)(e))return n.createElement(n.Fragment,null,t,t?" ":"",n.createElement(l.y,{richTextBlock:e,truncateLength:a,maxNewlines:c,withFormattingStyles:d,withHighlights:m,withSlackLinks:u,withHyperlinks:p}));if((0,o.JA)(e)||(0,o.XR)(e)){let l=e.text;return l?.type==="plain_text"&&l.emoji?n.createElement(n.Fragment,null,t,t?" ":"",n.createElement(s.A,{text:l.text,inputIsEscaped:!0})):l?.type==="mrkdwn"?n.createElement(n.Fragment,null,t,t?" ":"",n.createElement(i.A,{text:l.text,noHighlights:!m,noHexColors:!0,noJumbomoji:!0,noLinking:!u,noCode:!0,noQuotes:!0,customLineEnding:"\u2026",maxNewlines:c,maxCharacters:a,"data-qa":"simple_message_preview"})):n.createElement(n.Fragment,null,t,t?" ":"",(0,r.A)(l?.text))}return null};PreviewBlockText.displayName="PreviewBlockText"},0xd8d34930:(e,t,a)=>{"use strict";a.d(t,{Ao:()=>createUsersSelectElementWithInitialOption,Au:()=>createConversationsSelectElementWithInitialOption,CJ:()=>T,D:()=>I,GA:()=>createRichTextInputElement,GX:()=>v,Id:()=>_,Im:()=>p,KC:()=>createNumberInputElement,KH:()=>A,Oo:()=>createEmailTextInputElement,R4:()=>createCustomMrkdwnElement,Rp:()=>d,VH:()=>E,VN:()=>C,Y6:()=>y,YV:()=>createPlainTextInputElement,ZM:()=>createCustomImageElement,bT:()=>createPlainTextFields,bW:()=>c,bz:()=>createPlainTextInputElementWithCustomDispatch,fX:()=>k,g0:()=>h,h9:()=>f,hC:()=>m,iz:()=>w,jm:()=>createCustomPlainTextElement,ms:()=>g,sJ:()=>createChannelsSelectElementWithInitialOption,su:()=>createCustomButtonElement,t6:()=>S,tI:()=>createPlainTextInputElementOnEnter,tU:()=>createUrlTextInputElement,ul:()=>createDateTimePickerElement,uo:()=>createPasswordElement,v7:()=>b,vV:()=>u,wt:()=>x});var n=a(0x6258badf),r=a(0xb5e49867),i=a(0x20b4dda68);a(0x103b83ed);let createWithOmissions=e=>(t,a)=>(0,n.A)({...e,...a},t||[]),l=createWithOmissions({type:"mrkdwn",text:"*this is mrkdwn text*",parse:!1}),createCustomMrkdwnElement=(e,t)=>createWithOmissions({type:"mrkdwn",text:e})(t),o={type:"plain_text",text:"*this is plain_text text*",emoji:!0},s=createWithOmissions(o),createCustomPlainTextElement=(e,t)=>createWithOmissions({...o,text:e})(t),createOptionsArray=(e=5,t=0)=>(0,r.A)(0,e).map(e=>({text:createCustomPlainTextElement(`*plain_text option ${e}*`),value:`value-${t?`${t}-`:""}${e}`})),createPlainTextFields=(e=5)=>(0,r.A)(0,e).map(()=>s()),c=createWithOmissions({type:"button",text:createCustomPlainTextElement("Click Me"),value:"click_me_123"}),d=createWithOmissions({type:"button",text:createCustomPlainTextElement("Click Me"),value:"click_me_123",url:"https://google.com"}),createCustomButtonElement=(e,t)=>createWithOmissions({type:"button",text:createCustomPlainTextElement(e),value:"click_me_123"})(t),m=createWithOmissions({type:"overflow",options:createOptionsArray(5)}),u=createWithOmissions({type:"datepicker",initial_date:"1990-04-28",placeholder:createCustomPlainTextElement("Select a date")}),p=createWithOmissions({type:"timepicker",initial_time:"13:37",placeholder:createCustomPlainTextElement("Select time")}),h=createWithOmissions({type:"image",image_url:"https://pbs.twimg.com/profile_images/625633822235693056/lNGUneLX_400x400.jpg",alt_text:"cute cat"}),_=createWithOmissions({type:"image",slack_file:{url:"<insert slack file url here>"},alt_text:"alt text"}),createCustomImageElement=(e,t)=>createWithOmissions({type:"image",image_url:e,alt_text:"alt text for image"})(t),f=createWithOmissions({type:"channels_select",placeholder:createCustomPlainTextElement("Select a channel")}),createChannelsSelectElementWithInitialOption=(e,t)=>createWithOmissions({type:"channels_select",placeholder:createCustomPlainTextElement("Select a channel"),initial_channel:e})(t),b=createWithOmissions({type:"users_select",placeholder:createCustomPlainTextElement("Select a user")}),g=createWithOmissions({type:"multi_users_select",placeholder:createCustomPlainTextElement("Select users")}),y=createWithOmissions({type:"multi_channels_select",placeholder:createCustomPlainTextElement("Select channels")}),A=createWithOmissions({type:"multi_conversations_select",placeholder:createCustomPlainTextElement("Select conversations")}),x=createWithOmissions({type:"multi_static_select",placeholder:createCustomPlainTextElement("Select options"),options:createOptionsArray(3)}),E=createWithOmissions({type:"checkboxes",options:((e=5,t=0)=>(0,r.A)(0,e).map(e=>({text:s(),description:s(),value:`value-${e+t}`})))(3)}),C=createWithOmissions({type:"checkboxes",options:((e=5,t=0)=>(0,r.A)(0,e).map(e=>({text:l(["parse"]),description:l(["parse"]),value:`value-${e+t}`})))(3)}),createUsersSelectElementWithInitialOption=(e,t)=>createWithOmissions({type:"users_select",placeholder:createCustomPlainTextElement("Select a user"),initial_user:e})(t),k=createWithOmissions({type:"conversations_select",placeholder:createCustomPlainTextElement("Select a conversation")}),createConversationsSelectElementWithInitialOption=(e,t)=>createWithOmissions({type:"conversations_select",placeholder:createCustomPlainTextElement("Select a conversation"),initial_conversation:e})(t),v=createWithOmissions({type:"external_select",placeholder:createCustomPlainTextElement("Select a thingy"),initial_option:createOptionsArray(1)[0]});createWithOmissions({type:"multi_external_select",placeholder:createCustomPlainTextElement("Select a thingy")});let S=createWithOmissions({type:"static_select",placeholder:createCustomPlainTextElement("Select an item"),options:createOptionsArray(3)});createWithOmissions({type:"static_select",placeholder:createCustomPlainTextElement("Select an item"),options:((e=5,t=0)=>(0,r.A)(0,e).map(e=>{let a;return{text:createWithOmissions({type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:`*rich_text option ${e}*`}]}]})(a),value:`value-${t?`${t}-`:""}${e}`}}))(3)}),createWithOmissions({type:"static_select",placeholder:createCustomPlainTextElement("Select an item"),option_groups:((e=5,t=5)=>(0,r.A)(0,e).map(e=>({label:createCustomPlainTextElement(`*option group ${e}*`),options:createOptionsArray(t,e*t)})))(4,5)});let I=createWithOmissions({type:"radio_buttons",options:createOptionsArray(3)}),w=createWithOmissions({type:"checkboxes",options:createOptionsArray(3)}),createPlainTextInputElement=(e,t)=>createWithOmissions({type:"plain_text_input",...e})(t),createNumberInputElement=(e,t)=>createWithOmissions({type:"number_input",is_decimal_allowed:!1,...e})(t),createPasswordElement=(e,t)=>createWithOmissions({type:"password",...e})(t),createPlainTextInputElementOnEnter=(e,t)=>createWithOmissions({type:"plain_text_input",dispatch_action_config:{trigger_actions_on:["on_enter_pressed"]},...e})(t),createPlainTextInputElementWithCustomDispatch=(e,t)=>createWithOmissions({type:"plain_text_input",dispatch_action_config:{trigger_actions_on:["on_character_entered"]},...e})(t),T=createWithOmissions({type:"conversations_select",placeholder:createCustomPlainTextElement("Select private conversation"),filter:{include:["private"]}}),createRichTextInputElement=(e,t)=>createWithOmissions({type:"rich_text_input",...e})(t),createDateTimePickerElement=(e,t)=>createWithOmissions({type:"datetimepicker",...e})(t),createUrlTextInputElement=(e,t)=>createWithOmissions({type:"url_text_input",...e})(t),createEmailTextInputElement=(e,t)=>createWithOmissions({type:"email_text_input",...e})(t);i.ze.button,i.ze.overflow,i.ze.users_select,i.ze.multi_users_select,i.ze.conversations_select,i.ze.multi_conversations_select,i.ze.channels_select,i.ze.multi_channels_select,i.ze.external_select,i.ze.multi_external_select,i.ze.static_select,i.ze.multi_static_select,i.ze.datepicker,i.ze.timepicker,i.ze.plain_text_input,i.ze.number_input,i.ze.radio_buttons,i.ze.checkboxes,i.ze.password,i.ze.rich_text_input,i.ze.datetimepicker,i.ze.url_text_input,i.ze.email_text_input,i.ze.workflow_button,i.ze.file_input,i.ze.icon_button,i.ze.feedback_buttons},0x585c90a8:(e,t,a)=>{"use strict";function isSectionBlock(e){return"section"===e.type}function isHeaderBlock(e){return"header"===e.type}function isRichTextBlock(e){return"rich_text"===e.type}a.d(t,{JA:()=>isSectionBlock,XR:()=>isHeaderBlock,bZ:()=>isRichTextBlock})},0x1f75ad143:(e,t,a)=>{"use strict";a.d(t,{T:()=>blockStateMerge});var n=a(0x1db69cda),r=a(0x1a256ff50),i=a(0x1ec68d6a3);let blockStateMerge=(e,t)=>{let a=!1,l=(0,n.A)(e);try{Object.keys(t).forEach(n=>{e[n]?Object.keys(t[n]).forEach(e=>{(0,r.kt)(l[n][e],t[n][e])||(l[n][e]=t[n][e],a=!0)}):(l[n]=t[n],a=!0)})}catch(e){return(0,i.Wo)().error(Error(`Fatal error in block-kit-state-store/reducer. ${e}`)),l}return a?l:e}},0x179bf3aea:(e,t,a)=>{"use strict";a.d(t,{F:()=>formatElementStateData});let formatElementStateData=(e,t,a,n)=>({[t]:{[a??""]:{type:e,...n}}})},0x10b9bda60:(e,t,a)=>{"use strict";a.d(t,{S:()=>formatElementErrorData});let formatElementErrorData=({blockId:e,error:t})=>({[e]:t})},0x108430f6d:(e,t,a)=>{"use strict";a.d(t,{l:()=>getLoggingUUID});var n=a(0x3711e82d);let getLoggingUUID=(e,t={})=>{let{channelId:a=null,messageTs:r=null,updatedMessageTs:i=null,attachmentIndex:l=null,viewId:o=null,viewHash:s=null}=t,c=null;switch(e){case n.SurfaceType.MESSAGE:a&&(i||r)&&(c=`${a}_${i||r}`);break;case n.SurfaceType.MESSAGE_ATTACHMENT:a&&(i||r)&&(l||0===l)&&(c=`${a}_${i||r}_attachment${l}`);break;case n.SurfaceType.MODAL:case n.SurfaceType.HOME:o&&s&&(c=`${o}_${s}`);case n.SurfaceType.WORKFLOW_STEP:}return c}},0x18cffe646:(e,t,a)=>{"use strict";a.d(t,{u:()=>getContainerIdKey});var n=a(0x113cdbbd7);function getContainerIdKey({type:e,channelId:t,view_id:a,messageTs:r,attachmentId:i}){if(e){if(e===n.pi.view)return a;if(e===n.pi.message)return`${t}-${r}`;if(e===n.pi.message_attachment)return`${t}-${r}-${i}`;if(e===n.pi.block_kit_builder)return"BLOCK_KIT_BUILDER"}}},0x62fa095f:(e,t,a)=>{"use strict";a.d(t,{_:()=>getElementClientError});var n=a(0x21f3c49e8),r=a(0x77727995),i=a(0x20b4dda68),l=a(0x2469ec64e),o=a(0x20482ad21);let isValidUrl=e=>{try{return new URL(e),!0}catch{return!1}};var s=a(0x1e83c14d3);let c=new o.Ay("block_kit");var d=a(0x2120ded37);let m=new o.Ay("block_kit"),u=new o.Ay("block_kit");var p=a(0x1a3a5713f),h=a(0x113cdbbd7),_=a(0x2a3fb7ec);let getElementClientError=(e,{isRequired:t,minLength:a,maxLength:o,maxSelectedItems:f,type:b,minValue:g,maxValue:y})=>{let A=[i.ze.url_text_input,i.ze.email_text_input],x=null;if(t&&(0,n.A)(e))x=(0,p.$)(b);else if(a&&(0,r.A)(e,"value.length")<a)x=(0,l.r7)(a);else if(o&&(0,r.A)(e,"value.length")>o)x=(0,l.zI)(o);else if(f&&(0,_.X)(h.VY,b))((0,r.A)(e,"selected_options.length")||(0,r.A)(e,"selected_channels.length")||(0,r.A)(e,"selected_users.length")||(0,r.A)(e,"selected_conversations.length"))>f&&(x=(0,d.h)({maxSelectedItems:f,multiSelectType:b}));else if(g&&Number((0,r.A)(e,"value"))<Number(g))x=u.t("Number cannot be lower than {minValue}.",{minValue:g,fallbackHash:"51272ae7e3ed7bd39ad2259c774cfa7313fac53f",fallbackHashNs:"ui_validation"});else if(y&&Number((0,r.A)(e,"value"))>Number(y))x=m.t("Number cannot be greater than {maxValue}.",{maxValue:y,fallbackHash:"38ffdb9d55f4bdc8d8f27f0e445aba0e8612c946",fallbackHashNs:"app_dialog"});else!(0,n.A)(e)&&b in A&&(x??=(({value:e={},type:t})=>{let a=e.value||"";switch(t){case i.ze.url_text_input:return isValidUrl(a)||isValidUrl(`http://${a}`)?null:c.t("You must enter a valid URL",{fallbackHash:"3585bb6979e0490e012c1f0ea06b95541cbe4f1b",fallbackHashNs:"slack_functions"});case i.ze.email_text_input:return(0,s.B)(a)?null:c.t("You must enter a valid email address",{fallbackHash:"d2306dd8970ff616631a3501791297f31475e416",fallbackHashNs:"slack_functions"});default:return null}})({value:e,type:b}));return x}},0x10af3b48:(e,t,a)=>{"use strict";a.d(t,{O:()=>getElementInitialValue});var n=a(0x6258badf),r=a(0x20b4dda68);let getElementInitialValue=e=>{let t;switch(e.type){case r.ze.channels_select:t=e.initialChannel&&{selected_channel:e.initialChannel};break;case r.ze.multi_channels_select:t=e.initialChannels&&{selected_channels:e.initialChannels};break;case r.ze.users_select:t=e.initialUser&&{selected_user:e.initialUser};break;case r.ze.multi_users_select:t=e.initialUsers&&{selected_users:e.initialUsers};break;case r.ze.conversations_select:t=e.initialConversation&&{selected_conversation:e.initialConversation};break;case r.ze.multi_conversations_select:t=e.initialConversations&&{selected_conversations:e.initialConversations};break;case r.ze.static_select:case r.ze.external_select:case r.ze.radio_buttons:t=e.initialOption&&{selected_option:e.initialOption};break;case r.ze.multi_static_select:case r.ze.multi_external_select:case r.ze.checkboxes:t=e.initialOptions&&{selected_options:e.initialOptions};break;case r.ze.datepicker:t=e.initialDate&&{selected_date:e.initialDate};break;case r.ze.timepicker:(e.initialTime||e.timezone)&&(t={},e.initialTime&&(t.selected_time=e.initialTime),e.timezone&&(t.timezone=e.timezone));break;case r.ze.number_input:case r.ze.plain_text_input:case r.ze.url_text_input:t=e.initialValue&&{value:e.initialValue||""};break;case r.ze.rich_text_input:t=e.initialValue&&{rich_text_value:(0,n.A)(e.initialValue,["block_id","blockId"])};break;case r.ze.datetimepicker:t=e.initialDateTime&&{selected_date_time:e.initialDateTime}}return t}},0x2120ded37:(e,t,a)=>{"use strict";a.d(t,{h:()=>getMaximumSelectedErrorText});let n=new(a(0x20482ad21)).Ay("block_kit"),getMaximumSelectedErrorText=({multiSelectType:e,maxSelectedItems:t})=>{let a;switch(e){case"multi_conversations_select":a=n.t("You have selected too many conversations, you can only go up to {maxSelectedItems}.",{maxSelectedItems:t});break;case"multi_users_select":a=n.t("You have selected too many people, you can only go up to {maxSelectedItems}.",{maxSelectedItems:t});break;case"multi_channels_select":a=n.t("You have selected too many channels, you can only go up to {maxSelectedItems}.",{maxSelectedItems:t});break;default:a=n.t("You have selected too many items, you can only go up to {maxSelectedItems}.",{maxSelectedItems:t})}return a}},0x1a3a5713f:(e,t,a)=>{"use strict";a.d(t,{$:()=>getRequiredFieldErrorText});var n=a(0x20b4dda68);let r=new(a(0x20482ad21)).Ay("block_kit"),getRequiredFieldErrorText=e=>{switch(e){case n.ze.url_text_input:return r.t("A URL is required",{fallbackHash:"72a02245e09a6b3385c148f3739e65012d5894ac"});case n.ze.email_text_input:return r.t("An email address is required",{fallbackHash:"72a02245e09a6b3385c148f3739e65012d5894ac"});default:return r.t("Please complete this required field.")}}},0xd3ff14c1:(e,t,a)=>{"use strict";a.d(t,{r:()=>getSharePromptString});let getSharePromptString=e=>e?e.replace(/\+/g," "):""},0xf9f0d4cb:(e,t,a)=>{"use strict";a.d(t,{d:()=>isElementTypeStateful});var n=a(0x113cdbbd7),r=a(0x2a3fb7ec);let isElementTypeStateful=e=>(0,r.X)(n.JV,e)},0x1a917cc3b:(e,t,a)=>{"use strict";a.d(t,{n:()=>isFirstBlockRichText});var n=a(0xc4e87e00);let isFirstBlockRichText=e=>!!e&&0!==e.length&&e[0].type===n.Lv.RICH_TEXT},0x1e83c14d3:(e,t,a)=>{"use strict";a.d(t,{B:()=>isValidEmail});let isValidEmail=e=>RegExp("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)$").test(e)},0x18defa93:(e,t,a)=>{"use strict";a.d(t,{$:()=>shouldTriggerActionOnCharacterEntered});var n=a(0x20b4dda68);let shouldTriggerActionOnCharacterEntered=e=>!!e&&!!e.triggerActionsOn&&e.triggerActionsOn.includes(n.gE.on_character_entered)},0x748f8565:(e,t,a)=>{"use strict";a.d(t,{T:()=>shouldTriggerActionOnEnterPressed});var n=a(0x20b4dda68);let shouldTriggerActionOnEnterPressed=e=>!!e&&!!e.triggerActionsOn&&e.triggerActionsOn.includes(n.gE.on_enter_pressed)},0x170cf6ee1:(e,t,a)=>{"use strict";a.d(t,{T:()=>snakeCaseBlockState});var n=a(0x9509dfce);let snakeCaseBlockState=e=>{if(e)return Object.keys(e).reduce((t,a)=>(t[a]=Object.keys(e[a]).reduce((t,r)=>(t[r]=(0,n.nf)(e[a][r],0,{maxDepth:10}),t),{}),t),{})}},0x4ff5f593:(e,t,a)=>{"use strict";a.d(t,{A:()=>ef});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x543a781e),c=a(0x1f022ebd9),d=a(0x40c0d834),m=a(0x20482ad21),u=a(0x224f7f0e9),p=a(0x2b7f0bcc),h=a(0x11a296110),_=a(0x1d2cd7755),f=a(0x126f22530),b=a(0x1faa3f1ac),g=a(0x15dd8a31),y=a(0x2501a2cee),A=a(0xa089d16d),x=a(0x2391d509a);let E=a.p+"workflow-preview-2887376.svg";var C=a(0x13061d4ff),k=a.n(C);let v=new m.Ay("bookmark-workflow-redirect"),BookmarkWorkflowRedirectBanner=()=>n.createElement("div",{className:k().container},n.createElement("h3",null,v.t("Trying to bookmark a workflow?")),n.createElement("p",null,v.t("Workflows have their own channel tab for even easier access.")),n.createElement("img",{className:k().previewImg,src:E,alt:v.t("preview of workflows tab")}));BookmarkWorkflowRedirectBanner.displayName="BookmarkWorkflowRedirectBanner";var S=a(0xeeb01a46),I=a(0x881e2d5a),w=a(0x1b3ecb90f),T=a(0x1faaed399),N=a(0x74791de4),M=a(0xed563df0),R=a(0x1e19d7430),P=a(0x7dc98d62),L=a(0xc00d891a),O=a(0x11ed04fa0),D=a(0x8b60780c),F=a(0x21f8b9118),U=a(0x1c760ba43),B=a(0x1589eb96),H=a(0x109e484a8),W=a(0x1a02c72b5),V=a(0xd6a16321),G=a(0x20e80190e),q=a(0x22fb75fe3),j=a(0x3711e82d),z=a(0x6960d8b9),K=a(0x235ff1eab),$=a(0x4c69b9f6),Y=a(0x13a58e951),Q=a(0x1404672af),Z=a(0x20ef6d52a),J=a(0x7991a083),X=a(0xa3a6a13f),ee=a(0x226892387),et=a(0xe874a88a),ea=a(0x11c82607b),en=a(0x171ed3eca),er=a(0x1ade7239c);let ei=(0,ea.Ay)("Adds a bookmark to the channel specified",(e,t,a)=>{let{title:n,channelId:r,passedBookmarkToAddOnCreate:i}=a,l={title:n,channelId:r};return i?e((0,B.MW)(l)).then(t=>{if(!t.ok||!t.bookmark||!t.bookmark.id)return et.S.reject(Error(t.error||"Cannot add bookmark folder"));let a={channelId:r,parentId:t.bookmark.id,center:i.id,left:void 0,right:void 0,entityId:t.bookmark.entity_id,type:t.bookmark.type};return e((0,B.No)(a)).then(a=>{if(!a.ok)return et.S.reject(Error(t.error||"Cannot add bookmark into folder"));let n=(0,er.uN)(a.bookmark),r=(0,er.uN)(t.bookmark);return e((0,en.mK)(n)),e((0,en.KI)(r))})}):e((0,B.MW)(l)).then(t=>{if(!t.bookmark||!t.ok)return et.S.reject(Error(t.error||"Cannot add bookmark"));let a=(0,er.uN)(t.bookmark);return e((0,en.KI)(a))})});ei.meta={name:"addBookmarkFolderForChannel",key:"createThunkAddBookmarkFolderForChannel",description:"Adds a bookmark to the channel specified"};var el=a(0x18c9d2489);let eo=(0,ea.Ay)("Edits a bookmark to the channel specified",(e,t,a)=>e((0,B.h6)(a)).then(t=>{if(!t.bookmark||!t.ok)return et.S.reject(Error("Cannot edit bookmark"));let a=(0,er.uN)(t.bookmark);return e((0,en.mK)(a))}));eo.meta={name:"editBookmarkForChannel",key:"createThunkEditBookmarkForChannel",description:"Edits a bookmark to the channel specified"};var es=a(0x14149c126),ec=a(0x14ea3ce99),ed=a(0xe684f705),em=a(0x1fcbb004d);let eu=new m.Ay("bookmarks-bar");function getEditedTimestamp({timestamp:e}){let t=(0,z.Od)(e,{shortenMonth:!0});return eu.t(", {date} at {time}",{date:t,time:(0,z.Yq)(e,"{time}",{includeSeconds:!1})})}let ep="new_folder",eh="default_folder",e_=n.createElement(y.Ah,{name:"plus",size:"20"}),AddEditBookmarkModal=({channelId:e,parentId:t,suggestion:a,initialLink:i="",folderMode:m=!1,editFolderMode:E=!1,nameIsRequiredForBookmarkFolder:C=!1,editBookmark:k,defaultFolderName:v,onClose:z=o.A,onSave:et=o.A,modalHeaderTitle:ea,showSetFolder:en,fromChannelFolder:er=!1,navigateToNewFolder:ef=!0,clogUiPage:eb=j.UiPage.CHANNEL_TABS_CHANNEL_FOLDER})=>{let eg=(0,ee.d4)(e=>"on"===(0,es._Z)(e,"channel_tabs_polish")),ey=(0,ee.d4)(e=>"on"===(0,es._Z)(e,"ce_google_drive_support")),{showNativeChannelExpert:eA}=(0,I.q)(e),ex=m&&E,eE=m&&!E,eC=(0,R.u)(),[ek,ev]=(0,n.useState)(k?k.url:i),[eS,eI]=(0,n.useState)(null),[ew,eT]=(0,n.useState)(),[eN,eM]=(0,n.useState)(!!(k||a||m||en&&!eg)),eR=k?.title?k.title:"",[eP,eL]=(0,n.useState)(eE?v??"":eR),[eO,eD]=(0,n.useState)(!1),[eF,eU]=(0,n.useState)(!1),[eB,eH]=(0,n.useState)(""),[eW,eV]=(0,n.useState)(),[eG,eq]=(0,n.useState)(k||null),[ej,ez]=(0,n.useState)(k?.emoji?k.emoji:null),eK=(0,ee.d4)(O.U6),e$=(0,r.wA)(),eY=(0,n.useRef)(),[eQ,eZ]=(0,n.useState)(null),[eJ,eX]=(0,n.useState)(!1),e0=(0,ee.d4)(e=>eS?(0,ec.Lp)(e,eS):null),e1=!k&&!!eS,{folders:e2,isLoading:e4}=(0,L.L)({channelId:e}),{tab:e5,label:e3,folderIndex:e6}=(0,P.N)({channelId:e}),e8=(0,M.E)({channelId:e}),e7=(0,n.useCallback)(()=>{eA&&e$((0,J.z)({channelId:e}))},[e$,e,eA]),e9=eu.rt("Heads up \u2014 Channel Agent can\u2019t access Google Docs added to folders. If you want the agent to use this file, add it in the <link>agent\u2019s settings</link>, or link it from a message in channel.",null,({tag:e,text:t})=>"link"===e?n.createElement(b.A,{key:e,onClick:e7},t):t),te=(0,n.useMemo)(()=>!!ey&&!!eN&&!m&&!!(0,Q.X)(ek)&&eA,[ey,eN,m,ek,eA]),tt=(0,n.useMemo)(()=>eg?e5?eh:e2[0]?.id??"":"",[e5,eg,e2]),[ta,tn]=(0,n.useState)(tt),[tr,ti]=(0,n.useState)(!1),[tl,to]=(0,n.useState)(!1),ts=!m,tc=eg&&en&&(0===e2.length&&!e5||tl),[td,tm]=(0,n.useState)(tc?eu.t("Bookmarks"):""),tu=ta===ep||tr,tp=tu&&td.length||!tu&&ta.length||tc&&td.length,th=ta===eh,t_=eP.length>256,tf=ek.length>2049,tb=tc&&!tr,tg=(0,n.useMemo)(()=>{let e=e2.map(e=>({label:e.title,value:e.id}));if(e5&&e.splice(e6,0,{label:e3,value:eh}),e8){e.length>0&&e.push({value:"",label:"",type:"divider"});let t=n.createElement("div",{className:"display_flex gap_50 align_items_center"},e_,eu.t("New folder"));e.push({label:t,value:ep})}return e},[e8,e3,e5,e2,e6]),ty=!eJ&&(0,Y.C)(ek)&&eN&&eK;(0,n.useEffect)(()=>{eS&&e0?.title&&ek&&eL(e0?.title)},[eS,e0,ek]);let tA=(0,ee.d4)(e=>m?null:eG?.iconUrl?(0,K.Ay)(e,{url:eG.iconUrl}):null),tx=!a&&k?k:null,tE=(0,ee.d4)(e=>tx&&tx?.lastUpdatedByUserId?(0,ed.nv)(e,k?.lastUpdatedByUserId):null),tC=tx&&(tx?.dateUpdate||tx.dateCreate)?1e3*(tx?.dateUpdate||tx.dateCreate):null,tk=(0,n.useCallback)(()=>{e$((0,em.O)()),z()},[e$,z]),tv=(0,n.useCallback)(t=>{let a;if(eD(!1),t.name===H.t.TooManyBookmarks)a=eu.t("Channel and DM tabs can have up to 100 total folders, folder items, pins, or workflows. To add another, remove one of those items from the conversation\u2019s tabs or folders.");else if(ty&&"Cannot add already bookmarked workflow to bookmarks"===t.message){tk(),e$((0,W.o)((0,V.id)(e,{tabId:U.fY.Workflows})));return}else a=t.name===H.t.TooManyTabs?eu.t("Couldn\u2019t add new folder. The channel has the maximum number of tabs."):eu.rt("Sorry, that didn\u2019t save! If the problem persists, please <a>drop us a line</a>.",{},({text:e})=>n.createElement(b.A,{href:"https://slack.com/help/requests/new"},e));eV(t),eH(a)},[e,e$,tk,ty]),tS=(0,n.useCallback)(t=>{t.type===q.x.FOLDER&&t.id?e$((0,F.F)({folderId:t.id,channelId:e})):(t.type===q.x.LINK||t.type===q.x.FILE)&&(!t.parentId&&e5?e$((0,D.D)({tabId:e5.id,channelId:e})):t.parentId&&e$((0,F.F)({folderId:t.parentId,channelId:e})))},[e,e5,e$]),tI=(0,n.useCallback)(e=>{e&&(ef&&tS(e),et(e))},[tS,ef,et]),tw=(0,n.useCallback)(t=>{eD(!1),tk(),ty?e$((0,W.o)((0,V.id)(e,{tabId:U.fY.Workflows}))):ef&&t?.payload?tS(t?.payload):et(t?.payload)},[tk,ty,ef,e$,e,tS,et]),tT=(0,n.useMemo)(()=>er?j.EventId.CHANNEL_TABS_FOLDER_LINK_ADDED:m?j.EventId.CHANNEL_TABS_FOLDER_ADDED:void 0,[m,er]),tN=(0,n.useCallback)(t=>e$((0,Z.C)({url:t,channelId:e,eventId:tT})),[e,e$,tT]),tM=(0,n.useCallback)(e=>{e$(ei(e)).then(tw).catch(tv)},[e$,tv,tw]),tR=(0,n.useCallback)(async t=>{k&&k.id&&!a?e$(eo({...t,id:k.id})).then(tw).catch(tv):e1?e$((0,X.V)({channelId:e,parentId:t.parentId,fileId:eS,canvasSectionId:ew,onCloseCallback:tI,channelTab:eC})):e$(ty?(0,el.VV)(t):(0,el.eV)(t)).then(tw).catch(tv)},[tI,ew,e,eC,e$,k,eS,tv,tw,e1,ty,a]),tP=(0,s.A)(ek,350);(0,c.A)(()=>{if(!m&&(!k||!eG||eP!==k?.title||ek!==k.url)){let t;tP&&(t=(0,$.A)({input:tP,ignorePhoneMatches:!0,ignoreEmailMatches:!0,ignoreLinksWithoutHttp:!1}),eH(""),t&&t[0]&&t[0].url&&(eP||eU(!0),e$((0,B.Pt)({link:t[0].url,channelId:e,reason:"bookmarks-bar"})).then(a=>{var n;let r,i;return n=t[0].url,r=""!==eP?eP:"",i=(0,S.lJ)(a?.preview?.type)?q.x.SHORTCUT:q.x.LINK,void(!a?.preview&&(0,Y.C)(n)?eX(!0):eJ&&eX(!1),a?.ok&&a?.preview?.file_id&&a?.preview?.type==="file"?(eI(a.preview.file_id),eT(a.preview.quip_section_id)):a?.ok&&a?.preview?eq({url:n,title:r=a?.preview?.title||eP,channelId:e,iconUrl:a?.preview?.image_url||a?.preview?.icon_url,type:i,shortcutId:a?.preview?.shortcut_id}):eq({url:n,title:eP,channelId:e,type:i}),r&&eL(r),eU(!1),!eN&&eM(!0))}).catch(()=>{eM(!0),eU(!1)})))}},[tP]);let tL=(0,n.useCallback)(e=>{eY.current&&eZ(eY.current.selectionStart),eG&&(eG?.title===eP&&eL(""),ez(null),eq(null),eI(null)),eI(null),ev(e)},[eG,eP]);(0,n.useLayoutEffect)(()=>{eQ&&eY.current===document.activeElement&&(eY.current.selectionStart=eQ,eY.current.selectionEnd=eQ)});let tO=(0,n.useCallback)(()=>eO||eF?void 0:(eD(!0),tN(""),tM({title:eP,channelId:e,passedBookmarkToAddOnCreate:k})),[e,tM,tN,k,eO,eF,eP]),tD=(0,n.useCallback)(async()=>{let a;if(eO||eF)return;if(m&&!E)return tO();let n=(0,$.A)({input:ek,ignorePhoneMatches:!0,ignoreEmailMatches:!0,ignoreLinksWithoutHttp:!1});if(!(E||n&&n[0]&&n&&n[0].url))return void eH(eu.t("Sorry could not save link. Please check if the link is a valid url."));if(eD(!0),E||tN(n[0].url),a=E?{title:eP,channelId:e}:{url:n[0].url,title:eP||ek,channelId:e},eG&&!E&&(a={...eG,title:eP===eG.title?eG.title:eP}),eS&&(a={...a,title:eP===e0?.title?"":eP}),t&&(a.parentId=ty?null:t),a.emoji=ej||"",en)if(tu&&td||tc){let t;tc&&to(!0);try{t=await e$(ei({title:td,channelId:e}))}catch(e){return tv(e)}t?.payload?.id&&(a.parentId=t.payload.id)}else th?a.parentId="":a.parentId=ta;return tR(a)},[eO,eF,m,E,tO,ek,eG,eS,t,ej,en,tR,tN,eP,e,e0?.title,ty,tu,td,th,e$,tv,ta,tc]),onEmojiSelection=(e,t)=>{ez(`:${t}:`)},getPrimaryActionText=()=>ex?eu.t("Save"):m?eu.t("Create"):k&&!a?eu.t("Save"):eu.t("Add"),getBookmarkIcon=e=>{if((0,S.lJ)(eG?.type)&&eG)return n.createElement(x.A,{bookmark:eG,size:20,className:"position_absolute margin_50 cursor_pointer"});let t=n.createElement("span",{className:"p-bookmarks_bar_modal__input_section_title__container__image__icon"},n.createElement(y.Ah,{name:"link",inline:!0,size:"20"}));return(eG?.iconUrl&&tA&&(t=n.createElement(A.A,{src:tA,alt:eG?.title||tA,height:20,width:20,"data-qa":"bookmarks-bar-modal-favicon"})),ej&&(t=n.createElement(w.Ay,{text:ej,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:w.lw.MEDIUM,forceDisplay:!0})),m||e)?((m||e)&&(t=n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container__image__icon p-bookmarks_bar_modal__input_section_title__container__image__icon--folder"},n.createElement(y.Ah,{name:"folder",inline:!0,size:"20"}))),n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container__button"},n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container__image"},t))):n.createElement(T.A,{onEmojiSelected:onEmojiSelection},n.createElement(h.Nm,{className:"p-bookmarks_bar_modal__input_section_title__container__button"},n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container__image"},t,n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container__image__icon p-bookmarks_bar_modal__input_section_title__container__image__icon--chevron-down"},n.createElement(y.Ah,{name:"caret-down",inline:!0,size:"20"})))))};getBookmarkIcon.displayName="getBookmarkIcon";let tF=l()("p-bookmarks_bar_modal__input_section_title__container__input",{"p-bookmarks_bar_modal__input_section_title__container__input--with-emoji":!m&&!(0,S.lJ)(eG?.type)}),tU=ea||(ex?eu.t("Edit folder"):m?eu.t("Create a folder"):k&&!a?eu.t("Edit bookmark"):eK?eu.t("Add a bookmark"):eu.t("Add a bookmark to this channel")),tB=!m&&!ek.length||eO||eF||tf||t_||eJ||en&&(e4||!tp)||!eP.length&&C||eW?.name===H.t.TooManyBookmarks,tH=0===ek.length&&eg&&en,tW=(0,n.useCallback)(e=>{e.which===u.Fm&&(tB||tD(),e.preventDefault())},[tB,tD]);return n.createElement(d.A,{eventId:tT,uiComponentName:"bookmark_add_edit_modal",elementType:j.ElementType.MODAL,channelId:e,uiPage:eb},n.createElement(G.dW,{closeModal:tk,isOpen:!0,centered:!0,className:"p-bookmarks_bar_modal","aria-label":tU,dataQa:"add-edit-bookmark-modal"},n.createElement(G.rQ,null,n.createElement(G.Rc,{title:tU})),n.createElement(G.$m,null,n.createElement(G.qf,null,te&&n.createElement("div",{className:"margin_bottom_100"},n.createElement(p.Ay,{type:p.QE.boxed,level:p.A_.default,align:p.AO.left,"data-qa":"bookmarks_bar_info",icon:"info"},e9)),ts&&n.createElement(_.A,{text:eu.t("Link"),htmlFor:"bookmarks-bar-modal-add-link",id:"bookmarks-bar-modal-add-link",className:"p-bookmarks_bar_modal__input_section_link"},n.createElement(f.A,{"aria-label":eu.t("Enter url for link."),name:"bookmarks-bar-modal-add-link",id:"bookmarks-bar-modal-add-link","data-qa":"bookmarks-bar-modal-add-link-input",value:ek,icon:eF?"spinner":void 0,autoFocus:!0,placeholder:"https://docs.acme.com",onChange:tL,onKeyDown:tW,size:"medium",inputRef:eY,useInlineAlert:tf,showError:tf,errorText:tf?eu.t("Bookmark link can\u2019t be longer than 2049 characters."):void 0})),eJ&&n.createElement(p.Ay,{type:p.QE.boxed,level:p.A_.warning,align:p.AO.left,"data-qa":"bookmarks_bar_workflow_affordance",className:"p-bookmarks_bar_alert__affordance"},eJ&&eu.t("This workflow cannot be added.")),!eJ&&eN&&!e1&&!tH&&n.createElement(_.A,{text:eu.t("Name"),htmlFor:"bookmarks-bar-modal-add-title",id:"bookmarks-bar-modal-add-title",className:"p-bookmarks_bar_modal__input_section_title"},n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container"},getBookmarkIcon(),n.createElement("div",{className:tF},n.createElement(f.A,{name:"bookmarks-bar-modal-add-title",id:"bookmarks-bar-modal-add-title","data-qa":"bookmarks-bar-modal-add-title-input",isDisabled:eF||ty,value:eP||"",placeholder:eu.t("Ex. Project tracker"),onChange:eL,size:"medium",onKeyDown:tW,autoFocus:m,useInlineAlert:t_,showError:t_,isRequired:C,errorText:(()=>{if(t_)return m?eu.t("Folder name can\u2019t be longer than 257 characters."):eu.t("Link name can\u2019t be longer than 257 characters.")})()}))),!eE&&tx&&tE&&tE.real_name?n.createElement("p",{className:"p-bookmarks_bar_modal__input_section_title__hint c-hint"},eu.t("Last edited by "),n.createElement(N.A,{userId:tE.id,position:"bottom"},n.createElement(b.A,null," ",`${tE.real_name}`," ")),tC&&getEditedTimestamp({timestamp:tC})):null),en&&eN&&ts&&tg.length>0&&!tH&&!tc&&n.createElement(_.A,{className:"full_width",text:eu.t("Folder")},n.createElement(g.A,{selectDataQa:"add-edit-bookmark-folder-select",className:"p-bookmarks_bar_modal__basic_select",width:"100%",options:tg,onOptionSelected:({value:e})=>{tn(e)},selectedOption:ta.length?tg.find(e=>e.value===ta):void 0})),tu&&!tH&&n.createElement(_.A,{text:eu.t("Folder Name"),htmlFor:"bookmarks-bar-modal-folder",id:"bookmarks-bar-modal-folder",className:"p-bookmarks_bar_modal__input_section_title"},getBookmarkIcon(!0),n.createElement("div",{className:"p-bookmarks_bar_modal__input_section_title__container__input"},n.createElement(f.A,{"aria-label":eu.t("Enter folder name for link."),name:"bookmarks-bar-modal-folder-input",id:"bookmarks-bar-modal-folder-input","data-qa":"bookmarks-bar-modal-folder-input",value:td,placeholder:eu.t("Bookmarks"),onChange:tm,size:"medium",onKeyDown:tW}))),tb&&eN&&!tH&&n.createElement(p.Ay,{type:p.QE.boxed,level:p.A_.info,align:p.AO.left,"data-qa":"bookmarks_bar_no_folders_banner"},n.createElement("span",null,eu.rt("We\u2019ll add this link to a <strong>Bookmarks</strong> folder for safekeeping. ")),n.createElement(h.Nm,{onClick:()=>{ti(!0),tm("")},"data-qa":"edit-folder-name-link"},n.createElement("span",{className:"p-bookmarks_bar_modal__no_folders_banner_link"},eu.t("Edit folder name")))),eB&&n.createElement(p.Ay,{type:p.QE.boxed,level:p.A_.error,align:p.AO.left,"data-qa":"bookmarks_bar_error",className:`p-bookmarks_bar_modal__error ${eN?"p-bookmarks_bar_modal__error--expanded":""}`},eB),ty&&n.createElement(BookmarkWorkflowRedirectBanner,null))),eN?n.createElement(G.jl,null,n.createElement(G.ox,null,n.createElement(h.$n,{onClick:tk,type:"outline","data-qa":"bookmarks-bar-modal-cancel-button"},eu.t("Cancel")),ty?n.createElement(h.lV,{type:"primary",disabled:tB,loading:eO,"data-qa":"bookmarks-bar-modal-add-button",onClick:tD,"aria-label":eu.t("Add to Workflows Tab")},eu.t("Add to Workflows Tab")):n.createElement(h.lV,{onClick:tD,type:"primary",disabled:tB||ty,loading:eO&&!ty,"data-qa":"bookmarks-bar-modal-add-button","aria-label":getPrimaryActionText()},getPrimaryActionText()))):null))};AddEditBookmarkModal.displayName="AddEditBookmarkModal";let ef=AddEditBookmarkModal},0x1a3d24c8a:(e,t,a)=>{"use strict";a.d(t,{J:()=>AddFileModal,S:()=>e_});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x40c0d834),o=a(0x20482ad21),s=a(0x11a296110),c=a(0xce378727),d=a(0x19d27e99e),m=a(0xea23b7d3),u=a(0xe0376d2),p=a(0x1673f3229),h=a(0x12edaa96a),_=a(0xb1ea448c),f=a(0x131e0b1e1),b=a(0x1f6b8d4b1),g=a(0x814278bf),y=a(0x3e5c4009),A=a(0x1b0b4499b),x=a(0x8bc9cefa),E=a(0x16f6fe59),C=a(0x215d7c3f7),k=a(0x224811973),v=a(0xa1832ae4),S=a(0x1befa7c4),I=a(0x23e174be6),w=a(0x226892387),T=a(0x19c76d181),N=a(0x16f1f4c74),M=a(0x1a0b49dc0),R=a(0x1fa577313),P=a(0x4c79b03f),L=a(0xa4093304),O=a(0xb97f8a31),D=a(0x206e601f5),F=a(0x2bfcf5dd),U=a(0x164e27b8c),B=a(0x1d06e350e),H=a(0x1fb2d2a87),W=a(0x91e15f37),V=a(0x1950da728),G=a(0x1ee439e69),q=a(0xde662d04),j=a(0x691eb0d4);let z=new o.Ay("quip-files-browser"),K=[],useFileModalExplorer=({context:e})=>{let t=(0,r.wA)(),[a,i]=(0,n.useState)([]),l=(0,w.d4)(T.WR),o=(0,w.d4)(G.H7),s=(0,v.tc)(o),c=(0,w.d4)(W.iH),[d,m]=(0,n.useState)(void 0),$=(0,w.d4)(W.ek),Y=(0,f.A)(),Q=(0,w.d4)(H.to),Z=(0,w.d4)(k.y),J=(0,C.S1)(),X=(0,n.useRef)(e?.source==="unified_file_picker"?B.ej.UNIFIED_FILE_PICKER_ALL_FILES:(0,h.A)()),{handleSortSelect:ee,handleInfinitePagination:et,results:ea,pageCount:en,sort:er,isLoading:ei,metadata:el,isZeroState:eo,filters:es,totalCount:ec,page:ed}=(0,g.A)(X.current,B.ri.FILES,{isInfinitePagination:!0,sort:B.QX.LAST_ENGAGED,restrictions:e?.fileTypesAllowed?{fileTypesAllowed:e.fileTypesAllowed}:void 0}),em=(0,b.A)(er),eu=s||!$&&c||Y,ep=es?.notFrom?.includes(l)&&es?.onlyMyChannels===!0&&es?.with?.includes(l),eh=es?.from?.includes(l)&&!1===es.onlyMyChannels,e_=(0,n.useCallback)(()=>n.createElement("div",{className:"p-quip_files_page"},n.createElement(_.A,{size:"jumbo",floating:!0})),[]),ef=(0,n.useCallback)(({value:e})=>{"all_files_filter"===e?t((0,R.q)({browserInstanceId:X.current})):"shared_with_you_files_filter"===e?t((0,D.d)({browserInstanceId:X.current,filters:{from:[],notFrom:[l],onlyMyChannels:!0,with:[l]},sort:er})):"created_by_you_files_filter"===e&&t((0,D.d)({browserInstanceId:X.current,filters:{from:[l],notFrom:[],onlyMyChannels:!1,with:[]},sort:er}))},[t,l,er]),eb=(0,n.useMemo)(()=>ep?"shared_with_you_files_filter":eh?"created_by_you_files_filter":"all_files_filter",[eh,ep]),eg=(0,n.useCallback)(({fileType:e})=>{t((0,L.B)({browserInstanceId:X.current,fileType:e}))},[t]),ey=(0,n.useCallback)(({fileType:e})=>{t((0,O._)({browserInstanceId:X.current,filter:"fileType",value:e}))},[t]),eA=(0,n.useCallback)(()=>{i((0,u.A)([...a,V.hv.FILE_TYPE]))},[a]),ex=(0,n.useCallback)(()=>{i((0,p.A)(a,V.hv.FILE_TYPE))},[a]),eE=(0,n.useCallback)(()=>{let e="",{fileType:t}=es;return e=t?.length&&t.length>1?n.createElement(n.Fragment,null,n.createElement(E.A,null,z.t("{count} file types",{count:t.length,fallbackHash:"a0f0df2f6989724d3ff5b8fc68ccff62c508079f",fallbackHashNs:"search"})),n.createElement(y.A,{isOpen:a.includes(V.hv.FILE_TYPE)})):t?.length!==1||t?.includes("")?n.createElement(n.Fragment,null,n.createElement(E.A,null,z.t("File type",{fallbackHash:"12bbddcaf33dbddee20309245040d6aae4996967",fallbackHashNs:"files"})),n.createElement(y.A,{isOpen:a.includes(V.hv.FILE_TYPE)})):n.createElement(n.Fragment,null,n.createElement(E.A,null,J[t[0]]),n.createElement(y.A,{isOpen:a.includes(V.hv.FILE_TYPE)})),n.createElement(A.A,{className:"p-search_filter__block_item p-search_filter__block_item--noTruncation p-search_filter__block_item--withCaret margin_right_100",id:V.hv.FILE_TYPE,tabIndex:0},e)},[J,es,a]),eC=(0,n.useCallback)(()=>{er===B.QX.RELEVANT&&t((0,U.I)({browserInstanceId:X.current,value:B.QX.LAST_ENGAGED})),t((0,P.Q)({browserInstanceId:X.current}))},[er,t]),ek=(0,n.useCallback)(({selectedIndex:e,suggestions:a,userQuery:n})=>{n?null===e||a[e].is_type_query_completion&&(t((0,F.o)({browserInstanceId:X.current,value:n})),t((0,N.d1)({browserInstanceId:X.current,value:B.QX.RELEVANT})),t((0,M.d)({browserInstanceId:X.current}))):eC()},[t,eC]),ev=(0,n.useMemo)(()=>({allowEmptyQuery:!0,tiered:!0,entities:{files:{onlyCanvases:!1,excludeTemplateCanvases:!1,excludeChannelCanvases:!0}},limit:30,returnMetadata:!0,sort:{frecency:!0,model:(0,I.I)(),preferExactMatch:!0},searchViewContext:"autocomplete:file-picker-modal",filter:e?.resultsFilter}),[e.resultsFilter]);return(0,n.useCallback)(()=>{let t=[],a=[{label:z.t("All files",{fallbackHash:"f7857dcc71d3ce6a9095d1fbca5acb8cc9319005",fallbackHashNs:"files"}),value:"all_files_filter"},{label:z.t("Shared with you"),value:"shared_with_you_files_filter"},{label:z.t("Created by you"),value:"created_by_you_files_filter"}],r=[{label:z.t("Recently viewed"),value:B.QX.LAST_ENGAGED},{label:z.t("Last updated"),value:B.QX.NEWEST}],i=[{label:z.t("Most relevant",{ns:"browsers"}),value:B.QX.RELEVANT},{label:z.t("Recently viewed"),value:B.QX.RECENTLY_VIEWED},{label:z.t("Last updated"),value:B.QX.NEWEST}];return t.push({key:"controls",type:S.MA.Controls,data:{customFilterUi:n.createElement(x.A,{renderTrigger:eE,onFileTypeToggle:eg,onFileTypeChange:ey,fileTypes:es.fileType||K,onOpen:eA,onClose:ex,hasCanvasAccess:Z,experimentSlabPrototypeGroupOn:!0,fileTypesAllowed:e.fileTypesAllowed}),selects:[{id:"filter",title:z.t("Filter"),value:eb,onChange:ef,type:S.jc.SELECT,options:a},{id:"sort",title:z.t("Sort"),value:er,onChange:ee,options:eo?r:i,position:"right"}]},role:S.N3.Presentation}),ei&&ed<2&&t.push({key:"list-loading",type:S.MA.ListLoading,role:S.N3.Presentation,scrollToTop:!0}),ea.length&&ea.forEach((a,n)=>{let{detailType:r,fromOrganization:i}=em(a),l=el?.[a],o=l?.mimetype;(!e?.resultsFilter||e.resultsFilter({mimetype:o}))&&t.push({key:a,type:S.MA.CanvasResult,data:{fileId:a,isFirst:0===n,isLast:n===ea.length-1,filePropertyOverride:l?{title:l.title,name:l.name,iid:l.iid}:void 0,detailType:r,notificationCount:0,fromOrganization:i,showCanvasModalMetadata:!0,isActiveItem:d===a},onListItemSelect:()=>{m(a)},autoClogProps:{elementIndex:n,elementName:"file_result"},role:S.N3.ListItem})}),ei||ec||!eo||s||(eu?t.push({key:"canvas-free-team-full-page-nux",type:S.MA.CanvasFreeTeamFullPageNux,data:{isTeamOnTrial:c,renderLoadingSpinner:e_},role:S.N3.Presentation}):t.push({key:"zero-empty",type:S.MA.EmptyState,data:{title:z.t("Get your team on the same page. Literally."),description:z.t("Store and share the information that keeps your team moving, from meeting notes to project briefs."),imageUrl:"dark"===Q?q:j},role:S.N3.Presentation})),ei||ec||eo||t.push({key:"zero-empty",type:S.MA.EmptyState,data:{title:z.t("No results"),description:z.t("You may want to try adjusting your filters.")},role:S.N3.Presentation}),en>1&&t.push({key:"pagination",type:S.MA.InfinitePagination,data:{isLoading:ei,onLoadMore:et},role:S.N3.Presentation}),{rows:t,onSearch:ek,onResetSearch:eC,searcherOptions:ev,isZeroState:eo}},[Q,eb,es.fileType,em,ef,et,ex,eA,ee,Z,s,ei,c,eo,el,ey,eg,eC,ek,ed,en,e_,eE,ea,ev,d,eu,er,ec,e])};useFileModalExplorer.displayName="useFileModalExplorer";var $=a(0x245ab5a06),Y=a(0x84a5226c),Q=a(0x1e3c7661),Z=a(0x1a02c72b5),J=a(0xd6a16321),X=a(0x70de3606),ee=a(0x167d76333),et=a(0x20e80190e),ea=a(0x3711e82d),en=a(0x24558b75f),er=a(0xa985ed31),ei=a(0xb60a1b),el=a(0x1cdfe2b),eo=a(0x41a56f6d),es=a(0xa3a6a13f),ec=a(0x185059e6b),ed=a(0x1d774a049),em=a(0x11e302e7a),eu=a(0x2d1c8f66),ep=a(0x1fcbb004d);let eh=new o.Ay("tabbed-channel"),e_={File:"file",Canvas:"canvas",List:"list"};function AddFileModal({channelId:e,parentId:t,fileType:a=e_.File,onFileAdded:o,channelTab:u,clogUiPage:p=ea.UiPage.CHANNEL_TABS_CHANNEL_FOLDER,isStackable:h=!1,disableNewFileCreation:_=!1,fileTypesAllowed:f,resultsFilter:b}){let[g,y]=(0,n.useState)(void 0),[A,x]=(0,n.useState)(!1),E=(0,w.d4)(e=>(0,v.tc)((0,G.H7)(e))),C=(0,w.d4)(ee.F)&&!E,k=(0,w.d4)(X.Il),S=(0,en.M2)(),I=(0,$.A)({context:Q.SP.ListPicker}),T=useFileModalExplorer({context:{fileTypesAllowed:f,resultsFilter:b}}),N=(0,r.wA)(),M=(0,n.useCallback)(()=>N((0,ep.O)()),[N]),R=(0,n.useCallback)((n,r)=>{x(!0),N((0,es.V)({channelId:e,parentId:t,fileId:n,onCloseCallback:(e,t)=>{n&&r&&(a===e_.Canvas?S?N((0,ec.S)({fileId:n,source:ed.f.CHANNEL_FOLDER})):N((0,Z.o)((0,J.mo)({id:n}))):a===e_.List&&N((0,eu.N)({listFileId:n,navigateInCurrentContext:!1,forceOpenInChildWindow:S,source:ei.B.CHANNEL_FOLDER}))),e?(o?.(n,!r||S,e),t&&M()):x(!1)},channelTab:u,isStackable:h}))},[N,e,t,u,h,o,a,S,M]),P=(0,n.useCallback)(e=>{g&&R(g)},[R,g]),L=(0,n.useCallback)(({item:e,itemSource:t})=>{(0,er.A)(e)&&("search"===t?R(e):y(e))},[R]),O=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,n.createElement(Y.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),[...Array(18)].map((e,t)=>n.createElement(Y.A,{key:t,className:"p-explorer_result--list"})),n.createElement(Y.A,{className:"p-explorer_result--list p-explorer_result--list--last"})),[]),D=(0,n.useMemo)(()=>({elementName:a,onClick:{enableClogAction:!0}}),[a]),F=(0,n.useMemo)(()=>({uiStep:a===e_.Canvas?ea.UiStep.CHANNEL_FOLDER_ADD_NEW_CANVAS:ea.UiStep.CHANNEL_FOLDER_ADD_NEW_LIST,elementName:a,onClick:{enableClogAction:!0}}),[a]),U=(0,n.useCallback)(async()=>{x(!0);let e=new Promise((e,t)=>{N((0,el.A)({onCreate:e,source:eo.P.CHANNEL_FOLDER})).catch(t)}),t=await e;t?.fileId?R(t.fileId,!0):x(!1)},[N,R]),B=(0,n.useCallback)(async()=>{x(!0);let e=new Promise((e,t)=>{N((0,em.D)({navigateAfterCreate:!1,reason:"create-list-from-channel-folder",onCreate:e})).catch(t)}),t=await e;t?R(t,!0):x(!1)},[N,R]),H={[e_.File]:{title:eh.t("Add File"),explorer:T,placeholder:eh.t("Search for files"),ariaLabel:eh.t("File results"),supportNew:!1,newHandler:i.A,newLabel:"",newClogValues:{}},[e_.Canvas]:{title:eh.t("Add Canvas"),explorer:m.A,placeholder:eh.t("Search for canvases"),ariaLabel:eh.t("Canvas results"),supportNew:a===e_.Canvas&&C&&!_,newHandler:U,newLabel:eh.t("Create New Canvas"),newClogValues:F},[e_.List]:{title:eh.t("Add List"),explorer:I,placeholder:eh.t("Search for lists"),ariaLabel:eh.t("List results"),supportNew:a===e_.List&&k&&!_,newHandler:B,newLabel:eh.t("Create New List"),newClogValues:F}};return n.createElement(l.A,{eventId:ea.EventId.CHANNEL_TABS_FOLDER_FILE_ADDED,uiComponentName:"add_file_modal",elementType:ea.ElementType.MODAL,clogImpression:!0,elementName:a,uiPage:p},n.createElement(et.aF,{isOpen:!0,centered:!0,"aria-label":H[a].ariaLabel,className:"p-canvas_picker__modal",maxWidth:720},n.createElement(et.rQ,{className:"p-canvas_picker__header"},n.createElement(et.Rc,{title:H[a].title})),n.createElement(et.$m,{className:"p-canvas_picker__content"},n.createElement(d.A,{useExplorer:H[a].explorer,listLoadingFragment:O,inputId:V.Jx.CHANNEL_FILES_EXPLORER,inputSearchyMode:V.R5.FILES,inputPlaceholderText:H[a].placeholder,resultListAriaLabel:H[a].ariaLabel,clogUiPage:p,onItemSelected:L,inputPreventUpstreamSync:!0})),n.createElement(et.jl,{className:"p-canvas_picker__footer"},n.createElement(et.ox,null,H[a].supportNew&&n.createElement(c.A,{autoClogProps:H[a].newClogValues,type:"outline",loading:A,onClick:H[a].newHandler,"aria-label":H[a].newLabel},H[a].newLabel),n.createElement(s.$n,{onClick:M,type:"outline"},eh.t("Cancel")),n.createElement(c.A,{type:"primary",onClick:P,disabled:!g,loading:A,"aria-label":H[a].ariaLabel,autoClogProps:D},H[a].title)))))}AddFileModal.displayName="AddFileModal"},0x2391d509a:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x23619f41c),i=a(0x1a769a9e8),l=a(0x1ec220982),o=a(0x226892387),s=a(0x5dd1c0f2),c=a(0x22f6a086f);let BookmarkIconWorkflow=({bookmark:e,size:t=36,className:a})=>{let{appId:d,iconUrl:m,shortcutId:u}=e||{},p=(0,o.d4)(s.Mu),h=(0,o.d4)(e=>{if(u&&(0,l.A)(u)){let a=(0,c.bn)(e,{triggerId:u},!0);if(a.workflow?.app){let e=(0,i.A)(a.workflow?.app,t,p);if(e!==p)return e}}if(d){let a=(0,s.sO)(e,d);if(a){let e=(0,i.A)(a,t,p);if(e!==p)return e}}return m||p});return n.createElement(r.A,{ariaHidden:!0,classes:a,image:h,size:t})};BookmarkIconWorkflow.displayName="BookmarkIconWorkflow";let d=BookmarkIconWorkflow},0xdc14ba2b:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x14fad6485),s=a(0x21a39e2e1),c=a(0x20482ad21),d=a(0x11a296110),m=a(0x15f8e452a),u=a(0x6aeae8a3),p=a(0x1b00b5901),h=a(0x106d9c7ac),_=a(0x2173e1832),f=a(0x170aecff4);let b=new c.Ay("channel_details"),g=(0,n.forwardRef)(({channelId:e,popoverProps:t},a)=>{let r=b.t("Pinned items");return n.createElement(h.Ay,{...t,shouldPropagateOnClose:!0,ariaRole:"dialog",ariaLabel:r,shouldFade:!1,zIndex:_.m.Modal,ref:a},n.createElement(f.A,{channelId:e,closePopover:t?.onClose,absolutePositioned:!0,isInsidePopover:!0}))});var y=a(0x1ec69ee01),A=a(0x226892387),x=a(0x217553e42),E=a(0x16e90fe6d);let C=new c.Ay("bookmarks-bar"),k=(0,n.forwardRef)(({channelId:e,onPinsClose:t=l.A,canAddBookmarks:a,className:r},c)=>{let h=(0,n.useRef)(null),_=(0,n.useRef)(null),{windowRef:f}=(0,n.useContext)(o._0),b=(0,A.d4)(t=>(0,x.OL)(t,e)),k=(0,y.qT)(b),v=(0,n.useCallback)(()=>{let e=f.deref(),t=e?.innerWidth||e?.document.documentElement.clientWidth||e?.document.body.clientWidth||0,a=h?.current?.getBoundingClientRect(),n=a?.left||0,r=n+p.xN+16>t?t-p.xN-16:n;return{top:a?.top||0,left:r,right:a?.right||0,bottom:a?.bottom||0,height:a?.height||0,width:a?.width||0}},[f]),S=C.t("{pinnedItemsCount} Pinned",{pinnedItemsCount:k||0}),I=(0,n.useCallback)(t=>n.createElement(g,{channelId:e,popoverProps:{...t,targetBounds:v()},ref:_}),[e,v]),w=(0,n.useCallback)(()=>{(0,E.$)(_.current)},[]),T=(0,n.useCallback)(()=>{t(),(0,E.$)(null)},[t]);return(k||!a)&&k?n.createElement("div",{className:"p-bookmarks_bar__pins_popover_button_wrapper","data-qa":"bookmarks_bar__pins_popover_button_wrapper"},n.createElement(u.Wv,{position:"bottom-left",renderPopover:I,onOpen:w,onClose:T},n.createElement(d.Nm,{ref:c?(0,s.A)(c,h):h,className:i()("p-bookmarks_bar__pins_popover_button",r),"aria-label":C.t("Show Pinned")},n.createElement(m.A,{type:"pin-filled",inline:!0,size:"inherit",className:"p-bookmarks_bar__pins_popover_button__icon"}),n.createElement("span",{className:"p-bookmarks_bar__pins_popover_button__label"},S)))):null})},0x23dbf181a:(e,t,a)=>{"use strict";a.d(t,{A:()=>e8});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x7fa3cc8f),c=a(0x2286acf6c),d=a(0x202470d56),m=a(0x2bba3a0),u=a(0x106809bc6),p=a(0x9e38a344),h=a(0xc6a2c86f),_=a(0x40c0d834),f=a(0x20482ad21),b=a(0x224f7f0e9),g=a(0x14abc22b0),y=a(0x11a296110),A=a(0xbe505324),x=a(0x4ff5f593),E=a(0x1cbdfeceb),C=a(0x344bb842),k=a(0x15f8e452a),v=a(0x99233ecb),S=a(0x133aaa7da),I=a(0x2501a2cee),w=a(0x4c96e5d9),T=a(0x12185e091),N=a(0x226892387),M=a(0x217553e42),R=a(0x46dbff89);let P=new f.Ay("bookmarks-bar"),BookmarkAddButton=({isLoading:e,hasBookmarks:t,channelId:a,onClose:n=E.A,canAddBookmarks:l,inCanvasPreview:s,hideTitle:c=!1,useIconButton:d=!1,icon:m})=>{let u=(0,i.wA)(),p=(0,N.d4)(e=>(0,M.OL)(e,a)),h=o()("p-bookmarks_bar__add_bookmark_button",{"p-bookmarks_bar__add_bookmark_button--loading":e,"p-bookmarks_bar__add_bookmark_button--add_new":!t}),_=o()("p-bookmarks_bar__add_bookmark_button__icon",{"p-bookmarks_bar__add_bookmark_button__icon--add_new":!t}),f=(0,r.useCallback)(()=>{n()},[n]),b=(0,r.useCallback)(()=>{},[]),g=(0,r.useCallback)(()=>{u((0,R.q)({element:r.createElement(x.A,{channelId:a,onClose:n})}))},[u,a,n]),A=(0,r.useCallback)(()=>{u((0,R.q)({element:r.createElement(x.A,{folderMode:!0,channelId:a,onClose:n})}))},[u,a,n]),L=(0,r.useMemo)(()=>{let e=P.t("Add a bookmark to this channel");return(0,T.JM)(p)&&(e=P.t("Add a bookmark to this conversation")),{label:e,description:P.t("Easily find your team\u2019s important links"),key:"Add",icon:r.createElement(I.Ah,{name:"link",inline:!0,size:"inherit"}),click:g,dataQa:"bookmarks_bar_add_item_menu",className:"p-bookmarks_bar__add_bookmark_button__add_new_bookmark"}},[g,p]),O=(0,r.useMemo)(()=>l?{label:P.t("Create a folder"),description:P.t("Organize your bookmarks"),key:"folder",icon:r.createElement(I.Ah,{name:"folder",inline:!0,size:"inherit"}),click:A,dataQa:"bookmarks_bar_add_item_menu_folder",className:"p-bookmarks_bar__add_bookmark_button__add_new_bookmark"}:null,[l,A]),D=(0,r.useMemo)(()=>({type:S.A.separator}),[]),F=(0,r.useMemo)(()=>[L,O,D],[L,O,D]),U=(0,r.useCallback)(e=>r.createElement(v.a,{menuClassNames:"p-bookmarks_bar__add_bookmark_menu",noMargin:!0,...e,template:F}),[F]),B=P.t("Add a bookmark"),H=r.createElement(y.Nm,{className:h,"data-qa":t?"bookmarks_bar_add_more_bookmarks":"bookmarks_bar_add_first_bookmark","aria-label":B},r.createElement(k.A,{className:_,inline:!0,size:"inherit",type:m||"plus-small"}),c||t&&!s?null:B);return(d&&(H=r.createElement(C.A,{svgIconProps:{name:"plus"},"data-qa":t?"bookmarks_bar_add_more_bookmarks":"bookmarks_bar_add_first_bookmark","aria-label":B},c||t&&!s?null:B)),l)?r.createElement("div",null,r.createElement(v.cQ,{onPopoverOpen:b,onPopoverClose:f,renderMenu:U,position:"bottom-left"},r.createElement(w.Ay,{tip:B,position:"top"},H))):null};BookmarkAddButton.displayName="BookmarkAddButton";var L=a(0x112d5d28c),O=a(0x22fb75fe3),D=a(0x1ed767a16),F=a(0x3711e82d),U=a(0x1ec220982),B=a(0x1426c029f),H=a(0x7db59a01);let W=new f.Ay("bookmarks-bar"),getBookmarkContextMenuItems=({bookmark:e,canAddBookmarks:t,channelId:a,dispatch:n,onClose:i=E.A})=>{let l={type:S.A.separator},o={key:"Add",click:t=>{t.preventDefault(),n((0,R.q)({element:r.createElement(x.A,{channelId:a,parentId:e?.type===O.x.FOLDER?e?.id:void 0,onClose:i})}))},className:"p-bookmarks_bar__collapsed_bookmarks__add_bookmarks_option",children:r.createElement("div",{className:"p-bookmarks_bar__folder_bookmarks_button__bookmark_pin_option"},r.createElement("div",{className:"p-bookmarks_bar__folder_bookmarks_button__bookmark_pin_option__add_icon"},r.createElement(k.A,{type:"plus-small"})),r.createElement("div",{className:"p-bookmarks_bar__folder_bookmarks_button__bookmark_pin_option__add_title"},W.t("Add a bookmark"))),dataQa:"bookmarks_bar_add_item_menu_overflow_menu"},s={label:W.t("Add a bookmark"),dataQa:"bookmarks-bar-context-menu-add-bookmark",className:"p-bookmarks_bar__bookmark_context_menu_item",click:e=>{e.preventDefault(),n((0,R.q)({element:r.createElement(x.A,{channelId:a,onClose:i})}))}},c={label:W.t("Copy link"),dataQa:"bookmarks-bar-copy-bookmark",className:"p-bookmarks_bar__bookmark_context_menu_item",click:t=>{t.preventDefault(),e&&(0,D.x3)(e.url),i()}},d={label:W.t("Delete"),dataQa:"bookmarks-bar-delete-bookmark",isDisabled:!t,className:"p-bookmarks_bar__bookmark_context_menu_item",click:t=>{t.preventDefault(),e&&n((0,R.q)({element:r.createElement(L.A,{bookmark:e,onClose:i,channelId:a})}))}},m={bookmarkId:e?.id||"",channelId:a,location:"bookmark"},u={triggerId:e?.shortcutId||"",url:e?.url||""},p={eventId:F.EventId.WORKFLOW_VIEW_DETAILS_CLICK,uiComponentName:F.UiComponentName.BOOKMARK_BAR,workflowTriggerId:e?.shortcutId||(0,H.F)(e?.url||""),entryPoint:"bookmark",onClick:{enableClogAction:!0}},h={label:W.t("View details",{fallbackHash:"badd385121c5861ac693b59ad8c160fdf7994344",fallbackHashNs:"file"}),dataQa:"bookmarks-bar-view-details-bookmark",className:"p-bookmarks_bar__bookmark_context_menu_item",autoClogProps:p,click:t=>{if(t.preventDefault(),e?.shortcutId&&e.type===O.x.SHORTCUT){let{shortcutId:t,url:a}=e;(0,U.A)(t)&&a&&n((0,B.u)({shortcutInfo:u,hermesLinkTriggerUIContext:m}))}}},_={label:W.t("Edit"),dataQa:"bookmarks-bar-edit-bookmark",className:"p-bookmarks_bar__bookmark_context_menu_item",click:t=>{t.preventDefault(),n((0,R.q)({element:r.createElement(x.A,{editBookmark:e,channelId:a,onClose:i})}))}},f={key:"create-bookmark-folder-overflow-menu",click:t=>{t.preventDefault(),n((0,R.q)({element:r.createElement(x.A,{folderMode:!0,editBookmark:e,channelId:a,onClose:i})}))},className:"p-bookmarks_bar__collapsed_bookmarks__add_bookmarks_option",children:r.createElement("div",{className:"p-bookmarks_bar__folder_bookmarks_button__bookmark_pin_option"},r.createElement("div",{className:"p-bookmarks_bar__folder_bookmarks_button__bookmark_pin_option__add_icon"},r.createElement(k.A,{type:"folder",size:"inherit"})),r.createElement("div",{className:"p-bookmarks_bar__folder_bookmarks_button__bookmark_pin_option__add_title"},W.t("Create a folder"))),dataQa:"bookmarks_bar_add_folder_overflow_menu_item"};return{separator:l,addBookmark:o,addBookmarkVanilla:s,copyBookmark:c,deleteBookmark:d,editBookmark:_,createBookmarkFolder:{label:W.t("Create a folder"),dataQa:"bookmarks-bar-create-bookmark-folder",className:"p-bookmarks_bar__bookmark_context_menu_item",click:t=>{t.preventDefault(),n((0,R.q)({element:r.createElement(x.A,{folderMode:!0,editBookmark:e,channelId:a,onClose:i})}))}},createBookmarkFolderOverflowMenu:f,editBookmarkFolder:{label:W.t("Edit"),dataQa:"bookmarks-bar-edit-bookmark",className:"p-bookmarks_bar__bookmark_context_menu_item",click:t=>{t.preventDefault(),n((0,R.q)({element:r.createElement(x.A,{folderMode:!0,editFolderMode:!0,editBookmark:e,channelId:a,onClose:i})}))}},viewBookmarkDetails:h}};getBookmarkContextMenuItems.displayName="getBookmarkContextMenuItems";var V=a(0x1faa3f1ac),G=a(0xdc14ba2b),q=a(0x1ec69ee01),j=a(0x1c91944c9);let z=new f.Ay("bookmarks-bar"),BookmarkErrorState=({onRetry:e,onPinsClose:t=E.A,pinnedItemsCount:a,channelId:n,canAddBookmarks:i})=>{let l=a&&a>0,s=o()("p-bookmarks_bar__retry",{"p-bookmarks_bar__retry--no-pins":!l});return r.createElement(r.Fragment,null,l?r.createElement(G.A,{channelId:n,onPinsClose:t,canAddBookmarks:i}):null,r.createElement("div",{className:s},r.createElement("span",{className:"p-bookmarks_bar__retry__title"},z.t("Unable to load links.")),r.createElement("div",{className:"p-bookmarks_bar__retry__link"},r.createElement(V.A,{onClick:e,"data-qa":"bookmarks-bar-error-retry"},z.t("Try again")))))};BookmarkErrorState.displayName="BookmarkErrorState";let K=(0,j.N)((e,{channelId:t})=>{let a=(0,M.OL)(e,t);return{pinnedItemsCount:(0,q.qT)(a)}})(BookmarkErrorState),BookmarkLoadingIcon=()=>r.createElement("div",{"data-qa":"bookmarks_bar_placeholder",className:"p-bookmarks_bar__placeholder_holder"},r.createElement("div",{className:"p-bookmarks_bar__placeholder_holder--text"}),r.createElement("div",{className:"p-bookmarks_bar__placeholder_holder--text"}),r.createElement("div",{className:"p-bookmarks_bar__placeholder_holder--text"}));BookmarkLoadingIcon.displayName="BookmarkLoadingIcon";var $=a(0xc26f5c40),Y=a(0x6258badf),Q=a(0x1b81e2549),Z=a(0xbe5e39b6),J=a(0x21a39e2e1),X=a(0x1bbd404d7),ee=a(0x12c020c3),et=a(0xbe0b63ff),ea=a(0x339b339c),en=a(0x110330473),er=a(0xbd3de346),ei=a(0xa985ed31),el=a(0x14ea3ce99),eo=a(0x2291c5d37);let es=new f.Ay("bookmarks-bar"),BookmarkFileTitle=({bookmark:e,wrapText:t})=>{let{entityId:a,title:n}=e,i=(0,N.d4)(e=>(0,ei.A)(a)?(0,el.Lp)(e,a):null),l=(0,er.aK)(i),s=(0,et.mX)(i),c=(0,N.d4)(e=>(0,ei.A)(a)&&!n?(0,eo.X)(e,a,!0):null);if(s)return r.createElement(ea.A,{size:"medium"});let d=r.createElement("span",null,n);return l?d=r.createElement("span",null,es.t("Deleted canvas")):!n&&c?d=r.createElement(en.Ay,{id:a}):!n&&(0,er.l7)(i)&&(d=r.createElement(r.Fragment,null,i.title)),r.createElement("div",{className:o()("p-bookmarks_bar__file_title",{"p-bookmarks_bar__file_title--wrap-text":t})},d)};BookmarkFileTitle.displayName="BookmarkFileTitle";var ec=a(0x209559510),ed=a(0xeeb01a46),em=a(0x155d0b7eb),eu=a(0x170aecff4),ep=a(0x20e80190e),eh=a(0x1fcbb004d);let e_=new f.Ay("channel_details");var ef=((n=ef||{})[n.DISMISS=0]="DISMISS",n[n.PINNED_ITEM_CLICK=1]="PINNED_ITEM_CLICK",n);let PinnedItemsModal=({channelId:e})=>{let t=(0,i.wA)(),a=(0,r.useRef)(0),n=(0,r.useCallback)(()=>0===a.current,[a]),l=(0,r.useCallback)(()=>{a.current=1,t((0,eh.O)())},[t]);return r.createElement(ep.aF,{maxWidth:400,shouldReturnFocusAfterClose:n},r.createElement(ep.rQ,null,r.createElement(ep.Rc,{title:e_.t("Pinned items")})),r.createElement(ep.$m,null,r.createElement(eu.A,{channelId:e,isInsideModal:!0,closePopover:l})))};PinnedItemsModal.displayName="PinnedItemsModal";var eb=a(0x1589eb96),eg=a(0x233157fdc),ey=a(0x1ade7239c);let eA=new f.Ay("bookmarks-bar"),BookmarkFolder=({index:e,bookmark:t,bookmarkWrapper:a,bookmarks:n,bookmarksInFolder:l,channelId:s,onClose:c,canAddBookmarks:d,pinnedItemsCount:m,currentlyDraggingBookmark:u,isThisBookmarkDragging:h,setIsFolderBeingHovered:_,handleReorderBookmarkAndSync:f,onKeyDown:b,grabbedBookmark:g,inOverflowMenu:y,children:A,readOnly:x=!1,enableDragInQuipContext:E=!1})=>{let C=(0,i.wA)(),[k,I]=(0,r.useState)(!1),w=u&&u.id&&n[u.id]?.type===O.x.FOLDER,[{isHoveredOnReorderPositionBefore:T},N]=(0,p.H)(()=>({accept:em.CQ.BOOKMARK,collect:e=>e.isOver()?(_(!1),{isHoveredOnReorderPositionBefore:!0}):{isHoveredOnReorderPositionBefore:!1}}),[_]),[{isHoveredOnReorderPositionAfter:M},P]=(0,p.H)(()=>({accept:em.CQ.BOOKMARK,collect:e=>e.isOver()?(_(!1),{isHoveredOnReorderPositionAfter:!0}):{isHoveredOnReorderPositionAfter:!1}}),[_]),[{isHoveredOn:L},D]=(0,p.H)(()=>({accept:em.CQ.BOOKMARK,drop:e=>{let a=n[e.id];if(a&&a.type!==O.x.FOLDER){_(!0),C((0,eg.mK)({...a,parentId:t.id}));let e=l&&l?.length>0?l[l.length-1].id:void 0,n={channelId:s,parentId:t.id,center:a.id,left:e,right:void 0};C((0,eb.No)(n)).then(e=>{if(!e.ok)return;let t=(0,ey.uN)(e.bookmark);C((0,eg.mK)(t))})}},collect:e=>e.isOver()?{isHoveredOn:!0}:{isHoveredOn:!1}}),[t.id,n,l,s,C,_]);(0,r.useEffect)(()=>{!w&&!h&&(L?!L||M&&T?(M||T)&&(I(!1),_(!1)):(_(!0),I(!0)):I(!1))},[L,w,_,h,T,M]);let U=o()("p-bookmarks_bar__folder_bookmarks",{"p-bookmarks_bar__folder_bookmarks_button":k,"p-bookmarks_bar__folder_bookmarks_button--hovering":k}),renderCollapsedMenu=n=>{let{addBookmark:i,separator:o}=getBookmarkContextMenuItems({bookmark:t,canAddBookmarks:d,channelId:s,dispatch:C,onClose:c}),u={key:"No bookmarks description",type:S.A.custom,children:r.createElement("p",{className:"c-menu_item__description p-bookmarks_bar__add_bookmark_button__menu_description"},eA.t("No bookmarks in folder"))};if(!l||0===l.length)return r.createElement(v.a,{...n,template:x||!d?[u]:[u,o,i],kbNavActive:!g});let p=l&&l.map((t,i)=>{let l={key:t.id,autoClogProps:{elementName:"bookmark_bar",elementType:F.ElementType.LINK,eventId:F.EventId.BOOKMARK_LINK_CLICKED,uiComponentVariant:"foldered",uiComponentName:t.type,onClick:{enableClogAction:!0}},children:r.createElement("div",{key:t.id,className:`p-bookmarks_bar__folder_bookmarks_button__bookmark ${g?"p-bookmarks_bar__folder_bookmarks_button__bookmark--grabbed":""}`},r.createElement(a,{inOverflowMenu:!0,enableDragInQuipContext:E,closeOverflowMenu:n.onTriggerClose,onClose:c,index:e+(i+1)/1e3,isLoading:!1,handleReorderBookmarkAndSync:f,canAddBookmarks:d,isLastBookmark:!1,bookmark:t,channelId:s,onKeyDown:b,isGrabbed:!!g&&g.id===t.id})),dataQa:"bookmarks_bar_collapsed_item"};if(g?(l.type=S.A.custom,l.ariaHidden=!1):(l.click=e=>{e?.key!=="Enter"&&e.defaultPrevented||((0,ed.lJ)(t.type)||(0,ed.L2)(t.type)?(e.stopPropagation(),C((0,ed.S$)({bookmark:t,channelId:s}))):C((0,ec.m)({e,bookmark:t})))},l.className="p-bookmarks_bar__folder_bookmarks_button__item"),t.type===O.x.PINNED_MESSAGE){if(!m)return null;l.type=S.A.default,l.click=()=>{C((0,R.q)({element:r.createElement(PinnedItemsModal,{channelId:s})}))}}return(0,ed.VV)(t)&&(l.disabled=!0),l}).filter(Boolean);return!x&&d&&(p=p.concat([o,i])),r.createElement(v.a,{...n,template:p,kbNavActive:!g})};renderCollapsedMenu.displayName="renderCollapsedMenu";let B=y||E?"p-bookmarks_bar__bookmark__folder_wrapper_horizontal_drop_target":"p-bookmarks_bar__bookmark__folder_wrapper_drop_target",H=y||E?"p-bookmarks_bar__bookmark__folder_wrapper_overflow":"p-bookmarks_bar__bookmark__folder_wrapper";return r.createElement("div",{className:H},r.createElement("div",{ref:N,className:B}),r.createElement("div",{className:U,ref:D},r.createElement(v.cQ,{renderMenu:renderCollapsedMenu,position:"bottom-right",className:"p-bookmarks_bar__collapsed_menu",onPopoverClose:c,overlayClassName:u?"p-bookmarks_bar__popover-overlay":void 0,shouldCloseOnOverlayMouseDown:!0},A)),r.createElement("div",{ref:P,className:o()(B,{"p-bookmarks_bar__bookmark__folder_wrapper_drop_target--after":!0})}))};BookmarkFolder.displayName="BookmarkFolder";let ex=(0,j.N)((e,{channelId:t})=>({bookmarks:(0,eg.M4)(e,{channelId:t})}))(BookmarkFolder);var eE=a(0x23619f41c),eC=a(0x1a769a9e8),ek=a(0x5dd1c0f2),ev=a(0x8d57b507);let BookmarkIconLegacyWorkflow=({workflow:e,bookmark:t,size:a=36,className:n})=>{let i=(0,N.d4)(e=>(0,ev.aL)(e,t?.appActionId)),{app:l,appId:o}=e||i||{},s=(0,N.d4)(ek.Mu),c=(0,N.d4)(e=>{if(l)return(0,eC.A)(l,a,s);if(o){let t=(0,ek.sO)(e,o);return(0,eC.A)(t,a,s)}return s});return r.createElement(eE.A,{ariaHidden:!0,classes:n,image:c,size:a})};BookmarkIconLegacyWorkflow.displayName="BookmarkIconLegacyWorkflow";var eS=a(0x2391d509a),eI=a(0x1b3ecb90f),ew=a(0x1c6fca489),eT=a(0x235ff1eab);let BookmarkIcon=({bookmark:e,iconType:t,proxiedImageUrl:a,displayVertical:n=!1})=>{let i=o()("p-bookmarks_bar__bookmark__img_icon",{"p-bookmarks_bar__bookmark__img_icon--no-pad":!n&&!e.title&&(e.type===O.x.FILE||e.type===O.x.CHANNEL_CANVAS||e.type===O.x.FILES)}),l=o()("p-bookmarks_bar__bookmark__icon",{"p-bookmarks_bar__bookmark__icon--no-pad":!n&&!e.title&&e.type!==O.x.FILE&&e.type!==O.x.CHANNEL_CANVAS&&e.type!==O.x.FILES,"p-bookmarks_bar__bookmark__icon--svg":!n&&(e.type===O.x.FILE||e.type===O.x.CHANNEL_CANVAS||e.type===O.x.FILES),"p-bookmarks_bar__bookmark__icon--svg-inherit":e.type===O.x.CHANNEL_CANVAS||e.type===O.x.FILES}),s=(0,r.useCallback)(t=>{if(e.emoji)return r.createElement(eI.Ay,{className:i,text:e.emoji,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:eI.lw.SMALL,forceDisplay:!0});if(a)return r.createElement("img",{className:i,src:a,alt:e.title});let n=(0,ew.Rw)(e.url)?"lists":"canvas-content";return r.createElement("span",{className:l},r.createElement(I.Ah,{inline:!0,size:t||"16",name:n}))},[i,a,e,l]);return e.type===O.x.FOLDER?r.createElement(k.A,{className:l,inline:!0,size:"inherit",type:t||"folder"}):e.type===O.x.FILE?s():(0,ed.lJ)(e.type)?r.createElement(eS.A,{bookmark:e,size:13,className:l}):(0,ed.L2)(e.type)?r.createElement(BookmarkIconLegacyWorkflow,{bookmark:e,size:13,className:l}):e.emoji?r.createElement(eI.Ay,{className:i,text:e.emoji,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:eI.lw.SMALL,forceDisplay:!0}):e.iconUrl&&a?r.createElement("img",{className:i,src:a,alt:e.title}):r.createElement(k.A,{className:l,inline:!0,size:"inherit",type:t||"link"})};BookmarkIcon.displayName="BookmarkIcon";let eN=(0,j.N)((e,{bookmark:t})=>({proxiedImageUrl:t.iconUrl?(0,eT.Ay)(e,{url:t.iconUrl}):null}))(BookmarkIcon),eM=new f.Ay("bookmarks-bar");function BookmarkPinnedMessagesSubmenuItem({canAddBookmarks:e,pinnedItemsCount:t,className:a,forwardRef:n}){let i=(0,r.useRef)(null);if(!t&&e)return null;let l=eM.t("{pinnedItemsCount} Pinned",{pinnedItemsCount:t,fallbackHash:"f3215c8be53ff011a4cd8fbcb54120defa5c288c",fallbackHashNs:"bookmarks-bar"});return r.createElement("div",{className:"p-bookmarks_bar__pins_popover_button_wrapper","data-qa":"bookmarks_bar__pins_popover_button_wrapper"},r.createElement("div",{ref:n?(0,J.A)(n,i):i,className:o()("p-bookmarks_bar__pins_popover_button p-bookmarks_bar__pins_popover_button__overflow",a)},r.createElement(k.A,{type:"pin-filled",inline:!0,size:"inherit",className:"p-bookmarks_bar__pins_popover_button__icon"}),r.createElement("span",{className:"p-bookmarks_bar__pins_popover_button__label"},l)))}BookmarkPinnedMessagesSubmenuItem.displayName="BookmarkPinnedMessagesSubmenuItem";let eR=(0,j.N)((e,{channelId:t})=>{let a=(0,M.OL)(e,t);return{pinnedItemsCount:(0,q.qT)(a)}})(BookmarkPinnedMessagesSubmenuItem),eP=r.forwardRef((e,t)=>r.createElement(eR,{...e,forwardRef:t})),bookmark_tooltip=({bookmark:e,displayVertical:t=!1})=>r.createElement("div",{className:"p-bookmarks_bar__bookmark__tooltip"},e.type===O.x.FILE?r.createElement("div",null,r.createElement(BookmarkFileTitle,{bookmark:e,wrapText:!0})):r.createElement(r.Fragment,null,r.createElement("div",null,(0,ed.m4)(e,t)),r.createElement("div",{className:"c-tooltip__subtitle"},e.url)));var eL=a(0x2301c802e),eO=a(0x11253e6a6),eD=a(0x24558b75f),eF=a(0x13a58e951),eU=a(0x1fa458710),eB=a(0x1d774a049),eH=a(0x17cc44ffa),eW=a(0x2d1c8f66);let BookmarkWrapper=({bookmark:e,isLoading:t,index:a,refToForward:n=null,inOverflowMenu:l=!1,closeOverflowMenu:s=E.A,channelId:c,onClose:d=E.A,bookmarksInFolder:m,lastBookmarkRef:u=null,isLastBookmark:h,canAddBookmarks:f,setLastBookmark:b=X.Q,handleReorderBookmarkAndSync:g=X.Q,onKeyDown:A,isGrabbed:x,grabbedBookmark:C,readOnly:v=!1,displayVertical:S=!1,enableDragInQuipContext:I=!1,pinnedItemsCount:T,...M})=>{let R=(0,i.wA)(),P=(0,r.useRef)(null),[L,D]=(0,r.useState)(!1),[U,B]=(0,r.useState)(!1),H=(0,r.useCallback)(()=>{U||(B(!0),setTimeout(()=>{B(!1)},1e3))},[U]),{embeddedUiData:W}=(0,r.useContext)(eL.N),V=(0,N.d4)(t=>(0,ev.aL)(t,e.appActionId)),q=(0,r.useRef)(),j=(0,r.useCallback)(e=>{q.current=e},[q]),z=(0,r.useMemo)(()=>{let t=e.parentId?"foldered":"top-level";return{elementName:"bookmark_bar",elementType:F.ElementType.LINK,eventId:F.EventId.BOOKMARK_LINK_CLICKED,uiComponentVariant:t,uiComponentName:e.type,onClick:{enableClogAction:!0}}},[e]);(0,r.useLayoutEffect)(()=>{h&&b(e)},[h,e,b]);let[{isThisBookmarkDragging:K},et]=(0,Q.i)(()=>({type:em.CQ.BOOKMARK,item:()=>({type:em.CQ.BOOKMARK,id:e.id,index:a}),canDrag:f,collect:e=>({isThisBookmarkDragging:f&&e.isDragging()})}),[e,f,a]),[{isHoveredOn:ea,currentlyDraggingBookmark:en},er]=(0,p.H)(()=>({accept:em.CQ.BOOKMARK,drop:t=>{if(L)return;let n={type:em.CQ.BOOKMARK,id:e.id,index:a};n.index!==t.index&&g(n,t)},collect:e=>{let t=e.getItem();return e.isOver()?{isHoveredOn:!0,currentlyDraggingBookmark:t}:{isHoveredOn:!1,currentlyDraggingBookmark:t}}}),[e,g,a,L]),ei=(0,r.useCallback)(e=>{A(e)},[A]);(0,r.useEffect)(()=>{x&&P&&P.current?.focus()},[x,P]),(0,r.useLayoutEffect)(()=>{I&&P.current?.toggleAttribute($.EmbeddedUIAttributes.NO_DRAG_ON_MOUSE_MOVE,!!W)},[x,e,P,I,W,K]);let getContextMenuTemplate=()=>{let{addBookmark:t,separator:a,copyBookmark:n,deleteBookmark:r,editBookmark:i,createBookmarkFolder:l,editBookmarkFolder:o,viewBookmarkDetails:s}=getBookmarkContextMenuItems({bookmark:e,canAddBookmarks:f,channelId:c,dispatch:R,onClose:d});if(e.type===O.x.FOLDER)return f?[o,r,a,t]:[];if((0,ed.lJ)(e.type))return f?[i,s,r]:[];if((0,ed.L2)(e.type))return f?[r]:[];if(e.type===O.x.FILE)return[n,i,r];let m=[];return f?(m=[i,r,n],e.type===O.x.PINNED_MESSAGE||e.parentId||(m=m.concat([a,l]))):m=[n],m},el=ea&&!L&&en,eo=!S&&!l&&el&&en?.index<a,es=!S&&!l&&el&&en?.index>=a,eu=(S||l)&&el&&en?.index>=a,ep=(S||l)&&el&&en?.index<a,eh=x||K,e_=o()("p-bookmarks_bar__bookmark",{"p-bookmarks_bar__bookmark--loading":t,"p-bookmarks_bar__bookmark--dragging":K,"p-bookmarks_bar__bookmark--dropping_on_left":es,"p-bookmarks_bar__bookmark--dropping_on_right":eo,"p-bookmarks_bar__bookmark--dropping_on_bottom":ep,"p-bookmarks_bar__bookmark--dropping_on_top":eu,"p-bookmarks_bar__bookmark--disabled":(0,ed.VV)(e)}),ef=o()("",{"p-bookmarks_bar__bookmark_dropping":f&&en}),eb=o()("p-bookmarks_bar__bookmark__title","p-bookmarks_bar__bookmark__ellipses",{"p-bookmarks_bar__bookmark__title--file":e.type===O.x.FILE,"p-bookmarks_bar__bookmark__max-width":!l}),eg=(0,ed.m4)(e,S);l&&e.type!==O.x.FOLDER&&!eg&&(eg=e.url),(0,ed.L2)(e.type)&&V?.name&&!eg&&(eg=V?.name);let ey=e.type===O.x.FOLDER&&l,eA=eh||ey?r.Fragment:w.Ay,eE=eh||ey?{tip:""}:{tip:()=>r.createElement(bookmark_tooltip,{bookmark:e,displayVertical:S}),delay:w.PK,position:l||I?Z.yX.Left:Z.yX.Bottom},eC={"aria-label":e.title||e.url};eh?eC["aria-pressed"]=!0:eC["aria-describedby"]="bookmark-reorder-description";let pinnedMessageBookmark=()=>r.createElement("div",{ref:f?er:null},l?r.createElement(eP,{channelId:c,canAddBookmarks:f,className:e_,ref:et}):r.createElement(G.A,{channelId:c,onPinsClose:d,canAddBookmarks:f,className:e_,ref:et}));pinnedMessageBookmark.displayName="pinnedMessageBookmark";let bookmarkFolder=()=>r.createElement(eO.A,{key:e.id,getTemplate:getContextMenuTemplate,desktopAppOnly:!1,width:"150px",onClose:d,showSlackKitContextMenuOnDesktop:!0},t=>r.createElement(eA,eE,r.createElement("div",{ref:f?er:null},r.createElement(ex,{index:a,bookmarkWrapper:BookmarkWrapper,bookmarksInFolder:m,channelId:c,onClose:d,canAddBookmarks:f,bookmark:e,setIsFolderBeingHovered:D,handleReorderBookmarkAndSync:g,onKeyDown:A,currentlyDraggingBookmark:en,isThisBookmarkDragging:K,grabbedBookmark:C,inOverflowMenu:l,readOnly:v,enableDragInQuipContext:I,pinnedItemsCount:T},r.createElement(y.Nm,{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,onKeyDown:ei,autoClogProps:z,ref:(0,J.A)(t.ref,et,P),"data-qa":"bookmark_wrapper_item_button"},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},eg),!l&&r.createElement(k.A,{type:"chevron-down",className:"p-bookmarks_bar__bookmark__folder_carat"}))))));bookmarkFolder.displayName="bookmarkFolder";let regularBookmark=()=>{let clickHandler=t=>{t.preventDefault();let{url:a,id:n}=e;(0,eF.C)(a)?R((0,eH.L)({linkTriggerUrl:a,hermesLinkTriggerUIContext:{location:"bookmark",bookmarkId:n,channelId:c},reason:"trip-trigger-from-bookmarks-bar-click"})):R((0,ec.m)({e:t,bookmark:e}))};return r.createElement(eO.A,{key:e.id,getTemplate:getContextMenuTemplate,desktopAppOnly:!1,width:"150px",onClose:d,showSlackKitContextMenuOnDesktop:!0},t=>r.createElement(eA,eE,r.createElement("div",{ref:f?er:null},l&&!x?r.createElement("div",{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,ref:(0,J.A)(t.ref,et)},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},eg)):r.createElement(y.Nm,{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,onClick:clickHandler,onKeyDown:ei,autoClogProps:z,ref:(0,J.A)(t.ref,et,P),"data-qa":"bookmark_wrapper_item_button"},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},eg)))))};regularBookmark.displayName="regularBookmark";let fileBookmark=()=>r.createElement(eO.A,{key:e.id,getTemplate:getContextMenuTemplate,desktopAppOnly:!1,width:"150px",onClose:d,showSlackKitContextMenuOnDesktop:!0},t=>r.createElement(eA,eE,r.createElement("div",{ref:f?er:null},l&&!x?r.createElement("div",{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,ref:(0,J.A)(t.ref,et)},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},r.createElement(BookmarkFileTitle,{bookmark:e}))):r.createElement(y.Nm,{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,onClick:t=>{(0,ew.Rw)(e.url)?R((0,eW.N)({listFileId:e.entityId})):R((0,eU.A)({fileId:e.entityId,forceNewWindow:(0,eD.Cz)(t),sectionId:(0,ee.qN)(e.url)?.focus_section_id,source:eB.f.BOOKMARK_BAR}))},onKeyDown:ei,autoClogProps:z,ref:(0,J.A)(t.ref,et,P),"data-qa":"bookmark_wrapper_item_button"},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},r.createElement(BookmarkFileTitle,{bookmark:e}))))));fileBookmark.displayName="fileBookmark";let shortcutBookmark=()=>{let clickHandler=t=>{t.preventDefault(),H(),q.current?.({eventId:F.EventId.WORKFLOW_START_CLICK,uiComponentName:F.UiComponentName.BOOKMARK_BAR,uiPage:"bookmark",entryPoint:"bookmark",workflowTriggerId:e.shortcutId,appId:e.appId,channelId:c}),R((0,ed.S$)({bookmark:e,channelId:c}))};return r.createElement(eO.A,{key:e.id,getTemplate:getContextMenuTemplate,desktopAppOnly:!1,width:"150px",onClose:d,showSlackKitContextMenuOnDesktop:!0},t=>r.createElement("div",{ref:f?er:null},l&&!x?r.createElement("div",{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,ref:(0,J.A)(t.ref,et),onClick:clickHandler},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},eg)):r.createElement(y.Nm,{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,onClick:clickHandler,onKeyDown:ei,autoClogProps:z,ref:(0,J.A)(t.ref,et,P),"data-qa":"bookmark_wrapper_item_button"},r.createElement(eN,{bookmark:e,displayVertical:S}),r.createElement("span",{className:eb,title:eg},eg))))};shortcutBookmark.displayName="shortcutBookmark";let legacyWorkflowBookmark=()=>{let clickHandler=t=>{t.preventDefault(),(0,ed.VV)(e)||(t.stopPropagation(),q.current?.({eventId:F.EventId.APP_SHORTCUTS,elementName:"bookmark_bar",elementType:F.ElementType.LINK,appId:e.appId}),R((0,ed.S$)({bookmark:e,channelId:c})))};return r.createElement(eO.A,{key:e.id,getTemplate:getContextMenuTemplate,desktopAppOnly:!1,width:"150px",onClose:d,showSlackKitContextMenuOnDesktop:!0},t=>r.createElement("div",{ref:f?er:null},l&&!x?r.createElement("div",{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,ref:(0,J.A)(t.ref,et),onClick:clickHandler},r.createElement(eN,{bookmark:e}),r.createElement("span",{className:eb,title:eg},eg)):r.createElement(y.Nm,{...(0,Y.A)(M,"dispatch"),...(0,Y.A)(t,"dispatch"),...(0,Y.A)(eC,"dispatch"),id:e.id,className:e_,onClick:clickHandler,onKeyDown:ei,autoClogProps:z,ref:(0,J.A)(t.ref,et,P),"data-qa":"bookmark_wrapper_item_button"},r.createElement(eN,{bookmark:e}),r.createElement("span",{className:eb,title:eg},eg))))};return legacyWorkflowBookmark.displayName="legacyWorkflowBookmark",r.createElement("div",{ref:u,className:ef},r.createElement(_.A,{trackClogRef:j},e.type===O.x.PINNED_MESSAGE?pinnedMessageBookmark():e.type===O.x.FOLDER?bookmarkFolder():e.type===O.x.FILE?fileBookmark():(0,ed.lJ)(e.type)?shortcutBookmark():(0,ed.L2)(e.type)?legacyWorkflowBookmark():regularBookmark()))};BookmarkWrapper.displayName="BookmarkWrapper";let eV=new f.Ay("bookmarks-bar"),BookmarkOverflowButton=({isLoading:e,allBookmarks:t,bookmarksToHide:a,channelId:n,onClose:l=E.A,canAddBookmarks:s,pinnedItemsCount:c,numberOfBookmarksShown:d,handleReorderBookmarkAndSync:m,onKeyDown:u,grabbedBookmark:h,forceOpen:_})=>{let f=(0,i.wA)(),[{isHoveredOn:b},g]=(0,p.H)(()=>({accept:em.CQ.BOOKMARK,collect:e=>e.isOver()?{isHoveredOn:!0}:{isHoveredOn:!1}}),[]),A=o()("p-bookmarks_bar__folder_bookmarks_button p-bookmarks_bar__folder_bookmarks_button--collapsed",{"p-bookmarks_bar__folder_bookmarks_button--hidden":e||!a||0===a.length,"p-bookmarks_bar__folder_bookmarks_button--hovering":b||_}),renderCollapsedMenuForFolder=(e,a)=>{let i=t.filter(e=>e.parentId===a.id),{separator:o,addBookmark:c}=getBookmarkContextMenuItems({bookmark:a,channelId:n,dispatch:f,onClose:l});if(!i||0===i.length)return r.createElement(v.a,{...e,template:[{key:"No bookmarks description",type:"custom",children:r.createElement("p",{className:"c-menu_item__description p-bookmarks_bar__add_bookmark_button__menu_description"},eV.t("No bookmarks in folder"))},o,c],kbNavActive:!h,"data-qa":"bookmarks_bar_overflow_menu"});let d=i&&i.map((t,a)=>{let i={key:t.id,children:r.createElement("div",{key:t.id,className:`p-bookmarks_bar__folder_bookmarks_button__bookmark ${h?"p-bookmarks_bar__folder_bookmarks_button__bookmark--grabbed":""}`},r.createElement(BookmarkWrapper,{inOverflowMenu:!0,closeOverflowMenu:e.onTriggerClose,onClose:l,index:500+(a+1)/1e3,isLoading:!1,handleReorderBookmarkAndSync:m,canAddBookmarks:s,isLastBookmark:!1,bookmark:t,channelId:n,onKeyDown:u,isGrabbed:!!h&&h.id===t.id,"data-qa":"bookmarks-bar-bookmark-wrapper"})),dataQa:"bookmarks_bar_collapsed_item"};return h?(i.type=S.A.custom,i.ariaHidden=!1):(i.click=e=>{e?.key!=="Enter"&&e.defaultPrevented||((0,ed.lJ)(t.type)||(0,ed.L2)(t.type)?(e.stopPropagation(),f((0,ed.S$)({bookmark:t,channelId:n}))):f((0,ec.m)({e,bookmark:t})))},i.className="p-bookmarks_bar__folder_bookmarks_button__item"),i}).filter(Boolean);return d=d.concat([o,c]),r.createElement(v.a,{...e,template:d,kbNavActive:!h,"data-qa":"bookmarks_bar_overflow_menu"})};renderCollapsedMenuForFolder.displayName="renderCollapsedMenuForFolder";let renderCollapsedMenu=e=>{let t=a&&a.map((t,a)=>{let i={key:t.id,children:r.createElement("div",{key:t.id,className:`p-bookmarks_bar__folder_bookmarks_button__bookmark ${h?"p-bookmarks_bar__folder_bookmarks_button__bookmark--grabbed":""}`},r.createElement(BookmarkWrapper,{inOverflowMenu:!0,closeOverflowMenu:e.onTriggerClose,onClose:l,index:d+a,isLoading:!1,handleReorderBookmarkAndSync:m,canAddBookmarks:s,isLastBookmark:!1,bookmark:t,channelId:n,onKeyDown:u,isGrabbed:!!h&&h.id===t.id,"data-qa":"bookmarks-bar-bookmark-wrapper"})),dataQa:"bookmarks_bar_collapsed_item"};if(h?(i.type=S.A.custom,i.ariaHidden=!1):(i.click=e=>{e?.key!=="Enter"&&e.defaultPrevented||f((0,ec.m)({e,bookmark:t}))},i.className="p-bookmarks_bar__folder_bookmarks_button__item"),t.type===O.x.PINNED_MESSAGE){if(!c)return null;i.type=S.A.default,i.click=()=>{f((0,R.q)({element:r.createElement(PinnedItemsModal,{channelId:n})}))}}return t.type===O.x.FOLDER&&(i.type=S.A.submenu,i.renderSubmenu=e=>renderCollapsedMenuForFolder(e,t)),(0,ed.VV)(t)&&(i.disabled=!0),i}).filter(Boolean),{separator:i,addBookmark:o,createBookmarkFolderOverflowMenu:p}=getBookmarkContextMenuItems({channelId:n,dispatch:f,onClose:l});if(!s)return r.createElement(v.a,{...e,template:t,"data-qa":"bookmarks_bar_overflow_menu"});let _=[o,p],b=t&&t.length>0?[...t,i,..._]:[i,..._];return r.createElement(v.a,{...e,template:b,kbNavActive:!h,"data-qa":"bookmarks_bar_overflow_menu"})};renderCollapsedMenu.displayName="renderCollapsedMenu";let x=eV.t("Additional bookmarks");return r.createElement("div",{className:A,ref:g},r.createElement(v.cQ,{renderMenu:renderCollapsedMenu,position:"bottom-right",isDisabled:a?.length===0,className:"p-bookmarks_bar__collapsed_menu",forceOpen:b||_,onPopoverClose:l},r.createElement(y.Nm,{"aria-label":x,"data-qa":"bookmarks_bar_collapsed_bookmarks"},r.createElement(k.A,{inline:!0,size:"inherit",type:"ellipsis"}))))};BookmarkOverflowButton.displayName="BookmarkOverflowButton";var eG=a(0xb90de824),eq=a(0x13953efe6),ej=a(0xf6ed6f31),ez=a(0x10bb8e96f),eK=a(0x22f6a086f);let e$=new f.Ay("bookmarks-bar"),eY={eventId:F.EventId.WORKFLOW_EDUCATION,uiComponentName:F.UiComponentName.BOOKMARK_BAR,elementName:"bookmark_bar_education_coachmark"},BookmarksBarWorkflowEducationCoachmark=({onClose:e,onPrimaryAction:t,isReadOnly:a,UNSAFE_parentSelector:n})=>{let i=a?e$.t("Workflows in this channel have moved to the bookmarks bar.",{fallbackHash:"9cd3d1d118e0df0e91eb6a348a7a530325ad0e70",fallbackNS:"msg_input"}):e$.t("Workflows in this channel have moved to the bookmarks bar. You can add any new workflow links here too",{fallbackHash:"45b11a72d55a369314712b8eeb35c621b00adb62"}),l=a?e$.t("Got it"):null,o=r.createElement(eG.Ay,{arrowPosition:10,offsetX:-24,offsetY:3,closeCoachmark:e,isOpen:!0,width:400,alignActionsRight:!0,primaryCallToActionText:l,onClickPrimaryButton:t,title:e$.t("A new home for workflows",{fallbackHash:"01b84f594c394b41125da12db483cc1e602a4b28"}),bodyText:i,UNSAFE_parentSelector:n,autoClogProps:eY});return r.createElement(eq.Ay,{coachmarkElement:o,orientation:"bottom"})};BookmarksBarWorkflowEducationCoachmark.displayName="BookmarksBarWorkflowEducationCoachmark";let ConnectedBookmarksBarWorkflowEducationCoachmark=({channelId:e})=>{let t=(0,i.wA)(),a=(0,N.d4)(eK.jo),n=(0,N.d4)(t=>(0,ev.YY)(t,e)),l=(0,N.d4)(t=>(0,M.OL)(t,e)),o=(0,N.d4)(eK.qC),s=(0,ej.bl)(l),c=(0,r.useCallback)(e=>{e?.stopPropagation(),t((0,ez.uC)({tourId:null}))},[t]),d=(0,r.useCallback)(e=>{e?.stopPropagation(),o?t((0,ez.uC)({tourId:null})):t((0,ez.uC)({tourId:"slash-commands-coachmark-tour"}))},[t,o]);return a&&n&&s?r.createElement(BookmarksBarWorkflowEducationCoachmark,{onClose:c,onPrimaryAction:d,isReadOnly:o}):null};ConnectedBookmarksBarWorkflowEducationCoachmark.displayName="ConnectedBookmarksBarWorkflowEducationCoachmark";var eQ=a(0x248a07e73),eZ=a(0xab2e2cf4),eJ=a(0x2000be496),eX=a(0x224811973),e0=a(0x9b971e7e),e1=a(0x171ed3eca),e2=a(0xd8fe84cf),e4=a(0x1c82edabd),e5=a(0x571bd0b0);let e3=new f.Ay("bookmarks-bar"),e6={height:em.O7};function BookmarksBar({channelId:e,bookmarks:t,canAddBookmarks:a,pinnedItemsCount:n,animationsOn:l,displayVertical:f=!1,verticalLimit:E,readOnly:C=!1,isWorkflowCoachmarkOpen:k=!1,setIsBookmarksBarHidden:v}){let S=(0,r.useRef)(null),I=(0,r.useRef)(null),w=(0,r.useRef)(null),[T,M]=(0,r.useState)(null),[P,L]=(0,r.useState)(!0),[D,U]=(0,r.useState)(!0),[B,H]=(0,r.useState)(!1),[W,V]=(0,r.useState)(0),[G,q]=(0,r.useState)(null),[j,z]=(0,r.useState)(null),[$,Y]=(0,r.useState)(!1),[Q,Z]=(0,r.useState)(!1),J=(0,i.wA)(),X=(0,N.d4)(t=>(0,e2.qx)(t,e)),ee=(0,N.d4)(t=>(0,e2.wP)(t,e)),et=(0,r.useContext)(eZ.S),{sendMessageToAnnouncerAPI:ea}=(0,r.useContext)(g.A),en=et?.columnLayout?.width;0===en&&I?.current&&(en=I.current.clientWidth);let er=(0,h.A)(en),[{currentlyDraggingBookmark:ei},el]=(0,p.H)({accept:em.CQ.BOOKMARK,collect:e=>{let t=e.getItem();return{currentlyDraggingBookmark:t?.type===em.CQ.BOOKMARK?t:null}}}),eo=t&&(0,s.A)(t).length>0&&t.error,es=!!t&&!eo&&(0,s.A)(t).length>0,ec=es&&(0,ed.Wc)(t),eu=(0,ed.oQ)(t),ep=!eo&&es&&t&&(j||ec),eh=ec&&W<ec.length&&!f,e_=0===n&&0===(0,ed.Sw)(t)&&!a,ef=f&&(!ep||ep?.length===0),eb=(0,r.useMemo)(()=>{let e=ep&&(0,ed.JZ)(ep.slice(0,W),eu);return k&&e},[ep,W,eu,k]),eg=!ee&&(X||eb),ey=l&&!f,eA=(0,r.useMemo)(()=>t?(0,ed.Wc)(t).length:(0,s.A)(t).length,[t]),ex=(0,r.useMemo)(()=>(0,c.A)(()=>{if(f||!er)return;let e={outerElement:I?.current?.getBoundingClientRect(),innerElement:S?.current?.getBoundingClientRect(),threshold:em.aL,totalBookmarksLength:eA,numberOfBookmarksShown:W};!(0,d.A)(en)&&en<=er?(0,ed.bU)({...e,isContainerGrowing:!1},V):!(0,d.A)(en)&&en>er&&(0,ed.bU)({...e,isContainerGrowing:!0},V)},em.p_,{leading:!0,trailing:!0}),[f,eA,en,er,W]),eE=(0,r.useCallback)(()=>{q(null),z(null),Y(!1)},[]),eC=(0,r.useCallback)((a,n)=>{if(a.type===em.CQ.BOOKMARK&&n.type===em.CQ.BOOKMARK&&a&&n&&a.index!==n.index&&t&&es&&t[n.id]){let r=t[n.id].parentId&&t[n.id].parentId===t[a.id].parentId,i={...t[n.id],tempOrder:a.index},{reorderedBookmarks:l,bookmarkToRestore:o}=(0,ed._M)(t,i,!!r);if(J((0,e1.CM)({channelId:e,bookmarks:l})),r){let n=t[a.id].parentId,r=(0,ed.oQ)(l),s=(0,ed.lx)(r.filter(e=>e.parentId===n)),c=(0,m.A)(s,{id:i.id}),d={channelId:e,center:i.id,parentId:n,left:s[c-1]?.id||void 0,right:s[c+1]?.id||void 0,type:i.type,entityId:i.entityId};J((0,e4.V)(d)).then(()=>{o&&J((0,e1.mK)(o))}),eE()}else{let t=(0,ed.Wc)(l),a=(0,m.A)(t,{id:i.id}),n={channelId:e,center:i.id,left:t[a-1]?.id||void 0,right:t[a+1]?.id||void 0,type:i.type,entityId:i.entityId};J((0,e4.V)(n)),eE()}}},[t,e,eE,J,es]),ek=(0,r.useCallback)(e=>{if(G&&j){let t=j.length,a=(0,m.A)(j,{id:G.id}),n=(0,u.A)(a+e,0,t);n+1>W&&Y(!0);let r=j.slice(0,t);r.splice(a,1),r.splice(n,0,G),z(r),ea({assertive:!0,message:e3.t("New position. {newBookmarkPosition} of {totalBookmarks}",{newBookmarkPosition:n+1,totalBookmarks:j.length+1})})}},[j,G,W,ea]),eS=(0,r.useCallback)(e=>{let a=e.keyCode,n=e.target.id;if(a===b.I6&&ec)if(e.nativeEvent.preventDefault(),G&&j){q(null);let e=(0,m.A)(ec,{id:G.id}),t=(0,m.A)(j,{id:G.id});if(e===t)return void z(null);let a={type:em.CQ.BOOKMARK,index:e,id:G.id};eC({type:em.CQ.BOOKMARK,index:t,id:ec[t].id},a),ea({assertive:!0,message:e3.t("{bookmarkLabel} dropped. Updated position: {newBookmarkPosition} of {totalBookmarks}",{bookmarkLabel:G.title||G.url,newBookmarkPosition:t+1,totalBookmarks:ec.length+1})})}else{let e=t[n];q(e),z(ec),ea({assertive:!0,message:e3.t("Grabbed {bookmarkLabel}, press up or down arrow to reorder, press spacebar to drop",{bookmarkLabel:e.title||e.url})})}a===b._f&&eE(),a===b.wn&&G&&e.nativeEvent.preventDefault(),a===b.i7&&G&&j&&(ek(1),e.nativeEvent.preventDefault()),a===b.n6&&G&&j&&(ek(-1),e.nativeEvent.preventDefault()),a===b.Fm&&G&&e.nativeEvent.preventDefault()},[t,eE,j,ek,G,eC,ec,ea]),eI=(0,r.useCallback)(({visible:t})=>{D?(U(!1),eg||J((0,e1.KN)({channelId:e,visible:!0}))):t!==eg&&J((0,e1.KN)({channelId:e,visible:t}))},[D,eg,J,e]);(0,ed.dA)(ey,eI,I,eo);let ew=(0,r.useCallback)(()=>{eI({visible:!0}),w.current&&(clearTimeout(w.current),w.current=null)},[eI,w]),eT=(0,r.useCallback)(e=>{!ey||eg||w.current||(B&&H(!1),e?ew():w.current=window.setTimeout(ew,em.Bc))},[ey,eg,B,ew]),eN=(0,r.useCallback)(()=>{ey&&!eg&&w.current&&(clearTimeout(w.current),w.current=null)},[ey,eg]),eM=(0,r.useCallback)(e=>{if(e.type===O.x.FOLDER&&eu)return(0,ed.lx)(eu.filter(t=>t.parentId===e.id))},[eu]),eR=(0,r.useCallback)(()=>{if(a){let{addBookmarkVanilla:t,createBookmarkFolder:n}=getBookmarkContextMenuItems({dispatch:J,canAddBookmarks:a,channelId:e});return[t,n]}return[]},[a,e,J]);(0,r.useEffect)(()=>{if(U(!0),ey&&!eg&&eI({visible:!0}),t||P){if(t){L(!1);let e=(0,ed.Wc)(t).length;E&&f&&!Q?V(E):V(e>em.EQ?em.EQ:e)}}else L(!0)},[e,t,P,E,f,Q]);let eP=(0,N.d4)(e=>(0,e0.ZT)(e)||""),eL=(0,N.d4)(t=>(0,ev.OJ)(t,e));(0,r.useEffect)(()=>{eL&&(0,e5.E)(eP,e||"")},[eP,e,eL]),(0,r.useLayoutEffect)(ex,[en,t,e,T,ex,f]),(0,r.useEffect)(()=>{v?.(!!(B||e_||ee||ey&&!eg&&!D))},[B,e_,ee,ey,eg,D,v]);let eD=o()("p-bookmarks_bar p-bookmarks_bar--no-shadow",{"p-bookmarks_bar--with-hide-on-scroll":ey,"p-bookmarks_bar--with-hide-on-scroll--ia_details_popover":ey,"p-bookmarks_bar--hidden_no_animation":B||e_||ee,"p-bookmarks_bar--hidden":ey&&!eg&&!D,"p-bookmarks_bar--open":ey&&eg&&!D,"p-bookmarks_bar--open_no_animation":ey&&eg&&D,"p-bookmarks_bar--dropping":!!ei,"p-bookmarks_bar--vertical":f}),eF=e3.t("Bookmarks",{fallbackHash:"af6eb0cd0485fe08012383c5f108c2e90d3c1775"}),eU=(0,r.useCallback)(()=>eT(!0),[eT]),eB=(0,r.useCallback)(()=>eT(!1),[eT]),eH=(0,r.useCallback)(()=>{J((0,e1.UX)({channelId:e}))},[J,e]),eW=(0,r.useMemo)(()=>ep&&f?ep:ep?ep.slice(W,ep.length):void 0,[ep,W,f]);if(P)return null;let eV=r.createElement("div",{className:"p-bookmarks_bar__dnd",ref:el},r.createElement(_.A,{clogImpression:!0,uiComponentName:F.UiComponentName.BOOKMARK_BAR,eventId:F.EventId.BOOKMARK_BAR_SHOWN,elementType:F.ElementType.COMPONENT,channelId:e},r.createElement("div",{id:"bookmark-reorder-description",hidden:!0},e3.t("Press spacebar to reorder")),P&&r.createElement(BookmarkLoadingIcon,null),!P&&ep&&ep.slice(0,W).map((t,i)=>{if(t&&!t.parentId){let l=eM(t),o=l?.some(e=>(0,ed.L2)(e.type)),s=(0,ed.eq)(t);return r.createElement(r.Fragment,{key:t.id},s&&o&&r.createElement(ConnectedBookmarksBarWorkflowEducationCoachmark,{channelId:e}),r.createElement(BookmarkWrapper,{index:i,key:t.id,lastBookmarkRef:i===W-1?S:null,bookmarksInFolder:l,grabbedBookmark:G,handleReorderBookmarkAndSync:eC,canAddBookmarks:a,isLastBookmark:i===W-1,setLastBookmark:M,bookmark:t,isLoading:P,channelId:e,onKeyDown:eS,isGrabbed:!!G&&G.id===t.id,displayVertical:f,readOnly:C,enableDragInQuipContext:f,pinnedItemsCount:n}))}return null}),es&&ep&&eh&&r.createElement(BookmarkOverflowButton,{isLoading:P,allBookmarks:eu,bookmarksToHide:eW,handleReorderBookmarkAndSync:eC,numberOfBookmarksShown:W,channelId:e,canAddBookmarks:a,pinnedItemsCount:n,onKeyDown:eS,grabbedBookmark:G,forceOpen:$}),es&&!eh&&!f&&r.createElement(BookmarkAddButton,{canAddBookmarks:a,channelId:e,hasBookmarks:!(0,ed.F9)(t),isLoading:P}),!eh&&a&&!P&&r.createElement(eO.A,{getTemplate:eR,desktopAppOnly:!1,width:"150px",showSlackKitContextMenuOnDesktop:!0},r.createElement("div",{className:"p-bookmarks_bar__context_menu_section"})))),eG=r.createElement(r.Fragment,null,!ey||eg||ee?null:r.createElement("div",{onMouseOver:eB,onMouseLeave:eN,className:"p-bookmarks_bar_hidden_hover_field p-bookmarks_bar_hidden_hover_field--with-gutter"}),r.createElement("div",{className:eD,style:f?void 0:e6,ref:I},eo?r.createElement(K,{channelId:e,canAddBookmarks:a,onRetry:eH}):r.createElement(r.Fragment,null,eV))),eq=r.createElement(A.A,{onFocus:eU,"aria-label":eF,className:"p-bookmarks_bar_container"},eG),openAddBookmarkModal=()=>{J((0,R.q)({element:r.createElement(x.A,{channelId:e})}))};openAddBookmarkModal.displayName="openAddBookmarkModal";let ej=r.createElement(BookmarkAddButton,{canAddBookmarks:a&&!C,channelId:e,hasBookmarks:!(0,ed.F9)(t),isLoading:P,hideTitle:!0,useIconButton:!0,icon:"plus"});return ef?r.createElement(r.Fragment,null,r.createElement("div",{className:"p-bookmarks_bar_vertical_header"},r.createElement("div",{className:"p-bookmarks_bar_vertical_header__title"},e3.t("Bookmarks")),r.createElement("div",{className:"p-bookmarks_bar_vertical_header__actions"},r.createElement("div",null,ej))),r.createElement("div",{className:"p-bookmarks_bar_vertical_empty_state"},r.createElement("div",{className:"p-bookmarks_bar_vertical_empty_state__text"},e3.t("Organize links and files for people in this conversation.")),r.createElement("div",{className:"p-bookmarks_bar_vertical_empty_state__actions"},r.createElement(y.Nm,{onClick:openAddBookmarkModal,"aria-label":e3.t("Add a bookmark")},e3.t("Add a bookmark"))))):f?r.createElement(r.Fragment,null,r.createElement("div",{className:"p-bookmarks_bar_vertical_header"},r.createElement("div",{className:"p-bookmarks_bar_vertical_header__title"},e3.t("Bookmarks")),r.createElement("div",{className:"p-bookmarks_bar_vertical_header__actions"},r.createElement("div",null,ej))),eq,E&&E<eA&&r.createElement(eQ.A,{onCollapse:()=>Z(!Q),isCollapsed:!Q})):r.createElement(r.Fragment,null," ",eq," ")}BookmarksBar.displayName="BookmarksBar";let e8=(0,j.N)((e,{channelId:t})=>{let a=(0,eX.y)(e),n=(0,e2.M4)(e,{channelId:t});if((0,ed.bt)(n))for(let[e,t]of Object.entries(n))t.type!==O.x.FILE||a||delete n[e];return{bookmarks:n,animationsOn:(0,eJ.Nu)(e,t),canAddBookmarks:(0,eJ.Rk)(e,t),pinnedItemsCount:(0,q.qT)((0,M.OL)(e,t))||0,isWorkflowCoachmarkOpen:(0,eK.jo)(e)}})(BookmarksBar)},0x112d5d28c:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x11a296110),s=a(0x4e1a3b33),c=a(0x7dc98d62),d=a(0x20e80190e),m=a(0x22fb75fe3),u=a(0x3711e82d),p=a(0x20ef6d52a),h=a(0x226892387),_=a(0xd8fe84cf),f=a(0x860cba83),b=a(0x14ea3ce99),g=a(0x1fcbb004d);let y=new i.Ay("bookmarks-bar"),DeleteBookmarkModal=({bookmark:e,onClose:t,channelId:a,fromChannelFolder:i=!1,onRemove:A})=>{let x=(0,r.wA)(),[E,C]=(0,n.useState)(!1),[k,v]=(0,n.useState)(""),S=e.type===m.x.FOLDER,I=e.type===m.x.FILE,w=(0,h.d4)(t=>(0,b.Lp)(t,e.entityId)),T=(0,h.d4)(t=>(0,_.Um)(t,{channelId:a,folderBookmarkId:e.parentId??""})),{label:N}=(0,c.N)({channelId:a}),M=T?.title||N,R=(0,n.useMemo)(()=>{if(i){if(e.type===m.x.LINK)return u.EventId.CHANNEL_TABS_FOLDER_LINK_REMOVED;if(e.type===m.x.FILE)return u.EventId.CHANNEL_TABS_FOLDER_FILE_REMOVED}},[e.type,i]),P=(0,n.useCallback)(()=>{x((0,g.O)()),t()},[x,t]),L=(0,n.useCallback)(()=>{x((0,f.G)(e)).then(()=>{C(!1),x((0,p.B)({url:e.url,channelId:e.channelId,eventId:R})),A?.(),P()}).catch(()=>{let e=y.t("Sorry could not delete bookmark, Please retry.");e=S?y.t("Sorry could not delete folder, Please retry."):I?y.t("Sorry could not delete file, Please retry."):y.t("Sorry could not delete link, Please retry."),C(!1),v(e)})},[x,e,R,A,P,S,I]),O=y.t("Delete bookmark"),D=y.rt("Are you sure you want to delete this bookmark? This cannot be undone.");S?(O=y.t("Delete folder"),D=y.rt("Are you sure you want to delete this folder? This cannot be undone.")):I?(O=y.t("Remove file"),D=y.rt("Are you sure you want to remove <b>{fileName}</b> from <b>{folderName}</b>? This cannot be undone.",{folderName:M,fileName:n.createElement(s.A,{file:w})})):(O=y.t("Delete link"),D=y.rt("Are you sure you want to delete <b>{link}</b> from <b>{folderName}</b>? This cannot be undone.",{link:e.title||e.url,folderName:M}));let F=I?y.t("Remove"):y.t("Delete");return n.createElement(d.dW,{closeModal:P,isOpen:!0,centered:!0,className:"p-bookmarks_bar_delete_modal"},n.createElement(d.rQ,null,n.createElement(d.Rc,{title:O})),n.createElement(d.$m,null,n.createElement(d.qf,null,n.createElement("div",{className:"margin_bottom_125 break_word"},D),k&&n.createElement(l.Ay,{type:l.QE.boxed,level:l.A_.error,align:l.AO.left,"data-qa":"bookmarks_bar_error"},k))),n.createElement(d.jl,null,n.createElement(d.ox,null,n.createElement(o.$n,{onClick:P,type:"outline","data-qa":"bookmarks-bar-delete-modal-cancel-button"},y.t("Cancel")),n.createElement(o.lV,{onClick:L,type:"danger",disabled:E,loading:E,"data-qa":"bookmarks-bar-delete-modal-add-button","aria-label":F},F))))};DeleteBookmarkModal.displayName="DeleteBookmarkModal";let A=DeleteBookmarkModal},0x209559510:(e,t,a)=>{"use strict";a.d(t,{m:()=>N});var n=a(0x8c8bafa3),r=a(0x287da5a6),i=a(0x1a65aae75),l=a(0x6e20c837),o=a(0x181c247be),s=a(0x22fb75fe3),c=a(0x6d72337),d=a(0x24558b75f),m=a(0x5e7e4cf8),u=a(0xb2fd4d95),p=a(0x11c82607b),h=a(0x1ccef1c6f),_=a(0x11fcf00e),f=a(0xd2f48263),b=a(0x1a80146c8),g=a(0x1f3226107),y=a(0xbd3de346),A=a(0xbac48619),x=a(0x21aad6f5),E=a(0x248b8ff1a),C=a(0x14ea3ce99);let k=(0,p.Ay)("opens file in viewer and post in window",async(e,t,{permalink:a})=>{let{type:n,fileId:r}=(0,l.$N)(t(),a);if(n===l.im.FILE){let a=(0,C.Lp)(t(),r);if((0,A.A)(a)&&await e((0,g.B2)({fileId:r,reason:"permalink_openFileInViewerOrWindow"})),a=(0,C.Lp)(t(),r),(0,y.Z0)(a))return e((0,x.A)({file:a})),!0;if((0,y.sJ)(a)||(0,y.F1)(a))return e((0,E.A)({fileId:r})),!0}return!1});k.meta={name:"maybeOpenFileInViewerOrWindow",key:"createThunkMaybeOpenFileInViewerOrWindow",description:"opens file in viewer and post in window"};var v=a(0x1eae030b2),S=a(0x1fa458710),I=a(0x1d774a049),w=a(0x10394ade5),T=a(0x2d1c8f66);let N=(0,p.Ay)("Handle the opening of bookmarks",(e,t,{e:a,bookmark:p,isStackable:g,forceNewWindow:y=!1})=>{a.stopPropagation();let A=t(),x=(0,l.$N)(A,p.url),E=(0,h.ty)(A,"suppress_link_warning");if(p.type===s.x.FILE&&x?.type===l.im.LIST)e((0,T.N)({listFileId:p.entityId,...x.recordId&&{focusRecordId:x.recordId},navigateInCurrentContext:!1,forceOpenInSplitView:(0,r.A)(a),forceOpenInChildWindow:(0,d.Cz)(a)||y}));else if(p.type===s.x.FILE&&x?.type===l.im.QUIP)e((0,S.A)({fileId:p.entityId,forceSplitView:(0,r.A)(a),forceNewWindow:(0,d.Cz)(a)||y,source:I.f.BOOKMARK_BAR,sectionId:p.quipSectionId}));else if(p.type===s.x.FILE)e((0,b.A)({fileId:p.entityId,bookmark:p,source:I.f.CHANNEL_FOLDER,isStackable:g}));else if(!E&&p?.title&&(0,i.A)(p.title,p.url))e((0,v.A)({text:p.title,url:p.url})),a.preventDefault();else if((0,o.U)(p.url))e((0,c.HB)({uri:p.url}));else if((0,u.px)(p.url))e(k({permalink:p.url})).then(t=>{t||e((0,c._J)({permalink:p.url}))});else if(x?.type===l.im.SLACKHELP){let t=x.articleId;t?e((0,_.a)({articleId:parseInt(t,10)})):e((0,f.k)({}))}else if((0,n.Ed)(new URL(p.url))&&(0,m.Q)(p.url)){let t=m.s.exec(p.url);t?.[1]?e((0,_.a)({articleId:parseInt(t?.[1],10)})):e((0,f.k)({}))}else e((0,w.C)({url:p.url}))});N.meta={name:"handleUrlOpen",key:"createThunkHandleUrlOpen",description:"Handle the opening of bookmarks"}},0x155d0b7eb:(e,t,a)=>{"use strict";a.d(t,{Bc:()=>i,CQ:()=>s,EQ:()=>c,Fo:()=>o,O7:()=>n,aL:()=>l,p_:()=>r});let n=36,r=150,i=100,l=115,o=200,s={BOOKMARK:"BOOKMARK"},c=30},0xeeb01a46:(e,t,a)=>{"use strict";a.d(t,{F$:()=>getWorkflowsFolderAndLegacyWorkflows,F9:()=>isEveryBookmarkFalse,JZ:()=>hasWorkflowsFolderAndLegacyWorkflows,L2:()=>isLegacyWorkflowBookmark,S$:()=>v,Sw:()=>bookmarksLengthWithoutPinnedMessages,VV:()=>isLegacyWorkflowBookmarkDisabled,Wc:()=>k,_M:()=>reorderBookmark,bU:()=>recalculateVisibleBookmarks,bt:()=>isBookmarksStoreStateValue,dA:()=>useHideOnScrollDirection,eq:()=>isWorkflowFolder,lJ:()=>isShortcutBookmark,lx:()=>E,m4:()=>getBookmarkTitleToDisplay,oQ:()=>C});var n=a(0xbad225b5),r=a(0xe1870af4),i=a(0x7fa3cc8f),l=a(0x178533105),o=a(0x202470d56),s=a(0x2bba3a0),c=a(0x162afc153),d=a(0x20482ad21),m=a(0x5739d664),u=a(0x155d0b7eb),p=a(0x2a037c8a),h=a(0x22fb75fe3),_=a(0x1ec220982),f=a(0x11c82607b),b=a(0x1426c029f),g=a(0x7f7d34d1),y=a(0x22f6a086f),A=a(0x17cc44ffa);let x=new d.Ay("bookmarks-bar"),E=(0,m.A)(e=>(0,r.A)(e,["rank"],["asc"]),2),C=(0,m.A)(e=>(0,r.A)((0,i.A)(e),["rank"],["asc"])),k=(0,m.A)(e=>(0,r.A)((0,i.A)(e).filter(e=>!e.parentId),["rank"],["asc"]));(0,m.A)(e=>(0,l.A)(e,(e,{id:t,...a})=>({...e,[t]:{id:t,...a}}),{}));let isBookmarksStoreStateValue=e=>(0,i.A)(e).length>0&&void 0===e.error,bookmarksLengthWithoutPinnedMessages=e=>!e||e.error?0:(0,i.A)(e).filter(e=>e?.type!=="pinned_message").length,v=(0,f.Ay)("Handle the opening of bookmarked workflows",(e,t,{bookmark:a,channelId:n})=>{let r=t();if(isShortcutBookmark(a.type)){let{shortcutId:t,appId:i,url:l,id:o}=a;if(!t||!i)return;if((0,_.A)(t)){let a=(0,y.bn)(r,{triggerId:t});if(a?.type!==p.M.Shortcut)return void e((0,b.u)({shortcutInfo:{triggerId:t,url:l}}));e((0,A.L)({linkTriggerUrl:l,hermesLinkTriggerUIContext:{location:"bookmark",bookmarkId:o,channelId:n},reason:"trip-trigger-from-bookmarks-bar-click"}))}else e((0,g.d)({actionId:t,channelId:n}))}});v.meta={name:"handleWorkflowOpen",key:"createThunkHandleWorkflowOpen",description:"Handle the opening of bookmarked workflows"};let recalculateVisibleBookmarks=({outerElement:e,innerElement:t,threshold:a,isContainerGrowing:n,totalBookmarksLength:r,numberOfBookmarksShown:i},l)=>{if(e&&t&&r>0){let o=e.right-t.right;if(!n&&o<a&&i-1>=1&&i-1<=r)l(i-1);else if(n&&o>a&&i+1<=r){let e=Math.floor(o/a);l(i+e>=r?r:i+e)}}},reorderBookmark=(e,t,a=!1)=>{let{channelId:n,id:r,tempOrder:i}=t;if(!n||!r||!e[r])return{reorderedBookmarks:e};if("number"==typeof i&&a){let a=E(C(e).filter(e=>(e.parentId===t.parentId||(0,o.A)(e.parentId)&&(0,o.A)(t.parentId))&&e.type!==h.x.FOLDER&&e.type!==h.x.PINNED_MESSAGE)),n=(0,s.A)(a,{id:r}),l=1e3*i,c={...t};if(delete c.tempOrder,l<n){c.rank=a[l].rank;let t={...a[l]};return t.rank=`${t.rank}${t.rank[0]}`,{reorderedBookmarks:{...e,[t.id]:{...t},[r]:{...c,isReordered:!0}},bookmarkToRestore:{...a[l]}}}return c.rank=`${a[l].rank}${a[l].rank[0]}`,{reorderedBookmarks:{...e,[r]:{...c,isReordered:!0}}}}if("number"==typeof i){let a,n=k(e);a=t.parentId?(0,s.A)(n,{id:t.parentId}):(0,s.A)(n,{id:r});let l={...t,parentId:void 0};if(delete l.tempOrder,i<a){l.rank=n[i].rank;let t={...n[i]};return t.rank=`${t.rank}${t.rank[0]}`,{reorderedBookmarks:{...e,[t.id]:{...t},[r]:{...l,isReordered:!0}},bookmarkToRestore:{...n[i]}}}return l.rank=`${n[i].rank}${n[i].rank[0]}`,{reorderedBookmarks:{...e,[r]:{...l,isReordered:!0}}}}return{reorderedBookmarks:e}},useHideOnScrollDirection=(e,t,a,r)=>{let i,l;a.current&&((i=a.current.closest(".p-workspace__primary_view_contents, .p-view_contents--primary"))||(i=a.current.closest(".p-tiles__tile")?a.current.closest(".p-tiles__tile"):a.current.closest(".p-window_layout_wrapper__primary_view")),l=i?.querySelector(".c-message_list")?.querySelector('div[data-qa="slack_kit_scrollbar"]'));let o=(0,n.useCallback)((0,c.A)(()=>{if(!l)return;let e=Math.ceil(l.scrollTop),a=e>=l.scrollHeight-l.offsetHeight;0===e||a?t({visible:!0,hideAgain:!0}):t({visible:!1,hideAgain:!1})},u.Fo),[l,t]);(0,n.useEffect)(()=>{if(l)return e&&!r&&l?.addEventListener("scroll",o),()=>{e&&!r&&l?.removeEventListener("scroll",o)}},[o,l,e,r])};function isEveryBookmarkFalse(e){return C(e).every(e=>{switch(e.type){case h.x.PINNED_MESSAGE:case h.x.CHANNEL_CANVAS:return!0;default:return!1}})}function getBookmarkTitleToDisplay(e,t){let a=x.t("Untitled",{fallbackHashNs:"files",fallbackHash:"621521f9a8788695ec292cbec54d2792cfdf0a7d"});return e.type===h.x.FOLDER&&"Workflows"===e.title?x.t("Workflows",{fallbackHashNs:"workflow_builder",fallbackHash:"825ce9e97dc41179ec167b83be91179b5dacd316"}):!e.title&&t?a:e.title}function isShortcutBookmark(e){return e===h.x.SHORTCUT||e===h.x.AUTO_GEN_SHORTCUT}function isLegacyWorkflowBookmark(e){return e===h.x.LEGACY_WORKFLOW||e===h.x.AUTO_GEN_LEGACY_WORKFLOW}function isLegacyWorkflowBookmarkDisabled(e){return isLegacyWorkflowBookmark(e.type)}function isWorkflowFolder(e){return e.title?.toLowerCase()==="workflows"&&"local_folder"===e.type}function getWorkflowsFolderAndLegacyWorkflows(e,t){let a=[];return e.filter(e=>e&&!e.parentId&&isWorkflowFolder(e)).forEach(e=>{let n=E(t.filter(t=>t.parentId===e.id&&isLegacyWorkflowBookmark(t.type)));a.push(...n)}),a}function hasWorkflowsFolderAndLegacyWorkflows(e,t){return getWorkflowsFolderAndLegacyWorkflows(e,t).length>0}},0x6c151463:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x238ee6f5d),l=a(0x6e465d95),o=a(0x1bd866cd7),s=a(0x1b9d5cc0c),c=a(0x1c91944c9),d=a(0x18476a827);let m=new r.Ay("bot-name"),BotName=({className:e,name:t,badge:a=!0,isWorkflow:r,isChannelFiles:o=!1,"data-qa":s})=>{let c=o&&t?m.t("Shared by {name}",{name:t}):t;return n.createElement("span",{className:e,"data-qa":s},c||n.createElement(i.A,null)," ",a&&!o&&n.createElement(l.A,{isWorkflow:r}))};BotName.displayName="BotName";let u=(0,c.N)((e,{id:t})=>{let a=(0,d.AF)(e,t);return{name:(0,o.Hg)(a||void 0),isWorkflow:(0,s.v3)(a||void 0)}})(BotName)},0x1efdae28b:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x344bb842),d=a(0x15f8e452a),m=a(0x7fbb7bb1);let u=new o.Ay("browse-pages"),p=class extends n.Component{static defaultProps={className:void 0,children:null,ariaLabel:"",title:"",titleIcon:void 0,titleIconClassName:void 0,primaryActionText:"",onClickPrimaryAction:l.A,primaryCTAClogProps:void 0,secondaryActionText:"",onClickSecondaryAction:l.A,secondaryCTAClogProps:void 0,onClose:l.A,closeClogProps:void 0,onMarkAsSeen:l.A,onMount:l.A,imgUrl:void 0,imgUrl2x:void 0,isCloseable:!0,backgroundStyle:void 0};componentDidMount(){this.props.onMount?.()}componentWillUnmount(){this.props.onMarkAsSeen?.()}render(){let{className:e,ariaLabel:t,title:a,titleIcon:r,titleIconClassName:l,primaryActionText:o,onClickPrimaryAction:p,primaryCTAClogProps:h,onClickSecondaryAction:_,secondaryActionText:f,secondaryCTAClogProps:b,onClose:g,closeClogProps:y,children:A,namespace:x,imgUrl:E,imgUrl2x:C,isCloseable:k,backgroundStyle:v}=this.props,S=E&&C?`${E}, ${C} 2x`:void 0,I=u.t("Dismiss notification"),w=u.t("notification");return n.createElement(m.A,null,({width:m,measureRef:u})=>n.createElement("div",{className:i()(e,"p-browse_page_education_card"),role:"group","aria-roledescription":w,"data-qa":`${x}-education-card`,ref:u,"aria-label":t||("string"==typeof a?a:void 0)},n.createElement("div",{className:"p-browse_page_education_card__content"},n.createElement("h3",{className:"p-browse_page_education_card__title"},r&&n.createElement(d.A,{className:i()("p-browse_page_education_card__title_icon",l),inline:!0,type:r}),a),n.createElement("div",{className:"p-browse_page_education_card__body"},A),(o||f)&&n.createElement("div",{className:"p-browse_page_education_card__actions"},o&&n.createElement(s.Ay,{onClick:p,size:"medium","data-qa":`${x}-education-card-primary-button`,autoClogProps:h},o),f&&n.createElement(s.Ay,{type:"outline",onClick:_,size:"medium","data-qa":`${x}-education-card-secondary-button`,autoClogProps:b},f))),m>600&&E&&n.createElement("div",{className:"p-browse_page_education_card__image","data-qa":`${x}-education-card__image`},n.createElement("img",{srcSet:S??void 0,src:E,alt:""})),k&&n.createElement(c.A,{backgroundStyle:v,className:"p-browse_page_education_card__close",onClick:g,"data-qa":`${x}-education-card-close-button`,"aria-label":I,autoClogProps:y,svgIconProps:{name:"close"}})))}};p.displayName="EducationCard";let h=p},0x1ca07f01e:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x339b339c);let __WEBPACK_DEFAULT_EXPORT__=({className:e})=>n.createElement("div",{className:i()("p-browse_page_channel","p-browse_page_channel--skeleton",e)},n.createElement("p",null,n.createElement(l.A,{size:"random"}),n.createElement("br",null),n.createElement(l.A,{size:"random"})))},0x123e28e02:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x543a781e),i=a(0x20482ad21),l=a(0x15f8e452a),o=a(0x4c96e5d9),s=a(0x107116627),c=a(0x1631a607b),d=a(0x6cc5eee0),m=a(0x1b3ecb90f),u=a(0x7fbb7bb1),p=a(0x1ec69ee01),h=a(0x12185e091);let _=new i.Ay("search"),customContentHandler=e=>e?e.reduce((e,t)=>(["bold","italic","strike","code","pre","quote","long_quote_prefix"].includes(t.type)?e.push(...customContentHandler(t.contents)):(0,c.A)(t)?e.push({text:" "}):e.push(t),e),[]):[];function BrowsePageChannelSubtext({channel:e,justification:t,memberCount:a,isChannelMember:i=!1,showTeamDisambiguation:c=!1}){let[f,b]=(0,n.useState)(!1),[g,y]=(0,n.useState)(0),A=(0,r.A)(g,500),x=(0,p.z8)(e)||void 0,E="\xa0\xa0\xb7\xa0\xa0",C=!t&&x&&!(0,h.t8)(e),k=C||t,v=(0,n.useRef)(null),S=n.createElement("span",{className:"p-browse_page_channel__subtext__contents","data-qa":"browse_page_channel_subtext_contents",ref:v},i&&n.createElement(n.Fragment,null,n.createElement("span",{className:"c-medium_channel_entity__joined_status sk_lilypad_green","data-qa":"browse_page_channel_joined_status"},n.createElement(l.A,{type:"check-small",size:"inherit",className:"p-browse_page_channel__joined_status_icon"})," ",_.rt("<strong>Joined</strong>")),E),c&&n.createElement(n.Fragment,null,n.createElement(s.A,{className:"p-browse_page_channel__channel_team",channelId:e.id,"data-qa":"channel_entity__team",shouldRender:c,showTeamName:c}),E),null!=a&&a>=0&&n.createElement("span",{className:"c-medium_channel_entity__member_count","data-qa":"browse_page_channel_member_count"},_.t("{count, plural, =1 {# member} other {# members}}",{count:a})),k&&E,t&&n.createElement("span",{"data-qa":"browse_page_channel_justification"},n.createElement(l.A,{type:"sparkles-filled",size:"inherit",className:"p-browse_page_channel__justification_icon"})," ",n.createElement(d.A,{className:"p-browse_page_channel__justification",text:t,emojiSize:m.lw.MEDIUM,showTooltips:!1,noHighlights:!0})),C&&n.createElement(d.A,{className:"p-browse_page_channel__purpose","data-qa":"browse_page_channel_purpose",text:x,emojiSize:m.lw.SMALL,customContentHandler:customContentHandler,noJumbomoji:!0,noHexColors:!0,noCode:!0,noQuotes:!0}));(0,n.useEffect)(()=>{v.current&&A&&b(A<v.current.scrollWidth)},[A]);let I=(0,n.useCallback)(e=>{let t=e?.bounds?.width;t&&y(t)},[]);return n.createElement(u.A,{onResize:I},({measureRef:e})=>n.createElement("div",{className:"p-browse_page_channel__subtext",ref:e},f?n.createElement(o.Ay,{tip:n.createElement(d.A,{className:"p-browse_page_channel__purpose--tooltip","data-qa":"browse_page_channel__purpose--tooltip",text:x,emojiSize:m.lw.SMALL,noJumbomoji:!0,noQuotes:!0,noLinking:!0,showTooltips:!1}),position:"top"},S):S))}BrowsePageChannelSubtext.displayName="BrowsePageChannelSubtext";let f=BrowsePageChannelSubtext},0xb790209f:(e,t,a)=>{"use strict";a.d(t,{A:()=>U});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x125763ad),s=a(0x20482ad21),c=a(0x11a296110),d=a(0xa6f3163b),m=a(0x15f8e452a),u=a(0x4c96e5d9),p=a(0x1fdec3e16),h=a(0x1c659cbb1),_=a(0xdc1367a8),f=a(0x339b339c),b=a(0xaacd3809),g=a(0x2376ea9bb),y=a(0x19ab18890),A=a(0xb904b8fb),x=a(0x202fa5d55),E=a(0x15f4f83cf),C=a(0x1b9d5cc0c),k=a(0x21d85d6e5),v=a(0xf2964a91),S=a(0xdb0ffe37),I=a(0x4b8e0952),w=a(0x1aad32b98),T=a(0x171fa252d),N=a(0x1ef4b4237),M=a(0x1c91944c9),R=a(0xf1527618),P=a(0x1af285d2e),L=a(0x1148a6751),O=a(0xb129c1d5),D=a(0x2207a1e7d);let F=new s.Ay("inline_member");function getMemberSubtext(e,t,a,n,r){if(n&&r)return F.t("Invited you");let i=r?e||" ":e;return a&&(e&&t?i=`${e}  \xb7  ${t}`:t&&(i=t)),i}function BrowsePageMemberCardEntity({id:e,className:t,memberWithoutHighlights:a,memberMetadata:r,teamId:s,avatarSize:A=158,subtext:w,isDisabled:M=!1,inOnboarding:R=!1,selectMode:P=!1,isSelected:L=!1,hasMaxSelected:O=!1,openEditProfileModal:D=l.A,isDisplayPronounsEnabled:U=!1,isUserHidden:B=!1,displayRealNamesPref:H=!1,isJoinerLaunchpadOn:W=!1,isInviter:V=!1,isFocused:G=!1,isOnline:q=!1,setAriaLabel:j}){let z=(0,I.z1)(a)?a:(0,o.A)({},a,r||{}),K=(0,n.useRef)(null),$=(0,n.useRef)(null),[Y,Q]=(0,n.useState)(1),[Z,J]=(0,n.useState)(1),X=(0,n.useRef)(0),ee=K.current&&(0,T.c)(K.current),et=$.current&&(0,T.c)($.current),[ea,en]=(0,n.useState)(!1),er=(0,n.useCallback)(()=>{en(!0)},[]),ei=(0,n.useCallback)(()=>{en(!1)},[]),el=(0,C.rN)(z),eo=U?(0,C.fD)(z):null,es=(0,N.ho)(el),ec=!!z.top_terms,ed=(0,S.g)(z),em=(0,v.o)(z),eu=(0,C.fy)(z),ep=(0,C.hh)(z),eh=z.isNonExistent||(0,E.lv)(e),e_=z.isUnknown||(0,E.mX)(e),ef=ed&&s,eb=!e_&&!eh&&!em&&!ep,eg=(0,k.oj)({displayRealNames:H,member:z,shouldEscape:!1,includeAtSign:!1}),ey=B?F.t("Name hidden"):eg,eA=getMemberSubtext(el,eo,U,V,W),ex=F.t("Direct Message");(0,n.useEffect)(()=>{if(W&&j){let e=F.t("Online"),t=F.t("Offline");j(F.t("{directMessageCopy} {memberDisplayName}. Is {onlineStatus}.",{memberDisplayName:ey,onlineStatus:q?e:t,directMessageCopy:ex}))}},[W,ex,q,ey,j,eA]);let eE=eb?n.createElement("span",{className:"p-browse_page_member_card_entity__indicator","data-qa":"browse_page_member_card_entity__guest_badge"},n.createElement(b.Ay,{memberId:z?.id})):null,eC=n.createElement("span",{className:"p-browse_page_member_card_entity__name","data-qa":"browse_page_member_card_entity_name"},n.createElement("strong",null,e_||eh?n.createElement(_.A,{type:"unknown","data-qa":"browse_page_member_card_entity_missing_name"}):n.createElement("span",{className:"p-browse_page_member_card_entity__name_text","data-qa":"browse_page_member_card_entity__name_text"},n.createElement(x.A,{text:ey})),eu&&!R&&n.createElement("span",{className:"p-browse_page_member_card_entity__indicator","data-qa":"browse_page_member_card_entity__you"},F.t("(you)")),em&&n.createElement("span",{className:"p-browse_page_member_card_entity__indicator","data-qa":"browse_page_member_card_entity__deactivated"},F.t("(deactivated)"))),!W&&eE),ek=V&&W?n.createElement(n.Fragment,null,n.createElement(y.Ay,{text:"sparkles",emojiSize:y.lw.SMALL})," "):null,ev=n.createElement("span",{className:"p-browse_page_member_card_entity__subtext","data-qa":"browse_page_member_card_entity_subtext"},e_||eh?n.createElement(f.A,{"data-qa":"browse_page_member_card_entity_missing_subtext",size:"medium"}):!es&&w||n.createElement(n.Fragment,null,ek,n.createElement(x.A,{text:eA,inputIsEscaped:!0}))),eS=n.createElement(m.A,{type:"info-circle",inline:!0,size:"inherit"}),eI=n.createElement("span",{className:"p-browse_page_member_card_entity__info_text"},F.t("Based on public channels and conversations with you",{ns:"member_profile"})),ew=n.createElement("div",null,n.createElement("span",{className:i()({"p-browse_page_member_card_entity__primary_joiner_launchpad":W})},n.createElement("span",{className:"p-browse_page_member_card_entity__primary"},n.createElement(p.A,{lines:Y,ref:K},eC)),W&&eE),n.createElement("span",{className:"p-browse_page_member_card_entity__secondary"},n.createElement(p.A,{lines:Z,ref:$},ev,ec&&n.createElement(u.Ay,{tip:eI},n.createElement(d.A,{"aria-disabled":"true",className:"p-browse_page_member__info",onClick:e=>{e.preventDefault(),e.stopPropagation()},tabIndex:et?-1:void 0},eS))))),eT=n.createElement("div",{id:`browse_page_member_info_${e}`,className:i()("p-browse_page_member_card_entity__info",{"p-browse_page_member_card_entity__info__extended":U,"p-browse_page_member_card_entity__info__joiner_launchpad":W})},ee||et?n.createElement(u.Ay,{tip:n.createElement("div",{className:"p-browse_page_member_card_entity__tooltip","data-qa":"browse_page_member_card_entity__tooltip"},eC,ev,ec&&n.createElement(n.Fragment,null,eS,eI))},ew):ew),eN=n.createElement("div",{className:i()("p-browse_page_member_card_entity__info",{"p-browse_page_member_card_entity__info__joiner_launchpad":W})},n.createElement("div",{className:"c-button c-button--primary c-button--small p-browse_page_member_card_entity__info__joiner_launchpad_button","aria-hidden":!0},ex)),eM=L?n.createElement(m.A,{className:"p-browse_page_member_card_entity__select_circle_icon","data-qa":"browse_page_member_card_entity_is_selected_icon",type:"circle-checkbox-checked",inline:!0}):null,eR=n.createElement("div",{className:"p-browse_page_member_card_entity__avatar"},P&&!eu&&(!O||L)&&n.createElement("div",{className:"p-browse_page_member_card_entity__select_circle","data-qa":"browse_page_member_card_entity_select_circle"},eM),n.createElement(h.Ay,{"data-qa":"browse_page_member_card_entity_avatar",userId:e,size:A,isInteractive:!1,showBadge:!1,resetIA:!0}),R&&eu&&!P&&n.createElement(c.Ay,{type:"outline",size:"medium",className:"p-browse_page_member_card_entity__edit_btn","data-qa":"browse_page_member_card_entity_edit_btn",onClick:e=>{e.stopPropagation(),D()}},n.createElement(m.A,{type:"pencil",inline:!0,className:"margin_right_50"}),F.t("Edit")),ef&&n.createElement(g.A,{className:"p-browse_page_member_card_entity__team_icon","data-qa":"browse_page_member_card_entity_team_icon",id:s,size:28,showTooltip:!0}),n.createElement("div",{className:"p-browse_page_member_card_entity__avatar--hover_overlay","data-qa":"browse_page_member_card_entity_avatar_hover_overlay"}));(0,n.useEffect)(()=>{if(!K.current&&!$.current)return;let e=el||w||eo?2:3;W&&(e=2);let t=Y;K.current&&(0,T.c)(K.current)?t=Math.min(e,Y+1):K.current&&X.current&&K.current.offsetHeight<X.current&&(t=Math.max(1,Y-1)),Q(t),X.current=K.current&&K.current.offsetHeight;let a=U?4:3;W&&(a=3),J(Math.max(a-t,1))},[Y,eg,w,el,A,eo,U,W]);let eP=i()(t,"p-browse_page_member_card_entity",{"p-browse_page_member_card_entity--has_hover_overlay":!W,"p-browse_page_member_card_entity--dim":M||em,"p-browse_page_member_card_entity--is-selected":P&&L,"p-browse_page_member_card_entity__joiner_launchpad":W}),eL=n.createElement(n.Fragment,null,eR,W&&(ea||G)&&!e_&&!eh?eN:eT);return!W||e_||eh?n.createElement("div",{className:eP,"data-qa":z?.isUnknown||z?.isNonExistent?void 0:"browse_page_member"},eL):n.createElement("div",{className:eP,tabIndex:-1,onMouseEnter:er,onMouseLeave:ei,onFocus:er,onBlur:ei,"data-qa":"browse_page_member"},eL)}BrowsePageMemberCardEntity.displayName="BrowsePageMemberCardEntity";let U=(0,M.N)((e,t)=>{let a=t.memberWithoutHighlights;return{teamId:(0,w.Ux)(e,a),displayRealNamesPref:(0,P.E)(e),inOnboarding:(0,R.Yx)(e),isDisplayPronounsEnabled:(0,A.A)(e),isUserHidden:a&&(0,O.a)(e,a.id),isOnline:!!t.isJoinerLaunchpadOn&&"active"===(0,D.gd)(e,a.id)}},e=>({openEditProfileModal:(...t)=>e((0,L.o)(...t))}))(BrowsePageMemberCardEntity)},0x2ba6d5d6:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x125763ad),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x15f8e452a),m=a(0xb790209f),u=a(0x202fa5d55),p=a(0x1b9d5cc0c),h=a(0x4b8e0952),_=a(0x1ef4b4237),f=a(0x1c91944c9),b=a(0xf1527618),g=a(0x1c56fcf95),y=a(0xe684f705);let A=new s.Ay("member_profile");function BrowsePageMember({id:e,memberWithoutHighlights:t,memberMetadata:a,avatarSize:r=158,lastRequestQuery:s="",inOnboarding:f=!1,selectMode:b=!1,isSelected:g=!1,hasMaxSelected:y=!1,topTermsQuery:x="",isJoinerLaunchpadOn:E=!1,isInviter:C=!1,isFocusable:k=!1,joinerLaunchpadCardTabIndex:v=-1,joinerLaunchpadBrowseMemberRef:S=l.A,onJoinerLaunchpadCardKeyDown:I=l.A,onJoinerLaunchpadCardClick:w=l.A}){let T,N=(0,h.z1)(t)?t:(0,o.A)({},t,a||{}),M=(0,n.useRef)(null),R=!!N.top_terms,P=!!N.similar,L=(0,p.jm)(N)||{},[O,D]=(0,n.useState)(!1),[F,U]=(0,n.useState)(""),B=(0,n.useCallback)(()=>{D(!0)},[]),H=(0,n.useCallback)(()=>{D(!1)},[]);(0,p.zU)(N)?T=A.t("Invited member"):f&&(0,p.fy)(N)?T=A.t("That\u2019s you!"):(0,_.B_)(L)?T=n.createElement("span",null,n.createElement(d.A,{className:"p-browse_page_member__sparkles",type:"sparkles-filled",inline:!0,size:"inherit"}),A.t("Found in profile")):(R||P)&&(T=n.createElement("span",null,n.createElement(d.A,{className:"p-browse_page_member__sparkles",type:"sparkles-filled",inline:!0,size:"inherit"}),R?A.rt("Talks about \u201C{query}\u201D",{query:n.createElement("span",{className:"p-browse_page_member__top_terms_term"},n.createElement(u.A,{text:x||s}))}):A.rt("Talks about similar topics")));let W=n.createElement(m.A,{id:e,memberWithoutHighlights:t,memberMetadata:a,subtext:T,avatarSize:r,selectMode:b,isSelected:g,hasMaxSelected:y,isJoinerLaunchpadOn:E,isInviter:C,isFocused:k&&O,className:i()({"c-joiner_launchpad__people-card-outline-button":E}),setAriaLabel:U});return E?n.createElement("div",{role:"none"},n.createElement(c.Nm,{className:"p-browse_page_member p-browse_page_member_card_entity--has_hover_overlay c-joiner_launchpad__people-card",role:"listitem","aria-label":F,tabIndex:v,ref:S,onKeyDown:I,onFocus:B,onBlur:H,onClick:w},W)):n.createElement("div",{className:i()("p-browse_page_member"),role:"presentation",ref:M},W)}BrowsePageMember.displayName="BrowsePageMember";let x=(0,f.N)((e,t)=>{let{id:a,browserInstanceId:n}=t,r=n?(0,g.gK)(e,n):null,i=r?r.metadata[a]:void 0;return{memberWithoutHighlights:t.member||(0,y.nv)(e,a),memberMetadata:i,lastRequestQuery:r?r.lastRequestData.query:"",inOnboarding:(0,b.Yx)(e)}})(BrowsePageMember)},0x21a4f0941:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x2ba6d5d6).A},0x1623d397f:(e,t,a)=>{"use strict";a.d(t,{A:()=>v});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x237b6a339),o=a(0x1cbdfeceb),s=a(0x1e2051844),c=a(0x55098bc0),d=a(0x128c3200c),m=a(0x1f022ebd9),u=a(0x62a17882),p=a(0x224f7f0e9),h=a(0x23723e37b),_=a(0x1a256ff50),f=a(0x2343fde45),b=a(0xeaeb4a22),g=a(0x15279822),y=a(0x117819608);function GridCell({className:e,renderContents:t=()=>null,cellKey:a,tabIndex:r=-1,rowIndex:l,hasNoPadding:s=!1,hasKeyboardFocus:c=!1,hasKeyboardFocusWithin:d=!1,hideFocusRing:m=!1,onFocus:u=o.A,onBlur:_=o.A,onFocusWithin:f=o.A,onClick:b=o.A,onKeyDown:A=o.A,refToForward:x,...E}){let C=(0,n.useRef)(null),k=(0,n.useCallback)(e=>{let{currentTarget:t}=e;(0,y.Jz)(t),u(e,{key:a})},[a,u]),v=(0,n.useCallback)(e=>{let{target:t,currentTarget:n,keyCode:r}=e;A({id:a,rowIndex:l,...e}),r!==p.Fm||t!==n||((0,g.Py)(n).length>=1&&b===o.A?(0,y.rp)(n):b({...e,key:a}))},[a,b,A,l]),S=(0,n.useCallback)(e=>{b({...e,key:a})},[a,b]);(0,n.useEffect)(()=>{d&&f({key:a})},[a,c,d,f]),(0,n.useLayoutEffect)(()=>{c||d||(0,y.c)(C.current??void 0)},[c,d]),(0,n.useImperativeHandle)(x,()=>C.current);let I=i()(e,"p-bp__grid_cell",{"p-bp__grid_cell--focus":c&&!m,"p-bp__grid_cell--focus-within":d,"p-bp__grid_cell--no-padding":s});return n.createElement("div",{...(0,h.A)(E),ref:C,role:"gridcell","data-qa":"bp_grid_cell",className:I,onFocus:k,onBlur:_,onKeyDown:v,onClick:S,tabIndex:r},t({hasKeyboardFocus:c,hasKeyboardFocusWithin:d}))}GridCell.displayName="GridCell";let A=(0,f.A)(n.forwardRef((e,t)=>n.createElement(GridCell,{...e,refToForward:t})));function GridRow({rowIndex:e,ariaOwns:t}){return n.createElement("div",{role:"row",className:"p-bp__grid_row offscreen","data-qa":`grid_row__${e}`,"aria-rowindex":e,"aria-owns":t})}GridRow.displayName="GridRow";let x=GridRow;var E=a(0x1ebb179c7),C=a(0x110b4f809);function Grid({children:e=null,id:t=(0,l.A)("grid"),className:a,keys:r,cellRenderer:f,getPropsForCell:g=o.A,hasKeyboardFocus:k=!1,hasKeyboardFocusWithin:v=!1,onFocus:S=o.A,onBlur:I=o.A,onCellFocus:w=o.A,onCellClick:T=o.A,onCellKeyDown:N=o.A,gridGap:M=4,minColumns:R=1,gridClassName:P="",cellWidth:L,cellHeight:O,shouldStretchCell:D=!1,shouldAnimateOnScroll:F=!0,initialScrollTop:U=0,onScroll:B=o.A,refToForward:H,onMount:W=o.A,includeScrollbar:V=!0,appendContent:G,prependContent:q,scrollbarRef:j,...z}){let K=(0,n.useRef)(null),$=(0,n.useRef)(null),Y=V?$:j??$,Q=(0,n.useRef)(null),Z=(0,n.useRef)(null),J=(0,n.useRef)(null),[X,ee]=(0,C.A)(!1,250),[et,ea]=(0,n.useState)(1),[en,er]=(0,n.useState)(r.length),[ei,el]=(0,n.useState)(null),[eo,es]=(0,n.useState)(null),[ec,ed]=(0,n.useState)(L),[em,eu]=(0,n.useState)(O),[ep,eh]=(0,n.useState)(0),e_=(0,n.useCallback)(({bounds:e})=>{eh(e?.width??0)},[]),ef=(0,n.useCallback)(()=>Y?.current?.scrollTop()??0,[Y]),eb=(0,n.useCallback)(()=>Y?.current?.scroller,[Y]),eg=null!==eo,ey=eo?r.indexOf(eo):-1,eA=(0,y.Al)(r,eo??"",en),ex=r.length-1,eE=0===ey,eC=ey===ex,ek=en-1,ev=et-1,eS=(0,n.useCallback)(e=>{if(!e)return{width:ec,height:em};let[t]=(0,y.Al)(r,e,en),a=t*em,n=a+em;return{top:a,bottom:n,width:ec,height:em}},[em,ec,r,en]),eI=(0,n.useCallback)(e=>{let{top:t,bottom:a}=eS(e),n=ef(),r=n+(eb()?.offsetHeight??0);return(t??0)>=n&&(a??0)<=r},[eS,eb,ef]),ew=(0,n.useCallback)(()=>{let[e,t]=eA;return eE?eA:0===t&&e>0?[e-1,ek]:[e,t-1]},[eA,eE,ek]),eT=(0,n.useCallback)(()=>{let[e,t]=eA;return eC?eA:t===ek?[e+1,0]:[e,t+1]},[eA,eC,ek]),eN=(0,n.useCallback)(()=>{let[e,t]=eA;return 0===e?eA:[e-1,t]},[eA]),eM=(0,n.useCallback)(()=>{let[e,t]=eA,a=(0,y.yk)([e+1,t],en)>ex;return e===ev||a?eA:[e+1,t]},[eA,ex,ev,en]),eR=(0,n.useCallback)(e=>{switch(e){case p.UQ:return ew();case p.LE:return eT();case p.i7:return eN();case p.n6:return eM();default:return eA}},[ew,eT,eN,eM,eA]),eP=(0,n.useCallback)(e=>{if(!eg)return ei&&!eI(ei)?(0,s.A)(r,eI):ei;let t=eR(e);return(0,y.WA)(r,t,en)},[eR,eg,ei,eI,r,en]),eL=(0,n.useCallback)(()=>{let e=(0,s.A)(r,eI);e&&(es(e),el(e))},[eI,r]),eO=(0,n.useCallback)(()=>{let e=(0,c.A)(r,eI);e&&(es(e),el(e))},[eI,r]),eD=(0,n.useCallback)(()=>{ei&&eI(ei)?es(ei):eL()},[eL,ei,eI]),eF=(0,n.useCallback)(()=>{ei&&eI(ei)?es(ei):eO()},[eO,ei,eI]),eU=(0,n.useCallback)(e=>{ee(!0),B(e,{scrollTop:ef()})},[B,ee,ef]),eB=(0,n.useCallback)(e=>{let{keyCode:t}=e;if(![p.i7,p.n6,p.UQ,p.LE].includes(t))return;e.preventDefault();let a=eP(t);a&&(es(a),el(a))},[eP]),eH=(0,n.useCallback)((e,{key:t})=>{let{target:a,currentTarget:n,relatedTarget:r}=e;if(!eg&&n===a&&eI(t)){es(t),el(t);return}if(!eg&&!r&&n.contains(a)){es(null),el(t);return}w(e)},[eg,eI,w]),eW=(0,n.useCallback)(({key:e})=>{es(null),el(e)},[]);(0,n.useImperativeHandle)(H,()=>({focus:()=>{ei&&eI(ei)?es(ei):eL()},setActiveCell:e=>es(e),scrollTop:e=>Y?.current?.scrollTop(e)}),[eL,ei,eI,es,Y]),(0,m.A)(()=>{W()},[]),(0,n.useEffect)(()=>{if(!K.current)return;let{width:e,height:t}=K.current.getBoundingClientRect(),a=Math.floor((e+M)/(L+M)),n=Math.ceil(r.length/a);if(n!==et&&ea(n),a!==en&&er(a),D){let r=Math.ceil((e+M)/a-M),i=Math.max(O,Math.ceil((t+M)/n-M));ed(Math.max(L,r)),eu(i)}},[O,L,ep,M,r.length,D,en,et]),(0,n.useEffect)(()=>{let e,t=eb();if(!k&&!v||!eg||!K.current||!t||eI(eo))return;let a=t.getBoundingClientRect(),n=eS(eo),r=K.current.offsetHeight;e=Math.ceil((0,y.w3)(n.top??0,r,a.height)),F?Y?.current?.scrollWithAnimation(e):Y?.current?.scrollTop(e)},[eo,eS,eg,eI,F,k,v,eb,Y]),(0,m.A)(()=>{!v&&eg&&(es(null),el(eo))},[v]),(0,n.useLayoutEffect)(()=>{!X&&eo&&eI(eo)&&J.current?.focus()},[eo,eI,X]);let eV=(0,n.useCallback)(e=>{es(null),T(e)},[T]),eG=(0,d.A)(r,en).reduce((e,a,r)=>{let i=[],l=a.map((e,a)=>{let l=`${t}-gridcell-${e}`,o=g({key:e}),s=(0,_.Ay)(eA,[r,a]);return i.push(l),n.createElement(A,{id:l,key:e,cellKey:e,rowIndex:r,ref:s?J:void 0,onFocus:eH,onFocusWithin:eW,onClick:eV,onKeyDown:N,renderContents:t=>f(a,{key:e,cellWidth:ec,...t}),...o})}),o=n.createElement(x,{key:`${t}_row${r+1}`,rowIndex:r+1,ariaOwns:i.join(" ")});return e.concat(o,l)},[]),eq=i()(a,"p-bp__grid_container"),ej=i()(P,"p-bp__grid"),ez={minWidth:(0,y.tX)(R,L,M),gridGap:M,gridAutoRows:D?void 0:`${O}px`,gridTemplateColumns:D?`repeat(auto-fill, minmax(${L}px, 1fr))`:`repeat(auto-fill, ${L}px)`},eK=k||v?-1:0,renderContents=()=>n.createElement("div",{className:"p-bp__grid_container_content"},q&&q,n.createElement("div",{...(0,h.A)(z),role:"grid","aria-readonly":!!(0,u.uF)()||!!z["aria-readonly"]||void 0,"aria-rowcount":et,"aria-colcount":en,className:ej,ref:K,style:ez,onFocus:S,onBlur:I},n.createElement("div",{className:"p-bp__grid__tab_stop","data-qa":"grid-top-tab-stop",ref:Q,tabIndex:eK,onFocus:eD}),eG,n.createElement("div",{className:"p-bp__grid__tab_stop","data-qa":"grid-btm-tab-stop",ref:Z,tabIndex:eK,onFocus:eF})),e,G&&G);return renderContents.displayName="renderContents",n.createElement(E.A,{onResize:e_,className:eq},({width:e,height:t})=>n.createElement("div",{role:"presentation",onKeyDown:eB},V?n.createElement(b.A,{width:e,height:t,initialScrollTop:U,onScroll:eU,ref:Y,role:"presentation"},renderContents()):renderContents()))}Grid.displayName="Grid";let k=n.forwardRef((e,t)=>n.createElement(Grid,{refToForward:t,...e})),v=(0,f.A)(k)},0x117819608:(e,t,a)=>{"use strict";a.d(t,{Al:()=>getCoordsFromKey,Jz:()=>enableTabIndexes,WA:()=>getKeyFromCoords,c:()=>disableTabIndexes,rp:()=>focusFirstFocusableChild,tX:()=>calculateMinWidth,w3:()=>getBracketedScrollTop,yk:()=>getIdxFromCoords});var n=a(0x1b0fc7140),r=a(0x4e47e388),i=a(0x15279822);let getIdxFromCoords=([e,t],a)=>[e,t,a].every(n.A)?e*a+t:-1,getCoordsFromKey=(e,t,a)=>{let r=e.indexOf(t);return -1!==r&&(0,n.A)(a)?[r,a].every(e=>(0,n.A)(e)&&e>=0)?0===a?[0,r]:[Math.floor(r/a),r%a]:[]:[]},getKeyFromCoords=(e,t,a)=>{if(!(0,n.A)(a))return"";let r=getIdxFromCoords(t,a);return -1!==r?e[r]:""},calculateMinWidth=(e,t,a)=>e<=1?t:e*t+(e-1)*a,focusFirstFocusableChild=e=>{let t=(0,i.Fp)(e);t&&t.focus()},getBracketedScrollTop=(e,t,a)=>Math.max(0,Math.min(t-a,e)),enableTabIndexes=e=>{e&&e.querySelectorAll("[data-remove-tab-index]").forEach(e=>{e.removeAttribute("tabindex"),delete e.dataset.removeTabIndex})},disableTabIndexes=e=>{e&&(0,i.rO)(e).forEach(e=>{e.getAttribute("data-keep-tabindex")||(e.setAttribute("tabindex","-1"),e.dataset.removeTabIndex="true")})};(0,r.A)(e=>{if(!e)return;e.querySelectorAll("[data-remove-tab-index]").forEach(e=>{e.removeAttribute("tabindex"),delete e.dataset.removeTabIndex});let t=e.getBoundingClientRect();(0,i.rO)(e).forEach(e=>{if(!e.getAttribute("data-keep-tabindex")){let a;a=e.getBoundingClientRect(),a.top>=t.top&&a.bottom<=t.bottom&&a.left>=t.left&&a.right<=t.right||(e.setAttribute("tabindex","-1"),e.dataset.removeTabIndex="true")}})},500)},0x484c21c7:(e,t,a)=>{"use strict";a.d(t,{hF:()=>BucketedScopesList});var n,r=a(0xbad225b5),i=a(0x45bd075),l=a(0x1d2cd7755),o=a(0x1faa3f1ac),s=a(0x8c8bafa3),c=a(0x20482ad21);let d=`https://api.${(0,s.Xk)()}`,m=new c.Ay("workspace_apps_manage"),u="p-bucketed_scopes_list",p="p-bucketed_scopes_list__scope_heading",h="p-bucketed_scopes_list__scope_list_item",_="p-bucketed_scopes_list__scope_list_item__link",f="p-bucketed_scopes_list__scope_list_item__name",b="p-bucketed_scopes_list__scope_list_item__desc",g="p-bucketed_scopes_list__required_scope_list_heading_item",y="p-bucketed_scopes_list__scope_list_heading_desc",A="p-bucketed_scopes_list__scope_item-scope--";function OptionalScopeItem({name:e,description:t,tokenType:a,isSelected:n,enablePermissionsSelection:s,isApproved:c,selectedLabelText:m,unselectedLabelText:u,onSelect:p}){let g=(0,r.useCallback)(()=>{p(e,a)},[p,e,a]);return r.createElement("li",{"data-qa":`${A}${a}`,key:`scopes-${e}`,className:h},s&&r.createElement("div",{className:"p-bucketed_scopes_list__optional_scope_list_allow_item"},r.createElement(l.A,{text:n?m:u,type:"inline",cursor:"pointer"},r.createElement(i.A,{checked:n,onChange:g,disabled:c}))),r.createElement("div",{className:s?"p-bucketed_scopes_list__optional_scope_list_item__name":f},r.createElement(o.A,{href:`${d}/scopes/${e}`,className:_},e)),r.createElement("div",{className:b},t))}function BucketedOptionalScopesItems({scopes:e,selectedOptionalScopes:t,onOptionalScopeSelect:a,enablePermissionsSelection:n=!1,experimentSlackAppsOptionalScopesFeGroupOn:i=!1}){let l=(0,r.useCallback)(e=>t?.some(t=>t.name===e),[t]),o=(0,r.useCallback)((n,r)=>{if(!r||!t)return;let i=e.find(e=>e.name===n);if(i?.isApproved!==!1)return;let o=l(n)?t?.filter(e=>e.name!==n):[...t,i];a?.(o,r)},[t,e,a,l]),s=i?m.t("Yes"):"Yes",c=i?m.t("No"):"No";return r.createElement(r.Fragment,null,e.map(e=>r.createElement(OptionalScopeItem,{key:`scopes-${e.name}`,name:e.name,description:e.description,tokenType:e.tokenType,isSelected:!!l(e.name),enablePermissionsSelection:n,isApproved:e.isApproved??!1,selectedLabelText:s,unselectedLabelText:c,onSelect:o})))}function BucketedScopesItems({scopes:e}){return r.createElement(r.Fragment,null,e.map(e=>{let{description:t,name:a,tokenType:n}=e;return r.createElement("li",{"data-qa":`${A}${n}`,key:`scopes-${a}`,className:h},r.createElement("div",{className:f},r.createElement(o.A,{href:`${d}/scopes/${a}`,className:_},a)),r.createElement("div",{className:b},t))}))}function BucketedScopesSection({scopes:e,selectedOptionalScopes:t,onOptionalScopeSelect:a,enablePermissionsSelection:n=!1,isAllScopesSelected:o=!1,handleAllScopesSelect:s,experimentSlackAppsOptionalScopesFeGroupOn:c}){let d=c?m.t("OAuth Scopes"):"OAuth Scopes",p=c?m.t("Optional"):"Optional",f=c?m.t("Allow"):"Allow";return r.createElement(r.Fragment,null,c&&r.createElement("div",{className:"p-bucketed_scopes_list__required_scope_heading"},r.createElement("div",{className:"p-bucketed_scopes_list__required_scope_heading_text"},m.t("Required")),r.createElement("div",{className:"p-bucketed_scopes_list__required_scope_list_heading"},r.createElement("div",{className:g},d),r.createElement("div",{className:y},m.t("Description")))),r.createElement("ul",{className:u},r.createElement(BucketedScopesItems,{scopes:c?e.filter(e=>!e.isOptional):e,scopeListItemClassName:h,scopeListItemLinkClassName:_,scopeListItemDescClassName:b})),c&&e.filter(e=>e.isOptional).length>0&&r.createElement(r.Fragment,null,r.createElement("div",{className:"p-bucketed_scopes_list__optional_scope_heading"},r.createElement("div",{className:"p-bucketed_scopes_list__optional_scope_heading_text"},p),r.createElement("div",{className:"p-bucketed_scopes_list__optional_scope_list_heading"},n&&r.createElement("div",{className:"p-bucketed_scopes_list__optional_scope_list_allow_heading_item"},r.createElement(l.A,{text:f,type:"inline",cursor:"pointer"},r.createElement(i.A,{checked:o,onChange:s,disabled:!n}))),r.createElement("div",{className:n?"p-bucketed_scopes_list__optional_scope_list_heading_item":g},d),r.createElement("div",{className:y},m.t("Description")))),r.createElement("ul",{className:u},r.createElement(BucketedOptionalScopesItems,{scopes:e.filter(e=>e.isOptional),scopeListItemClassName:h,scopeListItemLinkClassName:_,scopeListItemDescClassName:b,selectedOptionalScopes:t,onOptionalScopeSelect:a,enablePermissionsSelection:n,experimentSlackAppsOptionalScopesFeGroupOn:c}))))}OptionalScopeItem.displayName="OptionalScopeItem",BucketedOptionalScopesItems.displayName="BucketedOptionalScopesItems",BucketedScopesItems.displayName="BucketedScopesItems",BucketedScopesSection.displayName="BucketedScopesSection";var x=a(0x226892387),E=((n={}).bot="bot",n.user="user",n.app="app",n),C=a(0x5dd1c0f2),k=a(0x14149c126);function BucketedScopesList({appId:e,bucketedScopes:t,selectedBucketedScopes:a,onOptionalScopeSelect:n,enablePermissionsSelection:i=!1}){let{name:l}=(0,x.d4)(t=>(0,C.sO)(t,e)),o=(0,x.d4)(e=>"on"===(0,k._Z)(e,"slack_apps_optional_scopes_fe"));if(Array.isArray(t))return null;let isAllScopesSelected=e=>t[e]?.length===a?.[e]?.length,handleAllScopesSelect=e=>{let r=isAllScopesSelected(e)?a?.[e]?.filter(e=>!e.isOptional):t?.[e];return n?.(r||[],e)},getSectionHeaderText=e=>{switch(e){case E.bot:return m.rt("On behalf of the bot, {app_name} can: ",{app_name:l,fallbackHash:"02c36d911a83e0c0286eb57bf8dc084f447f80e5"});case E.user:return m.rt("On behalf of users,  {app_name} can: ",{app_name:l,fallbackHash:"02c36d911a83e0c0286eb57bf8dc084f447f80e5"});case E.app:default:return m.rt("On behalf of the app,  {bot_name} can: ",{bot_name:l,fallbackHash:"02c36d911a83e0c0286eb57bf8dc084f447f80e5"})}};return r.createElement(r.Fragment,null,t.bot?.length?r.createElement(r.Fragment,null,r.createElement("h4",{className:p},getSectionHeaderText(E.bot)),r.createElement(BucketedScopesSection,{scopes:t.bot,isAllScopesSelected:isAllScopesSelected(E.bot),handleAllScopesSelect:()=>handleAllScopesSelect(E.bot),selectedOptionalScopes:a?.bot,onOptionalScopeSelect:e=>{let t;return t=E.bot,n?.(e,t)},enablePermissionsSelection:i,experimentSlackAppsOptionalScopesFeGroupOn:o})):null,t.user?.length?r.createElement(r.Fragment,null,r.createElement("h4",{className:p},getSectionHeaderText(E.user)),r.createElement(BucketedScopesSection,{scopes:t.user,isAllScopesSelected:isAllScopesSelected(E.user),handleAllScopesSelect:()=>handleAllScopesSelect(E.user),selectedOptionalScopes:a?.user,onOptionalScopeSelect:e=>n?.(e,E.user),enablePermissionsSelection:i,experimentSlackAppsOptionalScopesFeGroupOn:o})):null,t.app?.length?r.createElement(r.Fragment,null,r.createElement("h4",{className:p},getSectionHeaderText(E.app)),r.createElement(BucketedScopesSection,{scopes:t.app,isAllScopesSelected:isAllScopesSelected(E.user),handleAllScopesSelect:()=>handleAllScopesSelect(E.user),selectedOptionalScopes:a?.user,onOptionalScopeSelect:e=>n?.(e,E.user),enablePermissionsSelection:i,experimentSlackAppsOptionalScopesFeGroupOn:o})):null)}BucketedScopesList.displayName="BucketedScopesList"},0x1f333babe:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11a296110),l=a(0x143e03a71),o=a(0x1867bf0de),s=a(0x4533033f),c=a(0x1aab9bb8c),d=a(0x246366b61),m=a(0x20e80190e),u=a(0x45012309),p=a(0x1a769a9e8),h=a(0x1c91944c9),_=a(0x5dd1c0f2),f=a(0x1fcbb004d);let b=new r.Ay("calendar"),g=class extends n.Component{constructor(e){super(e),this.handleLinkClick=this.handleLinkClick.bind(this),this.onModalClose=this.onModalClose.bind(this),this.getCloggingParams=this.getCloggingParams.bind(this)}componentDidMount(){(0,s.BI)(...this.getCloggingParams())}onModalClose(){this.props.closeModal(),(0,s.q7)(...this.getCloggingParams())}getCloggingParams(){let{clogger:e,popupType:t}=this.props;return[e,{appType:this.props.appType,popupType:t}]}getAppIcon(){let{app:e}=this.props,t=e&&e.icons,a=(0,p.A)({icons:t||void 0},48);return n.createElement("img",{alt:"Calendar",className:"calendar-image",src:a})}handleLinkClick(){let{launchedFrom:e}=this.props;"event_block"===e?(0,l.JS)(...this.getCloggingParams()):(0,s.GC)(...this.getCloggingParams())}render(){let{appType:e}=this.props,t=o.E[e];return n.createElement(m.dW,{closeModal:this.onModalClose,centered:!0},n.createElement(m.rQ,null,n.createElement(m.Rc,{icon:this.props.icon||this.getAppIcon(),title:b.t("Connect calendar")})),n.createElement(m.$m,null,n.createElement(m.qf,{"data-qa":"dialog_body"},n.createElement("span",null,e===c.vq?b.rt("Looks like <calendar-name>calendar</calendar-name> is installed but you don\u2019t have any connected calendars. Connect a calendar to start creating events!",{fallbackHash:"b6f25d3eafa451a3ad0697a2333cfec4abb985e8"},({tag:e,text:a})=>"calendar-name"===e?t:a):b.rt("Looks like <calendar-name>calendar</calendar-name> Calendar is installed but you don\u2019t have any connected calendars. Connect a calendar to start creating events!",null,({tag:e,text:a})=>"calendar-name"===e?t:a)),n.createElement("br",null))),n.createElement(m.jl,null,n.createElement(m.ox,null,n.createElement(m.s_,{type:"outline",onClick:this.onModalClose,"aria-label":b.t("Close")},b.t("Close")),n.createElement(i.Ay,{type:"primary",target:"_blank",rel:"noopener noreferrer",href:this.props.authUrl,onClick:this.handleLinkClick},b.t("Connect a calendar")))))}};g.displayName="CalendarAuthLauncher";let y=(0,h.N)((e,{appType:t})=>({clogger:(0,u.eo)({state:e}),app:(0,_.sO)(e,(0,d.U)(t)||"")||null}),e=>({closeModal:()=>e((0,f.O)())}))(g)},0x77d3d789:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>eJ,Qo:()=>renderLauncherModal});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xb1ea448c),l=a(0x1f333babe),o=a(0x1626b8eae),s=a(0x1cbdfeceb),c=a(0x1075d3a9c),d=a.n(c),m=a(0xb97b797e),u=a(0x16ac9b089),p=a(0x1a256ff50),h=a(0x2b7f0bcc),_=a(0xce378727),f=a(0x1d2cd7755),b=a(0x126f22530),g=a(0xca04f009),y=a(0x1faa3f1ac),A=a(0x780e190c),x=a(0x10d53599f),E=a(0x19dc73101),C=a(0x77727995),k=a(0x15f8e452a),v=a(0x4c96e5d9),S=a(0x8699e4b9),I=a(0xa089d16d),w=a(0x213b6b336),T=a(0x303de21b),N=a(0x22a29f141),M=a(0x1dfdeb1c8);let R=(0,M.A)("Call to get calendar user info",(e,t,{appType:a})=>e((0,N.apiCall)({method:"calendar.user.info",args:{app_type:a},reason:"calendar-user-info-api"})));R.meta={name:"getUserCalendarInfo",key:"createFetcherGetUserCalendarInfo",description:"Call to get calendar user info"},(0,M.A)("Call to get attendee free-busy info",(e,t,{calUserId:a,day:n,minutes:r,attendees:i})=>e((0,N.apiCall)({method:"calendar.freebusy",args:{calapp_user_id:a,day:n,minutes:r,attendee_user_ids:i.length?i:void 0},reason:"calendar-freebusy-api"}))).meta={name:"getUserCalendarFreeBusyInfo",key:"createFetcherGetUserCalendarFreeBusyInfo",description:"Call to get attendee free-busy info"};let P=(0,M.A)("Call to create calendar event",(e,t,{calUserId:a,startTime:n,endTime:r,attendeeUserIds:i,description:l,location:o,title:s,channelId:c,threadTs:d,calendarId:m})=>e((0,N.apiCall)({method:"calendar.event.create",args:{calapp_user_id:a,end:r,start:n,attendee_user_ids:i.length?i:void 0,description:l,meeting_url:o??"",title:s,channel:c??"",thread_ts:d??"",calendar_id:m??""},reason:"calendar-event-create-api"})));P.meta={name:"postCalendarEventCreate",key:"createFetcherPostCalendarEventCreate",description:"Call to create calendar event"};let L=(0,M.A)("get a list of conference apps",e=>e((0,N.apiCall)({method:"rooms.appOptions.list",reason:"rooms-app-options-list",args:{}})));L.meta={name:"getConferenceAppList",key:"createFetcherGetConferenceAppList",description:"get a list of conference apps"};let O=(0,M.A)("get url for room which users can join",(e,t,{appId:a,channelId:n})=>e((0,N.apiCall)({method:"rooms.request",args:{app:a,channel:n},reason:"rooms-request"})));O.meta={name:"requestRoom",key:"createFetcherRequestRoom",description:"get url for room which users can join"};let D=(0,M.A)("get list of members for a channel if it has total members no more than given limit",(e,t,{channelId:a,memberCountLimit:n})=>e((0,w.t)({channelId:a})).then(r=>{if(!r)return;let{members:i}=r;return i>=n?[]:(0,T.ds)(e,t,a,i).then(e=>e)}));D.meta={name:"fetchMembersForChannelWithLimitedMembers",key:"createFetcherFetchMembersForChannelWithLimitedMembers",description:"get list of members for a channel if it has total members no more than given limit"};let F=(0,M.A)("Call to get connected calendars for user",(e,t,{calUserId:a})=>e((0,N.apiCall)({method:"calendar.getConnectedCalendars",args:{calapp_user_id:a},reason:"get-connected-calendars-api"})));F.meta={name:"getConnectedCalendars",key:"createFetcherGetConnectedCalendars",description:"Call to get connected calendars for user"};var U=a(0x4533033f),B=a(0x1ed767a16),H=a(0x45012309),W=a(0x1ec68d6a3),V=a(0x1c91944c9);let G=new r.Ay("calendar"),q=(0,W.Ay)({label:"CALENDAR-EVENT"}),j=class extends n.Component{constructor(e){super(e),this.state={conferenceApps:[],selectedConferenceApp:"",isRoomBeingRequested:!1,roomRequestError:""},(0,m.v)(this,["onConferenceAppSelected","onRemoveLink","updateMeetingUrlToParent","updateRoomBeingRequestedFlag","renderConferenceRoomLink","renderConferenceAppList","getConferenceAppListEmptyMessage"])}componentDidMount(){this.props.getConferenceAppList().then(e=>{e.ok&&this.setState(()=>({conferenceApps:(e.providers||[]).map(e=>({...e,id:e.id||"",name:e.name||"",image:e.image||""}))}))}).catch(e=>{q.error("calendar-event-calls-app-list","An error occurred while fetching calls app list",e)})}async onConferenceAppSelected(e){let{conferenceApps:t}=this.state,{channelId:a,clogger:n,appType:r}=this.props;this.setState(()=>({roomRequestError:""}));let i=t.find(t=>t.id===e);i&&i.id&&!i.roomLink&&(this.updateRoomBeingRequestedFlag(!0),await this.props.getLinkToRoom({appId:i.id,channelId:a}).then(e=>{e.ok&&this.setState(t=>({conferenceApps:t.conferenceApps.map(t=>i.id===t.id?Object.assign(t,{roomLink:e.url}):t)}))}).catch(e=>{let t=(0,C.A)(e,"data.error");this.setState(()=>({roomRequestError:t,selectedConferenceApp:""})),q.error("calendar-event-app-room-request",`params appId - ${i.id}`,"An error occurred while requesting call room",e)}).finally(()=>{this.updateRoomBeingRequestedFlag(!1)})),this.setState(()=>({selectedConferenceApp:e}),this.updateMeetingUrlToParent);let l=t.find(t=>t.id===e);(0,U.Am)(n,{appType:r,callingApp:l?.name??"none"})}onRemoveLink(){this.setState(()=>({selectedConferenceApp:""}))}getConferenceAppListEmptyMessage(){return G.t("No calling app found")}updateMeetingUrlToParent(){let{selectedConferenceApp:e,conferenceApps:t}=this.state,a=t.find(t=>t.id===e)?.roomLink;this.props.onMeetingUrlSet(a)}updateRoomBeingRequestedFlag(e){this.setState(()=>({isRoomBeingRequested:e}))}renderConferenceRoomLink(){let{selectedConferenceApp:e,conferenceApps:t,isRoomBeingRequested:a,roomRequestError:r}=this.state;if(a)return n.createElement(i.A,null);if(r){let e;switch(r){case"auth_required":e=G.t("Please connect your account to add a call",{fallbackHash:"5d80a16bb4815f11bf00b695d5181501f18855cf"});break;case"config_required":e=G.t("Your account requires additional configuration");break;default:e=G.t("Sorry, something went wrong. Try again in a moment.")}return n.createElement(h.Ay,{type:"inline",level:"info",align:"right"},n.createElement("span",null,e))}if(!e||"none"===e)return null;let l=t.find(t=>t.id===e);return n.createElement(v.Ay,{tip:G.t("Copy link"),position:"top"},n.createElement("div",null,n.createElement(k.A,{className:"link-icon",type:"link"}),n.createElement(y.A,{onClick:()=>{(0,B.x3)(l?.roomLink)}},G.t("Your {appName} meeting",{appName:l?.name}))))}renderConferenceAppList(){let{conferenceApps:e,selectedConferenceApp:t}=this.state,a=G.t("Choose an app",{fallbackHash:"8b39f3d15ffadd792f5c2ce38655642353fcfe0f"}),r=[];return e.forEach(e=>{r.push({label:n.createElement("div",{className:"conference-app"},n.createElement("span",{className:"app-logo"},n.createElement(I.A,{src:e.image.replace("dev602","dev1466")})),n.createElement("span",{className:"app-name"},e.name)),value:e.id})}),r.length&&r.push({label:n.createElement("div",{className:"conference-app"},n.createElement("span",{className:"app-logo"},n.createElement(k.A,{type:"stop-video",className:"none-option"})),n.createElement("span",{className:"app-name"},G.t("None"))),value:"none"}),n.createElement(S.Ay,{options:r,wrapperClassName:"conference-app-list",placeholder:n.createElement("div",{className:"conference-app"},n.createElement("span",{className:"app-logo"},n.createElement(k.A,{type:"video-camera"})),n.createElement("span",{className:"app-name"},a)),placeholderText:a,icon:t?void 0:"video-camera",value:t,optionClassName:"conference-option",usePlaceholderOption:!1,onChange:e=>this.onConferenceAppSelected(e),customGetOptionsListEmptyMessage:this.getConferenceAppListEmptyMessage})}render(){let{conferenceApps:e}=this.state;return e.length?n.createElement("div",{className:"conference-app-select"},n.createElement(f.A,{text:G.t("Video conferencing",{fallbackHash:"91f63fb778fbf778d23c69d5a31e985a9cacf308"}),optional:!0,htmlFor:"conf-app-list",id:"lbl-conference-1"},n.createElement("div",null,this.renderConferenceAppList())),n.createElement("div",{className:"conference-link"},this.renderConferenceRoomLink())):null}};j.displayName="ConferenceAppSelector";let z=(0,V.N)(e=>({clogger:(0,H.eo)({state:e})}),e=>({getConferenceAppList:()=>e(L()),getLinkToRoom:t=>e(O(t))}),null,{areStatePropsEqual:p.kt})(j);var K=a(0x16cf1da63),$=a(0x40c0d834),Y=a(0x15dd8a31),Q=a(0x3711e82d);let Z=new r.Ay("calendar"),ConnectedCalendarSelector=({calUserId:e,onCalendarSelect:t})=>{let a=(0,K.wA)(),[r,i]=(0,n.useState)([]),[l,o]=(0,n.useState)();(0,n.useEffect)(()=>{(async()=>{try{let t=await a(F({calUserId:e}));t.ok&&(i(t.connected_calendars.map(e=>({label:e.name,value:e.id}))),t.connected_calendars.length>0&&o({label:t.connected_calendars[0].name,value:t.connected_calendars[0].id}))}catch{i([])}})()},[a,i,o,e]);let s=(0,n.useCallback)(e=>{o(e),t&&t(e.value)},[t,o]);return 0===r.length?null:n.createElement($.A,{uiComponentName:Q.UiComponentName.CALENDAR_SELECTOR},n.createElement(f.A,{text:Z.t("Select a Calendar"),htmlFor:"calendar-select",id:"lbl-date-1"},n.createElement(Y.A,{className:"p-connected-calendar-selector-basic-select",options:r,size:"medium",width:"auto",ariaLabel:Z.t("Select a Calendar"),selectId:"calendar-select",onOptionSelected:s,selectedOption:l})),n.createElement("br",null))};ConnectedCalendarSelector.displayName="ConnectedCalendarSelector";var J=a(0xc48503ad),X=a.n(J),ee=a(0x1867bf0de),et=a(0x20e80190e),ea=a(0x1fcbb004d);let en=new r.Ay("calendar"),er=class extends n.Component{componentDidMount(){let{clogger:e,appType:t,clogData:a}=this.props;(0,U.EV)(e,{appType:t,details:a})}render(){return n.createElement(et.dW,{closeModal:this.props.closeModal,centered:!0},n.createElement(et.rQ,null,n.createElement(et.Rc,{icon:this.props.icon,title:en.t("Success")})),n.createElement(et.$m,null,n.createElement(et.qf,{"data-qa":"dialog_body"},n.createElement("span",null,en.rt("Event has been added to your <app-home-link>app home</app-home-link>. You can also see this event in your <calendar-link>calendar</calendar-link>.",null,({tag:e,key:t,text:a})=>{switch(e){case"app-home-link":return n.createElement(y.A,{key:t,href:this.props.appHomeDeepLink},a);case"calendar-link":return n.createElement(y.A,{href:this.props.providerEventLink,key:t,target:"_blank",rel:"noopener noreferrer"},a);default:return a}})))),n.createElement(et.jl,null,n.createElement(et.ox,null,n.createElement(et.s_,{type:"outline",onClick:this.props.closeModal,"aria-label":en.t("Close")},en.t("Close")))))}};er.displayName="CreateEventConfirmation",er.propTypes={providerEventLink:X().string.isRequired,appHomeDeepLink:X().string.isRequired,closeModal:X().func.isRequired,icon:X().node.isRequired,clogger:X().object.isRequired,appType:X().oneOf(Object.keys(ee.E)).isRequired,clogData:X().object},er.defaultProps={clogData:{}};let ei=(0,V.N)(e=>({clogger:(0,H.eo)({state:e})}),e=>({closeModal:(...t)=>e((0,ea.O)(...t))}))(er);var el=a(0x1feee1711),eo=a(0x45bd075),es=a(0x1aab9bb8c),ec=a(0x1c27175b3),ed=a(0x1ccef1c6f),em=a(0x12f41fc32);let eu=new r.Ay("calendar"),ShareEventInChannel=({channelId:e,onShareEventInChannel:t,setChannelToShareEventIn:a,userPrefShareEventInChannel:r,setUserPrefByApi:i})=>{let[l,o]=(0,n.useState)(r),s=eu.t("Share this meeting with");(0,n.useEffect)(()=>{t(l),i({pref:es.cG,value:l})},[l,t,i]);let c=(0,n.useCallback)(()=>{o(!l)},[l]),d=(0,n.useCallback)(e=>{a(e)},[a]);return n.createElement("div",{className:"p-create_event_modal__share_in_channel"},n.createElement(f.A,{text:s,type:"inline"},n.createElement(eo.A,{"data-qa":"share_with",checked:l,onChange:c})),n.createElement(ec.A,{ariaLabel:eu.t("Share this meeting with"),onChange:d,initialChannelId:e,isDisabled:!l,dialogType:"share_event_in_channel"}))};function share_event_in_channel_mapStateToProps(e){let t=(0,ed.ty)(e,es.cG);return{userPrefShareEventInChannel:!!(0,el.A)(t)||!!t}}ShareEventInChannel.displayName="ShareEventInChannel";let ep=(0,V.N)(share_event_in_channel_mapStateToProps,e=>({setUserPrefByApi:t=>e((0,em.AZ)(t))}))(ShareEventInChannel);var eh=a(0x2503b7c1);let printTimeFormat=e=>`${d().unix(e).format("hh:mma")}`,today=()=>d()().format("YYYY-MM-DD"),isToday=e=>d()().isSame(d()(e),"day");var e_=a(0x10645ca7d),ef=a(0x19c76d181),eb=a(0xe684f705);let eg=new r.Ay("calendar"),ey=(0,W.Ay)({label:"CALENDAR-EVENT"}),eA="startTime",ex="endTime",eE=class extends n.Component{constructor(e){super(e),this.state={startTime:"",endTime:"",startTimeError:!1,endTimeError:!1,eventDate:e.presetDate||e.defaultDate,selectionMode:es.ds.suggested,freeBusySlots:[],duration:"30",selectedCustomSlot:null,isFetchSuggestedSlotsAPIRequestInFlight:!1,hasValidTimeSlots:!1},(0,m.v)(this,["onDateChange","onDurationChanged","onCustomTimeSelected","onCustomTimeKeyedIn","onCustomInputBlur","clearError","changeTimeSlotSelectionMode","getAvailableTimesEmptyMessage","renderSuggestedSlotSelector","renderCustomSlotSelector","renderSuggestedTimeSlots"])}componentDidMount(){this.props.presetStartTime?this.changeTimeSlotSelectionMode():this.fetchTimeSlots()}componentDidUpdate(e){this.props.attendees.length!==e.attendees.length&&this.fetchTimeSlots()}onDateChange(e){let{clogger:t,appType:a}=this.props;this.setState(()=>({eventDate:e}),this.fetchTimeSlots),(0,U.Un)(t,{appType:a,date:e})}onDurationChanged(e){let{clogger:t,appType:a}=this.props;this.setState(()=>({duration:e}),this.fetchTimeSlots),(0,U.c$)(t,{appType:a,duration:parseInt(e,10)})}onCustomTimeSelected(e,t){let a,{freeBusySlots:n}=this.state;e===es.ds.suggested?this.changeTimeSlotSelectionMode():(t===eA&&(a=n.find(t=>t.start===parseInt(e,10))?.end),this.clearError(t),t===eA?this.setState(()=>({startTime:parseInt(e,10),endTime:a||""}),this.onTimeSlotSelected):this.setState(()=>({endTime:parseInt(e,10)}),this.onTimeSlotSelected))}onCustomTimeKeyedIn(e,t){return t===eA?this.setState(()=>({startTime:e})):this.setState(()=>({endTime:e})),!0}onCustomInputBlur(e){let t;this.clearError(e);let{eventDate:a}=this.state,n=this.state[e];if(!n)return void(e===eA?this.setState(()=>({startTimeError:!0})):this.setState(()=>({endTimeError:!0})));if("string"==typeof n||(t=n,"Invalid date"===d().unix(t).format("YYYY-DD-MM"))){let t;if(t=n,!/^(0?[1-9]|1[012]):[0-5][0-9] {0,1}(am|pm)$/.test(t))return void(e===eA?this.setState(()=>({startTimeError:!0})):this.setState(()=>({endTimeError:!0})));n=d()(`${a} ${n}`,"YYYY-MM-DD h:mm a").unix()}e===eA?this.setState(()=>({startTime:n}),this.onTimeSlotSelected):this.setState(()=>({endTime:n}),this.onTimeSlotSelected)}onTimeSlotSelected(){let{startTime:e,endTime:t,selectionMode:a}=this.state;this.props.onTimeSlotSelected({startTime:"string"==typeof e?parseInt(e,10)||"":e??"",endTime:"string"==typeof t?parseInt(t,10)||"":t??"",timeSlotSelectionMode:a})}setSuggestedSlot(e,t){let a,{freeBusySlots:n}=this.state,{clogger:r,appType:i}=this.props;if(!(a="number"==typeof e?n.find(t=>t.start===e):e))return void this.changeTimeSlotSelectionMode();let l={label:printTimeFormat(a.start),value:a.start.toString()};this.setState(()=>({selectedCustomSlot:l,startTime:a.start,endTime:a.end}),this.onTimeSlotSelected),t||(0,U.bv)(r,{appType:i})}getAvailableTimesEmptyMessage(){return eg.t("No time slots are available")}clearError(e){e===eA?this.setState(()=>({startTimeError:!1})):this.setState(()=>({endTimeError:!1}))}changeTimeSlotSelectionMode(){let{clogger:e,appType:t}=this.props;this.setState(e=>({selectionMode:e.selectionMode===es.ds.suggested?es.ds.custom:es.ds.suggested,startTime:"",endTime:""}),()=>{this.onTimeSlotSelected(),this.fetchTimeSlots()}),(0,U.iv)(e,{appType:t})}fetchTimeSlots(){let{eventDate:e,duration:t,selectionMode:a,startTime:n}=this.state,{attendees:r,calUser:i}=this.props;if(this.setState(()=>({freeBusySlots:[],isFetchSuggestedSlotsAPIRequestInFlight:!0})),a===es.ds.custom)return void this.fetchCustomTimeSlots();let l={calUserId:i.id,day:d()(e).format("YYYY-MM-DD"),minutes:parseInt(t,10),attendees:r};this.props.getFreeBusySlots(l).then(e=>{let{ok:t,freebusy_slots:a}=e;t?this.setState(()=>({freeBusySlots:a,hasValidTimeSlots:!0}),()=>{!a.filter(e=>e.start===n&&e.all_free).length&&a[0]&&this.setSuggestedSlot(a[0],!0)}):this.changeTimeSlotSelectionMode()}).catch(e=>{ey.error("An error occurred while fetching free busy slots",{reason:"calendar-event-freebusy",params:{keys:Object.keys(l),values:Object.values(l)},error:e})}).finally(()=>{this.setState(()=>({isFetchSuggestedSlotsAPIRequestInFlight:!1}))})}fetchCustomTimeSlots(){let{eventDate:e,duration:t}=this.state,{presetStartTime:a}=this.props;try{let n=((e,t)=>{let a,n,r=[],i=d()(e).add(1,"day").startOf("day").add(1,"minutes").unix();if(isToday(e)){let e=15-d()().minute()%15;a=d()().add(e,"minutes")}else a=d()(e).startOf("day");for(n=d()(a).add(t,"minutes");d()(n).unix()<=i;)r.push({start:a.unix(),end:n.unix()}),a=d()(a).add(15,"minutes"),n=d()(a).add(t,"minutes");return r})(e,t).map(e=>({...e,all_free:!0,all_busy:!1,busy_attendees:[]})),r=36*!isToday(e);this.setState(()=>({freeBusySlots:n}),()=>{let{hasValidTimeSlots:e}=this.state,t=n[r];a?this.setSuggestedSlot(a,!0):t&&e&&this.setSuggestedSlot(t,!0)})}catch(e){ey.error("An error occurred while populating custom time slots",{reason:"calendar-custom-time-slots",error:e})}}renderSuggestedTimeSlots(){let{freeBusySlots:e,selectedCustomSlot:t,isFetchSuggestedSlotsAPIRequestInFlight:a,startTime:r}=this.state,{currentUser:l}=this.props,o=[],s=r?eg.t("Re-fetching availability\u2026",{fallbackHash:"b04ba49f848624bb97ab094a2631d2ad74913498",fallbackHashNs:"calls"}):eg.t("Fetching availability\u2026",{fallbackHash:"b04ba49f848624bb97ab094a2631d2ad74913498",fallbackHashNs:"calls"});try{o=e.map(e=>{let{start:t,end:a,all_free:r,busy_attendees:i}=e,o=(i||[]).map(e=>(this.props.channelMembers.find(t=>t.value===e)?.label||(l?.id===e?l.real_name:""))?.split(" ")[0]).join(", "),s=r?eg.t("Everyone available"):eg.rt("<participants>participants</participants> unavailable",null,({tag:e})=>"participants"===e?o:"");return{label:n.createElement("div",{className:"time-slot-option",role:"button"},n.createElement("span",{className:"time-slot-range"},`${printTimeFormat(t)} - ${printTimeFormat(a)}`),n.createElement("span",{className:"time-slot-availability"},s)),value:t.toString()}}),a||o.push({label:n.createElement("span",{className:"time-slot-range change-selection-mode"},eg.t("Pick a custom time",{fallbackHash:"f912893ebf33375ec8d0d214438e3e73317e7917"})),value:""})}catch(e){}return n.createElement("div",{className:"suggested-timeslot-container"},n.createElement(f.A,{htmlFor:"suggested-slots",text:eg.t("Available times"),id:"lbl-suggested-slots"},a&&n.createElement("span",{className:"loader-with-message"},n.createElement(i.A,{size:"large",inline:!0}),n.createElement("span",{className:"loader-message"},s)),!a&&n.createElement(S.Ay,{options:o,id:"suggested-slots",icon:"clock-o",optionClassName:"suggested-option",wrapperClassName:"available-time-slots",selectedOption:{label:t?.value?printTimeFormat(parseInt(t.value,10)):"",value:t?.value??"",isPlaceholder:!1},isLoading:a,optionsRowHeight:43,customGetOptionsListEmptyMessage:this.getAvailableTimesEmptyMessage,usePlaceholderOption:!1,onChange:e=>this.setSuggestedSlot(parseInt(e,10))})))}renderSuggestedSlotSelector(){let{selectionMode:e,duration:t}=this.state,a=[{label:eg.t("15 minutes"),value:"15"},{label:eg.t("30 minutes"),value:"30"},{label:eg.t("45 minutes"),value:"45"},{label:eg.t("1 hour"),value:"60"},{label:eg.t("1.5 hours"),value:"90"},{label:eg.t("2 hours"),value:"120"}];return e===es.ds.suggested&&n.createElement("div",{className:"slot-selection custom"},n.createElement(f.A,{htmlFor:"duration-list",text:eg.t("Duration"),id:"lbl-duration-list"},n.createElement(S.Ay,{options:a,usePlaceholderOption:!1,id:"duration-list",optionClassName:"my-option",icon:"clock-o",value:t,onChange:e=>this.onDurationChanged(e)})),this.renderSuggestedTimeSlots())}renderCustomSlotSelector(){let{selectionMode:e,startTime:t,endTime:a,freeBusySlots:r,startTimeError:i,endTimeError:l}=this.state,o=[],s=[],c={label:n.createElement("span",{className:"time-slot-range change-selection-mode"},eg.t("Pick a suggested time")),value:es.ds.suggested};return r.forEach(e=>{o.push({label:printTimeFormat(e.start),value:e.start.toString(),isPlaceholder:!1}),s.push({label:printTimeFormat(e.end),value:e.end.toString(),isPlaceholder:!1})}),o.push(c),s.push(c),e===es.ds.custom&&n.createElement("div",{className:"slot-selection"},n.createElement(f.A,{htmlFor:"start-time",text:eg.t("Start time"),id:"lbl-start-time"},n.createElement(S.Ay,{options:o,placeholder:eg.t("Pick a start time"),usePlaceholderOption:!1,id:"start-time",optionClassName:"custom-option",wrapperClassName:"custom-time-slots",icon:"clock-o",value:t,selectedOption:{label:"number"==typeof t?printTimeFormat(t):t||"",value:t,isPlaceholder:!1},isLoading:!o.length,onChange:e=>this.onCustomTimeSelected(e,eA),errorText:i?eg.t("Please enter valid time"):"",isRequired:!0,useFilteredInput:!0,onFilterInputChange:e=>this.onCustomTimeKeyedIn(e,eA),onClose:()=>this.onCustomInputBlur(eA)})),n.createElement(f.A,{htmlFor:"end-time",text:eg.t("End time"),id:"lbl-end-time"},n.createElement(S.Ay,{options:s,placeholder:eg.t("Pick an end time"),usePlaceholderOption:!1,id:"end-time",optionClassName:"custom-option",wrapperClassName:"custom-time-slots",icon:"clock-o",value:a,selectedOption:{label:"number"==typeof a?printTimeFormat(a):a||"",value:a,isPlaceholder:!1},isLoading:!s.length,onChange:e=>this.onCustomTimeSelected(e,ex),errorText:l?eg.t("Please enter valid time"):"",isRequired:!0,useFilteredInput:!0,onFilterInputChange:e=>this.onCustomTimeKeyedIn(e,ex),onClose:()=>this.onCustomInputBlur(ex)})))}render(){let{eventDate:e}=this.state;return n.createElement(n.Fragment,null,n.createElement(f.A,{text:eg.t("Date"),htmlFor:"date-picker",id:"lbl-date-1"},n.createElement(eh.b,{key:"date-picker",onDateChange:this.onDateChange,selectedDate:e,disableDatesBefore:today(),dateFormat:"YYYY-MM-DD",inputClassName:"event-date-picker"})),n.createElement("br",null),this.renderCustomSlotSelector(),this.renderSuggestedSlotSelector())}};eE.displayName="TimeSlotSelector";let eC=(0,V.N)(e=>{let t=(0,eb.Zm)(e,(0,ef.WR)(e));return{defaultDate:today(),currentUser:t,clogger:(0,H.eo)({state:e})}},e=>({getFreeBusySlots:t=>e((0,e_.b)({...t,reason:"time-slot-selector"}))}),null,{areStatePropsEqual:p.kt})(eE);var ek=a(0x1b9d5cc0c),ev=a(0x82980ab8);function getMemberFirstName(e){let t=(0,ev.wg)(e);return t?t.split(" ")[0]:(0,ev.Gt)(e)}function getFormattedChannelMembersList(e){let t=[];return e&&e.length&&e.length<es.Ty&&(t=e.filter(e=>e&&!!(0,ev.wg)(e)&&!(0,ek.po)(e)).map(e=>({label:(0,ev.wg)(e),value:e.id,isSelf:e.is_self,email:e._email_normalized_lc}))),t}var eS=a(0x1a02c72b5),eI=a(0xd6a16321),ew=a(0x182c9b0b0),eT=a(0x1ec69ee01),eN=a(0x12185e091),eM=a(0x280afe13),eR=a(0x4f725d55),eP=a(0x11c82607b),eL=a(0xd93ecf94);let eO=(0,eP.Ay)("check if a thread timestamp is from a channel message",(e,t,{channelId:a,threadTs:n})=>!!(0,eL.Ld)(t(),a,n,!1));eO.meta={name:"isTimestampFromChannel",key:"createThunkIsTimestampFromChannel",description:"check if a thread timestamp is from a channel message"};var eD=a(0x217553e42),eF=a(0x12f011eb8),eU=a(0x2b4a00ff);let eB=new r.Ay("calendar"),eH={entities:{channels:{includePublic:!1,includePrivate:!1,includeArchived:!1,includeExternallyShared:!1},members:{includeSelf:!1,includeBots:!1},userGroups:!1},allowEmptyQuery:!0},eW=(0,W.Ay)({label:"CALENDAR-EVENT"}),eV=class extends n.Component{handleTitleEditClogOnce;handleGuestListEditClogOnce;handleDescriptionEditClogOnce;constructor(e){super(e),this.state={title:e.presetTitle,description:"",startTime:"",endTime:"",selectedAttendees:e.guestList,meetingUrl:"",isEventCreated:!1,isEventCreateErrored:!1,isEventCreateRequestSent:!1,appHomeDeepLink:"",providerEventLink:"",errorMessage:{titleError:"",guestError:""},channelMembersList:[],isFetchMemberListRequestSent:!1,timeSlotSelectionMode:es.ds.suggested,isShareEventInChannelEnabled:!1,channelToShareEventIn:e.channelId,calendarId:""},this.handleTitleEditClogOnce=(0,o.A)(U.yF),this.handleGuestListEditClogOnce=(0,o.A)(U.wV),this.handleDescriptionEditClogOnce=(0,o.A)(U.E4),(0,m.v)(this,["onCloseModal","onTitleChange","onTitleBlur","onGuestListChange","onGuestListBlur","onCreateEvent","onTimeSlotChanged","onBeforeClose","onDescriptionChange","onDescriptionBlur","onMeetingUrlSet","renderCalendarCreateEventForm","renderEventCreateConfirmation","areAllFieldsAvailable","isDateRangeValid","onShareEventInChannel","setChannelToShareEventIn","getClogDataForCreateEventAction","onCalendarSelect"])}componentDidMount(){let{channelId:e,guestList:t,clogger:a,appType:n,currentUserId:r,isProfileAppView:i}=this.props;(0,U.pS)(a,{appType:n}),t.length||i||(this.setState(()=>({isFetchMemberListRequestSent:!0})),this.props.fetchMembersForChannelWithLimitedMembers({channelId:e,memberCountLimit:es.Ty}).then(e=>{if(e.length){let t=e.filter(e=>e.id!==r).map(e=>({label:e.real_name||"",value:e.id}));this.setState(()=>({channelMembersList:t,selectedAttendees:t}))}}).catch(s.A).finally(()=>{this.setState(()=>({isFetchMemberListRequestSent:!1}))}))}onBeforeClose=()=>{let{title:e,description:t,selectedConferenceApp:a}=this.state,{clogger:n,appType:r}=this.props;e||t||a||this.onCloseModal(),(0,U.AC)(n,{appType:r})};onCloseModal=()=>{let{clogger:e,appType:t}=this.props;this.props.closeModal(),(0,U.Hs)(e,{appType:t})};onTitleChange=(e,t)=>{this.setState(e=>({title:t,errorMessage:{...e.errorMessage,titleError:""}}))};onTitleBlur=()=>{let{title:e}=this.state,{presetTitle:t,clogger:a,appType:n}=this.props;e!==t&&this.handleTitleEditClogOnce(a,{appType:n})};onDescriptionChange=(e,t)=>{this.setState(()=>({description:t}))};onDescriptionBlur=()=>{let{description:e}=this.state,{clogger:t,appType:a}=this.props;""!==e&&this.handleDescriptionEditClogOnce(t,{appType:a})};onGuestListChange=e=>{this.setState(t=>({selectedAttendees:e,errorMessage:{...t.errorMessage,guestError:""}}))};onGuestListBlur=()=>{let{selectedAttendees:e,channelMembersList:t}=this.state,{guestList:a,clogger:n,appType:r}=this.props,i=a.length?a:t;(0,p.kt)(e,i)||this.handleGuestListEditClogOnce(n,{appType:r})};onMeetingUrlSet=e=>{this.setState(()=>({meetingUrl:e||""}))};onCreateEvent=()=>{let{title:e,selectedAttendees:t,description:a,startTime:n,endTime:r,meetingUrl:i,channelToShareEventIn:l,calendarId:o}=this.state,{clogger:s,appType:c,doesTimestampBelongToChannel:d,threadTs:m,imIdByMemberId:u}=this.props,p=!!m&&d({channelId:l,threadTs:m}),h=(0,eR.A)(l)?u(l):l;if(this.setState(()=>({isEventCreateErrored:!1})),this.areAllFieldsAvailable()){this.setState(()=>({isEventCreateRequestSent:!0}));let l=0;r&&(l="string"==typeof r?parseInt(r,10):r);let d=0;n&&(d="string"==typeof n?parseInt(n,10):n);let u={calUserId:this.props.calUser.id,endTime:l,startTime:d,attendeeUserIds:t.map(e=>e.value),title:e,location:i,description:a,calendarId:o,channelId:this.shouldEventBeSharedInChannel()?h:"",threadTs:m&&this.shouldEventBeSharedInChannel()&&p?m:""},_=this.getClogDataForCreateEventAction();try{let e=this.props.createEvent(u);e&&"function"==typeof e.then?e.then(e=>{e&&e.ok&&(this.setState(()=>({isEventCreated:!0,appHomeDeepLink:e.app_home_deep_link,providerEventLink:e.provider_event_link})),this.shouldEventBeSharedInChannel()&&!p&&this.props.navigate((0,eI.pr)(h)),this.shouldEventBeSharedInChannel()&&(0,U.EV)(s,{appType:c,details:_}))}).catch(e=>{this.setState(()=>({isEventCreateErrored:!0})),eW.error({message:"An error occurred while creating an event",reason:"create-event",params:{keys:Object.keys(u),values:Object.values(u)},error:e}),(0,U.v5)(s,{appType:c})}).finally(()=>{this.setState(()=>({isEventCreateRequestSent:!1}))}):this.setState(()=>({isEventCreateRequestSent:!1}))}catch(e){this.setState(()=>({isEventCreateErrored:!0,isEventCreateRequestSent:!1}))}(0,U.Ys)(s,{appType:c})}return null};onTimeSlotChanged=e=>{this.setState(()=>({startTime:e.startTime,endTime:e.endTime,timeSlotSelectionMode:e.timeSlotSelectionMode}))};onCalendarSelect=e=>{this.setState(()=>({calendarId:e}))};onShareEventInChannel=e=>{this.setState(()=>({isShareEventInChannelEnabled:e}))};setChannelToShareEventIn=e=>{this.setState(()=>({channelToShareEventIn:e}))};getClogDataForCreateEventAction=()=>{let{selectedAttendees:e,description:t,startTime:a,endTime:n,meetingUrl:r,timeSlotSelectionMode:i}=this.state;return{number_of_attendees:e.length,has_description:!!t,is_calling_option_selected:!!r,duration:n&&a?d().unix("string"==typeof n?parseInt(n,10):n).diff(d().unix("string"==typeof a?parseInt(a,10):a),"minutes"):0,is_today:!!a&&d()().isSame(d().unix("string"==typeof a?parseInt(a,10):a),"d"),time_slot_selection_mode:i,is_event_posted:!!this.shouldEventBeSharedInChannel()}};areAllFieldsAvailable=()=>{let{startTime:e,endTime:t}=this.state;return!!(e&&""!==e&&t&&""!==t)};isDateRangeValid=()=>{let{startTime:e,endTime:t}=this.state;if(!e||!t)return!0;let a="string"==typeof e?parseInt(e,10):e,n="string"==typeof t?parseInt(t,10):t;return d().unix(a).isBefore(d().unix(n))};shouldEventBeSharedInChannel=()=>{let{isShareEventInChannelEnabled:e,channelToShareEventIn:t}=this.state;return e&&!!t};renderEventCreateConfirmation=()=>{let{appHomeDeepLink:e,providerEventLink:t}=this.state,{appType:a}=this.props;return n.createElement(ei,{icon:this.props.icon,appHomeDeepLink:e,providerEventLink:t,appType:a,clogData:this.getClogDataForCreateEventAction()})};renderCalendarCreateEventForm=()=>{let{presetDate:e,presetStartTime:t}=this.props,a=eB.t("Cancel"),r=eB.t("Create"),{selectedAttendees:l,isEventCreateRequestSent:o,isEventCreated:s,isEventCreateErrored:c,channelMembersList:d,isFetchMemberListRequestSent:m,title:u,description:p,selectedConferenceApp:C}=this.state,{calUser:k,channelId:v,appType:S}=this.props,I=!this.isDateRangeValid();return n.createElement(n.Fragment,null,n.createElement(et.$m,null,n.createElement(et.qf,null,c&&n.createElement(h.Ay,{type:"boxed",level:"error",align:"left",className:"event-retry"},n.createElement("span",null,eB.rt("We had trouble connecting. <a>Try again?</a>",null,({tag:e,key:t,text:a})=>"a"===e?n.createElement(y.A,{role:"button",onClick:this.onCreateEvent,key:t},a):a))),I&&n.createElement(h.Ay,{type:"boxed",level:"error",className:"date-error",align:"left"},n.createElement("span",null,eB.t("End time cannot be earlier than start time."))),n.createElement(f.A,{text:eB.t("Title"),optional:!0,htmlFor:"txt-title",id:"lbl-title-1","data-qa":"title-label"},n.createElement(b.A,{name:"txt-title",id:"txt-title","data-qa":"title-input",placeholder:eB.t("Name your event"),onChange:e=>this.onTitleChange("title",e),size:"medium",value:u,focusOnMount:!0,errorType:"nested_box",errorText:this.state.errorMessage.titleError,onBlur:this.onTitleBlur})),n.createElement(f.A,{text:eB.t("Guests"),optional:!0,htmlFor:"guest-list",id:"lbl-guest-1","data-qa":"guest-list-label"},!m&&n.createElement(E.h,{selectId:"guest-list",placeholderText:eB.t("Invite some guests"),selectedOptions:this.props.guestList.length?this.props.guestList:d,isExpanded:!1,renderOption:e=>n.createElement(x.A,{id:e.value}),width:"auto",onSelectedItemsChange:this.onGuestListChange,required:!0,searcherOptions:eH,onBlur:this.onGuestListBlur}),m&&n.createElement(i.A,null)),this.state.errorMessage.guestError&&n.createElement(h.Ay,{type:"boxed",level:"error",align:"left"},n.createElement("span",null,this.state.errorMessage.guestError)),n.createElement("br",null),n.createElement(ConnectedCalendarSelector,{calUserId:k?.id||"",onCalendarSelect:this.onCalendarSelect}),n.createElement(eC,{calUser:k,attendees:l,onTimeSlotSelected:this.onTimeSlotChanged,channelMembers:l.map(e=>({...e,isSelf:e.isSelf||!1})),appType:S,presetDate:e,presetStartTime:t}),n.createElement(z,{onMeetingUrlSet:this.onMeetingUrlSet,channelId:v,appType:S}),n.createElement(f.A,{text:eB.t("Description"),optional:!0,htmlFor:"txt-description",id:"lbl-description-1"},n.createElement(g.A,{"data-qa":"description-input",name:"txt-description",id:"txt-description",onChange:e=>this.onDescriptionChange("description",e),value:this.state.description,onBlur:this.onDescriptionBlur})),n.createElement("br",null),n.createElement(ep,{channelId:v,onShareEventInChannel:this.onShareEventInChannel,setChannelToShareEventIn:this.setChannelToShareEventIn}),n.createElement("hr",null))),n.createElement(A.A.Consumer,null,({enableSpeedBump:e})=>{let t=n.createElement(n.Fragment,null,n.createElement("strong",null,eB.t("Are you sure you want to cancel?"))," ",n.createElement("span",null,eB.t("It looks like you\u2019re still working on this. You will lose the info you\u2019ve entered so far if you leave now."))),i=eB.t("Keep Editing"),l=eB.t("Leave");return e(!!(u||p||C)),n.createElement(et.jl,{renderSpeedBump:({cancel:e})=>n.createElement(et.ty,{onContinue:this.onCloseModal,onCancel:e,description:t,cancelButtonLabel:i,continueButtonLabel:l})},n.createElement(et.ox,null,n.createElement(et.s_,{disabled:o,type:"outline","aria-label":a},a),n.createElement(_.A,{"data-qa":"btn-create",type:"primary",onClick:this.onCreateEvent,disabled:!this.isDateRangeValid()||o||s||!this.areAllFieldsAvailable(),loading:o,"aria-label":r},r)))}))};render(){let{isEventCreated:e}=this.state;return e?this.shouldEventBeSharedInChannel()?(this.props.closeModal(),!0):this.renderEventCreateConfirmation():n.createElement(et.dW,{closeModal:this.onBeforeClose,shouldCloseOnOverlayClick:!1,centered:!0,className:"p-create_event_modal"},n.createElement(et.rQ,null,n.createElement(et.Rc,{icon:this.props.icon,title:eB.t("Create event")})),this.renderCalendarCreateEventForm())}};eV.displayName="CreateEventModal";let eG=(0,V.N)((e,t)=>{let a,n=[],r=[],i=(0,eU.MC)(e),l=i?.memberId??null,o=(0,eb.Zm)(e,(0,ef.WR)(e)),s=(0,eD.OL)(e,t.channelId);if(!o||!s)return{guestList:[],presetTitle:"",clogger:(0,H.eo)({state:e}),currentUserId:(0,ef.WR)(e)||"",channelId:t.channelId,imIdByMemberId:t=>(0,eD.o2)(e,t)||""};let{channelId:c,threadTs:d,isProfileAppView:m}=t;if(a=eB.t("{organizerPossesive} meeting",{organizerPossesive:(0,u.Ay)(`${getMemberFirstName(o)}'s`),fallback_hash:"169e7d2651c7ee3259bf56961b2d9959263e210c"})||"",m&&l){let t=(0,eb.nv)(e,l);t&&(r.push(t),n=getFormattedChannelMembersList(r))}else if(d){let t=(0,eL.Ld)(e,c,d,!0);t?.reply_users&&(n=getFormattedChannelMembersList(r=[...(0,eb.gA)(e,t.reply_users)]))}else if((0,eN.LI)(s)){let t=(0,eM.e)(s),r=t?(0,eb.Zm)(e,t):null;r&&(a=`${getMemberFirstName(r)} / ${getMemberFirstName(o)}`,(0,ek.po)(r)||r.is_self?a="":n.push({label:r.real_name||r.id,value:r.id,isSelf:!1,email:r._email_normalized_lc}),n.push({label:o.real_name||o.id,value:o.id,isSelf:!0,email:r._email_normalized_lc}))}else{if((0,eN.yz)(s)){let t=(0,eT.Ug)(s);r=[...(0,eb.gA)(e,t)]}else if((0,eN.Zp)(s)){let t=(0,eF.$)(e,s.id);r=[...(0,eb.gA)(e,t)]}n=getFormattedChannelMembersList(r)}return{guestList:n.filter(e=>!e.isSelf),presetTitle:a,clogger:(0,H.eo)({state:e}),currentUserId:(0,ef.WR)(e),channelId:s.id,imIdByMemberId:t=>(0,eD.o2)(e,t)}},e=>({createEvent:t=>e(P(t)),closeModal:()=>{e((0,ea.O)())},fetchMembersForChannelWithLimitedMembers:t=>e(D(t)),navigate:t=>{e((0,eS.o)(t))},doesTimestampBelongToChannel:t=>e(eO(t))}),null,{areStatePropsEqual:p.kt})(eV),eq=(0,ew.A)(eG);var ej=a(0x246366b61),ez=a(0x1a769a9e8),eK=a(0x5dd1c0f2);let e$=new r.Ay("calendar"),eY=[],eQ=class extends n.Component{constructor(e){super(e),this.state={calUser:null,authUrl:null,waitingForAPIResponse:!0,apiResponseError:!1}}componentDidMount(){let e=(0,W.Ay)({label:"CALENDAR-EVENT"}),{appType:t}=this.props;this.props.getUserCalendarInfo({appType:t}).then(e=>{this.setState(()=>({calUser:e.cal_user||null,authUrl:e.auth_url}))}).catch(a=>{this.setState(()=>({apiResponseError:!0})),e.error("error in getting calendar user info",{reason:"calendar-user-info",appType:t,error:a})}).finally(()=>{this.setState(()=>({waitingForAPIResponse:!1}))})}getAppIcon(){let{app:e}=this.props,t=e&&e.icons,a=(0,ez.A)({icons:t||void 0},48);return n.createElement("img",{alt:"Calendar",className:"calendar-image",src:a})}renderLoader(){let{apiResponseError:e}=this.state;return n.createElement(et.dW,{shouldReturnFocusAfterClose:!1,shouldFadeOut:!0,closeModal:this.props.closeModal,centered:!0},n.createElement(et.rQ,null,n.createElement(et.Rc,{icon:this.getAppIcon(),title:e$.t("Create event")})),n.createElement(et.$m,null,n.createElement(et.qf,{"data-qa":"dialog_body"},e&&e$.t("Sorry, something went wrong. Try again in a moment."),!e&&n.createElement(i.A,null))),n.createElement(et.jl,null,n.createElement(et.ox,null,n.createElement(et.s_,{type:"outline",onClick:this.props.closeModal,"aria-label":e$.t("Close")},e$.t("Close")))))}render(){let{appType:e,channelId:t,threadTs:a,presetDate:r,isProfileAppView:i,presetStartTime:o}=this.props,{calUser:s,authUrl:c,waitingForAPIResponse:d,apiResponseError:m}=this.state,u=!s,p=!(s&&s.is_provider_connected),h=s?s.provider_auth_url:"";return d||m?this.renderLoader():p&&h||u&&c?n.createElement(l.A,{icon:this.getAppIcon(),appType:e,authUrl:h||c||"",popupType:h?es.WZ.provider_connect:es.WZ.calendar_connect}):s?n.createElement(eq,{channelId:t,icon:this.getAppIcon(),calUser:s,appType:e,threadTs:a,presetDate:r,presetStartTime:o,isProfileAppView:i,guestList:eY,presetTitle:"",clogger:this.props.clogger,currentUserId:this.props.currentUserId,createEvent:this.props.createEvent,closeModal:this.props.closeModal,fetchMembersForChannelWithLimitedMembers:this.props.fetchMembersForChannelWithLimitedMembers,doesTimestampBelongToChannel:this.props.doesTimestampBelongToChannel,imIdByMemberId:()=>""}):null}};eQ.displayName="LauncherModal";let eZ=(0,V.N)((e,{appType:t})=>({app:(0,eK.sO)(e,(0,ej.U)(t)||"")||null,clogger:(0,H.eo)({state:e}),currentUserId:(0,ef.WR)(e)}),e=>({closeModal:()=>e((0,ea.O)()),getUserCalendarInfo:t=>e(R({...t,appType:t.appType})),createEvent:t=>e(P(t)),fetchMembersForChannelWithLimitedMembers:t=>e(D(t)),doesTimestampBelongToChannel:t=>e(eO(t))}))(eQ);function renderLauncherModal(e){return n.createElement(eZ,e)}renderLauncherModal.displayName="renderLauncherModal";let eJ=eZ},0x1da63c22a:(e,t,a)=>{"use strict";a.r(t),a.d(t,{createEvent:()=>createEvent});var n=a(0xbad225b5),r=a(0x77d3d789),i=a(0xbaaab71e),l=a(0x11c82607b),o=a(0x19c76d181),s=a(0x217553e42),c=a(0x46dbff89);let createEvent=(e,t=!1)=>(0,l.Ay)("create a calendar event",(a,l,{channelId:d,threadTs:m,presetDate:u},p)=>{let{getPrimaryView:h}=p(i.U),_=h(l())?.id,f=d;f||(f=(0,s.OL)(l(),_)?.id||(0,s.Pu)(l(),(0,o.WR)(l()))?.id),f&&a((0,c.q)({element:n.createElement(r.Ay,{channelId:f,appType:e,threadTs:m,presetDate:u instanceof Date?u.toISOString():u,isProfileAppView:t})}))});createEvent.displayName="createEvent"},0x4533033f:(e,t,a)=>{"use strict";a.d(t,{AC:()=>handleCancelClickClog,Am:()=>handleCallingClickClog,BI:()=>handleConnectCalendarOrProviderImpressionClog,E4:()=>handleDescriptionEditClog,EV:()=>handleCreateEventSuccessImpressionClog,GC:()=>handleConnectCalendarOrProviderLinkClog,Hs:()=>handleLeaveClickClog,Un:()=>handleDateClickClog,Ys:()=>handleCreateEventClickClog,bv:()=>handleAvailableTimesClickClog,c$:()=>handleDurationClickClog,iv:()=>handleCustomTimeClickClog,pS:()=>handleCreateEventImpressionClog,q7:()=>handleConnectCalendarOrProviderClosePopupClog,v5:()=>handleCreateEventErrorImpressionClog,wV:()=>handleGuestListEditClog,yF:()=>handleTitleEditClog});var n=a(0x1aab9bb8c),r=a(0x3711e82d),i=a(0x1ec68d6a3);let l={action:r.UiAction.CLICK,step:r.UiStep.CREATE_EVENT,is_primary_cta:!1},o={action:r.UiAction.EDIT,step:r.UiStep.CREATE_EVENT,is_primary_cta:!1},handleClog=(e,{uiArgs:t,uiProperties:a={},appType:n,details:l={}})=>{try{e.track(r.EventId.CALENDAR_CREATE_EVENT,{contexts:{ui_context:{...t,ui_properties:{...a}},calendar_app_name:n,...l}})}catch(e){(0,i.Wo)().error("CALENDAR",`error sending clog ${e}`)}},handleConnectCalendarOrProviderImpressionClog=(e,{appType:t,popupType:a})=>handleClog(e,{uiArgs:{action:r.UiAction.IMPRESSION,step:a===n.WZ.provider_connect?r.UiStep.PROVIDER_CONNECT:r.UiStep.CALENDAR_CONNECT,is_primary_cta:!1},appType:t}),handleConnectCalendarOrProviderLinkClog=(e,{appType:t,popupType:a})=>{handleClog(e,{uiArgs:{action:r.UiAction.CLICK,step:a===n.WZ.provider_connect?r.UiStep.PROVIDER_CONNECT:r.UiStep.CALENDAR_CONNECT},uiProperties:{element_name:a===n.WZ.provider_connect?"connect_to_provider":"connect_to_calendar",element_type:r.ElementType.LINK},appType:t})},handleConnectCalendarOrProviderClosePopupClog=(e,{appType:t,popupType:a})=>handleClog(e,{uiArgs:{action:r.UiAction.CLICK,step:a===n.WZ.provider_connect?r.UiStep.PROVIDER_CONNECT:r.UiStep.CALENDAR_CONNECT,is_primary_cta:!1},uiProperties:{element_name:"close",element_type:r.ElementType.BUTTON},appType:t}),handleCreateEventImpressionClog=(e,{appType:t})=>handleClog(e,{uiArgs:{action:r.UiAction.IMPRESSION,step:r.UiStep.CREATE_EVENT},appType:t}),handleTitleEditClog=(e,{appType:t})=>handleClog(e,{uiArgs:o,uiProperties:{element_name:"title",element_type:r.ElementType.INPUT},appType:t}),handleGuestListEditClog=(e,{appType:t})=>handleClog(e,{uiArgs:o,uiProperties:{element_name:"guests",element_type:r.ElementType.DROPDOWN},appType:t}),handleDropdownClickClog=(e,t,a,{appType:n})=>{handleClog(e,{uiArgs:l,uiProperties:{element_name:t,element_type:r.ElementType.DROPDOWN,element_value:a},appType:n})},handleDateClickClog=(e,{appType:t,date:a})=>handleDropdownClickClog(e,"date",a,{appType:t}),handleDurationClickClog=(e,{appType:t,duration:a})=>handleDropdownClickClog(e,"duration",a,{appType:t}),handleAvailableTimesClickClog=(e,{appType:t})=>handleDropdownClickClog(e,"available_times","",{appType:t}),handleCustomTimeClickClog=(e,{appType:t})=>{handleClog(e,{uiArgs:l,uiProperties:{element_name:"custom_time",element_type:r.ElementType.LINK},appType:t})},handleCallingClickClog=(e,{appType:t,callingApp:a})=>{handleClog(e,{uiArgs:l,uiProperties:{element_name:"calling_provider",element_type:r.ElementType.DROPDOWN,element_value:a},appType:t})},handleLeaveClickClog=(e,{appType:t})=>{handleClog(e,{uiArgs:l,uiProperties:{element_name:"leave",element_type:r.ElementType.BUTTON},appType:t})},handleCreateEventErrorImpressionClog=(e,{appType:t})=>{handleClog(e,{uiArgs:{action:r.UiAction.CLICK,step:r.UiStep.CREATE_EVENT_ERROR},appType:t})},handleDescriptionEditClog=(e,{appType:t})=>{handleClog(e,{uiArgs:o,uiProperties:{element_name:"description",element_type:r.ElementType.TEXTAREA},appType:t})},handleCancelClickClog=(e,{appType:t})=>{handleClog(e,{uiArgs:l,uiProperties:{element_name:"cancel",element_type:r.ElementType.BUTTON},appType:t})},handleCreateEventClickClog=(e,{appType:t})=>{handleClog(e,{uiArgs:{action:r.UiAction.CLICK,step:r.UiStep.CREATE_EVENT,is_primary_cta:!0},uiProperties:{element_name:"create",element_type:r.ElementType.BUTTON},appType:t})},handleCreateEventSuccessImpressionClog=(e,{appType:t,details:a={}})=>handleClog(e,{uiArgs:{action:r.UiAction.IMPRESSION,step:r.UiStep.CREATE_EVENT_SUCCESS},appType:t,details:a})},0x1aab9bb8c:(e,t,a)=>{"use strict";a.d(t,{$6:()=>_,A8:()=>k,ED:()=>v,H2:()=>GCAL_INSTALL_LINK,HA:()=>A,Hp:()=>s,Oj:()=>l,QZ:()=>x,Te:()=>C,Ty:()=>c,UC:()=>S,WZ:()=>m,Wy:()=>f,_I:()=>g,_W:()=>b,cG:()=>d,ds:()=>u,e3:()=>I,lS:()=>y,nj:()=>p,ny:()=>OCAL_INSTALL_LINK,qj:()=>o,uh:()=>E,v:()=>h,vq:()=>w});var n=a(0x18dac2b8e),r=a(0x8c8bafa3),i=a(0x17fee64c3);let l=(0,n.Cu)()?"A0CNP2EP5":"ADZ494LHY",o=(0,n.Cu)()?"A07H429LK":"AFV5ECLBZ",s=(0,i.z$)()?(0,n.Cu)()?"A0608DQ3P":"A1S0QJ0SQ":(0,n.Cu)()?"A012Z6404M8":"A01NK8UJRGC",c=10,d="calendar_share_event_in_channel",m={provider_connect:"provider_connect",calendar_connect:"calendar_connect"},u={custom:"custom",suggested:"suggested"},p="/img/calendar/google-calendar/gCal-logo.png",h="/img/calendar/outlook-calendar/oCal-logo.png",_="https://calendar.google.com/calendar",f=`${_}/render`,b="/img/calendar/google-calendar/lt-google-calendar-status-sync.png",g="/img/calendar/outlook-calendar/lt-outlook-calendar-status-sync.png",y="/img/calendar/google-calendar/dk-google-calendar-status-sync.png",A="/img/calendar/outlook-calendar/dk-outlook-calendar-status-sync.png",x=`https://${(0,r.qF)()}/help/articles/206329808-Google-Calendar-for-Slack`,E=`https://${(0,r.qF)()}/help/articles/360020134853-Microsoft-Outlook-Calendar-for-Slack`,GCAL_INSTALL_LINK=()=>{let e=(0,n.Cu)()?"dev.":"";return`https://${e}slack.com/interop/gcalapp/install`},OCAL_INSTALL_LINK=()=>{let e=(0,n.Cu)()?"dev.":"";return`https://${e}slack.com/interop/ocalapp/install`},C=Object.freeze({GOOGLE:"GOOGLE",OUTLOOK:"OUTLOOK",UNKNOWN:"UNKNOWN"}),k="Google",v="Outlook",S="gcal",I="ocal",w="ocal_gcc"},0x1f113e65c:(e,t,a)=>{"use strict";a.d(t,{HN:()=>convertEventTitleToChannelName,ZQ:()=>getEmailOptions});var n=a(0x237b6a339),r=a(0x1b9d5cc0c),i=a(0x1c8f352ff),l=a(0xe684f705);let convertEventTitleToChannelName=e=>(0,i.Kx)(e.toLowerCase().replace(/[ :/]/g,"-")).slice(0,(0,i.zU)()),getEmailOptions=(e,t,a)=>{let i,o=[...new Set(t)];if(a){let t,a;t=(0,l.cA)(e),i=(a=(0,r.zY)(t))?o.filter(e=>e!==a):o}else i=o;return i.map(e=>({key:e,label:e,isLoading:!0,queryId:(0,n.A)("query__")}))}},0x246366b61:(e,t,a)=>{"use strict";a.d(t,{U:()=>getCalAppIdByType,w:()=>getCalAppTypeById});var n=a(0x1aab9bb8c);let getCalAppIdByType=e=>{switch(e){case n.UC:return n.Oj;case n.e3:return n.qj;case n.vq:return n.Hp;default:return null}},getCalAppTypeById=e=>{switch(e){case n.Oj:return n.UC;case n.qj:return n.e3;case n.Hp:return n.vq;default:return null}}},0x22a965381:(e,t,a)=>{"use strict";a.d(t,{yW:()=>getAllCalendarPresets,GG:()=>getCalendarStatusSyncPic,aW:()=>getCurrentCalendarForMX});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1aab9bb8c),l=a(0x120c268ad),o=a.n(l),s=a(0x1b3ecb90f);function CustomStatusCalendarIcon({currentCalendar:e}){let t=o()("emoji c-emoji__medium","p-custom_status_modal__preset_emoji");if(e){let a=e.appId===i.Oj?i.nj:i.v;return n.createElement("div",{className:t},n.createElement("img",{src:a,width:"22",height:"22",alt:""}))}return n.createElement(s.Ay,{className:t,text:":calendar:"})}CustomStatusCalendarIcon.displayName="CustomStatusCalendarIcon";let c=CustomStatusCalendarIcon,d=new r.Ay("current_status");function getAllCalendarPresets(e,t,a,n){let r=[];if(!n)return r;let l=n.gcal.is_manageable_by_user,o=n.ocal.is_manageable_by_user,s=n.ocal.is_installed,c=n.gcal.is_installed;if(!t)return maybeAddCalendarPreset(e,{name:"Google",appId:i.Oj},a,l,r),maybeAddCalendarPreset(e,{name:"Outlook",appId:i.qj},a,o,r),r;let d=t.appId===i.Oj?l:o,m=t.appId===i.Oj?c:s;return maybeAddCalendarPreset(e,t,a,m||d,r),r}function maybeAddCalendarPreset(e,t,a,n,r){n&&r.push(getSingleCalendarPreset(e,t,a))}function getSingleCalendarPreset(e,t,a){let r=t?`${t.name} `:"";return{image:()=>n.createElement(c,{currentCalendar:t}),text:d.t("In a meeting"),onSelect:()=>{a(t)},customDuration:(!e||e.is_status_sync)&&e?d.t("{calType}Calendar updates are on",{calType:r}):d.t("Based on your {calType}Calendar",{calType:r})}}function getCalendarStatusSyncPic(e,t){let a=e===i.Oj?i._W:i._I,n=e===i.Oj?i.lS:i.HA;return"light"===t?a:n}function getCurrentCalendarForMX(e){return e===i.Te.OUTLOOK?{name:i.ED,appId:i.qj}:e===i.Te.GOOGLE?{name:i.A8,appId:i.Oj}:void 0}getSingleCalendarPreset.displayName="getSingleCalendarPreset"},0x238c69894:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseCanvasAiIntroModal:()=>CanvasAiIntroModalNux,default:()=>D});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x2501a2cee),s=a(0x139aa1a7),c=a(0x190e60a66);let d=a.p+"canvas-ai-modal-header-12bcaae.png",m=a.p+"canvas-ai-modal-header-2d0100f.png",u=a.p+"canvas-ai-modal-header-ef9d2b8.png",p=a.p+"canvas-ai-modal-header-df1f753.png",h=a.p+"canvas-ai-modal-header-00324d5.png",_=a.p+"canvas-ai-modal-header-027d1be.png",f=a.p+"canvas-ai-modal-header-88b3588.png",b=a.p+"canvas-ai-modal-header-5f67858.png",g=a.p+"canvas-ai-modal-header-84b98bd.png",y=a.p+"canvas-ai-modal-header-1da460c.png",A=a.p+"canvas-ai-modal-header-25cd3b1.png",x=a.p+"canvas-ai-modal-header-e2d7a7c.png";var E=a(0x21949e494),C=a(0x193f39c5f),k=a(0x172dd1bf5),v=a(0x22d51fee8),S=a(0xd843ab47),I=a(0x20e80190e),w=a(0x1ccef1c6f),T=a(0x226892387),N=a(0x20061cab9),M=a(0x5b1935a6),R=a(0x1fcbb004d),P=a(0x142811197),L=a.n(P);let O=new i.Ay("canvas-ai"),CanvasAiIntroModalNux=({onClose:e,shouldSuppressAnimations:t,onTryOut:r,UNSAFE_parentSelector:i})=>{let s,E=(0,n.useCallback)((e,t,a)=>n.createElement("div",{className:L().featureBlock},n.createElement("div",{className:L().featureIcon},n.createElement(o.Ah,{...e,size:"24"})),n.createElement("div",{className:L().featureText},t&&n.createElement("span",{className:L().featureHeading},t),a&&n.createElement("span",{className:L().featureDescription},a))),[]),C=(0,n.useCallback)(()=>e(),[e]),[v,S]=(s=(0,c.F)().getLocaleForLastViewedTeam(),[(0,n.useMemo)(()=>{switch(s){case"de-DE":return m;case"en-GB":return u;case"es-ES":return p;case"es-LA":return h;case"fr-FR":return _;case"it-IT":return f;case"ja-JP":return b;case"ko-KR":return g;case"pt-BR":return y;case"zh-CN":return A;case"zh-TW":return x;default:return d}},[s]),(0,n.useCallback)(()=>{switch(s){case"de-DE":return a.e("lottie-canvas-ai-modal-header-de-DE.json").then(a.t.bind(a,0x860b773b,23));case"es-ES":return a.e("lottie-canvas-ai-modal-header-es-ES.json").then(a.t.bind(a,0x11ddcb829,23));case"en-GB":return a.e("lottie-canvas-ai-modal-header-en-GB.json").then(a.t.bind(a,0x167772835,23));case"es-LA":return a.e("lottie-canvas-ai-modal-header-es-LA.json").then(a.t.bind(a,0xd3c9ec94,23));case"fr-FR":return a.e("lottie-canvas-ai-modal-header-fr-FR.json").then(a.t.bind(a,0x2362d2ea5,23));case"it-IT":return a.e("lottie-canvas-ai-modal-header-it-IT.json").then(a.t.bind(a,0x2099dadfb,23));case"ja-JP":return a.e("lottie-canvas-ai-modal-header-ja-JP.json").then(a.t.bind(a,0x1755e4eb2,23));case"ko-KR":return a.e("lottie-canvas-ai-modal-header-ko-KR.json").then(a.t.bind(a,0x13c3788e8,23));case"pt-BR":return a.e("lottie-canvas-ai-modal-header-pt-BR.json").then(a.t.bind(a,0x25057b811,23));case"zh-CN":return a.e("lottie-canvas-ai-modal-header-zh-CN.json").then(a.t.bind(a,0x42041d14,23));case"zh-TW":return a.e("lottie-canvas-ai-modal-header-zh-TW.json").then(a.t.bind(a,0x1933331f4,23));default:return a.e("lottie-canvas-ai-modal-header.json").then(a.t.bind(a,0x1af823607,23))}},[s])]),w=t?n.createElement(I.hR,{src:v,className:L().featureImage,alt:O.t("Write with AI")}):n.createElement(k.e,{getAnimationImport:S,autoplay:!0,loop:!0,className:L().featureImage}),T=n.createElement(n.Fragment,null,O.t("Write and edit with "),n.createElement("span",{className:L().highlightedText},"AI"),O.t(" in canvases"));return T=O.rt("Write with <span>AI</span>, powered by your team\u2019s messages and files",{"<span>":({text:e})=>n.createElement("span",{className:L().highlightedText},e)}),n.createElement(I.dW,{closeModal:C,className:L().nuxBody,closeButtonTone:"dark",UNSAFE_parentSelector:i},w,n.createElement(I.rQ,{className:L().header},n.createElement("div",{className:L().titleContainer},n.createElement(I.Rc,{className:L().title,title:T,id:""}))),n.createElement(I.$m,{className:L().contentBody},E({name:"direct-messages"},void 0,O.t("Describe what you want to write or how to edit your text and AI will handle a fast first draft.")),E({name:"ai-search"},void 0,O.rt("Slack can find messages and files that match your prompt, or you can tag a channel, like <span>#project-acme</span>. Only data you have access to will be used.",{"<span>":({text:e})=>n.createElement("span",{className:L().channelName},e),fallbackHash:"52cd89c85d79251b4605a9950a50a6d7f9620c48"}))),n.createElement(I.jl,{className:L().footer},n.createElement(I.ox,null,n.createElement(I.s_,{"aria-label":O.t("Got It"),type:"outline",onClick:C},O.t("Got It")),n.createElement(l.lV,{type:"primary",onClick:r,disabled:!1,"aria-label":O.t("Try It",{fallbackHash:"206911c09b910a072e5876f7f8d35acdef71e4e2"})},O.t("Try It",{fallbackHash:"206911c09b910a072e5876f7f8d35acdef71e4e2"})))))};CanvasAiIntroModalNux.displayName="CanvasAiIntroModalNux";let ConnectedCanvasAiIntroModal=({docEmbedRef:e})=>{let t=(0,r.wA)(),{getPrimaryView:a}=(0,n.useContext)(S.A),i=(0,T.d4)(a),l=i?.viewType===s.D.Canvas?i?.id:"",o=(0,E.A)(l),c=(0,C.A)(o?.isEmpty),d=(0,n.useCallback)(e=>{t((0,R.O)()),t((0,N.Ay)({spaceName:M.xu.CANVAS_AI_INTRO_MODAL,action:e?M.hw.CLICK:M.hw.DISMISS}))},[t]),m=(0,n.useCallback)(()=>{d(!0),e?.current?.docEditor.initiateAiAssistant("nux")},[e,d]),u=(0,T.d4)(e=>!(0,w.ty)(e,"a11y_animations")),p=(0,T.d4)(v.c9);return o&&c&&p?n.createElement(CanvasAiIntroModalNux,{onClose:d,shouldSuppressAnimations:u,onTryOut:m}):null};ConnectedCanvasAiIntroModal.displayName="ConnectedCanvasAiIntroModal";let D=ConnectedCanvasAiIntroModal},0x45ab12e1:(e,t,a)=>{"use strict";a.d(t,{Gx:()=>recordCanvasAiOverlaySubmitClick,IE:()=>useShouldShowCanvasAiOverlayBanner,Qi:()=>useShouldShowCanvasAiSuggestionCard,VU:()=>recordCanvasChannelTabAiMenuClick,bb:()=>recordCanvasAiOverlayBannerImpression,u_:()=>recordCanvasAiSuggestionCardInteraction});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x12d250bf6),l=a(0x226892387),o=a(0x1472af90a),s=a(0xf052d367),c=a(0x18632f75a);let d=o.G7.CanvasAiSuggestionCard,m=o.G7.CanvasAiOverlaySubmitButton,u=o.G7.CanvasChannelTabAiMenu,p=o.G7.CanvasAiOverlayBanner,useShouldShowCanvasAiSuggestionCard=()=>{let e=(0,r.wA)(),t=(0,l.d4)(e=>(0,s.kI)(e,d,o.X8.Click)&&(0,s.kI)(e,d,o.X8.Dismiss)&&(0,s.kI)(e,d,o.X8.Impression)&&(0,s.kI)(e,m,o.X8.Click));return(0,n.useEffect)(()=>{t||e((0,c.b)({interactions:[{component:d,type:o.X8.Click},{component:d,type:o.X8.Dismiss},{component:d,type:o.X8.Impression},{component:m,type:o.X8.Click}],reason:"canvas-ai-suggestion-card-rules"}))},[e,t]),(0,l.d4)(e=>{let t=(0,s.h$)(e,d)&&(0,s.h$)(e,m),a=(0,s.Pg)(e,d),n=(0,s.ky)(e,d,o.X8.Impression)>=i.KB,r=(0,s.ky)(e,m,o.X8.Click)>=i.DO;return!(t||a||n||r)})},useShouldShowCanvasAiOverlayBanner=()=>{let e=(0,r.wA)(),t=(0,l.d4)(e=>(0,s.kI)(e,p,o.X8.Impression)&&(0,s.kI)(e,m,o.X8.Click));(0,n.useEffect)(()=>{t||e((0,c.b)({interactions:[{component:p,type:o.X8.Impression},{component:m,type:o.X8.Click}],reason:"canvas-ai-overlay-banner"}))},[e,t]);let a=(0,l.d4)(e=>(0,s.ky)(e,p,o.X8.Impression)),i=(0,l.d4)(e=>(0,s.h$)(e,m));return a<=5&&!i},recordCanvasAiSuggestionCardInteraction=(e,t)=>{e((0,c.z)({component:d,type:t,reason:"canvas-ai-suggestion-card"}))},recordCanvasAiOverlaySubmitClick=e=>{e((0,c.z)({component:m,type:o.X8.Click,reason:"canvas-ai-overlay-submit-button"}))},recordCanvasChannelTabAiMenuClick=e=>{e((0,c.z)({component:u,type:o.X8.Click,reason:"canvas-channel-tab-ai-menu"}))},recordCanvasAiOverlayBannerImpression=e=>{e((0,c.z)({component:p,type:o.X8.Impression,reason:"canvas-ai-overlay-banner"}))}},0x1d8af55dd:(e,t,a)=>{"use strict";a.d(t,{A:()=>useCanvasAiWriteButtonNux});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21343fa5a),l=a(0x12d250bf6),o=a(0x226892387),s=a(0x1472af90a),c=a(0xf052d367),d=a(0x18632f75a);let m=s.G7.CanvasNuxCreateWithAiNotification,u="click-interaction-canvas-ai-write-button",p="impression-canvas-ai-write-button",useCanvasAiWriteButtonNux=()=>{let e=(0,r.wA)(),t=(0,o.d4)(e=>(0,c.kI)(e,m,s.X8.Click)),a=(0,o.d4)(e=>!(0,c.Tn)(e,m,s.X8.Click));(0,n.useEffect)(()=>{t||e((0,d.b)({interactions:[{component:m,type:s.X8.Click}],reason:u}))},[e,t]);let h=(0,o.d4)(e=>(0,c.kI)(e,m,s.X8.Impression)),_=(0,o.d4)(e=>(0,c.ky)(e,m,s.X8.Impression));(0,i.A)(()=>{let loadImpressions=async()=>{await e((0,d.b)({interactions:[{component:m,type:s.X8.Impression}],useCache:!0,cacheFilter:c.kI,reason:p}))};h||loadImpressions()});let f=(0,n.useMemo)(()=>_<l.T5,[_]),b=(0,n.useMemo)(()=>a&&f,[a,f]),g=(0,n.useCallback)(()=>{e((0,d.z)({component:m,type:s.X8.Click,reason:u}))},[e]),y=(0,n.useCallback)(()=>{f&&e((0,d.z)({component:m,type:s.X8.Impression,reason:p}))},[e,f]);return(0,n.useMemo)(()=>({shouldShowCanvasAiNux:b,recordWriteButtonClick:g,recordWriteButtonImpression:y}),[g,b,y])}},0x1bfd1c416:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>W,Yr:()=>V});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x102edf836),s=a(0xce378727),c=a(0xf2b9b0e6),d=a(0x19d27e99e),m=a(0xea23b7d3),u=a(0x84a5226c),p=a(0x3711e82d),h=a(0x1950da728);let _=new l.Ay("quip-files-browser");function CanvasPickerContent({explorerContext:e,onCanvasSelected:t}){let a=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,n.createElement(u.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),[...Array(18)].map((e,t)=>n.createElement(u.A,{key:t,className:"p-explorer_result--list"})),n.createElement(u.A,{className:"p-explorer_result--list p-explorer_result--list--last"})),[]);return n.createElement(c.A,{id:"canvases_picker"},n.createElement(i.A,{eventId:p.EventId.CANVAS_PICKER_OPEN,clogImpression:!0,enableClogImpressionOffScreen:!1,clogImpressionDuration:!0},n.createElement(d.A,{context:e,useExplorer:m.A,listLoadingFragment:a,inputId:h.Jx.CANVAS_PICKER_EXPLORER,inputSearchyMode:h.R5.FILES,inputPlaceholderText:_.t("Search for canvases",{ns:"search"}),resultListAriaLabel:_.t("Canvas results"),clogUiPage:p.UiPage.CANVAS_MODAL,onItemSelected:t,inputPreventUpstreamSync:!0})))}CanvasPickerContent.displayName="CanvasPickerContent";let f=CanvasPickerContent;var b=a(0x1f8f18921),g=a(0x1437dda8),y=a(0x238ac5c39),A=a(0x21f964039),x=a(0xbc35e2bd),E=a(0x11ed04fa0),C=a(0x165af5ef7),k=a(0x167d76333),v=a(0xa1832ae4),S=a(0x20e80190e),I=a(0x209e067d1),w=a(0xa985ed31),T=a(0xe6970e83),N=a(0x226892387),M=a(0x4c79b03f),R=a(0x1d06e350e),P=a(0x14ea3ce99),L=a(0x1fcbb004d),O=a(0x114180e52),D=a(0x1ee439e69);let F=new l.Ay("slack_docs"),U={elementName:"create_new_canvas",onClick:{enableClogAction:!0}},B={elementName:"insert_canvas",onClick:{enableClogAction:!0}},H={elementName:"cancel",onClick:{enableClogAction:!0}},CanvasPicker=({explorerContext:e,onInsertCanvas:t,onInsertNewCanvas:a,source:l,sourceTemplateName:c,onCanvasPickerClose:d,customBrowserInstanceId:m=R.ej.CANVAS})=>{let u=(0,r.wA)(),_=(0,N.d4)(e=>(0,v.tc)((0,D.H7)(e))),[I,T]=(0,n.useState)(void 0),W=(0,N.d4)(e=>(0,P.Lp)(e,I??"")),[V,G]=(0,n.useState)(!1),q=(0,N.d4)(E.U6),j=e?.channelId,z=(0,n.useCallback)(()=>{u((0,O.cL)({inputId:h.Jx.CANVAS_PICKER_EXPLORER})),u((0,M.Q)({browserInstanceId:m})),d?.()},[u,m,d]),K=(0,n.useCallback)(()=>{z(),u((0,L.O)())},[z,u]),[$,Y]=(0,n.useState)(void 0),Q=(0,n.useCallback)(()=>{K(),a?.()},[K,a]),Z=(0,n.useCallback)(()=>{I&&(K(),t(I))},[K,t,I]),resetSpeedBumpState=()=>{G(!1),Y(void 0)},J=(0,n.useCallback)(async()=>{if("channel-tab"===l){let e=await u((0,C.e)({fileId:I??"",channelId:j??""}));if(e)return void Y(e)}if(e?.forSolutionTemplate){let t=!!e.filteredCanvasIdSet&&Array.from(e.filteredCanvasIdSet).some(e=>e===I);if(I&&t)return void Y(A.O.DUPLICATE_ITEM);let a=(0,x.a)(W);if(a)return void Y(a)}Z()},[j,u,e?.filteredCanvasIdSet,e?.forSolutionTemplate,Z,W,I,l]),X=(0,n.useCallback)(({item:e,itemSource:t})=>{if((0,w.A)(e)){if("list"===t)return void T(e);"search"===t&&(T(e),G(!0))}},[]),renderSpeedBump=()=>$===A.O.NEED_TO_SHARE_TEMPLATE||$===A.O.NEED_TO_TEMPLATIZE_AND_SHARE_FILE?n.createElement(y.W,{file:W,onCancel:resetSpeedBumpState,onContinue:Z}):$===A.O.DUPLICATE_ITEM?n.createElement(g.h,{file:W,onContinue:resetSpeedBumpState}):q&&$?n.createElement(b.A,{speedBumpType:$,file:W,onCancel:resetSpeedBumpState}):null;renderSpeedBump.displayName="renderSpeedBump";let ee=(0,n.useMemo)(()=>"custom-solution-modal"===l?F.t("Select a canvas to duplicate and add to the template."):null,[l]),et=(0,N.d4)(k.F)&&!_,ea="canvas_picker_modal_label_id",en="insertion_toolbar"===l?F.t("Insert a canvas"):"embedded-canvas-placeholder"===l||"channel-tab"===l||"custom-solution-modal"===l?F.t("Add a canvas"):"sc-spaces-about-page"===l?F.t("Pin a canvas",{fallbackHash:"5b0bf2f69050762548a8fb73d5a882e41da7469e",fallbackHashNs:"about_workspace_page"}):F.t("Attach a canvas"),getSubmitButtonCopy=()=>"sc-spaces-about-page"===l?F.t("Pin Canvas"):"custom-solution-modal"===l?F.t("Add to Template",{fallbackHash:"95802daab3a23990338179f72248350c1434cf39"}):F.t("Insert");(0,n.useEffect)(()=>{V&&I&&J()},[V,J,I]);let er=n.createElement(f,{explorerContext:e,onCanvasSelected:X});return n.createElement(i.A,{eventId:p.EventId.QUIP_INSERT_CANVAS_PICKER,entryPoint:l,uiComponentVariant:c},n.createElement(S.aF,{maxWidth:650,labelledby:ea,className:"p-canvas_picker__modal",onClose:z},n.createElement(S.rQ,{className:"p-canvas_picker__header"},n.createElement(S.Rc,{title:en,subtitle:ee,id:ea})),n.createElement(S.$m,{className:"p-canvas_picker__content"},er),renderSpeedBump(),n.createElement(S.jl,{className:"p-canvas_picker__footer"},n.createElement(S.ox,null,et&&a&&n.createElement(s.A,{autoClogProps:U,size:o.F0.medium,type:"outline",onClick:Q,"data-qa":"canvas_picker_create_new_canvas","aria-label":F.t("Create New Canvas")},F.t("Create New Canvas")),n.createElement(S.s_,{autoClogProps:H,type:"outline",onClick:K,"aria-label":F.t("Cancel")},F.t("Cancel")),n.createElement(s.A,{autoClogProps:B,type:"primary",onClick:J,disabled:!I,"aria-label":getSubmitButtonCopy()},getSubmitButtonCopy())))))};CanvasPicker.displayName="CanvasPicker";let W=(0,T.A)(CanvasPicker,{renderInChildWindow:!(0,I.A)()}),V=(0,T.A)(CanvasPicker,{renderInChildWindow:!(0,I.A)(),isStackable:!0})},0x24364c335:(e,t,a)=>{"use strict";a.d(t,{G:()=>AnnotationCanvasReactionBar,x:()=>CanvasReactionBar});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0xbe5e39b6),s=a(0x14fad6485),c=a(0x106d9c7ac),d=a(0x2173e1832),m=a(0x859d03c),u=a(0x193f39c5f),p=a(0x2301c802e),h=a(0x4f22ff33),_=a(0x238b287cf),f=a(0xbd3de346),b=a(0x20679dcfc),g=a(0xe8efe2c1),y=a(0x1121794ee),A=a(0x1d37f5c8a),x=a(0x3711e82d),E=a(0x9b971e7e),C=a(0x226892387),k=a(0x14ea3ce99),v=a(0xd93ecf94),S=a(0x8976310b),I=a(0x1beeaa71e),w=a(0x1c32a2ca1),T=a(0xab98ceeb),N=a.n(T);let CanvasReactionBar=({message:e,popoverProps:t,source:a,setAnnotationFocused:r})=>{let i=(0,_.A)(),o=(0,y.S)(e),{windowRef:b}=(0,n.useContext)(s._0),{docEmbed:E}=(0,n.useContext)(p.N),v=(0,C.d4)(t=>(0,g.f)(t,e.channel)),S=(0,u.A)((0,h.n9)(b.deref(),v??"")),w=(0,C.d4)(e=>(0,k.Lp)(e,v)),T=(0,n.useMemo)(()=>(0,f.mW)(w)&&!S,[w,S]),M=E?.docEditor,R=(0,A.J)(e),P=(0,C.d4)(e=>R?(0,I.pK)(e,R):void 0),L=(0,n.useCallback)(e=>{o&&M?M?.setCommentFocused(o,e):r?.(e)},[o,M,r]),O=(0,n.useCallback)(()=>{L(!0),i.track(x.EventId.QUIP_DOC_EMBED_EVENT,{contexts:{quip:{source:a,metric:"open_reaction",thread_id:o,reaction_count:P},core:{quip_file_id:v,file_id:v}}})},[L,i,a,o,P,v]),D=(0,n.useCallback)(()=>{L(!1),M?.focusEditor()},[L,M]);return n.createElement(c.Ay,{...t,zIndex:d.m.Modal,onOpen:O,onAfterClose:D},n.createElement("div",{className:l()(N().CanvasReactionBar,{[N().CanvasReactionBarEditsDisabled]:!T})},n.createElement(m.A,{reactionKey:R,alwaysExpand:!0,positionAddReactionButtonLeft:!0,shouldPropagateOnAddReactionClose:!0,canReactOverride:T})))};CanvasReactionBar.displayName="CanvasReactionBar";let AnnotationCanvasReactionBar=({commentId:e,fileId:t,targetBounds:a,source:i,onClose:l,setAnnotationFocused:s})=>{let c=(0,r.wA)(),d=(0,C.d4)(E.ZT),m=(0,b.p)(t),u=(0,C.d4)(t=>(0,S.r)(t,e)),p=u?.threadTs,h=(0,C.d4)(e=>p?(0,v.Ld)(e,m,p):null),_=(0,C.d4)(e=>(0,I.bk)(e,(0,A.J)(h))),f=(0,n.useMemo)(()=>({onClose:l,targetBounds:a,offsetX:10,position:o.yX.Right,isOpen:!0,useTargetBoundsAsPosition:!0}),[l,a]);return((0,n.useEffect)(()=>{!u&&d&&c((0,w.P)({channelId:m,teamId:d,quipOrSlackCommentThreadId:e}))},[c,e,m,d,u]),(0,n.useEffect)(()=>{_?.length===0&&l?.()},[l,_]),h)?n.createElement(CanvasReactionBar,{message:h,popoverProps:f,source:i,setAnnotationFocused:s}):null};AnnotationCanvasReactionBar.displayName="AnnotationCanvasReactionBar"},0xb22ff273:(e,t,a)=>{"use strict";a.d(t,{X:()=>CanvasShareMessage});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0xdede1f0e),s=a(0x253acf1e2),c=a(0xbd3de346),d=a(0x226892387),m=a(0xaa51370c),u=a(0x14ea3ce99);let p=new l.Ay("message");function CanvasShareMessage({msg:e}){let t=e?.files||[],a=(0,d.d4)(e=>t.length>0?(0,u.Lp)(e,t[0]):null),r=(0,n.useMemo)(()=>({file_id:a?.id||"",type:"canvas"}),[a?.id]),l=(0,n.useMemo)(()=>({file_id:a?.id||"",type:"list_record"}),[a?.id]),h={"<a>":()=>a?(0,c.l7)(a)?n.createElement(s.A,{element:l}):n.createElement(o.A,{element:r}):""};if(!a)return null;let _=(0,c.l7)(a)?p.rt("Shared this list: <a>list</a>",h):p.rt("Shared this canvas: <a>canvas</a>",h);return(0,c.dE)(a)&&(_=(0,c.mW)(a)?p.rt("Invited you to edit this template: <a>canvas</a>",h):p.rt("Invited you to use this template: <a>canvas</a>",h),a?.access===m.z.Owner&&(_=p.rt("Invited you to become owner of this template <a>canvas</a>",h))),n.createElement("span",{className:i()("c-message__body","c-message__body--automated")},_)}CanvasShareMessage.displayName="CanvasShareMessage"},0x99192caa:(e,t,a)=>{"use strict";a.d(t,{z:()=>CanvasTabUpdatesMessage});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x62a17882),s=a(0x20482ad21),c=a(0x1e864b930),d=a(0x4c96e5d9),m=a(0x125de1ee5),u=a(0x287da5a6),p=a(0x1c5b5452b),h=a(0xdede1f0e),_=a(0x14f800017),f=a(0x990bc6be),b=a(0x8b60780c),g=a(0x1c760ba43),y=a(0x1a02c72b5),A=a(0xd6a16321),x=a(0x82980ab8),E=a(0x12cbe336e),C=a(0x24558b75f),k=a(0x185059e6b),v=a(0x1d774a049),S=a(0x226892387),I=a(0x21bfacd01),w=a(0x14149c126),T=a(0xe684f705);let N=new s.Ay("message");function CanvasTabUpdatesMessage({msg:e,unfurl:t}){let a=e?.channel||t?.channel_id,i=e?.canvas_update_canvas_id||t?.canvas_update_canvas_id,s=e?.canvas_update_section_ids||t?.canvas_update_section_ids,M=(0,S.d4)(e=>a?(0,f.G)(e,{channelId:a}).find(({type:e,data:t})=>e===g.Xy.Canvas&&t?.fileId===i):void 0),R=e?.canvas_update_user_ids||t?.canvas_update_user_ids,P=(0,S.Z2)(e=>(0,T.gA)(e,R)),L=(0,S.d4)(E.yZ),O=(0,S.d4)(e=>"on"===(0,w._Z)(e,"channel_canvas_update_ai_message_copy_change")),D=(0,S.d4)(I.V),F=(0,r.wA)(),U=(0,n.useCallback)(e=>{if(t)return;let n=(0,o.cX)()?e?.metaKey:e?.ctrlKey,r=(0,C.M2)();if(!D&&i&&(0,u.A)(e))return void F((0,m.p)({navProps:(0,A.mo)({id:i}),clogParams:{entryPoint:v.f.CANVAS_TAB_UPDATE_MESSAGE}}));if(r&&n&&!L&&i)return void F((0,k.S)({fileId:i,source:v.f.CANVAS_TAB_UPDATE_MESSAGE}));if(a&&M?.id)F((0,b.D)({tabId:M?.id,channelId:a,tab:M,sectionIdsToHighlightOverride:s,docSource:v.f.CANVAS_TAB_UPDATE_MESSAGE}));else if(i){let e={fileId:i,isChannelCanvas:!1,source:v.f.CANVAS_TAB_UPDATE_MESSAGE};F((0,y.o)((0,A.mo)({id:i,sectionIdsToHighlightOverride:s,clogParams:e})))}},[t,a,M,i,F,s,L,D]),B=P.map(e=>(0,x.wg)(e)),H=(0,n.useCallback)(({text:e})=>n.createElement(d.Ay,{tip:(0,c.A)(B.slice(2))},n.createElement("span",null,e)),[B]),W=(0,n.useMemo)(()=>{let e=M?.label;return e&&"Untitled"!==e||(e=void 0),{file_id:i||"",label:e,type:"canvas"}},[i,M?.label]),V=(0,n.useCallback)(()=>n.createElement(h.A,{element:W,onOpenDocHandler:U}),[W,U]),G=(0,n.useMemo)(()=>n.createElement(_.hY,{users:P,tooltip:H,anchor:V}),[V,H,P]);if(!t&&O){let t=e?.canvas_update_ai_summary_blocks;if(Array.isArray(t)&&t.length>0)return n.createElement("div",{className:l()("c-message__body","c-message__body--automated")},n.createElement("div",null,G),n.createElement("div",null,n.createElement("br",null),n.createElement("b",null,N.t("Slack AI Summary"))),n.createElement("div",null,(0,p.Q)({blocks:t})))}return n.createElement("span",{className:l()("c-message__body","c-message__body--automated")},G)}CanvasTabUpdatesMessage.displayName="CanvasTabUpdatesMessage"},0x170ab2576:(e,t,a)=>{"use strict";a.d(t,{Yp:()=>recordCloseTemplateButtonsBarClick,oU:()=>useShouldShowTemplateButtonsBar});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x226892387),l=a(0x1472af90a),o=a(0xf052d367),s=a(0x18632f75a);let c="close-canvas-template-buttons-bar",useShouldShowTemplateButtonsBar=e=>{let t=(0,r.wA)(),a=(0,i.d4)(t=>(0,o.kI)(t,e,l.X8.Click));return(0,n.useEffect)(()=>{a||t((0,s.b)({interactions:[{component:e,type:l.X8.Click}],reason:c}))},[e,t,a]),!(0,i.d4)(t=>(0,o.Tn)(t,e,l.X8.Click))},recordCloseTemplateButtonsBarClick=(e,t)=>{t((0,s.z)({component:e,type:l.X8.Click,reason:c}))}},0x1eddd098f:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>U,Sy:()=>useCanvasTemplateOptions,V8:()=>D,mN:()=>isCannedTemplateTriggerType});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x2286acf6c),c=a(0x130d89881),d=a(0x14fad6485),m=a(0x40c0d834),u=a(0x1df96de4c),p=a(0x20482ad21),h=a(0x224f7f0e9),_=a(0x15e48057c),f=a(0xb04bc36e),b=a(0x1faa3f1ac),g=a(0x2501a2cee),y=a(0x1a043bf26),A=a(0x170ab2576),x=a(0x5ec2a928),E=a(0x193f39c5f),C=a(0x22d51fee8),k=a(0xab2e2cf4),v=a(0x12185e091),S=a(0x205570b9a),I=a(0x3711e82d),w=a(0x6d72337),T=a(0x1ccef1c6f),N=a(0x12f41fc32),M=a(0x226892387),R=a(0x91e15f37),P=a(0x1472af90a);let L=new p.Ay("slack-docs");var O=((n={}).CANNED_CHANNEL_OVERVIEW="ChannelOverviewTemplate",n.CANNED_WEEKLY_SYNC="WeeklySyncTemplate",n.CANNED_EMPLOYEE_ONBOARDING="EmployeeOnboardingTemplate",n.CANNED_MONTHLY_NEWSLETTER="MonthlyNewsletterTemplate",n.CANNED_AGENDA="AgendaTemplate",n.CANNED_SHARED_RESOURCES="SharedResourcesTemplate",n.CANNED_OOO_COVERAGE="OOOCoveragePlanTemplate",n);let isCannedTemplateTriggerType=e=>Object.values(O).includes(e),D=2e3,F=["smart-cards","blank_page",...Object.values(O)],useCanvasTemplateOptions=({experimentCanvasSmartCardsGroupOn:e=!1,isStandaloneCanvas:t,inHuddle:a,isDmOrMpdm:n})=>{let{files:i}=(0,x.A)();return(0,r.useMemo)(()=>{let hasCannedTemplate=e=>!!i?.find(t=>t.template_name===e),r=["blank_page",...e?["smart-cards"]:[]];return t&&!a?(hasCannedTemplate("EmployeeOnboardingTemplate")&&r.push("EmployeeOnboardingTemplate"),hasCannedTemplate("MonthlyNewsletterTemplate")&&r.push("MonthlyNewsletterTemplate"),hasCannedTemplate("WeeklySyncTemplate")&&r.push("WeeklySyncTemplate"),hasCannedTemplate("OOOCoveragePlanTemplate")&&r.push("OOOCoveragePlanTemplate")):a?(hasCannedTemplate("AgendaTemplate")&&r.push("AgendaTemplate"),hasCannedTemplate("WeeklySyncTemplate")&&r.push("WeeklySyncTemplate"),r.length>1&&r.shift()):n?(hasCannedTemplate("AgendaTemplate")&&r.push("AgendaTemplate"),hasCannedTemplate("SharedResourcesTemplate")&&r.push("SharedResourcesTemplate"),hasCannedTemplate("WeeklySyncTemplate")&&r.push("WeeklySyncTemplate")):(hasCannedTemplate("ChannelOverviewTemplate")&&r.push("ChannelOverviewTemplate"),hasCannedTemplate("WeeklySyncTemplate")&&r.push("WeeklySyncTemplate"),hasCannedTemplate("SharedResourcesTemplate")&&r.push("SharedResourcesTemplate")),(!a||r.length<2)&&r.push("help_center_link"),r},[i,e,n,t,a])},CanvasTemplateOptions=({onTemplateSelection:e,channel:t,fileId:a,isStandaloneCanvas:n,onTemplateFromGallerySelection:l,docEmbed:p,inHuddle:x,fromChannelTab:O})=>{let U=(0,i.wA)(),B=(0,r.useRef)(null),H=(0,r.useRef)(null),W=(0,v.JM)(t),V=(0,M.d4)(S.QG),{windowRef:G}=(0,r.useContext)(d._0),q=(0,r.useContext)(_.A),[j,z]=(0,r.useState)(null),[K,$]=(0,r.useState)(null),[Y,Q]=(0,r.useState)(null),Z=(0,M.d4)(R.iH),J=(0,M.d4)(C.c9),X=(0,M.d4)(e=>(0,T.ty)(e,"seen_canvas_template_new_badge_channel_canvas")??!1),ee=(0,E.A)(p?.hasHeaderImage)??!1,et=P.G7.CanvasTemplateButtonsStandaloneCanvas,ea=(0,A.oU)(et),en=!x&&!ea,er=(0,r.useMemo)(()=>({source:en?"CanvasTryTemplate":"CanvasTemplateOptions",isChannelCanvas:!n,isDmOrMpdmChannelCanvas:!n&&W}),[en,n,W]),ei=(0,r.useCallback)(e=>{U((0,w.K6)({autoClogProps:{elementName:e,...er},fileId:n?a:"",onTemplateFromGallerySelection:l,fromChannelTab:O})),n||X||U((0,N.AZ)({pref:"seen_canvas_template_new_badge_channel_canvas",value:!0}))},[U,er,n,a,l,X,O]),el=(0,r.useCallback)(t=>{e(t),!n&&!X&&isCannedTemplateTriggerType(t)&&U((0,N.AZ)({pref:"seen_canvas_template_new_badge_channel_canvas",value:!0}))},[e,n,X,U]),eo=(0,r.useRef)(null),es=(0,r.useCallback)(e=>{let t;n||(t=W?"dm":"channel");let a="TryTemplate";B.current?.track({action:I.UiAction.CLICK,label:e,canvasType:n?"standalone":"channel-canvas",canvasTemplateType:"canned",canvasTemplateLabel:e,uiComponentVariant:t,elementName:a,...er}),F.includes(e)?el(e):"help_center_link"===e&&ei(a)},[n,er,W,el,ei]),ec=(0,r.useCallback)(e=>{es(e.id)},[es]),ed=(0,r.useCallback)(e=>{e.keyCode===h.Fm&&(e.preventDefault(),e.id&&es(e.id))},[es]),em=(0,r.useCallback)(()=>r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"ellipsis-horizontal-filled",size:"20"}),L.t("More"),!X&&!n&&r.createElement(f.A,{className:"p-canvas_template_options__callout"},L.t("NEW"))),[X,n]),eu=(0,r.useCallback)((e,{key:t})=>{let a;return"help_center_link"===t?a=em():"blank_page"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"canvas-content",size:"20"}),L.t("Blank canvas")):"EmployeeOnboardingTemplate"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"heart",size:"20"}),L.t("Employee onboarding")):"MonthlyNewsletterTemplate"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"megaphone",size:"20"}),L.t("Newsletter")):"ChannelOverviewTemplate"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"rocket",size:"20"}),L.t("Channel overview")):"WeeklySyncTemplate"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"calendar",size:"20"}),L.t("Weekly sync")):"AgendaTemplate"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"checkbox",size:"20"}),L.t("Agenda")):"SharedResourcesTemplate"===t?a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"link",size:"20"}),L.t("Shared resources")):"OOOCoveragePlanTemplate"===t&&(a=r.createElement(r.Fragment,null,r.createElement(g.Ah,{name:"notifications-off",size:"20"}),L.t("Out of office coverage"))),r.createElement("div",{className:"p-canvas_template_options__buttons__button"},a)},[em]);(0,r.useEffect)(()=>{q&&eo?.current?.focus()},[]),(0,r.useEffect)(()=>(!H.current&&j&&K&&(H.current=G.deref()?.setTimeout(()=>{H.current&&B.current?.track({action:I.UiAction.IMPRESSION,...er})},D)),()=>{H.current&&(G.deref()?.clearTimeout(H.current),H.current=null)}),[K,er,j,en,G]);let ep=useCanvasTemplateOptions({experimentCanvasSmartCardsGroupOn:V,isDmOrMpdm:W,inHuddle:x,isStandaloneCanvas:n}),eh=(0,r.useCallback)(()=>j&&K?{display:"block",marginLeft:0,marginTop:20,left:j.left-K.left,top:j.top-K.top+j.height+(Y?.height??0)}:u.t0,[j,K,Y]),e_=(0,r.useMemo)(()=>(0,s.A)(()=>{let e=G.deref()?.document,t=e?.querySelector(".editor-default-section-text-overlay.text-section")?.getBoundingClientRect();t&&z(t);let a=e?.querySelector(".document.parts-screen")?.getBoundingClientRect();a&&$(a);let r=null;Z&&n&&(r=e?.querySelector(".p-upgrades_alert_banner")?.getBoundingClientRect()??null),Q(r)},150),[n,Z,G]);(0,r.useEffect)(()=>(G.deref()?.addEventListener("resize",e_),()=>{G.deref()?.removeEventListener("resize",e_),e_.cancel()}),[e_,G]);let ef=(0,r.useContext)(k.S);(0,r.useEffect)(()=>{e_()},[e_,ef,ee]);let eb=(0,r.useCallback)(({text:e})=>r.createElement(b.A,{onClick:()=>es("help_center_link"),underlineStyle:"underline"},e),[es]);return r.createElement(m.A,{eventId:I.EventId.QUIP_CHANNEL_CANVAS_TEMPLATES,fileId:a,channelId:t?.id||"",disableAutoEntryPoint:!0,trackClogRef:e=>{B.current={track:e}},...er},r.createElement("div",{className:o()("p-canvas_template_options","p-canvas_template_options--absolute"),style:eh(),role:"group","aria-label":L.t("New Canvas")},en&&!J&&r.createElement("div",{className:"p-canvas_template_options__gallery"},L.rt("Feeling stuck? Try a <a>template</a>\u2026",{"<a>":eb})),x&&r.createElement(r.Fragment,null,r.createElement("div",{className:"p-canvas_template_options__header"},L.t("Get Started")),r.createElement("div",{className:"p-canvas_template_options__buttons p-canvas_template_options__buttons--ia4"},r.createElement(c.A,{disableHeight:!0},({width:e})=>r.createElement(y.A,{keys:ep,ref:eo,height:38*ep.length,width:e,rowRenderer:eu,onItemKeyDown:ed,onItemClick:ec,"aria-label":L.t("Templates")}))))))};CanvasTemplateOptions.displayName="CanvasTemplateOptions";let U=CanvasTemplateOptions},0x48b99b8b:(e,t,a)=>{"use strict";a.d(t,{h:()=>openPublishCanvasTemplateSpeedbump});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x20482ad21),o=a(0x1a2d55128),s=a(0x10b5318b2),c=a(0x10bae7b36),d=a(0x6e87d4ec),m=a(0x58199183),u=a(0x13341683c),p=a(0x246ae1c41),h=a(0x1aba0c452),_=a(0xbd3de346),f=a(0xa1832ae4),b=a(0x5175e4da),g=a(0x226892387),y=a(0x14ea3ce99),A=a(0x1fd6be444),x=a(0x11265a55d),E=a(0x1fcbb004d),C=a(0x46dbff89),k=a(0x5c354532),v=a(0x1ee439e69),S=a(0x16ffed5ab);let I=new l.Ay("slack-docs"),validations=e=>e.templateType?{}:{templateType:"required"},w={name:"warning"},PublishCanvasTemplateSpeedbump=({fileId:e,isUnpublish:t})=>{let a=(0,r.wA)(),l=(0,g.d4)(v.H7),C=(0,g.d4)(t=>(0,y.Lp)(t,e)),T=l?.id,N=(0,f.F1)(l),M=(0,g.d4)(h.N),R=(0,g.d4)(k.jJ),P=M&&!R,L=R&&!M,{categoryOptions:O,renderOptions:D}=(0,u.l)(),F={templateType:void 0};P&&(F.templateType=b.I.SALES),L&&(F.templateType=b.I.ORG);let U=(0,_.l4)(C)?b.I.ORG:(0,_.Bf)(C)?b.I.SALES:void 0,B=(0,n.useMemo)(()=>n.createElement(m.A,{id:T}),[T]),H=(0,p.m)({teamName:N}),W=(0,n.useCallback)(()=>a((0,E.O)()),[a]),V=(0,n.useCallback)(async t=>{try{if(!t.templateType)return;await a((0,A.G)({fileId:e,category:t.templateType})),H({publishTemplateCategory:t.templateType,isPublishTemplate:!0}),W()}catch{a((0,S.M)({element:n.createElement(d.A,{svgIconProps:w},I.t("Template failed to publish, please try again"))}))}},[W,a,e,H]),G=(0,n.useCallback)(async()=>{try{if(!U)return;await a((0,x.l)({fileId:e,unsetOrgSharingSetting:!0})),H({publishTemplateCategory:U,isPublishTemplate:!1}),W()}catch(e){a((0,S.M)({element:n.createElement(d.A,{svgIconProps:w},I.t("Template failed to unpublish, please try again"))}))}},[a,e,H,U,W]),renderOption=e=>D(e,!1),renderSelectedOption=e=>D(e,!0),q={[b.I.ORG]:I.rt("Everyone in {teamName} will no longer be able to see it.",{teamName:B}),[b.I.SALES]:I.rt("People with access to the <strong>Sales tab</strong> will no longer be able to see it.")},getContent=()=>{if(t&&U&&U!==b.I.NONE)return n.createElement("div",null,n.createElement("div",{className:"margin_bottom_100"},I.t("Here\u2019s what will happen:")),n.createElement("ul",null,n.createElement("li",null,q[U]),n.createElement("li",null,I.t("Availability will stay the same for specific people and channels given access.")),n.createElement("li",null,I.t("People who have used the template won\u2019t lose their work."))));let e=I.t("Select a section in the template gallery to publish your template.");return M&&R?n.createElement(o.A,{placeholderText:I.t("Select a section"),name:"templateType",labelText:e,ariaLabel:e,width:"100%",options:O,renderOption:renderOption,renderSelectedOption:renderSelectedOption,optionsRowHeight:64,size:"large",className:"margin_bottom_50"}):P?n.createElement("span",null,I.rt("Anyone with access to the Sales tab in {teamName} can view and use this template. The template will be saved in <strong>Sales templates</strong> in the template gallery.",{teamName:B})):L?n.createElement("span",null,I.rt('This template will be available in the <strong>"Created by {teamName}"</strong> section of the template gallery for everyone in {teamName}.',{teamName:B})):null};return getContent.displayName="getContent",n.createElement(s.A,{validate:t?void 0:validations,validateOnMount:!0,initialValues:F,onSubmit:t?G:V,className:"display_none"},({submitForm:e,isSubmitting:a,errors:r})=>n.createElement(c.A,{onSubmit:e,onClose:W,onCancel:W,title:t?I.t("Unpublish template?"):I.t("Publish template?"),isSubmitting:a,submitButtonText:t?I.t("Unpublish now"):I.t("Publish now"),disableSubmitButton:!(0,i.A)(r)||a},getContent()))};PublishCanvasTemplateSpeedbump.displayName="PublishCanvasTemplateSpeedbump";let openPublishCanvasTemplateSpeedbump=({fileId:e,isUnpublish:t})=>(0,C.q)({element:n.createElement(PublishCanvasTemplateSpeedbump,{fileId:e,isUnpublish:t})})},0x5d73d2a4:(e,t,a)=>{"use strict";a.d(t,{_:()=>CanvasUpdatesAvatar});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x2501a2cee);function CanvasUpdatesAvatar({size:e}){return n.createElement("span",{className:i()("p-huddle_msg_avatar",{"p-huddle_msg_avatar--small":16===e})},n.createElement(l.Ah,{name:"canvas-content",size:"20"}))}CanvasUpdatesAvatar.displayName="CanvasUpdatesAvatar"},0x14f800017:(e,t,a)=>{"use strict";a.d(t,{I5:()=>getCanvasPlainTextTitle,QR:()=>getCanvasUpdatesPlainTextLabel,hY:()=>CanvasUpdatesLabel});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x12185e091),l=a(0x82980ab8);let o=new r.Ay("message"),CanvasUpdatesLabel=({users:e,channel:t,showChannelCanvasTitle:a=!0,tooltip:r,anchor:s})=>{let c=(0,i.JM)(t),d=(0,n.useMemo)(()=>e.map(e=>(0,l.wg)(e)),[e]),m=(0,n.useMemo)(()=>d.length>0?{userName1:d[0],userName2:d[1],otherCount:d.length-2,"<tooltip>":r,"<a>":s}:void 0,[s,r,d]);return 0===d.length?null:d.length>2?c?a?o.rt("{userName1}, {userName2}, and <tooltip>{otherCount, plural, =1 {# other} other {# others}}</tooltip> made updates to <a>DM canvas</a>.",m):o.rt("{userName1}, {userName2}, and <tooltip>{otherCount, plural, =1 {# other} other {# others}}</tooltip> made updates to the <a>DM canvas</a>.",m):a?o.rt("{userName1}, {userName2}, and <tooltip>{otherCount, plural, =1 {# other} other {# others}}</tooltip> made updates to <a>channel canvas</a>.",m):o.rt("{userName1}, {userName2}, and <tooltip>{otherCount, plural, =1 {# other} other {# others}}</tooltip> made updates to the <a>channel canvas</a>.",m):2===d.length?c?a?o.rt("{userName1} and {userName2} made updates to <a>DM canvas</a>.",m):o.rt("{userName1} and {userName2} made updates to the <a>DM canvas</a>.",m):a?o.rt("{userName1} and {userName2} made updates to <a>channel canvas</a>.",m):o.rt("{userName1} and {userName2} made updates to the <a>channel canvas</a>.",m):c?a?o.rt("{userName1} made updates to <a>DM canvas</a>.",m):o.rt("{userName1} made updates to the <a>DM canvas</a>.",m):a?o.rt("{userName1} made updates to <a>channel canvas</a>.",m):o.rt("{userName1} made updates to the <a>channel canvas</a>.",m)},getCanvasPlainTextTitle=({channel:e,showChannelCanvasTitle:t=!0,fileTitle:a})=>{let n=(0,i.JM)(e),r=o.t("the DM canvas"),l=o.t("the channel canvas");return t&&a?a:n?r:l},getCanvasUpdatesPlainTextLabel=({users:e,channel:t,fileTitle:a,showChannelCanvasTitle:n=!0})=>{let r=e.map(e=>(0,l.wg)(e));if(0===r.length)return"";let i=getCanvasPlainTextTitle({channel:t,fileTitle:a,showChannelCanvasTitle:n}),s=r[0],c={userName1:s,userName2:r[1],otherCount:r.length-2,title:i};return r.length>2?o.t("{userName1}, {userName2}, and {otherCount, plural, =1 {# other} other {# others}} made updates to {title}.",c):2===r.length?o.t("{userName1} and {userName2} made updates to {title}.",c):o.t("{userName1} made updates to {title}.",c)}},0xe8a88a4c:(e,t,a)=>{"use strict";a.d(t,{g:()=>DeprecatedChannelCanvasUpdatesMessage});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x1e864b930),c=a(0x1faa3f1ac),d=a(0x4c96e5d9),m=a(0x1c5b5452b),u=a(0xdede1f0e),p=a(0x14f800017),h=a(0xfd00162b),_=a(0x1c760ba43),f=a(0x1a02c72b5),b=a(0xd6a16321),g=a(0x82980ab8),y=a(0xf3719a28),A=a(0x107e97a6b),x=a(0x1d774a049),E=a(0x226892387),C=a(0x217553e42),k=a(0x14149c126),v=a(0xe684f705);let S=new o.Ay("message");function DeprecatedChannelCanvasUpdatesMessage({msg:e,unfurl:t}){let a=e?.canvas_update_user_ids||t?.canvas_update_user_ids,i=(0,E.Z2)(e=>(0,v.gA)(e,a)),o=e?.channel||t?.channel_id,I=(0,E.d4)(e=>(0,C.OL)(e,o)),{fileId:w}=(0,y.H)(I,!0),T=e?.canvas_update_section_ids||t?.canvas_update_section_ids,N=(0,E.d4)(e=>(0,h.V)(e,{fileId:w,tabId:_.fY.Channel})),M=(0,E.d4)(e=>"on"===(0,k._Z)(e,"channel_canvas_update_ai_message_copy_change")),R=(0,r.wA)(),P=(0,n.useCallback)(()=>{t||R((0,f.o)((0,b.mo)({id:(0,A.Lo)({id:w}),clogParams:{fileId:w||"",source:x.f.CHANNEL_CANVAS_UPDATE_MESSAGE},sectionIdsToHighlightOverride:T})))},[t,R,T,w]),L=i.map(e=>(0,g.wg)(e)),O=(0,n.useCallback)(({text:e})=>n.createElement(d.Ay,{tip:(0,s.A)(L.slice(2))},n.createElement("span",null,e)),[L]),D=(0,n.useMemo)(()=>({file_id:w||"",type:"canvas"}),[w]),F=(0,n.useCallback)(({text:e})=>N&&w?n.createElement(u.A,{element:D,onOpenDocHandler:P}):n.createElement(c.A,{onClick:P},e),[w,D,P,N]),U=(0,n.useMemo)(()=>n.createElement(p.hY,{users:i,channel:I,showChannelCanvasTitle:N,tooltip:O,anchor:F}),[F,I,N,O,i]);if(0===L.length)return null;if(!t&&M){let t=e?.canvas_update_ai_summary_blocks;if(Array.isArray(t)&&t.length>0)return n.createElement("div",{className:l()("c-message__body","c-message__body--automated")},n.createElement("div",null,U),n.createElement("div",null,n.createElement("br",null),n.createElement("b",null,S.t("Slack AI Summary"))),n.createElement("div",null,(0,m.Q)({blocks:t})))}return n.createElement("span",{className:l()("c-message__body","c-message__body--automated")},U)}DeprecatedChannelCanvasUpdatesMessage.displayName="DeprecatedChannelCanvasUpdatesMessage"},0x19916b4eb:(e,t,a)=>{"use strict";a.d(t,{A:()=>BaseCommentsUiProvider});var n=a(0xa6378909),r=a(0x1d43eb6d7),i=a(0x9b971e7e),l=a(0x19ead61ce),o=a(0x22fbae360);let BaseCommentsUiProvider=class BaseCommentsUiProvider{quipThreadId;dispatch;getState;logger;delegate;constructor({quipThreadId:e,dispatch:t,getState:a}){this.quipThreadId=e,this.dispatch=t,this.getState=a,this.logger=(0,r.Ay)({getState:a})}setDelegate(e){this.delegate=e}get teamId(){return(0,i.ZT)(this.getState())}openInlineCommentsThread(e){return this.openCommentsThread(e.commentThreadId,e)}async closeCommentThreadId_(e){let t=await this.shouldDiscardComment_(e);this.delegate?.commentsThreadDidClose(e,t),t&&l.h.get(this.getState())?.onCommentThreadDeleted(this.quipThreadId,e)}delegateCommentsThreadDidClose(e,t){this.delegate?.commentsThreadDidClose(e,t)}async shouldDiscardComment_(e){let t=await this.dispatch((0,o.A)({quipThreadId:this.quipThreadId,reason:"QuipCommentsUiProvider:shouldDiscardComment"}));return this.dispatch((0,n.b)({fileId:t,commentThreadId:e}))}}},0x1612191d:(e,t,a)=>{"use strict";a.d(t,{A:()=>y,j:()=>useGetEmbeddedAiSectionAsMenuItemTemplate});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x99233ecb),s=a(0x133aaa7da),c=a(0x2501a2cee),d=a(0x1d8af55dd),m=a(0x2301c802e),u=a(0x16a140c5a),p=a(0x72f2d939),h=a(0x10e0f5452),_=a(0x22d51fee8),f=a(0x3711e82d),b=a(0x226892387);let g=new l.Ay("quip_embedded_ui");function getAiMenuItems({menuOptions:e,onItemClick:t,experimentCanvasAiInlineCreationGroupOn:a,source:r}){let i="gutter-menu"===r?f.UiComponentName.CANVAS_GUTTER_AI_MENU:f.UiComponentName.CANVAS_SECTION_MENU,l=e.map(e=>{let t=(0,u.nH)(e),n=(0,p.A)(e,{experimentCanvasAiInlineCreationGroupOn:a});return{value:e,iconProps:t,label:n}}),autoClogProps=e=>({elementName:e,onClick:{enableClogAction:!0},uiComponentName:i});return l.map((e,r)=>{if(!(0,u.Jn)(e.value))return null;if(e.value===u.Wg)return{type:s.A.separator,key:`menu-insert-divider-${r}`,show:!0};if(e.value===u.I1)return{type:s.A.header,label:g.t("Quick edits"),key:`menu-insert-header-${r}`,show:!0};if(e.value===u.s3)return{type:s.A.header,label:g.t("Based on this content"),key:`menu-insert-header-${r}`,show:!0};let i=e.iconProps?.name?n.createElement(c.Ah,{...e.iconProps,inline:!0,size:"18"}):void 0,l=(0,u.h$)(e.value);if(l){let n,r=(n=e.value,l.map(e=>{let r=(0,u.pg)(e,a);return{key:`submenu-item-${e}`,dataQa:e,label:r,click:()=>{t(n,{submenuContext:e})},type:s.A.default,autoClogProps:autoClogProps(n)}}));return{key:`menu-item-${e.value}`,dataQa:e.value,label:e.label,type:s.A.submenu,submenu:r,icon:i,autoClogProps:autoClogProps(e.value),show:!0}}return{key:`menu-item-${e.value}`,dataQa:e.value,label:e.label,click:()=>{t(e.value,{})},type:s.A.default,icon:i,autoClogProps:autoClogProps(e.value),show:!0}})}function useGetEmbeddedAiSectionAsMenuItemTemplate(e){let t="section-menu",{docEmbed:a,embeddedUiData:i}=(0,n.useContext)(m.N),{shouldShowCanvasAiNux:l}=(0,d.A)(),o=useGetEmbeddedAiSectionMenuTemplate(t);if(!o||!a||!i)return null;o=o.filter(e=>e?.show);let u=a.docEditor,p=e&&!i.isReadOnly()&&i.embeddedObject().type===r.EmbeddedObjectType.TEXT,h=l?"p-ai-section-menu-item":"";return i.isEmpty()?{key:"ai-section-menu",dataQa:"ai-section-menu",className:h,label:g.t("Write with AI"),show:p,click:()=>{u.initiateAiAssistant(t)},type:s.A.default,icon:n.createElement(c.Ah,{name:"ai-sparkle-filled",size:"18"})}:{key:"ai-section-menu",dataQa:"ai-section-menu",className:h,label:g.t("Edit with AI"),submenu:o,type:s.A.submenu,icon:n.createElement(c.Ah,{name:"ai-sparkle-filled",size:"18"}),show:p}}function useGetEmbeddedAiSectionMenuTemplate(e){let t=(0,b.d4)(_.c9),{docEmbed:a}=(0,n.useContext)(m.N),r=a?.docEditor,i=(0,n.useCallback)(async(a,n)=>{r?.focusEditor(),(0,u.OD)(a,u.N2)&&await r?.getSelectedContent()&&r?.initiateAiAssistant(e,{initialSelectionData:{selectionInstructions:(0,u.zd)({actionId:a,contextId:n.submenuContext},t)}})},[t,r,e]),{canvasAiMenuItems:l}=(0,h.A)({useQuipTokens:!0,useWorkflowTokens:!1,experimentCanvasAiContentCreationGroupOn:!0});return getAiMenuItems({menuOptions:l??[],onItemClick:i,experimentCanvasAiInlineCreationGroupOn:t,source:e})}function EmbeddedAiSectionMenuFromTemplate({source:e}){let{embeddedUiData:t}=(0,n.useContext)(m.N),a=(0,n.useCallback)(()=>t?.performAction({action:r.EmbeddedUiAction.DISMISS_POPOVER}),[t]),l=useGetEmbeddedAiSectionMenuTemplate(e),s={width:"auto",onMenuItemSelected:a,onTriggerClose:a,"aria-label":g.t("AI section options")};return l&&n.createElement(i.A,{eventId:f.EventId.CANVAS_SELECT_AND_REFINE},n.createElement(o.a,{...s,menuClassNames:"p-embedded_section_menu",template:l}))}getAiMenuItems.displayName="getAiMenuItems",useGetEmbeddedAiSectionAsMenuItemTemplate.displayName="useGetEmbeddedAiSectionAsMenuItemTemplate",EmbeddedAiSectionMenuFromTemplate.displayName="EmbeddedAiSectionMenuFromTemplate";let y=EmbeddedAiSectionMenuFromTemplate},0x1b9993cd4:(e,t,a)=>{"use strict";a.d(t,{H:()=>useIsSpaceSeparated});var n=a(0xbad225b5);let r=/(\s+)/;function useIsSpaceSeparated(e){return(0,n.useMemo)(()=>r.test(e),[e])}},0x1fcd1dcfb:(e,t,a)=>{"use strict";a.d(t,{A7:()=>getEndIndexOfValidMarkdown,Ad:()=>isSlackbotCanvasSession,Ar:()=>generateThinkingStateText,Dv:()=>slackbotCanvasSessionId,HJ:()=>getShowInPreviewByInitialSelectionInstructions,M8:()=>getCreationGoalForPrompt,M9:()=>generateWritingStateText,Mf:()=>getInitialCreationSuggestionId,Pb:()=>getCreationGoalForSuggestionId,S9:()=>p,V_:()=>insertMentionText,Yp:()=>replaceMentionText,id:()=>getButtonDataQaAttr,kv:()=>f,qv:()=>h,r2:()=>getReplaceSelectionByInitialSelectionInstructions,rl:()=>getSuggestionGuideExample,tU:()=>getCanvasAiAutoClogPropsForName});var n,r=a(0x118cdcdea),i=a.n(r),l=a(0x20482ad21),o=a(0x12edaa96a),s=a(0x16a140c5a),c=a(0x18a5613e1),d=a(0x3711e82d),m=a(0xe17ba6e9);let u=new l.Ay("slack_docs");var p=((n={}).REWRITE="rewrite",n.REFINE="refine",n);let h={slideIn:{height:0,opacity:0},slideOut:{height:"auto",opacity:1},fadeIn:{opacity:0},fadeOut:{opacity:1},fadeTransition:{opacity:{duration:.2}}},getSuggestionGuideExample=(e,t)=>{if(!t)return null;switch(e){case m.Ex.AGENDA:return u.t("A project, topic, or channel");case m.Ex.BRAINSTORM:return u.t("Names for a new feature, or ways to fix a problem, or\u2026");case m.Ex.FAQ:return u.t("A topic or channel");case m.Ex.OVERVIEW:return u.t("A project, topic, or channel");case m.Ex.TABLE:return u.t("Describe the goal of your table");default:return null}},getShowInPreviewByInitialSelectionInstructions=({initialSelectionInstructions:e,experimentCanvasAiContentCreationGroupOn:t})=>![(0,s.zd)({actionId:s.N2.ADD_ACTION_ITEMS},t),(0,s.zd)({actionId:s.N2.CONVERT_TO_TABLE},t),(0,s.zd)({actionId:s.N2.SUMMARIZE},t)].includes(e)&&!!e,getReplaceSelectionByInitialSelectionInstructions=({initialSelectionInstructions:e,experimentCanvasAiContentCreationGroupOn:t})=>e===(0,s.zd)({actionId:s.N2.CONVERT_TO_TABLE},t),getSuggestionIdForPrompt=(e,t)=>(0,m.Eg)(e)||(0,m.Ai)(e)||((0,m.ed)(e,t)?m.Ex.CANVAS_SUMMARY:(0,m.M)(e,t)?m.Ex.CANVAS_ACTION_ITEMS:null),getInitialCreationSuggestionId=({starterPrompt:e,initialSelectionInstructions:t},a)=>{let isCreationSuggestionId=e=>e&&(0,m.Uz)(e),n=e?(0,m.Ai)(e):null;if(isCreationSuggestionId(n))return n;let r=t?getSuggestionIdForPrompt(t,a):null;return isCreationSuggestionId(r)?r:null},_=new Map([[m.Ex.CANVAS_ACTION_ITEMS,"canvas_action_items"],[m.Ex.CANVAS_SUMMARY,"canvas_summary"]]),getCreationGoalForSuggestionId=e=>_.get(e)??null,getCreationGoalForPrompt=(e,t)=>{let a=getSuggestionIdForPrompt(e,t);return a?getCreationGoalForSuggestionId(a):null},insertMentionText=(e,t,a)=>{let n=e;return e?.includes("@")&&t&&(n=e?.replace("@",t)),e?.includes("#")&&a&&(n=e?.replace("#",a)),n},replaceMentionText=(e,t,a)=>{let n=new(i())([{insert:e}]),r=0;for(let i=0;i<t.length;i++){let l=t[i],o=e.indexOf(l,r);if(-1===o)continue;let s={id:a[i],label:l,globalIndex:o,length:l.length,formats:{},type:"mention"},{changes:d}=(0,c.A)([s],[],!1);n=n.compose(d),r=o+l.length}return n},getButtonDataQaAttr=e=>`canvas_ai_${e}_button`;function getCanvasAiAutoClogPropsForName(e){return{eventId:d.EventId.NATIVE_AI,elementName:e,entryPoint:"canvas",onClick:{enableClogAction:!0}}}let f=12e3,b={">":"<",")":"(","]":"[",":":":"};function getIndexOfFirstUnclosedDelimiter(e,t=!0){let a=[];for(let n=0;n<e.length;n++){let r=e[n];if(":"===r&&t)a.length&&":"===a[a.length-1].delimiter?a.pop():a.push({delimiter:r,index:n});else if("<"===r||"("===r||"["===r)a.push({delimiter:r,index:n});else if(a.length&&(">"===r||")"===r||"]"===r)){let e=a[a.length-1];if(e.delimiter!==b[r])return e.index;a.pop()}}return a.length?a[0].index:-1}let g=/(^|\n)\*([^*]+)\*$/,y=/(^|\n)\*\*([^*]+)\*\*$/,A=/(\s+)/;function getEndIndexOfValidMarkdown(e,t){let a=e.length,n=g.exec(e)||y.exec(e);if(n&&(a=Math.min(n.index,a)),t){let t=e.split(A).pop();t&&(t.startsWith("#")||-1!==getIndexOfFirstUnclosedDelimiter(t))&&(a=Math.min(e.length-t.length,a))}else{let t=getIndexOfFirstUnclosedDelimiter(e,!1);-1!==t&&(a=Math.min(t,a))}return a}function randomItem(e){return e[Math.floor(Math.random()*e.length)]}function generateWritingStateText(){return randomItem([u.t("Drafting\u2026"),u.t("Writing\u2026"),u.t("Typing\u2026"),u.t("Transcribing\u2026")])}function generateThinkingStateText(e,t){let a=[u.t("Considering your prompt\u2026"),u.t("Searching for context\u2026"),u.t("Researching\u2026"),u.t("Looking things up\u2026"),u.t("Working on it\u2026"),u.t("Calculating\u2026")];return e&&t?u.t("Found {messageCount} messages and {fileCount} files\u2026",{messageCount:e,fileCount:t}):e?u.t("Found {messageCount} messages\u2026",{messageCount:e}):t?u.t("Found {fileCount} files\u2026",{fileCount:t}):randomItem(a)}let x="SLACKBOT_AI:";function slackbotCanvasSessionId(){return`${x}${(0,o.A)()}`}function isSlackbotCanvasSession(e){return e.startsWith(x)}},0x13ec15e33:(e,t,a)=>{"use strict";a.d(t,{A:()=>u,G:()=>isHuddleFeedbackCardComponentId});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x168d4289d),l=a(0x226892387),o=a(0x365a4cc3),s=a(0x14ea3ce99),c=a(0xfb490a95),d=a.n(c);let m=new r.Ay("huddles");function isHuddleFeedbackCardComponentId(e){return"ai-feedback-buttons-static"===e}function EmbeddedAiHuddleFeedbackCard({huddleSummaryFileId:e}){let t=(0,l.d4)(o.tS),a=(0,l.d4)(t=>(0,s.Lp)(t,e)),r=a?.huddle_summary_id,c=a&&a.channels?.[0]||a.groups?.[0]||a.ims?.[0],u=(0,n.useMemo)(()=>({canvasId:e,channelId:c,id:r}),[e,c,r]);return t&&r&&c?n.createElement("div",{className:d().root},n.createElement("div",{className:d().disclaimer},m.t("AI is used to generate responses, so some information may be inaccurate. Give feedback")),n.createElement(i.A,{huddleSummary:u,className:d().buttonContainer})):null}EmbeddedAiHuddleFeedbackCard.displayName="EmbeddedAiHuddleFeedbackCard";let u=EmbeddedAiHuddleFeedbackCard},0x6709b62e:(e,t,a)=>{"use strict";a.d(t,{o:()=>EmbeddedNoAccessUnfurl});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x1d71c4455),c=a(0xb1ea448c),d=a(0x1dcb2d57e),m=a(0xe188e4f),u=a(0xbd3de346),p=a(0x5c236c7d);let h=new o.Ay("files");function EmbeddedNoAccessUnfurl({file:e,inHovercard:t,requestAccessCallback:a,stopPropagationOnCallback:i,disableBackgroundColor:o,noPadding:_}){let f,b=(0,r.wA)(),[g,y]=(0,n.useState)(!1),[A,x]=(0,n.useState)(!0),E=(0,p.K)(e),C=(0,u.l7)(e),k=(0,n.useMemo)(()=>(0,u.Bp)(e),[e]),v=(0,n.useCallback)(()=>E?h.t("You don\u2019t have access to this template."):C?h.t("You don\u2019t have access to this list."):h.t("You don\u2019t have access to this canvas."),[C,E]),S=(0,n.useCallback)(()=>E?h.t("Another team owns this template. It\u2019s only been shared with specific people in your organization."):C?h.t("Another team owns this list. It\u2019s only been shared with specific people in your organization."):h.t("Another team owns this canvas. It\u2019s only been shared with specific people in your organization."),[C,E]),I=(0,n.useCallback)(()=>E?h.t("You requested access to this template. You\u2019ll get a notification once it\u2019s available."):C?h.t("You requested access to this list. You\u2019ll get a notification once it\u2019s available."):h.t("You requested access to this canvas. You\u2019ll get a notification once it\u2019s available."),[C,E]);(0,n.useEffect)(()=>{e.id&&!g&&(x(!0),b((0,m.$)({fileId:e.id,reason:"check-if-member-already-requested-access"})).then(e=>{y(e.has_access_request)}).catch(()=>{y(!1)}).finally(()=>{x(!1)}))},[b,e.id,g,y,x]);let w=(0,n.useMemo)(()=>n.createElement("div",{className:"p-unfurl_content__text__no_access_text"},k?h.t("Need permission to view"):v()),[k,v]),T=(0,n.useMemo)(()=>k?S():null,[S,k]);return f=g?I():t?n.createElement(n.Fragment,null,w,T&&n.createElement("span",{className:"p-embedded_no_access_unfurl__subtext"},T)):w,A?n.createElement(c.A,{color:"blue",size:"medium",inline:!0,"data-qa":"no-access-unfurl"}):n.createElement("div",{className:l()("p-embedded_no_access_unfurl",{"p-embedded_no_access_unfurl--hovercard":t,"p-embedded_no_access_unfurl--no-padding":_}),"data-qa":"no-access-unfurl"},n.createElement("div",{className:l()("p-unfurl__preview",{"p-unfurl__preview--disable-background-color":o})},n.createElement("div",{className:"p-unfurl_content__text"},f),n.createElement("div",{className:"p-unfurl_content__footer"},n.createElement(d.A,{fileId:e.id,type:t?s.Q.primary:s.Q.outline,size:t?"small":void 0,skipDoneDialog:!0,buttonClassName:t?"p-unfurl_content__footer__file_request_button_full_width":"",callback:a,stopPropagationOnCallback:i,inHovercard:t}))))}EmbeddedNoAccessUnfurl.displayName="EmbeddedNoAccessUnfurl"},0x199d535a4:(e,t,a)=>{"use strict";a.d(t,{A:()=>B});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xc26f5c40),l=a(0x120c268ad),o=a.n(l),s=a(0x40c0d834),c=a(0x20482ad21),d=a(0x21cf37dc6),m=a(0x139aa1a7),u=a(0x1d3efd4ea),p=a(0x339b339c),h=a(0x1fdec3e16),_=a(0x6cc5eee0);function ContentText({text:e,maxLines:t}){return n.createElement("div",{className:"p-embedded_public_link_unfurl__text"},n.createElement(h.A,{lines:t,breakWords:!1},n.createElement(_.A,{text:e})))}ContentText.displayName="ContentText";let f=ContentText;var b=a(0x15e39ab9e),g=a(0x1faa3f1ac),y=a(0x1af9d3190),A=a(0x1f8091cd6),x=a(0x235ff1eab),E=a(0x226892387);function LinkSourceEntity({icon:e,iconName:t,iconSize:a=A.Ev,title:r,subTitle:i,titleUrl:l,sourceName:s,sourceUrl:c,timestamp:d,onHover:m,onClick:u,autoClogProps:p}){let f=(0,E.d4)(t=>(0,x.Ay)(t,{url:e,width:A.aZ,height:A.aZ})??void 0),C=(0,n.useMemo)(()=>{if(!r)return null;let e=n.createElement(_.A,{className:o()("p-embedded_public_link_unfurl__source_entity__title",{"p-embedded_public_link_unfurl__source_entity__title--on_hover":m}),noHighlights:!0,noSpecials:!0,text:r}),t=i?n.createElement(_.A,{className:"p-embedded_public_link_unfurl__source_entity__subtitle",noHighlights:!0,noSpecials:!0,text:i}):void 0;return l&&(e=u?n.createElement(g.A,{autoClogProps:p,onClick:u},e):n.createElement(b.A,{href:l,target:"_blank",rel:"noopener noreferrer"},e),t=t&&n.createElement(b.A,{href:l,target:"_blank",rel:"noopener noreferrer"},t)),n.createElement("div",{className:"p-embedded_public_link_unfurl__source_entity__top_right"},n.createElement(h.A,{lines:1,breakWords:!1},n.createElement(y.A,{separator:e&&t?" ":""},e,t)))},[m,i,r,l,u,p]),k=(0,n.useMemo)(()=>{if(!s&&!d)return null;let e=s&&n.createElement(_.A,{noHighlights:!0,noSpecials:!0,text:s,className:"p-embedded_public_link_unfurl__source_entity__source"}),t=d&&n.createElement(_.A,{noHighlights:!0,noSpecials:!0,text:d,className:"p-embedded_public_link_unfurl__source_entity__source"});return c&&e&&(e=n.createElement(b.A,{href:c,target:"_blank",rel:"noopener noreferrer"},e)),n.createElement("div",{className:"p-embedded_public_link_unfurl__source_entity__bottom_right"},n.createElement(h.A,{lines:1,breakWords:!1},n.createElement(y.A,{separator:e&&t?" | ":""},e,t)))},[s,c,d]);return n.createElement("div",{className:"p-embedded_public_link_unfurl__source_entity"},f&&n.createElement("div",{className:"p-embedded_public_link_unfurl__source_entity__left"},n.createElement("img",{className:o()("p-embedded_public_link_unfurl__source_entity__icon",{"p-embedded_public_link_unfurl__source_entity__icon--align_bottom":k&&!C}),alt:t,src:f,width:a,height:a,"data-stringify-ignore":!0})),n.createElement("div",{className:"p-embedded_public_link_unfurl__source_entity__right"},C,k))}LinkSourceEntity.displayName="LinkSourceEntity";let C=LinkSourceEntity;var k=a(0x8bedca9b);function Thumbnail({thumbUrl:e,thumbWidth:t,thumbHeight:a,imageUrl:r,imageHeight:i,imageWidth:l}){let o=e||r,s=(0,k.Tv)({height:(e?a:i)??0,width:(e?t:l)??0}),c=(0,E.d4)(e=>(0,x.Ay)(e,{url:o,width:s.width,height:s.height,sizeForRetina:!0})),d=(0,n.useMemo)(()=>({backgroundImage:`url("${CSS.escape(c)}")`}),[c]);return n.createElement("div",{className:"p-embedded_public_link_unfurl__thumb",style:d})}Thumbnail.displayName="Thumbnail";let v=Thumbnail;var S=a(0x1b89a091f),I=a(0x2301c802e),w=a(0x7fbb7bb1),T=a(0x14a0efc90),N=a(0xa88049da),M=a(0x3711e82d),R=a(0x6960d8b9),P=a(0x1ccef1c6f),L=a(0x7db9f11b),O=a(0x1726dc4ef),D=a(0x1676e2040);let F=new c.Ay("classic-unfurl"),U={small:"30%",medium:"50%",large:"100%"};function LoadingPublicLinkUnfurl(){let e=[d.o.Large,d.o.Large,d.o.Medium,d.o.Medium],t=(0,E.d4)(e=>!(0,P.ty)(e,"a11y_animations"));return n.createElement("div",{className:o()("p-embedded_public_link_unfurl_loading",{"p-embedded_public_link_unfurl_loading--no-animation":t})},n.createElement("div",{className:"p-embedded_public_link_unfurl_loading__content"},e.map((e,t)=>n.createElement(p.A,{key:`missing-text--${t}`,size:e,sizes:U,className:"p-embedded_public_link_unfurl_loading__content__text"}))),n.createElement("div",{className:"p-embedded_public_link_unfurl_loading__title"},n.createElement(u.A,{size:120,className:"p-embedded_public_link_unfurl_loading__title__icon"})))}function EmbeddedPublicLinkUnfurl({serviceName:e,serviceUrl:t,serviceIcon:a,thumbUrl:l,thumbHeight:c,thumbWidth:d,imageUrl:u,imageHeight:p,imageWidth:h,text:_,title:b,titleLink:g,mrkdwnInHash:y,authorName:A,authorLink:x,authorIcon:k,authorSubname:U,videoHtml:B,videoHtmlHeight:H,videoHtmlWidth:W,audioHtml:V,audioHtmlHeight:G,hasEphemeralNotifications:q,fileChannelMessage:j,skipEmbeddedChecks:z=!1,isLoading:K,data:$,autoClogProps:Y}){let Q=(0,r.wA)(),Z=j?.ts,J=j?.channel,X=(0,E.d4)(e=>j?(0,N.A)(e,j).appId??void 0:void 0),ee=Z&&(0,R.Od)(Z,{shortenMonth:!0}),et="";ee&&(et=ee.includes("Today")||ee.includes("Yesterday")?F.t("Added {readableTs}",{readableTs:ee,fallbackHash:"c6dfaec53b031de954eca42b5bba02c53eecb737",fallbackHashNs:"attachments_v2"}):F.t("Added on {readableTs}",{readableTs:ee,fallbackHash:"c6dfaec53b031de954eca42b5bba02c53eecb737",fallbackHashNs:"attachments_v2"}));let[ea,en]=(0,n.useState)(!1),er=(0,n.useCallback)(()=>{en(!0)},[en]),ei=(0,n.useCallback)(()=>{en(!1)},[en]),{embeddedUiData:el}=(0,n.useContext)(I.N),eo=el?.contextType()===i.EmbeddedUiContext.HOVERCARD,es=(0,E.d4)(e=>(0,P.ty)(e,"expand_inline_imgs")),ec=(0,E.d4)(e=>(0,P.ty)(e,"expand_non_media_attachments")),ed=(0,n.useCallback)(()=>{$?.article_id&&Q((0,L.g)({id:"help",params:{articleId:$.article_id},viewType:m.D.Help}))},[Q,$?.article_id]),em=(0,n.useMemo)(()=>{let r,i,l,o,s,c,d,m,u;return eo?("twitter"===e?(i=D,l=F.t("Twitter",{fallbackHash:"5392c950bdde4be7e5f5b8fdc6a1ca5f21e905cf",fallbackHashNs:"attachments"}),o=A,s=U,c=`https://twitter.com/${U}`,d=l,m=t):"bluesky"===e?(i=O,o=A,s=U,c=x,d="Bluesky",m=t):(i=a||k,l=e||A,o=b,c=g,d=e||A,m=t||x),r=40,u=et):("twitter"===e?(i=k||a,l=A||e,o=A,s=U,c=`https://twitter.com/${U}`):"bluesky"===e?(i=k||a,l=A||e,o=A,s=U,c=x):(o=b,c=g),r=20),n.createElement(C,{icon:i,iconSize:r,iconName:l,title:o,subTitle:s,titleUrl:c,sourceName:d,sourceUrl:m,timestamp:u,onHover:ea,...$?.article_id&&{onClick:ed},autoClogProps:Y})},[k,x,A,U,et,eo,ea,a,e,t,b,g,ed,$?.article_id,Y]),eu=(0,n.useMemo)(()=>{let r,i,l,o;return eo?null:("twitter"===e?(r=D,l=i=F.t("Twitter",{fallbackHash:"5392c950bdde4be7e5f5b8fdc6a1ca5f21e905cf",fallbackHashNs:"attachments"}),o=`https://twitter.com/${U}`):"bluesky"===e?(r=O,l="Blueskuy",o=x):(r=a||k,l=i=e||A,o=t||x),n.createElement(C,{icon:r,iconName:i,sourceName:l,sourceUrl:o,timestamp:et}))},[k,x,A,U,et,eo,a,e,t]);return((0,n.useEffect)(()=>{if(!el)return;let t={name:b??A??F.t("Unknown source"),type:F.t("Web content preview"),description:e&&F.t("From {serviceName}",{serviceName:e})};el.performAction({action:i.EmbeddedUiAction.SYNC_METADATA,metadata:t})},[b,A,e,el]),K)?n.createElement(LoadingPublicLinkUnfurl,null):el&&j||z?n.createElement(s.A,{eventId:M.EventId.QUIP_UNFURL,uiComponentName:M.UiComponentName.QUIP_UNFURL_PUBLIC_LINK,clogImpression:!0,appId:X},n.createElement(w.A,null,({measureRef:t,width:a})=>{let r=(V||B||u)&&("twitter"===e&&a<400||eo),i=a>=400&&!eo&&(l||u);return n.createElement("div",{className:o()("p-embedded_public_link_unfurl",{"p-embedded_public_link_unfurl--hovercard":eo,"p-embedded_public_link_unfurl--attached":q}),onMouseEnter:er,onMouseLeave:ei,ref:t},n.createElement("div",{className:"p-embedded_public_link_unfurl__content"},em,ec&&_&&n.createElement(f,{text:_,mrkdwnInHash:y,maxLines:r||i?2:6}),r&&n.createElement("div",{className:"p-embedded_public_link_unfurl__media"},n.createElement(T.A,{thumbUrl:l,thumbHeight:c,thumbWidth:d,imageUrl:u,imageHeight:p,imageWidth:h,audioHtml:V,audioHtmlHeight:G,videoHtml:B,videoHtmlHeight:H,videoHtmlWidth:W,messageTs:Z,activeChannelId:J,unsetWidthStyle:!0})),eu),es&&i&&n.createElement(v,{thumbUrl:l,thumbWidth:d,thumbHeight:c,imageUrl:u,imageHeight:p,imageWidth:h}))})):n.createElement(S.Ay,{fileChannelMessage:j})}LoadingPublicLinkUnfurl.displayName="LoadingPublicLinkUnfurl",EmbeddedPublicLinkUnfurl.displayName="EmbeddedPublicLinkUnfurl";let B=EmbeddedPublicLinkUnfurl},0x12f6b6cb8:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x236a5cd68),l=a(0xb1ea448c),o=a(0x32d3ef3d),s=a(0x251a2acd0),c=a(0x1dd284e05),d=a(0x2301c802e),m=a(0x1ba0b4731),u=a(0xbd3de346),p=a(0x1a80146c8),h=a(0xb60a1b),_=a(0x226892387),f=a(0x14ea3ce99);function EmbeddedSlackListStatic({file:e,fileId:t,viewId:a,recordId:b,clickable:g=!0,isLoading:y,withBorder:A=!1}){let{embeddedUiData:x}=(0,n.useContext)(d.N),E=(0,r.wA)(),C=(0,_.d4)(a=>e||(0,f.Lp)(a,t)),k=(0,n.useCallback)(e=>{x?.isFocusedOrReadOnly()&&E((0,p.A)({e,fileId:C.id,listViewId:a,listRecordId:b,source:h.B.CANVAS_LIST_UNFURL,navigateInCurrentContext:!0}))},[E,x,C,a,b]);if(y)return n.createElement(i.A,{width:799,height:400,className:"p-embedded_slack_list_static--loading"},n.createElement(l.A,{size:"medium",noMargin:!0,floating:!0}));let v=!1;return C?.list_metadata?.views&&a&&(v=(0,c.h2)(C.list_metadata.views,a)),n.createElement(i.A,{width:799,height:400,className:"p-embedded_static_slack_list__container__box"},n.createElement(m.A,{file:C,className:"p-embedded_slack_list_static",onClick:k,disabled:!g},n.createElement(s.A,{key:"list-entity",file:C,size:o.S.expanded,listRecordId:b,listViewId:a,isRemovable:!1,isInteractive:!1,withBorder:A,customPreviewContainerHeight:350,maxNumOfRowsInPreview:7,isFullWidth:!0,isFullHeight:!0,listFileIsDeleted:C?.isNonExistent||C?.is_deleted,listViewIsDeleted:v,listFileIsNotFound:(0,u.c4)(C)})))}EmbeddedSlackListStatic.displayName="EmbeddedSlackListStatic";let b=EmbeddedSlackListStatic},0x1713916de:(e,t,a)=>{"use strict";a.d(t,{A:()=>L});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x21cf37dc6),d=a(0x1d3efd4ea),m=a(0x339b339c),u=a(0x16a71850f),p=a(0x2301c802e),h=a(0x22e934a00),_=a(0x46ff9277),f=a(0xf415544),b=a(0xbefa9255),g=a(0x1262f64f0),y=a(0xf41e5d5),A=a(0x106a32624),x=a(0x141db8b68),E=a(0x1c6c9c8b3),C=a(0x21d85d6e5),k=a(0x21b0fd259),v=a(0xf2964a91),S=a(0x3711e82d),I=a(0xb04c4a12),w=a(0x1ccef1c6f),T=a(0x226892387),N=a(0x12b31912f),M=a(0xe684f705);let R=new s.Ay("embedded_user_profile_unfurl"),P={small:"30%",medium:"50%",large:"100%"};function LoadingUserProfileUnfurl(){let e=[c.o.Small,c.o.Small],t=(0,T.d4)(e=>!(0,w.ty)(e,"a11y_animations"));return n.createElement("div",{className:l()("p-embedded_user_profile_unfurl_loading",{"p-embedded_user_profile_unfurl_loading--no-animation":t})},n.createElement("div",{className:"p-embedded_user_profile_unfurl_loading__title"},n.createElement(d.A,{size:72,className:"p-embedded_user_profile_unfurl_loading__title__icon"}),n.createElement("div",{className:"p-embedded_user_profile_unfurl_loading__title__texts"},n.createElement(m.A,{size:c.o.Medium}),n.createElement(m.A,{size:c.o.Small}))),n.createElement("div",{className:"p-embedded_user_profile_unfurl_loading__content"},e.map((e,t)=>n.createElement(m.A,{key:`missing-text--${t}`,size:e,sizes:P,className:"p-embedded_user_profile_unfurl_loading__content__text"}))))}function UserProfileUnfurl({memberId:e,initialLoadTrace:t,mockedMemberInfo:a,isUnifiedPeopleResult:i,highlightedDisplayName:s}){let c=(0,T.d4)(t=>a?.member??(0,M.nv)(t,e)),d=(0,T.d4)(e=>(0,k.LF)(e,c)),m=(0,T.d4)(e=>(0,k.Jm)(e,c)),w=(0,v.o)(c),P=c?.is_profile_only_user??!1,L=(0,T.d4)(t=>(0,N.zP)(t,e||"")),O=(0,f.A)(c),D=(0,b.Tj)().primaryLocationTooltip;(0,u.y)(t,"canvas:user_profile_unfurl",[c]);let{data:F}=(0,E.s)(e),U=(0,n.useMemo)(()=>{let e,t,r,i=n.createElement(h.A,{member:c});if(a?.locationInfo){let{locality:n=null,region:i=null,country:l=null}=a?.locationInfo;e=n,t=i,r=l}else{let a=F?.user?.profileSections?.find(e=>e.type===x.mE.Header)?.profileElements;e=a?.find(e=>"locality"===e.elementKey)??null,t=a?.find(e=>"region"===e.elementKey)??null,r=a?.find(e=>"country"===e.elementKey)??null}let l=n.createElement("span",{className:"p-embedded_user_profile_unfurl__locale"},n.createElement(_.E,{member:c,city:e,state:t,country:r,tooltipText:D})),o=!P&&!!O,s=e||t||r;return(L||a)&&(o||s)?n.createElement("div",{className:"p-embedded_user_profile_unfurl__secondary"},o&&i,s&&l):null},[L,F?.user?.profileSections,P,c,O,a,D]),{embeddedUiData:B}=(0,n.useContext)(p.N),H=(0,T.d4)(e=>(0,C.sE)(e,c)),W=(0,n.useMemo)(()=>H??R.t("Unknown"),[H]);return((0,n.useEffect)(()=>{if(!B)return;let e={name:W,type:R.t("User profile preview")};B.performAction({action:r.EmbeddedUiAction.SYNC_METADATA,metadata:e})},[W,B]),c)?a||F||w?n.createElement(A.Ay,{id:I.Y.QUIP_UNFURL},n.createElement(o.A,{eventId:S.EventId.QUIP_UNFURL,uiComponentName:S.UiComponentName.QUIP_UNFURL_USER_PROFILE,clogImpression:!0},n.createElement("div",{className:l()("p-embedded_user_profile_unfurl",{"p-embedded_user_profile_unfurl_unified_hover":i})},n.createElement(g.A,{memberId:e,showCelebration:!1,truncate:!0,mockedMemberInfo:a,showProfileBanner:!1,highlightedDisplayName:s}),U,n.createElement(y.A,{isAdmin:d,isDeactivated:w,isOwner:m})))):n.createElement(LoadingUserProfileUnfurl,null):null}LoadingUserProfileUnfurl.displayName="LoadingUserProfileUnfurl",UserProfileUnfurl.displayName="UserProfileUnfurl";let L=UserProfileUnfurl},0x1b89a091f:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>E,VR:()=>A});var n,r=a(0xbad225b5),i=a(0xc26f5c40),l=a(0x120c268ad),o=a.n(l),s=a(0x40c0d834),c=a(0x20482ad21),d=a(0x2b7f0bcc),m=a(0x6cc5eee0),u=a(0x2301c802e),p=a(0xb73154e3),h=a(0xa88049da),_=a(0x143fb6398),f=a(0x3711e82d),b=a(0x226892387),g=a(0x217553e42);let y=new c.Ay("files");var A=((n={}).EXACT_LINK_BLOCKED="exact_link_blocked",n.ALL_LINKS_FROM_DOMAIN="all_links_from_domain",n.ALL_LINKS_UNDER_PATH="all_links_under_path",n.MAYBE_AUTH_ASK_SENT="maybe_auth_ask_sent",n.MAYBE_APP_INSTALL_ASK_SENT="maybe_app_install_ask_sent",n.HIDE_IMG_AND_CONTENT="hideImgAndContent",n.MESSAGE_NON_EXISTENT="msg_non_existent",n.MESSAGE_TOMBSTONED="msg_tombstoned",n.MESSAGE_PRIVATE="msg_private",n);let x=["tableau_dashboard_error","tableau_visualization_error","tableau_metric_error"];function EmptyUnfurl({fileChannelMessage:e,errorState:t,isAuthorUser:a}){let{embeddedUiData:n}=(0,r.useContext)(u.N),l=n?.objectUrl()??"",c=!(0,p.P)(l),A=(0,b.d4)(t=>e?.channel?(0,g.OL)(t,e.channel):null),E=(0,_.ju)(A),C=(0,b.d4)(t=>{if(e)return(0,h.A)(t,e).appId||void 0}),k=n?.contextType()===i.EmbeddedUiContext.HOVERCARD,{content:v,title:S}=(0,r.useMemo)(()=>{let e=k?null:l,n=k?y.t("Something went wrong and we couldn\u2019t load a preview"):y.t("Unable to create preview.");return c?{content:"",title:e}:("exact_link_blocked"===t?n=y.t("Your admins have turned off previews for this link."):"all_links_from_domain"===t||"all_links_under_path"===t?n=y.t("Your admins have turned off previews for this domain."):"maybe_auth_ask_sent"===t&&a?n=y.t("You chose not to authenticate this app, so no information about this link can be shown."):"maybe_app_install_ask_sent"===t&&a?n=y.t("You chose not to install this app, so no information about this link can be shown."):"msg_non_existent"===t?n=y.t("This message has been deleted or does not exist."):"msg_tombstoned"===t?n=y.t("This message can\u2019t be shown."):"msg_private"===t?n=y.t("You don\u2019t have access to this private message."):t&&x.includes(t)&&(n=y.t("We couldn\u2019t load the {tableauSubtype}. Try again later.",{tableauSubtype:t?.split("_")[1],fallbackHash:"72936d0c42e2d59769ae1caafaba90683bbfe058",fallbackHashNs:"files"}),E&&(n=y.t("Tableau Next previews aren\u2019t displayed in canvases shared with external users.",{fallbackHash:"72936d0c42e2d59769ae1caafaba90683bbfe058",fallbackHashNs:"files"}))),{content:n,title:e})},[k,l,c,t,a,E]);return r.createElement(s.A,{eventId:f.EventId.QUIP_UNFURL,uiComponentName:f.UiComponentName.QUIP_UNFURL_EMPTY,appId:C,clogImpression:!0},r.createElement("div",{className:"p-empty_unfurl"},S&&r.createElement(m.A,{className:o()("p-empty_unfurl__title",{bold:!c}),text:S}),r.createElement("span",{className:o()("p-empty_unfurl__content",{bold:c})},c&&r.createElement(d.Ay,{type:d.QE.boxed,level:d.A_.warning,icon:"warning",align:d.AO.left},y.t("Double-check this link")),v)))}EmptyUnfurl.displayName="EmptyUnfurl";let E=EmptyUnfurl},0xb2e9dfa8:(e,t,a)=>{"use strict";a.d(t,{A:()=>N});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x21cf37dc6),d=a(0x1d3efd4ea),m=a(0x339b339c),u=a(0x1b89a091f),p=a(0x23a917941),h=a(0x17627b24f),_=a(0xf297aec1),f=a(0x1babfc083),b=a(0x2301c802e),g=a(0x17bc3dd75),y=a(0x12185e091),A=a(0x1ecc7f772),x=a(0x21d6ed371),E=a(0x1337d9fa2),C=a(0x3711e82d),k=a(0x1ccef1c6f),v=a(0x226892387),S=a(0x217553e42),I=a(0xd93ecf94);let w=new s.Ay("embedded_message_unfurl"),T={small:"30%",medium:"50%",large:"100%"};function LoadingMessageUnfurl(){let e=[c.o.Large,c.o.Large,c.o.Large,c.o.Large],t=(0,v.d4)(e=>!(0,k.ty)(e,"a11y_animations"));return n.createElement("div",{className:l()("p-embedded_message_unfurl_loading",{"p-embedded_message_unfurl_loading--no-animation":t})},n.createElement("div",{className:"p-embedded_message_unfurl_loading__title"},n.createElement(d.A,{size:36,className:"p-embedded_message_unfurl_loading__title__icon"}),n.createElement("div",{className:"p-embedded_message_unfurl_loading__title__texts"},n.createElement(m.A,{size:c.o.Medium}),n.createElement(m.A,{size:c.o.Small}))),n.createElement("div",{className:"p-embedded_message_unfurl_loading__content"},e.map((e,t)=>n.createElement(m.A,{key:`missing-text--${t}`,size:e,sizes:T,className:"p-embedded_message_unfurl_loading__content__text"}))))}function MessageUnfurl({className:e,unfurl:t,ts:a,isLoading:i,channelId:s,hideChannel:c,firstEphemeralMessage:d}){let m=(0,v.d4)(e=>(0,I.Ld)(e,s,a)),k=!(0,x.ow)(m)&&!(0,x.xh)(m),T=(0,v.d4)(e=>(0,S.OL)(e,s)),{embeddedUiData:N,slackFileId:M}=(0,n.useContext)(b.N),R=N?.embeddedObject(),P=R?.type===r.EmbeddedObjectType.SLACK_OBJECT&&R.object.type===r.SlackObjectType.GENERIC,L=(0,v.d4)(e=>(0,g.A)(e,{userId:m?.user,botId:m?.bot_id,botProfile:m?.bot_profile}));(0,f.x)({fileId:M||"",message:d,skip:!1}),(0,n.useEffect)(()=>{if(!N||!L||!T||i)return;let e=(0,y.LI)(T)?w.t("Direct Message"):(0,A.Mn)(T),a={name:w.t("Message from {senderName}",{senderName:L}),type:w.t("Message preview"),description:w.t("in {channelName}",{channelName:e}),isUnfurled:!!t};N.performAction({action:r.EmbeddedUiAction.SYNC_METADATA,metadata:a})},[L,T,N,t,i]);let O=(0,n.useMemo)(()=>{let e;return(t?.files?.length?e=t.files.map(e=>e.id):m?.files?.length&&(e=m.files),e?.length)?n.createElement(h.t,{fileIds:e}):null},[m?.files,t?.files]),D=(0,E.s7)(m)||(0,E.TD)(m)||(0,E.Dv)(m)||(0,E.sh)(m);return i&&!k?n.createElement(LoadingMessageUnfurl,null):N||P?!m||m?.isNonExistent?n.createElement(u.Ay,{errorState:u.VR.MESSAGE_NON_EXISTENT}):D?n.createElement(u.Ay,{errorState:u.VR.MESSAGE_TOMBSTONED}):n.createElement(o.A,{eventId:C.EventId.QUIP_UNFURL,uiComponentName:C.UiComponentName.QUIP_UNFURL_MESSAGE,clogImpression:!0},n.createElement("div",{className:l()("p-embedded_message_unfurl__container",e,{"p-embedded_message_unfurl__container--attached":!!d}),"data-qa":"embedded_message_unfurl"},n.createElement(_.A,{ts:a,channelId:s,hideChannel:c,unfurl:t,containerClassName:"p-embedded_message_unfurl__container__header"}),n.createElement(p.A,{message:m??void 0,unfurl:t,containerClassName:"p-embedded_message_unfurl__container__content"}),O)):n.createElement(u.Ay,null)}LoadingMessageUnfurl.displayName="LoadingMessageUnfurl",MessageUnfurl.displayName="MessageUnfurl";let N=MessageUnfurl},0x14b5c0c94:(e,t,a)=>{"use strict";a.d(t,{N:()=>i,O:()=>r});var n=a(0x139951ee1);let r=n.p5.UrlUnfurling,i=n.Xx.Compact},0x1a6f46c68:(e,t,a)=>{"use strict";a.d(t,{B:()=>isSfdcRecordUrl,R:()=>extractSfdcRecordParams});var n=a(0x1d5f57074);let r=new Map([[".lightning.force.com",".my.salesforce.com"],[".lightning.pc-rnd.force.com",".my.pc-rnd.salesforce.com"]]),i=".develop|.sandbox|.test1".replace(/\./g,"\\."),l=".my(.pc-rnd)?.salesforce.com".replace(/\./g,"\\."),o=".lightning(.pc-rnd)?.force.com".replace(/\./g,"\\."),s=RegExp(`https://[\\w-]+?(${i})?(${l}|${o})/([\\w-]+|lightning/_classic/(%2F)?[\\w-]+|lightning/r/([\\w-]+/)?[\\w-]+/(view|edit))$`);function isSfdcRecordUrl(e){return s.test(e)}function extractSfdcRecordParams(e){let t=(0,n.Ay)(e),a=t.hostname,i=t.pathname,l=new RegExp(o).exec(a);if(l&&l.length){let e=r.get(l[0]),t=a.substring(0,l.index);a=`${t}${e}`}let s=decodeURIComponent(i).substring(1).split("/");return i.startsWith("/lightning/_classic")?{domain:a,id:s[s.length-1]}:i.startsWith("/lightning")?{domain:a,id:s.length>1?s[s.length-2]:""}:{domain:a,id:i.substring(1)}}},0x1b0d3144:(e,t,a)=>{"use strict";a.d(t,{A:()=>useCollapseHeadingMenuItemTemplate,a:()=>getCollapseHeadingMenuItemTemplate});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x20482ad21),l=a(0x133aaa7da),o=a(0x20a401c86),s=a(0x2301c802e),c=a(0x7cdf00a5);let d=new i.Ay("file"),m="collapse_header";function useCollapseHeadingMenuItemTemplate(){let{embeddedUiData:e}=(0,n.useContext)(s.N),t=(0,o.A)();return(0,n.useMemo)(()=>{if(e)return getCollapseHeadingMenuItemTemplate({embeddedUiData:e,sectionType:t})},[e,t])}function getCollapseHeadingMenuItemTemplate({embeddedUiData:e,sectionType:t}){let a=e.isCollapsed()?d.t("Expand heading"):d.t("Collapse heading"),n=[c.r.H1,c.r.H2,c.r.H3];return{key:m,dataQa:m,label:a,show:e.contextType()===r.EmbeddedUiContext.SECTION_MENU&&e.canToggleCollapse()&&n.includes(t),click:()=>e?.performAction({action:r.EmbeddedUiAction.TOGGLE_COLLAPSE}),type:l.A.default}}},0x39e53dae:(e,t,a)=>{"use strict";a.d(t,{A:()=>useCopyLinkToSectionMenuItemTemplate,k:()=>getCopyLinkToSectionMenuItemTemplate});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xc26f5c40),l=a(0x14fad6485),o=a(0x20482ad21),s=a(0x133aaa7da),c=a(0x2501a2cee),d=a(0xec8d5140),m=a(0x2301c802e),u=a(0x1ed767a16);let p=new o.Ay("file"),h="copy_link_to_section";function useCopyLinkToSectionMenuItemTemplate(){let{embeddedUiData:e}=(0,n.useContext)(m.N),{windowRef:t}=(0,n.useContext)(l._0),a=(0,r.wA)();return(0,n.useMemo)(()=>{if(e)return getCopyLinkToSectionMenuItemTemplate({embeddedUiData:e,dispatch:a,windowRef:t})},[e,a,t])}function getCopyLinkToSectionMenuItemTemplate({embeddedUiData:e,onClick:t,dispatch:a,windowRef:r,slackFileId:l}){let onAnchorLinkGenerationSuccessCallback=e=>{(0,u.x3)(decodeURIComponent(e),r&&r.deref()),a((0,d.M)())};return{key:h,dataQa:h,label:p.t("Copy link to section"),show:e.contextType()===i.EmbeddedUiContext.SECTION_MENU,click:t||(()=>{e?.performAction({action:i.EmbeddedUiAction.COPY_SECTION_LINK,onAnchorLinkGenerationSuccessCallback})}),type:s.A.default,icon:n.createElement(c.Ah,{name:"link",size:"18"}),autoClogProps:{elementName:"copy_link_to_section",fileId:l,onClick:{enableClogAction:!0}}}}getCopyLinkToSectionMenuItemTemplate.displayName="getCopyLinkToSectionMenuItemTemplate"},0x235f350c5:(e,t,a)=>{"use strict";a.d(t,{A:()=>useOpenInSlackMenuItemTemplate,a:()=>getOpenInSlackMenuItemTemplate});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xbe0b63ff),l=a(0x20482ad21),o=a(0x133aaa7da),s=a(0x2301c802e),c=a(0x1b3f5d630),d=a(0x13dfbe027),m=a(0x4885d7aa),u=a(0x226892387);let p=new l.Ay("files"),h="open_in_slack";function useOpenInSlackMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(s.N),a=(0,u.d4)(e=>t?(0,m.A)(e,t):null),i=(0,d.A)();return(0,n.useMemo)(()=>{if(a)return getOpenInSlackMenuItemTemplate({unfurledMessage:a,dispatch:e,showItem:i})},[a,e,i])}function getOpenInSlackMenuItemTemplate({unfurledMessage:e,onClick:t,dispatch:a,showItem:n}){return{key:h,dataQa:h,label:p.t("View in Slack"),show:n,click:t||(()=>{let{channel:t,ts:n,thread_ts:r}=e;return a((0,c.A)({channelId:t,threadTs:r,ts:n}))}),type:o.A.default,disabled:(0,i.GU)(e)}}},0x1d159d833:(e,t,a)=>{"use strict";a.d(t,{A:()=>useOpenLinkMenuItemTemplate,p:()=>getOpenLinkMenuItemTemplate});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xc26f5c40),l=a(0x62a17882),o=a(0x20482ad21),s=a(0x133aaa7da),c=a(0x14b5c0c94),d=a(0x1a6f46c68),m=a(0x2301c802e),u=a(0xb73154e3),p=a(0xbd3de346),h=a(0x6e20c837),_=a(0xef0063c1),f=a(0x144561e68),b=a(0x1b51e9b54),g=a(0x1755a8d3c),y=a(0x85bb584f),A=a(0x1d1f3cf82),x=a(0x1fdf007c4),E=a(0x108363d6d),C=a(0xc4548bcd),k=a(0xb60a1b),v=a(0x1b0db8737),S=a(0x226892387),I=a(0x2d1c8f66),w=a(0x204000df3),T=a(0x14236acae);let N=new o.Ay("file"),M="open_link";function useOpenLinkMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(m.N),a=t?.embeddedObject(),l=(0,S.d4)(e=>t?(0,_.Ay)(e,t):null),o=(0,S.d4)(e=>(0,g.A)(e,a)),s=(0,S.d4)(e=>a?.type===i.EmbeddedObjectType.SLACK_OBJECT&&a?.object.type===i.SlackObjectType.UNFURL&&(0,A.A)(e,a.object)),d=(0,S.d4)(e=>!!t&&(0,y.A)(e,t)),u=(0,S.Z2)(e=>(0,h.$N)(e,t?.objectUrl()??"")?.viewId),p=(0,S.Z2)(e=>(0,h.$N)(e,t?.objectUrl()??"")?.channelSectionId),b=t?(0,f.A)(t):null,x=(0,S.d4)(e=>(0,T.PQ)(e,b||void 0,!0,c.O,c.N));return(0,n.useMemo)(()=>{if(t)return getOpenLinkMenuItemTemplate({file:l,embeddedUiData:t,dispatch:e,isShortcutUnfurl:o,isMessageUnfurl:s,isMessagePermalink:d,listViewId:u,salesforceRecord:x,channelSectionId:p})},[t,l,o,s,e,d,u,x,p])}function getOpenLinkMenuItemTemplate({file:e,embeddedUiData:t,onClick:a,dispatch:n,isShortcutUnfurl:r,isMessageUnfurl:o,isMessagePermalink:c,listViewId:m,salesforceRecord:h,channelSectionId:_}){let f=t?.objectUrl(),g=t?.embeddedObject(),y=g?.type===i.EmbeddedObjectType.SLACK_OBJECT&&g.object.type===i.SlackObjectType.GENERIC,A=t?.getCardRenderType()===i.SlackListContentRenderType.EMBED,S=(0,l.y3)()||(0,x.S)(),T=!!h&&(0,w._s)(h),defaultOnClick=()=>{if(_)return n((0,E.mp)({channelSectionId:_}));if(!e&&f)return(0,C.A)(f);if(e&&(0,p.DQ)(e))return n((0,v.o)({fileId:e.id}));if(e&&(0,p.l7)(e)){let t=g.type===i.EmbeddedObjectType.SLACK_OBJECT&&g.object.type===i.SlackObjectType.LIST_RECORD?g.object.id:void 0,a=!S;return n((0,I.N)({listFileId:e.id,listViewId:m,focusRecordId:t,defaultToAllItemsView:A,navigateInCurrentContext:a,source:k.B.CANVAS_LIST_UNFURL_MENU,forceOpenInChildWindow:S}))}},R=t&&!!(0,b.Y)(t),P=g.type===i.EmbeddedObjectType.SLACK_OBJECT&&g.object?.type===i.SlackObjectType.CHANNEL,L={label:N.t("Open link"),show:!1,href:void 0,click:void 0,disabled:!1};return e?((0,p.Vx)(e)||(0,p.ge)(e)?(L.show=!0,L.href=(0,p.ge)(e)?e.url_private:e.permalink):((0,p.DQ)(e)||(0,p.l7)(e))&&(L.show=A||S,L.label=S?N.t("Open in new window"):N.t("Open"),L.click=a||defaultOnClick),L.disabled=(0,p.aK)(e)||(0,p.c4)(e)):f&&(L.show=!!(0,u.P)(t?.objectUrl()),L.click=a||defaultOnClick,(0,d.B)(f)&&(L.show=T,L.label=N.t("Open in Salesforce"))),(y||R||r||o||P||c)&&(L.show=!1),{key:M,dataQa:M,type:s.A.default,...L}}},0x2068ad0b8:(e,t,a)=>{"use strict";a.d(t,{D:()=>useGetReactionsMenuTemplate,y:()=>getReactionsMenuTemplate});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x20482ad21),l=a(0x133aaa7da),o=a(0x2501a2cee),s=a(0x2301c802e);let c=new i.Ay("file"),d="add_reaction";function useGetReactionsMenuTemplate(){let{embeddedUiData:e}=(0,n.useContext)(s.N);return(0,n.useMemo)(()=>{if(e)return getReactionsMenuTemplate({embeddedUiData:e})},[e])}function getReactionsMenuTemplate({embeddedUiData:e,onClick:t}){let a=e?.hasAnnotationReactions(),i=e?.embeddedObject(),s=i?.type===r.EmbeddedObjectType.DIVIDER,m=a?c.t("View reactions"):c.t("Add a reaction"),u=e?.hasAnnotationMessages()||(e?.showAddSectionHighlight()??!0),defaultOnClick=async()=>{e?.performAction({action:r.EmbeddedUiAction.CREATE_OR_VIEW_REACTION,source:"context-menu"})};return{key:d,dataQa:d,label:m,show:e?.canAddReaction()&&(!e.isReadOnly()||a)&&!s&&(a||u),click:t??defaultOnClick,type:l.A.default,icon:n.createElement(o.Ah,{name:a?"emoji":"add-reaction",size:"18"})}}getReactionsMenuTemplate.displayName="getReactionsMenuTemplate"},0xff5f4ebf:(e,t,a)=>{"use strict";a.d(t,{A:()=>useShareMenuItemTemplate,c:()=>getShareMenuItemTemplate});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xc26f5c40),l=a(0xbe0b63ff),o=a(0x20482ad21),s=a(0x133aaa7da),c=a(0x14b5c0c94),d=a(0x2301c802e),m=a(0xe75a33c2),u=a(0xbd3de346),p=a(0x1944fd4df),h=a(0x205570b9a),_=a(0xef0063c1),f=a(0x4885d7aa),b=a(0x144561e68),g=a(0x6d72337),y=a(0xf504efa8),A=a(0x22d443103),x=a(0x199e02a8a),E=a(0x226892387),C=a(0x204000df3),k=a(0x14236acae);let v=new o.Ay("files"),S="share";function useShareMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(d.N),a=(0,E.d4)(e=>t?(0,f.A)(e,t):null),l=(0,E.d4)(e=>t?(0,_.Ay)(e,t):null),o=t?(0,b.A)(t):null,s=(0,E.d4)(e=>(0,k.PQ)(e,o||void 0,!0,c.O,c.N)),m=(0,E.d4)(h.H0),u=s&&(0,C._s)(s),g=(0,E.d4)(e=>(0,p.l)(e,a)),y=t?.embeddedObject(),A=y?.type===i.EmbeddedObjectType.SLACK_OBJECT&&y.object?.type===i.SlackObjectType.SALESFORCE_RECORD&&!!y.object?.fieldLabel;return(0,n.useMemo)(()=>{if(!A&&(a||l||u))return getShareMenuItemTemplate({file:l,unfurledMessage:a,isCanvasComment:g,salesforceRecord:s,dispatch:e,experimentCanvasCommentContentImprovementsGroupOn:m})},[a,g,l,s,u,e,m,A])}function getShareMenuItemTemplate({file:e,unfurledMessage:t,isCanvasComment:a,salesforceRecord:n,onClick:r,dispatch:i,experimentCanvasCommentContentImprovementsGroupOn:o}){let c=!e||!(0,u.c4)(e),d=n&&(0,C._s)(n),p=v.t("Share");return a&&o?p=v.t("Forward comment\u2026"):t&&(p=v.t("Forward message\u2026")),{key:S,dataQa:S,label:p,show:d||c&&!(0,u.sR)(e)&&(!!e&&!(0,u.Vx)(e)&&!(0,u.ge)(e)&&!(0,u.Bp)(e)||!!t&&!(0,l.GU)(t)),click:r||(()=>{if(t){let{channel:e,ts:a}=t;i((0,A.A)({ts:a,channelId:e,isStackable:!0}))}else e?(0,u.wL)(e)?i((0,g.bd)({fileId:e.id,isStackable:!0})):(0,u.l7)(e)?i((0,y.A)({fileId:e.id,isStackable:!0})):i((0,A.A)({fileId:e.id,isStackable:!0,isSlackDoc:!1})):d&&(async()=>{let e=await i((0,m.x)({record:n?.id,reason:"get-share-record-blocks"}));if(e?.ok){let{content_blocks:t,salesforce_record:a}=e;i((0,x.A)({record:n?.id,contentBlocks:t,salesforceRecord:a,shouldDisplayToast:!0}))}})()}),type:s.A.default,disabled:!!e&&(0,u.aK)(e)||!!t&&(0,l.GU)(t)}}},0xec8d5140:(e,t,a)=>{"use strict";a.d(t,{M:()=>c});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x6e87d4ec),l=a(0x11c82607b),o=a(0x16ffed5ab);let s=new r.Ay("file"),c=(0,l.Ay)("Enqueue copy link success toast message",(e,t,{targetWindow:a}={})=>{let r=s.t("Link copied to clipboard");return e((0,o.M)({element:n.createElement(i.A,{announceContentAsAssertive:!1,svgIconProps:{name:"check"}},r),targetWindow:a}))});c.meta={name:"enqueueCopyLinkSuccessToast",key:"createThunkEnqueueCopyLinkSuccessToast",description:"Enqueue copy link success toast message"}},0xfa2535b1:(e,t,a)=>{"use strict";a.d(t,{A:()=>useGetThreadsMenuTemplate,b:()=>getThreadsMenuTemplate});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x20482ad21),l=a(0x133aaa7da),o=a(0x2501a2cee),s=a(0x2301c802e);let c=new i.Ay("file"),d="add_comment";function useGetThreadsMenuTemplate(){let{embeddedUiData:e}=(0,n.useContext)(s.N);return(0,n.useMemo)(()=>{if(e)return getThreadsMenuTemplate({embeddedUiData:e})},[e])}function getThreadsMenuTemplate({embeddedUiData:e,onClick:t}){let a=e?.embeddedObject(),i=a?.type===r.EmbeddedObjectType.DIVIDER,s=e?.hasAnnotationMessages(),m=s?c.t("View comments"):c.t("Add a comment"),u=e?.hasAnnotationReactions()||(e?.showAddSectionHighlight()??!0);return{key:d,dataQa:d,label:m,show:e?.canAddComment()&&(!e.isReadOnly()||s)&&!i&&(s||u),click:t??(()=>{e?.performAction({action:r.EmbeddedUiAction.CREATE_OR_VIEW_COMMENT,source:"context-menu"})}),type:l.A.default,icon:n.createElement(o.Ah,{name:s?"comments":"add-comment",size:"18"})}}getThreadsMenuTemplate.displayName="getThreadsMenuTemplate"},0x171c34b90:(e,t,a)=>{"use strict";a.d(t,{A:()=>useViewDetailsMenuItemTemplate,u:()=>getViewFileDetailsLabel});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x133aaa7da),o=a(0x249ce209d),s=a(0x2301c802e),c=a(0x3ca4e1cc),d=a(0x1b6f39a31),m=a(0x1b26458f7),u=a(0xbd3de346),p=a(0xef0063c1),h=a(0x3711e82d),_=a(0xd4cb29bc),f=a(0xb2609f46),b=a(0x226892387),g=a(0x14149c126),y=a(0x6ee3decf),A=a(0x1f5c53bc);let x=new i.Ay("file"),E="view_details";function useViewDetailsMenuItemTemplate(e,t){let a=(0,r.wA)(),{embeddedUiData:i}=(0,n.useContext)(s.N),l=(0,b.d4)(t=>e||(i?(0,p.Ay)(t,i):null)),h=(0,u.dE)(l),_=(0,b.d4)(e=>(0,y.I)(e,l)),f=!!l&&(0,u.NF)(l,_),x=(0,b.d4)(e=>"on"===(0,g._Z)(e,"files_share_context")),E=(0,b.d4)(e=>l?(0,A.UQ)(e,{file:l}):void 0),C=E?(0,d.Kr)(E):void 0,k=(0,b.d4)(c.GH),v=k&&C?.fullSizePreview()?C.isFullSizePreviewEnabled(k):!!l&&(0,m.k)(l.app_id,l),{unfurlType:S}=(0,o.A)(),I=S===o.h.SLACK_LIST_RECORD;return(0,n.useMemo)(()=>{if(l)return getViewDetailsMenuItemTemplate({file:l,dispatch:a,isTemplate:h,isSlackListRecordUnfurl:I,isFileWorkObjectCompatible:f,experimentFilesShareContextGroupOn:x,isDocEmbed:t,isFullSizePreviewEnabled:v})},[l,a,h,I,f,x,t,v])}function getViewFileDetailsLabel(e,t,a,r,i){return t&&!r?x.t("View template details"):(0,u.DQ)(e)&&!r?x.t("View canvas details"):(0,u.l7)(e)&&!r?x.t("View list details"):a?n.createElement("span",{className:"display_flex align_items_center gap_25"},i?x.t("Preview in Slack"):x.t("View latest details")):x.t("View file details")}function getViewDetailsMenuItemTemplate({file:e,dispatch:t,isTemplate:a,isSlackListRecordUnfurl:n,isFileWorkObjectCompatible:r,experimentFilesShareContextGroupOn:i,isDocEmbed:o,isFullSizePreviewEnabled:s}){return{key:E,dataQa:E,label:getViewFileDetailsLabel(e,a,r,i&&!o,s),show:!(0,u.Vx)(e)&&!(0,u.ge)(e)&&!(0,_.A)()&&!(0,u.sR)(e)&&!n,click:a=>{t((0,f.R)({fileId:e.id,event:a}))},type:l.A.default,disabled:(0,u.aK)(e),autoClogProps:{eventId:h.EventId.FILE_DETAILS,elementName:"view_file_details",onClick:{enableClogAction:!0},fileId:e.id,uiComponentVariant:i&&((0,u.l7)(e)||(0,u.DQ)(e))?"file_references":"file_details"}}}getViewFileDetailsLabel.displayName="getViewFileDetailsLabel"},0x930afbbd:(e,t,a)=>{"use strict";a.d(t,{A:()=>al,D:()=>useGetEmbeddedMenuTemplate});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xc26f5c40),l=a(0x14fad6485),o=a(0x1df96de4c),s=a(0x1cc943c8d),c=a(0x1d5dc623c),d=a(0x133aaa7da),m=a(0x1612191d),u=a(0x14b5c0c94),p=a(0x20482ad21);let h=new p.Ay("file"),_="add_column";function getAddColumnMenuItemTemplate({embeddedUiData:e}){let t=[{key:`${_}-left`,dataQa:`${_}-left`,label:h.t("Add to left"),click:()=>{e?.performAction({action:i.EmbeddedUiAction.ADD_COLUMN,before:!0})},disabled:!e?.canAddColumn()},{key:`${_}-right`,dataQa:`${_}-right`,label:h.t("Add to right"),click:()=>{e?.performAction({action:i.EmbeddedUiAction.ADD_COLUMN,before:!1})},disabled:!e?.canAddColumn()}],a=[i.EmbeddedObjectType.TITLE,i.EmbeddedObjectType.TABLE,i.EmbeddedObjectType.CALLOUT].includes(e.embeddedObject().type),n=e?.getCardRenderType()===i.SlackListContentRenderType.EMBED;return{key:_,dataQa:_,label:h.t("Add section"),show:!a&&!e.isReadOnly()&&e.contextType()===i.EmbeddedUiContext.SECTION_MENU&&!n,disabled:!e?.canAddColumn(),type:d.A.submenu,submenu:t,submenuWidth:"auto"}}var f=a(0x120c268ad),b=a.n(f),g=a(0x2501a2cee);let y=new p.Ay("files"),A="callout_background",x=[i.CalloutBackgroundColor.INDIGO,i.CalloutBackgroundColor.BLUE,i.CalloutBackgroundColor.JADE,i.CalloutBackgroundColor.PINK,i.CalloutBackgroundColor.GREEN,i.CalloutBackgroundColor.GRAY,i.CalloutBackgroundColor.PURPLE,i.CalloutBackgroundColor.ORANGE,i.CalloutBackgroundColor.BROWN],getColorForClassName=e=>{switch(e){case i.CalloutBackgroundColor.JADE:return"jade";case i.CalloutBackgroundColor.BLUE:return"blue";case i.CalloutBackgroundColor.INDIGO:return"indigo";case i.CalloutBackgroundColor.PURPLE:return"purple";case i.CalloutBackgroundColor.PINK:return"pink";case i.CalloutBackgroundColor.ORANGE:return"orange";case i.CalloutBackgroundColor.BROWN:return"brown";case i.CalloutBackgroundColor.GRAY:return"gray";case i.CalloutBackgroundColor.GREEN:default:return"green"}},getCalloutBackgroundColorTag=e=>{let t=(e=>{switch(e){case i.CalloutBackgroundColor.JADE:return y.t("Jade");case i.CalloutBackgroundColor.BLUE:return y.t("Lagoon");case i.CalloutBackgroundColor.INDIGO:return y.t("Indigo");case i.CalloutBackgroundColor.PURPLE:return y.t("Aubergine");case i.CalloutBackgroundColor.PINK:return y.t("Flamingo");case i.CalloutBackgroundColor.ORANGE:return y.t("Honeycomb");case i.CalloutBackgroundColor.BROWN:return y.t("Horchata");case i.CalloutBackgroundColor.GRAY:return y.t("Gray");case i.CalloutBackgroundColor.GREEN:default:return y.t("Grass")}})(e),a=b()("callout-background-color-tag",`callout-background-color-tag--${getColorForClassName(e)}`);return n.createElement("div",{className:a},t)};getCalloutBackgroundColorTag.displayName="getCalloutBackgroundColorTag";let getCalloutBackgroundIcon=e=>n.createElement("span",{className:`callout_background_color-icon--${getColorForClassName(e)}`},n.createElement("rect",{className:"callout_background_color-icon-border"},n.createElement(g.Ah,{size:"18",name:"icon-placeholder-filled"})));function getCalloutBackgroundColorMenuItemTemplate({embeddedUiData:e}){let{currentBackgroundColor:t}=e.calloutSectionAttributes()??{},a=x.map(a=>({type:d.A.radio,key:`${A}-${a}`,dataQa:`${A}-${a}`,label:getCalloutBackgroundColorTag(a),click:()=>e.performAction({action:i.EmbeddedUiAction.MODIFY_CALLOUT,modification:{calloutProperty:i.CalloutModificationProperty.BACKGROUND_COLOR,backgroundColor:a}}),checked:a===t}));return{key:A,dataQa:A,label:y.t("Background color",{fallbackHash:"874df4e774343ace22071f648b6b67d11e21b307",fallbackHashNs:"files"}),show:!e.isReadOnly()&&e.contextType()===i.EmbeddedUiContext.SECTION_MENU&&e.canPerformCalloutModification(),type:d.A.submenu,submenu:a,submenuWidth:"auto",icon:getCalloutBackgroundIcon(t)}}getCalloutBackgroundIcon.displayName="getCalloutBackgroundIcon";var E=a(0x91728dda),C=a(0xd7b35c2f),k=a(0x75a8557f),v=a(0x4a5b4937),S=a(0x188544c76),I=a(0x226892387),w=a(0x14236acae);let T=new p.Ay("slack-docs"),N="change-salesforce-field";function useChangeSalesforceFieldMenuTemplate({recordId:e,fieldLabel:t,includeFieldLabel:a,dispatch:n,embeddedUiData:r}){let l=(0,I.d4)(t=>(0,w.PQ)(t,e,!0,C.f,C.i)),o=(0,I.d4)(E.R5),s=l?l.fields?.find(e=>e.apiName===t||e.label===t):void 0,c=e?(0,S.D)(e):void 0,m=c?.salesforceOrgId,u=(0,v.x)(m),p=!!o&&!!e&&!!t&&!!r&&!r.isReadOnly()&&!u;return{key:N,dataQa:N,label:T.t("Change Field"),show:!!p,click:()=>{if(!e||!n||!r)return;let{salesforceOrgId:t,rawRecordId:o}=(0,S.D)(e);t&&o&&n((0,k.b)({source:"quip-context-menu-update",onInsertRecord:async(e,t,a,n,l,o)=>{a&&r.performAction({action:i.EmbeddedUiAction.UPDATE_SALESFORCE_DATA_MENTION,fieldLabel:a,recordId:t,fieldApiName:n,includeFieldLabel:o})},includeFieldPicker:!0,defaultOrgId:l?.org?.id,defaultObjectType:l?.object_api_name?{label:l.object_label||l.object_api_name,value:l.object_api_name}:void 0,defaultRecord:l?{label:l.name,value:o}:void 0,defaultField:s?{label:s.label,value:s.display_value,extras:{salesforceLabel:s.label,salesforceApiName:s.api_name}}:void 0,defaultIncludeFieldLabel:a}))},type:d.A.default}}var M=a(0x1b0d3144),R=a(0x1e3bedba2),P=a(0x7cdf00a5);let L=new p.Ay("files"),O="convert_to_callout";function useConvertToCalloutMenuTemplate({embeddedUiData:e}){let t=e?.canPerformCalloutModification(),a=e?.contextType();return{key:O,dataQa:O,label:t?L.t("Remove callout"):L.t("Add callout"),show:!e?.isReadOnly()&&a!==i.EmbeddedUiContext.HOVERCARD&&(e?.canConvertToCallout()||t),click:()=>{e?.performAction({action:i.EmbeddedUiAction.PERFORM_CALLOUT_CONVERSION,shouldConvertToCallout:!t})},type:d.A.default,icon:n.createElement(g.Ah,{size:"18",...(0,R.P)(P.r.CALLOUT)})}}useConvertToCalloutMenuTemplate.displayName="useConvertToCalloutMenuTemplate";var D=a(0x39e53dae),F=a(0x2301c802e),U=a(0x21d85d6e5),B=a(0x4b8e0952),H=a(0x1b51e9b54),W=a(0x1ed767a16);let V=new p.Ay("files"),G="copy_name";function getCopyNameMenuItemTemplate({member:e,memberName:t}){return{key:G,dataQa:G,label:V.t("Copy name"),click:()=>{(0,W.x3)(t)},type:d.A.default,show:!!e&&!!t,disabled:(0,B.z1)(e)}}var q=a(0x13ec15e33);let j=new p.Ay("file"),z="copy_object";function getCopyObjectMenuItemTemplate({embeddedUiData:e,onClick:t}){let a=e.embeddedObject();return{key:z,dataQa:z,label:j.t("Copy section"),show:e?.contextType()===i.EmbeddedUiContext.SECTION_MENU&&a?.type===i.EmbeddedObjectType.SLACK_OBJECT&&!(0,q.G)(a?.object?.id),click:t||(()=>{e?.performAction({action:i.EmbeddedUiAction.COPY_OBJECT})}),type:d.A.default}}let use_get_unfurl_type_useGetUnfurlType=()=>{let{embeddedUiData:e}=(0,n.useContext)(F.N),t=e?.contextType();return t===i.EmbeddedUiContext.CARD||t===i.EmbeddedUiContext.SECTION_MENU?i.UnfurlType.CARD:t===i.EmbeddedUiContext.CONTROL_CONTEXT_MENU||t===i.EmbeddedUiContext.HOVERCARD?i.UnfurlType.INLINE:t===i.EmbeddedUiContext.HYPERLINK_CONTEXT_MENU?i.UnfurlType.LINK:void 0},K=new p.Ay("file"),$="edit_link_details";function getEditLinkDetailsMenuItemTemplate({embeddedUiData:e,unfurlType:t}){let a=e.embeddedObject().type,n=!1,r="";return a===i.EmbeddedObjectType.HYPERLINK&&(n=t===i.UnfurlType.LINK,r=K.t("Edit link")),{key:$,dataQa:$,label:r,show:n&&!e.isReadOnly(),click:()=>{},type:d.A.default}}var Y=a(0xbe0b63ff),Q=a(0x1a6f46c68),Z=a(0xec8d5140),J=a(0x249ce209d),X=a(0xbd3de346),ee=a(0x1944fd4df),et=a(0x205570b9a),ea=a(0xef0063c1),en=a(0x4885d7aa),er=a(0x927937a),ei=a(0x11046b18),el=a(0x144561e68),eo=a(0x1563c9b37),es=a(0xd93ecf94),ec=a(0x1ee439e69);function getQuipEmbeddedUnfurlUrl(e,t){let a=t?.embeddedObject();if(a?.type===i.EmbeddedObjectType.SLACK_OBJECT&&a?.object.type===i.SlackObjectType.SALESFORCE_RECORD){let t=a.object.id,n=(0,el.E)(t);if((0,er.kC)(e)&&n){let{salesforceOrgId:t,rawRecordId:a}=(0,S.D)(n);if(t&&a){let n=(0,ec.H7)(e);if(n)return(0,eo._)({team:n,orgId:t,recordId:a})}}let r=n?(0,w.PQ)(e,n,!1):null;if(r?.external_url)return r.external_url;if(a.object.permalink)return a.object.permalink}let n=a?.type===i.EmbeddedObjectType.SLACK_OBJECT&&a?.object.type===i.SlackObjectType.UNFURL&&a.object;if(!n)return null;let r=(0,es.Ld)(e,n.channelId,n.id);return(r?(0,ei.B)(r):void 0)||null}var ed=a(0xa1832ae4),em=a(0x13a58e951),eu=a(0x9b971e7e),ep=a(0x1044a5d56);let eh=new p.Ay("files"),e_="copy_link_to_item";function useGetCopyLinkToItemMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(F.N),a=(0,I.d4)(e=>(0,ec._J)(e,(0,eu.ZT)(e)??"")),i=(0,I.d4)(e=>t?(0,H.A)(e,t):null),o=(0,I.d4)(e=>t?(0,en.A)(e,t):null),s=(0,I.d4)(e=>(0,ee.l)(e,o)),c=(0,I.d4)(e=>t?getQuipEmbeddedUnfurlUrl(e,t)||t?.objectUrl():null),d=(0,I.d4)(e=>t?(0,ea.Ay)(e,t):null),m=(0,X.dE)(d),u=(0,I.d4)(et.H0),{unfurlType:p,parsedPermalink:h}=(0,J.A)(),_=p===J.h.SLACK_LIST_RECORD,f=p===J.h.SLACK_LIST&&!!h?.viewId,{windowRef:b}=(0,n.useContext)(l._0);return(0,n.useMemo)(()=>{if(a&&(i||o||c||d))return getCopyLinkToItemMenuItemTemplate({member:i,message:o,isCanvasComment:s,url:c,file:d,team:a,dispatch:e,windowRef:b,isTemplate:m,experimentCanvasCommentContentImprovementsGroupOn:u,isSlackListRecordUnfurl:_,isSlackListViewUnfurl:f})},[a,i,o,s,c,d,e,b,m,u,_,f])}function getCopyLinkToItemMenuItemTemplate({team:e,file:t,member:a,message:n,isCanvasComment:r,url:i,onClick:l,dispatch:o,windowRef:s,isTemplate:c,experimentCanvasCommentContentImprovementsGroupOn:m,isSlackListRecordUnfurl:u,isSlackListViewUnfurl:p}){let writeTextWithWindowContext=e=>{(0,W.x3)(e,s&&s.deref()),o((0,Z.M)())},h=eh.t("Copy link");return t?h=c?eh.t("Copy link to template"):(0,X.DQ)(t)?eh.t("Copy link to canvas"):(0,X._y)(t)?eh.t("Copy link to video"):(0,X.sJ)(t)?eh.t("Copy link to image"):(0,X.l7)(t)?u?eh.t("Copy link to item"):p?eh.t("Copy link to list view",{fallbackHash:"c065c2dd16ea89ffad2e42de3174c6a386cf7441"}):eh.t("Copy link to list"):eh.t("Copy link to file"):a?h=eh.t("Copy link to profile"):r&&m?h=eh.t("Copy link to comment"):n?h=eh.t("Copy link to message"):i&&(0,em.C)(i)?h=eh.t("Copy link to workflow",{fallbackHash:"2f84eea5d45da4f1ce1760b85db18a854f4e1b39"}):i&&(0,Q.B)(i)&&(h=eh.t("Copy link to record")),{key:e_,dataQa:e_,label:h,click:l||(()=>{if(t)writeTextWithWindowContext(((0,X.DQ)(t)||(0,X.l7)(t))&&i?i:(0,X.IE)(t,e.id));else if(a)writeTextWithWindowContext((0,ed.Zl)(e,`/team/${a?.id}`));else if(n){let{channel:e,ts:t}=n;o((0,ep.A)({channelId:e,ts:t})),o((0,Z.M)())}else i&&writeTextWithWindowContext(i)}),type:d.A.default,show:(0,W.tD)()&&(!!a||!!n&&!(0,Y.GU)(n)||!t&&!!i||!!t&&!(0,X.c4)(t)&&!(0,X.sR)(t))}}var ef=a(0x1b6652c20),eb=a(0xeeae4283),eg=a(0x15f2fd44c);let ey=new p.Ay("file"),eA="download_file";function useDownloadFileMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(F.N),a=(0,I.d4)(e=>t?(0,ea.Ay)(e,t):null),i=(0,I.d4)(e=>!!a&&(0,ef.n)(e,a));return(0,n.useMemo)(()=>{if(a)return getDownloadFileMenuItemTemplate({file:a,canDownloadFile:!!i,dispatch:e})},[e,a,i])}function getDownloadFileMenuItemTemplate({file:e,canDownloadFile:t,onClick:a,dispatch:n}){return{key:eA,dataQa:eA,label:ey.t("Download"),show:t,click:a||(()=>n((0,eb.A)({file:e,action:eg.c.DownloadFile}))),type:d.A.default,disabled:(0,X.aK)(e)}}var ex=a(0x1ace11bd7),eE=a(0x251499a17);let eC=new p.Ay("file"),ek="edit_details";function useEditDetailsMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(F.N),a=(0,I.d4)(e=>t?(0,ea.Ay)(e,t):null),i=(0,I.d4)(e=>!!a&&(0,ex.A)(e,a));return(0,n.useMemo)(()=>{if(t&&a)return getEditDetailsMenuItemTemplate({file:a,embeddedUiData:t,canEditFile:i,dispatch:e})},[t,a,i,e])}function getEditDetailsMenuItemTemplate({file:e,embeddedUiData:t,onClick:a,canEditFile:n,dispatch:r}){return{key:ek,dataQa:ek,label:eC.t("Edit file details"),show:n&&!t.isLocked(),click:a||(()=>{r((0,eE.A)({file:e,isStackable:!0,dialogEntrypoint:eE.P.FILE_ACTIONS_MENU}))}),type:d.A.default,disabled:(0,X.aK)(e)}}var ev=a(0x1abdfd657),eS=a(0x1b5e73e1d);let eI=new p.Ay("file"),ew="full_screen";function useFullScreenMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(F.N),a=(0,I.d4)(e=>t?(0,ea.Ay)(e,t):null);return(0,n.useMemo)(()=>{if(a)return getFullScreenMenuItemTemplate({file:a,dispatch:e})},[e,a])}function getFullScreenMenuItemTemplate({file:e,onClick:t,dispatch:a}){return{key:ew,dataQa:ew,label:eI.t("Full screen"),show:!(0,X.Vx)(e)&&!(0,X.ge)(e)&&!(0,X.DQ)(e)&&!(0,X.l7)(e)&&"snippet"!==(0,ev.t)(e),click:t||(()=>a((0,eS.A)({fileId:e.id,isStackable:!0}))),type:d.A.default,disabled:(0,X.aK)(e)}}let eT=new p.Ay("file"),eN="replace_file";function useReplaceImageMenuItemTemplate(){let{embeddedUiData:e}=(0,n.useContext)(F.N),t=(0,I.d4)(t=>e?(0,ea.Ay)(t,e):null),a=use_get_unfurl_type_useGetUnfurlType();return(0,n.useMemo)(()=>{if(t&&e)return getReplaceImageMenuItemTemplate({file:t,embeddedUiData:e,unfurlType:a})},[t,e,a])}function getReplaceImageMenuItemTemplate({embeddedUiData:e,file:t,unfurlType:a,onClick:n}){return{key:eN,dataQa:eN,label:eT.t("Replace"),show:!e.isReadOnly()&&!!(0,X.sJ)(t)&&a===i.UnfurlType.CARD&&!e.isLocked(),click:n||(()=>{e?.performAction({action:i.EmbeddedUiAction.REPLACE_FILE})}),type:d.A.default}}var eM=a(0x21d6ed371),eR=a(0x1de4133);let eP=new p.Ay("files"),eL="save_for_later";function useSaveForLaterMenuItemTemplate(){let e=(0,r.wA)(),{embeddedUiData:t}=(0,n.useContext)(F.N),a=(0,I.d4)(e=>t?(0,ea.Ay)(e,t,!0):null),i=(0,I.d4)(e=>t?(0,en.A)(e,t):null),{unfurlType:l}=(0,J.A)(),o=l===J.h.SLACK_LIST_RECORD;return(0,n.useMemo)(()=>{if(i||a)return getSaveForLaterMenuItemTemplate({unfurledMessage:i,file:a,dispatch:e,isSlackListRecordUnfurl:o})},[a,i,e,o])}function getSaveForLaterMenuItemTemplate({unfurledMessage:e,file:t,dispatch:a,isSlackListRecordUnfurl:n}){let r={key:eL,dataQa:eL,type:d.A.default};return t?{...r,label:(0,X.Gs)(t)?eP.t("Remove from Later"):eP.t("Save for later"),show:!(0,X.Vx)(t)&&!(0,X.ge)(t)&&!n,click:()=>{(0,X.Gs)(t)?a((0,eR.U4)({itemId:t.id})):a((0,eR.jx)({fileId:t.id}))},disabled:(0,X.aK)(t)||(0,X.sR)(t)}:e?{...r,label:(0,eM.Gs)(e)?eP.t("Remove from Later"):eP.t("Save for later"),show:!(0,Y.GU)(e),click:()=>{let{channel:t,ts:n}=e;(0,eM.Gs)(e)?a((0,eR.xF)({channelId:t,messageTs:n})):a((0,eR.MU)({channelId:t,messageTs:n,dateDue:void 0}))},disabled:(0,Y.GU)(e)}:{...r,show:!1}}var eO=a(0xff5f4ebf),eD=a(0x171c34b90);let eF=new p.Ay("file"),eU="file_options";function getLabel(e){switch(e){case J.h.FILE||J.h.FILE_UPLOAD:return eF.t("File options");case J.h.MESSAGE:return eF.t("Message options");case J.h.CANVAS:return eF.t("Canvas options");case J.h.USER:return eF.t("Profile options");case J.h.PUBLIC_LINK:return eF.t("Link options");case J.h.SLACK_LIST:return eF.t("List options");case J.h.PLATFORM_LINK_TRIGGER:return eF.t("Workflow options");case J.h.SHORTCUT_BUTTON:return eF.t("Shortcut options");case J.h.WORK_OBJECT:case J.h.WIDGET:return eF.t("Card options");case J.h.SLACK_LIST_RECORD:return eF.t("Item options");case J.h.SALESFORCE_RECORD:return eF.t("Record options");case J.h.CHANNEL:return eF.t("Channel options");default:return eF.t("Link options")}}function useFileOptionsMenuItemTemplate(e){let t=[],a=(0,eD.A)(void 0,!0),n=useGetCopyLinkToItemMenuItemTemplate(),r=useFullScreenMenuItemTemplate(),i=useDownloadFileMenuItemTemplate(),l=(0,eO.A)(),o=useSaveForLaterMenuItemTemplate(),s=useReplaceImageMenuItemTemplate(),c=useEditDetailsMenuItemTemplate();return(a?.show&&t.push(a),n?.show&&t.push(n),r?.show&&t.push(r),i?.show&&t.push(i),l?.show&&t.push(l),o?.show&&t.push(o),s?.show&&t.push(s),c?.show&&t.push(c),1===t.length)?t[0]:{key:eU,dataQa:eU,label:getLabel(e),show:t.length>0,type:d.A.submenu,submenu:t,submenuWidth:"auto"}}var eB=a(0x13776886e),eH=a(0x44520056),eW=a(940089e4),eV=a(0x1c659cbb1),eG=a(0x1b9d5cc0c),eq=a(0xe684f705);let ej=new p.Ay("file"),ez="last_edited",LastEditedMenuItemIcon=({memberId:e})=>{let t=(0,I.d4)(t=>(0,eq.nv)(t,e)),a=(0,eG.jc)(t)||"";return n.createElement(eV.f1,{size:24,imageUrl:a,isInteractive:!1,className:"p-last-edited-menu-item-icon"})};LastEditedMenuItemIcon.displayName="LastEditedMenuItemIcon";let LastEditedMenuItemText=({memberId:e})=>{let t=(0,I.d4)(t=>(0,eq.nv)(t,e)),a=(0,I.d4)(e=>(0,U.sE)(e,t));return n.createElement(n.Fragment,null,e?ej.rt("Last updated by {memberName}",{memberName:a}):ej.rt("Last updated"))};function getLastEditedMenuItemTemplate({embeddedUiData:e,onClick:t,disabled:a}){let r=e?.lastEdited()?.lastEditTs,l=r?(({timestamp:e})=>{let t=(0,eW.A)(e,{returnMoment:!0});return ej.t("{date} at {time}",{date:(0,eH.A)(t,{shortenMonth:!0}),time:(0,eB.A)(t,"{time}")})})({timestamp:r/1e3}):void 0,o=e?.lastEdited()?.lastSlackEditorId,s=e?.editingLockSession()?.lockingAuthorId,c=e?.isLocked()&&!!s;return{type:d.A.default,key:ez,dataQa:ez,children:n.createElement(LastEditedMenuItemText,{memberId:o}),click:t,show:e.contextType()===i.EmbeddedUiContext.SECTION_MENU&&!c,disabled:a,description:l,icon:n.createElement(LastEditedMenuItemIcon,{memberId:o})}}getLastEditedMenuItemTemplate.displayName="getLastEditedMenuItemTemplate";var eK=a(0x20a401c86);let e$=new p.Ay("file"),eY="move_line";function getMoveLineMenuItemTemplate({embeddedUiData:e,sectionType:t}){let a=[P.r.CHECK_LIST,P.r.BULLET_LIST,P.r.ORDERED_LIST],n=[{key:`${eY}-up`,dataQa:`${eY}-up`,label:e$.t("Move line up"),click:()=>{e?.performAction({action:i.EmbeddedUiAction.MOVE_LINE,direction:i.EmbeddedMoveDirection.PREVIOUS})},disabled:!e?.canMoveLine(i.EmbeddedMoveDirection.PREVIOUS)},{key:`${eY}-down`,dataQa:`${eY}-down`,label:e$.t("Move line down"),click:()=>{e?.performAction({action:i.EmbeddedUiAction.MOVE_LINE,direction:i.EmbeddedMoveDirection.NEXT})},disabled:!e?.canMoveLine(i.EmbeddedMoveDirection.NEXT)}];return{key:eY,dataQa:eY,label:e$.t("Move line"),show:!e.isReadOnly()&&e.contextType()===i.EmbeddedUiContext.SECTION_MENU&&a.includes(t),type:d.A.submenu,submenu:n,submenuWidth:"auto"}}var eQ=a(0x1fca23c61),eZ=a(0x252dd886b),eJ=a(0xe1300f34),eX=a(0x1337d9fa2);let e0=new p.Ay("files"),e1="open_in_new_window";function getOpenInNewWindowMenuItemTemplate({file:e,dispatch:t}){let a={key:e1,dataQa:e1,type:d.A.default},n=(0,X.ez)(e);return{...a,label:e0.t("Open in new window"),show:n,click:()=>{let a,n,r=(0,eJ.p4)(e),i=r&&eZ.A.getBySrc(r);i&&(i.pause(),a=i?.videoRef?.current?.videoRef?.current?.currentTime||0,n=i?.videoRef?.current?.videoRef?.current?.playbackRate),t((0,eQ.A)({file:e,videoSeekTimeInSeconds:a,videoPlaybackSpeed:n}))},disabled:(0,eX.aK)(e)}}var e2=a(0x235f350c5),e4=a(0x1d159d833),e5=a(0x754ea859),e3=a(0x204000df3);let e6=new p.Ay("slack-docs"),e8="view_salesforce_record";function getOpenSalesforceRecordMenuItemTemplate({dispatch:e,salesforceRecord:t}){return{key:e8,dataQa:e8,label:e6.t("See record details"),show:t&&(0,e3._s)(t),click:()=>{e((0,e5.c)({recordId:t.id}))},type:d.A.default}}var e7=a(0x41d73207),e9=a(0x14cae1443),te=a(0x246d26f5);let tt="paragraph_style",ta=[e7.zF.PARAGRAPH,e7.zF.H1,e7.zF.H2,e7.zF.H3,P.r.MENU_SEPARATOR,e7.zF.CHECK_LIST,e7.zF.ORDERED_LIST,e7.zF.BULLET_LIST,P.r.MENU_SEPARATOR,e7.zF.CODE_BLOCK,e7.zF.BLOCKQUOTE];function getParagraphStyleMenuItemTemplate({embeddedUiData:e,sectionType:t,keyboardLocale:a}){let r=(0,e7.Zq)(e.blockStyle()??i.DocBlockStyle.PLAIN)??e7.zF.PARAGRAPH,l=Object.values(e7.zF),o=ta.map((t,l)=>{if(t===P.r.MENU_SEPARATOR)return{type:d.A.separator,key:`${tt}-${t}-${l}`};let o=t??e7.zF.PARAGRAPH,s=r===o,c=b()({selected:s});return{type:d.A.radio,key:`${tt}-${t}`,dataQa:`${tt}-${t}`,label:(0,e9.O)(o),shortcut:(0,te.W)(o,a),icon:n.createElement(g.Ah,{size:"18",...(0,R.P)(o)}),className:c,click:()=>{e?.performAction({action:i.EmbeddedUiAction.SET_BLOCK_STYLE,style:(0,e7.zf)(t)??i.DocBlockStyle.PLAIN})},checked:s}});return{key:tt,dataQa:tt,label:(0,e9.O)(r),show:!e.isReadOnly()&&e.contextType()===i.EmbeddedUiContext.SECTION_MENU&&l.includes(t),type:d.A.submenu,icon:n.createElement(g.Ah,{size:"18",...(0,R.P)(r)}),submenu:o,submenuWidth:"320px"}}getParagraphStyleMenuItemTemplate.displayName="getParagraphStyleMenuItemTemplate";var tn=a(0x2068ad0b8),tr=a(0x19b447382),ti=a(0x1bdf032f7),tl=a(0x16ffed5ab);let to=new p.Ay("files"),ts="refresh_unfurl";function getRefreshLinkMenuItemTemplate({dispatch:e,salesforceRecord:t,onClick:a}){let r=to.t("Reload data"),i=!!(t&&((0,e3._s)(t)||(0,e3.Mo)(t)||(0,e3.H9)(t)||(0,e3.CK)(t))),defaultOnClick=async()=>{if(i)try{await e((0,ti.a)({recordId:t.id,layoutType:u.O,fallbackLayoutType:u.N})),e((0,tl.M)({element:n.createElement(tr.A,{isError:!1})}))}catch(t){e((0,tl.M)({element:n.createElement(tr.A,{isError:!0})}))}};return defaultOnClick.displayName="defaultOnClick",{key:ts,dataQa:ts,label:r,click:a||defaultOnClick,type:d.A.default,show:i}}getRefreshLinkMenuItemTemplate.displayName="getRefreshLinkMenuItemTemplate";let tc=new p.Ay("files"),td="remove";function getRemoveSectionMenuTemplate({sectionType:e,embeddedUiData:t,onClick:a}){let n=[P.r.CHECK_LIST,P.r.BULLET_LIST,P.r.ORDERED_LIST];return{key:td,dataQa:td,label:t?.contextType()===i.EmbeddedUiContext.SECTION_MENU&&n.includes(e)?tc.t("Remove list item",{fallbackHash:"e963907dac5cd5c017869b4c96c18021c9bd058b"}):tc.t("Remove"),show:t.isRemovable(),click:a||(()=>{t?.performAction({action:i.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})}),type:d.A.default}}let tm=new p.Ay("files"),tu="remove";function getReportSectionMenuTemplate({embeddedUiData:e,team:t,reportToSlackEnabled:a}){if(!a)return null;let onAnchorLinkGenerationSuccessCallback=e=>((0,ed.gC)(t,`/help/requests/report-content?u=${e}&type=canvas_section`),null);return{className:"p-embedded_section_menu--report-menu-item",key:tu,dataQa:tu,label:tm.t("Report to Slack",{fallbackHash:"fed452c545e1032d4d547bc6b1fe8e6404917dfa"}),show:!0,click:()=>{e?.performAction({action:i.EmbeddedUiAction.COPY_SECTION_LINK,onAnchorLinkGenerationSuccessCallback})},type:d.A.default,showLinkIndicatorIcon:!1}}var tp=a(0x11015262),th=a(0x1f640da1e),t_=a(0x15e1a1041),tf=a(0x14fde54c);let tb=new p.Ay("canvas"),tg="switch_list_view";function getSwitchListViewItemTemplate({file:e,unfurlTypeResult:t,embeddedUiData:a,teamId:r,unfurlType:l}){let o,{unfurlType:s}=t;s===J.h.SLACK_LIST&&(o=t.viewId);let getSubmenuItems=()=>{let t=(0,tf.nX)(e),l=t?.filter(e=>e.type!==t_.q.Record&&e.type!==t_.q.CanvasInline);return l?.map(t=>{let l=t.id===o;return{label:t.name,type:l?d.A.checkbox:d.A.default,checked:l,icon:n.createElement(g.Ah,{name:t.is_all_items_view?"home":(0,th.gC)(t.type)}),click:()=>(({newViewId:t})=>{let n=(0,tp.o8)(e,r,t);a?.performAction({action:i.EmbeddedUiAction.SWITCH_LIST_VIEW,url:n})})({newViewId:t.id})}})};getSubmenuItems.displayName="getSubmenuItems";let c=getSubmenuItems();return{key:tg,dataQa:tg,label:tb.t("Switch view",{fallbackHash:"e2740fba4080ec331c97fab2ed18b69d6bdea80b"}),show:!a.isReadOnly()&&!a.isLocked()&&s===J.h.SLACK_LIST&&c?.length&&l!==i.UnfurlType.LINK,type:d.A.submenu,template:c??[]}}getSwitchListViewItemTemplate.displayName="getSwitchListViewItemTemplate";var ty=a(0x1c715b002);let tA=new p.Ay("files"),tx="switch_to_card";function useGetSwitchToCardMenuTemplate(){let{embeddedUiData:e}=(0,n.useContext)(F.N),{unfurlType:t}=(0,J.A)(),a=use_get_unfurl_type_useGetUnfurlType();return(0,n.useMemo)(()=>{if(e)return getSwitchToCardMenuTemplate({embeddedUiData:e,unfurlType:a,onClick:()=>{let a;switch(t){case J.h.PLATFORM_LINK_TRIGGER:a={cardRenderType:i.SlackUnfurlContentRenderType.STATIC};break;case J.h.SLACK_LIST:a={cardRenderType:i.SlackListContentRenderType.STATIC}}e.performAction({action:i.EmbeddedUiAction.SWITCH_UNFURL_TYPE,toUnfurlType:i.UnfurlType.CARD,options:a})}})},[e,t,a])}function getSwitchToCardMenuTemplate({embeddedUiData:e,unfurlType:t,onClick:a}){let n,r=e?.embeddedObject(),l=e?.objectUrl(),o=t===i.UnfurlType.CARD,s=e.getCardRenderType()===i.SlackListContentRenderType.EMBED;return{key:tx,dataQa:tx,label:tA.t("Card"),show:(r.type===i.EmbeddedObjectType.SLACK_OBJECT||r.type===i.EmbeddedObjectType.HYPERLINK)&&(n=l??"",!ty.h.some(e=>e.urlType===i.CollabUrlType.SLACK_DOCUMENT_SECTION&&n.match(e.regExp)||e.urlType===i.CollabUrlType.SLACK_CHANNEL&&n.match(e.regExp)))&&!e.isReadOnly()&&!e.isLocked()&&(!o||s),click:a,type:d.A.default}}var tE=a(0x6e20c837);let tC=new p.Ay("files"),tk="switch_to_embed";function useGetSwitchToEmbedMenuTemplate(){let{embeddedUiData:e}=(0,n.useContext)(F.N),t=use_get_unfurl_type_useGetUnfurlType(),a=e?.objectUrl()??"",r=(0,I.Z2)(e=>(0,tE.$N)(e,a));return(0,n.useMemo)(()=>{if(e)return getSwitchToEmbedMenuTemplate({embeddedUiData:e,unfurlType:t,parsedPermalink:r,onClick:()=>{e.performAction({action:i.EmbeddedUiAction.SWITCH_UNFURL_TYPE,toUnfurlType:i.UnfurlType.CARD,options:{cardRenderType:i.SlackListContentRenderType.EMBED}})}})},[e,t,r])}function getSwitchToEmbedMenuTemplate({embeddedUiData:e,unfurlType:t,onClick:a,parsedPermalink:n}){let r=e?.embeddedObject(),{type:l,recordId:o}=n||{},s=l===tE.im.LIST&&!o,c=(t!==i.UnfurlType.CARD||e.getCardRenderType()!==i.SlackListContentRenderType.EMBED)&&s;return{key:tk,dataQa:tk,label:tC.t("Embed"),show:(r.type===i.EmbeddedObjectType.SLACK_OBJECT||r.type===i.EmbeddedObjectType.HYPERLINK)&&!e.isReadOnly()&&!e.isLocked()&&c,click:a,type:d.A.default}}let tv=new p.Ay("files"),tS="switch_to_title";function useGetSwitchToTitleMenuTemplate(){let{embeddedUiData:e}=(0,n.useContext)(F.N),t=e?.embeddedObject(),a=e?.objectUrl()??"",r=use_get_unfurl_type_useGetUnfurlType(),l=(0,eK.A)(),{type:o}=(0,I.Z2)(e=>(0,tE.$N)(e,a))||{},s=l===P.r.USER_UNFURL||o===tE.im.MEMBER,c=!1;return s||l===P.r.CANVAS_UNFURL||l===P.r.MESSAGE_UNFURL||l===P.r.AUDIO_CLIP||l===P.r.VIDEO_CLIP||l===P.r.FILE||l===P.r.IMAGE||o===tE.im.LIST?c=!0:t?.type===i.EmbeddedObjectType.HYPERLINK&&(c=o===tE.im.FILE||o===tE.im.MESSAGE||o===tE.im.QUIP||o===tE.im.CHANNEL_CANVAS),(0,n.useMemo)(()=>{if(e)return getSwitchToTitleMenuTemplate({embeddedUiData:e,unfurlType:r,enabled:c,isMention:s,onClick:()=>{e.performAction({action:i.EmbeddedUiAction.SWITCH_UNFURL_TYPE,toUnfurlType:i.UnfurlType.INLINE})}})},[e,c,s,r])}function getSwitchToTitleMenuTemplate({embeddedUiData:e,unfurlType:t,onClick:a,enabled:n=!0,isMention:r=!1}){let l=e?.embeddedObject();return{key:tS,dataQa:tS,label:r?tv.t("Mention"):tv.t("Title"),show:(l.type===i.EmbeddedObjectType.SLACK_OBJECT||l.type===i.EmbeddedObjectType.HYPERLINK)&&!e.isReadOnly()&&n&&!e.isLocked()&&t!==i.UnfurlType.INLINE,click:a,type:d.A.default}}let tI=new p.Ay("files"),tw="switch_to_url";function useGetSwitchToUrlMenuTemplate(){let{embeddedUiData:e}=(0,n.useContext)(F.N),t=use_get_unfurl_type_useGetUnfurlType(),a=e?.embeddedObject(),r=a?.type===i.EmbeddedObjectType.SLACK_OBJECT&&a?.object.type===i.SlackObjectType.SALESFORCE_RECORD,l=r?(0,el.E)(a.object.id):null,o=(0,I.d4)(ec.H7),s=(0,I.d4)(er.kC),c=(0,I.d4)(t=>{if(!l)return null;if(s&&o){let{salesforceOrgId:e,rawRecordId:t}=(0,S.D)(l);if(e&&t)return(0,eo._)({team:o,orgId:e,recordId:t})}let a=(0,w.PQ)(t,l,!1);return a?.external_url?a.external_url:e?.objectUrl?.()||null});return(0,n.useMemo)(()=>{if(e)return getSwitchToUrlMenuTemplate({embeddedUiData:e,unfurlType:t,isSalesforceRecord:r,salesforceUrl:c,onClick:()=>{r&&c?e.performAsyncAction({action:i.EmbeddedUiAction.UNFURL_URL,url:c}).then(()=>{e.performAction({action:i.EmbeddedUiAction.SWITCH_UNFURL_TYPE,toUnfurlType:i.UnfurlType.LINK})}):e.performAction({action:i.EmbeddedUiAction.SWITCH_UNFURL_TYPE,toUnfurlType:i.UnfurlType.LINK})}})},[e,t,r,c])}function getSwitchToUrlMenuTemplate({embeddedUiData:e,unfurlType:t,onClick:a,isSalesforceRecord:n,salesforceUrl:r}){let l=e?.embeddedObject();return{key:tw,dataQa:tw,label:tI.t("URL"),show:l.type===i.EmbeddedObjectType.SLACK_OBJECT&&!e.isReadOnly()&&!e.isLocked()&&t!==i.UnfurlType.LINK&&(!n||!!r),click:a,type:d.A.default}}let tT="switch",tN=new p.Ay("file");function useSwitchUnfurlTypeOptionsMenuTemplate({hideSwitchToCard:e=!1,hideSwitchToUrl:t=!1,hideSwitchToInline:a=!1,hideSwitchToEmbed:r=!1}={}){let i=useGetSwitchToTitleMenuTemplate(),l=useGetSwitchToCardMenuTemplate(),o=useGetSwitchToUrlMenuTemplate(),s=useGetSwitchToEmbedMenuTemplate();return(0,n.useMemo)(()=>{let n=[];return!a&&i?.show&&n.push(i),!t&&o?.show&&n.push(o),!e&&l?.show&&n.push(l),!r&&s?.show&&n.push(s),{key:tT,dataQa:tT,label:tN.t("Display as"),show:n.length>0,type:d.A.submenu,submenu:n,submenuWidth:"auto"}},[e,l,a,i,t,o,r,s])}let tM=new p.Ay("file"),tR="distribute_columns",tP="toggle_fit_to_page";function getTableSectionMenuItemsTemplate({embeddedUiData:e}){let t=e.embeddedObject().type===i.EmbeddedObjectType.TABLE;if(!e||!t)return[];let modifyTable=t=>()=>e.performAction({action:i.EmbeddedUiAction.MODIFY_TABLE,modification:t}),a=e.tableSectionAttributes(),n=a?.viewOptions.isFitToPage?tM.t("Restore default width",{fallbackHash:"578dfd07c31a254772c3dcb8826a51e47a3a3137"}):tM.t("Expand to full width",{fallbackHash:"d753b5d90bb2ffe5be4f0d408151f2038c2cc362"}),{columnCount:r,columnsDistributed:l}=a??{},o=!e.isReadOnly()&&r&&r>1&&!l;return[{key:tR,dataQa:tR,label:tM.t("Distribute columns",{fallbackHash:"8e930689f71a5d60637000acc17065a022a2ee6d"}),type:d.A.default,show:o,click:modifyTable(i.FullTableModification.DISTRIBUTE_COLUMNS)},{key:tP,dataQa:tP,label:n,type:d.A.default,show:a?.viewOptions.allowToggleFitToPage,click:modifyTable(i.FullTableModification.TOGGLE_FIT_TO_PAGE)}]}var tL=a(0xfa2535b1),tO=a(0x13638bd77);let tD=new p.Ay("files"),tF="view_profile";function getViewProfileMenuItemTemplate({member:e,onClick:t,dispatch:a}){return{key:tF,dataQa:tF,label:tD.t("View profile"),click:t||(()=>{a((0,tO.b)({memberId:e?.id}))}),type:d.A.default,show:!!e,disabled:(0,B.z1)(e)}}var tU=a(0xc4548bcd);let tB=new p.Ay("file"),tH="full_screen";function getViewRawMenuItemTemplate({file:e,onClick:t}){return{key:tH,dataQa:tH,label:tB.t("View Raw",{fallbackHash:"bf5da2b93acc8019f16a84bb9938bdabe5d16177"}),show:!(0,X.Vx)(e)&&!(0,X.ge)(e)&&!(0,X.wL)(e)&&"snippet"===(0,ev.t)(e)&&e.url_private,click:t||(()=>{(0,tU.A)(e.url_private,"_blank")}),type:d.A.default,disabled:(0,X.aK)(e)}}var tW=a(0xbac1f72f),tV=a(0xed0918cd),tG=a(0x20bcf7b22),tq=a(0x7a53afe2),tj=a(0x996114a6),tK=a(0xfc03231f),t$=a(0x1d798e7d1),tY=a(0x131e0b1e1),tQ=a(0x2f2d8a30),tZ=a(0x24f705a4f),tJ=a(0x93bbf622),tX=a(0x22d51fee8),t0=a(0x13dfbe027),t1=a(0xaa596f75),t2=a(0x20679dcfc),t4=a(0x1ad2b0609),t5=a(0x1755a8d3c),t3=a(0x85bb584f),t6=a(0x1d1f3cf82),t8=a(0x9b7b6ba5),t7=a(0x108363d6d),t9=a(0x16ed1b0dc),ae=a(0x50279ca3),at=a(0x357cac43),aa=a(0x14ea3ce99),an=a(0x22f6a086f),ar=a(0x8d0a2ff1),ai=a(0xbf6a0d04);function EmbeddedMenu({menuProps:e,onEditLinkSelected:t,hideMessageAction:a,hideOpenInSlack:r,hideOpenLinkAction:l}){let o=useGetEmbeddedMenuTemplate({hideMessageAction:a,hideOpenInSlack:r,hideOpenLinkAction:l}),{embeddedUiData:s}=(0,n.useContext)(F.N),d=(0,n.useCallback)(()=>{s?.contextType()===i.EmbeddedUiContext.HOVERCARD&&s?.performAction({action:i.EmbeddedUiAction.PREVENT_POPOVER_DISMISS}),s?.performAction({action:i.EmbeddedUiAction.DISMISS_POPOVER})},[s]),m=o(),u=m.findIndex(e=>e?.key===$),[p,h]=(0,n.useState)(!1),_=(0,n.useRef)(!1),f=(0,n.useRef)(0),b=(0,n.useCallback)(()=>{_.current=!0,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{_.current=!1},100)},[]),g=(0,n.useMemo)(()=>({width:220,stripTerminalSeparators:!0,...e,onTriggerClose:t=>{_.current||(d(),e?.onTriggerClose?.(t))},onMenuItemSelected:(a,n)=>{a===u?t?t():(b(),h(!0)):d(),e?.onMenuItemSelected?.(a,n)}}),[u,d,e,t,b]),y=(0,n.useCallback)(e=>{h(e),e||d()},[d]);return p?n.createElement(tj.A,{url:s?.objectUrl()??"",updateEditStatus:y,showRemoveLinkButton:s?.contextType()===i.EmbeddedUiContext.HYPERLINK_CONTEXT_MENU}):n.createElement(c.A,{...g,template:m})}function useGetEmbeddedMenuTemplate({hideMessageAction:e,hideOpenInSlack:t,hideOpenLinkAction:a}={}){let c,p=(0,r.wA)(),{windowRef:h,windowId:_}=(0,n.useContext)(l._0),f=(0,J.A)(),b=f.unfurlType,g=f.parsedPermalink,y=use_get_unfurl_type_useGetUnfurlType(),A=(0,I.d4)(t4.J),x=(0,I.d4)(tX.c9),E=(0,I.d4)(e=>(0,ec._J)(e,(0,eu.ZT)(e)??"")),C=(0,I.d4)(ec.fu),{embeddedUiData:k,slackFileId:v}=(0,n.useContext)(F.N),S=(0,eK.A)(),T=k?.embeddedObject(),N=(0,tY.A)(),R=k?.contextType()===i.EmbeddedUiContext.SECTION_MENU,P=k?.objectUrl(),L=(0,I.d4)(e=>(0,t8.O)(e,(0,t2.p)(v||""))),O=(0,I.d4)(e=>k?(0,ea.Ay)(e,k,!0):null),B=(0,I.d4)(e=>(0,aa.Lp)(e,v??"")),W=(0,I.d4)(e=>!!(O&&(0,X.l7)(O))&&T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&T.object?.type===i.SlackObjectType.LIST_RECORD&&!!T.object.id&&!(0,ar.ll)(e,O.id,T.object.id)),V=(0,I.d4)(e=>(0,t1.OB)(e,v)),G=g?.viewId,q=!!(O&&(0,X.l7)(O))&&T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&T.object.type===i.SlackObjectType.LIST&&!!G&&!(0,tf.Qq)(O,G),j=L&&(c=P||"",ty.h.some(e=>(e.urlType===i.CollabUrlType.SLACK_FILE||e.urlType===i.CollabUrlType.SLACK_IMAGE_FILE)&&c.match(e.regExp)))||(0,X.c4)(O),z=(0,I.d4)(e=>k?(0,en.A)(e,k):null),K=(0,I.d4)(e=>k?(0,H.A)(e,k):null),$=(0,I.d4)(e=>(0,U.sE)(e,K)),Y=(0,I.d4)(e=>(0,t5.A)(e,T)),Q=(0,I.d4)(e=>T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&T?.object.type===i.SlackObjectType.UNFURL&&(0,t6.A)(e,T.object)),Z=(0,I.d4)(at.mM),ee=Z&&(0,s.fe)(Z),et=(0,I.d4)(e=>{let t=T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&T?.object.type===i.SlackObjectType.UNFURL&&T.object;return t&&(0,t9.A)(t.channelId)&&(0,ae.A)(t.id)?(0,es.Ld)(e,t.channelId,t.id):null}),er=k?(0,el.A)(k):null,ei=(0,I.d4)(e=>(0,w.PQ)(e,er||void 0,!0,u.O,u.N)),eo=(0,I.d4)(e=>(0,t7.af)(e,k?.objectUrl()??"")),ed=k?.contextType()===i.EmbeddedUiContext.CONTROL_CONTEXT_MENU&&T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&T.object.type===i.SlackObjectType.SALESFORCE_RECORD&&!!T.object?.fieldLabel,em=ed&&(0,el.E)(T.object.id)||void 0,ep=useChangeSalesforceFieldMenuTemplate({recordId:em||void 0,fieldLabel:ed?T?.object?.fieldLabel:void 0,includeFieldLabel:ed?T?.object?.includeFieldLabel:void 0,dispatch:p,embeddedUiData:k||void 0}),eh=ed&&em?ep:void 0,e_=(0,I.d4)(e=>{if(!et)return;let t=(0,t$.q)(et),a=(0,tZ.sp)(t);if(a)return(0,an.Yl)(e,{block:a})}),ef=(0,I.d4)(e=>!!k&&(0,t3.A)(e,k)),eb=(({shortcutInfo:e,hermesLinkTriggerUIContext:t,isSectionMenu:a})=>{let n=(0,tW.I)({shortcutInfo:e,hermesLinkTriggerUIContext:t}),r=(0,tV.K)({shortcutInfo:e}),i=(0,tG.r)({shortcutInfo:e,hermesLinkTriggerUIContext:t}),l=(0,tq.w)({shortcutInfo:e,hermesLinkTriggerUIContext:t});return e?[a?r:i,l,n]:[]})({shortcutInfo:e_,hermesLinkTriggerUIContext:(0,n.useMemo)(()=>({location:"canvas",canvasId:(0,t2.l)(et?.channel??"")}),[et?.channel]),isSectionMenu:R}),eg=!(0,X.wL)(O)||(0,X.ZG)(O),ey=(0,I.d4)(tX.N6),eA=k?.isSlackCitation()&&ey||!eg||T?.type===i.EmbeddedObjectType.HYPERLINK&&T.inTitleSection||T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&T.object.type===i.SlackObjectType.GENERIC||T?.type===i.EmbeddedObjectType.SLACK_OBJECT&&ea.VW.has(T.object.type)&&((0,X.aK)(O)||(0,X.sR)(O))||W||q||j||ed,ex=eA||k?.preventCardUnfurlConversion(),eE=useSwitchUnfurlTypeOptionsMenuTemplate({hideSwitchToUrl:eA,hideSwitchToInline:eA,hideSwitchToCard:ex,hideSwitchToEmbed:ex}),eC=useFileOptionsMenuItemTemplate(b),ek=(0,tQ.AB)({memberId:K?.id??"",isCanvasContext:!0}),ev=(0,tQ.TX)({memberId:K?.id??""}),eS=useConvertToCalloutMenuTemplate({embeddedUiData:k}),eI=(0,t0.A)(),ew=(0,tJ.u)(_),eT=(0,m.j)(x);return(0,n.useCallback)(()=>{let n,r,i,l,s,c,m,u,_,b,g,x,I,w,T,P;if(!k||!E)return o.Ml;R&&(n=(0,D.k)({embeddedUiData:k,dispatch:p,windowRef:h,slackFileId:v}),r=getParagraphStyleMenuItemTemplate({embeddedUiData:k,sectionType:S,keyboardLocale:ee}),I=(0,tK.e)({embeddedUiData:k}),w=getTableSectionMenuItemsTemplate({embeddedUiData:k}),I?.length||w.length||(i=getAddColumnMenuItemTemplate({embeddedUiData:k})),P=getCalloutBackgroundColorMenuItemTemplate({embeddedUiData:k}),l=getMoveLineMenuItemTemplate({embeddedUiData:k,sectionType:S}),s=(0,M.a)({embeddedUiData:k,sectionType:S}),g=getLastEditedMenuItemTemplate({embeddedUiData:k,disabled:N||!V||!(0,X.mW)(B),onClick:()=>v&&p((0,ai.A)({fileId:v,isFromHuddle:ew}))})),K&&(c=getViewProfileMenuItemTemplate({member:K,dispatch:p}),m=getCopyNameMenuItemTemplate({member:K,memberName:$})),O&&!j&&(u=getViewRawMenuItemTemplate({file:O}),T=getSwitchListViewItemTemplate({file:O,unfurlTypeResult:f,embeddedUiData:k,teamId:E.id,unfurlType:y}),_=getOpenInNewWindowMenuItemTemplate({file:O,dispatch:p})),z&&(b=(0,e2.a)({unfurledMessage:z,dispatch:p,showItem:eI})),Y&&e_&&(x=eb);let L=(0,tL.b)({embeddedUiData:k}),F=(0,tn.y)({embeddedUiData:k}),U=getCopyObjectMenuItemTemplate({embeddedUiData:k}),H=(0,e4.p)({file:O,embeddedUiData:k,dispatch:p,isShortcutUnfurl:Y,isMessageUnfurl:Q,isMessagePermalink:ef,listViewId:G,salesforceRecord:ei,channelSectionId:eo}),W=getEditLinkDetailsMenuItemTemplate({embeddedUiData:k,unfurlType:y}),q=getReportSectionMenuTemplate({embeddedUiData:k,team:C,reportToSlackEnabled:A}),Z=getRemoveSectionMenuTemplate({sectionType:S,embeddedUiData:k}),J=getRefreshLinkMenuItemTemplate({salesforceRecord:ei,dispatch:p});ed&&J&&(J.show=!1);let et=getOpenSalesforceRecordMenuItemTemplate({dispatch:p,salesforceRecord:ei});return(e&&ek&&(ek.show=!1),t&&b&&(b.show=!1),a&&H&&(H.show=!1),(0,X.Hn)(O))?o.Ml:[n,L,F,{type:d.A.separator,key:"separator-0",dataQa:"separator-0",show:n?.show||F?.show||L?.show},r,{type:d.A.separator,key:"separator-1",show:r?.show},eT,{type:d.A.separator,key:"separator-2",show:eT?.show},eE,J,{type:d.A.separator,key:"separator-3",show:eE?.show||J?.show},l,W,s,{type:d.A.separator,key:"separator-4",show:l?.show||W?.show||s?.show},...I??[],...w??[],{type:d.A.separator,key:"separator-5",show:I?.some(e=>e.show)||w?.some(e=>e.show)},P,eS,c,ek,m,ev,{type:d.A.separator,key:"separator-6",show:P?.show||eS?.show||c?.show||ek?.show||m?.show||ev?.show},_,U,i,T,eC,u,H,et,eh,b,q,{type:d.A.separator,key:"separator-7",show:eC?.show||U?.show||_?.show||i?.show||u?.show||H?.show||b?.show||q?.show||T?.show||et?.show},...x||[],{type:d.A.separator,key:"separator-8",dataQa:"separator-8",show:x?.some(e=>e.show)},Z,{type:d.A.separator,key:"separator-9",dataQa:"separator-9",show:Z?.show},g].filter(e=>!!e?.show)},[k,E,R,eo,K,O,j,z,Y,e_,p,Q,ef,G,ei,y,C,A,S,e,ek,t,a,eE,ev,eS,eC,h,v,ee,N,V,B,ew,$,f,eI,eb,eT,eh,ed])}EmbeddedMenu.displayName="EmbeddedMenu";let al=EmbeddedMenu},0xd7b35c2f:(e,t,a)=>{"use strict";a.d(t,{f:()=>r,i:()=>i});var n=a(0x139951ee1);let r=n.p5.RecordCrud,i=n.Xx.Full},0x996114a6:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x224f7f0e9),c=a(0x11a296110),d=a(0x1d2cd7755),m=a(0x126f22530),u=a(0x210cf696f),p=a(0x2501a2cee),h=a(0xa089d16d),_=a(0x14cd316f9),f=a(0x2301c802e),b=a(0x1b3ecb90f),g=a(0x1faaed399),y=a(0x235ff1eab),A=a(0xa5d8361b),x=a(0x226892387);let E=new o.Ay("embedded_unfurl_in_hovercard");function EditView({url:e,updateEditStatus:t,showRemoveLinkButton:a}){let i=(0,n.useRef)(),{embeddedUiData:o,embeddedUIContainerElement:C}=(0,n.useContext)(f.N),k=o?.contextType(),v=o?.embeddedObject().type,S=v!==r.EmbeddedObjectType.HYPERLINK,I=v===r.EmbeddedObjectType.HYPERLINK,w=o?.associatedInlineEntityDisplayInfo(),T=w?.context!==r.EmbeddedUiContext.VARIABLE_EDIT_POPOVER?w?.faviconUrl:"",N=(0,n.useCallback)(()=>{o?.performAction({action:r.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:r.CollabPopoverDismissSource.ANY})},[o]),M=(0,n.useCallback)(()=>{o?.performAction({action:r.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:r.CollabPopoverDismissSource.ON_MOUSE_LEAVE})},[o]),R=(0,n.useCallback)(()=>{o?.performAction({action:r.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[o]),[P,L]=(0,n.useState)(w?.context!==r.EmbeddedUiContext.VARIABLE_EDIT_POPOVER?w?.displayLabel??"":""),[O,D]=(0,n.useState)(e),[F,U]=(0,n.useState)(w?.context!==r.EmbeddedUiContext.VARIABLE_EDIT_POPOVER?w?.leadingEmoji??"":""),B=(0,n.useCallback)((e,t)=>{U(t)},[]),H=(0,n.useCallback)(e=>{L(e),k===r.EmbeddedUiContext.HYPERLINK_INSPECTOR_TOOLBAR&&o?.performAction({action:r.EmbeddedUiAction.ON_LINK_INSPECTOR_INPUT_CHANGE,url:O})},[k,o,O]),W=(0,n.useCallback)(e=>{D(e),k===r.EmbeddedUiContext.HYPERLINK_INSPECTOR_TOOLBAR&&o?.performAction({action:r.EmbeddedUiAction.ON_LINK_INSPECTOR_INPUT_CHANGE,url:e})},[k,o]),V=(0,x.d4)(e=>T?(0,y.Ay)(e,{url:T}):null),getEmojiOrIcon=()=>{let e=n.createElement(p.Ah,{name:"globe",size:"20"});return F?e=n.createElement(b.Ay,{text:`:${F}:`,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:b.lw.MEDIUM,forceDisplay:!0}):T&&V&&(e=n.createElement(h.A,{src:V,alt:V,height:20,width:20})),n.createElement(g.A,{onEmojiSelected:B,onClick:N,onClose:M},n.createElement("div",{className:"p-embedded_link_editor__edit_view__title__container__image"},e,n.createElement(p.Ah,{name:"caret-down",size:"20"})))};getEmojiOrIcon.displayName="getEmojiOrIcon";let G=(0,n.useCallback)(()=>{R(),t(!1)},[R,t]),q=(0,n.useCallback)(()=>{o?.performAction({action:r.EmbeddedUiAction.UPDATE_INLINE_ENTITY_DISPLAY_INFO,updatedInfo:{context:o.contextType(),displayLabel:P,leadingEmoji:F,url:O}}),G()},[o,P,F,O,G]),j=(0,n.useCallback)(()=>{o?.performAction({action:r.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[o]),z=(0,n.useCallback)(t=>{let a=t.trim();return!!a&&(a===e||(0,A.A)(a,{allowNoTLD:!0}))},[e]),K=(0,n.useCallback)(e=>{e.which===s.Fm&&(q(),e.preventDefault())},[q]),$=(0,n.useCallback)(()=>{i.current?.focus()},[]);return(0,n.useEffect)(()=>{if(C)return(0,_.LR)(C,$),()=>(0,_.xB)(C)},[C,$]),n.createElement("div",{className:"p-embedded_link_editor__edit_view"},n.createElement(d.A,{text:E.t("Display as"),htmlFor:"unfurl-edit-form-add-title"},n.createElement("div",{className:"p-embedded_link_editor__edit_view__title__container"},S&&getEmojiOrIcon(),n.createElement("div",{className:l()("p-embedded_link_editor__edit_view__title__container__input",{"p-embedded_link_editor__edit_view__title__container__input--has-leading-emoji":S})},n.createElement(m.A,{name:"unfurl-edit-form-add-title",id:"unfurl-edit-form-add-title",value:P,placeholder:E.t("Ex. Project tracker",{fallbackHash:"3da4c8f4772bc0fafd0d53da7f3dfbf092494608",fallbackHashNs:"bookmarks-bar"}),onChange:H,onFocus:M,onBlur:R,size:"medium",onKeyDown:K,minCharacterLimit:1,isRequired:!0,useInlineAlert:!0})))),n.createElement(d.A,{text:E.t("URL",{fallbackHash:"d0517071aa376e797705058bbad4b658954b9930",fallbackHashNs:"bookmarks-bar"}),htmlFor:"unfurl-edit-form-add-link"},n.createElement(m.A,{inputRef:i,name:"unfurl-edit-form-add-link",id:"unfurl-edit-form-add-link",value:O,placeholder:"https://docs.acme.com",onChange:W,size:"medium",onKeyDown:K,onFocus:M,onBlur:R,readOnly:!I,isDisabled:!I,useInlineAlert:!0,isRequired:!0,focusOnMount:!0,forceSelectAll:!0})),n.createElement("div",{className:"p-embedded_link_editor__edit_view__footer"},a&&n.createElement(u.A,{onClick:j,className:"p-embedded_link_editor__edit_view__remove_button"},E.t("Remove Link",{fallbackHash:"8d48d1f9e74c4fecd89a67645ca3593ef0964710",fallbackHashNs:"composer"})),n.createElement(c.Nm,{onClick:G,className:"p-embedded_link_editor__edit_view__cancel_button"},E.t("Cancel",{fallbackHash:"77dfd2135f4db726c47299bb55be26f7f4525a46",fallbackHashNs:"bookmarks-bar"})),n.createElement(c.lV,{onClick:q,type:"primary",disabled:!P||!z(O),size:"small","aria-label":E.t("Save",{fallbackHash:"efc007a393f66cdb14d57d385822a3d9e36ef873",fallbackHashNs:"bookmarks-bar"})},E.t("Save",{fallbackHash:"efc007a393f66cdb14d57d385822a3d9e36ef873",fallbackHashNs:"bookmarks-bar"}))))}EditView.displayName="EditView";let C=EditView},0x23a917941:(e,t,a)=>{"use strict";a.d(t,{A:()=>U});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x2501a2cee),c=a(0x1fdec3e16),d=a(0x21cf37dc6),m=a(0x339b339c),u=a(0x6cc5eee0),p=a(0x2043404b0),h=a(0xb22ff273),_=a(0x99192caa),f=a(0xe8a88a4c),b=a(0x118f9742a),g=a(0x7fbb7bb1),y=a(0x1991a9b6d),A=a(0x19a6a6f6a),x=a(0x13f156700),E=a(0xa0337198),C=a(0x10cd505f3),k=a(0x21d6ed371),v=a(0x1337d9fa2),S=a(0x213178298),I=a(0x4165455),w=a(0x94e8342),T=a(0x1c7cb6e50),N=a(0x6d72337),M=a(0x9b971e7e),R=a(0x226892387),P=a(0x1ee439e69);let L=new o.Ay("files");var O=((n=O||{})[n.NARROW=0]="NARROW",n[n.REGULAR=1]="REGULAR",n[n.WIDE=2]="WIDE",n);let D=new Map([[0,{maxLines:2,blockLimit:2,maxChars:190}],[1,{maxLines:4,blockLimit:3,maxChars:300}],[2,{maxLines:9,blockLimit:4,maxChars:680}]]),F={small:"50%",medium:"85%",large:"100%"};function MessageContent({message:e,unfurl:t,containerClassName:a}){let n=!t&&!(0,k.ow)(e)&&(0,k.xh)(e),i=(0,R.d4)(e=>(0,P._J)(e,(0,M.ZT)(e))),o=(0,k.Cc)(e,i),O=(0,R.Z2)(t=>e?(0,S.t)(t,e):void 0),U=(0,r.useCallback)(a=>{let i,{maxLines:l,blockLimit:g,maxChars:S}=D.get(a),M=(0,I.Tr)(t);if(o)i=r.createElement(r.Fragment,null,r.createElement("div",{className:"p-embedded_message_content--warning_icon"},r.createElement(s.Ah,{name:"info",size:"16"})),r.createElement(x.k,{reason:"canvas-message-unfurl-limited"}));else if(t?.msg_subtype==="huddle_thread"&&t?.channel_id)i=r.createElement(b.A,{roomId:t?.room?.id,channelId:t.channel_id,canvasUpdateSectionIds:e?.canvas_update_section_ids});else if(e&&(0,v.cb)(e))i=r.createElement(f.g,{msg:e});else if(e&&(0,v.Ni)(e))i=r.createElement(_.z,{msg:e});else if(e&&(0,k._t)(e))i=r.createElement(h.X,{msg:e});else if(e&&(0,v.gA)(e))i=r.createElement(E.A,{msg:e});else if(e&&(0,v.Lo)(e))i=r.createElement(C.d,{msg:e});else if(M&&(0,w.A)(M,!1)){let e=M[0].elements||[];i=t?.from_url!==t?.original_url?(0,N.dK)({...(0,T.A)(t),hideBorder:!0,showDelete:!1,service:t?.bot_id,messageTs:t?.ts,activeChannelId:t?.channel_id}):r.createElement(p.A,{elements:e,maxLines:l,maxChars:S,dimmedUserIds:O})}else if(e&&(0,k.xS)(e)){let t=e.blocks;if(t&&(0,w.A)(t,!1)){let e=t[0].elements||[];i=r.createElement(p.A,{elements:e,maxLines:l,maxChars:S})}else i=r.createElement(y.A,{msg:e,blockLimit:g})}else if((0,I.q4)(t))i=r.createElement(u.A,{text:(0,I.q4)(t),maxCharacters:S,maxNewlines:l});else if((0,I.zb)(t))i=r.createElement(c.A,{lines:l,breakWords:!1},(0,I.zb)(t));else if(n)i=r.createElement(r.Fragment,null,L.t("You don\u2019t have access to this private message."));else if(e&&(0,k.mb)(e))i=r.createElement(b.A,{roomId:e.room_id,channelId:e.channel,canvasUpdateSectionIds:e.canvas_update_section_ids});else if(e&&(0,k.P5)(e))i=r.createElement(A.A,{msg:e});else if(e&&(0,k.NL)(e)){let t=(0,k.If)(e)[0],a=t.bot_id||e.bot_id;i=(0,N.dK)({...(0,T.A)(t),hideBorder:!0,showDelete:!1,service:a,messageTs:e.ts,activeChannelId:e.channel})}else i=t?.files?.length||(0,k.YQ)(e)?null:r.createElement(r.Fragment,null,r.createElement(m.A,{sizes:F,size:d.o.Large}),r.createElement(m.A,{sizes:F,size:d.o.Medium}));return i},[e,n,t,O,o]);return r.createElement(g.A,null,({width:e,measureRef:t})=>{let i=2;return e<300?i=0:e<500&&(i=1),r.createElement("div",{ref:t,className:l()("p-embedded_message_content",a,{"p-embedded_message_content--private":n&&!o,"p-embedded_message_content--limited-history-msg":o}),"data-qa":"embedded_message_content"},U(i))})}MessageContent.displayName="MessageContent";let U=MessageContent},0x17627b24f:(e,t,a)=>{"use strict";a.d(t,{t:()=>l});var n=a(0xbad225b5),r=a(0x1346d4ed0),i=a(0x3796a18c);let l=n.memo(({fileIds:e})=>e.length?n.createElement("div",{className:"p-embedded_message_unfurl__channel_footer","data-qa":"embedded_message_footer"},e.map(e=>n.createElement(r.A,{key:e,id:e,detailType:i.s.NONE,className:"p-embedded_message_unfurl__channel_footer__file_entity"}))):null)},0xf297aec1:(e,t,a)=>{"use strict";a.d(t,{A:()=>V});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1535e80f3),s=a(0x15e39ab9e),c=a(0x2501a2cee),d=a(0x1fdec3e16),m=a(0x1ec256990),u=a(0x111061bc6),p=a(0x247cf31a2),h=a(0x1d3efd4ea),_=a(0xdc1367a8),f=a(0x2376ea9bb),b=a(0x5d73d2a4),g=a(0x2301c802e),y=a(0x87f7e0b5),A=a(0xa361c357),x=a(0x17fc991d0),E=a(0xca4f3cec),C=a(0x170214077),k=a(0x6792c5b4),v=a(0x1f4fd9824),S=a(0x10027d8bc),I=a(0xaf13bc6a),w=a(0x21d6ed371),T=a(0xd3813463),N=a(0x1b0a362c3),M=a(0xa88049da),R=a(0x1781c9bc2),P=a(0x158809687),L=a(0x1337d9fa2),O=a(0x24558b75f),D=a(0x9b971e7e),F=a(0x241b6d551),U=a(0x226892387),B=a(0x217553e42),H=a(0xd93ecf94),W=a(0xb9f80e40);function MessageHeader({ts:e,channelId:t,unfurl:a,containerClassName:i,hideChannel:V=!1,hideTimeStamp:G}){let{embeddedUiData:q}=(0,n.useContext)(g.N),j=(0,U.d4)(a=>(0,H.Ld)(a,t,e)),z=(0,U.d4)(e=>(0,B.OL)(e,t)),K=(0,r.wA)(),$=(0,U.Z2)(e=>j?(0,M.A)(e,j):null),Y=(0,N.L)(j)??a?.thread_ts,Q=!(0,w.ow)(j)&&!(0,w.xh)(j),Z=(0,U.d4)(S.ZV),J=(0,U.d4)(S.gT),X=(0,U.d4)(D.Kc),ee=a?.from_url!==a?.original_url,et=ee?void 0:a?.author_id,ea=ee?void 0:a?.bot_id,en=ee?void 0:a?.author_name,er=$?.userId??et;j?.document_comment?.authors&&(er=j?.document_comment?.authors[0]);let ei={authorId:er,botId:$?.botId??ea,username:$?.username??en},el=!!(ei.authorId||ei.botId||j?.icons||j?.bot_profile),eo=!!(ei.authorId||ei.botId||ei.username||j?.bot_profile),es=(0,U.d4)(e=>j?(0,R.A)(e,j):q.objectUrl()),ec=(0,U.d4)(a=>(0,T.A)(a,{ts:e,channelId:t})),ed=(0,n.useCallback)(a=>{Q&&(0,O.Cz)(a)&&(ec||(0,P.n)(j))?K((0,W.O)({channelId:t,threadTs:Y??e,requestFocus:!0,shouldOpenInTile:!0,highlightTs:e})):Q&&K((0,F.A)({permalink:es})),Q&&a.preventDefault()},[ec,t,K,Q,j,es,Y,e]),em=(0,n.useMemo)(()=>{let e;return(V?e=null:(0,p.k)(z)?e=n.createElement(p.A,{channel:z,className:"p-embedded_message_header__secondary_channel_name"}):j?e=n.createElement(x.A,{msg:j,className:"p-embedded_message_header__secondary_channel_name"}):a&&(e=n.createElement(n.Fragment,null,n.createElement(c.Ah,{name:"channel"}),a.channel_name)),Q&&e&&Q)?n.createElement(s.A,{href:es,onClick:ed,className:"p-embedded_message_header__secondary__inline_channel_link"},e):e},[z,V,Q,j,ed,es,a]),eu=el?n.createElement(m.A,{userId:ei.authorId,botId:ei.botId,icons:j?.icons,botProfile:j?.bot_profile,size:o.RG.medium,showTooltip:!0,ariaHidden:"true",tabIndex:-1}):n.createElement(h.A,{size:o.RG.medium}),ep=eo?n.createElement(v.A,{userId:ei.authorId,username:ei.username,botId:ei.botId,botProfile:j?.bot_profile}):n.createElement(_.A,{type:"non-existent",className:"p-embedded_message_unfurl__missing_member"});return j&&(0,w.mb)(j)&&(eu=n.createElement(A.A,{msg:j,size:o.RG.medium}),ep=n.createElement(E.A,{msg:j})),j&&(0,L.cb)(j)&&(eu=n.createElement(b._,null),ep=n.createElement(E.A,{msg:j})),j&&(0,L.Ni)(j)&&(eu=n.createElement(b._,null),ep=n.createElement(E.A,{msg:j})),j&&((0,L.gA)(j)||(0,L.Lo)(j))&&(eu=n.createElement(I.V,null),ep=n.createElement(E.A,{msg:j})),j&&(0,w.ZO)(j)&&Z&&(eu=n.createElement(f.A,{id:X,size:o.RG.medium}),ep=n.createElement(E.A,{msg:j})),j&&(J&&(0,w.tH)(j)||(0,L.AZ)(j))&&(eu=n.createElement(u.u,{size:o.RG.medium}),ep=n.createElement(E.A,{msg:j})),n.createElement(k.A,{light:eu,className:l()("p-embedded_message_header",i)},n.createElement("div",{"data-qa":"embedded_message_header_sender"},ep),n.createElement("div",{className:"p-embedded_message_header__secondary"},n.createElement(d.A,{lines:1,breakWords:!1},n.createElement(y.A,{separator:em?" | ":void 0},em,j&&!G&&n.createElement(C.A,{msg:j,full:!0,clickable:Q,onClick:ed})))))}MessageHeader.displayName="MessageHeader";let V=MessageHeader},0x248a07e73:(e,t,a)=>{"use strict";a.d(t,{A:()=>ExpandMoreButton});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11a296110);let l=new r.Ay("files");function ExpandMoreButton({onCollapse:e,isCollapsed:t}){let a=t?l.t("Show all"):l.t("Show less");return n.createElement("div",{className:"p-embedded_expand_more_button_container",onClick:e,role:"toolbar","aria-label":a},n.createElement(i.Nm,{className:"p-embedded_expand_more_button_container_show_more_button",onClick:e,"aria-label":a},a))}ExpandMoreButton.displayName="ExpandMoreButton"},0x249ce209d:(e,t,a)=>{"use strict";a.d(t,{h:()=>L,A:()=>useEmbeddedUnfurlType});var n,r=a(0xbad225b5),i=a(0xc26f5c40),l=a(0x226892387),o=a(0xd93ecf94),s=a(0x59ac6c23);function useFirstEphemeralMessage(e){let t=e?.channel,a=e?.ts,n=(0,l.d4)(e=>a?(0,s.z5)(e,a):null);return(0,l.d4)(e=>t&&n?(0,o.Ld)(e,t,n[0],!0):null)}var c=a(0x1b89a091f),d=a(0x1d798e7d1),m=a(0x1ccef1c6f);function useUnfurlErrorState(e){let t=(0,l.d4)(e=>(0,m.ty)(e,"expand_inline_imgs")),a=(0,l.d4)(e=>(0,m.ty)(e,"expand_non_media_attachments")),n=e?(0,d.q)(e):void 0;if(!t&&!a)return c.VR.HIDE_IMG_AND_CONTENT;let r=e?.document_unfurl?.canvas_unfurl_state;if(r&&!n||r===c.VR.ALL_LINKS_FROM_DOMAIN||r===c.VR.ALL_LINKS_UNDER_PATH||r===c.VR.EXACT_LINK_BLOCKED)return r}var u=a(0x249159109),p=a(0x1aba66b56),h=a(0x20b4dda68);function shouldRenderPublicLinkCard(e){let{blocks:t,fallbackToLegacy:a,serviceName:n,listRecord:r,isAppUnfurl:i,videoHtml:l,audioHtml:o,text:s,title:c,callbackId:d}=e;return"twitter"===n||!(t&&!a||t&&a&&(0,u.A)(t,e=>!!h.WP[e.type])||"salesforce"===n||"slackhelp"===n||e.isMsgUnfurl||r||i||o||l||!c&&!s||(0,p.A)(["tractorWorkspaceSetupComplete","teamcreatorprivacysettings","slackbotresponse_button","pending_scsc_trigger_scdm","slackbot_sms_download_app_button","slack_connect_switch_workspaces","slackbotAddUserToMpdm"],d))}let _="slack-shortcut:";function parseSlackShortcutUnfurlId(e){if(!e.startsWith(_))return null;let t=e.substring(_.length).split("-");if(t.length<2)return null;let[a,n,r]=t;return{channelId:a,id:n,theme:r}}var f=a(0x2301c802e),b=a(0x18def662b),g=a(0x24f705a4f),y=a(0x22d51fee8),A=a(0x19d55d0e1),x=a(0x20679dcfc),E=a(0x6e20c837),C=a(0x144561e68),k=a(0x207eb3801),v=a(0x4165455),S=a(0x1c7cb6e50),I=a(0x108363d6d),w=a(0x12c77e45),T=a(0x16e65360b),N=a(0xf3719a28),M=a(0x1cf0d97e1),R=a(0x217553e42);let P=(0,M.Ay)((e,t,a)=>{let n=(0,R.OL)(e,t),{fileId:r}=(0,N.H)(n,a);return r&&(0,x.p)(r)});P.meta={name:"getFileChannelIdForChannelId",key:"createSelectorGetFileChannelIdForChannelId",description:(e,t,a)=>{let n=(0,R.OL)(e,t),{fileId:r}=(0,N.H)(n,a);return r&&(0,x.p)(r)}};var L=((n={}).FILE_UPLOAD="file_upload",n.FILE="file",n.CANVAS="canvas",n.USER="user",n.MESSAGE="message",n.PLATFORM_LINK_TRIGGER="platform_link_trigger",n.SHORTCUT_BUTTON="shortcut_button",n.EPHEMERAL_MESSAGE="ephemeral_message",n.PUBLIC_LINK="public_link",n.FALLBACK="fallback",n.EMPTY="empty",n.GENERIC="generic",n.WIDGET="widget",n.SLACK_LIST="slack_list",n.SLACK_LIST_RECORD="slack_list_record",n.SALESFORCE_RECORD="salesforce_record",n.WORK_OBJECT="work_object",n.CHANNEL="channel",n.SHARE_PROMPT_BUTTON="share_prompt_button",n.CHANNEL_SECTION="channel_section",n);function useEmbeddedUnfurlType(){let{embeddedUiData:e}=(0,r.useContext)(f.N),t=e?.embeddedObject(),a=t?.type===i.EmbeddedObjectType.SLACK_OBJECT?t.object:null,n=(0,l.d4)(y.N6),s=a?.type===i.SlackObjectType.UNFURL||a?.type===i.SlackObjectType.MESSAGE&&n,c=s?a.channelId:"",m=(0,l.d4)(e=>!!c&&(0,A.OR)(e,c)),u=(0,l.d4)(e=>s?(0,o.Ld)(e,c,a.id,!1):null),p=u?(0,d.q)(u):void 0,h=p?.original_url?p.original_url.toString():e?.objectUrl()??"",_=(0,l.Z2)(e=>(0,E.$N)(e,h)),N=(0,l.d4)(e=>_?.type===E.im.CHANNEL_CANVAS?P(e,_.channelId??c,!0):_?.channelId),M=(0,x.l)(N??""),R=useFirstEphemeralMessage(u),L=useUnfurlErrorState(u),O=(0,l.d4)(b.aL);return(0,r.useMemo)(()=>{let e={isUnfurlOrMessageObject:s,attachment:p,fileChannelMessage:u,firstEphemeralMessage:R,unfurledUrl:h,parsedPermalink:_};if(t?.type===i.EmbeddedObjectType.INVITED_USER)return{...e,unfurlType:"empty"};if(a?.type===i.SlackObjectType.PENDING_URL&&a.placeholderDetails&&a.placeholderDetails.isSlackList){let{viewId:t}=_||{};return{...e,unfurlType:"slack_list",listFileId:a?.id,isLoading:a.placeholderDetails.loading,viewId:t}}if(a?.type===i.SlackObjectType.PENDING_URL&&a.placeholderDetails)return{...e,unfurlType:"file_upload",placeholderDetails:a.placeholderDetails};if(a?.type===i.SlackObjectType.PENDING_URL&&a.incomplete)return{...e,unfurlType:"empty",unfurlErrorState:L};let r=(0,v.n9)(p);if(a?.type===i.SlackObjectType.UNFURL&&r&&!(0,k.XI)(r))return(0,v.qU)(r)?{...e,unfurlType:"work_object"}:{...e,unfurlType:"empty"};let l=u&&!u.document_unfurl?.is_unfurled&&!R||a?.type===i.SlackObjectType.PENDING_URL,o="";if(m&&u?.files?o=u.files[0]:a?.type===i.SlackObjectType.FILE?o=a.id:_?.type===E.im.FILE&&(o=_.fileId),o)return{...e,isLoading:l,unfurlType:"file",fileId:o,fileChannelId:c};if(a?.type===i.SlackObjectType.DOCUMENT||_?.type===E.im.QUIP||_?.type===E.im.CHANNEL_CANVAS){let t,n;return a?.type===i.SlackObjectType.DOCUMENT?({currentThreadId:t,isCreatorView:n}=a,o=a.id):o=_?.fileId?_.fileId:M,{...e,isLoading:l,unfurlType:"canvas",fileId:o,threadId:t,isCreatorView:n}}if(a?.type===i.SlackObjectType.USER||_?.type===E.im.MEMBER){let t=a?.type===i.SlackObjectType.USER?a.id:_?.memberId;if(t)return{...e,unfurlType:"user",memberId:t,memberHasExplicitAccess:a?.type===i.SlackObjectType.USER?a?.memberHasExplicitAccess:void 0}}if(a?.type===i.SlackObjectType.GENERIC)return{...e,unfurlType:"generic",genericId:a.id};if(a?.type===i.SlackObjectType.WIDGET)return{...e,unfurlType:"widget",widgetId:a?.id};if(a?.type===i.SlackObjectType.LIST||_?.type===E.im.LIST&&!_?.recordId){let{viewId:t}=_||{},n=a?.type===i.SlackObjectType.LIST?a?.id:_?.fileId;if(n)return{...e,unfurlType:"slack_list",listFileId:n,viewId:t}}if(a?.type===i.SlackObjectType.LIST_RECORD||_?.type===E.im.LIST&&_?.recordId){let t=a?.type===i.SlackObjectType.LIST_RECORD?a?.listId:_?.fileId,n=a?.type===i.SlackObjectType.LIST_RECORD?a?.id:_?.recordId;if(t&&n)return{...e,unfurlType:"slack_list_record",listFileId:t,recordId:n}}if((0,v.q$)(p)||_?.type===E.im.MESSAGE){let t=_?.ts??p?.ts??"",a=_?.channelId??p?.channel_id??"";if(t)return{...e,isLoading:l,ts:t,channelId:a,unfurlType:"message"}}if(a?.type===i.SlackObjectType.CHANNEL||_?.type===E.im.MESSAGE&&!_?.ts){let t=a?.type===i.SlackObjectType.CHANNEL?a?.id:_?.channelId;if(t)return{...e,channelId:t,unfurlType:"channel"}}if((0,T.B)(p)||_?.type===E.im.SHORTCUT_LINK_TRIGGER){let t=(0,g.sp)(p);return{...e,isLoading:l,unfurlType:"platform_link_trigger",shortcutBlock:t,fileChannelId:c}}let d=a?parseSlackShortcutUnfurlId(a.id):null;if(d)return{...e,unfurlType:"shortcut_button",shortcut:d,fileId:o};if(!p&&R)return{...e,unfurlType:"ephemeral_message"};if(a?.type===i.SlackObjectType.SALESFORCE_RECORD){let t=(0,C.E)(a?.id),n=a.fieldApiName||a.fieldLabel,{includeFieldLabel:r}=a;if(t)return{...e,unfurlType:"salesforce_record",recordId:t,...n&&{fieldLabel:n},...void 0!==r&&{includeFieldLabel:r}}}if(a?.type===i.SlackObjectType.MESSAGE&&n)return{...e,unfurlType:"message",ts:a.id,channelId:a.channelId,isLoading:l};if(a?.type===i.SlackObjectType.UNFURL&&r&&(0,k.XI)(r))return{...e,unfurlType:"work_object"};if(!l&&(!u||!p||L))return{...e,unfurlType:"empty",unfurlErrorState:L};if(p&&shouldRenderPublicLinkCard((0,S.A)(p)))return{...e,isLoading:l,unfurlType:"public_link"};if((0,w.GD)(p)&&_?.type===E.im.SHARED_PROMPT){let t=(0,w.yC)(p);return{...e,isLoading:l,unfurlType:"share_prompt_button",promptBlock:t,messageChannelId:c}}if(O&&(0,I.ui)(p)&&_?.type===E.im.CHANNEL_SECTION){let t=(0,I.if)(p);return{...e,isLoading:l,unfurlType:"channel_section",channelSetBlock:t}}return{...e,isLoading:l,unfurlType:"fallback"}},[s,p,u,R,h,_,a,m,L,c,M,t,O,n])}},0x20a401c86:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x2301c802e),l=a(0x41d73207),o=a(0x7cdf00a5),s=a(0xbd3de346),c=a(0xef0063c1),d=a(0x1755a8d3c),m=a(0x1d1f3cf82),u=a(0x226892387);let __WEBPACK_DEFAULT_EXPORT__=()=>{let{embeddedUiData:e}=(0,n.useContext)(i.N),t=e?.embeddedObject(),a=t?.type===r.EmbeddedObjectType.SLACK_OBJECT&&t.object.type===r.SlackObjectType.GENERIC,p=(0,u.d4)(e=>t?.type===r.EmbeddedObjectType.SLACK_OBJECT&&t?.object.type===r.SlackObjectType.UNFURL&&(0,m.A)(e,t?.object)),h=(0,u.d4)(e=>(0,d.A)(e,t)),_=(0,u.d4)(t=>e?(0,c.Ay)(t,e):null);switch(t?.type){case r.EmbeddedObjectType.SLACK_OBJECT:switch(t?.object.type){case r.SlackObjectType.USER:return o.r.USER_UNFURL;case r.SlackObjectType.FILE:if((0,s.sJ)(_))return o.r.IMAGE;if((0,s._y)(_))return o.r.VIDEO_CLIP;if((0,s.pI)(_))return o.r.AUDIO_CLIP;return o.r.FILE;case r.SlackObjectType.DOCUMENT:return o.r.CANVAS_UNFURL;case r.SlackObjectType.LIST:return o.r.LIST;case r.SlackObjectType.UNFURL:if(h)return o.r.SHORTCUT_UNFURL;if(p)return o.r.MESSAGE_UNFURL;if(a)return o.r.GENERIC;return o.r.PUBLIC_LINK_UNFURL;default:return o.r.UNFURL}case r.EmbeddedObjectType.TEXT:return(0,l.Zq)(e?.blockStyle()??r.DocBlockStyle.PLAIN)??o.r.PARAGRAPH;case r.EmbeddedObjectType.TITLE:return o.r.TITLE;case r.EmbeddedObjectType.DIVIDER:return o.r.DIVIDER;case r.EmbeddedObjectType.TABLE:return o.r.TABLE;case r.EmbeddedObjectType.CALLOUT:return o.r.CALLOUT;case r.EmbeddedObjectType.BLOCKQUOTE_LAYOUT:return o.r.BLOCKQUOTE_LAYOUT;default:return o.r.UNKNOWN}}},0x16a71850f:(e,t,a)=>{"use strict";a.d(t,{y:()=>useInitialLoadTracing});var n=a(0xbad225b5),r=a(0xbe0b63ff);function useInitialLoadTracing(e,t,a){let[i,l]=(0,n.useState)(()=>e?.startSpan(t));(0,n.useEffect)(()=>{i&&!a.some(e=>(0,r.mX)(e))&&(i.close(),l(void 0))},[i,...a])}},0xfc03231f:(e,t,a)=>{"use strict";a.d(t,{A:()=>u,e:()=>getTableSelectionMenuItemsTemplate});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x20482ad21),l=a(0x99233ecb),o=a(0x133aaa7da),s=a(0x2501a2cee),c=a(0x2301c802e);let d=new i.Ay("canvas-tables"),m="separator-table-selection-options";function TableSelectionMenu(){let{embeddedUiData:e}=(0,n.useContext)(c.N),t=(0,n.useCallback)(()=>e?.performAction({action:r.EmbeddedUiAction.DISMISS_POPOVER}),[e]),a={width:"auto",stripTerminalSeparators:!0,onMenuItemSelected:t,onTriggerClose:t,"aria-label":d.t("Table options")},i=(0,n.useMemo)(()=>getTableSelectionMenuItemsTemplate({embeddedUiData:e}),[e]);return i.length&&e&&!e.isReadOnly()?n.createElement(l.a,{...a,template:i}):null}function getTableSelectionMenuItemsTemplate({embeddedUiData:e}){if(!e)return[];let{rowOptions:t,columnOptions:a,allowedSelectionActions:i}=e.tableSelectionOptions()??{},getKey=(e,t)=>`table_${e}_${t}`,actionForModification=t=>()=>e.performAction({action:r.EmbeddedUiAction.MODIFY_TABLE,modification:t}),icon=e=>n.createElement(s.Ah,{name:e,size:"18"}),l=[{key:getKey("row","insert_before"),dataQa:getKey("row","insert_before"),label:d.t("Insert row above"),show:!!t,disabled:t&&!t.insertionEnabled,click:actionForModification({part:r.TablePart.ROW,type:r.TablePartModificationType.INSERT_BEFORE}),icon:icon("arrow-up")},{key:getKey("row","insert_after"),dataQa:getKey("row","insert_after"),label:d.t("Insert row below"),show:!!t,disabled:t&&!t.insertionEnabled,click:actionForModification({part:r.TablePart.ROW,type:r.TablePartModificationType.INSERT_AFTER}),icon:icon("arrow-down")},{key:getKey("column","insert_before"),dataQa:getKey("column","insert_before"),label:d.t("Insert column left"),show:!!a,disabled:a&&!a.insertionEnabled,click:actionForModification({part:r.TablePart.COLUMN,type:r.TablePartModificationType.INSERT_BEFORE}),icon:icon("arrow-left")},{key:getKey("column","insert_after"),dataQa:getKey("column","insert_after"),label:d.t("Insert column right"),show:!!a,disabled:a&&!a.insertionEnabled,click:actionForModification({part:r.TablePart.COLUMN,type:r.TablePartModificationType.INSERT_AFTER}),icon:icon("arrow-right")}],c=[{key:getKey("selection","merge"),dataQa:getKey("selection","merge"),label:d.t("Merge selection",{fallbackHash:"d0da109d829f169258ec351f0e9f613d417ff23d"}),show:i?.has(r.TableSelectionAction.MERGE),click:actionForModification(r.TableSelectionModification.MERGE_CELLS)},{key:getKey("selection","unmerge"),dataQa:getKey("selection","unmerge"),label:d.t("Unmerge selection",{fallbackHash:"6244050c840e764b303fbdd9bc106bd99518f1b0"}),show:i?.has(r.TableSelectionAction.UNMERGE),click:actionForModification(r.TableSelectionModification.UNMERGE_CELLS)}],{hasHeaderRow:u,hasHeaderColumn:p}=e.tableSectionAttributes()??{},h=[{key:getKey("row","toggle_header"),dataQa:getKey("row","toggle_header"),label:d.t("Use header row",{fallbackHash:"e8f4b4e56b417bee2fa0a9ddf7c20fd69d7d9091",fallbackHashNs:"file"}),type:o.A.checkbox,show:t?.toggleHeaderEnabled,checked:u,click:actionForModification(r.FullTableModification.TOGGLE_HAS_HEADER_ROW)},{key:getKey("column","toggle_header"),dataQa:getKey("column","toggle_header"),label:d.t("Use header column",{fallbackHash:"a45916d6544607eaa7f5f2822e239ce225a61da5",fallbackHashNs:"file"}),type:o.A.checkbox,show:a?.toggleHeaderEnabled,checked:p,click:actionForModification(r.FullTableModification.TOGGLE_HAS_HEADER_COLUMN)}],_=t?.numSelected??0,f=a?.numSelected??0,b={key:getKey("selection","clear_contents"),dataQa:getKey("selection","clear_contents"),label:d.t("Clear contents"),show:!!(_||f),disabled:!i?.has(r.TableSelectionAction.CLEAR_CONTENTS),click:actionForModification(r.TableSelectionModification.CLEAR_CONTENTS)},g=[{key:getKey("row","delete"),dataQa:getKey("row","delete"),label:d.t("Delete {rows, plural, =1{row}other{# rows}}",{rows:_}),show:!!t,disabled:t&&!t.deletionEnabled,click:actionForModification({part:r.TablePart.ROW,type:r.TablePartModificationType.DELETE})},{key:getKey("column","delete"),dataQa:getKey("column","delete"),label:d.t("Delete {columns, plural, =1{column}other{# columns}}",{columns:f}),show:!!a,disabled:a&&!a.deletionEnabled,click:actionForModification({part:r.TablePart.COLUMN,type:r.TablePartModificationType.DELETE})}];return[...l,{type:o.A.separator,key:`${m}-insertion`,show:l.some(e=>e.show)},...c,{type:o.A.separator,key:`${m}-merge`,show:c.some(e=>e.show)},...h,{type:o.A.separator,key:`${m}-toggle-header`,show:t?.toggleHeaderEnabled||a?.toggleHeaderEnabled},b,...g].filter(e=>e.show)}TableSelectionMenu.displayName="TableSelectionMenu",getTableSelectionMenuItemsTemplate.displayName="getTableSelectionMenuItemsTemplate";let u=TableSelectionMenu},0x14cd316f9:(e,t,a)=>{"use strict";a.d(t,{LR:()=>setActivationHandler,lu:()=>getActivationHandler,xB:()=>removeActivationHandler});var n=a(0x15279822);let r=new Map;function setActivationHandler(e,t){r.set(e,t)}function getActivationHandler(e){return r.get(e)??(()=>{(0,n.Fp)(e)?.focus()})}function removeActivationHandler(e){r.delete(e)}},0x11046b18:(e,t,a)=>{"use strict";a.d(t,{B:()=>getUnfurlUrlFromMessage});var n=a(0x155d02b1c),r=a(0x1d798e7d1),i=a(0x4165455);function getUnfurlUrlFromMessage(e){let t=(0,r.q)(e),a=(0,i.Su)(t)??(0,i.FN)(t)??e.text?.slice(1,-1);return(0,n.A)(a)}},0x1d798e7d1:(e,t,a)=>{"use strict";a.d(t,{j:()=>IsFileThumbnailAvailableForUnfurlsInCanvas,q:()=>getAttachmentFromMessagePostedToFileChannel});var n=a(0xbd3de346),r=a(0x1abdfd657);function getAttachmentFromMessagePostedToFileChannel(e){return e?.attachments?.[0]}function IsFileThumbnailAvailableForUnfurlsInCanvas(e){let t=(0,n.mN)(e),a="snippet"===(0,r.t)(e);return!!(t||a)}},0x5754e840:(e,t,a)=>{"use strict";a.d(t,{A:()=>B});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x14fad6485),l=a(0x94ea8a62),o=a(0x1860df72f),s=a(0xf5bbd10a),c=a(0xbd3de346),d=a(0xa985ed31),m=a(0x226892387),u=a(0x1a7a2df41),p=a(0xb454ea59),h=a(0x233396a7d),_=a(0x11c82607b),f=a(0x9b971e7e),b=a(0x127cb13be),g=a(0x114605f21),y=a(0xcb8fd068),A=a(0x1cf0d97e1);let x=(0,A.Ay)(e=>e?.listsOpen);x.meta={name:"getListsOpenStoreState",key:"createSelectorGetListsOpenStoreState",description:e=>e?.listsOpen};let E=(0,A.Ay)((e,t)=>(x(e)[t]??0)>0);E.meta={name:"isListOpenForId",key:"createSelectorIsListOpenForId",description:(e,t)=>(x(e)[t]??0)>0};var C=a(0x109246c07),k=a(0x10b691d3),v=a(0x3fb00b9a);let S=6e4*!(0,p.W)(),I={},w=(0,_.Ay)("Mark the user as no longer viewing the file",async(e,t,{fileId:a})=>{let n=await e((0,y.A)({fileId:a,reason:"closeFile"})),r=(0,c.DQ)(n)?await e((0,v.A)({fileId:a,reason:"closeFile"})):void 0;if(r&&(0,C.d0)(t(),r))return;let i=Date.now();await e((0,h.D)({reason:"close-file",fileId:a,lastUpdated:i})),e((0,g.Vj)({fileId:a})),e((0,k.zc)({docId:a}));let l=(0,f.ZT)(t()),o=`${l}-${a}`;I[o]&&clearTimeout(I[o]),I[o]=setTimeout(()=>{r&&(0,C.d0)(t(),r)||(0,c.l7)(n)&&E(t(),a)||(e((0,b.A)({fileId:a})),delete I[a])},S)});w.meta={name:"closeFile",key:"createThunkCloseFile",description:"Mark the user as no longer viewing the file"};var T=a(0x36db9c4e),N=a(0x11cdf8541),M=a(0x19c76d181),R=a(0x3e050aef),P=a(0xe822f938);let L=(0,_.Ay)("Ping the file to mark the user as still viewing it",async(e,t,{fileId:a},n)=>{let r=t(),i=(0,M.WR)(r),{windowId:l}=n(N.C),s=(0,P.su)(r,l)||0,c=(0,P.b0)(r,l)||0,{viewers:d,should_subscribe_and_ping:m}=await e((0,o.$)({reason:"ping-file",fileId:a,isFocused:c>=s}));e((0,g.U5)({fileId:a,viewers:d.map(({user_id:e})=>({userId:e}))}));let p=d.filter(({user_id:e})=>e!==i).map(({user_id:e})=>e);return e((0,k.iT)({docId:a,viewers:p})),e((0,u.J)({fileId:a,isReadOnly:!m})),e(m?(0,R.LA)({fileId:a}):(0,R.a8)({fileId:a})),e((0,R.ps)({fileId:a})),m||e((0,b.A)({fileId:a})),m});L.meta={name:"pingFile",key:"createThunkPingFile",description:"Ping the file to mark the user as still viewing it"};var O=a(0x1ea9156f3),D=a(0x14ea3ce99),F=a(0xbb55f755),U=a(0x24c9085d2);function FileOpenSubscriber({fileId:e,quipThreadId:t}){let{windowRef:a}=(0,n.useContext)(i._0),l=(0,r.wA)(),p=(0,n.useMemo)(()=>(0,d.A)(e),[e]),h=(0,m.d4)(t=>(0,D.Lp)(t,e)),_=(0,s.A)();return(0,n.useEffect)(()=>{let t,n;if(p)return n=Date.now(),l((0,T.T)({fileId:e,lastUpdatedTimeInMs:n})).then(a=>{a&&(t=setInterval(()=>{l(L({fileId:e})).then(e=>{e||clearInterval(t)}).catch(a=>{a.name===o.I.FileNotFound&&clearInterval(t),_.error(a,{fileId:e},{subtype:"canvas"})})},3e4))}),()=>{a.deref()?.requestAnimationFrame(()=>{l(w({fileId:e}))}),l((0,u.J)({fileId:e,isReadOnly:!1})),t&&clearInterval(t)}},[l,e,p,_,a]),(0,n.useEffect)(()=>((0,c.DQ)(h)&&t&&l((0,U.d)({quipThreadId:t})),(0,c.l7)(h)&&l((0,F.m)({listId:e})),((0,c.l7)(h)||(0,c.DQ)(h))&&l((0,O.h)({fileId:e})),()=>{(0,c.DQ)(h)&&t&&l((0,U.F)({quipThreadId:t})),(0,c.l7)(h)&&l((0,F.e)({listId:e}))}),[l,t,h,e]),null}let B=(0,l.A)(FileOpenSubscriber)},0x94ea8a62:(e,t,a)=>{"use strict";a.d(t,{A:()=>withFileId});var n=a(0xbad225b5),r=a(0xa985ed31),i=a(0x107e97a6b);function withFileId(e,t){return function({id:a,showFallbackView:l=!1,...o}){let{fileIdOrQuipThreadId:s}=(0,i.EX)(a);return(0,r.A)(s)?n.createElement(e,{fileId:s,...o}):t&&l?n.createElement(t,{fileId:a,...o}):null}}withFileId.displayName="withFileId"},0xfd00162b:(e,t,a)=>{"use strict";a.d(t,{V:()=>s});var n=a(0x23eb69101),r=a(0x1c760ba43),i=a(0x1cf0d97e1),l=a(0x14ea3ce99),o=a(0x1060f0c84);let s=(0,i.Ay)((e,{fileId:t,tabId:a})=>{if(!t||a!==r.fY.Channel&&a!==r.fY.ChannelCanvas)return!1;let i=(0,l.Lp)(e,t),s=(0,o.k4)(e,t)??i.title_blocks,c=s?.[0]?.elements?.[0]?.elements;if(!c||0===c.length)return!1;if(1===c.length){if("text"===c[0].type)return!(0,n.C)(c[0].text);if("channel"===c[0].type)return!1}return!0});s.meta={name:"showChannelCanvasTitle",key:"createSelectorShowChannelCanvasTitle",description:(e,{fileId:t,tabId:a})=>{if(!t||a!==r.fY.Channel&&a!==r.fY.ChannelCanvas)return!1;let i=(0,l.Lp)(e,t),s=(0,o.k4)(e,t)??i.title_blocks,c=s?.[0]?.elements?.[0]?.elements;if(!c||0===c.length)return!1;if(1===c.length){if("text"===c[0].type)return!(0,n.C)(c[0].text);if("channel"===c[0].type)return!1}return!0}}},0x279547d2:(e,t,a)=>{"use strict";a.d(t,{O:()=>useActiveCommentId,l:()=>useActiveComment});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xc26f5c40),l=a(0x14fad6485),o=a(0xc6a2c86f),s=a(0x139aa1a7),c=a(0x250a952a5),d=a(0xd843ab47),m=a(0x13e6609df),u=a(0x226892387),p=a(0x1ad496a28),h=a(0x19895585a);function useActiveCommentId(){let{getSecondaryView:e}=(0,n.useContext)(d.A),t=(0,u.d4)(e),{viewState:a}=(0,n.useContext)(m.A),r=t?.params?.scrollBehavior??i.OpenCommentScrollBehavior.SCROLL_TO_SECTION,l=t?.viewType===s.D.QuipCommentThread?t?.params?.commentThreadId:a?.uiState?.commentThreadIdToHighlightOverride;return(0,n.useMemo)(()=>({currentlyOpenSlackThreadId:l,behavior:r}),[l,r])}function useActiveComment({docEmbed:e,docEmbedRef:t}){let{windowId:a}=(0,n.useContext)(l._0),{getPrimaryView:m,getSecondaryView:_,activeTab:f}=(0,n.useContext)(d.A),b=(0,u.d4)(m),g=(0,u.d4)(_),y=(0,r.wA)(),{currentlyOpenSlackThreadId:A,behavior:x}=useActiveCommentId(),E=(0,n.useCallback)(()=>{let e=t.current?.docEditor,a=A?x:i.OpenCommentScrollBehavior.NONE;e?.setCurrentlyOpenCommentId(A||"",a)},[A,t,x]);(0,n.useEffect)(E,[E]),(0,c.V)(e,E,c.h.STABLY_RENDERED);let C=(b?.viewType===s.D.Canvas||b?.viewType===s.D.ChannelCanvas)&&g?.viewType===s.D.QuipCommentThread&&b?.params?.scrollBehavior===i.OpenCommentScrollBehavior.SCROLL_TO_SECTION,k=(0,o.A)(C);return(0,n.useEffect)(()=>{!k&&C&&(E(),a&&a!==h.N2?y((0,p.IZ)({childWindowId:a,container:h.mq.Primary,params:{scrollBehavior:i.OpenCommentScrollBehavior.NONE}})):y((0,p.IZ)({windowId:h.N2,container:h.mq.Primary,tab:f,params:{scrollBehavior:i.OpenCommentScrollBehavior.NONE}})))},[C,k,t,A,x,a,y,E,f]),A}},0x5ec2a928:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x226892387),l=a(0xbc72568a),o=a(0x1bc939146);let __WEBPACK_DEFAULT_EXPORT__=()=>{let e=(0,r.wA)(),t=(0,i.d4)(l.sk),a=(0,i.d4)(l.Hf);return(0,n.useEffect)(()=>{e((0,o.Dg)())},[e]),(0,n.useMemo)(()=>({files:t,isFetching:a}),[t,a])}},0x13341683c:(e,t,a)=>{"use strict";a.d(t,{l:()=>useCanvasTemplatePublishCategories});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2501a2cee),l=a(0x13d6152c9),o=a(0x58199183),s=a(0x103721a39),c=a(0x1aba0c452),d=a(0x5175e4da),m=a(0x226892387),u=a(0x5c354532),p=a(0x1ee439e69);let h=new r.Ay("slack-docs"),ListIcon=({iconType:e,teamId:t})=>e===d.I.NONE?n.createElement(i.Ah,{size:"20",name:"lock"}):e===d.I.ORG&&t?n.createElement(l.Pv,{id:t,allowTeamInitials:!0,size:20}):e===d.I.SALES?n.createElement(i.Ah,{size:"20",name:"sales"}):null;ListIcon.displayName="ListIcon";let Label=({text:e,subtext:t,iconType:a,teamId:r,isSelectedOption:i})=>n.createElement("div",{className:"padding_top_25 padding_bottom_25 display_flex"},n.createElement("span",{className:"inline_flex align_items_center padding_right_100"},n.createElement(ListIcon,{iconType:a,teamId:r})),n.createElement("div",null,n.createElement("h5",{style:{fontSize:15}},e),!i&&n.createElement("div",{className:"caption normal_wrap"},t)));Label.displayName="Label";let useCanvasTemplatePublishCategories=(e=!1,t)=>{let a=(0,m.d4)(p.H7),r=a?.id,i=(0,n.useMemo)(()=>n.createElement(o.A,{id:r}),[r]),l=(0,m.d4)(c.N),_=(0,m.d4)(u.jJ),f=(0,s.Po)(d.I.NONE),b=(0,s.Po)(d.I.ORG,i),g=(0,s.Po)(d.I.SALES,void 0),y=(0,n.useMemo)(()=>({[d.I.NONE]:{iconType:d.I.NONE,subtext:h.t("Only people and channel that you shared it with can view"),text:f},[d.I.ORG]:{iconType:d.I.ORG,subtext:h.t("Anyone in your organization can view"),text:b},[d.I.SALES]:{iconType:d.I.SALES,subtext:h.rt("Anyone with access to the Sales tab in {teamName} can view",{teamName:i}),text:g}}),[i,f,b,g]),A=(0,n.useMemo)(()=>{let a=[],n={label:g,value:d.I.SALES,subText:y[d.I.SALES].subtext},r={label:b,value:d.I.ORG,subText:y[d.I.ORG].subtext},i={label:f,value:d.I.NONE,subText:y[d.I.NONE].subtext};return e?(a.push(i),(l||t===d.I.SALES)&&a.push(n),(_||t===d.I.ORG)&&a.push(r)):(l&&a.push(n),_&&a.push(r)),a},[_,l,y,t,e,f,b,g]),x=(0,n.useCallback)((e,t=!1)=>{let a=y[e.value];if(a)return n.createElement(Label,{...a,teamId:r,isSelectedOption:t})},[y,r]);return(0,n.useMemo)(()=>({categoryOptions:A,renderOptions:x}),[A,x])};useCanvasTemplatePublishCategories.displayName="useCanvasTemplatePublishCategories"},0x110c28883:(e,t,a)=>{"use strict";a.d(t,{C:()=>useCreateCanvasFromTemplate});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xe874a88a),l=a(0x20482ad21),o=a(0x1f439ff81),s=a(0x1a6bfa734),c=a(0x1c703f177),d=a(0x16ffed5ab);let m=new l.Ay("slack-docs"),waitTillClean=async e=>{let t=0;return new i.S((a,n)=>{e||e||n(Error("converting a template to a canvas - no editor was passed in"));let r=setInterval(async()=>{(await i.S.all([e?.getIsDirty(),e?.getIsPending()])).every(e=>!1===e)?(clearInterval(r),a(!0)):t+=1,t>=400&&(clearInterval(r),n(Error("converting a template to a canvas - exceeded max attempts for clean document check")))},300)})},u={name:"warning"},useCreateCanvasFromTemplate=({fileId:e,setIsLoadingUseTemplate:t,editor:a})=>{let i=(0,r.wA)(),l=(0,s.A)(),p=m.t("There was a problem converting the canvas to a template. Try again in a few minutes.");return(0,n.useCallback)(async()=>{t?.(!0);try{await waitTillClean(a),await i((0,c.A)({templateFileId:e}))}catch(e){l.error(e instanceof Error?e:Error(String(e))),i((0,d.M)({element:n.createElement(o.A,{message:p,svgIconProps:u})}))}finally{t?.(!1)}},[t,e,a,i,l,p])};useCreateCanvasFromTemplate.displayName="useCreateCanvasFromTemplate"},0x1b7c571ae:(e,t,a)=>{"use strict";a.d(t,{U:()=>useEmbedFailedToLoadEffect});var n=a(0xbad225b5);function useEmbedFailedToLoadEffect(e,t){let a=(0,n.useRef)(t);a.current=t,(0,n.useEffect)(()=>{if(!e)return;let failedToLoadListener=(t,n)=>{n&&a.current?.(e)};return failedToLoadListener(void 0,e.failedToLoad.get()),failedToLoadListener.callbackRef=a,e.failedToLoad.listen(failedToLoadListener),()=>{e.failedToLoad.unlisten(failedToLoadListener)}},[e])}},0xba9cc4e8:(e,t,a)=>{"use strict";a.d(t,{p:()=>u,t:()=>useEmbedFocus});var n,r=a(0xbad225b5),i=a(0x14fad6485),l=a(951303e3),o=a(0xaa84f9d4),s=a(0x250a952a5),c=a(0x1b7dc8bdb),d=a(0x51b81145),m=a(0x107e97a6b),u=((n={}).Auto="auto",n.Managed="managed",n.Restore="restore",n.AutocompleteClose="autocomplete",n.ChannelSpaceOriginRoute="channelSpaceOriginRoute",n.ChannelSpaceOriginView="channelSpaceOriginView",n.ShowDocFlexpane="showDocFlexpane",n.Transition="transition",n);function useEmbedFocus({autoFocus:e,docEmbed:t,fileId:a,quipThreadId:n,focusKey:u,isCommentOpen:p,isInSuggestedTab:h,isTemplateOverlayShowing:_,hasHadFocus:f,autoStartAiGeneration:b}){let g=(0,o.t)(n),y=(0,r.useRef)(t);y.current=t;let A=(0,r.useRef)(new Set(e?["auto"]:[])),{windowRef:x}=(0,r.useContext)(i._0),E=x.deref().document.activeElement,C=(0,r.useRef)(E?(0,l.O)(E):null),k=(0,r.useCallback)(e=>{if(_||h||b)return;let t=(0,c.W1)(n),a=e.docEditor;!f&&t?(g.info(`applying focus state; sectionId: ${t.sectionId}`),a.applyFocusState(t)):a.focusEditor()},[n,_,h,f,b,g]),v=(0,r.useCallback)(e=>{let t=A.current;if(p)return void t.clear();if(t.has("auto")){let e=x.deref()?.document,a=e?.activeElement;a&&a!==e.body&&a!==C.current?.deref()&&(g.warn("Abandon autoFocus, active element changed"),t.delete("auto")),a?.classList.contains("ql-editor")&&(g.warn("Abandon autoFocus, Quill focused"),t.delete("auto"))}t.size&&(g.info(`focus on render: ${Array.from(t).join(",")}`),k(e))},[g,x,p,k]);(0,s.V)(t,v,s.h.FINISHED_FIRST_PAINT),(0,r.useEffect)(()=>{let t=A.current;e?(t.add("auto"),y.current?.isRenderComplete.get()&&v(y.current)):(t.delete("auto"),y.current?.isRenderComplete.get()&&g.info("Autofocus off after render"))},[e,g,v]);let S=(0,r.useCallback)(e=>{y.current?.isRenderComplete.get()?(k(y.current),g.info(`focus: ${e}`)):A.current.add(e)},[k,g]),I=(0,r.useCallback)(e=>{let{entityId:t}=e?.params||{},{reason:r}=e?.uiState||{};if(t){let e=(0,m.QY)(t);if(e?e!==a:t!==n)return!1}return S(r||"transition"),!0},[a,S,n]);return(0,d.A)(u,I),S}},0xaa84f9d4:(e,t,a)=>{"use strict";a.d(t,{t:()=>useEmbedLogger});var n=a(0xbad225b5),r=a(0x1a6bfa734);function useEmbedLogger(e){let t=(0,r.A)(),a=(0,n.useRef)(e);a.current=e;let i=(0,n.useCallback)((...e)=>{t.info(a.current,...e)},[t]),l=(0,n.useCallback)((...e)=>{t.warn(a.current,...e)},[t]),o=(0,n.useCallback)((e,...n)=>{t.error(e,a.current,...n)},[t]);return(0,n.useMemo)(()=>({info:i,warn:l,error:o}),[i,l,o])}},0x250a952a5:(e,t,a)=>{"use strict";a.d(t,{V:()=>useEmbedRenderedEffect,h:()=>i});var n,r=a(0xbad225b5),i=((n={})[n.PARTIALLY_RENDERED=0]="PARTIALLY_RENDERED",n[n.STABLY_RENDERED=1]="STABLY_RENDERED",n[n.FULLY_RENDERED=2]="FULLY_RENDERED",n[n.FINISHED_FIRST_PAINT=3]="FINISHED_FIRST_PAINT",n);function listen(e,t,a){switch(a){case 0:e.rendered.listen(t);break;case 1:e.isRenderStable.listen(t);break;case 3:e.finishedFirstPaint.listen(t);break;default:e.isRenderComplete.listen(t)}}function unlisten(e,t,a){switch(a){case 0:e.rendered.unlisten(t);break;case 1:e.isRenderStable.unlisten(t);break;case 3:e.finishedFirstPaint.unlisten(t);break;default:e.isRenderComplete.unlisten(t)}}function getRenderValue(e,t){switch(t){case 0:return e.rendered.get()??!1;case 1:return e.isRenderStable.get()??!1;case 3:return e.finishedFirstPaint.get()??!1;default:return e.isRenderComplete.get()??!1}}function useEmbedRenderedEffect(e,t,a=2){let n=(0,r.useRef)(t);n.current=t,(0,r.useEffect)(()=>{if(!e)return;let renderListener=(t,a)=>{!t&&a&&n.current?.(e)};return renderListener(void 0,getRenderValue(e,a)),renderListener.callbackRef=n,listen(e,renderListener,a),()=>{unlisten(e,renderListener,a)}},[e,a])}},0x153af1c54:(e,t,a)=>{"use strict";a.d(t,{CR:()=>useEmbedSectionNavigation,G6:()=>m,Ie:()=>u});var n,r=a(0xbad225b5),i=a(0x14fad6485),l=a(0xd843ab47),o=a(0x1a6bfa734),s=a(0x1599ad93e),c=a(0x1046e372c),d=a(0x226892387),m=((n={})[n.Header=0]="Header",n[n.MegaphoneHeader=1]="MegaphoneHeader",n[n.FloatingActions=2]="FloatingActions",n[n.Embed=3]="Embed",n[n.EmptyCanvasTemplateOptions=4]="EmptyCanvasTemplateOptions",n[n.PreviewTemplatesFooter=5]="PreviewTemplatesFooter",n[n.Toolbar=6]="Toolbar",n[n.Banner=7]="Banner",n[n.HuddleToolbar=8]="HuddleToolbar",n);let u={Insertion:"QuipInsertionToolbar",MegaphoneHeader:"QuipMegaphoneHeader",Footer:"QuipFlexpaneFooter",Floating:"QuipFloatingFormattingBar",EmbeddedUi:"QuipEmbeddeddUIToolbar",FloatingHistory:"QuipActivityHistoryFloatingBar",EmptyCanvasTemplateOptions:"QuipEmptyStateOptions",FloatingActions:"QuipFloatingActions",PreviewTemplatesFooter:"QuipPreviewTemplatesFooter"};function useEmbedSectionNavigation(e,t){let a=(0,o.A)(),{windowId:n}=(0,r.useContext)(i._0),{container:m}=(0,r.useContext)(l.A),u=(0,d.d4)(e=>(0,s.ZV)(e,n));return t&&m&&a.devHint("UNEXPECTED VIEW CONTEXT","QuipEmbed is in multiple mutually incompatible view contexts",{index:e,isEmbedInFlexpane:t,container:m,windowId:n}),{enableSectionNavigation:!u,sectionIndex:m?(0,c.A)({viewContainer:m},e):(0,c.A)({inFlexpane:t},e)}}},0x5cda1a03:(e,t,a)=>{"use strict";a.d(t,{A:()=>useLastHighlightUpdated});var n=a(0xbe0b63ff),r=a(0x21949e494),i=a(0x15d4c7d97),l=a(0xa985ed31),o=a(0x226892387),s=a(0x14149c126),c=a(0x14ea3ce99);function useLastHighlightUpdated(e){let t=(0,o.d4)(e=>"on"===(0,s._Z)(e,"canvas_badging_highlighting")),a=(0,o.d4)(t=>e&&(0,l.A)(e)&&(0,c.Lp)(t,e)),d=(0,r.A)(e),m=(0,i.A)(d,d?.lastNewSectionUpdated);if(t&&a&&(0,n.uz)(a)&&a.update_notification)return new Date(1e3*a.update_notification);if(a&&(0,n.uz)(a)&&a.update_notification){let e=new Date(1e3*a.update_notification);(!m||e>m)&&(m=e)}return m}},0x246ae1c41:(e,t,a)=>{"use strict";a.d(t,{m:()=>useOpenPublishTemplateToast});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1f439ff81),o=a(0x103721a39),s=a(0x16ffed5ab);let c=new i.Ay("share-dialog"),useOpenPublishTemplateToast=({teamName:e})=>{let t=(0,r.wA)();return(0,n.useCallback)(({isPublishTemplate:a,publishTemplateCategory:r,orgAccessUpdated:i=!1})=>{let d;d=a?c.rt("Template added to <b>{section}</b>",{section:(0,o.Po)(r,e)}):i?c.rt("Template removed from <b>{section}</b> and access updated",{section:(0,o.Po)(r,e)}):c.rt("Template removed from <b>{section}</b>",{section:(0,o.Po)(r,e)}),t((0,s.M)({element:n.createElement(l.A,{message:d})}))},[t,e])}},0x1babfc083:(e,t,a)=>{"use strict";a.d(t,{x:()=>usePrivateMessageUnfurlSpeedbump});var n,r,i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0xc26f5c40),s=a(0x2301c802e),c=a(0x937c068d),d=a(0x40c0d834),m=a(0x20482ad21),u=a(0x1b88224f9),p=a(0x2501a2cee),h=a(0x18df748c7),_=a(0x110e51560),f=a(0x21d6ed371),b=a(0x3711e82d),g=a(0x2503ade6e),y=a(0x1d43eb6d7),A=a(0x11c82607b),x=a(0x145ae144);let E="QUIP_ATTACHMENT_ACTION",C=(0,A.Ay)("Trigger an attachment action",(e,t,{actionId:a,attachmentId:n,callbackId:r,channelId:i,logLabel:l=E,messageTs:o,onError:s,onFinish:c,onSuccess:d,setLoading:m})=>{let{message:u,action:p}=(0,x.A)(t(),{channelId:i,messageTs:o,attachmentId:n,actionId:a}),h=window.setTimeout(()=>m?.(!0),1e3),_=(0,y.Ay)({getState:t,label:l});return _.info(`Will trigger action ${a} for attachment ${n} on message ${o}`),e((0,g.i)({action:p,attachmentId:n,callbackId:r,channelId:i,isEphemeral:u.is_ephemeral,threadTs:u.thread_ts,messageTs:o,serviceId:u.bot_id,botUserId:u.user})).then(()=>{d?.(),_.info(`Successfully performed action ${a} for attachment ${n} on message ${o}`)}).catch(e=>{let t=e.data&&e.data.response||"Something went wrong and we don`t know why. Please try again.";s?.(e),_.error(e,`Failed to perform action ${a} for attachment ${n} on message ${o}: ${t}`)}).finally(()=>{clearTimeout(h),m?.(!1),c?.()})});C.meta={name:"quipTriggerAttachmentAction",key:"createThunkQuipTriggerAttachmentAction",description:"Trigger an attachment action"};var k=a(0x11eae4d05);let v=new m.Ay("slack_docs");var S=((n=S||{}).UNFURL="1",n.CANCEL="2",n),I=((r=I||{}).KEEP_PRIVATE_BUTTON="keep_private_button",r.SHARE_BUTTON="share_button",r.CLOSE_MODAL="close_modal",r);function getUnfurlSpeedbumpDetails({fileShareDetails:e}){let{destinationType:t,connectedTeamNames:a,channelCount:n}=e,r=v.t("You\u2019re about to share a private message in a canvas"),i="";switch(t){case c.F$.WORKSPACE:i=v.t(" that is shared with the entire workspace");break;case c.F$.SC_PUBLIC_CHANNEL:case c.F$.PUBLIC_CHANNEL:i=1===n?v.t(" that is shared with a public channel"):v.t(" that is shared with public channels");break;case c.F$.SC_PRIVATE_CHANNEL:case c.F$.PRIVATE_CHANNEL:i=1===n?v.t(" that is shared with a private channel"):v.t(" that is shared with private channels");break;case c.F$.DM_OR_MPDM:r=v.t("You\u2019re about to share a private message with anyone who has access to this canvas.",{fallbackHash:"fa82ea6c7b56ca322af1488f35925f64edf240d4"})}let l=v.t(" As a reminder, make sure you\u2019re not sharing sensitive information.");return a.length>2?v.rt("{prefix}{destinationDetails} with people from <b>{connectedTeamCount} other organizations</b>. {suffix}",{prefix:r,destinationDetails:i,connectedTeamCount:a.length,suffix:l}):2===a.length?v.rt("{prefix}{destinationDetails} with people from <b>{connectedTeam1}</b> and <b>{connectedTeam2}</b>. {suffix}",{prefix:r,destinationDetails:i,connectedTeam1:a[0],connectedTeam2:a[1],suffix:l}):1===a.length?v.rt("{prefix}{destinationDetails} with people from <b>{connectedTeam1}</b>. {suffix}",{prefix:r,destinationDetails:i,connectedTeam1:a[0],suffix:l}):v.rt("{prefix}{destinationDetails}. {suffix}",{prefix:r,destinationDetails:i,suffix:l})}function QuipUnfurlPrivateMessageSpeedbumpModal({fileId:e,fileShareDetails:t,onClose:a,closeModal:n,switchToUrl:r,message:o,confirmMessageUnfurl:s}){let m=(0,l.wA)(),[g,y]=(0,i.useState)(!1);(0,i.useEffect)(()=>{((0,f.ow)(o)||(0,f.xh)(o))&&(a(),n())},[a,n,o]);let A=(0,i.useCallback)(()=>n(),[n]),x=(0,i.useCallback)(e=>{if(!o)return;let{attachments:t}=o;if(!t?.length)return;let a=t[0];m(C({actionId:e,attachmentId:a?.id,callbackId:a?.callback_id,channelId:o.channel,messageTs:o.ts,setLoading:y,onSuccess:A,logLabel:c.o7}))},[o,m,A]),E=(0,i.useRef)(),k=(0,i.useCallback)(e=>{E.current=e},[E]),S=(0,i.useMemo)(()=>({elementName:"keep_private_button",elementType:b.ElementType.BUTTON,onClick:{enableClogAction:!0}}),[]),I=(0,i.useMemo)(()=>({elementName:"share_button",elementType:b.ElementType.BUTTON,onClick:{enableClogAction:!0}}),[]),w=(0,i.useCallback)(()=>{r(),s(!1),x("2"),E?.current?.({action:b.UiAction.CLOSE,elementName:"close_modal"})},[r,s,x,E]),T=(0,i.useCallback)(()=>{s(!0),x("1")},[x,s]),N=getUnfurlSpeedbumpDetails({fileShareDetails:t}),M=i.createElement(p.Ah,{name:"canvas-content-filled",inline:!0}),R=(0,h.A)(e),P=R?(0,_.q)(R):v.t("this canvas"),L=v.rt("Share this in {formattedCanvasTitle}?",{formattedCanvasTitle:P}),O=i.createElement("span",null,M," ",L);return i.createElement(d.A,{eventId:b.EventId.QUIP_UNFURL_PRIVATE_MESSAGE_SPEEDBUMP,uiComponentName:b.UiComponentName.QUIP_UNFURL_PRIVATE_MESSAGE_SPEEDBUMP,trackClogRef:k,clogImpression:!0},i.createElement(u.A,{className:"p-quip_unfurl_private_message_speedbump_modal",title:O,onClose:w,onCancel:w,onSubmit:T,submitButtonIsLoading:g,cancelButtonText:v.t("Only Show Link"),submitButtonText:v.t("Show Message"),submitAutoClogProps:I,cancelAutoClogProps:S},N))}QuipUnfurlPrivateMessageSpeedbumpModal.displayName="QuipUnfurlPrivateMessageSpeedbumpModal";let w=(0,k.e)(QuipUnfurlPrivateMessageSpeedbumpModal);var T=a(0x15f4f83cf),N=a(0xbd3de346),M=a(0x226892387),R=a(0x14ea3ce99),P=a(0x839ba347),L=a(0x6b35329),O=a(0x143fb6398),D=a(0xa1832ae4),F=a(0x16ed1b0dc),U=a(0x217553e42),B=a(0x1ee439e69);let H=(0,A.Ay)("get details about the broadest private channel audience that has access to this file",(e,t,{file:a})=>{let n=(0,N.X7)(a),r=0,i=new Set,l=0,o=t();return((0,P.A)(n,e=>{if((0,F.A)(e)){let t=(0,U.OL)(o,e);if(t)if((0,O.ju)(t)){let e=(0,L.A)(o,t);(0,P.A)(e,e=>{let t=(0,D.F1)((0,B._J)(o,e));i.add(t)}),r+=1}else l+=1}}),r)?{destinationType:c.F$.SC_PRIVATE_CHANNEL,channelCount:r,connectedTeamNames:Array.from(i)}:l?{destinationType:c.F$.PRIVATE_CHANNEL,channelCount:l,connectedTeamNames:[]}:{destinationType:c.F$.UNKNOWN,channelCount:0,connectedTeamNames:[]}});H.meta={name:"getFilePrivateShareDetailsForQuipEphemeralNotification",key:"createThunkGetFilePrivateShareDetailsForQuipEphemeralNotification",description:"get details about the broadest private channel audience that has access to this file"};let W=(0,A.Ay)("get details about the broadest public channel audience that has access to this file",(e,t,{file:a})=>{let n=(0,N.Jq)(a),r=0,i=new Set,l=0,o=t();return((0,P.A)(n,e=>{if((0,F.A)(e)){let t=(0,U.OL)(o,e);if(t)if((0,O.ju)(t)){let e=(0,L.A)(o,t);(0,P.A)(e,e=>{let t=(0,D.F1)((0,B._J)(o,e));i.add(t)}),r+=1}else l+=1}}),r)?{destinationType:c.F$.SC_PUBLIC_CHANNEL,channelCount:r,connectedTeamNames:Array.from(i)}:l?{destinationType:c.F$.PUBLIC_CHANNEL,channelCount:l,connectedTeamNames:[]}:{destinationType:c.F$.UNKNOWN,channelCount:0,connectedTeamNames:[]}});W.meta={name:"getFilePublicShareDetailsForQuipEphemeralNotification",key:"createThunkGetFilePublicShareDetailsForQuipEphemeralNotification",description:"get details about the broadest public channel audience that has access to this file"};var V=a(0xc60c25fe);function usePrivateMessageUnfurlSpeedbump({fileId:e,message:t,skip:a}){let[n,r]=(0,i.useState)(!1),{embeddedUiData:d}=(0,i.useContext)(s.N),m=(0,f.DL)(t),u=(0,l.wA)(),p=(0,M.d4)(t=>(0,R.Lp)(t,e||"",!1)),h=(0,M.d4)(e=>(0,y.Ay)({state:e,label:c.o7})),handleOnClose=()=>{r(!1)},_=(0,i.useCallback)(()=>{d?.performAction({action:o.EmbeddedUiAction.SWITCH_UNFURL_TYPE,toUnfurlType:o.UnfurlType.LINK,options:{scrubOldUnfurl:!0}})},[d]),b=(0,i.useCallback)(e=>{d?.performAction({action:o.EmbeddedUiAction.MESSAGE_UNFURL_CONFIRMATION,unfurled:e})},[d]),g=(0,i.useMemo)(()=>{let e={destinationType:c.F$.UNKNOWN,channelCount:0,connectedTeamNames:[]},t=(0,N.Si)(p),a=!!(0,N.Jq)(p).length,n=!!(0,N.X7)(p).length,r=!!(0,N.iv)(p).length,i=!!(0,N.Df)(p).length;return(t||a||n||r||i)&&(t?e={destinationType:c.F$.WORKSPACE,channelCount:0,connectedTeamNames:[]}:a?e=u(W({file:p})):n?e=u(H({file:p})):i&&(e={destinationType:c.F$.DM_OR_MPDM,channelCount:0,connectedTeamNames:[]})),e},[u,p]);(0,i.useEffect)(()=>{a||!p||!(0,f.aw)(t)||n||d?.isDuplicated()||!(0,T.uz)(p)||!(0,N.DQ)(p)||(g?.destinationType!==c.F$.UNKNOWN?(h.info(`Unfurl speedbump needed for message with timestamp: ${m}`),r(!0),u(w({fileId:e,fileShareDetails:g,onClose:handleOnClose,switchToUrl:_,message:t,confirmMessageUnfurl:b}))):(h.info(`Unfurl speedbump not needed for message with timestamp: ${m}`),m&&u((0,V.l)({fileId:e,messageTs:m}))))},[u,e,p,t,n,g,h,d,_,m,b,a])}},0xa2a4c5fc:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipAccess,E:()=>c});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x24ddfedf3),o=a(0xee0b413f),s=a(0x140bb1e78),c=((n={})[n.FIRST_TIME_REQUEST=0]="FIRST_TIME_REQUEST",n[n.SUBSEQUENT_REQUEST=1]="SUBSEQUENT_REQUEST",n[n.SENT_SUCCESS=2]="SENT_SUCCESS",n[n.SENT_ERROR=3]="SENT_ERROR",n);function useQuipAccess(e,t,a){let n=(0,i.wA)(),[c,d]=(0,r.useState)(!1),[m,u]=(0,r.useState)(+!!t),p=(0,r.useRef)(),h=(0,r.useCallback)(()=>{d(!0),p.current||(p.current=n((0,s.x)({fileId:e,reason:"IndicatorRequestEditAccessButton",requestType:"upgrade"})).then(()=>a?n((0,l.A)()):u(2)).catch(()=>a?n((0,o.A)()):u(3)).finally(()=>d(!1)))},[n,e,a]),_=(0,r.useCallback)(()=>{p.current&&(p.current.cancel(),p.current=void 0)},[]);return(0,r.useEffect)(()=>()=>{_()},[_]),{isLoading:c,status:m,requestQuipAccess:h}}},0x3271b95e:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipDocLastUpdatedSlackId});var n=a(0xbe0b63ff),r=a(0x21949e494),i=a(0x193f39c5f),l=a(0xa985ed31),o=a(0x226892387),s=a(0x14ea3ce99);function useQuipDocLastUpdatedSlackId(e){let t=(0,r.A)(e),a=(0,o.d4)(t=>e&&(0,l.A)(e)&&(0,s.Lp)(t,e)),c=(0,i.A)(t?.lastUpdatedSlackUserId);return a&&(0,n.uz)(a)&&a.editors?a.editors?.[0]:c}},0xf8c5d1b5:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipDocLastUpdated});var n=a(0xbe0b63ff),r=a(0x21949e494),i=a(0x15d4c7d97),l=a(0xa985ed31),o=a(0x226892387),s=a(0x14ea3ce99);function useQuipDocLastUpdated(e){let t=(0,r.A)(e),a=(0,i.A)(t,t?.lastUpdated),c=(0,o.d4)(t=>e&&(0,l.A)(e)&&(0,s.Lp)(t,e));return c&&(0,n.uz)(c)&&c.edit_timestamp?new Date(1e3*c.edit_timestamp):a}},0x18df748c7:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipDocTitle});var n=a(0x16cf1da63),r=a(0x20482ad21),i=a(0x22fd0ecc8),l=a(0x1abacca2d),o=a(0xa985ed31),s=a(0x107e97a6b),c=a(0x226892387),d=a(0x18d3df42a),m=a(0x14ea3ce99);let u=new r.Ay("files");function useQuipDocTitle(e,t){let a=(0,n.wA)(),r=(0,s.EX)(e??""),p=(0,c.d4)(t=>e&&(0,o.A)(r.fileIdOrQuipThreadId)?(0,m.Lp)(t,r.fileIdOrQuipThreadId):null),h=(0,i.SB)(p)??u.t("Untitled");if(t){let e=a((0,d.F)(h));return(0,l.h)(e)}return h}},0x15d4c7d97:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipDocValueIfSubscribed});var n=a(0x193f39c5f),r=a(0x226892387),i=a(0x109246c07);function useQuipDocValueIfSubscribed(e,t){let a=e?.id.get(),l=(0,r.d4)(e=>a&&(0,i.d0)(e,a));return(0,n.A)(l?t:void 0)}},0x21949e494:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipDoc});var n=a(0xbad225b5),r=a(0xe96db5ef),i=a(0x15d4c7d97),l=a(0xbd3de346),o=a(0xa985ed31),s=a(0x107e97a6b),c=a(0x226892387),d=a(0x14ea3ce99),m=a(0x2291c5d37);function useQuipDoc(e,t){let a="";e&&(a=(0,s.EX)(e).fileIdOrQuipThreadId);let u=(0,r.A)(t),p=(0,c.d4)(e=>(0,o.A)(a)?(0,m.X)(e,a):a),h=(0,c.d4)(e=>{if((0,o.A)(a)){let t=(0,d.Lp)(e,a);return!(0,l.ZG)(t)}return!1}),_=(0,n.useMemo)(()=>{if(u&&p)return u.docs.get(p)},[u,p]);return(0,i.A)(_,_?.deleted)||h?void 0:_}},0x1023c1f4a:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipEditorUiConnector});var n=a(0xbad225b5),r=a(0x14fad6485),i=a(0x106f06f59),l=a(0x226892387),o=a(0x1cf0d97e1);let s=(0,o.Ay)(e=>e?.quipEditorUiConnectors);s.meta={name:"getQuipEditorUiConnectorStoreState",key:"createSelectorGetQuipEditorUiConnectorStoreState",description:e=>e?.quipEditorUiConnectors};let c=(0,o.Ay)((e,t)=>s(e)[t]??0);function useQuipEditorUiConnector(e){let{windowRef:t}=(0,n.useContext)(r._0);if(!(0,l.d4)(t=>c(t,e)))return;let a=i.A.get(e),o=t.deref();if(o)return a?.find(e=>e.isInWindow(o))}c.meta={name:"connectorsCountForFile",key:"createSelectorConnectorsCountForFile",description:(e,t)=>s(e)[t]??0}},0x28ddfc94:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipTemplateControlsInfo});var n=a(0xbad225b5),r=a(0x193f39c5f),i=a(0x6d72337);function useQuipTemplateControlsInfo(e,t){let a=(0,i.$s)(e),l=(0,r.A)(t),o=(0,r.A)(a?.templateControlsInfo);return(0,n.useMemo)(()=>l??o,[l,o])}},0x193f39c5f:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuipValue});var n=a(0xbad225b5);function useQuipValue(e){let[t,a]=(0,n.useState)(e?.get());return(0,n.useEffect)(()=>{a(e?.get())},[e]),(0,n.useEffect)(()=>{let listener=(e,t)=>a(t);return e?.listen(listener),()=>e?.unlisten(listener)},[e]),t}},0xe96db5ef:(e,t,a)=>{"use strict";a.d(t,{A:()=>useQuip});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x224811973),o=a(0x17c577af2),s=a(0xfcc4fb33),c=a(0x226892387);function useQuip(e,t=i.A){let a=(0,c.d4)(o.Ap),d=(0,c.d4)(l.y),[m,u]=(0,n.useReducer)(e=>e+1,0),p=d&&void 0===a,h=(0,r.wA)();return(0,n.useEffect)(()=>{let a=!0;if(p){let n=e?.startSpan("canvas:initialize-client");return h((0,s.A)()).then(()=>{a&&(n?.close(),e?.addTags({client_load_success:!0}),u())}).catch(a=>{n?.close(),e?.addTags({client_load_success:!1,success:!1,error:`${a}`}),t?.(a)}),()=>{a=!1}}},[h,t,p,e]),a}},0x2040f25b2:(e,t,a)=>{"use strict";a.d(t,{g:()=>useShouldShowCanvasVersionHistory});var n=a(0xbad225b5),r=a(0xaa596f75),i=a(0x226892387),l=a(0x14149c126);function useShouldShowCanvasVersionHistory(e,t,a,o){let s=!!(0,i.d4)(r.O4),c=(0,i.d4)(e=>"on"===(0,l._Z)(e,"canvas_version_document_mismatch")),d=(0,i.d4)(t=>{let n=a&&o?t.quipActivityHistory?.[e]:null;return n?.fileId});return(0,n.useMemo)(()=>!!a&&!!o&&!!s&&(!c||!d||!t||d===t),[a,o,s,c,d,t])}},0x131e0b1e1:(e,t,a)=>{"use strict";a.d(t,{A:()=>useTeamPlanRestrictsCanvasCreateAccess});var n=a(0x147fb8c90),r=a(0x226892387),i=a(0x151d42a77);function useTeamPlanRestrictsCanvasCreateAccess(){let e=(0,r.d4)(i.g),t=(0,r.d4)(e=>(0,n.G2)(e,"canvas_standalone__create")),a=(0,r.d4)(e=>(0,n.G2)(e,"canvas_channel__create"));return e&&!t&&!a}},0xf6ec6575:(e,t,a)=>{"use strict";a.d(t,{A:()=>T});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x99233ecb),d=a(0x2501a2cee),m=a(0xa2a4c5fc),u=a(0x131e0b1e1),p=a(0x66306c2d),h=a(0x2ba6e815),_=a(0x243d57606),f=a(0xbd3de346),b=a(0x183b9ee61),g=a(0x8cc877c4),y=a(0xa1832ae4),A=a(0x3711e82d),x=a(0x10079cc7),E=a(0x226892387),C=a(0x17a41206b),k=a(0x14ea3ce99),v=a(0x91e15f37),S=a(0x431513f8),I=a(0x1ee439e69);let w=new o.Ay("slack_docs"),T=(0,n.forwardRef)(({fileId:e,className:t,isInChannelTab:a},i)=>{let o=(0,r.wA)(),T=!(0,E.d4)(C.Pb),N=(0,E.d4)(t=>(0,k.Lp)(t,e)),M=(0,E.d4)(g.r),R=!!N.most_recent_access_request_ts,P=l()("p-quip_title__access_indicator_button",t),L="dialog-title",O="dialog-description",{isLoading:D,status:F,requestQuipAccess:U}=(0,m.A)(e,R),B=(0,E.d4)(I.H7),H=(0,y.tc)(B),W=x.ZO.PaidFeatureTrial,V=x.zG.Canvas,G=(0,E.d4)(e=>H&&(0,v.hq)(e,W,V)),q=(0,u.A)(),j=(0,h.Ay)({promoSubtype:x.zG.Canvas}),z=(0,E.d4)(e=>(0,b.A)(e,{file:N}));(0,n.useEffect)(()=>{H&&o((0,S.A)({campaignType:W,campaignSubType:V,reason:"canvas_view_only_button"}))},[o,V,W,H]);let getButton=e=>n.createElement(s.lV,{"data-qa":"quip-request-edit-access-button",type:"outline",className:"margin_top_75 margin_bottom_25",loading:D,onClick:U,"aria-label":e},e),renderFirstTimeRequestContent=()=>n.createElement("div",{role:"group"},n.createElement("strong",{id:L},w.t("You only have permission to view.")),n.createElement("div",{id:O},w.t("To make changes, ask the owner for edit access.")),z?null:getButton(w.t("Request Edit Access")));renderFirstTimeRequestContent.displayName="renderFirstTimeRequestContent";let renderSubsequentReminderContent=()=>n.createElement("div",{role:"group"},n.createElement("strong",{id:L},w.t("You\u2019ve already asked for access")),n.createElement("div",{id:O},w.t("Still waiting for edit access? You can send the owner a reminder.")),getButton(w.t("Remind The Owner")));renderSubsequentReminderContent.displayName="renderSubsequentReminderContent";let renderRequestSentSuccessContent=()=>n.createElement("div",{role:"group"},n.createElement("strong",{id:L},w.t("Request sent")),n.createElement("div",{id:O},w.t("You\u2019ll be notified once it\u2019s been shared with you.")));renderRequestSentSuccessContent.displayName="renderRequestSentSuccessContent";let renderRequestSentErrorContent=()=>n.createElement("div",{role:"group"},n.createElement("strong",{id:L},w.t("Error")),n.createElement("div",{id:O},w.t("Something\u2019s gone wrong. Please try again later.")),getButton(w.t("Try Again")));renderRequestSentErrorContent.displayName="renderRequestSentErrorContent";let K=(0,n.useCallback)(()=>{o((0,p.A)({uiComponentVariant:A.UiComponentVariant.CANVAS_PAGE_VIEW_ONLY}))},[o]),$=(0,n.useCallback)(()=>{let e=w.rt("<strong>Create and edit canvases on their own</strong> and access other premium collaboration tools with a free, {trialDuration}-day trial of Slack Pro.",{trialDuration:30}),t=w.rt("<strong>Create and edit canvases on their own</strong> and access other premium collaboration tools with an upgrade.");return n.createElement("div",{role:"group"},n.createElement("strong",{id:L},n.createElement(_.a,{featurePlan:"std",className:"margin_bottom_50"})),n.createElement("div",{id:O},G?e:t),G?n.createElement(s.Ay,{type:"outline",onClick:K},w.t("Learn More")):n.createElement(s.z9,{href:(0,x.hZ)({entryPoint:"canvas-view-only-button"}),type:"outline"},w.t("See Upgrade Options")))},[G,K]),Y=new Map([[m.E.FIRST_TIME_REQUEST,renderFirstTimeRequestContent()],[m.E.SUBSEQUENT_REQUEST,renderSubsequentReminderContent()],[m.E.SENT_SUCCESS,renderRequestSentSuccessContent()],[m.E.SENT_ERROR,renderRequestSentErrorContent()]]),renderViewOnlyButton=()=>n.createElement(s.Ay,{className:P,type:"outline",size:"small",ref:i},n.createElement("span",{className:"margin_right_25"},n.createElement(d.Ah,{name:"eye-open",size:"16"})),w.t("View only")),Q="On the free version of Slack, canvases are view only. To edit and create canvases, upgrade to a paid plan.",Z=(0,n.useMemo)(()=>{switch(j){case h.MX.TrialEligible:return n.createElement(s.Ay,{onClick:K,type:"outline",size:"small",disabled:T},w.t("Try Slack Pro",{fallbackHashNs:"trials_highlight_paid_features",fallbackHash:"06e4cb15a831a4c84ebf3434fd44d951d2a9b078"}));case h.MX.TrialIneligible:return n.createElement(s.z9,{type:"outline",size:"small",disabled:T,href:(0,x.Qn)({entryPoint:"quip_access_indicator"})},w.t("Upgrade Now",{fallbackHashNs:"trials_highlight_paid_features",fallbackHash:"935af2c98463e1015856ac054bf7efc6c88c0ab7"}));case h.MX.TrialIneligibleUserCannotUpgrade:return n.createElement(s.z9,{type:"outline",size:"small",disabled:T,href:(0,x.hZ)({entryPoint:"quip_access_indicator"})},w.t("Compare Plans",{fallbackHashNs:"trials_highlight_paid_features",fallbackHash:"ea963548740f94552d2327531fe22e09acc7c717"}));default:return null}},[j,T,K]),J=(0,n.useCallback)(e=>n.createElement(c.Ay,{...e,menuClassNames:"p-quip_title__access_indicator_menu"},n.createElement(n.Fragment,null,n.createElement("div",{role:"group"},n.createElement("div",null,Q)),Z)),[Z,Q]),X={position:"bottom-left",offsetY:6,offsetX:-12,ariaRole:"dialog"},ee=n.createElement(c.cQ,{renderMenu:e=>n.createElement(c.Ay,{...e,menuClassNames:"p-quip_title__access_indicator_menu","aria-labelledby":L,"aria-describedby":O},Y.get(F)),...X},renderViewOnlyButton());return a&&(0,f.mW)(N)?null:(H&&(ee=n.createElement(c.cQ,{renderMenu:e=>n.createElement(c.Ay,{...e,menuClassNames:"p-quip_title__trial_access_menu","aria-labelledby":L,"aria-describedby":O},$()),...X},renderViewOnlyButton())),M||(ee=n.createElement(s.Ay,{className:P,type:"outline",size:"small"},w.t("View only"))),q&&(ee=n.createElement(c.cQ,{renderMenu:J,position:"bottom-right",offsetY:6,ariaRole:"dialog"},n.createElement(s.Ay,{className:P,type:"outline",size:"small",ref:i},n.createElement("span",{className:"margin_right_25"},n.createElement(d.Ah,{name:"eye-open",size:"16"})),n.createElement("span",{className:"no_wrap"},w.t("View Only"))))),ee)})},0xe0f2b1ea:(e,t,a)=>{"use strict";a.d(t,{$f:()=>n,rg:()=>r});let n="history",r="main-client-flexpane"},0x1382131a5:(e,t,a)=>{"use strict";a.d(t,{O:()=>r});var n,r=((n={}).DYNAMIC="dynamic",n.VARIABLES="variables",n.WORKFLOWS="workflows",n)},0x1cfca9392:(e,t,a)=>{"use strict";a.d(t,{i:()=>ee,A:()=>et});var n=a(0xbad225b5),r=a(0x130d89881),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x9c0c23e6),s=a(0xc26f5c40),c=a(0x134e233cc),d=a(0x11a296110),m=a(0x1023c1f4a),u=a(0xd843ab47),p=a(0x242503693),h=a(0x3711e82d),_=a(0x226892387),f=a(0x117f78ac8),b=a(0x16082db4b);let g=new l.Ay("slack-docs"),y={eventId:h.EventId.CANVAS_VARIABLES,elementName:"add-variable",onClick:{enableClogAction:!0},isPrimaryCTA:!0,fileId:""};function AddVariableButton({fileId:e,isDisabled:t=!1}){let a=(0,m.A)(e),{windowId:r}=(0,n.useContext)(u.A),i=(0,_.d4)(e=>(0,b.j)(e,{windowId:r})?.columnMode),{transitionFocusTo:l}=(0,n.useContext)(c.Ay),o=(0,n.useCallback)(()=>{l({focusKey:p.Ay.QUIP_EMBED,forceFocus:!0});let e=setTimeout(()=>{a?.performActionForTemplateControl({action:s.TemplateControlAction.SHOW_CREATION_POPOVER})},100);return()=>{clearTimeout(e)}},[a,l]);return y.fileId=e,n.createElement(d.Ay,{onClick:o,type:"outline",className:"p-quip_automations_overview__insertion_button",autoClogProps:y,disabled:t||i===f.oZ.Single},g.t("Add Variable"))}AddVariableButton.displayName="AddVariableButton";let A=AddVariableButton;var x=a(0x16cf1da63),E=a(0x102edf836),C=a(0x13953efe6);let k=a.p+"workflow-example-09272d1.gif";var v=a(0x1382131a5),S=a(0x3989021c),I=a(0x1a02c72b5),w=a(0xd6a16321),T=a(0xbd3de346),N=a(0x20e80190e),M=a(0x14ea3ce99),R=a(0xf3c65e54),P=a(0x5b1935a6),L=a(0x1fcbb004d),O=a(0x46dbff89);let D=a.p+"variable-coachmark-first-eec6c61.svg",F=a.p+"variable-coachmark-second-a34b7dc.svg",U=new l.Ay("slack-docs");function CanvasAutomationCoachmark({children:e,fileId:t}){let a=(0,x.wA)(),r=(0,_.d4)(e=>(0,M.Lp)(e,t)),{isOpen:i,closeCoachmark:l,renderCoachmark:o}=(0,S.A)(P.ze.CREATE_VARIABLES_GUIDE,P.xu.CANVAS_TEMPLATE),s=(0,n.useCallback)(()=>l(!0),[l]),c=(0,n.useCallback)(()=>l(),[l]),d=(0,n.useCallback)(()=>{a((0,O.q)({element:n.createElement(CanvasAutomationCoachmarkDetails,{fileId:t})})),c()},[a,t,c]),m=(0,T.mW)(r)&&i;return((0,n.useEffect)(()=>{m&&a((0,R.A)({action:P.hw.IMPRESSION,notificationName:P.ze.CREATE_VARIABLES_GUIDE}))},[a,m]),m)?n.createElement(C.Ay,{coachmarkElement:o({arrowPosition:10,hero:n.createElement("div",{className:"p-quip_automations_nux__hero"},n.createElement("img",{src:k,alt:"",className:"p-quip_automations_nux__hero__image"})),title:U.t("Automate processes like creating briefs, assembling reports and more"),bodyText:U.t("People on your team can fill out a form that populates a copy of your canvas, quickly gathering and standardizing information with less work."),closeCoachmark:s,onClickPrimaryButton:d,className:"p-quip_automations_nux__coachmark",primaryCallToActionText:U.t("Show Me How"),alignActionsRight:!0}),orientation:C.YC.LeftBottom,coachmarkAnchorClassNames:"p-quip_automations_nux__coachmark_anchor"},e):n.createElement(n.Fragment,null,e)}function CanvasAutomationCoachmarkDetails({fileId:e}){let t=(0,x.wA)(),[a,r]=(0,n.useState)(1),i=(0,n.useCallback)(()=>t((0,L.O)()),[t]),l=(0,n.useCallback)(()=>{a<2?r(a+1):(i(),t((0,I.o)((0,w.YW)({entityId:e,activeTab:v.O.VARIABLES}))))},[t,e,i,a]),o=(0,n.useCallback)(()=>{r(e=>e-1)},[]),s=(0,n.useMemo)(()=>{switch(a){case 1:return U.t("First, add variables",{fallbackHash:"351da24ca60e0d8546bf4d3025691847801febb2",fallbackHashNs:"slack-docs"});case 2:return U.t("Then, create a workflow");default:return""}},[a]),c=(0,n.useMemo)(()=>{switch(a){case 1:return U.t("Variables are placeholders that let you pull content into your canvas from workflows or apps outside of Slack. Use them to insert @mentions, dates, channel names, or text.");case 2:return U.t("Your workflow will present people with a form that asks them to enter information for all the variables in your template.");default:return""}},[a]),d=(0,n.useMemo)(()=>{switch(a){case 1:return n.createElement(N.hR,{src:D,alt:""});case 2:return n.createElement(N.hR,{src:F,alt:""});default:return null}},[a]);return n.createElement(N.dW,{closeModal:i,className:""},n.createElement(N.$m,{className:"p-quip_automations_nux__modal_image"},d),n.createElement(N.$m,null,n.createElement(N.Rc,{title:s}),n.createElement(N.qf,null,n.createElement("p",null,c))),n.createElement(N.jl,null,n.createElement(N.ox,null,n.createElement(E.Ay,{type:"outline",onClick:o,disabled:1===a},U.t("Back")),n.createElement(E.Ay,{autoFocus:!0,type:"primary",onClick:l},a<2?U.t("Next"):U.t("Try It")))))}CanvasAutomationCoachmark.displayName="CanvasAutomationCoachmark",CanvasAutomationCoachmarkDetails.displayName="CanvasAutomationCoachmarkDetails";var B=a(0x543a781e),H=a(0x2501a2cee),W=a(0x1fdec3e16),V=a(0x19d590052),G=a(0x1d5eeff6d),q=a(0xe38b5635),j=a(0x10f1b8521);let z=new l.Ay("slack-docs");function VariableCard({controlInfo:e,connector:t}){let[a,r]=(0,n.useState)(!1),i=(0,n.useCallback)(()=>{t?.performActionForTemplateControl({action:s.TemplateControlAction.EDIT,controlIds:[...e.controlIds.values()]})},[t,e.controlIds]),l=(0,n.useCallback)(()=>{t?.performActionForTemplateControl({action:s.TemplateControlAction.REMOVE,controlIds:[...e.controlIds.values()]}),r(!0)},[t,e.controlIds]),o=(0,n.useMemo)(()=>({name:"edit"}),[]),c=(0,n.useMemo)(()=>({name:"trash"}),[]);return a?null:n.createElement(q.A,{size:"medium",className:"p-quip_variable_card"},n.createElement(VariableCardContent,{controlInfo:e,connector:t}),t?n.createElement(G.A,{position:"inset"},n.createElement(V.A,{svgIconProps:o,onClick:i,tooltip:z.t("Edit variable")}),n.createElement(V.A,{svgIconProps:c,onClick:l,tooltip:z.t("Remove")})):null)}function VariableCardContent({controlInfo:e,connector:t}){let{name:a,type:r}=e,{isHovered:i}=(0,n.useContext)(j.A),l=(0,n.useCallback)(e=>{switch(e){case s.TemplateType.USER:return"mentions";case s.TemplateType.CHANNEL:return"channel";case s.TemplateType.DATE:return"calendar";case s.TemplateType.SALESFORCE_DATA_MENTION:return"sf-cloud-filled";default:return"text"}},[]),o=(0,n.useCallback)(e=>{switch(e){case s.TemplateType.USER:return z.t("Person");case s.TemplateType.CHANNEL:return z.t("Channel");case s.TemplateType.DATE:return z.t("Date");case s.TemplateType.SALESFORCE_DATA_MENTION:return z.t("Salesforce Data Field");default:return z.t("Text")}},[]),c=(0,B.A)(i,50);return(0,n.useEffect)(()=>{t?.performActionForTemplateControl({action:s.TemplateControlAction.HIGHLIGHT,controlIds:[...e.controlIds.values()],on:c})},[t,e.controlIds,c]),n.createElement("div",null,n.createElement("div",{className:"p-quip_variable_card__name"},n.createElement(W.A,{lines:1,withTooltip:!0},n.createElement(H.Ah,{name:"css",inline:!0}),n.createElement("span",{className:"p-quip_variable_card__name__text"},a))),n.createElement("div",{className:"p-quip_variable_card__type"},n.createElement(H.Ah,{name:l(r),inline:!0}),n.createElement("span",{className:"p-quip_variable_card__type__label"},o(r))))}VariableCard.displayName="VariableCard",VariableCardContent.displayName="VariableCardContent";let K=VariableCard;var $=a(0x251e2168d);let Y=new l.Ay("slack-docs"),VariableHint=({fileId:e,connector:t,hasVariables:a,isDisabled:r=!1})=>{let i=(0,x.wA)(),{windowId:l}=(0,n.useContext)(u.A),o=(0,_.d4)(e=>(0,b.j)(e,{windowId:l})?.columnMode),d=(0,n.useMemo)(()=>a?Y.t("Done adding variables?"):Y.t("Add variables to automate your template"),[a]),m=(0,n.useMemo)(()=>a?n.createElement("p",null,Y.t("Now, use your variables to power an automated workflow in Slack. Your new workflow will create a form that lets others make a copy of the template with the variables filled in, and then share it.")):n.createElement("p",null,Y.t("Variables are like content placeholders. After adding them, you\u2019ll create a form that will automatically populate the template and share it with others.")),[a]),{transitionFocusTo:h}=(0,n.useContext)(c.Ay),g=(0,n.useCallback)(()=>{h({focusKey:p.Ay.QUIP_EMBED,forceFocus:!0});let e=setTimeout(()=>{t?.performActionForTemplateControl({action:s.TemplateControlAction.SHOW_CREATION_POPOVER})},100);return()=>{clearTimeout(e)}},[t,h]),{buttonText:y,onClick:A}=(0,n.useMemo)(()=>a?{buttonText:Y.t("New Workflow"),onClick:()=>{i((0,O.q)({element:n.createElement($.A,{fileId:e})}))}}:{buttonText:Y.t("Add Variables"),onClick:g},[i,e,a,g]);return n.createElement("div",{className:"p-automations_tab__hint","data-qa":"data_variable_hint"},n.createElement("div",{className:"p-automations_tab__hint_title"},d),n.createElement("div",{className:"p-automations_tab__hint_body"},m),n.createElement("div",null,n.createElement(E.Ay,{type:"outline",className:"p-automations_tab__hint_button",autoFocus:!0,onClick:A,disabled:r||!a&&o===f.oZ.Single},y)))};VariableHint.displayName="VariableHint";var Q=a(0xed33ee16),Z=a(0xf0460639),J=a(0x1fb2d2a87);let X=new l.Ay("slack-docs"),ee=30;function VariablesTab({fileId:e,templateControlsInfo:t,connector:a}){let l=(0,_.d4)(J.to),s=(0,n.useMemo)(()=>{if(!t)return[];let e=[...t.keys()];return e.length>=ee?e.push("max_variables_reached"):e.length&&e.push("create_variable_button"),e},[t]),c=!!s.length,d=(0,n.useCallback)(r=>{let i=s[r],l=t?.get(i),o=null;return l?o=n.createElement(K,{controlInfo:l,connector:a}):c&&("max_variables_reached"===i?o=n.createElement("div",{className:"p-automations_tab__max_label"},X.rt("Only 30 variables are supported at this time. Need more? {feedbackLink}",{feedbackLink:n.createElement(Z.A,null)})):"create_variable_button"===i&&(o=n.createElement(A,{fileId:e}))),n.createElement("div",{key:i,className:"p-automations_tab__row","data-qa":"data_variables_tab_row"},o)},[a,e,c,s,t]);return t?n.createElement(n.Fragment,null,n.createElement(CanvasAutomationCoachmark,{fileId:e},n.createElement(VariableHint,{fileId:e,connector:a,hasVariables:c})),n.createElement("div",{className:"p-automations_tab__autosizer"},n.createElement(r.A,null,({width:t,height:a})=>n.createElement(i.A,{eventId:h.EventId.CANVAS_VARIABLES,uiComponentName:h.UiComponentName.CANVAS_VARIABLES_TAB,fileId:e,clogImpression:!0},n.createElement(o.A,{height:a,"aria-label":X.t("Variables"),keys:s,rowRenderer:d,width:t}))))):n.createElement(Q.A,{clientTheme:l,loadingMessage:X.t("Variables")})}VariablesTab.displayName="VariablesTab";let et=VariablesTab},0x251e2168d:(e,t,a)=>{"use strict";a.d(t,{A:()=>eU});var n,r,i=a(0xbad225b5),l=a(0x16cf1da63),o=a(0xc26f5c40),s=a(0x120c268ad),c=a.n(s),d=a(0x118cdcdea),m=a.n(d),u=a(0x130d89881),p=a(0x40c0d834),h=a(0x20482ad21),_=a(0x1d2cd7755),f=a(0x126f22530),b=a(0x344bb842),g=a(0x210cf696f),y=a(0x1faa3f1ac),A=a(0x2501a2cee),x=a(0x6e87d4ec),E=a(0x9c0c23e6),C=a(0x2dd1b881),k=a(0x1e4b6e4e6),v=a(0x2772625d),S=a(0x18df748c7),I=a(0x1023c1f4a),w=a(0x28ddfc94),T=a(0x1382131a5),N=a(0x677a139e),M=a(0x99233ecb),R=a(0x1b77d8ef3),P=a(0x10bd0ba09);let L=new h.Ay("slack-docs"),CanvasTitleInput=({refToForward:e,templateControlsInfo:t,initialText:a,hintText:n,onInputTextChange:r})=>{let l=(0,i.useMemo)(()=>t?[...t.keys()]:[],[t]),o=(0,i.useCallback)(t=>{e.current&&e.current.insertContentsAtCursor({contents:{ops:[{insert:{canvasvariable:{name:t.name,templateType:t.type}}}]}})},[e]),s=(0,i.useCallback)(e=>i.createElement(M.Ay,e,i.createElement(M.c$,{label:L.t("Canvas variables")}),l.map(e=>{let a=t?.get(e);return a?i.createElement(M.Dr,{key:e,onSelected:()=>o(a)},i.createElement("span",null,a.name)):null})),[l,o,t]);return i.createElement(i.Fragment,null,i.createElement(N.A,{className:"p-workflow_creation_modal_v2__texty_input_hint"},n),i.createElement(R.A,null,i.createElement(P.A,{ref:e,ariaLabel:L.t("New canvas title"),focusOnMount:!0,initialText:a,onTextChange:r,useWysiwyg:!1,placeholder:L.t("New canvas title"),isSingleLine:!0,useExpandedRichText:!0})),i.createElement(M.cQ,{renderMenu:s,position:"bottom-right",offsetX:0},i.createElement(g.A,{className:"p-workflow_creation_modal_v2__variable_trigger_button"},i.createElement(A.Ah,{name:"css",inline:!0}),i.createElement("span",{className:"p-workflow_creation_modal_v2__variable_trigger_button__label"},L.t("Insert a variable")))))};CanvasTitleInput.displayName="CanvasTitleInput";var O=a(0x11a296110),D=a(0x189615fa),F=a(0x937dca65);let U=a.p+"workflow-notes-2430d63.png";var B=a(0x1dc84ebc7),H=a(0x12185e091),W=a(0x82980ab8),V=a(0x20e80190e),G=a(0xdb0578c7),q=a(0x22d443103),j=a(0x226892387),z=a(0x217553e42),K=a(0x18fcd8e2a),$=a(0xe684f705),Y=a(0x1fcbb004d);let Q=new h.Ay("slack-docs");function ConfirmationModal({trigger:e,workflowId:t,title:a,canvasTitle:n,channelsToShare:r,usersToShare:o}){let s,c=(0,l.wA)(),d=(0,j.d4)(e=>(0,z.LO)(e,r)),m=(0,j.d4)(e=>(0,$.gA)(e,o)),u=(0,j.d4)(e=>(0,K.g)(e,t)),p=(0,B.j)({trigger:e,workflow:u}),h=(0,i.useCallback)(e=>{e?.stopPropagation(),c((0,G.A)({source:"workflow-confirmation-modal",route:{routeTo:k.E9.EDIT_WORKFLOW,workflowId:t}}))},[c,t]),_=(0,i.useCallback)(e=>{e?.stopPropagation(),p&&c((0,q.A)({shortcutInfo:p}))},[c,p]),f=(0,i.useCallback)(()=>{c((0,Y.O)())},[c]),b=(0,i.useMemo)(()=>i.createElement(V.hR,{className:"p-workflow_confirmation_modal__header_icon",src:U,alt:""}),[]),g=(0,i.useMemo)(()=>i.createElement("div",{className:"p-workflow_confirmation_modal__header_title"},a),[a]),x=d.length+m.length;if(d.length>0&&d[0]){let e=i.createElement(F.A,{channel:d[0],includeChannelPrefix:!0,bold:!1,displayFormerNames:!1}),t=(0,H.Zp)(d[0])?i.createElement(A.Ah,{name:"lock",inline:!0}):"";1===x?s=Q.rt("{channelIcon}{shareChannelName}",{channelIcon:t,shareChannelName:e}):x>1&&(s=Q.rt("{channelIcon}{shareChannelName} and {otherCount, plural, =1 {# other} other {# others}}",{channelIcon:t,shareChannelName:e,otherCount:x-1}))}else if(r&&r.length>0&&(0,v.cn)(r[0]))s=Q.t("Channel where the worflow is used");else if(m.length>0){let e=m[0],t=(0,W.wg)(e)||(0,W.Fh)(e);!t&&(0,v.cn)(e.id)&&(t=Q.t("Person who used this workflow")),1===x?s=t:x>1&&(s=Q.rt("{memberName} and {otherCount, plural, =1 {# other} other {# others}}",{memberName:t,otherCount:x-1}))}return i.createElement(D.A,{closeModal:f},i.createElement(V.rQ,{className:"p-workflow_confirmation_modal__header"},i.createElement(V.Rc,{icon:b,title:g})),i.createElement(V.$m,null,i.createElement("div",{className:"p-workflow_confirmation_modal__content_container"},i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_hint"},i.createElement("span",null,Q.t("\u{1F389} Workflow published!"))),i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_wfb"},i.createElement("span",null,Q.rt("You can edit or manage your workflow in {wfb}.",{wfb:i.createElement(y.A,{onClick:h},Q.t("Workflow Builder"))}))),i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_step"},i.createElement(A.Ah,{name:"play",inline:!0,size:"20"}),i.createElement("span",null,Q.rt("When someone <b>presses the workflow button</b>"))),i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_arrow_icon"},i.createElement(A.Ah,{name:"arrow-down",inline:!0,size:"20"})),i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_step"},i.createElement(A.Ah,{name:"text-snippet",inline:!0,size:"20"}),i.createElement("span",null,Q.rt("Open the <b>form, \u201D{title}\u201D</b>",{title:a}))),i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_step"},i.createElement(A.Ah,{name:"canvas",inline:!0,size:"20"}),i.createElement("span",null,Q.rt("Create a <b>canvas, \u201D{canvasTitle}\u201D</b>",{canvasTitle:n}))),i.createElement(V.qf,{className:"p-workflow_confirmation_modal__content_step"},i.createElement(A.Ah,{name:"canvas",inline:!0,size:"20"}),i.createElement("span",null,Q.rt("Share the <b>canvas</b> to <b>{shareLocationText}</b>",{shareLocationText:s||Q.t("Person who used this workflow")}))))),i.createElement(V.jl,{className:"p-workflow_confirmation_modal__footer"},i.createElement(V.ox,null,i.createElement(O.Ay,{type:"outline",onClick:_,className:"p-workflow_confirmation_modal__footer_share_button"},i.createElement(A.Ah,{name:"share-message",inline:!0,size:"20"}),i.createElement("span",null,Q.t("Share"))),i.createElement(O.Ay,{type:"primary",onClick:f},Q.t("Done")))))}ConfirmationModal.displayName="ConfirmationModal";let Z=ConfirmationModal;var J=a(0x72b537b5),X=a(0x1407c6c2c),ee=a(0x143f89715),et=a(0x222a04717),ea=a(0x6b359530),en=a(0xfd04a21a),er=a(0xf33a4f91),ei=a(0xe9c32bb),el=a(0x10d53599f),eo=a(0x19dc73101),es=a(0x207fb9b92),ec=a(0x16ed1b0dc),ed=a(0x4f725d55);let em=new h.Ay("slack-docs"),eu="{{inputs.Ft1234__user_id}}";var ep=((n={}).USER="user",n.CHANNEL="channel",n);function ArrayInput({inputType:e,onValueChange:t,values:a}){let n=(0,J.U)(),r=em.t("Channel where the workflow is used"),l=em.t("Person who used this workflow"),o=(0,X.A)(),{label:s,placeholder:c,searcherOptions:d,dynamicDataLabel:m,dynamicValue:u}=(0,i.useMemo)(()=>{let t,a,n,i,o;switch(e){case"channel":t=em.t("Channel"),a=em.t("Select channels"),n=er.L6,i=r,o="{{inputs.Ft1234__channel_id}}";break;case"user":t=em.t("Person"),a=em.t("Select people"),n=er.R_,i=l,o=eu;break;default:t="",a="",o="",i=""}return{label:t,placeholder:a,searcherOptions:n,dynamicDataLabel:i,dynamicValue:o}},[e,r,l]),p=(0,i.useCallback)(()=>{let e=[...a];e.includes(u)||(e.push(u),t(e))},[u,t,a]),h=(0,i.useCallback)(e=>{t(e.map(e=>e.value))},[t]),f=(0,i.useCallback)(e=>(0,ec.A)(e.value)?i.createElement(en.A,{channelId:e.value,showTeamForLocalChannels:!0}):(0,ed.A)(e.value)?i.createElement(el.A,{id:e.value,showAvatar:!0}):e.data&&e.data.label?i.createElement(ea.R,{data:e.data}):e.label,[]),b=(0,i.useMemo)(()=>a.map((e,t)=>{let a=`${t}-${e}`;return(0,v.cn)(e)?{key:a,label:m,icon:"",svgIcon:"css",value:e,isError:!1}:{key:a,label:e,value:e,isError:!1}}),[m,a]),g=(0,i.useMemo)(()=>{let e=[];return a.length>10&&e.push({id:"1",message:em.t("You must provide at most 10 items")}),e},[a.length]),y=(0,ee.A)(g,n),{onBlur:A,okayToDisplay:x}=(0,es.K)({errorMessage:"",isErrored:y});return d?i.createElement(i.Fragment,null,i.createElement(_.A,{htmlFor:o,text:s}),i.createElement("div",null,i.createElement(eo.h,{id:o,onSelectedItemsChange:h,placeholderText:c,renderOption:f,searcherOptions:d,selectedOptions:b,selectId:o,width:"100%",onBlur:A,isInvalid:x&&y,errors:x?g:void 0,expandOnFocus:!0,isRequired:!1})),i.createElement("div",{className:"p-workflow_creation_modal_v2__array_input__variable_trigger"},i.createElement(DynamicDataMenu,{inputType:e,onSelect:p}))):null}ArrayInput.displayName="ArrayInput";let getVariableMenuItemLabel=(e,t,a)=>{let n="";switch(e){case"channel":n=t;break;case"user":n=a}return i.createElement("div",{className:"p-workflow_creation_modal_v2__array_input__menu_item"},i.createElement("div",null,i.createElement(et._,{type:e})),i.createElement("div",null,i.createElement(ei.nB,{element:"span"},i.createElement("span",null,n))))};function DynamicDataMenu({inputType:e,onSelect:t}){let a=em.t("Channel where the workflow is used"),n=em.t("Person who used this workflow"),r=(0,i.useMemo)(()=>{let r=[i.createElement(M.bX,{key:"separator"})],l=getVariableMenuItemLabel(e,a,n);switch(e){case"user":case"channel":r.push(i.createElement(M.Dr,{key:e,onSelected:t,label:l}))}return r},[a,n,e,t]),l=(0,i.useMemo)(()=>i.createElement(ei.Pd,null,em.t("Insert a variable")),[]),o=(0,i.useCallback)(e=>i.createElement(M.Ay,{...e,"data-qa":"variables-dropdown-menu"},i.createElement(M.c$,{label:l}),r),[l,r]);return i.createElement(M.cQ,{renderMenu:o,position:"bottom-right",offsetX:0},i.createElement(g.A,{"aria-label":em.t("Insert a variable")},i.createElement(A.Ah,{name:"css",inline:!0}),i.createElement("span",null,em.t(" Insert a variable"))))}getVariableMenuItemLabel.displayName="getVariableMenuItemLabel",DynamicDataMenu.displayName="DynamicDataMenu";let eh=ArrayInput;var e_=a(0x110330473),ef=a(0x1d14b4538),eb=a(0xe41988fb),eg=a(0x11571542c);let ey=(0,a(0x11c82607b).Ay)("Add create shortcut workflow from template",async(e,t,{templateId:a,payload:n,reason:r})=>{let i,{workflow_id:l,trigger_id:o}=await e((0,eg.k)({templateId:a,payload:n,reason:r}));try{i=await e((0,ef.Y)({workflowId:l,reason:r}))}catch(e){throw Error(`Failed to publish workflow ${l}: ${e instanceof Error?e.message:"Unknown error"}`)}if(!i.ok)throw Error(`Workflow ${l} publish returned ok: false`);let{trigger:s}=await e((0,eb.B)({triggerId:o,reason:r}));return{trigger:s,workflowId:l}});ey.meta={name:"createAndPublishWorkflowFromTemplate",key:"createThunkCreateAndPublishWorkflowFromTemplate",description:"Add create shortcut workflow from template"};var eA=a(0x937a43ca),ex=a(0x1a02c72b5),eE=a(0xd6a16321),eC=a(0x238b287cf),ek=a(0x3711e82d),ev=a(0xb77a689a);function isCanvasOpVariable(e){return!!(e&&e.insert&&!(0,ev.A)(e.insert)&&e.insert.canvasvariable)}function getCanvasVariableOpName(e){return!isCanvasOpVariable(e)||(0,ev.A)(e.insert)?"":e.insert?.canvasvariable?.name}function getCanvasVariableOpTemplateType(e){return!isCanvasOpVariable(e)||(0,ev.A)(e.insert)?"":e.insert?.canvasvariable?.templateType}var eS=a(0x2398accc),eI=a(0x24429189c),ew=a(0x46dbff89),eT=a(0x1060f0c84),eN=a(0x16ffed5ab),eM=a(0x1aa707a5e);let eR=new h.Ay("slack-docs"),eP={eventId:ek.EventId.CANVAS_VARIABLES,elementName:"previous-step",onClick:{enableClogAction:!0},fileId:""},eL={eventId:ek.EventId.CANVAS_VARIABLES,elementName:"next-step",onClick:{enableClogAction:!0},fileId:""},eO={eventId:ek.EventId.CANVAS_VARIABLES,elementName:"creation-modal-close-button",onClick:{enableClogAction:!0},fileId:""};var eD=((r=eD||{})[r.Form=1]="Form",r[r.Title=2]="Title",r[r.Share=3]="Share",r);let eF=[2,3];function WorkflowCreationModal({fileId:e}){let t=(0,l.wA)(),a=(0,eC.A)(),n=(0,i.useCallback)(()=>t((0,Y.O)()),[t]),r=(0,I.A)(e),s=(0,w.A)(e,r?.templateControlValue),d=(0,S.A)(e),h=(0,j.d4)(t=>(0,eT.bJ)(t,e)??d),[N,M]=(0,i.useState)(h),[R,P]=(0,i.useState)(1),[L,O]=(0,i.useState)(!1),[D,F]=(0,i.useState)([]),[B,H]=(0,i.useState)([eu]),W=(0,i.useRef)(null),[q,z]=(0,i.useState)(),K=(0,j.d4)(t=>(0,eT.k4)(t,e)),$=(0,i.useMemo)(()=>q?{contents:q}:{contents:t((0,eI.f)({blocks:K}))},[t,K,q]),[Q,J]=(0,i.useState)(!1),X=(0,i.useCallback)(()=>{let e=new(m())(W?.current?.getContents().contents);1===e.ops.length&&(0,eS.A)(e.ops[0])&&`
`===(0,eS.$)(e.ops[0])?J(!0):J(!1)},[]),[ee,et]=(0,i.useState)(new Set([1])),ea=N&&N.length>24||D.length>10||B.length>10,en=!(!N||Q||!B.length&&!D.length)&&!ea&&3===ee.size,er=(0,i.useCallback)(e=>{P(e),et(new Set(ee).add(e)),2===R&&W.current&&z(W.current.getContents().contents)},[ee,R]),ei=(0,i.useCallback)(e=>{switch(e){case o.TemplateType.USER:return"mentions";case o.TemplateType.CHANNEL:return"channel";case o.TemplateType.DATE:return"calendar";case o.TemplateType.SALESFORCE_DATA_MENTION:return"sf-cloud-filled";default:return"text"}},[]),el=(0,i.useCallback)(({text:e,tag:t})=>{let a=parseInt(t,10);return i.createElement(y.A,{onClick:()=>er(a),className:c()("p-workflow_creation_modal_v2__inline_highlight",{"p-workflow_creation_modal_v2__inline_highlight--em":a===R,"p-workflow_creation_modal_v2__inline_highlight--required":eF.includes(a)})},e)},[R,er]),eo=(0,i.useCallback)(()=>{t((0,eg.k)({templateId:C.Z.CREATE_CANVAS_FROM_TEMPLATE,payload:{file_id:e,channel_ids:[],user_ids:[],title:N},reason:"canvas-variables"})).then(({workflow_id:a})=>{O(!1),t((0,eM.Ay)({fileId:e})),t((0,G.A)({source:"client-templates-gallery",route:{routeTo:k.E9.EDIT_WORKFLOW,workflowId:a}})),t((0,Y.O)())})},[t,e,N]),es=(0,i.useCallback)(({text:e})=>i.createElement(g.A,{onClick:eo},e),[eo]),ec=(0,i.useMemo)(()=>s?[...s.keys()]:[],[s]),ed=(0,i.useCallback)(e=>{let{name:t,type:a}=[...s?.values()??[]][e];return i.createElement("div",{className:"p-workflow_creation_modal_v2__canvas_variable",key:t},i.createElement(A.Ah,{name:ei(a),inline:!0}),i.createElement("span",{className:"p-workflow_creation_modal_v2__canvas_variable__text"},t))},[ei,s]),em=(0,i.useMemo)(()=>{if(N){if(N.length>24)return eR.t("You can\u2019t enter more than {maxLength} characters.",{maxLength:24});if((0,eA.Zb)(N))return eR.t("Workflow names can\u2019t support special characters (i.e. !#$%&).",{fallbackHash:"cfd69b02dd9f0f874e184ff6b45100529db54d04",fallbackHashNs:"workflow_builder"})}},[N]),ef=eR.t("Your new canvas will copy your existing canvas or template."),eb=(0,i.useMemo)(()=>{let e=null;switch(R){case 1:e=i.createElement(i.Fragment,null,i.createElement(_.A,{text:eR.t("Form title"),htmlFor:"form-title",id:"form-title-label"}),i.createElement(f.A,{name:"form-title",id:"form-title",onChange:M,value:N,size:"medium",maxCharacterLimit:24,errorText:em,isRequired:!0}),i.createElement(_.A,{text:eR.t("Form questions"),htmlFor:"form-questions",id:"form-questions-label"}),i.createElement("p",{className:"p-workflow_creation_modal_v2__customize_build"},eR.rt("To customize the form, build it in <span>Workflow Builder</span>. Heads up-once you get to Workflow Builder, you\u2019ll have to finish your workflow there.",{"<span>":es})),i.createElement("div",{className:"p-workflow_creation_modal_v2__controls"},i.createElement(u.A,null,({width:e,height:t})=>i.createElement(E.A,{animateOnScroll:!1,height:t,"aria-label":eR.t("Variables"),keys:ec,rowRenderer:ed,width:e}))));break;case 2:e=i.createElement(i.Fragment,null,i.createElement(_.A,{text:eR.t("New canvas title"),htmlFor:"canvas-title",id:"canvas-title-label"}),i.createElement(CanvasTitleInput,{refToForward:W,templateControlsInfo:s,initialText:$,hintText:ef,onInputTextChange:X}));break;case 3:e=i.createElement(i.Fragment,null,i.createElement(eh,{inputType:ep.USER,onValueChange:H,values:B}),i.createElement(eh,{inputType:ep.CHANNEL,onValueChange:F,values:D}))}return e},[D,em,ef,$,ec,X,ed,es,R,s,N,B]),ev=(0,i.useCallback)(()=>{O(!0),a.track(ek.EventId.CANVAS_VARIABLES,{contexts:{ui_context:{ui_properties:{element_name:"canvas_workflow_creation"},ui_step:ek.UiStep.CANVAS_WORKFLOW_PUBLICH,action:ek.UiAction.CLICK},core:{file_id:e}}});let r=W.current?W.current.getContents().contents:q,l=new(m())(r),c=[],d=l.ops.map(e=>{if((0,eS.A)(e))return(0,eS.$)(e).replace(/\n/g,"");if(isCanvasOpVariable(e)){let t=`${getCanvasVariableOpName(e)}-${getCanvasVariableOpTemplateType(e)}`,a=s?.get(t);if(a){let e=a.controlIds.values().next().value?.replaceAll(":","_");c.push(a.name);let t=`{{steps.open_form.fields.${e}}}`;return a.type===o.TemplateType.USER?`{slack.user_mention_id(user_id=${t})}`:a.type===o.TemplateType.CHANNEL?`{slack.channel_mention_id(channel_id=${t})}`:t}}return""}).join(""),u=l.ops.map(e=>(0,eS.A)(e)?(0,eS.$)(e).replace(/\n/g,""):isCanvasOpVariable(e)?getCanvasVariableOpName(e):"").join("");t(ey({templateId:C.Z.CREATE_CANVAS_FROM_TEMPLATE,payload:{file_id:e,channel_ids:D.filter(e=>!(0,v.cn)(e)),user_ids:B.filter(e=>!(0,v.cn)(e)),title:N,include_trigger_channel_variable:D.some(e=>(0,v.cn)(e)),include_trigger_user_variable:B.some(e=>(0,v.cn)(e)),canvas_title:d,title_variables:c},reason:"canvas-variables"})).then(a=>{n(),setTimeout(()=>{t((0,ew.q)({element:i.createElement(Z,{trigger:a.trigger,workflowId:a.workflowId,title:N??"",canvasTitle:u??"",usersToShare:B,channelsToShare:D})}))},0),t((0,eM.Ay)({fileId:e}))}).catch(()=>{let e=eR.t("Failed to create workflow"),a=eR.t("There was an error creating your workflow. Please try again.");t((0,eN.M)({element:i.createElement(x.A,null,i.createElement("strong",null,e),i.createElement("p",null,a))}))}).finally(()=>{t((0,ex.o)((0,eE.YW)({entityId:e,activeTab:T.O.WORKFLOWS}))),O(!1)})},[a,e,q,t,D,B,N,s,n]);eP.fileId=e,eL.fileId=e,eO.fileId=e;let eD=(0,i.useMemo)(()=>i.createElement(V.hR,{className:"p-workflow_creation_modal_v2__title_icon",src:U,alt:""}),[]),eU=(0,i.useMemo)(()=>i.createElement(e_.Ay,{id:e}),[e]);return i.createElement(p.A,{eventId:ek.EventId.CANVAS_VARIABLES,elementType:ek.ElementType.MODAL,uiComponentName:ek.UiComponentName.CANVAS_WORKFLOW_CREATE_MODAL,clogImpression:!0,enableClogImpressionOffScreen:!0},i.createElement(V.dW,{closeModal:n,maxWidth:548},i.createElement(V.$m,null,i.createElement(V.rQ,null,i.createElement(V.Rc,{title:eU,icon:eD,titleTextClassName:"p-workflow_creation_modal_v2__header__title_text",titleHeaderClassName:"p-workflow_creation_modal_v2__header__title_header"})),i.createElement(V.$m,null,i.createElement(V.qf,null,i.createElement("div",{className:"p-workflow_creation_modal_v2__guide"},i.createElement("p",null,eR.t("This workflow will use variables to:")),i.createElement("ol",null,i.createElement("li",null,eR.rt("Collect information in <1>a form</1>",{"<1>":el})),i.createElement("li",null,eR.rt("Add form responses to <2>a new canvas</2>",{"<2>":el})),i.createElement("li",null,eR.rt("Share canvas with <3>people or channels</3>",{"<3>":el}))))),i.createElement(V.qf,{className:"p-workflow_creation_modal_v2__separator"}),i.createElement(V.qf,{className:"p-workflow_creation_modal_v2__form_content"},eb))),i.createElement(V.jl,null,i.createElement("div",{className:"p-workflow_creation_modal_v2__step_buttons"},i.createElement(b.A,{disabled:1===R,"aria-label":"",onClick:()=>er(R-1),autoClogProps:eP,className:"p-workflow_creation_modal_v2__step_buttons__button"},i.createElement(A.Ah,{name:"arrow-left"})),i.createElement("div",{className:"p-workflow_creation_modal_v2__step_buttons__text"},`Step ${R} of 3`),i.createElement(b.A,{disabled:3===R,"aria-label":"",onClick:()=>er(R+1),autoClogProps:eL,className:"p-workflow_creation_modal_v2__step_buttons__button"},i.createElement(A.Ah,{name:"arrow-right"}))),i.createElement(V.ox,null,i.createElement(V.s_,{autoFocus:!0,type:"primary",loading:L,onClick:ev,disableWhenLoading:!0,disabled:!en,autoClogProps:eO,"aria-label":eR.t("Publish Workflow")},eR.t("Publish Workflow"))))))}WorkflowCreationModal.displayName="WorkflowCreationModal";let eU=WorkflowCreationModal},0x16c1a8d7f:(e,t,a)=>{"use strict";a.d(t,{A:()=>QuipCommentRoot});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x1c659cbb1),s=a(0x944e06df),c=a(0x21d0576ea),d=a(0x103f48cb9),m=a(0x1991a9b6d),u=a(0x1c8ee22b5),p=a(0xca4f3cec),h=a(0x19a6a6f6a),_=a(0xf271ff9b),f=a(0x1e11e0f6b),b=a(0x176a6b6c5),g=a(0x21d6ed371),y=a(0xb04c4a12),A=a(0x226892387),x=a(0x214aa5e11),E=a(0x14ea3ce99);let C=new l.Ay("quip-comment-root"),k={subtype:"tombstone"};function QuipCommentRoot({msg:e,blocksContainerContext:t,hideBorder:a=!1,hideAttribution:r=!1}){let l=(0,A.d4)(x.ot),v=!1===(0,g.F0)(e),S=a||v,I=e?.document_comment,w=I?.most_recent_editor,T=(0,n.useContext)(b.r4)===y.Y.THREAD,N=!r&&w&&!v&&T?n.createElement("div",{className:"p-avatar_stack__stack__avatars p-quip_comment_root__heading"},n.createElement("span",{className:"p-quip_comment_root__avatars"},n.createElement(o.Ay,{className:"p-avatar_stack__avatar",userId:w,key:w,size:o.RG.tiny,isInteractive:!0,showCard:!0,ariaHidden:"true",tabIndex:-1,"data-stringify-ignore":!0,"data-qa":"quip_comment_root_avatar"})),n.createElement(p.A,{msg:e,customUserId:w})):n.createElement(p.A,{msg:e,visible:!1,customUserId:w}),M=e?.files?.[0],R=(0,A.d4)(e=>M?(0,E.Lp)(e,M):null),P=(0,c.t)(R,e);return n.createElement("div",{className:i()("p-quip_comment_root",{"p-quip_comment_root--border-hidden":S})},!S&&n.createElement(d.A,null),n.createElement("div",{className:"p-quip_comment_root__body"},N,v&&e&&n.createElement(_.A,{msg:k,customDeletedText:C.t("This content was deleted.",{fallbackHashNs:"message",fallbackHash:"ce3ffd59f54b145033e4574a1e486aab0fd35960"})}),!v&&P&&n.createElement(s.A,{blocks:P,blocksContainerContext:t}),!v&&!P&&e&&n.createElement(h.A,{msg:e}),!v&&!P&&n.createElement(m.A,{msg:e,blocksContainerContext:t}),!v&&e&&n.createElement(u.A,{msg:e}),l&&e?.channel&&n.createElement(f.u,{msg:e,channelId:e.channel})))}QuipCommentRoot.displayName="QuipCommentRoot"},0x1b7dc8bdb:(e,t,a)=>{"use strict";a.d(t,{Gj:()=>addScrollPosition,Ht:()=>addFocusState,T5:()=>getScrollPosition,W1:()=>getFocusState,YW:()=>clearDocUiData});let n=20,r=new Map;function addDocUiData(e,t){if(r.has(e)&&r.delete(e),r.set(e,t),r.size>n){let[e]=r.keys();r.delete(e)}}function clearDocUiData(e){return r.delete(e)}function addScrollPosition(e,t){let a=r.get(e)??{};addDocUiData(e,{...a,scrollPosition:t})}function getScrollPosition(e){return r.get(e)?.scrollPosition}function addFocusState(e,t){let a=r.get(e)??{};addDocUiData(e,{...a,focusState:t})}function getFocusState(e){return r.get(e)?.focusState}Object.defineProperty({MAX_POSITIONS:n,reset:()=>{r=new Map}},"MAX_POSITIONS",{get:()=>n,set:e=>{n=e}})},0x106f06f59:(e,t,a)=>{"use strict";a.d(t,{A:()=>QuipEditorUiConnector});var n=a(0x1382131a5),r=a(0x1a02c72b5),i=a(0xd6a16321),l=a(0x11163564f);let o=new Map;let QuipEditorUiConnector=class QuipEditorUiConnector{fileId;dispatch;delegate;docEmbedRef;windowRef;constructor(e,t,a,n){this.fileId=e,this.dispatch=t,this.docEmbedRef=new WeakRef(a),this.windowRef=new WeakRef(n)}static create(e,t,a,n){let r=new QuipEditorUiConnector(e,t,a,n);return r.registerSelf(),r}static get(e){return o.get(e)}shouldReset(e){return this.docEmbedRef.deref()!==e}updateMutableVariables(e,t,a){this.docEmbedRef.deref()!==t&&(this.docEmbedRef=new WeakRef(t)),this.windowRef.deref()!==a&&(this.windowRef=new WeakRef(a)),e!==this.fileId&&(this.removeSelf(),this.fileId=e,this.registerSelf())}onTemplateControlCreated(){this.dispatch((0,r.o)((0,i.YW)({entityId:this.fileId,activeTab:n.O.VARIABLES})))}setDelegate(e){this.delegate=e}tearDown(){this.removeSelf()}registerSelf(){let e=o.get(this.fileId)||[];0>e.indexOf(this)&&(e.push(this),o.set(this.fileId,e),this.dispatch((0,l.j)({fileId:this.fileId,count:e.length})))}removeSelf(){let e=o.get(this.fileId)||[],t=e.indexOf(this);t>=0&&(e.splice(t,1),o.set(this.fileId,e),this.dispatch((0,l.j)({fileId:this.fileId,count:e.length})))}get templateControlValue(){return this.docEmbedRef.deref()?.templateControls}isInWindow(e){return this.windowRef.deref()===e}performActionForTemplateControl(e){this.delegate?.performActionForTemplateControl(e)}insertMarkdownContent(e){this.delegate?.insertMarkdownContent(e)}}},0x17e096b34:(e,t,a)=>{"use strict";a.d(t,{A:()=>_x});var n,r,i,l,o,s,c,d,m,u,p,h=a(0xbad225b5),_=a(0x16cf1da63),f=a(0xc26f5c40),b=a(0x1cbdfeceb),g=a(0xf87a4e28),y=a(0x5754e840),A=a(0xa985ed31),x=a(0x107e97a6b),E=a(0x226892387),C=a(0x15795982e);function useEmbedIdMemo(e){let{fileIdOrQuipThreadId:t}=(0,x.EX)(e),a=(0,h.useRef)(t);return(0,E.d4)(e=>t===a.current||(0,A.A)(t)!==(0,A.A)(a.current)&&((0,A.A)(t)?(0,C.C)(e,a.current)===t:(0,C.C)(e,t)===a.current))||(a.current=t),a.current}var k=a(0xe96db5ef);function useLastQuipClientError(){let[e,t]=(0,h.useState)(null);return(0,k.A)(void 0,t),e}var v=a(0x21949e494),S=a(0x20482ad21),I=a(0x9f7220f0),w=a(0x2501a2cee),T=a(0x58199183);let N=new S.Ay("files");var M=((n={})[n.FISHING=0]="FISHING",n[n.BIRD=1]="BIRD",n[n.BROOM=2]="BROOM",n[n.TREE=3]="TREE",n[n.CAKE=4]="CAKE",n[n.ARM=5]="ARM",n);let getDeletedStatesContent=()=>new Map([[0,[N.t("This canvas has gone fishing"),"fishing_pole_and_fish"]],[1,[N.t("This canvas has flown the coop"),"bird"]],[2,[N.t("This canvas was swept away"),"broom"]],[3,[N.t("This canvas is on permanent vacation"),"palm_tree"]],[4,[N.t("This canvas was retired"),"cake"]],[5,[N.t("This canvas\u2019s work is all done"),"mechanical_arm"]]]);var R=a(0x1b3ecb90f),P=a(0x1dcb2d57e),L=a(0x153e18eb9),O=a(0x2115976f7),D=a(0x18b479663),F=a(0x14149c126);function isContentRestrictionEnabled(e){return"on"===(0,F._Z)(e,"dsa_content_restriction")}var U=a(0xbd3de346),B=a(0x5c236c7d),H=a(0x183b9ee61),W=a(0x9b971e7e);let V=new S.Ay("files"),G=[M.FISHING,M.BIRD,M.BROOM,M.TREE,M.CAKE,M.ARM];function getIconForFile(e,t,a){if(((0,U.aK)(e)||(0,U.uO)(e))&&e.id.length>0){let e=getDeletedStatesContent().get(a);return e?h.createElement(R.Ay,{text:`:${e[1]}`,emojiSize:R.lw.LARGE}):h.createElement(w.Ah,{name:"trash",size:"inherit"})}return t||(0,U.Bp)(e)||(0,U.Ki)(e)||(0,B.K)(e)||(0,U.AY)(e)||(0,U.Sp)(e)?h.createElement(w.Ah,{name:"lock",size:"inherit"}):(0,U.Bp)(e)||(0,U.Ki)(e)||(0,U.sR)(e)?h.createElement(w.Ah,{name:"warning",size:"inherit"}):(0,U.kn)(e)?h.createElement(w.Ah,{name:"eye-closed",size:"inherit"}):h.createElement(w.Ah,{name:"help",size:"inherit"})}function getTextForFile({file:e,experimentDsaContentRestrictionGroupOn:t,workspaceId:a,isExternallyOwnedCanvas:n,deletedState:r}){let i,l,o=a?h.createElement(T.A,{id:a,bold:!1}):"";if((0,U.kn)(e))return h.createElement(L.A,{context:"quip"});if((0,U.aK)(e)||(0,U.uO)(e)){if(e.id.length>0){let e=getDeletedStatesContent().get(r);i=e?e[0]:V.rt("This canvas was deleted."),l=V.t("It\u2019s been deleted by the owner.",{fallbackHash:"2bc8717b1bae9528b3ebf8e8342bb84431e8f4fa"})}}else(0,U.Sp)(e)?i=(0,U.tJ)(e):t&&(0,U.AY)(e)?i=V.t("Restricted"):(0,U.Ki)(e)?(i=V.t("Can\u2019t view this canvas"),l=e.file_access===O.s.CanvasGloballyDisabled?V.t("Canvas has been turned off by your admins."):e.file_access===O.s.CanvasDisabledUserTeam?n?V.rt("Another team owns this canvas. Canvases from external organizations can\u2019t be viewed by members of {currentWorkspaceOrgName}.",{currentWorkspaceOrgName:o}):V.t("Canvas has been turned off by your admins."):e.file_access===O.s.SlackConnectTeamBlocked?V.rt("This feature is still being rolled out so your organization may not be able to view this canvas yet."):e.file_access===D.a.SlackConnectCanvasSharingBlocked||e.file_access===O.s.CanvasDisabledFileTeam||"canvas_slack_connect_blocked"===e.mode?V.rt("Another team owns this canvas. Canvases from this organization can\u2019t be viewed by members of {currentWorkspaceOrgName}.",{currentWorkspaceOrgName:o}):V.t("This feature is in development and not yet available to your organization.")):(0,U.Bp)(e)?(i=V.t("Need permission to view"),l=V.t("Another team owns this canvas. It\u2019s only been shared with specific people in your organization.")):i=(0,B.K)(e)?V.t("You don\u2019t have access to this template."):(0,U.sR)(e)?V.t("You don\u2019t have access to this canvas."):V.rt("This canvas was not found.");return h.createElement(h.Fragment,null,h.createElement("h1",{className:"p-quip_deleted_state__title"},i),l?h.createElement("h2",{className:"p-quip_deleted_state__subtitle"},l):null)}function getDeletedState(){let e=Math.floor(Math.random()*G.length);return G[e]}function QuipDeletedState({file:e}){let t=getDeletedState(),a=(0,U.sR)(e),n=(0,E.d4)(isContentRestrictionEnabled),r=(0,E.d4)(t=>(0,H.A)(t,{file:e})),i=(0,U.sR)(e)&&!r,l=(0,E.d4)(W.ZT);if((0,U.ZG)(e))return null;let o=getIconForFile(e,a,t),s=getTextForFile({file:e,experimentDsaContentRestrictionGroupOn:n,workspaceId:l,isExternallyOwnedCanvas:r,deletedState:t});return h.createElement(I.z,null,h.createElement("div",{className:"p-quip_deleted_state_container"},h.createElement("div",{className:"p-quip_deleted_state"},h.createElement("div",{className:"p-quip_deleted_state__icon"},o),h.createElement("div",{className:"margin_bottom_100"},s),i&&h.createElement(P.A,{fileId:e.id}))))}getIconForFile.displayName="getIconForFile",getTextForFile.displayName="getTextForFile",QuipDeletedState.displayName="QuipDeletedState";var q=a(0x120c268ad),j=a.n(q),z=a(0x1f4e32220),K=a(0x14fad6485),$=a(0xd6ba6894),Y=a(0x40c0d834),Q=a(0x4f6e90b4),Z=a(0x15279822),J=a(0x3bc7bbd5),X=a(0x12edaa96a),ee=a(0x14abc22b0),et=a(0xf3c40abe),ea=a(0x170ab2576),en=a(0x193f39c5f),er=a(0x365a4cc3);function useAiDraftContent({fileId:e,docEmbed:t,isEditingDisabled:a}){let n=!!(0,en.A)(t?.editorContainer),r=(0,E.d4)(t=>e?(0,er.k8)(t,e):void 0),i=(0,E.d4)(e=>r?(0,er.Ke)(e,r.id):void 0),{id:l,focusedSectionId:o}=r??{},s=(0,h.useRef)(!1);(0,h.useEffect)(()=>{e&&t&&!s.current&&!a&&n&&(s.current=!0,i&&t.docEditor?.initiateAiAssistant("resume",{initialContentSessionId:l,initialSectionId:o}))},[l,o,e,t,i,a,n,r])}var ei=a(0x279547d2);function useCanvasSavedSections({docEmbed:e,canvasFile:t}){(0,h.useEffect)(()=>{let a=Object.entries(t?.savedSections??{}).map(([e,t])=>{let{date_completed:a,is_archived:n,date_due:r}=t??{},i=!t||a||n;return{sectionId:e,reminderMs:!i&&r?1e3*r:null,deleted:!!i}});e?.docEditor.updateReminders(a)},[e,t?.savedSections])}var el=a(0xb454ea59),eo=a(0x1a6bfa734),es=a(0x6bd05def);function useDocIdWarning(e){let[t,a]=(0,h.useState)(!1),n=(0,es.A)(),r=(0,eo.A)(),i=(0,h.useRef)(!0);return(0,h.useEffect)(()=>()=>{i.current=!1},[]),(0,h.useEffect)(()=>{if((0,el.W)()||e.isCreated()&&e.id.get())return b.A;n.count("canvas_metric_optimistic_canvas_creation"),setTimeout(()=>{e.isCreated()&&e.id.get()||(r.error(Error("ID not resolved after 10000s"),{id:e.id.get(),isCreated:e.isCreated(),isMounted:i.current}),n.count("canvas_metric_id_resolution_failure_10000ms"),i.current&&a(!0))},1e4),setTimeout(()=>{e.isCreated()&&e.id.get()||(r.error(Error("ID not resolved after 30000s"),{id:e.id.get(),isCreated:e.isCreated(),isMounted:i.current}),n.count("canvas_metric_id_resolution_failure_30000ms"))},3e4);let listener=()=>{e.isCreated()&&e.id.get()&&a(!1)};return e.id.listen(listener),()=>e.id.unlisten(listener)},[e,r,n]),t}var ec=a(0x1f022ebd9),ed=a(0xfe5aa224),em=a(0xaa84f9d4),eu=a(0x15f4f83cf),ep=a(0x14ea3ce99);function useEmbedAutoFocus({quipThreadId:e,fileId:t,inFlexpane:a,isPreview:n,isInSuggestedTab:r,isCommentOpen:i,disableEditing:l,hasExplicitFocusSection:o}){let s=(0,em.t)(e),c=(0,h.useContext)(ed.A),d=(0,E.d4)(e=>t&&(0,ep.Lp)(e,t)||void 0),m=!!t,u=(0,eu.uz)(d),p=!o&&!n&&!r&&!i&&(c||!l)&&(!m||u);return(0,ec.A)(()=>{s.info(`Autofocus ${p}`,{inFlexpane:a,isPreview:n,isInSuggestedTab:r,hasFileId:m,hasKeyboardFocus:c,disableEditing:l,fileIsExistent:u,hasExplicitFocusSection:o})},[p]),p}var eh=a(0x250a952a5),e_=a(0x22f6121cb),ef=a(0xf09fa16e),eb=a(0x22eadb31b),eg=a(0x17a41206b),ey=a(0xca924ee1),eA=a(0x3e015234),ex=a(0x1cf0d97e1),eE=a(0x12acb1d55);let eC=(0,ey.A)(e=>new eA.A({teamId:e,cacheSizeMaximum:25,cacheSizeTarget:20,evictionEnabled:!0,getObjects:ek,removeObjects:eE.l,label:"quipUpdates",samplePercentage:100})),ek=(0,ex.Ay)(e=>e?.quipUpdates);ek.meta={name:"getAllUpdates",key:"createSelectorGetAllUpdates",description:e=>e?.quipUpdates};let ev=(0,ex.Ay)((e,t)=>{let a=ek(e)[t],n=(0,W.Kc)(e);return n&&(a?eC(n).recordHit(t):eC(n).recordMiss()),a});ev.meta={name:"getUpdateById",key:"createSelectorGetUpdateById",description:(e,t)=>{let a=ek(e)[t],n=(0,W.Kc)(e);return n&&(a?eC(n).recordHit(t):eC(n).recordMiss()),a}};let eS=(0,ex.Ay)((e,t)=>ev(e,t)?.lastSaved);eS.meta={name:"getLastSaved",key:"createSelectorGetLastSaved",description:(e,t)=>ev(e,t)?.lastSaved};var eI=a(0x141589b4d);function useEmbedDirtyWarning({docEmbed:e,fileId:t,quipThreadId:a,connectivityCheckThreshold:n=6e4,unsavedMsThreshold:r=12e4}){let[i,l]=(0,h.useState)(!1),o=(0,em.t)(a),s=(0,h.useRef)(!1);(0,eh.V)(e,()=>{s.current=!0});let c=(0,h.useRef)({isDirty:!1,isBridgeError:!1,hasBeaconedError:!1}),d=(0,es.A)(),m=(0,E.d4)(eg.sc),u=(0,E.d4)(eI.Ib),p=(0,eb.x)(),_=(0,h.useRef)(!1);(0,h.useEffect)(()=>()=>{let e=p.createSpan({name:"canvas:unsaved-state-check",options:{tags:{success:!_.current}},samplingOptions:{sampleType:g.tS.ALWAYS}});e.close(),p.reportSpans([e])},[p]);let f=(0,E.d4)(e=>t&&eS(e,t))||0,b=(0,h.useRef)(null);(0,h.useEffect)(()=>{l(!1),c.current.isDirty=!1,c.current.hasBeaconedError=!1},[f]);let y=(0,ef.A)();return(0,e_.A)(async()=>{let a;if(!e||!t||!s.current)return;let n=e.docEditor;try{a=await n.getIsDirty(),c.current.isBridgeError=!1}catch(e){c.current.isBridgeError?o.warn(e):(c.current.isBridgeError=!0,o.error(e));return}if(y.current)if(a){b.current=b.current||Date.now();let e=Math.min(Date.now()-b.current,Date.now()-f);if(e>r){l(!0);let t=o.warn;m&&!c.current.hasBeaconedError&&(t=o.error,c.current.hasBeaconedError=!0),t(Error("Unsaved state duration exceeds threshold"),{timeNotSaved:e}),c.current.isDirty||(c.current.isDirty=!0,m&&!_.current&&(_.current=!0,u?d.count("canvas_metric_edit_failure_degraded"):d.count("canvas_metric_edit_failure")))}else l(!1),c.current.isDirty&&(c.current.isDirty=!1,c.current.hasBeaconedError=!1)}else b.current=null,l(!1),c.current.isDirty&&(c.current.isDirty=!1,c.current.hasBeaconedError=!1)},n),i}var ew=a(0x1b7c571ae),eT=a(0xba9cc4e8),eN=a(0x139aa1a7),eM=a(0xd843ab47),eR=a(0x1d774a049),eP=a(0x3c23499b);function useEmbedMountClog({docEmbed:e,fileId:t,versionId:a,isPreview:n}){let r=(0,_.wA)(),i=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_open_doc_clog_v2")),{view:l}=(0,h.useContext)(eM.A),o=(0,E.d4)(e=>(0,ep.Lp)(e,t||"")),s=(0,h.useCallback)(()=>{if(!i||!l||!t)return;let e=l?.params?.clogParams?.source;!e&&n&&(e=eR.f.CHANNEL_CANVAS_TOGGLE_PREVIEW);let s=l?.viewType===eN.D.ChannelCanvas,c=o?.show_badge,d=!!a;r((0,eP.A)({fileId:t,source:e,isChannelCanvas:s,isBadged:c,isFromQuipActivityHistory:d}))},[r,l,o,t,a,n,i]);(0,eh.V)(e,s)}var eL=a(0x205570b9a),eO=a(0xb9604b6),eD=a(0x5b1935a6),eF=a(0x3e050aef);function useEmbedSaveBeacon({fileId:e,didError:t,connectivityThresholdMs:a=6e4}){let n=(0,es.A)(),r=(0,h.useRef)(Date.now()).current,i=((0,E.d4)(t=>e&&eS(t,e))||0)>r,l=(0,E.d4)(eg.sc),o=(0,E.d4)(eI.Ib),s=l&&!o,[c,d]=(0,h.useState)(s);(0,h.useEffect)(()=>{if(s){let e=setTimeout(()=>{d(!0)},a);return()=>clearTimeout(e)}return d(!1),()=>{}},[s,a]);let m=s&&c,u=(0,h.useRef)(),p=(0,h.useRef)(!1);(0,h.useEffect)(()=>{if(!m||!i&&!t)return;let e=u.current;e||(n.count("canvas_metric_edit_session"),u.current=e=Date.now()),!t||p.current||(n.store("canvas_metric_edit_session_failure",Date.now()-e),p.current=!0)},[m,i,t,n])}var eU=a(0x153af1c54),eB=a(0x1e19d7430),eH=a(0x11ed04fa0),eW=a(0xaed97e33),eV=a(0x143fb6398),eG=a(0x217553e42);function useEmbedSlackConnectMessage({fileId:e}){let t=(0,_.wA)(),a=(0,E.d4)(t=>e?(0,ep.Lp)(t,e):null),{channelId:n}=(0,h.useContext)(eW.d),r=(0,eB.u)(),i=(0,E.d4)(eH.U6),l=!!r&&i,o=(0,E.d4)(e=>l?(0,eG.OL)(e,n):a?.linked_channel_id?(0,eG.OL)(e,a.linked_channel_id):null);(0,h.useEffect)(()=>{e&&a&&(a&&(0,U.Eo)(a)||l&&o&&(0,eV.ju)(o)?t((0,eF.Ei)({fileId:e})):t((0,eF.rB)({fileId:e})))},[t,e,a,o,l])}function useEmbedLoadedInfoEffect(e,t){let a=(0,h.useRef)(t);a.current=t,(0,h.useEffect)(()=>{if(!e)return;let docLoadInfoListener=(t,n)=>{n&&a.current?.(e)};return docLoadInfoListener(void 0,e.loadInfo.get()),docLoadInfoListener.callbackRef=a,e.loadInfo.listen(docLoadInfoListener),()=>{e.loadInfo.unlisten(docLoadInfoListener)}},[e])}var eq=a(0x5cda1a03),ej=a(0x229c764f0);function useQuipOpenPopovers({docEmbed:e}){let t=(0,_.wA)(),{windowId:a}=(0,h.useContext)(K._0),{popoverOpen:n}=(0,en.A)(e?.selectionState)??{},r=(0,h.useRef)(n);(0,h.useEffect)(()=>{let e=r.current;n&&!e&&t((0,ej.r)({windowId:a})),!n&&e&&t((0,ej.K)({windowId:a})),r.current=n},[n,t,a]),(0,h.useEffect)(()=>()=>{r.current&&t((0,ej.K)({windowId:a}))},[t,a])}var ez=a(0x2040f25b2),eK=a(0x1f355b555),e$=a(0x11a296110),eY=a(0x6e87d4ec),eQ=a(0x10bae7b36),eZ=a(0xaa596f75),eJ=a(0x3711e82d),eX=a(0x1fa458710),e0=a(0x1fcbb004d);let e1=new S.Ay("slack_docs");function RestoreConfirmationErrorModal({fileId:e}){let t=(0,_.wA)(),a=(0,h.useCallback)(()=>{t((0,e0.O)()),t((0,eX.A)({fileId:e,source:eR.f.QUIP_ACTIVITY_HISTORY_FLOATING_BAR}))},[t,e]);if(!(0,E.d4)(t=>(0,eZ.OB)(t,e)))return null;let n=e1.t("Couldn\u2019t load history",{fallbackHash:"11587194df16ddfc5a1543b5ce86148ee53328e1",fallbackHashNs:"slack-docs"}),r=e1.t("Activity history has been disabled for this canvas",{fallbackHash:"11587194df16ddfc5a1543b5ce86148ee53328e1",fallbackHashNs:"slack-docs"}),i=e1.t("Confirm",{fallbackHash:"04a212215ef9fbf686d280802eb81ee7a6e681cd",fallbackHashNs:"quip"});return h.createElement(Y.A,{eventId:eJ.EventId.QUIP_CANVAS_ACTIVITY_HISTORY,elementType:eJ.ElementType.MODAL,uiComponentName:eJ.UiComponentName.QUIP_ACTIVITY_HISTORY_RESTORE_MODAL,clogImpression:!0,enableClogImpressionOffScreen:!0},h.createElement(eQ.A,{title:n,onClose:a,onSubmit:a,showCancelButton:!1,submitButtonText:i,isSubmitButtonALoadingButton:!0},r))}RestoreConfirmationErrorModal.displayName="RestoreConfirmationErrorModal";var e2=a(0x2b7f0bcc),e4=a(0x1baf00183),e5=a(0x2378cf6ec),e3=a(0xe874a88a),e6=a(0x16998c9bf),e8=a(0x16da103d6),e7=a(0x1d43eb6d7),e9=a(0x11c82607b),te=a(0x15bbd15e5),tt=a(0x15fd077c3);let ta=(0,e9.Ay)("Restores a quip version",async(e,t,a)=>{let{fileId:n,windowId:r,versionId:i,sequence:l}=a;try{let{ok:a,createdVersionId:o}=await e((0,e8.F)({fileId:n,versionId:i,sequence:l,reason:"quip-history-restore"}));a&&((0,e7.Ay)({getState:t}).info(`Restored canvas (${n}) to version ${i}, new version generated ${o}`),e((0,te.fw)({windowId:r,versionId:o??void 0})))}catch(a){return(0,e7.Ay)({getState:t}).error(a,"Failed to restore a version"),"owner_disabled"===(0,e6.iT)(a).name&&(e((0,te.J1)({versions:[],newestCreatedUsec:-1,oldestCreatedUsec:-1,isOwnerDisabled:!0,fileId:n,windowId:r})),e((0,eX.A)({fileId:n,source:eR.f.QUIP_ACTIVITY_HISTORY_FLOATING_BAR,isFromQuipActivityHistory:!0,shouldOpenActivityHistory:!0}))),e3.S.reject(Error("Unable to restore version"))}return await e((0,tt.Ey)({fileId:n,windowId:r,fetchDirection:tt.CK.NEWER})),e3.S.resolve()});ta.meta={name:"restoreQuipVersion",key:"createThunkRestoreQuipVersion",description:"Restores a quip version"};let tn=new S.Ay("slack_docs"),tr={eventId:eJ.EventId.QUIP_CANVAS_ACTIVITY_HISTORY,elementName:"restore-button",onClick:{enableClogAction:!0},isPrimaryCTA:!0,fileId:""},ti={eventId:eJ.EventId.QUIP_CANVAS_ACTIVITY_HISTORY,elementName:"cancel-button",onClick:{enableClogAction:!0},fileId:""};function RestoreConfirmationModal({fileId:e,version:t,versionId:a,sequence:n,onRestoreCompleted:r}){let i=(0,_.wA)(),l=(0,E.d4)(e=>t?.author?(0,e5.I)(e,t?.author):void 0),o=(0,E.d4)(t=>(0,ep.Lp)(t,e)),s=(0,U.dE)(o),[c,d]=(0,h.useState)(!1),[m,u]=(0,h.useState)(!1),{windowId:p}=(0,h.useContext)(eM.A),f=(0,h.useCallback)(()=>{i((0,e0.O)())},[i]),b=(0,h.useCallback)(()=>(d(!0),i(ta({fileId:e,windowId:p,versionId:a,sequence:n})).then(()=>{d(!1),r()}).catch(()=>{u(!0)}).finally(()=>{d(!1),i((0,e0.O)())})),[i,e,p,a,n,r]),g=(0,E.d4)(t=>(0,eZ.OB)(t,e));if(!g)return null;let y=tn.t("Restore this version?"),A=(0,eK.Ay)(t?.createdMs),x=s?tn.t("This template will be updated to match the version last edited by {author} {date} at {time}",{author:l,date:(0,e4.u)(A,g),time:A.format("h:mm A")}):tn.t("This canvas will be updated to match the version last edited by {author} {date} at {time}",{author:l,date:(0,e4.u)(A,g),time:A.format("h:mm A")}),C=tn.t("Restore");return tr.fileId=e,ti.fileId=e,h.createElement(Y.A,{eventId:eJ.EventId.QUIP_CANVAS_ACTIVITY_HISTORY,elementType:eJ.ElementType.MODAL,uiComponentName:eJ.UiComponentName.QUIP_ACTIVITY_HISTORY_RESTORE_MODAL,clogImpression:!0,enableClogImpressionOffScreen:!0},h.createElement(eQ.A,{title:y,onClose:f,onCancel:f,onSubmit:b,submitButtonText:C,isSubmitting:c,isSubmitButtonALoadingButton:!0,submitAutoClogProps:tr,cancelAutoClogProps:ti},m&&h.createElement(e2.Ay,{className:"margin_bottom_100",level:e2.A_.error,"data-qa":"restore-confirmation-dialog-error"},tn.t("Unable to restore version.",{memberName:l})),x))}RestoreConfirmationModal.displayName="RestoreConfirmationModal";var tl=a(0x1f3226107),to=a(0x303eaaff),ts=a(0x46dbff89),tc=a(0x217a09a00),td=a(0xf2e9d142),tm=a(0x16ffed5ab);let tu=new S.Ay("slack-docs"),tp={elementName:"restore_activity_history_floating_bar",onClick:{enableClogAction:!0},isPrimaryCTA:!0},QuipActivityHistoryFloatingBar=({fileId:e,versionId:t,sequence:a,sectionNavigationProps:n})=>{let r=(0,_.wA)(),i=!!(0,E.d4)(eZ.O4),l=(0,E.d4)(t=>(0,ep.Lp)(t,e)),o=(0,U.dE)(l),{windowId:s}=(0,h.useContext)(eM.A),c=(0,E.d4)(e=>(0,tc.Mk)(e,s,t)),d=(0,E.d4)(e=>(0,tc.xu)(e,s)),m=(0,E.d4)(e=>c?.author?(0,e5.I)(e,c?.author):void 0),{sectionId:u,sectionIndex:p,enableSectionNavigation:f}=n,b=!!c&&c.versionId===d?.versionId,g=(0,eK.Ay)(c?.createdMs),y=(0,e4.u)(g,i),A=g.format("h:mm A"),x=i?tu.rt("Viewing version by <b>{author}, {date} at {time}</b>",{author:m,date:y,time:A}):"",C="";i&&(C=o?tu.t("Template restored to the version by {author}, {date} at {time}",{author:m,date:y,time:A}):tu.t("Canvas restored to the version by {author}, {date} at {time}",{author:m,date:y,time:A}));let k=(0,h.useCallback)(()=>{r((0,td.A)({fileId:e,windowId:s,source:eR.f.QUIP_ACTIVITY_HISTORY_FLOATING_BAR,isFromCloseActivityHistory:!0})),r((0,tm.M)({element:h.createElement("div",{className:"p-activity_history__floating_bar__toast"},h.createElement(eY.A,{svgIconProps:{name:"check-circle"}},C))}))},[s,r,e,C]),v=(0,h.useCallback)(async()=>{t&&a&&(await r((0,tl.B2)({fileId:e,reason:"quip-activity-history-restore-clicked"})),l.team_pref_version_history_enabled?r((0,ts.q)({element:h.createElement(RestoreConfirmationModal,{fileId:e,version:c,versionId:t,sequence:a,onRestoreCompleted:k})})):(r((0,te.J1)({versions:[],newestCreatedUsec:-1,oldestCreatedUsec:-1,isOwnerDisabled:!0,windowId:s,fileId:e})),r((0,ts.q)({element:h.createElement(RestoreConfirmationErrorModal,{fileId:e})}))))},[t,a,r,e,c,k,s,l]);if(!i||!t||!c)return null;let S=tu.t("Restore this version");return h.createElement(to.A,{id:u,index:p,enableSectionNavigation:f},h.createElement("div",{className:"p-activity_history__floating_bar"},h.createElement("div",{className:"p-activity_history__floating_bar__preview",role:"group"},h.createElement("div",{className:"p-activity_history__floating_bar__text"},x),!b&&h.createElement("div",{className:"p-activity_history__floating_bar__button-wrapper"},h.createElement(e$.Ay,{type:"primary",onClick:v,autoClogProps:tp},S)))))};QuipActivityHistoryFloatingBar.displayName="QuipActivityHistoryFloatingBar";var th=a(0x1d01572a2),t_=a(0x224f7f0e9),tf=a(0x1ba99e8c);let QuipAutocompleteUiProvider=class QuipAutocompleteUiProvider{delegate;updateSearchQueryCallback;performAutocompleteActionCallback;performAutocompleteShortcutCallback;constructor({updateSearchQueryCallback:e,performAutocompleteActionCallback:t,performAutocompleteShortcutCallback:a}){this.updateSearchQueryCallback=e,this.performAutocompleteActionCallback=t,this.performAutocompleteShortcutCallback=a}setDelegate(e){this.delegate=e}updateAutocompleteSearchQuery(e,t,a,n){return this.updateSearchQueryCallback(e,t,a,n)}performAutocompleteAction(e){this.performAutocompleteActionCallback(e)}handleAutocompleteCommand(e){this.performAutocompleteShortcutCallback(e)}didSelectSlackObject(e,t){this.delegate?.didSelectSlackObject(e,t)}didSelectShortcutCommand(e){this.delegate?.didSelectShortcutCommand(e)}tearDown(){}};var tb=a(0x9e671ad),tg=a(0x1bfd1c416),ty=a(0x75a8557f),tA=a(0xb7c07c2c),tx=a(0x10d53599f),tE=a(0x226d2c646),tC=a(0xa1832ae4),tk=a(0x20e80190e),tv=a(0x1ee439e69);let tS=new S.Ay("placeholder-unfurls"),tI={entities:{channels:!1,members:{includeSelf:!0,includeSlackbot:!1,includeBots:!1},userGroups:!1},allowEmptyQuery:!0},UserPicker=({onUserSelect:e,isReplacement:t})=>{let a=(0,_.wA)(),[n,r]=(0,h.useState)(null),[i,l]=(0,h.useState)(!1),o=(0,E.d4)(e=>(0,tC.Zl)((0,tv.H7)(e))),s=(0,h.useCallback)(()=>{a((0,e0.O)())},[a]),c=(0,h.useCallback)(e=>r(e.entity?.id??null),[]),d=(0,h.useCallback)(e=>e.entity?h.createElement(tx.A,{id:e.entity.id}):null,[]),m=(0,h.useCallback)(e=>e.entity?h.createElement(tx.A,{id:e.entity.id}):null,[]),u=(0,h.useCallback)(()=>{l(!0);let t=`${o}team/${n}`;try{e(n,t),s()}catch{l(!1)}},[s,n,o,e]),p=tS.t("Insert",{fallbackHash:"95802daab3a23990338179f72248350c1434cf39",fallbackHashNs:"slack_docs"});return t&&(p=tS.t("Save")),h.createElement(tk.dW,{closeModal:s},h.createElement(tk.rQ,null,h.createElement(tk.Rc,{"data-qa":"canvas_user_picker_title",title:tS.t("Add a user profile")})),h.createElement(tk.$m,null,h.createElement(tk.qf,{className:"margin_25"},h.createElement(tE.u,{selectId:"canvas_user_picker_add_user_select","data-qa":"canvas_user_picker_add_user_select",isRequired:!0,placeholderText:tS.t("Add by name"),searcherOptions:tI,onOptionSelected:c,width:"100%",renderSelectedOption:m,renderOption:d,focusOnMount:!0,expandOnFocus:!1,ariaLabel:tS.t("User select",{fallbackHash:"d1ee12cb32288f22dc618bc04300dd3ac19a2072",fallbackHashNs:"slack_forms"})}))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(tk.s_,{"data-qa":"canvas_user_picker_close_button",type:"outline","aria-label":tS.t("Close")},tS.t("Close")),h.createElement(e$.lV,{type:"primary","data-qa":"canvas_user_picker_primary_button",loading:i,onClick:u,disabled:!n,"aria-label":p},p))))};UserPicker.displayName="UserPicker";let openUserPicker=({onUserSelect:e,isReplacement:t})=>(0,ts.q)({element:h.createElement(UserPicker,{onUserSelect:e,isReplacement:t}),name:"placeholder-add-profile-modal"});openUserPicker.displayName="openUserPicker";let optimisticallyInsertFiles=(e,t,a,n)=>{let r=t.map(e=>({type:f.SlackObjectType.FILE,id:"",altText:"",name:e.name||"",mimeType:e.type,sourceFile:e}));e.insertSlackObjects(r,{sectionId:a},n)};var tw=a(0x7cdf00a5),tT=a(0xf30afc61),tN=a(0x1358cdce9),tM=a(0x2197a83e3),tR=a(0x15d55664b),tP=a(0x22fd0ecc8),tL=a(0xe17ba6e9),tO=a(0x567f1549),tD=a(0x107417dfc);let tF={},tU=(0,ex.Ay)((e,t)=>t?e.salesforceDataFieldLastSelection?.selectionByCanvasId?.[t]??tF:tF);tU.meta={name:"getLastDataFieldSelection",key:"createSelectorGetLastDataFieldSelection",description:(e,t)=>t?e.salesforceDataFieldLastSelection?.selectionByCanvasId?.[t]??tF:tF};let tB=f.SlackShortcutMetricSource.DEFAULT_SOURCE;function useQuipAutocompleteShortcuts(e,t,a,n){let r=(0,_.wA)(),i=(0,h.useRef)(""),{caretSectionId:l,disallowedShortcutTypes:o}=(0,en.A)(a?.selectionState)??{},[s,c]=(0,h.useState)(),d=(0,h.useMemo)(()=>a?.docEditor,[a]),m=(0,E.d4)(e=>tU(e,n));(0,h.useEffect)(()=>{(0,tb.A)(o,s)||c(o)},[o,s]),(0,h.useEffect)(()=>{l&&(i.current=l)},[i,l]);let u=(0,h.useCallback)((e,t)=>{let a=t?.shortcut_url??t?.share_url;if(!a)return;d?.focusEditor();let n=i.current;d?.insertSlackObject({type:f.SlackObjectType.LINK,id:e,url:a},{sectionId:n},tB)},[d]),p=(0,h.useCallback)(()=>{r((0,tR.Ay)({source:tB,onInsertWorkflow:u}))},[r,u]),b=(0,h.useCallback)((e,t)=>{let a=i.current;d&&optimisticallyInsertFiles(d,[t],a,tB)},[d]),g=(0,h.useCallback)(e=>{r((e===tw.r.AUDIO_CLIP?tN.A:tM.A)({onContainerUpload:b}))},[r,b]),y=(0,h.useCallback)(t=>{d?.focusEditor(),r((0,tl.PF)({fileId:t})).then(a=>{let l=i.current,o={type:f.SlackObjectType.DOCUMENT,id:t,name:(0,tP.SB)(a)||"",permalink:(0,U.IE)(a,e??"","","")};d?.insertSlackObject(o,{sectionId:l,useDefaultFormat:!0},tB),r((0,tO.A)({source:tA.O.SHORTCUT,parentCanvasId:n,embeddedFileId:t}))})},[d,r,e,i,n]),A=(0,h.useCallback)(()=>{d?.focusEditor();let e=i.current,t={type:f.SlackObjectType.DOCUMENT,id:"",name:"",pendingCreation:!0};d?.insertSlackObject(t,{sectionId:e,useDefaultFormat:!0},tB)},[d,i]),x=(0,h.useCallback)(()=>{r((0,tg.Ay)({onInsertCanvas:y,onInsertNewCanvas:A,source:tB}))},[r,y,A]),C=(0,h.useCallback)(async e=>{d&&(d.focusEditor(),optimisticallyInsertFiles(d,e,i.current,tB))},[d,i]),k=(0,h.useCallback)((e,t)=>{if(!e)return;d?.focusEditor();let a=i.current;d?.insertSlackObject({type:f.SlackObjectType.LINK,id:e,url:t},{sectionId:a},tB)},[d]),v=(0,h.useCallback)(()=>{r(openUserPicker({onUserSelect:k}))},[r,k]),S=(0,h.useCallback)(()=>({sectionId:i.current,cardRenderType:f.SlackListContentRenderType.EMBED}),[]),I=(0,h.useCallback)(({fileId:t,listViewId:a})=>{d?.focusEditor();let i=S();r((0,tl.PF)({fileId:t})).then(l=>{let o=(0,U.IE)(l,e??"","","",a);d?.insertSlackObject({type:f.SlackObjectType.LIST,id:t,permalink:o},i,tB),r((0,tO.A)({source:tA.O.SHORTCUT,parentCanvasId:n,embeddedFileId:t}))})},[r,d,e,S,n]),w=(0,h.useCallback)(()=>{d?.focusEditor();let e=S();d?.insertSlackObject({type:f.SlackObjectType.LIST,id:"",permalink:""},e,tB)},[d,S]),T=(0,h.useCallback)(()=>{r((0,tT.Ay)({onInsertList:I,onInsertNewList:w,source:tB}))},[r,I,w]),N=(0,h.useCallback)(e=>{if(!e)return void d?.initiateAiAssistant(tB);let t=(0,tL.nK)(e);d?.initiateAiAssistant(tB,{starterPrompt:t})},[d]),M=(0,h.useCallback)((e,t,a,l,o,s)=>{d?.focusEditor();let c=i.current;d?.insertSlackObject({type:f.SlackObjectType.SALESFORCE_RECORD,id:t,permalink:e,fieldLabel:a,fieldApiName:l,includeFieldLabel:s},{sectionId:c},tB),o&&n&&r((0,tD.h)({canvasId:n,selection:o}))},[d,r,n]),R=(0,h.useCallback)((e,t)=>{d?.focusEditor();let a=i.current;d?.insertSlackObject({type:f.SlackObjectType.LINK,id:t,url:e},{sectionId:a},tB)},[d]),P=(0,h.useCallback)(()=>{r((0,ty.b)({onInsertRecord:R,source:"quip-autocomplete-shortcuts"}))},[r,R]),L=(0,h.useCallback)(()=>{r((0,ty.b)({onInsertRecord:M,source:"quip-autocomplete-shortcuts",includeFieldPicker:!0,defaultOrgId:m.orgId,defaultObjectType:m.objectType,defaultRecord:m.record}))},[r,M,m]);return{performAutocompleteShortcutCallback:(0,h.useCallback)(e=>{switch(e){case f.SlackShortcutCommandType.CANVAS:x();break;case f.SlackShortcutCommandType.IMAGE:t(tw.r.IMAGE);break;case f.SlackShortcutCommandType.FILE:t();break;case f.SlackShortcutCommandType.VIDEO:g(tw.r.VIDEO_CLIP);break;case f.SlackShortcutCommandType.AUDIO:g(tw.r.AUDIO_CLIP);break;case f.SlackShortcutCommandType.WORKFLOW:p();break;case f.SlackShortcutCommandType.PROFILE:v();break;case f.SlackShortcutCommandType.LIST:T();break;case f.SlackShortcutCommandType.AI_ASSISTANT:N();break;case f.SlackShortcutCommandType.AI_ASSISTANT_CANVAS_SUMMARY:N(tL.Ex.CANVAS_SUMMARY);break;case f.SlackShortcutCommandType.AI_ASSISTANT_CANVAS_ACTION_ITEMS:N(tL.Ex.CANVAS_ACTION_ITEMS);break;case f.SlackShortcutCommandType.SALESFORCE_DATA_MENTION:L();break;case f.SlackShortcutCommandType.SALESFORCE_RECORD:P()}},[x,t,g,p,v,T,N,L,P]),onFilesSelectedHandler:C,disallowedShortcuts:s}}var tH=a(0x22809c249),tW=a(0x62a5c3a9),tV=a(0x81b4e6a1),tG=a(0x81be5f45),tq=a(0x12185e091),tj=a(0x1ecc7f772),tK=a(0x1b9d5cc0c),t$=a(0x82980ab8),tY=a(0x21d85d6e5),tQ=a(0x1aad32b98),tZ=a(0x16ed1b0dc),tJ=a(0x4f725d55),tX=a(0x25329bb92),t0=a(0x1e4ae349d),t1=a(0x253bb16b9),t2=a(0x2d90c1a8);let t4=new S.Ay("quip_autocomplete");function QuipAutocomplete({containerRef:e,docEmbedRef:t,focus:a,fileId:n}){let r=t.current,i=(0,h.useRef)(null),l=(0,h.useRef)(b.A),o=(0,E.d4)(W.ZT),s="on"===(0,E.d4)(e=>(0,F._Z)(e,"canvas_group_mentions")),{sendMessageToAnnouncerAPI:c}=(0,h.useContext)(ee.A),d=(0,_.wA)(),{getState:m}=(0,_.Pj)(),u=(0,h.useRef)(null),p=(0,h.useRef)(null),g=(0,h.useCallback)(e=>{if("member"===e.type)try{return(0,tY.sE)(m(),e.item)}catch{(0,e7.ph)().warn("Unable to get member name from autocomplete result")}return e.item.name},[m]),{performAutocompleteShortcutCallback:y,onFilesSelectedHandler:x,disallowedShortcuts:C}=useQuipAutocompleteShortcuts(o,(0,h.useCallback)((e=tw.r.FILE)=>{if(p.current){let t="";e===tw.r.IMAGE&&(t="image/*"),p.current.accept=t,p?.current?.click()}},[p]),r,n),k=(0,h.useCallback)(()=>{let e=r?.editorContainer?.get().ownerDocument.activeElement;u.current&&u.current!==e&&(0,tV.lw)(u.current),e&&((0,tV.hN)(e),u.current=e);let t=i.current;if(!t)return;let a="",n=t.getMatchResults();if(n?.length){let e=n.length,r=g(n[t.getSelectedIndex()??0]);a=t4.t("{count, plural, =1 {# search result} other {# search results}}",{count:e})+(r?` ${t4.t("Top result: {resultName}. Press Enter to activate.",{resultName:r})}`:` ${t4.t("Press Enter to activate top result.")}`)}else a=(t.getMatchText()?.length??0)>0?t4.t("No results."):"";c({assertive:!0,message:a})},[r?.editorContainer,c,g]),v=(0,h.useCallback)(()=>i.current?.onRequestClose(),[]),S=(0,h.useMemo)(()=>new QuipAutocompleteUiProvider({updateSearchQueryCallback:(t,a,n,r)=>{let l=i.current;if(!e)return e3.S.resolve(!1);let o={attributes:{},insert:`
`},s=l?.getMatch(a+t,!1,0,o);return s?.match?(l?.setSearchInFlight(s.match),new e3.S(e=>{l?.search(s.match,()=>{let t=l?.getMatchResults();if(!t||0===t.length){v(),e(!1);return}l?.onRequestOpen();let{top:a,left:n,height:i}=r;l?.positionMenu({top:a,left:n,bottom:a+i,right:n}),k(),e(!0)})})):e3.S.resolve(!1)},performAutocompleteActionCallback:e=>{let t=r?.docEditor;switch(e){case f.AutocompleteActions.SELECT:l.current();break;case f.AutocompleteActions.MOVE_SELECTION_DOWN:i.current?.onArrowKey(t_.n6);break;case f.AutocompleteActions.MOVE_SELECTION_UP:i.current?.onArrowKey(t_.i7);break;case f.AutocompleteActions.CLOSE:v(),i.current?.setSearchInFlight(null),t?.focusEditor();break;default:(0,e7.ph)().warn(`Autocomplete Action: ${e} not supported.`)}},performAutocompleteShortcutCallback:y}),[r?.docEditor,e,v,k,y]),I=(0,h.useCallback)(e=>{let t,a="";if(e.format?.slackmention){if(a=e.format.slackmention.id,(0,tJ.A)(a)){let e=d((0,t2.A)(a)),n=(0,tQ.QI)(e)??o,r={id:a,type:f.SlackObjectType.USER,displayName:(0,t$.Gt)(e)??"",realName:(0,t$.wg)(e),teamId:n,profileUrl:(0,tC.Zl)((0,tv._J)(m(),n),`/team/${e.id}`)},i=(0,tK.jc)(e);i&&(r.image48=i),t=r}else if((0,tZ.A)(a)){let e=d((0,tX.O)({channelId:a}));t={id:a,type:f.SlackObjectType.CHANNEL,name:(0,tj.Mn)(e),isPrivate:(0,tq.Zp)(e),workspaceId:o}}else if((0,A.A)(a)){let n={id:a,name:e.format.slackmention.label,permalink:e.format.slackmention.link};t=e.format?.filetype===tf.p.quip?{type:f.SlackObjectType.DOCUMENT,shouldShowDocument:!0,...n}:{type:f.SlackObjectType.FILE,...n}}}else if(e.slackemoji||e.text?.match(tW.EMOJI_MATCH_RX)){let n=e.slackemoji?.text??e.text,r=(0,t0.i8)(m(),n)||(0,t0.cU)(m(),{text:n,teamId:o}),i=d((0,t1.A)({result:r??{name:n},emojiText:n}));a=i.id,t=i}return{id:a,object:t}},[d,o,m]);l.current=(0,h.useCallback)(()=>{let e=i.current;e?.possiblySelectFirstItem(()=>{e?.setSearchInFlight(null);let t=e?.getInsertDataFromActiveResult();if(t?.isCanvasShortcut)S?.delegate?.didSelectShortcutCommand(t?.id);else{let e=I(t);S?.delegate?.didSelectSlackObject(e.id,e.object)}e?.onSelect({fromKeyboard:!0}),e?.clearMatchState(),v()})},[S?.delegate,v,I]),(0,h.useEffect)(()=>{if(r&&S&&"function"==typeof r.setAutocompleteUiProvider)return r.setAutocompleteUiProvider(S),()=>{S.tearDown?.(),r.setAutocompleteUiProvider(void 0)}},[r,S]),(0,th.A)(()=>{let maybeUpdateInputAriaAttributes=()=>{let e=i.current;u.current&&e&&(0,tV.P)(u.current,e.getSelectedIndex())};i.current?.onInit({performSelection:()=>l.current(),ariaExpand:maybeUpdateInputAriaAttributes,ariaActiveDescendant:maybeUpdateInputAriaAttributes,hideMenu:b.A})});let w=(0,h.useCallback)(()=>{u.current&&((0,tV.lw)(u.current),u.current=null),a(eT.p.AutocompleteClose)},[a]);return h.createElement(h.Fragment,null,h.createElement(tH.A,{ref:p,onFilesSelectedHandler:x}),h.createElement(tG.A,{fileId:n,renderInput:b.A,position:"bottom",stickyPosition:!1,completeOnMembers:!0,completeOnChannels:!0,completeOnEmoji:!0,autocompleteConfig:i,disallowedResults:C,shouldCloseOnOverlayMouseDown:!0,onClose:w,zIndex:"modal",isCanvas:!0,excludeBroadcastKeywordMembers:!0,excludeUserGroupMembers:!s}))}QuipAutocomplete.displayName="QuipAutocomplete";var t5=a(0x1b7dc8bdb),t3=a(0x106f06f59);let quip_editor_ui_connector_renderer=function({docEmbed:e,fileId:t}){let a=(0,_.Pj)(),{windowRef:n}=(0,h.useContext)(K._0),r=(0,h.useRef)();return(0,h.useEffect)(()=>{r.current&&!r.current.shouldReset(e)?r.current.updateMutableVariables(t,e,n.deref()):(r.current?.tearDown(),r.current=t3.A.create(t,a.dispatch,e,n.deref()),e.setEditorUiConnector(r.current))},[n,a,e,t]),(0,h.useEffect)(()=>()=>r.current?.tearDown(),[]),null};function QuipEmbedFocusContainer({docEmbedRef:e,focus:t,inFlexpane:a,isTemplateOverlayShowing:n,children:r}){let{enableSectionNavigation:i,sectionIndex:l}=(0,eU.CR)(eU.G6.Embed,!!a),o=(0,h.useCallback)(()=>t(eT.p.Managed),[t]),s=(0,h.useCallback)(a=>{a instanceof HTMLElement&&!e.current?.editorContainer?.get()?.contains(a)?a.focus():t(eT.p.Restore)},[e,t]);return h.createElement(to.A,{id:"QuipEmbed",index:l,focusFn:o,restoreFocusFn:s,enableSectionNavigation:i&&!n},r)}QuipEmbedFocusContainer.displayName="QuipEmbedFocusContainer";var t6=a(0x22ba45688),t8=a(0x35514c28),t7=a(0x1407c6c2c),t9=a(0x1df96de4c),ae=a(0x62a17882),at=a(0x1ea53dc3a),aa=a(0x2173e1832),an=a(0x45ab12e1),ar=a(0x178788799),ai=a(0xb90d5858),al=a(0x1e1bdd25f),ao=a(0x133aaa7da),as=a(0x4c96e5d9),ac=a(0x96de2457),ad=a(0x1a769a9e8),am=a(0x20c81ddcb),au=a(0x99216ae2),ap=a.n(au);let ah=new S.Ay("slack_docs"),AgentSelectionMenuButton=({onAgentSelected:e,currentAgentId:t})=>{let a=(0,E.d4)(am.s_),n=(0,E.d4)(ac.bN),r=ah.t("Slack AI (default)",{fallbackHash:"577a71781452648c98973f9f076cca2dd09fdebc"}),i=(0,h.useMemo)(()=>h.createElement("div",{className:j()(ap().icon,ap().defaultIcon)},h.createElement(w.Ah,{name:"ai-sparkle-filled",size:"20"})),[]),l=(0,h.useMemo)(()=>h.createElement("div",{className:j()(ap().icon,ap().defaultIcon)},h.createElement(w.Ah,{name:"ai-sparkle-filled",size:"18"})),[]),o=(0,h.useCallback)(t=>{a.length>=t&&e?.(a[t-1]?.appProfile?.app_id)},[e,a]),s=(0,h.useCallback)(e=>h.createElement("img",{className:ap().icon,src:(0,ad.A)(e,512),alt:"","aria-hidden":!0}),[]),c=(0,h.useCallback)(e=>n?h.createElement(ar.Ay,{width:"auto",...e,"aria-label":ah.t("Agent selection"),menuClassNames:ap().menu},h.createElement(ai.A,{key:"canvas_ai_default",type:ao.A.radio,label:r,description:ah.t("Your Slack workspace know it all"),icon:l,checked:!t}),a.map(e=>{if(!e.appProfile)return null;let a=e.appProfile.profile,n=s(a);return h.createElement(ai.A,{key:e.appProfile.app_id,type:ao.A.radio,label:a.name,description:a.tagline,icon:n,checked:e.appProfile.app_id===t})}),h.createElement("div",{id:"ai_agent_selection_menu"})):null,[t,r,l,n,s,a]),[d,m]=(0,h.useMemo)(()=>{if(t){let e=a.find(e=>e.appProfile?.app_id===t);if(e&&e.appProfile?.profile&&n)return[s(e.appProfile.profile),e.appProfile?.profile.name]}return[null,r]},[t,r,n,s,a]),u=(0,h.useCallback)(()=>h.createElement(h.Fragment,null,h.createElement("div",null,m),h.createElement("div",{className:"normal"},ah.t("Switch agent"))),[m]),p=(0,h.useMemo)(()=>h.createElement(as.Ay,{tip:u,position:as.Zj.Bottom},h.createElement(e$.Nm,{size:"small","aria-label":ah.t("Switch agent"),className:ap().menuButton},d??i)),[d,u,i]);return n?h.createElement(al.A,{renderMenu:c,position:"bottom",onMenuItemSelected:o,preventScroll:!0,"data-qa":"embedded-hovercard-menu-trigger"},p):null};AgentSelectionMenuButton.displayName="AgentSelectionMenuButton";var a_=((r={}).NONE="none",r.FETCHING="fetching",r.INSERTING="inserting",r.INSERTED="inserted",r),af=a(0x21a78ce9d),ab=a(0x1f48e3aa4),ag=a(0xc7d91d1b);function useAiFeedbackDialog({contentId:e,contentMode:t,lastSubmittedQuery:a,clogEvent:n}){let r=(0,_.wA)(),{windowId:i,isChildWindow:l}=(0,h.useContext)(eM.A);return(0,h.useCallback)(o=>{let s=a??"",c=t===ab.de.CREATION?{canvas_create_content_context:{query:s,search_session_id:r((0,ag.w)())}}:{canvas_refine_content_context:{query:s}},d=t===ab.de.CREATION?ab.ci.CanvasCreateContent:ab.ci.CanvasRefineContent;e&&r((0,af._)({rating:o,aiResultId:e,type:d,context:c,windowId:l?i:null})),n(`${o}_feedback_button`)},[a,t,r,e,n,l,i])}var ay=a(0x118cdcdea),aA=a.n(ay),ax=a(0x1fcd1dcfb),aE=a(0x22d51fee8),aC=a(0x21e751f7e),ak=a(0x24429189c);function useAiPromptInput(e,{selectedCreationSuggestionId:t,selectedRefinementInstructionId:a,initialSelectionInstructions:n}){let r=(0,_.wA)(),i=(0,E.d4)(aE.c9),l=(0,h.useCallback)(()=>e.current,[e]),o=(0,h.useCallback)(()=>l()?.getText().trim()??"",[l]),s=(0,h.useCallback)(()=>{let e=(0,aC.A)(o(),{useChannelTagging:!0}).contents;l()?.setContents({contents:{ops:e}})},[o,l]),c=(0,h.useCallback)(()=>{let e=o()??"";if(!e.length)return{plaintext:e};let t=l()?.getContents().contents;if(!t)return{plaintext:e};let a=new(aA())(t);return{plaintext:e,blocks:r((0,ak.y)({delta:a})).blocks,inputContents:t}},[o,l,r]);return{getInputText:o,trimCurrentInputContents:s,getInstructions:(0,h.useCallback)(()=>{let e=c();if(e.plaintext.length)return{...e,goal:(0,ax.M8)(e.plaintext,i)??void 0};if(a===ax.S9.REFINE)return{plaintext:n,blocks:void 0,inputContents:void 0,goal:void 0};if(t===tL.Ex.CANVAS_SUMMARY||t===tL.Ex.CANVAS_ACTION_ITEMS||t===tL.Ex.WEEKLY_RECAP){let e=n||(0,tL.QV)(t);return{plaintext:e,blocks:void 0,inputContents:[{insert:e}],goal:(0,ax.Pb)(t)??void 0}}return null},[c,a,t,n,i])}}let av=new S.Ay("slack_docs");function useDraftStateAnnouncements({draftState:e,messageCount:t,fileCount:a}){let n=(0,E.d4)(aE.c9),r=(0,h.useContext)(ee.A),i=(0,h.useCallback)(e=>{r.sendMessageToAnnouncerAPI({message:e,assertive:!0,uuid:(0,X.A)()})},[r]),l=(0,h.useMemo)(ax.M9,[]),o=(0,h.useMemo)(()=>(0,ax.Ar)(t,a),[t,a]);(0,h.useEffect)(()=>{if(!n)return;let t=null,announceWithRepetition=e=>{i(e),t=setInterval(()=>i(e),5e3)};switch(e){case a_.FETCHING:announceWithRepetition(o);break;case a_.INSERTING:announceWithRepetition(l);break;case a_.INSERTED:i(av.t("Draft ready for review"))}return()=>{t&&(clearInterval(t),t=null)}},[r,i,e,n,a,l,o,t])}var aS=a(0x2301c802e),aI=a(0x238b287cf);function useEventClogger(e){let t=(0,aI.A)(),{slackFileId:a}=(0,h.useContext)(aS.N);return(0,h.useCallback)((n,r,i,l,o,s,c,d)=>{t.track(eJ.EventId.CANVAS_AI_INSERTION_OVERLAY,{contexts:{ui_context:{entry_point:"canvas",ui_component_name:n,action:"error_alert"===n?eJ.UiAction.ERROR:eJ.UiAction.CLICK,ui_properties:{element_value:s||c}}},file_id:a,canvas_ai_overlay_session_id:e,canvas_ai_overlay_content_length:i,canvas_ai_overlay_preview:l,canvas_ai_overlay_flow:r,canvas_current_length:o,canvas_ai_content_id:d})},[t,e,a])}function useSemanticDraftState(e){let t=(0,h.useMemo)(()=>e===a_.NONE,[e]),a=(0,h.useMemo)(()=>e===a_.FETCHING||e===a_.INSERTING,[e]),n=(0,h.useMemo)(()=>e===a_.FETCHING,[e]);return{pendingPromptSubmission:t,responseInProgress:a,fetchingInProgress:n,insertionInProgress:(0,h.useMemo)(()=>e===a_.INSERTING,[e]),draftInserted:(0,h.useMemo)(()=>e===a_.INSERTED,[e])}}var aw=a(0xe7ed96ac),aT=a(0x99233ecb),aN=a(0x344bb842);let aM=(0,h.forwardRef)(({label:e,ariaLabel:t,iconProps:a,handler:n,disabled:r,type:i,outline:l,className:o,"data-qa":s,size:c,autoClogProps:d,useButton:m},u)=>{let p={ref:u,className:o,onClick:n,"aria-disabled":r,"data-qa":s,autoClogProps:d};return a&&!m?h.createElement(as.Ay,{position:"top",delay:as.n1,tip:e,hideFromScreenReader:!0,zIndex:aa.m.AboveFullScreen},h.createElement(aN.A,{"aria-label":t??e,size:c??"small",svgIconProps:{size:"16",...a},outline:l,...p})):h.createElement(e$.Ay,{"aria-label":t,type:i,size:"small",...p},a&&h.createElement(w.Ah,a),e)});var aR=a(0x424ce7f7),aP=a(0x1aa941557),aL=a(0x658a411c),aO=a(0xf27817c9),aD=a(0x1fdec3e16),aF=a(0x937dca65),aU=a(0xc693ee83),aB=a(0x6cc5eee0),aH=a(0x22f5cc45d),aW=a(0xb25439fa),aV=a(0x9388b08c),aG=a(0x550fe260),aq=a(0x1ec69ee01),aj=a(0xf6ed6f31),az=a(0x1400f598e),aK=a(0x1eaf180f0),a$=a(0xc1360909),aY=a(0x86d174ec),aQ=a.n(aY);let aZ=new S.Ay("slack_docs"),aJ={maxLines:3,blockLimit:3,maxChars:225},aX=(0,aW.A)(aV.A);function ChannelRow({channelId:e,hidden:t}){let a=(0,E.d4)(t=>(0,eG.OL)(t,e,!0)),n=(0,E.d4)(t=>(0,a$.q8)(t,e)),r=(0,aj.bl)(a),i=n?.counts.member_count??0,l=(0,aq.z8)(a),o=(0,tq.JM)(a);return h.createElement("div",{className:j()(aQ().channel,{[aQ().hiddenSource]:t})},h.createElement("div",null,!o&&h.createElement(aU.A,{channel:a}),h.createElement(aF.A,{channel:a,showTeam:!0,showTeamName:!0})),h.createElement("div",{className:aQ().channelRow2},!o&&h.createElement(aD.A,{withTooltip:!0,lines:1,breakWords:!1},r&&h.createElement(h.Fragment,null,h.createElement("span",{className:aQ().joined},h.createElement(w.Ah,{inline:!0,name:"check"}),aZ.t("Joined"))," \u2022 "),h.createElement("span",{className:aQ().memberCount},aZ.t("{count, plural, =1 {# member} other {# members}}",{count:i})),l&&h.createElement(h.Fragment,null," \u2022 ",h.createElement("span",null,h.createElement(aB.A,{text:l,noJumbomoji:!0,noHighlights:!0})))),o&&h.createElement("span",null,aZ.t("Direct message"))))}function RowActions({ariaLabel:e,iconProps:t,onClick:a,isHovered:n,tooltipLabel:r}){return h.createElement("div",{className:j()(aQ().actionsContainer,{[aQ().hideButton]:!n})},h.createElement(as.Ay,{tip:r??e},h.createElement(aN.A,{"aria-label":e,onClick:a,svgIconProps:t,size:"small"})))}function SourceEditModal({canvasFileId:e,sessionId:t,onUpdateSources:a}){let n=(0,_.wA)(),r=(0,E.Z2)(e=>(0,er.n0)(e,{id:t})),i=(0,E.d4)(e=>(0,er.rt)(e,t)),{promptHistory:l,contentToRefine:o,originalContentCreationPrompt:s,focusedSectionId:c}=r??{},{messageSources:d,fileSources:m}=i??{},u=(d??[]).map(e=>({...e,checked:!0})),p=(0,aR.A)(u,"channelId"),f=(m??[]).map(e=>({...e,checked:!0})),b=(0,E.d4)(e=>{let t=new Map;return f.forEach(a=>{t.set(a.fileId,(0,ep.Lp)(e,a.fileId))}),t}),[g,y]=(0,h.useState)((0,aP.A)(u,"sourceNumber")),[A,x]=(0,h.useState)((0,aP.A)(f,"sourceNumber")),C=(0,aL.A)(g,({checked:e})=>!e)||(0,aL.A)(A,({checked:e})=>!e),k=(0,h.useCallback)(()=>{n((0,e0.O)())},[n]),v=(0,h.useCallback)(async r=>{if(!o||!s||!e)return;a();let{clientReqId:i}=n((0,aK.hd)({sessionId:t}));await n((0,aG.J)({reason:"revise_canvas_content_creation_sources",promptData:{plaintext:s},sources:r,sessionPromptHistory:l,clientReqId:i,focusedSectionId:c,canvasId:e})),n((0,az.xf)({id:t,contentMode:ab.de.REFINEMENT}))},[n,e,l,c,t,s,o,a]),S=(0,h.useCallback)(()=>{C&&v({messages:Object.values(g).map(({messageTs:e,channelId:t,checked:a})=>e&&t&&a?{messageTs:e,channelId:t}:null).filter(e=>!!e),files:Object.values(A).map(({fileId:e,teamId:t,checked:a})=>e&&t&&a?{fileId:e,teamId:t}:null).filter(e=>!!e)}),n((0,e0.O)())},[A,g,n,v,C]),I=(0,h.useCallback)(e=>{let t=g[e];y({...g,[e]:{...t,checked:!t.checked}})},[g]),w=(0,h.useCallback)(e=>{let t=(0,aL.A)(g,({checked:t,channelId:a})=>t&&a===e),a=p[e].map(e=>({...e,checked:!t}));y({...g,...(0,aP.A)(a,"sourceNumber")})},[g,p]),T=(0,h.useCallback)(e=>{let t=A[e];x({...A,[e]:{...t,checked:!t.checked}})},[A]),getMsgSourceRow=({channelId:e,ts:t,sourceNumber:a})=>{let n=!g[a].checked,r={name:n?"eye-closed":"eye-open",size:"18"},onClick=()=>I(a),i=n?aZ.t("Use message source"):aZ.t("Don\u2019t use message source");return h.createElement(aO.A,null,({isHovered:a,hoverProps:l})=>h.createElement("div",{className:aQ().sourceRow,...l},h.createElement(aX,{avatarSize:36,channelId:e,className:j()(aQ().message,{[aQ().hiddenSource]:n}),footer:!1,timestampClickable:!0,ts:t,truncateLimits:aJ,hideAttachments:!0,hideReactionBar:!0}),h.createElement(RowActions,{ariaLabel:i,iconProps:r,onClick:onClick,isHovered:a})))};getMsgSourceRow.displayName="getMsgSourceRow";let getChannelGroupRow=({channelId:e})=>{let t=p[e],a=(0,aL.A)(g,({checked:t,channelId:a})=>t&&a===e),n={name:a?"eye-open":"eye-closed",size:"18"},onClick=()=>w(e),r=a?aZ.t("Don\u2019t use sources from this channel"):aZ.t("Use sources from this channel");return h.createElement("div",{className:aQ().sourcesContainer},h.createElement(aO.A,null,({isHovered:t,hoverProps:i})=>h.createElement("div",{className:j()(aQ().sourceRow,aQ().grayBackground),...i},h.createElement(ChannelRow,{channelId:e,hidden:!a}),h.createElement(RowActions,{ariaLabel:r,iconProps:n,onClick:onClick,isHovered:t}))),t.map(({messageTs:t,sourceNumber:a})=>getMsgSourceRow({channelId:e,ts:t,sourceNumber:a})))};getChannelGroupRow.displayName="getChannelGroupRow";let getFileSourceRow=({fileId:e,sourceNumber:t,checked:a})=>{let n=b.get(e),r=!a,i={name:r?"eye-closed":"eye-open",size:"18"},l="";(0,U.l7)(n)?l=aZ.t("List"):(0,U.DQ)(n)&&(l=aZ.t("Canvas"));let onClick=()=>T(t),o=r?aZ.t("Use file source {fileType} {fileName}",{fileType:l,fileName:n?.title??""}):aZ.t("Don\u2019t use file source {fileType} {fileName}",{fileType:l,fileName:n?.title??""}),s=r?aZ.t("Use file source"):aZ.t("Don\u2019t use file source");return h.createElement(aO.A,null,({isHovered:t,hoverProps:a})=>h.createElement("div",{className:aQ().sourceRow,...a},h.createElement(aH.A,{fileId:e,showActions:!1,includeExternalLinkAction:!1,preventHoverOver:!0,className:j()(aQ().file,{[aQ().hiddenSource]:r})}),h.createElement(RowActions,{ariaLabel:o,iconProps:i,onClick:onClick,isHovered:t,tooltipLabel:s})))};getFileSourceRow.displayName="getFileSourceRow";let N=aZ.t("Refresh Response");return h.createElement(tk.dW,{closeModal:k,maxWidth:700},h.createElement(tk.Rc,{title:aZ.t("Sources")}),h.createElement(tk.$m,null,h.createElement(tk.qf,null,Object.keys(p).length>0&&h.createElement("div",null,f.length>0&&h.createElement("div",{className:aQ().subtitle,role:"heading","aria-level":2},aZ.t("Messages")),Object.keys(p).map(e=>getChannelGroupRow({channelId:e}))),f.length>0&&h.createElement("div",{className:j()({margin_top_150:u.length>0})},h.createElement("div",{className:aQ().subtitle,role:"heading","aria-level":2},aZ.t("Files")),h.createElement("div",{className:aQ().sourcesContainer},f.map(({sourceNumber:e,fileId:t})=>getFileSourceRow({fileId:t,sourceNumber:e,checked:A[e].checked})))))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(tk.s_,{type:"outline","aria-label":aZ.t("Cancel")},aZ.t("Cancel")),h.createElement(tk.s_,{"aria-label":N,onClick:S,disabled:!C},N))))}ChannelRow.displayName="ChannelRow",RowActions.displayName="RowActions",SourceEditModal.displayName="SourceEditModal";var a0=a(0x5eedb646);let a1=new S.Ay("slack_docs");function AccessoriesContainer({refToForward:e,draftState:t,inputLength:a,previewContent:n,primaryButtonRef:r,hasError:i,handleSubmit:l,handleRefine:o,handleAcceptDraft:s,handleDiscardDraft:c,handleRetry:d,handleCopy:m,handleClose:u,overflow:p,canvasFileId:f,hideSources:b,onUpdateSources:g,sessionId:y,showSubmitText:A}){let x=(0,_.wA)(),C=(0,E.d4)(aE.UG),{pendingPromptSubmission:k,responseInProgress:v,draftInserted:S}=useSemanticDraftState(t),I=(0,E.d4)(e=>{if(!y)return 0;let{messageSources:t,fileSources:a}=(0,er.rt)(e,y)??{};return(t?.length??0)+(a?.length??0)}),T=(0,h.useMemo)(()=>!b&&I>0,[b,I]),N={name:"ellipsis-horizontal-filled"},M={name:"refresh"},R={name:"trash"},P={name:"check"},L={name:"copy"},O=a1.t("Keep");n&&(O=a1.t("Replace"));let D=h.createElement(h.Fragment,null,h.createElement(w.Ah,{inline:!0,name:"check"}),"\xa0",O),F=n?a1.t("Cancel"):a1.t("Discard"),U=a1.t("Edit sources"),B=(0,h.useCallback)(()=>{x((0,ts.q)({element:h.createElement(SourceEditModal,{canvasFileId:f,sessionId:y,onUpdateSources:g})}))},[x,g,f,y]),H=(0,h.useCallback)(()=>h.createElement(aT.Ay,{width:"auto"},h.createElement(aT.Dr,{key:"overflow-retry","data-qa":(0,ax.id)("retry"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_RETRY_BUTTON),onSelected:d,label:a1.t("Regenerate",{fallbackHash:"9f5cd8a2e8807d73efa02c844bfbca9fe552b283"}),icon:h.createElement(w.Ah,{name:"refresh"})}),n&&h.createElement(aT.Dr,{key:"overflow-copy","data-qa":(0,ax.id)("copy"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_COPY_BUTTON),onSelected:m,label:a1.t("Copy"),icon:h.createElement(w.Ah,{name:"copy"})}),T&&h.createElement(aT.Dr,{key:"overflow-edit-sources",autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_SOURCES_BUTTON),"data-qa":(0,ax.id)("sources"),onSelected:B,label:U,icon:h.createElement(w.Ah,{name:"quote-post"})})),[m,d,n,U,B,T]),renderDefaultActionButtons=()=>h.createElement(h.Fragment,null,h.createElement(aM,{"data-qa":(0,ax.id)("retry"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_RETRY_BUTTON),label:a1.t("Retry"),iconProps:M,handler:d}),T&&h.createElement(e$.Ay,{"data-qa":(0,ax.id)("sources"),type:"outline",size:"small",onClick:B,autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_SOURCES_BUTTON)},a1.t("Sources"),h.createElement("span",{className:ap().sourceCountNumber},I)),n&&h.createElement(aM,{"data-qa":(0,ax.id)("copy"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_COPY_BUTTON),label:a1.t("Copy"),ariaLabel:a1.t("Copy"),iconProps:L,handler:m}),h.createElement(aM,{"data-qa":(0,ax.id)("discard"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_DISCARD_BUTTON),label:F,handler:c,type:"outline"}),h.createElement(aM,{"data-qa":(0,ax.id)("accept"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_KEEP_BUTTON),ref:r,label:D,ariaLabel:O,handler:s,type:"primary",className:ap().acceptButton}));renderDefaultActionButtons.displayName="renderDefaultActionButtons";let renderOverflowedActionButtons=()=>h.createElement(h.Fragment,null,h.createElement(aT.cQ,{width:"auto",renderMenu:H,position:"bottom-right"},h.createElement(as.Ay,{position:"top",tip:"More actions"},h.createElement(aw.A,{"data-qa":(0,ax.id)("overflow"),"aria-label":"More actions",size:"small",svgIconProps:N}))),h.createElement(aM,{"data-qa":(0,ax.id)("discard"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_DISCARD_BUTTON),label:F,iconProps:R,handler:c,outline:!0}),h.createElement(aM,{"data-qa":(0,ax.id)("accept"),ref:r,autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_KEEP_BUTTON),iconProps:P,label:O,handler:s,outline:!0,className:ap().overflowedAcceptButton}));renderOverflowedActionButtons.displayName="renderOverflowedActionButtons";let renderActionButtons=()=>{if(!v){if(k||S&&a||i){let e=j()(ap().submitButton,{[ap().withText]:A}),t=A&&C?a1.t("Create"):a1.t("Send");return h.createElement(h.Fragment,null,h.createElement(aM,{"data-qa":(0,ax.id)("submit"),ref:r,autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_SUBMIT_BUTTON),label:t,iconProps:{name:"send-filled",size:A?"16":"20"},handler:S?o:l,disabled:!a||a>ax.kv,className:e,type:"primary",useButton:A}),h.createElement(aM,{label:a1.t("Close"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_CANCEL_BUTTON),iconProps:{name:"close",size:"20"},handler:u,className:ap().closeButton}))}return p?renderOverflowedActionButtons():renderDefaultActionButtons()}};return renderActionButtons.displayName="renderActionButtons",h.createElement("div",{ref:e,className:ap().accessoriesContainerInner},renderActionButtons())}AccessoriesContainer.displayName="AccessoriesContainer";let a2=h.forwardRef((e,t)=>h.createElement(AccessoriesContainer,{...e,refToForward:t}));var a4=a(0x1e3eb45fd);let a5=new S.Ay("slack_docs");var a3=((i={}).GENERIC="generic",i.CUSTOM="custom",i.CHANNEL_EXCLUDED="channel_excluded",i);let CanvasAiErrorAlert=({className:e,errorType:t,contentHtmlId:a,errorMessage:n="",onClose:r})=>{let i,l,o=(0,E.d4)(a4.uO);switch(t){case"channel_excluded":i=o?a5.t("The content for this channel is not available"):a5.t("AI couldn\u2019t generate a response for that"),l=o?a5.t("An admin has restricted this channel for use in canvas AI."):"";break;case"custom":i=a5.t("AI couldn\u2019t generate a response for that"),l=n;break;default:i=a5.t("Something went wrong generating an answer"),l=a5.t("Give it another try in a few minutes.")}return h.createElement("div",{"data-qa":"canvas_ai_error_alert",className:e},h.createElement(e2.Ay,{type:"boxed",level:"error","data-qa":`${t}_canvas_ai_error`,showCloseButton:!0,onClose:r},h.createElement("h2",null,i),h.createElement("p",{id:a},l)))};CanvasAiErrorAlert.displayName="CanvasAiErrorAlert";let a6=new S.Ay("slack_docs");function DisclaimerContainer({giveFeedback:e}){let t=(0,h.useCallback)(()=>{e(ab.iz.POSITIVE)},[e]),a=(0,h.useCallback)(()=>{e(ab.iz.NEGATIVE)},[e]),n=a6.t("This tool uses AI to generate responses, so some information may be inaccurate."),r=h.createElement("div",{className:ap().feedbackContainer},h.createElement(aM,{"data-qa":(0,ax.id)("like"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_POSITIVE_FEEDBACK_BUTTON),label:a6.t("Good response"),ariaLabel:a6.t("Was this response helpful? Thumbs up",{fallbackHash:"b68ee850407b7981c15251f1514e574ed9bcbcf9"}),iconProps:{name:"thumbs-up"},handler:t,size:"x-small"}),h.createElement(aM,{"data-qa":(0,ax.id)("dislike"),autoClogProps:(0,ax.tU)(a0.H.CANVAS_AI_NEGATIVE_FEEDBACK_BUTTON),label:a6.t("Bad response"),ariaLabel:a6.t("Was this response helpful? Thumbs down",{fallbackHash:"5b10ee53e29310f4529a63dc7c63a1b65b64c8a6"}),iconProps:{name:"thumbs-down"},handler:a,size:"x-small"}));return h.createElement("div",{"data-qa":"canvas_ai_disclaimer",className:ap().disclaimerContainer},n,r)}DisclaimerContainer.displayName="DisclaimerContainer";var a8=a(0x113cdbbd7),a7=a(0x944e06df),a9=a(0x1b9993cd4),ne=a(0xe5a46141);let nt=new S.Ay("slack_docs"),na=(0,h.forwardRef)(({draftState:e,draftA11yData:t,streamingConfig:a,showInPreview:n,replaceSelectionOnlyOnCompletion:r,longFetchMessageStartTime:i,canvasContent:l,currentContentReqId:o},s)=>{let c=(0,ne.pc)(),{embeddedUiData:d}=(0,h.useContext)(aS.N),m=(0,E.d4)(aE.DI),u=(0,h.useRef)(null),p=(0,h.useRef)(""),{onStart:_,onCompletion:b,onError:g}=a||{},y=(0,a9.H)(l?.content?.text??""),A=(0,h.useRef)(!1),x=(0,h.useRef)(!1),C=(0,h.useRef)(null),k=(0,h.useRef)(!1),[v,S]=(0,h.useState)(!1),I=(0,h.useRef)(!1),w=n?l?.content?.blocks??null:null,T=(0,h.useCallback)(()=>{if(I.current=!0,!i)return!1;let e=Date.now()-i;return e<2e3&&(S(!0),setTimeout(()=>{S(!1)},2e3-e)),!0},[i]),N=(0,h.useCallback)(()=>{A.current=!0,g()},[g]);if((0,h.useImperativeHandle)(s,()=>({focus(){u.current?.focus()}})),(0,h.useEffect)(()=>{if(l&&!v)try{let{status:t,content:a}=l;if([ab.nM.Error,ab.nM.ChannelExcluded].includes(t)){if(A.current)return;A.current=!0,g()}else if(t===ab.nM.InProgress&&m&&!r){let t=0,r=!1,i=l?.content?.text??"";if(n)r=a?.blocks?.length>0;else{let e=p.current&&p.current!==i.slice(0,p.current.length)?0:p.current.length,a=i.slice(e);r=(t=e+(0,ax.A7)(a,y))>0}if(r){if(!I.current&&T()||(e!==a_.INSERTING&&_(),C.current&&(clearTimeout(C.current),C.current=null),C.current=setTimeout(N,3e4),n))return;let a=i.slice(0,t);k.current||(d?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.HANDLE_STREAM_INIT,draftSessionId:o??""}),k.current=!0),d?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.HANDLE_STREAM_UPDATE,markdown:a}),p.current=a}}else if(t===ab.nM.Complete){if(x.current)return;if(x.current=!0,C.current&&(clearTimeout(C.current),C.current=null),n)b();else{k.current||(d?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.HANDLE_STREAM_INIT,draftSessionId:o??""}),k.current=!0);let e=l?.content?.text??"";d?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.HANDLE_STREAM_COMPLETE,markdown:r?"":e,onCompletion:r?()=>{}:b}),r&&d?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.INSERT_CONTENT,markdown:e,asDraft:!0,insertionUsername:"Slackbot",onCompletion:b,shouldReplaceSelection:!0,disableBatchInsertion:!m})}}}catch{g()}},[m,e,l,g,b,n,d,r,o,y,N,_,T,v]),![a_.INSERTING,a_.INSERTED].includes(e)||!t&&!w)return null;let{insertedContentHtmlId:M,replacementData:R}=t??{},{replacedContent:P,replacementContent:L}=R??{},O=P&&h.createElement(h.Fragment,null,h.createElement("h3",null,nt.t("Content to Refine")),h.createElement("div",null,P)),D=O?nt.t("Proposed Refinement"):nt.t("Proposed Content"),F=P?h.createElement("div",null,L):h.createElement("div",{"aria-owns":M});return h.createElement(c.div,{initial:ax.qv.slideIn,animate:ax.qv.slideOut,exit:ax.qv.slideIn,ref:u,role:"region",tabIndex:-1,"aria-label":D},h.createElement("div",{"data-qa":"canvas_ai_a11y_preview",className:ap().srOnly},O,!w&&F),w&&h.createElement("span",{className:ap().previewBlocksContainer,"data-qa":"canvas_ai_preview_blocks_container"},h.createElement(a7.A,{inline:!0,blocks:w,blocksContainerContext:a8.pi.canvas_ai_overlay,streaming:m})))});var nn=a(0x1340892e2);let nr=new S.Ay("slack_docs");function LoadingContainer({draftState:e,handleStopInsertion:t,primaryButtonRef:a,onShowLongFetchMessage:n,messageCount:r,fileCount:i}){let[l,o]=(0,h.useState)(!1),{fetchingInProgress:s,insertionInProgress:c}=useSemanticDraftState(e);(0,h.useEffect)(()=>{setTimeout(()=>{s&&(o(!0),n())},2e4)},[s,n]);let d=(0,h.useMemo)(()=>l?nr.t("Generating a response \u2014 just another moment\u2026",{fallbackHash:"2c42fce8d7213a53c6f1cd68a3959c8e4b67a1d5"}):(0,ax.Ar)(r,i),[r,i,l]),m=(0,h.useMemo)(ax.M9,[]),u=(0,h.useMemo)(()=>h.createElement(w.Ah,{name:"ai-sparkle-filled",size:"18"}),[]),p=h.createElement(h.Fragment,null,nr.t("Stop"));return h.createElement("div",{className:j()(ap().loadingContainer,{[ap().fetching]:s})},h.createElement("div",{className:ap().statusContainer},h.createElement(nn.r,{text:c?m:d,icon:u})),h.createElement(aM,{"data-qa":(0,ax.id)("stop"),ref:a,label:p,handler:t,className:ap().stopButton}))}LoadingContainer.displayName="LoadingContainer";var ni=a(0x12d250bf6),nl=a(0x19626cb5),no=a(0x25c60ed2),ns=a(0x1ed2fb210),nc=a(0x3d01f952),nd=a(0xdf55e8f3);let isValidViewableChannel=(e,t)=>!!(e&&!(0,tq.Zx)(e)&&!(0,tq.JM)(e)&&!e.is_file&&((0,no.V)(e)||(0,tq.Zp)(e))&&(!t||!(0,ns.$)(e))),nm=(0,nd.eI)(e=>{let t="on"===(0,F._Z)(e,"ai_channel_exclusions"),a=(0,eG.DM)(e).filter(e=>isValidViewableChannel(e,t)&&void 0!==e.updated).reduce((e,t)=>!e||t.updated>e.updated?t:e,null);return a?(0,tj.SB)(e,a,{privateChannelUseHashSign:!0}):"#"}),getRecentChannelForCurrentMember=e=>{let t="on"===(0,F._Z)(e,"ai_channel_exclusions"),a=(0,nc.b5)(e,30).map(t=>(0,eG.OL)(e,t?.id)).filter(e=>isValidViewableChannel(e,t));if(a.length>0){let t=a[0];return(0,tj.SB)(e,t,{privateChannelUseHashSign:!0})}return nm(e)};var nu=a(0x19b3ba9fd),np=a(0x280afe13),nh=a(0x1bac8c9e9),n_=a(0xe684f705);let getMentionById=(e,t)=>{if(!t)return null;let a=(0,n_.nv)(e,t);return a&&(0,tK.TF)(a)&&!(0,nh.U)(a)?`@${(0,t$.Gt)(a)}`:null},getRecentMentionForCurrentMember=e=>{let t=(0,eG._B)(e).map(e=>(0,np.e)(e)).filter(nu.b);for(let a=0;a<t.length;a++){let n=getMentionById(e,t[a]);if(n)return n}return"@"};var nf=a(0x21d6ed371),nb=a(0x22f33987a),ng=a(0x203beba52),ny=a(0x66a0f59a),nA=a(0xd2efd513),nx=a(0x1337d9fa2),nE=a(0x1866b1b2d),nC=a(0x2406b591),nk=a(0xc561af5),nv=a(0xd93ecf94);let isChannelEmpty=(e,t,a={})=>{let{maxRecentActivityDays:n,humanMessagesOnly:r=!1,minimumMessageCount:i=ni.pQ}=a,l=(0,nk.r7)(e,t),o=l?l.timestamps:[];if(!o||0===o.length)return!0;let s=o.map(a=>{let n=(0,nv.Ld)(e,t,a);return{ts:a,msg:n}}).filter(({msg:t})=>r?!!t&&!(0,ng.A)(t.subtype)&&!(0,nf.aw)(t)&&!(0,nf.dK)(t)&&!(0,nb.A)(e,t)&&!(0,nx.aK)(t)&&!(0,nA.A)(t)&&!(0,ny.A)(t):(0,nC.Az)(t));return s.length<i||0===s.length||void 0!==n&&!s.some(({ts:e})=>{let t;return t=(0,nE._)(),t-parseFloat(e)<=24*n*3600})};var nS=a(0x12334bacc),nI=a(0xc12d7108),nw=a(0x1b77d8ef3),nT=a(0x2c5a5afa),nN=a(0x13e6609df),nM=a(0x1ed767a16),nR=a(0x19c76d181),nP=a(0x1ed40993a),nL=a(0x1472af90a),nO=a(0xf052d367),nD=a(0x19895585a),nF=a(0x1af63fe13),nU=a(0xa426180f),nB=a.n(nU);let getElementWidth=e=>e?.getBoundingClientRect().width??0,nH=new S.Ay("slack_docs"),nW={eventId:eJ.EventId.NATIVE_AI,elementName:a0.H.CANVAS_AI_OVERLAY_VIEW,onClick:{enableClogAction:!0}};function AiContentCreationOverlay({sessionId:e}){let t=(0,_.wA)(),a=useEventClogger(e),{docEmbed:n,embeddedUiData:r,slackFileId:i}=(0,h.useContext)(aS.N),l=(0,en.A)(n?.editorContainer),o=(0,h.useRef)(null),{windowRef:s}=(0,h.useContext)(K._0),{channelId:c}=(0,h.useContext)(eW.d),d=(0,h.useContext)(ee.A),{windowId:m,activeTab:u,container:p}=(0,h.useContext)(eM.A),b=(0,ne.pc)(),{layoutStyle:g}=(0,en.A)(n?.selectionState)??{},{viewState:y}=(0,h.useContext)(nN.A),A=y?.uiState?.autoStartAiGeneration,x=(0,E.d4)(e=>"on"===(0,F._Z)(e,"ai_channel_exclusions")),C=(0,E.d4)(e=>(0,eG.OL)(e,c)),k=(0,E.d4)(e=>(0,tj.SB)(e,C,{publicChannelIncludeHashSign:!0,privateChannelUseHashSign:!0})),v=(0,h.useMemo)(()=>!!C&&(0,ns.$)(C)&&x,[x,C]),S=(0,E.d4)(nR.WR),I=(0,E.d4)(e=>(0,nO.ky)(e,nL.G7.CanvasAiOverlaySubmitButton,nL.X8.Click)),w=(0,h.useMemo)(()=>(0,tq.yz)(C),[C]),T=(0,h.useMemo)(()=>w&&(0,aq.Ug)(C)?.filter(e=>e!==S)||t9.Ml,[C,S,w]),N=(0,E.Z2)(e=>w&&0!==T.length?T.map(t=>`@${(0,t$.Gt)((0,n_.nv)(e,t))}`):t9.Ml),M=(0,h.useMemo)(()=>w?T:[c],[w,T,c]),R=(0,h.useMemo)(()=>w?N:[k],[w,N,k]),P=(0,h.useMemo)(()=>R.join(", "),[R]),L=(0,h.useMemo)(()=>(0,tq.LI)(C),[C]),O=(0,h.useMemo)(()=>(0,tq.yz)(C),[C]),D=((0,en.A)(n?.wordCount)??0)<ni.$N,U=(0,E.d4)(e=>isChannelEmpty(e,c)),B=!(0,E.d4)(e=>isChannelEmpty(e,c,{maxRecentActivityDays:7})),H=(0,E.Z2)(getRecentChannelForCurrentMember),W=(0,E.Z2)(getRecentMentionForCurrentMember),V=(0,E.Z2)(e=>((e,t)=>{if(!t)return null;let a=(0,eG.OL)(e,t);if(!a)return null;if((0,tq.yz)(a)){let t=(0,aq.Ug)(a);if(t){let a=[];for(let n=0;n<t.length;n++){let r=getMentionById(e,t[n]);r&&a.push(r)}if(a.length>0)return a.join(", ")}}else if((0,tq.LI)(a))return getMentionById(e,(0,np.e)(a));return null})(e,c)),G=(0,h.useMemo)(()=>({isCanvasEmpty:D,isInLayout:g===f.DocLayoutStyle.TABLE||g===f.DocLayoutStyle.CALLOUT||g===f.DocLayoutStyle.FLEXBOX,channelId:c,tabbedChannelName:k,isTabbedChannelMpim:O,isTabbedChannelIm:L,isTabbedChannelEmpty:U,isTabbedChannelActiveSinceThisPastWeek:B,recentChannelForCurrentMember:H,mentionsFromTabbedImOrMpim:V,atMentionForCurrentMember:W,isTabbedChannelExcludedFromAi:v}),[g,D,k,O,L,c,H,B,U,V,W,v]),q=(0,E.d4)(aE.c9),z=(0,E.d4)(e=>(0,ep.Lp)(e,i||"")),Q=(0,E.d4)(ac.bN),{starterPrompt:Z,initialSelectionData:et,triggerSectionId:ea,initialContentSessionId:ei}=r?.getAiContext()??{},{selectionInstructions:el}=et??{},eo=(0,ax.Mf)({starterPrompt:Z,initialSelectionInstructions:el},q),es=(0,h.useMemo)(()=>(0,ax.HJ)({initialSelectionInstructions:el,experimentCanvasAiContentCreationGroupOn:q}),[el,q]),ec=(0,h.useMemo)(()=>(0,ax.r2)({initialSelectionInstructions:el,experimentCanvasAiContentCreationGroupOn:q}),[el,q]),ed=(0,h.useRef)(null),em=(0,h.useRef)(null),eu=(0,h.useRef)(null),eh=(0,h.useRef)(null),e_=(0,h.useRef)(null),ef=(0,h.useRef)(null),eb=(0,t7.A)(),eg=(0,t7.A)(),ey=(0,t7.A)(),eA=(0,h.useRef)(null),ex=(0,h.useRef)(null),[eE,eC]=(0,h.useState)(null),ek=(0,E.Z2)(t=>(0,er.n0)(t,{id:e}));(0,h.useEffect)(()=>{i&&t((0,az.pq)({fileId:i,sessionId:e}))},[e,i,t]),(0,h.useEffect)(()=>{t((0,az.xf)({id:e,focusedSectionId:ea}))},[e,t,ea]);let{contentMode:ev=ab.de.NONE,contentToRefine:eS,previousContentToRefine:eI,originalContentCreationPrompt:ew,submissionCount:eT=0}=ek??{},eN=(0,h.useRef)(eS),eR=(0,h.useRef)(eT);(0,h.useEffect)(()=>{eR.current=eT},[eT]),(0,h.useEffect)(()=>{eN.current=eS},[eS]);let eP=(0,E.d4)(t=>(0,er.rt)(t,e)),eL=ek?.currentContentReqId??null,{metadata:eO,error:eD,id:eF,prompt:eU,status:eB}=eP??{},eH=(0,h.useMemo)(()=>(0,nS.$c)(eF),[eF]),eV=(0,aI.A)(),{infoMessage:eq,fileCount:ej,messageCount:ez}=eO??{},eK=(0,h.useCallback)(()=>eP?eP.status===ab.nM.Complete?a_.INSERTED:eP.content?.text?a_.INSERTING:a_.FETCHING:a_.NONE,[eP]),e$=(0,h.useRef)(null),[eQ,eZ]=(0,h.useState)(0),[eX,e0]=(0,h.useState)(!1),[e1,e4]=(0,h.useState)(!1),[e5,e3]=(0,h.useState)(!1),[e6,e8]=(0,h.useState)(eK),e7=(0,h.useRef)(null),e9=(0,h.useRef)(eU||null),[te,tt]=(0,h.useState)(void 0),[ta,tn]=(0,h.useState)(!1),tr=(0,h.useRef)(null),ti=(0,h.useRef)(null),[tl,to]=(0,h.useState)(!1),[ts,tc]=(0,h.useState)(eo),[td,tu]=(0,h.useState)(null),[tp,t_]=(0,h.useState)(),tf=(0,h.useMemo)(()=>eQ>0,[eQ]),{pendingPromptSubmission:tb,responseInProgress:tg,insertionInProgress:ty,draftInserted:tA}=useSemanticDraftState(e6),tx=(0,an.IE)(),[tE,tC]=(0,h.useState)(A&&!!Z&&Z!==tL.Ex.CREATE&&tx),tk=(0,h.useRef)(!1),tv=(0,h.useRef)(tA),tS=(0,h.useRef)(tA||ty||tg);(0,th.A)(()=>{ei&&ei===ek?.id&&e6!==a_.INSERTED&&eu.current?.setContents({contents:[{insert:eU}]})}),(0,h.useEffect)(()=>{tv.current=tA},[tA]),(0,h.useEffect)(()=>{tS.current=tA||ty||tg},[tA,ty,tg]);let tI=(0,h.useMemo)(()=>!!(ts&&(0,tL.Hq)(ts)),[ts]),tw=(0,h.useMemo)(()=>tA||el&&tg?tA?nH.t("Any changes?"):el??"":td!==ax.S9.REWRITE||0!==eQ||tA?eD?nH.t("Let\u2019s try that again"):eE||(Q&&(z?.canvas_agent_creator_id||z?.canvas_default_agent_id)?nH.t("Describe what you want Agent to write"):nH.t("Describe what you want AI to write")):nH.t("Describe your edit"),[el,tg,td,eE,tA,Q,z?.canvas_agent_creator_id,z?.canvas_default_agent_id,eQ,eD]),tT=(0,h.useMemo)(()=>(0,ax.rl)(ts,q)&&tb?eb:"",[ts,q,tb,eb]),tN=(0,h.useMemo)(()=>tA||el&&tg?nH.t("Prompt to refine results"):(0,ax.rl)(ts,q)&&tb?eb:"",[tA,el,tg,ts,q,tb,eb]),tM=(0,h.useMemo)(()=>tA||et?tL.hM.REFINE:tI&&null!==ts?ts:tL.hM.CREATE,[tA,et,ts,tI]),tR=Q?z.canvas_agent_creator_id:void 0,tP=z.canvas_default_agent_id??tR,[tO,tD]=(0,h.useState)(tP),tF=(0,h.useMemo)(()=>tb&&(!ts||tI)&&!tO&&!eS,[tb,ts,tI,tO,eS]),tU=(0,h.useCallback)((e,t=!0)=>{d.sendMessageToAnnouncerAPI({message:e,assertive:t,uuid:(0,X.A)(),deferBy:at.d8})},[d]),tB=(0,h.useMemo)(()=>(0,nl.R)(G),[G]),{getInputText:tH,trimCurrentInputContents:tW,getInstructions:tG}=useAiPromptInput(eu,{selectedCreationSuggestionId:ts,selectedRefinementInstructionId:td,initialSelectionInstructions:el}),tK=(0,h.useCallback)(()=>{let e=getElementWidth(ed.current),t=getElementWidth(eh.current);e0(Math.round(getElementWidth(em.current)+t)>e);let a=ti.current||t;to(!!e&&a+150>e);let n=eu.current?.getContents().contents,r=n?.some(e=>"string"==typeof e.insert&&(e.insert.match(/\n/g)?.length??0)>=2&&e.insert.length>2);if(e4(r??!1),r&&e0(!0),ef.current?.isOpen()){let e=em.current?.getBoundingClientRect();e&&ef.current.positionMenu(e)}},[]),tY=(0,h.useCallback)(e=>{let t=e.target;if(t?.closest(`div.${nB().suggestionsItem}`)){let e=t?.closest("li.tab_complete_ui_item");e&&e.firstChild&&null!==e.firstChild.textContent&&eC(e.firstChild.textContent)}else eC(null)},[]),tQ=(0,h.useCallback)(()=>{eC(null)},[]),tZ=(0,h.useCallback)(()=>{e3(!1),e8(a_.NONE)},[]),tJ=(0,h.useCallback)(()=>{let e=tH()?.toLowerCase(),t=(0,tL.Ai)(e);tE&&tC(!1),(tb||tA)&&(e&&t?tc(t):e||tc(null),tK()),eZ(tH().length??0)},[tb,tA,tH,tK,tE]),tX=(0,h.useCallback)(e=>{p&&(m===nD.N2?t((0,nF.v)({windowId:nD.N2,tab:u,container:p,uiState:{openCanvasLinksInFlexpane:e}})):t((0,nF.v)({childWindowId:m,container:p,uiState:{openCanvasLinksInFlexpane:e}})))},[u,p,t,m]);(0,h.useEffect)(()=>(e6!==a_.NONE&&tX(!0),()=>{tX(!1)}),[tX,e6]);let t0=(0,h.useCallback)(()=>{if(ex.current!==ts&&eu.current&&ts&&tI){ex.current=ts;let e=(0,tL.Kf)(ts,!1,tB,W);eu.current.setContents({contents:[{insert:e}]})}},[ts,tI,W,tB]);(0,h.useEffect)(()=>{ex.current!==ts&&(ex.current=null)},[ts]),(0,h.useEffect)(()=>(tI&&(eA.current=setTimeout(t0,0)),()=>{eA.current&&clearTimeout(eA.current)}),[tI,t0]),(0,h.useEffect)(()=>{if(!Z||""!==tH())return;let e=(0,tL.gp)(Z,P);if(i)eu.current?.setContents({contents:[{insert:e}]});else{let t=(0,ax.Yp)(e,R,M);eu.current?.value({contents:t},{isSilent:!0})}eZ(tH().length??0)},[tH,Z,P,i,R,M]);let t1=(0,h.useCallback)(()=>em.current?.querySelector('[role="textbox"]'),[]),t2=(0,h.useCallback)(e=>{let t=t1();t&&(0,tV.hN)(t),tn(e===nI.pm.CHANNEL||e===nI.pm.MEMBER)},[t1]),t4=(0,h.useCallback)(()=>{let e=t1();e&&(0,tV.lw)(e),tn(!1)},[t1]);(0,h.useEffect)(()=>{let e=s.deref();if(e?.requestAnimationFrame(tK),!l)return;let t=(0,J.A)(tK);return t.observe(l),e?.addEventListener("resize",tK),()=>{l&&(t.unobserve(l),e?.removeEventListener("resize",tK))}},[tK,e6,tf,s,l]),(0,h.useEffect)(()=>{tg?e_.current?.focus():tv.current&&eu.current?.focus()},[tg]),(0,h.useLayoutEffect)(()=>{if(!tA||!eh.current||ti.current)return;let e=eh.current?.getBoundingClientRect().width;e&&(ti.current=e,tK())},[tA,tK]),useDraftStateAnnouncements({draftState:e6,messageCount:ez,fileCount:ej});let t5=(0,h.useCallback)((e=!0)=>{tc(null),eu.current?.blur(),e&&(eZ(0),eu.current?.clear(),eu.current?.clearHistory()),setTimeout(()=>{e||tH()===e9.current||eu.current?.setContents({contents:[{insert:e9.current??""}]})}),setTimeout(()=>{!e&&ew&&eR.current>1&&eu.current?.setContents({contents:[{insert:ew}]})}),setTimeout(()=>{eu.current?.setCursorAtEnd(),eu.current?.focus()},300)},[tH,ew]),t3=(0,h.useCallback)((e=!0)=>{e8(a_.INSERTED),t5(e)},[t5]),t6=(0,h.useCallback)(()=>{r?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.CANCEL_DRAFT}),ti.current=null},[r]),t8=(0,h.useCallback)(()=>et?et?.contentMarkdown:ev===ab.de.REFINEMENT?eI??eS:e6===a_.INSERTING?eS:void 0,[et,ev,eI,eS,e6]),ar=(0,h.useCallback)((a=!0,n=!1)=>{t((0,az.xf)({id:e,contentMode:ab.de.NONE,contentToRefine:t8()})),n?e8(a_.INSERTED):(t6(),e8(a_.NONE)),t5(a||n)},[t6,t,t5,t8,e]),ai=(0,h.useCallback)(e=>{a(e,el?"select_and_refine":"empty_creation",eS?.length,es&&!!tr.current,z.size,el,ts||void 0,eF)},[a,es,el,z,ts,eS,eF]),al=(0,h.useRef)(ai);(0,h.useEffect)(()=>{al.current=ai},[ai]);let ao=(0,h.useCallback)(()=>{ai("error_alert");let e=!!eS,t=ev===ab.de.REFINEMENT;ar(!1,e&&t),e3(!0)},[ai,eS,ev,ar]),as=(0,h.useCallback)(()=>{e8(a_.INSERTING)},[]),ad=(0,h.useCallback)((a={})=>{let{completedContent:n,lastSubmittedPrompt:r,newContentToRefine:i}=t((0,aK.gL)({sessionId:e}));es&&(tr.current=n??null),e$.current=a.draftA11yData??null,e7.current=r??"",t3(""!==(i||"")),i&&tU(nH.t("Generated content: {content}",{content:i}))},[tU,t3,es,e,t]);(0,h.useEffect)(()=>{e3(!!eD)},[eD]),(0,h.useEffect)(()=>{e6===a_.INSERTED&&e3(!!eD)},[e6,eD]),(0,h.useEffect)(()=>{eq&&tt(eq)},[eq]);let am=(0,h.useCallback)(()=>{tr.current=null,tk.current=!0,r?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER}),t((0,aK.PR)({slackFileId:i}))},[r,t,i]),au=(0,h.useCallback)(e=>{let t=(0,ae.cX)()?"metaKey":"ctrlKey";if("Escape"===e.key||"Escape"===e.code){if(0!==eT)return;e.preventDefault(),e.stopPropagation(),am()}else"ArrowUp"===e.key&&e[t]&&o.current?.focus()},[am,eT,o]);(0,h.useEffect)(()=>($.J.document.addEventListener("keydown",au,!0),()=>{$.J.document.removeEventListener("keydown",au,!0)}),[au]);let ah=(0,h.useCallback)(e=>{("Escape"===e.key||"Escape"===e.code)&&(e.preventDefault(),e.stopPropagation(),am())},[am]);(0,h.useEffect)(()=>{let e=ed.current;return e?.addEventListener("keydown",ah),()=>{e?.removeEventListener("keydown",ah)}},[ah]);let af=(0,h.useCallback)(async a=>{if(!i)return;tW();let{plaintext:n,blocks:r,inputContents:l,goal:o}=tG()??{};if(n){I<=ni.DO&&(0,an.Gx)(t);try{eu.current?.setContents({contents:l??[]}),e9.current=n,tt(void 0),t((0,nP.Rm)({query:n})),e8(a_.FETCHING),t((0,aK.$n)({sessionId:e,slackFileId:i,markdownContentToRefine:a,showPreview:es,initialSelectionData:et,currentTabbedChannelId:c,goal:o,promptData:{plaintext:n,blocks:r},agentId:tO,focusedSectionId:ea,sourceChannels:[],sourceFiles:[]}))}catch{ao()}}},[i,tW,tG,t,es,et,c,tO,ao,ea,e,I]),ag=(0,h.useRef)(af);(0,h.useEffect)(()=>{ag.current=af},[af]);let ay=(0,h.useCallback)(e=>{eV.track(eJ.EventId.NATIVE_AI,{contexts:{ui_context:{entry_point:"canvas",action:eJ.UiAction.SEND,ui_properties:{element_name:e}}},...eH})},[eV,eH]),aA=(0,h.useCallback)(()=>{ai("submit_button"),af(eS)},[ai,af,eS]),aC=(0,h.useCallback)(()=>{ai("refine_button"),af(eS)},[ai,af,eS]),ak=(0,h.useCallback)(()=>{ai("accept_button"),es&&tr.current?(r?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.INSERT_CONTENT,markdown:tr.current,asDraft:!1,insertionUsername:"Slackbot",shouldReplaceSelection:!0}),tr.current=null):r?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.ACCEPT_DRAFT}),am(),q&&tU(nH.t("Draft accepted"))},[ai,es,am,q,r,tU]),av=(0,h.useCallback)(a=>{ai("discard_button"),ar(!1),tt(void 0),td?am():t((0,aK.jv)({sessionId:e})),tU(nH.t("Draft discarded"),!1),a&&t((0,tm.M)({element:h.createElement(eY.A,{position:"bottom-right"},h.createElement("span",null,nH.t("AI suggestion discarded"))),targetWindowId:K.Ab,targetWindow:$.J}))},[ai,ar,td,tU,am,t,e]),aw=(0,h.useCallback)(()=>{av()},[av]),aT=(0,h.useCallback)(()=>{if(ai("stop_button"),et){let e=tH()?tH():el;eu.current?.setContents({contents:[{insert:e}]})}let a=!!eS;e6===a_.FETCHING&&a&&!et?(e8(a_.INSERTED),t5(!1)):ar(!1),t((0,aK.Mb)({sessionId:e,canvasContentId:eF}))},[e6,ai,t5,ar,et,tH,el,eS,eF,t,e]),aN=(0,h.useCallback)(()=>{ai("retry_button"),t6(),e7.current&&eu.current?.setContents({contents:[{insert:e7.current}]}),af(t8())},[ai,t6,af,t8]),aM=(0,h.useCallback)(()=>{if(ai("copy_button"),tr.current){(0,nM.x3)(tr.current);let e=nH.t("Copied to clipboard");t((0,tm.M)({element:h.createElement(eY.A,{announceContentAsAssertive:!1,svgIconProps:{name:"check"}},e)}))}},[t,ai]),aR=useAiFeedbackDialog({contentId:eF||"",contentMode:ev,clogEvent:ai,lastSubmittedQuery:e7.current??void 0}),aP=(0,h.useCallback)(()=>{tA&&!tf?(ak(),ay(a0.H.CANVAS_AI_KEEP_BUTTON)):(tA?aC():aA(),ay(a0.H.CANVAS_AI_SUBMIT_BUTTON))},[ak,tA,aC,aA,tf,ay]),aL=(0,h.useCallback)(()=>{if(tS.current){if(!et)return void t6();av(!0)}t((0,aK.PR)({slackFileId:i}))},[t,i,et,av,t6]),aO=(0,h.useRef)(aL);(0,h.useEffect)(()=>{aO.current=aL},[aL]),(0,h.useEffect)(()=>{let maybeDiscardOrSaveAndShowToast=()=>{tk.current||aO.current()};return $.J.addEventListener("beforeunload",maybeDiscardOrSaveAndShowToast),()=>{$.J.removeEventListener("beforeunload",maybeDiscardOrSaveAndShowToast),maybeDiscardOrSaveAndShowToast()}},[]),(0,h.useEffect)(()=>{ts&&(0,tL.qz)(ts)&&!tg&&(eu.current?.clear(),ag.current(eN.current),ay(a0.H.CANVAS_AI_SUBMIT_BUTTON),al.current("submit_button"))},[tg,ts,ay]),(0,h.useEffect)(()=>{if(et&&0===eR.current){let a=et.contentMarkdown;el&&td===ax.S9.REFINE?(ag.current(a),al.current("submit_button")):t((0,az.xf)({id:e,contentToRefine:et.contentMarkdown}))}},[td,et,el,t,e]),(0,h.useEffect)(()=>{(0,tL.H6)(el,q)?tu(ax.S9.REWRITE):(0,tL.SQ)(el,q)&&tu(ax.S9.REFINE)},[q,el]),(0,h.useEffect)(()=>()=>{tE&&(0,an.bb)(t)},[t,tE]);let aD=(0,h.useCallback)(()=>{e8(a_.FETCHING)},[]),aF=(0,h.useCallback)(()=>{t_(Date.now())},[]);(0,th.A)(()=>{setTimeout(()=>{eu.current?.setCursorAtEnd(),eu.current?.focus()},300)});let aU=(0,h.useCallback)(()=>{if(!ed.current)return null;let{width:e,height:t,top:a,right:n,bottom:r,left:i}=ed.current.getBoundingClientRect();return{width:e,height:t,top:a,right:n,bottom:r,left:i}},[]),aB=(0,h.useMemo)(()=>({onStart:as,onCompletion:ad,onError:ao}),[ao,ad,as]),aH=(0,h.useMemo)(()=>eB===ab.nM.ChannelExcluded&&x?a3.CHANNEL_EXCLUDED:eD?a3.CUSTOM:a3.GENERIC,[eB,x,eD]),renderPromptReframeMessage=()=>te&&te.text?h.createElement("div",{className:j()(ap().alertContainer,{[ap().inserting]:ty})},h.createElement(e2.Ay,{level:"info",type:"boxed"},h.createElement("div",{className:ap().promptReframeMessage},te.text))):null;renderPromptReframeMessage.displayName="renderPromptReframeMessage";let renderAccessories=()=>h.createElement(b.div,{key:"canvas-ai-overlay-accessories",initial:ax.qv.fadeIn,animate:ax.qv.fadeOut,exit:ax.qv.fadeIn,className:j()(ap().accessories,{[ap().accessoriesWrapped]:eX})},h.createElement(a2,{ref:eh,draftState:e6,inputLength:eQ,previewContent:tr.current,primaryButtonRef:e_,hasError:!!eD,handleSubmit:aA,handleRefine:aC,handleAcceptDraft:ak,handleDiscardDraft:aw,handleRetry:aN,hideSources:es,onUpdateSources:aD,handleCopy:aM,overflow:tl,handleClose:am,canvasFileId:i,sessionId:e,showSubmitText:tE}));renderAccessories.displayName="renderAccessories";let renderPreview=()=>{let e=eF??"DRAFT_ID";return!e5&&h.createElement(na,{ref:o,key:`canvas-ai-overlay-draft-preview-${e}`,canvasContent:eP??void 0,currentContentReqId:eL,draftState:e6,draftA11yData:e$.current,streamingConfig:aB,replaceSelectionOnlyOnCompletion:ec&&!!et,longFetchMessageStartTime:tp??null,showInPreview:es})};if(renderPreview.displayName="renderPreview",!q)return null;let renderLoading=()=>tg?h.createElement(b.div,{key:"canvas-ai-overlay-loading",initial:ty?ax.qv.fadeIn:ax.qv.slideIn,animate:ax.qv.slideOut,className:ap().loadingAnimationContainer},h.createElement(LoadingContainer,{handleStopInsertion:aT,primaryButtonRef:e_,draftState:e6,onShowLongFetchMessage:aF,messageCount:ez,fileCount:ej})):null;renderLoading.displayName="renderLoading";let renderDisclaimer=()=>tA||e5?h.createElement(b.div,{key:"canvas-ai-overlay-disclaimer",initial:ax.qv.slideIn,animate:ax.qv.slideOut,exit:ax.qv.slideIn},h.createElement(DisclaimerContainer,{giveFeedback:aR})):null;renderDisclaimer.displayName="renderDisclaimer";let renderInputStatusDescription=()=>{let e;return(0===tH().length&&e6===a_.NONE&&q?e=nH.t("Press down arrow to see prompt suggestions"):tA&&(e=nH.t("Press {modifierKey} + up arrow to jump to proposed draft above",{modifierKey:(0,ae.cX)()?nH.t("Command",{ns:"keyboard_key"}):nH.t("Control",{ns:"keyboard_key"})})),e)?h.createElement("div",{id:ey,hidden:!0},e):null};renderInputStatusDescription.displayName="renderInputStatusDescription";let handleBannerExitComplete=()=>{(0,an.bb)(t)},renderBanner=()=>h.createElement(ne.Ux,{onExitComplete:handleBannerExitComplete},tE&&h.createElement(b.div,{key:"canvas-ai-overlay-banner",exit:ax.qv.fadeIn,transition:ax.qv.fadeTransition},h.createElement(e2.Ay,{type:"boxed",level:"info",isIconVisible:!1,className:ap().banner},nH.t("Add more context to your prompt or just hit create to see a preview"))));renderBanner.displayName="renderBanner";let aW=e5?eg:ey;return h.createElement(Y.A,{eventId:eJ.EventId.NATIVE_AI,elementName:nW.elementName,...eH},h.createElement("div",{className:ap().container},renderBanner(),h.createElement("div",{ref:ed,className:ap().overlayContainer,role:"dialog","data-qa":"canvas_ai_content_creation_overlay","aria-label":nH.t("Write with AI"),onMouseOver:tY,onMouseLeave:tQ,onFocus:tY},h.createElement(ne.Ux,null,renderLoading(),renderPreview(),!tg&&e5&&h.createElement(CanvasAiErrorAlert,{key:"canvas-ai-overlay-error-alert",errorType:aH,className:ap().alertContainer,contentHtmlId:eg,errorMessage:eD,onClose:tZ}),renderPromptReframeMessage(),!ty&&h.createElement("div",{className:ap().inputSuperContainer,key:"canvas-ai-overlay-input"},!tg&&h.createElement(AgentSelectionMenuButton,{onAgentSelected:tD,currentAgentId:tO}),h.createElement("div",{className:ap().interactionContainer},h.createElement(nw.A,{dataQa:"canvas_ai_content_creation_input",ref:em,className:j()(ap().inputContainer,{[ap().multiline]:e1}),isDisabled:tg,size:"large",numMaxLines:4,hideBorder:!0},h.createElement(nT.A,{autocompleteClassName:ap().autocompleteMenu,autocompleteConfigRef:ef,windowRef:s,ariaLabel:tN,ariaLabelledBy:tT,ariaDescribedBy:aW,ariaAutocomplete:"list",ref:eu,onTextChange:tJ,onEnter:aP,onOpen:t2,onClose:t4,placeholder:tw,isDisabled:tg,position:"bottom",completeOnAiSuggestions:tF,completeOnMembers:!0,containerCustomBoundsFn:aU,searchViewContext:tM,canvasAiContext:G,completeOnChannels:!0,maxLength:ax.kv,noSingleLineStyling:!0,zIndex:ta?aa.m.Menu:aa.m.Modal,forceAutoTooltipDisabled:!0,shouldCloseOnResize:!1,channelId:O||L?void 0:c})),renderInputStatusDescription(),renderAccessories())),renderDisclaimer()))))}AiContentCreationOverlay.displayName="AiContentCreationOverlay";var nV=a(0x68d58662);let nG=new S.Ay("assistant");function AiSlackbotCanvasOverlay({sessionId:e}){let t=(0,E.d4)(aE.fN),a=(0,_.wA)(),{embeddedUiData:n,slackFileId:r}=(0,h.useContext)(aS.N),i=(0,E.d4)(t=>(0,er.rt)(t,e)),l=(0,h.useCallback)(()=>{n?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.ACCEPT_DRAFT}),n?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER}),a((0,aK.PR)({slackFileId:r}))},[n,a,r]);return((0,h.useEffect)(()=>{if(!t)return;let e=i?.content?.text??"";n?.performAction({action:f.EmbeddedUiAction.AI_INSERTION_ACTION,type:f.AiActionType.INSERT_CONTENT,markdown:e,asDraft:!0,insertionUsername:"Slackbot",onCompletion:l})},[n,i,l,t]),t)?h.createElement("div",{style:{display:"flex",alignItems:"center"}},h.createElement(nV.M,null),h.createElement("div",null,h.createElement("span",{style:{fontSize:"15px"}},nG.t("Slackbot")))):null}AiSlackbotCanvasOverlay.displayName="AiSlackbotCanvasOverlay";var nq=a(0x1612191d),nj=a(0x195d5c868),nz=a(940089e4),nK=a(0x2ab73abf),n$=a(0xbe5e39b6),nY=a(0x235f350c5),nQ=a(0x1d159d833),nZ=a(0xff5f4ebf),nJ=a(0x930afbbd),nX=a(0x249ce209d),n0=a(0x2f2d8a30),n1=a(0x24a5796af),n2=a(0x21afb988),n4=a(0x19d590052),n5=a(0x73c53039),n3=a(0x1d5eeff6d),n6=a(0x216198dcb),n8=a(0x204000df3);let n7=new S.Ay("files");function CardActions({file:e,memberId:t,salesforceRecord:a,unfurlType:n}){let r=(0,_.wA)(),i=(0,h.useCallback)(e=>h.createElement(nJ.A,{menuProps:e,hideMessageAction:!!t,hideOpenInSlack:n===nX.h.MESSAGE,hideOpenLinkAction:n===nX.h.PUBLIC_LINK}),[t,n]),l=(0,n0.AB)({memberId:t,isCanvasContext:!0}),o=(0,nY.A)(),s=(0,nQ.A)(),c=(0,E.d4)(e=>(0,n1.f)(e,a)),d=(0,E.d4)(e=>a?.record_channel_id||(0,n6.i)(e,a?.id||"")?.id),m=(0,h.useCallback)(()=>{a?.id&&r((0,n2.U)({recordId:a.id}))},[r,a]),u=(0,h.useMemo)(()=>{let t,i;if(e||n===nX.h.SALESFORCE_RECORD&&a&&(0,n8._s)(a))t={name:"share-message"},i=(0,nZ.c)({file:e,salesforceRecord:a,dispatch:r});else if(l){t={name:"direct-messages"};let{label:e,show:a,click:n,disabled:r}=l;i={label:e,show:a,click:n,disabled:r}}else n===nX.h.MESSAGE&&o?(t={name:"channel-arrow-left"},i=o):(n===nX.h.PUBLIC_LINK||n===nX.h.FALLBACK)&&s&&(t={name:"new-window"},i=s);if(!i||!t)return[];let{show:c,disabled:d,label:m,click:u}=i;return!c||d?[]:h.createElement(n4.A,{svgIconProps:t,tooltip:m,onClick:u})},[r,e,l,o,s,n,a]),p=(0,h.useMemo)(()=>{let e,t;if(a&&(0,n8._s)(a)&&(d?(e={name:"channel"},t={label:n7.t("View channel"),show:!0,disabled:!1,click:m}):c&&(e={name:"channel-add"},t={label:n7.t("Create channel"),show:!0,disabled:!1,click:m})),!t||!e)return[];let{show:n,disabled:r,label:i,click:l}=t;return!n||r?[]:h.createElement(n4.A,{svgIconProps:e,tooltip:i,onClick:l})},[m,a,d,c]);return(0,U.Hn)(e)?null:h.createElement(n3.A,{position:"inset"},u,p,h.createElement(n5.A,{renderMenu:i,position:n$.yX.LeftBottom,preventScroll:!0}))}CardActions.displayName="CardActions";var n9=a(0x14b5c0c94),re=a(0x11253e6a6),rt=a(0x144561e68),ra=a(0xe38b5635),rn=a(0x10f1b8521),rr=a(0x14236acae);function CardContainer({children:e,unfurlType:t,memberId:a,fileId:n}){let{embeddedUiData:r}=(0,h.useContext)(aS.N),i=r?.getCardRenderType(),l=(0,E.d4)(e=>n?(0,ep.Lp)(e,n):null),o=r?(0,rt.A)(r):null,s=(0,E.d4)(e=>(0,rr.PQ)(e,o||void 0,!0,n9.O,n9.N)),c=(0,h.useMemo)(()=>{switch(t){case nX.h.FILE:return!(0,U._y)(l)&&!(0,U.Sp)(l);case nX.h.CANVAS:return!(0,U.Sp)(l);case nX.h.SLACK_LIST:return i!==f.SlackListContentRenderType.EMBED;case nX.h.SLACK_LIST_RECORD:case nX.h.SALESFORCE_RECORD:case nX.h.MESSAGE:return!0;case nX.h.USER:case nX.h.PUBLIC_LINK:case nX.h.FALLBACK:default:return!1}},[t,l,i]),d=(0,h.useMemo)(()=>t!==nX.h.SLACK_LIST||i!==f.SlackListContentRenderType.EMBED,[i,t]),m=(0,h.useCallback)(()=>{(0,nK.K7)()},[]),u=(0,nJ.D)(),p=(0,h.useCallback)(()=>t9.Ml,[]);return h.createElement(ra.A,{className:"p-embedded_ui_card_container",size:"medium"},h.createElement(rn.A.Consumer,null,({onMenuClose:t})=>h.createElement(re.A,{getTemplate:d?u:p,desktopAppOnly:!1,width:"220px",showSlackKitContextMenuOnDesktop:!0,overrideDefaultMenu:!0,onClick:m,stripTerminalSeparators:!0,preventScroll:!0,onClose:t},t=>h.createElement("div",t,e))),c&&h.createElement(CardActions,{file:l??null,memberId:a,salesforceRecord:s,unfurlType:t}))}CardContainer.displayName="CardContainer";var ri=a(0x20b4dda68),rl=a(0x236a5cd68),ro=a(0x6709b62e),rs=a(0x1b89a091f),rc=a(0x21cf37dc6),rd=a(0x1d3efd4ea),rm=a(0x339b339c),ru=a(0x1ccef1c6f);function LoadingFileUnfurl(){let e=(0,E.d4)(e=>!(0,ru.ty)(e,"a11y_animations"));return h.createElement(h.Fragment,null,h.createElement(rl.A,{width:799,height:400,className:"p-file_card__container--embedded_box p-file_loading_state__container"},h.createElement("div",{className:j()("p-file_loading_state",{"p-file_loading_state--no-animation":e})},h.createElement("div",{className:"p-file_loading_state__title"},h.createElement(rd.A,{size:36,className:"p-file_loading_state__title__icon"}),h.createElement("div",{className:"p-file_loading_state__title__texts"},h.createElement(rm.A,{size:rc.o.Medium}),h.createElement(rm.A,{size:rc.o.Small}))),h.createElement("div",{className:"p-file_loading_state__content"}))),h.createElement("div",{className:"p-file_loading_state__container--image"},h.createElement("div",{className:j()("p-file_loading_state",{"p-file_loading_state--no-animation":e})},h.createElement("div",{className:"p-file_loading_state__content"}))))}LoadingFileUnfurl.displayName="LoadingFileUnfurl";var rp=a(0xf2b9b0e6),rh=a(0x10aeb4921),r_=a(0x24137a62),rf=a(0x1ba0b4731),rb=a(0x1b2e599bc),rg=a(0xbac48619),ry=a(0x6d72337),rA=a(0x1a80146c8);let rx=new S.Ay("files"),EmbeddedCanvasUnfurlWrapper=({addFadeClass:e=!1,children:t,refToForward:a})=>h.createElement(rl.A,{width:799,height:400,className:"p-embedded_canvas_unfurl__container__box"},h.createElement("div",{className:j()("p-embedded_canvas_unfurl__container",{"p-embedded_canvas_unfurl__container--with_fade":e}),ref:a},t));function EmbeddedCanvasUnfurl({fileId:e,refToForward:t,isLoading:a}){let n=(0,E.d4)(t=>(0,ep.Lp)(t,e)),{embeddedUiData:r}=(0,h.useContext)(aS.N),i=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_badging_highlighting")),l=(0,_.wA)(),o=(0,h.useCallback)(e=>{r?.isFocusedOrReadOnly()&&l((0,rA.A)({e,fileId:n.id,source:eR.f.EMBEDDED_CANVAS_UNFURL}))},[r,l,n.id]),s=(0,ry.$s)(n.id),c=(0,en.A)(s?.getBlockKitThumbnailValue()??void 0),d=(0,rb.Lz)({fileId:n.id,hideTitle:!0,sectionId:void 0}),m=(0,h.useMemo)(()=>(0,U.sR)(n)?h.createElement(ro.o,{file:n}):h.createElement(rb.Ay,{fileId:e,hideTitle:!0,containerClassName:"p-embedded_canvas_unfurl"}),[n,e]);if((0,h.useEffect)(()=>{if(!r)return;let e={name:(0,U.ZG)(n)?n.title??rx.t("Untitled"):rx.t("Can\u2019t view this canvas"),type:rx.t("Canvas preview")};r?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:e})},[n.name,r,n]),!r)return h.createElement(rs.Ay,{fileChannelMessage:null});if((0,U.ZG)(n)&&((0,rg.A)(n)||a||!c?.blocks&&!c?.error))return h.createElement(LoadingFileUnfurl,null);let u=i&&n.show_badge;return(0,U.Sp)(n)?h.createElement(rh.A,{disableFileActions:!0,shouldShowPreview:!1,fileContainerType:ri.zk.FILE_EMBEDDED_UNFURL,file:n}):h.createElement(EmbeddedCanvasUnfurlWrapper,{addFadeClass:!!d?.length,refToForward:t},(0,U.ZG)(n)?h.createElement(rf.A,{file:n,onClick:o,className:"p-embedded_canvas_unfurl__container__file_button"},h.createElement(r_.A,{file:n,hasNotification:u}),m):h.createElement(QuipDeletedState,{file:n}))}EmbeddedCanvasUnfurlWrapper.displayName="EmbeddedCanvasUnfurlWrapper",EmbeddedCanvasUnfurl.displayName="EmbeddedCanvasUnfurl";let rE=h.forwardRef((e,t)=>h.createElement(rp.A,null,h.createElement(EmbeddedCanvasUnfurl,{refToForward:t,...e})));var rC=a(0x253b7a8f3),rk=a(0x18def662b);let EmbeddedChannelSet=({channelSetBlock:e})=>{let t=(0,E.d4)(rk.aL);return e&&t?h.createElement("div",{className:"p-channel_set_embedded_canvas_container"},h.createElement(rC.A,{channelIds:e.channelIds,channelSetName:e.channelSetName,emoji:e.emoji,linkId:e.linkId,blocksContainerContext:a8.pi.quip_unfurl})):null};EmbeddedChannelSet.displayName="EmbeddedChannelSet";var rv=a(0x1faa3f1ac),rS=a(0x5cc5a7cb),rI=a(0xa88049da);let rw=new S.Ay("files"),EphemeralMessageHeader=({onClose:e,ephemeralMessage:t})=>{let a=(0,E.d4)(e=>{if(t)return(0,rI.A)(e,t).appId||void 0}),n=(0,h.useMemo)(()=>({elementName:"canvas_ephemeral_notif_close_button",onClick:{enableClogAction:!0},appId:a}),[a]),r=rw.t("Close ephemeral notification");return h.createElement(rS.A,{msg:t,className:"p-embedded_ephemeral_message_header"},h.createElement(aN.A,{"aria-label":r,"data-qa":"sk_close_modal_button",onClick:e,autoClogProps:n},h.createElement(w.Ah,{name:"close-filled",size:"16",inline:!0})))};EphemeralMessageHeader.displayName="EphemeralMessageHeader";var rT=a(0x138186673),rN=a(0x1991a9b6d),rM=a(0x19a6a6f6a),rR=a(0x1781c9bc2),rP=a(0x174a5556e);let rL=new S.Ay("files"),rO={small:"50%",medium:"85%",large:"100%"};function EphemeralMessageUnfurl({message:e}){let t=(0,_.wA)(),a=(0,nf.DL)(e),n=(0,h.useCallback)(()=>{a&&t((0,rP.hk)({originalMsgTs:a}))},[a,t]),r=(0,E.d4)(t=>{if(e)return(0,rI.A)(t,e).appId||void 0}),i=(0,E.d4)(t=>(0,rR.A)(t,e)),l=(0,h.useMemo)(()=>{let t;return t=e.text||e.attachments||e.blocks?h.createElement(h.Fragment,null,h.createElement(rN.A,{msg:e}),h.createElement(rM.A,{msg:e}),h.createElement(rT.A,{msg:e,className:"p-embedded_message_unfurl__ephemeral--message_attachment"})):h.createElement(h.Fragment,null,h.createElement(rm.A,{sizes:rO,size:rc.o.Large}),h.createElement(rm.A,{sizes:rO,size:rc.o.Medium})),h.createElement("div",{className:"p-embedded_message_unfurl__ephemeral--message_content"},t)},[e]),o=(0,h.useMemo)(()=>{let t=e?.files,a=e?.blocks?.filter(e=>"image"===e.type),n=(t?t.length:0)+(a?a.length:0);if(n){let e=rL.t("{fileCount, plural, =1 {1 attachment} other {# attachments}}",{fileCount:n});return h.createElement("div",{className:"c-pillow_file p-embedded_message_unfurl"},h.createElement(rv.A,{href:i},h.createElement("span",{className:"p-embedded_message_unfurl_text"},h.createElement("span",{className:"p-embedded_message_unfurl_icon"},h.createElement(w.Ah,{name:"attachment"})),h.createElement("span",null,e))))}return null},[e?.blocks,e?.files,i]),s=j()("p-embedded_message_unfurl__container","p-embedded_message_unfurl__container--ephemeral");return h.createElement(Y.A,{eventId:eJ.EventId.QUIP_UNFURL,uiComponentName:eJ.UiComponentName.QUIP_UNFURL_EPHEMERAL,appId:r,clogImpression:!0},h.createElement("div",{className:s},h.createElement(EphemeralMessageHeader,{onClose:n,ephemeralMessage:e}),l,o))}EphemeralMessageUnfurl.displayName="EphemeralMessageUnfurl";var rD=a(0x8c72322a);let rF={small:"30%",medium:"50%",large:"100%"};function LoadingFallbackUnfurl(){let e=[rc.o.Large,rc.o.Large,rc.o.Medium,rc.o.Medium],t=(0,E.d4)(e=>!(0,ru.ty)(e,"a11y_animations"));return h.createElement("div",{className:j()("p-embedded_fallback_unfurl_loading",{"p-embedded_fallback_unfurl_loading--no-animation":t})},h.createElement("div",{className:"p-embedded_fallback_unfurl_loading__content"},e.map((e,t)=>h.createElement(rm.A,{key:`missing-text--${t}`,size:e,sizes:rF,className:"p-embedded_fallback_unfurl_loading__content__text"}))))}function EmbeddedFallbackUnfurl({unfurl:e,fileChannelMessage:t,isLoading:a}){let n=(0,E.d4)(e=>t?(0,rI.A)(e,t).appId??void 0:void 0);return a?h.createElement(LoadingFallbackUnfurl,null):t?h.createElement(Y.A,{eventId:eJ.EventId.QUIP_UNFURL,uiComponentName:eJ.UiComponentName.QUIP_UNFURL_GENERIC,clogImpression:!0,appId:n},h.createElement(rD.A,{className:j()("c-message_card__pillow","p-embedded_fallback_unfurl")},(0,ry.dK)({hideBorder:!0,...e,messageTs:t.ts,service:e?.botId,activeChannelId:t.channel,showDelete:!1,unsetWidthStyle:!0,blocksContainerContext:a8.pi.quip_unfurl}))):h.createElement(rs.Ay,{fileChannelMessage:t})}LoadingFallbackUnfurl.displayName="LoadingFallbackUnfurl",EmbeddedFallbackUnfurl.displayName="EmbeddedFallbackUnfurl";var rU=a(0x624dd21),rB=a(0x1f93c84b8),rH=a(0x252dd886b),rW=a(0xe1300f34);let rV={style:"card",mini:!1};function EmbeddedAudioUnfurl({file:e}){let t=(0,h.useCallback)(t=>{let a=(0,rW.p4)(e);if(a){let e=rH.A.getBySrc(a);e?.seek(t),e?.play()}},[e]);return h.createElement("div",{className:"p-embedded_file_unfurl__audio"},h.createElement(rU.A,{file:e,audioPlayerStyle:rV}),h.createElement(rB.A,{file:e,className:"p-embedded_file_unfurl__audio__transcript",setCurrentTime:t}))}EmbeddedAudioUnfurl.displayName="EmbeddedAudioUnfurl";let rG=h.forwardRef((e,t)=>h.createElement(EmbeddedAudioUnfurl,{refToForward:t,...e}));var rq=a(0x1d798e7d1);let rj=new S.Ay("embedded_file_unfurl");function EmbeddedGenericFileUnfurl({file:e,channelId:t,unfurlTimestamp:a,refToForward:n,hasEphemeralNotifications:r,detailTextOverride:i}){let l=(0,_.wA)(),{embeddedUiData:o}=(0,h.useContext)(aS.N),s=(0,h.useCallback)(()=>{o?.isFocusedOrReadOnly()&&l((0,rA.A)({fileId:e.id,source:eR.f.EMBEDDED_GENERIC_UNFURL}))},[l,o,e.id]);(0,h.useEffect)(()=>{if(!o||!e.is_deleted)return;let t={name:rj.t("Deleted file",{fallbackHash:"3876d76c9dd08c3442581204e246d74ade686acd",fallbackHashNs:"files"}),type:rj.t("File preview",{fallbackHash:"2c3cafa4db3f3e1e51b3dff4303502dbe42b7a89",fallbackHashNs:"slack_docs"})};o?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:t})},[e,o]);let c=(0,E.d4)(e=>t&&a&&(0,nv.Ld)(e,t,a,!0)),d=c&&c.ts?c.ts:void 0,m=(0,rq.j)(e),u=h.createElement(rh.A,{file:e,containerClassName:j()("p-file_card__container--embedded",{"p-file_card__container--attached":r}),className:j()("p-file_card--embedded",f.EmbeddedUIAttributes.EMBEDDED_FILE_CARD_CLASSNAME,{"p-file_card--embedded_attached":r}),fileContainerType:ri.zk.FILE_EMBEDDED_UNFURL,onClick:s,documentUnfurlTs:d,ref:n,containingFileChannelId:t,shouldShowPreview:m,disableFileActions:!0,detailTextOverride:i});return m?h.createElement(rl.A,{width:799,height:400,className:"p-file_card__container--embedded_box"},u):u}EmbeddedGenericFileUnfurl.displayName="EmbeddedGenericFileUnfurl";let rz=h.forwardRef((e,t)=>h.createElement(EmbeddedGenericFileUnfurl,{refToForward:t,...e}));var rK=a(0xeb42f08f),r$=a(0xf02ea055);function EmbeddedImageUnfurl({file:e,quipMediaInfoGenerator:t}){let{embeddedUiData:a}=(0,h.useContext)(aS.N),n=(0,h.useCallback)(()=>a?.performAction({action:f.EmbeddedUiAction.FOCUS_ASSOCIATED_SECTION}),[a]);return h.createElement(rl.A,{width:e.thumb_480_w||e.thumb_360_w,height:e.thumb_480_h||e.thumb_360_h,className:"p-embedded_file_unfurl__image",unsetWidthStyle:!0},h.createElement(r$.A,{file:e,maxSize:"full",dimensionSetting:rK.A.FULL_WIDTH,fileContainerType:ri.zk.FILE_EMBEDDED_UNFURL,quipMediaInfoGenerator:t,quipSectionId:a?.getAssociatedEntityId()??void 0,onImageDescriptionClose:n}))}EmbeddedImageUnfurl.displayName="EmbeddedImageUnfurl";let rY=h.forwardRef((e,t)=>h.createElement(EmbeddedImageUnfurl,{refToForward:t,...e}));var rQ=a(0x4c93161f),rZ=a(0x17ea7e4a2);function EmbeddedVideoUnfurl({file:e,refToForward:t,isMockedVideo:a}){let{width:n,height:r}=(0,rQ.A)(e),[i,l]=(0,h.useState)(!1),o=(0,h.useCallback)(e=>{e.stopPropagation()},[]),s=520;520/n*r>400&&(s=400/r*n);let c=h.createElement("div",{onClick:o,className:"p-embedded_video_unfurl",ref:t,"data-qa":"embedded_video_unfurl"},h.createElement(rZ.A,{file:e,showVideo:i,setShowVideo:l,maxWidth:s,viewContext:ri.zk.FILE_EMBEDDED_UNFURL,isMockedVideo:a}));return h.createElement(rl.A,{width:799,height:400,className:"p-embedded_video_unfurl_box",unsetWidthStyle:!0},c)}EmbeddedVideoUnfurl.displayName="EmbeddedVideoUnfurl";let rJ=h.forwardRef((e,t)=>h.createElement(EmbeddedVideoUnfurl,{refToForward:t,...e}));var rX=a(0x16a71850f),r0=a(0x14cd316f9),r1=a(0x1abdfd657),r2=a(0x1b5e73e1d);let r4=new S.Ay("embedded_file_unfurl");function EmbeddedFileUnfurl({id:e,channelId:t,unfurlTimestamp:a,hasEphemeralNotifications:n,initialLoadTrace:r,isLoading:i}){let l,o=(0,_.wA)(),[s,c]=(0,h.useState)(!1),[d,m]=(0,h.useState)(!1),{embeddedUIContainerElement:u,embeddedUiData:p,docEmbed:b}=(0,h.useContext)(aS.N),g=(0,E.d4)(t=>(0,ep.Lp)(t,e));(0,rX.y)(r,"canvas:embedded_file_unfurl",[g]),(0,h.useEffect)(()=>{if(s)return;let e=!0;return(0,U.sR)(g)&&"generic"===(0,r1.t)(g)&&o((0,tl.B2)({fileId:g.id,reason:"file-unfurl"})).finally(()=>{e&&c(!0)}),()=>{e=!1}},[s,g,o]),(0,h.useEffect)(()=>{if(d)return;let e=!0;return(0,U.Bp)(g)&&o((0,tl.B2)({fileId:g.id,reason:"file-unfurl"})).finally(()=>{e&&m(!0)}),()=>{e=!1}},[d,g,o]),(0,h.useEffect)(()=>{if(u&&l)return(0,r0.LR)(u,l),()=>(0,r0.xB)(u)}),(0,h.useEffect)(()=>{let e;if(!p||!g.name)return;e="image"===(0,r1.t)(g)?r4.t("Image"):(0,U._y)(g)?r4.t("Video"):(0,U.pI)(g)?r4.t("Audio"):r4.t("{type} preview",{type:g.pretty_type});let t={name:g.title??g.name,type:e,description:g.alt_txt};p?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:t})},[g,p]);let y=(0,h.useMemo)(()=>{if(b)return async()=>{let t=b.docEditor,{files:a}=await t.getEmbeddedFiles();return{quipFileId:e,files:a}}},[e,b]);if((0,eu.lv)(g)||!p)return h.createElement(rs.Ay,{fileChannelMessage:null});if((0,rg.A)(g)||i)return h.createElement(LoadingFileUnfurl,null);(0,U.Vx)(g)||"image"!==(0,r1.t)(g)||(l=()=>o((0,r2.A)({fileId:g.id})));let A=`embedded_file_unfurl_${e}`;return(0,U.Vx)(g)||"image"!==(0,r1.t)(g)?(0,U._y)(g)?h.createElement(rp.A,{id:A},h.createElement(rJ,{file:g})):(0,U.pI)(g)?h.createElement(rp.A,{id:A},h.createElement(rG,{file:g})):(0,U.Sp)(g)?h.createElement(rp.A,{id:A},h.createElement(rh.A,{disableFileActions:!0,shouldShowPreview:!1,fileContainerType:ri.zk.FILE_EMBEDDED_UNFURL,file:g})):h.createElement(rp.A,{id:A},h.createElement(rz,{file:g,channelId:t,unfurlTimestamp:a,hasEphemeralNotifications:n})):h.createElement(rp.A,{id:A},h.createElement(rY,{file:g,quipMediaInfoGenerator:y}))}EmbeddedFileUnfurl.displayName="EmbeddedFileUnfurl";var r5=a(0x102edf836),r3=a(0xb1ea448c),r6=a(0x1c2e18449);function EmbeddedGenericFileUnfurlPlaceholder({pendingFile:e}){return h.createElement("div",null,h.createElement(r6.A,{pendingFileId:e.pendingFileId||"",position:"center"}))}EmbeddedGenericFileUnfurlPlaceholder.displayName="EmbeddedGenericFileUnfurlPlaceholder";var r8=a(0x4260f1e9);function EmbeddedImageUnfurlPlaceholder({pendingFile:e,height:t,width:a,maxHeight:n,maxWidth:r}){let i=(0,r8.F_)(e);if(!i||"image"!==i.type)return h.createElement(EmbeddedGenericFileUnfurlPlaceholder,{pendingFile:e});let l={height:t,width:a,maxHeight:n,maxWidth:r},o=a/t<2;return h.createElement("div",{className:j()("p-embedded_image_unfurl_placeholder",{vertical:o}),style:l},h.createElement("img",{className:j()("c-pending_files__thumbnail",{"c-pending_files__thumbnail--pending":!!e}),src:i.thumbnail,alt:i.alt,style:l}),h.createElement(r6.A,{pendingFileId:i.id||"",position:"center"}))}EmbeddedImageUnfurlPlaceholder.displayName="EmbeddedImageUnfurlPlaceholder";var r7=a(0x15bcc7157);function EmbeddedVideoUnfurlPlaceholder({pendingFile:e}){let t=(0,r8.DW)(e);return t&&"video"===t.type?h.createElement("div",{className:"p-embedded_video_unfurl_placeholder_container"},h.createElement("div",{className:"p-embedded_video_unfurl_placeholder"},h.createElement(r7.A,{pendingUpload:e,widthUnrestricted:!0}))):h.createElement(EmbeddedGenericFileUnfurlPlaceholder,{pendingFile:e})}EmbeddedVideoUnfurlPlaceholder.displayName="EmbeddedVideoUnfurlPlaceholder";var r9=a(0x1bd185e94),ie=a(0x357dacc7);let it=new S.Ay("files");function EmbeddedFileUnfurlPlaceholder({placeholderDetails:e}){let{pendingFileId:t,height:a,width:n,maxWidth:r,maxHeight:i,isSlackDocument:l,isImage:o,loading:s,onUploadClick:c,fileSizeError:d,fileSizeLimitMB:m,allowUpload:u}=e,p=(0,E.d4)(e=>(0,ie.Oq)(e,{pendingFileId:t||""}));if(l)return h.createElement(LoadingFileUnfurl,null);if(p){let e=(0,r8.x2)({pendingUpload:p});return"video"===e?h.createElement(EmbeddedVideoUnfurlPlaceholder,{pendingFile:p}):"image"===e?h.createElement(EmbeddedImageUnfurlPlaceholder,{pendingFile:p,height:a,width:n,maxWidth:r,maxHeight:i}):h.createElement(EmbeddedGenericFileUnfurlPlaceholder,{pendingFile:p})}if(s)return h.createElement(r3.A,{color:"white",size:"jumbo"});let renderTitle=e=>{let a=it.rt("Unable to load the {fileType}",{fileType:e});return(d||!s&&t)&&(a=it.rt("Unable to upload the {fileType}",{fileType:e})),h.createElement("div",null,h.createElement("span",{className:"p-embedded_file_unfurl_placeholder__title"},a))};renderTitle.displayName="renderTitle";let renderSubtitle=e=>{if(d&&!o){let t=it.rt("The {fileType} is larger than the file size limit.",{fileType:e}),a=m&&(0,r9.Z$)(m,"MB",0,!1);if(a){let{size:n,type:r}=a;t=it.rt("The {fileType} is larger than the {size} {type} limit.",{fileType:e,size:n,type:r})}return h.createElement("div",{className:"p-embedded_file_unfurl_placeholder__subtitle_container"},h.createElement("span",{className:"p-embedded_file_unfurl_placeholder__subtitle"},t))}return null};renderSubtitle.displayName="renderSubtitle";let renderUploadButton=()=>{if(u){let e=it.t("Upload {fileType}",{fileType:o?"Image":"File"});return!s&&t&&(e=it.t("Try Again")),h.createElement("div",{className:"p-embedded_file_unfurl_placeholder__button_container"},h.createElement(r5.Ay,{type:"outline",onClick:c,size:"small"},e))}return null};renderUploadButton.displayName="renderUploadButton";let _=o?"image":"file";return h.createElement("div",{className:"p-embedded_file_unfurl_placeholder"},h.createElement("div",{className:"p-embedded_file_unfurl_placeholder__body"},renderTitle(_),renderSubtitle(_),renderUploadButton()))}EmbeddedFileUnfurlPlaceholder.displayName="EmbeddedFileUnfurlPlaceholder";var ia=a(0x210cf696f),ir=a(0x23a917941),ii=a(0xf297aec1),il=a(0x1939011ec),io=a(0x1d2cd7755),is=a(0x126f22530),ic=a(0x1b88224f9),id=a(0x15dd8a31),im=a(0x11eae4d05);let iu=new S.Ay("slack_docs");var ip=((l={}).SEVEN_DAYS="seven_days",l.DAY="one_day",l.UNLIMITED="all_time",l);function SummaryCardSettingsModal({onSave:e,closeModal:t,dateRangeSetting:a}){let n,r=(0,E.d4)(eL.QG),i=(0,h.useMemo)(()=>r?[{label:iu.t("Last 7 days"),value:"seven_days"},{label:iu.t("Last 24 hours"),value:"one_day"},{label:iu.t("From all time"),value:"all_time"}]:[],[r]);n=r?{label:iu.t("Last 7 days"),value:"seven_days"}:void 0;let l=i.find(e=>e.value===a);l&&(n=l);let[o,s]=(0,h.useState)(n),c=(0,h.useCallback)(()=>{e?.(o?.value??"seven_days"),t?.()},[o,e,t]),d=(0,h.useCallback)(e=>{s(e)},[s]);return r?h.createElement(ic.A,{title:iu.t("AI Summary Settings"),onClose:t,onCancel:t,onSubmit:c,submitButtonText:iu.t("Save")},h.createElement("div",{className:"p-canvas_smart_cards__settings_modal_label bold"},iu.t("Date range")),h.createElement(id.A,{className:"p-canvas_smart_cards__settings_modal_selector",options:i,onOptionSelected:d,selectedOption:o,width:"100%"})):null}SummaryCardSettingsModal.displayName="SummaryCardSettingsModal";let ih=(0,im.e)(SummaryCardSettingsModal),i_=new S.Ay("slack_docs");function ActiveDiscussionsCardSettingsModal({onSave:e,closeModal:t,dateRangeSetting:a,discussionTypeSetting:n}){let r=(0,E.d4)(eL.QG),i=(0,h.useMemo)(()=>r?[{label:i_.t("Messages with the most activity"),value:0},{label:i_.t("Most recent messages"),value:1},{label:i_.t("Messages by the channel owner"),value:2}]:[],[r]),l=r?i[0]:void 0,o=i.find(e=>e.value===n);o&&(l=o);let s=(0,h.useMemo)(()=>r?[{label:i_.t("Last 7 days"),value:ip.SEVEN_DAYS},{label:i_.t("Last 24 hours"),value:ip.DAY},{label:i_.t("From all time"),value:ip.UNLIMITED}]:[],[r]),c=r?s[0]:void 0,d=s.find(e=>e.value===a);d&&(c=d);let[m,u]=(0,h.useState)(l),[p,_]=(0,h.useState)(c),[f,b]=(0,h.useState)(""),g=(0,h.useCallback)(()=>{e?.(m?.value??0,p?.value??ip.SEVEN_DAYS,f)},[e,m?.value,p?.value,f]),y=(0,h.useCallback)(e=>{u(e)},[]),A=(0,h.useCallback)(e=>{_(e)},[]),x=(0,h.useCallback)(e=>b(e),[]);return r?h.createElement(ic.A,{title:i_.t("Active Discussions Settings"),onClose:t,onCancel:t,onSubmit:g,submitButtonText:i_.t("Save")},h.createElement("div",{className:"p-canvas_smart_cards__settings_modal_label bold"},i_.t("Show")),h.createElement(id.A,{className:"p-canvas_smart_cards__settings_modal_selector",options:i,onOptionSelected:y,selectedOption:m,width:"100%"}),h.createElement("div",{className:"p-canvas_smart_cards__settings_modal_label bold"},i_.t("Date range")),h.createElement(id.A,{className:"p-canvas_smart_cards__settings_modal_selector",options:s,onOptionSelected:A,selectedOption:p,width:"100%"}),h.createElement(io.A,{text:i_.t("Filter for a keyword (optional)")},h.createElement(is.A,{type:"text",placeholder:i_.t("Filter term"),name:"filter-input",id:"filter-input",value:f,onChange:x}))):null}ActiveDiscussionsCardSettingsModal.displayName="ActiveDiscussionsCardSettingsModal";let ib=(0,im.e)(ActiveDiscussionsCardSettingsModal);var ig=a(0x7627ed13),iy=a.n(ig);let LoadingState=()=>h.createElement("div",{className:iy().container},h.createElement("div",{className:iy().entity},h.createElement(rd.A,{size:36}),h.createElement("div",{className:iy().entityText},h.createElement(rm.A,{className:iy().textTall,size:rc.o.Small}),h.createElement(rm.A,{size:rc.o.Medium}))),h.createElement(rm.A,{size:rc.o.Large,className:iy().content}),h.createElement("div",{className:iy().threads},h.createElement(rd.A,{size:24}),h.createElement(rm.A,{size:rc.o.Small,className:"margin_left_25"})));LoadingState.displayName="LoadingState";var iA=a(0x231f5b188),ix=a(0x1982ade12);let iE=new S.Ay("slack-docs"),ActiveDiscussionCard=({recentMsg:e,channelId:t})=>{let a=(0,E.d4)(eL.QG),n=(0,E.d4)(a=>(0,nv.Ld)(a,t,e.ts));return a&&n?h.createElement("div",{className:"p-canvas_smart_cards__active_discussions_container"},h.createElement("div",{className:"p-canvas_smart_cards__active_discussions_header"},h.createElement(ii.A,{ts:n.ts,channelId:t,containerClassName:"p-embedded_message_unfurl__container__header"}),h.createElement(iA.A,{threadId:`${t}-${n.thread_ts}`,entryPoint:ab.lZ.CanvasSmartCard})),h.createElement(ir.A,{message:n,containerClassName:"p-embedded_message_unfurl__container__content p-canvas_smart_cards__active_discussions_container-inner"}),h.createElement(il.A,{msg:n})):null};ActiveDiscussionCard.displayName="ActiveDiscussionCard";let ActiveDiscussionsCard=({channelId:e})=>{let t=(0,h.useRef)(null),[a,n]=(0,h.useState)(!1),[r,i]=(0,h.useState)(!1),l=(0,E.d4)(eL.QG),{embeddedUiData:o}=(0,h.useContext)(aS.N),[s,c]=(0,h.useState)(!1),d=(0,h.useCallback)(()=>{},[]),m=(0,h.useCallback)(()=>{c(!1)},[]),[u,p]=(0,h.useState)(),b=(0,_.wA)(),g=(0,h.useCallback)((t,a)=>{let n;return l&&(t===ip.DAY?n=(0,eK.Ay)().subtract(1,"days").unix().toString():t===ip.SEVEN_DAYS&&(n=(0,eK.Ay)().subtract(7,"days").unix().toString()),b((0,ix.S)({channel:e,reason:"active-discussions-card",oldest:n})).then(e=>{e.ok&&e?.messages&&p(e?.messages.filter(e=>{let t=!!e.reply_count&&e.reply_count>0&&"USLACKBOT"!==e.user;if(a){let n=(0,nf.P5)(e);return t&&n?.toLowerCase().includes(a.toLowerCase())}return t}))})),null},[e,b,l]),y=(0,h.useCallback)(()=>b((0,e0.O)()),[b]),A=(0,h.useCallback)((e,t,a)=>{g(t,a),y()},[g,y]);(0,th.A)(()=>{g()});let x=(0,h.useCallback)(()=>{b(ib({onSave:A,onClose:y}))},[b,y,A]),C=(0,h.useCallback)(()=>{o?.performAction({action:f.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[o]),k=(0,h.useCallback)(()=>l?h.createElement(ar.Ay,{width:"auto"},h.createElement(aT.Dr,{label:iE.t("Edit settings"),onSelected:x}),h.createElement(aT.bX,null),h.createElement(aT.Dr,{label:iE.t("Delete"),onSelected:C,danger:!0})):null,[C,l,x]),v=(0,h.useCallback)(()=>l?h.createElement("div",{className:"c-card_container__actions p-canvas_smart_cards__options"},h.createElement(aT.cQ,{renderMenu:k,position:"bottom-right",offsetY:8},h.createElement(aN.A,{size:"x-small","aria-label":iE.t("More options")},h.createElement(w.Ah,{name:"ellipsis-vertical-filled"})))):null,[l,k]),S=(0,h.useCallback)(()=>l?u?u.length?h.createElement("div",{className:"p-canvas_smart_cards__active_discussions__body"},u.map(t=>h.createElement(ActiveDiscussionCard,{key:t.ts,recentMsg:t,channelId:e}))):h.createElement("div",{className:"p-canvas_smart_cards__error"},iE.rt("No active discussions currently taking place.")):h.createElement(LoadingState,null):null,[e,l,u]);(0,ec.A)(()=>{t.current&&!a&&t.current.offsetHeight>=400&&n(!0)},[l]);let I=(0,h.useCallback)(()=>i(!r),[r]);return l&&e?h.createElement("div",{className:"p-canvas_smart_cards p-canvas_smart_cards--active_discussions",onMouseEnter:d,onMouseLeave:m},h.createElement("div",{className:"p-canvas_smart_cards__header"},h.createElement("div",{className:"p-canvas_smart_cards__header_title_block"},h.createElement(w.Ah,{name:"message",inline:!0,size:"20"}),h.createElement("div",{className:"p-canvas_smart_cards__header__title"},iE.t("Active Discussions"))),s?v():null),h.createElement("div",{className:"p-canvas_smart_cards__summary",ref:t,style:{maxHeight:r?"100%":400}},S()),a?h.createElement("div",{className:"p-canvas_smart_cards__see_more_area"},h.createElement(ia.A,{onClick:I},r?iE.t("See less"):iE.t("See more"))):null):null};function generateActiveDiscussionsCardComponentId({channelId:e}){return`activediscussions:${e}`}function parseActiveDiscussionsCardComponentId(e){if(e.startsWith("activediscussions:"))return{channelId:e.substring(18)}}function EmbeddedGenericActiveDiscussionsCard({channelId:e}){return(0,E.d4)(eL.QG)?h.createElement(ActiveDiscussionsCard,{channelId:e}):null}ActiveDiscussionsCard.displayName="ActiveDiscussionsCard",EmbeddedGenericActiveDiscussionsCard.displayName="EmbeddedGenericActiveDiscussionsCard";var iC=a(0x13ec15e33);function useInCanvasTemplate(){let{slackFileId:e}=(0,h.useContext)(aS.N),t=(0,E.d4)(t=>e?(0,ep.Lp)(t,e):null);return!!(0,U.dE)(t)}let ik=new S.Ay("embedded-sample-content-template");function EmbeddedSampleContentTemplate({icon:e,description:t,buttonText:a,onButtonClick:n,loading:r,isDisabled:i,accessibleName:l="",autoClogProps:o={}}){let{embeddedUIContainerElement:s,embeddedUiData:c}=(0,h.useContext)(aS.N),d=useInCanvasTemplate(),m=(0,_.wA)();(0,h.useEffect)(()=>{if(s&&n)return(0,r0.LR)(s,n),()=>(0,r0.xB)(s)},[s,n]),(0,h.useEffect)(()=>{if(!c)return;let e="string"==typeof a?a:l,n=`${e}.${t?` ${t}`:""}`;c?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:{name:e,type:n}})},[a,t,c,l]);let u=(0,h.useCallback)(()=>{let e=ik.t("Placeholders cannot be filled in while in template editing mode.");n&&(d?m((0,tm.M)({element:h.createElement(eY.A,{svgIconProps:{name:"info"},showCloseButton:!0,"data-qa":"toast-canvas-placeholder-template-mode"},e)})):n())},[n,d,m]);return h.createElement("div",{className:"p-embedded_sample_content_template","data-qa":"embedded-sample-content-template"},h.createElement(r5.Ay,{className:j()({"p-embedded_sample_content_template__content__button":!0,"p-embedded_sample_content_template__grab":d}),type:"outline",onClick:u,disabled:!n||r||i,"data-qa":"embedded-sample-content-template-content-button",autoClogProps:o},r?h.createElement("div",{className:"p-embedded_sample_content_template__loader"},h.createElement(r3.A,{color:"white",size:"jumbo"})):h.createElement("div",{className:"p-embedded_sample_content_template__icon"},h.createElement(w.Ah,{name:e,"data-qa":"embedded-sample-content-template-icon"})),h.createElement(as.Ay,{tip:a},h.createElement("div",{className:"p-embedded_sample_content_template__title"},a)),h.createElement("div",{className:"p-embedded_sample_content_template__content","data-qa":"embedded-sample-content-template-content"},t.trim()?t:h.createElement("br",null))))}EmbeddedSampleContentTemplate.displayName="EmbeddedSampleContentTemplate";var iv=a(0x30d0b075),iS=a(0x226609a31);let use_upload_file=e=>{let t=(0,E.d4)(W.ZT),a=(0,_.wA)(),[n,r]=(0,h.useState)(!1),i=(0,eo.A)(),l=(0,h.useCallback)(n=>n&&n[0]&&t?(r(!0),a((0,iS.Z)({teamId:t,files:[n[0]]})).then(t=>a((0,tl.B2)({fileId:t.fileIds[0],reason:e}))).then(e=>e||e3.S.reject(Error("No file"))).catch(t=>{r(!1);let a=(0,iv.Zf)(t);i.error(`Error uploading a file in use-upload-file reason: ${e} , ${a}`)})):Promise.resolve(),[a,t,e,i]);return h.useMemo(()=>({loading:n,onFilesSelectedHandler:l}),[n,l])},iI=new S.Ay("placeholder-unfurls"),iw="EMPTY",iT=new Map([["profplace",f.PlaceholderInsertionType.PROFILE],["wftemplate",f.PlaceholderInsertionType.WORKFLOW],["linkplace",f.PlaceholderInsertionType.LINK],["imageplace",f.PlaceholderInsertionType.IMAGE],["canvasplace",f.PlaceholderInsertionType.CANVAS],["videoplace",f.PlaceholderInsertionType.VIDEO],["audioplace",f.PlaceholderInsertionType.AUDIO],["fileplace",f.PlaceholderInsertionType.FILE],["listplace",f.PlaceholderInsertionType.LIST],["sfrecordplace",f.PlaceholderInsertionType.SALESFORCE_RECORD]]),iN=new Map;function parsePlaceholderComponentId(e){let t=e.split(":"),a=t[0],n=t[1],r=iT.get(a);return r===f.PlaceholderInsertionType.IMAGE||r===f.PlaceholderInsertionType.LINK?{placeholderType:r,placeholderId:n,isStatic:"static"===t[2]}:r===f.PlaceholderInsertionType.PROFILE?{placeholderType:r,placeholderId:n,profileVariant:t[2]}:{placeholderType:r,placeholderId:n}}function insertPlaceholder(e,t,a,n,r){let i=r??getPlaceholderDefaultName(t),l=e.docEditor,o=iN.get(t),s=`${o}:${iw}`;l?.insertSlackObject({type:f.SlackObjectType.GENERIC,id:s},{sectionId:a,placeholderType:t,placeholderName:i},n)}function getPlaceholderDefaultName(e){switch(e){case f.PlaceholderInsertionType.PROFILE:return iI.t("Add a profile");case f.PlaceholderInsertionType.WORKFLOW:return iI.t("Add a workflow",{fallbackHash:"43c3d1c10e5950cd219e3acdec45d13f90ec9b7e",fallbackHashNs:"workflow_templates_in_canvas"});case f.PlaceholderInsertionType.LINK:return iI.t("Add a link");case f.PlaceholderInsertionType.IMAGE:return iI.t("Add an image");case f.PlaceholderInsertionType.CANVAS:return iI.t("Add a canvas");case f.PlaceholderInsertionType.FILE:return iI.t("Add a file");case f.PlaceholderInsertionType.LIST:return iI.t("Add a list",{fallbackHash:"e64911eee0b669943c495cec4d6548d9ed0bcd3a",fallbackHashNs:"lists"});case f.PlaceholderInsertionType.VIDEO:return iI.t("Create a video recording");case f.PlaceholderInsertionType.AUDIO:return iI.t("Create an audio recording");default:return""}}iT.forEach((e,t)=>{iN.set(e,t)});let iM=new S.Ay("placeholder-unfurls");function EmbeddedAudioPlaceholder({placeholderAudioId:e}){let t=(0,_.wA)(),{embeddedUiData:a}=(0,h.useContext)(aS.N),{loading:n,onFilesSelectedHandler:r}=use_upload_file("embedded-audio-placeholder"),i=(0,h.useCallback)((e,t)=>{r([t]).then(e=>{e?.permalink&&a?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e?.permalink})})},[a,r]),l=(0,h.useCallback)(()=>{t((0,tN.A)({onContainerUpload:i}))},[t,i]);return e!==iw?null:h.createElement(EmbeddedSampleContentTemplate,{description:iM.t("Record a new audio clip.",{fallbackHash:"1765276eb70514255a0bc5d49a991140d5411df0",fallbackHashNs:"stories_av"}),buttonText:iM.t("Create an audio recording",{fallbackHash:"1765276eb70514255a0bc5d49a991140d5411df0",fallbackHashNs:"stories_av"}),icon:"microphone",loading:n,onButtonClick:l,isDisabled:a?.isReadOnly()})}EmbeddedAudioPlaceholder.displayName="EmbeddedAudioPlaceholder";var iR=a(0x23dbf181a),iP=a(0xf8560e15);function parseBookmarksComponentId(e){if(e.startsWith("bookmarks:"))return{channelId:e.substring(10)}}function EmbeddedGenericBookmarks({channelId:e}){let{inChannelCanvasPreview:t}=(0,h.useContext)(iP.A),a=(0,h.useRef)(null),n=(0,h.useCallback)(e=>{a.current=e,a.current?.toggleAttribute(f.EmbeddedUIAttributes.NO_FOCUS_ON_CLICK,!0)},[]);return h.createElement("div",{className:"p-embedded_generic_bookmarks",ref:n},h.createElement(iR.A,{channelId:e,readOnly:t,hidePins:!0,displayVertical:!0,verticalLimit:10}))}EmbeddedGenericBookmarks.displayName="EmbeddedGenericBookmarks";let makeBulletSections=e=>e.flatMap(({bulletItem1:e,bulletItem2:t})=>(({bulletItem1:e,bulletItem2:t})=>{let a=[{type:"rich_text_list",style:"bullet",indent:0,elements:[{type:"rich_text_section",elements:[{type:"text",text:e}]}],block_id:(0,X.A)()}];return t&&a.push({type:"rich_text_list",style:"bullet",indent:1,elements:[{type:"rich_text_section",elements:[{type:"text",text:t}]}],block_id:(0,X.A)()}),a})({bulletItem1:e,bulletItem2:t})),iL=new S.Ay("placeholder-unfurls"),iO={PRODUCT_VISION_EXAMPLE:"PRODUCT_VISION_EXAMPLE",PROJECT_TASKS_EXAMPLE:"PROJECT_TASKS_EXAMPLE",PROJECT_BRIEF_EXAMPLE:"PROJECT_BRIEF_EXAMPLE",TESTING_PLAN_EXAMPLE:"TESTING_PLAN_EXAMPLE",EVENT_AGENDA_EXAMPLE:"EVENT_AGENDA_EXAMPLE",EMPTY:"EMPTY"};function useQuipPlaceholderName(){let{docEmbed:e,embeddedUiData:t}=(0,h.useContext)(aS.N),a=(0,en.A)(e?.placeholdersInfo),n=(0,h.useMemo)(()=>a?[...a.values()]:[],[a]);return(0,h.useMemo)(()=>{if(t?.getAssociatedEntityId()){for(let e of n)if(e.sectionIds.has(t.getAssociatedEntityId()))return e.name}return null},[t,n])}var iD=a(0x13cf5ff2e),iF=a(0x1cdfe2b),iU=a(0x41a56f6d);let iB=new S.Ay("placeholder-unfurls");function EmbeddedCanvasPlaceholder({placeholderCanvasId:e}){let t,a,n,r,i,l,o,s,c,d,m,u,p,b,g,y,A,x,C,k,v,S,I,w,T,N,M,R,P,L,O,{docEmbed:D,embeddedUiData:F,slackFileId:B}=(0,h.useContext)(aS.N),H=useQuipPlaceholderName(),W=useInCanvasTemplate(),V=(0,E.d4)(e=>{let t=B?(0,ep.Lp)(e,B):void 0;if(!(0,U.DQ)(t))return;let a=(0,U.Vl)(t),n=(0,ep.Lp)(e,a||"");if((0,U.CA)(n))return n.template_name}),G=(0,E.d4)(iD.V),q=(0,_.wA)(),j=D?.docEditor,[z,K]=h.useState(!1),$=(0,eo.A)(),Y=(0,h.useCallback)(async()=>{try{j?.focusEditor(),K(!0);let e=new e3.S((e,t)=>{q((0,iF.A)({onCreate:e,source:iU.P.INSERT_CANVAS_MODAL_CREATE})).catch(t)}),t=await e,a=await q((0,tl.PF)({fileId:t?.fileId}));if(!a?.permalink)return;await F?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:a?.permalink}),G||q((0,eX.A)({fileId:a.id,source:eR.f.EMBEDDED_CANVAS_PLACEHOLDER})),q((0,tO.A)({source:tA.O.PLACEHOLDER,parentCanvasId:B,embeddedFileId:a.id,isNewStandaloneCanvas:!0}))}catch(t){let e=(0,iv.Zf)(t);$.error(`Error inserting a new canvas from embedded-canvas-placeholder, error: , ${e}`)}finally{K(!1)}},[q,j,F,$,G,B]),Q=(0,h.useCallback)(async e=>{try{j?.focusEditor(),K(!0);let t=await q((0,tl.PF)({fileId:e}));if(!t?.permalink)return;F?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:t?.permalink}),q((0,tO.A)({source:tA.O.PLACEHOLDER,parentCanvasId:B,embeddedFileId:e}))}catch(t){let e=(0,iv.Zf)(t);$.error(`Error inserting an existing canvas from embedded-canvas-placeholder, error: , ${e}`)}finally{K(!1)}},[q,j,F,$,B]),Z=(0,h.useCallback)(()=>{q((0,tg.Ay)({onInsertCanvas:Q,onInsertNewCanvas:Y,source:"embedded-canvas-placeholder",sourceTemplateName:V}))},[q,Q,Y,V]),J=(t=iL.t("Innovation at the Core: We\u2019re committed to pushing the envelope of innovation. Our products will always be at the forefront of what\u2019s possible, setting new benchmarks in the industry."),a=iL.t("Our Guiding Principles:"),n=iL.t("Product vision"),r=iL.t("Progress Overview:"),i=iL.t("As of today, Project Phoenix is progressing smoothly and remains on track to meet our target milestones and launch date. Here\u2019s a snapshot of the current status:"),l=iL.t("Project Tasks"),o=iL.t("Development: 80% complete"),s=iL.t("Backend development is finished, and frontend development is in the final stages."),c=iL.t("Design: 95% complete"),d=iL.t("UI/UX designs have been refined based on user feedback and are ready for implementation."),m=iL.t("Testing: 60% complete"),u=iL.t("QA testing has identified and resolved most of the critical issues."),p=iL.t("Integration: 70% complete"),b=iL.t("Integration with financial data sources is proceeding as planned, with minor adjustments required."),g=iL.t("Project Overview:"),y=iL.t("Project Phoenix is a transformative mobile app development project aimed at revolutionizing personal finance management. The app\u2019s primary objective is to empower users to take control of their financial well-being through intuitive features and seamless user experiences."),A=iL.t("Project Brief"),x=iL.t("Testing Objectives: "),C=iL.t("Outline the main objectives of the testing phase, such as identifying and fixing defects, ensuring functionality, and verifying compliance with requirements."),k=iL.t("In-Scope Items: List the specific components, features, and functionalities that will be tested as part of this plan."),v=iL.t("Out-of-Scope Items: Clarify any components, features, or functionalities that are not included in this testing phase."),S=iL.t("Testing Plan"),I=iL.t("Welcome guests"),w=iL.t("Distribute event materials"),T=iL.t("Provide name badges"),N=iL.t("8:00 AM - 8:30 AM: Registration and Check-In"),M=iL.t("8:30 AM - 9:00 AM: Opening Remarks"),R=iL.t("Event Agenda"),P=iL.t("Welcome address by [Event Host/Hostess]"),L=iL.t("Introduction to the event\u2019s theme and purpose"),O=iL.t("Acknowledgment of sponsors and partners"),(0,h.useMemo)(()=>({[iO.PRODUCT_VISION_EXAMPLE]:(({header:e,listCopy:t,fileTitle:a})=>({blocks:[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:e}]}],block_id:(0,X.A)()},{type:"rich_text",elements:[{type:"rich_text_list",style:"ordered",indent:0,elements:[{type:"rich_text_section",elements:[{type:"text",text:t}]}]}],block_id:(0,X.A)()}],file:{id:"1",name:a,title:a,mimetype:"text/plain",filetype:"quip",pretty_type:"Doc",mode:"quip",quip_thread_id:"mock-quip-thread-id"}}))({listCopy:t,header:a,fileTitle:n}),[iO.PROJECT_TASKS_EXAMPLE]:(({header:e,fileTitle:t,bodyCopy:a,subHeader:n})=>({blocks:[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:e,style:{bold:!0}}]}],block_id:(0,X.A)()},{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:n}]}],block_id:(0,X.A)()},{type:"rich_text",elements:a,block_id:(0,X.A)()}],file:{id:"FProject-Tasks",name:t,title:t,mimetype:"text/plain",filetype:"quip",pretty_type:"Doc",mode:"quip",quip_thread_id:"mock-quip-thread-id"}}))({header:r,subHeader:i,fileTitle:l,bodyCopy:makeBulletSections([{bulletItem1:o,bulletItem2:s},{bulletItem1:c,bulletItem2:d},{bulletItem1:m,bulletItem2:u},{bulletItem1:p,bulletItem2:b}])}),[iO.PROJECT_BRIEF_EXAMPLE]:(({header:e,fileTitle:t,bodyCopy:a})=>({blocks:[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:e,style:{bold:!0}}]}],block_id:(0,X.A)()},{type:"rich_text",elements:[{type:"text",text:a}],block_id:(0,X.A)()}],file:{id:"FProject-Brief",name:t,title:t,mimetype:"text/plain",filetype:"quip",pretty_type:"Doc",mode:"quip",quip_thread_id:"mock-quip-thread-id"}}))({header:g,bodyCopy:y,fileTitle:A}),[iO.TESTING_PLAN_EXAMPLE]:(({header:e,headerCopy:t,bulletItems:a,fileTitle:n})=>({blocks:[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:e,style:{bold:!0}},{type:"text",text:t}]}],block_id:(0,X.A)()},{type:"rich_text",elements:a,block_id:(0,X.A)()}],file:{id:"FTestingPlan",name:n,title:n,mimetype:"text/plain",filetype:"quip",pretty_type:"Doc",mode:"quip",quip_thread_id:"mock-quip-thread-id"}}))({header:x,headerCopy:C,bulletItems:makeBulletSections([{bulletItem1:k},{bulletItem1:v}]),fileTitle:S}),[iO.EVENT_AGENDA_EXAMPLE]:(({header:e,secondHeader:t,bulletItems:a,fileTitle:n,secondBulletItems:r})=>({blocks:[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:e,style:{bold:!0}}]}],block_id:(0,X.A)()},{type:"rich_text",elements:a,block_id:(0,X.A)()},{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:t,style:{bold:!0}}]}],block_id:(0,X.A)()},{type:"rich_text",elements:r,block_id:(0,X.A)()}],file:{id:"FTestingPlan",name:n,title:n,mimetype:"text/plain",filetype:"quip",pretty_type:"Doc",mode:"quip",quip_thread_id:"mock-quip-thread-id"}}))({bulletItems:makeBulletSections([{bulletItem1:I},{bulletItem1:w},{bulletItem1:T}]),header:N,secondHeader:M,fileTitle:R,secondBulletItems:makeBulletSections([{bulletItem1:P},{bulletItem1:L},{bulletItem1:O}])}),[iO.EMPTY]:null})[e],[t,a,n,r,i,l,o,s,c,d,m,u,p,b,g,y,A,x,C,k,v,S,I,w,T,N,M,R,P,L,O,e]));return W&&!J&&e!==iw?null:h.createElement(h.Fragment,null,W&&J?.file?h.createElement(EmbeddedCanvasUnfurlWrapper,null,h.createElement(r_.A,{file:J?.file}),h.createElement("div",{className:"p-file_quip p-embedded_canvas_unfurl"},h.createElement(rb.Gd,{blocks:J?.blocks}))):h.createElement(EmbeddedSampleContentTemplate,{description:iB.t("Insert a new or existing canvas.",{fallbackHash:"ee109cbf0522db42ef908c96479fffb5e6ddea5a",fallbackHashNs:"placeholder-unfurls"}),buttonText:H??iB.t("Canvas"),icon:"canvas",onButtonClick:Z,loading:z,isDisabled:F?.isReadOnly()}))}EmbeddedCanvasPlaceholder.displayName="EmbeddedCanvasPlaceholder";var iH=a(0x128d54e52),iW=a(0x924c87b3),iV=a(0x118f9742a),iG=a(0xbef42b3);let iq=new S.Ay("slack_docs");function ChannelHuddlesCardSettingsModal({onSave:e,closeModal:t,dateRangeSetting:a}){let n,r=(0,E.d4)(eL.QG),i=(0,h.useMemo)(()=>r?[{label:iq.t("Last 7 days"),value:ip.SEVEN_DAYS},{label:iq.t("Last 24 hours"),value:ip.DAY},{label:iq.t("From all time"),value:ip.UNLIMITED}]:[],[r]);n=r?{label:iq.t("Last 7 days"),value:ip.SEVEN_DAYS}:void 0;let l=i.find(e=>e.value===a);l&&(n=l);let[o,s]=(0,h.useState)(n),c=(0,h.useCallback)(()=>{e?.(o?.value??ip.SEVEN_DAYS)},[o,e]),d=(0,h.useCallback)(e=>{s(e)},[s]);return r?h.createElement(ic.A,{title:iq.t("Huddles Summary Settings"),onClose:t,onCancel:t,onSubmit:c,submitButtonText:iq.t("Save")},h.createElement("div",{className:"p-canvas_smart_cards__settings_modal_label bold"},iq.t("Date range")),h.createElement(id.A,{className:"p-canvas_smart_cards__settings_modal_selector",options:i,onOptionSelected:d,selectedOption:o,width:"100%"})):null}ChannelHuddlesCardSettingsModal.displayName="ChannelHuddlesCardSettingsModal";let ij=(0,im.e)(ChannelHuddlesCardSettingsModal);var iz=a(0xe1644a69),iK=a(0x1a02c72b5),i$=a(0xd6a16321),iY=a(0x10b2ff883);let iQ=new S.Ay("slack-docs"),HuddleMessage=({channelId:e,ts:t})=>{let a=(0,E.d4)(a=>(0,nv.Ld)(a,e,t)),n=(0,_.wA)(),r=(0,E.d4)(eL.QG),i=(0,h.useCallback)(()=>a?h.createElement(iW.A,{msg:a}):null,[a]),l=a?.files?.[0],o=l?(0,x.Lo)({id:l}):null,s=(0,h.useCallback)(()=>{o&&n((0,iK.o)({...(0,i$.mo)({id:o}),options:{forceTab:nD.k6.Home}}))},[n,o]),c=(0,h.useMemo)(()=>a?h.createElement(iG.E,{key:a.ts,withFormattingStyles:!0,msg:a}):null,[a]),d=(0,h.useMemo)(()=>a?h.createElement(iV.A,{roomId:a.room_id,channelId:a.channel,canvasUpdateSectionIds:a.canvas_update_section_ids}):null,[a]);return r&&a?h.createElement("div",{className:"p-canvas_smart_cards__huddle_container"},h.createElement("div",{className:"p-canvas_smart_cards__huddle_container_inner"},h.createElement(iH.Ay,{avatar:i,size:"medium",text:c,subtext:d}),l&&h.createElement(aN.A,{"aria-label":iQ.t("Summarize huddle"),onClick:s,className:"margin_left_50"},h.createElement(iz.o,{type:"summary",inline:!0,size:"20"}))),h.createElement(il.A,{msg:a})):null};HuddleMessage.displayName="HuddleMessage";let ChannelHuddlesCard=({channelId:e})=>{let t=(0,h.useRef)(null),[a,n]=(0,h.useState)(!1),[r,i]=(0,h.useState)(!1),l=(0,E.d4)(eL.QG),o=(0,_.wA)(),[s,c]=(0,h.useState)(),{embeddedUiData:d}=(0,h.useContext)(aS.N),[m,u]=(0,h.useState)(!1),p=(0,h.useCallback)(()=>{},[]),b=(0,h.useCallback)(()=>{u(!1)},[]),g=(0,h.useCallback)(()=>{i(!r)},[r]);(0,th.A)(()=>{o((0,iY.T)())});let y=(0,h.useCallback)(()=>(l&&o((0,ix.S)({channel:e,oldest:(0,eK.Ay)().subtract(21,"days").unix().toString(),reason:"recent-huddles-card"})).then(e=>{e.ok&&e?.messages&&c(e.messages.filter(e=>(0,nx.kn)(e)))}),null),[e,o,l]);(0,th.A)(()=>{y()});let A=(0,h.useCallback)(()=>l?s?s.length?s.map(t=>h.createElement(HuddleMessage,{key:t.ts,channelId:t.channel??e,ts:t.ts})):h.createElement("div",{className:"p-canvas_smart_cards__error"},iQ.rt("No recent huddles within 21 days.")):h.createElement(LoadingState,null):null,[e,l,s]);(0,ec.A)(()=>{t.current&&!a&&t.current.offsetHeight>=400&&n(!0)},[l]);let x=(0,h.useCallback)(()=>{o(ij())},[o]),C=(0,h.useCallback)(()=>{d?.performAction({action:f.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[d]),k=(0,h.useCallback)(()=>l?h.createElement(ar.Ay,{width:"auto"},h.createElement(aT.Dr,{label:iQ.t("Edit settings"),onSelected:x}),h.createElement(aT.bX,null),h.createElement(aT.Dr,{label:iQ.t("Delete"),onSelected:C,danger:!0})):null,[C,l,x]),v=(0,h.useCallback)(()=>l?h.createElement("div",{className:"c-card_container__actions p-canvas_smart_cards__options"},a?h.createElement(as.Ay,{tip:r?iQ.rt("See less"):iQ.rt("Expand card to see more")},h.createElement(aN.A,{size:"x-small",onClick:g,"aria-label":r?iQ.t("See less"):iQ.t("See more")},h.createElement(w.Ah,{name:r?"arrow-collapse":"arrow-expand"}))):null,h.createElement(aT.cQ,{renderMenu:k,position:"bottom-right",offsetY:8},h.createElement(aN.A,{size:"x-small","aria-label":iQ.t("More options")},h.createElement(w.Ah,{name:"ellipsis-vertical-filled"})))):null,[l,k,r,a,g]),S=(0,h.useCallback)(()=>i(!r),[r]);return l&&e?h.createElement("div",{className:"p-canvas_smart_cards p-canvas_smart_cards--huddles",onMouseEnter:p,onMouseLeave:b},h.createElement("div",{className:"p-canvas_smart_cards__header"},h.createElement("div",{className:"p-canvas_smart_cards__header_title_block"},h.createElement(w.Ah,{name:"headphones",inline:!0,size:"20"}),h.createElement("div",{className:"p-canvas_smart_cards__header__title"},iQ.t("Huddles"))),m?v():null),h.createElement("div",{className:"p-canvas_smart_cards__summary",ref:t,style:{maxHeight:r?"100%":400}},h.createElement("div",{className:"p-canvas_smart_cards__huddles_body"},A())),a?h.createElement("div",{className:"p-canvas_smart_cards__see_more_area"},h.createElement(ia.A,{onClick:S},r?iQ.t("See less"):iQ.t("See more"))):null):null};function generateChannelHuddlesCardComponentId({channelId:e}){return`channelhuddles:${e}`}function parseChannelHuddlesCardComponentId(e){if(e.startsWith("channelhuddles:"))return{channelId:e.substring(15)}}function EmbeddedGenericChannelHuddlesCard({channelId:e}){return(0,E.d4)(eL.QG)?h.createElement(ChannelHuddlesCard,{channelId:e}):null}ChannelHuddlesCard.displayName="ChannelHuddlesCard",EmbeddedGenericChannelHuddlesCard.displayName="EmbeddedGenericChannelHuddlesCard";let iZ=a.p+"crawl-20e9eb8.svg",iJ=a.p+"financialOptions-d0bcc8b.svg",iX=a.p+"googleSheetLoading-c539707.svg",i0=a.p+"healthPlan-f961753.svg",i1=a.p+"peopleTossing-fe0e7ab.jpg",i2=a.p+"projectOverviewCover-d9a30c5.svg",i4=a.p+"run-87cda18.svg",i5=a.p+"videoThumbnailMultiple-38087e4.svg",i3=a.p+"videoThumbnailSingle-d050191.svg",i6=a.p+"walk-d4e7c08.svg";function makeGoogleSlidesExample({id:e,imageURL:t,title:a,name:n,replaceWith:r}){return{file:{thumb_480:t,thumb_360:t,id:e,is_tombstoned:!1,name:n,title:a,mimetype:"application/vnd.google-apps.presentation",filetype:"gpres",pretty_type:"G Suite Presentation",is_external:!0,external_type:"gdrive",is_public:!0,media_display_type:"unknown",file_access:"visible"},metadata:{replaceWith:r}}}let i8=makeGoogleSlidesExample({imageURL:i1,id:"FGOOGLE_SLIDES_MARKETING_EXAMPLE",name:"Marketing Assets",title:"Marketing Assets",replaceWith:"link"}),i7=makeGoogleSlidesExample({imageURL:iZ,id:"GOOGLE_SLIDES_CRAWL_EXAMPLE",name:"Crawl use case",title:"Crawl use case",replaceWith:"link"}),i9=makeGoogleSlidesExample({imageURL:i6,id:"GOOGLE_SLIDES_WALK_EXAMPLE",name:"Walk use case",title:"Walk use case",replaceWith:"link"}),le=makeGoogleSlidesExample({imageURL:i4,id:"GOOGLE_SLIDES_RUN_EXAMPLE",name:"Run use case",title:"Run use case",replaceWith:"link"}),lt=makeGoogleSlidesExample({imageURL:i2,id:"GOOGLE_SLIDES_PROJECT_OVERVIEW_EXAMPLE",name:"Project Overview",title:"Project Overview",replaceWith:"link"}),la=makeGoogleSlidesExample({imageURL:i2,id:"FPROJECT_OVERVIEW_FILE_EXAMPLE",name:"Project Overview",title:"Project Overview",replaceWith:"file"}),ln=makeGoogleSlidesExample({imageURL:iZ,id:"FRUN_USE_CASE_EXAMPLE",name:"Run use case",title:"Run use case",replaceWith:"file"});var lr=a(0x1dcaa81f9),li=a(0x10b5318b2),ll=a(0xa6c8ec12);function convertToValidUri(e){if(""===e.trim())return"";let t=e.replace(/^https:([^/])/,"https://$1").replace(/^http:([^/])/,"http://$1");if(/^(http:\/\/|https:\/\/)/.test(t))return t;let a=encodeURIComponent(t);return`https://${a}`}var lo=a(0xb73154e3),ls=a(0xa5d8361b);let lc=new S.Ay("placeholder-unfurls"),ld={linkUrl:""},PlaceholderAddLinkModal=({updateCard:e})=>{let t=(0,_.wA)(),[a,n]=(0,h.useState)(!1),[r,i]=(0,h.useState)(!1),l=(0,h.useCallback)(()=>{t((0,e0.O)())},[t]),o=(0,h.useCallback)(({linkUrl:t})=>{if(i(!1),t)if((0,lo.P)(t)){n(!0);try{e(convertToValidUri(t)),l()}catch{n(!1)}}else i(!0)},[l,e]),s=(0,h.useCallback)(e=>(0,ls.A)(e,{allowNoTLD:!0,allowNoProtocol:!0})?null:"Invalid URL",[]);return h.createElement(tk.dW,{closeModal:l},h.createElement(tk.rQ,null,h.createElement(tk.Rc,{"data-qa":"placeholder_add_link_title",title:lc.t("Add a link")})),h.createElement(li.A,{initialValues:ld,validate:(0,ll.Wz)({linkUrl:[ll.mw,s]}),validateOnMount:!0,onSubmit:o},({isValid:e})=>h.createElement(h.Fragment,null,h.createElement(tk.$m,null,h.createElement(tk.qf,{className:"margin_25"},h.createElement(lr.A,{name:"linkUrl",id:"linkUrl",labelText:"",focusOnMount:!0,"data-qa":"placeholder_add_link_input",placeholder:lc.t("Replace with a new link")}),r&&h.createElement(e2.Ay,{level:"warning",showCloseButton:!0},lc.t("This URL looks suspicious, so saving it within a placeholder is a security risk. Instead, add it as plain text or code elsewhere in this canvas.",{fallbackHash:"012e1b975f4f86c768ce94e1803817649ee05484",fallbackHashNs:"message"})))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(tk.s_,{"data-qa":"placeholder_add_link_close_button",type:"outline","aria-label":lc.t("Close")},lc.t("Close")),h.createElement(e$.lV,{htmlType:"submit",type:"primary","data-qa":"placeholder_add_link_save_button",loading:a,disabled:!e,"aria-label":lc.t("Save")},lc.t("Save")))))))};PlaceholderAddLinkModal.displayName="PlaceholderAddLinkModal";let openPlaceholderAddLinkModal=({updateCard:e})=>(0,ts.q)({element:h.createElement(PlaceholderAddLinkModal,{updateCard:e}),name:"placeholder-add-link-modal"});openPlaceholderAddLinkModal.displayName="openPlaceholderAddLinkModal";let lm=new S.Ay("placeholder-unfurls"),PlaceholderLinkUnfurl=({autoClogProps:e})=>{let t=(0,_.wA)(),{embeddedUiData:a}=(0,h.useContext)(aS.N),n=(0,h.useCallback)(e=>{a?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e})},[a]),r=(0,h.useCallback)(()=>{t(openPlaceholderAddLinkModal({updateCard:n}))},[t,n]);return h.createElement(EmbeddedSampleContentTemplate,{description:"",buttonText:lm.t("Add a link"),icon:"link",onButtonClick:r,isDisabled:a?.isReadOnly(),autoClogProps:e})};PlaceholderLinkUnfurl.displayName="PlaceholderLinkUnfurl";let lu=new S.Ay("placeholder-unfurls"),lp={GOOGLE_SLIDES_MARKETING_EXAMPLE:i8,VIDEO_EXAMPLE_1:{file:{id:"FVIDEO",title:"video",filetype:"mp4",mimetype:"video/mp4",pretty_type:"MPEG 4 Video",is_external:!1,thumb_video:i5,thumb_video_w:480,thumb_video_h:360},metadata:{replaceWith:"file"}},VIDEO_EXAMPLE_2:{file:{id:"FVIDEO",title:"video",filetype:"mp4",mimetype:"video/mp4",pretty_type:"MPEG 4 Video",is_external:!1,thumb_video:i3,thumb_video_w:480,thumb_video_h:360,media_display_type:"video",mode:"hosted"},metadata:{replaceWith:"file"}},GOOGLE_SLIDES_CRAWL_EXAMPLE:i7,GOOGLE_SLIDES_WALK_EXAMPLE:i9,GOOGLE_SLIDES_RUN_EXAMPLE:le,HEALTH_PLAN_EXAMPLE:{file:{thumb_pdf:i0,id:"FHEALTH_PLAN_EXAMPLE",title:"Health Plan Summaries",width:340,filetype:"pdf",thumb_pdf_w:340,thumb_pdf_h:134,mimetype:"application/pdf",pretty_type:"PDF"},metadata:{replaceWith:"file"}},GOOGLE_SLIDES_PROJECT_OVERVIEW_EXAMPLE:lt,GOOGLE_SHEET_BUG_EXAMPLE:{file:{id:"FGOOGLE_SHEET_BUG_EXAMPLE",name:"Bug Tracking",title:"Bug Tracking",mimetype:"application/vnd.google-apps.spreadsheet",filetype:"gsheet",pretty_type:"G Suite Spreadsheet",editable:!1,mode:"external",is_external:!0,external_type:"gdrive",thumb_480:iX,thumb_360:iX,file_access:"visible"},metadata:{replaceWith:"link"}},FINANCIAL_OPTIONS:{file:{thumb_pdf:iJ,id:"FFINANCIAL_OPTIONS",title:"Financial Options",width:340,filetype:"pdf",thumb_pdf_w:480,thumb_pdf_h:360,mimetype:"application/pdf",pretty_type:"PDF"},metadata:{replaceWith:"file"}},PROJECT_OVERVIEW_FILE_EXAMPLE:la,RUN_USE_CASE_FILE_EXAMPLE:ln,EMPTY:{file:{id:"FEMPTY"},metadata:{}}};function renderFilePlaceholderComponent(e){return(0,U._y)(e)?h.createElement(rJ,{file:e,isMockedVideo:!0}):h.createElement(rz,{file:e,detailTextOverride:e.id===la.file.id?"Lisa Zhang":(0,U.Oj)(e)?"Zoe Maxwell":(0,U.F1)(e)?lu.t("PDF"):(0,U.Lc)(e)?"Arcadio Buendia":void 0})}function FileSampleContent({buttonText:e,description:t,icon:a}){let n=(0,h.useRef)(null),{docEmbed:r,embeddedUiData:i}=(0,h.useContext)(aS.N),{loading:l,onFilesSelectedHandler:o}=use_upload_file("embedded-file-placeholder"),s=(0,h.useCallback)(e=>{o(e).then(e=>{e?.permalink&&i?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e?.permalink})})},[i,o]),c=(0,h.useCallback)(()=>{r&&n.current&&n?.current?.click()},[r,n]);return h.createElement(h.Fragment,null,h.createElement(EmbeddedSampleContentTemplate,{description:t??lu.t("Upload a file."),buttonText:e??lu.t("Add a file"),icon:a??"file",onButtonClick:c,loading:l,isDisabled:i?.isReadOnly()}),h.createElement(tH.A,{ref:n,onFilesSelectedHandler:s}))}function getSampleContent(e,t){let{buttonText:a,description:n,icon:r}=t;return"link"===e?h.createElement(PlaceholderLinkUnfurl,null):h.createElement(FileSampleContent,{icon:r,description:n,buttonText:a})}function EmbeddedFilePlaceholder({placeholderFileId:e,buttonText:t,description:a,icon:n}){let r=useInCanvasTemplate(),i=lp[e]?.metadata?.replaceWith,l=lu.t("Marketing assets"),o=lu.t("Crawl use case"),s=lu.t("Walk use case"),c=lu.t("Run use case"),d=lu.t("video"),m=lu.t("Health Plan Summaries"),u=lu.t("Project Overview"),p=lu.t("Bug tracking"),_=lu.t("Financial Options"),f=(0,h.useMemo)(()=>{let t=lp[e].file,a={GOOGLE_SLIDES_MARKETING_EXAMPLE:{title:l},GOOGLE_SLIDES_CRAWL_EXAMPLE:{title:o},GOOGLE_SLIDES_WALK_EXAMPLE:{title:s},GOOGLE_SLIDES_RUN_EXAMPLE:{title:c},VIDEO_EXAMPLE_1:{title:d},VIDEO_EXAMPLE_2:{title:d},HEALTH_PLAN_EXAMPLE:{title:m},GOOGLE_SLIDES_PROJECT_OVERVIEW_EXAMPLE:{title:u},GOOGLE_SHEET_BUG_EXAMPLE:{title:p},FINANCIAL_OPTIONS:{title:_},PROJECT_OVERVIEW_FILE_EXAMPLE:{title:u},RUN_USE_CASE_FILE_EXAMPLE:{title:c},EMPTY:{title:""}}[e]?.title;return{...t,title:a,name:a}},[_,p,o,l,u,c,s,m,e,d]);return!f&&r?null:h.createElement(h.Fragment,null,r&&e!==iw?h.createElement(h.Fragment,null,renderFilePlaceholderComponent(f)):getSampleContent(i,{buttonText:t,description:a,icon:n}))}renderFilePlaceholderComponent.displayName="renderFilePlaceholderComponent",FileSampleContent.displayName="FileSampleContent",getSampleContent.displayName="getSampleContent";let lh=a.p+"architectureDiagram-04fcd29.svg",l_=a.p+"beachSitting-433329d.svg",lf=a.p+"benefitsHeader-df2738b.svg",lb=a.p+"celebrate-a97457b.svg",lg=a.p+"companyHandbook-eeea2a1.gif",ly=a.p+"connectMeeting-267ede4.svg",lA=a.p+"emptyOffice-438d449.svg",lx=a.p+"eventPlanning-c8d8196.svg",lE=a.p+"fourEmployees-b278852.svg",lC=a.p+"googleMap-c8979f3.svg",lk=a.p+"meeting-0c09127.svg",lv=a.p+"piggybank-0b9a5c4.svg",lS=a.p+"plants-be0b242.svg",lI=a.p+"prototypeFeedback-ad1aa62.svg",lw=a.p+"prototypeHelp-3d88212.svg",lT=a.p+"prototypeWatercoolerSocial-ae50f67.svg",lN=a.p+"rocket-d79afaa.svg",lM=a.p+"rocketDog-8b42eee.svg",lR=a.p+"selfDmCanvasHeader-615ab5c.svg",lP=a.p+"sharedResources-bcd05ef.svg",lL=a.p+"templateBugs-bbfdfdc.svg",lO=a.p+"twoEmployees-c30dfb1.svg";var lD=a(0xf2ea806f);let lF=new S.Ay("placeholder-unfurls"),lU={CELEBRATE_EXAMPLE_IMAGE:lb,MEETING_EXAMPLE_IMAGE:lk,PIGGY_BANK_EXAMPLE_IMAGE:lv,PLANTS_EXAMPLE_IMAGE:lS,ROCKET_EXAMPLE_IMAGE:lN,TWO_EMPLOYEES_EXAMPLE_IMAGE:lO,SELF_DM_CANVAS_HEADER:lR,FOUR_EMPLOYEES_EXAMPLE_IMAGE:lE,ROCKET_DOG_EXAMPLE_IMAGE:lM,BEACH_SITTING_EXAMPLE_IMAGE:l_,EVENT_PLANNING_EXAMPLE_IMAGE:lx,BENEFITS_EXAMPLE_IMAGE:lf,SHARED_RESOURCES_EXAMPLE_IMAGE:lP,ARCHITECTURE_DIAGRAM_EXAMPLE_IMAGE:lh,GOOGLE_MAP_EXAMPLE_IMAGE:lC,EMPTY_OFFICE_IMAGE:lA,PROTOTYPE_FEEDBACK_IMAGE:lI,PROTOTYPE_WATERCOOLER_SOCIAL_IMAGE:lT,PROTOTYPE_HELP_IMAGE:lw,TEMPLATE_BUGS_IMAGE:lL,CONNECT_EXAMPLE_IMAGE:ly,COMPANY_HANDBOOK_IMAGE:lg};function EmbeddedImagePlaceholder({placeholderImageId:e,isStatic:t=!1}){let a=(0,h.useRef)(null),{docEmbed:n,embeddedUiData:r}=(0,h.useContext)(aS.N),i=useInCanvasTemplate(),l=(0,h.useCallback)(()=>{n&&a.current&&(a.current.accept="image/*",a?.current?.click())},[n,a]),{loading:o,onFilesSelectedHandler:s}=use_upload_file("embedded-image-placeholder"),c=(0,h.useCallback)(e=>{s(e).then(e=>{e?.permalink&&r?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e?.permalink})})},[r,s]),d=(0,h.useMemo)(()=>({eventId:eJ.EventId.QUIP_DOC_IMPRESSION,action:eJ.UiAction.CLICK,elementType:eJ.ElementType.BUTTON,onClick:{enableClogAction:!0},uiComponentName:eJ.UiComponentName.ADD_IMAGE_PLACEHOLDER,uiComponentVariant:`${e?.toLowerCase()}`}),[e]);return e&&(lU[e]||e===iw)?h.createElement(h.Fragment,null,(i||t)&&e!==iw?h.createElement(lD.A,{alt:lF.t("An image in the canvas"),src:lU[e],width:"100%","data-qa":"file_image_thumbnail_img_img_placeholder"}):h.createElement(h.Fragment,null,h.createElement(EmbeddedSampleContentTemplate,{description:lF.t("Upload an image.",{fallbackHash:"53c8b46cf22b40a5ed1aca1989ebddeb93c35359",fallbackHashNs:"placeholder-unfurls"}),buttonText:lF.t("Add an image"),icon:"image",onButtonClick:l,loading:o,isDisabled:r?.isReadOnly(),autoClogProps:d}),h.createElement(tH.A,{ref:a,onFilesSelectedHandler:c}))):null}EmbeddedImagePlaceholder.displayName="EmbeddedImagePlaceholder";var lB=a(0x1e83c14d3),lH=a(0x243d57606),lW=a(0xea25ffc5),lV=a(0x16ef98cf),lG=a(0x10079cc7),lq=a(0x1b654c3cf),lj=a(0x1ab312eae),lz=a(0x91e15f37);let lK=(0,e9.Ay)("Handle add profile action triggered via Canvas or Channel Foreword",async(e,t,{teamId:a,onMembersAdded:n=b.A})=>{let r=(0,lj.X)(t()),i=r[0]?.id;i&&a&&e((0,lq._)({channelId:i,entryPoint:lV.kP.CanvasTemplate,onMembersAdded:n}))});lK.meta={name:"handleAddOrInviteProfileAction",key:"createThunkHandleAddOrInviteProfileAction",description:"Handle add profile action triggered via Canvas or Channel Foreword"};let l$=(0,e9.Ay)("Handle invite client action triggered from Canvas",async(e,t,{teamId:a,onMembersAdded:n,uiComponentVariant:r=eJ.UiComponentVariant.SLACK_CONNECT_CANVAS_CTA})=>{let i=(0,lj.X)(t());if(!i[0]?.id||!a)return;let l=(0,lz.hq)(t(),lG.ZO.PaidFeatureTrial,lG.zG.SharedChannels),openChannelInviteModal=()=>e(lK({teamId:a,onMembersAdded:n}));l?e((0,lW.A)({uiComponentVariant:r,openChannelInviteModal})):openChannelInviteModal()});l$.meta={name:"handleInviteClient",key:"createThunkHandleInviteClient",description:"Handle invite client action triggered from Canvas"};let lY=new S.Ay("placeholder-unfurls");function parseInviteClientPlaceholderComponentId(e){return!!e.startsWith("clientplace")}let lQ={eventId:eJ.EventId.NEWXP_TEAM_CREATE,onClick:{enableClogAction:!0}};function EmbeddedInviteClientPlaceholder(){let e=(0,_.wA)(),t=(0,E.d4)(tv.H7),a=(0,tC.NB)(t),{embeddedUiData:n,docEmbed:r}=(0,h.useContext)(aS.N),i=lY.t("Invite client"),l=(0,E.d4)(tv.H7),o=(0,h.useCallback)(t=>{if(t&&t.length>0){let a=r?.docEditor;a?.focusEditor();let i=[];t.forEach(t=>{if((0,lB.B)(t))i.push(t);else{let a=e((0,t2.A)(t))._email_normalized_lc||"";a&&i.push(a)}}),n?.performAction({action:f.EmbeddedUiAction.ADD_INVITED_USER_CARDS,emailAddresses:i})}},[r,n,e]),s=(0,h.useCallback)(()=>a?i:h.createElement(h.Fragment,null,i,h.createElement("div",{className:"p-embedded_invite_client_placeholder__badge"},h.createElement(lH.a,{featurePlan:"std"}))),[a,i]),c=(0,h.useCallback)(()=>{e(l$({onMembersAdded:o,teamId:l?.id}))},[l?.id,o,e]);return h.createElement(Y.A,{uiComponentName:eJ.UiComponentName.INVITE_CLIENT_PLACEHOLDER},h.createElement("div",{className:"p-embedded_invite_client_placeholder"},h.createElement(EmbeddedSampleContentTemplate,{description:"",buttonText:s(),accessibleName:i,icon:"user-add",onButtonClick:c,isDisabled:!1,autoClogProps:lQ})))}EmbeddedInviteClientPlaceholder.displayName="EmbeddedInviteClientPlaceholder";let lZ=new S.Ay("placeholder-unfurls");function parseInviteCoworkerPlaceholderComponentId(e){return!!e.startsWith("coworkerplace")}let lJ={eventId:eJ.EventId.NEWXP_TEAM_CREATE,onClick:{enableClogAction:!0}};function EmbeddedInviteCoworkerPlaceholder(){let e=(0,_.wA)(),t=(0,E.d4)(tv.H7),{embeddedUiData:a,docEmbed:n}=(0,h.useContext)(aS.N),r=(0,h.useCallback)(t=>{if(t&&t.length>0){let r=n?.docEditor;r?.focusEditor();let i=[];t.forEach(t=>{if((0,lB.B)(t))i.push(t);else{let a=e((0,t2.A)(t))._email_normalized_lc||"";a&&i.push(a)}}),a?.performAction({action:f.EmbeddedUiAction.ADD_INVITED_USER_CARDS,emailAddresses:i})}},[n,a,e]),i=(0,h.useCallback)(()=>{e(lK({onMembersAdded:r,teamId:t?.id}))},[t?.id,r,e]);return h.createElement(Y.A,{uiComponentName:eJ.UiComponentName.INVITE_COWORKER_PLACEHOLDER},h.createElement(EmbeddedSampleContentTemplate,{description:"",buttonText:lZ.t("Invite coworkers"),icon:"user-add",onButtonClick:i,isDisabled:!1,autoClogProps:lJ}))}EmbeddedInviteCoworkerPlaceholder.displayName="EmbeddedInviteCoworkerPlaceholder";let lX=a.p+"acmeLogo-358591a.svg";var l0=((o={}).NYT_SUCCESS_TEAM="NYT_SUCCESS_TEAM",o.MED_OPP_AT_WORK="MED_OPP_AT_WORK",o.SLACK_WHAT_IS_DIGIT_CULTURE="SLACK_WHAT_IS_DIGIT_CULTURE",o.SLACK_HYBRID_WORK_ENVIRONMENT="SLACK_HYBRID_WORK_ENVIRONMENT",o.SLACK_TIPS_FOR_BUILDING_DIGITAL_FIRST_CULTURE="SLACK_TIPS_FOR_BUILDING_DIGITAL_FIRST_CULTURE",o.FORBES_WHAT_IS_AN_OKR="FORBES_WHAT_IS_AN_OKR",o.HEALTH_BENEFITS="HEALTH_BENEFITS",o.FINANCIAL_BENEFITS="FINANCIAL_BENEFITS",o.WELLNESS_BENEFITS="WELLNESS_BENEFITS",o.TIME_OFF="TIME_OFF",o.USE_CANVAS_DISCOVER="USE_CANVAS_DISCOVER",o.FIND_AND_USE_CANVAS_TEMPLATE="FIND_AND_USE_CANVAS_TEMPLATE",o.EMPTY="EMPTY",o);let l1=new Map([["NYT_SUCCESS_TEAM",{from_url:"https://www.nytimes.com/guides/business/manage-a-successful-team",thumb_url:"https://static01.nyt.com/images/2017/12/01/business/successful-team-still-v2/successful-team-still-v2-largeHorizontalJumbo-v2.jpg?year=2019&h=395&w=591&s=20affa0fd66042d657e7bef40be1b6b740f64d7fa18e8ef17d372b22bcbe9b2d&k=ZQJBKqZ0VN",thumb_width:591,thumb_height:395,service_icon:"https://dev1739.slack.com/dev-cdn/v1689941241/img/unfurl_icons/nytimes.png",id:"1",original_url:"https://www.nytimes.com/guides/business/manage-a-successful-team",fallback:"The New York Times How to Build a Successful Team (Published 2019)",text:"Building a successful team is about more than finding a group of people with the right mix of professional skills. Over the course of interviewing over 500 leaders for Corner Office, I asked them all about the art of fostering a strong sense of teamwork. Their insights can help you lay the groundwork for a highly productive team that can communicate, cooperate and innovate in an atmosphere of mutual trust and respect.",title:"How to Build a Successful Team (Published 2019)",title_link:"https://www.nytimes.com/guides/business/manage-a-successful-team",author_name:"Adam Bryant",service_name:"The New York Times",service_url:"https://www.nytimes.com/",isNonExistent:!0,isUnknown:!0}],["MED_OPP_AT_WORK",{image_url:"https://miro.medium.com/v2/resize:fit:1200/1*1AWJfb3D8aNOmGyPE02_Zg.jpeg",image_width:1200,image_height:800,image_bytes:129824,from_url:"https://betterhumans.pub/10-ways-to-increase-your-chances-and-get-more-opportunities-at-work-c14aa99a8e20",service_icon:"https://miro.medium.com/v2/resize:fill:152:152/1*sHhtYhaCe2Uc3IU0IgKwIQ.png",ts:0x630f0b5e,id:"1",original_url:"https://betterhumans.pub/10-ways-to-increase-your-chances-and-get-more-opportunities-at-work-c14aa99a8e20",fallback:"Medium: 10 Ways to Increase Your Chances and Get More Opportunities at Work",text:"The two main currencies at work are performance and connections.",title:"10 Ways to Increase Your Chances and Get More Opportunities at Work",title_link:"https://betterhumans.pub/10-ways-to-increase-your-chances-and-get-more-opportunities-at-work-c14aa99a8e20",service_name:"Medium",fields:[{value:"9 min read",title:"Reading time",short:!0}]}],["SLACK_WHAT_IS_DIGIT_CULTURE",{from_url:"https://slack.com/blog/collaboration/what-is-digital-culture#:~:text=Digital%20culture%20is%20a%20workplace,by%20digital%20tools%20and%20technologies",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/UNM11A7H%402x.jpg",image_width:2400,image_height:1256,image_bytes:180513,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/blog/collaboration/what-is-digital-culture#:~:text=Digital%20culture%20is%20a%20workplace,by%20digital%20tools%20and%20technologies",fallback:"Slack: What is digital culture?",text:"The teams best prepared for change use modern digital communication tools, feel comfortable learning new ones and continually adapt how they work.",title:"What is digital culture?",title_link:"https://slack.com/blog/collaboration/what-is-digital-culture#:~:text=Digital%20culture%20is%20a%20workplace,by%20digital%20tools%20and%20technologies",service_name:"Slack"}],["SLACK_HYBRID_WORK_ENVIRONMENT",{from_url:"https://slack.com/blog/collaboration/ways-foster-positive-work-environment",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/positive-work-enviornment-hero.jpg",image_width:920,image_height:920,image_bytes:82899,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/blog/collaboration/ways-foster-positive-work-environment",fallback:"6 simple ways to foster a positive hybrid work environment",text:"As hybrid workplaces become the norm, maintaining employee satisfaction and a positive culture is more important than ever.",title:"6 simple ways to foster a positive hybrid work environment",title_link:"https://slack.com/blog/collaboration/ways-foster-positive-work-environment",service_name:"Slack"}],["SLACK_TIPS_FOR_BUILDING_DIGITAL_FIRST_CULTURE",{from_url:"https://slack.com/blog/collaboration/four-tips-build-digital-first-culture",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/M6A8H%402x.jpg",image_width:1840,image_height:1840,image_bytes:351955,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/blog/collaboration/four-tips-build-digital-first-culture",fallback:"Four tips for building a digital-first culture",text:"In a world where digital transformation is on the rise, executives turn to a digital-first culture.",title:"Four tips for building a digital-first culture",title_link:"https://slack.com/blog/collaboration/four-tips-build-digital-first-culture",service_name:"Slack"}],["FORBES_WHAT_IS_AN_OKR",{from_url:"https://www.forbes.com/advisor/business/what-is-an-okr-definition-examples",image_url:"https://www.forbes.com/advisor/wp-content/uploads/2023/04/Image-2-1.jpg",image_width:958,image_height:539,id:"1",original_url:"https://www.forbes.com/advisor/business/what-is-an-okr-definition-examples",fallback:"Forbes Advisor: What is an OKR? Definition & Examples",text:"Picture this: Your organization has an ambitious new goal of reducing wait time and improving customer satisfaction. The only problem? There\u2019s no system in place to effectively execute the idea and you have no clue where to start. That\u2019s where Objectives and Key Results (OKRs) come into play.",title:"Forbes Advisor: What is an OKR? Definition & Examples",title_link:"https://www.forbes.com/advisor/business/what-is-an-okr-definition-examples",service_name:"Forbes Advisor",service_url:"https://www.forbes.com/",service_icon:"https://www.forbes.com/advisor/wp-content/uploads/2017/09/cropped-favicon-180x180.png"}],["USE_CANVAS_DISCOVER",{from_url:"https://slack.com/help/articles/203950418-Use-a-canvas-in-Slack",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/UNM11A7H%402x.jpg",image_width:2400,image_height:1256,image_bytes:180513,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/help/articles/203950418-Use-a-canvas-in-Slack",fallback:"Use a canvas in Slack",text:"When you need to share information that won\u2019t fit in a simple message (like project plans or meeting notes), create a canvas. A canvas is a surface built into Slack where you can create and shar...",title:"Use a canvas in Slack",title_link:"https://slack.com/help/articles/203950418-Use-a-canvas-in-Slack",service_name:"Slack Help Center",data:{article_id:0xc280952}}],["FIND_AND_USE_CANVAS_TEMPLATE",{from_url:"https://slack.com/help/articles/25893367794195-Find-and-use-canvas-templates",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/UNM11A7H%402x.jpg",image_width:2400,image_height:1256,image_bytes:180513,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/help/articles/25893367794195-Find-and-use-canvas-templates",fallback:"Find and use canvas templates",text:"Canvases can be created from scratch, or you can start one from a template. Browse the available templates in your Slack workspace or Enterprise Grid organization to help you get started on a proje...",title:"Find and use canvas templates",title_link:"https://slack.com/help/articles/25893367794195-Find-and-use-canvas-templates",service_name:"Slack Help Center",data:{article_id:0x178cc4fd4a13}}]]);function getAttachmentById(e){return l1.get(e)}function getFileChannelMessage(){return{ts:"1681575634.000000",channel:"",type:""}}var l2=a(0x199d535a4),l4=a(0x1c7cb6e50);let l5=new S.Ay("placeholder-unfurls");function EmbeddedLinkPlaceholder({placeholderLinkId:e,isStatic:t=!1}){let a=l5.t("Today, more than ever, it\u2019s important to focus on our wellbeing and build our resilience to overcome and thrive during these challenging times. We offer a comprehensive package of wellness benefits for our employees."),n=l5.t("Health Benefits"),r=l5.t("In today\u2019s competitive job market, employees seek more than just a paycheck. They\u2019re looking for employers who understand the importance of financial stability and provide tangible benefits that can help improve their overall financial \u2026"),i=l5.t("Financial Benefits"),l=l5.t("Employees are increasingly recognizing the value of employers who not only provide career opportunities but also prioritize their overall well-being. At Acme, we understand that our employees are our most valuable asset, and \u2026"),o=l5.t("Wellness Benefits"),s=l5.t("At [Company Name], we recognize the importance of time away from the office to recharge, spend quality time with loved ones, and pursue personal interests. That\u2019s why we offer a range of time-off benefits designed to help you \u2026"),c=l5.t("Time off"),d=l5.t("When you need to share information that won\u2019t fit in a simple message (like project plans or meeting notes), create a canvas. A canvas is a surface built into Slack where you can create and shar\u2026"),m=l5.t("Use a canvas in Slack"),u=l5.t("Canvases can be created from scratch, or you can start one from a template. Browse the available templates in your Slack workspace or Enterprise Grid organization to help you get started on a proje\u2026"),p=l5.t("Find and use canvas templates"),_=(0,h.useMemo)(()=>{for(let[e,t]of Object.entries({[l0.HEALTH_BENEFITS]:{from_url:"",image_url:"",image_width:1840,image_height:1840,image_bytes:351955,service_icon:lX,id:"1",original_url:"",fallback:"Four tips for building a digital-first culture",text:a,title:n,title_link:"",service_name:"Acme"},[l0.FINANCIAL_BENEFITS]:{from_url:"",image_url:"",image_width:1840,image_height:1840,image_bytes:351955,service_icon:lX,id:"1",original_url:"",fallback:"Financial Benefits",text:r,title:i,title_link:"",service_name:"Acme"},[l0.WELLNESS_BENEFITS]:{from_url:"",image_url:"",image_width:1840,image_height:1840,image_bytes:351955,service_icon:lX,id:"1",original_url:"",fallback:"Wellness Benefits",text:l,title:o,title_link:"",service_name:"Acme"},[l0.TIME_OFF]:{from_url:"",image_url:"",image_width:1840,image_height:1840,image_bytes:351955,service_icon:lX,id:"1",original_url:"",fallback:"Time off",text:s,title:c,title_link:"",service_name:"Acme"},[l0.USE_CANVAS_DISCOVER]:{from_url:"https://slack.com/help/articles/203950418-Use-a-canvas-in-Slack",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/UNM11A7H%402x.jpg",image_width:2400,image_height:1256,image_bytes:180513,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/help/articles/203950418-Use-a-canvas-in-Slack",text:d,title:m,title_link:"https://slack.com/help/articles/203950418-Use-a-canvas-in-Slack",service_name:"Slack Help Center",data:{article_id:0xc280952}},[l0.FIND_AND_USE_CANVAS_TEMPLATE]:{from_url:"https://slack.com/help/articles/25893367794195-Find-and-use-canvas-templates",image_url:"https://d34u8crftukxnk.cloudfront.net/slackpress/prod/sites/6/UNM11A7H%402x.jpg",image_width:2400,image_height:1256,image_bytes:180513,service_icon:"https://a.slack-edge.com/80588/marketing/img/meta/favicon-32.png",id:"1",original_url:"https://slack.com/help/articles/25893367794195-Find-and-use-canvas-templates",fallback:"Find and use canvas templates",text:u,title:p,title_link:"https://slack.com/help/articles/25893367794195-Find-and-use-canvas-templates",service_name:"Slack Help Center",data:{article_id:0x178cc4fd4a13}}}))l1.set(e,t);return getAttachmentById(e)},[r,i,a,n,e,s,c,l,o,u,p,d,m]),f=(0,h.useMemo)(()=>getFileChannelMessage(),[]),b=(0,h.useMemo)(()=>({eventId:eJ.EventId.QUIP_DOC_IMPRESSION,action:eJ.UiAction.CLICK,elementType:eJ.ElementType.BUTTON,onClick:{enableClogAction:!0},uiComponentName:eJ.UiComponentName.ADD_LINK_PLACEHOLDER,uiComponentVariant:`${e.toLowerCase()}_link`}),[e]);return(useInCanvasTemplate()||t)&&e!==l0.EMPTY?h.createElement(l2.A,{...(0,l4.A)(_),hasEphemeralNotifications:!1,fileChannelMessage:f,isLoading:!1,autoClogProps:b}):h.createElement(PlaceholderLinkUnfurl,{autoClogProps:b})}EmbeddedLinkPlaceholder.displayName="EmbeddedLinkPlaceholder";let l3=new S.Ay("placeholder-unfurls");function EmbeddedListPlaceholder({placeholderListId:e}){let t=(0,_.wA)(),{embeddedUiData:a,docEmbed:n,slackFileId:r}=(0,h.useContext)(aS.N),i=useQuipPlaceholderName(),l=(0,h.useCallback)(({fileId:e})=>{let i=n?.docEditor;i?.focusEditor(),a?.getAssociatedEntityId()&&(t((0,tl.PF)({fileId:e})).then(e=>{let t=(0,U.IE)(e);a?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:t})}),t((0,tO.A)({source:tA.O.PLACEHOLDER,parentCanvasId:r,embeddedFileId:e})))},[n?.docEditor,a,t,r]),o=(0,h.useCallback)(()=>{let e=n?.docEditor;e?.focusEditor();let t=a?.getAssociatedEntityId();t&&e?.insertSlackObject({type:f.SlackObjectType.LIST,id:"",permalink:""},{sectionId:t})},[n?.docEditor,a]),s=(0,h.useCallback)(()=>{t((0,tT.Ay)({onInsertList:l,onInsertNewList:o,source:"embedded-list-placeholder"}))},[t,l,o]),c=(0,h.useCallback)(()=>{s()},[s]);return e!==iw?null:h.createElement(EmbeddedSampleContentTemplate,{description:l3.t("Insert a new or existing list."),buttonText:i??l3.t("List"),onButtonClick:c,icon:"lists",isDisabled:a?.isReadOnly()})}EmbeddedListPlaceholder.displayName="EmbeddedListPlaceholder";var l6=a(0x17aa64b24),l8=a(0x46a42efe);let l7="modalPlace:",l9={eventId:eJ.EventId.PREFILL_DM_CANVAS,uiAction:eJ.UiAction.CLICK,uiComponentName:eJ.UiComponentName.CHECK_OUT_MORE_CANVAS_TEMPLATES_LINK,onClick:{enableClogAction:!0}},oe={TEMPLATE_GALLERY:"TEMPLATE_GALLERY"};function parseModalPlaceholderComponentId(e){if(e.startsWith(l7)){let t=e.split(":");if(t[0]===l7.slice(0,-1)&&Object.keys(oe).includes(t[1]))return{modalPlaceholderType:t[1],linkText:t[2]}}}let EmbeddedCanvasModalPlaceholder=({modalPlaceholderType:e,linkText:t})=>{let{getPrimaryView:a}=(0,h.useContext)(eM.A),n=(0,E.d4)(e=>a(e)?.id),r=(0,_.wA)(),i=(0,h.useCallback)(()=>{n&&r((0,l6.ot)({channelId:n,template:l8.q.USER_CREATED}))},[n,r]),l=(0,h.useCallback)(()=>{r((0,ry.K6)({autoClogProps:{source:"CanvasTemplateLink"},channelId:n,fileId:"",onTemplateFromGallerySelection:i}))},[r,n,i]);return(0,h.useCallback)(()=>e===oe.TEMPLATE_GALLERY?h.createElement(rv.A,{className:"p-embedded_modal_placeholder","data-qa":"embedded-modal-placeholder",onClick:l,autoClogProps:l9},t):null,[e,t,l])()};EmbeddedCanvasModalPlaceholder.displayName="EmbeddedCanvasModalPlaceholder";var ot=a(0xbe0b63ff),oa=a(0x1a043bf26),on=a(0x12a913e0),or=a(0xb2e9dfa8),oi=a(0x248a07e73),ol=a(0x13022d1e6),oo=a(0x1b3f5d630),os=a(0x1b0a362c3),oc=a(0x50279ca3),od=a(0xb2609f46),om=a(0xe0477493),ou=a(0x237a55f00),op=a(0x4f6bb7a6);let oh=(0,e9.Ay)("Fetch pinned items list for channel if not already fetched",(e,t,a)=>(0,ou.A_)(t(),a.channelId)!==om.b.NOT_LOADED?e3.S.resolve():e((0,op.b)(a)));oh.meta={name:"maybeFetchPinsList",key:"createThunkMaybeFetchPinsList",description:"Fetch pinned items list for channel if not already fetched"};let o_=new S.Ay("files"),of={small:"50%",medium:"85%",large:"100%"};function parsePinsComponentId(e){if(e.startsWith("pins:"))return{channelId:e.substring(5)}}function EmbeddedGenericPins({channelId:e}){let{docEmbed:t}=(0,h.useContext)(aS.N),[a,n]=(0,h.useState)(!0),[r,i]=(0,h.useState)(0),l=(0,E.d4)(t=>(0,ou.A_)(t,e)),o=(0,E.d4)(t=>(0,ou.$U)(t,e))??0,s=(0,E.d4)(t=>(0,ou.jR)(t,e)),c=(0,h.useRef)(null),d=o>1||(s?.length||0)>1,m=(0,_.wA)(),u=(0,E.wz)(e=>{let t={},a={},n={};return s?.forEach(r=>{if(r.type===om.R.MESSAGE){let{channel:a,ts:n}=r;if(!a||!n)return;let i=(0,nv.Ld)(e,a,n,!0);i&&(t[i.ts]=i)}else if(r.type===om.R.FILE){let{id:t}=r;if(!t)return;let n=(0,ep.Lp)(e,t);if(!n)return;a[t]=n}else{let{id:t,fileId:a}=r;if(!t||!a)return;let i=(0,ep.Lp)(e,a);if(!i)return;n[t]=i}}),{messagesMap:t,filesMap:a,fileCommentsMap:n}}),p=(0,h.useCallback)(()=>{n(!a)},[a]),b=(0,h.useCallback)(e=>{let t=(0,ot.GU)(e);e&&!t&&m((0,oo.A)({channelId:e.channel,threadTs:(0,os.L)(e),ts:e.ts}))},[m]);(0,h.useEffect)(()=>{m(oh({channelId:e}))},[e,m]);let onTotalHeightChange=e=>{i(e)},g=(0,h.useMemo)(()=>new on.A({onTotalHeightChange}),[]),onFileClick=e=>{e&&m((0,od.R)({fileId:e.id,flexOrigin:"details",flexOriginId:"pins"}))},onMessageClick=e=>a?p():b(e),renderMessage=e=>{let{messagesMap:t}=u,a=t[e.ts];return a?h.createElement(e$.Nm,{className:"p-embedded_generic_pins__container",onClick:()=>onMessageClick(a)},h.createElement(or.A,{className:"p-embedded_generic_pins__message",key:a.ts,ts:a.ts,channelId:a.channel,isLoading:!1,hideChannel:!0})):null};renderMessage.displayName="renderMessage";let renderFile=e=>{let{filesMap:t}=u,a=e.id;if(!a)return null;let n=t[a];return n&&n.id?h.createElement(ol.A,{className:"p-embedded_generic_pins__message full_width",file:n,onClick:()=>onFileClick(n),showActions:!1}):null};renderFile.displayName="renderFile";let listRenderRow=(e,{key:t})=>{if(!s)return null;let n=a?s[0]:s[e];return h.createElement("div",{key:t,className:"p-embedded_generic_pins__item"},n.type===om.R.MESSAGE?renderMessage(n):n.type===om.R.FILE?renderFile(n):null)};listRenderRow.displayName="listRenderRow";let listOnItemKeyDown=e=>{if(e.keyCode===t_.Fm){e.preventDefault();let t=e.id;if(t&&(0,oc.A)(t)){let e=u.messagesMap[t];e&&onMessageClick(e)}else if(t&&(0,A.A)(t)){let e=u.filesMap[t];e&&onFileClick(e)}}},renderList=(e,t)=>{if(!s||!s.length)return null;let n=s[0],r=a?[n.ts||n.id]:s.map(e=>e.ts||e.id);return h.createElement(oa.A,{layout:g,height:e,width:t,keys:r,rowRenderer:listRenderRow,onItemKeyDown:listOnItemKeyDown})};renderList.displayName="renderList";let y=t.editorContainer?.get()?.getBoundingClientRect()?.width||0,x=l!==om.b.LOADED;return 0!==o||x?h.createElement("div",{className:j()("p-embedded_generic_pins__root",{"p-embedded_generic_pins__message--expanded":!a,"p-embedded_generic_pins__message--collapsed_two":a&&2===o,"p-embedded_generic_pins__message--collapsed_three":a&&o>2}),ref:e=>{c.current=e,c.current?.toggleAttribute(f.EmbeddedUIAttributes.NO_FOCUS_ON_CLICK,!0)}},h.createElement("div",{className:"p-embedded_generic_pins__header",onClick:p,role:"toolbar",tabIndex:0,"aria-label":a?o_.t("Show all pinned messages"):o_.t("Collapse pinned messages")},x?h.createElement(rm.A,null):h.createElement("span",{className:"p-embedded_generic_pins__title"},o_.t("{pinCount, plural, =1 {# pin} other {# pinned}}",{pinCount:o}))),h.createElement("div",{className:j()("p-embedded_generic_pins__list",{"p-embedded_generic_pins__list--loading":x})},x?h.createElement(h.Fragment,null,h.createElement(rm.A,{size:"large",sizes:of}),h.createElement(rm.A,{size:"medium",sizes:of}),h.createElement(rm.A,{size:"large",sizes:of}),h.createElement(rm.A,{size:"small",sizes:of}),h.createElement(rm.A,{size:"medium",sizes:of})):renderList(r,y-2),d?h.createElement(oi.A,{onCollapse:p,isCollapsed:a}):null)):h.createElement("div",{className:"p-embedded_generic_pins__root p-embedded_generic_pins__root--empty"},h.createElement("div",{className:"p-embedded_generic_pins__title"},o_.t("Pinned messages")),h.createElement("div",{className:"p-embedded_generic_pins__empty_description"},o_.rt("Pin any message here by clicking {icon} and choosing <label>Pin to conversation.</label>",{icon:h.createElement(w.Ah,{name:"ellipsis-vertical-filled",inline:!0})},({text:e,tag:t})=>"label"===t?h.createElement("strong",null,e):null)))}EmbeddedGenericPins.displayName="EmbeddedGenericPins";var ob=a(0x135d7f358);let og=a.p+"member_ULZHANG00-24-523ffe7.png",oy=a.p+"member_ULZHANG00-32-c001c1b.png";var oA=a(0x1d54aaa3e);let ox=a.p+"member_ULZHANG00-72-50b6723.png",oE=a.p+"member_ULZHANG00-192-f5d8083.png",oC=a.p+"member_ULZHANG00-512-0d25ff1.png",ok=a.p+"member_ULZHANG00-1024-13886e0.png",ov=a.p+"member_USPARRAS0-24-9f05f9a.png",oS=a.p+"member_USPARRAS0-32-20fb218.png";var oI=a(0x1673b738a);let ow=a.p+"member_USPARRAS0-72-59767c4.png",oT=a.p+"member_USPARRAS0-192-de1d267.png",oN=a.p+"member_USPARRAS0-512-409c602.png",oM=a.p+"member_USPARRAS0-1024-3d751f8.png",oR=a.p+"member_UZMAXWELL-24-c6b0514.png",oP=a.p+"member_UZMAXWELL-32-7ffb710.png";var oL=a(0x23eff05d0);let oO=a.p+"member_UZMAXWELL-72-6992e99.png",oD=a.p+"member_UZMAXWELL-192-d55cbfb.png",oF=a.p+"member_UZMAXWELL-512-f5c5a1a.png",oU=a.p+"member_UZMAXWELL-1024-3e2e632.png";var oB=((s=oB||{}).Seattle_WA="seattle-wa",s),oH=((c={}).UZMAXWELL="UZMAXWELL",c.USPARRAS0="USPARRAS0",c.ULZHANG00="ULZHANG00",c.EMPTY="EMPTY",c);let oW=new Map([["UZMAXWELL",(0,ob.Nq)({id:"UZMAXWELL",real_name:"Zoe Maxwell",profile:{avatar_hash:"",display_name:"Zoe Maxwell",pronouns:"she/her/hers",title:"Senior Director, Marketing",image_24:oR,image_32:oP,image_48:oL,image_72:oO,image_192:oD,image_512:oF,image_1024:oU}})],["USPARRAS0",(0,ob.Nq)({id:"USPARRAS0",real_name:"Sara Parras",profile:{avatar_hash:"",display_name:"Sara Parras",pronouns:"she/her/hers",title:"Senior Director, Marketing",image_24:ov,image_32:oS,image_48:oI,image_72:ow,image_192:oT,image_512:oN,image_1024:oM}})],["ULZHANG00",(0,ob.Nq)({id:"ULZHANG00",real_name:"Lisa Zhang",profile:{avatar_hash:"",display_name:"Lisa Zhang",pronouns:"she/her/hers",title:"Senior Director, Marketing",image_24:og,image_32:oy,image_48:oA,image_72:ox,image_192:oE,image_512:oC,image_1024:ok}})]]),oV=new Map([["seattle-wa",{locality:{id:"WMOCKSAWA:section:Ps02JYKLKJFL:Pe02P8519KGA",hint:"",isFilterable:!0,isScimManaged:!0,isHidden:!1,isMissing:!1,label:"City",order:7,elementKey:"locality",elementId:"Pe02P8519KGA",legacyFieldId:"Xf7BNDF412",permissions:{api:[],ui:!1,scim:!0,__typename:"ProfileElementWritePermissions"},__typename:"ProfileTextElement",text:"Seattle",options:null},region:{id:"WMOCKSAWA:section:Ps02JYKLKJFL:Pe02PACXSX5J",hint:"",isFilterable:!0,isScimManaged:!0,isHidden:!1,isMissing:!1,label:"State",order:8,elementKey:"region",elementId:"Pe02PACXSX5J",legacyFieldId:"Xf7CPC9EPR",permissions:{api:[],ui:!1,scim:!0,__typename:"ProfileElementWritePermissions"},__typename:"ProfileTextElement",text:"WA",options:null}}]]),oG=new Map([["UZMAXWELL","seattle-wa"],["USPARRAS0","seattle-wa"],["ULZHANG00","seattle-wa"]]);function getMockMemberById({id:e,title:t,pronouns:a}){let n=oW.get(e);return t||a?{...n,profile:{...n?.profile,title:t,pronouns:a}}:n}function getMockLocationInfo(e){return oV.get(e)}function getMockLocationByMemberId(e){let t=oG.get(e);if(t)return getMockLocationInfo(t)}function getMockedMemberInfoById({id:e,pronouns:t,title:a}){return{member:getMockMemberById({id:e,pronouns:t,title:a}),locationInfo:getMockLocationByMemberId(e),presenceProps:{isActive:!0,userType:"member"}}}var oq=a(0x1713916de);let oj=new S.Ay("placeholder-unfurls");function EmbeddedProfilePlaceholder({placeholderProfileId:e,variant:t}){let a=(0,_.wA)(),{embeddedUiData:n}=(0,h.useContext)(aS.N),r=useQuipPlaceholderName(),i=(0,h.useMemo)(()=>getMockedMemberInfoById({id:e,...{title:oj.t("Senior Director, Marketing"),pronouns:oj.t("she/her/hers")}}),[e]),l=(0,h.useCallback)((e,t)=>{n?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:t})},[n]),o=(0,h.useCallback)(()=>{a(openUserPicker({onUserSelect:l,isReplacement:!0}))},[a,l]),s=(0,h.useMemo)(()=>({eventId:eJ.EventId.QUIP_DOC_IMPRESSION,action:eJ.UiAction.CLICK,elementType:eJ.ElementType.BUTTON,onClick:{enableClogAction:!0},uiComponentName:eJ.UiComponentName.ADD_PROFILE_PLACEHOLDER,...t?{uiComponentVariant:`${t}_profile`}:{}}),[t]);return useInCanvasTemplate()&&e!==oH.EMPTY?h.createElement(oq.A,{memberId:e,mockedMemberInfo:i}):h.createElement(EmbeddedSampleContentTemplate,{description:oj.t("Add a profile"),buttonText:r??oj.t("Profile"),icon:"user",onButtonClick:o,isDisabled:n?.isReadOnly(),autoClogProps:s})}EmbeddedProfilePlaceholder.displayName="EmbeddedProfilePlaceholder";var oz=a(0x1c403364b),oK=a(0x2043404b0),o$=a(0x6d870617),oY=a(0x1f8091cd6),oQ=a(0xa361c357),oZ=a(0xca4f3cec);let oJ=new S.Ay("slack_docs");function RecentFilesSettingsModal({onSave:e,closeModal:t,dateRangeSetting:a,filesTypeSetting:n}){let r=(0,E.d4)(eL.QG),i=(0,h.useMemo)(()=>r?[{label:oJ.t("All files"),value:0},{label:oJ.t("Canvases and lists"),value:1},{label:oJ.t("Video and audio files"),value:2}]:[],[r]),l=r?i[0]:void 0,o=i.find(e=>e.value===n);o&&(l=o);let[s,c]=(0,h.useState)(l),d=(0,h.useMemo)(()=>r?[{label:oJ.t("Last 7 days"),value:ip.SEVEN_DAYS},{label:oJ.t("Last 24 hours"),value:ip.DAY},{label:oJ.t("From all time"),value:ip.UNLIMITED}]:[],[r]),m=r?d[0]:void 0,u=d.find(e=>e.value===a);u&&(m=u);let[p,_]=(0,h.useState)(m),f=(0,h.useCallback)(()=>{e?.(s?.value??0,p?.value??ip.SEVEN_DAYS)},[s,p,e]),b=(0,h.useCallback)(e=>{c(e)},[c]),g=(0,h.useCallback)(e=>{_(e)},[_]);return r?h.createElement(ic.A,{title:oJ.t("Recent Files Settings"),onClose:t,onCancel:t,onSubmit:f,submitButtonText:oJ.t("Save")},h.createElement("div",{className:"p-canvas_smart_cards__settings_modal_label bold"},oJ.t("Show")),h.createElement(id.A,{className:"p-canvas_smart_cards__settings_modal_selector",options:i,onOptionSelected:b,selectedOption:s,width:"100%"}),h.createElement("div",{className:"p-canvas_smart_cards__settings_modal_label bold"},oJ.t("Date range")),h.createElement(id.A,{className:"p-canvas_smart_cards__settings_modal_selector",options:d,onOptionSelected:g,selectedOption:p,width:"100%"})):null}RecentFilesSettingsModal.displayName="RecentFilesSettingsModal";let oX=(0,im.e)(RecentFilesSettingsModal),o0=new S.Ay("slack-docs"),RecentFileCard=({msg:e,channelId:t})=>{let a=(0,E.d4)(a=>(0,nv.Ld)(a,t,e.ts)),n=a?.files?.[0],r=(0,_.wA)(),i=(0,E.d4)(eL.QG),l=a?.blocks?.[0],o=l&&"elements"in l?l.elements:[],s=(0,h.useCallback)(()=>{r((0,rA.A)({fileId:n,source:eR.f.CANVAS_SMART_CARD}))},[r,n]);return i&&n?h.createElement("div",{className:"p-canvas_smart_cards__file_container"},h.createElement(e$.Nm,{onClick:s},h.createElement(oz.A,{id:n})),a&&h.createElement("div",{className:"p-canvas_smart_cards__file_container_inner"},h.createElement("div",{className:"c-message_attachment__border"}),h.createElement("div",{className:"c-message_attachment__body"},h.createElement("div",{className:"c-message_attachment__huddle_header"},h.createElement(oQ.A,{msg:a,size:oY.Ev}),h.createElement(oZ.A,{msg:a})),h.createElement(oK.A,{elements:o}),a?.ts&&h.createElement("div",{className:"c-message_attachment__row"},h.createElement(o$.A,{text:"",ts:a.ts||"",tsLink:e.permalink,permalinkText:o0.t("View message")}))))):null};RecentFileCard.displayName="RecentFileCard";let RecentFilesCard=({channelId:e})=>{let t=(0,h.useRef)(null),[a,n]=(0,h.useState)(!1),[r,i]=(0,h.useState)(!1),l=(0,E.d4)(eL.QG),[o,s]=(0,h.useState)(),c=(0,_.wA)(),{embeddedUiData:d}=(0,h.useContext)(aS.N),[m,u]=(0,h.useState)(!1),p=(0,h.useCallback)(()=>{},[]),b=(0,h.useCallback)(()=>{u(!1)},[]),g=(0,h.useCallback)(()=>{i(!r)},[r]);(0,th.A)(()=>{c((0,ix.S)({channel:e,reason:"recent-files-card",oldest:(0,eK.Ay)().subtract(21,"days").unix().toString()})).then(e=>{e.ok&&e?.messages&&s(e?.messages.filter(e=>!!e?.files?.length&&"USLACKBOT"!==e.user))})});let y=(0,h.useCallback)(()=>l?o?o.length?h.createElement("div",{className:"p-canvas_smart_cards__files_body"},o.map(t=>h.createElement(RecentFileCard,{key:t.ts,msg:t,channelId:e}))):h.createElement("div",{className:"p-canvas_smart_cards__error"},o0.rt("No recent files have been shared.")):h.createElement(LoadingState,null):null,[e,l,o]);(0,ec.A)(()=>{t.current&&!a&&t.current.offsetHeight>=400&&n(!0)},[l]);let A=(0,h.useCallback)(()=>{c(oX())},[c]),x=(0,h.useCallback)(()=>{d?.performAction({action:f.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[d]),C=(0,h.useCallback)(()=>l?h.createElement(ar.Ay,{width:"auto"},h.createElement(aT.Dr,{label:o0.t("Edit settings"),onSelected:A}),h.createElement(aT.bX,null),h.createElement(aT.Dr,{label:o0.t("Delete"),onSelected:x,danger:!0})):null,[x,l,A]),k=(0,h.useCallback)(()=>l?h.createElement("div",{className:"c-card_container__actions p-canvas_smart_cards__options"},a?h.createElement(as.Ay,{tip:r?o0.rt("See less"):o0.rt("Expand card to see more")},h.createElement(aN.A,{size:"x-small",onClick:g,"aria-label":r?o0.t("See less"):o0.t("See more")},h.createElement(w.Ah,{name:r?"arrow-collapse":"arrow-expand"}))):null,h.createElement(aT.cQ,{renderMenu:C,position:"bottom-right",offsetY:8},h.createElement(aN.A,{size:"x-small","aria-label":o0.t("More options")},h.createElement(w.Ah,{name:"ellipsis-vertical-filled"})))):null,[l,C,r,a,g]),v=(0,h.useCallback)(()=>i(!r),[r]);return l&&e?h.createElement("div",{className:"p-canvas_smart_cards p-canvas_smart_cards--recent_files",onMouseEnter:p,onMouseLeave:b},h.createElement("div",{className:"p-canvas_smart_cards__header"},h.createElement("div",{className:"p-canvas_smart_cards__header_title_block"},h.createElement(w.Ah,{name:"files",inline:!0,size:"20"}),h.createElement("div",{className:"p-canvas_smart_cards__header__title"},o0.t("Recent Files"))),m?k():null),h.createElement("div",{className:"p-canvas_smart_cards__summary",ref:t,style:{maxHeight:r?"100%":400}},y()),a?h.createElement("div",{className:"p-canvas_smart_cards__see_more_area"},h.createElement(ia.A,{onClick:v},r?o0.t("See less"):o0.t("See more"))):null):null};function generateRecentFilesCardComponentId({channelId:e}){return`recentfiles:${e}`}function parseRecentFilesCardComponentId(e){if(e.startsWith("recentfiles:"))return{channelId:e.substring(12)}}function EmbeddedGenericRecentFilesCard({channelId:e}){return(0,E.d4)(eL.QG)?h.createElement(RecentFilesCard,{channelId:e}):null}RecentFilesCard.displayName="RecentFilesCard",EmbeddedGenericRecentFilesCard.displayName="EmbeddedGenericRecentFilesCard";var o1=a(0x32d3ef3d),o2=a(0x91728dda),o4=a(0x1adcaea70),o5=a(0x249d29fa);let o3=a.p+"member_UGJOSHI-24-a955628.jpg",o6=new S.Ay("placeholder-unfurls"),o8="CAPRICORN";function EmbeddedSalesforceRecordPlaceholder({placeholderRecordId:e}){let t=(0,E.d4)(o2.mI),a=(0,_.wA)(),{embeddedUiData:n}=(0,h.useContext)(aS.N),r=useQuipPlaceholderName(),i=useInCanvasTemplate(),l=(0,h.useCallback)(e=>{n?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e})},[n]),o=(0,h.useCallback)(()=>{a((0,ty.b)({onInsertRecord:l,source:"embedded-salesforce-record-placeholder"}))},[a,l]),s={org:{id:"FAKEORGID",name:o6.t("Capricorn, Inc"),instance_url:"fakeurl"},external_url:"",restricted:!1,id:"123",sobject_api_name:o6.t("Opportunity"),object_label:o6.t("Opportunity"),name:o6.t("Capricorn Coffee - MS Gemini"),parent:{id:"S",sobject_api_name:"Account",name:o6.t("Capricorn, Inc")},fields:[{label:o6.t("Stage"),type:"Picklist",value:o6.t("05-Negotiating")},{label:o6.t("Owner"),type:"",value:h.createElement("div",null,h.createElement("img",{src:o3,alt:o6.t("Geeta Joshi"),style:{height:28,width:28,borderRadius:6}})," ",o6.t("Geeta Joshi"))},{label:o6.t("Account Name"),type:"",value:"Capricorn, Inc"},{label:o6.t("Amount"),type:"Currency",value:"$1,065,000"},{label:o6.t("Next Steps"),type:"String",value:o6.t("9/13 (SM) - Looking to schedule an executive meeting for a key decision maker to better understand our product. Additionally it is my opinion that Carthage should be sacked immediately. Their fields")}],ts:(0,nE._)()},c=(0,o4.B)({record:s,entityState:o1.w.enabled,userHasMultipleOrgs:!1,experimentSlackforceListUnfurlsGroupOn:t});return e!==iw&&e!==o8?null:i&&e===o8?h.createElement("div",null,h.createElement(o5.X,{entityState:o1.w.enabled,size:o1.S.expanded,record:s,canvasStyling:!0,onClick:b.A,labelProps:c})):h.createElement(EmbeddedSampleContentTemplate,{description:o6.t("Add a Salesforce record."),buttonText:r??o6.t("Salesforce record"),onButtonClick:o,icon:"sf-cloud",isDisabled:n?.isReadOnly()})}EmbeddedSalesforceRecordPlaceholder.displayName="EmbeddedSalesforceRecordPlaceholder";var o7=a(0x1346d4ed0),o9=a(0x672820bb);let se=new S.Ay("slack-docs");function FilesCard({channelId:e}){let[t,a]=(0,h.useState)([]),n=(0,_.wA)(),r=(0,E.d4)(eL.QG);return((0,h.useEffect)(()=>{n((0,o9.e)({channelId:e,count:5,reason:"canvas-smart-cards"})).then(e=>{e?.files&&a(e.files.map(({id:e})=>e))})},[e,n]),r)?h.createElement("div",{className:"p-canvas_smart_cards"},h.createElement("div",{className:"p-canvas_smart_cards__header"},se.t("Files")," ",h.createElement(w.Ah,{name:"magic-wand",inline:!0})),h.createElement("div",{className:"p-canvas_smart_cards__files_body"},t.map(e=>h.createElement(o7.A,{key:e,id:e,className:"c-member_slug--link",shouldShowDetailText:!1})))):null}FilesCard.displayName="FilesCard";let st=FilesCard;function parseSmartFilesCardComponentId(e){if(e.startsWith("smartfiles:"))return{channelId:e.substring(11)}}function EmbeddedGenericSmartFilesCard({channelId:e}){return(0,E.d4)(eL.QG)?h.createElement(st,{channelId:e}):null}EmbeddedGenericSmartFilesCard.displayName="EmbeddedGenericSmartFilesCard";var sa=a(0xcaee4748),sn=a(0x303de21b);let sr=new S.Ay("slack-docs");function MembersCard({channelId:e}){let[t,a]=(0,h.useState)([]),n=(0,_.wA)(),r=(0,E.d4)(eL.QG);return((0,h.useEffect)(()=>{n((0,sn.AD)({channelId:e,count:50,searchProfileFields:!0,fuzz:0})).then(e=>{e?.members&&a(e.members)})}),r)?h.createElement("div",{className:"p-canvas_smart_cards"},h.createElement("div",{className:"p-canvas_smart_cards__header"},sr.t("People")," ",h.createElement(w.Ah,{name:"magic-wand",inline:!0})),h.createElement("div",{className:"p-canvas_smart_cards__members_body"},t.map(({id:e})=>h.createElement(sa.A,{id:e,key:e})))):null}MembersCard.displayName="MembersCard";let si=MembersCard;function parseSmartMembersCardComponentId(e){if(e.startsWith("smartmembers:"))return{channelId:e.substring(13)}}function EmbeddedGenericSmartMembersCard({channelId:e}){return(0,E.d4)(eL.QG)?h.createElement(si,{channelId:e}):null}EmbeddedGenericSmartMembersCard.displayName="EmbeddedGenericSmartMembersCard";var sl=a(0x154933c60),so=a(0xff6bbf99);let ss=new S.Ay("slack-docs");function SummaryCard({channelId:e}){let t=(0,h.useRef)(null),[a,n]=(0,h.useState)(null),[r,i]=(0,h.useState)(null),[l,o]=(0,h.useState)(null),[s,c]=(0,h.useState)(!1),[d,m]=(0,h.useState)(!1),[u,p]=(0,h.useState)(!1),[b,g]=(0,h.useState)(""),[y,A]=(0,h.useState)(!1),[x,C]=(0,h.useState)(ip.SEVEN_DAYS),k=(0,_.wA)(),v=(0,E.d4)(eL.QG),S=(0,E.d4)(e=>(0,er.xD)(e,{id:a})),{embeddedUiData:I}=(0,h.useContext)(aS.N),T=(0,h.useCallback)(()=>{A(!0)},[]),N=(0,h.useCallback)(()=>{A(!1)},[]),M=(0,h.useCallback)(()=>{m(!d)},[d]),R=(0,h.useMemo)(()=>`channel_canvas_summary_${x}`,[x]),P=(0,h.useCallback)(t=>{let a={timestamp:Date.now(),summary:t};try{let t={[R]:JSON.stringify(a)};k((0,sl.ZL)({channelId:e,newPrefs:JSON.stringify(t),reason:"set-summary-card"})).catch(()=>{p(!0)})}catch{p(!0)}},[R,e,k]),L=(0,h.useCallback)(()=>{k(ih({dateRangeSetting:x,onSave:C}))},[x,k]),O=(0,h.useCallback)(()=>{I?.performAction({action:f.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[I]),D=(0,h.useCallback)(()=>v?h.createElement(ar.Ay,{width:"auto"},h.createElement(aT.Dr,{label:ss.t("Edit settings"),onSelected:L}),h.createElement(aT.bX,null),h.createElement(aT.Dr,{label:ss.t("Delete"),onSelected:O,danger:!0})):null,[O,v,L]),F=(0,h.useCallback)(()=>{let t;switch(s&&c(!1),a&&n(null),r&&i(null),x){case ip.DAY:t=ab.KY.Day;break;case ip.UNLIMITED:t=ab.KY.All;break;default:t=ab.KY.Week}k((0,so.e)({channel:e,channelSummaryType:t,lastUnreadTs:void 0,reason:"summarize-channel-unreads"})).then(a=>{a.ok&&a?.summary?.id?(k((0,az.S2)({id:a?.summary?.id,channelId:e,type:ab.Tj.Channel,subtype:t})),n(a?.summary?.id),o(!0)):p(!0)}).catch(e=>{e?.data?.error==="invalid_channel_type"&&g(v?ss.t("Summarization is currently not supported in shared channels."):""),p(!0)})},[s,a,r,x,k,e,v]);(0,h.useEffect)(()=>{if(l&&S?.topics?.[0]?.blocks){try{P(JSON.stringify(S?.topics?.[0]?.blocks))}catch{p(!0)}o(!1)}},[l,S,P]),(0,ec.A)(()=>{k((0,sl.Kn)({channelId:e,prefName:R,reason:"get-summary-card"})).then(e=>{if(e?.pref_value?.payload)try{let t=JSON.parse(e?.pref_value?.payload),a=Date.now();if(t?.timestamp&&"number"==typeof t?.timestamp){let e=a-t.timestamp,n=7;x===ip.DAY&&(n=1);let r=864e5*n;if(e>r)F();else try{i(JSON.parse(t?.summary))}catch{p(!0)}}else F()}catch(e){throw e instanceof Error?e:Error(String(e))}else F()}).catch(()=>{p(!0)})},[e,R]);let U=(0,h.useCallback)(()=>v?r?h.createElement(a7.A,{blocks:r,blocksContainerContext:a8.pi.view,container:a8.pi.view}):S&&S?.topics?.[0]?.blocks?h.createElement(a7.A,{blocks:S?.topics?.[0]?.blocks,blocksContainerContext:a8.pi.view,container:a8.pi.view}):u?h.createElement("div",{className:"p-canvas_smart_cards__error"},b||ss.t("No recent messages within last week to summarize!")):h.createElement("div",null,h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," ",h.createElement(rm.A,{size:"random"})," "):null,[S,u,b,v,r]),B=(0,h.useCallback)(()=>v?h.createElement("div",{className:"c-card_container__actions p-canvas_smart_cards__options"},s?h.createElement(as.Ay,{tip:d?ss.rt("See less"):ss.rt("Expand card to see more")},h.createElement(aN.A,{size:"x-small",onClick:M,"aria-label":d?ss.t("See less"):ss.t("See more")},h.createElement(w.Ah,{name:d?"arrow-collapse":"arrow-expand"}))):null,h.createElement(aT.cQ,{renderMenu:D,position:"bottom-right",offsetY:8},h.createElement(aN.A,{size:"x-small","aria-label":ss.t("More options")},h.createElement(w.Ah,{name:"ellipsis-vertical-filled"})))):null,[v,D,d,s,M]);return((0,ec.A)(()=>{t.current&&!s&&t.current.offsetHeight>=400&&c(!0)},[S,u,b,v,r]),v)?h.createElement("div",{className:"p-canvas_smart_cards",onMouseEnter:T,onMouseLeave:N},h.createElement("div",{className:"p-canvas_smart_cards__header"},h.createElement("div",{className:"p-canvas_smart_cards__header_title_block"},h.createElement(iz.o,{type:"summary",inline:!0,size:"20"}),h.createElement("div",{className:"p-canvas_smart_cards__header__title"},ss.t("AI Summary",{fallbackHash:"12b71c3e0fe5f7c0b8d17cc03186e281412da4a8"}))),y?B():null),h.createElement("div",{className:"p-canvas_smart_cards__summary",ref:t,style:{maxHeight:d?"100%":400}},U())):null}SummaryCard.displayName="SummaryCard";let sc=SummaryCard;function generateSmartSummaryCardComponentId({channelId:e}){return`smartsummary:${e}`}function parseSmartSummaryCardComponentId(e){if(e.startsWith("smartsummary:"))return{channelId:e.substring(13)}}function EmbeddedGenericSmartSummaryCard({channelId:e}){return(0,E.d4)(eL.QG)?h.createElement(sc,{channelId:e}):null}EmbeddedGenericSmartSummaryCard.displayName="EmbeddedGenericSmartSummaryCard";let sd=new S.Ay("placeholder-unfurls");function EmbeddedVideoPlaceholder({placeholderVideoId:e}){let t=(0,_.wA)(),{embeddedUiData:a}=(0,h.useContext)(aS.N),{loading:n,onFilesSelectedHandler:r}=use_upload_file("embedded-video-placeholder"),i=(0,h.useCallback)((e,t)=>{r([t]).then(e=>{e?.permalink&&a?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e?.permalink})})},[a,r]),l=(0,h.useCallback)(()=>{t((0,tM.A)({onContainerUpload:i}))},[t,i]);return e!==iw?null:h.createElement(EmbeddedSampleContentTemplate,{description:sd.t("Record a new video clip."),buttonText:sd.t("Create a video recording"),icon:"video",loading:n,onButtonClick:l,isDisabled:a?.isReadOnly()})}EmbeddedVideoPlaceholder.displayName="EmbeddedVideoPlaceholder";var sm=a(0xcaea2334);function EmbeddedWorkflowTemplateEntity({template:e}){return h.createElement("div",{className:"p-embedded_workflow_template_entity","data-qa":"embedded-workflow-template-header"},h.createElement("div",{className:"p-embedded_workflow_template_entity__icon"},h.createElement(w.Ah,{name:e.icon})),h.createElement("div",{className:"p-embedded_workflow_template_entity__contents"},h.createElement(aD.A,{lines:1,withTooltip:!0},h.createElement("div",{className:"p-embedded_workflow_template_entity__title","data-qa":"embedded-workflow-template-title"},e.title))))}EmbeddedWorkflowTemplateEntity.displayName="EmbeddedWorkflowTemplateEntity";var su=a(0x8c8bafa3),sp=a(0x15bd59d31),sh=a(0x19dc73101);let s_=a.p+"celebration-fef49f7.png";var sf=a(0x20e77676b),sb=a(0xa25cde92);let sg=new S.Ay("workflow_templates_in_canvas"),AddWorkflowConfirmationModal=({confirmationText:e,trigger:t})=>{let a=(0,_.wA)(),n=(0,h.useCallback)(()=>{a((0,e0.O)())},[a]),r=(0,h.useMemo)(()=>{let e=t.workflow,a=t.workflow_details;return{triggerId:t.id,appId:e.app_id,app:e.app,isWorkflowApp:!0,workflowId:e.workflow_id,title:e.title??t.name,description:e.description??t.description,url:t.shortcut_url,appCollaborators:a?.collaborators}},[t.description,t.id,t.name,t.shortcut_url,t.workflow,t.workflow_details]);return h.createElement(tk.dW,{closeModal:n},h.createElement(tk.$m,null,h.createElement(tk.hR,{src:s_,alt:sg.t("three people celebrating")}),h.createElement(tk.Rc,{title:sg.t("You added a new workflow")}),h.createElement(tk.qf,null,h.createElement(sb.j,{shortcutInfo:r,showActions:!1,showByline:!1,isWorkflowBuilderPreview:!0})),h.createElement(tk.qf,null,e)),h.createElement(tk.jl,null,h.createElement(sf.A,{articleId:0x53d4eb9a1e},sg.t("More about how it works")),h.createElement(tk.ox,null,h.createElement(tk.s_,{autoFocus:!0,className:"p-add-workflow-confirmation-modal__modal_close_button",type:"primary","aria-label":sg.t("Done")},sg.t("Done")))))};AddWorkflowConfirmationModal.displayName="AddWorkflowConfirmationModal";var sy=a(0x1d14b4538),sA=a(0xe41988fb),sx=a(0x11571542c);let sE=(0,e9.Ay)("Add create shortcut workflow from template",async(e,t,{templateId:a,payload:n})=>{let r="customize-workflow-from-canvas",{workflow_id:i,trigger_id:l}=await e((0,sx.k)({templateId:a,payload:n,reason:r})),o=e((0,sy.Y)({workflowId:i,reason:r})),s=e((0,sA.B)({triggerId:l,reason:r})),[{decorated_workflow:c},{trigger:d}]=await e3.S.all([o,s]);return d});sE.meta={name:"createShortcutWorkflowFromTemplate",key:"createThunkCreateShortcutWorkflowFromTemplate",description:"Add create shortcut workflow from template"};var sC=((d={}).JOIN_ALL_CHANNELS="JOIN_ALL_CHANNELS",d.JOIN_ALL_CHANNELS_PROJECT="JOIN_ALL_CHANNELS_PROJECT",d.EMPTY="EMPTY",d);let sk=new S.Ay("workflow_templates_in_canvas"),sv={entities:{channels:{includePublic:!0,includePrivate:!0,onlyIfMember:!0,includeFromAnotherTeam:!0,runaway:!0}},allowEmptyQuery:!0,sort:{preferExactMatch:!1,flat:!0}},JoinAllChannelsPayloadModal=({onWorkflowPublished:e,source:t})=>{let a=(0,_.wA)(),[n,r]=(0,h.useState)([]),[i,l]=(0,h.useState)(""),[o,s]=(0,h.useState)(!1),[c,d]=(0,h.useState)(!1),m=(0,h.useRef)(null),u=n.length>0&&n.length<=10,p=i.length<=40,f=(0,h.useMemo)(()=>u||0===n.length?void 0:[{id:"too_many_channels",message:sk.t("You can\u2019t enter more than {maxLength} channels.",{maxLength:10})}],[u,n.length]),b=(0,h.useCallback)(()=>{m.current?.track({action:eJ.UiAction.SAVE}),d(!1),s(!0),a(sE({templateId:sC.JOIN_ALL_CHANNELS,payload:{channelIds:n,title:sk.t("Join all {teamName}channels",{teamName:i?`${i} `:""})}})).then(t=>{s(!1),t.shortcut_url?(e(t.shortcut_url),a((0,ts.q)({element:h.createElement(AddWorkflowConfirmationModal,{confirmationText:sk.rt("This workflow will make it easy for teammates to join <b>{numChannels}</b> {numChannels, plural, =1 {channel} other {channels}}, right from your canvas.",{numChannels:n.length}),trigger:t})}))):d(!0)}).catch(e=>{d(!0),s(!1)})},[a,e,n,i]),g=(0,h.useCallback)(()=>{m.current?.track({action:eJ.UiAction.CLOSE}),a((0,e0.O)())},[a,m]),y=(0,h.useCallback)(e=>h.createElement(sp.A,{channel:e.entity}),[]),A=(0,h.useCallback)(e=>{r(e.map(e=>e.value))},[]);return h.createElement(Y.A,{eventId:eJ.EventId.QUIP_CANVAS_TEMPLATES,elementType:eJ.ElementType.MODAL,uiComponentName:eJ.UiComponentName.QUIP_UNFURL_WORKFLOW_PLACEHOLDER,uiComponentVariant:t,trackClogRef:e=>{m.current={track:e}},clogImpression:!0},h.createElement(tk.dW,{closeModal:g},h.createElement(tk.rQ,{"data-qa":"join-all-channels-template-header"},h.createElement(tk.Rc,{title:sk.t("Add a workflow")})),h.createElement(tk.$m,null,c&&h.createElement(tk.qf,{className:"margin_bottom_125"},h.createElement(e2.Ay,{level:e2.A_.error,heading:sk.t("Something went wrong")},sk.rt("If the problem persists, please <a>drop us a line</a>",null,({text:e})=>h.createElement(rv.A,{href:`https://${(0,su.qF)()}/help/contact`,rel:"noopener noreferrer",target:"_blank"},e)))),h.createElement(tk.qf,{className:"p-join_all_channels_payload_modal__text_section"},sk.t("Select channels you\u2019d like to make it easy for teammates to join in one go. When they use the workflow, they\u2019ll be automatically added.")),h.createElement(tk.qf,null,h.createElement(io.A,{text:sk.t("Team name"),htmlFor:"join-all-channels-template-team-name-input",optional:!0},h.createElement(is.A,{name:"join-all-channels-template-team-name-input",id:"join-all-channels-template-team-name-input",placeholder:sk.t("Your team\u2019s name"),onChange:l,value:i,size:"medium",focusOnMount:!0,isDisabled:o,maxCharacterLimit:40}))),h.createElement(tk.qf,null,h.createElement(io.A,{text:sk.t("Channels"),htmlFor:"join-all-channels-template-multi-select"},h.createElement(sh.h,{selectId:"join-all-channels-template-multi-select",className:"p-join_all_channels_payload_modal__multi-select",width:"100%",maxHeight:136,searcherOptions:sv,renderOption:y,placeholderText:sk.t("Select channels"),onSelectedItemsChange:A,expandOnFocus:!0,isDisabled:o,isInvalid:!!f,errors:f})))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(tk.s_,{type:"outline","data-qa":"join_all_channels_template_close_button","aria-label":sk.t("Close")},sk.t("Close")),h.createElement(e$.lV,{type:"primary",disabled:!u||!p,onClick:b,loading:o,"data-qa":"join_all_channels_template_save_button","aria-label":sk.t("Save")},sk.t("Save"))))))};JoinAllChannelsPayloadModal.displayName="JoinAllChannelsPayloadModal";let sS=new S.Ay("workflow_templates_in_canvas");function templateCollection(){return[{id:sC.JOIN_ALL_CHANNELS,title:sS.t("Join all channels"),description:sS.t("Join team channels automatically"),createWorkflowDescription:sS.t("Help teammates automatically join all the necessary channels by setting up a workflow."),icon:"channel"},{id:sC.JOIN_ALL_CHANNELS_PROJECT,title:sS.t("Join all channels"),description:sS.t("Automatically join recommended channels that are related to this one"),createWorkflowDescription:sS.t("Help people automatically join all the relevant channels in one go."),icon:"channel"},{id:sC.EMPTY,title:sS.t("Add a workflow"),description:sS.t("Insert a new or existing workflow.",{fallbackHash:"d7a484140f5f9f7f5427e1f2c44dbfc1d3ad9eea",fallbackHashNs:"slack_docs"}),createWorkflowDescription:sS.t("Replace with a new or existing workflow.",{fallbackHash:"d7a484140f5f9f7f5427e1f2c44dbfc1d3ad9eea",fallbackHashNs:"slack_docs"}),icon:"play"}]}let sI=new S.Ay("workflow_templates_in_canvas");function EmbeddedWorkflowTemplate({templateId:e}){let t=(0,_.wA)(),{embeddedUiData:a}=(0,h.useContext)(aS.N),n=useInCanvasTemplate(),r=(0,h.useMemo)(()=>templateCollection().find(t=>t.id===e),[e]),i=!(0,E.d4)(sm.I),l=(0,h.useCallback)(e=>{a?.performAsyncAction({action:f.EmbeddedUiAction.UNFURL_URL,url:e})},[a]),o=(0,h.useCallback)((e,t)=>{let a=t?.shortcut_url??t?.share_url;a&&l(a)},[l]),s=(0,h.useCallback)(()=>{if(i)t((0,tm.M)({element:h.createElement(eY.A,{duration:6e3},sI.t("You don\u2019t have permissions to create this workflow"))}));else{let e=null;switch(r?.id){case sC.EMPTY:t((0,tR.Ay)({source:r.id,onInsertWorkflow:o}));break;case sC.JOIN_ALL_CHANNELS:case sC.JOIN_ALL_CHANNELS_PROJECT:e=h.createElement(JoinAllChannelsPayloadModal,{onWorkflowPublished:l,source:r.id});break;default:e=null}e&&t((0,ts.q)({element:e}))}},[i,t,r?.id,o,l]);if(!r)return null;if(n&&e!==sC.EMPTY){let e=h.createElement("div",{className:"p-embedded_workflow_template"},h.createElement(EmbeddedWorkflowTemplateEntity,{template:r}),h.createElement("div",{className:"p-embedded_workflow_template__summary","data-qa":"embedded-workflow-template-summary"},r.description),h.createElement(e$.Ay,{className:"p-embedded_workflow_template__customize_button",type:"outline",disabled:!0,"data-qa":"embedded-workflow-template-customize-button"},h.createElement("span",{className:"p-embedded_workflow_template__customize_button__icon"},h.createElement(w.Ah,{name:"play",inline:!0,size:"18"})),h.createElement(aD.A,{lines:1,withTooltip:!0},sI.t("Start workflow"))));return i?h.createElement(as.Ay,{tip:sI.t("Workflows are available on paid plans")},e):e}return i?h.createElement(as.Ay,{tip:sI.t("Workflows are available on paid plans")},h.createElement(e$.Nm,{className:"p-embedded_workflow_template_no_access","data-qa":"embedded-workflow-template-no-access"},h.createElement("div",{className:"p-embedded_workflow_template_no_access__icon"},h.createElement(w.Ah,{name:"warning"})),sI.t("You don\u2019t have access."))):h.createElement(EmbeddedSampleContentTemplate,{description:r.createWorkflowDescription,buttonText:sI.t("Add a workflow"),icon:"play",onButtonClick:s,isDisabled:a?.isReadOnly()})}function EmbeddedGeneric({fileId:e,id:t}){let a=parsePinsComponentId(t),n=parseBookmarksComponentId(t),r=parseSmartSummaryCardComponentId(t),i=parseRecentFilesCardComponentId(t),l=parseActiveDiscussionsCardComponentId(t),o=parseChannelHuddlesCardComponentId(t),s=parseSmartFilesCardComponentId(t),c=parseSmartMembersCardComponentId(t),d=parseInviteClientPlaceholderComponentId(t),m=parseInviteCoworkerPlaceholderComponentId(t),u=parseModalPlaceholderComponentId(t),p=(0,iC.G)(t),{placeholderType:_,placeholderId:b,isStatic:g,profileVariant:y}=parsePlaceholderComponentId(t);switch(_){case f.PlaceholderInsertionType.PROFILE:if(b in oH)return h.createElement(EmbeddedProfilePlaceholder,{placeholderProfileId:b,variant:y});break;case f.PlaceholderInsertionType.WORKFLOW:if(b in sC)return h.createElement(EmbeddedWorkflowTemplate,{templateId:b});break;case f.PlaceholderInsertionType.LINK:if(b in l0)return h.createElement(EmbeddedLinkPlaceholder,{placeholderLinkId:b,isStatic:g});break;case f.PlaceholderInsertionType.IMAGE:return h.createElement(EmbeddedImagePlaceholder,{placeholderImageId:b,isStatic:g});case f.PlaceholderInsertionType.CANVAS:if(b in iO)return h.createElement(EmbeddedCanvasPlaceholder,{placeholderCanvasId:b});break;case f.PlaceholderInsertionType.FILE:if(b in lp)return h.createElement(EmbeddedFilePlaceholder,{placeholderFileId:b});break;case f.PlaceholderInsertionType.VIDEO:return h.createElement(EmbeddedVideoPlaceholder,{placeholderVideoId:b});case f.PlaceholderInsertionType.AUDIO:return h.createElement(EmbeddedAudioPlaceholder,{placeholderAudioId:b});case f.PlaceholderInsertionType.SALESFORCE_RECORD:return h.createElement(EmbeddedSalesforceRecordPlaceholder,{placeholderRecordId:b});case f.PlaceholderInsertionType.LIST:return h.createElement(EmbeddedListPlaceholder,{placeholderListId:b})}return a?h.createElement(EmbeddedGenericPins,a):n?h.createElement(EmbeddedGenericBookmarks,n):r?h.createElement(EmbeddedGenericSmartSummaryCard,r):i?h.createElement(EmbeddedGenericRecentFilesCard,i):l?h.createElement(EmbeddedGenericActiveDiscussionsCard,l):o?h.createElement(EmbeddedGenericChannelHuddlesCard,o):s?h.createElement(EmbeddedGenericSmartFilesCard,s):c?h.createElement(EmbeddedGenericSmartMembersCard,c):d?h.createElement(EmbeddedInviteClientPlaceholder,null):m?h.createElement(EmbeddedInviteCoworkerPlaceholder,null):u?h.createElement(EmbeddedCanvasModalPlaceholder,u):p&&e?h.createElement(iC.A,{huddleSummaryFileId:e}):null}EmbeddedWorkflowTemplate.displayName="EmbeddedWorkflowTemplate",EmbeddedGeneric.displayName="EmbeddedGeneric";var sw=a(0x198201515);function ShareEmbeddedPromptButton({promptBlock:e}){return e?h.createElement(sw.W,{prompt:e.prompt,label:e.label,appId:e.appId,isSlackbot:e.isSlackbot,promptId:e.promptId,promptRichText:e?.promptRichText,canvasUnfurl:!0}):null}ShareEmbeddedPromptButton.displayName="ShareEmbeddedPromptButton";var sT=a(0x239cd8d69),sN=a(0x1eea27034),sM=a(0x19683d73f),sR=a(0x21e6a881a),sP=a(0x2a037c8a),sL=a(0xf2964a91),sO=a(0x22d443103);let sD=new S.Ay("hermes_shortcuts"),LoadingWorkflowCard=({className:e})=>{let t=j()("p-workflow_card",e);return h.createElement(ra.A,{className:t,elevation:2,size:"medium"},h.createElement(sR.A,{isLoading:!0}),h.createElement("div",{className:"p-workflow_card__body"},h.createElement(rm.A,{className:"p-workflow_card__body__description"})))};LoadingWorkflowCard.displayName="LoadingWorkflowCard";let NonExistentWorkflowCard=({className:e})=>{let t=j()("p-workflow_card","p-workflow_card--error",e);return h.createElement(ra.A,{className:t,elevation:2,size:"medium"},h.createElement("div",{className:"p-workflow_card--error__icon"},h.createElement(w.Ah,{name:"trash",size:"20"})),h.createElement("div",{className:"p-workflow_card--error__message"},sD.t("This workflow no longer exists.")))};NonExistentWorkflowCard.displayName="NonExistentWorkflowCard";let WorkflowCard=({shortcutInfo:e,hermesLinkTriggerUIContext:t,className:a})=>{let n=(0,_.wA)(),{embeddedUiData:r}=(0,h.useContext)(aS.N),i=(0,E.d4)(t=>(0,n_.nv)(t,e.botUserId)),l=(0,h.useMemo)(()=>({eventId:eJ.EventId.WORKFLOW_SHARE_CLICK,onClick:{enableClogAction:!0}}),[]),o=(0,h.useCallback)(a=>r?h.createElement(nJ.A,{menuProps:a}):h.createElement(sN.A,{shortcutInfo:e,hermesLinkTriggerUIContext:t,menuProps:a}),[r,e,t]),s=(0,h.useCallback)(()=>{n((0,sO.A)({shortcutInfo:e}))},[n,e]),c=(0,h.useMemo)(()=>({name:"share-message"}),[]);if((0,sL.o)(i))return h.createElement(NonExistentWorkflowCard,{className:a});if((0,ot.mX)(i))return h.createElement(LoadingWorkflowCard,{className:a});let{description:d,url:m,appId:u,workflowId:p,triggerId:f,triggerType:b}=e,g=b===sP.M.Shortcut&&m,y=sD.t("Forward workflow"),A=j()("p-workflow_card",a,{"p-workflow_card--draggable":r&&!r.isReadOnly()});return h.createElement(Y.A,{eventId:eJ.EventId.WORKFLOW_UNFURL_IMPRESSION,uiComponentName:eJ.UiComponentName.WORKFLOW_UNFURL,appId:u,workflowId:p,workflowTriggerId:f,clogImpression:!0},h.createElement(ra.A,{className:A,elevation:2,size:"medium"},h.createElement(sR.A,{shortcutInfo:e}),h.createElement("div",{className:"p-workflow_card__body"},d&&h.createElement("div",{className:"p-workflow_card__body__description"},d),h.createElement(sT.x,{owningTeamId:e.owningTeamId,className:"margin_top_75"}),g&&h.createElement("div",{className:"p-workflow_card__body__start_button"},h.createElement(sM.Ay,{shortcutInfo:e,hermesLinkTriggerUIContext:t,ariaDescribedById:`workflow_card_title_${f}`}))),h.createElement(n3.A,{position:"inset"},h.createElement(n4.A,{svgIconProps:c,onClick:s,tooltip:y,ariaDescribedById:`workflow_card_title_${f}`,autoClogProps:l}),h.createElement(n5.A,{renderMenu:o,position:r?n$.yX.LeftBottom:n$.yX.Left,preventScroll:!!r,ariaDescribedById:`workflow_card_title_${f}`}))))};WorkflowCard.displayName="WorkflowCard";var sF=a(0xdd82101c),sU=a(0x20679dcfc),sB=a(0x6e20c837),sH=a(0x22f6a086f);let sW=new S.Ay("shortcut-unfurl"),LoadingShortcutUnfurl=()=>h.createElement(LoadingWorkflowCard,{className:"p-workflow_card--embedded_ui"});LoadingShortcutUnfurl.displayName="LoadingShortcutUnfurl";let ShortcutUnfurl=({channelId:e,shortCutBlock:t})=>{let{embeddedUiData:a}=(0,h.useContext)(aS.N),n=(0,E.d4)(e=>(0,sH.Yl)(e,{block:t})),r=(0,h.useMemo)(()=>({location:"canvas",canvasId:(0,sU.l)(e)}),[e]);return(0,h.useEffect)(()=>{if(!a)return;let e=n.isWorkflowApp?sW.t("workflow"):sW.t("shortcut"),t={name:n.title??e,type:e,description:n.description};a?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:t})},[a,n.description,n.isWorkflowApp,n.title]),h.createElement(Y.A,{entryPoint:"canvas"},h.createElement(WorkflowCard,{shortcutInfo:n,hermesLinkTriggerUIContext:r,className:"p-workflow_card--embedded_ui"}))};ShortcutUnfurl.displayName="ShortcutUnfurl";let ShortcutUnfurlWithUrl=({url:e})=>{let{embeddedUiData:t}=(0,h.useContext)(aS.N),a=(0,E.d4)(t=>(0,sB.$N)(t,e)),n=a?.triggerId,r=(0,E.d4)(e=>n?(0,sH.bn)(e,{triggerId:n},!0):null);return r?.error?h.createElement(sF.A,{triggerError:r.error,className:t?.isReadOnly()?void 0:"p-workflow_with_error_container--draggable",title:r?.name??e}):h.createElement(LoadingShortcutUnfurl,null)};ShortcutUnfurlWithUrl.displayName="ShortcutUnfurlWithUrl";let EmbeddedShortcutLinkUnfurl=({channelId:e,shortCutBlock:t,url:a,isLoading:n})=>n?h.createElement(LoadingShortcutUnfurl,null):t?h.createElement(ShortcutUnfurl,{channelId:e,shortCutBlock:t}):h.createElement(ShortcutUnfurlWithUrl,{url:a});EmbeddedShortcutLinkUnfurl.displayName="EmbeddedShortcutLinkUnfurl";var sV=a(0x23619f41c),sG=a(0x121a53a99),sq=a(0x8d57b507),sj=a(0x7f7d34d1),sz=a(0x571bd0b0);let sK=new S.Ay("files");function ShortcutButton({channelId:e,actionId:t,theme:a}){let n=(0,_.wA)(),{embeddedUIContainerElement:r,embeddedUiData:i}=(0,h.useContext)(aS.N),[l,o]=(0,h.useState)(!1),s=(0,E.d4)(W.ZT),c=(0,E.d4)(e=>(0,sq.aL)(e,t)),d=!!c;(0,h.useEffect)(()=>{s&&!d&&(0,sz.E)(s,e)},[e,d,s]);let m=(0,h.useCallback)(()=>{o(!0),n((0,sj.d)({channelId:e,actionId:t,reason:"spaceship-shortcut-embed"})).finally(()=>o(!1))},[n,e,t]);if((0,h.useEffect)(()=>{if(r)return(0,r0.LR)(r,m),()=>(0,r0.xB)(r)},[r,m]),(0,h.useEffect)(()=>{if(!i||!c)return;let{name:e,description:t}=c;i?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:{type:sK.t("Action"),name:e,description:t}})},[i,c]),!c)return null;let u=(0,sG.qc)(c.app);return h.createElement(e$.lV,{type:a||"outline",size:"medium",onClick:m,className:"p-embedded_unfurl__shortcut",loading:l,disableWhenLoading:!0,"aria-label":c.name},h.createElement(sV.A,{ariaHidden:!0,image:u?.image_64,classes:"p-embedded_unfurl__shortcut_icon"}),c.name)}ShortcutButton.displayName="ShortcutButton";var s$=a(0x543a781e),sY=a(0xd3c52762),sQ=a(0x1dd284e05),sZ=a(0x1fdf007c4),sJ=a(0xb60a1b),sX=a(0x2d1c8f66),s0=a(0x227d0a49),s1=a.n(s0);let s2=new S.Ay("file");function SlackListEmbedOpenButton({listId:e,viewId:t}){let a=(0,_.wA)(),n=(0,ae.y3)()||(0,sZ.S)(),r=(0,h.useCallback)(()=>a((0,sX.N)({listFileId:e,listViewId:t,defaultToAllItemsView:!0,navigateInCurrentContext:!n,source:sJ.B.CANVAS_LIST_UNFURL,forceOpenInChildWindow:n})),[a,e,t,n]),i=n?s2.t("Open in new window"):s2.t("Open");return h.createElement(as.Ay,{tip:i},h.createElement(aN.A,{"aria-label":i,tabIndex:-1,onClick:r,className:j()(s1().EmbeddedSlackListEmbedOpenButton,"flex_shrink_none margin_left_25")},h.createElement(w.Ah,{name:"open-in-window",size:"inherit"})))}SlackListEmbedOpenButton.displayName="SlackListEmbedOpenButton";let s4=SlackListEmbedOpenButton;var s5=a(0x24c261bcb),s3=a(0x1e864b930),s6=a(0x2376ea9bb),s8=a(0x70de3606),s7=a(0x124cb69d5),s9=a(0x2275c26b8),ce=a(0x8d0a2ff1),ct=a(0x241b62a4f),ca=a.n(ct);let cn=new S.Ay("lists");function useShouldShowSlackConnectMessageForList(e){let t=(0,E.d4)(s8.Fh),a=(0,E.d4)(t=>(0,ce.w9)(t,e)?.includes(s9.Ao.SlackConnect));return t&&a}function useSlackConnectMessageForList(e){let t=(0,E.d4)(t=>(0,ce.vS)(t,e)),a=(0,E.d4)(e=>(0,s7.A)(e,{file:t})),n=t?.user_team,r=(0,E.d4)(e=>n?(0,tv._J)(e,n):null),i=(0,tC.Ss)(r??void 0)??n,l=(0,U.iv)(t).filter(e=>e!==i);if(useShouldShowSlackConnectMessageForList(e))return a?cn.t("{teamName} manages this list",{teamName:(0,tC.F1)(r)}):cn.t("Shared with {numOfTeams, plural, =1 {# org} other {# orgs}}",{numOfTeams:l.length})}function SlackListSlackConnectMessage({listId:e}){let t,a=(0,E.d4)(t=>(0,ce.vS)(t,e)),n=(0,E.d4)(e=>(0,s7.A)(e,{file:a})),r=a?.user_team,i=(0,E.d4)(e=>r?(0,tv._J)(e,r):null),l=(0,tC.Ss)(i??void 0)??r,o=(0,U.iv)(a).filter(e=>e!==l);if(!useShouldShowSlackConnectMessageForList(e))return null;let s=o.slice(0,3),c=(0,s5.A)(s.length).map(e=>h.createElement(s6.A,{className:"p-connection_info_icon__icon",id:s[e],key:s[e],"data-qa":"slack_connect_system_message_icon"}));if(n)t=cn.rt("<b>{teamName}</b> manages this list",{teamName:h.createElement(T.A,{id:r})}),c=[h.createElement(s6.A,{className:"p-connection_info_icon__icon",id:r,key:r,"data-qa":"slack_connect_system_message_icon"})];else{let e=o.slice(0,50).map(e=>h.createElement(T.A,{id:e,key:e}));o.length>50&&e.push(cn.rt("others"));let a=(0,s3.A)(e,{react:!0});t=cn.rt("Shared with <tooltip>{teamCountText}</tooltip>",{teamCountText:cn.t("{numOfTeams, plural, =1 {# org} other {# orgs}}",{numOfTeams:o.length}),"<tooltip>":({text:e})=>h.createElement(as.Ay,{tip:a,maxWidth:"large"},h.createElement("b",null,e))})}return h.createElement("div",{className:`inline_flex padding_left_75 ${ca().EmbeddedSlackListEmbedSC}`},c,h.createElement("span",{className:`padding_left_25 caption ${ca().EmbeddedSlackListEmbedSCText}`},t))}function useQuipSectionIsFocused(){let{embeddedUiData:e,docEmbed:t}=(0,h.useContext)(aS.N),[a,n]=(0,h.useState)(!!e?.isFocused());return(0,h.useEffect)(()=>{let focusStateListener=(t,a)=>{t?.sectionId!==a?.sectionId&&n(!!e?.isFocused())};return t?.focusState?.listen(focusStateListener),()=>{t?.focusState?.unlisten(focusStateListener)}},[t,e]),a}SlackListSlackConnectMessage.displayName="SlackListSlackConnectMessage";var cr=a(0x15a4ffb05),ci=a(0x14fde54c);function EmbeddedSlackListEmbedHeader({listId:e,isFocused:t,viewId:a}){let n=useQuipSectionIsFocused(),r=(0,E.d4)(t=>(0,ci.Kb)((0,ce.vS)(t,e))),i=(0,E.d4)(t=>(0,ci.JN)((0,ce.vS)(t,e))),l=(0,E.d4)(t=>(0,ce.vS)(t,e)?.title??""),o=(0,E.d4)(t=>(a&&(0,ci.cv)((0,ce.vS)(t,e),a)?.name)??""),s=o?` : ${o}`:"",c=`${l}${s}`,d=r?h.createElement(R.Ay,{forceDisplay:!0,text:r,emojiSize:R.lw.MEDIUM,showTooltip:!1,url:i}):null;return h.createElement("div",{className:"display_flex justify_content_between align_items_start"},h.createElement("div",{className:j()(ca().EmbeddedSlackListEmbedHeader,{[ca().EmbeddedSlackListEmbedHeaderFocused]:t}),"data-qa":"embedded-slack-list-embed-header"},h.createElement("div",{className:ca().EmbeddedSlackListEmbedHeaderContent},d&&h.createElement("div",{className:"display_flex margin_right_50"},d),l&&h.createElement("div",{className:ca().EmbeddedSlackListEmbedHeaderTitle},h.createElement(cr.A,{text:c,emojiSize:R.lw.MEDIUM})))),h.createElement(SlackListSlackConnectMessage,{listId:e}),n&&h.createElement(s4,{listId:e,viewId:a}))}EmbeddedSlackListEmbedHeader.displayName="EmbeddedSlackListEmbedHeader";let cl=EmbeddedSlackListEmbedHeader;var co=a(0x1e3c7661),cs=a(0x21b059a52),cc=a(0x153ff4324),cd=a(0x2d389b17),cm=a(0x3f09624),cu=a(0x15e1a1041);function EmbeddedSlackListEmbed({file:e,viewId:t}){let{embeddedUiData:a,docEmbed:n,slackFileId:r}=(0,h.useContext)(aS.N),i=useQuipSectionIsFocused(),l=(0,h.useRef)(null),[o,s]=(0,h.useState)(!!l.current?.contains(window.document.activeElement)),c=(0,s$.A)(i&&!o,50),d=(0,E.d4)(e=>(0,ep.Lp)(e,r||"")),m=!d||!d.access||!(0,U.mW)(d),[u,p]=(0,h.useState)(),[_,f]=(0,h.useState)(),b=(0,h.useRef)(!0),g=(0,h.useRef)(0),y=(0,h.useRef)(),{windowId:A,windowRef:x}=(0,h.useContext)(K._0),C=(0,h.useMemo)(()=>(0,cs.c)(e.id,A),[e.id,A]),k=(0,h.useCallback)((e,t)=>e?t:t+16,[]),v=(0,h.useCallback)(()=>{let e,t,a=n?.containerElement().clientWidth,r=n?.editorContainer.get()?.clientWidth;if(!a||!r)return;let i=y.current,l=i?10:4;b.current=g.current+k(i,32)<a;let o=b.current?l:32,s=g.current+k(i,o);e=s<r?-o:-Math.floor(((t=Math.min(s,a))-r)/2),p(t),f(e)},[n,k]),S=(0,h.useCallback)((e,t)=>{y.current=t===cu.q.Table,g.current=y.current?e:e-2*cm.Ak,v()},[v]),I=(0,h.useMemo)(()=>(0,J.A)(v),[v]);(0,h.useEffect)(()=>(n&&I.observe(n.containerElement()),()=>{n&&I.unobserve(n.containerElement())}),[n,I]);let w=(0,h.useCallback)(e=>{e.stopPropagation()},[]),T=(0,h.useCallback)(e=>{l.current?.contains(e.relatedTarget)||l.current?.contains(x.deref()?.document?.activeElement??null)||s(!1)},[x]),N=(0,h.useCallback)(()=>{s(!0);let e=a?.focusedSectionId();!i&&e&&n?.docEditor.focusSection(e)},[n?.docEditor,a,i]),M=(0,h.useCallback)(e=>{l.current?.contains(e.relatedTarget)||l.current?.contains(x.deref()?.document?.activeElement??null)||s(!1)},[x]),R=!1;return(e?.list_metadata?.views&&t&&(R=(0,sQ.h2)(e.list_metadata.views,t)),!(0,U.ZG)(e)||R)?h.createElement(rl.A,{width:799,height:400,className:"p-embedded_slack_list_embed--error"},h.createElement(cd.A,{isUnfurl:!0,file:e,listViewIsDeleted:R})):h.createElement("div",{role:"none",className:j()("p-embedded_slack_list_embed",{narrow:b.current}),onPaste:w,onClick:T},h.createElement(cl,{listId:e.id,viewId:t,isFocused:c}),h.createElement(sY.A,{onFocusEnter:N,onFocusLeave:M},h.createElement("div",{style:{width:u,marginLeft:_},ref:l},h.createElement(cc.A,{canvasFileId:r,listId:e.id,viewId:t,hideRefinements:!0,hideFloatingNewItemButton:!0,showViewFocusStyles:c,titleIsViewOnly:!0,growToMaxHeight:575,onContentWidthChange:S,skipFocusOnRender:!0,defaultToAllItemsView:!0,forceUpdatingSelectedView:!0,isViewOnly:m,hideAddGroupButton:!0,listInstanceUniqueId:C,additionalGridWidth:16,hideTitleHeader:!0,viewContext:co.G6.CANVAS}))))}EmbeddedSlackListEmbed.displayName="EmbeddedSlackListEmbed";let cp=EmbeddedSlackListEmbed;var ch=a(0x12f6b6cb8),c_=a(0x1fb48eb63);let cf=new S.Ay("files");function EmbeddedSlackList({fileId:e,viewId:t,recordId:a,isLoading:n}){let r=(0,E.d4)(t=>(0,ep.Lp)(t,e)),i=(0,E.d4)(t=>a?(0,ce.ll)(t,e,a):void 0),l=(0,E.d4)(t=>a?(0,ce.wx)(t,e,a):""),o=t?(0,ci.cv)(r,t):void 0,s=!r.isUnknown&&!!(t&&!o||a&&!i),{embeddedUiData:c}=(0,h.useContext)(aS.N),d=useSlackConnectMessageForList(e);return((0,h.useEffect)(()=>{if(!c)return;let e=i?cf.t("Can\u2019t view this list item"):cf.t("Can\u2019t view this list");(0,U.ZG)(r)&&!s&&(e=(0,tP.SB)(r)??cf.t("Untitled"),o?e=cf.t("{metadataName} view {viewName}",{metadataName:e,viewName:o.name}):i&&(e=cf.t("{recordName} item in {listName}",{recordName:l,listName:e})));let t={name:e,type:i?cf.t("List item preview"):cf.t("List preview"),description:d};c?.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:t})},[c,r,l,i,s,o,d]),(0,U.Y8)(r))?h.createElement(c_.A,{file:r,viewContext:"canvas"}):c?.getCardRenderType()===f.SlackListContentRenderType.EMBED?h.createElement(cp,{file:r,viewId:t}):h.createElement(ch.A,{file:r,viewId:t,recordId:a,clickable:!s,isLoading:n})}EmbeddedSlackList.displayName="EmbeddedSlackList";let cb=EmbeddedSlackList;var cg=a(0x18f2150ea),cy=a(0x1229d92d),cA=a(0xee5bab5f),cx=a(0xa089d16d);let hasMissingInputs=e=>e?.inputs?.some(({value:e})=>!e)??!1;var cE=a(0x1fc996df8),cC=a(0x11acd3fa1);let WidgetConfigInput=({inputParameter:e,appId:t,saveParameterValue:a,formValues:n})=>{let{parameter:r}=e,i=(({functionReference:e,appId:t})=>{let a=(0,_.wA)();return(0,h.useMemo)(()=>({fetchOptions:async()=>(await a((0,cC.$)({slackFunctionReference:e,appId:t,reason:"widgets_dynamic_options_client"}))).outputs,shouldFetchOptions:!0}),[t,a,e])})({functionReference:r.dynamic_options.function,appId:t}),l=h.useCallback(({value:e})=>a(r.name,e),[a,r.name]);return h.createElement(cE.L,{parameter:{title:r.title,is_required:!0,dynamic_options:{request_config:{},function:"",validation:{},childInputs:[]}},client:i,onValueChange:l,value:n[r.name],required:!0})};WidgetConfigInput.displayName="WidgetConfigInput";let WidgetConfiguration=({inputParameters:e,appId:t,saveParameterValue:a,formValues:n})=>h.createElement(h.Fragment,null,e.map(e=>{let{parameter:r}=e;return r.dynamic_options?h.createElement(WidgetConfigInput,{inputParameter:e,appId:t,saveParameterValue:a,formValues:n,key:r.name}):null}));WidgetConfiguration.displayName="WidgetConfiguration";var ck=a(0x24218e119),cv=a(0x4c72d423),cS=a(0x12af57632),cI=a(0x184d180f8),cw=a(0x1365ef56e);let cT=(0,e9.Ay)("Runs a placement widget, which will eventually push down a RTM with new blocks.",async(e,t,{widgetPlacementId:a})=>{e((0,cw.tV)({widgetPlacementId:a})),await e((0,cI.a)({widgetPlacementId:a,reason:"run-placement-widget-thunk"}))});cT.meta={name:"runWidgetPlacement",key:"createThunkRunWidgetPlacement",description:"Runs a placement widget, which will eventually push down a RTM with new blocks."};let cN=(0,e9.Ay)("Saves configuration for the placement widget by id",async(e,t,{widgetPlacementId:a,inputs:n})=>{await e((0,ck.L)({widgetPlacementId:a,inputs:n,reason:"configure-widget-placement-thunk"}));let r=t(),i=(0,cv.m)(r,a);i.output&&i.output.blocks?.length!==0?e(cT({widgetPlacementId:a})):e((0,cS.O)({widgetPlacementId:a})).then(()=>e(cT({widgetPlacementId:a})))});cN.meta={name:"configureWidgetPlacement",key:"createThunkConfigureWidgetPlacement",description:"Saves configuration for the placement widget by id"};let cM=new S.Ay("widgets"),WidgetConfigModal=({appId:e,widgetPlacementId:t,inputParameters:a})=>{let n=(0,E.d4)(e=>"on"===(0,F._Z)(e,"widgets")),r=a.reduce((e,t)=>(e[t.parameter.name]=t.value?.toString()??"",e),{}),[i,l]=(0,h.useState)(r),o=(0,_.wA)(),s=(0,h.useCallback)(()=>{o((0,e0.O)())},[o]),c=(0,h.useCallback)(async()=>{let e=Object.keys(i).reduce((e,t)=>(e.push({name:t,value:i[t]}),e),[]);await o(cN({widgetPlacementId:t,inputs:e})),s()},[o,i,s,t]),d=(0,h.useMemo)(()=>a.every(e=>!!i[e.parameter.name]),[i,a]),m=h.useCallback((e,t)=>l(a=>({...a,[e]:t})),[l]);return h.createElement(tk.dW,{closeModal:s,isOpen:!0,centered:!0,shouldCloseOnOverlayClick:!1},h.createElement(tk.rQ,null,h.createElement(tk.Rc,{title:n?cM.t("Configure this widget"):"Configure this widget"})),h.createElement(tk.$m,null,h.createElement(tk.qf,null,h.createElement(WidgetConfiguration,{inputParameters:a,appId:e,saveParameterValue:m,formValues:i}))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(e$.Ay,{type:"outline",onClick:s},n?cM.t("Cancel"):"Cancel"),h.createElement(e$.Ay,{type:"primary",onClick:c,disabled:!d},n?cM.t("Save"):"Save"))))};WidgetConfigModal.displayName="WidgetConfigModal";var cR=a(0x1b56e521c),cP=a(0x18cffe646),cL=a(0x5dd1c0f2),cO=a(0x1b3dac368),cD=a.n(cO);let cF=new S.Ay("widgets"),WidgetAlert=({widgetDefinition:e,heading:t,content:a,onConfigureWidget:n})=>{let r=(0,E.d4)(t=>(0,cL.sO)(t,e?.app_id)),i=(0,E.d4)(e=>"on"===(0,F._Z)(e,"widgets")),l=(0,h.useMemo)(()=>t||(i?cF.t("Configure your {widgetName} widget",{widgetName:r?.name}):`Configure your ${r?.name} widget`),[t,i,r?.name]),o=a||(i?cF.t("Let\u2019s get this widget setup for you"):"Let's get this widget setup for you");return h.createElement("div",{className:cD().alertContainer},h.createElement("div",{className:cD().alertContainerContent},h.createElement("h3",{className:cD().alertHeader},l),h.createElement("p",{className:cD().alertContent},o),h.createElement("div",{className:cD().configureButtonContainer},n?h.createElement(e$.Ay,{type:"primary",size:"medium",onClick:n},i?cF.t("Configure"):"Configure"):null)))};WidgetAlert.displayName="WidgetAlert";var cU=a(0x19a6d3f03),cB=a.n(cU);let WidgetLoader=()=>h.createElement("div",{className:cB().loaderContainer},h.createElement(r3.A,{color:"blue",size:"jumbo"})),cH=new S.Ay("widgets"),WidgetContent=({widgetDefinition:e,widgetPlacement:t,containerActionsPayload:a,configureWidget:n})=>{let r=(0,E.d4)(n_.cA),i=(0,E.d4)(e=>"on"===(0,F._Z)(e,"widgets"));return t?t.state?.refreshing?h.createElement(WidgetLoader,null):t.state?.error?h.createElement(WidgetAlert,{heading:i?cH.t("Widget Error"):"Widget Error",content:t.state.error?.message}):hasMissingInputs(t)?t.user_id===r.id?h.createElement(WidgetAlert,{widgetDefinition:e,onConfigureWidget:n}):h.createElement(WidgetAlert,{heading:i?cH.t("The widget is being configured"):"The widget is being configured",content:i?cH.t("Hang tight while the person who added the widget is configuring"):"Hang tight while the person who added the widget is configuring"}):t.state?.refreshing||!t.output||t.output.blocks?.length===0?h.createElement(WidgetLoader,null):h.createElement(cR.A,{blocks:t.output.blocks,containerIdKey:(0,cP.u)({...a.container})},h.createElement(a7.A,{blocks:t.output.blocks,blocksContainerContext:a8.pi.widget,container:a8.pi.widget,containerActionsPayload:a,remountOnUpdate:!0})):null};WidgetContent.displayName="WidgetContent";var cW=a(0x4d30ca6f),cV=a.n(cW);let WidgetContentContainer=({children:e})=>h.createElement("div",{className:cV().contentContainer},e),WidgetDefaultIcon=()=>h.createElement(rd.A,{size:36});var cG=a(0x1500dc75b);let cq=(0,e9.Ay)("Gets a widget based on an id",async(e,t,{widgetId:a})=>{let n=await e((0,cG.T)({widgetId:a,reason:"fetch-widget-thunk"}));e((0,cw.gE)({widget:n.widget}))});cq.meta={name:"fetchWidget",key:"createThunkFetchWidget",description:"Gets a widget based on an id"};let cj=(0,cy.A)(({windowRef:e,widgetPlacementId:t,blockkitRenderer:a})=>{let n=(0,_.wA)(),r=(0,h.useRef)(null),i=(0,E.d4)(n_.cA),l=(0,E.d4)(e=>"on"===(0,F._Z)(e,"widgets_admin")),o=(0,E.d4)(e=>(0,cv.m)(e,t)),s=(0,E.d4)(e=>(0,cv.B)(e,o?.widget_id)),c=(0,E.d4)(e=>(0,cL.sO)(e,s?.app_id)),d=(0,h.useCallback)(()=>n((0,cS.O)({widgetPlacementId:t})),[n,t]),m=(0,h.useCallback)(()=>n(cq({widgetId:o.widget_id})),[n,o]),u=(0,h.useCallback)(()=>{n(cT({widgetPlacementId:t}))},[n,t]),p=(0,h.useCallback)(()=>{d().then(u)},[d,u]),f=(0,h.useCallback)(()=>{s.widget_url&&(0,nM.x3)(s.widget_url)},[s?.widget_url]),b=(0,h.useMemo)(()=>l,[l]),g=(0,h.useCallback)(()=>{n((0,ts.q)({element:h.createElement(WidgetConfigModal,{widgetPlacementId:o.id,appId:s?.app_id,inputParameters:o.inputs})}))},[n,s?.app_id,o?.id,o?.inputs]),y=(0,h.useMemo)(()=>l&&o?.user_id===i.id,[i,l,o]),A=hasMissingInputs(o);(0,h.useEffect)(()=>{o?!s&&o.widget_id?m():o.output?.blocks||o.state?.refreshing||A||u():d()},[o,s,d,m,u,A]),(0,h.useEffect)(()=>{let t=Date.now(),a=!0;if(!o?.output?.blocks||(r.current&&e.deref()?.clearTimeout(r.current),!s?.cache?.ttl_secs))return;let n=1e3*s?.cache?.ttl_secs,i=n;if((0,cg.A)(o?.output?.blocks_last_updated_in_ms)){let e=t-o?.output?.blocks_last_updated_in_ms;e>n?(u(),a=!1):i=n-e}if(a){let t=e.deref();r.current=t?t.setTimeout(()=>{u()},i):null}return()=>{r.current&&e.deref()?.clearTimeout(r.current)}},[e,u,o?.output?.blocks_last_updated_in_ms,o?.output?.blocks,s?.cache?.ttl_secs]);let x=(0,h.useMemo)(()=>h.createElement(cx.A,{src:(0,ad.A)({icons:c.icons},36),width:36,height:36,"aria-hidden":!0,renderPending:WidgetDefaultIcon,renderError:WidgetDefaultIcon}),[c.icons]),C=(0,h.useMemo)(()=>s?.title&&c?.name?"enabled":"loading",[c?.name,s?.title]);return h.createElement(cA.E,{primaryLabel:s?.title,secondaryLabel:c?.name,onRefresh:A?void 0:p,onCopy:b?f:void 0,onEdit:y&&!A?g:void 0,icon:x,size:"expanded",entityState:C,withBorder:!1,isFullWidth:!0},h.createElement(WidgetContentContainer,null,h.createElement(WidgetContent,{widgetPlacement:o,widgetDefinition:s,containerActionsPayload:a.containerActionsPayload,configureWidget:g})))});function EmbeddedWidget({id:e}){let t=(0,h.useMemo)(()=>({containerActionsPayload:{container:{type:a8.pi.widget}}}),[]);return h.createElement(Y.A,{eventId:eJ.EventId.WIDGET_VIEW,uiComponentName:eJ.UiComponentName.WIDGET,clogImpression:!0},h.createElement(cj,{widgetPlacementId:e,blockkitRenderer:t}))}EmbeddedWidget.displayName="EmbeddedWidget";var cz=a(0x1f8893105),cK=a(0x3cbf56d4),c$=a(0x1cb85d28a),cY=a(0x1e8a588f),cQ=a(0x2197284a);let cZ=(0,e9.Ay)("Fetch tableau entity using tableau.embeds.list",async(e,t,a)=>{let{entityKey:n,tableauObjectId:r,entityRefId:i,reason:l="fetchAndUpsertTableauEmbed",isLive:o=!1}=a;if(n&&r){e((0,c$.aG)({key:n,isLoading:!0}));try{let{objects:t}=await e((0,cQ.W)({entityIds:[r],view:o?"live":"static",reason:l})),a=t[0];e((0,c$.CO)({key:n,isLoading:!1,object:a}))}catch{e((0,c$.CO)({key:n,isLoading:!1,object:{entity_id:i,status:"fail"}}))}}});function useGetEmbeddedTableauObject({entityKey:e,tableauObjectId:t,entityRefId:a,fetchIfMissing:n=!1,isLive:r=!1}){let i=(0,_.wA)(),l=(0,E.d4)(cz.nB),{object:o,isLoading:s=!1}=(0,E.d4)(t=>(0,cY.f)(t,{key:e}))||{},c=(0,h.useCallback)(async({ignoreCache:n,reason:o}={})=>{let s=(0,cK.Yi)(e);s&&(0,cK.cS)(s.tableau,l)&&!n?i((0,c$.CO)({key:e,isLoading:!1,object:s})):await i(cZ({entityKey:e,tableauObjectId:t,entityRefId:a,isLive:r,reason:o}))},[i,e,a,l,r,t]);return(0,h.useEffect)(()=>{o||s||!n||c()},[n,s,o,c]),(0,h.useEffect)(()=>{o?.status!=="success"||r||(0,cK.wQ)(e,o)},[e,r,o]),{object:o,isLoading:s,updateTableauObject:c}}cZ.meta={name:"fetchAndUpsertTableauEmbed",key:"createThunkFetchAndUpsertTableauEmbed",description:"Fetch tableau entity using tableau.embeds.list"};var cJ=a(0x5e152d00),cX=a(0xc8be17d1),c0=a(0x177c6bf9e),c1=a(0x207eb3801),c2=a(0xf5fd3bc8);let c4=new S.Ay("tableau"),c5={uiComponentVariant:"canvas"},EmbeddedTableauEntity=({workObject:e,channelId:t,messageTs:a,isPreview:n})=>{let{entity_id:r,link:i}=e,{embeddedUiData:l,slackFileId:o}=(0,h.useContext)(aS.N),s=(0,E.d4)(cz.Wy),c=(0,E.d4)(cz.d1),d=e.tableau?.lookup_params?.tableau_id??r,m=l?.getAssociatedEntityId()||"",u=(0,h.useRef)(null),p=s&&c&&!n&&(0,c1.PO)(e),_=(0,c2.N9)({canvasId:o,sectionId:m,tableauObjectId:d}),{object:b,isLoading:g,updateTableauObject:y}=useGetEmbeddedTableauObject({entityKey:_,tableauObjectId:d,entityRefId:r,fetchIfMissing:!1,isLive:p});(0,h.useEffect)(()=>{y({reason:"embedded-tableau-entity-init"})},[y]);let{status:A,tableau:x}=b||{},C=(0,cJ.G)(x,e.link);(0,h.useEffect)(()=>{if(!u.current)return;let e=new MutationObserver(()=>{let e=u.current?.querySelector("analytics-metric"),t=e?.children;t&&t.length>1&&t[0].remove()});return e.observe(u.current,{childList:!0,subtree:!0}),()=>e.disconnect()},[]),(0,h.useEffect)(()=>{if(!l)return;let e={name:x?.title??c4.t("Tableau {tableauType}",{tableauType:C}),type:c4.t("Tableau preview"),applyRemoteCaretBorderToCard:!0};l.performAction({action:f.EmbeddedUiAction.SYNC_METADATA,metadata:e})},[l,C,x?.title]);let k=[c0.UN.SUCCESS,c0.UN.FAIL],v=!g&&A&&k.includes(A),S=(0,h.useCallback)(async()=>{v&&await y({ignoreCache:!0,reason:"refresh-tableau-object-action"})},[v,y]);return h.createElement("div",{ref:u},h.createElement(cX.q,{tableauObjectId:d,entityRefId:r,link:i,tableau:x,isLive:p,fileContainerType:ri.zk.FILE_EMBEDDED_UNFURL,handleRefreshTableau:S,isLoading:g,status:A,entityKey:_,autoClogProps:c5,messageChannelId:t,messageTs:a,canvasId:o,sectionId:m}))};function useGetEmbeddedTableauWorkObject({entity:e,entityKey:t}){let a=(0,_.wA)(),{object:n,isLoading:r=!1}=(0,E.d4)(a=>(0,c1.qv)(e)&&t?(0,cY.f)(a,{key:t}):void 0)||{},i=(0,h.useCallback)(async({reason:n}={})=>{await a(cZ({entityKey:t,tableauObjectId:e?.entity_id,entityRefId:e?.entity_id,isLive:!1,reason:n}))},[a,e,t]);return(0,h.useEffect)(()=>{t&&!r&&!n&&(0,c1.qv)(e)&&i()},[e,t,i,r,n]),{getTableauExpandedWorkObjectLayout:i,isLoading:r,tableauEntity:n,updateTableauObject:i}}EmbeddedTableauEntity.displayName="EmbeddedTableauEntity";var c3=a(0x1052ca4f9),c6=a(0x9cfa8498),c8=a(0xbed542d2),c7=a(0x17635f0aa),c9=a(0x1c2a1a838),de=a(0x1c5116e43);let EmbeddedWorkObjectEntity=({entity:e,channelId:t,messageTs:a,isPreview:n})=>{let{embeddedUiData:r,slackFileId:i}=(0,h.useContext)(aS.N),l=(0,c2.N9)({canvasId:i,sectionId:r?.getAssociatedEntityId()||"",tableauObjectId:e?.entity_id}),{isLoading:o,tableauEntity:s,updateTableauObject:c}=useGetEmbeddedTableauWorkObject({entity:e,entityKey:l}),d=s?.work_object_entity,m=(0,E.d4)(t=>(0,c9.kO)(t,(0,c8.CK)(e.entity_id)?.salesforceOrgId)),u=(0,c1.qv)(e),{id:p,name:_}=(0,eu.uz)(m)?m:{},f=s?.status;return e&&(0,c1.XI)(e)?h.createElement(EmbeddedTableauEntity,{workObject:e,channelId:t,messageTs:a,isPreview:n}):u&&!o&&f!==c0.UN.SUCCESS?h.createElement("div",{className:"p-tableau_expanded_entity"},h.createElement(c3.i,{link:s?.link||"",source:de.Xv.Canvas,tableau:s?.tableau,status:f,salesforceOrgId:p||"",salesforceOrgName:_||""})):o&&u&&!d?h.createElement("div",{className:"p-tableau_expanded_entity"},h.createElement(c6.e,{tableau:void 0,link:e.external_url,isLoading:!0,tableauSubtype:void 0})):h.createElement("div",{className:j()({"p-tableau_expanded_entity":u})},h.createElement(c7.C,{entity:u&&d||e,source:de.Xv.Canvas,fileContainerType:ri.zk.FILE_EMBEDDED_UNFURL,channelId:t,ts:a,updateTableauObject:c,tableauStatus:f}))};EmbeddedWorkObjectEntity.displayName="EmbeddedWorkObjectEntity";var dt=a(0xcea4a81c),da=a(0x1d3ad9d8a),dn=a(0x22170ca89);function getUnfurlRecordLayout(e,t,a){let n=e.parent?{id:e.parent.id,sobject_api_name:e.parent.object_api_name,name:e.parent.name}:void 0,r=e.fields.reduce((e,t)=>{let n;return n=t.display_data_type===dn.ls.SlackUser&&t.reference?.slack_user_id?t.reference?.slack_user_id:t.data_type===dn.ls.Reference?t.display_value:"boolean"==typeof t.value?t.value?"true":"false":"number"==typeof t.value?t.value.toString():t.display_value,a?(t.api_name===a||t.label===a)&&e.push({label:t.label,type:t.display_data_type,value:n,html_formatted:t?.html_formatted,rich_text:t?.rich_text}):n&&e.push({label:t.label,type:t.display_data_type,value:n,html_formatted:t?.html_formatted,rich_text:t?.rich_text}),e},[]);return{org:e.org,external_url:e.external_url,restricted:!1,id:e.id,sobject_api_name:e.object_api_name,object_label:e.object_label,name:e.name,parent:n,fields:r,ts:t}}function SfdcRecordCard({recordId:e}){let t=(0,E.d4)(t=>(0,rr.PQ)(t,e,!0,n9.O,n9.N)),a=(0,E.d4)(e=>(0,rr.VY)(e,t?.id,n9.O,n9.N));if((0,n8.x6)(t))return h.createElement(da.l,{record:t});if((0,n8.Eh)(t))return h.createElement(EmbeddedFallbackUnfurl,{fileChannelMessage:null,isLoading:!0});let n=getUnfurlRecordLayout(t,a);return h.createElement(dt.a,{entityState:o1.w.enabled,size:o1.S.expanded,record:n,canvasStyling:!0})}function SfdcDataMentionCard({record:e,fieldLabel:t}){let a=(0,E.d4)(t=>(0,rr.VY)(t,e?.id,n9.O,n9.N));if((0,n8.x6)(e))return h.createElement(da.l,{record:e});if((0,n8.Eh)(e))return h.createElement(EmbeddedFallbackUnfurl,{fileChannelMessage:null,isLoading:!0});let n=getUnfurlRecordLayout(e,a,t);return h.createElement(dt.a,{entityState:o1.w.enabled,size:o1.S.expanded,record:n,showActionsBar:!1,isInteractive:!1,canvasStyling:!0})}SfdcRecordCard.displayName="SfdcRecordCard",SfdcDataMentionCard.displayName="SfdcDataMentionCard";let dr=SfdcRecordCard;var di=a(0x4165455);function Card({initialLoadTrace:e,fileId:t,isPreview:a}){let n,r,i,{windowRef:l}=(0,h.useContext)(K._0),{fileChannelMessage:o,firstEphemeralMessage:s,isUnfurlOrMessageObject:c,attachment:d,unfurledUrl:m,parsedPermalink:u,...p}=(0,nX.A)(),[_,f]=(0,h.useState)(!1);(0,h.useEffect)(()=>{let e,t=c&&p.unfurlType===nX.h.FALLBACK,a=0;if(o?.document_unfurl){let e=(0,nz.A)(o.ts);a=(0,nj.A)(new Date,e,{units:"minutes",useFractionalUnits:!0})}return t&&a>10?f(!0):t&&(e=l.deref()?.setTimeout(()=>{f(!0)},2e4)),()=>{e&&clearTimeout(e)}},[_,o,c,l,p.unfurlType]);let b=(0,E.d4)(nR.WR),g=(0,E.d4)(e=>"on"===(0,F._Z)(e,"widgets")),{unfurlType:y}=p,A=s?h.createElement(EphemeralMessageUnfurl,{message:s}):null;switch(y){case nX.h.FILE_UPLOAD:n=h.createElement(EmbeddedFileUnfurlPlaceholder,{placeholderDetails:p.placeholderDetails});break;case nX.h.FILE:({fileId:r}=p),n=h.createElement(h.Fragment,null,h.createElement(EmbeddedFileUnfurl,{id:r,hasEphemeralNotifications:!!s,channelId:p.fileChannelId,unfurlTimestamp:o?.ts??void 0,isLoading:p.isLoading,initialLoadTrace:e}),A);break;case nX.h.SLACK_LIST:{let{listFileId:e,viewId:t,isLoading:a}=p;r=e,n=h.createElement(cb,{fileId:e,viewId:t,isLoading:a});break}case nX.h.SLACK_LIST_RECORD:{let{listFileId:e,recordId:t}=p;r=e,n=h.createElement(cb,{fileId:e,recordId:t});break}case nX.h.CANVAS:{let{isLoading:e}=p;({fileId:r}=p),n=h.createElement(rE,{fileId:p.fileId,isLoading:e});break}case nX.h.USER:({memberId:i}=p),n=h.createElement(oq.A,{memberId:i,initialLoadTrace:e});break;case nX.h.GENERIC:n=h.createElement(EmbeddedGeneric,{id:p.genericId,fileId:t});break;case nX.h.WIDGET:n=g?h.createElement(EmbeddedWidget,{id:p.widgetId}):null;break;case nX.h.PLATFORM_LINK_TRIGGER:{let{shortcutBlock:e,fileChannelId:t,isLoading:a}=p;n=h.createElement(EmbeddedShortcutLinkUnfurl,{shortCutBlock:e,channelId:t,url:m,isLoading:a});break}case nX.h.SHORTCUT_BUTTON:{let{shortcut:e}=p;r=p.fileId,n=h.createElement(ShortcutButton,{actionId:e.id,channelId:e.channelId,theme:e.theme});break}case nX.h.MESSAGE:{let{isLoading:e,ts:t,channelId:a}=p;n=h.createElement(or.A,{unfurl:d,ts:t,channelId:a,isLoading:e,firstEphemeralMessage:s||void 0});break}case nX.h.EPHEMERAL_MESSAGE:n=A;break;case nX.h.PUBLIC_LINK:{let{isLoading:e}=p,t=d?{...(0,l4.A)(d)}:{};n=h.createElement(h.Fragment,null,h.createElement(l2.A,{...t,hasEphemeralNotifications:!!s,fileChannelMessage:o,isLoading:e}),A);break}case nX.h.FALLBACK:{let{isLoading:e}=p;n=_&&!d?h.createElement(rs.Ay,{fileChannelMessage:o}):h.createElement(h.Fragment,null,h.createElement(EmbeddedFallbackUnfurl,{unfurl:(0,l4.A)(d),fileChannelMessage:o,isLoading:e}),A);break}case nX.h.WORK_OBJECT:{let e=(0,di.n9)(d);n=e?h.createElement(EmbeddedWorkObjectEntity,{entity:e,channelId:o?.channel,messageTs:o?.ts,isPreview:a}):null;break}case nX.h.SALESFORCE_RECORD:{let{recordId:e}=p;n=h.createElement(dr,{recordId:e});break}case nX.h.SHARE_PROMPT_BUTTON:{let{promptBlock:e}=p;n=h.createElement(ShareEmbeddedPromptButton,{promptBlock:e});break}case nX.h.CHANNEL_SECTION:{let{channelSetBlock:e}=p;n=h.createElement(EmbeddedChannelSet,{channelSetBlock:e});break}case nX.h.EMPTY:default:{let e=o?.user===b,t=y===nX.h.EMPTY?p.unfurlErrorState:void 0;n=h.createElement(rs.Ay,{fileChannelMessage:o,errorState:t,isAuthorUser:e});let a=(0,c1._q)(m);a&&(n=h.createElement(rs.Ay,{fileChannelMessage:o,errorState:a}))}}return(0,rX.y)(e,`canvas:embedded_unfurl_${y.toString()}`,[o]),h.createElement(rp.A,null,h.createElement(CardContainer,{unfurlType:y,fileId:r,memberId:i},n))}function getGutterDisplayCount(e=0){return e>9?"9+":e}Card.displayName="Card";var dl=a(0x1f377a32f),ds=a(0x19ead61ce),dc=a(0x3fb00b9a);let dd=(0,e9.Ay)("Synchronize archive state for a thread ID",async(e,t,{fileId:a,message:n,isArchived:r})=>{let i=t();if(!n.channel||!n.thread_ts)return;if(!n)throw Error("Missing message for updateArchiveState");let l=n?.document_comment;if(!l)return;let o=await e((0,dc.A)({fileId:a,reason:"update-reply"}));await ds.h.get(i)?.synchronizeArchiveStateForThreadId(o,l.thread_id,r)&&e((0,dl.j)({channelId:n.channel,threadTs:n.thread_ts,reason:"synchronize-archive-state"}))});dd.meta={name:"synchronizeArchiveStateForThreadId",key:"createThunkSynchronizeArchiveStateForThreadId",description:"Synchronize archive state for a thread ID"};var dm=a(0x1fb2d2a87),du=a(0x250666a62),dp=a.n(du);let dh=new S.Ay("canvas");function CommentGutter({fileId:e,message:t,commentId:a,seen:n=!1,count:r}){let{docEmbed:i}=(0,h.useContext)(aS.N),l=(0,_.wA)(),o=i?.docEditor,s=(0,E.d4)(dm.to),c=(0,h.useCallback)(()=>{o?.openComment(a,"document-bubble",f.CommentUIContext.COMMENT)},[o,a]);if((0,h.useEffect)(()=>{l(dd({fileId:e,message:t,isArchived:t?.document_comment?.is_archived??!1}))},[t?.document_comment?.is_archived,l,t,e]),r<1||t?.document_comment?.is_archived)return null;let d=!n&&!(0,nf.zh)(t);return h.createElement(e$.Nm,{onClick:c,className:j()(dp().CommentGutter,{[dp().CommentGutterUnread]:d}),"aria-label":dh.t("View comments"),tabIndex:-1,"data-qa":"comment_gutter_button"},h.createElement("span",{className:j()(dp().CommentGutterIcon,"nudge_bottom_1",{[dp().CommentGutterIconDark]:s===n$.Sx.Dark})},h.createElement(w.Ah,{name:d?"threads-filled":"threads",inline:!0})),h.createElement("span",{className:dp().CommentGutterCount},getGutterDisplayCount(r)))}CommentGutter.displayName="CommentGutter";var d_=a(0xe1870af4),df=a(0x20ef3966f),db=a(0x6aeae8a3),dg=a(0x10a8a0371),dy=a(0x15009ef56),dA=a(0x22293baf1),dx=a(0xd897374a),dE=a(0x24364c335),dC=a(0x19ab18890),dk=a(0x1d37f5c8a),dv=a(0x162cd855d),dS=a(0x1beeaa71e),dI=a(0xf6191486),dw=a.n(dI);let dT=new S.Ay("canvas");function ReactionGutter({message:e}){let t=(0,dk.J)(e),a=(0,_.wA)(),n=(0,E.d4)(e=>(0,dS.bk)(e,t)),r=(0,E.d4)(e=>t?(0,dS.pK)(e,t):void 0),{windowId:i}=(0,h.useContext)(eM.A),l=(0,E.d4)(e=>(0,dv.A)(e,i)),o=(0,h.useCallback)(t=>l?null:h.createElement(dE.x,{popoverProps:t,message:e,source:"reaction-gutter"}),[e,l]),s=(0,dy.pg)(n??[]),c=(0,h.useCallback)(()=>n?h.createElement(dA.A,{reactions:n,showClickToRemove:!1,shouldTruncate:!0,showImportTip:!0,importReaction:s}):null,[n,s]),d=(0,h.useCallback)(e=>{e?.altKey||a((0,dg.a)({emojiName:s?.name,emojiUrl:s?.url,event:e}))},[a,s?.name,s?.url]);if(!n||n.length<1)return null;let m=(0,dx.A)({reactions:n}),u=(0,d_.A)(m,e=>e.count,"desc").slice(0,3),p=(0,df.A)(u,({reactions:e})=>{let t=e[0]?.name;return h.createElement(dC.Ay,{text:`:${t}:`,key:t,url:e[0]?.url,emojiSize:dC.lw.SMALL})});return h.createElement(db.Wv,{ariaLabel:dT.t("Canvas reactions"),ariaRole:"dialog",renderPopover:o,position:n$.yX.Left},h.createElement(as.Ay,{tip:c,maxWidth:"large"},h.createElement(e$.Nm,{className:dw().ReactionGutter,onContextMenu:s?d:void 0,"aria-label":dT.t("View reactions"),tabIndex:-1},p[0],p.length>1&&h.createElement("span",{className:dw().ReactionGutterOverflowEmojis},p.slice(1)),h.createElement("span",null,getGutterDisplayCount(r)))))}ReactionGutter.displayName="ReactionGutter";var dN=a(0x8976310b),dM=a(0x1c32a2ca1);function CommentReactionGutter({fileId:e,commentId:t,seen:a,count:n}){let{docEmbed:r}=(0,h.useContext)(aS.N),i=r?.docEditor,l=(0,sU.p)(e),o=(0,E.d4)(e=>(0,dN.r)(e,t)),s=(0,_.wA)(),c=(0,E.d4)(W.ZT);(0,h.useEffect)(()=>{!o&&c&&s((0,dM.P)({channelId:l,teamId:c,quipOrSlackCommentThreadId:t}))},[l,c,t,s,o]);let d=o?.threadTs,m=(0,E.d4)(e=>l&&d?(0,nv.Ld)(e,l,d):null),u=(0,h.useCallback)(()=>{i?.setCommentFocused(t,!0)},[i,t]),p=(0,h.useCallback)(()=>{i?.setCommentFocused(t,!1)},[i,t]);if(!m)return null;let f=m.reply_count||n||0;return h.createElement("div",{onMouseOver:u,onMouseLeave:p},h.createElement(CommentGutter,{fileId:e,message:m,commentId:t,seen:a,count:f}),h.createElement(ReactionGutter,{message:m}))}CommentReactionGutter.displayName="CommentReactionGutter";var dR=a(0x2286acf6c),dP=a(0x937b29a1),dL=a(0x108d007e0),dO=a(0x133521e32),dD=a(0x23a9df45f);let dF=[],dU={userIds:dF,channelIds:dF};function useChannelsAndUsersFromRichText(e){let{userIds:t,channelIds:a}=(0,h.useMemo)(()=>{if(!e)return dU;let t=[],a=[],appendIds=e=>{e.elements&&e.elements.forEach(e=>{e?.type&&((0,dD.H1)(e)?t.push(e.user_id):(0,dP.P9)(e)&&a.push(e.channel_id))})},n=e[0]?.elements;return n?(n.forEach(e=>{e&&e.type&&((0,dL.C)(e)?e.elements.forEach(e=>{appendIds(e)}):(0,dO.J)(e)&&appendIds(e))}),{userIds:t,channelIds:a}):dU},[e]);return{channelsFoundInTitle:(0,E.Z2)(e=>a?(0,eG.LO)(e,a):dF),membersFoundInTitle:(0,E.Z2)(e=>t?(0,n_.gA)(e,t):dF)}}var dB=a(0x11248a541),dH=a(0x1060f0c84);function CanvasObserver({fileId:e}){let t=(0,E.d4)(t=>(0,ep.Lp)(t,e)),a=(0,_.wA)(),n=(0,E.d4)(e=>(0,dH.k4)(e,t.id)??t.title_blocks),{channelsFoundInTitle:r,membersFoundInTitle:i}=useChannelsAndUsersFromRichText(n),l=(0,h.useMemo)(()=>{let t={type:f.SlackObjectType.DOCUMENT,id:e};return(0,dR.A)(()=>{a((0,dB.ry)({slackObjectStubs:[t]}))},300)},[a,e]);return(0,h.useEffect)(()=>{l()},[l,t.mode,t.file_access,t.name,t.show_badge,n,r,i]),null}function FileObserver({fileId:e}){let t=(0,E.d4)(t=>(0,ep.Lp)(t,e)),a=(0,_.wA)();return(0,h.useEffect)(()=>{let e={type:f.SlackObjectType.FILE,id:t.id};a((0,dB.ry)({slackObjectStubs:[e]}))},[a,t]),null}function ListObserver({listId:e,recordId:t}){let a=(0,E.d4)(t=>(0,ce.vS)(t,e)),n=(0,E.d4)(a=>t?(0,ce.ll)(a,e,t):null),r=n?.fields?.name,i=(0,_.wA)(),{channelsFoundInTitle:l,membersFoundInTitle:o}=useChannelsAndUsersFromRichText(r),s=(0,h.useMemo)(()=>{let a=[{type:f.SlackObjectType.LIST,id:e}];return t&&a.push({type:f.SlackObjectType.LIST_RECORD,id:t,listId:e}),(0,dR.A)(()=>{i((0,dB.ry)({slackObjectStubs:a}))},300)},[i,e,t]);return(0,h.useEffect)(()=>{s()},[s,a,n,l,o]),null}function MessageObserver({channelId:e,ts:t,fileChannelMessage:a}){let n=(0,E.d4)(a=>(0,nv.Ld)(a,e,t)),{embeddedUiData:r}=(0,h.useContext)(aS.N),i=(0,_.wA)(),l=r?.embeddedObject();return(0,h.useEffect)(()=>{l?.type===f.EmbeddedObjectType.SLACK_OBJECT&&i((0,dB.ry)({slackObjectStubs:[l.object]}))},[i,l,n,a]),null}var dW=a(0xd7b35c2f);function SfdcRecordObserver({recordId:e}){let t=(0,E.d4)(t=>(0,rr.PQ)(t,e,!0,dW.f,dW.i)),a=(0,_.wA)(),n=(0,h.useMemo)(()=>{let e={type:f.SlackObjectType.SALESFORCE_RECORD,id:t.id};return(0,dR.A)(()=>{a((0,dB.ry)({slackObjectStubs:[e]}))},300)},[a,t]);return(0,h.useEffect)(()=>{n()},[n,t]),null}function SlackObjectObserver(){let{fileChannelMessage:e,...t}=(0,nX.A)(),{unfurlType:a}=t;switch(a){case nX.h.MESSAGE:{let{ts:a,channelId:n}=t;return h.createElement(MessageObserver,{ts:a,channelId:n,fileChannelMessage:e})}case nX.h.CANVAS:{let{fileId:e}=t;return h.createElement(CanvasObserver,{fileId:e})}case nX.h.FILE:{let{fileId:e}=t;return h.createElement(FileObserver,{fileId:e})}case nX.h.SLACK_LIST:{let{listFileId:e}=t;return h.createElement(ListObserver,{listId:e})}case nX.h.SLACK_LIST_RECORD:{let{listFileId:e,recordId:a}=t;return h.createElement(ListObserver,{listId:e,recordId:a})}case nX.h.SALESFORCE_RECORD:{let{recordId:e}=t;return h.createElement(SfdcRecordObserver,{recordId:e})}default:return null}}SlackObjectObserver.displayName="SlackObjectObserver";var dV=a(0x13776886e),dG=a(0x77a36d88),dq=a(0xcbaa2b9f),dj=a(0x2416351a6),dz=a(0x24a401e2a),dK=a(0x21a1fb4fb),d$=a(0x22f8aaafa),dY=a.n(d$);let dQ=new S.Ay("slack_docs"),ReminderCustomModal=({defaultSelectTime:e,handleSubmit:t})=>{let a=(0,dz.Av)(),n=(0,_.wA)(),[r,i]=(0,h.useState)(e),l=(0,h.useCallback)(()=>n((0,e0.O)()),[n]),o=(0,h.useCallback)(e=>i(e),[i]),s=(0,h.useCallback)(()=>{t(r),l()},[r,t,l]),c=dQ.t("Reminder");return h.createElement(tk.dW,{closeModal:l,contentLabel:c,"aria-label":c},h.createElement(tk.rQ,null,h.createElement(tk.Rc,{title:c})),h.createElement(tk.$m,null,h.createElement(tk.qf,{className:dY().dateTimePicker},h.createElement(dK.Y,{currentTime:a,setCustomTime:o,customTime:r,"aria-label":c}))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(tk.s_,{type:"outline","data-qa":"canvas-date-picker-reminder-custom-modal-close-button","aria-label":dQ.t("Cancel")},dQ.t("Cancel")),h.createElement(e$.Ay,{type:"primary","data-qa":"canvas-date-picker-reminder-custom-modal-submit-button",onClick:s},dQ.t("Done")))))};ReminderCustomModal.displayName="ReminderCustomModal";var dZ=a(0xa77d37ea),dJ=a(0x6b2fa908),dX=a(0x22e21ba59),d0=a.n(dX);let d1=new S.Ay("files"),d2=[dZ.i.ON_DAY,dZ.i.ONE_DAY_BEFORE,dZ.i.TWO_DAYS_BEFORE,dZ.i.ONE_WEEK_BEFORE,dZ.i.CUSTOM];function ReminderOptions({referenceDate:e,referenceDateFormatted:t,effectiveDateDue:a,onDueDateSelect:n,className:r,focusOnMount:i,timezone:l}){let o=(0,_.wA)(),s=(0,h.useRef)(null),c=(0,E.d4)(e=>(0,ru.ty)(e,"dnd_enabled")),d=(0,E.d4)(e=>(0,ru.ty)(e,"dnd_end_hour")),m=(0,E.d4)(e=>(0,ru.ty)(e,"reminder_notification_time")),u=(0,E.d4)(e=>(0,ru.ty)(e,"time24")),[p,f]=(0,h.useState)(null),b=(0,h.useCallback)(e=>(0,dJ.WB)({time:e,dndEnabled:c,dndEndHour:d,reminderNotificationPref:m,fromDate:t}),[c,d,t,m]),g=(0,h.useMemo)(()=>new Map(d2.filter(e=>e!==dZ.i.CUSTOM).map(e=>[b(e),e])),[b]),y=(0,h.useMemo)(()=>(0,dj.A)(p)?a?g.has(a)?g.get(a):dZ.i.CUSTOM:null:p,[g,a,p]),A=y===dZ.i.CUSTOM;(0,h.useEffect)(()=>{y?A||n(b(y),!0):n(null)},[b,y,A,n]);let x=(0,h.useCallback)(e=>n(e),[n]),C=(0,h.useCallback)(({value:t})=>{f(t),(0,dj.A)(t)?n(null):t===dZ.i.CUSTOM&&o((0,ts.q)({element:h.createElement(ReminderCustomModal,{defaultSelectTime:a??e,handleSubmit:x})}))},[o,a,x,n,e]),k=new Map([[dZ.i.ON_DAY,d1.t("On selected date")],[dZ.i.ONE_DAY_BEFORE,d1.t("One day before")],[dZ.i.TWO_DAYS_BEFORE,d1.t("Two days before")],[dZ.i.ONE_WEEK_BEFORE,d1.t("One week before")],[dZ.i.CUSTOM,d1.t("Custom time\u2026")]]),v=d2.map(e=>({value:e,label:k.get(e)})),S=y?{value:y,label:k.get(y)}:null,I=(0,h.useCallback)(e=>a&&(0,dV.A)(a,"{status_expiration}",{do24hrTime:u,timezone:l}),[a,l,u]);return(0,ec.A)(()=>{i&&s.current?.focus()},[]),h.createElement(io.A,{text:d1.t("Remind me\u2026"),className:r},h.createElement(id.A,{buttonRef:s,selectId:"date-mention-reminder-options",placeholderText:d1.t("Choose date and time"),isRequired:!1,ariaLabel:d1.t("Remind me in Later"),options:v,selectedOption:S,renderSelectedOption:I,onOptionSelected:C,className:d0().reminderOptionsSelect,width:"100%"}))}ReminderOptions.displayName="ReminderOptions";var d4=a(0xf5bbd10a),d5=a(6922920),d3=a(0x131781841),d6=a(0x1b9ff23fe),d8=a(0x1de4133),d7=a(0xb8c5c3c3);let d9=(0,e9.Ay)("Add a reminder to a Canvas section",(e,t,{fileId:a,sectionId:n,dateDue:r,time:i,hasExistingReminder:l,richText:o})=>{let s=t(),c=(0,d6.dc)(s,(0,d7.cw)({fileId:a,sectionId:n})),d=(0,ep.Lp)(s,a);if(!d)return;let m=l||(0,U.LI)(d,n);i===dZ.i.CUSTOM?e((0,d3.A)({isMsgContext:!1,fileId:a,sectionId:n,file:d,item:c})):m&&r?e((0,d8.gE)({fileId:a,sectionId:n,dateDue:r,dateCompleted:0,isArchived:!1})):m&&!r?e((0,d8.$8)({fileId:a,sectionId:n})):r&&(o&&e((0,d5.Mv)({fileId:a,sectionId:n,richText:o})),e((0,d8.sS)({fileId:a,sectionId:n,dateDue:r})))});d9.meta={name:"addReminderToCanvasSection",key:"createThunkAddReminderToCanvasSection",description:"Add a reminder to a Canvas section"};var me=a(0x1ab870191),mt=a.n(me);let ma=new S.Ay("files"),mn="{date_num}",mr="YYYY-MM-DD";function EmbeddedDatePicker(){let e=(0,_.wA)(),{windowRef:t}=(0,h.useContext)(K._0),{embeddedUiData:a,slackFileId:n}=(0,h.useContext)(aS.N),{dateMentionId:r,dateMs:i,reminder:l}=a?.dateMentionProperties()??{},o=l&&!l.deleted,s=o?l.reminderMs:null,c=(0,d4.A)(),[d,m]=(0,h.useState)(i),[u,p]=(0,h.useState)(s?{ms:s}:null),b=(0,h.useMemo)(()=>d?(0,dV.A)(d,mn):null,[d]),g=(0,h.useMemo)(()=>{if(!u||!d)return null;let{ms:e,isRelative:t}=u;return t?d+e:e},[d,u]),y=(0,h.useCallback)(()=>a?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER}),[a]),A=(0,h.useCallback)(()=>{if(a?.performAction({action:f.EmbeddedUiAction.SET_DATE_MS,dateMs:d,hasReminder:!!g}),y(),n&&r){let t,i=a?.focusedSectionRichText();if(i)try{t=JSON.parse(i).blocks[0]}catch(e){c.warn("QUIP",`Could not parse reminded section snippet for date mention ${r}`)}e(d9({fileId:n,sectionId:r,dateDue:g?g/1e3:void 0,hasExistingReminder:!!o,richText:t}))}},[r,d,y,e,g,a,n,o,c]),x=(0,h.useCallback)(e=>{m((0,dG.A)(e,mr).toDate().getTime())},[]),E=(0,h.useCallback)((e,t)=>{if(e&&d){let a=1e3*e,n=t?a-d:a;p(e?{ms:n,isRelative:t}:null)}else p(null)},[d]),C=(0,h.useCallback)(e=>{let{target:a}=e,n=t.deref();n&&a instanceof n.self.Element&&a.closest(`.${mt().calendar} td`)&&A()},[t,A]);if(!d||!b||!r)return null;let k=h.createElement(ReminderOptions,{referenceDate:Math.floor(d/1e3),referenceDateFormatted:b,effectiveDateDue:g&&g/1e3,onDueDateSelect:E,className:mt().reminderOptions}),v=h.createElement("div",{className:mt().footer},h.createElement(r5.Ay,{type:"outline","data-qa":"canvas-date-picker-close-button",onClick:y},ma.t("Cancel",{fallbackHash:"77dfd2135f4db726c47299bb55be26f7f4525a46",fallbackHashNs:"slack_docs"})),h.createElement(r5.Ay,{type:"primary","data-qa":"canvas-date-picker-save-button",onClick:A},ma.t("Save",{fallbackHash:"efc007a393f66cdb14d57d385822a3d9e36ef873",fallbackHashNs:"slack_docs"})));return h.createElement("div",{className:mt().wrapperModal,role:"dialog","aria-modal":!0,"aria-label":ma.t("Date and reminder options",{fallbackHash:"6bf5da9c080bee3a8142586c412aa39971137eee",fallbackHashNs:"view_options_menu"}),onDoubleClick:C},h.createElement(dq.A,{className:mt().calendar,selectedDate:b,dateFormat:mr,onDateChange:x,onEscapeKeyDown:y,setDateOnEnterKeyDown:!0,focusOnMount:!0}),k,v)}EmbeddedDatePicker.displayName="EmbeddedDatePicker";let mi=EmbeddedDatePicker;var ml=a(0x1babfc083);function EphemeralMessageModalTrigger(){let{slackFileId:e}=(0,h.useContext)(aS.N),{firstEphemeralMessage:t}=(0,nX.A)();return(0,ml.x)({fileId:e||"",message:t}),null}let mo=new S.Ay("slack-docs");function EmbeddedHeaderImagePlaceholder({pendingFileId:e,loading:t}){let a=(0,E.d4)(t=>(0,ie.Oq)(t,{pendingFileId:e??""}));if("image"===(0,r8.x2)({pendingUpload:a})||t){let e=t?null:(0,r8.F_)(a);return e&&"image"===e.type?h.createElement("div",{className:"p-embedded_header_image_pending_file__container"},h.createElement("img",{className:j()({"c-pending_files__thumbnail--pending":!!a}),src:e.thumbnail,alt:e.alt}),h.createElement(r6.A,{pendingFileId:e.id||"",position:"center"})):h.createElement("div",null,h.createElement(r3.A,{color:"white",size:"jumbo",className:j()("c-pending_files__spinner","c-pending_files__spinner--center")}))}let n=mo.t("Unable to load the image",{fallbackHash:"bee54c9cc30c539ab2ed15c0c936e055cf8ef67e"});return h.createElement("div",{className:"p-embedded_header_image_placeholder","data-qa":"embedded_header_image_placeholder"},h.createElement("div",{className:"p-embedded_header_image_placeholder__body"},h.createElement("div",null,h.createElement("span",{className:"p-embedded_header_image_placeholder__title"},n))))}EmbeddedHeaderImagePlaceholder.displayName="EmbeddedHeaderImagePlaceholder";let ms=EmbeddedHeaderImagePlaceholder;var mc=a(0x1e51d9405);function EmbeddedHeaderImageFile({fileId:e,...t}){let a=(0,E.d4)(t=>(0,ep.Lp)(t,e)),n=(0,E.d4)(e=>!(0,ru.ty)(e,"a11y_animations"));if(!(0,U.c4)(a)&&!(0,U.Vx)(a)&&"image"===(0,r1.t)(a)){let e=(0,U.N7)(a,{suppressAnimations:n}),r=(0,U.PY)(a);if(e)return h.createElement(mc.A,{src:e,fallbackSrc:r??void 0,alt:a.alt_txt??"","data-qa":"embedded_header_image__img--file",blurFallback:!0,...t})}return h.createElement(ms,{loading:(0,rg.A)(a)})}EmbeddedHeaderImageFile.displayName="EmbeddedHeaderImageFile";let md=EmbeddedHeaderImageFile;function EmbeddedHeaderImageSlackImage({headerImage:e,...t}){return h.createElement(mc.A,{src:e.url,fallbackSrc:e.previewUrl,alt:e.name??e.id,"data-qa":"embedded_header_image__img--slack_image",...t})}EmbeddedHeaderImageSlackImage.displayName="EmbeddedHeaderImageSlackImage";let mm=new S.Ay("slack_docs"),EmbeddedQuipHeaderImageEmptyState=({onClick:e,buttonLeftOffset:t})=>{let[a,n]=(0,h.useState)(!1),r=(0,h.useCallback)(()=>{n(!0)},[n]),i=(0,h.useCallback)(()=>{n(!1)},[n]),l=(0,h.useMemo)(()=>({marginLeft:t}),[t]);return h.createElement("div",{className:j()("p-quip_header_image_empty_state",{"is-hovered":a})},h.createElement(e$.Ay,{type:"outline",size:"small",className:"p-quip_header_image_empty_state__button",onClick:e,onMouseEnter:r,onMouseLeave:i,style:l,"data-qa":"quip_header_image_empty_state__button"},h.createElement(w.Ah,{name:"image-input",size:"16"}),h.createElement("span",null,mm.t("Add cover"))))};EmbeddedQuipHeaderImageEmptyState.displayName="EmbeddedQuipHeaderImageEmptyState";var mu=a(0x889e21de),mp=a(0xaeced49c),mh=a(0xd14e9da7),m_=a(0x198fc3d17);function EmbeddedHeaderImage(){let{embeddedUiData:e,docEmbed:t,inChannelCanvas:a}=(0,h.useContext)(aS.N),n=e?.embeddedObject(),r=(0,_.wA)(),i=(0,E.d4)(eH.U6),l=n&&n.type===f.EmbeddedObjectType.HEADER&&(n.object?.type===f.SlackObjectType.BACKGROUND||n.object?.type===f.SlackObjectType.HEADER_IMAGE),o=(0,E.d4)(e=>(0,mh.O8)(e)),s=(0,E.d4)(e=>(0,mh.UY)(e));(0,h.useEffect)(()=>{l&&r((0,m_.w)())},[l,r]);let c=(0,h.useCallback)(()=>{t?.docEditor&&r((0,mu.j)({docEditor:t.docEditor,source:mp.in.TITLE_HOVER_BUTTON}))},[t,r]);if(n?.type!==f.EmbeddedObjectType.HEADER)return null;let{object:d,leftOffset:m,verticalPosition:u}=n;if(!d)return!a||a&&i?h.createElement(EmbeddedQuipHeaderImageEmptyState,{onClick:c,buttonLeftOffset:m}):null;let p=(0,mp.d5)(u),b=h.createElement(ms,null);if(d.type===f.SlackObjectType.PENDING_URL)b=h.createElement(ms,d.placeholderDetails);else if(d.type===f.SlackObjectType.FILE)b=h.createElement(md,{fileId:d.id,style:p});else if(d.type===f.SlackObjectType.BACKGROUND||f.SlackObjectType.HEADER_IMAGE){let{id:e}=d,t=o.find(t=>t.id===e);b=t?h.createElement(EmbeddedHeaderImageSlackImage,{headerImage:t,style:p}):h.createElement(ms,{loading:!s})}return h.createElement("div",{className:"p-embedded_header_image"},b)}EmbeddedHeaderImage.displayName="EmbeddedHeaderImage";let mf=EmbeddedHeaderImage;var mb=a(0x24573b3ff);let mg=new S.Ay("slack_docs"),QuipHeaderImagePickerLibrary=({selectedHeaderImage:e,updateSelectedHeaderImage:t,onCancel:a,onRemove:n,onSave:r})=>{let i=(0,mp.fI)(),l=(0,h.useCallback)(e=>()=>{t(e)},[t]),o=(0,h.useCallback)(t=>h.createElement("label",{className:j()("p-quip_header_image_picker__control",{"is-active":t===e}),htmlFor:t.id,key:t.id},h.createElement("span",{className:"sr-only"},t.name||`${mg.t("Cover image")} ${t.id}`),h.createElement("input",{className:"",type:"radio",name:"library-picker",id:t.id,value:t.id,onChange:l(t)}),h.createElement("img",{src:t.previewUrl,alt:""})),[e,l]);return h.createElement("div",{className:"p-quip_header_image_picker__tab_content"},i.length?h.createElement("div",{className:"p-quip_header_image_picker__tab_content__body p-quip_header_image_picker__tab_content__body--scrolling"},h.createElement("legend",{className:"sr-only"},mg.t("Choose a cover image")),i.map(e=>o(e))):h.createElement("div",{className:"p-quip_header_image_picker__tab_content__body"},h.createElement(r3.A,{className:"p-quip_header_image_picker__loading_spinner","loading-message":mg.t("Loading\u2026")})),h.createElement("div",{className:"p-quip_header_image_picker__tab_content__footer"},n&&h.createElement(e$.Nm,{onClick:n,className:"p-quip_header_image_picker__button--remove"},mg.t("Remove cover")),h.createElement(e$.Ay,{className:"margin_right_50",type:"outline",size:"small",onClick:a},mg.t("Cancel")),h.createElement(e$.Ay,{size:"small",onClick:r,disabled:!e},mg.t("Save"))))};QuipHeaderImagePickerLibrary.displayName="QuipHeaderImagePickerLibrary";var my=a(0x21f3c49e8),mA=a(0x4df01f17),mx=a(0x238fce7d5),mE=a(0x114a9d369),mC=a(0x24083f639);let mk=new S.Ay("slack_docs"),MessagePlaceholder=()=>h.createElement("div",{className:"p-quip_header_image_picker__upload_drag_overlay__message_placeholder"},h.createElement(mA.A,{width:14,height:14,borderRadius:4}),h.createElement(mA.A,{width:96,height:6,borderRadius:3}),h.createElement(mA.A,{width:48,height:6,borderRadius:3}));MessagePlaceholder.displayName="MessagePlaceholder";let QuipHeaderImagePickerUpload=({onFileUpload:e})=>{let t=(0,h.useRef)(null),a=(0,h.useRef)(null),n=(0,h.useRef)(new Set),[r,i]=(0,h.useState)(!1),l=(0,_.wA)(),o=(0,h.useCallback)(t=>{t.preventDefault(),i(!1),n.current?.clear();let a=t.dataTransfer?.files[0];a&&(t.stopImmediatePropagation(),(0,mp.cP)(a.name)?e(a):l((0,mC.A)({error:mE.R.CanvasHeaderImageUnsupportedFileType})))},[e,l]);(0,h.useEffect)(()=>{let e=a.current,t=n.current,onDragEnter=e=>{(0,mx.A)(e)||(e.preventDefault(),t?.add(e.target),t?.size===1&&i(!0))},onDragLeave=e=>{e.preventDefault(),t?.delete(e.target),t?.size===0&&i(!1)},onDragOver=e=>{(0,mx.A)(e)||e.preventDefault()},onDragEnd=()=>{i(!1),t?.clear()};return e?.addEventListener("dragenter",onDragEnter),e?.addEventListener("dragleave",onDragLeave),e?.addEventListener("dragover",onDragOver),e?.addEventListener("dragend",onDragEnd),e?.addEventListener("drop",o),()=>{e?.removeEventListener("dragenter",onDragEnter),e?.removeEventListener("dragleave",onDragLeave),e?.removeEventListener("dragover",onDragOver),e?.removeEventListener("dragend",onDragEnd),e?.removeEventListener("drop",o)}},[o]);let s=(0,h.useCallback)(()=>{if(t.current){let e;t.current.accept=(e="image/",0===mp.Gz.size?`${e}*`:Array.from(mp.Gz).map(t=>e+t).join(", ")),t?.current?.click()}},[t]),c=(0,h.useCallback)(t=>{(0,my.A)(t)||e(t[0])},[e]);return h.createElement("div",{className:"p-quip_header_image_picker__tab_content"},h.createElement("div",{className:"p-quip_header_image_picker__tab_content__body",ref:a},h.createElement("div",{className:j()("p-quip_header_image_picker__upload",{"p-quip_header_image_picker__upload--active":r})},r?h.createElement(h.Fragment,null,h.createElement(MessagePlaceholder,null),h.createElement("div",{className:"p-quip_header_image_picker__upload_drag_overlay__icon"}),h.createElement(MessagePlaceholder,null),h.createElement("h2",{className:"p-quip_header_image_picker__upload_title p-quip_header_image_picker__upload_title--dragging"},mk.t("Upload to cover image"))):h.createElement(h.Fragment,null,h.createElement("span",{className:"p-quip_header_image_picker__upload_icon"},h.createElement(w.Ah,{name:"image-input"})),h.createElement("h2",{className:"p-quip_header_image_picker__upload_title"},mk.t("Upload an image")),h.createElement("p",{className:"p-quip_header_image_picker__upload_description"},mk.t("Images larger than 100kb work best.")),h.createElement(tH.A,{ref:t,onFilesSelectedHandler:c,multiple:!1}),h.createElement(e$.Ay,{type:"outline",onClick:s},mk.t("Upload"))))))};QuipHeaderImagePickerUpload.displayName="QuipHeaderImagePickerUpload";let mv=new S.Ay("slack_docs"),QuipHeaderImagePicker=e=>{let{onRemove:t,onCancel:a,onFileUpload:n,onHeaderImageSelected:r,onHeaderImageSave:i,fileUploadDisabled:l=!1}=e,o=(0,h.useRef)(null);(0,h.useEffect)(()=>{o.current&&o.current?.focus()},[o]);let[s,c]=(0,h.useState)(),d=(0,h.useCallback)(e=>{c(e),r(e)},[r]),m=(0,h.useCallback)(()=>{s&&i(s)},[s,i]),u=(0,h.useMemo)(()=>{let e=[{title:mv.t("Library"),id:"library",content:h.createElement(QuipHeaderImagePickerLibrary,{selectedHeaderImage:s,updateSelectedHeaderImage:d,onRemove:t,onCancel:a,onSave:m})}];return l||e.push({title:mv.t("Upload"),id:"upload",content:h.createElement(QuipHeaderImagePickerUpload,{onFileUpload:n})}),e},[s,d,n,l,t,a,m]);return h.createElement(mb.A,{ref:o,className:"p-quip_header_image_picker",tabs:u})};QuipHeaderImagePicker.displayName="QuipHeaderImagePicker";var mS=a(0x9b7b6ba5);let EmbeddedHeaderImagePicker=({fileChannelId:e,onUploadStart:t,onUploadEnd:a})=>{let{embeddedUiData:n}=(0,h.useContext)(aS.N),r=(0,E.d4)(t=>(0,mS.O)(t,e)),i=(0,h.useCallback)(e=>{n?.performAction({action:f.EmbeddedUiAction.SAVE_HEADER_IMAGE,image:{type:f.SlackObjectType.HEADER_IMAGE,id:e.id}})},[n]),l=(0,h.useCallback)(e=>{n?.performAction({action:f.EmbeddedUiAction.PREVIEW_HEADER_IMAGE,image:{type:f.SlackObjectType.HEADER_IMAGE,id:e.id}})},[n]),o=(0,h.useCallback)(()=>{a(),n?.performAction({action:f.EmbeddedUiAction.CANCEL_HEADER_IMAGE})},[n,a]),s=(0,h.useCallback)(e=>{if(r)return;let a={type:f.SlackObjectType.FILE,id:"",altText:"",name:e.name||"",mimeType:e.type,sourceFile:e};t(),n?.performAction({action:f.EmbeddedUiAction.SAVE_HEADER_IMAGE,image:a})},[r,n,t]),c=(0,h.useCallback)(()=>{n?.performAction({action:f.EmbeddedUiAction.SAVE_HEADER_IMAGE,image:null})},[n]);return h.createElement(QuipHeaderImagePicker,{onHeaderImageSelected:l,onFileUpload:s,onRemove:c,fileUploadDisabled:r,onCancel:o,onHeaderImageSave:i})};EmbeddedHeaderImagePicker.displayName="EmbeddedHeaderImagePicker";var mI=a(0x7729d35b);let mw=new S.Ay("embedded_unfurl_in_hovercard");function MenuTriggerButton({onEditLinkSelected:e,className:t}){let{embeddedUiData:a}=(0,h.useContext)(aS.N),n=(0,h.useCallback)(t=>h.createElement(nJ.A,{menuProps:t,onEditLinkSelected:e}),[e]),r=(0,h.useCallback)(()=>{a?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:f.CollabPopoverDismissSource.ANY})},[a]),i=(0,h.useCallback)(()=>{a?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[a]);return h.createElement(aT.cQ,{renderMenu:n,position:"right-bottom",onClick:r,onPopoverClose:i,onTriggerClose:i,onMenuItemSelected:i,preventScroll:!0,"data-qa":"embedded-hovercard-menu-trigger"},h.createElement(as.Ay,{position:"top",delay:as.n1,tip:mw.t("More actions",{fallbackHash:"a1e34f91579d0900384176f8a467bf688034f1ee",fallbackHashNs:"classic-unfurl"}),hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":"more",className:t},h.createElement(w.Ah,{name:"ellipsis-vertical-filled",size:"16"}))))}MenuTriggerButton.displayName="MenuTriggerButton";let mT=MenuTriggerButton;function HovercardContainer({header:e,children:t,className:a,hideMenu:n}){return h.createElement("div",{className:j()("p-embedded_hovercard_container",a)},h.createElement("div",{className:"p-embedded_hovercard__top"},e,!n&&h.createElement(mT,{className:"p-embedded_hovercard__top__button"})),t)}HovercardContainer.displayName="HovercardContainer";var mN=a(0x5fcdd233),mM=a(0x1f28bdc18),mR=a(0x121459a2),mP=a(0x6960d8b9),mL=a(0xd43a69c2),mO=a(0x6de811be),mD=a.n(mO);let mF=new S.Ay("slack_docs");var mU=((m=mU||{}).BUTTONS="buttons",m.REMINDER_OPTIONS="reminder_options",m);function DateHovercard(){let{embeddedUiData:e,slackFileId:t}=(0,h.useContext)(aS.N),a=(0,E.d4)(d6._q),[n,r]=(0,h.useState)("buttons"),{dateMs:i,reminder:l,dateMentionId:o}=e?.datePickerOptions()??{},s=(0,h.useMemo)(()=>i?(0,mP.Yq)(i,mn):null,[i]),c=(0,h.useMemo)(()=>!!l&&!l.deleted,[l]),d=(0,_.wA)(),m=(0,d4.A)(),u=(0,h.useCallback)(()=>{e?.performAction({action:f.EmbeddedUiAction.OPEN_POPOVER})},[e]),p=(0,h.useCallback)(()=>r("reminder_options"),[]),b=(0,h.useMemo)(()=>a.find(e=>e.itemType===mR.ll.canvas_section&&e.sectionId===o)??null,[o,a]),g=(0,h.useCallback)(e=>d((0,mL.A)({item:e})),[d]),y=(0,h.useCallback)(({className:e})=>h.createElement("div",{className:j()(e,mD().dateIconContainer)},h.createElement(mI.A,{entityState:o1.w.enabled,suppressDefaultColors:!0},h.createElement(w.Ah,{name:"calendar",size:"20"}))),[]),A=(0,h.useMemo)(()=>i&&h.createElement(iH.CG,{className:j()(mD().dateEntityText)},(0,mP.Yq)(i,"{date_long}")),[i]),x=(0,h.useMemo)(()=>{if(b?.dateDue){let e=(0,mM.JL)(b),t=(0,mN.mk)(b.dateDue,!0,e);return h.createElement("div",{className:j()(mD().dateReminderTextContent)},h.createElement(w.Ah,{name:"clock",size:"20"}),h.createElement("span",{className:mD().dateReminderText},t))}return null},[b]),C=(0,h.useMemo)(()=>b?()=>g(b):p,[p,g,b]),k=(0,h.useCallback)(async a=>{let n;if(!t||!o||!a||!i)return;let l=e?.focusedSectionRichText();if(l)try{n=JSON.parse(l).blocks[0]}catch{m.warn("QUIP",`Could not parse reminded section snippet for date mention ${o}`)}await d(d9({fileId:t,dateDue:a,sectionId:o,hasExistingReminder:!!c,richText:n})),r("buttons")},[t,o,i,e,d,c,m]);(0,h.useEffect)(()=>{"reminder_options"===n?e?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:f.CollabPopoverDismissSource.ON_MOUSE_LEAVE}):e?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[e,n]);let renderHovercardButton=(e,t)=>h.createElement(e$.Ay,{size:"small",type:"outline",onClick:t},h.createElement("span",{className:mD().buttonContents},e)),v=null;if("reminder_options"===n&&i&&s)v=h.createElement(ReminderOptions,{referenceDate:Math.floor(i/1e3),referenceDateFormatted:s,effectiveDateDue:null,onDueDateSelect:k,className:mD().reminderOptions,focusOnMount:!0});else if("buttons"===n){let e=b?mF.t("Mark Complete"):mF.t("Add Reminder");v=h.createElement("div",{className:mD().dateButtonContainer},renderHovercardButton(e,C),renderHovercardButton(mF.t("Edit Date"),u))}let S=h.createElement(iH.Ay,{size:"medium",avatar:y,text:A});return h.createElement(HovercardContainer,{className:j()(mD().hovercardContainer,"p-embedded_unfurl_hovercard"),header:S,hideMenu:!0},h.createElement("div",{className:"p-embedded_unfurl_hovercard__preview"},x,v))}DateHovercard.displayName="DateHovercard";let mB=DateHovercard;var mH=a(0x2380341f5),mW=a(0x16ac9b089),mV=a(0x3796a18c),mG=a(0x1535e80f3),mq=a(0x1c659cbb1);let mj=new S.Ay("quip");function HovercardLastEditedFooter({file:e,lastEditedUserId:t,lastEditedTime:a,blocks:n}){let r=(0,E.d4)(e=>(0,n_.nv)(e,t)),i=(0,tK.jc)(r)||"",l=(0,E.d4)(e=>(0,tK.fy)(r)?mj.t("you"):(0,tY.sE)(e,r));if(!r||(0,U.sR)(e))return null;let o={className:j()("p-embedded_unfurl_hovercard__last_editor_banner",{"p-embedded_unfurl_hovercard__last_editor_banner--no_preview":(0,U.DQ)(e)&&(!n||!n.length)}),size:mG.ny.medium};return r&&i&&(o.avatar=e=>h.createElement(mq.f1,{...e,imageUrl:i,isInteractive:!1})),o.text=h.createElement(iH.CG,null,mj.t("Edited by {memberName} {date}",{memberName:l,date:a})),h.createElement(iH.Ay,o)}HovercardLastEditedFooter.displayName="HovercardLastEditedFooter";var mz=a(0xf8c5d1b5),mK=a(0x3271b95e);function CanvasHovercard({fileId:e,header:t,sectionId:a}){let n=(0,E.d4)(t=>(0,ep.Lp)(t,e)),{embeddedUiData:r}=(0,h.useContext)(aS.N),i=(0,E.d4)(aE.N6),l=r?.isSlackCitation()&&i,o=(0,mz.A)(e),s=(0,mK.A)(e),c=(0,mW.Ay)((0,mH.A)(o,{alwaysAgo:!0})),d=(0,rb.Lz)({fileId:e,hideTitle:!0,sectionId:a}),m=(0,h.useMemo)(()=>h.createElement(oz.A,{file:n,id:e,detailType:mV.s.OWNER,forceIconThumbnail:!0,allowLiveTitle:!0,"data-qa":"medium-canvas-entity"}),[n,e]),u=(0,h.useMemo)(()=>t||m,[m,t]);if((0,U.sR)(n))return h.createElement(ro.o,{file:n,inHovercard:!0});if(n&&!(0,U.ZG)(n))return h.createElement(QuipDeletedState,{file:n});let p=!(0,U.uO)(n)&&!(0,rg.A)(n);return h.createElement(HovercardContainer,{header:u,hideMenu:(0,U.c4)(n)||!!t,className:l?"p-embedded_unfurl_hovercard__enhanced":"p-embedded_unfurl_hovercard"},h.createElement(h.Fragment,null,!!t&&m,h.createElement(rb.Ay,{fileId:e,hideTitle:!0,containerClassName:"p-embedded_unfurl_hovercard__preview",sectionId:a}),!l&&p&&h.createElement(HovercardLastEditedFooter,{blocks:d,file:n,lastEditedUserId:s,lastEditedTime:c})))}CanvasHovercard.displayName="CanvasHovercard";var m$=a(0x1dca9a530),mY=a(0x123e28e02),mQ=a(0x19add9947),mZ=a.n(mQ);function ChannelHovercard({channelId:e,header:t}){let a=(0,E.d4)(t=>(0,eG.OL)(t,e)),n=(0,E.d4)(t=>{let a=(0,a$.q8)(t,e);return a?.counts.member_count}),r=(0,aj.bl)(a),i=(0,h.useMemo)(()=>h.createElement(mY.A,{memberCount:n,channel:a,isChannelMember:r}),[a,r,n]),l=(0,h.useMemo)(()=>h.createElement(m$.A,{channel:a,showUnreadBadge:!0,showPurpose:!1,metadata:i,showTeam:!0,className:mZ().channel_entity}),[a,i]),o=(0,h.useMemo)(()=>t||l,[l,t]);return h.createElement(HovercardContainer,{header:o,hideMenu:!!t},h.createElement(h.Fragment,null,!!t&&l))}ChannelHovercard.displayName="ChannelHovercard";var mJ=a(0x1d08e7031),mX=a(0x1cb09d483),m0=a(0x1376f3e6),m1=a(0x1d9627ee3),m2=a(0x148efa02a),m4=a(0x108b445e9),m5=a(0x709dda87);let m3=new S.Ay("files");function FileHovercard({fileId:e,header:t}){let a=(0,_.wA)(),n=(0,E.d4)(t=>(0,ep.Lp)(t,e)),r=(0,E.d4)(e=>!(0,ru.ty)(e,"a11y_animations")),i=(0,U.mN)(n,{suppressAnimations:r}),{embeddedUiData:l}=(0,h.useContext)(aS.N),o=(0,E.d4)(nR.WR),s=n?.user||o,c=(0,m2.ml)(s),d=(0,h.useCallback)(()=>{a((0,m1.A)({fileId:e})),l?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER})},[a,l,e]),m=(0,h.useMemo)(()=>i?h.createElement(mJ.A,{src:i,className:"p-embedded_file_hovercard__preview","data-qa":"embedded-thumbnail-preview"}):(0,U._y)(n)||(0,m4.A)(n)?h.createElement(m0.A,{file:n,className:"p-embedded_file_hovercard__media_preview",onClick:d,"data-qa":"embedded-thumbnail-media-preview"}):(0,U.pI)(n)?h.createElement(e$.Nm,{onClick:d,className:"p-embedded_file_hovercard__audio_preview","data-qa":"embedded-thumbnail-audio-preview"},h.createElement("div",{className:"p-embedded_file_hovercard__audio_preview__thumb",style:{backgroundColor:(0,m5.Ko)(c,.2)}},h.createElement(mX.A,{color:c,className:"p-embedded_file_hovercard__audio_preview__thumb__waves"})),h.createElement("div",{className:"p-embedded_file_hovercard__audio_preview__play_icon"},h.createElement(w.Ah,{name:"play-filled"}))):null,[c,n,d,i]),u=(0,h.useMemo)(()=>h.createElement(oz.A,{file:n,id:e,detailType:mV.s.OWNER,forceIconThumbnail:!0,"data-qa":"medium-file-entity"}),[n,e]),p=(0,h.useMemo)(()=>t||u,[u,t]),b=(0,U.VP)(n),g=(b&&(0,mP.Od)(b,{shortenMonth:!0}))??void 0,y=!(0,U.uO)(n)&&!(0,rg.A)(n);return h.createElement(HovercardContainer,{header:p,hideMenu:(0,U.c4)(n)||!!t,className:"p-embedded_file_hovercard"},h.createElement(h.Fragment,null,!!t&&u,m,y&&h.createElement("div",{className:"p-embedded_file_hovercard__timestamp","data-qa":"embedded-hovercard-timestamp"},h.createElement("span",null,m3.t("Created on {date} at {time}",{date:g,time:(b&&(0,mP.Yq)(b,"{time}",{do24hrTime:!1}))??void 0,fallbackHash:"870984ddc44df333bd961660edd06c825bfedad0",fallbackHashNs:"file"})))))}FileHovercard.displayName="FileHovercard";var m6=a(0x14d6d0bb8);function GroupHovercard({groupId:e,header:t}){let a=(0,h.useMemo)(()=>h.createElement(m6.A,{id:e}),[e]);return h.createElement(HovercardContainer,{header:t,hideMenu:!0},a)}GroupHovercard.displayName="GroupHovercard";var m8=a(0x187063a6e),m7=a(0xd397dcb5),m9=a(0x9c690390);let ConnectedRecordEntityExpandedPreview=e=>{let{noTopBorder:t,noPadding:a,...n}=e,r=(0,m7.A)(n);return h.createElement(m9.A,{...r,noTopBorder:t,noPadding:a})};ConnectedRecordEntityExpandedPreview.displayName="ConnectedRecordEntityExpandedPreview";let ue=h.memo(ConnectedRecordEntityExpandedPreview);var ut=a(0x20005055e),ua=a(0x8260e60b);function ListHovercard({listId:e,viewId:t,recordId:a,header:n}){let r=(0,E.d4)(t=>(0,ep.Lp)(t,e)),i=r.last_editor||void 0,l=r.updated||void 0,o=(0,mP.$4)(l,{returnMoment:!0}),s=(0,mW.Ay)((0,mP.YY)(o,{alwaysAgo:!0})),c=(0,m7.A)({file:r,listViewId:t,listRecordId:a,size:o1.S.expanded,isRemovable:!1}),d=(0,h.useMemo)(()=>{let e={listUnfurlLabelProps:c.listUnfurlLabelProps,listEntityType:a?ua.F.record:ua.F.list,entityState:o1.w.enabled,onClick:b.A,isRemovable:!1,noPadding:!0};return h.createElement(ut.A,e)},[c.listUnfurlLabelProps,a]),m=(0,h.useMemo)(()=>n||d,[d,n]);if((0,U.sR)(r))return h.createElement(ro.o,{file:r,inHovercard:!0});let u=!(0,U.uO)(r)&&!(0,rg.A)(r);return h.createElement(HovercardContainer,{header:m,className:"p-embedded_unfurl_hovercard",hideMenu:!!n},h.createElement(h.Fragment,null,!!n&&d,h.createElement("div",{className:"p-embedded_unfurl_hovercard__preview"},a?h.createElement(ue,{file:r,listRecordId:a,size:o1.S.expanded,isRemovable:!1,noTopBorder:!0,noPadding:!0}):h.createElement(m8.A,{file:r,listViewId:t,size:o1.S.expanded,isRemovable:!1,noTopBorder:!0,noPadding:!0})),u&&h.createElement(HovercardLastEditedFooter,{file:r,lastEditedUserId:i,lastEditedTime:s})))}ListHovercard.displayName="ListHovercard";var un=a(0x20a4a2e3a);let ur=(0,aW.A)(function(...e){return(0,un.$)(...e)});function MessageCitationsHovercardContent({ts:e,channelId:t}){return h.createElement(ur,{ts:e,channelId:t,footer:!1,header:!0,scrollable:!0,timestampClickable:!0})}MessageCitationsHovercardContent.displayName="MessageCitationsHovercardContent";let ui=MessageCitationsHovercardContent;var ul=a(0x170214077);function MessageHovercard({unfurl:e,ts:t,channelId:a,header:n}){let r=(0,E.d4)(e=>(0,nv.Ld)(e,a,t)),{embeddedUiData:i}=(0,h.useContext)(aS.N),l=(0,E.d4)(aE.N6),o=i?.isSlackCitation(),s=(0,h.useRef)(null),c=(0,h.useMemo)(()=>h.createElement(ii.A,{ts:t,channelId:a,unfurl:e,hideTimeStamp:!0}),[a,t,e]),d=(0,h.useMemo)(()=>n||c,[c,n]),m=(0,h.useMemo)(()=>{let t=[];return(e?.files?.length?t=e.files.map(e=>e.id):r?.files?.length&&(t=r.files),t.length)?h.createElement("div",{className:"p-embedded_message_hovercard__files_attachment"},t.map(e=>h.createElement(o7.A,{key:e,id:e,detailType:mV.s.NONE,className:"p-embedded_message_hovercard__files_attachment__file_entity"}))):null},[r?.files,e?.files]),u=(0,h.useMemo)(()=>r?(0,nx.s7)(r)||(0,nx.TD)(r)||(0,nx.Dv)(r)||(0,nx.sh)(r)?rs.VR.MESSAGE_TOMBSTONED:!e&&!(0,nf.ow)(r)&&(0,nf.xh)(r)?rs.VR.MESSAGE_PRIVATE:(0,nf.xh)(r)?rs.VR.MESSAGE_NON_EXISTENT:null:rs.VR.MESSAGE_NON_EXISTENT,[r,e]);return i?null!==u?h.createElement(rs.Ay,{errorState:u}):o&&l?h.createElement("div",{ref:s,className:"p-embedded_message_hovercard__enhanced_container"},h.createElement(ui,{ts:t,channelId:a})):h.createElement(HovercardContainer,{header:d,className:"p-embedded_message_hovercard",hideMenu:!!n},h.createElement(h.Fragment,null,!!n&&c,h.createElement(ir.A,{message:r??void 0,unfurl:e,containerClassName:"p-embedded_message_hovercard__content"}),m,r&&h.createElement("div",{className:"p-embedded_message_hovercard__timstamp"},h.createElement(ul.A,{msg:r,full:!0})))):h.createElement(rs.Ay,null)}MessageHovercard.displayName="MessageHovercard";let uo=MessageHovercard;var us=a(0x4a5b4937),uc=a(0x188544c76),ud=a(0x158894c7e),um=a.n(ud);let uu=new S.Ay("slack-docs");function SalesforceRecordHovercard({recordId:e,fieldLabel:t,includeFieldLabel:a}){let n,r=(0,_.wA)(),i=(0,E.d4)(t=>(0,rr.PQ)(t,e,!0,dW.f,dW.i)),l=(0,E.d4)(o2.R5),o=i?i.fields?.find(e=>e.api_name===t||e.label===t):void 0,s=e?(0,uc.D)(e):void 0,c=s?.salesforceOrgId,d=(0,us.x)(c),{embeddedUiData:m}=(0,h.useContext)(aS.N),u=(0,h.useCallback)(()=>{if(!e)return;let{salesforceOrgId:t,rawRecordId:n}=(0,uc.D)(e);t&&n&&r((0,ty.b)({source:"quip-hovercard-update",onInsertRecord:async(e,t,a,n,r,i)=>{a&&m?.performAction({action:f.EmbeddedUiAction.UPDATE_SALESFORCE_DATA_MENTION,fieldLabel:a,recordId:t,fieldApiName:n,includeFieldLabel:i})},includeFieldPicker:!0,defaultOrgId:i?.org?.id,defaultObjectType:i?.object_api_name?{label:i.object_label||i.object_api_name,value:i.object_api_name}:void 0,defaultRecord:i?{label:i.name,value:n}:void 0,defaultField:o?{label:o.label,value:o.display_value,extras:{salesforceLabel:o.label,salesforceApiName:o.api_name}}:void 0,defaultIncludeFieldLabel:a}))},[r,e,i,m,o,a]),p=null;return l&&m&&!m.isReadOnly()&&!d&&(p=h.createElement("div",{className:um().changeFieldButtonContainer},(n=uu.t("Change Field"),h.createElement(e$.Ay,{size:"small",type:"outline",onClick:u},h.createElement("span",{className:um().buttonContents},n))))),h.createElement(HovercardContainer,{className:j()(um().hovercardContainer,"p-embedded_unfurl_hovercard"),hideMenu:!0},h.createElement("div",null,h.createElement(SfdcDataMentionCard,{record:i,fieldLabel:t}),p))}SalesforceRecordHovercard.displayName="SalesforceRecordHovercard";var up=a(0x1f1a1a240),uh=a(0xd2fa49d0);function UnfurlHovercard({header:e}){let{fileChannelMessage:t,attachment:a,parsedPermalink:n,...r}=(0,nX.A)(),{slackFileId:i}=(0,h.useContext)(aS.N),l=e??null,{unfurlType:o}=r;switch(o){case nX.h.USER:{let{memberId:t,memberHasExplicitAccess:a}=r;if((0,uh.A)(t))return h.createElement(GroupHovercard,{groupId:t,header:e});return h.createElement(up.A,{memberId:t,isCanvasContext:!0,fileId:i,memberHasExplicitAccess:a,header:e})}case nX.h.MESSAGE:{let{ts:t,channelId:n}=r;return h.createElement(uo,{unfurl:a,ts:t,channelId:n,header:e})}case nX.h.CANVAS:{let{fileId:t,unfurledUrl:a}=r;if(a.includes("focus_section_id")){let n=decodeURIComponent(a.split("focus_section_id=")[1]);return h.createElement(CanvasHovercard,{fileId:t,header:e,sectionId:n})}return h.createElement(CanvasHovercard,{fileId:t,header:e})}case nX.h.FILE:{let{fileId:t}=r;return h.createElement(FileHovercard,{fileId:t,header:e})}case nX.h.SLACK_LIST:{let{listFileId:t,viewId:a}=r;return h.createElement(ListHovercard,{listId:t,viewId:a,header:e})}case nX.h.SLACK_LIST_RECORD:{let{listFileId:t,recordId:a}=r;return h.createElement(ListHovercard,{listId:t,recordId:a,header:e})}case nX.h.CHANNEL:{let{channelId:t}=r;return h.createElement(ChannelHovercard,{channelId:t,header:e})}case nX.h.SALESFORCE_RECORD:{let{recordId:e,fieldLabel:t,includeFieldLabel:a}=r;return h.createElement(SalesforceRecordHovercard,{recordId:e,fieldLabel:t,includeFieldLabel:a})}default:return l}}UnfurlHovercard.displayName="UnfurlHovercard";let u_=new S.Ay("slack-docs");function SidebarButton({onClick:e,className:t}){return h.createElement(as.Ay,{position:"top",delay:as.n1,tip:u_.t("View in split view"),hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":"view in split view",onClick:e,className:t},h.createElement(w.Ah,{name:"sidebar",size:"16"})))}SidebarButton.displayName="SidebarButton";let uf=SidebarButton,ub=new S.Ay("embedded_unfurl_in_hovercard");function RemoveButton({onClick:e,className:t}){let{embeddedUiData:a}=(0,h.useContext)(aS.N);return h.createElement(as.Ay,{position:"top",delay:as.n1,tip:ub.t("Remove link",{fallbackHash:"b8308ccb6467b151f4279cfd8c12167ebe01c0b2"}),hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":"cancel",onClick:e,className:t,disabled:a?.isReadOnly()||a?.isLocked()},h.createElement(w.Ah,{name:"trash",size:"16"})))}RemoveButton.displayName="RemoveButton";let ug=RemoveButton,uy=new S.Ay("embedded_unfurl_in_hovercard");function EditButton({onClick:e,className:t}){let{embeddedUiData:a}=(0,h.useContext)(aS.N);return h.createElement(as.Ay,{position:"top",delay:as.n1,tip:uy.t("Edit",{fallbackHash:"5301648dcf6b53cefc9ed52999aaa92d4603cae0",fallbackHashNs:"docs"}),hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":"edit",onClick:e,className:t,disabled:a?.isReadOnly()||a?.isLocked()},h.createElement(w.Ah,{name:"edit",size:"16"})))}EditButton.displayName="EditButton";let uA=EditButton;var ux=a(0x1382131a5);function VariableHovercard(){let e=(0,_.wA)(),{embeddedUiData:t,slackFileId:a}=(0,h.useContext)(aS.N),n=t?.associatedInlineEntityDisplayInfo(),r=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[t]),i=(0,h.useCallback)(()=>{e((0,iK.o)((0,i$.YW)({entityId:a,activeTab:ux.O.VARIABLES})))},[e,a]),l=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.OPEN_POPOVER})},[t]),o="p-embedded_variable_toolbar__button";return h.createElement("div",{className:j()("p-embedded_variable_toolbar")},h.createElement("div",{className:"p-embedded_variable_toolbar__truncated_label"},h.createElement(aD.A,{lines:1},n?.context===f.EmbeddedUiContext.HOVERCARD?n?.displayLabel:"")),h.createElement("div",{className:"p-embedded_variable_toolbar__buttons"},h.createElement(uA,{onClick:l,className:o}),h.createElement(uf,{onClick:i,className:o}),h.createElement(ug,{onClick:r,className:o})))}VariableHovercard.displayName="VariableHovercard";let uE=VariableHovercard;function Hovercard(){let{embeddedUiData:e}=(0,h.useContext)(aS.N),t=e?.embeddedObject();return t?.type===f.EmbeddedObjectType.SLACK_OBJECT&&t.object.type===f.SlackObjectType.TEMPLATE?h.createElement(uE,null):t?.type===f.EmbeddedObjectType.DATE?h.createElement(mB,null):h.createElement(UnfurlHovercard,null)}Hovercard.displayName="Hovercard";var uC=a(0x1d1911997);let uk=new S.Ay("slack-docs");function createNgrams(e,t=3){let a=[];for(let n=0;n<=e.length-t;n++)a.push(e.substring(n,n+t).toLowerCase());return a}function fuzzyMatcher(e,t){if(!t||0===e.length)return[];let a=3;t.length<3&&(a=t.length);let n=createNgrams(t,a);return e.filter(e=>{let t=createNgrams(e.label,a);return n.some(e=>t.includes(e))})}function PlaceholderInput({initialText:e,onInputChange:t,ariaDescribedBy:a,id:n,shouldShowHint:r,templateControlsInfo:i,isDisabled:l=!1}){let{embeddedUiData:o}=(0,h.useContext)(aS.N),{windowRef:s}=(0,h.useContext)(K._0),c=(0,h.useCallback)(e=>{let t=[];if(i){let e=new Set,a=[];[...i.entries()].forEach(([t,n])=>{e.has(n.name)||a.push(n.name),e.add(n.name)}),t=a.map(e=>({label:e,value:e}))}if(e?.trim()){t=fuzzyMatcher(t,e);let a={label:uk.t("{filterQuery} (new variable)",{filterQuery:e}),value:e};t.find(t=>t.value.trim()===e?.trim())||t.unshift(a)}return t},[i]),d=(0,h.useMemo)(()=>e?[]:c(e),[c,e]),m=(0,h.useRef)(null),u="canvas-automations-add-label",[p,_]=(0,h.useState)({options:d,isInvalid:!1,isDisabled:!1,selectedOption:null,filterQuery:e,selectId:u}),b=(0,h.useMemo)(()=>({...p}),[p]),g=(0,h.useCallback)((e,t)=>{t&&t(),_(t=>{let a=e(),n={...t,...a};return a.selectedOption&&(n.selectedOption=null,n.filterQuery=a.selectedOption.value,n.isExpanded=!1,m.current?.focus()),0===n.options.length&&n.isExpanded&&(n.isExpanded=!1),!1===a.isExpanded&&void 0===a.activeRowIndex&&""===a.filterQuery&&(n.filterQuery=p.filterQuery),n.filterQuery!==p.filterQuery&&(n.options=c(n.filterQuery)),{...n}})},[c,p.filterQuery]);(0,h.useEffect)(()=>{t(p.filterQuery??"")},[t,p.filterQuery]),(0,h.useEffect)(()=>{let e=setTimeout(()=>{m.current?.focus();let e=new Event(`measureSelectPopover--${u}`);s.deref()?.dispatchEvent(e),_(e=>({...e,isExpanded:!!d}))},200);return()=>clearTimeout(e)},[d,s]);let y=(0,h.useCallback)(()=>{o?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:f.CollabPopoverDismissSource.ANY})},[o]),A=(0,h.useCallback)(()=>{o?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[o]);(0,h.useEffect)(()=>{p.isExpanded&&p.options||A()},[A,p.isExpanded,p.options]);let x=(0,h.useCallback)(()=>{_(e=>({...e,isExpanded:!1}))},[]),E=(0,h.useMemo)(()=>r?[{id:"hint",message:uk.t("i.e. Name, Project, Description etc."),className:"p-placeholder_input__select_input_hints"}]:void 0,[r]),C=(0,h.useMemo)(()=>{let e=[];return p.filterQuery&&p.filterQuery?.length>100&&e.push({id:"1",message:uk.t("You can\u2019t enter more than {maxLength} characters.",{maxLength:100})}),e},[p.filterQuery]);return h.createElement(uC.JJ,{key:n,size:"medium",classPrefix:"p-placeholder_input",width:"100%",inputRef:m,ariaLabel:uk.t("Add a new or existing name"),placeholderText:uk.t("Add a new or existing name"),hints:C.length?void 0:E,selectState:b,setSelectState:g,showDropdownIcon:!1,maxCharacterLimit:100,maxOptionsListHeight:140,ariaDescribedBy:a,isInvalid:p.isInvalid,onOpen:y,errors:C,onBlur:x,onOptionsListClose:A,isDisabled:l})}PlaceholderInput.displayName="PlaceholderInput";let uv=PlaceholderInput;var uS=a(0x8ed8ca46);let uI=new S.Ay("slack-docs");function TypeSelect({ariaDescribedBy:e,id:t,onSelectedTypeChange:a,type:n,isDisabled:r=!1,hints:i}){let l=(0,E.d4)(o2.R5),o=(0,E.d4)(uS.mO),s=(0,h.useMemo)(()=>[{label:uI.t("Text"),value:f.TemplateType.TEXT},{label:uI.t("Person"),value:f.TemplateType.USER},{label:uI.t("Channel"),value:f.TemplateType.CHANNEL},{label:uI.t("Date"),value:f.TemplateType.DATE},...o.length&&l?[{label:uI.t("Salesforce Data Field"),value:f.TemplateType.SALESFORCE_DATA_MENTION}]:[]],[o,l]),{embeddedUiData:c}=(0,h.useContext)(aS.N),d=(0,h.useCallback)(()=>{c?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:f.CollabPopoverDismissSource.ANY})},[c]),m=(0,h.useCallback)(()=>{c?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[c]),u=(0,h.useCallback)(e=>{a(e.value),m()},[m,a]),p=(0,h.useCallback)(e=>{switch(e){case f.TemplateType.USER:return"mentions";case f.TemplateType.CHANNEL:return"channel";case f.TemplateType.DATE:return"calendar";case f.TemplateType.SALESFORCE_DATA_MENTION:return"sf-cloud-filled";default:return"text"}},[]),_=(0,h.useCallback)(e=>h.createElement("div",null,h.createElement(w.Ah,{name:p(e.value),inline:!0}),h.createElement("span",{className:"p-inline_placeholder_edit_form__type_select__option_label"},e.label)),[p]);return h.createElement(id.A,{selectId:t,options:s,ariaDescribedBy:e,onOptionSelected:u,selectedOption:s.find(e=>e.value===n),classPrefix:"p-inline_placeholder_edit_form__type_select",onClick:d,onOptionsListClose:m,focusOnMount:!1,renderOption:_,renderSelectedOption:_,isDisabled:r,hints:i})}TypeSelect.displayName="TypeSelect";let uw=TypeSelect;var uT=a(0x28ddfc94);let uN=new S.Ay("slack-docs"),uM={eventId:eJ.EventId.CANVAS_VARIABLES,elementName:"edit-variable-submit",onClick:{enableClogAction:!0},isPrimaryCTA:!0,fileId:""},uR={eventId:eJ.EventId.CANVAS_VARIABLES,elementName:"edit-variable-cancel",onClick:{enableClogAction:!0},fileId:""},InlinePlaceholderEditForm=()=>{let e=(0,_.wA)(),{embeddedUiData:t,slackFileId:a,docEmbed:n}=(0,h.useContext)(aS.N),r=t?.associatedInlineEntityDisplayInfo(),i=(0,uT.A)(a,n?.templateControls),{initalPlaceholderText:l,initialType:o}=r?.context===f.EmbeddedUiContext.VARIABLE_EDIT_POPOVER?{initalPlaceholderText:r.name??"",initialType:r.type??f.TemplateType.TEXT}:{initalPlaceholderText:"",initialType:f.TemplateType.TEXT},[s,c]=(0,h.useState)(l),[d,m]=(0,h.useState)(o),u=t?.embeddedObject().type===f.EmbeddedObjectType.TEXT,p=(0,h.useMemo)(()=>{let e=!1,t=d,a=!1,n=s;if(!i)return{hasDifferentType:e,existingType:t,existingIsLocked:a,existingValue:n};let r=i.get(`${s}-${d}`);return r?{hasDifferentType:!0,existingType:r.type,existingIsLocked:r.isLocked,existingValue:r.value}:(i&&[...i.entries()].forEach(([r,i])=>{i.name===s&&(i.type!==d&&(e=!0,t=i.type),a=i.isLocked,i.value&&(n=i.value))}),{hasDifferentType:e,existingType:t,existingIsLocked:a})},[s,i,d]),b=(0,h.useMemo)(()=>[{id:"hint",message:uN.t("Each variable can have only one type. You can revisit and edit existing variables types anytime.")}],[]),g=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER})},[t]),y=(0,h.useCallback)(()=>{s&&(t?.performAction({action:f.EmbeddedUiAction.UPDATE_INLINE_ENTITY_DISPLAY_INFO,updatedInfo:{context:f.EmbeddedUiContext.VARIABLE_EDIT_POPOVER,name:s,value:p.existingValue||s,isLocked:p.existingIsLocked,type:d}}),g())},[s,t,p.existingValue,p.existingIsLocked,d,g]),A=(0,h.useCallback)(e=>{c(e.trim())},[]),x=(0,h.useCallback)(()=>{e((0,iK.o)((0,i$.YW)({entityId:a,activeTab:ux.O.VARIABLES}))),t?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER})},[e,t,a]);a&&(uM.fileId=a,uR.fileId=a);let E=u&&p.hasDifferentType;return h.createElement(Y.A,{eventId:eJ.EventId.CANVAS_VARIABLES,elementType:eJ.ElementType.MODAL,uiComponentName:eJ.UiComponentName.CANVAS_EDIT_VARIABLES_MODAL,fileId:a,clogImpression:!0,enableClogImpressionOffScreen:!0},h.createElement("div",{className:"p-inline_placeholder_edit_form"},h.createElement("div",{className:"p-inline_placeholder_edit_form__title"},h.createElement("h1",null,u?uN.t("Add variable"):uN.t("Edit variable")),u&&h.createElement("h2",null,uN.t("Give your variables a descriptive name that will let your team know what information to enter. "),h.createElement(sf.A,{articleId:0x178a8432a993},uN.t("Learn more")))),h.createElement(io.A,{id:"inline_placeholder-replacement-label-name",text:uN.t("Variable name"),htmlFor:"inline_placeholder-replacement-input",className:"p-inline_placeholder_edit_form__input_label"},h.createElement(uv,{onInputChange:A,initialText:l,ariaDescribedBy:"inline_placeholder-replacement-label-name",id:"inline_placeholder-replacement-input",shouldShowHint:u,templateControlsInfo:i})),h.createElement(io.A,{id:"inline_placeholder-replacement-label-type",text:uN.t("Variable type"),htmlFor:"inline_placeholder-type-select",className:"p-inline_placeholder_edit_form__type_select_label"},h.createElement(uw,{id:"inline_placeholder-type-select",ariaDescribedBy:"inline_placeholder-replacement-label-type",onSelectedTypeChange:m,type:E?p.existingType:d,isDisabled:E,hints:E?b:void 0})),h.createElement("div",{className:"p-inline_placeholder_edit_form__footer"},h.createElement("div",null,!u&&h.createElement(ia.A,{onClick:x},uN.t("View all variables"))),h.createElement("div",null,h.createElement(e$.Nm,{onClick:g,autoClogProps:uR,className:"p-inline_placeholder_edit_form__footer__primary__close"},uN.t("Cancel")),h.createElement(r5.Ay,{type:"primary",size:"small",onClick:y,autoClogProps:uM,disabled:!s||s.length>100},u?uN.t("Done"):uN.t("Save"))))))};InlinePlaceholderEditForm.displayName="InlinePlaceholderEditForm";var uP=a(0x10598eeca),uL=a(0x15fb82076);let uO=new S.Ay("embedded_unfurl_in_hovercard");function AcceptEditButton({onClick:e,className:t}){return h.createElement(as.Ay,{position:"top",delay:as.n1,tip:uO.t("Accept",{fallbackHash:"bb54db510a92908a5a4df79fc1ad1eae8df50ec3",fallbackHashNs:"app-config"}),hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":"accept",onClick:e,className:t},h.createElement(w.Ah,{name:"check",size:"16"})))}AcceptEditButton.displayName="AcceptEditButton";let uD=AcceptEditButton,uF=new S.Ay("embedded_unfurl_in_hovercard");function CancelEditButton({onClick:e,className:t}){return h.createElement(as.Ay,{position:"top",delay:as.n1,tip:uF.t("Cancel",{fallbackHash:"77dfd2135f4db726c47299bb55be26f7f4525a46",fallbackHashNs:"bookmarks-bar"}),hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":"cancel",onClick:e,className:t,svgIconProps:{name:"close",size:"16"}}))}CancelEditButton.displayName="CancelEditButton";let uU=CancelEditButton,uB=new S.Ay("embedded_unfurl_in_hovercard");function EditingToolbar({onEditStart:e}){let{embeddedUiData:t,embeddedUIContainerElement:a}=(0,h.useContext)(aS.N),n=t?.embeddedObject(),r=n?.type===f.EmbeddedObjectType.HYPERLINK&&!!n.isEditing,i=t?.objectUrl()??"",[l,o]=(0,h.useState)(i),s=(0,h.useRef)(document.createElement("input")),c=t?.isReadOnly()||t?.isLocked(),d=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS,source:f.CollabPopoverDismissSource.ON_MOUSE_LEAVE})},[t]),m=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[t]),u=(0,h.useCallback)(e=>{o(e),t?.performAction({action:f.EmbeddedUiAction.ON_LINK_INSPECTOR_INPUT_CHANGE,url:e})},[t]),p=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.REMOVE_ASSOCIATED_CONTENT})},[t]),_=(0,h.useCallback)(()=>{t?.performAction({action:f.EmbeddedUiAction.UPDATE_INLINE_ENTITY_DISPLAY_INFO,updatedInfo:{context:f.EmbeddedUiContext.HYPERLINK_INSPECTOR_TOOLBAR,url:l}}),m()},[t,l,m]),b=(0,h.useCallback)(()=>{m(),t?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER})},[m,t]),g=(0,h.useCallback)(e=>{e.which===t_.Fm&&(_(),e.preventDefault())},[_]),y=(0,h.useCallback)(()=>{s.current?.focus()},[]);(0,h.useEffect)(()=>{if(a)return r&&(y(),(0,r0.LR)(a,y)),()=>(0,r0.xB)(a)},[a,y,r]);let A="p-embedded_link_inspector_toolbar__button";return h.createElement("div",{className:j()("p-embedded_link_inspector_toolbar",{"p-embedded_link_inspector_toolbar--new_link":r})},r&&!c?h.createElement(uP.A,{ref:s,className:"p-embedded_link_inspector_toolbar__input",size:uP.F.medium,onFocus:d,onBlur:m,value:l,onChange:u,onKeyDown:g,placeholder:uB.t("Enter link URL",{fallbackHash:"491ce4382bacb96090a6264517bc6da07c072c1e",fallbackHashNs:"composer"})}):h.createElement("div",{className:"p-embedded_link_inspector_toolbar__truncated_link"},h.createElement(uL.A,{href:i},h.createElement(aD.A,{lines:1},i))),!c&&h.createElement("div",{className:"p-embedded_link_inspector_toolbar__buttons"},r?h.createElement(uD,{onClick:_,className:A}):h.createElement(uA,{onClick:e,className:A}),r?h.createElement(uU,{onClick:b,className:A}):h.createElement(ug,{onClick:p,className:A})))}EditingToolbar.displayName="EditingToolbar";let uH=EditingToolbar;var uW=a(0x996114a6);function LinkInspectorToolbar({embeddedObject:e}){let[t,a]=(0,h.useState)(!1),n=(0,h.useCallback)(()=>{a(!0)},[a]),r=(0,h.useMemo)(()=>h.createElement(uH,{onEditStart:n}),[n]);if(e.type!==f.EmbeddedObjectType.HYPERLINK)return null;let i=e.anchorElement.href;return t?h.createElement(uW.A,{url:i,updateEditStatus:a,showRemoveLinkButton:!0}):h.createElement(UnfurlHovercard,{header:r})}LinkInspectorToolbar.displayName="LinkInspectorToolbar";let uV=LinkInspectorToolbar;var uG=a(0x1f57aea47);function ModalStateObserver(){let{windowId:e}=(0,h.useContext)(K._0),{embeddedUiData:t}=(0,h.useContext)(aS.N),a=(0,E.d4)(t=>(0,uG.oY)(t,e));return(0,h.useEffect)(()=>{t?.performAction({action:f.EmbeddedUiAction.HANDLE_MODAL_STATE_CHANGE,isModalOpen:a})},[a,t]),null}function SalesforceDataFieldPicker(){let{embeddedUiData:e,docEmbed:t}=(0,h.useContext)(aS.N),a=(0,h.useMemo)(()=>t?.docEditor,[t]),n=(0,h.useCallback)((t,n,r,i)=>{r&&(a?.focusEditor(),e?.performAction({action:f.EmbeddedUiAction.CONVERT_VARIABLE,fieldLabel:r,recordId:n,fieldApiName:i}))},[a,e]),r=(0,h.useCallback)(()=>{e?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER})},[e]);return h.createElement(ty.j,{source:"quip-variable-convert",onInsertRecord:n,onDismiss:r,includeFieldPicker:!0})}SalesforceDataFieldPicker.displayName="SalesforceDataFieldPicker";var uq=a(0x1feee1711);let uj=new S.Ay("file"),uz="add_text_below";function useAddTextBelowMenuItemTemplate(){let{embeddedUiData:e}=(0,h.useContext)(aS.N);return(0,h.useMemo)(()=>{if(e)return getAddTextBelowMenuItemTemplate({embeddedUiData:e,onClick:()=>{e?.performAction({action:f.EmbeddedUiAction.ADD_TEXT_BELOW})}})},[e])}function getAddTextBelowMenuItemTemplate({embeddedUiData:e,onClick:t}){return{key:uz,dataQa:uz,label:uj.t("Add text below"),show:e.contextType()===f.EmbeddedUiContext.SECTION_MENU&&!e.isReadOnly(),click:t,type:ao.A.default}}var uK=a(0x1b0d3144),u$=a(0x39e53dae);let CanvasBaseEntity=({userId:e,text:t,metadata:a})=>{let n=(0,E.d4)(t=>(0,n_.nv)(t,e)),r=(0,tK.jc)(n)||"",i={className:"padding_left_150 padding_right_150",size:mG.ny.medium};return e&&r&&(i.avatar=e=>h.createElement(mq.f1,{...e,imageUrl:r,isInteractive:!1})),t&&(i.text=h.createElement(iH.CG,null,t)),a&&(i.metadata=h.createElement(iH.Q,null,a)),h.createElement(iH.Ay,i)};CanvasBaseEntity.displayName="CanvasBaseEntity";var uY=a(0x13638bd77);let CanvasDisplayNameLink=({userId:e})=>{let t=(0,_.wA)(),{embeddedUiData:a}=(0,h.useContext)(aS.N),n=(0,E.d4)(t=>(0,n_.nv)(t,e)),r=(0,h.useCallback)(()=>{t((0,uY.b)({memberId:e})),a?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER})},[t,a,e]),i=(0,E.d4)(e=>(0,tY.sE)(e,n)),l=h.createElement(rv.A,{onClick:r},i);return(0,ry.yN)({memberId:e,children:l,isCanvasContext:!0})};CanvasDisplayNameLink.displayName="CanvasDisplayNameLink";let uQ=new S.Ay("file"),uZ="locking_editor";function useLockingEditorMenuItemTemplate(){let{embeddedUiData:e}=(0,h.useContext)(aS.N);return(0,h.useMemo)(()=>{if(e)return getLockingEditorMenuItemTemplate({embeddedUiData:e})},[e])}function getLockingEditorMenuItemTemplate({embeddedUiData:e}){let t=e?.editingLockSession()?.lockingAuthorId,a=e?.isLocked()&&!!t;if(t)return{type:ao.A.custom,key:uZ,dataQa:uZ,children:h.createElement(CanvasBaseEntity,{userId:t,text:uQ.rt("{memberName} is currently editing",{memberName:h.createElement(CanvasDisplayNameLink,{userId:t})})}),show:e.contextType()===f.EmbeddedUiContext.SECTION_MENU&&a}}getLockingEditorMenuItemTemplate.displayName="getLockingEditorMenuItemTemplate";var uJ=a(0x2068ad0b8);let uX=new S.Ay("file"),u0="take_over";function useTakeOverMenuItemTemplate(){let{embeddedUiData:e}=(0,h.useContext)(aS.N);return(0,h.useMemo)(()=>{if(e)return getTakeOverMenuItemTemplate({embeddedUiData:e,onClick:()=>{let t=e.editingLockSession()?.sessionId;t&&e?.performAction({action:f.EmbeddedUiAction.TAKE_OVER_EDITING,editorSession:t})}})},[e])}function getTakeOverMenuItemTemplate({embeddedUiData:e,onClick:t}){let a=e.isLocked()&&!!e.editingLockSession()?.sessionId;return{key:u0,dataQa:u0,label:uX.t("Take over editing"),show:e.contextType()===f.EmbeddedUiContext.SECTION_MENU&&a&&!e.isReadOnly(),click:t,type:ao.A.default,icon:h.createElement(w.Ah,{name:"edit",size:"18"})}}getTakeOverMenuItemTemplate.displayName="getTakeOverMenuItemTemplate";var u1=a(0xfa2535b1);let u2=new S.Ay("quip_embedded_ui");function useGetLockedSectionMenuTemplate(){let e=useTakeOverMenuItemTemplate(),t=(0,u$.A)(),a=(0,u1.A)(),n=(0,uJ.D)(),r=useAddTextBelowMenuItemTemplate(),i=useLockingEditorMenuItemTemplate(),l=(0,uK.A)();return(0,h.useCallback)(()=>[e,{type:ao.A.separator,key:"separator-take-over",show:e?.show},t,a,n,{type:ao.A.separator,key:"separator-copy-comment",show:t?.show||a?.show||n?.show},r,l,{type:ao.A.separator,key:"separator-add-text-below",show:r?.show||l?.show},i].filter(e=>!!e&&(e.show||(0,uq.A)(e.show))),[e,t,a,n,r,l,i])}function SectionMenu(){let{embeddedUiData:e}=(0,h.useContext)(aS.N),t=(0,nJ.D)(),a=useGetLockedSectionMenuTemplate(),n=(0,h.useCallback)(()=>e?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER}),[e]),r=e?.isLocked()&&!!e?.editingLockSession()?.sessionId,i={width:"auto",stripTerminalSeparators:!0,onMenuItemSelected:n,onTriggerClose:n,"aria-label":u2.t("Section options")};return h.createElement(Y.A,{eventId:eJ.EventId.CANVAS_SECTION_MENU,clogImpression:!0,uiComponentName:eJ.UiComponentName.CANVAS_SECTION_MENU},h.createElement(aT.a,{...i,menuClassNames:"p-embedded_section_menu",template:r?a():t()}))}SectionMenu.displayName="SectionMenu";let u4=SectionMenu;var u5=a(0xfc03231f),u3=a(0x106d9c7ac),u6=a(0xc527df57),u8=a(0x46b45b2e),u7=a(0x5418d932);let ReactionsEmojiPicker=({commentId:e,channelId:t,targetBounds:a,onClose:n,renderAsPopover:r=!0})=>{let i,l=(0,_.wA)(),o=(0,E.d4)(W.ZT),s=(0,E.d4)(t=>(0,dN.r)(t,e)),c=s?.threadTs,d=(0,E.d4)(e=>t&&c?(0,nv.Ld)(e,t,c):null),{embeddedUiData:m}=(0,h.useContext)(aS.N),u=(0,h.useCallback)(()=>{r?l((0,e0.O)()):m?.performAction({action:f.EmbeddedUiAction.DISMISS_POPOVER}),n?.()},[l,n,r,m]),p=(0,h.useCallback)((a,n)=>{d&&(l((0,u8.Ay)({key:(0,dk.J)(d),name:n})),t&&o&&l((0,u7.A)({channelId:t,teamId:o,quipCommentThreadId:e,replyCount:d.reply_count??0,reactionCount:1})))},[l,t,e,d,o]);(0,h.useEffect)(()=>{o&&t&&!s&&l((0,dM.P)({channelId:t,teamId:o,quipOrSlackCommentThreadId:e}))},[l,o,t,e,s]);let b=h.createElement(u6.Ay,{onSelected:p,onClosed:u,onAddEmojiButtonClick:u});if(!r)return b;let g=$.J?.innerHeight??800,y=a?.top??35,A=!0;return y>g/2?(i=35,A=!1):i=-25,h.createElement(u3.Ay,{isOpen:!0,tryOppositePosition:A,useTargetBoundsAsPosition:!0,position:"top-left",offsetY:i,targetBounds:a,onClose:u,allowanceX:0},b)};ReactionsEmojiPicker.displayName="ReactionsEmojiPicker";var u9=a(0x246a415e0);let pe=new S.Ay("canvas"),pt=new Set([f.EmbeddedUiContext.AI_ASSISTANT_OVERLAY]);let QuipEmbeddedUiProvider=class QuipEmbeddedUiProvider{dispatch;mountEmbed;unmountEmbed;fileId;isPreview=!1;logger;docEmbed;startEditorTrace=void 0;objectsPendingSlackFileId=new Set;isTornDown=!1;isHeaderImageUploading=!1;headerImageEmbeddedUiData=null;constructor({dispatch:e,getState:t,mountEmbed:a,unmountEmbed:n,docEmbed:r,fileId:i,isPreview:l,startEditorTrace:o}){this.dispatch=e,this.mountEmbed=a,this.unmountEmbed=n,this.logger=(0,e7.Ay)({getState:t}),this.docEmbed=r,this.fileId=i,this.startEditorTrace=o,this.logger.info(`construct QuipEmbeddedUiProvider ${i}`),this.isPreview=l}shouldReset({docEmbed:e}){return this.docEmbed!==e}updateMutableProps({fileId:e,startEditorTrace:t}){if(void 0!==e&&e!==this.fileId)for(let t of(this.fileId=e,this.objectsPendingSlackFileId))this.embedWithContext(t.embeddedObject,t.embeddedUIContainerElement,t.embeddedUiData,t.embeddedUiContext),this.objectsPendingSlackFileId.delete(t);this.startEditorTrace=t,this.logger.info("Update mutable props",{fileId:e})}getObjectValuesToLog(e){return e?.type===f.EmbeddedObjectType.SLACK_OBJECT?`type: ${e.type}, subtype: ${e?.object.type}, id: ${e?.object.id}`:null}getContainerValuesToLog(e){return e.closest("[data-id]")?.getAttribute("data-id")}getElement(e,t){switch(t){case f.EmbeddedUiContext.CARD:return h.createElement(Card,{initialLoadTrace:this.startEditorTrace,fileId:this.fileId,isPreview:this.isPreview});case f.EmbeddedUiContext.HYPERLINK_INSPECTOR_TOOLBAR:return h.createElement(uV,{embeddedObject:e});case f.EmbeddedUiContext.HOVERCARD:return h.createElement(Hovercard,null);case f.EmbeddedUiContext.SECTION_MENU:return h.createElement(u4,null);case f.EmbeddedUiContext.CONTROL_OBJECT_OBSERVER:return h.createElement(SlackObjectObserver,null);case f.EmbeddedUiContext.HYPERLINK_CONTEXT_MENU:case f.EmbeddedUiContext.CONTROL_CONTEXT_MENU:return h.createElement(nJ.A,null);case f.EmbeddedUiContext.TABLE_SELECTION_MENU:return h.createElement(u5.A,null);case f.EmbeddedUiContext.FILE_UPLOAD_BLOCKED_OVERLAY:{let e=this.fileId&&(0,sU.p)(this.fileId)||"";if(e)return h.createElement("div",{style:{width:800,height:800,maxWidth:"80vw",maxHeight:"80vh"}},h.createElement(u9.A,{slackConnectFileSharingBlocked:!0,channelId:e,isComposerPage:!1}));return null}case f.EmbeddedUiContext.EPHEMERAL_MESSAGE_MODAL_TRIGGER:return h.createElement(EphemeralMessageModalTrigger,null);case f.EmbeddedUiContext.VARIABLE_EDIT_POPOVER:return h.createElement(InlinePlaceholderEditForm,null);case f.EmbeddedUiContext.SALESFORCE_DATA_FIELD_PICKER:return h.createElement(SalesforceDataFieldPicker,null);case f.EmbeddedUiContext.HEADER:return h.createElement(mf,null);case f.EmbeddedUiContext.HEADER_IMAGE_PICKER:{let e=this.fileId?(0,sU.p)(this.fileId):"";return h.createElement(EmbeddedHeaderImagePicker,{fileChannelId:e,onUploadStart:()=>{this.isHeaderImageUploading=!0},onUploadEnd:()=>{this.isHeaderImageUploading=!1}})}case f.EmbeddedUiContext.GUTTER_REACTION_ICON:{let t=this.fileId;if(!t||e.type!==f.EmbeddedObjectType.COMMENT_METADATA)return null;let{commentId:a,seen:n,count:r}=e;return h.createElement(CommentReactionGutter,{fileId:t,commentId:a,seen:n,count:r})}case f.EmbeddedUiContext.DATE_PICKER:return h.createElement(mi,null);case f.EmbeddedUiContext.MODAL_STATE_OBSERVER:return h.createElement(ModalStateObserver,null);case f.EmbeddedUiContext.AI_ASSISTANT_OVERLAY:{if(e.type!==f.EmbeddedObjectType.AI_ASSISTANT)return null;let{sessionId:t}=e,a=t??(0,X.A)();if((0,ax.Ad)(a))return h.createElement(AiSlackbotCanvasOverlay,{sessionId:a});return h.createElement(AiContentCreationOverlay,{sessionId:a})}case f.EmbeddedUiContext.EMOJI_PICKER:{if(e.type!==f.EmbeddedObjectType.COMMENT_METADATA)return null;let{commentId:t}=e;return h.createElement(ReactionsEmojiPicker,{commentId:t,channelId:this.fileId?(0,sU.p)(this.fileId):void 0,renderAsPopover:!1})}case f.EmbeddedUiContext.AI_SECTION_MENU:return h.createElement(nq.A,{source:"gutter-menu"});default:return null}}embed(e,t,a){let n=a.contextType();this.logger.info("embed",this.getObjectValuesToLog(e),this.getContainerValuesToLog(t),n),this.embedWithContext(e,t,a,n)}embedWithContext(e,t,a,n){n===f.EmbeddedUiContext.HEADER_IMAGE_PICKER&&a&&(this.headerImageEmbeddedUiData=a);let r=this.getElement(e,n);if(!r)return void this.logger.error(Error(`Unable to render embed for ${n}`));let i=h.createElement(t8.A,null,r),l={embeddedUIContainerElement:t,embeddedUiData:a,slackFileId:this.fileId,docEmbed:this.docEmbed};!this.fileId&&pt.has(n)&&this.objectsPendingSlackFileId.add({embeddedObject:e,embeddedUIContainerElement:t,embeddedUiData:a,embeddedUiContext:n}),this.mount(i,l)}mount(e,t){this.isTornDown?this.logger.info("Skipping mount - provider already torn down"):this.mountEmbed(h.createElement(aS.u.Provider,{value:this},h.createElement(aS.N.Provider,{value:{...t,inChannelCanvas:!1}},e)),t.embeddedUIContainerElement)}unmount(e){this.logger.info("unmount embed",this.getContainerValuesToLog(e)),this.unmountEmbed(e)}activateContent(e){(0,r0.lu)(e)?.()}openInLightbox(e){this.dispatch((0,r2.A)({fileId:e}))}tearDown(){if(this.logger.info(`tearDown QuipEmbeddedUiProvider ${this.fileId}`),this.isTornDown=!0,this.isHeaderImageUploading&&this.headerImageEmbeddedUiData){try{this.headerImageEmbeddedUiData.performAction({action:f.EmbeddedUiAction.CANCEL_HEADER_IMAGE})}catch(e){console.error("Could not cancel header image upload",e)}let e=pe.t("The uploaded file will not be used as a header image because you navigated away.",{fallbackHash:"ee9e888b159adb957aa0fc5875823f2d2d093a66",fallbackHashNs:"page_downloads_new"});this.dispatch((0,tm.M)({element:h.createElement(eY.A,{svgIconProps:{name:"warning"},position:"bottom-right",duration:6e3},e)}))}}};let maybeGetChildType=(e,t=1)=>{let a=e?.props?.children?.type?.name;return a?a:t>4||"object"!=typeof e?.props?.children||e?.props?.children===null?void 0:maybeGetChildType(e?.props?.children,t+1)};function QuipEmbeddedUiRenderer({docEmbed:e,fileId:t,quipThreadId:a,startEditorTrace:n,isPreview:r}){let i=(0,em.t)(a),[l,o]=(0,h.useReducer)(e=>e+1,0),s=(0,h.useRef)(new Map),{windowRef:c}=(0,h.useContext)(K._0),[d,m]=(0,h.useState)(!1);(0,eh.V)(e,()=>{m(!0)},eh.h.PARTIALLY_RENDERED);let u=(0,h.useCallback)((e,t)=>{s.current.set(t,e),o()},[]),p=(0,h.useCallback)(e=>{s.current.delete(e),o()},[]),f=(0,_.Pj)(),b=(0,h.useRef)();return(0,h.useEffect)(()=>{let a=d?void 0:n;b.current&&!b.current?.shouldReset({docEmbed:e})?b.current?.updateMutableProps({fileId:t,startEditorTrace:a}):(b.current?.tearDown(),b.current=new QuipEmbeddedUiProvider({dispatch:f.dispatch,getState:f.getState,mountEmbed:u,unmountEmbed:p,docEmbed:e,fileId:t,startEditorTrace:a,isPreview:r}),e.setEmbeddedUiProvider(b.current))},[f,u,p,e,t,n,d,r]),(0,h.useEffect)(()=>()=>b.current?.tearDown(),[]),(0,h.useEffect)(()=>{let e=l&&c.deref()?.setTimeout(()=>{let e=Array.from(s.current.entries());i.info("Mounted embeds",{updateCount:l,mountedEmbeds:e.length}),e.forEach(([e,t])=>{e||i.error(Error("Missing container")),i.info("Mounted embed",{containerLength:e.innerHTML?.trim().length,parentSection:e.closest("[data-id]")?.getAttribute("data-id"),contentsType:maybeGetChildType(t)})})},2e3);return()=>e&&c.deref()?.clearTimeout(e)},[c,i,l]),h.createElement(h.Fragment,null,Array.from(s.current.entries()).map(([e,t])=>(0,t6.createPortal)(t,e)))}var pa=a(0x17d13b2a8),pn=a(0xbe505324),pr=a(0x1023c1f4a),pi=a(0x1cfca9392),pl=a(0x16a140c5a),po=a(0xe639be51),ps=a(0x1c8c09533),pc=a(0x10e0f5452),pd=a(0x1a85b3832);let pm=new S.Ay("quip-floating-formatting-toolbar"),QuipFloatingFormattingBar=({docEmbedRef:e,containerRef:t,sectionNavigationProps:a,fileId:n})=>{let r,i,l=(0,_.wA)(),o=(0,aI.A)(),s=(0,E.d4)(aE.c9),c=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_underline")),d=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_blockquote_layout")),m=(0,E.d4)(pd.v),{sendMessageToAnnouncerAPI:u}=(0,h.useContext)(ee.A),{caretRange:p,canEditStyles:b,inlineStyles:g,blockStyle:y,layoutStyle:A,popoverOpen:x,selectedAnnotationState:C,disabledFormattingTypes:k}=(0,en.A)(e.current?.selectionState)??{},v=(0,h.useMemo)(()=>p&&!p.collapsed&&p.toString().length>0,[p]),S=(0,pr.A)(n??""),I=(0,uT.A)(n??void 0,S?.templateControlValue),w=(0,h.useMemo)(()=>!!(I&&[...I.keys()].length>=pi.i),[I]),T=(0,h.useCallback)(e=>{e.preventDefault()},[]),N=(0,h.useRef)(null),M=(0,h.useCallback)(()=>{let e=N.current,t=e?.ownerDocument.activeElement;return t&&e.contains(t)},[]),[R,P]=(0,h.useState)(!1),[L,O]=(0,h.useState)([pl.o8.PARAGRAPH]),[D,U]=(0,h.useState)(!1),[B,H]=(0,h.useState)(!1),W=(0,h.useRef)(),V=(0,h.useRef)(!1),{windowRef:G}=(0,h.useContext)(K._0),q=e.current?.editorContainer?.get(),z=(0,h.useRef)({expanded:N.current?.offsetWidth||0,aiCollapsed:0,overflowCollapsed:0}),[$,Y]=(0,h.useState)({collapseAiButton:!1,collapseIntoOverflow:!1,collapseTextEmphasisFormats:!1}),Q=(0,h.useMemo)(()=>{let e=new Set;return k?.has(f.InlineFormattingType.LINK)&&e.add(pl.v_.LINK),k?.has(f.InlineFormattingType.COMMENT)&&(e.add(pl.v_.START_THREAD),e.add(pl.v_.OPEN_THREAD)),k?.has(f.InlineFormattingType.REACTION)&&(e.add(pl.v_.ADD_REACTION),e.add(pl.v_.OPEN_REACTION)),k?.has(f.InlineFormattingType.REFINEMENT)&&e.add(pl.jY.AI_REFINE),k?.has(f.InlineFormattingType.CALLOUT)&&e.add(pl.v_.CALLOUT),k?.has(f.InlineFormattingType.BLOCKQUOTE_LAYOUT)&&e.add(pl.v_.BLOCKQUOTE_LAYOUT),e},[k]),Z=(0,h.useMemo)(()=>{let e=new Map;e.set(pl.v_.LINK,k?.get(f.InlineFormattingType.LINK));let t=k?.get(f.InlineFormattingType.COMMENT);e.set(pl.v_.START_THREAD,t),e.set(pl.v_.OPEN_THREAD,t);let a=k?.get(f.InlineFormattingType.REACTION);e.set(pl.v_.ADD_REACTION,a),e.set(pl.v_.OPEN_REACTION,a);let n=k?.get(f.InlineFormattingType.REFINEMENT);return e.set(pl.jY.AI_REFINE,n),e.set(pl.v_.CALLOUT,k?.get(f.InlineFormattingType.CALLOUT)),e.set(pl.v_.BLOCKQUOTE_LAYOUT,k?.get(f.InlineFormattingType.BLOCKQUOTE_LAYOUT)),e},[k]);(0,h.useEffect)(()=>{P(M()||!!(b&&!x&&v))},[M,b,v,x]),(0,h.useEffect)(()=>{u({assertive:!0,message:R?pm.t("Formatting toolbar visible"):pm.t("Formatting toolbar hidden")})},[R,u]);let X=(0,h.useCallback)(()=>{let a=G.deref()?.getSelection(),n=!!(a&&q?.contains(a.anchorNode));if(t.current&&e.current&&q&&a&&a.rangeCount&&!a.isCollapsed&&n){let e=a.getRangeAt(0).getBoundingClientRect(),n=t.current.getBoundingClientRect(),r=q.getBoundingClientRect().width,i={top:e.top-n.top,left:e.left-n.left,width:e.width,height:e.height};return{...i,right:i.width+i.left,bottom:i.height+i.top,viewportWidth:n?.width,editorWidth:r}}return null},[t,e,G,q]),et=(0,h.useCallback)(()=>{if(V.current=!1,!e.current||!N.current||!v)return;let t=X();if(!t)return;let{editorWidth:a,viewportWidth:n,...r}=t,{collapseAiButton:i,collapseIntoOverflow:l,collapseTextEmphasisFormats:o}=$,s=N.current?.offsetHeight||0,d=N.current?.offsetWidth||0,m=n-188,u=m<z.current.expanded,p=u,h=!1;c&&(p=m<z.current.expanded,u=i&&m<(z.current.aiCollapsed||d),h=i&&l&&m<(z.current.overflowCollapsed||d),u&&0===z.current.aiCollapsed&&(z.current.aiCollapsed=d),h&&0===z.current.overflowCollapsed&&(z.current.overflowCollapsed=d)),Y({collapseAiButton:p,collapseIntoOverflow:u,collapseTextEmphasisFormats:h}),i||l||o||!(m>z.current.expanded)||(z.current.expanded=d);let _={rect:{...r},viewportWidth:n,containerLeftBound:8*!!l,containerTopBound:0,containerWidthBound:n,editorWidth:a};W.current||(W.current=(0,ps.JV)({toolbarHeight:l?2*s:s,toolbarRect:_.rect}));let{left:f,top:b}=(0,ps.Ay)({toolbarHeight:s,toolbarWidth:d,toolbarPositionData:_,toolbarPositioning:W.current,continuouslyCenterWithinEditor:!0}),{style:g}=N.current;g.transform=`translate(${f}px,${b}px)`},[e,N,v,X,V,c,$,z]),ea=(0,h.useCallback)(()=>{V.current||(V.current=!0,G.deref()?.requestAnimationFrame(et))},[et,V,G]),er=(0,h.useMemo)(()=>(0,J.A)(ea),[ea]),ei=(0,h.useMemo)(()=>new MutationObserver(ea),[ea]);(0,h.useEffect)(()=>{v&&ea()},[ea,v,p]),(0,h.useEffect)(()=>{let t=e.current;return R&&t&&(t.scrollPosition.listen(ea),er.observe(t.containerElement()),q&&ei.observe(q,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),ea()),R||(W.current=void 0),()=>{t&&(t.scrollPosition.unlisten(ea),er.unobserve(t.containerElement()),ei.disconnect())}},[e,R,ea,er,ei,q]),(0,h.useEffect)(()=>{v&&!x&&O((0,pl.RO)(y,g,A))},[v,g,y,A,x,O]);let el=(0,h.useCallback)(()=>P(!1),[]),eo=(0,h.useCallback)(()=>{let t=e.current?.docEditor;t?.focusEditor()},[e]),es=(0,h.useCallback)(()=>{M()||eo()},[M,eo]),ec=(0,h.useCallback)(()=>{e.current?.docEditor.setCurrentlyActiveReactionId(""),l((0,e0.O)()),es()},[e,l,es]),{sectionId:ed,sectionIndex:em,enableSectionNavigation:eu}=a,ep=(0,h.useCallback)(async(t,a)=>{let r=e.current?.docEditor;eo();let i="formatting-toolbar";if((0,pl.OD)(t,pl.N2)){await r?.getSelectedContent()&&r?.initiateAiAssistant(i,{initialSelectionData:{selectionInstructions:(0,pl.zd)({actionId:t,contextId:a.submenuContext},s)}}),o.track(eJ.EventId.CANVAS_SELECT_AND_REFINE,{contexts:{ui_context:{ui_component_name:eJ.UiComponentName.CANVAS_FORMATTING_TOOLBAR_MENU,action:eJ.UiAction.CLICK,ui_properties:{element_type:eJ.ElementType.MENU_ITEM,element_name:t}}}});return}if(t===pl.v_.OVERFLOW)return void H(!B);switch(H(!1),t){case pl.v_.LINK:el(),r?.toggleInlineStyle(f.DocInlineStyle.LINK,i);break;case pl.v_.START_THREAD:case pl.v_.OPEN_THREAD:el(),r?.addComment(i,!1,f.CommentUIContext.COMMENT);break;case pl.v_.INSERT_VARIABLE:r?.performActionForTemplateControl({action:f.TemplateControlAction.SHOW_CREATION_POPOVER});break;case pl.v_.SHARE_CHANNEL_CANVAS:break;case pl.v_.BOLD:r?.toggleInlineStyle(f.DocInlineStyle.BOLD,i);break;case pl.v_.ITALIC:r?.toggleInlineStyle(f.DocInlineStyle.ITALIC,i);break;case pl.v_.UNDERLINE:r?.toggleInlineStyle(f.DocInlineStyle.UNDERLINE,i);break;case pl.v_.STRIKE:r?.toggleInlineStyle(f.DocInlineStyle.STRIKETHROUGH,i);break;case pl.v_.PARAGRAPH:r?.setBlockStyle(f.DocBlockStyle.PLAIN,i);break;case pl.v_.H1:r?.setBlockStyle(f.DocBlockStyle.H1,i);break;case pl.v_.H2:r?.setBlockStyle(f.DocBlockStyle.H2,i);break;case pl.v_.H3:r?.setBlockStyle(f.DocBlockStyle.H3,i);break;case pl.v_.ORDERED_LIST:r?.setBlockStyle(f.DocBlockStyle.LIST_NUMBERED,i);break;case pl.v_.BULLET_LIST:r?.setBlockStyle(f.DocBlockStyle.LIST_BULLET,i);break;case pl.v_.CHECK_LIST:r?.setBlockStyle(f.DocBlockStyle.LIST_CHECKLIST,i);break;case pl.v_.BLOCKQUOTE:r?.setBlockStyle(f.DocBlockStyle.BLOCKQUOTE,i);break;case pl.v_.CODE:r?.toggleInlineStyle(f.DocInlineStyle.CODE,i);break;case pl.v_.CODE_BLOCK:r?.setBlockStyle(f.DocBlockStyle.CODE,i);break;case pl.v_.ADD_REACTION:{let e=await r?.addComment(i,!0,f.CommentUIContext.REACTION);e&&(r?.setCurrentlyActiveReactionId(e),l((0,ts.q)({element:h.createElement(ReactionsEmojiPicker,{commentId:e,channelId:n?(0,sU.p)(n):void 0,targetBounds:N.current?.getBoundingClientRect(),onClose:ec})})))}break;case pl.v_.OPEN_REACTION:{let e=await r?.addComment(i,!0,f.CommentUIContext.REACTION);e&&n&&(el(),r?.setCurrentlyActiveReactionId(e),l((0,ts.q)({element:h.createElement(dE.G,{fileId:n,source:i,commentId:e,targetBounds:p?.getBoundingClientRect(),onClose:ec})})))}break;case pl.v_.CALLOUT:r?.performCalloutConversion(!a.activeFormat,i);break;case pl.v_.BLOCKQUOTE_LAYOUT:r?.performBlockquoteConversion(!a.activeFormat,i);break;default:(0,e7.Ay)({label:"QUIP-FLOATING-FORMATTING-TOOLBAR"}).warn(`Quip floating toolbar was called with format that doesn't have an action defined. Format = ${t} , Source=${i} `)}},[e,eo,s,el,n,l,ec,p,o,B]),{commentCount:eh=0,reactionCount:e_=0,selectedAnnotations:ef=0}=C??{},eb=ef>1;eb||0===eh?r=pl.EM.START:eh>0&&(r=pl.EM.OPEN),eb||0===e_?i=pl.dK.START:e_>0&&(i=pl.dK.OPEN);let eg=A===f.DocLayoutStyle.TABLE||A===f.DocLayoutStyle.CALLOUT||A===f.DocLayoutStyle.FLEXBOX,{collapseIntoOverflow:ey,collapseTextEmphasisFormats:eA,collapseAiButton:ex}=$,{buttons:eE,menuItems:eC,canvasAiMenuItems:ek,overflowMenuItems:ev,canvasTextEmphasisMenuItems:eS}=(0,pc.A)({useQuipTokens:!0,useWorkflowTokens:!1,useVariables:m,reachMaxVariables:w,quipThreadButtonType:r,quipReactionButtonType:i,collapseIntoOverflow:ey,collapseTextEmphasisFormats:eA,experimentCanvasAiContentCreationGroupOn:s,experimentCanvasUnderlineGroupOn:c,experimentCanvasBlockquoteLayoutGroupOn:d,focusedInLayoutSection:eg}),eI=(0,h.useCallback)(e=>{N.current?.contains(e.target)||U(!0)},[N]),ew=(0,h.useCallback)(()=>{U(!1)},[]);(0,h.useEffect)(()=>(G.deref()?.addEventListener("mousedown",eI),G.deref()?.addEventListener("mouseup",ew),()=>{G.deref()?.removeEventListener("mousedown",eI),G.deref()?.removeEventListener("mouseup",ew)}),[G,eI,ew]);let eT=new Map;return(k?.has(f.InlineFormattingType.COMMENT)||eT.set("open-thread",eh),k?.has(f.InlineFormattingType.REACTION)||eT.set("open-reaction",e_),R)?h.createElement(to.A,{id:ed,index:em,enableSectionNavigation:v&&eu&&!x},h.createElement("div",{className:j()("p-quip_floating_formatting_bar",{"no-pointer-events":D}),ref:N,"data-qa":"p-quip_floating_formatting_bar"},h.createElement(pn.A,{"aria-label":pm.t("Formatting"),onMouseDown:T},h.createElement(po.A,{buttons:eE,activeFormats:L,disabledFormats:Q,tooltipOverrides:Z,width:N.current?.offsetWidth,isSticky:!1,onFormatButtonClick:ep,menuItems:eC,canvasAiMenuItems:ek,onEscape:el,onClosePopovers:es,selectIconSize:"18",buttonTagData:eT,menuClassNames:`p-quip_floating_formatting_bar_menu ${pa.RD}`,overflowMenuItems:ev,overflowVisible:B,canvasTextEmphasisMenuItems:eS,collapseAiButton:ex})))):null};QuipFloatingFormattingBar.displayName="QuipFloatingFormattingBar";var pu=a(0x672b7add),pp=a(0x19916b4eb);let QuipInlineCommentProvider=class QuipInlineCommentProvider extends pp.A{openCommentThreadId=null;openInlineCommentCallback;closeInlineCommentCallback;constructor(e){super(e),this.openInlineCommentCallback=e.openInlineCommentCallback,this.closeInlineCommentCallback=e.closeInlineCommentCallback}tearDown(){}openCommentsThread(e){return this.openCommentThreadId=e,e3.S.resolve(!0)}openInlineCommentsThread(e){return this.openCommentThreadId=e.commentThreadId,this.openInlineCommentCallback(e),e3.S.resolve(!0)}maybeClosePreviousCommentThreadId_(e){if(this.openCommentThreadId===e)return;let t=this.openCommentThreadId;t&&this.closeCommentThreadId_(t)}async updateCommentsThread(e){this.maybeClosePreviousCommentThreadId_(e),this.openCommentThreadId!==e&&(this.openCommentThreadId=e)}closeCommentsThread(e){this.closeInlineCommentCallback(e)}};var ph=a(0x1b8308484),p_=a(0x176a6b6c5),pf=a(0x134520457),pb=a(0xb04c4a12),pg=a(0x100c0a0c2),py=a(0x986c27f7);let pA=new S.Ay("slack_docs"),px={elementName:"inline-comment-close-icon-button",onClick:{enableClogAction:!0}},pE="DEFAULT";function QuipInlineCommentContainer({containerRef:e,docEmbedRef:t,quipThreadId:a}){let n=t.current,r=(0,_.wA)(),[i,l]=(0,h.useState)(pE),o=(0,E.d4)(e=>(0,py.R)(e,a)),s=o?(0,sU.p)(o):"",c=(0,E.d4)(e=>(0,eG.OL)(e,s)),d=(0,E.d4)(e=>(0,dN.r)(e,i)),m=d?.threadTs,u=(0,E.d4)(e=>(0,nv.Ld)(e,s,m)),p=(0,E.d4)(e=>(0,pf.A)(e,{message:u,channel:c})),{windowId:f}=(0,h.useContext)(K._0),b=(0,h.useRef)(null),[g,y]=(0,h.useState)(!1),A=(0,h.useRef)(null),[x,C]=(0,h.useState)(null),k=(0,E.d4)(eL.p6),v=(0,h.useCallback)(()=>{y(!1),l(pE),C(null)},[]),S=(0,h.useCallback)(()=>{y(!1),o&&r((0,pg.U)({fileId:o,quipCommentThreadId:i}))},[r,o,i]),I=(0,_.Pj)(),T=(0,h.useMemo)(()=>(b.current=new QuipInlineCommentProvider({dispatch:I.dispatch,getState:I.getState,quipThreadId:i||pE,openInlineCommentCallback:e=>{let{commentThreadId:t,bounds:a}=e;l(t),C(a),y(!0)},closeInlineCommentCallback:e=>{v()}}),b.current),[i,I,v]),N=(0,h.useCallback)((t=0)=>{if(e.current?.getBoundingClientRect()&&g&&x){let{left:e,top:a}=x,{style:n}=A.current;n.left=`${e}px`,n.top=`${a-t+20}px`}},[g,x,e]);if((0,h.useEffect)(()=>{if(n&&T&&"function"==typeof n.setCommentsUiProvider)return n.setCommentsUiProvider(T),()=>{T.tearDown?.(),n.setCommentsUiProvider(void 0)}},[n,T]),(0,h.useEffect)(()=>{b.current?.updateCommentsThread(g?i:null)},[g,i]),(0,h.useEffect)(()=>{if(!n||!a)return;let listener=(e,t)=>{N(t.top)};return n.scrollPosition?.listen(listener),()=>{n.scrollPosition?.unlisten(listener)}},[n,a,N]),(0,h.useEffect)(()=>{N()},[N]),!k||!i||!s||!g)return null;let M=`threads-${String(f)||"main"}-${o}-${i}`,R=k?pA.t("Close"):"Close",P=k?pA.t("Thread"):"Thread";return h.createElement("div",{ref:A,className:"p-quip_inline_comment_container__thread_content"},h.createElement(p_.Ay,{id:pb.Y.QUIP_INLINE_COMMENTS},h.createElement("div",{className:"p-quip_inline_comment_container__header"},h.createElement("div",{className:"p-quip_inline_comment_container__header_title"},P),p&&h.createElement(pu.A,{quipCommentThreadId:i}),h.createElement(as.Ay,{tip:pA.t("Open in flexpane"),position:"bottom-right",delay:as.PK},h.createElement(aN.A,{svgIconProps:{name:"sidebar"},onClick:S,"aria-label":pA.t("Open in flexpane")})),h.createElement(as.Ay,{delay:as.PK,tip:R,position:"bottom-right",hideFromScreenReader:!0},h.createElement(aN.A,{"aria-label":R,autoClogProps:{...px,elementType:pb.Y.QUIP_INLINE_COMMENTS},className:"p-quip_inline_comment_container__control",onClick:v,"data-qa":"close_flexpane"},h.createElement(w.Ah,{name:"close",size:"20"})))),h.createElement("div",{className:"p-quip_inline_comment_container__threads"},h.createElement(ph.A,{channelId:s,quipCommentThreadId:i,key:M,serializationKey:M}))))}QuipInlineCommentContainer.displayName="QuipInlineCommentContainer";var pC=((u={}).INSERTION="insertion",u.FORMATTING="formatting",u.LAYOUT="layout",u.EMOJI="emoji",u.AI="ai",u),pk=a(0x1d8af55dd),pv=a(0x1e3bedba2),pS=a(0x14cae1443);let pI=new S.Ay("slack-docs"),InsertionToolbarFormattingMenu=({menuProps:e,selectedFormat:t,onItemClick:a})=>{let n=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_blockquote_layout")),r=[...n?[]:[{format:tw.r.BLOCKQUOTE}],{format:tw.r.CODE_BLOCK},...n?[]:[{format:tw.r.MENU_SEPARATOR}],{format:tw.r.BULLET_LIST},{format:tw.r.ORDERED_LIST},{format:tw.r.CHECK_LIST},{format:tw.r.MENU_SEPARATOR},{format:tw.r.H3},{format:tw.r.H2},{format:tw.r.H1},{format:tw.r.PARAGRAPH}].map((e,n)=>{if(e.format===tw.r.MENU_SEPARATOR)return h.createElement(aT.bX,{key:`menu-insert-formatting-${n}`});let r={...(0,pv.P)(e.format),inline:!0,size:"18"},i=`menu-insert-formatting-${e.format}`;return h.createElement(aT.Dr,{label:(0,pS.O)(e.format),key:i,"data-qa":i,icon:h.createElement(w.Ah,r),type:ao.A.radio,checked:e.format===t,onSelected:()=>a({format:e.format,source:"insertion-toolbar-formatting-sub-menu"})})});return h.createElement(aT.Ay,{...e,menuClassNames:"p-quip_insertion_toolbar_formatting_menu","data-qa":"p-quip_insertion_toolbar_formatting_menu","aria-label":pI.t("Formatting options")},r)};InsertionToolbarFormattingMenu.displayName="InsertionToolbarFormattingMenu";let pw=new S.Ay("slack-docs"),InsertionToolbarLayoutMenu=({menuProps:e,onItemClick:t})=>{let a=[{format:tw.r.LAYOUT_2_COLUMNS},{format:tw.r.LAYOUT_3_COLUMNS}].map(e=>{let a={...(0,pv.P)(e.format),inline:!0,size:"18"},n=`menu-insert-layout-${e.format}`;return h.createElement(aT.Dr,{label:(0,pS.O)(e.format),key:n,"data-qa":n,icon:h.createElement(w.Ah,a),type:ao.A.default,onSelected:()=>t({format:e.format,source:"insertion-toolbar-layout-sub-menu"})})});return h.createElement(aT.Ay,{...e,menuClassNames:"p-quip_insertion_toolbar_layout_menu","data-qa":"p-quip_insertion_toolbar_layout_menu","aria-label":pw.t("Layout options",{fallbackHash:"972ad8d8a50397ba8c02433ed8f048eeb4074b85",fallbackHashNs:"quip_shortcut_handlers"})},a)};InsertionToolbarLayoutMenu.displayName="InsertionToolbarLayoutMenu";var pT=a(0xb04bc36e),pN=a(0x76230d58),pM=a(0xfc70e902),pR=a(0x18632f75a);let pP=nL.X8.Click,pL=nL.X8.Impression;nL.G7.CanvasInsertionMenuTrigger;let pO=new Map([[nL.G7.CanvasProfileMenuItemTrigger,{triggerLimit:1,clickNuxReason:"profile-menu-item-trigger-click",impressionNuxReason:"profile-menu-item-trigger-impression"}],[nL.G7.CanvasDateMentionMenuItemTrigger,{triggerLimit:1,clickNuxReason:"date-mention-menu-item-trigger-click",impressionNuxReason:"date-mention-menu-item-trigger-impression"}],[nL.G7.CanvasSFDCRecordMenuItemTrigger,{triggerLimit:1,clickNuxReason:"sfdc-record-menu-item-trigger-click",impressionNuxReason:"sfdc-record-menu-item-trigger-impression"}],[nL.G7.CanvasSFDCRecordPlaceholderMenuItemTrigger,{triggerLimit:1,clickNuxReason:"sfdc-record-placeholder-menu-item-trigger-click",impressionNuxReason:"sfdc-record-placeholder-menu-item-trigger-impression"}],[nL.G7.CanvasCalloutMenuItemTrigger,{triggerLimit:1,clickNuxReason:"callout-menu-item-trigger-click",impressionNuxReason:"callout-menu-item-trigger-impression"}]]),shouldShowMenuItemTriggerNux=(e,t,a)=>{let{clickNuxReason:n,triggerLimit:r}=pO.get(e);(0,nO.kI)(t,e,pP)||a((0,pR.b)({interactions:[{component:e,type:pP}],reason:n}));let i=Date.now()/1e3,l=(0,nO.zU)(t,e,pL)||i;return!(0,nO.rD)(t,e,pP,r)&&!(i-l>=2592e3)},recordMenuItemTriggerClick=(e,t)=>{t((0,pR.z)({component:e,type:pP,reason:pO.get(e).clickNuxReason}))},recordMenuItemTriggerImpression=(e,t)=>{t((0,pR.z)({component:e,type:pL,reason:pO.get(e).impressionNuxReason}))},pD=new S.Ay("slack-docs"),InsertionToolbarPlaceholderMenu=({menuProps:e,onItemClick:t,disabledPlaceholderInsertionTypes:a,isSalesforceRecordPlaceholderCardEnabled:n,showSFDCRecordPlaceholderMenuItemTriggerNux:r})=>{let i=(0,_.wA)();(0,h.useEffect)(()=>{r&&recordMenuItemTriggerImpression(nL.G7.CanvasSFDCRecordPlaceholderMenuItemTrigger,i)},[i,r]);let l=[{format:tw.r.PLACEHOLDER_CARD_PROFILE},{format:tw.r.PLACEHOLDER_CARD_WORKFLOW},{format:tw.r.PLACEHOLDER_CARD_CANVAS},{format:tw.r.PLACEHOLDER_CARD_IMAGE},{format:tw.r.PLACEHOLDER_CARD_FILE},{format:tw.r.PLACEHOLDER_CARD_LINK},{format:tw.r.PLACEHOLDER_CARD_VIDEO},{format:tw.r.PLACEHOLDER_CARD_AUDIO},{format:tw.r.PLACEHOLDER_CARD_LIST},{format:tw.r.PLACEHOLDER_CARD_SALESFORCE_RECORD,hide:!n}].filter(e=>!e.hide).map(e=>{let n={...(0,pv.P)(e.format),inline:!0,size:"18"},l=e.format===tw.r.PLACEHOLDER_CARD_VIDEO&&a?.has(f.PlaceholderInsertionType.VIDEO),o=e.format===tw.r.PLACEHOLDER_CARD_AUDIO&&a?.has(f.PlaceholderInsertionType.AUDIO),s=e.format===tw.r.PLACEHOLDER_CARD_FILE&&a?.has(f.PlaceholderInsertionType.FILE),c=e.format===tw.r.PLACEHOLDER_CARD_IMAGE&&a?.has(f.PlaceholderInsertionType.IMAGE),d=e.format===tw.r.PLACEHOLDER_CARD_SALESFORCE_RECORD,m=r&&d,u=(0,pS.O)(e.format);m&&(u=h.createElement(h.Fragment,null,u,h.createElement(pT.A,null,pD.t("NEW"))));let p=`menu-insert-placeholder-${e.format}`;return h.createElement(aT.Dr,{label:u,key:p,"data-qa":p,icon:h.createElement(w.Ah,n),type:ao.A.default,onSelected:()=>{d&&recordMenuItemTriggerClick(nL.G7.CanvasSFDCRecordPlaceholderMenuItemTrigger,i),t({format:e.format,source:"insertion-toolbar-placeholder-submenu"})},disabled:l||o||c||s})},[t]);return h.createElement(aT.Ay,{...e,menuClassNames:"p-quip_insertion_toolbar_placeholder_submenu","data-qa":"p-quip_insertion_toolbar_placeholder_submenu","aria-label":pD.t("Placeholder options",{fallbackHash:"6bf5da9c080bee3a8142586c412aa39971137eee",fallbackHashNs:"lists"})},l)};InsertionToolbarPlaceholderMenu.displayName="InsertionToolbarPlaceholderMenu";var pF=a(0x246d26f5),pU=a(0x138fb0cc6),pB=a(0x1c2e38de1),pH=a(0x147fb8c90),pW=a(0x609b6779);let pV=new S.Ay("slack-docs"),InsertionToolbarMenu=({menuProps:e,onItemClick:t,showProfileMenuItemTriggerNux:a,showDateMentionMenuItemTriggerNux:n,showSFDCRecordMenuItemTriggerNux:r,showSFDCRecordPlaceholderMenuItemTriggerNux:i,showCalloutMenuItemTriggerNux:l,fileId:o,disabledInsertionTypes:s,keyboardLocale:c})=>{let d=(0,_.wA)(),m=(0,E.d4)(eL.QG),u=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_blockquote_layout")),p=(0,E.d4)(o2.R5),b=(0,E.d4)(s8.Il),g=(0,pM.r)({salesElevateOrgsOnly:!1}),y=!!g.length,A=p&&!!g.length,x=(0,E.d4)(e=>(0,pH.G2)(e,"hermes__write")),C=(0,E.d4)(e=>x||"on"===(0,F._Z)(e,"hermes_free_teams")),k=(0,E.d4)(pB.p),v=k===pB.v.IMAGES_ONLY,S=k===pB.v.DISABLE_ALL,I=(0,sU.p)(o||""),T=(0,E.d4)(e=>(0,mS.O)(e,I)),N=(0,E.d4)(e=>(0,eG.OL)(e,I)),M=(0,E.d4)(e=>(0,rW.UF)(e,N)),R=(0,E.d4)(e=>(0,rW.$R)(e,N)),P=(0,E.d4)(e=>(0,tC.qR)((0,tv.H7)(e))),L=T||v||S;(0,h.useEffect)(()=>{d((0,pW.S)({reason:"canvas-insertion-toolbar-menu"}))},[d]),(0,h.useEffect)(()=>{a&&recordMenuItemTriggerImpression(nL.G7.CanvasProfileMenuItemTrigger,d),n&&recordMenuItemTriggerImpression(nL.G7.CanvasDateMentionMenuItemTrigger,d),r&&recordMenuItemTriggerImpression(nL.G7.CanvasSFDCRecordMenuItemTrigger,d),l&&recordMenuItemTriggerImpression(nL.G7.CanvasCalloutMenuItemTrigger,d)},[d,n,a,r,l]);let O=[{format:tw.r.VIDEO_CLIP,hide:!R},{format:tw.r.AUDIO_CLIP,hide:!M},{format:tw.r.MENU_SEPARATOR,hide:!M&&!R},{format:tw.r.DIVIDER},{format:tw.r.PLACEHOLDER_CARD_SUBMENU},{format:tw.r.MENU_SEPARATOR},{format:tw.r.DATE_MENTION},{format:tw.r.USER_PROFILE_UNFURL},{format:tw.r.WORKFLOW,hide:!C||!P},{format:tw.r.CALLOUT},{format:tw.r.BLOCKQUOTE_LAYOUT,hide:!u},{format:tw.r.LIST,hide:!b},{format:tw.r.CANVAS},{format:tw.r.IMAGE},{format:tw.r.FILE},{format:tw.r.SALESFORCE_DATA_MENTION,hide:!A},{format:tw.r.SALESFORCE_RECORD,hide:!y},{format:tw.r.MENU_SEPARATOR,hide:!L},{format:tw.r.FILE_UPLOAD_BLOCKED_MESSAGE_BANNER,hide:!L}],D=(0,h.useMemo)(()=>{let e=new Set;return R||e.add(f.PlaceholderInsertionType.VIDEO),M||e.add(f.PlaceholderInsertionType.AUDIO),(T||S)&&(e.add(f.PlaceholderInsertionType.FILE),e.add(f.PlaceholderInsertionType.IMAGE)),T&&(e.add(f.PlaceholderInsertionType.CANVAS),e.add(f.PlaceholderInsertionType.LIST)),v&&e.add(f.PlaceholderInsertionType.FILE),s?.has(f.SectionInsertionType.IMAGE)&&e.add(f.PlaceholderInsertionType.IMAGE),e},[R,M,T,S,v,s,T]),U=(0,h.useCallback)((e,a,n,r)=>()=>{e?recordMenuItemTriggerClick(nL.G7.CanvasProfileMenuItemTrigger,d):a?recordMenuItemTriggerClick(nL.G7.CanvasDateMentionMenuItemTrigger,d):n&&recordMenuItemTriggerClick(nL.G7.CanvasSFDCRecordMenuItemTrigger,d),t({format:r.format,source:"insertion-toolbar-sub-menu"})},[d,t]),B=(0,h.useCallback)((o,d)=>{let u;if(o.format===tw.r.MENU_SEPARATOR)return h.createElement(aT.bX,{key:`menu-insert-${d}`});if(o.format===tw.r.FILE_UPLOAD_BLOCKED_MESSAGE_BANNER){let e;return e=T?pV.t("File uploads and embedded files have been disabled in Slack Connect canvases"):T?pV.t("Your admins have disabled file uploads in this Slack Connect Canvas"):v?pV.t("At the request of your administrator, only images can be uploaded to this workspace."):pV.t("At the request of your administrator, file uploads have been disabled on this workspace."),h.createElement("span",{key:"menu",className:j()("p-shortcuts_menu_v2__option","c-select_options_list__option","c-select_options_list__group_header")},h.createElement("div",null,e))}let p=(u={...(0,pv.P)(o.format),inline:!0,size:"18"},h.createElement(w.Ah,u));if(o.format===tw.r.PLACEHOLDER_CARD_SUBMENU){let a="menu-insert-placeholder";return h.createElement(pN.A,{label:pV.t("Placeholder"),key:a,"data-qa":a,icon:p,disabled:s?.has(f.SectionInsertionType.TABLE),renderSubmenu:()=>h.createElement(InsertionToolbarPlaceholderMenu,{menuProps:e,onItemClick:t,disabledPlaceholderInsertionTypes:D,isSalesforceRecordPlaceholderCardEnabled:y,showSFDCRecordPlaceholderMenuItemTriggerNux:i})})}let _=(T||S)&&(o.format===tw.r.FILE||o.format===tw.r.IMAGE),b=T&&(o.format===tw.r.CANVAS||o.format===tw.r.LIST),g=v&&o.format===tw.r.FILE,A=o.format===tw.r.IMAGE&&s?.has(f.SectionInsertionType.IMAGE),x=o.format===tw.r.DATE_MENTION&&s?.has(f.SectionInsertionType.DATE_MENTION),E=o.format===tw.r.CALLOUT&&s?.has(f.SectionInsertionType.CALLOUT),C=o.format===tw.r.BLOCKQUOTE_LAYOUT&&s?.has(f.SectionInsertionType.BLOCKQUOTE_LAYOUT),k=o.format===tw.r.USER_PROFILE_UNFURL,I=o.format===tw.r.DATE_MENTION,N=o.format===tw.r.SALESFORCE_RECORD,M=o.format===tw.r.CALLOUT,R=a&&k||n&&I||r&&N||l&&M,P=(0,pS.O)(o.format,{experimentCanvasSmartCardsGroupOn:m});R&&(P=h.createElement(h.Fragment,null,P,h.createElement(pT.A,null,pV.t("NEW"))));let L=`menu-insert-${o.format}`;return h.createElement(aT.Dr,{label:P,key:L,"data-qa":L,icon:p,onSelected:U(k,I,N,o),disabled:_||g||A||x||E||C||b,shortcut:(0,pF.W)(o.format,c)})},[T,S,T,v,s,a,n,r,l,m,c,e,t,D,y,i,U]),H=O.filter(e=>!e.hide).map((e,t)=>B(e,t));return h.createElement(aT.Ay,{...e,menuClassNames:"p-quip_insertion_toolbar_menu","data-qa":"p-quip_insertion_toolbar_menu","aria-label":pV.t("Insertion options")},H)};InsertionToolbarMenu.displayName="InsertionToolbarMenu";let pG=(0,pU.A)(InsertionToolbarMenu);var pq=a(0x1ae6bd21),pj=a(0x1faaed399),pz=a(0x65a0a57d),pK=((p=pK||{}).BUTTON="button",p.MENU_BUTTON="menu-button",p.EMOJI_BUTTON="emoji-button",p.CANVAS_AI_BUTTON="canvas-ai-button",p);let p$=new S.Ay("slack_docs"),InsertionToolbarButtons=({onItemClick:e,onEmojiSelected:t,onMenuClose:a,firstButtonRef:n,selectedFormat:r,formattingDisabled:i,disabledInsertionTypes:l,hiddenInsertionTypes:o,fileId:s,openMenuType:c,setOpenMenuType:d,docEmbed:m})=>{let u=(0,_.wA)(),p=(0,h.useRef)(null),b=(0,E.d4)(pB.p),g=b===pB.v.IMAGES_ONLY,y=b===pB.v.DISABLE_ALL,A=(0,E.d4)(aE.c9),x=(0,h.useCallback)(e=>d(e),[d]),C="canvas-insertion-toolbar-ai-button",k=m?.docEditor,v=(0,h.useCallback)(async()=>{k&&(k.focusEditor(),k.initiateAiAssistant(C))},[k,C]),{shouldShowCanvasAiNux:S,recordWriteButtonClick:I,recordWriteButtonImpression:T}=(0,pk.A)(),N=(0,h.useCallback)(()=>{v(),I()},[I,v]),M=(0,E.d4)(e=>(0,mS.O)(e,(0,sU.p)(s||""))),R=(0,E.d4)(e=>shouldShowMenuItemTriggerNux(nL.G7.CanvasProfileMenuItemTrigger,e,u)),P=(0,E.d4)(e=>shouldShowMenuItemTriggerNux(nL.G7.CanvasDateMentionMenuItemTrigger,e,u)),L=(0,E.d4)(e=>shouldShowMenuItemTriggerNux(nL.G7.CanvasSFDCRecordMenuItemTrigger,e,u)),O=(0,E.d4)(e=>shouldShowMenuItemTriggerNux(nL.G7.CanvasSFDCRecordPlaceholderMenuItemTrigger,e,u)),D=(0,E.d4)(e=>shouldShowMenuItemTriggerNux(nL.G7.CanvasDateMentionMenuItemTrigger,e,u)),F=(0,h.useCallback)((e,t)=>{T(),a(t)},[a,T]),U=(0,h.useCallback)(e=>{e?.keyCode===t_._f&&p?.current?.focus(),T(),a(e)},[p,a,T]),renderItemTooltip=e=>{let t=e.tooltipLabel||(e.format?(0,pS.O)(e.format):"");return t?h.createElement(pq.A,{format:e.format??"",isMac:(0,ae.cX)(),label:t}):null};renderItemTooltip.displayName="renderItemTooltip";let B=(0,E.d4)(e=>(0,ep.Lp)(e,s||"")),H=(0,E.d4)(ac.bN),W=(0,h.useCallback)((t,a)=>()=>{a?N():(T(),e({format:t,source:"insertion-toolbar-main-menu"}))},[N,T,e]),V=(0,h.useCallback)(e=>e.filter(e=>!e.hide).map((e,r)=>{let i,{type:l,key:o,format:s,ariaLabel:d,svgIconProps:m,renderMenu:u,menuType:_,customButtonClasses:f,disabled:b}=e;if(!l)return null;let g=`${o}_${l}`,y=m??(0,pv.P)(s),E="menu-button"===l,C="emoji-button"===l,k=null!==c&&_===c,v="canvas-ai-button"===l,I=v&&S&&A,T=`p-quip_insertion_toolbar_${_}_menu_trigger`,N=j()(f,{[T]:E,[`${T}--open`]:E&&k,wide:I}),M=y.name?h.createElement(w.Ah,{name:y.name}):void 0,R=M;if(I){let e=H&&(B?.canvas_agent_creator_id||B?.canvas_default_agent_id)?p$.t("Write with Agent",{fallbackHash:"206911c09b910a072e5876f7f8d35acdef71e4e2",fallbackHashNs:"slack_docs"}):p$.t("Write with AI");M=h.createElement(w.Ah,{name:"ai-sparkle-filled"}),R=h.createElement("div",{className:"p-quip_insertion_toolbar_nux"},h.createElement("span",{className:"icon"},M),h.createElement("span",{className:"button-description"},e))}i=C?h.createElement(pj.A,{"data-qa":g,key:g,onEmojiSelected:t,onClose:U,shouldReturnFocusAfterClose:!1,onClick:()=>x(_)},h.createElement(pz.g,{emojiButtonRef:p,disabled:e.disabled})):h.createElement(aN.A,{"data-qa":g,className:N,size:"small","aria-label":d??"",key:g,ref:0===r?n:null,onClick:W(s,v),disabled:b},R);let P=renderItemTooltip(e);return(P&&!I&&(i=h.createElement(as.Ay,{tip:P,position:"top",key:`${g}_tooltip`,delay:500,offsetY:-7,zIndex:"above_fs"},i)),"button"===l||"emoji-button"===l||"canvas-ai-button"===l)?i:E?h.createElement(aT.cQ,{onPopoverOpen:()=>x(_),onPopoverClose:a,onTriggerClose:a,onMenuItemSelected:F,renderMenu:u,position:"top-left",offsetX:-24,offsetY:-5,key:`${g}_menu-trigger`},i):null}),[c,t,U,n,a,F,x,A,S,B,H,W]),G=[{type:"menu-button",menuType:pC.INSERTION,ariaLabel:p$.t("Open insert menu"),tooltipLabel:p$.t("Insert"),svgIconProps:{name:"plus"},key:"open-insert",customButtonClasses:"p-quip_insertion_toolbar_insertion_menu_trigger-filled",renderMenu:t=>h.createElement(pG,{menuProps:t,onItemClick:e,showProfileMenuItemTriggerNux:R,showDateMentionMenuItemTriggerNux:P,showSFDCRecordMenuItemTriggerNux:L,showSFDCRecordPlaceholderMenuItemTriggerNux:O,showCalloutMenuItemTriggerNux:D,fileId:s,disabledInsertionTypes:l})},{type:"menu-button",menuType:pC.FORMATTING,ariaLabel:p$.t("Open formatting menu"),tooltipLabel:p$.t("Formatting"),svgIconProps:{name:"formatting"},key:"open-formatting",renderMenu:t=>h.createElement(InsertionToolbarFormattingMenu,{menuProps:t,onItemClick:e,selectedFormat:r}),disabled:i},{type:"emoji-button",menuType:pC.EMOJI,key:"insert-emoji",disabled:l?.has(f.SectionInsertionType.EMOJI)},{type:"button",key:`insert-${tw.r.FILE}`,format:tw.r.FILE,ariaLabel:p$.t("Insert file"),disabled:M||y||g},{type:"button",key:`insert-${tw.r.CHECK_LIST_TOGGLE}`,format:tw.r.CHECK_LIST_TOGGLE,ariaLabel:p$.t("Insert checklist"),disabled:l?.has(f.SectionInsertionType.CHECKLIST)},{type:"button",key:`insert-${tw.r.TABLE}`,format:tw.r.TABLE,ariaLabel:p$.t("Insert table"),disabled:l?.has(f.SectionInsertionType.TABLE)},{type:"menu-button",menuType:pC.LAYOUT,ariaLabel:p$.t("Open layouts menu"),tooltipLabel:p$.t("Layouts"),svgIconProps:{name:"column-two"},key:"open-layouts",renderMenu:t=>h.createElement(InsertionToolbarLayoutMenu,{menuProps:t,onItemClick:e}),disabled:l?.has(f.SectionInsertionType.LAYOUT),hide:o?.has(f.SectionInsertionType.LAYOUT)},{type:"canvas-ai-button",ariaLabel:p$.t("Open AI menu"),tooltipLabel:p$.t("Write with AI"),svgIconProps:{name:"ai-sparkle"},key:"open-ai",disabled:!1,hide:!A}];return h.createElement(h.Fragment,null,V(G))};InsertionToolbarButtons.displayName="InsertionToolbarButtons";let pY=h.memo(InsertionToolbarButtons);var pQ=a(0x937a43ca);let pZ=new S.Ay("slack-docs");function PlaceholderInsertionModal({docEmbed:e,type:t,sectionId:a,metricSource:n}){let r=(0,_.wA)(),i=(0,en.A)(e?.placeholdersInfo),l=(0,h.useMemo)(()=>i?[...i.values()]:[],[i]),o=(0,h.useMemo)(()=>placeholder_insertion_modal_getPlaceholderDefaultName(t,l),[t,l]),[s,c]=(0,h.useState)(o);(0,h.useEffect)(()=>{c(o)},[o]);let d=(0,h.useCallback)(()=>{r((0,e0.O)())},[r]),m=(0,h.useMemo)(()=>s&&(0,pQ.Zb)(s)?pZ.t("Placeholder names can\u2019t support special characters (i.e. !#$%&)."):l.filter(e=>e.type===t).some(e=>e.name===s)?pZ.t("Placeholder names can\u2019t be duplicated."):void 0,[s,l,t]),u=(0,h.useCallback)(()=>{insertPlaceholder(e,t,a,n,s),d()},[e,d,n,s,a,t]),p=(0,h.useCallback)(e=>{c(e)},[]);return h.createElement(tk.dW,{closeModal:d},h.createElement(tk.rQ,null,h.createElement(tk.Rc,{title:pZ.rt("{placeholderTypeName} placeholder",{placeholderTypeName:getPlaceholderTypeName(t)})})),h.createElement(tk.$m,null,h.createElement(tk.qf,null,h.createElement(io.A,{id:"placeholder_insertion_title_label",text:pZ.t("Placeholder title")}),getPlaceholderDescription(t),h.createElement(is.A,{name:"placeholder-name",className:"margin_top_75",id:"placeholder-name",value:s,focusOnMount:!0,onChange:p,errorText:m,ariaDescribedById:"placeholder_insertion_title_label"}))),h.createElement(tk.jl,null,h.createElement(tk.ox,null,h.createElement(tk.s_,{type:"outline","aria-label":pZ.t("Close")},pZ.t("Close")),h.createElement(e$.Ay,{type:"primary",onClick:u,disabled:!!m},pZ.t("Insert")))))}function getPlaceholderDescription(e){let t;if(e===f.PlaceholderInsertionType.SALESFORCE_RECORD)return pZ.t("Add a title to the Salesforce record placeholder so people using your canvas will know which type of record to insert.");let a="";return e===f.PlaceholderInsertionType.CANVAS?(t=pZ.t("canvas",{fallbackHash:"a3f80b87a456136fc59c442bd1ee5b5eec2430f1",fallbackHashNs:"slack-docs"}),a=pZ.t("canvases",{fallbackHash:"a3f80b87a456136fc59c442bd1ee5b5eec2430f1",fallbackHashNs:"slack-docs"})):e===f.PlaceholderInsertionType.LIST?(t=pZ.t("list",{fallbackHash:"57c9502a7d7d48fd4a86b45fefb2b163491c3ae1",fallbackHashNs:"files"}),a=pZ.t("lists",{fallbackHash:"57c9502a7d7d48fd4a86b45fefb2b163491c3ae1",fallbackHashNs:"files"})):e===f.PlaceholderInsertionType.PROFILE&&(t=pZ.t("profile",{fallbackHash:"ff4fc0276e960c348647b647235f68200887c9d2",fallbackHashNs:"menu"}),a=pZ.t("profiles",{fallbackHash:"ff4fc0276e960c348647b647235f68200887c9d2",fallbackHashNs:"menu"})),pZ.t("Add a title to the {label} placeholder to distinctly identify your {pluralLabel}.",{label:t,pluralLabel:a})}function getPlaceholderTypeName(e){return e===f.PlaceholderInsertionType.SALESFORCE_RECORD?pZ.t("Salesforce record"):e===f.PlaceholderInsertionType.PROFILE?pZ.t("Profile",{fallbackHash:"ff4fc0276e960c348647b647235f68200887c9d2",fallbackHashNs:"menu"}):e===f.PlaceholderInsertionType.CANVAS?pZ.t("Canvas",{fallbackHash:"a3f80b87a456136fc59c442bd1ee5b5eec2430f1",fallbackHashNs:"slack-docs"}):e===f.PlaceholderInsertionType.LIST?pZ.t("List",{fallbackHash:"a1fffaaafb7cc996685bceb829c053cc4f7de43d",fallbackHashNs:"lists"}):""}function placeholder_insertion_modal_getPlaceholderDefaultName(e,t){let a=getPlaceholderTypeName(e);if(t)for(let e=0;e<10;e++){let n=0===e?a:`${a} ${e+1}`;if(!t.some(e=>e.name===n))return n}return""}PlaceholderInsertionModal.displayName="PlaceholderInsertionModal";let pJ=PlaceholderInsertionModal;var pX=a(0x41d73207),p0=a(0x1ebac3ac1);let p1=new S.Ay("quip-insertion-toolbar"),p2="insertion-toolbar-main-menu",p4=p2,QuipInsertionToolbar=({docEmbedRef:e,containerRef:t,entityId:a,teamId:n,hideToolbar:r,setIsInsertionToolbarVisible:i,sectionNavigationProps:l,openFilePickerAndInsertFile:o})=>{let s=(0,E.d4)(eL.QG),c=(0,h.useRef)(!1),{windowRef:d,windowId:m}=(0,h.useContext)(K._0),{view:u}=(0,h.useContext)(eM.A),{caretRange:p,caretSectionId:b,canEditStyles:g,blockStyle:y,disabledInsertionTypes:A,hiddenInsertionTypes:C}=(0,en.A)(e.current?.selectionState)??{},k=(0,x.QY)(a),v=(0,E.d4)(e=>tU(e,k??void 0)),S=(0,tZ.A)(u?.params?.parentTab)?u?.params?.parentTab:void 0,I=(0,h.useMemo)(()=>p&&!p.collapsed,[p]),w=(0,E.d4)(e=>(0,p0.K)(e,m)),T=(0,h.useCallback)(e=>{e.preventDefault()},[]),N=(0,h.useRef)(""),M=(0,h.useCallback)(()=>{c.current=!0},[]),R=(0,h.useCallback)(()=>{c.current=!1},[]),[P,L]=(0,h.useState)(!1),O=(0,_.wA)(),D=(0,h.useRef)(null),[F,B]=(0,h.useState)(!1),H=(0,h.useRef)(!1),W=(0,h.useCallback)(()=>{H.current=!1;let a=d.deref()?.getSelection(),n=e.current?.editorContainer?.get();if(a&&n?.contains(a.anchorNode)&&t.current){let{top:e,bottom:n}=a.getRangeAt(0).getBoundingClientRect(),{top:r,bottom:i}=t.current.getBoundingClientRect();(n<r||i<e)&&e!==n&&B(!0)}},[e,t,d]),V=(0,h.useCallback)(()=>{H.current||(H.current=!0,d.deref()?.requestAnimationFrame(W))},[W,H,d]);(0,h.useEffect)(()=>{let t=e.current;return t&&p?.collapsed&&!F&&(t.scrollPosition.listen(V),V()),()=>{t&&t.scrollPosition.unlisten(V)}},[e,p,V,F]),(0,h.useEffect)(()=>{B(!1)},[B,p]);let[G,q]=(0,h.useState)(null),[z,$]=(0,h.useState)(!1),Y=!r&&!F,Q=z||!!G||!I&&b&&!w&&P||c.current,Z=(0,h.useMemo)(()=>Y&&Q,[Y,Q]),J=(0,h.useCallback)(()=>{D.current?.focus()},[]);(0,h.useEffect)(()=>{b&&(N.current=b)},[N,b]),(0,h.useEffect)(()=>{i(!!Z)},[i,Z]);let X=(0,h.useCallback)((t,a)=>{let n=N.current;e.current&&optimisticallyInsertFiles(e.current?.docEditor,[a],n,p4)},[e]),ee=(0,h.useCallback)(e=>{O((e===tw.r.AUDIO_CLIP?tN.A:tM.A)({onContainerUpload:X}))},[O,X]),et=(0,h.useCallback)((t,a)=>{let n=a?.shortcut_url??a?.share_url;if(!n)return;let r=e.current?.docEditor;r?.focusEditor();let i=N.current;r?.insertSlackObject({type:f.SlackObjectType.LINK,id:t,url:n},{sectionId:i},p4)},[e]),ea=(0,h.useCallback)(()=>({sectionId:N.current,cardRenderType:f.SlackListContentRenderType.EMBED}),[]),er=(0,h.useCallback)(({fileId:t,listViewId:a})=>{let r=e.current?.docEditor;r?.focusEditor();let i=ea();O((0,tl.PF)({fileId:t})).then(e=>{let l=(0,U.IE)(e,n??"","","",a);r?.insertSlackObject({type:f.SlackObjectType.LIST,id:t,permalink:l},i,p4),O((0,tO.A)({source:tA.O.TOOLBAR,parentCanvasId:k,embeddedFileId:t}))})},[O,n,k,ea,e]),ei=(0,h.useCallback)(()=>{let t=e.current?.docEditor;t?.focusEditor();let a=ea();t?.insertSlackObject({type:f.SlackObjectType.LIST,id:"",permalink:""},a,p4)},[e,ea]),el=(0,h.useCallback)(t=>{let a=e.current?.docEditor;a?.focusEditor(),O((0,tl.PF)({fileId:t})).then(e=>{let r=N.current,i=k===t,l={type:f.SlackObjectType.DOCUMENT,id:t,name:(0,tP.SB)(e)||"",isSameDocument:i,permalink:(0,U.IE)(e,n??"","","")};a?.insertSlackObject(l,{sectionId:r,useDefaultFormat:!0},p4),O((0,tO.A)({source:tA.O.TOOLBAR,parentCanvasId:k,embeddedFileId:t}))})},[e,O,n,k]),eo=(0,h.useCallback)((t,a)=>{if(!t)return;let n=e.current?.docEditor;n?.focusEditor();let r=N.current;n?.insertSlackObject({type:f.SlackObjectType.LINK,id:t,url:a},{sectionId:r},p4)},[e]),es=(0,h.useCallback)(t=>{let a=e.current,n=N.current;a&&insertPlaceholder(a,t,n,p4)},[e]),ec=(0,h.useCallback)(t=>{let a=e.current,n=N.current;a&&O((0,ts.q)({element:h.createElement(pJ,{docEmbed:a,type:t,sectionId:n,metricSource:p4})}))},[O,e]),ed=(0,h.useCallback)(()=>{let t=e.current?.docEditor;t?.focusEditor();let a=N.current,n={type:f.SlackObjectType.DOCUMENT,id:"",name:"",pendingCreation:!0};t?.insertSlackObject(n,{sectionId:a,useDefaultFormat:!0},p4)},[e]),em=(0,h.useCallback)(()=>{O((0,tg.Ay)({onInsertCanvas:el,onInsertNewCanvas:ed,source:p2}))},[O,el,ed]),eu=(0,h.useCallback)(()=>{O((0,tT.Ay)({onInsertList:er,onInsertNewList:ei,source:p2}))},[O,er,ei]),ep=(0,h.useCallback)(()=>{O((0,tR.Ay)({source:p2,onInsertWorkflow:et}))},[O,et]),eh=(0,h.useCallback)(()=>{O(openUserPicker({onUserSelect:eo}))},[O,eo]),e_=(0,h.useCallback)((t,a)=>{let n=e.current?.docEditor;n?.focusEditor();let r=N.current;n?.insertSlackObject({type:f.SlackObjectType.LINK,id:a,url:t},{sectionId:r},p4)},[e]),ef=(0,h.useCallback)(()=>{O((0,ty.b)({onInsertRecord:e_,source:"quip-insertion-toolbar"}))},[O,e_]),eb=(0,h.useCallback)((t,a,n,r,i,l)=>{let o=e.current?.docEditor;o?.focusEditor();let s=N.current;o?.insertSlackObject({type:f.SlackObjectType.SALESFORCE_RECORD,id:a,permalink:t,fieldLabel:n,fieldApiName:r,includeFieldLabel:l},{sectionId:s},p4),i&&k&&O((0,tD.h)({canvasId:k,selection:i}))},[e,O,k]),eg=(0,h.useCallback)(()=>{O((0,ty.b)({onInsertRecord:eb,source:"quip-insertion-toolbar",includeFieldPicker:!0,defaultOrgId:v.orgId,defaultObjectType:v.objectType,defaultRecord:v.record}))},[O,eb,v]),ey=(0,h.useCallback)(()=>{let t=e.current?.docEditor,a=N.current;if(s&&S){let e;t?.focusEditor();let n=(e=generateSmartSummaryCardComponentId({channelId:S}),{type:f.SlackObjectType.GENERIC,id:e});t?.insertSlackObject(n,{sectionId:a})}},[S,e,s]),eA=(0,h.useCallback)(()=>{let t=e.current?.docEditor,a=N.current;if(s&&S){let e;t?.focusEditor();let n=(e=generateRecentFilesCardComponentId({channelId:S}),{type:f.SlackObjectType.GENERIC,id:e});t?.insertSlackObject(n,{sectionId:a})}},[S,e,s]),ex=(0,h.useCallback)(()=>{let t=e.current?.docEditor,a=N.current;if(s&&S){let e;t?.focusEditor();let n=(e=generateActiveDiscussionsCardComponentId({channelId:S}),{type:f.SlackObjectType.GENERIC,id:e});t?.insertSlackObject(n,{sectionId:a})}},[S,e,s]),eE=(0,h.useCallback)(()=>{let t=e.current?.docEditor,a=N.current;if(s&&S){let e;t?.focusEditor();let n=(e=generateChannelHuddlesCardComponentId({channelId:S}),{type:f.SlackObjectType.GENERIC,id:e});t?.insertSlackObject(n,{sectionId:a})}},[S,e,s]),eC=(0,h.useCallback)((t,a)=>{let r=e.current?.docEditor;if(!r)return;r.focusEditor();let i=N.current,l={type:f.SlackObjectType.EMOJI,id:a,teamId:n??"",displayUrl:""};r.insertSlackObject(l,{sectionId:i},`${p2}-emoji`)},[e,N,n]),ek=(0,h.useCallback)(({format:t,source:a})=>{let n=e.current?.docEditor;switch(p4=`${a}-${t}`,t){case tw.r.AI_ASSISTANT:n?.initiateAiAssistant(p4);break;case tw.r.AI_ASSISTANT_CANVAS_SUMMARY:n?.initiateAiAssistant(p4,{starterPrompt:(0,tL.nK)(tL.Ex.CANVAS_SUMMARY)});break;case tw.r.AI_ASSISTANT_CANVAS_ACTION_ITEMS:n?.initiateAiAssistant(p4,{starterPrompt:(0,tL.nK)(tL.Ex.CANVAS_ACTION_ITEMS)});break;case tw.r.DATE_MENTION:n?.focusEditor(),n?.insertDateMention(p4);break;case tw.r.LAYOUT_2_COLUMNS:n?.insertLayout({numColumns:2},p4);break;case tw.r.LAYOUT_3_COLUMNS:n?.insertLayout({numColumns:3},p4);break;case tw.r.DIVIDER:n?.insertSection(f.SectionInsertionType.HORIZONTAL_RULE,p4);break;case tw.r.TABLE:n?.insertSection(f.SectionInsertionType.TABLE,p4);break;case tw.r.CALLOUT:n?.insertSection(f.SectionInsertionType.CALLOUT,p4);break;case tw.r.BLOCKQUOTE_LAYOUT:n?.insertSection(f.SectionInsertionType.BLOCKQUOTE_LAYOUT,p4);break;case tw.r.CHECK_LIST:n?.setBlockStyle(f.DocBlockStyle.LIST_CHECKLIST,p4);break;case tw.r.CHECK_LIST_TOGGLE:n?.toggleBlockStyle(f.DocBlockStyle.LIST_CHECKLIST,p4);break;case tw.r.BULLET_LIST:n?.setBlockStyle(f.DocBlockStyle.LIST_BULLET,p4);break;case tw.r.ORDERED_LIST:n?.setBlockStyle(f.DocBlockStyle.LIST_NUMBERED,p4);break;case tw.r.PARAGRAPH:n?.setBlockStyle(f.DocBlockStyle.PLAIN,p4);break;case tw.r.H1:n?.setBlockStyle(f.DocBlockStyle.H1,p4);break;case tw.r.H2:n?.setBlockStyle(f.DocBlockStyle.H2,p4);break;case tw.r.H3:n?.setBlockStyle(f.DocBlockStyle.H3,p4);break;case tw.r.BLOCKQUOTE:n?.setBlockStyle(f.DocBlockStyle.BLOCKQUOTE,p4);break;case tw.r.CODE_BLOCK:n?.setBlockStyle(f.DocBlockStyle.CODE,p4);break;case tw.r.IMAGE:case tw.r.FILE:o(t,p4);break;case tw.r.AUDIO_CLIP:case tw.r.VIDEO_CLIP:ee(t);break;case tw.r.SMART_SUMMARY:s&&ey();break;case tw.r.RECENT_FILES:s&&eA();break;case tw.r.ACTIVE_DISCUSSIONS:s&&ex();break;case tw.r.CHANNEL_HUDDLES:s&&eE();break;case tw.r.CANVAS:em();break;case tw.r.WORKFLOW:ep();break;case tw.r.LIST:eu();break;case tw.r.USER_PROFILE_UNFURL:eh();break;case tw.r.SALESFORCE_RECORD:ef();break;case tw.r.PLACEHOLDER_CARD_VIDEO:es(f.PlaceholderInsertionType.VIDEO);break;case tw.r.PLACEHOLDER_CARD_PROFILE:ec(f.PlaceholderInsertionType.PROFILE);break;case tw.r.PLACEHOLDER_CARD_AUDIO:es(f.PlaceholderInsertionType.AUDIO);break;case tw.r.PLACEHOLDER_CARD_WORKFLOW:es(f.PlaceholderInsertionType.WORKFLOW);break;case tw.r.PLACEHOLDER_CARD_IMAGE:es(f.PlaceholderInsertionType.IMAGE);break;case tw.r.PLACEHOLDER_CARD_CANVAS:ec(f.PlaceholderInsertionType.CANVAS);break;case tw.r.PLACEHOLDER_CARD_FILE:es(f.PlaceholderInsertionType.FILE);break;case tw.r.PLACEHOLDER_CARD_LINK:es(f.PlaceholderInsertionType.LINK);break;case tw.r.PLACEHOLDER_CARD_LIST:ec(f.PlaceholderInsertionType.LIST);break;case tw.r.PLACEHOLDER_CARD_SALESFORCE_RECORD:ec(f.PlaceholderInsertionType.SALESFORCE_RECORD);break;case tw.r.SALESFORCE_DATA_MENTION:eg();break;default:(0,e7.Ay)({label:"QUIP-INSERTION-TOOLBAR"}).warn(`Quip insertion toolbar onItemClick was called with format that doesn't have an action defined. Format = ${t} Source = ${a} `)}},[e,o,ee,s,em,ep,eu,eh,ef,es,ec,ey,eA,ex,eE,eg]);(0,h.useEffect)(()=>{let t=e.current?.docEditor;t?.canInsertInSection(b).then(e=>{void 0!==e&&L(e)})},[e,b]);let ev=(0,h.useCallback)(t=>{t&&"Escape"===t.key||(e.current?.docEditor?.focusEditor(),R(),G===pC.EMOJI&&($(!0),setTimeout(()=>$(!1),600))),q(null)},[e,R,G]),{sectionId:eS,sectionIndex:eI,enableSectionNavigation:ew}=l,eT=j()("p-quip_insertion_toolbar",{"p-quip_insertion_toolbar--hidden":!Z});return h.createElement(to.A,{id:eS,index:eI,focusFn:J,enableSectionNavigation:Z&&ew,onFocus:M,onBlur:R},h.createElement("div",{className:eT,"data-qa":"p-quip_insertion_toolbar"},h.createElement(pn.A,{"aria-label":p1.t("Content insertion",{fallbackHash:"56d36963d4a29061dd8536567661cd9102425b83"}),className:"p-quip_insertion_toolbar_inner",onMouseDown:T},h.createElement(pY,{onItemClick:ek,onEmojiSelected:eC,firstButtonRef:D,selectedFormat:y?(0,pX.Zq)(y):void 0,formattingDisabled:!P||!g,disabledInsertionTypes:A,hiddenInsertionTypes:C,fileId:k,openMenuType:G,setOpenMenuType:q,onMenuClose:ev,docEmbed:e.current}))))};QuipInsertionToolbar.displayName="QuipInsertionToolbar";var p5=a(0x8601851c);function bindQuipKeyCommands(e,t,a){let n="canvas-keyboard-shortcut",callHandlerAndStopPropagation=t=>a=>{t(e.docEditor),a.stopImmediatePropagation(),a.preventDefault()},toggleBlockStyle=e=>callHandlerAndStopPropagation(t=>t.toggleBlockStyle(e,n)),toggleInlineStyle=e=>callHandlerAndStopPropagation(t=>t.toggleInlineStyle(e,n)),{container:r,editorContainer:i,annotationsEnabled:l,a11yReadOnlyModeAvailable:o,aiCreationEnabled:s,underlineEnabled:c,blockquoteLayoutEnabled:d}=t,m=new p5.A(r),u=new p5.A(i),{openFilePickerAndInsertFile:p,printCanvas:h}=a;return m.bindAll([{keys:["mod+f"],handler:callHandlerAndStopPropagation(e=>e.find({findNext:!0}))},{keys:["mod+shift+f"],handler:callHandlerAndStopPropagation(e=>e.find({findPrevious:!0}))},{keys:(0,ae.X5)()===ae.h5.SAFARI?["ctrl+r"]:["mod+alt+r"],handler:callHandlerAndStopPropagation(e=>e.toggleA11yReadOnlyMode()),filter:()=>!o},{keys:["mod+p"],handler:callHandlerAndStopPropagation(()=>h?.()),filter:()=>!h}]),u.bindAll([{keys:["mod+shift+u"],handler:callHandlerAndStopPropagation(e=>e.insertLink())},{keys:["mod+b"],handler:toggleInlineStyle(f.DocInlineStyle.BOLD)},{keys:["mod+i"],handler:toggleInlineStyle(f.DocInlineStyle.ITALIC)},{keys:["mod+shift+x"],handler:toggleInlineStyle(f.DocInlineStyle.STRIKETHROUGH)},{keys:["mod+shift+c"],handler:toggleInlineStyle(f.DocInlineStyle.CODE)},{keys:["mod+alt+0"],handler:toggleBlockStyle(f.DocBlockStyle.PLAIN)},{keys:["mod+alt+1"],handler:toggleBlockStyle(f.DocBlockStyle.H1)},{keys:["mod+alt+2"],handler:toggleBlockStyle(f.DocBlockStyle.H2)},{keys:["mod+alt+3"],handler:toggleBlockStyle(f.DocBlockStyle.H3)},{keys:["mod+shift+7"],handler:toggleBlockStyle(f.DocBlockStyle.LIST_NUMBERED)},{keys:["mod+shift+8"],handler:toggleBlockStyle(f.DocBlockStyle.LIST_BULLET)},{keys:["mod+shift+."],handler:callHandlerAndStopPropagation(e=>{d?e.toggleBlockquoteLayout(n):e.toggleBlockStyle(f.DocBlockStyle.BLOCKQUOTE,n)})},{keys:(0,ae.uF)()?["mod+shift+9"]:["mod+shift+9","mod+shift+0"],handler:toggleBlockStyle(f.DocBlockStyle.LIST_CHECKLIST)},{keys:["mod+alt+shift+c"],handler:toggleBlockStyle(f.DocBlockStyle.CODE)},{keys:["mod+alt+up"],handler:callHandlerAndStopPropagation(e=>e.moveListItem(!0))},{keys:["mod+alt+down"],handler:callHandlerAndStopPropagation(e=>e.moveListItem(!1))},{keys:["mod+z"],handler:callHandlerAndStopPropagation(e=>e.undo())},{keys:(0,ae.uF)()?["mod+y","mod+shift+z"]:["mod+shift+z"],handler:callHandlerAndStopPropagation(e=>e.redo())},{keys:["ctrl+`"],handler:callHandlerAndStopPropagation(e=>e.cycleSectionStyle(!0))},{keys:["ctrl+shift+`"],handler:callHandlerAndStopPropagation(e=>e.cycleSectionStyle(!1))},{keys:["mod+alt+t"],handler:callHandlerAndStopPropagation(e=>e.openOrStartCommentsThread(n,f.CommentUIContext.COMMENT)),filter:()=>!l},{keys:["mod+alt+e"],handler:callHandlerAndStopPropagation(e=>e.openOrStartCommentsThread(n,f.CommentUIContext.REACTION)),filter:()=>!l},{keys:["ctrl+alt+q"],handler:callHandlerAndStopPropagation(e=>e.copyAnchorLink())},{keys:(0,ae.uF)()?["shift+f10"]:["ctrl+enter","mod+shift+/"],handler:callHandlerAndStopPropagation(e=>e.showContextMenu())},{keys:["mod+u"],handler:callHandlerAndStopPropagation(e=>{c?e.toggleInlineStyle(f.DocInlineStyle.UNDERLINE,n):p?.(tw.r.FILE,n)})},{keys:["mod+o"],handler:callHandlerAndStopPropagation(()=>{c&&p?.(tw.r.FILE,n)})},{keys:["mod+alt+a"],handler:callHandlerAndStopPropagation(e=>e.initiateAiAssistant()),filter:()=>!s}]),()=>{m.reset(),u.reset()}}var p3=a(0xf66117e7),p6=a(0x33d4dc43);function useIsAuthed(){let e=(0,_.wA)(),[t,a]=(0,h.useState)(null);return(0,h.useEffect)(()=>{e((0,p6.T)()).then(a)},[e]),t}var p8=a(0x12c020c3),p7=a(0xf3b0bc58);function QuipNotLoadedIllustration(){return h.createElement("div",null,h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"267",height:"162",fill:"none"},h.createElement("g",{clipPath:"url(#a)"},h.createElement("path",{fill:"#464145",d:"M200.252 147.987s20.175.371 31.748-3.487c6-2 14-7 19.5-15 4.148-6.033 5.521-18.234-.74-18.234-6.26 0-4.26 4.734-4.76 8.734a18.883 18.883 0 0 1-4 9.5c-4 5-10.073 7.297-14.5 9-13 5-28.829 2.679-28.829 2.679l1.581 6.808ZM135.841 98.207l-21.221 12.655a7.67 7.67 0 0 0-1.948 8.495c1.963 5.229 6.539 9.159 10.465 7.839l.856-9.923a17.241 17.241 0 0 1 14.392-4.442l-2.544-14.624ZM149.285 50.731s9.488-12.746 17.333-14.051c-.407 4.613-1.075 9.2-2.001 13.739l-15.332.313Z"}),h.createElement("path",{fill:"#FED4BE",d:"M166.618 36.68s-6.875 9.03-6.875 13.83l4.874-.091s1.673-8.84 2.001-13.74Z"}),h.createElement("path",{fill:"#000",d:"M174.593 69.378c1.729.443 3.428.993 5.088 1.649a37.24 37.24 0 0 1 4.843 2.29 21.1 21.1 0 0 1 4.285 3.053 10.518 10.518 0 0 1 2.827 4.35.33.33 0 0 0 .601.052.32.32 0 0 0 .025-.243 11.21 11.21 0 0 0-2.872-4.747 22.274 22.274 0 0 0-4.37-3.39 38.426 38.426 0 0 0-4.911-2.472 44.826 44.826 0 0 0-5.21-1.824.659.659 0 0 0-.764.458.645.645 0 0 0 .458.763v.061ZM177.175 73.874a29.121 29.121 0 0 1 2.987 1.84 22.399 22.399 0 0 1 2.727 2.183 13.477 13.477 0 0 1 2.231 2.663c.618.964 1 2.06 1.115 3.198a.327.327 0 0 0 .325.279.331.331 0 0 0 .214-.08.33.33 0 0 0 .11-.198 7.87 7.87 0 0 0-1.062-3.573 14.06 14.06 0 0 0-2.238-2.946 24.428 24.428 0 0 0-2.742-2.442 30.057 30.057 0 0 0-3.056-2.069.65.65 0 0 0-.5-.069.663.663 0 0 0-.401.306.657.657 0 0 0 .237.893l.053.015Z"}),h.createElement("path",{fill:"#B1B1B1",d:"M129.753 148.117h17.455l2.734-21.562c.222 1.114 1.291 3.137 2.644 5.442v.046c2.612 4.412 6.286 9.793 7.142 11.502.448.871.693 1.831.718 2.809.008.327-.015.654-.069.977a4.97 4.97 0 0 1-.122.527c-.053.168-.092.259-.092.259h44.069c1.528-1.526 2.559-3.953 3.239-6.487a30.106 30.106 0 0 0-2.933-22.639c-.39-.687-.764-1.351-1.222-1.984-6.791-10.32-17.348-15.189-20.671-16.601-4.584-1.962-11.772-9.16-13.75-14.38a11.614 11.614 0 0 1-.871-4.061c0-1.9.871-2.473.871-2.473s5.232-1.962 7.852-4.58c2.621-2.618 1.307-11.762 1.307-11.762 5.232-5.884 9.166-14.38 9.166-14.38-6.546-.656-13.085 4.58-13.085 4.58a32.382 32.382 0 0 0-17.004-5.877c-10.466-.657-13.75 9.8-16.355 15.685a10.768 10.768 0 0 0-.566 1.527 10.916 10.916 0 0 0 .176 6.732 8.22 8.22 0 0 1 0 5.281 999.032 999.032 0 0 0-2.291 6.977c-1.979 6.304-4.187 13.868-4.538 17.349-.535 5.343 3.926 13.739 5.233 23.531 1.306 9.793-1.964 16.334-1.964 16.334-7.165 1.992-7.073 7.228-7.073 7.228Z"}),h.createElement("path",{fill:"#FED4BE",d:"m177.412 56.616.657 6.534c5.233-5.885 9.167-14.38 9.167-14.38s-7.861 3.938-9.824 7.846Z"}),h.createElement("path",{fill:"#464145",d:"M138.125 83.705s5.928 1.015 9.854-1.603c3.927-2.618 0-6.534-2.62-9.8a76.551 76.551 0 0 1-5.141-7.587 10.916 10.916 0 0 0 .176 6.732 8.234 8.234 0 0 1 0 5.282 346.221 346.221 0 0 0-2.269 6.976ZM170.216 113.473c10.129 7.586 17.807 12.12 33.1 3.526-6.791-10.312-17.348-15.182-20.671-16.594-4.584-1.961-11.772-9.159-13.75-14.38a11.614 11.614 0 0 1-.871-4.06 83.496 83.496 0 0 1-4.362 9.289c-1.948 3.267-3.911 14.38 6.554 22.219ZM183.302 127.851c.649 3.267 5.232 7.19 9.808 5.229 4.576-1.962 5.233-5.229 2.62-7.19-2.612-1.962-13.085-1.305-12.428 1.961Z"}),h.createElement("path",{fill:"#000",d:"m149.285 122.623.657 3.923 2.643 5.442v.046c2.613 4.412 6.287 9.793 7.143 11.503.448.87.693 1.83.718 2.808.313-2.862 1.803-8.273 8.647-8.907.023-.008-5.416-14.815-19.808-14.815Z",opacity:".3"}),h.createElement("path",{fill:"#000",d:"M160.736 56.937a1.306 1.306 0 1 1 0-2.612 1.306 1.306 0 0 1 0 2.612ZM173.165 62.165a1.306 1.306 0 1 1 0-2.612 1.306 1.306 0 0 1 0 2.612Z"}),h.createElement("path",{fill:"#000",d:"M158.773 55.478a.527.527 0 0 0 .275-.084 3.174 3.174 0 0 1 3.369 0 .504.504 0 0 0 .557-.831 4.163 4.163 0 0 0-4.476 0 .494.494 0 0 0-.211.562.493.493 0 0 0 .486.353ZM175.021 60.517a.51.51 0 0 0 .42-.222.502.502 0 0 0-.13-.717 4.178 4.178 0 0 0-4.484 0 .5.5 0 0 0-.264.532.495.495 0 0 0 .229.342.502.502 0 0 0 .593-.042 3.162 3.162 0 0 1 3.369 0c.077.06.17.096.267.107ZM164.932 72.525c-1.889-.616-3.103-2.09-2.71-3.292.392-1.202 2.242-1.678 4.131-1.062 1.889.615 3.102 2.089 2.71 3.291-.392 1.203-2.242 1.678-4.131 1.063Z"}),h.createElement("path",{fill:"#F4EDE4",d:"M158.586 68.212c-.45-1.747 1.168-3.675 3.615-4.305 2.447-.63 4.796.275 5.247 2.022.451 1.746-1.167 3.674-3.614 4.304-2.447.63-4.797-.274-5.248-2.021Z"}),h.createElement("path",{fill:"#F4EDE4",d:"M167.256 71.34c-1.787-1.785-2.201-4.267-.924-5.543 1.277-1.275 3.76-.862 5.547.923 1.787 1.786 2.201 4.267.924 5.543-1.277 1.276-3.761.863-5.547-.923Z"}),h.createElement("path",{fill:"#464145",d:"M164.884 63.822s.451-1.366 3.056-1a2.51 2.51 0 0 1 2.154 2.649l-2.674.313-2.536-1.962Z"}),h.createElement("path",{fill:"#000",d:"M154.747 59.577a44.786 44.786 0 0 0-3.819-3.953 38.208 38.208 0 0 0-4.316-3.412 21.973 21.973 0 0 0-4.912-2.496 11.315 11.315 0 0 0-5.523-.618.327.327 0 0 0-.267.374.32.32 0 0 0 .359.275c1.75-.176 3.517.086 5.141.763a20.923 20.923 0 0 1 4.637 2.572 36.566 36.566 0 0 1 4.056 3.442 41.48 41.48 0 0 1 3.605 3.931.657.657 0 0 0 .692.218.656.656 0 0 0 .332-1.034l.015-.062ZM149.339 58.93a29.008 29.008 0 0 0-3.162-1.886 23.562 23.562 0 0 0-3.369-1.465 14.128 14.128 0 0 0-3.621-.763 7.79 7.79 0 0 0-3.697.542.328.328 0 0 0-.176.427.335.335 0 0 0 .42.176 7.194 7.194 0 0 1 3.369-.336 13.13 13.13 0 0 1 3.361.9c1.089.427 2.144.938 3.155 1.527a27.745 27.745 0 0 1 2.956 1.923.66.66 0 0 0 1.013-.055.654.654 0 0 0-.022-.806.659.659 0 0 0-.227-.177v-.007ZM164.884 63.822s2.658-.305 2.529 1.962l-2.529-1.962Z"}),h.createElement("path",{fill:"#000",d:"M170.086 65.47s-.58-1.305-2.673.313l2.673-.313Z"})),h.createElement("path",{fill:"#C9C9C9",d:"M166.919 148.616s-3.559-3.199-5.394-3.199h-33.84a6.053 6.053 0 0 1-5.607-3.772L99.527 86.229a6.252 6.252 0 0 0-5.805-3.871H15.076a4.002 4.002 0 0 0-3.76 5.488l23.136 56.902a6.118 6.118 0 0 0 5.536 3.852l126.931.016Z"}),h.createElement("path",{fill:"#E5E5E5",d:"M120.69 148.615H38.873a5.725 5.725 0 0 1-5.315-3.595l-11.51-28.682a.032.032 0 0 0 0-.024l-10.82-26.923a3.91 3.91 0 0 1 3.63-5.362H90.69a6.027 6.027 0 0 1 5.595 3.78l24.406 60.806Z"}),h.createElement("path",{fill:"#C9C9C9",d:"M95.292 148.615h-56.42a5.724 5.724 0 0 1-5.315-3.595l-11.51-28.682.111.186a61.387 61.387 0 0 0 48.408 30.224l24.726 1.867Z"}),h.createElement("defs",null,h.createElement("clipPath",{id:"a"},h.createElement("path",{fill:"#fff",d:"M258.575 36.68H112.106v112.33h146.469z"})))))}QuipNotLoadedIllustration.displayName="QuipNotLoadedIllustration";let p9=h.memo(QuipNotLoadedIllustration);var he=a(0x23016ed88),ht=a(0x9e5ec77e),ha=a(0x1ef19e2e2),hn=a(0x78b6120c);let hr=new S.Ay("slack_docs");function getErrorCode(e){return e&&`QCE${(0,ha.B)((0,ht.A)(e)).substr(0,9).toUpperCase()}`}function QuipEmptyState({title:e,description:t,showReloadButton:a=!1,errorMessage:n,logger:r}){let i=(0,h.useCallback)(()=>{let e=window.location.href;e=(0,p8.M6)(window.location.href,"force_cold_boot",1),r?.info("GANTRY",`Reloading at ${e} after hitting QuipLoadErrorState`),(0,hn.Lz)().finally(()=>{window.location.href=e})},[r]),l=getErrorCode(n);return(0,h.useEffect)(()=>{if(l&&r){let e=r.error;n?.startsWith("OFFLINE")&&(e=r.warn),e(Error(`[QuipLoadError] Code: ${l}, Message: ${n}`))}},[l,n,r]),h.createElement("div",{className:"p-quip_empty_state"},h.createElement(p9,null),h.createElement(p7.A,{className:"p-quip_empty_state--empty_state",description:t,title:e}),l&&h.createElement(he.A,{errCode:l}),a&&h.createElement(e$.Ay,{type:r5.QE.primary,onClick:i,"data-qa":"error_reload"},hr.t("Reload Slack",{fallbackHash:"cce7155371fc26686b89c7452337d8419692f31e"})))}QuipEmptyState.displayName="QuipEmptyState";let hi=QuipEmptyState,hl=new S.Ay("slack_docs");function QuipDelayedLoadingState({logger:e}){let t=!!useIsAuthed(),a=hl.t("This is taking a while\u2026"),n=hl.t("You might want to refresh Slack to try again.");return h.createElement(Y.A,{eventId:eJ.EventId.QUIP_EMBED_SLOW,clogImpression:t},h.createElement(hi,{title:a,description:n,showReloadButton:!0,logger:e}))}QuipDelayedLoadingState.displayName="QuipDelayedLoadingState";let ho=QuipDelayedLoadingState,hs=new S.Ay("slack_docs");function QuipLoadErrorState({logger:e,errorMessage:t,previouslyDelayed:a,canvasName:n}){let r=a?eJ.UiComponentVariant.QUIP_LOADING_ERROR_AFTER_DELAY:eJ.UiComponentVariant.QUIP_LOADING_ERROR_NO_DELAY;(t?.startsWith("OFFLINE")||t?.startsWith("DEGRADED"))&&(r=eJ.UiComponentVariant.QUIP_NETWORK_LOADING_ERROR);let i=!!useIsAuthed(),l=t?.includes("413")||t?.toLowerCase().includes("document is too large"),o=hs.t("Something went wrong"),s=hs.t("Refresh Slack to try again.");return l&&(o=hs.t("Canvas is too large",{fallbackHash:"a0704a4eaa055ab08e3766911e446737f4f2a445",fallbackHashNs:"file-upload"}),s=n?hs.t('The canvas "{canvasName}" is too large to load or update. To fix this, reduce the canvas size by removing content, or create a new canvas.',{canvasName:n,fallbackHash:"a0704a4eaa055ab08e3766911e446737f4f2a445",fallbackHashNs:"file-upload"}):hs.t("This canvas is too large to load or update. To fix this, reduce the canvas size by removing content, or create a new canvas.",{fallbackHash:"49d15da0618fa9ec42fd67f48c8b1ffc46da82aa",fallbackHashNs:"lists"})),h.createElement(Y.A,{eventId:eJ.EventId.QUIP_LOADING_ERROR,clogImpression:i,uiComponentVariant:r},h.createElement(hi,{title:o,description:s,showReloadButton:!0,logger:e,errorMessage:t}))}QuipLoadErrorState.displayName="QuipLoadErrorState";let hc=QuipLoadErrorState,hd=new S.Ay("offline_mode");function QuipOfflineState(){let e=hd.t("No connection"),t=hd.t("Your canvas will come back when you\u2019re online.");return h.createElement(hi,{title:e,description:t})}QuipOfflineState.displayName="QuipOfflineState";let hm=QuipOfflineState;var hu=a(0x996ac5ba),hp=a.n(hu),hh=a(0x1d5f57074),h_=a(0x1a65aae75),hf=a(0x1060b2cb),hb=a(0x754ea859),hg=a(0x61f75169),hy=a(0x45012309),hA=a(0xc4548bcd),hx=a(0xdeaf4051),hE=a(0x9a5066aa),hC=a(0x1eae030b2),hk=a(0x241b6d551),hv=a(0x21bfacd01),hS=a(0x8c94c891),hI=a(0x693246f3),hw=a(0x1b0ef8c10),hT=a(0x10394ade5),hN=a(0x6c4a6444);let hM=class{dispatch;getState;constructor({dispatch:e,getState:t}){this.dispatch=e,this.getState=t}shouldOpenInNewWindow(e={}){return(0,ae.cX)()?e.modifiers===f.ShortcutModifier.META:e.modifiers===f.ShortcutModifier.CTRL}shouldOpenInSplitView(e={}){return(0,ae.cX)()?e.modifiers===(f.ShortcutModifier.ALT|f.ShortcutModifier.META):e.modifiers===(f.ShortcutModifier.ALT|f.ShortcutModifier.CTRL)}openLink(e,t){let a,n,{fromThreadId:r,newWindow:i}=t,l=(0,hv.V)(this.getState()),o="canvas";if(r&&(n=(0,py.R)(this.getState(),r))){let t=(0,ep.Lp)(this.getState(),n);a={canvasId:n,location:"canvas"},((e,t)=>{let{url:a,fileId:n}=t,r=(0,sB.$N)(e,a);r?.type===sB.im.SHORTCUT_LINK_TRIGGER&&(0,hy.eo)({state:e}).track(eJ.EventId.HERMES_LINK_TRIGGER,{contexts:{ui_context:{entry_point:"canvas",ui_component_name:"link_trigger_url",action:eJ.UiAction.CLICK}},file_id:n})})(this.getState(),{url:e,fileId:n}),t.is_channel_space&&(o="channel-canvas")}let s="treatment"===(0,F._Z)(this.getState(),"web_identity_links"),c=(0,sB.$N)(this.getState(),e),d=(0,ru.ty)(this.getState(),"suppress_link_warning");return(0,hN.w$)(this.getState(),e)&&s?this.dispatch((0,hT.C)({url:e})):i&&c?.type===sB.im.FILE?this.maybeOpenFileInNewWindow(c.fileId,e):t.label&&!d&&(0,h_.A)(t.label,e)?this.dispatch((0,hC.A)({text:t.label,url:e})):this.dispatch((0,hk.A)({permalink:e,shouldOpenInTile:this.shouldOpenInNewWindow(t),shouldOpenInSplitView:!l&&this.shouldOpenInSplitView(t),hermesLinkTriggerUIContext:a})),(0,hy.eo)({state:this.getState()})?.track(eJ.EventId.QUIP_CANVAS_URL_CLICK,{source:o,contexts:{core:{file_id:n,url_domain:(0,hh.Ay)(e).hostname,url_hash_id:hp()(e)}}}),!0}maybeOpenFileInNewWindow(e,t){let a=this.getState(),n=(0,ep.Lp)(a,e);if((0,hf.$F)(a,{file:n}).open_original){if((0,ae.dY)("4.6.0")){if((0,U.sJ)(n))return void this.dispatch((0,hS.d)({file:n}));if((0,U.F1)(n))return void this.dispatch((0,hI.U)({file:n}));if((0,U.ez)(n))return void this.dispatch((0,hw.v)({file:n}))}if(n.url_private&&(0,hA.A)(n.url_private,"_blank"))return}this.dispatch((0,hk.A)({permalink:t}))}openDoc(e,t){let a=(0,hv.V)(this.getState()),n=this.shouldOpenInNewWindow(t),r=this.shouldOpenInSplitView(t),i={fileId:e,forceNewWindow:n,source:eR.f.OPEN_DOC_FROM_QUIP,...!a&&{forceSplitView:r}};return t.focusSectionId&&(i.sectionId=t.focusSectionId),this.dispatch((0,eX.A)(i)),!0}openSlackChannel(e,t){let a=this.shouldOpenInNewWindow(t);return this.dispatch((0,hE.A)({channelId:e,shouldOpenInTile:a})).then(()=>{this.dispatch((0,e0.O)())}),!0}openSlackUserOrGroup(e){return(0,hg.PH)({id:e})?this.dispatch((0,hx.q)({groupId:e})):this.dispatch((0,uY.b)({memberId:e})),!0}openSlackList(e,t){let a=(0,hv.V)(this.getState()),n=this.shouldOpenInNewWindow(t);return this.dispatch((0,sX.N)({listFileId:e,listViewId:t.listViewId,navigateInCurrentContext:!n,source:sJ.B.CANVAS_FROM_QUIP,forceOpenInSplitView:!a&&this.shouldOpenInSplitView(t),forceOpenInChildWindow:n})),!0}openSlackSalesforceRecord(e,t){let a=(0,rt.E)(e);return a&&this.dispatch((0,hb.c)({recordId:a,fieldToScrollTo:t})),!0}};var hR=a(0x135659c07),hP=a(0xda5bc272),hL=a(0x193577201);let hO=new S.Ay("quip"),EphemeralSystemMessage=({fileId:e,message:t,inFlexpane:a})=>{let n=(0,_.wA)(),r=t.ephemeralMessages,i=(0,h.useCallback)(()=>{n((0,hP.A)({fileId:e}))},[n,e]);if(!r||!r.length)return null;let l=hO.rt("There {count ,plural , =1 {is <strong><a># notification</a></strong>} other {are <strong><a># notifications</a></strong>}} from apps in this canvas.",{count:r.length},({tag:e,text:t,key:a})=>"a"===e?h.createElement(rv.A,{key:a,onClick:i},t):"strong"===e?h.createElement("strong",{key:a},t):null);return h.createElement(hR.A,{type:hL.Y.ephemeralMessage,fileId:e,addedOn:t.addedOn,inFlexpane:a},l)};EphemeralSystemMessage.displayName="EphemeralSystemMessage";let hD=new S.Ay("quip"),OfflineSystemMessage=({fileId:e,message:t,inFlexpane:a})=>{let n=(0,E.d4)(t=>e&&(0,ep.Lp)(t,e)),getIcon=()=>t.type===hL.Y.staticMode?null:h.createElement(w.Ah,{name:"cloud-offline-filled",size:"inherit",inline:!0});getIcon.displayName="getIcon";let r=t.type!==hL.Y.offline&&t.type!==hL.Y.quipOffline&&t.type!==hL.Y.unresolved;return h.createElement(hR.A,{type:t.type,fileId:e,addedOn:t.addedOn,showCloseButton:r,inFlexpane:a},getIcon(),"\xa0",(()=>{switch(t.type){case hL.Y.offline:return hD.t("Slack is trying to connect. Edits cannot be saved right now.");case hL.Y.quipOffline:return hD.t("We\u2019re experiencing issues saving edits to this canvas.");case hL.Y.unresolved:return hD.t("We\u2019re experiencing issues creating a new canvas.");case hL.Y.degraded:return hD.t("Your connection to Slack is unstable. Your edits will be saved, but it might take a while to show changes made by others.");case hL.Y.staticMode:return n&&(0,U.mW)(n)?hD.t("This canvas is popular! Unfortunately, you can\u2019t edit this canvas right now, and it might take a while to show changes made by others."):hD.t("This canvas is popular! Unfortunately, it might take a while to show changes made by others.");default:return""}})())};OfflineSystemMessage.displayName="OfflineSystemMessage";var hF=a(0x231650b41),hU=a(0xbcd5d85a);let hB=new S.Ay("quip"),SlackConnectSystemMessage=({fileId:e,message:t,inFlexpane:a})=>{let n,r=(0,E.d4)(t=>(0,ep.Lp)(t,e)),i=(0,E.d4)(e=>(0,H.A)(e,{file:r})),l=(0,E.d4)(W.ZT),{channelId:o}=(0,h.useContext)(eW.d),s=!!(0,eB.u)(),c=r?.user_team,d=(0,E.d4)(e=>c?(0,tv._J)(e,c):null),m=(0,tC.Ss)(d??void 0)??c,u=(0,E.d4)(e=>s?(0,hF.mA)(e,o,r):!!r?.linked_channel_id&&(0,hF.mA)(e,r.linked_channel_id,r)),p=(0,_.wA)(),f=(0,h.useCallback)(()=>p((0,hU.A)({fileId:e,isStackable:!0,initialShareDialogLocationsTab:"settings"})),[p,e]);if(!r||!((0,U.Eo)(r)||s&&u)||!m)return null;let b=(0,U.iv)(r).filter(e=>e!==m),g=b.length,[y,A]=b,x=b.slice(0,3),C=(0,s5.A)(x.length).map(e=>h.createElement(s6.A,{className:"p-connection_info_icon__icon",id:x[e],key:x[e],"data-qa":"slack_connect_system_message_icon",size:16}));return(s&&u?n=hB.rt("Your admins have turned off external sharing so only people from {currentWorkspaceOrgName} will be able to open this canvas.",{currentWorkspaceOrgName:h.createElement(T.A,{id:l,bold:!1})}):i?(C=[h.createElement(s6.A,{className:"p-connection_info_icon__icon",id:c,key:c,"data-qa":"slack_connect_system_message_icon",size:16})],n=hB.rt("{teamName} manages this canvas.",{teamName:h.createElement(T.A,{id:c})})):n=b.length<3?h.createElement(h.Fragment,null,h.createElement("span",null,hB.t("Shared with external people from ")),h.createElement(ia.A,{className:"p-connection_info__link-button bold","aria-label":hB.t("Open share dialog to organization list"),onClick:f,"data-qa":"slack_connect_system_message_open_share_button"},hB.rt("{numConnectedTeams, plural, =1 {{firstTeamName}} other {{firstTeamName} and {secondTeamName}}}.",{firstTeamName:h.createElement(T.A,{id:y}),secondTeamName:h.createElement(T.A,{id:A}),numConnectedTeams:g}))):h.createElement(h.Fragment,null,h.createElement("span",null,hB.t("Shared with external people from ")),h.createElement(ia.A,{className:"p-connection_info__link-button bold","aria-label":hB.t("Open share dialog to organization list"),onClick:f,"data-qa":"slack_connect_system_message_open_share_button"},hB.rt("<strong>{orgCount} organizations.</strong>",{orgCount:g}))),n)?h.createElement(hR.A,{type:hL.Y.slackConnect,fileId:e,addedOn:t.addedOn,showCloseButton:!1,inFlexpane:a},h.createElement("div",{className:"p-connection_info"},h.createElement("div",{className:"p-connection_info_icon p-connection_info__icon"},C),h.createElement("span",{className:"p-connection_info_text p-connection_info__text","data-qa":"slack_connect_system_message_text"},n))):null};SlackConnectSystemMessage.displayName="SlackConnectSystemMessage";var hH=a(0x1789e94fa);let hW=h.lazy(()=>Promise.resolve().then(a.bind(a,0x3da18e0d))),hV={spaceName:eD.xu.CANVAS_SYSTEM_MESSAGE,notifications:{[eD.ze.POSTS_DEPRECATION_DEPRECATION_BANNER_CANVAS]:{component:hW}}};var hG=a(0x16368204e);let hq=new S.Ay("quip"),hj={fontWeight:700},QuipSystemMessagesContainer=({fileId:e,inFlexpane:t,a11yReadOnlyEnabled:a,toggleA11yReadOnlyMode:n,overrideMessage:r})=>{let i=(0,E.d4)(eL.Rn),l=(0,E.Z2)(t=>e&&(0,hG.U)(t,e)||void 0),o=r??(l&&l[0]),s=(0,h.useCallback)(()=>{if(!e)return o?h.createElement(OfflineSystemMessage,{message:o,inFlexpane:t}):null;if(o?.type===hL.Y.offline||o?.type===hL.Y.quipOffline||o?.type===hL.Y.degraded||o?.type===hL.Y.staticMode)return h.createElement(OfflineSystemMessage,{fileId:e,message:o,inFlexpane:t});if(o?.type===hL.Y.ephemeralMessage)return h.createElement(EphemeralSystemMessage,{fileId:e,message:o,inFlexpane:t});if(a){let a=hq.rt("You are reading this document in read only view. <link>Turn off</link>.",{"<link>":({text:e})=>h.createElement(uL.A,{onClick:n,style:hj},e)});return h.createElement(hR.A,{type:hL.Y.generic,fileId:e,showCloseButton:!1,inFlexpane:t},a)}return o?.type===hL.Y.slackConnect?h.createElement(SlackConnectSystemMessage,{fileId:e,message:o,inFlexpane:t}):o?.type===hL.Y.postsMigration&&i?h.createElement(hH.A,{...hV,fileId:e,message:o,inFlexpane:t}):o?.type===hL.Y.generic?o.text&&h.createElement(hR.A,{type:hL.Y.generic,fileId:e,addedOn:o.addedOn,inFlexpane:t},o.svgIcon&&h.createElement(w.Ah,{name:o.svgIcon,size:"inherit",inline:!0}),o.text):null},[e,o,a,i,t,n]);return h.createElement("div",{className:j()("p-quip_system_messages__container")},s())};QuipSystemMessagesContainer.displayName="QuipSystemMessagesContainer";var hz=a(0x4f22ff33);let hK=new S.Ay("slack_docs");function getThemeVariableValuesForMode(e,t){let a=$.J.document.documentElement.querySelector(".p-theme_background");if(!a)return[];a.classList.add(`sk-client-theme--${e}`);let n=t.map(e=>getComputedStyle(a).getPropertyValue(e));return a.classList.remove(`sk-client-theme--${e}`),n}var h$=a(0x12ed331a9),hY=a(0xb1eb2d52),hQ=a(0x2ba6e815),hZ=a(0x20fbf5a49),hJ=a(0x18e8c4c8c),hX=a(0xe89e2589);let h0=new S.Ay("slack-docs"),QuipNewEditsPill=({fileId:e,highlightedSections:t,docEmbed:a,isPreview:n})=>{let r=(0,_.wA)(),i=(0,hQ.Ay)({promoSubtype:lG.zG.Canvas}),l=(0,h.useCallback)(()=>{let t=Date.now();r((0,hX.U)({fileId:e,lastHighlightDismissedTs:t})),a?.docEditor?.unhighlightAllSections(),r((0,hJ.Lh)({fileId:e,sections:[]})),r((0,hZ.u)({fileId:e,timestamp:t}))},[e,r,a]),o=(0,h.useCallback)(()=>{a?.docEditor?.scrollToNextOffscreenHighlight()},[a]),s=(0,h.useMemo)(()=>({elementName:"new_edits_pill",onClick:{enableClogAction:!0}}),[]),c=(0,h.useMemo)(()=>({elementName:"close_new_edits_pill",onClick:{enableClogAction:!0}}),[]);return!t||t?.length<=0?null:h.createElement(Y.A,{eventId:eJ.EventId.CANVAS_NEW_EDITS,clogImpression:!0,uiComponentName:eJ.UiComponentName.CANVAS_NEW_EDITS_PILL,entryPoint:n?"channel_canvas_preview":"opened_canvas",fileId:e},h.createElement("div",null,h.createElement("div",{className:j()("p-quip_flexpane__new_edits_pill","p-quip_flexpane__new_edits_pill--no-padding",{"p-quip_flexpane__new_edits_pill--banner_margin":i&&i!==hQ.MX.TrialFetching})},h.createElement(e$.Nm,{className:"p-quip_flexpane__new_edits_pill__edits_button",onClick:o,autoClogProps:s},h0.t("New edits",{fallbackHash:"d2c1ba82cb9114fc751c202eed7dc5e20e2040d9"})),h.createElement(e$.Nm,{onClick:l,autoClogProps:c},h.createElement("span",{className:"p-quip_flexpane__new_edits_pill__close_icon"},h.createElement(w.Ah,{name:"close-filled"}))))))};QuipNewEditsPill.displayName="QuipNewEditsPill";let h1=h.lazy(()=>Promise.resolve().then(a.bind(a,0x238c69894))),h2={spaceName:eD.xu.CANVAS_AI_INTRO_MODAL,notifications:{[eD.ze.CANVAS_AI_INTRO_NUX]:{component:h1}}},h4={spaceName:eD.xu.STANDALONE_CANVAS_HEADER,notifications:{[eD.ze.CANVAS_PROMO_BANNER]:{component:h.lazy(()=>Promise.resolve().then(a.bind(a,0xbc07455d)))},[eD.ze.CANVAS_TRIAL_BANNER]:{component:h.lazy(()=>Promise.resolve().then(a.bind(a,0xbc07455d)))},[eD.ze.AI_WORKSPACE_CANVAS_BANNER]:{component:h.lazy(async()=>({default:(await a.e("client-ai-workspace-canvas-banner").then(a.bind(a,0x4cfcdc9f))).AiWorkspaceCanvasBanner}))},[eD.ze.SOLUTIONS_ONBOARDING_CANVAS_BANNER]:{component:h.lazy(()=>Promise.resolve().then(a.bind(a,0x7ca2828b)).then(e=>({default:e.SolutionsOnboardingCanvasBanner})))},[eD.ze.PRO_TRIAL_NO_COMMIT_SLACK_AI_AWARENESS_BANNER]:{component:h.lazy(()=>Promise.resolve().then(a.bind(a,0xb34dd0d5)).then(e=>({default:e.CanvasTrialAwarenessBanner})))},[eD.ze.EDUCATION_DM_CANVAS_CLOSURE_BANNER]:{component:h.lazy(()=>Promise.resolve().then(a.bind(a,0x6b76c759)).then(e=>({default:e.EducationDmCanvasClosureBanner})))},[eD.ze.CREATOR_GUIDED_SETUP_CANVAS_BANNER]:{component:h.lazy(async()=>({default:(await a.e("client-creator-guided-setup-canvas-banner").then(a.bind(a,0x23aaffb8d))).CreatorGuidedSetupCanvasBanner}))},[eD.ze.FREE_TO_PLUS_TRIAL_CANVAS_BANNER]:{component:h.lazy(()=>Promise.resolve().then(a.bind(a,0xc708c522)))}}};var h5=a(0x11a6c59ba),h3=a(0x53de82ab),h6=a(0xc130ea4f),h8=a(0x1c760ba43),h7=a(0x252b73458),h9=a(0xbe2be077),_e=a(0x242503693),_t=a(0x209015f0f),_a=a(0x1359786a7),_n=a(0x17c577af2),_r=a(0x3104066f),_i=a(0xb15f892f);let _l=(0,ex.Ay)((e,t)=>e.canvasHighlightedSections?.[t]?.isFetching??!1);_l.meta={name:"getIsFetchingHighlightedSections",key:"createSelectorGetIsFetchingHighlightedSections",description:(e,t)=>e.canvasHighlightedSections?.[t]?.isFetching??!1};let _o=(0,ex.Ay)((e,t)=>e.canvasHighlightedSections?.[t]?.sections??void 0);_o.meta={name:"getCanvasHighlightedSections",key:"createSelectorGetCanvasHighlightedSections",description:(e,t)=>e.canvasHighlightedSections?.[t]?.sections??void 0};var _s=a(0x476ba28a);let _c=(0,e9.Ay)("Fetch quip activity history",async(e,t,{fileId:a,lastReadTs:n})=>{e((0,hJ.i8)({fileId:a,isFetching:!0})),e((0,_s.l)({timestamp:Math.floor(n/1e3),fileId:a,reason:"get_channel_canvas_new_notification_sections"})).then(t=>{if(t.ok){let n=t.section_ids?.map(e=>({sectionId:e}));n?.length&&(e((0,hJ.Lh)({fileId:a,sections:n})),e((0,hJ.i8)({fileId:a,isFetching:!1})))}})});_c.meta={name:"fetchSectionsToHighlight",key:"createThunkFetchSectionsToHighlight",description:"Fetch quip activity history"};let _d=(0,ex.Ay)((e,t)=>e.canvasLastHighlightDismissed?.[t]??0);_d.meta={name:"lastHighlightDismissedTs",key:"createSelectorLastHighlightDismissedTs",description:(e,t)=>e.canvasLastHighlightDismissed?.[t]??0};var _m=a(0x1671e85cd),_u=a(0x165bb8fb3);let _p=new S.Ay("slack-docs"),_h={display:"contents",position:"relative"},__="insertion-toolbar-main-menu-file",_f=[];function QuipEmbed({doc:e,sectionId:t,getCommentsUiProvider:a,refToForward:n,inHuddle:r,disableEditing:i,commentLevel:l=f.CommentLevel.WRITE,entityId:o,inFlexpane:s,isPreview:c,isInSuggestedTab:d,versionId:m,sequence:u,hideToolbar:p,onQuipRender:g,hasKeyboardFocus:y,startEditorTrace:A,isTemplateOverlayShowing:C,disableHighlights:v,onScroll:S,isCanvasInDm:I,isCanvasInSelfDm:w,overrideTitlePlaceholder:T,overrideTextPlaceholder:N}){(0,h7.l)("QuipEmbed");let M=(0,_.Pj)(),R=(0,k.A)(A),[P,L]=(0,h.useState)(!1),[O,D]=(0,h.useState)(!1),[B,H]=(0,h.useState)(!1),[V,G]=(0,h.useState)(!1),q=(0,h.useRef)(null),Y=(0,h.useRef)(null),Q=(0,h.useRef)(null),et=(0,h.useRef)(!0),[el,eo]=(0,h.useState)(),[es,ec]=(0,h.useState)(()=>A?.startSpan("canvas:doc-embed"));(0,h.useEffect)(()=>{A?.addTags({new_doc:e.id.get()&&e.isCreated()})},[e,A]);let ed=(0,eB.u)(),eu=ed?.id===h8.fY.ChannelCanvas||ed?.type==="canvas",e_=!!ed,ef=(0,en.A)(el?.loadError),eb=(0,em.t)(e.id.get()),{windowId:ey}=(0,h.useContext)(eM.A),{viewState:eA}=(0,h.useContext)(nN.A),ex=eA?.uiState?.autoStartAiGeneration,eE=ex?.starterPrompt,eC=eA?.uiState?.sectionIdsToHighlightOverride,ek=(0,E.d4)(e=>m&&u?(0,tc.xu)(e,ey):null),ev=(0,E.d4)(e=>{let t=m&&u?e.quipActivityHistory[ey]:null;return t?.fileId}),eS=(0,en.A)(e.id),eI=(0,E.d4)(e=>(0,x.QY)(o)||eS&&(0,py.R)(e,eS)),eN=(0,E.d4)(e=>eI?_d(e,eI):0),eR=(0,E.d4)(e=>eI?(0,ep.Lp)(e,eI):null),eP=(0,eq.A)(eI||void 0)?.getTime(),eH=(0,U.dE)(eR),eW=(0,U.CA)(eR),eV=(0,U.d3)(eR),eG=(0,U.ny)(eR),ej=(0,E.d4)(W.Kc),eK=(0,E.d4)(_u.am),e$=(0,E.d4)(h9.k),eY=!c,eQ=(0,E.d4)(e=>_l(e,eI??"")),eZ=(0,E.d4)(e=>_o(e,eI??"")),eX=(0,E.d4)(e=>"on"===(0,F._Z)(e,"channel_tabs_v5")),e0=(0,E.d4)(e=>(0,er.OL)(e,eI??"")),e1=(0,E.d4)(a4.nS),e2=nL.G7.CanvasTemplateButtonsStandaloneCanvas,e4=(0,ea.oU)(e2);(0,eh.V)(el,()=>{es?.close(),D(!0),eb.info("QUIP","Rendered doc"),ej&&(0,e7.pm)(ej),H(!1),G(!1),(0,h6._6)(),A?.addTags({embed_render_success:!0,success:A?.getTags()?.success!==!1})},eh.h.PARTIALLY_RENDERED),useEmbedLoadedInfoEffect(el,()=>{if(!el)return;let{webCachingEnabled:e,loadedFrom:t}=el.loadInfo.get();eb.info("QUIP",`Loaded models from ${t} with web cache ${e?"enabled":"disabled"}`);let a=eI&&(0,_r.fC)(eI);A?.addTags({quip_web_caching_on:e,loaded_from:t,was_preload_requested:a})});let e5=(0,h.useRef)();(0,ew.U)(el,()=>{(0,h6.sF)("embed failed to load"),G(!0),A?.addTags({embed_render_success:!1,error:el?.loadError.get()??"unknown embed load error",success:!1}),e5.current&&(clearTimeout(e5.current),e5.current=null)});let e3=(0,h.useRef)(el);e3.current=el;let e6=(0,_.wA)(),e8=(0,E.d4)(W.ZT),e9=(0,E.d4)(eL.p6),te=(0,E.d4)(pB.p),ta=te===pB.v.IMAGES_ONLY,tn=(0,h.useRef)(!1),tr=(0,h.useRef)(!1),{windowRef:ti}=(0,h.useContext)(K._0),{getActiveSection:tl}=(0,h.useContext)(_a.A),to=(0,h.useContext)(ee.A),ts=(0,E.d4)(_n.Ap),td=(0,en.A)(ts?.failedToInitialize),tm=(0,en.A)(ts?.initializationError),tu=!(0,E.d4)(e=>(0,eg.Pb)(e)||O),tp=(0,E.d4)(dm.to),th=c?_e.Ay.QUIP_EMBED_PREVIEW:_e.Ay.QUIP_EMBED,[t_,tf]=(0,h.useState)(!1),[tb,tg]=(0,h.useState)(),[ty,tA]=(0,h.useState)(!1),tx=(0,sU.p)(eI||""),tE=(0,E.d4)(e=>(0,mS.O)(e,tx)),tC=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_badging_highlighting")),tk=(0,E.d4)(aE.c9),tv=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_underline")),tS=(0,E.d4)(e=>"on"===(0,F._Z)(e,"canvas_blockquote_layout")),tI=(0,E.d4)(_m.tq),tT=!!(i||m&&u);useAiDraftContent({fileId:eI,docEmbed:el,isEditingDisabled:tT});let{hasLiveEmbeds:tN}=(0,h3._)({channelId:tx,quipDoc:ts?.docs,quipHasRendered:O,quipThreadId:eS,isCanvas:!0,isPreview:c}),tM=(0,ez.g)(ey,eI,m,u);(0,h.useEffect)(()=>{let a;if(e&&q.current){let n={mode:"editor",disableEditing:!!i,editorDomAttributes:{"data-focus-key":th},rightAlignAnnotations:!0,isInChannelTab:e_},r=e?.id.get(),o=r&&(0,t5.T5)(r);o&&!t&&(n.scrollPosition=o,tg(o)),c||(n.hideDefaultSectionTextWhenNotEmpty=!0),tE&&(n.isSlackConnectFileSharingBlocked=!0),n.slackDisableFileUploadsPref=te;let{titlePlaceholder:d,textPlaceholder:p}=(({id:e,experimentCanvasAiContentCreationGroupOn:t=!1})=>{function getIndexFromFileId(e,t){let a=0;for(let t=e.length-2;t<e.length;t++)a+=16*a+(e.charCodeAt(t)-65);return Math.abs(a)%t}let a=[hK.t("Go ahead, start writing!"),hK.t("What\u2019s on the docket for today?"),hK.t("Once upon a time\u2026"),hK.t("Time to document your genius!"),hK.t("Words go here ")],n=[hK.t("Write something, or get a head start:"),hK.t("Put your pen to paper, or get a fast first draft:"),hK.t("Start writing, or choose an option to get you going:"),hK.t("Put words here, or get a little help:")];function getRandomAiString(e){let t=Math.floor(Math.random()*e.length);return e[t]}return{titlePlaceholder:hK.t("Your canvas title"),textPlaceholder:t?getRandomAiString(n):a[getIndexFromFileId(e,a.length)]}})({id:r,experimentCanvasAiContentCreationGroupOn:tk});T?n.titlePlaceholder=T:d&&(n.titlePlaceholder=d),N?n.textPlaceholder=N:p&&(n.textPlaceholder=p),s&&(n.mode="flexpane"),c&&(n.mode="preview",n.disableCollapsedStateGutter=!0,n.disableEditing=!0,n.visibleBottomOffset=0,n.verticalMarginBottom=28),n.commentLevel=l,n.visibleBottomOffset=66,tM&&(n.version=m?.endsWith(tt.XG)?m?.substring(0,m.indexOf(tt.XG)):m,n.sequence=u,n.disableEditing=!0,m===ek?.versionId?n.verticalMarginBottom=130:n.verticalMarginBottom=150),n.backgroundMaxDelay=1e4,n.backgroundSaveDelay=3e3,n.backgroundPerEditorBackoff=1250;let{basePrimary:h,baseInverseSecondary:_}=(e=>{let[t,a]=getThemeVariableValuesForMode("dark"===e?"dark":"light",["--dt_color-theme-base-pry","--dt_color-theme-base-inv-sec"]);return{basePrimary:t,baseInverseSecondary:a}})(tp);if(h&&_&&(n.themeColors={basePrimary:h,baseInverseSecondary:_}),n.isCanvasAiEnabled=tk,n.skipCaretOnCreate=eE,eb.info("QUIP","Embedding doc"),eb.info("QUIP",`Opening doc to versionId: ${n.version}`),!(a=e.embed(q.current,n)).rendered.get()){e5.current=setTimeout(()=>{H(!0),A?.addTags({embed_render_delayed:!0,success:!1}),eb.error(Error("Quip editor failed to start after 20 seconds"),{collabDebugReport:R?.getBridgeDebugReport(!0),disableEditing:i})},2e4);let handleRender=(e,t)=>{!e&&t&&(clearTimeout(e5.current),e5.current=null,a?.rendered.unlisten(handleRender))};a.rendered.listen(handleRender)}eo(a),_f.push(a),eb.info("QUIP",`Docs open: ${_f.length}`)}return()=>{eb.info("QUIP","Unmounting doc"),a?.unmount(),eo(void 0),e3.current=void 0,a&&((0,z.A)(_f,a),eb.info("QUIP",`Docs open: ${_f.length}`)),e5.current&&(clearTimeout(e5.current),e5.current=null)}},[e,t,R,i,l,s,eb,tM,m,u,th,c,e_,A,ek?.versionId,tE,te,r,eH,tk,tp,tI,eE,T,N]),useEmbedSlackConnectMessage({fileId:eI}),(({fileId:e})=>{let t=(0,_.wA)(),a=(0,E.d4)(eL.Rn),n=(0,E.d4)(e=>(0,eO.Hp)(e,eD.xu.CANVAS_SYSTEM_MESSAGE)),r=(0,E.d4)(e=>(0,eO.OL)(e,eD.xu.CANVAS_SYSTEM_MESSAGE));(0,h.useEffect)(()=>{e&&a&&n===eD.ze.POSTS_DEPRECATION_DEPRECATION_BANNER_CANVAS&&r?.fileId===e&&t((0,eF.D)({fileId:e}))},[t,a,e,r?.fileId,n])})({fileId:eI}),useCanvasSavedSections({docEmbed:el,canvasFile:eR}),(0,h.useEffect)(()=>{O&&ts?.docs.setEditsDisabled(eS,!!i)},[i,O,ts?.docs,eS]),(0,h.useEffect)(()=>{if(!el||!eS)return;let scrollPositionListener=(e,t)=>(S?.(t?.top),(0,t5.Gj)(eS,t)),focusStateListener=(e,t)=>{if(t)return(0,t5.Ht)(eS,t)},a11yReadOnlyListener=(e,t)=>{tf(t),void 0===e||t||to.sendMessageToAnnouncerAPI({message:_p.t("You are no longer reading this document in read only view."),uuid:(0,X.A)()})};return el.scrollPosition?.listen(scrollPositionListener),el.focusState?.listen(focusStateListener),el.a11yReadOnlyMode?.listen(a11yReadOnlyListener),()=>{el.scrollPosition?.unlisten(scrollPositionListener),el.focusState?.unlisten(focusStateListener),el.a11yReadOnlyMode?.unlisten(a11yReadOnlyListener)}},[el,eb,eS,e8,to,S]),(0,h.useEffect)(()=>{if(!el||e9||!a||!e8||!eS)return;let e=a({quipThreadId:eS,dispatch:M.dispatch,getState:M.getState});if(e)return el.setCommentsUiProvider(e),()=>{e.tearDown?.(),el.setCommentsUiProvider(void 0)}},[el,e9,a,e8,eS,M]),(0,h.useEffect)(()=>{e&&q.current&&tM&&eI&&ev&&eI!==ev&&eb.error(Error(`ID mismatch: fileId (${eI}) does not match with current window's version history (${ev})`))},[eI,tM,e,eb,ev]),(0,h.useEffect)(()=>{el?.setPermalinkUiProvider(new hM(M))},[el,M]),(0,h.useEffect)(()=>{let e=ti.deref();e&&ts?.setAppKeyboardFocusModeEnabled(y,e)},[ts,y,ti]),(0,h.useEffect)(()=>{n&&("function"==typeof n?n(el??null):"object"==typeof n&&(n.current=el??null))},[n,el]),(0,h.useEffect)(()=>{let e=ti.deref();if(eI&&el&&e)return hz.g(e,eI,{docEmbed:el,announcerContext:to}),()=>{hz.dR(e,eI)}},[ti,eI,el,to]);let[tR,tP]=(0,h.useState)();(0,h.useEffect)(()=>{el&&el.setErrorUiProvider({didSetErrorState(e,t){e===f.ErrorSource.DOCUMENT_SAVING&&(t?(eb.error(Error(`[QuipSaveError] ${t}`)),tP({type:hL.Y.quipOffline,addedOn:Date.now(),isClosed:!1})):tP(null))},didClearErrorState(e){e===f.ErrorSource.DOCUMENT_SAVING&&tP(null)},setDelegate(){}})},[el,e6,eb,tP]);let tL=useEmbedDirtyWarning({docEmbed:el,fileId:eI,quipThreadId:eS});useEmbedSaveBeacon({fileId:eI,didError:tL||!!tR});let tO=useDocIdWarning(e),tD=(0,h.useMemo)(()=>tR||(tL||tO?{type:hL.Y.unresolved,addedOn:Date.now(),isClosed:!1}:void 0),[tL,tO,tR]);(0,eh.V)(el,g,eh.h.PARTIALLY_RENDERED);let tF=(0,ei.l)({fileId:eI,docEmbed:el,docEmbedRef:e3,initialScrollPosition:tb});useEmbedMountClog({docEmbed:el,fileId:eI,versionId:m,isPreview:c}),(0,h.useEffect)(()=>{setTimeout(()=>{!c&&et.current&&(et.current=!1)},800)},[c]),(0,h.useEffect)(()=>{if(tC&&!eZ?.length&&!eQ&&et.current){let e=Math.max(eN,Number(eR?.last_read));eI&&e&&eR?.show_badge&&!v&&e6(_c({fileId:eI,lastReadTs:e}))}},[eR?.show_badge,eR?.last_read,eI,eZ,eN,tC,e6,eP,eQ,v]),(0,h.useEffect)(()=>{if(tC&&!v){let e=e3.current?.docEditor,t=!!eC,a=eZ?.map(e=>e.sectionId)??[],n=t?[...eC,...a]:a;n?.length&&(t&&e?.unhighlightAllSections(!0),e?.highlightSectionsBySectionIds(n,t))}},[el,v,eZ,tC,eC]),(0,h.useEffect)(()=>{if(e0&&e1){let{content:e,mappedSectionIds:t,targetSectionId:a,updateStep:n}=e0,r=e3.current?.docEditor;n===ab.a5.TRIGGERED?(r?.insertContent({markdown:e},{highlightOnInsertion:!0,sectionIdsToReplace:t,targetSectionId:a}),setTimeout(()=>r?.unhighlightAllSections(!0),3e3)):n===ab.a5.PREVIEWED?t.length&&(r?.highlightSectionsBySectionIds(t,!0),r?.scrollToNextOffscreenHighlight()):r?.unhighlightAllSections(!0)}},[e0,e1]);let renderChannelCanvasNewEditsPill=()=>{let e=eZ?.filter(e=>!e.seen);return!eI||!e||e?.length<1||v?null:h.createElement(QuipNewEditsPill,{fileId:eI,highlightedSections:e,docEmbed:el,isPreview:c})};renderChannelCanvasNewEditsPill.displayName="renderChannelCanvasNewEditsPill";let tU=(0,h.useRef)(null),tB=(0,h.useCallback)(()=>{if(!el)return;let e=el.docEditor,t=tU.current?.getBoundingClientRect().height??0;e.setVisibleBottomOffset(t)},[el]),tW=(0,h.useMemo)(()=>(0,J.A)(tB),[tB]);(0,h.useEffect)(()=>{let e=tU.current;return e&&tW.observe(e),()=>{e&&tW.unobserve(e)}},[tW]),(0,h.useEffect)(()=>()=>{!c&&eI&&e6((0,hJ.Lh)({fileId:eI,sections:[]}))},[e6,eI,c]);let tV=useEmbedAutoFocus({quipThreadId:eS,fileId:eI,inFlexpane:s,isPreview:c,isInSuggestedTab:d,isCommentOpen:!!tF,disableEditing:tT,hasExplicitFocusSection:!!t}),tG=(0,eT.t)({autoFocus:tV,isCommentOpen:!!tF,docEmbed:el,quipThreadId:eS,fileId:eI,focusKey:th,isInSuggestedTab:d,isTemplateOverlayShowing:!eX&&!!C,hasHadFocus:tr.current,autoStartAiGeneration:ex}),tq=(0,h.useCallback)(()=>{el&&t&&el.docEditor.focusSection(t,{highlightDependentSections:!0})},[el,t]);(0,eh.V)(el,tq,eh.h.FINISHED_FIRST_PAINT);let{caretSectionId:tj}=(0,en.A)(e3.current?.selectionState)??{},tK=(0,h.useRef)("");(0,h.useEffect)(()=>{tj&&(tK.current=tj)},[tK,tj]);let t$=(0,h.useCallback)(async e=>{let t=e3.current?.docEditor;t&&(t.focusEditor(),optimisticallyInsertFiles(t,e,tK.current,__))},[e3,tK]);useQuipOpenPopovers({docEmbed:el});let tY=(0,E.d4)(e=>(0,U.SH)(eR,e)),tQ=(0,aI.A)(),tZ=(0,h.useCallback)(()=>{let e=ti.deref();el&&e&&(tQ.track(eJ.EventId.CANVAS_PRINTING,{contexts:{ui_context:{action:eJ.UiAction.KEYDOWN}},file_id:eI}),e6((0,_i.A)({docEmbed:el,window:e,fileId:eI||""})))},[ti,e6,el,eI,tQ]),tJ=(0,h.useCallback)((e=tw.r.FILE,t=__)=>{if(!tE&&Q.current&&P){__=t;let a="";(e===tw.r.IMAGE||ta)&&(a="image/*"),Q.current.accept=a,Q?.current?.click()}},[Q,P,tE,ta]);(0,h.useEffect)(()=>{let getContainer=()=>{let e=q.current;return e?ti.deref()!==$.J?e.ownerDocument:e:null},e=getContainer();if(e&&el&&R){let t,a=e3?.current?.editorContainer?.get(),n={annotationsEnabled:l!==f.CommentLevel.NONE&&!t_,a11yReadOnlyModeAvailable:!tT,aiCreationEnabled:tk,underlineEnabled:tv,blockquoteLayoutEnabled:tS},r={openFilePickerAndInsertFile:tJ,printCanvas:tY?tZ:void 0};if(a)return bindQuipKeyCommands(el,{container:e,editorContainer:a,...n},r);let editorContainerListener=(e,a)=>{let i=getContainer();a&&i&&(t=bindQuipKeyCommands(el,{container:i,editorContainer:a,...n},r))};return e3.current?.editorContainer?.once(editorContainerListener),()=>{e3.current?.editorContainer?.unlisten(editorContainerListener),t?.()}}return b.A},[ti,q,el,l,tT,t_,R,e6,tJ,tZ,tE,tY,tk,tv,tS]),(0,h.useEffect)(()=>{!ty&&eE&&el&&(el.docEditor.initiateAiAssistant("channel-tab",{starterPrompt:eE}),tA(!0))},[ty,eE,el]);let tX=(0,h.useCallback)(()=>{tr.current=!0,tn.current=!0},[tn]),t0=(0,h.useCallback)(e=>{if(!tn.current)return;let t=tl();if(!t)return;let a=Y.current?.contains(e.target);if(_t.n_.includes(t)||a||t===nD.mq.Modal)return;let n=el?.docEditor;n?.blurEditor(),tn.current=!1},[el?.docEditor,tl]);(0,h.useEffect)(()=>(ti.deref()?.addEventListener("focusin",t0),()=>ti.deref()?.removeEventListener("focusin",t0)),[ti,t0]);let t1=(0,eU.CR)(eU.G6.Toolbar,!!s),t2=(0,h.useCallback)(e=>({sectionId:e,...t1}),[t1]),t4=(0,h.useCallback)(()=>el?.docEditor.toggleA11yReadOnlyMode(),[el]),t3=(0,h.useCallback)(e=>{Y.current?.contains(e.relatedTarget)?(0,Z.b)(e.target,!0)?.focus?.():e3.current?.docEditor?.focusEditor()},[]);if(tu)return h.createElement(hm,null);if(V||td){let e=eR?.name||eR?.title||void 0;return h.createElement(hc,{logger:eb,errorMessage:ef||tm,previouslyDelayed:B,canvasName:e})}let t6=h.createElement("div",{style:_h},eY?null:h.createElement("div",{tabIndex:0,onFocus:t3,"aria-hidden":"true",className:"offscreen"}),h.createElement("div",{className:j()("p-quip_embed",{"p-quip_embed--toolbar-visible":P,"p-quip_embed--template":eH,"p-quip_embed--dark":"dark"===tp,"p-quip_embed--preview":c}),ref:q,...{"data-canvas":!0,"data-canvas-preview":c,"data-qa":"p-quip_embed"}}),!O&&!B&&h.createElement(p3.A,{delay:!0})),t8=!eX||eX&&(!C||!e4);return h.createElement("div",{className:"p-quip_embed__wrapper",ref:Y,onFocus:tX},h.createElement(hH.A,{docEmbedRef:e3,...h2}),B&&h.createElement(ho,{logger:eb}),!c&&h.createElement("div",{className:j()("p-quip_embed__top_banners",{"p-quip_embed__top_banners--channel_tab":e_})},h.createElement(h$.Ay,null),h.createElement(hY.A,{destinationId:eS})),tN&&h.createElement("div",{className:"p-quip_embed__tableau_session_notification"},h.createElement(h5.A,{"data-qa":"tableau-session-notification"})),h.createElement(hH.A,{uiPage:eJ.UiPage.CANVAS_EDITOR,...h4,isStandaloneCanvas:!eW,isCanvasInSelfDmOrDm:w||I,isTemplateCanvas:eH,isHuddleCanvas:eV,isPreview:c,isInChannelCanvasTab:eu,componentClassName:"margin_100"}),eY?h.createElement(QuipEmbedFocusContainer,{docEmbedRef:e3,focus:tG,inFlexpane:s,isTemplateOverlayShowing:!eX&&C},t6):t6,eI?h.createElement(QuipAutocomplete,{containerRef:q,docEmbedRef:e3,focus:tG,fileId:eI}):null,h.createElement("div",{className:j()("p-quip_embed__new_edits_pill",{"p-quip_embed__new_edits_pill--preview":c,"p-quip_embed__new_edits_pill--channel_tab":!c&&e_})},renderChannelCanvasNewEditsPill()),h.createElement("div",{className:"p-quip_embed__bottom_toolbars",ref:tU},tM?h.createElement(QuipActivityHistoryFloatingBar,{fileId:eI??"",versionId:m,sequence:u,sectionNavigationProps:t2(eU.Ie.FloatingHistory)}):null,tT||t_||!t8?null:h.createElement(QuipInsertionToolbar,{containerRef:q,docEmbedRef:e3,entityId:o,teamId:e8,hideToolbar:p,setIsInsertionToolbarVisible:L,sectionNavigationProps:t2(eU.Ie.Insertion),openFilePickerAndInsertFile:tJ}),!c&&!eG&&h.createElement(QuipSystemMessagesContainer,{fileId:eI,inFlexpane:s,a11yReadOnlyEnabled:t_,toggleA11yReadOnlyMode:t4,overrideMessage:tD??void 0})),tT?null:h.createElement(QuipFloatingFormattingBar,{containerRef:q,docEmbedRef:e3,sectionNavigationProps:t2(eU.Ie.Floating),fileId:eI}),e9&&!tT?h.createElement(QuipInlineCommentContainer,{containerRef:q,docEmbedRef:e3,quipThreadId:e.id.get()}):null,tT?null:h.createElement(tH.A,{ref:Q,onFilesSelectedHandler:t$}),el&&h.createElement(QuipEmbeddedUiRenderer,{docEmbed:el,fileId:eI??void 0,quipThreadId:eS,startEditorTrace:A,isPreview:c}),(e$||eK)&&el&&eI?h.createElement(quip_editor_ui_connector_renderer,{docEmbed:el,fileId:eI}):null)}(0,Q.ul)("collabDocEmbeds",_f),QuipEmbed.displayName="QuipEmbed";let _b=(0,et.A)(h.forwardRef((e,t)=>h.createElement(Y.A,{eventId:eJ.EventId.QUIP_DOC_IMPRESSION,clogImpression:!0},h.createElement(QuipEmbed,{refToForward:t,...e}))));var _g=a(0xc1963a64),_y=a(0xb5e07d5c),_A=a(0x2f1591a0);function QuipEmbedWithEntityId({entityId:e,sectionId:t,getCommentsUiProvider:a,inFlexpane:n,isPreview:r,isInSuggestedTab:i,hideToolbar:l,versionId:o,sequence:s,refToForward:c,onQuipRender:d,onDeletedStateRender:m=b.A,isTemplateOverlayShowing:u,disableHighlights:p,onScroll:C,inHuddle:k,commentLevel:S,shouldLiveUpdate:I,overrideTitlePlaceholder:w,overrideTextPlaceholder:T}){let{fileIdOrQuipThreadId:N,sectionId:M,versionId:R,sequence:P}=(0,x.EX)(e),L=(0,eb.x)(),O=useEmbedIdMemo(N),D=!(0,A.A)(O),F=(0,h.useMemo)(()=>L.createTrace({traceName:"canvas:start-editor",tags:{file_id:O,in_flexpane:n,is_preview:r,is_history:!!R||!!P,is_temp_id:D},samplingOptions:{sampleType:g.tS.ALWAYS}}),[L,O,n,r,R,P,D]);(0,h.useEffect)(()=>{let closeOutTrace=e=>{let t=F.getRootSpan();if(!t||!t.isActive())return;let a=F.getSpans(),n=0,r=!1;Object.values(a).filter(e=>e!==t).forEach(e=>{if(e.isActive())r=!0;else{let t=e.getCloseTimeMs()??0;t>n&&(n=t)}}),0===n||r?e?(F.addTags({tracing_timed_out:!0}),F.getRootSpan()?.close(),L.reportTrace(F)):F.reset():(F.getRootSpan()?.close(n),L.reportTrace(F))},e=setTimeout(()=>closeOutTrace(!0),6e4);return()=>{clearTimeout(e),closeOutTrace(!1)}},[L,F]);let B=(0,v.A)(N,F),H=(0,_.wA)(),W=(0,A.A)(N)?N:void 0,V=(0,E.d4)(e=>W?(0,ep.Lp)(e,W):null),G=(0,E.d4)(e=>!!W&&(0,_y.g)(e,W)),{channelId:q}=(0,h.useContext)(eW.d),j=(0,E.d4)(e=>q?(0,eG.OL)(e,q):null),z=(0,tq.JM)(j),K=(0,E.d4)(e=>(0,_g.V)(e,j));(0,h.useEffect)(()=>{let e=!1,t=setTimeout(()=>{r&&(e=!0)},6e3);return()=>{r&&e&&H((0,_A.K)({fileId:N,timestamp:Date.now(),reason:"mark-read-preview"})),clearTimeout(t)}},[H,N,r]);let $=(0,eo.A)();(0,h.useEffect)(()=>($.info("QUIP",`Mounting QuipEmbedWithEntityId - ${e}`),()=>{$.info("QUIP",`Unmounting QuipEmbedWithEntityId - ${e}`)}),[e,$]);let Y=(0,h.useRef)(0),Q=(0,h.useMemo)(()=>(Y.current+=1,`doc-${Y.current}`),[B]),Z=useLastQuipClientError();if(Z)return h.createElement(hc,{logger:$,errorMessage:Z.toString?.()});if(V&&!(0,U.ZG)(V))return m(),h.createElement(QuipDeletedState,{file:V});if(!B)return h.createElement(p3.A,null);let J=!1;V&&!(0,eu.GU)(V)&&(J=!(0,U.mW)(V)),r&&(J=!0),G&&(J=!0);let X=S;X||(X=J?f.CommentLevel.READ:f.CommentLevel.WRITE);let ee=o||R,et=s||P;return h.createElement(rp.A,{id:e},h.createElement(_b,{key:Q,ref:c,isCanvasInDm:z,isCanvasInSelfDm:K,doc:B,getCommentsUiProvider:a,sectionId:t||M,inFlexpane:n,disableEditing:J,commentLevel:X,entityId:e,versionId:ee,sequence:et,hideToolbar:l,isPreview:r,isInSuggestedTab:i,onQuipRender:d,startEditorTrace:F,isTemplateOverlayShowing:u,disableHighlights:p,onScroll:C,inHuddle:k,overrideTitlePlaceholder:w,overrideTextPlaceholder:T}),(!r||!!I)&&h.createElement(y.A,{id:N,quipThreadId:B.id.get()}))}QuipEmbedWithEntityId.displayName="QuipEmbedWithEntityId";let _x=h.forwardRef((e,t)=>h.createElement(QuipEmbedWithEntityId,{refToForward:t,...e}))},0x2301c802e:(e,t,a)=>{"use strict";a.d(t,{N:()=>i,u:()=>r});var n=a(0xbad225b5);let r=(0,a(0x11c8c5441).Ay)("Embedded UI Provider",null),i=n.createContext({embeddedUIContainerElement:null,embeddedUiData:null,inChannelCanvas:!1,slackFileId:void 0,docEmbed:void 0})},0x937c068d:(e,t,a)=>{"use strict";a.d(t,{F$:()=>l,II:()=>i,Qx:()=>getQuipEphemeralNotificationType,o7:()=>o});var n,r,i=((n={})[n.PRIVATE_MESSAGE=0]="PRIVATE_MESSAGE",n[n.UNKNOWN=1]="UNKNOWN",n),l=((r={})[r.UNKNOWN=0]="UNKNOWN",r[r.DM_OR_MPDM=1]="DM_OR_MPDM",r[r.PRIVATE_CHANNEL=2]="PRIVATE_CHANNEL",r[r.SC_PRIVATE_CHANNEL=3]="SC_PRIVATE_CHANNEL",r[r.PUBLIC_CHANNEL=4]="PUBLIC_CHANNEL",r[r.SC_PUBLIC_CHANNEL=5]="SC_PUBLIC_CHANNEL",r[r.WORKSPACE=6]="WORKSPACE",r);function getQuipEphemeralNotificationType(e){if(!e.attachments?.length)return 1;let t=e.attachments[0];return t.actions&&t.callback_id?.startsWith("consistentephemeralunfurls")&&2===t.actions.length&&"unfurl"===t.actions[0].value&&"cancel"===t.actions[1].value?0:1}let o="QUIP-EPHEMERAL-NOTIFICATION"},0xf2b9b0e6:(e,t,a)=>{"use strict";a.d(t,{A:()=>QuipErrorBoundary});var n=a(0xbad225b5),r=a(0x10a716a94),i=a(0x1d43eb6d7);function QuipErrorBoundary({children:e,isQuiet:t,...a}){let l=t?r.H:r.A;return n.createElement(l,{subtype:i.Tc,...a},e)}QuipErrorBoundary.displayName="QuipErrorBoundary"},0x16a140c5a:(e,t,a)=>{"use strict";a.d(t,{jY:()=>h,s3:()=>b,Wg:()=>_,I1:()=>f,N2:()=>g,o8:()=>v,dK:()=>A,EM:()=>y,v_:()=>S,nH:()=>getCanvasAiIcons,h$:()=>getCanvasAiSubmenuContent,pg:()=>getCanvasAiSubmenuItemLabel,zk:()=>getCanvasButtonsAndFormats,RO:()=>getFormats,zd:()=>getSelectionPresetPromptText,Jn:()=>isCanvasAiSelectAndRefineActionSupported,OD:()=>isToolbarAction});var n,r,i,l,o=a(0xc26f5c40),s=a(0x19b3ba9fd),c=a(0x20482ad21),d=a(0x41d73207),m=a(0x26148edd);let u=new Map([[o.DocLayoutStyle.CALLOUT,"callout"],[o.DocLayoutStyle.FLEXBOX,"flexbox"],[o.DocLayoutStyle.TABLE,"table"],[o.DocLayoutStyle.BLOCKQUOTE,"blockquote-layout"]]);function layoutStyleToFormat(e){return u.get(e)}let p=new c.Ay("slack_docs");var h=((n={}).START_THREAD="start-thread",n.OPEN_THREAD="open-thread",n.START_ASSISTANT_THREAD="start-assistant-thread",n.INSERT_VARIABLE="insert-variable",n.MAX_VARIABLE_LIMIT_REACHED="variable-limit-reached",n.SHARE="share",n.OPEN_IN_DETACHED_WINDOW="open-in-detached-window",n.VIEW_FULL_SCREEN="view-full-screen",n.VIEW_IN_SLACK="view-in-slack",n.OPEN_IN_NEW_WINDOW="open-in-new-window",n.SHARE_CHANNEL_CANVAS="channel-canvas-share",n.ADD_REACTION="add-reaction",n.OPEN_REACTION="open-reaction",n.AI_REFINE="refine",n.OVERFLOW="overflow",n.CALLOUT="callout",n.BLOCKQUOTE_LAYOUT="blockquote-layout",n);let _="option-list-divider",f="quick-edits-header",b="content-based-header";var g=((r={}).SUGGEST_EDITS="canvas-suggest-edits",r.REWRITE="canvas-rewrite",r.CHAT="canvas-chat",r.EXPLAIN="canvas-explain",r.PROOFREAD="canvas-proofread",r.SIMPLIFY="canvas-simplify",r.ELABORATE="canvas-elaborate",r.CHANGE_TONE="canvas-change-tone",r.CHANGE_FORMATTING="canvas-change-formatting",r.TRANSLATE="canvas-translate",r.SUMMARIZE="canvas-summarize",r.ADD_ACTION_ITEMS="canvas-add-action-items",r.CONVERT_TO_TABLE="canvas-convert-to-table",r),y=((i={}).NONE="NONE",i.START="START",i.OPEN="OPEN",i),A=((l={}).NONE="NONE",l.START="START",l.OPEN="OPEN",l);let x=["canvas-suggest-edits","canvas-chat","canvas-explain","canvas-change-formatting"],getCanvasAiSubmenuItemLabel=(e,t)=>{if(!t)return"";switch(e){case"professional":return p.t("Professional",{fallbackHash:"6f719fb045c0b6fc89e44e33177ba6d4c3e21055",fallbackHashNs:"composer"});case"witty":return p.t("Witty",{fallbackHash:"89d3e5e4e9788f9e7c9f15d5ba5d02ab6c4f6757",fallbackHashNs:"composer"});case"empathetic":return p.t("Empathetic",{fallbackHash:"f8b682c6e9202623d369bea1073ed20ea4969fce",fallbackHashNs:"composer"});case"direct":return p.t("Direct",{fallbackHash:"bc81524a554d8a0ff1c122ddd69f8eeebdf76f02",fallbackHashNs:"composer"});case"en":return p.t("English");case"es":return p.t("Spanish");case"de":return p.t("German");case"fr":return p.t("French");case"pt":return p.t("Portuguese");case"it":return p.t("Italian");case"ja":return p.t("Japanese");case"ko":return p.t("Korean");case"zh-CN":return p.t("Chinese");case"zh-TW":return p.t("Chinese (Traditional)");default:return""}},E=new Map([["canvas-change-tone",["professional","witty","empathetic","direct"]],["canvas-translate",["en","es","de","fr","pt","it","ja","ko","zh-CN","zh-TW"]],["canvas-change-formatting",[]]]),getCanvasAiSubmenuContent=e=>E.get(e),isCanvasAiSelectAndRefineActionSupported=e=>!x.includes(e),C=["canvas-proofread","canvas-simplify","canvas-elaborate","canvas-change-tone","canvas-change-formatting","canvas-translate"],k=["canvas-summarize","canvas-add-action-items","canvas-convert-to-table"];function getCanvasAiIcons(e){if(C.includes(e)||k.includes(e))return null;switch(e){case"canvas-suggest-edits":return{name:"glasses"};case"canvas-rewrite":return{name:"compose"};case"canvas-chat":return{name:"direct-messages"};case"canvas-explain":return{name:"help"};default:return{name:"magic-wand"}}}let getSelectionPresetPromptText=(e,t)=>{if(!t)return;let a=e.actionId,n=e.contextId;switch(a){case"canvas-proofread":return p.t("Proofread");case"canvas-elaborate":return p.t("Make longer");case"canvas-simplify":return p.t("Make shorter");case"canvas-rewrite":return p.t("Describe your edit");case"canvas-change-tone":if(n){let e=getCanvasAiSubmenuItemLabel(n,t).toLowerCase();return p.t("Change the content tone to sound {tone}.",{tone:e})}break;case"canvas-translate":if(n){let e=getCanvasAiSubmenuItemLabel(n,t);return p.t("Translate the content to the following language: {language}.",{language:e})}break;case"canvas-summarize":return p.t("Add a summary",{fallbackHashNs:"assistant",fallbackHash:"9763dad72dd460e5575210b5538e3f1b017bce2c"});case"canvas-add-action-items":return p.t("Add action items",{fallbackHashNs:"assistant",fallbackHash:"1363e6593c6d58b63d976fd1607b3a26c84046e1"});case"canvas-convert-to-table":return p.t("Convert to table",{fallbackHashNs:"slack_docs",fallbackHash:"c0794c144895e84308d76814fd04b93125d0f8b9"})}},v={...d.zF,...m.L},S={...v,...h,...g};function isToolbarAction(e,t){return Object.values(t).some(t=>t===e)}let getFormats=(e=o.DocBlockStyle.PLAIN,t=[],a)=>{let n=t.map(e=>(0,m.B)(e)).filter(s.b);if(e&&n.push((0,d.Zq)(e)||d.zF.PARAGRAPH),a){let e=layoutStyleToFormat(a);e&&n.push(e)}return n},getCanvasButtonsAndFormats=({collapseIntoOverflow:e=!1,collapseTextEmphasisFormats:t=!1,experimentCanvasAiContentCreationGroupOn:a=!1,experimentCanvasBlockquoteLayoutGroupOn:n=!1,experimentCanvasUnderlineGroupOn:r=!1,focusedInLayoutSection:i=!1,quipReactionButtonType:l="NONE",quipThreadButtonType:o="NONE",reachMaxVariables:s=!1,useVariables:c=!1})=>{let d,u,p,h=r&&t,g=[["menu"]];h?g.push(["text-emphasis-menu"]):g.push(["bold","italic",...r?["underline"]:[],"strike"]);let y=["link"];c&&y.push(s?"variable-limit-reached":"insert-variable"),y.push("callout"),e?d=[...n?["blockquote-layout"]:[],"code",...y]:(n&&g.push(["blockquote-layout"]),g.push(["code"]),g.push(y)),h&&(u=[m.L.BOLD,m.L.ITALIC,m.L.UNDERLINE,m.L.STRIKE]),a&&(p=["canvas-suggest-edits","canvas-rewrite","canvas-chat","canvas-explain",_,f,"canvas-proofread","canvas-simplify","canvas-elaborate","canvas-change-tone","canvas-change-formatting","canvas-translate",_,b,"canvas-summarize","canvas-add-action-items"],i||p.push("canvas-convert-to-table"),g.push(["refine"]));let A=[];switch(l){case"START":A.push("add-reaction");break;case"OPEN":A.push("open-reaction")}switch(o){case"START":A.push("start-thread");break;case"OPEN":A.push("open-thread")}return g.push(A),e&&g.push(["overflow"]),{formats:["bold","italic",...r?["underline"]:[],"strike"],buttons:g,canvasAiMenuItems:p,menuItems:["paragraph","h1","h2","h3","option-list-divider","check-list","ordered-list","bullet-list",...n?[]:["option-list-divider"],"code-block",...n?[]:["blockquote"]],overflowMenuItems:d,canvasTextEmphasisMenuItems:u}}},0xf66117e7:(e,t,a)=>{"use strict";a.d(t,{A:()=>QuipLoadingSkeleton});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x14fad6485),o=a(0x20482ad21),s=a(0x9f7220f0),c=a(0x1ea53dc3a),d=a(0x2501a2cee),m=a(0x8803df66),u=a(0x1340892e2);let p={small:"90%",medium:"95%",large:"100%"},h=new o.Ay("slack-docs"),_=n.createElement(d.Ah,{inline:!0,name:"canvas"});function QuipLoadingSkeleton({delay:e,assertive:t,loadingMessage:a,className:r,isLoadingFreeTeamCreateTab:o}){let d=(0,n.useRef)(null),{windowRef:f}=(0,n.useContext)(l._0),[b,g]=(0,n.useState)(0);(0,n.useLayoutEffect)(()=>{let e=d.current,t=f.deref();if(!e){t&&g(t.innerWidth);return}g(e.offsetWidth)},[f]);let y=(0,n.useMemo)(()=>b<200?"small":b<350?"medium-small":b<500?"medium":"fixed",[b]);return n.createElement("div",{ref:d,className:i()("p-quip_loading_skeleton",r)},b?n.createElement("div",{className:i()("p-quip_loading_skeleton__content",`p-quip_loading_skeleton__content--${y}`,{"p-quip_loading_skeleton__content--delay":e})},n.createElement("p",{className:"p-quip_loading_skeleton__header"},o?n.createElement(u.r,{icon:_,text:h.t("Loading canvas\u2026",{fallbackHash:"fd3e3d92bc674e9353efdc9f8358a482a4a22477"})}):n.createElement(m.A,{size:"small",sizes:p})),n.createElement("p",null,n.createElement(m.A,{size:"large",sizes:p}),n.createElement(m.A,{size:"medium",sizes:p}),n.createElement(m.A,{size:"large",sizes:p}),n.createElement(m.A,{size:"small",sizes:p})),n.createElement("p",null,n.createElement(m.A,{size:"medium",sizes:p}),n.createElement(m.A,{size:"large",sizes:p}),n.createElement(m.A,{size:"small",sizes:p}))):null,n.createElement(s.A,{message:a||h.t("loading\u2026",{fallbackHash:"14b85fa8e87f846f757eaccda09761641b397f01",fallbackHashNs:"loading_button"}),assertive:t,deferBy:c.i5}))}QuipLoadingSkeleton.displayName="QuipLoadingSkeleton"},0x1d461b5c:(e,t,a)=>{"use strict";a.d(t,{A:()=>b,t:()=>QuipMissingTitleContent});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x139aa1a7),l=a(0x339b339c),o=a(0xbc05fc30),s=a(0x89451ab8),c=a(0x11ed04fa0),d=a(0xd843ab47),m=a(0xbd3de346),u=a(0x1529370e7),p=a(0x226892387),h=a(0x14ea3ce99),_=a(0x19895585a);let f=new r.Ay("slack_docs"),QuipMissingTitleContent=({fileId:e})=>(0,u.oH)(e)?n.createElement("div",{className:"p-quip_title__title"},f.t("Untitled",{fallbackHash:"621521f9a8788695ec292cbec54d2792cfdf0a7d",fallbackHashNs:"files"})):n.createElement(l.A,{size:"medium"});QuipMissingTitleContent.displayName="QuipMissingTitleContent";let QuipMissingHeaderContents=({isLoadingHistory:e=!1,fileId:t,tempId:a})=>{let r=(0,p.d4)(c.U6),{container:l,getPrimaryView:u}=(0,n.useContext)(d.A),f=(0,p.d4)(u),b=(0,p.d4)(e=>t?(0,h.Lp)(e,t):null),g=n.createElement("div",{className:"p-quip_popout__title"},n.createElement(QuipMissingTitleContent,{fileId:t}),n.createElement(o.A,{id:a})),y=e?n.createElement("div",{className:"p-quip_popout__missing_history_header"},g):g,A=r&&l===_.mq.Secondary&&f?.viewType===i.D.List||l===_.mq.Split&&b&&(0,m.uO)(b);return n.createElement("div",{className:"p-quip_popout__header"},y,A&&n.createElement(s.J,null))};QuipMissingHeaderContents.displayName="QuipMissingHeaderContents";let b=QuipMissingHeaderContents},0xda5bc272:(e,t,a)=>{"use strict";a.d(t,{A:()=>O});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x344bb842),c=a(0x2501a2cee),d=a(0x21cf37dc6),m=a(0x1c659cbb1),u=a(0x1d3efd4ea),p=a(0x238ee6f5d),h=a(0x339b339c),_=a(0x1d08e7031),f=a(0x138186673),b=a(0x1991a9b6d),g=a(0x19a6a6f6a),y=a(0x6792c5b4),A=a(0x1f4fd9824),x=a(0x20679dcfc),E=a(0xa88049da),C=a(0x20e80190e),k=a(0x226892387),v=a(0xd93ecf94),S=a(0x1fcbb004d),I=a(0x11eae4d05),w=a(0x3e050aef),T=a(0x16368204e),N=a(0x193577201);let M=a.p+"system_messages_empty-fbfc00a.png",R=a.p+"system_messages_empty@2x-6dc9b1d.png",P=new o.Ay("quip"),L={small:"50%",medium:"85%",large:"100%"};function QuipAppNotification({ts:e,fileId:t}){let a=(0,r.wA)(),i=(0,x.p)(t),o=(0,k.d4)(t=>(0,v.Ld)(t,i,e,!0)),_=(0,k.d4)(e=>o?(0,E.A)(e,o):null),C=(0,n.useCallback)(()=>{a((0,w.C8)({fileId:t,messageTs:e}))},[a,t,e]),S=(0,n.useMemo)(()=>{let e=P.t("Close ephemeral notification"),t=!!(_?.userId||_?.botId||o?.icons||o?.bot_profile||o?.username==="slackbot"),a=!!(_?.userId||_?.botId||_?.username||o?.bot_profile||o?.username==="slackbot");return n.createElement(y.A,{light:t?n.createElement(m.Ay,{userId:_?.userId,botId:_?.botId,icons:o?.icons,botProfile:o?.bot_profile,size:m.RG.verySmall,showTooltip:!0,ariaHidden:"true",tabIndex:-1}):n.createElement(u.A,{size:m.RG.verySmall}),className:"p-quip_system_messages__app_notification__header"},a?n.createElement(A.A,{userId:_?.userId,username:_?.username,botId:_?.botId,botProfile:o?.bot_profile,className:"p-quip_system_messages__app_notification__app_name"}):n.createElement(p.A,{type:"non-existent",className:"p-quip_system_messages__app_notification__app_name"}),n.createElement(s.A,{"aria-label":e,onClick:C,className:"p-quip_system_messages__app_notification__close_btn"},n.createElement(c.Ah,{name:"close",size:"20"})))},[o?.bot_profile,o?.icons,o?.username,_?.botId,_?.userId,_?.username,C]),I=(0,n.useMemo)(()=>{let e;return o?(e=o.text||o.attachments||o.blocks?n.createElement(n.Fragment,null,n.createElement(b.A,{msg:o}),n.createElement(g.A,{msg:o}),n.createElement(f.A,{msg:o,className:"p-quip_system_messages__app_notification--message_attachment"})):n.createElement(n.Fragment,null,n.createElement(h.A,{sizes:L,size:d.o.Large}),n.createElement(h.A,{sizes:L,size:d.o.Medium})),n.createElement("div",{className:"p-quip_system_messages__app_notification__content"},e)):null},[o]),T=l()("p-quip_system_messages__app_notification");return n.createElement("div",{className:T},S,I)}function QuipAppNotificationsModal({fileId:e}){let t=(0,r.wA)(),a=(0,n.useCallback)(()=>t((0,S.O)()),[t]),i=(0,k.Z2)(t=>(0,T.W)(t,e,N.Y.ephemeralMessage,!0)||[]),l=i[0]?.ephemeralMessages;return l?n.createElement(C.dW,{closeModal:a},n.createElement(C.rQ,null,n.createElement(C.Rc,{title:P.t("App Notifications")})),n.createElement(C.$m,{className:"p-quip_system_messages__app_notifications_modal"},n.createElement("div",{className:"p-quip_system_messages__app_notifications"},l&&l.length?l.map(t=>n.createElement(QuipAppNotification,{key:t,ts:t,fileId:e})):n.createElement("div",{className:"p-quip_system_messages__app_notifications--empty"},n.createElement(_.A,{className:"p-quip_system_messages__app_notifications--empty_image",src:M,srcSet:R,alt:P.t("Empty app notifications illustration")}),n.createElement("span",null,P.t("You\u2019re all caught up.")))))):null}QuipAppNotification.displayName="QuipAppNotification",QuipAppNotificationsModal.displayName="QuipAppNotificationsModal";let O=(0,I.e)(QuipAppNotificationsModal)},0x135659c07:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0xd9faf062),c=a(0x153af1c54),d=a(0x303eaaff),m=a(0x3711e82d),u=a(0x3e050aef);let QuipSystemMessage=({type:e,children:t,fileId:a,addedOn:i,showCloseButton:p=!0,inFlexpane:h})=>{let _=(0,r.wA)(),f=l()("p-quip_system_messages",{[`p-quip_system_messages--${e}`]:!!e}),{sectionIndex:b,enableSectionNavigation:g}=(0,c.CR)(c.G6.Banner,!!h),y=(0,n.useCallback)(()=>{i&&a&&_((0,u.R8)({fileId:a,addedOn:i}))},[_,a,i]);return n.createElement(d.A,{id:"QuipSystemMessageBanner",index:b,enableSectionNavigation:g},n.createElement(o.A,{eventId:m.EventId.QUIP_SYSTEM_MESSAGE,uiComponentName:m.UiComponentName.QUIP_SYSTEM_MESSAGE,uiComponentVariant:m.UiComponentVariant.QUIP_SYSTEM_MESSAGE_PREFIX+e,clogImpression:!0},n.createElement(s.al,{className:f,isFixedPosition:!1,showCloseButton:p,onClose:y,type:"warning"},t)))};QuipSystemMessage.displayName="QuipSystemMessage";let p=QuipSystemMessage},0x3da18e0d:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x8c8bafa3),l=a(0x20482ad21),o=a(0x15fb82076),s=a(0x2501a2cee),c=a(0x135659c07),d=a(0x205570b9a),m=a(0x226892387),u=a(0xf3c65e54),p=a(0x5b1935a6),h=a(0x193577201);let _=new l.Ay("quip"),PostsMigrationSystemMessage=({fileId:e,message:t,inFlexpane:a})=>{let l=`https://${(0,i.Xk)()}/help/articles/4416442287251-Introducing-canvases--A-new-way-to-curate-collaborate-and-share-information-in-Slack-`,f=(0,m.d4)(d.Rn),b=(0,r.wA)();return((0,n.useEffect)(()=>{b((0,u.j)({notificationName:p.ze.POSTS_DEPRECATION_DEPRECATION_BANNER_CANVAS,action:p.hw.IMPRESSION,notificationParams:{file_id:[e]}}))},[b,e]),f)?n.createElement(c.A,{type:h.Y.postsMigration,fileId:e,addedOn:t.addedOn,showCloseButton:!0,inFlexpane:a},n.createElement(s.Ah,{name:"info",size:"inherit",inline:!0}),"\xa0\xa0",f&&_.t("This post is now a canvas. Want to see what\u2019s possible in canvases?"),"\xa0",n.createElement(o.A,{href:l,target:"new"},f&&_.t("Learn more"))):null};PostsMigrationSystemMessage.displayName="PostsMigrationSystemMessage";let f=PostsMigrationSystemMessage},0x110330473:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>L,GU:()=>renderQuipTitle});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1db69cda),s=a(0x20482ad21),c=a(0x12edaa96a),d=a(0x2501a2cee),m=a(0x1fdec3e16),u=a(0x339b339c),p=a(0x113cdbbd7),h=a(0x944e06df),_=a(0x94ea8a62),f=a(0x18df748c7),b=a(0x1d461b5c),g=a(0x110e51560),y=a(0x23eb69101),A=a(0x202fa5d55),x=a(0x19729544),E=a(0x1a6bfa734),C=a(0xbd3de346),k=a(0x1ccef1c6f),v=a(0x226892387),S=a(0x104da8270),I=a(0x14ea3ce99),w=a(0x1060f0c84);let T=new s.Ay("files"),N=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c\ude32-\ude3a]|[\ud83c\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/,M=["\uE567"],R=new Map([["\uE567",n.createElement(d.Ah,{key:void 0,name:"lock-filled",inline:!0})]]),isRecognizedIcon=e=>M.includes(e),insertSymbolsInTitleString=(e,t)=>{let a=[],r=0,i="",maybeAppendPart=()=>{i.length&&a.push(n.createElement(A.A,{key:`${r}-${i}`,text:i,stopAnimations:!t}))};for(maybeAppendPart.displayName="maybeAppendPart";r<e.length;){let t=e[r];if(isRecognizedIcon(t)&&R.has(t)){maybeAppendPart();let e=R.get(t);if(e){let t=n.cloneElement(e,{key:(0,c.A)()});a.push(t)}i=""}else i+=t;r+=1}return maybeAppendPart(),a};insertSymbolsInTitleString.displayName="insertSymbolsInTitleString";let QuipTitleParsedId=({fileId:e,truncate:t=!0,size:a,useLeadingEmojiAsIcon:i=!1,stopAnimations:s,hideRichTextEmojiTooltips:c=!1,preferTitleBlocksFromFileObject:d=!1})=>{let _=(0,r.wA)(),b=(0,v.d4)(t=>(0,I.Lp)(t,e)),{shouldUseLeadingEmojiForIcon:A,stopAnimations:M,disableSelection:R,disableHighlights:P}=(0,n.useContext)(x.o),L=(0,f.A)(e),O=(0,v.d4)(t=>{let a=(0,w.bJ)(t,e)??L;return(0,y.C)(a||void 0)?T.t("Untitled"):a}),D=(0,v.d4)((0,n.useCallback)(t=>{let a;if(d&&b.title_blocks&&(a=b.title_blocks),(a=(0,w.k4)(t,e)??b.title_blocks)&&a.length>0){var n;return(n=a)&&0!==n.length&&(e=>{if(!e||0===e.length)return!1;let t=e[0]?.elements?.[0]?.elements;return!(t?.length===1&&"text"===t[0].type&&(0,y.C)(t[0].text||void 0))})(n)?n:[{type:"rich_text",elements:[{type:"rich_text_section",elements:[{type:"text",text:T.t("Untitled")}]}]}]}return a},[b.title_blocks,e,d])),F=(0,v.d4)(e=>!!(0,k.ty)(e,"a11y_animations")),U=(0,E.A)();if(!(0,C.ZG)(b))return null;if(!O&&!D)return U.info(`No title string or title blocks found for ${e}, rendering missing text`),n.createElement(u.A,{size:"medium"});let B=(0,o.A)(D),H=O??"";if(A||i)if(B){let e=B[0]?.elements?.[0]?.elements,t=e?.findIndex(e=>"text"!==e.type||e.text?.trim().length!==0);if(e&&void 0!==t&&t>=0&&"emoji"===e[t].type&&B[0]?.elements?.[0]?.elements){let a=e[t];_((0,S.D)(a.name))&&(B[0].elements[0].elements=e.slice(t+1))}let a=B[0]?.elements?.[0]?.elements?.[0];if(a&&"text"===a.type){let e=a.text.trim();0===e.search(N)&&(a.text=e.replace(N,"").trim())}}else H&&(H=(0,g.L)(H));let W=B?.length?n.createElement(h.A,{inline:!0,className:l()("p-quip_title__blocks_simple",`p-quip_title__blocks__${a}`,{"p-quip_title__blocks--disable_selection":R}),blocks:B,blocksContainerContext:p.pi.canvas_title,a11yAnimationsEnabled:F,noInlineLinks:!0,stopAnimations:s||M,disableHighlights:P,hideRichTextEmojiTooltips:c,disableJumboEmoji:!0}):n.createElement(n.Fragment,null,insertSymbolsInTitleString(H,F&&!(s||M)));return t?n.createElement(m.A,{lines:1,withTooltip:!0},n.createElement("div",{className:"p-quip_title__title"},W)):W};QuipTitleParsedId.displayName="QuipTitleParsedId";let P=(0,_.A)(QuipTitleParsedId,b.t),L=P;function renderQuipTitle(e){return n.createElement(P,e)}renderQuipTitle.displayName="renderQuipTitle"},0x75a8557f:(e,t,a)=>{"use strict";a.d(t,{b:()=>openSalesforceRecordPicker,j:()=>SalesforceRecordPicker});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x24f1e08bb),c=a(0x45bd075),d=a(0x1d2cd7755),m=a(0x2501a2cee),u=a(0xbfdb6c3b),p=a(0x91728dda),h=a(0xe169634d),_=a(0xfc70e902),f=a(0xd7b35c2f),b=a(0xf01a9d50),g=a(0x189f23e14),y=a(0x20e80190e),A=a(0xa9a7442),x=a(0x3711e82d),E=a(0xc0b7c558),C=a(0x226892387),k=a(0x1fcbb004d),v=a(0x46dbff89),S=a(0x2fd935d8),I=a(0x609b6779),w=a(0x1bdf032f7),T=a(0xcf8ebf2b),N=a(0x1ed154a66),M=a(0x1ac82719b),R=a.n(M);let P=new l.Ay("slack-docs"),SalesforceRecordPicker=({onInsertRecord:e,source:t,includeFieldPicker:a=!1,defaultOrgId:l,defaultObjectType:v,defaultRecord:M,defaultField:L,defaultIncludeFieldLabel:O,onDismiss:D})=>{let F=(0,r.wA)(),U=(0,C.d4)(p.R5),B=(0,C.d4)(p.B_),H=(0,_.r)({salesElevateOrgsOnly:!1}),W=(0,h.B)(),V=l??W,[G,q]=(0,n.useState)(!1),[j,z]=(0,n.useState)(l??null),[K,$]=(0,n.useState)(null),[Y,Q]=(0,n.useState)(v||null),[Z,J]=(0,n.useState)(M||null),[X,ee]=(0,n.useState)(L||null),[et,ea]=(0,n.useState)(O??!1),[en,er]=(0,n.useState)([]),ei=(0,n.useRef)(null),[el,eo]=(0,n.useState)([]),es=(0,n.useRef)(null),[ec,ed]=(0,n.useState)(!0),em=(0,u.W)({salesforceOrgId:j||""}),[eu,ep]=(0,n.useState)(null),[eh,e_]=(0,n.useState)([]),ef=(0,n.useRef)(null),[eb,eg]=(0,n.useState)(null),[ey,eA]=(0,n.useState)(!1),ex=(0,n.useCallback)(()=>{ep(null),eg(null),e_([]),ef.current=null},[]),eE=(0,C.d4)(p.D9);(0,n.useEffect)(()=>{F((0,I.S)({reason:"salesforce-record-picker"}))},[F]),(0,n.useEffect)(()=>{if(V){let e=H.find(e=>e.salesforce_org_id===V)?.instance_url;e&&(z(V),$(e))}},[H,V]),(0,n.useEffect)(()=>{Y&&j&&(ei.current=F((0,g.j)({objectType:Y.value,salesforceOrgId:j,reason:"salesforce-record-picker"})).then(e=>{let t=e.records.map(e=>({label:e.name,value:e.id}));return t.unshift({key:"recently-view-items",label:P.t("Recently viewed items"),value:"",isDisabled:!0}),er(t),t}))},[F,Y,j]),(0,n.useEffect)(()=>{if(a)if(j&&Z){let e=Z.value,t=(0,E.j)(j,e);es.current=F((0,w.a)({recordId:t,layoutType:f.f,fallbackLayoutType:f.i})).then(e=>{let t=e&&e.fields?e.fields.map(e=>{let t="Reference"===e.data_type;return{label:e.label,value:e.api_name,extras:{salesforceLabel:e.label,salesforceApiName:e.api_name,salesforceDisplayValue:e.display_value,dataType:e.data_type,referenceRecordId:t&&e.value?String(e.value):void 0}}}):[];return ed(!0),eo(t),t})}else ed(!1),eo([]),es.current=null},[F,Z,j,a]),(0,n.useEffect)(()=>{if(!B||!a||!eu)return;let e=eu.extras?.referenceRecordId;if(e&&j){eA(!0);let t=(0,E.j)(j,e);ef.current=F((0,w.a)({recordId:t,layoutType:f.f,fallbackLayoutType:f.i})).then(e=>{let t=e&&e.fields?e.fields.map(e=>({label:e.label,value:e.api_name,extras:{salesforceLabel:e.label,salesforceApiName:e.api_name,salesforceDisplayValue:e.display_value}})):[];return eA(!1),e_(t),t}).catch(()=>(eA(!1),[]))}else e_([]),ef.current=null},[F,eu,j,a,B]);let eC=(0,n.useCallback)(()=>{D&&D(),F((0,k.O)())},[F,D]),ek=(0,n.useCallback)(()=>{if(!K||!Z||!j)return;q(!0);let t=`${K}/${Z.value}`,n=Z.value;if(a&&X){let e=B&&eu?.extras?.referenceRecordId;n=e?`${j}/${eu.extras.referenceRecordId}`:`${j}/${Z.value}`,t=e?`${K}/${eu.extras.referenceRecordId}`:`${K}/${Z.value}`}let r=B&&eu?eb:X,i=r?.extras?.salesforceLabel,l=r?.extras?.salesforceApiName;try{let a=j&&Y&&Z?{orgId:j,objectType:Y,record:Z}:void 0;e(t,n,i,l,a,et),eC()}catch{q(!1)}},[eC,e,j,K,Z,a,X,Y,eu,eb,B,et]),ev=(0,n.useMemo)(()=>Object.values(H).map(e=>({label:e.name,value:e.salesforce_org_id,instance_url:e.instance_url})),[H]),eS=(0,n.useCallback)(e=>Promise.resolve(ev.filter(t=>t.label.toLowerCase().includes(e.toLowerCase()))),[ev]),eI=(0,n.useCallback)(e=>{e.value!==j&&(Q(null),J(null),ee(null),ex()),z(e.value),$(e.instance_url)},[j,ex]),ew=(0,n.useMemo)(()=>{let e=ev.filter(e=>e.value===j)?.[0]||ev[0],t=P.t("Salesforce org");return n.createElement(n.Fragment,null,n.createElement(d.A,{htmlFor:"salesforce_record_org_select",text:t}),n.createElement(A.m,{focusOnMount:!0,selectId:"salesforce_record_org_select",selectedOption:e??void 0,onOptionSelected:eI,search:eS,showDropdownIcon:!0,isRequired:!0,width:400}))},[ev,j,eI,eS]),eT=(0,n.useCallback)(e=>{e.value!==Y?.value&&(J(null),er([]),ei.current=null,ee(null),ex()),Q(e)},[Y,ex]),eN=(0,n.useCallback)(async e=>{if(j&&e){let{objects:t}=await F((0,T.x)({query:e,passedSalesforceOrgId:j||void 0,reason:"canvas_salesforce_record_picker_type_search"}));return Promise.resolve((0,N.Z)(t))}let t=[...em.options];return t.unshift({label:P.t("Recently viewed items"),value:"",isDisabled:!0,key:"recently-view-items"}),Promise.resolve(t)},[F,j,em]),eM=(0,n.useMemo)(()=>{let e=P.t("Object");return n.createElement(n.Fragment,null,n.createElement(d.A,{htmlFor:"salesforce_record_type_select",id:"salesforce_record_type_label",text:e}),n.createElement(A.m,{selectId:"salesforce_record_type_select",selectedOption:Y||void 0,onOptionSelected:eT,search:eN,debounceWaitPeriod:200,showDropdownIcon:!0,isRequired:!0,searchOnClick:!0,expandOnFocus:!0,placeholderText:P.t("Search objects\u2026"),width:400}))},[eT,Y,eN]),eR=(0,n.useCallback)(e=>"recently-view-items"===e.key?n.createElement(s.A,{primaryContent:n.createElement("span",{className:R().optionsHeader},e.label),size:"small"}):n.createElement(s.A,{primaryContent:n.createElement(n.Fragment,null,n.createElement(m.Ah,{inline:!0,...(0,b.C)(e.type)}),n.createElement("span",{className:"margin_left_25 bold"},e.label)),size:"small"}),[]),eP=(0,n.useCallback)(e=>{e.nonInteractive||(J(e),ee(null),eo([]),es.current=null,ex(),ed(!1))},[ex]),eL=(0,n.useCallback)(async e=>{if(j&&Y&&e&&e.length>=3){let{records:t}=await F((0,S.R)({sobjects:[{sobjectApiName:Y.value}],salesforceOrgId:j,query:e,...j&&{selectedOrgId:j},reason:"salesforce-record-picker"}));return Promise.resolve(t)}return!e&&ei.current?ei.current:Promise.resolve(en)},[F,en,Y,j]),eO=(0,n.useCallback)((e,t)=>async a=>{if(!a&&t.current)return t.current;if(a&&e){let t=a.toLowerCase();return e.filter(e=>!!e.label&&e.label.toString().toLowerCase().includes(t))}return e},[]),eD=(0,n.useMemo)(()=>eO(el,es),[eO,el]),eF=(0,n.useMemo)(()=>{let e=P.t("Record");return n.createElement(n.Fragment,null,n.createElement(d.A,{htmlFor:"salesforce_record_select",text:e}),n.createElement(A.m,{key:Y?.value,selectId:"salesforce_record_select",selectedOption:Z,onOptionSelected:eP,renderSelectedOption:eR,renderOption:eR,search:eL,debounceWaitPeriod:200,showDropdownIcon:!0,isRequired:!0,searchOnClick:!0,expandOnFocus:!0,placeholderText:P.t("Search records\u2026"),width:400}))},[eP,eR,eL,Z,Y]),eU=(0,n.useCallback)(e=>{ee(e),ex(),B&&e.extras?.dataType==="Reference"&&ep(e)},[ex,B]),eB=(0,n.useCallback)(e=>{let t=e.extras?.dataType==="Reference",a=B&&t;return n.createElement(s.A,{primaryContent:n.createElement(n.Fragment,null,n.createElement("span",{className:"margin_left_25 bold"},e.label),n.createElement("span",{className:"margin_left_25"},"|"),n.createElement("span",{className:"margin_left_25"},e.extras?.salesforceDisplayValue),a&&n.createElement("span",{className:"margin_left_50"},n.createElement(m.Ah,{inline:!0,name:"arrow-right","aria-label":P.t("Related record",{fallbackHash:"1c54132b8e5a9fa44a9a1a7d30b1be36ab3c4247"})}))),size:"small"})},[B]),eH=(0,n.useMemo)(()=>{let e=P.t("Field"),t=P.t("Loading fields\u2026"),a=P.t("Search fields\u2026"),r=ec?a:t;return n.createElement(n.Fragment,null,n.createElement(d.A,{htmlFor:"salesforce_field_select",text:e}),n.createElement(A.m,{key:Z?.value,selectId:"salesforce_field_select",ariaLabel:ec?e:t,selectedOption:X,onOptionSelected:eU,renderSelectedOption:eB,renderOption:eB,search:eD,showDropdownIcon:!0,isRequired:!0,searchOnClick:ec,expandOnFocus:!0,placeholderText:r,width:400}))},[X,eU,eB,eD,ec,Z?.value]),eW=(0,n.useCallback)(e=>{eg(e)},[]),eV=(0,n.useMemo)(()=>eO(eh,ef),[eO,eh]),eG=(0,n.useMemo)(()=>{let e=B?P.t("Related field",{fallbackHash:"c326a4660b674d2f6ea82687a1e1abae2337541f"}):"",t=P.t("Loading fields\u2026"),a=P.t("Search fields\u2026"),r=ey?t:a;return n.createElement(n.Fragment,null,n.createElement(d.A,{htmlFor:"salesforce_related_field_select",text:e}),n.createElement(A.m,{key:eu?.extras?.referenceRecordId,selectId:"salesforce_related_field_select",ariaLabel:ey?t:e,selectedOption:eb,onOptionSelected:eW,renderSelectedOption:eB,renderOption:eB,search:eV,showDropdownIcon:!0,isRequired:!0,searchOnClick:!ey,expandOnFocus:!0,placeholderText:r,width:400}))},[eb,eW,eB,eV,ey,B,eu?.extras?.referenceRecordId]),eq=P.t("Update"),ej=(0,n.useCallback)(e=>{ea(e.target.checked)},[]),ez=P.t("Choose Salesforce data field to insert"),eK=a?ez:P.t("Add a Salesforce object");return n.createElement(i.A,{eventId:x.EventId.SALESFORCE_RECORD_PICKER_OPEN,entryPoint:t,uiComponentVariant:a?"salesforce-record-field-picker":"salesforce-record-picker"},n.createElement(y.dW,{maxWidth:480,closeModal:eC,contentLabel:eK},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:eK})),n.createElement(y.$m,null,n.createElement(y.qf,null,ew),j&&!em.loading&&n.createElement(y.qf,{className:"margin_top_75 margin_bottom_75"},eM),Y&&j&&n.createElement(y.qf,{className:"margin_top_75 margin_bottom_75"},eF),Y&&j&&Z&&a&&n.createElement(y.qf,{className:"margin_top_75 margin_bottom_75"},eH,eE?n.createElement(d.A,{type:"inline",cursor:"pointer",text:P.t("Include field label"),className:"margin_top_75"},n.createElement(c.A,{checked:et,onChange:ej})):null),B&&Y&&j&&Z&&a&&eu&&n.createElement(y.qf,{className:"margin_top_75 margin_bottom_75"},eG)),n.createElement(y.jl,null,n.createElement(y.ox,{className:"flex-row-reverse"},n.createElement(y.s_,{type:"outline","aria-label":P.t("Close")},P.t("Close")),n.createElement(o.lV,{type:"primary",loading:G,onClick:ek,disabled:a?!U||(B&&eu?!eb:!X):!Z,"aria-label":P.t("Insert")},L?eq:P.t("Insert"))))))};SalesforceRecordPicker.displayName="SalesforceRecordPicker";let openSalesforceRecordPicker=({onInsertRecord:e,source:t,includeFieldPicker:a=!1,defaultOrgId:r,defaultObjectType:i,defaultRecord:l,defaultField:o,defaultIncludeFieldLabel:s})=>(0,v.q)({element:n.createElement(SalesforceRecordPicker,{onInsertRecord:e,source:t,includeFieldPicker:a,defaultOrgId:r,defaultObjectType:i,defaultRecord:l,defaultField:o,defaultIncludeFieldLabel:s}),name:"salesforce-record-picker"});openSalesforceRecordPicker.displayName="openSalesforceRecordPicker"},0xb7c07c2c:(e,t,a)=>{"use strict";a.d(t,{O:()=>i,v:()=>quipUnfurlTypeToSource});var n,r=a(0xc26f5c40),i=((n={}).TOOLBAR="insertion_toolbar",n.LINK="paste_link",n.CARD="paste_card",n.INLINE="paste_title",n.SHORTCUT="shortcut",n.PLACEHOLDER="placeholder",n.OTHER="other",n);function quipUnfurlTypeToSource(e){let t;switch(e){case r.UnfurlType.CARD:t="paste_card";break;case r.UnfurlType.INLINE:t="paste_title";break;case r.UnfurlType.LINK:t="paste_link";break;default:t="other"}return t}},0x1d40432fa:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1b88224f9),o=a(0x2cf1b748),s=a(0x4e1a3b33),c=a(0x15f4f83cf),d=a(0xbd3de346),m=a(0x226892387),u=a(0x14149c126),p=a(0x1fcbb004d);let h=new i.Ay("tabbed-channel");function ShareFileAsFolderItemErrorDialog({error:e,file:t,folderTitle:a,onClose:i}){let _,f=(0,r.wA)(),b=(0,m.d4)(e=>"on"===(0,u._Z)(e,"file_share_limit")),g=(0,n.useCallback)(()=>{i?.(),f((0,p.O)())},[f,i]),y=(0,c.lv)(t);switch(e){case o.u.CANNOT_SHARE_CONTAIN_FILE_UPLOAD:_=(0,d.l7)(t)?h.t("The list contains files, which based on your organization\u2019s settings, can\u2019t be shared with external organizations via Slack Connect."):h.t("The canvas contains files, which based on your organization\u2019s settings, can\u2019t be shared with external organizations via Slack Connect.");break;case o.u.CANNOT_SHARE_FROM_EXTERNAL_ORG:_=(0,d.l7)(t)?h.t("This list is owned by a different organization. Only they can add the list as a folder item."):h.t("This canvas is owned by a different organization. Only they can add the canvas as a folder item.");break;case o.u.CANNOT_SHARE_FILE_RESTRICTED_SHARING_ENABLED:_=(0,d.l7)(t)?h.t("The list owner has limited others from sharing this list."):h.t("The canvas owner has limited others from sharing this canvas.");break;case o.u.CANNOT_SHARE_TEAM_CANVAS_RESTRICTED_SHARING_ENABLED:_=h.t("Based on your organization\u2019s settings, only canvas owners can share canvases.");break;case o.u.CANNOT_SHARE_TEAM_LIST_RESTRICTED_SHARING_ENABLED:_=h.t("Based on your organization\u2019s settings, only list owners can share lists.");break;case o.u.FILE_ALREADY_ADDED:_=h.rt("<strong>{fileName}</strong> has already been added to <strong>{folderTitle}</strong>",{fileName:n.createElement(s.A,{file:t}),folderTitle:a??h.t("this folder")});break;case o.u.TOO_MANY_BOOKMARKS:_=h.rt("Channel and DM tabs can have up to 100 total folders, folder items, pins, or workflows. To add another, remove one of those items from the conversation\u2019s tabs or folders.");break;case o.u.CANNOT_SHARE_FILE_UPLOADS_DISABLED:_=h.t("File uploads to this workspace have been disabled at the request of your administrator.");break;case o.u.CANNOT_SHARE_FILE_SHARE_LIMIT_REACHED:(0,d.l7)(t),_=b?h.rt("<strong>{title}</strong> has reached its sharing limit. To add it to a folder, you\u2019ll need to stop sharing it with other people or channels.",{title:n.createElement(s.A,{file:t})}):""}return n.createElement(l.A,{title:y?h.t("We couldn\u2019t add the link to the folder"):(0,d.l7)(t)?h.t("We couldn\u2019t add the list to the folder"):(0,d.DQ)(t)?h.t("We couldn\u2019t add the canvas to the folder"):h.t("We couldn\u2019t add the file to the folder"),"data-qa":"share-file-as-folder-item-error-dialog-content",showCancelButton:!1,submitButtonText:h.t("OK"),onClose:g,onSubmit:g},_)}ShareFileAsFolderItemErrorDialog.displayName="ShareFileAsFolderItemErrorDialog";let _=ShareFileAsFolderItemErrorDialog},0x2cf1b748:(e,t,a)=>{"use strict";a.d(t,{u:()=>r});var n,r=((n={}).CANNOT_SHARE_CONTAIN_FILE_UPLOAD="cannot_share_contain_file_upload",n.CANNOT_SHARE_FILE_SHARE_LIMIT_REACHED="cannot_share_file_share_limit_reached",n.CANNOT_SHARE_FROM_EXTERNAL_ORG="cannot_share_from_external_org",n.CANNOT_SHARE_FILE_RESTRICTED_SHARING_ENABLED="cannot_share_file_restricted_sharing_enabled",n.CANNOT_SHARE_TEAM_CANVAS_RESTRICTED_SHARING_ENABLED="cannot_share_team_canvas_restricted_sharing_enabled",n.CANNOT_SHARE_TEAM_LIST_RESTRICTED_SHARING_ENABLED="cannot_share_team_list_restricted_sharing_enabled",n.FILE_ALREADY_ADDED="file_already_added",n.TOO_MANY_BOOKMARKS="too_many_bookmarks",n.CANNOT_SHARE_FILE_UPLOADS_DISABLED="cannot_share_file_uploads_disabled",n)},0x1f8f18921:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x14d4b0787),l=a(0x4e1a3b33),o=a(0xbd3de346),s=a(0x20e80190e),c=a(0x226892387),d=a(0x14149c126);let m=new r.Ay("tabbed-channel");function ChannelTabsSpeedBump({speedBumpType:e,file:t,onCancel:a}){let r,u=(0,c.d4)(e=>"on"===(0,d._Z)(e,"file_share_limit"));switch(e){case i.w.CANNOT_SHARE_CONTAIN_FILE_UPLOAD:r=(0,o.l7)(t)?m.rt("<strong>We couldn\u2019t add the list as a tab.</strong> The list contains files, which based on your organization\u2019s settings, can\u2019t be shared with external organizations via Slack Connect."):m.rt("<strong>We couldn\u2019t add the canvas as a tab.</strong> The canvas contains files, which based on your organization\u2019s settings, can\u2019t be shared with external organizations via Slack Connect.");break;case i.w.CANNOT_SHARE_FROM_EXTERNAL_ORG:r=(0,o.l7)(t)?m.rt("<strong>We couldn\u2019t add the list as a tab.</strong> This list is owned by a different organization. Only they can add the list as a tab."):m.rt("<strong>We couldn\u2019t add the canvas as a tab.</strong> This canvas is owned by a different organization. Only they can add the canvas as a tab.");break;case i.w.CANNOT_SHARE_FILE_RESTRICTED_SHARING_ENABLED:r=(0,o.l7)(t)?m.rt("<strong>We couldn\u2019t add the list as a tab.</strong> The list owner has limited others from sharing this list."):m.rt("<strong>We couldn\u2019t add the canvas as a tab.</strong> The canvas owner has limited others from sharing this canvas.");break;case i.w.CANNOT_SHARE_TEAM_CANVAS_RESTRICTED_SHARING_ENABLED:r=m.rt("<strong>We couldn\u2019t add the canvas as a tab.</strong> Based on your organization\u2019s settings, only canvas owners can share canvases.");break;case i.w.CANNOT_SHARE_TEAM_LIST_RESTRICTED_SHARING_ENABLED:r=m.rt("<strong>We couldn\u2019t add the list as a tab.</strong> Based on your organization\u2019s settings, only list owners can share lists.");break;case i.w.CANNOT_SHARE_FILE_SHARE_LIMIT_REACHED:r=(0,o.l7)(t)?u?m.rt("<strong>We couldn\u2019t add the list as a tab.</strong> <strong>{title}</strong> has reached its sharing limit. To add it as a tab in this channel, you\u2019ll need to stop sharing it with other people or channels.",{title:n.createElement(l.A,{file:t})}):"":u?m.rt("<strong>We couldn\u2019t add the canvas as a tab.</strong> <strong>{title}</strong> has reached its sharing limit. To add it as a tab in this channel, you\u2019ll need to stop sharing it with other people or channels.",{title:n.createElement(l.A,{file:t})}):"";break;case i.w.CANNOT_SHARE_UNKNOWN_REASON:r=(0,o.l7)(t)?m.rt("<strong>We couldn\u2019t add the list as a tab.</strong> Please try again.",{fallbackHash:"48faa2ac6ac6d273cd7dacbe15a5b6f7e1822087",fallbackHashNs:"file_viewer"}):m.rt("<strong>We couldn\u2019t add the canvas as a tab.</strong> Please try again.",{fallbackHash:"48faa2ac6ac6d273cd7dacbe15a5b6f7e1822087",fallbackHashNs:"file_viewer"})}return n.createElement(s.ty,{className:"channel-tabs-speedbump",description:r,onContinue:a,continueButtonLabel:m.t("OK"),continueButtonType:"primary","data-qa":"channel-tabs-speedbump-content"})}ChannelTabsSpeedBump.displayName="ChannelTabsSpeedBump";let u=ChannelTabsSpeedBump},0x14d4b0787:(e,t,a)=>{"use strict";a.d(t,{w:()=>n});let n={CANNOT_SHARE_CONTAIN_FILE_UPLOAD:"cannot_share_contain_file_upload",CANNOT_SHARE_FROM_EXTERNAL_ORG:"cannot_share_from_external_org",CANNOT_SHARE_FILE_RESTRICTED_SHARING_ENABLED:"cannot_share_file_restricted_sharing_enabled",CANNOT_SHARE_TEAM_CANVAS_RESTRICTED_SHARING_ENABLED:"cannot_share_team_canvas_restricted_sharing_enabled",CANNOT_SHARE_TEAM_LIST_RESTRICTED_SHARING_ENABLED:"cannot_share_team_list_restricted_sharing_enabled",CANNOT_SHARE_FILE_SHARE_LIMIT_REACHED:"cannot_share_file_share_limit_reached",CANNOT_SHARE_UNKNOWN_REASON:"cannot_share_unknown_reason"}},0x4f22ff33:(e,t,a)=>{"use strict";a.d(t,{CQ:()=>sendA11yAnnouncement,dR:()=>unregisterFileIdForWindow,g:()=>registerFileIdForWindow,n9:()=>getA11yReadOnly,pZ:()=>toggleA11yReadOnly});var n=a(0x12edaa96a);let r=new WeakMap;function registerFileIdForWindow(e,t,a){let n=r.get(e)??new Map;n.set(t,a),r.set(e,n)}function unregisterFileIdForWindow(e,t){r.get(e)?.size===1?r.delete(e):r.get(e)?.delete(t)}function getA11yReadOnly(e,t){return r.get(e)?.get(t)?.docEmbed.a11yReadOnlyMode}function toggleA11yReadOnly(e,t){r.get(e)?.get(t)?.docEmbed.docEditor.toggleA11yReadOnlyMode()}function sendA11yAnnouncement(e,t,a,i){r.get(e)?.get(t)?.announcerContext.sendMessageToAnnouncerAPI({message:a,assertive:i,uuid:(0,n.A)()})}},0x889e21de:(e,t,a)=>{"use strict";a.d(t,{j:()=>o});var n=a(0xc26f5c40),r=a(0xaeced49c),i=a(0x11c82607b),l=a(0x198fc3d17);let o=(0,i.Ay)("adds a random header image to the provided canvas",async(e,t,{docEditor:a,source:i})=>{let o=await e((0,l.w)());o.length&&(({docEditor:e,source:t,headerImages:a})=>{if(a.length){let i=Math.floor(Math.random()*a.length),l=a[i],o={type:n.SlackObjectType.HEADER_IMAGE,id:l.id},s=r.Sn.get(t)??"";e.setHeaderImage(o,s)}})({docEditor:a,source:i,headerImages:o})});o.meta={name:"addRandomHeaderImage",key:"createThunkAddRandomHeaderImage",description:"adds a random header image to the provided canvas"}},0x41d73207:(e,t,a)=>{"use strict";a.d(t,{Zq:()=>blockStyleToFormat,zF:()=>i,zf:()=>formatToBlockStyle});var n,r=a(0xc26f5c40),i=((n={}).PARAGRAPH="paragraph",n.H1="h1",n.H2="h2",n.H3="h3",n.CHECK_LIST="check-list",n.CHECK_LIST_TOGGLE="check-list-toggle",n.ORDERED_LIST="ordered-list",n.BULLET_LIST="bullet-list",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="code-block",n);let l=[[r.DocBlockStyle.PLAIN,"paragraph"],[r.DocBlockStyle.H1,"h1"],[r.DocBlockStyle.H2,"h2"],[r.DocBlockStyle.H3,"h3"],[r.DocBlockStyle.LIST_CHECKLIST,"check-list"],[r.DocBlockStyle.LIST_NUMBERED,"ordered-list"],[r.DocBlockStyle.LIST_BULLET,"bullet-list"],[r.DocBlockStyle.BLOCKQUOTE,"blockquote"],[r.DocBlockStyle.CODE,"code-block"]],o=new Map(l),s=new Map(l.map(e=>[e[1],e[0]]));function blockStyleToFormat(e){return o.get(e)}function formatToBlockStyle(e){return s.get(e)}},0x12d250bf6:(e,t,a)=>{"use strict";a.d(t,{$N:()=>i,DO:()=>o,KB:()=>s,T5:()=>l,aP:()=>n,pQ:()=>c,wd:()=>r});let n=/\s+?/,r=300,i=100,l=5,o=3,s=10,c=10},0x21d0576ea:(e,t,a)=>{"use strict";a.d(t,{t:()=>getCanvasCommentFileLinkBlock});var n=a(0x12edaa96a),r=a(0xc4e87e00),i=a(0xbd3de346);function getCanvasCommentFileLinkBlock(e,t){if(!e||!(0,i.ZG)(e)||!e.permalink)return null;let a=t?.blocks?.[0]?.block_id;return[{type:r.Lv.RICH_TEXT,block_id:"string"==typeof a?a:(0,n.A)(),elements:[{type:r.Lv.SECTION,elements:[{type:r.Lv.LINK,text:e.name,url:e.permalink??""}]}]}]}},0x19626cb5:(e,t,a)=>{"use strict";a.d(t,{R:()=>getChannelNameForSuggestions});let getChannelNameForSuggestions=e=>!(e.tabbedChannelName&&!e.isTabbedChannelEmpty)||e.isTabbedChannelMpim||e.isTabbedChannelIm||e.isTabbedChannelExcludedFromAi?e.recentChannelForCurrentMember:e.tabbedChannelName},0x13cf5ff2e:(e,t,a)=>{"use strict";a.d(t,{V:()=>c});var n=a(0x139aa1a7),r=a(0x16ed1b0dc),i=a(0x1cf0d97e1),l=a(0x19895585a),o=a(0x9271cc31),s=a(0xe822f938);let c=(0,i.Ay)(e=>{let t=(0,s.pA)(e)??l.N2,a=(0,o.e6)(e),i=t===l.N2?(0,o.F8)(e,{tab:a,container:l.mq.Primary}):(0,o.Yi)(e,{container:l.mq.Primary,windowId:t}),c=(0,r.A)(i?.params?.parentTab)?i?.params?.parentTab:void 0;return c&&(i?.viewType===n.D.ChannelCanvas||i?.viewType===n.D.Canvas)?c:void 0});c.meta={name:"getParentCanvasTabbedChannelId",key:"createSelectorGetParentCanvasTabbedChannelId",description:e=>{let t=(0,s.pA)(e)??l.N2,a=(0,o.e6)(e),i=t===l.N2?(0,o.F8)(e,{tab:a,container:l.mq.Primary}):(0,o.Yi)(e,{container:l.mq.Primary,windowId:t}),c=(0,r.A)(i?.params?.parentTab)?i?.params?.parentTab:void 0;return c&&(i?.viewType===n.D.ChannelCanvas||i?.viewType===n.D.Canvas)?c:void 0}}},0x1e3bedba2:(e,t,a)=>{"use strict";a.d(t,{P:()=>getQuipButtonIcon});var n=a(0x26148edd),r=a(0x7cdf00a5);let getQuipButtonIcon=e=>{switch(e){case r.r.FILE:return{name:"attachment"};case r.r.IMAGE:return{name:"image"};case r.r.CHECK_LIST:case r.r.CHECK_LIST_TOGGLE:return{name:"checkbox"};case r.r.BULLET_LIST:return{name:"bulleted-list"};case r.r.ORDERED_LIST:return{name:"numbered-list"};case r.r.VIDEO_CLIP:return{name:"video"};case r.r.AUDIO_CLIP:return{name:"microphone"};case r.r.DIVIDER:return{name:"divider"};case r.r.TABLE:return{name:"spreadsheet"};case r.r.LAYOUT_2_COLUMNS:return{name:"column-two"};case r.r.LAYOUT_3_COLUMNS:return{name:"column-three"};case r.r.PINS:return{name:"pin"};case r.r.SMART_SUMMARY:case r.r.RECENT_FILES:case r.r.ACTIVE_DISCUSSIONS:case r.r.CHANNEL_HUDDLES:return{name:"magic-wand"};case r.r.BLOCKQUOTE:case r.r.BLOCKQUOTE_LAYOUT:return{name:"quote"};case r.r.CODE_BLOCK:return{name:"code-block"};case n.L.CODE:return{name:"code"};case r.r.PARAGRAPH:return{name:"paragraph"};case r.r.H1:return{name:"heading-1"};case r.r.H2:return{name:"heading-2"};case r.r.H3:return{name:"heading-3"};case r.r.CANVAS:return{name:"canvas"};case r.r.WORKFLOW:return{name:"play"};case r.r.LIST:return{name:"lists"};case r.r.SALESFORCE_RECORD:return{name:"sf-cloud"};case r.r.USER_PROFILE_UNFURL:return{name:"user"};case r.r.PLACEHOLDER_CARD_SUBMENU:return{name:"add-placeholder"};case r.r.PLACEHOLDER_CARD_VIDEO:return{name:"video"};case r.r.PLACEHOLDER_CARD_PROFILE:return{name:"user"};case r.r.PLACEHOLDER_CARD_AUDIO:return{name:"microphone"};case r.r.PLACEHOLDER_CARD_WORKFLOW:return{name:"play"};case r.r.PLACEHOLDER_CARD_IMAGE:return{name:"image"};case r.r.PLACEHOLDER_CARD_CANVAS:return{name:"canvas"};case r.r.PLACEHOLDER_CARD_FILE:return{name:"attachment"};case r.r.PLACEHOLDER_CARD_LINK:return{name:"link"};case r.r.PLACEHOLDER_CARD_LIST:return{name:"lists"};case r.r.PLACEHOLDER_CARD_SALESFORCE_RECORD:return{name:"sf-cloud"};case r.r.DATE_MENTION:return{name:"calendar"};case r.r.AI_ASSISTANT:return{name:"ai-sparkle"};case r.r.AI_ASSISTANT_CANVAS_SUMMARY:return{name:"ai-summary"};case r.r.AI_ASSISTANT_CANVAS_ACTION_ITEMS:return{name:"ai-check"};case r.r.CALLOUT:return{name:"callout"};case r.r.SALESFORCE_DATA_MENTION:return{name:"sf-cloud"};default:return{name:"help"}}}},0x14cae1443:(e,t,a)=>{"use strict";a.d(t,{O:()=>getQuipButtonLabel});var n=a(0x20482ad21),r=a(0x26148edd),i=a(0x7cdf00a5);let l=new n.Ay("slack_docs"),getQuipButtonLabel=(e,{experimentCanvasSmartCardsGroupOn:t}={})=>{switch(e){case i.r.FILE:return l.t("File");case i.r.IMAGE:return l.t("Image");case i.r.CHECK_LIST:case i.r.CHECK_LIST_TOGGLE:return l.t("Check list");case i.r.BULLET_LIST:return l.t("Bulleted list");case i.r.ORDERED_LIST:return l.t("Ordered list");case i.r.VIDEO_CLIP:return l.t("Record video clip");case i.r.AUDIO_CLIP:return l.t("Record audio clip");case i.r.DIVIDER:return l.t("Divider");case i.r.PINS:return l.t("Pins");case i.r.SMART_SUMMARY:return t?l.t("AI Channel Summary"):"";case i.r.RECENT_FILES:return t?l.t("Recent Files"):"";case i.r.ACTIVE_DISCUSSIONS:return t?l.t("Active Discussions"):"";case i.r.CHANNEL_HUDDLES:return t?l.t("Huddles"):"";case i.r.BLOCKQUOTE_LAYOUT:case i.r.BLOCKQUOTE:return l.t("Blockquote");case i.r.CODE_BLOCK:return l.t("Code block");case i.r.PARAGRAPH:return l.t("Paragraph");case i.r.H1:return l.t("Big heading");case i.r.H2:return l.t("Medium heading");case i.r.H3:return l.t("Small heading");case i.r.CANVAS:return l.t("Canvas");case i.r.WORKFLOW:return l.t("Workflow");case r.L.CODE:return l.t("Code");case i.r.TABLE:return l.t("Table");case i.r.LAYOUT_2_COLUMNS:return l.t("2 columns",{fallbackHash:"8d8f0f25822179c33b917613ec2d022ef593c340",fallbackHashNs:"quip_shortcut_handlers"});case i.r.LAYOUT_3_COLUMNS:return l.t("3 columns",{fallbackHash:"b505f5f09f70ff9d216f1c3cbb5c1a8a4e82179b",fallbackHashNs:"quip_shortcut_handlers"});case i.r.LIST:return l.t("List");case i.r.USER_PROFILE_UNFURL:return l.t("Profile",{fallbackHash:"ff4fc0276e960c348647b647235f68200887c9d2",fallbackHashNs:"menu"});case i.r.SALESFORCE_RECORD:return l.t("Salesforce record");case i.r.PLACEHOLDER_CARD_VIDEO:return l.t("Video",{fallbackHash:"bc17c1f0179a888f2a7e8389f67d4f2cf5cf4531",fallbackHashNs:"slack_kit_video"});case i.r.PLACEHOLDER_CARD_PROFILE:return l.t("Profile",{fallbackHash:"ff4fc0276e960c348647b647235f68200887c9d2",fallbackHashNs:"menu"});case i.r.PLACEHOLDER_CARD_AUDIO:return l.t("Audio",{fallbackHash:"acdac205f5e24cb75113c4b281a2c13f08b75159",fallbackHashNs:"files"});case i.r.PLACEHOLDER_CARD_WORKFLOW:return l.t("Workflow",{fallbackHash:"d7a484140f5f9f7f5427e1f2c44dbfc1d3ad9eea",fallbackHashNs:"slack_docs"});case i.r.PLACEHOLDER_CARD_IMAGE:return l.t("Image");case i.r.PLACEHOLDER_CARD_CANVAS:return l.t("Canvas");case i.r.PLACEHOLDER_CARD_FILE:return l.t("File");case i.r.PLACEHOLDER_CARD_LINK:return l.t("Link");case i.r.PLACEHOLDER_CARD_LIST:return l.t("List");case i.r.PLACEHOLDER_CARD_SALESFORCE_RECORD:return l.t("Salesforce record");case i.r.DATE_MENTION:return l.t("Date",{fallbackHash:"eb9a4bc1c0c153e4e4b042a79113b815b7e3021d",fallbackHashNs:"calendar"});case i.r.CALLOUT:return l.t("Callout",{fallbackHash:"f3e792e7d41d161d609362af9fd451593481fd5d"});case i.r.AI_ASSISTANT:return l.t("Write with AI",{fallbackHash:"5a98372d1f7b397565f7cb33560b8abe99f7acdc"});case i.r.AI_ASSISTANT_CANVAS_SUMMARY:return l.t("Add a summary",{fallbackHashNs:"assistant",fallbackHash:"9763dad72dd460e5575210b5538e3f1b017bce2c"});case i.r.AI_ASSISTANT_CANVAS_ACTION_ITEMS:return l.t("Add action items",{fallbackHash:"955d21424ac706b11f1425f1189ba754d1cc93de"});case i.r.SALESFORCE_DATA_MENTION:return l.t("Salesforce data field");default:return e}}},0x246d26f5:(e,t,a)=>{"use strict";a.d(t,{W:()=>getQuipButtonShortcut});var n=a(0x62a17882),r=a(0x20482ad21),i=a(0x1cc943c8d),l=a(0x7cdf00a5);let o=new r.Ay("slack_docs"),getQuipButtonShortcut=(e,t)=>{let a=(0,n.cX)()?"\u2318":"Ctrl",r=(0,n.cX)()?"\u2325":"Alt",s=(0,n.cX)()?"\u21E7":"Shift",c=(0,n.cX)()?"":"+";switch(e){case l.r.CHECK_LIST:case l.r.CHECK_LIST_TOGGLE:return o.rt("{cmdKey}{keyDivider}{shiftKey}{keyDivider}9",{cmdKey:a,shiftKey:s,keyDivider:c,fallbackHash:"1829fa6c8cd3e2e0423f2f19550829ece990a8dc"});case l.r.BULLET_LIST:return o.rt("{cmdKey}{keyDivider}{shiftKey}{keyDivider}8",{cmdKey:a,shiftKey:s,keyDivider:c,fallbackHash:"0d0883708ee1a95ad8d48ec9daf827b0c7e8edd6"});case l.r.ORDERED_LIST:return o.rt("{cmdKey}{keyDivider}{shiftKey}{keyDivider}7",{cmdKey:a,shiftKey:s,keyDivider:c,fallbackHash:"f225957126d4184894dcd6880f0918f41c1ffb42"});case l.r.BLOCKQUOTE:return`${a}${c}${s}${c}${(0,i.kB)(">",{kb:t})}`;case l.r.CODE_BLOCK:return o.rt("{cmdKey}{keyDivider}{optionKey}{keyDivider}{shiftKey}{keyDivider}C",{cmdKey:a,optionKey:r,shiftKey:s,keyDivider:c,fallbackHash:"861dec0d4293274f72e65d626f58041e706dc711"});case l.r.PARAGRAPH:return o.rt("{cmdKey}{keyDivider}{optionKey}{keyDivider}0",{cmdKey:a,optionKey:r,keyDivider:c,fallbackHash:"861dec0d4293274f72e65d626f58041e706dc711"});case l.r.H1:return o.rt("{cmdKey}{keyDivider}{optionKey}{keyDivider}1",{cmdKey:a,optionKey:r,keyDivider:c,fallbackHash:"dcffbfc18b40edd18afefec86bf8e3396c7d55b2"});case l.r.H2:return o.rt("{cmdKey}{keyDivider}{optionKey}{keyDivider}2",{cmdKey:a,optionKey:r,keyDivider:c,fallbackHash:"447c24469ab5297078834641251394eb289627b5"});case l.r.H3:return o.rt("{cmdKey}{keyDivider}{optionKey}{keyDivider}3",{cmdKey:a,optionKey:r,keyDivider:c,fallbackHash:"9e838ea4d2663b0492894b4f2fd6995a054e9597"});case l.r.FILE:return o.rt("{cmdKey}{keyDivider}U",{cmdKey:a,keyDivider:c,fallbackHash:"4838e4ca56135cfc0fbc71310360c9652a96ad72"});default:return""}}},0x1baf00183:(e,t,a)=>{"use strict";a.d(t,{u:()=>getQuipDateLabel});var n=a(0x1f355b555),r=a(0x13776886e),i=a(0x7acf06fe);let l=new(a(0x20482ad21)).Ay("slack_docs"),getQuipDateLabel=(e,t=!1)=>{let a=(0,n.Ay)(),o=(0,n.Ay)(a).subtract(1,"day"),s=(0,i.A)(a.toDate(),e.toDate()),c=(0,i.A)(o.toDate(),e.toDate()),d=(0,r.A)(e.unix(),"{date_short_pretty}");return s?d=t?l.t("today"):"":c&&(d=t?l.t("yesterday"):""),d}},0xaeced49c:(e,t,a)=>{"use strict";a.d(t,{Gz:()=>c,Sn:()=>m,cP:()=>isSupportedFileExtension,d5:()=>imageStyleForVerticalPosition,fI:()=>useCanvasHeaderImages,in:()=>d,ux:()=>useCanvasHeaderImage,xS:()=>removeHeaderImage});var n,r=a(0xbad225b5),i=a(0x16cf1da63);a(0x1df96de4c);var l=a(0x226892387),o=a(0xd14e9da7),s=a(0x198fc3d17);let c=new Set(["jpg","jpeg","gif","png","tif","tiff","webp"]);var d=((n={})[n.CANVAS_OVERFLOW_MENU=0]="CANVAS_OVERFLOW_MENU",n[n.HEADER_IMAGE_PICKER=1]="HEADER_IMAGE_PICKER",n[n.TITLE_HOVER_BUTTON=2]="TITLE_HOVER_BUTTON",n);let m=new Map([[0,"canvas_overflow_menu"],[1,"header_image_picker"],[2,"title_hover_button"]]);function fileExtension(e){let t=e.lastIndexOf(".");return -1!==t?e.substring(t+1).toLowerCase():null}function isSupportedFileExtension(e){let t=fileExtension(e);return!!(t&&c.has(t))}function removeHeaderImage(e,t){let a=m.get(t)??"";e.setHeaderImage(null,a)}function useCanvasHeaderImages(){let e=(0,i.wA)(),t=(0,l.d4)(e=>(0,o.O8)(e));return(0,r.useEffect)(()=>{e((0,s.w)())},[e]),t}function useCanvasHeaderImage(e){let t=(0,i.wA)(),a=(0,l.d4)(t=>{if(e)return(0,o.Fh)(t,e)});return(0,r.useEffect)(()=>{!a&&e&&t((0,s.F)(e))},[t,a,e]),a}function imageStyleForVerticalPosition(e=50){return{objectPosition:`center ${e}%`}}},0x26148edd:(e,t,a)=>{"use strict";a.d(t,{B:()=>inlineStyleToFormat,L:()=>i});var n,r=a(0xc26f5c40),i=((n={}).BOLD="bold",n.STRIKE="strike",n.ITALIC="italic",n.CODE="code",n.LINK="link",n.UNDERLINE="underline",n);let l=new Map([[r.DocInlineStyle.BOLD,"bold"],[r.DocInlineStyle.STRIKETHROUGH,"strike"],[r.DocInlineStyle.ITALIC,"italic"],[r.DocInlineStyle.CODE,"code"],[r.DocInlineStyle.LINK,"link"],[r.DocInlineStyle.UNDERLINE,"underline"]]);function inlineStyleToFormat(e){return l.get(e)}},0x23eb69101:(e,t,a)=>{"use strict";a.d(t,{C:()=>isCanvasMaybeUntitled});let n=new(a(0x20482ad21)).Ay("files");function isCanvasMaybeUntitled(e){return!e||"Untitled"===e||e===n.t("Untitled")}},0xb73154e3:(e,t,a)=>{"use strict";function isUrlSafeFromXSS(e){let t=[/javascript:/i,/vbscript:/i,/<script/i,/<\/script/i,/onerror=/i,/onload=/i,/onclick=/i,/onmouseover=/i,/onfocus=/i,/onblur=/i,/alert\s*?\(/i,/confirm\s*?\(/i,/prompt\s*?\(/i,/eval\s*?\(/i,/expression\s*?\(/i,/setInterval\s*?\(/i,/setTimeout\s*?\(/i,/%3Cscript/i,/%3C\/script/i,/%3Conerror/i,/%3Conload/i,/%3Conclick/i,/%3Conmouseover/i,/%3Confocus/i,/%3Conblur/i,/%3Calert/i,/%3Cconfirm/i,/%3Cprompt/i,/%3Ceval/i,/%3Cexpression/i,/%3CsetInterval/i,/%3CsetTimeout/i,/<alert/i,/<confirm/i,/<prompt/i,/<eval/i,/<expression/i,/<setInterval/i,/<setTimeout/i];try{let a=e.trim();if(""===a||void 0===a)return!0;if(a.startsWith("data:")){let e=a.split(",")[1];if(e){try{let a=atob(e);for(let e of t)if(e.test(a))return!1}catch{return!1}return!0}}let n=new URL(a),r=decodeURIComponent(n.href);for(let e of t)if(e.test(r))return!1;if("http:"!==n.protocol&&"https:"!==n.protocol||n.username||n.password||/['";]/.test(n.href))return!1;return!0}catch{for(let a of t)if(!a.test(e))return!0;return!1}}a.d(t,{P:()=>isUrlSafeFromXSS})},0x7cdf00a5:(e,t,a)=>{"use strict";a.d(t,{r:()=>l});var n,r=a(0x41d73207),i=((n=i||{}).UNKNOWN="unknown",n.TITLE="title",n.FILE="file",n.IMAGE="image",n.VIDEO_CLIP="video-clip",n.AUDIO_CLIP="audio-clip",n.DIVIDER="divider",n.TABLE="table",n.SHORTCUT="shortcut",n.MENU_SEPARATOR="menu-separator",n.PINS="pins",n.BOOKMARKS="bookmarks",n.USER_UNFURL="user-unfurl",n.CANVAS_UNFURL="canvas-unfurl",n.MESSAGE_UNFURL="message-unfurl",n.PUBLIC_LINK_UNFURL="public-link-unfurl",n.SHORTCUT_UNFURL="shortcut-unfurl",n.USER_PROFILE_UNFURL="user-profile-unfurl",n.UNFURL="unfurl",n.CANVAS="canvas",n.GENERIC="generic",n.WORKFLOW="workflow",n.FILE_UPLOAD_BLOCKED_MESSAGE_BANNER="file-upload-blocked-message-banner",n.SMART_SUMMARY="smart-summary",n.RECENT_FILES="recent-files",n.ACTIVE_DISCUSSIONS="active-discussions",n.CHANNEL_HUDDLES="channel-huddles",n.LIST="list",n.LAYOUT_2_COLUMNS="layout-2-columns",n.LAYOUT_3_COLUMNS="layout-3-columns",n.PLACEHOLDER_CARD_SUBMENU="placeholder-card-submenu",n.PLACEHOLDER_CARD_VIDEO="placeholder-card-video",n.PLACEHOLDER_CARD_PROFILE="placeholder-card-profile",n.PLACEHOLDER_CARD_AUDIO="placeholder-card-audio",n.PLACEHOLDER_CARD_WORKFLOW="placeholder-card-workflow",n.PLACEHOLDER_CARD_IMAGE="placeholder-card-image",n.PLACEHOLDER_CARD_CANVAS="placeholder-card-canvas",n.PLACEHOLDER_CARD_FILE="placeholder-card-file",n.PLACEHOLDER_CARD_LINK="placeholder-card-link",n.PLACEHOLDER_CARD_LIST="placeholder-card-list",n.PLACEHOLDER_CARD_SALESFORCE_RECORD="placeholder-card-salesforce-record",n.SALESFORCE_RECORD="salesforce-record",n.DATE_MENTION="date-mention",n.CALLOUT="callout",n.BLOCKQUOTE_LAYOUT="blockquote-layout",n.AI_ASSISTANT="ai-assistant",n.AI_ASSISTANT_CANVAS_SUMMARY="ai-assistant-canvas-summary",n.AI_ASSISTANT_CANVAS_ACTION_ITEMS="ai-assistant-canvas-action-items",n.SALESFORCE_DATA_MENTION="salesforce-data-mention",n);let l={...r.zF,...i}},0xa6378909:(e,t,a)=>{"use strict";a.d(t,{b:()=>f});var n=a(0x9c7d2aa9),r=a(0xbd3de346),i=a(0x20679dcfc),l=a(0x21d6ed371),o=a(0x1d37f5c8a),s=a(0x11c82607b),c=a(0x1c2eef3c8),d=a(0x1973dd8ce),m=a(0x14149c126),u=a(0x14ea3ce99),p=a(0xd93ecf94),h=a(0x8976310b),_=a(0x1beeaa71e);let f=(0,s.Ay)("a check to see if there is anything preventing quip from discarding the comment",(e,t,{commentThreadId:a,fileId:s})=>{if("on"===(0,m._Z)(t(),"canvas_disable_comment_cleanup"))return!1;let f=(0,u.Lp)(t(),s,!1);if(!(0,r.mW)(f))return!1;let b=(0,i.p)(s),g=a&&(0,h.r)(t(),a)?.threadTs;if(!b||!g)return!1;let y=(0,p.Ld)(t(),b,g);if(!y||(0,l.UV)(y))return!1;let A=(0,_.bk)(t(),(0,o.J)(y));if(A?.length)return!1;let x=(0,n.A)(t(),b,g)||(0,d.Q)({channelId:b,threadTs:g});return!(0,c.YI)(t(),x)&&0===(0,p.oJ)(t(),b,{thread_ts:g}).length});f.meta={name:"shouldDiscardComment",key:"createThunkShouldDiscardComment",description:"a check to see if there is anything preventing quip from discarding the comment"}},0x1f1a19fd1:(e,t,a)=>{"use strict";a.d(t,{X:()=>r});var n,r=((n={}).NEW_HIRE="new_hire",n.ANNIVERSARY="anniversary",n.SALES_WIN="sales_win",n)},0x89e7bcbe:(e,t,a)=>{"use strict";a.d(t,{JW:()=>celebrationIsNewHire,rb:()=>celebrationIsSalesWin,xd:()=>celebrationIsAnniversary});var n=a(0x1f1a19fd1);function celebrationIsNewHire(e){return!!(e&&e.type===n.X.NEW_HIRE)}function celebrationIsAnniversary(e){return!!(e&&e.type===n.X.ANNIVERSARY)}function celebrationIsSalesWin(e){return!!(e&&e.type===n.X.SALES_WIN)}},0xfe570029:(e,t,a)=>{"use strict";a.d(t,{t:()=>getCelebrationEmoji});var n=a(0x20482ad21),r=a(0x89e7bcbe);new n.Ay("rimeto_user_profile");let getCelebrationEmoji=e=>(0,r.JW)(e)?":wave:":(0,r.xd)(e)?":tada:":(0,r.rb)(e)?":moneybag:":void 0},0x248c3697e:(e,t,a)=>{"use strict";a.d(t,{c:()=>getCelebrationText});var n=a(0x18f2150ea),r=a(0x20482ad21),i=a(0x89e7bcbe);let l=new r.Ay("rimeto_user_profile"),getCelebrationText=(e,t)=>{if((0,i.JW)(e)){if(t?.verbosity==="long"){let e=[l.t("Welcome to the team!"),l.t("Look who\u2019s  here! Yay."),l.t("So happy you\u2019re  here!")];return(0,n.A)(t.randomTitleNumber)?e[Math.floor(3*t.randomTitleNumber)]:e[0]}return l.t("New hire")}if((0,i.xd)(e)){if(t?.verbosity==="short")return l.t("{count, plural, =1 {# year} other {# years}}",{count:e.years});if(t?.verbosity==="long"){let a=[l.t("Wow! Congrats on {count, plural, =1 {# year} other {# years}}.",{count:e.years}),l.t("Happy {count, plural, =1 {# year} other {# years}}!",{count:e?.years}),l.t("{count, plural, =1 {# year} other {# years}} and counting!",{count:e?.years})];return(0,n.A)(t.randomTitleNumber)?a[Math.floor(3*t.randomTitleNumber)]:a[0]}return l.t("{years, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} anniversary",{years:e.years})}if((0,i.rb)(e)){if(t?.verbosity==="long"){let e=[l.t("Gong! Another win."),l.t("Closed a deal!"),l.t("Always be closing")];return(0,n.A)(t.randomTitleNumber)?e[Math.floor(3*t.randomTitleNumber)]:e[0]}return l.t("Deal won")}}},0xd30e1c52:(e,t,a)=>{"use strict";a.d(t,{Z:()=>getCelebration});var n=a(0x1f355b555),r=a(940089e4),i=a(0x1f1a19fd1);let l=14,o=3,getCelebration=({startDate:e,isDisplayAnniversaryEnabled:t,endDate:a,anniversaryThreshold:s=o,newHireThreshold:c=l})=>{if(!t||!e)return null;let d=(0,n.Ay)((0,r.H)(e)),m=a?(0,n.Ay)((0,r.A)(a)):(0,n.Ay)(),u=Math.round(m.diff(d,"years",!0)),p=m.diff(d,"days");return u<=0&&p<=c?{type:i.X.NEW_HIRE}:u>0&&(a?Math.abs(m.year(d.year()).diff(d,"days")):Math.abs((0,n.Ay)().year(d.year()).diff(d,"days")))<=s?{type:i.X.ANNIVERSARY,years:u}:null}},0xa701912c:(e,t,a)=>{"use strict";a.d(t,{A:()=>getStartDateElementFromGraphQL});var n=a(0x141db8b68);let getStartDateElementFromGraphQL=e=>{let t=e?.user?.profileSections?.find(e=>e.type===n.mE.AdditionalInfo),a=t?.profileElements?.find(e=>"Start Date"===e.elementKey);return a?.__typename==="ProfileDateElement"?a:null}},0x7877defb:(e,t,a)=>{"use strict";a.d(t,{$u:()=>n3});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x20482ad21),o=a(0x15f8e452a),s=a(0x15fb82076),c=a(0x2501a2cee),d=a(0x58199183),m=a(0x1853f0e7c),u=a(0x30d0b075),p=a(0x2b7f0bcc),h=a(0xce378727),_=a(0x20e77676b),f=a(0x54bc7020),b=a(0x1ecc7f772),g=a(0x1ed2fb210),y=a(0x20e80190e),A=a(0x226892387),x=a(0x14149c126),E=a(0x1fcbb004d);let C=new l.Ay("channel_details"),AiExclusionsModal=({channel:e})=>{let t=(0,i.wA)(),a=(0,A.d4)(e=>"on"===(0,x._Z)(e,"ai_channel_exclusions")),n=(0,r.useCallback)(()=>t((0,E.O)()),[t]),l=(0,g.$)(e),o=(0,A.d4)(t=>(0,b.SB)(t,e)),[s,c]=(0,r.useState)(!1),[d,m]=(0,r.useState)(!1),k=(0,r.useCallback)(async()=>{c(!0),m(!1);try{await t((0,f.D)({props:(0,u.Zf)({exclude_from_slack_ai:!l}),reason:"set_channel_ai_exclusion_from_channel_settings",channelId:e.id})),c(!1),n()}catch(e){c(!1),m(!0)}},[n,e.id,l,t]);if(!a)return null;let v=l?C.t("Allow AI use of this channel\u2019s content "):C.t("Restrict AI use of this channel\u2019s content"),S=l?C.rt("Content from <strong>{channelName}</strong> can be used by AI features outside of this channel. <Link>Learn more about AI restrictions.</Link>",{channelName:o},({tag:e,text:t})=>"Link"===e&&r.createElement(_.A,{articleId:0x19b02aac6c93},t)):C.rt("Content from <strong>{channelName}</strong> cannot be used by AI features outside of this channel. <Link>Learn more about AI restrictions.</Link>",{channelName:o},({tag:e,text:t})=>"Link"===e&&r.createElement(_.A,{articleId:0x19b02aac6c93},t)),I=l?C.rt("This channel\u2019s content, including canvases shared only in this channel, <b>will be</b> used by:"):C.rt("This channel\u2019s content, including canvases shared only in this channel, <b>will not be</b> used by:"),w=l?C.t("Allow AI Use",{fallbackHash:"46e225ea5755f77af881ea7fe293f6bed965ab55"}):C.t("Restrict AI Use",{fallbackHash:"71e2c9cec8d75596e507ba2456703cbc3a37da7d"});return r.createElement(y.dW,{closeModal:n,dataQa:"ai-exclusions-modal"},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:v})),r.createElement(y.$m,null,d&&r.createElement(y.qf,null,r.createElement("div",{className:"margin_bottom_75"},r.createElement(p.Ay,{level:p.A_.error,align:"left"},C.t("Unable to update AI settings. Please try again later.")))),r.createElement(y.qf,null,r.createElement("p",{className:"margin_bottom_100"},S),r.createElement("p",{className:"margin_bottom_50"},I),r.createElement("ul",null,r.createElement("li",null,C.t("Slackbot")),r.createElement("li",null,C.t("Search AI answers")),r.createElement("li",null,C.t("Canvas AI")))),r.createElement(y.qf,null,r.createElement("p",{className:"margin_bottom_50"},r.createElement("em",null,C.t("Heads up \u2014 app AI access is managed by app developers."))))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{type:"outline","aria-label":C.t("Cancel"),onClick:n},C.t("Cancel")),r.createElement(h.A,{type:l?"primary":"danger","aria-label":w,disableWhenLoading:!0,loading:s,onClick:k},w))))};AiExclusionsModal.displayName="AiExclusionsModal";var k=a(0x11eae4d05);let v=(0,k.e)(AiExclusionsModal);var S=a(0x6480ae5b),I=a(0xb0245531),w=a(0x1655a8085),T=a(0x1e3eb45fd),N=a(0xd0eb5473),M=a(0xe4af74fc);let R=new l.Ay("channel_details"),AiExclusionsField=({channel:e})=>{let t=(0,i.wA)(),a=(0,A.d4)(T.uO),n=(0,g.$)(e),l=(0,A.d4)(t=>(0,N.Jr)((0,M.WB)(t,{permission:w.p.EDIT_CHANNEL_AI_EXCLUSIONS,channelId:e?.id}))),o=(0,A.d4)(t=>(0,I.b)(t,e)),s=(0,r.useCallback)(()=>{t(v({channel:e,openModalProps:{isStackable:!0}}))},[t,e]);if(!a)return null;let d=n?r.createElement(r.Fragment,null,r.createElement("span",{className:"padding_right_50"},r.createElement(c.Ah,{name:"close-filled",color:(0,m.HK)("DT_COLOR_BASE_INV_IMP"),inline:!0})),r.createElement("span",null,R.t("Channel content cannot be used by AI features outside of this channel."))):r.createElement(r.Fragment,null,r.createElement("span",{className:"padding_right_50"},r.createElement(c.Ah,{name:"check-filled",color:(0,m.HK)("DT_COLOR_CONTENT_HGL_2"),inline:!0})),r.createElement("span",null,R.t("Channel content can be used by AI features outside of this channel."))),u=n?R.t("Allow"):R.t("Restrict");return r.createElement(S.A,{ariaLabel:R.t("Edit AI use setting"),dataQa:"settings__ai_exclusions_field",isDisabled:!l||o,disabledText:R.t("You don\u2019t have permission to change the AI use setting."),onClick:s,text:d,title:R.t("AI use"),channel:e,editButtonText:u})};AiExclusionsField.displayName="AiExclusionsField";var P=a(0x23749e176),L=a(0x2190b3693),O=a(0x143fb6398),D=a(0x3711e82d),F=a(0x1c91944c9),U=a(0x217553e42),B=a(0x1ee439e69);let H=new l.Ay("channel_details"),W={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_ARCHIVE},ArchiveChannel=({id:e,disabled:t,channel:a})=>{let n=(0,i.wA)(),l=(0,r.useCallback)(()=>{n((0,P.default)({id:e,onSubmit:()=>{n((0,E.O)({closeAll:!0}))},openModalProps:{isStackable:!0}}))},[n,e]),s=(0,r.useCallback)(({key:e,text:t})=>r.createElement(_.A,{articleId:0xcb4f31b,key:e,forceOpenInBrowser:!0},t),[]),c=(0,r.useCallback)(()=>(0,O.ju)(a)?H.rt("To archive this channel you\u2019ll need to stop sharing it. <t2>Learn more</t2>",{"<t2>":s,fallbackHash:"9c83932189c49e1f48c9236aea8c43f8cf854689"}):H.rt("You don\u2019t have permission to archive this channel. <t2>Learn more</t2>",{"<t2>":s,fallbackHash:"63a5c7f685eb93d4aeb02ca43c03bf8c7cb50a12"}),[a,s]);return r.createElement(L.A,{ariaLabel:t?H.t("Cannot archive channel. Please contact a workspace admin."):H.t("Archive channel for everyone"),text:t?c():null,isDisabled:t,onClick:l,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"archive"}),title:H.t("Archive channel for everyone"),type:"danger",autoClogProps:W,dataQa:"archive-channel"})};ArchiveChannel.displayName="ArchiveChannel";let V=(0,F.N)((e,{id:t})=>({channel:(0,U.OL)(e,t),team:(0,B.H7)(e)}))(ArchiveChannel);var G=a(0xc942f844),q=a(0x20dd1a0d6),j=a(0x7d48dd65),z=a(0x21f3c49e8),K=a(0x1d2cd7755),$=a(0x658a411c),Y=a(0xcf583510),Q=a(0xd4e00a1e),Z=a(0x45bd075),J=a(0xe8015073);let X=new l.Ay("channel_details"),EditChannelPermissionRow=({permission:e,onChangePermissionAllowed:t,canCreateLimitedOrUnlimitedInvitePref:a})=>{let n=(0,r.useCallback)(()=>{switch(e.permission){case J.p.ARCHIVE_CHANNEL:return D.UiComponentVariant.ARCHIVE_CHANNEL_PERMISSION;case J.p.INVITE_TO_CHANNEL:return D.UiComponentVariant.INTERNAL_INVITE_PERMISSION;case J.p.INVITE_EXTERNAL_TO_CHANNEL:return D.UiComponentVariant.EXTERNAL_INVITE_PERMISSION;default:return""}},[e.permission]),i=(0,r.useCallback)(a=>{t(e,a?.target?.checked)},[t,e]);return r.createElement(K.A,{key:e.permission,type:"inline",cursor:"pointer",text:e.name,subtext:e.permission===J.p.INVITE_EXTERNAL_TO_CHANNEL&&a?X.t("Admins, owners, and selected people only"):null,isDisabled:!e.isConfigurable},r.createElement(Z.A,{checked:e.isAllowed,onChange:i,disabled:!e.isConfigurable,"data-qa":`${e.permission}-checkbox`,autoClogProps:{elementName:"checkbox",uiComponentVariant:n(),onChange:{enableClogAction:!0}}}))};EditChannelPermissionRow.displayName="EditChannelPermissionRow";var ee=a(0x3d6efb00),et=a(0x216ede730),ea=a(0x76ad3aef),en=a(0x7fc9e5b3),er=a(0x9b971e7e),ei=a(0x1df96de4c),el=a(0x1cf0d97e1);let eo=(0,el.Ay)(e=>e.permissions);eo.meta={name:"getPermissionsState",key:"createSelectorGetPermissionsState",description:e=>e.permissions};let es=(0,el.Ay)((e,t)=>eo(e)?.channelManagement?.channels?.[t.channelId]?.[t.accountType]||ei.Ml);es.meta={name:"getChannelManagementPermissions",key:"createSelectorGetChannelManagementPermissions",description:(e,t)=>eo(e)?.channelManagement?.channels?.[t.channelId]?.[t.accountType]||ei.Ml};let ec=(0,el.Ay)(e=>eo(e)?.channelManagement?.isLoading||!1);ec.meta={name:"getChannelManagementPermissionsLoading",key:"createSelectorGetChannelManagementPermissionsLoading",description:e=>eo(e)?.channelManagement?.isLoading||!1};let ed=(0,el.Ay)(e=>eo(e)?.channelManagement?.errorType);ed.meta={name:"getChannelManagementPermissionsError",key:"createSelectorGetChannelManagementPermissionsError",description:e=>eo(e)?.channelManagement?.errorType};var em=a(0x165774b3f);let eu=new l.Ay("channel_details"),ep={onClick:{enableClogAction:!0},uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CHANNEL_MEMBER_PERMISSIONS_SAVE},eh={onClick:{enableClogAction:!0},uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CHANNEL_MCG_PERMISSIONS_SAVE},EditChannelPermissionsModal=({channelId:e,accountType:t,canCreateLimitedOrUnlimitedInvitePref:a})=>{let n=(0,i.wA)(),l=(0,A.d4)(a=>es(a,{channelId:e,accountType:t})),[o,s]=(0,r.useState)(l||[]),[c,m]=(0,r.useState)(!0),[u,_]=(0,r.useState)(!1),[f,b]=(0,r.useState)(),g=(0,A.d4)(B.Po),x=(0,A.d4)(t=>(0,U.OL)(t,e)),C=(0,ea.j)(x),k=(0,A.d4)(er.jV),v=(0,A.d4)(e=>(0,et.A)(e,x)),S=(0,O.ju)(x)&&k,I=(0,$.A)(l,{isConfigurable:!1}),w=(0,r.useCallback)(()=>{switch(t){case en.C.FULL_MEMBER:return ep;case en.C.MULTI_CHANNEL_GUEST:return eh;default:return{}}},[t]),T=(0,r.useMemo)(()=>{switch(t){case en.C.FULL_MEMBER:return eu.t("Manage member permissions");case en.C.MULTI_CHANNEL_GUEST:return eu.t("Manage guest permissions");default:return null}},[t]),N=(0,r.useMemo)(()=>{if(S)switch(t){case en.C.FULL_MEMBER:return eu.rt("Members of {homeOrgName} can:",{homeOrgName:r.createElement(d.A,{id:k,bold:!1})});case en.C.MULTI_CHANNEL_GUEST:return eu.rt("Guests of {homeOrgName} can:",{homeOrgName:r.createElement(d.A,{id:k,bold:!1})});default:return null}switch(t){case en.C.FULL_MEMBER:return eu.t("Members of this channel can:");case en.C.MULTI_CHANNEL_GUEST:return eu.t("Guests of this channel can:");default:return null}},[t,k,S]),M=(0,r.useCallback)((e,t)=>{s(o.map(a=>a.permission===e.permission?{...a,isAllowed:t}:a))},[o]),R=(0,r.useCallback)(()=>(0,Y.A)(o,l,(e,t)=>e.permission===t.permission&&e.isAllowed===t.isAllowed),[l,o]),P=(0,r.useCallback)(()=>n((0,E.O)()),[n]),L=(0,r.useCallback)(e=>{switch("string"==typeof e?e:e?.data?.error??"UNKNOWN ERROR"){case ee.l.NotAuthed:case ee.l.SomePermissionsWereNotUpdated:case ee.l.FeatureNotEnabled:case ee.l.RestrictedAction:case ee.l.InvalidArguments:b(eu.t("There was a problem saving these changes. Give it another try in a few minutes."));break;default:b(eu.t("Changes couldn\u2019t be saved. Looks like there was a problem with your network connection."))}},[]),D=(0,r.useCallback)(async()=>{b(void 0),_(!0);let a=R().map(e=>(0,Q.A)(e,["permission","isAllowed"]));try{if((await n((0,em.SG)({channelId:e,accountType:t,permissions:a}))).ok)P();else throw Error()}catch(e){L(e)}finally{await n((0,em.HE)({channelId:e,reason:"edit_channel_permissions_refresh"})),_(!1)}},[t,e,n,R,L,P]);(0,r.useEffect)(()=>{let e=R();(0,z.A)(e)?m(!0):m(!1)},[R]);let F=(0,r.useCallback)(()=>{let e=g?.id,t=e!==C,a=v.includes(e);return t&&S&&a?eu.rt("Some permissions are locked by {hostOrgName}.",{hostOrgName:r.createElement(d.A,{id:C,bold:!0})}):eu.t("Some permissions are locked by your workspace or organization.")},[C,g.id,v,S]);return r.createElement(y.dW,{showCloseButton:!1},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:T})),r.createElement(y.$m,null,r.createElement(y.qf,null,f&&r.createElement(p.Ay,{level:"error",className:"margin_bottom_50"},f)),r.createElement(y.qf,null,I&&r.createElement(p.Ay,{level:"default",isIconVisible:!1,className:"margin_bottom_125"},F())),r.createElement(y.qf,null,S&&r.createElement("div",{className:"margin_bottom_125"},eu.rt("Since this is a Slack Connect channel, keep in mind that these permissions only apply to members of {homeOrgName}.",{homeOrgName:r.createElement(d.A,{id:k,bold:!1})}))),r.createElement(y.qf,null,r.createElement("div",{className:"margin_bottom_50"},r.createElement("strong",null,N)),o.map(e=>r.createElement(EditChannelPermissionRow,{key:e.permission,permission:e,onChangePermissionAllowed:M,canCreateLimitedOrUnlimitedInvitePref:a})))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:P,type:"outline","aria-label":eu.t("Cancel")},eu.t("Cancel")),r.createElement(h.A,{type:"primary",onClick:D,loading:u,disabled:c,autoClogProps:w(),"aria-label":eu.t("Save")},eu.t("Save")))))};EditChannelPermissionsModal.displayName="EditChannelPermissionsModal";let e_=(0,k.e)(EditChannelPermissionsModal);var ef=a(0xb40813d7),eb=a(0xd7790b93),eg=a(0x101248d56);let ey=new l.Ay("channel_details"),eA={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CHANNEL_MEMBER_PERMISSIONS},ex={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CHANNEL_MCG_PERMISSIONS},ViewAllowedChannelPermission=({allowedPerm:e,canCreateLimitedOrUnlimitedInvitePref:t})=>{let a=(0,r.useMemo)(()=>"INVITE_EXTERNAL_TO_CHANNEL"===e.permission&&t?ey.t("Admins, owners, and selected people only"):null,[e,t]);return r.createElement("li",{className:"p-view_channel_permissions--list-item"},r.createElement(K.A,{key:e.permission,type:"inline",text:e.name,subtext:a},r.createElement("span",{className:"padding_right_50"},r.createElement(c.Ah,{name:"check-filled",color:(0,m.HK)("DT_COLOR_CONTENT_HGL_2"),inline:!0}))))};ViewAllowedChannelPermission.displayName="ViewAllowedChannelPermission";let ViewChannelPermissions=({canEditChannelPermissions:e,channelId:t,accountType:a})=>{let n=(0,i.wA)(),l=(0,A.Z2)(eb.o),o=(0,A.Z2)(eg.C),s=l?.value===ef.GX.TOPLEVEL_ADMINS_AND_OWNERS_AND_SELECTED||o?.value===ef.GX.TOPLEVEL_ADMINS_AND_OWNERS_AND_SELECTED;(0,r.useEffect)(()=>{n((0,em.HE)({channelId:t,reason:"view_channel_permissions"}))},[t,n]);let c=(0,A.d4)(e=>es(e,{channelId:t,accountType:a})),m=(0,A.d4)(e=>(0,U.OL)(e,t)),u=(0,A.d4)(er.jV),p=(0,O.ju)(m)&&u,h=(0,A.d4)(ec),_=(0,A.d4)(ed),f=(0,r.useMemo)(()=>(0,j.A)(c,"isAllowed"),[c]),b=(0,r.useMemo)(()=>e&&!(0,z.A)(c),[c,e]),g=(0,r.useMemo)(()=>{switch(a){case en.C.FULL_MEMBER:return ey.t("Members don\u2019t have any extra permissions yet.");case en.C.MULTI_CHANNEL_GUEST:return ey.t("Guests don\u2019t have any extra permissions yet.");default:return""}},[a]),y=(0,r.useMemo)(()=>{switch(a){case en.C.FULL_MEMBER:return ey.t("Member permissions");case en.C.MULTI_CHANNEL_GUEST:return ey.t("Guest permissions");default:return null}},[a]),x=(0,r.useMemo)(()=>{let e;if(!p)return null;switch(a){case en.C.FULL_MEMBER:e=ey.rt("Since this is a Slack Connect Channel, these only apply to members of {orgName}.",{orgName:r.createElement(d.A,{id:u,bold:!1})});break;case en.C.MULTI_CHANNEL_GUEST:e=ey.rt("Since this is a Slack Connect Channel, these only apply to guests of {orgName}.",{orgName:r.createElement(d.A,{id:u,bold:!1})})}return r.createElement("span",{className:"p-view_channel_permissions--slack_connect_text"},e)},[a,u,p]),E=(0,r.useCallback)(()=>{switch(a){case en.C.FULL_MEMBER:return eA;case en.C.MULTI_CHANNEL_GUEST:return ex;default:return{}}},[a]),C=(0,r.useCallback)(()=>{n(e_({channelId:t,accountType:a,canCreateLimitedOrUnlimitedInvitePref:s,openModalProps:{isStackable:!0}}))},[n,t,a,s]),k=(0,r.useMemo)(()=>h||_?r.createElement("span",{className:"p-view_channel_permissions--error","data-qa":"channel-permissions-section-error"}):(0,z.A)(f)?r.createElement("span",{className:"p-view_channel_permissions--list-item p-view_channel_permissions--list-item-no-perms","data-qa":"channel-permissions-section-empty"},g):r.createElement("ul",{className:"p-view_channel_permissions--list","data-qa":"channel-permissions-section"},f.map(e=>{let t=`key_${e.permission}`;return r.createElement(ViewAllowedChannelPermission,{allowedPerm:e,canCreateLimitedOrUnlimitedInvitePref:s,key:t})})),[f,s,_,h,g]);return r.createElement(S.A,{isDisabled:!b,title:y,text:x,content:k,onClick:C,autoClogProps:E()})};ViewChannelPermissions.displayName="ViewChannelPermissions";var eE=a(0x228f4405d),eC=a(0xb1ea448c),ek=a(0x77727995),ev=a(0x247cf31a2),eS=a(0x1be9380c8),eI=a(0x8b588d25),ew=a(0x70b3ffcd),eT=a(0xae0b47e2),eN=a(0xa1832ae4),eM=a(0x4ce7eb32);let eR=new l.Ay("channel_details"),ConvertChannelToLimitedModalContents=({id:e,closeModal:t,recordName:a,minimumAccessLevel:n})=>{let l=(0,i.wA)(),[o,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),m=(0,A.d4)(eS.Sl),u=(0,A.d4)(B.Yc),h=(0,eT.v4)(u)||(0,eN.F1)(u),_=(0,A.d4)(t=>(0,U.OL)(t,e)),f=(0,r.useCallback)(()=>{s(!0),l((0,eM.d)(e)).then(()=>{s(!1),t()}).catch(e=>{d(e&&((0,ek.A)(e,"data.error")||e.message)||"Unknown error"),s(!1)})},[t,l,e]),b=(0,r.useMemo)(()=>{if(m)switch(n){case ew.z.Transfer:return eR.t("Access to this channel will change to allow record owners and those with transfer access to view and join the channel:");case ew.z.Edit:return eR.t("Access to this channel will change to allow anyone with record edit permission to view and join the channel:");case ew.z.Read:default:return eR.t("Access to this channel will change to allow anyone with access to the record to view and join the channel:")}return eR.rt("Keep in mind that when you update the access for {channelName} to limited:",{channelName:r.createElement("b",null,r.createElement(ev.A,{channel:_,boldIcon:!0}))})},[m,_,n]),g=(0,r.useMemo)(()=>m?n===ew.z.Transfer||n===ew.z.Edit?r.createElement("li",null,eR.rt("People will need to request access to join the channel, even if they have access to the record.")):null:r.createElement("li",null,eR.rt("Anyone with access to the {recordName} record will still be able to view and join the channel",{recordName:r.createElement("b",null,a||((0,eI.jT)(_)||"").toLowerCase())})),[m,a,_,n]);return r.createElement(r.Fragment,null,r.createElement(y.$m,null,r.createElement(y.qf,null,r.createElement(r.Fragment,null,r.createElement("p",{className:"margin_bottom_100"},b),r.createElement("ul",null,g,r.createElement("li",null,m?eR.t("No changes will be made to the channel\u2019s history or members."):eR.t("No changes will be made to the channel\u2019s history or members")),r.createElement("li",null,eR.rt("All files shared in this channel up until this point will be publicly accessible to everyone in <b>{topLevelTeamName}</b>.",{topLevelTeamName:h})),m&&r.createElement("li",null,eR.t("A default limited group has been set by the admin. After updating channel access, the group can be changed."))),c&&r.createElement(p.Ay,{level:p.A_.error},eR.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists."))))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:t,type:"outline","aria-label":eR.t("Cancel")},eR.t("Cancel")),r.createElement(y.s_,{type:"danger",onClick:f,loading:o,"aria-label":eR.t("Change to Limited")},eR.t("Change to Limited")))))};ConvertChannelToLimitedModalContents.displayName="ConvertChannelToLimitedModalContents";var eP=a(0xf30bc208),eL=a(0x1c2358c11),eO=a(0x188544c76),eD=a(0x11c2f2e45),eF=a(0x14236acae);let eU=new l.Ay("channel_details"),ConvertChannelToLimitedModal=({id:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),n=(0,A.d4)(t=>(0,eD.KP)(t,e)),l=(0,A.d4)(e=>(0,eF.PQ)(e,n,!0)),{salesforceOrgId:o}=(0,eO.D)(n),{loading:s,data:c}=(0,eL.L)({fetcher:eP.M,args:{salesforceOrgId:o,objectType:l?.object_api_name||"",reason:"convert-channel-to-limited-modal"}}),d=c?.minimum_access_level;return r.createElement(y.dW,{closeModal:a},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:eU.t("Change channel access to limited?")})),!s&&r.createElement(ConvertChannelToLimitedModalContents,{id:e,recordName:l?.name,minimumAccessLevel:d,closeModal:a}),s&&r.createElement(eC.A,{className:"margin_bottom_50"}))};ConvertChannelToLimitedModal.displayName="ConvertChannelToLimitedModal";let eB=(0,k.e)(ConvertChannelToLimitedModal);var eH=a(0x85d25ed),eW=a(0x20b4dda68),eV=a(0x12185e091),eG=a(0x154933c60),eq=a(0x11c82607b),ej=a(0x9062bf1);let ez=(0,eq.Ay)("Convert a channel to private",(e,t,a)=>e((0,eG.av)({channelId:a,reason:"convert_to_public"})).then(t=>{t&&t.ok&&e((0,ej.c)({id:a}))}).catch(e=>{throw e}));ez.meta={name:"convertChannelToPublicApi",key:"createThunkConvertChannelToPublicApi",description:"Convert a channel to private"};let eK=new l.Ay("channel_details"),ConvertChannelToPublicModalContents=({id:e,closeModal:t,channel:a,isRecordChannel:n=!1})=>{let l=(0,i.wA)(),[o,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),m=(0,r.useMemo)(()=>n?eK.t("If you make the channel limited access again, it\u2019ll be visible to anyone who\u2019s joined the channel up until that point."):eK.t("If you make the channel private again, it\u2019ll be visible to anyone who\u2019s joined the channel up until that point."),[n]),renderContent=()=>r.createElement(r.Fragment,null,r.createElement("p",{className:"margin_bottom_0"},eK.rt("Keep in mind that when you make {channelName} a public channel:",{channelName:r.createElement(ev.A,{channel:a})})),r.createElement("ul",null,r.createElement("li",null,eK.t("Anyone from your workspace (except guests) can see its message history and join.")),r.createElement("li",null,m)),c&&r.createElement(p.Ay,{className:"margin_top_100 margin_bottom_0",level:p.A_.error},c===eW.GL.IDP_MANAGED_RESTRICTION?eK.t("This channel cannot be changed to public because it\u2019s managed by an IDP group."):eK.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists.")));return renderContent.displayName="renderContent",r.createElement(r.Fragment,null,r.createElement(y.$m,null,r.createElement(y.qf,null,renderContent())),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:t,type:"outline","data-qa":"private-to-public-modal-close-btn","aria-label":eK.t("Cancel")},eK.t("Cancel")),r.createElement(y.s_,{type:"primary",onClick:()=>{s(!0),l(ez(e)).then(()=>{s(!1),t()}).catch(e=>{d(e&&((0,ek.A)(e,"data.error")||e.message)||"Unknown error"),s(!1)})},loading:o,"data-qa":"private-to-public-modal-convert-btn","aria-label":eK.t("Change to Public")},eK.t("Change to Public")))))};ConvertChannelToPublicModalContents.displayName="ConvertChannelToPublicModalContents";let e$=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t);return{channel:a,isRecordChannel:(0,eV.rI)(a)}})(ConvertChannelToPublicModalContents),eY=new l.Ay("channel_details"),ConvertChannelToPublicModal=({id:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),n=eY.t("Change to a public channel?");return r.createElement(y.dW,{closeModal:a},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:n})),r.createElement(e$,{id:e,closeModal:a}))};ConvertChannelToPublicModal.displayName="ConvertChannelToPublicModal";let eQ=(0,k.e)(ConvertChannelToPublicModal);var eZ=a(0x40c0d834),eJ=a(0x1e864b930),eX=a(0x4c96e5d9),e0=a(0x146419600),e1=a(0xf4097f62),e2=a(0x18f7713e4),e4=a(0x1ec69ee01),e5=a(0x6b35329),e3=a(0xbe2be077),e6=a(0x23255e234),e8=a(0x1ec68d6a3),e7=a(0x19c76d181),e9=a(0x2d90c1a8);let te=new l.Ay("channel_details"),tt={elementName:"convert_scmpdm_to_private_modal_contents_cancel_button",action:D.UiAction.CLOSE,uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CONVERT_SCMPDM_TO_PRIVATE_MODAL_CONTENTS_CANCEL,onClick:{enableClogAction:!0}},ta={elementName:"convert_scmpdm_to_private_modal_convert_button",action:D.UiAction.CLICK,uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CONVERT_SCMPDM_TO_PRIVATE_MODAL_CONTENTS_CONVERT,isPrimaryCTA:!0,onClick:{enableClogAction:!0}},tn={eventId:D.EventId.SLACK_CONNECT_MPDM_TO_PRIVATE_MODAL_OPEN,uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CONVERT_SCMPDM_TO_PRIVATE_MODAL_CONTENTS},ConvertMpimToPrivateChannelModalContents=({id:e,closeModal:t,logger:a,isSharedChannel:n,currentUserId:l,memberIds:o,connectedTeamIds:s,currentTeamId:c,workspacePickerOptions:m,workspacePickerMetadata:u,isWorkspacePickerOptionsLoading:h,isOnEnterprise:_,isDefaultToOrgWideChannel:f,isOnlyOneEligibleWorkspace:b})=>{let g=(0,i.wA)(),[A,x]=(0,r.useState)(!1),[E,C]=(0,r.useState)(!1),[k,v]=(0,r.useState)(""),[S,I]=(0,r.useState)(!1),[w,T]=(0,r.useState)(""),[N,M]=(0,r.useState)(!0);(0,r.useEffect)(()=>{_||(M(!1),T(c))},[c,_]),(0,r.useEffect)(()=>{b&&T(m?.[0]?.id)},[b,m]),(0,r.useEffect)(()=>{f&&T(m?.[0]?.id)},[f,u,m]);let R=(0,r.useCallback)(e=>{T(e)},[]),P=(0,r.useCallback)(()=>{let n={mpimId:e,privateChannelName:k,reason:"convert mpim to private channel"};w&&!f&&(n.workspace=w),x(!0),g((0,eG.KO)(n)).then(()=>{x(!1),t()}).catch(e=>{let n=(0,ek.A)(e,"data.error","");if("conversion_already_started"===n){x(!1),t();return}a.error("MPIM-CONVERSION",n,e,{subtype:"mpim-conversion-error"}),C(!0),x(!1)})},[t,g,e,f,a,k,w]),L=(0,r.useMemo)(()=>[{id:"workspace_hint",message:te.t("All members of this conversation must be able to access the workspace you choose.")}],[]),getMemberNames=()=>o.filter(e=>e!==l).map(e=>r.createElement("strong",{key:e},r.createElement(e1.A,{id:e})));getMemberNames.displayName="getMemberNames";let getConnectedTeamNames=()=>{if(!c||!s.length)return[];let e=[c,...s].map(e=>r.createElement(d.A,{key:e,id:e}));return e.length<3?te.rt("All messages will be visible to anyone in the channel from both organizations, {team_list}.",{team_list:(0,eJ.A)(e)}):te.rt("All messages will be visible to anyone in the channel from <b>{team_list}</b>.",{team_list:r.createElement(eX.Ay,{tip:(0,eJ.A)(e,{noConj:!0})},r.createElement("span",{className:"sk_highlight_accent","data-qa":"connected-team-list-tooltip"},te.rt("{number_of_teams} organizations",{number_of_teams:e.length})))})};getConnectedTeamNames.displayName="getConnectedTeamNames";let onInvalidNameEntered=({value:e})=>{I(!1),v(e)},onValidNameEntered=({value:e})=>{I(!0),v(e)},maybeRenderSingleChannelGuestAlert=()=>{if((0,z.A)(o))return null;let e=o.map(e=>g((0,e9.A)(e))).filter(e=>(0,e6.Yd)(e));if((0,z.A)(e))return null;let t=e.map((e,t)=>r.createElement("strong",{key:e?.id??t},r.createElement(e1.A,{id:e?.id})));return r.createElement(p.Ay,{level:p.A_.warning,className:"top_margin"},te.rt("{ura_list} { uras_length, plural, =1 { is a Single-Channel Guest. They are already a member } other { are Single-Channel Guests. They are already members }} of one channel, and will not have access to this new private channel.",{ura_list:(0,eJ.A)(t),uras_length:e.length}))};maybeRenderSingleChannelGuestAlert.displayName="maybeRenderSingleChannelGuestAlert";let O=te.t("E.g., project-gizmo"),D=(0,r.useMemo)(()=>!S||(0,z.A)(w),[S,w]),F=(0,r.useMemo)(()=>({customLabel:u?.[m?.[0]?.id]?.customLabel}),[u,m]),U=(0,r.useMemo)(()=>({label:m?.[0]?.id,value:m?.[0]?.id}),[m]),renderContent=()=>r.createElement(r.Fragment,null,n?r.createElement(r.Fragment,null,r.createElement("p",{className:"margin_bottom_25"},te.rt("After a couple set up steps, everyone currently in this conversation will be automatically added to a private channel using <b>Slack Connect</b>.")),r.createElement("ul",null,r.createElement("li",null,getConnectedTeamNames()),r.createElement("li",null,te.rt("Your organization, {team_name}, will manage the channel.",{team_name:r.createElement(d.A,{key:c,id:c})})),r.createElement("li",null,te.t("This change can\u2019t be undone, even by Slack.")))):r.createElement(r.Fragment,null,r.createElement("p",{className:"margin_bottom_25"},te.rt("You\u2019re about to change this conversation with {member_list} to a private channel.",{member_list:(0,eJ.A)(getMemberNames())})),r.createElement("ul",null,r.createElement("li",null,te.rt("The change <b>can\u2019t be undone</b>")),r.createElement("li",null,te.t("All messages and files in this conversation will be visible to any new members you add to this channel")))),r.createElement("div",{className:"bold margin_bottom_50"},te.rt("Channel name")),r.createElement(e2.A,{id:"mpim-conversion-modal-input",placeholder:O,value:"",onValid:onValidNameEntered,onInvalid:onInvalidNameEntered,focusOnMount:!0,icon:"lock",shouldSanitizeChannelName:!0}),N&&r.createElement("div",{className:"padding_top_125"},r.createElement(e0.A,{key:m?.[0]?.id,labelText:te.t("Workspace"),workspaces:m,selectedWorkspaceId:w,onWorkspaceSelected:R,hints:L,className:"padding_top_0 padding_bottom_0",optionsMetadata:u,isRequired:!0,shouldAllowUnselectInSingleSelectMode:!1,isLoading:h,isDefaultToOrgWideChannel:f,isOnlyOneEligibleWorkspace:b,onlyEligibleOption:U,orgWideSelectedOption:F})),!E&&maybeRenderSingleChannelGuestAlert(),E&&r.createElement(p.Ay,{className:"margin_top_100 margin_bottom_0",level:p.A_.error},te.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists.")));return renderContent.displayName="renderContent",r.createElement(eZ.A,n&&tn,r.createElement(y.$m,null,r.createElement(y.qf,null,renderContent())),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{autoClogProps:n?tt:void 0,onClick:t,type:"outline","aria-label":te.t("Cancel")},te.t("Cancel")),r.createElement(y.s_,{autoClogProps:n?ta:void 0,type:"primary",onClick:P,loading:A,disabled:D,"aria-label":n?te.t("Convert to Slack Connect Channel"):te.t("Change to Private")},n?te.t("Convert to Slack Connect Channel"):te.t("Change to Private")))))};ConvertMpimToPrivateChannelModalContents.displayName="ConvertMpimToPrivateChannelModalContents";let tr=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t),n=(0,B.H7)(e),r=(0,e3.k)(e);return{logger:(0,e8.Ay)({state:e}),teamName:(0,eN.F1)(n),isSharedChannel:(0,O.ju)(a),currentUserId:(0,e7.WR)(e),memberIds:(0,e4.Ug)(a)||[],connectedTeamIds:(0,e5.A)(e,a),currentTeamId:n?.id,isOnEnterprise:r}})(ConvertMpimToPrivateChannelModalContents),ti=new l.Ay("channel_details"),ConvertMpimToPrivateChannelModal=({id:e,isSharedChannel:t,workspacePickerOptions:a,workspacePickerMetadata:n,isWorkspacePickerOptionsLoading:l,isDefaultToOrgWideChannel:o,isOnlyOneEligibleWorkspace:s})=>{let c,d=(0,i.wA)(),m=(0,r.useCallback)(()=>d((0,E.O)()),[d]);return c=t?ti.t("Change conversation to a Slack Connect channel?"):ti.t("Change to private channel?"),r.createElement(y.dW,{closeModal:m,className:"p-convert_mpim_to_private_channel_modal"},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:c})),r.createElement(tr,{id:e,closeModal:m,workspacePickerOptions:a,workspacePickerMetadata:n,isWorkspacePickerOptionsLoading:l,isDefaultToOrgWideChannel:o,isOnlyOneEligibleWorkspace:s}))};ConvertMpimToPrivateChannelModal.displayName="ConvertMpimToPrivateChannelModal";let tl=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t);return{isSharedChannel:(0,O.ju)(a)}})(ConvertMpimToPrivateChannelModal),to=(0,k.e)(tl);var ts=a(0x1cbdfeceb),tc=a(0x13a454b51),td=a(0x303de21b),tm=a(0x110b4f809),tu=a(0x1b9d5cc0c),tp=a(0x82980ab8),th=a(0x1ed767a16),t_=a(0x1d600678),tf=a(0xc1360909),tb=a(0x91e15f37);let tg=new l.Ay("channel_details"),ty={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_COPY_MEMBER_NAMES},tA={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_COPY_MEMBER_EMAILS},CopyMembers=({id:e})=>{let t=(0,i.wA)(),[a,n]=(0,r.useState)(!1),[l,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!0),[m,u]=(0,tm.A)({element:void 0,shouldShow:!1},2e3),p=(0,A.d4)(t=>(0,tf.q8)(t,e)),h=p?.counts.member_count??0,_=h>1e3,f=(0,A.d4)(e=>(0,t_.x)(e,"display_email_addresses")),b=(0,A.d4)(e=>(0,eN.qR)((0,B.H7)(e))),g=(0,A.d4)(tb.iH),y=(0,r.useCallback)(()=>{a||m.shouldShow||n(!0)},[m,a,n]),x=(0,r.useCallback)(()=>{l||m.shouldShow||s(!0)},[m,l,s]);if((0,r.useEffect)(()=>{if(f&&!_){let a=!0;return t((0,td.AD)({channelId:e,count:h})).then(e=>{let{members:t}=e;if(t){let e=t.some(e=>{let t=(0,tu.zY)(e)||"";return!(0,tc.xf)(t)});a&&!e&&d(!1)}}),()=>{a=!1}}return ts.A},[_,f,d,h,t,e]),(0,r.useEffect)(()=>{if(l){let a=!0;return t((0,td.AD)({channelId:e,count:h})).then(e=>{let{members:t}=e;if(t){let e=[];t.forEach(t=>{let a=(0,tu.zY)(t)||"";e.push(a)});try{(0,th.LJ)({"text/plain":e.join(", ")})}catch{(0,th.x3)(e.join(", "))}a&&(u({element:"emails",shouldShow:!0}),s(!1))}}),()=>{a=!1}}return ts.A},[l,s,u,h,t,e]),(0,r.useEffect)(()=>{if(a){let a=!0;return t((0,td.AD)({channelId:e,count:h})).then(e=>{let{members:t}=e;if(t){let e=[],r=[];t.forEach(t=>{let a=(0,tp.wg)(t),n=(0,tu.K6)(t)||"";n&&(e.push(a),r.push(`<span data-stringify-id="${n}" data-stringify-label="${a}" data-stringify-type="mention">${a}</span>`))});try{(0,th.LJ)({"text/plain":e.join(", "),"text/html":r.join(", ")})}catch{(0,th.x3)(e.join(", "))}a&&(u({element:"names",shouldShow:!0}),n(!1))}}),()=>{a=!1}}return ts.A},[a,n,u,h,t,e]),g||!b)return null;let E=tg.t("Copy member names"),C=tg.t("Copying member names and email addresses isn\u2019t possible for channels with more than {max, number} members.",{max:1e3}),k=_?C:E,v=tg.t("Copy member email addresses"),S=tg.t("You don\u2019t have permission to see everyone\u2019s email addresses, so this is disabled."),I=m&&!a&&!l&&r.createElement(r.Fragment,null,r.createElement("span",{className:"p-admin_channel_modal__copy_members__copied"},tg.t("Copied")),r.createElement(o.A,{type:"circle-checkbox-checked",size:"inherit",className:"sk_lilypad_green"})),w=r.createElement("div",{className:"p-admin_channel_modal__copy_members"},E,(m.shouldShow&&"names"===m.element||a)&&r.createElement("div",{className:"p-admin_channel_modal__copy_members__feedback"},a&&r.createElement(eC.A,{size:"medium"}),I)),T=r.createElement("div",{className:"p-admin_channel_modal__copy_members"},v,(m.shouldShow&&"emails"===m.element||l)&&r.createElement("div",{className:"p-admin_channel_modal__copy_members__feedback"},l&&r.createElement(eC.A,{size:"medium"}),I));return _?r.createElement(L.A,{isDisabled:_,ariaLabel:k,title:tg.t("Copy channel members"),text:_&&C}):r.createElement(r.Fragment,null,r.createElement(L.A,{onClick:y,isDisabled:_,ariaLabel:k,title:w,text:_&&C,autoClogProps:ty}),r.createElement(L.A,{onClick:x,isDisabled:_||c,ariaLabel:v,title:T,text:(_||c)&&S,autoClogProps:tA}))};CopyMembers.displayName="CopyMembers";var tx=a(0x170d12617),tE=a(0x10ce13344),tC=a(0x1fef2be00);let tk=new l.Ay("channel_details"),DeleteChannelModal=({id:e,onSubmit:t})=>{let a=(0,i.wA)(),n=(0,r.useCallback)(()=>a((0,E.O)()),[a]);if((0,A.d4)(tC.g))return r.createElement(tx.p,{cleanUpType:tx.G.DELETE,channelId:e});let l=tk.t("Delete this channel?");return r.createElement(y.dW,{closeModal:n,className:"p-delete_channel_modal"},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:l})),r.createElement(tE.A,{id:e,closeModal:n,onSubmit:t}))};DeleteChannelModal.displayName="DeleteChannelModal";let tv=(0,k.e)(DeleteChannelModal);function exportChannelHistory(e){return t=>{t((0,eG.Ue)(e))}}let tS=new l.Ay("channel_details"),ExportChannelHistoryModalContents=({channel:e,closeModal:t})=>{let a=(0,i.wA)();return r.createElement(r.Fragment,null,r.createElement(y.$m,null,r.createElement(y.qf,null,r.createElement("p",null,tS.t("You can export all the messages from this channel as a JSON file. Slackbot will notify you when your file is ready. ")))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:t,type:"outline","aria-label":tS.t("Cancel")},tS.t("Cancel")),r.createElement(y.s_,{type:"primary",onClick:()=>{a(exportChannelHistory(e)),t()},"aria-label":tS.t("Export Messages")},tS.t("Export Messages")))))};ExportChannelHistoryModalContents.displayName="ExportChannelHistoryModalContents";let tI=(0,F.N)((e,{id:t})=>({channel:(0,U.OL)(e,t)}))(ExportChannelHistoryModalContents);var tw=a(0x40b0507e),tT=a(0x133608fc);let tN=new l.Ay("channel_details"),ExportChannelHistoryModal=({id:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),n=tN.t("Export this channel\u2019s messages");return r.createElement(y.dW,{closeModal:a,"data-qa":"export-channel-history-modal"},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:n})),r.createElement(tI,{id:e,closeModal:a}))};ExportChannelHistoryModal.displayName="ExportChannelHistoryModal";let tM=(0,F.N)(e=>({}))(ExportChannelHistoryModal),tR=(0,k.e)(tM,{preDispatchHook:(e,t,{id:a})=>{let n=t();return!(0,tw.G)(n,a)||e((0,tT.U)({isStackable:!0}))}});var tP=a(0xc66ee342),tL=a(0x157a21f39),tO=a(0xfe5aa224),tD=a(0x11a296110),tF=a(0xd2bf4d47),tU=a(0x1d57b7d4c),tB=a(0x139c79d16),tH=a(0x780e190c),tW=a(0xa5d7d903),tV=a(0x21c11a1dc);let tG=new l.Ay("huddles");var tq=((n=tq||{}).SET_TO_FALSE="set_ai_notes_settings_restricted_false",n.SET_TO_TRUE="set_ai_notes_settings_restricted_true",n);let HuddlesAiNotesModalContent=({channel:e})=>{let t=(0,r.useContext)(tO.A),{showSpeedBump:a}=(0,tH.k)(),n=(0,A.d4)(t=>(0,b.SB)(t,e)),l=(0,A.d4)(t=>(0,tW.C)(t,e.id)),o=(0,A.d4)(e=>(0,t_.x)(e,"slack_ai_huddles_automatic_notes_opt_out")),s=(0,i.wA)(),c=(0,r.useCallback)(()=>s((0,E.O)()),[s]),[d,m]=(0,r.useState)(!!e.properties?.huddles?.automatic_ai_notes_enabled),[p,h]=(0,r.useState)(!!e.properties?.huddles?.ai_notes_settings_restricted),[_,g]=(0,r.useState)(!1),x=!!e.properties?.huddles?.automatic_ai_notes_enabled!==d,C=!!e.properties?.huddles?.ai_notes_settings_restricted!==p,k=x||C,v=(0,r.useCallback)(e=>h("set_ai_notes_settings_restricted_true"===e.target.id),[]),S=(0,r.useCallback)(e=>m(e.target.checked),[]),I=(0,r.useCallback)(async()=>{g(!0),await Promise.allSettled([x?s((0,f.D)({props:(0,u.Zf)({huddles:{automatic_ai_notes_enabled:d}}),reason:"set_huddle_notes_autostart_from_channel_settings",channelId:e.id})):Promise.resolve(),C?s((0,f.D)({props:(0,u.Zf)({huddles:{ai_notes_settings_restricted:p}}),reason:"set_huddle_ai_notes_restricted_from_channel_settings",channelId:e.id})):Promise.resolve()]),g(!1),c()},[p,d,e.id,s,x,C,c]),w=(0,r.useCallback)(()=>{!d&&e.properties?.huddles?.automatic_ai_notes_enabled?a(!0):I()},[d,e.properties?.huddles?.automatic_ai_notes_enabled,a,I]),T=(0,r.useCallback)(()=>a(!1),[a]),N=(0,r.useCallback)(()=>r.createElement(y.ty,{heading:tG.t("Turn off automatic AI notes and transcription?"),description:tG.t("People in {channelDisplayName} will continue to have the option of starting AI huddle notes manually.",{channelDisplayName:n}),onContinue:I,continueButtonLabel:tG.t("Turn off Automatic AI Notes"),onCancel:T,cancelButtonLabel:tG.t("Cancel")}),[n,T,I]);return!(0,A.d4)(tV.J0)||o?null:r.createElement(r.Fragment,null,r.createElement(y.rQ,null,r.createElement(y.Rc,{title:tG.t("Edit AI Notes")})),r.createElement(y.$m,null,r.createElement(y.qf,null,r.createElement("p",null,tG.t("When AI huddle notes are set to start automatically, all huddles in this channel will be transcribed and summarized by default."))),r.createElement(y.qf,null,r.createElement(K.A,{type:"inline",cursor:"pointer",text:tG.t("Start AI notes automatically for every huddle in {channelDisplayName}",{channelDisplayName:n}),isDisabled:_,className:"margin_bottom_125"},r.createElement(Z.A,{onChange:S,name:"automatic_ai_notes_enabled",checked:d,disabled:_}))),r.createElement(y.qf,null,r.createElement(tF.A,null,r.createElement(tU.A,null,tG.t("Who can change this setting?")),l?null:r.createElement("p",{className:"caption sk_foreground_max"},tG.t("Only Channel Managers can update this.")),r.createElement(K.A,{htmlFor:"set_ai_notes_settings_restricted_false",type:"inline",cursor:"pointer",text:tG.t("Everyone who can post in the channel"),isDisabled:_},r.createElement(tB.A,{id:"set_ai_notes_settings_restricted_false",name:"ai_notes_settings_restricted",onChange:v,checked:!p,autoFocus:!p&&t,disabled:_||!l})),r.createElement(K.A,{htmlFor:"set_ai_notes_settings_restricted_true",type:"inline",cursor:"pointer",text:tG.t("Only Channel Managers can update this."),isDisabled:_},r.createElement(tB.A,{id:"set_ai_notes_settings_restricted_true",name:"ai_notes_settings_restricted",onChange:v,checked:p,autoFocus:p&&t,disabled:_||!l}))))),r.createElement(y.jl,{renderSpeedBump:N},r.createElement(y.ox,null,r.createElement(y.s_,{type:"outline","aria-label":tG.t("Cancel"),onClick:c},tG.t("Cancel")),r.createElement(tD.lV,{"aria-label":tG.t("Save"),disabled:!k,disableWhenLoading:!0,loading:_,onClick:w},tG.t("Save")))))};HuddlesAiNotesModalContent.displayName="HuddlesAiNotesModalContent";let HuddlesAiNotesModal=({channelId:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),n=(0,A.d4)(t=>(0,U.OL)(t,e)),l=(0,A.d4)(t=>(0,tW.C)(t,e));return n.properties?.huddles?.ai_notes_settings_restricted&&!l?(a(),null):r.createElement(y.dW,{closeModal:a},r.createElement(HuddlesAiNotesModalContent,{channel:n}))};HuddlesAiNotesModal.displayName="HuddlesAiNotesModal";let tj=(0,k.e)(HuddlesAiNotesModal);var tK=a(0xf6ed6f31),t$=a(0xebdd009e),tY=a(0xf038462c),tQ=a(0xe684f705);let tZ=new l.Ay("channel_details"),ChannelSettingsHuddleAiNotesSection=({channelId:e})=>{let t=(0,i.wA)(),a=(0,A.d4)(t$.pt),n=(0,A.d4)(t=>(0,U.OL)(t,e)),l=(0,A.d4)(e=>(0,b.SB)(e,n)),o=(0,r.useCallback)(()=>{t(tj({channelId:e,openModalProps:{isStackable:!0}}))},[t,e]),s=!!n.properties?.huddles?.automatic_ai_notes_enabled,c=!!n.properties?.huddles?.ai_notes_settings_restricted,d=(0,A.d4)(t=>!!n&&(c?(0,tu.le)(t,(0,tQ.cA)(t).id,e)||(0,tY.S4)(t,n):(0,tK.bl)(n))),m=(0,r.useMemo)(()=>{let e=c?tZ.t("Channel managers and admins"):tZ.t("Members");return s?r.createElement(r.Fragment,null,r.createElement("p",null,tZ.t("{whoCanManage} can edit this setting.",{channelDisplayName:l,whoCanManage:e})),r.createElement("ul",null,r.createElement("li",null,tZ.t("Transcription and AI notes will start automatically for all huddles in this channel.")),r.createElement("li",null,tZ.t("Everyone in {channelDisplayName} will have access to the notes and transcript.",{channelDisplayName:l})))):r.createElement("div",null,r.createElement("div",null,tZ.t("Choose if all huddles in this channel will be transcribed and summarized by default. {whoCanManage} can change this setting.",{channelDisplayName:l,whoCanManage:e})))},[c,s,l]);return a?r.createElement(S.A,{onClick:o,title:tZ.t("Always Start AI Notes"),content:m,isDisabled:!d,disabledText:tZ.t("You don\u2019t have permission to change this setting for this channel")}):null};ChannelSettingsHuddleAiNotesSection.displayName="ChannelSettingsHuddleAiNotesSection";var tJ=a(0x102edf836),tX=a(0xd66cda03),t0=a(0x23717bef),t1=a(0x22eca849f),t2=a(0x7b0b485),t4=a(0x475fe7d6),t5=a(0x183e72453),t3=a(0x1b02505ff);let t6=new l.Ay("channel_details"),t8={uiStep:D.UiStep.CHANNEL_DETAILS_TOGGLE_START_HUDDLE,onClick:{enableClogAction:!0}},t7={uiStep:D.UiStep.CHANNEL_DETAILS_COPY_HUDDLE_LINK,onClick:{enableClogAction:!0}},HuddlesLinkCTAs=({channel:e,onClose:t})=>{let a=(0,i.wA)(),n=(0,r.useCallback)(async()=>{a((0,t1.r)({channelId:e?.id})),t?.()},[a,e,t]),l=(0,tX.cw)(t2.hc),s=(0,tX.cw)(t2.vO)===t3.RJ.STARTED&&l===e?.id,c=(0,r.useCallback)(()=>{s?a((0,t5.A)()):a((0,t4.A)({channelId:e?.id,entryPoint:t3.su.CHANNEL_ABOUT_MODAL_HUDDLE_SETTINGS})),t?.()},[a,s,e,t]),d=(0,A.d4)(t=>(!(0,eV.Zp)(e)||!!(0,tK.bl)(e))&&((0,t0.d)(t,e?.id,"can_huddle")?.enabled??!0));return r.createElement("div",{className:"p-channel_details__huddles_link_ctas_button_container"},r.createElement(tJ.Ay,{type:"outline",size:"small",className:"p-channel_details__slack_connect_ctas_button margin_right_75 padding_top_25 padding_bottom_25 padding_left_50 padding_right_50",onClick:c,"data-qa":"huddles_section_start_huddle_button",autoClogProps:t8,disabled:!d},r.createElement(o.A,{type:"headphones",size:"inherit"}),r.createElement("span",{className:"p-channel_details__slack_connect_ctas_button_text margin_left_25"},s?t6.t("Leave Huddle"):t6.t("Start Huddle"))),r.createElement(tJ.Ay,{type:"outline",size:"small",className:"p-channel_details__slack_connect_ctas_button padding_top_25 padding_bottom_25 padding_left_50 padding_right_50",onClick:n,"data-qa":"huddles_section_copy_huddle_link_button",autoClogProps:t7,disabled:!d},r.createElement(o.A,{type:"link",size:"inherit"}),r.createElement("span",{className:"p-channel_details__slack_connect_ctas_button_text margin_left_25"},t6.t("Copy Huddle Link",{fallbackHash:"3bb66b7dd611d1ae4c65a82e2c383bf068f30def"}))))};HuddlesLinkCTAs.displayName="HuddlesLinkCTAs";var t9=a(0x185306c47);let ae=new l.Ay("huddles");function HuddlesPermissionContent(e){let{featureHuddlesEnabled:t,id:a}=e,n=(0,i.wA)(),l=(0,r.useCallback)(()=>n((0,E.O)()),[n]),[o,s]=(0,r.useState)(!0),[c,d]=(0,r.useState)(!1),[m,u]=(0,r.useState)(!1),[h,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=n((0,t9.j)({channelId:a}));e&&e.then(e=>{e&&e.ok&&u(e.pref_value?.enabled??!0)}).catch(e=>{_(e)}).finally(()=>{s(!1)})},[a,n]);let f=(0,r.useCallback)(()=>{d(!0);let e=n((0,t9.C)({channelId:a,enabled:m}));e&&e.finally(()=>{d(!1),l()})},[m,a,n,l]);return t?r.createElement(r.Fragment,null,r.createElement(y.$m,null,h&&r.createElement(y.qf,{className:"p-about_modal__section"},r.createElement(p.Ay,{level:p.A_.error},h)),o&&r.createElement(eC.A,{size:"jumbo"}),!o&&r.createElement(y.qf,null,r.createElement(K.A,{htmlFor:"can_huddle_yes",type:"inline",cursor:"pointer",className:"p-channel_options--radio_label",text:ae.t("Yes, members can start and join huddles")},r.createElement(tB.A,{name:"can_huddle_yes",value:"yes",onChange:()=>u(!0),id:"can_huddle_yes",checked:m})),r.createElement(K.A,{htmlFor:"can_huddle_no",type:"inline",cursor:"pointer",className:"p-channel_options--radio_label",text:ae.t("No, members can\u2019t start or join huddles")},r.createElement(tB.A,{name:"can_huddle_no",value:"no",onChange:()=>u(!1),id:"can_huddle_no",checked:!m})))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:l,type:"outline","aria-label":ae.t("Cancel")},ae.t("Cancel")),r.createElement(y.s_,{onClick:f,loading:c,"aria-label":ae.t("Save")},ae.t("Save"))))):null}HuddlesPermissionContent.displayName="HuddlesPermissionContent";let huddles_permission_modal_mapStateToProps=e=>({featureHuddlesEnabled:(0,t$.pt)(e)});function HuddlesPermissionModal(e){let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),{featureHuddlesEnabled:n}=e;return n?r.createElement(y.dW,{closeModal:a},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:ae.t("Allow huddles in this channel?")})),r.createElement(HuddlesPermissionContent,e)):null}HuddlesPermissionModal.displayName="HuddlesPermissionModal",(0,F.N)(huddles_permission_modal_mapStateToProps)(HuddlesPermissionContent);let at=(0,F.N)(huddles_permission_modal_mapStateToProps)(HuddlesPermissionModal),aa=(0,k.e)(at),an=new l.Ay("huddles");function HuddlesPermissionSubtitle(e){let{featureHuddlesEnabled:t,id:a}=e,n=(0,i.wA)(),[l,o]=(0,r.useState)(!0),s=(0,A.d4)(e=>(0,t0.d)(e,a,"can_huddle")?.enabled??!0);return((0,r.useEffect)(()=>{let e=n((0,t9.j)({channelId:a}));e&&e.finally(()=>o(!1))},[a,n]),!t||l)?null:s?r.createElement(r.Fragment,null,r.createElement("span",null,an.t("Members can start and join huddles in this channel."))," "):r.createElement(r.Fragment,null,r.createElement("span",null,an.t("Members can\u2019t start or join huddles in this channel."))," ")}HuddlesPermissionSubtitle.displayName="HuddlesPermissionSubtitle";let ar=(0,F.N)(e=>({featureHuddlesEnabled:(0,t$.pt)(e)}))(HuddlesPermissionSubtitle);var ai=a(0x247e8ed4c),al=a(0xb77a689a),ao=a(0xef503114),as=a(0x1feee1711),ac=a(0x1e2051844),ad=a(0xa5dbe09b),am=a(0x126f22530),au=a(0x15014e268),ap=a(0x19fbe8939),ah=a(0x190a9df19);let a_=new l.Ay("channel_options"),CustomRetentionDurationInput=({onDurationChange:e,onDurationUnitChange:t,retentionType:a,retentionDuration:n,retentionDurationUnit:i,experimentRetentionRedactionJobGroupOn:l})=>{let s=(0,r.useCallback)(t=>{e(""===t?t:Math.round((0,al.A)(t)?parseFloat(t):t))},[e]),c=(0,r.useCallback)(({value:e})=>t(e),[t]);if(a===ap.OJ.Default)return null;let d=l&&!(0,ao.A)(n)&&!(0,as.A)(n)&&!(0,ap.zL)({retentionType:a,retentionDuration:n,retentionDurationUnit:i}),m=[{label:a_.t("Days"),value:ap.dv.Days},{label:a_.t("Years"),value:ap.dv.Years}];return r.createElement(r.Fragment,null,r.createElement("div",{className:"display_flex"},r.createElement(am.A,{id:"retention_duration",name:"retention_duration",type:"number","aria-label":a_.t("Retention duration",{fallbackHashNs:"calendar",fallbackHash:"1370004da76fa4f3b7a5180fd5436065ef4c7d5b"}),value:(0,ao.A)(n)?"":n,onChange:s,isInvalid:d}),r.createElement(au.Ay,{className:"margin_left_100",selectId:"retention_duration_unit",ariaLabel:a_.t("Set retention duration unit"),options:m,width:"100",selectedOption:(0,ac.A)(m,["value",i]),onOptionSelected:c})),d&&r.createElement("div",{className:"margin_top_50 margin_bottom_50 sk_raspberry_red","data-qa":"channel_mgmt_retention_settings_modal_duration_error"},r.createElement(o.A,{type:"info-circle",size:"inherit",className:"margin_right_25"}),(0,ap.eO)({retentionType:a,retentionDuration:n,retentionDurationUnit:i,experimentRetentionRedactionJobGroupOn:l})))};CustomRetentionDurationInput.displayName="CustomRetentionDurationInput";let DataRetention=({team:e,onDurationChange:t,onDurationUnitChange:a,onTypeChange:n,prefsLoaded:i,retentionDuration:l,retentionDurationUnit:o,retentionType:s,teamRetentionType:c,teamRetentionDuration:d,isSharedChannel:m})=>{let u=(0,A.d4)(ah.h3),h=(0,A.d4)(e=>"on"===(0,x._Z)(e,"retention_redaction_job"));if(!i)return r.createElement("div",{className:"p-channel_options--option_spinner"},r.createElement(eC.A,{size:"jumbo"}));let f=(0,ap.Hj)({retentionType:s,retentionDuration:l,retentionDurationUnit:o,teamRetentionType:c,teamRetentionDuration:d,memberIsAdminOrOwner:u,experimentRetentionRedactionJobGroupOn:h}),b="retention_type";return r.createElement("div",{className:"p-channel-options--content_text"},r.createElement("p",null,a_.t("You can choose to delete messages in this channel after a set amount of time or use the default time period for the workspace")),m&&r.createElement(p.Ay,{type:"boxed",level:"info",className:"margin_bottom_100"},a_.rt("<strong>Note:</strong> Since this channel is shared with other organizations, your retention settings will only apply to messages from members of your organization.")," ",a_.rt("<a>Learn more about retention in shared channels</a>",null,({key:e,tag:t,text:a})=>"a"===t?r.createElement(_.A,{key:e,articleId:0x1ac6c81c0b,hash:"message-and-file-retention",forceOpenInBrowser:!0},a):null)),r.createElement(ad.A,{className:"margin_bottom_0"},r.createElement(K.A,{text:a_.rt("Use the default period for {teamName}",{teamName:(0,eN.F1)(e)}),subtext:(0,ap.aZ)(d,c),type:"inline",cursor:"pointer"},r.createElement(tB.A,{id:`${b}_0`,name:b,value:ap.OJ.Default,checked:s===ap.OJ.Default,onChange:n})),r.createElement(K.A,{text:a_.t("Delete messages after a specific time period"),htmlFor:`${b}_1`,type:"inline",cursor:"pointer"},r.createElement(tB.A,{id:`${b}_1`,name:b,value:ap.OJ.Custom,checked:s===ap.OJ.Custom,onChange:n}))),r.createElement("div",{className:"p-channel-options__custom_retention_container"},r.createElement(CustomRetentionDurationInput,{onDurationChange:t,onDurationUnitChange:a,retentionType:s,retentionDuration:l,retentionDurationUnit:o,experimentRetentionRedactionJobGroupOn:h}),f&&r.createElement(p.Ay,{level:"warning"},f)))};DataRetention.displayName="DataRetention";var af=a(0xf159cb74);let useRetentionPrefs=e=>{let t=(0,af.c)(e);return{channelRetentionDuration:(0,A.d4)(e=>(0,t_.x)(e,"retention_duration",t)),channelRetentionType:(0,A.d4)(e=>(0,t_.x)(e,"retention_type",t)),dmRetentionDuration:(0,A.d4)(e=>(0,t_.x)(e,"dm_retention_duration",t)),dmRetentionType:(0,A.d4)(e=>(0,t_.x)(e,"dm_retention_type",t)),groupRetentionDuration:(0,A.d4)(e=>(0,t_.x)(e,"group_retention_duration",t)),groupRetentionType:(0,A.d4)(e=>(0,t_.x)(e,"group_retention_type",t))}},MessageRetention=({channel:e,currentTeam:t,retentionDuration:a,retentionDurationUnit:n,retentionType:l,teamRetentionType:o,teamRetentionDuration:s,setRetentionDuration:c,setRetentionDurationUnit:d,setRetentionType:m,setTeamRetentionType:u,setTeamRetentionDuration:p,setHasChanges:h,isPrivateChannel:_,isIm:f,isMpim:b,isSharedChannel:g})=>{let y=(0,i.wA)(),[A,x]=(0,r.useState)(!1),E=(0,r.useRef)(l),C=(0,r.useRef)(a),k=(0,r.useRef)(n),{channelRetentionDuration:v,channelRetentionType:S,dmRetentionDuration:I,dmRetentionType:w,groupRetentionDuration:T,groupRetentionType:N}=useRetentionPrefs(e),M=(0,r.useCallback)(e=>{c(parseInt(e,10)),h(C.current!==parseInt(e,10))},[c,h]),R=(0,r.useCallback)(e=>{d(e),h(k.current!==e)},[d,h]),P=(0,r.useCallback)(e=>{m(parseInt(e.target.value,10)),h(E.current!==parseInt(e.target.value,10))},[m,h]);return(0,r.useEffect)(()=>{A||y((0,eG.ZZ)({channel:e,reason:"channel-options-ia"})).then(e=>{_?(u(N),p(T)):f||b?(u(w),p(I)):(u(S),p(v)),m(parseInt(e.retentionType,10)),c(parseInt(e.retentionDuration,10)),E.current=parseInt(e.retentionType,10),C.current=parseInt(e.retentionDuration,10),x(!0)})},[e,v,S,y,I,w,T,N,f,b,_,c,m,p,u,A]),r.createElement(DataRetention,{team:t,onDurationChange:M,onDurationUnitChange:R,onTypeChange:P,prefsLoaded:A,retentionDuration:a,retentionDurationUnit:n,retentionType:l,teamRetentionType:o,teamRetentionDuration:s,isSharedChannel:g})};MessageRetention.displayName="MessageRetention";let ab=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t),n=(0,af.c)(a);return{channel:a,currentTeam:(0,B._J)(e,n),isPrivateChannel:(0,eV.Zp)(a),isIm:(0,eV.LI)(a),isMpim:(0,eV.yz)(a),isSharedChannel:(0,O.ju)(a)}})(MessageRetention),ag=new l.Ay("channel_details"),MessageRetentionModalContents=({id:e,closeModal:t,experimentRetentionRedactionJobGroupOn:a=!1,channel:n})=>{let l=(0,i.wA)(),[o,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),[m,u]=(0,r.useState)(!1),[h,_]=(0,r.useState)(0),[f,b]=(0,r.useState)(0),[g,A]=(0,r.useState)(0),[x,E]=(0,r.useState)(0),[C,k]=(0,r.useState)(0),v=(0,r.useCallback)(()=>{m?l((0,eG.hd)({channel:n,retentionDuration:(0,ap.KG)({retentionDuration:h,retentionDurationUnit:f}),retentionType:g,reason:"channel-options-message-retention"})).then(e=>{e.ok?(s(!1),t()):d(ag.t("Oops, something went wrong with updating message retention settings. Please try again."))}).catch(()=>{s(!1),d(ag.t("Oops, something went wrong with updating message retention settings. Please try again."))}):t()},[m,l,n,h,f,g,t]),S=a&&!(0,ap.zL)({retentionType:g,retentionDuration:h,retentionDurationUnit:f});return r.createElement(r.Fragment,null,r.createElement(y.$m,null,c&&r.createElement(y.qf,{className:"p-about_modal__section"},r.createElement(p.Ay,{level:"error"},c)),r.createElement(y.qf,null,r.createElement(ab,{id:e,retentionDuration:h,retentionDurationUnit:f,retentionType:g,teamRetentionType:x,teamRetentionDuration:C,setRetentionDuration:_,setRetentionDurationUnit:b,setRetentionType:A,setTeamRetentionType:E,setTeamRetentionDuration:k,setHasChanges:u}))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:t,type:"outline","aria-label":ag.t("Cancel")},ag.t("Cancel")),r.createElement(y.s_,{onClick:v,loading:o,disabled:!m||S,"aria-label":ag.t("Save Changes")},ag.t("Save Changes")))))};MessageRetentionModalContents.displayName="MessageRetentionModalContents";let ay=(0,F.N)((e,{id:t})=>({channel:(0,U.OL)(e,t),experimentRetentionRedactionJobGroupOn:"on"===(0,x._Z)(e,"retention_redaction_job")}))(MessageRetentionModalContents),aA=new l.Ay("channel_details"),MessageRetentionModal=({id:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),n=aA.rt("Edit {channelName} message history",{channelName:r.createElement(ev.A,{channelId:e})});return r.createElement(y.dW,{closeModal:a},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:n})),r.createElement(ay,{id:e,closeModal:a}))};MessageRetentionModal.displayName="MessageRetentionModal";let ax=(0,k.e)(MessageRetentionModal),aE=new l.Ay("channel_options"),aC=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t);return{channel:a,isPrivateChannel:(0,eV.Zp)(a),isIm:(0,eV.LI)(a),isMpim:(0,eV.yz)(a)}})(({channel:e,isPrivateChannel:t,isIm:a,isMpim:n})=>{let l=(0,i.wA)(),[o,s]=(0,r.useState)(0),[c,d]=(0,r.useState)(0),{channelRetentionDuration:m,channelRetentionType:u,dmRetentionDuration:p,dmRetentionType:h,groupRetentionDuration:_,groupRetentionType:f}=useRetentionPrefs(e),b=(0,r.useCallback)(()=>{l((0,eG.ZZ)({channel:e,reason:"channel-options-ia"})).then(e=>{0===e.retentionType?t?(s(f),d(_)):a||n?(s(h),d(p)):(s(u),d(m)):(s(e.retentionType),d(e.retentionDuration))})},[e,m,u,l,p,h,_,f,a,n,t,d,s]),g=(0,r.useCallback)(()=>c?c>364&&c%365==0?aE.t("Delete messages and revisions after {numYears, plural, =1 {# year} other {# years}}",{numYears:Math.round(c/365)}):aE.t("Delete messages and revisions after {numDays, plural, =1 {# day} other {# days}}",{numDays:c}):0===o?aE.t("Keep all messages, except for revisions"):1===o?aE.t("Keep all messages, including revisions"):"",[o,c]);return(0,r.useEffect)(()=>{b()},[b]),r.createElement(r.Fragment,null,g())});var ak=a(0x5525669),av=a(0x140328c39),aS=a(0x120b6eb39),aI=a(0xf931c21),aw=a(0x4323d7f5),aT=a(0x1428e82b3),aN=a(0x15a9949d2),aM=a(0x16ef98cf),aR=a(0x10079cc7),aP=a(0x1b654c3cf);let aL=new l.Ay("channel_details"),{AllowedWorkspace:aO,CannotRequestSharedChannels:aD,DisallowedWorkspace:aF}=aT.IB,aU={uiStep:D.UiStep.CHANNEL_DETAILS_SLACK_CONNECT_UPGRADE,onClick:{enableClogAction:!0}},aB={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_INVITE_SLACK_CONNECT,onClick:{enableClogAction:!0}},aH="not_connected_section_slack_connect_invite_guidelines_read_instructions",aW="not_connected_section_slack_connect_invite_guidelines_link",aV="not_connected_section_slack_connect_ctas",BaseNotConnectedSection=({channel:e,isFreePlan:t,canUserInviteExternalMembersToChannel:a,canUserSeeInviteGuidelinesForChannel:n,canUserInviteExternalToChannelPermission:l})=>{let o=(0,i.wA)(),{guidelinesLink:s,handleGuidelinesCTAClick:c,renderLink:d,shouldDisplayGuidelines:m,viewGuidelinesAutoClogProps:u}=(0,aS.F)({type:"INVITE",dataQa:aW,stepVariant:aW,modalHeaderSuffix:"instructions",showCopyButton:!0}),p=(0,r.useCallback)(()=>{o((0,aP._)({channelId:e.id,entryPoint:aM.kP.NotConnectedSection,openModalProps:{isStackable:!0}}))},[o,e]),h=(0,r.useCallback)(({text:e})=>r.createElement(_.A,{articleId:0x1ac6c815a3},e),[]),f=aL.t("Slack Connect"),b=(0,r.useMemo)(()=>r.createElement("div",{className:"display_flex"},f," ",r.createElement(aI.A,{className:"margin_left_50",uiComponentVariant:D.UiComponentVariant.ADMIN_CHANNEL_SLACK_CONNECT})),[f]),g=(0,r.useCallback)(e=>r.createElement(tD.z9,{...e,href:(0,aR.hZ)({entryPoint:"channel_details_modal_settings_tab"}),autoClogProps:aU},aL.t("See Upgrade Options")),[]),y=n.ok&&m,A=n?.reasons?.includes(aO),x=n?.reasons?.includes(aF),E=!n?.reasons?.includes(aD),C=(0,r.useCallback)(()=>{let t=aL.t("Read Instructions"),a={autoClogProps:{...u,stepVariant:aH},className:"margin_bottom_100","data-qa":aH};return A&&E?r.createElement(av.Ay,{channel:e,handleAddPeople:p,"data-qa":aV}):s?r.createElement(tD.z9,{...a,href:s,type:"outline"},t):r.createElement(tD.$n,{...a,onClick:c,type:"outline"},t)},[e,s,p,c,A,E,u]),k=aL.t("Work With Another Company"),v=(0,r.useCallback)(t=>a?r.createElement(av.Ay,{channel:e,handleAddPeople:p,"data-qa":aV}):r.createElement(tD.$n,{...t,onClick:p,autoClogProps:aB},k),[a,e,p,k]),S=y?C:v,maybeRenderSlackConnectSection=()=>l?r.createElement(ak.A,{className:"p-about_modal__connected_section_cta_image",imageUrl:"/img/ia-details/slack-connect-empty@1x.png",imageUrl2x:"/img/ia-details/slack-connect-empty@2x.png","data-qa":"not_connected_section_paid",renderButton:S,text:y?(()=>{switch(!0){case A&&E:return aL.rt("If you work with people from external organizations, you can add them to existing channels. Your admins <link>created instructions</link> with details.",{"<link>":d});case x&&E:return aL.t("Slack Connect isn\u2019t enabled for this workspace, but your admins created instructions to help you add the right people to the right workspaces.");default:return aL.t("Your admins haven\u2019t shared the permission required to invite external people to this channel. Read their instructions for details.")}})():aL.rt("Work with other companies and organizations in this channel. <link>Learn more</link>",{"<link>":h}),title:b}):null;return(maybeRenderSlackConnectSection.displayName="maybeRenderSlackConnectSection",t)?r.createElement(ak.A,{className:"p-about_modal__connected_section_cta_image",imageUrl:"/img/ia-details/slack-connect-empty.png",imageUrl2x:"/img/ia-details/slack-connect-empty@2x.png","data-qa":"not_connected_section_free",renderButton:g,text:aL.rt("Work with other companies and organizations in this channel. <link>Learn more</link>",{"<link>":h}),title:b}):maybeRenderSlackConnectSection()};BaseNotConnectedSection.displayName="BaseNotConnectedSection";let aG=(0,F.N)((e,{channel:t})=>({isFreePlan:(0,eN.tc)((0,B.H7)(e)),canUserInviteExternalMembersToChannel:(0,aw.D7)(e,t.id),canUserInviteExternalToChannelPermission:(0,aN.i)(e,t.id),canUserSeeInviteGuidelinesForChannel:(0,aT.QG)(e,t)}))(BaseNotConnectedSection);var aq=a(0xe0376d2),aj=a(0xe874a88a),az=a(0x1595bdd0),aK=a(0x20ef3966f),a$=a(0xf3c40abe),aY=a(0x1faa3f1ac),aQ=a(0x10d53599f),aZ=a(0x19dc73101),aJ=a(0x11fcf00e);let aX=new l.Ay("channel_options"),PostingPermissions=({canAtHereAtChannel:e=!1,canThread:t=!1,channel:a,disableCanAtHereAtChannelCheckbox:n=!1,hasKeyboardFocus:l,hasManageChannelPostingPermission:o=!1,isChannelGeneral:s=!1,isEnterpriseTeam:c=!1,isOrgDefault:m=!1,isOrgShared:u=!1,onChangeAtHereAtChannelCheckbox:p,onChangeCheckbox:h,onChangeRadio:_,onChangeValueSelectedMembers:f,postingPermissionsLoaded:b=!1,postingPermissionsSelectedMembers:g,shouldShowExternalChannelCopy:y=!1,whoCanPost:x=""})=>{let E=(0,i.wA)(),C=(0,A.d4)(ah.FQ),k=(0,A.d4)(e=>(0,tY.S4)(e,a)),v=(0,A.d4)(er.Kc),S=(0,A.d4)(tQ.cA),I=(0,e6.Ez)(S),w="ra"!==x,T=(c&&u?C:k)||o,N=(0,r.useCallback)(()=>{E((0,aJ.a)({articleId:0xc0a6c2e}))},[E]),M={entities:{channels:!1,members:{includeWorkflows:!0},userGroups:!1},limit:100,allowEmptyQuery:!0,sort:{frecency:!0}},formatPermissionSettings=()=>{let e={permissionType:"ra",label:y?aX.t("Everyone in the channel"):aX.t("Everyone"),hideWhenOrgDefault:!0},t={permissionType:"regular",label:y?aX.rt("Only members from {teamName}",{teamName:r.createElement(d.A,{id:v})}):aX.t("Everyone, except guests"),hideWhenOrgDefault:!0},a={permissionType:"org_admin",label:y?aX.rt("Only Org Admins/Owners from {teamName}",{teamName:r.createElement(d.A,{id:v})}):aX.t("Org Admins/Owners")},n={permissionType:"multi",label:y?aX.rt("{teamName} Org Admins and Owners, plus specific people",{teamName:r.createElement(d.A,{id:v})}):aX.t("Org Admins and Owners, plus select members",{})};return c&&u?(a.label=y?aX.rt("Only Org Admins from {teamName}",{teamName:r.createElement(d.A,{id:v})}):aX.t("Org Admins only"),n.label=y?aX.rt("{teamName} Org Admins, plus specific people",{teamName:r.createElement(d.A,{id:v})}):aX.t("Org Admins, plus specific people")):(a.label=y?aX.rt("Only admins from {teamName}",{teamName:r.createElement(d.A,{id:v})}):aX.t("Admins only"),a.permissionType="admin",n.label=y?aX.rt("{teamName} admins, plus specific people",{teamName:r.createElement(d.A,{id:v})}):aX.t("Admins, plus specific people")),!T&&(a=null,n.label=aX.t("You, and specific people"),I&&(t=null)),(0,az.A)([e,t,a,n])};formatPermissionSettings.displayName="formatPermissionSettings";let maybeRenderCheckbox=()=>{if(!w)return null;let e=aX.t("Allow threads"),a=aX.t("Everyone will be able to add replies to messages posted in this channel, regardless of overall posting permissions");return r.createElement("div",null,r.createElement("hr",{className:"top_margin bottom_margin"}),r.createElement(K.A,{htmlFor:"posting_permission_can_thread",type:"inline",cursor:"pointer",text:e,subtext:a},r.createElement(Z.A,{id:"posting_permission_can_thread",name:"can_thread",onChange:h,checked:t})))};maybeRenderCheckbox.displayName="maybeRenderCheckbox";let i18nHandler=({key:e,text:t,tag:a})=>"Link"===a?r.createElement(aY.A,{key:e,onClick:N},t):"strong"===a?r.createElement("strong",null,t):null;i18nHandler.displayName="i18nHandler";let maybeRenderAtHereChannelCheckbox=()=>{if(!p)return null;let t=aX.rt("<strong> Note:</strong> Because of your workspace settings, only people who have permission can use <strong>@here</strong> and <strong>@channel</strong>.",null,i18nHandler),a=aX.t("Allow @here and @channel mentions"),i=r.createElement(r.Fragment,null,aX.rt("<strong>@channel</strong> notifies all members of a channel, and <strong>@here</strong> notifies members of a channel who are active at that moment. Learn more about <Link>how mentions work</Link>.",null,i18nHandler),t);return s&&(a=aX.t("Allow @everyone, @here and @channel mentions"),i=r.createElement(r.Fragment,null,aX.rt("<strong>@everyone</strong> notifies every person in the #general channel, <strong>@channel</strong> notifies all members of a channel, and <strong>@here</strong> notifies members of a channel who are active at that moment. Learn more about <Link>how mentions work</Link>.",null,i18nHandler),t)),r.createElement("div",null,!w&&r.createElement("hr",{className:"top_margin bottom_margin"}),r.createElement(K.A,{htmlFor:"posting_permission_can_at_here_channel",type:"inline",cursor:n?null:"pointer",text:a,subtext:i,isDisabled:n},r.createElement(Z.A,{id:"posting_permission_can_at_here_channel",name:"can_thread",onChange:p,checked:e,disabled:n})))};maybeRenderAtHereChannelCheckbox.displayName="maybeRenderAtHereChannelCheckbox";let maybeRenderMemberPicker=()=>{if("multi"!==x)return null;let{id:e}=S,t=(0,az.A)((g||[]).map(t=>t===e?null:{value:t}));return r.createElement(aZ.h,{className:"padding_left_150",optionsRowHeight:32,selectedOptions:t,renderOption:(e,t)=>r.createElement(aQ.A,{id:e.value,isActive:t.isActive}),width:"100%",onSelectedItemsChange:e=>{f(e.map(e=>e.value))},selectId:"who_can_post",placeholderText:aX.t("Select people\u2026"),searcherOptions:M})};maybeRenderMemberPicker.displayName="maybeRenderMemberPicker";let renderRadios=()=>(0,aK.A)(formatPermissionSettings(),e=>{if(m&&e.hideWhenOrgDefault)return null;let t=e.permissionType===x;return r.createElement("div",{key:e.permissionType},r.createElement(K.A,{htmlFor:`who_can_post_${e.permissionType}`,type:"inline",cursor:"pointer",className:"p-channel_options--radio_label",text:e.label},r.createElement(tB.A,{name:"who_can_post",value:e.permissionType,onChange:_,id:`who_can_post_${e.permissionType}`,"data-qa":`posting_permissions_modal__who_can_post_${e.permissionType}`,checked:t,autoFocus:t&&l})))});if(renderRadios.displayName="renderRadios",!b)return r.createElement("div",{className:"p-channel_options--option_spinner"},r.createElement(eC.A,{size:"jumbo"}));let R=aX.t("Who can post in this channel?");return r.createElement("div",{className:"p-channel-options--content_text"},r.createElement(tF.A,null,r.createElement(tU.A,null,r.createElement("p",null,r.createElement("strong",null,R))),renderRadios(),maybeRenderMemberPicker()),maybeRenderCheckbox(),maybeRenderAtHereChannelCheckbox())};PostingPermissions.displayName="PostingPermissions";let a0=(0,a$.A)(PostingPermissions);var a1=a(0x21d145283),a2=a(0x11640e941),a4=a(0x6badb612),a5=a(0xf3719a28),a3=a(0x167d76333),a6=a(0xb8504a42),a8=a(0x5c354532);let PostingPreferences=({channel:e,currentMember:t,currentUserIsEnterpriseAdmin:a,currentUserIsWorkspaceAdmin:n,id:l,isEnterprise:o,canThread:s,whoCanPost:c,postingPermissionsSelectedMembers:d,setCanThread:m,setWhoCanPost:u,setPostingPermissionsSelectedMembers:p,setHasChanges:h,canAtHereAtChannel:_,setCanAtHereAtChannel:f,isGeneral:b,disableCanAtHereAtChannel:g,shouldShowExternalChannelCopy:y,hasManageChannelPostingPermission:A,shouldShowChannelCanvasPermissions:x})=>{let E=(0,i.wA)(),[C,k]=(0,r.useState)(!1),[v,S]=(0,r.useState)(!1),I=(0,r.useRef)(s),w=(0,r.useRef)(_),T=(0,r.useRef)(c),N=(0,r.useRef)(d),[M,R]=(0,r.useState)(!1),P=(0,r.useCallback)(e=>{m(e.target.checked),h(I.current!==e.target.checked)},[m,h]),L=(0,r.useCallback)(e=>{f(e.target.checked),h(w.current!==e.target.checked)},[f,h]),O=(0,r.useCallback)(e=>{u(e.target.value),h(T.current!==e.target.value)},[u,h]),D=(0,r.useCallback)(e=>{p(e),h(N.current.sort()!==e.sort()),h(!0)},[p,h]),[F,U]=(0,r.useState)([]);return(0,r.useEffect)(()=>{(async()=>{let e=E((0,eG.Kn)({channelId:l,prefName:"who_can_post",reason:"channel-options-ia-posting-permission-preferences"})),t=E((0,eG.Kn)({channelId:l,prefName:"can_thread",reason:"channel-options-ia-posting-permission-preferences"})),a=E((0,eG.Kn)({channelId:l,prefName:"enable_at_here",reason:"channel-options-ia-posting-permission-preferences"})),n=E((0,eG.Kn)({channelId:l,prefName:"enable_at_channel",reason:"channel-options-ia-posting-permission-preferences"}));U(await aj.S.all([e,t,a,n]))})()},[E,l]),(0,r.useEffect)(()=>{if(F.length){let[r,i,l,s]=F;if(!r.ok||!r.pref_value)return;let c=r.pref_value,d=(o?a:n)||A,h=(c.user||[]).filter(e=>e!==t.id);if(c.type)if(h.length&&("admin"===c.type[0]||"owner"===c.type[0]||"org_admin"===c.type[0]))u("multi"),p(c.user),v||(T.current="multi",N.current=c.user);else if("admin"!==c.type[0]&&"owner"!==c.type[0]&&"org_admin"!==c.type[0]||d){let t=o||"org_admin"!==c.type[0]?c.type[0]:"admin";"owner"===t&&(t=o?"org_admin":"admin"),(0,e4.lQ)(e)&&"org_admin"!==t&&(t="org_admin"),u(t),v||(T.current=t)}else u("multi"),v||(T.current="multi");else(0,e4.lQ)(e)?(v||(T.current="org_admin"),u("org_admin")):(u("ra"),m(!0),v||(T.current="ra",I.current=!0));if(i.ok&&i.pref_value?.type){let e=i.pref_value,t="all"===e.type[0]||"ra"===e.type[0];m(t),v||(I.current=t)}if(l.ok&&s.ok){let e=l.pref_value?.enabled||(0,z.A)(l.pref_value),t=s.pref_value?.enabled||(0,z.A)(s.pref_value),a=!0===e||!0===t;f(a),v||(w.current=a)}else f(!0);g&&(f(!1),R(!0)),k(!0),S(!0)}},[F,e,t,a,n,E,l,o,m,p,u,v,f,g,R,A]),r.createElement(a0,{channel:e,onChangeCheckbox:P,onChangeAtHereAtChannelCheckbox:L,canAtHereAtChannel:_,onChangeRadio:O,isOrgDefault:(0,e4.lQ)(e),isOrgShared:(0,a2.M)(e),canThread:s,whoCanPost:c,isEnterpriseTeam:o,postingPermissionsSelectedMembers:d,onChangeValueSelectedMembers:D,postingPermissionsLoaded:C,isChannelGeneral:b,disableCanAtHereAtChannelCheckbox:M,shouldShowExternalChannelCopy:y,hasManageChannelPostingPermission:A,shouldShowChannelCanvasPermissions:x})};PostingPreferences.displayName="PostingPreferences";let a7=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t),n=(0,B.H7)(e),r=(0,tQ.cA)(e),{isMigrated:i}=(0,a5.H)(a);return{channel:a,currentMember:r,currentUserIsEnterpriseAdmin:(0,ah.FQ)(e),currentUserIsWorkspaceAdmin:(0,tY.S4)(e,a),isEnterprise:(0,a6.r7)(n),isGeneral:(0,a1.N)(a),disableCanAtHereAtChannel:(0,a4.i)(e,t,{allowToAdmins:!0}),shouldShowExternalChannelCopy:(0,O.ju)(a)&&!(0,I.b)(e,a),hasManageChannelPostingPermission:(0,a8.ry)(e,{channelId:t}),shouldShowChannelCanvasPermissions:!(0,eN.tc)(n)&&!(0,eN.KJ)(n)&&(0,a3.F)(e)&&!i}})(PostingPreferences);function formatWhoCanPostApi(e,t=[],a=!0){let n="";return"multi"===e?(n=a?"type:org_admin":"type:admin",t&&t.length&&t.forEach(e=>{n+=`,user:${e}`})):n=`type:${e}`,n}var a9=a(0x21b0fd259),ne=a(0xc2757f82);let nt=new l.Ay("channel_details"),PostingPermissionsModalContents=({id:e,closeModal:t,channel:a,isEnterprise:n,currentMember:l,currentMemberIsAdmin:o})=>{let s=(0,i.wA)(),[c,d]=(0,r.useState)(!1),[m,u]=(0,r.useState)(""),[h,_]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[g,A]=(0,r.useState)(!1),[x,E]=(0,r.useState)(""),[C,k]=(0,r.useState)([]),v=(0,r.useCallback)(()=>{let e=[];if(h){d(!0);let r="admin"===x||"org_admin"===x?"multi":x,i=(n&&(0,a2.M)(a)?(0,a9.n5)(l):o)?[]:[l.id],c=formatWhoCanPostApi(r,"multi"===x?(0,aq.A)([...C||[],...i]):i,n&&(0,a2.M)(a)),m=f?"type:ra":c,p=s((0,ne.y)({channelId:a.id,newPrefs:JSON.stringify({who_can_post:c,can_thread:m,enable_at_here:g?"true":"false",enable_at_channel:g?"true":"false"}),reason:"channel-options-ia-posting-permission-modal-contents"}));return e.push(p),p.then(()=>{d(!1),t()}).catch(e=>{"restricted_action"===e.name?(d(!1),u(nt.t("Unable to save posting permissions. It seems like the posting permission for this channel has been changed and you can no longer change this preference."))):(d(!1),u(nt.t("Oops, something went wrong with updating message posting permissions. Please try again.")))})}return aj.S.all(e).then(()=>{d(!1),t()}).catch(()=>{d(!1),u(nt.t("Oops, something went wrong with updating channel permissions. Please try again."))})},[f,a,l,o,s,n,C,x,h,t,g]);return r.createElement(r.Fragment,null,r.createElement(y.$m,{"data-qa":"posting_permissions_modal"},m&&r.createElement(y.qf,{className:"p-about_modal__section"},r.createElement(p.Ay,{level:"error"},m)),r.createElement(y.qf,{"data-qa":"posting_permissions_modal__content_section"},r.createElement(a7,{id:e,canThread:f,whoCanPost:x,postingPermissionsSelectedMembers:C,setCanThread:b,setWhoCanPost:E,setPostingPermissionsSelectedMembers:k,setHasChanges:_,canAtHereAtChannel:g,setCanAtHereAtChannel:A}))),r.createElement(y.jl,null,r.createElement(y.ox,null,r.createElement(y.s_,{onClick:t,type:"outline","aria-label":nt.t("Cancel")},nt.t("Cancel")),r.createElement(y.s_,{onClick:v,loading:c,disabled:!h,"data-qa":"posting_permissions_modal__save_button","aria-label":nt.t("Save Changes")},nt.t("Save Changes")))))};PostingPermissionsModalContents.displayName="PostingPermissionsModalContents";let na=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t),n=(0,B.H7)(e),r=(0,tQ.cA)(e);return{channel:a,isEnterprise:(0,a6.r7)(n),currentMember:r,currentMemberIsAdmin:(0,ah.Zo)(e)}})(PostingPermissionsModalContents),nn=new l.Ay("channel_details"),PostingPermissionsModal=({id:e,isTeamOnPlusOrHigher:t})=>{let a=(0,i.wA)(),n=(0,r.useCallback)(()=>a((0,E.O)()),[a]),l=t?nn.t("Channel permissions"):nn.t("Posting permissions");return r.createElement(y.dW,{closeModal:n},r.createElement(y.rQ,null,r.createElement(y.Rc,{title:l})),r.createElement(na,{id:e,closeModal:n}))};PostingPermissionsModal.displayName="PostingPermissionsModal";let nr=(0,F.N)(e=>({isTeamOnPlusOrHigher:(0,eN.Ny)((0,B.H7)(e))}))(PostingPermissionsModal),ni=(0,k.e)(nr),nl=new l.Ay("channel_options"),createPermissionsSubtitleBulleted=({whoCanPost:e,canThread:t,canAtHereAtChannel:a,isChannelGeneral:n,shouldShowExternalChannelCopy:i,topLevelTeamId:l})=>{let o,s;if(!e)return null;let c={everyone:nl.t("Everyone can post"),regular:nl.t("Everyone except guests can post"),regularExternal:nl.rt("Only {teamName} members can post",{teamName:r.createElement(d.A,{id:l})}),admin:nl.t("Only admins can post"),adminExternal:nl.rt("Only {teamName} admins can post",{teamName:r.createElement(d.A,{id:l})}),orgAdmin:nl.t("Only Org Admins can post"),orgAdminExternal:nl.rt("Only {teamName} Org Admins can post",{teamName:r.createElement(d.A,{id:l})}),adminMulti:nl.t("Only admins and specific people can post"),adminMultiExternal:nl.rt("Only {teamName} admins and specific people can post",{teamName:r.createElement(d.A,{id:l})}),ownerMulti:nl.t("Only Org Owners and specific people can post"),ownerMultiExternal:nl.rt("Only {teamName} Org Owners and specific people can post",{teamName:r.createElement(d.A,{id:l})}),orgAdminMulti:nl.t("Only Org Admins and specific people can post"),orgAdminMultiExternal:nl.rt("Only {teamName} Org Admins and specific people can post",{teamName:r.createElement(d.A,{id:l})}),multi:nl.t("Only specific people can post")},m={everyone:nl.t("Everyone can reply to messages"),noOne:nl.t("No one can reply to messages")},u="";switch(u=n?nl.t("@everyone"):nl.t("@channel and @here"),e){case"ra":o=c.everyone;break;case"regular":o=i?c.regularExternal:c.regular;break;case"admin":o=i?c.adminExternal:c.admin;break;case"org_admin":o=i?c.orgAdminExternal:c.orgAdmin;break;case"admin_multi":o=i?c.adminMultiExternal:c.adminMulti;break;case"owner_multi":o=i?c.ownerMultiExternal:c.ownerMulti;break;case"org_admin_multi":o=i?c.orgAdminMultiExternal:c.orgAdminMulti;break;default:o=c.multi}let p=t?m.everyone:m.noOne;return s=a?nl.rt("Because of your workspace settings, only people who have permission can use {mentionsAndText} mentions",{mentionsAndText:u}):nl.t("No one can use @channel or @here mentions"),r.createElement("ul",{className:"p-about_modal__posting_permissions_subtitle","data-qa":"about_modal__posting_permissions_subtitle"},r.createElement("li",null,o),r.createElement("li",null,p),r.createElement("li",null,s))};createPermissionsSubtitleBulleted.displayName="createPermissionsSubtitleBulleted";let no=new l.Ay("channel_details"),ns={display:"inline"},stopOpeningModalIfLearnMoreLink=e=>{e.stopPropagation()},PostingPermissionsSubtitle=({channel:e,currentMember:t,currentMemberIsAdmin:a,id:n,isEnterprise:l,isChannelGeneral:o,shouldShowExternalChannelCopy:s,topLevelTeamId:c,hasManageChannelPostingPermission:d,showLearnMoreLink:m,callback:u})=>{let p=(0,i.wA)(),[h,f]=(0,r.useState)(""),[b,g]=(0,r.useState)(!1),[y,A]=(0,r.useState)(!1),x=(0,r.useCallback)(()=>{let r=p((0,eG.Kn)({channelId:n,prefName:"who_can_post",reason:"channel-options-ia-posting-permission-subtitle"})),i=p((0,eG.Kn)({channelId:n,prefName:"can_thread",reason:"channel-options-ia-posting-permission-subtitle"})),o=p((0,eG.Kn)({channelId:n,prefName:"enable_at_here",reason:"channel-options-ia-posting-permission-subtitle"})),s=p((0,eG.Kn)({channelId:n,prefName:"enable_at_channel",reason:"channel-options-ia-posting-permission-subtitle"}));aj.S.all([r,i,o,s]).then(([n,r,i,o])=>{if(!n.ok||!n.pref_value)return;let s=n.pref_value;s.type&&s.type[0]&&f(s.type[0]);let c=(l?(0,a9.n5)(t):a)||d,m=(s.user||[]).filter(e=>e!==t.id);if(s.type)if(m.length&&"admin"===s.type[0])f("admin_multi");else if(m.length&&"owner"===s.type[0])f("owner_multi");else if(m.length&&"org_admin"===s.type[0])f("org_admin_multi");else if("admin"!==s.type[0]&&"owner"!==s.type[0]&&"org_admin"!==s.type[0]||c){let t=l||"org_admin"!==s.type[0]?s.type[0]:"admin";"owner"===t&&(t=l?"org_admin":"admin"),(0,e4.lQ)(e)&&"org_admin"!==t&&(t="org_admin"),f(t)}else f("multi");else(0,e4.lQ)(e)?f("org_admin"):(f("ra"),g(!0));if(r.ok&&r.pref_value?.type){let e=r.pref_value;g("all"===e.type[0]||"ra"===e.type[0])}if(i.ok&&o.ok){let e=i.pref_value?.enabled||(0,z.A)(i.pref_value),t=o.pref_value?.enabled||(0,z.A)(o.pref_value);A(!0===e||!0===t)}else A(!0);u?.()})},[p,n,u,l,t,a,d,e]);(0,r.useEffect)(()=>{x()},[x]);let E=createPermissionsSubtitleBulleted({whoCanPost:h,canThread:b,canAtHereAtChannel:y,isChannelGeneral:o,shouldShowExternalChannelCopy:s,topLevelTeamId:c});return r.createElement(r.Fragment,null,E," ",m&&r.createElement("a",{role:"link",onClick:stopOpeningModalIfLearnMoreLink,style:ns,tabIndex:0},no.rt("<link>Learn more</link>",{"<link>":({text:e})=>r.createElement(_.A,{articleId:0x53d1f2cb9f},e)})))};PostingPermissionsSubtitle.displayName="PostingPermissionsSubtitle";let nc=(0,F.N)((e,{id:t,showLearnMoreLink:a=!0,callback:n})=>{let r=(0,U.OL)(e,t),i=(0,B.H7)(e),l=(0,tQ.cA)(e),o=(0,O.ju)(r)&&!(0,I.b)(e,r);return{channel:r,currentMember:l,currentMemberIsAdmin:(0,ah.Zo)(e),isEnterprise:(0,a6.r7)(i),isChannelGeneral:(0,a1.N)(r),shouldShowExternalChannelCopy:o,topLevelTeamId:(0,er.Kc)(e),hasManageChannelPostingPermission:(0,a8.ry)(e,{channelId:t}),showLearnMoreLink:a,callback:n}})(PostingPermissionsSubtitle);var nd=a(0x20232a42a),nm=a(0x18a618354),nu=a(0xde4f4747),np=a(0xec149dbf),nh=a(0x188566b03),n_=a(0x1ca47c6f6),nf=a(0x1d0f4d36),nb=a(0x147fb8c90),ng=a(0x9c162739),ny=a.n(ng);let nA=new l.Ay("channel_details"),nx={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_POSTING_PERMISSIONS};function ViewPostingPermissions({id:e,channel:t,isDisabled:a}){let n=(0,i.wA)(),[l,o]=(0,r.useState)(!1),s=(0,A.d4)(e=>"on"===(0,x._Z)(e,"plus_request_to_purchase_fast_follows")),d=(0,nu.Jg)({businessPlusEntryPoint:D.UiComponentName.BUSINESS_PLUS_IN_CLIENT_MANAGE_CHANNELS_PAYWALL_TRIGGER,uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_POSTING_PERMISSIONS,enableOnClickClogAction:!0}),m=(0,A.d4)(e=>(0,eN.KJ)((0,B.H7)(e))),u=(0,A.d4)(tb.Cr),p=(0,A.d4)(e=>(0,nb.G2)(e,"manage_channel_posting__access")),h=(0,nd.t)(),{variant:_}=(0,n_.p)(),f=_!==nh.dx.RequestToPurchase||h,b=s&&m&&!p&&!(0,a1.N)(t)&&!u&&f,g=(0,r.useCallback)(()=>{n(ni({id:e,openModalProps:{isStackable:!0}}))},[n,e]),y=(0,r.useCallback)(()=>{o(!0)},[]),E=(0,r.useCallback)(()=>{n((0,np.W)({entryPoint:D.UiComponentName.BUSINESS_PLUS_IN_CLIENT_MANAGE_CHANNELS_PAYWALL_TRIGGER}))},[n]),C=(0,r.useMemo)(()=>r.createElement(nc,{id:e,showLearnMoreLink:!b,callback:y}),[e,y,b]);return r.createElement("div",{className:ny().container},r.createElement(S.A,{ariaLabel:nA.t("Edit posting permissions"),dataQa:"channel-posting-permissions",isDisabled:a,onClick:g,text:C,title:nA.t("Posting permissions"),autoClogProps:nx,channel:t}),b&&l&&r.createElement(tD.Nm,{className:ny().paywall,onClick:E,autoClogProps:d},r.createElement(nm.y,{size:nf.vj.Large}),r.createElement("div",{className:ny().paywallContent},r.createElement("div",null,r.createElement("p",{className:ny().paywallTitle},nA.t("Manage channel posting permissions with Business+")),r.createElement("p",{className:ny().paywallSubtitle},nA.t("Learn more about what you can do."))),r.createElement(c.Ah,{name:"caret-right",size:"20"}))))}ViewPostingPermissions.displayName="ViewPostingPermissions";var nE=a(0x11f596311),nC=a(0x20b26d1ea),nk=a(0x1de6a9bdc),nv=a(0x9e0b8975),nS=a(0x4f936716);let nI=new l.Ay("sc_mpdm_to_private_conversion");function useConvertScmpdmToPrivateDisabledText(e){let t=(0,A.d4)(e=>(0,nk.RY)(e)||(0,nv.ml)(e)),{reason:a}=(0,A.d4)(t=>(0,nS.C)(t,e));switch(a){case"restricted_action":return t?nI.t("Not every team has a member that can accept Slack Connect invites."):nI.t("You don\u2019t have permission to send Slack Connect channel invitations.");case"toggle_disabled_for_at_least_one_team":return nI.t("Not all external organizations have access to this feature.");case"at_least_one_team_disconnected":return nI.t("Conversion is unavailable when a disconnected organization is present.");case"at_least_one_team_blocked_conversions":return nI.t("Not all external organizations allow conversion.");case"workspace_conflict":return nI.t("We cannot automatically determine where this channel should be created based on the external organizations.");case"can_not_add_user_to_workspace":return nI.t("This channel would be created in a workspace not all members can join.");case"workspace_not_allowed":return nI.t("This channel would be created in a workspace that does not allow Slack Connect.");case"too_many_teams":return nI.t("This conversation can\u2019t be changed because there are too many organizations.");default:return null}}var nw=a(0x8afcb382),nT=a(0xdf55e8f3),nN=a(0x1bc4b3ad8),nM=a(0x3057e0e7);let nR=new l.Ay("channel_details"),nP=(0,nT.eI)((e,{workspaceIds:t})=>t.map(t=>(0,B._J)(e,t))),nL=(0,nN.F)(nP,e=>e.filter(e=>!!e&&!(0,eN.Zx)(e)));function useWorkspacePickerOptions({channel:e}){let t=(0,i.wA)(),a=e.id,[n,l]=(0,r.useState)(!1),[o,s]=(0,r.useState)([]),[c,d]=(0,r.useState)({}),[m,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[_,f]=(0,r.useState)(!1),[b,g]=(0,r.useState)(""),y=(0,A.d4)(er.Kc),x=(0,A.d4)(e=>(0,B._J)(e,y)),E=(0,A.d4)(e=>nL(e,{workspaceIds:o})),C=useConvertScmpdmToPrivateDisabledText(e.id),k=(0,r.useCallback)(e=>{switch(e){case"missing_members":return nR.t("Not everyone\u2019s in this workspace");case"slack_connect_disabled":return nR.t("Slack Connect is disabled");case"no_permission":return nR.t("You can\u2019t create private channels");default:return nR.t("Something went wrong")}},[]),v=(0,eL.L)({fetcher:nw.sG,args:{reason:"mpim-to-private-channel-modal",channelId:a},skip:!(0,eV.yz)(e)});return(0,r.useEffect)(()=>{if(v.loading)l(!0);else if(v.error)l(!1),t((0,nM.l)({channelId:a}));else if(v.data){l(!1);let{can_convert:n,eligible:r,ineligible:i,reason:o}=v.data,c=[...r],m={};(i.forEach(e=>{c.push(e.id),m[e.id]={reasonForDisable:k(e.reason)}}),!n)&&(f(!0),g((0,O.ju)(e)?C??"":0===r.length?nR.t("Admin settings restrict this channel from being converted to a channel."):""));n&&1===r.length&&h(!0),n&&(0,z.A)(r)&&y&&(c.push(y),m[y]={customLabel:nR.t("All {workspaceName} workspaces",{workspaceName:x?.name??""}),reasonForDisable:"default-to-org-wide-channel"},u(!0)),s(c),d(m),t((0,nM.G)({channelId:a,eligibility:{canConvert:n,...o&&{reason:o}}}))}},[v.data,v.loading,v.error,k,y,x?.name,t,a,C,e]),{workspaces:E,workspaceMetadata:c,isWorkspacePickerOptionsLoading:n,isDefaultToOrgWideChannel:m,shouldDisableMpdmToPrivateConversion:_,mpdmToPrivateConversionDisabledText:b,isOnlyOneEligibleWorkspace:p}}var nO=a(0xd1cb3630),nD=a(0x1c8f352ff),nF=a(0x48009e38),nU=a(0x2120d7f64),nB=a(0x204000df3);let nH=new l.Ay("recordchannels");function BaseRecordUnlinkModal({id:e}){let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,E.O)()),[t]),{speedBumpState:n,closeSpeedBump:l,openSpeedBump:o}=(0,nU.v)(),s=(0,A.d4)(t=>(0,U.OL)(t,e)),c=(0,A.d4)(e=>(0,eF.PQ)(e,(0,eI.iJ)(s),!0)),d=(0,A.d4)(er.JY),m=(0,A.d4)(e=>(0,b.SB)(e,s,{publicChannelIncludeHashSign:!1})||""),u=(0,r.useMemo)(()=>(0,eV.Zp)(s),[s]),h=(0,r.useRef)((0,nB._s)(c)?c.name:m),_=(0,r.useRef)((0,eI.jT)(s));(0,nB._s)(c)&&(h.current=c.name);let[f,g]=(0,r.useState)(!1),[x,C]=(0,r.useState)(""),[k,v]=(0,r.useState)(nD.gi),S=(0,r.useCallback)(e=>{C(e),v(nD.gi)},[]),I=(0,r.useCallback)(e=>{v(e)},[]),w=(0,r.useCallback)(e=>{v((e=>{let t=nD.gi;switch(e.name){case"invalid_name_specials":t={...nD.gi,hasSpecialsWarning:!0};break;case"invalid_name_punctuation":t={...nD.gi,hasPunctuationWarning:!0};break;case"name_taken":t={...nD.gi,hasNameTakenWarning:!0};break;case"invalid_name_maxlength":t={...nD.gi,hasMaxLengthWarning:!0};break;case"invalid_name_required":t={...nD.gi,hasNameRequiredWarning:!0};break;default:t={...nD.gi,hasUnknownWarning:!0}}return t})(e))},[]),T=(0,r.useMemo)(()=>k.hasNameRequiredWarning||k.hasMaxLengthWarning||k.hasSpecialsWarning||k.hasPunctuationWarning||k.hasNameTakenWarning||k.hasUnknownWarning,[k]),N=(0,r.useCallback)(async()=>{g(!0);try{await t((0,nF.a)({channel:s.id,newName:x,reason:"record-channels-unlink"})),d&&((0,nB.D1)(d,[c.id]),(0,nB.ez)(d,c.id)),a()}catch(e){w(e instanceof Error?e:Error(String(e))),g(!1),l()}},[s.id,x,l,t,a,w,c.id,d]),M=(0,r.useMemo)(()=>r.createElement("div",{className:"margin_bottom_150"},nH.rt("{recordName} will no longer be connected to this channel.",{recordName:h.current})),[h]),R=(0,r.useCallback)(()=>{o({heading:M,continueButtonLabel:nH.t("Disconnect"),cancelButtonLabel:nH.t("Cancel"),onCancel:l,onContinue:N,message:null})},[l,N,o,M]);return r.createElement(y.dW,{isOpen:!0,closeModal:a,fullscreen:!1,labelledby:"record-unlink-modal-title-bar"},r.createElement(y.rQ,null,r.createElement(y.Rc,{id:"record-unlink-modal-title-bar",title:nH.t("Disconnect this channel from Salesforce")})),r.createElement(y.$m,null,k.hasUnknownWarning&&r.createElement(y.qf,null,r.createElement(p.Ay,{level:"error",className:"margin_bottom_100"},nH.t("Something went wrong on our end and we couldn\u2019t disconnect the record. Try again in a few minutes."))),r.createElement(y.qf,null,(0,nB.Eh)(c)?r.createElement(eC.A,null):r.createElement(r.Fragment,null,r.createElement("p",null,nH.rt("When you do this, the channel won\u2019t have Salesforce data from the {recordName} {recordLabel}, but the messages, channel members and other content will stay. You\u2019ll also need a new channel name.",{recordLabel:_.current?.toLocaleLowerCase(),recordName:h.current})),r.createElement("label",{htmlFor:"record_unlink_rename_channel_input",className:"c-label"},r.createElement("span",{className:"c-label__text"},nH.t("Channel Name"))),r.createElement(nO.A,{id:"record_unlink_rename_channel_input",name:"record_unlink_rename_channel_input",channelName:x,channelNameErrors:k,onChannelNameChange:S,onChannelValidationChange:I,isPrivate:u,showChannelPrefixes:!1,customErrorMessage:null,useInlineAlert:!0,disableHintText:!0,suppressInlineError:k.hasUnknownWarning,teamId:d})))),r.createElement(y.jl,null,n.isVisible&&r.createElement(y.ty,{...n,continueButtonIsLoading:f,description:null}),r.createElement(y.ox,null,r.createElement(y.s_,{type:"outline","aria-label":nH.t("Cancel")},nH.t("Cancel")),r.createElement(y.s_,{onClick:R,disabled:""===x||x===m||T,"aria-label":nH.t("Disconnect")},nH.t("Disconnect")))))}BaseRecordUnlinkModal.displayName="BaseRecordUnlinkModal";let nW=(0,k.e)(r.memo(BaseRecordUnlinkModal));var nV=a(0x1f666c8e1),nG=a(0x46b7272d),nq=a(0x15bd30d90),nj=a(0x1f4ce396),nz=a(0x190247ff2);let nK=new l.Ay("channel_details"),n$={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_POSTING_PERMISSIONS},nY={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_HUDDLES_PERMISSIONS},nQ={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_MESSAGE_RETENTION},nZ={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CONVERT_TO_PRIVATE},nJ={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CONVERT_SCMPDM_TO_PRIVATE},nX={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CONVERT_TO_PUBLIC},n0={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_CHANGE_LIMITED_ACCESS_GROUP},n1={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_EXPORT_HISTORY},n2={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_UNARCHIVE},n4={uiStep:D.UiStep.CHANNEL_DETAILS_EDIT_DELETE},n5={uiStep:D.UiStep.CHANNEL_DETAILS_RECORD_CHANNEL_UNLINK},AdminChannelModal=({id:e,channel:t,isMpim:a,isPublicChannel:n,isPrivateChannel:l,onClose:m,showArchive:u,showUnarchive:p,showChangeLimitedAccessGroup:h,showConvertChannelToPrivate:f,showConvertMpimToPrivate:b,showConvertChannelToPublic:g,showExport:y,showDelete:x,showDataRetention:E,showChannelPermissions:C,showPostingPermissions:k,showHuddlesPermissions:v,showUnlinkRecordChannel:I,isArchiveDisabled:w,isDeleteDisabled:N,isChannelPermissionsDisabled:M,isHuddlesPermissionsDisabled:R,isPostingPermissionsDisabled:P,isConvertToPublicDisabled:D,settingsSections:F,isHostedByAnotherTeamAndPrivate:U,canUserCreatePublicFromPrivateChannel:B,conversationHostId:H,isConvertPrivateToPublicSlackConnectVisualUpdateEnabled:W,isMemberExternalLimited:j,isRecordChannel:z})=>{let K=(0,i.wA)(),$=(0,A.d4)(nz.RN),Y=(0,A.d4)(T.uO),Q=(0,A.d4)(e=>(0,nb.G2)(e,"slack_ai_exclude_from_slack_ai_property__access")),Z=(0,A.d4)(e=>(0,t_.x)(e,"slack_ai_huddles_automatic_notes_opt_out")),J=(0,A.d4)(tV.J0),X=(0,A.d4)(eS.Sl),{workspaces:ee,workspaceMetadata:et,isWorkspacePickerOptionsLoading:ea,shouldDisableMpdmToPrivateConversion:en,mpdmToPrivateConversionDisabledText:er,isDefaultToOrgWideChannel:ei,isOnlyOneEligibleWorkspace:el}=useWorkspacePickerOptions({channel:t}),eo=(0,r.useCallback)(()=>{K(ni({id:e,openModalProps:{isStackable:!0}}))},[K,e]),es=(0,r.useCallback)(()=>{K(aa({id:e,openModalProps:{isStackable:!0}}))},[K,e]),ec=(0,r.useCallback)(()=>{K(ax({id:e,openModalProps:{isStackable:!0}}))},[K,e]),ed=(0,r.useCallback)(()=>{K(tv({id:e,onSubmit:()=>{m?.({closeAll:!0})},openModalProps:{isStackable:!0}}))},[K,e,m]),em=(0,r.useCallback)(()=>{K(tR({id:e,openModalProps:{isStackable:!0}}))},[K,e]),eu=(0,r.useCallback)(()=>{K((0,eH.A)({id:e,openModalProps:{isStackable:!0}}))},[K,e]),ep=(0,r.useCallback)(()=>{K(eB({id:e,openModalProps:{isStackable:!0}}))},[K,e]),eh=(0,r.useCallback)(()=>{K(eQ({id:e,openModalProps:{isStackable:!0}}))},[K,e]),e_=(0,r.useCallback)(()=>{let a=(0,eI.cM)(t);K((0,G.P)({id:e,minimumAccessLevel:a,openModalProps:{isStackable:!0}}))},[K,t,e]),ef=(0,r.useCallback)(()=>{K(to({id:e,workspacePickerOptions:ee,workspacePickerMetadata:et,isWorkspacePickerOptionsLoading:ea,isDefaultToOrgWideChannel:ei,isOnlyOneEligibleWorkspace:el}))},[K,e,el,ei,ea,et,ee]),eb=(0,r.useCallback)(()=>{K((0,eG.YD)({channelId:e})).then(()=>{m?.()})},[K,m,e]),eg=(0,r.useCallback)(()=>{K(nW({id:t.id}))},[t.id,K]),ey=(0,r.useCallback)(e=>{e.preventDefault(),K((0,nE.A)({id:t.id,openModalProps:{isStackable:!0}}))},[K,t]),stopOpeningModalIfLearnMoreLink=e=>{e.stopPropagation()},getDisabledTextPrivateToPublic=()=>{if(!W||!D)return null;switch(!0){case U:case j:return W?nK.rt("This channel can\u2019t be public because {homeOrgName} set it to private.",{homeOrgName:r.createElement(d.A,{id:H,bold:!1})}):null;case!B:return W?nK.rt("You don\u2019t have permission to change this channel to public"):null;default:return null}};getDisabledTextPrivateToPublic.displayName="getDisabledTextPrivateToPublic";let eA=(0,r.useMemo)(()=>f&&n?z?r.createElement(L.A,{ariaLabel:nK.t("Change channel access to limited"),onClick:ep,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"lock-o"}),title:nK.t("Change channel access to limited"),autoClogProps:nZ}):r.createElement(L.A,{ariaLabel:nK.t("Change to a private channel"),onClick:eu,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"lock-o"}),title:nK.t("Change to a private channel"),autoClogProps:nZ}):null,[n,z,ep,eu,f]),ex=r.Children.toArray(F.map(n=>{switch(n){case tL.U.Rename:return r.createElement(tP.A,null,r.createElement(q.A,{channel:t}));case tL.U.Connected:return r.createElement(tP.A,null,r.createElement(eE.Vz,{id:e}));case tL.U.NotConnected:return r.createElement(tP.A,null,r.createElement(aG,{channel:t}));case tL.U.CopyMembers:return r.createElement(tP.A,null,r.createElement(CopyMembers,{id:e}));case tL.U.TabPermissions:return r.createElement(ai.P,{channelId:e});case tL.U.Permissions:return $?r.createElement(r.Fragment,null,k&&r.createElement(tP.A,null,r.createElement(ViewPostingPermissions,{id:e,channel:t,isDisabled:P})),r.createElement(tP.A,null,Y&&Q&&r.createElement(AiExclusionsField,{channel:t}),v&&r.createElement(r.Fragment,null,r.createElement(S.A,{ariaLabel:nK.t("Huddles"),disabledText:nK.t("You don\u2019t have permission to change this setting for this channel"),isDisabled:R,onClick:es,text:r.createElement("span",null,r.createElement(ar,{id:e}),nK.rt("<link>Learn more</link>",{"<link>":({text:e})=>r.createElement(_.A,{onClick:stopOpeningModalIfLearnMoreLink,articleId:0x400ef29f493},e)})),title:r.createElement("div",{className:"display_flex"},nK.t("Huddles")," "),autoClogProps:nY,channel:t,content:r.createElement(HuddlesLinkCTAs,{channel:t,onClose:m})}),J&&!Z&&r.createElement(ChannelSettingsHuddleAiNotesSection,{channelId:e})),E&&r.createElement(S.A,{ariaLabel:nK.t("Edit message history"),onClick:ec,title:nK.t("Message history"),text:r.createElement(aC,{id:e}),autoClogProps:nQ,channel:t}))):r.createElement(tP.A,null,k&&r.createElement(S.A,{ariaLabel:nK.t("Edit posting permissions"),dataQa:"channel-posting-permissions",isDisabled:P,onClick:eo,text:r.createElement(nc,{id:e}),title:nK.t("Posting permissions"),autoClogProps:n$,channel:t}),Y&&Q&&r.createElement(AiExclusionsField,{channel:t}),v&&r.createElement(r.Fragment,null,r.createElement(S.A,{ariaLabel:nK.t("Huddles"),disabledText:nK.t("You don\u2019t have permission to change this setting for this channel"),isDisabled:R,onClick:es,text:r.createElement("span",null,r.createElement(ar,{id:e}),nK.rt("<link>Learn more</link>",{"<link>":({text:e})=>r.createElement(_.A,{onClick:stopOpeningModalIfLearnMoreLink,articleId:0x400ef29f493},e)})),title:r.createElement("div",{className:"display_flex"},nK.t("Huddles")," "),autoClogProps:nY,channel:t,content:r.createElement(HuddlesLinkCTAs,{channel:t,onClose:m})}),J&&!Z&&r.createElement(ChannelSettingsHuddleAiNotesSection,{channelId:e})),E&&r.createElement(S.A,{ariaLabel:nK.t("Edit message history"),onClick:ec,title:nK.t("Message history"),text:r.createElement(aC,{id:e}),autoClogProps:nQ,channel:t}));case tL.U.ChannelPermissions:return C&&r.createElement(tP.A,null,r.createElement(ViewChannelPermissions,{canEditChannelPermissions:!M,channelId:e,accountType:"FULL_MEMBER"}),r.createElement(ViewChannelPermissions,{canEditChannelPermissions:!M,channelId:e,accountType:"MULTI_CHANNEL_GUEST"}));case tL.U.Export:return r.createElement(tP.A,null,y&&r.createElement(L.A,{ariaLabel:nK.t("Export message history"),dataQa:"settings__export_message_history_btn",onClick:em,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"history"}),title:nK.t("Export message history"),autoClogProps:n1}));case tL.U.ManagingThisChannel:return r.createElement(tP.A,null,eA,b&&a&&r.createElement(L.A,{dataQa:(0,O.ju)(t)?"convert-sc-mpim-to-private-btn":"convert-mpim-to-private-btn",ariaLabel:nK.t("Change to a private channel"),onClick:ef,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"lock-o"}),title:nK.t("Change to a private channel"),autoClogProps:(0,O.ju)(t)?nJ:nZ,isDisabled:en,text:en?er:null}),X&&h&&r.createElement(L.A,{dataQa:"change-limited-access-group-btn",ariaLabel:nK.t("Change limited access group"),onClick:e_,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"lock-o"}),title:nK.t("Change limited access group"),autoClogProps:n0}),g&&l&&r.createElement(L.A,{dataQa:"convert-private-to-public-btn",ariaLabel:nK.t("Change to a public channel"),isDisabled:D,onClick:eh,text:D?getDisabledTextPrivateToPublic():null,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"channel"}),title:nK.t("Change to a public channel"),autoClogProps:nX}),I&&r.createElement(L.A,{ariaLabel:nK.t("Disconnect from Salesforce record"),onClick:eg,renderTitleIcon:({className:e,inline:t})=>r.createElement("div",{className:e},r.createElement(c.Ah,{inline:t,name:"sf-cloud",size:"20"})),title:nK.t("Disconnect from Salesforce record"),autoClogProps:n5}),u&&r.createElement(V,{id:e,disabled:w,onClose:m}),p&&r.createElement(L.A,{ariaLabel:nK.t("Unarchive this channel"),onClick:eb,dataQa:"unarchive_this_channel_btn",renderTitleIcon:e=>r.createElement(o.A,{...e,type:"unarchive"}),title:nK.t("Unarchive this channel"),autoClogProps:n2}),x&&r.createElement(L.A,{ariaLabel:N?nK.t("Cannot delete channel. Please contact a workspace admin."):nK.t("Delete this channel"),isDisabled:N,onClick:ed,renderTitleIcon:e=>r.createElement(o.A,{...e,type:"trash"}),text:N&&(0,O.ju)(t)&&nK.rt("To delete this channel, first make sure it\u2019s not <t1>connected to another organization</t1>.",{"<t1>":({text:e})=>r.createElement(s.A,{href:"#",onClick:ey},e)}),title:nK.t("Delete this channel"),type:"danger",autoClogProps:n4}));default:return null}}));return r.createElement(r.Fragment,null,ex)};AdminChannelModal.displayName="AdminChannelModal";let n3=(0,F.N)((e,{id:t})=>{let a=(0,U.OL)(e,t),n=(0,nC.A)(e,t),r={showArchive:n.archive.shouldShow,showUnarchive:n.unarchive.shouldShow,showChangeLimitedAccessGroup:n.changeLimitedAccessGroup.shouldShow,showConvertChannelToPrivate:n.convertToPrivate.shouldShow,showConvertMpimToPrivate:n.convertMpimToPrivate.shouldShow,showConvertChannelToPublic:n.convertToPublic.shouldShow,showExport:n.exportHistory.shouldShow,showDelete:n.deleteChannel.shouldShow,showDataRetention:n.dataRetention.shouldShow,showChannelPermissions:n.channelPermissions.shouldShow,showPostingPermissions:n.postingPermissions.shouldShow,showHuddlesPermissions:n.huddlePermissions.shouldShow,showManageOrgAccess:n.manageOrgAccess.shouldShow,showUnlinkRecordChannel:n.unlinkRecordChannel.shouldShow},i={isArchiveDisabled:n.archive.disabled,isDeleteDisabled:n.deleteChannel.disabled,isManageOrgAccessDisabled:n.manageOrgAccess.disabled,isHuddlesPermissionsDisabled:n.huddlePermissions.disabled,isPostingPermissionsDisabled:n.postingPermissions.disabled,isChannelPermissionsDisabled:n.channelPermissions.disabled,isConvertToPublicDisabled:n.convertToPublic.disabled};return{channel:a,isMpim:(0,eV.yz)(a),isImOrMpim:(0,eV.JM)(a),isPublicChannel:(0,eV.rW)(a),settingsSections:(0,tL.A)(e,t),isPrivateChannel:(0,eV.Zp)(a),isHostedByAnotherTeamAndPrivate:(0,nV.I)(e,a),canUserCreatePublicFromPrivateChannel:(0,nG.YD)(e,a),conversationHostId:(0,nj.NQ)(e,a.id)??"",isConvertPrivateToPublicSlackConnectVisualUpdateEnabled:(0,nq.A)(e),isMemberExternalLimited:(0,tw.A)(e,a.id),isRecordChannel:(0,eV.rI)(a),...r,...i}})(AdminChannelModal);(0,k.e)(n3)},0x533fca9d:(e,t,a)=>{"use strict";a.d(t,{f:()=>AgentsList});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x18ee7321c),l=a(0x1a592c177),o=a(0xfbe1d6bf),s=a.n(o);let AgentItemSkeleton=()=>n.createElement("div",{className:s().listItemSkeleton},n.createElement(l.A,{showPresence:!1,showAppOrBotBadge:!0,isDeactivated:!0}));AgentItemSkeleton.displayName="AgentItemSkeleton";var c=a(0x120c268ad),d=a.n(c),m=a(0xf27817c9),u=a(0x11243fb75),p=a(0x344bb842),h=a(0x99233ecb),_=a(0x4c96e5d9),f=a(0x1fdec3e16),b=a(0x313f5ddb),g=a(0x151a93a75),y=a(0x7fae732f),A=a(0x1b9d5cc0c),x=a(0x2434bed34),E=a(0xa1832ae4),C=a(0xa5d7d903),k=a(0x115687abb),v=a(0x226892387),S=a(0x217553e42),I=a(0x14149c126),w=a(0x1ee439e69),T=a(0x156422bf),N=a.n(T);let M=new r.Ay("channel_details"),R={name:"ellipsis-vertical-filled"},P={name:"plus"},AgentItem=({channelId:e,onAddAgent:t,onRemoveAgent:a,onEditAgent:r,agent:i,showSecondaryContent:o,isDisabled:s=!1,isDisabledReason:c,isHovered:d,isSelected:m})=>{let u=(0,v.d4)(t=>(0,S.OL)(t,e)),T=(0,v.d4)(e=>(0,y.n)(e,u)),L=(0,v.d4)(e=>(0,w._J)(e,T)),O=(0,v.d4)(t=>!!e&&(0,C.C)(t,e)),D=(0,v.d4)(t=>!!e&&!!i.appMember&&(0,k.I)(t,e,i.appMember)),F=(0,A.K6)(i.appMember),U=(0,E.F1)(L),B=(0,x.h)(i.appMember),H=(0,b.js)({appProfile:i.appProfile,disabledReason:c,teamDisplayName:U,isNativeChannelExpert:B}),W=(0,v.d4)(e=>!!i.appProfile&&(0,g.H7)(e,i.appProfile)),V=(0,v.d4)(e=>(0,b.TB)(e,u)),G=(0,v.d4)(e=>(0,b.bG)(e,u)),q=(0,v.d4)(e=>"on"===(0,I._Z)(e,"channel_agent_use_status_on_fe")),j=(0,n.useCallback)(()=>{t?.({agent:i})},[i,t]),z=(0,n.useCallback)(()=>{a?.({agent:i})},[i,a]),K=(0,n.useCallback)(()=>{r?.({agent:i})},[i,r]),$=(0,n.useMemo)(()=>W?O:!!B&&(q?G:V||O),[O,V,W,B,G,q]),Y=D||B&&G,Q=(0,n.useCallback)(e=>{let t=$&&Y;return n.createElement(h.Ay,e,$?n.createElement(h.Dr,{label:M.t("Edit agent settings"),onSelected:K}):null,t?n.createElement(h.bX,null):null,Y?n.createElement(h.Dr,{label:M.t("Remove from channel"),onSelected:z,danger:!0,"data-qa":"remove-member-menu-item"}):null)},[$,K,Y,z]),Z=(0,n.useMemo)(()=>{let e=H;return d&&W&&!O&&(e=M.t("Only channel managers and Slack admins can edit or remove this agent.")),n.createElement("span",{className:N().subtext},n.createElement(f.A,{lines:1,withTooltip:!s,breakWords:!1},e))},[O,H,W,s,d]),J=(0,n.useCallback)(()=>{if(o){if(i.isChannelMember&&($||Y))return n.createElement(h.cQ,{renderMenu:Q,position:"bottom-right"},n.createElement(p.A,{svgIconProps:R,"aria-label":M.t("More options")}));if(!i.isChannelMember&&t){let e=M.t("Add to channel");return n.createElement(_.Ay,{tip:e,position:"top"},n.createElement(p.A,{svgIconProps:P,"aria-label":e,onClick:j}))}return null}},[i.isChannelMember,Y,$,t,j,Q,o]);return n.createElement(l.A,{subtext:Z,showPresence:!1,id:F,showAppOrBotBadge:!0,secondaryContent:J(),isDisabled:s,isDeactivated:s,showDisabledText:i.showDisabledText,isActive:m})};AgentItem.displayName="AgentItem";var L=a(0x21d85d6e5),O=a(0xe684f705);let AgentListItem=({channelId:e,botUserId:t,item:a,onItemClick:r,onAddAgent:i,onRemoveAgent:l,onEditAgent:o,selectedAgentBotUserId:c})=>{let p=(0,v.d4)(e=>(0,O.nv)(e,t)),h=(0,v.d4)(t=>(0,S.OL)(t,e)),_=(0,v.d4)(e=>(0,L.sE)(e,p,!1,!1)),f=(0,v.d4)(e=>(0,y.n)(e,h)),g=(0,v.d4)(e=>(0,w._J)(e,f)),A=(0,E.F1)(g),C=(0,x.h)(a.agent.appMember),k=(0,b.js)({appProfile:a.agent.appProfile,disabledReason:a.isDisabledReason,teamDisplayName:A,isNativeChannelExpert:C}),I=`${_}, ${k}`,T=(0,n.useMemo)(()=>{if(r)return()=>r({agent:a.agent})},[a.agent,r]);return n.createElement(m.A,null,({isHovered:r,hoverProps:m,ref:p})=>n.createElement(u.A,{"aria-label":I,id:a.id,className:d()(s().listItem,{[s().listItemHover]:!!T}),onClick:T,onMouseEnter:m.onMouseEnter,onMouseLeave:m.onMouseLeave,onFocus:m.onFocus,onBlur:m.onBlur,ref:p},n.createElement(AgentItem,{agent:a.agent,channelId:e,onAddAgent:i,onRemoveAgent:l,onEditAgent:o,showSecondaryContent:a.showSecondaryContent,isDisabled:a.isDisabled,isDisabledReason:a.isDisabledReason,isHovered:r,isSelected:c===t})))};AgentListItem.displayName="AgentListItem";let D=new r.Ay("channel_tabs"),AgentsList=({agents:e,channelId:t,onItemClick:a,onAddAgent:r,onRemoveAgent:l,onEditAgent:o,isLoading:c=!1,className:d,selectedAgentBotUserId:m,skeletonCount:u=3,ariaLabel:p})=>{let h=p||D.t("Agents",{ns:"agents"}),_=(0,n.useCallback)(e=>{let i=e.agent.appRef.bot_user_id,s=e.agent.isDisabled||e.agent.isChannelMember;return n.createElement(AgentListItem,{key:e.id,channelId:t,botUserId:i,item:e,onItemClick:e.agent.isDisabled?void 0:a,onAddAgent:s?void 0:r,onRemoveAgent:l,onEditAgent:o,selectedAgentBotUserId:m})},[t,r,o,a,l,m]);if(c)return n.createElement("div",{className:d||s().list},[...Array(u)].map((e,t)=>n.createElement("div",{className:s().listItem,key:t},n.createElement(AgentItemSkeleton,null))));if(!e||0===e.length)return null;let f=e.map(e=>({id:e.appRef.bot_user_id,agent:e,isDisabled:e.isDisabled,isDisabledReason:e.isDisabledReason,showSecondaryContent:!e.isDisabled}));return n.createElement(i.A,{className:d||s().list,initialActiveItem:f?.[0]?.id,items:f,renderItem:_,"aria-label":h})};AgentsList.displayName="AgentsList"},0x1f76053e3:(e,t,a)=>{"use strict";a.d(t,{V:()=>AgentsSearch});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xfbe3141b),l=a(0x243435af9),o=a(0x226892387);let s=new r.Ay("channel_tabs"),AgentsSearch=({searchQuery:e,onSearchInputChange:t,onSearchInputReset:a,className:r})=>{let c=(0,o.d4)(l.A)?s.t("Search by agent name or description"):"Search by agent name or description";return n.createElement("div",{className:r},n.createElement(i.A,{value:e,onChange:t,onReset:a,placeholder:c,"aria-label":c,role:"searchbox",icon:"search",autoFocus:!0}))};AgentsSearch.displayName="AgentsSearch"},0x702bf97e:(e,t,a)=>{"use strict";a.r(t),a.d(t,{RemoveNativeChannelExpertModal:()=>RemoveNativeChannelExpertModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20b4dda68),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x13eedc190),c=a(0x23b496ae9),d=a(0xf225ecf2),m=a(0x1c7997c1),u=a(0x96920791),p=a(0x16d221c7f),h=a(0x142775427),_=a(0x1f803375e),f=a(0x21d85d6e5),b=a(0x226892387),g=a(0xe684f705),y=a(0x1fcbb004d);let A=new l.Ay("channel_details"),RemoveNativeChannelExpertModal=({onConfirm:e,onCancel:t})=>{let a=(0,r.wA)(),l=(0,b.d4)(e=>(0,g.nv)(e,i.jR)),x=(0,b.d4)(e=>(0,f.sE)(e,l)),E=(0,n.useCallback)(()=>{t?.(),a((0,y.O)())},[a,t]),C=(0,n.useCallback)(async()=>{await e(),a((0,y.O)())},[a,e]);return n.createElement(s.A,null,n.createElement(h.A,null,n.createElement(_.A,{title:A.t("Remove agent from channel")})),n.createElement(d.A,null,n.createElement(m.A,null,A.rt("{agentName} will no longer respond to messages in this channel. Any files added as custom sources that aren\u2019t shared anywhere else in Slack will also be removed.",{agentName:n.createElement("strong",null,x),fallbackHash:"b94b58cc2ddcc9e90bf97d19931881fbf16f18fa",fallbackHashNs:"shared"}))),n.createElement(u.A,null,n.createElement(p.A,null,n.createElement(c.A,{type:"outline","aria-label":A.t("Cancel"),onClick:E},A.t("Cancel")),n.createElement(o.$n,{type:"danger",onClick:C},A.t("Remove")))))};RemoveNativeChannelExpertModal.displayName="RemoveNativeChannelExpertModal"},0xf2441d19:(e,t,a)=>{"use strict";a.d(t,{S:()=>useAgentActions});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x23a67ace),o=a(0xca731f6c),s=a(0x22f808f3),c=a(0x1959a5aa8),d=a(0x24d017988),m=a(0x154933c60),u=a(0x10efa7af),p=a(0x83caec0d),h=a(0x61ff83c3),_=a(0x1b9d5cc0c),f=a(0x82980ab8),b=a(0x2434bed34),g=a(0x14cb5efef),y=a(0xa20fa9e5),A=a(0x226892387),x=a(0x1bca0c567);let E=new i.Ay("channel_tabs"),useAgentActions=({channelId:e})=>{let t=(0,r.wA)(),a=(0,A.d4)(g.wL),i=(0,A.d4)(l.fy),C=(0,n.useCallback)(async(a="load-installed-agents")=>{let{agents:n}=await t((0,h.i)({channel:e,reason:a}));if(i){let e=n.reduce((e,t)=>(t.app_profile&&t.api_app_id&&e.push((0,d.H1)({appProfile:t.app_profile,appId:t.api_app_id,includesBotData:!0,includesBotTeamData:!0})),e),[]);t((0,x.G)(e))}return n},[e,t,i]),k=(0,n.useCallback)(async(a="load-accessible-agents")=>{let{agent_apps:n}=await t((0,p.E)({channel:e,reason:a}));if(i){let e=n.map(e=>(0,d.H1)({appProfile:e,appId:e.id,includesBotData:!0,includesBotTeamData:!0}));t((0,x.G)(e))}return n},[e,t,i]),v=(0,n.useCallback)(async()=>{let{members:a}=await t((0,u.W)({query:{count:100,channels:[e],marker:void 0,filter:"apps",index:"users_by_realname"}}));return a},[e,t]),S=(0,n.useCallback)(async a=>{let n=(0,f.wg)(a),r=(0,_.K6)(a),i=(0,b.h)(r);try{i?await t((0,o.mo)(e)):await t((0,m.Cw)({channelId:e,users:r}))}catch(t){let e="This agent cannot be invited to this channel.";throw t instanceof Error&&"org_user_not_in_team"===t.name&&(e=E.t("A Slack Admin hasn\u2019t added {agentName} to this workspace yet, so it can\u2019t be added to this channel.",{agentName:n})),Error(e)}},[e,t]);return{loadAccessibleAgents:k,loadInstalledAgents:C,loadAgentChannelMembers:v,addAgentToChannel:S,removeAgentFromChannel:(0,n.useCallback)(async({memberId:a,onRemove:n})=>{if((0,b.h)(a))return new Promise((a,r)=>{t((0,o.G7)({onConfirm:async()=>{try{await t((0,o.Fp)(e)),n?.(),a()}catch(e){r(e)}},onCancel:()=>a(),isStackable:!0}))});t((0,y.A)({channelId:e,memberId:a,onRemove:n,isStackable:!0}))},[e,t]),editAgentSettings:(0,n.useCallback)(({appId:n,memberId:r}={})=>{let i=!!n&&a===n,l=(0,b.h)(r);i?t((0,s.X)({channelId:e,isNativeChannelExpert:!1})):l&&t((0,c.u)({channelId:e}))},[a,e,t])}}},0x18649cb20:(e,t,a)=>{"use strict";a.d(t,{Z:()=>useAgentSearch});var n=a(0xbad225b5),r=a(0x2286acf6c),i=a(0xd5e26907),l=a(0x151a93a75);let useAgentSearch=e=>{let[t,a]=(0,n.useState)(""),o=(0,n.useCallback)(()=>{a("")},[]),s=(0,r.A)(e=>{a(e&&e.target&&e.target.value)},100,{leading:!0}),c=(0,n.useMemo)(()=>{if(!t)return;let a=new i.Ay(t,{fuzzyJumpLimit:20});return e.map(e=>{let t=e.appProfile?(0,l.Yz)(e.appProfile):void 0,n=Math.min(a.normalizeAndScore(e.appProfile?(0,l.fj)(e.appProfile):""),a.normalizeAndScore(e.appProfile?(0,l.OK)(e.appProfile):""),a.normalizeAndScore(t?.[0]?.title||""),a.normalizeAndScore(t?.[1]?.title||""));return{agent:e,score:e.isDisabled?n:n-1}}).filter(({score:e})=>isFinite(e)).sort((e,t)=>e.score-t.score).map(({agent:e})=>e)},[e,t]);return{searchQuery:t,searchResults:c,hasSearchQuery:t.length>0,onSearchInputChange:s,onSearchInputReset:o}}},0x881e2d5a:(e,t,a)=>{"use strict";a.d(t,{q:()=>useChannelExpertState});var n=a(0x20b4dda68),r=a(0x313f5ddb),i=a(0x226892387),l=a(0x217553e42),o=a(0x14149c126),s=a(0xe684f705);let useChannelExpertState=e=>{let t=(0,i.d4)(t=>e?(0,l.OL)(t,e):void 0),a=(0,i.d4)(e=>!!t&&(0,r.TB)(e,t)),c=(0,i.d4)(e=>(0,s.nv)(e,n.jR)),d=(0,i.d4)(t=>e?(0,r.Tb)(t,e):void 0);return{canConfigureNativeChannelExpert:a,showNativeChannelExpert:(0,i.d4)(e=>"on"===(0,o._Z)(e,"channel_agent_use_status_on_fe"))?void 0!==d:a,nativeChannelExpert:c,nativeChannelExpertStatus:d}}},0xca731f6c:(e,t,a)=>{"use strict";a.d(t,{Fp:()=>m,G7:()=>c,mo:()=>d});var n=a(0xbad225b5),r=a(0x16998c9bf),i=a(0x4ae5f5cf),l=a(0x54bc7020),o=a(0x11c82607b);let s=n.lazy(()=>Promise.resolve().then(a.bind(a,0x702bf97e)).then(e=>({default:e.RemoveNativeChannelExpertModal}))),c=(0,o.Ay)("Opens remove Native Channel Expert confirmation modal",(e,t,{isStackable:a,onConfirm:r,onCancel:l})=>e((0,i.A)({element:n.createElement(s,{onConfirm:r,onCancel:l}),isStackable:a})));c.meta={name:"openRemoveNativeChannelExpertModal",key:"createThunkOpenRemoveNativeChannelExpertModal",description:"Opens remove Native Channel Expert confirmation modal"};let d=(0,o.Ay)("Enables the Native Channel Expert for a given channel",async(e,t,a)=>{try{await e((0,l.D)({channelId:a,props:JSON.stringify({is_channel_agent_enabled:!0}),reason:"enable-native-channel-expert"}))}catch(t){let e=(0,r.u1)(t);throw Error(`Failed to enable Native Channel Expert: ${e}`)}});d.meta={name:"enableNativeChannelExpert",key:"createThunkEnableNativeChannelExpert",description:"Enables the Native Channel Expert for a given channel"};let m=(0,o.Ay)("Disables the Native Channel Expert for a given channel",async(e,t,a)=>{try{await e((0,l.D)({channelId:a,props:JSON.stringify({is_channel_agent_enabled:!1}),reason:"disable-native-channel-expert"}))}catch(t){let e=(0,r.u1)(t);throw Error(`Failed to disable Native Channel Expert: ${e}`)}});m.meta={name:"disableNativeChannelExpert",key:"createThunkDisableNativeChannelExpert",description:"Disables the Native Channel Expert for a given channel"}},0x313f5ddb:(e,t,a)=>{"use strict";a.d(t,{TB:()=>canConfigureNativeChannelExpertRule,Tb:()=>y,_u:()=>isNativeChannelExpertAvailable,bG:()=>isNativeChannelExpertActive,js:()=>getAgentItemDescription,o2:()=>isChannelAgentKnowledgeSource});var n=a(0x20b4dda68),r=a(0x20482ad21),i=a(0x11d924e73),l=a(0xce04fe24),o=a(0x151a93a75),s=a(0x1ec69ee01),c=a(0x100fb9ff5),d=a(0x7fae732f),m=a(0x4b8e0952),u=a(0xa5d7d903),p=a(0x1cf0d97e1),h=a(0x9b971e7e),_=a(0x217553e42),f=a(0x14149c126),b=a(0xe684f705);let g=new r.Ay("channel_details"),isChannelAgentKnowledgeSource=e=>Object.values(l.U).some(t=>e===t),isNativeChannelExpertAvailable=e=>{let t="on"===(0,f._Z)(e,"enable_native_channel_expert"),a=(0,b.nv)(e,n.jR);return t&&(0,m.ve)(a)},canConfigureNativeChannelExpertRule=(e,t)=>{if(!isNativeChannelExpertAvailable(e))return!1;let a="on"===(0,f._Z)(e,"native_cea_configure_without_agentforce_cea"),r=(0,u.C)(e,(0,s.FB)(t));return!!a&&!!r||(0,h.Kc)(e)!==n.kp||!(0,c.t)(t)&&("T34263EUF"===(0,d.n)(e,t)||"T5J4Q04QG"===(0,d.n)(e,t))},y=(0,p.Ay)((e,t)=>{let a=(0,_.OL)(e,t);if(a&&isNativeChannelExpertAvailable(e))return a.channel_agent_status||void 0});y.meta={name:"getNativeChannelExpertStatus",key:"createSelectorGetNativeChannelExpertStatus",description:(e,t)=>{let a=(0,_.OL)(e,t);if(a&&isNativeChannelExpertAvailable(e))return a.channel_agent_status||void 0}};let isNativeChannelExpertActive=(e,t)=>y(e,(0,s.FB)(t))===i.j.Active,getAgentItemDescription=({appProfile:e,disabledReason:t,teamDisplayName:a,isNativeChannelExpert:n=!1})=>{let r=e?(0,o.Ij)(e):void 0;switch(n&&!r&&(r=g.t("Answers questions and provides information based on content in your channel.")),t){case"is_already_in_channel":r=g.t("This agent is already in the channel");break;case"agent_deactivated":r=g.t("This agent is temporarily unavailable, but should be back online soon.");break;case"org_disconnected":r=g.t("Slack and Salesforce are disconnected.");break;case"different_workspace":r=g.t("This agent is not in the {workspace_name} workspace. Contact a Slack Admin to request they add it.",{workspace_name:a});break;case"insufficient_permissions":r=g.t("Only channel managers and Slack admins can set up this agent.");break;case"cka_not_eligible":r=g.t("Only certain people can invite this agent to channels at this time.")}return r}},0x172fd810a:(e,t,a)=>{"use strict";a.d(t,{A:()=>P});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x15f8e452a),o=a(0xbff972e0),s=a(0x2190b3693),c=a(0xc66ee342),d=a(0xf4930165),m=a(0xe8e28706),u=a(0x243435af9),p=a(0x15f4f83cf),h=a(0x151a93a75),_=a(0x280afe13),f=a(0x4cdbb756),b=a(0x49e911f4),g=a(0x11bab834e),y=a(0x21d99e321),A=a(0x5dd1c0f2),x=a(0x18476a827),E=a(0x217553e42),C=a(0xe684f705),k=a(0x1ee439e69);function getAppActions(e,t){let a=(0,E.OL)(e,t);if(!e||!a)return null;let n=(0,y.T)(e),r=(0,_.e)(a),i=(0,C.nv)(e,r),l=(0,f.A)(e,i),o=(0,k.H7)(e),s=(0,x.AF)(e,l),c=n?(0,A.sO)(e,{appId:s?s.app_id:void 0,memberId:r,serviceId:l||void 0}):(0,g.G2)(e,{serviceId:l||void 0,memberId:r,appId:s?s.app_id:void 0});if((0,p.mX)(c)||!(0,p.uz)(c))return null;let v=(0,h.zq)(c),S=(0,h.Ov)(c),I=(0,h.KH)(c),w=(0,u.mr)(e),T=(0,m.UH)(e,(0,h.R7)(c)),N=v!==o.id,M=!I||N||(0,b.sV)(e),R=(0,h.xb)(e,c),P=(0,h.Bl)(e,c),L=(0,h.JE)(e,c),O=!!(0,h._V)(e,c),D=""!==r;return(0,d.A)({addApp:!M&&!(w&&T),viewFiles:!M,settings:R,homepage:P,viewInAppDirectory:L,support:O,slackSupport:!O&&"slack"===S,copyMemberId:D},e=>!!e)}var v=a(0x96dd42eb),S=a(0x6e5dbd78),I=a(0x20ad372d7),w=a(0x1ef41d895),T=a(0x226892387),N=a(0x1e3eb45fd),M=a(0x19c76d181);let R=new i.Ay("channel_details");function AppContent({channelId:e,onClose:t}){let a=(0,r.wA)(),i=(0,T.d4)(t=>(0,E.OL)(t,e)),d=(0,_.e)(i),m=(0,T.d4)(e=>(0,C.nv)(e,d)),u=(0,T.d4)(t=>(0,g.GS)(t,e)),p=(0,T.d4)(M.WR),f=(0,T.d4)(v.Q),b=(0,T.d4)(N.Pt),y=m.profile?.api_app_id,A=!!u?.sidekick,x=u?.auth?.created_by===p,k=(0,T.d4)(e=>(0,h.i1)(e,u)),P=(0,T.d4)(e=>(0,h.FN)(e,u)),L=(0,T.d4)(t=>getAppActions(t,e)),O=f&&A&&y&&x,D=(0,n.useCallback)(()=>{a((0,w.A)({botUserId:d,appId:y}))},[a,d,y]);if(!L)return null;let F=(0,h.jM)(u),U=(0,h.wW)(u),B=`${k}?utm_source=in-prod&utm_medium=inprod-link_app_directory-channel_settings-click`;return n.createElement(n.Fragment,null,L.addApp&&n.createElement(c.A,null,n.createElement(s.A,{onClick:()=>{a((0,I._)({isStackable:!0,memberId:m?.id}))},renderTitleIcon:e=>n.createElement(l.A,{...e,type:"plus-thick"}),title:R.t("Add this app to a channel")})),(L.homepage||L.viewInAppDirectory||L.support)&&n.createElement(c.A,null,L.homepage&&n.createElement(s.A,{href:F,renderTitleIcon:e=>n.createElement(l.A,{...e,type:"globe"}),title:R.t("App homepage")}),L.viewInAppDirectory&&n.createElement(s.A,{href:B,renderTitleIcon:e=>n.createElement(l.A,{...e,type:"external-link-square"}),title:R.t("View in Slack Marketplace")}),L.support&&n.createElement(s.A,{href:U,renderTitleIcon:e=>n.createElement(l.A,{...e,type:"question-circle"}),title:R.t("Support for this app")}),L.slackSupport&&n.createElement(s.A,{onClick:()=>{t?.()!==!1&&a((0,S.A)())},renderTitleIcon:e=>n.createElement(l.A,{...e,type:"question-circle"}),title:R.t("Support for this app")})),L.settings&&n.createElement(c.A,null,n.createElement(s.A,{href:P,renderTitleIcon:e=>n.createElement(l.A,{...e,type:"cog-o"}),title:R.t("Configuration")}),O&&n.createElement(s.A,{onClick:D,renderTitleIcon:e=>n.createElement(l.A,{...e,type:"pencil"}),title:b?R.t("Edit Sidekick"):"Edit Sidekick"})),L.copyMemberId&&n.createElement(o.A,{copyText:d,copyTooltip:R.t("Copy member id")},R.t("Member ID: {memberId}",{memberId:d})))}AppContent.displayName="AppContent";let P=AppContent},0x232552309:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x77727995),l=a(0x20482ad21),o=a(0x2b7f0bcc),s=a(0x21fdf6695),c=a(0x154933c60),d=a(0x12185e091),m=a(0x143fb6398),u=a(0x190a9df19),p=a(0x20e80190e),h=a(0x1c91944c9),_=a(0x217553e42);let f=new l.Ay("channel_details"),ArchiveChannelModalContents=({channel:e,id:t,closeModal:a,onSubmit:l,andLeave:d=!1,channelType:u,currentMemberIsAdmin:h,next:_})=>{let b=(0,r.wA)(),[g,y]=(0,n.useState)(!1),[A,x]=(0,n.useState)("");if(!e)return null;let renderContent=()=>n.createElement(n.Fragment,null,n.createElement("p",{className:"margin_bottom_0"},f.t("When you archive a channel, it\u2019s archived for everyone. That means\u2026")),n.createElement("ul",null,n.createElement("li",null,f.t("No one will be able to send messages to the channel")),n.createElement("li",null,f.t("Any apps installed in the channel will be disabled")),n.createElement("li",null,f.t("If there are external people in this channel, they will be removed. They\u2019ll still have access to the chat history."))),n.createElement("p",null,f.t("You\u2019ll still be able to find the channel\u2019s contents via search. And you can always unarchive the channel in the future, if you\u2019d like.")),A&&n.createElement(o.Ay,{className:"margin_top_100 margin_bottom_0",level:o.A_.error},(()=>{switch(A){case"last_ra_channel":return h?f.t("Sorry, you can\u2019t archive this channel because it is the only channel one of the guest account members belongs to. If you first disable the guest account, you will then be able to archive the channel."):f.t("Sorry, you can\u2019t archive this channel because it is the only channel one of the guest account members belongs to.");case"restricted_action":case"user_is_restricted":if(d)return f.t("Since you\u2019re the last one here, you\u2019ll need to invite an admin and ask them to archive the channel.");if("private"===u)return f.t("You don\u2019t have permission to archive private channels. Talk to your Workspace Owner.");return f.t("You don\u2019t have permission to archive channels. Talk to your Workspace Owner.");case"already_archived":return f.t("This channel was already archived.");case"cant_archive_general":return f.t("This channel cannot be archived.");default:return f.t("Archiving failed with error: {error}",{error:A})}})()));return renderContent.displayName="renderContent",n.createElement(n.Fragment,null,n.createElement(p.$m,null,n.createElement(p.qf,null,renderContent())),n.createElement(p.jl,null,n.createElement(p.ox,null,n.createElement(p.s_,{onClick:a,type:"outline","data-qa":"archive_modal_cancel","aria-label":f.t("Cancel")},f.t("Cancel")),n.createElement(p.s_,{type:"danger",onClick:()=>{y(!0),b((0,c.TZ)({channelId:t})).then(async()=>{(0,m.ju)(e)?b((0,s.a)({channel:e})):_?(await l(),_()):(a(),l())}).catch(e=>{x(e&&((0,i.A)(e,"data.error")||e.message)||"Unknown error"),y(!1)})},loading:g,"data-qa":"archive_modal_go","aria-label":f.t("Archive Channel")},f.t("Archive Channel")))))};ArchiveChannelModalContents.displayName="ArchiveChannelModalContents";let b=(0,h.N)((e,{id:t})=>{let a=(0,_.OL)(e,t);return{channel:a,channelType:(0,d.mz)(a),currentMemberIsAdmin:(0,u.Zo)(e)}})(ArchiveChannelModalContents)},0x21fdf6695:(e,t,a)=>{"use strict";a.d(t,{a:()=>b});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x10bae7b36),o=a(0x247cf31a2),s=a(0x1a02c72b5),c=a(0xd6a16321),d=a(0xd843ab47),m=a(0x11c82607b),u=a(0x226892387),p=a(0x15e55b5ca),h=a(0x1fcbb004d),_=a(0x46dbff89);let f=new i.Ay("channel_details"),ArchiveChannelModalDisconnectConfirmation=({channel:e})=>{let t=(0,r.wA)(),{getSiblingView:a}=(0,n.useContext)(d.A),i=(0,u.d4)(e=>(0,p.EI)(e,{getSiblingView:a})),m=(0,n.useCallback)(()=>{t((0,s.o)((0,c.pr)(i))),t((0,h.O)({closeAll:!0}))},[t,i]);return n.createElement(l.A,{title:f.rt("You archived {channelName}",{channelName:n.createElement(o.A,{channel:e})}),submitButtonText:f.t("Got It"),showCancelButton:!1,onSubmit:m,onClose:m,"data-qa":"archive_disconnect"},f.rt("Depending on the number of people and organizations in the channel, it may take a while to fully process. But it\u2019s happening, we promise."))};ArchiveChannelModalDisconnectConfirmation.displayName="ArchiveChannelModalDisconnectConfirmation";let b=(0,m.Ay)("Opens the confirmation modal when you archive a shared channel",(e,t,a)=>{e((0,_.q)({element:n.createElement(ArchiveChannelModalDisconnectConfirmation,a),name:"archive-channel-modal-disconnect-confirmation"}))});b.meta={name:"openArchiveChannelModalDisconnectConfirmation",key:"createThunkOpenArchiveChannelModalDisconnectConfirmation",description:"Opens the confirmation modal when you archive a shared channel"}},0x23749e176:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>h});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x232552309),o=a(0x170d12617),s=a(0x1fef2be00),c=a(0x20e80190e),d=a(0x226892387),m=a(0x1fcbb004d),u=a(0x11eae4d05);let p=new i.Ay("channel_details"),ArchiveChannelModal=({id:e,onSubmit:t})=>{let a=(0,r.wA)(),i=(0,n.useCallback)(()=>a((0,m.O)()),[a]);if((0,d.d4)(s.g))return n.createElement(o.p,{cleanUpType:o.G.ARCHIVE,channelId:e});let u=p.t("Archive this channel?"),h=t??(()=>{a((0,m.O)({closeAll:!0}))});return n.createElement(c.dW,{closeModal:i,"data-qa":"archive_modal"},n.createElement(c.rQ,null,n.createElement(c.Rc,{title:u})),n.createElement(l.A,{id:e,closeModal:i,onSubmit:h}))};ArchiveChannelModal.displayName="ArchiveChannelModal";let h=(0,u.e)(ArchiveChannelModal)},0xc942f844:(e,t,a)=>{"use strict";a.d(t,{D:()=>ChangeLimitedAccessGroupModal,P:()=>y});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x11a296110),s=a(0x1d2cd7755),c=a(0x159582345),d=a(0x15d9bc40c),m=a(0x1be9380c8),u=a(0x70b3ffcd),p=a(0x20e80190e),h=a(0x226892387),_=a(0x1fcbb004d),f=a(0x11eae4d05),b=a(0x121029398);let g=new i.Ay("channel_details"),ChangeLimitedAccessGroupModal=({id:e,minimumAccessLevel:t,showToast:a})=>{let i=(0,r.wA)(),f=(0,h.d4)(m.Sl),[y,A]=(0,n.useState)(t||u.z.Read),[x,E]=(0,n.useState)(!1),[C,k]=(0,n.useState)(null),v=(0,n.useCallback)(()=>i((0,_.O)()),[i]),S=f?g.t("Change limited access group"):"",I=(0,n.useCallback)(()=>{y&&(E(!0),k(null),i((0,b._V)({channelId:e,minimumAccessLevel:y})).then(()=>{E(!1),a?.({action:d.MF.change_limited_access_group}),v()}).catch(e=>{E(!1),k(e?.message)}))},[y,e,i,a,v]);return n.createElement(p.dW,{closeModal:v},n.createElement(p.rQ,null,n.createElement(p.Rc,{title:S})),n.createElement(p.$m,null,n.createElement(p.qf,null,C&&n.createElement("div",{className:"margin_bottom_100"},n.createElement(l.Ay,{level:"error"},g.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists."))," "),n.createElement("div",{className:"margin_bottom_100"},n.createElement(s.A,{text:f?g.t("Choose limited group"):"","aria-label":f?g.t("Choose limited group"):""},n.createElement(c.Z,{minimumAccessLevel:y,onLimitedAccessGroupChange:A}))))),n.createElement(p.jl,null,n.createElement(p.ox,null,n.createElement(o.Ay,{type:"outline",onClick:v,"aria-label":g.t("Cancel")},g.t("Cancel")),n.createElement(o.lV,{type:"primary",onClick:I,loading:x,disabled:!y||y===t||x,"aria-label":f?g.t("Change Limited Group"):""},f?g.t("Change Limited Group"):""))))};ChangeLimitedAccessGroupModal.displayName="ChangeLimitedAccessGroupModal";let y=(0,f.e)(ChangeLimitedAccessGroupModal)},0x1f1d4d631:(e,t,a)=>{"use strict";a.d(t,{t:()=>ChannelExpertSourceFile});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x20482ad21),o=a(0x344bb842),s=a(0x4c96e5d9),c=a(0x112d5d28c),d=a(0x22f5cc45d),m=a(0xa5d7d903),u=a(0x22fb75fe3),p=a(0x226892387),h=a(0x46dbff89);let _=new l.Ay("channel_details"),f={name:"trash"},ChannelExpertSourceFile=({className:e,channelId:t,bookmark:a,params:l,onItemRemoved:b,canRemove:g})=>{let y=(0,r.wA)(),A=(0,p.d4)(e=>(0,m.C)(e,t)),x=g??A,E=_.t("Remove from folder"),C=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),y((0,h.q)({element:n.createElement(c.A,{bookmark:a,onClose:i.A,fromChannelFolder:!0,channelId:t,onRemove:b}),isStackable:!0}))},[a,t,y,b]),k=(0,n.useMemo)(()=>n.createElement(s.Ay,{tip:E},n.createElement(o.A,{"aria-label":E,svgIconProps:f,disabled:!x,onClick:C})),[C,E,x]);return a.type===u.x.FILE?n.createElement(d.A,{fileId:a.entityId,channelId:a.channelId,className:e,bookmark:a,showActions:!1,secondaryContent:k,containerHasFocus:l.hasFocus,useListStyling:!0,forceClickStyles:!0}):null};ChannelExpertSourceFile.displayName="ChannelExpertSourceFile"},0x22f808f3:(e,t,a)=>{"use strict";a.d(t,{X:()=>tr});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x16998c9bf),s=a(0x20482ad21),c=a(0xce378727),d=a(0xe7ed96ac),m=a(0x189615fa),u=a(0x4c96e5d9),p=a(0x313f5ddb),h=a(0x1d2cd7755),_=a(0x139c79d16),f=a(0xa5dbe09b),b=a(0x20e77676b),g=a(0xce04fe24);let y=new s.Ay("channel_tabs"),A="knowledge_source",ChannelExpertChooseSourcesRadioButtons=({selectedKnowledgeSource:e,onSourceChange:t})=>{let a=y.t("Only specific content you add (uploaded files, canvases or lists)"),r=y.t("Learn more about Channel Expert."),i=(0,n.useCallback)(e=>{t(e.target.value)},[t]);return n.createElement("div",null,n.createElement("p",null,y.t("Choose the sources Channel Expert will use to answer questions in this channel. You can also let people ask for more help by setting a channel where you\u2019ll manage those requests.")," ",n.createElement(b.A,{articleId:0x2881d7513013},r)),n.createElement(f.A,{legendText:y.t("Sources for agent responses")},n.createElement("div",{className:"display_flex"},n.createElement(_.A,{id:g.U.AllContent,name:A,value:g.U.AllContent,checked:e===g.U.AllContent,onChange:i}),n.createElement(h.A,{text:y.t("All channel content (messages and files)"),htmlFor:g.U.AllContent,type:"inline",cursor:"pointer"})),n.createElement("div",{className:"display_flex"},n.createElement(_.A,{id:g.U.SelectedSources,name:A,value:g.U.SelectedSources,checked:e===g.U.SelectedSources,onChange:i}),n.createElement(h.A,{text:a,htmlFor:g.U.SelectedSources,type:"inline",cursor:"pointer"}))))};ChannelExpertChooseSourcesRadioButtons.displayName="ChannelExpertChooseSourcesRadioButtons";var x=a(0x143f89715),E=a(0x2501a2cee),C=a(0x193edc1da),k=a(0x15bd59d31),v=a(0x226d2c646);let S="channel-details-agents-tab-channel-expert-config-modal",I="channel-details-agents-tab-channel-expert-create-handoff-channel-modal";var w=a(0x1df96de4c),T=a(0x13eedc190),N=a(0x23b496ae9),M=a(0xf225ecf2),R=a(0x1c7997c1),P=a(0x96920791),L=a(0x16d221c7f),O=a(0x142775427),D=a(0x1f803375e),F=a(0x15dd8a31),U=a(0x6e87d4ec),B=a(0x10d53599f),H=a(0x19dc73101),W=a(0xd1cb3630),V=a(0x28d34b36),G=a(0x20d0c1859),q=a(0x7fae732f),j=a(0x1c8f352ff),z=a(0x226892387),K=a(0x217553e42),$=a(0x1adca0c4e),Y=a(0x1fcbb004d),Q=a(0x1ee439e69),Z=a(0x16ffed5ab);let J=new s.Ay("channel_details"),X={name:"warning"},ee={entities:{members:{includeSelf:!1,includeSlackbot:!1,includeSecurityBot:!1,includeBots:!1},userGroups:!1},sort:{frecency:!0},allowEmptyQuery:!0},CreateHandoffChannelModal=({currentChannelId:e,onSuccess:t})=>{let a=(0,r.wA)(),i=(0,z.d4)(t=>(0,K.OL)(t,e)),l=(0,z.d4)(e=>(0,q.n)(e,i)),o=(0,z.d4)(e=>(0,Q._J)(e,l)),s=o?.name||"",d=(0,n.useId)(),m=(0,n.useId)(),u=(0,n.useId)(),p=(0,n.useId)(),_=[{value:"public",label:J.rt("Public \u2014 <b>anyone in {workspaceName}</b>",{workspaceName:s})},{value:"private",label:J.rt("Private \u2014 <b>only specific people</b>")}],[f,b]=(0,n.useState)(""),[g,y]=(0,n.useState)(j.gi),[A,x]=(0,n.useState)(_[0]),[E,C]=(0,n.useState)(!1),[k,v]=(0,n.useState)(w.Ml),S=(0,n.useCallback)(()=>{a((0,Y.O)({closeNamed:[I]}))},[a]),et=(0,n.useCallback)(e=>{y(j.gi),b(e)},[]),ea=(0,n.useCallback)(e=>{y(e)},[]),en=(0,n.useCallback)(e=>{v(e.map(e=>e.value))},[]),er=(0,n.useCallback)(e=>{x(e)},[]),ei=(0,n.useCallback)(({value:e,entity:t})=>n.createElement(B.A,{id:e,member:t,showAvatar:!0,showPresence:!0}),[]),el=(0,n.useCallback)(async e=>{if(e.preventDefault(),f&&!E)try{C(!0);let e=await a((0,$.o)({name:f,teamId:l,isPrivate:"private"===A.value,reason:"channel-expert-create-handoff-channel"}));if(t(e.id),k.length>0)try{await a((0,G.Cw)({channelId:e.id,users:k.join(","),reason:"channel-expert-create-handoff-channel"}))}catch{a((0,Z.M)({element:n.createElement(U.A,{position:"bottom-right",svgIconProps:X,svgIconClassName:"sk_warning_yellow",duration:5e3},J.t("We couldn\u2019t invite some members due to an error. Try inviting them directly from the channel instead."))}))}S()}catch(e){y((0,V.X)(e))}finally{C(!1)}},[f,A,E,k,a,l,t,S]),eo=(0,n.useMemo)(()=>k.map(e=>({value:e})),[k]),es=Object.values(g).some(Boolean),ec=!f||es||E;return n.createElement(T.A,{centered:!0,role:"dialog",maxWidth:540},n.createElement(O.A,null,n.createElement(D.A,{title:J.t("Create a new channel")})),n.createElement(M.A,null,n.createElement(R.A,{className:"padding_bottom_25"},n.createElement("form",{id:d,onSubmit:el},n.createElement("div",{className:"display_flex flex_direction_column gap_75"},J.t("This channel will be public and in the {workspaceName} workspace. You can invite specific teammates now, or anyone can join later.",{workspaceName:s}),n.createElement(W.A,{id:u,name:"channel-expert-config-create-handoff-channel-input",size:"medium",channelName:f,channelNameErrors:g,onChannelNameChange:et,onChannelValidationChange:ea,isPrivate:"private"===A.value,customErrorMessage:null})),n.createElement("div",{className:"display_flex gap_50 flex_direction_column margin_bottom_125"},n.createElement(h.A,{id:m,text:J.t("Add channel members (optional)"),cursor:"pointer"}),n.createElement(H.h,{ariaLabelledBy:m,size:"medium","aria-label":J.t("Add channel members (optional)"),width:"100%",selectId:m,searcherOptions:ee,renderOption:ei,onSelectedItemsChange:en,selectedOptions:eo,placeholderText:J.t("ex. Nathalie, or james@acme.com")})),n.createElement("div",{className:"display_flex gap_50 flex_direction_column"},n.createElement(h.A,{id:p,text:J.t("Visibility"),cursor:"pointer"}),n.createElement(F.A,{ariaLabelledBy:p,selectId:p,options:_,selectedOption:A,onOptionSelected:er,width:"100%",size:"medium"}))))),n.createElement(P.A,null,n.createElement(L.A,null,n.createElement(N.A,{type:"outline",onClick:S},J.t("Cancel")),n.createElement(c.A,{form:d,disableWhenLoading:!0,type:"primary",htmlType:"submit",loading:E,disabled:ec},J.t("Save")))))};CreateHandoffChannelModal.displayName="CreateHandoffChannelModal";var et=a(0x11c82607b),ea=a(0x46dbff89);let en=(0,et.Ay)("Opens the configuration modal for the channel expert agent",async(e,t,{onSuccess:a,currentChannelId:r})=>{e((0,ea.q)({name:I,element:n.createElement(CreateHandoffChannelModal,{onSuccess:a,currentChannelId:r}),isStackable:!0}))});en.meta={name:"openCreateHandoffChannelModal",key:"createThunkOpenCreateHandoffChannelModal",description:"Opens the configuration modal for the channel expert agent"};var er=a(0xf5bbd10a),ei=a(0x6f213e53),el=a(0x14149c126);let eo=new s.Ay("channel_tabs"),es="create_new_handoff_channel",ec={entities:{channels:{includeArchived:!1,includePrivate:!0,includeMpims:!1,excludeElmChannels:!0,includeExternallyShared:!1,onlyIfMember:!0},userGroups:!1},allowEmptyQuery:!0,sort:{frecency:!0}},ChannelExpertHandoffChannelSelect=({currentChannelId:e,handoffChannelId:t,setHandoffChannelId:a,handoffChannelError:i})=>{let l=(0,er.A)({label:"CHANNEL-EXPERT-CONFIG"}),o=(0,r.wA)(),s=(0,z.d4)(e=>(0,el._Z)(e,"channel_knowledge_agent_human_handoff_v2")),c=(0,z.d4)(e=>(0,K.OL)(e,t)),d=(0,ei.F)(c),m=eo.t("Select channel"),u=eo.t("The agent will forward messages to this channel when people request more help."),p=eo.t("The selected channel has been archived. Clear your selection or choose another channel."),h=(0,n.useCallback)(()=>eo.t("No channels found"),[]),_=(0,n.useCallback)(e=>{let t={key:es,value:es,label:eo.t("Create new channel"),entity:{id:es,value:es}};return e.unshift(t),e},[]),f=(0,n.useCallback)(e=>e.value&&e.value!==es?n.createElement(C.A,{channelId:e.value}):null,[]),b=(0,n.useCallback)((e,t)=>e.key===es?n.createElement("span",{className:"display_flex align_items_center gap_50"},n.createElement(E.Ah,{name:"channel-add",size:"18"}),n.createElement("span",{className:"bold"},e.label)):n.createElement(k.A,{channelId:e.value,isActive:t.isActive}),[]),g=(0,n.useCallback)(e=>e.value!==es,[]),y=(0,n.useCallback)(({value:t})=>{t===es?o(en({onSuccess:a,currentChannelId:e})):a(t)},[o,a,e]),A=(0,n.useCallback)(()=>{a(void 0)},[a]),S=(0,n.useMemo)(()=>t?{value:t}:null,[t]),I=(0,n.useMemo)(()=>{let e=[];return i&&e.push(i),d&&e.push({id:"archived_channel",message:p}),e.length?e:void 0},[p,d,i]),w=(0,n.useMemo)(()=>{if(!(0,x.A)(I,l))return[{id:"agent_helper_channel_hint",message:n.createElement("span",{className:"sk_secondary_foreground"},u)}]},[u,I,l]);return"control"===s?null:n.createElement("div",null,n.createElement("p",{className:"bold margin_bottom_50"},eo.t("Channel to use when people request help (optional)")),n.createElement("div",{className:"display_flex gap_50"},n.createElement(v.u,{className:"flex_one",selectId:"select_channel",maxOptionsListHeight:200,optionsRowHeight:32,width:"100%",ariaLabel:m,placeholderText:m,emptyStateMessage:h,onOptionSelected:y,onOptionUnselected:A,searcherOptions:ec,renderOption:b,processOptions:_,renderSelectedOption:f,shouldOptionBeSelected:g,selectedOption:S,isRequired:!1,isInvalid:d,errors:I,hints:w})))};ChannelExpertHandoffChannelSelect.displayName="ChannelExpertHandoffChannelSelect";var ed=a(0x130d89881),em=a(0x1a043bf26),eu=a(0x217a7a62d),ep=a(0x209559510),eh=a(0x102edf836),e_=a(0xbdf8a2f9),ef=a(0x24c7981a4),eb=a(0x3711e82d);let eg=new s.Ay("channel_details"),ChannelExpertAddSourceButton=({channelId:e,folderBookmarkId:t,isEmptyState:a=!1,onSourceAdded:r})=>{let i=(0,z.d4)(e_.SQ);return n.createElement(ef.e,{channelId:e,folderBookmarkId:t,disableLinks:!0,disableNewFileCreation:!0,uiComponentName:eb.UiComponentName.CHANNEL_EXPERT_CONFIG_ADD_BUTTON,isStackable:!0,isEmptyState:a,onFileAdded:r,fileUploadAccept:i,fileTypesAllowed:e_.lQ,resultsFilter:e_._t,isChannelExpertSettings:!0},n.createElement(eh.Ay,{type:"outline",size:"small"},n.createElement("span",{className:"margin_right_25"},n.createElement(E.Ah,{name:"plus"})),eg.t("Add a Source")))};ChannelExpertAddSourceButton.displayName="ChannelExpertAddSourceButton";var ey=a(0x2b7f0bcc),eA=a(0x1c95a2c1),ex=a.n(eA);let eE=new s.Ay("channel_details"),ChannelExpertSourceCapacity=({used:e,total:t})=>{let a=t<=0||e>=t?100:e<=0?0:Math.ceil(e/t*100),r=eE.t("{percentage}% available",{percentage:100-a}),i=eE.t("Source capacity");return n.createElement("div",{className:"margin_bottom_150"},n.createElement("h3",{id:"source-capacity",className:"display_flex justify_content_between margin_bottom_50"},n.createElement("span",{className:l()(ex().subtitle,"bold")},i)," ",n.createElement("span",{className:ex().subtitle},r)),n.createElement("div",{className:ex().meterContainer,role:"meter","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-labelledby":"source-capacity"},n.createElement("svg",{width:`${a}%`,height:8,className:ex().meterFill,"aria-hidden":"true",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"currentcolor"}))),100===a?n.createElement("div",{className:"margin_top_50"},n.createElement(ey.Ay,{type:"boxed",level:"warning"},n.createElement("span",{className:"caption align_self_center"},eE.t("You\u2019ve reached the source limit. The agent\u2019s responses may be less accurate.")))):null)};ChannelExpertSourceCapacity.displayName="ChannelExpertSourceCapacity";var eC=a(0x1f1d4d631),ek=a(0x84a5226c),ev=a(0xb0ca8936),eS=a(0x18bfdc00c),eI=a(0xa3f1c1f3),ew=a(0xa5d7d903),eT=a(0x1f52b0500),eN=a(0x40d892cd),eM=a.n(eN);let eR=new s.Ay("channel_details"),eP={tokenCount:0,tokenLimit:100},ChannelExpertManageSources=({channelId:e})=>{let t=(0,r.wA)(),a=(0,z.d4)(t=>(0,eu.nj)(t,e)),i=(0,z.d4)(t=>(0,ew.C)(t,e)),[o,s]=(0,n.useState)(eP),{tokenCount:c,tokenLimit:d}=o,m=a?.data?.folderBookmarkId||"",u=eR.t("Sources"),{isEmpty:p,isLoading:h,keys:_,rows:f}=(0,eS.a)({channelId:e,folderBookmarkId:m,folderName:u,includeHeader:!1}),b=(0,n.useCallback)(()=>t((0,eI.K)({channel:e,reason:"channel-expert-config"})).then(e=>{s({tokenLimit:e.token_limit,tokenCount:e.token_count})}),[e,t]),g=(0,n.useCallback)(e=>{let a=f.find(t=>t.key===e.id);a&&a.type!==eS.T.HEADING&&a.type!==eS.T.INFO&&a.type!==eS.T.FILES_UPLOADING&&t((0,ep.m)({e,bookmark:a.bookmark,isStackable:!0,forceNewWindow:!0}))},[t,f]),y=(0,n.useCallback)(()=>{b()},[b]),A=(0,n.useCallback)(()=>{b()},[b]),x=(0,n.useCallback)((t,a)=>{let r=f[t];return r.type===eS.T.FILE?n.createElement(eC.t,{className:l()("p-explorer_result--list",{"p-explorer_result--list--first":"first"===r.renderedInListVariant||"single"===r.renderedInListVariant,"p-explorer_result--list--last":"last"===r.renderedInListVariant||"single"===r.renderedInListVariant}),channelId:e,bookmark:r.bookmark,params:a,onItemRemoved:y,canRemove:i}):null},[f,e,y,i]),E=(0,n.useCallback)(({key:e})=>{let a,n=f.find(t=>t.key===e);if(n){switch(n.type){case eS.T.FILE:a=t((0,eT.A)({fileId:n.bookmark.entityId}));break;case eS.T.LINK:a=n.bookmark.title??n.bookmark.url}return{"aria-label":a}}},[t,f]);if((0,n.useEffect)(()=>{let e=b();return()=>{e.cancel()}},[b]),h)return n.createElement("div",{className:eM().manageSourcesList},n.createElement(ek.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),n.createElement(ek.A,{className:"p-explorer_result--list"}),n.createElement(ek.A,{className:"p-explorer_result--list"}),n.createElement(ek.A,{className:"p-explorer_result--list p-explorer_result--list--last"}));if(p)return n.createElement("div",{className:l()(eM().emptyStateContainer,"margin_bottom_200")},n.createElement("div",{className:eM().addSourcesTextContainer},n.createElement("h4",{className:"black padding_bottom_50"},eR.t("Add Channel Expert sources")),n.createElement(ev.EY,{size:"caption"},eR.t("We\u2019ll add your selected sources to a new channel folder for quick access."))),n.createElement(ChannelExpertAddSourceButton,{channelId:e,folderBookmarkId:m,isEmptyState:!0,onSourceAdded:A}));let C=62*Math.min(_.length,3);return n.createElement("div",{className:"margin_bottom_150"},n.createElement("h4",{className:l()(eM().subtitle,"bold","margin_bottom_50")},u),n.createElement("div",{style:{height:`${C}px`,maxHeight:"250px"}},n.createElement(ed.A,null,({width:e,height:t})=>n.createElement(em.A,{containerClassName:eM().manageSourcesListContainer,width:e,height:t,keys:_,onItemClick:g,rowRenderer:x,getPropsForItem:E}))),n.createElement("div",{className:"margin_top_50 margin_bottom_150"},n.createElement(ChannelExpertAddSourceButton,{channelId:e,folderBookmarkId:m,onSourceAdded:A})),n.createElement(ChannelExpertSourceCapacity,{used:c,total:d}))};ChannelExpertManageSources.displayName="ChannelExpertManageSources";var eL=a(0xb77a689a),eO=a(0x134e233cc),eD=a(0x23619f41c),eF=a(0x677a139e),eU=a(0x1fdec3e16),eB=a(0x130c2e810),eH=a(0x4315909c),eW=a(0x6e465d95),eV=a(0x1b8308484),eG=a(0x106a32624),eq=a(0x243435af9),ej=a(0x15f4f83cf),ez=a(0x1b9d5cc0c),eK=a(0x105ecbbed),e$=a(0x242503693),eY=a(0xb04c4a12),eQ=a(0x14cb5efef),eZ=a(0x20c81ddcb),eJ=a(0xd93ecf94),eX=a(0x57e82e39),e0=a.n(eX);let e1=new s.Ay("channel_details"),ChannelExpertPreview=({channelId:e,dmChannelId:t,previewThreadTs:a,isSpecificContent:r,setPreviewThreadTs:i})=>{let o=(0,z.d4)(eQ.wL),s=(0,z.d4)(eQ.N),c=(0,z.d4)(eq.A),{transitionFocusTo:d}=(0,eO.Gx)(),m=(0,n.useCallback)(e=>{let a=e&&!(0,eL.A)(e)&&"ts"in e?e.ts:void 0;a&&(i(a),d({focusKey:e$.Ay.THREAD_MESSAGE_INPUT,focusMetadata:{id:t,params:{from:"channelExpertPreview"}},forceFocus:!0}))},[i,d,t]),u=(0,n.useMemo)(()=>({channels:[{id:e,is_active:!0}]}),[e]),p=(0,z.d4)(e=>(0,eB.rV)(e,t)),h=(0,z.d4)(e=>(0,eB.Qn)(e,t)),_=c?e1.t("Try Channel Expert here to test how it works with the sources you\u2019ve set up."):"Try Channel Expert here to test how it works with the sources you've set up.",f=h?(0,ez.c2)(h):void 0,b=p?.profile?.name??(0,ez.wg)(h),g=(0,n.useMemo)(()=>n.createElement(eD.A,{ariaHidden:!0,size:100,image:f??void 0}),[f]),y=c?e1.t("Message Channel Expert\u2026"):"Message Channel Expert...",A=(0,z.d4)(t=>(0,eu.nj)(t,e)),x=A?.data?.folderBookmarkId||"",E=c?e1.t("Sources"):"Sources",{isEmpty:C}=(0,eS.a)({channelId:e,folderBookmarkId:x,folderName:E,includeHeader:!1}),k=r&&C,renderNewConversation=()=>n.createElement(n.Fragment,null,n.createElement("div",{className:e0().agentDmView},n.createElement("div",{className:e0().agentDmViewHero},g,n.createElement("div",{className:e0().agentDmViewHeroHeader},n.createElement("h2",null,n.createElement(eU.A,{lines:1},b)),n.createElement(eW.A,{isAgentforce:!0,className:e0().agentDmViewHeroBadge})),n.createElement("p",{className:e0().agentDmViewHeroDescription},_))),k?n.createElement("div",{className:e0().addSourcesContainer},n.createElement(eF.A,{id:"add-sources-hint",className:e0().addSourcesText},c?e1.t("Add your sources first, and then you can test!"):"Add your sources first, and then you can test!")):n.createElement("div",{className:e0().messageInputContainer},n.createElement(eH.T,{channelId:t,onMessageSent:m,agentMessageSourceType:"agent_preview_conversation",customClientContext:u,placeholder:y,className:e0().messageInput,shouldAutofocus:!1})));renderNewConversation.displayName="renderNewConversation";let v=(0,z.d4)(e=>a?(0,eJ.Ld)(e,t,a):void 0),S=(0,ej.GU)(v)?void 0:v,I=`agent_home_view_${t}_${a}`,w=(0,eK.Iu)(t,a),T=(0,z.d4)(e=>(0,eZ.MO)(e,w??"")),N=(0,n.useMemo)(()=>({hasShimmer:T.isShown,loadingMessages:T.loadingMessages,appId:o??"",appUserId:s??""}),[T,o,s]),renderActiveConversation=()=>S?n.createElement(eG.Ay,{id:eY.Y.AGENT_PREVIEW_CONVERSATION},n.createElement(eV.A,{key:I,serializationKey:I,threadTs:a,channelId:t,aiApps:N})):null;renderActiveConversation.displayName="renderActiveConversation";let M=null;return!S||k?M=renderNewConversation():S&&(M=renderActiveConversation()),n.createElement(n.Fragment,null,n.createElement("div",{className:e0().previewHeader},n.createElement("h2",{className:e0().previewHeaderText},e1.t("Agent preview"))),n.createElement("div",{className:l()(e0().previewContent,{[e0().previewContentWithActiveConversation]:!!S&&!k})},M))};ChannelExpertPreview.displayName="ChannelExpertPreview";var e2=a(0x22ce977f1),e4=a(0x1372bbdf7),e5=a(0x4cd7b414),e3=a(0x16999e324),e6=a(0x1dcd812a2),e8=a(0x20e80190e),e7=a(0x21491cdb1);let e9=new s.Ay("channel_details"),te=g.U.AllContent,tt={knowledgeSource:te,handoff:void 0,replyMode:e6.F.MentionOnly},ta={name:"compose"},tn={name:"close"},getSfdcAgentforceChannelAgentConfigureErrorMessage=e=>{let t=e?.name,a="";switch(t){case e3.h.InvalidHandoffChannelNotManager:a=e9.t("You\u2019re not a channel manager for the selected channel. Choose a channel that you manage to continue.",{fallbackHash:"48faa2ac6ac6d273cd7dacbe15a5b6f7e1822087"});break;case e3.h.InvalidHandoffChannelExternallyShared:a=e9.t("The selected channel is shared with an external organization. Choose a channel that is not shared externally to continue.",{fallbackHash:"48faa2ac6ac6d273cd7dacbe15a5b6f7e1822087"});break;default:a=e9.t("Sorry! Something went wrong. Please try again.")}return a},ChannelExpertConfigModal=({channelId:e,isNativeChannelExpert:t=!1})=>{var a;let i=(0,n.useId)(),s=(0,r.wA)(),{cleanupPreviewThread:h,dmChannelId:_,previewThreadTs:f,setPreviewThreadTs:b}=(()=>{let e=(0,r.wA)(),t=(0,z.d4)(eQ.N),[a,i]=(0,n.useState)(void 0),[l,o]=(0,n.useState)(void 0);return(0,n.useEffect)(()=>{t&&(async()=>{let a=await e((0,e5.Z)({memberId:t,shouldNavigateToChannel:!1}));a?.id&&i(a.id)})()},[t,e]),{cleanupPreviewThread:(0,n.useCallback)(async()=>{if(!l||!a)return;o(void 0);let t=await e((0,e4.$b)({channelId:a,threadTs:l}));if(t.msgs.length>0){let n=t.msgs.reduce((e,t)=>(t.ts!==l&&e.push(t.ts),e),[]);await Promise.allSettled(n.map(t=>e((0,e2.A)({channelId:a,ts:t,reason:"preview-thread-delete"}))))}await e((0,e2.A)({channelId:a,ts:l,reason:"preview-thread-delete"}))},[a,e,l]),previewThreadTs:l,setPreviewThreadTs:o,dmChannelId:a}})(),y=(0,n.useCallback)(async()=>{await h()},[h]),A=(0,n.useCallback)(()=>{b(void 0)},[b]),x=(a=(0,z.d4)(t=>(0,e7.j)(t,e)),a?.channel_knowledge_agent?{knowledgeSource:a.channel_knowledge_agent.knowledge_source||te,replyMode:a.channel_knowledge_agent.reply_mode||e6.F.MentionOnly,handoff:a.channel_knowledge_agent.handoff}:tt),E=(0,z.d4)(e=>x.handoff?(0,K.OL)(e,x.handoff.channel):void 0),[C,k]=(0,n.useState)(),v=!!E&&(0,ei.F)(E),I=(0,n.useCallback)(async t=>{(0,p.o2)(t)&&await s((0,e3.Q)({channelId:e,reason:"change_source_from_modal",...x,knowledgeSource:t}))},[e,s,x]),w=(0,n.useCallback)(async t=>{try{(await s((0,e3.Q)({...x,handoff:t?{channel:t}:void 0,channelId:e,reason:"change_handoff_channel_from_modal"}))).ok&&k(void 0)}catch(t){let e=(0,o.WY)(t);k({id:e||"unknown_error",message:getSfdcAgentforceChannelAgentConfigureErrorMessage({name:e})})}},[e,x,s]),T=(0,n.useCallback)(()=>{s((0,Y.O)({closeNamed:[S]}))},[s]),N=(0,n.useCallback)(async()=>{try{(await s((0,e3.Q)({channelId:e,reason:"save_from_modal",...x}))).ok&&T()}catch(e){k({id:"handoff_channel_error",message:getSfdcAgentforceChannelAgentConfigureErrorMessage(e)})}},[e,x,s,T]),M=_&&!t;return n.createElement(m.A,{centered:!0,className:eM().modal,role:"dialog",labelledby:i,maxWidth:944,onClose:T,onAfterClose:y,showCloseButton:!1},n.createElement("div",{className:l()(eM().modalContent,{[eM().noPreview]:!M})},n.createElement(e8.rQ,{className:eM().setupHeader},n.createElement(e8.Rc,{id:i,title:e9.t("Channel Expert set up")})),n.createElement(e8.$m,{className:eM().setupContent},n.createElement(e8.qf,{className:"margin_bottom_150"},n.createElement(ChannelExpertChooseSourcesRadioButtons,{selectedKnowledgeSource:x.knowledgeSource,onSourceChange:I}),x.knowledgeSource===g.U.SelectedSources&&n.createElement(ChannelExpertManageSources,{channelId:e}),!t&&n.createElement(ChannelExpertHandoffChannelSelect,{currentChannelId:e,handoffChannelId:x.handoff?.channel,setHandoffChannelId:w,handoffChannelError:C}))),M?n.createElement(ChannelExpertPreview,{channelId:e,dmChannelId:_,previewThreadTs:f,isSpecificContent:x.knowledgeSource===g.U.SelectedSources,setPreviewThreadTs:b}):null,n.createElement(e8.jl,{className:eM().setupFooter},n.createElement(e8.ox,null,n.createElement(c.A,{disableWhenLoading:!0,type:"primary","aria-label":e9.t("Done"),onClick:N,disabled:v||!!C},e9.t("Done")))),n.createElement("div",{className:eM().buttonContainer},f?n.createElement(u.Ay,{tip:e9.t("Start new conversation")},n.createElement(d.A,{"aria-label":e9.t("Start new conversation"),onClick:A,svgIconProps:ta})):null,n.createElement(d.A,{"aria-label":e9.t("Close"),"data-qa":"sk_close_modal_button",onClick:T,svgIconProps:tn}))))};ChannelExpertConfigModal.displayName="ChannelExpertConfigModal";let tr=(0,et.Ay)("Opens the configuration modal for the channel expert agent",async(e,t,{channelId:a,isNativeChannelExpert:r})=>{e((0,ea.q)({element:n.createElement(ChannelExpertConfigModal,{channelId:a,isNativeChannelExpert:r}),name:S,isStackable:!1}))});tr.meta={name:"openChannelExpertConfigModal",key:"createThunkOpenChannelExpertConfigModal",description:"Opens the configuration modal for the channel expert agent"}},0xbdf8a2f9:(e,t,a)=>{"use strict";a.d(t,{SQ:()=>s,_t:()=>channelExpertFileResultsFilter,lQ:()=>o});var n=a(0x1cf0d97e1),r=a(0x14149c126),i=a(0x1950da728);let l=["application/pdf","text/csv","text/plain","application/vnd.slack-docs","application/vnd.slack-list","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword"],o=[i.$Z.PDFS,i.$Z.DOCUMENTS,i.$Z.SPREADSHEETS],channelExpertFileResultsFilter=e=>!!e.mimetype&&l.includes(e.mimetype),s=(0,n.Ay)(e=>"treatment_highlights"===(0,r._Z)(e,"cea_ms_word_search")||"treatment_full_file_contents"===(0,r._Z)(e,"cea_ms_word_search")?".pdf, .txt, .csv, .doc, .docx":".pdf, .txt, .csv");s.meta={name:"getAllowedFileUploadExtensions",key:"createSelectorGetAllowedFileUploadExtensions",description:e=>"treatment_highlights"===(0,r._Z)(e,"cea_ms_word_search")||"treatment_full_file_contents"===(0,r._Z)(e,"cea_ms_word_search")?".pdf, .txt, .csv, .doc, .docx":".pdf, .txt, .csv"}},0x1d3e059f2:(e,t,a)=>{"use strict";a.d(t,{JY:()=>i,T5:()=>d,Zw:()=>s,c6:()=>l,ii:()=>c,lQ:()=>m,pQ:()=>u,tZ:()=>o});var n,r=a(0x1950da728);let i="channel-expert-settings-modal",l={entities:{members:{onlyLocalTeam:!0,includeSelf:!0,includeSlackbot:!1,includeBots:!1,includeDeleted:!0}},sort:{selfFirst:!1},limit:100,allowEmptyQuery:!1},o={entities:{channels:{includeArchived:!1,includePrivate:!0,includeMpims:!1,excludeElmChannels:!0,includeExternallyShared:!1}},allowEmptyQuery:!0,sort:{frecency:!0}},s={include_all_files:!0,include_all_messages:!0,sources_folder_bookmark_id:""};var c=((n={}).INVALID_URL="INVALID_URL",n.INVALID_DOMAIN="INVALID_DOMAIN",n.UNSUPPORTED_FILE_TYPE="UNSUPPORTED_FILE_TYPE",n);let d=[".pdf",".txt",".csv",".doc",".docx"],m=[r.$Z.PDFS,r.$Z.DOCUMENTS,r.$Z.SPREADSHEETS],u=["application/vnd.google-apps.presentation","application/vnd.google-apps.document","application/pdf","text/csv","text/plain","application/msword"]},0x1959a5aa8:(e,t,a)=>{"use strict";a.d(t,{u:()=>eu});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0xce378727),c=a(0x189615fa),d=a(0x2501a2cee),m=a(0x130d89881),u=a(0x1a043bf26),p=a(0x209559510),h=a(0x1f1d4d631),_=a(0x102edf836),f=a(0x1d3e059f2),b=a(0x11bf9a8fe),g=a(0x24c7981a4),y=a(0x3711e82d);let A=new o.Ay("channel_details"),ChannelExpertSettingsAddSourceButton=({channelId:e,folderBookmarkId:t,isEmptyState:a=!1,onSourceAdded:r})=>n.createElement(g.e,{channelId:e,folderBookmarkId:t,disableLinks:!0,disableNewFileCreation:!0,uiComponentName:y.UiComponentName.CHANNEL_EXPERT_SETTINGS_ADD_BUTTON,isStackable:!0,isEmptyState:a,onFileAdded:r,fileUploadAccept:f.T5.join(","),fileTypesAllowed:f.lQ,resultsFilter:b.Tr,isChannelExpertSettings:!0},n.createElement(_.Ay,{type:"outline",size:"small"},n.createElement("span",{className:"margin_right_25"},n.createElement(d.Ah,{name:"plus"})),A.t("Add a Source")));ChannelExpertSettingsAddSourceButton.displayName="ChannelExpertSettingsAddSourceButton";var x=a(0x84a5226c),E=a(0xb0ca8936),C=a(0x18bfdc00c),k=a(0x1f52b0500),v=a(0x40d892cd),S=a.n(v);let I=new o.Ay("channel_details"),ChannelExpertSettingsManageSources=({channelId:e,folderBookmarkId:t})=>{let a=(0,r.wA)(),i=I.t("Custom sources"),{isEmpty:o,isLoading:s,keys:c,rows:d}=(0,C.a)({channelId:e,folderBookmarkId:t,folderName:i,includeHeader:!1}),_=(0,n.useCallback)(e=>{let t=d.find(t=>t.key===e.id);t&&t.type!==C.T.HEADING&&t.type!==C.T.INFO&&t.type!==C.T.FILES_UPLOADING&&a((0,p.m)({e,bookmark:t.bookmark,isStackable:!0,forceNewWindow:!0}))},[a,d]),f=(0,n.useCallback)((t,a)=>{let r=d[t];return r.type===C.T.FILE?n.createElement(h.t,{className:l()("p-explorer_result--list",{"p-explorer_result--list--first":"first"===r.renderedInListVariant||"single"===r.renderedInListVariant,"p-explorer_result--list--last":"last"===r.renderedInListVariant||"single"===r.renderedInListVariant}),channelId:e,bookmark:r.bookmark,params:a,canRemove:!0}):null},[e,d]),b=(0,n.useCallback)(({key:e})=>{let t,n=d.find(t=>t.key===e);if(n){switch(n.type){case C.T.FILE:t=a((0,k.A)({fileId:n.bookmark.entityId}));break;case C.T.LINK:t=n.bookmark.title??n.bookmark.url}return{"aria-label":t}}},[a,d]);if(s)return n.createElement("div",{className:S().manageSourcesList},n.createElement(x.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),n.createElement(x.A,{className:"p-explorer_result--list"}),n.createElement(x.A,{className:"p-explorer_result--list"}),n.createElement(x.A,{className:"p-explorer_result--list p-explorer_result--list--last"}));if(o)return n.createElement("div",{className:l()(S().emptyStateContainer,"margin_bottom_200")},n.createElement("div",{className:S().addSourcesTextContainer},n.createElement("h4",{className:"black"},i),n.createElement(E.EY,{size:"caption"},I.t("We\u2019ll share these sources to this channel, so Channel Agent can use them in its responses. ",{fallbackHash:"bb07a2705001686876227166a58590656d135501"}))),n.createElement(ChannelExpertSettingsAddSourceButton,{channelId:e,folderBookmarkId:t,isEmptyState:!0}));let g=62*Math.min(c.length,3);return n.createElement("div",{className:"margin_bottom_150"},n.createElement("h4",{className:"bold margin_bottom_100"},i),n.createElement("div",{style:{height:`${g}px`,maxHeight:"250px"}},n.createElement(m.A,null,({width:e,height:t})=>n.createElement(u.A,{containerClassName:S().manageSourcesListContainer,width:e,height:t,keys:c,onItemClick:_,rowRenderer:f,getPropsForItem:b}))),n.createElement("div",{className:"margin_top_50 margin_bottom_150"},n.createElement(ChannelExpertSettingsAddSourceButton,{channelId:e,folderBookmarkId:t})))};ChannelExpertSettingsManageSources.displayName="ChannelExpertSettingsManageSources";var w=a(0xa6f3163b),T=a(0x1d2cd7755),N=a(0x139c79d16),M=a(0xa5dbe09b),R=a(0x21f3c49e8),P=a(0x193edc1da),L=a(0x15bd59d31),O=a(0x19dc73101);let D=new o.Ay("channel_details"),ChannelExpertSettingsChannelsSelect=({onChannelsSelected:e})=>{let t=(0,n.useId)(),a=D.t("Select channels"),r=D.t("The agent will use everything from these channels as sources."),i=(0,n.useCallback)(()=>D.t("No channels found"),[]),l=(0,n.useCallback)(e=>n.createElement(P.A,{channelId:e.value}),[]),o=(0,n.useCallback)((e,t)=>n.createElement(L.A,{channelId:e.value,isActive:t.isActive}),[]),s=(0,n.useMemo)(()=>{let e=[];return e.length?e:void 0},[]),c=(0,n.useMemo)(()=>{if((0,R.A)(s))return[{id:"agent_helper_channel_hint",message:n.createElement("span",{className:"sk_secondary_foreground "},r),className:"margin_bottom_0"}]},[r,s]);return n.createElement("div",{className:"margin_bottom_0",style:{width:"100%"}},n.createElement("p",{className:"bold margin_bottom_50"},D.t("Include content from other channels")),n.createElement(O.h,{className:"flex_one",selectId:t,maxOptionsListHeight:200,optionsRowHeight:32,width:"100%",ariaLabel:a,placeholderText:a,emptyStateMessage:i,onSelectedItemsChange:e,searcherOptions:f.tZ,renderOption:o,renderSelectedOption:l,isRequired:!1,isInvalid:!1,errors:s,hints:c}))};ChannelExpertSettingsChannelsSelect.displayName="ChannelExpertSettingsChannelsSelect";var F=a(0x10d53599f);let U=new o.Ay("channel_details"),ChannelExpertSettingsPeopleSelect=({onPeopleSelected:e})=>{let t=U.t("Select people"),a=(0,n.useId)(),r=(0,n.useCallback)(e=>e.entity?n.createElement(F.A,{id:e.entity.id}):null,[]),i=(0,n.useCallback)(e=>e.entity?n.createElement(F.A,{id:e.entity.id}):null,[]),l=(0,n.useCallback)(()=>U.t("No results"),[]);return n.createElement(O.h,{className:"flex_one",isRequired:!0,onScrollablePage:!0,placeholderText:t,selectId:a,searcherOptions:f.c6,width:"100%",renderSelectedOption:i,renderOption:r,onOptionSelected:e,expandOnClick:!1,isInvalid:!1,emptyStateMessage:l,ariaLabel:t})};ChannelExpertSettingsPeopleSelect.displayName="ChannelExpertSettingsPeopleSelect";var B=a(0x4cd55786),H=a.n(B);let W=new o.Ay("channel_details"),V="channel-managers-plus-specific-people",G=[{id:"everyone",name:"who-can-update-channel-expert",label:"Everyone",value:"everyone"},{id:"everyone-except-guests",name:"who-can-update-channel-expert",label:"Everyone, except guests",value:"everyone-except-guests"},{id:"channel-managers-only",name:"who-can-update-channel-expert",label:"Channel managers only",value:"channel-managers-only"},{id:V,name:"who-can-update-channel-expert",label:"Channel managers, plus specific people",value:V}],q=[{id:"only-responds-when-mentioned",name:"reply-behaviour",label:"Only respond when mentioned",value:"only-responds-when-mentioned"},{id:"the-agent-decides-when-to-reply",name:"reply-behaviour",label:"The agent decides when to reply",value:"the-agent-decides-when-to-reply"}],ChannelExpertSettingsModalAdvancedSettings=()=>{let[e,t]=(0,n.useState)(!1),[a,r]=(0,n.useState)({selectedWhoCanUpdateRadioOption:null,selectedReplyBehaviourOption:null,selectedChannels:[],selectedPeople:[]}),i=(0,n.useId)(),l=e?"caret-up":"caret-down",o=(0,n.useCallback)(()=>{t(!e)},[e]),s=(0,n.useCallback)(e=>{let t=e.target.value,n=G.find(e=>e.value===t);n&&r({...a,selectedWhoCanUpdateRadioOption:n,selectedPeople:t!==V?[]:a.selectedPeople})},[a]),c=(0,n.useCallback)(e=>{let t=e.target.value,n=q.find(e=>e.value===t);n&&r({...a,selectedReplyBehaviourOption:n})},[a]),m=(0,n.useCallback)(e=>{r({...a,selectedChannels:e})},[a]),u=(0,n.useCallback)(e=>{r({...a,selectedPeople:e})},[a]),p=(0,n.useMemo)(()=>n.createElement("div",null,n.createElement(T.A,{key:"everyone",text:"Everyone",htmlFor:"everyone",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"everyone",name:"who-can-update-channel-expert",value:"everyone",checked:a.selectedWhoCanUpdateRadioOption?.value==="everyone",onChange:s})),n.createElement(T.A,{key:"everyone-except-guests",text:"Everyone, except guests",htmlFor:"everyone-except-guests",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"everyone-except-guests",name:"who-can-update-channel-expert",value:"everyone-except-guests",checked:a.selectedWhoCanUpdateRadioOption?.value==="everyone-except-guests",onChange:s})),n.createElement(T.A,{key:"channel-managers-only",text:"Channel managers only",htmlFor:"channel-managers-only",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"channel-managers-only",name:"who-can-update-channel-expert",value:"channel-managers-only",checked:a.selectedWhoCanUpdateRadioOption?.value==="channel-managers-only",onChange:s})),n.createElement(T.A,{key:"channel-managers-plus-specific-people",text:"Channel managers, plus specific people",htmlFor:"channel-managers-plus-specific-people",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"channel-managers-plus-specific-people",name:"who-can-update-channel-expert",value:"channel-managers-plus-specific-people",checked:a.selectedWhoCanUpdateRadioOption?.value==="channel-managers-plus-specific-people",onChange:s})),a.selectedWhoCanUpdateRadioOption?.value===V&&n.createElement(ChannelExpertSettingsPeopleSelect,{onPeopleSelected:u})),[s,u,a.selectedWhoCanUpdateRadioOption?.value]),h=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,n.createElement(T.A,{key:"only-responds-when-mentioned",text:"Only respond when mentioned",htmlFor:"only-responds-when-mentioned",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"only-responds-when-mentioned",name:"reply-behaviour",value:"only-responds-when-mentioned",checked:a.selectedReplyBehaviourOption?.value==="only-responds-when-mentioned",onChange:c})),n.createElement(T.A,{key:"the-agent-decides-when-to-reply",text:"The agent decides when to reply",htmlFor:"the-agent-decides-when-to-reply",type:"inline",cursor:"pointer"},n.createElement(N.A,{id:"the-agent-decides-when-to-reply",name:"reply-behaviour",value:"the-agent-decides-when-to-reply",checked:a.selectedReplyBehaviourOption?.value==="the-agent-decides-when-to-reply",onChange:c}))),[c,a.selectedReplyBehaviourOption?.value]),_=(0,n.useMemo)(()=>{if(e)return n.createElement("div",{className:H().advancedContent,id:i},n.createElement(ChannelExpertSettingsChannelsSelect,{onChannelsSelected:m}),n.createElement(M.A,{className:"margin_bottom_0",legendText:W.t("Who can update the Channel Agent?",{fallbackHash:"9223287c4996771b518b71049de13d192b61d844"})},p),n.createElement(M.A,{className:"margin_bottom_0",legendText:W.t("Reply behaviour")},h))},[p,h,e,m,i]);return n.createElement("div",{className:H().advanceDropDownContainer},n.createElement(w.A,{className:H().advanceDropDownButton,onClick:o,"aria-expanded":e,"aria-controls":i,"aria-label":W.t("Advanced channel agent settings",{fallbackHash:"ad1bb05d54279d4dd54e90e824c49dfca7bb107b"})},n.createElement("span",{"aria-hidden":"true"},W.t("Advanced")),n.createElement(d.Ah,{name:l,size:"16"})),_)};ChannelExpertSettingsModalAdvancedSettings.displayName="ChannelExpertSettingsModalAdvancedSettings";var j=a(0x32d3ef3d),z=a(0xfa28400d),K=a(0x9798b7f),$=a(0x7729d35b),Y=a(0x189a28b3e);let ChannelExpertSettingsSourceSwitch=({thumbnail:e,primaryLabel:t,secondaryLabel:a,isToggled:r,onToggle:i,isDisabled:l=!1,size:o=j.S.compact,entityState:s=j.w.enabled,dataQa:c="channel-expert-settings-source-switch",ariaLabel:d})=>{let m=(0,n.useId)(),u=(0,n.useCallback)(e=>{i(e.target.checked)},[i]),p=(0,n.useMemo)(()=>n.createElement("span",{id:m},t),[t,m]);return n.createElement(z.Ay,{size:o,entityState:s,isRemovable:!1,isInteractive:!1,isFullWidth:!0},n.createElement("div",{className:"display_flex align_items_center padding_75"},n.createElement($.A,{entityState:s,suppressDefaultColors:!0},e),n.createElement("div",{className:"margin_left_50 flex_one"},n.createElement(K.A,{size:o,entityState:s,primaryLabel:p,secondaryLabel:a})),n.createElement(Y.A,{ariaLabel:d||t,ariaLabelledBy:m,isToggled:r,isDisabled:l,onChange:u,dataQa:c})))};ChannelExpertSettingsSourceSwitch.displayName="ChannelExpertSettingsSourceSwitch";var Q=a(0x134775130),Z=a(0xf5bbd10a),J=a(0x1ecc7f772),X=a(0x20e80190e),ee=a(0x226892387),et=a(0x217553e42),ea=a(0x14149c126),en=a(0x1fcbb004d),er=a(0x7c4acb9),ei=a.n(er);let el=new o.Ay("channel_details"),eo=n.createElement("div",{className:l()(ei().thumbnailContainer,ei().messagesIcon)},n.createElement(d.Ah,{name:"message-filled",size:"20"})),es=n.createElement("div",{className:l()(ei().thumbnailContainer,ei().filesIcon)},n.createElement(d.Ah,{name:"file-browser-filled",size:"20"})),ChannelExpertSettingsModal=({channelId:e,settings:t=f.Zw})=>{let a=(0,Z.A)({label:"CHANNEL-EXPERT-SETTINGS"}),i=(0,n.useId)(),o=(0,r.wA)(),d=(0,ee.d4)(e=>"on"===(0,ea._Z)(e,"channel_expert_set_up_advanced_dropdown")),m=(0,ee.d4)(t=>(0,et.OL)(t,e)),u=(0,ee.d4)(e=>(0,J.SB)(e,m,{publicChannelIncludeHashSign:!0,privateChannelUseHashSign:!0})),[p,h]=(0,n.useState)({...t}),{sources_folder_bookmark_id:_,include_all_messages:b,include_all_files:g}=p,y=el.t("Use all messages in {channelName}",{channelName:u}),A=el.t("Use all canvas, lists, PDF and text files in {channelName}",{channelName:u}),x=(0,n.useCallback)(()=>{o((0,en.O)({closeNamed:[f.JY]}))},[o]),E=(0,n.useCallback)(async t=>{try{h(e=>({...e,include_all_messages:t}));let{ok:a,...n}=await o((0,Q.Q)({channelId:e,includeAllMessages:t,reason:"toggle-include-messages"}));if(!a)throw Error(`Configure include_all_messages request returned ok=${a}`);h(n)}catch(e){a.error("Failed to save include messages setting",{error:e}),h(e=>({...e,include_all_messages:!t}))}},[o,e,a]),C=(0,n.useCallback)(async t=>{try{h(e=>({...e,include_all_files:t}));let{ok:a,...n}=await o((0,Q.Q)({channelId:e,includeAllFiles:t,reason:"toggle-include-files"}));if(!a)throw Error(`Configure include_all_files request returned ok=${a}`);h(n)}catch(e){a.error("Failed to save include all files setting",{error:e}),h(e=>({...e,include_all_files:!t}))}},[o,e,a]),k=(0,n.useCallback)(()=>{x()},[x]);return n.createElement(c.A,{centered:!0,role:"dialog",labelledby:i,maxWidth:580,onClose:x},n.createElement("div",{className:l()(ei().modalContent,{[ei().hidePreview]:!0})},n.createElement(X.rQ,null,n.createElement("div",{className:ei().settingsHeader},n.createElement(X.Rc,{id:i,title:el.t("Channel Agent settings")}))),n.createElement(X.$m,null,n.createElement("div",{className:ei().settingsContent},n.createElement(X.qf,null,n.createElement("h4",{className:"bold margin_bottom_50"},el.t("Sources from {channelName}",{channelName:u})),n.createElement("div",{className:"margin_bottom_50"},n.createElement(ChannelExpertSettingsSourceSwitch,{thumbnail:eo,primaryLabel:el.t("Messages",{ns:"channel_sidebar"}),secondaryLabel:y,isToggled:b,onToggle:E,dataQa:"channel-expert-messages-switch",ariaLabel:y})),n.createElement("div",{className:"margin_bottom_50"},n.createElement(ChannelExpertSettingsSourceSwitch,{thumbnail:es,primaryLabel:el.t("Files"),secondaryLabel:A,isToggled:g,onToggle:C,dataQa:"channel-expert-files-switch",ariaLabel:A})),_?n.createElement("div",{className:"margin_top_250"},n.createElement(ChannelExpertSettingsManageSources,{channelId:e,folderBookmarkId:_})):null,d&&n.createElement(ChannelExpertSettingsModalAdvancedSettings,null)))),n.createElement(X.jl,null,n.createElement("div",{className:ei().settingsFooter},n.createElement(X.ox,null,n.createElement(s.A,{type:"primary","aria-label":el.t("Done"),onClick:k},el.t("Done")))))))};ChannelExpertSettingsModal.displayName="ChannelExpertSettingsModal";var ec=a(0x1d3864d33),ed=a(0x11c82607b),em=a(0x46dbff89);let eu=(0,ed.Ay)("Opens the settings modal for the Slack channel expert bot",async(e,t,{channelId:a})=>{let{ok:r,...i}=await e((0,ec.g)({channelId:a,reason:"open-channel-expert-settings-modal"})),l={...f.Zw,...i};e((0,em.q)({element:n.createElement(ChannelExpertSettingsModal,{channelId:a,settings:l}),name:f.JY,isStackable:!1}))});eu.meta={name:"openChannelExpertSettingsModal",key:"createThunkOpenChannelExpertSettingsModal",description:"Opens the settings modal for the Slack channel expert bot"}},0x11bf9a8fe:(e,t,a)=>{"use strict";a.d(t,{Tr:()=>channelExpertSettingsFileResultsFilter,_9:()=>getGoogleDriveFileType,hF:()=>validateGoogleDocUrl});var n=a(0x1d3e059f2),r=a(0x4c69b9f6),i=a(0x1404672af);function getGoogleDriveFileType(e){try{let t=new URL(e);if(t.pathname.startsWith("/document/d/"))return"gdoc";if(t.pathname.startsWith("/presentation/d/"))return"gpres";if(t.pathname.startsWith("/spreadsheets/d/"))return"gsheet";if(t.pathname.startsWith("/drawings/d/"))return"gdraw";if(t.pathname.startsWith("/file/d/")||"/open"===t.pathname&&t.searchParams.has("id"))return"gdoc";return null}catch{return null}}function validateGoogleDocUrl(e){if(!e||!e.trim())return n.ii.INVALID_URL;let t=(0,r.A)({input:e,ignoreEmailMatches:!0,ignorePhoneMatches:!0});if(0===t.length||"url"!==t[0].type)return n.ii.INVALID_URL;let a=t[0].url;if(!(0,i.X)(a))return n.ii.INVALID_DOMAIN;let l=getGoogleDriveFileType(a);return"gdoc"!==l&&"gpres"!==l?n.ii.UNSUPPORTED_FILE_TYPE:null}let channelExpertSettingsFileResultsFilter=e=>!!e.mimetype&&n.pQ.includes(e.mimetype)},0x6dca35d8:(e,t,a)=>{"use strict";a.d(t,{A:()=>t0});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x16ac9b089),o=a(0xb1ea448c),s=a(0x15fb82076),c=a(0x2501a2cee),d=a(0xf4097f62),m=a(0x1aba66b56),u=a(0x2b7f0bcc),p=a(0x15f8e452a),h=a(0x247cf31a2),_=a(0x10d53599f),f=a(0x58199183),b=a(0x303de21b),g=a(0x143fb6398),y=a(0x20e80190e),A=a(0x4a120eb2),x=a(0x9b971e7e),E=a(0x226892387),C=a(0x1039c723e),k=a(0x14b457331),v=a(0x14149c126),S=a(0x1fcbb004d),I=a(0x11eae4d05);let w=new i.Ay("channel_details"),AddChannelManagersModal=({channel:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>t((0,S.O)()),[t]),[i,l]=(0,n.useState)([]),[o,s]=(0,n.useState)(""),[c,d]=(0,n.useState)(!1),[I,T]=(0,n.useState)(!1),N=(0,E.d4)(x.jV),M=(0,E.d4)(e=>"on"===(0,v._Z)(e,"channel_manager_pilot")),R=(0,E.d4)(t=>(0,C.t)(t,e.id)),P=R.length+i.length>100,L=100-R.length,O=P||!i.length,D=(0,n.useCallback)(e=>{l(e.map(t=>({...t,isMemberError:e.indexOf(t)+1>L})))},[L]),F=(0,n.useCallback)(e=>{s(e)},[]),U=(0,n.useCallback)(()=>{let n=i.map(e=>e.value);d(!0),T(!1),t((0,k.L)({channelId:e.id,userIds:n})).then(()=>{d(!1),a()}).catch(()=>{T(!0),d(!1)})},[e.id,a,i,t]);if(!M)return null;let renderOption=e=>{let t=e.isDisabled?{isDisabled:!0,secondaryContent:w.t("Already channel manager")}:{};return n.createElement(_.A,{id:e.value,showPresence:!0,showAvatar:!0,useShortMode:!0,...t})};renderOption.displayName="renderOption";let B=w.rt("Add Channel Managers for {channelName}",{channelName:n.createElement(h.A,{channel:e})}),maybeGetErrors=()=>{let e=[];if(P){let t={id:"max-limit",message:n.createElement("div",{"data-qa":"channel-managers-max-total-text"},n.createElement("p",{className:"sk_raspberry_red"},n.createElement(p.A,{type:"warning",size:"inherit",className:"margin_right_25"}),w.rt("You can only add {numMore, plural, =1 {# more Channel Manager} other {# more Channel Managers}} to this channel.",{numMore:L})))};e.push(t)}return e};return maybeGetErrors.displayName="maybeGetErrors",n.createElement(y.dW,{closeModal:a,className:"p-add_channel_managers_modal",dataQa:"add-channel-managers-modal",showCloseButton:!1},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:B})),n.createElement(y.$m,null,n.createElement(y.qf,{className:"margin_bottom_100"},I&&n.createElement(u.Ay,{level:u.A_.error},w.t("There was a problem adding these Channel Managers. Give it another try in a few minutes.")),n.createElement("div",{className:"margin_bottom_125"},(0,g.ju)(e)&&n.createElement("p",null,w.rt("Since this is a Slack Connect channel, keep in mind that you can only add members from {hostName}.",{hostName:n.createElement(f.A,{id:N,bold:!1})})),n.createElement("p",null,w.t("Channel Managers must be existing members of this channel."))),n.createElement(A.x,{width:"100%",selectId:"add-channel-manager-select",search:()=>t((0,b.AD)({channelId:e.id,count:50,searchProfileFields:!0,fuzz:0,searchQuery:o,filter:"NOT guests AND NOT external AND NOT workflows"})).then(({members:e})=>e.map(e=>{let{id:t}=e;return{value:t,label:t,key:t,isDisabled:(0,m.A)(R,t)}})),placeholderText:w.t("Select members"),renderOption:renderOption,selectedOptions:i,isDisabled:!1,onSelectedItemsChange:D,onFilterQueryChange:F,focusOnMount:!0,errors:maybeGetErrors()}))),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{type:"outline","aria-label":w.t("Cancel")},w.t("Cancel")),n.createElement(y.s_,{onClick:U,loading:c,disabled:O,"data-qa":"add-channel-managers-submit-btn","aria-label":w.t("Add")},w.t("Add")))))};AddChannelManagersModal.displayName="AddChannelManagersModal";let T=(0,I.e)(AddChannelManagersModal);var N=a(0x17294c72a),M=a(0xd5e26907),R=a(0x81cf657f),P=a(0xfbe3141b),L=a(0x1a043bf26),O=a(0x120c268ad),D=a.n(O);let F=new i.Ay("channel_details"),AddChannelManagersListItem=({isDisabled:e})=>n.createElement("div",{className:D()("p-channel_managers_modal__list_item p-channel_managers_modal__add_member_list_item",{"p-channel_managers_modal__add_member_list_item--disabled":e}),"data-qa":"add-channel-managers-row"},n.createElement(p.A,{type:"add-user",className:D()("p-channel_managers_modal__add_member_list_item__icon",{"p-channel_managers_modal__add_member_list_item__icon--disabled":e})}),n.createElement("span",null,F.t("Add Channel Managers")));AddChannelManagersListItem.displayName="AddChannelManagersListItem";var U=a(0x1faa3f1ac),B=a(0x1a592c177),H=a(0x3865e8c2),W=a(0x87e5a179),V=a(0x46dbff89);let G=new i.Ay("channel_details"),ChannelManagersListItem=({channel:e,memberId:t,openModal:a,canActorManageChannels:r,member:i,isFocused:l,isFocusedWithin:o})=>{let s=(0,n.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),a({element:n.createElement(H.A,{member:i,channel:e}),isStackable:!0})},[a,e,i]),c=r&&n.createElement(U.A,{className:D()("p-channel_managers_modal__list_item_secondary_content",{"p-channel_managers_modal__list_item_secondary_content--visible":l||o}),onClick:s},G.t("Remove"));return n.createElement("div",{className:D()("p-channel_managers_modal__list_item",{"p-channel_managers_modal__list_item--focused":l})},n.createElement(B.A,{id:t,key:t,showPresence:!0,showStatus:!0,showHoverCard:!0,"data-qa":`channel-manager-${t}`,secondaryContent:c}))};ChannelManagersListItem.displayName="ChannelManagersListItem";let ChannelManagersListItemWrapper=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(e=>t((0,V.q)(e)),[t]),i=(0,E.d4)(t=>(0,W.B)(t,e.channel));return n.createElement(ChannelManagersListItem,{canActorManageChannels:i,openModal:a,...e})};ChannelManagersListItemWrapper.displayName="ChannelManagersListItemWrapper";var q=a(0x1b9d5cc0c),j=a(0x82980ab8),z=a(0x1b3b470ba),K=a(0x13638bd77);let $=new i.Ay("channel_details"),Y="ADD_CHANNEL_MANAGERS",ChannelManagersList=({experimentChannelManagerPilotGroupOn:e=!1,openAddChannelManagersModal:t,showAddChannelManagersRow:a,openMemberProfile:r,channelManagers:i,channel:l,canEditChannelManagers:o})=>{let s=i.map(e=>e.id),c=a?[Y,...s]:s,[d,m]=(0,n.useState)(null),p=i.length>=100,h=p&&o,_=(0,n.useCallback)(({id:e})=>{e===Y?p||t(l):r(e)},[l,t,r,p]),f=(0,n.useCallback)(({key:e})=>{let t=i.find(t=>t.id===e);if(t)return{"aria-label":(0,z.A)({name:(0,j.wg)(t),isSelf:(0,q.fy)(t)})}},[i]),b=(0,n.useCallback)((e,t)=>{if(t.key===Y)return n.createElement(AddChannelManagersListItem,{isDisabled:p});let a=i.find(e=>e.id===t.key);if(a)return n.createElement(ChannelManagersListItemWrapper,{channel:l,member:a,isFocused:!!t.hasFocus,isFocusedWithin:!!t.hasFocusWithin,memberId:t.key,openProfileCard:t.key===d,onPopoverClose:()=>{m(null)}})},[l,i,d,p]);return e?n.createElement(n.Fragment,null,h&&n.createElement(u.Ay,{className:"p-channel_managers_modal__alert",isIconVisible:!1},$.t("Channels can only have 100 Channel Managers.")),n.createElement(L.A,{"aria-label":$.t("{count, plural, =1 {# channel manager} other {# channel managers}}",{count:i.length}),height:h?328:400,keys:c,rowRenderer:b,getPropsForItem:f,width:520,onItemClick:_})):null};ChannelManagersList.displayName="ChannelManagersList";let ChannelManagersListWrapper=e=>{let t=(0,r.wA)();return n.createElement(ChannelManagersList,{openMemberProfile:e=>t((0,K.b)({memberId:e})),openAddChannelManagersModal:e=>t(T({channel:e,openModalProps:{isStackable:!0}})),...e})};ChannelManagersListWrapper.displayName="ChannelManagersListWrapper";var Q=a(0xf3b0bc58);let Z=new i.Ay("channel_details"),ChannelManagersModalEmptyState=({canEditChannelManagers:e,description:t,experimentChannelManagerPilotGroupOn:a,openAddChannelManagersModal:r,channel:i})=>a?e?n.createElement(Q.A,{"data-qa":"channel-managers-modal-empty-state",description:t,primaryActionText:Z.t("Add Channel Managers"),onClickPrimaryAction:()=>r(i)}):n.createElement(Q.A,{"data-qa":"channel-managers-modal-empty-state",description:t}):null;ChannelManagersModalEmptyState.displayName="ChannelManagersModalEmptyState";let ChannelManagersModalEmptyStateWrapper=e=>{let t=(0,r.wA)();return n.createElement(ChannelManagersModalEmptyState,{openAddChannelManagersModal:e=>t(T({channel:e,openModalProps:{isStackable:!0}})),...e})};ChannelManagersModalEmptyStateWrapper.displayName="ChannelManagersModalEmptyStateWrapper";var J=a(0x1de8cf578),X=a(0xe199fe31),ee=a(0x21d85d6e5),et=a(0xe684f705);let ea=new i.Ay("channel_details"),ChannelManagersModalContents=({experimentChannelManagerPilotGroupOn:e=!1,channelManagerIds:t,channel:a,isLoading:r})=>{let i=(0,E.Z2)(e=>{let a=(0,J.Z)(e,t);return(0,et.gA)(e,a)}),l=(0,E.d4)(e=>(0,W.B)(e,a)),s=(0,E.d4)(e=>(0,X.f)(e,a)),c=(0,E.wz)(e=>{let t={};return i.forEach(a=>{if(a){let n=(0,ee.sE)(e,a,!1,!1);t[a.id]={displayedName:(0,R.B)(n),memberObj:a}}}),t}),[d,m]=(0,n.useState)(""),[u,p]=(0,n.useState)(i||[]),h=(0,n.useCallback)(e=>{let t=new M.Ay(e);return((0,N.A)(i.map(a=>{let n=c[a.id].displayedName;return{value:a,score:0===e.length?0:t.normalizeAndScore(n)}}),"score")||[]).filter(({score:e})=>isFinite(e)).map(({value:e})=>e)},[c,i]);(0,n.useEffect)(()=>{d&&m(""),p(i)},[t]);let _=(0,n.useCallback)(e=>{let t=e.target.value??"";m(t),p(h(t))},[h]);if(!e)return null;let getEmptyStateMessage=()=>t.length?ea.rt("No matches found for {searchString}",{searchString:n.createElement("strong",null,d)}):ea.t("This channel doesn\u2019t have any Channel Managers yet.");return getEmptyStateMessage.displayName="getEmptyStateMessage",n.createElement(n.Fragment,null,r?n.createElement(o.A,{"data-qa":"channel-managers-modal-contents-loading"}):n.createElement(n.Fragment,null,n.createElement("div",null,(0,g.ju)(a)&&n.createElement("p",{className:"p-channel_managers_modal__connected_note"},ea.rt("Keep in mind that this is a Slack Connect channel and you can only add or remove Channel Managers from {hostName}.",{hostName:s}))),n.createElement("div",null,n.createElement(P.A,{placeholder:ea.t("Search Channel Managers"),"aria-label":ea.t("Search for channel managers"),value:d,onChange:_,icon:"search",autoFocus:!0,size:"medium",className:"p-channel_managers_modal__filter_input","data-qa":"channel-managers-modal-search-input"})),u?.length?n.createElement(ChannelManagersListWrapper,{channelManagers:u,experimentChannelManagerPilotGroupOn:e,channel:a,showAddChannelManagersRow:!d&&l,canEditChannelManagers:l,"data-qa":"channel-managers-modal-list"}):n.createElement("div",{className:"p-channel_managers_modal__empty_state_wrapper"},n.createElement(ChannelManagersModalEmptyStateWrapper,{description:getEmptyStateMessage(),canEditChannelManagers:l,channel:a,experimentChannelManagerPilotGroupOn:e}))))};ChannelManagersModalContents.displayName="ChannelManagersModalContents";var en=a(0xf184ac53);let er=new i.Ay("channel_details"),ChannelManagersModal=({channel:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>t((0,S.O)()),[t]),[i,l]=(0,n.useState)(!0),o=(0,E.d4)(e=>"on"===(0,v._Z)(e,"channel_manager_pilot")),s=(0,E.d4)(t=>(0,C.t)(t,e.id));if((0,n.useEffect)(()=>{t((0,en.y)({channelId:e.id,shouldFetchMemberObjects:!0})).then(()=>l(!1))},[t,e.id]),!o)return null;let c=er.rt("People who can manage {channelName}",{channelName:n.createElement(h.A,{channel:e})});return n.createElement(y.dW,{closeModal:a,className:"p-channel_managers_modal",dataQa:"channel-managers-modal"},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:c,subtitle:er.t("{count, plural, =1 {# Channel Manager} other {# Channel Managers}}",{count:s.length})})),n.createElement(ChannelManagersModalContents,{experimentChannelManagerPilotGroupOn:o,channel:e,channelManagerIds:s,isLoading:i}))};ChannelManagersModal.displayName="ChannelManagersModal";let ei=(0,I.e)(ChannelManagersModal);var el=a(0x6480ae5b),eo=a(0x20e77676b),es=a(0x1ec69ee01),ec=a(0x3711e82d),ed=a(0x6d72337);let em=new i.Ay("channel_details"),eu={elementName:"channel_manager_field",onClick:{enableClogAction:!0},UiStep:ec.UiStep.CHANNEL_DETAILS_EDIT_CHANNEL_MANAGERS},ChannelManagerField=({experimentChannelManagerPilotGroupOn:e,channel:t,channelManagers:a,canActorManageChannels:i,isLoading:l})=>{let m=a.length>0,u="about__channel_manager_field",p=(0,r.wA)(),h=(0,n.useCallback)(()=>{m?p(ei({channel:t,openModalProps:{isStackable:!0}})):p(T({channel:t,openModalProps:{isStackable:!0}}))},[p,t,m]),_=(0,n.useCallback)(e=>{e.stopPropagation()},[]),f=(0,n.useMemo)(()=>n.createElement("span",null,n.createElement("span",{className:"margin_right_25"},em.t("Managed by")),n.createElement(eo.A,{ariaLabel:em.t("More information about channel managers"),"data-qa":"help-link",articleId:0x793158c2e93,forceOpenInBrowser:!0,onClick:_},n.createElement(c.Ah,{name:"info",inline:!0}))),[_]),getMemberProfileCard=e=>{let t=n.createElement(s.A,{onClick:t=>{t.stopPropagation(),p((0,K.b)({memberId:e}))},"data-qa":`${u}__channel_manager_profile_link`},n.createElement(d.A,{id:e,className:"p-channel_manager_field__member"}));return(0,ed.yN)({memberId:e,children:t})};if(getMemberProfileCard.displayName="getMemberProfileCard",!e)return null;let renderFieldContent=()=>{if(!e)return null;if(l)return n.createElement(o.A,{size:"large",inline:!0});if(!m)return i?n.createElement("div",{"data-qa":`${u}__no_cms_with_permissions`},em.t("This channel doesn\u2019t have any Channel Managers yet."),n.createElement(s.A,{onClick:e=>{e.stopPropagation(),h()},"data-qa":`${u}__no_cms_with_permissions_link`},em.t("Add Channel Managers"))):n.createElement("span",{"data-qa":`${u}__no_cms_no_permissions`},em.t("Got questions? Ask an Admin to add a Channel Manager to help things run smoothly."));switch(a.length){case 1:return getMemberProfileCard(a[0]);case 2:return em.rt("{managerOne} and {managerTwo}",{managerOne:getMemberProfileCard(a[0]),managerTwo:getMemberProfileCard(a[1])});case 3:return em.rt("{managerOne}, {managerTwo} and {managerThree}",{managerOne:getMemberProfileCard(a[0]),managerTwo:getMemberProfileCard(a[1]),managerThree:getMemberProfileCard(a[2])});default:return em.rt("{managerOne}, {managerTwo}, {managerThree}, and {managerLink}",{managerOne:getMemberProfileCard(a[0]),managerTwo:getMemberProfileCard(a[1]),managerThree:getMemberProfileCard(a[2]),managerLink:n.createElement(s.A,{onClick:e=>{e.stopPropagation(),h()},"data-qa":"channel-manager-and-others-link"},em.t("{managerCount, plural, =1 {# other} other {# others}}",{managerCount:a.length-3}))})}};return renderFieldContent.displayName="renderFieldContent",n.createElement(el.A,{ariaLabel:em.t("Edit channel managers"),className:"p-admin_channel_modal__managers_field",content:renderFieldContent(),title:f,showEditButton:i,onClick:h,dataQa:u,autoClogProps:eu})};ChannelManagerField.displayName="ChannelManagerField";let ChannelManagerFieldWrapper=e=>{let t=(0,es.FB)(e.channel)||"",a=(0,E.d4)(t=>(0,W.B)(t,e.channel)),r=(0,E.d4)(e=>(0,C.t)(e,t)),i=(0,E.Z2)(e=>(0,J.Z)(e,r));return n.createElement(ChannelManagerField,{channelManagers:i,canActorManageChannels:a,...e})};ChannelManagerFieldWrapper.displayName="ChannelManagerFieldWrapper";var ep=a(0x20dd1a0d6),eh=a(0x11a296110),e_=a(0x6cc5eee0),ef=a(0x11c2091f4),eb=a(0x2011f2367),eg=a(0x173a5485e),ey=a(0x11d434b9b),eA=a(0x209a80f2f);let ex=new i.Ay("channel_details");function ChannelPurposeField({channel:e,onChange:t}){let a=(0,r.wA)(),i=(0,E.d4)(e=>"on"===(0,v._Z)(e,"channel_details_inline")),l=(0,E.d4)(t=>(0,ey.s)(t,e.id).ok),[o,s]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),{channelPurposeInput:m,onSaveChannelPurpose:u}=(0,eb.A)({channel:e,onChange:t});function handleSave(){d(!0),u().then(()=>{s(!1)}).finally(()=>{d(!1)})}(0,n.useEffect)(()=>{o||t?.(!1)},[o,t]);let p=(0,es.z8)(e),h=ex.t("Description");return o&&i?n.createElement(ef.A,{title:h},m,n.createElement("div",{className:"p-field__footer"},n.createElement(eh.Ay,{className:"margin_right_50",disabled:c,onClick:()=>s(!1),size:"small",type:"outline"},ex.t("Cancel")),n.createElement(eh.lV,{disabled:c,loading:c,onClick:handleSave,size:"small",type:"primary","aria-label":ex.t("Save")},ex.t("Save")))):n.createElement(el.A,{ariaLabel:p?ex.t("Edit channel purpose"):ex.t("Add channel purpose"),dataQa:"about__purpose_field",isDisabled:!l,onClick:()=>{i?s(!0):a((0,eA.A)({channelId:e.id,isStackable:!0}))},text:p?n.createElement(e_.A,{noHighlights:!0,noJumbomoji:!0,text:p}):n.createElement("div",{className:"sk_foreground_max"},ex.t("Add a description")),title:ex.t("Description"),channelProperty:eg.u.PURPOSE,channel:e})}ChannelPurposeField.displayName="ChannelPurposeField";var eE=a(0x1ec194362),eC=a(0x2190b3693),ek=a(0xc66ee342),ev=a(0x1df96de4c),eS=a(0x2376ea9bb),eI=a(0xe0376d2),ew=a(0x24546e7f2),eT=a(0x20ef3966f),eN=a(0x16475a65c),eM=a(0x1673f3229),eR=a(0x21da4684a),eP=a(0xe874a88a),eL=a(0x1e864b930),eO=a(0x163e6b717);let eD="initial",eF="confirm",eU="conflict",eB="error";var eH=a(0x17cc64c8),eW=a(0x475c1cf9),eV=a(0x1a02c72b5),eG=a(0xd6a16321),eq=a(0x12185e091),ej=a(0x73d7ee71),ez=a(0x11640e941),eK=a(0x16df7a1d3),e$=a(0xa1832ae4),eY=a(0x40b0507e),eQ=a(0x21e88835e),eZ=a(0x1266f1359),eJ=a(0x217553e42),eX=a(0xff064c91),e0=a(0x20af7e61d),e1=a(0x100fb9ff5),e2=a(0x11c82607b),e4=a(0x19c76d181),e5=a(0x22a4fd9db);let e3=(0,e2.Ay)("Submit updates to the teams this channel is shared with on your organization or update to cross-workspace or org-wide to the backend, then update the store on success",(e,t,a)=>{let n,r=t(),i="on"===(0,v._Z)(r,"conversations_set_teams_api");if(!a||!a.channelId)return eP.S.resolve();let l=(0,eJ.OL)(r,a.channelId,!1);return(l||eP.S.resolve(),(0,e4.u8)(r)&&((0,e1.t)(l)||i))?i?e((0,eW.o)({reason:"Update which teams/workspaces can access the channel",channel:a.channelId,upgradeToOrgWide:a.orgWide,internalTeamIds:a.teamIds})).then(()=>e((0,e5.a)({channelId:a.channelId,orgWide:a.orgWide,internalTeamIds:a.teamIds}))):(!a.orgWide&&a.teamIds&&(n=a.teamIds),e((0,e0.c)({reason:"Update which teams/workspaces can access an enterprise shared channel",channelId:a.channelId,orgWide:a.orgWide,teamIds:n})).then(()=>e((0,e5.a)({channelId:a.channelId,orgWide:a.orgWide,internalTeamIds:n})))):eP.S.resolve()});e3.meta={name:"updateOrgAccessForChannelApi",key:"createThunkUpdateOrgAccessForChannelApi",description:"Submit updates to the teams this channel is shared with on your organization or update to cross-workspace or org-wide to the backend, then update the store on success"};var e6=a(0x1ee439e69);let hcLink=({text:e})=>n.createElement(U.A,{href:(0,eQ.Y)()},e);hcLink.displayName="hcLink";let e8=new i.Ay("channel_details"),ManageOrgAccessModalConfirmStep=({id:e,onClose:t,switchPane:a,totalEnterpriseTeams:i,newChannelName:l,shareWith:o,teamIdsSelected:s})=>{let c=(0,r.wA)(),d=(0,E.d4)(t=>(0,eJ.OL)(t,e)),m=(0,eK.S)(d),u=(0,E.d4)(e6.H2),p=(0,E.d4)(x.ZT),_=(0,E.Z2)(e6.Xp),f=(0,E.d4)(e=>(0,ej.R)(e,d)),b=(0,E.d4)(e=>(0,eY.A)(e,d)),g=(0,E.d4)(e=>"on"===(0,v._Z)(e,"conversations_set_teams_api")),[A,C]=(0,n.useState)(!1),k=(0,n.useCallback)(e=>{let t,n=e8.t("Could not update settings");switch(e.name){case eW.d.UserNotFound:t=e8.rt("For some weird reason, we don\u2019t know who you are. Reloading Slack might clear things up. If it doesn\u2019t, please <a>drop us a line</a>.",{"<a>":hcLink});break;case eW.d.ChannelNotFound:case eW.d.InvalidChannelId:t=e8.rt("For some weird reason, we can\u2019t find that channel. Reloading Slack might clear things up. If it doesn\u2019t, please <a>drop us a line</a>.",{"<a>":hcLink});break;case eW.d.ChannelTypeNotSupported:t=e8.rt("You can\u2019t add or remove workspaces from that channel.");break;case eW.d.ChannelIsFrozen:t=e8.rt("You can\u2019t add or remove workspaces from archived channels.");break;case eW.d.TeamNotFound:case eW.d.InvalidTargetTeam:t=e8.rt("For some weird reason, we can\u2019t find those workspaces. Reloading Slack might clear things up. If it doesn\u2019t, please <a>drop us a line</a>.",{"<a>":hcLink});break;case eW.d.InsufficientPermissionsToShareChannel:t=e8.rt("Unfortunately, you don\u2019t have permission to add or remove those workspaces. You can go back and edit the workspaces or you may want to ask an admin for help.");break;case eW.d.NotAllowedForGridWorkspace:t=e8.rt("External people are in this channel, so it can only be added to workspaces that have Slack Connect enabled.");break;case eW.d.CouldNotSetTeamsForChannel:t=e8.rt("For some weird reason, we couldn\u2019t add or remove those workspaces. Reloading Slack might clear things up. If it doesn\u2019t, please <a>drop us a line</a>.",{"<a>":hcLink});break;case eW.d.CouldNotMoveSlackConnectChannel:t=e8.rt("Sorry! Something went wrong. Please try again.");break;case eW.d.RestrictedAction:default:t=e8.t("For some weird reason, that didn\u2019t work.")}a(eB,{message:t,title:n})},[a]),S=(0,n.useCallback)(()=>{C(!0);let a="all"===o,n=!a&&1===s.length;if(g){let r=[];!(0,ez.M)(d)&&l&&l.length&&r.push(c((0,eX.O)({channel:d,newName:l}))),Promise.all(r).then(()=>c(e3({channelId:e,orgWide:a,teamIds:a?void 0:s}))).then(()=>{n?setTimeout(()=>{c((0,eV.o)((0,eG.pr)(e))),t()},2500):t()}).catch(e=>{k(e)});return}let r={};if(r.orgWide=a,(0,ez.M)(d))a||(r.teamIds=s),c(e3({channelId:e,...r})).then(()=>{t()}).catch(e=>{k(e)});else{a||(r.targetDomains=s.map(e=>{let t=(0,eZ.$D)(p);return(0,e6._J)(t,e).domain}));let e=[];l&&l.length&&e.push(c((0,eX.O)({channel:d,newName:l}))),eP.S.all(e).then(()=>c((0,eH.mS)({channel:d,...r}))).then(()=>{t()}).catch(e=>{k(e)})}},[d,c,k,e,l,t,o,p,s,g]),makeChannelName=()=>l&&l.length?l:n.createElement(h.A,{channel:d});makeChannelName.displayName="makeChannelName";let makeTeamNamesList=(e=[])=>{let t=(0,eZ.$D)(p),a=e.length?e:s;if(a.length>=5)return e8.t("{workspaceCount} workspaces",{workspaceCount:a.length});let r=(0,eT.A)(a,e=>{let a=(0,e6._J)(t,e);return(0,e$.t8)(a)?n.createElement(eO.A,{type:"unknown"}):(0,e$.F1)(a)});return 1===r.length?r[0]:(0,eL.A)(r,{react:!0,strong:!0})};makeTeamNamesList.displayName="makeTeamNamesList";let renderChangesDetails=()=>{let e=(0,eT.A)(_,"id"),t=m?e:f,a=(0,eN.A)(s,f),r=(0,eM.A)(t,...s),l=(0,eM.A)((0,eR.A)(e,t),...r),c=[],p=0,addPoint=(e,t)=>{p+=1,c.push({data:e,key:p,isHeading:!!t})},h=[],g={channelName:makeChannelName(),teamNames:makeTeamNamesList(a)},formatOptions=({key:e,text:t})=>n.createElement("strong",{key:e},t);"all"===o?(addPoint(e8.rt("Share <span>{channelName}</span> with all <span>{totalEnterpriseTeams}</span> workspaces in <strong>{orgName}</strong>.",{totalEnterpriseTeams:i,channelName:makeChannelName(),orgName:u},formatOptions),!0),(0,eq.Zp)(d)?addPoint(e8.rt("If invited, members of <strong>{orgName}</strong> will be able to join the channel and see its message history and files.",{orgName:u},formatOptions)):b||(addPoint(e8.rt("All members of <strong>{orgName}</strong> will be able to find and join the channel and see its message history and files.",{orgName:u})),addPoint(e8.t("Members of any workspaces created in the future will also have access.")))):(m&&addPoint(r.length?e8.rt("Stop sharing <span>{channelName}</span> with {teamNames}.",{channelName:makeChannelName(),teamNames:makeTeamNamesList(r)},formatOptions):e8.rt("Share <span>{channelName}</span> with members of {teamNames}.",{channelName:makeChannelName(),teamNames:makeTeamNamesList(l)},formatOptions),!0),!m&&a.length&&(addPoint(b?e8.rt("Share <span>{channelName}</span> with {teamNames}.",g,formatOptions):e8.rt("Share <span>{channelName}</span> with members of {teamNames}.",g,formatOptions),!0),(0,eq.Zp)(d)?addPoint(a.length>1?e8.rt("If invited, members of these workspaces will be able to join the channel and see its message history and files."):e8.rt("If invited, members of this workspace will be able to join the channel and see its message history and files.")):a.length>1&&!b?addPoint(e8.rt("All members of these workspaces will be able to find and join the channel and see its message history and files.")):b||addPoint(e8.rt("All members of this workspace will be able to find and join the channel and see its message history and files."))),r.length&&(m||addPoint(e8.rt("Stop sharing <span>{channelName}</span> with members of {teamNames}.",{channelName:makeChannelName(),teamNames:makeTeamNamesList(r)},formatOptions),!0),addPoint(r.length>1?e8.rt("Members will not be able to access the channel from these workspaces."):e8.rt("All members of {workspace} will not be able to access the channel from these workspaces.",{workspace:makeTeamNamesList(r)})),addPoint(r.length>1?e8.rt("Apps installed by members of these workspaces will need to be added again."):e8.rt("Apps installed by members of {workspace} will need to be added again.",{workspace:makeTeamNamesList(r)})),l.length&&addPoint(e8.rt("Members of {workspaces} will have access to this channel.",{workspaces:makeTeamNamesList(l)})))),c.forEach(e=>{let t={className:e.isHeading?"p-manage_org_access_modal--workspace_access_heading":"p-manage_org_access_modal--workspace_access_line_item"};h.push(n.createElement("p",{key:e.key,...t},e.data))});let y=n.createElement("p",{className:"p-manage_org_access_modal--educational_text"},e8.rt("The channel will be notified of these changes. Learn more about <a>managing channels</a> across workspaces.",null,({key:e,text:t})=>n.createElement(eo.A,{key:e,articleId:0x1ac69e1923,forceOpenInBrowser:!0},t)));return n.createElement("div",{className:"p-manage_org_access_modal--content_text"},h,y)};renderChangesDetails.displayName="renderChangesDetails";let I=e8.t("Review Changes");return n.createElement(n.Fragment,null,n.createElement(y.rQ,null,n.createElement(y.Rc,{title:I})),n.createElement(y.$m,null,n.createElement(y.qf,{"data-qa":"change_details"},renderChangesDetails())),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{onClick:t,type:"outline","aria-label":e8.t("Cancel")},e8.t("Cancel")),n.createElement(y.s_,{type:"primary",onClick:S,loading:A,autoFocus:!0,"aria-label":e8.t("Save Changes")},e8.t("Save Changes")))))};ManageOrgAccessModalConfirmStep.displayName="ManageOrgAccessModalConfirmStep";var e7=a(0x543a781e),e9=a(0x18f7713e4),te=a(0x1ecc7f772);let tt=new i.Ay("channel_details"),ManageOrgAccessModalConflictStep=({id:e,onClose:t,switchPane:a,setNewChannelName:i})=>{let l=(0,r.wA)(),o=(0,E.d4)(t=>(0,eJ.OL)(t,e)),s=(0,E.d4)(e6.H2),[c,d]=(0,n.useState)(""),[m,u]=(0,n.useState)(!1),[p,_]=(0,n.useState)(!0),[f,b]=(0,n.useState)(""),g=(0,e7.A)(f,325),A=(0,n.useRef)(""),x=(0,te.Mn)(o);"#"===x[0]&&(x=x.substr(1));let C=(0,n.useCallback)(()=>{i(f),a(eF)},[f,i,a]),k=(0,n.useCallback)(({value:e})=>{u(!1),d(""),_(!0),A.current=e},[]),v=(0,n.useCallback)(e=>{if((0,te.Mn)(o)===e){d(""),u(!1),_(!0);return}l((0,eH._s)({channel:o,newChannelName:e})).then(t=>{if(A.current===e&&(!t.ok||t.name_taken)){let t=tt.rt("<strong>{name}</strong> is already in use. Please choose a new name.",{name:e},({key:e,text:t})=>n.createElement("strong",{key:e},t));u(!1),d(t),_(!0)}else u(!0),d(""),_(!1)}).catch(()=>{A.current===e&&(d(""),u(!1),_(!0),a(eB))})},[o,l,a]),onValidName=({value:e})=>{_(!0),d(""),u(!1),b(e),A.current=e};(0,n.useEffect)(()=>{g&&(d(""),v(g))},[v,g]);let S=tt.t("Rename this channel"),getContents=()=>n.createElement("div",{className:"p-manage_org_access_modal--content_text"},n.createElement("p",null,tt.rt("<strong>{name}</strong> is already in use in another {orgName} workspace. Choose a new name if you want to update which workspaces can access this channel.",{name:n.createElement(h.A,{channel:o}),orgName:s},({key:e,text:t})=>n.createElement("strong",{key:e},t))),n.createElement("label",{htmlFor:"channel_rename",className:"c-label"},n.createElement("span",{className:"c-label__text"},tt.t("Channel name"))),n.createElement(e9.A,{additionalVerificationError:c,additionalVerificationGood:m,channel:o,id:"channel_rename",onInvalid:k,onValid:onValidName,placeholder:tt.t("Rename {title}",{title:(0,te.Mn)(o)}),shouldFix:!0,value:x,focusOnMount:!0}));return getContents.displayName="getContents",n.createElement(n.Fragment,null,n.createElement(y.rQ,null,n.createElement(y.Rc,{title:S})),n.createElement(y.$m,null,n.createElement(y.qf,null,getContents())),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{onClick:t,type:"outline","aria-label":tt.t("Cancel")},tt.t("Cancel")),n.createElement(y.s_,{type:"primary",onClick:C,disabled:p,"aria-label":tt.t("Next")},tt.t("Next")))))};ManageOrgAccessModalConflictStep.displayName="ManageOrgAccessModalConflictStep";let ta=new i.Ay("channel_details"),ManageOrgAccessModalErrorStep=({onClose:e,title:t,message:a})=>{let r=t||ta.t("Something went wrong"),i=a||ta.t("For some reason, your changes weren\u2019t saved. Please try again.");return n.createElement(n.Fragment,null,n.createElement(y.rQ,null,n.createElement(y.Rc,{title:r})),n.createElement(y.$m,null,n.createElement(y.qf,null,n.createElement("p",null,i))),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{onClick:e,type:"outline","aria-label":ta.t("Cancel")},ta.t("Cancel")),n.createElement(y.s_,{type:"primary",onClick:e,autoFocus:!0,"aria-label":ta.t("OK")},ta.t("OK")))))};ManageOrgAccessModalErrorStep.displayName="ManageOrgAccessModalErrorStep";var tn=a(0x9e671ad),tr=a(0x357885ff),ti=a(0x65455bc3),tl=a(0x1d24ec95f),to=a(0x1d2cd7755),ts=a(0x139c79d16),tc=a(0x1de80d519),td=a(0x19dc73101),tm=a(0xf5bbd10a),tu=a(0x21b0fd259),tp=a(0x1aad32b98),th=a(0x213feb2f),t_=a(0x45cf74d9),tf=a(0x204e024f),tb=a(0x1047c38ea),tg=a(0x14c522187),ty=a(0xb1f0729f);let tA=new i.Ay("channel_details"),ManageOrgAccessModalInitialStep=({id:e,onClose:t,switchPane:a,preselectedTeamIds:i,shareWith:l="specific",setShareWith:o,teamIds:s,setTeamIds:c,setTotalEnterpriseTeams:d})=>{let m=(0,r.wA)(),p=(0,tm.A)({label:"escal-ent-tools-frameworks"}),h=(0,E.d4)(t=>(0,eJ.OL)(t,e)),_=(0,E.d4)(e6.H7),f=(0,E.d4)(et.cA),b=(0,E.d4)(e=>(0,ej.R)(e,h)),A=(0,E.d4)(t_.A),C=(0,E.d4)(x.jV),k=(0,E.d4)(e6.H2),S=(0,E.d4)(th.a),I=(0,E.d4)(e=>!0===(0,ty.SI)(e,"allow_account_type_edit_channel_workspaces_override")),w=(0,E.d4)(e=>"on"===(0,v._Z)(e,"conversations_set_teams_api")),T=(0,E.d4)(tg.aG),M=(0,E.d4)(t=>(0,tg.HD)(t,e)),R=(0,E.Z2)(tg.b1),P=(0,E.d4)(e=>"on"===(0,v._Z)(e,"etf_escal_permission_fe_logs")),[L,O]=(0,n.useState)(!1),[D,F]=(0,n.useState)(!1),[U,B]=(0,n.useState)(!1),H=(0,ez.M)(h),W=(0,eK.S)(h),V=(0,n.useCallback)(e=>{if(H||"specific"!==e){if(W){if("all"===e)return!1}else if("specific"===e&&b&&(0,tn.A)((0,N.A)(s,"value"),(0,N.A)(b,"value")))return!1}else if(!s.length||1===s.length&&s.indexOf(_.id)>-1)return!1;return!0},[_.id,b,W,H,s]),G=(0,n.useCallback)(e=>{let t=e.target.value;o(t),O("specific"===t&&0===s.length),V(t)?B(!0):B(!1)},[V,o,s.length]),q=(0,n.useCallback)(e=>{let t=e.map(e=>e.value);c(t),O(0===t.length),(0,tn.A)((0,N.A)(t,"value"),(0,N.A)(b,"value"))?B(!1):B(!0)},[b,c]),j=(0,n.useCallback)(e=>{!e.ok||e.name_taken?a(eU):a(eF),O(!1),F(!1)},[a,O,F]),z=(0,n.useCallback)(()=>{(F(!0),U)?H?"all"===l?m((0,eH.XX)({reason:"get-all-enterpise-teams"})).then(e=>{d(e.num_found)}).then(()=>{a(eF),O(!1),F(!1)}):(a(eF),O(!1),F(!1)):m((0,eH._s)({channel:h,newChannelName:(0,te.Mn)(h)})).then(e=>{"all"===l?m((0,eH.XX)({reason:"get-all-enterpise-teams"})).then(e=>{d(e.num_found)}).then(()=>j(e)):j(e)}).catch(()=>{F(!1),O(!1),a(eB)}):t()},[h,m,U,H,t,d,l,a,j]),K=(0,n.useCallback)(e=>{if(P&&p&&p?.error(Error("debug workspace picker escal"),{teamId:e?.id,enterpriseId:C,teamEnterpriseId:(0,e$.Ss)(e),isOrgAdminOrOwner:(0,tu.n5)(f)||(0,tu.rr)(f),currentMemberTeams:(0,tp.HI)(f),isTeamOpen:(0,tb.kN)(e),isTeamUnlisted:(0,tb.ol)(e),orgLevelPermission:T,channelLevelPermission:M,allowedTeamsPermission:R},{subtype:"permissions-store"}),e.id===C||(0,e$.Ss)(e)!==C)return!1;if(!w)return!!((0,tu.n5)(f)||(0,tu.rr)(f)||(0,tp.HI)(f).includes(e.id)||(0,tb.kN)(e))||!(0,tb.ol)(e)&&!!M;if(T)return!0;let t=T||R.length>0;return!!(I&&t||(0,tb.kN)(e)||(0,tp.HI)(f).includes(e.id)||b.includes(e.id)||R.includes(e.id))},[R,T,M,f,C,w,P,b,p,I]),$=(0,n.useMemo)(()=>({entities:{teams:{includeCurrentTeam:!0}},sort:{frecency:!1},limit:50,allowEmptyQuery:!0,filter:K}),[K]),maybeRenderDisallowedWorkspacesNote=()=>!(0,g.ju)(h)||A?null:n.createElement(u.Ay,{type:u.QE.inline,level:u.A_.info,className:"margin_bottom_100"},tA.rt("External people are in this channel, so it can only be added to workspaces that have Slack Connect enabled.",{orgName:n.createElement("strong",null,k)}));maybeRenderDisallowedWorkspacesNote.displayName="maybeRenderDisallowedWorkspacesNote";let processOption=e=>{if(!(0,g.ju)(h))return e;let t=e.value,a=!(0,tf.O)({slackConnectAllowedWorkspacesPref:S,teamIds:[t]});return{...e,isDisabled:a,secondaryContent:a?n.createElement("div",{className:"p-manage_org_access_modal__workspace_access_list_item_secondary_content"},tA.t("Slack Connect isn\u2019t enabled")):null}};processOption.displayName="processOption";let processOptions=e=>{let t=e.map(e=>processOption(e));return eP.S.all(t).then(e=>{let t=(0,tr.A)((0,ti.A)((0,tl.A)(e,"isDisabled")));return eP.S.resolve(t)})},renderAllWorkspaces=()=>{let e=!!((0,g.ju)(h)&&!A);return n.createElement(to.A,{type:"inline",cursor:"pointer",className:"p-manage_org_access_modal--input_label",htmlFor:"all-workspaces",isDisabled:e,text:tA.rt("All {orgName} workspaces",{orgName:k}),subtext:e?tA.rt("Slack Connect isn\u2019t enabled for all workspaces in {orgName}.",{orgName:k}):null},n.createElement(ts.A,{className:"small_right_margin",disabled:e,id:"all-workspaces",name:"share_with",onClick:G,value:"all",defaultChecked:"all"===l||void 0,autoFocus:"all"===l||void 0}))};renderAllWorkspaces.displayName="renderAllWorkspaces";let renderOption=e=>n.createElement(tc.e,{id:e.value,key:e.value,team:e.entity,isDisabled:e.isDisabled,secondaryContent:e.secondaryContent});renderOption.displayName="renderOption";let maybeRenderWorkspacePicker=()=>{if("all"===l)return null;let e=i.map(e=>({value:e}));return n.createElement("div",{className:"margin_left_150"},n.createElement(td.h,{selectedOptions:e,renderOption:renderOption,processOptions:processOptions,width:"100%",selectId:"manage_workspace_access_team_picker",onSelectedItemsChange:q,placeholderText:tA.t("Enter the name of a workspace\u2026"),searcherOptions:$}))};maybeRenderWorkspacePicker.displayName="maybeRenderWorkspacePicker";let renderSpecificWorkspaces=()=>n.createElement("div",null,n.createElement(to.A,{type:"inline",cursor:"pointer",className:"p-manage_org_access_modal--input_label",htmlFor:"specific-workspaces",text:tA.t("Selected workspaces")},n.createElement(ts.A,{className:"small_right_margin",id:"specific-workspaces",name:"share_with",onClick:G,value:"specific",defaultChecked:"specific"===l||void 0,autoFocus:"specific"===l||void 0})),maybeRenderWorkspacePicker());renderSpecificWorkspaces.displayName="renderSpecificWorkspaces";let renderContent=()=>{let e;return e=(0,eq.Zp)(h)?tA.t("People from workspaces you select can be added to this channel."):tA.t("People from workspaces you select can find and be added to this channel."),n.createElement("div",{className:"p-manage_org_access_modal-options--content_text"},n.createElement("p",null,e),maybeRenderDisallowedWorkspacesNote(),renderSpecificWorkspaces(),renderAllWorkspaces())};renderContent.displayName="renderContent";let Y=tA.t("Which workspaces can access this channel?"),Q=U?tA.t("Next"):tA.t("Done");return n.createElement(n.Fragment,null,n.createElement(y.rQ,null,n.createElement(y.Rc,{title:Y})),n.createElement(y.$m,null,n.createElement(y.qf,null,renderContent())),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{onClick:t,type:"outline","aria-label":tA.t("Cancel")},tA.t("Cancel")),n.createElement(y.s_,{type:"primary",onClick:z,disabled:L,loading:D,"aria-label":Q},Q))))};ManageOrgAccessModalInitialStep.displayName="ManageOrgAccessModalInitialStep";var tx=a(0x7fae732f);let tE=new i.Ay("channel_details"),ManageOrgAccessModal=({id:e})=>{let t=(0,r.wA)(),a=(0,E.d4)(t=>(0,eJ.OL)(t,e)||void 0),i=(0,E.d4)(e=>(0,tx.n)(e,a)||""),l=(0,E.d4)(e=>(0,ej.R)(e,a)||(0,ev.B4)()),o=(0,n.useCallback)(()=>t((0,S.O)()),[t]),s=(0,ez.M)(a),c=(0,eK.S)(a),d=tE.t("Manage Org Access Initial"),m=tE.t("Manage Org Access Conflict"),u=tE.t("Manage Org Access Confirm"),p=tE.t("Manage Org Access Error"),[h,_]=(0,n.useState)(c?"all":"specific"),f=(0,eI.A)(s?c?[]:l:[i]),[b,g]=(0,n.useState)(f),[y,A]=(0,n.useState)(0),[x,C]=(0,n.useState)(""),k=(0,n.useMemo)(()=>({[eD]:{render:t=>n.createElement(ManageOrgAccessModalInitialStep,{...t,id:e,onClose:o,preselectedTeamIds:b,shareWith:h,setShareWith:_,teamIds:b,setTeamIds:g,setTotalEnterpriseTeams:A}),modalProps:{contentLabel:d}},[eU]:{render:t=>n.createElement(ManageOrgAccessModalConflictStep,{...t,id:e,onClose:o,setNewChannelName:C}),modalProps:{contentLabel:m}},[eF]:{render:t=>n.createElement(ManageOrgAccessModalConfirmStep,{...t,id:e,onClose:o,totalEnterpriseTeams:y,newChannelName:x,shareWith:h,teamIdsSelected:b}),modalProps:{contentLabel:u}},[eB]:{render:e=>n.createElement(ManageOrgAccessModalErrorStep,{...e,onClose:o}),modalProps:{contentLabel:p}}}),[e,o,b,h,y,x,d,m,u,p]);return n.createElement(ew.A,{closeModal:o,defaultPane:eD,panes:k,className:"p-manage_org_access_modal",dataQa:"manage_org_access_modal"})};ManageOrgAccessModal.displayName="ManageOrgAccessModal";let tC=(0,I.e)(ManageOrgAccessModal);var tk=a(0x19d55d0e1),tv=a(0x18b8a1e5b),tS=a(0x20679dcfc),tI=a(0x14ea3ce99);let tw=new i.Ay("channel_details"),tT={uiStep:ec.UiStep.CHANNEL_DETAILS_EDIT_ORG_WORKSPACES},ManageOrgAccess=({id:e,disabled:t})=>{let a=(0,r.wA)(),i=(0,E.d4)(t=>(0,eJ.OL)(t,e)),l=(0,E.d4)(x.jV)??"",o=(0,E.d4)(e6.H2),s=(0,E.d4)(t=>(0,tg.lY)(t,e).reason),c=(0,E.d4)(e=>(0,ej.R)(e,i)??ev.Ml),d=(0,E.d4)(t=>(0,tI.Lp)(t,(0,tS.l)(e),!1)||void 0),m=(0,E.d4)(e=>{let t;return t=new Set,d?.shares&&[...Object.entries(d.shares?.public||{}),...Object.entries(d.shares?.private||{})].forEach(([a])=>{let n=(0,eJ.OL)(e,a),r=(0,tx.n)(e,n);r&&t.add(r);let i=(0,ej.R)(e,n);i?.forEach(e=>t.add(e))}),[...t.values()]}),u=(0,tk.jT)(i),p=u?m:c,h=(0,tv.O)(i),_=(0,n.useCallback)(()=>h?tw.rt("Added to all workspaces at {orgName}",{orgName:n.createElement(f.A,{id:l})}):n.createElement("span",{className:"inline_flex flex_wrap"},p.map(e=>n.createElement("span",{key:e,className:"inline_flex align_items_center"},n.createElement(eS.A,{className:"margin_right_25",id:e,size:16}),n.createElement(f.A,{className:"margin_right_50",id:e,bold:!1})))),[h,l,p]),b=(0,n.useCallback)(()=>s===tg.gy.RequiredOrOrgDefaultChannel?tw.rt("This channel is required by Slack or your organization, so it can\u2019t be added to or removed from any {org_name} workspaces.",{org_name:n.createElement("strong",null,o)}):s===tg.gy.ArchivedOrFrozen?tw.rt("This channel is archived, so it can\u2019t be added to any other {org_name} workspaces.",{org_name:n.createElement("strong",null,o)}):tw.rt("You don\u2019t have permission to add this channel to other {org_name} workspaces.",{org_name:n.createElement("strong",null,o)}),[s,o]),g=(0,n.useCallback)(()=>{u||a(tC({id:e,openModalProps:{isStackable:!0}}))},[a,e,u]),y=(0,n.useCallback)(e=>{e.stopPropagation()},[]),A=u?tw.t("Workspaces with access to this canvas"):tw.t("Workspaces with access to this channel");return n.createElement(el.A,{ariaLabel:tw.t("Edit access to workspace"),dataQa:"settings__workspaces_field",disabledText:b(),isDisabled:t,onClick:g,showEditButton:!u,text:n.createElement(n.Fragment,null,_(),n.createElement("br",null),u?null:n.createElement(eo.A,{onClick:y,articleId:0x1ac69e1923},tw.t("Learn more"))),title:A,autoClogProps:tT})};ManageOrgAccess.displayName="ManageOrgAccess";var tN=a(0x20b26d1ea),tM=a(0x5738b4bc),tR=a(0x5c354532);function isRenameChannelOptionEnabled(e,t){return!!t&&(!!(0,tR.JF)(e,{channelId:t})||(0,tM.E)(e,t))}var tP=a(0x4c6fcfc3),tL=a(0x14dbdd890);let ExternalRecordLink=({url:e,size:t,label:a,className:r})=>e?n.createElement(U.A,{className:r,href:e},a&&n.createElement("span",{className:"padding_right_25"},a),n.createElement(c.Ah,{size:t,name:"new-window",inline:!0})):null;ExternalRecordLink.displayName="ExternalRecordLink";var tO=a(0x8b588d25),tD=a(0x8b60780c),tF=a(0x1c760ba43),tU=a(0x204000df3),tB=a(0x14236acae),tH=a(0x14abaa6da),tW=a.n(tH);let tV=new i.Ay("recordchannels");function RecordChannelDetails({channel:e,className:t}){let a=(0,r.wA)(),i=(0,tO.iJ)(e),l=(0,E.d4)(t=>(0,te.SB)(t,e)),s=(0,n.useCallback)(()=>{a((0,tD.D)({tabId:tF.fY.RecordOverview,channelId:e.id}))},[a,e.id]),c=(0,E.d4)(e=>(0,tB.PQ)(e,i)),d=(0,tU.Eh)(c);return i?n.createElement("div",{className:D()(tW().record_channel_details,t)},n.createElement("div",{className:tW().record_channel_details_heading},n.createElement("h3",null,tV.t("Salesforce Record")),d&&n.createElement(o.A,{size:"medium"}),!d&&c?.external_url&&n.createElement(ExternalRecordLink,{url:c?.external_url,className:"bold caption",label:tV.t("Open in Salesforce")})),n.createElement("div",{className:tW().record_channel_details_info},n.createElement(U.A,{onClick:s,className:"bold"},l),n.createElement(tL.r,{className:tW().record_channel_details_breadcrumbs,channelId:e.id,includePrefix:!0}))):null}RecordChannelDetails.displayName="RecordChannelDetails";var tG=a(0xf6ed6f31),tq=a(0x155965105),tj=a(0xe62fe2d0),tK=a(0x6960d8b9),t$=a(0x1c91944c9),tY=a(0x9a5066aa),tQ=a(0x1459cd48f);let tZ=new i.Ay("channel_details"),tJ={uiStep:ec.UiStep.CHANNEL_DETAILS_JUMP_TO_CHANNEL_START,onClick:{enableClogAction:!0}},tX={uiStep:ec.UiStep.CHANNEL_DETAILS_LEAVE,onClick:{enableClogAction:!0}},ChannelInfo=({id:e,canLeaveChannel:t,channel:a,creatorName:i,onPurposeChange:o,onTopicChange:s,onClose:c,shouldShowChannelName:d,shouldShowCreatedBy:m,teamId:u,isPaidTeam:p,isRecord:h,showManageOrgAccess:_,isManageOrgAccessDisabled:f,experimentChannelManagerPilotGroupOn:b,isLoadingChannelManagers:g})=>{let y=(0,r.wA)(),A=(0,eq.JM)(a),x=(0,n.useCallback)(()=>{c?.()!==!1&&y((0,tQ.B)({channelId:e}))},[y,c,e]),E=(0,es.B9)(a),C=(0,n.useCallback)(()=>{c?.()!==!1&&y((0,tY.A)({channelId:e,teamId:u,ts:Number(E).toFixed(6)}))},[e,E,y,c,u]);return n.createElement(n.Fragment,null,d&&n.createElement(ek.A,null,n.createElement(ep.A,{channel:a})),n.createElement(ek.A,null,h&&n.createElement(RecordChannelDetails,{channel:a,className:"p-field"}),n.createElement(eE.A,{channel:a,onChange:s}),n.createElement(ChannelPurposeField,{channel:a,onChange:o}),_&&n.createElement(ManageOrgAccess,{id:e,disabled:f}),b&&p&&!A&&n.createElement(ChannelManagerFieldWrapper,{experimentChannelManagerPilotGroupOn:b,channel:a,isLoading:g}),m&&n.createElement(eC.A,{autoClogProps:tJ,onClick:C,text:tZ.t("{creatorName} on {createdDate, date, long}",{creatorName:(0,l.Ay)(i),createdDate:(0,tK.$4)(E,{returnMoment:!1})}),title:tZ.t("Created by")}),t&&n.createElement(eC.A,{autoClogProps:tX,dataQa:"about__leave_channel_btn",onClick:x,title:tZ.t("Leave channel"),type:"danger"})))};ChannelInfo.displayName="ChannelInfo";let t0=(0,t$.N)((e,{id:t})=>{let a=(0,eJ.OL)(e,t),n=(0,es.Wb)(a),r=(0,et.nv)(e,n),i=(0,tP.A)(e,t),l=(0,e6.H7)(e),o=(0,tN.A)(e,t),s=(0,eq.rI)(a);return{canLeaveChannel:i===tP.q.Channel&&(0,tG.bl)(a)&&(0,tq.Y9)(e,t),channel:a,creatorName:(0,ee.sE)(e,r),shouldShowChannelName:isRenameChannelOptionEnabled(e,t)&&(0,tj.rY)(e,a),shouldShowCreatedBy:!s,teamId:(0,es.bK)(e,a),isPaidTeam:(0,e$.qR)(l),isRecord:s,showManageOrgAccess:o.manageOrgAccess.shouldShow,isManageOrgAccessDisabled:o.manageOrgAccess.disabled}})(ChannelInfo)},0x20dd1a0d6:(e,t,a)=>{"use strict";a.d(t,{A:()=>ChannelNameField});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xc693ee83),o=a(0x6480ae5b),s=a(0x3cf2834a),c=a(0x173a5485e),d=a(0x1ecc7f772),m=a(0x3711e82d),u=a(0x226892387);let p=new i.Ay("channel_details"),h={uiStep:m.UiStep.CHANNEL_DETAILS_EDIT_CHANNEL_NAME};function ChannelNameField({channel:e}){let t=(0,r.wA)(),a=(0,u.d4)(t=>(0,d.SB)(t,e,{publicChannelIncludeHashSign:!1})),i=(0,n.useCallback)(()=>{t((0,s.A)({id:e.id,openModalProps:{isStackable:!0}}))},[t,e.id]);return n.createElement(o.A,{ariaLabel:p.t("Edit channel name: {name}",{name:a}),autoClogProps:h,className:"p-admin_channel_modal__rename_field",onClick:i,text:n.createElement(n.Fragment,null,n.createElement(l.A,{channel:e,disableArchived:!0}),n.createElement("span",{className:"p-admin_channel_modal__rename_field_text"},a)),title:p.t("Channel name"),channelProperty:c.u.NAME,channel:e})}ChannelNameField.displayName="ChannelNameField"},0x1b55126c8:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseRolesNewChannelPermissionsCoachmark:()=>RolesNewChannelPermissionsCoachmark,default:()=>E});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x21da4684a),o=a(0x1df96de4c),s=a(0x20482ad21),c=a(0xb90de824),d=a(0x13953efe6),m=a(0x3989021c),u=a(0x218842a12),p=a(0xe8015073),h=a(0x3711e82d),_=a(0x226892387),f=a(0xb9604b6),b=a(0xf3c65e54),g=a(0x5b1935a6);let y=new s.Ay("channel_details"),A=[p.p.ARCHIVE_CHANNEL,p.p.INVITE_TO_CHANNEL],x={clogImpression:!0,elementName:"new_channel_permissions_coachmark",elementType:h.ElementType.COACHMARK,eventId:h.EventId.DETAILS_MODAL,uiStep:h.UiStep.CHANNEL_DETAILS_NEW_PERMISSIONS_COACHMARK};u.g.ROLES_NEW_CHANNEL_PERMISSIONS_COACHMARK;let RolesNewChannelPermissionsCoachmark=({dismissCoachmark:e,children:t,permissions:a=[]})=>{let r=a.includes(p.p.ARCHIVE_CHANNEL),i=a.includes(p.p.INVITE_TO_CHANNEL),l=y.t("Channel Managers can now control who can archive channels they manage."),o=y.t("Channel Managers can now control who can invite people to channels they manage."),s=y.t("Visit the channel settings tab to review permissions \u2014 and keep an eye out for more controls to come!"),m=(0,n.useMemo)(()=>r?l:i?o:"",[r,i,l,o]),u=(0,n.useMemo)(()=>r||i?n.createElement(c.Ay,{autoClogProps:x,isOpen:!0,width:403,offsetX:0,offsetY:3,arrowPosition:10,title:m,ariaLabel:m,bodyText:s,hideCloseButton:!1,closeCoachmark:e,centerOnArrow:!0,isMegaphoneCoachmark:!0}):null,[r,i,m,s,e]);return n.createElement(d.Ay,{coachmarkElement:u,orientation:"bottom"},t)};RolesNewChannelPermissionsCoachmark.displayName="RolesNewChannelPermissionsCoachmark";let ConnectedRolesNewChannelPermissionsCoachmark=({children:e,channelScopedId:t})=>{let a=(0,r.wA)(),{isOpen:s,closeCoachmark:c}=(0,m.A)(g.ze.ROLES_NEW_CHANNEL_PERMISSIONS_COACHMARK,g.xu.IN_PRODUCT_COACHMARK,t),d=(0,_.d4)(e=>(0,f.Hp)(e,g.xu.IN_PRODUCT_COACHMARK,t)),{permissions:u=o.Ml}=(0,_.d4)(e=>(0,f.OL)(e,g.xu.IN_PRODUCT_COACHMARK,t)),p=d===g.ze.ROLES_NEW_CHANNEL_PERMISSIONS_COACHMARK&&!(0,i.A)((0,l.A)(u,A)),h=(0,n.useCallback)(()=>{c()},[c]);return((0,n.useEffect)(()=>{s&&p&&a((0,b.A)({notificationName:g.ze.ROLES_NEW_CHANNEL_PERMISSIONS_COACHMARK,action:g.hw.IMPRESSION}))},[a,s,p]),s&&p)?n.createElement(RolesNewChannelPermissionsCoachmark,{dismissCoachmark:h,permissions:u},e):e};ConnectedRolesNewChannelPermissionsCoachmark.displayName="ConnectedRolesNewChannelPermissionsCoachmark";let E=ConnectedRolesNewChannelPermissionsCoachmark},0x70106355:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xd1cb3630),l=a(0x12185e091),o=a(0x1c91944c9),s=a(0x217553e42);let c=new r.Ay("channel_details"),ChannelRenameField=({channelName:e,channelNameErrors:t,channel:a,setChannelName:r,setHasChanges:o,setChannelNameErrors:s,useInlineAlert:d=!1,ChannelNameInputId:m="admin_modal_channel_name"})=>{let u=(0,n.useCallback)(e=>{r(e),o?.(!0)},[r,o]),p=(0,n.useCallback)(e=>{s({...e})},[s]);return n.createElement(i.A,{id:m,name:m,channelName:e,channelNameErrors:t,onChannelNameChange:u,onChannelValidationChange:p,isPrivate:(0,l.Zp)(a),isRecordChannel:(0,l.rI)(a),labelText:c.t("Channel name"),customErrorMessage:null,useInlineAlert:d})};ChannelRenameField.displayName="ChannelRenameField";let d=(0,o.N)((e,{id:t})=>({channel:(0,s.OL)(e,t)}))(ChannelRenameField)},0x1ec194362:(e,t,a)=>{"use strict";a.d(t,{A:()=>ChannelTopicField});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x6cc5eee0),s=a(0x6480ae5b),c=a(0x11c2091f4),d=a(0x2040023cf),m=a(0x173a5485e),u=a(0x1ec69ee01),p=a(0x12185e091),h=a(0x20089abe2),_=a(0xa7600044),f=a(0x226892387),b=a(0x14149c126);let g=new i.Ay("channel_details");function ChannelTopicField({channel:e,onChange:t}){let a=(0,r.wA)(),i=(0,f.d4)(e=>"on"===(0,b._Z)(e,"channel_details_inline")),y=(0,f.d4)(t=>(0,h.P)(t,e.id)),A=(0,p.JM)(e),[x,E]=(0,n.useState)(!1),[C,k]=(0,n.useState)(!1),{channelTopicInput:v,onSaveChannelTopic:S}=(0,d.A)({channel:e,onChange:t});(0,n.useEffect)(()=>{x||t?.(!1)},[x,t]);let I=(0,u.cU)(e),w=g.t("Topic");return x&&i?n.createElement(c.A,{title:w},v,n.createElement("div",{className:"p-field__footer"},n.createElement(l.Ay,{className:"margin_right_50",disabled:C,onClick:()=>E(!1),size:"small",type:"outline"},g.t("Cancel")),n.createElement(l.lV,{disabled:C,loading:C,onClick:()=>{k(!0),S().then(()=>{E(!1)}).finally(()=>{k(!1)})},size:"small",type:"primary","aria-label":g.t("Save")},g.t("Save")))):n.createElement(s.A,{ariaLabel:A?g.t("Edit topic"):g.t("Edit channel topic"),dataQa:"about__topic_field",isDisabled:!y,onClick:()=>{i?E(!0):a((0,_.A)({channelId:e.id,isStackable:!0}))},text:I?n.createElement(o.A,{noHighlights:!0,noJumbomoji:!0,text:I}):n.createElement("div",{className:"sk_foreground_max"},g.t("Add a topic")),title:w,channelProperty:m.u.TOPIC,channel:e})}ChannelTopicField.displayName="ChannelTopicField"},0x170d12617:(e,t,a)=>{"use strict";a.d(t,{G:()=>z,p:()=>CleanUpTabbedChannelModal});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x20482ad21),o=a(0x232552309),s=a(0x21fdf6695),c=a(0x120c268ad),d=a.n(c),m=a(0x77727995),u=a(0x2b7f0bcc),p=a(0x11a296110),h=a(0x45bd075),_=a(0x780e190c),f=a(0x1c403364b),b=a(0x1f3226107),g=a(0x1ecc7f772),y=a(0xbd3de346),A=a(0x20e80190e),x=a(0x226892387),E=a(0x14ea3ce99),C=a(0x17274275),k=a.n(C);let v=new l.Ay("channel_details"),DocListItem=({id:e,channel:t,checked:a,onChange:n,className:i})=>{let l=(0,x.d4)(t=>(0,E.Lp)(t,e)),o=(0,x.d4)(e=>(0,g.SB)(e,t)),s=(0,r.useCallback)(()=>{let e=(0,y.o3)(l).filter(e=>e!==t.id).length;return e?v.t("Shared in {shareCount} other places",{shareCount:e}):v.t("Only shared in {channelDisplayName}",{channelDisplayName:o})},[t.id,o,l]),c=(0,r.useCallback)(t=>n(t,e),[e,n]);return r.createElement(p.Nm,{className:d()(i,k().listItem,{}),onClick:c},r.createElement(h.A,{id:e,name:e,checked:a}),r.createElement(f.A,{id:e,detailTextOverride:s()}))};DocListItem.displayName="DocListItem";let ConfirmDocsStepContent=({channel:e,docIds:t,next:a})=>{let n=(0,i.wA)(),[l,o]=(0,r.useState)(!1),[s,c]=(0,r.useState)(""),[p,h]=(0,r.useState)([]),{showSpeedBump:f}=(0,_.k)(),g=(0,r.useCallback)((e,t)=>(e?.stopPropagation(),p.includes(t))?h(p.filter(e=>e!==t)):p.includes(t)?void 0:h([...p,t]),[p]),y=(0,r.useMemo)(()=>v.t("Deleting file failed with error: {error}",{error:s}),[s]),x=(0,r.useCallback)(()=>(f(!1),o(!0),Promise.all(p.map(e=>n((0,b.Ww)({fileId:e,reason:"clean-up-channel"})))).then(()=>{a()}).catch(e=>{c(e&&((0,m.A)(e,"data.error")||e.message)||"Unknown error")}).finally(()=>o(!1))),[n,p,a,f]),E=(0,r.useCallback)(()=>{f(!0)},[f]),C=(0,r.useCallback)(({cancel:e})=>r.createElement(A.ty,{heading:v.t("You\u2019re about to delete {count} {count, plural, =1 {file} other {files}}",{count:p.length}),description:v.t("This action can\u2019t be undone"),cancelButtonLabel:v.t("Cancel"),continueButtonLabel:v.t("Delete {count} {count, plural, =1 {file} other {files}}",{count:p.length}),onCancel:e,onContinue:x}),[p.length,x]);return r.createElement(r.Fragment,null,r.createElement(A.rQ,null,r.createElement(A.Rc,{title:v.t("Delete connected canvases and lists?")})),r.createElement(A.$m,null,r.createElement(A.qf,null,r.createElement("p",null,v.t("If you don\u2019t delete them, they\u2019ll still be available in Slack.")),t.map((a,n)=>r.createElement(DocListItem,{className:d()({[k().firstItem]:0===n,[k().lastItem]:n===t.length-1}),key:a,id:a,channel:e,checked:p.includes(a),onChange:g})),s&&r.createElement(u.Ay,{className:"margin_top_100 margin_bottom_0",level:u.A_.error},y))),r.createElement(A.jl,{renderSpeedBump:C},r.createElement(A.ox,null,r.createElement(A.s_,{onClick:a,type:"outline","data-qa":"archive_modal_cancel","aria-label":v.t("Skip")},v.t("Skip")),r.createElement(A.s_,{type:"danger",onClick:E,loading:l,disabled:p.length<1,"aria-label":v.t("Delete {count} {count, plural, =1 {file} other {files}}",{count:p.length})},v.t("Delete {count} {count, plural, =1 {file} other {files}}",{count:p.length})))))};ConfirmDocsStepContent.displayName="ConfirmDocsStepContent";var S=a(0x1dc84ebc7),I=a(0x1647a7269),w=a(0xd2ed875e),T=a(0x22f6a086f),N=a(0x18fcd8e2a);let M=new l.Ay("channel_details"),WorkflowItem=({trigger:e,workflowId:t,className:a,checked:n,onChange:i})=>{let l=(0,x.d4)(e=>(0,N.g)(e,t)),o=(0,r.useCallback)(e=>i(e,t),[i,t]);if(!t)return null;let s=(0,S.j)({trigger:e,workflow:l});return r.createElement(p.Nm,{className:d()(a,k().listItem),onClick:o},r.createElement(h.A,{id:e.id,name:e.id,checked:n}),r.createElement(I.j,{shortcutInfo:s,isSelected:!1,showUnpublished:!0}))};WorkflowItem.displayName="WorkflowItem";let ConfirmWorkflowsStepContent=({triggerIds:e,next:t})=>{let a=(0,i.wA)(),[n,l]=(0,r.useState)(!1),[o,s]=(0,r.useState)(""),[c,p]=(0,r.useState)([]),h=(0,x.d4)(t=>(0,T.nd)(t,{triggerIds:e})),{showSpeedBump:f}=(0,_.k)(),b=(0,r.useCallback)((e,t)=>(e?.stopPropagation(),c.includes(t))?p(c.filter(e=>e!==t)):c.includes(t)?void 0:p([...c,t]),[c]),g=(0,r.useMemo)(()=>M.t("Deleting workflow failed with error: {error}",{error:o}),[o]),y=(0,r.useCallback)(()=>(f(!1),l(!0),Promise.all(c.map(e=>a((0,w.a)({workflowId:e,reason:"clean-up-channel"})))).then(()=>{t()}).catch(e=>{s(e&&((0,m.A)(e,"data.error")||e.message)||"Unknown error")}).finally(()=>l(!1))),[f,c,a,t]),E=(0,r.useCallback)(()=>{f(!0)},[f]),C=(0,r.useCallback)(({cancel:e})=>r.createElement(A.ty,{heading:M.t("You\u2019re about to delete {count} {count, plural, =1 {Workflow} other {Workflows}}",{count:c.length}),description:M.t("This action can\u2019t be undone"),cancelButtonLabel:M.t("Cancel"),continueButtonLabel:M.t("Delete {count} {count, plural, =1 {Workflow} other {Workflows}}",{count:c.length}),onCancel:e,onContinue:y}),[y,c.length]);return r.createElement(r.Fragment,null,r.createElement(A.rQ,null,r.createElement(A.Rc,{title:M.t("Delete connected Workflows?")})),r.createElement(A.$m,null,r.createElement(A.qf,null,r.createElement("p",null,M.t("These workflows will no longer work and have been unpublished. Delete them here or update them in Workflow Builder.")),h.map((e,t)=>{let a=e?.workflow?.workflow_id;return a?r.createElement(WorkflowItem,{className:d()({[k().firstItem]:0===t,[k().lastItem]:t===h.length-1}),trigger:e,workflowId:a,key:a,checked:c.includes(a),onChange:b}):null}),o&&r.createElement(u.Ay,{className:"margin_top_100 margin_bottom_0",level:u.A_.error},g))),r.createElement(A.jl,{renderSpeedBump:C},r.createElement(A.ox,null,r.createElement(A.s_,{onClick:t,type:"outline","data-qa":"archive_modal_cancel","aria-label":M.t("Skip")},M.t("Skip")),r.createElement(A.s_,{type:"danger",onClick:E,loading:n,disabled:c.length<1,"aria-label":M.t("Delete {count} {count, plural, =1 {Workflow} other {Workflows}}",{count:c.length})},M.t("Delete {count} {count, plural, =1 {Workflow} other {Workflows}}",{count:c.length})))))};ConfirmWorkflowsStepContent.displayName="ConfirmWorkflowsStepContent";var R=a(0x1d984df59);let P=(0,a(0x11c82607b).Ay)("Unpublish the shortcuts workflow",(e,t,{shortcutId:a})=>{let n=t(),r=(0,T.bn)(n,{triggerId:a},!0);if(r?.workflow?.workflow_id)return e((0,R.l)({workflowId:r.workflow.workflow_id,reason:"channel-tab-clean-up"}))});P.meta={name:"unpublishShortcut",key:"createThunkUnpublishShortcut",description:"Unpublish the shortcuts workflow"};var L=a(0xe0376d2),O=a(0xeeb01a46),D=a(0xd473073a),F=a(0x233157fdc),U=a(0x10ce13344),B=a(0x143fb6398),H=a(0x217553e42),W=a(0x1fcbb004d);let V=new l.Ay("channel_details"),G="confirm_delete_channel",q="confirm_docs",j="confirm_workflows";var z=((n={}).ARCHIVE="archive",n.DELETE="delete",n);let CleanUpTabbedChannelModal=({cleanUpType:e,channelId:t,andLeave:a=!1})=>{let n,l,c,d=(0,i.wA)(),m=(0,r.useCallback)(()=>d((0,W.O)()),[d]),[u,p]=(0,r.useState)(0),h=(0,x.d4)(e=>(0,H.OL)(e,t)),{docIds:_,shortcutIds:f}=(n=(0,D.g)(t),l=(0,x.Z2)(e=>n.filter(e=>("canvas"===e.type||"list"===e.type)&&e?.data?.fileId).map(t=>(0,E.Lp)(e,t.data.fileId)).filter(e=>e&&!(0,y.uO)(e)&&!(0,y.aK)(e)&&!(0,y.dE)(e)).map(e=>e.id)),c=(0,x.d4)(e=>(0,F.M4)(e,{channelId:t})),{docIds:l,shortcutIds:(0,L.A)((0,O.oQ)(c).filter(e=>(0,O.lJ)(e.type)&&e.shortcutId).map(e=>e.shortcutId))}),[b]=(0,r.useState)(_),[g]=(0,r.useState)(f),[C]=(0,r.useState)(h),v=C.properties?.use_case;(0,x.d4)(e=>(0,T.nd)(e,{triggerIds:g}));let S=(0,r.useMemo)(()=>{let t="archive"===e?["confirm_archive_channel"]:[G];return v&&(b.length&&t.push(q),g?.length&&t.push(j)),t},[v,e,b.length,g?.length]),I=(0,r.useMemo)(()=>u+1<S.length,[u,S.length]),w=(0,r.useCallback)(()=>{I?p(u+1):C&&(0,B.ju)(C)?d((0,s.a)({channel:C})):d((0,W.O)({closeAll:!0}))},[C,d,I,u]),N=(0,r.useCallback)(async()=>{v&&await Promise.all(g.map(e=>d(P({shortcutId:e}))))},[d,v,g]),M=(0,r.useMemo)(()=>S[u]===q?r.createElement(ConfirmDocsStepContent,{channel:C,docIds:b,next:w}):S[u]===j?r.createElement(ConfirmWorkflowsStepContent,{triggerIds:g,next:w}):S[u]===G?r.createElement(r.Fragment,null,r.createElement(A.rQ,null,r.createElement(A.Rc,{title:V.t("Delete channel?")})),r.createElement(U.A,{id:t,onSubmit:N,next:w,closeModal:m})):r.createElement(r.Fragment,null,r.createElement(A.rQ,null,r.createElement(A.Rc,{title:V.t("Archive this channel?")})),r.createElement(o.A,{id:t,closeModal:m,next:w,onSubmit:N,andLeave:a})),[S,u,t,m,w,N,a,C,b,g]);return r.createElement(A.dW,{closeModal:m,"data-qa":"archive_modal",className:"delete"===e?k().wideModal:null},M)};CleanUpTabbedChannelModal.displayName="CleanUpTabbedChannelModal"},0x228f4405d:(e,t,a)=>{"use strict";a.d(t,{Vz:()=>eY});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x20482ad21),o=a(0x1faa3f1ac),s=a(0xba7e9211),c=a(0x11f596311),d=a(0x140328c39),m=a(0x120b6eb39),u=a(0x1f69a906e),p=a(0x2015f194f),h=a(0x12185e091),_=a(0x189391f29),f=a(0x100fb9ff5),b=a(0x4323d7f5),g=a(0xa1832ae4),y=a(0xb8504a42),A=a(0x15a9949d2),x=a(0x16ef98cf),E=a(0x3711e82d),C=a(0x1c91944c9),k=a(0x9b971e7e),v=a(0x1b654c3cf),S=a(0x19efc8b50),I=a(0x120c268ad),w=a.n(I),T=a(0x40c0d834),N=a(0x13a454b51),M=a(0x1df96de4c),R=a(0x16998c9bf),P=a(0x8c8bafa3),L=a(0x1e864b930),O=a(0x2b7f0bcc),D=a(0x11a296110),F=a(0x1d2cd7755),U=a(0x5299a396),B=a(0x1fdec3e16),H=a(0x247cf31a2),W=a(0x58199183),V=a(0x20e77676b),G=a(0x1f4ce396);let q=new l.Ay("shared_channels_invite"),j=class extends r.Component{static defaultProps={previousConnections:[]};render(){let{previousConnections:e}=this.props,t=(0,L.A)(e.map(({teamId:e})=>r.createElement(W.A,{key:e,id:e})),{react:!0});return r.createElement(O.Ay,{type:"boxed",icon:"info",className:"margin_top_125"},q.rt("Since this channel was previously shared with {previouslyConnectedOrgs}, you\u2019ll need to add them back to this channel before inviting additional organizations. {seeHowLink}",{previouslyConnectedOrgs:t,seeHowLink:r.createElement(V.A,{articleId:0x1ac6e2f682},q.t("See how"))}))}};j.displayName="LegacyDisconnectedChannelWarning";let z=(0,C.N)((e,{channel:t})=>({previousConnections:(0,G.df)(e,t.id)}))(j);var K=a(0x217c68a35),$=a(0x1cbdfeceb),Y=a(0x1e586fbba),Q=a(0x11aaf59fe),Z=a(0x19dc73101),J=a(0x173dc9976),X=a(0x23e174be6),ee=a(0x226892387);let ExternalUserAndEmailSearcherInput=({className:e="",isInvalid:t=!1,dataQa:a="",placeholderText:n="",ariaLabel:i="",ariaLabelledBy:l="",size:o=Q.hu.MEDIUM,focusOnMount:s=!0,errorMessage:c="",onSelectedItemsChange:d=$.A,selectedItems:m=M.Ml,onlyExternalTeams:u})=>{let p=(0,r.useCallback)((e,t)=>r.createElement(J.H,{option:e,isActive:t.isActive}),[]),h=(0,ee.d4)(X.I),_=(0,r.useMemo)(()=>({entities:{members:{onlyExternal:!0,matchEmailField:!0,onlyExternalFromTeams:u},userGroups:!1,emails:u?void 0:{}},limit:15,allowEmptyQuery:!1,fuzzyLimit:3,returnMetadata:!0,sort:{frecency:!0,model:h,preferChannelMembers:!1}}),[h,u]);return r.createElement("div",{className:e,"data-qa":a},r.createElement(Z.h,{selectDataQa:"external_user_and_email_searcher_input",optionsRowHeight:32,searcherOptions:_,isInvalid:t,selectedOptions:m,onSelectedItemsChange:d,selectId:"external-user-searcher-multiselect",maxHeight:112,renderOption:p,searchOnPaste:!0,size:o,width:"100%",placeholderText:n,ariaLabelledBy:l,ariaLabel:i,focusOnMount:!!s}),c&&r.createElement(Y.A,{"data-qa":"email-tokenizer-input-inline-alert"},c))};ExternalUserAndEmailSearcherInput.displayName="ExternalUserAndEmailSearcherInput";var et=a(0xc34fd270);let AccessTypeTokenSection=({externalEmails:e,entityIds:t})=>r.createElement("div",{className:"p-channel_invite_modal_tokenized_option_container","data-qa":"tokenized_option_container"},e.map(e=>r.createElement("div",{key:e,className:"p-channel_invite_modal_tokenized_option"},e)),t&&t.map(e=>r.createElement("div",{key:e,className:"p-channel_invite_modal_tokenized_option"},r.createElement(et.Ay,{id:e,showPresence:!1,useShortMode:!0}))));AccessTypeTokenSection.displayName="AccessTypeTokenSection";var ea=a(0x5b24a5bc),en=a(0x20e80190e),er=a(0x1fcbb004d);let ei=new l.Ay("slack_connect_external_limited"),el={back:{elementName:"back"},submit:{elementName:"send"}},BaseExternalLimitedInviteTeammatesModal=({closeModal:e,onAfterClose:t,onClickBack:a,onSubmit:n,tokenizedEmails:i=M.Ml,tokenizedUserIds:l=M.Ml})=>{let[o,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),m=(0,r.useRef)(null),u=i.length+l.length;(0,r.useEffect)(()=>(m.current=!0,()=>{m.current=!1}),[]);let handleSendClick=async()=>{d(!0),await n(o),m.current&&d(!1)};return r.createElement(T.A,{eventId:E.EventId.CHANNEL_CREATE_FLOW,uiStep:E.UiStep.EXTERNAL_LIMITED_MEMBERS_MODAL},r.createElement(en.dW,{closeModal:e,onAfterClose:t,maxWidth:600,dataQa:"external_limited_invite_teammates_modal"},r.createElement(en.rQ,null,r.createElement(en.Rc,{className:"p-external_limited_invite_teammates_modal__title","data-qa":"external_limited_invite_teammates_modal_title",title:ei.t("What should they be able to do in this channel?")}),r.createElement("div",{className:"p-external_limited_invite_teammates_modal__subheader"},r.createElement(AccessTypeTokenSection,{externalEmails:i,entityIds:l}))),r.createElement(ea.a,{buttonAutoClogProps:el,isLoading:c,isExternalLimited:o,onBackClick:()=>a&&a(),onSubmitClick:handleSendClick,onToggle:e=>{s(!e.target.checked)},submitButtonText:u>1?ei.t("Send Invitations"):ei.t("Send Invitation"),showSelectionOptions:!0})))};BaseExternalLimitedInviteTeammatesModal.displayName="BaseExternalLimitedInviteTeammatesModal";let eo=(0,C.N)(null,e=>({closeModal:()=>e((0,er.O)())}))(BaseExternalLimitedInviteTeammatesModal);var es=a(0xba4aff95),ec=a(0x2b8a10b0),ed=a(0x196bae335),em=a(0x1cbd89375),eu=a(0x182c9b0b0),ep=a(0x1ecc7f772),eh=a(0x82980ab8),e_=a(0x155518160),ef=a(0xc8f728f),eb=a(0x143fb6398),eg=a(0x1ed767a16),ey=a(0x1986ce0e4),eA=a(0x207ec2aba),ex=a(0x14a5dae9c),eE=a(0x217553e42),eC=a(0x14149c126),ek=a(0xe684f705),ev=a(0x1ee439e69);let eS=new l.Ay("shared_channels_invite"),eI={elementName:"back",onClick:{enableClogAction:!0}},ew={elementName:"done",onClick:{enableClogAction:!0}},eT={elementName:"send",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},eN={elementName:"add",isPrimaryCTA:!0,onClick:{enableClogAction:!0}},eM={elementName:"create-new-channel",onClick:{enableClogAction:!0}};var eR=((n=eR||{}).invalidEmail="invalid_email",n.urlInMessage="url_in_message",n.messageTooLong="message_too_long",n.tooManyEmails="too_many_emails",n.notAllowedForGridWorkspace="not_allowed_for_grid_workspace",n);let eP=class extends r.Component{static defaultProps={maxEmailsAllowed:1,isLegacyChannel:!1};speedBumpLink=r.createRef();_isMounted=!1;errorMessages={invalid_email:"",url_in_message:"",message_too_long:"",too_many_emails:"",not_allowed_for_grid_workspace:""};constructor(e){super(e),this.state={inviteUrl:null,isShareLinkError:!1,message:"",emailError:void 0,messageError:void 0,isSendingInvite:!1,inviteSent:!1,inviteIsExternalLimited:!1,invitedEmails:[],invitedUserNames:[],isShowingSpeedbump:!1,isShowingExternalLimitedInviteTeammatesModal:!1,selectedItems:[],haveShownExternalLimitedInviteTeammatesModal:!1},this.initializeErrorMessages()}componentDidMount(){this._isMounted=!0}shouldComponentUpdate(e){let{channel:t}=this.props;return!(this._isMounted&&(0,h.hc)(t)&&(0,h.Zx)(e.channel))}initializeErrorMessages=()=>{let{maxEmailsAllowed:e}=this.props;this.errorMessages.invalid_email=eS.t("Oops, that doesn\u2019t look like a valid email."),this.errorMessages.url_in_message=eS.t("Sorry, but URLs are not allowed in the custom message. Please remove it and try again."),this.errorMessages.message_too_long=eS.t("You can\u2019t enter more than {maxMessageLength} characters.",{maxMessageLength:560}),this.props.experimentScAllowedWorkspacesPrefOverrideGroupOn&&(this.errorMessages.not_allowed_for_grid_workspace=eS.t("You can only invite people from approved external organizations. Please try again.")),e&&(this.errorMessages.too_many_emails=eS.t("Only {maxEmailsAllowed, plural, =1 {# person} other {# people}} can be invited at a time.",{maxEmailsAllowed:e}))};onBackClick=()=>{let{onBack:e,channel:t}=this.props;return e&&e({channelId:t.id})};renderGenericError=()=>{};onCopyInviteUrlClicked=()=>{let{channel:e,trackingId:t,getShareLink:a,submitShareIntent:n}=this.props,{inviteUrl:r}=this.state;r?(0,eg.x3)(r):a({channelId:e.id,trackingId:t}).then(({inviteId:e,inviteUrl:t})=>{let a=`${t}${window.location.search}`;(0,eg.x3)(a),this.setState(()=>({inviteUrl:a})),n({inviteId:e,reason:"submit-an-intent-to-share-the-channel"})}).catch(()=>{this.setState(()=>({isShareLinkError:!0}))})};onAddClick=()=>{let{speedBumpRequired:e}=this.props;e?this.setState(()=>({isShowingSpeedbump:!0})):this.setState(()=>({isShowingExternalLimitedInviteTeammatesModal:!0,haveShownExternalLimitedInviteTeammatesModal:!0}))};onDoneClick=()=>{let{closeModal:e}=this.props;e()};onSendClick=async()=>{let{speedBumpRequired:e}=this.props;e?this.setState(()=>({isShowingSpeedbump:!0})):this.sendInvites()};getTokenizedEmails=e=>e.map(e=>e.value).filter(e=>!!e&&(0,N.xf)(e));getTokenizedUserIds=e=>e.map(e=>e.value).filter(e=>!!e&&!(0,N.xf)(e));sendInvites=async e=>{let{message:t,selectedItems:a}=this.state,{sendInviteEmail:n,channel:r,trackingId:i,showGenericError:l,getUserNames:o,canInviteExternalLimitedMembers:s}=this.props,c=this.getTokenizedUserIds(a),d=this.getTokenizedEmails(a),m=e??s;this.setState(()=>({isSendingInvite:!0}));try{let e={reason:"channel-share-channel-by-email-modal",channel:r.id,emails:d,userIds:c,message:t,trackingId:i,externalLimited:m};e.userIds&&e.userIds?.length!==0||delete e.userIds,e.emails&&e.emails?.length!==0||delete e.emails,await n(e),this.setState(()=>({inviteSent:!0,inviteIsExternalLimited:m,invitedEmails:d,invitedUserNames:o(c)}))}catch(t){let{name:e}=(0,R.iT)(t);switch(e){case"invalid_email":this.setEmailError(this.errorMessages.invalid_email),this.onSendError();break;case"not_allowed_for_grid_workspace":this.props.experimentScAllowedWorkspacesPrefOverrideGroupOn?(this.setEmailError(this.errorMessages.not_allowed_for_grid_workspace),this.onSendError()):l();break;case"url_in_message":this.setMessageError(this.errorMessages.url_in_message),this.onSendError();break;case"message_too_long":this.setMessageError(this.errorMessages.message_too_long),this.onSendError();break;default:l()}}finally{this.setState(()=>({isSendingInvite:!1}))}};setEmailError=e=>{this.setState(()=>({emailError:e}))};setMessageError=e=>{this.setState(()=>({messageError:e}))};onMessageChange=e=>{let{currentTeam:t}=this.props;!(0,y.r7)(t)&&(0,ey.A)(e).length?this.setState(()=>({message:e,messageError:this.errorMessages.url_in_message})):this.setState(()=>({message:e,messageError:void 0}))};onSendError=()=>{this.setState(()=>({isShowingExternalLimitedInviteTeammatesModal:!1,isShowingSpeedbump:!1}))};closeModalAndClog=()=>{let{closeModal:e}=this.props;e()};onSelectedItemsChange=e=>{let{maxEmailsAllowed:t}=this.props;if(e.length>t)return void this.setEmailError(this.errorMessages.too_many_emails);let a=!!e.find(e=>e.isUnknown||e.isError);this.setState(()=>({selectedItems:e,emailError:a?this.errorMessages.invalid_email:""}))};maybeRenderLegacyDisconnectedChannelWarning=()=>{let{channel:e,isLegacyChannel:t}=this.props;return(0,eb.iG)(e)&&t?r.createElement(z,{channel:e}):null};renderMultiEmailInput=()=>{let{emailError:e,selectedItems:t}=this.state,a=M.Ml;this.props.initialSelectedEmails&&this.props.initialSelectedEmails.length>=0&&(a=this.props.initialSelectedEmails);let{experimentScAllowedWorkspacesPrefOverrideGroupOn:n,inviteeTeams:i}=this.props,l=w()("p-channel_share_channel_by_email_modal__multi_email_input",{"email-error":!!e});return r.createElement("div",{className:l},r.createElement(ExternalUserAndEmailSearcherInput,{selectedItems:0===t.length?a:t,onSelectedItemsChange:this.onSelectedItemsChange,isInvalid:!!e,errorMessage:e,placeholderText:eS.t("Enter an email address or name"),ariaLabelledBy:"email-input-label",dataQa:"shared_channel_modal_input",focusOnMount:!0,onlyExternalTeams:n&&i?i:void 0}))};renderEmailLabelAndInput=()=>{let e,{experimentScAllowedWorkspacesPrefOverrideGroupOn:t,inviteeTeams:a}=this.props;if(t&&a){let t=(0,L.A)(a.map(e=>r.createElement(W.A,{key:e,id:e,bold:!0,shouldMaybeShowVerified:!0,shouldMaybeOpenOrgCard:!0})));e=eS.rt("Invite someone to join this channel. In {currentTeam} you can only invite people from {count, plural, =1 {the approved organization} other {approved organizations}} {inviteeTeamList}. <a>Learn more</a>",{currentTeam:(0,g.F1)(this.props.currentTeam),count:a.length,inviteeTeamList:t},({tag:e,text:t})=>r.createElement(es.A,{className:"p-channel_share_channel_by_email_modal__copy_link",key:e,articleId:0x53d3c387be,"data-qa":"shared_channel_modal_learn_more_link"},t))}else e=eS.rt("Invite someone to join this channel by email. If you\u2019re already working together in Slack, you can also search for them by name. <a>Learn more</a>",null,({tag:e,text:t})=>r.createElement(es.A,{className:"p-channel_share_channel_by_email_modal__copy_link",key:e,articleId:0x53d3c387be,"data-qa":"shared_channel_modal_learn_more_link"},t));return r.createElement(en.qf,null,this.maybeRenderLegacyDisconnectedChannelWarning(),r.createElement(F.A,{className:"p-channel_share_channel_by_email_modal__copy",text:e,htmlFor:"email-input",id:"email-input-label"}),this.renderMultiEmailInput())};isInputEmpty=()=>{let{selectedItems:e}=this.state;return 0===e.length};renderMessageInputOrExternalTeamConnections=()=>{let{message:e,messageError:t,emailError:a}=this.state,{hasExternalTeamConnections:n,channel:i}=this.props;if(!this.isInputEmpty()||!n){let n=w()("p-channel_share_channel_by_email_modal__message_input",{"message-error":!!t||e.length>560,"email-error":!!a});return r.createElement(en.qf,{className:"p-channel_share_channel_by_email_modal__message_input_container"},r.createElement(U.A,{className:n,name:"message-input",id:"message-input",placeholder:eS.t("Add a note to your invitation"),onChange:this.onMessageChange,value:e,errorText:t,size:"medium",maxCharacterLimit:560,"data-qa":"shared_channel_modal_message_input",useInlineAlert:!0}))}return r.createElement(en.qf,null,r.createElement(u.A,{channel:i}))};renderFooterActions=()=>{let{emailError:e,message:t,messageError:a,isSendingInvite:n}=this.state,{onBack:i,canSeeExternalLimitedInviteModalStep:l}=this.props;return r.createElement(r.Fragment,null,i&&r.createElement(D.Ay,{className:"margin_right_50",type:"outline",onClick:this.onBackClick,"data-qa":"shared_channel_modal_back_button",autoClogProps:eI},eS.t("Back")),this.isInputEmpty()&&r.createElement(D.Ay,{"data-qa":"shared_channel_modal_done_button",onClick:this.onDoneClick,autoClogProps:ew},eS.t("Done")),!this.isInputEmpty()&&!l&&r.createElement(D.lV,{onClick:this.onSendClick,loading:n,"data-qa":"shared_channel_modal_send_button",autoClogProps:eT,disabled:!!e||!!a||t.length>560,"aria-label":eS.t("Send")},eS.t("Send")),!this.isInputEmpty()&&l&&r.createElement(D.Ay,{onClick:this.onAddClick,"data-qa":"shared_channel_modal_add_button",autoClogProps:eN,disabled:!!e||!!a||t.length>560},eS.t("Add")))};renderExternalLimitedInviteTeammatesModal=()=>{let{selectedItems:e}=this.state,onBackExternalLimitedInviteTeammatesModal=()=>{this.setState(()=>({isShowingExternalLimitedInviteTeammatesModal:!1}))},t=this.getTokenizedUserIds(e),a=this.getTokenizedEmails(e);return r.createElement(eo,{onClickBack:onBackExternalLimitedInviteTeammatesModal,onSubmit:this.sendInvites,tokenizedUserIds:t,tokenizedEmails:a})};renderExternalLimitedMultiEmailSuccessCopy=()=>{let e,{channel:t}=this.props,{inviteIsExternalLimited:a,invitedEmails:n,invitedUserNames:i,haveShownExternalLimitedInviteTeammatesModal:l}=this.state,o=[...n,...i],s=o.length,c=r.createElement(H.A,{channel:t}),d=eS.t("An admin may need to approve this.");if(s<6)e=l?a?eS.rt("Invited {recipients} to <strong>{channelName}</strong>, where they\u2019ll be able to post and view messages.",{recipients:(0,L.A)(o,{strong:!0,react:!0}),channelName:c}):eS.rt("Invited {recipients} to <strong>{channelName}</strong>, where they\u2019ll be able to invite their coworkers.",{recipients:(0,L.A)(o,{strong:!0,react:!0}),channelName:c}):eS.rt("Invited {recipients} to <strong>{channelName}</strong> using Slack Connect.",{recipients:(0,L.A)(o,{strong:!0,react:!0}),channelName:c});else{let t=o.slice(0,4),n=o.length-4;e=l?a?eS.rt("Invited {expandedRecipients}, and <strong>{collapsedRecipientsCount} others</strong> to <strong>{channelName}</strong>, where they\u2019ll be able to post and view messages.",{expandedRecipients:(0,L.A)(t,{strong:!0,react:!0,noConj:!0}),collapsedRecipientsCount:n,channelName:c}):eS.rt("Invited {expandedRecipients}, and <strong>{collapsedRecipientsCount} others</strong> to <strong>{channelName}</strong>, where they\u2019ll be able to invite their coworkers.",{expandedRecipients:(0,L.A)(t,{strong:!0,react:!0,noConj:!0}),collapsedRecipientsCount:n,channelName:c}):eS.rt("Invited {expandedRecipients}, and <strong>{collapsedRecipientsCount} others</strong> to <strong>{channelName}</strong> using Slack Connect.",{expandedRecipients:(0,L.A)(t,{strong:!0,react:!0,noConj:!0}),collapsedRecipientsCount:n,channelName:c})}let m=s>2?r.createElement(r.Fragment,null,r.createElement("p",null,e),r.createElement("p",null,d)):r.createElement("p",null,e," ",d);return r.createElement("div",{className:"p-channel_share_channel_by_email_modal__success_copy","data-qa":"shared_channel_modal_success_content"},m)};renderMultiEmailSuccessContent=()=>{let{invitedEmails:e,invitedUserNames:t}=this.state,{closeModal:a,channel:n}=this.props,i=1===e.length+t.length?eS.t("Invitation sent"):eS.t("Invitations sent");return r.createElement(T.A,{eventId:E.EventId.CHANNEL_CREATE_FLOW,uiStep:E.UiStep.CONFIRMATION},r.createElement(en.dW,{isOpen:!0,centered:!0,fullscreen:!1,closeModal:a,className:"p-channel_share_channel_by_email_modal"},r.createElement(en.$m,null,r.createElement(en.qf,{className:"p-channel_share_channel_by_email_modal__success_content centered"},r.createElement("div",{className:"p-channel_share_channel_by_email_modal__success_graphics"}),r.createElement("div",{className:"p-channel_share_channel_by_email_modal__success_header"},r.createElement("div",{className:"p-channel_share_channel_by_email_modal__success_caption","data-qa":"shared_channel_modal_success_caption"},i),r.createElement("div",{className:"p-channel_share_channel_by_email_modal__success_channel_name","data-qa":"shared_channel_modal_success_channel_name"},r.createElement(H.A,{channel:n}))),this.renderExternalLimitedMultiEmailSuccessCopy())),r.createElement(en.jl,null,r.createElement(en.ox,null,r.createElement(D.Ay,{onClick:this.onDoneClick,"data-qa":"shared_channel_modal_success_done_button"},eS.t("Done"))))))};renderGenericErrorModalContent=()=>r.createElement(en.$m,{className:"margin_200"},r.createElement(O.Ay,{level:O.A_.error,type:O.QE.boxed},r.createElement("h3",null,eS.rt("Something went wrong.")),eS.rt("If the problem persists, please <a>drop us a line</a>",{},({tag:e,text:t})=>r.createElement("a",{target:"_blank",rel:"noopener noreferrer",key:e,href:`https://${(0,P.qF)()}/help/requests/new`},t))));onCancelSpeedBump=()=>{this.setState(()=>({isShowingSpeedbump:!1}))};onContinueSpeedBump=()=>{let{canSeeExternalLimitedInviteModalStep:e}=this.props;e?this.setState(()=>({isShowingSpeedbump:!1,isShowingExternalLimitedInviteTeammatesModal:!0,haveShownExternalLimitedInviteTeammatesModal:!0})):this.sendInvites()};onNewChannelClick=()=>{this.props.openChannelCreateModal({createSharedChannel:!0,entryPoint:K.IV.ShareChannelByEmailModal})};getSpeedbumpDescription=()=>{let{channelName:e}=this.props;return eS.rt("People you add to <strong>{channelName}</strong> will be able to see all of the channel\u2019s history. If you\u2019d rather start fresh, you can always add them to a <a>new channel</a>.",{channelName:e},({text:e,tag:t})=>"a"===t?r.createElement(o.A,{ref:this.speedBumpLink,onClick:this.onNewChannelClick,autoClogProps:eM},e):"")};render(){let{inviteSent:e,emailError:t,isShareLinkError:a,isShowingSpeedbump:n,isShowingExternalLimitedInviteTeammatesModal:i,isSendingInvite:l}=this.state,{channel:o,trackingId:s,entryPoint:c,closeModal:d,currentTopLevelTeam:m}=this.props;if(e)return this.renderMultiEmailSuccessContent();if(i)return this.renderExternalLimitedInviteTeammatesModal();let u=w()("p-channel_share_channel_by_email_modal__content",{"email-error":!!t}),p=eS.rt("Invite someone from outside {teamName}",{teamName:(0,g.F1)(m)});return r.createElement(T.A,{eventId:E.EventId.CHANNEL_CREATE_FLOW,uiStep:E.UiStep.SHARE_CHANNEL_MODAL,trackingId:s,entryPoint:c},r.createElement(en.dW,{isOpen:!0,centered:!0,fullscreen:!1,closeModal:d,className:"p-channel_share_channel_by_email_modal"},r.createElement(en.rQ,null,r.createElement(en.Rc,{title:p,subtitle:r.createElement(B.A,{lines:2},r.createElement(H.A,{channel:o})),className:"p-channel_share_channel_by_email_modal__header","data-qa":"shared_channel_modal_title"})),!a&&r.createElement(r.Fragment,null,r.createElement(en.$m,null,this.renderEmailLabelAndInput()),r.createElement(en.$m,{className:u},this.renderMessageInputOrExternalTeamConnections()),n&&r.createElement(en.ty,{description:this.getSpeedbumpDescription(),continueButtonLabel:eS.t("Continue"),cancelButtonLabel:eS.t("Back"),onCancel:this.onCancelSpeedBump,onContinue:this.onContinueSpeedBump,continueButtonIsLoading:l,continueButtonType:"primary",focusableContents:[this.speedBumpLink],"data-qa":"shared_channel_modal_speedbump"}),r.createElement(en.jl,null,r.createElement(en.ox,null,this.renderFooterActions()))),a&&this.renderGenericErrorModalContent()))}};eP.displayName="ChannelShareChannelByEmailModal";let eL=(0,eu.A)((0,C.N)((e,{channelId:t,getPrimaryView:a})=>{let n=(0,eE.OL)(e,t);if((0,h.QR)(n)){let t=a(e)?.id;n=(0,eE.OL)(e,t)}return{currentTeam:(0,ev.H7)(e),currentTopLevelTeam:(0,ev.Yc)(e),channel:n,channelName:(0,ep.SB)(e,n),hasExternalTeamConnections:(0,G.kz)(e,n.id),experimentScAllowedWorkspacesPrefOverrideGroupOn:"on"===(0,eC._Z)(e,"sc_allowed_workspaces_pref_override"),canInviteExternalLimitedMembers:(0,e_.tN)(e,n),canSeeExternalLimitedInviteModalStep:(0,ef.S)(e,n)}},e=>({closeModal:()=>e((0,er.O)()),submitShareIntent:(...t)=>e((0,em.A)(...t)),sendInviteEmail:(...t)=>e((0,ed.H)(...t)),showGenericError:()=>e((0,eA.A)({shouldAutoFade:!0})),getShareLink:(...t)=>e((0,ec.X)(...t)),getUserNames:t=>e((e,a)=>t.map(e=>(0,eh.wg)((0,ek.nv)(a(),e)))),openChannelCreateModal:(...t)=>e((0,ex.A)(...t))}))(eP));var eO=a(0x133fddbf7),eD=a(0x13f7b3205),eF=a(0x7899e273),eU=a(0xc7bce91f),eB=a(0x11c82607b),eH=a(0x19c76d181),eW=a(0x9b3b5c3b),eV=a(0x46dbff89);let eG=!1,eq=(0,eB.Ay)("Open share this channel modal",async(e,t,a)=>{if(eG)return;eG=!0;let n=t();(0,eW.ez)((0,k.ZT)(n),a.channelId),a.isStackable||e((0,er.O)());let i=(0,eH.WR)(n),l=(0,S.HF)(),o=a.trackingId||(0,eU.A)({userId:i,version:l});try{let t=await e((0,eD.f$)({context:eD.Ui.SharedChannelInviteCreation})),n=await e((0,eF.yp)({channelId:a.channelId,reason:"open-channel-share-modal"}));if(!n.can_create){let e=Error();throw e.name=n.reason||"",e.channelConnectionLimit=n.connectionLimit,e}let i={...a,trackingId:o,maxEmailsAllowed:t.channelSharingFlow.maxEmailsAllowed,...n?.requirements?.show_speedbump&&{speedBumpRequired:n?.requirements?.show_speedbump},...n?.requirements?.invitee_teams?.length&&{inviteeTeams:n?.requirements?.invitee_teams}};e((0,eV.q)({element:r.createElement(eL,i),isStackable:!!a.isStackable}))}catch(t){e((0,eV.q)({element:r.createElement(eO.A,{channelId:a.channelId,trackingId:o,reason:t.name,channelConnectionLimit:t.channelConnectionLimit}),isStackable:!!a.isStackable}))}finally{eG=!1}});eq.meta={name:"openChannelShareChannelModal",key:"createThunkOpenChannelShareChannelModal",description:"Open share this channel modal"};var ej=a(0xabb432ea),ez=a(0x1cb79f4ec);let eK=new l.Ay("channel_details"),e$={uiStep:E.UiStep.CHANNEL_DETAILS_SHOW_ALL_SLACK_CONNECT,onClick:{enableClogAction:!0}},BaseConnectedSection=({canUserInviteExternalMembersToChannel:e=!1,canUserInviteExternalToChannelPermission:t=!1,channel:a,connectionsCount:n,pendingConnectionsCount:l,previousConnectionsCount:h,isExternallyShared:_,isExternalWorkspaceChannel:b,orgName:g,isEnterprise:y,isDirectMessage:A,isComprehensibleInvitesEnabled:E})=>{let C=(0,i.wA)();(0,r.useEffect)(()=>{C((0,ez.E)({requireTeamCounts:!1}))},[C,a]);let{renderLink:k,shouldDisplayGuidelines:S}=(0,m.F)({type:"LOCAL",dataQa:A?"slack_connect_guidelines_dm__view_button__from_details":"slack_connect_guidelines__view_button__from_details",stepVariant:"details_modal",modalHeaderSuffix:"guidelines",showCopyButton:!1}),I=(0,r.useCallback)(()=>E||b?C((0,v._)({channelId:a.id,entryPoint:x.kP.ConnectedSection,openModalProps:{isStackable:!0}})):C(eq({channelId:a.id,entryPoint:"channel_details_connected_section",isStackable:!0})),[E,b,C,a.id]),w=(0,r.useCallback)(()=>{C((0,c.A)({id:a.id,openModalProps:{isStackable:!0}}))},[C,a]),T=n+l+h,N=T>5||!!h,M=T>5?eK.t("Show {count, plural, =1 {# company} other {# companies}}",{count:T}):eK.t("Show more"),R=(0,r.useCallback)(e=>N?r.createElement(o.A,{...e,onClick:w,autoClogProps:e$},M):null,[w,N,M]),P=(0,r.useCallback)(()=>r.createElement("div",{className:"p-about_modal__connected_section_list"},r.createElement(u.A,{channel:a,showPreviousConnectionsSection:!1,hideConnectedOrgsHeader:!0,maxItems:5,variant:p.y.ChannelDetailsPanel})),[a]),L=(0,r.useCallback)(n=>e&&t?r.createElement("div",n,r.createElement(d.Ay,{handleAddPeople:I,channel:a,"data-qa":"connected_section_slack_connect_ctas"})):null,[e,t,a,I]),O=(0,f.t)(a);return _||O?r.createElement(s.A,{"data-qa":"connected_section_list_field",renderFooterButton:R,renderList:P,title:b?eK.t("Collaborating organizations"):eK.t("Organizations"),description:!b&&y&&S?A?eK.rt("{orgName} has some rules for working with people outside the organization. <link>Read the guidelines</link>",{orgName:g,"<link>":k}):eK.rt("This channel includes people from outside {orgName}. <link>Read the organization\u2019s guidelines for using Slack Connect</link>",{orgName:g,"<link>":k}):null,renderSectionedFooter:L}):null};BaseConnectedSection.displayName="BaseConnectedSection";let eY=(0,C.N)((e,{id:t})=>{let a=(0,eE.OL)(e,t),n=(0,k.jV)(e),r=(0,ev.H7)(e);return{canUserInviteExternalMembersToChannel:(0,b.D7)(e,t),canUserInviteExternalToChannelPermission:(0,A.i)(e,t),channel:a,orgId:n,connectionsCount:(0,G.s3)(e,t).length,pendingConnectionsCount:(0,G.xT)(e,t).length,previousConnectionsCount:(0,G.df)(e,t).length,isExternallyShared:(0,G.kz)(e,t),isExternalWorkspaceChannel:(0,_.R)(e,a),orgName:(0,y.r7)(r)?(0,ev.H2)(e):(0,g.F1)(r),isEnterprise:(0,y.r7)(r),isDirectMessage:(0,h.JM)(a),isComprehensibleInvitesEnabled:(0,ej.Ts)(e)}})(BaseConnectedSection)},0x85d25ed:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x77727995),o=a(0x2b7f0bcc),s=a(0x247cf31a2),c=a(0x12185e091),d=a(0xae0b47e2),m=a(0xa1832ae4),u=a(0x20e80190e),p=a(0x1c91944c9),h=a(0x217553e42),_=a(0x4ce7eb32),f=a(0x1ee439e69);let b=new i.Ay("channel_details"),ConvertChannelToPrivateModalContents=({id:e,closeModal:t,channel:a,teamName:i,topLevelTeamName:d})=>{let m=(0,r.wA)(),[p,h]=(0,n.useState)(!1),[f,g]=(0,n.useState)(""),y=(0,c.rI)(a),A=(0,n.useCallback)(()=>{h(!0),m((0,_.d)(e)).then(()=>{h(!1),t()}).catch(e=>{g(e&&((0,l.A)(e,"data.error")||e.message)||"Unknown error"),h(!1)})},[t,m,e]),renderContent=()=>n.createElement(n.Fragment,null,n.createElement("p",{className:"margin_bottom_0"},b.rt("Keep in mind that when you make {channelName} a private channel:",{channelName:n.createElement(s.A,{channel:a})})),n.createElement("ul",null,n.createElement("li",null,b.t("No changes will be made to the channel\u2019s history or members")),y?n.createElement(n.Fragment,null,n.createElement("li",null,b.t("Anyone with access to this Salesforce record will still be able to see and join this channel")),n.createElement("li",null,b.rt("Everyone in <b>{teamName}</b> will still be able to access files that have been shared in this channel up to this point",{teamName:d}))):n.createElement("li",null,b.rt("All files shared in this channel up until this point will be publicly accessible to everyone in <b>{teamName}</b>",{teamName:i}))),f&&n.createElement(o.Ay,{className:"margin_top_100 margin_bottom_0",level:o.A_.error},b.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists.")));return renderContent.displayName="renderContent",n.createElement(n.Fragment,null,n.createElement(u.$m,null,n.createElement(u.qf,null,renderContent())),n.createElement(u.jl,null,n.createElement(u.ox,null,n.createElement(u.s_,{onClick:t,type:"outline","aria-label":b.t("Cancel")},b.t("Cancel")),n.createElement(u.s_,{type:"danger",onClick:A,loading:p,"aria-label":b.t("Change to Private")},b.t("Change to Private")))))};ConvertChannelToPrivateModalContents.displayName="ConvertChannelToPrivateModalContents";let g=(0,p.N)((e,{id:t})=>{let a=(0,h.OL)(e,t),n=(0,f.Yc)(e);return{channel:a,teamName:(0,m.F1)((0,f.H7)(e)),topLevelTeamName:(0,d.v4)(n)||(0,m.F1)(n)}})(ConvertChannelToPrivateModalContents);var y=a(0x1fcbb004d),A=a(0x11eae4d05);let x=new i.Ay("channel_details"),ConvertChannelToPrivateModal=({id:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>t((0,y.O)()),[t]),i=x.t("Change to a private channel?");return n.createElement(u.dW,{closeModal:a},n.createElement(u.rQ,null,n.createElement(u.Rc,{title:i})),n.createElement(g,{id:e,closeModal:a}))};ConvertChannelToPrivateModal.displayName="ConvertChannelToPrivateModal";let E=(0,A.e)(ConvertChannelToPrivateModal)},0xbff972e0:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0xa6f3163b),s=a(0x15f8e452a),c=a(0x4c96e5d9),d=a(0x110b4f809),m=a(0x1ed767a16),u=a(0x226892387),p=a(0x14149c126);let h=new l.Ay("channel_details");function DebugDataText({children:e,copyText:t,copyTooltip:a,className:r}){let l,_,[f,b]=(0,d.A)(!1,2e3),g=(0,u.d4)(e=>"on"===(0,p._Z)(e,"flag_to_add_new_strings")),y=(0,n.useCallback)(()=>{(0,m.x3)(t),b(!0)},[t,b]);return t&&(0,m.tD)()?(f?(_=c.YU.Success,l=h.t("Copied!")):l=a,n.createElement("div",{className:i()("p-about_modal__debug_data_text",r)},e,n.createElement(c.Ay,{status:_,tip:l},n.createElement(o.A,{onClick:y,"aria-label":g?h.t("Copy channel ID"):"Copy channel ID"},n.createElement(s.A,{className:"margin_left_25",inline:!0,size:"inherit",type:"new-window"}))))):null}DebugDataText.displayName="DebugDataText";let _=DebugDataText},0x10ce13344:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x77727995),l=a(0x20482ad21),o=a(0x2b7f0bcc),s=a(0x45bd075),c=a(0x1d2cd7755),d=a(0x1faa3f1ac),m=a(0x20b26d1ea),u=a(0x154933c60),p=a(0x6f213e53),h=a(0x20e80190e),_=a(0x6d72337),f=a(0x1c91944c9),b=a(0x217553e42);let g=new l.Ay("channel_details"),DeleteChannelModalContents=({id:e,closeModal:t,onSubmit:a,canBeArchived:l=!1,isAlreadyArchived:m=!1,next:p})=>{let f=(0,r.wA)(),[b,y]=(0,n.useState)(!1),[A,x]=(0,n.useState)(""),[E,C]=(0,n.useState)(!1),onClickArchiveInstead=()=>{t(),f((0,_.j$)({id:e}))},maybeRenderArchiveOption=()=>!l||m?null:n.createElement("li",null,g.rt("You can <a>archive a channel instead</a> without removing its messages",{},({text:e,key:t,tag:a})=>"a"===a?n.createElement(d.A,{key:t,onClick:onClickArchiveInstead},e):null));maybeRenderArchiveOption.displayName="maybeRenderArchiveOption";let renderContent=()=>n.createElement("div",{className:"margin_bottom_100"},n.createElement("p",null,g.rt("When you delete a channel, all messages from this channel will be removed from Slack immediately. <b>This can\u2019t be undone.</b>")),n.createElement("p",{className:"margin_bottom_0"},g.t("Keep in mind that:")),n.createElement("ul",null,n.createElement("li",null,g.t("Any files uploaded to this channel won\u2019t be removed")),maybeRenderArchiveOption()),A&&n.createElement(o.Ay,{className:"margin_top_100 margin_bottom_0",level:o.A_.error},g.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists.")));return renderContent.displayName="renderContent",n.createElement(n.Fragment,null,n.createElement(h.$m,null,n.createElement(h.qf,null,renderContent())),n.createElement(h.jl,null,n.createElement(c.A,{type:c.Q.inline,text:g.rt("Yes, permanently delete the channel")},n.createElement(s.A,{checked:E,onChange:e=>{C(e.target.checked)}})),n.createElement(h.ox,null,n.createElement(h.s_,{onClick:t,type:"outline","aria-label":g.t("Cancel")},g.t("Cancel")),n.createElement(h.s_,{type:"danger",onClick:()=>{y(!0),f((0,u.XK)(e)).then(async()=>{p?(await a(),p()):(t(),a())}).catch(e=>{x(e&&((0,i.A)(e,"data.error")||e.message)||"Unknown error"),y(!1)})},disabled:!E,loading:b,"aria-label":g.t("Delete Channel")},g.t("Delete Channel")))))};DeleteChannelModalContents.displayName="DeleteChannelModalContents";let y=(0,f.N)((e,{id:t})=>{let a=(0,b.OL)(e,t);return{canBeArchived:(0,m.A)(e,t).archive.shouldShow||!1,isAlreadyArchived:(0,p.F)(a)}})(DeleteChannelModalContents)},0x2190b3693:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xa6f3163b),o=a(0x1ae733a96);function ButtonField({ariaLabel:e,className:t,dataQa:a,href:r,isDisabled:s=!1,onClick:c,renderTitleIcon:d,text:m,title:u,type:p,autoClogProps:h}){let _=d&&"function"==typeof d?d({className:"p-field__title_icon",inline:!0}):d,f=(0,n.useMemo)(()=>({...h,onClick:{enableClogAction:!0,...h?.onClick}}),[h]);return n.createElement(l.A,{"aria-label":e,className:i()(t,"p-field","p-field--button",{"p-field--disabled":s,[`p-field--type_${p}`]:!!p}),"data-qa":a,"aria-disabled":s,href:r,onClick:c,autoClogProps:f},_,n.createElement("div",{className:"full_width"},n.createElement(o.A,null,u),m&&n.createElement("div",{className:"p-field__text"},m)))}ButtonField.displayName="ButtonField";let s=ButtonField},0x5525669:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1407c6c2c),o=a(0x62a17882),s=a(0x1ae733a96);function CtaField({className:e,innerClassName:t,imageUrl:a,imageUrl2x:r,sideBarClassName:c,renderButton:d,text:m,title:u,"data-qa":p}){let h=(0,o.X4)()&&r||a,_=`label-${(0,l.A)()}`,f=`description-${(0,l.A)()}`;return n.createElement("div",{"data-qa":p,className:i()(e,"p-field","p-field--cta"),role:"group","aria-labelledby":u?_:void 0,"aria-describedby":f},n.createElement("div",{className:i()("p-field__inner",t)},u&&n.createElement(s.A,{id:_},u),n.createElement("div",{className:"p-field__text",id:f},m),d?.({size:"small",type:"outline"})),h&&n.createElement("div",{className:"p-field__side_image",style:{backgroundImage:`url(${h})`}}),!h&&c&&n.createElement("div",{className:i()("p-field__side_image",c)}))}CtaField.displayName="CtaField";let c=CtaField},0x6480ae5b:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1407c6c2c),o=a(0x20482ad21),s=a(0xf3c40abe),c=a(0x11a296110),d=a(0x2501a2cee),m=a(0x4c96e5d9),u=a(0x1ae733a96),p=a(0x173a5485e),h=a(0x189391f29),_=a(0x226892387),f=a(0x1f4ce396);let b=new o.Ay("channel_details");function EditableField({ariaLabel:e,className:t,dataQa:a,disabledText:r,href:o,isDisabled:s=!1,onClick:g,renderTitleIcon:y,text:A,content:x,title:E,autoClogProps:C,hasKeyboardFocus:k,showEditButton:v=!0,channelProperty:S,channel:I,editButtonText:w=b.t("Edit")}){let T=y?.({className:"p-field__title_icon",inline:!0}),N=(0,n.useRef)(null),M=(0,n.useCallback)(e=>{e.target!==N.current&&N?.current?.click()},[N]),R=`label-${(0,l.A)()}`,P=`description-${(0,l.A)()}`,L=(({channel:e,channelProperty:t})=>!!(0,_.d4)(t=>!!(e&&(0,f.s3)(t,e.id).length>1)&&!(0,h.R)(t,e))&&!!e&&!!t&&Object.values(p.u).includes(t))({channel:I,channelProperty:S}),O=n.createElement("span",{className:"p-field__visibility_label"},n.createElement(d.Ah,{name:"eye-open",size:"inherit",inline:!0}),n.createElement("span",{className:"p-field__visibility_label_text padding_left_25"},b.t("Only visible to your organization"))),D=(0,n.useMemo)(()=>({...C,onClick:{enableClogAction:!0,...C?.onClick}}),[C]);return n.createElement("div",{className:i()(t,"p-field","p-field--editable",{"p-field--disabled":s,"p-field--keyboard-mode":k}),onClick:M,"data-qa":a,role:"group","aria-labelledby":R,"aria-describedby":P,"aria-disabled":s},T,n.createElement("div",{className:"full_width"},n.createElement(u.A,{id:R},E),L&&O,A&&n.createElement("span",{id:P,className:"p-field__text"},A),x&&x,s&&r&&n.createElement(m.Ay,{tip:r},n.createElement(c.jV,{"aria-label":e,className:"p-field__floating_hint p-field__disabled_text","data-qa":"hint_help_icon","aria-disabled":"true"},n.createElement(d.Ah,{name:"help"}))),!s&&v&&n.createElement(c.jV,{ref:N,"aria-label":e,className:"p-field__floating_hint p-field__edit_link",href:o,onClick:g,disabled:s,autoClogProps:D,"data-qa":`${a}-edit-button`},w)))}EditableField.displayName="EditableField";let g=(0,s.A)(EditableField)},0x11c2091f4:(e,t,a)=>{"use strict";a.d(t,{A:()=>EmbedField});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1ae733a96);function EmbedField({children:e,className:t,title:a}){return n.createElement("div",{className:i()(t,"p-field","p-field--embed")},n.createElement(l.A,null,a),e)}EmbedField.displayName="EmbedField"},0xc66ee342:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x139416e2e),o=a(0x20482ad21),s=a(0x15f8e452a);let c=new o.Ay("channel_details");function FieldGroup({children:e,showTrialBanner:t=!1}){return(0,l.$)(e)?n.createElement("div",{className:i()("p-field_group",{"p-field_group--with_footer":t}),role:"group"},e,t&&n.createElement("div",{className:"p-field_group__banner"},c.t("Try it out before your trial ends"),n.createElement(s.A,{className:"p-field_group__banner_icon",inline:!0,size:"inherit",type:"sparkles-filled"}))):null}FieldGroup.displayName="FieldGroup";let d=FieldGroup},0xba7e9211:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);function FieldDescription({children:e}){return n.createElement("p",{className:"p-field__description"},e)}FieldDescription.displayName="FieldDescription";let l=FieldDescription;var o=a(0x1ae733a96);function ListField({className:e,renderList:t,renderFooterButton:a,title:r,description:s,titleLink:c,renderSectionedFooter:d}){return n.createElement("div",{className:i()(e,"p-field","p-field--list")},r?n.createElement(o.A,{withDescription:!!s},r,c&&n.createElement("div",{className:"p-field__title_link"},c)):null,s&&n.createElement(l,null,s),n.createElement("div",{className:"p-field__embed"},t()),a?.({className:"p-field__button"}),d?.({className:"border_top p-field__sectioned_footer"}))}ListField.displayName="ListField";let s=ListField},0x1ae733a96:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r);function FieldTitle({children:e,withDescription:t,id:a}){return n.createElement("h3",{id:a,className:i()("p-field__title",{"p-field__title--with-description":t})},e)}FieldTitle.displayName="FieldTitle";let l=FieldTitle},0x238ac78f2:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1ae733a96);function TextField({className:e,text:t,title:a}){return n.createElement("div",{className:i()(e,"p-field","p-field--text")},a&&n.createElement(l.A,null,a),t&&n.createElement("div",{className:"p-field__text"},t))}TextField.displayName="TextField";let o=TextField},0x157a21f39:(e,t,a)=>{"use strict";a.d(t,{A:()=>y,U:()=>g});var n,r=a(0x20b26d1ea),i=a(0x4c6fcfc3),l=a(0x12185e091),o=a(0x6f213e53),s=a(0x189391f29),c=a(0xf6ed6f31),d=a(0x1e79c438d),m=a(0x4323d7f5),u=a(0x1428e82b3),p=a(0x143fb6398),h=a(0x190a9df19),_=a(0x1bc4b3ad8),f=a(0x217553e42),b=a(0x14149c126),g=((n={}).Rename="rename",n.Connected="connected",n.NotConnected="not-connected",n.CopyMembers="copy-members",n.TabPermissions="tab-permissions",n.Permissions="permissions",n.ChannelPermissions="channel-permissions",n.Export="export",n.ManagingThisChannel="managing-this-channel",n);let y=(0,_.F)((e,t)=>(0,i.A)(e,t),(e,t)=>(0,r.A)(e,t),(e,t)=>(0,f.OL)(e,t),(e,t)=>(0,m.D7)(e,t),e=>(0,h.Zo)(e),(e,t)=>(0,u.QG)(e,(0,f.OL)(e,t)),(e,t)=>(0,s.x)(e,t),e=>"on"===(0,b._Z)(e,"move_channel_tabs_settings"),(e,t,a,n,r,s,m,u)=>{let h=[];if((0,o.F)(a))return h.push("managing-this-channel"),h;let _=e===i.q.Channel&&t.rename.shouldShow&&!t.rename.disabled,f=(r||(0,c.bl)(a))&&((0,p.ju)(a)||m)&&!(0,l.rI)(a),b=e===i.q.Channel&&!f&&!(0,l.rI)(a)&&!m&&(s.ok||e===i.q.Channel&&(r||(0,c.bl)(a))&&n),g=e===i.q.Channel||t.dataRetention.shouldShow,y=e===i.q.Channel&&u,A=e===i.q.Channel||t.channelPermissions.shouldShow,x=!(0,c.bl)(a)&&(0,l.rI)(a),E=(0,d.V)(a)&&!x&&!m||(0,l.yz)(a),C=t.exportHistory.shouldShow,k=e!==i.q.DM&&(t.archive.shouldShow||t.deleteChannel.shouldShow||t.unlinkRecordChannel.shouldShow)||t.convertToPrivate.shouldShow&&(0,l.rW)(a)||t.convertMpimToPrivate.shouldShow&&e===i.q.MPDM||t.convertScMpdmToPrivate.shouldShow&&e===i.q.MPDM||t.convertToPublic.shouldShow&&(0,l.Zp)(a);return _&&h.push("rename"),f&&h.push("connected"),b&&h.push("not-connected"),g&&h.push("permissions"),y&&h.push("tab-permissions"),A&&h.push("channel-permissions"),C&&h.push("export"),E&&h.push("copy-members"),k&&h.push("managing-this-channel"),h})},0x71b12df5:(e,t,a)=>{"use strict";a.d(t,{A:()=>ar});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x20ef3966f),o=a(0x130d89881),s=a(0x20482ad21),c=a(0x102edf836),d=a(0x15fb82076),m=a(0x1a043bf26),u=a(0x120c268ad),p=a.n(u),h=a(0xf2e7528e),_=a(0xb97b797e),f=a(0x11a296110),b=a(0xf3b0bc58),g=a(0xfbe3141b),y=a(0x9c0c23e6),A=a(0x8ef14dd3),x=a(0x74791de4),E=a(0x151a93a75),C=a(0x1b9d5cc0c),k=a(0x4cdbb756),v=a(0x115687abb),S=a(0x28be1268),I=a(0x3711e82d),w=a(0x45012309),T=a(0x1c91944c9),N=a(0xa20fa9e5),M=a(0x5dd1c0f2),R=a(0x18476a827);let P=new s.Ay("channel_details");function AppsInChannelItem({appId:e,appProfile:t,botId:a,canBeRemoved:n,channelId:i,clogger:l,dispatchOpenRemoveMemberDialog:o,memberId:s,onProfileCardMenuItemSelected:c,showRemove:d=!0}){let m=(0,r.useMemo)(()=>({className:p()("p-apps_in_channel_dialog__list_entity",{"p-apps_in_channel_dialog__list_entity--has-remove":n&&d}),subtext:r.createElement("span",{className:"p-apps_in_channel_dialog__subtext"},t&&!(0,S.r)(t)?(0,E.Ij)(t):"")}),[t,n,d]),u=(0,r.useCallback)(()=>{let t={action:I.UiAction.CLICK,ui_element:I.UiElement.BTN_REMOVE_APP};l.track(I.EventId.APP_CLICK_REMOVE_APPS_IN_CHANNEL_APPS_MODAL,{contexts:{ui_context:t,core:{app_id:e,bot_id:a,channel_id:i}}}),o({memberId:s,channelId:i})},[e,a,i,l,o,s]),h=n&&r.createElement(f.Ay,{type:"outline",className:"p-apps_in_channel_dialog__remove_btn",onClick:u,"data-qa":"app_remove_btn"},P.t("Remove"));return r.createElement("div",{className:"p-apps_in_channel_dialog__list_item"},r.createElement(x.A,{userId:s,position:"bottom",onMenuItemSelected:c},r.createElement(A.A,{id:s,className:"p-apps_in_channel_dialog__list_entity_btn","data-qa":"app_row_btn",listEntityProps:m})),d&&h)}AppsInChannelItem.displayName="AppsInChannelItem";let L=(0,T.N)((e,{memberId:t,channelId:a})=>{let{member:n,bot:r}=(0,R.Od)(e,{userId:t}),i=(0,C.PV)(n)||void 0,l=(r?r.id:(0,k.A)(e,n))??void 0,o=(0,M.sO)(e,{appId:i,serviceId:l});return{appId:i,appProfile:o,botId:l,canBeRemoved:(0,v.I)(e,a,n),clogger:(0,w.eo)({state:e})}},{dispatchOpenRemoveMemberDialog:({memberId:e,channelId:t})=>(0,N.A)({memberId:e,channelId:t})})(AppsInChannelItem);var O=a(0x1cbdfeceb);let D={delay:100,children:null,isReady:!1},throttle_render=function({delay:e,isReady:t,children:a}=D){let[n,i]=(0,r.useState)(a);return t&&n!==a&&i(a),(0,r.useEffect)(()=>{if(n===a)return O.A;let t=setTimeout(()=>{i(a)},e);return()=>{clearTimeout(t)}}),r.createElement(r.Fragment,null,n)};var F=a(0x10efa7af),U=a(0x15eef363e),B=a(0x1ec68d6a3),H=a(0x16471014c),W=a(0xc1360909);let V=new s.Ay("channel_details"),G="CHANNEL-APPS",q=class extends r.PureComponent{keys;loading;inputRef;loadingPromise;static defaultProps={showSearchBar:!0,showRemove:!0};constructor(e){super(e),(0,_.v)(this,["fetchPost","renderRow","onAddAppsClick","onProfileCardMenuItemSelected","onSearchInputChange","onSearchInputClear","onScroll"]),this.keys=[],this.loading=!1,this.inputRef=r.createRef(),this.state={memberIds:[],searchQuery:"",fullyLoaded:!1,marker:void 0,showScrollIndicatorTop:!1}}componentDidMount(){this.fetchMembers()}componentWillUnmount(){this.loadingPromise&&this.loadingPromise.cancel()}onAddAppsClick(){let{channelId:e,clogger:t}=this.props,a=I.EventId.APP_CLICK_ADD_APPS_IN_CHANNEL_APPS_MODAL,n={action:I.UiAction.CLICK,ui_element:I.UiElement.BTN_ADD_APPS};t.track(a,{contexts:{ui_context:n}}),this.props.openAppsBrowserModal({addAppsVariant:!0,referringEventId:a,referringUiContext:n,channelId:e})}onProfileCardMenuItemSelected(){this.props.closeModal()}onScroll(e,{scrollTop:t=0}={}){let a=t>0;this.setState(()=>({showScrollIndicatorTop:a}))}onSearchInputChange(e){let t=e.target.value;this.setState(()=>({searchQuery:t,memberIds:[],fullyLoaded:!1,marker:void 0}),()=>{this.fetchMembers()})}onSearchInputClear(){this.setState(()=>({searchQuery:"",memberIds:[],fullyLoaded:!1,marker:void 0}),()=>{this.fetchMembers(),this.inputRef.current&&this.inputRef.current.focus()})}getListKeys(){let{memberIds:e}=this.state;return e||[]}fetchMembers(){if(this.state.fullyLoaded)return;this.loadingPromise&&this.loadingPromise.cancel(),this.props.logger.info(G,"Fetching more");let{marker:e,searchQuery:t}=this.state,a={count:50,channels:[this.props.channelId],marker:e,filter:"apps",index:"users_by_realname"};t&&(a.query=t),this.loadingPromise=this.props.fetchAndUpsertMembersWithQuery({query:a}).then(({members:a,nextMarker:n})=>{this.setState(r=>r.marker===e&&r.searchQuery===t?{memberIds:(0,h.A)(r.memberIds,(0,l.A)(a,"id")),fullyLoaded:!n,marker:n}:{},()=>{this.props.logger.info(G,`Showing ${(this.state.memberIds||[]).length} apps`),this.state.fullyLoaded&&this.props.logger.info(G,"Done fetching")})}).finally(()=>{delete this.loadingPromise})}fetchPost(){this.fetchMembers()}renderMember(e){return r.createElement(L,{channelId:this.props.channelId,memberId:e,onProfileCardMenuItemSelected:this.onProfileCardMenuItemSelected,showRemove:this.props.showRemove})}renderSearchEmptyState(){let e=V.rt("No matches found for <strong>{searchTerm}</strong>",{searchTerm:this.state.searchQuery}),t=V.t("Clear Search");return r.createElement("div",{className:"p-apps_in_channel_contents__empty_list"},r.createElement(b.A,{description:e,primaryActionText:t,onClickPrimaryAction:this.onSearchInputClear}))}renderEmptyState(){let e=V.rt("No apps were found in this channel."),t=V.t("Add Apps");return r.createElement("div",{className:"p-apps_in_channel_contents__empty_state"},r.createElement(b.A,{description:e,primaryActionText:t,onClickPrimaryAction:this.onAddAppsClick}))}renderAppsList(){return this.keys.length||this.state.fullyLoaded?!this.keys.length&&this.state.searchQuery&&this.state.fullyLoaded?this.renderSearchEmptyState():r.createElement(o.A,null,({width:e,height:t})=>r.createElement(y.A,{key:this.keys[0],width:e,height:t,keys:this.keys,rowRenderer:this.renderRow,loadAround:this.fetchPost,loadPost:this.fetchPost,onScroll:this.onScroll})):r.createElement("div",{className:"p-apps_in_channel_contents__loading"},V.t("Loading\u2026"))}renderRow(e){let t=this.keys[e];return t?this.renderMember(t):null}renderSearch(){let{showAddAppsToChannel:e}=this.props,t=V.t("App name or keyboard");return r.createElement("div",{className:"p-apps_in_channel_contents__search"},r.createElement(g.A,{className:"p-apps_in_channel_contents__search__input",ref:this.inputRef,value:this.state.searchQuery,onChange:this.onSearchInputChange,placeholder:V.t("Search apps"),"aria-label":t,icon:"search","data-qa":"apps_contents_filter",autoFocus:!0}),e&&r.createElement(f.Ay,{className:"p-apps_in_channel_contents__search__button",type:"outline",onClick:this.onAddAppsClick,"data-qa":"apps_contents_add_apps"},V.t("Add Apps")))}render(){let{appCount:e}=this.props,{showScrollIndicatorTop:t}=this.state;if(0===e)return this.renderEmptyState();let a=p()("p-apps_in_channel_contents__list",{"p-apps_in_channel_contents__list--indicate-top":t});return this.keys=this.getListKeys(),r.createElement("div",{className:"p-apps_in_channel_contents","data-qa":"dialog_body"},this.props.showSearchBar&&this.renderSearch(),r.createElement(throttle_render,{delay:100,isReady:!!this.keys.length||this.state.fullyLoaded},r.createElement("div",{className:a},this.renderAppsList())))}};q.displayName="AppsInChannelContents";let j=(0,T.N)((e,{channelId:t})=>({clogger:(0,w.eo)({state:e}),logger:(0,B.Ay)({state:e}),showAddAppsToChannel:(0,U.B)(e,t),appCount:(0,W.E6)(e,t)||0}),{fetchAndUpsertMembersWithQuery:e=>(0,F.W)(e),openAppsBrowserModal:e=>(0,H.A)(e)})(q);var z=a(0x20e80190e),K=a(0x1fcbb004d),$=a(0x11eae4d05);let Y=new s.Ay("channel_details"),AppsInChannelModal=({id:e})=>{let t=(0,i.wA)(),a=(0,r.useCallback)(()=>t((0,K.O)({closeAll:!0})),[t]);return r.createElement(z.dW,{closeModal:a,className:"p-apps_in_channel_contents__modal"},r.createElement(z.rQ,null,r.createElement(z.Rc,{title:Y.t("Manage Apps")})),r.createElement(j,{channelId:e,closeModal:a}))};AppsInChannelModal.displayName="AppsInChannelModal";let Q=(0,$.e)(AppsInChannelModal),Z={uiStep:I.UiStep.CHANNEL_DETAILS_SHOW_APP_PROFILE_CARD,onClick:{enableClogAction:!0}},AppsSectionItem=({appProfile:e,channelId:t,memberId:a,openProfileCard:n,onPopoverClose:i})=>{let l=(0,r.useMemo)(()=>({subtext:r.createElement("span",{className:"p-apps_in_channel_dialog__subtext"},(0,E.Ij)(e)),showPresence:!1,showAppOrBotBadge:!1}),[e]);return r.createElement(x.A,{userId:a,position:"bottom",forceOpen:n,onClose:i,channelId:t},r.createElement(A.A,{id:a,className:"p-integrations__list_entity_row","data-qa":"app_row_btn",listEntityProps:l,autoClogProps:Z}))};AppsSectionItem.displayName="AppsSectionItem";let J=(0,T.N)((e,{memberId:t})=>{let{member:a,bot:n}=(0,R.Od)(e,{userId:t}),r=(0,C.PV)(a)??"",i=n?n.id:(0,k.A)(e,a)??"",l=(0,M.sO)(e,{appId:r,serviceId:i});return{appId:r,appProfile:l,botId:i}})(AppsSectionItem);var X=a(0x5525669),ee=a(0xc66ee342),et=a(0xba7e9211),ea=a(0x1e0acdc3d),en=a(0x12185e091),er=a(0x1c9a3c4c1),ei=a(0x217553e42);let el=new s.Ay("channel_details"),eo={uiStep:I.UiStep.CHANNEL_DETAILS_ADD_APP,onClick:{enableClogAction:!0}},es={uiStep:I.UiStep.CHANNEL_DETAILS_SHOW_MORE_APPS,onClick:{enableClogAction:!0}},AppsSection=({id:e,maxApps:t,onOpenApps:a,isImOrMpim:n,showAddAppsToChannel:s,appCount:u})=>{let p=(0,i.wA)(),[h,_]=(0,r.useState)(!1),[f,b]=(0,r.useState)([]),[g,y]=(0,r.useState)(null),[A,x]=(0,r.useState)(void 0),E=(0,r.useMemo)(()=>f.slice(0,t),[f,t]),C=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),y(e.id))},[y]),k=(0,r.useCallback)(e=>{y(e.id)},[y]),v=(0,r.useCallback)(t=>{let a=E[t];return r.createElement(J,{memberId:a,channelId:e,openProfileCard:a===g,onPopoverClose:()=>{y(null)}})},[e,g,y,E]),S=(0,r.useCallback)(()=>{if(h)return r.createElement(ea.A,{numPlaceholders:t});if(!u)return null;let e=60*E.length;return r.createElement(o.A,{disableHeight:!0},({width:t})=>r.createElement(m.A,{className:"p-integrations__app_list",activeItem:A,height:e,keys:E,rowRenderer:v,"aria-label":el.t("Apps"),onItemClick:k,onItemKeyDown:C,onFocusLeave:()=>{x(void 0)},onItemTabWithin:e=>{x(e.id||void 0)},width:t}))},[h,u,t,A,C,k,v,E]),I=(0,r.useCallback)(()=>{p(Q({id:e,openModalProps:{isStackable:!0}}))},[p,e]);if((0,r.useEffect)(()=>{_(!0),p((0,F.W)({query:{count:t,channels:[e],marker:void 0,filter:"apps",index:"users_by_realname"}})).then(e=>{b((0,l.A)(e.members.filter(e=>!(0,er.D)(e)),"id"))}).finally(()=>{_(!1)})},[p,e,t]),!h&&!u){let e;return e=n?el.t("Bring the tools you need into this conversation to pull reports, start calls, file tickets and more."):el.t("Bring the tools you need into this channel to pull reports, start calls, file tickets and more."),r.createElement(ee.A,null,r.createElement(X.A,{className:"p-integrations__apps_cta",imageUrl:"/img/ia-details/apps-empty@2x.png",imageUrl2x:"/img/ia-details/apps-empty@2x.png",renderButton:e=>s&&r.createElement(c.Ay,{...e,onClick:a,autoClogProps:eo,"data-qa":"integrations__apps_cta"},el.t("Add an App")),text:e,title:el.t("Apps")}))}return r.createElement(ee.A,null,r.createElement(et.A,{renderFooterButton:e=>t<u&&r.createElement(d.A,{...e,onClick:I,autoClogProps:es},el.t("Show more")),renderList:S,title:el.t("Apps"),titleLink:r.createElement(d.A,{onClick:a,autoClogProps:eo,"data-qa":"integrations__apps_cta"},el.t("Add apps"))}))};AppsSection.displayName="AppsSection";let ec=(0,T.N)((e,{id:t})=>{let a=(0,ei.OL)(e,t),n=(0,W.qg)(e,t)||0,r=(0,W.E6)(e,t)||0;return{isImOrMpim:(0,en.JM)(a),showAddAppsToChannel:(0,U.B)(e,t),appCount:r-n}})(AppsSection);var ed=a(0x10027d8bc),em=a(0x114ffe897),eu=a(0x2486acc2a),ep=a(0x17f03e906),eh=a(0x1bc4b3ad8),e_=a(0x14149c126),ef=((n={}).Apps="apps",n.SendEmail="send_email",n.Workflows="workflows",n.SlackCrmLeadsForm="slack_crm_leads_form",n.SlackCRMEmailToCase="slack_crm_email_to_case",n.McpConnectors="mcp_connectors",n);let eb=(0,eh.F)((e,t)=>[(0,ei.OL)(e,t),e],e=>"on"===(0,e_._Z)(e,"slack_crm_leads_web_form"),e=>"on"===(0,e_._Z)(e,"slack_first_crm_email_to_case"),e=>(0,ed.pM)(e),([e,t],a,n,r)=>{let i=!(0,en.JM)(e),l=i&&(0,U.B)(t,e.id),o=(0,ep.c)(t)||(0,en.FV)(e)||(0,en.ZZ)(e),s=(0,eu.I)(t);return{apps:l,send_email:!o,workflows:i,slack_crm_leads_form:a&&!(0,en.JM)(e)&&(0,en.ZZ)(e)&&s,slack_crm_email_to_case:n&&!(0,en.JM)(e)&&(0,en.FV)(e)&&s,mcp_connectors:r&&(0,em.D)(e)}});var eg=a(0x40c0d834),ey=a(0xa8b7b1bc),eA=a(0x226892387),ex=a(0x2157a3ac1),eE=a.n(ex);let eC=new s.Ay("channel_details"),ek={elementName:"create_web_form_button",action:I.UiAction.CLICK,onClick:{enableClogAction:!0}},ev={elementName:"learn_more_button",action:I.UiAction.CLICK,onClick:{enableClogAction:!0}},LeadsFormIntegration=({id:e})=>{let t=(0,eA.d4)(e=>"on"===(0,e_._Z)(e,"slack_crm_leads_web_form")),a=(0,ey.G)({channelId:e}),n=(0,r.useCallback)(()=>{a()},[a]),i=(0,r.useCallback)(()=>{},[]),l=(0,r.useCallback)(()=>r.createElement("div",{className:p()("p-field__footer",eE().footerButtons)},r.createElement(c.Ay,{size:"small",type:"outline",onClick:n,autoClogProps:ek},t?eC.t("Create New Web Form"):"Create New Web Form"),r.createElement(c.Ay,{size:"small",type:"outline",onClick:i,autoClogProps:ev},eC.t("Learn More"))),[n,i,t]),o=t?eC.t("Add a form to your website and new leads will be automatically posted in this channel."):"Add a form to your website and new leads will be automatically posted in this channel.",s=t?eC.t("Get new leads from your website"):"Get new leads from your website";return t?r.createElement(eg.A,{eventId:I.EventId.LOB_DOWNMARKET,uiStep:I.UiStep.LEAD_FORM_SETUP_CHANNEL_DETAILS_INTEGRATIONS,elementName:"leads_form_integration_section",clogImpression:!0},r.createElement(ee.A,null,r.createElement(X.A,{text:o,title:s,renderButton:l,sideBarClassName:eE().sideBar,innerClassName:eE().inner}))):null};LeadsFormIntegration.displayName="LeadsFormIntegration";var eS=a(0xd6ba6894),eI=a(0xb1ea448c),ew=a(0x238b287cf),eT=a(0x2156bdedc),eN=a(0xdc2d0d86),eM=a(0xa0d37ff9),eR=a(0xeb4f1a4d),eP=a(0x93a9f6f3);let eL=new s.Ay("channel_details"),ConnectorManageModal=({name:e,appId:t,serviceType:a})=>{let n=(0,i.wA)(),l=(0,ew.A)(),o=(0,eA.d4)(ed.pM),s=(0,eA.d4)(e=>(0,eN.i)(e,t));(0,r.useEffect)(()=>{n((0,eM._)({reason:"mcp_connector_manage_modal"}))},[n]);let d=Object.values(s)[0],m=d?.valid_tokens?.[0],u=(0,r.useCallback)(async()=>{if(l.track(I.EventId.SLACKBOT_MCP_CLIENT,{contexts:{ui_context:{action:I.UiAction.CLICK,ui_properties:{element_name:"slackbot_mcp_connector_disconnect"},slackbot_mcp_connector:{name:e,service_type:a,app_id:t}}}}),!m)return;let r=(0,eP.xE)({service_type:a,app_id:t});await n((0,eM.D)({externalTokenId:m.external_token_id})),n((0,eR.ZH)({serviceType:r,isConnected:!1})),n((0,eT.B)({serviceType:r,enabled:!1})),n((0,K.O)())},[l,n,e,m,a,t]),p=(0,r.useCallback)(()=>{n((0,K.O)())},[n]);return o?r.createElement(z.dW,{closeModal:p},r.createElement(z.rQ,null,r.createElement(z.Rc,{title:eL.t("Manage {name}",{name:e})})),r.createElement(z.$m,null,r.createElement(z.qf,null,r.createElement("p",null,r.createElement("strong",null,eL.t("Connected account"))),m?r.createElement("div",{className:"p-integrations__mcp_connector_account_row"},r.createElement("span",null,m.external_user_id),r.createElement(c.Ay,{type:"outline",size:"medium",onClick:u},eL.t("Disconnect"))):r.createElement(eI.A,null))),r.createElement(z.jl,null,r.createElement(c.Ay,{type:"outline",size:"medium",onClick:p},eL.t("Cancel")))):null};ConnectorManageModal.displayName="ConnectorManageModal";var eO=a(0x2501a2cee),eD=a(0xa089d16d);let eF=new s.Ay("channel_details"),ConnectorRow=({server:e,handleConnect:t,handleManage:a})=>{let n=(0,eA.d4)(ed.pM),i=(0,r.useCallback)(()=>{e.is_connected?a(e):t(e)},[e,t,a]);return n?r.createElement("div",{className:"p-integrations__mcp_connector_row"},r.createElement("div",{className:"p-integrations__mcp_connector_icon"},e.icon_url?r.createElement(eD.A,{src:e.icon_url,width:24,height:24,alt:eF.t("{server_name} icon",{server_name:e.name})}):r.createElement(eO.Ah,{size:"24",name:"globe",inline:!0})),r.createElement("div",{className:"p-integrations__mcp_connector_info"},r.createElement("span",{className:"p-integrations__mcp_connector_name"},e.name),r.createElement("span",null,e.is_connected?eF.t("Connected"):eF.t("Not connected"))),e.app_id&&e.provider_key&&r.createElement("div",{className:"p-integrations__mcp_connector_actions"},r.createElement(c.Ay,{type:e.is_connected?"outline":"primary",size:"medium",onClick:i},e.is_connected?eF.t("Manage"):eF.t("Connect")))):null};ConnectorRow.displayName="ConnectorRow";var eU=a(0x220ca72b1),eB=a(0x46dbff89),eH=a(0x1d23c7f2c);let eW=new s.Ay("channel_details"),McpConnectorsSection=()=>{let e=(0,i.wA)(),t=(0,ew.A)(),a=(0,eA.d4)(eH.Pi),n=(0,eA.d4)(eH.r9),l=(0,eA.d4)(ed.pM),o=(0,r.useCallback)(async a=>{if(t.track(I.EventId.SLACKBOT_MCP_CLIENT,{contexts:{ui_context:{action:I.UiAction.CLICK,ui_properties:{element_name:"slackbot_mcp_connector_connect"}},slackbot_mcp_connector:{name:a.name,service_type:a.service_type,app_id:a.app_id}}}),a.app_id&&a.provider_key)try{let t=await e((0,eU.$)({appId:a.app_id,providerKey:a.provider_key,reason:"mcp_connector_auth"}));if(!t.authorization_url)return;let n=eS.J.screenX+(eS.J.outerWidth-600)/2,r=eS.J.screenY+(eS.J.outerHeight-700)/2;eS.J.open(t.authorization_url,"mcp_connector_auth",`width=600,height=700,left=${n},top=${r}`)}catch{}},[t,e]),s=(0,r.useCallback)(a=>{t.track(I.EventId.SLACKBOT_MCP_CLIENT,{contexts:{ui_context:{action:I.UiAction.CLICK,ui_properties:{element_name:"slackbot_mcp_connector_manage"}},slackbot_mcp_connector:{name:a.name,service_type:a.service_type,app_id:a.app_id}}}),a.app_id&&e((0,eB.q)({element:r.createElement(ConnectorManageModal,{name:a.name,appId:a.app_id,serviceType:a.service_type}),isStackable:!0}))},[t,e]),c=(0,r.useCallback)(()=>n?r.createElement(ea.A,{numPlaceholders:3}):a&&0!==a.length?r.createElement("div",{className:"p-integrations__mcp_connector_list"},a.map(e=>r.createElement(ConnectorRow,{key:(0,eP.xE)(e),server:e,handleConnect:o,handleManage:s}))):null,[n,a,o,s]);return l?r.createElement(ee.A,null,r.createElement(et.A,{renderList:c,title:eW.t("Connectors")})):null};McpConnectorsSection.displayName="McpConnectorsSection";var eV=a(0x15f8e452a),eG=a(0x2190b3693),eq=a(0x6b745714),ej=a(0x18a31435e),ez=a(0x25354019b),eK=a(0xf931c21),e$=a(0x10ed819ce),eY=a(0x1ffbda36f);let eQ=new s.Ay("channel_details"),eZ={uiStep:I.UiStep.CHANNEL_DETAILS_SEND_EMAIL_UPGRADE,onClick:{enableClogAction:!0}},eJ={uiStep:I.UiStep.CHANNEL_DETAILS_SEND_EMAIL_TO_CHANNEL},SendEmailsToChannelButton=({channel:e,showChannelEmailAddress:t,showChannelEmailAddressUpgradePrompt:a,channelEmail:n,isChannelEmailAddressEnabledByOrg:l})=>{let o,s,c=(0,i.wA)(),d=(0,r.useCallback)(()=>{c((0,eq.v)({channel:e,openModalProps:{isStackable:!0}}))},[c,e]);return((0,en.JM)(e)?(o=eQ.t("Send emails to this conversation"),s=eQ.t("Get an email address that posts incoming emails in this conversation.")):(o=eQ.t("Send emails to this channel"),s=eQ.t("Get an email address that posts incoming emails in this channel.")),a)?r.createElement(ee.A,null,r.createElement(X.A,{renderButton:e=>r.createElement(ej.A,{...e,entryPoint:ez.b.CHANNEL_DETAILS_MODAL_INTEGRATIONS_TAB_EMAIL_TO_CHANNEL,autoClogProps:eZ},eQ.t("See Upgrade Options")),text:s,title:r.createElement("div",{className:"display_flex"},o," ",r.createElement(eK.A,{className:"margin_left_50",uiComponentVariant:I.UiComponentVariant.ADMIN_CHANNEL_SEND_EMAILS_TO_CHANNEL}))})):t&&(n?.address||l)?r.createElement(ee.A,null,r.createElement(eG.A,{ariaLabel:`${o}. ${s}`,dataQa:"integrations__emails_btn",onClick:d,renderTitleIcon:({className:e,...t})=>r.createElement("div",{className:p()(e,"p-integrations__icon_container")},r.createElement(eV.A,{...t,className:"p-integrations__icon",type:"share-email"})),text:s,title:r.createElement("div",{className:"display_flex"},o," ",r.createElement(eK.A,{className:"margin_left_50",uiComponentVariant:I.UiComponentVariant.ADMIN_CHANNEL_SEND_EMAILS_TO_CHANNEL})),autoClogProps:eJ})):null};SendEmailsToChannelButton.displayName="SendEmailsToChannelButton";let eX=(0,T.N)((e,{id:t})=>{let a=(0,ei.OL)(e,t);return{channel:a,showChannelEmailAddress:(0,e$.ut)(e,a),showChannelEmailAddressUpgradePrompt:(0,e$.CI)(e,a),channelEmail:(0,eY.H)(e,{channelId:t}),isChannelEmailAddressEnabledByOrg:(0,e$.iL)(e)}})(SendEmailsToChannelButton);var e0=a(0xcb733d2b),e1=a(0x24546e7f2),e2=a(0xf225ecf2),e4=a(0x1c7997c1),e5=a(0x142775427),e3=a(0x1f803375e),e6=a(0xb0ca8936);let e8={elementName:"remove_email_button",action:I.UiAction.CLICK,onClick:{enableClogAction:!0}},e7=new s.Ay("slack_first_crm"),ManageEmailConnectionPane=({title:e,emailAddress:t,onRemoveEmailClick:a,experimentSlackFirstCrmEmailToCaseGroupOn:n})=>r.createElement(r.Fragment,null,r.createElement(e5.A,null,r.createElement(e3.A,{title:e})),r.createElement(e2.A,null,r.createElement(e4.A,null,r.createElement("div",{className:"display_flex flex_direction_column gap_125 padding_bottom_150"},r.createElement("div",{className:"display_flex flex_direction_column gap_50"},r.createElement(e6.EY,{as:"p"},n?e7.rt("You\u2019re currently connected to <b>{emailAddress}</b>. New emails sent to this address create cases in Slack, and your team can send emails from this address.",{emailAddress:t}):`You're currently connected to ${t}. New emails sent to this address create cases in Slack, and your team can send emails from this address.`),r.createElement(e6.EY,{as:"p"},n?e7.t("To change the sender name or address that\u2019s connected, remove the current email and set up a new connection."):"To change the sender name or address that\u2019s connected, remove the current email and set up a new connection.")),r.createElement("div",null,r.createElement(f.Ay,{type:"outline",onClick:a,autoClogProps:e8},n?e7.t("Remove Email"):"Remove Email"))))));ManageEmailConnectionPane.displayName="ManageEmailConnectionPane";var e9=a(0x2b7f0bcc),te=a(0xce378727),tt=a(0x23b496ae9),ta=a(0x96920791),tn=a(0x16d221c7f),tr=a(0x13ee659f7);let ti={elementName:"cancel_button",action:I.UiAction.CLICK,onClick:{enableClogAction:!0}},tl={elementName:"confirm_remove_email_button",action:I.UiAction.CLICK,onClick:{enableClogAction:!0}},to=new s.Ay("slack_first_crm"),RemoveEmailConnectionPane=({title:e,emailAddress:t,salesforceOrgId:a,onCancelClick:n,onRemoveSuccess:l,experimentSlackFirstCrmEmailToCaseGroupOn:o})=>{let[s,c,d]=(()=>{let e=(0,i.wA)(),t=(0,ew.A)(),[a,n]=(0,r.useState)("initial"),[l,o]=(0,r.useState)("");return["updating"===a,"error"===a,(0,r.useCallback)(async({salesforceOrgId:a,onSuccess:r})=>{try{n("updating"),o(""),await e((0,tr.n)({reason:"manage-email-connection-dialog",salesforceOrgId:a})),n("success"),r()}catch{n("error"),t.track(I.EventId.LOB_DOWNMARKET,{contexts:{ui_context:{ui_step:I.UiStep.EMAIL_TO_CASE_REMOVE_EMAIL,action:I.UiAction.IMPRESSION,ui_properties:{element_name:"remove_error_banner"}}}})}},[e,t]),l]})(),m=(0,r.useCallback)(()=>{d({salesforceOrgId:a,onSuccess:l})},[d,a,l]);return r.createElement(r.Fragment,null,r.createElement(e5.A,null,r.createElement(e3.A,{title:e})),r.createElement(e2.A,null,r.createElement(e4.A,null,r.createElement("div",{className:"display_flex flex_direction_column gap_100"},c&&r.createElement(e9.Ay,{level:e9.A_.error},o?to.t("There was a problem removing your email connection. Give it a moment and try again."):"There was a problem removing your email connection. Give it a moment and try again."),r.createElement(e6.EY,{as:"p"},o?to.rt("Emails sent to <b>{emailAddress}</b> will no longer create cases in Slack. Your team won\u2019t be able to send emails from Slack using this address, and new replies won\u2019t be added to existing cases.",{emailAddress:t}):`Emails sent to ${t} will no longer create cases in Slack. Your team won't be able to send emails from Slack using this address, and new replies won't be added to existing cases.`)))),r.createElement(ta.A,null,r.createElement(tn.A,null,r.createElement(tt.A,{type:"outline",onClick:n,disabled:s,autoClogProps:ti,"aria-label":o?to.t("Cancel"):"Cancel"},o?to.t("Cancel"):"Cancel"),r.createElement(te.A,{type:"danger",onClick:m,loading:s,autoClogProps:tl,"aria-label":o?to.t("Remove Email Connection"):"Remove Email Connection"},o?to.t("Remove Email Connection"):"Remove Email Connection"))))};RemoveEmailConnectionPane.displayName="RemoveEmailConnectionPane";var ts=a(0x8ed8ca46);let tc=new s.Ay("slack_first_crm"),td={eventId:I.EventId.LOB_DOWNMARKET,uiStep:I.UiStep.EMAIL_TO_CASE_MANAGE_CONNECTION,elementName:"manage_connection_pane"},tm={eventId:I.EventId.LOB_DOWNMARKET,uiStep:I.UiStep.EMAIL_TO_CASE_REMOVE_EMAIL,elementName:"remove_email_pane"},tu="manage",tp="remove",ManageEmailConnectionDialog=({emailAddress:e,resetEmailToCaseConfig:t})=>{let a=(0,eA.d4)(e=>"on"===(0,e_._Z)(e,"slack_first_crm_email_to_case")),n=(0,i.wA)(),l=(0,eA.d4)(ts.GQ),o=(0,r.useCallback)(()=>{n((0,K.O)())},[n]),s=(0,r.useCallback)(e=>()=>{e(tp)},[]),c=(0,r.useCallback)(e=>()=>{e(tu)},[]),d=(0,r.useCallback)(()=>{t(),o()},[t,o]),m=(0,r.useMemo)(()=>{let t=a?tc.t("Manage email connection"):"Manage email connection",n=a?tc.t("Remove your email connection?"):"Remove your email connection?";return{[tu]:{render:({switchPane:n})=>r.createElement(ManageEmailConnectionPane,{title:t,emailAddress:e,onRemoveEmailClick:s(n),experimentSlackFirstCrmEmailToCaseGroupOn:a}),modalProps:{contentLabel:t,autoClogProps:td}},[tp]:{render:({switchPane:t})=>r.createElement(RemoveEmailConnectionPane,{title:n,emailAddress:e,salesforceOrgId:l||"",onCancelClick:c(t),onRemoveSuccess:d,experimentSlackFirstCrmEmailToCaseGroupOn:a}),modalProps:{contentLabel:n,role:"alertdialog",autoClogProps:tm}}}},[a,e,s,l,c,d]);return r.createElement(e1.A,{defaultPane:tu,panes:m,closeModal:o,maxWidth:520})};ManageEmailConnectionDialog.displayName="ManageEmailConnectionDialog";let th=(0,a(0x11c82607b).Ay)("Opens the manage email connection dialog",async(e,t,{emailAddress:a,resetEmailToCaseConfig:n})=>{e((0,eB.q)({element:r.createElement(ManageEmailConnectionDialog,{emailAddress:a,resetEmailToCaseConfig:n}),name:"manage-email-connection-dialog",isStackable:!0}))});th.meta={name:"openManageEmailConnectionDialog",key:"createThunkOpenManageEmailConnectionDialog",description:"Opens the manage email connection dialog"};var t_=a(0xcb6dfd95),tf=a(0x6480ae5b);let tb={eventId:I.EventId.LOB_DOWNMARKET,uiStep:I.UiStep.EMAIL_TO_CASE_CHANNEL_DETAILS_INTEGRATIONS,elementName:"email_to_case_section"},tg={elementName:"setup_button",action:I.UiAction.CLICK,onClick:{enableClogAction:!0}},ty=new s.Ay("channel_details"),SlackCRMEmailToCaseSection=({channelId:e})=>{let t=(0,eA.d4)(e=>"on"===(0,e_._Z)(e,"slack_first_crm_email_to_case")),a=(0,i.wA)(),[n,l,o,s]=(0,e0.H)(e,t_.k),c=(0,r.useCallback)(()=>{s(void 0)},[s]),d=(0,r.useCallback)(()=>{a((0,t_.k)({channelId:e}))},[a,e]),m=(0,r.useCallback)(()=>{o?.email_address&&a(th({emailAddress:o.email_address,resetEmailToCaseConfig:c}))},[c,a,o]),u=(0,r.useCallback)(()=>{},[]),p=(0,r.useCallback)(e=>r.createElement("div",{className:"display_flex gap_75"},r.createElement(f.Ay,{size:e.size,type:e.type,onClick:d,autoClogProps:tg},t?ty.t("Manage"):"Manage"),r.createElement(f.Ay,{size:e.size,type:e.type,onClick:u},t?ty.t("Learn More"):"Learn More")),[d,t,u]),h=o&&o.is_verified;return r.createElement(eg.A,{eventId:tb.eventId,uiStep:tb.uiStep,elementName:tb.elementName,clogImpression:!0},r.createElement(ee.A,null,n&&r.createElement(ea.A,{numPlaceholders:1}),!n&&h&&r.createElement(tf.A,{title:t?ty.t("Support email address"):"Support email address",text:t?ty.rt("Connected to <b>{email}</b>",{email:o.email_address}):`Connected to ${o.email_address}.`,editButtonText:t?ty.t("Manage"):"Manage",onClick:m}),!n&&!h&&r.createElement(X.A,{imageUrl:"/img/ia-details/email-to-case-empty.png",imageUrl2x:"/img/ia-details/email-to-case-empty@2x.png",renderButton:p,text:t?ty.t("Receive support emails, collaborate on case resolutions, and respond to customers without leaving Slack. "):"Receive support emails, collaborate on case resolutions, and respond to customers without leaving Slack. ",title:t?ty.t("Connect your support email"):"Connect your support email","data-qa":"integrations__slack_crm_send_emails_section"})))};SlackCRMEmailToCaseSection.displayName="SlackCRMEmailToCaseSection";var tA=a(0x2172ff7ff),tx=a(0x18ee7321c),tE=a(0x11243fb75),tC=a(0x1faa3f1ac),tk=a(0xeaeb4a22),tv=a(0x23619f41c),tS=a(0x128d54e52),tI=a(0x24f1e08bb),tw=a(0x6e465d95),tT=a(0x121a53a99),tN=a(0xf6ed6f31),tM=a(0x1e79c438d);a(0x209e067d1);var tR=a(0x8d57b507),tP=a(0x19d590052),tL=a(0x1d5eeff6d),tO=a(0xe38b5635),tD=a(0x7f7d34d1),tF=a(0x17a41206b);let tU=new s.Ay("channel_details"),tB={uiStep:I.UiStep.CHANNEL_DETAILS_RUN_WORKFLOW,onClick:{enableClogAction:!0}},AppActionItem=({action:e,channelId:t,containerClassName:a,subTextClassName:n,isActive:l})=>{let o=(0,i.wA)(),s=!(0,eA.d4)(tF.Pb),c=!(0,eA.d4)(e=>{let a;return a=(0,ei.OL)(e,t),(0,tM.V)(a)&&(0,tN.bl)(a)}),d=e.app,m=e.name,u=(0,tT.qc)(d),h=e.description||"",_=(0,r.useRef)(),f=(0,r.useCallback)(e=>{_.current=e},[_]),b=(0,r.useCallback)(({className:e})=>r.createElement(tv.A,{ariaHidden:!0,classes:e,image:u?.image_64,size:36}),[u]),g=(0,r.useCallback)(()=>{_.current?.({eventId:I.EventId.APP_SHORTCUTS,elementName:"channel_details_modal",elementType:I.ElementType.BUTTON,appId:d?.app_id}),o((0,tD.d)({actionId:e.id,channelId:t}))},[o,_,d,e,t]),y=tU.t("Start workflow"),A=(0,r.useMemo)(()=>({name:"play"}),[]);return r.createElement(tO.A,{className:p()("p-integrations__workflow_item_container",a),elevation:2,size:"small",isFocused:l,"aria-label":m,onClick:g},r.createElement(tI.A,{className:p()("p-integrations__list_entity_row",{"p-integrations__list_entity_row--disabled":c||s}),size:"medium",primaryContent:r.createElement(tS.Ay,{avatar:b,text:r.createElement(tS.CG,{className:"display_flex align_items_center"},r.createElement("strong",{id:`workflow_item_title_${e.id}`},m),r.createElement(tw.A,{"data-qa":"integrations_legacy_badge",isWorkflow:!0,className:"inline_block margin_left_25"})),subtext:n?r.createElement("span",{className:n},h):h,size:"medium"}),secondaryContent:r.createElement(eg.A,{trackClogRef:f},r.createElement(tL.A,{position:"inset"},r.createElement(tP.A,{svgIconProps:A,onClick:g,tooltip:y,"aria-label":y,autoClogProps:tB,"data-qa":`channel-details-run-action-${e.id}`,ariaDescribedById:`workflow_item_title_${e.id}`})))}))};AppActionItem.displayName="AppActionItem";var tH=a(0x18b367b55),tW=a(0x1dc84ebc7),tV=a(0x24f705a4f),tG=a(0x2a037c8a),tq=a(0x2156dd0c0),tj=a(0x1426c029f),tK=a(0x22f6a086f),t$=a(0x17cc44ffa),tY=a(0x7db59a01),tQ=a(0x18fcd8e2a),tZ=a(0x1c5d4f426);let WorkflowAppItem=({id:e,channelId:t,isActive:a,hideRemoveWorkflowOption:n=!1})=>{let l=(0,i.wA)(),o=(0,eA.d4)(a=>(0,tZ.j0)(a,t,e)),s=(0,tY.F)(o?.share_url||"")||"",c=(0,eA.d4)(e=>(0,tK.bn)(e,{triggerId:s},!0)),d=(0,eA.d4)(e=>c?.workflow?.workflow_id?(0,tQ.g)(e,c.workflow.workflow_id):void 0),m=o?.app_details.icons,u=(0,r.useRef)(),p=(0,r.useCallback)(e=>{u.current=e},[u]),h=(0,r.useMemo)(()=>({location:"channel_details",channelId:t}),[t]),_=(0,r.useMemo)(()=>(0,tW.j)({trigger:c,workflow:d}),[c,d]),f=(0,eA.d4)(e=>!!o?.user_id&&(0,tq.R6)(e,t,o?.user_id)),b=(0,tV.$w)(_),g=!!_.shareUrl,y=!!_.url&&_.triggerType===tG.M.Shortcut,A=(0,r.useCallback)(()=>{_.url&&_.triggerType===tG.M.Shortcut?(u.current?.({eventId:I.EventId.WORKFLOW_START_CLICK,elementType:I.ElementType.BUTTON,uiPage:"channel_details",appId:_.appId,workflowTriggerId:_.triggerId,workflowId:_.workflowId}),l((0,t$.L)({linkTriggerUrl:_.url,hermesLinkTriggerUIContext:{location:"channel_details",channelId:t},reason:"trip-trigger-from-channel-details-integrations-click"}))):l((0,tj.u)({shortcutInfo:_,hermesLinkTriggerUIContext:h}))},[_,l,t,h]),x=_.title||"",E=_.description||"";return r.createElement(tH.A,{showViewDetails:!0,showCanCopyWorkflowLink:b,showForwardWorkflow:g,showRemoveMember:!n&&f,showStartWorkflowButton:y,setCustomClogRef:p,icon:m?.image_36,id:e,channelId:t,title:x,description:E,onWorkflowSelected:A,shortcutInfo:_,hermesLinkTriggerUIContext:h,isActive:a})};WorkflowAppItem.displayName="WorkflowAppItem";let WorkflowsSectionItemV2=({actionPayload:e,workflowPayload:t,hideRemoveWorkflowOption:a=!1,isActive:n,onMouseEnter:i,onMouseLeave:l})=>e||t?e?r.createElement("div",{onMouseEnter:i,onMouseLeave:l},r.createElement(AppActionItem,{isActive:n,...e})):t?r.createElement("div",{onMouseEnter:i,onMouseLeave:l},r.createElement(WorkflowAppItem,{isActive:n,hideRemoveWorkflowOption:a,...t})):null:null;WorkflowsSectionItemV2.displayName="WorkflowsSectionItemV2";var tJ=a(0x20e77676b),tX=a(0x3e058968),t0=a(0x205563788),t1=a(0x243435af9),t2=a(0x1a02c72b5),t4=a(0xd6a16321),t5=a(0xa1832ae4),t3=a(0x6cc4c078),t6=a(0x91e15f37),t8=a(0x1ee439e69),t7=a(0x8ae1909);let t9=new s.Ay("channel_details"),ae={uiStep:I.UiStep.CHANNEL_DETAILS_WORKFLOWS_UPGRADE,onClick:{enableClogAction:!0}},at={uiStep:I.UiStep.CHANNEL_DETAILS_ADD_WORKFLOW,onClick:{enableClogAction:!0}},aa={uiStep:I.UiStep.CHANNEL_DETAILS_MANAGE_WORKFLOWS,onClick:{enableClogAction:!0}},WorkflowsSection=({id:e,canAddAutomation:t,channelActions:a,isFreePlan:n,isInTrial:l,isTeamPlanFrozen:s,workflowApps:c})=>{let d=(0,i.wA)(),[m,u]=(0,r.useState)(void 0),p=(0,eA.d4)(tX.tb),h=(0,eA.d4)(t1.A),_=(0,r.useCallback)(()=>{p?d((0,t2.o)((0,t4.Hf)({tabId:t0.l.ManagedByYou}))):d((0,t2.o)((0,t4.x6)()))},[p,d]),b=(0,r.useCallback)(t=>{let a=m===t.id;if(t.action){let n={action:t.action,id:t.id,channelId:e};return r.createElement(tE.A,{id:t.id,onFocus:()=>u(t.id),onBlur:()=>u(void 0),"aria-label":t.action.name},r.createElement(WorkflowsSectionItemV2,{onMouseEnter:()=>u(t.id),onMouseLeave:()=>u(void 0),actionPayload:n,isActive:a}))}let n={channelId:e,id:t.id};return r.createElement(tE.A,{"aria-labelledby":`workflow-${t.id}`,id:t.id,onFocus:()=>u(t.id),onBlur:()=>u(void 0)},r.createElement(WorkflowsSectionItemV2,{onMouseEnter:()=>u(t.id),onMouseLeave:()=>u(void 0),workflowPayload:n,isActive:a}))},[m,e,u,h]),g=(0,r.useCallback)(()=>{if(!a?.length&&!c?.length)return null;let t=[];c&&(t=c.filter(e=>!e.is_v1).map(t=>({id:t.app_id,channelId:e})).slice(0,t7.I));let n=[...t,...[...a].sort(({name:e},{name:t})=>(0,tA.Ay)(e,t)).map(t=>({id:t.id,channelId:e,action:t})).slice(0,t7.I)].slice(0,t7.I),i=n.length<=5?60*n.length:300;return r.createElement(o.A,{disableHeight:!0},({width:e})=>r.createElement("div",{style:{width:e,height:i}},r.createElement(tk.A,{width:e,height:i},r.createElement(tx.A,{"aria-label":h?t9.t("Workflows"):"Workflows",items:n,renderItem:b}))))},[a,c,e,h,b]),y=(0,r.useCallback)(e=>r.createElement(r.Fragment,null,t&&r.createElement(f.Ay,{...e,className:"margin_right_75",onClick:_,autoClogProps:at,"data-qa":"integrations__workflows_cta"},t9.t("Add Automation")),r.createElement(tJ.A,{articleId:0xf1536060d13,"data-qa":"integrations__workflows_cta",forceDisplayAsButton:!0},r.createElement(f.Ay,e,t9.t("Learn More")))),[t,_]),A=(0,r.useCallback)(e=>r.createElement("div",e,t&&r.createElement(f.Ay,{type:"outline",size:"small",className:"margin_right_75",onClick:_},t9.t("Add Automation")),r.createElement(tJ.A,{articleId:0xf1536060d13,"data-qa":"integrations__workflows_cta",forceDisplayAsButton:!0},r.createElement(f.Ay,{type:"outline",size:"small"},t9.t("Learn More")))),[t,_]);if(s)return null;if(n)return r.createElement(ee.A,{showTrialBanner:l},r.createElement(X.A,{renderButton:e=>t&&r.createElement(ej.A,{...e,entryPoint:ez.b.CHANNEL_DETAILS_MODAL_INTEGRATIONS_TAB_WORKFLOWS_SECTION,autoClogProps:ae},t9.t("See Upgrade Options")),text:t9.t("There\u2019s a few automations that will make your life easier. Set them up in a flash."),title:r.createElement("div",{className:"display_flex"},t9.t("Supercharge your channel")," ",r.createElement(eK.A,{className:"margin_left_50",uiComponentVariant:I.UiComponentVariant.ADMIN_CHANNEL_WORKFLOWS}))}));let x=c&&c.filter(e=>!e.is_v1).length;return a?.length||x?r.createElement(ee.A,null,r.createElement(et.A,{renderSectionedFooter:A,renderList:g,title:t9.t("Published Automations"),titleLink:a?.length>0&&t&&r.createElement(tC.A,{onClick:_,autoClogProps:aa},t9.t("Manage"))})):r.createElement(ee.A,null,r.createElement(X.A,{imageUrl:"/img/ia-details/workflows-empty.png",imageUrl2x:"/img/ia-details/workflows-empty@2x.png",renderButton:y,text:t9.t("There\u2019s a few automations that will make your life easier. Set them up in a flash."),title:r.createElement("div",{className:"display_flex"},t9.t("Supercharge your channel")," ",r.createElement(eK.A,{className:"margin_left_50",uiComponentVariant:I.UiComponentVariant.ADMIN_CHANNEL_WORKFLOWS}))}))};WorkflowsSection.displayName="WorkflowsSection";let an=(0,T.N)((e,{id:t})=>{let a=(0,ei.OL)(e,t),n=(0,tR.fo)(e,t),r=(0,t8.H7)(e);return{channelActions:n,isFreePlan:(0,t5.tc)(r),isInTrial:(0,t6.iH)(e),isTeamPlanFrozen:(0,t3._s)(e),workflowApps:(0,tZ.E9)(e,a.id)}})(WorkflowsSection),IntegrationsSection=({id:e})=>{let t=(0,i.wA)(),a=(0,eA.d4)(t=>eb(t,e)),n=(0,eA.d4)(t=>(0,tN.bl)((0,ei.OL)(t,e))),l=(0,r.useCallback)(()=>{let a=I.EventId.APP_CLICK_ADD_APPS_IN_CHANNEL_APPS_MODAL,n={action:I.UiAction.CLICK,ui_element:I.UiElement.BTN_ADD_APPS};t((0,H.A)({channelId:e,addAppsVariant:!0,referringEventId:a,referringUiContext:n,isRoadblockModalStackable:!0}))},[t,e]);return r.createElement(r.Fragment,null,a[ef.Workflows]&&r.createElement(an,{id:e,canAddAutomation:n}),a[ef.Apps]&&r.createElement(ec,{id:e,maxApps:5,onOpenApps:l}),a[ef.SendEmail]&&r.createElement(eX,{id:e}),a[ef.SlackCrmLeadsForm]&&r.createElement(LeadsFormIntegration,{id:e}),a[ef.SlackCRMEmailToCase]&&r.createElement(SlackCRMEmailToCaseSection,{channelId:e}),a[ef.McpConnectors]&&r.createElement(McpConnectorsSection,null))};IntegrationsSection.displayName="IntegrationsSection";let ar=IntegrationsSection},0x159582345:(e,t,a)=>{"use strict";a.d(t,{Z:()=>LimitedAccessGroupDropdown});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x15dd8a31),c=a(0x1be9380c8),d=a(0x70b3ffcd),m=a(0x226892387),u=a(0x24b18883e),p=a.n(u);let h=new o.Ay("channel_details");function LimitedAccessGroupDropdown({minimumAccessLevel:e,onLimitedAccessGroupChange:t=l.A}){let a=(0,m.d4)(c.Sl),r=e||d.z.Read,[o,u]=(0,n.useState)(r),_={Read:h.t("Anyone who can view record"),Edit:h.t("Record editors"),Transfer:h.t("Record owners")},f=(0,n.useMemo)(()=>[{label:_.Read,value:d.z.Read,description:h.t("Anyone with access to the record can view the channel and invite others.")},{label:_.Edit,value:d.z.Edit,description:h.t("People who can edit the record can view the channel and invite others to join channels.")},{label:_.Transfer,value:d.z.Transfer,description:h.t("Only record owners and those with transfer access can view the channel and invite others to join channels.")}],[_.Edit,_.Read,_.Transfer]),b=(0,n.useCallback)(e=>{e&&e.value&&(t?.(e.value),u(e.value))},[t]),g=(0,n.useCallback)((e,t)=>{let a=f.find(t=>t.label===e.label);if(!a)return null;let r=i()({[p().limitedAccessGroupDropdownOptionSelected]:t}),l=i()(p().limitedAccessGroupDropdownTitle,{[p().limitedAccessGroupDropdownTitleSelected]:!t});return n.createElement("div",{className:r},n.createElement("div",null,n.createElement("span",{className:l},a.label),t&&n.createElement("span",{className:p().limitedAccessGroupDropdownCaption},a.description)))},[f]),y=(0,n.useCallback)(e=>g(e,!0),[g]),A=(0,n.useCallback)(e=>g(e,!1),[g]);if(!a)return null;let x=a?h.t("Limited access group"):"";return n.createElement(s.A,{"data-qa":"limited-access-group-dropdown",selectId:"limited_access_group_level",options:f,width:"100%",onOptionSelected:b,renderOption:y,renderSelectedOption:A,selectedOption:f.find(e=>e.value===o),optionsRowHeight:66,ariaLabel:x,hideOptionsListCheckbox:!0})}LimitedAccessGroupDropdown.displayName="LimitedAccessGroupDropdown"},0x1e0acdc3d:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x24c261bcb);function ListPlaceholders({numPlaceholders:e}){return n.createElement("div",null,(0,r.A)(e).map(e=>n.createElement("div",{className:"p-channel_details__placeholder",key:e},n.createElement("div",{className:"p-channel_details__placeholder_avatar"}),n.createElement("div",null,n.createElement("div",{className:"p-channel_details__placeholder_line"}),n.createElement("div",{className:"p-channel_details__placeholder_line"})))))}ListPlaceholders.displayName="ListPlaceholders";let i=ListPlaceholders},0x247e8ed4c:(e,t,a)=>{"use strict";a.d(t,{P:()=>ManageChannelTabsPermissions});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1e2051844),l=a(0x20482ad21),o=a(0x30d0b075),s=a(0x15014e268),c=a(0xc66ee342),d=a(0x238ac78f2),m=a(0x11ed04fa0),u=a(0x1c760ba43),p=a(0x54bc7020),h=a(0x12185e091),_=a(0xa1832ae4),f=a(0x226892387),b=a(0x217553e42),g=a(0x1ee439e69),y=a(0x1bbda52ad),A=a.n(y);let x=new l.Ay("channel_tabs");function ManageChannelTabsPermissions({channelId:e}){let t=(0,r.wA)(),a=(0,f.d4)(t=>(0,b.OL)(t,e)),l=(0,f.d4)(e=>(0,_.tc)((0,g.H7)(e))),y=(0,f.d4)(e=>(0,m.A1)(e,a))&&!(0,h.JM)(a),E=a?.properties?.who_can_manage_tabs?a?.properties?.who_can_manage_tabs:u.bB.Everyone,[C,k]=(0,n.useState)(E),v=(0,n.useMemo)(()=>[{label:x.t("Everyone"),value:u.bB.Everyone,ariaLabel:x.t("Everyone")},{label:l?x.t("Channel owner",{fallbackHash:"5e0eb2fa44044ec18724c1fcd8468be715fba429",fallbackHashNs:"channel_details"}):x.t("Channel managers"),value:u.bB.ChannelManagers,ariaLabel:x.t("Channel managers")}],[l]),S=(0,n.useCallback)(async a=>{if(!Object.values(u.bB).includes(a.value))return;let n=(0,o.Zf)({who_can_manage_tabs:a.value});k(a.value);try{await t((0,p.D)({props:n,reason:"set_channel_tab_who_can_manage",channelId:e}))}catch{k(C)}},[e,t,C]),I=x.t("Choose who can add, remove, and reorder tabs"),w=(0,n.useMemo)(()=>n.createElement("span",{id:"manage_tabs"},I),[I]);return n.createElement(c.A,null,n.createElement(d.A,{title:w}),n.createElement(s.Ay,{ariaLabel:I,options:v,onOptionSelected:S,className:A().manage_channel_tabs_select,isDisabled:!y,selectedOption:(0,i.A)(v,e=>e.value===C)}))}ManageChannelTabsPermissions.displayName="ManageChannelTabsPermissions"},0x1de5f4739:(e,t,a)=>{"use strict";a.d(t,{F:()=>r,i:()=>n});let n={LIST_ORGS:"list_orgs",SELECT_PERMISSIONS:"select_permissions",CONFIRM:"confirm"},r={CLIENT:"client",ENTERPRISE_ORG_DASHBOARD:"enterprise_org_dashboard",WORKSPACE_ADMIN_SETTINGS:"workspace_admin_settings"}},0x1db367779:(e,t,a)=>{"use strict";a.d(t,{z:()=>ManagePermissionsModal,A:()=>j});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x24546e7f2),s=a(0x2b7f0bcc),c=a(0x102edf836),d=a(0x11a296110),m=a(0x247cf31a2),u=a(0x2376ea9bb),p=a(0x20e80190e);let ManagePermissionsModalHeader=({headerTitle:e,team:t,channel:a})=>n.createElement(p.rQ,null,n.createElement(p.Rc,{"data-qa":"manage_permissions_modal__header",icon:n.createElement(u.A,{"data-qa":"manage_permissions_modal__header_team_icon",size:40,team:t,ariaHidden:!0}),title:e,subtitle:n.createElement(m.A,{channel:a,"data-qa":"manage_permissions_modal__header_channel"})}));ManagePermissionsModalHeader.displayName="ManagePermissionsModalHeader";var h=a(0x1de5f4739),_=a(0x238b287cf),f=a(0x3711e82d);function useManagePermissionsModalClogger(e,t,a){let r=(0,_.A)(),i=(0,n.useRef)(a);return(0,n.useEffect)(()=>{r.track(f.EventId.SLACK_CONNECT_MANAGE_EXTERNAL_PERMISSIONS,{contexts:{ui_context:{ui_step:e,ui_page:t,action:f.UiAction.IMPRESSION}},...void 0!==i.current?{wasExternalLimitedToggled:i.current}:{}})},[r,e,t]),r}let getUiPage=e=>{switch(e){case h.F.ENTERPRISE_ORG_DASHBOARD:return f.UiPage.ENTERPRISE_ORG_DASHBOARD;case h.F.WORKSPACE_ADMIN_SETTINGS:return f.UiPage.WORKSPACE_ADMIN_SETTINGS;case h.F.CLIENT:default:return null}};var b=a(0x15d9bc40c),g=a(0x20e77676b),y=a(0x2120d7f64),A=a(0x76e0247),x=a(0xcf1ae589),E=a(0xa1832ae4),C=a(0x226892387),k=a(0x1fcbb004d),v=a(0x121029398),S=a(0xf3cb31d9),I=a(0x1ee439e69);let w=new l.Ay("channel_details"),ManagePermissionsModalConfirmStep=({teamId:e,channel:t,switchPane:a,showToast:i,action:l,entryPoint:o})=>{let{speedBumpState:m,closeSpeedBump:u,openSpeedBump:_}=(0,y.v)(),T=(0,C.d4)(e=>(0,A.pJ)(e,t)),N=(0,C.d4)(e=>(0,x.Px)(e,t)),M=(0,r.wA)(),R=(0,C.d4)(t=>(0,I._J)(t,e)),[P,L]=(0,n.useState)(!1),[O,D]=(0,n.useState)(!1),F=(0,n.useRef)(null),U=(0,n.useMemo)(()=>[F],[F]),B=f.UiStep.MANAGE_EXTERNAL_PERMISSIONS_MODAL_CONFIRM,H=getUiPage(o),W=l===S.UW.DOWNGRADE,V=useManagePermissionsModalClogger(B,H,W);(0,n.useEffect)(()=>{m?.isVisible&&V.track(f.EventId.SLACK_CONNECT_MANAGE_EXTERNAL_PERMISSIONS,{contexts:{ui_context:{uiStep:B,uiPage:H,action:f.UiAction.IMPRESSION,ui_properties:{element_name:"modal_speed_bump"}}}})},[V,B,H,m?.isVisible]);let G=o===h.F.CLIENT,onSave=async()=>{if(t&&e&&l){L(!0);try{await M((0,v.x0)({channel:t,teamId:e,action:l})),G?M((0,k.O)()):(i({action:b.MF.manage_external_permissions}),a(h.i.LIST_ORGS,{channel:t}))}catch{u(),D(!0)}finally{L(!1)}}},renderContent=()=>l===S.UW.UPGRADE?n.createElement("div",{"data-qa":"manage_permissions_modal_confirm_step_upgrade_content",className:"p-manage_permissions_modal--content"},n.createElement("p",null,w.rt("External people from <strong>{teamName}</strong> will now be able to post and invite their teammates.",{teamName:(0,E.F1)(R)})),n.createElement("p",{className:"p-manage_permissions_modal--content_upgrade_secondary_text"},w.rt("They will also be able to add apps and workflows and will get an archived copy of the channel\u2019s contents. <a>Learn more about permissions</a>",null,({text:e,tag:t})=>"a"===t?n.createElement(g.A,{articleId:0x15d3fb76fcd},e):null))):n.createElement("p",{"data-qa":"manage_permissions_modal_confirm_step_downgrade_content",className:"p-manage_permissions_modal--content"},w.rt("External people from <strong>{teamName}</strong> can no longer invite their coworkers. They will still be able to post in channel. <a>Learn more about permissions</a>",{teamName:(0,E.F1)(R)},({text:e,tag:t})=>"a"===t?n.createElement(g.A,{articleId:0x15d3fb76fcd},e):null));renderContent.displayName="renderContent";let getSpeedBumpProps=()=>({heading:n.createElement("div",{"data-qa":"manage_permissions_modal_speed_bump_heading"},w.t("Are you sure you want to make this change?")),message:n.createElement("div",{"data-qa":"manage_permissions_modal_speed_bump_content"},w.rt("Once you set this permission, you won\u2019t be able to make changes to it directly in the Slack app. <a>See how to make changes</a>",{"<a>":({text:e})=>n.createElement(g.A,{ref:F,articleId:0x53d4af12b9},e)})),continueButtonLabel:w.t("Save Permission"),continueButtonType:c.QE.primary,cancelButtonLabel:w.t("Cancel"),onCancel:u,onContinue:onSave});getSpeedBumpProps.displayName="getSpeedBumpProps";let q={isPrimaryCTA:!0,onClick:{enableClogAction:!0},wasExternalLimitedToggled:W,uiStep:B};return n.createElement(n.Fragment,null,n.createElement(ManagePermissionsModalHeader,{headerTitle:G?w.t("Manage permissions"):w.t("Manage external permissions"),team:R,channel:t}),n.createElement(p.$m,null,n.createElement(p.qf,null,O&&n.createElement(s.Ay,{level:s.A_.error,icon:"warning",className:"p-manage_permissions_modal__error_banner"},w.rt("Unable to save change."))),n.createElement(p.qf,null,renderContent())),n.createElement(p.jl,null,m?.isVisible&&n.createElement(p.ty,{...m,description:m.message,continueButtonIsLoading:P,autoFocusContinueButton:!0,focusableContents:U,"data-qa":"manage_permissions_modal__speed_bump",autoClogProps:{continueButton:{elementName:"modal_speed_bump_save_button",...q},cancelButton:{elementName:"modal_speed_bump_cancel_button",...q}}}),n.createElement(p.ox,null,n.createElement(d.$n,{"data-qa":"manage_permissions_modal_confirm_step_back_button",type:"outline",onClick:()=>a(h.i.SELECT_PERMISSIONS,{channel:t,teamId:e,action:l})},w.t("Back")),n.createElement(d.lV,{"data-qa":"manage_permissions_modal_confirm_step_save_button",type:"primary",loading:P,onClick:T!==N?()=>{let e=getSpeedBumpProps();e&&_(e)}:onSave,autoClogProps:{elementName:"save_button",...q},"aria-label":w.t("Save")},w.t("Save")))))};ManagePermissionsModalConfirmStep.displayName="ManagePermissionsModalConfirmStep";var T=a(0x15f8e452a),N=a(0x1de80d519),M=a(0x216ede730),R=a(0x6b35329),P=a(0x217553e42),L=a(0x191b661f9);let O=new l.Ay("channel_details"),ManagePermissionsModalListOrgsStep=({channelId:e,switchPane:t,entryPoint:a})=>{let i=(0,r.wA)(),l=a===h.F.WORKSPACE_ADMIN_SETTINGS||a===h.F.ENTERPRISE_ORG_DASHBOARD;useManagePermissionsModalClogger(f.UiStep.MANAGE_EXTERNAL_PERMISSIONS_MODAL_LIST_ORGS,getUiPage(a));let o=(0,C.d4)(t=>l?(0,L.OL)(t,e):(0,P.OL)(t,e)),s=(0,C.d4)(I.Yc),c=(0,C.d4)(e=>(0,R.A)(e,o)).filter(e=>e!==s?.id),u=(0,C.d4)(e=>(0,M.A)(e,o)),_=(0,C.Z2)(e=>c.map(t=>(0,I._J)(e,t)));return n.createElement(n.Fragment,null,n.createElement(p.rQ,null,n.createElement(p.Rc,{title:O.rt("Manage external permissions"),subtitle:n.createElement(m.A,{channel:o})})),n.createElement(p.$m,null,n.createElement(p.qf,null,n.createElement("p",null,O.t("Choose an organization below to change their permissions in this channel.")),n.createElement("div",{className:"p-manage_permissions_modal_list_orgs_step__org_list"},_.map(e=>{if(!e)return null;let a=u?.includes(e.id);return n.createElement(d.Nm,{key:`org-item-${e.id}`,"data-qa":"manage_permission_modal_org_item",className:"p-manage_permissions_modal_list_orgs_step__org_item",onClick:()=>t(h.i.SELECT_PERMISSIONS,{channel:o,teamId:e.id})},n.createElement(N.e,{id:e.id,team:e,bold:!1,secondaryContent:n.createElement(n.Fragment,null,n.createElement("span",{"data-qa":"manage_permission_modal_org_item_permission"},a?O.rt("Can only post"):O.rt("Can post & invite")),n.createElement(T.A,{type:"chevron-medium-right"})),className:"p-manage_permissions_modal__org_list_team_entity"}))})))),n.createElement(p.jl,null,n.createElement(p.ox,null,n.createElement(p.s_,{type:"outline","data-qa":"manage_permission_modal_done_button",onClick:()=>i((0,k.O)()),"aria-label":O.t("Done")},O.t("Done")))))};ManagePermissionsModalListOrgsStep.displayName="ManagePermissionsModalListOrgsStep";var D=a(0x2501a2cee),F=a(0x1ecf60a39),U=a(0xd289a116),B=a(0xe739523);let H=new l.Ay("channel_details"),ManagePermissionsModalSelectPermissionsStep=({teamId:e,channel:t,switchPane:a,action:i,entryPoint:l})=>{let o=(0,r.wA)(),c=(0,C.d4)(t=>(0,I._J)(t,e)),{ok:m,reason:u}=(0,C.d4)(e=>(0,A.x9)(e,t)),{ok:_,reason:b}=(0,C.d4)(e=>(0,x.fH)(e,t)),g=(0,C.d4)(a=>(0,B.A)(a,e,t??"")),[y,v]=(0,n.useState)(()=>i?i===S.UW.DOWNGRADE:g),w=g?u===A.wP.WhoCanCreateExternalUnlimitedPref:b===x.ir.WhoCanCreateExternalLimitedPref,T=y?U.l.ExternalLimited:U.l.ExternalUnlimited,N=l===h.F.CLIENT,M=g?!m:!_,R="external_limited_upgrade_permissions_legend",P={uiStep:f.UiStep.MANAGE_EXTERNAL_PERMISSIONS_MODAL_SELECT_PERMISSIONS,onClick:{enableClogAction:!0}};return useManagePermissionsModalClogger(f.UiStep.MANAGE_EXTERNAL_PERMISSIONS_MODAL_SELECT_PERMISSIONS,getUiPage(l),y),n.createElement(n.Fragment,null,n.createElement(ManagePermissionsModalHeader,{headerTitle:N?H.t("Manage permissions"):H.t("Manage external permissions"),team:c,channel:t}),n.createElement(p.$m,null,n.createElement(p.qf,null,n.createElement("div",null,n.createElement("p",{id:R,className:"p-manage_permissions_modal__external_limited_radiogroup_legend"},M&&n.createElement(D.Ah,{name:"lock-filled",inline:!0,"data-qa":"manage_permissions_modal_lock_icon",size:"16"}),n.createElement("span",{className:"p-manage_permissions_modal__header"},H.rt("What should members of {teamName} be able to do?",{teamName:(0,E.F1)(c)})))),M&&n.createElement(s.Ay,{type:"inline",level:s.A_.default,className:"margin_bottom_50 margin_top_50 p-manage_permissions_modal__uneditable_setting_banner","data-qa":"manage_permissions_modal_alert"},w?H.rt("Your admins have not shared the permission required to manage this setting."):H.rt("Your admins have not enabled your organization to change this permission.")),n.createElement(F.A,{selectedRadio:T,onRadioChange:e=>{v(e.target.value===U.l.ExternalLimited)},legendId:R,isDisabled:M}))),n.createElement(p.jl,null,n.createElement(p.ox,null,N?n.createElement(p.s_,{"data-qa":M?"manage_permissions_modal_ok_button":"manage_permissions_modal_cancel_button",type:"outline",onClick:()=>o((0,k.O)()),autoClogProps:{elementName:M?"ok_button":"cancel_button",...P},"aria-label":M?H.t("OK"):H.t("Cancel")},M?H.t("OK"):H.t("Cancel")):n.createElement(d.Ay,{"data-qa":"manage_permissions_modal_back_button",type:"outline",onClick:()=>a(h.i.LIST_ORGS)},H.t("Back")),!M&&n.createElement(d.Ay,{"data-qa":"manage_permissions_modal_next_button",type:"primary",disabled:y===g,onClick:()=>{let n=y?S.UW.DOWNGRADE:S.UW.UPGRADE;a(h.i.CONFIRM,{channel:t,teamId:e,action:n})},autoClogProps:{elementName:"next_button",isPrimaryCTA:!0,wasExternalLimitedToggled:y,...P}},H.t("Next")))))};ManagePermissionsModalSelectPermissionsStep.displayName="ManagePermissionsModalSelectPermissionsStep";var W=a(0x19c76d181),V=a(0x11eae4d05),G=a(0x100313bb4);let q=new l.Ay("channel_details"),ManagePermissionsModal=({teamId:e,channel:t,initialPane:a=h.i.SELECT_PERMISSIONS,showToast:l})=>{let s,c=(0,r.wA)(),d=(0,n.useCallback)(()=>c((0,k.O)()),[c]),m=q.t("Manage Permissions List Organizations"),u=q.t("Manage Permissions Select Permissions"),p=q.t("Manage Permissions Confirm"),_=(0,C.d4)(G.RE),b=(0,C.d4)(G.s$),g=(0,C.d4)(W.TZ);s=!g&&b?h.F.ENTERPRISE_ORG_DASHBOARD:!g&&_?h.F.WORKSPACE_ADMIN_SETTINGS:h.F.CLIENT;let y=(0,n.useMemo)(()=>({[h.i.LIST_ORGS]:{render:e=>n.createElement(ManagePermissionsModalListOrgsStep,{channelId:t.id,entryPoint:s,...e}),modalProps:{contentLabel:m}},[h.i.SELECT_PERMISSIONS]:{render:a=>n.createElement(ManagePermissionsModalSelectPermissionsStep,{teamId:e??"",channel:t,entryPoint:s,...a}),modalProps:{contentLabel:u}},[h.i.CONFIRM]:{render:a=>n.createElement(ManagePermissionsModalConfirmStep,{teamId:e??"",channel:t,showToast:l,entryPoint:s,...a}),modalProps:{contentLabel:p}}}),[e,t,l,s,m,u,p]);return n.createElement(i.A,{eventId:f.EventId.SLACK_CONNECT_MANAGE_EXTERNAL_PERMISSIONS,uiPage:getUiPage(s),clogImpression:!0},n.createElement(o.A,{closeModal:d,defaultPane:a,panes:y,className:"p-manage_permissions_modal",dataQa:"manage_permissions_modal"}))};ManagePermissionsModal.displayName="ManagePermissionsModal";let j=(0,V.e)(ManagePermissionsModal)},0xa55583b6:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x4bdf0df6),i=a(0x20482ad21),l=a(0x15f8e452a),o=a(0x1faa3f1ac),s=a(0x5525669),c=a(0xc66ee342),d=a(0x189393d41),m=a(0x680cef35),u=a(0x11ad3c74f),p=a(0x1b9d5cc0c),h=a(0xdb0ffe37),_=a(0x1d600678),f=a(0x1ccef1c6f),b=a(0x226892387),g=a(0xe684f705);let y=new i.Ay("channel_details"),MemberProfileSection=({memberId:e,onOpenProfile:t,hidePhone:a})=>{let i=(0,b.d4)(t=>(0,g.nv)(t,e)),A=(0,b.d4)(e=>(0,f.ty)(e,"time24")),x=(0,b.d4)(e=>(0,_.x)(e,"display_email_addresses")),E=(0,b.d4)(e=>(0,_.x)(e,"display_external_email_addresses")),C=(0,p.zY)(i),k=(0,p.v8)(i),v=(0,p.et)(i),S=(0,p.BM)(i),I=(0,m.A)("ChannelDetailsModal"),w=(0,h.g)(i),[T,N]=(0,n.useState)();(0,u.A)(()=>{(v||S)&&N((0,r.Ay)(Date.now(),{do24hrTime:A,timeZone:v??void 0,timeZoneOffset:S}))},[A,v,S]);let M=!!T,R=!I&&(0,d.A)(k)&&!a,P=(0,d.A)(C)&&(w?E:x||(0,p.fy)(i));return M||R||P?n.createElement(c.A,null,n.createElement(s.A,{renderButton:()=>n.createElement(o.A,{className:"bold",onClick:t},y.t("View full profile")),text:n.createElement(n.Fragment,null,M&&n.createElement("div",{className:"p-about_modal__member_profile_section_item"},n.createElement(l.A,{"aria-hidden":!0,className:"p-about_modal__member_profile_section_item_icon",type:"clock-o"}),n.createElement("span",null,y.t("{time} local time",{time:T}))),R&&n.createElement("div",{className:"p-about_modal__member_profile_section_item"},n.createElement(l.A,{"aria-hidden":!0,className:"p-about_modal__member_profile_section_item_icon",type:"phone"}),n.createElement(o.A,{href:`tel:${k}`},k)),P&&n.createElement("div",{className:"p-about_modal__member_profile_section_item"},n.createElement(l.A,{"aria-hidden":!0,className:"p-about_modal__member_profile_section_item_icon",type:"envelope-o"}),n.createElement(o.A,{href:`mailto:${C}`},C)))})):null};MemberProfileSection.displayName="MemberProfileSection";let A=MemberProfileSection},0x23153d635:(e,t,a)=>{"use strict";a.d(t,{B:()=>k,Q:()=>C});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x11a296110),s=a(0x937dca65),c=a(0x4e1a3b33),d=a(0x1337d9fa2),m=a(0xf3719a28),u=a(0x20e80190e),p=a(0x11c82607b),h=a(0x226892387),_=a(0x217553e42),f=a(0x1692241fc),b=a(0x21293e292),g=a(0x14ea3ce99),y=a(0xd93ecf94),A=a(0x1fcbb004d),x=a(0x11eae4d05);let E=new i.Ay("channel_details");function MuteCanvasTabUpdatesModal({channelId:e,fileId:t,isForChannelCanvas:a=!1}){let i=(0,r.wA)(),d=(0,n.useCallback)(()=>i((0,A.O)()),[i]),[p,y]=(0,n.useState)(!1),[x,C]=(0,n.useState)(!1),k=(0,h.d4)(t=>(0,_.OL)(t,e)),{fileId:v}=(0,m.H)(k),S=t||v,I=(0,h.d4)(e=>S?(0,g.Lp)(e,S):void 0),w=(0,n.useCallback)(()=>{y(!0),C(!1),a?i((0,b.S)({channelId:e,muteChannelCanvasUpdates:!0})).then(()=>{d()}).catch(()=>{C(!0)}).finally(()=>{y(!1)}):i((0,f.p)({channelId:e,fileId:t,muteEditUpdates:!0})).then(()=>{d()}).catch(()=>{C(!0)}).finally(()=>{y(!1)})},[a,i,e,d,t]),T="mute_canvas_tab_updates_title",N="mute_canvas_tab_updates_content",M=n.createElement(s.A,{channel:k,includeChannelPrefix:!0,displayFormerNames:!1}),R=n.createElement(c.A,{file:I});return n.createElement(u.dW,{closeModal:d,labelledby:T,describedby:N},n.createElement(u.rQ,null,n.createElement(u.Rc,{id:T,title:E.t("Don\u2019t post updates from this canvas?")})),n.createElement(u.$m,null,n.createElement(u.qf,null,x&&n.createElement(l.Ay,{level:"error",className:"margin_bottom_100"},E.t("Oops, something went wrong. Please try again.")),n.createElement("p",{id:N},E.rt("Update messages for <b>{canvas}</b> will no longer be posted to {channel}.",{channel:M,canvas:R})))),n.createElement(u.jl,null,n.createElement(u.ox,null,n.createElement(o.Ay,{onClick:d,type:"outline"},E.t("Cancel")),n.createElement(u.s_,{autoFocus:!0,type:"primary",onClick:w,loading:p,"aria-label":E.t("Save")},E.t("Save")))))}MuteCanvasTabUpdatesModal.displayName="MuteCanvasTabUpdatesModal";let C=(0,x.e)(MuteCanvasTabUpdatesModal),k=(0,p.Ay)("opens the mute canvas tab update modal but first looks up the file from the message",(e,t,{ts:a,channelId:n})=>{let r=t(),i=(0,y.Ld)(r,n,a,!1),l=i?.canvas_update_canvas_id;return e(C((0,d.cb)(i)?{channelId:n,isForChannelCanvas:!0}:{channelId:n,fileId:l}))});k.meta={name:"openMuteCanvasTabUpdatesModalFromMsg",key:"createThunkOpenMuteCanvasTabUpdatesModalFromMsg",description:"opens the mute canvas tab update modal but first looks up the file from the message"}},0x1774bc1e8:(e,t,a)=>{"use strict";a.d(t,{y:()=>NotificationsControl});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x1d71c4455),o=a(0x99233ecb),s=a(0x120c268ad),c=a.n(s),d=a(0x1cbdfeceb),m=a(0x11a296110),u=a(0x15f8e452a),p=a(0x2501a2cee),h=a(0x4c96e5d9),_=a(0x3711e82d);function NotificationsButton({className:e,forwardedRef:t,icon:a,isDimmed:r=!1,onClick:i=d.A,showChevron:o=!1,text:s,"aria-label":f,tooltip:b,tooltipSubtitle:g,size:y="small",type:A=l.Q.outline,eventId:x,source:E,channelId:C,componentVariant:k,experimentViewHeaderButtonPolishGroupOn:v=!1,...S}){let I=(0,n.useMemo)(()=>({eventId:x,entrypoint:E,action:_.UiAction.CLICK,elementName:"notifications-button",uiComponentVariant:k,onClick:{enableClogAction:!0}}),[k,x,E]),w="channel_header"===E?"20":"inherit";return n.createElement(h.Ay,{tip:n.createElement(n.Fragment,null,b,g&&n.createElement("span",{className:"c-tooltip__subtitle block"},g))},n.createElement(m.Ay,{...S,className:c()(e,{"p-view_header_notifications_action_button":"channel_header"===E,"p-view_header_notifications_action_button--polish":v&&"channel_header"===E}),onClick:i,ref:t,size:y,type:A,autoClogProps:I,"aria-label":f},a&&n.createElement("div",{className:c()({"p-about_modal__action_icon_prefix":"channel_header"!==E,"p-view_header_notifications_action_button_icon":"channel_header"===E})},n.createElement(p.Ah,{"aria-hidden":!0,inline:!0,size:w,...a})),s,o&&n.createElement(u.A,{"aria-hidden":!0,className:"p-about_modal__action_icon_suffix",inline:!0,size:"inherit",type:"chevron-medium-down"})))}NotificationsButton.displayName="NotificationsButton";let f=n.forwardRef((e,t)=>n.createElement(NotificationsButton,{...e,forwardedRef:t}));var b=a(0x40c0d834),g=a(0x17a53869);function NotificationsButtonMenu({channelId:e,menuProps:t,isDigested:a,isMPDM:r,source:i,shouldCloseModal:l,setIsPristine:o}){let s=(0,n.useCallback)(()=>"channel_join_banner"===i?n.createElement(g.$,{channelId:e,isMPDM:r,source:i,isDigested:a,shouldCloseModal:l,setIsPristine:o,...t}):n.createElement(g.$,{channelId:e,isMPDM:r,source:i,isDigested:a,shouldCloseModal:l,...t}),[i,e,r,a,l,o,t]);return n.createElement(b.A,{eventId:_.EventId.DETAILS_MODAL},s())}NotificationsButtonMenu.displayName="NotificationsButtonMenu";let y=NotificationsButtonMenu;var A=a(0xc677a6f6),x=a(0x1e46ae87a),E=a(0x1ec69ee01),C=a(0x12185e091),k=a(0x114ffe897),v=a(0x19d55d0e1),S=a(0xc1963a64),I=a(0x71e68ec7),w=a(0x19aad06c6),T=a(0x226892387),N=a(0x1e3eb45fd),M=a(0x365a4cc3),R=a(0x2244f10f);let P=new i.Ay("channel_details"),L={name:"notifications"},NotificationsControl=({channel:e,size:t="small",source:a,position:i="bottom-left",shouldCloseModal:s,buttonClassname:c,experimentViewHeaderButtonPolishGroupOn:d=!1})=>{let m,u,p,h,b,g,O=(0,r.wA)(),D=e?.id??"",F=(0,T.d4)(e=>(0,I.gn)(e,D)),U=(0,x.pA)(F),B=(0,T.d4)(e=>(0,I.mo)(e,D)),H=(0,x.pA)(B),W=(0,T.d4)(e=>{let t=(0,R.pK)(e,D);return!!t?.muted}),V=(0,T.d4)(e=>{let t=(0,R.pK)(e,D);return!!t?.suppress_at_channel}),G=(0,T.d4)(t=>(0,S.V)(t,e)),q=(0,T.d4)(t=>(0,v.K3)(t,e)),j=(0,T.d4)(e=>(0,M.p2)(e,{channelId:D})),z=(0,C.yz)(e),K=(0,T.d4)(N.hS),[$,Y]=(0,n.useState)(!0),Q=l.Q.outline,Z=(0,n.useCallback)(()=>{W?O((0,w.Qu)(D)):(s&&s(),O((0,w.LK)(D)))},[D,O,W,s]),J=(0,n.useMemo)(()=>(0,x.B0)(U,W),[U,W]),X=(0,n.useMemo)(()=>{if((0,C.LI)(e))return W?P.t("Unmute conversation"):P.t("Mute conversation");return n.createElement(n.Fragment,null,n.createElement("div",null,P.t("Edit notifications")),n.createElement("div",{className:"c-tooltip__subtitle"},P.t("Current: {selectedNotificationSetting}",{selectedNotificationSetting:J})))},[J,W,e]),ee=(0,n.useCallback)(e=>n.createElement(y,{channelId:D,menuProps:e,isDigested:j,isMPDM:z,source:a,shouldCloseModal:s,setIsPristine:Y}),[D,j,z,a,s]);if(!e||(0,k.D)(e)||(0,E.Cx)(e)||q)return null;let et=P.t("Customize notifications");return(W?(m={name:(0,x.Km)(U,W)},"channel_header"===a&&(m={name:(0,x.Nl)(U,W)}),u=(0,x.B0)(U,W),j&&K&&(u=P.t("Muted and recapped")),p=$&&"channel_join_banner"===a?et:P.t("You\u2019ll only see a badge if you\u2019re mentioned in this channel")):(0,C.LI)(e)?(m=L,u=P.t("Mute"),p=P.t("Mute a DM to move it to the bottom of your list. You\u2019ll see a red badge if there\u2019s a new message.")):U===A.P$.Everything?(m={name:(0,x.Km)(U,W)},"channel_header"===a&&(m={name:(0,x.Nl)(U,W)}),u=(0,x.B0)(U,W),p=$&&"channel_join_banner"===a?et:P.t("You\u2019ll be notified about all messages sent to this channel")):U===A.P$.Nothing?(m={name:(0,x.Km)(U,W)},"channel_header"===a&&(m={name:(0,x.Nl)(U,W)}),u=(0,x.B0)(U,W),j&&K&&(u=P.t("Notifications off and recapped")),p=$&&"channel_join_banner"===a?et:P.t("You won\u2019t get notifications about this channel")):(m={name:(0,x.Km)(U,W)},"channel_header"===a&&(m={name:(0,x.Nl)(U,W)}),u=(0,x.B0)(U,W),p=$&&"channel_join_banner"===a?et:P.t("You\u2019ll be notified when you\u2019re mentioned in this channel")),(0,C.LI)(e))?G?null:"channel_header"===a?n.createElement(f,{"data-qa":"control_button",icon:W?{name:(0,x.Km)(U,W)}:L,isDimmed:W,onClick:Z,tooltip:X,size:t,type:Q,source:a,experimentViewHeaderButtonPolishGroupOn:d,"aria-label":u}):n.createElement(f,{"data-qa":"control_button",icon:m,isDimmed:W,onClick:Z,text:u,tooltip:p,size:t,type:Q,source:a,experimentViewHeaderButtonPolishGroupOn:d}):(H!==U&&(H===A.P$.Everything?h=P.t("On mobile devices, you\u2019ll get notifications for every message"):H===A.P$.Mentions?h=V?P.t("On mobile devices, you\u2019ll get notifications for @mentions, except for @here and @channel"):P.t("On mobile devices, you\u2019ll get notifications for @mentions, including @here and @channel"):H===A.P$.Nothing&&(h=P.t("Notifications are off on mobile devices"))),"channel_header"===a?(b=_.UiComponentVariant.CHANNEL_HEADER_NOTIFICATIONS_BUTTON,g=_.EventId.CHANNEL_HEADER_BELL_ICON_CLICK):"channel_join_banner"===a&&(b=_.UiComponentVariant.CHANNEL_JOIN_BANNER,g=_.EventId.CHANNEL_JOIN_BANNER_NOTIFICATION_PREF_CLICK),n.createElement(o.cQ,{"data-qa":"control_menu_trigger",offsetX:-4,offsetY:-2,position:i,renderMenu:ee},n.createElement(f,{"data-qa":"control_button",icon:m,isDimmed:W,showChevron:"channel_header"!==a,text:"channel_header"===a?"":u,"aria-label":u,tooltip:"channel_header"===a?X:p,tooltipSubtitle:h,size:t,type:Q,source:a,channelId:D,eventId:g,componentVariant:b,className:c,experimentViewHeaderButtonPolishGroupOn:d})))};NotificationsControl.displayName="NotificationsControl"},0x3865e8c2:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x11a296110),s=a(0x1ec69ee01),c=a(0x1ecc7f772),d=a(0x1b9d5cc0c),m=a(0x82980ab8),u=a(0x20e80190e),p=a(0x226892387),h=a(0x224feb1e6),_=a(0x14149c126),f=a(0x1fcbb004d);let b=new i.Ay("channel_details"),RemoveManagerModal=({member:e,channel:t,closeModal:a,experimentChannelManagerPilotGroupOn:r,submitRemoveChannelManagers:i})=>{let[p,h]=(0,n.useState)(!1),[_,f]=(0,n.useState)(!1),g=(0,n.useCallback)(()=>{a()},[a]),y=(0,n.useCallback)(async()=>{f(!1),h(!0);let a=(0,d.K6)(e)||"",n=(0,s.FB)(t)||"";try{await i({channelId:n,userIds:[a]}),h(!1),g()}catch(e){f(!0),h(!1)}},[t,e,i,g]);return r?n.createElement(u.dW,{isOpen:!0,centered:!0,closeModal:g,className:"p-mpdm_add_people_modal"},n.createElement(u.rQ,null,n.createElement(u.Rc,{title:b.t("Remove {memberName} from Channel Managers of #{channelName}?",{memberName:(0,m.wg)(e),channelName:(0,c.Mn)(t)})})),n.createElement(u.$m,null,n.createElement(u.qf,null,_&&n.createElement(l.Ay,{level:l.A_.error,className:"margin_bottom_100"},b.t("There was a problem removing this person from Channel Managers. Give it another try in a few minutes.")),b.t("This person won\u2019t be able to manage the channel anymore. "))),n.createElement(u.jl,null,n.createElement(u.ox,null,n.createElement(o.$n,{"data-qa":"add-people-back-button",type:"outline",onClick:g,className:"padding_left_25 padding_right_25"},b.t("Cancel")),n.createElement(o.lV,{"data-qa":"remove-channel-managers-submit-btn",loading:p,onClick:y,"aria-label":b.t("Remove From Channel Managers")},b.t("Remove From Channel Managers"))))):null};RemoveManagerModal.displayName="RemoveManagerModal";let RemoveManagerModalWrapper=e=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,f.O)())},[t]),i=(0,p.d4)(e=>"on"===(0,_._Z)(e,"channel_manager_pilot")),l=(0,n.useCallback)(e=>t((0,h.a)(e)),[t]);return n.createElement(RemoveManagerModal,{closeModal:a,submitRemoveChannelManagers:l,experimentChannelManagerPilotGroupOn:i,...e})};RemoveManagerModalWrapper.displayName="RemoveManagerModalWrapper";let g=RemoveManagerModalWrapper},0x3cf2834a:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x70106355),s=a(0x5aab92c0),c=a(0x1ecc7f772),d=a(0x20e80190e),m=a(0x1c91944c9),u=a(0x217553e42),p=a(0xff064c91);let h=new i.Ay("channel_details"),RenameChannelModalContents=({id:e,closeModal:t,channel:a,currentChannelName:i,displayName:c})=>{let m=(0,r.wA)(),[u,_]=(0,n.useState)(!1),[f,b]=(0,n.useState)(i!==c),[g,y]=(0,n.useState)(c),[A,x]=(0,n.useState)(""),E=(0,n.useMemo)(()=>({hasNameRequiredWarning:!1,hasMaxLengthWarning:!1,hasSpecialsWarning:!1,hasPunctuationWarning:!1,hasNameTakenWarning:!1}),[]),[C,k]=(0,n.useState)(E),v=(0,n.useCallback)(()=>C.hasNameRequiredWarning||C.hasMaxLengthWarning||C.hasSpecialsWarning||C.hasPunctuationWarning||C.hasNameTakenWarning,[C]),S=(0,n.useCallback)(()=>{g!==i?(_(!0),m((0,p.O)({channel:a,newName:g})).then(e=>{e.ok?(_(!1),x(""),t()):e.error?e.error===s.J.NameTaken?(_(!1),x(h.t("{name} is already taken by a channel, username, or user group.",{name:g}))):e.error===s.J.InvalidNameSpecials&&(_(!1),x(h.t("Channel names can\u2019t support special characters (i.e. !#$%&)."))):(_(!1),x(h.t("Oops, something went wrong with renaming the channel. Please try again.")))}).catch(e=>{e?.data&&e.data.error===s.J.NameTaken?(_(!1),x(h.t("{name} is already taken by a channel, username, or user group.",{name:g}))):e?.data&&e.data.error===s.J.InvalidNameSpecials?(_(!1),x(h.t("Channel names can\u2019t support special characters (i.e. !#$%&)."))):(_(!1),x(h.t("Oops, something went wrong with renaming the channel. Please try again.")))})):(_(!1),t())},[a,g,m,i,t]);return n.createElement(n.Fragment,null,n.createElement(d.$m,null,A&&n.createElement(d.qf,{className:"p-about_modal__section"},n.createElement(l.Ay,{level:"error"},A)),n.createElement(d.qf,null,n.createElement(o.A,{id:e,channelName:g,channelNameErrors:C,setChannelName:y,setHasChanges:b,setChannelNameErrors:k}))),n.createElement(d.jl,null,n.createElement(d.ox,null,n.createElement(d.s_,{onClick:t,type:"outline","aria-label":h.t("Cancel")},h.t("Cancel")),n.createElement(d.s_,{onClick:S,loading:u,disabled:!f||v(),"aria-label":h.t("Save Changes")},h.t("Save Changes")))))};RenameChannelModalContents.displayName="RenameChannelModalContents";let _=(0,m.N)((e,{id:t,displayName:a})=>{let n=(0,u.OL)(e,t),r=(0,c.SB)(e,n,{publicChannelIncludeHashSign:!1});return{channel:n,currentChannelName:r,displayName:a||r}})(RenameChannelModalContents);var f=a(0x1fcbb004d),b=a(0x11eae4d05);let g=new i.Ay("channel_details"),RenameChannelModal=({id:e,name:t})=>{let a=(0,r.wA)(),i=(0,n.useCallback)(()=>a((0,f.O)()),[a]),l=g.t("Rename this channel");return n.createElement(d.dW,{closeModal:i,"data-qa":"rename-channel-modal"},n.createElement(d.rQ,null,n.createElement(d.Rc,{title:l})),n.createElement(_,{id:e,displayName:t,closeModal:i}))};RenameChannelModal.displayName="RenameChannelModal";let y=(0,b.e)(RenameChannelModal)},0x12855ff08:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x15fb82076),o=a(0x1a043bf26),s=a(0xc66ee342),c=a(0xba7e9211),d=a(0x1e0acdc3d),m=a(0x22f5cc45d);function SharedFile({fileId:e,excludeTime:t=!1,dataQA:a,forceFocusVisible:r=!1,forceHoverVisible:i=!1}){return n.createElement(m.A,{className:"p-channel_details__shared_files__file",fileId:e,excludeTime:t,"data-qa":a,forceFocusVisible:r,forceHoverVisible:i,forceClickStyles:!0,useListStyling:!0})}SharedFile.displayName="SharedFile";let u=SharedFile;var p=a(0x238b287cf),h=a(0x6f213e53),_=a(0x3711e82d),f=a(0x1a80146c8),b=a(0x1d774a049);let g=new i.Ay("channel_details"),y={uiStep:_.UiStep.CHANNEL_DETAILS_SHOW_MORE_FILES,onClick:{enableClogAction:!0}};function SharedFiles({channel:e,isLoading:t,fileIds:a,hasMore:i,moreButtonAriaLabel:m,onFileClick:A,onShowMoreClick:x}){let E=(0,r.wA)(),C=(0,p.A)();(0,n.useEffect)(()=>{!t&&a.length>0&&C.track(_.EventId.DETAILS_MODAL,{contexts:{ui_context:{action:_.UiAction.IMPRESSION,ui_step:_.UiStep.CHANNEL_DETAILS_FILES,ui_properties:{element_name:"channel_details_files_section"}}}})},[t,a.length,C]);let renderFile=(e,{hasFocus:t})=>n.createElement(u,{key:a[e],fileId:a[e],forceHoverVisible:t});renderFile.displayName="renderFile";let onItemClick=e=>{E((0,f.A)({e,fileId:e?.id,source:b.f.CHANNEL_DETAILS_MODAL_SHARED_FILE,clogLinkClick:e=>{C.track(_.EventId.DETAILS_MODAL,{...e,contexts:{...e?.contexts,ui_context:{...e?.contexts?.ui_context,ui_step:_.UiStep.CHANNEL_DETAILS_FILE_CLICK,ui_properties:{...e?.contexts?.ui_context?.ui_properties,source:"channel_details_files_section"}}}})}})),A()};function renderList(){return t?n.createElement(d.A,{numPlaceholders:5}):a.length?n.createElement(o.A,{"aria-label":g.t("{count, plural, =1 {# shared file} other {# shared files}}",{count:a.length}),height:62*a.length,keys:a,onItemClick:onItemClick,rowRenderer:renderFile,width:522}):n.createElement("div",{className:"padding_left_125 padding_right_125"},(0,h.F)(e)?g.t("This channel doesn\u2019t have any files."):g.t("There aren\u2019t any files to see here right now. But there could be \u2014 drag and drop any file into the message pane to add it to this conversation."))}return renderList.displayName="renderList",n.createElement(s.A,null,n.createElement(c.A,{className:"p-shared_files",renderFooterButton:e=>!t&&i&&n.createElement(l.A,{...e,"aria-label":m,onClick:x,autoClogProps:y},g.t("Show more")),renderList:renderList,title:g.t("Files")}))}SharedFiles.displayName="SharedFiles";let A=SharedFiles},0x11f596311:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x1f69a906e),s=a(0x189391f29),c=a(0x4323d7f5),d=a(0x20e80190e),m=a(0x16ef98cf),u=a(0x1c91944c9),p=a(0x1b654c3cf),h=a(0x217553e42),_=a(0x1fcbb004d),f=a(0x11eae4d05),b=a(0x1ee439e69);let g=new i.Ay("channel_details"),SlackConnectChannelModal=({id:e,canUserInviteExternalMembersToChannel:t,channel:a,isExternalWorkspaceChannel:i})=>{let s=(0,r.wA)(),c=(0,n.useCallback)(()=>s((0,_.O)()),[s]),u=(0,n.useCallback)(()=>{s((0,p._)({channelId:e,entryPoint:m.kP.SlackConnectChannelModal,openModalProps:{isStackable:!0}}))},[s,e]);return n.createElement(d.dW,{closeModal:c,className:"p-slack_connect_channel_modal"},n.createElement(d.rQ,{className:"p-slack_connect_channel_modal__header"},n.createElement(d.Rc,{title:i?g.t("Collaborating organizations"):g.t("Organizations"),className:"p-slack_connect_channel_modal__title"})),n.createElement(d.$m,null,n.createElement(d.qf,null,n.createElement(o.A,{channel:a,hideConnectedOrgsHeader:!0}))),n.createElement(d.jl,null,n.createElement(d.ox,{className:"p-slack_connect_channel_modal__footer"},t&&n.createElement(l.Ay,{autoFocus:t,onClick:u,type:"outline"},g.t("Add People")),n.createElement(d.s_,{autoFocus:!t,className:"p-slack_connect_channel_modal__footer_primary",type:"primary","aria-label":g.t("Done")},g.t("Done")))))};SlackConnectChannelModal.displayName="SlackConnectChannelModal";let y=(0,u.N)((e,{id:t})=>{let a=(0,h.OL)(e,t);return{canUserInviteExternalMembersToChannel:(0,c.D7)(e,t),channel:a,team:(0,b.H7)(e),isExternalWorkspaceChannel:(0,s.R)(e,a)}})(SlackConnectChannelModal),A=(0,f.e)(y)},0x140328c39:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>H});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x19efc8b50),l=a(0x20482ad21),o=a(0x102edf836),s=a(0x15f8e452a),c=a(0x1cbdfeceb),d=a(0x40c0d834),m=a(0x12edaa96a),u=a(0x14abc22b0),p=a(0x4c96e5d9),h=a(0x12b6a33fc),_=a(0x247cf31a2),f=a(0xba4aff95),b=a(0x2b8a10b0),g=a(0x1cbd89375),y=a(0x20e80190e),A=a(0x1ed767a16),x=a(0x3711e82d),E=a(0xc7bce91f),C=a(0x1c91944c9),k=a(0x19c76d181),v=a(0x1fcbb004d),S=a(0xded2b65c);let I=new l.Ay("channel_details"),w={uiStep:x.UiStep.CHANNEL_DETAILS_SLACK_CONNECT_SHARE_LINK_CLICK_COPY,onClick:{enableClogAction:!0}},CopyShareLinkModal=({channel:e,channelId:t,userId:a,version:i})=>{let[l,C]=(0,n.useState)(!1),[k,T]=(0,n.useState)(""),[N,M]=(0,n.useState)(!1),{sendMessageToAnnouncerAPI:R}=(0,n.useContext)(u.A),P=(0,E.A)({userId:a,version:i}),L=(0,r.wA)(),O=(0,n.useCallback)(()=>{L((0,v.O)())},[L]),D=(0,n.useCallback)(()=>{if(!N){if(k){(0,A.x3)(k),R({message:I.t("Copied!"),uuid:(0,m.A)()}),C(!0);return}try{M(!0),L((0,b.X)({channelId:t,trackingId:P})).then(({inviteId:e,inviteUrl:a})=>{let n=`${a}${window.location.search}`;T(n),(0,A.x3)(n),R({message:I.t("Copied!"),uuid:(0,m.A)()}),C(!0),L((0,g.A)({inviteId:e,reason:"submit-an-intent-to-share-the-channel"})),L((0,S.R)({channelId:t}))})}catch(e){(0,c.A)()}finally{M(!1)}}},[L,t,N,k,P,R]),F=(0,n.useCallback)(()=>{C(!1)},[C]),U=I.rt("<strong>Anyone with a link can post and invite their coworkers.</strong> This link will expire in 14 days. <a>Learn more</a>",{"<a>":({text:e})=>n.createElement(f.A,{articleId:0x1ac6c815a3},e)}),B=l?I.t("Copied!"):I.t("Anyone you share this link with can join the channel.");return n.createElement(d.A,{clogImpression:!0,elementName:"channel_details_copy_share_link_modal",elementType:x.ElementType.MODAL},n.createElement(y.dW,{closeModal:O,"data-qa":"copy_share_link_modal"},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:I.rt("Share link to <t1></t1>",{"<t1>":()=>n.createElement(_.A,{channel:e,displayFormerNames:!1})})})),n.createElement(y.$m,{className:"margin_bottom_150"},n.createElement(y.qf,{className:"display_flex align_items_center justify_content_between"},n.createElement("span",{className:"p-copy_share_link_modal--description"},U),n.createElement(p.Ay,{tip:B,status:l?h.YU.Success:h.YU.Info,onHide:F},n.createElement(o.Ay,{type:"outline",size:"medium",className:"margin_left_75 flex_shrink_none",onClick:D,disabled:N,"data-qa":"copy_share_link_modal_copy_link_button",autoClogProps:w},n.createElement(s.A,{type:"link"}),n.createElement("span",{className:"margin_left_25"},I.t("Copy Link"))))))))};CopyShareLinkModal.displayName="CopyShareLinkModal";let T=(0,C.N)((e,{channel:t})=>({channelId:t.id,userId:(0,k.WR)(e),version:(0,i.HF)()}))(CopyShareLinkModal);var N=a(0x133fddbf7),M=a(0x7899e273),R=a(0xbc044d4b),P=a(0xb0245531),L=a(0x226892387),O=a(0xd9302abc),D=a(0x46dbff89);let F=new l.Ay("channel_details"),U={uiStep:x.UiStep.CHANNEL_DETAILS_SLACK_CONNECT_ADD_PEOPLE,onClick:{enableClogAction:!0}},B={uiStep:x.UiStep.CHANNEL_DETAILS_SLACK_CONNECT_SHARE_LINK,onClick:{enableClogAction:!0}},SlackConnectCTAs=({canUserInviteExternalUnlimitedMembersToChannel:e,channel:t,currentUserId:a,handleAddPeople:l,sharedChannelInviteRequestedPref:c})=>{let d=(0,r.wA)(),m=(0,L.d4)(e=>(0,P.b)(e,t)),u=(0,n.useCallback)(async()=>{let e=(0,i.HF)(),r=(0,E.A)({userId:a,version:e});try{let e=await d((0,M.yp)({channelId:t.id,reason:"channel-details-share-link"}));!e.can_create&&e.reason||m?d((0,D.q)({element:n.createElement(N.A,{channelId:t.id,trackingId:r,reason:e.reason??M.Fz.NotOwner,isFromShareLink:!0,...e.connection_limit&&{channelConnectionLimit:e.connection_limit}}),isStackable:!0})):d((0,D.q)({element:n.createElement(T,{channel:t}),isStackable:!0}))}catch(e){d((0,D.q)({element:n.createElement(N.A,{channelId:t.id,trackingId:r,reason:e instanceof Error?e.name:void 0,isFromShareLink:!0}),isStackable:!0}))}},[a,d,t,m]);return n.createElement(n.Fragment,null,n.createElement(o.Ay,{type:"outline",size:"small",className:"p-channel_details__slack_connect_ctas_button margin_right_75 padding_top_25 padding_bottom_25 padding_left_50 padding_right_50",onClick:l,"data-qa":"connected_section_add_people_button",autoClogProps:U},n.createElement(s.A,{type:"add-user",size:"inherit"}),n.createElement("span",{className:"p-channel_details__slack_connect_ctas_button_text margin_left_25"},F.t("Add People"))),e&&!c&&n.createElement(o.Ay,{type:"outline",size:"small",className:"p-channel_details__slack_connect_ctas_button padding_top_25 padding_bottom_25 padding_left_50 padding_right_50",onClick:u,"data-qa":"connected_section_share_link_button",autoClogProps:B},n.createElement(s.A,{type:"link",size:"inherit"}),n.createElement("span",{className:"p-channel_details__slack_connect_ctas_button_text margin_left_25"},F.t("Share Link"))))};SlackConnectCTAs.displayName="SlackConnectCTAs";let H=(0,C.N)((e,{channel:t})=>({canUserInviteExternalUnlimitedMembersToChannel:(0,R.WN)(e,t),currentUserId:(0,k.WR)(e),sharedChannelInviteRequestedPref:(0,O.Q)(e,"shared_channel_invite_requested",t.id)??!1}))(SlackConnectCTAs)},0xbf92670f:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x8c8bafa3),l=a(0x20482ad21),o=a(0x15f8e452a),s=a(0x1faa3f1ac),c=a(0x2190b3693),d=a(0xc66ee342),m=a(0x238ac78f2),u=a(0x19ab18890),p=a(0x1be37a18e),h=a(0x3ddc3905),_=a(0xe20fc115),f=a(0x10027d8bc),b=a(0xa1832ae4),g=a(0x6e5dbd78),y=a(0x23420bb21),A=a(0x226892387),x=a(0x4adb31a9),E=a(0x14149c126),C=a(0x1ee439e69);let k=new l.Ay("channel_details"),v={elementName:"visit-help-center-link",onClick:{enableClogAction:!0}},SlackbotProfileSection=({channelId:e,onOpenHelpCenter:t})=>{let a=(0,r.wA)(),l=(0,A.d4)(C.H7),S=(0,A.d4)(x.TB),I=(0,A.d4)(f.gT),w=(0,A.d4)(_.rC),T=(0,A.d4)(f.ZV),N=(0,n.useCallback)(()=>{S&&a((0,y.A)({activeSection:p._.slackAi}))},[S,a]),M=(0,A.d4)(e=>"on"===(0,E._Z)(e,"original_slackbot_translations")),R=w?k.t("Slackbot has some cool new skills, but they\u2019re only available on some paid plans. Upgrade to use Slackbot\u2019s AI abilities."):k.rt("I, however, am not a human. Just a bot (a simple bot, with only a few tricks up my metaphorical sleeve). But I\u2019m still happy you\u2019re here!",{fallbackHash:"37f2b81762ffc2961a9b1abc0a1e527a72fa9eda",fallbackHashNs:"message_pane_foreword"});return n.createElement(n.Fragment,null,n.createElement(d.A,null,n.createElement(m.A,{text:n.createElement(n.Fragment,null,I?n.createElement(n.Fragment,null,n.createElement("div",{className:"margin_bottom_50"},k.t("I\u2019m Slackbot, here to help you do your best work in Slack. Some things people tell me I\u2019m good at:")),n.createElement("div",{className:"margin_bottom_50"},n.createElement("strong",null,n.createElement(u.Ay,{text:":mag:"})," ",k.t("Search"))," ",k.t("Point me in the right direction, and I\u2019ll track down that lost comment or doc \u2014 your ideas are too good to lose.")),n.createElement("div",{className:"margin_bottom_50"},n.createElement("strong",null,n.createElement(u.Ay,{text:":brain:"})," ",k.t("Create and manage content"))," ",k.t("Gimme a ping, and I\u2019ll help you distill conversations, brainstorm ideas and add key points to canvases and lists, new and old.")),n.createElement("div",{className:"margin_bottom_50"},n.createElement("strong",null,n.createElement(u.Ay,{text:":bell:"})," ",k.t("Be your productivity partner"))," ",k.t("I can set reminders, search files and pull in info from your calendar and other connected apps, and recommend time-saving strategies.")),n.createElement("div",{className:"margin_bottom_50"},k.t("I\u2019ll also send Slack notifications from time to time. You can see those in History."))):n.createElement(n.Fragment,null,n.createElement("div",{className:"margin_bottom_50"},M?k.rt("If you\u2019re looking for help using Slack, click the <r1>question mark in the top right corner</r1> of the app, visit our <r2>Help Center</r2>, or reach out to a human by typing /feedback in the message bar.",{"<r1>":({text:e})=>n.createElement(s.A,{className:"p-about_modal__member_profile_section_inline_link",onClick:()=>{a((0,g.A)()),t()}},e),"<r2>":({text:e})=>n.createElement(s.A,{autoClogProps:v,href:`https://${(0,i.Xk)()}/help`},e)}):""),R)),title:n.createElement("div",{className:"margin_bottom_50"},k.t("Hello!"))})),!I&&n.createElement(d.A,null,n.createElement(c.A,{onClick:()=>{a((0,h.default)({channelId:e}))},renderTitleIcon:e=>n.createElement(o.A,{...e,type:"reminder"}),title:k.t("Set yourself a reminder",{fallbackHash:"633b8137389e469a786f9e7747a3809ae319db7c",fallbackHashNs:"app_action_picker"})})),(!I||S)&&n.createElement(d.A,null,n.createElement(c.A,{href:S?void 0:(0,b.Zl)(l,T?"/customize/automated-messages":"/customize/slackbot"),onClick:N,renderTitleIcon:e=>n.createElement(o.A,{...e,type:"cog-o"}),title:k.t("Customize Slackbot")})))};SlackbotProfileSection.displayName="SlackbotProfileSection";let S=SlackbotProfileSection},0x1cf494e6d:(e,t,a)=>{"use strict";a.d(t,{Q:()=>SlackSecurityBotProfileSection});var n=a(0xbad225b5),r=a(0x8c8bafa3),i=a(0x20482ad21),l=a(0x1faa3f1ac),o=a(0x2501a2cee),s=a(0x972c6c19),c=a(0x2190b3693),d=a(0xc66ee342),m=a(0x238ac78f2),u=a(0xbe2be077),p=a(0xa1832ae4),h=a(0x226892387),_=a(0x1ee439e69);let f=new i.Ay("channel_details"),SlackSecurityBotProfileSection=()=>{let e=(0,n.useCallback)(({text:e})=>n.createElement("code",null,e),[]),t=(0,n.useMemo)(()=>n.createElement(l.A,{href:`https://${(0,r.Xk)()}/help/requests/new`},f.t("Help Center")),[]),a=(0,n.useMemo)(()=>n.createElement("div",{className:"margin_bottom_50"},f.t("Hello,")),[]),i=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,f.rt("While I can send you important notifications from Slack Security, I am just a bot. If you have any questions or require support, you can visit the {help_center} or reach out to a human by typing <code>/feedback</code> in the message bar.",{help_center:t,"<code>":e})),[t,e]),b=(0,h.d4)(u.k),g=(0,h.d4)(_.Yc),y=(0,p.Zl)(g),A=(0,n.useCallback)(({name:e})=>n.createElement("div",{className:"p-field__title_icon"},n.createElement(o.Ah,{inline:!0,name:e,size:"20"})),[]),x=(0,n.useMemo)(()=>[{key:"audit_logs_btn",title:f.t("Review your {entity} audit logs",{entity:b?"organization\u2019s":"workspace\u2019s"}),renderTitleIcon:A({name:"search"}),href:b?`${y}manage/security/audit-logs`:`${y}admin/audit_logs`},{key:"api_docs_btn",title:f.t("API documentation for audit logs"),renderTitleIcon:A({name:"code"}),href:`${(0,s.LP)()}/admins/audit-logs-anomaly`},{key:"hc_btn",title:f.t("Learn more about these notifications"),renderTitleIcon:A({name:"help"}),href:`https://${(0,r.Xk)()}/help/articles/37506096763283`}],[b,y,A]);return n.createElement(n.Fragment,null,n.createElement(d.A,null,n.createElement(m.A,{title:a,text:i})),n.createElement(d.A,null,x.map(({key:e,title:t,href:a,renderTitleIcon:r})=>n.createElement(c.A,{key:e,href:a,title:t,renderTitleIcon:r}))))};SlackSecurityBotProfileSection.displayName="SlackSecurityBotProfileSection"},0x10cf39bbb:(e,t,a)=>{"use strict";a.d(t,{n:()=>r});var n,r=((n={}).About="about",n.Members="members",n.Agents="agents",n.Tabs="tabs",n.Integrations="integrations",n.Insights="Insights",n.Settings="settings",n.Tools="tools",n)},0x41209256:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x15f8e452a),i=a(0x8baf11b5),l=a(0x226892387);function TitleSuffix({id:e}){return(0,l.d4)(t=>(0,i.B)(t,e))?n.createElement(r.A,{className:"p-view_header__bell",size:"inherit",type:"bell-slash"}):null}TitleSuffix.displayName="TitleSuffix";let o=TitleSuffix},0x2011f2367:(e,t,a)=>{"use strict";a.d(t,{A:()=>useChannelPurposeInput});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x14fad6485),l=a(0x20482ad21),o=a(0x1b77d8ef3),s=a(0x2c5a5afa),c=a(0x1ec69ee01),d=a(0xb94670f8),m=a(0x7854dbfe),u=a(0x226892387),p=a(0x106fa27d5);let h=new l.Ay("channel_details"),onTextyEnter=()=>!0;function useChannelPurposeInput({channel:e,onChange:t}){let a=(0,r.wA)(),l=(0,n.useRef)(),{windowRef:_}=(0,n.useContext)(i._0),f=(0,c.z8)(e),b=(0,u.d4)(e=>(0,m.A)(e,{text:f}));function handleChange(){if(t){let e=l.current;t(e?.value?.()!==f)}}async function handleSave(){let t=l.current,n=t?.value?.();if(n!==f)return a((0,p.m)({channelId:e.id,purpose:n}))}let g=h.t("Let people know what this channel is for."),y=(0,n.useMemo)(()=>[{id:"hint",message:g}],[g]);return{channelPurposeInput:n.createElement(o.A,{hints:y,numMaxLines:5,numMinLines:5},n.createElement(s.A,{windowRef:_,ariaLabel:h.t("Edit description"),completeOnChannels:!0,completeOnEmoji:!0,completeOnMembers:!0,focusOnMount:!0,initialText:b,maxLength:d.B2,onEnter:onTextyEnter,onTextChange:handleChange,placeholder:h.t("Add a description"),ref:l})),onSaveChannelPurpose:handleSave}}useChannelPurposeInput.displayName="useChannelPurposeInput"},0x2040023cf:(e,t,a)=>{"use strict";a.d(t,{A:()=>useChannelTopicInput});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x14fad6485),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x226892387),c=a(0x1e3eb45fd),d=a(0x365a4cc3),m=a(0x1a46cce1e);let u=new l.Ay("assistant"),AiMpdmSuggestedTopics=({channelId:e,handleSuggestedTopicClick:t,renderLabel:a,className:i})=>{let l=(0,r.wA)(),p=(0,s.d4)(c.d2),h=(0,s.d4)(t=>(0,d.qK)(t,e??"")),_=h?.topics;return((0,n.useEffect)(()=>{p&&e&&!h&&l((0,m.C)({channelId:e}))},[e,l,p,h]),h&&p)?n.createElement("div",{role:"group","aria-label":u.t("Suggested topics"),className:i},a&&n.createElement("span",{className:"margin_right_50 caption"},u.t("Suggested topics:")),_.map(e=>n.createElement(o.Ay,{size:"small",type:"outline",key:e,onClick:t(e),className:"margin_right_50 margin_bottom_50"},e))):null};AiMpdmSuggestedTopics.displayName="AiMpdmSuggestedTopics";var p=a(0x1b77d8ef3),h=a(0x2c5a5afa),_=a(0x1ec69ee01),f=a(0xb94670f8),b=a(0x12185e091),g=a(0x1ecc7f772),y=a(0x7854dbfe),A=a(0x1fe886fee),x=a(0x21e751f7e),E=a(0x702c9a8);let C=new l.Ay("channel_details"),onTextyEnter=()=>!0;function useChannelTopicInput({channel:e,onChange:t,focusOnMount:a=!0}){let l,o,d=(0,r.wA)(),m=(0,s.d4)(A.h),u=(0,s.d4)(c.d2),k=(0,s.d4)(t=>(0,g.SB)(t,e,{forceMpimNames:!0})),v=(0,_.FB)(e),{windowRef:S}=(0,n.useContext)(i._0),I=(0,b.JM)(e),w=(0,b.LI)(e),T=(0,b.yz)(e),N=(0,n.useRef)(),[M,R]=(0,n.useState)(),P=(0,_.cU)(e)||"",L=(0,s.d4)(e=>(0,y.A)(e,{text:P})),O=m&&T,D=O?f.lz:f.QS;function handleChange(){if(t){let e=N.current;t(e?.value?.()!==P)}R(void 0)}let F=(0,n.useCallback)(e=>()=>{let t=N.current,a=(0,x.A)(e);t.setContents(a)},[]);async function handleSave(){let t=N.current,a=t?.value?.();if(a!==P){if(O&&(0,f.bw)(a,{useFriendlyMpdmMaxLength:!0}))throw R((0,f.Bw)(f.OH,{useFriendlyMpdmMaxLength:!0})),Error(f.OH);return d((0,E.r)({channelId:e.id,topic:a})).catch(e=>{let t=(0,f.Bw)(e?.data?.error);throw t&&R(t),e})}}let U=(0,n.useMemo)(()=>[{id:"error",message:M}],[M]);M?l=U:o=w?[{id:"hint",message:C.rt("Add a topic to your conversation with {channelName}. This will be visible to both of you at the top of your DM.",{channelName:n.createElement("strong",null,k)})}]:T?[{id:"hint",message:m?C.rt("Add a topic to your conversation with {channelName}. This will be visible to all participants and used as the conversation name.",{channelName:n.createElement("strong",null,k)}):C.rt("Add a topic to your conversation with {channelName}. This will be visible to all participants at the top of your conversation.",{channelName:n.createElement("strong",null,k)})}]:[{id:"hint",message:C.rt("Let people know what {channelName} is focused on right now (ex. a project milestone). Topics are always visible in the header.",{channelName:n.createElement("strong",null,k)})}];let B=I?C.t("Edit topic"):C.t("Edit channel topic");return{channelTopicInput:n.createElement(n.Fragment,null,n.createElement(p.A,{errors:l,hints:o,isInvalid:!!M,numMaxLines:5,numMinLines:5},n.createElement(h.A,{windowRef:S,ariaLabel:B,completeOnChannels:!O,completeOnEmoji:!0,completeOnMembers:!O,isSingleLine:O,focusOnMount:a,initialText:L,maxLength:D,onEnter:onTextyEnter,onTextChange:handleChange,placeholder:C.t("Add a topic"),ref:N})),u&&T&&n.createElement(AiMpdmSuggestedTopics,{channelId:v,handleSuggestedTopicClick:F,renderLabel:!0,className:"margin_top_100"})),onSaveChannelTopic:handleSave}}useChannelTopicInput.displayName="useChannelTopicInput"},0x20b26d1ea:(e,t,a)=>{"use strict";a.d(t,{A:()=>additionalOptionsToShow});var n=a(0x4c1ca4d7),r=a(0x12185e091);function canUserUnlinkRecordChannel(e){return!!e&&(0,r.U_)(e)}var i=a(0x6f213e53),l=a(0x189391f29),o=a(0x21d145283),s=a(0xf6ed6f31),c=a(0xebdd009e),d=a(0xbe2be077),m=a(0x4323d7f5),u=a(0xa1832ae4),p=a(0x1ee439e69);function canUserSeeScMpdmToPrivate(e){let t=(0,p.H7)(e);return(0,d.k)(e)||(0,u.qR)(t)}var h=a(0x1f666c8e1),_=a(0x143fb6398),f=a(0xf038462c),b=a(0x15eef363e),g=a(0xaac1f7ec),y=a(0x11285555b),A=a(0x11061e57d),x=a(0x1ec69ee01),E=a(0x1e79c438d),C=a(0x217553e42),k=a(0x5c354532),v=a(0x8bfec97b),S=a(0x14c522187),I=a(0xb0245531),w=a(0x5738b4bc),T=a(0x190a9df19),N=a(0x147fb8c90),M=a(0x7fae732f),R=a(0x49e911f4),P=a(0x14149c126);function canUserManageHuddlesPermissions(e,t){let a=(0,C.gT)(e,t)&&(0,C.OL)(e,t);return!(!a||(0,r.LI)(a)||(0,r.yz)(a)||(0,i.F)(a))&&(0,f.S4)(e,a)}var L=a(0xe62fe2d0),O=a(0x21f97cb94),D=a(0x1feee1711),F=a(0x100fb9ff5),U=a(0x1f66b5878),B=a(0xb8504a42),H=a(0xb1f0729f),W=a(0x11d434b9b),V=a(0x20089abe2),G=a(0x1be9380c8),q=a(0x19d55d0e1),j=a(0x245dcaf6b),z=a(0xe8015073),K=a(0xd0eb5473),$=a(0xe4af74fc);let Y={ChannelNotFound:Symbol("channel_not_found"),ChannelTypeNotSupported:Symbol("channel_type_not_supported"),AlreadyUnarchived:Symbol("already_unarchived"),UserHasNoPermissions:Symbol("user_has_no_permissions"),InternalError:Symbol("internal_error")},Q={ok:!1,reason:Y.ChannelNotFound},Z={ok:!1,reason:Y.ChannelTypeNotSupported},J={ok:!1,reason:Y.AlreadyUnarchived},X={ok:!1,reason:Y.UserHasNoPermissions},ee={ok:!0,reason:null};function canUserUnarchiveChannel(e,t){return((e,t)=>{if(!(0,r.jq)(t))return Q;if((0,r.LI)(t)||(0,r.yz)(t)||(0,q.K3)(e,t)||(0,j.Zz)(t))return Z;if(!(0,i.F)(t))return J;if((0,r.U_)(t)&&!(0,s.bl)(t)&&(0,G.vz)(e)){let t=(0,$.yI)(e,{permission:z.p.UNARCHIVE_CHANNEL});return(0,K.Jr)(t)?ee:X}let a=(0,x.FB)(t);return(0,k.Mb)(e,{channelId:a})?ee:X})(e,t).ok}var et=a(0x1f362674e),ea=a(0x1ec68d6a3),en=a(0x15bd30d90),er=a(0x16ed1b0dc),ei=a(0x4f936716),el=a(0x91e15f37),eo=a(0x190247ff2),es=a(0x7281be31);function additionalOptionsToShow(e,t){let a,G;e&&(0,n.A)(e)||(0,ea.Wo)().warn("additionalOptionsToShow was called with an invalid state argument"),"string"==typeof t&&(0,er.A)(t)||(0,ea.Wo)().warn("additionalOptionsToShow was called with an invalid channelId argument");let q=(0,C.OL)(e,t)??void 0,j={shouldShow:(0,y.M)(e,q),disabled:!1},z={shouldShow:(0,g.I)(e,q),disabled:!1},K=(0,A.g)(e,t),$={shouldShow:(0,r.Zp)(q),disabled:!K||(0,h.I)(e,q)},Y=(0,en.A)(e)?$:{shouldShow:K,disabled:!1},Q={shouldShow:(0,O.NG)(e,q),disabled:!1},Z={shouldShow:(0,i.F)(q)&&canUserUnarchiveChannel(e,q),disabled:!1},J={shouldShow:(G=(0,C.gT)(e,t)&&(0,C.OL)(e,t)||void 0,!(!(0,E.V)(G)||(0,r.gx)(G)||(0,x.lQ)(G))&&(0,k.Q4)(e,{channelId:t})),disabled:(0,_.ju)(q)},X={shouldShow:(0,L.rY)(e,q),disabled:!1},ee={shouldShow:(0,W.s)(e,t).ok,disabled:!1},ec={shouldShow:((e,t)=>{if(!t)return!1;let a=(0,p.H7)(e);if(!(0,u.qR)(a))return!1;let n=(0,r.JM)(t)||(0,F.t)(t),l=(0,B.r7)(a)&&n,o="on"===(0,P._Z)(e,"enterprise_retention_allow_override_on_org_level_channels");if(l&&!o){let t=(0,H.D1)(e,"allow_retention_override");if(!(0,D.A)(t))return!!t}return!(!(0,U.JF)(e,"allow_retention_override",t)||(0,r.rW)(t)&&!(0,f.yG)(e,t)||(0,R.DM)(e)||(0,i.F)(t))})(e,q),disabled:!1},ed={shouldShow:(0,et.Y)(e,t),disabled:!(0,v.f)(e,t)},em=(0,N.G2)(e,"manage_channel_posting__access"),eu=(0,el.iH)(e),ep=(0,eo.RN)(e),eh=(0,u.KJ)((0,p.H7)(e))&&ep&&!em&&!(0,o.N)(q)&&!eu,e_=(0,f.S4)(e,q),ef={shouldShow:((e,t)=>{let a=(0,C.OL)(e,t);if(!(0,r.jq)(a)||(0,r.JM)(a)||(0,_.ju)(a)&&(0,I.b)(e,a))return!1;let n=(0,N.G2)(e,"manage_channel_posting__access");return(!!(0,o.N)(a)||!!n)&&(!!(0,k.ry)(e,{channelId:a.id})||(!(0,x.lQ)(a)||!!(0,T.FQ)(e))&&!!(0,k.xj)(e,{channelId:t})&&(0,w.E)(e,t))})(e,t)||eh,disabled:!e_&&!(0,s.bl)(q)||eh},eb={shouldShow:(0,m.D7)(e,t),disabled:!1},eg={shouldShow:((e,t)=>{let a=(0,C.gT)(e,t)&&(0,C.OL)(e,t);if(!a||"on"!==(0,P._Z)(e,"channel_exports")||(0,R.DM)(e))return!1;let n=(0,M.n)(e,a);return(0,T.Zo)(e,n)||!(0,r.rW)(a)})(e,t),disabled:!1},ey={shouldShow:!(0,r.JM)(q)&&(0,c.pt)(e),disabled:!canUserManageHuddlesPermissions(e,t)},eA={shouldShow:(0,V.P)(e,t),disabled:!1},ex={shouldShow:(0,b.B)(e,t),disabled:!1},{canConvert:eE,reason:eC}=(0,ei.C)(e,t),ek=canUserSeeScMpdmToPrivate(e),ev=!!eC;a=(0,_.ju)(q)&&!ek?{shouldShow:!1,disabled:!1}:{shouldShow:eE||!!(!eE&&ev),disabled:ev};let{canCreate:eS,reason:eI}=(0,es.qJ)(e,t),ew={shouldShow:eS||!!(!eS&&eI),disabled:!!eI};return{convertToPrivate:j,changeLimitedAccessGroup:z,convertToPublic:Y,archive:Q,unarchive:Z,deleteChannel:J,rename:X,purpose:ee,dataRetention:ec,channelPermissions:ed,postingPermissions:ef,shareExternal:eb,exportHistory:eg,huddlePermissions:ey,topic:eA,addApps:ex,convertMpimToPrivate:a,convertScMpdmToPrivate:ew,manageOrgAccess:{shouldShow:(0,d.k)(e)&&!(0,r.rI)(q)&&!(0,l.R)(e,q),disabled:!(0,S.HD)(e,t)},unlinkRecordChannel:{shouldShow:canUserUnlinkRecordChannel(q),disabled:!1}}}},0x19fbe8939:(e,t,a)=>{"use strict";a.d(t,{Hj:()=>getRetentionDurationWarning,KG:()=>convertRetentionDurationToDays,OJ:()=>s,aZ:()=>getTeamRetentionDescription,dv:()=>c,eO:()=>getCustomRetentionDurationError,zL:()=>isRetentionValid});var n,r,i=a(0x15c004feb),l=a(0x133390099);let o=new(a(0x20482ad21)).Ay("channel_options");var s=((n={})[n.Default=0]="Default",n[n.Custom=1]="Custom",n),c=((r={})[r.Days=0]="Days",r[r.Years=1]="Years",r);function isRetentionValid({retentionType:e,retentionDuration:t,retentionDurationUnit:a=0,redactionBuffer:n=0}){if(!(0,i.A)(e))return!1;let r=convertRetentionDurationToDays({retentionDuration:t,retentionDurationUnit:a});return 0===e||1===e&&(0,i.A)(r)&&r>0&&r<36500&&r>n}function convertRetentionDurationToDays({retentionDuration:e,retentionDurationUnit:t}){return(0,i.A)(t)?0===t?e:365*e:e}function getTeamRetentionDescription(e,t){let a;switch(t){case 1:default:a=o.t("By default, messages are kept forever.");break;case 0:a=o.t("By default, messages are kept forever, but revisions aren\u2019t tracked.");break;case 2:if(e>364){let t=(0,l.A)(e/365,1);a=o.t("By default, messages older than {durationDays} days ({durationYears, plural, =1 {# year} other {# years}}) will be deleted.",{durationDays:e,durationYears:t})}else a=o.t("By default, messages older than {teamRetentionDuration, plural, =1 {# day} other {# days}} will be deleted.",{teamRetentionDuration:e});break;case 3:if(e>364){let t=(0,l.A)(e/365,1);a=o.t("By default, messages older than {durationDays} days ({durationYears, plural, =1 {# year} other {# years}}) will be deleted (full history still accessible via compliance export).",{durationDays:e,durationYears:t})}else a=o.t("By default, messages older than {teamRetentionDuration, plural, =1 {# day} other {# days}} will be deleted (full history still accessible via compliance export).",{teamRetentionDuration:e})}return a}function getRetentionDurationWarning({retentionType:e,retentionDuration:t,retentionDurationUnit:a,teamRetentionType:n,teamRetentionDuration:r,memberIsAdminOrOwner:i,experimentRetentionRedactionJobGroupOn:l}){if(0===e)return null;let s=convertRetentionDurationToDays({retentionDuration:t,retentionDurationUnit:a});if(l&&!isRetentionValid({retentionType:e,retentionDuration:s}))return null;if(s>=36500)return o.t("When setting a time frame for deleting messages, please choose a duration less than 100 years.");if(!isRetentionValid({retentionType:e,retentionDuration:s}))return o.t("To delete messages after a period of time, set a value greater than zero.");if(s<30)return l?o.t("Historical messages help people find the information they need to get work done. Please check with your team before choosing to delete messages in this channel after {retentionDuration, plural, =1 {# day} other {# days}}.",{retentionDuration:t}):o.rt("<strong>This will delete all messages older than {retentionDuration, plural, =1 {# day} other {# days}}</strong>. Please double-check with your team before setting such a short retention period.",{retentionDuration:t});if(2===n&&s>r)return l?i?o.t("Heads up, It looks like you\u2019re choosing to keep messages in this channel longer than the rest of this workspace."):o.t("It looks like you\u2019re choosing to keep messages in this channel longer than the rest of this workspace. You may want to check with an Admin to make sure that\u2019s OK."):0===a?i?o.rt("<strong>Note:</strong> By setting this channel\u2019s retention period to {retentionDuration, plural, =1 {# day} other {# days}}, you\u2019re choosing to keep messages for longer than the rest of your workspace.",{retentionDuration:t}):o.rt("<strong>Note:</strong> By setting this channel\u2019s retention period to {retentionDuration, plural, =1 {# day} other {# days}}, you\u2019re choosing to keep messages for longer than the rest of your workspace. You may want to check with an admin to make sure this is OK.",{retentionDuration:t}):i?o.rt("<strong>Note:</strong> By setting this channel\u2019s retention period to {retentionDuration, plural, =1 {# year} other {# years}}, you\u2019re choosing to keep messages for longer than the rest of your workspace.",{retentionDuration:t}):o.rt("<strong>Note:</strong> By setting this channel\u2019s retention period to {retentionDuration, plural, =1 {# year} other {# years}}, you\u2019re choosing to keep messages for longer than the rest of your workspace. You may want to check with an admin to make sure this is OK.",{retentionDuration:t});return(1===n||0===n)&&s>5475?l?o.t("If you want to keep your messages forever, you can choose the default period for your organization."):o.t("Just a heads up: if you want to keep your messages forever, you can choose to follow your workspace\u2019s default retention settings."):null}function getCustomRetentionDurationError({retentionType:e,retentionDuration:t,retentionDurationUnit:a=0,redactionBuffer:n=0,experimentRetentionRedactionJobGroupOn:r}){if(isRetentionValid({retentionType:e,retentionDuration:t,retentionDurationUnit:a,redactionBuffer:n})||!r)return null;let i=convertRetentionDurationToDays({retentionDuration:t,retentionDurationUnit:a});return n&&i<=n?o.t("Your org requires channels to keep messages for at least {redactionBuffer} days.",{redactionBuffer:n+1}):i<=0?o.t("Messages must be kept for at least 1 day."):o.t("Slack can only keep messages for up to 99 years, but thanks for your vote of confidence.")}},0x173a5485e:(e,t,a)=>{"use strict";a.d(t,{u:()=>n});let n={NAME:"name",TOPIC:"topic",PURPOSE:"purpose"}},0x18b367b55:(e,t,a)=>{"use strict";a.d(t,{A:()=>J});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xbe5e39b6),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x23619f41c),d=a(0x11a296110),m=a(0x128d54e52),u=a(0x24f1e08bb),p=a(0x1fdec3e16),h=a(0x16cf1da63),_=a(0x99233ecb),f=a(0x133aaa7da),b=a(0xce378727),g=a(0x1e586fbba),y=a(0x20e80190e),A=a(0x3711e82d),x=a(0x226892387),E=a(0x1fcbb004d),C=a(0x1c5d4f426),k=a(0xe874a88a),v=a(0x154933c60),S=a(0x11c82607b),I=a(0xf422a9b7),w=a(0x6e87d4ec);let T=new s.Ay("slack_functions"),HermesWorkflowRemoveFromChannelSuccessToast=()=>n.createElement(w.A,{duration:6e3},n.createElement("span",null,T.rt("You successfully removed a workflow from the channel")));HermesWorkflowRemoveFromChannelSuccessToast.displayName="HermesWorkflowRemoveFromChannelSuccessToast";var N=a(0x16ffed5ab);let M=(0,S.Ay)("eneuques a workflow removed from channel toast",async(e,t)=>e((0,N.M)({element:n.createElement(HermesWorkflowRemoveFromChannelSuccessToast,null)})));M.meta={name:"enqueueWorkflowRemovedSuccessToast",key:"createThunkEnqueueWorkflowRemovedSuccessToast",description:"eneuques a workflow removed from channel toast"};let R=(0,S.Ay)("remove a workflow app from a channel (kick bot user)",(e,t,{channelId:a,workflowAppId:n})=>{let r=t(),i=(0,C.xX)(r,a,n);return i?e((0,v.AM)({channelId:a,memberId:i,reason:"removing workflow app"})).then(()=>{e((0,I.d)({channelId:a,workflowAppId:n})),e(M())}):k.S.reject(Error("failed to locate bot user for workflow app in channel"))});R.meta={name:"removeWorkflowAppFromChannel",key:"createThunkRemoveWorkflowAppFromChannel",description:"remove a workflow app from a channel (kick bot user)"};let P=new s.Ay("channel_details"),L={uiStep:A.UiStep.CHANNEL_DETAILS_REMOVE_WORKFLOW_MODAL,onClick:{enableClogAction:!0}},RemoveWorkflowSpeedbumpModal=({id:e,channelId:t})=>{let a=(0,h.wA)(),r=(0,x.d4)(a=>(0,C.j0)(a,t,e)),[l,o]=(0,n.useState)(!1),[s,c]=(0,n.useState)(!1),m=P.t("There was an error removing this workflow."),[u,p]=(0,n.useState)(m),_=(0,n.useRef)(null),f=(0,n.useCallback)(()=>{a((0,E.O)())},[a]),A=(0,n.useCallback)(n=>{n?.preventDefault(),a(R({channelId:t,workflowAppId:e})).then(f).catch(()=>{c(!0),_?.current?.focus()})},[a,t,f,e,_]);if(!r)return null;let k=P.t("Remove workflow from channel?"),v=n.createElement("strong",null,r.app_details.name),S=i()("p-remove-workflow-speedbump-modal__alert",{hidden:!s||!u});return n.createElement(y.aF,{contentLabel:k,shouldCloseOnOverlayClick:!l,role:"alertdialog"},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:k})),n.createElement(y.$m,null,n.createElement(y.qf,null,n.createElement("p",null,P.rt("Are you sure you want to remove {workflowTitle} from this channel?",{workflowTitle:v})),n.createElement("p",null,P.t("This workflow will stop working once its removed from this channel. The workflow\u2019s creators will be notified.")),n.createElement("div",{tabIndex:0,ref:_,"aria-hidden":s&&u?"false":"true","aria-invalid":!0,className:S},n.createElement(g.A,null,u)))),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(d.Ay,{type:"outline",onClick:f,disabled:l},P.t("Cancel")),n.createElement(b.A,{loading:l,onClick:A,disabled:l,type:"danger","data-qa":"channel-details-remove-workflow-dialog-footer__submit",autoClogProps:L,"aria-label":P.t("Remove Workflow")},P.t("Remove Workflow")))))};RemoveWorkflowSpeedbumpModal.displayName="RemoveWorkflowSpeedbumpModal";var O=a(0xf327c24a),D=a(0x24f705a4f),F=a(0x22d443103),U=a(0x1426c029f),B=a(0x46dbff89);let H=new s.Ay("channel_details"),W={uiStep:A.UiStep.CHANNEL_DETAILS_REMOVE_WORKFLOW_MODAL,elementType:A.ElementType.MENU_ITEM,onClick:{enableClogAction:!0}},V={uiStep:A.UiStep.CHANNEL_DETAILS_VIEW_WORKFLOW_DETAILS,elementType:A.ElementType.MENU_ITEM,onClick:{enableClogAction:!0}},G={uiStep:A.UiStep.CHANNEL_DETAILS_COPY_WORKFLOW_URL,eventId:A.EventId.WORKFLOW_COPY_LINK_CLICK,elementType:A.ElementType.MENU_ITEM,onClick:{enableClogAction:!0}},q={uiStep:A.UiStep.CHANNEL_DETAILS_FORWARD_WORKFLOW,elementType:A.ElementType.MENU_ITEM,onClick:{enableClogAction:!0}},MoreActionsMenu=({moreActionsMenuPassedProps:e,menuProps:t})=>{let a=(0,h.wA)(),{id:r,channelId:i,shortcutInfo:l,hermesLinkTriggerUIContext:o,showViewDetails:s,showRemoveMember:c,showCanCopyWorkflow:d,showForwardWorkflow:m}=e,u=(0,n.useMemo)(()=>c&&(s||d||m),[s,c,d,m]),p=(0,O.d)({shortcutInfo:l,hermesLinkTriggerUIContext:o}),b=[{autoClogProps:V,label:H.t("View details"),click:()=>{a((0,U.u)({shortcutInfo:l,hermesLinkTriggerUIContext:o}))},show:s},{label:H.t("Copy workflow link"),autoClogProps:G,click:e=>{e?.stopPropagation(),a((0,D.m$)({shortcutInfo:l}))},show:d},{label:H.t("Forward workflow"),autoClogProps:q,show:m,click:()=>{a((0,F.A)({shortcutInfo:l}))}},p,{type:f.A.separator,show:u},{autoClogProps:W,label:H.t("Remove from channel"),click:()=>{a((0,B.q)({element:n.createElement(RemoveWorkflowSpeedbumpModal,{id:r,channelId:i}),isStackable:!0}))},danger:!0,show:c}].filter(e=>e?.show);return n.createElement(_.a,{template:b,...t})};MoreActionsMenu.displayName="MoreActionsMenu";var j=a(0x219a78c1c),z=a(0x19d590052),K=a(0x73c53039),$=a(0x1d5eeff6d),Y=a(0xe38b5635);let Q=new s.Ay("channel_details"),Z={uiStep:A.UiStep.CHANNEL_DETAILS_RUN_WORKFLOW,onClick:{enableClogAction:!0}},WorkflowItem=({showViewDetails:e,showCanCopyWorkflowLink:t,showForwardWorkflow:a,showRemoveMember:r,showStartWorkflowButton:s,showSetupWorkflowButton:h,icon:_,id:f,title:b,description:g,onWorkflowSelected:y,setCustomClogRef:A,channelId:x,shortcutInfo:E,hermesLinkTriggerUIContext:C,isActive:k,overrideDisabled:v,showNewBadge:S})=>{let I=r||e||t||a,w=s||I,T=!v&&!I&&!w,N=(0,n.useCallback)(({className:e})=>n.createElement(c.A,{ariaHidden:!0,classes:e,image:_,size:36}),[_]),M=(0,n.useMemo)(()=>x&&E&&C?{id:f,channelId:x,shortcutInfo:E,hermesLinkTriggerUIContext:C,showViewDetails:e,showRemoveMember:r,showCanCopyWorkflow:t,showForwardWorkflow:a}:null,[f,x,E,C,e,r,t,a]),R=(0,n.useCallback)(e=>M?n.createElement(MoreActionsMenu,{moreActionsMenuPassedProps:M,menuProps:e}):null,[M]),P=Q.t("{workflowTitle}: {workflowDescription}",{workflowTitle:b,workflowDescription:g}),L=Q.t("Start workflow"),O=(0,n.useMemo)(()=>({name:"play"}),[]),D=(0,n.useCallback)(()=>n.createElement(m.CG,null,n.createElement(p.A,{lines:1,withTooltip:!0},n.createElement("strong",{id:`workflow_item_title_${f}`},b),S&&n.createElement(j.Q,{className:"margin_left_25"}))),[f,S,b]),F=(0,n.useCallback)(()=>n.createElement(p.A,{lines:1,withTooltip:!0},n.createElement("div",{className:"p-integrations__subtext"},g)),[g]),U=(0,n.useCallback)(()=>n.createElement(m.Ay,{avatar:N,text:D(),subtext:F(),size:"medium"}),[N,D,F]),B=Q.t("Set Up"),H=(0,n.useCallback)(()=>h&&!s?n.createElement(d.$n,{type:"outline",size:"small",onClick:y},B):null,[y,B,h,s]);return 0===b.length||0===g.length?null:n.createElement(Y.A,{className:"p-integrations__workflow_item_container",elevation:2,size:"small",isFocused:k,"aria-label":P,onClick:y},n.createElement(u.A,{className:i()("p-integrations__list_entity_row",{"p-integrations__list_entity_row--disabled":T}),size:"medium",primaryContent:U(),secondaryContent:H()}),w&&n.createElement(o.A,{trackClogRef:A},n.createElement($.A,{position:"inset"},s&&E&&n.createElement(z.A,{svgIconProps:O,onClick:y,tooltip:L,"aria-label":L,autoClogProps:Z,"data-qa":`channel-details-start-workflow-${E.triggerId}`,ariaDescribedById:`workflow_item_title_${f}`}),I&&n.createElement(K.A,{renderMenu:R,position:l.yX.Left,preventScroll:!1,ariaDescribedById:`workflow_item_title_${f}`}))))};WorkflowItem.displayName="WorkflowItem";let J=WorkflowItem},0x6b745714:(e,t,a)=>{"use strict";a.d(t,{v:()=>ev});var n=a(0xbad225b5),r=a(0x3b6d144f),i=a(0x20482ad21),l=a(0x24546e7f2),o=a(0x16cf1da63),s=a(0xf8dd7f80),c=a(0x2b7f0bcc),d=a(0x11a296110),m=a(0xb1ea448c),u=a(0x127218dbe),p=a(0x113a45767),h=a(0x292cc606),_=a(0x21f32a55),f=a(0x20e80190e);let b="image",g="emoji",y="defaultIcon",A="delete",x="update",E="crop",C="help",k="not_started",v="in_progress",S="done";var I=a(0x8ed4913f);let w=new i.Ay("edit_profile"),EmailIconCropPane=({file:e,switchPane:t,nameInProgress:a})=>{let r=(0,o.wA)(),[i,l]=(0,n.useState)(null),[b,g]=(0,n.useState)(null),[y,A]=(0,n.useState)(!1),[E,C]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&r((0,_.Z)({reason:"email_icon_upload",image:e})).then(e=>g({src:e.url,...e})).catch(e=>{C(!0),(0,s.getGenericLogger)().error("Server returned error when calling uploadEmailIcon",e)})},[r,e]);let k=(0,n.useCallback)(()=>{if(!b||!i)return;A(!0);let e=new Image;e.onload=()=>{let{displayWidth:n,displayHeight:l}=(0,I.A)({width:e.width,height:e.height,maxSize:460}),o=Math.max(1,e.height/l),s=Math.max(1,e.width/n),c=i.x*s,d=i.y*o,m=i.width*s;r((0,h.s)({reason:"email_icon_upload_crop",avatar:b.id||"",cropbox:`${Math.round(c)},${Math.round(d)},${Math.round(m)}`})).then(e=>{t(x,{croppedImage:e,nameInProgress:a})}).catch(()=>{C(!0),A(!1)})},e.src=b.src},[i,r,b,a,t]),v=(0,n.useCallback)(()=>t(x,{nameInProgress:a}),[a,t]),S=(0,n.useCallback)(e=>y?null:l(e),[y]);return n.createElement("div",{className:"p-channel_email_address_modal p-channel_email_address_modal--customize"},n.createElement(f.rQ,null,n.createElement(u.A,{onClick:v}),n.createElement(f.Rc,{className:"p-channel_email_address_modal__title-bar",title:b?w.t("Crop your photo"):w.t("Uploading your photo\u2026"),"data-qa":"edit_profile_crop_pane_header"})),n.createElement(f.$m,null,n.createElement(f.qf,{className:"p-edit_profile__centered"},E&&n.createElement(c.Ay,{level:c.A_.error,className:"p-edit_profile__error_alert"},w.t("Sorry! Something went wrong. Please try again.")),n.createElement("div",{className:"p-edit_profile__centered_primary p-edit_profile__centered_primary--background"},b?n.createElement(p.A,{className:"p-edit_profile__cropper",imageSrc:b.src,maxSize:460,minSize:36,onChange:S}):n.createElement(m.A,null)))),n.createElement(f.jl,null,n.createElement(f.ox,null,n.createElement(d.lV,{onClick:k,loading:!b||y,"data-qa":"cea_crop_save_button",autoFocus:!0,"aria-label":w.t("Save")},w.t("Save")))))};EmailIconCropPane.displayName="EmailIconCropPane";var T=a(0x1d2cd7755),N=a(0x126f22530),M=a(0x15dd8a31),R=a(0xbb0c5132),P=a(0xa089d16d),L=a(0x1b3ecb90f),O=a(0x1faaed399),D=a(0x1c91944c9),F=a(0xe874a88a),U=a(0x1ab43c0b8),B=a(0x11c82607b),H=a(0x103c67cea),W=a(0xeeed8b91);let V=(0,B.Ay)("Updates a channel email address from channel id",(e,t,a)=>{let{channelId:n,icon:r,name:i,address:l,emoji:o,useDefaultIcon:s}=a,c=t();return c&&c.channelEmails&&c.channelEmails[n]?e((0,U.tK)({channelId:n,icon:r,name:i,address:l,emoji:o,useDefaultIcon:s})).then(t=>{if(t.ok){let a=(0,W.Nx)(t,n);return e((0,H.J6)(a)),F.S.resolve(a)}let a="";try{a=`Could not delete channel email address for ${n} -> ${JSON.stringify(t)}`}catch{a=`Could not delete channel email address for ${n}`}throw Error(a)}):F.S.reject(Error(`an email address does not exist for ${n}`))});V.meta={name:"updateChannelEmailAddress",key:"createThunkUpdateChannelEmailAddress",description:"Updates a channel email address from channel id"};var G=a(0x16ffed5ab);let q=a.p+"bot_36-eb30842.png",j=new i.Ay("channel-email-addresses"),CustomizeChannelEmailAddressModal=({channel:e,channelEmail:t,channelDisplayName:a,updateChannelEmailAddress:r,closeModal:i,showToast:l,switchPane:o,nameInProgress:m,croppedImage:p})=>{let h=(0,n.useRef)(null),_=p||(0,W.EA)(t),A=(0,W.B1)(t),[x,C]=(0,n.useState)(m||t.name||""),[k,v]=(0,n.useState)(_),[S,I]=(0,n.useState)(A),[w,D]=(0,n.useState)(!1),[F,U]=(0,n.useState)(!1),[B,H]=(0,n.useState)(!1),V=j.t("Image file"),G=j.t("Emoji"),z={[y]:{label:j.t("Default icon"),value:y},[b]:{label:V,value:b},[g]:{label:G,value:g}},K=Object.values(z),$=(0,n.useCallback)(()=>k&&!k.url?.includes("plugins/channel_email_address")?b:S?g:y,[S,k]),Y=(0,n.useCallback)(({value:e})=>{switch(e){case g:H(!0);break;case b:h?.current?.click();break;default:v(null),I(null)}},[]),Q=(0,n.useCallback)((e=!1)=>{let t=j.t("Updated email icon and name for {channelDisplayName}",{channelDisplayName:a});return l({error:e,element:n.createElement(R.Ay,{position:"bottom-right",offsetY:70,svgIconProps:{name:"check-circle"},svgIconClassName:"sk_lilypad_green"},n.createElement("div",{"data-qa":"channel_email_customize_toast"}," ",t," "))})},[a,l]),Z=(0,n.useCallback)(()=>{if(!t.address)return;let a={name:x||"Email",channelId:e.id,address:t.address};switch($()){case b:k&&k.id&&(a.icon=k.id);break;case g:S&&(a.emoji=S);break;case y:a.useDefaultIcon=!0}U(!0),r(a).then(()=>{U(!1),Q(),i()}).catch(e=>{U(!1),D(!0),(0,s.getGenericLogger)().error("Server returned error when calling updateChannelEmailAddress",e)})},[e.id,t.address,i,S,$,k,x,Q,r]),renderPreviewImage=()=>k&&k.url?n.createElement(P.A,{className:"p-channel_email_address_modal__body_message_preview__img",src:k.url,alt:x||j.t("Preview Image")}):S?n.createElement("div",null,n.createElement(L.Ay,{text:S,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:L.lw.MEDIUM,forceDisplay:!0})):n.createElement(P.A,{className:"p-channel_email_address_modal__body_message_preview__img",src:q,alt:x||j.t("Preview Image")});renderPreviewImage.displayName="renderPreviewImage";let J=j.t("Email"),X=$();return n.createElement(n.Fragment,null,n.createElement(f.rQ,null,n.createElement(u.A,{onClick:()=>o("get")}),n.createElement(f.Rc,{className:"p-channel_email_address_modal__title-bar",title:j.t("Customize email appearance")})),n.createElement(f.$m,null,n.createElement(f.qf,null,w&&n.createElement(c.Ay,{level:c.A_.error,className:"p-edit_profile__error_alert"},j.t("Sorry! Something went wrong. Please try again.")),n.createElement("div",{className:"p-channel_email_address_modal__body"},j.t("You can change the appearance of the email that gets posted in channel to make it more recognizable to channel members:"),n.createElement("div",{className:"p-channel_email_address_modal__body_customize"},n.createElement("div",{className:"p-channel_email_address_modal__body_customize_select"},n.createElement("p",{className:"bold margin_bottom_50"}," ",j.t("Email Icon")," "),n.createElement(O.A,{onEmojiSelected:(e,t)=>{v(null),I(`:${t}:`)},customTrigger:!0,forceOpen:B,onClose:()=>H(!1)},n.createElement(M.A,{options:K,placeholderText:z[X].label,selectedOption:z[X],ariaLabel:j.t("Icon select"),onOptionSelected:Y,selectId:"customize_email_address_icon"})),n.createElement("input",{accept:"image/*;capture=camera","aria-hidden":"true",className:"hidden",onChange:e=>{if(e.target&&e.target.files&&e.target.files[0]){let t=e.target.files[0];I(null),o(E,{file:t,nameInProgress:x})}},ref:h,tabIndex:-1,type:"file","data-qa":"edit_email_icon_upload"})),n.createElement("div",{className:"p-channel_email_address_modal__body_customize_input"},n.createElement(T.A,{htmlFor:"customize-email-address",text:j.t("Email")},n.createElement(N.A,{"aria-labelledby":"email-name-label",name:"customize-email-address",id:"customize-email-address",value:x,onChange:C,placeholder:j.t("Email"),size:"medium",maxCharacterLimit:50,"data-qa":"customize_email_address_name"})))),n.createElement("div",null,n.createElement("p",{className:"p-channel_email_address_modal__body_message_preview_title"},j.t("Message Preview")),n.createElement("div",{className:"p-channel_email_address_modal__body_message_preview"},n.createElement("div",{className:"p-channel_email_address_modal__body_message_preview__icon"},renderPreviewImage()),n.createElement("div",{className:"p-channel_email_address_modal__body_message_preview__name"},n.createElement("p",{className:"bold margin_bottom_0","data-qa":"customize_email_name"},x.slice(0,50)||J),n.createElement("p",{className:"light sk_light_gray margin_bottom_0"},J),n.createElement("div",{className:"p-channel_email_address_modal__body_message_preview__message"}))))))),n.createElement(f.jl,null,n.createElement(f.ox,null,n.createElement(d.lV,{disabled:!x&&!k||x.length>50,onClick:Z,loading:F,"data-qa":"cea_customize_save_button",autoFocus:!0,"aria-label":j.t("Save Changes")},j.t("Save Changes")))))};CustomizeChannelEmailAddressModal.displayName="CustomizeChannelEmailAddressModal";let z={showToast:G.M,updateChannelEmailAddress:V},K=(0,D.N)(null,z)(CustomizeChannelEmailAddressModal);var $=a(0x102edf836),Y=a(0x3711e82d);let track=({clogger:e,step:t,action:a,isV2:n})=>{let r=n?Y.EventId.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_V2:Y.EventId.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS;e.track(r,{contexts:{ui_context:{step:t,action:a}}})},trackModal=e=>{track({...e,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_MODAL,isV2:e.isV2})},Q=(0,B.Ay)("Deletes a channel email address from channel id",(e,t,a)=>{let{channelId:n,address:r}=a,i=t();return i&&i.channelEmails&&i.channelEmails[n]?e((0,U.lx)({channelId:n,address:r})).then(t=>{if(t.ok)return e((0,H.d3)({channelId:n}));let a="";try{a=`Could not delete channel email address for ${n} -> ${JSON.stringify(t)}`}catch{a=`Could not delete channel email address for ${n}`}throw Error(a)}):F.S.reject(Error(`an email address does not exist for ${n}`))});Q.meta={name:"deleteChannelEmailAddress",key:"createThunkDeleteChannelEmailAddress",description:"Deletes a channel email address from channel id"};let Z=new i.Ay("channel-email-addresses"),J={name:"check-circle"},X={name:"warning"},DeleteChannelEmailAddressModal=({channel:e,showToast:t,channelDisplayName:a,deleteEmailAddress:r,channelEmail:i,closeModal:l,switchPane:o,clogger:s})=>{let c=(0,n.useCallback)(()=>{track({clogger:s,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_DELETE_EMAIL,action:Y.UiAction.YES})},[s]),d=(0,n.useCallback)(()=>{track({clogger:s,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_DELETE_EMAIL,action:Y.UiAction.CLOSE}),o("get")},[s,o]),m=(0,n.useCallback)((e=!1)=>{e||c();let r=e?Z.t("Could not delete email address for {channelDisplayName}",{channelDisplayName:a}):Z.t("Email address revoked");return t({error:e,element:n.createElement(R.Ay,{position:"bottom-right",offsetY:70,svgIconProps:e?X:J,svgIconClassName:e?"sk_reddish_orange":"sk_lilypad_green"},n.createElement("div",{"data-qa":"channel_email_delete_toast"}," ",r," "))})},[c,a,t]),p=(0,n.useCallback)(()=>{i.address?(l(),r({channelId:e.id,address:i.address}).then(()=>m()).catch(()=>m(!0))):m(!0)},[e.id,l,i.address,m,r]),h=Z.t("Delete email address for {channelDisplayName}?",{channelDisplayName:a}),_=Z.t("Emails sent or forwarded to the email address for {channelDisplayName} will no longer be posted in the channel when you delete the email address.",{channelDisplayName:a}),b=Z.t("Delete email address");return n.createElement(n.Fragment,null,n.createElement(f.rQ,null,n.createElement(u.A,{onClick:d}),n.createElement(f.Rc,{className:"p-channel_email_address_modal__title-bar","data-qa":"revoke_channel_email_modal",title:h})),n.createElement(f.$m,null,n.createElement(f.qf,null,n.createElement("p",{className:"p-channel_email_address_modal__body"},_))),n.createElement(f.jl,null,n.createElement(f.ox,null,n.createElement($.Ay,{type:"danger",onClick:p,"data-qa":"revoke_channel_email_modal_go"},b))))};DeleteChannelEmailAddressModal.displayName="DeleteChannelEmailAddressModal";let ee=(0,D.N)(null,{deleteEmailAddress:Q})(DeleteChannelEmailAddressModal);var et=a(0x15f8e452a),ea=a(0x1faa3f1ac),en=a(0xf931c21),er=a(0x12185e091),ei=a(0x1ed767a16);let el=new i.Ay("channel-email-addresses"),GetChannelEmailAddressModal=({channelDisplayName:e,showToast:t,switchPane:a,clogger:r,channelEmail:i,setChannelEmail:l,setError:o,isError:u,isChannelEmailAddressEnabledByOrg:p,...h})=>{let[_,b]=(0,n.useState)(!1),[g,y]=(0,n.useState)(!1),[E,I]=(0,n.useState)(k),w=(0,n.useCallback)(()=>{o(!1),y(!0),h.getChannelEmail({channelId:h.channel.id,createIfNotExists:!0}).then(t=>{if(y(!1),t.isError)return o(!0),t;if(l(t),t.createdNew&&!(0,er.JM)(h.channel)){let t=(0,W.Jw)(e);h.sendEphemeralFeedback({temporary:!0,message:{channel:h.channel.id,text:t[0]?.text?.text,blocks:t}})}return t}).catch(e=>{y(!1),(0,s.getGenericLogger)().error("Server returned error when calling getChannelEmail",e),o(!0)})},[h,e,l,o]),T=(0,n.useCallback)(()=>{track({clogger:r,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_MODAL,action:Y.UiAction.COPY_TO_CLIPBOARD,isV2:!0}),(0,ei.x3)(`"${e} (Slack)" <${i.address}>`);let a=el.t("Email address copied to clipboard.");t({element:n.createElement(R.Ay,{position:"bottom-right",offsetY:70,svgIconProps:{name:"check-circle"},svgIconClassName:"sk_lilypad_green"},n.createElement("div",{"data-qa":"channel_email_copy_toast"}," ",a," "))})},[e,i.address,r,t]),M=(0,n.useCallback)(()=>{track({clogger:r,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_HELP_BUTTON,action:Y.UiAction.CLICK,isV2:!0}),a(C)},[a,r]),P=(0,n.useCallback)(()=>{a(x)},[a]),L=(0,n.useCallback)(()=>{track({clogger:r,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_DELETE_BUTTON,action:Y.UiAction.CLICK,isV2:!0}),a(A)},[r,a]);(0,n.useEffect)(()=>(trackModal({clogger:r,action:Y.UiAction.OPEN,isV2:!0}),i.address?I(S):E===k&&(I(v),h.getChannelEmail({channelId:h.channel.id}).then(e=>{I(S),e.isError?o(!0):l(e)}).catch(e=>{I(S),(0,s.getGenericLogger)().error("Server returned error when calling getChannelEmail",e),o(!0)})),()=>{trackModal({clogger:r,action:Y.UiAction.CLOSE,isV2:!0})}),[h,i,r,E,l,o]);let O=n.createElement("div",{className:"display_flex"},el.t("Send emails to {channelDisplayName}",{channelDisplayName:e})," ",n.createElement(en.A,{className:"margin_left_50",uiComponentVariant:Y.UiComponentVariant.SEND_EMAILS_TO_CHANNEL_MODAL})),D=el.t("Failed to get email address for {channelDisplayName}",{channelDisplayName:e});return n.createElement(n.Fragment,null,n.createElement(f.rQ,null,n.createElement(f.Rc,{"data-qa":"channel_email_modal_header",title:O})),n.createElement(f.$m,{className:"p-channel_email_address_modal__get_body"},n.createElement(f.qf,null,n.createElement("div",{className:"p-channel_email_address_modal__info_text"},el.rt("Emails sent to this email address will be posted in the {channelDisplayName} channel. <a>How to use this address</a>.",{channelDisplayName:e},({text:e})=>n.createElement(ea.A,{"data-qa":"channel_email_help_link",onClick:M},e))),n.createElement("div",{className:"p-channel_email_address_modal__label p-channel_email_address_modal__label--right","data-qa":"channel_email_modal_body"},E===v&&n.createElement(m.A,{size:"large",inline:!0}),E===S&&!i.address&&n.createElement(d.lV,{type:"primary",className:"p-channel_email_address_modal__get",onClick:w,loading:g,"data-qa":"channel_email_get_button","aria-label":el.t("Get Email Address")},el.t("Get Email Address")),E===S&&i.address&&n.createElement(n.Fragment,null,n.createElement("div",{className:"p-channel_email_address_modal__label__input"},n.createElement(N.A,{"aria-label":el.t("Email"),name:"channel-email-address",id:"channel-email-address","data-qa":"channel-email-address",value:_?i.address:(e=>{if(!e)return"";if(e.length<27||2!==e.split("@").length)return e;let[t,a]=e.split("@");return`${t.slice(0,27)}...@${a}`})(i.address),onBlur:()=>b(!1),onFocus:()=>b(!0),forceSelectAll:!0,readOnly:!0,size:"medium"})),n.createElement(d.Ay,{type:"primary",className:"p-channel_email_address_modal__copy",onClick:T,"data-qa":"channel_email_copy_button",disabled:!i.address},el.t("Copy")))),E===S&&i.address&&n.createElement("div",{className:"p-channel_email_address_modal__sub_content"},n.createElement(ea.A,{onClick:P,"data-qa":"channel_email_customize_link",className:"p-channel_email_address_modal__sub_content__link"},n.createElement(et.A,{type:"pencil",size:"inherit"}),el.t(" Customize Email Appearance")),n.createElement(ea.A,{onClick:L,"data-qa":"channel_email_delete_button",className:"p-channel_email_address_modal__sub_content__link"},n.createElement(et.A,{type:"trash",size:"inherit"}),el.t(" Delete Address"))),u&&n.createElement(c.Ay,{type:c.QE.boxed,level:c.A_.error,align:c.AO.left,className:"p-channel_email_address_modal__error","data-qa":"channel_email_error"},D))))};GetChannelEmailAddressModal.displayName="GetChannelEmailAddressModal";let eo=a.p+"cea-info-dark-9f77aa7.gif",es=a.p+"cea-info-light-f371370.gif";var ec=a(0x20e77676b),ed=a(0x1fb2d2a87);let em=new i.Ay("channel-email-addresses"),HelpChannelEmailAddressModal=({channelDisplayName:e,switchPane:t,clogger:a,isDarkMode:r})=>{let i=(0,n.useCallback)(()=>{track({clogger:a,step:Y.UiStep.CHANNEL_GET_CHANNEL_EMAIL_ADDRESS_HELP,action:Y.UiAction.CLOSE,isV2:!0}),t("get")},[a,t]),l=em.t("How to use this address"),o=em.rt("Keep all your work communication in one place. Use this address to send individual emails directly to {channelDisplayName} or set up automatic email forwarding from providers like <a> Gmail </a> and <a> Outlook </a> so incoming emails \u2014 like alerts or results from a contact form on your website \u2014 arrive straight to {channelDisplayName}.",{channelDisplayName:e},({text:e})=>e?.props?.children&&e?.props?.children.indexOf("Outlook")>=0?n.createElement(ea.A,{href:"https://support.microsoft.com/en-us/office/turn-on-automatic-forwarding-in-outlook-on-the-web-7f2670a1-7fff-4475-8a3c-5822d63b0c8e"},e):n.createElement(ea.A,{href:"https://support.google.com/mail/answer/10957"},e)),s=em.t("Learn more about sending emails to Slack");return n.createElement(n.Fragment,null,n.createElement(f.rQ,null,n.createElement(u.A,{onClick:i}),n.createElement(f.Rc,{className:"p-channel_email_address_modal__title-bar","data-qa":"revoke_channel_email_modal",title:l})),n.createElement(f.$m,null,n.createElement(f.qf,{className:`p-channel_email_address_modal__help_content_section ${!r&&"p-channel_email_address_modal__help_content_section--light-mode"}`},n.createElement("p",{className:"p-channel_email_address_modal__body"},o),n.createElement("div",{className:"p-channel_email_address_modal__body_image_container"},n.createElement(P.A,{src:r?eo:es,alt:"Channel Email Address Info Image",className:"p-channel_email_address_modal__body_image_container_img",renderPending:()=>n.createElement("div",null,n.createElement(m.A,null))})))),n.createElement(f.jl,{className:"p-channel_email_address_modal__help_footer"},n.createElement("div",{className:"p-channel_email_address_modal__help_container"},n.createElement(et.A,{type:"info-circle",size:"inherit",className:"p-channel_email_address_modal__help_container_icon"}),n.createElement(ec.A,{articleId:0xc53cfce,"data-qa":"help_channel_email_modal_go",className:"p-channel_email_address_modal__help_link",forceOpenInBrowser:!0},s))))};HelpChannelEmailAddressModal.displayName="HelpChannelEmailAddressModal";let eu=(0,D.N)(e=>({isDarkMode:"dark"===(0,ed.to)(e)}),{deleteEmailAddress:Q})(HelpChannelEmailAddressModal);var ep=a(0x238b287cf),eh=a(0x1ecc7f772),e_=a(0x40b0507e),ef=a(0x133608fc),eb=a(0x10ed819ce),eg=a(0x1ffbda36f),ey=a(0x82f31053),eA=a(0x11eae4d05),ex=a(0x15176067);let eE=new i.Ay("channel-email-addresses"),ChannelEmailAddressMultiPaneModal=e=>{let[t,a]=(0,n.useState)({...e.channelEmail,channelId:e.channel.id}),[i,o]=(0,n.useState)(!1),s=eE.t("Channel Email Get"),c=eE.t("Channel Email Delete"),d=eE.t("Channel Email Update"),m=eE.t("Channel Email Crop"),u=eE.t("Channel Email Help"),p=(0,ep.A)(),h=(0,r.A)(()=>({get:{render:r=>n.createElement(GetChannelEmailAddressModal,{...e,...r,clogger:p,channelEmail:t,isError:i,setChannelEmail:a,setError:o}),modalProps:{contentLabel:s}},[A]:{render:a=>n.createElement(ee,{...e,...a,clogger:p,channelEmail:t}),modalProps:{contentLabel:c}},[x]:{render:a=>n.createElement(K,{...e,...a,channelEmail:t}),modalProps:{contentLabel:d}},[E]:{render:t=>n.createElement(EmailIconCropPane,{...e,...t}),modalProps:{contentLabel:m}},[C]:{render:a=>n.createElement(eu,{...e,...a,clogger:p,channelEmail:t}),modalProps:{contentLabel:u}}}),[e,t,p,i,s,c,d,m,u]);return n.createElement(l.A,{closeModal:e.closeModal,defaultPane:"get",panes:h,className:"p-channel_email_address_modal p-channel_email_address_modal--updated-width",dataQa:"channel_email_modal"})};ChannelEmailAddressMultiPaneModal.displayName="ChannelEmailAddressMultiPaneModal";let eC={showToast:G.M,getChannelEmail:ey.U,sendEphemeralFeedback:ex.A},ek=(0,D.N)((e,{channel:t})=>{let a=(0,eb.iL)(e);return{isChannelEmailAddressEnabledByOrg:a,channelDisplayName:(0,eh.SB)(e,t),channelEmail:(0,eg.H)(e,{channelId:t.id})}},eC)(ChannelEmailAddressMultiPaneModal),ev=(0,eA.e)(ek,{preDispatchHook:(e,t,{channel:a,openModalProps:n={}})=>{let r=t();return!(0,e_.A)(r,a)||e((0,ef.U)(n))}})},0x17e7c4f73:(e,t,a)=>{"use strict";a.d(t,{Y:()=>ChannelHoverCard});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x410829f8),l=a(0x247cf31a2),o=a(0x6cc5eee0),s=a(0x16cf1da63),c=a(0x102edf836),d=a(0xce378727),m=a(0xbe11fe89),u=a(0xb2231927),p=a(0xd6a16321),h=a(0x1ec69ee01),_=a(0x6f213e53),f=a(0xf6ed6f31),b=a(0x7fae732f),g=a(0x3711e82d),y=a(0x7a48cfc4),A=a(0x226892387),x=a(0x1ee439e69);let E={elementName:"join_channel_button",eventId:g.EventId.CHANNEL_HOVER_CARD_ACTION,onClick:{enableClogAction:!0},uiAction:g.UiAction.CLICK},C={elementName:"view_channel_button",eventId:g.EventId.CHANNEL_HOVER_CARD_ACTION,onClick:{enableClogAction:!0},uiAction:g.UiAction.CLICK},k=new r.Ay("team"),v=new Set,ChannelHoverCardActions=({channel:e})=>{let t=(0,s.wA)(),a=(0,A.d4)(t=>(0,b.n)(t,e)),r=(0,A.d4)(e=>(0,x._J)(e,a)),{closeCard:i}=(0,m.f)(),[l,o]=(0,n.useState)(v.has(e.id)),g=(0,n.useCallback)(()=>{o(!0),v.add(e.id),t((0,y.C)({channelId:e.id})).finally(()=>{o(!1),v.delete(e.id)})},[e.id,t]),S=(0,n.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),t((0,u.n)({e:a,navProps:(0,p.pr)(e.id)})),i()},[e.id,i,t]);return(0,_.F)(e)||(0,f.bl)(e)&&!l?n.createElement(c.Ay,{autoClogProps:C,className:"full_width",href:(0,h.Bn)({channelId:e.id,team:r}),onClick:S,size:"small",type:"outline"},k.t("View Channel")):n.createElement(d.A,{autoClogProps:E,className:"full_width",loading:l,onClick:g,size:"small",type:"outline"},k.t("Join Channel"))};ChannelHoverCardActions.displayName="ChannelHoverCardActions";var S=a(0x246bcdebc);let ChannelHoverCardBodyItem=({content:e,icon:t})=>n.createElement("div",{className:"display_flex"},n.createElement("span",{className:"nudge_top_2"},t),n.createElement("span",{className:"margin_left_50"},e));ChannelHoverCardBodyItem.displayName="ChannelHoverCardBodyItem";var I=a(0x4c96e5d9),w=a(0x58199183);let T=new r.Ay("team");function getExternalTeamsTextElement(e){if(e.length)switch(e.length){case 1:return T.rt("{teamName} is in this channel",{teamName:n.createElement(w.A,{id:e[0]})});case 2:return T.rt("{teamName1} and {teamName2} are in this channel",{teamName1:n.createElement(w.A,{id:e[0]}),teamName2:n.createElement(w.A,{id:e[1]})});default:return T.rt("{teamName} and <t1>{numOtherTeams, plural, =1 {# other team} other {# other teams}}</t1> are in this channel",{numOtherTeams:e.length-1,teamName:n.createElement(w.A,{id:e[0]})},({text:t})=>n.createElement(I.Ay,{tip:e.slice(1).map(e=>n.createElement(w.A,{id:e,key:e}))},n.createElement("strong",null,t)))}}getExternalTeamsTextElement.displayName="getExternalTeamsTextElement";var N=a(0xddde6f8);let ChannelHoverCardBodyItemExternalTeams=({channelId:e})=>{let t=(0,A.d4)(t=>(0,N.A)(t,[e])),a=(0,n.useMemo)(()=>n.createElement(S.A,{id:t?.[0]}),[t]);if(t.length)return n.createElement(ChannelHoverCardBodyItem,{content:getExternalTeamsTextElement(t),icon:a})};ChannelHoverCardBodyItemExternalTeams.displayName="ChannelHoverCardBodyItemExternalTeams";var M=a(0x2501a2cee),R=a(0x339b339c),P=a(0x24c58d3f1),L=a(0x2114bd58c),O=a(0x197be2501),D=a(0x14c66e8b4),F=a(940089e4);let U=new r.Ay("team");function getLatestChannelMessageDateText(e){if(!e)return U.t("No messages");let t=(0,F.A)(e);return(0,L.A)(t)?U.t("Last message today"):(0,O.A)(t)?U.t("Last message yesterday"):(0,P.A)(t,new Date)?U.t("Last message on {createdDate}",{createdDate:(0,D.A)(e,"MMM Do")}):U.t("Last message in {createdDate}",{createdDate:(0,D.A)(e,"YYYY")})}var B=a(0x55098bc0),H=a(0x203beba52),W=a(0x1337d9fa2),V=a(0x1cf0d97e1),G=a(0xd93ecf94);let q=(0,V.Ay)((e,t,a)=>(0,B.A)(a?.timestamps,a=>{let n=(0,G.Ld)(e,t,a);if(!n)return!1;let r=(0,W.ys)(n);return!(0,H.A)(r)}));q.meta={name:"getLatestNonAutomatedMessageTimestampByChannelId",key:"createSelectorGetLatestNonAutomatedMessageTimestampByChannelId",description:(e,t,a)=>(0,B.A)(a?.timestamps,a=>{let n=(0,G.Ld)(e,t,a);if(!n)return!1;let r=(0,W.ys)(n);return!(0,H.A)(r)})};var j=a(0x1a256ff50),z=a(0x1ac5a32d1);function useFetchChannelHistory({isEnabled:e=!0,params:t}){let a=(0,s.wA)(),[r,i]=(0,n.useState)(!1),l=(0,n.useRef)();return(0,n.useEffect)(()=>{!e||r||(0,j.Ay)(t,l.current)||(l.current=t,i(!0),a((0,z.A)(t)).finally(()=>{i(!1)}))},[a,e,r,t]),{isLoading:r}}var K=a(0xc561af5);let $=n.createElement(M.Ah,{inline:!0,name:"clock",size:"20"}),Y=n.createElement(R.A,{size:"large"}),ChannelHoverCardBodyItemLastMessage=({channelId:e})=>{let t=(0,A.d4)(t=>(0,K.tp)(t,e)),a=(0,A.d4)(a=>q(a,e,t));return useFetchChannelHistory({isEnabled:!t?.reachedEnd,params:{channelId:e,limit:1,reason:"channel-hover-card/latest-timestamp"}}).isLoading?n.createElement(ChannelHoverCardBodyItem,{content:Y,icon:$}):n.createElement(ChannelHoverCardBodyItem,{content:getLatestChannelMessageDateText(a),icon:$})};ChannelHoverCardBodyItemLastMessage.displayName="ChannelHoverCardBodyItemLastMessage";var Q=a(0xc1360909);let Z=n.createElement(M.Ah,{inline:!0,name:"user-groups",size:"20"}),J=new r.Ay("team"),ChannelHoverCardBodyItemMemberCount=({channelId:e})=>{let t=(0,A.d4)(t=>(0,Q.q8)(t,e)),a=t?.counts.member_count??0;return n.createElement(ChannelHoverCardBodyItem,{content:J.t("{channelMemberCount, plural, =1 {# person} other {# people}} in this channel",{channelMemberCount:a}),icon:Z})};ChannelHoverCardBodyItemMemberCount.displayName="ChannelHoverCardBodyItemMemberCount";var X=a(0x1df70a9f4),ee=a(0xd9e862e6),et=a(0x1591157c4),ea=a(0x21c11a1dc);let ChannelHoverCardHuddleBadge=({channelId:e})=>{if((0,A.d4)(t=>(0,et.A)()&&(0,ea.sl)(t,e)))return n.createElement("div",{className:"display_flex"},n.createElement(X.i,{channelId:e,excludeIcon:!0,excludeMemberOverflowCount:!0}),n.createElement("svg",{className:"p-search_autocomplete__huddle_fake_mask_svg"},n.createElement("path",{d:"M2.98805e-07 20H2.52782V0H0C0.95008 1.06151 1.52779 2.46329 1.52779 4V16C1.52779 17.5367 0.95008 18.9385 2.98805e-07 20Z"})),n.createElement(ee.A,{channelId:e,withTooltip:!1}))};ChannelHoverCardHuddleBadge.displayName="ChannelHoverCardHuddleBadge";var en=a(0x52a2bc6d),er=a(0x711ca245),ei=a(0x15f4f83cf),el=a(0x25c60ed2),eo=a(0x217553e42);let es=new r.Ay("team"),ChannelHoverCard=({channelId:e,enableButtons:t=!1})=>{let a=(0,A.d4)(t=>(0,eo.OL)(t,e));if((0,ei.mX)(a))return n.createElement(er.j,{className:"padding_100"},es.t("Loading\u2026"));if(!(0,el.V)(a))return n.createElement(er.j,{className:"padding_100"},es.t("You don\u2019t have access to this channel (ex. it\u2019s private or in a workspace you\u2019re not a part of), so its name isn\u2019t shown"));let r=(0,h.cU)(a),s=(0,h.kR)(a)??0;return n.createElement(er.j,{className:"padding_100"},n.createElement("div",{className:"margin_bottom_75"},n.createElement("div",{className:"margin_bottom_25 display_flex align_items_center"},n.createElement("div",{className:"flex_one text_subtitle overflow_ellipsis"},(0,l.k)(a)?n.createElement(l.A,{boldIcon:!0,channel:a,truncate:!0}):n.createElement(en.A,{channel:a})),n.createElement("div",{className:"display_flex align_items_center gap_25"},n.createElement(ChannelHoverCardHuddleBadge,{channelId:e}),s>0&&n.createElement(i.Gm,{count:s,style:i.rY.themed}))),r&&n.createElement("div",{className:"multiline_ellipsis_2 break_word"},n.createElement(o.A,{noHighlights:!0,noJumbomoji:!0,showTooltips:!1,text:r}))),!(0,_.F)(a)&&n.createElement("div",{className:"display_flex flex_direction_column gap_25"},n.createElement(ChannelHoverCardBodyItemMemberCount,{channelId:e}),n.createElement(ChannelHoverCardBodyItemLastMessage,{channelId:e}),n.createElement(ChannelHoverCardBodyItemExternalTeams,{channelId:e})),t&&n.createElement("div",{className:"margin_top_75"},n.createElement(ChannelHoverCardActions,{channel:a})))};ChannelHoverCard.displayName="ChannelHoverCard"},0x17d5374a6:(e,t,a)=>{"use strict";a.d(t,{s:()=>ChannelInviteModal});var n,r,i,l=a(0xbad225b5),o=a(0x40c0d834),s=a(0x19efc8b50),c=a(0x134e233cc),d=a(0x120c268ad),m=a.n(d),u=a(0xb97b797e),p=a(0x16998c9bf),h=a(0xf8dd7f80),_=a(0x20482ad21),f=a(0x224f7f0e9),b=a(0xb1ea448c),g=a(0x780e190c),y=a(0x1fdec3e16),A=a(0x247cf31a2),x=a(0x2b7f0bcc),E=a(0x58199183),C=a(0x1e1f2bc28),k=a(0x226892387),v=a(0x1ee439e69);let S=new _.Ay("channel_details"),ChannelManagerRestrictedInvitesAlert=({shareChannelAccessTypeAvailable:e,channel:t})=>{let a,n=(0,k.d4)(v.Yc),r=(0,k.d4)(e=>(0,C.Q)(e,t));return!e&&!r||e&&r||(r&&!e&&(a=S.rt("You can only add other people from {org} to this channel.",{org:l.createElement(E.A,{team:n,bold:!0})})),!r&&e&&(a=S.rt("Only external people can be added to this channel.")),void 0===a)?null:l.createElement(x.Ay,{isIconVisible:!1,level:x.A_.default,className:"margin_left_150 margin_right_150 margin_bottom_100","data-qa":"channel-manager-restricted-invites-alert"},a)};ChannelManagerRestrictedInvitesAlert.displayName="ChannelManagerRestrictedInvitesAlert";var I=a(0x1df96de4c),w=a(0x53239337);let getInviteeOptionsByEntityType=e=>{let t={members:[],userGroups:[],emails:[]};return e.forEach(e=>{(0,w.wX)(e)?t.emails.push(e):(0,w._h)(e)?t.userGroups.push(e):(0,w.oJ)(e)&&t.members.push(e)}),t},getInviteeEmail=e=>e.entity.value,get_invites_by_team_getExternalMemberInvitesByTeam=(e,{invitees:t})=>{let a={};return t?.length&&t.forEach(t=>{let{name:n,teamId:r}=t;a[r]?a[r].inviteList.push(n):a[r]={inviteList:[n],teamSummary:(0,v._J)(e,r)}}),a};var T=a(0xa0b7e90),N=a(0xa1dfeae3),M=a(0xd843ab47),R=a(0x12185e091),P=a(0x6b35329),L=a(0x1ecc7f772),O=a(0x73d7ee71),D=a(0xb70d870b),F=a(0x6f213e53),U=a(0x189391f29),B=a(0x11640e941),H=a(0x16df7a1d3),W=a(0x47a6f20a),V=a(0x1f66b5878),G=a(0x4323d7f5),q=a(0xc8f728f),j=a(0x143fb6398),z=a(0xb0245531),K=a(0xa1832ae4),$=a(0xb8504a42),Y=a(0xf038462c),Q=a(0xf4c5686f),Z=a(0x11439744b),J=a(0x1d600678),X=a(0x1ccef1c6f),ee=a(0x1af285d2e),et=a(0x19c76d181),ea=a(0xabb432ea),en=a(0x217553e42),er=a(0xd9302abc),ei=a(0x14149c126),el=a(0xd1e4481f),eo=a(0xb9604b6),es=a(0x5b1935a6),ec=a(0xe684f705),ed=a(0xc1360909),em=a(0x1defa8f11),eu=a(0x3e5c26f),ep=a(0x18a17ca8f),eh=a(0xe64d1ea7),e_=a(0x74bbb29a);let use_channel_invite_mapped_props_useInviteTeamProps=()=>{let e=(0,k.d4)(v.H7),t=(0,k.d4)(v.Yc),a=(0,k.d4)(ea.R7);return(0,l.useMemo)(()=>({currentTeam:e,currentTopLevelTeam:t,currentTeamName:(0,K.F1)(e),isTeamFree:(0,K.tc)(e),isEnterprise:(0,$.r7)(e),teamMemberCount:a}),[e,t,a])},use_channel_invite_mapped_props_useInviteChannelProps=({channelId:e})=>{let{getPrimaryView:t}=(0,l.useContext)(M.A),a=(0,k.d4)(a=>{let n=(0,en.OL)(a,e);if((0,R.Zx)(n)||(0,F.F)(n)){let e=t(a)?.id;n=(0,en.OL)(a,e)}return n}),n=(0,k.d4)(e=>(0,L.SB)(e,a))||"",r=(0,k.d4)(e=>(0,O.R)(e,a))||[],i=(0,k.d4)(e=>{let t=(0,ed.q8)(e,a.id);return t?.counts.member_count??0}),o=(0,k.d4)(e=>-1!==((0,J.x)(e,"default_channels")||[]).indexOf(a.id)),s=(0,k.d4)(e=>(0,V.JF)(e,"default_channel_creation_enabled",a))||!1,c=(0,k.d4)(ea.qV),d=(0,k.d4)(e=>(0,eo.Hp)(e,es.xu.PROGRESSIVE_DISCLOSURE)),{isEnterprise:m}=use_channel_invite_mapped_props_useInviteTeamProps(),u=m&&((0,H.S)(a)||(0,B.M)(a)),p=(0,k.Z2)(e=>{let t=(0,el._4)(e),n=(0,D.f)(e,a);return n?n.reduce((e,a)=>{let n=t.find(e=>e.id===a);return n&&e.push(n),e},[]):I.Ml}),h=(0,k.d4)(el.BL),_=(0,k.d4)(ep.lQ),f=(0,k.d4)(ep.GC),b=(0,k.d4)(e=>(0,em.ax)(e,"has_uploaded_profile_photo")),g=(0,k.d4)(e=>(0,X.ty)(e,"has_invited"));return{channel:a,channelName:n,internalTeamIds:r,channelMemberCount:i,isDefaultChannel:o,isDefaultChannelCreationEnabled:s,isChannelPublic:(0,R.rW)(a),isLoadingInitialMembers:c,currentMegaphonePDTip:d,isEligibleChannelForWorkspaceSelection:u,channelInvitableWorkspaces:p,customMessage:h,isProfileUpdated:_,onboardingModalIsComplete:f,hasUploadedProfilePhoto:b,hasSentInvites:g}},useComprehensibleInvitesProps=({channel:e})=>{let t=(0,k.d4)(ea.IT),a=(0,k.d4)(t=>(0,U.R)(t,e)),n=(0,k.d4)(ea.Ts),r=(0,k.d4)(ee.E),{isEnterprise:i,isTeamFree:l}=use_channel_invite_mapped_props_useInviteTeamProps(),o=(0,k.d4)(t=>i&&n?!(0,W.nY)(t,e):(0,W.Lz)(t));return{isLoadingComprehensibleInvitesEligibility:t,shouldShowComprehensibleInvites:n&&!a,canInviteOrRequestInvites:o,inEmailInvitesDay1Experience:l&&o,shouldDisplayRealNames:r}};var ef=a(0x21da4684a),eb=a(0x21d85d6e5),eg=a(0xdb0ffe37),ey=a(0x1aad32b98);function isExternalMember(e){return!!(0,w.oJ)(e)&&(0,eg.g)(e.entity)}function isExternalMemberTeamNotConnectedOnChannel(e,t){if(!(0,w.oJ)(e))return!1;let a=(0,ey.dQ)(e.entity);return!!((0,eg.g)(e.entity)&&a&&!t.includes(a))}function isNonTeamOrgMember(e,t){return!!(0,w.oJ)(e)&&!!(!(0,eg.g)(e.entity)&&!(0,ey.nO)(e.entity,t)&&e.entity?.profile?.email)}function doesOrgMemberNeedWorkspaceInvite(e,t,a){let n=(0,ef.A)((0,ey.HI)(e.entity),a||[]);return!(0,H.S)(t)&&!n.length}function classification_helpers_getClassifiedTokens({selectedMembers:e,currentTeamId:t,channel:a,internalTeamIds:n,options:r={forDisplay:!1,shouldDisplayRealNames:!1}}){let{forDisplay:i,shouldDisplayRealNames:l}=r,o=new Set,s=e.reduce((e,r)=>{if((0,w.tT)(r,t)&&(e.externalCount+=1,e.userActionableCount+=1,(0,w.oO)(r)?(e.externalPrimaryScIdentityTokens.push(r),o.add(r.emailTeam.id),e.userActionableExternalPrimaryScIdentityCount+=1):(e.userActionableExternalCount+=1,e.externalEmails.push(r.entity.value))),(0,w.nt)(r,t)&&((0,w.oO)(r)||(e.userActionableInternalCount+=1,e.userActionableCount+=1),e.internalCount+=1,e.internalEmails.push(r.entity.value)),isExternalMember(r)){e.externalCount+=1;let t=i?(0,eb.oj)({displayRealNames:l,member:r.entity}):r.value,a=r.entity.team_id;e.externalMembers.push(t),o.add(a),e.externalMemberTokens.push({name:t,teamId:a})}return isNonTeamOrgMember(r,t)&&doesOrgMemberNeedWorkspaceInvite(r,a,n)&&(e.internalCount+=1,e.nonTeamOrgMembers.push(i?(0,eb.oj)({displayRealNames:l,member:r.entity}):r.entity.profile?.email??"")),e},{externalEmails:[],externalPrimaryScIdentityTokens:[],internalEmails:[],externalMembers:[],externalMemberTokens:[],nonTeamOrgMembers:[],userActionableExternalPrimaryScIdentityCount:0,userActionableExternalCount:0,externalCount:0,userActionableInternalCount:0,internalCount:0,userActionableCount:0,externalTeamIds:[]});return s.externalTeamIds=[...o],s}function getEffectiveClassifiedTokens(e,t,a,n,r={includeAllExternalTokens:!1}){let{includeAllExternalTokens:i}=r;return{externalPrimaryScIdentityTokens:a===t||i?e.externalPrimaryScIdentityTokens:[],externalMemberTokens:i?e.externalMemberTokens:[],externalEmails:a===t?e.externalEmails:[],internalEmails:n===t?e.internalEmails:[]}}var eA=a(0x12cf1825a);let ex={totalCount:0,loadingCount:0,unknownCount:0,emailCount:0,classifyingCount:0,errorCount:0,alreadyInChannelCount:0,singleChannelGuestCount:0,guestNotOnWorkspaceCount:0,awayTeamExternalEmailCount:0},get_counts=e=>{if(!e?.length)return ex;let t={...ex,totalCount:e.length};return e.forEach(e=>{e.isLoading&&(t.loadingCount+=1),e.isUnknown&&(t.unknownCount+=1),e.entity?.isEmail&&(t.emailCount+=1),e.isClassifying&&(t.classifyingCount+=1),e.error===eA.rI.alreadyInChannel?t.alreadyInChannelCount+=1:e.error===eA.rI.singleChannelGuest?t.singleChannelGuestCount+=1:e.error===eA.rI.guestNotOnWorkspace?t.guestNotOnWorkspaceCount+=1:e.error===eA.rI.awayTeamExternalEmail?t.awayTeamExternalEmailCount+=1:e.isError&&(t.errorCount+=1)}),t};function createInviteContext(e){return(0,l.createContext)({invitees:[],onInviteesChange:()=>{},inviteMode:"",onInviteModeChange:()=>{},requirements:{},...e})}var eE=a(0x770aee07);let eC=(0,l.createContext)({onStepBack:()=>{},onSubmitComprehensibleInvites:()=>{},setAccessType:()=>{},toggleInvitesList:()=>{},internalAccessType:eE.BD.Member,externalAccessType:eE.BD.SharedChannel}),ek=createInviteContext(),ChannelInviteModalContextProvider=({value:e,children:t})=>l.createElement(ek.Provider,{value:e},l.createElement(eC.Provider,{value:e},t)),useChannelInviteModalContext=()=>{let e=(0,l.useContext)(ek),t=(0,l.useContext)(eC);return(0,l.useMemo)(()=>({...e,...t}),[e,t])},useInviteesFromChannelInviteContext=()=>{let{invitees:e}=(0,l.useContext)(ek),t=(0,l.useMemo)(()=>({counts:get_counts(e),primaryOptions:e.filter(w.oO)}),[e]);return{invitees:e,...t}};var ev=a(0x16cf1da63),eS=a(0x1aa941557),eI=a(0x1e2051844),ew=a(0x1e864b930),eT=a(0x1b9d5cc0c),eN=a(0x2d90c1a8);function useCanUserInviteEntityToChannel(e){let t=(0,ev.wA)(),a=(0,k.d4)(e=>"on"===(0,ei._Z)(e,"sc_allowed_workspaces_pref_override")),n=(0,k.d4)(t=>(0,G.NU)(t,e)),r=(0,k.d4)(t=>!(0,z.b)(t,e)),i=(0,k.d4)(t=>(0,P.A)(t,e)),o=(0,k.d4)(ea.Ts),{requirements:{inviteeTeams:s}}=useChannelInviteModalContext();return(0,l.useCallback)(e=>{let l=(0,eT.NB)(e.entity)&&e.entity||t((0,eN.A)(e.value));if(!(0,eg.g)(l))return!0;let c=(0,ey.dQ)(l)??"";return(!!o||!!i.includes(c))&&(r?!!n&&(!a||!s.length||s.includes(c)):s.includes(c))},[a,n,i,t,s,r,o])}let ChannelInviteFormInlineError=({error:e})=>l.createElement(x.Ay,{type:"boxed",level:"error",align:"left",className:"margin_bottom_150 margin_top_150","data-qa":"channel_invite_error"},e);ChannelInviteFormInlineError.displayName="ChannelInviteFormInlineError";var eM=a(0x2501a2cee),eR=a(0x189a28b3e);let formatWorkspaceNameText=({tag:e,text:t})=>"b"===e?l.createElement("b",{className:"inline_block"},t):null;formatWorkspaceNameText.displayName="formatWorkspaceNameText";let eP=new _.Ay("channel_invite"),ChannelInviteFormDefaultChannelSwitch=({shouldSetChannelAsDefault:e,onToggleChannelAsDefault:t,channel:a})=>{let n=(0,k.d4)(v.H7),r=(0,k.d4)(T.A),i=(0,k.d4)(N.Ah);return l.createElement("fieldset",{className:"p-channel_invite_form__default_channel_fieldset margin_top_175","data-qa":"set-as-default-admin-controls"},l.createElement("legend",{className:"padding_left_50 padding_right_50"},l.createElement("div",{className:"p-channel_invite_form__default_channel_fieldset_legend margin_bottom_0"},l.createElement("span",{className:"margin_right_25"},l.createElement(eM.Ah,{name:"eye-open",size:"inherit",inline:!0})),eP.t("Only admins can see this setting"))),l.createElement("div",{className:"display_flex align_items_center margin_top_50"},l.createElement(eR.A,{isToggled:e,"data-qa":"set-channel-as-default-toggle",onChange:t,ariaLabel:eP.t("Automatically add anyone who joins {teamName}",{teamName:(0,K.F1)(n)})}),l.createElement("span",{className:"margin_left_75"},r||i?eP.rt("When new people join your workspace, <b>{teamName}</b>, add them to <b>{channelName}</b>",{teamName:(0,K.F1)(n),channelName:l.createElement(A.A,{channel:a})},formatWorkspaceNameText):eP.rt("Automatically add anyone who joins <b>{teamName}</b>",{teamName:(0,K.F1)(n)},formatWorkspaceNameText))))};ChannelInviteFormDefaultChannelSwitch.displayName="ChannelInviteFormDefaultChannelSwitch";var eL=a(0x1d2cd7755),eO=a(0x139c79d16),eD=a(0xa5dbe09b),eF=a(0xc9348c4b);let eU=new _.Ay("channel_invite"),ChannelInviteFormRadio=({id:e,isChecked:t,labelText:a,onBulkAddOptionsRadioClick:n})=>l.createElement(eL.A,{htmlFor:e,type:"inline",text:a},l.createElement(eO.A,{id:e,checked:t,name:"add-member-mode",value:e,"data-qa":`${e}-option`,onChange:n}));ChannelInviteFormRadio.displayName="ChannelInviteFormRadio";let ChannelInviteFormRadioGroup=({addMemberMode:e,teamMemberCount:t,onBulkAddOptionsRadioClick:a})=>{let n=(0,k.d4)(v.H7);return l.createElement(eD.A,{className:"margin_bottom_75","data-qa":"channel_invite_form_radio_group"},l.createElement(ChannelInviteFormRadio,{id:eF.D.AllMembers,isChecked:e===eF.D.AllMembers,labelText:t>2?eU.rt("Add all {teamMemberCount} members of <b>{teamName}</b>",{teamMemberCount:t,teamName:(0,K.F1)(n)},formatWorkspaceNameText):eU.rt("Add all members of <b>{teamName}</b>",{teamName:(0,K.F1)(n)},formatWorkspaceNameText),onBulkAddOptionsRadioClick:a}),l.createElement(ChannelInviteFormRadio,{id:eF.D.SpecificMembers,isChecked:e===eF.D.SpecificMembers,labelText:eU.rt("Add specific people"),onBulkAddOptionsRadioClick:a}))};ChannelInviteFormRadioGroup.displayName="ChannelInviteFormRadioGroup";var eB=a(0x10618ca04);let eH=new _.Ay("channel_invite");var eW=a(0x233ae3d4e),eV=a(0x24cd37000);let eG=new _.Ay("channel_invite"),ChannelInviteFormSearchMultiSelect=({allowEmails:e,allowUserGroups:t,channel:a,inputId:n,isDisabled:r,shouldShowBulkAddControls:i,onFilterQueryChange:o,onFilterQueryPaste:s,onInputFocused:c,onKeyDown:d,onSearchResolved:m,onSelectedItemsChange:u,processOptions:p})=>{let h=(0,k.d4)(ea.Ts),{invitees:_}=useInviteesFromChannelInviteContext(),f=(({allowEmails:e})=>{let t=(0,k.d4)(v.H7),a=(0,K.qR)(t),n=(0,k.d4)(e=>(0,J.x)(e,"display_email_addresses"));return(0,k.d4)(ea.Ts)?e?eH.t("ex. Nathalie, or james@acme.com"):eH.t("ex. Nathalie, or @nathalie"):a?n||e?eH.t("Enter a name, email, or user group"):eH.t("Search by name or user group"):n||e?eH.t("Enter a name or email"):eH.t("Search by name")})({allowEmails:e}),b=(0,k.d4)(eV.ke);return l.createElement(eW.E,{allowEmails:e,allowUserGroups:t,emailClassificationEnabled:h,maxInviteLimit:eB.xD,channel:a,ariaLabel:h?`${eG.t("Add specific people")} ${f}`:eG.t("Coworkers"),selectedOptions:_,onSelectedItemsChange:u,placeholderText:f,onKeyDown:d,onInputFocused:c,processOptions:p,onFilterQueryChange:o,onFilterQueryPaste:s,focusOnMount:!i,onSearchResolved:m,isDisabled:r,inputId:n,selectDataQa:"add_people_modal_select",searchBatchSize:10,useBulkSearch:!0,className:b?"p-channel_invite_modal__multi_select":""})};ChannelInviteFormSearchMultiSelect.displayName="ChannelInviteFormSearchMultiSelect";let ChannelInviteFormInput=({addMemberMode:e,addMemberModeSelection:t,shouldSetChannelAsDefault:a,shouldShowDefaultChannelCreationControls:n,teamMemberCount:r,onBulkAddOptionsRadioClick:i,onToggleChannelAsDefault:o,inputId:s,isDisabled:c,onSearchResolved:d,onSelectedItemsChange:m,processOptions:u,allowEmails:p,allowUserGroups:h,channel:_,shouldShowBulkAddControls:f,onFilterQueryChange:b,onFilterQueryPaste:g,onInputFocused:y,onKeyDown:A})=>{let x=(0,k.d4)(ea.Ts);return l.createElement("div",{className:"margin_top_50 display_flex","data-qa":"channel_invite_form_input"},l.createElement("div",{className:"full_width margin_right_0 p-channel_invite_form__input_field"},f&&l.createElement(ChannelInviteFormRadioGroup,{addMemberMode:e,teamMemberCount:r,onBulkAddOptionsRadioClick:i}),t===eF.D.SpecificMembers&&l.createElement(ChannelInviteFormSearchMultiSelect,{inputId:s,isDisabled:c,onSearchResolved:d,onSelectedItemsChange:m,processOptions:u,allowEmails:p,allowUserGroups:h,channel:_,shouldShowBulkAddControls:f,onFilterQueryChange:b,onFilterQueryPaste:g,onInputFocused:y,onKeyDown:A}),n&&!x&&l.createElement(ChannelInviteFormDefaultChannelSwitch,{shouldSetChannelAsDefault:a,onToggleChannelAsDefault:o,channel:_})))};ChannelInviteFormInput.displayName="ChannelInviteFormInput";var eq=a(0x210cf696f);let ej=new _.Ay("channel_invite"),ChannelInviteFormInputSubtext=({isInviteLimitReached:e,onClickInviteToTeam:t,shouldInviteToWorkspace:a,channel:n})=>{let r=(0,k.d4)(e=>(0,U.R)(e,n)),{emailCount:i}=useInviteesFromChannelInviteContext().counts;return e?l.createElement("div",{className:"p-channel_invite_form__input_subtext","data-qa":"invite_limit_subtext"},ej.rt("<b>Can\u2019t add any more entries.</b> Your first 1,000 are above.")):r&&i>0?null:a?l.createElement("div",{className:"p-channel_invite_form__input_subtext","data-qa":"invite_to_workspace_link"},l.createElement("span",{className:"margin_right_25"},ej.t("To add a coworker who\u2019s not on Slack, you\u2019ll need to")),l.createElement(eq.A,{onClick:t,"data-qa":"invite_to_workspace_button"},ej.rt("invite them first."))):l.createElement("div",{className:"p-channel_invite_form__input_subtext","data-qa":"no_result_subtext"},ej.rt("No results? Try finding your team member by their name."))};ChannelInviteFormInputSubtext.displayName="ChannelInviteFormInputSubtext";let get_user_ids_from_options=e=>e.filter(e=>!e?.entity?.isEmail).map(e=>e.value);var ez=a(0x11c82607b),eK=a(0x1ead02bc1),e$=a(0x20e4cf8eb);let eY=(0,ez.Ay)("checks for membership info for members from some options",(e,t,{channel:a,options:n,isAbleToIssueAtLeastOneInvitationType:r})=>{let i=get_user_ids_from_options(n);return e((0,e$.z)({channelId:a.id,userIds:i})).then(t=>{let n=t?.membershipInfo||{};return i.forEach(t=>{let i=n[t],l=!!(i?.isKnown&&i?.isMember),o=!!(t&&e((0,eK.A)({channelId:a.id,memberId:t,isComingFromAddPeopleModal:!0,isAbleToIssueAtLeastOneInvitationType:r})).ok);n[t]={...i,isKnownMember:l,canMemberJoinChannel:o}}),n})});eY.meta={name:"getChannelMembershipInfoFromOptions",key:"createThunkGetChannelMembershipInfoFromOptions",description:"checks for membership info for members from some options"};let eQ=new _.Ay("channel_invite"),get_channel_invite_exception_reason=({errorKey:e,currentMemberIsAdmin:t})=>{if(!e)return"";let a=t?eQ.t("Cannot be added here"):eQ.t("Only admins can add");return({[eA.rI.alreadyInChannel]:eQ.t("Already in this channel"),[eA.rI.fromAnotherOrg]:eQ.t("From another organization"),[eA.rI.notMemberOfWorkspace]:eQ.t("Not a member of this workspace"),[eA.rI.cannotJoinChannel]:a,[eA.Oe.cannotAddMore]:eQ.t("Cannot add any more entries"),[eA.Oe.noPermission]:eQ.t("No permission"),[eA.rI.requiresAdminApproval]:eQ.t("Requires admin approval")})[e]||""};var eZ=a(0x23255e234),eJ=a(0x16ef98cf),eX=a(0x4f725d55),e0=a(0xd2fa49d0),e1=a(0xca924ee1),e2=a(0x3711e82d);let clogTokenUpdate=(e,t,{token:a,inputMethod:n,action:r})=>{let i,{key:l,fromMetadata:o}=a,{tokenType:s,tokenInputType:c}=a.isError?{tokenType:"error",tokenInputType:"error"}:a?.isUnknown?{tokenType:"ambiguous",tokenInputType:"ambiguous"}:a?.entity?.isEmail?{tokenType:(0,w.nt)(a)?"internal_email":"external_email",tokenInputType:"email"}:isExternalMember(a)?{tokenType:"external_member",tokenInputType:"username"}:(0,w.oJ)(a)?{tokenType:"internal_user",tokenInputType:"username"}:(0,w._h)(a)?{tokenType:"usergroup",tokenInputType:"username"}:{tokenType:"other",tokenInputType:"other"};t.track(e2.EventId.INVITE_CHANNEL,{contexts:{channel_invite_token_type:s,channel_invite_token_input_type:c,channel_invite_token_input_method:n,channel_invite_token_action:r,channel_invite_token_from_metadata:o,channel_invite_token_error:((a.isError||a.isDisabled)&&(i=a.inviteExceptionReason?a.inviteExceptionReason:a.searcher?a.searcher.isError?"Search error":a.searcher.results?.length?"Unknown":"No search results":"Option not searched"),i),channel_invite_token_id:l,tracking_id:e,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.IMPRESSION,ui_properties:{element_type:e2.ElementType.INPUT,element_name:e2.UiElement.INTERNAL_INVITE_FIELD}}}})},e4=(0,e1.A)((e,t)=>({clogDefaultChannelOptionsImpression:()=>{var e;return e=0,void t.track(e2.EventId.CHANNEL_INVITE_MODAL,{contexts:{ui_context:{action:e2.UiAction.IMPRESSION,ui_properties:{element_name:"DEFAULT_CHANNEL_OPTIONS"}}}})},clogModalImpression:e=>((e,t,{channel:a})=>{t.track(e2.EventId.CHANNEL_INVITE_MODAL,{source:"channel_invite_modal",contexts:{ui_context:{action:e2.UiAction.IMPRESSION}},channel_id:a.id,funnel_step_number:eJ.gQ.Initial})})(0,t,e),clogModalEntrypointImpression:a=>((e,t,{entryPoint:a})=>{t.track(e2.EventId.CHANNEL_CREATE_FLOW,{contexts:{family:"channel",tracking_id:e,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.IMPRESSION,entry_point:a}}})})(e,t,a),clogSkipInviteToWorkspace:()=>{var a;return a=e,void t.track(e2.EventId.CHANNEL_CREATE_FLOW,{contexts:{family:"channel",tracking_id:a,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,is_primary_cta:!0,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"skip"}}}})},clogSubmitInvite:()=>{var e;return e=0,void t.track(e2.EventId.CHANNEL_CREATE_FLOW,{contexts:{family:"channel",is_primary_cta:!0,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"add"}}}})},clogSubmitEmailInvite:e=>((e,t,{channel:a,eventId:n,tokens:r})=>{let i,{members:l,userGroups:o}=getInviteeOptionsByEntityType(r),{internalEmails:s,externalEmails:c}=(i={internalEmails:[],externalEmails:[]},r.forEach(e=>{(0,w.wX)(e)&&((0,w.nt)(e)?i.internalEmails.push(e):(0,w.tT)(e)&&i.externalEmails.push(e))}),i);t.track(n,{contexts:{ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"add"}}},number_of_users:l.length,number_of_user_groups:o.length,number_of_internal_emails:s.length,number_of_external_emails:c.length,channel_id:a.id,funnel_step_number:eJ.gQ.Initial})})(0,t,e),clogCloseModal:()=>{var a;return a=e,void t.track(e2.EventId.CHANNEL_CREATE_FLOW,{contexts:{family:"channel",tracking_id:a,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"esc"}}}})},clogCopyShareableLink:()=>{var a;return a=e,void t.track(e2.EventId.CHANNEL_CREATE_FLOW,{contexts:{tracking_id:a,is_primary_cta:!0,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"copy_shareable_link"}}}})},clogUpdateInviteInput:()=>{var e;return e=0,void t.track(e2.EventId.CHANNEL_CREATE_FLOW,{contexts:{family:"channel",ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.ENTER_TEXT,ui_properties:{element_type:e2.ElementType.INPUT,element_name:"internal_invite_field"}}}})},clogTokensLoadedPerf:a=>((e,t,{loadingStartCount:a,loadDuration:n})=>{t.track(e2.EventId.INVITE_CHANNEL_TOKENS_LOADED_PERF,{contexts:{tracking_id:e,channel_invite_internal_total_token_count:a,perf:{elapsed_time:n},ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.IMPRESSION}}})})(e,t,a),clogRemoveErrors:a=>((e,t,{errorType:a,removeCount:n})=>{let r;switch(a){case eA.rI.alreadyInChannel:r=e2.UiElement.REMOVE_ALREADY_IN_CHANNEL_ERRORS;break;case eA.rI.singleChannelGuest:r=e2.UiElement.REMOVE_SINGLE_CHANNEL_GUEST_ERRORS;break;case eA.rI.guestNotOnWorkspace:r=e2.UiElement.REMOVE_GUEST_NOT_ON_WORKSPACE_ERRORS;break;default:r=e2.UiElement.REMOVE_ERRORS}t.track(e2.EventId.INVITE_CHANNEL,{contexts:{channel_invite_error_token_remove_count:n,tracking_id:e,ui_context:{step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:r}}}})})(e,t,a),clogDeleteToken:a=>((e,t,{token:a})=>{let n=a?.pasted||a?.fromUnknown?"pasted":"typed";clogTokenUpdate(e,t,{token:a,inputMethod:n,action:"deleted"})})(e,t,a),clogInviteToWorkspaceImpression:()=>{var e;return e=0,void t.track(e2.EventId.CHANNEL_INVITE_MODAL,{source:"channel_invite_modal",contexts:{ui_context:{action:e2.UiAction.IMPRESSION,ui_properties:{element_name:"external_invite_footer",element_type:e2.ElementType.BUTTON}}}})},clogTokenUpdate:a=>clogTokenUpdate(e,t,a),clogBulkAddOptionsRadioClick:e=>((e,t,{value:a})=>{t.track(e2.EventId.CHANNEL_INVITE_MODAL,{contexts:{ui_context:{action:e2.UiAction.CLICK,ui_properties:{element_name:"DEFAULT_CHANNEL_OPTIONS",element_type:e2.ElementType.RADIO,element_value:a}}}})})(0,t,e),clogToggleChannelAsDefault:e=>((e,t,{checked:a})=>{t.track(e2.EventId.CHANNEL_INVITE_MODAL,{contexts:{ui_context:{action:e2.UiAction.CLICK,ui_properties:{element_name:"DEFAULT_CHANNEL_OPTIONS",element_type:e2.ElementType.CHECKBOX,element_value:a}}}})})(0,t,e),clogCopyPastedTokenLoaded:a=>((e,t,{selectedOption:a})=>{a?.pasted&&clogTokenUpdate(e,t,{token:a,inputMethod:"pasted",action:"loaded"})})(e,t,a)}));var e5=a(0x238b287cf),e3=a(0x1ccf28882),e6=a(0x144f7fd51);let e8=(0,ez.Ay)("Determine whether a member is an existing member of a workspace associated with a channel",(e,t,{member:a,channel:n})=>{let r=t();return(0,e6.S)(r,a,n)});e8.meta={name:"isMemberOnSomeChannelWorkspace",key:"createThunkIsMemberOnSomeChannelWorkspace",description:"Determine whether a member is an existing member of a workspace associated with a channel"};var e7=a(0xe69dbb22),e9=a(0xf159cb74),te=a(0x100fb9ff5),tt=a(0x61f75169),ta=a(0x475c9cfe);let tn=(0,ez.Ay)("Determine whether a user group exists on a workspace associated with a channel",(e,t,{userGroupId:a,channel:n})=>{let r=t(),i=(0,e7.PG)(r),l=(0,ta.lJ)(r,a);if(i&&l&&(0,tt.dq)(l)||(0,H.S)(n))return!0;if((0,te.t)(n))return(0,O.R)(r,n).some(e=>!(0,ta.dk)(r,a,e));let o=(0,e9.c)(n);return!(0,ta.dk)(r,a,o)});tn.meta={name:"isUserGroupOnSomeChannelWorkspace",key:"createThunkIsUserGroupOnSomeChannelWorkspace",description:"Determine whether a user group exists on a workspace associated with a channel"};let tr=new _.Ay("channel_invite"),ChannelInviteForm=e=>{let{addMemberMode:t=eF.D.SpecificMembers,allowEmails:a=!1,allowUserGroups:n=!0,canUserInviteToWorkspace:r=!1,channel:i,currentMemberIsAdmin:o,error:s,isAbleToIssueAtLeastOneInvitationType:c,onFilterQueryChange:d,onFilterQueryPaste:m,onInputFocused:u,onInviteToTeam:p,onKeyDown:h,onSelectedItemsChange:_,setShouldSetChannelAsDefault:f,setAddMemberMode:b,shouldSetChannelAsDefault:g=!1,shouldShowBulkAddControls:y=!1,shouldShowDefaultChannelCreationControls:A=!1,teamMemberCount:x=0,trackingId:C,entryPoint:S}=e,I=(0,ev.wA)(),[w,T]=(0,l.useState)(t),[N,M]=(0,l.useState)(new Date().getTime().toString()),[R,P]=(0,l.useState)(!1),{invitees:L,counts:O}=useInviteesFromChannelInviteContext(),{unknownCount:D,loadingCount:F,errorCount:B}=O,H=(({selectedMembers:e})=>e.length>=eB.xD)({selectedMembers:L}),W=(0,k.d4)(e=>(0,G.NU)(e,i)),V=(0,k.d4)(e=>(0,U.R)(e,i)),q=(0,k.d4)(v.H7),j=(0,$.r7)(q),z=(0,k.d4)(ea.Ts),K=useCanUserInviteEntityToChannel(i),{clogBulkAddOptionsRadioClick:Y,clogCopyPastedTokenLoaded:Q,clogDeleteToken:Z,clogInviteToWorkspaceImpression:J,clogToggleChannelAsDefault:X,clogTokenUpdate:ee}=e4(C,(0,e5.A)());(0,l.useEffect)(()=>{r&&J()},[r,J]),(0,l.useEffect)(()=>{M(new Date().getTime().toString())},[w]);let et=(0,l.useCallback)(()=>{J(),p()},[J,p]),en=(0,l.useCallback)(()=>{f(!g),X({checked:g})},[X,f,g]),er=(0,l.useCallback)(e=>{let{value:t}=e.target;Y({value:t}),b(t),f(t===eF.D.AllMembers),T(t)},[Y,b,f]),ei=(0,l.useCallback)(e=>{let t,a,n=e.length-L.length;1===n?(t=(0,eS.A)(L,"key"),(a=(0,eI.A)(e,({key:e})=>!t[e]))&&(!a.pasted||a.fromMetadata)&&ee({token:a,inputMethod:a.pasted?"pasted":"typed",action:"resolved"})):n<0?(t=(0,eS.A)(e,"key"),(a=(0,eI.A)(L,({key:e})=>!t[e]))&&Z({token:a})):n>1?(t=(0,eS.A)(L,"key"),e.forEach(e=>{!t[e.key]&&e.fromMetadata&&ee({token:e,inputMethod:"pasted",action:"loaded"})})):(t=(0,eS.A)(L,"key"),(a=(0,eI.A)(e,({key:e,fromUnknown:a})=>!!a&&!!t[e]?.isUnknown))&&ee({token:a,inputMethod:"pasted",action:"resolved"}))},[Z,ee,L]),el=(0,l.useCallback)(e=>{let t=(0,eS.A)(L,"key"),a=e.find(e=>!t[e?.key]),n=e;if(a?.fromUnknown){let t=L.find(e=>e?.isUnknown&&a?.key?.startsWith(e?.queryId??""));t&&t.key&&(n=e.filter(e=>e?.key!==t?.key))}ei(n),_(n),1===n?.length&&n?.[0]?.entity?.isEmail?P?.(!0):P?.(!1)},[ei,_,L]),eo=(0,k.d4)(eV.ke),es=(0,l.useCallback)((e,t)=>{let a=e.value,n=I(tn({userGroupId:a,channel:i})),r=e.entity||I((0,eN.A)(a)),l=(0,eT.NB)(r),s=e;!e.entity&&(0,eX.A)(a)&&(s={...e,entity:r});let c=(({canInviteExternalMembersToChannel:e,isMemberOnSomeChannelTeam:t,isInviteLimitReached:a,isUserGroupFromAnotherTeam:n,member:r,membershipInfoMap:i,option:l,isEnterprise:o,entryPoint:s,isMCGInvitationAllowedTeamFlag:c})=>{let d=l.value;if(a&&!l.fromUnknown)return eA.$C.limitReached;if(!d)return eA.$C.missingEntity;if((0,e0.A)(d)&&n)return eA.$C.userGroupFromAnotherTeam;if(s!==eJ.kP.CanvasTemplate&&(0,eX.A)(d)&&i[d]){let{isKnownMember:a=!1,canMemberJoinChannel:n=!1}=i[d];return(({canMemberJoinChannel:e,canInviteExternalMembersToChannel:t,isKnownMember:a,member:n,isMemberOnSomeChannelTeam:r,isEnterprise:i,isMCGInvitationAllowedTeamFlag:l})=>{if(a)return eA.$C.memberAlreadyInChannel;if((0,eT.po)(n))return eA.$C.memberIsBot;if(((0,eZ.Ez)(n)||(0,eZ.Yd)(n))&&!r)return eA.$C.memberIsGuestNotOnWorkspace;if((0,eZ.Yd)(n)&&r)return l?eA.$C.memberExceptionSingleChannelGuestWithApproval:eA.$C.memberIsSingleChannelGuest;if(!e)return(0,eg.g)(n)?eA.$C.memberFromAnotherOrg:i&&!r?eA.$C.memberNotOnWorkspace:eA.$C.memberExceptionDefault;if((0,eg.g)(n)&&!t)return eA.$C.memberNeedsPermission;if(!(0,eg.g)(n)&&t&&!r)return eA.$C.memberNotOnWorkspaceButAllowed;return eA.$C.default})({isKnownMember:a,canMemberJoinChannel:n,canInviteExternalMembersToChannel:e,isMemberOnSomeChannelTeam:t,member:r,isEnterprise:o,isMCGInvitationAllowedTeamFlag:c})}return eA.$C.default})({canInviteExternalMembersToChannel:W,isMemberOnSomeChannelTeam:V||l&&I(e8({member:r,channel:i})),isInviteLimitReached:H,isUserGroupFromAnotherTeam:!n,member:l?r:null,membershipInfoMap:t,option:s,isEnterprise:j,entryPoint:S,isMCGInvitationAllowedTeamFlag:eo}),{formError:d,optionError:m,secondaryContentKey:u}=eA.SM[c],p=get_channel_invite_exception_reason({errorKey:m,currentMemberIsAdmin:o}),h=get_channel_invite_exception_reason({errorKey:u,currentMemberIsAdmin:o});return{...s,error:d,isError:!!(d||m),isDisabled:!!p,inviteExceptionReason:p,secondaryContent:h,hoverText:p,...eo&&{isMemberError:!!(d||m),isError:!1}}},[W,V,o,I,j,H,S,i,eo]),ec=(0,l.useCallback)(async e=>get_user_ids_from_options(e).length?I(eY({channel:i,options:e,isAbleToIssueAtLeastOneInvitationType:c})).then(t=>e.reduce((e,a)=>(K(a)&&e.push(es(a,t)),e),[])):Promise.resolve(e),[K,i,I,c,es]),ed=r&&!(B+F+D)&&!a,em=(0,k.d4)(e=>(0,e3.p)(e,i)),eu=em.length-4,ep=(0,l.useMemo)(()=>em.slice(0,4).map(e=>l.createElement(E.A,{id:e,key:e})),[em]),eh=eu>0?tr.rt("People from <strong>{allowedOrgList} and {remainingAllowedOrgsCount, plural, =1 {# other collaborating organization} other {# other collaborating organizations}}</strong> can be invited to channels in this Slack Connect space.",{allowedOrgList:(0,ew.A)(ep,{noConj:!0,strong:!0}),remainingAllowedOrgsCount:eu}):tr.rt("People from <strong>{allowedOrgList}</strong> can be invited to channels in this Slack Connect space.",{allowedOrgList:(0,ew.A)(ep,{strong:!0})});return l.createElement("div",{className:z?"margin_bottom_125":"margin_bottom_100","data-qa":"channel_invite_form"},s&&l.createElement(ChannelInviteFormInlineError,{error:s}),V&&l.createElement("p",null,eh),l.createElement(ChannelInviteFormInput,{onBulkAddOptionsRadioClick:er,onToggleChannelAsDefault:en,inputId:N,isDisabled:z&&w===eF.D.AllMembers,onSearchResolved:Q,onSelectedItemsChange:el,processOptions:ec,addMemberMode:t,addMemberModeSelection:w,allowEmails:a,allowUserGroups:n,channel:i,shouldSetChannelAsDefault:g,shouldShowBulkAddControls:y,shouldShowDefaultChannelCreationControls:A,teamMemberCount:x,onFilterQueryChange:d,onFilterQueryPaste:m,onInputFocused:u,onKeyDown:h}),(H||ed||R)&&l.createElement(ChannelInviteFormInputSubtext,{isInviteLimitReached:H,onClickInviteToTeam:et,shouldInviteToWorkspace:ed,channel:i}))};ChannelInviteForm.displayName="ChannelInviteForm";var ti=a(0x1d24ec95f),tl=a(0x161b91aba);let to={knownUnConnectedMemberTeams:[],knownConnectedMemberTeams:[]};var ts=a(0x1cbdfeceb),tc=a(0xe0376d2),td=a(0x21f3c49e8),tm=a(0x15f8e452a),tu=a(0x15279822),tp=a(0x4c96e5d9);let th=new _.Ay("channel_invite"),getTokenStringsList=({tokenStrings:e,isTruncated:t})=>{if(e.length<=2)return e.join(", ");let[a,n]=e,r=e.length-2;return t?th.t("{firstEmail}, {secondEmail} {overflowEmailsCount, plural, =1 {and # other} other {and # others}}",{firstEmail:a,secondEmail:n,overflowEmailsCount:r}):th.t("{emailList} and {lastEmail}",{emailList:e.slice(0,-1).join(", "),lastEmail:e.slice(-1)})},t_=new _.Ay("channel_invite"),EmailInviteList=({className:e="",emails:t=[],toggleExpandEmailList:a,isEmailListExpanded:n})=>{let r=(0,l.useRef)(null);if((0,l.useLayoutEffect)(()=>{null!==r.current&&(0,tu.Fp)(r.current)?.focus()},[n]),0===t.length)return null;let renderExpandedEmailList=()=>l.createElement(l.Fragment,null,l.createElement("span",{"data-qa":"email_invite_list_expanded_content"},getTokenStringsList({tokenStrings:t,isTruncated:!1}))," ",l.createElement(eq.A,{onClick:a,"data-qa":"email_invite_list_collapse_button","aria-expanded":"true"},t_.t("Show less")));renderExpandedEmailList.displayName="renderExpandedEmailList";let renderCollapsedEmailList=()=>{let e;if(t.length<3)e=t.join(", ");else{let n,[r,i]=t,[o]=t.slice(-1),s=t.length-2-25,c=t.length>27;n=3===t.length?o:c?t_.t("{tooltipEmailList} {tooltipOverflowEmailsCount, plural, =0 {} =1 {and # other} other {and # others}}",{tooltipEmailList:t.slice(2,27).join(", "),tooltipOverflowEmailsCount:s}):t_.t("{tooltipEmailList} and {lastEmail}",{tooltipEmailList:t.slice(2,-1).join(", "),lastEmail:t.slice(-1)});let d=t.length-2;e=t_.rt("{firstEmail}, {secondEmail} {overflowEmailsCount, plural, =1 {and <a># other</a>} other {and <a># others</a>}}",{firstEmail:r,secondEmail:i,overflowEmailsCount:d,"<a>":({text:e})=>l.createElement(tp.Ay,{tipClassName:"p-comprehensible_invites--emails_tooltip",tip:n,"data-qa":"email_invite_list_tooltip_content"},l.createElement(eq.A,{onClick:a,"data-qa":"email_invite_list_expand_button","aria-expanded":"false"},e))})}return l.createElement("span",{"data-qa":"email_invite_list_collapsed_content"},e)};renderCollapsedEmailList.displayName="renderCollapsedEmailList";let i=m()(e,{padding_bottom_100:n});return l.createElement("div",{ref:r,className:i},n&&t.length>2?renderExpandedEmailList():renderCollapsedEmailList())};EmailInviteList.displayName="EmailInviteList";var tf=a(0x2376ea9bb);let TeamInviteList=({className:e,teamInviteLists:t,toggleExpandList:a=ts.A,isListExpanded:n={}})=>{if((0,td.A)(t))return null;let r=Object.values(t);return l.createElement(l.Fragment,null,r.map(({teamSummary:t,inviteList:r})=>l.createElement("div",{key:t.id,className:e},l.createElement(tf.A,{className:"margin_right_50 inline_block p-invite_list--team-icon",team:t,size:18}),l.createElement("strong",null,l.createElement(E.A,{team:t}),":"," "),l.createElement(EmailInviteList,{className:"inline margin_bottom_0 padding_bottom_0",emails:r,toggleExpandEmailList:()=>a(t.id),isEmailListExpanded:n[t.id]}))))};TeamInviteList.displayName="TeamInviteList";var tb=((n={}).OTHER_TEAM="OTHER_TEAM",n),tg=a(0x1403dc2ee),ty=a(0x244f35bf8),tA=a(0x6497d5b5);let mergeArrays=(e,t)=>{if((0,ty.A)(e))return e.concat(t)},mergeDuplicateTeamsInInviteLists=(e,t)=>(0,tA.A)({},e,t,mergeArrays),tx=new _.Ay("channel_invite"),ComprehensibleInviteList=({teamExternalMembers:e,primaryScTeamEmails:t,inviteEmails:a,toggleExpandList:n=ts.A,isListExpandedByTeamId:r={}})=>{let i=a?.map(e=>e.split("@")[1])||[],o=(0,tc.A)(i).length,s=mergeDuplicateTeamsInInviteLists(e,t);return l.createElement("div",{className:"margin_bottom_100","data-qa":tg.Kz.List},s&&!(0,td.A)(s)&&l.createElement(TeamInviteList,{className:"margin_bottom_50",teamInviteLists:s,toggleExpandList:n,isListExpanded:r}),!!a?.length&&l.createElement("div",{className:"margin_bottom_50","data-qa":tg.Kz.ExternalEmails},l.createElement("div",{className:"margin_right_50 p-invite_list--external-email-icon"},l.createElement(tm.A,{type:"building",size:"inherit"})),l.createElement("strong",{"data-qa":tg.Kz.ExternalEmailCopy},tx.t("{unqiueExternalDomainCount, plural, =1 {From another company} other {From other companies}}: ",{unqiueExternalDomainCount:o})),l.createElement(EmailInviteList,{className:"inline",emails:a,toggleExpandEmailList:()=>n(),isEmailListExpanded:r[tb.OTHER_TEAM]})))};ComprehensibleInviteList.displayName="ComprehensibleInviteList";let tE=new _.Ay("channel_invite");function ComprehensibleInviteListExternalLimitedWrapper({children:e}){return l.createElement("div",{className:"margin_bottom_100","data-qa":"comprehensible_invite_list_external_limited"},e)}function getUserNames(e){return Object.values(e).flatMap(({inviteList:e})=>e)}ComprehensibleInviteListExternalLimitedWrapper.displayName="ComprehensibleInviteListExternalLimitedWrapper";let ComprehensibleInviteListExternalLimited=({inviteEmails:e=I.Ml,knownConnectedMemberTeams:t,knownUnConnectedMemberTeams:a,isChannelExternallyShared:n=!1})=>{if(!(0,k.d4)(tl.Tv))return null;let r=e.length,i=getUserNames(t),o=getUserNames(a),getCopyParameters=e=>({people:e.length,person1:e[0],person2:e[1],tooltip:e.length>2&&l.createElement(tl.Gx,{people:e})}),getCopyCanSetPermissions=e=>r||1!==a.length?tE.rt("{people, plural, =1 {<strong>{person1}</strong> is from an external organization that isn\u2019t} =2 {<strong>{person1}</strong> and <strong>{person2}</strong> are from external organizations that aren\u2019t} other {{tooltip} are from external organizations that aren\u2019t}} in this channel yet, so you need to set permissions.",getCopyParameters(e),tl.XN):tE.rt("{people, plural, =1 {<strong>{person1}</strong> is} =2 {<strong>{person1}</strong> and <strong>{person2}</strong> are} other {{tooltip} are}} from an external organization that isn\u2019t in this channel yet, so you need to set permissions.",getCopyParameters(e),tl.XN);return n?o.length?l.createElement(ComprehensibleInviteListExternalLimitedWrapper,null,getCopyCanSetPermissions(o),i.length+r>0&&l.createElement("div",{className:"margin_top_200"},tE.t("You\u2019ll get a chance to review everyone else\u2019s permissions after they accept their invitations."))):l.createElement(ComprehensibleInviteListExternalLimitedWrapper,null,i.length>0&&l.createElement("div",{className:"margin_bottom_100"},r?tE.rt("{people, plural, =1 {<strong>{person1}</strong> is from an external organization that\u2019s} =2 {<strong>{person1}</strong> and <strong>{person2}</strong> are from external organizations that are} other {{tooltip} are from external organizations that are}} already in this channel, so they\u2019ll have the same permissions as other people on their team.",getCopyParameters(i),tl.XN):1===t.length?tE.rt("{people, plural, =1 {<strong>{person1}</strong> is} =2 {<strong>{person1}</strong> and <strong>{person2}</strong> are} other {{tooltip} are}} from an external organization that\u2019s already in this channel, so they\u2019ll have the same permissions as other people on their team.",getCopyParameters(i),tl.XN):tE.rt("Nice \u2014 these {people} people are from external organizations that already have permission set for this channel. You can change this anytime after they accept their invitations.",{people:i.length},tl.XN)),r>0&&tE.rt("{people, plural, =1 {<strong>{person1}</strong> is from an external organization} =2 {<strong>{person1}</strong> and <strong>{person2}</strong> are from external organizations} other {{tooltip} are from external organizations}} that we don\u2019t recognize. Don\u2019t worry, this happens sometimes. You can review their permissions once they accept the invitation.",getCopyParameters(e),tl.XN)):l.createElement(ComprehensibleInviteListExternalLimitedWrapper,null,getCopyCanSetPermissions([...o,...e]))};ComprehensibleInviteListExternalLimited.displayName="ComprehensibleInviteListExternalLimited";var tC=a(0xe739523);let tk=new _.Ay("channel_invite");function ComprehensibleInviteTeamPermissions({channel:e,className:t,invitedTeam:a}){let n=(0,k.d4)(tl.Tv),r=(0,k.d4)(t=>(0,tC.A)(t,a?.teamSummary?.id,e));return n?l.createElement("div",{className:t},l.createElement("div",{className:"margin_bottom_50"},l.createElement("strong",null,tk.t("People from this external organization can:"))),l.createElement("div",null,r?tk.t("Only post messages in the channel. They can\u2019t use workflows or apps."):tk.t("Access the channel, including the ability to post, use apps and workflows, and invite other people. After you\u2019re done collaborating, they\u2019ll get to keep a copy of the channel history."))):null}ComprehensibleInviteTeamPermissions.displayName="ComprehensibleInviteTeamPermissions";var tv=((r={}).Initial="initial",r.ConfirmationScreen="confirmation_screen",r.InviteTypeScreenExternal="invite_type_screen_external",r.InviteTypeScreenExternalPrimaryScIdentity="invite_type_screen_primary_sc_identity_external",r.InviteTypeScreenInternal="invite_type_screen_internal",r.InviteTypeScreenOrgMember="invite_type_screen_org_member",r.SharedChannelNoteScreenExternal="shared_channel_note_screen_external",r.SharedChannelNoteScreenInternal="shared_channel_note_screen_internal",r.ExternalLimitedMemberScreenExternal="external_limited_member_screen_external",r.ExternalLimitedMemberScreenInternal="external_limited_member_screen_internal",r.SelectWorkspace="select_workspace",r),tS=a(0x5b24a5bc),tI=a(0x20e80190e),tw=a(0x1fcbb004d);let tT=new _.Ay("shared_channels_invite"),ExternalLimitedMemberScreen=({isExternalLimited:e,externalEmails:t,internalEmails:a,primaryScTeamEmails:n,teamExternalMembers:r,channel:i,addToChannelStage:s,effectiveTokenStrings:c,onRadioChange:d,onStepBack:m,onSubmit:u,onToggle:p,processingExternalEmails:h,toggleExpandList:_,isEmailListExpanded:f,isListExpandedByTeamId:b,isFinalStageOfComprehensibleFlow:g,onCloseModal:y})=>{let A=(0,ev.wA)(),x=(0,k.d4)(e=>(0,Z.Cy)({state:e})),E=(0,k.d4)(tl.Tv),{knownConnectedMemberTeams:C,knownUnConnectedMemberTeams:v,showSelectionOptions:S}=(({channel:e,teamInviteLists:t})=>{let a=(0,k.d4)(tl.Tv),{knownUnConnectedMemberTeams:n,knownConnectedMemberTeams:r}=(0,k.d4)(n=>a?((e,t,a)=>{let n=(0,P.A)(e,t),[r,i]=(0,ti.A)(Object.values(a),e=>n.includes(e?.teamSummary?.id));return{knownConnectedMemberTeams:r,knownUnConnectedMemberTeams:i}})(n,e,t??I.t0):to),i=(0,j.ju)(e),o=!a||!i||!!n.length&&!!i;return(0,l.useMemo)(()=>({showSelectionOptions:o,knownConnectedMemberTeams:r,knownUnConnectedMemberTeams:n}),[o,r,n])})({channel:i,teamInviteLists:mergeDuplicateTeamsInInviteLists(r,n)}),w=(0,l.useCallback)(()=>{A((0,tw.O)())},[A]);(0,l.useEffect)(()=>{let e=h?eE.Cz.OpenSharedChannelExternalLimitedExternal:eE.Cz.OpenSharedChannelExternalLimitedInternal;x.count(e)},[x,h]);let T=(0,l.useMemo)(()=>({back:{elementName:eJ.CH.BackButton},submit:{elementName:eJ.CH.NextButton,emailCount:c.length,wasExternalLimitedToggled:e}}),[c.length,e]),N=E?tT.t("Channel permissions"):tT.t("Inviting with Slack Connect");function getCtaText(){return g?tT.rt("Send {count, plural, =1 {Invitation} other {Invitations}}",{count:c.length}):tT.t("Next")}let M=(0,j.ju)(i),R=s===tv.ExternalLimitedMemberScreenExternal?t:a,L=E&&!S&&!R.length&&1===C.length,renderEmailInviteList=()=>E?l.createElement(ComprehensibleInviteListExternalLimited,{inviteEmails:R,isChannelExternallyShared:M,knownConnectedMemberTeams:C,knownUnConnectedMemberTeams:v}):l.createElement(ComprehensibleInviteList,{teamExternalMembers:r,primaryScTeamEmails:n,inviteEmails:R,toggleExpandList:_,isListExpandedByTeamId:b});return renderEmailInviteList.displayName="renderEmailInviteList",l.createElement(o.A,{eventId:e2.EventId.COMPREHENSIBLE_INVITES,uiStep:e2.UiStep.SHARED_CHANNEL_EXTERNAL_LIMITED,channelId:i.id,funnelStepNumber:h?eJ.gQ.SharedChannelExternalLimitedExternal:eJ.gQ.SharedChannelExternalLimitedInternal},l.createElement(tI.dW,{closeModal:y||w,"data-qa":"shared_channel_external_limited_screen_content",className:"p-comprehensible_invites_base_modal--no_min_height",shouldReturnFocusAfterClose:!1,contentLabel:`${N} ${getTokenStringsList({tokenStrings:c,isTruncated:!f})}`},l.createElement(tI.rQ,null,l.createElement(tI.Rc,{id:"p-comprehensible-invites-header",className:"p-comprehensible_invites_header_title",title:N})),l.createElement(tI.$m,{showScrollIndicatorBottom:!1,className:"p-comprehensible_invites--email_list_content"},l.createElement(tI.qf,{className:"p-comprehensible_invites--email_list_content_section"},renderEmailInviteList()),L&&l.createElement(ComprehensibleInviteTeamPermissions,{channel:i,invitedTeam:C[0],className:"p-comprehensible_invites_invite_type_modal_body padding_top_150 padding_left_150 padding_right_150 full_width"})),l.createElement(tS.a,{buttonAutoClogProps:T,contentClassName:"p-comprehensible_invites_invite_type_modal_body p-comprehensible_invites_content_section_grow",contentSectionClassName:"p-comprehensible_invites_content_section",footerClassName:"p-comprehensible_invites_invite_type_modal_footer",isExternalLimited:e,legendText:(()=>{if(!E)return;let e=!R.length&&1===v.length&&v[0]?.teamSummary?.name;return e?tT.rt("External people from {organization} can:",{organization:l.createElement(l.Fragment,null,e)}):tT.t("External people from {count, plural, =1 {this organization} other {these organizations}} can:",{count:v.length+R.length})})(),onRadioChange:d,onBackClick:m,onSubmitClick:u,onToggle:p,submitButtonText:getCtaText(),showSelectionOptions:S})))};ExternalLimitedMemberScreen.displayName="ExternalLimitedMemberScreen";var tN=a(0x1f022ebd9),tM=a(0x8c8bafa3),tR=a(0x1a256ff50),tP=a(0x102edf836),tL=a(0x11a296110),tO=a(0x45bd075),tD=a(0x1d57b7d4c),tF=a(0x1faa3f1ac),tU=a(0x2343fde45),tB=a(0x10079cc7),tH=a(0x91e15f37);let tW=tB.ZO.PaidFeatureTrial,tV=tB.zG.SharedChannels,getSlackConnectTrialStatus=e=>{let t=(0,v.H7)(e),a=(0,K.tc)(t),n=(0,tH.hq)(e,tW,tV),r=(0,tH.iH)(e);return a?n?eJ.Rw.TrialEligible:eJ.Rw.TrialIneligible:r?eJ.Rw.TrialActive:void 0};var tG=a(0xf931c21);let BaseInviteTypeRadioLabel=({className:e,htmlFor:t,imageSource:a,title:n,description:r,isSelected:i,isDisabled:o=!1,radio:s,showTrialInfo:c,disabledCopy:d,hasKeyboardFocus:u,onFocus:p,onBlur:h})=>{let _=(0,k.d4)(getSlackConnectTrialStatus),f=m()("p-invite_type_radio_label__radio",e,{"p-add_to_slack_radio--disabled":o,"p-invite_type_radio_label--focus-visible":u}),b=m()("p-invite_type_radio_label__icon",{sk_highlight:i,"p-invite_type_radio_label__icon--disabled":o});return l.createElement("label",{htmlFor:t,className:f,"data-qa":"invite-type-radio-label"},l.createElement("div",{className:"p-invite_type_radio_label__image_wrapper"},l.createElement("img",{src:a,alt:"","data-qa":"invite-type-radio-image"})),l.createElement("div",{className:"padding_100"},l.cloneElement(s,{onFocus:p,onBlur:h}),l.createElement("div",{className:"p-invite_type_radio_label__button_container"},l.createElement("span",{className:"p-invite_type_radio_label__icon_container"},l.createElement(tm.A,{type:o?"disable":i?"radio-selected":"form-radio-empty",className:b,"data-qa":"invite-type-radio-icon",inline:!0})),l.createElement("div",{className:"p-invite_type_radio_label__radio_description_container"},l.createElement("div",{className:"display_flex"},l.createElement("span",{className:"p-invite_type_radio_label__title","data-qa":"invite-type-radio-title"},n),_&&c&&l.createElement(tG.A,{"data-qa":"invite-type-pro-badge",promoType:tB.ZO.PaidFeatureTrial,promoSubtype:tB.zG.SharedChannels,uiComponentVariant:e2.UiComponentVariant.COMPREHENSIBLE_INVITES})),l.createElement("span",{className:"sk_dark_gray p-invite_type_radio_label__description","data-qa":"invite-type-radio-description"},r)))),o&&!!d&&l.createElement("div",{className:"p-invite_type_radio_label__disabled_text padding_125","data-qa":"invite-type-radio-disabled-copy"},d))};BaseInviteTypeRadioLabel.displayName="BaseInviteTypeRadioLabel";let tq=(0,tU.A)(BaseInviteTypeRadioLabel);var tj=a(0xc3827e91),tK=a(0x120b6eb39),t$=a(0x20e77676b),tY=a(0x1850f230e),tQ=a(0x21fb96b74),tZ=a(0x182f7d1a9),tJ=a(0x3022bd61),tX=a(0x7899e273),t0=a(0xbe2be077),t1=a(0x1428e82b3),t2=a(953938),t4=a(0x1c91944c9),t5=a(0x9b971e7e),t3=a(0x1f4ce396),t6=a(0x1209850c6);let t8=a.p+"external-organization-c859cb7.svg",t7=a.p+"your-organization-9105aec.svg",t9=new _.Ay("channel_invite"),ae={elementName:eJ.CH.BackButton,onClick:{enableClogAction:!0}},at={elementName:eJ.CH.ShowSpeedBumpButton,onClick:{enableClogAction:!0}},aa=tB.ew.PAID_FEATURE_TRIAL,BaseInviteTypeScreen=({onCloseModal:e,tokenStrings:t,primaryScTeamEmails:a,effectiveTokenStrings:n,currentTeam:r,currentTeamName:i,canConvertToExternalSharedChannel:s,channel:c,canInviteOrRequestInvites:d,channelConnectionLimit:u,selectedAccessType:p,isEmailListExpanded:h,isListExpandedByTeamId:_,numGroupsToProcess:f,hasMoreSteps:b,addToChannelStage:y,isLegacySharedChannel:x,legacySharedChannelInfo:v,conversationHostTeam:S,isChannelHost:I,reason:w,trialStatus:T,isCheckingTrialInfo:N,isFreeTeam:M,isEnterpriseTeam:R,canUserSeeInviteGuidelinesForChannel:P,isEligibleAutoChargeFeatureTrial:L})=>{let O,D,F,U=useChannelInviteModalContext();if(!U)throw Error("Not within Channel Invite Modal context");let{onStepBack:B,onSubmitComprehensibleInvites:H,setAccessType:V,toggleInvitesList:G}=U,q=y===tv.InviteTypeScreenExternalPrimaryScIdentity,j=y===tv.InviteTypeScreenExternal||q,z=y===tv.InviteTypeScreenOrgMember,$=(0,k.d4)(tQ.a),Y=(0,k.d4)(el.BL),Q=(0,k.d4)(e=>(0,W.J5)({state:e,inviteType:eE.BD.Member,team:r??void 0})),J=(0,k.d4)(e=>(0,Z.Cy)({state:e})),X=(0,l.useRef)(!0);(0,l.useEffect)(()=>()=>{X.current=!1},[]),(0,tN.A)(()=>{let e=j?eE.Cz.OpenInviteTypeExternal:eE.Cz.OpenInviteTypeInternal;J.count(e)},[]),(0,tN.A)(()=>{if(j?s:d)return;let e=j?eE.Cz.InviteTypeExternalDefaultActionDisallowed:eE.Cz.InviteTypeInternalDefaultActionDisallowed;J.count(e)},[]);let ee=(0,l.useRef)(!1);(0,tN.A)(()=>{M&&(ee.current=!0)},[]);let[et,ea]=(0,l.useState)(!1),[en,ei]=(0,l.useState)(!1),[eo,es]=(0,l.useState)(!1),ec=(0,k.d4)(e=>(0,er.Q)(e,"shared_channel_invite_requested",c.id)),ed=(0,k.d4)(e=>(0,C.Q)(e,c)),em=(0,l.useCallback)(()=>{let e=(0,tB.hZ)({entryPoint:"slack_connect_upgrade_to_invite"});(0,K.gC)(r,e,"_blank")},[r]),eu=(0,l.useRef)(""),ep=(0,l.useRef)(null),eh=(0,l.useMemo)(()=>[ep],[ep]),e_=t.length,ef=(0,l.useMemo)(()=>({continueButton:{elementName:eJ.CH.NextButton,onClick:{enableClogAction:!0},selectedAccessType:p,emailCount:e_}}),[p,e_]),eb=(0,l.useMemo)(()=>({cancelButton:{elementName:eJ.CH.CancelSpeedBumpButton,onClick:{enableClogAction:!0}}}),[]),eg=(0,l.useMemo)(()=>({...eb,...ef}),[eb,ef]),ey=(0,l.useMemo)(()=>({continueButton:{elementName:eJ.CH.UpgradeButton,onClick:{enableClogAction:!0}}}),[]),eA=(0,l.useMemo)(()=>({...eb,...ey}),[eb,ey]),ex=(0,l.useCallback)(async()=>{ea(!0),await H(),X.current&&(ei(!1),ea(!1))},[H]),eC=(0,l.useCallback)(async e=>{await ex(),e()},[ex]),{renderLink:ek,shouldDisplayGuidelines:ev}=(0,tK.F)({type:"INVITE",dataQa:"slack_connect_instructions__view_button__from_external_add_people_dead_end_modal",stepVariant:"external_add_people_dead_end_modal",modalHeaderSuffix:"instructions",showCopyButton:!0}),eS=Object.values(a).map(({teamSummary:e})=>e.name),eI=t9.rt("External people from {count, plural, =1 {{externalTeamNames}} other {other companies}} can only be invited using Slack Connect.",{externalTeamNames:eS.join(", "),count:eS.length}),ew=(0,l.useCallback)(()=>q?eI:R&&!ed?t9.rt("You can\u2019t add other people from {currentTeamName} to this channel.",{currentTeamName:i}):t9.rt("To invite a coworker to {currentTeamName}, you\u2019ll need to ask your admins for help.",{currentTeamName:i}),[q,i,R,ed,eI]),eT="confirmation-type",eN=!I,eM=(p===eE.BD.SharedChannel||q)&&!eN||p===eE.BD.Member&&R&&!ed,eR=p===eE.BD.Member&&!q&&!R||p===eE.BD.Member&&R&&ed,eP=!s||z||eN,eD=!d||q||R&&!ed;O=j?e2.UiStep.INVITE_TYPE_EXTERNAL:z?e2.UiStep.INVITE_TYPE_INTERNAL_ORG_MEMBER:e2.UiStep.INVITE_TYPE_INTERNAL,D=j?eJ.gQ.InviteTypeExternal:z?eJ.gQ.InviteTypeInternalOrgMember:eJ.gQ.InviteTypeInternal;let eF=(y===tv.InviteTypeScreenExternal||q)&&j&&!s,eU=(y===tv.InviteTypeScreenInternal||y===tv.InviteTypeScreenOrgMember)&&!j&&!d,eB=eF||eU,eH=T&&T!==eJ.Rw.TrialActive&&T!==eJ.Rw.TrialIneligible&&eM||en,eW=eM&&M&&T&&T===eJ.Rw.TrialIneligible,getTitleCopy=()=>1!==f||z||q?j?t9.t("{count, plural, =1 {This person looks} other {These people look}} like they\u2019re from another company:",{count:e_}):t9.t("{count, plural, =1 {This person looks like they\u2019re a coworker} other {These people look like they\u2019re coworkers}}:",{count:e_}):t9.t("{count, plural, =1 {This person looks new} other {These people look new}}:",{count:e_}),eV=`confirmation-${eE.BD.SharedChannel}`,eG=(0,l.useMemo)(()=>l.createElement(eO.A,{className:"p-add_to_slack_radio__radio",id:eV,name:eT,value:eE.BD.SharedChannel,checked:eM,onChange:()=>V(eE.BD.SharedChannel),disabled:eP,"data-qa":"invite_type_screen_slack_connect_radio_button",autoFocus:!$&&eM,focusOnMount:$&&eM}),[eV,$,eP,eM,V]),eq=`confirmation-${eE.BD.Member}`,ej=(0,l.useMemo)(()=>l.createElement(eO.A,{className:"p-add_to_slack_radio__radio",id:eq,name:eT,value:eE.BD.Member,checked:eR,onChange:()=>V(eE.BD.Member),disabled:eD,"data-qa":"invite_type_screen_coworker_radio_button",autoFocus:!$&&eR,focusOnMount:$&&eR}),[eq,$,eD,eR,V]),ez=l.createElement(tj.A,{processingOrgMembers:z,canConvertToExternalSharedChannel:s,channel:c,emailCount:e_,reason:w}),renderModalContent=()=>l.createElement("div",{className:"margin_top_125"},l.createElement("fieldset",{className:"p-comprehensible_invites__radio_group","aria-required":!0,"data-qa":"invite_type_screen_radio_group","aria-label":t9.t("User type")},l.createElement(tD.A,{className:"p-comprehensible_invites_invite_type_small_text black"},t9.t("Are they from\u2026")),l.createElement(tq,{className:"p-comprehensible_invites__type__label","data-qa":"invite_type_screen_external_invite_label",htmlFor:eV,imageSource:t8,title:t9.t("An external organization"),description:ec?t9.rt("They\u2019ll be invited to just this channel, using <strong>Slack Connect.</strong><br></br><br></br>Admins will need to approve this invitation before it\u2019s sent."):t9.rt("Send an invitation to just this channel using <strong>Slack Connect.</strong>"),isSelected:eM,radio:eG,isDisabled:eP,disabledCopy:ez,showTrialInfo:T}),l.createElement(tq,{className:"p-comprehensible_invites__type__label","data-qa":"invite_type_screen_internal_invite_label",htmlFor:eq,imageSource:t7,title:t9.t("Your organization"),description:t9.rt("Add them directly to {currentTeamName}",{currentTeamName:i}),isSelected:eR,isDisabled:eD,radio:ej,disabledCopy:ew()})),$&&eR&&l.createElement(tY.$,{isRequestingInvites:Q,className:"margin_top_150",maxChars:280,uiComponentName:e2.UiComponentName.CHANNEL_INVITE_MODAL}));renderModalContent.displayName="renderModalContent";let onTrialStart=({trialExpirationDate:e})=>{e&&(eu.current=e,ei(!0))},learnMoreSlackConnectLink=({text:e})=>l.createElement(t$.A,{ref:ep,articleId:0x1ac6c815a3,ariaLabel:t9.t("Learn more about Slack Connect")},e),renderTrialSpeedBump=({cancel:e})=>{let t,a,n,r="",i="",o="p-comprehensible_invites__trial_speedbump",s=onTrialStart,c=ts.A,d=null;if(en){if(!eu.current)return null;r=t9.t("Ta-da! Your trial\u2019s started"),i=t9.t("You\u2019re on the most popular premium plan, Slack Pro \u2014 with features designed to help teams work better, together \u2014 through {trialEndDate}, absolutely free.",{trialEndDate:(0,t6.Pd)(eu.current)}),n=t9.t("Continue"),t=ef,s=ts.A,c=()=>eC(e),o=m()(o,"p-comprehensible_invites__trial_speedbump_cancel")}else r=t9.t("Start a trial to invite people with Slack Connect"),i=L?t9.rt("To send this invite with Slack Connect, start a free, {trialLength}-day trial of Slack Pro. You\u2019ll be able to start inviting external people right away. <a>Learn more</a>",{trialLength:aa,"<a>":learnMoreSlackConnectLink}):t9.rt("To send this invite with Slack Connect, start a free, {trialLength}-day trial of Slack Pro \u2014 no credit card required. You\u2019ll be able to start inviting external people right away. <a>Learn more</a>",{trialLength:aa,"<a>":learnMoreSlackConnectLink}),t=eb,d=tJ.A,a=eh;return l.createElement(tZ.A,{key:en?"1":"2",heading:r,description:i,continueButtonLabel:n,onCancel:e,onContinue:c,onContinueAfterTrialStart:s,reason:"channel_invite_modal_speedbump",context:t2.M.channelInviteModal,uiComponentVariant:e2.UiComponentVariant.CHANNEL_INVITE_MODAL,className:o,buttonAutoClogProps:t,customContinueButton:d,focusableContents:a})};renderTrialSpeedBump.displayName="renderTrialSpeedBump";let renderUpgradeSpeedBump=({cancel:e})=>l.createElement(tZ.A,{heading:t9.t("Upgrade to invite people with Slack Connect"),description:t9.t("To send this invite with Slack Connect and start working securely with external people, upgrade to Slack Pro. You\u2019ll be able to invite people with Slack Connect right away."),continueButtonLabel:t9.t("See Upgrade Options"),cancelButtonLabel:t9.t("Not Now"),icon:"rocket",onCancel:e,onContinue:em,onContinueAfterTrialStart:ts.A,reason:"channel_invite_modal_speedbump",context:t2.M.channelInviteModal,uiComponentVariant:e2.UiComponentVariant.CHANNEL_INVITE_MODAL,className:"p-comprehensible_invites__trial_speedbump",buttonAutoClogProps:eA,customContinueButton:null});renderUpgradeSpeedBump.displayName="renderUpgradeSpeedBump";let renderConfirmationSpeedBump=({cancel:e})=>{let t,a,r;return eM?(t=ee.current&&!M?t9.t("Great! Now you can use Slack Connect for this"):t9.t("Lovely! We\u2019ll use Slack Connect for this"),a=t9.rt("It\u2019s a simple, quick way to work with people outside {currentTeamName}. Note: your admins may need to approve {count, plural, =1 {this invitation} other {these invitations}}.",{count:e_,currentTeamName:i}),r=t9.t("Got It")):z?(t=t9.rt("Add them to {currentTeamName} as {count, plural, =1 {a member} other {members}}?",{count:e_,currentTeamName:i}),a=t9.t("They\u2019ll be added to your workspace as {count, plural, =1 {a member} other {members}}, with full access to all public channels, files, people and user groups.",{count:e_}),r=b?t9.t("Next"):f>1?t9.t("Send Invitations"):t9.t("Add")):(t=t9.rt("Invite them to {currentTeamName} as {count, plural, =1 {a member} other {members}}?",{count:e_,currentTeamName:i}),a=t9.t("They\u2019ll be added to your workspace as {count, plural, =1 {a member} other {members}}, with full access to all public channels, files, people and user groups.",{count:e_}),r=b?t9.t("Next"):t9.rt("Send {count, plural, =1 {Invitation} other {Invitations}}",{count:n.length})),l.createElement(tI.ty,{className:"p-comprehensible_invites_modal_speedbump",heading:t,description:a,cancelButtonLabel:t9.t("Cancel"),continueButtonLabel:r,continueButtonType:tP.QE.primary,continueButtonIsLoading:et,onCancel:e,onContinue:async()=>{await ex(),X.current&&e()},autoClogProps:eg})};renderConfirmationSpeedBump.displayName="renderConfirmationSpeedBump";let renderSpeedBump=({cancel:e})=>eH?renderTrialSpeedBump({cancel:e}):eW?renderUpgradeSpeedBump({cancel:e}):renderConfirmationSpeedBump({cancel:e}),renderLegacySharedChannelHostContent=()=>{if(!x||!v)return null;let{learnMoreLink:e,otherTeam:t}=v;return r&&t?l.createElement("div",{"data-qa":"invite_type_screen_legacy_host_team_content"},l.createElement("p",null,t9.rt("Looks like this person is from an organization other than {hostTeam} or {awayTeam}. You\u2019ll need to ask {awayTeam} if it\u2019s okay to add another organization to the channel.",{hostTeam:l.createElement(E.A,{id:r.id,team:r}),awayTeam:l.createElement(E.A,{id:t.id,team:t})})),l.createElement("p",null,t9.rt("Share {link} with someone at {awayTeam} to get the ball rolling. You\u2019ll be notified in {channel} once everything\u2019s ready.",{link:l.createElement(tF.A,{href:e},t9.t("these steps")),awayTeam:l.createElement(E.A,{id:t.id,team:t,bold:!0}),channel:l.createElement(A.A,{channel:c,readChannelIcon:!0})}))):null};renderLegacySharedChannelHostContent.displayName="renderLegacySharedChannelHostContent";let renderLegacySharedChannelAwayContent=()=>{if(!x||!v||!S||!r)return null;let e=l.createElement(E.A,{id:S.id,team:S,bold:!0}),t=t9.rt("Let {hostTeam} invite additional organizations join this channel",{hostTeam:e});return l.createElement("div",null,l.createElement("p",null,t9.rt("Only the channel owner, {hostTeam}, can invite additional organizations to the channel, but they do need {awayTeam}'s permission to do so.",{hostTeam:e,awayTeam:l.createElement(E.A,{id:r.id,team:r,bold:!0})})),l.createElement(eL.A,{text:t,type:"inline"},l.createElement(tO.A,{checked:eo,onChange:()=>es(!eo),"data-qa":"invite_type_screen_legacy_away_team_checkbox"})))};renderLegacySharedChannelAwayContent.displayName="renderLegacySharedChannelAwayContent";let renderExternalContactAdminContent=()=>{if(!eF)return null;if(x&&v){let{isHostCase:e}=v;return e?renderLegacySharedChannelHostContent():renderLegacySharedChannelAwayContent()}let e=P?.reasons?.includes(t1.IB.DisallowedWorkspace),t=P?.reasons?.includes(t1.IB.CannotRequestSharedChannels),a=ev&&P.ok;switch(!0){case w===tX.Fz.NotOwner&&!!S:return t9.t("Only the channel owner can add people to this channel.");case w===tX.Fz.CannotShareMandatoryChannel:return t9.t("This channel can\u2019t be shared with external people.");case w===tX.Fz.ConnectionLimitExceeded:return t9.t("Channels can\u2019t be shared with more than {limit} organizations at one time. To share this channel with another organization, you\u2019ll need to remove one first.",{limit:u});case w===tX.Fz.NoExternalInvitePermission:if(a)return t9.rt("You can\u2019t invite external people to this channel. Read <link>your organization\u2019s instructions</link> for details.",{"<link>":ek});return t9.t("You can\u2019t invite external people to this channel.");case w===tX.Fz.UserDoesNotHavePostingPermission:return t9.t("You don\u2019t have permission to add external people to this channel.");case t&&a:return t9.rt("Your admins haven\u2019t shared the permission required to invite external people to this channel. Read the <link>instructions they created</link> for details.",{"<link>":ek});case e&&a:return t9.rt("Since this person is from a different organization, they can\u2019t be added to channels in this workspace. Take a look at the <link>instructions your admins created</link> to help you add the right people to the right workspaces.",{"<link>":ek});default:return t9.rt("Your admins have disallowed Slack Connect for this workspace, so only members and guests of {teamName} can be added to this channel.",{teamName:l.createElement(E.A,{id:r?.id})})}};renderExternalContactAdminContent.displayName="renderExternalContactAdminContent";let getContactAdminCopy=()=>eF?renderExternalContactAdminContent():t9.t("Your organization\u2019s settings prevent you from inviting coworkers to the workspace. Contact an Admin for help."),renderContactAdmin=()=>eB?l.createElement("div",{className:"p-comprehensible_invites_invite_type_contact_admin_section","data-qa":eF?"invite_type_screen_external_contact_admin":"invite_type_screen__internal_contact_admin"},getContactAdminCopy()):null;renderContactAdmin.displayName="renderContactAdmin";let renderEmailInviteList=()=>q?l.createElement(ComprehensibleInviteList,{primaryScTeamEmails:a,toggleExpandList:G,isListExpandedByTeamId:_}):l.createElement(EmailInviteList,{emails:t,toggleExpandEmailList:()=>G(),isEmailListExpanded:_[tb.OTHER_TEAM]});return renderEmailInviteList.displayName="renderEmailInviteList",l.createElement(o.A,{eventId:e2.EventId.COMPREHENSIBLE_INVITES,uiStep:O,channelId:c.id,funnelStepNumber:D,...$&&{hasUserEnteredCustomMessage:!!Y,stepVariant:"personalized_invites"}},l.createElement(tI.dW,{closeModal:e,"data-qa":"invite_type_screen_content",className:m()(eB?"p-comprehensible_invites_base_modal_contact_admin":"p-comprehensible_invites_base_modal","p-comprehensible_invites__trial_speedbump__override"),shouldReturnFocusAfterClose:!1,contentLabel:(F=getTokenStringsList({tokenStrings:t,isTruncated:!h}),eB&&t.length?`${getTitleCopy()} ${F} ${getContactAdminCopy()}`:t.length?`${getTitleCopy()} ${F}`:getTitleCopy())},l.createElement(tI.rQ,null,l.createElement(tI.Rc,{className:"p-comprehensible_invites_header_title","data-qa":"invite_type_screen_title_text",title:getTitleCopy()})),l.createElement(tI.$m,{showScrollIndicatorBottom:!1,className:"p-comprehensible_invites--email_list_content"},l.createElement(tI.qf,{className:"p-comprehensible_invites--email_list_content_section"},renderEmailInviteList())),l.createElement(tI.$m,{className:"p-comprehensible_invites_invite_type_modal_body"},l.createElement(tI.qf,{className:"p-comprehensible_invites_content_section"},renderContactAdmin()??renderModalContent())),l.createElement(g.A.Consumer,null,({showSpeedBump:e})=>l.createElement(tI.jl,{className:"p-comprehensible_invites_invite_type_modal_footer",...!N&&{renderSpeedBump}},l.createElement(tI.ox,null,l.createElement(tL.Ay,{type:"outline",onClick:B,"data-qa":"invite_type_screen_back_button",autoClogProps:ae},t9.t("Back")),l.createElement(tL.Ay,{"data-qa":"invite_type_screen_submit_button",onClick:()=>eB?H({shouldRemoveLegacyRestriction:eo}):!eM||eH||eW?e(!0):ex(),autoClogProps:at,autoFocus:eB,disabled:!eB&&(eP&&eM||eD&&eR)},x?t9.t("Done"):b?eB?1===f?t9.t("Done"):t9.rt("Skip {count, plural, =1 {Invitation} other {Invitations}}",{count:e_}):t9.t("Next"):eB?t9.t("OK"):t9.t("Next")))))))};BaseInviteTypeScreen.displayName="BaseInviteTypeScreen";let an=(0,t4.N)((e,t)=>{let a,{isLegacySharedChannel:n,channel:r}=t,i=(0,t3.NQ)(e,r.id),l=!(0,z.b)(e,r),o=(0,v.H7)(e);if(n){let t=(0,P.A)(e,r),n=(0,t5.Kc)(e),i=t.find(e=>e!==n);a={isAwayCase:!l,isHostCase:l,otherTeam:(i?(0,v._J)(e,i):void 0)??void 0,learnMoreLink:`https://${(0,tM.Xk)()}/help/articles/360055052254?utm_medium=in-prod&utm_source=in-prod&utm_campaing=legacy-shared-channels-conversion-modal-learn-more`}}let s=(0,tH.ek)(e),c=getSlackConnectTrialStatus(e),d=!(0,t0.k)(e)&&(0,K.tc)(o),m=(0,t0.k)(e);return{legacySharedChannelInfo:a,conversationHostTeam:(0,v._J)(e,i),isChannelHost:l,canUserSeeInviteGuidelinesForChannel:(0,t1.QG)(e,r),trialStatus:c,isCheckingTrialInfo:s,currentTeam:o,isFreeTeam:d,isEnterpriseTeam:m}},null,null,{areStatePropsEqual:tR.kt})(BaseInviteTypeScreen);var ar=a(0xce378727),ai=a(0x15fb82076),al=a(0x17cd49de0);let ao=new _.Ay("channel_invite"),BaseSharedChannelNoteScreen=({effectiveTokenStrings:e,externalEmails:t,internalEmails:a,primaryScTeamEmails:n,teamExternalMembers:r,addToChannelStage:i,closeModal:s,onStepBack:c,onSubmit:d,processingExternalEmails:m,onChange:u,message:p,error:h,isFinalStageOfFlow:_,channel:f,telemeter:b,toggleExpandList:g,isEmailListExpanded:y,isListExpandedByTeamId:A,toggleExpandEmailPreview:x,isEmailPreviewExpanded:E,onCloseModal:C,sharedChannelInviteRequestedPref:k})=>{let v=useChannelInviteModalContext();if(!v)throw Error("Not within Channel Invite Modal context");let{externalAccessType:S}=v,I=S===eE.BD.SharedChannel,w=(0,l.useRef)(),T=(0,l.useRef)(!0);(0,l.useEffect)(()=>()=>{T.current=!1},[]),(0,l.useEffect)(()=>{let e=m?eE.Cz.OpenSharedChannelNoteExternal:eE.Cz.OpenSharedChannelNoteInternal;b.count(e)},[b,m]),(0,l.useLayoutEffect)(()=>{E&&w.current?.focus()},[E]);let[N,M]=(0,l.useState)(!1),R=l.createElement("div",{className:"black margin_bottom_75"},ao.t("Add a note (optional)")),P=f.id,L=k?ao.t("Customize your Slack Connect invitation"):ao.t("Ready to invite?"),onClick=async()=>{M(!0),await d(),T.current&&M(!1)},getPrimaryCtaCopy=()=>_?e.length>1?ao.t("Send Invitations"):ao.t("Send Invitation"):ao.t("Next"),O=m?eJ.gQ.SharedChannelNoteExternal:eJ.gQ.SharedChannelNoteInternal,D=(0,l.useMemo)(()=>({channelId:P,funnelStepNumber:O}),[P,O]),F=(0,l.useMemo)(()=>({...D,uiComponentName:I?e2.UiComponentName.SLACK_CONNECT_EMAIL_PREVIEW:""}),[D,I]),U=(0,l.useMemo)(()=>({...D,elementName:eJ.CH.EmailPreviewButton,onClick:{enableClogAction:!0},uiComponentName:I?e2.UiComponentName.SLACK_CONNECT_EMAIL_PREVIEW_LINK:""}),[D,I]),renderModalContent=()=>l.createElement("div",{className:"margin_top_125"},R,l.createElement(al.Es,{message:p,error:h,onChange:u,emailList:e,channel:f,isEmailPreviewExpanded:E,autoClogProps:F,ariaLabel:ao.t("Add a note (optional)"),isSlackConnectInvite:I}));renderModalContent.displayName="renderModalContent";let renderEmailPreviewLink=()=>l.createElement(ai.A,{autoClogProps:U,"data-qa":"shared_channel_note_screen_email_preview_button","aria-describedby":E?al.JN:al.xb,onClick:x},E?ao.t("Hide email preview"):ao.t("Show email preview"));renderEmailPreviewLink.displayName="renderEmailPreviewLink";let renderEmailInviteList=()=>l.createElement(ComprehensibleInviteList,{teamExternalMembers:r,primaryScTeamEmails:n,inviteEmails:i===tv.SharedChannelNoteScreenExternal?t:a,toggleExpandList:g,isListExpandedByTeamId:A});return renderEmailInviteList.displayName="renderEmailInviteList",l.createElement(o.A,{eventId:e2.EventId.COMPREHENSIBLE_INVITES,uiStep:e2.UiStep.SHARED_CHANNEL_NOTE,...D},l.createElement(tI.dW,{closeModal:C||s,"data-qa":"shared_channel_note_screen_content",className:"p-comprehensible_invites_base_modal",shouldReturnFocusAfterClose:!1,modalContentRef:w,contentLabel:`${L} ${getTokenStringsList({tokenStrings:e,isTruncated:!y})}`},l.createElement(tI.rQ,null,l.createElement(tI.Rc,{id:"p-comprehensible-invites-header",className:"p-comprehensible_invites_header_title",title:L})),l.createElement(tI.$m,{showScrollIndicatorBottom:!1,className:"p-comprehensible_invites--email_list_content"},l.createElement(tI.qf,{className:"p-comprehensible_invites--email_list_content_section"},renderEmailInviteList())),l.createElement(tI.$m,{className:"p-comprehensible_invites_invite_type_modal_body p-comprehensible_invites_content_section_grow"},l.createElement(tI.qf,{className:"p-comprehensible_invites_content_section"},renderModalContent())),l.createElement(tI.$m,{showScrollIndicatorBottom:!1,className:"p-comprehensible_invites_invite_type_modal_body_small"},l.createElement(tI.qf,{className:"p-comprehensible_invites_content_section"},renderEmailPreviewLink())),l.createElement(tI.jl,{className:"p-comprehensible_invites_invite_type_modal_footer"},l.createElement(tI.ox,null,l.createElement(tL.Ay,{type:"outline",onClick:c,"data-qa":"shared_channel_note_screen_back_button",autoClogProps:{elementName:eJ.CH.BackButton,onClick:{enableClogAction:!0},channelId:P,funnelStepNumber:O}},ao.t("Back")),l.createElement(ar.A,{disabled:!!h||p.length>560,"data-qa":"shared_channel_note_screen_submit_button",onClick:onClick,loading:N,autoClogProps:{elementName:eJ.CH.NextButton,onClick:{enableClogAction:!0},emailCount:e.length,wasMessageEntered:p.length>0,channelId:P,funnelStepNumber:O},"aria-label":getPrimaryCtaCopy()},getPrimaryCtaCopy())))))};BaseSharedChannelNoteScreen.displayName="BaseSharedChannelNoteScreen";let as=(0,t4.N)((e,{channel:t})=>({telemeter:(0,Z.Cy)({state:e}),sharedChannelInviteRequestedPref:(0,er.Q)(e,"shared_channel_invite_requested",t.id)??!1}),e=>({closeModal:()=>e((0,tw.O)())}))(BaseSharedChannelNoteScreen);var ac=a(0x146419600);let ad=new _.Ay("channel_invite"),am=eJ.gQ.SelectWorkspace,WorkspacePickerScreen=({channel:e,channelInvitableWorkspaces:t,effectiveTokenStrings:a,selectedWorkspaceId:n,tokenStrings:r,currentTeamName:i,onSelectWorkspaceId:s,onStepBack:c,onSubmit:d,onCloseModal:m})=>{let u=(0,l.useRef)(!0);(0,l.useEffect)(()=>()=>{u.current=!1},[]);let[p,h]=(0,l.useState)(!1),_=(0,l.useMemo)(()=>({channelId:e.id,funnelStepNumber:am}),[e]),f=(0,l.useMemo)(()=>({elementName:eJ.CH.BackButton,onClick:{enableClogAction:!0},channelId:e.id,funnelStepNumber:am}),[e]),b=(0,l.useMemo)(()=>({elementName:eJ.CH.NextButton,onClick:{enableClogAction:!0},channelId:e.id,funnelStepNumber:am}),[e]),{nonTeamOrgMembers:g,internalEmails:y,externalEmails:A}=r,x=(0,l.useMemo)(()=>[...(g??[]).map(e=>({text:e,className:"p-comprehensible_invites__org_member"})),...(y??[]).map(e=>({text:e})),...(A??[]).map(e=>({text:e}))],[A,y,g]),E=x.map((e,t)=>l.createElement("span",{key:e.text,className:e?.className},e.text,t<x.length-1&&", ")),C=(0,l.useCallback)(()=>r?.nonTeamOrgMembers?.length?ad.t("Add to workspace"):ad.t("Invite to {org} as a member",{org:i}),[i,r]),k=(0,l.useCallback)(async()=>{h(!0),await d(),u.current&&h(!1)},[d]),v=(0,l.useCallback)(e=>{if(e===n)return s("");s(e)},[s,n]);return l.createElement(o.A,{eventId:e2.EventId.COMPREHENSIBLE_INVITES,uiStep:e2.UiStep.SELECT_WORKSPACE,..._},l.createElement(tI.dW,{closeModal:m,"data-qa":"workspace_picker_screen",className:"p-comprehensible_invites_base_modal--no_min_height"},l.createElement(tI.rQ,null,l.createElement(tI.Rc,{className:"p-comprehensible_invites_header_title",title:C()})),l.createElement(tI.$m,{className:"no_min_height padding_bottom_125"},l.createElement(tI.qf,{className:"p-comprehensible_invites_content_section"},E)),l.createElement(tI.$m,{className:"p-comprehensible_invites_invite_type_modal_body padding_top_125"},l.createElement(tI.qf,{className:"p-comprehensible_invites_content_section"},l.createElement("div",{className:"bold padding_bottom_25"},ad.t("Select a workspace")),l.createElement("div",null,ad.t("They\u2019ll have full access to all public channels, files, people and user groups in this workspace."))),l.createElement(tI.qf,{className:"p-comprehensible_invites_content_section"},l.createElement(ac.A,{workspaces:t,selectedWorkspaceId:n,onWorkspaceSelected:v,dataQaPrefix:"workspace_picker_add_to_channel"}))),l.createElement(tI.jl,{className:"p-comprehensible_invites_invite_type_modal_footer"},l.createElement(tI.ox,null,l.createElement(tL.Ay,{type:"outline",onClick:c,"data-qa":"workspace_picker_screen_back_button",autoClogProps:f},ad.t("Back")),l.createElement(ar.A,{disabled:!n,"data-qa":"workspace_picker_screen_submit_button",onClick:k,loading:p,autoClogProps:b,"aria-label":a.length?ad.t("Send Invitations"):ad.t("Send Invitation")},a.length?ad.t("Send Invitations"):ad.t("Send Invitation"))))))};WorkspacePickerScreen.displayName="WorkspacePickerScreen";let withInviteTokensScreen=e=>t=>{var a;let n;if(!(0,k.d4)(ea.Ts))return null;let r=(a=useInviteesFromChannelInviteContext()?.primaryOptions||[],n={},a?.length&&a.forEach(e=>{if(!(0,w.oO)(e))return;let t=e.emailTeam.id,a=getInviteeEmail(e);n[t]?n[t].inviteList.push(a):n[t]={inviteList:[a],teamSummary:e.emailTeam}}),n),{channel:i}=t,{externalEmails:o,internalEmails:s,externalMemberTokens:c,allEmails:d}=(({channel:e,targetAccessType:t,options:a={includeAllExternalTokens:!1}})=>{let{invitees:n}=(0,l.useContext)(ek),{externalAccessType:r,internalAccessType:i}=(0,l.useContext)(eC),{internalTeamIds:o}=use_channel_invite_mapped_props_useInviteChannelProps({channelId:e.id}),{currentTeam:{id:s}}=use_channel_invite_mapped_props_useInviteTeamProps(),{shouldDisplayRealNames:c}=useComprehensibleInvitesProps({channel:e}),d=(0,l.useMemo)(()=>classification_helpers_getClassifiedTokens({selectedMembers:n,currentTeamId:s,channel:e,internalTeamIds:o,options:{forDisplay:!0,shouldDisplayRealNames:c}}),[e,s,o,n,c]),{externalEmails:m,internalEmails:u,externalMemberTokens:p=[]}=(0,l.useMemo)(()=>getEffectiveClassifiedTokens(d,t,r,i,a),[d,r,i,a,t]),h=d.externalPrimaryScIdentityTokens?.map(getInviteeEmail)||[],_=r===t||a.includeAllExternalTokens;return{allEmails:[...a.includeAllExternalTokens?d.externalMembers:[],..._?h:[],...r===t?d.externalEmails:[],...i===t?d.internalEmails:[]],externalEmails:m,internalEmails:u,externalMemberTokens:p}})({channel:i,targetAccessType:eE.BD.SharedChannel,options:{includeAllExternalTokens:!0}}),m=(0,k.rY)(e=>get_invites_by_team_getExternalMemberInvitesByTeam(e,{invitees:c}));return l.createElement(e,{primaryScTeamEmails:r,effectiveTokenStrings:d,externalEmails:o,internalEmails:s,teamExternalMembers:m,...t})},au=withInviteTokensScreen(an),ap=withInviteTokensScreen(as),ah=withInviteTokensScreen(ExternalLimitedMemberScreen),a_=withInviteTokensScreen(WorkspacePickerScreen);var af=a(0x15014e268);let ab=new _.Ay("channel_invite"),ChannelInviteExcessEmails=({emailLimit:e,removeExtraEmails:t})=>{let{emailCount:a}=useInviteesFromChannelInviteContext().counts,n=ab.t("You can only add {emailLimit} people at a time.",{emailLimit:e}),r=ab.t("Remove the last {excessEmails}",{excessEmails:a-e});return a>e?l.createElement(af.Z1,{errorCopy:n,ctaCopy:r,onCtaClick:t}):null};ChannelInviteExcessEmails.displayName="ChannelInviteExcessEmails";var ag=a(0x7fae732f),ay=a(0x1c14ee6d4),aA=a(0x6d72337),ax=a(0x4c04de32);let aE=new _.Ay("channel_invite"),aC={clogImpression:!0,onClick:{enableClogAction:!0},eventId:e2.EventId.SCG_MCG_INVITATION,elementName:"scg_to_mcg_invitation_add_people_send_upgrade_request"},MemberErrors=({removeErrorTokens:e,entryPoint:t,channel:a})=>{let n=(0,ev.wA)(),r=(0,k.d4)(eV.ke),i=(0,k.d4)(e=>(0,U.R)(e,a)),o=(0,k.d4)(e=>(0,ag.n)(e,a)),s=(0,l.useCallback)(()=>n((0,aA.Xf)({source:ay.K3.ChannelInviteModal,isOpeningFromRedirect:!1,targetTeamId:o})),[o,n]),c=(0,k.d4)(e=>(0,Y.S4)(e,a)),d=useInviteesFromChannelInviteContext(),{alreadyInChannelCount:m,singleChannelGuestCount:u,guestNotOnWorkspaceCount:p,awayTeamExternalEmailCount:h,errorCount:_,emailCount:f}=d.counts,b=[],g=(0,l.useCallback)(()=>{let t=d.invitees.filter(e=>e.error===eA.rI.singleChannelGuest).map(e=>e.value);n((0,ax.r)({memberIds:t,channelId:a?.id??"",onInvitationSuccess:()=>{e(eA.rI.singleChannelGuest)}}))},[n,a?.id,d.invitees,e]);return m&&t!==eJ.kP.CanvasTemplate&&b.push(l.createElement("div",{key:eA.rI.alreadyInChannel,className:"p-channel_invite_modal__info"},l.createElement(af.Z1,{errorCopy:aE.t("{count, plural, =1 {# person is} other {# people are}} already in the channel.",{count:m}),ctaCopy:aE.t("Remove {count, plural, =1 {this person} other {these people}}",{count:m}),onCtaClick:()=>e(eA.rI.alreadyInChannel)}))),u&&b.push(l.createElement("div",{key:eA.rI.singleChannelGuest,className:"p-channel_invite_modal__info"},r?l.createElement(x.Ay,{level:x.A_.warning,className:"margin_bottom_150","data-qa":"single_channel_guest_error"},l.createElement("div",null,l.createElement("strong",null,aE.t("{count, plural, =1 {# person is a} other {# people are}} Single-Channel {count, plural, =1 {guest} other {guests}}, and can\u2019t be added to this channel.",{count:u}))),l.createElement("div",null,c?aE.t("To add them to more channels, upgrade guest to a Multi-Channel Guest."):aE.t("To add them to more channels, send a request to your admin to upgrade them to a Multi-Channel Guest.")),l.createElement("div",null,l.createElement(eq.A,{className:"p-channel_invite_modal__info_link",onClick:g,autoClogProps:aC},c?aE.rt("Review and Upgrade Guest"):aE.t("Review and Send Request")))):l.createElement(af.Z1,{errorCopy:aE.t("{count, plural, =1 {# person is a} other {# people are}} Single-Channel {count, plural, =1 {guest} other {guests}}, so they can\u2019t be added to a second channel.",{count:u}),ctaCopy:aE.t("Remove {count, plural, =1 {this person} other {these people}}",{count:u}),onCtaClick:()=>e(eA.rI.singleChannelGuest)}))),p&&b.push(l.createElement("div",{key:eA.rI.guestNotOnWorkspace,className:"p-channel_invite_modal__info"},l.createElement(af.Z1,{errorCopy:aE.t("{count, plural, =1 {# person} other {# people}} already {count, plural, =1 {has a guest account} other {have guest accounts}} in another workspace. An admin will need to add them.",{count:p}),ctaCopy:aE.t("Remove {count, plural, =1 {this person} other {these people}}",{count:p}),onCtaClick:()=>e(eA.rI.guestNotOnWorkspace)}))),h&&b.push(l.createElement("div",{key:eA.rI.awayTeamExternalEmail,className:"p-channel_invite_modal__info"},l.createElement(af.Z1,{errorCopy:aE.t("You don\u2019t have permission to invite people from {count, plural, =1 {this organization} other {these organizations}} to the channel.",{count:h}),ctaCopy:aE.t("Remove {count, plural, =1 {email} other {emails}}",{count:h}),onCtaClick:()=>e(eA.rI.awayTeamExternalEmail)}))),_&&f&&i&&b.push(l.createElement("div",{key:eA.rI.spaceChannelInvite,className:"p-channel_invite_modal__info"},l.createElement(af.Z1,{errorCopy:aE.rt("At least 1 person needs to be invited to {scwName} before they can be added to this channel. ",{scwName:l.createElement(E.A,{id:o})}),ctaCopy:aE.t("Invite these people"),onCtaClick:s}))),_&&!(f&&i)&&b.push(l.createElement("div",{key:"channel-invite-other-error-count",className:"p-channel_invite_modal__info"},l.createElement(af.Z1,{errorCopy:aE.t("{count, plural, =1 {# error} other {# errors}}.",{count:_}),ctaCopy:aE.t("Remove {count, plural, =1 {error} other {errors}}",{count:_}),onCtaClick:()=>e()}))),l.createElement(l.Fragment,null,b)};MemberErrors.displayName="MemberErrors";let unknown_error=()=>{let{unknownCount:e}=useInviteesFromChannelInviteContext().counts;return e?l.createElement("div",{className:"p-channel_invite_modal__info","data-qa":"channel-invite-unknown-error"},l.createElement(af.P2,{count:e})):null},ak=new _.Ay("channel_invite"),av="channel_invite_add_speeed_bump_cancel_btn",aS="channel_invite_add_speeed_bump_close_btn",ChannelInviteAddSpeedbump=({shouldShowBulkAddControls:e,onCancel:t,onClose:a})=>e?l.createElement("div",{"data-qa":"channel_invite_bulk_add_speeed_bump_container"},l.createElement("p",null,ak.rt("<b>Skip adding people?</b> You can always add members later, by clicking the <icon></icon> button at the top of this channel.",null,({tag:e,text:t})=>{switch(e){case"b":return l.createElement("strong",null,t);case"icon":return l.createElement(tm.A,{className:"sk_foreground_max",type:"info-circle"});default:return null}})),l.createElement(tI.ox,{className:"align_right"},l.createElement(tP.Ay,{"data-qa":av,onClick:t,type:"outline"},ak.t("Go Back")),l.createElement(tP.Ay,{"data-qa":aS,onClick:a,autoFocus:!0},ak.t("Skip For Now")))):l.createElement("div",{"data-qa":"channel_invite_add_speeed_bump_container",className:"p-channel_invite_modal__speedbump"},l.createElement("p",{className:"p-channel_invite_modal__speedbump_text"},ak.rt("Close without adding anyone to this channel?")),l.createElement(tI.ox,{className:"align_right"},l.createElement(tP.Ay,{"data-qa":av,onClick:t,type:"outline",autoFocus:!0},ak.t("Keep Adding")),l.createElement(tP.Ay,{"data-qa":aS,onClick:a,type:"danger"},ak.t("Close"))));ChannelInviteAddSpeedbump.displayName="ChannelInviteAddSpeedbump";var aI=a(0x1fb2d2a87);let aw=new _.Ay("channel_invite"),aT={elementName:"add_users",onClick:{enableClogAction:!0}},ChannelInviteAddButton=({isFromCreate:e,isSubmitting:t,addMemberMode:a,shouldSetChannelAsDefault:n,shouldShowBulkAddControls:r,emailLimit:i,handleInputClogAndSubmit:o,channel:s,removeErrorTokens:c})=>{let{counts:{totalCount:d,loadingCount:m,unknownCount:u,errorCount:p,emailCount:h,classifyingCount:_,awayTeamExternalEmailCount:f,singleChannelGuestCount:b}}=useInviteesFromChannelInviteContext(),g=(0,k.d4)(aI.to),y=(0,k.d4)(ea.Ts),A=(0,k.d4)(e=>(0,V.JF)(e,"default_channel_creation_enabled",s)),x=(0,k.d4)(T.A),E=(0,k.d4)(N.Ah),C=(0,k.d4)(eV.ke),v=(0,l.useMemo)(()=>m?l.createElement(af.HH,{count:m,clientTheme:g}):null,[g,m]),S=(0,k.d4)(e=>(0,U.R)(e,s)),I=(0,e5.A)(),w=0===d&&(e||A&&a===eF.D.SpecificMembers)?aw.t("Done"):aw.t("Add"),M=a===eF.D.SpecificMembers&&!d||!!(m||_||u||p||f)||h>i||h>0&&S,R="primary";n&&!d&&A&&(a!==eF.D.AllMembers&&(x||E?(w=aw.t("Add"),R="primary"):(w=aw.t("Save"),R="outline")),M=!r),y&&(h>0||!d)&&(w=aw.t("Add")),b>0&&C&&(d===b&&(w=aw.t("Add"),M=!0),d>b&&(w=aw.t("Remove Guest and Add People")));let P=(0,l.useCallback)(()=>d>b&&C?(I.track(e2.EventId.SCG_MCG_INVITATION,{contexts:{ui_context:{action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"scg_to_mcg_invitation_add_people_remove_guest_and_add_people"}}}}),c(eA.rI.singleChannelGuest,o)):o(),[b,d,C,o,c,I]);return l.createElement("div",{className:"p-channel_invite_modal__footer_content","data-qa":"add_button_container"},l.createElement("div",{className:"p-channel_invite_modal__info"},v),l.createElement(ar.A,{type:R,size:"medium","data-qa":"invite_to_workspace_submit_button",disabled:M||t,onClick:P,loading:t,autoClogProps:aT,"aria-label":w},w))};ChannelInviteAddButton.displayName="ChannelInviteAddButton";let aN=new _.Ay("channel_invite"),ChannelInviteFooterActions=({isFromCreate:e,filterQuery:t,addMemberMode:a,shouldSetChannelAsDefault:n,shouldShowBulkAddControls:r,isSubmitting:i,emailLimit:o,handleInputClogAndSubmit:s,onSkipClick:c,channel:d,removeErrorTokens:m})=>{let{totalCount:u}=useInviteesFromChannelInviteContext().counts,p=(0,k.d4)(e=>(0,V.JF)(e,"default_channel_creation_enabled",d)),{closeModal:h}=(0,g.k)(),_=p&&n&&!u,renderSkipButton=()=>l.createElement(tP.Ay,{type:"outline",size:"medium","data-qa":"invite_to_workspace_skip_button",onClick:t=>e?c(t):h()},e?aN.t("Skip for now"):aN.t("Cancel"));renderSkipButton.displayName="renderSkipButton";let f=!e||t||u||a===eF.D.AllMembers||_?l.createElement(ChannelInviteAddButton,{isFromCreate:e,isSubmitting:i,addMemberMode:a,shouldSetChannelAsDefault:n,emailLimit:o,handleInputClogAndSubmit:s,channel:d,shouldShowBulkAddControls:r,removeErrorTokens:m}):renderSkipButton();return l.createElement("div",{"data-qa":"footer_actions_container"},f)};ChannelInviteFooterActions.displayName="ChannelInviteFooterActions";var aM=a(0xbe5e39b6),aR=a(0x6affae29),aP=a(0x235474a98),aL=a(0x1405f2ddc);let aO=new _.Ay("shared_channels_invite");var aD=((i={}).SlackConnect="SlackConnect",i.InvitationNote="InvitationNote",i.MayNeedAdmins="MayNeedAdmins",i.AccessAllWorkspace="AccessAllWorkspace",i.AccessOnlyChannel="AccessOnlyChannel",i.SlackConnectComprehensible="SlackConnectComprehensible",i.SlackConnectComprehensibleWithGuidelines="SlackConnectComprehensibleWithGuidelines",i.SlackConnectTrialEligible="SlackConnectTrialEligible",i.SlackConnectTrialIneligible="SlackConnectTrialIneligible",i.SlackConnectTrialActive="SlackConnectTrialActive",i.SlackConnectSponsoredConnection="SlackConnectSponsoredConnection",i.SlackConnectSponsoredConnectionWithGuidelines="SlackConnectSponsoredConnectionWithGuidelines",i);let SharedChannelInviteFlowModalTip=({tipCopy:e,currentTeamName:t,clientTheme:a})=>{let n,{renderLink:r}=(0,tK.F)({type:"INVITE",dataQa:"shared_channel_invite_flow_modal_tip__guidelines_link",stepVariant:"shared_channel_invite_flow_modal_tip",modalHeaderSuffix:"instructions",showCopyButton:!0}),i=l.createElement(ai.A,{href:"https://slack.com/features/shared-channels"},aO.t("Learn more")),o=l.createElement(t$.A,{className:"c-search_autocomplete__footer_helpLink",articleId:0x1ac6c815a3,ariaLabel:aO.t("Learn more about Slack Connect")},aO.t("Learn more")),s="",c="";switch(e){case"SlackConnectComprehensibleWithGuidelines":c=aO.rt("<strong>Working with external people?</strong> Your admins created instructions to help you add them to existing channels using Slack Connect. <link>Read the instructions</link>",{"<link>":r});break;case"SlackConnectComprehensible":c=aO.rt("<strong>Working with external people?</strong> Use Slack Connect to invite them to a specific channel. Simply type their email above.");break;case"SlackConnectTrialActive":n=eJ.Rw.TrialActive,s=aO.t("Try Slack Connect"),c=aO.rt("Working with external people? Simply type their email above. {slackConnectLink}",{slackConnectLink:o});break;case"SlackConnectTrialEligible":case"SlackConnectTrialIneligible":n="SlackConnectTrialEligible"===e?eJ.Rw.TrialEligible:eJ.Rw.TrialIneligible,s=aO.t("Try Slack Connect"),c=aO.rt("Working with external people? Simply type their email above to get started. {slackConnectLink}",{slackConnectLink:o});break;case"InvitationNote":c=aO.rt("<strong>The invitation will include next steps.</strong> We\u2019ll make sure people know what to do, even if they\u2019re new to Slack.");break;case"SlackConnect":c=aO.rt("<strong>Use Slack Connect to collaborate externally.</strong> Anyone you invite will only have access to this channel and will also be able to add their coworkers.");break;case"MayNeedAdmins":c=aO.rt("<strong>Now, sit tight.</strong> External people may need their admins to sign off. We\u2019ll notify you once they\u2019re in the channel.");break;case"AccessAllWorkspace":c=aO.rt("<strong>They\u2019ll have access to all of {currentTeamName}.</strong> This includes all public channels, files, and people. {learnMoreLink}",{learnMoreLink:i,currentTeamName:t});break;case"AccessOnlyChannel":c=aO.rt("<strong>They\u2019ll only have access to this channel.</strong> And won\u2019t be able to  message everyone in Acme Agency. {learnMoreLink}",{learnMoreLink:i});break;case"SlackConnectSponsoredConnectionWithGuidelines":c=aO.rt("<strong>Working with external people?</strong> Your admins created instructions to help you add them to existing channels using Slack Connect \u2014 don\u2019t worry, anyone you invite can join for free. <link>Read the instructions</link>",{"<link>":r});break;case"SlackConnectSponsoredConnection":c=aO.rt("<strong>Working with external people?</strong> Use Slack Connect to invite them to a specific channel \u2014 it\u2019s free for them to join. Simply type their email above.");break;default:(0,aR.Kh)(e)}return l.createElement("div",{className:s?"p-shared_channel_invite_flow_modal_tip__trial_container":"p-shared_channel_invite_flow_modal_tip__container","data-qa":"comprehensible_invites_flow_modal_tip"},!n&&l.createElement("img",{className:"margin_right_75",src:a===aM.Sx.Dark?aP:aL,alt:""}),l.createElement("div",{className:"p-shared_channel_invite_flow_modal_tip__text_container"},s&&l.createElement("div",{className:"p-shared_channel_invite_flow_modal_tip__header_container"},l.createElement("strong",null,s),n&&l.createElement(tG.A,{className:"p-shared_channel_invite_flow_modal_tip__pro_badge",promoType:tB.ZO.PaidFeatureTrial,promoSubtype:tB.zG.SharedChannels,uiComponentVariant:e2.UiComponentVariant.SHARED_CHANNEL_INVITE})),l.createElement("span",null,c)))};SharedChannelInviteFlowModalTip.displayName="SharedChannelInviteFlowModalTip";let aF=(0,t4.N)(e=>({currentTeamName:(0,K.F1)((0,v.H7)(e)),clientTheme:(0,aI.to)(e)}))(SharedChannelInviteFlowModalTip);var aU=a(0x44eb3f98);let ModalTip=({channel:e})=>{let t,a,n=(0,k.d4)(ea.Ts),r=(0,k.d4)(e=>(0,tH.bp)(e,eB.gb,eB.kq)),i=(0,k.d4)(getSlackConnectTrialStatus),o=(0,k.d4)(aU.d),s=(0,k.d4)(t=>(0,t1.QG)(t,e).ok),c=(0,k.d4)(t=>(0,U.R)(t,e));if(!n||r||c||(0,R.U_)(e))return null;if(i)switch(i){case eJ.Rw.TrialActive:t=aD.SlackConnectTrialActive,a="shared-channel-invite-flow-modal-tip-trial-active";break;case eJ.Rw.TrialEligible:t=aD.SlackConnectTrialEligible,a="shared-channel-invite-flow-modal-tip-trial-eligible";break;default:t=aD.SlackConnectTrialIneligible,a="shared-channel-invite-flow-modal-tip-trial-ineligible"}else o?(t=s?aD.SlackConnectSponsoredConnectionWithGuidelines:aD.SlackConnectSponsoredConnection,a="shared-channel-invite-flow-modal-tip-sponsored-connection"):(t=s?aD.SlackConnectComprehensibleWithGuidelines:aD.SlackConnectComprehensible,a="shared-channel-invite-flow-modal-tip-comprehensible");return l.createElement(aF,{tipCopy:t,"data-qa":a})};ModalTip.displayName="ModalTip";var aB=a(0x1322bcaad);let getNextComprehensibleScreen=(e,t,a,n,r,i,l,o,s,c,d,m=null)=>{let{externalMembers:u,externalEmails:p,userActionableExternalCount:h,userActionableInternalCount:_,nonTeamOrgMembers:f,userActionableExternalPrimaryScIdentityCount:b}=classification_helpers_getClassifiedTokens({selectedMembers:o,currentTeamId:a,channel:e,internalTeamIds:c}),g=!!((h||u.length>0||b)&&!s),y=!!(_&&!r);switch(t){case tv.Initial:if(y)return tv.InviteTypeScreenInternal;if(g){if(b)return tv.InviteTypeScreenExternalPrimaryScIdentity;return tv.InviteTypeScreenExternal}if(b)return tv.InviteTypeScreenExternalPrimaryScIdentity;if(h)return tv.InviteTypeScreenExternal;if(u.length){if(0===m)return _?tv.InviteTypeScreenInternal:tv.ConfirmationScreen;if(n)return tv.ExternalLimitedMemberScreenExternal;return tv.SharedChannelNoteScreenExternal}if(_)return tv.InviteTypeScreenInternal;if(f.length)return tv.InviteTypeScreenOrgMember;return tv.ConfirmationScreen;case tv.InviteTypeScreenExternalPrimaryScIdentity:if(h||u.length+p.length!==0&&g)return tv.InviteTypeScreenExternal;if(i===eE.BD.Member&&u.length>0&&n)return tv.ExternalLimitedMemberScreenExternal;if((i===eE.BD.SharedChannel||u.length>0||b)&&!g)return n?tv.ExternalLimitedMemberScreenExternal:tv.SharedChannelNoteScreenExternal;if(g&&_)return tv.InviteTypeScreenInternal;if(g&&f.length)return tv.InviteTypeScreenOrgMember;if(i===eE.BD.Member){if(_&&!y)return tv.InviteTypeScreenInternal;if(f.length)return tv.InviteTypeScreenOrgMember;return tv.ConfirmationScreen}return tv.SharedChannelNoteScreenExternal;case tv.InviteTypeScreenExternal:if(i===eE.BD.Member&&u.length>0&&n)return tv.ExternalLimitedMemberScreenExternal;if((i===eE.BD.SharedChannel||u.length>0||b)&&!g)return n?tv.ExternalLimitedMemberScreenExternal:tv.SharedChannelNoteScreenExternal;if(g&&_)return tv.InviteTypeScreenInternal;if(g&&f.length)return tv.InviteTypeScreenOrgMember;if(i===eE.BD.Member){if(_&&!y)return tv.InviteTypeScreenInternal;if(f.length)return tv.InviteTypeScreenOrgMember;if(d)return tv.SelectWorkspace;return tv.ConfirmationScreen}return tv.SharedChannelNoteScreenExternal;case tv.ExternalLimitedMemberScreenExternal:return tv.SharedChannelNoteScreenExternal;case tv.SharedChannelNoteScreenExternal:if(_&&!y)return tv.InviteTypeScreenInternal;if(f.length)return tv.InviteTypeScreenOrgMember;return tv.ConfirmationScreen;case tv.InviteTypeScreenInternal:if(h&&y)return tv.InviteTypeScreenExternal;if(l===eE.BD.SharedChannel)return n?tv.ExternalLimitedMemberScreenInternal:tv.SharedChannelNoteScreenInternal;if(f.length)return tv.InviteTypeScreenOrgMember;if(d)return tv.SelectWorkspace;return tv.ConfirmationScreen;case tv.ExternalLimitedMemberScreenInternal:if(_&&l===eE.BD.SharedChannel)return tv.SharedChannelNoteScreenInternal;if(f.length)return tv.InviteTypeScreenOrgMember;return tv.ConfirmationScreen;case tv.SharedChannelNoteScreenInternal:if(f.length)return tv.InviteTypeScreenOrgMember;if(d&&i===eE.BD.Member)return tv.SelectWorkspace;return tv.ConfirmationScreen;case tv.InviteTypeScreenOrgMember:if(d)return tv.SelectWorkspace;return tv.ConfirmationScreen;case tv.SelectWorkspace:return tv.ConfirmationScreen;default:return tv.Initial}},getIsFinalStageOfComprehensibleFlow=(e,t,a,n,r,i,l,o,s,c,d,m)=>getNextComprehensibleScreen(e,t,a,n,r,i,l,o,s,c,d,m)===tv.ConfirmationScreen;var aH=a(0xf641d034);let aW=(0,e1.A)(({inviteeOptions:e,errorType:t})=>{let a=[],n=[];switch(t){case eA.rI.alreadyInChannel:a=e.filter(e=>{let t=e.error===eA.rI.alreadyInChannel;return t&&n.push(e),!t});break;case eA.rI.singleChannelGuest:a=e.filter(e=>{let t=e.error===eA.rI.singleChannelGuest;return t&&n.push(e),!t});break;case eA.rI.guestNotOnWorkspace:a=e.filter(e=>{let t=e.error===eA.rI.guestNotOnWorkspace;return t&&n.push(e),!t});break;case eA.rI.awayTeamExternalEmail:a=e.filter(e=>{let t=e.error===eA.rI.awayTeamExternalEmail;return t&&n.push(e),!t});break;default:a=e.filter(e=>{let t=e.isError&&e?.error!==eA.rI.alreadyInChannel&&e?.error!==eA.rI.singleChannelGuest&&e?.error!==eA.rI.guestNotOnWorkspace&&e?.error!==eA.rI.awayTeamExternalEmail;return t&&n.push(e),!t})}return{nonErrors:a,errors:n}});var aV=a(0x10a716a94),aG=a(0xd289a116),aq=a(0x95169e83),aj=a(0x377b9085),az=a(0x242503693),aK=a(0x1986ce0e4),a$=a(0xbc99301d);let aY=new _.Ay("channel_invite"),aQ=(0,h.getGenericLogger)(),ModalContentWithSpeedBump=({shouldEnableSpeedBump:e,children:t})=>{let{enableSpeedBump:a}=(0,g.k)();return(0,l.useEffect)(()=>{a(e)},[e,a]),t};let BaseChannelInviteModal=class BaseChannelInviteModal extends l.Component{_isMounted=!1;static ENTRY_POINTS_TO_DISABLE_BULK_CONTROLS=new Set([eJ.kP.ChannelInviteSuggestionsFileShareSlackbotMessage,eJ.kP.InstantSlackChannelForeword]);static getDerivedStateFromProps(e,t){let{entryPoint:a,teamMemberCount:n,isChannelPublic:r,isFromCreate:i,isDefaultChannel:l,channelMemberCount:o,isDefaultChannelCreationEnabled:s,clogger:c,trackingId:d,currentMemberIsAdminInChannel:m,shouldSkipInitialStage:u}=e,{initialTeamMemberCount:p,isDefaultOptionsImpressionClogged:h}=t,{clogDefaultChannelOptionsImpression:_}=e4(d,c);if(n!==p&&s){let e=n>=eB.SC&&n<=eB.pd,t=!BaseChannelInviteModal.ENTRY_POINTS_TO_DISABLE_BULK_CONTROLS.has(a)&&r&&(i||1===o)&&e,s=r&&m&&n<=eB.pd;t&&!h&&_();let c=l&&!u?eF.D.AllMembers:eF.D.SpecificMembers,d=i?eF.D.AllMembers:c;return{initialTeamMemberCount:n,shouldShowBulkAddControls:t,shouldShowDefaultChannelCreationControls:s,shouldSetChannelAsDefault:m&&(i||l),addMemberMode:t?d:eF.D.SpecificMembers,isDefaultOptionsImpressionClogged:!0}}return null}constructor(e){super(e);const{initialSelectedOptions:t,canUserInviteExternalMembersToChannel:a,channelInvitableWorkspaces:n}=e;this.state={addMemberMode:eF.D.SpecificMembers,addToChannelStage:tv.Initial,cantShareChannelReason:void 0,channelConnectionLimit:0,comprehensibleNavigationHistory:[tv.Initial],emailInviteResults:[],error:"",externalAccessType:eE.BD.SharedChannel,fetchingShareChannelAccessTypeAvailable:!1,filterQuery:"",initialTeamMemberCount:0,internalAccessType:eE.BD.Member,inviteeTeams:[],isDefaultOptionsImpressionClogged:!1,isEmailListExpanded:!1,isExternalLimited:!e.shouldShowRestrictedMembersStep&&void 0,isLegacySharedChannel:!1,isListExpandedByTeamId:{},isNoteEmailPreviewExpanded:!1,isSubmitting:!1,loadingCount:0,loadingStartCount:0,selectedMembers:t||[],selectedWorkspaceId:n?.length?n[0].id:"",shareChannelAccessTypeAvailable:a,sharedChannelInviteMessage:"",sharedChannelInviteMessageError:"",shouldSetChannelAsDefault:!1,shouldShowBulkAddControls:!1,shouldShowDefaultChannelCreationControls:!1,unresolvedTokenCount:0},(0,u.v)(this,["onSelectedItemsChange","onSubmit","onKeyDown","onInputFocused","onInviteToTeam","onFilterQueryChange","onFilterQueryPaste","onSkipClick","closeModalAndClog","handleInputClogAndSubmit","removeErrorTokens","closeModal","setShouldSetChannelAsDefault","setAddMemberMode","onStepBack","removeExtraEmails","onSubmitComprehensibleInvites","toggleExpandList","checkSharedChannelStatusAndUpdateState","updateSharedChannelState","onSelectWorkspaceId","getCurrentTeamId","onSharedChannelMessageChange","getInviteResults","toggleExternalLimitedState","handleExternalLimitedRadioChange","getTokenStrings","renderFooterSpeedbump"])}componentDidMount(){let{channel:e,entryPoint:t,clogger:a,trackingId:n,canChannelBeShared:r,telemeter:i,shouldShowComprehensibleInvites:l,fetchTrialEligibility:o,setIsLoadingInitialMembers:s,resetCustomMessage:c}=this.props,{selectedMembers:d}=this.state,{clogModalImpression:m,clogModalEntrypointImpression:u}=e4(n,a);this._isMounted=!0,m({channel:e}),u({entryPoint:t}),l&&(r?(this.updateSharedChannelState(r),this.shouldMarkConversationsListPrefsAsStale()):(this.setState(()=>({fetchingShareChannelAccessTypeAvailable:!0})),this.props.checkChannelCanBeShared({channelId:e.id,reason:"channel-invite-modal-can-share-channel"}).then(e=>{this.updateSharedChannelState(e),this.shouldMarkConversationsListPrefsAsStale()}).catch(()=>{this.setState(()=>({shareChannelAccessTypeAvailable:!1,externalAccessType:eE.BD.Member}))}).finally(()=>this.setState(()=>({fetchingShareChannelAccessTypeAvailable:!1})))),o()),d.length&&this.onSelectedItemsChange(d),i.count(eJ.jU.OpenAddPeopleModal),s(!1),c()}shouldComponentUpdate(e){return!(this._isMounted&&((0,R.Zx)(e.channel)||(0,F.F)(e.channel)||this.props.channelName!==e.channelName))&&!0}componentDidUpdate(e,t){let{telemeter:a,clogger:n,shouldSkipInitialStage:r}=this.props,{loadingCount:i,loadingStartCount:l,addToChannelStage:o,isSubmitting:s,addMembersToChannelResult:c}=this.state;if(r&&o===tv.Initial&&!s&&!c?.addedExistingMembers)return void this.onSubmit();if(!t.loadingCount&&i)a.mark("load-channel-invite-tokens-start");else if(t.loadingCount&&!i){let e=a.measureAndClear("load-channel-invite-tokens-start","load-channel-invite-tokens-complete"),{clogTokensLoadedPerf:t}=e4(this.props.trackingId,n);"number"==typeof e&&t({loadingStartCount:l,loadDuration:e})}}componentWillUnmount(){this._isMounted=!1}onFilterQueryChange(e){this.setState(()=>({filterQuery:e}))}onFilterQueryPaste(e){this.setState(t=>({loadingStartCount:(t.loadingCount?t.loadingStartCount:0)+e.length}))}onKeyDown(e,{hasActiveRowIndex:t}){let{selectedMembers:a}=this.state;e.keyCode===f.Fm&&!t&&a.length&&(e.preventDefault(),this.handleInputClogAndSubmit())}onInputFocused(){let{selectedMembers:e}=this.state,{isDefaultChannel:t}=this.props;this.setState(a=>({addMemberMode:eF.D.SpecificMembers,shouldSetChannelAsDefault:(!!t||0!==e.length)&&a.shouldSetChannelAsDefault}))}onSelectedItemsChange(e,t){let{loadingCount:a,unknownCount:n,errorCount:r}=get_counts(e);this.setState(()=>({selectedMembers:e,loadingCount:a,unresolvedTokenCount:a+n+r}),()=>{t&&t()})}onStepBack=()=>{let{telemeter:e}=this.props,{comprehensibleNavigationHistory:t}=this.state;t.pop(),this.setState(()=>({addToChannelStage:t[t.length-1],comprehensibleNavigationHistory:t})),e.count(eJ.jU.ClickBackButton)};onSkipClick(){let{clogSkipInviteToWorkspace:e}=e4(this.props.trackingId,this.props.clogger);e(),this.closeModal()}onSelectWorkspaceId(e){this.setState(()=>({selectedWorkspaceId:e}))}getCurrentTeamId(){let{currentTeam:e,isEnterprise:t}=this.props,{selectedWorkspaceId:a}=this.state;return t?a:e.id}async onSubmitComprehensibleInvites({shouldRemoveLegacyRestriction:e}={shouldRemoveLegacyRestriction:!1}){let{channel:t,connectedTeamIds:a=[],internalTeamIds:n,modernCloseModal:r,shouldShowComprehensibleInvites:i,shouldShowRestrictedMembersStep:l,canInviteOrRequestInvites:o,removeSharedChannelLegacyRestriction:s,isHostTeam:c,isEligibleChannelForWorkspaceSelection:d}=this.props,{addMemberMode:m,addToChannelStage:u,selectedMembers:p,comprehensibleNavigationHistory:h,externalAccessType:_,internalAccessType:f,shareChannelAccessTypeAvailable:b,isLegacySharedChannel:g}=this.state;if(!i)return;let y=this.getCurrentTeamId();if(this.setState(()=>({error:""})),g&&e&&!c&&u===tv.InviteTypeScreenExternal){await s({channelId:t.id,reason:"channels-invite-modal/onSubmitComprehensibleInvites"}),await this.checkSharedChannelStatusAndUpdateState();return}let A=this.getEntitiesThatCanBeAddedToChannel(),x=classification_helpers_getClassifiedTokens({selectedMembers:p,currentTeamId:y,channel:t,internalTeamIds:n}),{userActionableCount:E,userActionableInternalCount:C,nonTeamOrgMembers:k,externalMembers:v,externalPrimaryScIdentityTokens:S,externalCount:I,internalCount:w,externalEmails:T}=x,N=u===tv.InviteTypeScreenExternalPrimaryScIdentity&&v.length+T.length===0||u===tv.InviteTypeScreenExternal,M=p.length===v.length+T.length+(S?.length??0)||0===C,R=u===tv.InviteTypeScreenInternal&&0===k.length||u===tv.InviteTypeScreenOrgMember,P=p.length===w&&0===I,L=N&&M&&this.shouldShowExternalContactAdminScreen()||R&&P&&!o;L&&this.closeModal();let O=[];if(v.length>0){let e=await this.props.getChannelMembershipInfoForUsers({channelId:t.id,userIds:v}),n=e?.membershipInfo||{};O=p.reduce((e,t)=>{let r=n[t.value];return r&&r.isKnown&&!r.isMember&&isExternalMemberTeamNotConnectedOnChannel(t,a)&&e.push(t.value),e},[])}let D=!!(O.length||k.length||E);if((m===eF.D.AllMembers||A.length>0)&&(!D||L)){let e=await this.addMembersToChannel();this.handleWorkspaceUserError(e||void 0),this.state.error||L||r();return}if(!getIsFinalStageOfComprehensibleFlow(t,u,y,l,o,_,f,p,b,n,d,O.length)){let e=getNextComprehensibleScreen(t,u,y,l,o,_,f,p,b,n,d,O.length),a=[...h,e];this.setState(()=>({addToChannelStage:e,comprehensibleNavigationHistory:a}));return}await this.issueComprehensibleInvites(x,O)}onSharedChannelMessageChange(e){let{isEnterprise:t,shouldShowComprehensibleInvites:a}=this.props;if(!a)return null;let n=!t&&(0,aK.A)(e).length,r=aY.t("Sorry, but URLs are not allowed in the custom message. Please remove it and try again.");return n?this.setState(()=>({sharedChannelInviteMessage:e,sharedChannelInviteMessageError:r})):this.setState(()=>({sharedChannelInviteMessage:e,sharedChannelInviteMessageError:""}))}async onSubmit(){let{channel:e}=this.props,{selectedMembers:t}=this.state;this.setState(()=>({error:""}));let a=await this.addMembersToChannel(),n=this.handleWorkspaceUserError(a||void 0),r=this.state.addMembersToChannelResult?.newChannelId||e.id,i=this.canUserAddToChannelWithEmail()?getInviteeOptionsByEntityType(t).emails.map(e=>getInviteeEmail(e)):[];n&&this.sendLegacyEmailInvites({emails:i,addedExistingMembers:!!a?.addedExistingMembers,channelId:r})}onInviteToTeam(){let{filterQuery:e}=this.state,{openInviteModal:t,inviteSource:a}=this.props,n={source:a||ay.K3.ChannelInviteModal};if(e){let t=-1!==e.indexOf("@");n={...n,initialEmail:t?e:null}}this.closeModal(),t(n)}shouldMarkConversationsListPrefsAsStale(){let{channel:{id:e},currentTeam:{id:t}}=this.props,{addToChannelStage:a,shareChannelAccessTypeAvailable:n}=this.state;n&&a===tv.Initial&&(0,a$.Dq)(t,e)}setInviteTypeForComprehensible(e,t){return e?this.setState(()=>({externalAccessType:t})):this.setState(()=>({internalAccessType:t}))}setAccessType=e=>{let{addToChannelStage:t}=this.state,a=t===tv.InviteTypeScreenExternal;this.setInviteTypeForComprehensible(a,e),this.props?.resetCustomMessage()};getEntitiesThatCanBeAddedToChannel(){let{channel:e}=this.props,{selectedMembers:t}=this.state,{members:a,userGroups:n}=getInviteeOptionsByEntityType(t),r=this.getCurrentTeamId();return[...a.reduce((t,a)=>(a&&((0,te.t)(e)&&!(0,eg.g)(a.entity)||(0,ey.nO)(a.entity,r))&&t.push(a.value),t),[]),...n.map(e=>e.value)]}setAddMemberMode(e){this.setState(()=>({addMemberMode:e}))}setShouldSetChannelAsDefault(e){this.setState(()=>({shouldSetChannelAsDefault:e}))}toggleExpandEmailPreview=()=>this.setState(e=>({isNoteEmailPreviewExpanded:!e.isNoteEmailPreviewExpanded}));toggleExpandList=e=>{let t=e||tb.OTHER_TEAM,a=this.state.isListExpandedByTeamId;return a[t]=!a[t],this.setState(()=>({isListExpandedByTeamId:a}))};updateSharedChannelState(e){let{can_create:t,requires_legacy_reconnect:a,requirements:{invitee_teams:n}={},reason:r,connection_limit:i}=e,l=!!t&&!a;this._isMounted&&this.setState(e=>({fetchingShareChannelAccessTypeAvailable:!1,shareChannelAccessTypeAvailable:l,externalAccessType:eE.BD.SharedChannel,channelConnectionLimit:i,isLegacySharedChannel:!t&&r===tX.Fz.LegacyConnectionLimitExceeded,cantShareChannelReason:r,inviteeTeams:n??e.inviteeTeams}))}async checkSharedChannelStatusAndUpdateState(){let{channel:e,checkChannelCanBeShared:t}=this.props,a=await t({channelId:e.id,reason:"channel-invite-modal-can-share-channel"});this.updateSharedChannelState(a)}async issueComprehensibleInvites(e,t){let{channel:a,submitComprehensibleInvitesThunk:n,shouldShowRestrictedMembersStep:r,entryPoint:i,isEnterprise:l,currentTeam:o,experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:s,onMembersAdded:c,canInviteOrRequestInvites:d,sharedChannelInviteRequestedPref:m}=this.props,{isExternalLimited:u,internalAccessType:p,externalAccessType:h,sharedChannelInviteMessage:_,shareChannelAccessTypeAvailable:f,selectedWorkspaceId:b}=this.state;this.setState(()=>({isSubmitting:!0}));let g=await this.addMembersToChannel(!1),y=[];m&&(y=g?.userInviteResults.filter(e=>e.isRequestedInvite)??[]);let A=void 0!==u||r?{isExternalLimited:!!u}:{},x=l?b:o?.id,{externalEmails:E,internalEmails:C,nonTeamOrgMembers:k,externalPrimaryScIdentityTokens:v}=e,S=await n({internalAccessType:p,externalAccessType:h,targetChannelId:g?.newChannelId?g?.newChannelId:a.id,internalInvites:d?C:[],externalInvites:f?E:[],externalPrimaryScIdentityInvites:f?v:[],nonTeamOrgMemberEmails:d?k:[],trackingId:this.props.trackingId,inviteNote:_,externalUserIds:f?t:[],isExternallySharedChannel:s?(0,j.ju)(a):void 0,experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:s,...A,entryPoint:i,targetTeamId:x,inviteSource:this.props.inviteSource}),I=[...g?.groupInviteResults||[],...g?.userInviteResults||[]].some(e=>!1===e.ok);if(0!==S.length||I||0!==y.length){let e=S.filter(e=>e.ok);e.length>0&&i===eJ.kP.CanvasTemplate&&c?.(e.map(e=>e.invitee)),this.setState(()=>({isSubmitting:!1,addToChannelStage:tv.ConfirmationScreen,emailInviteResults:S,isExternalLimited:A.isExternalLimited}))}else this.closeModal()}async addMembersToChannel(e=!0){let{channel:t,setChannelDefaultState:a,keepChannelHistory:n,onMembersAdded:r,addUsersAndGroupsToChannelThunk:i,shouldSkipInitialStage:l,entryPoint:o,sharedChannelInviteRequestedPref:s}=this.props,{shouldSetChannelAsDefault:c,selectedMembers:d,addMemberMode:m}=this.state,u=this.getCurrentTeamId();e&&this.setState(()=>({isSubmitting:!0})),c&&a({channelId:t.id,setAsDefault:c});try{let a=await i({selectedMembers:d,addMemberMode:m,channel:t,keepChannelHistory:n,teamId:u,shouldSkipInitialStage:l});this.setState(()=>({addMembersToChannelResult:a,...e&&{isSubmitting:!1},isSubmitting:!1}));let c=a?.userInviteResults?.reduce((e,t)=>(s&&t.ok&&t.isRequestedInvite||t.ok&&e.push(t.invitee),e),[]);return o!==eJ.kP.CanvasTemplate&&r?.(c),a}catch(e){return this.handleInviteError(e,eE.T0.User,n)}}canUserAddToChannelWithEmail(){let{shareChannelAccessTypeAvailable:e}=this.state,{inEmailInvitesDay1Experience:t,canInviteOrRequestInvites:a,isTeamFree:n}=this.props;return t||!n&&(a||e)}async sendLegacyEmailInvites({emails:e,addedExistingMembers:t,channelId:a}){let{selectedMembers:n,selectedWorkspaceId:r}=this.state,{isEnterprise:i,currentTeam:l,onMembersAdded:o,entryPoint:s,inviteSource:c}=this.props,{keepChannelHistory:d,sendLegacyEmailInvitesThunk:m,clogger:u,openInviteModal:p}=this.props,h=i?r:l?.id;try{this.setState(()=>({isSubmitting:!0}));let r=await m({addedExistingMembers:t,channelId:a,emails:e,clogger:u,selectedMembers:n,trackingId:this.props.trackingId,targetTeamId:h,inviteSource:c});if(!r)return;s===eJ.kP.CanvasTemplate&&o?.(r.successfulInvites.map(e=>e.email)),p({sentInvites:[...r.erroredInvites,...r.successfulInvites].map(e=>new eE.LH(e)),source:ay.K3.LegacyInvitesRedirectToConfirmationScreen}),this.setState(()=>({isSubmitting:!1}))}catch(e){this.handleInviteError(e,eE.T0.Email,d),this.setState(()=>({isSubmitting:!1}))}}handleWorkspaceUserError(e){let{keepChannelHistory:t}=this.props,a=e||this.state.addMembersToChannelResult,n=a?.userInviteResults?.length??0;for(let e=0;e<n;e++){let n=a?.userInviteResults[e];if(n&&!n.ok)return this.handleInviteError({name:n.error,message:""},n.inviteeType,t),!1}return!0}handleInviteError(e,t,a){let n,{channelName:r,currentTeamName:i,onMemberAddedError:l}=this.props;if(l)return l((0,p.iT)(e));let o=(0,p.WY)(e)||"",s={errorKey:o,inviteeType:t,accesstype:eE.BD.Member,channelName:r,currentTeamName:i};if(e instanceof Error&&"isInviteError"in e&&e.isInviteError&&(n=(0,aH.l)(s)),!n){let t;if((0,p.hl)(e)){let{data:a}=e;if(Array.isArray(a.errors)&&a.errors.length){let e=a.errors[0];t="string"==typeof e.error?e.error:void 0}}let a=t||o;n=(0,aH.l)({...s,errorKey:a},!1,null,!1)}n=n||aY.t("Hmm, something went wrong. Try again?"),this.setState(()=>({error:n,isSubmitting:!1,addToChannelStage:tv.Initial})),aQ.error(`Error from ${a?"channel invite":"create new channel"} action: ${e}`)}canUserInviteToWorkspace(){let{currentMemberIsAdminInChannel:e,keepChannelHistory:t}=this.props;return e&&t}closeModal(){let{isFromCreate:e,modernCloseModal:t,onClose:a,maybeShowChannelConnectCoachmark:n,channelId:r,showProgressiveDisclosureChannelCreateExplainer:i,currentMegaphonePDTip:l,isProgressiveDisclosureEnabledAddChannels:o,transitionFocusTo:s,setProgressiveDisclosureAddChannelTipAsCompleted:c,setShouldShowProgDiscSuccessCoachmark:d,handleProgressiveDisclosureOrganicUseAddChannels:m,resetCustomMessage:u,recordInviteModalClosed:p}=this.props,{addToChannelStage:h}=this.state;e&&(h!==tv.ConfirmationScreen&&n(r),s({focusKey:az.Ay.MESSAGE_PANE_MESSAGE_INPUT,forceFocus:!0}),i?(c(l),d()):o&&m()),p(),t(),a?.(),u()}closeModalAndClog=()=>{let{clogCloseModal:e}=e4(this.props.trackingId,this.props.clogger);e(),this.closeModal()};handleInputClogAndSubmit(){let{selectedMembers:e}=this.state,{shouldShowComprehensibleInvites:t,channel:a,clogger:n,recordInviteModalClosed:r}=this.props,{clogSubmitInvite:i,clogSubmitEmailInvite:l,clogUpdateInviteInput:o}=e4(this.props.trackingId,n);return(r(),o(),i(),this.canUserAddToChannelWithEmail()&&l({channel:a,eventId:t?e2.EventId.COMPREHENSIBLE_INVITES:e2.EventId.ADD_TO_CHANNEL,tokens:e}),t)?this.onSubmitComprehensibleInvites():this.onSubmit()}removeErrorTokens(e,t){let{nonErrors:a,errors:n}=aW({inviteeOptions:this.state.selectedMembers,errorType:e});this.onSelectedItemsChange(a,t);let{clogger:r}=this.props,{clogRemoveErrors:i}=e4(this.props.trackingId,r);i({errorType:e,removeCount:n.length})}shouldShowExternalContactAdminScreen(){let{shareChannelAccessTypeAvailable:e,addToChannelStage:t}=this.state,a=t===tv.InviteTypeScreenExternal,n=t===tv.InviteTypeScreenExternalPrimaryScIdentity;return(a||n)&&!e}removeExtraEmails(){this.setState(({selectedMembers:e})=>({selectedMembers:((e,{limit:t})=>{if(!t&&0!==t)return e;let a=0;return e.reduce((e,n)=>((0,w.wX)(n)?(a+=1)<=t&&e.push(n):e.push(n),e),[])})(e,{limit:eB.Vd})}))}getContextValue(){let{selectedMembers:e,addMemberMode:t,internalAccessType:a,externalAccessType:n,inviteeTeams:r}=this.state;return{invitees:e,onInviteesChange:this.onSelectedItemsChange,inviteMode:t,onInviteModeChange:this.setAddMemberMode,requirements:{inviteeTeams:r},setAccessType:this.setAccessType,toggleInvitesList:this.toggleExpandList,onStepBack:this.onStepBack,onSubmitComprehensibleInvites:this.onSubmitComprehensibleInvites,internalAccessType:a,externalAccessType:n}}getInviteResults(){let{emailInviteResults:e,addMembersToChannelResult:t}=this.state;return[...e,...t?.userInviteResults||[],...t?.groupInviteResults||[]]}toggleExternalLimitedState(){this.setState(e=>({isExternalLimited:!e.isExternalLimited}))}handleExternalLimitedRadioChange(e){let t=e.target.value===aG.l.ExternalLimited;this.setState(()=>({isExternalLimited:t}))}getTokenStrings(){let{channel:e,internalTeamIds:t,shouldDisplayRealNames:a}=this.props,{selectedWorkspaceId:n,selectedMembers:r,externalAccessType:i,internalAccessType:l}=this.state,{externalEmails:o,internalEmails:s,nonTeamOrgMembers:c}=classification_helpers_getClassifiedTokens({selectedMembers:r,currentTeamId:n,channel:e,internalTeamIds:t,options:{forDisplay:!0,shouldDisplayRealNames:a}});return{...c.length&&{nonTeamOrgMembers:c},...l===eE.BD.Member&&{internalEmails:s},...i===eE.BD.Member&&{externalEmails:o}}}ContextProviderWrapper(e){return l.createElement(ChannelInviteModalContextProvider,{value:this.getContextValue()},e)}renderConfirmationScreen(){let{channel:e,channelName:t,entryPoint:a,canUserActAsAdminForWorkspace:n,customMessage:r}=this.props,{isExternalLimited:i}=this.state,o=this.getInviteResults(),s=this.getCurrentTeamId(),c=n(s);return l.createElement(aB.k5,{inviteResults:o,channelId:e.id,channelName:t,origin:"channel-invite",isExternalLimited:i,comprehensibleEntryPoint:a,currentMemberIsAdmin:c,workspaceId:s,customMessage:r})}renderInviteTypeScreen(){let e,t,{canInviteOrRequestInvites:a,channel:n,currentTeamName:r,keepChannelHistory:i,shouldDisplayRealNames:o,shouldShowRestrictedMembersStep:s,internalTeamIds:c,isEligibleChannelForWorkspaceSelection:d,isEligibleAutoChargeFeatureTrial:m}=this.props,{externalAccessType:u,internalAccessType:p,isEmailListExpanded:h,isListExpandedByTeamId:_,selectedMembers:f,shareChannelAccessTypeAvailable:b,addToChannelStage:g,isLegacySharedChannel:y,channelConnectionLimit:A,cantShareChannelReason:x}=this.state,E=g===tv.InviteTypeScreenExternal,C=g===tv.InviteTypeScreenExternalPrimaryScIdentity,k=g===tv.InviteTypeScreenOrgMember;e=k?eE.BD.Member:!b&&a?p:b&&!a||E||C?u:p;let v=this.getCurrentTeamId(),{userActionableExternalCount:S,userActionableExternalPrimaryScIdentityCount:I,userActionableInternalCount:w,externalEmails:T,internalEmails:N,externalMembers:M,nonTeamOrgMembers:R,externalPrimaryScIdentityTokens:P}=classification_helpers_getClassifiedTokens({selectedMembers:f,currentTeamId:v,channel:n,internalTeamIds:c,options:{forDisplay:!0,shouldDisplayRealNames:o}});E?(t=T,this.shouldShowExternalContactAdminScreen()&&(t=[...M,...T])):t=C?P.map(getInviteeEmail):R.length&&k?R:N;let L=[I>0,S>0,M.length&&s,w>0,R.length].filter(e=>!!e).length,O=!getIsFinalStageOfComprehensibleFlow(n,g,v,s,a,u,p,f,b,c,d);return this.ContextProviderWrapper(l.createElement(au,{tokenStrings:t,currentTeamName:r,canConvertToExternalSharedChannel:b,channel:n,canInviteOrRequestInvites:a,selectedAccessType:e,willCreateNewChannel:!i,isEmailListExpanded:h,isListExpandedByTeamId:_,numGroupsToProcess:L,hasMoreSteps:O,addToChannelStage:g,isLegacySharedChannel:y,reason:x,channelConnectionLimit:A,onCloseModal:this.closeModalAndClog,isEligibleAutoChargeFeatureTrial:m}))}renderSharedChannelNoteScreen({external:e}){let{channel:t,internalTeamIds:a,shouldShowRestrictedMembersStep:n,canInviteOrRequestInvites:r,isEligibleChannelForWorkspaceSelection:i}=this.props,{addToChannelStage:o,externalAccessType:s,internalAccessType:c,isEmailListExpanded:d,isListExpandedByTeamId:m,selectedMembers:u,sharedChannelInviteMessage:p,sharedChannelInviteMessageError:h,isNoteEmailPreviewExpanded:_,shareChannelAccessTypeAvailable:f}=this.state,b=getIsFinalStageOfComprehensibleFlow(t,o,this.getCurrentTeamId(),n,r,s,c,u,f,a,i);return this.ContextProviderWrapper(l.createElement(ap,{addToChannelStage:o,onStepBack:this.onStepBack,onSubmit:this.onSubmitComprehensibleInvites,processingExternalEmails:e,message:p,error:h,onChange:this.onSharedChannelMessageChange,isFinalStageOfFlow:b,channel:t,toggleExpandList:this.toggleExpandList,isEmailListExpanded:d,isListExpandedByTeamId:m,toggleExpandEmailPreview:this.toggleExpandEmailPreview,isEmailPreviewExpanded:_,onCloseModal:this.closeModalAndClog}))}renderExternalLimitedMemberScreen({external:e}){let{channel:t,internalTeamIds:a,shouldShowRestrictedMembersStep:n,canInviteOrRequestInvites:r,isEligibleChannelForWorkspaceSelection:i}=this.props,{externalAccessType:o,internalAccessType:s,isEmailListExpanded:c,isExternalLimited:d,selectedMembers:m,addToChannelStage:u,shareChannelAccessTypeAvailable:p,isListExpandedByTeamId:h}=this.state,_=getIsFinalStageOfComprehensibleFlow(t,u,this.getCurrentTeamId(),n,r,o,s,m,p,a,i);return this.ContextProviderWrapper(l.createElement(ah,{isExternalLimited:!!d,addToChannelStage:u,channel:t,isEmailListExpanded:c,isListExpandedByTeamId:h,onRadioChange:this.handleExternalLimitedRadioChange,onStepBack:this.onStepBack,onSubmit:this.onSubmitComprehensibleInvites,onToggle:this.toggleExternalLimitedState,processingExternalEmails:e,toggleExpandList:this.toggleExpandList,isFinalStageOfComprehensibleFlow:_,onCloseModal:this.closeModalAndClog}))}renderWorkspacePickerScreen(){let{channel:e,channelInvitableWorkspaces:t,currentTeamName:a}=this.props,{selectedWorkspaceId:n}=this.state;return this.ContextProviderWrapper(l.createElement(a_,{channel:e,onStepBack:this.onStepBack,onSubmit:this.onSubmitComprehensibleInvites,onCloseModal:this.closeModalAndClog,channelInvitableWorkspaces:t,selectedWorkspaceId:n,onSelectWorkspaceId:this.onSelectWorkspaceId,tokenStrings:this.getTokenStrings(),currentTeamName:a}))}renderSubtitle(){let{channel:e,shouldShowComprehensibleInvites:t,isSlackConnectWorkspaceChannel:a,isEligibleForInviteRefreshExp1:n,isEligibleForInviteRefreshExp3:r,currentTeamName:i}=this.props;return!t&&!a&&(n||r)?aY.rt("You can also add email addresses of people who aren\u2019t members of <b>{teamName}</b>",{teamName:i}):l.createElement(y.A,{lines:2},l.createElement(A.A,{channel:e,readChannelIcon:!0}))}renderFooterSpeedbump({cancel:e}){let{shouldShowBulkAddControls:t}=this.state,{isEligibleForInviteRefreshSpeedBump:a,isEligibleForWorkspaceModalExperiment:n}=this.props;return n?l.createElement(aj.w,{onCancel:e,onContinue:this.closeModalAndClog}):a?l.createElement(aq.A,{isChannel:!0,onCancel:e,onContinue:this.closeModalAndClog}):l.createElement(ChannelInviteAddSpeedbump,{shouldShowBulkAddControls:t,onCancel:e,onClose:this.closeModalAndClog})}render(){let{channel:e,isFromCreate:t=!1,canInviteOrRequestInvites:a,shouldSkipInitialStage:n,shouldShowComprehensibleInvites:r,isLoadingComprehensibleInvitesEligibility:i,teamMemberCount:o,isLoadingInitialMembers:s,currentMemberIsAdminInChannel:c,entryPoint:d,canUserInviteInternalUsersInChannel:u,isTeamFree:p,isSlackConnectWorkspaceChannel:h,isEligibleForInviteRefreshSpeedBump:_,isEligibleForInviteRefreshExp1:f,isEligibleForInviteRefreshExp3:g}=this.props,{selectedMembers:y,error:x,isSubmitting:E,unresolvedTokenCount:C,addMemberMode:k,shouldSetChannelAsDefault:v,shouldShowBulkAddControls:S,shouldShowDefaultChannelCreationControls:I,fetchingShareChannelAccessTypeAvailable:w,addToChannelStage:T,shareChannelAccessTypeAvailable:N,filterQuery:M}=this.state,R=w||i||s,P=this.canUserAddToChannelWithEmail(),L=a||N;if(n&&T===tv.Initial)return null;let O=this.props.title||aY.rt("Add people to {channelName}",{channelName:l.createElement(A.A,{channelId:e.id,readChannelIcon:!0})});if(r)switch(T){case tv.ConfirmationScreen:return this.renderConfirmationScreen();case tv.InviteTypeScreenExternalPrimaryScIdentity:case tv.InviteTypeScreenExternal:case tv.InviteTypeScreenInternal:case tv.InviteTypeScreenOrgMember:return this.renderInviteTypeScreen();case tv.ExternalLimitedMemberScreenExternal:return this.renderExternalLimitedMemberScreen({external:!0});case tv.ExternalLimitedMemberScreenInternal:return this.renderExternalLimitedMemberScreen({external:!1});case tv.SharedChannelNoteScreenExternal:return this.renderSharedChannelNoteScreen({external:!0});case tv.SharedChannelNoteScreenInternal:return this.renderSharedChannelNoteScreen({external:!1});case tv.SelectWorkspace:return this.renderWorkspacePickerScreen()}let D=m()(r?"p-channel_invite_modal__comprehensible_invites_header":"p-channel_invite_modal__header"),F=m()("p-channel_invite_modal__footer","padding_top_50",{padding_right_150:r}),U=!!(_&&(f||g)&&!t||S&&!r||y?.length>0&&!r),B=u&&N;return l.createElement(aV.A,{subtype:"channel_invite_modal"},this.ContextProviderWrapper(l.createElement(tI.dW,{isOpen:!0,centered:!0,fullscreen:!1,className:m()({"p-channel_invite_modal__base_modal":r}),closeModal:this.closeModalAndClog,contentLabel:aY.t("Add people to channel"),shouldReturnFocusAfterClose:!t},l.createElement(ModalContentWithSpeedBump,{shouldEnableSpeedBump:U},l.createElement(l.Fragment,null,l.createElement(tI.rQ,null,l.createElement(tI.Rc,{title:O,className:m()(D),subtitle:this.renderSubtitle()})),p||h?null:l.createElement(ChannelManagerRestrictedInvitesAlert,{shareChannelAccessTypeAvailable:N,channel:e}),l.createElement(tI.$m,{className:"p-channel_invite_modal__content"},R?l.createElement(b.A,null):l.createElement(tI.qf,{className:m()({"p-channel_invite_modal__content_section":r})},l.createElement(ChannelInviteForm,{addMemberMode:k,allowEmails:P,canUserInviteToWorkspace:this.canUserInviteToWorkspace(),channel:e,currentMemberIsAdmin:c,entryPoint:d,error:x,isAbleToIssueAtLeastOneInvitationType:L,isFromCreate:t,onFilterQueryChange:this.onFilterQueryChange,onFilterQueryPaste:this.onFilterQueryPaste,onInputFocused:this.onInputFocused,onInviteToTeam:this.onInviteToTeam,onKeyDown:this.onKeyDown,onSelectedItemsChange:this.onSelectedItemsChange,setAddMemberMode:this.setAddMemberMode,setShouldSetChannelAsDefault:this.setShouldSetChannelAsDefault,shouldSetChannelAsDefault:v,shouldShowBulkAddControls:S,shouldShowDefaultChannelCreationControls:I,teamMemberCount:o,trackingId:this.props.trackingId}),l.createElement(MemberErrors,{removeErrorTokens:this.removeErrorTokens,entryPoint:d,channel:e}),l.createElement(ChannelInviteExcessEmails,{emailLimit:eB.Vd,removeExtraEmails:this.removeExtraEmails}),l.createElement(unknown_error,null))),l.createElement(tI.jl,{className:F,renderSpeedBump:this.renderFooterSpeedbump},!R&&l.createElement(tI.ox,{className:m()({"p-channel_invite_modal__footer_actions":!!C})},l.createElement(ChannelInviteFooterActions,{isFromCreate:t,filterQuery:M,addMemberMode:k,shouldSetChannelAsDefault:v,shouldShowBulkAddControls:S,isSubmitting:E,emailLimit:eB.Vd,handleInputClogAndSubmit:this.handleInputClogAndSubmit,onSkipClick:this.onSkipClick,channel:e,removeErrorTokens:this.removeErrorTokens}))),!R&&B?l.createElement(ModalTip,{channel:e}):null)))))}};BaseChannelInviteModal.displayName="BaseChannelInviteModal";var aZ=a(0x154933c60),aJ=a(0x297514cb),aX=a(0x4ba2406),a0=a(0x66f74199),a1=a(0x173b0fabb),a2=a(0x24b37e04d),a4=a(0x6f2cadda),a5=a(0xafce781a),a3=a(0x431513f8),a6=a(0x1e191b98a),a8=a(0x207167a29),a7=a(0x1472af90a),a9=a(0x18632f75a),ne=a(0x127530c80),nt=a(0x143aeed3e),na=a(0x7811ac2f),nn=a(0x19c240367);let handleInvitesResponse=(e,t)=>{let a=[],n=[];return e?(n=e.filter(e=>!e.ok),a=e.filter(e=>e.ok)):n=t.map(e=>({email:e,ok:!1})),{status:a.length===t.length?"success":n.length>0&&n.length<t.length?"partial":"error",erroredInvites:n,successfulInvites:a}},nr=(0,ez.Ay)("Send email invites and add new users to the given channel",async(e,t,{emails:a,channelId:n,inviteType:r,targetTeamId:i,inviteSource:l})=>{let o=t(),s=(0,v._J)(o,i),c=l||"invite_emails_to_channel";if((0,W.J5)({state:o,inviteType:r,team:s})){let t=a.map(e=>({email:e,type:r}));try{await e((0,nn.X)({reason:"send-channel-invite-requests",channels:n,requests:t,restricted:r===eE.BD.MultiChannelGuest,source:c,teamId:s?.id,ultraRestricted:r===eE.BD.SingleChannelGuest}));let i=a.map(e=>({email:e,ok:!0}));return{status:"success",successfulInvites:i,erroredInvites:[]}}catch(r){let e=r?.data?.requests?.filter(e=>!e.ok),t=r?.data?.requests?.filter(e=>e.ok),n=e||a.map(e=>({email:e,ok:!1}));return{status:n.length>0&&n.length<a.length?"partial":"error",topLevelError:r?.data?.error||"error",successfulInvites:t||[],erroredInvites:n}}}let d=a.map(e=>({email:e,type:r})),m=(0,el.BL)(o),u=(0,$.r7)(s),p=(0,tH.iH)(o);try{let t=await e((0,na.S)({reason:"send-workspace-invites-from-channel-invite",source:c,channels:n,restricted:r===eE.BD.MultiChannelGuest,ultraRestricted:r===eE.BD.SingleChannelGuest,invites:d,teamId:s?.id,...!u&&!p&&m&&{extraMessage:m}})),{status:i,erroredInvites:l,successfulInvites:o}=handleInvitesResponse(t.invites,a);return{status:i,erroredInvites:l,successfulInvites:o}}catch(r){let{status:e,erroredInvites:t,successfulInvites:n}=handleInvitesResponse(r?.data?.invites,a);return{status:e,erroredInvites:t,successfulInvites:n,topLevelError:"error"===e&&r?.data?.error?r?.data?.error:void 0}}});nr.meta={name:"addEmailsToChannel",key:"createThunkAddEmailsToChannel",description:"Send email invites and add new users to the given channel"};let clogUsersAddedToChannel=({clogger:e,selectedMembers:t,trackingId:a})=>{let n=t.length;if(!n)return;let r=t.filter(({searcher:e})=>e&&(0,nt.Ay)(e.query).isValid).length,i=t.filter(({pasted:e,fromUnknown:t})=>e||t).length;e.track(e2.EventId.INVITE_CHANNEL,{contexts:{channel_invite_internal_total_token_count:n,channel_invite_internal_email_token_count:r,channel_invite_input_pasted_token_count:i,tracking_id:a,ui_context:{is_primary_cta:!0,step:e2.UiStep.ADD_PEOPLE_MODAL,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.BUTTON,element_name:"add_to_channel"}}}})},ni=(0,ez.Ay)("Issue member invites through the add people modal for free teams",async(e,t,{addedExistingMembers:a,channelId:n,emails:r,clogger:i,selectedMembers:l,trackingId:o,targetTeamId:s,inviteSource:c})=>{if(!r.length)return clogUsersAddedToChannel({clogger:i,selectedMembers:l,trackingId:o}),e((0,tw.O)()),null;let d=await e(nr({emails:r,channelId:n,inviteType:eE.BD.Member,targetTeamId:s,inviteSource:c}));if(d?.topLevelError&&!a)throw Error(d.topLevelError);return clogUsersAddedToChannel({clogger:i,selectedMembers:l,trackingId:o}),e((0,tw.O)()),d});ni.meta={name:"sendLegacyEmailInvites",key:"createThunkSendLegacyEmailInvites",description:"Issue member invites through the add people modal for free teams"};var nl=a(0x357885ff),no=a(0xe874a88a),ns=a(0x1ec68d6a3);let nc=(0,ez.Ay)("Issue member/guest invite(s) through the add people modal",async(e,t,{emails:a,accessType:n,channelId:r,targetTeamId:i,inviteSource:l})=>{let o=t(),s=(0,ns.Ay)({state:o});if(0===a.length)return no.S.resolve([]);let c=await e(nr({channelId:r,emails:a,inviteType:n,targetTeamId:i,inviteSource:l})),d=[...c.successfulInvites,...c.erroredInvites].map(e=>((e?.error||c?.topLevelError)&&s.error(Error(`error issuing email invite: ${e?.error||c?.topLevelError}`)),{ok:e.ok,invitee:e.email,inviteeType:eE.T0.Email,accessType:n,error:e.ok?void 0:e.error||c.topLevelError,expirationTs:e.expiration_ts}));return no.S.resolve(d)});nc.meta={name:"sendEmailInvites",key:"createThunkSendEmailInvites",description:"Issue member/guest invite(s) through the add people modal"};var nd=a(0x196bae335),nm=a(0x45012309);let clogInviteGeneration=e=>{let t={...e.entryPoint&&{entry_point:e.entryPoint},contexts:{core:{tracking_id:e.trackingId,...e.inviteId&&{invite_id:e.inviteId}},ui_context:{step:e2.UiStep.CONFIRMATION,action:e2.UiAction.CLICK,ui_properties:{element_type:e2.ElementType.MODAL,element_name:e.success?"shared_channel_invite_generated":"shared_channel_invite_generation_error"}}}},a=(0,nm.eo)({state:e.state});a.track(e2.EventId.INVITE_GENERATED,t),a.track(e2.EventId.COMPREHENSIBLE_INVITES,t)},nu=(0,ez.Ay)("Issue shared channel invites through the add people modal",async(e,t,{emails:a,userIds:n,channelId:r,message:i="",trackingId:l,isExternalLimited:o,entryPoint:s})=>{let c,d=t();if(a?.length===0&&n?.length===0)return no.S.resolve([]);let m={channel:r,emails:a,userIds:n,message:i,reason:"channel-invite-modal",trackingId:l,externalLimited:o};m.userIds&&m.userIds?.length!==0||delete m.userIds,m.emails&&m.emails?.length!==0||delete m.emails;let u=[];try{await e((0,nd.H)(m)).then(e=>{let{invite_id:t,requested_invites:a=[]}=e;c=a,clogInviteGeneration({state:d,success:!0,trackingId:l,inviteId:t,entryPoint:s})}),a&&u.push(...a.map(e=>{let t=c.find(t=>t.email===e);return{ok:!0,invitee:e,accessType:eE.BD.SharedChannel,inviteeType:eE.T0.Email,isRequestedInvite:!!t}})),n&&u.push(...n.map(e=>{let t=c.find(t=>t.user_id===e);return{ok:!0,invitee:e,accessType:eE.BD.SharedChannel,inviteeType:eE.T0.Email,isRequestedInvite:!!t}}))}catch(e){clogInviteGeneration({state:d,success:!1,trackingId:l,entryPoint:s}),a&&u.push(...a.map(t=>({ok:!1,invitee:t,accessType:eE.BD.SharedChannel,inviteeType:eE.T0.Email,error:(0,p.iT)(e).name}))),n&&u.push(...n.map(t=>({ok:!1,invitee:t,accessType:eE.BD.SharedChannel,inviteeType:eE.T0.Email,error:(0,p.iT)(e).name})))}return u});nu.meta={name:"sendSharedChannelInvites",key:"createThunkSendSharedChannelInvites",description:"Issue shared channel invites through the add people modal"};let np=(0,ez.Ay)("Issue invitations for internal and external emails in the add people modal",async(e,t,{internalAccessType:a,externalAccessType:n,targetChannelId:r,internalInvites:i,externalInvites:l,externalPrimaryScIdentityInvites:o=[],nonTeamOrgMemberEmails:s,trackingId:c,inviteNote:d,entryPoint:m,externalUserIds:u,isExternalLimited:p,isExternallySharedChannel:h,experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:_,targetTeamId:f,inviteSource:b})=>{let g=[],y=[],A=[],x=o?.map(getInviteeEmail);a===eE.BD.Member&&n===eE.BD.Member?(g=[...l,...i],y=[...x]):a===eE.BD.SharedChannel&&n===eE.BD.SharedChannel?y=[...x,...l,...i]:a===eE.BD.SharedChannel&&n===eE.BD.Member?(y=[...i,...x],g=l):(y=[...x,...l],g=i),s.length&&(g=g.concat(s)),g.length>0&&A.push(no.S.resolve(e(nc({emails:g,accessType:eE.BD.Member,channelId:r,targetTeamId:f,inviteSource:b})))),y.length>0&&A.push(no.S.resolve(e(nu({emails:y,channelId:r,message:d,trackingId:c,isExternalLimited:_&&h?void 0:p,entryPoint:m})))),u?.length&&A.push(no.S.resolve(e(nu({userIds:u,channelId:r,message:d,trackingId:c,isExternalLimited:p,entryPoint:m}))));let E=await no.S.all(A),C=(0,nl.A)(E),withExternalLimited=e=>_?(0,tl.OP)({externalUserIds:u,inviteResults:e,isExternalLimitedSelection:p,isExternallySharedChannel:h}):e;if(o){let e=Object.fromEntries(o.map(e=>[getInviteeEmail(e),e.emailTeam]));return withExternalLimited(C.map(t=>{let a=e[t.invitee];return a?{...t,primaryScTeam:a}:t}))}return withExternalLimited(C)});np.meta={name:"submitComprehensibleInvitations",key:"createThunkSubmitComprehensibleInvitations",description:"Issue invitations for internal and external emails in the add people modal"};var nh=a(0x82980ab8),n_=a(0xc7bce91f);let ChannelInviteModal=e=>{let t,{channelId:a,entryPoint:n=eJ.kP.Unknown,initialSelectedMemberIds:r=[],initialSelectedEmails:i=[],keepChannelHistory:d=!0}=e,m=(({channelId:e,initialSelectedMemberIds:t})=>{let a,n,r,i,o,s,{channel:c,...d}=use_channel_invite_mapped_props_useInviteChannelProps({channelId:e}),m=(a=(0,k.d4)(e=>"treatment"===(0,ei._Z)(e,"elm_channel_invite_limited_access_choice_present")),n=(0,k.d4)(ep.qh),r=(0,k.d4)(eu.L9),i=(0,k.d4)(eh.Y),o=(0,k.d4)(T.A),s=(0,k.d4)(N.Ah),(0,l.useMemo)(()=>({experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:a,isProgressiveDisclosureEnabledAddChannels:n,isEligibleAutoChargeFeatureTrial:r,isEligibleForInviteRefreshSpeedBump:i,isEligibleForInviteRefreshExp1:o,isEligibleForInviteRefreshExp3:s}),[a,n,r,i,o,s])),u=(({channel:e})=>{let t=(0,k.d4)(et.WR),a=(0,k.d4)(t=>(0,Y.S4)(t,e));return{currentUserId:t,currentMemberIsAdminInChannel:a,canUserActAsAdminForWorkspace:(0,k.d4)(e=>t=>(0,Y.Me)(e,t)),canUserInviteInternalUsersInChannel:(0,k.d4)(t=>(0,C.Q)(t,e))}})({channel:c}),p=use_channel_invite_mapped_props_useInviteTeamProps(),h=useComprehensibleInvitesProps({channel:c}),_=(({channel:e})=>{let t=(0,k.d4)(t=>!(0,z.b)(t,e)),a=(0,k.d4)(t=>(0,P.A)(t,e))||[],n=(0,k.d4)(t=>(0,G.D7)(t,e.id)),r=(0,k.d4)(t=>(0,q.S)(t,e)),i=(0,k.d4)(e=>t=>get_invites_by_team_getExternalMemberInvitesByTeam(e,{invitees:t})),l=(0,k.d4)(t=>(0,er.Q)(t,"shared_channel_invite_requested",e.id)??!1);return{isHostTeam:t,connectedTeamIds:a,canUserInviteExternalMembersToChannel:n,shouldShowRestrictedMembersStep:r,isChannelExternallyShared:(0,j.ju)(e),getExternalMemberInvitesByTeam:i,sharedChannelInviteRequestedPref:l}})({channel:c}),f=(0,k.d4)(e=>{let a=t?.reduce((t,a)=>{let n=(0,ec.nv)(e,a);return n&&t.push(n),t},[]);return a.length>0?a:I.Ml}),b=(0,k.d4)(e=>t=>(0,ec.nv)(e,t)),g=(0,k.d4)(e=>(0,ep.Wg)(e,{tip:e_.ml.AddChannels})),y=(0,k.d4)(Q.e),A=(0,k.d4)(e=>(0,Z.Cy)({state:e})),x=(0,k.d4)(e=>(0,U.R)(e,c)),E=(0,k.d4)(ep.Mt);return{channel:c,...d,...m,...u,...p,...h,..._,initialSelectedMembers:f,getMemberInfoById:b,showProgressiveDisclosureChannelCreateExplainer:g,clogger:y,telemeter:A,isSlackConnectWorkspaceChannel:x,isEligibleForWorkspaceModalExperiment:E}})({channelId:a,initialSelectedMemberIds:r}),u=(t=(0,ev.wA)(),(0,l.useMemo)(()=>({modernCloseModal:(...e)=>t((0,tw.O)(...e)),addMembersToChannel:(...e)=>t((0,aZ.Cw)(...e)),getChannelMembershipInfoForUsers:(...e)=>t((0,e$.z)(...e)),openInviteModal:(...e)=>t((0,aX.A)(...e)),setChannelDefaultState:(...e)=>t((0,aZ.Ex)(...e)),checkChannelCanBeShared:(...e)=>t((0,tX.yp)(...e)),addUsersAndGroupsToChannelThunk:(...e)=>t((0,ne.Fj)(...e)),sendLegacyEmailInvitesThunk:(...e)=>t(ni(...e)),submitComprehensibleInvitesThunk:(...e)=>t(np(...e)),handleProgressiveDisclosureOrganicUseAddChannels:()=>t((0,a8.F)({tip:e_.ml.AddChannels})),setProgressiveDisclosureAddChannelTipAsCompleted:e=>t((0,a5.iR)({event:{type:es.jo.CHANNEL_CREATED,current_notification:e}})),setShouldShowProgDiscSuccessCoachmark:()=>setTimeout(()=>{t((0,a2.J)(!0))},1500),maybeShowChannelConnectCoachmark:e=>t((0,a0.C)({channelId:e,showInviteCoachmark:!0})),removeSharedChannelLegacyRestriction:(...e)=>t((0,aJ.y)(...e)),fetchTrialEligibility:()=>t((0,a3.A)({campaignType:eB.gb,campaignSubType:eB.kq,context:a6.y.channelInviteModal,reason:"channel_invite_modal"})),setIsLoadingInitialMembers:e=>t((0,a1.$P)(e)),resetCustomMessage:()=>t((0,a4.hv)("")),recordInviteModalClosed:()=>t((0,a9.z)({component:a7.G7.ChannelInviteModalClosed,type:a7.X8.Dismiss,reason:"channel_invite_modal"}))}),[t])),{transitionFocusTo:p}=(0,l.useContext)(c.Ay),{initialSelectedMembers:h,currentUserId:_,isLoadingComprehensibleInvitesEligibility:f,shouldShowComprehensibleInvites:b}=m,g=(0,l.useMemo)(()=>{let e=[...i];return h?.forEach(t=>e.push({key:t.id,value:t.id,entity:t,label:(0,nh.Fh)(t)})),e},[i,h]),y=(0,l.useRef)((0,n_.A)({userId:_,version:(0,s.HF)()})),A=l.createElement(BaseChannelInviteModal,{initialSelectedOptions:g,trackingId:y.current,transitionFocusTo:p,keepChannelHistory:d,entryPoint:n,...m,...u,...e});return f?A:l.createElement(o.A,{eventId:b?e2.EventId.COMPREHENSIBLE_INVITES:e2.EventId.CHANNEL_INVITE_MODAL,entryPoint:n||eJ.kP.Unknown,clogImpression:!0},A)};ChannelInviteModal.displayName="ChannelInviteModal"},0x22a5e6ce2:(e,t,a)=>{"use strict";a.d(t,{t:()=>N});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x1d2cd7755),o=a(0x139c79d16),s=a(0xa5dbe09b),c=a(0x17d5374a6),d=a(0x11b9ca92b),m=a(0x133eee6c1),u=a(0xfe3b01df),p=a(0x182c9b0b0),h=a(0x12185e091),_=a(0x1ecc7f772),f=a(0x143fb6398),b=a(0x223cf0126),g=a(0x795b02ed),y=a(0x40b0507e),A=a(0x1c91944c9),x=a(0x11c82607b),E=a(0x133608fc),C=a(0x217553e42),k=a(0x14149c126),v=a(0x1fcbb004d),S=a(0x46dbff89);let I=new i.Ay("channel_invite"),w=(0,x.Ay)("Opens the Sonic Channel Invite Modal in client",(e,t,{openModalProps:a,...r})=>{let i=t(),l=r.channelId,o="on"===(0,k._Z)(i,"sc_cls_inviter_error");(0,y.A)(i,l)?o?e((0,S.q)({element:n.createElement(d.A,{channelId:l}),isStackable:!0})):e((0,E.U)({channel:r.channelId,source:u.y.AddPeople})):e((0,S.q)({element:n.createElement(c.s,r),...a}))});w.meta={name:"openChannelInviteModal",key:"createThunkOpenChannelInviteModal",description:"Opens the Sonic Channel Invite Modal in client"};let T=class extends n.Component{_isMounted=!1;constructor(e){super(e),this.state={keepChannelHistory:!0},this.onRadioButtonChange=this.onRadioButtonChange.bind(this),this.submitOnGoAction=this.submitOnGoAction.bind(this)}componentDidMount(){this._isMounted=!0}shouldComponentUpdate(e){return!(this._isMounted&&(0,h.hc)(this.props.channel)&&(0,h.Zx)(e.channel))}componentWillUnmount(){this._isMounted=!1}onRadioButtonChange(e){let t=e.target.value;this.setState(()=>({keepChannelHistory:"keep_channel_history"===t}))}submitOnGoAction(){let{channel:e,openChannelInviteModal:t=r.A,onMemberAddedError:a,onMembersAdded:n,onClose:i,initialSelectedEmails:l,initialSelectedMemberIds:o,shouldSkipInitialStage:s,closePrivateChannelPrompt:c,entryPoint:d}=this.props,{keepChannelHistory:m}=this.state;return c(),t({channelId:e?.id??"",keepChannelHistory:m,entryPoint:d,onMembersAdded:n,onMemberAddedError:a,onClose:i,openModalProps:{isStackable:!0},...l&&{initialSelectedEmails:l},...o&&{initialSelectedMemberIds:o},...s&&{shouldSkipInitialStage:s}})}renderLimitedInviteDialog(){let{channelName:e,onClose:t}=this.props;return n.createElement(m.A,{title:I.t("Anyone you add will be able to see all of the channel\u2019s contents"),goButtonText:I.t("Add to channel"),onGo:this.submitOnGoAction,onClose:t,showCancelButton:!0,truncateTitle:!1,shouldCloseOnGo:!1},I.rt("New members will be able to see all of <strong>{channelName}</strong>\u2019s history, including any files that have been shared in the channel",{channelName:n.createElement("strong",null,e)}))}renderKeepChannelHistoryLabel(){let{channelName:e}=this.props;return n.createElement("p",null,n.createElement("strong",null,I.rt("Add to {channelName}",{channelName:e})),n.createElement("br",null),I.t("Add new members to the existing channel"))}renderCreateNewChannelLabel(){return n.createElement("p",null,n.createElement("strong",null,I.t("Create a new channel")),n.createElement("br",null),I.t("Slack will archive the existing channel and automatically invite all of its members to a new channel."))}renderRadioButtons(){let{channelName:e}=this.props,t=this.renderKeepChannelHistoryLabel(),a=this.renderCreateNewChannelLabel(),r="channel_history";return n.createElement(n.Fragment,null,n.createElement("p",null,I.rt("New members will be able to see all of <b>{channelName}</b>\u2019s history, including any files that have been shared in the channel. If you\u2019d like, you can create a new channel instead.",{channelName:e})),n.createElement(s.A,null,n.createElement(l.A,{text:t,htmlFor:`${r}-1`,type:"inline",cursor:"pointer"},n.createElement(o.A,{id:`${r}-1`,name:r,value:"keep_channel_history",checked:this.state.keepChannelHistory,onChange:this.onRadioButtonChange,"data-qa":"keep-channel-history",autoFocus:!0})),n.createElement(l.A,{text:a,htmlFor:`${r}-2`,type:"inline",cursor:"pointer"},n.createElement(o.A,{id:`${r}-2`,name:r,value:"create_new_channel",checked:!this.state.keepChannelHistory,onChange:this.onRadioButtonChange,"data-qa":"create-new-channel"}))))}render(){let{isLimitedInvite:e,onClose:t}=this.props;return e?this.renderLimitedInviteDialog():n.createElement(m.A,{title:I.t("Anyone you add will be able to see all of the channel\u2019s contents"),goButtonText:I.t("Continue"),onGo:this.submitOnGoAction,onClose:t,shouldCloseOnGo:!1,truncateTitle:!1,showCancelButton:!0},this.renderRadioButtons())}};T.displayName="BasePrivateChannelPrompt";let N=(0,p.A)((0,A.N)((e,{channelId:t,getPrimaryView:a})=>{let n=(0,C.OL)(e,t,!1),r=!(0,g.R)(e)||!(0,b.yG)(e)||(0,f.ju)(n);if((0,h.QR)(n)){let t=a(e)?.id;n=(0,C.OL)(e,t)}return{channel:n,isLimitedInvite:r,channelName:(0,_.SB)(e,n)??""}},e=>({openChannelInviteModal:t=>e(w(t)),closePrivateChannelPrompt:()=>e((0,v.O)())}))(T))},0x173dc9976:(e,t,a)=>{"use strict";a.d(t,{H:()=>ChannelInviteListRow});var n=a(0xbad225b5),r=a(0x6d6f08a7),i=a(0x10d53599f),l=a(0x161781f25),o=a(0x4f725d55),s=a(0xd2fa49d0);let ChannelInviteListRow=({option:e,isActive:t=!1})=>{let a=e.value,c=(0,n.useCallback)(()=>n.createElement("span",{"data-qa":"channel_invite_secondary_content"},e.inviteExceptionReason||e.secondaryContent||""),[e.inviteExceptionReason,e.secondaryContent]),d=null;return e?.entity?.isEmail?d=n.createElement(r.A,{email:e.label}):(0,o.A)(a)?d=n.createElement(i.A,{showPresence:!0,showAvatar:!0,id:a,isActive:t,isDisabled:!!e.inviteExceptionReason,secondaryContent:c()}):(0,s.A)(a)&&(d=n.createElement(l.A,{id:a,isActive:t,isDisabled:!!e.inviteExceptionReason,secondaryContent:c()})),n.createElement("div",{className:"display_flex"},d)};ChannelInviteListRow.displayName="ChannelInviteListRow"},0x17cd49de0:(e,t,a)=>{"use strict";a.d(t,{Es:()=>EmailInviteNote,JN:()=>h,xb:()=>p});var n=a(0xbad225b5),r=a(0x40c0d834),i=a(0x20482ad21),l=a(0x5299a396),o=a(0x1d909694),s=a(0xe38b5635),c=a(0x3711e82d),d=a(0x22fc52cce),m=a.n(d);let u=new i.Ay("channel_invite"),p="email_invite_note_input",h="email_invite_note_preview",EmailInviteNote=({onChange:e,message:t,error:a,emailList:i,channel:d,autoClogProps:_,isEmailPreviewExpanded:f,customPlaceholder:b,maxCharacterLength:g=560,ariaLabel:y,isSlackConnectInvite:A})=>{let x=(0,n.useRef)(null),E=b??u.t("Ex. Let\u2019s use this Slack channel for\u2026"),C=(0,n.useMemo)(()=>n.createElement("div",{className:"p-comprehensible_invites_invite_note_input"},n.createElement(l.A,{id:p,ref:x,name:"message-input",className:"margin_bottom_0",placeholder:E,value:t,errorText:a,maxCharacterLimit:g,"data-qa":"shared_channel_note_screen_message_input",useInlineAlert:!!a,onChange:e,focusOnMount:!f,"aria-label":y?`${y} ${E}`:void 0})),[y,a,f,g,t,e,E]);return n.createElement("div",{className:m().emailInvite},f&&d?n.createElement(r.A,{eventId:c.EventId.COMPREHENSIBLE_INVITES,uiStep:c.UiStep.SHARED_CHANNEL_NOTE,..._,clogImpression:!0},n.createElement("div",{id:h},n.createElement(s.A,{className:m().emailInviteCardContainer,size:"small"},n.createElement(o.c,{emailList:i,noteInput:C,isSlackConnectInvite:A})))):C)};EmailInviteNote.displayName="EmailInviteNote"},0x1d909694:(e,t,a)=>{"use strict";a.d(t,{c:()=>EmailInvitePreview});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21343fa5a),l=a(0x8c8bafa3),o=a(0x20482ad21),s=a(0x16ac9b089),c=a(0x1535e80f3),d=a(0x1c659cbb1),m=a(0x1edd896c2),u=a(0x2376ea9bb),p=a(0x1d4bee1c7),h=a(0x1b9d5cc0c),_=a(0xa1832ae4),f=a(0x226892387),b=a(0x19c76d181),g=a(0x1fb2d2a87),y=a(0xe684f705),A=a(0x1cf0d97e1),x=a(0x11c82607b),E=a(0xce702808),C=a(0x14149c126);(0,A.Ay)(e=>(0,C.ze)(e,"sc_email_accept_improvements_v2")).meta={name:"scEmailAcceptImprovementsV2GetAssignment",key:"createSelectorScEmailAcceptImprovementsV2GetAssignment",description:e=>(0,C.ze)(e,"sc_email_accept_improvements_v2")};let k=(0,A.Ay)(e=>"control"===(0,C.ze)(e,"sc_email_accept_improvements_v2"));k.meta={name:"scEmailAcceptImprovementsV2IsControl",key:"createSelectorScEmailAcceptImprovementsV2IsControl",description:e=>"control"===(0,C.ze)(e,"sc_email_accept_improvements_v2")},(0,A.Ay)(e=>"treatment_a"===(0,C.ze)(e,"sc_email_accept_improvements_v2")).meta={name:"scEmailAcceptImprovementsV2IsTreatmentA",key:"createSelectorScEmailAcceptImprovementsV2IsTreatmentA",description:e=>"treatment_a"===(0,C.ze)(e,"sc_email_accept_improvements_v2")},(0,A.Ay)(e=>"treatment_b"===(0,C.ze)(e,"sc_email_accept_improvements_v2")).meta={name:"scEmailAcceptImprovementsV2IsTreatmentB",key:"createSelectorScEmailAcceptImprovementsV2IsTreatmentB",description:e=>"treatment_b"===(0,C.ze)(e,"sc_email_accept_improvements_v2")},(0,A.Ay)(e=>"treatment_c"===(0,C.ze)(e,"sc_email_accept_improvements_v2")).meta={name:"scEmailAcceptImprovementsV2IsTreatmentC",key:"createSelectorScEmailAcceptImprovementsV2IsTreatmentC",description:e=>"treatment_c"===(0,C.ze)(e,"sc_email_accept_improvements_v2")},(0,A.Ay)(e=>"treatment_d"===(0,C.ze)(e,"sc_email_accept_improvements_v2")).meta={name:"scEmailAcceptImprovementsV2IsTreatmentD",key:"createSelectorScEmailAcceptImprovementsV2IsTreatmentD",description:e=>"treatment_d"===(0,C.ze)(e,"sc_email_accept_improvements_v2")};let v=(0,A.Ay)(e=>["treatment_a","treatment_b","treatment_c","treatment_d"].includes((0,C.ze)(e,"sc_email_accept_improvements_v2")??""));v.meta={name:"scEmailAcceptImprovementsV2IsAnyTreatment",key:"createSelectorScEmailAcceptImprovementsV2IsAnyTreatment",description:e=>["treatment_a","treatment_b","treatment_c","treatment_d"].includes((0,C.ze)(e,"sc_email_accept_improvements_v2")??"")};let S=(0,A.Ay)(e=>k(e)||v(e));S.meta={name:"scEmailAcceptImprovementsV2IsExposed",key:"createSelectorScEmailAcceptImprovementsV2IsExposed",description:e=>k(e)||v(e)};let I=(0,A.Ay)(e=>["aa_control","aa_treatment_a","aa_treatment_b","aa_treatment_c","aa_treatment_d"].includes((0,C.ze)(e,"sc_email_accept_improvements_v2")??""));I.meta={name:"scEmailAcceptImprovementsV2IsAAExposed",key:"createSelectorScEmailAcceptImprovementsV2IsAAExposed",description:e=>["aa_control","aa_treatment_a","aa_treatment_b","aa_treatment_c","aa_treatment_d"].includes((0,C.ze)(e,"sc_email_accept_improvements_v2")??"")};let w=(0,x.Ay)("Log exposure for the sc_email_accept_improvements_v2 experiment if it is exposed",(e,t,{sendImmediately:a=!1}={})=>{let n=t();(S(n)||I(n))&&((e,{sendImmediately:t=!1}={})=>{let a=(0,C.KK)(e,"sc_email_accept_improvements_v2");a&&a.log_exposures&&(0,E.K)("sc_email_accept_improvements_v2",a,e,t)})(n,{sendImmediately:a})});w.meta={name:"scEmailAcceptImprovementsV2MaybeLogExposure",key:"createThunkScEmailAcceptImprovementsV2MaybeLogExposure",description:"Log exposure for the sc_email_accept_improvements_v2 experiment if it is exposed"};var T=a(0x1ee439e69),N=a(0x32f91a1e),M=a.n(N);let R=new o.Ay("channel_invite"),P=(0,l.Xk)(),EmailInvitePreview=({emailList:e,channelList:t,noteInput:a,isGuestInvite:l,isSlackConnectInvite:o})=>{let A=(0,r.wA)(),x=(0,f.d4)(b.WR),E=(0,f.d4)(e=>(0,y.nv)(e,x)),C=(0,h.zY)(E),k=(0,f.d4)(g.to),S=(0,f.d4)(T.Yc),I=(0,h.xJ)(E),N=(0,f.d4)(v),L=E?.real_name||(E?.name??""),O=o?R.t("{realName} invited you to work together in Slack",{realName:(0,s.Ay)(L)}):R.t("{realName} has invited you to work with them in Slack",{realName:(0,s.Ay)(L)});(0,i.A)(()=>{o&&A(w())});let D=(0,n.useCallback)(()=>l&&t&&t.length>0?1===t.length?R.t("You\u2019ve been invited to {channelName} as a guest",{channelName:t[0]}):2===t.length?R.t("You\u2019ve been invited to {channelName1} and {channelName2} as a guest",{channelName1:t[0],channelName2:t[1]}):R.t("You\u2019ve been invited to {channelName} and {ChannelCount} other channels as a guest",{channelName:t[0],ChannelCount:t.length-1}):R.t("The team at {teamName} wants to work together",{teamName:(0,s.Ay)(S.name)}),[t,l,S.name]),F=(0,n.useCallback)(()=>{let e=c.RG.large;return I?n.createElement(n.Fragment,null,n.createElement(d.Ay,{className:M().avatar,size:e,userId:E.id,user:E,tabIndex:-1,isInteractive:!1,"data-qa":"email-invite-preview-member-avatar"}),n.createElement(u.A,{id:S.id,team:S,allowTeamInitials:!0,ariaHidden:!0})):n.createElement(u.A,{id:S.id,team:S,size:e,allowTeamInitials:!0,ariaHidden:!0})},[I,E,S]),U=(0,n.useCallback)(()=>{if(N&&o){let e=R.rt("<span>{realName}</span> from <span>{teamName}</span> invited you to work in Slack",{realName:(0,h.wg)(E),teamName:(0,_.F1)(S)},({tag:e,text:t})=>"span"===e?n.createElement("span",{className:M().emailContentText},t):null);return n.createElement("div",{className:"margin_bottom_25 p-comprehensible_invites_invite_note_email_label p-comprehensible_invites_caption"},n.createElement("div",{className:M().emailInvitePreviewIcons},F()),n.createElement("div",{className:M().emailInvitePreviewContent,"data-qa":"slack-connect-email-invite-preview-content"},e),n.createElement("div",{className:"margin_top_75"},a))}return n.createElement(n.Fragment,null,n.createElement("div",{className:"margin_bottom_25 p-comprehensible_invites_invite_note_email_label p-comprehensible_invites_caption"},R.t("You were invited by")),n.createElement("div",{className:"inline_flex flex_wrap align_items_center p-comprehensible_invites_body"},n.createElement(d.Ay,{className:"margin_right_50",size:c.RG.small,userId:E.id,user:E,tabIndex:-1,isInteractive:!1}),n.createElement("strong",{className:"margin_right_25"},E.real_name),C&&n.createElement("span",null,`(${C})`)),n.createElement("div",{className:"margin_top_75"},a),n.createElement("div",{className:"margin_top_75 margin_bottom_25 p-comprehensible_invites_invite_note_email_label p-comprehensible_invites_caption"},R.t("To work with")),n.createElement("div",{className:"inline_flex flex_wrap align_items_center"},n.createElement(m.G,{id:S.id,className:"margin_right_25"}),`(${(0,_.k7)(S.id,S.domain)}.${P})`))},[N,o,E,C,a,F,S]);return n.createElement(n.Fragment,null,n.createElement("div",null,n.createElement(p.A,{width:80,height:20,className:"p-app_slack_logo",theme:k})),n.createElement("div",{className:"margin_bottom_75 p-comprehensible_invites_body"},n.createElement("strong",null,D())),n.createElement("div",{className:"margin_bottom_25 overflow_ellipsis p-comprehensible_invites_supress_tt p-comprehensible_invites_caption"},n.createElement("span",{className:"p-comprehensible_invites_invite_note_email_label"},R.t("To: ")),n.createElement("span",null,e.join(", "))),n.createElement("div",{className:"p-comprehensible_invites_caption"},n.createElement("span",{className:"p-comprehensible_invites_invite_note_email_label"},R.t("Subject: ")),n.createElement("span",null,O)),n.createElement("hr",{className:"margin_top_75 margin_bottom_75"}),U())};EmailInvitePreview.displayName="EmailInvitePreview"},0x11bf5ef09:(e,t,a)=>{"use strict";a.d(t,{A:()=>B});var n=a(0xbad225b5),r=a(0x424ce7f7),i=a(0xe67fcf33),l=a(0x120c268ad),o=a.n(l),s=a(0x1f355b555),c=a(0x6fe0709b),d=a(0x20482ad21),m=a(0xb97f3675),u=a(0x15811db89),p=a(0x42441247),h=a(0x24f1e08bb),_=a(0x1535e80f3),f=a(0x2501a2cee),b=a(0x4c96e5d9),g=a(0x1c659cbb1),y=a(0x71c724c8),A=a(0x1403dc2ee),x=a(0xf641d034),E=a(0x6b35329),C=a(0xe199fe31),k=a(0x47a6f20a),v=a(0x21d85d6e5),S=a(0xa1832ae4),I=a(0xe739523),w=a(0x770aee07),T=a(0x3711e82d),N=a(0x45012309),M=a(0x1c91944c9),R=a(0x1d600678),P=a(0x217553e42),L=a(0xe684f705),O=a(0x1ee439e69),D=a(0x475c9cfe);let F=new d.Ay("add-to-slack"),InviteListEntity=({invitee:e,primaryScTeam:t,error:a,inviteeType:r,accessType:i,channelId:l,isExternalLimited:d,member:E,channel:C,currentTeamName:k,isInviteRequest:v,isBridgeDisabled:S,externalMemberName:I,userGroup:N,hostTeamName:M,isOriginChannelInviteComprehensible:R=!1,currentMemberIsAdmin:P,isRequestedInvite:L,isInviteeTeamInChannel:O,isTeamExternalLimitedInChannel:D,expirationTs:U,clogger:B})=>{let H=(0,n.useRef)(null),W=i===w.BD.SharedChannel,V=i===w.BD.MultiChannelGuest||i===w.BD.SingleChannelGuest,G=r!==w.T0.Email,q=r===w.T0.UserGroup,j=r===w.T0.Email&&i===w.BD.Member,z=(0,n.useCallback)(()=>R&&!a?null:a?F.t("Couldn\u2019t invite"):G?F.t("Added"):L?F.t("Invitation will be sent using Slack Connect"):W?F.t("Invited using Slack Connect"):V?F.t("Invited as a guest"):F.t("Invited as a coworker"),[a,V,G,R,L,W]),K=(0,n.useCallback)(()=>{let e=o()("p-add_to_slack_confirmation__invite_list_entity_icon_container",{sk_raspberry_red_bg:a},{sk_white:a}),t={name:"paper-plane",size:"18"};return a?t={...t,name:"warning"}:q&&(t={...t,name:"user-groups"}),n.createElement("div",{className:e,"data-qa":A.T$.Icon},n.createElement(f.Ah,{name:t.name,size:t.size,"aria-hidden":!0}))},[a,q]),$=(0,n.useCallback)(()=>t&&!a?n.createElement(g.Ay,{className:"margin_right_75",size:_.RG.medium,team:t,userId:"","data-qa":A.T$.ExternalPrimaryScInviteAvatar,isInteractive:!1}):I&&E&&!a?n.createElement(g.Ay,{className:"margin_right_75",size:_.RG.medium,userId:E.id,"data-qa":A.T$.ExternalMemberAvatar,isInteractive:!1}):R&&W&&!a?n.createElement(g.Ay,{className:"margin_right_75",size:_.RG.medium,"data-qa":A.T$.SlackConnectInviteAvatar,isInteractive:!1}):!R||q||a?K():n.createElement(g.Ay,{className:"margin_right_75",size:_.RG.medium,"data-qa":A.T$.InternalInviteAvatar,isInteractive:!1}),[a,I,R,W,q,E,t,K]),Y=(0,n.useCallback)(()=>n.createElement(p.A,{"data-qa":A.T$.Invitee,className:"bold"},q?N?.name:I||e),[I,e,q,N?.name]),Q=(0,n.useCallback)(()=>{let e;if(!((W||q||j||V)&&!a))return null;if(q&&(e=F.t("{count, plural, =1 {# member} other {# members}}",{count:N?.userCount})),W&&void 0!==d){let t=F.t("Can only post"),a=F.t("Can post & invite");e=L&&O?D?t:a:d?t:a}if((j||V)&&!v&&!a&&U){let t=(0,c.A)(s.Ay.unix(U).toDate(),(0,s.Ay)().startOf("day").toDate());e=F.t("Expires in {daysRemaining} {daysRemaining, plural, =1 {day} other {days}}",{daysRemaining:t})}return e?n.createElement(u.A,{"data-qa":A.T$.Subtext,className:"p-add_to_slack_confirmation__invite_list_entity_subtext"},e):null},[a,U,d,V,v,O,L,W,D,q,j,N?.userCount]),Z=(0,n.useCallback)(()=>r===w.T0.User?n.createElement(y.Ay,{id:e,useShortMode:!0,showPresence:!1,isDraftContext:!1,member:E,showStatus:!1,showSubtext:!1}):n.createElement(m.A,{avatar:$,className:"p-add_to_slack_confirmation__invite_list_entity_primary",size:"medium",text:Y(),subtext:Q()}),[e,r,E,$,Q,Y]),J=(0,n.useCallback)(()=>{if(R&&G&&!a)return null;let e=z(),t=o()("p-add_to_slack_confirmation__invite_list_entity_secondary",{sk_raspberry_red:a},{sk_lilypad_green:G&&!a});return n.createElement("span",{className:t,"data-qa":A.T$.InviteStatusMessage},e,"\xa0",G&&!a?n.createElement("span",{ref:H},n.createElement(f.Ah,{name:"check-circle",size:"inherit","aria-hidden":!0})):n.createElement("span",{ref:H},n.createElement(f.Ah,{name:"info",size:R?"20":"inherit","aria-hidden":!0,tabIndex:0})))},[a,z,G,R]),X=(0,n.useCallback)(()=>{let e=R?T.EventId.COMPREHENSIBLE_INVITES:T.EventId.INVITE_TO_WORKSPACE;B.track(e,{contexts:{ui_context:{ui_step:T.UiStep.CONFIRMATION,action:T.UiAction.HOVER,ui_properties:{element_type:T.ElementType.POPOVER,element_value:`${r} ${i}`}}}})},[i,B,r,R]),ee=n.createElement(h.A,{className:"p-add_to_slack_confirmation__invite_list_entity_base_entity",size:"medium","data-qa":(()=>{if(L)return A.T$.ExternalInviteRequestedSlackConnectInviteEntity;switch(r){case w.T0.Email:return W?A.T$.SlackConnectInviteEntity:A.T$.WorkspaceInviteEntity;case w.T0.UserGroup:return A.T$.UserGroupInviteEntity;default:return A.T$.UserInviteEntity}})(),primaryContent:Z(),secondaryContent:J()}),{tooltipTextContent:et,ariaLabel:ea}=(()=>{let t,n,o=q?N?.name:I||e;if(a){let e={errorKey:a,inviteeType:r,accessType:i,currentTeamName:k,inviteesCount:1},s=l?(0,x.l)({...e,channelId:l,hostTeamName:M},P,C,!0):(0,x.l)(e,P,null,!0);t=s||F.t("Hmm, something went wrong. Try again?"),n=s||F.t("Hmm, something went wrong inviting {name}. Try again?",{name:o})}else L?(t=F.t("Invitation will be sent using Slack Connect"),n=F.t("Invitation to {name} will be sent using Slack Connect",{name:o})):R&&!j?V?(t=v?F.t("Your admin has to review this first."):F.t("Guests will be automatically added to the selected {isMultiChannelGuest, plural, =1 {channels} other {channel}} once they join.",{isMultiChannelGuest:+(i===w.BD.MultiChannelGuest)}),n=v?F.t("Your admin has to review this invite to {name} first.",{name:o}):F.t("{name} will be automatically added to the selected {isMultiChannelGuest, plural, =1 {channels} other {channel}} once they join.",{name:o,isMultiChannelGuest:+(i===w.BD.MultiChannelGuest)})):W&&(t=F.t("Invited using Slack Connect."),n=F.t("{name} was invited using Slack Connect.",{name:o})):j?v?(t=F.t("Your admin has to review this first."),n=F.t("Your admin has to review this invite to {name} first.",{name:o})):S?(t=F.t("They\u2019re not on Slack yet, but you can still message them (they\u2019ll be able to see all direct messages sent to them once they\u2019ve joined)."),n=F.t("{name} is not on Slack yet, but you can still message them (they\u2019ll be able to see all direct messages sent to them once they\u2019ve joined).",{name:o})):(t=F.t("Your coworker isn\u2019t on Slack yet, but you can still message them (they\u2019ll reply by email)."),n=F.t("Your coworker {name} isn\u2019t on Slack yet, but you can still message them (they\u2019ll reply by email).",{name:o})):V?(t=v?F.t("Your admin has to review this first."):F.t("They\u2019ll be automatically added to the selected {isMultiChannelGuest, plural, =1 {channels} other {channel}} once they join.",{isMultiChannelGuest:+(i===w.BD.MultiChannelGuest)}),n=v?F.t("Your admin has to review this invite to {name} first.",{name:o}):F.t("{name} will be automatically added to the selected {isMultiChannelGuest, plural, =1 {channels} other {channel}} once they join.",{name:o,isMultiChannelGuest:+(i===w.BD.MultiChannelGuest)})):(t=F.t("An admin may need to review this invitation."),n=F.t("An admin may need to review this invitation to {name}.",{name:o}));return{tooltipTextContent:t,ariaLabel:n}})();return!G||a?n.createElement(b.Ay,{"data-qa":A.T$.Tooltip,tip:et,"aria-label":ea,tipAnchorRef:H,onShow:X},n.createElement("div",{"data-qa":"tooltip-wrap",className:"p-add_to_slack_confirmation__invite_list_entity"},ee)):ee};InviteListEntity.displayName="InviteListEntity";let U=(0,M.N)((e,{channelId:t,invitee:a,inviteeType:n,accessType:r,workspaceId:i})=>{let l,o=(0,N.eo)({state:e}),s=(0,D.lJ)(e,a),c=(0,P.OL)(e,t),d=(0,L.nv)(e,a),m=(0,O._J)(e,i),u=(0,S.F1)(m),p=(0,C.f)(e,c||void 0)??"",h=(0,E.A)(e,c),_=!!d?.team_id&&h.includes(d.team_id),f=(0,I.A)(e,d?.team_id,c),b=!1;(0,w.LX)(r)&&(b=(0,k.J5)({state:e,inviteType:r,team:m})),d&&n===w.T0.Email&&(l=(0,v.sE)(e,d));let g=!1,y=(0,R.x)(e,"invited_user_preset");return y&&(g=!1===y.enable_invited_user),{...c&&{channel:c},...d&&{member:d},...l&&{externalMemberName:l},...s&&"name"in s&&"user_count"in s&&{userGroup:{name:s.name??"",userCount:s.user_count??0}},currentTeamName:u,isInviteRequest:b,isBridgeDisabled:g,hostTeamName:p,isInviteeTeamInChannel:_,isTeamExternalLimitedInChannel:f,clogger:o}})(InviteListEntity),InvitesSummaryList=({isSuccess:e,inviteResults:t,channelId:a,isExternalLimited:l,experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:o,isOriginChannelInviteComprehensible:s,currentMemberIsAdmin:c,workspaceId:d})=>{if(!t.length)return null;let m=(0,r.A)(t,"inviteeType"),u=m[w.T0.Email]||[],p=(0,r.A)(u,"accessType"),h=[{inviteResults:m[w.T0.User]||[],inviteeType:w.T0.User,accessType:w.BD.Member},{inviteResults:m[w.T0.UserGroup]||[],inviteeType:w.T0.UserGroup,accessType:w.BD.Member},{inviteResults:p[w.BD.SharedChannel]||[],inviteeType:w.T0.Email,accessType:w.BD.SharedChannel},{inviteResults:p[w.BD.Member]||[],inviteeType:w.T0.Email,accessType:w.BD.Member},{inviteResults:p[w.BD.SingleChannelGuest]||[],inviteeType:w.T0.Email,accessType:w.BD.SingleChannelGuest},{inviteResults:p[w.BD.MultiChannelGuest]||[],inviteeType:w.T0.Email,accessType:w.BD.MultiChannelGuest}],_=[],maybeAddResultSummary=e=>{e.inviteResults.length&&e.inviteResults.forEach(e=>{_.push(n.createElement(U,{key:_.length,inviteeType:e.inviteeType,isRequestedInvite:e.isRequestedInvite,primaryScTeam:e.primaryScTeam,accessType:e.accessType,invitee:e.invitee,error:e.error,isExternalLimited:o&&(0,i.A)(e,"isExternalLimited")?e.isExternalLimited:l,isOriginChannelInviteComprehensible:s,currentMemberIsAdmin:c,workspaceId:d,expirationTs:e?.expirationTs,...a&&{channelId:a}}))})};return maybeAddResultSummary.displayName="maybeAddResultSummary",e?h.forEach(maybeAddResultSummary):h.forEach(e=>{let t=(0,r.A)(e.inviteResults,"error");Object.keys(t).forEach(a=>{maybeAddResultSummary({...e,inviteResults:t[a],error:a})})}),n.createElement(n.Fragment,null,_)};InvitesSummaryList.displayName="InvitesSummaryList";let B=InvitesSummaryList},0x1322bcaad:(e,t,a)=>{"use strict";a.d(t,{k5:()=>eA});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1383b91ba),o=a(0x424ce7f7),s=a(0xbe5e39b6),c=a(0x1f022ebd9),d=a(0x40c0d834),m=a(0x20482ad21),u=a(0x2b7f0bcc),p=a(0x1d2cd7755),h=a(0x15f8e452a),_=a(0x210cf696f),f=a(0x10bae7b36),b=a(0x1fdec3e16),g=a(0x247cf31a2),y=a(0xe0376d2),A=a(0x1c0dc4cab),x=a(0x1e864b930),E=a(0x12edaa96a),C=a(0x14abc22b0),k=a(0x45bd075),v=a(0x4c96e5d9),S=a(0x1403dc2ee),I=a(0x597b0f0c),w=a(0x1b9d5cc0c),T=a(0xa1832ae4),N=a(0x190a9df19),M=a(0x770aee07),R=a(0x1ed767a16),P=a(0x1c91944c9),L=a(0x1d600678),O=a(0xabb432ea),D=a(0xd1e4481f),F=a(0xe684f705),U=a(0x1ee439e69);let B=new m.Ay("add-to-slack"),H={elementName:"approved_domains_invites_tip_copy_invite_link",onClick:{enableClogAction:!0}},W={elementName:"approved_domains_invites",onChange:{enableClogAction:!0}},ApprovedDomainsInvitesTip=({successfulInvites:e,onCopy:t,onChange:a,teamUrl:r,approvedSignupDomains:i,canUserSaveDomains:l,currentMemberEmailDomain:o,checkEmailDomains:s,shouldShowComprehensibleInvites:c})=>{let[m,u]=(0,n.useState)(""),[h,f]=(0,n.useState)(!1),[b,g]=(0,n.useState)(!1),{sendMessageToAnnouncerAPI:I}=(0,n.useContext)(C.A),onClickCopy=()=>{let e=`${r}join/signup`;(0,R.x3)(e),I({message:B.t("Copied!"),uuid:(0,E.A)()}),c?g(!0):t()};if((0,n.useEffect)(()=>{let t,a;e.length&&l&&(t=e.reduce((e,t)=>{let a=t.invitee.split("@")[1];return t.accessType!==M.BD.Member||i.includes(a)||e.includes(a)||e.push(a),e},[]),!o||t.includes(o)||i.includes(o)||t.unshift(o),(a=t.join(", "))&&s(a).then(e=>{e.ok?u(e.email_domains):u("")}).catch(()=>{""!==m&&u("")}))},[]),!l||!m)return null;let renderCopyUrlButtonLink=e=>n.createElement(_.A,{onClick:onClickCopy,autoClogProps:H,"data-qa":S.o0.CopyLinkButton},e),w=n.createElement(n.Fragment,null,B.rt("Let anyone with an <strong>{emailDomains}</strong> email join this workspace.",{emailDomains:(0,x.A)(m.split(",").map(e=>`@${e}`),{conj:"or"})})," ",h&&B.rt("To invite those coworkers, <a>copy this link</a>.",{},({tag:e,text:t})=>"a"!==e?null:c?n.createElement(v.Ay,{tip:b?B.t("Copied!"):B.t("Copy"),position:"bottom","data-qa":S.o0.CopyLinkTooltip,onShow:()=>g(!1),...b&&{status:v.YU.Success}},renderCopyUrlButtonLink(t)):renderCopyUrlButtonLink(t)));return n.createElement(d.A,{clogImpression:!0,elementName:"approved_domains_invites_tip"},n.createElement("div",{className:"p-approved_domains_invites_tip","data-qa":"approved_domains_invites_tip"},n.createElement(p.A,{htmlFor:"approved-domains-checkbox",type:"inline",cursor:"pointer",className:"margin_bottom_0",text:n.createElement("span",{className:"display_flex align_items_baseline"},n.createElement(k.A,{onChange:()=>{var e;f(e=!h),a(e?(0,y.A)((0,A.A)(i,m)).join(","):null)},checked:h,id:"approved-domains-checkbox",autoClogProps:W,"data-qa":S.o0.Checkbox}),n.createElement("span",null,w))})))};ApprovedDomainsInvitesTip.displayName="ApprovedDomainsInvitesTip";let V=(0,P.N)(e=>{let t=(0,F.cA)(e),a=(0,w.zY)(t),n=a?.split("@")[1],r=(0,U.H7)(e),i=(0,O.Ts)(e),l=(0,D.On)(e),o=(0,N.Zo)(e),s=(0,L.x)(e,"auth_mode"),c=l===M.BD.Member&&o&&"normal"===s;return{teamUrl:(0,T.Zl)(r),approvedSignupDomains:(0,T.zM)(r),canUserSaveDomains:c,shouldShowComprehensibleInvites:i,...n&&{currentMemberEmailDomain:n}}},e=>({checkEmailDomains:t=>e((0,I.m)({reason:"approved-domains-invites-tip",emailDomains:t}))}))(ApprovedDomainsInvitesTip);var G=a(0x11bf5ef09),q=a(0x161b91aba),j=a(0x1cc7d54cd),z=a(0x21fb96b74),K=a(0x251f9460f),$=a(0xbc562055),Y=a(0x47a6f20a),Q=a(0xb8504a42),Z=a(0x16ef98cf),J=a(0x3711e82d),X=a(0x11439744b),ee=a(0x24f5b5d9b),et=a(0x226892387),ea=a(0x1fb2d2a87),en=a(0xe8e1ae6c),er=a(0xf3c65e54),ei=a(0x5b1935a6),el=a(0x1fcbb004d),eo=a(0x18a17ca8f),es=a(0x8803b5fa),ec=a(0x74bbb29a),ed=a(0x475c9cfe);let em=a.p+"confirmation-dark-5545584.svg",eu=a.p+"confirmation-screen-header-55d05ba.png",ep=a.p+"confirmation-5ae9aa3.svg",eh=a.p+"invitation-dark-6a3399d.svg",e_=a.p+"invitation-light-7121416.svg",ef=new m.Ay("add-to-slack"),eb={elementName:"admin_invites",onClick:{enableClogAction:!0}},eg={elementName:Z.CH.PendingInvitesLink,onClick:{enableClogAction:!0}},ey={elementName:"custom_message_preview",clogImpression:!0,elementType:J.ElementType.COPY},ConfirmationScreen=({userGroupMemberCounts:e,canViewPendingInvites:t,currentTeam:a,inviteResults:r,onClose:m,onClickInviteMorePeople:y,channelId:A,closeModal:x,setMultipleTeamPrefsFetcher:E,telemeter:C,shouldShowComprehensibleInvites:k,openHub:v,origin:I,isExternalLimited:w,isEnterpriseTeam:N,clientTheme:R,comprehensibleEntryPoint:P,experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:L,currentMemberIsAdmin:O,isRequestingToInviteToWorkspace:D,workspaceId:F,isAddTeammatesSuccessTip:U,recordMegaphoneNotificationDismiss:B,customMessage:H,invitedUserIds:W})=>{let q,K,$,Y=(0,n.useRef)(null),Q=(0,n.useRef)(null),X=(0,et.d4)(z.a),ee=(0,et.d4)(es.Cp)&&"workspace-invite"===I,[ea,er]=(0,n.useState)(""),[ei,el]=(0,n.useState)(!1),[eo,ec]=(0,n.useState)(!1),ed="channel-invite"===I&&k;(0,n.useEffect)(()=>{C.count(M.UC.OpenConfirmationScreen)},[C]),(0,c.A)(()=>(Q.current=!0,()=>{Q.current=!1,clearCopiedMessageTimer()}),[]);let eA=r.filter(e=>!1===e.ok),ex=eA.length>0,eE=r.filter(e=>!0===e.ok),eC=r.filter(e=>!0===e.ok&&e.inviteeType===M.T0.Email&&!e.isRequestedInvite),ek=r.filter(e=>!0===e.ok&&e.inviteeType===M.T0.Email&&e.isRequestedInvite),ev=r.filter(e=>!0===e.ok&&e.inviteeType!==M.T0.Email),eS=eE.length>0,eI=eE.some(e=>e.accessType===M.BD.Member||e.accessType===M.BD.SharedChannel),ew=eC.length>0,eT=ek.length>0,eN=ev.length>0,eM=eE.some(e=>e.inviteeType!==M.T0.Email),eR=eS&&!ex,eP=eS&&ex,eL=!eS&&ex;(0,n.useEffect)(()=>{U&&!ed&&eS&&B()},[eS,U,ed,B]);let eO="warning",eD="p-add_to_slack_confirmation__title_icon--error";eR&&(eO="check-large-bold",eD="p-add_to_slack_confirmation__title_icon--success");let eF="channel-invite"===I&&k?getChannelInviteTitle():getWorkspaceInviteTitle();function getChannelInviteTitle(){if(D&&eS||eT)return ef.t("All set - admins are taking a look");if(eS&&eM){let t=(0,l.A)(e),a=eE.length-e.length+t;return ef.rt("You\u2019ve added {count, plural, =1 {# person} other {# people}} to {channelName}",{count:a,channelName:n.createElement(g.A,{channelId:A,truncate:!0,readChannelIcon:!0})})}return eS&&!eM?ef.rt("You\u2019ve invited {count, plural, =1 {# person} other {# people}} to {channelName}",{count:eE.length,channelName:n.createElement(g.A,{channelId:A,truncate:!0,readChannelIcon:!0})}):ef.rt("There was an issue adding {count, plural, =1 {# person} other {# people}} to the channel",{count:eA.length,channelName:n.createElement(g.A,{channelId:A,truncate:!0,readChannelIcon:!0})})}function getWorkspaceInviteTitle(){return k&&eR?ef.t("You\u2019ve invited {count, plural, =1 {# person} other {# people}}",{count:eE.length}):eR?ef.t("Sent"):eP?ef.t("Unable to send all"):ef.t("Unable to send")}getChannelInviteTitle.displayName="getChannelInviteTitle";let eU=(0,n.useCallback)(()=>{clearCopiedMessageTimer(),Y.current=setTimeout(()=>{Q.current&&ec(!1)},3e3)},[]);function clearCopiedMessageTimer(){Y.current&&clearTimeout(Y.current)}let eB=(0,n.useCallback)(()=>{eU(),ec(!0)},[eU]),eH=(0,n.useCallback)(e=>{e?er(e):er("")},[]),eW=(0,n.useCallback)(()=>{m?m():x()},[x,m]);async function onClickSave(){el(!0);try{await E({prefs:{signup_mode:"email",signup_domains:ea}}),el(!1),eW()}catch(e){el(!1)}}let eV=(0,n.useCallback)(()=>{(0,T.gC)(a,"/admin/invites#pending")},[a]),eG=(0,n.useMemo)(()=>({elementName:"invite_more_people",onClick:{enableClogAction:!0},...A&&{channelId:A},funnelStepNumber:Z.gQ.Confirmation}),[A]),eq=(0,n.useMemo)(()=>ea?{elementName:"approved_domains_save_button",onClick:{enableClogAction:!0}}:{elementName:"done_button",onClick:{enableClogAction:!0}},[ea]);function maybeRenderWorkspaceInviteManageInvitations(){return"channel-invite"===I||eL||!t?null:n.createElement("div",{className:"p-add_to_slack_confirmation__see_past_invites"},!k&&n.createElement(h.A,{type:"paper-plane",inline:!0,className:"inline"}),n.createElement(_.A,{className:k?"":"p-add_to_slack_confirmation__footer_link","data-qa":S.mv.ViewPendingInvitesButton,onClick:eV,autoClogProps:eb},k?ef.t("Manage invitations"):ef.t("See past invites")))}function maybeRenderChannelInviteManageInvitations(){let e;if("workspace-invite"===I||eL||!k)return null;let t=r.reduce((e,{accessType:t,inviteeType:a})=>e+ +(t===M.BD.SharedChannel&&a===M.T0.Email),0),a=ef.rt("Manage {count, plural, =1 {invitation} other {invitations}}",{count:t});return(e=t===r.length?ed?a:ef.rt("Manage {count, plural, =1 {this invitation} other {these invitations}}",{count:t}):t>0?ed?a:ef.rt("Manage Slack Connect {count, plural, =1 {invitation} other {invitations}}",{count:t}):"")?n.createElement(_.A,{onClick:v,"data-qa":S.mv.ViewPendingInvitesButton,autoClogProps:eg,className:ed?"caption":""},e):null}maybeRenderWorkspaceInviteManageInvitations.displayName="maybeRenderWorkspaceInviteManageInvitations",maybeRenderChannelInviteManageInvitations.displayName="maybeRenderChannelInviteManageInvitations";let getInvitesSummaryList=({dataQa:e,refinedInviteResults:t,isSuccess:a,passedIsOriginChannelInviteComprehensible:r})=>n.createElement(G.A,{isSuccess:a,isOriginChannelInviteComprehensible:r,inviteResults:t,"data-qa":e,experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:L,...A&&{channelId:A},...void 0!==w&&{isExternalLimited:w},currentMemberIsAdmin:O,workspaceId:F});getInvitesSummaryList.displayName="getInvitesSummaryList";let renderCustomMessage=()=>{if(!X||!H)return;let e={...ey,eventId:ed?J.EventId.COMPREHENSIBLE_INVITES:J.EventId.INVITE_TO_WORKSPACE,uiComponentName:ed?J.UiComponentName.CHANNEL_INVITE_MODAL:J.UiComponentName.WORKSPACE_INVITE_MODAL};return n.createElement(d.A,e,n.createElement(p.A,{text:ef.t("Message"),className:"margin_top_150"},n.createElement("p",{className:"p-add_to_slack_confirmation__custom_message"},H)))};renderCustomMessage.displayName="renderCustomMessage";let renderComprehensibleChannelInvite=()=>n.createElement(n.Fragment,null,n.createElement("div",{className:"p-add_to_slack_confirmation__comprehensible_title","data-qa":S.mv.Title},getChannelInviteTitle()),eT&&n.createElement(u.Ay,{className:"margin_bottom_100",level:"info"},ef.t("Admin approval may be required before invitations are sent.")),eT&&n.createElement("div",{className:i()({margin_bottom_150:D})},n.createElement("div",{"data-qa":S.mv.ExternalInviteRequestedSuccessSummaryListTitle,className:"bold padding_bottom_50"},ef.t("Invitation requests pending approval")),getInvitesSummaryList({dataQa:S.mv.ExternalInviteRequestedSuccessSummaryList,refinedInviteResults:ek,isSuccess:!0,passedIsOriginChannelInviteComprehensible:ed}),!N&&n.createElement(V,{successfulInvites:ek,onChange:eH,onCopy:eB,"data-qa":S.mv.ApprovedDomainsInvitesTip}),!D&&n.createElement("div",{className:"padding_top_50 padding_bottom_150"},maybeRenderChannelInviteManageInvitations())),ew&&n.createElement("div",{className:i()({margin_bottom_150:eT})},(D||eT&&!D)&&n.createElement("div",{"data-qa":S.mv.ExternalSuccessSummaryListTitle,className:"bold padding_bottom_50"},ef.t("Invitations pending approvals")),getInvitesSummaryList({dataQa:S.mv.ExternalSuccessSummaryList,refinedInviteResults:eC,isSuccess:!0,passedIsOriginChannelInviteComprehensible:ed}),!N&&n.createElement(V,{successfulInvites:eC,onChange:eH,onCopy:eB,"data-qa":S.mv.ApprovedDomainsInvitesTip}),!eT&&n.createElement("div",{className:"padding_top_50 padding_bottom_150"},maybeRenderChannelInviteManageInvitations())),eN&&n.createElement(n.Fragment,null,n.createElement("div",{"data-qa":S.mv.InternalSuccessSummaryListTitle,className:"bold padding_bottom_50"},ef.t("Added to channel")),getInvitesSummaryList({dataQa:S.mv.InternalSuccessSummaryList,refinedInviteResults:ev,isSuccess:!0,passedIsOriginChannelInviteComprehensible:ed})),ex&&n.createElement(n.Fragment,null,n.createElement("div",{"data-qa":S.mv.ErrorSummaryListTitle,className:"bold padding_bottom_50 padding_top_150"},ef.t("Invitations with errors")),getInvitesSummaryList({dataQa:S.mv.ErrorSummaryList,refinedInviteResults:eA,isSuccess:!1,passedIsOriginChannelInviteComprehensible:ed})),ew&&renderCustomMessage());renderComprehensibleChannelInvite.displayName="renderComprehensibleChannelInvite";let ej=(0,et.d4)(en.Z),ez=(0,o.A)(r,"inviteeType"),eK=ez?.email_invite?.filter(e=>e.accessType===M.BD.Member),e$=ez?.email_invite?.filter(e=>e.accessType===M.BD.SharedChannel),eY=ez?.user_group_invite,eQ=ez?.user_invite,eZ={numberOfSharedChannelInvites:e$?e$?.length:0,numberOfMemberInvites:eK?eK?.length:0,numberOfWorkspaceUsersAdded:eQ?eQ?.length:0,numberOfUserGroupsAdded:eY?eY?.length:0,...A&&{channelId:A},funnelStepNumber:Z.gQ.Confirmation,comprehensibleEntryPoint:P||Z.kP.Unknown};A?q=k?J.EventId.COMPREHENSIBLE_INVITES:J.EventId.ADD_TO_CHANNEL:(q=J.EventId.INVITE_TO_WORKSPACE,K=ej);let eJ=ef.t("Confirmation");return ee?$=eu:ed?$=R===s.Sx.Dark?eh:e_:k?$=R===s.Sx.Dark?em:ep:($="",eJ=""),n.createElement(d.A,{eventId:q,uiStep:J.UiStep.CONFIRMATION,clogImpression:!0,uiComponentVariant:K,...eZ},n.createElement(f.A,{"data-qa":S.mv.ConfirmationModal,onClose:eW,headerImageSrc:$,headerImageAlt:eJ,className:i()(ee||k?"p-add_to_slack_confirmation__comprehensible_modal":"p-add_to_slack_confirmation__base_modal",{"p-add_to_slack_confirmation--treatment_c":ee}),footerText:n.createElement(n.Fragment,null,ee&&eI&&n.createElement("div",{className:"p-add_to_slack_confirmation__channel_add_list_footer"},n.createElement("div",{className:"p-add_to_slack_confirmation__comprehensible_title"},ee?ef.t("Add them to the right conversations"):""),n.createElement(j.N,{targetTeamId:F,isEnterpriseTeam:N,invitedUserIds:W??[]})),eo?n.createElement("div",{className:"sk_lilypad_green bold"},n.createElement(h.A,{type:"check-small-bold",inline:!0}),ef.t("Copied!")):maybeRenderWorkspaceInviteManageInvitations(),!ed&&maybeRenderChannelInviteManageInvitations()),showCancelButton:!!y,cancelButtonText:ef.t("Invite More People"),onCancel:y,cancelAutoClogProps:eG,showSubmitButton:!(ee&&eI),submitButtonText:ea?ef.t("Save"):ef.t("Done"),onSubmit:ea?onClickSave:eW,isSubmitting:ei,isSubmitButtonALoadingButton:!0,submitAutoClogProps:eq},ed?renderComprehensibleChannelInvite():n.createElement(n.Fragment,null,!k&&n.createElement("div",{className:"p-add_to_slack_confirmation__content align_items_center"},n.createElement(h.A,{type:eO,className:eD,"data-qa":S.mv.Icon}),n.createElement("div",{className:"p-add_to_slack_confirmation__title_container"},n.createElement("div",{className:"p-add_to_slack_confirmation__title","data-qa":S.mv.Title},eF),A&&n.createElement("div",{className:"p-add_to_slack_confirmation__channel_name","data-qa":S.mv.ChannelName},n.createElement(b.A,{lines:2},n.createElement(g.A,{channelId:A,readChannelIcon:!0}))))),k&&n.createElement("div",{className:"p-add_to_slack_confirmation__comprehensible_title","data-qa":S.mv.Title},eF),n.createElement("div",{className:ee?"p-add_to_slack_confirmation__invite_list_scroll":void 0},ex&&getInvitesSummaryList({dataQa:S.mv.ErrorSummaryList,refinedInviteResults:eA,isSuccess:!1}),eS&&n.createElement(n.Fragment,null,getInvitesSummaryList({dataQa:S.mv.SuccessSummaryList,refinedInviteResults:eE,isSuccess:!0}),!N&&n.createElement(V,{successfulInvites:eE,onChange:eH,onCopy:eB,"data-qa":S.mv.ApprovedDomainsInvitesTip}))),renderCustomMessage())))};ConfirmationScreen.displayName="ConfirmationScreen";let eA=(0,P.N)((e,t)=>{let{shouldShowPendingInvitesLink:a,inviteResults:n,workspaceId:r}=t,i=(0,U._J)(e,r),l=(0,Q.r7)(i),o=(0,O.Ts)(e),s=[];n.forEach(t=>{if(!0===t.ok&&t.inviteeType===M.T0.UserGroup){let a=(0,ed.lJ)(e,t.invitee);a&&!a.isNonExistent&&a.user_count&&s.push(a.user_count)}});let c=n.filter(({accessType:e})=>(0,M.LX)(e)).some(({accessType:t})=>(0,Y.J5)({state:e,inviteType:t,team:i}));return{userGroupMemberCounts:s,canViewPendingInvites:!!a&&(0,N.Zo)(e),currentTeam:i,telemeter:(0,X.Cy)({state:e}),shouldShowComprehensibleInvites:o,isEnterpriseTeam:l,clientTheme:(0,ea.to)(e),experimentElmChannelInviteLimitedAccessChoicePresentGroupTreatment:(0,q.Tv)(e),isRequestingToInviteToWorkspace:c,isAddTeammatesSuccessTip:(0,eo.Z)(e)===ec.ml.AddTeammates}},e=>({closeModal:()=>e((0,el.O)()),setMultipleTeamPrefsFetcher:(...t)=>e((0,$.V1)(...t)),openHub:()=>{e((0,ee.R)({invitationsTabId:K.En.sent})),e((0,el.O)())},recordMegaphoneNotificationDismiss:()=>e((0,er.A)({notificationName:ec.z8[ec.ml.AddTeammates],action:ei.hw.DISMISS,step:ec.V9.Success,reason:"auto-dismiss-add-teammates-success-tip"}))}))(ConfirmationScreen)},0x1403dc2ee:(e,t,a)=>{"use strict";a.d(t,{Kz:()=>o,T$:()=>c,mv:()=>s,o0:()=>d});var n,r,i,l,o=((n={}).List="comprehensible-invite-list",n.ExternalEmails="comprehensible-invite-list-external-emails",n.ExternalEmailCopy="comprehensible-invite-list-external-email-copy",n),s=((r={}).ConfirmationModal="confirmation-modal",r.ConfirmationModalImage="confirmation-modal_header_image",r.Icon="confirmation-screen-icon",r.Title="confirmation-screen-title",r.ChannelName="channel-name",r.ExternalLimitedAlert="confirmation-screen-external-limited-alert",r.ErrorSummaryListTitle="confirmation-screen-error-summary-list-title",r.ErrorSummaryList="confirmation-screen-error-summary-list",r.SuccessSummaryList="confirmation-screen-success-summary-list",r.ExternalSuccessSummaryListTitle="confirmation-screen-external-success-summary-list-title",r.ExternalSuccessSummaryList="confirmation-screen-external-success-summary-list",r.ExternalInviteRequestedSuccessSummaryListTitle="confirmation-screen-external-invite-requested-success-summary-list-title",r.ExternalInviteRequestedSuccessSummaryList="confirmation-screen-external-invite-requested-success-summary-list",r.InternalSuccessSummaryListTitle="confirmation-screen-internal-success-summary-list-title",r.InternalSuccessSummaryList="confirmation-screen-internal-success-summary-list",r.ViewPendingInvitesButton="confirmation-screen-view-pending-invites-button",r.ApprovedDomainsInvitesTip="confirmation-screen-approved-domains-invites-tip",r),c=((i={}).ExternalInviteRequestedSlackConnectInviteEntity="external-invite-requested-invite-entity-slack-connect",i.SlackConnectInviteEntity="invite-entity-slack-connect",i.WorkspaceInviteEntity="invite-entity-workspace",i.UserInviteEntity="invite-entity-user",i.UserGroupInviteEntity="invite-entity-user-group",i.Icon="invite-entity-icon",i.Invitee="invite-entity-invitee",i.Subtext="invite-entity-subtext",i.InviteStatusMessage="invite-entity-status-message",i.ExternalMemberAvatar="invite-entity-external-member-avatar",i.InternalInviteAvatar="invite-entity-internal-member-avatar",i.ExternalPrimaryScInviteAvatar="invite-entity-external-primary-sc-identity-avatar",i.SlackConnectInviteAvatar="invite-entity-slack-connect-avatar",i.ChannelSummaryMessage="invite-entity-channel-summary-message",i.WorkspaceSummaryMessage="invite-entity-workspace-summary-message",i.Tooltip="invite-entity-tooltip",i),d=((l={}).Checkbox="approved-domains-invites-tip-checkbox",l.CopyLinkButton="approved-domains-invites-tip-copy-link-button",l.CopyLinkTooltip="approved-domains-invites-tip-copy-link-tooltip",l)},0x12cf1825a:(e,t,a)=>{"use strict";a.d(t,{$C:()=>n,Oe:()=>i,SM:()=>l,rI:()=>r});let n={limitReached:"limitReached",missingEntity:"missingEntity",userGroupFromAnotherTeam:"userGroupFromAnotherTeam",memberAlreadyInChannel:"memberAlreadyInChannel",memberIsBot:"memberIsBot",memberIsGuestNotOnWorkspace:"memberIsGuestNotOnWorkspace",memberIsSingleChannelGuest:"memberIsSingleChannelGuest",memberNeedsPermission:"memberNeedsPermission",memberNotOnWorkspaceButAllowed:"memberNotOnWorkspaceButAllowed",memberFromAnotherOrg:"memberFromAnotherOrg",memberNotOnWorkspace:"memberNotOnWorkspace",memberExceptionDefault:"memberExceptionDefault",memberExceptionSingleChannelGuestWithApproval:"memberExceptionSingleChannelGuestWithApproval",default:"default"},r={alreadyInChannel:"alreadyInChannel",fromAnotherOrg:"fromAnotherOrg",notMemberOfWorkspace:"notMemberOfWorkspace",cannotJoinChannel:"cannotJoinChannel",singleChannelGuest:"singleChannelGuest",guestNotOnWorkspace:"guestNotOnWorkspace",awayTeamExternalEmail:"awayTeamExternalEmail",spaceChannelInvite:"spaceChannelInvite",requiresAdminApproval:"requiresAdminApproval"},i={cannotAddMore:"cannotAddMore",noPermission:"noPermission"},l={[n.limitReached]:{optionError:i.cannotAddMore},[n.missingEntity]:{optionError:r.cannotJoinChannel},[n.userGroupFromAnotherTeam]:{formError:r.notMemberOfWorkspace,optionError:r.notMemberOfWorkspace},[n.memberAlreadyInChannel]:{formError:r.alreadyInChannel,optionError:r.alreadyInChannel},[n.memberIsBot]:{formError:r.cannotJoinChannel,optionError:r.cannotJoinChannel},[n.memberIsGuestNotOnWorkspace]:{formError:r.guestNotOnWorkspace,optionError:r.cannotJoinChannel},[n.memberIsSingleChannelGuest]:{formError:r.singleChannelGuest,optionError:r.cannotJoinChannel},[n.memberNeedsPermission]:{formError:i.noPermission,optionError:i.noPermission},[n.memberNotOnWorkspaceButAllowed]:{secondaryContentKey:r.notMemberOfWorkspace},[n.memberFromAnotherOrg]:{optionError:r.fromAnotherOrg},[n.memberNotOnWorkspace]:{optionError:r.notMemberOfWorkspace},[n.memberExceptionDefault]:{optionError:r.cannotJoinChannel},[n.memberExceptionSingleChannelGuestWithApproval]:{secondaryContentKey:r.requiresAdminApproval,formError:r.singleChannelGuest},[n.default]:{}}},0xc9348c4b:(e,t,a)=>{"use strict";a.d(t,{D:()=>r});var n,r=((n={}).SpecificMembers="add-specific-members",n.AllMembers="add-all-members",n)},0x10618ca04:(e,t,a)=>{"use strict";a.d(t,{SC:()=>r,Vd:()=>l,Yd:()=>d,gb:()=>o,kq:()=>s,pd:()=>i,xD:()=>c});var n=a(0x10079cc7);let r=2,i=10,l=200,o=n.ZO.PaidFeatureTrial,s=n.zG.SharedChannels,c=1e3,d=3},0xc3827e91:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x58199183),l=a(0x120b6eb39),o=a(0x7899e273),s=a(0x4323d7f5),c=a(0x1428e82b3),d=a(0xb0245531),m=a(0xa1832ae4),u=a(0x204e024f),p=a(0x226892387),h=a(0x1ee439e69);let _=new r.Ay("channel_invite"),{CannotRequestSharedChannels:f,DisallowedWorkspace:b}=c.IB,DisabledSlackConnectCopy=({processingOrgMembers:e=!1,canConvertToExternalSharedChannel:t,channel:a,emailCount:r,reason:g})=>{let y=(0,p.d4)(h.H7),A=(0,m.F1)(y),x=(0,p.d4)(h.Yc),E=(0,m.F1)(x),C=(0,p.d4)(e=>!(0,u.A)(e,[y.id])),k=(0,p.d4)(e=>(0,d.b)(e,a)),v=(0,p.d4)(e=>(0,s.JO)(e,a)),S=(0,p.d4)(e=>(0,c.QG)(e,a)),I=S?.reasons?.includes(b),w=S?.reasons?.includes(f),{renderLink:T,shouldDisplayGuidelines:N}=(0,l.F)({type:"INVITE",dataQa:"slack-connect-instructions-disabled-slack-connect-copy",stepVariant:"disabled-slack-connect-copy",modalHeaderSuffix:"instructions",showCopyButton:!0,className:"instructions-link--button"}),M=N&&S.ok;if(e)return n.createElement(n.Fragment,null,_.rt("They are already a full member of {teamName}.",{teamName:n.createElement(i.A,{id:x.id,team:x})}));if(k)return n.createElement(n.Fragment,null,_.t("You don\u2019t have permission to invite people from {count, plural, =1 {this organization} other {these organizations}} to the channel.",{count:r}));if(t)return null;if(w&&M)return _.rt("Your admins haven\u2019t shared the permission required to invite external people to this channel. Read the <link>instructions they created</link> for details.",{"<link>":T});if(I&&M)return _.rt("Slack Connect isn\u2019t enabled for this workspace, but your admins <link>created instructions</link> to help you add the right people to the right workspaces.",{"<link>":T});if(C)return _.rt("Slack Connect has been disabled for <strong>{teamName}</strong> workspace.",{teamName:A});let R=s.wi.InvalidChannel,P=v.reason===R;return v.ok||P?g===o.Fz.NoExternalInvitePermission?M?_.rt("You can\u2019t invite external people to this channel. Read <link>your organization\u2019s instructions</link> for details.",{"<link>":T}):_.rt("You can\u2019t invite external people to this channel."):_.rt("You\u2019re not allowed to add people outside <strong>{teamName}</strong> to this channel.",{teamName:E}):_.rt("You\u2019re not allowed to add people outside <strong>{teamName}</strong>.",{teamName:E})};DisabledSlackConnectCopy.displayName="DisabledSlackConnectCopy";let g=DisabledSlackConnectCopy},0xf641d034:(e,t,a)=>{"use strict";a.d(t,{l:()=>getInviteErrorText});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1faa3f1ac),l=a(0x247cf31a2),o=a(0xc3827e91),s=a(0x20e77676b),c=a(0x1787b298f),d=a(0xa1832ae4),m=a(0x770aee07);let u=new r.Ay("invite-errors"),getInviteErrorText=(e,t,a,r,p,h)=>{let{errorKey:_,accessType:f,currentTeamName:b,hostTeamName:g,channelName:y,channelId:A}=e,x=e.inviteesCount||1,E=(0,d.Zl)(null,"admin");switch(_){case"url_in_message":return u.t("Sorry, but URLs are not allowed in the custom message. Please remove it and try again!");case"invalid_email":return u.t("{inviteesCount, plural, =1 {That doesn\u2019t} other {These don\u2019t}} look like a valid email {inviteesCount, plural, =1 {address} other {addresses}}!",{inviteesCount:x});case"user_is_profile_only":case"already_in_team":case"already_in_team_invited_user":return u.t("{inviteesCount, plural, =1 {This person is} other {These people are}} already in your workspace.",{inviteesCount:x});case"user_disabled":if(r)return u.t("{inviteesCount, plural, =1 {This person is} other {These people are}} already in your workspace, but their account is deactivated. To manage their {inviteesCount, plural, =1 {account} other {accounts}} go to Workspace Settings > Manage Members.",{inviteesCount:x});return u.rt("{inviteesCount, plural, =1 {This person is} other {These people are}} already in your workspace, but their account is deactivated. You can <Link>manage</Link> their {inviteesCount, plural, =1 {account} other {accounts}}.",{inviteesCount:x},({text:e})=>n.createElement(i.A,{href:E},e));case"already_invited":return u.t("{inviteesCount, plural, =1 {This person has} other {These people have}} already been invited to your workspace.",{inviteesCount:x});case"sent_recently":return u.t("{inviteesCount, plural, =1 {This person was} other {These people were}} recently invited. No need to invite them again just yet.",{inviteesCount:x});case"invite_failed":return u.t("Something went wrong with {inviteesCount, plural, =1 {this invite} other {this invites}} :(",{inviteesCount:x});case"ura_limit_reached":return u.t("You\u2019ve reached your workspace limit for Single-Channel Guests. You must invite more paid members first.");case"user_limit_reached":return u.t("You\u2019ve reached the maximum number of users for this workspace.");case"not_allowed":return u.t("You can\u2019t invite this type of account based on your current SSO settings.");case"custom_message_not_allowed":return u.t("Sorry, you can\u2019t add a custom message to this invite. Please remove it and try again!");case"domain_mismatch":return u.t("Your SSO settings prevent you from inviting people from this email domain.");case"invite_limit_reached":if(r)return u.t("Your workspace has reached its invitation limit. Once people accept the existing invitations, you\u2019ll be able to send out more.");return u.rt("Your workspace has exceeded the limit on invitations. After more people have accepted the ones your workspace has sent, you can send more. Revoking invitations will not lift the limit. Our Help Center has <Link>more details on invitation limits</Link>.",null,({text:e})=>n.createElement(s.A,{articleId:0xc000e50,hash:"invitation-limits",forceOpenInBrowser:!0},e));case"too_long":return u.t("{inviteesCount, plural, =1 {This person\u2019s name exceeds} other {These people\u2019s names exceed}} the 35-character limit.",{inviteesCount:x});case"org_user_is_disabled":return u.t("{inviteesCount, plural, =1 {This person has a deactivated account} other {These people have deactivated accounts}} for your organization.",{inviteesCount:x});case"org_user_is_disabled_but_present":return u.t("{inviteesCount, plural, =1 {This person is} other {These people are}} already in your workspace, but they have been deactivated by your organization. Contact an organization administrator to re-enable their {inviteesCount, plural, =1 {account} other {accounts}}.",{inviteesCount:x});case"mismatch_with_pending_team_invite":switch(f){case m.BD.SingleChannelGuest:return u.t("{inviteesCount, plural, =1 {This person} other {These people}} can\u2019t be invited, because they have already been invited as a Single-Channel Guest to your organization.",{inviteesCount:x});case m.BD.MultiChannelGuest:return u.t("{inviteesCount, plural, =1 {This person} other {These people}} can\u2019t be invited, because they have already been invited as a Multi-Channel Guest to your organization.",{inviteesCount:x});default:return u.t("{inviteesCount, plural, =1 {This person} other {These people}} can\u2019t be invited, because they have already been invited as a Full Member to your organization.",{inviteesCount:x})}case"user_type_mismatch":return u.t("{inviteesCount, plural, =1 {This person already has an account} other {These people already have accounts}} for your organization.",{inviteesCount:x});case"org_user_is_restricted":return u.t("{inviteesCount, plural, =1 {This person already has a Multi-Channel Guest account} other {These people already have Multi-Channel Guest accounts}} for your organization, so you can only invite them in that role.",{inviteesCount:x});case"org_user_is_ultra_restricted":return u.t("{inviteesCount, plural, =1 {This person already has a Single-Channel Guest account} other {These people already have Single-Channel Guest accounts}} for your organization, so you can only invite them in that role.",{inviteesCount:x});case"org_user_not_ultra_restricted":case"org_user_not_restricted":return u.t("{inviteesCount, plural, =1 {This person already has a Full Member account} other {These people already have Full Member accounts}} for your organization, so you can only invite them in that role.",{inviteesCount:x});case"requires_channel":return u.t("Pick at least one channel before inviting Multi-Channel Guests.");case"requires_one_channel":return u.t("Pick a channel before inviting Single-Channel Guests.");case"already_requested":return u.t("You have already requested an invite for {inviteesCount, plural, =1 {this person} other {these people}}. We\u2019ll update you when an admin approves or denies this request.",{inviteesCount:x});case"existing_request":return u.t("Someone has already requested an invite for {inviteesCount, plural, =1 {this person} other {these people}}. We\u2019ll update you when an admin approves or denies this request.",{inviteesCount:x});case"not_enough_channels":return u.t("This person is a Single-Channel Guest and can\u2019t be added to a second channel.");case"already_in_channel":return u.t("{inviteesCount, plural, =1 {User is} other {Users are}} already in this channel.",{inviteesCount:x});case"channel_not_found":case"method_not_supported_for_channel_type":return u.t("A valid channel name is required.",{});case"user_not_found":return u.t("This user can\u2019t be added.");case"user_is_restricted":return u.t("{inviteesCount, plural, =1 {User is a Multi-Channel Guest} other {Users are Multi-Channel Guests}}. Only your Workspace Admin can add them to a channel.",{inviteesCount:x});case"org_user_not_in_team":case"invitee_is_not_a_member_of_this_workspace":return u.t("{inviteesCount, plural, =1 {This person isn\u2019t} other {These people aren\u2019t}} a member of any workspaces where this channel lives, so they can\u2019t be added to it. You might want to try again from channel details.",{inviteesCount:x});case"too_many_users":return u.t("You can only add up to 1,000 users at a time.");case"cant_invite_to_managed_channel":if(A)return u.rt("It looks like {inviteesCount, plural, =1 {this user isn\u2019t} other {these users aren\u2019t}} in an IDP group connected to <t1></t1>, so it\u2019s not possible to add them to this channel.",{channelName:y,inviteesCount:x,"<t1>":()=>n.createElement(l.A,{channelId:A})});return u.t("It looks like {inviteesCount, plural, =1 {this user isn\u2019t} other {these users aren\u2019t}} in an IDP group connected to #{channelName}, so it\u2019s not possible to add them to this channel.",{inviteesCount:x,channelName:y});case"no_urls_allowed":return u.t("Unfortunately, custom messages can\u2019t contain URLs.");case"team_user_disabled_org_user_active":if(t&&r)return u.t("{inviteesCount, plural, =1 {This person has} other {These people have}} been removed from this workspace. To manage their {inviteesCount, plural, =1 {account} other {accounts}} go to Workspace Settings > Manage Members.",{inviteesCount:x});if(t&&!r)return u.rt("{inviteesCount, plural, =1 {This person has} other {These people have}} been removed from this workspace. You can <Link>manage</Link> their {inviteesCount, plural, =1 {account} other {accounts}}.",{inviteesCount:x},({text:e})=>n.createElement(i.A,{href:E},e));return u.t("{inviteesCount, plural, =1 {This person has} other {These people have}} been removed from this workspace. Contact an admin to manage their {inviteesCount, plural, =1 {account} other {accounts}}.",{inviteesCount:x});case"too_many_members":if(r)return u.t("This channel has reached capacity, so you can\u2019t add more people right now.");return u.rt("This channel is only allowed a certain number of members, so you can\u2019t add more people right now. <a>Reach out to your admins</a> if you have questions.",null,({text:e})=>n.createElement(s.A,{articleId:0x53d1e2002c,hash:"find-owners-and-admins",forceOpenInBrowser:!0},e));case"no_perms":return u.t("You can\u2019t invite {inviteesCount, plural, =1 {this person} other {these people}} based on your\xa0organization\u2019s settings.",{inviteesCount:x});case"no_permission":return u.t("You don\u2019t have permission to invite people to this channel.");case"cant_invite":if(p)return h?u.t("This agent can\u2019t be added to the channel. Only channel managers can invite this agent."):"This agent can't be added to the channel. Only channel managers can invite this agent.";return u.t("{inviteesCount, plural, =1 {This person} other {These people}} can\u2019t be added to the channel because they may not have Slack Connect enabled, or may not have permission to use it.",{inviteesCount:x});case"restricted_action":return u.rt("Your organization\u2019s settings prevent you from using <strong>Slack Connect</strong> to invite people outside of {currentTeamName}.",{currentTeamName:b});case"not_allowed_for_grid_workspace":if(a)return n.createElement(o.A,{processingOrgMembers:!1,canConvertToExternalSharedChannel:!1,channel:a,emailCount:x});return;case"not_owner":if(!g)return u.t("Only the channel owner can add people to this channel.");return u.rt("Only the channel owner, {hostTeam}, can invite additional organizations to join this channel.",{hostTeam:g});case c.D.NoExternalInvitePermission:return u.t("You can\u2019t invite external people to this channel.");case"user_cannot_view_record":return u.t("{inviteesCount, plural, =1 {This person} other {These people}} cannot view this record. You might want to modify their permissions in Salesforce.",{inviteesCount:x});case"record_channels_not_enabled":return u.t("{inviteesCount, plural, =1 {This person} other {These people}} can\u2019t join this channel because they don\u2019t have access to the Salesforce channels pilot feature. The product development team has been notified of this request, nothing more to do here!",{inviteesCount:x});case"fatal_error":return u.rt("<b>Something went wrong.</b> Sorry about that \u2014 please try again later, and contact Slack if this problem persists.");case"email_in_message":return u.t("Sorry, but emails are not allowed in the custom message. Please remove it and try again!");default:return}};getInviteErrorText.displayName="getInviteErrorText"},0x53239337:(e,t,a)=>{"use strict";a.d(t,{_h:()=>isUserGroupInviteeOption,nt:()=>isInternalEmailInviteeOption,oJ:()=>isMemberInviteeOption,oO:()=>isPrimaryScEmailInviteeOption,tT:()=>isExternalEmailInviteeOption,wX:()=>isEmailInviteeOption});var n=a(0x1b9d5cc0c),r=a(0x61f75169),i=a(0x191ea5eb1),l=a(0x4f725d55),o=a(0xd2fa49d0);let isMemberInviteeOption=e=>"entity"in e&&((0,l.A)(e.entity?.id)||(0,n.NB)(e.entity))||(0,l.A)(e?.value),isUserGroupInviteeOption=e=>"entity"in e&&((0,o.A)(e.entity?.id)||(0,r.PH)(e.entity))||(0,o.A)(e?.value),isEmailInviteeOption=e=>"entity"in e&&!!e.entity?.isEmail,isInternalEmailInviteeOption=(e,t)=>!!isEmailInviteeOption(e)&&(!!t&&e?.emailTeam?.id===t||e?.classification===i.r.Internal),isExternalEmailInviteeOption=(e,t)=>!!isEmailInviteeOption(e)&&(!t||e?.emailTeam?.id!==t)&&e?.classification===i.r.External,isPrimaryScEmailInviteeOption=e=>!!isEmailInviteeOption(e)&&"emailTeam"in e&&!!e.emailTeam},0x161b91aba:(e,t,a)=>{"use strict";a.d(t,{Gx:()=>InviteeTooltip,OP:()=>getInviteResultsWithExternalLimitedProperty,Tv:()=>isLimitedAccessChoiceEnabled,XN:()=>toStrongTag});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11a296110),l=a(0x4c96e5d9),o=a(0x770aee07),s=a(0x226892387),c=a(0x14149c126);let d=new r.Ay("channel_invite");function isLimitedAccessChoiceEnabled(e){return"treatment"===(0,c._Z)(e,"elm_channel_invite_limited_access_choice_present")}function toStrongTag({text:e,tag:t}){return"strong"===t?n.createElement("strong",null,e):e}function InviteeTooltip({people:e}){if(!(0,s.d4)(isLimitedAccessChoiceEnabled))return null;let t=e.slice(0,25),a=e.length-t.length,r=n.createElement("div",null,d.t("{people} {remainingPeople, plural, =0 {} =1 {and # other} other {and # others}}",{people:t.join(", "),remainingPeople:a}));return n.createElement(l.Ay,{tipClassName:"p-comprehensible_invites--emails_tooltip",tip:r},n.createElement(i.Nm,{"data-qa":"limited-access-choice-member-tooltip"},n.createElement("strong",null,d.t("{count} {count, plural, =0 {} =1 {person} other {people}}",{count:e.length}))))}function getInviteResultsWithExternalLimitedProperty({inviteResults:e=[],isExternallySharedChannel:t,externalUserIds:a=[],isExternalLimitedSelection:n}){return e.filter(Boolean).map(e=>{if(e.accessType!==o.BD.SharedChannel)return e;let r=!t||a.includes(e.invitee)?n:void 0;return{...e,isExternalLimited:r}})}toStrongTag.displayName="toStrongTag",InviteeTooltip.displayName="InviteeTooltip"},0xd1cb3630:(e,t,a)=>{"use strict";a.d(t,{A:()=>R});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x2286acf6c),c=a(0x7d48dd65),d=a(0x1feee1711),m=a(0x1229daf22),u=a(0xc6a2c86f),p=a(0x1c371dd8b),h=a(0x16998c9bf),_=a(0x1e49806fc),f=a(0x20482ad21),b=a(0x2b7f0bcc),g=a(0x126f22530),y=a(0x10598eeca),A=a(0x1d1911997),x=a(0x1fdec3e16),E=a(0x1b3ecb90f),C=a(0x15a4ffb05),k=a(0x1be9380c8),v=a(0x6a8f5edc),S=a(0x1c8f352ff),I=a(0x3711e82d),w=a(0x226892387);let T=new f.Ay("channel_modal"),N={onChange:{action:I.UiAction.ENTER_TEXT}},M={filterQuery:"",options:[],selectId:"channel-name",isExpanded:!1,isInvalid:!1,isDisabled:!1,selectedOption:null},ChannelNameInput=e=>{let{id:t,name:a,onChannelNameChange:i,onChannelValidationChange:f,size:R=y.F.large,placeholder:P="",labelText:L,customHintText:O,disableHintText:D=!1,channelName:F="",isPrivate:U=!1,isRecordChannel:B=!1,onChannelNameKeyDown:H=o.A,onValidating:W=o.A,customErrorMessage:V=null,channelNameErrors:G,showChannelPrefixes:q=!1,channelPrefixes:j,isLoading:z=!1,isDisabled:K=!1,isInvalid:$=!1,shouldValidateChannelNameOnLoad:Y=!1,shouldShowErrorBelowInput:Q=!1,shouldShowErrorLabelTitle:Z=!0,className:J,containerClassName:X,focusOnMount:ee=!0,autoClogProps:et,useInlineAlert:ea=!1,teamId:en,workspaceName:er,enableCharacterMaxHintText:ei=!0,suppressInlineError:el=!1,announceLabelWithHint:eo=!1}=e,es=(0,n.useRef)(en),ec=(0,w.d4)(S._E),ed=(0,w.d4)(k.YO),em=(0,S.zU)(),[eu,ep]=(0,n.useState)(ee),[eh,e_]=(0,n.useState)({...M,filterQuery:F}),ef=(0,n.useRef)(null),eb=(0,r.wA)(),eg=(0,n.useCallback)(async(e,t)=>{if(B&&ed)return;let a=S.gi;try{await eb((0,v.X)({name:e,teamId:t,reason:"create-channel"}))}catch(e){switch((0,h.iT)(e).name){case v.w.InvalidNameSpecials:a={...S.gi,hasSpecialsWarning:!0};break;case v.w.InvalidNamePunctuation:a={...S.gi,hasPunctuationWarning:!0};break;case v.w.NameTaken:a={...S.gi,hasNameTakenWarning:!0};break;case v.w.InvalidNameMaxlength:a={...S.gi,hasMaxLengthWarning:!0};break;case v.w.InvalidNameRequired:a={...S.gi,hasNameRequiredWarning:!0};break;default:a={...S.gi,hasUnknownWarning:!0}}}return f(a)},[eb,ed,B,f]),ey=(0,n.useRef)((0,s.A)(eg,500)).current;(0,n.useEffect)(()=>(Y?ey(F,en):en!==es.current&&(eg(F,en),es.current=en),()=>{ey.cancel()}),[eg,F,ey,Y,en]);let eA=(0,n.useCallback)(()=>j?j.map(e=>({label:n.createElement("span",{className:"p-channel_name_input__prefix"},e.prefix,e.description.length?n.createElement("span",{className:"p-channel_name_input__prefix_description"},n.createElement(x.A,{lines:1,withTooltip:!0,customTooltipText:e.description}," ","-"," ",n.createElement(C.A,{text:e.description,emojiSize:E.lw.SMALL}))):null),value:e.prefix})):[],[j]),ex=(0,n.useCallback)(e=>{let t=eA();return e?(0,c.A)(t,t=>(0,_.A)(t.value).includes((0,_.A)(e))):t},[eA]),eE=(0,n.useRef)(),eC=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(j)return e_(e=>({...e,options:ex("")})),eC.current=setTimeout(()=>{eE.current=eE.current??!0,eE.current&&e_(e=>{let t=ex("");return{...e,options:t,isExpanded:!0}})},2e3),()=>{clearTimeout(eC.current)}},[j,ex]),(0,n.useEffect)(()=>{!q||!1!==eE.current&&((F||!eu)&&(eE.current=!1),eE.current&&(eE.current=!1))},[F,eu,eE,eh,q,j]);let ek=(0,n.useCallback)(()=>{ep(!1)},[]),ev=(0,n.useCallback)(e=>{if(ec||B&&ed)return e;let t=e.toLowerCase();return t=t.replace(/^#+/,""),t=(0,S.Mj)(t)},[ed,ec,B]),eS=(0,n.useCallback)(e=>{W?.();let t=ev(e);ey(t,en),i(t)},[ey,i,W,ev,en]),eI=(0,u.A)(e),ew=(0,n.useCallback)((t,a)=>{a&&a(),e_(a=>{let n=t(),r={...a,...n};if(!eI&&e&&(r.isExpanded=!1),n.selectedOption&&(r.selectedOption=null,r.filterQuery=`${n.selectedOption.value}-`,r.isExpanded=!1,ef.current.focus()),!z&&0===r.options.length&&r.isExpanded&&(r.isExpanded=!1),!1===n.isExpanded&&(0,d.A)(n.activeRowIndex)&&""===n.filterQuery&&eh.filterQuery&&(r.filterQuery=eh.filterQuery),r.filterQuery!==eh.filterQuery){W?.(),r.options=ex(r.filterQuery);let e=ev(r.filterQuery||"");r.filterQuery=e,ey(e,en),i(e)}return{...r}})},[ey,ex,z,i,W,eI,e,ev,eh.filterQuery,en]),eT=(0,n.useMemo)(()=>V||(G?(0,S.Zo)(G,{maxChannelNameLength:em,workspaceName:er,experimentFriendlyChannelNamesGroupOn:ec}):void 0),[G,V,ec,em,er]),eN=(0,n.useMemo)(()=>({...eh}),[eh]),eM=D?null:O||(ec?T.t("Names must not contain punctuation and can\u2019t be longer than 80 characters."):T.t("Names must be lowercase, without spaces or periods, and can\u2019t be longer than 80 characters.")),eR=T.t("80 characters max"),eP=(0,n.useMemo)(()=>{let e=[],t=[],a=Object.values(G).includes(!0);return a&&!el?(0,m.A)(G,(t,a)=>{t&&e.push({id:a,message:eT})}):eM&&t.push({id:"hintText",message:eM}),ei&&eR&&!a&&t.push({className:"p-channel_name_input__visually-hidden",id:"characterMaxHintText",message:eR}),{hintArr:t,errorArr:e}},[G,el,eM,ei,eR,eT]),eL=(0,n.useCallback)(e=>{i(ev(e.value))},[i,ev]),eO=(0,n.useCallback)(()=>{if(!q)return null;let e=T.t("e.g. plan-budget"),a=[];eo&&a.push(`${t}-label`),eM&&a.push("hintText"),ei&&eR&&a.push("characterMaxHintText");let r=j?.some(e=>e.description.length>50)?473:300;return n.createElement(A.JJ,{size:R,classPrefix:"p-channel_name_input",width:"100%",ariaLabel:T.t("Channel Name"),placeholderText:e,key:t,onBlur:ek,selectState:eN,setSelectState:ew,showDropdownIcon:!1,inputRef:ef,isLoading:z,inputIcon:U?"lock":"channel",maxCharacterLimit:em,maxOptionsListHeight:140,focusOnMount:ee,isDisabled:K,onOptionSelected:eL,ariaLabelledBy:a.join(" "),hints:eM?eP.hintArr:void 0,errors:ea?eP.errorArr:void 0,offsetX:12,minOptionsListWidth:r})},[q,eM,R,t,ek,eN,ew,z,U,em,ee,K,eL,ei,eR,eP.hintArr,eP.errorArr,ea,eo,j]),eD=(0,n.useCallback)(()=>Z?n.createElement("span",{className:"p-channel_name_input__label_title"},n.createElement("strong",null,L||T.t("Name"))):null,[L,Z]),eF=(0,n.useCallback)(()=>{let e=eD();return(e||eT)&&n.createElement("label",{htmlFor:t},eT&&n.createElement("span",{className:"p-channel_name_input__label_error","data-qa":"channel_name_error",role:"alert"},(0,n.isValidElement)(eT)?eT?.type!=="div"&&n.createElement(b.Ay,{level:"warning"},eT):n.createElement(b.Ay,{level:"warning"},eT)),e)},[eT,t,eD]),eU=T.t("e.g. marketing"),eB=l()("p-channel_name_input__input",J);return n.createElement(p.A,{autoClogProps:et,actionProps:N,elementType:I.ElementType.INPUT},n.createElement("div",{className:X},!Q&&!ea&&eF(),n.createElement("div",{className:eB},q?eO():n.createElement(g.A,{value:F,icon:U?"lock":"channel",placeholder:P||eU,id:t,name:a,size:R,onChange:eS,showError:!el&&ea,errorText:!el&&ea?eT:void 0,maxCharacterLimit:em,onKeyDown:H,autoComplete:"off",focusOnMount:ee,isDisabled:K,"aria-label":T.t("Channel Name"),"data-qa":"channel-name-input",hintText:eM,isInvalid:$,useInlineAlert:ea})),Q&&!ea&&eF()))};ChannelNameInput.displayName="ChannelNameInput";let R=ChannelNameInput},0x18f7713e4:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x16ac9b089),c=a(0xb1ea448c),d=a(0x126f22530),m=a(0x15f8e452a),u=a(0x143fb6398),p=a(0xa1832ae4),h=a(0x1c8f352ff),_=a(0x1c91944c9),f=a(0x9b971e7e),b=a(0x1266f1359),g=a(0x1ee439e69);let y=new o.Ay("ui_validation"),A=class extends n.PureComponent{static defaultProps={additionalVerificationError:"",additionalVerificationGood:!1,nameNeedsChecking:!1,isCheckingAdditionalVerification:!1,placeholder:"",onInvalid:l.A,onValid:l.A,shouldFix:!1,focusOnMount:!1,icon:void 0,shouldSanitizeChannelName:!1,hideRules:!1};constructor(e){super(e),this.onChange=this.onChange.bind(this),this.renderWarning=this.renderWarning.bind(this),this.state={showInvalidCharactersWarning:!1,showLowercaseWarning:!1,showMaxLengthWarning:!1,showNameRequiredWarning:!1,showNameTakenWarning:!1,showPunctuationWarning:!1,showSpecialsWarning:!1,value:this.props.value}}componentDidMount(){this.props.nameNeedsChecking&&this.onChange(this.props.value)}onChange(e){let t=e,{nameNeedsChecking:a,onInvalid:n,onValid:r,shouldFix:i,teamId:l,maxChannelNameLength:o,shouldSanitizeChannelName:s}=this.props;i&&(t=this.fixName(t)),s&&(t=this.sanitizeChannelName(t));let c=(0,b.$D)(l),{hasNameRequiredWarning:d=!1,hasMaxLengthWarning:m=!1,hasSpecialsWarning:u=!1,hasPunctuationWarning:p=!1,hasLowercaseWarning:_=!1,hasNameTakenWarning:f=!1}=(0,h.cv)(c,t,this.props.value,o);if(t===this.props.value&&!a){n?.({value:t}),this.setState(()=>({showLowercaseWarning:!1,showMaxLengthWarning:!1,showNameRequiredWarning:!1,showNameTakenWarning:!1,showPunctuationWarning:!1,showSpecialsWarning:!1,value:t}));return}_||m||d||f||p||u?n?.({value:t}):r?.({value:t}),this.setState(()=>({showLowercaseWarning:_,showMaxLengthWarning:m,showNameRequiredWarning:d,showNameTakenWarning:f,showPunctuationWarning:p,showSpecialsWarning:u,value:t}))}fixName(e){let t=e.toLowerCase().replace(/^#+/,"");t=(t=t.replace(/^\s+/,"")).replace(/\s+$/,""),t=(0,h.Mj)(t);let{showInvalidCharactersWarning:a}=this.state;return a=!!t&&t!==e,this.setState(()=>({showInvalidCharactersWarning:a})),t}sanitizeChannelName(e){let t=e.toLowerCase();return(0,h.Mj)(t)}maybeRenderAdditionalValidationMarks(){let{additionalVerificationGood:e,isCheckingAdditionalVerification:t}=this.props,{showLowercaseWarning:a,showMaxLengthWarning:r,showNameRequiredWarning:i,showNameTakenWarning:l,showPunctuationWarning:o,showSpecialsWarning:s}=this.state;return a||r||i||l||o||s?null:t?n.createElement("span",{className:"p-channel_name_input--validating"},n.createElement(c.A,{size:"large",className:"inline_block"})):e?n.createElement("span",{"data-qa":"channel_name_input_validation",className:"p-channel_name_input--validating sk_lilypad_green"},y.t("Available",{fallbackHash:"7c62a1424469b1c1cf402f254409a96a0e6770cf",fallbackHashNs:"channel_options"}),n.createElement(m.A,{legacy:!0,align:"baseline",type:"check-circle-o-large"})):null}maybeRenderAdditionalVerificationWarning(){let{additionalVerificationError:e}=this.props;return e&&("object"==typeof e||e.length)?this.renderWarning(e):null}renderInvalidCharactersWarning(){return this.renderWarning(y.t("You entered some disallowed characters in the name, which we\u2019ve fixed. Make sure it looks good to you, and try again!",{fallbackHash:"9e8f8b8dce82659893f773faf9284206ab9f0061",fallbackHashNs:"channel_options"}))}renderLowercaseWarning(){return this.renderWarning(y.t("Channel names must be all lowercase. Try again?"))}renderMaxLengthWarning(e){let t=y.t("Channel names can\u2019t be longer than {maxlength} characters.",{maxlength:e});return this.renderWarning(t)}renderNameTakenWarning(){return this.renderWarning(y.t("{name} is already taken by a channel, username, or user group.",{name:this.state.value}))}renderPunctuationWarning(){return this.renderWarning(y.t("Names can\u2019t consist solely of punctuation. Please elaborate!"))}renderRequiredWarning(){return this.renderWarning(y.t("Don\u2019t forget to name your channel."))}renderRules(){let{channel:e,teamName:t,hideRules:a}=this.props;if(a)return null;if((0,u.ju)(e))return this.renderWarning(y.t("Names should be lowercase, with no spaces. Changes will only be visible to {teamName}.",{teamName:(0,s.Ay)(t),fallbackHash:"1a3f3677308363839cbd0be74600d986111eaf16",fallbackHashNs:"channel_options"}),!1);let n=y.t("Names must be lowercase, without spaces or periods, and can\u2019t be longer than 80 characters.",{fallbackHash:"69c839e687fd5541731e10a9158a3e434673fc87",fallbackHashNs:"channel_options"});return this.renderWarning(n,!1)}renderSpecialsWarning(){return this.renderWarning(y.t("Channel names can\u2019t contain spaces, periods, or most punctuation. Try again?"))}renderTextInput(e){let{id:t,placeholder:a,maxChannelNameLength:r,focusOnMount:l,icon:o}=this.props,{value:s}=this.state,c=i()("c-input_text","p-channel_name_input--input",{"p-channel_name_input--input_with_warning":e}),m={id:t,placeholder:a,value:s,onChange:this.onChange,name:"channel_name_input",className:c,showError:!1,maxCharacterLimit:r,focusOnMount:l,icon:o};return n.createElement(d.A,m)}renderWarning(e,t=!0){let a=n.createElement("span",{className:"flex_none small_right_margin"},n.createElement(m.A,{legacy:!0,type:"warning"})),r=i()("p-channel_name_input--input_note",{"p-channel_name_input--alert":t});return n.createElement("span",{className:r},t&&a,n.createElement("span",{className:"flex_one"},e))}render(){let{additionalVerificationError:e,maxChannelNameLength:t}=this.props,{showInvalidCharactersWarning:a,showLowercaseWarning:r,showMaxLengthWarning:i,showNameRequiredWarning:l,showNameTakenWarning:o,showPunctuationWarning:s,showSpecialsWarning:c}=this.state,d=a||r||i||l||o||s||c;return e&&("object"==typeof e||e.length)&&(d=!0),n.createElement("div",{className:"position_relative"},this.renderTextInput(d),this.maybeRenderAdditionalValidationMarks(),n.createElement("div",{"data-qa":"channel_name_input_warnings",className:"p-channel_name_input--warnings"},a&&this.renderInvalidCharactersWarning(),r&&this.renderLowercaseWarning(),i&&this.renderMaxLengthWarning(t),l&&this.renderRequiredWarning(),o&&this.renderNameTakenWarning(),s&&this.renderPunctuationWarning(),c&&this.renderSpecialsWarning(),this.maybeRenderAdditionalVerificationWarning()),this.renderRules())}};function mapStateToProps(e){let t=(0,h.zU)(),a=(0,f.Kc)(e)||"",n=(0,g._J)(e,a);return{maxChannelNameLength:t,teamId:a,teamName:(0,p.F1)(n)}}A.displayName="ChannelNameInput";let x=(0,_.N)(mapStateToProps)(A)},0xe67ef0ca:(e,t,a)=>{"use strict";a.d(t,{A:()=>eP});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x3e109430),s=a(0x7fa3cc8f),c=a(0x190e60a66),d=a(0x8c8bafa3),m=a(0x20482ad21),u=a(0x11dc1e636),p=a(0x205f4fb61),h=a(0x224f7f0e9),_=a(0xf3c40abe),f=a(0x11a296110),b=a(0xa6f3163b),g=a(0x1d2cd7755),y=a(0x126f22530),A=a(0x10598eeca),x=a(0x15f8e452a),E=a(0x1e586fbba),C=a(0x1faa3f1ac),k=a(0x2501a2cee),v=a(0x4c96e5d9),S=a(0x139aa1a7),I=a(0x247cf31a2),w=a(0x1d5cfcf57),T=a(0xaeaa9398),N=a(0x18af67efb),M=a(0xa7ec93c2),R=a(0x1fdec3e16),P=a(0x929229c1),L=a(0x15bd59d31),O=a(0x22c5d61d5),D=a(0x1b3ecb90f),F=a(0x226892387),U=a(0x8f36a342),B=a(0x1380694ee),H=a(0x4876f1b6),W=a.n(H);let V=new m.Ay("create_section_modal");function ChannelSectionMultiSelect({selectedChannelOptions:e,onSelectedChannelsChange:t,isMultiSelectInvalid:a,unknownChannelCount:r,noChannelsInsertedError:l,arePrivateChannelsJoinable:o}){let[s]=(0,n.useState)(e),c=(0,n.useCallback)(e=>{let t=e.section&&!O.f9.includes(e.section.type),a=e.isAppOrBot||e.isDm||e.isMpDm,r=e.section?.type===U.VZ.Stars?V.t("Starred"):e.section?.name;return n.createElement("div",{className:i()({[W().channelSectionMultiSelectOption]:t})},n.createElement(R.A,{lines:1,withTooltip:!0},a?n.createElement(P.A,{className:W().smallChannelListEntity,id:e.value}):n.createElement(L.A,{className:W().smallChannelListEntity,channelId:e.value})),t&&e.section?n.createElement("p",{className:W().channelSectionMultiSelectSectionInfo},V.t("In "),e.section.type===U.VZ.Stars?n.createElement(k.Ah,{name:"star-filled"}):n.createElement(D.Ay,{emojiSize:D.lw.SMALL,text:e.section.emoji}),n.createElement("span",{className:W().channelSectionMultiSelectSectionNameText},n.createElement(R.A,{lines:1,withTooltip:!0},r))):null)},[]),d=(0,F.d4)(B.zG),m=(0,n.useMemo)(()=>(0,N.A)([...d,...s],e=>e.value).sort((e,t)=>{let a=!(e.isDm||e.isMpDm||e.isAppOrBot),n=!(t.isDm||t.isMpDm||t.isAppOrBot);return a&&!n?-1:!a&&n?1:e.isDm&&!t.isDm?-1:!e.isDm&&t.isDm?1:e.isMpDm&&!t.isMpDm?-1:!e.isMpDm&&t.isMpDm||e.isAppOrBot&&!t.isAppOrBot?1:!e.isAppOrBot&&t.isAppOrBot?-1:0}),[d,s]);return m?n.createElement("div",{className:W().channelSectionMultiSelect},n.createElement(g.A,{text:V.t("Conversations to add"),subtext:V.t("You can always add more conversations after you create this section.")}),n.createElement(M.Ay,{optionsRowHeight:32,placeholderText:V.t("Search conversations"),isRequired:!1,options:m,selectedOptions:e,onSelectedItemsChange:t,ariaLabel:V.t("Conversations to add multi-select"),selectId:"conversationsToAddMultiSelect",renderOption:c,size:"medium",width:"100%",isInvalid:a,hints:(()=>{if(r&&r>0&&!l)return o?[{id:"private-channel-shared-section-hint",message:V.t("{count} new private {count, plural, =1 {channel} other {channels}} can\u2019t be customized until you join.",{count:r,fallbackHash:"9a3ea0598e7f4b115b6f5ea75d98c145395ac46e",fallbackHashNs:"shareable_channel_sets"})}]:[{id:"private-channel-shared-section-hint",message:V.t("{numChannels} {numChannels, plural, =1 {channel} other {channels}} can\u2019t be joined",{numChannels:r,fallbackHash:"b14c037d963d92640bb88a78f438fe7f053b3d1d",fallbackHashNs:"shareable_channel_sets"})}]})()})):null}ChannelSectionMultiSelect.displayName="ChannelSectionMultiSelect";var G=a(0x73ddfa63),q=a(0x18def662b),j=a(0xe28ad2a3),z=a(0x1faaed399),K=a(0x1254ae491),$=a(0x12185e091),Y=a(0x242503693),Q=a(0x6b345e37),Z=a(0x7441941c),J=a(0x1632f6a87),X=a(0x3711e82d),ee=a(0x45012309),et=a(0x1a0bfaf78),ea=a(0x1b18cac4b),en=a(0x1c91944c9),er=a(0x15c6836fa),ei=a(0x5f90c96a),el=a(0x11c82607b),eo=a(0x54e9e23d),es=a(0x24018635b);let ec=(0,el.Ay)("Channel Sections: rename a sidebar section",async(e,t,{channelSectionId:a,name:n,emoji:r,reason:i})=>{let l=(0,B.xe)(t(),a),o=l.name,s=l.emoji,{promise:c}=await e((0,es.g)({channelSection:{...l,name:n,emoji:r},reason:i}));return{resultPromise:c,undo:()=>(c.cancel(),e((0,es.g)({channelSection:{...(0,B.xe)(t(),a),name:o,emoji:s},reason:`undo-${i}`})))}});ec.meta={name:"renameChannelSection",key:"createThunkRenameChannelSection",description:"Channel Sections: rename a sidebar section"};let ed=new m.Ay("channel_sidebar"),em=(0,el.Ay)("rename channel section with toast & undo support",async(e,t,{channelSectionId:a,name:r,emoji:i,reason:l}={})=>{let{resultPromise:o,undo:s}=await e(ec({channelSectionId:a||"",name:r||"",emoji:i||"",reason:l||""})),cloggedUndo=()=>{s(),(0,ee.eo)({state:t()}).track(X.EventId.CHANNEL_SECTIONS_RENAME,{contexts:{ui_context:{action:X.UiAction.UNDO,ui_component_name:"PerformChannelSectionRename"},channel_section_id:a}})};return o.then(()=>{e((0,eo.A)({undo:cloggedUndo,content:ed.rt("Renamed to {channelSection}.",{channelSection:n.createElement("strong",null,n.createElement(ei.A,{channelSection:(0,B.xe)(t(),a)}))})}))})});em.meta={name:"performChannelSectionRename",key:"createThunkPerformChannelSectionRename",description:"rename channel section with toast & undo support"};var eu=a(0x23409b80b),ep=a(0x13bb82a7),eh=a(0x1529cf960),e_=a(0x1d01649c6),ef=a(0x24b37e04d),eb=a(0x217553e42),eg=a(0x17a41206b),ey=a(0xafce781a),eA=a(0x5b1935a6),ex=a(0x1fcbb004d);let eE=new m.Ay("current_status"),eC={cancelButton:{eventId:X.EventId.SIDEBAR_CHANNEL_SECTIONS_MODAL_CLOSE,elementName:"close_channel_sections_modal"},closeButton:{eventId:X.EventId.SIDEBAR_CHANNEL_SECTIONS_MODAL_CLOSE,elementName:"close_channel_sections_modal"}},ek="channel_selection_modal_input_for_channel_sections",ev="name_not_allowed",eS="name_taken",eI="name_empty",ew="name_too_long",eT="too_many_sections",eN="emoji_invalid",eM="unknown",eR="partial_success";function renderEmoji(e){return e?n.createElement("div",{className:"p-channel_section_modal_input__emoji"},n.createElement(D.Ay,{text:e,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:D.lw.MEDIUM,forceDisplay:!0})):n.createElement("div",{className:"p-channel_section_modal_input__empty_emoji"},n.createElement("span",{className:"p-channel_section_modal_input__emoji_circle_icon"},n.createElement(k.Ah,{name:"icon-placeholder-filled",size:"20"})),n.createElement("span",{className:"p-channel_section_modal_input__emoji_smile_icon"},n.createElement(k.Ah,{name:"emoji",size:"20"})),n.createElement("span",{className:"p-channel_section_modal_input__emoji_happy_icon"},n.createElement(k.Ah,{name:"emoji-filled",size:"20"})))}renderEmoji.displayName="renderEmoji";let BaseChannelSectionModalInput=class BaseChannelSectionModalInput extends n.PureComponent{static defaultProps={emojiMenuPosition:"bottom-left",initialText:"",initialEmoji:"",closeModal:l.A,allChannelSectionsById:{},channelSectionId:void 0,channelIds:[],nextChannelSectionId:"",firstChannelSectionId:"",canCreateChannelSection:!1,firstChannelToMove:void 0,overlayClassName:null,isClientOnline:!0,hasPendingChannelSectionSetRequest:!1,enablePrePopulatedSectionNames:!1,initialExpanded:!0,unknownChannelCount:0};selectedPresetOptionRef;textComponent;keyCommands;shouldShowPresetsAfterDelay;idleExpandTimerRef;previousProps;constructor(e){super(e);const{initialSelectedChannels:t}=e,a=t?.some(e=>e.section&&!O.f9.includes(e.section.type));this.state={text:e.initialText,emoji:e.initialEmoji,userDidSelectEmoji:!!e.initialEmoji,selectedPresetIndex:void 0,validationState:this.getValidationStateForName(e.initialText,e.isSharedChannelSectionNameTaken),isPending:!1,filterQuery:e.initialText,selectId:"channel-section-search-select",isExpanded:!1,activeRowIndex:void 0,shouldRenderPresetsOnMount:!0,showSpeedBump:!1,selectedChannels:t??[],hasChannelInCustomSection:a,noChannelsInsertedError:!1},this.onTextChange=this.onTextChange.bind(this),this.onTextKeyDown=this.onTextKeyDown.bind(this),this.onEmojiChange=this.onEmojiChange.bind(this),this.onSubmit=this.onSubmit.bind(this),this.performSubmit=this.performSubmit.bind(this),this.onClearIconClick=this.onClearIconClick.bind(this),this.setFocusOnTextInput=this.setFocusOnTextInput.bind(this),this.handleChannelSectionNameInputState=this.handleChannelSectionNameInputState.bind(this),this.onSelectedChannelsChange=this.onSelectedChannelsChange.bind(this),this.selectedPresetOptionRef=n.createRef(),this.textComponent=n.createRef(),this.shouldShowPresetsAfterDelay={current:void 0},this.idleExpandTimerRef={current:null},this.onBlurControlledSearchSelect=this.onBlurControlledSearchSelect.bind(this)}componentDidMount(){this.props.experimentSimpleSharedSectionsV2GroupOn&&(this.idleExpandTimerRef.current=setTimeout(()=>{this.shouldShowPresetsAfterDelay.current=this.shouldShowPresetsAfterDelay.current??!0,this.shouldShowPresetsAfterDelay.current&&this.state.shouldRenderPresetsOnMount&&this.setState(e=>({...e,isExpanded:!0}))},O.yE))}componentDidUpdate(e){let{initialEmoji:t,initialText:a}=this.props,{initialEmoji:n,initialText:r}=e;if(this.selectedPresetOptionRef.current&&this.selectedPresetOptionRef.current.focus(),t===n&&a===r||this.hasUnsavedChanges()||this.setState(()=>({emoji:t,text:a,validationState:this.getValidationStateForName(a)})),!1!==this.shouldShowPresetsAfterDelay.current){let{text:e}=this.state;(e||!this.state.shouldRenderPresetsOnMount)&&(this.shouldShowPresetsAfterDelay.current=!1)}}componentWillUnmount(){this.keyCommands&&this.keyCommands.reset(),this.idleExpandTimerRef.current&&clearTimeout(this.idleExpandTimerRef.current)}onClearIconClick(){this.clearStatus()}onBlurControlledSearchSelect(){this.setState(()=>({shouldRenderPresetsOnMount:!1}))}onEmojiChange(e){this.setState(()=>({emoji:e,userDidSelectEmoji:!0}),this.setFocusOnTextInput)}onSelectedChannelsChange(e){let t=e.some(e=>e.section&&!O.f9.includes(e.section.type));this.setState(()=>({selectedChannels:e,hasChannelInCustomSection:t}))}onPresetSelected({emoji:e,text:t}){this.setState(()=>({emoji:e,text:t,userDidSelectEmoji:!0,validationState:this.getValidationStateForName(t),filterQuery:t,isExpanded:!1}),this.setFocusOnTextInput)}onSubmit(){let{validationState:e}=this.state,{action:t,experimentSimpleSharedSectionsV2GroupOn:a}=this.props;if(this.hasUnsavedChanges()&&e.isValid){if((t===O.TH.CREATE||t===O.TH.CREATE_AND_MOVE)&&a&&this.state.hasChannelInCustomSection)return void this.toggleModalSpeedBump();this.performSubmit()}}getChannelCountsForAllSectionTypes(e){return this.props.action!==O.TH.CREATE_AND_MOVE_SHARED_SECTION?{}:e.reduce((e,t)=>{let a=t.section?.type,n=e[a]?e[a]+1:1;return e[a]=n,e},{})}performSubmit(){let e,{validationState:t,emoji:a,text:n,selectedChannels:r}=this.state,{allChannelSectionsById:i,sharedChannelSectionArgs:l}=this.props;if(!this.hasUnsavedChanges()||!t.isValid)return;this.setState(()=>({isPending:!0,noChannelsInsertedError:!1}));let o=this.props.nextChannelSectionId||this.props.firstChannelSectionId;o=(0,Z.lJ)((i||{})[o||""])?null:o;let s=r.map(e=>e.value),c=this.getChannelCountsForAllSectionTypes(this.props.initialSelectedChannels),d=this.getChannelCountsForAllSectionTypes(this.state.selectedChannels);switch(this.props.action){case O.TH.CREATE:this.props.clogger?.track(X.EventId.CHANNEL_SECTIONS_CREATE,{contexts:{ui_context:{action:X.UiAction.CLICK,ui_component:X.UiComponent.CHANNEL_SECTIONS_MODAL,ui_element:X.UiElement.CHANNEL_SECTION_MODAL_SUBMIT}}}),e=this.props.performChannelSectionCreate?.({emoji:a,name:n,nextChannelSectionId:o||"",reason:"channel-section-modal-submit"});break;case O.TH.RENAME:this.props.clogger?.track(X.EventId.CHANNEL_SECTIONS_RENAME,{contexts:{ui_context:{action:X.UiAction.CLICK,ui_component:X.UiComponent.CHANNEL_SECTIONS_MODAL,ui_element:X.UiElement.CHANNEL_SECTION_MODAL_SUBMIT}}}),e=this.props.performChannelSectionRename?.({channelSectionId:this.props.channelSectionId,emoji:a,name:n,reason:"channel-section-modal-submit"});break;case O.TH.CREATE_AND_MOVE:this.props.entities?.length?e=this.props.performMoveManyEntitiesToNewSection?.({entities:this.props.entities,emoji:a||"",name:n||"",skipNavigationToEntity:this.props.skipNavigationForEntities,reason:"channel-section-modal-submit"}):(this.props.clogger?.track(X.EventId.CHANNEL_SECTIONS_CREATE,{contexts:{ui_context:{action:X.UiAction.CLICK,ui_component:X.UiComponent.CHANNEL_SECTIONS_MODAL,ui_element:X.UiElement.CHANNEL_SECTION_MODAL_SUBMIT}}}),e=this.props.performMoveManyChannelsToNewSection?.({channelIds:s,emoji:a,name:n,nextChannelSectionId:o,reason:"channel-section-modal-submit"}));break;case O.TH.CREATE_AND_MOVE_SHARED_SECTION:this.props.clogger?.track(X.EventId.ADD_CUSTOMIZED_SHARED_CHANNEL_SECTION_CLICK,{selectedChannelCount:{...d,total:s.length},unknownChannelCount:this.props.unknownChannelCount,knownPrivateChannelCount:this.props.knownPrivateChannelCount,defaultAttachedChannelCount:{...c,total:this.props.defaultAttachedChannelCount},isLinkUnfurl:!!this.props.isLinkUnfurl}),e=this.props.performMoveManyChannelsToNewSection?.({channelIds:s,emoji:a,name:n,nextChannelSectionId:o,reason:"channel-section-modal-submit",isNewSectionFromSharedChannelSectionAttachment:this.props.isNewSectionFromSharedChannelSectionAttachment,addToChannels:!0,sharedChannelSectionArgs:l});break;default:return}e.then(e=>{let t=this.props.action===O.TH.CREATE||this.props.action===O.TH.CREATE_AND_MOVE,a=this.props.action!==O.TH.CREATE_AND_MOVE_SHARED_SECTION;this.props.sharedChannelSectionArgs&&this.props.setSharedChannelSectionErrors?.({sharedChannelSectionArgs:this.props.sharedChannelSectionArgs,errors:e?.acceptanceErrors??{}}),t?this.props.transitionFocusTo?.({focusKey:Y.Ay.SIDEBAR_NEW_SECTION,focusMetadata:{id:S.D.ChannelList,params:{newChannelSectionId:e.id}}}):a&&this.props.transitionFocusTo?.({focusKey:Y.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),t&&this.props.experimentSimpleSharedSectionsV2GroupOn&&s.length&&(this.props.setShareChannelSectionCoachmarkSectionId?.(e.id),this.props.throttledLoadMegaphoneNotificationData?.({event:{type:eA.jo.CHANNEL_SECTION_CREATED}})),this.props.closeModal&&this.props.closeModal()}).catch(e=>{if(`${e}`.includes("no_channels_to_insert"))this.setState(()=>({noChannelsInsertedError:!0}));else{let t={too_many_sections:{reason:eT,isValid:!0},emoji_invalid:{reason:eN,isValid:!0},name_invalid:{reason:ev,isValid:!1},already_exists:{reason:eS,isValid:!1}},a={reason:eM,isValid:!0};a="move"===e.failureContext?{reason:eR,isValid:!1,sectionName:n}:"create"===e.failureContext?t[e.wrapped.data?.error]:t[e.data?.error],this.setState(()=>({validationState:a||{reason:eM,isValid:!0}}))}}).finally(()=>{this.setState(()=>({isPending:!1}))})}toggleModalSpeedBump=()=>{this.setState(e=>({...e,showSpeedBump:!e.showSpeedBump}))};onTextKeyDown(e){if(e.keyCode===h.Fm){let{validationState:t}=this.state;this.hasUnsavedChanges()&&t.isValid&&(e.preventDefault(),this.onSubmit())}}onTextChange(e){let{text:t,emoji:a,userDidSelectEmoji:n}=this.state;if(e===t)return;let r=a;n||(r=""),this.setState(()=>({text:e,emoji:r,validationState:this.getValidationStateForName(e)}))}setFocusOnTextInput(){this.textComponent.current.focus(),this.resetSelectedPresetIndex()}setSelectedPresetIndex(e){this.setState(()=>({selectedPresetIndex:e}))}handleOptionsListClose=()=>{this.setState(()=>({activeRowIndex:void 0}))};getChannelSectionNameSet(){let{initialText:e,allChannelSectionsById:t,getChannelSectionName:a}=this.props;return(0,o.A)((0,s.A)(t).filter(t=>(0,ea.A)(e||"")!==(0,ea.A)(a?.({channelSection:t})||"")).map(e=>[(0,ea.A)(a?.({channelSection:e})||""),!0]))}getValidationStateForName(e,t){let a=(0,ea.A)(e||""),isInvalid=e=>({isValid:!1,reason:e});return t?isInvalid(eS):e&&0!==a.length?e.length>O.bX||a.length>O.bX?isInvalid(ew):"ekm_access_denied"===a?isInvalid(ev):a in this.getChannelSectionNameSet()?isInvalid(eS):this.props.action!==O.TH.CREATE&&this.props.action!==O.TH.CREATE_AND_MOVE&&this.props.action!==O.TH.CREATE_AND_MOVE_SHARED_SECTION||this.props.canCreateChannelSection?{isValid:!0,reason:null}:isInvalid(eT):isInvalid(eI)}clearStatus(){this.setState(()=>({text:"",emoji:"",userDidSelectEmoji:!1,filterQuery:"",validationState:this.getValidationStateForName(""),isExpanded:!0,activeRowIndex:void 0}),()=>{this.setFocusOnTextInput()})}hasInput(){let{emoji:e,text:t}=this.state;return!!(t||e)}hasUnsavedChanges(){let{initialText:e,initialEmoji:t,enablePrePopulatedSectionNames:a}=this.props,{emoji:n,text:r}=this.state;return n!==t||r!==e||a&&!!e}maybeRenderSaveButton(){let{action:e}=this.props,{validationState:t}=this.state;if(!this.hasUnsavedChanges())return null;let a=eE.t("Save"),r=!t.isValid||e!==O.TH.CREATE&&(!this.props.isClientOnline||this.props.hasPendingChannelSectionSetRequest);return n.createElement("div",{className:"align_right"},n.createElement(f.Ay,{type:"primary",size:"small",onClick:this.onSubmit,disabled:r,"data-qa":"channel_selection_modal_input_submit_button"},a))}resetSelectedPresetIndex(){this.setSelectedPresetIndex()}handleChannelSectionNameInputState=(e,t)=>{let a=e();if(!a||"object"!=typeof a)return;let n=!1,r="",i="";this.setState(e=>{let t={...e};return void 0!==a.filterQuery&&(t.text=a.filterQuery,t.filterQuery=a.filterQuery,t.activeRowIndex=void 0,t.validationState=this.getValidationStateForName(a.filterQuery)),void 0!==a.isExpanded&&(t.isExpanded=a.isExpanded,!this.previousProps&&this.props&&(t.isExpanded=!1),t.activeRowIndex=a.isExpanded?void 0:e.activeRowIndex),void 0!==a.activeRowIndex&&(t.activeRowIndex=a.activeRowIndex),a.selectedOption&&a.selectedOption.value&&(r=a.selectedOption.value,i=(0,T.E)().find(e=>e.text===r)?.emoji||"",n=!0,t.isExpanded=!1),this.previousProps=this.props,t},()=>{n&&(this.onPresetSelected({emoji:i,text:r}),this.textComponent.current?.focus()),t&&t()})};renderActionButtons(){let e=this.hasUnsavedChanges()||this.hasInput(),t=i()("p-channel_section_modal_input__actions","p-channel_section_modal_input__actions--with_expiry",{"p-channel_section_modal_input__actions--invisible":!e});return n.createElement("div",{className:t},this.maybeRenderSaveButton())}renderClearIcon(){let{text:e,emoji:t}=this.state,{experimentSimpleSharedSectionsV2GroupOn:a}=this.props;if(!e&&!t)return null;let r=eE.t("Clear all"),l=n.createElement(b.A,{className:"p-channel_section_modal_input__clear_link","aria-label":r,"data-qa":"channel_selection_modal_clear_icon",onClick:this.onClearIconClick},n.createElement(x.A,{legacy:!0,type:"close-filled",className:"p-channel_section_modal_input__clear_icon"}));return n.createElement("div",{className:i()("p-channel_section_modal_input__status_clear_icon_wrap",{"p-channel_section_modal__status_clear_icon_wrap":a})},n.createElement(v.Ay,{tip:r,position:"top",zIndex:"above_fs"},l))}renderEmojiPicker(){let{emojiMenuPosition:e,experimentSimpleSharedSectionsV2GroupOn:t}=this.props,{emoji:a}=this.state,r=(0,c.F)().getLocaleForLastViewedTeam()===u.Xn?a:"",l=(0,et.A)(r||"");return n.createElement(z.A,{onEmojiSelected:(e,t)=>this.onEmojiChange(`:${t}:`),offsetY:"top"===e?-5:5,position:e},n.createElement(b.A,{className:i()("p-channel_section_modal_input__emoji_picker",{"p-channel_section_modal__emoji_picker":t}),"aria-label":l||eE.t("Emoji menu"),"data-qa":"channel_selection_modal_input_emoji_picker"},renderEmoji(a)))}renderPresetOption(e,t){let{selectedPresetIndex:a}=this.state,{emoji:r,text:i,description:l}=e,o=t===a?this.selectedPresetOptionRef:void 0;return n.createElement(b.A,{className:"p-channel_section_modal_input__preset_option","data-qa":"channel_selection_modal_input_preset_option",onClick:()=>this.onPresetSelected({emoji:r,text:i}),key:t,onFocus:()=>this.setSelectedPresetIndex(t),onBlur:()=>this.resetSelectedPresetIndex(),ref:o},n.createElement("div",{className:"p-channel_section_modal_input__preset_option_emoji"},renderEmoji(r)),n.createElement("div",{className:"p-channel_section_modal_input__preset_option_text"},i),n.createElement("div",{className:"p-channel_section_modal_input__preset_option_description"},"\xa0\u2014 ",l))}renderPresets(){let{emoji:e,text:t}=this.state;if(e||t)return null;let a=(0,T.l)().map(this.renderPresetOption,this);return n.createElement("div",{className:"p-channel_section_modal_input__presets"},a)}renderSectionNameLabel(){let{experimentSimpleSharedSectionsV2GroupOn:e,action:t}=this.props;return t!==O.TH.RENAME&&e?n.createElement(g.A,{className:"margin_left_175",text:n.createElement("strong",null,eE.t("Name your section"))}):null}renderStatusTextInput(){let{validationState:e,text:t}=this.state,{experimentSimpleSharedSectionsV2GroupOn:a}=this.props,r=eE.t("Choose a helpful name"),i=e.reason&&e.reason!==eI;if(a){let{filterQuery:t,isExpanded:a,selectId:r,emoji:i,activeRowIndex:l}=this.state;return n.createElement(G.A,{filterQuery:t,isExpanded:a,selectId:r,emoji:i,activeRowIndex:l,validationState:e,textComponent:this.textComponent,onSetSelectState:this.handleChannelSectionNameInputState,onOptionsListClose:this.handleOptionsListClose,onBlur:this.onBlurControlledSearchSelect})}return n.createElement(y.A,{className:"p-channel_section_modal_input__text_input","aria-label":r,size:A.F.large,id:ek,name:ek,onKeyDown:this.onTextKeyDown,onChange:this.onTextChange,focusOnMount:!0,"data-qa":"channel_selection_modal_input_text_input",value:t,maxCharacterLimit:O.bX,placeholder:r,counterMinimumCharacters:O.pI,isInvalid:!e.isValid&&e.reason!==eI,showError:!1,ref:this.textComponent,autoComplete:"off",isRequired:!0,ariaDescribedById:i?"channel_section_validation_alert":void 0})}renderChannelSectionMultiSelect(){let{action:e,unknownChannelCount:t,arePrivateChannelsJoinable:a}=this.props,{noChannelsInsertedError:r}=this.state;return e===O.TH.RENAME?null:n.createElement(ChannelSectionMultiSelect,{selectedChannelOptions:this.state.selectedChannels,onSelectedChannelsChange:this.onSelectedChannelsChange,isMultiSelectInvalid:r,noChannelsInsertedError:r,unknownChannelCount:t,arePrivateChannelsJoinable:a})}renderValidationAlert(){let e,{firstChannelToMove:t}=this.props,{validationState:a}=this.state;if(!a.reason)return null;switch(a.reason){case eI:case ew:return null;case eS:e=eE.t("You already have a section with this name.");break;case eT:e=eE.rt("Unfortunately, you can\u2019t create any more sections \u2014 {numMaxChannelSections} is the max.",{numMaxChannelSections:(0,p.Ay)(K.dl)});break;case eN:e=eE.rt("Unfortunately, that emoji\u2019s been removed from your workspace.");break;case ev:e=eE.rt("Unfortunately, that name isn\u2019t valid. Try another?");break;case eR:e=!t||(0,$.yz)(t)||(0,$.LI)(t)?eE.rt("{sectionName} was created, but the conversation couldn\u2019t be moved to it. If this keeps happening, try reloading.",{sectionName:a.sectionName}):eE.rt("{sectionName} was created, but {channelName} couldn\u2019t be moved to it. If this keeps happening, try reloading.",{sectionName:a.sectionName,channelName:n.createElement(I.A,{channel:t})});break;default:e=n.createElement(n.Fragment,null,n.createElement("strong",null,eE.rt("Something went wrong.")),eE.rt(" Reloading Slack might clear things up. If it doesn\u2019t, <a>drop us a line</a>.",{},({text:e,key:t})=>n.createElement(C.A,{href:`https://${(0,d.qF)()}/help/contact`,rel:"noopener noreferrer",key:t},e)))}return n.createElement(E.A,{"data-qa":"channel_section_validation_alert","data-qa-reason":a.reason,id:"channel_section_validation_alert"},e)}renderNoChannelsInsertedAlert(){let{experimentSimpleSharedSectionsV2GroupOn:e}=this.props;return e?n.createElement(E.A,{"data-qa":"channel_section_validation_alert",id:"channel_section_validation_alert"},eE.t("Can\u2019t be accepted. Try any public channels individually, or ask for a new invite.")):null}isGoButtonDisabledForSharedChannelSectionAcceptance(){let{unknownChannelCount:e}=this.props,{selectedChannels:t}=this.state;return 0===e&&!t.length}render(){let e,t,{action:a,overlayClassName:r,hasPendingChannelSectionSetRequest:l,experimentSimpleSharedSectionsV2GroupOn:o}=this.props,{validationState:s,isPending:c,showSpeedBump:d,noChannelsInsertedError:m}=this.state,u=!this.hasUnsavedChanges()||!s.isValid||a!==O.TH.CREATE&&(!this.props.isClientOnline||l)||a===O.TH.CREATE_AND_MOVE_SHARED_SECTION&&this.isGoButtonDisabledForSharedChannelSectionAcceptance();switch(this.props.action){case O.TH.CREATE:e=eE.t("Create"),t=eE.t("Create a sidebar section");break;case O.TH.RENAME:e=eE.t("Save"),t=eE.t("Rename this section");break;case O.TH.CREATE_AND_MOVE:e=eE.t("Create"),t=eE.t("Create a sidebar section");break;case O.TH.CREATE_AND_MOVE_SHARED_SECTION:e=eE.t("Add to Home"),t=eE.rt("Customize {channelSetName}",{channelSetName:this.props.initialText})}let p=this.onSubmit;return n.createElement(j.Ay,{className:i()("p-channel_section_modal_input__dialog","p-channel_section_modal_input--modern",{"p-channel_section_modal__dialog":o},{"p-channel_section_modal__dialog--action_rename":o&&a===O.TH.RENAME}),goButtonIsDisabled:u,goButtonIsPending:c,goButtonText:e,goButtonType:"primary",onGo:p,title:t,shouldCloseOnOverlayClick:!0,useSlackScrollbar:!1,showTooltipOnCloseButton:!0,shouldCloseOnGo:!1,overlayClassName:r??void 0,"data-qa":"channel_selection_modal_input",autoClogProps:eC},d&&n.createElement(w.A,{onCancelSpeedbump:this.toggleModalSpeedBump,onSubmit:this.performSubmit}),o&&this.renderSectionNameLabel(),n.createElement("div",{className:i()("p-channel_section_modal_input__input_wrap",{"p-channel_section_modal__input_wrap":o,"p-channel_section_modal__input_wrap--action_rename":o&&a===O.TH.RENAME,"p-channel_section_modal__input_wrap_validation--active":o&&this.renderValidationAlert()})},this.renderStatusTextInput(),this.renderEmojiPicker(),this.renderClearIcon()),o&&n.createElement("div",{className:i()("p-channel_section_modal_input__input_wrap","p-channel_section_modal__validation_alert")},this.renderValidationAlert()),o&&this.renderChannelSectionMultiSelect(),m&&n.createElement("div",{className:i()("p-channel_section_modal_input__input_wrap","p-channel_section_modal__validation_alert")},this.renderNoChannelsInsertedAlert()),!o&&n.createElement("div",{className:"p-channel_section_modal_input__input_wrap"},this.renderValidationAlert()),!o&&this.renderPresets())}};function mapStateToProps(e,{initialText:t,initialEmoji:a,channelIds:n}){let r=(0,B.jV)(e),i=(0,B.VH)(e),l=(0,K.Gi)(e,i).ok,o=(0,q.QT)(e);return{initialText:t,initialEmoji:a,allChannelSectionsById:r,firstChannelSectionId:(0,B.W4)(e)||void 0,canCreateChannelSection:l,firstChannelToMove:n&&1===n.length&&(0,eb.OL)(e,n[0])||void 0,isClientOnline:(0,eg.Pb)(e),hasPendingChannelSectionSetRequest:(0,e_.T)(e),clogger:(0,ee.eo)({state:e}),initialSelectedChannels:n?(0,B.zG)(e,n):[],experimentSimpleSharedSectionsV2GroupOn:o}}BaseChannelSectionModalInput.displayName="BaseChannelSectionModalInput";let eP=(0,en.N)(mapStateToProps,e=>({closeModal:()=>e((0,ex.O)()),performChannelSectionCreate:t=>e((0,er.A)(t)),performChannelSectionRename:t=>e(em(t)),performMoveManyChannelsToNewSection:t=>e((0,eu.A)(t)),performMoveManyEntitiesToNewSection:t=>e((0,ep.$)(t)),getChannelSectionName:t=>e((0,J.i1)(t)),setSharedChannelSectionErrors:t=>e((0,eh.jq)(t)),setShareChannelSectionCoachmarkSectionId:t=>e((0,ef.f8)(t)),throttledLoadMegaphoneNotificationData:(...t)=>e((0,ey.u2)(...t))}))((0,Q.A)((0,_.A)(BaseChannelSectionModalInput)))},0x1d5cfcf57:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x13384fc56),l=a(0x18def662b),o=a(0x226892387);let s=new r.Ay("create_section_modal"),ChannelSectionModalSpeedBump=({onCancelSpeedbump:e,onSubmit:t,continueButtonIsLoading:a,isAcceptingSharedChannelSection:r=!1})=>{let c=(0,o.d4)(l.JQ),d=s.t("Some conversations you selected are already organized in other sections. Are you sure you want to move them here?"),m=c?s.t("Cancel"):"Cancel",u=c?s.t("Edit Selections"):s.t("Edit Selected Conversations"),p=s.t("Move Conversations");return n.createElement(i.A,{onCancel:e,onContinue:t,heading:d,cancelButtonLabel:r?m:u,continueButtonLabel:p,continueButtonType:"primary",description:"",continueButtonIsLoading:a})};ChannelSectionModalSpeedBump.displayName="ChannelSectionModalSpeedBump";let c=ChannelSectionModalSpeedBump},0xaeaa9398:(e,t,a)=>{"use strict";a.d(t,{E:()=>getCommonPresets,l:()=>getTeamPresets});let n=new(a(0x20482ad21)).Ay("current_status"),getCommonPresets=()=>[{emoji:":relaxed:",text:n.t("Team"),description:n.t("Team channels and direct messages")},{emoji:":rolled_up_newspaper:",text:n.t("Announcements"),description:n.t("Internal communications")},{emoji:":sunglasses:",text:n.t("Social"),description:n.t("Fun channels")}],getTeamPresets=()=>[{emoji:":bookmark:",text:n.t("Priority"),description:n.t("Important conversations")},...getCommonPresets()]},0x73ddfa63:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x7d48dd65),i=a(0x1e49806fc),l=a(0x20482ad21),o=a(0x10598eeca),s=a(0x1d1911997),c=a(0xaeaa9398),d=a(0x1b3ecb90f),m=a(0x15a4ffb05),u=a(0x11fbdf93f),p=a.n(u);let h=new l.Ay("create_section_modal"),_="name_empty",getOptionGroup=()=>[{label:"Common section names",options:(0,c.E)()}],renderPresetOptions=(e=getOptionGroup)=>e().map(e=>({label:e.label,options:e.options.map(e=>({label:n.createElement("span",null,n.createElement(d.Ay,{text:e.emoji,stopAnimations:!0,emojiSize:d.lw.MEDIUM,forceDisplay:!0}),n.createElement("span",{className:p().channelSectionOptionText},e.text),e.description.length?n.createElement("span",{className:p().channelSectionOptionDescription}," ","\u2014"," ",n.createElement(m.A,{text:e.description,emojiSize:d.lw.SMALL})):null),value:e.text}))}));renderPresetOptions.displayName="renderPresetOptions";let renderOption=e=>e.label,renderSelectedOption=e=>e.value,ChannelSectionNameInput=({filterQuery:e,isExpanded:t,selectId:a,emoji:l,activeRowIndex:c,validationState:d,textComponent:m,onSetSelectState:u,onOptionsListClose:p,onBlur:f,optionsGroupGetter:b,focusOnMount:g=!0})=>{let y,A=h.t("Ex: Project Beta"),{renderedOptions:x,totalFilteredOptions:E}=(0,n.useMemo)(()=>{let t=renderPresetOptions(b),a=t;e&&(a=t.map(t=>({...t,options:(0,r.A)(t.options,t=>(0,i.A)(t.value).toLowerCase().includes((0,i.A)(e).toLowerCase()))})).filter(e=>e.options.length>0));let n=a.reduce((e,t)=>e+t.options.length,0);return{renderedOptions:a,totalFilteredOptions:n}},[e,b]),C=""===l&&E>0;y=C?c:void 0;let k=!d.isValid&&d.reason!==_,v=(0,n.useMemo)(()=>({filterQuery:e||"",options:C?x:[],selectId:a||"channel-section-search-select",isExpanded:t&&C,isInvalid:k,isDisabled:!1,selectedOption:null,activeRowIndex:y}),[y,e,t,k,x,a,C]),S=d.reason&&d.reason!==_;return n.createElement(s.JJ,{ariaLabel:A,placeholderText:A,width:"100%",selectState:v,setSelectState:u,showDropdownIcon:!1,inputRef:m,isLoading:!1,focusOnMount:g,expandOnFocus:!0,isDisabled:!1,size:o.F.medium,isRequired:!0,renderOption:renderOption,renderSelectedOption:renderSelectedOption,isInvalid:k,ariaDescribedBy:S?"channel_section_validation_alert":void 0,onOptionsListClose:p,onBlur:f})};ChannelSectionNameInput.displayName="ChannelSectionNameInput";let f=ChannelSectionNameInput},0x22c5d61d5:(e,t,a)=>{"use strict";a.d(t,{TH:()=>r,bX:()=>l,f9:()=>i,pI:()=>o,yE:()=>s});var n=a(0x8f36a342);let r={CREATE:"create",RENAME:"rename",CREATE_AND_MOVE:"move",CREATE_AND_MOVE_SHARED_SECTION:"create-and-move-shared-section"},i=[n.VZ.Channels,n.VZ.SlackConnect,n.VZ.DirectMessages,n.VZ.RecentApps],l=80,o=74,s=2e3},0xfadc3278:(e,t,a)=>{"use strict";a.d(t,{i:()=>eD});var n,r,i=a(0xbad225b5),l=a(0xe67ef0ca),o=a(0x22c5d61d5),s=a(0x16cf1da63),c=a(0x3b6d144f),d=a(0x8c8bafa3),m=a(0x20482ad21),u=a(0x1faa3f1ac),p=a(0x24546e7f2),h=((n={}).CREATE_A_SECTION="create-a-section",n.ADD_CHANNELS="add-channels",n),_=a(0x3e109430),f=a(0x7fa3cc8f),b=a(0x1d01572a2),g=a(0x40c0d834),y=a(0x2b7f0bcc),A=a(0x11a296110),x=a(0xce378727),E=a(0x1d71c4455),C=a(0xa6f3163b),k=a(0xd2bf4d47),v=a(0x1d57b7d4c),S=a(0x1d2cd7755),I=a(0x139c79d16),w=a(0xa5dbe09b),T=a(0x2501a2cee),N=a(0x1fd3f6e20),M=a(0x1d5cfcf57),R=a(0x73ddfa63),P=a(0x18def662b),L=a(0x1b3ecb90f),O=a(0x1faaed399),D=a(0x238b287cf),F=a(0xf5bbd10a),U=a(0x2120d7f64),B=a(0x20e80190e),H=a(0x7441941c),W=a(0x3711e82d),V=a(0x1a0bfaf78),G=a(0x1b18cac4b),q=a(0xb6280893),j=a(0x15c6836fa),z=a(0x13bb82a7),K=a(0x226892387),$=a(0x8f36a342),Y=a(0x1380694ee),Q=a(0x35945a76),Z=a(0x20cd090a7),J=a.n(Z);let X=new m.Ay("current_status"),ee="name_not_allowed",et="name_taken",ea="name_empty",en="name_too_long",er={eventId:W.EventId.CREATE_SECTION_MODAL_STEP_ONE_CREATE_SECTION,onClick:{enableClogAction:!0}},createSortAutoClogProps=e=>({enableClogAction:!0,eventId:W.EventId.CREATE_SECTION_MODAL_STEP_ONE_SORT_CHANGE,onChange:{enableClogAction:!0,setElementValueForAdditionalKey:e,setElementValueOnAction:e}});function getValidationErrorMessage(e,t){if(!e)return null;switch(e){case ea:return t?X.t("Section name is required"):"Section name is required";case en:return t?X.t("The section name is too long"):"The section name is too long";case et:return X.t("You already have a section with this name.");case ee:return X.t("Unfortunately, that name isn\u2019t valid. Try another?");default:return null}}let ei=(0,i.memo)(({initialText:e,nextChannelSectionId:t,goToAddConversationsPane:a,entities:n,skipNavigationToEntity:r,closeModal:l,isSharedChannelSection:c,emoji:d,setEmoji:m,filterQuery:u,setFilterQuery:p,setSuggestedSectionPrefKey:h,sectionSort:Z,setSectionSort:ei,maybeUpdateUserPrefs:el,createNewSectionAndSetPrefsForSharedSection:eo,channelIds:es,channelsWithSections:ec,getErrorMessageFromFailedAPIRequest:ed,globalChannelSortPref:em})=>{let eu,ep,eh=(0,s.wA)(),e_=(0,F.A)(),ef=(0,D.A)(),eb=(0,K.d4)(P.JQ),[eg,ey]=(0,i.useState)(!1),[eA,ex]=(0,i.useState)(void 0),[eE,eC]=(0,i.useState)({isValid:!0,reason:null}),[ek,ev]=(0,i.useState)(""),[eS,eI]=(0,i.useState)(!1),ew=(0,i.useRef)(!1),{speedBumpState:eT,closeSpeedBump:eN,openSpeedBump:eM}=(0,U.v)(),eR=(0,i.useRef)(null),eP=(0,K.d4)(Y.jV),eL=(0,K.d4)(Y.W4),eO=(0,i.useMemo)(()=>(0,_.A)((0,f.A)(eP).map(e=>[(0,G.A)(e.name||""),!0])),[eP]),eD=(0,i.useCallback)(e=>({isValid:!1,reason:getValidationErrorMessage(e,eb)}),[eb]),eF=(0,i.useCallback)(e=>{let t=(0,G.A)(e||"");return e&&0!==t.length?e.length>o.bX||t.length>o.bX?eD(en):"ekm_access_denied"===t?eD(ee):t in eO?eD(et):{isValid:!0,reason:null}:eD(ea)},[eO,eD]),eU=(0,i.useCallback)(()=>{let e=eF(u);return eC(e),e},[u,eF]),eB=(0,i.useCallback)(()=>{ew.current||ey(!0)},[]);(0,b.A)(()=>{c&&eU(),setTimeout(()=>{eB()},2e3)});let eH=(0,K.wz)(q.d),eW=t??eL??void 0,eV=(0,H.lJ)(eP[eW??""])?void 0:eW,eG=(0,i.useCallback)(()=>[{label:eb?X.t("Suggested section names"):"Suggested section names",options:eH}],[eb,eH]),eq=(0,i.useCallback)((e,t)=>{let a=e();if(!a.isInvalid&&a.filterQuery&&eC({isValid:!0,reason:null}),void 0!==a.filterQuery&&(p(a.filterQuery),eC(eF(a.filterQuery))),void 0!==a.activeRowIndex&&ex(a.activeRowIndex),void 0!==a.isInvalid&&eC(e=>({...e,isValid:!a.isInvalid})),a.selectedOption){let e=a.selectedOption.value;p(e);let t=eG().flatMap(e=>e.options).find(t=>t.text===e);t?.emoji&&m(t.emoji),t?.prefKey&&h(t.prefKey),eC(eF(e)),ey(!1),ef.track(W.EventId.CREATE_SECTION_MODAL_STEP_ONE_SUGGESTION_CHOSEN)}t&&t()},[ef,eG,eF,m,p,h]),ej=(0,i.useCallback)(()=>{ey(!1)},[]),ez=(0,i.useCallback)(()=>{ew.current||(ew.current=!0),ey(!1),eC(eF(u))},[u,eF]),eK=(0,i.useCallback)(e=>{m(e||"")},[m]),e$=(0,i.useCallback)((e,t)=>{eK(`:${t}:`)},[eK]),eY=(0,i.useCallback)(e=>{ei(e.target.value)},[ei]),eQ=(0,i.useCallback)(async()=>{try{let e;eI(!0);let t=n?.length&&n.length>0;(e=t?await eh((0,z.$)({entities:n,emoji:d,name:u,skipNavigationToEntity:r,reason:"channel-section-create-multi-step-modal"})):await eh((0,j.A)({name:u,emoji:d,nextChannelSectionId:eV,reason:"channel-section-modal-submit"}))).id&&(await el(e.id),t?l():a({sectionEmoji:d,sectionName:u,sectionSort:Z,sectionId:e.id}))}catch(e){ev(ed(e)),e_.error(e,void 0,{subtype:"sidebar-systems-create-new-section-and-set-prefs"})}finally{eI(!1)}},[n,eh,d,u,r,eV,el,l,a,Z,ed,e_]),eZ=(0,i.useCallback)(async()=>{try{eI(!0),await eo()}catch(e){e_.error(e,void 0,{subtype:"sidebar-systems-create-accept-shared-section"}),eT.isVisible&&eN(),ev(ed(e))}finally{eI(!1)}},[eN,eo,ed,e_,eT.isVisible]),eJ=(0,i.useMemo)(()=>!!es&&ec.filter(e=>es.includes(e.value)).some(e=>e.section?.type===$.VZ.Stars||e.section?.type===$.VZ.Standard),[es,ec]),eX=(0,i.useCallback)(()=>{eU().isValid&&u&&(c?eJ?eM():eZ():eQ())},[eU,u,c,eJ,eM,eZ,eQ]),e0=(0,i.useCallback)(()=>{eU().isValid&&u&&a({sectionEmoji:d,sectionName:u,sectionSort:Z})},[d,u,a,Z,eU]),e1=(0,i.useCallback)(e=>{let t,a=null;switch(e){case Q.PY:t=X.t("A-Z"),e===em&&(a=i.createElement("span",{className:"margin_left_50"},i.createElement(N.v,{style:N.u.Gray},eb?X.t("Your default"):"")));break;case Q.n5:t=X.t("Recency"),a=i.createElement("span",{className:"margin_left_50"},i.createElement(N.v,{style:N.u.Informative},eb?X.t("Recommended"):""));break;default:t=X.t("Priority"),e===em&&(a=i.createElement("span",{className:"margin_left_50"},i.createElement(N.v,{style:N.u.Gray},eb?X.t("Your default"):"")))}return i.createElement(i.Fragment,null,t,a)},[eb,em]),e2=(0,i.useMemo)(()=>n?.length,[n]),e4=(0,i.useMemo)(()=>c?eb?X.t("Add to Home"):"":e2?eb?X.t("Create and Add Record"):"Create and Add Record":eb?X.t("Create and Add Channels"):"Create and Add Channels",[eb,c,e2]);eu=d?(0,V.A)(d)||"":eb?X.t("Emoji menu"):"Emoji menu",ep=c?eb?X.t("Accept {channelSectionName}",{channelSectionName:e}):"":eb?X.t("Create a section"):"";let e5=!eE.isValid;return eb?i.createElement(g.A,{clogImpression:!0,uiComponentName:W.UiComponentName.CHANNEL_SECTION_CREATE_MULTI_STEP_MODAL,eventId:W.EventId.CREATE_SECTION_MODAL_STEP_ONE,enableClogImpressionOffScreen:!0},i.createElement(B.rQ,null,i.createElement(B.Rc,{title:ep})),i.createElement(B.$m,null,i.createElement(B.qf,null,ek&&i.createElement("div",{className:"margin_bottom_50"},i.createElement(y.Ay,{type:y.QE.boxed,level:y.A_.error},ek)),i.createElement("div",{className:J().channelSectionCreateMultiStepModalStack},i.createElement("div",{className:J().channelSectionInputWrapper},i.createElement(S.A,{htmlFor:"channel-section-name-input",text:eb?X.t("Section name"):"Section name",cursor:null}),i.createElement("div",{className:"p-channel_section_modal_input__input_wrap p-channel_section_modal__input_wrap"},i.createElement(O.A,{onEmojiSelected:e$,position:"bottom-left"},i.createElement(C.A,{className:"p-channel_section_modal_input__emoji_picker p-channel_section_modal__emoji_picker","aria-label":eu},d?i.createElement("div",{className:"p-channel_section_modal_input__emoji"},i.createElement(L.Ay,{text:d,stopAnimations:!0,emojiSize:L.lw.MEDIUM,forceDisplay:!0})):i.createElement("div",{className:"p-channel_section_modal_input__empty_emoji"},i.createElement("span",{className:"p-channel_section_modal_input__emoji_circle_icon"},i.createElement(T.Ah,{name:"icon-placeholder-filled",size:"20"})),i.createElement("span",{className:"p-channel_section_modal_input__emoji_smile_icon"},i.createElement(T.Ah,{name:"emoji",size:"20"})),i.createElement("span",{className:"p-channel_section_modal_input__emoji_happy_icon"},i.createElement(T.Ah,{name:"emoji-filled",size:"20"}))))),i.createElement(R.A,{selectId:"channel-section-name-input",filterQuery:u,isExpanded:eg,emoji:d,activeRowIndex:eA,validationState:eE,textComponent:eR,onSetSelectState:eq,onOptionsListClose:ej,onBlur:ez,optionsGroupGetter:eG})),eE.reason&&i.createElement("span",{id:"channel_section_validation_alert",className:J().channelSectionCreateStepOneError},eE.reason)),i.createElement(k.A,{id:"sidebar_show_pref"},i.createElement(v.A,null,eb?X.t("Sort conversations by"):"Sort conversations by"),i.createElement(w.A,{className:J().radioGroup},i.createElement(S.A,{type:"inline",cursor:"pointer",text:e1(Q.PY)},i.createElement(I.A,{autoClogProps:createSortAutoClogProps(Q.PY),checked:Z===Q.PY,name:"section_sort_prefs",onChange:eY,value:Q.PY})),i.createElement(S.A,{type:"inline",cursor:"pointer",text:e1(Q.n5)},i.createElement(I.A,{autoClogProps:createSortAutoClogProps(Q.n5),checked:Z===Q.n5,name:"section_sort_prefs",onChange:eY,value:Q.n5})),i.createElement(S.A,{type:"inline",cursor:"pointer",text:e1(Q.u5)},i.createElement(I.A,{autoClogProps:createSortAutoClogProps(Q.u5),checked:Z===Q.u5,name:"section_sort_prefs",onChange:eY,value:Q.u5}))))))),i.createElement(B.jl,{className:J().channelSectionCreateStepOneFooter},eT.isVisible&&i.createElement(M.A,{onCancelSpeedbump:l,onSubmit:eZ,continueButtonIsLoading:eS,isAcceptingSharedChannelSection:!0}),e2?null:i.createElement("span",{className:J().channelSectionCreateStepOneFooterStep},eb?X.t("Step 1 of 2"):"Step 1 of 2"),i.createElement(B.ox,null,c?i.createElement(i.Fragment,null,i.createElement(x.A,{autoClogProps:er,onClick:eX,loading:eS,type:E.Q.outline,disabled:e5},e4),i.createElement(A.Ay,{onClick:e0,disabled:e5},X.t("Review Conversations"))):i.createElement(x.A,{autoClogProps:er,onClick:eX,loading:eS,disabled:e5},e4)))):null});var el=a(0x1651509ed),eo=a(0x1fda13b24),es=a(0x99233ecb),ec=a(0x1d5dc623c),ed=a(0x19ab18890),em=a(0x1a7d2b93d),eu=a(0x1c4922580),ep=a(0xc650d0b1),eh=a(0x171a902a),e_=a(0x23409b80b),ef=a(0x24be3ff73),eb=a.n(ef);let eg=new m.Ay("plug_and_play_sections"),ey={eventId:W.EventId.CREATE_SECTION_MODAL_STEP_TWO_ADD_CONVERSATIONS,onClick:{enableClogAction:!0}},eA={eventId:W.EventId.CREATE_SECTION_MODAL_STEP_TWO_SKIP_ADD_CONVERSATIONS,onClick:{enableClogAction:!0}},ex={eventId:W.EventId.CREATE_SECTION_MODAL_STEP_TWO_SKIP_BACK,onClick:{enableClogAction:!0}},clogEventId=e=>({eventId:e,onClick:{enableClogAction:!0}}),eE=(0,i.memo)(({sectionEmoji:e,sectionName:t,closeModal:a,newChannelSectionId:n,unknownChannelCount:r,isReviewingConversations:l,goBackToAccept:o,selectedChannelIds:c,setSelectedChannelIds:d,createNewSectionAndSetPrefsForSharedSection:m,isFromSuggestion:u,updateSuggestedSectionPrefIfNeeded:p,channelsWithSections:h,getErrorMessageFromFailedAPIRequest:_})=>{let f=(0,s.wA)(),b=(0,F.A)(),E=(0,D.A)(),[C,k]=(0,i.useState)(""),[v,S]=(0,i.useState)(!1),[I,w]=(0,i.useState)(l&&c.length>0),T=(0,K.d4)(P.JQ),N=(0,K.d4)(P.gC),[M,R]=(0,i.useState)("all"),[L,O]=(0,i.useState)(!1),[U,H]=(0,i.useState)(null),[V,G]=(0,i.useState)(""),[q,j]=(0,i.useState)(""),z=r>0,$=(0,i.useMemo)(()=>z?[{id:em.L,label:em.L,value:em.L,isDm:!1,isMpDm:!1},...h]:h,[h,z]),Y=(0,i.useMemo)(()=>{let e=new Map;return $.forEach(t=>{let a=`${t.label}`.toLowerCase();e.set(t.value,a)}),e},[$]),Q=(0,i.useMemo)(()=>{let e=$;if(I&&(e=e.filter(e=>c.includes(e.value)||e.id===em.L)),"dms"===M?e=e.filter(e=>e.isDm||e.isMpDm):"channels"===M?e=e.filter(e=>!e.isDm&&!e.isMpDm):"suggested"===M&&(e=e.filter(e=>U?.includes(e.value))),C.trim()){let t=C.toLowerCase();e=[...e=e.filter(e=>{let a=Y.get(e.value);return a?.includes(t)})].sort((e,t)=>e.isDm&&!t.isDm?-1:!e.isDm&&t.isDm?1:!e.isMpDm||t.isMpDm||t.isDm?e.isMpDm||!t.isMpDm||e.isDm?0:1:-1)}else e=[...e].sort((e,t)=>e.isDm&&!t.isDm?1:!e.isDm&&t.isDm?-1:!e.isMpDm||t.isMpDm||t.isDm?e.isMpDm||!t.isMpDm||e.isDm?0:-1:1);return e},[$,I,M,C,c,Y,U]),Z=(0,i.useCallback)(async()=>{O(!0);try{let e=await f((0,ep.l)({sectionName:t,limit:10,reason:"create-channel-section-modal"}));if(e.ok){H(e.recommended_channel_ids);let t="string"==typeof e?.debug?.request_id?e.debug.request_id:"";G(t)}}catch(e){b.error(e,void 0,{subtype:"sidebar-systems-create-channel-section-fetch-suggested-channels"})}finally{O(!1)}},[f,t,O,H,b]),J=(0,i.useMemo)(()=>{let e=[{autoClogProps:clogEventId(W.EventId.CREATE_SECTION_MODAL_FILTER_ALL),label:T?eg.t("All"):"All",checked:"all"===M,click(){R("all")},key:"all",type:"radio"},{autoClogProps:clogEventId(W.EventId.CREATE_SECTION_MODAL_FILTER_CHANNELS),label:T?eg.t("Channels"):"Channels",checked:"channels"===M,click(){R("channels")},key:"channels",type:"radio"},{autoClogProps:clogEventId(W.EventId.CREATE_SECTION_MODAL_FILTER_DMS),label:T?eg.t("Direct Messages"):"Direct Messages",checked:"dms"===M,click(){R("dms")},key:"dms",type:"radio"}];return N&&e.push({autoClogProps:clogEventId(W.EventId.CREATE_SECTION_MODAL_FILTER_AI_SUGGESTIONS),label:N?eg.t("Suggested"):"Suggested",checked:"suggested"===M,click(){R("suggested"),null===U&&Z()},key:"suggested",type:"radio"}),e},[T,N,M,Z,U]),X=(0,i.useCallback)(e=>i.createElement(ec.A,{template:J,...e}),[J]),ee=(0,i.useMemo)(()=>J.find(e=>e?.key===M)?.label,[M,J]),et=(0,i.useMemo)(()=>Q.map(e=>e.value),[Q]),ea=(0,i.useCallback)(e=>{d(t=>{let a=t.includes(e),n=a?t.filter(t=>t!==e):[...t,e];return I&&0===n.length&&w(!1),a||"suggested"!==M||E.track(W.EventId.RECOMMEND_ACCEPT,{request_id:V,selected_id_v2:e,selected_type:"channel"}),n})},[d,I,M,E,V]),en=(0,i.useCallback)(()=>{d(e=>{let t=[],a=e.length===et.length;return a&&z?t=[em.L]:a||(t=[...et],"suggested"===M&&et.forEach(e=>{E.track(W.EventId.RECOMMEND_ACCEPT,{request_id:V,selected_id_v2:e,selected_type:"channel"})})),"selected"===M&&0===t.length&&R("all"),t})},[et,M,d,z,V,E]),er=(0,i.useCallback)(()=>{w(!I)},[I]),ei=(0,i.useCallback)(e=>{j(_(e))},[_]),ef=(0,i.useCallback)(async()=>{try{S(!0),await f((0,eh.A)({insert:[{channelSectionId:n,channelIds:c}],reason:"add-conversations-to-newly-created-channel-section"})),a()}catch(e){b.error(e,void 0,{subtype:"sidebar-systems-add-conversations-click"}),ei(e)}finally{S(!1)}},[f,n,c,a,b,ei]),eE=(0,i.useCallback)(async()=>{try{S(!0),await m()}catch(e){b.error(e,void 0,{subtype:"sidebar-systems-accept-shared-section"}),ei(e)}finally{S(!1)}},[m,b,ei]),eC=(0,i.useCallback)(async()=>{try{S(!0),(await f((0,e_.A)({name:t,emoji:e,reason:"channel-section-modal-submit",channelIds:c}))).id&&(await p(),a())}catch(e){b.error(e,void 0,{subtype:"sidebar-systems-create-channel-section-from-cog-menu-suggestion"}),ei(e)}finally{S(!1)}},[f,t,e,c,p,a,b,ei]),ek=(0,i.useCallback)(()=>{u?eC():l?eE():ef()},[eC,ef,eE,u,l]),ev=(0,i.useCallback)(()=>{a()},[a]),eS=(0,i.useCallback)(e=>{k(e.target.value)},[]),eI=(0,i.useCallback)(()=>{k(""),R("all")},[]),ew=(0,i.useCallback)(e=>{"Escape"===e.key&&(k(""),R("all"))},[]),eT=(0,i.useCallback)(()=>{eI(),I&&er()},[eI,er,I]),eN=(0,i.useMemo)(()=>{let a=T?eg.t("Review Conversations"):"Review Conversations",n=T?eg.t("Add conversations"):"Add conversations";return i.createElement(i.Fragment,null,l?a:n,i.createElement("div",{className:eb().channelSectionCreateStepTwoSubhead},i.createElement(ed.Ay,{text:e,emojiSize:ed.lw.SMALL}),i.createElement("span",null,t)))},[T,l,e,t]),eM=eg.t("Skip");if(l&&(eM=T?eg.t("Back"):"Back"),T)return i.createElement(g.A,{clogImpression:!0,uiComponentName:W.UiComponentName.CHANNEL_SECTION_CREATE_STEP_TWO,eventId:W.EventId.CREATE_SECTION_MODAL_STEP_TWO,enableClogImpressionOffScreen:!0},i.createElement(B.rQ,null,i.createElement(B.Rc,{title:eN})),i.createElement(B.$m,{className:eb().channelSectionCreateStepTwoModalContent},i.createElement(B.qf,null,q&&i.createElement("div",{className:"margin_bottom_50"},i.createElement(y.Ay,{type:y.QE.boxed,level:y.A_.error},q)),i.createElement("div",{className:eb().channelSectionCreateStepTwoContentStack},i.createElement("div",null,i.createElement(eo.A,{"aria-label":T?eg.t("Filter by name\u2026"):"Filter by name\u2026",onChange:eS,onKeyDown:ew,onReset:eI,placeholder:T?eg.t("Filter by name\u2026"):"Filter by name\u2026",value:C})),i.createElement("div",{className:eb().channelSectionCreateStepTwoToolbar},i.createElement(es.cQ,{position:"bottom-left",renderMenu:X},i.createElement(el.Fr,{autoClogProps:clogEventId(W.EventId.CREATE_SECTION_MODAL_ADJUST_CONVERSATION_FILTER),text:ee,isSelected:!0,variant:el.Kw.menu})),i.createElement(el.Fr,{autoClogProps:clogEventId(W.EventId.CREATE_SECTION_MODAL_SHOW_SELECTED),onClick:er,text:T?eg.t("Selected Only"):"Selected Only",isSelected:I})),i.createElement(eu.$,{channelErrors:void 0,channelSectionChannelIds:et,destinationChannelType:void 0,labelText:T?eg.t("Select all"):"Select all",onToggleChannel:ea,onToggleSelectAll:en,selectedChannelIds:c,showSelectedCount:!0,unknownChannelCount:r,isLoading:L&&"suggested"===M,showExistingChannelSectionInConversationEntity:!0,resetFilters:eT})))),i.createElement(B.jl,null,!u&&i.createElement("span",{className:eb().channelSectionCreateStepTwoFooterStep},T?eg.t("Step 2 of 2"):"Step 2 of 2"),i.createElement(B.ox,null,!u&&i.createElement(A.Ay,{autoClogProps:l?ex:eA,type:"outline",onClick:l?o:ev},eM),i.createElement(x.A,{autoClogProps:ey,type:"primary",onClick:ek,loading:v},l?eg.t("Add to Home"):eg.t("Add Conversations")))))});var eC=a(0xbc562055),ek=a(0x1254ae491),ev=a(0x28a6fb09),eS=a(0x1ccef1c6f),eI=a(0x217553e42),ew=a(0x1fcbb004d),eT=a(0x1f32b800d);let eN=new m.Ay("plug_and_play_sections");var eM=((r=eM||{}).TooManySections="too_many_sections",r.EmojiInvalid="emoji_invalid",r.NameNotAllowed="name_not_allowed",r.FailedToMoveConversations="failed_to_move_conversations",r.Unknown="unknown",r);let eR=[],eP=(0,i.memo)(({channelIds:e=eR,initialEmoji:t,initialText:a,nextChannelSectionId:n,entities:r,skipNavigationForEntities:l,sharedChannelSectionArgs:o,isNewSectionFromSharedChannelSectionAttachment:m,unknownChannelCount:_=0,knownPrivateChannelCount:f,isLinkUnfurl:b,suggestedSectionPrefKeyFromCogMenu:g})=>{let y=(0,s.wA)(),A=(0,D.A)(),x=(0,F.A)(),[E,C]=(0,i.useState)(),[k,v]=(0,i.useState)(t||""),[S,I]=(0,i.useState)(a||""),[w,T]=(0,i.useState)(void 0),N=_>0,[M,R]=(0,i.useState)(()=>N?[em.L,...e]:e),L=(0,i.useRef)(null),O=(0,K.d4)(P.JQ),U=(0,K.d4)(e=>(0,eS.ty)(e,"default_suggested_channel_sections")||"{}"),B=(0,K.d4)(ev.A),[H,V]=(0,i.useState)(B),G=(0,i.useCallback)(()=>{y((0,ew.O)()),A.track(W.EventId.CREATE_SECTION_MODAL_CLOSE,{})},[A,y]),q=(0,i.useCallback)(()=>{L.current&&L.current(h.CREATE_A_SECTION)},[]),j=(0,i.useCallback)(e=>{C(e),L.current&&L.current(h.ADD_CHANNELS)},[]),z=(0,i.useCallback)(()=>{g&&C({sectionName:a??"",sectionEmoji:t??"",sectionSort:B})},[B,t,a,g]),$=[...new Set([...(0,K.d4)(eI.h3).map(e=>e.id),...e])],Z=(0,K.wz)(e=>(0,Y.zG)(e,$)),J=(0,i.useCallback)(()=>Z.reduce((e,t)=>{let a=t.section?.type,n=e[a]?e[a]+1:1;return e[a]=n,e},{}),[Z]),X=(0,i.useCallback)(async()=>{try{let e=g||w;if(!e)return;let t={...JSON.parse(U),[e]:!1};await y((0,eC.CI)({pref:"default_suggested_channel_sections",value:JSON.stringify(t),reason:"channel-section-create-multi-step-modal/hide-used-suggestion"}))}catch(e){x.error(e,void 0,{subtype:"sidebar-systems-update-suggested-section-pref-if-needed"})}},[U,y,x,w,g]),ee=(0,i.useCallback)(async e=>{H!==B&&await y((0,eT.th)({channelSectionId:e,pref:Q.jx,value:H})),await X()},[y,B,H,X]),et=(0,i.useCallback)(async()=>{let e=N?M.filter(e=>e!==em.L):M;A?.track(W.EventId.ADD_CUSTOMIZED_SHARED_CHANNEL_SECTION_CLICK,{selectedChannelCount:{...J(),total:e?.length},unknownChannelCount:_,knownPrivateChannelCount:f,defaultAttachedChannelCount:{...J(),total:e?.length},isLinkUnfurl:!!b});let t=await y((0,e_.A)({channelIds:e,emoji:k,name:S,nextChannelSectionId:n,reason:"channel-section-modal-submit",isNewSectionFromSharedChannelSectionAttachment:m,addToChannels:!0,sharedChannelSectionArgs:o}));t.id&&(await ee(t.id),y((0,ew.O)()))},[A,J,_,f,b,N,M,y,k,S,n,m,o,ee]),ea=(0,i.useCallback)(e=>("move"===e.failureContext?"failed_to_move_conversations":"create"===e.failureContext?e.wrapped?.data?.error:e.data?.error)??"unknown",[]),en=(0,i.useCallback)(e=>{let t;switch(e){case"too_many_sections":t=O?eN.rt("Unfortunately, you can\u2019t create any more sections \u2014 {numMaxChannelSections} is the max.",{numMaxChannelSections:ek.dl}):"";break;case"emoji_invalid":t=O?eN.rt("Unfortunately, that emoji\u2019s been removed from your workspace."):"";break;case"name_not_allowed":t=O?eN.rt("Unfortunately, that name isn\u2019t valid. Try another?"):"";break;case"failed_to_move_conversations":t=O?eN.rt("{sectionName} was created, but the conversation couldn\u2019t be moved to it. If this keeps happening, try reloading.",{sectionName:E?.sectionName}):"";break;default:t=O?eN.rt("<strong>Something went wrong.</strong> Reloading Slack might clear things up. If it doesn\u2019t, <a>drop us a line</a>.",null,({tag:e,text:t})=>"strong"===e?i.createElement("strong",null,t):i.createElement(u.A,{href:`https://${(0,d.qF)()}/help/contact`,rel:"noopener noreferrer"},t)):""}return t},[O,E?.sectionName]),er=(0,i.useCallback)(e=>en(ea(e)),[ea,en]),el=(0,i.useMemo)(()=>!!a&&e.length>0,[e?.length,a]),eo=(0,i.useCallback)(({switchPane:t})=>(L.current=t,i.createElement(ei,{initialText:a,nextChannelSectionId:n,goToAddConversationsPane:j,entities:r,skipNavigationToEntity:l,closeModal:G,isSharedChannelSection:el,createNewSectionAndSetPrefsForSharedSection:et,maybeUpdateUserPrefs:ee,emoji:k,setEmoji:v,filterQuery:S,setFilterQuery:I,setSuggestedSectionPrefKey:T,sectionSort:H,setSectionSort:V,channelIds:e,channelsWithSections:Z,getErrorMessageFromFailedAPIRequest:er,globalChannelSortPref:B})),[a,n,j,r,l,G,el,et,ee,k,S,H,e,Z,er,B]),es=(0,i.useCallback)(()=>i.createElement(eE,{sectionEmoji:E?.sectionEmoji,sectionName:E?.sectionName||"",newChannelSectionId:E?.sectionId||"",closeModal:G,unknownChannelCount:_,isReviewingConversations:!E?.sectionId&&el,goBackToAccept:q,selectedChannelIds:M,setSelectedChannelIds:R,createNewSectionAndSetPrefsForSharedSection:et,isFromSuggestion:!!g,updateSuggestedSectionPrefIfNeeded:X,channelsWithSections:Z,getErrorMessageFromFailedAPIRequest:er}),[E?.sectionEmoji,E?.sectionName,E?.sectionId,G,_,el,q,M,et,g,X,Z,er]),ec=(0,c.A)(()=>({[h.CREATE_A_SECTION]:{render:eo,modalProps:{contentLabel:O?eN.t("Create a section"):"Create a section"}},[h.ADD_CHANNELS]:{render:es,modalProps:{contentLabel:O?eN.t("Add channels"):"Add channels"}}}),[es,eo,O]);if(O)return i.createElement(p.A,{closeModal:G,defaultPane:g?h.ADD_CHANNELS:h.CREATE_A_SECTION,panes:ec,onAfterOpen:z})});var eL=a(0x11c82607b),eO=a(0x46dbff89);let eD=(0,eL.Ay)("Open create channel section modal",(e,t,a)=>{let n=t();e((0,P.JQ)(n)&&a?.action!==o.TH.RENAME?(0,eO.q)({element:i.createElement(eP,a)}):(0,eO.q)({element:i.createElement(l.A,a)}))});eD.meta={name:"openCreateChannelSectionModal",key:"createThunkOpenCreateChannelSectionModal",description:"Open create channel section modal"}},0x2430d55d5:(e,t,a)=>{"use strict";a.d(t,{v:()=>InlineChannelSectionFallbackIcon});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x15f8e452a),o=a(0x2501a2cee),s=a(0xef6c3caa),c=a(0x8f36a342);let InlineChannelSectionFallbackIcon=({type:e,spacing:t="medium",checked:a=!1,className:r})=>{let d=i()(r,{margin_right_0:"none"===t,margin_right_25:"small"===t,margin_right_50:"medium"===t});return e===c.VZ.Channels||e===c.VZ.OrgChannels?n.createElement(l.A,{type:"channel",size:"inherit",className:d}):(0,s.m)(e)?n.createElement(l.A,{type:"dm",size:"inherit",className:d}):e===c.VZ.RecentApps?n.createElement(l.A,{type:"gn-menu",size:"inherit",className:d}):e===c.VZ.SlackConnect||e===c.VZ.SharedChannels?n.createElement(l.A,{type:"shared-channels-outline",size:"inherit",className:d}):e===c.VZ.Stars?n.createElement("div",{className:i()("c-icon","c-icon--inherit",d)},n.createElement(o.Ah,{name:a?"star-filled":"star"})):e===c.VZ.UserGroup?n.createElement("div",{className:i()("c-icon","c-icon--inherit",d)},n.createElement(o.Ah,{name:"user-groups-filled"})):n.createElement("div",{className:i()("c-icon","c-icon--inherit",d),"data-qa":"inline-channel-section-fallback-icon"},n.createElement(o.Ah,{name:"section"}))};InlineChannelSectionFallbackIcon.displayName="InlineChannelSectionFallbackIcon"},0x5f90c96a:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x2430d55d5),s=a(0x1b3ecb90f),c=a(0x1632f6a87);function InlineChannelSection({channelSection:e,className:t,spacing:a="medium",showIcon:i=!0,checked:d=!1}){let m=(0,r.wA)()((0,c.i1)({channelSection:e})),u=m&&m.split(" "),p=u&&u[0],h=u&&(u.length>1?` ${u.slice(1).join(" ")}`:null),getIcon=()=>{if(!i)return null;let t=l()({margin_right_0:"none"===a,margin_right_25:"small"===a,margin_right_50:"medium"===a});return e.emoji?n.createElement(s.Ay,{className:t,shouldFallbackOnLoadError:!0,text:e.emoji,stopAnimations:!0,emojiSize:s.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,renderEmojiFallback:!0}):n.createElement(o.v,{type:e.type,spacing:a,checked:d})};return getIcon.displayName="getIcon",n.createElement("span",{className:l()("p-inline_channel_section",t)},n.createElement("span",{className:"p-inline_channel_section__lockup"},getIcon(),p),h)}InlineChannelSection.displayName="InlineChannelSection";let d=InlineChannelSection},0x1966324d3:(e,t,a)=>{"use strict";a.d(t,{A:()=>O,O:()=>P});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x16ac9b089),o=a(0x99233ecb),s=a(0x133aaa7da),c=a(0x1a3c2e1af),d=a(0x2501a2cee),m=a(0x130c2e810),u=a(0x1fda0b46e),p=a(0x22c5d61d5),h=a(0xfadc3278),_=a(0x5f90c96a),f=a(0x2430d55d5),b=a(0x18def662b),g=a(0x1b3ecb90f),y=a(0x1e4080330),A=a(0x242503693),x=a(0x6b345e37),E=a(0x7441941c),C=a(0x1632f6a87),k=a(0x3711e82d),v=a(0x1c91944c9),S=a(0x4790a9e9),I=a(0x171a902a),w=a(0x771b9b36),T=a(0x8f36a342),N=a(0x1380694ee),M=a(0x134678d68);let R=new i.Ay("menu"),P={MOVE_TO_SECTION:"move_to_section",MOVE_TO_NEW_SECTION:"move_to_new_section",REMOVE_FROM_SECTION:"remove_from_section",CHANGE_NOTIFICATIONS:"change_notifications"},L=class extends n.Component{static defaultProps={clogTrack:r.A,channel:void 0,showRemoveFromSection:!0,ignoreEditMode:!1,shouldTransitionFocusOnClose:!0,showEditButton:!1};constructor(e){super(e),this.handleCreateAndMoveChannelSectionHandler=this.handleCreateAndMoveChannelSectionHandler.bind(this)}getAutoClogProps(e){let t;return"channel_join_banner"===this.props.source?t=k.EventId.CHANNEL_JOIN_BANNER_MOVE_TO_SECTION_CLICK:"channel_header"===this.props.source&&(t=k.EventId.CHANNEL_HEADER_MOVE_TO_SECTION_CLICK),{eventId:t,entrypoint:this.props.source||void 0,action:k.UiAction.CLICK,elementValue:e??"move_to_section_menu_item_button",onClick:{enableClogAction:!0}}}getChannels(){return this.props.ignoreEditMode||!this.props.isEditMode?this.props.channel?[this.props.channel]:[]:this.props.allEditModeSelectedChannels}renderSectionIcon(e,t){return e.emoji?n.createElement(g.Ay,{shouldFallbackOnLoadError:!0,text:e.emoji,stopAnimations:!0,emojiSize:g.lw.SMALL,forceDisplay:!0,isEmojiInlineWithText:!0,renderEmojiFallback:!0,className:"p-channel_sidebar__channel_section_menu_item_emoji "}):n.createElement(f.v,{type:e.type,spacing:"medium",checked:t,className:"p-channel_sidebar__channel_section_menu_item_icon"})}renderSectionMenuItem(e,t){let{clogTrack:a,starredChannels:r,allChannelSectionChannels:i,reason:l,shouldTransitionFocusOnClose:c,transitionFocusTo:d,performBulkChannelMove:m,performMoveManyChannelsToSection:u,experimentEmptyStarredSectionGroupOn:p}=this.props,h=this.getChannels(),f=new Set(i[e.id]||[]),b=!1,g=h.length>0;h.forEach(t=>{let a=e.type===T.VZ.Stars&&!!r[t.id]||f.has(t.id);b=b||a,g=g&&a});let y=(0,E.lJ)(e),x=p?y&&e.type!==T.VZ.Stars:y;return n.createElement(o.Dr,{autoClogProps:this.getAutoClogProps(`section-${e.id}`),key:e.id,type:s.A.radio,checked:b,indeterminate:b&&!g,disabled:x,"data-qa":`section-${e.id}`,icon:this.renderSectionIcon(e,b),label:n.createElement("div",{key:e.id,className:"p-channel_sidebar__channel_section_select_menu_item"},n.createElement(_.A,{channelSection:e,showIcon:!1,checked:b})),onSelected:()=>{c&&d({focusKey:A.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),a(P.MOVE_TO_SECTION,{channels:h,channelSection:e,menuHasSuggestedSections:t,recommendationMode:this.props.sectionRecommendationMode,promptABTestMode:this.props.promptABTestMode}),g?m({insert:[],remove:[{channelSectionId:e.id,channelIds:h.map(e=>e.id)}],reason:`${l}-deselect`}):u({channelIds:h.map(e=>e.id),channelSectionId:e.id,reason:`${l}-select`})}})}renderSuggestedSectionMenuItem(e,t){let{clogTrack:a,shouldTransitionFocusOnClose:r,transitionFocusTo:i,reason:l,performMoveManyChannelsToSection:c,allChannelSectionsById:d,starredChannels:m,allChannelSectionChannels:u}=this.props,p=this.getChannels(),h=d[e.sectionId];if(!h)return null;let f=new Set(u[h.id]||[]),b=!1,g=p.length>0;return p.forEach(e=>{let t=h.type===T.VZ.Stars&&!!m[e.id]||f.has(e.id);b=b||t,g=g&&t}),n.createElement(o.Dr,{autoClogProps:this.getAutoClogProps(`suggested-section-${t}`),key:`suggested-${h.id}-${t}`,type:s.A.radio,checked:b,indeterminate:b&&!g,"data-qa":`suggested-section-${t}`,icon:this.renderSectionIcon(h,b),label:n.createElement("div",{key:`suggested-${h.id}-${t}`,className:"p-channel_sidebar__channel_section_select_menu_item"},n.createElement(_.A,{channelSection:h,checked:b,showIcon:!1})),onSelected:()=>{r&&i({focusKey:A.Ay.SIDEBAR_PREVIOUSLY_FOCUSED_ITEM}),a(P.MOVE_TO_SECTION,{channels:p,channelSection:h,score:e.score,menuHasSuggestedSections:!0,requestId:e.requestId,recommendationMode:this.props.sectionRecommendationMode,promptABTestMode:this.props.promptABTestMode}),g?this.props.performBulkChannelMove({insert:[],remove:[{channelSectionId:h.id,channelIds:p.map(e=>e.id)}],reason:`${l}-suggested-section-deselect`}):c({channelIds:p.map(e=>e.id),channelSectionId:h.id,reason:`${l}-suggested-section`})}})}renderRemoveFromSection(){let e,{starredChannels:t,clogTrack:a,reason:r,showRemoveFromSection:i,channelSectionIdsByChannelId:s}=this.props,c=this.getChannels(),d=new Set,m={},u=this.props.orderedChannelSections.find(e=>e.type===T.VZ.Stars);c.forEach(e=>{e&&t[e.id]&&u&&(d.add(u),m[u.id]||(m[u.id]=[]),m[u.id].push(e)),e&&!t[e.id]&&(s[e.id]||[]).forEach(t=>{d.add(this.props.allChannelSectionsById[t]),m[t]||(m[t]=[]),m[t].push(e)})});let p=[...d],h=p.some(e=>e.type===T.VZ.Standard||e.type===T.VZ.Stars);return i&&h&&0!==p.length?(e=1===p.length?R.t("Remove from {section}",{section:(0,l.Ay)(this.props.getChannelSectionName({channelSection:p[0]}))}):R.t("Remove from all sections"),n.createElement(o.Dr,{autoClogProps:this.getAutoClogProps(e),label:e,"data-qa":"channel_section_select_menu_remove_from_section",onSelected:()=>{let e=p.map(e=>({channelSectionId:e.id,channelIds:m[e.id].map(e=>e.id)}));a(P.REMOVE_FROM_SECTION,{remove:e}),this.props.performBulkChannelMove({insert:[],remove:e,reason:`${r}-remove`})}})):null}renderEditModeMenuItem(){return n.createElement(n.Fragment,null,n.createElement(o.bX,null),n.createElement(o.Dr,{autoClogProps:this.getAutoClogProps(),label:R.t("Edit all sections"),"data-qa":"edit_mode_enter",onSelected:this.props.onEnterEditModeClick}))}handleCreateAndMoveChannelSectionHandler(){let{clogTrack:e}=this.props,t=this.getChannels();e(P.MOVE_TO_NEW_SECTION,{channels:t}),this.props.openCreateChannelSectionModal({action:p.TH.CREATE_AND_MOVE,channelIds:t.map(e=>e.id)})}render(){let{clogTrack:e,reason:t,showRemoveFromSection:a,orderedChannelSections:r,allChannelSectionsById:i,showEditButton:l,isAgentDmChannel:s,experimentEmptyStarredSectionGroupOn:m,experimentChannelJoinAiSectionRecommendationGroupOn:u,suggestedSections:p,...h}=this.props,_=r.filter(e=>e.type===T.VZ.Standard||e.type===T.VZ.Agents&&s||e.type===T.VZ.Stars&&!(0,E.lJ)(e)),f=_.every(e=>e.type!==T.VZ.Standard),b=_.some(e=>e.type===T.VZ.Stars);b&&(_=[_.find(e=>e.type===T.VZ.Stars),..._.filter(e=>e.type!==T.VZ.Stars)]),!b&&m&&(_=[(0,y.f)({type:T.VZ.Stars,name:m?R.t("Starred"):"",emoji:""}),..._]);let g=u&&p.length>0;g&&(_=_.filter(e=>!p.some(t=>t.sectionId===e.id)));let A=n.createElement("div",{className:"p-channel_sidebar__channel_section_menu_item_icon"},n.createElement(d.Ah,{size:"16",name:"plus"})," "),x=g&&_.length>5,C=[],k=[];return x&&(C=_.slice(0,5),k=_.slice(5)),n.createElement(o.Ay,{...h,width:"280px"},_.length>0||g?n.createElement(n.Fragment,null,g&&n.createElement(n.Fragment,null,n.createElement(o.c$,{label:u?R.t("Suggested sections"):R.t("Move to\u2026")}),p.map((e,t)=>this.renderSuggestedSectionMenuItem(e,t)),_.length>0&&n.createElement(o.bX,null)),_.length>0&&n.createElement(n.Fragment,null,n.createElement(o.c$,{label:u&&g?R.t("Other options",{fallbackHash:"9f767a703faa53551d41b1c6148a0cedf8785d72"}):R.t("Move to\u2026")}),x?n.createElement(n.Fragment,null,C.map(e=>this.renderSectionMenuItem(e,g)),n.createElement(c.A,{label:R.t("See more",{fallbackHash:"c510d6c04c0951500c8e43f623e9f8886c378aec",fallbackHashNs:"attachments"}),icon:n.createElement(d.Ah,{name:"ellipsis-horizontal-filled"}),renderSubmenu:()=>n.createElement(o.Ay,null,k.map(e=>this.renderSectionMenuItem(e,g)))})):_.map(e=>this.renderSectionMenuItem(e,g)))):n.createElement(o.c$,{label:R.t("Use sections to keep your channel list neat and tidy.")}),n.createElement(o.bX,null),f?n.createElement(o.Dr,{onSelected:this.handleCreateAndMoveChannelSectionHandler,autoClogProps:this.getAutoClogProps("channel_section_select_menu_create_new_section"),icon:A,label:R.t("Create your first section")}):n.createElement(n.Fragment,null,n.createElement(o.Dr,{autoClogProps:this.getAutoClogProps("channel_section_select_menu_create_new_section"),"data-qa":"channel_section_select_menu_new_section",onSelected:this.handleCreateAndMoveChannelSectionHandler,icon:A,label:R.t("Create new section")}),this.renderRemoveFromSection(),l&&this.renderEditModeMenuItem()))}};L.displayName="ChannelSectionMoveToMenu";let O=(0,x.A)((0,v.N)((e,t)=>{let a=(0,N.VH)(e),n=!!(t.channel?.id&&(0,u.g)(e)&&(0,m.Hm)(e,t.channel?.id));return{starredChannels:(0,S.Sd)(e),isEditMode:(0,N.Ou)(e),allEditModeSelectedChannels:(0,N.a2)(e),orderedChannelSections:a,allChannelSectionChannels:(0,N.OE)(e),channelSectionIdsByChannelId:(0,N.SF)(e),allChannelSectionsById:(0,N.jV)(e),isAgentDmChannel:n,experimentEmptyStarredSectionGroupOn:(0,b.Zg)(e),experimentChannelJoinAiSectionRecommendationGroupOn:(0,b.z)(e),suggestedSections:t.channel?.id?(0,M.$)(e,t.channel.id)??[]:[],sectionRecommendationMode:(0,b.bN)(e),promptABTestMode:(0,b.k5)(e)}},e=>({performBulkChannelMove:(...t)=>e((0,I.A)(...t)),performMoveManyChannelsToSection:(...t)=>e((0,w.A)(...t)),openCreateChannelSectionModal:(...t)=>e((0,h.i)(...t)),getChannelSectionName:(...t)=>e((0,C.i1)(...t))}))(L))},0x1c5668bfd:(e,t,a)=>{"use strict";function reformatBulkMoveToClog(e){let t={};return e.forEach(e=>{t[e.channelSectionId]=e.channelIds}),t}a.d(t,{A:()=>reformatBulkMoveToClog})},0x11b9ca92b:(e,t,a)=>{"use strict";a.d(t,{A:()=>v});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x189615fa),s=a(0xf225ecf2),c=a(0x1c7997c1),d=a(0x96920791),m=a(0x16d221c7f),u=a(0x142775427),p=a(0x1f803375e),h=a(0x2501a2cee),_=a(0x58199183),f=a(0x20e77676b),b=a(0x226892387),g=a(0x14149c126),y=a(0x1f4ce396),A=a(0x1fcbb004d),x=a(0x1ee439e69);let E=new i.Ay("channel_invite"),C="channel_share_limited_invite_permission_modal",k={header:`${C}_header`,title:`${C}_title`,content:`${C}_content`,footer:`${C}_footer`,submitButton:`${C}_submit_button`},ChannelShareLimitedInvitePermissionsDialog=({channelId:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,A.O)())},[t]),i="on"===(0,b.d4)(e=>(0,g._Z)(e,"sc_cls_inviter_error")),v=(0,b.d4)(t=>(0,y.NQ)(t,e)),S=(0,b.d4)(e=>(0,x._J)(e,v));return i?n.createElement(o.A,{closeModal:a,role:"dialog",className:`p-${C}`,dataQa:C},n.createElement(u.A,{"data-qa":k.header},n.createElement(p.A,{title:E.t("Unable to invite people right now"),"data-qa":k.title})),n.createElement(s.A,{"data-qa":k.content},n.createElement(c.A,null,E.rt("{hostTeam} owns this channel and only specific people can invite others to it",{hostTeam:n.createElement(_.A,{id:S.id,team:S,bold:!0})}))),n.createElement(d.A,{"data-qa":k.footer},n.createElement(f.A,{articleId:0x15d3fb76fcd},n.createElement("span",{className:"display_flex align_items_center"},n.createElement(h.Ah,{name:"info",size:"20"}),n.createElement("span",{className:"margin_left_25"},E.t("Learn more")))),n.createElement(m.A,null,n.createElement(l.lV,{type:"primary",onClick:a,"data-qa":k.submitButton,"aria-label":E.t("OK")},E.t("OK"))))):null};ChannelShareLimitedInvitePermissionsDialog.displayName="ChannelShareLimitedInvitePermissionsDialog";let v=ChannelShareLimitedInvitePermissionsDialog},0x133fddbf7:(e,t,a)=>{"use strict";a.d(t,{A:()=>H});var n=a(0xbad225b5),r=a(0x40c0d834),i=a(0x8c8bafa3),l=a(0x20482ad21),o=a(0x1e864b930),s=a(0x2b7f0bcc),c=a(0xce378727),d=a(0x45bd075),m=a(0x15f8e452a),u=a(0x1faa3f1ac),p=a(0xbb0c5132),h=a(0x4c96e5d9),_=a(0x247cf31a2),f=a(0x58199183),b=a(0x11b9ca92b),g=a(0x7899e273),y=a(0x297514cb),A=a(0x6b35329),x=a(0x73d7ee71),E=a(0x1acf9a6a2),C=a(0xb0245531),k=a(0xa1832ae4),v=a(0xf038462c),S=a(0x20e80190e),I=a(0x3711e82d),w=a(0x1c91944c9),T=a(0x9b971e7e),N=a(0x217553e42),M=a(0x14149c126),R=a(0x1f4ce396),P=a(0x1fcbb004d),L=a(0x1ee439e69),O=a(0x16ffed5ab);let D=new l.Ay("channel_share"),F={elementName:"these_steps",onClick:{enableClogAction:!0}},U={elementName:"learn_more",onClick:{enableClogAction:!0}},B=class extends n.Component{removeSharedChannelPromise;constructor(e){super(e),this.state={apiCallOngoing:!1,disclaimerAcknowledged:!1}}componentWillUnmount(){this.removeSharedChannelPromise?.cancel?.()}toggleDisclaimerAcknowledged=()=>{let{disclaimerAcknowledged:e}=this.state;this.setState(()=>({disclaimerAcknowledged:!e}))};showErrorToast=()=>{let{enqueueToast:e}=this.props,t=n.createElement("div",null,n.createElement("span",{className:"bold"},D.t("Something went wrong.")),n.createElement("br",null),n.createElement("span",null,D.rt("If the problem persists, please <a>drop us a line</a>",null,({tag:e,text:t})=>n.createElement("a",{target:"_blank",rel:"noopener noreferrer",key:e,href:`https://${(0,i.qF)()}/help/requests/new`},t))));e({element:n.createElement(p.Ay,{svgIconProps:{name:"warning-filled"},svgIconClassName:"sk_raspberry_red",position:"bottom-right"},t)})};onButtonClick=()=>{let{isAwayWithPermissionsCase:e,channel:t,removeSharedChannelLegacyRestriction:a,closeModal:n}=this.props,{disclaimerAcknowledged:r}=this.state;return e?r?(this.setState(()=>({apiCallOngoing:!0})),this.removeSharedChannelPromise=a({channelId:t.id,reason:"channel-share-unhappy-path-modal/onDoneButtonClicked"}).then(n).catch(this.showErrorToast).finally(()=>{this.removeSharedChannelPromise?.isCancelled?.()||this.setState(()=>({apiCallOngoing:!1}))}),this.removeSharedChannelPromise):this.showErrorToast():n()};renderHostContent=()=>{let{otherTeam:e,channel:t}=this.props,a=(0,k.F1)(e),r=n.createElement(_.A,{channel:t,className:"p-channel_share_unhappy_path_modal__inline-flex"});return n.createElement(S.qf,null,n.createElement("p",null,D.rt("Channels can now be shared between more than two organizations at a time \u2014 but first, an admin at <strong>{externalOrgName}</strong> will need to allow it.",{externalOrgName:a})),n.createElement("p",null,D.rt("Just ask <strong>{externalOrgName}</strong> to follow <link>these steps</link>. You\u2019ll be notified in {channelName} once everything\u2019s ready.",{externalOrgName:a,channelName:r},({tag:e,text:t})=>"link"===e?n.createElement(u.A,{autoClogProps:F,href:this.props.learnMoreLink},t):null)))};renderAwayNoPermissionsContent=()=>{let{channel:e}=this.props,t=n.createElement(_.A,{channel:e,className:"p-channel_share_unhappy_path_modal__inline-flex"});return n.createElement(S.qf,null,n.createElement("p",null,D.t("Channels can now be shared between more than two organizations at a time \u2014 but first, one of your admins will need to allow it.")),n.createElement("p",null,D.rt("Just ask one of your admins to follow <link>these steps</link>. You\u2019ll be notified in <strong>{channelName}</strong> once everything\u2019s ready.",{channelName:t},({tag:e,text:t})=>"link"===e?n.createElement(u.A,{autoClogProps:F,href:this.props.learnMoreLink},t):null)))};renderAwayWithPermissionsContent=()=>{let{otherTeam:e}=this.props,{disclaimerAcknowledged:t}=this.state,a=(0,k.F1)(e);return n.createElement(S.qf,null,n.createElement("p",null,D.t("If you\u2019d like, you can give {externalOrgName} the ability to add additional organizations to this channel.",{externalOrgName:a})),n.createElement("div",{className:"p-channel_share_unhappy_path_modal__checkbox-section"},n.createElement("div",{className:"p-channel_share_unhappy_path_modal__checkbox-section__left"},n.createElement(d.A,{checked:t,"data-qa":"channel-share-legacy-conversion-modal-checkbox",id:"acknowledgement-checkbox",onChange:()=>this.toggleDisclaimerAcknowledged()})),n.createElement("div",{className:"p-channel_share_unhappy_path_modal__checkbox-section__right"},n.createElement("label",{htmlFor:"acknowledgement-checkbox"},n.createElement("strong",{className:"block"},D.t("Let additional organizations join this channel.")),D.rt("The channel\u2019s creator, <strong>{externalOrgName}</strong>, will be able to add and remove organizations at their discretion.",{externalOrgName:a})))),n.createElement("p",{className:"p-channel_share_unhappy_path_modal__color"},D.t("Note: This can\u2019t be undone, so make sure it\u2019s what you want to do.")))};renderLegacyContent=()=>{let{isAwayNoPermissionsCase:e,isAwayWithPermissionsCase:t}=this.props;return e?this.renderAwayNoPermissionsContent():t?this.renderAwayWithPermissionsContent():this.renderHostContent()};renderFooterActions=()=>{let{disclaimerAcknowledged:e,apiCallOngoing:t}=this.state,{isAwayWithPermissionsCase:a}=this.props,r=n.createElement(c.A,{type:"primary",disabled:a&&!e||t,onClick:this.onButtonClick,loading:t,autoClogProps:{elementName:a?"agree_to_upgrade":"done",onClick:{enableClogAction:!0}},"aria-label":"Done"},"Done");return n.createElement(n.Fragment,null,n.createElement("div",{className:"p-channel_share_unhappy_path_modal__learn position_absolute_left"},n.createElement(m.A,{className:"p-channel_share_unhappy_path_modal__color",type:"info-circle",size:"inherit"})," ",n.createElement(u.A,{className:"p-channel_share_unhappy_path_modal__color",href:this.props.learnMoreLink,autoClogProps:U},D.rt("Learn more"))),r)};renderTitle=()=>{let{channel:e,isFromShareLink:t}=this.props;return t?D.rt("Share link to {channelName}",{channelName:n.createElement(_.A,{channel:e})}):D.rt("Add people to {channelName}",{channelName:n.createElement(_.A,{channel:e})})};renderLegacySharedChannelBody=()=>{let e,{channel:t,closeModal:a,trackingId:i,isAwayNoPermissionsCase:l,isAwayWithPermissionsCase:o}=this.props;return e=l?I.UiStep.SHARED_CHANNEL_LEGACY_MODAL_AWAY_NO_PERMISSIONS:o?I.UiStep.SHARED_CHANNEL_LEGACY_MODAL_AWAY_WITH_PERMISSIONS:I.UiStep.SHARED_CHANNEL_LEGACY_MODAL_HOST,n.createElement(r.A,{eventId:I.EventId.CHANNEL_CREATE_FLOW,uiStep:e,trackingId:i,channelId:t.id,clogImpression:!0},n.createElement(S.dW,{closeModal:a},n.createElement(S.rQ,null,n.createElement(S.Rc,{title:this.renderTitle()})),n.createElement(S.$m,null,this.renderLegacyContent()),n.createElement(S.jl,null,n.createElement(S.ox,null,this.renderFooterActions()))))};getErrorCopy=()=>{let{channelConnectionLimit:e,reason:t,conversationHostTeam:a,currentTeam:r,experimentScClsInviterErrorGroupOn:l,internalTeamIds:s,currUserWorkspaceAdminInternalTeamIds:c}=this.props,d=s.filter(e=>!c.includes(e));switch(t){case g.Fz.ConnectionLimitExceeded:return D.t("Channels can\u2019t be shared with more than {limit} organizations at one time. To share this channel with another organization, you\u2019ll need to remove one first.",{limit:e});case g.Fz.NotOwner:return l?D.rt("{hostTeam} owns this channel and only specific people can invite others to it",{hostTeam:n.createElement(f.A,{id:a.id,team:a,bold:!0})}):D.rt("Only the channel owner, {hostTeam}, can invite additional organizations to join this channel.",{hostTeam:n.createElement(f.A,{id:a.id,team:a,bold:!0})});case g.Fz.NotWsOrOrgAdmin:return d&&(d.length<=3?D.rt("You can\u2019t send Slack Connect invitations in this channel because you\u2019re not an admin of {offendingInternalTeams}.",{offendingInternalTeams:(0,o.A)(d.map(e=>n.createElement(f.A,{key:e,id:e,bold:!0})),{conj:"or"})}):D.rt("You can\u2019t send Slack Connect invitations in this channel because you\u2019re not an admin of {firstInternalTeam}, {secondInternalTeam}, or <tooltip>{numRemaining} other workspaces</tooltip>.",{firstInternalTeam:n.createElement(f.A,{id:d[0],bold:!0}),secondInternalTeam:n.createElement(f.A,{id:d[1],bold:!0}),numRemaining:d.length-2},({tag:e,text:t})=>"tooltip"===e?n.createElement(h.Ay,{tip:(0,o.A)(d.slice(2).map(e=>n.createElement(f.A,{key:e,id:e,bold:!0})),{react:!0})},n.createElement(u.A,null,t)):null));case g.Fz.CannotShareCrossWorkspaceChannel:return D.rt("Multi-workspace channels can\u2019t currently be shared with other organizations.");case g.Fz.NotAllowedForGridWorkspace:return n.createElement("span",null,D.rt("Your admins have disallowed Slack Connect for this workspace, so only members and guests of {teamName} can be added to this channel.",{teamName:n.createElement(f.A,{id:r?.id})}));case g.Fz.NoExternalInvitePermission:return D.t("You can\u2019t invite external people to this channel.");case g.Fz.UserDoesNotHavePostingPermission:return D.t("You don\u2019t have permission to add external people to this channel.");default:return D.rt("<b>Something went wrong.</b> If the problem persists, please <a>drop us a line</a>",{},({tag:e,text:t})=>"a"===e?n.createElement("a",{target:"_blank",rel:"noopener noreferrer",key:e,href:`https://${(0,i.qF)()}/help/requests/new`},t):n.createElement("strong",null,t))}};renderOtherErrorsBody=()=>{let{closeModal:e}=this.props,t=`https://${(0,i.qF)()}/help/articles/360050528953`;return n.createElement(S.dW,{closeModal:e,dataQa:"channel-share-unhappy-path-modal"},n.createElement(S.rQ,{"data-qa":"channel-share-unhappy-path-modal-header"},n.createElement(S.Rc,{title:this.renderTitle()})),n.createElement(S.$m,null,n.createElement(S.qf,null,n.createElement(s.Ay,{icon:"info"},n.createElement("span",null,this.getErrorCopy())))),n.createElement(S.jl,{className:"sk_foreground_max_solid","data-qa":"channel-share-unhappy-path-modal-footer"},n.createElement(u.A,{href:t,className:"p-channel_share_unhappy_path_modal__learn--not_allowed align_items_center display_flex",invert:!0},n.createElement(m.A,{type:"question-circle",size:20}),n.createElement("span",{className:"margin_left_50 "},D.t("Learn more"))),n.createElement(S.ox,null,n.createElement(S.s_,{type:"primary","data-qa":"channel-share-unhappy-path-modal-done-button","aria-label":D.t("Done")},D.t("Done")))))};render(){let{reason:e,channel:t,experimentScClsInviterErrorGroupOn:a}=this.props;return e===g.Fz.LegacyConnectionLimitExceeded?this.renderLegacySharedChannelBody():a&&e===g.Fz.NotOwner?n.createElement(b.A,{channelId:t.id}):this.renderOtherErrorsBody()}};function mapStateToProps(e,t){let{channelId:a}=t,n=(0,N.OL)(e,a),r=(0,A.A)(e,n),l=(0,T.Kc)(e),o=r&&r.find(e=>e!==l),s=o?(0,L._J)(e,o):void 0,c=(0,E.r)(e),d=!(0,C.b)(e,n),m=`https://${(0,i.qF)()}/help/articles/360055052254?utm_medium=in-prod&utm_source=in-prod&utm_campaign=legacy-shared-channels-conversion-modal-learn-more`,u=(0,R.NQ)(e,a);return{isAwayNoPermissionsCase:!d&&!c,isAwayWithPermissionsCase:!d&&c,isHostCase:d,conversationHostTeam:(0,L._J)(e,u),otherTeam:s,channel:n,learnMoreLink:m,topLevelTeamId:l,currentTeam:(0,L.H7)(e),experimentScClsInviterErrorGroupOn:"on"===(0,M._Z)(e,"sc_cls_inviter_error"),currUserWorkspaceAdminInternalTeamIds:(0,v.Fm)(e),internalTeamIds:(0,x.R)(e,n)}}B.displayName="ChannelShareUnhappyPathModal";let H=(0,w.N)(mapStateToProps,e=>({closeModal:(...t)=>e((0,P.O)(...t)),removeSharedChannelLegacyRestriction:(...t)=>e((0,y.y)(...t)),enqueueToast:(...t)=>e((0,O.M)(...t))}))(B)},0x1d8931caf:(e,t,a)=>{"use strict";a.d(t,{A:()=>W});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xb97b797e),s=a(0x20482ad21),c=a(0x11a296110),d=a(0x344bb842),m=a(0x15f8e452a),u=a(0x4c96e5d9),p=a(0x44f8fc76),h=a(0x1b543542c),_=a(0x22e509260),f=a(0x5fc81c19),b=a(0x12185e091),g=a(0x280afe13),y=a(0x20e80190e),A=a(0x3711e82d),x=a(0x45012309),E=a(0x1c91944c9),C=a(0x19f65e865),k=a(0x11fcf00e),v=a(0x217553e42),S=a(0x1472af90a),I=a(0xf052d367),w=a(0x18632f75a),T=a(0x11c82607b),N=a(0x691ce3ab),M=a(0x20c7d2c5e);let R=(0,T.Ay)("Start huddle and maybe display discovery message for huddle",(e,t)=>{let a,n,r=t();e((0,w.z)({component:S.G7.HuddleCallMenu,type:S.X8.Click,reason:"start-huddle-from-calls-menu"})),a=S.G7.HuddleCallMenu,n=S.X8.Click,(0,I.kI)(r,a,n)||e((0,w.b)({interactions:[{component:a,type:n}],reason:"start-huddle-from-calls-menu"})),(0,I.rD)(r,a,S.X8.Click,1)||(0,N.dispatchForClientStore)((0,M.M)())});R.meta={name:"maybeUpdateHuddleFromCallsMenuNUX",key:"createThunkMaybeUpdateHuddleFromCallsMenuNUX",description:"Start huddle and maybe display discovery message for huddle"};var P=a(0x475fe7d6),L=a(0xe684f705),O=a(0xc1360909);let D=new s.Ay("channel_details"),F="phone",U={uiStep:A.UiStep.VIEW_HEADER_ACTION,elementValue:"call",onClick:{enableClogAction:!0}},B={uiStep:A.UiStep.CHANNEL_DETAILS_START_CALL,onClick:{enableClogAction:!0}},H=class extends n.Component{static defaultProps={tooltipText:void 0,tooltipContext:void 0,tooltipAriaLabel:void 0,isVisible:!0,isDisabled:!1,startHuddle:l.A,useInspectorStyle:!1,useIAP2InspectorStyle:!1,useIaDetailsStyle:!1,useBookmarksStyle:!1,useBookmarksOverflowStyle:!1,numCallApps:void 0,onStartHuddleCallback:l.A,maybeUpdateHuddleFromCallsMenuNUX:l.A,showHelpArticleFlexpane:l.A,huddleEntryPoint:void 0};constructor(e){super(e),(0,o.v)(this,["onClick","startCall","startCallFromCachedData","closeConfirmationModal","getCallButtonExperimentIADetailsPopoverGroupTreatmentName","getCallButtonUseInspectStyle","getCallButtonUseIAP2InspectorStyle","getCallButtonUseIaDetailsStyle","getCallButtonUseBookmarksStyle","startHuddle"]),this.state={showConfirmation:!1,callData:null}}onClick({appId:e,type:t,phoneNumber:a}={}){let{isDisabled:n,channel:r}=this.props;if(!n){if(e===f.Pg)return void this.startHuddle();if(this.props.memberCount>=100||!(0,b.LI)(r))return void this.setState(()=>({showConfirmation:!0,callData:{appId:e,type:t,phoneNumber:a}}));this.startCall({appId:e,type:t,phoneNumber:a}),this.props.clogger.track("CALLS_USER_JOIN_INTENT")}}getCallButton(){let{useInspectorStyle:e,useIAP2InspectorStyle:t,useIaDetailsStyle:a,useBookmarksStyle:n}=this.props,r=this.getCallButtonExperimentIADetailsPopoverGroupTreatmentName;return e?r=this.getCallButtonUseInspectStyle:t?r=this.getCallButtonUseIAP2InspectorStyle:a?r=this.getCallButtonUseIaDetailsStyle:n&&(r=this.getCallButtonUseBookmarksStyle),r}getCallButtonExperimentIADetailsPopoverGroupTreatmentName(e){let{tooltipAriaLabel:t,isDisabled:a}=this.props,r=i()({"p-classic_nav__model__button--disabled":a});return n.createElement(u.Ay,{tip:this.renderTooltipElement(),position:"bottom"},n.createElement(d.A,{"aria-disabled":a,"aria-label":t,className:r,"data-qa":"channel_header_calls_button",svgIconProps:{name:"call"},onClick:e,size:"small",autoClogProps:U}))}getCallButtonUseInspectStyle(e){let{tooltipAriaLabel:t}=this.props,a=D.t("Call");return n.createElement(u.Ay,{position:"bottom",tip:this.renderTooltipElement(),delay:u.PK,hideFromScreenReader:!0},n.createElement(c.Nm,{onClick:e,className:"p-ia__channel_details__action","aria-label":t,"data-qa":"call"},n.createElement(m.A,{type:F,size:20,className:"p-ia__channel_details__action_icon"}),n.createElement("div",{className:"p-ia__channel_details__action_label"},a)))}getCallButtonUseIAP2InspectorStyle(e){let{tooltipAriaLabel:t}=this.props,a=D.t("Call");return n.createElement(u.Ay,{tip:this.renderTooltipElement(),position:"bottom",delay:u.PK},n.createElement(c.Ay,{onClick:e,size:"small",type:"outline",className:"margin_right_75","aria-label":t,"data-qa":"call"},n.createElement(m.A,{className:"margin_right_25 margin_left_0",type:F}),n.createElement("div",{className:"margin_right_50"},a)))}getCallButtonUseIaDetailsStyle(e){let{isDisabled:t,tooltipAriaLabel:a,numCallApps:r}=this.props,i=0===r;return n.createElement(u.Ay,{tip:this.renderTooltipElement(),position:"top",delay:u.PK},n.createElement(c.Ay,{"aria-disabled":t,"aria-label":a,className:"p-about_modal__action_button--disabled","data-qa":"call",onClick:e,size:"small",type:"outline",autoClogProps:B},n.createElement(m.A,{className:"p-about_modal__action_icon_prefix",inline:!0,size:"inherit",type:i?"headphones":F}),i?D.t("Huddle"):D.t("Start a Call"),r>1&&n.createElement(m.A,{"aria-hidden":!0,className:"p-about_modal__action_icon_suffix",inline:!0,size:"inherit",type:"chevron-medium-down"})))}getCallButtonUseBookmarksStyle(e){let{tooltipAriaLabel:t,isDisabled:a,useBookmarksOverflowStyle:r,numCallApps:l}=this.props,o=i()({"p-classic_nav__model__button--disabled":a});return n.createElement(u.Ay,{tip:this.renderTooltipElement(),position:"bottom"},n.createElement(c.Nm,{onClick:e,className:o,"aria-label":t,"aria-disabled":a,"data-qa":"channel_header_calls_button"},n.createElement("div",{className:"display_flex"},n.createElement("div",{className:"p-classic_nav__model__button__icon__icon_container"},n.createElement(m.A,{type:F,inline:!0,size:"inherit",className:"p-bookmarks_bar__calls_button__icon"})),r?null:n.createElement("div",{className:"p-classic_nav__model__button__icon__no_wrap_label"},D.t("Start a Call")),l>1&&!r&&n.createElement(m.A,{type:"chevron-down",className:"p-classic_nav__model__button__icon"}))))}startHuddle(){let{channel:e,startHuddle:t,onStartHuddleCallback:a=l.A,huddleEntryPoint:n}=this.props;t({channelId:e?.id,entryPoint:n}),a(),this.props.maybeUpdateHuddleFromCallsMenuNUX()}closeConfirmationModal(){this.setState(()=>({showConfirmation:!1,callData:null}))}maybeRenderConfirmationModal(){let e=(0,p.uI)(this.props.memberCount),{showConfirmation:t}=this.state;return t?n.createElement(y.dW,{closeModal:this.closeConfirmationModal,isOpen:this.state.showConfirmation,centered:!0},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:e.title})),n.createElement(y.$m,null,n.createElement(y.qf,null,n.createElement("p",null,e.description))),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{type:"outline",onClick:this.closeConfirmationModal,"aria-label":e.cancel},e.cancel),n.createElement(c.Ay,{type:"primary",onClick:this.startCallFromCachedData,"aria-label":e.confirm},e.confirm)))):null}startCallFromCachedData(){let{callData:e}=this.state;e&&this.startCall(e)}startCall({appId:e,type:t,phoneNumber:a}){this.props.startCall({channelId:this.props.channelId,appId:e,type:t,phoneNumber:a}),this.closeConfirmationModal(),this.props.clogger.track("CLASSIC_NAV",{contexts:{ui_context:{action:"CLICK",ui_component:"CHANNEL_HEADER",ui_element:"NAV_CHANNEL_CALL"}}})}renderTooltipElement(){let{tooltipText:e,isDisabled:t,tooltipContext:a}=this.props;return n.createElement("div",null,e,!t&&n.createElement("div",{className:"p-classic_nav__model__button--tooltip"},a))}render(){let{isVisible:e,isDisabled:t,channelId:a,member:r,useIaDetailsStyle:i,useBookmarksStyle:l}=this.props;if(!e)return null;let o=this.getCallButton(),s=t?o(this.onClick):n.createElement(_.U,{channelId:a,member:r,useBookmarksStyle:l,onMenuItemSelected:this.onClick,childFunctionComponent:o,useIAP2InspectorStyle:!i,useIaDetailsStyle:i,includeHuddleDiscoveryLink:!0,includeHuddle:!0});return n.createElement(n.Fragment,null,s,this.maybeRenderConfirmationModal())}};H.displayName="CallButton";let W=(0,E.N)((e,{channelId:t})=>{let a=(0,v.OL)(e,t),n=(0,O.q8)(e,a.id),r=n?.counts.member_count||0,i=(0,g.e)(a),l=(0,L.nv)(e,i),o=(0,p.j7)(e,a);return{channel:a,memberCount:r,tooltipText:o,tooltipAriaLabel:o,tooltipContext:(0,p.tw)(e,a,i),isVisible:(0,p.Xk)(e,a),isDisabled:(0,p.Rv)(e,a),clogger:(0,x.eo)({state:e}),member:l,numCallApps:((0,h.wZ)(e)||[]).length}},e=>({startCall:(...t)=>e((0,C.t3)(...t)),startHuddle:(...t)=>e((0,P.A)(...t)),maybeUpdateHuddleFromCallsMenuNUX:(...t)=>e(R(...t)),showHelpArticleFlexpane:(...t)=>e((0,k.a)(...t))}))(H)},0x1b543542c:(e,t,a)=>{"use strict";a.d(t,{Hu:()=>_,OJ:()=>getCallAppList,q8:()=>getCallsAppsFromTeamPref,vU:()=>y,wZ:()=>getFlattenTeamPrefCallsApps});var n=a(0x17478cdb7),r=a(0x19b3ba9fd),i=a(0x20482ad21),l=a(0xb62e6bf4),o=a(0x132aff908),s=a(0x189393d41),c=a(0xebdd009e),d=a(0xc67f3d80),m=a(0x1d600678),u=a(0xdf55e8f3),p=a(0x1bc4b3ad8),h=a(0x1ee439e69);let _={video:"video",audio:"audio",profileFieldOptions:"profile_field_options"},f=new i.Ay("huddles"),getInnerCallsAppsFromTeamPref=(e,t)=>({video:[...e&&e.video?e.video:[]],audio:[...!t&&e&&e.audio?e.audio:[]],profile_field_options:[]}),filterCallsAppsFromTeamPref=(e,t)=>{let a=(e=>{if((0,l.ss)(e)){let t,a;return t=(0,h.FR)(e).map(t=>(0,m.x)(e,"calls_apps",t.id)).filter(r.b).reduce((e,t)=>(Object.entries(t).forEach(([t,a])=>{("video"===t||"audio"===t)&&(e[t]=e[t]?[...e[t],...a]:[...a])}),e),{}),a={video:[],audio:[]},Object.entries(t).forEach(([e,t])=>{("video"===e||"audio"===e)&&(a[e]=t.filter((e,t,a)=>t===a.findIndex(t=>t.id===e.id&&void 0!==t.id)))}),a}return(0,m.x)(e,"calls_apps")})(e);if(t){let e=a?.video?.findIndex(e=>e.id===d.rq);e>=0&&a.video.splice(e,1)}return a},b=(0,u.ik)((e,t)=>filterCallsAppsFromTeamPref(e,t),e=>getInnerCallsAppsFromTeamPref(e,!1)),g=(0,u.ik)((e,t)=>filterCallsAppsFromTeamPref(e,t),e=>getInnerCallsAppsFromTeamPref(e,!0)),getCallsAppsFromTeamPref=(e,t=!1)=>t?g(e,!0):b(e,!0),y=(0,p.F)(getCallsAppsFromTeamPref,c.pt,(e,t)=>{let a={},n=e&&e.video?e.video:[],r=e&&e.audio?e.audio:[],i=f.t("Start a huddle");return[...n,...r,...t?[{id:"A01",name:i,image:"/marketing/img/homepage/icons/huddle-icon.png"}]:[]].forEach(e=>{let t;a[(t=e.id===d.rq?{id:e.id,name:e.name,image:e.image}:-1!==["A5GE9BMQC","A649AA069","A5W4BRDNX","ARQS1U88Y","ARUFE7YMU"].findIndex(t=>e.id===t)?{id:e.id,name:e.name,image:"/marketing/img/homepage/icons/zoom-icon.png"}:e).id]=t}),a}),getCallAppList=({callsApp:e,memberPhoneNumber:t,hideVideoApps:a=!1})=>{let r=[];return e&&(!a&&e.video&&r.push(...e.video.map(e=>({...e,type:o.JG.Video}))),e.audio&&(0,s.A)((0,n.A)(t))&&r.push(...e.audio.map(e=>({...e,type:o.JG.Audio})))),r},getFlattenTeamPrefCallsApps=e=>{let t=filterCallsAppsFromTeamPref(e,!0);return[...t&&t.video?t.video:[],...t&&t.audio?t.audio:[]]}},0x19c987d26:(e,t,a)=>{"use strict";a.d(t,{K4:()=>l,P:()=>clogCallMenuOpen,a:()=>clogCallMenuItemClick});var n=a(0x12185e091),r=a(0x1e79c438d),i=a(0x3711e82d);let l={channelNavBar:"channel-nav-bar",mpimNavBar:"mpim-nav-bar",imNavBar:"im-nav-bar",profilePhoneField:"profile-phone-field",profileSideBar:"profile-side-bar",miniProfileCard:"mini-profile-card",memberContextMenu:"member-context-menu",profileHoverCard:"profile-hover-card"},getEntryPoint=({cloggerContext:e,channel:t})=>(0,n.LI)(t)?l.imNavBar:(0,n.yz)(t)?l.mpimNavBar:(0,r.V)(t)?l.channelNavBar:e?.entryPoint,clogCallMenuOpen=({clogger:e,cloggerContext:t,channel:a})=>{e.track(i.EventId.CALLS_MENU_PHONE_INTEGRATION,{contexts:{ui_context:{step:i.UiStep.CALLS_MENU_OPEN,action:i.UiAction.OPEN,entry_point:getEntryPoint({cloggerContext:t,channel:a})}}})},clogCallMenuItemClick=({clogger:e,cloggerContext:t,channel:a,appId:n,callType:r})=>{e.track(i.EventId.CALLS_MENU_PHONE_INTEGRATION,{contexts:{ui_context:{step:i.UiStep.CALLS_MENU_ITEM_CLICK,action:i.UiAction.CLICK,entry_point:getEntryPoint({cloggerContext:t,channel:a}),ui_properties:{element_type:i.ElementType.MENU,element_name:"calls_menu_phone_integration"}},core:{app_id:n,item_type:r}}})}},0x1544e5ab1:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>j,Lz:()=>useGetCallMenuItems});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0xc26f5c40),o=a(0x1cbdfeceb),s=a(0x77727995),c=a(0x21f3c49e8),d=a(0x20482ad21),m=a(0x15f8e452a),u=a(0x1faa3f1ac),p=a(0x99233ecb),h=a(0xa089d16d),_=a(0x2301c802e),f=a(0x1b543542c),b=a(0x19c987d26),g=a(0x189393d41),y=a(0x1ba687fc6),A=a(0x5fc81c19),x=a(0x1a0c843f2),E=a(0x23d35e2e9),C=a(0x20227c0ec),k=a(0x1079e2574),v=a(0x12185e091),S=a(0x53f531a4),I=a(0x1e79c438d),w=a(0xebdd009e),T=a(0x3711e82d),N=a(0xf4c5686f),M=a(0x1a769a9e8),R=a(0x691ce3ab),P=a(0xdf55e8f3),L=a(0x226892387),O=a(0x217553e42),D=a(0x20c7d2c5e),F=a(0xf9cb31c6),U=a(0xc1360909),B=a(0x1472af90a);let H=new d.Ay("calls"),W={eventId:T.EventId.HUDDLES_DISCOVERY_CALLS_CALL_MENU_LINK_CLICKED,elementName:"huddle-discovery-call-menu-link",onClick:{enableClogAction:!0}};var V=((n=V||{}).channel="channel",n.im="im",n.mpim="mpim",n.none="none",n);let G={type:"none"},q=(0,P.eI)((e,{channelId:t,memberRealName:a,memberPhoneNumber:n})=>{let r=(0,O.OL)(e,t);if((0,v.yz)(r)){let t=(0,U.q8)(e,r.id);return{type:"mpim",value:t?.counts.member_count||0}}return(0,v.LI)(r)||a?{type:"im",value:a,phoneNumber:n}:(0,I.V)(r)?{type:"channel",value:(0,S.j)(r)??void 0}:G}),addMenuItem=({onSelected:e=o.A,appsById:t={},type:a,conversationContext:n,clogger:i,cloggerContext:l,channel:s,member:c,app:d,maybeDismissCanvasPopover:m,experimentHuddlesLaterGroupOn:u})=>{let _=`${a}-${d.id}`,f=(({appName:e,type:t,conversationContext:a})=>"video"===t?"mpim"===a.type?H.t("Use {appName} to start a video and audio call with {conversationContext} people",{appName:e,conversationContext:a.value}):"channel"===a.type?H.t("Use {appName} to start a video and audio call with #{conversationContext}",{appName:e,conversationContext:a.value}):"im"===a.type?H.t("Use {appName} to start a video and audio call with {conversationContext}",{appName:e,conversationContext:a.value}):H.t("Use {appName} to start a video and audio call",{appName:e}):"mpim"===a.type?H.t("Use {appName} to start a phone call with {conversationContext} people",{appName:e,conversationContext:a.value}):"channel"===a.type?H.t("Use {appName} to start a phone call with #{conversationContext}",{appName:e,conversationContext:a.value}):"im"===a.type?H.t("Use {appName} to start a phone call with {conversationContext}",{appName:e,conversationContext:a.value}):H.t("Use {appName} to start a phone call",{appName:e}))({appName:d.name,type:a,conversationContext:n}),getMenuItemIcon=()=>t[d.id]&&t[d.id].image?r.createElement(h.A,{className:"p-classic_nav__call-menu_icon",src:t[d.id].image}):r.createElement(h.A,{className:"p-classic_nav__call-menu_icon",src:M.i});return(getMenuItemIcon.displayName="getMenuItemIcon",d.id===A.Pg)?r.createElement(r.Fragment,{key:"huddle-call-menu-items"},(s||c)&&r.createElement(y.A,{channelId:s?.id,memberId:c?.id,onClose:m}),u&&s&&r.createElement(C.A,{channelId:s.id,onClose:m}),s&&r.createElement(E.A,{channelId:s.id,onClose:m})):r.createElement(p.Dr,{"data-qa":_,key:_,className:"display_flex flex_direction_row",onSelected:()=>{e({appId:d.id,type:a,phoneNumber:"im"===n.type?n.phoneNumber:void 0}),(0,b.a)({clogger:i,cloggerContext:l||{},channel:s,appId:d.id,callType:a})},"aria-label":f},r.createElement("div",{className:"display_flex flex_direction_row"},r.createElement("div",{className:"c-menu_item__icon"},getMenuItemIcon()," "),r.createElement("div",{className:"p-classic_nav__call-menu-text p-huddles-call-migration__menu-text"},d.name)))};addMenuItem.displayName="addMenuItem";let useGetCallMenuItems=({channelId:e,cloggerContext:t,hideVideoApps:a=!1,hideAudioApps:n=!1,hideHuddle:i=!0,member:d,memberRealName:h,memberPhoneNumber:b,onSelected:y=o.A,showHuddleDiscovery:x=!1,onClickHuddleDiscoveryLink:E=o.A})=>{let C=(0,L.d4)(f.q8),k=(0,L.d4)(f.vU),v=(0,L.d4)(t=>q(t,{channelId:e,memberRealName:h,memberPhoneNumber:b})),S=(0,L.d4)(t=>e?(0,O.OL)(t,e):d?(0,O.Pu)(t,d.id):void 0),I=(0,L.d4)(F.MJ),{embeddedUiData:w}=(0,r.useContext)(_.N),T=(0,r.useCallback)(()=>{w?.performAction({action:l.EmbeddedUiAction.PREVENT_POPOVER_DISMISS})},[w]),M=(0,r.useCallback)(()=>{T(),w?.performAction({action:l.EmbeddedUiAction.DISMISS_POPOVER})},[T,w]),R=(0,L.d4)(N.e),P=[],D=(0,s.A)(k,A.Pg,{}),U=!i&&!(0,c.A)(D);if(U&&P.push(addMenuItem({onSelected:y,appsById:k,type:f.Hu.audio,conversationContext:v,clogger:R,cloggerContext:t,channel:S,member:d,app:D,maybeDismissCanvasPopover:M,experimentHuddlesLaterGroupOn:I})),!a&&C.video&&C.video.length>0&&(P.push(r.createElement(p.c$,{label:H.t("Video meetings"),key:"video_audio"})),P.push(...C.video.map(e=>addMenuItem({experimentHuddlesLaterGroupOn:I,onSelected:y,appsById:k,type:f.Hu.video,conversationContext:v,clogger:R,cloggerContext:t,channel:S,member:d,app:e})))),!n&&(0,g.A)(b)&&C.audio&&C.audio.length>0&&(!a&&C.video&&C.video.length>0&&P.push(r.createElement(p.bX,{key:"phone_separator"})),P.push(r.createElement(p.c$,{label:H.t("Phone {phone}",{phone:b}),key:"phone"})),P.push(...C.audio.map(e=>addMenuItem({experimentHuddlesLaterGroupOn:I,onSelected:y,appsById:k,type:f.Hu.audio,conversationContext:v,clogger:R,cloggerContext:t,channel:S,member:d,app:e})))),x&&P.length>0&&!U){P.push(r.createElement(p.bX,{key:"huddles_discovery_link"}));let e=H.t("Show me how"),t=r.createElement("div",null,r.createElement("span",{className:"p-call_menu__huddle_discovery_link_container"},H.rt('<span className="p-call_menu__huddle_discovery_link_new_text">New:</span> Try a huddle for quick informal discussions with your team.')),r.createElement(u.A,{"aria-label":e,onClick:E,className:"p-call_menu__huddle_discovery_link",autoClogProps:W},e,r.createElement(m.A,{type:"chevron-medium-right",size:"inherit"})));P.push(r.createElement(p.c$,{label:t,key:"huddles_discovery_calls"}))}return P};useGetCallMenuItems.displayName="useGetCallMenuItems";let CallMenu=({hideAudioApps:e=!1,hideVideoApps:t=!1,member:a,memberPhoneNumber:n,memberRealName:l,menuProps:s,onSelected:c=o.A,cloggerContext:d,channelId:m,renderOnlyMenuItems:u=!1,includeHuddle:h=!1,includeHuddleDiscoveryLink:_=!1})=>{let f=(0,i.wA)();f((0,k.N)({reason:"call-menu",memberId:a?.id}));let b=(0,L.d4)(e=>(0,O.OL)(e,m)),g=(0,L.d4)(e=>(0,w.ZP)(e,a)),y=(0,L.d4)(e=>(0,w.Bn)(e,b||null)),A=b&&!(0,v.LI)(b)&&y,E=(0,L.d4)(F.Ms),C=(0,L.d4)(e=>(0,x.D7)(e,{experimentHuddlesDiscoveryCallsGroupTreatment:E})),S=(0,L.d4)(e=>(0,w.S9)(e,a,m))&&_,I=useGetCallMenuItems({channelId:m,cloggerContext:d,hideHuddle:!(h&&(g||A)),hideVideoApps:t,hideAudioApps:e,member:a,memberRealName:l,memberPhoneNumber:n,onSelected:c,showHuddleDiscovery:C&&S,onClickHuddleDiscoveryLink:(0,r.useCallback)(()=>{(0,R.dispatchForClientStore)((0,D.M)()),f((0,x.g6)({experimentHuddlesDiscoveryCallsGroupTreatment:E,interactionType:B.X8.Click}))},[f,E])});return u?r.createElement(r.Fragment,null,I):r.createElement(p.Ay,{...s,width:"305px","aria-label":H.t("Start a call")},I)};CallMenu.displayName="CallMenu";let j=r.memo(CallMenu)},0x22e509260:(e,t,a)=>{"use strict";a.d(t,{U:()=>WithCallMenu});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x99233ecb),l=a(0x1544e5ab1),o=a(0x1b543542c),s=a(0x19c987d26),c=a(0x10a716a94),d=a(0x189393d41),m=a(0x1079e2574),u=a(0x1e79c438d),p=a(0xebdd009e),h=a(0x1b9d5cc0c),_=a(0x82980ab8),f=a(0xf4c5686f),b=a(0x226892387),g=a(0x217553e42),y=a(0xe684f705);let WithCallMenu=({channelId:e,childFunctionComponent:t,cloggerContext:a,hideVideoApps:A,includeHuddle:x,includeHuddleDiscoveryLink:E,member:C,memberId:k,onCloseMenuCallback:v,onMenuItemSelected:S,onRenderMenuCallback:I,showCallMenuItems:w,useBookmarksStyle:T,useIaDetailsStyle:N,useIAP2InspectorStyle:M})=>{let R,P=(0,r.wA)(),L=(0,b.d4)(f.e),O=(0,b.d4)(t=>(0,g.OL)(t,e)),D=(0,b.d4)(e=>(0,o.q8)(e,(0,u.V)(O))),F=(0,b.d4)(e=>(0,y.nv)(e,k)),U=k?F:C,B=(0,h.v8)(U),H=(0,_.wg)(U),W=(0,b.d4)(e=>(0,p.ZP)(e,U)),V=U&&W,G=(0,b.d4)(e=>(0,p.Bn)(e,O)),q=O&&G,j=x&&(V||q);(0,n.useEffect)(()=>{P((0,m.N)({reason:"with-call-menu",memberId:k}))},[]);let z=(0,n.useCallback)(()=>(I&&I(),n.createElement(l.Ay,{channelId:e,onSelected:S,memberPhoneNumber:B,memberRealName:H,cloggerContext:a,hideAudioApps:(0,u.V)(O)||!(0,d.A)(B),hideVideoApps:A,member:U,includeHuddle:x,renderOnlyMenuItems:w,includeHuddleDiscoveryLink:E})),[O,e,a,A,x,E,B,H,U,S,I,w]),K=(0,n.useCallback)(()=>{(0,s.P)({clogger:L,cloggerContext:a,channel:O})},[O,L,a]),$=(0,o.OJ)({callsApp:D,memberPhoneNumber:B,hideVideoApps:A}),Y=$.length;if(0===Y&&!(j&&x))return null;if(w)return z();if(1!==Y||j&&x){let e,a,r,l=10*!!x;T?(a=-1,r="bottom"):M?(a=8,r="bottom-right"):N?(e=-4,a=-2,r="bottom-left"):(a=l,r="bottom"),R=n.createElement(i.cQ,{offsetX:e,offsetY:a,isOpen:!0,onClick:K,onClose:v,position:r,renderMenu:z,dataAttributes:{qa:"call-menu-trigger"}},t())}else{let e=$[0];R=t(()=>{S?.({appId:e&&e.id,type:e&&e.type,phoneNumber:B??null}),(0,s.a)({clogger:L,cloggerContext:a,channel:O,appId:e.id,callType:e.type})})}return n.createElement(c.A,{subtype:"with-call-menu"},R)};WithCallMenu.displayName="WithCallMenu"},0x19407ae97:(e,t,a)=>{"use strict";a.d(t,{j:()=>getNotificationPrefDescription});var n=a(0xc677a6f6),r=a(0x1e46ae87a);function stringToChannelNotificationSetting(e){switch("string"==typeof e?e:""){case"everything":return n.P$.Everything;case"mentions_dms":return n.P$.Mentions;case"nothing":return n.P$.Nothing;default:return null}}function getNotificationPrefDescription({desktopNotifySetting:e,isChannelMuted:t,notificationDisabledType:a,forceShowText:i=!1}={}){if(!i&&("not_allowed"===a||"not_yet_allowed"===a))return"";if(t)return(0,r.B0)(n.P$.Mentions,!0);let l=stringToChannelNotificationSetting(e);return null!==l?(0,r.B0)(l,!1):""}},0x100c31b19:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x120c268ad),o=a.n(l),s=a(0xa6f3163b),c=a(0x15f8e452a),d=a(0x4c96e5d9),m=a(0x182c9b0b0),u=a(0x1c91944c9),p=a(0x19895585a);function ViewHeaderIconButton({iconType:e,buttonLabel:t,tooltipText:a,tooltipProps:i={},onClick:l=r.A,className:m,isOpen:u=!1,secondaryView:p,...h}){let _=p?"bottom":"bottom-right",f=n.createElement(d.Ay,{tip:a||t,position:_,...i},n.createElement(s.A,{onClick:l,className:o()("p-ia__view_header__button","p-ia__view_header__button--icon_only",m,{"p-ia__view_header__button--open":u}),...h},n.createElement(c.A,{type:e,className:"p-ia__view_header__button_icon"})," ")),b=n.createElement(s.A,{onClick:l,className:o()("p-ia__view_header__button","p-ia__view_header__button--with_label",m,{"p-ia__view_header__button--open":u}),...h},n.createElement(c.A,{type:e,className:"p-ia__view_header__button_icon"})," ",t&&n.createElement("span",{className:"p-ia__view_header__button_text"},t));return n.createElement(n.Fragment,null,f,a?n.createElement(d.Ay,{tip:a,position:_,...i},b):b)}ViewHeaderIconButton.displayName="ViewHeaderIconButton";let h=(0,m.A)((0,u.N)((e,{getSiblingView:t})=>({secondaryView:t(e,{container:p.mq.Secondary})?.id}))(ViewHeaderIconButton));var _=a(0x3aef269f),f=a(0xd7f9203e);let b=new i.Ay("all_unreads"),g=class extends n.Component{constructor(e){super(e),this.refreshMessages=this.refreshMessages.bind(this)}static defaultProps={newUnreadMsgCount:0,incrementRefreshId:r.A,shouldIncludeLabel:!0};refreshMessages(){this.props.incrementRefreshId()}render(){let{newUnreadMsgCount:e,shouldIncludeLabel:t}=this.props;if(!e||e<1)return null;let a=b.t("{newUnreadMsgCount, plural, =1 {# new message} other {# new messages}}",{newUnreadMsgCount:e});return n.createElement(h,{onClick:this.refreshMessages,iconType:"sync",...t?{buttonLabel:a}:{}})}};g.displayName="RefreshUnreadMessagesButton";let y={incrementRefreshId:_.I1},A=(0,u.N)(e=>({newUnreadMsgCount:(0,f.GI)(e)}),y)(g)},0x398c0114:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x15f8e452a),s=a(0x1ccd2ebc8),c=a(0x20ada2503),d=a(0xa1832ae4),m=a(0x190a9df19),u=a(0x1ab54b1d),p=a(0x17f03e906),h=a(0x226892387),_=a(0x1fb2d2a87),f=a(0x1393a0ef7);let TeamBlurb=({className:e,customTeam:t,customSubtitle:a,onMouseEnter:r=l.A,isMenuItem:b=!1,ariaDescribedById:g,dataQa:y})=>{let{currentTeamName:A,currentTeamUrl:x}=(0,c.k)(),E=t?(0,d.F1)(t):A,C=t?(0,d.Zl)(t,"",!0):x,k=(0,h.d4)(f.S),v=(0,h.d4)(p.c),S=(0,h.d4)(_.to),I=(0,h.d4)(e=>(k===u.S.SharedChannelInvite||k===u.S.SharedDmInvite)&&((0,m.Zo)(e)||(0,m.p2)(e))),w=i()("p-classic_nav__team_menu__blurb--team","classic_nav__team_menu__blurb","p-classic_nav__team_menu__blurb--ia4",{"p-classic_nav__team_menu__blurb_submenu":b||I,"p-classic_nav__team_menu__blurb":!(b||I)},e);return n.createElement("div",{onMouseEnter:r},n.createElement("div",{className:w,"data-qa":y},n.createElement(s.T,{className:"p-classic_nav__team_menu__blurb__icon"}),n.createElement("div",{className:"p-classic_nav__team_menu__blurb__right"},n.createElement("div",{className:"p-classic_nav__team_menu__blurb__name"},v?n.createElement(o.A,{type:"gov-slack",size:"inherit",inline:!0,className:i()("p-classic_nav__team_menu__blurb__name--gov_slack_icon",`p-classic_nav__team_menu__blurb__name--gov_slack_icon--${S}`)}):null,E),n.createElement("div",{className:"p-classic_nav__team_menu__blurb__sub",id:g},a??C))))};TeamBlurb.displayName="TeamBlurb";let b=TeamBlurb},0x6bddb78e:(e,t,a)=>{"use strict";a.d(t,{A:()=>clipboard_handler});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x14fad6485),o=a(0x139aa1a7),s=a(0x10027d8bc),c=a(0x23fe0c8d2),d=a(0x12ae31822),m=a(1927545e3),u=a(0x9c7d2aa9),p=a(0x114a9d369),h=a(0x1f66b5878),_=a(0x1c2e38de1),f=a(0x9b7b6ba5),b=a(0x105ecbbed),g=a(0x5738b4bc),y=a(0x1599ad93e),A=a(0x1ed767a16),x=a(0xd6ba6894),E=a(0xf8dd7f80);let C={textPrimary:"#1d1c1d",textSecondary:"#616061",textLink:"#1264a3",backgroundCode:"#f8f8f8",backgroundCodeBlock:"#f8f8f8",backgroundMention:"#e8f5fa",backgroundHighlight:"#fff9c4",borderQuote:"#dddddd",borderCode:"#dddddd"};var k=a(0x1032ebf4a);let v=(0,E.getGenericLogger)();function hasMultipleContentfulChildren(e){let t=0;for(let a of Array.from(e.childNodes))if(a.nodeType===Node.TEXT_NODE?a.textContent?.trim()&&(t+=1):a.nodeType===Node.ELEMENT_NODE&&(t+=1),t>=2)return!0;return!1}let S=[/^c-/,/^p-/,/^sk-/,/^ts-/],I='Monaco, Menlo, Consolas, "Courier New", monospace';function getStringifyTypeStyles(e){return e&&({[k.on.CODE]:`background-color: ${C.backgroundCode}; border: 1px solid ${C.borderCode}; border-radius: 3px; padding: 2px 4px; font-family: ${I}; font-size: 12px`,[k.on.PRE]:`background-color: ${C.backgroundCodeBlock}; border: 1px solid ${C.borderCode}; border-radius: 4px; padding: 8px 12px; font-family: ${I}; font-size: 12px; white-space: pre-wrap; margin: 8px 0`,[k.on.QUOTE]:`border-left: 4px solid ${C.borderQuote}; padding-left: 12px; margin: 4px 0; color: ${C.textSecondary}`,[k.on.MENTION]:`background-color: ${C.backgroundMention}; color: ${C.textLink}; padding: 0 2px; border-radius: 3px; font-weight: 500`,[k.on.CHANNEL]:`color: ${C.textLink}; text-decoration: none; font-weight: 500`,[k.on.BOLD]:"font-weight: 700",[k.on.ITALIC]:"font-style: italic",[k.on.STRIKE]:"text-decoration: line-through",[k.on.UNDERLINE]:"text-decoration: underline"})[e]||null}function getClassStyles(e){return({"p-rich_text_section":"margin: 4px 0; padding: 0","p-rich_text_block":"margin: 0; padding: 0","c-message__sender":"font-weight: 700","c-message__body":`color: ${C.textPrimary}; font-size: 15px; line-height: 1.46668`,"c-message_kit__text":`color: ${C.textPrimary}; font-size: 15px; line-height: 1.46668`,"c-mrkdwn__highlight":`background-color: ${C.backgroundHighlight}; padding: 0 2px`,"c-mrkdwn__link":`color: ${C.textLink}; text-decoration: none`})[e]||null}function getElementStyles(e){return({DIV:`margin: 0; padding: 0; color: ${C.textPrimary}`,SPAN:"color: inherit",P:`margin: 4px 0; padding: 0; color: ${C.textPrimary}`,OL:"margin: 4px 0 4px 24px; padding: 0; list-style-position: outside",UL:"margin: 4px 0 4px 24px; padding: 0; list-style-position: outside",LI:`margin: 2px 0; padding: 0; color: ${C.textPrimary}`,BLOCKQUOTE:`border-left: 4px solid ${C.borderQuote}; margin: 4px 0; padding-left: 12px; color: ${C.textSecondary}`,PRE:`background-color: ${C.backgroundCodeBlock}; border: 1px solid ${C.borderCode}; border-radius: 4px; padding: 8px 12px; font-family: ${I}; font-size: 12px; white-space: pre-wrap; margin: 8px 0`,CODE:`background-color: ${C.backgroundCode}; border: 1px solid ${C.borderCode}; border-radius: 3px; padding: 2px 4px; font-family: ${I}; font-size: 12px`,A:`color: ${C.textLink}; text-decoration: none`,STRONG:"font-weight: 700",B:"font-weight: 700",EM:"font-style: italic",I:"font-style: italic",S:"text-decoration: line-through",U:"text-decoration: underline"})[e]||null}function processElement(e,t,a){if(e.hasAttribute("hidden")||(0,k.mW)(e))return void e.remove();if("IMG"===e.tagName){let t=(0,k.Go)(e)===k.on.EMOJI,a=e.getAttribute("alt")||"",n=a.startsWith(":")&&a.endsWith(":");if(!t&&!n)return void e.remove()}if("BUTTON"===e.tagName)return void e.remove();if((0,k.qM)(e)){let a=t.createDocumentFragment();a.appendChild(t.createElement("br")),a.appendChild(t.createElement("br")),e.replaceWith(a);return}if((0,k.Fy)(e)&&!((0,k.yt)(e)&&!a)){let a=(0,k.aX)(e);a&&e.replaceWith(t.createTextNode(a))}applyInlineStyles(e),cleanupAttributes(e),Array.from(e.children).forEach(e=>processElement(e,t,a))}function applyInlineStyles(e){let t=[],a=getElementStyles(e.tagName);a&&t.push(a);let n=getStringifyTypeStyles((0,k.Go)(e));if(n&&t.push(n),n||e.classList.forEach(e=>{let a=getClassStyles(e);a&&t.push(a)}),"IMG"===e.tagName)if((0,k.Go)(e)===k.on.EMOJI)t.push("height: 1.2em; width: 1.2em; vertical-align: text-bottom");else{let a=e.getAttribute("alt")||"";a.startsWith(":")&&a.endsWith(":")&&t.push("height: 1.2em; width: 1.2em; vertical-align: text-bottom")}let r=[e.getAttribute("style")||"",...t].filter(Boolean).join("; ");r&&e.setAttribute("style",r)}function cleanupAttributes(e){Array.from(e.classList).filter(e=>S.some(t=>t.test(e))).forEach(t=>e.classList.remove(t)),0===e.classList.length&&e.removeAttribute("class"),Array.from(e.attributes).filter(e=>e.name.startsWith("data-")&&"data-stringify-emoji"!==e.name).map(e=>e.name).forEach(t=>e.removeAttribute(t)),["role","aria-pressed","tabindex","dir"].forEach(t=>{e.removeAttribute(t)}),"IMG"!==e.tagName&&e.removeAttribute("aria-label")}function cleanHTMLForExternal(e){if(!e)return"";try{let t=new DOMParser().parseFromString(e,"text/html"),{body:a}=t;if(!a)return e;let n=hasMultipleContentfulChildren(a);a.querySelectorAll(".p-rich_text_section").forEach((e,a,n)=>{if(a>=n.length-1)return;let r=e.nextElementSibling;r&&["OL","UL","BLOCKQUOTE","PRE"].includes(r.tagName)||e.lastElementChild?.tagName!=="BR"&&e.after(t.createElement("br"))}),Array.from(a.children).forEach(e=>processElement(e,t,n));let r=Array.from(a.children);if(r.length>1){let e=r[r.length-1];"DIV"!==e.tagName||e.textContent?.trim()||e.remove()}return a.innerHTML}catch(t){return v.warn("cleanHTMLForExternal: Failed to process HTML",t),e}}function getCleanedSelectionHTML(e,t){if(!e||e.isCollapsed)return"";try{let a=e.getRangeAt(0).cloneContents(),n=t.createElement("div");return n.appendChild(a),(0,k.NT)(n),(0,k.QX)(e,n,t),cleanHTMLForExternal(n.innerHTML)}catch(e){return v.warn("getCleanedSelectionHTML: Failed to get selection HTML",e),""}}function getCleanedSelectionPlainText(e){if(!e)return"";try{let t=x.J.document.createElement("div");return t.innerHTML=e.replace(/<br(?: aria-hidden="true")?>/g,`
`).replace(/<\/li>/gi,`
`).replace(/<(ul|ol)[\s>]/gi,`
<$1 `),t.querySelectorAll("img").forEach(e=>{e.replaceWith(e.getAttribute("data-stringify-emoji")||e.getAttribute("alt")||"")}),t.textContent?.trim()||""}catch(e){return v.warn("getCleanedSelectionPlainText: Failed to extract plain text",e),""}}function getSlackSelectionHTML(e,t){if(!e||e.isCollapsed)return"";try{let a=e.getRangeAt(0).cloneContents(),n=t.createElement("div");return n.appendChild(a),n.querySelectorAll("[hidden]").forEach(e=>e.remove()),(0,k.NT)(n),(0,k.QX)(e,n,t),(0,k.sX)(n,t),`<meta charset="utf-8">${n.innerHTML}`}catch(e){return v.warn("getSlackSelectionHTML: Failed to get selection HTML",e),""}}function isWithinMessageContainer(e){if(!e)return!1;let t=e;for(;t;){if(t instanceof x.J.Element&&(t.classList.contains("c-message")||t.classList.contains("c-message_kit__message")||t.classList.contains("c-message_kit__blocks")||t.classList.contains("p-rich_text_block")||t.classList.contains("c-mrkdwn")||t.hasAttribute("data-message-id")))return!0;t=t.parentNode}return!1}var w=a(0x3711e82d),T=a(0x42a4b4de),N=a(0xdc27ddba),M=a(0x24558b75f),R=a(0x16ed1b0dc),P=a(0x9b971e7e),L=a(0xbf6f9767),O=a(0x4c444437),D=a(0x24083f639),F=a(0x226892387),U=a(0xad543291),B=a(0x1973dd8ce),H=a(0x226609a31),W=a(0xd2b39989),V=a(0x1ef125c78),G=a(0x624c12c8),q=a(0x19895585a),j=a(0x9271cc31),z=a(0x141db06ab);let clipboard_handler=()=>{let{windowRef:e,windowId:t}=(0,n.useContext)(l._0),a=(0,r.wA)(),x=(0,F.d4)(P.ZT),E=(0,c.p)()?.id,C=(0,F.d4)(j.Oy),k=C?.id,v=(0,F.d4)(e=>!!k&&(0,R.A)(k)&&(0,g.E)(e,k)),{getFocusedContainer:S}=(0,n.useContext)(d.A),I=(0,F.d4)(T.u),K=(0,F.d4)(s.gT),$=(0,F.d4)(e=>(0,V.pd)(e,{windowId:t})),Y=(0,F.d4)(e=>(0,V.Kx)(e,{windowId:t,ignoreViewContext:!0})),Q=(0,F.d4)(e=>{if((0,M.n3)(e)&&t!==q.N2)return(0,j.Yi)(e,{container:q.mq.Primary,windowId:t})?.id}),Z=(0,F.d4)(e=>{if((0,M.n3)(e)&&t!==q.N2)return(0,j.Yi)(e,{container:q.mq.Primary,windowId:t})?.params?.draftId}),J=(0,F.d4)(e=>{if(t===q.N2)return(0,j.F8)(e,{tab:(0,j.e6)(e),container:q.mq.Primary})?.id}),X=(0,F.d4)(e=>{if(t===q.N2)return(0,j.F8)(e,{tab:(0,j.e6)(e),container:q.mq.Secondary})?.id}),ee=(0,F.d4)(e=>{if(t===q.N2)return(0,j.F8)(e,{tab:(0,j.e6)(e),container:q.mq.Primary})?.params?.draftId}),et=Q||J||E,ea=J===o.D.TodayV2?X:"",en=(0,R.A)(et)?et:"",er=(0,R.A)(ea)?ea:"",ei=(0,F.d4)(e=>en&&(0,u.A)(e,en)),el=(0,F.d4)(z.A),eo=(0,F.d4)(e=>(0,y.xT)(e,t)),es=(0,F.d4)(e=>en&&(0,g.E)(e,en)),ec=(0,F.d4)(e=>er&&(0,g.E)(e,er)),ed=(0,F.d4)(e=>(0,h.Bx)(e,"allow_box_cfs",en)),em=(0,F.d4)(e=>en&&(0,f.O)(e,en)&&!ed),eu=(0,F.d4)(_.p),ep=ei||el||ee||Z,eh=(0,n.useCallback)(e=>{let t=(0,A.Ur)(e);return(0,i.A)(t)?null:"disable_all"===eu?(a((0,D.A)({error:p.R.FileUploadsDisabled})),null):em?(a((0,D.A)({error:p.R.SlackConnectFileUploadSharingBlocked})),null):t},[eu,a,em]),e_=(0,n.useCallback)(n=>{let r,l,o;if(!n||!n.clipboardData)return;let s=eh(n);if((0,i.A)(s)||!s)return;let c=S()===q.mq.Split,d=!1,u=!1,p=!1,h=e.deref()?.document?.activeElement;if(h&&($&&I&&(p=(0,N.A)(h,e=>e.classList.contains("c-message__editor__input_container"))),c&&C?.params?.threadId?(d=!0,o=C?.params?.threadId):d=(0,N.A)(h,e=>{if(u=!!e&&e.classList.contains("p-threads_footer__input")){let t=e?.querySelector("[data-message-input]");o=t?.getAttribute("data-thread-key")}return u})),$&&p&&I){a((0,W.e)({files:s,channelId:Y?.channelId||"",ts:Y?.ts||"",windowId:t,viewContext:Y?.viewContext,action:w.UiAction.COPY_AND_PASTE})),n.preventDefault();return}if(!d&&!eo)return;if(d&&o){let{channelId:e,threadTs:t}=(0,b.Sb)(o);r=e,l=t}else c&&v?r=k:(0,R.A)(et)&&es&&et?r=et:(0,R.A)(ea)&&ec&&(r=ea);let _=et===m.c.Composer;if(!r&&!_)return;let f={fileUploadAction:w.FileUploadAction.COPY_AND_PASTE,fileUploadSrc:w.FileUploadSrc.LOCAL};a((0,L.i)({uiStep:w.UiStep.PRE_SEND,action:w.UiAction.COPY_AND_PASTE})),_&&!d&&s?a((0,U.C)({draftId:ep,files:[...s]})):n.shiftKey&&a((0,O.A)({selectedFiles:[...s],channelId:r,threadTs:l})).then(e=>{e&&e.length&&x&&a((0,H.Z)({teamId:x,files:e,shareData:{channelId:r,threadTs:l,metadata:f}}))}),s&&a((0,U.C)({draftId:(0,B.Q)({channelId:r,threadTs:l}),files:[...s]})),n.preventDefault()},[e,eo,v,et,ea,ec,es,$,I,a,C?.params?.threadId,k,Y?.channelId,Y?.ts,Y?.viewContext,t,ep,x,eh,S]),ef=(0,n.useCallback)(t=>{let n=e.deref()?.getSelection();if(!n||n.isCollapsed||!isWithinMessageContainer(n.anchorNode)||t.defaultPrevented)return;let r=e.deref()?.document;if(!r)return;let i=getCleanedSelectionHTML(n,r),l=getCleanedSelectionPlainText(i),o=getSlackSelectionHTML(n,r);i&&(K&&a((0,G.B)({selection:n,focusedContainer:S(),splitViewChannelId:k,primaryViewId:et})),t.preventDefault(),t.clipboardData?.setData("text/html",i),t.clipboardData?.setData("text/plain",l),o&&t.clipboardData?.setData("slack/html",o))},[e,k,et,K,a,S]);return(0,n.useEffect)(()=>{let t=e.deref();return t?.addEventListener("paste",e_),t?.addEventListener("copy",ef),()=>{t?.removeEventListener("paste",e_),t?.removeEventListener("copy",ef)}},[e_,ef,e]),null}},0x19cdb368f:(e,t,a)=>{"use strict";a.d(t,{A:()=>CommentListToggle});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x20482ad21),l=a(0x15f8e452a),o=a(0x210cf696f);let s=new i.Ay("comments");function CommentListToggle({toggleList:e,commentCount:t,expanded:a}){let i=a?s.t("Hide older comments"):s.t("See older comments");return n.createElement("div",{className:"p-comment_list__toggle_container"},n.createElement(o.A,{onClick:e||r.A,"aria-expanded":a},i),n.createElement("span",{className:"p-comment_list__toggle_count_button",role:"presentation",onClick:e||r.A},n.createElement(l.A,{type:"comment-alt"}),n.createElement("span",{className:"p-comment_list__toggle_count"},t),n.createElement(l.A,{type:a?"caret-down":"caret-right",className:"p-comment_list__toggle_caret"})))}CommentListToggle.displayName="CommentListToggle"},0x743dc2c9:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x13776886e),i=a(0x44520056),l=a(0x20482ad21),o=a(0x6cc5eee0),s=a(0xa6f3163b),c=a(0x15f8e452a),d=a(0x99233ecb),m=a(0x1c91944c9),u=a(0x225278752);let p=new l.Ay("comments"),h=class extends n.PureComponent{constructor(e){super(e),this.renderMenu=this.renderMenu.bind(this),this.toggleStar=this.toggleStar.bind(this)}getSavedToggleLabel(){let{isStarred:e}=this.props;return e?p.t("Unsave this file comment"):p.t("Save this file comment")}toggleStar(){let{commentId:e,fileId:t,isStarred:a}=this.props;e&&t&&this.props.updateStar&&this.props.updateStar(!a,{file_comment:e,file_comment_file:t})}renderMenu(e){return n.createElement(d.Ay,e,n.createElement(d.Dr,{label:this.getSavedToggleLabel(),onSelected:this.toggleStar}))}render(){return n.createElement(d.cQ,{renderMenu:this.renderMenu,position:"left-bottom"},n.createElement(s.A,{className:"p-comment__actions","aria-label":p.t("Show more actions")},n.createElement(c.A,{type:"cog",size:"inherit"})))}};h.displayName="CommentActions";let _=(0,m.N)(null,{updateStar:u.A})(h);var f=a(0x1f4fd9824),b=a(0x1ccef1c6f);let g=new l.Ay("comments"),y=class extends n.PureComponent{render(){let{comment:e,time24:t,fileId:a}=this.props;if(!e)return null;let{user:l,timestamp:s,comment:c,is_starred:d,id:m}=e;return n.createElement("div",{className:"p-comment"},n.createElement("div",{className:"p-comment__header"},l?n.createElement(f.A,{userId:l}):null,n.createElement("span",{className:"p-comment__timestamp"},g.t("{date} at {time}",{date:(0,i.A)(s,{shortenMonth:!0}),time:(0,r.A)(s,"{time}",{do24hrTime:t})})),n.createElement(_,{isStarred:d,commentId:m,fileId:a})),n.createElement("div",{className:"p-comment__body"},n.createElement(o.A,{text:c,memberId:l})))}};function mapStateToProps(e){return{time24:!!(0,b.ty)(e,"time24")}}y.displayName="Comment";let A=(0,m.N)(mapStateToProps)(y)},0x21da29cb7:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xa6f3163b);let o=256,s=256,ProfileImage=({imageUrl:e,children:t,dataQa:a,className:r,shape:c="square",altText:d,width:m=o,height:u=s,onCta:p,ctaAriaLabel:h})=>{let _=i()(r,"c-profile_image__img_container",{"c-profile_image__circle":"circle"===c}),f=(0,n.useMemo)(()=>({width:`${m}px`,height:`${u}px`}),[m,u]),b=n.createElement(n.Fragment,null,e&&n.createElement("img",{src:e,alt:d,className:"c-profile_image__img"}),t);return p?n.createElement(l.A,{"data-qa":a,className:_,style:f,onClick:p,"aria-label":h},b):n.createElement("div",{"data-qa":a,style:f,className:_},b)};ProfileImage.displayName="ProfileImage";let c=ProfileImage},0x8b6af907:(e,t,a)=>{"use strict";a.d(t,{A:()=>eJ});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x21f3c49e8),o=a(0x1f4e32220),s=a(0x1d24ec95f),c=a(0x1cbdfeceb),d=a(0x130d89881),m=a(0x91728dda),u=a(0xb97b797e),p=a(0x1a256ff50),h=a(0x980a7b83),_=a(0x16cf1da63),f=a(0x20482ad21),b=a(0x11a296110),g=a(0x1e18134eb),y=a(0x4165455),A=a(0x226892387),x=a(0x5dd1c0f2),E=a(0x14149c126),C=a(0x1635a05);let k=new f.Ay("live_unfurling"),DraftUnfurlsAuthPrompt=({draftId:e,unfurl:t})=>{let a=t?.app_id??"",r=(0,y.Bg)(t)??(0,y.J3)(t)??"",i=(0,_.wA)(),l=(0,A.d4)(e=>(0,x.sO)(e,a)),o=(0,A.d4)(e=>"treatment"===(0,E._Z)(e,"composer_auth")),s=(0,n.useCallback)(()=>{i((0,C._)({appId:a,draftId:e,url:r}))},[a,i,e,r]),c=(0,n.useMemo)(()=>({backgroundImage:`url(${l?.icons?.image_36})`}),[l]);return o?n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__auth_prompt"},n.createElement(g.P,{url:r,draftId:e}),n.createElement(b.Nm,{className:"p-draft_unfurls__unfurl",onClick:s},n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},l?.icons?.image_36&&n.createElement("div",{className:"p-draft_unfurls__unfurl_icon p-draft_unfurls__unfurl_icon--preview",style:c}),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},l?.name))),n.createElement("div",{className:"p-draft_unfurls__unfurl_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_title p-draft_unfurls__unfurl_preview_text"},k.t("Connect to enable preview"))))):null};DraftUnfurlsAuthPrompt.displayName="DraftUnfurlsAuthPrompt";var v=a(0x40c0d834),S=a(0x4c96e5d9),I=a(0x131e5f81a),w=a(0x1bd8cf479),T=a(0x42a4b4de),N=a(0x1fe0f70b4),M=a(0x1ef125c78);function getContactUserId(e){return e.contact_user_id}function shouldRenderDraftContactUnfurls(e,{draftId:t,windowId:a,isEditComposer:n=!1}={}){if(!(0,w.Cq)(e)||void 0===t)return!1;let r=(0,T.P)(e)&&n&&(0,M.e6)(e,{windowId:a,ignoreViewContext:!0}),i=(0,N.Di)(e,t);return!(0,l.A)(i)||r}var R=a(0x3711e82d),P=a(0xb12eea99),L=a(0xe684f705);let O=new f.Ay("live_contact_unfurling"),DraftUnfurlsContact=({draftId:e,unfurl:t})=>{let a=(0,_.wA)(),r=getContactUserId(t),i=(0,A.d4)(e=>(0,L.nv)(e,r)),l=(0,n.useCallback)(()=>{a((0,P.Fh)({draftId:e,contactUserId:r,status:N.D8.REMOVED}))},[a,e,r]);if(!i||!r)return null;let o=O.t("Remove contact info");return n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"contact_unfurl"},n.createElement(v.A,{eventId:R.EventId.SHARED_SLACK_CONNECT_INTRODUCTIONS,uiStep:R.UiStep.SLACK_CONNECT_CONTACT_UNFURL,clogImpression:!0},n.createElement(S.Ay,{tip:o,position:"top"},n.createElement(g.P,{"data-qa":"contact_unfurls_remove_btn",onClick:l,ariaLabel:o})),n.createElement("div",{className:"c-pillow_file_container"},n.createElement(I.A,{contactUserId:r}))))};DraftUnfurlsContact.displayName="DraftUnfurlsContact";var D=a(0x1faa3f1ac),F=a(0xd3fcb4c1),U=a(0x178109f89),B=a(0xf067ab43),H=a(0x1b3ecb90f),W=a(0x1bd866cd7),V=a(0x235ff1eab),G=a(0x18476a827),q=a(0x46dbff89);let UnfurlText=({text:e})=>{let t=e?.type==="mrkdwn"?F.q:U.A;return n.createElement(t,{noHighlights:!0,noHexColors:!0,noJumbomoji:!0,noLinking:!0,noCode:!0,noQuotes:!0,maxNewlines:1,emojiSize:H.lw.SMALL,customLineEnding:" ",...e})};UnfurlText.displayName="UnfurlText";let DraftUnfurlsPreview=({draftId:e,unfurl:t,onUnfurlRemoved:a})=>{let r=(0,_.wA)(),i=(0,y.Bg)(t)??(0,y.J3)(t),l=(0,A.d4)(e=>t?.is_app_unfurl?(0,G.AF)(e,t?.bot_id):void 0),o=(0,A.d4)(e=>t?.preview?.icon_url?(0,V.Ay)(e,{url:t?.preview?.icon_url}):l?.icons?.image_36?(0,V.Ay)(e,{url:l?.icons?.image_36}):void 0),s=(0,n.useMemo)(()=>({backgroundImage:`url("${CSS.escape(o??"")}")`}),[o]),c=(0,n.useCallback)(()=>{r((0,q.q)({element:n.createElement(B.h,{unfurl:t,draftId:e})}))},[e,t,r]),d=(0,W.Hg)(l);return n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__preview"},n.createElement(g.P,{url:i,draftId:e,onUnfurlRemoved:a}),n.createElement(b.Nm,{className:"p-draft_unfurls__unfurl",onClick:c},n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},o&&n.createElement("div",{className:"p-draft_unfurls__unfurl_icon p-draft_unfurls__unfurl_icon--preview",style:s}),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},d))),n.createElement("div",{className:"p-draft_unfurls__unfurl_text"},t?.preview?.title?.text?.trim?.()&&n.createElement(D.A,{className:"p-draft_unfurls__unfurl_title p-draft_unfurls__unfurl_preview_text",href:i},n.createElement(UnfurlText,{text:t.preview.title})),t?.preview?.subtitle?.text?.trim?.()&&n.createElement("span",{className:"p-draft_unfurls__unfurl_description p-draft_unfurls__unfurl_preview_text"},n.createElement(UnfurlText,{text:t.preview.subtitle})))))};DraftUnfurlsPreview.displayName="DraftUnfurlsPreview";var j=a(0xe747dd27),z=a(0x20b4dda68),K=a(0x23619f41c),$=a(0x2501a2cee),Y=a(0x1fdec3e16),Q=a(0x1d0e768cb),Z=a(0x74791de4),J=a(0x1b9d5cc0c);let X=new f.Ay("agents"),DraftUnfurlsSharePrompt=({unfurl:e})=>{let t=(0,j.XK)(e.blocks?.[0]||{}),a=t?.isSlackbot,r="on"===(0,A.d4)(e=>(0,E._Z)(e,"shareable_prompt_slackbot")),i=(0,A.d4)(e=>a?(0,L.nv)(e,z.Q$):(0,L.Eq)(e,t?.appId)),l=i?(0,J.c2)(i):null,o=(0,J.wg)(i);if(!t||!i||!l)return null;let s=n.createElement(Z.A,{userId:i.id,position:"left-bottom"},n.createElement(D.A,null,o));return!r&&a?null:n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__share_prompt"},n.createElement("div",{className:"p-draft_unfurls__unfurl_prompt p-draft_unfurls__unfurl"},r?n.createElement("div",{className:"margin_right_50"},n.createElement("div",{className:"p-draft_unfurls__prompt__icon_background"},n.createElement($.Ah,{name:"ai-thread-summary",style:Q.F}))):n.createElement(K.A,{classes:"margin_right_50",ariaHidden:!0,size:36,image:l}),n.createElement("div",{className:"p-draft_unfurls__prompt__details"},n.createElement(U.A,{noHighlights:!0,noHexColors:!0,noJumbomoji:!0,noLinking:!0,noCode:!0,noQuotes:!0,maxNewlines:1,emojiSize:H.lw.SMALL,customLineEnding:" ",text:t.label,className:"p-draft_unfurls__shortcut__title"}),n.createElement("span",null,n.createElement(Y.A,{lines:1,withTooltip:!0},X.rt("Prompt for {agentRealName}",{agentRealName:s}))))))};DraftUnfurlsSharePrompt.displayName="DraftUnfurlsSharePrompt";var ee=a(0x15a4ffb05),et=a(0x1750bcf85),ea=a(0x10027d8bc);let en=new f.Ay("agents");function isShareSkillBlock(e){return"object"==typeof e&&null!==e&&"label"in e&&"string"==typeof e.label}let DraftUnfurlsShareSkill=({unfurl:e})=>{if(!(0,A.d4)(ea.vP))return null;let t=e.blocks?.[0];if(!t)return null;let a=(0,j.XK)(t);return isShareSkillBlock(a)?n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__share_skill"},n.createElement("div",{className:"p-draft_unfurls__unfurl_skill p-draft_unfurls__unfurl"},n.createElement(et.Q,null),n.createElement("div",{className:"p-draft_unfurls__prompt__details"},n.createElement("span",{className:"p-draft_unfurls__shortcut__title"},n.createElement(Y.A,{lines:1,withTooltip:!0},n.createElement(ee.A,{text:a.label,emojiSize:H.lw.SMALL,inputIsEscaped:!0}))),n.createElement("span",null,n.createElement(Y.A,{lines:1,withTooltip:!0},en.t("Skill for Slackbot")))))):null};DraftUnfurlsShareSkill.displayName="DraftUnfurlsShareSkill";var er=a(0xbe0b63ff),ei=a(0x24a3b0b8c),el=a(0x7a2a96da),eo=a(0x16bf7293e),es=a(0x22f6a086f);let ec=new f.Ay("hermes_shortcuts"),DraftUnfurlsShortcut=({unfurl:e,draftId:t,onUnfurlRemoved:a})=>{let r=(0,y.Bg)(e)??(0,y.J3)(e),i=(0,eo.A)((0,j.XK)(e.blocks?.[0]||{})),l=(0,A.d4)(e=>i?.triggerId?(0,es.bn)(e,{triggerId:i.triggerId},!0):null);if((0,er.lv)(l))return n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__auth_prompt"},n.createElement("div",{className:"p-draft_unfurls__unfurl p-draft_unfurls__shortcut__container"},n.createElement($.Ah,{name:"trash",size:"20"}),n.createElement("div",{className:"p-draft_unfurls__shortcut__details"},n.createElement("div",null,"This workflow no longer exists."))));if((0,er.mX)(l))return n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__auth_prompt"},n.createElement("div",{className:"p-draft_unfurls__unfurl p-draft_unfurls__shortcut__container"},n.createElement($.Ah,{name:"clock",size:"20"}),n.createElement("div",{className:"p-draft_unfurls__shortcut__details"},n.createElement("div",null,"Loading..."))));let{title:o}=i;return n.createElement("div",{className:"p-draft_unfurls__unfurl_container","data-qa":"draft_unfurls__auth_prompt"},n.createElement(g.P,{url:r,draftId:t,onUnfurlRemoved:a}),n.createElement("div",{className:"p-draft_unfurls__unfurl p-draft_unfurls__shortcut__container"},n.createElement(el.A,{className:"p-draft_unfurls__shortcut__app_icon",shortcutInfo:i}),n.createElement("div",{className:"p-draft_unfurls__shortcut__details"},o&&n.createElement(U.A,{noHighlights:!0,noHexColors:!0,noJumbomoji:!0,noLinking:!0,noCode:!0,noQuotes:!0,maxNewlines:1,emojiSize:H.lw.SMALL,customLineEnding:" ",className:"p-draft_unfurls__shortcut__title",text:o}),ec.rt("by {author}",{author:n.createElement(ei.K,{shortcutInfo:i})}))))};DraftUnfurlsShortcut.displayName="DraftUnfurlsShortcut";var ed=a(0x1fe44d86d),em=a(0x1ebfa1009),eu=a(0x20e77676b),ep=a(0x1472af90a),eh=a(0xf052d367),e_=a(0x18632f75a);let ef=new f.Ay("introductions"),IntroductionsEducationCoachmarkAnchor=({children:e})=>{let t=(0,_.wA)(),[a,r]=(0,n.useState)(!0),i=(0,A.d4)(e=>(0,eh.Pg)(e,ep.G7.IntroductionsEducationCoachmark));(0,n.useEffect)(()=>{t((0,e_.b)({interactions:[{component:ep.G7.IntroductionsEducationCoachmark,type:ep.X8.Dismiss}],reason:"load_introductions_education_coachmark"})).then(()=>{r(!1)})},[t]);let l=ef.t("Making an introduction?"),o=ef.rt("When you share someone\u2019s contact info, others can message them directly. They\u2019ll see you\u2019ve introduced them. <link>Learn more</link>",{"<link>":({text:e})=>n.createElement(eu.A,{articleId:0x401e2ae2693},e)}),handleCloseCoachmark=()=>{t((0,e_.z)({component:ep.G7.IntroductionsEducationCoachmark,type:ep.X8.Dismiss,reason:"dismiss_introductions_education_coachmark"}))},s=n.createElement(ed.Ay,{isOpen:!a&&!i,qa:"introductions_education_coachmark",closeCoachmark:handleCloseCoachmark,onClickPrimaryButton:handleCloseCoachmark,orientation:"top",coachmarkClassNames:"p-introductions_education__coachmark",offsetX:-27,offsetY:72,labelledby:"introductions_education__coachmark_header introductions_education__coachmark_content",primaryCallToActionText:ef.t("Got It"),isMegaphoneCoachmark:!1},n.createElement("div",{className:"margin_right_125"},n.createElement("div",{className:"p-introductions_education__coachmark_icon_container"},n.createElement("span",{role:"img","aria-label":"handshake",className:"p-introductions_education__coachmark_icon"},"\u{1F91D}")),n.createElement("h3",{id:"introductions_education__coachmark_header",className:"p-introductions_education__coachmark_header"},l),n.createElement("p",{id:"introductions_education__coachmark_content",className:"sk_foreground_max margin_bottom_0"},o)));return n.createElement(em.Ay,{coachmarkElement:s,orientation:"top"},e)};IntroductionsEducationCoachmarkAnchor.displayName="IntroductionsEducationCoachmarkAnchor";var eb=a(0x32166abd),eg=a(0x182c9b0b0),ey=a(0xbd3de346),eA=a(0x12c77e45),ex=a(0x16e65360b),eE=a(0x132e1beb4),eC=a(0x1e0a0cdcc),ek=a(0x1c91944c9),ev=a(0x2050b73b9),eS=a(0xb437e2ce),eI=a(0x1988881a0),ew=a(0xa9428463);let eT=class extends n.Component{constructor(e){super(e),(0,u.v)(this,["renderDraftAttachments","renderDraftContacts"])}filterDraftAttachmentUnfurls(){let{draftAttachmentUnfurls:e,draftGifUnfurls:t,draftBlockUnfurls:a,hasEditAttachments:n,editGifUnfurls:r,editAttachmentUnfurls:i,editBlockUnfurls:l,isEditComposer:o,shouldSuppressChampionDMUnFurls:s,prefGifPickerEnabled:c,shouldRenderDraftAttachmentUnfurls:d,shouldRenderCanvasUnfurls:m,shouldRenderDraftContactUnfurls:u,experimentSlackforceListUnfurlsGroupOn:p,experimentEditAttachmentsPhase2GroupOn:h,unfurlFileIdsToHide:_}=this.props;if(!d&&!u&&!m)return(this.getValidUnfurls(t,eb.S5)||[]).concat(a);let f=e?.filter(y.dk)||[];if(c&&t?.length&&(f=f.concat(t.filter(e=>(0,y.Bg)(e)&&(0,y.zb)(e)))),a?.length&&(f=f.concat(a)),h&&o&&n){if(r?.length&&(f=f.concat(r)),i?.length){let e=i.filter(e=>{let t=(0,y.CK)(e);return!t||!_?.has(t)});f=f.concat(e)}l?.length&&(f=f.concat(l))}return s&&(f=this.getValidUnfurls(f,eb.S5)),p||(f=f.filter(e=>!(0,y.lP)(e))),f}getValidUnfurls(e,t){let{markDraftUnfurlAsRemoved:a}=this.props;return e?.filter(e=>{let n=(0,y.Bg)(e);return!(n&&t.includes(n))||(a(n),!1)})}renderDraftAttachments(){let{dataQa:e="",draftId:t,channelId:a,windowId:r,isEditComposer:i,experimentComposerAuthGroupTreatment:o,experimentSlackbotAiSkillsGroupOn:s,onUnfurlRemoved:d,onFilePermissionSelect:m,markDraftUnfurlAsRemoved:u}=this.props,p=this.filterDraftAttachmentUnfurls(),_=new Set;return(0,l.A)(p)?null:n.createElement("div",{className:"p-draft_unfurls","data-qa":`draft-unfurls_${e}`},p.map(e=>{let l=(0,y.Bg)(e),p=l??(0,y.J3)(e),f=(0,y.$w)(e);if((0,eE.v)(e)&&(p=e?.block_id),!f&&(0,y.gr)(e)){if(o&&(0,y.vQ)(e))return n.createElement(DraftUnfurlsAuthPrompt,{key:p,draftId:t,unfurl:e});if((0,y.P3)(e))return n.createElement(DraftUnfurlsPreview,{key:p,draftId:t,unfurl:e,onUnfurlRemoved:d||c.A})}if((0,ex.M)(e))return n.createElement(DraftUnfurlsShortcut,{key:p,unfurl:e,draftId:t,onUnfurlRemoved:d||c.A});if((0,eA.ZZ)(e))return n.createElement(DraftUnfurlsSharePrompt,{key:p,unfurl:e});if(s&&(e=>!(0,y.cO)(e)&&(e?.blocks??[]).some(e=>e.type===z.WP.share_skill))(e))return n.createElement(DraftUnfurlsShareSkill,{key:p,unfurl:e});let b=!1;if(l&&(0,ey.wL)(e)){let t=(0,y.CK)(e);t&&(_.has(t)?b=!0:_.add(t))}return!b&&e?n.createElement(h.A,{key:p,draftId:t,windowId:r,channelId:a,isEditComposer:i,unfurl:e,onUnfurlRemoved:d,onFilePermissionSelect:m,markDraftUnfurlAsRemoved:u}):null}))}renderDraftContacts(){let{draftId:e,draftContactUnfurls:t,editContactUnfurls:a,isEditComposer:r=!1}=this.props;if((0,l.A)(t)&&(0,l.A)(a))return null;let i=r?a:t;return n.createElement(IntroductionsEducationCoachmarkAnchor,null,n.createElement("div",{className:"p-draft_unfurls"},i.map(t=>n.createElement(DraftUnfurlsContact,{key:getContactUserId(t),draftId:e,unfurl:t}))))}renderSeparator(){let{draftContactUnfurls:e}=this.props;if((0,l.A)(e))return null;let t=this.filterDraftAttachmentUnfurls();return(0,l.A)(t)?null:n.createElement("div",{className:"p-composer_attachments__separator"})}render(){let{shouldRenderDraftAttachmentUnfurls:e,shouldRenderDraftContactUnfurls:t,shouldRenderCanvasUnfurls:a}=this.props;return e||t||a?n.createElement(n.Fragment,null,this.renderDraftAttachments(),this.renderSeparator(),this.renderDraftContacts()):this.renderDraftAttachments()}};function mapStateToProps(e,t){let{draftId:a,windowId:n,isEditComposer:r}=t,i=(0,T.P)(e);return{draftAttachmentUnfurls:(0,ev.at)(e,a),draftGifUnfurls:(0,eI.Dn)(e,{draftId:a}),draftBlockUnfurls:(0,eC.Iy)(e,{draftId:a}),draftContactUnfurls:(0,N.Di)(e,a),...i&&r&&{hasEditAttachments:(0,M.e6)(e,{windowId:n,ignoreViewContext:!0}),editGifUnfurls:(0,M.mz)(e,{windowId:n,ignoreViewContext:!0}),editAttachmentUnfurls:(0,M.Rh)(e,{windowId:n,ignoreViewContext:!0}),editBlockUnfurls:(0,M.Np)(e,{windowId:n,ignoreViewContext:!0}),editContactUnfurls:(0,M.UL)(e,{windowId:n,ignoreViewContext:!0})},shouldRenderDraftAttachmentUnfurls:(0,y.c2)(e,{draftId:a,windowId:n,isEditComposer:r}),shouldRenderDraftContactUnfurls:shouldRenderDraftContactUnfurls(e,{draftId:a,windowId:n,isEditComposer:r}),shouldRenderCanvasUnfurls:(0,y.L)(e,{draftId:a,windowId:n,isEditComposer:r}),experimentComposerAuthGroupTreatment:"treatment"===(0,E._Z)(e,"composer_auth"),experimentEditAttachmentsPhase2GroupOn:i,shouldSuppressChampionDMUnFurls:(0,ew.JG)(e,{getSiblingView:t.getSiblingView}),prefGifPickerEnabled:(0,eI.BH)(e),experimentSlackforceListUnfurlsGroupOn:(0,m.mI)(e),experimentSlackbotAiSkillsGroupOn:(0,ea.vP)(e)}}function mapDispatchToProps(e,t){let{draftId:a}=t;return{markDraftUnfurlAsRemoved:t=>{a&&t&&e((0,eS.m)({draftId:a,url:t}))}}}eT.displayName="DraftUnfurls";let eN=(0,eg.A)((0,ek.N)(mapStateToProps,mapDispatchToProps,null,{areStatePropsEqual:p.rM})(eT)),eM="noFileAccess",eR=new f.Ay("files");function FileThumbnailException({iconType:e,className:t}){if(e===eM){let a=eR.t("You don\u2019t have access."),r=n.createElement("div",{className:"bold"},a),l=n.createElement("div",{className:"p-file_thumbnail__container"},n.createElement("div",{className:"p-file_thumbnail__container--svg"},n.createElement($.Ah,{name:"document",size:"20"})),r),o=i()("c-pillow_file",t);return n.createElement("div",{className:o,"data-qa":`file_unfurl_exception_${e}`},l)}return null}FileThumbnailException.displayName="FileThumbnailException";let eP=FileThumbnailException;var eL=a(0xa985ed31),eO=a(0x14ea3ce99);function isCanvasAccessRestricted(e,{draftId:t}={}){if(!t)return!1;let a=(0,ev.at)(e,t);return(a?.filter(y.Bg)||[]).some(t=>{let a=(0,y.CK)(t);if(a&&(0,eL.A)(a)){let t=(0,eO.Lp)(e,a);return(0,ey.sR)(t)||(0,ey.Bp)(t)}return!1})}var eD=a(0x14c22bca),eF=a(0x20f97f5f9),eU=a(0x13dd355af),eB=a(0x45012309),eH=a(0x11c82607b);let eW=(0,eH.Ay)("clog file order updated for message",(e,t,a)=>{let n=t();(0,eB.eo)({state:n}).track(R.EventId.FILE_ORDER_UPDATE,{contexts:{ui_context:{action:R.UiAction.DRAG_AND_DROP,ui_step:a}}})});eW.meta={name:"clogFileOrderUpdate",key:"createThunkClogFileOrderUpdate",description:"clog file order updated for message"};var eV=a(0x1122fa49d),eG=a(0x44875780),eq=a(0x23fb5a202),ej=a(0x1ec68d6a3),ez=a(0x1c2eef3c8),eK=a(0x18f183d32);let e$=(0,eH.Ay)("Re orders the file_ids array in a draft",(e,t,{draftId:a,fileId:n,newIndex:r}={})=>{if(!a||!n||r<0)return;let{error:i,info:s}=(0,ej.Ay)({getState:t,label:"DRAFTS"}),c=`draftId: ${a} || fileId: ${n}`,d=(0,ez.YI)(t(),a);if(!d||(0,l.A)(d))return void i(`Attempting to update a draft that does not exist - ${c}`);let m=(0,eq.A)(d)||[],u=m.indexOf(n);s(`Moving file ${n} from current index ${u} to new index ${r} - ${c}`),(0,o.A)(m,n),m.splice(r,0,n),s(`Reordering the files array, new array: ${[...m]} - ${c}`);let p={...d,file_ids:[...m]};e((0,eK.i)({draft:p,reason:"addFileIdToDraft",syncImmediately:!0,skipEqualityCheck:!0}))});e$.meta={name:"reorderDraftFileIds",key:"createThunkReorderDraftFileIds",description:"Re orders the file_ids array in a draft"};var eY=a(0xecade3b6),eQ=a(0x1a8db9161);let eZ=class extends n.Component{onRemoveDraftFile=({pendingFileId:e,persistedFileId:t,uploadTeamId:a,isExternal:n}={})=>{let{dispatch:r,draftId:i}=this.props;r&&(r((0,eV.I)(R.UiStep.PRE_SEND)),r((0,eG.O)({draftId:i,pendingFileId:e,persistedFileId:t,shouldUpdateDraft:!0,uploadTeamId:a,isExternal:n})))};onReorderDraftFiles=({fileId:e,newIndex:t}={})=>{let{dispatch:a,draftId:n}=this.props;a&&(a(eW(R.UiStep.PRE_SEND)),a(e$({draftId:n,fileId:e,newIndex:t||0})))};onRemoveEditFile=({pendingFileId:e,persistedFileId:t,uploadTeamId:a,isExternal:n}={})=>{let{channelId:r,dispatch:i,filesToSave:o=[],ts:s,windowId:c}=this.props;if(!i||(i((0,eV.I)(R.UiStep.EDIT_MESSAGE)),e&&i((0,eQ.GJ)({pendingFileId:e,uploadTeamId:a,isExternal:n,channelId:r,ts:s})),!t||(0,l.A)(o)))return;let d=o.filter(e=>e.id!==t).map(e=>e.id);i((0,eY.KK)({fileIds:d,windowId:c}))};onReorderEditFiles=({fileId:e,newIndex:t=0}={})=>{let{dispatch:a,filesToSave:n=[],windowId:r}=this.props;if(!e||t<0||(0,l.A)(n))return;let i=n.findIndex(t=>t.id===e),s=[...n],c=s[i];(0,o.A)(s,c),s.splice(t,0,c);let d=s.map(e=>e.id);a&&(a(eW(R.UiStep.EDIT_MESSAGE)),a((0,eY.KK)({fileIds:d,windowId:r})))};renderFiles(){let{draftFiles:e,draftId:t,focusInput:a,channelId:r,isEditComposer:i=!1,experimentEditAttachmentsGroupOn:o,editComposerFiles:d=[],fileIdsFromEditMessageLinkText:m}=this.props;if(i&&(!o||(0,l.A)(d))||!i&&(0,l.A)(e))return null;let u=d.filter(e=>!m?.has(e.file?.id)),p=i?u:e;if((0,l.A)(p))return null;let h=i?this.onRemoveEditFile:this.onRemoveDraftFile,_=i?this.onReorderEditFiles:this.onReorderDraftFiles,[f,b]=(0,s.A)(p,e=>(0,ey._y)(e.file)),g=f.length>0,y=b.length>0,A=g&&y&&this.renderSeparator(),x=i?"other-attached-files":void 0;return n.createElement(n.Fragment,null,g&&n.createElement(eF.A,{dataQa:i?"attached-videos":void 0,hasPreviewNavigation:!0,composerFiles:f,onRemoveFile:h||c.A,showAddFile:!1,draftId:t,renderGalleryScroller:!1,focusInput:a||c.A,onReorderFiles:_||c.A,shouldReorderVideoFiles:!0,isEditComposer:i}),A,y&&n.createElement(eF.A,{dataQa:x,hasPreviewNavigation:!0,composerFiles:b,onRemoveFile:h||c.A,showAddFile:!1,draftId:t,renderGalleryScroller:!1,focusInput:a||c.A,onReorderFiles:_||c.A,channelId:r,shouldReorderVideoFiles:!0,isEditComposer:i}))}renderUnfurls(){let{draftId:e,channelId:t,shouldRenderDraftUnfurls:a,shouldRenderDraftContactUnfurls:r,shouldRenderCanvasUnfurls:i,onUnfurlRemoved:l,onFilePermissionSelect:o,draftGifUnfurls:s,draftBlockUnfurls:d,experimentSlackforceListUnfurlsGroupOn:m,onlySalesforceListViewUnfurls:u,experimentEditAttachmentsPhase2GroupOn:p,isEditComposer:h=!1,unfurlFileIdsToHide:_}=this.props;if(!p&&h||!m&&u||!a&&!r&&!i&&!s?.length&&!d?.length)return null;let f=h?eU.y:e||"";return n.createElement(eN,{dataQa:h?"edit-unfurls":"composer-unfurls",isEditComposer:h,draftId:f,channelId:t,onUnfurlRemoved:l||c.A,onFilePermissionSelect:o||c.A,unfurlFileIdsToHide:_})}renderSeparator(){return n.createElement("div",{className:"p-composer_attachments__separator"})}renderUnfurlsRoadblock(){let{foundRestrictedSpaceFile:e}=this.props;return e?n.createElement("div",{className:"p-draft_unfurls"},n.createElement(eP,{iconType:eM})):null}render(){let{experimentEditAttachmentsGroupOn:e,isEditComposer:t=!1,className:a,dataQa:r}=this.props,l=this.renderFiles(),o=this.renderUnfurls(),s=!(e&&t)&&this.renderUnfurlsRoadblock();if(!l&&!o)return null;let c=i()("p-message_input__attachments","c-wysiwyg_container__attachments",a);return n.createElement("div",{"data-qa":r,className:c},n.createElement(d.A,{disableHeight:!0},({width:e})=>n.createElement(eD.A,{width:e,pageSize:250},l,l&&o&&this.renderSeparator(),s,o)))}};eZ.displayName="ComposerAttachments";let eJ=(0,ek.N)((e,{draftId:t,viewContext:a,channelId:n,ts:r,windowId:i,isEditComposer:l=!1})=>{let o=(0,M.km)(e,{viewContext:a,channelId:n,ts:r,windowId:i}),s=o?.map(t=>(0,eO.Lp)(e,t,!0));return{foundRestrictedSpaceFile:isCanvasAccessRestricted(e,{draftId:t}),shouldRenderDraftUnfurls:(0,y.c2)(e,{draftId:t,windowId:i,isEditComposer:l}),shouldRenderDraftContactUnfurls:shouldRenderDraftContactUnfurls(e,{draftId:t,windowId:i,isEditComposer:l}),shouldRenderCanvasUnfurls:(0,y.L)(e,{draftId:t,windowId:i,isEditComposer:l}),draftGifUnfurls:(0,eI.Dn)(e,{draftId:t}),draftBlockUnfurls:(0,eC.Iy)(e,{draftId:t}),experimentSlackforceListUnfurlsGroupOn:(0,m.mI)(e),onlySalesforceListViewUnfurls:(0,y.YU)(e,{draftId:t}),experimentEditAttachmentsGroupOn:(0,T.u)(e),experimentEditAttachmentsPhase2GroupOn:(0,T.P)(e),filesToSave:s}})(eZ)},0x133ed5198:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x929229c1),l=a(0x209fb16e4),o=a(0x1b9d5cc0c),s=a(0x16ed1b0dc),c=a(0x226892387),d=a(0x217553e42);let m=new r.Ay("drafts");function ComposerDestinationSelectOption({entity:e,id:t,isEmail:a,isActive:r,isDisabled:u,matchData:p,tooltipPosition:h}){let _,f,b=(0,c.d4)(e=>(0,d.OL)(e,t)),g=(0,c.d4)(d.MS);return a?n.createElement("span",{className:"p-composer_page__destination_select_email_suggestion"},t):((0,o.NB)(e)&&u&&(_=m.t("From another organization")),(0,s.A)(t)&&b&&(f=(0,l.i)(g,b)),n.createElement(i.A,{model:e,isActive:r,isDisabled:u,secondaryContent:_,matchData:p,showTeamForLocalChannel:f,tooltipPosition:h}))}ComposerDestinationSelectOption.displayName="ComposerDestinationSelectOption";let u=ComposerDestinationSelectOption},0xba9d1cf3:(e,t,a)=>{"use strict";a.d(t,{Q:()=>y});var n=a(0x839ba347),r=a(0x1673f3229),i=a(0xe874a88a),l=a(0x243435af9),o=a(0x1ec69ee01),s=a(0x12185e091),c=a(0x280afe13),d=a(0x1ec68d6a3),m=a(0x16ed1b0dc),u=a(0x4f725d55),p=a(0x1cf0d97e1),h=a(0x11c82607b),_=a(0x20c81ddcb),f=a(0x19c76d181),b=a(0x217553e42);let g=(0,p.Ay)((e,{ids:t}={})=>{let a=(0,f.WR)(e),i=[],p=[],h=(0,l.mr)(e);return(0,n.A)(t,t=>{let n=(0,_.Bk)(e,t,!1);if(h&&n){let a=(0,b.o2)(e,t);a&&i.push(a)}else if((0,m.A)(t)){let n=(0,b.OL)(e,t);if((0,s.yz)(n)){let e=(0,o.Ug)(n)||[],t=(0,r.A)(e,a);p.push(...t)}else if((0,s.LI)(n)){let e=(0,c.e)(n)||"";p.push(e)}else i.push(t)}else(0,u.A)(t)?p.push(t):(0,d.Ay)({state:e}).warn("COMPOSER",`Unhandled selected id "${t}"`)}),i.length&&i.splice(0,i.length-1),{channelIds:i,memberIds:p}});g.meta={name:"categorizeDestinationIds",key:"createSelectorCategorizeDestinationIds",description:(e,{ids:t}={})=>{let a=(0,f.WR)(e),i=[],p=[],h=(0,l.mr)(e);return(0,n.A)(t,t=>{let n=(0,_.Bk)(e,t,!1);if(h&&n){let a=(0,b.o2)(e,t);a&&i.push(a)}else if((0,m.A)(t)){let n=(0,b.OL)(e,t);if((0,s.yz)(n)){let e=(0,o.Ug)(n)||[],t=(0,r.A)(e,a);p.push(...t)}else if((0,s.LI)(n)){let e=(0,c.e)(n)||"";p.push(e)}else i.push(t)}else(0,u.A)(t)?p.push(t):(0,d.Ay)({state:e}).warn("COMPOSER",`Unhandled selected id "${t}"`)}),i.length&&i.splice(0,i.length-1),{channelIds:i,memberIds:p}}};let y=(0,h.Ay)("Split destination ids into channels and members",(e,t,{ids:a}={})=>{let n=g(t(),{ids:a});return i.S.resolve(n)});y.meta={name:"categorizeDestinationIdsThunk",key:"createThunkCategorizeDestinationIdsThunk",description:"Split destination ids into channels and members"}},0xb3026e7a:(e,t,a)=>{"use strict";a.d(t,{A:()=>getContextChannelId});var n=a(0x21f3c49e8),r=a(0x1673f3229),i=a(0xa794f9e1),l=a(0x20f6d0fd1),o=a(0x19c76d181),s=a(0x217553e42),c=a(0x168f7af82);function getContextChannelId(e,t){if(!(0,l.A)(e,{draft:t}))return null;let a=(0,i.ue)(t),d=(0,c.CO)(e,{draftId:a});if(!(0,n.A)(d))return null;let m=(0,i.zl)(t),u=(0,i.KL)(t);if(!(0,n.A)(m)&&!(0,n.A)(u))return null;if(1===m.length)return m[0];if((0,n.A)(u))return null;if(1===u.length)return(0,s.o2)(e,u[0])||null;let p=(0,o.WR)(e),h=(0,r.A)(u,p);if(1===h.length)return(0,s.o2)(e,h[0])||null;let _=[...h,p],f=(0,s.FB)(e,_);return f?f.id:null}},0x102ec9df5:(e,t,a)=>{"use strict";a.d(t,{A:()=>isEmptyOps});var n=a(0x21f3c49e8),r=a(0x2398accc);function isEmptyOps(e){return!!((0,n.A)(e)||1===e.length&&(0,r.A)(e[0])&&`
`===e[0].insert&&(0,n.A)(e[0].attributes))}},0xe639be51:(e,t,a)=>{"use strict";a.d(t,{A:()=>j});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1feee1711),o=a(0x2416351a6),s=a(0x5a37951),c=a(0x9e671ad),d=a(0x1aba66b56),m=a(0x1cbdfeceb),u=a(0xb97b797e),p=a(0x62a17882),h=a(0x15279822),_=a(0x224f7f0e9),f=a(0xf3c40abe),b=a(0x344bb842),g=a(0x2501a2cee),y=a(0x4c96e5d9),A=a(0x16a140c5a),x=a(0x20ef3966f),E=a(0x20482ad21),C=a(0x11a296110),k=a(0x99233ecb),v=a(0x1a3c2e1af),S=a(0x1d8af55dd),I=a(0x1ae6bd21);let w="above_fs";var T=a(0x72f2d939),N=a(0x22d51fee8),M=a(0x3711e82d),R=a(0x226892387);let P=new E.Ay("canvas-ai"),ComposerCanvasAiMenuTrigger=({menuItems:e,format:t,label:a,tooltipDelay:r,onItemClick:l,onMenuClose:o=m.A,buttonClassNames:s,menuClassNames:c,isSticky:d=!1,position:u="bottom-left",iconSize:h,tooltipOverride:_,disabled:f,inNarrowView:b})=>{let E=(0,R.d4)(N.c9),{shouldShowCanvasAiNux:L}=(0,S.A)(),[O,D]=(0,n.useState)(!1),F=(0,x.A)(e,e=>({value:e,label:(0,T.A)(e,{experimentCanvasAiInlineCreationGroupOn:E}),iconSize:h})),U=(0,n.useCallback)((e,t,a)=>n.createElement(k.Ay,{menuClassNames:i()(c,"p-composer-canvas-ai-submenu"),...a},t.map(t=>{let a=(0,A.pg)(t,E);return n.createElement(k.Dr,{label:a,key:`menu-item-${t}`,className:i()(`p-composer-menu-trigger-button p-composer__button${d?"__sticky":"__floating"}`,s),onSelected:()=>l(e,{source:M.MsgFormattingInputSource.TOOLBAR,submenuContext:t})})})),[s,E,d,c,l]),B=(0,n.useMemo)(()=>F.map((e,t)=>{if(!(0,A.Jn)(e.value))return null;if(e.value===A.Wg)return n.createElement(k.bX,{key:`menu-insert-divider-${t}`});if(e.value===A.I1)return n.createElement(k.c$,{label:P.t("Quick edits"),key:`menu-insert-header-${t}`});if(e.value===A.s3)return n.createElement(k.c$,{label:P.t("Based on this content"),key:`menu-insert-divider-${t}`});let a=(0,A.h$)(e.value);if(a)return n.createElement(v.A,{key:`canvas-ai-submenu-${e.value}`,label:e.label,renderSubmenu:t=>U(e.value,a,t)});let r=(0,A.nH)(e.value),o=r?.name?n.createElement(g.Ah,{...r,inline:!0,size:h}):void 0;return n.createElement(k.Dr,{label:e.label,key:`menu-item-${e.value}`,className:i()(`p-composer-menu-trigger-button p-composer__button${d?"__sticky":"__floating"}`,s),icon:o,onSelected:()=>l(e.value,{source:M.MsgFormattingInputSource.TOOLBAR})})}),[s,h,d,F,l,U]),H=(0,n.useCallback)(e=>(D(!0),n.createElement(k.Ay,{...e,menuClassNames:c,"data-qa":"p-composer-menu","aria-label":E?P.t("Use Slack AI"):""},B)),[c,E,B]),W=(0,n.useCallback)(()=>{D(!1),o()},[o]),V=n.createElement(k.cQ,{width:248,position:u,offsetX:-12,offsetY:-4,renderMenu:H,onTriggerClose:W,onPopoverClose:W,isDisabled:f,shouldReturnFocusAfterClose:!1},n.createElement(C.Ay,{"aria-label":E?P.t("Slack AI"):"",key:"canvas_ai_formatting_toolbar_button",className:i()("p-composer__menu-trigger",s,{"c-menu_ai_item--disabled":!!f,"c-menu_ai_item--no-label":b}),disabled:f},n.createElement("div",{className:i()("c-menu_item__icon",{"c-menu_ai_item__icon--disabled":!!f,"c-menu_ai_item__icon":L})},n.createElement(g.Ah,{name:"ai-sparkle-filled"})),!b&&n.createElement("span",{className:i()("c-composer__canvas_ai_action_text")},(0,T.A)("canvas-ai",{experimentCanvasAiInlineCreationGroupOn:E})),n.createElement("div",{className:"c-menu_item__icon"},n.createElement(g.Ah,{name:"caret-down"}))));return n.createElement(n.Fragment,null,n.createElement(y.Ay,{tip:O||!b?null:_||n.createElement(I.A,{format:t,isMac:(0,p.cX)(),label:a}),position:"top",key:`format_${t}_tip`,delay:r,offsetY:-7,zIndex:w},n.createElement("div",null,V)),n.createElement("span",{className:"p-composer__separator",key:"separator_0_1"}))};ComposerCanvasAiMenuTrigger.displayName="ComposerCanvasAiMenuTrigger";let L=n.memo(ComposerCanvasAiMenuTrigger);var O=a(0xbe5e39b6),D=a(0x178788799),F=a(0x133aaa7da);function getDerivedFormatSvgIcon(e,t){return"blockquote"===e||"blockquote-layout"===e?{name:"quote"}:"ordered-list"===e?{name:"numbered-list"}:"bullet-list"===e?{name:"bulleted-list"}:"strike"===e?{name:"strikethrough"}:"h1"===e?{name:"heading-1"}:"h2"===e?{name:"heading-2"}:"h3"===e?{name:"heading-3"}:"check-list"===e?{name:"checkbox"}:"overflow"===e?{name:"ellipsis-horizontal-filled"}:"start-thread"===e||"open-thread"===e?t?{name:"threads-filled"}:{name:"add-comment"}:"open-reaction"===e?{name:"reaction-filled"}:"start-assistant-thread"===e?{name:"magic-wand"}:"insert-variable"===e||"variable-limit-reached"===e?{name:"css"}:"share"===e||"channel-canvas-share"===e?{name:"share-message"}:"view-full-screen"===e?{name:"window-expand"}:"view-in-slack"===e?{name:"channel-arrow-right"}:"open-in-detached-window"===e?{name:"open-in-window"}:"open-in-new-window"===e?{name:"new-window"}:"slackhorizontalrule"===e?{name:"divider"}:{name:e}}var U=a(0x14149c126);let B=new E.Ay("quip-floating-formatting-toolbar"),H=(0,n.memo)(({menuItems:e,activeFormats:t,buttonClassNames:a,menuClassNames:r,iconSize:l,tooltipDelay:o,onItemClick:s,onMenuClose:c,position:d=O.yX.BottomLeft})=>{let m=(0,R.d4)(e=>"on"===(0,U._Z)(e,"canvas_underline")),u=(0,n.useMemo)(()=>(0,x.A)(e,e=>({value:e,label:(0,T.A)(e),checked:t?.includes(e),icon:n.createElement(g.Ah,{name:getDerivedFormatSvgIcon(e).name,inline:!0,size:l}),onSelected:()=>s?.(e,{source:M.MsgFormattingInputSource.TOOLBAR})})),[e,t,l,s]).map(e=>n.createElement(k.Dr,{className:i()("p-composer-menu-trigger-button",a),type:F.A.radio,label:e.label,key:`menu-item-${e.value}`,checked:e.checked,icon:e.icon,onSelected:e.onSelected})),p=(0,n.useCallback)(e=>n.createElement(D.Ay,{...e,menuClassNames:r,"data-qa":"p-composer-menu","aria-label":m?B.t("Text emphasis formatting options"):""},u),[u,r,m]);return n.createElement(y.Ay,{tip:m?B.t("Formatting"):"",position:"top",key:"formatting-tip",delay:o,offsetY:-7,zIndex:w},n.createElement("div",null,n.createElement(k.cQ,{renderMenu:p,width:248,position:d,offsetX:-12,offsetY:-4,onTriggerClose:c,onPopoverClose:c},n.createElement(C.Ay,{className:i()("p-composer__menu-trigger",a),"aria-label":m?B.t("Text emphasis formatting options"):"",key:"canvas_text_emphasis_formatting_toolbar_button"},n.createElement("div",{className:"c-menu_item__icon"},n.createElement(g.Ah,{name:"formatting"})),n.createElement("div",{className:"c-menu_item__icon"},n.createElement(g.Ah,{name:"caret-down"}))))))}),W=new E.Ay("slack-docs"),IconForFormat=({format:e,inline:t=!1,size:a})=>{let{name:r}=getDerivedFormatSvgIcon(e);return n.createElement(g.Ah,{name:r,inline:t,size:a})};IconForFormat.displayName="IconForFormat";let ComposerMenuTrigger=({menuItems:e,activeFormats:t,onItemClick:a,onMenuClose:r=m.A,buttonClassNames:l,menuClassNames:o,isSticky:s=!1,position:c="bottom-left",iconSize:d})=>{let u=(0,x.A)(e,e=>({value:e,label:(0,T.A)(e),type:"option-list-divider"===e?"divider":void 0,iconSize:d})),p=u.find(({value:e})=>t&&t.includes(e)),h=p?.value||"paragraph",_=u.map((e,t)=>{if("divider"===e.type)return n.createElement(k.bX,{key:`menu-insert-divider-${t}`});let r={format:e.value,inline:!0,size:d};return n.createElement(k.Dr,{label:e.label,key:`menu-item-${e.value}`,className:i()(`p-composer-menu-trigger-button p-composer__button${s?"__sticky":"__floating"}`,l),icon:n.createElement(IconForFormat,r),type:F.A.radio,checked:e.value===h,onSelected:()=>a(e.value,{source:M.MsgFormattingInputSource.TOOLBAR})})}),f=(0,n.useCallback)(e=>n.createElement(k.Ay,{...e,menuClassNames:o,"data-qa":"p-composer-menu","aria-label":W.t("Formatting options")},_),[_,o]);return n.createElement(k.cQ,{width:248,position:c,offsetX:-12,offsetY:-4,renderMenu:f,onTriggerClose:r,onPopoverClose:r},n.createElement(b.A,{"aria-label":p?.label.toString()||h,key:`format_${h}_button`,className:i()("p-composer__menu-trigger",l),"data-format":h,"data-qa":`${h}-composer-button`},n.createElement(IconForFormat,{format:h}),n.createElement("div",{className:"c-menu_item__icon"},n.createElement(g.Ah,{name:"caret-down"}))))};ComposerMenuTrigger.displayName="ComposerMenuTrigger";let V=n.memo(ComposerMenuTrigger),onKeyDown=e=>{let{key:t,currentTarget:a,target:n}=e,r=Array.from(a.querySelectorAll('[role="menuitemcheckbox"]')),i=["ArrowLeft","ArrowUp"];if(!i.concat(["ArrowRight","ArrowDown"]).includes(t))return;if(e.stopPropagation(),n===a)return void r[0].focus();let l=r.indexOf(n),o=r[i.includes(t)?l-1:l+1];o&&o.focus()},OverflowMenu=({width:e,composerRect:t,overflowButtonRect:a,children:r,focusOnMount:l,isAiRewriteButtonPresent:o,className:s})=>{let c=(0,n.useRef)();(0,n.useEffect)(()=>{l&&c.current?.focus()});let d=n.Children.count(r),m=a.right-(33*d+8)-t.left,u=t.left+e-a.right,p={right:`${m<0?u+m-10+30*!!o:u}px`},h=i()(s,"p-composer__body","p-composer__body--visible","p-composer__body--overflow");return n.createElement("div",{className:h,role:"menu",tabIndex:-1,ref:c,style:p,onKeyDown:onKeyDown},r)};function getReducedButtonGroups({buttonGroups:e,numberToKeep:t}){let a=0,n=[];if(t<=0)return[["overflow"]];for(let r=0;r<e.length;r++){let i=[];n.push(i);for(let l=0;l<e[r].length;l++){let o=e[r][l];if(i.push(o),(a+=1)===t)return n.push(["overflow"]),n}}return n}function getReducedButtonGroupsFromEnd({buttonGroups:e,numberToKeep:t}){let a=0,n=[];if(t<=0)return[];for(let r=e.length-1;r>=0;r--){let i=[];n.unshift(i);for(let l=e[r].length-1;l>=0;l--){let o=e[r][l];if(i.unshift(o),(a+=1)===t)return n}}return n}OverflowMenu.displayName="OverflowMenu";var G=a(0x1c91944c9);let q=class extends n.PureComponent{animationTimer;firstButtonFormatRef;composerRef;focusFormattingButtonOnUpdate;moveFocusToOverflowMenu;constructor(e){super(e),this.state={visible:!!e.isSticky},(0,u.v)(this,["buildComposer","renderButton","onButtonClick","onKeyDown","onButtonKeyDown","focus","trapFocusToComposer","tabComposer"]),this.animationTimer=null,this.firstButtonFormatRef=n.createRef(),this.composerRef=n.createRef()}componentDidMount(){this.animationTimer=window.setTimeout(()=>{this.setState(()=>({visible:!0})),this.animationTimer=null},225)}componentDidUpdate(){this.focusFormattingButtonOnUpdate&&(this.composerRef.current.querySelector('[data-format="overflow"]').focus(),this.focusFormattingButtonOnUpdate=!1)}componentWillUnmount(){this.composerRef.current.removeEventListener("keydown",this.tabComposer),this.animationTimer&&clearTimeout(this.animationTimer)}onButtonClick(e){let{activeFormats:t}=this.props,a=e.currentTarget.getAttribute("data-format");this.props.onFormatButtonClick&&this.props.onFormatButtonClick(a,{source:M.MsgFormattingInputSource.TOOLBAR,activeFormat:t?.includes(a)})}onKeyDown(e){if(e?.keyCode!==_._f)return;let{onEscape:t,overflowVisible:a}=this.props;t&&t(e),a&&(this.focusFormattingButtonOnUpdate=!0)}onButtonKeyDown(e){let t=(0,p.cX)()?e.metaKey:e.ctrlKey,a=e.currentTarget.getAttribute("data-format");if(e.keyCode===_.I6||e.keyCode===_.Fm){if("overflow"===a){this.moveFocusToOverflowMenu=!0,this.onButtonClick(e);return}this.onButtonClick(e),e.preventDefault(),this.getOverflowButtonsBasedOnWidth(this.props.buttons??[]).flat().includes(a??"")?this.focusFormattingButtonOnUpdate=!0:e.currentTarget.focus()}this.state.visible&&document.activeElement?.parentElement===this.composerRef.current&&(66===e.keyCode&&t&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.BOLD,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="bold"]').focus(),e.preventDefault()),73===e.keyCode&&t&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.ITALIC,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="italic"]').focus(),e.preventDefault()),85===e.keyCode&&t&&!e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.UNDERLINE,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="underline"]').focus(),e.preventDefault()),88===e.keyCode&&t&&e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.STRIKE,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="strike"]').focus(),e.preventDefault()),67===e.keyCode&&t&&e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.CODE,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="code"]').focus(),e.preventDefault()),85===e.keyCode&&t&&e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.LINK,{source:M.MsgFormattingInputSource.KEYBOARD}),e.preventDefault()),55===e.keyCode&&t&&e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.ORDERED_LIST,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="ordered-list"]').focus(),e.preventDefault()),56===e.keyCode&&t&&e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.BULLET_LIST,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="bullet-list"]').focus(),e.preventDefault()),57===e.keyCode&&t&&e.shiftKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.BLOCKQUOTE,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="blockquote"]').focus(),e.preventDefault()),67===e.keyCode&&t&&e.shiftKey&&e.altKey&&(this.props.onFormatButtonClick&&this.props.onFormatButtonClick(A.v_.CODE_BLOCK,{source:M.MsgFormattingInputSource.KEYBOARD}),this.composerRef.current.querySelector('[data-format="code-block"]').focus(),e.preventDefault()))}getAvailableButtonSlots(){let e,{width:t}=this.props;return Math.floor(((t||0)-35*(e||0))/36)}getButtonsBasedOnWidth(e){let{isSticky:t,width:a}=this.props;if(!t||(0,l.A)(a)||(0,o.A)(a))return e;let n=(0,s.A)(e),r=this.getAvailableButtonSlots();return r>=n.length?e:getReducedButtonGroups({buttonGroups:e,numberToKeep:r-1})}getOverflowButtonsBasedOnWidth(e){let t=(0,s.A)(e),a=this.getButtonsBasedOnWidth(e);return(0,c.A)(e,a)?[]:getReducedButtonGroupsFromEnd({buttonGroups:e,numberToKeep:t.length-((0,s.A)(a).length-1)})}buildComposer(e,t){if(!e)return null;let{isSticky:a}=this.props,r=this.getButtonsBasedOnWidth(e),i=[];for(let e=0,l=r.length;e<l;e++){let o,s=r[e];for(let c=0,d=s.length;c<d;c++)i.push(this.renderButton(s[c],{role:t?.buttonsRole??"button",isSticky:!!a,prevFormat:o,nextFormat:s[c+1],firstFormat:r[0][0]})),o=s[c],0!==c&&c===d-1&&e!==l-1&&i.push(n.createElement("span",{className:"p-composer__separator",key:`separator_${e}_${c}`}))}return i}focus(){let{visible:e}=this.state;e&&(this.firstButtonFormatRef.current.focus(),this.trapFocusToComposer())}shouldAdjoinToFormat(e){let{activeFormats:t}=this.props;return!!((0,d.A)(t,"border")&&((0,d.A)(t,"bullet-list")||(0,d.A)(t,"ordered-list")))||e&&(0,d.A)(this.props.activeFormats,e)&&!this.shouldDisableButton(e)}shouldDisableButton(e){let{activeFormats:t,disabledFormats:a,isDisabled:n}=this.props;return!!(n||a?.has(e)||(0,d.A)(t,"code-block")&&!["ordered-list","bullet-list","check-list","blockquote","code-block","overflow","start-thread","add-reaction","open-reaction","open-thread"].includes(e)||"bold"===e&&((0,d.A)(t,"h1")||(0,d.A)(t,"h2")||(0,d.A)(t,"h3")))}tabComposer(e){let t=(0,h.Fp)(this.composerRef.current),a=(0,h.LQ)(this.composerRef.current);e.keyCode===_.wn&&(e.shiftKey?document.activeElement===t&&(a?.focus(),e.preventDefault()):document.activeElement===a&&(t?.focus(),e.preventDefault()))}trapFocusToComposer(){this.composerRef.current.addEventListener("keydown",this.tabComposer)}renderButton(e,{isSticky:t,prevFormat:a,nextFormat:r,firstFormat:l,role:o}={role:"button"}){let s,c,{activeFormats:u,tooltipOverrides:h,overflowVisible:_,textyHasFocus:f,menuItems:x,canvasAiMenuItems:E,canvasTextEmphasisMenuItems:C,onFormatButtonClick:k,onClosePopovers:v,selectIconSize:S,buttonTagData:N,menuClassNames:M,experimentCanvasAiInlineCreationGroupOn:R,menuPosition:P,collapseAiButton:O}=this.props,D=this.shouldDisableButton(e),F=h?.get(e),U=(0,d.A)(u,e)||"overflow"===e&&_||"blockquote"===e&&(0,d.A)(u,"border"),B=i()("p-composer__button","p-composer__button--composer_ia","p-composer__selection_button",{"p-composer__button--floating":!t,"p-composer__button--sticky":t,"p-composer__button--no_pointer_events":t&&!f,"p-composer__button--adjoin-left":this.shouldAdjoinToFormat(a),"p-composer__button--adjoin-right":this.shouldAdjoinToFormat(r),"p-composer__button--disabled":D}),W=500*!!t,G=(0,T.A)(e,{experimentCanvasAiInlineCreationGroupOn:R}),q="menu"===e,j=e===A.jY.AI_REFINE,z="text-emphasis-menu"===e,K=["start-thread","open-thread","open-reaction","start-reaction"].includes(e),$=l===e;if(q)return n.createElement(V,{key:"format_menu_button",buttonClassNames:B,menuClassNames:M,menuItems:x,activeFormats:u,onMenuClose:v||m.A,onItemClick:k||m.A,isSticky:!!t,iconSize:S,position:P});if(z)return n.createElement(H,{key:"canvas-text-emphasis_menu_button",menuItems:C,activeFormats:u,buttonClassNames:B,menuClassNames:M,iconSize:S,position:P,tooltipDelay:W,onMenuClose:v||m.A,onItemClick:k||m.A});if(j)return n.createElement(L,{format:e,label:G,tooltipDelay:W,key:"canvas_ai_menu_button",tooltipOverride:F,buttonClassNames:B,disabled:this.shouldDisableButton(e),menuClassNames:M,menuItems:E,onMenuClose:v||m.A,onItemClick:k||m.A,isSticky:!!t,iconSize:S,position:P,inNarrowView:O});let Y="button"!==o||K?void 0:U&&!D,Q=N&&N.get(e),Z=Q?`, ${Q}`:"";K&&(s=Q)&&(c=s>9?"9+":`${s}`);let J=n.createElement(b.A,{role:o,tabIndex:$&&f?0:-1,className:i()(B,{"p-composer__selection_comment":c}),key:`format_${e}_button`,"aria-label":`${G}${Z}`,onClick:this.onButtonClick,onKeyDown:this.onButtonKeyDown,"data-format":e,"aria-disabled":D,"aria-pressed":Y,"aria-checked":"menuitemcheckbox"===o?U:void 0,ref:l===e?this.firstButtonFormatRef:null,size:"small","data-qa":`${e}-composer-button`},n.createElement(g.Ah,getDerivedFormatSvgIcon(e,Q)),c?n.createElement("span",{className:i()("p-composer__selection_comment_text",{"p-composer__selection_comment_nux":!s})},c):void 0);return D&&!F||"overflow"===e&&_?J:n.createElement(y.Ay,{tip:F||n.createElement(I.A,{format:e,isMac:(0,p.cX)(),label:G}),position:"top",key:`format_${e}_tip`,delay:W,offsetY:-7,zIndex:w},J)}renderOverflow(){let{isSticky:e,width:t,buttons:a,menuClassNames:r,overflowMenuItems:i}=this.props;if((0,l.A)(t)||(0,o.A)(t)||!e&&!i)return null;let s=i?[i]:this.getOverflowButtonsBasedOnWidth(a??[]);if(!s.length)return null;let c=this.composerRef?.current?.querySelector('[data-format="overflow"]'),d=!!this.composerRef?.current?.querySelector('[data-format="ai-actions"]');if(!c)return null;let m=this.composerRef?.current?.getBoundingClientRect(),u=c.getBoundingClientRect(),p=this.buildComposer(s,{buttonsRole:"menuitemcheckbox",isOverflow:!0}),h=this.moveFocusToOverflowMenu;return this.moveFocusToOverflowMenu=!1,n.createElement(OverflowMenu,{width:t,composerRect:m,overflowButtonRect:u,focusOnMount:!!h,isAiRewriteButtonPresent:d,className:r},p)}render(){let{buttons:e,isSticky:t,overflowVisible:a}=this.props,r=i()("p-composer__body",{"p-composer__body--visible":this.state.visible,"p-composer__body--floating":!t,"p-composer__body--unstyled":t});return e?n.createElement("div",{className:r,ref:this.composerRef,onKeyDown:this.onKeyDown},this.buildComposer(e),a&&this.renderOverflow()):null}};q.displayName="Composer";let j=(0,G.N)(e=>({experimentCanvasAiInlineCreationGroupOn:(0,N.c9)(e)}))((0,f.A)(q))},0x1ae6bd21:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(0xbad225b5),r=a(0x22fcfc255),i=a(0x7cdf00a5);function ToolbarButtonTooltip({format:e,label:t,isMac:a}){let l=a?"\u2318":"Ctrl ",o=a?"Option ":"Alt ",s=(0,n.useMemo)(()=>[l,"Shift"],[l]),c=(0,n.useMemo)(()=>[l,o,"Shift"],[l,o]),d=(0,n.useMemo)(()=>[l,o],[l,o]);switch(e){case"bold":return n.createElement(r.A,{title:t,modifier:l,mainKey:"B"});case"italic":return n.createElement(r.A,{title:t,modifier:l,mainKey:"I"});case"underline":return n.createElement(r.A,{title:t,modifier:l,mainKey:"U"});case"strike":return n.createElement(r.A,{title:t,modifiers:s,mainKey:"X"});case"code":return n.createElement(r.A,{title:t,modifiers:s,mainKey:"C"});case"link":return n.createElement(r.A,{title:t,modifiers:s,mainKey:"U"});case"bullet-list":return n.createElement(r.A,{title:t,modifiers:s,mainKey:"8"});case"ordered-list":return n.createElement(r.A,{title:t,modifiers:s,mainKey:"7"});case"blockquote":case"blockquote-layout":return n.createElement(r.A,{title:t,modifiers:s,mainKey:"9"});case"code-block":return n.createElement(r.A,{title:t,modifiers:c,mainKey:"C"});case"start-thread":case"open-thread":return n.createElement(r.A,{title:t,modifiers:d,mainKey:"T"});case"add-reaction":case"open-reaction":return n.createElement(r.A,{title:t,modifiers:d,mainKey:"E"});case i.r.CHECK_LIST_TOGGLE:return n.createElement(r.A,{title:t,modifiers:s,mainKey:"9"});case i.r.FILE:return n.createElement(r.A,{title:t,modifier:l,mainKey:"U"});case i.r.AI_ASSISTANT:return n.createElement(r.A,{title:t,modifiers:d,mainKey:"A"});default:return t}}ToolbarButtonTooltip.displayName="ToolbarButtonTooltip";let l=n.memo(ToolbarButtonTooltip)},0x72f2d939:(e,t,a)=>{"use strict";a.d(t,{A:()=>getToolbarButtonLabel});var n=a(0x20482ad21),r=a(0x16a140c5a);let i=new n.Ay("composer");function getToolbarButtonLabel(e,t={}){let{experimentCanvasAiInlineCreationGroupOn:a}=t;switch(e){case"bold":return i.t("Bold");case"italic":return i.t("Italic");case"underline":return i.t("Underline");case"strike":return i.t("Strikethrough");case"link":return i.t("Link");case"blockquote":case"blockquote-layout":return i.t("Blockquote");case"code":return i.t("Code");case"code-block":return i.t("Code block");case"h1":return i.t("Big heading");case"h2":return i.t("Medium heading");case"h3":return i.t("Small heading");case"bullet-list":return i.t("Bulleted list");case"ordered-list":return i.t("Ordered list");case"check-list":return i.t("Check list");case"paragraph":return i.t("Paragraph");case"overflow":return i.t("More options");case"start-thread":return i.t("Add comment");case"open-thread":return i.t("View comments");case"insert-variable":return i.t("Create variable");case"variable-limit-reached":return i.t("You can only add up to 30 variables per canvas");case"share":return i.t("Share");case"open-in-detached-window":return i.t("Open in new window");case"view-full-screen":return i.t("View in full screen");case"open-in-new-window":return i.t("Open link");case"slackhorizontalrule":return i.t("Divider");case"add-reaction":return i.t("Add reaction");case"open-reaction":return i.t("View reactions");case"callout":return i.t("Callout");case"canvas-ai":return a?i.t("Edit with AI"):e;case r.N2.SUGGEST_EDITS:return a?i.t("Suggest edits"):e;case r.N2.REWRITE:return i.t("Describe your edit");case r.N2.CHAT:return a?i.t("Chat about this"):e;case r.N2.EXPLAIN:return a?i.t("Explain this"):e;case r.N2.PROOFREAD:return a?i.t("Proofread"):e;case r.N2.SIMPLIFY:return a?i.t("Make shorter",{fallbackHash:"965a00d9ba9665ad57ca3edefdcca07a61d3ca95"}):e;case r.N2.ELABORATE:return a?i.t("Make longer",{fallbackHash:"1c1b4990936b3887ffe1dbc845b93dac45a3853f"}):e;case r.N2.CHANGE_TONE:return a?i.t("Change tone"):e;case r.N2.CHANGE_FORMATTING:return a?i.t("Change formatting"):e;case r.N2.TRANSLATE:return a?i.t("Translate"):e;case r.N2.SUMMARIZE:return i.t("Add a summary");case r.N2.ADD_ACTION_ITEMS:return i.t("Add action items");case r.N2.CONVERT_TO_TABLE:return i.t("Convert to table");case r.jY.AI_REFINE:return a?i.t("Refine"):e;default:return e}}},0x205e9cb8:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xd9faf062),l=a(0x1ac8923a3),o=a(0xaf83db61);let ConnectableContactsDMInviteErrorBanner=({isFixedPosition:e,contactId:t,scdmInviteErrorCode:a,onClose:s,topOffset:c="auto"})=>{let d=(0,r.wA)(),m=(0,n.useCallback)(()=>{d((0,o.O7)({errorCode:void 0,contactId:t})),s&&s()},[d,t,s]);return n.createElement(i.Ay,{type:"urgent",topOffset:c,className:"p-connectable_contacts__banner",isFixedPosition:e,showCloseButton:!0,onClose:m},(0,l.S)(a))};ConnectableContactsDMInviteErrorBanner.displayName="ConnectableContactsDMInviteErrorBanner";let s=ConnectableContactsDMInviteErrorBanner},0x12add344a:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x226892387),r=a(0x141589b4d);let __WEBPACK_DEFAULT_EXPORT__=({children:e})=>(0,n.d4)(r.Ib)&&e?e:null},0x1bfab39b1:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x9f7220f0),s=a(0x2501a2cee);let c=new l.Ay("offline_mode");function InlineOfflineIndicator({caption:e,className:t}){return n.createElement("div",{className:i()("p-inline_offline_indicator",t)},n.createElement(o.z,null,n.createElement("span",null,n.createElement(s.Ah,{name:"cloud-offline",size:"inherit",inline:!0})," ",n.createElement("strong",null,c.t("No connection."))," ",e||c.t("Go online to load more messages."))))}InlineOfflineIndicator.displayName="InlineOfflineIndicator";let d=InlineOfflineIndicator},0x1c28e11f7:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x9f7220f0),l=a(0x2501a2cee);let o=new r.Ay("offline_mode");function LargeOfflineIndicator({caption:e}){return n.createElement(i.z,null,n.createElement("div",{className:"p-large_offline_indicator"},n.createElement("p",{className:"p-large_offline_indicator__headline"},n.createElement(l.Ah,{name:"cloud-offline",size:"inherit",inline:!0})," ",o.t("No connection")),n.createElement("p",{className:"p-large_offline_indicator__caption"},e||o.t("Go online to get the latest messages."))))}LargeOfflineIndicator.displayName="LargeOfflineIndicator";let s=LargeOfflineIndicator},0x210b39689:(e,t,a)=>{"use strict";a.d(t,{mf:()=>V,Jp:()=>H,mg:()=>W});var n=a(0x243435af9),r=a(0x1ec69ee01),i=a(0x217553e42);function shouldDisplayAgentListenerBanner(e,t){let a=(0,n.q6)(e),l=(0,i.OL)(e,t.channelId);return!!(a&&l&&(0,r.uy)(l))&&!t.threadTs}var l=a(0xe4cfbb6a),o=a(0x208817cec),s=a(0x11dc1796d);function shouldDisplayDndDMSharedBanner(e,t){return(0,s.v)(e,t)&&(0,o.r)(e,t)}var c=a(0x21f3c49e8),d=a(0x226bb073d);function shouldDisplayDndOverrideBanner(e,t){if(!(0,o.r)(e,t))return!1;let a=(0,d.E5)(e,t.channelId);return!(0,c.A)(a)}var m=a(0x1a115a2e4),u=a(0x14149c126);function shouldDisplayExternalMigrationBanner(e,t){if("on"!==(0,u._Z)(e,"slack_connect_grid_migration_blocker"))return!1;let a=(0,i.OL)(e,t.channelId);if(!a)return!1;let n=(0,m.LS)(e,a),r=(0,m.KE)(e,a);return!!n||!!r}var p=a(0x1f66b5878),h=a(0x1d600678);function shouldDisplayFileRetentionBanner(e,t){if(!t.inputHasFiles)return!1;let a=(0,h.x)(e,"file_retention_type")?(0,h.x)(e,"file_retention_duration"):null,n=(0,p.p$)(e,"allow_box_cfs");return!!a&&!n}var _=a(0x17fee64c3),f=a(0x17f03e906);function shouldDisplayGovslackbannerBanner(e,t){return(0,_.z$)()&&(0,f.c)(e)}var b=a(0x12185e091),g=a(0x209e067d1),y=a(0x21c11a1dc);function shouldDisplayHuddleUserNonVisibleThreadBanner(e,t){if(!(0,g.A)())return!1;let a=(0,i.OL)(e,t.channelId);if((0,b.rW)(a)||!(0,y.cJ)(e,t.channelId||""))return!1;let n=(0,y.wQ)(e,t.channelId);return!!n&&!!(n.length>0)}var A=a(0xb04c4a12),x=a(0x1e3eb45fd);function shouldDisplayHuddlesAiSummaryDisclaimerBanner(e,t){if(!(0,x.Vf)(e)||t.viewContext!==A.Y.THREAD)return!1;let a=(0,y.cJ)(e,t.channelId??""),n=(0,y.Yw)(e,t.channelId);return(0,y.it)(e,t.channelId??"")===t.threadTs&&!!(!a&&n?.recording?.summary)}function shouldDisplayInternalMigrationBanner(e,t){let a=(0,i.OL)(e,t.channelId);return!!(a&&(0,m.f5)(e,a))}var E=a(0x217a7a62d),C=a(0x251e8ff9a),k=a(0x14cb5efef),v=a(0xe58e00b),S=a(0x1673f3229),I=a(0x658a411c),w=a(0x280afe13),T=a(0x1b9d5cc0c),N=a(0xe684f705);function shouldDisplayTimeZoneBanner(e,t){let a=(0,i.OL)(e,t.channelId);if((0,b.LI)(a)){let t=(0,w.e)(a),n=(0,N.nv)(e,t);if((0,T.zU)(n)||(0,T.fy)(n)||(0,T.po)(n))return!1;if((0,d.Qi)(e,a?.id))return!0}return!1}function shouldDisplayOutOfOfficeDmBanner(e,t){let a=(0,v.A)([N.cA,T.K6])(e),n=(0,S.A)(t?.memberIds||[],a),r=(0,I.A)(n,t=>(0,T.KE)((0,N.nv)(e,t)));return!shouldDisplayTimeZoneBanner(e,t)&&r}var M=a(0x1a40e6931),R=a(0x1be9380c8),P=a(0x8b588d25),L=a(0x70b3ffcd);function shouldDisplaySalesforceChannelLinkedPrivateBanner(e,t){let a=(0,R.Sl)(e),n=(0,i.OL)(e,t.channelId),r=(0,P.cM)(n),l=a&&(r===L.z.Transfer||r===L.z.Edit);return!!(n&&(0,b.U_)(n)&&(0,b.Zp)(n))&&!l}var O=a(0x234fe1257);function shouldDisplayScheduledSendBanner(e,t){return!!(0,O.e)(e,{channelId:t.channelId,draftId:t.draftId,viewContext:t.viewContext,threadTs:t.threadTs})}var D=a(0x22ee6a672),F=a(0x10027d8bc),U=a(0x114ffe897),B=a(0x1d23c7f2c);let H="context_bar_text-",W=Object.freeze({slackbotAiContext:"slackbotAiContext",agentListener:"agentListener",dnd:"dnd",agentforce:"agentforce",sidekicks:"sidekicks",externalMemberAwareness:"externalMemberAwareness",externalMigration:"externalMigration",fileRetention:"fileRetention",govslackBanner:"govSlackBanner",huddlesAISummaryDisclaimer:"huddlesAISummaryDisclaimer",huddlesUserNonVisibleThread:"huddlesUserNonVisibleThread",internalMigration:"internalMigration",linkedPrivateSalesforceChannel:"linkedPrivateSalesforceChannel",outOfOffice:"outOfOffice",profileOnlyUser:"profile_only_user",scheduledSend:"scheduled_send",shared:"shared",timeZone:"timezone",mentionAgent:"mentionAgent",mentionSidekick:"mentionSidekick",quickReply:"quickReply"}),V=[{type:W.fileRetention,displayRule:shouldDisplayFileRetentionBanner},{type:W.dnd,displayRule:shouldDisplayDndOverrideBanner},{type:W.govslackBanner,displayRule:shouldDisplayGovslackbannerBanner},{type:W.internalMigration,displayRule:shouldDisplayInternalMigrationBanner},{type:W.externalMigration,displayRule:shouldDisplayExternalMigrationBanner},{type:W.dnd,displayRule:shouldDisplayDndDMSharedBanner},{type:W.shared,displayRule:s.v},{type:W.dnd,displayRule:o.r},{type:W.scheduledSend,displayRule:shouldDisplayScheduledSendBanner},{type:W.outOfOffice,displayRule:shouldDisplayOutOfOfficeDmBanner},{type:W.timeZone,displayRule:shouldDisplayTimeZoneBanner},{type:W.huddlesUserNonVisibleThread,displayRule:shouldDisplayHuddleUserNonVisibleThreadBanner},{type:W.huddlesAISummaryDisclaimer,displayRule:shouldDisplayHuddlesAiSummaryDisclaimerBanner},{type:W.agentListener,displayRule:shouldDisplayAgentListenerBanner},{type:W.linkedPrivateSalesforceChannel,displayRule:shouldDisplaySalesforceChannelLinkedPrivateBanner},{type:W.agentforce,displayRule:l.q},{type:W.slackbotAiContext,displayRule:(e,t)=>{if((0,F.Gf)(e)||!(0,F.FE)(e))return!1;let a=(0,i.OL)(e,t.channelId);if(!(0,U.D)(a))return!1;if((0,D.GI)(e)){if((0,B.zS)(e,t.channelId)||(0,B.tr)(e,t.channelId))return!0;let a=(0,B.wh)(e,t.channelId);if(a&&(0,b.U_)(a))return!0}return!!(0,B.i7)(e,t.channelId)||!!(0,B.j4)(e,t.channelId)}},{type:W.mentionAgent,displayRule:(e,{channelId:t,threadTs:a,viewContext:n})=>{if(!t||!a||n?.toLowerCase()!=="thread")return!1;let r=(0,E._r)(e,t,a,t=>(0,C.b)({agentMembers:t,experimentChannelKnowledgeAgentAutoReplyGroupOn:"on"===(0,u._Z)(e,"channel_knowledge_agent_auto_reply"),channelKnowledgeAgentAppId:(0,k.wL)(e)}));return!!(r&&r.length>0)}},{type:W.quickReply,displayRule:(e,t)=>{let a=(0,M.M)(e),{channelId:n,threadTs:r}=t,i=(0,d.uT)(e);return!!a&&i.showQuickReplyBanner&&i.quickReplyChannelId===n&&(void 0===r&&null===i.quickReplyThreadTs||void 0!==r&&r===i.quickReplyThreadTs)}}]},0xc6830ce8:(e,t,a)=>{"use strict";a.d(t,{b:()=>af});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1a256ff50),o=a(0x16cf1da63),s=a(0x20482ad21),c=a(0x11a296110),d=a(0xc34fd270),m=a(0xe8e28706),u=a(0x243435af9),p=a(0x1ec69ee01),h=a(0x6d72337),_=a(0x13638bd77),f=a(0x226892387),b=a(0x3ac3626),g=a.n(b);let y=new s.Ay("agents");function ContextBarAgentListenerContent({channel:e,ariaId:t}){let a=(0,o.wA)(),r=(0,p.uy)(e),i=(0,f.d4)(m.wB).find(e=>e.app_id===r),l=(0,f.d4)(u.mr),s=(0,n.useCallback)(()=>{i?.bot_user_id&&a((0,_.b)({memberId:i.bot_user_id}))},[i?.bot_user_id,a]);if(!i)return null;let b=n.createElement(c.jV,{className:g().button,onClick:s},n.createElement(d.Ay,{id:i.bot_user_id,showPresence:!1,useShortMode:!0,showTooltip:!0,showAppOrBotBadge:!1})),A=(0,h.yN)({memberId:i.bot_user_id,children:b});return n.createElement("div",{id:t,className:g().container},A,n.createElement("span",null,l?y.t("auto-reponds to questions"):"auto-reponds to questions"))}ContextBarAgentListenerContent.displayName="ContextBarAgentListenerContent";var A=a(0x118cdcdea),x=a.n(A),E=a(0x1e864b930),C=a(0x1535e80f3),k=a(0x344bb842),v=a(0x4c96e5d9),S=a(0x1c659cbb1),I=a(0xcaee4748),w=a(0x10cf39bbb),T=a(0x106a32624),N=a(0x10efa7af),M=a(0x82980ab8),R=a(0x1c9a3c4c1),P=a(0x50c6f5ae),L=a(0x3711e82d),O=a(0x16d4244ae),D=a(0x1308fe1af),F=a(0xdf40908a),U=a(0x12f41fc32),B=a(0x162ff0093),H=a(0xc1360909),W=a(0x1bc0a3228),V=a.n(W);let G=new s.Ay("agents");function AgentElement({member:e,channelId:t,showAvatar:a}){let r=(0,n.useContext)(T.r4),l=(0,M.wg)(e),o=(0,M.Fh)(e)||l,s=(0,n.useCallback)(()=>{let a=(0,O.zC)({viewContext:r,channelId:t});if(!a)return;let n=a.getContents?.();if(!n||n?.contents.some(t=>(0,D.Ay)(t)&&(0,D.I4)(t)===e.id))return;let i=(0,F.A)(e),l=new(x())().insert(`@${o}`,{slackmention:i}).insert(" ").ops;a.prependContents({contents:l}),a.focus()},[o,t,e,r]),d=(0,h.yN)({memberId:e.id,serviceId:e.id,children:n.createElement(c.Nm,{onClick:s,className:V().button},a?n.createElement(S.Ay,{className:V().avatar,size:C.RG.smallListVariantOutline,userId:e.id,user:e,isInteractive:!1}):null,n.createElement(I.A,{id:e.id,noLinking:!0,className:i()(V().memberSlug,"c-member_slug--link")}))});return n.createElement(n.Fragment,null,d)}function ContextBarAgentforceContent({channel:e,ariaId:t}){let a=(0,o.wA)(),[r,i]=(0,n.useState)([]),l=(0,f.d4)(t=>(0,H.qg)(t,e.id)),s=(0,n.useCallback)(()=>{let t={count:100,channels:[e.id],marker:void 0,filter:"apps",index:"users_by_realname"};a((0,N.W)({query:t})).then(e=>{i(e.members.filter(e=>(0,R.D)(e)||(0,P.o)(e)))})},[a,e.id]);(0,n.useEffect)(()=>{s()},[s,l]);let d=(0,n.useCallback)(()=>{a((0,B.A)({id:e.id,defaultTab:w.n.Agents}))},[e.id,a]),m=(0,n.useCallback)(({text:e})=>n.createElement(c.jV,{className:V().multiLink,onClick:d},e),[d]),u=(0,n.useMemo)(()=>({elementName:"close",elementType:L.ElementType.BANNER,action:L.UiAction.CLOSE,onClick:{enableClogAction:!0}}),[]),p=(0,n.useCallback)(()=>{a((0,U.AZ)({pref:"agents_in_channel_banner_hidden",value:!0}))},[a]);if(0===r.length)return n.createElement("div",{id:t,className:V().container});let h=(0,E.A)(r.map(t=>n.createElement(AgentElement,{key:t.id,member:t,channelId:e.id,showAvatar:1===r.length})),{react:!0}),_=G.rt("{itemCount, plural, =2 {{ agentNames } are} =1 {{ agentNames } is} other {<link># agents</link> are}} in this channel - they\u2019ll reply when @mentioned.",{itemCount:r.length,agentNames:h,"<link>":m}),b=G.t("Dismiss");return n.createElement("div",{id:t,className:V().container},n.createElement("div",{className:V().content},_),n.createElement(v.Ay,{tip:b},n.createElement(k.A,{"aria-label":b,className:V().closeButton,size:"x-small",onClick:p,autoClogProps:u,svgIconProps:{name:"close"}})))}AgentElement.displayName="AgentElement",ContextBarAgentforceContent.displayName="ContextBarAgentforceContent";var q=a(0x21f3c49e8),j=a(0x1faa3f1ac),z=a(0x1e5781b84),K=a(0x1c91944c9),$=a(0x20d52272),Y=a(0x226bb073d);let Q=new s.Ay("messages");function BaseContextBarDndText({dndOverride:e,memberId:t}){let a=(0,o.wA)(),r=e?.overrideUrl,i=(0,n.useCallback)(()=>{a&&a((0,$.A)(r))},[a,r]);return(0,q.A)(e)?n.createElement("span",{"data-qa":"context_bar_dnd_text"},Q.rt("{member} has <strong>paused their notifications</strong>",{member:n.createElement(z.A,{id:t})})):n.createElement("span",{"data-qa":"context_bar_dnd_text"},Q.t("They will see your messages when they\u2019re back."),"\xa0",n.createElement(j.A,{className:"bold",onClick:i},Q.t("Notify anyway?")))}function mapStateToProps(e,{channelId:t}){return{dndOverride:(0,Y.E5)(e,t)}}BaseContextBarDndText.displayName="BaseContextBarDndText";let Z=(0,K.N)(mapStateToProps)(BaseContextBarDndText);var J=a(0x58199183),X=a(0x120b6eb39),ee=a(0xbe2be077);let et=new s.Ay("shared_channels"),ContextBarGuidelinesText=({hasLeadingText:e})=>{let t=(0,f.d4)(ee.k),{renderLink:a,shouldDisplayGuidelines:r}=(0,X.F)({type:"LOCAL",dataQa:"slack_connect_guidelines__view_button__from_banner",stepVariant:"external_member_awareness_banner",modalHeaderSuffix:"guidelines",showCopyButton:!1,className:"bold"});return t&&r?n.createElement(n.Fragment,null,e&&". ",et.rt("<link>Review guidelines</link>",{"<link>":a})):null};var ea=a(0xddde6f8);let en=new s.Ay("messages"),ContextBarExternalText=({memberId:e,teamId:t})=>{let a=(0,f.d4)(t=>(0,ea.A)(t,[e]))?.[0],r=en.rt("They are from {teamName}",{teamName:n.createElement(J.A,{id:t||a})});return n.createElement(n.Fragment,null,n.createElement("span",null,r),n.createElement(ContextBarGuidelinesText,{hasLeadingText:!0}))};ContextBarExternalText.displayName="ContextBarExternalText";var er=a(0x11dc1796d);function ContextBarDndContent({memberId:e,ariaId:t,channelId:a}){let r=(0,f.d4)(t=>!!e&&(0,er.v)(t,{channelId:a,memberIds:[e]}));return n.createElement("span",{id:t},n.createElement(Z,{channelId:a,memberId:e}),r&&!!e&&n.createElement(n.Fragment,null,n.createElement("span",{className:"p-context_bar__divider"}," | "),n.createElement(ContextBarExternalText,{memberId:e})))}ContextBarDndContent.displayName="ContextBarDndContent";var ei=a(0x210cf696f),el=a(0x238b287cf),eo=a(0x12185e091),es=a(0x1a115a2e4),ec=a(0x11d0b0bd1);let ed=new s.Ay("unavailable_channel"),BaseContextBarExternalMigrationContent=({ariaId:e,channel:t})=>{let a=(0,f.d4)(e=>(0,es.LS)(e,t)),r=(0,f.d4)(e=>(0,es.KE)(e,t)),i=(0,el.A)(),l=(0,p.FB)(t),o=(0,eo.K5)(t),s=a||r,c=(0,n.useCallback)(()=>{(0,ec.As)({reason:"UnavailableChannelReload: Remote external team has migrated their data, user triggered client reload.",reasonKey:"unavailable_channel_reload"}),i.track(L.EventId.CHANNEL_UNAVAILABLE,{channel_id:l,channel_type:l?l.charAt(0):null,channel_privacy_type:o,unavailable_team_id:s,contexts:{ui_context:{action:L.UiAction.CLICK,step:L.UiStep.MESSAGE_PANE,ui_element:L.UiElement.BTN_RELOAD}}}),i.sendDataAndEmptyQueue()},[i,l,o,s]),d=(0,n.useCallback)(({text:e})=>n.createElement(ei.A,{onClick:c},e),[c]);i.track(L.EventId.CHANNEL_UNAVAILABLE,{channel_id:l,channel_type:l?l.charAt(0):null,channel_privacy_type:(0,eo.K5)(t),unavailable_team_id:a||r,contexts:{ui_context:{action:L.UiAction.IMPRESSION,step:L.UiStep.MESSAGE_PANE,ui_element:L.UiElement.MIGRATION_CONTEXT_BAR}}});let m=null;return(a?m=ed.rt("Something off? {teamName} is making changes to their workspace, we\u2019ll let you know when the process is complete.",{fallbackHash:"1d6fb57dba84975d1735caae0e56a5c22d99ac73",teamName:n.createElement(J.A,{id:a})}):r&&(m=ed.rt("Something off? {teamName} has made changes to their workspace. You can now <link>reload Slack</link>.",{fallbackHash:"9b699552dbd4a0f825d26eae96de06774cdd70df",teamName:n.createElement(J.A,{id:r}),"<link>":d})),m)?n.createElement("span",{id:e},m):null};BaseContextBarExternalMigrationContent.displayName="BaseContextBarExternalMigrationContent";let em=n.memo(BaseContextBarExternalMigrationContent);var eu=a(0x18e3302b3),ep=a(0x20e77676b),eh=a(0x1f66b5878),e_=a(0xa1832ae4),ef=a(0x1d600678),eb=a(0x1ee439e69);let eg=new s.Ay("file-upload");function BaseContextBarFileRetentionContent({retentionDuration:e,teamName:t,allowBoxCfsEnabled:a}){let r;if(!e||a)return null;let i=(0,eu.A)(e);return r=t?eg.rt("{teamName} keeps files in Slack for {duration}. <a>Learn more</a>",{duration:i,teamName:t,"<a>":({text:e})=>n.createElement(ep.A,{articleId:0xc2082a3},e)}):eg.t("Due to your custom file retention policy, this file will be deleted after {duration}",{duration:i}),n.createElement("span",{id:"ariaId"},r)}function context_bar_file_retention_content_mapStateToProps(e,{channelId:t}){let a=(0,ef.x)(e,"file_retention_type")?(0,ef.x)(e,"file_retention_duration"):null;return{retentionDuration:a,teamName:(0,e_.F1)((0,eb.H7)(e)),allowBoxCfsEnabled:!!(t?(0,eh.Bx)(e,"allow_box_cfs",t):(0,eh.p$)(e,"allow_box_cfs"))}}BaseContextBarFileRetentionContent.displayName="BaseContextBarFileRetentionContent";let ey=(0,K.N)(context_bar_file_retention_content_mapStateToProps)(BaseContextBarFileRetentionContent);var eA=a(0x40c0d834),ex=a(0x83428386),eE=a(0x24f66aeb6),eC=a(0xf5c9c349),ek=a(0x14149c126),ev=a(0xe684f705);function BaseContextBarSharedContent({ariaId:e,channel:t,memberIds:a,connectedTeamIds:r,shouldRender:i,experimentAdoptionInstantSlackGroupTreatment:l}){let s=(0,o.wA)(),c=(0,n.useCallback)(()=>{let e=(0,p.FB)(t);if(!e||!r?.length)return;let a=1===r.length?r[0]:ex.m.EXTERNAL_TEAMS;return s((0,B.A)({id:e,defaultTab:w.n.Members,options:l?void 0:{membersFilters:[a]}}))},[t,r,s,l]);if(!i)return null;let d=n.createElement(eA.A,{eventId:L.EventId.EXTERNAL_MEMBER_AWARENESS_BANNER,clogImpression:!0},n.createElement(eE.A,{channel:t,memberIds:a,onClickMemberCount:c,isFromContextBar:!0}),n.createElement(ContextBarGuidelinesText,{hasLeadingText:!0}));return e?n.createElement("span",{"data-qa":"shared_channel_connection_info_text",id:e},d):d}BaseContextBarSharedContent.displayName="BaseContextBarSharedContent";let eS=(0,K.N)((e,{channel:t,memberIds:a})=>{let n=(0,ev.gA)(e,a),r=(0,eC.A)({channel:t,members:n}),i="treatment"===(0,ek._Z)(e,"adoption_instant_slack");return{shouldRender:r!==eC.o.none,experimentAdoptionInstantSlackGroupTreatment:i}})(BaseContextBarSharedContent);var eI=a(0x17f03e906);let ew=new s.Ay("govslack"),ContextBarGovslackText=({isSlackConnect:e=!1})=>{let t=(0,f.d4)(eI.c),a=ew.rt("Don\u2019t share ITAR protected data here.",null,({text:e,tag:t})=>"a"===t?e:null);return t&&(a=e?ew.rt("These teams are using GovSlack.",{fallbackHash:"c80d207f7b80fc6839c040a53d42e9d538ff5061"}):ew.rt("This team is using GovSlack.",{fallbackHash:"c80d207f7b80fc6839c040a53d42e9d538ff5061"})),n.createElement("span",{"data-qa":"govslack_context_bar_notification"},a)};ContextBarGovslackText.displayName="ContextBarGovslackText";var eT=a(0x208817cec),eN=a(0x280afe13),eM=a(0x143fb6398);function BaseContextBarGovslackBannerContent({ariaId:e,channel:t,memberIds:a}){let r=(0,eM.ju)(t),i=(0,p.FB)(t),l=(0,f.d4)(e=>(0,eT.r)(e,{channelId:i,memberIds:a})),o=r&&!l;return n.createElement("span",{id:e},l&&n.createElement(n.Fragment,null,n.createElement(Z,{channelId:i,memberId:(0,eN.e)(t)}),n.createElement("span",{className:"p-context_bar__divider"}," | ")),o&&!!t&&n.createElement(n.Fragment,null,n.createElement(eS,{channel:t,memberIds:a}),n.createElement("span",{className:"p-context_bar__divider"}," | ")),n.createElement(ContextBarGovslackText,{isSlackConnect:o}))}BaseContextBarGovslackBannerContent.displayName="BaseContextBarGovslackBannerContent";let eR=n.memo(BaseContextBarGovslackBannerContent),eP=new s.Ay("huddles"),BaseContextBarHuddlesAiSummaryDisclaimerContent=({ariaId:e})=>n.createElement("span",{id:e},eP.rt("AI notes are on for this huddle, so thread replies may be summarized in the notes."));BaseContextBarHuddlesAiSummaryDisclaimerContent.displayName="BaseContextBarHuddlesAiSummaryDisclaimerContent";let eL=n.memo(BaseContextBarHuddlesAiSummaryDisclaimerContent);var eO=a(0xf2e7528e),eD=a(0x1df96de4c),eF=a(0x45ad3b82),eU=a(0x21ea2d3bf),eB=a(0x22bc7f363),eH=a(0x12a1ed4c5),eW=a(0x1ecc7f772),eV=a(0x21d85d6e5),eG=a(0x21c11a1dc);let eq=new s.Ay("huddles"),BaseContextBarHuddlesNonVisibleUserContent=({channel:e,ariaId:t})=>{let a,r,i=(0,o.wA)(),l=(0,f.Z2)(t=>(0,eG.wQ)(t,e?.id)),s=(0,f.d4)(t=>(0,eW.SB)(t,e)),c=(0,f.d4)(e=>0===l.length?eD.Ml:l?.map(t=>(0,eV.sE)(e,(0,ev.nv)(e,t.slackId)))),d=(0,f.Z2)(t=>(0,eG.ft)(t,e?.id).map(e=>e.id)),m=(0,n.useMemo)(()=>l.filter(e=>e.slackId).map(e=>e.slackId),[l]),u=(0,n.useCallback)(()=>{i((0,eH.A)({members:m}))},[i,m]),h=(0,n.useCallback)(()=>{if(!e)return;let t=d,a=(0,p.Hd)(e);Array.isArray(a)&&(t=(0,eO.A)(t,a)),i((0,eB.x)({channelId:e?.id,memberIds:t}))},[i,e,d]),_=c&&c.slice(3)||[];return(0,eo.Zp)(e)&&(a=eq.rt("{unknownMembers, plural, =1 {<strong>{name1}</strong>} =2 {<strong>{name1}</strong> and <strong>{name2}</strong>} =3 {<strong>{name1}</strong>, <strong>{name2}</strong>, and <strong>{name3}</strong>} other {<strong>{name1}</strong>, <strong>{name2}</strong>, <strong>{name3}</strong> and <strong>{numOthers}</strong> more}} can\u2019t see these messages because they are not in {channel}.",{unknownMembers:l.length,name1:n.createElement(eU.A,{slackId:l[0]?.slackId}),name2:n.createElement(eU.A,{slackId:l[1]?.slackId}),name3:n.createElement(eU.A,{slackId:l[2]?.slackId}),channel:n.createElement(eF.A,{className:"bold",id:e?.id}),numOthers:n.createElement(v.Ay,{zIndex:"above_fs",position:"top",tip:(0,E.A)(_)},n.createElement("span",null,l.length-3))}),r=eq.rt("<a>Invite to {channelName}</a>",{channelName:s},({text:e,tag:t})=>"a"===t?n.createElement(j.A,{onClick:u},e):null)),(0,eo.JM)(e)&&(a=eq.rt("{unknownMembers, plural, =1 {<strong>{name1}</strong>} =2 {<strong>{name1}</strong> and <strong>{name2}</strong>} =3 {<strong>{name1}</strong>, <strong>{name2}</strong>, and <strong>{name3}</strong>} other {<strong>{name1}</strong>, <strong>{name2}</strong>, <strong>{name3}</strong> and <strong>{numOthers}</strong> more}} won\u2019t be able to see messages sent in thread because this huddle began in a direct message. You can <a>start a new huddle</a> instead.",{unknownMembers:l.length,name1:n.createElement(eU.A,{slackId:l[0]?.slackId}),name2:n.createElement(eU.A,{slackId:l[1]?.slackId}),name3:n.createElement(eU.A,{slackId:l[2]?.slackId}),numOthers:n.createElement(v.Ay,{zIndex:"above_fs",position:"top",tip:(0,E.A)(_)},n.createElement("span",null,l.length-3))},({text:e,tag:t})=>"a"===t?n.createElement(j.A,{onClick:h},e):null)),n.createElement("span",{id:t},a," ",void 0!==r&&r)};BaseContextBarHuddlesNonVisibleUserContent.displayName="BaseContextBarHuddlesNonVisibleUserContent";let ej=n.memo(BaseContextBarHuddlesNonVisibleUserContent),ez=new s.Ay("messages");function BaseContextBarInternalMigrationContent({channel:e,ariaId:t}){let a=(0,el.A)();return a?.track(L.EventId.ENTERPRISE_MIGRATION_BACKGROUND,{contexts:{ui_context:{action:L.UiAction.IMPRESSION,ui_element:L.UiElement.MIGRATION_CONTEXT_BAR},channel_id:e.id,channel_privacy_type:(0,eo.K5)(e)}}),n.createElement("span",{id:t},ez.rt("Missing messages? They\u2019ll show up shortly when your workspace\u2019s migration is complete.",{fallbackHash:"5f88db20da50535e4e09f3f3a6e79dbd7f0068f1"}))}BaseContextBarInternalMigrationContent.displayName="BaseContextBarInternalMigrationContent";let eK=n.memo(BaseContextBarInternalMigrationContent);var e$=a(0x217a7a62d),eY=a(0x251e8ff9a),eQ=a(0x18c2d4c6f),eZ=a(0xb04c4a12),eJ=a(0xa3534e17),eX=a(0x14cb5efef);let e0=new s.Ay("agents"),AgentLink=({member:e,channelId:t,threadTs:a})=>{let r=(0,M.wg)(e),i=e?.id,l=(0,n.useCallback)(()=>{let e=(0,O.zC)({viewContext:eZ.Y.THREAD,channelId:t,threadTs:a});if(!e||!i)return;let n=e.getContents?.(),l=!!n?.contents.some(e=>(0,D.Ay)(e)&&(0,D.I4)(e)===i);if(t&&a&&!l){let t=`@${r}`,a=(0,eJ.A)(i,t,[]),n=new(x())().insert(t,{slackmention:a}).insert(" ").ops;e.prependContents({contents:n}),e.focus()}},[i,r,t,a]);return e?n.createElement(j.A,{onClick:l},"@",r):null};AgentLink.displayName="AgentLink";let ContextBarContent=({channelId:e,threadTs:t})=>{let a=(0,o.wA)(),r=(0,f.d4)(e=>"on"===(0,ek._Z)(e,"channel_knowledge_agent_auto_reply")),i=(0,f.d4)(eX.wL),l=(0,n.useCallback)(e=>(0,eY.b)({agentMembers:e,experimentChannelKnowledgeAgentAutoReplyGroupOn:r,channelKnowledgeAgentAppId:i}),[r,i]),s=(0,f.d4)(a=>(0,e$._r)(a,e,t,l)),d=(0,f.d4)(e=>"on"===(0,ek._Z)(e,"cea_context_bar_text_updates")),m=(0,n.useCallback)(()=>{e&&a((0,B.A)({id:e,defaultTab:w.n.Agents}))},[e,a]),u=(0,n.useCallback)(({text:e})=>n.createElement(c.jV,{onClick:m},e),[m]),p=(0,E.A)(s?.map(a=>n.createElement(AgentLink,{key:a.id,member:a,channelId:e,threadTs:t}))||[],{react:!0}),h=(0,M.wg)(s?.[0]);return d?e0.rt("{itemCount, plural, =2 {{ agentNames }} =1 {{ agentNames }} other {<link># agents</link>}} will reply when @mentioned.",{itemCount:s?.length,agentNames:p,"<link>":u}):e0.rt("<b>Mention {mentionAgentActionLink}</b> to get a reply",{mentionAgentActionLink:n.createElement(j.A,{onClick:m},h),fallbackHash:"979c31d474d04f9ad963fbf7f4c48c4659f02240"})};ContextBarContent.displayName="ContextBarContent";let ContextBarMentionAgentContent=({channelId:e,threadTs:t})=>n.createElement(eQ.A,{subtype:"agentforce-mention-context-bar"},n.createElement(ContextBarContent,{channelId:e,threadTs:t}));ContextBarMentionAgentContent.displayName="ContextBarMentionAgentContent";let OooProfileLink=({memberId:e,linkText:t})=>{let a=(0,o.wA)(),r=(0,n.useCallback)(()=>{a((0,_.b)({memberId:e}))},[a,e]);return n.createElement(j.A,{onClick:r},t)};OooProfileLink.displayName="OooProfileLink";var e1=a(0x1673f3229),e2=a(0xd174f7d7),e4=a(0x20ef3966f),e5=a(0x1c26fae37),e3=a(0x7d48dd65),e6=a(0x20bafd237),e8=a(0xe58e00b),e7=a(0x1b9d5cc0c);let OooMpdmTooltip=({text:e,oooMpdmMembers:t})=>{let a=(0,f.Z2)(e=>{let a=(0,e2.A)(t,2),n=(0,e4.A)(a,t=>(0,eV.sE)(e,t));if(2===n.length)return(0,e5.A)(n," and ");if(n.length>2){let e,t;return e=(0,e6.A)(n),t=(0,e1.A)(n,e),(0,e8.A)([t=>(0,e1.A)(t,e),t=>`${(0,e5.A)(t,", ")} and ${e}`])(t)}return(0,e5.A)(n,", ")});return n.createElement(v.Ay,{"aria-label":a,position:"top",tip:a},n.createElement(j.A,null,e))};OooMpdmTooltip.displayName="OooMpdmTooltip";var e9=a(0x175beb059);let te=new s.Ay("rimeto_user_profile"),OooMpdmMessage=({channel:e})=>{let t=(0,f.Z2)(t=>{let a,n=(0,ev.cA)(t),r=(0,p.Ug)(e)||[],i=(0,e1.A)(r,(0,e7.K6)(n));return a=(0,ev.gA)(t,i),(0,e3.A)(a,e=>(0,e7.KE)(e))}),[a,r]=t,i=t?.length===1?"true":"false",l=t?.length===2?"true":"false",o=t?.length>2?"true":"false",{firstMemberName:s,secondMemberName:c}=(0,f.Z2)(e=>({firstMemberName:(0,eV.sE)(e,a),secondMemberName:(0,eV.sE)(e,r)})),d=(0,n.useCallback)(({text:e})=>n.createElement(OooProfileLink,{memberId:(0,e7.K6)(a),linkText:e}),[a]),m=(0,n.useCallback)(({text:e})=>n.createElement(OooMpdmTooltip,{text:e,oooMpdmMembers:t}),[t]);return(0,e9.Ay)({[i]:()=>te.rt("<strong>{firstMemberName}</strong> has their status set to <strong>out of office</strong>.",{firstMemberName:s,"<Link>":d}),[l]:()=>te.rt("<strong>{firstMemberName}</strong> and <strong>{secondMemberName}</strong> have their status set to <strong>out of office.</strong>",{firstMemberName:s,secondMemberName:c}),[o]:()=>te.rt("<strong>{firstTwoMemberNames}</strong> and <Link>{restOfOooMembersCount} others</Link> have their status set to <strong>out of office.</strong>",{"<Link>":m,firstTwoMemberNames:`${s}, ${c}`,restOfOooMembersCount:t.length-2})})(null)("true")};OooMpdmMessage.displayName="OooMpdmMessage";var tt=a(0x16493b4bb),ta=a(0x140f94560),tn=a(0x15f4f83cf),tr=a(0x1ccef1c6f);let ti=new s.Ay("rimeto_user_profile"),ContextBarOutOfOffice=({channel:e,member:t})=>{let a=(0,f.d4)(e=>(0,tr.ty)(e,"time24")),{dmMember:r,dmMemberName:i}=(0,f.Z2)(a=>{let n=(0,ev.nv)(a,(0,eN.e)(e));return{dmMember:t??n,dmMemberName:(0,eV.sE)(a,t??n)}}),l=(0,eo.LI)(e)||(0,tn.uz)(r),o=(0,e7.UM)(r),s=o===tt.g,c=(0,n.useCallback)(({text:e})=>n.createElement(OooProfileLink,{memberId:(0,e7.K6)(r),linkText:e}),[r]);if((0,eM.ju)(e)||!(0,eo.JM)(e)&&!(0,tn.uz)(r))return null;let d=s?ti.rt("<strong>{dmMemberName}</strong> is currently <strong>out of office</strong>. They may not respond until they return. <Link>See more</Link>",{dmMemberName:i,"<Link>":c}):ti.rt("<strong>{dmMemberName}</strong> is currently <strong>out of office until {oooReturnDate}</strong>. They may not respond until they return. <Link>See more</Link>",{dmMemberName:i,oooReturnDate:(0,ta.l)(o,a),"<Link>":c});return!l&&(0,eo.yz)(e)?n.createElement(OooMpdmMessage,{channel:e}):l?d:null};ContextBarOutOfOffice.displayName="ContextBarOutOfOffice";let tl=new s.Ay("messages");function ContextBarProfileOnlyUserContent({memberIds:e,ariaId:t}){if(!e)return null;let a=n.createElement(I.A,{id:e[0]}),r=e.length;if(2===r)return n.createElement("span",{id:t},tl.rt("{firstMember} and {secondMember} are not on Slack and will not receive a notification.",{firstMember:a,secondMember:n.createElement(I.A,{id:e[1]})}));let i=e.slice(1).map(e=>n.createElement("span",{key:e},n.createElement(I.A,{id:e,noLinking:!0}))),l=(0,E.A)(i);return n.createElement("span",{id:t},tl.rt("{firstMember}{memberCount, plural, =1 { is} other { and {overflow} are}} not on Slack and will not receive a notification.",{firstMember:a,memberCount:r,overflow:n.createElement(v.Ay,{zIndex:"above_fs",tip:l},n.createElement("span",null,tl.rt(" {overflowCount} others",{overflowCount:r-1})))}))}ContextBarProfileOnlyUserContent.displayName="ContextBarProfileOnlyUserContent";var to=a(0xb945b830),ts=a(0x1a40e6931),tc=a(0x1a525ed2c),td=a(0xd93ecf94),tm=a(0x21ad9b85e),tu=a.n(tm);let tp=new s.Ay("messages"),th={name:"close"},ContextBarQuickReplyContent=({channelId:e="",ariaId:t})=>{let a=(0,f.d4)(ts.M),r=(0,o.wA)(),i=(0,f.d4)(Y.uT),l=(0,f.d4)(e=>(0,td.Ld)(e,i.quickReplyChannelId||"",i.quickReplyMessageTs||"")),s=(0,f.d4)(e=>(0,ev._7)(e,l?.user||"")),c=(0,n.useCallback)(()=>{r((0,tc.rc)({channelId:e,messageTs:i.quickReplyMessageTs||""}))},[e,r,i.quickReplyMessageTs]),d=l&&(0,to.nW)(l)?(0,to.he)(l):l?.text,m=a?tp.rt("<strong>Replying to {messageAuthor}:</strong> {messageText}",{messageAuthor:s,messageText:d}):"";return a?n.createElement("div",{className:tu().quickReplyBanner,id:t},n.createElement("span",{className:tu().text},m),n.createElement(v.Ay,{tip:a?tp.t("Cancel"):"Cancel"},n.createElement(k.A,{"aria-label":a?tp.t("Cancel quick reply"):"Cancel quick reply",className:tu().close,onClick:c,svgIconProps:th,size:"x-small"}))):null};ContextBarQuickReplyContent.displayName="ContextBarQuickReplyContent";var t_=a(0xe4cfbb6a),tf=a(0x8b588d25),tb=a(0x22725f619),tg=a.n(tb);let ty=new s.Ay("recordchannels");function BaseContextBarLinkedPrivateSalesforceChannelContent({channel:e,ariaId:t,threadTs:a}){let r=(0,o.wA)(),i=(0,tf.iJ)(e),l=ty.t("record"),s=(0,f.d4)(t=>(0,t_.q)(t,{channelId:e.id,threadTs:a})),d=(0,f.d4)(t=>(0,H.qg)(t,e.id)),m=(0,n.useCallback)(()=>{r((0,B.A)({id:e.id,defaultTab:w.n.Agents}))},[e.id,r]),u=(0,n.useCallback)(({text:e})=>n.createElement(c.jV,{className:tg().context_bar_salesforce_channel_linked_private_content_link,onClick:m},e),[m]),p=(0,n.useMemo)(()=>((0,tf.jT)(e)??l).toLocaleLowerCase(),[e,l]);if(!e||!(0,eo.U_)(e)||!i)return null;let h=ty.rt("Anyone with access to this {objectLabel} can view this channel{conditionalPeriod}",{objectLabel:p,conditionalPeriod:s?".":""}),_=ty.rt("{count, plural, =1 {<link># agent</link> is} other {<link># agents</link> are}} in this channel.",{count:d,"<link>":u});return n.createElement("span",{id:t},h,s&&n.createElement(n.Fragment,null,n.createElement("span",{className:"p-context_bar__divider"}," | "),n.createElement("span",null,_)))}BaseContextBarLinkedPrivateSalesforceChannelContent.displayName="BaseContextBarLinkedPrivateSalesforceChannelContent";let tA=n.memo(BaseContextBarLinkedPrivateSalesforceChannelContent);var tx=a(0xe180a236),tE=a(0x1ee15af19),tC=a(0x1f355b555),tk=a(0x7acf06fe),tv=a(0x2114bd58c),tS=a(0x1a02c72b5),tI=a(0xd6a16321),tw=a(1927545e3),tT=a(0xa794f9e1),tN=a(0x234fe1257),tM=a(0x6960d8b9);let tR=new s.Ay("messages"),tP={eventId:L.EventId.COMPOSE_FLOW,uiStep:L.UiStep.CONTEXTBAR_SCHEDULED_CLICK,onClick:{enableClogAction:!0}};function ContextBarScheduledSendContent({channelId:e,draftId:t,viewContext:a,threadTs:r}){let i,l=(0,o.wA)(),s=(0,f.d4)(e=>(0,tr.ty)(e,"time24")),c=(0,f.d4)(n=>(0,tN.N)(n,{channelId:e,draftId:t,viewContext:a,threadTs:r}));if(!e||(0,q.A)(c))return null;function onSeeDetailsClick(){l((0,tS.o)((0,tI.ZF)(tw.c.ScheduledMessages)))}if((0,tx.A)(c)>1)i=tR.rt("{draft_count} messages scheduled to be sent.",{draft_count:(0,tx.A)(c)});else{let e=(0,tE.A)(c),t=(0,tT.V)(e);if(!t)return null;let a=(0,tv.A)(t),n=(0,tk.A)(t,(0,tC.Ay)().add(1,"day").toDate()),r=(0,tM.Yq)(t,"{date_pretty}",{shouldCapitalize:!1}),l=(0,tM.Yq)(t,"{time}",{do24hrTime:s});i=a?tR.rt("Your message will be sent today at {time}.",{time:l}):n?tR.rt("Your message will be sent tomorrow at {time}.",{time:l}):tR.rt("Your message will be sent on {date} at {time}.",{date:r,time:l})}let d=tR.rt("<a>See all scheduled messages</a>",null,({text:e,tag:t})=>"a"===t?n.createElement(j.A,{onClick:onSeeDetailsClick,autoClogProps:tP},n.createElement("strong",null,e)):null);return n.createElement(n.Fragment,null,i," ",d)}ContextBarScheduledSendContent.displayName="ContextBarScheduledSendContent";var tL=a(0x22ee6a672),tO=a(0x15a4ffb05),tD=a(0x10027d8bc),tF=a(0x3ca4e1cc),tU=a(0x22fd0ecc8),tB=a(0xeb4f1a4d),tH=a(0x1d23c7f2c),tW=a(0x1ac645aac),tV=a.n(tW);let tG=new s.Ay("assistant"),tq={name:"close"},tj={eventId:L.EventId.NATIVE_AI,onClick:{enableClogAction:!0}},tK={...tj,elementName:"slackbot_ai_context_banner_close_salesforce_record"},t$={...tj,elementName:"slackbot_ai_context_banner_close_salesforce_list_view"},tY={...tj,elementName:"slackbot_ai_context_banner_close_work_object"},tQ={...tj,elementName:"slackbot_ai_context_banner_close_salesforce_record_channel"},tZ={...tj,elementName:"slackbot_ai_context_banner_close_file_excluded"},tJ={...tj,elementName:"slackbot_ai_context_banner_close_file"},ContextBarSlackbotAiContextContent=({channelId:e})=>{let t=(0,o.wA)(),a=(0,f.d4)(tD.FE),r=(0,f.d4)(tD.Dj),i=(0,f.d4)(tF.XH),l=(0,f.d4)(t=>(0,tH.i7)(t,e)),s=(0,f.d4)(t=>(0,tH.j4)(t,e)),c=(0,f.d4)(tH.zO),d=(0,f.d4)(tH.Ep),m=(0,f.d4)(tL.GI),u=(0,f.d4)(t=>(0,tH.zS)(t,e)),p=(0,f.d4)(t=>(0,tH.tr)(t,e)),h=(0,f.d4)(t=>(0,tH.wh)(t,e)),_=(0,n.useCallback)(()=>{if(u)t((0,tB.IA)({contextId:u.record_id}));else if(p)t((0,tB.IA)({contextId:p.list_view_id}));else if(l)t((0,tB.IA)({contextId:l.id}));else if(s&&d){let e=`${s.entity_url}:${d}`;t((0,tB.IA)({contextId:e}))}else h&&(0,eo.U_)(h)&&m&&t((0,tB.IA)({contextId:h.id}))},[t,u,p,l,s,d,h,m]);if(!a)return null;let b=i?tG.t("Dismiss context"):"Dismiss context",g=i?tG.t("Ask me anything about this file"):"Ask me anything about this file",y=m?tG.t("Ask me anything about this record"):"Ask me anything about this record";if(m&&u){let e=u.record_name||u.object_label||tG.t("this record");return n.createElement(eA.A,{eventId:L.EventId.NATIVE_AI,clogImpression:!0,elementName:"slackbot_ai_context_banner_salesforce_record"},n.createElement("div",{className:tV().container},n.createElement("div",null,tG.rt("Ask me anything about <strong>{name}</strong>",{name:n.createElement(tO.A,{text:e})})),n.createElement("div",{className:tV().closeButton},n.createElement(k.A,{svgIconProps:tq,onClick:_,"aria-label":b,size:"x-small",autoClogProps:tK}))))}if(m&&p){let e=p.list_view_label||tG.t("{objectLabel} list",{objectLabel:p.object_label||p.object_type});return n.createElement(eA.A,{eventId:L.EventId.NATIVE_AI,clogImpression:!0,elementName:"slackbot_ai_context_banner_salesforce_list_view"},n.createElement("div",{className:tV().container},n.createElement("div",null,tG.rt("Ask me anything about <strong>{name}</strong>",{name:n.createElement(tO.A,{text:e})})),n.createElement("div",{className:tV().closeButton},n.createElement(k.A,{svgIconProps:tq,onClick:_,"aria-label":b,size:"x-small",autoClogProps:t$}))))}if(i&&s)return n.createElement(eA.A,{eventId:L.EventId.NATIVE_AI,clogImpression:!0,elementName:"slackbot_ai_context_banner_work_object"},n.createElement("div",{className:tV().container},n.createElement("div",null,i&&c?tG.rt("Ask me anything about <strong>{displayTitle}</strong>",{displayTitle:n.createElement(tO.A,{text:c})}):n.createElement(n.Fragment,null,g)),n.createElement("div",{className:tV().closeButton},n.createElement(k.A,{svgIconProps:tq,onClick:_,"aria-label":b,size:"x-small",autoClogProps:tY}))));if(m&&h&&(0,eo.U_)(h)){let e=h.name;return n.createElement(eA.A,{eventId:L.EventId.NATIVE_AI,clogImpression:!0,elementName:"slackbot_ai_context_banner_salesforce_record_channel"},n.createElement("div",{className:tV().container},n.createElement("div",null,m&&e?tG.rt("Ask me anything about <strong>{name}</strong>",{name:n.createElement(tO.A,{text:e})}):n.createElement(n.Fragment,null,y)),n.createElement("div",{className:tV().closeButton},n.createElement(k.A,{svgIconProps:tq,onClick:_,"aria-label":b,size:"x-small",autoClogProps:tQ}))))}let A=(0,tU.SB)(l);if(!A)return null;if(l&&l&&"excluded_from_slack_ai"in l&&l.excluded_from_slack_ai){let e=tG.t("Learn more");return n.createElement(eA.A,{eventId:L.EventId.NATIVE_AI,clogImpression:!0,elementName:"slackbot_ai_context_banner_file_excluded"},n.createElement("div",{className:tV().container},n.createElement("div",null,tG.rt("<strong>{filename}</strong> is not visible to Slackbot.",{filename:n.createElement(tO.A,{text:A})})," ",n.createElement(ep.A,{articleId:0x19b02aac6c93},e)),n.createElement("div",{className:tV().closeButton},n.createElement(k.A,{svgIconProps:tq,onClick:_,"aria-label":b,size:"x-small",autoClogProps:tZ}))))}return n.createElement(eA.A,{eventId:L.EventId.NATIVE_AI,clogImpression:!0,elementName:"slackbot_ai_context_banner_file"},n.createElement("div",{className:tV().container},n.createElement("div",null,r?tG.rt("Ask me anything about <strong>{filename}</strong>",{filename:n.createElement(tO.A,{text:A})}):n.createElement(n.Fragment,null,"Ask me anything about"," ",n.createElement("strong",null,n.createElement(tO.A,{text:A})))),n.createElement("div",{className:tV().closeButton},n.createElement(k.A,{svgIconProps:tq,onClick:_,"aria-label":b,size:"x-small",autoClogProps:tJ}))))};ContextBarSlackbotAiContextContent.displayName="ContextBarSlackbotAiContextContent";var tX=a(0x4bdf0df6),t0=a(0x339b339c),t1=a(0x11ad3c74f);let t2=new s.Ay("messages");function getLocalTime(e,t){return(0,tX.Ay)(Date.now(),{timeZone:(0,e7.et)(e)||void 0,timeZoneOffset:(0,e7.BM)(e),do24hrTime:t,returnMoment:!1})}let ContextBarTimeZoneContent=({ariaId:e,member:t})=>{let a=(0,f.d4)(e=>!!(0,tr.ty)(e,"time24")),[r,i]=(0,n.useState)(getLocalTime(t,a));return(0,t1.A)(()=>{i(getLocalTime(t,a))},[t,a]),n.createElement("span",{id:e},t2.rt("It\u2019s {time} for {member}",{member:n.createElement(z.A,{id:t?.id}),time:r?n.createElement("strong",null,r):n.createElement(t0.A,{size:"small"})}))};ContextBarTimeZoneContent.displayName="ContextBarTimeZoneContent";var t4=a(0x210b39689),t5=a(0x2501a2cee),t3=a(0x1cc55a0eb);let ContextBarHuddlesUserNonVisibleThreadIcon=({channel:e})=>{let t=(0,f.Z2)(t=>(0,eG.wQ)(t,e?.id)),a=(0,n.useMemo)(()=>t.filter(e=>e.slackId).map(e=>e.slackId),[t]);return n.createElement(t3.A,{avatarSize:S.RG.small,maxNumFaces:2,participants:a,className:"p-context_bar_huddles_user_nonvisible_thread_icon"})};ContextBarHuddlesUserNonVisibleThreadIcon.displayName="ContextBarHuddlesUserNonVisibleThreadIcon";var t6=a(0x12d348dfc),t8=a.n(t6);function BaseContextBarSalesforceChannelLinkedPrivateIcon(){return n.createElement("div",{className:t8().context_bar_salesforce_channel_linked_private_icon_container},n.createElement(t5.Ah,{name:"sf-record","data-qa":"context-bar-salesforce-channel-linked-private-icon"}))}BaseContextBarSalesforceChannelLinkedPrivateIcon.displayName="BaseContextBarSalesforceChannelLinkedPrivateIcon";let t7=n.memo(BaseContextBarSalesforceChannelLinkedPrivateIcon);var t9=a(0x213ebb614);let ae=Object.freeze({[t4.mg.internalMigration]:"info",[t4.mg.externalMigration]:"info",[t4.mg.timeZone]:"clock",[t4.mg.scheduledSend]:"schedule-send",[t4.mg.profileOnlyUser]:"info",[t4.mg.fileRetention]:"warning",[t4.mg.huddlesAISummaryDisclaimer]:"info",[t4.mg.mentionAgent]:"info",[t4.mg.linkedPrivateSalesforceChannel]:"sf-cloud"}),at=Object.freeze({[t4.mg.dnd]:"notifications-dnd-filled",[t4.mg.govslackBanner]:"govslack-filled"}),ContextBarV2Icon=({type:e,channel:t,memberIds:a})=>{let r=(0,f.d4)(eI.c),i=(0,f.d4)(ts.M);return(0,eM.ju)(t)&&e===t4.mg.govslackBanner?n.createElement("div",{className:"p-context_bar_v2__icon position_relative"},n.createElement("div",{className:r?"p-context_bar_banner__govslack_insert":"p-context_bar_banner__govslack_insert p-context_bar_banner__govslack_insert--off"},n.createElement("div",{className:"p-context_bar_banner__govslack_insert_icon"},n.createElement(t5.Ah,{name:r?"govslack-filled":"govslack-off-filled"}))),n.createElement(t9.A,{memberIds:a,channel:t})):e===t4.mg.shared?n.createElement("div",{className:"p-context_bar_v2__icon"},n.createElement(t9.A,{memberIds:a,channel:t})):e===t4.mg.outOfOffice?n.createElement("div",{className:"p-context_bar_v2__icon"},n.createElement(t5.Ah,{name:"inactive"})):e===t4.mg.huddlesUserNonVisibleThread?n.createElement(ContextBarHuddlesUserNonVisibleThreadIcon,{channel:t}):e===t4.mg.agentListener||e===t4.mg.slackbotAiContext||e===t4.mg.agentforce?null:e===t4.mg.linkedPrivateSalesforceChannel?n.createElement("div",{className:"p-context_bar_v2__icon"},n.createElement(t7,null)):e===t4.mg.quickReply&&i?n.createElement("div",{className:"p-context_bar_v2__icon"},n.createElement(t5.Ah,{name:"comments"})):n.createElement("div",{className:"p-context_bar_v2__icon"},(e===t4.mg.govslackBanner||e===t4.mg.dnd)&&n.createElement(t5.Ah,{name:at[e]}),e!==t4.mg.govslackBanner&&n.createElement(t5.Ah,{name:ae[e]}))};ContextBarV2Icon.displayName="ContextBarV2Icon";var aa=a(0x47f5ae2),an=a(0xf2964a91),ar=a(0x217553e42),ai=a(0x1c2eef3c8);function useContextBarOverride({channelId:e,draftId:t,viewContext:a,threadTs:r}){let[i,l]=(0,n.useState)(""),o=(0,f.d4)(t=>(0,ar.OL)(t,e)),s=(0,f.d4)(e=>(0,ai.YI)(e,t)),c=(0,f.d4)(n=>(0,tN.N)(n,{channelId:e,draftId:t,viewContext:a,threadTs:r})),d=(0,tx.A)(c),[m]=c,u=(0,n.useMemo)(()=>{if(!m)return!1;let e=new Date(Date.now()-5e3);return new Date(1e3*m.date_created)>e},[m]),[p,h]=(0,n.useState)(d),[_,b]=(0,n.useState)(e),g=(0,n.useMemo)(()=>(0,tT.Mq)(s),[s]),y=(0,f.Z2)((0,n.useCallback)(e=>g.filter(t=>{let a=(0,ev.nv)(e,t);return!(0,an.o)(a)&&(0,e7.hh)(a)}),[g]));return(0,n.useEffect)(()=>{e!==_&&(b(e),h(d))},[_,e,d,b]),(0,n.useEffect)(()=>{let e=d>p||u,t=a===eZ.Y.COMPOSER_VIEW&&d>0;(0,eo.rW)(o)&&y&&0!==y.length?l(t4.mg.profileOnlyUser):e||t?l(t4.mg.scheduledSend):l("")},[d,p,y,o,a,u]),{overrideType:i,mentionedPOUs:y}}var al=a(0x4f795111),ao=a(0xdb0ffe37);function useCalculateNightTime({channelId:e,imMember:t,setContextBarTimeZoneIsShowing:a,unsetContextBarTimeZoneIsShowing:r}){let i=(0,f.d4)(e=>(0,e7.et)((0,ev.cA)(e)));return(0,n.useCallback)(()=>{if(!e||!t||(0,ao.g)(t)||(0,e7.fy)(t)||(0,e7.po)(t))return null;if(i===(0,e7.et)(t)||!(0,e7.et)(t))return r({channelId:e});try{if((0,al.h)(Date.now(),t))return a({channelId:e});return r({channelId:e})}catch{return r({channelId:e})}},[e,i,t,a,r])}function useUpdateNightTime({channelId:e,imMember:t,contextBarType:a,setContextBarTimeZoneIsShowing:n,unsetContextBarTimeZoneIsShowing:r}){let i=useCalculateNightTime({channelId:e,imMember:t,setContextBarTimeZoneIsShowing:n,unsetContextBarTimeZoneIsShowing:r});(0,t1.A)(()=>{a&&a!==t4.mg.timeZone||i()},[i,a])}var as=a(0x11859dc7d),ac=a(0x1936e9401),ad=a(0x12cc25ec2),am=a(0x45012309),au=a(0xd9302abc),ap=a(0x91e15f37),ah=a(0x206196e71),a_=a(0x1a8f65ec3);function BaseContextBarV2({onIsContextBarShowing:e,channelId:t,memberIds:a,draftId:r,viewContext:l,ariaId:o,imMember:s,channel:c,connectedTeamIds:d,setContextBarTimeZoneIsShowing:m,unsetContextBarTimeZoneIsShowing:u,threadTs:p,inputHasFiles:h}){let _=useContextBarOverride({channelId:t,draftId:r,viewContext:l,threadTs:p}),b=(0,n.useContext)(as.k),g=(0,f.d4)(e=>(0,aa.r)(e,t,a,{draftId:r,viewContext:l,aiAppsContext:b,inputHasFiles:h,threadTs:p})),y=(0,f.d4)(e=>"on"===(0,ek._Z)(e,"desktop_context_bar_yellow")),A=(0,f.d4)(e=>(0,au.Q)(e,"external_awareness_context_bar",t)),x=(0,f.d4)(e=>(0,a_.N)(e,t,l));useUpdateNightTime({imMember:s,channelId:t,setContextBarTimeZoneIsShowing:m,unsetContextBarTimeZoneIsShowing:u,contextBarType:g||""});let E=_?.overrideType||g,C=!!E;(0,n.useEffect)(()=>{e&&e(C)},[g,e,C,t]),(0,n.useEffect)(()=>()=>{u({channelId:t||""})},[u,t]);let k=(0,f.d4)(ah.Cn),v=(0,f.d4)(ap.zk)||0,S=E===t4.mg.shared&&k&&v<8&&v>=0;if(!E)return null;let I=null;switch(E){case t4.mg.profileOnlyUser:I=n.createElement(ContextBarProfileOnlyUserContent,{memberIds:_?.mentionedPOUs,ariaId:o});break;case t4.mg.fileRetention:I=n.createElement(ey,{channelId:t,ariaId:o});break;case t4.mg.govslackBanner:I=n.createElement(eR,{ariaId:o,channel:c,memberIds:a});break;case t4.mg.internalMigration:I=n.createElement(eK,{channel:c,ariaId:o});break;case t4.mg.externalMigration:I=n.createElement(em,{ariaId:o,channel:c});break;case t4.mg.shared:I=n.createElement(eS,{ariaId:o,channel:c,memberIds:a,connectedTeamIds:d});break;case t4.mg.linkedPrivateSalesforceChannel:I=n.createElement(tA,{channel:c,ariaId:o,threadTs:p});break;case t4.mg.scheduledSend:I=n.createElement(ContextBarScheduledSendContent,{channelId:t,draftId:r,viewContext:l,threadTs:p});break;case t4.mg.dnd:I=n.createElement(ContextBarDndContent,{channelId:t,memberId:s?.id,ariaId:o});break;case t4.mg.timeZone:I=n.createElement(ContextBarTimeZoneContent,{member:s,ariaId:o});break;case t4.mg.outOfOffice:I=n.createElement(ContextBarOutOfOffice,{channel:c,member:s});break;case t4.mg.huddlesUserNonVisibleThread:I=n.createElement(ej,{channel:c,ariaId:o});break;case t4.mg.huddlesAISummaryDisclaimer:I=n.createElement(eL,{ariaId:o,viewContext:l});break;case t4.mg.agentListener:I=n.createElement(ContextBarAgentListenerContent,{channel:c,ariaId:o});break;case t4.mg.agentforce:I=n.createElement(ContextBarAgentforceContent,{channel:c,ariaId:o});break;case t4.mg.slackbotAiContext:I=n.createElement(ContextBarSlackbotAiContextContent,{channelId:t});break;case t4.mg.quickReply:I=n.createElement(ContextBarQuickReplyContent,null);break;case t4.mg.mentionAgent:I=n.createElement(ContextBarMentionAgentContent,{channelId:t,threadTs:p});break;default:I=null}if(x||!I)return null;let w=E===t4.mg.shared,getRenderExternalAwarenessContextBarStyle=()=>A===ad.TF.High?"high_viz":"default",T=i()("p-context_bar_v2",{"p-context_bar_v2--teal":w&&!y&&!S,"p-context_bar_v2--yellow":(E===t4.mg.huddlesAISummaryDisclaimer||(0,eM.ju)(c)&&y)&&!S,[`p-context_bar_v2--campfire-${getRenderExternalAwarenessContextBarStyle()}`]:w&&!S,"p-context_bar_v2--horchata":S,"p-context_bar_v2--highlight-1":E===t4.mg.agentforce});return n.createElement("div",{className:T,"data-qa":"context_bar"},n.createElement(ContextBarV2Icon,{type:E,channel:c,memberIds:a}),n.createElement("div",{className:i()("p-context_bar_v2__content",{[`p-context_bar_v2__content--${getRenderExternalAwarenessContextBarStyle()}`]:w}),"data-qa":`context_bar_text_${E}`},I),n.createElement("div",{className:"p-context_bar_v2__filler"}))}BaseContextBarV2.displayName="BaseContextBarV2";let af=(0,K.N)((e,{channelId:t,draftId:a,memberIds:n,viewContext:r,inputHasFiles:i,threadTs:l})=>{let{channel:o,member:s,memberIds:c,modelObIds:d}=(0,ac.B)(e,{id:t,memberIds:n});return{channelId:t,channel:o,clogger:(0,am.eo)({state:e}),memberIds:c,draftId:a,viewContext:r,threadTs:l,inputHasFiles:i,imMember:s||void 0,connectedTeamIds:(0,ea.A)(e,d)}},e=>({setContextBarTimeZoneIsShowing:t=>e((0,tc.zG)(t)),unsetContextBarTimeZoneIsShowing:t=>e((0,tc.mw)(t))}),null,{areStatePropsEqual:l.kt})((0,n.memo)(BaseContextBarV2))},0x7089e347:(e,t,a)=>{"use strict";a.d(t,{G:()=>A,N:()=>BaseContextBarFirstMessageProgressiveDisclosure});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0x11a296110),d=a(0xeeba06ca),m=a(0x3711e82d),u=a(0x226892387),p=a(0xf3c65e54),h=a(0x5b1935a6),_=a(0x113d1778),f=a(0x54ef0daa),b=a(0x18a17ca8f),g=a(0x74bbb29a);let y=new s.Ay("setup_page"),BaseContextBarFirstMessageProgressiveDisclosure=({showProgressiveDisclosureFirstMessageTipExplainer:e,progressiveDisclosureFirstMessageTipFlagVisible:t,onProgDiscTipClick:a,autoClogProps:r})=>t?n.createElement(o.A,{eventId:m.EventId.NEWXP_TEAM_CREATE,uiStep:m.UiStep.PROG_DISC_TIP,stepVariant:g.ml.FirstMessage,elementName:g.V9.Flag,clogImpression:!0},n.createElement(c.Nm,{className:"p-context_bar__prog_disc_tip","data-qa":"flag_tip--first_message",onClick:a,autoClogProps:r},n.createElement("div",{className:l()("p-context_bar__prog_disc_tip_flag",{"p-context_bar__prog_disc_tip_flag--exiting":e})},y.rt("\u{1F447} <strong>Start here</strong>")))):null;BaseContextBarFirstMessageProgressiveDisclosure.displayName="BaseContextBarFirstMessageProgressiveDisclosure";let ConnectedContextBarFirstMessageProgressiveDisclosure=()=>{let e=(0,u.d4)(e=>(0,b.jv)(e,{tip:g.ml.FirstMessage})),t=(0,u.d4)(e=>(0,b.Wg)(e,{tip:g.ml.FirstMessage})),a=(0,u.d4)(b.$O),i=(0,r.wA)(),l=(0,n.useCallback)(e=>{i((0,p.A)(e))},[i]),[o,s]=(0,n.useState)(e);(0,d.L)(g.ml.FirstMessage,g.V9.Flag),(0,n.useEffect)(()=>{i((0,_.F_)(!0))},[i]),(0,n.useEffect)(()=>{let a;return o&&!e&&(t?a=window.setTimeout(()=>{s(!1)},f.f9):s(!1)),()=>{a&&clearTimeout(a)}},[o,t,e]);let c=(0,n.useCallback)(()=>{l({notificationName:h.ze.PD_FIRST_MESSAGE,action:h.hw.CLICK,step:g.V9.Flag}),s(!1),a?.tip===g.ml.FirstMessage&&i((0,_.uu)({state:g.V9.Explainer,tip:g.ml.FirstMessage}))},[l,i,a]),m=(0,n.useMemo)(()=>({onClick:{enableClogAction:!0}}),[]);return n.createElement(BaseContextBarFirstMessageProgressiveDisclosure,{showProgressiveDisclosureFirstMessageTipExplainer:t,progressiveDisclosureFirstMessageTipFlagVisible:o,onProgDiscTipClick:c,autoClogProps:m})};ConnectedContextBarFirstMessageProgressiveDisclosure.displayName="ConnectedContextBarFirstMessageProgressiveDisclosure";let A=(0,n.memo)(ConnectedContextBarFirstMessageProgressiveDisclosure)},0xe4cfbb6a:(e,t,a)=>{"use strict";a.d(t,{q:()=>shouldDisplayAgentforceBanner});var n=a(0x12185e091),r=a(0x1ccef1c6f),i=a(0x217553e42),l=a(0xc1360909);function shouldDisplayAgentforceBanner(e,t){let a=(0,i.OL)(e,t.channelId),o=t.channelId?(0,l.qg)(e,t.channelId):0;return!(0,r.ty)(e,"agents_in_channel_banner_hidden")&&!(!a||(0,n.LI)(a))&&!!o&&!!(o>0)&&!t.threadTs}},0x208817cec:(e,t,a)=>{"use strict";a.d(t,{r:()=>shouldDisplayDndDMBanner});var n=a(0x12185e091),r=a(0x280afe13),i=a(0x1b9d5cc0c),l=a(0x217553e42),o=a(0x74130fc1),s=a(0xe684f705);function shouldDisplayDndDMBanner(e,t){let a=(0,l.OL)(e,t.channelId);if((0,n.LI)(a)){let t=(0,r.e)(a),n=(0,s.nv)(e,t);if((0,i.zU)(n)||(0,i.fy)(n)||(0,i.po)(n))return!1;if(t&&(0,o.Vd)(e,t))return!0}let c=t.memberIds||[];if(!a&&c.length&&1===c.length){let t=c[0],a=(0,s.nv)(e,t);if((0,i.zU)(a)||(0,i.fy)(a)||(0,i.po)(a))return!1;if((0,o.Vd)(e,t))return!0}return!1}},0x11dc1796d:(e,t,a)=>{"use strict";a.d(t,{v:()=>shouldDisplaySharedBanner});var n=a(0x19c76507b),r=a(0x143fb6398),i=a(0x217553e42);function shouldDisplaySharedBanner(e,t){let a=(0,i.OL)(e,t.channelId);if((0,r.ju)(a))return!0;let l=t.memberIds||[];return!!(!a&&l.length&&l.some(t=>(0,n.i)(e,t)))||!1}},0x47f5ae2:(e,t,a)=>{"use strict";a.d(t,{r:()=>getContextBarTypeForChannel});var n=a(0x1e2051844),r=a(0x210b39689),i=a(0x217553e42);function getContextBarTypeForChannel(e,t,a=[],{draftId:l,viewContext:o,aiAppsContext:s,inputHasFiles:c,threadTs:d}={}){let m=(0,i.OL)(e,t),u={draftId:l,channelId:t,memberIds:a,viewContext:o,aiAppsContext:s,inputHasFiles:c,threadTs:d};if(!m&&!a.length)return null;let p=(0,n.A)(r.mf,t=>t.displayRule(e,u));return p?p.type:null}},0x4f795111:(e,t,a)=>{"use strict";a.d(t,{h:()=>isDuringMemberNighttime});var n=a(0x18f2150ea),r=a(0x4bdf0df6),i=a(0x1b9d5cc0c),l=a(0x1ec68d6a3);function isDuringMemberNighttime(e,t){let a=(0,l.Wo)();try{let a=(0,r.Ay)(e,{timeZone:(0,i.et)(t)||void 0,timeZoneOffset:(0,i.BM)(t),do24hrTime:!0,returnMoment:!0,noTzFallback:!0}).hour();return(0,n.A)(a)&&(a>=22||a<8)}catch(e){return a.error("isDuringMemberNighttime invalid timezone error: ",e),!1}}},0x11253e6a6:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xf4930165),l=a(0x9de95c9f),o=a(0x12edaa96a),s=a(0xf3c40abe),c=a(0x99233ecb),d=a(0x4c96e5d9),m=a(0x1059ba41d);let u=class extends n.Component{static defaultProps={overrideDefaultMenu:!1,desktopAppOnly:!0,hasKeyboardFocus:!1,showSlackKitContextMenuOnDesktop:!1,onClick:r.A,onClose:r.A,isDisabled:!1,forceOpen:!1,stripTerminalSeparators:!1,suppressDragRegionsWhenOpen:!1};constructor(e){super(e),this.onDesktopContextMenu=this.onDesktopContextMenu.bind(this),this.renderMenuFromTemplate=this.renderMenuFromTemplate.bind(this),this.onContextMenuOpen=this.onContextMenuOpen.bind(this)}onDesktopContextMenu(e){let{getTemplate:t,overrideDefaultMenu:a}=this.props,addIdsToItem=e=>({...e,id:(0,o.A)(),submenu:e.submenu&&e.submenu.map(addIdsToItem)}),n=t?t().map(addIdsToItem):[];if(!n.length)return;let{x:r,y:l}=(0,i.A)(this.getCoordinatesForContextMenu(e),e=>(0,m.xhB)()*e);(0,m.O0f)(n,{x:r,y:l,overrideDefaultMenu:a}),this.props.onClick&&this.props.onClick()}getCoordinatesForContextMenu(e){if(!this.props.hasKeyboardFocus||!e)return{};let{left:t,top:a,width:n,height:r}=e.currentTarget.getBoundingClientRect();return{x:t+n/2,y:a+r/2}}renderMenuFromTemplate(e){let{getTemplate:t,width:a,showSlackKitContextMenuOnDesktop:r,menuAriaLabel:i}=this.props;function removeKeyboardAccelerators(e){return e.replace(/&([\w&])/g,(e,t)=>t)}let l=t?t().map(e=>!e.label||r?e:{...e,label:removeKeyboardAccelerators(e.label)}):[];return l.length?n.createElement(c.a,{"aria-label":i,width:a,...e,template:l,isContextMenu:!0,stripTerminalSeparators:!0}):null}onContextMenuOpen(){(0,d.Ws)(),this.props.onContextMenuOpen?.()}render(){if((0,m.g9M)()&&!this.props.showSlackKitContextMenuOnDesktop)return(0,l.A)(this.props.children,{onContextMenu:this.onDesktopContextMenu});let{forceOpen:e,onClick:t,onClose:a,isDisabled:r,renderMenu:i,preventScroll:o,suppressDragRegionsWhenOpen:s}=this.props;return this.props.desktopAppOnly?(0,l.A)(this.props.children):n.createElement(c.cQ,{isContextMenu:!0,position:"right-bottom",tryOppositePosition:!0,forceOpen:e,shouldFade:!1,renderMenu:i||this.renderMenuFromTemplate,onClick:t,onClose:a,isDisabled:r,preventScroll:o,onPopoverOpen:this.onContextMenuOpen,suppressDragRegionsWhenOpen:s,dangerouslyQuietNonFocusableElementWarning:this.props.dangerouslyQuietNonFocusableElementWarning},this.props.children)}};u.displayName="ContextMenuTrigger";let p=(0,s.A)(u)},0xadd564f8:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x9de95c9f),l=a(0x11253e6a6),o=a(0x6d72337),s=a(0x226892387),c=a(0x19c76d181);let ChannelContextMenu=({id:e,children:t,forceOpen:a=!1,onClick:d,onClose:m,menuAriaLabel:u,sidebar:p,header:h,channelSection:_,onEnterEditModeClick:f,transitionFocusTo:b})=>{let g=(0,s.d4)(c.TZ),y=(0,r.wA)(),A=(0,n.useCallback)(()=>y((0,o.QO)({id:e,sidebar:p,header:h,channelSection:_,onEnterEditModeClick:f,transitionFocusTo:b})),[y,e,p,h,_,f,b]);return g&&e?n.createElement(l.A,{menuAriaLabel:u,getTemplate:A,overrideDefaultMenu:!0,desktopAppOnly:!1,showSlackKitContextMenuOnDesktop:!0,forceOpen:a,onClick:d,onClose:m,width:"auto"},t):(0,i.A)(t)};ChannelContextMenu.displayName="ChannelContextMenu";let d=ChannelContextMenu},0xea85cdc2:(e,t,a)=>{"use strict";a.d(t,{X:()=>combineTemplates});var n=a(0xaf5a1707);function combineTemplates(e){return e.filter(n.E).reduce((e,t,a)=>(0!==a&&e.push({type:"separator"}),e.push(...t),e),[])}},0x2f2d8a30:(e,t,a)=>{"use strict";a.d(t,{AB:()=>useGetMenuTemplateMessage,Jv:()=>P,TX:()=>useGetMenuTemplateCopyDisplayName,WF:()=>M,n1:()=>w,s5:()=>N,s9:()=>I});var n=a(0x16cf1da63),r=a(0x1cbdfeceb),i=a(0xc9c97240),l=a(0x20482ad21),o=a(0x1b9d5cc0c),s=a(0x82980ab8),c=a(0x21d85d6e5),d=a(0xf2964a91),m=a(0x4b8e0952),u=a(0xa1832ae4),p=a(0x1ed767a16),h=a(0x3711e82d),_=a(0x45012309),f=a(0x24558b75f),b=a(0x11c82607b),g=a(0x9b971e7e),y=a(0x226892387),A=a(0x12b31912f),x=a(0x4cd7b414),E=a(0xb129c1d5),C=a(0xe684f705),k=a(0x1ee439e69);let v=new l.Ay("member_profile"),S=(0,i.Mz)((e,{memberId:t})=>(0,C.nv)(e,t),(e,{memberId:t})=>(0,E.a)(e,t),(e,t)=>{let a=(0,s.Gt)(e),n=(0,d.o)(e),r=t?v.t("Copy display name"):v.t("Copy display name: @{displayName}",{displayName:a,__react:!0});return!n&&a?{key:"copy_display_name",dataQa:"copy_display_name",label:r,click:()=>{(0,p.x3)(a)},show:!0,disabled:(0,m.z1)(e)}:null}),useGetMenuTemplateCopyDisplayName=({memberId:e})=>(0,y.d4)(t=>e?S(t,{memberId:e}):void 0),I=(0,b.Ay)("Gets the template for copy display name menu item",(e,t,a)=>S(t(),a));I.meta={name:"getMenuTemplateCopyDisplayNameThunk",key:"createThunkGetMenuTemplateCopyDisplayNameThunk",description:"Gets the template for copy display name menu item"};let w=(0,b.Ay)("Clog member context item click",(e,t,a)=>{(0,_.eo)({getState:t}).track(h.EventId.CONTEXT_MENU_ACTION,{label:a,is_iap1:!0})});w.meta={name:"clogItemClick",key:"createThunkClogItemClick",description:"Clog member context item click"};let T=(0,b.Ay)("Gets the template for copy display name menu item",(e,t,a)=>{let{memberId:n,label:r}=a,i=(0,c.sE)(t(),(0,C.nv)(t(),n));return{label:v.t("Copy name"),click:()=>{e(w(r));try{(0,p.LJ)({"text/plain":i,"text/html":`<span data-stringify-id="${n}" data-stringify-label="${i}">${i}</span>`})}catch{(0,p.x3)(i)}}}});T.meta={name:"getMenuTemplateCopyName",key:"createThunkGetMenuTemplateCopyName",description:"Gets the template for copy display name menu item"};let N=(0,b.Ay)("Gets the template for copy name menu item",(e,t,a)=>e(T(a)));N.meta={name:"getMenuTemplateCopyNameThunk",key:"createThunkGetMenuTemplateCopyNameThunk",description:"Gets the template for copy name menu item"};let M=(0,b.Ay)("Copies link to member to clipboard",(e,t,a)=>{e(w(a.label));let n=t(),r=(0,k._J)(n,(0,g.ZT)(n)||"");(0,p.x3)((0,u.Zl)(r,`/team/${a.memberId}`))});M.meta={name:"copyMemberLink",key:"createThunkCopyMemberLink",description:"Copies link to member to clipboard"};let R=(0,i.Mz)(e=>e,(e,t,{onClickCallback:a=r.A})=>a,(e,t,{isCanvasContext:a})=>a,(e,t,{memberId:a})=>(0,C.nv)(t,a),(e,t,{memberId:a})=>(0,c.sE)(t,(0,C.nv)(t,a)),(e,t,{memberId:a})=>(0,A.zP)(t,a||""),(e,t,a,n,r,i)=>{let l=(0,d.o)(n),s=v.rt("Message {memberName}",{memberName:r})||"";return(a&&(s=l?v.t("View message history"):v.t("Message")),!i||(0,o.po)(n)||a&&(0,o.fy)(n))?null:{key:"message",dataQa:"message",label:s,click:a=>{e((0,x.Z)({memberId:n.id,shouldOpenInTile:(0,f.Cz)(a),reason:"member-context-menu"})).then(()=>t())},show:!!n,disabled:(0,m.z1)(n)}}),useGetMenuTemplateMessage=({memberId:e,isCanvasContext:t,onClickCallback:a})=>{let r=(0,n.wA)();return(0,y.d4)(n=>e?R(r,n,{memberId:e,isCanvasContext:t,onClickCallback:a}):void 0)},P=(0,b.Ay)("Gets the template for message menu item",(e,t,a)=>R(e,t(),a));P.meta={name:"getMenuTemplateMessageThunk",key:"createThunkGetMenuTemplateMessageThunk",description:"Gets the template for message menu item"}},0x1a75b085a:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x9de95c9f),l=a(0x11253e6a6),o=a(0x31613096),s=a(0x1c91944c9),c=a(0x19c76d181);let d=class extends n.Component{static defaultProps={id:void 0,onClick:r.A};constructor(e){super(e),this.getContextMenuTemplate=this.getContextMenuTemplate.bind(this)}getContextMenuTemplate(){return this.props.getMemberContextMenuTemplate({id:this.props.id})}render(){let{id:e,isClient:t}=this.props;return t&&e?n.createElement(l.A,{getTemplate:this.getContextMenuTemplate,overrideDefaultMenu:!0,desktopAppOnly:!1,showSlackKitContextMenuOnDesktop:!0,width:"auto",onClick:this.props.onClick},this.props.children):(0,i.A)(this.props.children)}};function mapStateToProps(e){return{isClient:(0,c.TZ)(e)}}d.displayName="MemberContextMenu";let m=(0,s.N)(mapStateToProps,e=>({getMemberContextMenuTemplate:t=>e((0,o.nz)(t))}))(d)},0x31613096:(e,t,a)=>{"use strict";a.d(t,{i8:()=>E,nz:()=>C});var n=a(0x20482ad21),r=a(0x133aaa7da),i=a(0xb041cb4d),l=a(0x2f2d8a30),o=a(0x50ff7328),s=a(0x1a02c72b5),c=a(0xd6a16321),d=a(0x21d85d6e5),m=a(0x1348755b9),u=a(0xcaa08ff7),p=a(0x2513da192),h=a(0x11c82607b),_=a(0x24f936d91),f=a(0xe684f705);let b=new n.Ay("menu"),g="add_priority_user",y="remove_priority_user",A=(0,h.Ay)("get the context menu item for actions",(e,t,{id:a})=>{let n=[];if((0,o.A)(t()))return n;let i=e((0,l.Jv)({memberId:a,onClickCallback:()=>(0,l.n1)("message_member")}));return i&&n.push(i),n.length&&n.push({type:r.A.separator}),n});A.meta={name:"getActionsTemplate",key:"createThunkGetActionsTemplate",description:"get the context menu item for actions"};let x=(0,h.Ay)("get the context menu item for sharing a contact",(e,t,{id:a})=>{let n=t();return(0,m.VX)(n,a||"")&&!(0,o.A)(n)?[{label:b.t("Share contact"),click:()=>e((0,_.A)({contactUserId:a}))},{type:r.A.separator}]:[]});x.meta={name:"getShareContactActionMaybe",key:"createThunkGetShareContactActionMaybe",description:"get the context menu item for sharing a contact"};let E=(0,h.Ay)("get the context menu item for adding to or removing from VIP",(e,t,{id:a,includeSeparator:n})=>{let o=t(),s=(0,f.nv)(o,a),c=(0,i.GL)(o,s);if(!a||!c)return[];let m=(0,u.mF)(o,a),h=(0,d.sE)(o,(0,f.nv)(o,a)),_=[{label:m?b.rt("Remove from VIP",{memberName:h}):b.rt("Add to VIP",{memberName:h}),click:()=>{e((0,l.n1)(m?y:g)),e((0,p.C)(a))},autoClogProps:{label:m?y:g}}];return n&&_.push({type:r.A.separator}),_});E.meta={name:"getToggleVipActionMaybe",key:"createThunkGetToggleVipActionMaybe",description:"get the context menu item for adding to or removing from VIP"};let C=(0,h.Ay)("get the context menu template when user clicks on a member",(e,t,{id:a})=>[{label:b.t("View profile"),click:()=>{e((0,l.n1)("view_profile")),e((0,s.o)((0,c.Fo)({memberId:a||""})))}},{type:r.A.separator},...e(A({id:a})),...e(E({id:a,includeSeparator:!0})),...e(x({id:a})),e((0,l.s5)({memberId:a,label:"copy_member_name"})),e((0,l.s9)({memberId:a})),{label:b.t("Copy link"),click:()=>{e((0,l.WF)({memberId:a,label:"copy_member_link"}))}}].filter(e=>!!e));C.meta={name:"getMemberContextMenuTemplate",key:"createThunkGetMemberContextMenuTemplate",description:"get the context menu template when user clicks on a member"}},0x1a36e6baf:(e,t,a)=>{"use strict";a.d(t,{N:()=>CreateChannelModalAlert});var n=a(0xbad225b5),r=a(0x9f7220f0),i=a(0x1ea53dc3a),l=a(0x2b7f0bcc),o=a(0x217c68a35);let CreateChannelModalAlert=({icon:e="info",level:t=o.$b.Info,className:a="p-create_channel_modal-alert_above_content",children:s})=>n.createElement(r.z,{assertive:!0,deferBy:i.i5},n.createElement("div",{className:a},n.createElement(l.Ay,{type:"boxed",level:t,icon:e,"data-qa":"create-channel-alert"},s)));CreateChannelModalAlert.displayName="CreateChannelModalAlert"},0xbdf67ceb:(e,t,a)=>{"use strict";a.d(t,{C:()=>CreateChannelModalSelectWorkspace});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1d2cd7755),l=a(0x1d1911997),o=a(0x11aaf59fe),s=a(0x1de80d519),c=a(0xfca3fd81);let d=new r.Ay("create_channel_modal"),CreateChannelModalSelectWorkspace=({onWorkspaceSelection:e,workspaceOptions:t,selectedWorkspace:a,isNewSetup:r=!1,focusOnMount:m=!0})=>{let u=(0,n.useCallback)(t=>{e(t.value)},[e]),p=t.find(e=>e.key===a?.id),h=(0,n.useCallback)(e=>n.createElement(s.e,{className:"padding_0",id:e.value?.id,secondaryContent:e.displayReason}),[]),_=[{id:"workspace_hint",message:d.t("Only the people in the workspace you choose will be able to view and join this channel.")}];return n.createElement(i.A,{id:"workspace-select--label",htmlFor:"workspace-select",type:i.Q.block,cursor:"pointer",text:d.t("Workspace")},n.createElement(l.Ay,{className:"p-create_channel_modal_workspace-selector",classPrefix:"p-create_channel_modal",selectId:"create_channel_select_workspace",options:t,onOptionSelected:u,renderOption:h,renderSelectedOption:h,selectedOption:p,hints:_,placeholderText:d.t("Select a workspace"),ariaLabel:d.t("Please select a workspace"),ariaDescribedBy:"workspace-select--label",size:r?o.hu.MEDIUM:o.hu.LARGE,width:"100%",showDropdownIcon:!0,isRequired:!0,focusOnMount:m,autoClogProps:c.mg,expandOnFocus:!1,shouldAllowUnselectInSingleSelectMode:!1}))};CreateChannelModalSelectWorkspace.displayName="CreateChannelModalSelectWorkspace"},0x108c11d8b:(e,t,a)=>{"use strict";a.d(t,{L:()=>CreateChannelModalVisibilityRadioGroup});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1d2cd7755),l=a(0x139c79d16),o=a(0xa5dbe09b),s=a(0x18def662b),c=a(0x1a36e6baf),d=a(0x195fc6ac7),m=a(0xfca3fd81),u=a(0x217c68a35),p=a(0x61f75169),h=a(0x226892387);let _=new r.Ay("create_channel_modal"),CreateChannelModalVisibilityRadio=({id:e,isChecked:t,isDisabled:a=!1,labelText:r,labelSubText:o,onVisibilityChange:s,focus:c=!1})=>n.createElement(i.A,{htmlFor:e,type:"inline",text:r,subtext:o,isDisabled:a},n.createElement(l.A,{id:e,checked:t,name:"create-channel-visibility",value:e,"data-qa":`${e}-option`,onChange:s,disabled:a,autoFocus:c,autoClogProps:(0,m.XG)(e)}));CreateChannelModalVisibilityRadio.displayName="CreateChannelModalVisibilityRadio";let CreateChannelModalVisibilityRadioGroup=({selectedChannelVisibility:e,workspaceTitle:t,onVisibilityChange:a,selectedWorkspaceId:r,isUserGroupSection:i=!1,channelSectionUserGroup:l,autoFocus:m=!0})=>{let f=(0,h.d4)(s.tv),{canCreatePrivateChannels:b,canCreatePublicChannels:g}=(0,d.q)(r),y=!b||!g,A="";y&&!b&&(A=_.t("This workspace only allows you to create public channels.")),y&&!g&&(A=_.t("This workspace only allows you to create private channels."));let x=(0,p.ue)(l),E=(0,p.Br)(l),C=f?_.rt("{memberCount, plural, =1 {One member} other {All {memberCount} members}} of the <strong>{userGroupName}</strong> group will be automatically added to this channel.",{memberCount:E,userGroupName:x}):"";return n.createElement(n.Fragment,null,f&&i&&n.createElement(c.N,{level:u.$b.Info},C),n.createElement(o.A,{className:"p-create_channel_modal-visibility_radio_group","data-qa":"p-create_channel_modal-visibility_radio_group",legendText:_.t("Visibility")},n.createElement(CreateChannelModalVisibilityRadio,{id:u.Z2.Public,isChecked:e===u.Z2.Public&&g,isDisabled:!g,labelText:_.rt("Public \u2014 anyone in <b>{workspace}</b>",{workspace:t}),onVisibilityChange:a,focus:m&&e===u.Z2.Public&&g}),n.createElement(CreateChannelModalVisibilityRadio,{id:u.Z2.Private,isChecked:e===u.Z2.Private&&b,isDisabled:!b,labelText:_.t("Private \u2014 only specific people"),labelSubText:_.t("Can only be viewed or joined by invitation"),onVisibilityChange:a,focus:m&&e===u.Z2.Private&&b})),y&&n.createElement(c.N,{level:u.$b.Default,"data-qa":"p-create_channel_modal-visibility_radio_group_alert"},A))};CreateChannelModalVisibilityRadioGroup.displayName="CreateChannelModalVisibilityRadioGroup"},0x142583dce:(e,t,a)=>{"use strict";a.d(t,{x:()=>CreateChannelName});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xd1cb3630),l=a(0xa73d9069),o=a(0xfca3fd81),s=a(0x4d020ec2),c=a(0x74bbb29a);let d=new r.Ay("create_channel_modal"),CreateChannelName=({disableHintText:e,channelName:t,nameInputSize:a,onChannelNameChange:r,onChannelValidationChange:m,channelNameErrors:u,teamId:p,workspaceName:h,isNameValidating:_,isOffline:f,showProgressiveDisclosureExplainerTip:b,suppressInlineError:g,isNewSetup:y=!1,focusOnMount:A,announceLabelWithHint:x})=>{let{isLoadingChannelPrefixes:E,channelPrefixes:C}=(0,l.J)(f,p),k=y?d.t("Channel name"):d.t("Name"),v=d.t("Channels are where conversations happen around a topic. Use a name that is easy to find and understand."),S="channel_create_modal_name";return n.createElement(n.Fragment,null,b&&n.createElement(s.A,{stepVariant:c.ml.AddChannels}),n.createElement("label",{htmlFor:S,className:"c-label",id:`${S}-label`},n.createElement("span",{className:"c-label__text"},k)),n.createElement(i.A,{id:S,name:"channel_create_modal_name",customHintText:v,size:a,disableHintText:e,channelName:t,onChannelNameChange:r,onChannelValidationChange:m,channelNameErrors:u,isLoading:E,showChannelPrefixes:!f,channelPrefixes:C,useInlineAlert:!0,customErrorMessage:!1,teamId:p,workspaceName:h,autoClogProps:o.G5,shouldValidateChannelNameOnLoad:""!==t||_,suppressInlineError:g,focusOnMount:A,announceLabelWithHint:x}))};CreateChannelName.displayName="CreateChannelName"},0xfcd5cf0f:(e,t,a)=>{"use strict";a.d(t,{C:()=>useChannelName});var n=a(0xbad225b5),r=a(0x1aba66b56);let useChannelName=e=>{let[t,a]=(0,n.useState)(e??""),[i,l]=(0,n.useState)({hasNameRequiredWarning:!1,hasMaxLengthWarning:!1,hasSpecialsWarning:!1,hasPunctuationWarning:!1,hasNameTakenWarning:!1}),[o,s]=(0,n.useState)(!1),c=(0,n.useMemo)(()=>(0,r.A)(Object.values(i),!0),[i]);return{hasNameErrors:c,channelName:t,onChannelNameChange:(0,n.useCallback)(e=>{a(e),s(!0)},[a,s]),onChannelValidationChange:(0,n.useCallback)(e=>{l(e),s(!1)},[l,s]),channelNameErrors:i,isNameValidating:o}}},0xa73d9069:(e,t,a)=>{"use strict";a.d(t,{J:()=>useChannelPrefixes});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x226892387),l=a(0x106c21b62),o=a(0x17294c72a),s=a(0x2c04409),c=a(0x11c82607b),d=a(0xf606943);let m=(0,c.Ay)("Fetches and upserts channel prefixes using conversations.channelPrefixes.list",(e,t,a)=>e((0,s.h)({reason:"fetch-channel-prefixes",teamId:a})).then(({channel_prefixes:t})=>{e((0,d.yV)((0,o.A)(t,e=>e.prefix)))}));m.meta={name:"fetchAndUpsertChannelPrefixesList",key:"createThunkFetchAndUpsertChannelPrefixesList",description:"Fetches and upserts channel prefixes using conversations.channelPrefixes.list"};let useChannelPrefixes=(e,t)=>{let a=(0,i.d4)(l.u),o=(0,r.wA)(),[s,c]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{e||(c(!0),o(m(t)).finally(()=>c(!1)))},[c,o,e,t]),{isLoadingChannelPrefixes:s,channelPrefixes:a}}},0x1e05c388c:(e,t,a)=>{"use strict";a.d(t,{f:()=>useChannelVisibilityOptions});var n=a(0xbad225b5),r=a(0x217c68a35),i=a(0xb1f0729f),l=a(0x226892387);let useChannelVisibilityOptions=(e,t,a)=>{let o=(0,l.d4)(e=>(0,i.wc)(e,"default_create_private_channel")),s=!e||o||a,[c,d]=(0,n.useState)((!e||s)&&t?r.Z2.Private:r.Z2.Public);return(0,n.useEffect)(()=>{s&&t?d(r.Z2.Private):d(r.Z2.Public)},[t,s]),{selectedVisibility:c,onVisibilityChange:(0,n.useCallback)(e=>{let{value:t}=e.target;d(t)},[])}}},0x1a7868b3:(e,t,a)=>{"use strict";a.d(t,{f:()=>useSteps});var n=a(0xbad225b5),r=a(0xb62e6bf4),i=a(0xd5c49cfc),l=a(0x217c68a35);let o=(0,a(0x1bc4b3ad8).F)(i.$g,e=>{let t=[];return e&&t.push(l.a2.Workspace),t.push(l.a2.Name),t.push(l.a2.Visibility),t});var s=a(0x226892387);let useSteps=e=>{let t=(0,s.Z2)(e=>o(e));(!(0,s.d4)(r.ss)||e<=1)&&(t=t.filter(e=>e!==l.a2.Workspace));let a=t.length,[i,c]=(0,n.useState)(1),[d,m]=(0,n.useState)(t[0]||l.a2.Name),u=(0,n.useRef)(1),p=(0,n.useCallback)(()=>{c(e=>e+1)},[]),h=(0,n.useCallback)(()=>{c(e=>e-1)},[]);return(0,n.useEffect)(()=>{m(t[i-1]),u.current=i},[i,t]),{currentStep:d,currentStepIndex:i,totalSteps:a,handleClickNext:p,handleClickPrev:h}}},0x195fc6ac7:(e,t,a)=>{"use strict";a.d(t,{q:()=>useUserCreateChannelPermissions});var n=a(0x13eb6f5d3),r=a(0x795b02ed),i=a(0x46b7272d),l=a(0x226892387);let useUserCreateChannelPermissions=e=>{let t=(0,l.d4)(t=>(0,r.S)(t).includes(e)),a=(0,l.d4)(t=>(0,i.y5)(t).includes(e));return{canCreateChannels:(0,l.d4)(n.MM),canCreatePrivateChannels:t,canCreatePublicChannels:a}}},0x3f9a5f74:(e,t,a)=>{"use strict";a.d(t,{j:()=>useWorkspaceSelection});var n=a(0xbad225b5),r=a(0x17294c72a),i=a(0x2264e6ea3),l=a(0x1ec69ee01),o=a(0xf159cb74),s=a(0x9b971e7e),c=a(0x226892387),d=a(0x217553e42),m=a(0xe684f705),u=a(0xd5c49cfc),p=a(0x1ee439e69);let useWorkspaceSelection=({initialWorkspaceId:e}={})=>{let t,a,h,_=(0,c.wz)(u.rp),f=(t=(0,c.d4)(m.cA),a=(0,c.d4)(d.h3),h=(0,c.d4)(s.s_),(0,n.useMemo)(()=>{let e=(0,r.A)(a.filter(e=>(0,l.Wb)(e)===t.id).filter(e=>(0,i.Ay)((0,o.c)(e))),e=>(0,l.B9)(e)).reverse(),n=e.length>0?_.find(t=>t.key===(0,o.c)(e[0])&&!t.isDisabled)?.value:void 0;return n||(n=_.find(e=>e.key===h&&!e.isDisabled)?.value),n||(n=_.find(e=>void 0!==e.key&&!e.isDisabled)?.value),n},[h,a,_,t])),b=(0,c.d4)(t=>(0,p._J)(t,e)),[g,y]=(0,n.useState)(b??f),A=(0,n.useCallback)(e=>{e.id!==g?.id&&y(e)},[y,g]);return{workspaceOptions:_,selectedWorkspace:g,onWorkspaceSelection:A}}},0x85adcd9b:(e,t,a)=>{"use strict";a.d(t,{u:()=>c});var n=a(0x1cbdfeceb),r=a(0x1a02c72b5),i=a(0xd6a16321),l=a(0x11c82607b),o=a(0x1b654c3cf),s=a(0x1fcbb004d);let c=(0,l.Ay)("Handles the actions after a channel has been created",(e,t,{channel:a,onChannelCreated:l,entryPoint:c,initialInvitedMemberIds:d,initialInvitedEmails:m,skipChannelNavigation:u,isUserGroupSection:p,trackingId:h,focusHandler:_=n.A})=>{let finalActions=()=>{p?e((0,s.O)()):(l&&l(a),e((0,o._)({channelId:a.id,entryPoint:`${c}_via_channel_create_modal`,isFromCreate:!0,initialSelectedMemberIds:d,initialSelectedEmails:m,trackingId:h,onClose:_})))};u?finalActions():e((0,r.o)((0,i.pr)(a.id)))?.then(()=>{finalActions()})});c.meta={name:"onCreateChannelComplete",key:"createThunkOnCreateChannelComplete",description:"Handles the actions after a channel has been created"}},0xfca3fd81:(e,t,a)=>{"use strict";a.d(t,{G5:()=>l,XG:()=>createVisibilityAutoClogProps,mg:()=>i,rE:()=>createButtonAutoClogProps,u:()=>getClogStep});var n=a(0x217c68a35),r=a(0x3711e82d);let getClogStep=e=>{switch(e){case n.a2.Workspace:return r.UiStep.CREATE_CHANNEL_WORKSPACE_MODAL;case n.a2.Name:return r.UiStep.CREATE_CHANNEL_NAME_MODAL;case n.a2.Visibility:return r.UiStep.CREATE_CHANNEL_VISIBILITY_MODAL;default:return""}},i={elementName:"workspace_selection",onOptionSelected:{enableClogAction:!0}},l={elementName:"channel_name_input",elementType:r.ElementType.INPUT,onChange:{enableClogAction:!0}},createButtonAutoClogProps=(e,t=!1)=>({elementName:e.toLowerCase(),isPrimaryCTA:t,onClick:{enableClogAction:!0}}),createVisibilityAutoClogProps=e=>({elementType:r.ElementType.RADIO,elementName:({public:"visibility_setting_public",private:"visibility_setting_private"})[e],onChange:{enableClogAction:!0}})},0x28d34b36:(e,t,a)=>{"use strict";a.d(t,{X:()=>getCreateChannelErrorObject});var n=a(0x1c8f352ff);let getCreateChannelErrorObject=e=>{let t=n.gi;switch(e.name){case"invalid_name_specials":t={...n.gi,hasSpecialsWarning:!0};break;case"invalid_name_punctuation":t={...n.gi,hasPunctuationWarning:!0};break;case"name_taken":t={...n.gi,hasNameTakenWarning:!0};break;case"invalid_name_maxlength":t={...n.gi,hasMaxLengthWarning:!0};break;case"invalid_name_required":t={...n.gi,hasNameRequiredWarning:!0};break;case"restricted_action":t={...n.gi,hasRestriction:!0};break;default:t={...n.gi,hasUnknownWarning:!0}}return t}},0xd5c49cfc:(e,t,a)=>{"use strict";a.d(t,{$g:()=>x,Mo:()=>y,rp:()=>A});var n=a(0x17294c72a),r=a(0x1d24ec95f),i=a(0xc9c97240),l=a(0x20482ad21),o=a(0x2264e6ea3),s=a(0x1fef2be00),c=a(0x1aad32b98),d=a(0xa1832ae4),m=a(0x1edb6b65f),u=a(0x795b02ed),p=a(0x46b7272d),h=a(0x1cf0d97e1),_=a(0x9b971e7e),f=a(0xe684f705),b=a(0x1ee439e69);let g=new l.Ay("create_channel_modal"),y=(0,h.Ay)(e=>{let t=(0,f.cA)(e),a=(0,c.HI)(t),r=(0,b.H7)(e);if(!r)return[];let i=(0,_.VO)(e)||[],l=[...new Set([r.id,...a,...i])].filter(e=>!(0,o.JV)(e)).map(t=>(0,b._J)(e,t)).filter(e=>!!e&&!(0,d.Zx)(e));return(0,n.A)(l,e=>(0,d.F1)(e))});y.meta={name:"getAllInvitableWorkspaces",key:"createSelectorGetAllInvitableWorkspaces",description:e=>{let t=(0,f.cA)(e),a=(0,c.HI)(t),r=(0,b.H7)(e);if(!r)return[];let i=(0,_.VO)(e)||[],l=[...new Set([r.id,...a,...i])].filter(e=>!(0,o.JV)(e)).map(t=>(0,b._J)(e,t)).filter(e=>!!e&&!(0,d.Zx)(e));return(0,n.A)(l,e=>(0,d.F1)(e))}};let mapWorkspacesToSelectOptionItems=(e,t)=>{let a=t?.map(e=>e.id);return e.map(e=>({label:(0,d.F1)(e),value:e,optgroup:e.enterprise_name,key:e.id,isDisabled:!!(void 0!==a&&a.includes(e.id)),displayReason:t?.find(t=>t.id===e.id)?.displayReason??""}))},mapInvitableWorkspacesToSelectOptions=(e,{ineligibleWorkspaces:t,excludeExternalWorkspaces:a})=>{let[n,i]=(0,r.A)(e,e=>(0,m.N)(e));return[...mapWorkspacesToSelectOptionItems(i,t),...!a&&n.length>0?[{value:void 0,label:"",type:"divider"},...mapWorkspacesToSelectOptionItems(n,t)]:[]]},A=(0,h.Ay)(e=>{let t=(0,s.g)(e),a=(0,p.y5)(e),n=(0,u.S)(e),r=y(e),i=r.filter(e=>!a.includes(e.id)&&!n.includes(e.id)).map(e=>({id:e.id,displayReason:t?"":g.t("You don\u2019t have access to this")}));return mapInvitableWorkspacesToSelectOptions(r,{ineligibleWorkspaces:i})});A.meta={name:"getAllInvitableWorkspaceSelectOptions",key:"createSelectorGetAllInvitableWorkspaceSelectOptions",description:e=>{let t=(0,s.g)(e),a=(0,p.y5)(e),n=(0,u.S)(e),r=y(e),i=r.filter(e=>!a.includes(e.id)&&!n.includes(e.id)).map(e=>({id:e.id,displayReason:t?"":g.t("You don\u2019t have access to this")}));return mapInvitableWorkspacesToSelectOptions(r,{ineligibleWorkspaces:i})}};let x=(0,i.Mz)(y,e=>e.length>1)},0x217c68a35:(e,t,a)=>{"use strict";a.d(t,{$b:()=>d,IV:()=>m,Z2:()=>u,a2:()=>s,oH:()=>c});var n,r,i,l,o,s=((n={}).Name="name",n.Workspace="workspace",n.Visibility="visibility",n.AddPeopleToChannel="addPeopleToChannel",n),c=((r={}).Offline="cloud-offline",r.Info="info",r),d=((i={}).Default="default",i.Info="info",i.Success="success",i.Warning="warning",i.Error="error",i),m=((l={}).ExternalLink="external_link",l.AppMenu="app_menu",l.ChannelSidebar="channel_sidebar",l.ChannelSidebarStandardSection="channel_sidebar_standard_section",l.ChannelBrowser="channel_browser",l.ChannelBrowserEdu="channel_browser_edu",l.ChannelBrowserHeader="channel_browser_header",l.CalendarChannelCreate="calendar-channel-create",l.ShareChannelByEmailModal="share_channel_by_email_modal",l.ChannelSidebarAddMore="channel_sidebar_add_more",l.ComposerDestinationMpdmAlert="composer_destination_mpdm_alert",l.ComposerEscapeHatch="composer_escape_hatch",l.DMBrowser="dm_browser",l.HomeHeader="home_header",l.InviteToWorkspaceModal="invite_to_workspace_modal",l.TeamMenu="team_menu",l.ChannelSearchEdu="channel_search_edu",l.ServiceChannelPicker="service_channel_picker",l.CreateChannelShortcut="create_channel_shortcut",l.SlackConnectDmTrialBanner="slack_connect_dm_trial_banner",l.SlackConnectHubHeader="slack_connect_hub_header",l.SlackConnectTrialOfferModal="slack_connect_trial_offer_modal",l.GlobalActions="global_actions",l.EmailObject="email_object",l.DeepLink="deep_link",l.ExternalConnectDeepLink="external_connect_deeplink",l.SlashCommand="slash_command",l.OmniSwitcher="omni_switcher",l.ChannelSidebarSlackConnectSection="channel_sidebar_slack_connect_section",l.OrganizationsEmptyState="manage_shared_channels_org_empty_state",l.ChannelSidebarSlackConnectPlus="channel_sidebar_slack_connect_plus",l.ChannelSidebarSlackConnectAddMore="channel_sidebar_slack_connect_add_more",l.SlackConnectHubLanding="slack_connect_hub_landing",l.SlackConnectHubTrial="slack_connect_hub_trial",l.MpdmDetails="mpdm_details",l.MoreChannelSidebar="more_channel_sidebar",l.ListChannelColumn="list_channel_column",l.ListPrimaryColumnActions="list_primary_column_actions",l.ResurrectedUserWelcome="resurrected_user_welcome",l.SolutionGuide="solution_guide",l.SolutionsPage="solutions_page",l.SolutionPublishConfirmation="solutions_publish_confirmation",l.SolutionsTrialStart="solutions_trial_start",l.SolutionsTemplateModal="solutions_template_modal",l.SolutionsTemplateMenu="solutions_template_menu",l.TemplatesChannelForeword="templates_channel_foreword",l.TemplatesGalleryAiBuilder="templates_gallery_ai_builder",l.FreeToPlusTrialPaidBenefitsPage="free_to_plus_trial_paid_benefits_page",l.RelatedChannelsAddOrCreateChannelModal="related-channels-add-or-create-channel-modal",l.NewTeamLaunchpad="new_team_launchpad",l),u=((o={}).Public="public",o.Private="private",o)},0xa94872cb:(e,t,a)=>{"use strict";a.d(t,{DW:()=>u,D_:()=>m,Sl:()=>getWelcomeModalAutoClogProps,bA:()=>o,dx:()=>c,kS:()=>getWelcomeModalPaginationBulletAutoClogProps,sp:()=>p,tt:()=>l,zA:()=>d});var n=a(0x7bfcb519),r=a(0x11791db50),i=a(0x3711e82d);let l={Project:n.j4.ProjectSolution,TeamSupport:n.j4.SocialSolution,External:n.j4.ExternalPartnersSolution,Enablement:n.j4.EnablementHubSolution,Invites:"INVITES"},o={Project:n.j4.ProjectSolution,Sales:n.j4.DealTrackingSolution,Engg:n.j4.BugsSolution,External:n.j4.ExternalPartnersSolution,SalesHub:n.j4.EnablementHubSolution,TechSpec:r.c.TechSpecTemplate,Invites:"INVITES"},s={elementType:i.ElementType.BUTTON,onClick:{enableClogAction:!0}},c={FREE:"free",PRO_TRIAL:"pro-trial",PLUS_TRIAL:"plus-trial",PRO:"std",PLUS:"plus"},getWelcomeModalAutoClogProps=({slide:e,variant:t})=>({clogImpression:!0,elementName:"creator_guided_setup_welcome_modal",elementType:i.ElementType.MODAL,eventId:i.EventId.NEWXP_TEAM_CREATE,uiComponentVariant:(e=>{switch(e){case c.PRO_TRIAL:return i.UiComponentVariant.CREATOR_GUIDED_SETUP_PRO_TRIAL;case c.PLUS_TRIAL:return i.UiComponentVariant.CREATOR_GUIDED_SETUP_PLUS_TRIAL;case c.PRO:return i.UiComponentVariant.CREATOR_GUIDED_SETUP_PAID_PRO;case c.PLUS:return i.UiComponentVariant.CREATOR_GUIDED_SETUP_BUSINESS_PLUS;default:return i.UiComponentVariant.CREATOR_GUIDED_SETUP}})(t),uiStep:`slide_${e+1}`}),d={...s,elementName:"creator_guided_setup_welcome_modal_next_button"},m={...s,elementName:"creator_guided_setup_welcome_modal_previous_button"},getWelcomeModalPaginationBulletAutoClogProps=({index:e})=>({...s,elementName:`creator_guided_setup_welcome_modal_pagination_bullet_${e+1}`}),u={clogImpression:!0,elementName:"creator_guided_setup_invitation_coachmark",elementType:i.ElementType.COACHMARK,eventId:i.EventId.NEWXP_TEAM_CREATE},p={CanvasBanner:"creator-guided-setup-canvas-banner",ListBanner:"creator-guided-setup-list-banner",WelcomeModal:"creator-guided-setup-welcome-modal",WelcomeModalPrimaryCta:"creator-guided-setup-primary-cta"}},0x511eade:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseCreatorGuidedSetupTabCoachmark:()=>BaseCreatorGuidedSetupTabCoachmark,CreatorGuidedSetupTabCoachmark:()=>CreatorGuidedSetupTabCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x13953efe6),o=a(0xfbede66),s=a(0x3989021c),c=a(0xd473073a),d=a(0x8b60780c),m=a(0x1c760ba43),u=a(0x3711e82d),p=a(0x226892387),h=a(0xafce781a),_=a(0x5b1935a6),f=a(0x321d4fa2),b=a(0x2067f54f8),g=a(0xa5b9082a),y=a(0x1c054fd54),A=a.n(y);let x=new i.Ay("solutions_onboarding"),E="p-creator-guided-setup__container",BaseCreatorGuidedSetupTabCoachmark=({autoClogProps:e,children:t,isCanvasVariant:a,onClick:r,onClose:i,onAfterOpen:o,renderCoachmark:s,UNSAFE_parentSelector:c})=>{let d=x.t("Add items to the list template"),m=x.t("Everyone in the channel will be able to see this list, so it\u2019s a great place for shared tasks or priorities."),u=x.t("Edit List");a&&(d=x.t("Make edits to this canvas"),m=x.t("This canvas is visible to everyone in the channel, so you\u2019ll want to tailor the content to fit your team\u2019s needs."),u=x.t("Start Editing"));let p=s({arrowPosition:10,autoClogProps:e,bodyText:m,closeCoachmark:i,arrowCenterOnAnchor:!0,title:d,primaryCallToActionText:u,onClickPrimaryButton:r,width:400,onAfterOpen:o,className:E,UNSAFE_parentSelector:c});return n.createElement(l.Ay,{coachmarkElement:p,orientation:l.YC.BottomRight},t)};BaseCreatorGuidedSetupTabCoachmark.displayName="BaseCreatorGuidedSetupTabCoachmark";let CreatorGuidedSetupTabCoachmark=({tabId:e,children:t,channelId:a})=>{let i=(0,r.wA)(),l=(0,p.d4)(e=>a?(0,g.L6)(e,a):void 0),y=(0,n.useMemo)(()=>({elementType:u.ElementType.COACHMARK,eventId:u.EventId.NEWXP_TEAM_CREATE,elementName:"creator_guided_setup_list_tab_coachmark"}),[]),{renderCoachmark:x,closeCoachmark:C}=(0,s.A)(_.ze.CREATOR_GUIDED_SETUP_LIST_COACHMARK),k=(0,c.g)(a||""),v=k.find(e=>e.type===m.Xy.List),S=!1;v||(v=k.find(e=>e.type===m.Xy.Canvas),S=!0);let{onAfterOpen:I}=(0,o.j)({className:E,backgroundClassName:A().overlay}),w=(0,n.useCallback)(async()=>{i((0,f.A)(!1)),C(),await i((0,b.M)())&&i((0,h.iR)({event:{type:_.jo.CREATOR_GUIDED_SETUP_INVITES}}))},[C,i]),T=(0,n.useCallback)(()=>{a&&(i((0,d.D)({tabId:e,channelId:a})),i((0,f.A)(!1)),C())},[a,C,i,e]);return a&&l||!v||v.id!==e?n.createElement(n.Fragment,null,t):n.createElement(BaseCreatorGuidedSetupTabCoachmark,{autoClogProps:y,onAfterOpen:I,onClick:T,onClose:w,renderCoachmark:x,isCanvasVariant:S},t)};CreatorGuidedSetupTabCoachmark.displayName="CreatorGuidedSetupTabCoachmark"},0x1d6cf067e:(e,t,a)=>{"use strict";a.r(t),a.d(t,{BaseCreatorGuidedSetupWelcomeModal:()=>BaseCreatorGuidedSetupWelcomeModal,CreatorGuidedSetupWelcomeModal:()=>CreatorGuidedSetupWelcomeModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1df96de4c),l=a(0x20482ad21),o=a(0xa94872cb),s=a(0x190e60a66);let c=a.p+"introduce-channels-5d583fa.png",d=a.p+"introduce-channels-aa7129b.png",m=a.p+"introduce-channels-8e03ce9.png",u=a.p+"introduce-channels-4d0360a.png",p=a.p+"introduce-channels-7407ba1.png",h=a.p+"introduce-channels-ccb834e.png",_=a.p+"introduce-channels-04ce315.png",f=a.p+"introduce-channels-450abed.png",b=a.p+"introduce-channels-ecd011f.png",g=a.p+"introduce-channels-bd4b089.png",y=a.p+"introduce-channels-a2086c1.png",A=a.p+"introduce-channels-ceb3f82.png",x=a.p+"welcome-0241059.png";var E=a(0x120c268ad),C=a.n(E),k=a(0x11a296110),v=a(0x209f2655),S=a.n(v);let I=new l.Ay("creator_guided_setup"),PaginationBullet=({onClick:e,index:t,activeSlide:a,value:r,label:i,totalSlides:l,autoClogProps:o})=>{let s=(0,n.useCallback)(()=>{e(t)},[e,t]);return n.createElement(k.Nm,{"aria-selected":t===a,"aria-label":I.t("Navigate to slide {index} of {total}: {label}",{index:Number(t+1),label:i,total:l}),autoClogProps:o,key:r,className:C()(S().bullet,{[S().active]:t===a}),onClick:s})};PaginationBullet.displayName="PaginationBullet";var w=a(0x172dd1bf5),T=a(0x102a2aed),N=a(0x20e80190e),M=a(0x1ccef1c6f),R=a(0x226892387);let P=new l.Ay("launch_welcome_modal"),L=["de-DE","es-ES","es-LA","fr-FR","it-IT","ja-JP","pt-BR"],LaunchWelcomeModal=({slides:e,onClose:t,UNSAFE_parentSelector:a,lastSlideCta:r,modalAutoClogProps:i,nextButtonAutoClogProps:l,prevButtonAutoClogProps:o,paginationBulletAutoClogProps:c,DataQa:d})=>{let m,[u,p]=(0,n.useState)(0),h=(0,R.d4)(e=>!!(0,M.ty)(e,"a11y_animations")),_=(0,s.F)().getLocaleForLastViewedTeam(),f=L.includes(_),b=(0,n.useCallback)(e=>{p(e)},[]),g=(0,n.useCallback)(()=>{u===e.length-1?t():p(e=>e+1)},[u,t,e.length]),y=(0,n.useCallback)(()=>{0!==u&&p(e=>e-1)},[u]),A=e[u];A.featureList&&(m=n.createElement(T.Ay,{listItems:A.featureList,className:S().launchWelcomeFeaturesList})),h&&A.animation?m=n.createElement(w.e,{autoplay:!0,getAnimationImport:A.animation,key:A.value}):!h&&A.image&&(m=n.createElement("img",{className:S().image,alt:"",src:A.image}));let x=(0,n.useMemo)(()=>i(u),[u,i]),E=(0,n.useMemo)(()=>c(u),[u,c]),v=r||P.t("Got It");return n.createElement(N.dW,{autoClogProps:x,centered:!0,maxWidth:922,closeModal:t,className:S().launchWelcomeModal,dataQa:d?.WelcomeModal,UNSAFE_parentSelector:a},n.createElement("div",{className:S().container},n.createElement("div",{className:S().slideWrap},n.createElement("div",{className:C()(S().details,{[S().extendedDetailsContainerHeight]:f})},n.createElement("div",{className:S().pagination},e.map((t,a)=>n.createElement(PaginationBullet,{key:t.value,onClick:b,value:t.value,index:a,activeSlide:u,label:t.title,totalSlides:e.length,autoClogProps:E}))),n.createElement("div",{className:S().detailsContent},n.createElement("div",{key:A.value},n.createElement("h2",{className:S().heading},A.title),n.createElement("p",{className:S().detailsDescription},A.description)),n.createElement("div",{className:S().buttonWrap},0!==u&&n.createElement(k.Ay,{autoClogProps:o,onClick:y,type:"outline"},P.t("Back")),n.createElement(k.Ay,{autoClogProps:l,onClick:g,"data-qa":d?.WelcomeModalPrimaryCta},u===e.length-1?v:P.t("Next"))))),n.createElement("div",{className:C()(S().imageWrap,{[S().featuresListWrap]:A.featureList})},m))))};LaunchWelcomeModal.displayName="LaunchWelcomeModal";var O=a(0xa1832ae4),D=a(0xafce781a),F=a(0x5b1935a6),U=a(0x91e15f37),B=a(0x113d1778),H=a(0xf33e7dbc),W=a(0x1ee439e69);let V={WelcomeModal:o.sp.WelcomeModal,WelcomeModalPrimaryCta:o.sp.WelcomeModalPrimaryCta},G=new l.Ay("creator_guided_setup"),BaseCreatorGuidedSetupWelcomeModal=({variant:e,onClose:t,UNSAFE_parentSelector:r})=>{let l,E,C=(0,n.useCallback)(t=>(0,o.Sl)({slide:t,variant:e}),[e]),k=(0,n.useCallback)(e=>(0,o.kS)({index:e}),[]),{animatedWelcome:v,animatedIntroduceChannels:S,staticIntroduceChannels:I,staticWelcome:w}=(l=(0,s.F)().getLocaleForLastViewedTeam(),E=(0,n.useMemo)(()=>{switch(l){case"de-DE":return d;case"es-ES":return u;case"en-GB":return m;case"es-LA":return p;case"fr-FR":return h;case"it-IT":return _;case"ja-JP":return f;case"ko-KR":return b;case"pt-BR":return g;case"zh-CN":return y;case"zh-TW":return A;default:return c}},[l]),{animatedIntroduceChannels:(0,n.useCallback)(()=>{switch(l){case"de-DE":return a.e("lottie-creator-guided-setup-introduce-channels-de-DE.json").then(a.t.bind(a,0x17ed2b390,23));case"es-ES":return a.e("lottie-creator-guided-setup-introduce-channels-es-ES.json").then(a.t.bind(a,0xb0f52f76,23));case"en-GB":return a.e("lottie-creator-guided-setup-introduce-channels-en-GB.json").then(a.t.bind(a,0x1738c6296,23));case"es-LA":return a.e("lottie-creator-guided-setup-introduce-channels-es-LA.json").then(a.t.bind(a,0xaf87a54b,23));case"fr-FR":return a.e("lottie-creator-guided-setup-introduce-channels-fr-FR.json").then(a.t.bind(a,0x19d5f7b6a,23));case"it-IT":return a.e("lottie-creator-guided-setup-introduce-channels-it-IT.json").then(a.t.bind(a,0x20ce338b8,23));case"ja-JP":return a.e("lottie-creator-guided-setup-introduce-channels-ja-JP.json").then(a.t.bind(a,0x113da4afd,23));case"ko-KR":return a.e("lottie-creator-guided-setup-introduce-channels-ko-KR.json").then(a.t.bind(a,0xfe4f950b,23));case"pt-BR":return a.e("lottie-creator-guided-setup-introduce-channels-pt-BR.json").then(a.t.bind(a,0x12624c8a6,23));case"zh-CN":return a.e("lottie-creator-guided-setup-introduce-channels-zh-CN.json").then(a.t.bind(a,0x175b15a63,23));case"zh-TW":return a.e("lottie-creator-guided-setup-introduce-channels-zh-TW.json").then(a.t.bind(a,0x1e293bf,23));default:return a.e("lottie-creator-guided-setup-introduce-channels.json").then(a.t.bind(a,0x143cd5a48,23))}},[l]),animatedWelcome:(0,n.useCallback)(()=>a.e("lottie-creator-guided-setup-welcome.json").then(a.t.bind(a,0x1b2ccbdd2,23)),[]),staticIntroduceChannels:E,staticWelcome:x}),T=G.t("Unlimited message and file history"),N=G.t("Keep and find answers in your team\u2019s archive"),M=G.t("Group meetings"),R=G.t("With huddles, you can hop on a call instantly"),P=G.t("Work with external people"),L=G.t("Seamlessly collaborate with people outside your organization"),O=G.t("Slack AI"),D=G.t("Summarize conversations, take meeting notes, and use AI assistants"),F=G.t("AI Search, translations, workflow generation, and more"),U=G.t("SAML SSO"),B=G.t("Use the SSO provider of your choosing"),H=G.t("Advanced channel permissions"),W=G.t("Say who can manage and post in channels"),q=G.t("Message activity analytics"),j=G.t("Get a bird\u2019s eye view of the impact of announcements"),z=G.t("Advanced AI features"),K=G.t("Turn conversations into insights and actions with AI-powered efficiency"),$=G.t("Productivity and collaboration tools"),Y=G.t("Communicate in countless ways from one place"),Q=G.t("Security features for more control"),Z=G.t("Trust Slack to keep your data secure and meet your compliance requirements"),J=G.t("Work securely with external organizations"),X=G.t("Collaborate seamlessly with customers, partners, and vendors"),ee=(0,n.useMemo)(()=>{let t={iconName:"ai-sparkle",title:O,text:e===o.dx.PLUS||e===o.dx.PLUS_TRIAL?F:D};return e===o.dx.PLUS?[t,{iconName:"sign-out",title:U,text:B},{iconName:"wrench",title:H,text:W},{iconName:"message",title:q,text:j}]:e===o.dx.PLUS_TRIAL?[{iconName:"ai-sparkle",title:z,text:K},{iconName:"tools",title:$,text:Y},{iconName:"security",title:Q,text:Z},{iconName:"buildings",title:J,text:X}]:[t,{iconName:"history",title:T,text:N},{iconName:"headphones",title:M,text:R},{iconName:"shared-channel",title:P,text:L}]},[j,q,W,H,N,T,R,M,K,z,Y,$,Z,Q,X,J,F,D,O,L,P,B,U,e]),et=G.t("Welcome to Slack!"),ea=G.t("It\u2019s the ultimate tool to up your team\u2019s collaboration and productivity. Here are a few tips to keep in your back pocket as you build your workspace."),en=G.t("Focus on one topic at a time"),er=G.t("In Slack, channels keep your work focused by giving each topic, project or team its own space."),ei=G.t("Free access to premium features"),el=G.t("You\u2019re on a free trial of the Pro plan, our treat. Enjoy access to these features for the next 30 days."),eo=G.t("You\u2019re on a free trial of the Business+ plan, our treat. Enjoy access to these features for the next 30 days."),es=G.t("Explore your premium features"),ec=G.rt("Your organization is on the <b>Pro plan</b>, which includes some Slack AI features."),ed=G.rt("Your organization is on the <b>Business+ plan</b>, which includes access to advanced security and Slack AI features."),em=(0,n.useMemo)(()=>{if(e!==o.dx.FREE){let t={[o.dx.PRO_TRIAL]:{title:ei,description:el},[o.dx.PLUS_TRIAL]:{title:ei,description:eo},[o.dx.PRO]:{title:es,description:ec},[o.dx.PLUS]:{title:es,description:ed}};return[{title:t[e].title,description:t[e].description,value:"features",featureList:ee}]}return i.Ml},[ee,ed,eo,ec,el,es,ei,e]),eu=(0,n.useMemo)(()=>[{title:et,description:ea,image:w,animation:v,value:"welcome"},{title:en,description:er,image:I,animation:S,value:"focus"},...em],[et,ea,w,v,en,er,I,S,em]),ep=G.t("Get Started");return n.createElement(LaunchWelcomeModal,{onClose:t,DataQa:V,UNSAFE_parentSelector:r,lastSlideCta:ep,modalAutoClogProps:C,nextButtonAutoClogProps:o.zA,prevButtonAutoClogProps:o.D_,paginationBulletAutoClogProps:k,slides:eu})};BaseCreatorGuidedSetupWelcomeModal.displayName="BaseCreatorGuidedSetupWelcomeModal";let CreatorGuidedSetupWelcomeModal=({onRequestClose:e})=>{let t=(0,r.wA)(),a=(0,R.d4)(W.H7),i=(0,R.d4)(U.iH),l=(0,O.lk)(a),s=(0,R.d4)(H.s),c=o.dx.FREE;i?c=s?o.dx.PLUS_TRIAL:o.dx.PRO_TRIAL:("std"===l||"plus"===l)&&(c=l);let d=(0,n.useCallback)(()=>{t((0,D.iR)({event:{type:F.jo.CREATOR_GUIDED_SETUP_MODAL_CLOSED}})),t((0,B.O6)(!0)),e()},[t,e]);return n.createElement(BaseCreatorGuidedSetupWelcomeModal,{variant:c,onClose:d})};CreatorGuidedSetupWelcomeModal.displayName="CreatorGuidedSetupWelcomeModal"},0xc3f76a97:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CspDowngradePlanExpiringWarningBannerNonDismissable:()=>CspDowngradePlanExpiringWarningBannerNonDismissable,default:()=>u});var n=a(0xbad225b5),r=a(0x40c0d834),i=a(0x20482ad21),l=a(0xd9faf062),o=a(0x10b603e91),s=a(0x3711e82d),c=a(0x226892387),d=a(0x14149c126);let m=new i.Ay("billing"),CspDowngradePlanExpiringWarningBannerNonDismissable=({planName:e})=>{if(!(0,c.d4)(e=>"on"===(0,d._Z)(e,"non_grid_bespoke_downgrade_automation")))return null;let t=m.rt("{planName} plan expiring soon. <span>To keep paid features, please contact your account executive or Salesforce.</span>",{planName:e});return n.createElement(r.A,{clogImpression:!0,eventId:s.EventId.CSP_DOWNGRADE_BANNER,elementType:s.ElementType.BANNER,uiComponentName:s.UiComponentName.CSP_DOWNGRADE_PLAN_EXPIRING_WARNING_BANNER_NON_DISMISSABLE},n.createElement(o.A,{className:"align_center","data-qa":"csp_downgrade_plan_expiring_warning_banner_non_dismissable",type:l.QE.warning,preventTypeOverride:!0,isFixedPosition:!1,showCloseButton:!1},t))};CspDowngradePlanExpiringWarningBannerNonDismissable.displayName="CspDowngradePlanExpiringWarningBannerNonDismissable";let u=CspDowngradePlanExpiringWarningBannerNonDismissable},0x1852ecd6a:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CspDowngradePlanExpiringWarningBanner:()=>CspDowngradePlanExpiringWarningBanner,default:()=>_});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0xd9faf062),s=a(0x10b603e91),c=a(0x3711e82d),d=a(0x226892387),m=a(0x14149c126),u=a(0x20061cab9),p=a(0x5b1935a6);let h=new l.Ay("billing"),CspDowngradePlanExpiringWarningBanner=({planName:e,dismissAndClearNotification:t})=>{let a=(0,r.wA)(),l=(0,d.d4)(e=>"on"===(0,m._Z)(e,"non_grid_bespoke_downgrade_automation")),_=(0,n.useCallback)(()=>{a((0,u.Ay)({spaceName:p.xu.CLIENT_FOOTER,action:p.hw.DISMISS})),t()},[a,t]);if(!l)return null;let f=h.rt("{planName} plan expiring soon. <span>To keep paid features, please contact your account executive or Salesforce.</span>",{planName:e});return n.createElement(i.A,{clogImpression:!0,eventId:c.EventId.CSP_DOWNGRADE_BANNER,elementType:c.ElementType.BANNER,uiComponentName:c.UiComponentName.CSP_DOWNGRADE_PLAN_EXPIRING_WARNING_BANNER},n.createElement(s.A,{className:"align_center","data-qa":"csp_downgrade_plan_expiring_warning_banner",type:o.QE.warning,preventTypeOverride:!0,isFixedPosition:!1,onClose:_,showCloseButton:!0},f))};CspDowngradePlanExpiringWarningBanner.displayName="CspDowngradePlanExpiringWarningBanner";let _=CspDowngradePlanExpiringWarningBanner},0x140f94560:(e,t,a)=>{"use strict";a.d(t,{l:()=>formatOooDate});var n=a(0xe91936b1),r=a(0x7acf06fe),i=a(0x21f3d6033),l=a(0x77a36d88),o=a(0xb1c0d55),s=a(940089e4),c=a(0x1533b2385),d=a(0x3dcad321),m=a(0x5f9a8602),u=a(0x223ac29bb);let formatOooDatePreview=(e,t,a,n)=>a?(0,o.A)(e,{excludeYear:!0}):t.replace(/%1/,(0,c.A)(e.toDate())).replace(/%2/,(0,o.A)(e,{shortenMonth:!1,excludeYear:!0})).replace(/%3/,`at ${(0,d.A)(e,{includeMeridiem:!n,do24hrTime:n})}`),formatOooDate=(e,t,a)=>{let p=(0,s.A)(e,{returnMoment:!0}),h=(0,u.Yp)(),_=n.Sq[h],f=n.Nb[h],b=(0,l.A)(),g=f.format;if(23===p.hour()&&59===p.minutes()){let e=(0,m.W)(5),t=b.clone().day(e),a=p.clone().add(3,"day");if((0,r.A)(p.toDate(),t.toDate()))return _.format.replace(/%1/,(0,c.A)(a.toDate(),{shortenDay:!0})).replace(/%2/,(0,o.A)(a,{shortenMonth:!0,shortenDay:!0,excludeYear:!0}));let n=p.clone().add(1,"day");if((0,r.A)(p.toDate(),b.toDate())){let e=(0,i.A)(n.toDate(),{uncapitalized:!0});if(e)return e}}return(0,r.A)(p.toDate(),b.toDate())?(0,d.A)(p,{includeMeridiem:!t,do24hrTime:t}):p.isSameOrAfter(b.add(7,"days"))?a?formatOooDatePreview(p,g,!1,t):_.format.replace(/%1/,(0,c.A)(p.toDate(),{shortenDay:!0})).replace(/%2/,(0,o.A)(p,{shortenMonth:!0,shortenDay:!0,excludeYear:!0})):a?formatOooDatePreview(p,g,!0,t):g.replace(/%1/,(0,d.A)(p,{includeMeridiem:!t,do24hrTime:t})).replace(/%2/,(0,c.A)(p.toDate(),{shortenDay:!0})).replace(/%3/,(0,o.A)(p,{shortenMonth:!0,shortenDay:!0,excludeYear:!0}))}},0x11a8fc9e7:(e,t,a)=>{"use strict";a.d(t,{$b:()=>i,SY:()=>o,bX:()=>r,jI:()=>l,zQ:()=>n});let n=":speech_balloon:",r=100,i={NO_EXPIRATION:"no_expiration",MINUTES_30:"30_minutes",HOURS_1:"1_hour",HOURS_4:"4_hours",TODAY:"all_day",TOMORROW:"all_next_day",WEEK:"week",OUT_OF_OFFICE:"ooo_default",CUSTOM:"custom"},l=i.TODAY,o={DO_NOT_PAUSE:"doNotPause",EVERYONE:"everyone",EVERYONE_EXCEPT_VIPS:"everyoneExceptVips"}},0x1dd46d518:(e,t,a)=>{"use strict";a.d(t,{A:()=>doesExpirationMatchDndEnd});var n=a(0x18f2150ea);function doesExpirationMatchDndEnd({expirationTs:e,dndEndTs:t}){return!!((0,n.A)(e)&&(0,n.A)(t))&&e>0&&t>0&&60>=Math.abs(e-t)}},0x36c4870e:(e,t,a)=>{"use strict";function isDndEnabledCanonicalText(e){return"Vacationing"===e}a.d(t,{A:()=>isDndEnabledCanonicalText})},0x24d09eca0:(e,t,a)=>{"use strict";a.d(t,{j:()=>OpenSignoutModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x1d2cd7755),c=a(0x139c79d16),d=a(0xa5dbe09b),m=a(0x13eedc190),u=a(0x23b496ae9),p=a(0xf225ecf2),h=a(0x1c7997c1),_=a(0x96920791),f=a(0x16d221c7f),b=a(0x142775427),g=a(0xa69ad0c3),y=a(0x1f803375e);let A=a.p+"_HeaderImage-0b75427.png";var x=a(0xa1832ae4),E=a(0xb8504a42),C=a(0x3711e82d),k=a(0x226892387),v=a(0x14149c126),S=a(0x1fcbb004d),I=a(0x1ee439e69),w=a(0x21e74fa93),T=a.n(w);let N=new l.Ay("signout"),OpenSignoutModal=({signOutFunction:e})=>{let t=(0,r.wA)(),[a,l]=(0,n.useState)("signOut"),w=(0,k.d4)(e=>"on"===(0,v._Z)(e,"deactivate_account_desktop")),M=(0,k.d4)(I.fu),R=(0,k.d4)(I.H7),P=!!R&&(0,E.r7)(R),L=(0,n.useCallback)(()=>{t((0,S.O)())},[t]),O=(0,n.useCallback)(()=>{e&&M&&e({teamId:M.id})},[M,e]),D=(0,n.useCallback)(()=>{M?(0,x.yJ)(M,"/account/deactivate"):R&&(0,x.yJ)(R,"/account/deactivate")},[M,R]),F=(0,n.useCallback)(()=>{"signOut"===a?O():D(),L()},[a,O,D,L]),U=(0,n.useCallback)(()=>l("signOut"),[]),B=(0,n.useCallback)(()=>l("signOutAndLeave"),[]),H=(0,n.useMemo)(()=>n.createElement("div",null,n.createElement("h3",{className:T().optionContainer,style:{fontWeight:"700"}},w?N.t("Sign out"):""),n.createElement("span",null,w?N.t("You\u2019ll have to sign in again to join conversations in this workspace. You\u2019re still a member, and will appear in directories."):"")),[w]),W=(0,n.useMemo)(()=>n.createElement("div",null,n.createElement("h3",{className:T().optionContainer,style:{fontWeight:"700"}},w?N.t("Sign out & leave workspace"):""),n.createElement("span",null,w?N.t("You\u2019ll no longer be a member of this workspace. To rejoin, you\u2019ll need a fresh invitation."):"")),[w]);return!w||P?null:n.createElement(i.A,{eventId:C.EventId.DEACTIVATE_ACCOUNT},n.createElement(m.A,{onClose:L,isOpen:!0,contentLabel:"Signing out?",shouldCloseOnOverlayClick:!1},n.createElement(g.A,{height:196,width:520,src:A}),n.createElement(b.A,null,n.createElement(y.A,{title:w?N.t("Signing out?"):""})),n.createElement(p.A,null,n.createElement(h.A,null,n.createElement("h4",{className:T().chooseHowToLeave},w?N.t("Choose how you\u2019d like to leave:"):""),n.createElement(d.A,{className:T().radiogroup},n.createElement(s.A,{htmlFor:"signout-option",type:"inline",cursor:"pointer",className:T().radioLabelFirst,text:H},n.createElement(c.A,{id:"signout-option",name:"signout-options",value:"signOut",checked:"signOut"===a,onChange:U})),n.createElement(s.A,{htmlFor:"signout-leave-option",type:"inline",cursor:"pointer",text:W},n.createElement(c.A,{id:"signout-leave-option",name:"signout-options",value:"signOutAndLeave",checked:"signOutAndLeave"===a,onChange:B}))))),n.createElement(_.A,null,n.createElement(f.A,null,n.createElement(u.A,{type:"outline",onClick:L},w?N.t("Cancel"):""),n.createElement(o.$n,{type:"primary",onClick:F,autoClogProps:{elementName:"confirm-signout",elementValue:a,onClick:{enableClogAction:!0}}},w?N.t("Confirm"):"")))))};OpenSignoutModal.displayName="OpenSignoutModal"},0x133eee6c1:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xe28ad2a3);let l=new r.Ay("generic_dialog");function DeprecatedAlertDialog({children:e,cancelButtonText:t,"data-qa":a="alert_dialog",goButtonText:r,showCancelButton:o=!1,...s}){return n.createElement(i.Ay,{cancelText:t||l.t("Cancel"),"data-qa":a,goButtonText:r||l.t("OK"),role:"alertdialog",showCancelButton:o,...s},e)}DeprecatedAlertDialog.displayName="DeprecatedAlertDialog";let o=n.memo(DeprecatedAlertDialog)},0x52a2bc6d:(e,t,a)=>{"use strict";a.d(t,{A:()=>w});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x15f8e452a),c=a(0xa2cd8b62),d=a(0xaacd3809),m=a(0xadd564f8),u=a(0x1ec69ee01),p=a(0x12185e091),h=a(0x280afe13),_=a(0x19d55d0e1),f=a(0x16df7a1d3),b=a(0x1b9d5cc0c),g=a(0xa1832ae4),y=a(0x1c96ff3fa),A=a(0x1c91944c9),x=a(0x9b971e7e),E=a(0x217553e42),C=a(0xb129c1d5),k=a(0x1ee439e69);let v=new l.Ay("jumper"),S={publicChannelIncludeHashSign:!1,imIncludeAtSign:!1},I=class extends n.Component{static displayName="DeprecatedChannelName";static defaultProps={channelId:"",channelType:"channel",className:void 0,hasDraft:void 0,inheritPresenceIconSize:!1,inline:!1,isImChannelWithHiddenUser:!1,memberId:void 0,mpimMemberCount:void 0,onClick:void 0,previousName:void 0,showDraftIcon:!1,showPresence:!0,showSuffix:!0,showTeamIcon:!1,showTeamIconForLocalChannels:!1,showTeamIconForXwsChannels:!1,teamIdForChannel:"",teamName:""};renderChannelIcon(){let e,{channel:t,channelType:a,mpimMemberCount:r,inline:i,memberId:l,showPresence:o,inheritPresenceIconSize:c,showDraftIcon:m,hasDraft:u}=this.props;return"im"===a?l&&o&&!i?n.createElement(d.Ay,{inheritIconSize:c,memberId:l}):null:(e=m&&u?"pencil":"mpim"===a&&r?`multiparty-dm-${r}`:(0,_.jT)(t)?"create-post":"private"===a?"lock":"channel",n.createElement(s.A,{type:e,size:"inherit","data-qa-icon-type":a}))}renderChannelName(){let{channel:e,channelId:t,isImChannelWithHiddenUser:a,inline:r}=this.props;return n.createElement(n.Fragment,null,this.renderChannelIcon(),n.createElement("span",{className:i()("p-deprecated_channel_name__text",{"p-deprecated_channel_name__text--inline":!r}),"data-qa":"deprecated_channel_name__text"},a?v.t("Name hidden"):n.createElement(c.a,{channelId:e?.id||t||"",displayNameOptions:S}),this.renderChannelNameSuffix()),this.renderTeamIcon())}renderChannelNameSuffix(){let e,{previousName:t,showSuffix:a}=this.props;return a&&t?(t&&(e=v.t("(formerly #{previous_name})",{previous_name:t})),n.createElement("span",{className:"p-deprecated_channel_name__suffix"},e)):null}renderTeamIcon(){let{showTeamIcon:e,teamIdForChannel:t,teamName:a}=this.props;return e&&t&&a?n.createElement("span",{className:"p-deprecated_channel_name__team_name p-deprecated_channel_name__team_name--xws"},"\xa0",n.createElement("span",{className:"p-deprecated_channel_name__team_name_child"},a)):null}renderButton(){let{autoClogProps:e,className:t,onClick:a}=this.props;return n.createElement(o.Nm,{className:i()("p-deprecated_channel_name p-deprecated_channel_name--clickable",t),onClick:a,htmlType:"button",autoClogProps:e},this.renderChannelName())}render(){let{onClick:e,className:t,channel:a,channelId:r}=this.props,l=!!e;return l?n.createElement(m.A,{id:a?.id||r||""},this.renderButton()):l?this.renderButton():n.createElement("span",{className:i()("p-deprecated_channel_name",t),"data-qa":"channel_name_header"},this.renderChannelName())}};I.displayName="DeprecatedChannelName";let w=(0,A.N)((e,t)=>{let{channel:a,channelId:n,showTeamIconForXwsChannels:r=!1,showTeamIconForLocalChannels:i=!1}=t,l=a||(0,E.OL)(e,n),o=(0,p.yz)(l)?l&&(0,u.N4)(l):null;a&&(0,b.NB)(a)&&(l=(0,E.Pu)(e,a.id));let s=(0,p.LI)(l)?(0,h.e)(l):null,c=!!s&&(0,C.a)(e,s),d=(0,p.mz)(l),m=(0,x.JY)(e),_=!!a&&((0,u.lo)(a)||(0,u.uA)(e,a)),A=r&&("channel"===d||"private"===d)&&!(0,f.S)(l)&&(i||_),v=A?l?.team_id:void 0;A&&!v&&(_?v=(0,y.A)({state:e,channel:a,currentTeamId:m||""})||(0,u.bK)(e,a):i&&(v=m));let S=v?(0,k._J)(e,v):void 0,I=v?(0,g.F1)(S):void 0;return{channelType:d,mpimMemberCount:o,memberId:s,showTeamIcon:A,teamIdForChannel:v,teamName:I,hasDraft:n?(0,u.yc)(e,n):void 0,isImChannelWithHiddenUser:c}})(I)},0xe28ad2a3:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>Y});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xb77a689a),s=a(0x8601851c),c=a(0x217f0c263),d=a(0x14fad6485),m=a(0xd6ba6894),u=a(0x1c371dd8b),p=a(0xe874a88a),h=a(0xb97b797e),_=a(0xc745739a),f=a(0x15279822),b=a(0x20482ad21),g=a(951303e3),y=a(0x5739d664),A=a(0x9844ea22),x=a(0x11a296110),E=a(0xe7ed96ac),C=a(0x15f8e452a),k=a(0x1faa3f1ac),v=a(0x4c96e5d9),S=a(0x44ce343e),I=a(0xef6027c8),w=a(0x6cc5eee0);let T=new b.Ay("generic_dialog"),N={titleText:void 0,bodyText:void 0,cancelButtonText:void 0,continueButtonText:void 0,continueButtonType:"danger",onCancel:l.A,onContinue:l.A},M=class extends n.PureComponent{static defaultProps=N;speedBump;constructor(e){super(e),this.onCancel=this.onCancel.bind(this),this.state={isHidden:!0},this.speedBump=null}componentDidMount(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.setState(()=>({isHidden:!1}))})})}onCancel(){this.setState(()=>({isHidden:!0}),()=>{this.speedBump&&(0,I.A)(this.speedBump,"transform").then(this.props.onCancel)})}render(){let e=T.t("Your work won\u2019t be saved \u2014 are you sure you want to close?",{fallbackHash:"2dba6fefb79a00616e98aaeb349d6e2404795259"}),t=T.t("Keep Editing"),a=T.t("Close"),{titleText:r=e,cancelButtonText:l=t,continueButtonText:o=a,bodyText:s,continueButtonType:c,onContinue:d}=this.props,{isHidden:m}=this.state,u=i()("c-dialog_speed_bump_overlay",{"c-dialog_speed_bump_overlay--hidden":m}),p=i()("c-dialog_speed_bump",{"c-dialog_speed_bump--hidden":m});return n.createElement(n.Fragment,null,n.createElement("div",{className:u}),n.createElement("div",{className:"c-dialog_speed_bump_wrapper"},n.createElement("div",{className:p,ref:e=>{this.speedBump=e}},n.createElement("h3",{className:"c-dialog_speed_bump__body_text"},r),s&&n.createElement(w.A,{text:s}),n.createElement("div",{className:"c-dialog_speed_bump__button_row"},n.createElement(x.Ay,{autoFocus:!0,className:"c-dialog_speed_bump__button",onClick:this.onCancel,"data-qa":"dialog_speed_bump_cancel",type:"outline"},l),n.createElement(x.Ay,{className:"c-dialog_speed_bump__button",onClick:d,"data-qa":"dialog_speed_bump_continue",type:c},o)))))}};M.displayName="DialogSpeedBump";let R=(0,S.A)(M);var P=a(0x11bf9141b),L=a(0x242503693),O=a(0x7ad38cfb),D=a(0x3711e82d),F=a(0x45012309);function focusOnFormFilter(e){if(["BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName))return!0;let t=e.getAttribute("role");return!!(t&&["button","checkbox","radio","radiogroup","textbox"].includes(t))}var U=a(0x1ec68d6a3),B=a(0x2480888d1),H=a(0x1c91944c9),W=a(0x1fcbb004d);let V=new b.Ay("generic_dialog"),G={onClose:{action:D.UiAction.CLOSE}},q={name:"open-in-window"},j=0,z={ariaContent:void 0,cancelButtonType:"outline",cancelText:void 0,overlayClassName:void 0,bodyClassName:void 0,modalBodyOpenClassName:void 0,className:void 0,contentHeight:void 0,contentLabel:void 0,"data-qa":"dialog",footerIcon:void 0,footerLink:void 0,footerText:void 0,focusOnPrimaryButton:void 0,onFooterLinkClick:void 0,goButtonType:"primary",goButtonText:void 0,goButtonTooltip:void 0,goButtonIsDisabled:!1,goButtonIsPending:!1,goOnEnterPressed:!0,onCancel:l.A,onClose:l.A,onGo:l.A,onPopOut:l.A,onScroll:l.A,role:"dialog",showCancelButton:!0,showCloseButton:!0,showPopoutButton:!1,showGoButton:!0,showHeader:!0,showFooter:!0,showTooltipOnCloseButton:!1,title:void 0,titleAria:null,useSlackScrollbar:!0,useSlackScrollbarWithPadding:!1,titleImage:void 0,truncateTitle:!0,closeModal:l.A,appPopoutsEnabled:!1,shouldCloseOnOverlayClick:!0,shouldCloseOnGo:!0,shouldCloseOnCancel:!0,getShouldShowSpeedBump:l.A,speedBumpBodyText:void 0,speedBumpTitleText:void 0,speedBumpCancelButtonText:void 0,speedBumpContinueButtonType:"danger",speedBumpContinueButtonText:void 0,isSpeedBumpEnabled:!0,reverseButtons:!1,customFooterContent:void 0,invertCloseButton:!1,onRequestClose:l.A,onEscape:l.A,autoClogProps:void 0,windowRef:(0,g.O)(m.J),clogger:void 0,isChildWindowPopout:!1},K=class extends n.PureComponent{static defaultProps=z;static getDerivedStateFromProps(e){let{isSpeedBumpEnabled:t}=e;return t?null:{isShowingSpeedBump:!1,speedBumpButton:""}}keyCommands;scroller;cancelButtonRef;goButtonRef;modal;modalContent;closeIcon;constructor(e){super(e),(0,h.v)(this,["onScroll","setBodyRef","updateScrollState","onBeforeUnload","onRequestGo","onGo","onEnter","onFocusedElementRemoved","onPopOut","onRequestClose","onRequestCancel","onCancel","onEscape","setModalRef","setModalContentRef","onFocusTransition","getFocusTransitionListeners"]),this.closeIcon={name:"close"},this.keyCommands=null,this.scroller=null,this.modal=null,this.modalContent=null,this.cancelButtonRef=n.createRef(),this.goButtonRef=n.createRef(),this.getFocusTransitionListeners=(0,y.A)(this.getFocusTransitionListeners),this.state={hasOverflow:null,scrolledToBottom:null,scrolledToTop:null}}componentDidMount(){let e,{goOnEnterPressed:t}=this.props;this.props.windowRef?.deref()?.addEventListener("scroll",this.onScroll),this.modal&&this.modal.node&&(e=this.modal.node),this.keyCommands=new s.A(e);let a=[];t&&a.push({keys:["enter"],handler:this.onEnter}),a.push({keys:["escape"],handler:this.onEscape}),this.keyCommands.bindAll(a),(this.props.appPopoutsEnabled||(0,B.A)())&&this.props.windowRef?.deref()?.addEventListener("beforeunload",this.onBeforeUnload),(0,B.A)()&&this.updateTitle(),j+=1}componentDidUpdate(){requestAnimationFrame(this.updateScrollState),(0,B.A)()&&this.updateTitle()}componentWillUnmount(){this.props.windowRef?.deref()?.removeEventListener("scroll",this.onScroll),this.keyCommands&&this.keyCommands.reset(),(this.props.appPopoutsEnabled||(0,B.A)())&&this.props.windowRef?.deref()?.removeEventListener("beforeunload",this.onBeforeUnload),j-=1}onBeforeUnload(e){let{getShouldShowSpeedBump:t,isSpeedBumpEnabled:a,appPopoutsEnabled:n}=this.props;if(!t||!a||!n&&!(0,B.A)())return null;if(t("close")){e.preventDefault();let t=V.t("Your work won\u2019t be saved \u2014 are you sure you want to close?");return e.returnValue=t,t}return null}onCancel(){let{onClose:e,onCancel:t,shouldCloseOnCancel:a}=this.props;t?.()!==!1&&a&&(e?.(),this.props.closeModal?.())}onEnter(e){let t=e&&e.target&&e.target.tagName,a=!!e?.target?.contentEditable;"BUTTON"===t||"A"===t||"INPUT"===t||"TEXTAREA"===t||a||this.onRequestGo(e)}onEscape(e){e.defaultPrevented||(e.stopPropagation(),this.onRequestClose(),this.props.onEscape?.())}onFocusedElementRemoved(){this.modalContent?.focus()}onGo(e){let{onGo:t,onClose:a,shouldCloseOnGo:n}=this.props;e?.defaultPrevented||p.K.resolve(t?.(e)).then(e=>{!1!==e&&n&&(a?.(),this.props.closeModal?.())})}onPopOut(){let{role:e}=this.props,{height:t,width:a}=this.modal?.node?.querySelector(`[role="${e}"]`)?.getBoundingClientRect()||{height:void 0,width:void 0};this.props.onPopOut?.({height:t,width:a})}onRequestCancel(){let{getShouldShowSpeedBump:e,isSpeedBumpEnabled:t}=this.props;e?.("cancel")&&t?this.setState(()=>({isShowingSpeedBump:!0,speedBumpButton:"cancel"})):this.onCancel()}onRequestClose(e){let{getShouldShowSpeedBump:t,isSpeedBumpEnabled:a,onClose:n}=this.props;t?.("close")&&a?this.setState(()=>({isShowingSpeedBump:!0,speedBumpButton:"close"})):n?.(e)!==!1&&(this.props.closeModal?.(),this.props.onRequestClose?.())}onRequestGo(e){let{getShouldShowSpeedBump:t,isSpeedBumpEnabled:a}=this.props;t?.("go")&&a?this.setState(()=>({isShowingSpeedBump:!0,speedBumpButton:"go"})):this.onGo(e)}onScroll(e){this.scroller&&(requestAnimationFrame(this.updateScrollState),this.props.onScroll?.({scrollTop:this.scroller.scrollTop},e))}onFocusTransition(){let{clogger:e,autoClogProps:t}=this.props;if(this.focusOnFormElements(),!e||!t||!t.context)return;let{eventId:a,appId:n,type:r,viewId:i}=t.context;e.track(a,{contexts:{platform:{app_id:n},block_kit:{view_id:i,type:r,app_id:n}}})}getFocusTransitionListeners(e,t,a){return{[L.Ay.MODAL_ACTIVE_FORM]:()=>{if(this.props.isChildWindowPopout||!e||null==t||null==a)return!1;let n=this.props.windowRef?.deref()?.document.elementFromPoint(t+10,a+10);return!!e.contains(n)&&(this.onFocusTransition(),!0)}}}getScrollHeight(){let{contentHeight:e}=this.props;return e!==z.contentHeight?e:this.scroller?.scrollHeight??0}getTitleAria(){let{contentLabel:e,title:t,titleAria:a}=this.props,n="";return e?n=e:(0,o.A)(t)?n=t:a?n=a:(0,U.Wo)().warn('You should pass the "titleAria" prop when passing a non-string "title" prop if there is no "contentLabel".'),n}setBodyRef(e){this.scroller=e}setModalRef(e){this.modal=e}setModalContentRef(e){this.modalContent=e,"function"==typeof this.props.customFooterContent&&this.focusOnFormElements()}getModalAriaContent(e){let{ariaContent:t,showHeader:a}=this.props;return{...t,label:a?e:"",modal:!1}}focusOnFormElements(){let e=(0,f.Fp)(this.scroller,focusOnFormFilter);e?.focus?e.focus():this.goButtonRef?.current?this.goButtonRef.current.focus():this.cancelButtonRef?.current?this.cancelButtonRef.current.focus():this.modalContent?.focus()}updateScrollState(){if(!this.scroller)return;let e=this.scroller.scrollTop,t=this.getScrollHeight(),a=this.scroller.offsetHeight,n=e===t-a,r=0===e,i=t>a;this.setState(()=>({hasOverflow:i,scrolledToBottom:n,scrolledToTop:r}))}updateTitle(){let e=V.t("Slack"),t=this.getTitleAria(),a=this.props.windowRef?.deref();t&&a&&(a.document.title=`${e} | ${t}`)}renderCancelButton(){let{cancelText:e,cancelButtonType:t,autoClogProps:a,"data-qa":r}=this.props,i=e||V.t("Cancel"),l=a?.cancelButton?{onClick:{enableClogAction:!0},...a.cancelButton}:void 0;return n.createElement(x.Ay,{ref:this.cancelButtonRef,type:t,className:"c-dialog__cancel",onClick:this.onRequestCancel,"data-qa":`${r}_cancel`,autoClogProps:l},i)}renderCloseButton(){let{showTooltipOnCloseButton:e,invertCloseButton:t,autoClogProps:a,"data-qa":r}=this.props,i=V.t("Close"),l=a?.closeButton?{onClick:{enableClogAction:!0},...a.closeButton}:void 0,o=n.createElement(E.A,{backgroundStyle:t?"dark":void 0,"aria-label":i,className:"c-dialog__close",onClick:this.onRequestClose,"data-qa":`${r}_close`,autoClogProps:l,svgIconProps:this.closeIcon});return e?n.createElement(v.Ay,{tip:i,zIndex:"above_fs"},o):o}renderCustomFooterMaybe(){let{customFooterContent:e}=this.props;return"function"==typeof e?e({goButtonRef:this.goButtonRef,cancelButtonRef:this.cancelButtonRef}):e||null}renderFooterTextMaybe(){let{footerIcon:e,footerLink:t,footerText:a,"data-qa":r}=this.props;return a?t?n.createElement("div",{className:"c-dialog__footer_text","data-qa":"dialog_footer_text"},n.createElement(k.A,{href:t,className:"c-dialog__footer_link",onClick:this.props.onFooterLinkClick,"data-qa":`${r}_footer_link`},e&&n.createElement(C.A,{legacy:!0,inherit:!0,type:e,align:"baseline","data-qa":"dialog_footer_icon",className:"c-dialog__footer_icon"}),a)):n.createElement("div",{className:"c-dialog__footer_text","data-qa":"dialog_footer_text"},e&&n.createElement(C.A,{legacy:!0,inherit:!0,type:e,align:"baseline","data-qa":"dialog_footer_icon",className:"c-dialog__footer_icon"}),a):null}renderGoButton(){let{"data-qa":e,goButtonIsDisabled:t,goButtonIsPending:a,goButtonText:r,goButtonType:i,goButtonTooltip:l,focusOnPrimaryButton:o,autoClogProps:s}=this.props,c=r||V.t("Confirm"),d=s?.goButton?{onClick:{enableClogAction:!0},...s.goButton}:void 0,m=n.createElement(x.lV,{ref:this.goButtonRef,type:i,className:"c-dialog__go",onClick:this.onRequestGo,loading:a,disabled:t,"data-qa":`${e}_go`,autoFocus:o,autoClogProps:d,"aria-label":c},c);return l?n.createElement(v.Ay,{tip:l,zIndex:"above_fs"},t?n.createElement("div",null,m):m):m}renderOverflowPaddingMaybe(){let{showFooter:e}=this.props,{hasOverflow:t,scrolledToBottom:a}=this.state;if(!e&&t){let e=i()("c-dialog__overflow_padding",{"c-dialog__overflow_padding--scroll_border":t&&!a});return n.createElement("div",{className:e})}return null}renderPopoutButton(){let{appPopoutsEnabled:e,"data-qa":t,autoClogProps:a}=this.props;if(!e)return null;let r=V.t("Open in new window"),i=a?.popOutButton?{onClick:{enableClogAction:!0},...a.popOutButton}:void 0;return n.createElement(v.Ay,{tip:r,zIndex:"above_fs"},n.createElement(E.A,{"aria-label":r,className:"c-dialog__popout",onClick:this.onPopOut,"data-qa":`${t}_popout`,autoClogProps:i,svgIconProps:q}))}renderSpeedBumpMaybe(){if(!this.state.isShowingSpeedBump)return null;let{speedBumpTitleText:e,speedBumpCancelButtonText:t,speedBumpContinueButtonText:a,speedBumpContinueButtonType:r,speedBumpBodyText:i}=this.props;return n.createElement(R,{titleText:e,bodyText:i,cancelButtonText:t,continueButtonText:a,continueButtonType:r,onCancel:()=>{this.setState(()=>({isShowingSpeedBump:!1}))},onContinue:"go"===this.state.speedBumpButton?this.onGo:this.onCancel})}renderTitle(){let e,{title:t,titleImage:a,truncateTitle:r}=this.props;return e=a?n.createElement("div",{className:"display_flex"},n.createElement("img",{className:"c-dialog__title_image",src:a,alt:t}),n.createElement("div",{className:i()({overflow_ellipsis:r})},t)):t,n.createElement("h1",{className:i()("c-dialog__title",{overflow_ellipsis:r&&!a})},e)}render(){let{children:e,className:t,overlayClassName:a,bodyClassName:r,footerText:l,showCancelButton:o,showCloseButton:s,showPopoutButton:d,showGoButton:m,role:p,showHeader:h,showFooter:f,useSlackScrollbar:b,useSlackScrollbarWithPadding:g,"data-qa":y,shouldCloseOnOverlayClick:x,reverseButtons:E,modalBodyOpenClassName:C,autoClogProps:k}=this.props,v=i()("c-dialog",a,{"c-dialog--custom-titlebar":(0,_.H2)()}),S=i()("c-dialog__content",t,{"c-dialog__content--custom-titlebar":(0,_.H2)(),"c-dialog__content--frameless":(0,_.Hc)()}),I=i()("c-dialog__header",{"c-dialog__header--overflow":this.state.hasOverflow&&!this.state.scrolledToTop}),w=i()("c-dialog__body",r,{"c-dialog__body--slack_scrollbar":b&&!g,"c-dialog__body--slack_scrollbar_with_padding":b&&g}),T=i()("c-dialog__footer",{"c-dialog__footer--overflow":this.state.hasOverflow&&!this.state.scrolledToBottom,"c-dialog__footer--has_text":l&&!(o||m),"c-dialog__footer--has_buttons":!l&&(o||m),"c-dialog__footer--has_both":l&&(o||m)}),N=this.getTitleAria(),M=this.getModalAriaContent(N),R=null,P=null;return this.modalContent&&({left:R,top:P}=this.modalContent.getBoundingClientRect()),n.createElement(u.A,{elementType:D.ElementType.MODAL,actionProps:G,autoClogProps:k},n.createElement(c.A,{className:S,bodyOpenClassName:C,contentLabel:N,isOpen:!0,onRequestClose:this.onRequestClose,overlayClassName:v,role:p,aria:M,shouldCloseOnOverlayClick:x,shouldCloseOnEsc:!1,ref:this.setModalRef,contentRef:this.setModalContentRef,data:{qa:y},shouldReturnFocusAfterClose:!1},n.createElement(O.A,{listeners:this.getFocusTransitionListeners(this.modalContent,R,P)},h&&n.createElement("div",{className:I,"data-qa":`${y}_header`},this.renderTitle(),d&&!(0,B.A)()&&this.renderPopoutButton(),s&&!(0,B.A)()&&this.renderCloseButton()),n.createElement(A.A,{onFocusedElementRemoved:this.onFocusedElementRemoved},n.createElement("div",{className:w,onScroll:this.onScroll,ref:this.setBodyRef,"data-qa":`${y}_body`},e)),f&&n.createElement("div",{className:T,"data-qa":`${y}_footer`},this.renderCustomFooterMaybe(),this.renderFooterTextMaybe(),n.createElement("div",{className:"c-dialog__footer_buttons","data-qa":"dialog_footer_buttons"},E&&m&&this.renderGoButton(),o&&this.renderCancelButton(),!E&&m&&this.renderGoButton())),this.renderSpeedBumpMaybe(),this.renderOverflowPaddingMaybe())))}};K.displayName="DeprecatedBaseDialog";let $=(0,H.N)(e=>({appPopoutsEnabled:(0,P.HM)(),clogger:(0,F.eo)({state:e})}),e=>({closeModal:t=>e((0,W.O)(t))}),(e,t,a)=>({...a,...t,...e}),{forwardRef:!0})((0,S.A)(K)),Y=n.forwardRef((e,t)=>n.createElement(d._0.Consumer,null,({windowRef:a})=>n.createElement($,{ref:t,...e,windowRef:a})))},0x1e06b9237:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0xb1c0d55),i=a(940089e4),l=a(0x20482ad21),o=a(0x3288ef0e),s=a(0x20e77676b);let c=new l.Ay("depreactions_browser_banners"),getLearnMoreLink=(e,t)=>n.createElement(s.A,{articleId:0x15d3f139c31,onClick:t},e),__WEBPACK_DEFAULT_EXPORT__=({deprecationDate:e=o.hv,isEnterprise:t=!1,onLearnMoreClick:a})=>{let n=(0,r.A)((0,i.A)(e,{parseFormat:"YYYY-MM-DD",returnMoment:!0}));return t?c.rt("This browser won\u2019t be supported starting {date}. Ask your admins for help getting up to date. <Link>Learn more</Link>",{date:n},({text:e})=>getLearnMoreLink(e,a)):c.rt("This browser won\u2019t be supported starting {date}. Update your browser to keep using Slack. <Link>Learn more</Link>",{date:n},({text:e})=>getLearnMoreLink(e,a))}},0x27343fb2:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__,Z:()=>isMenuExtensionSupported});var n=a(0xbad225b5),r=a(0x2286acf6c),i=a(0x9e671ad),l=a(0x1059ba41d);let o=(0,r.A)(l.rzX,150,{leading:!0,trailing:!0,maxWait:1e3});function isMenuExtensionSupported(){return l.QqS.isAvailable()&&l.rzX.isAvailable()}let __WEBPACK_DEFAULT_EXPORT__=({globalMenus:e,workspaceMenus:t})=>{let a=(0,n.useRef)({});return(0,n.useEffect)(()=>{e&&!(0,i.A)(e,a.current.globalMenus)&&((0,l.QqS)(e),a.current.globalMenus={...e})},[e]),(0,n.useEffect)(()=>{t&&(Object.keys(t).forEach(e=>{(0,i.A)(t[e],a.current.workspaceMenus?.[e])||o(e,t[e])}),a.current.workspaceMenus={...t})},[t]),null}},0x12aa1a707:(e,t,a)=>{"use strict";a.d(t,{Px:()=>d,Ts:()=>c,Tx:()=>i,Wc:()=>r,ez:()=>s,kl:()=>o,pS:()=>l});var n,r=((n={}).CHANGE_SLACK_PLAN="menuitem-change-slack-plan",n.SIGN_OUT="menuitem-sign-out",n.MANAGE_MEMBERS="menuitem-manage-members",n.MANAGE_ROLES="menuitem-manage-roles",n.MANAGE_APPS="menuitem-manage-apps",n.MANAGE_SHARED_CHANNELS="menuitem-manage-shared-channels",n.MANAGE_SLACK_CONNECT_INVITATIONS="menuitem-manage-slack-connect-invitations",n.CUSTOMIZE_WORKSPACE="menuitem-customize-workspace",n.WORKSPACE_SETTINGS="menuitem-workspace-settings",n.ORG_SETTINGS="menuitem-org-settings",n.ANALYTICS="menuitem-analytics",n.BILLING="menuitem-billing",n.MANAGE_WORKFLOWS="menuitem-manage-workflows",n.NEW_WINDOW="menuitem-new-window",n.NEW_MESSAGE="menuitem-new-message",n.NEW_CHANNEL="menuitem-new-channel",n.NEW_CANVAS="menuitem-new-canvas",n.NEW_TODO="menuitem-new-todo",n.NEW_HUDDLE="menuitem-new-huddle",n.WORKSPACE="menuitem-workspace",n.INVITE_PEOPLE="menuitem-invite-people",n.PREFERENCES="menuitem-preferences",n.WORKFLOW_BUILDER="menuitem-workflow-builder",n.SET_STATUS="menuitem-set-status",n.FIND="menuitem-find",n.SEARCH="menuitem-search",n.RECORD_VIDEO_CLIP="menuitem-record-video-clip",n.RECORD_AUDIO_CLIP="menuitem-record-audio-clip",n.TOGGLE_SIDEBAR="menuitem-toggle-sidebar",n.TOGGLE_FLOATING_SIDEBAR="menuitem-toggle-floating-sidebar",n.NAVIGATE_TILE_LEFT="navigate-tile-left",n.NAVIGATE_TILE_RIGHT="navigate-tile-right",n.TOGGLE_WORKSPACE_SIDEBAR="menuitem-toggle-workspace-sidebar",n.CLOSE_SECONDARY_VIEW="menuitem-close-secondary-view",n.SELECT_NEXT_WORKSPACE="menuitem-select-next-workspace",n.SELECT_PREVIOUS_WORKSPACE="menuitem-select-previous-workspace",n.SIGN_IN_TO_WORKSPACE="menuitem-sign-in-to-workspace",n.CREATE_NEW_WORKSPACE="menuitem-create-new-workspace",n.SWITCH_TO_CHANNEL="menuitem-switch-to-channel",n.HOME="menuitem-home",n.ALL_DMS="menuitem-all-dms",n.SALES="menuitem-sales",n.ALL_UNREADS="menuitem-all-unreads",n.THREADS="menuitem-threads",n.DRAFTS="menuitem-drafts",n.MENTIONS_REACTIONS="menuitems-mentions-reactions",n.SAVED_ITEMS="menuitem-saved-items",n.LATER="menuitem-later",n.CANVAS_BROWSER="menuitem-canvas-browser",n.CHANNEL_BROWSER="menuitems-channel-browser",n.FILE_BROWSER="menuitem-file-browser",n.PEOPLE_USER_GROUPS="menuitem-people-user-groups",n.APPS="menuitem-apps",n.HUDDLES_BROWSER="menuitem-huddles-browser",n.DOWNLOADS="menuitem-downloads",n.PROFILE="menuitem-profile",n.STREAMLINE="menuitem-streamline",n.TAB_RAIL_MORE_SUBMENU="menuitem-tab-rail-more-submenu",n.HUDDLE_ACTION="menuitem-huddle-action",n.OPEN_WINDOW="menuitem-open-window",n.CHANNEL_DETAILS="menuitem-channel-details",n.COPY_CHANNEL_SUBMENU="menuitem-copy-channel-submenu",n.COPY_CHANNEL_NAME="menuitem-copy-channel-name",n.COPY_CHANNEL_LINK="menuitem-copy-channel-link",n.COPY_HUDDLE_LINK="menuitem-copy-huddle-link",n.BOOKMARKS_SUBMENU="menuitem-bookmarks-submenu",n.MOVE_CHANNEL_SUBMENU="menuitem-move-channel-submenu",n.MARK_ALL_AS_READ="menuitem-mark-all-as-read",n.MUTE_CHANNEL="menuitem-mute-channel",n.HIDE_PERSON="menuitem-hide-person",n.CHANGE_NOTIFICATIONS="menuitem-change-notifications",n.LEAVE_CHANNEL="menuitem-leave-channel",n.CONTACT_US="menuitem-contact-us",n.FEEDBACK="menuitem-feedback",n);let i="menuitem-workspace",l="menuitem-sign-out",o="menuitem-history",s="menuitem-tab-rail",c="menuitem-move-channel",d="menuitem-top-level-history"},0x162275c51:(e,t,a)=>{"use strict";a.d(t,{wE:()=>n});let n=5},0xd6bdceda:(e,t,a)=>{"use strict";a.d(t,{Z:()=>BaseDndTimeSelect,A:()=>S});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xdefaa6fc),o=a(0x1c0dc4cab),s=a(0x1e2051844),c=a(0x1ee15af19),d=a(0x237b6a339),m=a(0x20482ad21),u=a(0x15dd8a31),p=a(0xca924ee1),h=a(0x4bb14979),_=a(0x79160c3e);let f=new m.Ay("prefs"),b=(0,p.A)((e,t)=>{let a=(0,h.sq)(e),n={label:f.t("Midnight"),value:_.bd};return(0,o.A)(a,n)},(e,t)=>`${e}_${t}`);var g=a(0x197ea5ba2),y=a(0x20ef3966f),A=a(0x1422234dc),x=a(0x2bba3a0);let insert_non_interval_time_option=(e,t)=>{let a=(0,y.A)(e,"value"),n=t.value<(0,c.A)(e)?.value?(0,A.A)(a,e=>e<t.value)+1:(0,x.A)(a,e=>e>t.value);return[...e.slice(0,n),t,...e.slice(n)]};var E=a(0x21c50a68b),C=a(0x1c91944c9),k=a(0x1ccef1c6f);let v=new m.Ay("prefs"),BaseDndTimeSelect=({dndStartTime:e,handleDndStartTimeChange:t,dndEndTime:a,handleDndEndTimeChange:r,time24:m,wrapEndTimes:p=!1,dataQA:h,hideEndTimeSelect:f=!1,addNoneOptionForStartTime:y=!1,isDisabled:A=!1,isFullWidth:x=!1})=>{let C=(0,l.A)(a,5,"0"),k=(0,l.A)(e,5,"0"),S=(0,E.JK)(),renderNotificationStartTimeSelect=()=>{let e="start_time";e+=y?"_with_none_option":"";let t=(()=>{let e=b(m,S).filter(e=>e.value!==_.bd);if(y){let t={label:v.t("None"),value:_.rc.ALL_DAY};return(0,o.A)(t,e)}return e})();a&&!(0,s.A)(t,{value:C})&&(t=insert_non_interval_time_option(t,{value:C,label:(0,g.A)({time:C,time24:m})}),e+=`_with_temporary_start_time_${C}`);let i=f?(0,c.A)(t):(0,s.A)(t,{value:C}),l=v.t("Start time");return n.createElement(u.A,{key:e,selectId:(0,d.A)("start_notifications_select"),ariaLabel:l,options:t,selectedOption:i,onOptionSelected:({value:e}={})=>r(e||""),placeholderText:a?void 0:_.Ek,width:x?"100%":120,selectDataQa:`${h}_end_time_select`,isDisabled:A})};renderNotificationStartTimeSelect.displayName="renderNotificationStartTimeSelect";let renderNotificationEndTimeSelect=()=>{let a,r,i;if(f)return null;let l=(r=(a=b(m,S)).filter(e=>e.value>C),i=a.filter(({value:e})=>e<C&&"00:00"!==e),p?(0,o.A)(r,i):r);e&&!(0,s.A)(l,{value:k})&&(l=insert_non_interval_time_option(l,{value:k,label:(0,g.A)({time:k,time24:m})}));let c=(0,s.A)(l,{value:k}),y=v.t("End time"),E=`end_time_${C}_${k}`;return n.createElement(n.Fragment,null,n.createElement("span",{className:"p-dnd_preferences__time_select_to","aria-hidden":"true"},v.t("to")),n.createElement(u.A,{selectId:(0,d.A)("end_notifications_select"),ariaLabel:y,options:l,selectedOption:c,onOptionSelected:({value:e}={})=>t(e||""),key:E,placeholderText:e?void 0:_.Ek,width:x?"100%":120,selectDataQa:`${h}_start_time_select`,isDisabled:A}))};return renderNotificationEndTimeSelect.displayName="renderNotificationEndTimeSelect",n.createElement("div",{className:i()("p-dnd_preferences__time_select_wrapper",{"p-dnd_preferences__time_select_wrapper--full-width":x})},renderNotificationStartTimeSelect(),renderNotificationEndTimeSelect())};BaseDndTimeSelect.displayName="BaseDndTimeSelect";let S=(0,C.N)(e=>({time24:!!(0,k.ty)(e,"time24")}))(BaseDndTimeSelect)},0x130843629:(e,t,a)=>{"use strict";a.d(t,{F:()=>getBumpedEndTimeValue,K:()=>shouldBumpEndTime});var n=a(0xdefaa6fc),r=a(0x1e2051844),i=a(0x4bb14979),l=a(0x79160c3e);let shouldBumpEndTime=({type:e,value:t,endTime:a}={})=>"BEFORE"===e&&(t||"")>=(0,n.A)(a,5,"0"),getBumpedEndTimeValue=e=>{if(!e)return null;let t=(0,i.sq)().map(e=>e.value);return(0,r.A)(t,t=>t>e)||l.bd}},0x79160c3e:(e,t,a)=>{"use strict";a.d(t,{Ek:()=>o,MT:()=>i,bN:()=>n,bd:()=>l,rc:()=>r});let n={EVERY_DAY:"every_day",WEEKDAYS:"weekdays",CUSTOM:"custom"},r={ALL_DAY:"all_day",DISABLED:"disabled",PARTIAL:"partial"},i={DND_DAYS:"dnd_days",DND_ENABLED:"dnd_enabled",DND_WEEKDAYS_OFF_ALLDAY:"dnd_weekdays_off_allday",DND_START_HOUR:"dnd_start_hour",DND_END_HOUR:"dnd_end_hour",DND_BEFORE_MONDAY:"dnd_before_monday",DND_BEFORE_TUESDAY:"dnd_before_tuesday",DND_BEFORE_WEDNESDAY:"dnd_before_wednesday",DND_BEFORE_THURSDAY:"dnd_before_thursday",DND_BEFORE_FRIDAY:"dnd_before_friday",DND_BEFORE_SATURDAY:"dnd_before_saturday",DND_BEFORE_SUNDAY:"dnd_before_sunday",DND_AFTER_MONDAY:"dnd_after_monday",DND_AFTER_TUESDAY:"dnd_after_tuesday",DND_AFTER_WEDNESDAY:"dnd_after_wednesday",DND_AFTER_THURSDAY:"dnd_after_thursday",DND_AFTER_FRIDAY:"dnd_after_friday",DND_AFTER_SATURDAY:"dnd_after_saturday",DND_AFTER_SUNDAY:"dnd_after_sunday",DND_ENABLED_MONDAY:"dnd_enabled_monday",DND_ENABLED_TUESDAY:"dnd_enabled_tuesday",DND_ENABLED_WEDNESDAY:"dnd_enabled_wednesday",DND_ENABLED_THURSDAY:"dnd_enabled_thursday",DND_ENABLED_FRIDAY:"dnd_enabled_friday",DND_ENABLED_SATURDAY:"dnd_enabled_saturday",DND_ENABLED_SUNDAY:"dnd_enabled_sunday"},l="23:59",o="--:--"},0x197ea5ba2:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0x1feee1711);let __WEBPACK_DEFAULT_EXPORT__=({time:e,time24:t}={})=>{if(!e||(0,n.A)(t))return"";if(t)return e;let[a,r]=e.split(":"),i=parseInt(a,10);return i>12?`${i-12}:${r} PM`:i>9?`${e} AM`:0===i?`12:${r} AM`:`${i}:${r} AM`}},0x1b2dbb0a7:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>u});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0xb04bc36e),s=a(0x3711e82d),c=a(0xf3c65e54),d=a(0x5b1935a6);let m=new l.Ay("do_not_disturb"),DndPreferencesNewBadge=({isDndDisabledMenu:e})=>{let t=(0,r.wA)();return(0,n.useEffect)(()=>{t((0,c.A)({notificationName:d.ze.EDUCATION_VIP_NEW_BADGE,action:d.hw.IMPRESSION}))},[t]),n.createElement(i.A,{clogImpression:!0,uiComponentName:s.UiComponentName.DND_PREFERENCES_VIP_NEW_BADGE},e?n.createElement("span",{className:"p-dnd_menu__new_pill"},m.t("NEW")):n.createElement(o.A,{className:"margin_left_75"},m.t("NEW")))};DndPreferencesNewBadge.displayName="DndPreferencesNewBadge";let u=DndPreferencesNewBadge},0x3b70fd60:(e,t,a)=>{"use strict";a.d(t,{$Q:()=>calculateSnoozeDurationInMinutes,FS:()=>getMinutesUntilNextWeek,L6:()=>getMinutesUntilTomorrow,zv:()=>getDndEndTimeDescription});var n=a(0x1075d3a9c),r=a.n(n),i=a(0x71479775),l=a(940089e4),o=a(0x20482ad21),s=a(0x6960d8b9);let c=new o.Ay("do_not_disturb"),calculateSnoozeDurationInMinutes=(e,{currentTime:t=r()().unix()}={})=>{let a=(0,l.A)(t),n=(0,l.A)(e);return Math.ceil((0,i.A)(n,a))},getMinutesUntilTomorrow=({time:e="09:00"}={})=>{let t=r()().add(1,"days").format("YYYY-MM-DD");return calculateSnoozeDurationInMinutes(r()(`${t} ${e}`).unix())},getMinutesUntilNextWeek=({time:e="09:00"}={})=>{let t=r()().add(1,"week").startOf("isoWeek").format("YYYY-MM-DD");return calculateSnoozeDurationInMinutes(r()(`${t} ${e}`).unix())},getDndEndTimeDescription=(e,{do24hrTime:t=!1,today:a=r()().format("YYYY-MM-DD"),tomorrow:n=r()().add(1,"day").format("YYYY-MM-DD"),vacationDelight:i=!1,isOverrideDndChecked:l=!1}={})=>{if(!e)return"";if(i)return c.t("Notifications are paused until you\u2019re back from vacation and clear your status. \u{1F334}");let o=(0,s.Yq)(e,"{time}",{do24hrTime:t}),d=(0,s.Yq)(e,"{date_num}"),m=l?c.rt(" for everyone <strong>except VIPs</strong>"):"";return d===a?c.rt("Notifications paused until {time}{isDnd}",{time:o,isDnd:m}):d===n?c.rt("Notifications paused until tomorrow at {time}{isDnd}",{time:o,isDnd:m}):c.rt("Notifications paused until {expires}{isDnd}",{expires:(0,s.Yq)(e,"{status_expiration}",{do24hrTime:t}),isDnd:m})}},0xa59ddeb4:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var n=a(0xbad225b5),r=a(0xca924ee1),i=a(0xd6ba6894),l=a(0x20482ad21),o=a(0x16ac9b089),s=a(0x4ddac097),c=a(0xf3c40abe),d=a(0x1ec68d6a3),m=a(0x1c91944c9),u=a(0x1b729a17a);let p=new l.Ay("view"),h=0,_=(0,r.A)(e=>p.t("{totalUnreadHighlights, plural, =1 {# new item} other {# new items}}",{totalUnreadHighlights:e})),f=class extends n.PureComponent{static defaultProps={totalUnreadHighlights:null};clientName="";originalTitle="";constructor(e){super(e),this.updateTitle=this.updateTitle.bind(this)}componentDidMount(){h&&this.props.logger.error("Multiple DocumentTitles mounted"),h+=1,this.clientName=p.t("Slack"),this.originalTitle=i.J.document.title,this.deferUpdateTitle()}componentDidUpdate(e){(e.title!==this.props.title||e.totalUnreadHighlights!==this.props.totalUnreadHighlights||e.showMicrophoneIcon!==this.props.showMicrophoneIcon||e.showSpeakerIcon!==this.props.showSpeakerIcon)&&this.deferUpdateTitle()}componentWillUnmount(){h-=1,i.J.document.title=this.originalTitle,_.cache.clear()}formatTitle(){let{totalUnreadHighlights:e,title:t,activityBadgeCount:a,experimentActivityInboxEnabled:n,overdueCount:r}=this.props,{clientName:i}=this;if(0===t.length)return i;let l=n?(a||0)+(r||0):e||0;if(l){let e=_(l);return`${t} - ${e} - ${i}`}return`${t} - ${i}`}formatTitleWithIcons(e){let{showMainWindowIcon:t,showMicrophoneIcon:a,showSpeakerIcon:n,hasKeyboardFocus:r}=this.props,i=t?p.t("{title} [Main]",{title:(0,o.Ay)(e)}):e,l=t?["\u{1F3E0}"]:[];return(a?l.push("\u{1F3A4}"):n&&l.push("\u{1F50A}"),0===l.length||r)?i:`${i} ${l.join("")}`}deferUpdateTitle(){(0,s.BB)(this.updateTitle,{timeout:350})}updateTitle(){let e=this.formatTitle();i.J.document.title=this.formatTitleWithIcons(e)}render(){return null}};f.displayName="DocumentTitle";let b=(0,m.N)(e=>({logger:(0,d.Ay)({state:e}),totalUnreadHighlights:(0,u.P)(e)}))((0,c.A)(f))},0x16a164f33:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x15f8e452a);let l=new r.Ay("workspace_apps_manage");function DomainItems({domainsList:e}){return n.createElement(n.Fragment,null,e.map(e=>n.createElement("li",{key:e,"data-qa":"p-domain_list__item-domain",className:"p-domains_list__domain_list_item"},n.createElement(i.A,{type:"globe",className:"p-domains_list__domain_list_icon"}),e)))}function DomainsList({domainsList:e}){return void 0===e?null:e.length>0?n.createElement("div",null,n.createElement("h3",{className:"p-domains_list__domains_category_heading"},l.rt("Domains")),n.createElement("h4",{className:"p-domains_list__domains_heading"},l.rt("Send information to these domains:")),n.createElement("ul",{className:"p-domains_list__domain_ul"},n.createElement(DomainItems,{domainsList:e}))):null}DomainItems.displayName="DomainItems",DomainsList.displayName="DomainsList";let o=DomainsList},0x12cda7c38:(e,t,a)=>{"use strict";a.d(t,{YB:()=>i,ch:()=>r,wr:()=>n});let n={NOTIFY_BACKEND_OF_SSB_DOWNLOAD:"notify_backend_of_ssb_download",TRIGGER_MOBILE_FALLBACK_EMAIL:"trigger_mobile_fallback_email",TRIGGER_MOBILE_MAGIC_LOGIN_EMAIL:"trigger_mobile_magic_login_email",TRIGGER_BULK_SSB_MAGIC_LOGIN_EMAIL:"trigger_bulk_ssb_magic_login_email"},r={SSB_DOWNLOAD_FALLBACK_EVENT_HANDLER:"ssb_download_fallback_event_handler",MOBILE_PROMO_FALLBACK_EVENT_HANDLER:"mobile_promo_fallback_event_handler",MOBILE_PROMO_MAGIC_LOGIN_EVENT_HANDLER:"mobile_promo_magic_login_event_handler",ADD_WORKSPACES_TO_SSB_EVENT_HANDLER:"add_workspaces_to_ssb_event_handler"},i={MOBILE_AWARENESS_BANNER:"mobile_awareness_banner",MOBILE_AWARENESS_DIRECT_MESSAGE_PROMO:"mobile_awareness_direct_message_promo",PERSISTENT_MOBILE_PROMO:"persistent_mobile_promo",MOBILE_SOCIAL_PROOF_BANNER:"mobile_social_proof_banner"}},0x12f291cfb:(e,t,a)=>{"use strict";a.d(t,{f:()=>o,v:()=>l});var n=a(0x22a29f141),r=a(0x11c82607b),i=a(0x1f8f05a48);let l=(0,r.Ay)("calls the megaphone.executeEvent API to trigger download fallback email",(e,t,{reason:a,eventHandler:r,subtype:i,selectedWorkspaces:l})=>{let o;i&&(o={subtype:i}),l&&(o={selected_workspaces:l});let s={event_handler:r,event_params:o};return e((0,n.apiCall)({reason:a,method:"megaphone.executeEvent",args:s}))});l.meta={name:"triggerFallbackEmail",key:"createThunkTriggerFallbackEmail",description:"calls the megaphone.executeEvent API to trigger download fallback email"};let o=(0,i.Ay)(l,6e4,!1)},0x82a939d8:(e,t,a)=>{"use strict";a.d(t,{A:()=>g});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xb97b797e),l=a(0x62a17882),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x22fcfc255),d=a(0x4c96e5d9),m=a(0x25005369a),u=a(0x1c91944c9),p=a(0x1a5e6d9b7);let h=new o.Ay("page_client"),_=[(0,l.cX)()?"Cmd":"Ctrl","Shift"],f=class extends n.Component{constructor(e){super(e),(0,i.v)(this,["onCancel","onPause","onResume","onRetry","onViewAllDownloads","onShowInFinder"])}static defaultProps={fileDownloadUrl:null,isLastItem:!1,isAtLeastOneDownloadComplete:!1,shouldShowAllDownloads:!1,openDownloadsModal:r.A,onCancel:r.A,onRetry:r.A,holdingShiftModifier:!1,isSingleItem:!1};onCancel(e){e.stopPropagation(),this.props.onCancel?.(),this.props.cancelDownload(this.props.fileId)}onPause(e){e.stopPropagation(),this.props.pauseDownload(this.props.fileId)}onResume(e){e.stopPropagation(),this.props.resumeDownload(this.props.fileId)}onRetry(e){e.stopPropagation(),this.props.onRetry?.(),this.props.fileDownloadUrl&&this.props.startDownload({fileId:this.props.fileId,downloadUrl:this.props.fileDownloadUrl,showFlexpane:!1})}onViewAllDownloads(e){e.stopPropagation(),this.props.openDownloadsModal?.()}onShowInFinder(e){e.stopPropagation(),this.props.showDownload(this.props.fileId)}render(){let e,{file:t,isSingleItem:a,holdingShiftModifier:r}=this.props,i=n.createElement(s.Nm,{className:"p-download_controls__button",onClick:this.onCancel},h.t("Cancel"));switch(t.downloadState){case"paused":e=n.createElement(n.Fragment,null,n.createElement(s.Nm,{className:"p-download_controls__button",onClick:this.onResume},h.t("Resume")),i);break;case"cancelled":e=n.createElement(n.Fragment,null,n.createElement("span",{className:"p-download_controls__button"},h.t("Canceled")),n.createElement(s.Nm,{className:"p-download_controls__button",onClick:this.onRetry},h.t("Retry")));break;case"completed":e=null;break;default:e=n.createElement(n.Fragment,null,n.createElement(s.Nm,{className:"p-download_controls__button",onClick:this.onPause},h.t("Pause")),i)}let o=this.props.isLastItem&&this.props.shouldShowAllDownloads&&this.props.isAtLeastOneDownloadComplete&&(a&&!r?n.createElement(s.Nm,{className:"p-download_controls__button",onClick:this.onShowInFinder},(0,l.cX)()?h.t("Show in Finder"):h.t("Open containing folder")):n.createElement(d.Ay,{tip:n.createElement(c.A,{mainKey:"J",modifiers:_}),zIndex:"above_fs",delay:d.PK},n.createElement(s.Nm,{className:"p-download_controls__button",onClick:this.onViewAllDownloads},h.t("View all downloads")))),m=n.createElement(n.Fragment,null,n.createElement("div",{className:"p-download_controls__actions"},e),n.createElement("div",{className:"p-download_controls__viewall"},o));return"completed"!==t.downloadState&&this.props.isLastItem&&this.props.isAtLeastOneDownloadComplete&&(m=n.createElement("div",{className:"p-download_controls__actions"},e,o)),m}};f.displayName="DownloadControls";let b={cancelDownload:p.$3,pauseDownload:p.Bt,resumeDownload:p.yz,startDownload:p.XF,showDownload:p.Y$},g=(0,u.N)((e,t)=>({fileDownloadUrl:t.file&&(0,m.S)(e,t.file)}),b)(f)},0x17ef97c9b:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5);let r=class extends n.Component{lastUpdateTime;animationTiming;constructor(e){super(e),this.lastUpdateTime=performance.now(),this.animationTiming=0}componentDidUpdate(){let e=performance.now()-this.lastUpdateTime;this.animationTiming=e,this.lastUpdateTime=performance.now()}render(){return n.createElement("div",{className:"p-download_progress__outer"},n.createElement("div",{className:"p-download_progress__inner",style:{width:`${this.props.progressPercentage}%`,transitionDuration:`${this.animationTiming}ms`}}))}};r.displayName="DownloadProgress";let i=r},0x1bba13ac1:(e,t,a)=>{"use strict";a.d(t,{U:()=>o});var n=a(0xc9c97240),r=a(0x1cf0d97e1),i=a(0x357cac43);let l=(0,r.Ay)(e=>e.files);l.meta={name:"getFiles",key:"createSelectorGetFiles",description:e=>e.files};let downloadsSorter=(e,t)=>t.startTime-e.startTime,o=(0,n.Mz)([i.pP,l],(e,t)=>(e||[]).map(e=>({...t[e.id],...e})).sort(downloadsSorter))},0x137dd1e31:(e,t,a)=>{"use strict";a.d(t,{M:()=>DraftBlockUnfurlText});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x5d4fd4ef),o=a(0x226892387);let DraftBlockUnfurlText=({unfurl:e,isBold:t=!0})=>{let a=(0,o.d4)(t=>(0,l.v)(t,e.rows));if(!a)return null;let r=a.split(`
`);if(r.length<2)return null;let s=r[0].replace(/\t/g,", "),c=r[1].replace(/\t/g,", "),d=i()({"p-draft_unfurls__unfurl_title":t});return n.createElement("div",{className:"p-draft_unfurls__unfurl_text"},n.createElement("span",{className:d},s),n.createElement("span",{className:"p-draft_unfurls__unfurl_description"},c))};DraftBlockUnfurlText.displayName="DraftBlockUnfurlText"},0x5da5d020:(e,t,a)=>{"use strict";a.d(t,{M:()=>DraftItemContainer});var n=a(0xbad225b5);let DraftItemContainer=({"aria-label":e,children:t,renderRemoveButton:a})=>n.createElement("div",{role:"group","aria-label":e,style:{display:"contents"}},t,a());DraftItemContainer.displayName="DraftItemContainer"},0xf067ab43:(e,t,a)=>{"use strict";a.d(t,{h:()=>DraftUnfurlModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20b4dda68),l=a(0x20482ad21),o=a(0x1b88224f9),s=a(0x1c7cb6e50),c=a(0x6d72337),d=a(0x1fcbb004d);let m=new l.Ay("live_unfurling"),DraftUnfurlModal=({draftId:e,unfurl:t})=>{let a=(0,r.wA)(),l=(0,n.useCallback)(()=>{a((0,d.O)())},[a]),u=(0,n.useMemo)(()=>(0,s.A)(t),[t]),p=i.Py.concat(e);return n.createElement(o.A,{title:m.t("Link preview"),onClose:l,showSubmitButton:!1,showCancelButton:!1},n.createElement("div",{className:"padding_bottom_125"},(0,c.dK)({...u,messageTs:p})))};DraftUnfurlModal.displayName="DraftUnfurlModal"},0x980a7b83:(e,t,a)=>{"use strict";a.d(t,{A:()=>eA});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x21f3c49e8),o=a(0x1feee1711),s=a(0x1cbdfeceb),c=a(0xb97b797e),d=a(0x20b4dda68),m=a(0x20482ad21),u=a(0x12c020c3),p=a(0x11a296110),h=a(0x32d3ef3d),_=a(0x15f8e452a),f=a(0x1faa3f1ac),b=a(0x1fdec3e16),g=a(0x111061bc6),y=a(0x251a2acd0),A=a(0x1dd284e05),x=a(0xcea4a81c),E=a(0x6cc5eee0),C=a(0x2376ea9bb),k=a(0xcd092f8c),v=a(0x99192caa),S=a(0x5d73d2a4),I=a(0xe8a88a4c),w=a(0x18def662b),T=a(0x137dd1e31),N=a(0x5da5d020),M=a(0xf067ab43),R=a(0x16cf1da63),P=a(0x1b88224f9),L=a(0x113cdbbd7),O=a(0x944e06df),D=a(0x1fcbb004d);let F=new m.Ay("live_unfurling"),DraftUnfurlTableBlockModal=({tableBlocks:e})=>{let t=(0,R.wA)(),a=(0,n.useCallback)(()=>{t((0,D.O)())},[t]),r=(0,n.useMemo)(()=>[e],[e]);return n.createElement(P.A,{title:F.t("Table preview"),onClose:a,submitButtonText:F.t("Close"),onSubmit:a,showCancelButton:!1,className:"p-draft_unfurls__table_preview_modal"},n.createElement(O.A,{blocks:r,blocksContainerContext:L.pi.unfurl_modal}))};DraftUnfurlTableBlockModal.displayName="DraftUnfurlTableBlockModal";var U=a(0x2501a2cee),B=a(0x1b3ecb90f),H=a(0x108363d6d),W=a(0x226892387);let V=new m.Ay("shareable_channel_sets"),DraftUnfurlsChannelSetMessage=({unfurl:e})=>{let t=(0,H.if)(e),a=(0,W.d4)(w.aL);if(!t||!a)return null;let r=t.channelIds?t.channelIds.length:0,i=t.channelSetName,l=t.emoji;return n.createElement("div",{className:"p-draft_unfurls__channel_set__container"},n.createElement("div",{className:"p-draft_unfurls__channel_set__icon"},l?n.createElement(B.Ay,{className:"p-channel_set_block__heading_icon_size_override",emojiSize:B.lw.medium,text:l}):n.createElement(U.Ah,{name:"section",size:"20"})),n.createElement("div",null,n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},i)),n.createElement("span",{className:"p-draft_unfurls__unfurl_description"},a?V.t("{channelCount} {channelCount, plural, =1 {channel} other {channels}}",{channelCount:r}):"")))};DraftUnfurlsChannelSetMessage.displayName="DraftUnfurlsChannelSetMessage";var G=a(0x1e18134eb),q=a(0x1a0267901),j=a(0x148efa02a),z=a(0x10027d8bc),K=a(0xa0337198),$=a(0xaf13bc6a),Y=a(0x10cd505f3),Q=a(0x17635f0aa),Z=a(0xbd3de346),J=a(0x207eb3801),X=a(0xa1832ae4),ee=a(0x4165455),et=a(0x3711e82d),ea=a(0x42a4b4de),en=a(0x235ff1eab),er=a(0x132e1beb4),ei=a(0x1e0a0cdcc),el=a(0x1c91944c9),eo=a(0x9b971e7e),es=a(0x248b8ff1a),ec=a(0x217553e42),ed=a(0xb437e2ce),em=a(0x14149c126),eu=a(0x14ea3ce99),ep=a(0x1988881a0),eh=a(0x1ef125c78),e_=a(0xd93ecf94),ef=a(0x46dbff89),eb=a(0x1ee439e69);let eg=new m.Ay("live_unfurling"),ey=class extends n.Component{fakeMessageTs;constructor(e){super(e),(0,c.v)(this,["openDetailedPreview","renderGraphicUnfurl","renderUnfurlHeader","renderRemoveUnfurlButton","removeListEntityUnfurl"]),this.fakeMessageTs=d.Py.concat(this.props.draftId)}openDetailedPreview(){let{dispatch:e,unfurl:t,draftId:a,msg:r,previewableFiles:i,fullProxiedImageUrl:l,isGifPickerPrefEnabled:o,hasBlockUnfurls:s,hasEditBlockUnfurls:c}=this.props;if((0,ee.d4)(t)&&o){let a=l&&(0,en.Ac)(l),n=(r?.attachments?.filter(e=>e.image_url)?.findIndex(e=>e.image_url===t?.image_url)||0)+(i?.length||0),o=this.fakeMessageTs&&void 0!==n&&n>-1?(0,j.QF)({ts:this.fakeMessageTs,mediaIndex:n}):"";e((0,es.A)({ts:this.fakeMessageTs,channelId:t?.channel_id,mediaId:o,mediaItem:{image:{src:l,width:t?.image_width,height:t?.image_height,animatedSrc:a,isAnimated:!0}},hideOpenWindowButton:!0,hideMediaViewerHeader:!0}))}else e((s||c)&&(0,er.v)(t)?(0,ef.q)({element:n.createElement(DraftUnfurlTableBlockModal,{tableBlocks:t,draftId:a})}):(0,ef.q)({element:n.createElement(M.h,{unfurl:t,draftId:a})}))}renderBlocks(e){return(0,l.A)(e)?null:n.createElement(k.y,{richTextBlock:e,emojiSize:B.lw.SMALL})}renderDescriptionText(e){return e?n.createElement(E.A,{text:e,noHighlights:!0,noHexColors:!0,noJumbomoji:!0,noLinking:!0,noCode:!0,noQuotes:!0,maxNewlines:1,emojiSize:B.lw.SMALL,customLineEnding:" "}):null}renderGraphicUnfurl(e){return n.createElement("img",{className:"p-draft_unfurls__unfurl_thumbnail",src:this.props.proxiedImgUrl,alt:(0,ee.zb)(e)})}renderUnfurlHeader(e){if(e?.msg_subtype==="document_comment_root"){let t=n.createElement("div",{className:"p-draft_unfurls__unfurl_document_subheader"},n.createElement(_.A,{type:"create-post",size:"inherit"}),n.createElement("span",null,e?.channel_name));return n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},t))}let{name:t,nameLink:a,subheader:r}=(0,ee.kL)(e,this.props.channel)||{},i=r?n.createElement("span",{className:"p-draft_unfurls__unfurl_subheader"},r):null;if((0,ee.Fj)(e)||(0,ee.oJ)(e))return n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_icon"},n.createElement(S._,{size:16})),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},eg.t("Canvas updated")),i));if((0,ee.uL)(e))return n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_icon"},n.createElement($.V,{size:16})),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},eg.t("Folder added")),i));if(this.props.experimentReskinCustomResponsesGroupOn&&(0,ee.X3)(e))return n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_icon"},n.createElement(C.A,{id:this.props.teamId,size:16})),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},this.props.teamName),i));if(this.props.experimentChannelFoldersPostGaGroupOn&&(0,ee.wp)(e)){let t=e.item_added_user_ids&&e.item_added_user_ids.length>1?eg.t("Items added"):eg.t("Item added");return n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_icon"},n.createElement($.V,{size:16})),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},t),i))}let l=this.props.proxiedIconUrl?n.createElement("img",{className:"p-draft_unfurls__unfurl_icon",src:this.props.proxiedIconUrl,alt:""}):null,o="p-draft_unfurls__unfurl_name",s=a?n.createElement(f.A,{href:a,className:o},t):n.createElement("span",{className:o},t);return this.props.experimentSlackbotAiNextGroupOn&&(0,ee.JJ)(e)?n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_icon"},n.createElement(g.u,{size:16,iconSize:"16"})),n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},n.createElement("span",{className:"p-draft_unfurls__unfurl_name"},eg.t("Slack")),i)):n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},l,n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},s,i))}renderUnfurlText(e){let t=(0,ee.LK)(e),a=(0,ee.FN)(e),r=(0,ee.Uz)(e),i=(0,ee.q4)(e);return(0,o.A)(i)&&(i=(0,ee.zb)(e)),n.createElement("div",{className:"p-draft_unfurls__unfurl_text"},t?n.createElement("span",{className:"p-draft_unfurls__unfurl_title"},a?n.createElement(f.A,{href:a},t):t):null,r?this.renderBlocks(r):n.createElement("span",{className:"p-draft_unfurls__unfurl_description"},this.renderDescriptionText(i)))}renderRemoveUnfurlButton(){let{unfurl:e,draftId:t,onUnfurlRemoved:a,isGifPickerPrefEnabled:r,isRemovable:i=!0}=this.props,l=(0,ee.d4)(e),o=!!(r&&l),c=(0,er.v)(e),d=(0,ee.Bg)(e)??(0,ee.J3)(e);c&&(d=e.block_id);let m=n.createElement(G.P,{url:d,draftId:t,onUnfurlRemoved:a||s.A,isGifUnfurl:r&&(0,ee.d4)(e),isBlockUnfurl:c,isGifPickerPrefEnabled:r});return!o||i&&o?m:null}removeListEntityUnfurl(e,t){let{onUnfurlRemoved:a,markDraftUnfurlAsRemoved:n}=this.props;n?.(t.url),a?.()}render(){let e,t,{draftId:a,channelId:r,unfurl:l,file:o,dispatch:c,onFilePermissionSelect:d,onUnfurlRemoved:m,shouldRenderDraftAttachmentUnfurls:_,isGifPickerPrefEnabled:f,hasGifUnfurls:g,hasBlockUnfurls:E}=this.props,C=eg.t("Remove link preview"),k=(0,ee.Zh)(l),S=(0,Z.DQ)(o),w=o&&(0,Z.l7)(o),M=(0,ee.n9)(l),R=!!M,P=M&&(0,J.XI)(M),L=(0,ee.d4)(l),O=(0,ee.B)(l),D=(0,ee.Bg)(l)??(0,ee.J3)(l),{focus_section_id:F}=D?(0,u.qN)(D):{},handleEntityRemove=()=>{a&&D&&c?.((0,ed.m)({draftId:a,url:D})),m?.()};if(!f&&!_&&!S&&!E||f&&!g&&!E&&!_&&!S)return null;let U=(0,er.v)(l)&&!!l.rows,B=i()("p-draft_unfurls__unfurl",{"p-draft_unfurls__unfurl--graphic":k&&!L,"p-draft_unfurls__unfurl--gif":L,"p-draft_unfurls__unfurls--table_block":U});if(e=k?this.renderGraphicUnfurl(l):U?n.createElement(n.Fragment,null,n.createElement("div",{className:"p-draft_unfurls__unfurl_header"},n.createElement("span",{className:"p-draft_unfurls__unfurl_header_text"},eg.t("Table"))),n.createElement(T.M,{unfurl:l})):S?n.createElement(q.A,{file:o,draftId:a,onFilePermissionSelect:d||s.A,inComposer:!0,channelId:r,hideIcon:!!F,renderRemoveButton:()=>this.renderRemoveUnfurlButton(),openButtonAriaLabel:eg.t("Open file",{fallbackHash:"f11b8781300b3fa77771681db5f936d3b0605f60",fallbackHashNs:"files"})}):(0,ee.Fj)(l)?n.createElement(n.Fragment,null,this.renderUnfurlHeader(l),n.createElement(b.A,{lines:1},n.createElement(I.g,{unfurl:l}))):(0,ee.oJ)(l)?n.createElement(n.Fragment,null,this.renderUnfurlHeader(l),n.createElement(b.A,{lines:1},n.createElement(v.z,{unfurl:l}))):(0,ee.uL)(l)?n.createElement(n.Fragment,null,this.renderUnfurlHeader(l),n.createElement(b.A,{lines:1},n.createElement(K.A,{unfurl:l}))):this.props.experimentChannelFoldersPostGaGroupOn&&(0,ee.wp)(l)?n.createElement(n.Fragment,null,this.renderUnfurlHeader(l),n.createElement(b.A,{lines:1},n.createElement(Y.d,{unfurl:l}))):this.props.experimentSharedSectionsFollowupsGroupOn&&(0,H.RM)(l)?n.createElement(DraftUnfurlsChannelSetMessage,{unfurl:l}):n.createElement(n.Fragment,null,this.renderUnfurlHeader(l),this.renderUnfurlText(l)),S)t=e;else if(w){let e=(0,A.bq)((0,ee.Bg)(l))?.recordId,i=(0,A.bq)((0,ee.Bg)(l))?.viewId;t=n.createElement(y.A,{key:`list-entity-${e||i}`,isRemovable:!0,file:o,size:h.S.compact,listRecordId:e,listViewId:i,onRemove:this.removeListEntityUnfurl||s.A,removeButtonTip:C,url:(0,ee.Bg)(l)??(0,ee.J3)(l),draftId:a,onFilePermissionSelect:d,channelId:r})}else if(O){let e={uiComponentName:et.UiComponentName.RECORD_URL,elementName:"record_url",elementValue:O.external_url,clogImpression:!0,disableAutoReferringUiContext:!0};t=n.createElement(x.a,{key:"salesforce-record-entity",entityState:h.w.enabled,size:h.S.compact,record:O,isDraft:!0,autoClogProps:e,isRemovable:!0,onRemove:handleEntityRemove,removeButtonTip:C})}else t=R||P?n.createElement(Q.C,{key:`work-entity-${M.entity_id}`,size:h.S.compact,entity:M,isInteractive:!1,isRemovable:!0,onRemove:handleEntityRemove,removeButtonTip:C}):U?n.createElement(N.M,{"aria-label":eg.t("Table"),renderRemoveButton:()=>this.renderRemoveUnfurlButton()},n.createElement(p.Nm,{className:B,onClick:this.openDetailedPreview,"aria-label":eg.t("Open table",{fallbackHash:"cf9b77061f7b3126b49d50a6fa68f7ca8c26b7a3",fallbackHashNs:"lists"})},e)):n.createElement(N.M,{"aria-label":(0,ee.LK)(l)||o?.title||eg.t("Link preview"),renderRemoveButton:()=>this.renderRemoveUnfurlButton()},n.createElement("div",{className:B},e));return n.createElement("div",{className:i()("p-draft_unfurls__unfurl_container",{"p-draft_unfurls__unfurl_container--graphic":k&&!L,"p-draft_unfurls__unfurl_container--quip":S,"p-draft_unfurls__unfurl_container--quip-anchor-link":S&&!!F,"p-draft_unfurls__unfurl_container--gif":L,"p-draft_unfurls__unfurl_container--list":w,"p-draft_unfurls__unfurl_container--record":O,"p-draft_unfurls__unfurl_container--work_object":R,"p-draft_unfurls__unfurl_container--tableau_work_object":P})},t)}};function mapStateToProps(e,t){let{unfurl:a,draftId:n,windowId:r,isEditComposer:i,isScheduled:l}=t,o=(0,ee.ih)(t.unfurl)||(0,ee.VG)(t.unfurl),{iconLink:s}=(0,ee.kL)(t.unfurl)||{},c=d.Py.concat(n),m=(0,ec.OL)(e,t.unfurl?.channel_id),u=(0,e_.Ld)(e,a?.channelId,c),p=u?.files?.filter(t=>{let a=(0,eu.Lp)(e,t);return(0,Z.PX)(a)||[]}),h=(0,ee.CK)(a),_=(0,eo.Kc)(e),f=(0,eb._J)(e,_),b=f?(0,X.F1)(f):void 0,g=(0,ea.P)(e)&&i?(0,eh.Np)(e,{windowId:r,ignoreViewContext:!0}):void 0,y=!!g?.length;return{file:h?(0,eu.Lp)(e,h):void 0,proxiedImgUrl:(0,en.Ay)(e,{url:o})||void 0,proxiedIconUrl:(0,en.Ay)(e,{url:s})||void 0,shouldRenderDraftAttachmentUnfurls:(0,ee.c2)(e,{draftId:n,windowId:r,isEditComposer:i}),channel:m,isGifPickerPrefEnabled:(0,ep.BH)(e),hasGifUnfurls:(0,ep.bc)(e,{draftId:n,scheduled:l}),hasBlockUnfurls:(0,ei.ck)(e,{draftId:n,scheduled:l}),hasEditBlockUnfurls:y,msg:u,previewableFiles:p,fullProxiedImageUrl:(0,en.Ay)(e,{url:(0,ee.VG)(t.unfurl),rotate:!0}),experimentChannelFoldersPostGaGroupOn:"on"===(0,em._Z)(e,"channel_folders_post_ga"),experimentReskinCustomResponsesGroupOn:(0,z.ZV)(e),experimentSharedSectionsFollowupsGroupOn:(0,w.aL)(e),experimentSlackbotAiNextGroupOn:(0,z.gT)(e),teamId:_,teamName:b}}ey.displayName="DraftUnfurlsAttachment";let eA=(0,el.N)(mapStateToProps)(ey)},0x1e18134eb:(e,t,a)=>{"use strict";a.d(t,{P:()=>RemoveUnfurlButton});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x15f8e452a),s=a(0x4c96e5d9),c=a(0x1d8076771),d=a(0x1bdeab7ff),m=a(0xb437e2ce),u=a(0xc53c0105),p=a(0x14c9312b3);let h=new i.Ay("live_unfurling"),_={elementName:"remove_unfurl",onClick:{enableClogAction:!0}},RemoveUnfurlButton=({ariaLabel:e,draftId:t,onClick:a,url:i,onUnfurlRemoved:f,isGifUnfurl:b=!1,isBlockUnfurl:g=!1,isGifPickerPrefEnabled:y=!1,...A})=>{let x,E=(0,r.wA)();y&&b&&(x=h.t("Remove GIF")),g&&(x=h.t("Remove table"));let C=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),a?a():t&&i&&(b?E((0,u.UX)({draftId:t,url:i,status:p.t.REMOVED})):g?E((0,c.Vp)({draftId:t,block:{block_id:i,type:"table",rows:[]},status:d.o.REMOVED})):E((0,m.m)({draftId:t,url:i})),f?.())},[E,t,i,a,f,b,g]);return n.createElement(s.Ay,{position:"top",tip:e||x||h.t("Remove link preview"),hideFromScreenReader:!0},n.createElement(l.Nm,{...A,className:"p-draft_unfurls__remove_btn",onClick:C,"aria-label":e||x||h.t("Remove link preview"),autoClogProps:_},n.createElement(o.A,{type:"circle-fill",className:"p-draft_unfurls__remove_btn_circle"}),n.createElement(o.A,{type:"times-circle",className:"p-draft_unfurls__remove_btn_times"})))};RemoveUnfurlButton.displayName="RemoveUnfurlButton"},0x1f3c65fdc:(e,t,a)=>{"use strict";a.d(t,{A:()=>ConfirmSendScheduledMessageImmediatelyModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x937dca65),s=a(0x1a6aec359),c=a(0x1a02c72b5),d=a(0xd6a16321),m=a(0xf5bbd10a),u=a(1927545e3),p=a(0xa794f9e1),h=a(0x20e80190e),_=a(0x226892387),f=a(0x217553e42),b=a(0x1c2eef3c8),g=a(0x1fcbb004d);let y=new i.Ay("drafts");function ConfirmSendScheduledMessageImmediatelyModal({channelId:e,draftId:t,onSend:a,onClose:i}){let A=(0,r.wA)(),x=(0,_.d4)(t=>(0,f.OL)(t,e)),E=(0,m.A)(),C=(0,_.d4)(e=>(0,b.YI)(e,t)),k=(0,p.l7)(C)?.[0],v=k?.channel_id&&k.thread_ts,S=(0,n.useCallback)(()=>{A((0,c.o)((0,d.ZF)(u.c.ScheduledMessages))),E.info("COMPOSER",`${t} scheduled from send scheduled message immediately speedbump, redirecting to scheduled messages page`)},[A,t,E]);function handleCloseModal({didSend:e}){i({didSend:e}),A((0,g.O)())}function handleSendNowClick(){a(),handleCloseModal({didSend:!0})}function handleSendLaterClick(){handleCloseModal({didSend:!1}),A((0,s.r)({draftId:t,onMessageScheduled:S}))}let I=n.createElement(o.A,{channel:x,includeChannelPrefix:!0,displayFormerNames:!1});return n.createElement(h.dW,{closeModal:()=>handleCloseModal({didSend:!1})},n.createElement(h.rQ,null,n.createElement(h.Rc,{title:y.t("Send now?")})),n.createElement(h.$m,null,n.createElement(h.qf,null,v?y.rt("Are you sure you want to send this message to <strong>a thread in {channel_name}</strong> now?",{channel_name:I}):y.rt("Are you sure you want to send this message to {channel_name} now?",{channel_name:I}))),n.createElement(h.jl,null,n.createElement(l.Ay,{type:"outline","data-qa":"drafts_page_confirm_send_scheduled_draft_later",onClick:handleSendLaterClick},y.t("Send Later")),n.createElement(h.ox,null,n.createElement(h.s_,{type:"outline","data-qa":"drafts_page_confirm_send_scheduled_draft_cancel",onClick:()=>handleCloseModal({didSend:!1}),"aria-label":y.t("Cancel")},y.t("Cancel")),n.createElement(l.Ay,{"data-qa":"drafts_page_confirm_send_scheduled_draft_now",onClick:handleSendNowClick,autoFocus:!0,type:"primary"},y.t("Send Now")))))}ConfirmSendScheduledMessageImmediatelyModal.displayName="ConfirmSendScheduledMessageImmediatelyModal"},0x1ac9005a:(e,t,a)=>{"use strict";let n;a.d(t,{A:()=>w});var r=a(0x21f3c49e8),i=a(0xe874a88a),l=a(0xbe0b63ff),o=a(0x130c2e810),s=a(0x1fda0b46e),c=a(0x23a67ace),d=a(0x1a02c72b5),m=a(0xd6a16321),u=a(0x1ec69ee01),p=a(0x19d55d0e1),h=a(0xa794f9e1),_=a(0xbd3de346),f=a(0x20679dcfc),b=a(0xbe2be077),g=a(0x11c82607b),y=a(0x9a5066aa),A=a(0x13ef633fd),x=a(0x1ed65ccda),E=a(0x217553e42),C=a(0xb5b2b6dd),k=a(0x77fdddae),v=a(0x14149c126),S=a(0x14ea3ce99);function waitForDraftInput(e,t){clearInterval(n);let a=(0,k.A)(e,t);return a?i.S.resolve(a):new i.S(a=>{n=window.setInterval(()=>{let r=(0,k.A)(e,t);r&&(clearInterval(n),a(r))},50)}).timeout(1e4)}let I=(0,g.Ay)("View a channel, thread, or composer draft",(e,t,{draft:a})=>{let n="on"===(0,v._Z)(t(),"dlp_async_file_processing");if(!(0,r.A)(a))if((0,h.sC)(a)){let r=(0,b.k)(t());if(a&&(0,h.$9)(a)?.threadTs&&r&&n){let{channelId:t,threadTs:n}=(0,h.$9)(a)||{};if(n&&t){e((0,C.RL)({draftId:a.client_draft_id})),e((0,y.A)({channelId:t,threadTs:n,preventMoveFocus:!0})),waitForDraftInput(t,n).then(e=>{e.scrollIntoView?.(),e.focus()});return}}if(a&&(0,h.V)(a)){let n=(0,h.zl)(a)?.[0];if((0,p.OR)(t(),n)){let r=(0,f.l)(n),i=r&&(0,S.Lp)(t(),r),o=i&&(0,l.uz)(i)&&(0,_.DQ)(i),s=i&&(0,l.uz)(i)&&(0,_.l7)(i);if(o||s){let t=(0,h.l7)(a),r=t?.[0]?.thread_ts;if(r){e((0,C.RL)({draftId:a.client_draft_id})),e((0,y.A)({channelId:n,threadTs:r,preventMoveFocus:!0})),waitForDraftInput(n,r).then(e=>{e.scrollIntoView?.(),e.focus()});return}}}}let i=(0,h.ue)(a);e((0,A.U)({draftId:i}))}else{let{channelId:n,threadTs:r}=(0,h.GP)(a)||{},i=(0,E.OL)(t(),n),l=(0,u.bK)(t(),i),p=(0,s.g)(t())&&(0,o.Hm)(t(),n||"")&&!(0,c.oO)(t());n&&(r?(e((0,y.A)({channelId:n,teamId:l,threadTs:r})),waitForDraftInput(n,r).then(e=>{e.scrollIntoView?.(),e.focus()})):e(p?(0,x.T)({channelId:n,isSplitView:!1}):(0,d.o)((0,m.pr)(n))))}});I.meta={name:"jumpToDraft",key:"createThunkJumpToDraft",description:"View a channel, thread, or composer draft"};let w=I},0x1175de322:(e,t,a)=>{"use strict";a.d(t,{N:()=>_,q:()=>f});var n=a(0x21f3c49e8),r=a(0x244f35bf8),i=a(0x118cdcdea),l=a.n(i),o=a(0xa794f9e1),s=a(0x1634acce7),c=a(0xf3b2b34),d=a(0x10d5cec41),m=a(0x11c82607b),u=a(0x1ccef1c6f),p=a(0x1c2eef3c8),h=a(0x18f183d32);let _=(0,m.Ay)("Prepares a scheduled draft before editing",(e,t,{draft:a})=>{let i=t();if(!(0,u.ty)(i,"plain_text_mode"))return a;let s=(0,o._l)(a);if((0,n.A)(s)||!(0,o.V)(a))return a;let m=new(l())(s.slice()),p=(0,d.A)({delta:m,state:i})||{},_=p&&(0,r.A)(p)?new(l()):(0,c.A)(i,p.blocks);if(!_||!_.ops)return a;let f={...a,ops:_.ops};return e((0,h.i)({draft:f,reason:"prep-draft-before-markdown-editing"})),f});_.meta={name:"prepareScheduledDraftBeforeEditing",key:"createThunkPrepareScheduledDraftBeforeEditing",description:"Prepares a scheduled draft before editing"};let f=(0,m.Ay)("Prepares a scheduled draft after editing",(e,t,{draftId:a})=>{let r=t();if(!(0,u.ty)(r,"plain_text_mode"))return;let i=(0,p.YI)(r,a),c=(0,o._l)(i);if(!i||!c||(0,n.A)(c)||!(0,o.V)(i))return;let d=new(l())(c.slice()),{processedDelta:m}=(0,s.A)(r,{delta:d}),_={...i,ops:m.ops};e((0,h.i)({draft:_,reason:"prep-draft-after-markdown-editing"}))});f.meta={name:"prepareScheduledDraftAfterEditing",key:"createThunkPrepareScheduledDraftAfterEditing",description:"Prepares a scheduled draft after editing"}},0xe525becc:(e,t,a)=>{"use strict";a.d(t,{A:()=>M});var n=a(0x118cdcdea),r=a.n(n),i=a(0xe874a88a),l=a(0x1a02c72b5),o=a(0xd6a16321),s=a(0xa794f9e1),c=a(0x23fb5a202),d=a(0x16b50768c),m=a(0x3711e82d),u=a(0x45012309),p=a(0x1ec68d6a3),h=a(0x1d8076771),_=a(0x1e0a0cdcc),f=a(0x11c82607b),b=a(0xc2757f82),g=a(0x5a0401a4),y=a(0x7a48cfc4),A=a(0x1cfcdb1db),x=a(0x22190f6c),E=a(0xf54147b),C=a(0x22237e33e),k=a(0x1bca44972),v=a(0xb5b2b6dd),S=a(0xaf9d2265),I=a(0x77fdddae),w=a(0xc53c0105),T=a(0x1988881a0);let N=(0,f.Ay)("Send channel or Composer draft message",async(e,t,{draft:a,isFromModal:n=!1,isFromBulkModal:f=!1,isFromDraftsPageAndExternallySharedChannel:N=!1,isFromScheduledPage:M=!1,skipDlpUserWarning:R=!1,isFromDraftsPage:P=!1})=>{let L=(0,s.zl)(a);if(L&&L[0]&&await i.S.all([e((0,b.D)({channelId:L[0],prefName:"enable_at_channel",reason:"send-draft-message"}))]),(0,s.sC)(a))return e((0,x.K)({draft:a,isFromModal:n,isFromDraftsPageAndExternallySharedChannel:N,isFromScheduledPage:M,skipDlpUserWarning:R,isFromDraftsPage:P}));let O=(0,p.Ay)({getState:t,label:"COMPOSER"}),{channelId:D,isBroadcast:F,threadTs:U}=(0,s.GP)(a)||(0,s.$9)(a)||{},B=(0,s._l)(a),H=(0,s.ue)(a),W=(0,u.eo)({getState:t}),V=(0,E.A)(a),G=(0,c.A)(a),q=e((0,k.f)({draftId:H,ops:B})),j=e((0,C._)({unfurls:q,draftId:H}));e((0,S.A)({ids:[H],syncDelete:!1,reason:"sendDraftMessage",disableGifUnfurlClearing:!0,disableBlockUnfurlClearing:!0}));let z=(0,d.A)(t(),H),K=(0,T.BH)(t()),$=(0,T.bc)(t(),{draftId:H}),Y=(0,_.ck)(t(),{draftId:H});if(K&&$&&e((0,w.GV)({draftId:H})),Y&&e((0,h.d6)({draftId:H})),U){let t=D?(0,I.A)(D,U):null;if(t&&t.clear(),!f){if(N)return e((0,g.A)({channelId:D||"",threadTs:U})).then(()=>e((0,A.Ay)({channelId:D||"",delta:new(r())(B),fileIds:G,includeBroadcastKeywordWarning:!0,includePrivateFileReshareWarning:!0,includeLoginInitiateRedirectLinkWarning:!0,replyToTs:U,shouldBroadcast:F,pendingFileIds:z,xArgs:V,draftId:H,isFromDraftsPageAndExternallySharedChannel:N,unfurls:q,unfurlsWithData:j})).then(e=>(O.info(`Composer message successfuly sent. Removing the draft (${H})`),e)).then(()=>{e((0,w.jb)({draftIds:[H]}))}).catch(t=>{throw e((0,v.nz)(a)),t}));e((0,g.A)({channelId:D||"",threadTs:U}))}}else if(D&&await e((0,y.C)({channelId:D})),!f)try{D&&await e((0,l.o)((0,o.pr)(D)))}catch(e){throw O.error("Failed to navigate to primary view",e),e}return W.track(m.EventId.COMPOSE_FLOW,{draft_action_source:n?"modal":"input",draft_id:H,draft_type:"channel",contexts:{ui_context:{action:m.UiAction.CLICK,step:m.UiStep.COMPOSE_FLOW_SEND}}}),e((0,A.Ay)({channelId:D||"",delta:new(r())(B),fileIds:G,includeBroadcastKeywordWarning:!0,includePrivateFileReshareWarning:!0,includeLoginInitiateRedirectLinkWarning:!0,replyToTs:U,shouldBroadcast:F,pendingFileIds:z,xArgs:V,draftId:H,isFromDraftsPageAndExternallySharedChannel:N,unfurls:q,unfurlsWithData:j})).then(e=>(O.info(`Composer message successfuly sent. Removing the draft (${H})`),e)).then(()=>{e((0,w.jb)({draftIds:[H]}))}).catch(t=>{throw e((0,v.nz)(a)),t})});N.meta={name:"sendDraftMessage",key:"createThunkSendDraftMessage",description:"Send channel or Composer draft message"};let M=N},0x7f81b930:(e,t,a)=>{"use strict";a.d(t,{Bh:()=>c,D:()=>h,Eu:()=>l,IC:()=>i,Lg:()=>o,Pz:()=>r,UI:()=>s,XV:()=>n,f6:()=>d,s4:()=>p,ue:()=>m,xo:()=>u});let n="DRAG_CHANNEL_SIDEBAR_CHANNELS",r="DRAG_CHANNEL_SIDEBAR_SECTION_HEADING",i="DRAG_CHANNEL_SIDEBAR_ENTITY",l="DRAG_FILE",o="DRAG_VIEW_HEADER_BIG_BUTTON",s="DRAG_MESSAGE_PANE_MESSAGE",c="DRAG_DM",d="DRAG_FILES_SIDEBAR_FILE",m="DRAG_LATER_ITEM",u="DRAG_ACTIVITY_ITEM",p="DRAG_FILE_COLLECTION_HEADING",h=[n,o,s,c,d,m,u]},0x196c586a5:(e,t,a)=>{"use strict";a.d(t,{T:()=>EditProfileModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x3b6d144f),o=a(0x20482ad21),s=a(0x24546e7f2),c=a(0xe874a88a),d=a(0x2b7f0bcc),m=a(0x11a296110),u=a(0x11ad11f0e),p=a(0x1c659cbb1),h=a(0x1e5781b84),_=a(0x113a45767),f=a(0x170214077),b=a(0x6792c5b4),g=a(0xd843ab47),y=a(0x226892387),A=a(0x18a17ca8f);let x=new o.Ay("edit_profile");function EditProfileUploadPreview({memberId:e,cropPreview:t,image:a,minSize:r,maxSize:i}){let o=t?n.createElement(_.$,{className:"p-edit_profile__upload_preview_photo",crop:t,image:a,imageDisplaySize:i,previewDisplaySize:r}):n.createElement(p.Ay,{size:r,userId:e,isInteractive:!1,tabIndex:-1}),s=(0,l.A)(()=>({ts:(0,u.A)(Date.now()),user:e,type:"",channel:""}),[e]),{getSiblingView:c}=(0,n.useContext)(g.A),d=(0,y.d4)(e=>(0,A.g6)(e,{getSiblingView:c})),m=(0,y.d4)(A._E);return n.createElement("div",{className:"p-edit_profile__upload_preview"},n.createElement("div",{className:"p-edit_profile__upload_preview_label"},x.t("Preview")),n.createElement("div",{className:"p-edit_profile__upload_message"},n.createElement(b.A,{compact:o,light:o},d?m:n.createElement("strong",null,n.createElement(h.A,{id:e})),"\xa0\xa0",n.createElement(f.A,{msg:s}))))}EditProfileUploadPreview.displayName="EditProfileUploadPreview";let E=n.memo(EditProfileUploadPreview);var C=a(0x55b499c3),k=a(0x8c6fc54a),v=a(0x22a29f141),S=a(0x1ec68d6a3);let I=(0,a(0x1dfdeb1c8).A)("Uploads a profile photo for the current user",(e,t,{imageId:a,cropX:n,cropY:r,cropSize:i,reason:l="submitSetPhoto"})=>e((0,v.apiCall)({method:"users.setPhoto",args:{id:a,crop_x:n.toString(),crop_y:r.toString(),crop_w:i.toString()},reason:l})).catch(e=>{throw(0,S.Ay)({getState:t}).warn(k.n,"Failed to upload profile photo"),e}));I.meta={name:"setUserPhotoApi",key:"createFetcherSetUserPhotoApi",description:"Uploads a profile photo for the current user"};var w=a(0x185dd2f2b),T=a(0x1b9d5cc0c),N=a(0x1c9a3c4c1),M=a(0x20e80190e),R=a(0x3711e82d),P=a(0x8ed4913f),L=a(0x19c76d181),O=a(0x14149c126),D=a(0x1fcbb004d);let F={eventId:R.EventId.CLIENT_GENERAL,elementName:"new_avatar_uploaded",onClick:{enableClogAction:!0},uiComponentName:R.UiComponentName.USERPROFILE_UPLOAD_PHOTO_BUTTON},U=new o.Ay("edit_profile");function EditProfileCropPane({image:e,mode:t,switchPane:a=i.A,imageId:l,onUpload:o=i.A,agent:s}){let u,[p,h]=(0,n.useState)({x:0,y:0,width:0,height:0}),[f,b]=(0,n.useState)(!1),[g,A]=(0,n.useState)(!1),x=(0,y.d4)(e=>(0,O._Z)(e,"profile_photo_comp")),k=(0,r.wA)(),v=(0,y.d4)(L.WR),S=!!(s&&(0,N.D)(s)),R=S?s?.id:v;function handleUpload(){let n;if(!e)return;let{displayWidth:r,displayHeight:i}=(0,P.A)({width:e.width,height:e.height,maxSize:C._E}),d=Math.max(1,e.height/i),m=Math.max(1,e.width/r),u=p.x*m,h=p.y*d,_=p.width*m;if(b(!0),A(!1),S){let e=(0,T.PV)(s),t=l?parseInt(l,10):void 0;n=e&&t?k((0,w.k)({appId:e,id:t,cropX:u.toString(),cropY:h.toString(),reason:"edit-profile-set-photo"})):c.S.reject(Error('Missing "appId"'))}else n=k(I({imageId:l,cropX:u,cropY:h,cropSize:_,reason:"edit-profile-set-photo"}));n.then(()=>{t===C.DU.PHOTO_UPLOAD||t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD?(o?.({}),k((0,D.O)())):(S&&o({isLoading:!0}),a(C.ii.FORM))}).catch(()=>{A(!0),b(!1)})}function handleCancel(){switch(t){case C.DU.PHOTO_UPLOAD:k((0,D.O)());break;case C.DU.ONBOARDING_TASK_PHOTO_UPLOAD:a(C.ii.SELECT);break;default:a(C.ii.FORM)}}let B=x?U.t("Add a profile photo"):U.t("Crop your photo");return t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD&&(B=U.t("Add a profile picture"),u=U.t("A profile picture can help team members recognize you")),n.createElement(n.Fragment,null,n.createElement(M.rQ,{className:"p-edit_profile__crop_header"},n.createElement(M.Rc,{id:"edit_profile__title-bar",className:"p-edit_profile__crop_title_bar",title:B,subtitle:u,"data-qa":"edit_profile_crop_pane_header"})),n.createElement(M.$m,{className:"p-edit_profile__crop_content"},n.createElement(M.qf,{className:"p-edit_profile__centered"},g&&n.createElement(d.Ay,{level:"error",className:"p-edit_profile__error_alert"},U.t("Sorry! Something went wrong. Please try again.")),n.createElement("div",{className:"p-edit_profile__centered_primary p-edit_profile__centered_primary--background"},n.createElement(_.A,{className:"p-edit_profile__cropper fixed-height",imageSrc:e?.src??"",maxSize:C._E,minSize:C.G9,defaultCropScale:1,onChange:h})),n.createElement("div",{className:"p-edit_profile__centered_primary"},n.createElement(E,{memberId:R,cropPreview:p,image:e,minSize:C.G9,maxSize:C._E})))),n.createElement(M.jl,null,n.createElement(M.ox,null,n.createElement(m.Ay,{onClick:handleCancel,type:"outline"},U.t("Cancel")),n.createElement(m.lV,{onClick:handleUpload,loading:f,"data-qa":"edit_profile_upload_save_button",autoFocus:!0,autoClogProps:F,"aria-label":U.t("Save")},U.t("Save")))))}EditProfileCropPane.displayName="EditProfileCropPane";let B=EditProfileCropPane;var H=a(0x854f5389),W=a(0x6258badf),V=a(0x658a411c),G=a(0xb1ea448c),q=a(0x677a139e),j=a(0x1d2cd7755),z=a(0x126f22530),K=a(0x5299a396),$=a(0x15f8e452a),Y=a(0x1faa3f1ac),Q=a(0x780e190c),Z=a(0x4c96e5d9),J=a(0x130c2e810),X=a(0x10d53599f),ee=a(0x19dc73101),et=a(0x1f5324076),ea=a(0xc8b3fd9b),en=a(0x3c75b5a3),er=a(0x11c82607b),ei=a(0xdcdceb4),el=a(0x1ad5fd0d5);let eo=(0,er.Ay)("remove App Collaborator",(e,t,{appId:a,currentUserId:n,userId:r}={})=>{let i=(0,el.li)(t(),a),l=(0,ea.A)(i.concat(),e=>e!==r);return e((0,ei.Pi)({appId:a,collaborators:l})),e((0,en.fk)({appId:a,userId:r})).then(()=>n===r?e((0,ei.aP)({appId:a})):e((0,ei.dH)({userId:r}))).catch(()=>(e((0,ei.wW)({userId:r})),e((0,ei.Pi)({appId:a,collaborators:i}))))});eo.meta={name:"removeAppCollaborator",key:"createThunkRemoveAppCollaborator",description:"remove App Collaborator"};var es=a(0xe684f705);let useAgentManagerFields=({agentCreator:e,agentOwners:t})=>{let a=(0,y.d4)(e=>(0,es.gA)(e,t));return(0,n.useMemo)(()=>{let t=[];return e&&t.push({label:(0,T.wg)(e),value:e?.id??"",entity:e}),a.forEach(a=>{a&&a.id!==e?.id&&t.push({label:(0,T.wg)(a),value:a.id,entity:a})}),t},[e,a])},useApplyAgentManagerChanges=()=>{let e=(0,r.wA)();return(0,n.useCallback)(async(t,a,n)=>{if(!t?.app_id)return;let r=t.legacy_app?.owner_ids||[],i=a.map(e=>e.value),l=i.filter(e=>!r.includes(e));l.length>0&&await e((0,et.Y)({appId:t.app_id,userIds:l}));let o=r.filter(e=>!i.includes(e));await Promise.all(o.map(a=>e(eo({appId:t.app_id,userId:a})))),n(!0)},[e])};var ec=a(0xb0ca8936);let ed=new o.Ay("edit_profile"),em=[0],eu=[],ep={entities:{members:{includeSelf:!0,includeExternal:!1,includeAllExternal:!1,includeSlackbot:!1,includeBots:!1,includeDeleted:!1,includeGuests:!1,includeProfileOnlyUsers:!1,matchEmailField:!0,remoteLimit:30}},allowEmptyQuery:!0,sort:{source:"sfdc-members-add-individual",frecency:!0},limit:6,filter:e=>!e.is_invited_user},AgentManagerSearcherMultiSelect=({agentManagers:e,doesAgentCreatorExist:t,errorText:a,onSelectedItemsChange:r})=>{let i=(0,n.useCallback)(e=>({...e,isDisabled:!1}),[]),l=(0,n.useCallback)(e=>e.map(i),[i]),o=(0,n.useCallback)(e=>n.createElement(X.A,{id:e.value,member:e.entity}),[]);return n.createElement(ee.h,{selectId:"sfdc-members-add-individual",className:"p-edit_profile_modal__agent_manager_field",width:"100%",maxHeight:230,expandOnFocus:!0,dynamicHeight:!0,placeholderText:ed.t("Search for people by name"),searcherOptions:ep,selectedOptions:e,disabledSelectedTokenIndexes:t?em:eu,onSelectedItemsChange:r,processOptions:l,renderOption:o,errorText:a})};AgentManagerSearcherMultiSelect.displayName="AgentManagerSearcherMultiSelect";let AgentManagersSection=({profile:e,setAgentManagers:t,setIsDirty:a,errorText:r})=>{let i=(0,y.d4)(t=>(0,es.OA)(t,e?.legacy_app?.agentforce?.creator?.email)??void 0),l=useAgentManagerFields((0,n.useMemo)(()=>({agentOwners:e?.legacy_app?.owner_ids||[],agentCreator:i}),[i,e?.legacy_app?.owner_ids])),o=(0,n.useCallback)(e=>{t(e),a(!0)},[t,a]);return n.createElement(n.Fragment,null,n.createElement(j.A,{text:ed.t("Agent Managers")}),n.createElement(AgentManagerSearcherMultiSelect,{agentManagers:l,doesAgentCreatorExist:void 0!==i,onSelectedItemsChange:o,errorText:r}),n.createElement(ec.EY,{size:"caption"},ed.t("Add people who can edit and remove this agent. Agent builder can not be removed.")))};AgentManagersSection.displayName="AgentManagersSection";var eh=a(0x1287e986a),e_=a(0x186290015),ef=a(0x41b376fd),eb=a(0x1a7c10f4),eg=a(0x82980ab8);function getDefaultFieldValues(e){let t=(0,T.v8)(e),a=(0,T.fD)(e),n=(0,T.Jc)(e),r=(0,T.rN)(e);return{display_name:(0,eg.Fh)(e),...t?{phone:t}:{},real_name:(0,eg.wg)(e),...a?{pronouns:a}:{},...n?{skype:n}:{},...r?{title:r}:{},tz:(0,T.et)(e)}}var ey=a(0x204173b44),eA=a(0x214833d87),ex=a(0x249159109);function hasUserChanges({changes:e,defaultFieldValues:t,customFieldValues:a}){let n=(0,W.A)(e,"fields");return!((0,ex.A)(n,(e,a)=>{let n=t?.[a];return!n&&!e||n===e})&&(0,ex.A)(e.fields,({alt:e,value:t},n)=>{let r=a&&a[n]||{alt:void 0,value:void 0},i=!r.alt&&!e||r.alt===e,l=!r.value&&!t||r.value===t;return i&&l}))}var eE=a(0x24adebcd);function useFilteredDefaultProfileFields(e,t){let a=(0,y.d4)(eE.A),n=!1,r=!1;for(let e of t)"title"===e.fieldName&&e.isScim&&(n=!0),"primaryPhone"===e.fieldName&&e.isScim&&(r=!0);return n||r?e.filter(e=>"phone"!==e.name||!r||!!a):e}var eC=a(0xb904b8fb),ek=a(0x1e170f9f5),ev=a(0x1110e9591),eS=a(0x1f3226107),eI=a(0x1d32a767a),ew=a(0x1079e2574),eT=a(0x680cef35),eN=a(0xa1832ae4),eM=a(0x134d3fed9),eR=a(0x8611fbf6),eP=a(0x190a9df19),eL=a(0x6960d8b9),eO=a(0x1c91944c9),eD=a(0x1d600678),eF=a(0x12f41fc32),eU=a(0x3626cdc6),eB=a(0xacef5994),eH=a(0x1ee439e69);let eW=new o.Ay("edit_profile");function EditProfileFormPane({member:e,setUserPrefByApi:t,switchPane:a=i.A,team:l,updateCurrentMemberProfile:o,customDisplayNamePolicy:s,changedFormValues:d,setChangedFormValues:m=i.A,isDisplayPronounsEnabled:u,isRealNameUneditable:p,isDisplayNameUneditable:h,isLoadingProfilePhoto:_,isProfilePhotoUneditable:f,experimentProfileModerationCopyGroupOn:b,experimentProfileModerationCopyV2GroupOn:g,focusedFieldName:A,formCancelButtonLabel:x,formSaveButtonLabel:E,modalTitle:k,modalSubtitle:v,refetch:S,adjustProfileFields:I=H.A,footerContent:w,onCancel:R,onSave:P,onUpload:L=i.A,profile:O,agent:D}){let F=(0,eT.A)("EditProfileFormPane"),U=(0,ew.A)({reason:"EditProfileFormPane",memberId:e.id}),{hasNamePronunciationText:B,isNamePronunciationTextDisabled:J,isNameRecordingEnabled:X,setGraphQLHeaderFields:ee,initialNamePronunciationFileId:et,initialNamePronunciationText:ea,titleElement:en,loading:er}=(0,ev.A)(e.id),ei=(0,r.wA)(),[el,eo]=(0,n.useState)(!1),[ec,ed]=(0,n.useState)(O?.legacy_app?.assistant_description),[em,eu]=(0,n.useState)(!1),[ep,eg]=(0,n.useState)(!1),ex=(0,n.useRef)(e.profile.avatar_hash),[eE,eC]=(0,n.useState)([]),ek=useApplyAgentManagerChanges();(0,n.useEffect)(()=>{ex.current!==e.profile.avatar_hash&&(L({isLoading:!1}),ex.current=e.profile.avatar_hash)},[ex,L,e.profile.avatar_hash]);let eN=(0,y.d4)(e=>(0,es.nv)(e,O?.legacy_app?.auth?.created_by)),[eM,eR]=(0,n.useState)({...d}),[eP,eO]=(0,n.useState)({}),[eD,eF]=(0,n.useState)(ea),[eB,eH]=(0,n.useState)(et),eV=!!(D&&(0,N.D)(D)),eG=(0,n.useMemo)(()=>eV?{real_name:(0,T.wg)(e),description:O?.legacy_app?.assistant_description,date_installed:(0,eL.Yq)(O?.legacy_app?.date_installed,"{date_short}"),created_by:(0,T.wg)(eN),prompts:null,title:""}:getDefaultFieldValues(e),[eN,eV,e,O?.legacy_app?.assistant_description,O?.legacy_app?.date_installed]),[eq,ej]=(0,n.useState)(d?.title??eG.title);(0,n.useEffect)(()=>{eF(ea)},[ea]),(0,n.useEffect)(()=>{eH(et)},[et]);let ez=eV?(0,ey.r)():(0,ey._)({customDisplayNamePolicy:s??void 0,team:l,isDisplayPronounsEnabled:u,hasNamePronunciationText:B,isNamePronunciationTextDisabled:J,isTitleDisabled:!en?.permissions?.ui,isNameRecordingEnabled:X,isRealNameUneditable:p,isDisplayNameUneditable:h}),eK=I(useFilteredDefaultProfileFields(ez,(0,eb.A)(l))),e$=(0,n.useCallback)((e,t,a)=>{if("description"===e.name&&(eu(!0),ed(t)),"title"===e.name?(ej(t),eR(e=>({...e,title:t}))):e.isCustom?eR(n=>({...n,fields:{...n.fields,[e.name]:{alt:a,value:t}}})):"name_pronunciation"===e.name?eF(t):eR(a=>({...a,[e.name]:t})),e.validation){let n={[e.name]:e.validation(t||"").errors[0]};e.validationAlt&&a&&(n[`${e.name}_alt`]=e.validationAlt(a).errors[0]),eO(e=>({...e,...n}))}},[]),{enableSpeedBump:eY}=(0,Q.k)(),eQ=hasUserChanges({changes:eM,defaultFieldValues:eG})||ea!==eD||et!==eB||eG.title!==eq,eZ=(0,n.useRef)();function getFieldValue(e){return"title"===e?{value:eq}:e in eM?{value:eM[e]}:eM.fields&&e in eM.fields?{value:eM.fields[e].value,alt:eM.fields[e].alt}:e in eG?{value:eG[e]}:"name_pronunciation"===e?{value:eD}:{}}(0,n.useEffect)(()=>{eZ.current={...eM}},[eM]),(0,n.useEffect)(()=>(eY(eQ),()=>{eY(!1),eQ&&m(eZ.current)}),[eY,eQ]);let eJ=(0,n.useCallback)(e=>{e&&ei((0,eS.Ww)({fileId:e,reason:"name_pronunciation_audio_file_deletion"}))},[ei]),[eX,e0]=(0,n.useState)(Array.isArray(O?.legacy_app?.assistant_suggested_prompts)?O?.legacy_app?.assistant_suggested_prompts:[]);async function handleSubmit(e){let done=()=>P?P():e({force:!0});if(eV){if(!em||!O?.app_id)return void done();let e=eX?eX.filter(e=>e.title.length&&e.message.length):[];return e.length?(eo(!0),await ei((0,eI.x)({appId:O?.app_id,assistantSuggestedPrompts:e,assistantDescription:ec,reason:"edit_agent_profile"})),eE.length&&await ek(O,eE,eu),ei((0,eU.A)(O.app_id)),eo(!1),void done()):void eg(!0)}if(!eQ)return void done();eo(!0);let a=[];et&&eB!==et&&eJ(et),(ea!==eD||et!==eB||eG.title!==eq)&&ee&&await ee(eB,eD,eq).then(()=>S&&S());let n=eM.tz;n&&a.push(t({pref:"tz",value:n}));let r={...(0,W.A)(eG,"tz","title"),...(0,W.A)(eM,"tz"),fields:{...eM.fields}};a.push(o({profile:r,reason:"EditProfileFormPane"})),await c.S.all(a).then(e=>{let t=e[0];t?.data?.ok===!1&&t?.data?.error==="invalid_name_specials"&&t?.data?.field?eO({[t.data.field]:{type:"error_no_special_chars"}}):done()}).finally(()=>eo(!1))}let e1=(0,n.useCallback)(()=>{eo(!0)},[]),e2=(0,n.useCallback)(()=>{eo(!1)},[]),e4=(0,n.useCallback)(e=>{null===e&&eB&&eB!==et&&eJ(eB),eH(e)},[eB,eJ,et]);function handleCancel(e){eB&&eB!==et&&!eV&&eJ(eB),e({force:!0})}function getAudioFileProps(e){return{onChangeFile:e4,initialNamePronunciationFileId:"name_recording"===e.name?eB??void 0:void 0,onFileUploadStart:e1,onFileUploadEnd:e2}}let e5=[eW.t("First"),eW.t("Second"),eW.t("Third"),eW.t("Fourth")],e3=(0,n.useCallback)((e,t)=>a=>{if(!eX)return;if(eX.length<4)for(let e=eX.length;e<4;e++)eX.push({title:"",message:""});let n={...eX[e],[t]:a};e0([...eX.slice(0,e),n,...eX.slice(e+1)]),eu(!0)},[eX]);function renderField(e,t){let{alt:a,value:r}=getFieldValue(e.name);if("prompts"===e.name){let e=e5.map((e,t)=>{let a;return 0===t&&ep&&(a=eW.t("Please add at least one assistant suggested prompt.")),n.createElement("div",{key:e},n.createElement(j.A,{text:eW.t("Display text")},n.createElement(z.A,{id:`ai_apps_prompt_${t+1}_title`,isRequired:!0,name:`ai_apps_prompt_${t+1}_title`,size:"medium",onChange:e3(t,"title"),value:eX?.[t]?.title,placeholder:eW.t("Display text"),errorText:a})),n.createElement(j.A,{text:eW.t("Actual prompt")},n.createElement(K.A,{id:`ai_apps_prompt_${t+1}_message`,isRequired:!0,name:`ai_apps_prompt_${t+1}_message`,size:"medium",onChange:e3(t,"message"),value:eX?.[t]?.message,placeholder:eW.t("Actual prompt"),errorText:a})))});return n.createElement(n.Fragment,null,e)}let i=(0,eA.A)(eP[e.name]),l=(0,eA.A)(eP[`${e.name}_alt`]),o=getAudioFileProps(e);return n.createElement(eh.A,{errorText:i,errorAltText:l,field:e,key:e.name,onChange:e$,value:r,valueAlt:a,focusOnMount:A?e.name===A:0===t&&!e.isCustom,audioFileProps:o})}renderField.displayName="renderField";let e6=(0,n.useCallback)(()=>eV&&O?n.createElement(AgentManagersSection,{profile:O,setIsDirty:eu,setAgentManagers:eC}):null,[eV,O,eu,eC]),e8=f?n.createElement(n.Fragment,null,n.createElement(Z.Ay,{tip:eW.t("Locked by an Admin"),position:"top"},n.createElement($.A,{type:"lock"})),n.createElement("strong",null,eW.t("Profile photo"))):eW.t("Profile photo"),e7=g?"https://confluence.internal.salesforce.com/spaces/EPGC/pages/1112251115/Slack+Engagement+Policy":"https://inside.salesforce.com/2022/07/20/understanding-salesforce/chatiquette-community-guidance-for-slack/19101/",e9=(0,n.useCallback)(({text:e})=>n.createElement(Y.A,{href:e7,target:"_blank"},e),[e7]),te=b?eW.rt("Your photo is subject to the <a>Slack Engagement Policy</a>",{"<a>":e9}):"";return n.createElement(n.Fragment,null,n.createElement(M.rQ,null,n.createElement(M.Rc,{id:"edit_profile__title-bar",subtitle:v,title:n.createElement("div",{className:"p-edit_profile__title"},k||eW.t("Edit your profile"),(F||U||er)&&n.createElement(G.A,{className:"p-edit_profile__title_progress",size:"medium"}))})),n.createElement(M.$m,null,n.createElement(M.qf,null,n.createElement("div",{className:"p-edit_profile__columns"},n.createElement("div",{className:"p-edit_profile__column_primary"},eK.slice(0,3).map(renderField)),n.createElement("div",{className:"p-edit_profile__column_secondary",role:"group","aria-labelledby":"profile-photo-title"},n.createElement(j.A,{text:e8,id:"profile-photo-title"},n.createElement(e_.A,{member:e,isLoadingProfilePhoto:_})),n.createElement(ef.A,{className:"p-edit_profile__column_secondary_control",switchPane:a,type:"outline",disabled:f},eW.t("Upload Photo")),(0,T.xJ)(e)&&n.createElement(Y.A,{className:"p-edit_profile__column_secondary_control",onClick:()=>a(C.ii.REMOVE),disabled:f},eW.t("Remove Photo")),b&&n.createElement(q.A,null,te))),eK.slice(3,eK.length).map(renderField),e6())),n.createElement(M.jl,{renderSpeedBump:({cancel:e,closeModal:t})=>n.createElement(M.ty,{onContinue:()=>handleCancel(t),onCancel:e})},w,n.createElement(M.ox,null,n.createElement(M.s_,{type:"outline",onClick:R||handleCancel,"aria-label":x||eW.t("Cancel")},x||eW.t("Cancel")),n.createElement(M.s_,{disabled:(0,V.A)(eP,H.A),loading:el,onClick:handleSubmit,"aria-label":E||eW.t("Save Changes")},E||eW.t("Save Changes")))))}function mapStateToProps(e,t){let a=t?.agent&&(0,N.D)(t?.agent)?(0,es.nv)(e,t.agent?.id):(0,es.cA)(e),n=(0,eH.H7)(e);return{member:a,profile:(0,J.bv)(e,t.agent),memberIsAdmin:(0,eP.Zo)(e),team:n,customDisplayNamePolicy:(0,eD.x)(e,"username_policy",(0,eN.ZT)(n)),isDisplayPronounsEnabled:(0,eC.A)(e),isRealNameUneditable:!(0,ek.A)(e),isDisplayNameUneditable:!(0,eR.m)(e),isProfilePhotoUneditable:!(0,eM.f)(e),experimentProfileModerationCopyGroupOn:"on"===(0,O._Z)(e,"profile_moderation_copy"),experimentProfileModerationCopyV2GroupOn:"on"===(0,O._Z)(e,"profile_moderation_copy_v2")}}EditProfileFormPane.displayName="EditProfileFormPane";let eV={updateCurrentMemberProfile:eB.A,setUserPrefByApi:eF.AZ},eG=(0,eO.N)(mapStateToProps,eV)(EditProfileFormPane);var eq=a(0x127218dbe),ej=a(0x5e2160d0),ez=a(0x25341c4d4);let eK=new o.Ay("edit_profile");function EditProfileRemovePane({switchPane:e=i.A,agent:t}){let[a,l]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),u=(0,r.wA)(),p=(0,y.d4)(es.cA),h=!!(t&&(0,N.D)(t)),_=h?t:p,f=(0,T.PV)(t),b=(0,n.useCallback)(()=>{l(!0),s(!1),(h?f?u((0,ej.z)({appId:f,reason:"edit_profile_delete_photo"})):c.S.reject(Error('Missing "appId"')):u((0,ez.b)({reason:"edit_profile_delete_photo"}))).then(()=>e(C.ii.FORM)).catch(()=>s(!0)).finally(()=>l(!1))},[f,u,h,e]);return n.createElement(n.Fragment,null,n.createElement(M.rQ,null,n.createElement(eq.A,{onClick:()=>e(C.ii.FORM)}),n.createElement(M.Rc,{id:"edit_profile__title-bar",title:eK.t("Remove profile photo")})),n.createElement(M.$m,null,n.createElement(M.qf,{className:"p-edit_profile__centered"},o&&n.createElement(d.Ay,{level:"error",className:"p-edit_profile__error_alert"},eK.t("Sorry! Something went wrong. Please try again.")),n.createElement("div",{className:"p-edit_profile__centered_content p-edit_profile__centered_content--wide"},n.createElement(e_.A,{className:"p-edit_profile__centered_title",member:_}),eK.t("Are you sure you want to remove your photo? We\u2019ll replace it with a default Slack avatar.")))),n.createElement(M.jl,null,n.createElement(M.ox,null,n.createElement(m.Ay,{onClick:()=>e(C.ii.FORM),type:"outline"},eK.t("Cancel")),n.createElement(m.lV,{onClick:b,loading:a,type:"danger",autoFocus:!0,"aria-label":eK.t("Yes, Remove Photo")},eK.t("Yes, Remove Photo")))))}EditProfileRemovePane.displayName="EditProfileRemovePane";let e$=EditProfileRemovePane;var eY=a(0x1d01572a2),eQ=a(0x2501a2cee),eZ=a(0x120c268ad),eJ=a.n(eZ);let eX=a.p+"bad-profile-picture-4f136cf.svg",e0=a.p+"good-profile-picture-359a731.svg";var e1=a(0x1ace8c6bd),e2=a.n(e1);let e4=new o.Ay("edit_profile"),ProfilePhotoExampleItem=({good:e,children:t})=>n.createElement("div",{className:e2().profilePhotoExampleItem},n.createElement("div",{className:eJ()({[e2().checkIcon]:e,[e2().xIcon]:!e})},n.createElement(eQ.Ah,{name:e?"check":"close",size:"16"})),n.createElement("div",null,t));ProfilePhotoExampleItem.displayName="ProfilePhotoExampleItem";let EditProfilePhotoExamples=()=>n.createElement("div",{className:e2().profilePhotoExamples},n.createElement("div",null,n.createElement("h3",{className:e2().profilePhotoExampleHeader},e4.t("Aim for ")),n.createElement("div",{className:e2().profilePhotoExampleContent},n.createElement("img",{className:e2().profilePhotoExampleImage,src:e0,alt:e4.t("Good profile picture")}),n.createElement("div",null,n.createElement(ProfilePhotoExampleItem,{good:!0},e4.t("Centered head")),n.createElement(ProfilePhotoExampleItem,{good:!0},e4.t("Natural lighting")),n.createElement(ProfilePhotoExampleItem,{good:!0},e4.t("Neutral background"))))),n.createElement("div",null),n.createElement("div",null,n.createElement("h3",{className:e2().profilePhotoExampleHeader},e4.t("Avoid")),n.createElement("div",{className:e2().profilePhotoExampleContent},n.createElement("img",{className:e2().profilePhotoExampleImage,src:eX,alt:e4.t("Bad profile picture")}),n.createElement("div",null,n.createElement(ProfilePhotoExampleItem,null,e4.t("Group photo")),n.createElement(ProfilePhotoExampleItem,null,e4.t("Obscured face")),n.createElement(ProfilePhotoExampleItem,null,e4.t("Things that are not you"))))));EditProfilePhotoExamples.displayName="EditProfilePhotoExamples";var e5=a(0x16ed49ded),e3=a(0xa187f494),e6=a(0x238b287cf);let e8=a.p+"wp_add_profile_minicard@1x-8595002.png",e7=a.p+"wp_add_profile_minicard@2x-3cf01eb.png",e9=new o.Ay("edit_profile");function EditProfileSelectPhotoPane({switchPane:e=i.A,mode:t}){let a=(0,r.wA)(),l=(0,e6.A)(),o=(0,y.d4)(L.WR),s=(0,y.d4)(e=>"on"===(0,O._Z)(e,"profile_moderation_copy")),c=(0,y.d4)(e=>(0,O._Z)(e,"profile_photo_comp")),d=(0,y.d4)(e=>(0,O._Z)(e,"profile_moderation_copy_v2")),u=t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD;function handleSubmit(e){e({force:!0}),u&&l.track(R.EventId.NEWXP_JOIN_TEAM,e3.Kz)}(0,eY.A)(()=>{u&&l.track(R.EventId.NEWXP_JOIN_TEAM,e3.vu)});let p=`${e8} 1x, ${e7} 2x`,h=e9.t("Upload image"),_=e9.t("A profile picture can help team members recognize you"),f=u?e9.t("Add a profile picture"):e9.t("Add a profile photo"),b=c?e9.t("Drag and drop your photo"):e9.t("Drag your photo here, or\u2026"),g=c?e9.t("Upload file"):e9.t("Browse Files"),A=d?"https://confluence.internal.salesforce.com/spaces/EPGC/pages/1112251115/Slack+Engagement+Policy":"https://inside.salesforce.com/2022/07/20/understanding-salesforce/chatiquette-community-guidance-for-slack/19101/",x=(0,n.useCallback)(({text:e})=>n.createElement(Y.A,{href:A,target:"_blank"},e),[A]),k=(0,n.useCallback)(({cancel:e,closeModal:t})=>n.createElement(n.Fragment,null,n.createElement("span",{className:"p-edit_profile__footer_text"},e9.rt("<r1>Discard changes?</r1> Closing this window will cancel any unsaved changes.",null,({text:e})=>n.createElement("strong",null,e))),n.createElement(M.ox,null,n.createElement(m.Ay,{onClick:e,type:"outline"},e9.t("Keep Editing")),n.createElement(m.Ay,{onClick:()=>t({force:!0}),type:"danger"},e9.t("Close & Discard")))),[]),v=(0,n.useCallback)(e=>{if(t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD){a((0,D.O)()),l.track(R.EventId.NEWXP_JOIN_TEAM,e3.PX);return}e()},[a,t,l]),S=s?e9.rt("Your photo is subject to the <a>Slack Engagement Policy</a>",{"<a>":x}):"",I=u?e9.t("Back"):e9.t("Cancel"),w=u?e9.t("Done"):e9.t("Save");return n.createElement(n.Fragment,null,n.createElement(M.rQ,null,n.createElement(M.Rc,{id:"edit_profile__title-bar",title:f,titleHeaderClassName:"p-edit_profile__title",subtitle:u?_:""})),n.createElement(M.$m,null,n.createElement(M.qf,null,n.createElement(e5.Ay,{location:u?e5.ij.PROFILE_PHOTO_ONBOARDING_TASK:e5.ij.PROFILE_PHOTO,switchPane:e},u?n.createElement("div",{className:"p-edit_profile__drag_and_drop__from_onboarding"},n.createElement("div",{className:"image-input-icon"},n.createElement(eQ.Ah,{name:"image-input-filled","data-qa":"onboarding-upload-icon"})),n.createElement(ef.A,{switchPane:e,type:"outline",autoClogProps:e3.oh},e9.t("Upload")),n.createElement("p",{className:"p-edit_profile__drag_and_drop__from_onboarding__description"},e9.t("Or drag and drop the image here"))):n.createElement("div",{className:"p-edit_profile__drag_and_drop"},n.createElement("div",{className:"p-edit_profile__drag_and_drop_inner"},n.createElement("div",{className:"image__section"},n.createElement("img",{alt:h,"aria-hidden":!0,className:"file-upload__image",src:e7,srcSet:p})),n.createElement("h3",null,b)),n.createElement(ef.A,{switchPane:e,type:"outline"},g))),s&&n.createElement(q.A,null,S),u?n.createElement(EditProfilePhotoExamples,null):n.createElement(E,{memberId:o,minSize:C.G9,maxSize:C._E}))),n.createElement(M.jl,{renderSpeedBump:k},n.createElement(M.ox,null,n.createElement(M.s_,{type:"outline","aria-label":I,onClick:v},I),n.createElement(M.s_,{onClick:handleSubmit,autoFocus:!0,"aria-label":w},w))))}EditProfileSelectPhotoPane.displayName="EditProfileSelectPhotoPane";let te=EditProfileSelectPhotoPane;var tt=a(0x1aba66b56),ta=a(0x9ea3d4a0),tn=a(0x44240292);let tr=["image/gif","image/png","image/jpeg"],ti=Error("invalid_min_size"),tl=Error("invalid_max_size"),to=Error("invalid_type"),ts=Error("api_error");function processUpload({dispatch:e,file:t}){return new c.S((a,n)=>{(0,tt.A)(tr,t.type)?(0,tn.A)(URL.createObjectURL(t)).then(r=>{r.height<36||r.width<36?n(ti):r.height>4e3||r.width>4e3?n(tl):e((0,ta.L)({image:t,reason:"EditProfileModal"})).then(e=>{e.ok&&e.url&&e.id?(0,tn.A)(e.url).then(t=>a({image:t,imageId:e.id})).catch(()=>n(ts)):n(ts)}).catch(()=>{n(ts)})}):n(to)})}var tc=a(0x1b3ecb90f),td=a(0xf5bbd10a);function useImageUpload({file:e}){let t=(0,r.wA)(),[a,i]=(0,n.useState)({status:"uploading",image:null,error:null,imageId:null}),l=(0,td.A)();return(0,n.useEffect)(()=>{e&&(i({status:"uploading"}),processUpload({dispatch:t,file:e}).then(({image:e,imageId:t})=>{i({status:"success",image:e,imageId:t})}).catch(e=>{if(e===ti)i({error:"invalid_min_size"});else if(e===tl)i({error:"invalid_max_size"});else if(e===to)i({error:"invalid_type"});else{i({error:"unknown"});try{l.error("EDIT-PROFILE-PANE: processUpload()",`Upload error: ${JSON.stringify(e)}`)}catch{l.error(e)}}}))},[t,e,l]),a}let tm=new o.Ay("edit_profile");function EditProfileUploadPane({file:e,mode:t,switchPane:a=i.A}){let r,l,o,{status:s,image:c,error:d,imageId:m}=useImageUpload({file:e}),u=(0,td.A)(),p=(0,y.d4)(L.WR),h=(0,y.d4)(e=>(0,O._Z)(e,"profile_photo_comp")),_=(0,n.useCallback)(e=>{t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD?a(C.ii.SELECT):e()},[t,a]);if("success"===s&&c&&m)return a(C.ii.CROP,{image:c,imageId:m,mode:t}),null;if("uploading"===s)r=h?tm.t("Add a profile photo"):tm.t("Uploading your photo\u2026"),t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD&&(r=tm.t("Add a profile picture"),o=tm.t("A profile picture can help team members recognize you")),l=n.createElement(G.A,{size:"jumbo"});else if(d){let e,t;if("invalid_min_size"===d)r=tm.t("Try a larger image"),e=":worried:",t=tm.t("That\u2019s a very nice photo, but it\u2019s a bit too small. Try one that\u2019s larger than {minSize} tall by {minSize} wide.",{minSize:`${36..toLocaleString()}px`});else if("invalid_max_size"===d)r=tm.t("Try a smaller image"),e=":worried:",t=tm.t("That\u2019s a very nice photo, but it\u2019s a bit too big. Try one that\u2019s smaller than {maxSize} tall by {maxSize} wide.",{maxSize:`${4e3.toLocaleString()}px`});else if("invalid_type"===d)r=tm.t("Try another photo"),e=":flushed:",t=tm.t("Profile photos must be GIFs, JPGs or PNGs.");else{r=tm.t("Eek"),e=":frowning:",t=tm.t("Sorry! Something went wrong. Please try again.");try{u.error("EDIT-PROFILE-PANE",`Upload error: ${JSON.stringify(d)}`)}catch(e){u.error(d)}}l=n.createElement("div",{className:"p-edit_profile__centered_content"},n.createElement(tc.Ay,{className:"p-edit_profile__centered_title",emojiSize:tc.lw.LARGE,forceDisplay:!0,text:e}),n.createElement("strong",null,t))}return n.createElement(n.Fragment,null,n.createElement(M.rQ,null,n.createElement(M.Rc,{id:"edit_profile__title-bar",title:r,subtitle:o})),n.createElement(M.$m,null,n.createElement(M.qf,null,n.createElement("div",{className:"p-edit_profile__centered_primary p-edit_profile__centered_primary--background"},l),n.createElement(E,{memberId:p,minSize:C.G9,maxSize:C._E}))),n.createElement(M.jl,null,n.createElement(M.ox,null,n.createElement(M.s_,{type:"outline",autoFocus:!d,onClick:_,"aria-label":tm.t("Cancel")},tm.t("Cancel")),d&&n.createElement(ef.A,{switchPane:a,type:"primary"},tm.t("Try a Different Image")))))}EditProfileUploadPane.displayName="EditProfileUploadPane";let tu=EditProfileUploadPane;var tp=a(0x40c0d834),th=a(0x1d2c85d59),t_=a(0xbe2be077),tf=a(0x20e84ea0e);let AgentProfileFormPane=({member:e,isLoadingProfilePhoto:t,agentProfile:a,onUpload:i,onSave:l,switchPane:o})=>{let s=(0,y.d4)(t=>(0,es.nv)(t,e?.id||"")),c=(0,y.d4)(e=>!(0,eM.f)(e)),d=(0,n.useRef)(s?.profile.avatar_hash),m=a?.legacy_app?.name||"",u=(0,T.wg)(s),[p,h]=(0,n.useState)(!1),[_,f]=(0,n.useState)(u),b=useAgentManagerFields({agentCreator:(0,y.d4)(e=>(0,es.OA)(e,a?.legacy_app?.agentforce?.creator?.email)??void 0),agentOwners:a?.legacy_app?.owner_ids||[]}),[g,A]=(0,n.useState)(!1),[x,E]=(0,n.useState)(b||[]),k=useApplyAgentManagerChanges(),v=es.Ru.t("This is the agent name synced from Agentforce."),S=es.Ru.t("This is how people refer to this agent in Slack."),I=(0,y.d4)(t_.k),w=(0,r.wA)(),N=(0,n.useMemo)(()=>{let e=_&&_.length>0,t=x&&x.length>0;return{isValid:e&&t,isRealNameValid:e,isAgentManagerSectionValid:t}},[_,x]),P=(0,n.useMemo)(()=>{if(!N.isAgentManagerSectionValid)return es.Ru.t("Please add at least one Agent manager.")},[N.isAgentManagerSectionValid]),L=(0,n.useMemo)(()=>{if(!N.isRealNameValid)return es.Ru.t("Please add a valid display name.")},[N.isRealNameValid]);(0,n.useEffect)(()=>{N.isValid?h(!0):h(!1)},[N.isValid]),(0,n.useEffect)(()=>{d.current!==s?.profile.avatar_hash&&(i({isLoading:!1}),d.current=s?.profile.avatar_hash)},[i,s?.profile.avatar_hash]);let O=(0,n.useCallback)(()=>{w((0,D.O)())},[w]),F=(0,n.useCallback)((e,t)=>{f(t||""),void 0!==t&&N.isValid&&h(!0)},[N.isValid,f,h]),U=(0,n.useCallback)(async()=>{if(!p||!a?.app_id||!N.isValid)return void O();A(!0);try{if(I){if(!await w((0,tf.Z)({user:s?.id,profile:{real_name:_}})))return void A(!1)}else{let e=await w((0,th.n)({user:s?.id,profile:JSON.stringify({real_name:_}),reason:"update_agent_profile"}));if(!e?.ok)return void A(!1)}}catch(e){A(!1);return}x.length&&await k(a,x,h),w((0,eU.A)(a.app_id)),l?.(),A(!1),O()},[N.isValid,p,s?.id,_,a,O,x,k,w,l,I]);return n.createElement(tp.A,{uiComponentName:R.UiComponentName.AGENT_PROFILE_EDIT_HEADER_MODAL,clogImpression:!0},n.createElement(M.rQ,null,n.createElement(M.Rc,{id:"edit_profile__title-bar",title:es.Ru.t("Edit agent profile")})),n.createElement(M.$m,null,n.createElement(M.qf,null,n.createElement("div",{className:"p-edit_profile__columns gap_100"},n.createElement("div",{className:"p-edit_profile__column_secondary"},n.createElement(e_.A,{member:s,isLoadingProfilePhoto:t}),n.createElement(ef.A,{className:"p-edit_profile__column_secondary_control",switchPane:o,type:"outline",disabled:c},es.Ru.t("Upload Photo")),(0,T.xJ)(s)&&n.createElement(Y.A,{onClick:()=>o(C.ii.REMOVE),disabled:c},es.Ru.t("Remove Photo"))),n.createElement("div",{className:"p-edit_profile__column_primary margin_right_25",role:"group","aria-labelledby":"profile-photo-title"},n.createElement("div",{className:"p-edit_agent_profile__field"},n.createElement(eh.A,{field:n.useMemo(()=>({type:"text",name:"agent_display_name",label:es.Ru.t("Agent name"),isDisabled:!0,disabledTooltipLabel:es.Ru.t("Display names are automatically set by your organization.")}),[!0]),subText:v,value:m})),n.createElement("div",{className:"p-edit_agent_profile__field"},n.createElement(eh.A,{field:{type:"text",name:"agent_real_name",label:es.Ru.t("Display name"),isRequired:!0},subText:S,value:_,onChange:F,errorText:L})),n.createElement(AgentManagersSection,{profile:a,setIsDirty:h,setAgentManagers:E,errorText:P}))))),n.createElement(M.jl,null,n.createElement(M.ox,null,n.createElement(M.s_,{type:"outline",onClick:O,"aria-label":es.Ru.t("Cancel")},es.Ru.t("Cancel")),n.createElement(M.s_,{disabled:!p,loading:g,onClick:U,autoClogProps:{elementName:"btn_agent_profile_edit_header_modal_submit",onClick:{enableClogAction:!0}},"aria-label":es.Ru.t("Save Changes")},es.Ru.t("Save Changes")))))};AgentProfileFormPane.displayName="AgentProfileFormPane";var tb=a(0xbb2afaa0),tg=a(0xf7c5eb46);let ty=new o.Ay("edit_profile");function EditProfileModal({file:e,mode:t=C.DU.EDIT_PROFILE,focusedFieldName:a,refetch:o=i.A,agent:c,agentProfile:d}){let m=(0,e6.A)(),[u,p]=(0,n.useState)(),[h,_]=(0,n.useState)(!1),f=(0,n.useCallback)(e=>{let{isLoading:t}=e;_(!!t)},[]),b=(0,r.wA)(),g=(0,n.useCallback)(()=>{t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD&&(b((0,D.O)({closeNamed:[tb.L]})),m.track(R.EventId.NEWXP_JOIN_TEAM,e3.Am)),b((0,D.O)()),b((0,tg.y$)())},[m,b,t]),y=ty.t("Edit Profile Crop"),A=ty.t("Edit Profile Form"),x=ty.t("Edit Profile Remove"),E=ty.t("Edit Profile Select"),k=ty.t("Edit Profile Upload"),v=(0,l.A)(()=>({[C.ii.CROP]:{render:e=>n.createElement(B,{mode:t,onUpload:f,agent:c,...e}),modalProps:{contentLabel:y}},[C.ii.FORM]:{render:e=>n.createElement(n.Fragment,null,d&&c?n.createElement(AgentProfileFormPane,{...e,member:c,isLoadingProfilePhoto:h,agentProfile:d,onSave:o,onUpload:f}):n.createElement(eG,{...e,focusedFieldName:a,changedFormValues:u,setChangedFormValues:p,refetch:o,isLoadingProfilePhoto:h,onUpload:f,agent:c})),modalProps:{className:"p-edit_profile--wide",contentLabel:A}},[C.ii.REMOVE]:{render:e=>n.createElement(e$,{...e,agent:c}),modalProps:{contentLabel:x}},[C.ii.SELECT]:{render:e=>n.createElement(te,{mode:t,...e}),modalProps:{contentLabel:E}},[C.ii.UPLOAD]:{render:({file:a=e,...r})=>a&&n.createElement(tu,{file:a,mode:t,...r}),modalProps:{contentLabel:k}}}),[y,A,x,E,k,t,f,a,u,o,c,h,e,d]),S=C.ii.FORM;return t===C.DU.PHOTO_UPLOAD&&(S=e?C.ii.UPLOAD:C.ii.SELECT),t===C.DU.ONBOARDING_TASK_PHOTO_UPLOAD&&(S=C.ii.SELECT),n.createElement(s.A,{closeModal:g,defaultPane:S,panes:v,dataQa:"edit_profile_modal"})}EditProfileModal.displayName="EditProfileModal"},0x1287e986a:(e,t,a)=>{"use strict";a.d(t,{A:()=>B});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1e2051844),s=a(0x40c0d834),c=a(0x20482ad21),d=a(0x18246e515),m=a(0x677a139e),u=a(0x1d2cd7755),p=a(0x126f22530),h=a(0x15f8e452a),_=a(0x1d1911997),f=a(0x4c96e5d9),b=a(0x10d53599f),g=a(0x19dc73101),y=a(0xb0ca8936),A=a(0x1c371dd8b),x=a(0x102edf836),E=a(0xa6f3163b),C=a(0xc06ed72e),k=a(0x19926a18e),v=a(0x9ac81e1a),S=a(0x2f4e09f8);let NamePronunciationAudioRecorder=({onFileAttach:e,onCancelRecording:t})=>{let{duration:a,audioWaveformRecorderProps:r,onAttach:l,onCancel:o}=(0,v.X)({onFileAttach:e,fileName:"audio_name_pronunciation.m4a",fileSubtype:"slack_name_pronunciation",timeLimitSeconds:10,timeWarningSeconds:5}),s=(0,S.yQ)(),c=n.createElement(n.Fragment,null,n.createElement(k.A,{streamManager:r.streamManager,recording:r.recording,onDotsUpdate:r.onDotsUpdate,warningHighlight:r.warningHighlight,className:"p-audio_popover__waveform"}),n.createElement("div",{className:i()("p-audio_file__timer",{"p-audio_file__timer--warning":r.warningHighlight})},(0,C.A)(Math.floor(a??0)))),d=(0,n.useCallback)(()=>{o(),t()},[o,t]),m=n.createElement(f.Ay,{tip:s.cancelRecording,position:"top",delay:f.PK},n.createElement(E.A,{className:"p-audio_file__cancel",onClick:d,"aria-label":s.cancelRecording,autoFocus:!0,visibleAutoFocus:!1},n.createElement(h.A,{type:"close-filled",className:"p-audio_file__cancel__icon",size:"inherit"}))),u=n.createElement(f.Ay,{tip:s.stopRecording,position:"top",delay:f.PK},n.createElement(E.A,{className:i()("p-audio_file__attach"),onClick:l,"aria-label":s.attachRecording,autoFocus:!0,visibleAutoFocus:!1},n.createElement(h.A,{type:"check-large-bold",className:"p-audio_file__attach__icon",size:"inherit"})));return n.createElement("div",null,n.createElement("div",{className:"p-audio_file"},n.createElement("div",{className:"p-audio_file__prepend"},m),n.createElement("div",{className:i()("p-audio_file__strip")},c),n.createElement("div",{className:"p-audio_file__append"},u)))};NamePronunciationAudioRecorder.displayName="NamePronunciationAudioRecorder";var I=a(0x1a0267901),w=a(0xc6013145);let PendingAudioFile=({pendingFile:e,pendingFileClassName:t,onRemoveFile:a})=>{let r=(0,n.useCallback)((e,a)=>n.createElement(I.A,{className:t,file:e,renderRemoveButton:a.renderRemoveButton}),[t]),i=n.createRef();return e?n.createElement(w.U,{pendingFile:e,removeFile:a,maybeRenderImageFile:r,removeButtonRef:i}):null};PendingAudioFile.displayName="PendingAudioFile";var T=a(0x226892387),N=a(0x357dacc7),M=a(0x1a096844f);let use_file_uploading=function(e){let{initialFileId:t,onAttach:a,onRemove:r,onUploadDone:i}=e,[l,o]=(0,n.useState)(null),[s,c]=(0,n.useState)(!1),d=(0,T.Z2)(e=>l?(0,N.Oq)(e,{pendingFileId:l}):null),m=(0,T.Z2)(e=>d&&d.persistedFileId?(i&&i(d.persistedFileId),(0,M.H5)(e,d.persistedFileId)):null),u=(0,T.Z2)(e=>!t||s?null:(0,M.H5)(e,t));return{initialFile:u,pendingFile:d,uploadedPendingFile:m,onAttachRawFile:(0,n.useCallback)(e=>{e.id&&(o(e.id),a&&a())},[a]),onRemoveFile:(0,n.useCallback)(()=>{o(null),c(!0),r&&r()},[r])}};var R=a(0x3711e82d);let P={onClick:{action:R.UiAction.CLICK}},L={uiComponentName:"audio_recorder_button",onClick:{enableClogAction:!0}},EditAudioButton=({onChangeFile:e,initialFileId:t,onFileUploadStart:a,onFileUploadEnd:r})=>{let{addAudioLabel:i}=(0,S.yQ)(),[l,o]=(0,n.useState)(!1),s=(0,n.useCallback)(()=>{o(!1),a()},[a]),{initialFile:c,uploadedPendingFile:d,pendingFile:m,onAttachRawFile:u,onRemoveFile:p}=use_file_uploading({initialFileId:t,onAttach:s,onUploadDone:(0,n.useCallback)(t=>{e(t),r()},[e,r]),onRemove:(0,n.useCallback)(()=>{e(null),r()},[e,r])}),_=(0,n.useCallback)(()=>{o(!0)},[]),f=(0,n.useCallback)(()=>{o(!1)},[]);return c||d||m?n.createElement(PendingAudioFile,{pendingFile:c??d??m,onRemoveFile:p,pendingFileClassName:"p-audio_file__pending_file"}):l?n.createElement(NamePronunciationAudioRecorder,{onFileAttach:u,onCancelRecording:f}):n.createElement(A.A,{autoClogProps:L,actionProps:P,elementType:R.ElementType.BUTTON},n.createElement(x.Ay,{className:"p-edit_profile__audio_recorder_icon",onClick:_,"aria-label":i,type:"outline",size:"medium"},n.createElement(h.A,{type:"microphone",inline:!0}),n.createElement("span",{className:"margin_left_25"},i)))};EditAudioButton.displayName="EditAudioButton";var O=a(0x19c76d181);let D=new c.Ay("edit_profile"),F={allowEmptyQuery:!0,entities:{channels:!1,members:{includeProfileOnlyUsers:!0},userGroups:!1}},U={onChangeFile:l.A,initialNamePronunciationFileId:void 0,onFileUploadStart:l.A,onFileUploadEnd:l.A};function EditProfileField({errorText:e,errorAltText:t,field:a,onChange:r=l.A,value:c,valueAlt:A,focusOnMount:x=!1,audioFileProps:E=U,subText:C}){let k,v,S=(0,T.d4)(O.WR),I=`${a.name}-label`,w=`${a.name}-input`,N=`${a.name}-hint`,M=D.t("Display text"),P=D.t("This field is automatically synced by your organization."),L="";a.isScim?(k=n.createElement(n.Fragment,null,n.createElement(h.A,{type:"lock"}),n.createElement("strong",null,a.label)),v=n.createElement(n.Fragment,null,n.createElement(h.A,{type:"lock"}),n.createElement("strong",null,M)),L=P):a.isDisabled?(k=n.createElement(n.Fragment,null,n.createElement(h.A,{type:"lock"}),n.createElement("strong",null,a.label)),v=n.createElement(n.Fragment,null,n.createElement(h.A,{type:"lock"}),n.createElement("strong",null,M)),L=a.disabledTooltipLabel):a.isRequired?k=n.createElement(n.Fragment,null,n.createElement("strong",null,a.label)," (",D.t("required"),")"):(k=a.label,v=M);let B=(0,n.useCallback)(e=>{r(a,e.normalize())},[a,r]),maybeWrapElementInTooltip=e=>L&&(a.isDisabled||a.isScim)?n.createElement(f.Ay,{tip:L,position:"bottom",offsetY:a.hint?0:-17},e):e;if(maybeWrapElementInTooltip.displayName="maybeWrapElementInTooltip","text"===a.type){let t=n.createElement(n.Fragment,null,n.createElement(p.A,{className:i()(a.isScim||a.isDisabled?"p-edit_profile__disabled_text":null,{margin_bottom_0:a.hint||C}),counterMinimumCharacters:void 0!==a.maxLength?a.maxLength-10:NaN,errorText:e,id:w,readOnly:a.isScim||a.isDisabled,isRequired:a.isRequired,maxCharacterLimit:a.maxLength,name:a.name,onChange:B,placeholder:a.placeholder||a.label,size:"large",useInlineAlert:!0,value:c,focusOnMount:x,ariaDescribedById:a.hint?N:void 0,isDisabled:a.isScim||a.isDisabled}),C&&n.createElement("div",{className:"margin_bottom_100"},n.createElement(y.EY,{size:"caption",color:"Core/Content/Primary"},C)));return n.createElement(n.Fragment,null,n.createElement(u.A,{htmlFor:w,id:I,text:k},maybeWrapElementInTooltip(t),a.hint&&n.createElement(m.A,{className:i()({margin_bottom_50:a.rules}),id:N},a.hint)),a.rules&&n.createElement("div",{className:"p-edit_profile__rules"},n.createElement("strong",null,D.t("Custom rules for this workspace:")),n.createElement("br",null),a.rules))}if("options_list"===a.type){a.options&&a.options.length&&a.options[0]?.value!==null&&a.options.unshift({label:D.t("Please select an option"),value:null});let e=n.createElement(_.Ay,{isDisabled:a.isScim,isRequired:a.isRequired,onOptionSelected:e=>r(a,e.value),options:a.options,selectedOption:(0,o.A)(a.options,{value:c}),selectId:w,size:"large",width:"100%",focusOnMount:x,ariaLabel:c,ariaDescribedBy:I});return n.createElement(u.A,{htmlFor:w,id:I,text:k},maybeWrapElementInTooltip(e),n.createElement(m.A,null,a.hint))}if("link"===a.type){let i=`${a.name}-label-2`,l=`${a.name}-input-2`,o=n.createElement(p.A,{ariaDescribedById:I,counterMinimumCharacters:void 0!==a.maxLength?a.maxLength-10:NaN,errorText:e,hintText:a.hint,id:w,readOnly:a.isScim,isRequired:a.isRequired,maxCharacterLimit:a.maxLength,name:a.name,onChange:e=>r(a,e,A),placeholder:"https://",size:"large",useInlineAlert:!0,value:c,focusOnMount:x,"aria-label":D.t("URL")}),s=n.createElement(p.A,{counterMinimumCharacters:void 0!==a.maxLength?a.maxLength-10:NaN,errorText:t,hintText:D.t("Optional"),id:l,readOnly:a.isScim,maxCharacterLimit:a.maxLength,name:`${a.name}_alt`,onChange:e=>r(a,c,e),placeholder:D.t("My link"),size:"large",useInlineAlert:!0,value:A,"aria-label":M});return n.createElement("div",{className:"p-edit_profile__columns",role:"group","aria-labelledby":I},n.createElement("div",{className:"p-edit_profile__column_primary"},n.createElement("div",{id:I,className:"c-label c-label--block c-label--pointer c-label__text"},k),maybeWrapElementInTooltip(o)),n.createElement("div",{className:"p-edit_profile__column_secondary"},n.createElement(u.A,{htmlFor:l,id:i,text:v}),maybeWrapElementInTooltip(s)))}if("date"===a.type){let e=n.createElement(d.A,{className:"p-edit_profile__date_select",datePickerDisabled:a.isScim,datePlaceholder:D.t("Select date"),onDateChange:e=>r(a,e),selectedDate:c,size:"large","aria-labelledby":N,onScrollablePage:!0});return n.createElement(u.A,{htmlFor:w,id:I,text:k},maybeWrapElementInTooltip(e),n.createElement(m.A,{id:N},a.hint))}if("user"===a.type){let e=c?c.split(",").map(e=>({label:e,value:e})):[],t=n.createElement(g.h,{isRequired:a.isRequired,isDisabled:a.isScim,onSelectedItemsChange:e=>{r(a,e.map(e=>e.value).join(","))},placeholderText:D.t("Search by name"),renderOption:(e,t)=>n.createElement(b.A,{id:e.value,isActive:t.isActive}),searcherOptions:F,selectedOptions:e,selectId:w,size:"large",width:"100%",focusOnMount:x,ariaDescribedBy:`${k} ${N}`});return n.createElement(u.A,{htmlFor:w,id:I,text:k},maybeWrapElementInTooltip(t),n.createElement(m.A,{id:N},a.hint))}if("audio_recorder_button"===a.type){let{onChangeFile:e,initialNamePronunciationFileId:t,onFileUploadStart:a,onFileUploadEnd:r}=E,i=n.createElement(s.A,{eventId:R.EventId.USER_PROFILE_RECORD_AUDIO_CLICK,profileId:S,uiComponentName:"edit_profile_field"},n.createElement(EditAudioButton,{onChangeFile:e,initialFileId:t,onFileUploadStart:a,onFileUploadEnd:r}));return n.createElement(u.A,{htmlFor:w,id:I,text:k,className:"p-edit_profile__audio_recorder_component"},maybeWrapElementInTooltip(i))}return null}EditProfileField.displayName="EditProfileField";let B=n.memo(EditProfileField)},0x186290015:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xb1ea448c),o=a(0x1d3efd4ea),s=a(0xa089d16d),c=a(0x1b9d5cc0c),d=a(0x350d87d7),m=a(0x1aad32b98),u=a(0x167bc3887);function EditProfilePhoto({className:e,member:t,isLoadingProfilePhoto:a=!1,containerClassName:r=""}){let{imageUrl:p,imageUrl2x:h}=(0,u.Ay)({avatarHash:(0,c.aY)(t),memberId:t?.id,size:192,teamOrEnterpriseId:(0,d.A)(t)?(0,m.D5)(t):(0,m.dQ)(t)}),_=n.createElement(o.A,{className:i()(e,"p-edit_profile__photo")});return n.createElement("div",{className:i()("p-edit_profile__photo_container",r)},a&&n.createElement(l.A,{color:"blue",size:"jumbo",className:i()(e,"p-edit_profile__photo_loading_spinner")}),n.createElement(s.A,{"aria-hidden":"true",className:i()(e,"p-edit_profile__photo"),renderError:()=>_,renderPending:()=>_,src:p,srcSet:`${p}, ${h} 2x`}))}EditProfilePhoto.displayName="EditProfilePhoto";let p=n.memo(EditProfilePhoto)},0x41b376fd:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var n=a(0xbad225b5),r=a(0x11a296110),i=a(0x1b834b837),l=a(0x371e6ab1),o=a(0x55b499c3);function EditProfileUploadButton({children:e,switchPane:t,openUploadProfilePhotoModal:a,ariaLabel:s,className:c,id:d,type:m,disabled:u,autoClogProps:p,size:h}){let _=(0,n.useRef)(null),f=(0,n.useCallback)(e=>{let n=e.target?.files?.[0];n&&(a?a({file:n}):t(o.ii.UPLOAD,{file:n}))},[a,t]),b=(0,n.useCallback)(()=>{_.current?.click()},[]);return n.createElement(r.Ay,{onClick:b,className:c,id:d,type:m,disabled:u,autoClogProps:p,size:h,"data-qa":l.E.EDIT_PROFILE_UPLOAD_BUTTON},e,n.createElement(i.A,{ref:_,onChange:f,ariaLabel:s}))}EditProfileUploadButton.displayName="EditProfileUploadButton";let s=EditProfileUploadButton},0x2373f273:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xe7ed96ac),l=a(0x1b834b837),o=a(0x371e6ab1);let s={name:"camera-filled",size:"24"},c=new r.Ay("edit_profile");function EditProfileUploadIconButton({openUploadProfilePhotoModal:e,ariaLabel:t,className:a,disabled:r,id:d,autoClogProps:m,icon:u}){let p=(0,n.useRef)(null),h=(0,n.useCallback)(t=>{let a=t.target?.files?.[0];a&&e({file:a})},[e]),_=(0,n.useCallback)(()=>{p.current?.click()},[]);return n.createElement(n.Fragment,null,n.createElement(i.A,{type:"submit",onClick:_,svgIconProps:u??s,className:a,"aria-label":t||c.t("Upload Photo"),disabled:r,id:d,autoClogProps:m,"data-qa":o.E.EDIT_PROFILE_UPLOAD_ICON_BUTTON}),n.createElement(l.A,{ref:p,onChange:h,ariaLabel:t}))}EditProfileUploadIconButton.displayName="EditProfileUploadIconButton";let d=EditProfileUploadIconButton},0x1b834b837:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x371e6ab1);let i=(0,n.forwardRef)(({onChange:e,ariaLabel:t},a)=>{let i=(0,n.useCallback)(e=>{e?.stopPropagation()},[]);return n.createElement("input",{accept:"image/*;capture=camera","aria-hidden":"true",className:"hidden",onClick:i,onChange:e,ref:a,tabIndex:-1,type:"file","data-qa":r.E.EDIT_PROFILE_FILE_UPLOAD,"aria-label":t})})},0x371e6ab1:(e,t,a)=>{"use strict";a.d(t,{E:()=>r});var n,r=((n={}).EDIT_PROFILE_UPLOAD_BUTTON="edit-profile-upload-button",n.EDIT_PROFILE_UPLOAD_ICON_BUTTON="edit-profile-upload-icon-button",n.EDIT_PROFILE_FILE_UPLOAD="edit-profile-file-upload",n)},0x55b499c3:(e,t,a)=>{"use strict";a.d(t,{DU:()=>i,G9:()=>s,_E:()=>o,ii:()=>l});var n,r,i=((n={}).EDIT_PROFILE="editProfile",n.PHOTO_UPLOAD="photoUpload",n.ONBOARDING_TASK_PHOTO_UPLOAD="onboardingTaskPhotoUpload",n),l=((r={}).CROP="cropPane",r.FORM="formPane",r.REMOVE="removePane",r.SELECT="selectPane",r.UPLOAD="uploadPane",r);let o=460,s=72},0x204173b44:(e,t,a)=>{"use strict";a.d(t,{_:()=>getDefaultProfileFields,r:()=>getDefaultProfileFieldsForAgents});var n=a(0x1e2051844),r=a(0x1aba66b56),i=a(0xd04cf7e4),l=a(0x1595bdd0),o=a(0x10a23ba39),s=a(0x20482ad21),c=a(0x16ac9b089),d=a(0x21c50a68b),m=a(0xa1832ae4),u=a(0xc24f47f6);let p=new s.Ay("edit_profile");function addSubtypeToEmojiError(e){let t=(0,n.A)(e,e=>"error_no_emoji"===e.type);t?.type==="error_no_emoji"&&((0,r.A)(t.emoji,"\u{1F4A9}")?t.subtype="poop":t.subtype=(0,i.A)(1,4).toString())}let getDefaultProfileFields=({customDisplayNamePolicy:e,team:t,isDisplayPronounsEnabled:a,hasNamePronunciationText:n,isNamePronunciationTextDisabled:r,isTitleDisabled:i,isNameRecordingEnabled:s,isRealNameUneditable:h,isDisplayNameUneditable:_})=>{let f=(0,d.JK)(),b=(0,o.Ay)(f),g=[{label:p.t("Full name"),name:"real_name",placeholder:p.t("Full name"),type:"text",validation:e=>{let t=(0,u.h7)(e);return addSubtypeToEmojiError(t),t},disabledTooltipLabel:p.t("Locked by an Admin"),isDisabled:h},{hint:p.t("This could be your first name, or a nickname \u2014 however you\u2019d like people to refer to you in Slack."),label:p.t("Display name"),name:"display_name",type:"text",isDisabled:_,disabledTooltipLabel:_?p.t("Display names are automatically set by your organization."):void 0,rules:_?void 0:e,validation:e=>{let t=(0,u.YI)(e);return addSubtypeToEmojiError(t),t}},{hint:p.t("Let people know what you do at {teamName}.",{teamName:(0,c.Ay)((0,m.F1)(t))}),label:p.t("Title"),name:"title",type:"text",isDisabled:i,validation:u.JY},a?{hint:p.t("Let people know which pronouns you use.",{fallbackHash:"9e3430ac2be6b7b3df5f49cc5b6c2bea27bfaf13"}),label:p.t("Pronouns"),placeholder:p.t("Ex. they/them/theirs",{fallbackHash:"6d025cec02becbe059c329cc5cc0484089f1d874"}),name:"pronouns",type:"text",validation:u.N4}:null,s?{name:"name_recording",type:"audio_recorder_button",label:p.t("Name recording")}:null,n?{hint:p.t("This could be a phonetic pronunciation, or an example of something your name sounds like."),label:p.t("Name pronunciation"),placeholder:p.t("Zoe (pronounced 'zo-ee')"),name:"name_pronunciation",type:"text",validation:u.jx,isDisabled:r}:null,{hint:p.t("Your current time zone. Used to send summary and notification emails, for times in your activity feeds, and for reminders."),label:p.t("Time zone"),name:"tz",options:b?.map(([e,t])=>({label:e,value:t})),type:"options_list"}];return(0,l.A)(g)},getDefaultProfileFieldsForAgents=()=>{let e=[{label:p.t("Full name"),name:"real_name",placeholder:p.t("Full name"),type:"text",isDisabled:!0},{label:p.t("Description"),name:"description",placeholder:p.t("Description"),type:"text"},{label:p.t("Added on"),name:"date_installed",placeholder:p.t("Added on"),type:"text",isDisabled:!0},{label:p.t("Created by"),name:"created_by",placeholder:p.t("Created by"),type:"text",isDisabled:!0},{label:p.t("Prompts"),name:"prompts",placeholder:p.t("Prompts"),type:"custom"}];return(0,l.A)(e)}},0x214833d87:(e,t,a)=>{"use strict";a.d(t,{A:()=>getValidationErrorText});let n=new(a(0x20482ad21)).Ay("ui_validation");function getValidationErrorText(e){if(!e)return null;switch(e.type){case"error_is_required":return n.t("Unfortunately, you can\u2019t leave this blank.");case"error_max_length":return n.t("You can\u2019t enter more than {maxLength} characters.",{maxLength:e.maxLength});case"error_is_url":return n.t("This doesn\u2019t seem like a proper link. Sorry!");case"error_no_restricted_values":return n.t("That name\u2019s already being used by Slack.");case"error_no_restricted_chars":return n.t("Mostly, names can\u2019t contain punctuation. (Apostrophes, spaces, and periods are fine.)");case"error_no_special_chars":return n.t("Names can\u2019t contain most special characters. (Apostrophes, spaces, and periods are okay.)",{fallbackHash:"83188d0ac288d21fa424ed1a746addb4b484137d"});case"error_has_alphanumeric":return n.t("Names can\u2019t consist solely of punctuation. Please elaborate!");case"error_no_leading_at":return n.t("Names can\u2019t start with the @ sign \u2014 that\u2019s how your coworkers will mention you in conversation.",{fallbackHash:"dbbcef363a405836bfc582044f84fec0a0a1cc64"});case"error_no_emoji":if("poop"===e.subtype)return n.t("For reasons of party-pooping, names cannot contain emoji. Try again?");if("1"===e.subtype)return n.t("For all manner of complex reasons, names simply cannot contain emoji. Try again?");if("2"===e.subtype)return n.t("Using emoji for names makes some sense, but sadly, not enough. Try again?");if("3"===e.subtype)return n.t("For technical reasons, emoji are not allowed in names. Try again?");return n.t("Of course you want a name with an emoji. Sadly, it is not to be. Try letters?");default:return null}}},0x514e33ce:(e,t,a)=>{"use strict";a.d(t,{A:()=>j});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x237b6a339),l=a(0xd6ba6894),o=a(0x40c0d834),s=a(0x20482ad21),c=a(0xd3bcbd3c),d=a(0x99233ecb);function getEmailMenuItemDisplayRules({canUserInviteToChannelByEmail:e,canUserSlackConnectDm:t,isImOrMpim:a,isMember:n,isPOU:r,showInvitePeopleGlobalAction:i}){let l=(t||n)&&!r,o=void 0!==e,s=o&&e&&!a,c=o&&i&&!n&&!s;return{showChannelInviteMenu:s,showDmMenu:l,showSeparator:l||s||c,showWorkspaceInviteMenu:c}}var m=a(0x106a32624),u=a(0x13f7b3205),p=a(0xd843ab47),h=a(0x12185e091),_=a(0x1ecc7f772),f=a(0xa794f9e1),b=a(0x47a6f20a),g=a(0x1b9d5cc0c),y=a(0xa1832ae4),A=a(0x105ecbbed),x=a(0x1001c1606),E=a(0x16ef98cf),C=a(0x191ea5eb1),k=a(0x1c14ee6d4),v=a(0x1ed767a16),S=a(0x3711e82d),I=a(0x6d72337),w=a(0x16ed1b0dc),T=a(0xb04c4a12),N=a(0x13ef633fd),M=a(0x226892387),R=a(0x217553e42),P=a(0x14533cae9),L=a(0x11c82607b),O=a(0xe684f705);let D=(0,L.Ay)("Get a member by their email",(e,t,a)=>{let n=t();return(0,O.OA)(n,a)});D.meta={name:"getMemberByEmail",key:"createThunkGetMemberByEmail",description:"Get a member by their email"};var F=a(0x1ee439e69),U=a(0x19895585a);let B=new s.Ay("linkify_emails"),H={elementName:"email_linkify_dm_email",onClick:{enableClogAction:!0}},W={elementName:"email_linkify_start_invite",onClick:{enableClogAction:!0}},V={elementName:"email_linkify_start_invite_to_workspace",onClick:{enableClogAction:!0}},G={elementName:"email_linkify_copy_email",onClick:{enableClogAction:!0}},q={elementName:"email_linkify_open_email",onClick:{enableClogAction:!0}},RenderMenu=({href:e,channel:t,...a})=>{let[s,c]=(0,n.useState)(),m=(0,r.wA)(),p=e.split("mailto:")[1]?e.split("mailto:")[1]:e,A=B.rt("Contact {emailAddress}",{emailAddress:p}),w=m(D(p)),T=w?.id,R=(0,g.hh)(w),L=(0,_.Mn)(t),O=(0,M.d4)(e=>(0,y.F1)((0,F.H7)(e))),U=(0,M.d4)(b.Lz),j=(0,h.JM)(t),z=(0,M.d4)(x.u);(0,n.useEffect)(()=>{m((0,u.f$)({context:u.Ui.AddToChannel})).then(e=>{c(e.addToChannelFlow.inviteToChannelByEmail)})},[m]);let K=(0,n.useCallback)(()=>{m((0,I.Sb)({initialEmail:p}))},[m,p]),$=(0,n.useCallback)(()=>{if(T){let e=(0,f.h0)({memberIds:[T]});m((0,P.A)({destinations:e})).then(e=>m((0,N.U)({draftId:e}))).catch(()=>{K()})}else K()},[m,T,K]),Y=(0,n.useCallback)(()=>{let e={channelId:t.id,entryPoint:E.kP.EmailLinkMenu,initialSelectedEmails:[{key:p,label:p,value:p,hoverText:B.t("Outside your organization"),isClassifying:!1,classification:C.r.External,entity:{id:p,isEmail:!0,value:p},icon:void 0}]};T&&(e={channelId:t.id,entryPoint:E.kP.EmailLinkMenu,initialSelectedEmails:[{key:p,label:p,isLoading:!0,queryId:(0,i.A)("query__"),value:void 0,entity:void 0,classification:void 0,icon:void 0}]}),m((0,I._2)(e))},[t.id,m,p,T]),Q=(0,n.useCallback)(()=>{m((0,I.Xf)({initialEmail:p,source:k.K3.LinkifyEmails}))},[m,p]),{showChannelInviteMenu:Z,showDmMenu:J,showSeparator:X,showWorkspaceInviteMenu:ee}=getEmailMenuItemDisplayRules({canUserInviteToChannelByEmail:s,canUserSlackConnectDm:z,isImOrMpim:j,isMember:!!T,isPOU:R,showInvitePeopleGlobalAction:U});return n.createElement(o.A,{eventId:S.EventId.EMAIL_LINK_MENU,elementType:S.ElementType.MENU,clogImpression:!0},n.createElement(d.Ay,a,n.createElement(n.Fragment,null,n.createElement("p",{className:"p-email_link_menu__title"}," ",A," "),J&&n.createElement(d.Dr,{"data-qa":"start_dm_email_linkify",onSelected:$,label:B.t("Start a DM"),autoClogProps:H}),Z&&n.createElement(d.Dr,{"data-qa":"start_invite_email_linkify",onSelected:Y,label:B.rt("Invite to #{channelDisplayName}",{channelDisplayName:L}),autoClogProps:W}),ee&&n.createElement(d.Dr,{"data-qa":"start_invite_to_workspace_email_linkify",onSelected:Q,label:B.rt("Invite to {currentTeamName}",{currentTeamName:O}),autoClogProps:V}),X&&n.createElement(d.bX,null)),n.createElement(d.Dr,{"data-qa":"copy_email_linkify",onSelected:(0,n.useCallback)(()=>(0,v.x3)(p),[p]),label:B.t("Copy Email Address"),autoClogProps:G}),n.createElement(d.Dr,{"data-qa":"send_email_linkify",onSelected:(0,n.useCallback)(()=>l.J.open(e,"_blank"),[e]),label:B.rt("Email {emailAddress}",{emailAddress:p}),autoClogProps:q})))};RenderMenu.displayName="RenderMenu";let j=n.forwardRef(function({href:e,channelId:t,onClick:a,...r},i){let{getSiblingView:l}=(0,n.useContext)(p.A),o=(0,n.useContext)(m.r4),s=e?.startsWith("mailto:"),u=(0,M.d4)(e=>{if(s&&o&&o===T.Y.THREAD){let t=(0,A.jA)(e,{getSiblingView:l});if(t){let e=(0,A.Sb)(t);if(e&&e.channelId)return e.channelId}}if(t)return t;let a=l(e,{container:U.mq.Primary})?.id;return a&&(0,w.A)(a)?a:void 0}),h=(0,M.d4)(e=>(0,R.OL)(e,u)),_=(0,n.useCallback)(t=>{if(h)return n.createElement(RenderMenu,{...t,href:e,channel:h})},[e,h]),f={href:e,...r};return s&&h?n.createElement(d.cQ,{renderMenu:_,position:"bottom-right"},n.createElement(c.A,{...f,preventDefault:!0,ref:i})):n.createElement(c.A,{...f,onClick:a,ref:i})})},0x2431e9bcb:(e,t,a)=>{"use strict";a.d(t,{A8:()=>l,B9:()=>r,Zl:()=>s,b3:()=>m,d$:()=>d,d6:()=>n,tS:()=>u,uE:()=>c,zU:()=>i});let n=[0,-1],r=[0,2],i=250,l=2;var o,s=((o={}).EMOJI="emoji",o.GIF="gif",o);let c=3,d=16,m={"Frequently Used":0,"Smileys & People":1,"Animals & Nature":2,"Food & Drink":3,"Travel & Places":4,Activities:5,Objects:6,Symbols:7,Flags:8,Custom:9},u={"Smileys & People":"emoji-filled",People:"emoji","Frequently Used":"clock","Animals & Nature":"emoji-nature","Food & Drink":"emoji-food",Activities:"emoji-activities","Travel & Places":"emoji-travel",Objects:"emoji-objects",Symbols:"emoji-symbols",Flags:"emoji-flag",Custom:"slack-logo",Search:"search",Workflows:"bolt"}},0x105960ad8:(e,t,a)=>{"use strict";a.d(t,{g:()=>V,K:()=>W});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x20482ad21),o=a(0x2343fde45),s=a(0xb04bc36e),c=a(0x24573b3ff),d=a(0x120c268ad),m=a.n(d),u=a(0x1ccef1c6f),p=a(0x226892387),h=a(0x1fb2d2a87);let EmojiIcon=({isActive:e})=>{let t=(0,p.d4)(e=>"dark"===(0,h.to)(e)),a=(0,p.d4)(e=>(0,u.ty)(e,"preferred_skin_tone")),r=m()("p-emoji_and_gif_picker_custom_icons--skin_tone",{"p-emoji_and_gif_picker_custom_icons--skin_tone_1":"1"===a,"p-emoji_and_gif_picker_custom_icons--skin_tone_2":"2"===a,"p-emoji_and_gif_picker_custom_icons--skin_tone_3":"3"===a,"p-emoji_and_gif_picker_custom_icons--skin_tone_4":"4"===a,"p-emoji_and_gif_picker_custom_icons--skin_tone_5":"5"===a,"p-emoji_and_gif_picker_custom_icons--skin_tone_6":"6"===a});return n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"presentation",className:m()("p-emoji_and_gif_picker_custom_icons__custom-icon",{"p-emoji_and_gif_picker_custom_icons__custom-icon--active":e,"p-emoji_and_gif_picker_custom_icons__custom-icon--dark":t}),"data-qa":"emoji-icon-host"},n.createElement("g",{className:"p_emoji_and_gif_pickers_container__tab_icon--active"},n.createElement("path",{className:r,"data-qa":"emoji-icon-skin-tone-pref",d:"M19 10C19 5.03 14.97 1 10 1C5.03 1 1 5.03 1 10C1 14.97 5.03 19 10 19C14.97 19 19 14.97 19 10Z",fill:"#F2C744"}),n.createElement("path",{d:"M10 1C14.97 1 19 5.03 19 10C19 14.97 14.97 19 10 19C5.03 19 1 14.97 1 10C1 5.03 5.03 1 10 1ZM10 2.5C5.86 2.5 2.5 5.86 2.5 10C2.5 14.14 5.86 17.5 10 17.5C14.14 17.5 17.5 14.14 17.5 10C17.5 5.86 14.14 2.5 10 2.5Z",className:"p-emoji_and_gif_picker_custom_icons__fill"}),n.createElement("path",{d:"M8.12202 8.31307C7.33104 8.06157 6.89556 7.22006 7.14705 6.42908C7.39855 5.6381 8.24007 5.20261 9.03105 5.45411C9.82203 5.70561 10.2575 6.54713 10.006 7.33811C9.75452 8.12909 8.913 8.56457 8.12202 8.31307ZM12.887 9.82812C12.096 9.57662 11.6605 8.73511 11.912 7.94413C12.1635 7.15315 13.005 6.71766 13.796 6.96916C14.587 7.22066 15.0225 8.06218 14.771 8.85316C14.5195 9.64414 13.6779 10.0796 12.887 9.82812ZM8.68643 14.7885C5.60828 13.8098 5.39459 10.9506 5.72487 9.91188C5.84607 9.53068 6.24755 9.29107 6.66687 9.42439L13.4331 11.5758C13.8524 11.7091 14.0418 12.1366 13.9206 12.5178C13.6024 13.5184 11.8027 15.7794 8.68643 14.7885Z",className:"p-emoji_and_gif_picker_custom_icons__fill"})),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 10C2.5 5.85786 5.85786 2.5 10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10ZM10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1ZM7.5 9.5C8.32843 9.5 9 8.82843 9 8C9 7.17157 8.32843 6.5 7.5 6.5C6.67157 6.5 6 7.17157 6 8C6 8.82843 6.67157 9.5 7.5 9.5ZM14 8C14 8.82843 13.3284 9.5 12.5 9.5C11.6716 9.5 11 8.82843 11 8C11 7.17157 11.6716 6.5 12.5 6.5C13.3284 6.5 14 7.17157 14 8ZM7.61454 11.7656C7.48511 11.3722 7.06121 11.1581 6.66774 11.2876C6.27427 11.417 6.06022 11.8409 6.18966 12.2344C6.7965 14.0792 8.42824 15 10.0271 15C11.626 15 13.2577 14.0792 13.8645 12.2344C13.994 11.8409 13.7799 11.417 13.3865 11.2876C12.993 11.1581 12.5691 11.3722 12.4397 11.7656C12.0597 12.9208 11.0598 13.5 10.0271 13.5C8.99438 13.5 7.99455 12.9208 7.61454 11.7656Z",className:"p-emoji_and_gif_picker_custom_icons__fill p_emoji_and_gif_pickers_container__tab_icon--inactive"}))};EmojiIcon.displayName="EmojiIcon";let GifIcon=({isActive:e})=>{let t=(0,p.d4)(e=>"dark"===(0,h.to)(e));return n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"presentation",className:m()("p-emoji_and_gif_picker_custom_icons__custom-icon",{"p-emoji_and_gif_picker_custom_icons__custom-icon--active":e,"p-emoji_and_gif_picker_custom_icons__custom-icon--dark":t})},n.createElement("g",{clipPath:"url(#clip0_538_258928)",className:"p_emoji_and_gif_pickers_container__tab_icon--active"},n.createElement("path",{d:"M4.5 1.5H15.5C17.1569 1.5 18.5 2.84315 18.5 4.5V7V15.5C18.5 17.1569 17.1569 18.5 15.5 18.5H4.5C2.84315 18.5 1.5 17.1569 1.5 15.5V4.5C1.5 2.84315 2.84315 1.5 4.5 1.5Z",fill:"#9ED6FA",strokeWidth:"1.5",className:"p-emoji_and_gif_picker_custom_icons__stroke"}),n.createElement("circle",{cx:"12.5",cy:"8.5",r:"1.5",className:"p-emoji_and_gif_picker_custom_icons__fill"}),n.createElement("path",{d:"M6.90216 12.5C7.39558 14 8.71137 14.75 10.0272 14.75C11.3429 14.75 12.6587 14 13.1522 12.5",strokeWidth:"1.5",strokeLinecap:"round",className:"p-emoji_and_gif_picker_custom_icons__stroke"}),n.createElement("path",{d:"M7.03613 7.53516L9.03613 8.67801L7.03613 9.53516",strokeLinecap:"round",strokeLinejoin:"round",className:"p-emoji_and_gif_picker_custom_icons__stroke"})),n.createElement("g",{clipPath:"url(#clip0_538_258934)",className:"p_emoji_and_gif_pickers_container__tab_icon--inactive"},n.createElement("path",{d:"M4.5 1.6272H12.4244C13.3242 1.6272 14.1765 2.03108 14.7462 2.72748L17.6125 6.23062C18.051 6.76661 18.2906 7.43781 18.2906 8.13033V15.4178C18.2906 17.0746 16.9474 18.4178 15.2906 18.4178H4.5C2.84315 18.4178 1.5 17.0746 1.5 15.4178V4.6272C1.5 2.97034 2.84315 1.6272 4.5 1.6272Z",className:"p-emoji_and_gif_picker_custom_icons__stroke",strokeWidth:"1.5"}),n.createElement("circle",{cx:"7.42601",cy:"8.54097",r:"1.48152",className:"p-emoji_and_gif_picker_custom_icons__fill"}),n.createElement("circle",{cx:"12.3645",cy:"8.54097",r:"1.48152",className:"p-emoji_and_gif_picker_custom_icons__fill"}),n.createElement("path",{d:"M6.83563 12.4917C7.32298 13.9732 8.62256 14.714 9.92214 14.714C11.2217 14.714 12.5213 13.9732 13.0086 12.4917",className:"p-emoji_and_gif_picker_custom_icons__stroke",strokeWidth:"1.5",strokeLinecap:"round"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.0106 8.91138C12.8969 8.91138 11.9941 8.00855 11.9941 6.89486L11.9941 3.60259C11.9941 1.6647 14.4611 0.842363 15.6238 2.39268L18.093 5.68495C19.0901 7.01431 18.1415 8.91138 16.4798 8.91138L14.0106 8.91138ZM13.7226 6.89486C13.7226 7.05396 13.8515 7.18293 14.0106 7.18293L16.4798 7.18293C16.7172 7.18293 16.8527 6.91192 16.7103 6.72202L14.2411 3.42975C14.075 3.20827 13.7226 3.32575 13.7226 3.60259L13.7226 6.89486Z",className:"p-emoji_and_gif_picker_custom_icons__fill"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_538_258934"},n.createElement("rect",{width:"20",height:"20",fill:"white"}))),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_538_258928"},n.createElement("rect",{width:"20",height:"20",fill:"white"}))))};GifIcon.displayName="GifIcon";var _=a(0x5da5726),f=a(0x24c3c7b0),b=a(0x40c0d834),g=a(0x11a296110),y=a(0x1faa3f1ac),A=a(0xa1832ae4),x=a(0x3711e82d),E=a(0x63eca738),C=a(0xbc562055),k=a(0xbe2be077),v=a(0x11c82607b),S=a(0x99bf11e3);let I=(0,v.Ay)("Update the gif picker prefs for the team or workspace",(e,t)=>{let a=t(),n=(0,k.k)(a),r={pref:"allow_native_gif_picker",reason:"admin-enabled-cta",value:!0};e(n?(0,S.K)(r):(0,C.M)(r))});I.meta={name:"updateWorkspaceOrTeamGifPickerPrefs",key:"createThunkUpdateWorkspaceOrTeamGifPickerPrefs",description:"Update the gif picker prefs for the team or workspace"};var w=a(0x1ee439e69);let T=a.p+"enable_gif_picker-a566c6e.gif",N=new l.Ay("gif-picker-ctas"),M={eventId:x.EventId.GIFS_PICKER_ADMIN_CTA_SHOWN,onClick:{enableClogAction:!0}},R=(0,n.memo)(()=>{let e=(0,r.wA)(),t=(0,n.useCallback)(()=>{e(I())},[e]),a=(0,p.d4)(w.H7),i=(0,A.F1)(a);return(0,n.useEffect)(()=>()=>{e((0,E.J)())},[e]),n.createElement(b.A,{eventId:x.EventId.GIFS_PICKER_ADMIN_CTA_SHOWN,uiComponentName:x.UiComponentName.GIFS_PICKER,clogImpression:!0},n.createElement("div",{className:"p-gif_picker","data-qa":"gif-picker-admin-enable"},n.createElement("section",{className:"p-gif_picker__admin_enable"},n.createElement("img",{alt:"An animated GIF showing the result of enabling the GIF picker for your team or organization",className:"p-gif_picker__admin_enable__illustration",src:T}),n.createElement("h2",{className:"p-gif_picker__admin_enable__header"},N.t("A GIF is worth a thousand words")),n.createElement("p",{className:"p-gif_picker__admin_enable__subtext"},N.rt("Admins can now let people attach a GIF to a message and make conversations more fun. <strong>This will turn on GIF sharing for {teamDisplayName}.</strong>",{teamDisplayName:i})),n.createElement(g.Ay,{autoClogProps:M,"data-qa":"gif-picker-admin-enable-button",type:"outline",onClick:t},N.t("Enable")),n.createElement("footer",{className:"p-gif_picker__admin_enable__footer"},N.t("This feature is powered by Tenor, a third-party service. "),n.createElement(y.A,{href:"https://tenor.com/legal-terms","data-qa":"gif-picker-admin-enable-terms-link"},N.t("Review additional terms."))))))});var P=a(0xedbc2765),L=a(0x3e82fc86),O=a(0x1c9a3f62b),D=a(0x1988881a0),F=a(0x8335e26c),U=a(0xb9604b6),B=a(0x5b1935a6);let H=new l.Ay("emoji_picker"),W={EMOJIS:"emojis",GIFS:"gifs"},V=(0,o.A)(({onSkinToneChanged:e,onEmojiSelected:t,onClosed:a=i.A,showHandyReactions:l,hideAddEmojiButton:o,enableSkinTonePicker:d,onGifSelected:m=i.A,selectedTabId:h,hasKeyboardFocusWithin:b,onFocus:g,onBlur:y,openedBy:A,shouldLimitAdminEnableViews:x=!0})=>{let C=(0,r.wA)(),[k,v]=(0,n.useState)(h||W.EMOJIS),[S,I]=(0,n.useState)(1),[w,T]=(0,n.useState)(),N=(0,p.d4)(D.BH),M=(0,p.d4)(D.wx),V=(0,p.d4)(e=>(0,u.ty)(e,"seen_gif_new_badge")??0);(0,n.useEffect)(()=>{N&&1===S&&(I(e=>e+1),V<3&&C((0,F.n)()))},[k,S,C,V,N]),(0,n.useEffect)(()=>{M&&C((0,E.J)())},[C,M]),(0,n.useEffect)(()=>{k!==W.GIFS&&T(void 0)},[k]);let G=P.LI.isEnabled()?_.tN:_.Ay,q=b&&k===W.EMOJIS&&1===S||!b,j=(0,p.d4)(e=>(0,U.Hp)(e,B.xu.EMOJI_DRAWER))===B.ze.PRODUCTIVITY_REACJI,z=(0,p.d4)(O.tZ),K=(0,p.d4)(L.o),$=(0,p.d4)(e=>(0,L.B)(e,z)),Y=K||!!(z&&$),Q=(0,n.useCallback)(e=>{v(W.GIFS),T(e)},[]),Z=(0,p.d4)(e=>(0,u.ty)(e,"seen_gif_picker_admin_cta"))??0,J=(0,n.useMemo)(()=>{let r;j&&l?r=Y?"reaction-height-with-cta":"reaction-height-without-cta":j&&(r=Y?"message-height-with-cta":"message-height-without-cta");let i=n.createElement(G,{onSkinToneChanged:e,onSelected:t,onClosed:a,showHandyReactions:!!l,hideAddEmojiButton:!!o,enableSkinTonePicker:!!d,className:"p-emoji_picker--with_gif_picker",focusInputOnMount:q,noResultsSearchForGifWithQuery:Q,isWithinTab:!0}),c=b&&k===W.GIFS&&1===S||!b;return[{title:H.t("Emoji"),id:W.EMOJIS,"data-qa":`${W.EMOJIS}_tab`,content:i,customIcon:n.createElement(EmojiIcon,{isActive:k===W.EMOJIS})},{"aria-label":H.t("GIFs"),title:n.createElement(n.Fragment,null,H.t("GIFs"),V<3&&n.createElement(s.A,{"data-qa":"tabs_new_badge",className:"p-emoji_and_gif_pickers_container__new_badge"},H.t("NEW"))),id:W.GIFS,"data-qa":`${W.GIFS}_tab`,content:!N&&(M||Z>=5||!x)?n.createElement(R,null):n.createElement(f.P,{adjustGifPickerHeightToAccommodateEmojiPicker:r,emojiSearchQuery:w,onGifSelected:m,onClosed:a,focusInputOnMount:c,openedBy:A,isWithinTab:!0}),customIcon:n.createElement(GifIcon,{isActive:k===W.GIFS})}]},[j,l,G,e,t,a,o,d,q,Q,b,k,S,V,N,M,Z,x,w,m,A,Y]);return n.createElement(c.A,{className:"p-emoji_and_gif_pickers_container",tabs:J,ariaLabel:H.t("Emoji and GIFs"),currentTabId:k,onTabChange:v,onFocus:g,onBlur:y,focusOnFirstFocusableChildOnChange:!1,manualTabActivation:!0,iconPosition:"left",fullWidthMenu:!0})})},0x159e881e7:(e,t,a)=>{"use strict";a.d(t,{L:()=>EmojiPickerContextProvider,y:()=>r});var n=a(0xbad225b5);let r=n.createContext({highlightFirstSearchResult:!1,setHighlightFirstSearchResult:()=>!1,highlightOnMultiPickerEscape:!1,setHighlightOnMultiPickerEscape:()=>!1,showHandyReactions:!1,enableSkinTonePicker:!0,keyboardIntoPicker:!1,setKeyboardIntoPicker:()=>!1}),EmojiPickerContextProvider=({children:e,showHandyReactions:t,enableSkinTonePicker:a})=>{let[i,l]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),m=(0,n.useMemo)(()=>({highlightFirstSearchResult:i,setHighlightFirstSearchResult:l,highlightOnMultiPickerEscape:o,setHighlightOnMultiPickerEscape:s,showHandyReactions:t,enableSkinTonePicker:a,keyboardIntoPicker:c,setKeyboardIntoPicker:d}),[i,o,t,a,c]);return n.createElement(r.Provider,{value:m},e)};EmojiPickerContextProvider.displayName="EmojiPickerContextProvider"},0x1faaed399:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xb77a689a),l=a(0x18f2150ea),o=a(0x6aeae8a3),s=a(0x105960ad8),c=a(0x5da5726),d=a(0xedbc2765),m=a(0x1c91944c9),u=a(0x12f41fc32),p=a(0x1988881a0);let h=class extends n.Component{static defaultProps={offsetX:0,offsetY:-6,position:"top-left",onClick:r.A,onClose:r.A,onEmojiSelected:r.A,showHandyReactions:!1,customTrigger:!1,forceOpen:!1,startsOpen:!1,contentStyle:void 0,overlayStyle:void 0,shouldReturnFocusAfterClose:!0,tryOppositePosition:!1,hideAddEmojiButton:!1,enableSkinTonePicker:!0,enableGifPicker:!1,openNativeGifPicker:!1,shouldPropagateOnClose:!1,shouldLimitAdminEnableViews:!0};constructor(e){if(super(e),!(0,i.A)(e.children)&&!(0,l.A)(e.children)&&e.children&&e.children.type&&e.children.type===n.Fragment)throw Error("EmojiMenuTrigger component cannot contain React Fragment as outermost element from props.children");this.onEmojiSelected=this.onEmojiSelected.bind(this),this.onSkinToneChanged=this.onSkinToneChanged.bind(this),this.renderPopover=this.renderPopover.bind(this)}onEmojiSelected(e,t){this.props.onEmojiSelected&&this.props.onEmojiSelected(e,t)}onSkinToneChanged(e){this.props.setUserPrefByApi({pref:"preferred_skin_tone",value:e})}renderPopover(e){let{offsetX:t,offsetY:a,position:r,contentStyle:i,overlayStyle:l,showHandyReactions:m,shouldReturnFocusAfterClose:u,hideAddEmojiButton:p,enableSkinTonePicker:h,tryOppositePosition:_,enableGifPicker:f,prefGifPickerEnabled:b,onGifSelected:g,openNativeGifPicker:y,experimentNativeGifPickerPrefDisabledButAvailable:A,openedBy:x,shouldPropagateOnClose:E,shouldShowReacjiTriggers:C,channelId:k,shouldLimitAdminEnableViews:v}=this.props,S=d.LI.isEnabled()?c.tN:c.Ay;return n.createElement(o.AM,{shouldFade:!1,allowanceX:15,allowanceY:15,position:r,offsetX:t||0,tryOppositePosition:!!_,offsetY:a||0,contentStyle:i,overlayStyle:l,shouldReturnFocusAfterClose:!!u,...e},n.createElement(n.Fragment,null,b&&f||A||!v?n.createElement(s.g,{onSkinToneChanged:this.onSkinToneChanged,onEmojiSelected:this.onEmojiSelected,onGifSelected:g,onClosed:e.onClose,showHandyReactions:!!m,hideAddEmojiButton:!!p,enableSkinTonePicker:!!h,selectedTabId:y?s.K.GIFS:s.K.EMOJIS,openedBy:x,shouldLimitAdminEnableViews:v}):n.createElement(S,{onSkinToneChanged:this.onSkinToneChanged,onSelected:this.onEmojiSelected,onClosed:e.onClose,showHandyReactions:!!m,hideAddEmojiButton:!!p,enableSkinTonePicker:!!h,shouldPropagateOnClose:E,shouldShowReacjiTriggers:C,passedChannelId:k})))}render(){let{onClick:e,onClose:t,forceOpen:a,startsOpen:i,customTrigger:l,targetBounds:s,openNativeGifPicker:c}=this.props;return n.createElement(o.Wv,{onClick:e||r.A,onClose:t||r.A,customTrigger:!!l,forceOpen:!!a||c,startsOpen:!!i,targetBounds:s,renderPopover:this.renderPopover,shouldCloseOnOverlayMouseDown:!0},this.props.children)}};h.displayName="EmojiMenuTrigger";let _=(0,m.N)(e=>({prefGifPickerEnabled:(0,p.BH)(e),experimentNativeGifPickerPrefDisabledButAvailable:(0,p.wx)(e)}),{setUserPrefByApi:e=>(0,u.AZ)(e)})(h)},0xc527df57:(e,t,a)=>{"use strict";a.d(t,{tN:()=>tg,Ay:()=>tb});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1e2051844),o=a(0x1cbdfeceb),s=a(0x2286acf6c),c=a(0x162afc153),d=a(0x9e671ad),m=a(0x357885ff),u=a(0x20ef3966f),p=a(0x40c0d834),h=a(0xe874a88a),_=a(0x176f19918),f=a(0xb97b797e),b=a(0x1df96de4c),g=a(0x15279822),y=a(0x20482ad21),A=a(0x224f7f0e9),x=a(0x12edaa96a),E=a(0x9f7220f0),C=a(0x2343fde45),k=a(0x2431e9bcb),v=a(0x159e881e7),S=a(0x2501a2cee),I=a(0x24573b3ff);let makeEmojiTabId=({name:e=""})=>`${e.toLowerCase().replace(/\s/g,"-")}-emoji-tab`;var w=a(0x3711e82d),T=a(0x46947d88),N=a(0x2363b126);let M=new y.Ay("emoji_picker"),shouldFrequentlyUsedBeTheTabGroup=({name:e,tabGroupName:t})=>"Frequently Used"===e&&"Search results"===t,R=(0,n.memo)(({groups:e,showCustomBadge:t,onGroupTabClick:a,tabGroupName:r})=>{let l=(0,n.useMemo)(()=>(e||b.Ml).filter(({name:e,omitFromTabs:t})=>!t&&"Getting Work Done"!==e&&e!==N.Q).map(({name:e,nameLocalized:l})=>{let o=r===e||shouldFrequentlyUsedBeTheTabGroup({name:e,tabGroupName:r}),s=t&&"Custom"===e,c=i()("p-emoji_picker__group_tab",{"p-emoji_picker__group_tab--active":o,"p-emoji_picker__group_tab--emoji-a11y":o,"p-emoji_picker__group_tab--with_dot":s,hidden:"Getting Work Done"===e}),d=k.tS[e],m=l;"Frequently Used"===e&&(d=k.tS.Search,m=M.t("Search")),d||(d=k.tS.Custom);let u={name:d},p=shouldFrequentlyUsedBeTheTabGroup({name:e,tabGroupName:r})?r:e,h={elementName:`emoji_group_tab_${d}`,elementIndex:k.b3[e],onClick:{enableClogAction:!0}};return{id:makeEmojiTabId({name:p}),title:n.createElement(n.Fragment,null,n.createElement(S.Ah,{size:"20",...u}),s&&n.createElement("div",{className:"p-emoji_picker__group_tab_dot"})),"aria-label":m,"data-qa":`emoji_group_tab_${d}`,onClick:()=>a(e),className:c,autoClogProps:h}}),[e,t,a,r]),o=(0,n.useCallback)(e=>{(e.key===T.D.RIGHT||e.key===T.D.LEFT||e.key===T.D.UP||e.key===T.D.DOWN||e.key===T.D.ENTER)&&e.stopPropagation()},[]);return n.createElement("div",{role:"presentation",onKeyDown:o,className:"p-emoji_picker__group_tabs p-emoji_picker__group_tabs--slack-kit-tabs"},n.createElement(p.A,{eventId:w.EventId.EMOJI_PICKER_CATEGORY_SELECTED,uiComponentName:w.UiComponentName.EMOJI_PICKER_GROUP_TABS,uiStep:w.UiStep.EMOJI_PICKER_GROUP_TAB_SELECTED},n.createElement(I.A,{ariaLabel:M.t("Category",{fallbackHash:"a3c686e711e4720f99b4562bb3dbaae7ab658cf2",fallbackHashNs:"workflow_builder"}),tabs:l,tabMenuClassnames:"p-emoji_picker__group_tabs-menu",currentTabId:makeEmojiTabId({name:r}),manualTabActivation:!0})))});var P=a(0x18f2150ea),L=a(0x16aa90253),O=a(0x130d89881),D=a(0x113998385),F=a(0x1faa3f1ac);let U=new y.Ay("emoji_picker"),EmojiListEmptyState=e=>{let{showAddEmojiButton:t,onAddCustomEmojiClick:a}=e;return t?n.createElement("div",{className:"p-emoji_picker__empty_search"},n.createElement(F.A,{onClick:a},U.rt("Add custom emoji"))):null};EmojiListEmptyState.displayName="EmojiListEmptyState";let B=n.memo(EmojiListEmptyState);var H=a(0x301566e3),W=a(0xedbc2765),V=a(0x45012309),G=a(0x223ac29bb),q=a(0x1c91944c9),j=a(0x157c76573),z=a(0xf3c65e54),K=a(0x5b1935a6);let $=class extends n.Component{constructor(e){super(e),this.getRowHeight=this.getRowHeight.bind(this),this.renderRow=this.renderRow.bind(this),this.renderEmptyState=this.renderEmptyState.bind(this),this.onAddCustomEmojiClick=this.onAddCustomEmojiClick.bind(this),this.usingKeyboard=this.usingKeyboard.bind(this),this.setListRef=this.setListRef.bind(this),this.virtualList=null}virtualList;componentDidMount(){this.props.groups[0]?.name===N.Q&&(W.LI.stop({label:W.gC.ReacjiTriggerWorkflowsEmojiPickerSection}),this.props.clogger.track(w.EventId.WORKFLOWS_REACJI_TRIGGER,{contexts:{ui_context:{step:w.UiStep.WORKFLOWS_REACJI_TRIGGER_EMOJI_PICKER_SECTION,action:w.UiAction.IMPRESSION}}})),this.props.showProductivityReacji&&this.props.groups[1]?.name==="Getting Work Done"&&this.props.throttledRecordNotificationEvent({notificationName:K.ze.PRODUCTIVITY_REACJI,action:K.hw.IMPRESSION})}getSnapshotBeforeUpdate(){return(0,P.A)(this.props.scrollToIndex)?{scrollToIndex:this.props.scrollToIndex}:null}componentDidUpdate(e,t,a){null!==a&&this.virtualList.scrollToRow(a.scrollToIndex),e.screenRows!==this.props.screenRows&&this.virtualList&&this.virtualList.recomputeRowHeights()}usingKeyboard(){let{cursorPosition:e}=this.props;return -1!==e[1]}onAddCustomEmojiClick(e){let{searchQuery:t,onAddEmojiButtonClick:a}=this.props;a&&a(e),this.props.openAddCustomEmojiModal({initialTab:D.D.CUSTOM,emojiNameSuggestion:t||"",elementName:"add_emoji_button"})}getRowHeight({index:e}){switch(this.props.screenRows[e].type){case"empty-header-row":return 1;case"group":return 27;case"emoji":return this.props.screenRows.length-1===e?43:33;default:return 33}}setListRef(e){this.virtualList=e}scrollToTop(){this.virtualList.scrollToPosition(0)}renderEmptyState(){return n.createElement(B,{onAddCustomEmojiClick:this.onAddCustomEmojiClick,showAddEmojiButton:this.props.showAddEmojiButton})}renderRow({index:e,key:t,style:a}){let{showProductivityReacji:r,screenRows:i,onMouseEnter:l,onMouseLeave:o,isEmojiSelected:s,onSelected:c,activeGroupName:d,pickerHasKeyboardFocusWithin:m,onMultiSkinTonePopoverEscape:u}=this.props,p=(0,G.Yp)();return n.createElement(H.A,{key:t,screenRows:i,isEmojiSelected:s,usingKeyboard:m,index:e,style:a,showProductivityReacji:r,onEmojiClick:c,onMouseEnter:l,onMouseLeave:o,locale:p,activeGroupName:d,onMultiSkinTonePopoverEscape:u})}render(){let{screenRows:e}=this.props,[t,a]=this.props.cursorPosition,r=[t,a+k.A8];return n.createElement(O.A,null,({height:t,width:a})=>n.createElement(L.O,{screenRows:e,className:"p-emoji_picker__list_scroller",height:t,rowCount:this.props.screenRows.length,rowHeight:this.getRowHeight,rowRenderer:this.renderRow,scrollToAlignment:this.usingKeyboard()?"auto":"start",width:a,onRowsRendered:this.props.onScroll,noRowsRenderer:this.renderEmptyState,cursorPosition:r,ref:this.setListRef,tabIndex:-1,id:"emoji-picker-list",role:"presentation",containerRole:"presentation","aria-label":"","aria-readonly":!1}))}};$.displayName="EmojiList";let Y=(0,q.N)(e=>({clogger:(0,V.eo)({state:e})}),{throttledRecordNotificationEvent:e=>(0,z.j)(e),openAddCustomEmojiModal:e=>(0,j.A)(e)},null,{forwardRef:!0})($);var Q=a(0x11a296110),Z=a(0x19ab18890);let J=new y.Ay("gif-picker"),EmojiListNoResults=({searchGifsInstead:e})=>n.createElement("div",{className:"p-emoji_picker_no_results","data-qa":"emoji-list-no-results"},n.createElement(Z.Ay,{text:"face_with_monocle",showTooltip:!1}),n.createElement("div",null,n.createElement("h2",{className:"p-emoji_picker_no_results__header"},J.t("No emoji to show")),n.createElement("p",{className:"p-emoji_picker_no_results__subtext"},J.t("Like your smarts, your search is unmatched."))),e?n.createElement(Q.Ay,{"data-qa":"emoji-list-search-gifs",type:"outline",onClick:e},J.t("Search GIFs Instead")):null);EmojiListNoResults.displayName="EmojiListNoResults";var X=a(0x16cf1da63),ee=a(0x7fa3cc8f),et=a(0x1bffbfb4),ea=a(0xa6f3163b),en=a(0x344bb842),er=a(0x15f8e452a),ei=a(0xf2ef6247),el=a(0x14f968184),eo=a(0x36209c43),es=a(0x12f41fc32),ec=a(0x226892387),ed=a(0x3c749200),em=a(0x14149c126);let eu=new y.Ay("emoji_picker"),EmojiPackCta=e=>{let{groups:t,jumpToGroup:a}=e,r=(0,X.wA)(),i=(0,ec.d4)(ed._J),o=(0,ec.d4)(e=>"on"===(0,em._Z)(e,"emoji_pack_translations")),s=i?(0,el.M)(i):"",c=!!i&&(0,eo.j)(i),d=i?(0,ei.H)(i):[],m=(0,ee.A)(d),u=!!(0,l.A)(t,e=>e.name===s),p=c?"emoji_packs_clicked_picker_post_install_cta":"emoji_packs_clicked_picker_cta",h=o?eu.t("{packName} emoji added!",{packName:s}):eu.t("{packName} emojis added!",{packName:s}),_=o?eu.t("{packName} emoji for your team",{packName:s}):eu.t("{packName} emojis for your team",{packName:s}),f=c?h:_,b=(0,n.useCallback)(()=>{r((0,es.AZ)({pref:p,value:!0}))},[r,p]),g=(0,n.useCallback)(()=>{b(),c?u&&a(s):r((0,j.A)({initialTab:D.D.PACKS,emojiNameSuggestion:"",elementName:"emoji_pack_cta"}))},[r,a,s,b,c,u]);return n.createElement("div",{className:"p-emoji_picker__pack_cta_wrapper","data-qa":"emoji_picker__pack_cta"},n.createElement("div",{className:"p-emoji_picker__pack_cta_inner_wrapper"},n.createElement(ea.A,{className:"p-emoji_picker__pack_cta",onClick:g},n.createElement("div",{className:"p-emoji_picker__pack_cta_graphic"},n.createElement("img",{src:(0,et.A)(m,0),alt:"",className:"p-emoji_picker__pack_cta_graphic_img p-emoji_picker__pack_cta_graphic_img_1"}),n.createElement("img",{src:(0,et.A)(m,1),alt:"",className:"p-emoji_picker__pack_cta_graphic_img p-emoji_picker__pack_cta_graphic_img_2"}),n.createElement("img",{src:(0,et.A)(m,2),alt:"",className:"p-emoji_picker__pack_cta_graphic_img p-emoji_picker__pack_cta_graphic_img_3"})),n.createElement("div",{className:"p-emoji_picker__pack_cta_text_container"},n.createElement("b",{className:"p-emoji_picker__pack_cta_text"},f)," ",n.createElement("span",{className:"p-emoji_picker__pack_cta_arrow"},n.createElement(er.A,{type:"arrow-right",size:"inherit",inline:!0})))),n.createElement(en.A,{"aria-label":f,size:"small",className:"p-emoji_picker__pack_cta_dismiss_btn",onClick:b,svgIconProps:{name:"close"}})))};EmojiPackCta.displayName="EmojiPackCta";var ep=a(0xb90908),eh=a(0x106d9c7ac),e_=a(0x2ab73abf),ef=a(0x1b3ecb90f),eb=a(0x6f38ac62);let eg=[":hand:",":hand::skin-tone-2:",":hand::skin-tone-3:",":hand::skin-tone-4:",":hand::skin-tone-5:",":hand::skin-tone-6:"],ey=new y.Ay("emoji_picker"),eA=class extends n.PureComponent{static defaultProps={activeSkinToneId:"",onSkinToneChanged:o.A,onOpen:o.A};checkedRadioButton;toggleButton;popoverOnClose;constructor(e){super(e),this.onRadioFocus=this.onRadioFocus.bind(this),this.onRadioBlur=this.onRadioBlur.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onClick=this.onClick.bind(this),this.checkedRadioButton=n.createRef(),this.toggleButton=n.createRef(),this.popoverOnClose=null,this.state={focusedSkinToneOption:null}}onRadioFocus(e){let t=e.target.value;this.setState(()=>({focusedSkinToneOption:t}))}onRadioBlur(e){let{currentTarget:t,relatedTarget:a}=e;!t.contains(a)&&(this.setState(()=>({focusedSkinToneOption:null})),this.props.onCancel&&this.props.onCancel())}onClick(e){e.stopPropagation()}onKeyDown(e){"Escape"===e.key&&(e.stopPropagation(),this.popoverOnClose&&this.popoverOnClose(e),this.props.onCancel?.()),"Tab"===e.key&&e.preventDefault()}onMouseDown(e){let{currentTarget:t}=e,a=t.querySelector("input"),n=a&&a.value;n&&this.props.onSkinToneChanged&&(this.props.onSkinToneChanged(n),this.popoverOnClose&&this.popoverOnClose(e))}onRadioButtonKeyDown=e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();let{currentTarget:t}=e,a=t.querySelector("input"),n=a&&a.value;n&&this.props.onSkinToneChanged&&this.props.onSkinToneChanged(n),this.popoverOnClose&&this.popoverOnClose(e)}};getCurrentTone(){let{activeSkinToneId:e}=this.props;return e&&"1"!==e?`:hand::skin-tone-${e||"1"}:`:":hand:"}getChoices(){let{activeSkinToneId:e}=this.props,t=this.getCurrentTone();return e?(0,ep.A)(eg,e=>e===t).concat(t):eg}maybeRenderSkinToneLabel(){return this.props.activeSkinToneId?null:n.createElement("span",{className:"p-emoji_picker_skintone__toggle_btn_label","data-qa":"emoji_skintone_label"},ey.t("Skin Tone"))}focusRadioGroup=()=>{let e=this.checkedRadioButton.current;e&&e!==document.activeElement&&e.focus()};renderRadioButton({skinToneId:e,emoji:t}){let{focusedSkinToneOption:a}=this.state,{activeSkinToneId:r}=this.props,l=a===e,o=l||r===e,s=(0,eb.A)(e),c=i()("p-emoji_picker_skintone__radio_button_container",{"p-emoji_picker_skintone__radio_button_container--focus-visible":l});return n.createElement("div",{className:c,key:e,"data-qa":`emoji_skintone_option_${e}`,onMouseDown:this.onMouseDown,onKeyDown:this.onRadioButtonKeyDown},n.createElement("input",{type:"radio",name:"skin-tone",value:e,defaultChecked:o,"aria-label":s,className:"p-emoji_picker_skintone__radio_button",ref:o?this.checkedRadioButton:void 0}),n.createElement("div",{"aria-hidden":"true"},n.createElement(ef.Ay,{text:t,emojiSize:ef.lw.MEDIUM,forceDisplay:!0})))}renderRadioGroup=e=>(this.popoverOnClose=e.onClose,n.createElement(eh.Ay,{...e,ariaRole:"dialog",ariaLabel:ey.t("Choose your default skin tone")},n.createElement("div",{role:"radiogroup","aria-labelledby":"emoji-picker-skintone-radiogroup-label",className:"p-emoji_picker_skintone__radiogroup"},n.createElement("div",{id:"emoji-picker-skintone-radiogroup-label",className:"p-emoji_picker_skintone__radiogroup_label"},ey.t("Choose your default skin tone")),n.createElement("div",{className:"p-emoji_picker_skintone__radio_buttons","data-qa":"emoji_skintone_options",onFocus:this.onRadioFocus,onBlur:this.onRadioBlur,onKeyDown:this.onKeyDown},this.getChoices().map(e=>{let t=e.match(/skin-tone-\d+/),a=t?t[0].slice(-1):"1";return this.renderRadioButton({skinToneId:a,emoji:e})})))));onPopoverOpen=()=>{this.focusRadioGroup(),this.props.onOpen&&this.props.onOpen()};render(){let{activeSkinToneId:e}=this.props,t=(0,eb.A)(e||"1"),a=ey.t("Choose your default skin tone, currently selected: {selectedSkinTone}.",{selectedSkinTone:t});return n.createElement("div",{className:"p-emoji_picker_skintone",role:"presentation",onClick:this.onClick},n.createElement(e_.Ay,{position:"top-right",renderPopover:this.renderRadioGroup,onOpen:this.onPopoverOpen,onClose:this.props.onCancel},n.createElement(Q.Nm,{className:"p-emoji_picker_skintone__toggle_btn","data-qa":"emoji_selected_skintone",ref:this.toggleButton,"aria-label":a},n.createElement("div",null,n.createElement(ef.Ay,{text:this.getCurrentTone(),emojiSize:ef.lw.MEDIUM,forceDisplay:!0})),this.maybeRenderSkinToneLabel())))}};eA.displayName="EmojiSkinTonePicker";var ex=a(0x238b287cf);let eE=new y.Ay("emoji_picker"),AddCustomEmojiButton=({onClick:e,isHuddlesEmojiPicker:t})=>{let a=(0,X.wA)(),r=(0,ex.A)(),i=(0,n.useCallback)(t=>{e?.(t),a((0,j.A)({initialTab:D.D.CUSTOM,emojiNameSuggestion:"",elementName:"add_emoji_button"}))},[a,e]);return(0,n.useEffect)(()=>{r.track(w.EventId.ADD_CUSTOM_EMOJI_IN_CLIENT,{contexts:{ui_context:{step:"add_custom_emoji",action:"impression",ui_component:"button",ui_properties:{element_type:"button",element_name:"add_emoji_button"}}}})},[r]),n.createElement(Q.Ay,{type:"outline",size:"small","emoji-type":"emoji",onClick:i,"data-qa":"customize_emoji_add_button",className:"p-emoji_picker__add_custom_emoji"},t?eE.t("Add Reaction",{fallbackHash:"f4272a7adff84faaf83c9f83d34109f50b4e39ad",fallbackHashNs:"workflow_builder"}):eE.t("Add Emoji"))};AddCustomEmojiButton.displayName="AddCustomEmojiButton";let eC=[":slightly_smiling_face:",":+1:",":heavy_check_mark:",":heart:",":eyes:"];function buildHandyReactions(e,t){return e&&"1"!==e&&t?(0,u.A)(eC,t=>":+1:"===t?`${t}:skin-tone-${e}:`:t):eC}var ek=a(0xdafb3627);let ev=new y.Ay("emoji_picker"),EmojiHandyReaction=e=>{let{emoji:t,onSelected:a,onMouseEnterOrFocus:r,onMouseLeaveOrBlur:i}=e,l=t.replace(/(^:|:$)/g,""),o=(0,n.useCallback)(e=>{e.preventDefault(),a(e,l)},[l,a]),s=(0,n.useCallback)(()=>{r(l)},[l,r]);return n.createElement(Q.Nm,{className:"p-emoji_picker__list_item",onClick:o,onMouseEnter:s,onMouseLeave:i,onFocus:s,onBlur:i,"data-color-index":e.index%ek.dX,"data-qa":`handy-reaction-${t}`},n.createElement(ef.Ay,{text:t,emojiSize:ef.lw.MEDIUM,forceDisplay:!0}))};EmojiHandyReaction.displayName="EmojiHandyReaction";let EmojiHandyReactions=e=>{let t=buildHandyReactions(e.activeSkinToneId,e.enableSkinTonePicker),a=ev.t("Handy Reactions");return n.createElement("div",{className:"p-emoji_picker__handy_rxns",role:"group","aria-label":a},n.createElement("div",{"aria-hidden":!0,className:"p-emoji_picker__heading p-emoji_picker__heading--handy_rxns"},a),n.createElement("div",{className:"p-emoji_picker__handy_rxns_list"},t.map((t,a)=>n.createElement(EmojiHandyReaction,{key:t,emoji:t,index:a,onSelected:e.onSelected,onMouseEnterOrFocus:e.onMouseEnterOrFocus,onMouseLeaveOrBlur:e.onMouseLeaveOrBlur}))))};EmojiHandyReactions.displayName="EmojiHandyReactions";let eS=n.memo(EmojiHandyReactions);var eI=a(0x7c6dcbee),ew=a(0x1d06c44fe),eT=a(0x1829a8d43),eN=a(0x1e4ae349d);let eM=new y.Ay("emoji_picker"),EmojiPickerPreview=e=>{let{showSkinTonePicker:t,activeSkinToneId:a,hasZeroRows:r,emoji:l,teamOrEnterpriseId:o,locale:s,reacjiTriggersForEmoji:c}=e,d=(0,ec.d4)(eN.wn),m=(0,eT.A)(l||""),u=m?m.name:"",p=t?(0,eI.A)(u,a,o):u,h=(0,ec.d4)(e=>(0,ew.bR)({state:e,locale:s,name:u})),_=r?eM.t("Oh no!"):h,f=r?eM.t("We couldn\u2019t find that emoji"):`:${h}: ${d[u]?d[u].join(" "):""}`;h&&c&&(f=c.length>1?n.createElement("span",null,eM.t("This emoji starts multiple workflows")):n.createElement("span",null,eM.rt("Starts {workflowName} workflow",{workflowName:n.createElement("span",{className:"bold"},c[0].name)})));let b=i()("p-emoji_picker__preview_text",{"p-emoji_picker__preview_text--shortened":!a,"p-emoji_picker__preview_reacji_text":c?.length});return n.createElement("div",{className:"p-emoji_picker__preview"},n.createElement("span",{className:"p-emoji_picker__preview_img","data-qa":"emoji_preview_img"},n.createElement(ef.Ay,{text:p,emojiSize:ef.lw.LARGE,forceDisplay:!0})),n.createElement("div",{className:b},n.createElement("span",{"data-qa":"emoji_preview_name"},_),n.createElement("br",null),n.createElement("span",{className:"p-emoji_picker__preview_aliases","data-qa":"emoji_preview_aliases"},f)))};EmojiPickerPreview.displayName="EmojiPickerPreview";var eR=a(0x558ba5a6);let eP=new y.Ay("emoji_picker"),EmojiPickerFooter=e=>{let{showHandyReactions:t,showAddEmojiButton:a,showSkinTonePicker:r,activeSkinToneId:i,onEmojiSelected:l,onEmojiMouseEnter:o,onEmojiMouseLeave:s,onSkinToneChanged:c,hasZeroRows:d,currentEmojiSelection:m,teamOrEnterpriseId:u,locale:p,onAddEmojiButtonClick:h,noSearchResults:_,channelId:f,shouldShowReacjiTriggers:b,isHuddlesEmojiPicker:g}=e,y=d?":cry:":m,A=y&&(0,eT.A)(y)?.name,x=(0,ec.d4)(e=>b?(0,eR.N)(e,{channelId:f,emojiName:A}):void 0),E=y&&!_;return n.createElement("div",null,t&&n.createElement(eS,{activeSkinToneId:i,enableSkinTonePicker:r,onSelected:l,onMouseEnterOrFocus:o,onMouseLeaveOrBlur:s}),E&&n.createElement(EmojiPickerPreview,{showSkinTonePicker:r,activeSkinToneId:i,hasZeroRows:d,emoji:y,locale:p,teamOrEnterpriseId:u,reacjiTriggersForEmoji:x}),a?n.createElement(AddCustomEmojiButton,{onClick:h,isHuddlesEmojiPicker:g}):n.createElement("div",{className:"p-emoji_picker__emoji_deluxe_label"},n.createElement("span",null,eP.t("Emoji Deluxe")),"\u2122"),r&&n.createElement(eA,{activeSkinToneId:i,onSkinToneChanged:c}))};EmojiPickerFooter.displayName="EmojiPickerFooter";let eL=n.memo(EmojiPickerFooter),eO=new y.Ay("emoji_picker"),EmojiPickerInput=e=>{let{onChange:t,onClick:a,placeholder:r,refToForward:i}=e,l=(0,n.useRef)({handle:void 0,status:!1}),o=(0,n.useCallback)(()=>{l.current&&(l.current.status=!0)},[]),s=(0,n.useCallback)(e=>{let a=e.target.value;if(l.current?.handle&&(clearTimeout(l.current.handle),l.current={handle:void 0,status:!!l.current?.status}),l.current?.status&&""===a){let t=window.setTimeout(()=>{l.current={handle:void 0,status:!1},s(e)},0);l.current={handle:t,status:!!l.current?.status};return}t(a)},[t]),c=eO.t("Search all emoji");return n.createElement("div",{className:"p-emoji_picker__input_container"},n.createElement("input",{"aria-label":eO.t("Emoji name",{fallbackHash:"13993d0a97877a11360cdf3fa77e0dc6bb661228"}),ref:i,className:"c-input_text p-emoji_picker__input",type:"text",placeholder:r||c,onChange:s,onCompositionStart:o,onCompositionUpdate:o,onCompositionEnd:o,onClick:a,"data-qa":"emoji_picker_input","data-input-metric-boundary":"emoji_picker"}))};EmojiPickerInput.displayName="EmojiPickerInput";let eD=n.forwardRef((e,t)=>n.createElement(EmojiPickerInput,{refToForward:t,...e})),EmojiPickerStickyHeader=e=>{let{header:t,ariaAttributes:a={}}=e;return n.createElement("div",{className:"p-emoji_picker__sticky_header",id:"emoji-picker-sticky-header"},n.createElement("div",{className:"p-emoji_picker__heading p-emoji_picker__heading--emoji-14-a11y",...a},n.createElement("span",{"aria-hidden":"true"},t||"")))};EmojiPickerStickyHeader.displayName="EmojiPickerStickyHeader";let eF=n.memo(EmojiPickerStickyHeader);var eU=a(0x1226864b1);let ProductivityEmojiFooter=e=>{let{showSkinTonePicker:t,showHandyReactions:a,activeSkinToneId:r,teamOrEnterpriseId:l,locale:o,emoji:s}=e,c=(0,eT.A)(s||""),d=c?c.name:"",m=(0,ec.d4)(eN.wn),u=(0,ec.d4)(e=>(0,ew.bR)({state:e,locale:o,name:d})),p=(0,eU.A)();if(!d||!p[d])return null;let h=t?(0,eI.A)(d,r,l):d,_=p[d].title,f=p[d].description,b=[`:${u}:`].concat(m[d]?m[d].slice(0,3):[]),g=i()("p-emoji_picker__productivity_emoji_preview",`p-emoji_picker__productivity_emoji_preview--${a?"reaction":"message"}`),y=i()("p-emoji_picker__productivity_emoji_img",`p-emoji_picker__productivity_emoji_img--${a?"reaction":"message"}`),A=i()("p-productivity_emoji_content-description",`p-productivity_emoji_content-description--${a?"reaction":"message"}`);return n.createElement("div",{className:g,"data-qa":"productivity_emoji_footer"},n.createElement("span",{className:y,"data-qa":"emoji_preview_img"},n.createElement(ef.Ay,{text:h,emojiSize:ef.lw.MEDIUM,forceDisplay:!0})),n.createElement("div",{className:"p-emoji_picker__productivity_emoji_text"},n.createElement("div",null,n.createElement("span",{className:"p-productivity_emoji_content-title","data-qa":"productivity_emoji_title"},_),n.createElement("span",{className:A,"data-qa":"productivity_emoji_description"},f),a&&n.createElement("div",{className:"p-productivity_emoji_content-aliases-container","data-qa":"productivity_emoji_alias_container"},b.map(e=>n.createElement("span",{className:"p-productivity_emoji_content-aliases",key:e},e))))))};ProductivityEmojiFooter.displayName="ProductivityEmojiFooter";let eB=n.memo(ProductivityEmojiFooter);var eH=a(0x128c3200c),eW=a(0x1db69cda),eV=a(0x20bafd237),eG=a(0x1480e7c40),eq=a(0x9e026186),ej=a(0x130784a23);let ez=new y.Ay("emoji_picker");function getRowsForCustomEmoji(e){return(0,eH.A)(e,ek.$v).map(t=>{let a={emoji_names:e,name:"Custom",omitFromTabs:!1,nameLocalized:ez.t("Custom",{fallbackHash:"081ae3fdc403609cf6e760849ebb14117b7a50cb",fallbackHashNs:"emoji"})};return{type:ej.O.EMOJI,group:a,items:t}})}function addCustomEmojiToScreenRows(e,t){if(!e||!e.length)return t;let a=(0,eW.A)(t)||[],n=[],r=(0,eV.A)(a);if(r?.type==="emoji"){let t=ek.$v-(r.items?r.items.length:0),i=(0,eG.A)(e,t);r.items&&r.items.push(...i);let l=getRowsForCustomEmoji((0,eq.A)(e,e.length-t));n=a.concat(l)}else{let t=getRowsForCustomEmoji(e);n=a.concat(t)}return n}function getFirstGroup(e){return e&&e.length?e[0]:void 0}function getLastGroup(e){return e&&e.length?e[e.length-1]:void 0}function getNextOrPreviousGroup(e,t,a){let n=e&&e.length&&e.findIndex(e=>e.name===t.name);return"next"===a?n>-1&&n<e.length-1?e[n+1]:void 0:n>0?e[n-1]:void 0}let getRowsForGroupAndAriaAttributes=({group:e,skinToneId:t,groupIndex:a,teamOrEnterpriseId:n,enableSkinTonePicker:r})=>{let i={};if(!e)return;let l=(0,eH.A)((0,u.A)(e.emoji_names,e=>r?(0,eI.A)(e,t,n):e),ek.$v).map((t,n)=>({type:ej.O.EMOJI,group:e,items:t,ariaAttributes:{role:"row","aria-rowindex":n+1,id:`group-${a}-row-${n}`}})),o={role:"grid","aria-readonly":!0,"aria-owns":l.map(e=>e.ariaAttributes?.id).join(" "),"aria-label":e.nameLocalized??e.name??""};return l.unshift({type:ej.O.GROUP,group:e,items:[],ariaAttributes:o}),e.name&&(i[e.name]=o),l.unshift({type:ej.O.EMPTY_HEADER_ROW,group:e,items:[],ariaAttributes:{"aria-hidden":!0}}),{rows:l,ariaAttributesByName:i}},getAllRowsAndAriaAttributesForHeaders=({groups:e,skinToneId:t,teamOrEnterpriseId:a,enableSkinTonePicker:n})=>{let r=[],i={};return e.forEach((e,l)=>{let o=getRowsForGroupAndAriaAttributes({group:e,skinToneId:t,groupIndex:l,teamOrEnterpriseId:a,enableSkinTonePicker:n});o&&(r=r.concat(o.rows),i={...i,...o.ariaAttributesByName})}),{rows:r,ariaAttributesByName:i}};var eK=a(0x2bba3a0);function getScrollIndexForGroup(e,t){if(!t)return 0;let a=(0,eK.A)(e,e=>{let a;return!!("group"===e.type&&e.group&&(a=e.group,a&&t&&a.name===t.name))});return a>-1?a:0}var e$=a(0x767d2740),eY=a(0x39dfe4a3),eQ=a(0x20dd77e44),eZ=a(0x1760d7f5a),eJ=a(0x1334bf7f0),eX=a(0x16cafbff4),e0=a(0x17ea0fa2c),e1=a(0x252b73458),e2=a(0x1675f3d68),e4=a(0x11439744b),e5=a(0x16ed1b0dc),e3=a(0x17a48f5bb),e6=a(0x385ce73c),e8=a(0x23e174be6),e7=a(0x9b971e7e),e9=a(0x1ccef1c6f),te=a(0x19c76d181),tt=a(0x1b86f8de5),ta=a(0xa1b56a7c),tn=a(0x3e82fc86),tr=a(0x1c9a3f62b),ti=a(0x1988881a0),tl=a(0xb9604b6),to=a(0xafce781a),ts=a(0xe684f705),tc=a(0x18a17ca8f),td=a(0x1ce35979),tm=a(0x74bbb29a),tu=a(0x19895585a),tp=a(0x9271cc31);let th=new y.Ay("emoji_picker");function getEmojiGroupByName(e,t){return(0,l.A)(e,e=>e.name===t)}let t_=class extends n.Component{static defaultProps={showHandyReactions:!1,onSelected:o.A,onClosed:o.A,onSkinToneChanged:o.A,menuClassName:"",menuContentClassName:"",hideFooter:!1,enableSkinTonePicker:!0,hideTabs:!1,renderAsMenu:!0,hideAddEmojiButton:!1,inputPlaceholder:"",forceHideEmojiPackCTA:!1,focusInputOnMount:!0,searchEmoji:o.A,recordEmojiFrecencyEvent:o.A,fetchAllEmojiCollections:o.A,recordNotificationEvent:o.A,incrementEmojiClickCount:o.A,fetchEmojiWithQuery:o.A,maybeShowProgressiveDisclosureTip:o.A,loadProgressiveDisclosureMegaphoneNotificationData:o.A,onFocus:o.A,onBlur:o.A,prefGifPickerEnabled:!1,isWithinTab:!1,shouldPropagateOnClose:!1};onSearchDebounced;debouncedSrAnnounceResults;onArrowKeyThrottled;seenProductiveEmojisOnMount;prevSelection;_isMounted;_isUnmountingWithoutReacjiSelection;element;list;searchInput;ariaAnnouncerUuid=(0,x.A)();tabPanel;pendingSearchPromise=null;deferredSelection=null;static contextType=v.y;constructor(e,t){super(e,t),(0,f.v)(this,["onEmojiMouseEnter","onEmojiMouseLeave","onMouseWhileUsingKeyboard","onKeyDown","onListScroll","onSearch","onSearcherResult","onGroupTabClick","onSkinToneChanged","triggerSelect","triggerClose","resetSelection","setListRef","setMenuRef","setSearchInputRef","onSearchInputChange","onSearchInputClick","isEmojiSelected","onEmojiButtonTab","setFirstEmojiFocusToGroup","onTab","isCurrentSelectionReacjiTrigger","handleEnterKey"]),this.onSearchDebounced=(0,s.A)(this.onSearch,100,{leading:!0}),this.debouncedSrAnnounceResults=(0,s.A)(this.srAnnounceResults,500),this.onArrowKeyThrottled=(0,c.A)(this.onArrowKey,k.d$),this.seenProductiveEmojisOnMount=!1;const a=getAllRowsAndAriaAttributesForHeaders({groups:e.groups,skinToneId:e.activeSkinToneId,teamOrEnterpriseId:e.teamOrEnterpriseId,enableSkinTonePicker:!!e.enableSkinTonePicker});this.state={currentSelection:void 0,searchQuery:"",scrollToIndex:void 0,activeGroup:getFirstGroup(e.groups),screenRows:a.rows,groupAriaAttributesByName:a.ariaAttributesByName,cursorPosition:k.d6,usingKeyboard:!1,mousePosition:null,marker:void 0,fullyLoaded:!1,searchResults:[],srGeneralAnnouncementNewSearch:!1,isTabPanelView:!1,escapePressed:!1,tabGroup:getFirstGroup(e.groups)?.name??"",prevCursorPosition:k.d6,prevSelection:void 0},this.context.setHighlightFirstSearchResult(!1),this.prevSelection=void 0,this._isMounted=!1,this._isUnmountingWithoutReacjiSelection=!0,this.element=void 0,this.list=void 0,this.searchInput=void 0,this.tabPanel=(0,n.createRef)()}componentDidMount(){let{clogger:e,focusInputOnMount:t,shouldShowReacjiTriggers:a}=this.props;e.track(w.EventId.EMOJI_PICKER_OPENED),this._isMounted=!0,W.LI.start({label:W.gC.EmojiPicker,options:{teamId:this.props.teamOrEnterpriseId,tags:{is_lazy_emoji:!0}}}),a&&W.LI.start({label:W.gC.ReacjiTriggerWorkflowsEmojiPickerSection,options:{teamId:this.props.teamOrEnterpriseId}}),t&&this.searchInput?.focus(),this.state.marker||this.maybeFetchFlannelEmoji({count:1}),this.props.fetchAllEmojiCollections({reason:"emojiPack:dialog"}),this.props.showProgressiveDisclosureReacjiFlag&&this.props.maybeShowProgressiveDisclosureTip({tip:tm.ml.Reacji,tipState:tm.V9.Explainer})}componentDidUpdate(e){if(this.props.activeSkinToneId!==e.activeSkinToneId||this.props.emojiCollections!==e.emojiCollections){this.onSearch(this.state.searchQuery);let e=getAllRowsAndAriaAttributesForHeaders({groups:this.props.groups,skinToneId:this.props.activeSkinToneId,teamOrEnterpriseId:this.props.teamOrEnterpriseId,enableSkinTonePicker:!!this.props.enableSkinTonePicker});this.setState(()=>({activeGroup:getFirstGroup(this.props.groups),screenRows:e.rows,groupAriaAttributesByName:e.ariaAttributesByName}))}}componentWillUnmount(){this._isMounted=!1,this.clogSearcherResults(""),this.props.showProductivityReacji&&this.seenProductiveEmojisOnMount&&(this.seenProductiveEmojisOnMount=!1),this._isUnmountingWithoutReacjiSelection&&this.props.showProgressiveDisclosureReacjiExplainer&&this.props.loadProgressiveDisclosureMegaphoneNotificationData(),W.LI.stop({label:W.gC.EmojiPicker})}onArrowKey(e){if(this.state.screenRows.length<3)return;if(e.target===this.searchInput&&this.state.searchQuery&&(this.state.cursorPosition===k.d6||this.state.cursorPosition===k.B9)){if(e.keyCode===A.LE&&this.searchInput.selectionEnd===this.searchInput.value.length&&document.getSelection()?.type!=="Range");else if(e.keyCode===A.UQ||e.keyCode===A.LE)return}e.preventDefault();let t=!1,a=this.state.cursorPosition||k.d6;e.target===this.searchInput&&(e.key===T.D.DOWN||e.key===T.D.UP||e.keyCode===A.LE||e.keyCode===A.UQ)&&(a=k.d6,t=!0),this.state.escapePressed&&(t=!0);let n=(0,e$.u1)({screenRows:this.state.screenRows,direction:e.keyCode,currentCursor:a,pickerType:k.Zl.EMOJI}),r=n[1];(n[1]<this.state.cursorPosition[1]||2===n[1])&&(r=n[1]-2),this.setState(e=>({cursorPosition:n,currentSelection:(0,e$.tT)(e.screenRows,n),prevSelection:e.currentSelection,prevCursorPosition:e.cursorPosition,scrollToIndex:r+k.A8/2,usingKeyboard:!0,mousePosition:null,srGeneralAnnouncementNewSearch:!1,escapePressed:!1})),this.context.setKeyboardIntoPicker(t),this.context.setHighlightFirstSearchResult(!1),this.context.setHighlightOnMultiPickerEscape(!1)}onEmojiMouseEnter(e,t){this.state.usingKeyboard||this.setState(a=>({currentSelection:e,cursorPosition:[t%ek.$v,Math.floor(t/ek.$v)],prevSelection:a.currentSelection,prevCursorPosition:a.cursorPosition,srGeneralAnnouncementNewSearch:!1}))}isCurrentSelectionReacjiTrigger(){let{reacjiTriggers:e}=this.props,{currentSelection:t}=this.state;if(!t||!e)return!1;let a=t&&(0,eT.A)(t)?.name;return!!a&&e.some(e=>e.emojis.includes(a))}onEmojiMouseLeave(){this.state.usingKeyboard||this.resetSelection()}onGroupTabClick(e){let{groups:t,teamOrEnterpriseId:a,enableSkinTonePicker:n,activeSkinToneId:r,hasKeyboardFocusWithin:i,experimentEmojiPacksInCustomTabGroupOn:l}=this.props,{tabGroup:o}=this.state;if(o===e)return void this.searchInput?.focus();let s=getEmojiGroupByName(t,e);this.clogSearcherResults(""),s?.name==="Custom"&&this.maybeFetchFlannelEmoji();let c=[],d={},m=0,u=!1;if(s&&"Frequently Used"!==s.name){if(l&&"Custom"===s.name){let e=getAllRowsAndAriaAttributesForHeaders({groups:[...t.filter(e=>!0===e.omitFromTabs),s],skinToneId:r,teamOrEnterpriseId:a,enableSkinTonePicker:!!n});c=e.rows,d=e.ariaAttributesByName}else{let e=getRowsForGroupAndAriaAttributes({group:s,skinToneId:r,groupIndex:0,teamOrEnterpriseId:a,enableSkinTonePicker:!!n});c=e?.rows??[],d=e?.ariaAttributesByName??{}}u=!0}else if(this.state.searchQuery||s&&"Frequently Used"===s.name){let e=getAllRowsAndAriaAttributesForHeaders({groups:this.props.groups,skinToneId:this.props.activeSkinToneId,teamOrEnterpriseId:a,enableSkinTonePicker:!!n});c=e.rows,d=e.ariaAttributesByName}else c=this.state.screenRows,d=this.state.groupAriaAttributesByName,m=getScrollIndexForGroup(c,s);let p=!i;this.setState(()=>({activeGroup:s,tabGroup:s?.name??"",scrollToIndex:m,cursorPosition:[0,m+1],searchQuery:"",searchResults:[],screenRows:c,currentSelection:void 0,usingKeyboard:!0,srGeneralAnnouncementNewSearch:!1,groupAriaAttributesByName:d,isTabPanelView:u}),()=>p&&this.searchInput?.focus())}onListScroll({startIndex:e,stopIndex:t}){let{shouldAutoScrollToProductivityEmoji:a,experimentEmojiPacksInCustomTabGroupOn:n}=this.props,{searchQuery:r,isTabPanelView:i,screenRows:l,tabGroup:o,activeGroup:s}=this.state;if(a&&!this.seenProductiveEmojisOnMount){this.seenProductiveEmojisOnMount=!0,this.scrollToProductivityEmojiGroup();return}if(r)return;if(i){if(n){if("Custom"!==o)return}else if(s?.name!=="Custom")return}let c=(0,e$.Vq)(l,e),d=t>=l.length-3;this.state.marker&&(d=t>=l.length-1),c?.group&&(this.setState(()=>({activeGroup:c.group,scrollToIndex:void 0})),d&&this.maybeFetchFlannelEmoji())}mouseOverTabPanel=()=>{this.tabPanel?.current?.contains(document.activeElement)&&this.tabPanel.current.focus()};onMouseWhileUsingKeyboard(e){if(!this.state.usingKeyboard)return;let t=[e.clientX,e.clientY];this.state.mousePosition?(0,d.A)(t,this.state.mousePosition)||(this.setState(()=>({mousePosition:null,usingKeyboard:!1,scrollToIndex:void 0,cursorPosition:k.d6,escapePressed:!1})),this.context.setKeyboardIntoPicker(!1)):this.setState(()=>({mousePosition:t}))}onEmojiButtonTab(e){let{groups:t}=this.props,{screenRows:a,cursorPosition:n,isTabPanelView:r}=this.state;if(r)return void this.resetSelection();let i=(0,e$.Vq)(a,n[1]),l=i?.group,o=e.shiftKey,s=l&&getNextOrPreviousGroup(t,l,o?"previous":"next"),c=getLastGroup(t);if(s&&c&&s?.name===c?.name&&this.maybeFetchFlannelEmoji(),!s)return void this.resetSelection();e.preventDefault();let d=getScrollIndexForGroup(a,s),m=[0,d+1],u=-1*k.A8,p=d+u>1?d+u:d;d=e.shiftKey?p:d+k.A8,this.setState(e=>({scrollToIndex:d,cursorPosition:m,currentSelection:(0,e$.tT)(a,m),prevSelection:e.currentSelection,prevCursorPosition:e.cursorPosition,screenRows:a,usingKeyboard:!0,mousePosition:null})),this.context.setHighlightFirstSearchResult(!1),this.context.setHighlightOnMultiPickerEscape(!1)}setFirstEmojiFocusToGroup(e){let{screenRows:t}=this.state;if(!e)return;let a=getScrollIndexForGroup(t,e),n=[0,a+1];this.setState(e=>({scrollToIndex:a,currentSelection:(0,e$.tT)(t,n),prevSelection:e.currentSelection,usingKeyboard:!0,mousePosition:null,cursorPosition:n,prevCursorPosition:e.cursorPosition})),this.context.setKeyboardIntoPicker(!0),this.context.setHighlightOnMultiPickerEscape(!1),this.context.setHighlightFirstSearchResult(!1)}onEmojiHomeOrEnd(e){let t;if(e.key!==T.D.HOME&&e.key!==T.D.END||!(this.element?.querySelector(".p-emoji_picker__list")).contains(e.target))return;let{screenRows:a,cursorPosition:n}=this.state,r=(0,e$.Vq)(a,n[1]),i=r?.group;if(!i)return;e.preventDefault(),e.stopPropagation();let l=getScrollIndexForGroup(a,i);if(e.key===T.D.HOME&&(t=[0,l+1]),e.key===T.D.END){let e=i.emoji_names.length,a=Math.ceil(e/ek.$v),n=e%ek.$v,r=(n>0?n:ek.$v)-1;l+=a,t=[r,l]}this.setState(e=>({scrollToIndex:l,currentSelection:(0,e$.tT)(a,t),prevSelection:e.currentSelection,usingKeyboard:!0,mousePosition:null,cursorPosition:t,prevCursorPosition:e.cursorPosition}))}onTab(e){let{groups:t}=this.props,{screenRows:a}=this.state,{shiftKey:n,target:r}=e,{activeGroup:i,isTabPanelView:l,searchQuery:o}=this.state,s=this.element?.querySelector(".p-emoji_picker__footer"),c=this.element?.querySelector(".p-emoji_picker__list"),d=this.element.querySelector(".p-emoji_picker__group_tabs"),m=this.searchInput?.contains(r),u=c&&c.contains(r),p=d?.contains(r),h=this.tabPanel.current===document.activeElement,_=getLastGroup(t),f=getFirstGroup(t),b=(0,g.rO)(s);if(!n&&p&&l){e.preventDefault(),this.setFirstEmojiFocusToGroup(i);return}if(!n&&m&&a?.length){e.preventDefault(),this.setFirstEmojiFocusToGroup(o?i:f);return}u||h?this.onEmojiButtonTab(e):n&&b?.length&&b[0]===r&&a?.length&&(e.preventDefault(),this.setFirstEmojiFocusToGroup(l||o?i:_))}handleEnterKey(e){let t=this.searchInput?.value?.replace(/:/g,"").trim()||"";if(this.onSearchDebounced.flush?.(),this.pendingSearchPromise){e.preventDefault(),this.deferredSelection={event:e,targetQuery:t};return}let{currentSelection:a}=this.state;a&&(e.preventDefault(),this.triggerSelect(e,a))}onKeyDown(e){let{currentSelection:t}=this.state;if(!e.currentTarget.contains(e.target))return;let a="Escape"===e.key;a&&(e.preventDefault(),this.triggerClose(e,a));let n=this.element?.querySelector(".p-emoji_picker__footer"),r=n&&n.contains(e.target),i=this.element?.querySelector(".p-emoji_picker__group_tabs"),l=i&&i.contains(e.target),o=this.element?.querySelector(".p-emoji_picker__list"),s=o?.contains(e.target),c=e.target===this.element;if(e.key===T.D.TAB)return void this.onTab(e);if(e.key===T.D.HOME||e.key===T.D.END)return void this.onEmojiHomeOrEnd(e);if((s||c)&&this.searchInput&&(0,eY.U)(e)){this.resetSelection(),this.searchInput.focus();return}!r&&!l&&[A.i7,A.n6,A.UQ,A.LE].includes(e.keyCode)&&this.onArrowKeyThrottled(e),r||l||e.keyCode!==A.Fm||(this.props.experimentEmojiPickerFixStaleSelectionGroupOn?this.handleEnterKey(e):t&&(e.preventDefault(),this.triggerSelect(e,t)))}onSearch(e){let{telemeter:t,groups:a,activeSkinToneId:n,teamOrEnterpriseId:r,enableSkinTonePicker:i,experimentOnlySlackEmojiGroupOn:l}=this.props;if(t.mark("react_emoji_menu_search_mark"),e){let t=e.split(/\s*,\s*/),a=h.S.map(t,e=>this.props.searchEmoji({query:e,options:{entities:{emoji:{matchKeywords:!0}},sort:{source:"emoji-picker",frecency:!0,model:(0,e8.I)()},limit:k.zU,returnMetadata:!0,filter:(0,e3.Il)(r,l)}})).then(t=>{let a=(0,m.A)(t);return this.onSearcherResult(a,e),a});this.pendingSearchPromise=a;return}let o=getAllRowsAndAriaAttributesForHeaders({groups:a,skinToneId:n,teamOrEnterpriseId:r,enableSkinTonePicker:!!i});this.setState((e,t)=>({activeGroup:getFirstGroup(t.groups),cursorPosition:k.d6,prevCursorPosition:e.cursorPosition,searchQuery:"",screenRows:o.rows,groupAriaAttributesByName:o.ariaAttributesByName,currentSelection:void 0,prevSelection:e.currentSelection}),()=>{this.list?.scrollToTop(),t.measureAndClear("react_emoji_menu_search_mark","react_emoji_menu_search")})}onSearchInputChange(e){let{searchQuery:t}=this.state;this.deferredSelection=null;let a=e.replace(/:/g,"").trim();t!==a&&(0===a.length&&this.setState(()=>({searchResults:[]})),this.onSearchDebounced(a))}onSearchInputClick(){this.setState(()=>({cursorPosition:k.d6}))}srAnnounceResults=()=>{let{srGeneralAnnouncementNewSearch:e}=this.state;e||this.setState(()=>({srGeneralAnnouncementNewSearch:!0}))};onSearcherResult(e=[],t){let{activeSkinToneId:a,telemeter:n,teamOrEnterpriseId:r,enableSkinTonePicker:i,experimentEmojiPickerFixStaleSelectionGroupOn:l}=this.props;if(l){if(t!==(this.searchInput?.value?.replace(/:/g,"").trim()||""))return;this.pendingSearchPromise=null}let o=[],s={},c=[];if(e.length>0){c.push({emoji_names:(0,u.A)(e,"emojiBestNameMatchCanonical"),name:"Search results",nameLocalized:th.t("Search results")});let t=getAllRowsAndAriaAttributesForHeaders({groups:c,skinToneId:a,teamOrEnterpriseId:r,enableSkinTonePicker:!!i});o=t.rows,s=t.ariaAttributesByName}let d=(0,e$.hU)(o),m=t&&d?k.B9:k.d6;this.prevSelection=void 0;let p=t&&d&&(0,e$.tT)(o,[0,2])||void 0;this.context.setHighlightFirstSearchResult(!this.context.keyboardIntoPicker),this.context.setHighlightOnMultiPickerEscape(!1),this.setState(a=>({activeGroup:c[0],cursorPosition:m,prevCursorPosition:a.cursorPosition,searchQuery:t,screenRows:o,groupAriaAttributesByName:s,currentSelection:p,prevSelection:a.currentSelection,searchResults:e,isTabPanelView:!1}),()=>{if(this.list?.scrollToTop(),n.measureAndClear("react_emoji_menu_search_mark","react_emoji_menu_search"),this.debouncedSrAnnounceResults(),l&&this.deferredSelection){let{event:e,targetQuery:a}=this.deferredSelection;this.deferredSelection=null,t===a&&p&&this.triggerSelect(e,p)}})}onSkinToneChanged(e){this.props.onSkinToneChanged&&this.props.onSkinToneChanged(e)}setListRef(e){this.list=e}setMenuRef(e){this.element=e}setSearchInputRef(e){this.searchInput=e}maybeFetchFlannelEmoji({count:e}={count:100}){if(this.state.fullyLoaded)return;let{marker:t}=this.state;this.props.fetchEmojiWithQuery&&this.props.fetchEmojiWithQuery({query:{count:e,marker:t}}).then(e=>{if(this._isMounted){let{emoji:t,nextMarker:a}=e||{};this.setState(e=>({marker:a,fullyLoaded:!a,screenRows:addCustomEmojiToScreenRows((t||[]).map(e=>e.name),e.screenRows)}))}})}scrollToProductivityEmojiGroup(){let{groups:e}=this.props,{screenRows:t}=this.state,a=getEmojiGroupByName(e,"Getting Work Done"),n=getScrollIndexForGroup(t,a);this.setState(e=>({activeGroup:a,scrollToIndex:n,cursorPosition:[0,n+1],prevCursorPosition:e.cursorPosition,searchQuery:"",searchResults:[],screenRows:t,currentSelection:void 0,prevSelection:e.currentSelection,usingKeyboard:!0}))}isEmojiSelected(e,t){let{cursorPosition:a,currentSelection:n=""}=this.state;return(0,eQ.y)({selection:e,cursorPosition:a,index:t,numPerRow:ek.$v,currentSelection:n})}clogSearcherResults(e){let t,a,{clogger:n,frequentlyUsedEmojis:r}=this.props,{searchQuery:i,searchResults:l}=this.state,o=!!this.prevSelection,s=!!(i&&l),c=e&&(0,eT.A)(e);if(s){t={source:"emoji-picker",query:i,results:l};let e=c&&t&&t.results&&t.results.find(e=>e.emojiBestNameMatchCanonical===c.name);e?.item?.id?(t.selectedItemId=e.item.id,(0,e0.DC)({clogger:n,data:t})):e||o||(0,e0.Yb)({clogger:n,data:t})}else if(c&&r&&r.includes(c.name)){let e=r.indexOf(c.name);a={query_length:0,results_length:r.length,selected_position:e,selected_type:"emoji",source:"emoji-frequently-used"},n.track(w.EventId.SEARCHER_ACCEPT,a)}}resetSelection(){this.setState(e=>({currentSelection:void 0,prevSelection:e.currentSelection,scrollToIndex:void 0,cursorPosition:k.d6,prevCursorPosition:e.cursorPosition})),this.context.setKeyboardIntoPicker(!1)}triggerClose(e,t){let a={currentSelection:void 0,scrollToIndex:void 0,cursorPosition:k.d6};t||(a.searchResults=[],a.searchQuery="",this._isUnmountingWithoutReacjiSelection=!1),this.setState(()=>a,()=>{this.props?.onClosed?.(e)}),this.props.shouldPropagateOnClose||e.stopPropagation()}triggerSelect(e,t){let{name:a}=(0,eT.A)(t)||{};a&&this.props.recordEmojiFrecencyEvent({emojiName:a,text:this.state.searchQuery}),this.isCurrentSelectionReacjiTrigger()&&this.props.clogger.track(w.EventId.WORKFLOWS_REACJI_TRIGGER,{contexts:{ui_context:{step:w.UiStep.WORKFLOWS_REACJI_TRIGGER_EMOJI_PICKER_EMOJI,action:w.UiAction.CLICK}}}),this.props.shouldAutoScrollToProductivityEmoji&&(this.props.incrementEmojiClickCount(),this.props.recordNotificationEvent({notificationName:K.ze.PRODUCTIVITY_REACJI,action:K.hw.CLICK})),this.props.shouldRecordEmojiClicksForQuickReactions&&this.props.recordNotificationEvent({notificationName:K.ze.QUICK_REACTIONS,action:K.hw.CLICK,step:"reaction"}),this.clogSearcherResults(t),this.prevSelection=e.shiftKey?t:void 0,this.props.onSelected&&this.props.onSelected(e,t,this.state.searchQuery);let n=(0,_.A)(e);e.shiftKey||this.triggerClose(e,n)}onMultiSkinTonePopoverEscape=()=>{this.element?.focus(),this.context.setHighlightOnMultiPickerEscape(!0),this.setState(e=>({currentSelection:e.currentSelection?e.currentSelection:e.prevSelection,cursorPosition:e.currentSelection?e.cursorPosition:e.prevCursorPosition,escapePressed:!0})),this.context.setKeyboardIntoPicker(!0)};searchForGifsWithQuery=()=>{let{noResultsSearchForGifWithQuery:e}=this.props,{searchQuery:t}=this.state;e?.(t)};render(){let e,t,{showCustomBadge:a,showHandyReactions:r,activeSkinToneId:l,showProductivityReacji:o,enableSkinTonePicker:s,inputPlaceholder:c,showProgressiveDisclosureReacjiExplainer:d,menuClassName:m,menuContentClassName:u,hideFooter:h,isClient:_,hideAddEmojiButton:f,canAddEmoji:g,teamOrEnterpriseId:y,locale:A,showAnyEmojiPacksCTA:x,hasKeyboardFocusWithin:C,onFocus:v,onBlur:S,onAddEmojiButtonClick:I,isSPFNonWorkWorkspace:T,className:N,prefGifPickerEnabled:M,isWithinTab:P,channelId:L,shouldShowReacjiTriggers:O,isHuddlesEmojiPicker:D}=this.props,{cursorPosition:F,currentSelection:U,screenRows:B,activeGroup:H,searchQuery:W,searchResults:V,srGeneralAnnouncementNewSearch:G,groupAriaAttributesByName:q,isTabPanelView:j,tabGroup:z}=this.state,K=V?.length,$=!h&&o&&U&&!W&&F!==k.d6&&(0,e$.SJ)(B,F[1]),Q=0===B.length,Z=_&&!f&&g,J=!W&&x,X=i()(N,"p-emoji_picker",m,{"c-menu":this.props.renderAsMenu,"p-emoji_picker--keyboard_mode":this.state.usingKeyboard,"p-emoji_picker--style-v2":M}),ee=i()("p-emoji_picker__list",{"p-emoji_picker__list--with_cta":J}),et=this.searchInput===document.activeElement,ea=this.isCurrentSelectionReacjiTrigger(),en=i()("p-emoji_picker__footer",{"p-emoji_picker__footer--previewing":M?!!U:!!U||Q&&et,"p-emoji_picker__footer--handy-reactions":r,"p-emoji_picker__footer--reacji":ea});o&&(e=r?{"p-emoji_picker__content--reaction-height-with-cta":J,"p-emoji_picker__content--reaction-height-without-cta":!J}:{"p-emoji_picker__content--message-height-with-cta":J,"p-emoji_picker__content--message-height-without-cta":!J});let er=i()("p-emoji_picker__content",e,u),ei=n.createElement("div",{className:ee},Q&&M?n.createElement(EmojiListNoResults,{searchGifsInstead:this.props.noResultsSearchForGifWithQuery?this.searchForGifsWithQuery:void 0}):n.createElement(Y,{screenRows:this.state.screenRows,showAddEmojiButton:Z,searchQuery:W,onSelected:this.triggerSelect,onMouseEnter:this.onEmojiMouseEnter,onMouseLeave:this.onEmojiMouseLeave,onMultiSkinTonePopoverEscape:this.onMultiSkinTonePopoverEscape,scrollToIndex:this.state.scrollToIndex,onScroll:this.onListScroll,isEmojiSelected:this.isEmojiSelected,cursorPosition:this.state.cursorPosition,showProductivityReacji:o,groups:this.props.groups,ref:this.setListRef,activeGroupName:H?.name??"",pickerHasKeyboardFocusWithin:C,onAddEmojiButtonClick:I})),el="";if(G&&W?.length){let e=!K||isNaN(K)?0:K;el=th.t("{numberOfSearchResults, plural, =1 {# result} other {# results}}",{numberOfSearchResults:e})}G&&!W?.length&&(el=th.t("Seeing all results"));let eo=!this.props.hideTabs;t=M?H&&!Q?H?.nameLocalized:"":H&&!Q?H?.nameLocalized:th.t("No Results");let es=P?void 0:th.t("Emoji picker");return n.createElement("div",{"aria-label":es,role:P?void 0:"dialog",className:X,"data-using-keyboard":this.state.usingKeyboard,onMouseMove:this.onMouseWhileUsingKeyboard,ref:this.setMenuRef,"data-qa":"emoji-picker",onKeyDown:this.onKeyDown,onFocus:v,onBlur:S},d?n.createElement(eZ.A,{tip:tm.ml.Reacji,isSPFNonWorkWorkspace:T}):null,n.createElement("div",{className:er},eo&&n.createElement(R,{groups:this.props.groups||b.Ml,showCustomBadge:a,onGroupTabClick:this.onGroupTabClick,tabGroupName:z||""}),!j&&n.createElement(eD,{ref:this.setSearchInputRef,onChange:this.onSearchInputChange,onClick:this.onSearchInputClick,placeholder:c||""}),J&&n.createElement(EmojiPackCta,{groups:this.props.groups,jumpToGroup:this.onGroupTabClick}),n.createElement("div",{className:"p-emoji_picker__list_container",onMouseMove:this.mouseOverTabPanel,ref:this.tabPanel,role:"tabpanel",tabIndex:-1,"aria-labelledby":makeEmojiTabId({name:z??""})},n.createElement(E.A,{message:el,uuid:this.ariaAnnouncerUuid,assertive:!0}),n.createElement(eF,{header:t,ariaAttributes:q[H?.name??""]}),o?n.createElement(p.A,{eventId:w.EventId.EDUCATION_PRODUCTIVITY_REACJI,uiStep:w.UiStep.PRODUCTIVITY_REACJI,clogImpression:!0},ei):ei)),!h&&n.createElement("div",{className:en,"data-qa":"emoji_picker__footer"},!$&&n.createElement(eL,{showHandyReactions:!!r,showAddEmojiButton:Z,activeSkinToneId:l,showSkinTonePicker:!!s,onEmojiSelected:this.triggerSelect,onEmojiMouseEnter:this.onEmojiMouseEnter,onEmojiMouseLeave:this.onEmojiMouseLeave,onSkinToneChanged:this.onSkinToneChanged,hasZeroRows:0===this.state.screenRows.length,currentEmojiSelection:U||"",teamOrEnterpriseId:y,locale:A,onAddEmojiButtonClick:I,noSearchResults:Q,channelId:L,shouldShowReacjiTriggers:O,isHuddlesEmojiPicker:D}),o&&$&&n.createElement(eB,{showSkinTonePicker:!!s,showHandyReactions:!!r,activeSkinToneId:l,teamOrEnterpriseId:y,locale:A,emoji:U})))}};function emoji_picker_mapStateToProps(e,{forceHideEmojiPackCTA:t,shouldShowReacjiTriggers:a,passedChannelId:n}){let r=(0,e7.JY)(e),i=(0,tp.e6)(e),l=(0,tp.F8)(e,{tab:i,container:tu.mq.Primary})?.id,o=n||((0,e5.A)(l)?l:void 0),s=o&&a?(0,eR.Q)(e,{channelId:o}):void 0,c=(0,tr.tZ)(e,{channelId:o,shouldShowReacjiTriggers:a}),d=(0,tl.Hp)(e,K.xu.EMOJI_DRAWER),m=(0,tl.OL)(e,K.xu.EMOJI_DRAWER),u=d===K.ze.PRODUCTIVITY_REACJI,p=(0,ed.Ur)(e),h=u&&m.autoscrollToProductivity&&p<ek.V3,_=(0,tl.OL)(e,K.xu.QUICK_REACTIONS),f=(0,tl.Hp)(e,K.xu.QUICK_REACTIONS)===K.ze.QUICK_REACTIONS&&_.sendClickDataForReactions;return{activeSkinToneId:(0,e9.ty)(e,"preferred_skin_tone")||"",canAddEmoji:(0,e2.D)(e),isClient:(0,te.TZ)(e),clogger:(0,V.eo)({state:e}),emojiCollections:(0,ed.uI)(e),groups:c||b.Ml,teamOrEnterpriseId:r||"",locale:(0,G.Yp)({teamOrEnterpriseId:r||"",recalc:!1}),telemeter:(0,e4.Cy)({state:e}),showCustomBadge:(0,ed.pG)(e),showProductivityReacji:u,shouldRecordEmojiClicksForQuickReactions:f,shouldAutoScrollToProductivityEmoji:h,showAnyEmojiPacksCTA:!t&&((0,tn.o)(e)||!!(c&&(0,tn.B)(e,c))),showProgressiveDisclosureReacjiFlag:(0,tc.jv)(e,{tip:tm.ml.Reacji}),showProgressiveDisclosureReacjiExplainer:(0,tc.Wg)(e,{tip:tm.ml.Reacji}),isSPFNonWorkWorkspace:(0,eJ.R)(e),prefGifPickerEnabled:(0,ti.BH)(e),frequentlyUsedEmojis:(0,tr.H_)(e),currentMember:(0,ts.cA)(e),consolidatedEmojis:(0,eN.Gt)(e),experimentOnlySlackEmojiGroupOn:"on"===(0,em._Z)(e,"only_slack_emoji"),reacjiTriggers:s,channelId:o,experimentEmojiPickerFixStaleSelectionGroupOn:"on"===(0,em._Z)(e,"emoji_picker_fix_stale_selection"),experimentEmojiPacksInCustomTabGroupOn:"on"===(0,em._Z)(e,"emoji_packs_in_custom_tab")}}t_.displayName="EmojiPicker";let emoji_picker_mapDispatchToProps=e=>({searchEmoji:t=>e((0,e0.$P)(t)),recordEmojiFrecencyEvent:t=>e((0,e6.v)(t)),fetchAllEmojiCollections:t=>e((0,ta.H)(t)),recordNotificationEvent:t=>e((0,z.A)(t)),incrementEmojiClickCount:()=>e((0,tt.j_)()),fetchEmojiWithQuery:t=>e((0,eX.l8)(t)),maybeShowProgressiveDisclosureTip:t=>e((0,td.$)(t)),loadProgressiveDisclosureMegaphoneNotificationData:()=>e((0,to.iR)({event:{type:K.jo.REQUEST_SPACES,spaces:[K.xu.PROGRESSIVE_DISCLOSURE]}}))}),EmojiPickerWithContextProvider=e=>{let{showHandyReactions:t,enableSkinTonePicker:a=!0}=e;return n.createElement(v.L,{showHandyReactions:!!t,enableSkinTonePicker:!!a},n.createElement(t_,e))};EmojiPickerWithContextProvider.displayName="EmojiPickerWithContextProvider";let tf=(0,C.A)(EmojiPickerWithContextProvider),tb=(0,q.N)(emoji_picker_mapStateToProps,emoji_picker_mapDispatchToProps)(tf),tg=(0,q.N)(emoji_picker_mapStateToProps,emoji_picker_mapDispatchToProps)((0,e1.m)(tf,{name:"EmojiPicker"}))},0x65a0a57d:(e,t,a)=>{"use strict";a.d(t,{g:()=>f});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x344bb842),c=a(0x2501a2cee),d=a(0x4c96e5d9),m=a(0x1ccef1c6f),u=a(0x226892387),p=a(0x3c749200),h=a(0x1988881a0);let _=new o.Ay("emoji_button"),f=(0,n.forwardRef)(({enableEmojiButtonBadge:e=!1,enableGifPicker:t=!1,onClick:a=l.A,emojiButtonRef:r,disabled:o},f)=>{let b=(0,u.d4)(p._o),g=(0,u.d4)(e=>(0,m.ty)(e,"preferred_skin_tone"))||"",y=(0,u.d4)(h.BH),A=`skin-tone-${g}`,x=i()(`c-wysiwyg_container__button c-wysiwyg_container__button--emoji ${A}`,{"c-wysiwyg_container__button--with_badge":e&&b}),E=y&&t?_.t("Add emoji and GIFs"):_.t("Emoji");return n.createElement(d.Ay,{tip:E,position:"top",offsetY:-7,delay:500,zIndex:"above_fs",ref:f},n.createElement(s.A,{ref:r,className:x,onClick:a,"data-qa":"emoji_toolbar_button",tabIndex:-1,"aria-label":_.t("Emoji"),size:"small","aria-disabled":o},n.createElement("div",{className:"is-first"},n.createElement(c.Ah,{name:"emoji",size:"18"})),n.createElement("div",{className:"is-second"},n.createElement(c.Ah,{name:"emoji-filled",size:"18"}))))})},0x5da5726:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>r,tN:()=>n.tN});var n=a(0xc527df57);let r=n.Ay},0x301566e3:(e,t,a)=>{"use strict";a.d(t,{A:()=>$});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x7d48dd65),l=a(0x6aeae8a3),o=a(0x159e881e7),s=a(0x120c268ad),c=a.n(s),d=a(0x1cbdfeceb),m=a(0x20482ad21),u=a(0x210cf696f),p=a(0x4c96e5d9),h=a(0x1b3ecb90f),_=a(0x1226864b1),f=a(0x1a0bfaf78),b=a(0x1829a8d43);let g=new m.Ay("emoji_button"),y=/:/g,EmojiListEmojiButton=({emoji:e,dataQa:t,className:a,onClick:r,onMouseEnter:i=d.A,onMouseLeave:l=d.A,isDisabled:s=!1,emojiSize:m=h.lw.MEDIUM,dataColorIndex:A,isSelected:x,autoClogProps:E={},localizedEmoji:C,isProductivityEmojiGroup:k=!1,refToForward:v,itemIndex:S=0,isMultiSkintoneCapable:I=!1,usingKeyboard:w,onContextMenu:T=d.A})=>{let N=(0,n.useRef)(null);(0,n.useImperativeHandle)(v,()=>N.current);let{highlightFirstSearchResult:M,highlightOnMultiPickerEscape:R,showHandyReactions:P,keyboardIntoPicker:L}=(0,n.useContext)(o.y),[O,D]=(0,n.useState)(!1),F=e?`emoji-picker-${e.replace(y,"")}`:void 0,U=t||"emoji_list_item",B=(0,f.A)(C),H=(0,b.A)(e)?.name||"",W=(0,_.A)();k&&(B=W[H]?W[H].description:B,U="emoji_list_productivity_item");let V=(0,n.useMemo)(()=>{if(k&&W[H])return{elementName:`emoji_picker_${P?"reaction":"message"}_emoji--${H}`,onClick:{enableClogAction:!0},...E}},[k,W,H,P,E]);(0,n.useEffect)(()=>{x&&(L||w)&&(L||!O)&&!M?N?.current?.focus():document.activeElement===N.current&&O&&N?.current?.blur(),!x&&O&&D(!1)},[N,x,w,O,M,L]);let G=(0,n.useCallback)(e=>{D(!0),i(e)},[i]),q=(0,n.useCallback)(e=>{D(!1),l(e)},[l]),j=(0,n.useCallback)(t=>{r(t,e)},[r,e]),z=(0,n.useCallback)(e=>{I&&(e.preventDefault(),e.stopPropagation(),T(e))},[I,T]),K=(M||R)&&x,$=(0,n.useMemo)(()=>c()(a,"p-emoji_picker__list_item",{"p-emoji_picker__list_item--a11y-not-selected":!x,key_selection:K}),[a,x,K]),Y=n.createElement(u.A,{role:"gridcell","aria-colindex":S+1,ref:N,id:F,onClick:j,onContextMenu:z,onMouseEnter:G,onMouseLeave:q,className:$,"data-color-index":A,"data-name":e,"data-qa":U,tabIndex:x?0:-1,autoClogProps:V,disabled:s},n.createElement(h.Ay,{text:e,emojiSize:m,forceDisplay:!0,ariaLabel:"",alt:B}));return I?n.createElement(p.Ay,{tip:g.rt("Right click to<br></br>customize skin tones"),position:"top",delay:500,zIndex:"above_fs"},Y):Y};EmojiListEmojiButton.displayName="EmojiListEmojiButton";let A=n.forwardRef((e,t)=>n.createElement(EmojiListEmojiButton,{...e,refToForward:t}));var x=a(0xbe5e39b6),E=a(0x40c0d834),C=a(0x35514c28),k=a(0xa5dbe09b),v=a(0x1d2cd7755),S=a(0x139c79d16),I=a(0x16dc93e4b),w=a(0x1d06c44fe),T=a(0x223ac29bb),N=a(0x1c91944c9),M=a(0x9b971e7e),R=a(0x1e4ae349d),P=a(0x3384beeb),L=a(0x55505846);let MaskedEmoji=({url:e,emojiSize:t=P.lw.MEDIUM,displayText:a,alt:r})=>{let[i,l]=(0,n.useState)(!1),[o,s]=(0,n.useState)(!1),c=(0,n.useCallback)(()=>{l(!0)},[]),d=(0,n.useCallback)(()=>{s(!0)},[]);return e?n.createElement(n.Fragment,null,!i&&n.createElement("div",{className:`c-emoji  c-emoji__${t} c-emoji__loading`}),n.createElement("img",{className:`c-emoji  c-emoji__${t}`,src:o?L:e,alt:r??a,onLoad:c,onError:d})):null};MaskedEmoji.displayName="MaskedEmoji";let O=(0,N.N)((e,t)=>{let{emojiSkinToneIdLeft:a="",emojiSkinToneIdRight:n="",emojiSize:r=P.lw.MEDIUM,text:i}=t,l=(0,I.w)(e,{forceDisplay:!0}),o=(0,M.ZT)(e)||"",s=(0,T.Yp)({teamOrEnterpriseId:o,recalc:!1}),c=(0,w.bR)({state:e,locale:s,name:i});return{url:(0,R.Jk)(e,{text:i,teamId:o,emojiMode:l,emojiSize:r,emojiSkinToneIdLeft:a,emojiSkinToneIdRight:n})||"",displayText:c||""}})(MaskedEmoji),MultiSkinToneEmojiPopoverItem=({baseEmojiName:e,emojiSkinToneIdLeft:t="",emojiSkinToneIdRight:a="",key:r,value:i,refToForward:l=null,name:o,hasKeyboardFocus:s,ariaLabel:d="",onChange:m,isSelected:u,dataQa:p=""})=>{let h=(0,n.useRef)(null);return(0,n.useImperativeHandle)(l,()=>({focus:()=>{h?.current?.focus()}})),n.createElement(v.A,{className:"p-emoji_multi_skintone_popover_emoji__label_wrapper",text:n.createElement("div",{className:c()("p-emoji_multi_skintone_popover__emoji",{"p-emoji_multi_skintone_popover__emoji--selected":u,"p-emoji_multi_skintone_popover__emoji--focus-visible":s})},n.createElement(O,{text:e,emojiSkinToneIdLeft:t,emojiSkinToneIdRight:a,alt:d})),htmlFor:r,type:"inline",cursor:"pointer",dataQaLabel:p},n.createElement(S.A,{ref:h,id:r,name:o,className:"p-emoji_multi_skintone_popover__radio_button",value:i,checked:u,onChange:m}))};MultiSkinToneEmojiPopoverItem.displayName="MultiSkinToneEmojiPopoverItem";let D=n.forwardRef((e,t)=>n.createElement(MultiSkinToneEmojiPopoverItem,{refToForward:t,...e}));var F=a(0xe11e5830),U=a(0x6f38ac62);let B=new m.Ay("emoji_picker");function getRadioButtonAriaLabel(e,t,a){return B.t("{baseEmojiLocalized} {side} {skinToneId}",{skinToneId:(0,U.A)(e),baseEmojiLocalized:t,side:a})}function getEmojiButtonAriaLabel(e,t,a,n){return e||t?e&&!t?getRadioButtonAriaLabel(e,a,"left"):t&&!e?getRadioButtonAriaLabel(t,a,"right"):(0,f.A)(n,!0):B.t("Select skin tones for the emoji")}var H=a(0x3711e82d);let W=new m.Ay("emoji_picker"),V=["Tab","F6","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function isKeyboardNavEvent(e){return"string"==typeof e.key&&V.includes(e.key)}let MultiSkintoneEmojiPopover=({emoji:e,popoverProps:t,onClick:a})=>{let i=(0,T.Yp)(),o=(0,r.wA)(),s=(0,n.useRef)(null),[d,m]=(0,n.useState)(""),[p,_]=(0,n.useState)(""),[f,g]=(0,n.useState)(t?.openedWithKeyboard||!1),[y,A]=(0,n.useState)(!1),v=(0,b.A)(e)?.name||"",S=!d||!p,I=d&&p?(0,F.A)(v,d,p):v,N=o((0,w.N7)({locale:i,name:I})),M=o((0,w.N7)({locale:i,name:v})),R=(0,n.useMemo)(()=>getEmojiButtonAriaLabel(d,p,M||"",N||""),[M,d,p,N]),L=(0,n.useCallback)((e,t,a)=>("top"===e||"bottom"===e)&&a&&t?{left:t.left+t.width/2-a.left,right:"initial"}:{},[]),onFocus=e=>{let{target:t,currentTarget:a}=e,{parentElement:n}=a;n?.contains(t)&&A(!0)},onBlur=e=>{let{currentTarget:t,relatedTarget:a}=e,{parentElement:n}=t;!n?.contains(a)&&(A(!1),g(!1),a?.matches(".c-popover__content")&&a.contains(t)&&s.current?.focus())},onKeyDown=e=>{"Tab"===e.key&&e.stopPropagation(),isKeyboardNavEvent(e)&&g(!0)},onMouseMove=e=>{e.stopPropagation()},onMouseDown=()=>{g(!1)},setLeftRadioButton=e=>{m(e.target.value)},setRightRadioButton=e=>{_(e.target.value)},U=(0,n.useCallback)(e=>{S||a(e,I)},[S,a,I]),B=(0,n.useCallback)(()=>{s.current?.focus()},[]),V=(0,n.useMemo)(()=>({elementName:I,onClick:{enableClogAction:!0}}),[I]);return n.createElement(l.AM,{...t,key:"emoji-popover-with-pointer",position:x.yX.Top,tryOppositePosition:!0,ariaRole:"dialog",ariaLabel:W.t("Multi Skin Tone Emoji Picker"),onOpen:B,offsetY:(t.offsetY||0)-5},({position:t,top:a,left:r,targetBounds:i})=>n.createElement(E.A,{eventId:H.EventId.EMOJI_PICKER_SKIN_TONE_MENU_OPENED,uiComponentName:H.UiComponentName.EMOJI_MULTI_SKIN_TONE_PICKER,uiStep:H.UiStep.MULTI_SKIN_TONE_EMOJI_PICKER_OPENED,clogImpression:!0},n.createElement(C.K,{hasKeyboardFocusWithin:y},n.createElement("div",{key:"emoji-multi-tone-picker","data-qa":"emoji-multi-tone-picker",role:"presentation",className:"p-emoji_multi_skintone_popover__container",onKeyDown:onKeyDown,onMouseMove:onMouseMove,onMouseDown:onMouseDown,onFocus:onFocus,onBlur:onBlur},n.createElement(k.A,{className:"p-emoji_multi_skintone_popover__row","aria-label":W.t("Left skin tone modifier")},P.OP.map((t,a)=>n.createElement(D,{ref:0===a?s:null,name:"left-emoji-skin-tones",dataQa:"left-emoji-skin-tone",key:`left-${e}-${t}`,baseEmojiName:v,emojiSkinToneIdLeft:t,isSelected:d===t,value:t,hasKeyboardFocus:f,ariaLabel:getRadioButtonAriaLabel(t,M||"","left"),onChange:setLeftRadioButton}))),n.createElement(k.A,{className:"p-emoji_multi_skintone_popover__row","aria-label":W.t("Right skin tone modifier")},P.OP.map(t=>n.createElement(D,{name:"right-emoji-skin-tones",dataQa:"right-emoji-skin-tone",key:`right-${e}-${t}`,baseEmojiName:v,emojiSkinToneIdRight:t,isSelected:p===t,value:t,hasKeyboardFocus:f,ariaLabel:getRadioButtonAriaLabel(t,M||"","right"),onChange:setRightRadioButton}))),n.createElement("div",{className:"p-emoji_multi_skintone_popover__row p-emoji_multi_skintone_popover__row--last_row"},n.createElement(E.A,{eventId:H.EventId.EMOJI_PICKER_SKIN_TONE_MENU_SELECTED,uiStep:H.UiStep.MULTI_SKIN_TONE_EMOJI_SELECTED},n.createElement(u.A,{className:c()("p-emoji_multi_skintone_popover__button",{"p-emoji_multi_skintone_popover__button--highlight":d&&p}),onClick:U,"aria-disabled":S,autoClogProps:V},n.createElement(O,{text:I,emojiSkinToneIdLeft:d,emojiSkinToneIdRight:p,emojiSize:h.lw.LARGER,alt:R}))))),n.createElement("div",{className:c()("p-emoji_multi_skintone_popover__pointer",`p-emoji_multi_skintone_popover__pointer--${t}`),style:L(t,i,{top:a,left:r})}))))};MultiSkintoneEmojiPopover.displayName="MultiSkintoneEmojiPopover";var G=a(0xdafb3627),q=a(0x46947d88);let EmojiListEmojiItem=e=>{let{emoji:t,localizedEmoji:a,index:r,emojiIndex:i,isSelected:s,isProductivityEmojiGroup:c,onMouseEnter:d,onMouseLeave:m,onEmojiClick:u,isMultiSkintone:p,itemIndex:h=0,usingKeyboard:_,onMultiSkinTonePopoverEscape:f}=e,{enableSkinTonePicker:b}=(0,n.useContext)(o.y),g=(0,n.useCallback)((e,t)=>{e.preventDefault(),u(e,t)},[u]),y=(0,n.useCallback)(()=>{d(t,r)},[t,r,d]),x=(0,n.useCallback)(()=>{m(t)},[t,m]),renderEmojiMultiSkinTonePopover=e=>n.createElement(MultiSkintoneEmojiPopover,{popoverProps:e,emoji:t,onClick:g});renderEmojiMultiSkinTonePopover.displayName="renderEmojiMultiSkinTonePopover";let E=(0,n.useCallback)(e=>{p&&e.key===q.D.ESCAPE&&f()},[p,f]),C=n.createElement(A,{key:`${t}_${i}`,emoji:t,localizedEmoji:a,onClick:g,onMouseEnter:y,onMouseLeave:x,isSelected:s,isProductivityEmojiGroup:c,dataColorIndex:r%G.dX,itemIndex:h,usingKeyboard:_,isMultiSkintoneCapable:p&&b});return p&&b?n.createElement(l.Wv,{renderPopover:renderEmojiMultiSkinTonePopover,isContextMenu:!0,shouldSetTargetBoundsForContextMenu:!1,offsetY:window.pageYOffset,onClose:E},C):C};EmojiListEmojiItem.displayName="EmojiListEmojiItem";let j=(0,N.N)((e,t)=>{let{emoji:a}=t,n=(0,M.ZT)(e)||"";return{isMultiSkintone:!!(0,R.pA)(e,{text:a,teamId:n})}})(n.memo(EmojiListEmojiItem)),EmojiListGroupItem=e=>{let{emojiGroup:t,colSpan:a}=e;if(!t)return null;let r=t.name.replace(/ /g,"_");return n.createElement("span",{role:"columnheader","aria-colspan":a,className:"p-emoji_picker__heading p-emoji_picker__heading--emoji-14-no-bg","data-qa":`${r}_header`},t.nameLocalized)};EmojiListGroupItem.displayName="EmojiListGroupItem";let z=n.memo(EmojiListGroupItem);var K=a(0x130784a23);let EmojiListRow=e=>{let{screenRows:t,index:a,style:l,showProductivityReacji:o,onEmojiClick:s,onMouseEnter:c,onMouseLeave:d,isEmojiSelected:m,usingKeyboard:u,locale:p,activeGroupName:h,onMultiSkinTonePopoverEscape:_}=e,f=(0,r.wA)();if(!t||0===a)return null;let b=t[a];if(!b)return null;let{group:g,type:y,items:A}=b,x=b.ariaAttributes;if("group"===y&&g?.name!==h)return n.createElement("div",{className:"p-emoji_picker__row",style:l,...x},n.createElement(z,{emojiGroup:g}));if("group"===y&&g?.name===h)return n.createElement("div",{className:"p-emoji_picker__row",style:l,"aria-hidden":"true"},n.createElement(z,{emojiGroup:g}));if("empty-header-row"===y)return n.createElement("div",{className:"p-emoji_picker__row",style:l,...x},n.createElement("div",null));let E=A&&A.map((e,r)=>{let l=a*G.$v+r,h=m(e,l),g=(a>0?(0,i.A)(t.slice(0,a),{type:K.O.EMOJI}).reduce((e,t)=>e+(t.items||[]).length,0):0)+r+1,y=f((0,w.N7)({locale:p,name:e}));return n.createElement(j,{key:`${e}_${g}`,emoji:e,localizedEmoji:y||"",index:l,emojiIndex:g,isSelected:h,isProductivityEmojiGroup:o&&b.group?.name==="Getting Work Done",onEmojiClick:s,onMouseEnter:c,onMouseLeave:d,itemIndex:r,usingKeyboard:u,onMultiSkinTonePopoverEscape:_})});return E?n.createElement("div",{className:"p-emoji_picker__row",style:l,...x},E):null};EmojiListRow.displayName="EmojiListRow";let $=EmojiListRow},0x1226864b1:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});let n=new(a(0x20482ad21)).Ay("productivity_emojis"),__WEBPACK_DEFAULT_EXPORT__=()=>({white_check_mark:{description:n.t('Let others know this task is done with a "{emoji}"',{emoji:n.t("white check mark")}),title:n.t("Completed")},eyes:{description:n.t('Let others know you\u2019re looking into this with "{emoji}"',{emoji:n.t("eyes")}),title:n.t("Taking a look")},raised_hands:{description:n.t('Say good job to someone with "{emoji}"',{emoji:n.t("raised hands")}),title:n.t("Nicely done")},pray:{description:n.t('Show your gratitude with "{emoji}"',{emoji:n.t("pray")}),title:n.t("Thank you")},heavy_plus_sign:{description:n.t('Show you agree with "{emoji}"',{emoji:n.t("heavy plus sign")}),title:n.t("I agree")},clap:{description:n.t('Give a round of applause with "{emoji}"',{emoji:n.t("clap")}),title:n.t("Round of applause")},bulb:{description:n.t('Show you think this is a good idea with "{emoji}"',{emoji:n.t("bulb")}),title:n.t("Great idea")},dart:{description:n.t('Let others know they\u2019re on the right track with "{emoji}"',{emoji:n.t("dart")}),title:n.t("Exactly")},wave:{description:n.t('Say hello with "{emoji}"',{emoji:n.t("wave")}),title:n.t("Hello")},thumbsup:{description:n.t('Express your approval with a "{emoji}"',{emoji:n.t("thumbs up")}),title:n.t("Sounds good")},tada:{description:n.t('Celebrate great work or news with "{emoji}"',{emoji:n.t("tada")}),title:n.t("Celebrate")},one:{description:n.t("Vote for option 1"),title:n.t("Option 1")},two:{description:n.t("Vote for option 2"),title:n.t("Option 2")},three:{description:n.t("Vote for option 3"),title:n.t("Option 3")},mega:{description:n.t('When sharing an important message, use "{emoji}"',{emoji:n.t("mega")}),title:n.t("Announcement")},white_circle:{description:n.t("White circle indicates low importance"),title:n.t("Low priority request")},large_blue_circle:{description:n.t("Blue circle indicates medium importance"),title:n.t("Medium priority request")},red_circle:{description:n.t("Red circle indicates high importance"),title:n.t("Urgent request")}})},0x24c3c7b0:(e,t,a)=>{"use strict";a.d(t,{P:()=>V});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x162afc153),c=a(0x2286acf6c),d=a(0x18082cf3c),m=a(0x16aa90253),u=a(0x130d89881),p=a(0x1229d92d),h=a(0x40c0d834),_=a(0x20482ad21),f=a(0x224f7f0e9),b=a(0x12edaa96a),g=a(0x10598eeca),y=a(0x2431e9bcb),A=a(0x11a296110),x=a(0x3ccc8c8e),E=a(0x3711e82d),C=a(0x1ccef1c6f),k=a(0x226892387);let v=new _.Ay("gif-picker"),GifListItem=({gifClickCallback:e,url:t,id:a,isSelected:n,previewUrl:i,name:l,width:o,height:s,bytes:c,previewBytes:d,isSearchResults:m})=>{let u=(0,k.d4)(e=>!(0,C.ty)(e,"a11y_animations")),[p,h]=(0,r.useState)(-1),_=(0,r.useCallback)(a=>{a.stopPropagation(),e(a,{previewUrl:i,name:l,width:o,height:s,bytes:c,previewBytes:d,originalGifUrl:t})},[e,i,l,o,s,c,d,t]),f=(0,r.useRef)(null),b=v.t("Play or Pause {gifName}",{gifName:l});(0,r.useEffect)(()=>{n?(f?.current?.focus(),h(0)):h(-1)},[n,u]);let g=(0,r.useMemo)(()=>({eventId:E.EventId.GIFS_SELECTED,onClick:{enableClogAction:!0},uiStep:m?E.UiStep.GIFS_PICKER_SEARCH_RESULTS:E.UiStep.GIFS_PICKER_TRENDING}),[m]),y=r.createElement("span",{className:"sr-only"},l);return u?r.createElement(x.A,{src:i,animatedSrc:t,title:b,containerClassname:"p-gif_picker__row_item p-gif_picker__row_item--disable-animations",tabIndex:p,onlyEnablePlayPauseButton:!0},({source:e})=>r.createElement(A.Nm,{role:"gridcell",className:"p-gif_picker__row_item_button",onClick:_,tabIndex:p,key:a,ref:f,autoClogProps:g},y,r.createElement("div",{className:"p-gif_picker__row_item_preview",style:{backgroundImage:`url(${e})`},"data-item-key":a}))):r.createElement(A.Nm,{role:"gridcell",className:"p-gif_picker__row_item",onClick:_,key:a,tabIndex:-1,ref:f,autoClogProps:g},y,r.createElement("div",{className:"p-gif_picker__row_item_preview",style:{backgroundImage:`url(${t})`},"data-item-key":a}))};GifListItem.displayName="GifListItem";let GifListItemLoadingState=()=>r.createElement("div",{role:"gridcell",className:"p-gif_picker__row_item p-gif_picker__row_item--loading-state","data-qa":"gif-picker-loading-state"}),GifListRow=({index:e,style:t,row:a,gifResultsMap:n,isGifSelected:i,onGifSelected:l,isSearchResults:o})=>{let s=(0,r.useCallback)(({row:{items:t}={items:[]}})=>{if(t)return t.map((t,a)=>{let{loading:s,id:c,content_description:d,media_formats:{tinygif:{url:m,dims:u,size:p}={url:"",dims:[],size:0},tinygifpreview:{url:h,size:_}={url:"",size:0}}={}}=n[t]||{},f=e*y.uE+a,b=i({gif:c,index:f});return s?r.createElement(GifListItemLoadingState,{key:c}):r.createElement(GifListItem,{key:c,id:c,url:m,previewUrl:h,name:d,width:u[0],height:u[1],bytes:p,previewBytes:_,gifClickCallback:l,isSelected:b,index:f,isSearchResults:o})})},[n,i,e,l,o]);return r.createElement("div",{className:"p-gif_picker__row",style:t},s({row:a}))};GifListRow.displayName="GifListRow";var S=((n={}).CLEAR_SEARCH="gif-picker-clear-search",n.NO_RESULTS="gif-picker-no-results",n),I=a(0x19ab18890);let w=new _.Ay("gif-picker"),T=(0,r.memo)(({clearSearchResults:e})=>r.createElement("div",{className:"p-gif_picker__no_results","data-qa":S.NO_RESULTS},r.createElement(I.Ay,{text:"face_with_monocle",showTooltip:!1}),r.createElement("div",null,r.createElement("h2",{className:"p-gif_picker__no_results__header"},w.t("No GIFs to show")),r.createElement("p",{className:"p-gif_picker__no_results__subtext"},w.t("You\u2019ve stumped the GIF search. Impressive."))),e?r.createElement(A.Ay,{"data-qa":S.CLEAR_SEARCH,type:"outline",onClick:e},w.t("Clear Search")):null));var N=a(0x130784a23),M=a(0x767d2740),R=a(0x39dfe4a3),P=a(0x20dd77e44),L=a(0x212955d3e),O=a(0x1f86b0b00),D=a(0x51b81145),F=a(0x242503693),U=a(0x8335e26c),B=a(0xb728fb29);let H=new _.Ay("gif-picker"),processGifsIntoMap=({gifs:e,previousMap:t={}})=>{let a={...t};return e.reduce((e,t)=>(e[t.id]=t,e),a)},W=processGifsIntoMap({gifs:Array(30).fill(0).map(()=>({id:(0,b.A)(),loading:!0}))}),V=(0,p.A)(({adjustGifPickerHeightToAccommodateEmojiPicker:e,emojiSearchQuery:t,windowRef:a,onGifSelected:n,onClosed:l,focusInputOnMount:p=!1,openedBy:_,isWithinTab:b})=>{let A=(0,i.wA)(),{searchQuery:x}=(0,k.d4)(B.Nk)??{},[v,S]=(0,r.useState)(),I=(0,r.useRef)(null),[w,V]=(0,r.useState)(W),[G,q]=(0,r.useState)(),[j,z]=(0,r.useState)(""),[K,$]=(0,r.useState)(y.d6),[Y,Q]=(0,r.useState)(0),[Z,J]=(0,r.useState)(),[X,ee]=(0,r.useState)(!1),et=(0,k.d4)(e=>(0,C.ty)(e,"seen_gif_new_badge")??0),ea=(0,r.useRef)(null),en=(0,r.useRef)(null),er=(0,r.useRef)(null);(0,r.useEffect)(()=>{er.current?.scrollToRow(Y)},[Y]),(0,r.useEffect)(()=>()=>{et<3&&A((0,U.n)(3))},[et,A]);let ei=(0,r.useCallback)(({gif:e,index:t})=>(0,P.y)({selection:e,cursorPosition:K,index:t,numPerRow:y.uE,currentSelection:j}),[K,j]),el=(0,r.useMemo)(()=>{let e=[...Object.keys(w||{})],t=e.length/y.uE,a=[];for(let n=0;n<t;n++){let t=e.splice(0,y.uE);a.push({items:t,type:N.O.GIF})}return a},[w]),eo=(0,r.useCallback)(()=>{let e=[0,0],t=(0,M.tT)(el,e);$(e),z(t??"")},[el]),es=(0,r.useCallback)(()=>{$(y.d6),z(""),Q(void 0),Q(0)},[]),ec=(0,r.useCallback)(e=>{if(el.length<1||e?.target===en.current&&v&&K===y.d6&&(e.keyCode!==f.LE||en.current?.selectionEnd!==en.current?.value.length||a.deref()?.document.getSelection()?.type==="Range")&&(e.keyCode===f.UQ||e.keyCode===f.LE))return;e.preventDefault();let t=(0,M.u1)({screenRows:el,direction:e.keyCode,currentCursor:K||y.d6,pickerType:y.Zl.GIF,infiniteScroll:!0}),n=(0,M.tT)(el,t);$(t),z(n??"")},[K,el,v,a]),ed=(0,s.A)(ec,y.d$),em=(0,r.useCallback)((e,t)=>{l(e),n?.(e,t)},[l,n]),eu=(0,r.useCallback)(({index:e,key:t,style:a})=>{let n=el[e];return r.createElement(GifListRow,{index:e,key:t,style:a,row:n,gifResultsMap:w,isGifSelected:ei,onGifSelected:em,isSearchResults:!!v})},[el,w,ei,em,v]),ep=(0,r.useCallback)(()=>{V(G??{}),es(),J(void 0),ee(!1)},[es,G]),eh=(0,r.useCallback)(()=>{ep(),S(""),en.current?.focus()},[ep,S]);(0,r.useEffect)(()=>{void 0!==v&&!en?.current?.value.length&&el.length&&ep()},[v,el.length,ep]);let e_=(0,r.useCallback)(({gifs:e,next_cursor:a,value:n})=>{n!==v&&n!==x&&n!==t||(Q(0),es(),V(processGifsIntoMap({gifs:e,previousMap:{}})),J(a))},[t,es,v,x]);(0,r.useEffect)(()=>{en.current?.focus()},[t]);let ef=(0,r.useCallback)(e=>{let t=e?.target?.value;t?.replace(/[\s\t\n]/g,"").length&&A((0,O._)({query:t,limit:30})).then(({gifs:e=[],response_metadata:{next_cursor:a}})=>{e_({gifs:e,next_cursor:a,value:t})})},[A,e_]),eb=(0,c.A)(ef,360),eg=(0,r.useCallback)(e=>{(!e.key||(0,R.U)(e))&&eb(e)},[eb]),ey=(0,r.useCallback)(e=>{if(a.deref()?.document.querySelector("#gif-picker-list")?.contains(e?.target)&&en.current&&(0,R.U)(e)){es(),en.current.focus();return}[f.i7,f.n6,f.UQ,f.LE].includes(e.keyCode)&&ed(e);let t=a.deref()?.document?.activeElement===en.current;e.keyCode===f.wn&&!e.shiftKey&&t&&eo()},[ed,a,eo,es]),eA=(0,r.useCallback)(()=>{es()},[es]),loadMoreRows=async()=>{if(void 0!==v&&v.length&&!X){ee(!0);let{gifs:e=[],response_metadata:{next_cursor:t}}=await A((0,O._)({query:v,limit:30,cursor:Z}));V(processGifsIntoMap({gifs:e,previousMap:w})),J(t),ee(!1)}},isRowLoaded=({index:e})=>!!el[e];(0,r.useEffect)(()=>{if((t?.length||x?.length)&&void 0===v){let e=x??t;A((0,O._)({limit:30,query:e})).then(({gifs:e=[],response_metadata:{next_cursor:a}})=>{e_({gifs:e,next_cursor:a,value:x??t})})}else G||A((0,L.g)({limit:50})).then(({gifs:e=[]})=>{let t=processGifsIntoMap({gifs:e,previousMap:{}});V(t),q(t)})},[x,A,e_,G,v,t]);let ex=(0,r.useCallback)(()=>{en.current?.focus()},[]);(0,D.A)(F.Ay.GIF_PICKER_INPUT,ex);let eE=o()("p-gif_picker",{"p-gif_picker--message-height-with-cta":"message-height-with-cta"===e,"p-gif_picker--message-height-without-cta":"message-height-without-cta"===e,"p-gif_picker--reaction-height-with-cta":"reaction-height-with-cta"===e,"p-gif_picker--reaction-height-without-cta":"reaction-height-without-cta"===e}),eC=H.t("Search all GIFs on Tenor"),ek=b?void 0:H.t("GIFs",{fallbackHash:"e98d00db9ff0e49e155a8392154219a261861a72",fallbackHashNs:"emoji_picker"});return r.createElement("div",{"data-qa":"gif-picker-host",className:eE,onKeyDown:ey,role:b?void 0:"dialog","aria-label":ek},r.createElement("header",{className:"p-gif_picker__header",ref:ea},r.createElement(g.A,{focusOnMount:p,onChange:S,onFocus:eA,value:v??x??t??"",className:"p-gif_picker__search_input",onKeyUp:eg,ref:en,ariaLabel:eC,placeholder:eC})),r.createElement(h.A,{eventId:E.EventId.GIFS_PICKER_OPENED,uiComponentName:E.UiComponentName.GIFS_PICKER,uiStep:_,clogImpression:!0},r.createElement("section",{className:"p-gif_picker__content",ref:I},el.length?r.createElement(u.A,null,({width:e,height:t})=>r.createElement(d.wK,{isRowLoaded:isRowLoaded,loadMoreRows:loadMoreRows,rowCount:1e3},({onRowsRendered:a,registerChild:n})=>r.createElement(m.O,{onRowsRendered:a,ref:e=>{n(e),er.current=e},screenRows:el,className:"p-gif_picker__list_scroller",height:t,rowCount:el.length,rowHeight:112,rowRenderer:eu,scrollToAlignment:"start",width:e,tabIndex:null,id:"gif-picker-list",role:"presentation",containerRole:"presentation","aria-label":"","aria-readonly":!1}))):r.createElement(T,{clearSearchResults:eh}))))})},0x130784a23:(e,t,a)=>{"use strict";a.d(t,{O:()=>r});var n,r=((n={}).EMOJI="emoji",n.GIF="gif",n.GROUP="group",n.EMPTY_HEADER_ROW="empty-header-row",n)},0x767d2740:(e,t,a)=>{"use strict";a.d(t,{SJ:()=>isCursorInsideProductivitySection,Vq:()=>getRow,hU:()=>rowsHaveAtLeastOneResult,tT:()=>getCell,u1:()=>moveCursor});var n=a(0x2bba3a0),r=a(0x1422234dc),i=a(0x224f7f0e9),l=a(0x2431e9bcb),o=a(0x130784a23);function getCell(e,[t,a]){let n=e&&e[a]&&e[a].items?e[a].items:[];if(n&&n[t])return n[t]}function getRow(e,t){if(e&&e[t])return e[t]}function rowsHaveAtLeastOneResult(e){let t=getRow(e,2);return!!(t&&e.length>=3&&t&&t.items&&t.items.length>=1)}function isCursorInsideProductivitySection(e,t){if(!e)return!1;let a=(0,n.A)(e,e=>"group"===e.type&&e.group?.name==="Getting Work Done"),r=(0,n.A)(e.slice(a+1),{type:o.O.GROUP})+a;return t>a&&t<(-1!==r?r+a:1/0)}function moveCursor({screenRows:e,direction:t,currentCursor:a,pickerType:n,infiniteScroll:s=!1}){let c,d,m,[u,p]=a;switch(n){case l.Zl.GIF:d={type:o.O.GIF},c=e?.length===1,m=[0,0];break;case l.Zl.EMOJI:default:d={type:o.O.EMOJI},c=e?.length===3,m=[0,2]}if(!e||!t||-1===p)return m;let h=u,_=p;switch(t){case i.n6:if(c)return moveCursor({screenRows:e,direction:i.LE,currentCursor:[u,p],pickerType:n,infiniteScroll:s});(_=p+1)>=e.length&&(_=m[1]);break;case i.i7:if(c)return moveCursor({screenRows:e,direction:i.UQ,currentCursor:[u,p],pickerType:n,infiniteScroll:s});(_=p-1)<0&&!s?_=e.length-1:_<0&&s&&(_=p);break;case i.UQ:if((h=u-1)<0){if(c){h=getRow(e,p)?.items?.length||0;break}_=p-1,n===l.Zl.EMOJI&&getRow(e,_)?.type!=="emoji"&&(_-=2),_<0&&(_=(0,r.A)(e,d)),h=(getRow(e,_)?.items?.length||0)-1}break;case i.LE:if((h=u+1)>=(getRow(e,p)?.items?.length||0)){if(c){h=0;break}(_=p+1)>(0,r.A)(e,d)&&(_=0),n===l.Zl.EMOJI&&getRow(e,_)?.type!=="emoji"&&(_+=2),h=0}}return n===l.Zl.EMOJI&&getRow(e,_)?.type!=="emoji"?moveCursor({screenRows:e,direction:t,currentCursor:[h,_],pickerType:n,infiniteScroll:s}):(getCell(e,[h,_])||(h=(getRow(e,_)?.items?.length||0)-1),[h,_])}},0x39dfe4a3:(e,t,a)=>{"use strict";a.d(t,{U:()=>isAlphanumericOrCertainSpecialCharacters});var n=a(0x224f7f0e9),r=a(0x46947d88);let isAlphanumericOrCertainSpecialCharacters=e=>e?.keyCode>=n.f2&&e.keyCode<=n.bn||e?.keyCode>=n.W8&&e.keyCode<=n.bh||e?.key===r.D.BACKSPACE||e?.key===r.D.DASH||e?.key===r.D.UNDERSCORE},0x20dd77e44:(e,t,a)=>{"use strict";a.d(t,{y:()=>isCellSelected});let isCellSelected=({currentSelection:e,selection:t,cursorPosition:a,numPerRow:n,index:r})=>{let i=a[1]*n+a[0];return t===e&&r===i}},0xa4741439:(e,t,a)=>{"use strict";a.d(t,{W:()=>DlpFileScanningBanner});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x226892387),s=a(0x130875b3c),c=a(0x14149c126),d=a(0x759c7c1c),m=a.n(d);let u=new l.Ay("files"),p={width:"100%"},DlpFileScanningBanner=({className:e})=>{let t=(0,o.d4)(e=>"on"===(0,c._Z)(e,"dlp_async_file_processing")),a=(0,o.d4)(s.Z7);if(!t||0===a)return null;let r=u.t("Processing {dlpProcessingFileCount, plural, =1 {file} other {files}}\u2026",{dlpProcessingFileCount:a});return n.createElement("div",{className:i()(m().banner,"p-message_pane__banner",e)},n.createElement("div",{key:"bar",className:m().bannerProgress},n.createElement("span",{className:i()(m().bannerProgressInner,m().bannerProgressInnerAnimated),style:p})),n.createElement("div",{key:"text",className:m().bannerText},n.createElement("span",{className:m().bannerTextName},r)))};DlpFileScanningBanner.displayName="DlpFileScanningBanner"},0x237768fb6:(e,t,a)=>{"use strict";a.d(t,{T:()=>N});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x1df96de4c),o=a(0x20482ad21),s=a(0x11a296110),c=a(0x13eedc190),d=a(0xf225ecf2),m=a(0x1c7997c1),u=a(0x96920791),p=a(0x16d221c7f),h=a(0x142775427),_=a(0x1f803375e),f=a(0x181fc1a60),b=a(0x7cedc323),g=a(0x1241b4b5a),y=a(0x1ec69ee01),A=a(0x15c7516a2),x=a(0x3711e82d),E=a(0x11c82607b),C=a(0x9a5066aa),k=a(0x22d443103),v=a(0x1fcbb004d),S=a(0x46dbff89),I=a(0x2d2ba641);let w=new o.Ay("message"),T={elementName:"share_message_edit_button",onClick:{enableClogAction:!0}},DlpUserWarningShareMessageModal=({channelId:e,channelTeamId:t,blocks:a,file:o,shareType:E=f.I9.MESSAGE,message:S,channel:N,canPostInSelectedChannel:M,destination:R,msgOps:P,dlpCustomMessage:L,viewContext:O,transitionFocusTo:D})=>{let F,U=(0,r.wA)(),B=(0,A.j)(S),H=(0,y.FB)(N),W=(0,n.useMemo)(()=>({canPostInSelectedChannel:M,destination:R,useMultiSelect:!0,initialContents:{contents:P}}),[M,R,P]),V=(0,n.useCallback)(()=>U((0,k.A)({ts:B,channelId:H,initialChannelId:e,...W})),[e,U,W,H,B]),G=(0,n.useCallback)(()=>U((0,k.A)({fileId:o?.id,initialChannelId:e,...W})),[e,U,W,o?.id]),q=V,j=l.t0;E===f.I9.MESSAGE&&(F=b.w,j={timestamp:B,blocks:a,channel:H,shareChannel:e}),(0,f.af)(E)&&(q=G,F=g.S,j={blocks:a,file:o?.id,channel:e});let z=(0,n.useCallback)(async()=>{U((0,v.O)());try{let a=await U(F({...j,skipDlpUserWarning:!0,reason:"DlpUserWarningShareMessageModal_shareMessageOrFile"})),n=a?.ts;(0,f.af)(E)&&(n=a?.file_msg_ts),U((0,C.A)({ts:n,channelId:e,teamId:t}))}catch(n){U((0,I.B)({e:n,channelId:e,channelTeamId:t,blocks:a,shareType:E,message:S,channel:N,canPostInSelectedChannel:M,destination:R,msgOps:P,file:o,transitionFocusTo:D,viewContext:O})),await U((0,C.A)({channelId:H,ts:B}))}},[U,F,j,E,e,t,a,S,N,M,R,P,o,D,O,H,B]);return n.createElement(i.A,{eventId:x.EventId.ENTERPRISE_DLP_USER_WARNING},n.createElement(c.A,null,n.createElement(h.A,null,n.createElement(_.A,{title:w.t("Review this message before sharing")})),n.createElement(d.A,null,n.createElement(m.A,null,n.createElement("p",null,L||w.t("This message may include info that your admins don\u2019t want shared. This can include social security numbers, credit card info, or other info they choose to restrict. Make sure everything looks okay before sharing.")))),n.createElement(u.A,null,n.createElement(p.A,null,n.createElement(s.Ay,{type:"outline",onClick:q,autoClogProps:T},w.t("Edit Message")),n.createElement(s.Ay,{type:"primary",onClick:z},w.t("Share Message"))))))};DlpUserWarningShareMessageModal.displayName="DlpUserWarningShareMessageModal";let N=(0,E.Ay)("Open DLP user warning modal for a failed message share",(e,t,a)=>{e((0,S.q)({element:n.createElement(DlpUserWarningShareMessageModal,a)}))});N.meta={name:"openDlpUserWarningShareMessageModal",key:"createThunkOpenDlpUserWarningShareMessageModal",description:"Open DLP user warning modal for a failed message share"}},0x11f7a4d96:(e,t,a)=>{"use strict";a.d(t,{X:()=>r});var n,r=((n={}).DlpFileScanningUserWarning="dlp_file_scanning_user_warning",n.DLPFileScanningCatastrophicError="dlp_file_scanning_catastrophic_error",n)},0x237ef2e6e:(e,t,a)=>{"use strict";a.d(t,{Ce:()=>r,ko:()=>o,uC:()=>l,uo:()=>s,z5:()=>i});var n=a(0xcf658893);let r=(0,n.Ay)("Set the loading/completion state when fetching ACL features");r.meta={name:"setLoadingAclFeatures",key:"createActionSetLoadingAclFeatures",description:"Set the loading/completion state when fetching ACL features"};let i=(0,n.Ay)("Set the list of features managed by the admin access control list");i.meta={name:"setAccessControlFeatures",key:"createActionSetAccessControlFeatures",description:"Set the list of features managed by the admin access control list"};let l=(0,n.Ay)("Set the name configuration for the selected feature to be managed");l.meta={name:"setSelectedFeature",key:"createActionSetSelectedFeature",description:"Set the name configuration for the selected feature to be managed"};let o=(0,n.Ay)("Set the loading/completion state when fetching ACL assigned usergroups");o.meta={name:"setLoadingAssignedUsergroups",key:"createActionSetLoadingAssignedUsergroups",description:"Set the loading/completion state when fetching ACL assigned usergroups"};let s=(0,n.Ay)("Set the loading/completion state when fetching ACL assigned members");s.meta={name:"setLoadingAssignedMembers",key:"createActionSetLoadingAssignedMembers",description:"Set the loading/completion state when fetching ACL assigned members"}},0x11da06923:(e,t,a)=>{"use strict";a.d(t,{At:()=>y,C3:()=>k,FZ:()=>u,Hl:()=>d,Nu:()=>M,Qk:()=>w,Uf:()=>_,Ur:()=>T,X7:()=>E,Xm:()=>c,Y:()=>R,ZS:()=>p,e:()=>v,eJ:()=>N,fm:()=>s,hD:()=>b,jF:()=>o,ki:()=>m,ph:()=>f,qA:()=>C,r7:()=>A,uQ:()=>g,w8:()=>S,yO:()=>x,ym:()=>I});var n=a(0x89a1d029),r=a(0x17cd9f0a0),i=a(0x1cf0d97e1),l=a(0x14149c126);let o=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"light_write_ai_pref_migrations",!1));o.meta={name:"lightWriteAiPrefMigrationsIsOn",key:"createSelectorLightWriteAiPrefMigrationsIsOn",description:e=>"on"===(0,l._Z)(e,"light_write_ai_pref_migrations",!1)};let s=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"pnp_sso_scim_sfdc",!1));s.meta={name:"isExperimentPnpSsoScimSfdcGroupOn",key:"createSelectorIsExperimentPnpSsoScimSfdcGroupOn",description:e=>"on"===(0,l._Z)(e,"pnp_sso_scim_sfdc",!1)};let c=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"pnp_session_duration_device_settings",!1));c.meta={name:"isExperimentPnpSessionDurationDeviceSettingsGroupOn",key:"createSelectorIsExperimentPnpSessionDurationDeviceSettingsGroupOn",description:e=>"on"===(0,l._Z)(e,"pnp_session_duration_device_settings",!1)};let d=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"pnp_sso_emails_fast_follow",!1));d.meta={name:"isExperimentPnpSsoEmailsFastFollowGroupOn",key:"createSelectorIsExperimentPnpSsoEmailsFastFollowGroupOn",description:e=>"on"===(0,l._Z)(e,"pnp_sso_emails_fast_follow",!1)};let m=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"search_and_sort_roles_and_permissions",!1));m.meta={name:"isExperimentSearchAndSortRolesAndPermsGroupOn",key:"createSelectorIsExperimentSearchAndSortRolesAndPermsGroupOn",description:e=>"on"===(0,l._Z)(e,"search_and_sort_roles_and_permissions",!1)};let u=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"flag_conversation_details",!1));u.meta={name:"isExperimentFlagConversationDetailsGroupOn",key:"createSelectorIsExperimentFlagConversationDetailsGroupOn",description:e=>"on"===(0,l._Z)(e,"flag_conversation_details",!1)};let p=(0,i.Ay)(e=>"on"===(0,l._Z)(e,"content_flags_review_stacking_fix",!1));p.meta={name:"isExperimentContentFlagsReviewStackingFixGroupOn",key:"createSelectorIsExperimentContentFlagsReviewStackingFixGroupOn",description:e=>"on"===(0,l._Z)(e,"content_flags_review_stacking_fix",!1)};let h=(0,i.Ay)(e=>e.adminFeatureAccess.aclFeaturesListReducer);h.meta={name:"getAclFeatureAccessListState",key:"createSelectorGetAclFeatureAccessListState",description:e=>e.adminFeatureAccess.aclFeaturesListReducer};let _=(0,i.Ay)(e=>h(e).isLoadingAclFeatures);_.meta={name:"getIsLoadingAclFeatures",key:"createSelectorGetIsLoadingAclFeatures",description:e=>h(e).isLoadingAclFeatures};let f=(0,i.Ay)(e=>h(e).featureAccessList);f.meta={name:"getAclFeatureAccessList",key:"createSelectorGetAclFeatureAccessList",description:e=>h(e).featureAccessList};let b=(0,i.Ay)(e=>h(e).hasAclListApiError);b.meta={name:"hasAclFeatureAccessListError",key:"createSelectorHasAclFeatureAccessListError",description:e=>h(e).hasAclListApiError};let g=(0,i.Ay)(e=>h(e).selectedFeatureCategory);g.meta={name:"getSelectedFeatureCategory",key:"createSelectorGetSelectedFeatureCategory",description:e=>h(e).selectedFeatureCategory};let y=(0,i.Ay)(e=>h(e).selectedFeaturePermissions);y.meta={name:"getSelectedFeaturePermissions",key:"createSelectorGetSelectedFeaturePermissions",description:e=>h(e).selectedFeaturePermissions};let A=(0,i.Ay)(e=>h(e).selectedFeatureFuturePermissions);A.meta={name:"getSelectedFeatureFuturePermissions",key:"createSelectorGetSelectedFeatureFuturePermissions",description:e=>h(e).selectedFeatureFuturePermissions};let x=(0,i.Ay)(e=>h(e).selectedFeatureGroups);x.meta={name:"getSelectedFeatureGroups",key:"createSelectorGetSelectedFeatureGroups",description:e=>h(e).selectedFeatureGroups};let E=(0,i.Ay)(e=>{let t=y(e);return!!t&&t?.some(e=>(0,r.tS)(e)!==n.pL.NoOne)});E.meta={name:"getIsAnyFeaturePermissionEnabled",key:"createSelectorGetIsAnyFeaturePermissionEnabled",description:e=>{let t=y(e);return!!t&&t?.some(e=>(0,r.tS)(e)!==n.pL.NoOne)}};let C=(0,i.Ay)(e=>h(e).assignedUsergroups);C.meta={name:"getAssignedUsergroups",key:"createSelectorGetAssignedUsergroups",description:e=>h(e).assignedUsergroups};let k=(0,i.Ay)(e=>h(e).isLoadingAssignedUsergroups);k.meta={name:"getIsLoadingAssignedUsergroups",key:"createSelectorGetIsLoadingAssignedUsergroups",description:e=>h(e).isLoadingAssignedUsergroups};let v=(0,i.Ay)(e=>h(e).hasAclUsergroupsListApiError);v.meta={name:"hasAclUsergroupsListError",key:"createSelectorHasAclUsergroupsListError",description:e=>h(e).hasAclUsergroupsListApiError};let S=(0,i.Ay)(e=>h(e).assignedMembers);S.meta={name:"getAssignedMembers",key:"createSelectorGetAssignedMembers",description:e=>h(e).assignedMembers};let I=(0,i.Ay)(e=>h(e).isLoadingAssignedMembers);I.meta={name:"getIsLoadingAssignedMembers",key:"createSelectorGetIsLoadingAssignedMembers",description:e=>h(e).isLoadingAssignedMembers};let w=(0,i.Ay)(e=>h(e).hasAclMembersListApiError);w.meta={name:"hasAclMembersListError",key:"createSelectorHasAclMembersListError",description:e=>h(e).hasAclMembersListApiError};let T=(0,i.Ay)((e,t)=>y(e)?.find(e=>e.permission_name===t));T.meta={name:"getFeaturePermissionById",key:"createSelectorGetFeaturePermissionById",description:(e,t)=>y(e)?.find(e=>e.permission_name===t)};let N=(0,i.Ay)((e,t)=>y(e)?.find(e=>e.permission_name===t));N.meta={name:"getFeaturePermissionByName",key:"createSelectorGetFeaturePermissionByName",description:(e,t)=>y(e)?.find(e=>e.permission_name===t)},(0,i.Ay)((e,t)=>N(e,t)?.state!==n.pL.NoOne).meta={name:"getIsFeaturePermissionEnabled",key:"createSelectorGetIsFeaturePermissionEnabled",description:(e,t)=>N(e,t)?.state!==n.pL.NoOne};let M=(0,i.Ay)(e=>h(e).isTeamOnV2Package);M.meta={name:"getIsTeamOnV2Package",key:"createSelectorGetIsTeamOnV2Package",description:e=>h(e).isTeamOnV2Package};let R=(0,i.Ay)(e=>h(e).futurePermissionsAvailableOn);R.meta={name:"getFeatureFuturePermissionsAvailableOn",key:"createSelectorGetFeatureFuturePermissionsAvailableOn",description:e=>h(e).futurePermissionsAvailableOn}},0x1125ae372:(e,t,a)=>{"use strict";a.d(t,{I:()=>l});var n=a(0x1c00e6bfc),r=a(0x11c82607b),i=a(0x237ef2e6e);let l=(0,r.Ay)("fetch and upsert admin access control features list",(e,t,{reason:a})=>{e((0,i.Ce)({isLoadingAclFeatures:!0})),e((0,n.q)({reason:a})).then(t=>{t?.ok?e((0,i.Ce)({featureAccessList:t.categories})):e((0,i.Ce)({hasAclListApiError:!0}))}).catch(()=>{e((0,i.Ce)({hasAclListApiError:!0}))}).finally(()=>{e((0,i.Ce)({isLoadingAclFeatures:!1}))})});l.meta={name:"fetchAndUpsertAclFeatures",key:"createThunkFetchAndUpsertAclFeatures",description:"fetch and upsert admin access control features list"}},0x1681744bc:(e,t,a)=>{"use strict";a.d(t,{GG:()=>m,JW:()=>o,O3:()=>_,Po:()=>E,Q:()=>x,QT:()=>s,Xz:()=>d,Ys:()=>u,Z4:()=>c,as:()=>y,cu:()=>p,fg:()=>f,hE:()=>C,m2:()=>b,mq:()=>A,sS:()=>g,ty:()=>k,w8:()=>h});var n=a(0xcf658893),r=a(0xba77ecb9),i=a(0x1cf0d97e1);let l=(0,i.Ay)(e=>e.adminFeatureAccess.assignMembersReducer);l.meta={name:"getAssignMembersState",key:"createSelectorGetAssignMembersState",description:e=>e.adminFeatureAccess.assignMembersReducer};let o=(0,i.Ay)(e=>l(e).hasFetchedInitialMembers);o.meta={name:"getHasFetchedInitialMembers",key:"createSelectorGetHasFetchedInitialMembers",description:e=>l(e).hasFetchedInitialMembers};let s=(0,i.Ay)(e=>l(e).isLoadingMembers);s.meta={name:"getIsLoadingMembers",key:"createSelectorGetIsLoadingMembers",description:e=>l(e).isLoadingMembers},(0,i.Ay)(e=>l(e).isSearchingMembers).meta={name:"getIsSearchingMembers",key:"createSelectorGetIsSearchingMembers",description:e=>l(e).isSearchingMembers};let c=(0,i.Ay)(e=>l(e).isFetchingMoreMembers);c.meta={name:"getIsFetchingMoreMembers",key:"createSelectorGetIsFetchingMoreMembers",description:e=>l(e).isFetchingMoreMembers},(0,i.Ay)(e=>l(e).cursorMark).meta={name:"getCurrentCursorMark",key:"createSelectorGetCurrentCursorMark",description:e=>l(e).cursorMark};let d=(0,i.Ay)(e=>l(e).nextCursorMark);d.meta={name:"getNextCursorMark",key:"createSelectorGetNextCursorMark",description:e=>l(e).nextCursorMark};let m=(0,i.Ay)(e=>l(e).membersSearchTerm);m.meta={name:"getMembersSearchTerm",key:"createSelectorGetMembersSearchTerm",description:e=>l(e).membersSearchTerm};let u=(0,i.Ay)(e=>l(e).currentMembersCount);u.meta={name:"getCurrentMembersCount",key:"createSelectorGetCurrentMembersCount",description:e=>l(e).currentMembersCount},(0,i.Ay)(e=>l(e).totalMembersCount).meta={name:"getTotalMembersCount",key:"createSelectorGetTotalMembersCount",description:e=>l(e).totalMembersCount};let p=(0,i.Ay)(e=>l(e).orgOrTeamMembers);p.meta={name:"getOrgMembers",key:"createSelectorGetOrgMembers",description:e=>l(e).orgOrTeamMembers};let h=(0,i.Ay)(e=>l(e).assignedMembers);h.meta={name:"getAssignedMembers",key:"createSelectorGetAssignedMembers",description:e=>l(e).assignedMembers};let _=(0,i.Ay)(e=>{let{hasFetchedInitialMembers:t,isSearchingMembers:a}=l(e);return t&&!a});_.meta={name:"getCanSearchMembers",key:"createSelectorGetCanSearchMembers",description:e=>{let{hasFetchedInitialMembers:t,isSearchingMembers:a}=l(e);return t&&!a}};let f=(0,i.Ay)(e=>{let{hasFetchedInitialMembers:t,isFetchingMoreMembers:a,cursorMark:n,nextCursorMark:r,currentMembersCount:i,totalMembersCount:o}=l(e);return t&&!a&&n!==r&&i<o});f.meta={name:"getCanFetchMoreMembers",key:"createSelectorGetCanFetchMoreMembers",description:e=>{let{hasFetchedInitialMembers:t,isFetchingMoreMembers:a,cursorMark:n,nextCursorMark:r,currentMembersCount:i,totalMembersCount:o}=l(e);return t&&!a&&n!==r&&i<o}};let b=(0,n.Ay)("Load members to assign");b.meta={name:"setLoadingMembers",key:"createActionSetLoadingMembers",description:"Load members to assign"};let g=(0,n.Ay)("Sets the error if/when fetching, searching, or paginating members");g.meta={name:"setFetchMembersError",key:"createActionSetFetchMembersError",description:"Sets the error if/when fetching, searching, or paginating members"};let y=(0,n.Ay)("Sets the members to select from along with assigned members");y.meta={name:"setInitialMembers",key:"createActionSetInitialMembers",description:"Sets the members to select from along with assigned members"};let A=(0,n.Ay)("Sets the string for searching members");A.meta={name:"setMembersSearchTerm",key:"createActionSetMembersSearchTerm",description:"Sets the string for searching members"};let x=(0,n.Ay)("Load members to assign");x.meta={name:"setSearchMembers",key:"createActionSetSearchMembers",description:"Load members to assign"};let E=(0,n.Ay)("Sets the members to select from along with assigned members");E.meta={name:"setNextPageOfMembers",key:"createActionSetNextPageOfMembers",description:"Sets the members to select from along with assigned members"};let C=(0,n.Ay)("Reset the reducer state to the initial state");C.meta={name:"resetAssignMembersState",key:"createActionResetAssignMembersState",description:"Reset the reducer state to the initial state"};let createInitialState=e=>({hasFetchedInitialMembers:!1,fetchMembersError:void 0,isLoadingMembers:!1,isSearchingMembers:!1,isFetchingMoreMembers:!1,orgOrTeamMembers:[],assignedMembers:[],cursorMark:void 0,nextCursorMark:void 0,totalMembersCount:0,currentMembersCount:0,canPaginateGroups:!1,membersSearchTerm:void 0,...e}),k=(0,r.Ay)({},createInitialState()).on(b,(e,t)=>({...e,...t})).on(g,(e,t)=>({...e,...t})).on(y,(e,t)=>({...e,...t})).on(A,(e,t)=>({...e,membersSearchTerm:t.searchTerm})).on(x,(e,t)=>({...e,isLoadingMembers:!1,cursorMark:void 0,nextCursorMark:t.nextCursor,totalMembersCount:t.totalMembersCount,currentMembersCount:t.orgOrTeamMembers.length,orgOrTeamMembers:t.orgOrTeamMembers})).on(E,(e,t)=>{if(e.cursorMark===e.nextCursorMark)return e;let a=[...e.orgOrTeamMembers,...t.orgOrTeamMembers];return{...e,cursorMark:e.nextCursorMark,nextCursorMark:t.nextCursorMark,currentMembersCount:a.length,orgOrTeamMembers:a}}).on(C,()=>({...createInitialState()}))},0x11557753a:(e,t,a)=>{"use strict";a.d(t,{By:()=>k,Gu:()=>A,Ls:()=>C,Tr:()=>o,Vp:()=>c,Wb:()=>b,Xz:()=>d,aX:()=>u,co:()=>m,gk:()=>y,gn:()=>g,qA:()=>_,sG:()=>E,sI:()=>s,sr:()=>h,vI:()=>p,ye:()=>f,z6:()=>x});var n=a(0xcf658893),r=a(0xba77ecb9),i=a(0x1cf0d97e1);let l=(0,i.Ay)(e=>e.adminFeatureAccess.assignUserGroupsReducer);l.meta={name:"getAssignUserGroupsState",key:"createSelectorGetAssignUserGroupsState",description:e=>e.adminFeatureAccess.assignUserGroupsReducer};let o=(0,i.Ay)(e=>l(e).hasFetchedInitialUserGroups);o.meta={name:"getHasFetchedInitialUserGroups",key:"createSelectorGetHasFetchedInitialUserGroups",description:e=>l(e).hasFetchedInitialUserGroups};let s=(0,i.Ay)(e=>l(e).isLoadingUserGroups);s.meta={name:"getIsLoadingUserGroups",key:"createSelectorGetIsLoadingUserGroups",description:e=>l(e).isLoadingUserGroups},(0,i.Ay)(e=>l(e).fetchUserGroupsError).meta={name:"getFetchUserGroupsError",key:"createSelectorGetFetchUserGroupsError",description:e=>l(e).fetchUserGroupsError};let c=(0,i.Ay)(e=>l(e).cursorMark);c.meta={name:"getCurrentCursorMark",key:"createSelectorGetCurrentCursorMark",description:e=>l(e).cursorMark};let d=(0,i.Ay)(e=>l(e).nextCursorMark);d.meta={name:"getNextCursorMark",key:"createSelectorGetNextCursorMark",description:e=>l(e).nextCursorMark};let m=(0,i.Ay)(e=>l(e).groupsSearchTerm);m.meta={name:"getUserGroupsSearchTerm",key:"createSelectorGetUserGroupsSearchTerm",description:e=>l(e).groupsSearchTerm};let u=(0,i.Ay)(e=>l(e).currentUserGroupsCount);u.meta={name:"getCurrentUserGroupsCount",key:"createSelectorGetCurrentUserGroupsCount",description:e=>l(e).currentUserGroupsCount};let p=(0,i.Ay)(e=>l(e).totalUserGroupsCount);p.meta={name:"getTotalUserGroupsCount",key:"createSelectorGetTotalUserGroupsCount",description:e=>l(e).totalUserGroupsCount};let h=(0,i.Ay)(e=>l(e).orgOrTeamUserGroups);h.meta={name:"getOrgUserGroups",key:"createSelectorGetOrgUserGroups",description:e=>l(e).orgOrTeamUserGroups};let _=(0,i.Ay)(e=>l(e).assignedUserGroups);_.meta={name:"getAssignedUsergroups",key:"createSelectorGetAssignedUsergroups",description:e=>l(e).assignedUserGroups};let f=(0,i.Ay)(e=>{let{hasFetchedInitialUserGroups:t,isLoadingUserGroups:a}=l(e);return t&&!a});f.meta={name:"getCanSearchUserGroups",key:"createSelectorGetCanSearchUserGroups",description:e=>{let{hasFetchedInitialUserGroups:t,isLoadingUserGroups:a}=l(e);return t&&!a}};let b=(0,n.Ay)("Load org usergroups to assign");b.meta={name:"setLoadingUserGroups",key:"createActionSetLoadingUserGroups",description:"Load org usergroups to assign"};let g=(0,n.Ay)("Error while fetching, searching, or paginating user groups");g.meta={name:"setFetchUserGroupsError",key:"createActionSetFetchUserGroupsError",description:"Error while fetching, searching, or paginating user groups"};let y=(0,n.Ay)("Sets the org user groups to select from along with assigned user groups");y.meta={name:"setInitialUserGroups",key:"createActionSetInitialUserGroups",description:"Sets the org user groups to select from along with assigned user groups"};let A=(0,n.Ay)("Load org usergroups to assign");A.meta={name:"setSearchUserGroups",key:"createActionSetSearchUserGroups",description:"Load org usergroups to assign"};let x=(0,n.Ay)("Sets the org user groups to select from along with assigned user groups");x.meta={name:"setNextPageOfUserGroups",key:"createActionSetNextPageOfUserGroups",description:"Sets the org user groups to select from along with assigned user groups"};let E=(0,n.Ay)("Handle change of the user groups search term");E.meta={name:"setUserGroupsSearchTerm",key:"createActionSetUserGroupsSearchTerm",description:"Handle change of the user groups search term"};let C=(0,n.Ay)("Reset the reducer state to the initial state");C.meta={name:"resetAssignUserGroupsState",key:"createActionResetAssignUserGroupsState",description:"Reset the reducer state to the initial state"};let createInitialState=e=>({hasFetchedInitialUserGroups:!1,fetchUserGroupsError:void 0,isLoadingUserGroups:!1,orgOrTeamUserGroups:[],assignedUserGroups:[],cursorMark:void 0,nextCursorMark:void 0,totalUserGroupsCount:0,currentUserGroupsCount:0,canPaginateGroups:!1,groupsSearchTerm:void 0,error:void 0,...e}),k=(0,r.Ay)({},createInitialState()).on(b,(e,t)=>({...e,...t})).on(g,(e,t)=>({...e,...t})).on(y,(e,t)=>({...e,...t})).on(E,(e,t)=>({...e,groupsSearchTerm:t.searchTerm})).on(A,(e,t)=>({...e,isLoadingUserGroups:!1,cursorMark:void 0,nextCursorMark:t.nextCursorMark,totalUserGroupsCount:t.totalUserGroupsCount,currentUserGroupsCount:t.orgOrTeamUserGroups.length,orgOrTeamUserGroups:t.orgOrTeamUserGroups})).on(x,(e,t)=>{if(e.cursorMark===e.nextCursorMark)return e;let a=[...e.orgOrTeamUserGroups,...t.orgOrTeamUserGroups];return{...e,cursorMark:e.nextCursorMark,nextCursorMark:t.nextCursorMark,currentUserGroupsCount:a.length,orgOrTeamUserGroups:a}}).on(C,()=>({...createInitialState()}))},0x1c052efa9:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>g});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xd9faf062),o=a(0x1faa3f1ac),s=a(0x2501a2cee),c=a(0x10b603e91),d=a(0x190a9df19),m=a(0x6960d8b9),u=a(0x226892387),p=a(0x14149c126),h=a(0x20061cab9),_=a(0x5b1935a6),f=a(0x23ecfb133);let b=new i.Ay("enterprise"),SlackbotAiGracePeriodBanner=({notificationName:e,gracePeriodEndTimestamp:t,isInGracePeriod:a})=>{let i,g,{experimentSlackbotAiGracePeriodAdminGroupOn:y,orgDashboardBaseUrl:A,handleDismissBanner:x}=(i=(0,r.wA)(),g=(0,u.d4)(e=>"on"===(0,p._Z)(e,"slackbot_ai_grace_period_admin")),{experimentSlackbotAiGracePeriodAdminGroupOn:g,orgDashboardBaseUrl:(0,u.d4)(f.c),handleDismissBanner:(0,n.useCallback)(()=>{i((0,h.Ay)({spaceName:_.xu.CLIENT_FOOTER,action:_.hw.DISMISS}))},[i])}),E=(0,u.d4)(d.PY),C=(0,n.useCallback)(({text:e})=>n.createElement(o.A,{href:`${A}/permissions/feature-access/slack_ai`,onClick:x},e),[x,A]);if(!y||e!==_.ze.SLACKBOT_AI_GRACE_PERIOD_BANNER||!E||!a)return null;let k=b.rt("Coming soon: Your organization will get the new, AI-powered Slackbot starting {gracePeriodEndTimestamp}. <Link>Or, you can set it up now.</Link>",{"<Link>":C,gracePeriodEndTimestamp:(0,m.Yq)(t,"{date_short}",{customFormat:"MMMM DD, YYYY"}),fallbackHash:"535089fada5859c20244157f29d7d9f07152d876"});return n.createElement(c.A,{className:"align_center","data-qa":"slackbot_ai_grace_period_banner",type:l.QE.info,preventTypeOverride:!0,isFixedPosition:!1,onClose:x},n.createElement("span",{className:"nudge_top_2 nudge_right_4"},n.createElement(s.Ah,{inline:!0,name:"ai-sparkle",size:"20"})),k)};SlackbotAiGracePeriodBanner.displayName="SlackbotAiGracePeriodBanner";let g=SlackbotAiGracePeriodBanner},0x89a1d029:(e,t,a)=>{"use strict";a.d(t,{$0:()=>isFeaturePermissionState,FL:()=>o,Oy:()=>u,Qe:()=>getCategoryNameFromFeatureCategory,TG:()=>d,an:()=>convertFeaturePermissionNamePathParamToApiName,nX:()=>m,p2:()=>r.N,pL:()=>r.r,vp:()=>s,wC:()=>i,wc:()=>l});var n=a(0x20482ad21),r=a(0x1d85a0d75);let i="assignUserGroupsPane",l="editEnablementStatePane",o="assignMembersPane",s="admin_feature_access__",c=new n.Ay("enterprise_dashboard"),d={ALLOW:"ALLOW",RESTRICT:"RESTRICT"},m={MEMBERS:"edit_members",GROUPS:"edit_groups",PERMISSION:"edit_permission"};function convertFeaturePermissionNamePathParamToApiName(e){return e.toUpperCase()}let isFeaturePermissionState=e=>e===r.r.Everyone||e===r.r.NoOne||e===r.r.OnlySpecifiedEntities||e===r.r.EveryoneButSpecifiedEntities,u={SLACK_AI:"slack_ai",ENTERPRISE_SEARCH:"enterprise_search"};function getCategoryNameFromFeatureCategory(e){switch(e){case u.SLACK_AI:return c.t("AI",{fallbackHash:"0cb57686c4f132f9b2e12f5c6a41d645fb6f1a98"});case u.ENTERPRISE_SEARCH:return c.t("Enterprise Search");default:throw Error("Category does not exist")}}},0x1fbfedd05:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x1daf4b9c),s=a(0x128d54e52),c=a(0x1535e80f3),d=a(0x1fdec3e16),m=a(0x24a897194),u=a(0x1c659cbb1),p=a(0x1acf9d7d9),h=a(0x328743af),_=a(0x1b9d5cc0c),f=a(0x82980ab8),b=a(0x1aad32b98),g=a(0x226892387),y=a(0x19c76d181),A=a(0xe684f705);let x=new l.Ay("enterprise_dashboard"),AdminMemberEntity=({className:e="","data-qa":t,disableLink:a=!1,member:r,memberId:l,botId:E,showEmail:C=!1,showYou:k=!1,size:v="small"})=>{let S=(0,g.d4)(y.WR),I=(0,g.d4)(e=>(0,A.nv)(e,l)),w=r??I,T=(0,_.K6)(w)===S,N=(0,n.useCallback)(e=>E?n.createElement(u.Ay,{...e,botId:E,size:c.RG[v],tabIndex:-1,isInteractive:!1}):n.createElement(u.Ay,{...e,user:{...w,team_id:(0,b.QI)(w)},userId:(0,_.K6)(w),size:c.RG[v],tabIndex:-1,isInteractive:!1}),[w,v,E]),M=n.createElement(p.A,{name:(0,f.wg)(w)}),R=k&&T?n.createElement(s.CG,{className:"p-admin_member_entity__you",inline:!0},x.t("(you)",{fallbackHash:"1647df1274ca1403fb32187b06fed324ade6b1ad",fallbackHashNs:"inline_member"})):null,P=n.createElement("span",{className:"p-admin_member_entity__text_content"},M,R),L=C&&"small"!==v?n.createElement(s.Q,{className:"p-admin_member_entity__email"},n.createElement(d.A,{lines:1},(0,_.zY)(w))):null,O=n.createElement(s.Ay,{avatar:N,text:P,metadata:L,size:c.ny[v]}),D={className:i()("p-admin_member_entity",e),"data-qa":t};return(0,o.A)()&&!a?n.createElement(m.Nk,{withEntity:!0,routeName:h.xW.ROUTE_PEOPLE_MEMBER_DETAILS,params:{memberId:w.id},...D},O):n.cloneElement(O,D)};AdminMemberEntity.displayName="AdminMemberEntity";let E=AdminMemberEntity},0x22c875f21:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2b7f0bcc),l=a(0x247cf31a2),o=a(0x242843d69),s=a.n(o);let c=new r.Ay("enterprise_dashboard"),RemoveMemberDialogContent=({memberName:e,channel:t,hasErrored:a,experimentScRemoveFullAccessUserGroupOn:r})=>{let o=(0,n.useMemo)(()=>r?n.createElement(n.Fragment,null,n.createElement("div",{className:s().contentHeader},c.rt("{memberName} will be removed from {channel}.",{memberName:e,channel:n.createElement(l.A,{channelId:t.id,showTeam:!1})})),n.createElement("div",{className:s().contentSection},n.createElement("div",{className:s().noteHeader},c.t("Note that:")),n.createElement("ul",{className:s().lists},n.createElement("li",null,c.t("They can be re-invited to this channel.")),n.createElement("li",null,c.t("If this channel is public for {memberName}'s org, and they are still connected, they can rejoin.",{memberName:e}))))):c.rt("Once removed, this person will no longer have access to the channel, {channel}.",{channel:n.createElement(l.A,{channelId:t.id,showTeam:!1})}),[r,e,t.id]);return n.createElement(n.Fragment,null,a&&n.createElement(i.Ay,{className:"margin_bottom_100",level:i.A_.error,"data-qa":"admin-remove-member-dialog-error"},c.t("{memberName} couldn\u2019t be removed from this channel.",{memberName:e})),o)};RemoveMemberDialogContent.displayName="RemoveMemberDialogContent";let d=RemoveMemberDialogContent},0x1d7070205:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0xb77a689a),i=a(0xb97f3675),l=a(0x128d54e52),o=a(0x1535e80f3),s=a(0x24a897194),c=a(0x13d6152c9),d=a(0x58199183),m=a(0x328743af),u=a(0x2495e28ce),p=a(0x226892387),h=a(0x1ee439e69);let AdminTeamEntity=({"data-qa":e,disableLink:t=!1,size:a="small",teamOrTeamId:_})=>{let f=(0,r.A)(_),b=f?_:_.id,g=(0,p.d4)(e=>f?(0,h._J)(e,_):_),y=(0,n.useCallback)(e=>n.createElement(c.Pv,{team:g,size:o.RG[a],allowTeamInitials:!0,...e}),[g,a]),A=(0,p.d4)(u.d),x=!t&&A,E=n.createElement(i.A,{avatar:y,"data-team-id":b,"data-qa":e,size:o.ny[a],text:n.createElement(l.CG,null,n.createElement(d.A,{bold:!0,team:g,shouldMaybeOpenOrgCard:!x,shouldMaybeShowVerified:!0}))});return x?n.createElement(s.Nk,{withEntity:!0,routeName:m.xW.ROUTE_SLACK_CONNECT_CONNECTION_DETAILS,params:{externalTeamOrEnterpriseId:b},legacyRoute:`/slack-connect/connections/${b}`},E):E};AdminTeamEntity.displayName="AdminTeamEntity";let _=AdminTeamEntity},0x6ad2a329:(e,t,a)=>{"use strict";a.d(t,{Ai:()=>E,Cf:()=>h,Eu:()=>y,Fe:()=>d,G_:()=>I,Nr:()=>_,R:()=>R,T5:()=>w,UI:()=>m,V1:()=>k,Xn:()=>C,Z:()=>v,_j:()=>u,d5:()=>N,g0:()=>x,g4:()=>M,gc:()=>f,iN:()=>T,kf:()=>b,qc:()=>p,tz:()=>S,x8:()=>A,zr:()=>g});var n=a(0x12f409c9c),r=a(0x1b437f2b0),i=a(0xcf658893),l=a(0xba77ecb9),o=a(0x1cf0d97e1);let s={isLoadingChannels:!1,isFetchingMoreChannels:!1,hasFetchedInitialChannels:!1,hasFetchChannelsError:!1,channelsList:[],channelsDictionary:{},totalChannelsCount:0,currentChannelsCount:0,currentCursor:void 0,nextCursor:void 0,searchTerm:void 0,selectedWorkspaceId:void 0,sortBy:"name",sortDir:n.Pg.ASC},c=(0,o.Ay)(e=>e.adminUserGroups.adminAssignChannelsTableReducer);c.meta={name:"getAdminAssignChannelsState",key:"createSelectorGetAdminAssignChannelsState",description:e=>e.adminUserGroups.adminAssignChannelsTableReducer};let d=(0,o.Ay)(e=>c(e).isLoadingChannels);d.meta={name:"getIsLoadingChannels",key:"createSelectorGetIsLoadingChannels",description:e=>c(e).isLoadingChannels};let m=(0,o.Ay)(e=>c(e).isFetchingMoreChannels);m.meta={name:"getIsFetchingMoreChannels",key:"createSelectorGetIsFetchingMoreChannels",description:e=>c(e).isFetchingMoreChannels};let u=(0,o.Ay)(e=>c(e).hasFetchedInitialChannels);u.meta={name:"getHasFetchedInitialChannels",key:"createSelectorGetHasFetchedInitialChannels",description:e=>c(e).hasFetchedInitialChannels},(0,o.Ay)(e=>c(e).currentCursor).meta={name:"getCurrentCursor",key:"createSelectorGetCurrentCursor",description:e=>c(e).currentCursor};let p=(0,o.Ay)(e=>c(e).nextCursor);p.meta={name:"getNextCursor",key:"createSelectorGetNextCursor",description:e=>c(e).nextCursor};let h=(0,o.Ay)(e=>c(e).totalChannelsCount);h.meta={name:"getTotalChannelsCount",key:"createSelectorGetTotalChannelsCount",description:e=>c(e).totalChannelsCount};let _=(0,o.Ay)(e=>c(e).currentChannelsCount);_.meta={name:"getCurrentChannelsCount",key:"createSelectorGetCurrentChannelsCount",description:e=>c(e).currentChannelsCount};let f=(0,o.Ay)(e=>c(e).channelsList);f.meta={name:"getAvailableChannels",key:"createSelectorGetAvailableChannels",description:e=>c(e).channelsList},(0,o.Ay)(e=>c(e).channelsDictionary).meta={name:"getChannelsDictionary",key:"createSelectorGetChannelsDictionary",description:e=>c(e).channelsDictionary};let b=(0,o.Ay)(e=>{let t=c(e);return!!(t.hasFetchedInitialChannels&&!t.isLoadingChannels&&!t.isFetchingMoreChannels&&t.currentCursor!==t.nextCursor&&t.currentChannelsCount<t.totalChannelsCount)});b.meta={name:"getCanFetchMoreChannels",key:"createSelectorGetCanFetchMoreChannels",description:e=>{let t=c(e);return!!(t.hasFetchedInitialChannels&&!t.isLoadingChannels&&!t.isFetchingMoreChannels&&t.currentCursor!==t.nextCursor&&t.currentChannelsCount<t.totalChannelsCount)}};let g=(0,o.Ay)(e=>c(e).searchTerm);g.meta={name:"getChannelsSearchTerm",key:"createSelectorGetChannelsSearchTerm",description:e=>c(e).searchTerm};let y=(0,o.Ay)(e=>c(e).selectedWorkspaceId);y.meta={name:"getChannelsSelectedWorkspaceId",key:"createSelectorGetChannelsSelectedWorkspaceId",description:e=>c(e).selectedWorkspaceId};let A=(0,o.Ay)(e=>c(e).hasFetchChannelsError);A.meta={name:"getFetchChannelsError",key:"createSelectorGetFetchChannelsError",description:e=>c(e).hasFetchChannelsError};let x=(0,o.Ay)(e=>c(e).sortBy);x.meta={name:"getSortBy",key:"createSelectorGetSortBy",description:e=>c(e).sortBy};let E=(0,o.Ay)(e=>c(e).sortDir);E.meta={name:"getSortDir",key:"createSelectorGetSortDir",description:e=>c(e).sortDir};let C=(0,i.Ay)("admin-assign-channels/setLoadingChannels");C.meta={name:"setLoadingChannels",key:"createActionSetLoadingChannels",description:"admin-assign-channels/setLoadingChannels"};let k=(0,i.Ay)("admin-assign-channels/setFetchChannelsError");k.meta={name:"setHasFetchChannelsError",key:"createActionSetHasFetchChannelsError",description:"admin-assign-channels/setFetchChannelsError"};let v=(0,i.Ay)("admin-assign-channels/setInitialChannels");v.meta={name:"setInitialChannels",key:"createActionSetInitialChannels",description:"admin-assign-channels/setInitialChannels"};let S=(0,i.Ay)("admin-assign-channels/setSearchChannels");S.meta={name:"setSearchChannels",key:"createActionSetSearchChannels",description:"admin-assign-channels/setSearchChannels"};let I=(0,i.Ay)("admin-assign-channels/setNextPageOfChannels");I.meta={name:"setNextPageOfChannels",key:"createActionSetNextPageOfChannels",description:"admin-assign-channels/setNextPageOfChannels"};let w=(0,i.Ay)("admin-assign-channels/setChannelsSearchTerm");w.meta={name:"setChannelsSearchTerm",key:"createActionSetChannelsSearchTerm",description:"admin-assign-channels/setChannelsSearchTerm"};let T=(0,i.Ay)("admin-assign-channels/setChannelsSelectedWorkspaceId");T.meta={name:"setChannelsSelectedWorkspaceId",key:"createActionSetChannelsSelectedWorkspaceId",description:"admin-assign-channels/setChannelsSelectedWorkspaceId"};let N=(0,i.Ay)("admin-assign-channels/setChannelsSort");N.meta={name:"setChannelsSort",key:"createActionSetChannelsSort",description:"admin-assign-channels/setChannelsSort"};let M=(0,i.Ay)("admin-assign-channels/resetState");M.meta={name:"resetAssignChannelsState",key:"createActionResetAssignChannelsState",description:"admin-assign-channels/resetState"};let R=(0,l.Ay)({},s).on(C,(e,t)=>({...e,...t})).on(k,(e,t)=>({...e,...t})).on(v,(e,t)=>({...e,isLoadingChannels:!1,...t,...t.channelSearchResponse&&(0,r._h)(t.channelSearchResponse)})).on(S,(e,t)=>({...e,isLoadingChannels:!1,...t.channelSearchResponse&&(0,r._h)(t.channelSearchResponse)})).on(I,(e,t)=>({...e,isFetchingMoreChannels:!1,...(0,r.eV)(e,t.channelSearchResponse)})).on(w,(e,t)=>({...e,nextCursor:void 0,searchTerm:t.searchTerm})).on(T,(e,t)=>({...e,nextCursor:void 0,selectedWorkspaceId:t.selectedWorkspaceId})).on(N,(e,t)=>({...e,nextCursor:void 0,sortBy:t.sortBy,sortDir:t.sortDir})).on(M,()=>({...s}))},0x1b437f2b0:(e,t,a)=>{"use strict";a.d(t,{LM:()=>i,ZS:()=>getSearchOrgChannelsParams,_h:()=>processChannelSearchResponse,eV:()=>processChannelsPagination});var n=a(0x1aa941557),r=a(0x12f409c9c);let processChannelSearchResponse=e=>({nextCursor:e.next_cursor,totalChannelsCount:e.total_count??0,currentChannelsCount:e.channels.length,channelsList:e.channels.map(e=>({...e,is_channel:!0})),channelsDictionary:(0,n.A)(e.channels,"id")}),processChannelsPagination=(e,t)=>{if(!t)return{};let{nextCursor:a,currentChannelsCount:n,channelsList:r,channelsDictionary:i}=e,l=t&&processChannelSearchResponse(t),o=l?.currentChannelsCount??0;return l?{currentCursor:a,nextCursor:l?.nextCursor,currentChannelsCount:n+o,channelsList:[...r,...l.channelsList],channelsDictionary:{...i,...l.channelsDictionary}}:{}},i="ALL_WORKSPACES",getSearchOrgChannelsParams=({autoProvisionedWorkspaces:e,searchTerm:t,nextCursor:a,teamId:n,sortBy:l="name",sortDir:o=r.Pg.ASC})=>{let s={search_channel_types:["exclude_archived"],sort:l,sort_dir:o,limit:20};t&&(s.query=t),a&&(s.cursor=a);let c=[];return(c=n&&n!==i?[n]:e.map(e=>e.id)).length>0&&(s.team_ids=c),0===c.length&&s.search_channel_types?.push("org_wide"),s}},0x74f96e84:(e,t,a)=>{"use strict";a.d(t,{GG:()=>g,JK:()=>u,JW:()=>d,Nc:()=>p,O3:()=>b,Po:()=>C,Q:()=>E,QT:()=>s,Xz:()=>m,Ys:()=>h,Z4:()=>c,as:()=>x,es:()=>S,fg:()=>f,hE:()=>v,m2:()=>y,mq:()=>k,rx:()=>_,sS:()=>A});var n=a(0xcf658893),r=a(0xba77ecb9),i=a(0x1cf0d97e1);let l={isLoadingMembers:!1,isFetchingMoreMembers:!1,hasFetchedInitialMembers:!1,fetchMembersError:void 0,orgOrTeamMembers:[],totalMembersCount:0,currentMembersCount:0,nextCursorMark:void 0,searchTerm:void 0},o=(0,i.Ay)(e=>e.adminUserGroups.adminAssignMembersTableReducer);o.meta={name:"getAdminAssignMembersState",key:"createSelectorGetAdminAssignMembersState",description:e=>e.adminUserGroups.adminAssignMembersTableReducer};let s=(0,i.Ay)(e=>o(e).isLoadingMembers);s.meta={name:"getIsLoadingMembers",key:"createSelectorGetIsLoadingMembers",description:e=>o(e).isLoadingMembers};let c=(0,i.Ay)(e=>o(e).isFetchingMoreMembers);c.meta={name:"getIsFetchingMoreMembers",key:"createSelectorGetIsFetchingMoreMembers",description:e=>o(e).isFetchingMoreMembers};let d=(0,i.Ay)(e=>o(e).hasFetchedInitialMembers);d.meta={name:"getHasFetchedInitialMembers",key:"createSelectorGetHasFetchedInitialMembers",description:e=>o(e).hasFetchedInitialMembers};let m=(0,i.Ay)(e=>o(e).nextCursorMark);m.meta={name:"getNextCursorMark",key:"createSelectorGetNextCursorMark",description:e=>o(e).nextCursorMark};let u=(0,i.Ay)(e=>o(e).searchTerm);u.meta={name:"getTableFilterQuery",key:"createSelectorGetTableFilterQuery",description:e=>o(e).searchTerm};let p=(0,i.Ay)(e=>o(e).totalMembersCount);p.meta={name:"getTotalMembersCount",key:"createSelectorGetTotalMembersCount",description:e=>o(e).totalMembersCount};let h=(0,i.Ay)(e=>o(e).currentMembersCount);h.meta={name:"getCurrentMembersCount",key:"createSelectorGetCurrentMembersCount",description:e=>o(e).currentMembersCount};let _=(0,i.Ay)(e=>o(e).orgOrTeamMembers);_.meta={name:"getAvailableMembers",key:"createSelectorGetAvailableMembers",description:e=>o(e).orgOrTeamMembers};let f=(0,i.Ay)(e=>{let t=o(e);return!!(t.hasFetchedInitialMembers&&!t.isFetchingMoreMembers&&t.nextCursorMark&&t.currentMembersCount<t.totalMembersCount)});f.meta={name:"getCanFetchMoreMembers",key:"createSelectorGetCanFetchMoreMembers",description:e=>{let t=o(e);return!!(t.hasFetchedInitialMembers&&!t.isFetchingMoreMembers&&t.nextCursorMark&&t.currentMembersCount<t.totalMembersCount)}};let b=(0,i.Ay)(e=>{let t=o(e);return t.hasFetchedInitialMembers&&!t.isLoadingMembers});b.meta={name:"getCanSearchMembers",key:"createSelectorGetCanSearchMembers",description:e=>{let t=o(e);return t.hasFetchedInitialMembers&&!t.isLoadingMembers}};let g=(0,i.Ay)(e=>o(e).searchTerm);g.meta={name:"getMembersSearchTerm",key:"createSelectorGetMembersSearchTerm",description:e=>o(e).searchTerm};let y=(0,n.Ay)("admin-assign-members/setLoadingMembers");y.meta={name:"setLoadingMembers",key:"createActionSetLoadingMembers",description:"admin-assign-members/setLoadingMembers"};let A=(0,n.Ay)("admin-assign-members/setFetchMembersError");A.meta={name:"setFetchMembersError",key:"createActionSetFetchMembersError",description:"admin-assign-members/setFetchMembersError"};let x=(0,n.Ay)("admin-assign-members/setInitialMembers");x.meta={name:"setInitialMembers",key:"createActionSetInitialMembers",description:"admin-assign-members/setInitialMembers"};let E=(0,n.Ay)("admin-assign-members/setSearchMembers");E.meta={name:"setSearchMembers",key:"createActionSetSearchMembers",description:"admin-assign-members/setSearchMembers"};let C=(0,n.Ay)("admin-assign-members/setNextPageOfMembers");C.meta={name:"setNextPageOfMembers",key:"createActionSetNextPageOfMembers",description:"admin-assign-members/setNextPageOfMembers"};let k=(0,n.Ay)("admin-assign-members/setMembersSearchTerm");k.meta={name:"setMembersSearchTerm",key:"createActionSetMembersSearchTerm",description:"admin-assign-members/setMembersSearchTerm"};let v=(0,n.Ay)("admin-assign-members/resetState");v.meta={name:"resetAssignMembersState",key:"createActionResetAssignMembersState",description:"admin-assign-members/resetState"};let S=(0,r.Ay)({},l).on(y,(e,t)=>({...e,...t})).on(A,(e,t)=>({...e,...t})).on(x,(e,t)=>({...e,isLoadingMembers:!1,...t})).on(E,(e,t)=>({...e,isLoadingMembers:!1,orgOrTeamMembers:t.orgOrTeamMembers,totalMembersCount:t.totalMembersCount,currentMembersCount:t.currentMembersCount,nextCursorMark:t.nextCursorMark})).on(C,(e,t)=>({...e,isFetchingMoreMembers:!1,orgOrTeamMembers:[...e.orgOrTeamMembers,...t.orgOrTeamMembers],currentMembersCount:e.currentMembersCount+t.orgOrTeamMembers.length,nextCursorMark:t.nextCursorMark})).on(k,(e,t)=>({...e,searchTerm:t.searchTerm})).on(v,()=>({...l}))},0x122bfe75a:(e,t,a)=>{"use strict";a.d(t,{vg:()=>I,MD:()=>f,kU:()=>b,Df:()=>_,rW:()=>y,ac:()=>m,oD:()=>d,lp:()=>c,Xz:()=>u,JK:()=>p,_K:()=>h,Zf:()=>g,J8:()=>x,mN:()=>E,Z3:()=>A,Iq:()=>k,Nw:()=>C,D:()=>v});var n=a(0x1aa941557);let processWorkspaceSearchResponse=e=>({nextCursorMark:e.next_cursor_mark,totalWorkspacesCount:e.num_found??0,currentWorkspacesCount:e.items.length,workspacesList:e.items,workspacesDictionary:(0,n.A)(e.items,"id")});var r=a(0xcf658893),i=a(0xba77ecb9),l=a(0x1cf0d97e1);let o={isLoadingWorkspaces:!1,isFetchingMoreWorkspaces:!1,hasFetchedInitialWorkspaces:!1,hasFetchWorkspacesError:!1,workspacesList:[],workspacesDictionary:{},totalWorkspacesCount:0,currentWorkspacesCount:0,currentCursorMark:void 0,nextCursorMark:void 0,searchTerm:void 0},s=(0,l.Ay)(e=>e.adminUserGroups.adminAssignWorkspacesTableReducer);s.meta={name:"getAdminAssignWorkspacesState",key:"createSelectorGetAdminAssignWorkspacesState",description:e=>e.adminUserGroups.adminAssignWorkspacesTableReducer};let c=(0,l.Ay)(e=>s(e).isLoadingWorkspaces);c.meta={name:"getIsLoadingWorkspaces",key:"createSelectorGetIsLoadingWorkspaces",description:e=>s(e).isLoadingWorkspaces};let d=(0,l.Ay)(e=>s(e).isFetchingMoreWorkspaces);d.meta={name:"getIsFetchingMoreWorkspaces",key:"createSelectorGetIsFetchingMoreWorkspaces",description:e=>s(e).isFetchingMoreWorkspaces};let m=(0,l.Ay)(e=>s(e).hasFetchedInitialWorkspaces);m.meta={name:"getHasFetchedInitialWorkspaces",key:"createSelectorGetHasFetchedInitialWorkspaces",description:e=>s(e).hasFetchedInitialWorkspaces},(0,l.Ay)(e=>s(e).currentCursorMark).meta={name:"getCurrentCursorMark",key:"createSelectorGetCurrentCursorMark",description:e=>s(e).currentCursorMark};let u=(0,l.Ay)(e=>s(e).nextCursorMark);u.meta={name:"getNextCursorMark",key:"createSelectorGetNextCursorMark",description:e=>s(e).nextCursorMark};let p=(0,l.Ay)(e=>s(e).searchTerm);p.meta={name:"getTableFilterQuery",key:"createSelectorGetTableFilterQuery",description:e=>s(e).searchTerm};let h=(0,l.Ay)(e=>s(e).totalWorkspacesCount);h.meta={name:"getTotalWorkspacesCount",key:"createSelectorGetTotalWorkspacesCount",description:e=>s(e).totalWorkspacesCount};let _=(0,l.Ay)(e=>s(e).currentWorkspacesCount);_.meta={name:"getCurrentWorkspacesCount",key:"createSelectorGetCurrentWorkspacesCount",description:e=>s(e).currentWorkspacesCount};let f=(0,l.Ay)(e=>s(e).workspacesList);f.meta={name:"getAvailableWorkspaces",key:"createSelectorGetAvailableWorkspaces",description:e=>s(e).workspacesList},(0,l.Ay)(e=>s(e).workspacesDictionary).meta={name:"getWorkspacesDictionary",key:"createSelectorGetWorkspacesDictionary",description:e=>s(e).workspacesDictionary};let b=(0,l.Ay)(e=>{let t=s(e);return!!(t.hasFetchedInitialWorkspaces&&!t.isLoadingWorkspaces&&!t.isFetchingMoreWorkspaces&&t.currentCursorMark!==t.nextCursorMark&&t.currentWorkspacesCount<t.totalWorkspacesCount)});b.meta={name:"getCanFetchMoreWorkspaces",key:"createSelectorGetCanFetchMoreWorkspaces",description:e=>{let t=s(e);return!!(t.hasFetchedInitialWorkspaces&&!t.isLoadingWorkspaces&&!t.isFetchingMoreWorkspaces&&t.currentCursorMark!==t.nextCursorMark&&t.currentWorkspacesCount<t.totalWorkspacesCount)}};let g=(0,l.Ay)(e=>s(e).searchTerm);g.meta={name:"getWorkspacesSearchTerm",key:"createSelectorGetWorkspacesSearchTerm",description:e=>s(e).searchTerm};let y=(0,l.Ay)(e=>s(e).hasFetchWorkspacesError);y.meta={name:"getFetchWorkspacesError",key:"createSelectorGetFetchWorkspacesError",description:e=>s(e).hasFetchWorkspacesError};let A=(0,r.Ay)("admin-assign-workspaces/setLoadingWorkspaces");A.meta={name:"setLoadingWorkspaces",key:"createActionSetLoadingWorkspaces",description:"admin-assign-workspaces/setLoadingWorkspaces"};let x=(0,r.Ay)("admin-assign-workspaces/setFetchWorkspacesError");x.meta={name:"setHasFetchWorkspacesError",key:"createActionSetHasFetchWorkspacesError",description:"admin-assign-workspaces/setFetchWorkspacesError"};let E=(0,r.Ay)("admin-assign-workspaces/setInitialWorkspaces");E.meta={name:"setInitialWorkspaces",key:"createActionSetInitialWorkspaces",description:"admin-assign-workspaces/setInitialWorkspaces"};let C=(0,r.Ay)("admin-assign-workspaces/setSearchWorkspaces");C.meta={name:"setSearchWorkspaces",key:"createActionSetSearchWorkspaces",description:"admin-assign-workspaces/setSearchWorkspaces"};let k=(0,r.Ay)("admin-assign-workspaces/setNextPageOfWorkspaces");k.meta={name:"setNextPageOfWorkspaces",key:"createActionSetNextPageOfWorkspaces",description:"admin-assign-workspaces/setNextPageOfWorkspaces"};let v=(0,r.Ay)("admin-assign-workspaces/setWorkspacesSearchTerm");v.meta={name:"setWorkspacesSearchTerm",key:"createActionSetWorkspacesSearchTerm",description:"admin-assign-workspaces/setWorkspacesSearchTerm"};let S=(0,r.Ay)("admin-assign-workspaces/resetState");S.meta={name:"resetAssignWorkspacesState",key:"createActionResetAssignWorkspacesState",description:"admin-assign-workspaces/resetState"};let I=(0,i.Ay)({},o).on(A,(e,t)=>({...e,...t})).on(x,(e,t)=>({...e,...t})).on(E,(e,t)=>({...e,isLoadingWorkspaces:!1,...t,...t.workspaceSearchResponse&&processWorkspaceSearchResponse(t.workspaceSearchResponse)})).on(C,(e,t)=>({...e,isLoadingWorkspaces:!1,...t.workspaceSearchResponse&&processWorkspaceSearchResponse(t.workspaceSearchResponse)})).on(k,(e,t)=>({...e,isFetchingMoreWorkspaces:!1,...((e,t)=>{if(!t)return{};let{nextCursorMark:a,currentWorkspacesCount:n,workspacesList:r,workspacesDictionary:i}=e,l=t&&processWorkspaceSearchResponse(t),o=l?.currentWorkspacesCount??0;return l?{currentCursorMark:a,nextCursorMark:l?.nextCursorMark,currentWorkspacesCount:n+o,workspacesList:[...r,...l.workspacesList],workspacesDictionary:{...i,...l.workspacesDictionary}}:{}})(e,t.workspaceSearchResponse)})).on(v,(e,t)=>({...e,searchTerm:t.searchTerm})).on(S,()=>({...o}))},0x736a4c2f:(e,t,a)=>{"use strict";a.d(t,{$f:()=>m,F5:()=>p,I6:()=>d,Jx:()=>v,NI:()=>y,Ss:()=>f,T0:()=>x,Uk:()=>b,Vi:()=>c,hp:()=>E,hq:()=>u,iF:()=>_,ii:()=>A,oz:()=>k,rT:()=>g,vg:()=>C});var n=a(0x12f409c9c),r=a(0x2372d1374),i=a(0xcf658893),l=a(0xba77ecb9),o=a(0x1cf0d97e1);let s={isLoadingAdminUserGroupChannels:!1,hasAdminUserGroupChannelsApiError:!1,isRemovingAdminUserGroupChannels:!1,hasRemovingAdminUserGroupChannelsError:!1,sortDirection:n.Pg.ASC,sortBy:r.OR.Name},c=(0,i.Ay)("Set the loading/completion state on the fetch of admin user group channels");c.meta={name:"setLoadOfAdminUserGroupChannels",key:"createActionSetLoadOfAdminUserGroupChannels",description:"Set the loading/completion state on the fetch of admin user group channels"};let d=(0,i.Ay)("Handle change of the user group channels search term");d.meta={name:"setAdminUserGroupChannelsSearchTerm",key:"createActionSetAdminUserGroupChannelsSearchTerm",description:"Handle change of the user group channels search term"};let m=(0,i.Ay)("Set sort direction for the user group channels fetch");m.meta={name:"setAdminUserGroupChannelsSortDirection",key:"createActionSetAdminUserGroupChannelsSortDirection",description:"Set sort direction for the user group channels fetch"};let u=(0,i.Ay)("Set sort column for the user group channels fetch");u.meta={name:"setAdminUserGroupChannelsSortBy",key:"createActionSetAdminUserGroupChannelsSortBy",description:"Set sort column for the user group channels fetch"};let p=(0,i.Ay)("Set the loading/completion state on the removal of admin user group channels");p.meta={name:"setRemovingAdminUserGroupChannels",key:"createActionSetRemovingAdminUserGroupChannels",description:"Set the loading/completion state on the removal of admin user group channels"};let h=(0,o.Ay)(e=>e.adminUserGroups.userGroupChannelsReducer);h.meta={name:"getAdminUserGroupChannelsState",key:"createSelectorGetAdminUserGroupChannelsState",description:e=>e.adminUserGroups.userGroupChannelsReducer};let _=(0,o.Ay)(e=>h(e).isLoadingAdminUserGroupChannels);_.meta={name:"getIsLoadingAdminUserGroupChannels",key:"createSelectorGetIsLoadingAdminUserGroupChannels",description:e=>h(e).isLoadingAdminUserGroupChannels};let f=(0,o.Ay)(e=>h(e).hasAdminUserGroupChannelsApiError);f.meta={name:"hasUserGroupChannelFetchError",key:"createSelectorHasUserGroupChannelFetchError",description:e=>h(e).hasAdminUserGroupChannelsApiError};let b=(0,o.Ay)(e=>h(e).adminUserGroupChannelsSearchTerm);b.meta={name:"getAdminUserGroupChannelsSearchTerm",key:"createSelectorGetAdminUserGroupChannelsSearchTerm",description:e=>h(e).adminUserGroupChannelsSearchTerm};let g=(0,o.Ay)(e=>h(e).sortDirection);g.meta={name:"getAdminUserGroupChannelsSortDirection",key:"createSelectorGetAdminUserGroupChannelsSortDirection",description:e=>h(e).sortDirection};let y=(0,o.Ay)(e=>h(e).sortBy);y.meta={name:"getAdminUserGroupChannelsSortBy",key:"createSelectorGetAdminUserGroupChannelsSortBy",description:e=>h(e).sortBy};let A=(0,o.Ay)(e=>h(e).adminUserGroupChannelsResponse?.channels);A.meta={name:"getAdminUserGroupChannels",key:"createSelectorGetAdminUserGroupChannels",description:e=>h(e).adminUserGroupChannelsResponse?.channels};let x=(0,o.Ay)(e=>A(e)?.length??0);x.meta={name:"getAdminUserGroupChannelsCount",key:"createSelectorGetAdminUserGroupChannelsCount",description:e=>A(e)?.length??0};let E=(0,o.Ay)((e,t)=>A(e)?.find(e=>e.id===t));E.meta={name:"getAdminUserGroupChannelById",key:"createSelectorGetAdminUserGroupChannelById",description:(e,t)=>A(e)?.find(e=>e.id===t)};let C=(0,o.Ay)((e,t)=>h(e).currentlyFetchedUsergroupId===t);C.meta={name:"hasFetchedChannelsForUserGroup",key:"createSelectorHasFetchedChannelsForUserGroup",description:(e,t)=>h(e).currentlyFetchedUsergroupId===t};let k=(0,o.Ay)(e=>({isRemovingAdminUserGroupChannels:h(e).isRemovingAdminUserGroupChannels,hasRemovingAdminUserGroupChannelsError:h(e).hasRemovingAdminUserGroupChannelsError}));k.meta={name:"getRemovingAdminUserGroupChannelsState",key:"createSelectorGetRemovingAdminUserGroupChannelsState",description:e=>({isRemovingAdminUserGroupChannels:h(e).isRemovingAdminUserGroupChannels,hasRemovingAdminUserGroupChannelsError:h(e).hasRemovingAdminUserGroupChannelsError})};let v=(0,l.Ay)({},s).on(c,(e,t)=>({...e,...t})).on(d,(e,{adminUserGroupChannelsSearchTerm:t})=>({...e,adminUserGroupChannelsSearchTerm:t})).on(p,(e,t)=>({...e,...t})).on(m,(e,t)=>({...e,...t})).on(u,(e,t)=>({...e,...t}))},0x58318c27:(e,t,a)=>{"use strict";a.d(t,{Be:()=>d,FM:()=>f,HS:()=>L,Iu:()=>p,K_:()=>M,Pw:()=>k,Rg:()=>x,Ux:()=>I,X3:()=>N,Yr:()=>c,Yy:()=>A,ZI:()=>b,bw:()=>v,dZ:()=>E,el:()=>R,fP:()=>P,fV:()=>m,g7:()=>T,lO:()=>g,lb:()=>C,n6:()=>_,qc:()=>O,qi:()=>u,tP:()=>h,u9:()=>y,vq:()=>S,xn:()=>w});var n=a(0x12f409c9c),r=a(0xcf658893),i=a(0xba77ecb9),l=a(0x1cf0d97e1);let o={isLoadingUserGroupMembers:!1,isLoadingAdditionalUserGroupMembers:!1,hasLoadedInitialUserGroupMembers:!1,isSearchingUserGroupMembers:!1,hasUserGroupMemberApiError:!1,userGroupMembersList:[],sortDirection:n.Pg.ASC,isRemovingMembers:!1,hasRemovingMembersError:!1,isUploadingCsv:!1},s=(0,l.Ay)(e=>e.adminUserGroups.userGroupMembersReducer);s.meta={name:"getAdminUserGroupMembersState",key:"createSelectorGetAdminUserGroupMembersState",description:e=>e.adminUserGroups.userGroupMembersReducer};let c=(0,l.Ay)(e=>s(e).isLoadingUserGroupMembers);c.meta={name:"getIsLoadingUserGroupMembers",key:"createSelectorGetIsLoadingUserGroupMembers",description:e=>s(e).isLoadingUserGroupMembers};let d=(0,l.Ay)(e=>s(e).hasLoadedInitialUserGroupMembers);d.meta={name:"getHasLoadedInitialUserGroupMembers",key:"createSelectorGetHasLoadedInitialUserGroupMembers",description:e=>s(e).hasLoadedInitialUserGroupMembers};let m=(0,l.Ay)(e=>s(e).hasUserGroupMemberApiError);m.meta={name:"getHasUserGroupMemberApiError",key:"createSelectorGetHasUserGroupMemberApiError",description:e=>s(e).hasUserGroupMemberApiError};let u=(0,l.Ay)(e=>s(e).isSearchingUserGroupMembers);u.meta={name:"getIsSearchingUserGroupMembers",key:"createSelectorGetIsSearchingUserGroupMembers",description:e=>s(e).isSearchingUserGroupMembers};let p=(0,l.Ay)(e=>s(e).userGroupMembersList);p.meta={name:"getUserGroupMembersList",key:"createSelectorGetUserGroupMembersList",description:e=>s(e).userGroupMembersList};let h=(0,l.Ay)(e=>s(e).userGroupMemberSearchTerm);h.meta={name:"getUserGroupMemberSearchTerm",key:"createSelectorGetUserGroupMemberSearchTerm",description:e=>s(e).userGroupMemberSearchTerm};let _=(0,l.Ay)(e=>s(e).nextCursorMark);_.meta={name:"getUserGroupMemberNextCursorMark",key:"createSelectorGetUserGroupMemberNextCursorMark",description:e=>s(e).nextCursorMark};let f=(0,l.Ay)(e=>s(e).isLoadingAdditionalUserGroupMembers);f.meta={name:"getIsLoadingAdditionalUserGroupMembers",key:"createSelectorGetIsLoadingAdditionalUserGroupMembers",description:e=>s(e).isLoadingAdditionalUserGroupMembers};let b=(0,l.Ay)(e=>{let t=s(e);return!t.isSearchingUserGroupMembers&&!t.isLoadingUserGroupMembers&&!t.isLoadingAdditionalUserGroupMembers&&t.userGroupMembersList.length<(t.totalGroupMembers||0)});b.meta={name:"getCanFetchMoreUserGroupMembers",key:"createSelectorGetCanFetchMoreUserGroupMembers",description:e=>{let t=s(e);return!t.isSearchingUserGroupMembers&&!t.isLoadingUserGroupMembers&&!t.isLoadingAdditionalUserGroupMembers&&t.userGroupMembersList.length<(t.totalGroupMembers||0)}};let g=(0,l.Ay)(e=>s(e).totalGroupMembers);g.meta={name:"getTotalGroupMembers",key:"createSelectorGetTotalGroupMembers",description:e=>s(e).totalGroupMembers};let y=(0,l.Ay)(e=>s(e).sortDirection);y.meta={name:"getUserGroupMemberSortDirection",key:"createSelectorGetUserGroupMemberSortDirection",description:e=>s(e).sortDirection};let A=(0,l.Ay)(e=>!c(e)&&d(e)&&!u(e)&&!f(e));A.meta={name:"getCanSearchUserGroupMembers",key:"createSelectorGetCanSearchUserGroupMembers",description:e=>!c(e)&&d(e)&&!u(e)&&!f(e)};let x=(0,l.Ay)(e=>s(e).isRemovingMembers);x.meta={name:"getIsRemovingUserGroupMembers",key:"createSelectorGetIsRemovingUserGroupMembers",description:e=>s(e).isRemovingMembers};let E=(0,l.Ay)(e=>s(e).membersToBeRemoved);E.meta={name:"getGroupMembersToBeRemoved",key:"createSelectorGetGroupMembersToBeRemoved",description:e=>s(e).membersToBeRemoved};let C=(0,l.Ay)(e=>s(e).hasRemovingMembersError);C.meta={name:"getHasRemovingUserGroupMembersError",key:"createSelectorGetHasRemovingUserGroupMembersError",description:e=>s(e).hasRemovingMembersError};let k=(0,l.Ay)(e=>s(e).isUploadingCsv);k.meta={name:"getIsUploadingUserCsv",key:"createSelectorGetIsUploadingUserCsv",description:e=>s(e).isUploadingCsv};let v=(0,l.Ay)(e=>s(e).uploadCsvError);v.meta={name:"getUploadUserCsvError",key:"createSelectorGetUploadUserCsvError",description:e=>s(e).uploadCsvError};let S=(0,l.Ay)(e=>s(e).csvUploadSuccessfulUsers);S.meta={name:"getCsvUploadSuccessfulMemberCount",key:"createSelectorGetCsvUploadSuccessfulMemberCount",description:e=>s(e).csvUploadSuccessfulUsers};let I=(0,l.Ay)(e=>s(e).csvUploadFailedMembers);I.meta={name:"getCsvUploadFailedMembers",key:"createSelectorGetCsvUploadFailedMembers",description:e=>s(e).csvUploadFailedMembers};let w=(0,r.Ay)("Set the loading/completion state on the initial fetch of members for a user group");w.meta={name:"setInitialUserGroupMemberLoad",key:"createActionSetInitialUserGroupMemberLoad",description:"Set the loading/completion state on the initial fetch of members for a user group"};let T=(0,r.Ay)("Set the loading/completion state on the initial fetch of members for a user group");T.meta={name:"addMoreUserGroupMembers",key:"createActionAddMoreUserGroupMembers",description:"Set the loading/completion state on the initial fetch of members for a user group"};let N=(0,r.Ay)("Set whether the user group member fetch encountered an error");N.meta={name:"setHasUserGroupMemberApiError",key:"createActionSetHasUserGroupMemberApiError",description:"Set whether the user group member fetch encountered an error"};let M=(0,r.Ay)("Set the state when searching for user group members");M.meta={name:"setSearchingUserGroupMembers",key:"createActionSetSearchingUserGroupMembers",description:"Set the state when searching for user group members"};let R=(0,r.Ay)("Set sort direction for the user group member fetch");R.meta={name:"setUserGroupMemberSortDirection",key:"createActionSetUserGroupMemberSortDirection",description:"Set sort direction for the user group member fetch"};let P=(0,r.Ay)("Set state for removing user group members");P.meta={name:"setIsRemovingUserGroupMembers",key:"createActionSetIsRemovingUserGroupMembers",description:"Set state for removing user group members"};let L=(0,r.Ay)("Set state for uploading a user csv");L.meta={name:"setIsUploadingUserCsv",key:"createActionSetIsUploadingUserCsv",description:"Set state for uploading a user csv"};let O=(0,i.Ay)({},o).on(w,(e,t)=>({...e,...t,membersToBeRemoved:void 0})).on(T,(e,t)=>{let a=e.userGroupMembersList.concat(t.membersToAdd??[]);return{...e,userGroupMembersList:a,...t}}).on(M,(e,t)=>({...e,...t})).on(N,(e,t)=>({...e,...t})).on(R,(e,t)=>({...e,...t})).on(P,(e,t)=>({...e,...t})).on(L,(e,t)=>({...e,...t}))},0xadff3343:(e,t,a)=>{"use strict";a.d(t,{Du:()=>c,HQ:()=>x,KW:()=>_,MZ:()=>b,WE:()=>E,aS:()=>h,bN:()=>d,c3:()=>f,k1:()=>m,lI:()=>g,p6:()=>k,pe:()=>y,qO:()=>C,sl:()=>A,tL:()=>u,xQ:()=>p});var n=a(0x12f409c9c),r=a(0xcf658893),i=a(0xba77ecb9),l=a(0x1cf0d97e1);let o={isLoadingUserGroupWorkspaces:!1,hasUserGroupWorkspacesApiError:!1,userGroupWorkspacesList:[],workspacesSortDir:n.Pg.ASC,isRemovingWorkspaces:!1,hasRemovingWorkspacesError:!1,isSettingProvisioning:!1,hasSettingProvisioningError:!1},s=(0,l.Ay)(e=>e.adminUserGroups.userGroupWorkspacesReducer);s.meta={name:"getAdminUserGroupWorkspacesState",key:"createSelectorGetAdminUserGroupWorkspacesState",description:e=>e.adminUserGroups.userGroupWorkspacesReducer};let c=(0,l.Ay)(e=>s(e).isLoadingUserGroupWorkspaces);c.meta={name:"getIsLoadingUserGroupWorkspaces",key:"createSelectorGetIsLoadingUserGroupWorkspaces",description:e=>s(e).isLoadingUserGroupWorkspaces};let d=(0,l.Ay)(e=>s(e).userGroupWorkspacesList);d.meta={name:"getUserGroupWorkspacesList",key:"createSelectorGetUserGroupWorkspacesList",description:e=>s(e).userGroupWorkspacesList};let m=(0,l.Ay)(e=>s(e).workspacesSortDir);m.meta={name:"getUserGroupWorkspacesSortDir",key:"createSelectorGetUserGroupWorkspacesSortDir",description:e=>s(e).workspacesSortDir};let u=(0,l.Ay)(e=>s(e).searchTerm);u.meta={name:"getUserGroupWorkspacesSearchTerm",key:"createSelectorGetUserGroupWorkspacesSearchTerm",description:e=>s(e).searchTerm};let p=(0,l.Ay)(e=>s(e).hasUserGroupWorkspacesApiError);p.meta={name:"getHasUserGroupWorkspacesApiError",key:"createSelectorGetHasUserGroupWorkspacesApiError",description:e=>s(e).hasUserGroupWorkspacesApiError};let h=(0,l.Ay)(e=>s(e).isRemovingWorkspaces);h.meta={name:"getIsRemovingUserGroupWorkspaces",key:"createSelectorGetIsRemovingUserGroupWorkspaces",description:e=>s(e).isRemovingWorkspaces};let _=(0,l.Ay)(e=>s(e).hasRemovingWorkspacesError);_.meta={name:"getHasRemovingUserGroupWorkspacesError",key:"createSelectorGetHasRemovingUserGroupWorkspacesError",description:e=>s(e).hasRemovingWorkspacesError};let f=(0,l.Ay)(e=>s(e).isSettingProvisioning);f.meta={name:"getIsSettingProvisioning",key:"createSelectorGetIsSettingProvisioning",description:e=>s(e).isSettingProvisioning};let b=(0,l.Ay)(e=>s(e).hasSettingProvisioningError);b.meta={name:"getHasSettingProvisioningError",key:"createSelectorGetHasSettingProvisioningError",description:e=>s(e).hasSettingProvisioningError};let g=(0,r.Ay)("Set the loading/completion state on the fetch of workspaces for a user group");g.meta={name:"setUserGroupWorkspacesLoad",key:"createActionSetUserGroupWorkspacesLoad",description:"Set the loading/completion state on the fetch of workspaces for a user group"};let y=(0,r.Ay)("Set whether the user group workspace fetch encountered an error");y.meta={name:"setHasUserGroupWorkspacesApiError",key:"createActionSetHasUserGroupWorkspacesApiError",description:"Set whether the user group workspace fetch encountered an error"};let A=(0,r.Ay)("Set the workspaces sort direction");A.meta={name:"setUserGroupWorkspacesSortDir",key:"createActionSetUserGroupWorkspacesSortDir",description:"Set the workspaces sort direction"};let x=(0,r.Ay)("Set the workspaces search term");x.meta={name:"setUserGroupWorkspacesSearchTerm",key:"createActionSetUserGroupWorkspacesSearchTerm",description:"Set the workspaces search term"};let E=(0,r.Ay)("Set whether workspaces are in the process of being removed");E.meta={name:"setIsRemovingUserGroupWorkspaces",key:"createActionSetIsRemovingUserGroupWorkspaces",description:"Set whether workspaces are in the process of being removed"};let C=(0,r.Ay)("Set whether workspaces are in the process of having their provisioning updated");C.meta={name:"setIsSettingProvisioning",key:"createActionSetIsSettingProvisioning",description:"Set whether workspaces are in the process of having their provisioning updated"};let k=(0,i.Ay)({},o).on(g,(e,t)=>({...e,...t})).on(y,(e,t)=>({...e,...t})).on(A,(e,t)=>({...e,...t})).on(x,(e,t)=>({...e,...t})).on(E,(e,t)=>({...e,...t})).on(C,(e,t)=>({...e,...t}))},0x1febbac71:(e,t,a)=>{"use strict";a.d(t,{$:()=>AddAgentToWorkspacesModal});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x16ac9b089),l=a(0x2b7f0bcc),o=a(0x11a296110),s=a(0xb1ea448c),c=a(0x1e217163d),d=a(0x14730ef50),m=a(0x3c520b5a),u=a(0x8d4311a9),p=a(0x18647f64a),h=a(0x200936397),_=a(0x1a66e3ba3),f=a(0x20e80190e);let b=new r.Ay("enterprise_dashboard"),AddAgentToWorkspacesModal=({agentAppId:e,agentName:t,agentImage:a,onUpdate:r})=>{let{workspaces:g,isLoading:y,error:A}=(0,m.p)({appId:e,mode:_.$7.GRANT}),{handleClick:x,onSelectedWorkspacesChange:E,selectedWorkspaceIds:C,isLoading:k,hasError:v}=(0,d.M)("add",e,t,r),S=v||null!==A;return n.createElement(f.aF,{maxWidth:640},n.createElement(f.rQ,null,n.createElement(p.V,{agentImageSrc:a,title:b.t("Add {agentName} to more workspaces",{agentName:(0,i.Ay)(t)})})),n.createElement(f.$m,null,n.createElement(h.a,{paddingInline:"100"},n.createElement(c.B,{space:"100"},S&&n.createElement(l.Ay,{type:l.QE.boxed,level:l.A_.error},b.rt("Something went wrong. Try again in a few minutes.")),y?n.createElement(s.A,{size:"jumbo"}):n.createElement(u.W,{onSelectedWorkspacesChange:E,selectedWorkspaceIds:C,mode:"add",availableWorkspaces:g})))),n.createElement(f.jl,null,n.createElement(f.ox,null,n.createElement(f.s_,{type:"outline","aria-label":b.t("Cancel"),disabled:k},b.t("Cancel")),n.createElement(o.lV,{"aria-label":b.t("Add Agent To Workspaces"),onClick:x,type:"primary",disabled:0===C.length||S,loading:k},b.t("Add Agent To {workspaceCount} Workspaces",{workspaceCount:C.length})))))};AddAgentToWorkspacesModal.displayName="AddAgentToWorkspacesModal"},0xb2b7aaf:(e,t,a)=>{"use strict";a.d(t,{r:()=>RemoveAgentFromWorkspacesModal});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x16ac9b089),l=a(0x2b7f0bcc),o=a(0x11a296110),s=a(0xb1ea448c),c=a(0x1e217163d),d=a(0x14730ef50),m=a(0x3c520b5a),u=a(0x8d4311a9),p=a(0x18647f64a),h=a(0x200936397),_=a(0x1a66e3ba3),f=a(0x20e80190e);let b=new r.Ay("enterprise_dashboard"),RemoveAgentFromWorkspacesModal=({agentAppId:e,agentName:t,agentImage:a,onUpdate:r})=>{let{workspaces:g,isLoading:y,error:A}=(0,m.p)({appId:e,mode:_.$7.REVOKE}),{handleClick:x,onSelectedWorkspacesChange:E,selectedWorkspaceIds:C,isLoading:k,hasError:v}=(0,d.M)("remove",e,t,r),S=v||null!==A;return n.createElement(f.aF,{maxWidth:640},n.createElement(f.rQ,null,n.createElement(p.V,{agentImageSrc:a,title:b.t("Remove {agentName} from workspaces",{agentName:(0,i.Ay)(t)})})),n.createElement(f.$m,null,n.createElement(h.a,{paddingInline:"100"},n.createElement(c.B,{space:"100"},S&&n.createElement(l.Ay,{type:l.QE.boxed,level:l.A_.error},b.rt("Something went wrong. Try again in a few minutes.")),y?n.createElement(s.A,{size:"jumbo"}):n.createElement(u.W,{onSelectedWorkspacesChange:E,selectedWorkspaceIds:C,mode:"remove",availableWorkspaces:g})))),n.createElement(f.jl,null,n.createElement(f.ox,null,n.createElement(f.s_,{type:"outline","aria-label":b.t("Cancel"),disabled:k},b.t("Cancel")),n.createElement(o.lV,{"aria-label":b.t("Remove Agent From Workspaces"),onClick:x,type:"primary",disabled:0===C.length||S,loading:k},b.t("Remove Agent From {workspaceCount} Workspaces",{workspaceCount:C.length})))))};RemoveAgentFromWorkspacesModal.displayName="RemoveAgentFromWorkspacesModal"},0x14730ef50:(e,t,a)=>{"use strict";a.d(t,{M:()=>useAddRemoveWorkspacesFetcher});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x6e87d4ec),o=a(0x58199183),s=a(0x1eba46854),c=a(0x137d1c454),d=a(0x1fcbb004d),m=a(0x16ffed5ab);let u=new i.Ay("enterprise_dashboard"),useAddRemoveWorkspacesFetcher=(e,t,a,i)=>{let p=(0,r.wA)(),[h,_]=(0,n.useState)([]),[f,b]=(0,n.useState)(),[g,y]=(0,n.useState)(!1),A=(0,n.useCallback)(()=>{p((0,d.O)())},[p]),x=(0,n.useCallback)(e=>{_(e)},[]),E=(0,n.useCallback)(()=>{let t,r=h[0],i=Math.max(0,h.length-1);t="add"===e?u.rt("{agentName} added to {firstWorkspaceName} {remainingCount, plural, =0 {} =1 {and 1 more workspace} other {and # more workspaces}}. It may take a few minutes for it to load in Slack.",{agentName:a,firstWorkspaceName:n.createElement(o.A,{id:r}),remainingCount:i}):u.rt("{agentName} removed from {firstWorkspaceName} {remainingCount, plural, =0 {} =1 {and 1 more workspace} other {and # more workspaces}}. It may take a few minutes for it to load in Slack.",{agentName:a,firstWorkspaceName:n.createElement(o.A,{id:r}),remainingCount:i}),p((0,m.M)({element:n.createElement(l.A,{position:"bottom-right"},t)}))},[a,p,e,h]);return{handleClick:(0,n.useCallback)(async()=>{b(!0),y(!1);try{let a="add"===e?"agentInstall_add_workspaces":"agentInstall_remove_workspaces",n="add"===e?s.o:c.U;(await p(n({appId:t,teamIds:h.join(","),reason:a}))).ok?(i?.(h),E(),A()):y(!0)}catch{y(!0)}b(!1)},[t,A,p,h,i,E,e]),onSelectedWorkspacesChange:x,selectedWorkspaceIds:h,isLoading:f,hasError:g}};useAddRemoveWorkspacesFetcher.displayName="useAddRemoveWorkspacesFetcher"},0x3c520b5a:(e,t,a)=>{"use strict";a.d(t,{p:()=>useFetchExistingWorkspaces});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x2390deeee);let useFetchExistingWorkspaces=({appId:e,mode:t})=>{let a=(0,r.wA)(),[l,o]=(0,n.useState)([]),[s,c]=(0,n.useState)(null),[d,m]=(0,n.useState)("initial"),[u,p]=(0,n.useState)(null),[h,_]=(0,n.useState)(0),f=(0,n.useCallback)(async()=>{if("loading"!==d){m("loading"),p(null);try{let n=await a((0,i.C)({app:e,mode:t,limit:500,cursor:s||void 0,reason:"fetch-existing-workspaces"})),r=n.teams||[];o(e=>[...e,...r.map(e=>e.id)]);let l=n.nextCursor;c(l),_(n.filteredCount)}catch(e){p(e instanceof Error?e:Error("Failed to fetch workspaces"))}finally{m("loaded")}}},[a,e,s,d,t]);return(0,n.useEffect)(()=>{"initial"===d&&(o([]),c(null),_(0),f())},[e,f,d]),(0,n.useEffect)(()=>{"initial"!==d&&"loading"!==d&&h>l.length&&f()},[f,h,d,l.length]),{workspaces:l,isLoading:"loading"===d,error:u}}},0x8d4311a9:(e,t,a)=>{"use strict";a.d(t,{W:()=>AgentInstallWorkspaceSelect});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1165e5027),l=a(0x20482ad21),o=a(0x76d8f545);let s=new l.Ay("enterprise_dashboard"),AgentInstallWorkspaceSelectHeader=({totalCount:e,filteredCount:t,selectedCount:a,showOnlySelected:r,onSearch:i,onClear:l,onToggleShowSelected:c})=>{let d=(0,n.useMemo)(()=>({placeholder:s.t("Filter by name\u2026"),"aria-label":s.t("Filter"),onDebouncedChange:i}),[i]);return n.createElement(o.A,{selectedObjectsCount:a,onToggleShowSelected:c,onClearSelected:l,dataQaPrefix:"agent_install__select_workspaces__table_header",showOnlySelected:r,filteredObjectsCount:t,totalCountLabel:s.t("{count, plural, =1 {# workspace} other {# workspaces}}",{count:e}),searchProps:d,fullWidthInModalContentSection:!0})};AgentInstallWorkspaceSelectHeader.displayName="AgentInstallWorkspaceSelectHeader";var c=a(0xf3b0bc58),d=a(0x12f409c9c),m=a(0x197a7490d),u=a(0x1de80d519),p=a(0xb0ca8936);let h=new l.Ay("enterprise_dashboard"),WorkspaceSelectItem=({workspace:e})=>n.createElement("div",{className:"display_flex align_items_center justify_content_between flex_one padding_right_25"},n.createElement(u.e,{id:e.id}),e.isBlocked&&n.createElement(p.EY,{color:"Core/Content/Tertiary"},h.t("Blocked")),!e.isBlocked&&e.isRecommended&&n.createElement(p.EY,{color:"Core/Content/Highlight 1"},h.t("Recommended")));WorkspaceSelectItem.displayName="WorkspaceSelectItem";let _=new l.Ay("enterprise_dashboard"),f=(0,d.r9)(),WorkspaceMultiSelectTable=({workspaces:e,isLoading:t,onRowSelect:a,onSelectAllSelected:r,selectAllChecked:i,selectedWorkspaceIds:l,showOnlySelected:o,fetchMoreRows:s,isFetchingMoreRows:u})=>{let p=(0,n.useCallback)(({rowData:e})=>_.t("Select {name}",{name:e.name}),[]),h=(0,n.useCallback)(({rowData:e})=>e.isBlocked,[]),b=(0,n.useMemo)(()=>n.createElement(c.A,{description:_.t("No filtered results.")}),[]),g=(0,n.useCallback)(({rowData:e})=>e.isBlocked?d.z$.inactive:l.includes(e.id)?d.z$.selected:d.z$.selectable,[l]);return n.createElement(m.A,{dataQaPrefix:"agent_install__select_workspaces__data_table",ariaLabel:_.t("Workspaces"),checkboxAriaLabel:p,rowIdKey:"id",rowHeight:d.FL.small,height:"viewport",isLoading:t,data:e,selectedRows:l,onRowSelect:a,showOnlySelected:o,pinnedColumnCount:0,showSelectAll:!0,onSelectAll:r,selectAllChecked:i,emptyState:b,checkboxDisabled:h,fetchMoreRows:s,isFetchingMoreRows:u,getRowStyle:g},n.createElement(f,{label:_.t("Name"),width:224,flexGrow:1,dataKey:"name"},({rowData:e})=>n.createElement(WorkspaceSelectItem,{workspace:e})))};WorkspaceMultiSelectTable.displayName="WorkspaceMultiSelectTable";var b=a(0x17cc64c8),g=a(0xb1f0729f),y=a(0x226892387);let filterAndSortWorkspaces=(e,t,a,n,r="default")=>{let i=[];return"default"===r?i=e:n&&(i=e.filter(e=>n.includes(e.id))),i.map(e=>({...e,isBlocked:t.includes(e.id),isRecommended:a.includes(e.id)})).sort((e,t)=>e.isRecommended!==t.isRecommended?e.isRecommended?-1:1:e.name.localeCompare(t.name))},AgentInstallWorkspaceSelect=({selectedWorkspaceIds:e,availableWorkspaces:t,mode:a="default",onSelectedWorkspacesChange:l})=>{let o=(0,r.wA)(),s=(0,y.d4)(e=>(0,g.wc)(e,"agentforce_workspaces")),[c,d]=(0,n.useState)(!1),[m,u]=(0,n.useState)(),[p,h]=(0,n.useState)(0),[_,f]=(0,n.useState)([]),[A,x]=(0,n.useState)(!1),[E,C]=(0,n.useState)(),[k,v]=(0,n.useState)(!1),[S,I]=(0,n.useState)(!1),[w,T]=(0,n.useState)(),[N,M]=(0,n.useState)(!1),R=(0,n.useCallback)(()=>{x(!A)},[A]),P=(0,n.useCallback)(()=>{x(!1),l([])},[l]),L=(0,n.useCallback)(({selectedRows:e})=>{0===e.length&&A&&x(!1),e.length===_.filter(e=>!e.isBlocked).length?M(!0):M(!1),l(e)},[l,A,_]),O=(0,n.useCallback)(({selected:e})=>{e?(l(_.filter(e=>!e.isBlocked).map(e=>e.id)),M(!0)):(x(!1),l([]),M(!1))},[l,_]),D=(0,n.useCallback)(async(e="")=>{d(!0),C(""),f([]),T(e);let{teams:n,nextCursor:r,totalResultCount:i}=await o((0,b.$9)({searchTerm:e,count:500,reason:"agentInstall_searchWorkspaces"})),l=filterAndSortWorkspaces(n,s?.blocked_workspaces||[],s?.default_workspaces||[],t,a);return d(!1),f(l),I(n?.length!==i),u(0===e.length?void 0:i),C(r),{totalResultCount:"default"!==a?l.length:i}},[s?.blocked_workspaces,s?.default_workspaces,o,t,a]);(0,n.useEffect)(()=>{D("").then(({totalResultCount:e})=>{h(e||0)})},[D]);let F=(0,n.useCallback)(async()=>{let{teams:e,nextCursor:n,totalResultCount:r}=await o((0,b.$9)({searchTerm:w,count:500,reason:"agentInstall_fetchMoreWorkspaces",nextCursorMark:E}));v(!1);let l=(0,i.A)(_,e,"id");f(filterAndSortWorkspaces(l,s?.blocked_workspaces||[],s?.default_workspaces||[],t,a)),I(l.length!==r),C(n)},[o,w,E,_,s?.blocked_workspaces,s?.default_workspaces,t,a]),U=(0,n.useCallback)(()=>{k||(v(!0),F())},[F,k]);return n.createElement("div",null,n.createElement(AgentInstallWorkspaceSelectHeader,{totalCount:p,filteredCount:m,selectedCount:e.length,onSearch:D,onClear:P,showOnlySelected:A,onToggleShowSelected:R}),n.createElement(WorkspaceMultiSelectTable,{isLoading:c,workspaces:_,selectedWorkspaceIds:e,onRowSelect:L,onSelectAllSelected:O,selectAllChecked:N,showOnlySelected:A,fetchMoreRows:S?U:void 0,isFetchingMoreRows:k}))};AgentInstallWorkspaceSelect.displayName="AgentInstallWorkspaceSelect"},0x17f56dd32:(e,t,a)=>{"use strict";a.d(t,{B:()=>AgentSalesforceOrg});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1fdec3e16),l=a(0x2501a2cee),o=a(0x4c96e5d9),s=a(0x1feb18f19),c=a(0xb0ca8936);let d=new r.Ay("enterprise_dashboard"),LegacyOrgConnectionWarning=({orgName:e,isOrgConnected:t=!0})=>{let a=d.t("This org is using an outdated connection"),r=d.t("(Disconnected)");return n.createElement(c.EY,{color:"Palettes/Sunflower/60"},n.createElement(s.c,{space:"25"},n.createElement(o.Ay,{position:"top",tip:a},n.createElement(l.Ah,{"aria-label":a,name:"warning-filled",size:"20"})),e," ",t?"":r))};LegacyOrgConnectionWarning.displayName="LegacyOrgConnectionWarning";var m=a(0x226892387),u=a(0x14017b66d);let p=new r.Ay("enterprise_dashboard"),AgentSalesforceOrg=({agentOrgId:e,agentOrgName:t,defaultOrgName:a="-",showOnlyOrgName:r=!1,isOrgConnectionLegacy:l=!1,shouldShowWarning:o=!0,isOrgConnected:s=!0})=>{let c=(0,m.d4)(t=>(0,u.ek)(t,e)),d=t||c?.name||a,h=p.t("(Disconnected)");return r?n.createElement("span",null,d):n.createElement("span",{className:"full_width"},o&&l?n.createElement(LegacyOrgConnectionWarning,{orgName:d,isOrgConnected:s}):n.createElement(i.A,{lines:1,withTooltip:!0},d," ",s?"":h))};AgentSalesforceOrg.displayName="AgentSalesforceOrg"},0xac6be71a:(e,t,a)=>{"use strict";a.d(t,{i:()=>AgentStatus});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1fd3f6e20);let l=new r.Ay("enterprise_dashboard"),AgentStatus=({status:e})=>{let t={pending_install:{text:l.t("Ready to install"),tagStyle:i.u.Informative},requested:{text:l.t("Ready to install"),tagStyle:i.u.Informative},inactive_requested:{text:l.t("Unavailable"),tagStyle:i.u.Informative},unavailable:{text:l.t("Unavailable"),tagStyle:i.u.Gray},deleted:{text:l.t("Deleted"),tagStyle:i.u.Flamingo},new_updates:{text:l.t("Updated"),tagStyle:i.u.Honeycomb},active:{text:l.t("Active"),tagStyle:i.u.Grass}},a=e?t[e]:{text:l.t("Unknown"),tagStyle:i.u.Gray};return n.createElement(i.v,{style:a.tagStyle,isMicro:!0},a.text)};AgentStatus.displayName="AgentStatus"},0xb18fd478:(e,t,a)=>{"use strict";a.d(t,{F:()=>AgentUninstallModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x20482ad21),o=a(0x16ac9b089),s=a(0x11a296110),c=a(0xce378727),d=a(0x1f803375e),m=a(0x17f56dd32),u=a(0x1998e45de),p=a(0xbe2be077),h=a(0x20e80190e),_=a(0x3711e82d),f=a(0x226892387),b=a(0x1fcbb004d);let g=new l.Ay("enterprise_dashboard"),y={elementName:"uninstall_btn",onClick:{enableClogAction:!0}},A={elementName:"cancel_btn",onClick:{enableClogAction:!0}},AgentUninstallModal=({agentName:e,agentOrgId:t,agentOrgName:a,agentAppId:l,agentStatus:x,agentCreatedByName:E,onUninstallComplete:C=i.A})=>{let k=(0,r.wA)(),{isUninstalling:v,onUninstall:S}=(0,u.v)(l,e,C,!0),I=(0,f.d4)(p.k),w=g.t("agent creator"),T=E??w,N=g.t("Salesforce org"),M="";M=I?g.t("org"):g.t("team");let R="",P="";switch(x){case"deleted":R=g.t("{agentName} deleted",{agentName:(0,o.Ay)(e)}),P=g.rt("{agentName} has been deleted in {orgName}. Contact {agentCreator}, the person who built this agent, to learn more.",{agentName:e,orgName:n.createElement(m.B,{agentOrgId:t,agentOrgName:a,defaultOrgName:N,showOnlyOrgName:!0}),agentCreator:T});break;case"unavailable":R=g.t("{agentName} unavailable",{agentName:(0,o.Ay)(e)}),P=g.rt("{agentName} has been disconnected from {orgName}. Contact {agentCreator}, the person who built this agent, to learn more.",{agentName:e,orgName:n.createElement(m.B,{agentOrgId:t,agentOrgName:a,defaultOrgName:N,showOnlyOrgName:!0}),agentCreator:T});break;default:R=g.t("Uninstall this agent from your {teamType}?",{teamType:M}),P=g.rt("This agent will be removed from <strong>your {teamType}</strong>. Admins and owners of this {teamType}, and the agent builder will be notified that this agent will be removed.",{teamType:M})}let L=g.t("Cancel"),O=g.t("Remove Agent"),D=(0,n.useCallback)(()=>{k((0,b.O)())},[k]),F=(0,n.useMemo)(()=>({eventId:_.EventId.AGENTFORCE_ADMIN,uiComponentName:_.UiComponentName.SALESFORCE_AGENTFORCE_ADMIN_UNINSTALL_MODAL,clogImpression:!0,salesforceOrgId:t,agentforceAgentStatus:x,agentforceApiAppId:l}),[l,t,x]);return n.createElement(h.dW,{autoClogProps:F,closeModal:D,contentLabel:R},n.createElement(h.rQ,null,n.createElement(d.A,{title:R})),n.createElement(h.$m,null,n.createElement(h.qf,null,n.createElement("p",null,P))),n.createElement(h.jl,null,n.createElement(h.ox,null,n.createElement(s.Ay,{autoClogProps:A,type:"outline",onClick:D},L),n.createElement(c.A,{autoClogProps:y,loading:v,onClick:S,type:"danger","aria-label":O},O))))};AgentUninstallModal.displayName="AgentUninstallModal"},0x1998e45de:(e,t,a)=>{"use strict";a.d(t,{v:()=>useUninstallAgent});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x16ac9b089),o=a(0x6e87d4ec),s=a(0x24266eb6d),c=a(0xbe2be077),d=a(0x9b971e7e),m=a(0x226892387),u=a(0x1fcbb004d),p=a(0x16ffed5ab);let h=new i.Ay("enterprise_dashboard"),useUninstallAgent=(e,t,a,i)=>{let _=(0,r.wA)(),f=(0,m.d4)(d.Kc),b=(0,m.d4)(c.k),[g,y]=(0,n.useState)(!1),A=h.t("{agentName} has been uninstalled",{agentName:(0,l.Ay)(t)}),x=h.t("{agentName} has not been uninstalled. Please try again later.",{agentName:(0,l.Ay)(t)});return{isUninstalling:g,onUninstall:(0,n.useCallback)(async()=>{if(y(!0),!e){_((0,p.M)({element:n.createElement(o.A,{position:"bottom-right"},x)})),y(!1);return}try{let t={appId:e,reason:"uninstall-agent"};b?t.enterpriseId=f:t.teamIds=f,(await _((0,s.b)(t))).ok?(_((0,p.M)({element:n.createElement(o.A,{position:"bottom-right"},A)})),a()):_((0,p.M)({element:n.createElement(o.A,{position:"bottom-right"},x)}))}catch{_((0,p.M)({element:n.createElement(o.A,{position:"bottom-right"},x)}))}finally{i&&_((0,u.O)())}},[e,_,x,b,f,A,a,i])}};useUninstallAgent.displayName="useUninstallAgent"},0x18647f64a:(e,t,a)=>{"use strict";a.d(t,{V:()=>AgentInstallModalHeader});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2376ea9bb);let l=a.p+"agent-avatar-connector-4699938.svg";var o=a(0x200936397),s=a(0xb0ca8936),c=a(0x226892387),d=a(0x1ee439e69),m=a(0x3e240f31),u=a.n(m);let p=new r.Ay("enterprise_dashboard"),AgentInstallModalHeader=({agentImageSrc:e,title:t,description:a})=>{let r=(0,c.d4)(d.Yc),m=(0,n.useMemo)(()=>r?{...r,icon:{...r.icon,image_default:!1}}:void 0,[r]);return n.createElement("div",{className:"display_flex full_width flex_direction_column"},n.createElement("div",{className:`display_flex align_items_center justify_content_center ${u().avatarContainer} gap_175`},n.createElement("img",{className:u().agentAvatar,src:e,alt:p.t("Agent avatar")}),n.createElement("img",{src:l,alt:p.t("Agent avatar connector")}),n.createElement(i.A,{team:m,size:56})),n.createElement(o.a,{paddingInline:"175",paddingBlock:"100"},n.createElement(s.DZ,{size:"title",level:"1"},t),a&&n.createElement(s.EY,{size:"caption"},a)))};AgentInstallModalHeader.displayName="AgentInstallModalHeader"},0x150c3ac74:(e,t,a)=>{"use strict";a.r(t),a.d(t,{SalesforceAgentforceAdminStartCoachmark:()=>SalesforceAgentforceAdminStartCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xd6ba6894),l=a(0x20482ad21),o=a(0x13953efe6),s=a(0x1a2fba84c),c=a(0x3989021c),d=a(0x218842a12),m=a(0x12eea8ff0),u=a(0x226892387),p=a(0x14149c126),h=a(0xf3c65e54),_=a(0x5b1935a6),f=a(0xf9d5f7f2),b=a.n(f);let g=new l.Ay("enterprise_dashboard"),renderWithoutOverlay=(e,t)=>t,SalesforceAgentforceAdminStartCoachmarkBase=({children:e,navigateToAgentforce:t,renderCoachmark:a,closeCoachmark:r,UNSAFE_parentSelector:i,experimentAdminNavigationMenuGroupOn:l})=>{let s=g.t("Agent-powered productivity for every human in Slack"),c=g.t("Powered by relevant Slack conversations and your trusted enterprise data, agents from Salesforce\u2019s Agentforce can suggest next steps and take action, all in the flow of regular work in Slack."),d=g.t("Explore Agents"),m=a((0,n.useMemo)(()=>({title:s,ariaLabel:s,bodyText:c,primaryCallToActionText:d,className:b().agentforceCoachmark,onClickPrimaryButton:t,alignActionsRight:!0,closeCoachmark:r,isMegaphoneCoachmark:!0,UNSAFE_parentSelector:i,width:403,offsetX:l?50:-50,offsetY:5*!l,arrowPosition:0,orientation:"right",overlayElement:renderWithoutOverlay}),[s,c,d,t,r,i,l])),u=(0,n.useCallback)(e=>{e.stopPropagation()},[]);return n.createElement("span",{role:"none",onClick:u},n.createElement(o.Ay,{coachmarkElement:m,orientation:"right"},e))};SalesforceAgentforceAdminStartCoachmarkBase.displayName="SalesforceAgentforceAdminStartCoachmarkBase";let y=d.g.SALESFORCE_AGENTFORCE_ADMIN_START_COACHMARK,A=_.xu.ORG_SETTINGS_COACHMARK,x="/admin/agentforce/installed",SalesforceAgentforceAdminStartCoachmark=({children:e})=>{let t=(0,s.I)(),a=(0,r.wA)(),{isOpen:l,closeCoachmark:o,renderCoachmark:d}=(0,c.A)(y,A),f=(0,u.d4)(e=>"on"===(0,p._Z)(e,"admin_navigation_menu")),b=(0,n.useCallback)(()=>{new URL(i.J.location.toString()).pathname.includes(x)||t({routeName:m.x.ROUTE_SALESFORCE_AGENTFORCE,legacyPath:x}),o()},[o,t]);return(0,n.useEffect)(()=>{l&&a((0,h.A)({notificationName:y,action:_.hw.IMPRESSION}))},[a,l]),n.createElement(SalesforceAgentforceAdminStartCoachmarkBase,{navigateToAgentforce:b,renderCoachmark:d,closeCoachmark:o,experimentAdminNavigationMenuGroupOn:f},e)};SalesforceAgentforceAdminStartCoachmark.displayName="SalesforceAgentforceAdminStartCoachmark"},0x1ac9a36a8:(e,t,a)=>{"use strict";a.d(t,{T:()=>n});let n={Requested:"requested",Installed:"installed",Deleted:"deleted"}},0x1de41625f:(e,t,a)=>{"use strict";a.d(t,{N:()=>useNavigateToAgentforceRoute});var n=a(0xbad225b5),r=a(0xd6ba6894);let i="/admin/agentforce";var l=a(0x12eea8ff0),o=a(0x16026d477),s=a(0x226892387),c=a(0x100313bb4);let useNavigateToAgentforceRoute=()=>{let e=(0,s.d4)(c.s$);return(0,n.useCallback)(({routeName:t=l.x.ROUTE_SALESFORCE_AGENTFORCE,params:a={},updateTeamSiteUrlOnly:n}={})=>{if(e)(0,o.o)(t,a,"");else{let e=(({agentTabId:e}={})=>{let t;return t=e?`${i}/${e}`:i,`${t}/${r.J.location.search}`})(a);n?r.J.history.pushState({},"",e):r.J.location.assign(e)}},[e])}},0x24273d362:(e,t,a)=>{"use strict";a.d(t,{A:()=>w});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x102edf836),c=a(0xb1ea448c),d=a(0x45bd075),m=a(0x1d2cd7755),u=a(0x1faa3f1ac),p=a(0xbb0c5132),h=a(0x4c96e5d9),_=a(0x101e94a86),f=a(0x1a66e3ba3),b=a(0x15db27702),g=a(0x20e80190e),y=a(0x1a769a9e8),A=a(0x1c91944c9),x=a(0x1ee49e4a1),E=a(0x24e639a3c);let C=(0,a(0x11c82607b).Ay)("Fetch a specific app access configuration set for the org-installed app on the enterprise",async(e,t,{app:a})=>{let n=a.id;e((0,b.Bo)({app_id:n})).then(t=>{if(t?.ok){let{grant_future_workspaces:a}=t.config;e((0,x.wU)(a))}}).catch(e=>{throw e})});C.meta={name:"fetchAndSetGrantFutureWorkspacesForApp",key:"createThunkFetchAndSetGrantFutureWorkspacesForApp",description:"Fetch a specific app access configuration set for the org-installed app on the enterprise"};var k=a(0x1fcbb004d),v=a(0x16ffed5ab);let S=new o.Ay("org_apps_dashboard"),I={name:"check-circle-filled"},AppManagementGrantFutureWorkspaces=({grantFutureWorkspaces:e,selectedApp:t={},hideAppSummary:a=!1,showSave:r=!1,setGrantFutureWorkspaces:o=l.A,fetchAndSetGrantFutureWorkspacesForApp:f=l.A,setGrantAppFutureWorkspacesForApp:b,closeModal:A=l.A,enqueueToast:x=l.A,appIsOrgAware:E=!1,onChange:C=l.A,showCheckboxOnLoad:k,shouldHideIfUnset:v=!1})=>{let w,[T,N]=(0,n.useState)(!1),[M,R]=(0,n.useState)(k??!e),[P,L]=(0,n.useState)(e),[O,D]=(0,n.useState)(!1),F=(0,n.useRef)(),U={appId:t.id,appName:t.name,appIcon:(0,y.A)(t,36),appURL:`/apps/${t.id}`,isSlackOwned:t.isSlackOwned},B=void 0===e,H=r?!!P:!!e;w=H?M?S.rt("{appName} will automatically be added to new workspaces.",{appName:t.name}):S.rt("New workspaces will automatically add {appName}",{appName:t.name}):M?S.rt("{appName} will not automatically be added to new workspaces.",{appName:t.name}):S.rt("New workspaces will not automatically add {appName}",{appName:t.name});let W=n.createElement(n.Fragment,null,w,!M&&n.createElement(n.Fragment,null," ",n.createElement(u.A,{"data-qa":"app_management_grant_future_workspaces_edit_link",onClick:()=>R(!M)},S.t("Edit"))));(0,n.useEffect)(()=>{if(!B&&P!==e){if(F.current){F.current=void 0;return}L(e)}},[P,e,B]),(0,n.useEffect)(()=>{t.id&&E&&!O&&B&&(D(!0),f({app:t}))},[t,t.id,E,O,f,o,e,B]),(0,n.useEffect)(()=>{t.id&&E&&O&&e&&(D(!1),L(e))},[O,t.id,E,e,o]);let confirmModal=()=>{let a=H?S.t("Add default for future workspaces"):S.t("Remove default for future workspaces"),r=H?S.rt("{appName} will be added to future workspaces when they are created",{appName:t.name}):S.rt("{appName} will no longer be added to future workspaces when they are created",{appName:t.name}),i=H?"primary":"danger";return n.createElement(g.dW,{"data-qa":"app_management_grant_future_workspaces_confirm_modal",contentLabel:a,closeModal:()=>{N(!1),R(!1),A()}},n.createElement(g.$m,null,n.createElement(g.Rc,{title:a}),n.createElement(g.qf,null,n.createElement("p",null,r))),n.createElement(g.jl,null,n.createElement(g.ox,null,n.createElement(s.Ay,{"data-qa":"app_management_grant_future_workspaces_confirm_modal_cancel",onClick:()=>{N(!1),R(!1),A()},type:"outline"},S.t("Cancel")),n.createElement(s.Ay,{"data-qa":"app_management_grant_future_workspaces_confirm_modal_save",type:i,onClick:async()=>{let a=H?S.rt("{appName} has been added as a default app for future workspaces",{appName:t.name}):S.rt("{appName} has been removed as a default app for future workspaces",{appName:t.name});await b({app_id:t.id,grant_future_workspaces:H}),o(!e),N(!1),A(),x({element:n.createElement(p.Ay,{position:"bottom-right",svgIconProps:I},a)})}},S.t("Save")))))};confirmModal.displayName="confirmModal";let V=!e&&v;return!E||V?null:n.createElement(n.Fragment,null,T&&confirmModal(),n.createElement("div",{"data-qa":"app_management_grant_future_workspaces",className:i()("p-app_management_grant_future_workspaces",{display_flex:r,full_width:r,align_items_center:r})},B?n.createElement("div",{className:"padding_100"},n.createElement(c.A,{color:"blue",size:"medium"})):n.createElement(n.Fragment,null,n.createElement("div",{className:i()({flex_one:r})},!a&&n.createElement("div",{className:"p-app_management_grant_future_workspaces_top"},n.createElement(_.V,U)),n.createElement("div",{className:i()("p-app_management_grant_future_workspaces_bottom",{padding_100:!a,padding_top_100:a,padding_bottom_100:a})},n.createElement("div",{"data-qa":`app_management_grant_future_workspaces__state_${e}`},M?n.createElement(m.A,{text:S.t("Default for future workspaces"),subtext:W,type:"inline",...M?{cursor:"pointer"}:{}},n.createElement(h.Ay,{tip:S.t("Uncheck to remove this setting. Your selection will be saved when the last step is complete."),position:"top"},n.createElement(d.A,{"data-qa":"app_management_grant_future_workspaces_checkbox",id:"grantFutureWorkspaces",name:"grant_future_workspaces",value:String(H),checked:H,onChange:()=>{r?(F.current=!0,L(!P)):o(!e),C&&C?.(!P)}}))):n.createElement(n.Fragment,null,n.createElement("div",{className:"bold"},S.t("Default for future workspaces")),n.createElement("div",null,W))))),r&&M&&n.createElement(s.Ay,{"data-qa":"app_management_grant_future_workspaces_save_button",onClick:()=>N(!0),type:"outline",size:s.F0.small},S.t("Save")))))};AppManagementGrantFutureWorkspaces.displayName="AppManagementGrantFutureWorkspaces";let w=(0,A.N)((e,{selectedApp:t})=>{let a=t?.org_status===f.XO.READY||t?.org_status===f.XO.INSTALLED;return{grantFutureWorkspaces:(0,E.cL)(e),selectedApp:t,appIsOrgAware:a}},e=>({setGrantFutureWorkspaces:(...t)=>e((0,x.wU)(...t)),fetchAndSetGrantFutureWorkspacesForApp:(...t)=>e(C({app:{...t[0].app,appId:t[0].app.id,allWorkspaces:[],excludedWorkspaceIds:[],workspaceIds:[],workspacesByAppApiTotal:0}})),closeModal:()=>e((0,k.O)()),enqueueToast:t=>e((0,v.M)(t)),setGrantAppFutureWorkspacesForApp:(...t)=>e((0,b.Ze)(...t))}))(AppManagementGrantFutureWorkspaces)},0x101e94a86:(e,t,a)=>{"use strict";a.d(t,{V:()=>AppManagementInstallAppSummary});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xa6f3163b),l=a(0x99233ecb),o=a(0x2501a2cee);let s=new r.Ay("enterprise_dashboard"),AppComplianceLabel=({app:e,style:t={},className:a="",labelComponent:r="span"})=>{let i=s.t("Built by Slack");return e.is_slack_owned?n.createElement(r,{style:t,className:a},i):e.developer_name?n.createElement(r,{style:t,className:a},e.developer_name):null};AppComplianceLabel.displayName="AppComplianceLabel";var c=a(0x226892387),d=a(0x5dd1c0f2);let app_compliance_manager=({appId:e,children:t})=>{let a=(0,c.d4)(t=>(0,d.sO)(t,e));return t({appId:e,app:a})},m=new r.Ay("org_apps_dashboard"),AppManagementInstallAppSummary=({appId:e,appName:t,appURL:a,appIcon:r})=>{let s=(0,n.useCallback)(e=>n.createElement(l.Ay,{width:"auto",...e},n.createElement(l.Dr,{key:"app_summary_menuitem_0",label:m.t("View in Slack Marketplace"),href:a,className:"p-app_management_install_app_summary__menu_app_dir_link"})),[a]);return n.createElement("div",{className:"p-app_management_install_app_summary"},n.createElement("div",{className:"p-app_management_install_app_summary__menu"},n.createElement(l.cQ,{renderMenu:s,position:"bottom-right",offsetX:20},n.createElement(i.A,{className:"p-app_management_install_app_summary__menu_trigger","aria-label":m.t("Actions for {appName}",{appName:t})},n.createElement(o.Ah,{name:"ellipsis-horizontal-filled",size:"20"})))),r&&n.createElement("div",{className:"p-app_management_install_app_summary__icon"},n.createElement("img",{src:r,alt:m.t("Icon for {appName}",{appName:t})})),n.createElement("div",{className:"p-app_management_install_app_summary__app_name"},n.createElement("strong",null,t)),n.createElement("div",{className:"p-app_management_install_app_summary__app_details"},e&&n.createElement("div",null,n.createElement(app_compliance_manager,{appId:e},({app:e})=>n.createElement(AppComplianceLabel,{app:e})))))};AppManagementInstallAppSummary.displayName="AppManagementInstallAppSummary"},0x6060924d:(e,t,a)=>{"use strict";a.d(t,{A:()=>Y});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x21f3c49e8),o=a(0xe180a236),s=a(0xbe0b63ff),c=a(0x20482ad21),d=a(0x2264e6ea3),m=a(0x2b7f0bcc),u=a(0xb1ea448c),p=a(0x1d2cd7755),h=a(0x15014e268),_=a(0x24573b3ff),f=a(0xe747dd27),b=a(0x1faa3f1ac),g=a(0x4c69b9f6);let linkifySecurityCompliance=e=>{let t=(0,g.A)({input:e});if(0===t.length)return e;let a=[],r=0;t.forEach(t=>{let i=n.createElement(b.A,{href:t.url,key:r},t.url),l=n.createElement("span",{key:r+1},e.slice(r,t.offset));a.push(l),a.push(i),r=t.offset+t.url.length});let i=e.slice(r);return a.push(n.createElement("span",{key:r},i)),a};linkifySecurityCompliance.displayName="linkifySecurityCompliance";let y=new c.Ay("security_compliance"),AppSecurityComplianceList=({securityCompliance:e})=>{if(!e||(0,l.A)(e))return n.createElement(n.Fragment,null);let t=(0,f.VA)(e);return n.createElement("div",{className:"p-app_security_compliance_list"},n.createElement("h4",{className:"p-app_security_compliance_list__heading"},y.t("This app has the following certifications & compliances:")," "),n.createElement("ul",null,Object.keys(t).filter(e=>!!t[e]?.length&&" "!==t[e]).map(e=>{let a=new Map([["company_developer_name",()=>y.t("Developer")],["company_location",()=>y.t("Company headquarters location")],["tos_url",()=>y.t("Terms of service")],["security_support_sso",()=>y.t("Security support SSO")],["fedramp_authorization",()=>y.t("FedRAMP Authorization")],["dod_srg_ilx",()=>y.t("DOD SRG ILx")],["itar_compliant",()=>y.t("ITAR Compliant")],["data_retention_policy",()=>y.t("Data retention policy")],["data_archival_removal_policy",()=>y.t("Data archiving and removal policy")],["data_storage_policy",()=>y.t("Data storage policy")],["data_center_location",()=>y.t("Data center location(s)")],["data_how_host",()=>y.t("Data hosting details")],["data_host_company",()=>y.t("Data hosting company")],["cert_comply_sub_processors",()=>y.t("App/service has sub-processors")],["cert_comply_guidelines_sub_processors_url",()=>y.t("Guidelines for sub-processors")],["cert_comply_soc_cert_url",()=>y.t("SOC attestation")],["cert_comply_coppa_compliance_url",()=>y.t("COPPA compliance")],["cert_comply_iso_iec_27001_cert_url",()=>y.t("ISO/IEC-27001 certification")],["cert_comply_iso_iec_27017_cert_url",()=>y.t("ISO/IEC-27017 attestation")],["cert_comply_iso_iec_27018_cert_url",()=>y.t("ISO/IEC-27018 attestation")],["cert_comply_fedramp_cert_url",()=>y.t("FedRAMP ATO")],["cert_comply_csa_star_level_cert_url",()=>y.t("CSA Star level")],["cert_comply_privacy_shield_notice_url",()=>y.t("Privacy Shield notice")],["cert_comply_gdpr_commitment_url",()=>y.t("GDPR commitment")],["cert_comply_data_deletion_requests_handling",()=>y.t("Data deletion request procedure")],["cert_comply_hipaa_compliant",()=>y.t("HIPAA compliant")],["security_pen_test_date",()=>y.t("Date of latest pen test")],["security_pen_test_vendor_driven",()=>y.t("Pen test was vendor driven")],["security_pen_test_executive_summary_available",()=>y.t("Executive summary is available to potential customers upon request")],["security_what_sso",()=>y.t("Supports Single Sign On (SSO) with the following providers")],["security_support_saml",()=>y.t("Supports Security Assertion Markup Language (SAML)")],["security_dedicated_security",()=>y.t("Has a dedicated security team")],["security_email",()=>y.t("Contact for security issues")],["security_vulnerability_program",()=>y.t("Has a vulnerability disclosure program")],["security_vulnerability_url",()=>y.t("Vulnerability disclosure program URL")],["security_vulnerability_program_slack",()=>y.t("Vulnerability disclosure program covers Slack app")],["security_bug_bounty_program",()=>y.t("Has a bug bounty program")],["security_bug_bounty_url",()=>y.t("Bug bounty program URL")],["security_third_party_auths_required",()=>y.t("Requires third party authorization/connections")],["security_third_party_services",()=>y.t("Third party services used by this app")],["security_token_rotation_enabled",()=>y.t("Uses token rotation")]]).get(e)?.(),r=t[e];return n.createElement("li",{key:e,className:"p-app_security_compliance_list__item"},n.createElement("div",{className:"p-app_security_compliance_list__item-title"},a??e),n.createElement("div",{className:"p-app_security_compliance_list__item-value"},linkifySecurityCompliance(r)))})))};AppSecurityComplianceList.displayName="AppSecurityComplianceList";var A=a(0x484c21c7),x=a(0x16a164f33);let PermissionsPaneList=({heading:e,arrayOfPairs:t})=>{let a,r=[];for(let e of t)r.push(n.createElement("li",{key:e[0],className:"p-permissions_pane_list__item"},n.createElement("div",{className:"p-permissions_pane_list__item-title"},e[0]),n.createElement("div",{className:"p-permissions_pane_list__item-value"},n.createElement("div",null,e[1]))));return e&&(a=n.createElement("h4",{className:"p-permissions_pane_list__heading"},e)),n.createElement("div",{className:"p-permissions_pane_list"},a,n.createElement("ul",null,r))};PermissionsPaneList.displayName="PermissionsPaneList";var E=a(0x15fb82076),C=a(0x11f75b40b),k=a(0x65029f84),v=a(0x328743af),S=a(0x1ae5d492),I=a(0x145d46a61),w=a(0xbe2be077),T=a(0xdb0578c7),N=a(0x226892387),M=a(0x5dd1c0f2);let R=new c.Ay("platform-admin"),ConfigurationNeededAlert=({connectorId:e,onModalClose:t=i.A})=>{let a=(0,r.wA)(),l=(0,N.d4)(t=>(0,M.sO)(t,e)),o=(0,N.d4)(I.AC),s=(0,N.d4)(w.k),c=(0,n.useCallback)(()=>{if(o){t();let e=s?v.xW.ROUTE_INTEGRATIONS_WORKFLOW_STEPS:k.b.ROUTE_INTEGRATIONS_WORKFLOW_STEPS;(0,S._U)(e,{selectedTabId:C.D.INTEGRATIONS});return}a((0,T.A)({source:"admin-approval",subPath:"integrations"}))},[a,o,s,t]),d=R.rt("<strong>A configuration is required.</strong> {connectorName} steps will not work until it\u2019s been configured on the <a>Manage Integrations page</a>.",{connectorName:l.name,"<a>":({text:e})=>n.createElement(E.A,{onClick:c},e)});return n.createElement(m.Ay,{type:m.QE.inline,level:m.A_.warning},n.createElement("span",null,d))};ConfigurationNeededAlert.displayName="ConfigurationNeededAlert";var P=a(0x21b5f55d7),L=a(0x1130188cd),O=a(0x170b7f862),D=a(0x17bc5fa52),F=a(0x1208f5d94),U=a(0xb76a9297),B=a(0x1d4e46096),H=a(0xc81e13df),W=a(0x114f12319),V=a(0x1c2358c11),G=a(0x4f725d55),q=a(0x16ea69f6c),j=a(0x2463781b4);let z=new c.Ay("enterprise_dashboard"),K=[],$=[],AppManagementPermissions=({appId:e,appName:t,bucketedScopes:a,domains:c,securityCompliance:f,resolutionStatus:b,isCertified:g=!1,setWhoCanUseSteps:y,setUserIdsSteps:E,setTeamIdsSteps:C,setHasSteps:k,setFunctionId:v,onModalClose:S=i.A,selectedBucketedScopes:T,onOptionalScopeSelect:M,enablePermissionsSelection:R=!1,experimentSlackAppsOptionalScopesFeGroupOn:Y=!1,isApprovedApp:Q=!1})=>{let Z,J=(0,r.wA)(),X=(0,n.useRef)(!1),[ee,et]=(0,n.useState)(K),[ea,en]=(0,n.useState)(!0),[er,ei]=(0,n.useState)($),[el,eo]=(0,n.useState)(!0),[es,ec]=(0,n.useState)(void 0),[ed,em]=(0,n.useState)(F.i2.Everyone),[eu,ep]=(0,n.useState)([]),[eh,e_]=(0,n.useState)([]),{triggerTypesWithAvailability:ef}=(0,U.c)({workflowBuilderOnly:!1,appId:e,skip:!1}),eb=(0,V.L)({fetcher:W.X,args:{appIds:[e],reason:"app management permissions modal"},skip:!g}),eg=Object.values(ee).map(({title:e,description:t})=>[e,t]),ey=Object.values(ee).map(({id:e})=>e),eA=(0,N.d4)(e=>(0,q.Q)(e,ey[0])),ex=(0,N.d4)(I._G);(0,n.useEffect)(()=>{J((0,B.q)({reason:"fetch-app-functions-for-appId",appIds:[e],limit:50,includeNonDistributedFunctions:ex})).then(e=>{et(e.functions)}).catch(()=>{}).finally(()=>{en(!1)}),J((0,H.p)({appId:e??"",reason:"fetch-app-workflows",limit:50})).then(e=>{ei(e.workflows)}).catch(()=>{}).finally(()=>{eo(!1)})},[e,J,ex]),(0,n.useEffect)(()=>{g||!eA||(0,s.lv)(eA)||(0,s.mX)(eA)||(ec(eA.distribution.type),em(eA.allowedEntities.type))},[eA,g,es]);let eE=(0,n.useMemo)(()=>{let t=[];if(a&&!(0,l.A)(a)&&!g){let r={title:z.t("Scopes"),id:"scopes",content:n.createElement("div",{className:"p-permission_info__section"},Y?n.createElement(A.hF,{appId:e,bucketedScopes:a,selectedBucketedScopes:T,onOptionalScopeSelect:M,enablePermissionsSelection:R}):n.createElement(A.hF,{appId:e,bucketedScopes:a})),titleCount:(0,o.A)(a?.bot)+(0,o.A)(a?.user)};t.push(r)}if(c&&!(0,l.A)(c)&&!g){let e={title:z.t("Domains"),id:"domains",content:n.createElement("div",{className:"p-permission_info__section"},n.createElement(x.A,{domainsList:c})),titleCount:(0,o.A)(c)};t.push(e)}if(f&&!(0,l.A)(f)&&!g){let e={title:z.t("Security & Compliance"),id:"securityCompliance",content:n.createElement("div",{className:"p-permission_info__section"},n.createElement(AppSecurityComplianceList,{securityCompliance:f})),titleCount:(0,o.A)(f)};t.push(e)}if(g||!(0,l.A)(ee)){let e={title:z.t("Steps"),id:"steps",content:n.createElement("div",{className:"p-permission_info__section"},n.createElement(PermissionsPaneList,{arrayOfPairs:eg})),titleCount:(0,o.A)(eg)};t.push(e)}if(!(0,l.A)(er)&&!g){let e=Object.values(er).map(({title:e,description:t})=>[e,t]),a={title:z.t("Workflows"),id:"workflows",content:n.createElement("div",{className:"p-permission_info__section"},n.createElement(PermissionsPaneList,{heading:z.t("This app includes the following workflows:"),arrayOfPairs:e})),titleCount:(0,o.A)(e)};t.push(a)}if(g&&!(0,l.A)(ef)){let e=ef.map(({triggerType:e})=>[e.label,e.description??""]),a={title:z.t("Ways to start"),id:"triggers",content:n.createElement("div",{className:"p-permission_info__section"},n.createElement(PermissionsPaneList,{arrayOfPairs:e})),titleCount:(0,o.A)(e)};t.push(a)}return t},[a,g,c,f,ee,er,ef,e,eg,M,T,R,Y]),eC=(0,N.d4)(w.k),ek=eb.data?.apps?.[0],ev=(ek?.requiresConfig&&ek?.missingRequiredConfig)??!1,eS=g&&b===j.W.approved&&ev,eI=z.t("Specific people and workspaces"),ew=z.t("Specific people"),eT={[F.i2.AppCollaborators]:{label:z.t("App collaborators"),value:F.i2.AppCollaborators},[F.i2.Everyone]:{label:z.t("Everyone"),value:F.i2.Everyone},[F.i2.NamedEntities]:{label:eC?eI:ew,value:F.i2.NamedEntities},[F.i2.None]:{label:z.t("No one"),value:F.i2.None}},eN=(0,n.useCallback)(e=>{let t=e.map(e=>e.value);X.current=0===t.length,(0,L.x)(t.filter(d.Ay),e_),(0,L.x)(t.filter(G.A),ep)},[]),eM=(0,n.useCallback)(e=>{em(e.value),X.current=!1,(0,O.V5)(e.value)?((0,L.x)([],ep),(0,L.x)([],e_)):((0,L.x)(void 0,ep),(0,L.x)(void 0,e_))},[]);(0,n.useEffect)(()=>{y&&E&&C&&k&&v&&(y(ed),E(eu),C(eh),k(!(0,l.A)(eg)),v(ey[0]))},[ed,eu,y,E,C,k,v,eh,eg,ey]),Z=g&&b===j.W.approved?z.t("Approve who can use or request {appName} in workflows. Your choice will apply to the listed workflow options, and it will be the default setting for future {appName} additions.",{appName:t}):g&&b===j.W.restricted?z.t("People will no longer be able to use or request {appName} in workflows. Existing workflows using {appName} will continue to function.",{appName:t}):z.t("This app requires permission to access the following resources:");let eR=g||es;return n.createElement("div",{className:"display_flex flex_direction_column"},eS&&n.createElement("div",{className:"margin_bottom_125"},n.createElement(ConfigurationNeededAlert,{connectorId:e,onModalClose:S})),Q&&n.createElement(m.Ay,{type:m.QE.boxed,level:m.A_.warning,className:"margin_top_100"},Y?z.t("End users will need to re-authorize this app for changes to take effect."):"End users will need to re-authorize this app for changes to take effect."),n.createElement("p",{className:"margin_top_175 margin_bottom_50"},Z),b===j.W.approved&&!(0,l.A)(eg)&&eR&&n.createElement("div",null,n.createElement(p.A,{text:z.t("Who can use {appName} in workflows",{appName:t}),className:"margin_bottom_100"},n.createElement(h.Ay,{ariaLabel:z.t("Select who can use {appName} steps",{appName:t}),selectedOption:eT[ed],options:g?[eT[F.i2.Everyone],eT[F.i2.NamedEntities],eT[F.i2.None]]:es?(0,O.Se)(es)?Object.values(eT):[eT[es],eT[F.i2.None]]:[],onOptionSelected:eM,width:P.u})),(0,O.V5)(ed)&&n.createElement(D.R,{selectedItems:eu.concat(eh),onSelectedItemsChange:eN,developerAcl:es,developerAclUserIds:void 0,error:X.current,isLoading:el||ea})),el||ea?n.createElement("div",{className:"p-app_management_modal_loading_permissions"},n.createElement(u.A,{size:"jumbo"})):n.createElement(_.A,{tabs:eE}))};AppManagementPermissions.displayName="AppManagementPermissions";let Y=AppManagementPermissions},0x51dfd0c3:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xa6f3163b),l=a(0x99233ecb),o=a(0x2501a2cee);let s={appName:"",appIcon:null,appURL:"",workspaceInstallations:null},c=new r.Ay("enterprise_dashboard"),d=class extends n.PureComponent{static defaultProps=s;constructor(e){super(e),this.renderMenu=this.renderMenu.bind(this)}renderMenu(e){let{appURL:t}=this.props;return n.createElement(l.Ay,{...e,width:"auto"},n.createElement(l.Dr,{key:"app_summary_menuitem_0",label:c.t("View in Slack Marketplace"),href:t,className:"p-app_management_app_summary__menu_app_dir_link"}))}render(){let{appName:e,appIcon:t,workspaceInstallations:a}=this.props;return n.createElement("div",{className:"p-app_management_app_summary"},t&&n.createElement("div",{className:"p-app_management_app_summary__icon"},n.createElement("img",{src:t,alt:c.t("Icon for {appName}",{appName:e})})),n.createElement("div",{className:"p-app_management_app_summary__app_name"},n.createElement("strong",null,e),n.createElement("div",{className:"p-app_management_app_summary__app_details"},null!==a&&a>0&&n.createElement("div",null,c.rt("{workspaceInstallations, plural, =1 {# workspace installation} other {# workspace installations}}",{workspaceInstallations:a})))),n.createElement("div",{className:"p-app_management_app_summary__menu"},n.createElement(l.cQ,{renderMenu:this.renderMenu,position:"bottom-right",offsetX:20},n.createElement(i.A,{className:"p-app_management_app_summary__menu_trigger","aria-label":c.t("Actions for {appName}",{appName:e})},n.createElement(o.Ah,{name:"ellipsis-horizontal-filled"})))))}};d.displayName="AppManagementAppSummary";let m=d},0x2415ad925:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0xd9faf062),i=a(0x15f8e452a),l=a(0x1e06b9237),o=a(0x1aa149bde),s=a(0x7ed0bca9),c=a(0x226892387),d=a(0x14149c126);let BrowserDeprecationWarning=({className:e,shouldShowRedBanner:t,shouldShowBanner:a,willBrowserBeDeprecated:s,isFixedPosition:c=!1,setShowDeprecationWarning:d})=>{let m=(0,n.useCallback)(()=>{(0,o.j)(!0),d?.(!1)},[d]),u=!!(0,o.T)();return a&&s&&!u?n.createElement(r.Ay,{className:e,type:t?"urgent":"warning",isFixedPosition:c,onClose:m},n.createElement(i.A,{type:"warning",inline:!0})," ",n.createElement(l.A,null)):null};BrowserDeprecationWarning.displayName="BrowserDeprecationWarning";let BrowserDeprecationWarningContainer=e=>{let t=(0,c.d4)(e=>"on"===(0,d._Z)(e,"browser_deprecation_red_banner_april_2026")),a=(0,c.d4)(e=>"on"===(0,d._Z)(e,"admin_browser_deprecation_warning_february_2026")),r=(0,c.d4)(s.u_);return n.createElement(BrowserDeprecationWarning,{shouldShowRedBanner:t,shouldShowBanner:a,willBrowserBeDeprecated:r,...e})};BrowserDeprecationWarningContainer.displayName="BrowserDeprecationWarningContainer";let m=BrowserDeprecationWarningContainer},0x1aa149bde:(e,t,a)=>{"use strict";a.d(t,{T:()=>getDeprecationCookie,j:()=>setDeprecationCookie});var n=a(0xcc110d9),r=a(0x8c8bafa3),i=a(0x30d0b075),l=a(0x3288ef0e);let getDeprecationCookie=()=>{let e=(0,n.v8)("c")||"";return((0,i.LL)(e)||{})[l.aT]??""},setDeprecationCookie=e=>{let t=(0,i.LL)((0,n.v8)("c")||"")||{};t[l.aT]=e,(0,n.n0)("c",(0,i.Zf)(t,{space:""}),3650,(0,r.qF)())}},0x15d9bc40c:(e,t,a)=>{"use strict";a.d(t,{I5:()=>c,Lw:()=>r,MF:()=>o,a2:()=>s,sI:()=>n,zg:()=>i});let n={all:{filter:"all",order:0},orgWide:{filter:"org_wide",order:1},archived:{filter:"archived",order:2},shared:{filter:"external_shared",order:3}},r=null,i=-1;var l,o=((l={}).add_members="add_members",l.edit_channel_managers="edit_channel_managers",l.edit_workspaces="edit_workspaces",l.edit_posting_permissions="edit_posting_permissions",l.edit_private_channel_membership_limit="edit_private_channel_membership_limit",l.edit_msg_retention="edit_msg_retention",l.rename="rename",l.change_limited_access_group="change_limited_access_group",l.convert_to_private="convert_to_private",l.convert_to_public="convert_to_public",l.archive="archive",l.unarchive="unarchive",l.delete="delete",l.disconnect_esc="disconnect_esc",l.manage_external_permissions="manage_external_permissions",l.exclude_from_slack_ai="exclude_from_slack_ai",l.include_slack_ai="include_slack_ai",l.api_error="api_error",l.menu_separator="menu_separator",l);let s={everyone:"ra",everyoneButGuests:"regular",orgAdminsOnly:"org_admin",plusSelectedMembers:"plus_selected_members",adminsOnly:"admin"},c={type:"and",clauses:[{type:"is",value:"user"},{type:"or",clauses:[{type:"level",value:"restricted"},{type:"level",value:"ultra_restricted"},{type:"level",value:"invited_guest"}]}]}},0x2242d2151:(e,t,a)=>{"use strict";a.d(t,{A:()=>use_content_review_prefs});var n,r=((n={}).ORG_OWNERS="ORG_OWNERS",n.ORG_ADMINS_AND_OWNERS="ORG_ADMINS_AND_OWNERS",n),i=a(0xb1f0729f),l=a(0x226892387);let use_content_review_prefs=()=>({isContentReviewEnabled:!!(0,l.d4)(e=>(0,i.SI)(e,"content_review_enabled")),flagProfileEnabled:!!(0,l.d4)(e=>(0,i.SI)(e,"flag_content_review_flag_profiles")),whoCanReviewFlaggedContent:(0,l.d4)(e=>(0,i.SI)(e,"who_can_review_flagged_content")?.type?.[0])||r.ORG_ADMINS_AND_OWNERS,flagContentAdminDashEnabled:!!(0,l.d4)(e=>(0,i.SI)(e,"flag_content_admin_dash")),flagContentCustomLink:(0,l.d4)(e=>(0,i.SI)(e,"flag_message_custom_link"))??void 0,flagContentUsersToNotify:(0,l.d4)(e=>(0,i.SI)(e,"flag_message_users_to_notify"))??[],isContentReviewNoteRequired:(0,l.d4)(e=>(0,i.SI)(e,"flag_content_review_note_required"))??void 0,isFlaggerOutcomeNotifOn:(0,l.d4)(e=>(0,i.SI)(e,"flag_message_flagger_outcome_notif"))??void 0,isAuthorOutcomeNotifOn:(0,l.d4)(e=>(0,i.SI)(e,"flag_message_author_outcome_notif"))??void 0,isReviewerAssignedNotifOn:(0,l.d4)(e=>(0,i.SI)(e,"flag_content_reviewer_assigned_notif"))??void 0,decisionReversalEnabled:(0,l.d4)(e=>(0,i.SI)(e,"flag_content_review_allow_decision_reversal"))??void 0})},0x2ebe4e1d:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x77727995),s=a(0x1c659cbb1),c=a(0x2376ea9bb),d=a(0x167bc3887);let m=class extends n.PureComponent{static defaultProps={entityType:"member",onClick:l.A,isInteractive:!0};mapRawMemberDataToProps({rawMemberData:e,iconDimension:t,customClasses:a,clickHandler:n}){let r=(0,o.A)(e,"enterprise_id"),i=e.isExternal,l=(0,s.fp)({isExternal:i,teamId:r}),c=(0,d.Ay)({size:t,teamOrEnterpriseId:r,memberId:(0,o.A)(e,"id"),avatarHash:(0,o.A)(e,"profile.avatar_hash")});return{imageUrl:c.imageUrl,imageUrl2x:c.imageUrl2x,isExternal:e.isExternal,isRestricted:e.is_restricted,isUltraRestricted:e.is_ultra_restricted,size:t,className:a,onClick:n,renderCustomBadge:l}}mapRawWorkspaceOrOrgDataToProps({rawWorkspaceOrOrgData:e,iconDimension:t,customClasses:a}){return{size:t,icon:e.icon,showToolTip:!1,teamName:e.name,className:a}}render(){let{entityType:e,entityData:t,customClasses:a,dimension:r,isInteractive:l,onClick:o}=this.props,d=i()(a,"p-ent_entity_icon");switch(e){case"member":{let e=this.mapRawMemberDataToProps({rawMemberData:t,iconDimension:r,customClasses:d,clickHandler:o});return n.createElement(s.f1,{size:e.size,imageUrl:e.imageUrl,imageUrl2x:e.imageUrl2x,isExternal:e.isExternal,isRestricted:e.isRestricted,isUltraRestricted:e.isUltraRestricted,className:e.className,onClick:e.onClick,renderCustomBadge:e.renderCustomBadge,isInteractive:l})}case"org":case"workspace":{let e=this.mapRawWorkspaceOrOrgDataToProps({rawWorkspaceOrOrgData:t,iconDimension:r,customClasses:d});return n.createElement(c.U,{size:e.size,icon:e.icon,showTooltip:e.showToolTip,teamName:e.teamName,className:e.className})}default:return n.createElement(c.U,{teamName:"?",size:r})}}};m.displayName="EntityIcon";let u=m},0x19ea5d768:(e,t,a)=>{"use strict";a.d(t,{BA:()=>c,GG:()=>m,J8:()=>p,KL:()=>d,RJ:()=>h,UX:()=>u,VF:()=>s,gm:()=>o});var n=a(0xcf658893),r=a(0xba77ecb9),i=a(0x1cf0d97e1);let l={csvUploadSuccessfulEmailsCount:0,csvUploadFailedEmailsMappings:[],isUploadingCsv:!1,hasUploadCsvError:!1,uploadBulkUpdateEmailsDomainError:void 0},o=(0,i.Ay)(e=>e.migrationsBulkUpdateEmails.csvUploadSuccessfulEmailsCount);o.meta={name:"getCsvUploadSuccessfulEmailsCount",key:"createSelectorGetCsvUploadSuccessfulEmailsCount",description:e=>e.migrationsBulkUpdateEmails.csvUploadSuccessfulEmailsCount};let s=(0,i.Ay)(e=>e.migrationsBulkUpdateEmails.csvUploadFailedEmailsMappings);s.meta={name:"getCsvUploadFailedEmailsMappings",key:"createSelectorGetCsvUploadFailedEmailsMappings",description:e=>e.migrationsBulkUpdateEmails.csvUploadFailedEmailsMappings},(0,i.Ay)(e=>e.migrationsBulkUpdateEmails.isUploadingCsv).meta={name:"getIsUploadingUserCsv",key:"createSelectorGetIsUploadingUserCsv",description:e=>e.migrationsBulkUpdateEmails.isUploadingCsv};let c=(0,i.Ay)(e=>e.migrationsBulkUpdateEmails.hasUploadCsvError);c.meta={name:"getHasUploadUserCsvError",key:"createSelectorGetHasUploadUserCsvError",description:e=>e.migrationsBulkUpdateEmails.hasUploadCsvError};let d=(0,n.Ay)("Set state for uploading bulk update emails csv");d.meta={name:"setIsUploadingBulkUpdateEmailsCsv",key:"createActionSetIsUploadingBulkUpdateEmailsCsv",description:"Set state for uploading bulk update emails csv"};let m=(0,i.Ay)(e=>e.migrationsBulkUpdateEmails.uploadBulkUpdateEmailsDomainError);m.meta={name:"getUploadBulkUpdateEmailsDomainError",key:"createSelectorGetUploadBulkUpdateEmailsDomainError",description:e=>e.migrationsBulkUpdateEmails.uploadBulkUpdateEmailsDomainError};let u=(0,n.Ay)("Set state for uploading bulk update emails domain error");u.meta={name:"setUploadBulkUpdateEmailsDomainError",key:"createActionSetUploadBulkUpdateEmailsDomainError",description:"Set state for uploading bulk update emails domain error"};let p=(0,n.Ay)("Reset bulk update emails state");p.meta={name:"resetBulkUpdateEmailsState",key:"createActionResetBulkUpdateEmailsState",description:"Reset bulk update emails state"};let h=(0,r.Ay)({},l,{storeKey:"migrationsBulkUpdateEmails",persistenceEnabled:!1}).on(d,(e,t)=>({...e,...t})).on(u,(e,t)=>({...e,uploadBulkUpdateEmailsDomainError:t.error})).on(p,()=>({...l}))},0x916f3811:(e,t,a)=>{"use strict";a.r(t),a.d(t,{MigrationUnblockedRefreshBanner:()=>MigrationUnblockedRefreshBanner});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xd9faf062),l=a(0x1faa3f1ac),o=a(0x10b603e91),s=a(0x11d0b0bd1),c=a(0x5b1935a6);let d=new r.Ay("enterprise"),useMigrationUnblockedBannerState=()=>{let[e,t]=(0,n.useState)(!1),a=(0,n.useCallback)(()=>{e||(t(!0),(0,s.yQ)({reason:"migration unblocked - refresh Slack to see the latest updates",reasonKey:"migration_unblocked_refresh_banner"}))},[e]);return{renderReloadSlackLink:(0,n.useCallback)(({text:t})=>n.createElement(l.A,{onClick:a,disabled:e},e?d.t("Reloading Slack\u2026"):t),[a,e]),isLoading:e}};useMigrationUnblockedBannerState.displayName="useMigrationUnblockedBannerState";let MigrationUnblockedRefreshBanner=({notificationName:e})=>{let{renderReloadSlackLink:t}=useMigrationUnblockedBannerState();if(e!==c.ze.MIGRATION_UNBLOCKED_REFRESH_BANNER)return null;let a=d.rt("Slack has been updated for your organization. <Link>Reload now</Link>",{"<Link>":t});return n.createElement(o.A,{className:"align_center","data-qa":"migration_unblocked_reload_banner",preventTypeOverride:!0,showCloseButton:!1,isFixedPosition:!1,type:i.QE.info},a)};MigrationUnblockedRefreshBanner.displayName="MigrationUnblockedRefreshBanner"},0x177ba2c1a:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0xbad225b5),r=a(0x2b7f0bcc);let ApiErrorAlert=({showAlert:e,text:t,"data-qa":a="org_settings_api_error_alert"})=>e?n.createElement(r.Ay,{isIconVisible:!1,level:r.A_.error,align:r.AO.left,className:"margin_bottom_100"},n.createElement("span",{"data-qa":a},t)):null;ApiErrorAlert.displayName="ApiErrorAlert";let i=ApiErrorAlert},0x23495961f:(e,t,a)=>{"use strict";a.d(t,{Eb:()=>s,cm:()=>buildOrgDashPermissionsUrl,fk:()=>buildTeamSiteRolesUrl,g:()=>c});var n=a(0x410e38f5),r=a(0x1b25f95c9),i=a(0x328743af),l=a(0x11c82607b),o=a(0x14149c126);let s=(0,l.Ay)("Navigates to Roles List",(e,t)=>{let a=t(),n="on"===(0,o._Z)(a,"light_write_ai_pref_migrations");e((0,r.s)({orgDash:{route:n?i.xW.ROUTE_ROLES_AND_PERMISSIONS_ROLES:i.xW.ROUTE_PEOPLE_ROLES},teamSite:buildTeamSiteRolesUrl()}))});s.meta={name:"navigateToRolesList",key:"createThunkNavigateToRolesList",description:"Navigates to Roles List"};let c=(0,l.Ay)("Navigates to a Roles Details page",(e,t,a)=>{let n,l,s=t(),c="on"===(0,o._Z)(s,"light_write_ai_pref_migrations");e((0,r.s)({orgDash:{route:c?i.xW.ROUTE_ROLES_AND_PERMISSIONS_ROLES_DETAILS:i.xW.ROUTE_PEOPLE_ROLES_DETAILS,params:{roleId:a.roleId,roleTabId:a.tabId}},teamSite:(n=buildTeamSiteRolesUrl(),l=`${n}/${a.roleId}`,a.tabId?`${l}/${a.tabId}`:l),updateTeamSiteUrlOnly:a.updateTeamSiteUrlOnly}))});function buildOrgDashPermissionsUrl(e,{roleId:t}){let a=(0,o._Z)(e,"light_write_ai_pref_migrations")?`permissions/roles/${t}/permissions`:`people/permissions/roles/${t}/permissions`;return(0,n.A)(e,a)}function buildTeamSiteRolesUrl(){return"/admin/permissions/roles"}c.meta={name:"navigateToRolesDetails",key:"createThunkNavigateToRolesDetails",description:"Navigates to a Roles Details page"}},0x200936397:(e,t,a)=>{"use strict";a.d(t,{a:()=>Box});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0xc51a6cc5),o=a.n(l);let Box=({children:e,as:t="div",padding:a,paddingInlineStart:r,paddingInline:l,paddingBlock:s,paddingBlockEnd:c,backgroundColor:d,border:m,borderColor:u,borderRadius:p,height:h,flex:_})=>n.createElement(t,{className:i()(o().box,{[o().backgroundColorCoreBaseSecondary]:"Core/Base/Secondary"===d,[o().backgroundColorCoreSurfacePrimary]:"Core/Surface/Primary"===d,[o().backgroundColorCoreSurfaceHighlight3]:"Core/Surface/Highlight 3"===d,[o().backgroundLightCoreBaseSecondary]:"Core/Base/Secondary"===d,[o().borderRegular]:"regular"===m,[o().borderColorCoreSurfaceSecondary]:"Core/Surface/Secondary"===u,[o().borderColorCoreOutlineTertiary]:"Core/Outline/Tertiary"===u,[o().borderRadiusXLarge]:"x-large"===p,[o().borderRadiusRounded]:"rounded"===p,[o().borderRadiusBase]:"base"===p,[o().padding50]:"50"===a,[o().padding100]:"100"===a,[o().padding125]:"125"===a,[o().paddingInlineStart250]:"250"===r,[o().paddingInlineStart125]:"125"===r,[o().paddingInline25]:"25"===l,[o().paddingInline100]:"100"===l,[o().paddingInline150]:"150"===l,[o().paddingInline175]:"175"===l,[o().paddingInline200]:"200"===l,[o().paddingInline250]:"250"===l,[o().paddingBlock100]:"100"===s,[o().paddingBlockEnd150]:"150"===c,[o().heightFill]:"fill"===h,[o().inlineFlex]:"inline"===_,[o().listStyleNone]:"li"===t})},e);Box.displayName="Box"},0x1b997ca3c:(e,t,a)=>{"use strict";a.d(t,{D:()=>useShowMigrateLaterCoachmark,s:()=>useMigrateUsersLaterCoachmark});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1ec68d6a3),l=a(0x226892387),o=a(0x1472af90a),s=a(0xf052d367),c=a(0x18632f75a);let d=o.G7.SalesforceAdminMigrateUsersLaterCoachmark,m="salesforce-admin-migrate-users-later-coachmark",loadMigrateUsersCoachmarkInteractions=()=>(0,c.b)({interactions:[{component:d,type:o.X8.Impression},{component:d,type:o.X8.Dismiss}],reason:m}),useShowMigrateLaterCoachmark=e=>{let t=(0,r.wA)();return(0,n.useCallback)(async()=>{try{e(),await t((0,c.z)({component:d,type:o.X8.Impression,reason:m})),t(loadMigrateUsersCoachmarkInteractions())}catch{(0,i.Ay)({label:"SALESFORCE-CONNECTIONS-ADMIN"}).error(Error("Error thrown when dispatching a thunk loadUserInteractions from useShowMigrateLaterCoachmark"))}},[e,t])},useMigrateUsersLaterCoachmark=()=>{let e=(0,r.wA)(),t=(0,l.d4)(e=>(0,s.kI)(e,d,o.X8.Impression)),a=(0,l.d4)(e=>(0,s.PU)(e,d)),u=(0,l.d4)(e=>(0,s.Pg)(e,d)),p=(0,n.useCallback)(()=>{try{e((0,c.z)({component:d,type:o.X8.Dismiss,reason:m}))}catch{(0,i.Ay)({label:"SALESFORCE-CONNECTIONS-ADMIN"}).error(Error("Error thrown when dispatching a thunk recordUserInteraction from useMigrateUsersLaterCoachmark"))}},[e]);return(0,n.useEffect)(()=>{try{e(loadMigrateUsersCoachmarkInteractions())}catch{(0,i.Ay)({label:"SALESFORCE-CONNECTIONS-ADMIN"}).error(Error("Error thrown when dispatching a thunk loadUserInteractions from useMigrateUsersLaterCoachmark"))}},[e]),[t&&a&&!u,p]}},0x198a709fb:(e,t,a)=>{"use strict";a.d(t,{V:()=>r,X:()=>n});let n={AutoStarterMembers:"users",ChannelConfigurations:"channel-configurations",Members:"members",SeamlessAuth:"seamless-auth",Slackbot:"slackbot",Settings:"settings"},r={Expanded:"expanded",Compact:"compact",Restricted:"restricted"}},0xb562ffb7:(e,t,a)=>{"use strict";a.d(t,{v:()=>buildTeamPath});var n=a(0xd6ba6894);let buildTeamPath=({orgId:e,tabId:t}={},a)=>{let r,i=a||"/admin/salesforce-organizations";return r=e&&t?`${i}/${e}/${t}`:e?`${i}/${e}`:i,`${r}/${n.J.location.search}`}},0x212c89127:(e,t,a)=>{"use strict";a.d(t,{Wj:()=>isKnownAPIError,ft:()=>isKnownErrorFromMessage});let isErrorCode=(e,t)=>"string"==typeof e&&t.some(t=>t===e),isKnownAPIError=(e,t)=>null!=e&&"object"==typeof e&&"data"in e&&null!=e.data&&"object"==typeof e.data&&"error"in e.data&&isErrorCode(e.data.error,t),isKnownErrorFromMessage=(e,t)=>null!=e&&"object"==typeof e&&"message"in e&&isErrorCode(e.message,t)},0x1a2fba84c:(e,t,a)=>{"use strict";a.d(t,{I:()=>useNavigateToSalesforceRoute});var n=a(0xbad225b5),r=a(0xd6ba6894),i=a(0xb562ffb7),l=a(0x12eea8ff0),o=a(0x16026d477),s=a(0x226892387),c=a(0x100313bb4);let useNavigateToSalesforceRoute=()=>{let e=(0,s.d4)(c.s$);return(0,n.useCallback)(({routeName:t=l.x.ROUTE_SALESFORCE_ORGANIZATIONS,params:a={},legacyPath:n}={})=>{if(e)(0,o.o)(t,a,"");else{let e=(0,i.v)(a,n);r.J.location.assign(e)}},[e])}},0xa51ade0d:(e,t,a)=>{"use strict";a.d(t,{K:()=>n,i:()=>r});let n={TwoFactorAuthRequired:"two-factor-auth-required",EnterpriseMobileDeviceCheck:"enterprise-mobile-device-check",DesktopSessionDuration:"desktop-session-duration",MobileSessionDuration:"mobile-session-duration"},r={ACTIVE:"active",ARCHIVED:"archived"}},0x4a047101:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>d});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x7042de13),l=a(0x226892387),o=a(0x14149c126),s=a(0x20061cab9),c=a(0x5b1935a6);let TwoFactorRequireAdminBannerContainer=e=>{let t=(0,r.wA)(),a=(0,l.d4)(e=>"on"===(0,o._Z)(e,"two_factor_require_admin_banner")),d=(0,n.useCallback)(()=>{t((0,s.Ay)({spaceName:c.xu.CLIENT_FOOTER,action:c.hw.DISMISS}))},[t]);return n.createElement(i.A,{...e,experimentTwoFactorRequireAdminBannerGroupOn:a,handleDismissBanner:d})};TwoFactorRequireAdminBannerContainer.displayName="TwoFactorRequireAdminBannerContainer";let d=(0,n.memo)(TwoFactorRequireAdminBannerContainer)},0x7042de13:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0xd9faf062),l=a(0x1faa3f1ac),o=a(0x10b603e91),s=a(0x6960d8b9),c=a(0x175beb059),d=a(0x5b1935a6);let m=new r.Ay("enterprise"),TwoFactorRequireAdminBanner=({experimentTwoFactorRequireAdminBannerGroupOn:e,notificationName:t,bannerType:a,setupDeadline:r,handleDismissBanner:u})=>{let p=(0,n.useCallback)(({text:e})=>n.createElement(l.A,{href:"/account/settings/2fa_choose",onClick:u},e),[u]);if(!e||t!==d.ze.TWO_FACTOR_REQUIRE_ADMIN_BANNER)return null;let h=m.rt("Slack requires all Workspace Admins and Owners to set up two-factor authentication by {deadline}. <Link>Set up now</Link>",{"<Link>":p,deadline:(0,s.Yq)(r??1701234e3,"{date_num}",{customFormat:"MMMM DD, YYYY"})}),_=(0,c.Ay)({informational:()=>i.QE.info,warning:()=>i.QE.warning})(i.QE.info)(a);return n.createElement(o.A,{className:"align_center","data-qa":"two_factor_require_admin_banner",type:_,preventTypeOverride:!0,isFixedPosition:!1,onClose:u},h)};TwoFactorRequireAdminBanner.displayName="TwoFactorRequireAdminBanner";let u=TwoFactorRequireAdminBanner},0xb0b66ea4:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>g});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x62a17882),l=a(0x10b60d52),o=a(0xa1832ae4),s=a(0xb8504a42),c=a(0x1ec68d6a3),d=a(0x691ce3ab),m=a(0x226892387),u=a(0x20061cab9),p=a(0x1c93af6de),h=a(0x5b1935a6),_=a(0x1ee439e69),f=a(0x981a75e2),b=a(0x164ee0b8e);let UserSessionExpirationBannerContainer=({notificationName:e,expiry:t})=>{let a=(0,r.wA)(),g=(0,m.d4)(c.Ay),y=(0,m.d4)(_.H7),A=(0,n.useCallback)(()=>{a((0,u.Ay)({spaceName:h.xu.CLIENT_FOOTER,action:h.hw.DISMISS}))},[a]),x=(0,n.useCallback)(async()=>{let e=(0,o.ZT)(y)??"";try{await A()}catch(e){g.error("Error logging warning banner dismissal",e)}if((0,i.l_)())(0,b.t2)(e,p._,"true"),window.open((0,o.Zl)(y,"/ssb/signin_redirect?session_duration_logout_team=1"),"_blank");else{let t={teamId:e};(0,s.r7)(y)&&(t.orgId=(0,o.Ss)(y)),(0,d.dispatchForClientStore)((0,f.H)(t))}},[y,A,g]);return n.createElement(l.A,{expiry:t,show15MinuteWarning:e===h.ze.SESSION_EXPIRY_WARNING_BANNER_15,handleSignOutReauth:x,handleDismissBanner:A})};UserSessionExpirationBannerContainer.displayName="UserSessionExpirationBannerContainer";let g=(0,n.memo)(UserSessionExpirationBannerContainer)},0x10b60d52:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x40c0d834),i=a(0x62a17882),l=a(0x20482ad21),o=a(0xd9faf062),s=a(0x1faa3f1ac),c=a(0x10b603e91),d=a(0x3711e82d),m=a(0x6960d8b9);let u=new l.Ay("enterprise"),UserSessionExpirationBanner=({expiry:e,show15MinuteWarning:t,handleSignOutReauth:a,handleDismissBanner:l})=>{let p,[h,_]=(0,n.useState)(new Date),f=(0,n.useRef)(),b=(0,m.ez)(new Date(1e3*e),h,{units:"minutes"}),g=b<=0,y=t?d.EventId.IDSC_USER_SESSION_EXPIRE_SHOWN_15:d.EventId.IDSC_USER_SESSION_EXPIRE_SHOWN_120,A=t?d.UiComponentName.USER_SESSION_EXPIRATION_BANNER_SHOWN_15:d.UiComponentName.USER_SESSION_EXPIRATION_BANNER_SHOWN_120;(0,n.useEffect)(()=>(g?clearInterval(f.current):t&&!f.current&&(f.current=window.setInterval(()=>{_(new Date)},3e4)),()=>clearInterval(f.current)),[g,t]);let x=(0,n.useCallback)(({key:e,text:t})=>n.createElement(s.A,{key:e,onClick:a},t),[a]);if(g)p=u.rt("Your session expired. <Link>Sign back in</Link>.",null,x);else if(t)p=(0,i.l_)()?u.rt("It\u2019s time to <Link>reauthenticate</Link> \u2014 your session expires in {minutes, plural, =1 {# minute} other {# minutes}}.",{minutes:b},x):u.rt("It\u2019s time to <Link>sign out and reauthenticate</Link> \u2014 your session expires in {minutes, plural, =1 {# minute} other {# minutes}}.",{minutes:b},x);else{let t=(0,m.Yq)(e,"{time}");p=(0,i.l_)()?u.rt("Your session expires at {expirationTimestamp}. <Link>Reauthenticate now</Link> to avoid interruption.",{expirationTimestamp:t},x):u.rt("Your session expires at {expirationTimestamp}. <Link>Sign out and reauthenticate now</Link> to avoid interruption.",{expirationTimestamp:t},x)}return n.createElement(r.A,{clogImpression:!0,enableClogImpressionOffScreen:!0,eventId:y,uiComponentName:A},n.createElement(c.A,{className:"align_center","data-qa":"user_session_expiration_client_footer_banner",type:t||g?o.QE.warning:o.QE.info,preventTypeOverride:!0,isFixedPosition:!1,onClose:l},p))};UserSessionExpirationBanner.displayName="UserSessionExpirationBanner";let p=UserSessionExpirationBanner},0x18bebdcb1:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0xd6ba6894),s=a(0xb97b797e),c=a(0x20482ad21),d=a(0x12c020c3),m=a(0x11a296110),u=a(0x15f8e452a),p=a(0x4c96e5d9);let h=new c.Ay("enterprise_settings"),SettingsItemButtonControl=({editOnly:e,toggleOnly:t,enabled:a,onEnable:r,onDisable:i,onEdit:l,editButtonText:o,editButtonTypeOverride:s,editButtonAriaLabel:c,dataQAPrefix:d,clogLabel:u,buttonAriaDescribedBy:p})=>{let _=(0,n.useCallback)(e=>{e.stopPropagation(),i&&i(e)},[i]),f=(0,n.useCallback)(e=>{e.stopPropagation(),r&&r(e)},[r]),b=(0,n.useCallback)(e=>{e.stopPropagation(),l&&l(e)},[l]),g=(0,n.useMemo)(()=>({elementName:`${u}_edit`,onClick:{enableClogAction:!!u}}),[u]),y=(0,n.useCallback)(()=>{let e=o||h.t("Edit"),t=s??"outline",a=c||e;return n.createElement("div",{className:"p-settings_item_button_control"},n.createElement(m.Ay,{type:t,size:"small",onClick:b,"aria-label":a,"aria-describedby":p,className:"margin_left_50","data-qa":`${d}-setting-item-edit`,autoClogProps:g},e))},[p,d,c,o,s,g,b]),A=(0,n.useMemo)(()=>({elementName:`${u}_disable`,onClick:{enableClogAction:!!u}}),[u]),x=(0,n.useCallback)(()=>{let e=h.t("Disable"),a=h.t("Edit");return n.createElement("div",{className:"p-settings_item_button_control"},n.createElement(m.Ay,{type:"danger",size:"small",onClick:_,"aria-label":e,"data-qa":`${d}-setting-item-disable`,"aria-describedby":p,autoClogProps:A},e),!t&&n.createElement(m.Ay,{type:"outline",size:"small",onClick:b,className:"margin_left_50","aria-label":a,"aria-describedby":p,"data-qa":`${d}-setting-item-edit`,autoClogProps:g},a))},[p,d,A,g,_,b,t]),E=(0,n.useMemo)(()=>({elementName:`${u}_enable`,onClick:{enableClogAction:!!u}}),[u]),C=(0,n.useCallback)(()=>{let e=h.t("Enable");return n.createElement("div",{className:"p-settings_item_button_control"},n.createElement(m.Ay,{type:"outline",size:"small",onClick:f,"data-qa":`${d}-setting-item-enable`,"aria-describedby":p,autoClogProps:E},e))},[p,d,E,f]);return e?y():a?x():C()};SettingsItemButtonControl.displayName="SettingsItemButtonControl";var _=a(0x2b7f0bcc),f=a(0xb04bc36e),b=a(0x1fd3f6e20),g=a(0x243d57606);let SettingsItemHeader=({title:e="",titleClass:t="",subTitle:a=null,descriptionClass:r="",description:l=null,className:o="",descriptionAlerts:s=null,callout:c="",calloutTooltip:d="",customizedCallout:u="",customizableCallout:h="",customizableCalloutTooltip:y="",upsellCalloutType:A=null,comingSoonTag:x=""})=>{let renderAlert=()=>s?n.createElement(_.Ay,{className:"p-settings_item_header__alert",type:"inline",level:"default",align:"left"},s.map((e,t)=>n.createElement(n.Fragment,{key:t},e))):null;renderAlert.displayName="renderAlert";let renderDescription=()=>{if(!l)return null;let e=i()(o,r,"sk_foreground_max");return n.createElement("span",{className:e},l)};renderDescription.displayName="renderDescription";let renderTitle=()=>{if(!e)return null;let r=i()(o,t),l="string"==typeof e?e.replace(/ /g,"_"):"";return n.createElement(n.Fragment,null,n.createElement("h4",{className:r,id:l},e),a)};renderTitle.displayName="renderTitle";let renderUpsellCallout=()=>A?n.createElement(g.a,{featurePlan:"PLUS"===A?"plus":"std"}):null;renderUpsellCallout.displayName="renderUpsellCallout";let renderCallout=()=>c?n.createElement(f.A,{className:"p-settings_item___callout"},d?n.createElement(p.Ay,{tip:d},n.createElement(m.Nm,null,c)):c):null;renderCallout.displayName="renderCallout";let renderCustomizableCallout=()=>{if(!h)return null;let e=n.createElement(b.v,{isMicro:!0,style:b.u.Gray},h);return n.createElement("div",{className:"margin_top_25"},y?n.createElement(p.Ay,{tip:y},n.createElement(m.Nm,null,e)):e)};renderCustomizableCallout.displayName="renderCustomizableCallout";let renderCustomizedCallout=()=>u?n.createElement("div",{className:"margin_left_25"},n.createElement(b.v,{isMicro:!0,style:b.u.Gray},u)):null;renderCustomizedCallout.displayName="renderCustomizedCallout";let renderCustomComingSoonTag=()=>x?n.createElement("div",{className:"margin_top_25"},n.createElement(b.v,{isMicro:!0,style:b.u.Informative},x)):null;return renderCustomComingSoonTag.displayName="renderCustomComingSoonTag",n.createElement("div",null,n.createElement("div",{className:"p-settings_item__header_content"},n.createElement("div",{className:"p-settings_item__header_content_row"},renderTitle(),renderCallout(),renderCustomizedCallout()),renderUpsellCallout(),renderCustomizableCallout(),renderCustomComingSoonTag()),renderDescription(),renderAlert())};SettingsItemHeader.displayName="SettingsItemHeader";let y=n.memo(SettingsItemHeader);var A=a(0xa144a6db);let x=new c.Ay("enterprise_dashboard"),E=class extends n.PureComponent{static defaultProps={description:null,onClick:l.A,readonly:!1,readonlyText:"",readonlyIconType:null,readonlyTooltip:"",readonlyAllowClick:!1,noButton:!1,descriptionAlerts:null,type:"button",dataQAPrefix:"",state:null,className:"",clogLabel:null,labelSubtitleComponent:null,callout:"",customizableCalloutTooltip:"",calloutTooltip:"",customizableCallout:"",upsellCalloutType:null,comingSoonTag:"",alert:null,scrollToId:void 0,isTeamSite:!1,customized:""};ref;constructor(e){super(e),(0,s.v)(this,["onReadonlyButtonClick"]),this.state={isScrollToItem:!1},this.ref=n.createRef()}componentDidMount(){if(this.props.scrollToId){let e;(e=this.props.isTeamSite?(0,d.qN)(o.J.location.href).securityItem:(0,A.f)()?.params?.securityItem)&&e===this.props.scrollToId&&(this.setState(()=>({isScrollToItem:!0})),setTimeout(()=>{this.ref?.current?.scrollIntoView({behavior:"smooth",block:"center"})},150))}}onReadonlyButtonClick(e){e.preventDefault(),e.stopPropagation()}chooseOnClickHandler(){return this.props.readonly?e=>{this.props.readonlyAllowClick||(e.preventDefault(),e.stopPropagation())}:this.props.onClick||l.A}renderButtonControl(){let{clogLabel:e,noButton:t,readonly:a,readonlyTooltip:r,readonlyText:i,readonlyIconType:l,control:o,readonlyAllowClick:s,label:c}=this.props;if(t)return n.createElement(m.Nm,{"aria-disabled":"true"});if(a&&i&&s)return n.createElement("div",{className:"p-settings_item__readonly_control"},n.createElement(u.A,{type:l||"eye-filled",size:"inherit",inline:!0}),i);if(a){let e=n.createElement(m.Nm,{"aria-disabled":"true","aria-label":r,className:"c-button--focus-visible p-settings_item__readonly_control",onClick:this.onReadonlyButtonClick},n.createElement(u.A,{type:l||"eye-filled",size:"inherit",inline:!0}),i||x.t("Read only"));return r?n.createElement(p.Ay,{tip:r,position:"top"},e):e}let{editOnly:d,toggleOnly:h,editButtonText:_,editButtonAriaLabel:f,enabled:b,onEnable:g,onDisable:y,onEdit:A,dataQAPrefix:E,editButtonTypeOverride:C}=o||{},k="string"==typeof c?c.replace(/ /g,"_"):"";return n.createElement(SettingsItemButtonControl,{clogLabel:e,editOnly:d??!1,enabled:b??!1,onEnable:g,onDisable:y,onEdit:A,editButtonText:_,editButtonTypeOverride:C,editButtonAriaLabel:f,buttonAriaDescribedBy:k,toggleOnly:h??!1,dataQAPrefix:E})}renderControl(){return this.props.control?.type==="custom"?n.createElement("div",{className:"p-settings_item__control"},this.props.control.node):this.props.control?.type==="button"?n.createElement("div",{className:"p-settings_item__control"},this.renderButtonControl()):null}renderLabel(){return n.createElement(y,{title:this.props.label,subTitle:this.props.labelSubtitleComponent,className:"p-settings_item__label",callout:this.props.callout,calloutTooltip:this.props.calloutTooltip,customizableCallout:this.props.customizableCallout,customizableCalloutTooltip:this.props.customizableCalloutTooltip,upsellCalloutType:this.props.upsellCalloutType,comingSoonTag:this.props.comingSoonTag})}renderState(){let{state:e,description:t,descriptionAlerts:a,customized:r}=this.props;return n.createElement(y,{title:e,description:t,titleClass:"p-settings_item__label",descriptionAlerts:a,descriptionClass:"p-settings_item__description",customizedCallout:r})}render(){let{dataQAPrefix:e,alert:t}=this.props,a=n.createElement("div",{"data-qa":`${e}ent-settings-item`,className:i()("p-settings_item",this.props.className,{"p-settings_item--readonly":this.props.readonly}),onClick:this.chooseOnClickHandler(),role:"presentation"},this.renderLabel(),this.renderState(),this.renderControl());return t?n.createElement(n.Fragment,null,t,a):n.createElement("div",{className:i()("p-settings_item_wrapper",this.props.className,{"p-settings_item__background--highlight":this.state.isScrollToItem}),ref:this.ref},a)}};E.displayName="SettingsItem";let C=E},0x120b6eb39:(e,t,a)=>{"use strict";a.d(t,{F:()=>useGuidelinesHelper});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x1faa3f1ac),o=a(0x118cdcdea),s=a.n(o),c=a(0x40c0d834),d=a(0x20482ad21),m=a(0x11a296110),u=a(0x4c96e5d9),p=a(0x2376ea9bb),h=a(0x1c2d7de14),_=a(0xba4aff95),f=a(0x110b4f809),b=a(0x20e80190e),g=a(0x22d3b4662),y=a(0x1ed767a16),A=a(0x3711e82d),x=a(0x24429189c),E=a(0x226892387),C=a(0x1fcbb004d),k=a(0x1ff36cb41),v=a(0x1ee439e69);let S=new d.Ay("slack_connect_guidelines"),I={action:A.UiAction.COPY_TO_CLIPBOARD,onClick:{enableClogAction:!0}},SlackConnectGuidelinesModal=({modalHeaderSuffix:e,guidelinesType:t,showCopyButton:a,entryPoint:i})=>{let l,o=(0,r.wA)(),[d,w]=(0,f.A)(!1,3e3),T=(0,E.d4)(v.lp),N=(0,E.d4)(v.H2),M=(0,E.Z2)(e=>(0,k.DG)(e,t)),R=(0,n.useMemo)(()=>o((0,x.y)({delta:new(s())(M),convertEmpty:!0,trimStartingWhitespace:!1})),[M,o]),P=(0,E.d4)(e=>(0,g.A)(e,R.blocks,{linkFormat:"bracket"})),L=(0,n.useCallback)(()=>{(0,y.x3)(P),w(!0)},[P,w]);l="instructions"===e?S.t("instructions for creating Slack Connect channels"):S.t("guidelines for using Slack Connect");let O=(0,n.useCallback)(()=>o((0,C.O)()),[o]),D=S.t("Copied!"),F=n.createElement(m.Ay,{type:"outline",onClick:L,autoClogProps:I},S.t("Copy Instructions"));return n.createElement(c.A,{uiStep:A.UiStep.SLACK_CONNECT_GUIDELINES_MODAL,stepVariant:t,entryPoint:i},n.createElement(b.dW,{centered:!0,closeModal:O,contentLabel:S.t("Your workspace\u2019s {headerText}",{headerText:l})},n.createElement(b.rQ,null,n.createElement(b.Rc,{icon:n.createElement(p.A,{size:40,team:T}),title:S.rt("{orgName}\u2019s {headerText}",{orgName:N,headerText:l})})),n.createElement(b.$m,null,n.createElement(b.qf,null,n.createElement(h.A,{elements:R.blocks[0].elements}))),n.createElement(b.jl,{className:"p-slack_connect_guidelines_modal__footer"},n.createElement(_.A,{articleId:0x1ac6c815a3},S.t("Learn more about Slack Connect")),a&&(0,y.tD)()?n.createElement(b.ox,null,d?n.createElement(u.Ay,{tip:D,status:u.YU.Success},F):F,n.createElement("div",{className:"offscreen",role:"alert"},d?D:"")):null)))};SlackConnectGuidelinesModal.displayName="SlackConnectGuidelinesModal";var w=a(0x46dbff89);function useGuidelinesHelper({className:e,dataQa:t,ref:a,stepVariant:o,type:s,modalHeaderSuffix:c,showCopyButton:d}){let m=(0,r.wA)(),u=(0,E.d4)(e=>(0,k.NR)(e,s)),p=(0,E.d4)(e=>(0,k.Wo)(e,s)),h=(0,n.useMemo)(()=>({elementName:"view_guidelines",elementValue:s,stepVariant:o,clogImpression:!0,onClick:{enableClogAction:!0}}),[o,s]),_=(0,n.useCallback)(()=>m((0,w.q)({element:n.createElement(SlackConnectGuidelinesModal,{modalHeaderSuffix:c,showCopyButton:d,guidelinesType:s,entryPoint:h.stepVariant}),isStackable:!0})),[m,c,d,s,h.stepVariant]),f="link"===u||"content"===u,b=(0,n.useCallback)(({text:r})=>f?n.createElement(l.A,{className:e,ref:a,href:"link"===u?p:null,onClick:"content"===u?_:i.A,"data-qa":t,autoClogProps:h},r):null,[e,t,p,u,_,a,f,h]);return(0,n.useMemo)(()=>({guidelinesLink:p,guidelinesType:u,handleGuidelinesCTAClick:_,renderLink:b,shouldDisplayGuidelines:f,viewGuidelinesAutoClogProps:h}),[p,u,_,b,f,h])}useGuidelinesHelper.displayName="useGuidelinesHelper"},0x211bece3d:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x2b7f0bcc);let l=new r.Ay("enterprise_dashboard");function DisconnectChannelModalAlert(){return n.createElement(i.Ay,{customIcon:!0,"data-qa":"disconnect-channel-modal-alert"},l.t("Removing this organization may take some time, but you\u2019ll get a message from Slackbot when it\u2019s done."))}DisconnectChannelModalAlert.displayName="DisconnectChannelModalAlert";let o=DisconnectChannelModalAlert},0x245ee2621:(e,t,a)=>{"use strict";a.d(t,{g:()=>h,A:()=>_});var n,r=a(0xbad225b5),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x2b7f0bcc),c=a(0x11a296110),d=a(0x246bcdebc),m=a(0xe874a88a),u=((n={}).size="size",n.type="type",n);let p=new o.Ay("enterprise_dashboard"),h=100,TeamIconUpload=({team:e,onChange:t,dataQaPrefix:a="team_icon_upload"})=>{let n=(0,r.useRef)(null),[i,o]=(0,r.useState)(null),[_,f]=(0,r.useState)(null),[b,g]=(0,r.useState)(null),y=(0,r.useCallback)(()=>{n.current?.click()},[n]),A=(0,r.useCallback)(e=>{if(g(null),o(e),f(e?URL.createObjectURL(e):null),e)new m.S((t,a)=>e?e?.type.match(/image\/(?:gif|png|jpeg)/i)?void new m.S((t,a)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=e=>{let n=new Image;n.src=e?.target?.result,n.onload=()=>{n.height>=132&&n.width>=132?t():a("size")}}}).then(()=>t()).catch(e=>a(e)):a("type"):t()).then(()=>{t(e,!0)}).catch(a=>{g(a),t(e,!1)});else t(e,!0)},[t]),x=(0,r.useCallback)(e=>{A(e?.target?.files?.[0]??null)},[A]),E=(0,r.useCallback)(e=>{e.preventDefault(),A(e?.dataTransfer?.files?.[0]??null)},[A]),C=(0,r.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},[]),getErrAlert=()=>{let e;return(b===u.size&&(e=p.t("Icon must be at least 132 x 132 pixels")),b===u.type&&(e=p.t("Icon must be a .gif, .jpg, or .png")),e)?r.createElement(s.Ay,{level:s.A_.error,type:s.QE.inline,className:"margin_top_50 margin_bottom_50"},e):null};getErrAlert.displayName="getErrAlert";let k=l()("p-team_icon_upload__file_name",{"p-team_icon_upload__file_name--active":null!==i}),v=(0,r.useMemo)(()=>({width:"66px",height:"66px",backgroundImage:`url(${_})`}),[_]);return r.createElement("div",{className:"display_flex",onDragOver:C,onDrop:E,"data-qa":`${a}_container`},_?r.createElement("div",{className:"p-team_icon_upload__preview",style:v,"data-qa":`${a}_preview`}):r.createElement(d.A,{team:e,size:66}),r.createElement("div",{className:"p-team_icon_upload__upload_field margin_left_100"},r.createElement("div",{className:"display_flex align_items_center margin_bottom_50"},r.createElement("input",{ref:n,type:"file",className:"hidden",accept:"image/*;capture=camera",onChange:x,"data-qa":`${a}_file_input`}),r.createElement(c.Ay,{type:"outline",size:"small",onClick:y,className:"margin_right_75"},p.t("Choose File")),r.createElement("span",{className:k,"data-qa":`${a}_file_name`},i?.name??p.t("No file chosen"))),getErrAlert(),r.createElement("ul",{className:"p-team_icon_upload__hint"},r.createElement("li",null,p.t("Use a solid background color.")),r.createElement("li",null,p.t("Use a graphical logo or image rather than text.")),r.createElement("li",null,p.t("Leave some space around your icon.")),r.createElement("li",null,p.t("Upload an image that is square and {photo_length} x {photo_length}px or larger.",{photo_length:132})),r.createElement("li",null,p.t("File size must be {filesize} MB or less.",{filesize:h})))))};TeamIconUpload.displayName="TeamIconUpload";let _=TeamIconUpload},0x1386101b3:(e,t,a)=>{"use strict";a.d(t,{E:()=>UnavailableChannelBlocker});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x58199183);let s=a.p+"unavailable_channel-63ae80a.png",c=a.p+"unavailable_channel@2x-a94f989.png",d=new l.Ay("unavailable_channel"),UnavailableChannelBlocker=({isThread:e,isImOrMpim:t,unavailableTeamId:a,customTitle:r,customContent:l})=>{let[m,u]=(0,n.useState)(!1),p=n.useCallback(()=>{u(!0)},[]),h=r,_=l;if(!h&&!_&&a){let r=n.createElement(o.A,{id:a});h=e?d.t("This thread is currently unavailable"):d.rt("{teamName} is making changes to their workspace",{teamName:r}),_=e?d.rt("{teamName} is making changes to their workspace, and this thread will be unavailable until that process is complete.",{teamName:r}):t?d.t("This conversation will be unavailable until this process is complete."):d.t("This channel will be unavailable until this process is complete.")}return n.createElement("div",{className:i()("p-unavailable_channel_container",{"p-unavailable_channel_container--visible":m})},n.createElement("img",{className:"p-unavailable_channel_image",src:s,srcSet:`${s}, ${c} 2x`,alt:"",onLoad:p}),n.createElement("h2",{className:"p-unavailable_channel_title"},h),n.createElement("div",{className:"p-unavailable_channel_content p-unavailable_channel_content_wrapper"},_))};UnavailableChannelBlocker.displayName="UnavailableChannelBlocker"},0x1f7c998b9:(e,t,a)=>{"use strict";a.d(t,{c:()=>UnavailableChannel});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1386101b3),o=a(0x16cf1da63),s=a(0x20482ad21),c=a(0xce378727),d=a(0x58199183),m=a(0x18af67efb),u=a(0x21c55473c),p=a(0x1b7e07763),h=a(0x1dfdeb1c8),_=a(0xf741057c),f=a(0xc270896e),b=a(0x1126392c1),g=a(0x1f3db393),y=a(0x1a22a97a4);let A=(0,h.A)("Fetches and upserts a channel from conversations view (this should be used _sparingly_)",async(e,t,{channelId:a,reason:n})=>e((0,p.N)({channel:a,reason:n})).then(t=>{let n,{channelData:r,messagesData:i,membersData:l,botsData:o}=(0,u.W)(t),s=o||[];s.length>0&&e((0,_.s)({bots:s}));let c=(0,m.A)([r,...t.channels],"id");if(c.length>0&&e((0,f.U)({channels:c})),l&&(n=t.self?(0,m.A)([t.self,...l],"id"):(0,m.A)([...l],"id")),n&&n.length>0&&e((0,b.Ay)({members:n})),i&&i.channelId&&i.msgs&&i.msgs.length>0){let t={...i,channelId:i.channelId,msgs:e((0,g.A)({imsgs:i.msgs,channelId:a,trustReactions:!0}))};e((0,y.A)(t))}}));A.meta={name:"fetchAndUpsertChannelFromConversationsView",key:"createFetcherFetchAndUpsertChannelFromConversationsView",description:"Fetches and upserts a channel from conversations view (this should be used _sparingly_)"};var x=a(0x238b287cf),E=a(0x3711e82d),C=a(0x24194f718);let k=a.p+"unavailable_channel_reload-1b4e3d3.png",v=a.p+"unavailable_channel_reload@2x-0cd91df.png",S=new s.Ay("unavailable_channel"),UnavailableChannelReloadChannel=({channelId:e,channelPrivacyType:t,isThread:a,isImOrMpim:r,unavailableTeamId:i})=>{let l,s,m,u=(0,o.wA)(),[p,h]=(0,n.useState)(!1),_=(0,x.A)(),f=(0,n.useCallback)(()=>{h(!0),u(A({channelId:e,reason:"unavailable_channel_reload_channel"})).then(()=>u((0,C.o)({channelId:e,needsReload:!1}))),_.track(E.EventId.CHANNEL_UNAVAILABLE,{channel_id:e,channel_type:e?e.charAt(0):null,channel_privacy_type:t,unavailable_team_id:i,contexts:{ui_context:{action:E.UiAction.CLICK,step:a?E.UiStep.THREAD:E.UiStep.MESSAGE_PANE,ui_element:E.UiElement.BTN_RELOAD}}}),_.sendDataAndEmptyQueue()},[h,u,e,_,t,i,a]),b=n.createElement(d.A,{id:i});return a?(l=S.t("Reload this thread",{fallbackHash:"5a46f8af66d3a297f2aa1fb3dc247293af5c7957"}),s=S.rt("{teamName} has made some changes to their workspace, so you\u2019ll need to reload this thread to keep working.",{teamName:b,fallbackHash:"dee887116dd324b0419f3ab5107bfbace4af1196"}),m=S.t("Reload Thread",{fallbackHash:"5a46f8af66d3a297f2aa1fb3dc247293af5c7957"})):r?(l=S.t("Reload this conversation",{fallbackHash:"e734b77581f1b795a43e3819e1ba61bd10be2333"}),s=S.rt("{teamName} has made some changes to their workspace, so you\u2019ll need to reload this conversation to keep working.",{teamName:b,fallbackHash:"4587e71e73092699551e9a05be929efe80bd3d88"}),m=S.t("Reload Conversation",{fallbackHash:"e734b77581f1b795a43e3819e1ba61bd10be2333"})):(l=S.t("Reload this channel",{fallbackHash:"ba08984bc15e050a282a680358a7e50722015225"}),s=S.rt("{teamName} has made some changes to their workspace, so you\u2019ll need to reload this channel to keep working.",{teamName:b,fallbackHash:"9b699552dbd4a0f825d26eae96de06774cdd70df"}),m=S.t("Reload Channel",{fallbackHash:"ba08984bc15e050a282a680358a7e50722015225"})),n.createElement(n.Fragment,null,n.createElement("img",{className:"p-unavailable_channel_image p-unavailable_channel_image--reload",src:k,srcSet:`${k}, ${v} 2x`,alt:""}),n.createElement("h2",{className:"p-unavailable_channel_title"},l),n.createElement("div",{className:"p-unavailable_channel_content"},n.createElement("p",null,s),n.createElement("div",{className:"align_center"},n.createElement(c.A,{type:"primary",size:"large",onClick:f,disabled:p,loading:p,"aria-label":m},m))))};UnavailableChannelReloadChannel.displayName="UnavailableChannelReloadChannel";var I=a(0x11d0b0bd1);let w=new s.Ay("unavailable_channel"),UnavailableChannelReloadSlack=({channelId:e,channelPrivacyType:t,isThread:a,isImOrMpim:r,unavailableTeamId:i})=>{let l,o,[s,m]=(0,n.useState)(!1),u=(0,x.A)(),p=(0,n.useCallback)(()=>{m(!0);let n=`UnavailableChannelReloadSlack: Remote team ${i} has migrated their data, user triggered client reload`;(0,I.As)({reason:n,reasonKey:"unavailable_channel_reload"}),u.track(E.EventId.CHANNEL_UNAVAILABLE,{channel_id:e,channel_type:e?e.charAt(0):null,channel_privacy_type:t,unavailable_team_id:i,contexts:{ui_context:{action:E.UiAction.CLICK,step:a?E.UiStep.THREAD:E.UiStep.MESSAGE_PANE,ui_element:E.UiElement.BTN_RELOAD}}}),u.sendDataAndEmptyQueue()},[e,t,u,a,i]);l=a?w.t("Reload Slack to view this thread"):r?w.t("Reload Slack to view this conversation"):w.t("Reload Slack to view this channel");let h=n.createElement(d.A,{id:i});return o=a?w.rt("{teamName} has made some changes to their workspace, so you\u2019ll need to reload Slack to keep working in this thread.",{teamName:h}):r?w.rt("{teamName} has made some changes to their workspace, so you\u2019ll need to reload Slack to keep working in this conversation.",{teamName:h}):w.rt("{teamName} has made some changes to their workspace, so you\u2019ll need to reload Slack to keep working in this channel.",{teamName:h}),n.createElement(n.Fragment,null,n.createElement("img",{className:"p-unavailable_channel_image p-unavailable_channel_image--reload",src:k,srcSet:`${k}, ${v} 2x`,alt:""}),n.createElement("h2",{className:"p-unavailable_channel_title"},l),n.createElement("div",{className:"p-unavailable_channel_content"},n.createElement("p",null,o),n.createElement("div",{className:"align_center"},n.createElement(c.A,{type:"primary",size:"large",onClick:p,disabled:s,loading:s,"aria-label":w.t("Reload Slack")},w.t("Reload Slack")))))};UnavailableChannelReloadSlack.displayName="UnavailableChannelReloadSlack";var T=a(0x12185e091),N=a(0x1a115a2e4),M=a(0x4aaaf207),R=a(0x226892387),P=a(0x217553e42),L=a(0x1ee439e69);let UnavailableChannel=({channelId:e,isThread:t=!1,unavailableTeamId:a})=>{let r,o=(0,R.d4)(e=>(0,L._J)(e,a)),s=(0,R.d4)(t=>(0,P.OL)(t,e)),c=(0,R.d4)(e=>(0,N.Xs)(e,s)),d=(0,T.K5)(s),m=(0,T.LI)(s)||(0,T.yz)(s),u=(0,M.x)(o),p=(0,x.A)();(0,n.useEffect)(()=>{p.track(E.EventId.CHANNEL_UNAVAILABLE,{channel_id:e,channel_type:e?e.charAt(0):null,channel_privacy_type:d,unavailable_team_id:a,contexts:{ui_context:{action:E.UiAction.IMPRESSION,step:t?E.UiStep.THREAD:E.UiStep.MESSAGE_PANE,ui_properties:{element_name:u?"reload":"blocker"}}}})},[e,u,d,p,t,a]),r=u?n.createElement(UnavailableChannelReloadSlack,{channelId:e,channelPrivacyType:d,isImOrMpim:m,isThread:!!t,unavailableTeamId:a}):c?n.createElement(UnavailableChannelReloadChannel,{channelId:e,channelPrivacyType:d,isImOrMpim:m,isThread:!!t,unavailableTeamId:a}):n.createElement(l.E,{isThread:!!t,isImOrMpim:m,unavailableTeamId:a});let h=i()("p-unavailable_channel",{"p-unavailable_channel_thread":t});return n.createElement("div",{className:h},r)};UnavailableChannel.displayName="UnavailableChannel"},0x410e38f5:(e,t,a)=>{"use strict";a.d(t,{A:()=>buildOrgDashUrl});var n=a(0x1daf4b9c),r=a(0xe325965d),i=a(0x9b971e7e);function buildOrgDashUrl(e,t){let a=(0,r.A)(),l=(0,i.jV)(e);return(0,n.A)()?`${a}/manage/${l}/${t}`:`${a}/manage/${t}`}},0x10d733759:(e,t,a)=>{"use strict";a.d(t,{kS:()=>buildAppDirectoryUrl,yG:()=>buildOrgUrl});var n=a(0x1aba66b56),r=a(0x1e2051844),i=a(0x12aa0728d),l=a(0x19c76d181);function getEnterpriseOrgUrlHost(e,t){let a=(0,i.yz)((0,l.tV)(e,"abs_root_url"));return`${t}.enterprise.${a}`}function getWorkspaceUrlHost(e,t){let a=(0,i.yz)((0,l.tV)(e,"abs_root_url"));return`${t||"my"}.${a}`}let buildOrgUrl=(e,t)=>`https://${getEnterpriseOrgUrlHost(e,t)}`,buildAppDirectoryUrl=e=>{let{appId:t,appsDetailViewWorkspaceContext:a,appsDetailViewWorkspaceDomain:i,userIsCreationTeamMember:l,currentUserTeams:o,rootURL:s,orgTeams:c}=e,d=s.replace(/(http:\/\/|https:\/\/)/,""),m=`apps/${t}?from_org_dashboard=1`,u=`${s}${m}`;if(a&&o&&(0,n.A)(o,a))return`https://${i||"my"}.${d}${m}`;if(l)return u;if(o&&o.length){let e=(0,r.A)(c,e=>e.id===o[0]);if(e&&e.domain)return`https://${e.domain}.${d}${m}`}return u},o={};Object.defineProperty(o,"getEnterpriseOrgUrlHost",{get:()=>getEnterpriseOrgUrlHost,set:e=>{getEnterpriseOrgUrlHost=e}}),Object.defineProperty(o,"getWorkspaceUrlHost",{get:()=>getWorkspaceUrlHost,set:e=>{getWorkspaceUrlHost=e}})},0x1b25f95c9:(e,t,a)=>{"use strict";a.d(t,{s:()=>s});var n=a(0xd6ba6894),r=a(0x16026d477),i=a(0x11c82607b),l=a(0x15257bc0b),o=a(0x100313bb4);let s=(0,i.Ay)("Navigates to the appropriate",(e,t,a)=>{let i=t(),{orgDash:s,teamSite:c,updateTeamSiteUrlOnly:d}=a,m=(0,l.HP)(i);if((0,o.RE)(i)){let e=c,t=new URLSearchParams(n.J.location.search);"object"==typeof c&&m&&(Object.entries(c.params??{}).forEach(([e,a])=>{t.set(e,a??"")}),e=c.route);let a=`${e}${t.toString()?`?${t.toString()}`:""}`;d?n.J.history.pushState({},"",a):n.J.location.assign(a)}else{let{route:e}=s,t=s.params??{};(0,r.o)(e,t,"")}});s.meta={name:"isomorphicNavigateToAction",key:"createThunkIsomorphicNavigateToAction",description:"Navigates to the appropriate"}},0x135350d44:(e,t,a)=>{"use strict";a.d(t,{R:()=>n});let n={COMPACT:0,RICH:1,NO_UNFURL:2}},0x18c2d4c6f:(e,t,a)=>{"use strict";a.d(t,{A:()=>k});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x18dac2b8e),o=a(0xf8dd7f80),s=a(0x8c8bafa3),c=a(0x20482ad21),d=a(0x1daf4b9c),m=a(0x12c020c3),u=a(0x11a296110),p=a(0x1faa3f1ac),h=a(0x23016ed88),_=a(0x9e5ec77e),f=a(0x1ec68d6a3),b=a(0x11439744b),g=a(0x1ef19e2e2),y=a(0x1c91944c9),A=a(0x12b36e8b7);let looks_like_workspace_state=e=>!!(0,A.w)(e).isWorkspace;var x=a(0x78b6120c);let E=new c.Ay("error_boundary"),C=class extends n.Component{constructor(e){super(e),this.state={hasError:!1,errCode:null},this.onClickReloadButton=this.onClickReloadButton.bind(this)}componentDidUpdate(e){this.state.hasError&&e.id!==this.props.id&&this.resetHasError()}componentDidCatch(e,t){let a=null;try{a=`REB${(0,g.B)((0,_.A)(e.message)).substr(0,9).toUpperCase()}`}catch(e){}if(this.setState(()=>({hasError:!0,errCode:a}),()=>this.props.onError?.(e)),!(0,l.Cu)()){let n=t?.componentStack?.split(`
`).slice(0,Error.stackTraceLimit).join(`
`);this.props.logger.error("ERROR-BOUNDARY",e,a,n,{subtype:this.props.subtype||"component_error_boundary"})}}onClickReloadButton(e){e.preventDefault();let t=window.location.href;this.props.telemeter.count("react_error_boundary_reload_click"),(0,d.A)()?(t=(0,m.M6)(window.location.href,"force_cold_boot",1),this.props.logger.info("GANTRY",`Reloading at ${t} after hitting ErrorBoundary`),(0,x.Lz)().finally(()=>{window.location.href=t})):(this.props.logger.info("LEGACY",`Reloading at ${t} after hitting ErrorBoundary`),window.location.href=t)}resetHasError(){this.setState(()=>({hasError:!1,errCode:null}))}renderReloadLinkMsg(){let renderLink=({text:e,key:t})=>n.createElement(p.A,{href:`https://${(0,s.qF)()}/help/contact`,rel:"noopener noreferrer",key:t},e);return"REBD7A8C1099"===this.state.errCode?E.rt("This particular hiccup is something we know about and are working to fix. Please reload and things should be cleared up. If this issue persists, please <a>drop us a line.</a>",{},renderLink):E.rt("Reloading Slack might clear things up. If it doesn\u2019t, <a>drop us a line.</a>",null,renderLink)}render(){if(this.state.hasError){if(this.props.telemeter.count("react_error_boundary_rendered"),this.props.renderError)return this.props.renderError({errCode:this.state.errCode});let e=i()("p-error_boundary",this.props.className,{"p-error_boundary--short":"short"===this.props.variant});return n.createElement("div",{className:e},n.createElement("div",{className:"p-error_boundary__content"},n.createElement("div",{className:"p-error_boundary__message"},n.createElement("h1",{className:"p-error_boundary__heading"},n.createElement("span",null,E.t("Something went wrong")),n.createElement("span",{className:"p-error_boundary__icon p-error_boundary__icon--turtle",role:"img","aria-label":E.t("Something went wrong")},"\u{1F422}")),n.createElement("p",{className:"p-error_boundary__contact_msg"},this.renderReloadLinkMsg())),this.state.errCode&&n.createElement(h.A,{errCode:this.state.errCode}),n.createElement(u.Ay,{type:"primary",className:"margin_right_50",onClick:this.onClickReloadButton,"data-qa":"error_reload"},E.t("Reload"))))}return this.props.children}};C.displayName="ErrorBoundary";let k=(0,y.N)(e=>({logger:looks_like_workspace_state(e)?(0,f.Ay)({state:e}):(0,o.getGenericLogger)(),telemeter:looks_like_workspace_state(e)?(0,b.Cy)({state:e}):(0,b.rh)()}))(C)},0x23016ed88:(e,t,a)=>{"use strict";a.d(t,{A:()=>ErrorCode});var n=a(0xbad225b5);let r=new(a(0x20482ad21)).Ay("error_boundary");function ErrorCode({errCode:e}){return n.createElement("p",{className:"p-error_boundary__error_code_container"},n.createElement("span",{className:"p-error_boundary__error_code","data-qa":"error_code"},r.t("Error: "),e))}ErrorCode.displayName="ErrorCode"},0x10a716a94:(e,t,a)=>{"use strict";a.d(t,{H:()=>quiet_error_boundary,A:()=>i});var n=a(0x18c2d4c6f),r=a(0xbad225b5);let renderError=()=>null,quiet_error_boundary=e=>r.createElement(n.A,{renderError:renderError,...e}),i=n.A},0x9e5ec77e:(e,t,a)=>{"use strict";a.d(t,{A:()=>normalizeError});let n=/\bA[A-Z0-9]{8,}\b/g,r=/\bB[A-Z0-9]{8,}\b/g,i=/\b(C|G|D)[A-Z0-9]{8,}\b/g,l=/\bF[A-Z0-9]{8,}\b/g,o=/\b(U|W)[A-Z0-9]{8,}\b/g,s=/\b[\d]{10}\.[\d]{6}\b/g,c=/\bS[A-Z0-9]{8,}\b/g,d=/\bT[A-Z0-9]{8,}\b/g;function normalizeError(e){return String(e).replace(n,"[APP_ID]").replace(r,"[BOT_ID]").replace(i,"[CHANNEL_ID]").replace(l,"[FILE_ID]").replace(o,"[MEMBER_ID]").replace(s,"[MESSAGE_TS]").replace(c,"[USER_GROUP_ID]").replace(d,"[TEAM_ID]")}},0x1bed15d44:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x181d663bb),i=a(0x123d88aba);let ExpandableContainer=e=>{let{children:t=null,isExpanded:a=!0,expandableKey:l="",className:o,showUnverifiedDisclosure:s=!1,senderMemberId:c}=e;return n.createElement("div",{className:o,"data-expanded":a,"data-qa-expandable-container-is-expanded":a,"data-qa-expandable-container-key":l,...(0,r.A)(e)},a?t:null,!a&&s?n.createElement(i.A,{expandableKey:l||"",senderMemberId:c||""}):null)};ExpandableContainer.displayName="ExpandableContainer";let l=n.memo(ExpandableContainer);var o=a(0x991f5502),s=a(0x1f9063ba),c=a(0x1ebcb921a),d=a(0x1ccef1c6f),m=a(0x2015b5207);function shouldShowUnverifiedDisclosure(e,t,a=0,n,r){return!(void 0!==(0,m.A)(e,t)||!1===(0,d.ty)(e,"expand_inline_imgs")||(0,s.zE)(e,t,a))&&(0,c.t)(e,n,r)}function mapStateToProps(e,t){let{expandableKey:a,imageBytes:n,shouldBeExpandedByDefault:r=!0,useAttachmentRules:i=!0,senderMemberId:l,channelId:s}=t,c=i?(0,o.$)(e,a,n,l,s):(0,m.A)(e,a);return{expandableKey:a,isExpanded:void 0===c?r:!!c,showUnverifiedDisclosure:shouldShowUnverifiedDisclosure(e,a,n,l,s)}}let u=(0,a(0x1c91944c9).N)(mapStateToProps)(l)},0x174730f93:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xa6f3163b),l=a(0x15f8e452a);let o=class extends n.PureComponent{static defaultProps={isExpanded:!0,expandableKey:"",onClick:r.A,render:void 0};constructor(e){super(e),this.onClick=this.onClick.bind(this)}onClick(e){let{isExpanded:t,expandableKey:a,onClick:n}=this.props;e.preventDefault(),n&&n(!t,a)}render(){let{isExpanded:e,expandableKey:t,render:a,"aria-label":r}=this.props,o=e?"caret_down":"caret_right",s=e?"collapse":"expand";return a?a(this.props,this.onClick):n.createElement(i.A,{title:s,className:"c-expandable_trigger","data-qa-expandable-trigger-is-expanded":e,"data-qa-expandable-trigger-key":t,onClick:this.onClick,"aria-expanded":e,"aria-label":r},n.createElement(l.A,{legacy:!0,type:o,inherit:!0}))}};o.displayName="ExpandableTrigger";var s=a(0x991f5502),c=a(0x1c91944c9),d=a(0x2015b5207),m=a(0x2132c5285);function mapStateToProps(e,t){let{imageBytes:a,expandableKey:n,shouldBeExpandedByDefault:r=!0,useAttachmentRules:i=!0,senderMemberId:l,channelId:o}=t,c=i?(0,s.$)(e,n,a,l||"",o||""):(0,d.A)(e,n);return{expandableKey:n,isExpanded:void 0===c?!!r:!!c}}function mapDispatchToProps(e){return{onClick:(t,a)=>{e((0,m.o)({key:a,isExpanded:t}))}}}let u=(0,c.N)(mapStateToProps,mapDispatchToProps)(o)},0x123d88aba:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x15f8e452a),c=a(0x210cf696f),d=a(0x2378cf6ec),m=a(0x1ccef1c6f),u=a(0x12f41fc32),p=a(0x226892387),h=a(0x2132c5285);let _=new o.Ay("files"),UnverifiedDisclosure=({expandableKey:e,senderMemberId:t,pillow:a,className:i})=>{let o=(0,r.wA)(),f=(0,p.d4)(e=>(0,d.I)(e,t)),b=(0,p.d4)(m.pI),g=(0,n.useCallback)(()=>{o((0,u.AZ)({pref:"allowed_unfurl_senders",value:[...b,t].join(",")}))},[o,b,t]),y=(0,n.useCallback)(()=>{o((0,h.o)({key:e,isExpanded:!0}))},[o,e]);return n.createElement("div",{className:l()("p-unverified_disclosure",i,{"p-unverified_disclosure--pillow":a})},a?n.createElement(s.A,{type:"exclamation-circle",className:"p-unverified_disclosure__icon"}):null,n.createElement("div",null,_.t("This preview is hidden because {memberName} is from outside your organization.",{memberName:f,fallbackHash:"0f8a2e5c262d9d68754bf544c3aaab4cec74aed7"}),n.createElement("div",{className:"p-unverified_disclosure__actions"},_.rt("<all>Allow all previews from {memberName}</all>, or\xa0<single>just show this one</single>.",{memberName:f},({tag:e,text:t,key:a})=>{switch(e){case"all":return n.createElement(c.A,{key:a,onClick:g},t);case"single":return n.createElement(c.A,{key:a,onClick:y},t);default:return null}}))))};UnverifiedDisclosure.displayName="UnverifiedDisclosure";let f=UnverifiedDisclosure},0xb7a80133:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x40c0d834),o=a(0x11a296110),s=a(0x2501a2cee),c=a(0xbe505324),d=a(0x4c96e5d9),m=a(0x20482ad21),u=a(0x344bb842),p=a(0x1befa7c4);let h=new m.Ay("browsers"),ExplorerViewTypeToggle=({viewType:e,onChange:t})=>{let a=(0,n.useCallback)(()=>{t(p.Pd.List)},[t]),r=(0,n.useCallback)(()=>{t(p.Pd.Grid)},[t]),l=(0,n.useMemo)(()=>({name:"list-view"}),[]),o=(0,n.useMemo)(()=>({name:"apps"}),[]);return n.createElement("div",{className:"p-explorer_toggle"},n.createElement("div",{className:i()("p-explorer_toggle__switch",{"p-explorer_toggle__switch--alternate":e===p.Pd.Grid})}),n.createElement(d.Ay,{position:"bottom",tip:h.t("View as list")},n.createElement(u.A,{className:"p-explorer_toggle__icon",svgIconProps:l,size:"small","aria-label":h.t("View as list"),"aria-pressed":e===p.Pd.List,onClick:a})),n.createElement(d.Ay,{position:"bottom",tip:h.t("View as grid")},n.createElement(u.A,{className:"p-explorer_toggle__icon p-explorer_toggle__icon--right",svgIconProps:o,size:"small","aria-label":h.t("View as grid"),"aria-pressed":e===p.Pd.Grid,onClick:r})))};ExplorerViewTypeToggle.displayName="ExplorerViewTypeToggle";var _=a(0x226c52ea),f=a(0x1dce4c608),b=a(0x171515228),g=a(0x3711e82d);let y={onClick:{enableClogAction:!0}},getSelectedOption=(e,t)=>{for(let a of e){if(a.value===t)return a;if(a.options){let e=getSelectedOption(a.options,t);if(e)return e}}return null},ExplorerControls=({selects:e,viewType:t,onViewTypeChange:a,customFilterUi:r,customFilterPosition:m="first",hasNoMarginTop:u,hasExtraMarginTop:h})=>{let A=(0,n.useCallback)((e,t,a)=>{switch(e.type){case p.jc.EXPANDED:return n.createElement(l.A,{elementName:e.id,key:e.id},n.createElement(c.A,{className:i()("p-explorer_controls__select--expanded",{margin_right_50:t===a.length-1}),role:"radiogroup","aria-label":e.title},e.options.map((a,r)=>n.createElement(o.Nm,{role:"radio","aria-checked":a.value===e.value,key:a.value,id:a.value,className:i()("p-explorer_controls__button",{margin_left_50:t>0||r>0,"p-explorer_controls__button--active":a.value===e.value,"p-explorer_controls__button--disabled":!!e.isDisabled}),onClick:()=>e.onChange(a),autoClogProps:{elementValue:a.value,...y}},a.label))));case p.jc.CHECKLIST:if(!e.renderOption||!e.onChange||!e.onOptionReset)return null;return n.createElement(l.A,{key:e.id,elementName:e.id,elementValue:e.value},n.createElement(n.Fragment,null,n.createElement("span",{id:`${e.id}-title`,"aria-hidden":"true",className:"offscreen"},e.title),n.createElement(f.A,{selectType:"multi",selectId:`${e.id}-explorer-select`,renderTrigger:()=>n.createElement(o.Nm,{className:i()("p-explorer_controls__button",{margin_left_50:t>0,"p-explorer_controls__button--active":void 0!==e.defaultValue&&e.value!==e.defaultValue,"p-explorer_controls__button--disabled":!!e.isDisabled}),"data-qa":`${e.id}-explorer-select`,id:`${e.id}-explorer-select`,autoClogProps:y,"aria-haspopup":"listbox","aria-labelledby":`${e.id}-title ${e.id}-active-value`},e.icon&&n.createElement("span",{className:"p-explorer_controls__button_icon margin_right_25"},n.createElement(s.Ah,{name:e.icon})),n.createElement("span",null,e.title),n.createElement("span",{className:"p-explorer_controls__button_caret"},n.createElement(s.Ah,{name:"caret-down",inline:!0,size:"18"}))),options:e.options,selectedOptions:e.value,onOptionUnselected:e.onChange,onOptionSelected:e.onChange,onClear:e.onOptionReset,renderOption:e.renderOption,hideInput:!0})));case p.jc.MODAL:{let a=n.createElement(o.Nm,{onClick:e.onClick,className:i()("p-explorer_controls__button",{margin_left_50:t>0,"p-explorer_controls__button--active":void 0!==e.defaultValue&&e.value!==e.defaultValue,"p-explorer_controls__button--disabled":!!e.isDisabled}),"aria-label":e.ariaLabel},e.icon&&n.createElement("span",{className:i()("p-explorer_controls__button_icon",{margin_right_25:e.value})},n.createElement(s.Ah,{name:e.icon,size:"18"})),e.value);if(e.hasTooltip&&e.title)return n.createElement(d.Ay,{position:"top",tip:e.title},a);return a}default:{let a=getSelectedOption(e.options,e.value);return n.createElement(l.A,{key:e.id,elementName:e.id,elementValue:e.value},n.createElement(n.Fragment,null,n.createElement("span",{id:`${e.id}-active-value`,"aria-hidden":"true",className:"offscreen"},a?.label),n.createElement("span",{id:`${e.id}-title`,"aria-hidden":"true",className:"offscreen"},e.title),n.createElement(b.A,{selectId:`${e.id}-explorer-select`,renderTrigger:()=>n.createElement(o.Nm,{className:i()("p-explorer_controls__button",{margin_left_50:t>0,"p-explorer_controls__button--active":void 0!==e.defaultValue&&e.value!==e.defaultValue,"p-explorer_controls__button--disabled":!!e.isDisabled}),"data-qa":`${e.id}-explorer-select`,id:`${e.id}-explorer-select`,autoClogProps:y,"aria-haspopup":"listbox","aria-labelledby":`${e.id}-title ${e.id}-active-value`},e.icon&&n.createElement("span",{className:"p-explorer_controls__button_icon margin_right_25"},n.createElement(s.Ah,{name:e.icon})),n.createElement("span",null,a?.orgName||a?.label),n.createElement("span",{className:"p-explorer_controls__button_caret"},n.createElement(s.Ah,{name:"caret-down",inline:!0,size:"18"}))),renderOption:({label:e})=>n.createElement(_.A,{label:e}),options:e.options,onChange:e.onChange,selectedOption:a,isDisabled:e.isDisabled})))}}},[]);return n.createElement(l.A,{uiComponentName:g.UiComponentName.EXPLORER_CONTROLS},n.createElement("div",{className:i()("p-explorer_controls",{"p-explorer_controls--no-margin-top":u,"p-explorer_controls--margin-top":h})},(e.length>0||r)&&n.createElement("div",{className:"p-explorer_controls__selects"},n.createElement("div",{className:"p-explorer_controls__selects_col p-explorer_controls__selects_col__left"},"first"===m&&n.createElement(n.Fragment,null,r,e.filter(e=>"right"!==e.position).map(A)),"last"===m&&n.createElement(n.Fragment,null,e.filter(e=>"right"!==e.position).map(A),r)),n.createElement("div",{className:"p-explorer_controls__selects_col p-explorer_controls__selects_col__right"},e.filter(e=>"right"===e.position).map(A))),t&&a?n.createElement("span",{className:"margin_left_50"},n.createElement(ExplorerViewTypeToggle,{viewType:t,onChange:a})):null))};ExplorerControls.displayName="ExplorerControls";let A=ExplorerControls},0x59bdb705:(e,t,a)=>{"use strict";a.d(t,{A:()=>m});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x18f2150ea),o=a(0x20482ad21),s=a(0x344bb842),c=a(0x2162c8d08);let d=new o.Ay("search"),ExplorerHeader=({title:e,extraContent:t,namespace:a,titleContent:r,backgroundTint:o=!0,ariaHeadingLevel:m,onClose:u,showCloseButton:p,memberId:h,showBackButton:_,onBackClick:f})=>{let b=(0,l.A)(m)?{role:"heading","aria-level":m}:{};return n.createElement("div",{className:i()("p-explorer_header",{"p-explorer_header--tinted":o,"p-explorer_header--search_in_channel":"search_in_channel"===a})},n.createElement("div",{className:"p-explorer_header__container"},n.createElement("div",{className:"p-explorer_controls__search-in-channel-back-button"},_&&n.createElement(c.A,{onBackClick:f})),n.createElement("div",{className:i()("p-explorer_header__title",{"p-explorer_header__title--search_in_channel":"search_in_channel"===a,"p-explorer_header__title--flex":h}),"data-qa":`${a}_title`,...b},e,r&&n.createElement(n.Fragment,null,r)),p&&n.createElement(s.A,{svgIconProps:{name:"close"},onClick:u,"aria-label":d.t("Close")}),t&&n.createElement("div",{className:"p-explorer_header__actions"},t)))};ExplorerHeader.displayName="ExplorerHeader";let m=ExplorerHeader},0x13c4ed245:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0xee368d6e),s=a(0x1b27a6205),c=a(0x18018a3b8),d=a(0xe80ed487);let m=(0,c.N)((e,t)=>({isOpen:(0,d.x)(e,t.inputId),externalDisplayQueryOps:(0,d.l)(e,t.inputId)}),e=>({onClose:(...t)=>e((0,s.A)(...t))}))(o.A);var u=a(0x3711e82d);let ExplorerSearch=({inputId:e,searcherOptions:t,onSearch:a,onReset:i,inputPlaceholderText:o,inputAriaLabel:c,inputMaxLength:d,inputSearchyMode:p,canReset:h,preventUpstreamSync:_,allowSupplementalSuggestions:f,focusOnMount:b=!1,backgroundTint:g=!0,hideAutocomplete:y=!1,clogEventId:A=u.EventId.EXPLORER_PAGE,hideAutocompleteWithEmptyQuery:x=!0,allowQuerySuggestions:E=!1,isInlineChannelContext:C,buttonContent:k})=>{let v=(0,r.wA)(),S=(0,n.useCallback)(t=>{a(t),v((0,s.A)({inputId:e,shouldReturnFocus:!1}))},[v,a,e]),I=(0,n.useCallback)(()=>{h&&i()},[i,h]);return n.createElement("div",{className:l()("p-explorer_search__container",{"p-explorer_search__container--tinted":g,"p-explorer_search__container--with_extra_content":!!k,"p-explorer_search__container--inchannel":C}),"data-qa":"explorer_search"},n.createElement("div",{className:"p-explorer_search__content_container"},n.createElement("div",{className:"p-explorer_search__content"},n.createElement(m,{inputId:e,onAccept:S,searcherOptionsOverride:t,placeholderText:o,ariaLabelOverride:c,focusOnMount:b,hideFooter:!0,maxLength:d,searchyMode:p,onClear:I,canClear:h,canClearOnEmptyEdit:!0,hideAutocompleteWithEmptyQuery:x,clogEventId:A,clogUiComponentName:u.UiComponentName.EXPLORER_SEARCH,preventUpstreamSync:_,allowSupplementalSuggestions:f,allowQuerySuggestions:E,unsafeHideAutocomplete:y,isInlineChannelContext:C})),k&&n.createElement("div",{className:"p-explorer_search__extra_content"},k)))};ExplorerSearch.displayName="ExplorerSearch";let p=ExplorerSearch},0x19d27e99e:(e,t,a)=>{"use strict";a.d(t,{A:()=>v});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x15e48057c),o=a(0x59bdb705),s=a(0x120c268ad),c=a.n(s),d=a(0x130d89881),m=a(0x15279822),u=a(0x1a043bf26),p=a(0x139aa1a7),h=a(0x20f36aa26),_=a(0xd843ab47),f=a(0x51b81145),b=a(0xf3508007),g=a(0x242503693),y=a(0x1befa7c4),A=a(0x3711e82d);let x=(0,n.forwardRef)(({rows:e,stickyResultHeader:t=[],stickyResultFooter:a=[],fragments:l,namespace:o,onItemSelected:s,resultListAriaLabel:x,renderContextMenuForItem:E,resultListRole:C="list",backgroundTint:k=!0,activeItemId:v,showScrollBorder:S=!0},I)=>{let w=(0,r.wA)(),T=(0,h.A)(e,x,l),N=(0,h.A)(t,x,l),M=(0,h.A)(a,x,l),R=(0,n.useRef)(null),P=(0,n.useRef)(null),[L,O]=(0,n.useState)(null),[D,F]=(0,n.useState)(!0),U=e.map(e=>e.key),B=(0,n.useMemo)(()=>e.filter(e=>e.role===y.N3.Presentation).map(e=>e.key),[e]),H=(0,n.useMemo)(()=>0===a.length?"p-explorer_results__container":"p-explorer_results__container--no-bottom-margin",[a]),{view:W}=(0,n.useContext)(_.A),V=W?.viewType??p.D.Unknown;(0,n.useImperativeHandle)(I,()=>({scrollToTop:()=>{P.current?.scrollToOffset(0)}})),(0,n.useEffect)(()=>{e.find(e=>!0===e.scrollToTop)&&P.current?.scrollToOffset(0)},[e]);let G=(0,n.useCallback)(e=>{R.current=e},[]),q=(0,n.useCallback)(t=>{let{id:a}=t,n=e.find(e=>e.key===a);n?.onListItemSelect&&n.onListItemSelect(t),n?.autoClogProps&&R.current?.({action:A.UiAction.CLICK,uiComponentName:A.UiComponentName.EXPLORER_RESULTS,...n?.autoClogProps??{}}),n&&n.key&&!n.disableClick&&s&&s({item:n.key,itemSource:"list"})},[e,s]),j=(0,n.useCallback)(({index:t})=>e[t].role!==y.N3.Presentation,[e]),z=(0,n.useCallback)(e=>{let t=P?.current;if(!t)return!1;let a=e?.uiState?.focusHistoryState,n=a?.lastFocusedItem;if(n)return O(n),!0;let r=U.filter(e=>!B.includes(e));if(r.length)return O(r[0]),!0;let i=t.getScrollerRef();if(!i)return!1;let l=(0,m.rO)(i)[0];return!!l&&(l.focus(),!0)},[U,B]);(0,n.useEffect)(()=>{L&&(P?.current?.focusOnKey(L),O(null))},[L,O,P]);let K=(0,n.useCallback)(({id:e})=>{w((0,b.$)({lastFocusedItem:e}))},[w]),onItemContextMenu=(e,t)=>{t&&E&&e.preventDefault()},$=(0,n.useCallback)((e,{scrollTop:t})=>{D&&t>4?F(!1):!D&&t<=4&&F(!0)},[D]),Y=(0,n.useCallback)(({index:t})=>{let a=e[t];return{...a.role&&{role:a.role},...!a.fullWidth&&{className:"p-explorer_results__contained-result"},...a.ariaLabel&&a.role!==y.N3.Presentation&&{"aria-label":a.ariaLabel}}},[e]);return(0,f.A)(V,z),(0,f.A)(g.Ay.PAGE_BROWSER_FIRST_VISIBLE_RESULT,z),(0,f.A)(g.Ay.CHANNEL_TAB_FILES,z),(0,f.A)(g.Ay.CHANNEL_TAB_WORKFLOWS,z),n.createElement(i.A,{trackClogRef:G},n.createElement("div",{className:c()({"p-explorer_results--tinted":k}),"data-qa":`${o}_results_header`},t.length>0&&N(0,{})),n.createElement("div",{className:c()("p-explorer_results",{"p-explorer_results--scrolled":!D,"p-explorer_results--tinted":k,"p-explorer_results--no-top-border":t.length>0||!S,"p-explorer-resunts--no-bottom-padding":a.length>0}),"data-qa":`${o}_results`},n.createElement(d.A,null,({width:e,height:t})=>n.createElement(u.A,{role:C,ref:P,containerClassName:H,keys:U,rowRenderer:T,getPropsForItem:Y,width:e,height:t,onItemClick:q,onScroll:$,onItemFocusEnter:K,isFocusableItem:j,persistentKeys:B,keysToExcludeFromRovingTabIndex:B,useGlobalKeyboardShortcuts:!0,"aria-label":x,renderContextMenuForItem:E,onItemContextMenu:onItemContextMenu,activeItem:v,fadeScrollbar:!0}))),n.createElement("div",{className:c()({"p-explorer_results--tinted":k}),"data-qa":`${o}_results_footer`},a.length>0&&M(0,{})))});var E=a(0x13c4ed245),C=a(265558),k=a(0xcfc875f8);let Explorer=({headerTitle:e,showHeader:t=!!e,useExplorer:a,listLoadingFragment:s,filters:c,inputId:d,inputPlaceholderText:m,inputAriaLabel:u,inputMaxLength:p,inputSearchyMode:h,inputPreventUpstreamSync:f,inputFocusOnMount:b,inputAllowSupplementalSuggestions:g,clogEventId:y=A.EventId.EXPLORER_PAGE,clogUiPage:v,headerContent:S,titleContent:I,onItemSelected:w,resultListAriaLabel:T,resultListRole:N,context:M=null,isPreview:R,backgroundTint:P=!0,hideAutocomplete:L=!1,ariaHeadingLevel:O,activeItemId:D,hideAutocompleteWithEmptyQuery:F=!0,allowQuerySuggestions:U=!1,isInlineChannelContext:B,showCloseButton:H=!1,memberId:W,showBackButton:V,showScrollBorder:G=!0,searchButtonContent:q})=>{let j=(0,n.useRef)(null),{rows:z,onSearch:K,onResetSearch:$,onClose:Y,searcherOptions:Q,isZeroState:Z,renderContextMenuForItem:J,stickyResultHeader:X,stickyResultFooter:ee}=a({scrollToTop:(0,n.useCallback)(()=>{j.current?.scrollToTop()},[]),context:M,isPreview:R}),et=(0,n.useContext)(l.A),{view:ea}=(0,n.useContext)(_.A),en=(0,n.useMemo)(()=>({listLoading:s,filters:c}),[s,c]),er=(0,n.useMemo)(()=>X?[X]:[],[X]),ei=(0,n.useMemo)(()=>ee?[ee]:[],[ee]),el=(0,n.useMemo)(()=>!1!==Z&&!et,[et,Z]),eo=(0,n.useCallback)(e=>{if(w){let{selectedIndex:t,suggestions:a,userQuery:n}=e;if(!n||null===t)return;let r=a[t];r.is_type_file&&w({item:r.item.id,itemSource:"search"})}},[w]),es=(0,n.useCallback)(e=>{K&&K(e),eo(e)},[K,eo]),ec=(0,r.wA)(),ed=(0,n.useCallback)(()=>{ec((0,C.s)({shouldReplaceHistory:B})),Y&&Y()},[ec,Y,B]),em=(0,n.useCallback)(()=>{ea?.prev?ec((0,k.A)()):ec((0,C.s)({shouldReplaceHistory:B})),Y&&Y()},[ec,Y,ea,B]);return n.createElement(i.A,{eventId:y,uiPage:v,clogImpression:!0},t&&n.createElement(o.A,{title:e,extraContent:S,titleContent:I,namespace:v,backgroundTint:P,ariaHeadingLevel:O,onClose:ed,showCloseButton:H,memberId:W,showBackButton:V,onBackClick:em}),K&&$&&d?n.createElement(E.A,{inputId:d,onSearch:es,onReset:$,searcherOptions:Q,inputPlaceholderText:m,inputAriaLabel:u,inputMaxLength:p,inputSearchyMode:h,preventUpstreamSync:f,canReset:!1===Z,focusOnMount:b??el,allowSupplementalSuggestions:g,backgroundTint:P,hideAutocomplete:L,clogEventId:y,hideAutocompleteWithEmptyQuery:F,allowQuerySuggestions:U,isInlineChannelContext:B,buttonContent:q}):null,n.createElement(x,{rows:z,stickyResultHeader:er,stickyResultFooter:ei,fragments:en,namespace:v,onItemSelected:w,resultListAriaLabel:T,resultListRole:N,renderContextMenuForItem:J,ref:j,backgroundTint:P,activeItemId:D,showScrollBorder:G}))};Explorer.displayName="Explorer";let v=Explorer},0x453e984d:(e,t,a)=>{"use strict";a.d(t,{P8:()=>o,SX:()=>buildAgentTypeOptions,HC:()=>filterAppsByAgentType});var n,r=a(0x20482ad21),i=a(0x151a93a75);function isAppRow(e){return"type"in e&&"directory_payload"in e}let l=new r.Ay("ai_apps");var o=((n={}).ALL="ALL",n.AGENTFORCE="AGENTFORCE",n.MARKETPLACE="MARKETPLACE",n.INTERNAL="INTERNAL",n);let getAgentTypesForApp=e=>{let t=[],a=!isAppRow(e)&&(0,i.hk)(e);return a&&t.push("AGENTFORCE"),e.is_directory_published&&t.push("MARKETPLACE"),a||e.is_directory_published||(e.is_distributed&&t.push("MARKETPLACE"),e.is_distributed||t.push("INTERNAL")),t},buildAgentTypeOptions=(e,t)=>{let a=new Set;e.forEach(e=>{getAgentTypesForApp(e).forEach(e=>a.add(e))}),t.forEach(e=>{getAgentTypesForApp(e).forEach(e=>a.add(e))});let n=[{label:l.t("All agents"),value:"ALL"}];return a.has("AGENTFORCE")&&n.push({label:l.t("Agentforce"),value:"AGENTFORCE"}),a.has("MARKETPLACE")&&n.push({label:l.t("Slack Marketplace",{fallbackHash:"620581f0053a8054a02e08a23d671bd476d109e5",fallbackHashNs:"enterprise_dashboard"}),value:"MARKETPLACE"}),a.has("INTERNAL")&&n.push({label:l.t("Internal agents",{fallbackHash:"fc9225a1693f44637be7aea70d7fcc2c5840704d",fallbackHashNs:"enterprise_dashboard"}),value:"INTERNAL"}),n},filterAppsByAgentType=(e,t)=>"ALL"===t?[...e]:e.filter(e=>getAgentTypesForApp(e).includes(t))},0x10b8ce25:(e,t,a)=>{"use strict";a.d(t,{A:()=>l,H4:()=>d,Pz:()=>o,QN:()=>s,Uc:()=>n,Vl:()=>i,aC:()=>c,f7:()=>r,qg:()=>m,zO:()=>u});let n="Wt072LGU98DQ",r="Wt06FSDG3SCU",i="Wt06DBNCHQFQ",l="Wt06TWRA6VDF",o="Wt07BQQFMH7D",s="Wt0970NJPDUJ",c="Wt0972AWKB8W",d=[n,r,i],m=[l,o],u=["Wt016D22438T","Wt016D22438T","Wt016BQRJ7BL"]},0x626f19b4:(e,t,a)=>{"use strict";a.d(t,{d:()=>FileSectionCreateModal});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x190e60a66),l=a(0x20482ad21),o=a(0x11dc1e636),s=a(0xce378727),c=a(0xa6f3163b),d=a(0x1d2cd7755),m=a(0x10598eeca),u=a(0x15f8e452a),p=a(0x189615fa),h=a(0x2501a2cee),_=a(0x4c96e5d9),f=a(0x1faaed399),b=a(0x19ab18890),g=a(0x238b287cf),y=a(0x20e80190e),A=a(0x3711e82d),x=a(0x1a0bfaf78),E=a(0x226892387),C=a(0x14149c126),k=a(0x1fcbb004d),v=a(0x4479e27b),S=a(0x1473de9aa),I=a(0xa37a2662),w=a(0x11c82607b),T=a(0x17e63c876);let N=(0,w.Ay)("calls files.collections.create to create a new file collection",(e,t,{name:a,emoji:n})=>e((0,S.e)({reason:"unified_files_create_collection",name:a,emoji:n||void 0})).then(t=>{if(t.collections&&t.collections.length>0){let a=t.collections[0];e((0,T.CQ)((0,I.a1)(a)))}return{...t,collections:(0,I.rq)(t.collections)}}));N.meta={name:"createFileCollection",key:"createThunkCreateFileCollection",description:"calls files.collections.create to create a new file collection"};var M=a(0x21631292c);let R=(0,w.Ay)("calls files.collections.rename to rename an existing file collection",(e,t,{collection:a,name:n,emoji:r})=>{let i=t(),l=(0,v.VT)(i,a);if(!l)return Promise.reject(Error("Collection not found"));let o=l.name,s=l.emoji;return e((0,T.IX)({...l,name:n??l.name,emoji:r??l.emoji})),e((0,M.i)({reason:"unified_files_rename_collection",collection:a,name:n,emoji:r})).then(t=>(t.collection&&e((0,T.IX)({...l,...(0,I.a1)(t.collection)})),t.collection?{...t,collection:(0,I.a1)(t.collection)}:t)).catch(t=>{throw e((0,T.IX)({...l,name:o,emoji:s})),t})});R.meta={name:"renameFileCollection",key:"createThunkRenameFileCollection",description:"calls files.collections.rename to rename an existing file collection"};var P=a(0x2b0f6209);let L=new l.Ay("files"),O="file-section-input",FileSectionCreateModal=({collectionId:e,onCreateSection:t,source:a})=>{let l=(0,r.wA)(),S=!!e,I=(0,g.A)(),w=(0,E.d4)(t=>e?(0,v.VT)(t,e):void 0),[T,M]=(0,n.useState)(w?.name||""),[D,F]=(0,n.useState)(w?.emoji||""),[U,B]=(0,n.useState)(!1),H=(0,n.useRef)(null),W=(0,E.d4)(e=>"on"===(0,C._Z)(e,"custom_file_sections")),V=(0,n.useCallback)(()=>{l((0,k.O)())},[l]),G=(0,n.useCallback)(e=>{M(e)},[M]),q=(0,n.useCallback)(async n=>{if(n?.preventDefault(),B(!0),S&&e)await l(R({collection:e,name:T,emoji:D}));else{let e=await l(N({name:T,emoji:D}));t?.(e);let n=e.collections?.[0]?.id;I.track(A.EventId.FILE_SECTION_CREATED,{contexts:{fileSections:{section_id:n??null},ui_context:{entry_point:a}}})}V()},[l,I,T,D,V,S,e,t,a]),onEmojiSelected=(e,t)=>{F(t)},j=(0,n.useCallback)(()=>{M(""),F(""),H.current?.focus()},[]);if(!W)return null;let renderEmoji=()=>D?n.createElement("div",{className:"p-channel_section_modal_input__emoji"},n.createElement(b.Ay,{text:D,shouldFallbackOnLoadError:!0,stopAnimations:!0,emojiSize:b.lw.MEDIUM,forceDisplay:!0})):n.createElement(n.Fragment,null,n.createElement("span",{className:P.emojiInputCircleIcon},n.createElement(h.Ah,{name:"icon-placeholder-filled",size:"20"})),n.createElement("span",{className:P.emojiInputSmileIcon},n.createElement(h.Ah,{name:"emoji",size:"20"})),n.createElement("span",{className:P.emojiInputHappyIcon},n.createElement(h.Ah,{name:"emoji-filled",size:"20"})));renderEmoji.displayName="renderEmoji";let renderEmojiSelector=()=>{let e=(0,i.F)().getLocaleForLastViewedTeam()===o.Xn?D:"",t=(0,x.A)(e||"");return n.createElement(f.A,{onEmojiSelected:onEmojiSelected},n.createElement(c.A,{className:P.emojiPicker,"aria-label":t||L.t("Emoji menu"),"data-qa":"channel_selection_modal_input_emoji_picker"},renderEmoji()))};renderEmojiSelector.displayName="renderEmojiSelector";let renderClearButton=()=>{if(!W||!T&&!D)return null;let e=L.t("Clear all",{fallbackHash:"c043160a89ba0acd714977735d49455f662b1c79",fallbackHashNs:"current_status"});return n.createElement("div",{className:P.clearIconWrapper},n.createElement(_.Ay,{tip:e,position:"top",zIndex:"above_fs"},n.createElement(c.A,{className:P.clearButton,"aria-label":e,"data-qa":"file_section_modal_clear_button",onClick:j},n.createElement(u.A,{legacy:!0,type:"close-filled",className:P.clearIcon}))))};return renderClearButton.displayName="renderClearButton",n.createElement(p.A,{closeModal:V},n.createElement(y.rQ,null,n.createElement(y.Rc,{title:S?L.t("Rename this section"):L.t("Create a sidebar section")})),n.createElement("form",{onSubmit:q},n.createElement(y.$m,null,n.createElement("div",{className:"margin_top_25"},n.createElement(y.qf,null,n.createElement(d.A,{htmlFor:O,text:L.t("Name your section")}),n.createElement("div",{className:P.fileSectionInputWrapper},renderEmojiSelector(),n.createElement(m.A,{ref:H,className:P.fileSectionInput,value:T,placeholder:L.t("Enter a section name"),onChange:G,id:O}),renderClearButton())))),n.createElement(y.jl,null,n.createElement(y.ox,null,n.createElement(y.s_,{type:"outline",onClick:V,"aria-label":L.t("Close"),"data-qa":"file_section_modal_close_button"},L.t("Close")),n.createElement(s.A,{type:"primary",onClick:q,loading:U,disabled:!T,"data-qa":"file_section_modal_submit_button","aria-label":L.t("Create")},L.t("Save"))))))};FileSectionCreateModal.displayName="FileSectionCreateModal"},0xf4f3c80f:(e,t,a)=>{"use strict";a.d(t,{j:()=>r});var n,r=((n={}).FILE_BROWSER_MENU="file_browser_menu",n.FILE_SIDEBAR="file_sidebar",n.CANVAS_HEADER="canvas_header",n.LIST_HEADER="list_header",n.FILE_PILLOW="file_pillow",n.CANVAS_OVERFLOW_MENU="canvas_overflow_menu",n.FILE_PREVIEW_HEADER="file_preview_header",n)},0x1f6b8d4b1:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x3796a18c),i=a(0x20679dcfc),l=a(0x226892387),o=a(0x1d06e350e),s=a(0x152efebe6);function getDetailType(e,t,a){if(t.includes(e))return r.s.ACTIVITY_MENTION;switch(a){case o.QX.LAST_ENGAGED:case o.QX.RECENTLY_VIEWED:return r.s.LAST_VIEWED;case o.QX.NEWEST:case o.QX.RELEVANT:return r.s.LAST_UPDATED;default:return r.s.OWNER}}let __WEBPACK_DEFAULT_EXPORT__=e=>{let t=(0,l.d4)(s.qE),a=(0,l.d4)(s.is),r=(0,n.useCallback)(t=>getDetailType(t,a,e),[e,a]),o=(0,n.useCallback)(e=>t?.[(0,i.p)(e)]?.mentionCount??0,[t]);return(0,n.useCallback)(e=>({detailType:r(e),notificationCount:o(e),fromOrganization:!0}),[r,o])}},0x814278bf:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x9e671ad),l=a(0x1f022ebd9),o=a(0x134e233cc),s=a(0x242503693),c=a(0x226892387),d=a(0x16f1f4c74),m=a(0x1c56fcf95),u=a(0x1eae5fa6e),p=a(0x182b853bf),h=a(0x1c211ad70),_=a(0x1a35d3e34),f=a(0x164e27b8c);let __WEBPACK_DEFAULT_EXPORT__=(e,t,a={},b=!1)=>{let g=(0,r.wA)(),{totalCount:y,page:A,pageCount:x,sort:E,viewType:C,isLoading:k,results:v,query:S,metadata:I,filters:w,initialFilters:T,cursorMark:N,error:M}=(0,c.d4)(t=>(0,m.gK)(t,e)),R=A&&v&&v[A]?v[A]:[];v&&a.isInfinitePagination&&(R=Object.values(v).flat());let P=!S&&(0,i.A)(w,T),{transitionFocusTo:L}=(0,n.useContext)(o.Ay);(0,l.A)(()=>(b||g((0,h.X)({browserInstanceId:e,entityType:t,options:a})),()=>{g((0,u.p)({browserInstanceId:e,ttl:a?.ttl}))}),[]);let O=(0,n.useCallback)(()=>{a.isInfinitePagination&&A<x&&(g((0,d.Ir)({browserInstanceId:e,value:A+1})),g((0,p.h)({browserInstanceId:e})))},[g,A,x,e,a]),D=(0,n.useCallback)(()=>{g((0,p.h)({browserInstanceId:e}))},[g,e]),F=(0,n.useCallback)(t=>{g((0,_.X)({browserInstanceId:e,value:t})),L({focusKey:s.Ay.PAGE_BROWSER_FIRST_VISIBLE_RESULT,forceFocus:!0})},[g,e,L]);return{handleLoadMore:D,handlePageSelect:F,handleSortSelect:(0,n.useCallback)(t=>{t.value!==E&&g((0,f.I)({browserInstanceId:e,value:t.value}))},[g,e,E]),handleViewTypeSelect:(0,n.useCallback)(t=>{g((0,d.Yq)({browserInstanceId:e,value:t.value}))},[g,e]),handleInfinitePagination:O,results:R,totalCount:y,cursorMark:N,page:A,pageCount:x,sort:E,query:S,viewType:C,isLoading:k,metadata:I,isZeroState:P,filters:w,error:M,initialFilters:T}}},0xea23b7d3:(e,t,a)=>{"use strict";a.d(t,{A:()=>W});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xb1ea448c),o=a(0x5ec2a928),s=a(0x131e0b1e1),c=a(0x1f6b8d4b1),d=a(0x814278bf),m=a(0x2132483d2),u=a(0x11ed04fa0),p=a(0x21d77b188),h=a(0xbd3de346),_=a(0xa1832ae4),f=a(0x1befa7c4),b=a(0xe8015073),g=a(0x23e174be6),y=a(0x226892387),A=a(0x19c76d181),x=a(0x16f1f4c74),E=a(0x182b853bf),C=a(0x1a0b49dc0),k=a(0x1fa577313),v=a(0x14633fe41),S=a(0x206e601f5),I=a(0x2bfcf5dd),w=a(0x164e27b8c),T=a(0x1d06e350e),N=a(0x1fb2d2a87),M=a(0x14149c126),R=a(0x14ea3ce99),P=a(0xd0eb5473),L=a(0xe4af74fc),O=a(0x91e15f37),D=a(0x1950da728),F=a(0x1ee439e69),U=a(0xde662d04),B=a(0x691eb0d4);let H=new i.Ay("quip-files-browser"),useCanvasModalExplorer=({context:e})=>{let t=[],a=(0,r.wA)(),i=(0,r.Pj)(),W=(0,y.d4)(u.U6),V=(0,y.d4)(A.WR),G=(0,y.d4)(F.H7),q=(0,_.tc)(G),j=(0,y.d4)(O.iH),[z,K]=(0,n.useState)(void 0),$=(0,y.d4)(O.ek),Y=(0,s.A)(),Q=(0,y.d4)(N.to),Z=!!(0,y.d4)(p.V),J=(0,y.d4)(e=>(0,L.tA)(e,{permission:b.p.CREATE_CANVAS_TEMPLATES})),X=(0,P.Jr)(J),ee=!!(W&&e?.channelId),et=(0,y.d4)(e=>"on"===(0,M._Z)(e,"tab_3p_file_picker")),ea=T.ej.CANVAS;ee&&(ea=et?T.ej.UNIFIED_FILE_PICKER_CANVASES:T.ej.CHANNEL_TAB_CANVAS);let en={filters:{fileType:[D.$Z.QUIP],excludedFileType:[D.$Z.CANVAS_TEMPLATE]}},{handleSortSelect:er,handleInfinitePagination:ei,results:el,pageCount:eo,sort:es,isLoading:ec,metadata:ed,isZeroState:em,filters:eu,totalCount:ep,page:eh,query:e_}=(0,d.A)(ea,T.ri.QUIP_FILES,{isInfinitePagination:!0,...ee?en:{}},e?.browserHasBeenPreFetched),ef=(0,c.A)(es),eb=i.getState(),{files:eg,isFetching:ey}=(0,o.A)(),eA=ec||!!(e?.includeTemplatesInResultsList&&ey),ex=q||!$&&j||Y,eE=eu?.notFrom?.includes(V)&&eu?.onlyMyChannels&&eu?.notFrom?.length===1,eC=eu?.from?.includes(V)&&!1===eu.onlyMyChannels,ek=(0,n.useMemo)(()=>[eC?null:{label:H.t("Recently viewed"),value:T.QX.RECENTLY_VIEWED},{label:H.t("Last updated"),value:T.QX.NEWEST}].filter(e=>null!==e),[eC]),ev=[{label:H.t("Most relevant",{ns:"browsers"}),value:T.QX.RELEVANT},{label:H.t("Last updated"),value:T.QX.NEWEST}],eS=(0,n.useCallback)(()=>n.createElement("div",{className:"p-quip_files_page"},n.createElement(l.A,{size:"jumbo",floating:!0})),[]),eI=(0,n.useCallback)(({value:e})=>{"all_canvases_filter"===e?e_||es===T.QX.RECENTLY_VIEWED?a((0,k.q)({browserInstanceId:ea})):(a((0,k.q)({browserInstanceId:ea,fetch:!1})),a((0,w.I)({browserInstanceId:ea,value:T.QX.RECENTLY_VIEWED}))):"shared_with_you_canvases_filter"===e?a((0,S.d)({browserInstanceId:ea,filters:{from:[],notFrom:[V],onlyMyChannels:!0},sort:e_?es:T.QX.RECENTLY_VIEWED})):"created_by_you_canvases_filter"===e&&a((0,S.d)({browserInstanceId:ea,filters:{from:[V],notFrom:[],onlyMyChannels:!1,with:[]},sort:es!==T.QX.RECENTLY_VIEWED||e_?es:T.QX.NEWEST}))},[ea,a,V,es,e_]),ew=(0,n.useMemo)(()=>eE?"shared_with_you_canvases_filter":eC?"created_by_you_canvases_filter":"all_canvases_filter",[eC,eE]),eT=[{label:H.t("All canvases"),value:"all_canvases_filter"},{label:H.t("Shared with you"),value:"shared_with_you_canvases_filter"},{label:H.t("Created by you"),value:"created_by_you_canvases_filter"}];t.push({key:"controls",type:f.MA.Controls,data:{selects:[{id:"filter",title:H.t("Filter"),value:ew,onChange:eI,type:f.jc.EXPANDED,options:eT},{id:"sort",title:H.t("Sort"),value:es,onChange:er,options:e_?ev:ek,position:"right"}]},role:f.N3.Presentation}),eA&&eh<2&&t.push({key:"list-loading",type:f.MA.ListLoading,role:f.N3.Presentation,scrollToTop:!0});let eN=e?.includeTemplatesInResultsList&&eg.length>0&&!ey&&"all_canvases_filter"===ew,eM=new Set;eN&&eg.forEach((e,a)=>{let n=e.id,{detailType:r,fromOrganization:i}=ef(n),l=0===el.length&&a===el.length-1;eM.add(n),t.push({key:n,type:f.MA.CanvasResult,data:{fileId:n,isFirst:0===a,isLast:l,filePropertyOverride:ed?.[n]?{title:ed?.[n]?.title,name:ed?.[n]?.name,iid:ed?.[n]?.iid}:void 0,detailType:r,notificationCount:0,fromOrganization:i,showCanvasModalMetadata:!0,isActiveItem:z===n},onListItemSelect:()=>{K(n)},autoClogProps:{elementIndex:a,elementName:"file_result"},role:f.N3.ListItem})});let eR=el;e?.excludeCannedCanvasTemplates&&(eR=el?.filter(e=>{let t=(0,R.Lp)(eb,e);return!(0,h.ny)(t)})),eR.length&&eR.forEach((a,n)=>{let r,{detailType:i,fromOrganization:l}=ef(a),o=(0,R.Lp)(eb,a);if(W&&e?.channelId&&e?.omitOtherChannelCanvasRows&&e?.filteredCanvasIdSet&&e?.filteredCanvasIdSet.has(o.id))return;if(e?.forSolutionTemplate){let e=(0,h.vH)(eb,o),t=(0,m.f)({file:o,isFileSharingRestrictedForTeam:Z,currentTeamId:G.id,currentUserOwnsFile:e,canCreateTemplates:X});t.isValid||(r=(e=>{if(e)switch(e){case m.Y.DoesNotBelongToTeam:return H.t("File does not belong to your team");case m.Y.CannotTemplatize:return H.t("File must be a template",{fallbackHash:"f3cc6a17b1a02306a384ee2bbcb8f93f10ce42da"});case m.Y.FileSharingRestrictedForTeam:return H.t("File sharing restricted by team");case m.Y.FileSharingRestrictedByCreator:return H.t("File sharing restricted by creator");default:return H.t("This file cannot be selected")}})(t.error))}if(eN&&eM.has(a))return;let s=0===eg.length&&0===n;t.push({key:a,type:f.MA.CanvasResult,data:{fileId:a,isFirst:s,isLast:n===el.length-1,filePropertyOverride:ed?.[a]?{title:ed?.[a]?.title,name:ed?.[a]?.name,iid:ed?.[a]?.iid}:void 0,detailType:i,notificationCount:0,fromOrganization:l,showCanvasModalMetadata:!0,isActiveItem:z===a,disabledReason:r,createdByUserId:o?.user},onListItemSelect:r?void 0:()=>{K(a)},disableClick:void 0!==r,autoClogProps:{elementIndex:n,elementName:"file_result"},role:f.N3.ListItem})}),eA||ep||!em||eN||q||(ex?t.push({key:"canvas-free-team-full-page-nux",type:f.MA.CanvasFreeTeamFullPageNux,data:{isTeamOnTrial:j,renderLoadingSpinner:eS},role:f.N3.Presentation}):t.push({key:"zero-empty",type:f.MA.EmptyState,data:{title:H.t("Get your team on the same page. Literally."),description:H.t("Store and share the information that keeps your team moving, from meeting notes to project briefs."),imageUrl:"dark"===Q?U:B},role:f.N3.Presentation})),eA||ep||em||t.push({key:"zero-empty",type:f.MA.EmptyState,data:{title:H.t("No results",{fallbackHash:"b993b0c537190bfc94b21360ac5abe51e56be36f",fallbackHashNs:"browsers"}),description:H.t("You may want to try adjusting your filters.",{fallbackHash:"e800137556e2b12dc8b3a66efcf4771f1593eb0e",fallbackHashNs:"browsers"})},role:f.N3.Presentation}),eo>1&&t.push({key:"pagination",type:f.MA.InfinitePagination,data:{isLoading:eA,onLoadMore:ei},role:f.N3.Presentation});let eP=(0,n.useCallback)(()=>{a((0,x.NY)({browserInstanceId:ea,value:""})),a((0,v.q)({browserInstanceId:ea})),es===T.QX.RELEVANT?a((0,w.I)({browserInstanceId:ea,value:eC?T.QX.NEWEST:T.QX.RECENTLY_VIEWED})):a((0,E.h)({browserInstanceId:ea}))},[ea,es,a,eC]);return{rows:t,onSearch:(0,n.useCallback)(({selectedIndex:e,suggestions:t,userQuery:n})=>{n?null===e||t[e].is_type_query_completion&&(a((0,I.o)({browserInstanceId:ea,value:n})),a((0,w.I)({browserInstanceId:ea,value:T.QX.RELEVANT,skipGetResults:!0})),a((0,C.d)({browserInstanceId:ea}))):eP()},[ea,a,eP]),onResetSearch:eP,searcherOptions:(0,n.useMemo)(()=>({allowEmptyQuery:!0,tiered:!0,entities:{files:{onlyCanvases:!0,excludeTemplateCanvases:ee,excludeChannelCanvases:e?.forSolutionTemplate,excludeCannedCanvasTemplates:e?.excludeCannedCanvasTemplates}},limit:30,returnMetadata:!0,sort:{frecency:!0,model:(0,g.I)(),preferExactMatch:!0},searchViewContext:"autocomplete:canvas-picker-modal",filter:t=>{if(!e?.filteredCanvasIdSet?.has(t.id)){if(!e?.forSolutionTemplate)return!0;let a=(0,h.vH)(eb,t);return(0,m.f)({file:t,isFileSharingRestrictedForTeam:Z,currentTeamId:G.id,currentUserOwnsFile:a,canCreateTemplates:X}).isValid}return!1}}),[e?.filteredCanvasIdSet,e?.forSolutionTemplate,e?.excludeCannedCanvasTemplates,G.id,Z,ee,X,eb]),isZeroState:!e_}};useCanvasModalExplorer.displayName="useCanvasModalExplorer";let W=useCanvasModalExplorer},0x20f36aa26:(e,t,a)=>{"use strict";a.d(t,{A:()=>use_explorer_renderer});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x40c0d834),s=a(0x2b7f0bcc),c=a(0x11a296110),d=a(0xf3b0bc58),m=a(0x126affba2),u=a(0x20482ad21),p=a(0x1faa3f1ac),h=a(0x2501a2cee),_=a(0x18a03595d),f=a(0x1ad0fbde0);let b=new u.Ay("modernselling"),ListViewBrowserFooter=()=>n.createElement("div",{className:"p-list_view_browser__page_footer_list_item"},n.createElement("div",{className:"p-list_view_browser__page_footer_heading"},n.createElement("div",null,n.createElement("strong",null,b.t("Can\u2019t find the list you need?"))),n.createElement("div",{className:"padding_bottom_75"},b.t("Try searching by name or filter to a specific type of Salesforce list. Or, create a new list in Salesforce."))),n.createElement(p.A,{className:"p-list_view_browser__page_footer_link",href:(0,f.v)(_.EN)},n.createElement("span",{className:"padding_right_25"},b.t("Learn how to create a Salesforce list")),n.createElement(h.Ah,{name:"new-window",inline:!0,size:"20"})));ListViewBrowserFooter.displayName="ListViewBrowserFooter",ListViewBrowserFooter.displayName="ListViewBrowserFooter";var g=a(0x1cbdfeceb),y=a(0x32d3ef3d),A=a(0x4df01f17),x=a(0x23d75f12b),E=a(0xf01a9d50),C=a(0x16c59013b),k=a.n(C);let ListViewPreview=({isLoading:e,objectApiName:t,previewData:a,salesforceOrgId:r})=>{let i=a?.display_columns,o=a?.objects,s=i&&o?(0,x.B)(i,o):null,c=i?.[0]?.label||"",d=o?.length||2;return n.createElement("div",{className:k().gridContainer},n.createElement("div",{className:k().gridRow},n.createElement("div",{className:l()(k().gridCell,k().columnHeader)},e?n.createElement(A.A,{width:"50%",height:8,borderRadius:8}):c)),Array.from({length:d}).map((a,i)=>n.createElement("div",{className:k().gridRow,key:`row-${i+1}`},e?n.createElement("div",{className:k().gridCell,key:`cell-${i+1}`},t&&n.createElement("span",{className:k().recordIcon},n.createElement(h.Ah,{size:"18",...(0,E.C)(t)})),n.createElement("div",{className:"full_width margin_right_100"},n.createElement(A.A,{width:"100%",height:8,borderRadius:8}))):n.createElement("div",{className:k().gridCell,key:`cell-${i+1}`},s&&(0,x.r)(s[c][i],r)))))};ListViewPreview.displayName="ListViewPreview";var v=a(0x12f1a6c38),S=a(0x91728dda),I=a(0x256e816e),w=a(0x194722c),T=a(0x21136ddfc),N=a(0xcc8160ae),M=a.n(N);let TemplateTile=({autoClogProps:e,className:t,entityState:a=y.w.enabled,title:r,description:i,previewContent:o,onClick:s,backgroundImage:c,backgroundImgPosition:d})=>n.createElement("div",{className:l()(t,M().templateListItem,M().explorerActionsTile)},n.createElement(w.V,{autoClogProps:e,size:y.S.expanded,entityState:a,primaryLabel:r,secondaryLabel:i,previewContent:o,withBorder:!1,shouldShrinkUnderDefaultWidth:!0,truncateLabels:!0,onClick:s,backgroundImage:c||T,backgroundImageShouldCover:!0,backgroundLoadingHeight:130,isRemovable:!1,customMinWidth:221,isAutoHeight:!1,customPreviewHeight:130,backgroundImgPosition:d}));TemplateTile.displayName="TemplateTile";var R=a(0x1be9380c8),P=a(0x3711e82d),L=a(0x24558b75f),O=a(0x226892387),D=a(0x1fb2d2a87),F=a(0x1c1c45c18),U=a(0x234d0f539),B=a(0x249a395fa),H=a(0x1ec68d6a3),W=a(0x11c82607b),V=a(0x1f8f05a48);let G=(0,W.Ay)("Fetch Salesforce list view recommendations for an org",async(e,t,a)=>e((0,B.g)(a)).then(t=>e((0,F.Sb)({salesforceOrgId:a.salesforceOrgId,recommendations:t.list_views}))).catch(()=>{(0,H.Ay)({label:"SALES-LIST-VIEW-RECS"}).error("Failed to fetch list view recommendations")}));G.meta={name:"fetchListViewRecommendations",key:"createThunkFetchListViewRecommendations",description:"Fetch Salesforce list view recommendations for an org"};let q=(0,V.Ay)(G,3e5,!0,void 0,!1);var j=a(0x231dcfd36);let z=(0,W.Ay)("Fetch object data for a list view recommendations",async(e,t,a)=>Promise.all((0,U.k_)(t(),a).map(t=>e((0,j.a)({listviewId:t.list_view_id,sortByColumnKey:"",reason:"list-view-recommendation",salesforceOrgId:a,pageSize:2})).then(n=>{e((0,F.WV)({listViewId:t.list_view_id,objectData:n,salesforceOrgId:a}))}).catch(()=>{(0,H.Ay)({label:"SALES-LIST-VIEW-RECS"}).error("Failed to fetch list view recommendation object data")}))));z.meta={name:"fetchListViewRecommendationsObjectData",key:"createThunkFetchListViewRecommendationsObjectData",description:"Fetch object data for a list view recommendations"};let K=(0,V.Ay)(z,3e5,!0,void 0,!1);var $=a(0x9271cc31);let Y=a.p+"list-view-rec-bg-dark-34bf204.png",Q=a.p+"list-view-rec-bg-e761f1c.png";var Z=a(0xe2adc842),J=a.n(Z);let X=new u.Ay("slackforce"),ListViewBrowserRecommendations=()=>{let e=(0,r.wA)(),{salesforceOrgId:t}=(0,n.useContext)(I.C),a=(0,O.d4)(D.to),i="sales-home"===(0,O.d4)($.e6),[o,s]=(0,n.useState)(!0),[d,m]=(0,n.useState)(!1),u=o||d,p=(0,v.o)(),_=(0,O.d4)(R.pc),f=(0,O.d4)(e=>(0,U.k_)(e,t)),b=(0,O.d4)(U.dD),A=(0,O.d4)(S.Pe),x=(0,n.useCallback)(()=>{t&&(s(!0),e(q({reason:"list_view_browser",salesforceOrgId:t})).then(()=>{m(!0),e(K(t)).finally(()=>{m(!1)})}).finally(()=>{s(!1)}))},[e,t]);(0,n.useEffect)(()=>{x()},[x]);let E=(0,n.useMemo)(()=>({elementName:"list_view_browser_recommendations_toggle",onClick:{enableClogAction:!0},action:b?P.UiAction.EXPAND:P.UiAction.COLLAPSE}),[b]),C=(0,n.useCallback)(e=>({clogImpression:!0,elementName:"list_view_browser_rec",elementValue:e,onClick:{enableClogAction:!0}}),[]),k=(0,n.useCallback)(e=>a=>{p({id:e.list_view_id,label:e.list_view_label,objectType:e.objectData?.object_api_name||"",salesforceOrgId:t},{forceNewWindow:(0,L.Cz)(a),openInHome:!i&&_})},[_,i,p,t]),w=(0,n.useCallback)(()=>{e((0,F.jA)(!b))},[e,b]),T=(0,n.useCallback)(e=>n.createElement(ListViewPreview,{isLoading:d||!e.objectData,objectApiName:e.object_api_name,previewData:e.objectData,salesforceOrgId:t}),[d,t]),N=(0,n.useCallback)(e=>n.createElement(TemplateTile,{key:e,title:"",description:"",onClick:g.A,entityState:y.w.loading}),[]),B=(0,n.useCallback)(e=>n.createElement(TemplateTile,{key:e.list_view_id,autoClogProps:C(e.list_view_label),title:e.list_view_label,description:e.description,previewContent:T(e),onClick:k(e),backgroundImage:"dark"===a?Y:Q}),[a,C,k,T]),H=(0,n.useCallback)(()=>o?[void 0,void 0,void 0].map((e,t)=>N(t)):f.map(e=>B(e)),[o,f,N,B]);if(!A||!u&&!f.length)return null;let W=X.t("Recommendations");return n.createElement(n.Fragment,null,n.createElement(c.Nm,{className:J().collapseToggle,onClick:w,"aria-label":W,"aria-expanded":!b,autoClogProps:E},n.createElement(h.Ah,{name:b?"caret-right-filled":"caret-down-filled",size:"20"}),n.createElement("span",null,W)),!b&&n.createElement("div",{className:"margin_bottom_125"},n.createElement("div",{className:l()(M().buttonsContainer,M().cardsV2)},H())))};ListViewBrowserRecommendations.displayName="ListViewBrowserRecommendations";var ee=a(0x44520056),et=a(0x42441247),ea=a(0x128d54e52),en=a(0x24f1e08bb),er=a(0x1fdec3e16),ei=a(0x99233ecb),el=a(0x1d8f0e558),eo=a(0x9f5891b3);let es=new u.Ay("modernselling"),ec={elementName:"open_in_new_window",onClick:{enableClogAction:!0}},ListViewItemMoreMenu=({compositeListId:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,eo.x)({compositeListId:e,forceNewWindow:!0}))},[t,e]),i=(0,O.d4)(L.n3),l=(0,n.useMemo)(()=>{let e=[];return i&&e.push({autoClogProps:ec,label:es.t("Open in new window"),icon:n.createElement(h.Ah,{name:"open-in-window",size:"16"}),click:a}),e},[i,a]),o=(0,n.useCallback)(e=>(t,a)=>{a.stopPropagation(),e.onTriggerClose?.(a)},[]),s=(0,n.useCallback)(e=>n.createElement(ei.a,{template:l,width:220,onMenuItemSelected:o(e)}),[l,o]),c=(0,n.useMemo)(()=>n.createElement(h.Ah,{name:"ellipsis-vertical-filled"}),[]);if(!l.length)return null;let d=es.t("More actions");return n.createElement(ei.cQ,{renderMenu:s,preventScroll:!0,position:"left-bottom",offsetX:31,offsetY:33},n.createElement(el.A,{icon:c,label:d,"aria-label":d,tooltipPosition:"top-right"}))};ListViewItemMoreMenu.displayName="ListViewItemMoreMenu";var ed=a(0x1658b76d7),em=a(0x2025bbfb4),eu=a(0x24f6a06c8);let ep=new u.Ay("modernselling"),ListViewRowItem=({className:e,compositeListId:t,label:a,lastViewedDate:r,objectLabel:i,hintText:o,isPicker:s})=>{let c=(0,O.d4)(R.pc),[d,m]=(0,n.useState)(!1),u=(0,n.useCallback)(()=>n.createElement("div",{className:l()("p-list_view_row_item__entity_icon")},n.createElement(eu.l,{type:"ListView"})),[]),p=(0,n.useMemo)(()=>n.createElement(et.A,{className:"bold",withTruncationTooltip:!0},a),[a]),_=i||r,f=(0,n.useMemo)(()=>{if(!_)return null;let e="";if(d&&!s)e=ep.t("Open Salesforce list");else if(i&&(e=`${i}`),r){let t=new Date(r).getTime(),a=(0,ee.A)(t,{uncapitalizedRelativeDay:!0}),n=ep.t("Viewed {time}",{time:a});e=e?`${e} \xb7 ${n}`:n}return n.createElement(et.A,{className:"p-list_view_row_item__entity_subtext",withTruncationTooltip:!0},e)},[d,s,r,i,_]),b=(0,n.useCallback)(()=>n.createElement(ea.Ay,{avatar:u,size:"medium",text:p,subtext:f}),[f,p,u]),g=(0,n.useMemo)(()=>o?n.createElement(er.A,{lines:1,withTooltip:!0},o):!s&&t&&c?n.createElement("div",{className:"display_flex"},n.createElement(ed.y,{compositeListId:t,skipImpression:!0,skipNavigationToEntity:!0,entityIconVariant:em.q.ListViewBrowser}),n.createElement(ListViewItemMoreMenu,{compositeListId:t})):n.createElement("div",{className:"p-list_view_row_item__entity_arrow"},n.createElement(h.Ah,{name:"arrow-right",size:"24"})),[t,c,o,s]),y=(0,n.useCallback)(()=>{m(!0)},[]),A=(0,n.useCallback)(()=>{m(!1)},[]);return n.createElement("div",{className:e,onMouseEnter:y,onMouseLeave:A},n.createElement("div",{className:"p-list_view_row_item__list_entity"},n.createElement(en.A,{className:l()("p-list_view_row_item__list_entity_content",{"p-list_view_row_item__list_entity_content--legacy":!c}),primaryContent:b(),secondaryContent:g})))};ListViewRowItem.displayName="ListViewRowItem";var eh=a(0x3796a18c),e_=a(0xfa28400d),ef=a(0xf27817c9),eb=a(0x9798b7f),eg=a(0x7729d35b),ey=a(0x1fd3f6e20),eA=a(0x1a769a9e8),ex=a(0xb985bb5e),eE=a.n(ex);let AgentAvatar=({agent:e,size:t=36})=>{let{src:a,srcSet:r}=(0,n.useMemo)(()=>{let a=(0,eA.A)(e,t),n=(0,eA.A)(e,2*t);return{src:a,srcSet:a&&n?`${a} 1x, ${n} 2x`:a}},[e,t]);return n.createElement("img",{src:a,srcSet:r,alt:"",width:t,height:t,className:eE().thumbnailImg})};AgentAvatar.displayName="AgentAvatar";var eC=a(0x5dded68),ek=a(0x202fa5d55),ev=a(0x1f6b74117),eS=a.n(ev);let eI=y.w.enabled,ew=y.S.compact,eT=new u.Ay("ai_apps"),AgentListItem=({agent:e,viewTab:t,description:a,hasFocus:r=!1})=>{let{isHovered:i}=(0,ef.r)(),o=t===eC.M.AgentExchange,s=eT.t("Installed"),c=o?eT.t("Open in split view"):eT.t("Open DM in split view"),d=eT.t("Open in Slack Marketplace"),m=eT.t("Agent"),u=e.is_installed?c:d,p=i||r?u:a||m,h=(0,n.useMemo)(()=>n.createElement("div",{className:eS().primaryLabelContainer},o?n.createElement(ek.A,{text:e.name,showTooltips:!1}):e.name,e.is_installed&&o&&n.createElement(ey.v,{isMicro:!0},s)),[e.name,e.is_installed,o,s]),_=(0,n.useMemo)(()=>n.createElement("div",{className:eS().secondaryLabelContainer,"aria-hidden":r},n.createElement(ek.A,{text:p,showTooltips:!1})),[p,r]);return n.createElement("div",{className:l()(o?eS().bottomSection:eS().listItemContainer)},n.createElement(eg.A,{entityState:eI,suppressDefaultColors:!0},n.createElement(AgentAvatar,{agent:e})),n.createElement(eb.A,{size:ew,entityState:eI,primaryLabel:h,secondaryLabel:_}))};AgentListItem.displayName="AgentListItem";var eN=a(0x22b8621cf),eM=a(0x11c86845f),eR=a(0x1d5dc623c),eP=a(0x139aa1a7),eL=a(0x1d677c0df),eO=a(0x243435af9),eD=a(0x1a02c72b5),eF=a(0xd6a16321),eU=a(0xd843ab47),eB=a(0x6d72337),eH=a(0x4cd7b414),eW=a(0x19895585a);let eV=new u.Ay("ai_apps"),eG={name:"ellipsis-vertical-filled",size:"18"},AgentListItemMoreActionsMenu=({agent:e,appId:t,agentName:a,onMenuActionsOpened:i,onMenuActionsClosed:l})=>{let o=(0,r.wA)(),{isChildWindow:s}=(0,n.useContext)(eU.A),c=(0,L.M2)(),d=(0,O.d4)(eO.HA),m=(0,n.useCallback)(async t=>{t?.stopPropagation();let a=await o((0,eH.Z)({memberId:e.bot_user_id,shouldNavigateToChannel:!1})),n=a?.id;n&&await o((0,eB.Bb)({viewSet:{[eW.mq.Primary]:{id:n,viewType:eP.D.AppSpace}},shouldShowSearch:!1}))},[o,e.bot_user_id]),u=(0,n.useCallback)(a=>{a?.stopPropagation(),t&&o((0,eD.o)((0,eF.tp)({appId:t,memberId:e.bot_user_id,entryPoint:eL.kt.AgentBrowser})))},[o,t,e.bot_user_id]),p=(0,n.useCallback)(()=>{let e=[];return c&&!s&&e.push({label:eV.t("Open in new window"),click:e=>m(e),icon:n.createElement(h.Ah,{name:"open-in-window",size:"18"})}),t&&e.push({label:eV.t("About {agentName}",{agentName:a}),click:e=>u(e),icon:n.createElement(h.Ah,{name:"info",size:"18"})}),e},[a,t,s,c,m,u]),_=(0,n.useCallback)(e=>n.createElement(eR.A,{...e,template:p()}),[p]),f=d?eV.t("More actions for {agentName}",{agentName:a}):`More actions for ${a}`;return n.createElement(eN.A,{isMenuTrigger:!0,renderMenu:_,menuPosition:"left-bottom",onPopoverOpen:i,onPopoverClose:l,svgIconProps:eG,"aria-label":f,tooltipLabel:eV.t("More actions"),tooltipPosition:"top",buttonSize:"small"})};AgentListItemMoreActionsMenu.displayName="AgentListItemMoreActionsMenu";let eq=new u.Ay("ai_apps"),ej={name:"move-to-split-view"},ez={name:"new-window"},AgentListItemActions=({agent:e,appId:t,agentName:a,viewTab:r})=>{let i=(0,O.d4)(eO.HA),l=r===eC.M.AgentExchange,o=i?eq.t("Open DM in split view for {agentName}",{agentName:a}):`Open DM in split view for ${a}`,s=i?eq.t("Open in split view for {agentName}",{agentName:a}):`Open in split view for ${a}`,c=i?eq.t("Open in Slack Marketplace for {agentName}",{agentName:a}):`Open in Slack Marketplace for ${a}`;return n.createElement(eM.A,null,e.is_installed?n.createElement(n.Fragment,null,n.createElement(eN.A,{svgIconProps:ej,"aria-label":l?s:o,tooltipLabel:l?eq.t("Open in split view"):eq.t("Open DM in split view"),tooltipPosition:"top",buttonSize:"small"}),n.createElement(AgentListItemMoreActionsMenu,{agent:e,appId:t,agentName:a})):n.createElement(n.Fragment,null,n.createElement(eN.A,{svgIconProps:ez,"aria-label":c,tooltipLabel:eq.t("Open in Slack Marketplace"),tooltipPosition:"top",buttonSize:"small"})))};AgentListItemActions.displayName="AgentListItemActions";let eK=y.w.enabled,e$=y.S.compact,AgentExchangeListItem=({agent:e,renderedInListVariant:t,hasFocus:a=!1})=>{let r=(0,n.useMemo)(()=>n.createElement(AgentListItemActions,{agent:e,appId:e.app_id,agentName:e.name,viewTab:eC.M.AgentExchange}),[e]);return n.createElement(e_.j7,{actionsBar:r,entityState:eK,customMaxWidth:"100%",isFullWidth:!0,isFullHeight:!0,isRemovable:!1,shouldShrinkUnderDefaultWidth:!0,size:e$,renderedInListVariant:t,forceShowActionsBar:a},n.createElement(AgentListItem,{agent:e,viewTab:eC.M.AgentExchange,description:e.short_description,hasFocus:a}))};AgentExchangeListItem.displayName="AgentExchangeListItem";let eY=y.w.enabled,eQ=y.S.compact,MyAgentsListItem=({agent:e,renderedInListVariant:t,hasFocus:a=!1})=>{let r=(0,n.useMemo)(()=>n.createElement(AgentListItemActions,{agent:e,appId:e.app_id,agentName:e.name,viewTab:eC.M.MyAgents}),[e]);return n.createElement(e_.j7,{actionsBar:r,entityState:eY,customMaxWidth:"100%",isFullWidth:!0,isFullHeight:!0,isRemovable:!1,shouldShrinkUnderDefaultWidth:!0,size:eQ,renderedInListVariant:t,forceShowActionsBar:a},n.createElement(AgentListItem,{agent:e,viewTab:eC.M.MyAgents,description:e.desc,hasFocus:a}))};MyAgentsListItem.displayName="MyAgentsListItem";var eZ=a(0x164aebd11);function BrowsePageUserGroup({id:e,className:t}){return n.createElement("div",{role:"presentation",className:l()("p-browse_page_user_group",t),"data-qa":"browse_page_user_group"},n.createElement(eZ.A,{id:e}))}BrowsePageUserGroup.displayName="BrowsePageUserGroup";let eJ=BrowsePageUserGroup;var eX=a(0x1f022ebd9),e0=a(0x210cf696f);let ExplorerAccordion=({title:e,isCollapsed:t,onAccordionToggle:a,secondaryActionTitle:r,secondaryActionOnClick:i})=>{let[l,o]=(0,n.useState)(t);(0,eX.A)(()=>{a(t)},[]);let s=(0,n.useCallback)(()=>{let e=!l;o(e),a(e)},[l,a]);return n.createElement("div",{className:"p-explorer_tiles_section"},n.createElement(c.Nm,{className:"inline_flex align_items_center",onClick:s,"aria-label":e,"aria-expanded":!l},n.createElement(h.Ah,{name:l?"caret-right-filled":"caret-down-filled",size:"20"}),e),r&&i&&n.createElement(e0.A,{onClick:i},r))};ExplorerAccordion.displayName="ExplorerAccordion";let ExplorerActions=({actions:e})=>{let t=(0,n.useCallback)(e=>({elementName:e,onClick:{enableClogAction:!0}}),[]);return n.createElement("div",{className:"p-explorer_actions"},e.map(({onSelect:e,label:a,icon:r,secondaryLabel:i,elementName:l})=>n.createElement(c.Nm,{className:"p-explorer_action_button",onClick:e,key:a,autoClogProps:t(l)},n.createElement("div",{className:"p-explorer_action_button__icon"},n.createElement(h.Ah,{name:r})),n.createElement("div",null,n.createElement("div",null,a),!!i&&n.createElement("div",{className:"p-explorer_action_button__secondary_label"},i)))))};ExplorerActions.displayName="ExplorerActions";var e1=a(0x21f3c49e8),e2=a(0x1d01572a2),e4=a(0xbe0b63ff),e5=a(0x18dac2b8e),e3=a(0xb04bc36e),e6=a(0xb1ea448c),e8=a(0x5ec2a928),e7=a(0x1df96de4c),e9=a(0x187063a6e),te=a(0x1b2e599bc),tt=a(0x21c8c64ab),ta=a(0xda0fcf22),tn=a(0xbd3de346),tr=a(0xa1832ae4),ti=a(0x1ccef1c6f),tl=a(0x12f41fc32),to=a(0x1bc939146),ts=a(0x8d0a2ff1),tc=a(0x46dbff89),td=a(0x1ee439e69);let tm=a.p+"canvas-template-background-d87732a.png",tu=a.p+"list-template-background-8c410bd.png",tp=[{name:"EmployeeOnboardingTemplate",colorFill:"honeycomb"},{name:"MonthlyNewsletterTemplate",colorFill:"flamingo"},{name:"WeeklySyncTemplate",colorFill:"aubergine"},{name:"OOOCoveragePlan",colorFill:"paprika"}],ExplorerActionsTemplatesTiles=({primaryViewType:e,files:t})=>{let a=(0,r.wA)(),i=e===eP.D.BrowseUnifiedFiles,s=e===eP.D.BrowseUnifiedFilesCanvases,c=e===eP.D.BrowseUnifiedFilesLists,d=(0,O.d4)(e=>(0,tr.tc)((0,td.H7)(e))),m=(0,n.useRef)(null),u=(0,O.d4)(e=>(0,ti.ty)(e,"seen_canvas_template_new_badge")??!1),p=(0,O.d4)(ts.yv),h=(0,n.useCallback)(e=>{if(m.current?.track({action:P.UiAction.OPEN,label:e.name,canvasTemplateLabel:e.name}),!d)return a((0,eB.K6)({autoClogProps:{source:"ExplorerActionsTemplatesTiles"},openGalleryWithTemplate:{id:e.id,section:to.hI.Canned},showSingleTemplate:!0}));a((0,eB.K6)({autoClogProps:{source:"ExplorerActionsTemplatesTiles"},openGalleryWithTemplate:{id:e.id,section:to.hI.Canned}})),u||a((0,tl.AZ)({pref:"seen_canvas_template_new_badge",value:!0}))},[a,d,u]),_=(0,n.useCallback)(e=>(m.current?.track({action:P.UiAction.OPEN,label:e.title}),a((0,tc.q)({element:n.createElement(ta.A,{templateId:e.id,autoClogProps:{elementName:"list_template_preview_modal"}})}))),[a]),f=(0,n.useCallback)(e=>{let t=[];return e?.length?(tp.forEach(a=>{let n=e.find(e=>e?.template_name?.includes(a.name));n&&t.push({...a,id:n.id,imageSrc:n.template_icon,title:n.template_title||"",description:n.template_description||"",onClick:()=>h(n)})}),t):e7.Ml},[h]),b=(0,n.useCallback)(e=>{let t=n.createElement(te.Ay,{fileId:e.id,containerClassName:"p-file_quip--unfurl p-file_quip--template_preview",hideTitle:!0,hideHeaderImage:!0});return n.createElement(TemplateTile,{key:e.id,title:e.title,description:e.description,previewContent:t,onClick:()=>h(e),backgroundImage:tm})},[h]),g=(0,n.useCallback)(e=>{let t=p[e.id],a=t?.descriptionBlocks?n.createElement(tt.$,{value:t?.descriptionBlocks}):t?.description,r=n.createElement(e9.A,{key:e.id,file:e,size:y.S.expanded,hideHeader:!0,customMaxWidth:280,customPreviewContainerHeight:110,isRemovable:!1,maxNumOfRowsInPreview:2,noTopBorder:!0});return n.createElement(TemplateTile,{key:e.id,title:e.title||"",description:a,previewContent:r,onClick:()=>_(e),backgroundImage:tu})},[p,_]),A=(0,n.useMemo)(()=>i?t?.map(e=>{if((0,tn.dE)(e)){let t=f([e])[0];if(t)return b(t)}return g(e)}):null,[i,t,b,g,f]),x=(0,n.useMemo)(()=>s?t?.map(e=>{let t=f([e])[0];return t?b(t):null}):null,[s,t,b,f]),E=(0,n.useMemo)(()=>c?t?.map(g):null,[c,t,g]),C=[];return(i?C=A??[]:s?C=x??[]:c&&(C=E??[]),C?.length)?n.createElement(o.A,{eventId:s?P.EventId.QUIP_CANVAS_CANNED_TEMPLATE_TILES:P.EventId.LISTS_TEMPLATE_TILES,clogImpression:!0,trackClogRef:e=>{m.current={track:e}}},n.createElement("div",{className:l()("p-explorer_template_tiles",M().buttonsContainer,M().cardsV2,{[M().buttonsContainerWide]:t&&t.length>3})},C)):null};ExplorerActionsTemplatesTiles.displayName="ExplorerActionsTemplatesTiles";var th=a(0x1e3c7661),t_=a(0x23c9689f4),tf=a(0xf931c21),tb=a(0x1f3226107),tg=a(0x70de3606),ty=a(0x167d76333),tA=a(0x23175895b),tx=a(0xbc72568a),tE=a(0x14ea3ce99),tC=a(0x13654559a),tk=a(0x5bed1d27);let tv=new u.Ay("slack-docs"),tS={elementName:"list_browse_template_modal"},ExplorerActionsTemplates=({primaryViewType:e,actions:t=[],customTemplateUi:a,targetFileId:i})=>{let l=(0,n.useCallback)(e=>({elementName:e,onClick:{enableClogAction:!0}}),[]),o=(0,r.wA)(),[s,d]=(0,n.useState)(!1),m=e===eP.D.BrowseUnifiedFiles,u=e===eP.D.BrowseUnifiedFilesCanvases,p=e===eP.D.BrowseUnifiedFilesLists,_=(0,O.d4)(tx.cw),f=(0,O.d4)(ts.ii),b=u?_:f,g=(0,n.useMemo)(()=>({elementName:"explorer_actions_templates_toggle",onClick:{enableClogAction:!0},action:b?P.UiAction.EXPAND:P.UiAction.COLLAPSE}),[b]),y=(0,O.d4)(e=>(0,ti.ty)(e,"seen_canvas_template_new_badge")??!1),A=(0,O.d4)(ty.F),x=(0,O.d4)(tg.Il),{files:E,isFetching:C}=(0,e8.A)(),k=C||s,v=(0,O.d4)(ts.yv),S=(0,n.useMemo)(()=>{if(!(0,e1.A)(v)){let e=[],t=v[(0,e5.Cu)()||(0,e5.$i)()?th.YD.ProjectTracker:th.op.ProjectTracker];t&&e.push(t);let a=v[(0,e5.Cu)()||(0,e5.$i)()?th.YD.FeedbackTracker:th.op.FeedbackTracker];a&&e.push(a);let n=v[(0,e5.Cu)()||(0,e5.$i)()?th.YD.QuarterlyPlan:th.op.QuarterlyPlan];return n&&e.push(n),e}return[]},[v]),I=(0,O.Z2)(e=>S.map(t=>(0,tE.Lp)(e,t.id))),w=(0,n.useMemo)(()=>I.filter(e=>(0,e4.lv)(e)),[I]),T=(0,n.useMemo)(()=>{if(m){if(A&&x&&E.length&&I.length){let e=[];for(let t=0;t<3;t++)t<E.length&&e.push(E[t]),t<I.length-1&&e.push(I[t]);return e}return A&&!x?E.slice(0,3):!A&&x?I:[]}return A&&u?E.slice(0,3):x&&p?I:[]},[u,m,E,I,A,x,p]),N=(0,n.useRef)(!1);(0,e2.A)(()=>{(0,e1.A)(v)&&(async()=>{d(!0),await o((0,tk.Q)()),d(!1)})()}),(0,n.useEffect)(()=>{w.length>0&&!N.current&&(N.current=!0,d(!0),w.forEach(e=>{o((0,tb.B2)({fileId:e.id,reason:"unified-files-explorer-list-template"}))}),d(!1))},[o,w]);let M=tv.t("Templates"),R=(0,n.useCallback)(()=>{let e=!b;u?o((0,tA.CX)({cannedTemplatesCollapsed:e})):o((0,tC.Ke)({templatesCollapsed:e}))},[b,o,u]),L=(0,n.useCallback)(()=>{u?(o((0,eB.K6)({autoClogProps:{source:"ExplorerActionsTemplatesTiles"}})),y||o((0,tl.AZ)({pref:"seen_canvas_template_new_badge",value:!0}))):p&&o((0,tc.q)({element:n.createElement(t_.A,{autoClogProps:tS,targetListId:i})}))},[o,u,p,y,i]);if(a)return a;if(!k&&!T.length)return null;let D=n.createElement(tf.A,{className:"margin_right_25",uiComponentVariant:P.UiComponentVariant.UNIFIED_FILES_TEMPLATES_MODULE,hideTooltip:!0});return n.createElement(n.Fragment,null,n.createElement("div",{className:"p-explorer_tiles_section"},n.createElement("div",{className:"p-canvas_templates_title"},n.createElement(c.Nm,{className:"inline_flex align_items_center",onClick:R,"aria-label":M,"aria-expanded":!b,autoClogProps:g},n.createElement(h.Ah,{name:b?"caret-right-filled":"caret-down-filled",size:"20"}),n.createElement("div",{className:"display_flex align_items_baseline"},D,M,!y&&!D&&n.createElement(e3.A,{className:"p-canvas_templates_callout"},tv.t("NEW")))),!m&&n.createElement(e0.A,{className:"p-canvas_templates_see_all",onClick:L,autoClogProps:l("see_more_tile")},tv.t("See all")))),!b&&n.createElement("div",{className:"p-explorer_actions"},t.map(({onSelect:e,label:t,icon:a,secondaryLabel:r,elementName:i})=>n.createElement(c.Nm,{className:"p-explorer_action_button",onClick:e,key:t,autoClogProps:l(i)},n.createElement("div",{className:"p-explorer_action_button_visuals"},n.createElement("div",{className:"p-explorer_action_button__icon p-explorer_action_button__icon_ocean"},n.createElement(h.Ah,{size:"16",name:a}))),n.createElement("div",{className:"p-explorer_action_button_text"},n.createElement("div",null,t),!!r&&n.createElement("div",{className:"p-explorer_action_button__secondary_label"},r)))),k?n.createElement(e6.A,{size:"medium",noMargin:!0}):n.createElement(ExplorerActionsTemplatesTiles,{primaryViewType:e,files:T})))};ExplorerActionsTemplates.displayName="ExplorerActionsTemplates";var tI=a(0xf90b35a5),tw=a(0x4c96e5d9),tT=a(0x2dd1b881),tN=a(0x10b8ce25);let tM=a.p+"emoji-reaction-notification@2x-358bf97.png",tR=a.p+"google-sheets-feedback-log@2x-5bcebdf.png",tP=a.p+"new-jira-cloud-issue@2x-0d95b30.png",tL=a.p+"weekly-ai-summary-363b8af.png",tO=a.p+"weekly-check-in@2x-363f77b.png",tD={[tN.Uc]:tR,[tN.Vl]:tP,[tN.f7]:tO,[tN.A]:tL,[tN.Pz]:tM};var tF=a(0x108d160a),tU=a(0x15ee7abd6),tB=a(0x20cb5591c),tH=a.n(tB);let ExplorerActionsWorkflowTemplate=({onSelect:e,templateId:t,tooltip:a,isCardView:r})=>{let[i,o]=(0,n.useState)(!1),s=(0,O.d4)(e=>(0,tU.kn)(e,t)),d=(0,tF.fo)(s),m=(0,tF.Uy)(s),u=t===tT.Z.START_FROM_SCRATCH,p=(0,n.useCallback)(()=>{o(!0),e(t).then(()=>{o(!1)})},[e,t]),_=(0,n.useMemo)(()=>({elementName:t,displayName:(0,tI.A)(d),uiPage:P.UiPage.WORKFLOW_GALLERY,uiComponentName:P.UiComponentName.WORKFLOW_TEMPLATE,onClick:{enableClogAction:!0}}),[d,t]),f="p-explorer_workflow_template_grid__cell",b=r?n.createElement(TemplateTile,{className:tH().templateItem,key:d,title:d||"",description:m||"",backgroundImage:tD[t],backgroundImgPosition:"top",onClick:p}):n.createElement(c.Nm,{key:d,onClick:p,className:l()(f,"p-explorer_action_button","p-explorer_action_button__workflow_template",tH().workflowTemplatesButtonsHideWidth),autoClogProps:_,"aria-labelledby":`p-explorer-template-${d}`,"aria-describedby":`p-explorer-template-${m}`},n.createElement("div",{className:`${f}__title_container`},n.createElement("div",{className:`${f}__title_container__image_container`},u?n.createElement(h.Ah,{name:"plus",size:"20"}):n.createElement("img",{alt:"",src:(0,tF.xA)(s)})),n.createElement(er.A,{lines:2,breakWords:!1,withTooltip:!a},n.createElement("div",{className:`${f}__title_container__title`},d)),i?n.createElement("div",{className:`${f}__loader`},n.createElement(e6.A,{color:u?"blue":"white",size:"large"})):null),n.createElement(er.A,{lines:2,breakWords:!1,withTooltip:!a},n.createElement("div",{className:`${f}__title_container__description`},m)));return a?n.createElement(tw.Ay,{tip:a.text,position:a.position},b):b};ExplorerActionsWorkflowTemplate.displayName="ExplorerActionsWorkflowTemplate";let ExplorerActionsWorkflowTemplates=({templateIds:e,onSelect:t,tooltip:a,isCardView:r})=>{let i=l()("p-explorer_actions",{"p-explorer_template_tiles":r,[tH().buttonsContainer]:r,[tH().cardsV2]:r});return n.createElement("div",{className:i},e.map(e=>n.createElement(ExplorerActionsWorkflowTemplate,{key:e,templateId:e,onSelect:t,tooltip:a,isCardView:r})))};ExplorerActionsWorkflowTemplates.displayName="ExplorerActionsWorkflowTemplates";var tW=a(0xb7a80133),tV=a(0xd3c52762),tG=a(0xe7ed96ac),tq=a(0x1aaf5b422),tj=a.n(tq);let tK=new u.Ay("ai_apps"),t$={name:"new-window",size:"16"},tY={name:"move-to-split-view",size:"16"},AgentExchangeGridItemHeader=({agent:e,isHoveredOrFocused:t=!1})=>{let a=tK.t("Open in Slack Marketplace"),r=tK.t("Open in split view"),[i,l]=(0,n.useState)(!1),o=(0,n.useMemo)(()=>t&&!i||!t&&i?n.createElement(n.Fragment,null,n.createElement(tw.Ay,{tip:r},n.createElement(tG.A,{"aria-label":r,svgIconProps:tY})),n.createElement(AgentListItemMoreActionsMenu,{agent:e,appId:e.app_id,agentName:e.name,onMenuActionsOpened:()=>l(!0),onMenuActionsClosed:()=>l(!1)})):null,[e,r,l,t,i]),s=(0,n.useMemo)(()=>t?n.createElement(n.Fragment,null,n.createElement(tw.Ay,{tip:a},n.createElement(tG.A,{"aria-label":a,svgIconProps:t$}))):null,[a,t]);return n.createElement("div",null,e.is_installed&&n.createElement("div",{className:tj().tagContainer},n.createElement(ey.v,{isMicro:!0,style:ey.u.Gray},tK.t("Installed"))),n.createElement("div",{className:tj().actionsContainer},e.is_installed?o:s))};AgentExchangeGridItemHeader.displayName="AgentExchangeGridItemHeader";let tQ=new u.Ay("ai_apps"),AgentExchangeGridItem=({agent:e,isHoveredOrFocused:t=!1})=>{let a=(0,n.useMemo)(()=>{let t=e.directory_payload?.screenshots?.[0];return t?.image_440||t?.image_1000||e.icons.image_512||e.icons.image_128},[e]),r=e.is_installed?tQ.t("Open in split view"):tQ.t("Open in Slack Marketplace"),i=(0,n.useMemo)(()=>n.createElement(er.A,{lines:1},n.createElement(ek.A,{text:e.name,showTooltips:!1})),[e]),l=(0,n.useMemo)(()=>{let a=t?r:e.short_description||tQ.t("Agent");return n.createElement("div",{className:tj().secondaryLabel},n.createElement(er.A,{lines:1},n.createElement(ek.A,{text:a,showTooltips:!1})))},[e,t,r]);return n.createElement("div",{className:tj().agentExchangeGridItem},n.createElement(AgentExchangeGridItemHeader,{agent:e,isHoveredOrFocused:t}),n.createElement(w.V,{backgroundImage:a,size:y.S.compact,entityState:y.w.enabled,primaryLabel:i,secondaryLabel:l,previewIconUrl:e.icons.image_72,withBorder:!0,isFullWidth:!0,isAutoHeight:!1,backgroundLoadingHeight:110,customPreviewHeight:110,backgroundImageShouldCover:!0,isRemovable:!1}))};AgentExchangeGridItem.displayName="AgentExchangeGridItem";var tZ=a(0x11243fb75),tJ=a(0xb77a689a),tX=a(0x1e58a28f4),t0=a(0x1cfcdb1db),t1=a(0x1ed65ccda);let AgentPromptButton=({botUserId:e,channelId:t,prompt:a,agentMessageSourceType:i,...l})=>{let o=(0,r.wA)(),s=(0,n.useCallback)(async n=>{n.preventDefault(),n.stopPropagation();let r=await o((0,eH.Z)({memberId:e,shouldNavigateToChannel:!1})),l=await o((0,t0.Ay)({channelId:t,delta:new tX.Ru().insert(a),agentMessageSourceType:i}));if(!l||(0,tJ.A)(l))return;let s="ts"in l?l.ts:void 0;s&&o((0,t1.T)({channelId:r?.id,threadTs:s,isSplitView:!1}))},[o,e,t,a,i]);return n.createElement(c.$n,{onClick:s,...l},n.createElement(er.A,{lines:1,withTooltip:!0},a))};AgentPromptButton.displayName="AgentPromptButton";var t2=a(0x130c2e810),t4=a(0x1b9d5cc0c),t5=a(0x20c81ddcb),t3=a(0x217553e42),t6=a(0xe684f705),t8=a(0x1c2a1a838),t7=a(0x17e07355d),t9=a.n(t7);let ae=new u.Ay("agents"),at=y.w.enabled,aa=y.S.expanded,AgentGridItem=({botUserId:e,hideActionBar:t,index:a})=>{let i=(0,r.wA)(),o=(0,O.d4)(t=>(0,t2.O8)(t,e)),s=(0,eA.A)(o?.profile,512),c=(0,O.d4)(t=>(0,t3.o2)(t,e)),d=o?.legacy_app?.agentforce?.salesforce_org_id,m=(0,O.d4)(e=>d?(0,t8.kO)(e,d):void 0),u=(0,O.d4)(t=>(0,t6.nv)(t,e)),p=(0,t4.wg)(u),h=(0,O.d4)(e=>(0,t5.Gd)(e,c||"")),_=(0,n.useCallback)(t=>{t.stopPropagation(),i((0,eD.o)((0,eF.Fo)({memberId:e||""})))},[e,i]),f=(0,n.useMemo)(()=>t?null:n.createElement("div",{className:t9().actionbarContainer},n.createElement(eM.A,null,n.createElement(eN.A,{"aria-label":ae.t("Open profile for {name}",{name:p||"agent",fallbackHash:"b98795a246f09961ab85071a7f50013203007e9f",fallbackHashNs:"menu"}),svgIconProps:{name:"info"},tooltipLabel:ae.t("Open profile",{fallbackHash:"b98795a246f09961ab85071a7f50013203007e9f",fallbackHashNs:"menu"}),tooltipPosition:"top",onClick:_,buttonSize:"small"}))),[p,t,_]),b=0===a;return o?n.createElement(tZ.A,{id:e,"aria-label":p||ae.t("agent",{fallbackHash:"5ce2e6f40299204d94dfc0abf19fa8ab52d6c211",fallbackHashNs:"tabbed-channel"}),tabIndex:b?0:-1,manageTabIndex:!1},n.createElement(e_.Ay,{actionsBar:f,entityState:at,customMaxWidth:"100%",isFullWidth:!0,isFullHeight:!0,isRemovable:!1,shouldShrinkUnderDefaultWidth:!0,size:aa},n.createElement("div",{className:l()(t9().container)},n.createElement("div",{className:t9().content},n.createElement("div",{className:t9().iconContainer},n.createElement("img",{className:t9().icon,src:s,alt:"app avatar"})),n.createElement("div",{className:t9().labels},n.createElement("div",{className:t9().primaryLabel},p||ae.t("Untitled Agent",{fallbackHash:"5ce2e6f40299204d94dfc0abf19fa8ab52d6c211",fallbackHashNs:"tabbed-channel"})),(0,e4.uz)(m)?n.createElement("div",{className:t9().secondaryLabel},m?.name):null),n.createElement("div",{className:t9().description},n.createElement(er.A,{lines:3,breakWords:!1},o?.legacy_app?.assistant_description)),n.createElement("div",{className:t9().prompts},h?.prompts?.slice(0,2).map(t=>n.createElement(AgentPromptButton,{botUserId:e||"",className:t9().promptButton,key:t.title,prompt:t.title,size:"small",type:"outline",agentMessageSourceType:"prompt_button_in_agents_list",channelId:c||""}))))))):n.createElement(tZ.A,{id:e,"aria-label":ae.t("agent",{fallbackHash:"5ce2e6f40299204d94dfc0abf19fa8ab52d6c211",fallbackHashNs:"tabbed-channel"}),tabIndex:b?0:-1,manageTabIndex:!1},n.createElement(e_.Ay,{entityState:at,isFullWidth:!0,customMaxWidth:"100%",isFullHeight:!0,isRemovable:!1,shouldShrinkUnderDefaultWidth:!0,size:aa},n.createElement("div",{className:t9().container},n.createElement("div",{className:t9().content},n.createElement("div",{className:t9().iconContainer},n.createElement(A.A,{width:"100%",height:36,borderRadius:8})),n.createElement("div",{className:t9().loadingLabels},n.createElement("div",{className:t9().primaryLabel},n.createElement(A.A,{height:8,borderRadius:8,width:93})),n.createElement("div",{className:t9().secondaryLabel},n.createElement(A.A,{height:8,borderRadius:8,width:131}))),n.createElement("div",{className:t9().loadingDescription},n.createElement(A.A,{width:"100%",height:8,borderRadius:8}),n.createElement(A.A,{width:"100%",height:8,borderRadius:8}),n.createElement(A.A,{width:"100%",height:8,borderRadius:8})),n.createElement("div",{className:t9().prompts},n.createElement("div",{className:t9().loadingPromptButton}),n.createElement("div",{className:t9().loadingPromptButton}))))))};AgentGridItem.displayName="AgentGridItem";var an=a(0x20b4dda68),ar=a(0x10aeb4921);let ExplorerGridFile=({fileId:e,channelId:t})=>{let a=(0,O.d4)(t=>(0,tE.Lp)(t,e));return n.createElement(ar.A,{file:a,channelId:t,forceClickStyles:!0,fileContainerType:an.zk.FILE_BROWSER})};ExplorerGridFile.displayName="ExplorerGridFile";var ai=a(0x125763ad),al=a(0xb790209f),ao=a(0x1ef4b4237),as=a(0xf1527618),ac=a(0x974d09a),ad=a.n(ac);let am=new u.Ay("member_profile"),ExplorerGridMember=({memberId:e,width:t,memberPropertyOverride:a,currentQuery:r})=>{let i=(0,O.d4)(as.Yx),l=(0,O.d4)(t=>(0,t6.nv)(t,e)),o=(0,n.useMemo)(()=>(0,ai.A)({},l,a||{}),[l,a]),s=(0,t4.jm)(o)||{},c=(0,ao.B_)(s),d=!!o?.top_terms,m=!!o?.similar,u=(0,t4.fy)(o),p=(0,t4.zU)(o),_=(0,n.useMemo)(()=>{let e="";return p?e=am.t("Invited member"):i&&u?e=am.t("That\u2019s you!"):c?e=n.createElement("span",null,n.createElement("span",{className:ad().justificationSparkle},n.createElement(h.Ah,{name:"sparkles",inline:!0,size:"inherit"})),am.t("Found in profile",{fallbackHash:"e8055c36e10ab5f2d0d9d4aef32c4ea6a55d0251",fallbackHashNs:"browsers"})):(d||m)&&(e=n.createElement("span",null,n.createElement("span",{className:ad().justificationSparkle},n.createElement(h.Ah,{name:"sparkles",inline:!0,size:"inherit"})),d?am.rt("Talks about \u201C{query}\u201D",{query:n.createElement("span",{className:"p-browse_page_member__top_terms_term"},n.createElement(ek.A,{text:r}))}):am.rt("Talks about similar topics"))),e},[d,m,i,c,r,u,p]);return n.createElement(al.A,{id:e,memberWithoutHighlights:l,memberMetadata:a,subtext:_,avatarSize:t})};ExplorerGridMember.displayName="ExplorerGridMember";var au=a(0x124d99cb0),ap=a(0xa2b9925c),ah=a(0x6cc678b6),a_=a(0xa5b9082a),af=a(0x9acebc24),ab=a.n(af);let ag=new u.Ay("solutions"),ay={eventId:P.EventId.SOLUTIONS_GALLERY,onClick:{enableClogAction:!0},elementName:"template_overflow_menu"},SolutionTemplateEntityCompact=({id:e,isFirst:t,isLast:a,notInList:r})=>{let i=(0,O.d4)(t=>(0,a_.$F)(t,e)),o=(0,n.useCallback)(t=>n.createElement(ah.U,{templateId:e,menuProps:t}),[e]),s=(0,n.useMemo)(()=>n.createElement(h.Ah,{name:"ellipsis-vertical-filled"}),[]);return n.createElement("div",{className:l()(ab().container)},n.createElement("div",{className:l()(ab().item,{[ab().first]:t,[ab().last]:a,[ab().standalone]:r})},n.createElement("div",{className:ab().icon},n.createElement(h.Ah,{name:"tools-filled",size:"20"})),n.createElement("div",{className:ab().information},n.createElement("div",{className:ab().name},i?.name),n.createElement("div",{className:ab().description},n.createElement(er.A,{lines:1,breakWords:!1},n.createElement("span",null,i?.description)))),n.createElement(ei.cQ,{renderMenu:o,position:"left-bottom"},n.createElement(el.A,{icon:s,label:ag.t("More actions",{fallbackHash:"a1e34f91579d0900384176f8a467bf688034f1ee",fallbackHashNs:"activity"}),"aria-label":ag.t("More actions",{fallbackHash:"a1e34f91579d0900384176f8a467bf688034f1ee",fallbackHashNs:"activity"}),tooltipPosition:"top-right",autoClogProps:ay}))))};SolutionTemplateEntityCompact.displayName="SolutionTemplateEntityCompact";var aA=a(0x198963561),ax=a.n(aA);let SolutionsTemplatePreviewContent=({imgSrc:e,imgName:t})=>n.createElement("div",{className:ax().allTemplatesCardPreview},n.createElement("img",{src:e,alt:t,className:ax().image}));SolutionsTemplatePreviewContent.displayName="SolutionsTemplatePreviewContent";var aE=a(0x7bfcb519);let aC=new u.Ay("solutions"),ExplorerGridSolutionsTemplate=({template:e,size:t,isHoveredOrFocused:a})=>{let i=(0,r.wA)(),l=(0,n.useMemo)(()=>n.createElement(SolutionsTemplatePreviewContent,{imgSrc:e.icon,imgName:e.name}),[e]),o=(0,n.useCallback)(t=>{t.stopPropagation(),e.id&&i((0,ap.h)(e.id))},[i,e.id]),s=(0,n.useMemo)(()=>n.createElement(eM.A,null,n.createElement(eN.A,{"aria-label":"Copy link",tooltipLabel:aC.t("Copy link to template"),isMenuTrigger:!1,onClick:o,svgIconProps:{name:"link",size:"16"}})),[o]),c=(0,n.useMemo)(()=>{if(e.id!==aE.vv.SlackCrmSolution)return e.name;let t=(0,au.lP)("2026-02-17");return new Date>t.toDate()?e.name:n.createElement(n.Fragment,null,n.createElement("span",null,e.name),n.createElement("span",{className:ax().newBadge},n.createElement(ey.v,{isMicro:!0,style:ey.u.InverseInformative},aC.t("NEW"))))},[e.id,e.name]);return n.createElement(n.Fragment,null,t===y.S.expanded&&n.createElement("div",{className:ax().allTemplatesCard,key:e.id},n.createElement(w.V,{size:y.S.expanded,actionsBar:s,entityState:y.w.enabled,primaryLabel:c,previewContent:l,withBorder:!1,truncateLabels:!0,backgroundLoadingHeight:130,isRemovable:!1,customMinWidth:221,isAutoHeight:!0,noPreviewMargin:!0,isFullWidth:!0,customMaxWidth:"100%",isInteractive:!1,forceShowActionsBar:a,groupAriaLabel:e.name})),t===y.S.compact&&n.createElement(SolutionTemplateEntityCompact,{id:e.id,notInList:!0}))};ExplorerGridSolutionsTemplate.displayName="ExplorerGridSolutionsTemplate";let ak=n.memo(ExplorerGridSolutionsTemplate);var av=a(0x1789e94fa),aS=a(0x5b1935a6);let aI=n.lazy(()=>Promise.resolve().then(a.bind(a,0x1b198977)).then(e=>({default:e.ConditionalBranchingTemplatesNewBadge}))),aw={spaceName:aS.xu.HERMES_WORKFLOWS_CONDITIONAL_TEMPLATES_NEW_BADGE_VIEW,notifications:{[aS.ze.HERMES_WORKFLOWS_CONDITIONAL_TEMPLATES_NEW_BADGE]:{component:aI}}};var aT=a(0x3e058968);let aN=(0,a(0x1cf0d97e1).Ay)(e=>!!(0,aT.Cf)(e)&&(0,aT.mC)(e));aN.meta={name:"isSimplifiedTemplatesRenderingEnabled",key:"createSelectorIsSimplifiedTemplatesRenderingEnabled",description:e=>!!(0,aT.Cf)(e)&&(0,aT.mC)(e)};var aM=a(0x13bf3b55d);function useTemplateRenderingStrategyChecker(){let e=(0,O.d4)(aT.Cf),t=(0,O.d4)(aT.mC);return{getTemplateRenderingStrategy:(0,n.useCallback)(a=>(0,aM.W)({template:a,experimentShortcutsGalleryExpressTemplatesGroupOn:e,experimentPlatformSimplifiedTemplatesGroupOn:t}),[t,e])}}var aR=a(0x11a399abe);let aP=new u.Ay("shortcuts_gallery"),ExplorerGridWorkflowTemplate=({templateId:e,templateSelected:t})=>{let a=(0,O.d4)(aN),{getTemplateRenderingStrategy:i}=useTemplateRenderingStrategyChecker(),o=(0,O.d4)(tU.mD),s=(0,r.wA)(),c=(0,O.d4)(t=>(0,tU.kn)(t,e)),d=t===e,m=e===tT.Z.START_FROM_SCRATCH,u="p-explorer_workflow_template_grid__cell",p=(0,n.useRef)(null);(0,n.useEffect)(()=>{c.id===o&&(s((0,aR.gC)("")),p?.current?.scrollIntoView({behavior:"smooth"}))},[c,o,s]);let _=(0,n.useMemo)(()=>!(0,e4.GU)(c)&&"simplified"===i(c),[i,c]),f=(0,n.useMemo)(()=>c.id===tN.QN||c.id===tN.aC,[c.id]);return(0,tF.Zx)(c)?null:n.createElement("div",{ref:p,className:l()(u,{[`${u}--disabled`]:!!t}),"data-qa":"workflow-template-explorer-item"},n.createElement("div",{className:`${u}__title_container`},n.createElement("div",{className:`${u}__title_container__image_container`},m?n.createElement(h.Ah,{name:"plus",size:"24"}):n.createElement("img",{alt:"",src:(0,tF.xA)(c)})),n.createElement(er.A,{lines:2,breakWords:!1,withTooltip:!0},n.createElement("div",{className:`${u}__title_container__title`},(0,tF.fo)(c))),f&&n.createElement(av.A,{spaceName:aw.spaceName,notifications:aw.notifications}),!_&&a&&n.createElement("div",{className:`${u}__advanced_badge`},aP.t("Advanced",{fallbackHash:"4d064726954a17487f94e931f5b157b733ec22ed",fallbackHashNs:"prefs"})),d?n.createElement("div",{className:`${u}__loader`},n.createElement(e6.A,{color:m?"blue":"white",size:"large"})):null),n.createElement(er.A,{lines:2,breakWords:!1,withTooltip:!0},n.createElement("div",{className:`${u}__title_container__description`},(0,tF.Uy)(c))))};ExplorerGridWorkflowTemplate.displayName="ExplorerGridWorkflowTemplate";var aL=a(0xf4097f62),aO=a(0x9b29cfd8),aD=a(0x10bae7b36),aF=a(0xd3140b7),aU=a(0x6019b546),aB=a(0x1fcbb004d);let aH=new u.Ay("agents"),DeleteConfirmationModal=({appId:e,experimentSidekicksGroupOn:t})=>{let a=(0,r.wA)(),[i,l]=(0,n.useState)(!1),o=(0,n.useCallback)(async()=>{if(e&&!i){l(!0);try{(await a((0,aF.l)({app:e,reason:"delete-sidekick"}))).ok&&a((0,aU._l)({appId:e})),a((0,aB.O)())}finally{l(!1)}}},[e,i,a]),s=(0,n.useCallback)(()=>{a((0,aB.O)())},[a]);return n.createElement(aD.A,{title:t?aH.t("Delete sidekick"):"Delete sidekick",cancelButtonText:t?aH.t("Cancel"):"Cancel",submitButtonText:t?aH.t("Delete"):"Delete",onClose:s,onCancel:s,onSubmit:o,submitButtonType:"danger",isSubmitButtonALoadingButton:!0,isSubmitting:i},t?aH.t("You\u2019re about to delete this sidekick. Do you want to proceed?"):"You're about to delete this sidekick. Do you want to proceed?")};DeleteConfirmationModal.displayName="DeleteConfirmationModal";var aW=a(0x96dd42eb),aV=a(0x1ef41d895),aG=a(0x19c76d181);let aq=new u.Ay("agents"),aj=y.w.enabled,az=y.S.expanded,aK={name:"ellipsis-vertical-filled"},SidekickGridItem=({botUserId:e,hideActionBar:t,index:a})=>{let i=(0,r.wA)(),o=(0,O.d4)(aW.Q),s=(0,O.d4)(t=>(0,t2.O8)(t,e)),c=(0,eA.A)(s?.profile,512),d=s?.app_id,m=(0,O.d4)(t=>(0,t3.o2)(t,e)),u=(0,O.d4)(t=>(0,t6.nv)(t,e)),p=s?.profile?.name||(0,t4.wg)(u);(0,e1.A)(p)&&(p=o?aq.t("Untitled Sidekick"):"Untitled Sidekick");let h=(0,O.d4)(e=>(0,t6.nv)(e,s?.auth?.created_by)),_=(0,O.d4)(aG.WR),f=(0,aO.HM)(s,_),b=(0,O.d4)(e=>(0,t5.Gd)(e,m||"")),g=(0,n.useMemo)(()=>h&&o?aq.rt("Created by {author}",{author:n.createElement(aL.A,{id:h?.id})}):null,[o,h]),y=(0,n.useCallback)(t=>{t.stopPropagation(),i((0,eD.o)((0,eF.Fo)({memberId:e||""})))},[e,i]),x=(0,n.useCallback)(t=>{t.stopPropagation(),i((0,aV.A)({appId:d,botUserId:e}))},[i,d,e]),E=(0,n.useCallback)(e=>{e.stopPropagation(),i((0,tc.q)({element:n.createElement(DeleteConfirmationModal,{appId:d,experimentSidekicksGroupOn:o}),isStackable:!0}))},[i,d,o]),C=(0,n.useCallback)(()=>n.createElement(ei.Ay,{width:"auto"},n.createElement(ei.Dr,{key:"overflow-edit","data-qa":"edit",onSelected:x,label:o?aq.t("Edit sidekick"):"Edit sidekick"}),n.createElement(ei.Dr,{key:"overflow-delete","data-qa":"delete",danger:!0,onSelected:E,label:o?aq.t("Delete sidekick"):"Delete sidekick"})),[x,E,o]),k=(0,n.useMemo)(()=>t?null:n.createElement("div",{className:t9().actionbarContainer},n.createElement(eM.A,null,n.createElement(eN.A,{"aria-label":aq.t("Open profile for {name}",{name:p||"agent",fallbackHash:"b98795a246f09961ab85071a7f50013203007e9f",fallbackHashNs:"menu"}),svgIconProps:{name:"info"},tooltipLabel:aq.t("Open profile",{fallbackHash:"b98795a246f09961ab85071a7f50013203007e9f",fallbackHashNs:"menu"}),tooltipPosition:"top",onClick:y,buttonSize:"small"}),f&&n.createElement(ei.cQ,{width:"auto",renderMenu:C,position:"bottom-right"},n.createElement(tw.Ay,{position:"top",tip:"More actions"},n.createElement(tG.A,{"data-qa":"overflow","aria-label":"More actions",size:"small",svgIconProps:aK}))))),[p,t,y,C,f]),v=0===a;return s?n.createElement(tZ.A,{id:e,"aria-label":p||aq.t("agent",{fallbackHash:"5ce2e6f40299204d94dfc0abf19fa8ab52d6c211",fallbackHashNs:"tabbed-channel"}),tabIndex:v?0:-1,manageTabIndex:!1},n.createElement(e_.Ay,{actionsBar:k,entityState:aj,customMaxWidth:"100%",isFullWidth:!0,isFullHeight:!0,isRemovable:!1,shouldShrinkUnderDefaultWidth:!0,size:az},n.createElement("div",{className:l()(t9().container)},n.createElement("div",{className:t9().content},n.createElement("div",{className:t9().iconContainer},n.createElement("img",{className:t9().icon,src:c,alt:"app avatar"})),n.createElement("div",{className:t9().labels},n.createElement("div",{className:t9().primaryLabel},p),g&&n.createElement("div",{className:t9().secondaryLabel},g)),n.createElement("div",{className:t9().description},n.createElement(er.A,{lines:3,breakWords:!1},s?.legacy_app?.assistant_description)),n.createElement("div",{className:t9().prompts},b?.prompts?.slice(0,2).map(t=>n.createElement(AgentPromptButton,{botUserId:e||"",className:t9().promptButton,key:t.title,prompt:t.title,size:"small",type:"outline",agentMessageSourceType:"prompt_button_in_agents_list",channelId:m||""}))))))):n.createElement(tZ.A,{id:e,"aria-label":o?aq.t("sidekick"):"sidekick",tabIndex:v?0:-1,manageTabIndex:!1},n.createElement(e_.Ay,{entityState:aj,isFullWidth:!0,customMaxWidth:"100%",isFullHeight:!0,isRemovable:!1,shouldShrinkUnderDefaultWidth:!0,size:az},n.createElement("div",{className:t9().container},n.createElement("div",{className:t9().content},n.createElement("div",{className:t9().iconContainer},n.createElement(A.A,{width:"100%",height:36,borderRadius:8})),n.createElement("div",{className:t9().loadingLabels},n.createElement("div",{className:t9().primaryLabel},n.createElement(A.A,{height:8,borderRadius:8,width:93})),n.createElement("div",{className:t9().secondaryLabel},n.createElement(A.A,{height:8,borderRadius:8,width:131}))),n.createElement("div",{className:t9().loadingDescription},n.createElement(A.A,{width:"100%",height:8,borderRadius:8}),n.createElement(A.A,{width:"100%",height:8,borderRadius:8}),n.createElement(A.A,{width:"100%",height:8,borderRadius:8})),n.createElement("div",{className:t9().prompts},n.createElement("div",{className:t9().loadingPromptButton}),n.createElement("div",{className:t9().loadingPromptButton}))))))};SidekickGridItem.displayName="SidekickGridItem";var a$=a(0x1befa7c4);let renderExplorerCell=(e,t,a)=>{switch(e.type){case a$.MA.FileResult:case a$.MA.CanvasResult:return n.createElement(ExplorerGridFile,{fileId:e.data.fileId,filePropertyOverride:e.data.filePropertyOverride,channelId:e.data.channelId});case a$.MA.MemberResult:return n.createElement(ExplorerGridMember,{memberId:e.data.memberId,memberPropertyOverride:e.data.memberPropertyOverride,currentQuery:e.data.currentQuery,width:t});case a$.MA.WorkflowTemplateResult:return n.createElement(ExplorerGridWorkflowTemplate,{templateId:e.data.templateId,templateSelected:e.data.templateSelected});case a$.MA.SolutionsTemplateResult:return n.createElement(ak,{template:e.data.template,size:e.data.size,isHoveredOrFocused:a});case a$.MA.AgentResult:return n.createElement(AgentGridItem,{botUserId:e.data.agent?.appRef?.bot_user_id,index:e.data.idx});case a$.MA.AgentExchangeResult:return n.createElement(AgentExchangeGridItem,{agent:e.data.agent,isHoveredOrFocused:a});case a$.MA.SidekickResult:return n.createElement(SidekickGridItem,{botUserId:e.data.agent?.appRef?.bot_user_id,index:e.data.idx});default:return null}};renderExplorerCell.displayName="renderExplorerCell";let renderCell=(e,t)=>e?.tooltip?.text?n.createElement(tw.Ay,{tip:e?.tooltip?.text,position:e?.tooltip?.position},t):t;renderCell.displayName="renderCell";let ExplorerGridCell=({item:e,cellProps:t,width:a})=>{let r=(0,n.useCallback)((e,t,a)=>renderExplorerCell(e,t,a),[]),i=(0,n.useRef)(null),[l,s]=(0,n.useState)(!1),c=(0,n.useCallback)(e=>{i.current=e},[]),d=(0,n.useCallback)(()=>{s(!0)},[]),m=(0,n.useCallback)(()=>{s(!1)},[]),u=(0,n.useCallback)(e=>{e&&i.current?.({action:P.UiAction.CLICK,uiComponentName:P.UiComponentName.EXPLORER_RESULTS,...e??{}})},[]),p=(0,n.useCallback)(t=>{t.id=e.key,e.onListItemSelect?.(t),u(e?.autoClogProps)},[e,u]),h=(0,n.useCallback)(()=>{s(!0)},[]),_=(0,n.useCallback)(()=>{s(!0)},[]),f=(0,n.useCallback)(()=>{s(!1)},[]),b=(0,n.useCallback)(t=>{" "!==t.key&&"Enter"!==t.key||t.target===t.currentTarget&&(t.id=e.key,e.onListItemSelect?.(t),u(e?.autoClogProps))},[e,u]),{role:g,...y}=t,A=n.createElement(tV.A,{onFocusEnter:h,onFocusWithin:_,onFocusLeave:f},n.createElement("div",{...y,role:g,onClick:p,onKeyUp:b,className:"p-explorer_grid__cell","aria-label":e.ariaLabel,onMouseEnter:d,onMouseLeave:m},r(e,a,l)));return n.createElement(o.A,{trackClogRef:c},renderCell(e,A))};ExplorerGridCell.displayName="ExplorerGridCell";let aY=n.memo(ExplorerGridCell);var aQ=a(0x14e1f3005);let ExplorerExpandableGrid=({items:e,minColumnWidth:t=200,resultListAriaLabel:a,isExpanded:r=!1,ariaLabel:i})=>{let l=(0,n.useCallback)((t,a,r)=>{let i=e.find(e=>e.key===t);return n.createElement(aY,{key:t,item:i,cellProps:a,width:r})},[e]),o=(0,n.useMemo)(()=>e.map(e=>e.key),[e]);return n.createElement(aQ.A,{className:"p-explorer_grid",keys:o,renderCell:l,minColumnWidth:t,ariaLabel:i??a,isExpanded:r})};ExplorerExpandableGrid.displayName="ExplorerExpandableGrid";let ExplorerGrid=({items:e,minColumnWidth:t=200,resultListAriaLabel:a})=>{let r=(0,n.useCallback)((t,a,r)=>{let i=e.find(e=>e.key===t);return n.createElement(aY,{key:t,item:i,cellProps:a,width:r})},[e]),i=(0,n.useMemo)(()=>e.map(e=>e.key),[e]);return n.createElement(aQ.A,{className:"p-explorer_grid",keys:i,renderCell:r,minColumnWidth:t,ariaLabel:a})};ExplorerGrid.displayName="ExplorerGrid";let ExplorerHeroTitle=({title:e,content:t})=>n.createElement("div",{className:"p-explorer_hero__header"},n.createElement("div",{className:"p-explorer_hero__title"},e),n.createElement("div",{className:"p-explorer_hero__description"},t));ExplorerHeroTitle.displayName="ExplorerHeroTitle";var aZ=a(0xce378727);let aJ=new u.Ay("shortcuts_gallery"),aX={onClick:{enableClogAction:!0},elementName:"load more"},ExplorerLoadMoreButton=({isLoading:e=!1,onClick:t})=>n.createElement("div",{className:"p-explorer_pagination c-pagination_wrapper margin_top_50"},n.createElement(aZ.A,{className:"p-explorer_controls__button",loading:e,type:"outline",size:"medium",onClick:t,autoClogProps:aX,"aria-label":aJ.t("Load More")},aJ.t("Load More")));ExplorerLoadMoreButton.displayName="ExplorerLoadMoreButton";var a0=a(0x18f2150ea);let ExplorerSectionTitle=({title:e,isBold:t,ariaHeadingLevel:a,isUnifiedDirectories:r})=>{let i=(0,a0.A)(a)?{role:"heading","aria-level":a,"aria-label":e}:{};return n.createElement("div",{className:l()("p-explorer_section_title",{"is-bold":t,"p-explorer_section_title--unified-directory":r}),...i},e)};ExplorerSectionTitle.displayName="ExplorerSectionTitle";var a1=a(0xdd12ffd6),a2=a(0x339b339c);let a4={height:172},MemberCardSkeleton=()=>n.createElement("div",{className:"p-browse_page_member_card_entity p-browse_page_member_card_entity--skeleton"},n.createElement("div",{className:"p-browse_page_member_card_entity__avatar",style:a4}),n.createElement("div",{className:"p-browse_page_member_card_entity__info"},n.createElement(a2.A,null),n.createElement(a2.A,null)));MemberCardSkeleton.displayName="MemberCardSkeleton";let a5=[...Array(20).keys()].map(e=>e.toString()),PeopleGridSkeleton=()=>{let e=(0,n.useCallback)(e=>n.createElement(MemberCardSkeleton,{key:e}),[]);return n.createElement(aQ.A,{keys:a5,renderCell:e,minColumnWidth:166})};PeopleGridSkeleton.displayName="PeopleGridSkeleton";var a3=a(0x17afadb2a);let WorkflowTemplatesGridSkeleton=({cellCount:e})=>{let t=(0,n.useMemo)(()=>[...Array(e??20).keys()].map(e=>e.toString()),[e]),a=(0,n.useCallback)(e=>n.createElement("div",{key:e,className:"p-explorer_workflow_template_grid__cell p-explorer_workflow_template_grid__cell--disabled"},n.createElement("div",{className:"p-explorer_workflow_template_grid__cell__title_container"},n.createElement("div",{className:"p-explorer_workflow_template_grid__cell__title_container__image_container"},n.createElement(a3.A,{size:36})),n.createElement(a2.A,{size:"medium",className:"p-explorer_workflow_template_grid__cell__title_container__title"})),n.createElement(a2.A,{size:"large"})),[]);return n.createElement(aQ.A,{keys:t,renderCell:a,minColumnWidth:166,className:"margin_top_25"})};WorkflowTemplatesGridSkeleton.displayName="WorkflowTemplatesGridSkeleton";var a6=a(0x74a52d49);let ConnectableContactCard=({contactId:e})=>{let t=(0,r.wA)();return n.createElement("div",{className:"p-connectable_contact_card__container"},n.createElement(a6.A,{avatarSize:192,contactExternalId:e,buttonProps:{onClick:()=>{t((0,eD.o)((0,eF.Fo)({memberId:e,isConnectableContact:!0})))}}}))};ConnectableContactCard.displayName="ConnectableContactCard";var a8=a(0x13a454b51),a7=a(0x113614463),a9=a(0x1001c1606),ne=a(0xb3b64f1a),nt=a(0x1c14ee6d4),na=a(0x4ba2406),nn=a(0xaf83db61),nr=a(0x32b21afc),ni=a(0xede25000),nl=a(0x6f2cadda);let no=new u.Ay("slack_connect_hub_next"),ns={onClick:{enableClogAction:!0},elementName:"invite_to_workspace"},nc={onClick:{enableClogAction:!0},elementName:"invite_to_scdm"},ContactLookupIcon=()=>n.createElement("div",{className:"p-connectable_contact_empty_state__contact_lookup_icon"},n.createElement(h.Ah,{name:"channel-search"})),ExternalConnectionsConnectableContactNotOnSlack=({query:e,contact:t})=>{let a=(0,r.wA)(),[i,l]=(0,n.useState)(!1),s=(0,O.d4)(td.Yc),m=(0,tr.F1)(s),u=t?.external_id,h=(0,O.d4)(e=>(0,nr.Gy)(e,u,"im")),_=(0,O.d4)(e=>u&&(0,nr.ni)(e,u)),f=(0,O.d4)(a9.u),b=(0,n.useCallback)(()=>{u&&(l(!0),a((0,ni.A)({contactExternalId:u})).then(()=>{l(!1)}))},[a,u]),g=(0,n.useCallback)(()=>{let e=t?.email||"",n=(0,a8.xf)(e);return u&&a((0,nn.O7)({errorCode:void 0,contactId:u})),a((0,nl.ai)([new ne.l({result:{entity:{id:e,value:e,isEmail:n},key:e,label:e,value:e},isError:!n})])),a((0,na.A)({source:nt.K3.SlackConnectHubSearch}))},[t,u,a]),y=(0,n.useMemo)(()=>({title:n.createElement(n.Fragment,null,n.createElement(ContactLookupIcon,null),no.t("Looks like this person is a coworker")),description:n.createElement(n.Fragment,null,no.rt("Start a conversation by inviting them to join this workspace. If they\u2019re from an external organization, use <link>Slack Connect instead</link>. ",{},({text:e})=>{let t=h||!f,a=n.createElement(p.A,{"aria-disabled":t,className:"p-connectable_contact_empty_state__link_button",onClick:t?void 0:b,autoClogProps:nc},e,i?n.createElement(e6.A,{size:"small",inline:!0,className:"p-connectable_contact_empty_state__link_button_spinner"}):null);return h?n.createElement(tw.Ay,{tip:no.t("Invitation Sent")},a):f?a:n.createElement(tw.Ay,{tip:no.t("You don\u2019t have permission to start a DM with people outside your company.")},a)}),n.createElement("br",null),n.createElement(c.Ay,{type:"outline",onClick:_?void 0:g,disabled:!!_,autoClogProps:ns},_?no.t("Invitation Sent"):no.rt("Invite to Join {workspaceName}",{workspaceName:m}))),autoClogProps:{stepVariant:"coworker"}}),[m,b,h,_,f,i,g]),A=(0,n.useMemo)(()=>({title:n.createElement(n.Fragment,null,n.createElement(ContactLookupIcon,null),no.t("Invite this person to join Slack")),description:n.createElement(n.Fragment,null,no.rt("Looks like there\u2019s no Slack account for <strong>{email}</strong>. But you can still start a conversation with them.",{email:e}),n.createElement("br",null),n.createElement(a7.A,{contactExternalId:u})),autoClogProps:{stepVariant:"not_on_slack"}}),[u,e]),{autoClogProps:x,...E}=(0,n.useMemo)(()=>"internal"===t.classification?y:A,[t.classification,A,y]);return n.createElement(o.A,{uiStep:P.UiStep.CONNECTABLE_CONTACTS_SEARCH_RESULT,clogImpression:!0,...x},n.createElement(d.A,{...E,className:"p-connectable_contact_empty_state__contact_lookup"}))};ExternalConnectionsConnectableContactNotOnSlack.displayName="ExternalConnectionsConnectableContactNotOnSlack";var nd=a(0x1e98b1aaf),nm=a(0x19e907f3f);let nu=new u.Ay("slack_connect"),ExternalOrganization=({teamId:e,channelCount:t,className:a,containerHasFocus:r})=>{let i=(0,O.d4)(t=>(0,td._J)(t,e));return n.createElement("div",{className:l()("p-external_organization__container",a)},n.createElement(nm.o,{id:e,team:i,subtext:nu.t("{channelCount, plural, =1 {# conversation} other {# conversations}}",{channelCount:t}),className:l()("p-external_organization",{"p-external_organization--focused":r})}))};ExternalOrganization.displayName="ExternalOrganization";var np=a(0x22f5cc45d),nh=a(0x410829f8),n_=a(0x113cdbbd7),nf=a(0x138186673),nb=a(0xa361c357),ng=a(0x1991a9b6d),ny=a(0xca4f3cec),nA=a(0x170214077),nx=a(0xbef42b3),nE=a(0x21d6ed371),nC=a(0x1b0a362c3),nk=a(0x15c7516a2),nv=a(0x105ecbbed),nS=a(0x1fd31879f),nI=a.n(nS);let nw=new u.Ay("ai_apps"),AiAppHistoryItem=({message:e,isUnread:t,className:a,currentUserId:r})=>{let{getSecondaryView:i}=(0,n.useContext)(eU.A),o=(0,O.d4)(i),s=(0,n.useMemo)(()=>{if(o?.id!=="thread"||!o?.params?.threadId)return!1;let{channelId:t,threadTs:a}=(0,nv.Sb)(o?.params?.threadId);return e.channel===t&&(a===(0,nk.j)(e)||a===(0,nC.L)(e))},[e,o?.id,o?.params?.threadId]),c=(0,n.useMemo)(()=>(0,nE.qL)(e)?null:n.createElement(ny.A,{msg:e,hideAppBadge:!0}),[e]),d=(0,n.useMemo)(()=>{let t=(0,nE.qL)(e)&&r&&e.reply_users?.includes(r)?{...e,user:r}:e;return n.createElement(nb.A,{msg:t,size:36,isInteractive:!1})},[r,e]),m=(0,n.useMemo)(()=>{if(e.blocks?.length){let t=n.createElement(ng.A,{inline:!0,msg:e,blockLimit:5,blocksContainerContext:n_.pi.ai_app});return(0,nE.qL)(e)?n.createElement("div",{className:nI().historyListItemTitleV2Single},t):t}return e.assistant_app_thread?.title?.length?e.assistant_app_thread?.title:e.text?n.createElement(nx.E,{msg:e}):(e.attachments?.length??0)>0?null:nw.t("New chat")},[e]),u=(0,n.useMemo)(()=>(e.attachments?.length??0)>0?n.createElement(nf.A,{msg:e}):null,[e]),p=(0,n.useMemo)(()=>e.is_ephemeral?n.createElement("div",{className:nI().historyListItemLabel},n.createElement("div",{className:nI().historyListItemLabelIcon},n.createElement(h.Ah,{name:"eye-open-filled",inline:!0})),n.createElement("div",{className:nI().historyListItemLabelText},nw.t("Only visible to you"))):null,[e.is_ephemeral]);return n.createElement("div",{className:nI().historyListItemContainer},n.createElement("div",{className:l()(a,nI().historyListItemV2,"c-message_kit__pillow","c-message_kit__message",{[nI().historyListItemV2Active]:s})},p,n.createElement("div",{className:l()(nI().historyListItemInner,"c-message_kit__gutter")},n.createElement("div",{className:l()(nI().historyListItemIcon,"c-message_kit__gutter__left")},d),n.createElement("div",{className:l()(nI().historyListItemInfo,"c-message_kit__gutter__right")},c?n.createElement("div",{className:nI().historyListItemSender},c):null,n.createElement("div",{className:nI().historyListItemTitleV2},m,u),n.createElement("div",{className:nI().historyListItemSubtitle},n.createElement(nA.A,{msg:e,clickable:!1,full:!0}))),t?n.createElement("div",{className:nI().historyListItemBadge},n.createElement(nh.Gm,{count:1,className:nI().mentions,style:nh.rY.red})):null)))};AiAppHistoryItem.displayName="AiAppHistoryItem";var nT=a(0x1d5f57074),nN=a(0xa089d16d),nM=a(0x3e7ced97),nR=a.n(nM);let nP=new u.Ay("explorer_link"),nL={name:"new-window",size:"18"},nO={name:"info",size:"18"},LinkEntity=({iconUrl:e,title:t,url:a,listPosition:i})=>{let l=(0,r.wA)(),[o,s]=(0,n.useState)(!1),c=(0,nT.Ay)(a),d=t??c.hostname,m=t?c.hostname:c.pathname+c.search,u=(0,n.useCallback)(()=>{s(!0)},[]),p=(0,n.useCallback)(()=>{s(!1)},[]),_=(0,n.useCallback)(()=>n.createElement(h.Ah,{name:"link",inline:!0,size:"20"}),[]),f=(0,n.useCallback)(()=>e?n.createElement(nN.A,{className:nR().icon,alt:d,src:e,renderError:_}):_(),[e,d,_]),b=(0,n.useCallback)(t=>{t.stopPropagation(),l((0,eD.o)((0,eF.M4)({url:a,title:d,iconUrl:e})))},[l,e,d,a]),A=(0,n.useMemo)(()=>n.createElement(eM.A,null,n.createElement(eN.A,{"aria-label":nP.t("Open in browser"),tooltipLabel:nP.t("Open in browser"),isMenuTrigger:!0,svgIconProps:nL,onClick:g.A,href:a,buttonSize:"small"}),n.createElement(eN.A,{"aria-label":nP.t("View link details",{fallbackHash:"dc3decbb93847518f1a049dcf49d0d7c6560bcc6",fallbackHashNs:"lists"}),tooltipLabel:nP.t("View link details",{fallbackHash:"dc3decbb93847518f1a049dcf49d0d7c6560bcc6",fallbackHashNs:"lists"}),isMenuTrigger:!0,svgIconProps:nO,onClick:b,buttonSize:"small"})),[b,a]);return n.createElement(e_.j7,{size:y.S.compact,entityState:y.w.enabled,isFullWidth:!0,renderedInListVariant:i,isRemovable:!1,actionsBar:A},n.createElement("div",{className:nR().contents,onMouseEnter:u,onMouseLeave:p},n.createElement(eg.A,{entityState:y.w.enabled},f()),n.createElement(eb.A,{size:y.S.compact,entityState:y.w.enabled,primaryLabel:d,secondaryLabel:o?nP.t("Open in browser"):m})))};LinkEntity.displayName="LinkEntity";var nD=a(0x1f2e34d8),nF=a(0xd3ba253f),nU=a.n(nF);let nB=new u.Ay("lists"),ListTemplateExplorerItem=({className:e,template:t})=>n.createElement("div",{className:l()(nU().container,e)},n.createElement("div",{className:nU().iconContainer},n.createElement(nD.A,{iconClassName:nU().icon})),n.createElement("div",{className:nU().contentContainer},n.createElement("div",{className:nU().header},n.createElement("span",null,t.name),n.createElement("span",{className:nU().templateBadge},nB.t("Template"))),n.createElement("div",{className:nU().subtitle},nB.t("By Slack"))));ListTemplateExplorerItem.displayName="ListTemplateExplorerItem";var nH=a(0x1feae9b59),nW=a(0x2131b1b15),nV=a(0x9975e525),nG=a(0xf3d89ff5);let nq=a(0x6f11930a).A,nj=new u.Ay("shortcuts_gallery"),AccessDeniedWorkflowItem=({containerHasFocus:e,className:t,title:a})=>{let r=nj.t("Private workflow");return n.createElement("div",{className:l()(t,"p-search_workflows_container"),"data-qa":"search_workflows_empty_item"},n.createElement("div",{className:l()("p-search_workflows_item",{"p-search_workflows_item--focused":e})},n.createElement("div",{className:"p-search_workflows_items-empty-workflow-icon"},n.createElement(h.Ah,{name:"lock",size:"20"})),n.createElement("div",{className:"p-search_workflows_item-information"},n.createElement("div",{className:"p-search_workflows_item-information--name"},n.createElement(er.A,{lines:1,withTooltip:!0},a??r)),n.createElement("div",{className:"p-search_workflows_item-information--description"},n.createElement(er.A,{lines:1},nj.t("Only certain people can use this workflow"))))))};AccessDeniedWorkflowItem.displayName="AccessDeniedWorkflowItem";var nz=a(0x21c71bcdd),nK=a(0x178ee06e3),n$=a(0x1dc84ebc7),nY=a(0x133aaa7da),nQ=a(0xcaea2334),nZ=a(0xe229417d),nJ=a(0x10027d8bc),nX=a(0x16b633db0),n0=a(0x18d25e0ba),n1=a(0xe9d14940),n2=a(0x1e4cdb49d);let n4=new u.Ay("slackbot-ai"),n5="delete_automation",SlackbotAutomationMoreActionsMenu=({automationInfo:e,menuProps:t})=>{let a=[(({automationInfo:e})=>{let t=(0,r.wA)(),a=(0,O.d4)(aG.WR),i=(0,O.d4)(nQ.I),l=(0,O.d4)(nJ.J4),{triggerId:o,workflowId:s}=e,c=e.appCollaborators?.includes(a),d=(0,n.useCallback)(e=>{e.stopPropagation(),t((0,nZ.S)({variant:"automation",onConfirm:async()=>{o&&await t((0,nX.o)({triggerId:o,reason:"slackbot-automation-item-delete"})),s&&(await t((0,n1.L)({workflowId:s,reason:"slackbot-automation-item-delete"})),t((0,n0.s)({workflowId:s}))),t((0,n2.r)())}}))},[t,o,s]);return{key:n5,dataQa:n5,danger:!0,label:l?n4.t("Delete automation"):"Delete automation",click:d,show:!!s&&i&&!!c&&(!o||!!e?.isWorkflowApp),type:nY.A.default}})({automationInfo:e})].filter(e=>e.show);return n.createElement(ei.a,{template:a,...t})};SlackbotAutomationMoreActionsMenu.displayName="SlackbotAutomationMoreActionsMenu";var n3=a(0x22f6a086f),n6=a(0x18fcd8e2a);let n8=new u.Ay("slackbot-ai"),n7={location:"search"},SlackbotAutomationItem=({triggerId:e,automationId:t,className:a,slackbotAutomationItemClassName:r,showUnpublished:i,containerHasFocus:o,hermesLinkTriggerUIContext:s=n7})=>{let[c,d]=(0,n.useState)(!1),m=(0,O.d4)(nJ.J4),u=(0,O.d4)(t=>(0,n3.bn)(t,{triggerId:e})),p=(0,O.d4)(e=>t?(0,n6.g)(e,t):u?.workflow?.workflow_id?(0,n6.g)(e,u.workflow.workflow_id):void 0),_=u||p?(0,n$.j)({trigger:u,workflow:p}):null,f=i&&!_?.isWorkflowPublished&&_?.isWorkflowPublished!==void 0,b=m?n8.t("More actions"):"More actions",g=(0,n.useMemo)(()=>[{key:"slackbot-automation-more-menu-action",tooltip:b,ariaLabel:b,dataQa:"slackbot-automation-more-menu-action",dataId:"slackbot-automation-more-menu-action",onMenuTriggerClick:()=>{d(!0)},menuProps:{renderMenu:e=>_?n.createElement(SlackbotAutomationMoreActionsMenu,{automationInfo:_,hermesLinkTriggerUIContext:s,menuProps:e}):null,children:[],onPopoverOpen:()=>{d(!0)},onPopoverClose:()=>{d(!1)},onMenuItemSelected:()=>{d(!1)}},svgIconProps:{name:"ellipsis-vertical-filled"}}],[b,_,s]);if(!_)return null;let{title:y,description:A}=_,x=(0,nK.ar)(_);return n.createElement("div",{className:l()("p-search_workflows_container",a),"data-qa":"slackbot_automation_item"},n.createElement("div",{className:l()("p-search_workflows_item",r,{"p-search_workflows_item--focused":o})},n.createElement("div",{className:"p-search_workflows_slackbot_automation_item_icon"},n.createElement(h.Ah,{name:"ai-workflow"})),n.createElement("div",{className:"p-search_workflows_item-information"},n.createElement("div",{className:"p-search_workflows_item-information--header"},n.createElement("div",{className:"p-search_workflows_item-information--name"},n.createElement(er.A,{lines:1,withTooltip:!0},y),f?n.createElement("span",{className:"p-search_workflows_item-information--unpublished_badge"},m?n8.t("UNPUBLISHED"):"UNPUBLISHED"):null)),n.createElement("div",{className:"p-search_workflows_item-information--description"},x&&n.createElement(nK.WL,{shortcutInfo:_,shouldTruncate:!1,showDefaultMessagePostedSummary:!0}),!x&&A)),n.createElement("div",{className:"p-search_workflows_items-actions"},g.length>0&&n.createElement(nz.A,{className:"p-search_workflows_items-actions--actions_menu",items:g,isFocused:c,showOnlyOnHover:!0}))))};SlackbotAutomationItem.displayName="SlackbotAutomationItem";var n9=a(0x16dc59f6a),re=a(0x1e4b6e4e6),rt=a(0x58199183),ra=a(0x2376ea9bb),rn=a(0x7a2a96da),rr=a(0x1eea27034),ri=a(0x1233bbbe9),rl=a(0x2961a179);let ro=new u.Ay("shortcuts_gallery"),rs=n.memo(({workflowEvents:e})=>{let t=0,a=0,r=0,i=0;return e&&e.forEach(e=>{switch(e.workflow_instance_status){case"SUCCESS":i+=1;break;case"ERROR":r+=1;break;case"PENDING":t+=1;break;case"PENDING_USER_ACTION":a+=1}}),n.createElement("div",null,i>0&&n.createElement("div",null,n.createElement("span",{className:"p-search_workflows_item-information__workflow-action-list-item p-search_workflows_item-information__workflow-action-list-item--green"},n.createElement(h.Ah,{name:"status-member-filled",size:"16",inline:!0})),ro.t("{count} completed",{count:i})),t>0&&n.createElement("div",null,n.createElement("span",{className:"p-search_workflows_item-information__workflow-action-list-item p-search_workflows_item-information__workflow-action-list-item--green"},n.createElement(h.Ah,{name:"status-member-filled",size:"16",inline:!0})),ro.t("{count} processing",{count:t})),r>0&&n.createElement("div",null,n.createElement("span",{className:"p-search_workflows_item-information__workflow-action-list-item p-search_workflows_item-information__workflow-action-list-item--red"},n.createElement(h.Ah,{name:"status-member-filled",size:"16",inline:!0})),ro.t("{count} failed",{count:r})),a>0&&n.createElement("div",null,n.createElement("span",{className:"p-search_workflows_item-information__workflow-action-list-item p-search_workflows_item-information__workflow-action-list-item--yellow"},n.createElement(h.Ah,{name:"status-member-filled",size:"16",inline:!0})),ro.t("{count} waiting for response",{count:a})))});var rc=a(0x2a037c8a),rd=a(0xf5bbd10a),rm=a(0x16a0c3257),ru=a(0x1bb9b9e21),rp=a(0x145d46a61),rh=a(0xcaa08ff7),r_=a(0xdb0578c7),rf=a(0x17e2f11b6);let rb=new u.Ay("shortcuts_gallery"),rg={location:"search"},WorkflowItem=({className:e,triggerId:t,workflowId:a,uiPage:i,containerHasFocus:o,showUnpublished:s=!1,showUnpublishOptionIfAllowed:c=!1,overridePrimaryAction:d,workflowEvents:m,completionStatus:u,workflowItemClassName:p,hermesLinkTriggerUIContext:_=rg,isFeaturedWorkflow:f,isDisabled:b=!1,collectionType:g,isPreview:y=!1,shouldUseTriggerPreview:A=!1})=>{let x=(0,rd.A)(),E=(0,r.wA)(),C=(0,O.d4)(rp.Lh),k=(0,O.d4)(aT.S6),v=(0,rm.Zx)({triggerId:t}),[S,I]=(0,n.useState)(!1),w=(0,O.d4)(e=>{if(t)return A?(0,rf.x)(e,{triggerId:t}):(0,n3.bn)(e,{triggerId:t})}),T=(0,O.d4)(e=>{if(!A)return a?(0,n6.g)(e,a):w?.workflow?.workflow_id?(0,n6.g)(e,w.workflow.workflow_id):void 0}),N=(0,n$.j)({trigger:w,workflow:T}),M=(0,O.d4)(e=>(0,ru.X)(e,T)),{title:R,description:D,triggerType:F,isWorkflowPublished:U,botUserId:B}=N,H=(0,O.d4)(e=>(0,rh.mF)(e,B)),W=(0,rl.p)({hermesLinkTriggerUIContext:_,shortcutInfo:N});if(!t&&!a)return x.warn("At least one of triggerId or workflowId is required"),null;if(!N)return null;let openEditWorkflow=(e,t=!1)=>{e?.stopPropagation(),E((0,r_.A)({source:"workflow-card",route:{routeTo:re.E9.EDIT_WORKFLOW,workflowId:T?.id||w?.workflow?.workflow_id||N.workflowId||""},forceOpenInNewWindow:t}))},V=s&&!N.isWorkflowPublished,G=F===rc.M.Shortcut&&!V,renderMoreMenu=e=>n.createElement(rr.A,{shortcutInfo:N,hermesLinkTriggerUIContext:_,menuProps:e,showUnpublished:s,showUnpublishOptionIfAllowed:c,isFeaturedWorkflow:f,uiPage:i,collectionType:g});renderMoreMenu.displayName="renderMoreMenu";let q=C?rb.t("Edit workflow"):rb.t("Edit workflow in Workflow Builder");function isNotNull(e){return null!==e}let j=[!W||!C||!(0,L.M2)()?null:{key:"workflows-gallery-open-new-window",tooltip:rb.t("Open workflow in new window"),ariaLabel:rb.t("Open workflow in new window"),dataQa:"workflows-gallery-open-new-window",dataId:"workflows-gallery-open-new-window",onClick:e=>openEditWorkflow(e,!0),svgIconProps:{name:"open-in-window"},show:C},"none"===d?null:"edit"===d||V?{key:"workflows-gallery-edit-action",tooltip:q,ariaLabel:q,dataQa:"workflows-gallery-edit-action",dataId:"workflows-gallery-edit-action",onClick:openEditWorkflow,svgIconProps:{name:"edit"},show:!0}:G?{key:"workflows-gallery-run-action",tooltip:rb.t("Start workflow"),ariaLabel:rb.t("Start workflow"),dataQa:"workflows-gallery-run-action",dataId:"workflows-gallery-run-action",onClick:e=>{e?.stopPropagation(),E((0,ri.A)({shortcutInfo:N,hermesLinkTriggerUIContext:_,uiPage:i}))},svgIconProps:{name:"play"},show:!0,showSpinner:v,autoClogProps:{eventId:P.EventId.WORKFLOW_START_CLICK,elementType:P.ElementType.BUTTON,elementName:f?"featured_workflows":"workflows",appId:N.appId,workflowTriggerId:N.triggerId,workflowId:N.workflowId,onClick:{enableClogAction:!0},channelId:_?.location==="bookmark"?_.channelId:void 0}}:null,{key:"workflows-gallery-more-menu-action",tooltip:rb.t("More actions"),ariaLabel:rb.t("More actions"),dataQa:"workflows-gallery-more-menu-action",dataId:"workflows-gallery-more-menu-action",onMenuTriggerClick:()=>{I(!0)},menuProps:{renderMenu:renderMoreMenu,children:[],onPopoverOpen:()=>{I(!0)},onPopoverClose:()=>{I(!1)},onMenuItemSelected:()=>{I(!1)}},svgIconProps:{name:"ellipsis-vertical-filled"},show:!y}].filter(isNotNull).filter(e=>e.show),z=j.map(e=>({...e,isDisabled:!0})),K=(0,nK.ar)(N),$=s&&!U&&void 0!==U,Y=k&&m&&m.length>0;return n.createElement("div",{className:l()("p-search_workflows_container",e),"data-qa":"search_workflows_item"},n.createElement("div",{className:l()("p-search_workflows_item",p,{"p-search_workflows_item--focused":o,"p-search_workflows_item--events":Y,"p-search_workflows_item--disabled":b})},n.createElement(rn.A,{shortcutInfo:N,size:36,className:"p-search_workflows_item-icon"}),n.createElement("div",{className:"p-search_workflows_item-information"},n.createElement("div",{className:"p-search_workflows_item-information--header"},n.createElement("div",{className:"p-search_workflows_item-information--name"},n.createElement(er.A,{lines:1,withTooltip:!0},R),M?n.createElement("span",{className:"normal margin_left_50 inline_flex align_items_center sk_secondary_foreground"},n.createElement(ra.A,{id:M,className:"margin_right_25",size:16}),n.createElement(er.A,{lines:1},rb.rt("Part of {externalWorkspaceName}",{externalWorkspaceName:n.createElement(rt.A,{id:M,bold:!1})}))):null,$?n.createElement("span",{className:"p-search_workflows_item-information--unpublished_badge"},rb.t("UNPUBLISHED")):null),H&&n.createElement(n9.A,{forceBadge:!0,size:"20"})),n.createElement("div",{className:"p-search_workflows_item-information--description"},K&&n.createElement(nK.WL,{shortcutInfo:N,shouldTruncate:!1,showDefaultMessagePostedSummary:!0}),K&&D&&"\xa0\xb7\xa0",Y?n.createElement(rs,{workflowEvents:m}):n.createElement(er.A,{lines:1,breakWords:!1},n.createElement("span",null,"SUCCESS"===u&&n.createElement(n.Fragment,null,n.createElement("span",{className:"p-search_workflows_item-information--description--recently-completed"},n.createElement(h.Ah,{name:"check",inline:!0})," ",rb.t("Recently completed")),n.createElement("span",{className:"p-search_workflows_item-information--description--spacer-dot"})),"ERROR"===u&&n.createElement(n.Fragment,null,n.createElement("span",{className:"p-search_workflows_item-information--description--recently-failed"},n.createElement(h.Ah,{name:"warning",inline:!0})," ",rb.t("Recently failed")),n.createElement("span",{className:"p-search_workflows_item-information--description--spacer-dot"})),"CANCELED"===u&&n.createElement(n.Fragment,null,n.createElement("span",{className:"p-search_workflows_item-information--description--recently-canceled"},n.createElement(h.Ah,{name:"close",inline:!0})," ",rb.t("Canceled")),n.createElement("span",{className:"p-search_workflows_item-information--description--spacer-dot"})),D)))),n.createElement("div",{className:l()("p-search_workflows_items-actions",{"p-search_workflows_items-actions--events":Y})},j.length>0&&n.createElement(nz.A,{className:"p-search_workflows_items-actions--actions_menu",items:b?z:j,isFocused:S}))))};WorkflowItem.displayName="WorkflowItem";var ry=a(0x23619f41c),rA=a(0x24b75c723),rx=a(0x62a17882),rE=a(0x8c8bafa3);let rC=new u.Ay("channel_details"),YourWorkflowTemplateDeleteModal=({onConfirm:e})=>{let t=(0,r.wA)(),a=(0,n.useCallback)(()=>{t((0,aB.O)())},[t]),i=(0,n.useCallback)(()=>{e(),t((0,aB.O)())},[t,e]);return n.createElement(aD.A,{title:rC.rt("Delete this template?"),onSubmit:i,onClose:a},rC.rt("Are you sure you want to delete this template?"))};YourWorkflowTemplateDeleteModal.displayName="YourWorkflowTemplateDeleteModal";let rk=(0,W.Ay)("Opens the confirmation modal when you delete a workflow template",(e,t,a)=>{e((0,tc.q)({element:n.createElement(YourWorkflowTemplateDeleteModal,a),name:"delete-workflow-template-confirmation"}))});rk.meta={name:"openYourWorkflowTemplateDeleteModal",key:"createThunkOpenYourWorkflowTemplateDeleteModal",description:"Opens the confirmation modal when you delete a workflow template"};var rv=a(0x200e603aa),rS=a(0x3965535c),rI=a(0x1fa75c0ee),rw=a(0x182b853bf),rT=a(0x14633fe41),rN=a(0x1930f20c2),rM=a.n(rN);let rR=new u.Ay("shortcuts_gallery"),YourWorkflowTemplateItemActionsMenu=({templateId:e,templateState:t,isTemplateOpsWorkspace:a})=>{let i=(0,r.wA)(),l=(0,O.d4)(rp.dm),o=(0,O.d4)(rp.mh),[s,c]=(0,n.useState)(!1),d=(0,n.useCallback)(e=>e?.stopPropagation(),[]),m=(0,n.useCallback)(()=>{let e="permanent_browser_instance_your_workflow_templates";i((0,rT.q)({browserInstanceId:e})),i((0,rw.h)({browserInstanceId:e}))},[i]),u=l?rR.t("View template"):"View template",p=(0,n.useMemo)(()=>{let r=t===rA.Y.DRAFT,s=[rA.Y.DRAFT,rA.Y.PUBLISH_REQUESTED,rA.Y.PUBLISHED].includes(t),c=a&&t===rA.Y.PUBLISHED,d=n.createElement("div",{className:rM().editItem},n.createElement("div",null,rR.t("Edit template")),n.createElement("div",null,n.createElement(h.Ah,{name:"wrench"})));return[{key:"edit",dataQa:"edit",label:r?d:u,click:t=>{let a=(0,rx.cX)()?t.metaKey:t.ctrlKey,n={source:"your-workflow-templates",forceOpenInNewWindow:"button"in t&&1===t.button||"button"in t&&0===t.button&&a};o?n.route={routeTo:re.E9.V2_TEMPLATES,subPath:re.Ax.STEPS_EDITOR,templateId:e}:n.route={routeTo:re.E9.V2_TEMPLATES,subPath:re.Ax.EDITOR,templateId:e},i((0,r_.A)(n))},show:!0,type:nY.A.default},{key:"preview",dataQa:"preview",label:l?rR.t("Use template"):"Use template",click:()=>{i((0,rv.H)({templateId:e}))},show:!0,type:nY.A.default},{key:"separator-0",type:nY.A.separator,show:!0},{key:"delete",danger:!0,dataQa:"delete",label:rR.t("Delete"),click:()=>{i(rk({onConfirm:()=>{i((0,rS.W)({templateId:e,reason:"your-templates--delete"})).then(()=>{m()})}}))},show:s,type:nY.A.default},{key:"separator-1",type:nY.A.separator,show:s},{key:"help_center",dataQa:"help_center",label:rR.t("Help center"),href:`https://${(0,rE.qF)()}/help/articles/360035692513?utm_source=slack&utm_medium=prod&utm_campaign=hc`,show:!0},{key:"send_feedback",dataQa:"send_feedback",label:rR.t("Send feedback"),href:`https://${(0,rE.qF)()}/help/requests/new`,show:!0},{key:"separator-submit_to_be_featured",type:nY.A.separator,show:c},{key:"submit_to_be_featured",dataQa:"submit_to_be_featured",label:rR.t("Submit for review"),click:()=>{i((0,rI.T)({templateId:e,status:"ready_for_localization",reason:"your-templates--localize"})).then(()=>{m()})},show:c,type:nY.A.default,icon:n.createElement(h.Ah,{name:"slack-logo"})}]},[t,a,u,l,i,e,m,o]),_=(0,n.useCallback)(e=>n.createElement(ei.a,{template:p.filter(e=>e.show),...e}),[p]),f=(0,n.useMemo)(()=>[{key:"your-workflow-templates-more-menu-action",tooltip:rR.t("More actions"),ariaLabel:rR.t("More actions"),dataQa:"your-workflow-templates-more-menu-action",dataId:"your-workflow-templates-more-menu-action",onMenuTriggerClick:()=>{c(!0)},menuProps:{renderMenu:_,children:[],onPopoverOpen:()=>{c(!0)},onPopoverClose:()=>{c(!1)},onMenuItemSelected:()=>{c(!1)}},svgIconProps:{name:"ellipsis-vertical-filled",size:"18"},show:!0}],[_]);return n.createElement("div",{className:rM().actions,onClick:d,role:"presentation"},n.createElement(nz.A,{className:rM().actionsMenu,items:f,isFocused:s}))};YourWorkflowTemplateItemActionsMenu.displayName="YourWorkflowTemplateItemActionsMenu";var rP=a(0x1e367a230),rL=a(0x9b971e7e);let rO=new u.Ay("shortcuts_gallery"),YourWorkflowTemplateItem=({id:e,className:t,containerHasFocus:a})=>{let r=(0,O.d4)(rL.ZT),i=(0,O.d4)(t=>(0,tU.kn)(t,e)),{getTemplateRenderingStrategy:o}=useTemplateRenderingStrategyChecker(),s=(0,n.useMemo)(()=>(0,e4.GU)(i)?"advanced":o(i),[o,i]),c=(0,n.useMemo)(()=>!!r&&(0,rP.PW)(r),[r]),d=(0,n.useMemo)(()=>"advanced"===s?n.createElement("span",{className:l()(rM().unpublishedBadge,rM().advancedCategoryBadge)},rO.t("Advanced")):null,[s]),m=(0,n.useMemo)(()=>{let e,t=(0,tF.lw)(i);if(!t)return null;switch(t){case rA.Y.DRAFT:case rA.Y.READY_FOR_LOCALIZATION:e=rO.t("Private to Template Managers");break;case rA.Y.PUBLISH_REQUESTED:case rA.Y.STAGING:e=rO.t("In review");break;case rA.Y.PUBLISHED:e=rO.t("Published");break;case rA.Y.FEATURED:e=rO.t("Featured")}return n.createElement("span",{className:l()(rM().unpublishedBadge,{[rM().statusBadgeDraft]:t===rA.Y.DRAFT,[rM().statusBadgePublished]:[rA.Y.PUBLISHED,rA.Y.READY_FOR_LOCALIZATION].includes(t),[rM().statusBadgeInReview]:[rA.Y.PUBLISH_REQUESTED,rA.Y.STAGING].includes(t),[rM().statusBadgeFeatured]:t===rA.Y.FEATURED})},e)},[i]),u=(0,n.useMemo)(()=>{let e;if(!c)return null;let t=(0,tF.KZ)(i);if(!t)return null;switch(t){case rA.O.REQUESTED:e=rO.t("Translation Requested");break;case rA.O.IN_PROGRESS:e=rO.t("Translation In Progress");break;case rA.O.COMPLETED:e=rO.t("Translation Completed")}return e?n.createElement("span",{className:rM().unpublishedBadge},e):null},[i,c]);return(0,tF.Zx)(i)?null:n.createElement("div",{className:l()(rM().container,t),"data-qa":"search_your_workflow_template_item"},n.createElement("div",{className:l()(rM().item,{[rM().itemFocused]:a})},n.createElement(ry.A,{ariaHidden:!0,classes:rM().icon,image:(0,tF.xA)(i),size:36}),n.createElement("div",{className:rM().information},n.createElement("div",{className:rM().name},(0,tF.fo)(i),m,d,u),n.createElement("div",{className:rM().description},n.createElement(er.A,{lines:1,breakWords:!1},n.createElement("span",null,(0,tF.Uy)(i))))),n.createElement(YourWorkflowTemplateItemActionsMenu,{templateId:(0,tF.$7)(i),templateState:(0,tF.lw)(i)||"",isTemplateOpsWorkspace:c})))};YourWorkflowTemplateItem.displayName="YourWorkflowTemplateItem";var rD=a(0x18a31435e),rF=a(0x25354019b),rU=a(0x66306c2d),rB=a(0x243d57606),rH=a(0x21c50a68b),rW=a(0x10079cc7),rV=a(0x140422d4a),rG=a(0x41a56f6d),rq=a(0x91e15f37),rj=a(0x431513f8),rz=a(0x1e191b98a),rK=a(0x171b58d3d);let r$=(0,W.Ay)("dismiss synthetic view full page nux banner",e=>{e((0,tl.AZ)({pref:"seen_onboarding_synth_view_count_v2",value:rK.i}))});r$.meta={name:"dismissSyntheticViewFullPageNUXBanner",key:"createThunkDismissSyntheticViewFullPageNUXBanner",description:"dismiss synthetic view full page nux banner"};let rY=new u.Ay("trials_highlight_paid_features"),rQ={elementName:"start_trial",onClick:{enableClogAction:!0}},rZ={elementName:"see_upgrade_options",onClick:{enableClogAction:!0}},rJ={elementName:"create_canvas",onClick:{enableClogAction:!0}},CanvasPageEmptyStateFreemium=({isTeamOnTrial:e,renderLoadingSpinner:t,isModal:a=!1})=>{let i,l=(0,r.wA)(),s=rW.ZO.PaidFeatureTrial,d=rW.zG.Canvas,[m,u]=(0,n.useState)(!e),p=(0,O.d4)(e=>(0,rq.hq)(e,s,d)),_=(0,n.useCallback)(e=>{l((0,rV.A)({source:rG.P.CANVAS_PAGE_EMPTY_STATE_FREEMIUM,inTile:(0,L.Cz)(e)})),l(r$()),a&&l((0,aB.O)())},[l,a]),f=(0,n.useCallback)(()=>{l((0,rU.A)({uiComponentVariant:P.UiComponentVariant.CANVAS_PAGE_EMPTY_STATE}))},[l]);if((0,n.useEffect)(()=>{e||l((0,rj.A)({campaignType:s,campaignSubType:d,context:rz.y.canvasPageSyntheticView,reason:"canvas_page_synthetic_view"})).then(()=>{u(!1)})},[l,e,s,d]),m)return t();i=e?n.createElement(c.Ay,{autoClogProps:rJ,"data-qa":"canvas_page_empty_state_freemium_trial_cta",onClick:_},n.createElement("div",{className:"margin_right_25"},n.createElement(h.Ah,{name:"add-channel-canvas"})),rY.t("Create Canvas")):p?n.createElement(c.Ay,{autoClogProps:rQ,"data-qa":"canvas_page_empty_state_freemium_trial_eligible_cta",onClick:f},rY.t("Try It")):n.createElement(rD.A,{autoClogProps:rZ,"data-qa":"canvas_page_empty_state_freemium_trial_ineligible_cta",entryPoint:rF.b.CANVAS_PAGE_EMPTY_STATE,feature:rW.c4.UNLIMITED_CANVAS,type:"primary"},rY.t("See Upgrade Options"));let b=rY.t("Create unlimited canvases"),g=rY.t("Store and share the information that keeps your team moving, from quick notes to project briefs \u2014\xa0all without leaving Slack."),y=(0,rH.JK)();return n.createElement(o.A,{eventId:P.EventId.UPGRDEXP_HIGHLIGHT_PAID_FEATURES,clogImpression:!0,uiComponentName:P.UiComponentName.CANVAS_PAGE_EMPTY_STATE_FREEMIUM,uiComponentVariant:p?P.UiComponentVariant.TRIAL_ELIGIBLE:P.UiComponentVariant.TRIAL_INELIGIBLE},n.createElement("div",{className:"p-canvas_page_empty_state_freemium"},n.createElement("div",{className:"p-canvas_page_empty_state_freemium__content"},n.createElement("div",{className:"p-canvas_page_empty_state_freemium__video_container"},n.createElement("div",{className:"p-canvas_page_empty_state_freemium__video"},n.createElement("iframe",{className:"responsive_youtube_iframe",src:`https://www.youtube.com/embed/${{"de-DE":"8DntJAVgcSA","en-US":"dVpS9CAMWyk","en-GB":"N4SFKBwKhsw","es-ES":"KVsWVvhWRN4","es-LA":"O3zRaZWKACo","fr-FR":"_rKfzmSgMM8","it-IT":"TfsrCRiduJ8","pt-BR":"YKrT78a1HQs","ja-JP":"n4KdslB1dq0","ko-KR":"nSMoowZvD6k","zh-CN":"nv_58hH5-vg","zh-TW":"CO5_aTbNI-4"}[y]}`,title:rY.t("Introducing canvas | A new surface to share and organize knowledge | Slack"),allowFullScreen:!0}))),n.createElement("div",{className:"p-canvas_page_empty_state_freemium__heading"},b,n.createElement(rB.a,{featurePlan:"std",className:"p-canvas_page_empty_state_freemium__pro_badge"})),n.createElement("div",{className:"p-canvas_page_empty_state_freemium__body"},g),i)))};CanvasPageEmptyStateFreemium.displayName="CanvasPageEmptyStateFreemium";var rX=a(0xd11e61a5),r0=a(0x2af5332d),r1=a(0x1b81e2549),r2=a(0x118e9b326);let DraggableExplorerFile=e=>{let{fileId:t,bookmark:a,...r}=e,i=(0,O.d4)(e=>(0,tE.Lp)(e,t)),o=(0,tn.DQ)(i)||(0,tn.l7)(i),[,s]=(0,r1.i)({item:()=>({fileId:t,fileTitle:i?.title,filePermalink:i?.permalink,type:r2.M.FOLDER_FILE_BOOKMARK,isExternalFile:!o,bookmark:a}),type:r2.M.FOLDER_FILE_BOOKMARK});return n.createElement("div",{ref:s},n.createElement(np.A,{fileId:t,...r,className:l()("p-contextual_file--draggable",r.className)}))};DraggableExplorerFile.displayName="DraggableExplorerFile";let DraggableExplorerLink=e=>{let{url:t,title:a}=e,[,r]=(0,r1.i)({item:()=>({url:t,linkText:a,type:r2.M.FOLDER_LINK_BOOKMARK}),type:r2.M.FOLDER_LINK_BOOKMARK});return n.createElement("div",{ref:r},n.createElement(LinkEntity,e))};DraggableExplorerLink.displayName="DraggableExplorerLink";var r4=a(0x209fb16e4),r5=a(0x15e23c874),r3=a(0x1d06e350e),r6=a(0x25329bb92);let renderExplorerRow=(e,{fragments:t,hasFocus:a,hasFocusWithin:r,getChannelHasNonUniqueName:i,resultListAriaLabel:u,secondaryViewType:p})=>{switch(e.type){case a$.MA.Actions:return n.createElement(ExplorerActions,{actions:e.data.actions});case a$.MA.Alert:return n.createElement(s.Ay,e.data);case a$.MA.AlertV2:return n.createElement(rX.A,e.data);case a$.MA.WorkflowTemplates:return n.createElement(ExplorerActionsWorkflowTemplates,{templateIds:e.data.templateIds,onSelect:e.data.onSelect,tooltip:e.tooltip,isCardView:e.data?.isCardView});case a$.MA.DraggableFileResult:return n.createElement(DraggableExplorerFile,{fileId:e.data.fileId,filePropertyOverride:e.data.filePropertyOverride,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),containerHasFocus:a,forceClickStyles:!0,channelId:e.data.channelId});case a$.MA.FileResult:return n.createElement(np.A,{fileId:e.data.fileId,filePropertyOverride:e.data.filePropertyOverride,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),containerHasFocus:a,forceClickStyles:!0,channelId:e.data.channelId});case a$.MA.ExternalSearchResult:return n.createElement(nG.Y,{searchView:e.data.searchView,connector:e.data.connector,record:e.data.item,index:e.data.index,isFirst:e.data.isFirst,isLast:e.data.isLast,isInView:!0});case a$.MA.UnifiedFileResult:case a$.MA.CanvasResult:return n.createElement(np.A,{fileId:e.data.fileId,filePropertyOverride:e.data.filePropertyOverride,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast,"p-explorer_result--list--notification":e.data.notificationCount>0,"p-explorer_result--list--active":e.data.isActiveItem||!1}),forceClickStyles:!0,excludeTime:!0,allowLiveTitle:!1,useListStyling:!0,includeDeleteAction:!0,includeExternalLinkAction:!1,includeViewFileDetailsAction:!0,hideActionText:!0,hasNotification:e.data.notificationCount>0,detailType:e.data.detailType,showActions:!e.data.showCanvasModalMetadata,detailTextOverride:getDetailTextOverride({fileId:e.data.fileId,detailType:e.data.detailType,notificationCount:e.data.notificationCount,createdByUserId:e.data.createdByUserId}),fromCanvasOrganization:e.data.fromOrganization,containerHasFocus:a,showCanvasIa4Metadata:!0,showCanvasModalMetadata:e.data.showCanvasModalMetadata||!1,showSearchJustification:e.data.isSearchApplied||!1,showMoreListBrowserActions:e.type===a$.MA.UnifiedFileResult,disabledReason:e.data.disabledReason||void 0});case a$.MA.ListResult:return n.createElement(np.A,{className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast,"p-explorer_result--list--active":e.data.isActiveItem,"p-browse_lists_view__list_row":e.data.showFileMetadataAvatarStack}),fileId:e.data.list.id,forceClickStyles:!0,excludeTime:!0,allowLiveTitle:!1,useListStyling:!0,includeViewFileDetailsAction:!1,includeExternalLinkAction:!1,showMoreListBrowserActions:!0,hideActionText:!0,showActions:e.data.showActions,containerHasFocus:a,showCanvasIa4Metadata:e.data.showFileMetadataAvatarStack,detailTextOverride:getDetailTextOverride({fileId:e.data.list.id,detailType:e.data.sort===r3.QX.RECENTLY_VIEWED?eh.s.LAST_VIEWED:eh.s.LAST_UPDATED,createdByUserId:e.data.createdByUserId}),fromCanvasOrganization:e.data.fromOrganization});case a$.MA.ListTemplateResult:return n.createElement(ListTemplateExplorerItem,{className:l()("p-explorer_result--list",{"p-explorer_result--list--active":e.data.isActiveItem}),template:e.data.template});case a$.MA.ExternalOrganizationResult:return n.createElement(ExternalOrganization,{teamId:e.data.teamId,channelCount:e.data.channelCount,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),containerHasFocus:a});case a$.MA.ExternalConnectionsCta:return n.createElement(nd.P,{type:e.data.type,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast})});case a$.MA.DraggableLink:return n.createElement(DraggableExplorerLink,{iconUrl:e.data.iconUrl,title:e.data.title,url:e.data.url,listPosition:e.data.listPosition});case a$.MA.Link:return n.createElement(LinkEntity,{iconUrl:e.data.iconUrl,title:e.data.title,url:e.data.url,listPosition:e.data.listPosition});case a$.MA.PinnedItem:return n.createElement("div",{className:l()("p-explorer_result--list","p-explorer_result--list--first","p-explorer_result--list--last",{"p-explorer_result__pinned_item":!e.data.isPreview,"p-explorer_result__pinned_item--preview":e.data.isPreview})},n.createElement(nW.A,{pin:e.data.pinnedItem}));case a$.MA.ConnectableContactEmptyState:return n.createElement(ExternalConnectionsConnectableContactNotOnSlack,{contact:e.data.contact,query:e.data.query});case a$.MA.ExternalConnectionsConnectableContact:return n.createElement(ConnectableContactCard,{contactId:e.data.contact.external_id});case a$.MA.Workflows:return n.createElement(WorkflowItem,{triggerId:e.data.triggerId,workflowId:e.data.workflowId,hermesLinkTriggerUIContext:e.data?.hermesLinkTriggerUIContext,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),uiPage:e.data.uiPage,isFeaturedWorkflow:e.data?.isFeaturedWorkflow,containerHasFocus:a||r,showUnpublished:e.data?.showUnpublished,showUnpublishOptionIfAllowed:e.data?.showUnpublishOptionIfAllowed,overridePrimaryAction:e.data?.overridePrimaryAction,workflowEvents:e.data?.workflowEvents,completionStatus:e.data?.completionStatus,isDisabled:e.data?.isDisabled,collectionType:e.data?.collectionType,isPreview:e.data?.isPreview,shouldUseTriggerPreview:e.data?.shouldUseTriggerPreview});case a$.MA.SlackbotAutomation:return n.createElement(SlackbotAutomationItem,{triggerId:e.data.triggerId,automationId:e.data.workflowId,hermesLinkTriggerUIContext:e.data?.hermesLinkTriggerUIContext,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),uiPage:e.data.uiPage,showUnpublished:e.data?.showUnpublished,containerHasFocus:a||r,slackbotAutomationItemClassName:e.data?.slackbotAutomationItemClassName});case a$.MA.AccessDeniedWorkflow:return n.createElement(AccessDeniedWorkflowItem,{className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),title:e.data.title});case a$.MA.YourWorkflowTemplate:return n.createElement(YourWorkflowTemplateItem,{id:e.data.id,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),containerHasFocus:a||r});case a$.MA.CustomSolutionTemplate:return n.createElement(SolutionTemplateEntityCompact,{id:e.data.template.id,isFirst:e.data.isFirst,isLast:e.data.isLast});case a$.MA.InfinitePagination:return n.createElement(ExplorerLoadMoreButton,{onClick:e.data.onLoadMore,isLoading:e.data.isLoading});case a$.MA.UserGroupResult:return n.createElement(eJ,{id:e.data.userGroupId,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast})});case a$.MA.ChannelResult:return n.createElement(nV.A,{channelId:e.data.channelId,channelPropertyOverride:e.data.channelPropertyOverride,memberCount:e.data.memberCount,shouldFetchMemberCount:e.data.shouldFetchMemberCount,justification:e.data?.justification,previousName:e.data?.previousName,onClickLeave:e.data.onClickLeave,onClickJoin:e.data.onClickJoin,iid:e.data.iid,index:e.data.index,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast}),containerHasFocus:a,channelHasNonUniqueName:i(e.data.channelId),showOpenInHomeButton:e.data.showOpenInHomeButton,showTeam:e.data.showTeam});case a$.MA.Pagination:return n.createElement("div",{className:"margin_top_100 margin_bottom_100"},n.createElement(m.A,{wrapperClassName:"p-explorer_pagination",page:e.data.currentPage,totalPageCount:e.data.pageCount,onPageSelect:e.data.onPageSelect}));case a$.MA.SectionLabel:return n.createElement("div",{className:l()("p-explorer_section",{"p-explorer_section--first":e.data.isFirst,"p-explorer_sections--actions":e.data?.secondaryActions,[`${e.data.className}`]:e.data.className})},n.createElement("div",{className:l()("p-explorer_sections--title-container",{[`${e.data.titleContainerClassName}`]:e.data.titleContainerClassName})},n.createElement("div",{className:l()("p-explorer_sections--title",{[`${e.data.titleClassName}`]:e.data.titleClassName})},n.createElement("span",{className:l()("p-explorer_sections--title-label",{[`${e.data.titleLabelClassName}`]:e.data.titleLabelClassName})},e.data.title),e.data?.titleActions&&n.createElement("div",{className:l()("p-explorer_sections--title-actions",{[`${e.data.titleActionsClassName}`]:e.data.titleActionsClassName})},e.data.titleActions)),e.data.subtitle&&n.createElement("div",{className:"p-explorer_sections--subtitle"},e.data.subtitle)),e.data?.secondaryActions&&n.createElement("div",{className:l()("p-explorer_sections--actions",{[`${e.data.secondaryActionsClassName}`]:e.data.secondaryActionsClassName})},e.data.secondaryActions));case a$.MA.ListLoading:return t?.listLoading;case a$.MA.FileGridLoading:return n.createElement(a1.A,null);case a$.MA.PeopleGridLoading:return n.createElement(PeopleGridSkeleton,null);case a$.MA.WorkflowTemplatesGridLoading:return n.createElement(WorkflowTemplatesGridSkeleton,{cellCount:e.data?.cellCount});case a$.MA.EmptyState:return n.createElement(o.A,{uiComponentName:"explorer_empty_state",clogImpression:!0},n.createElement("div",{className:l()("p-explorer_empty_state",{"p-explorer_empty_state__with_image":!!e.data.imageUrl})},n.createElement(d.A,{className:e.data.className,title:e.data.title,description:e.data.description,onClickPrimaryAction:e.data.action,onClickSecondaryAction:e.data.secondaryAction,primaryActionButtonType:e.data.actionButtonType,primaryActionIcon:e.data.actionIcon,primaryActionText:e.data.actionText,primaryActionHref:e.data.actionHref,primaryActionAutoClogProps:e.data?.actionAutoClogProps,secondaryActionText:e.data.secondaryActionText,secondaryActionHref:e.data.secondaryActionHref,imageUrl:e.data.imageUrl,imageUrl2x:e.data.imageUrl2x,titleIcon:e.data.titleIcon})));case a$.MA.Coachmark:return n.createElement(e.data.coachmarkElement,{offsetX:e.data?.offsetX});case a$.MA.Grid:return n.createElement(ExplorerGrid,{items:e.data.items,minColumnWidth:e.data.minColumnWidth,resultListAriaLabel:u});case a$.MA.ExpandableGrid:return n.createElement(ExplorerExpandableGrid,{items:e.data.items,minColumnWidth:e.data.minColumnWidth,resultListAriaLabel:u,isExpanded:e.data.isExpanded,ariaLabel:e.ariaLabel});case a$.MA.CanvasFreeTeamFullPageNux:return n.createElement(CanvasPageEmptyStateFreemium,{isTeamOnTrial:e.data.isTeamOnTrial,renderLoadingSpinner:e.data.renderLoadingSpinner,isModal:e.data.isModal});case a$.MA.SalesListViewRecommendations:return n.createElement(ListViewBrowserRecommendations,null);case a$.MA.SalesListViewResult:return n.createElement(ListViewRowItem,{className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast,"p-explorer_result--list--active":e.data.isActiveItem}),compositeListId:e.data.compositeListId,label:e.data.label,lastViewedDate:e.data.lastViewedDate,objectLabel:e.data.objectLabel,isPicker:e.data.isPicker,hintText:e.data.hintText});case a$.MA.SalesListViewFooter:return n.createElement(ListViewBrowserFooter,null);case a$.MA.RecordRelatedListResult:return n.createElement(ListViewRowItem,{className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast,"p-explorer_result--list--active":e.data.isActiveItem}),label:e.data.relatedListLabel,hintText:e.data.hintText});case a$.MA.AgentExchangeResult:return n.createElement(AgentExchangeListItem,{agent:e.data.agent,renderedInListVariant:e.data.renderedInListVariant,hasFocus:a});case a$.MA.MyAgentsResult:return n.createElement(MyAgentsListItem,{agent:e.data.agent,renderedInListVariant:e.data.renderedInListVariant,hasFocus:a});case a$.MA.GenericComponent:case a$.MA.GenericFullWidthComponent:return n.createElement("div",null,e.data.component);case a$.MA.SectionTitle:return n.createElement(ExplorerSectionTitle,{title:e.data.title,isBold:e.data.isBold,ariaHeadingLevel:e.data.ariaHeadingLevel,isUnifiedDirectories:e.data.isUnifiedDirectories});case a$.MA.Accordion:return n.createElement(ExplorerAccordion,{title:e.data.title,secondaryActionTitle:e.data?.secondaryActionTitle,secondaryActionOnClick:e.data?.secondaryActionOnClick,isCollapsed:e.data.isCollapsed,onAccordionToggle:e.data.onAccordionToggle});case a$.MA.Controls:return n.createElement(tW.A,{selects:e.data.selects,viewType:e.data.viewType,onViewTypeChange:e.data.onViewTypeChange,customFilterUi:e.data.customFilterUi,customFilterPosition:e.data.customFilterPosition,hasNoMarginTop:e.data.hasNoMarginTop});case a$.MA.Templates:return n.createElement(ExplorerActionsTemplates,{primaryViewType:e.data.primaryViewType,actions:e.data.actions,customTemplateUi:e.data.customTemplateUi});case a$.MA.MessageResult:return n.createElement("div",{className:l()("p-explorer_result--message",{"p-explorer_result--message--card":"card"===e.data.variant,"p-explorer_result--message--no-bottom-margin":!e.data.bottomMargin})},n.createElement(nH.Ay,null,n.createElement(nq,{className:l()({"p-explorer_result--message--first":e.data.isFirst&&"list"===e.data.variant,"p-explorer_result--message--contents-card":"card"===e.data.variant}),key:e.data.message.ts,index:e.data.index,...e.data.message,channel:e.data.channel,secondaryViewType:p,variant:e.data.variant,expanded:e.data.expanded,onExpand:e.data.onExpand,isSemanticHighlight:e.data.message?.is_semantic_highlight,onFileClick:e.data.onFileClick,onLinkClick:e.data.onLinkClick})));case a$.MA.GenericLinkButton:return n.createElement(c.jV,{className:l()("p-explorer_result--generic-link-button",e.data.className),onClick:e.data.onClick},e.data.text);case a$.MA.AiAppItem:let h=!!e.data.lastRead&&(0,r5.A)(e.data.message,e.data.lastRead,e.data.currentUserId);return n.createElement(AiAppHistoryItem,{message:e.data.message,currentUserId:e.data.currentUserId,isUnread:h,className:l()("p-explorer_result--list",{"p-explorer_result--list--first":e.data.isFirst,"p-explorer_result--list--last":e.data.isLast})});case a$.MA.HeroTitle:return n.createElement(ExplorerHeroTitle,{title:e.data.title,content:e.data.content});case a$.MA.Spacer:return n.createElement("div",{style:{height:e.data.height,width:"100%"}});default:return n.createElement("div",null,"unknown")}};function getDetailTextOverride({fileId:e,detailType:t,notificationCount:a,createdByUserId:r}){if([eh.s.ACTIVITY_MENTION,eh.s.LAST_VIEWED,eh.s.LAST_UPDATED,eh.s.SHARED_TIMESTAMP,eh.s.CREATED_TIMESTAMP].includes(t))return n.createElement("div",{className:"p-quip_files_page-mention"},n.createElement(r0.A,{fileId:e,detailType:t,numNotifications:a,createdByUserId:r}))}renderExplorerRow.displayName="renderExplorerRow",getDetailTextOverride.displayName="getDetailTextOverride";let use_explorer_renderer=(e,t,a)=>{let i=(0,O.d4)(t3.MS),{getSiblingView:l}=(0,n.useContext)(eU.A),o=(0,O.d4)(e=>l(e,{container:eW.mq.Secondary})),s=o?.viewType,c=(0,r.wA)(),d=(0,n.useCallback)(e=>{let t=c((0,r6.O)({channelId:e}));return(0,r4.i)(i,t)},[c,i]);return(0,n.useCallback)((n,{hasFocus:r,hasFocusWithin:i})=>renderExplorerRow(e[n],{fragments:a,hasFocus:r,hasFocusWithin:i,getChannelHasNonUniqueName:d,resultListAriaLabel:t,secondaryViewType:s}),[e,a,d,t,s])}},0xfc1198ad:(e,t,a)=>{"use strict";a.d(t,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1a02c72b5),l=a(0xd6a16321),o=a(0x11a1f90a4),s=a(0x16ed1b0dc),c=a(0x4f725d55),d=a(0x10ea12ee6),m=a(0x13638bd77),u=a(0x24f5b5d9b),p=a(0x1d774a049),h=a(0x5a9ac442),_=a(0x217553e42);let __WEBPACK_DEFAULT_EXPORT__=({canvasSource:e=p.f.QUIP_EXPLORER_AUTOCOMPLETE}={})=>{let t=(0,r.wA)(),{getState:a}=(0,r.Pj)();return(0,n.useCallback)((n,r,p=!1)=>{let f;if(n.is_type_file){let a=n.item.id;f=a,t((0,h.A)({fileId:a,inTile:p,canvasSource:e}))}else if(n.is_type_channel)f=n.id,t((0,i.o)((0,l.pr)(n.id)));else if(n.is_type_user_profile){let e=n.id.replace("-profile","");f=e,t((0,m.b)({memberId:e}))}else if(n.is_type_user){let e;(0,c.A)(n.id)&&(e=(0,_.o2)(a(),n.id)),(e||(0,c.A)(n.id)||(0,s.A)(n.id))&&t((0,i.o)((0,l.pr)(e||n.id))),f=n.id}else n.is_type_team&&(0,o.z)(a(),n.team)&&(f=n.id,t((0,u.R)({teamId:n.id})));f&&t((0,d.L)({id:f,text:r}))},[t,a,e])}},0x245ab5a06:(e,t,a)=>{"use strict";a.d(t,{A:()=>eB});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x21f3c49e8),l=a(0x1d01572a2),o=a(0xc6a2c86f),s=a(0x20482ad21),c=a(0x287da5a6),d=a(0x814278bf),m=a(0xfc1198ad),u=a(0x1e3c7661),p=a(0x226892387),h=a(0x8d0a2ff1);function useGetShowListsPageNux({context:e}){let t=(0,p.d4)(h.iM),a=(0,p.d4)(h.dE);return e!==u.SP.ListPicker&&e!==u.SP.AddToList&&e!==u.SP.UnifiedFilePicker&&!t.length&&!!a}var _=a(0xbe5e39b6),f=a(0x40c0d834),b=a(0x11a296110),g=a(0x1d08e7031),y=a(0x136b9cf18),A=a(0x18a31435e),x=a(0x25354019b),E=a(0x151755090),C=a(0xa1832ae4),k=a(0x1b887bf79),v=a(0x3711e82d),S=a(0x10079cc7),I=a(0x1ccef1c6f),w=a(0x1fb2d2a87),T=a(0x91e15f37),N=a(0x1ee439e69),M=a(0x25d2de0b),R=a.n(M);let P=new s.Ay("lists"),ListExplorerFreemiumHero=()=>{let e=(0,r.wA)(),t=(0,p.d4)(k.X),a=(0,p.d4)(e=>!!(0,I.ty)(e,"a11y_animations")),i=(0,p.d4)(w.to),l=S.ZO.PaidFeatureTrial,o=S.zG.Vhq,s=(0,p.d4)(N.H7),c=(0,C.tc)(s),d=(0,p.d4)(e=>c&&(0,T.hq)(e,l,o)),m=(0,n.useCallback)(()=>{e((0,E.A)())},[e]),u=(0,n.useMemo)(()=>{let e=i===_.Sx.Dark;return(0,y.t)({animationsEnabled:a,isDarkTheme:e})},[a,i]);return n.createElement(f.A,{eventId:v.EventId.SLACK_LISTS,uiComponentName:v.UiComponentName.LISTS_FREEMIUM_UPGRADE,clogImpression:!0},n.createElement("div",{className:R().freemiumHeader},n.createElement("div",{className:R().freemiumHeaderTitle},n.createElement("div",null,P.t("Upgrade to create and edit lists")),n.createElement("div",null,P.t("Collaboratively manage projects, prioritize issues, organize requests and more with Slack lists. Learn more")),!t&&n.createElement(A.A,{type:"primary",entryPoint:x.b.LISTS_EXPLORER_FREEMIUM_HERO_UPGRADE},P.t("Compare Plans",{fallbackHashNs:"trials_highlight_paid_features",fallbackHash:"ea963548740f94552d2327531fe22e09acc7c717"})),t&&d?n.createElement(b.Ay,{onClick:m,type:"primary"},P.t("Try Slack Pro",{fallbackHashNs:"trials_highlight_paid_features",fallbackHash:"06e4cb15a831a4c84ebf3434fd44d951d2a9b078"})):n.createElement(A.A,{type:"primary",entryPoint:x.b.LISTS_EXPLORER_FREEMIUM_HERO_UPGRADE},P.t("Upgrade now",{fallbackHash:"09a80c7a63cdefe5e5c7bccdc6bf4b894b15c07c",fallbackHashNs:"page_pricing"}))),n.createElement("div",{className:R().freemiumHeaderAsset},n.createElement(g.A,{src:u,className:R().freemiumHeaderAssetImage,alt:""}))))};ListExplorerFreemiumHero.displayName="ListExplorerFreemiumHero";let L=n.memo(ListExplorerFreemiumHero);var O=a(0x1c6c73706),D=a(0xb1ea448c),F=a(0x32d3ef3d),U=a(0x210cf696f),B=a(0x194722c),H=a(0x21c8c64ab),W=a(0x23c9689f4),V=a(0xda0fcf22),G=a(0xa076e611),q=a(0x15e1a1041),j=a(0xd1daf7f9);let z=a.p+"template_card_groupby-1f2e2f1.jpg",K=a.p+"template_card_list_project_tracker-8ff44d3.jpg",$=a.p+"template_card_list-171c17a.jpg";var Y=a(0x22822e4b),Q=a(0x178f0e117),Z=a(0x20e69791a),J=a(0x5bed1d27),X=a(0x46dbff89),ee=a(0xcc8160ae),et=a.n(ee);let ea=new s.Ay("lists"),ListsTemplates=()=>{let e=(0,r.wA)(),t=(0,p.d4)(h.yv),[a,o]=(0,n.useState)(!1),s=(0,Y.u)({listTemplates:t,filterOutBlankTemplate:!0}).slice(0,3);(0,l.A)(()=>{(0,i.A)(t)&&(async()=>{o(!0),await e((0,J.Q)()),o(!1)})()});let c=(0,n.useCallback)(t=>()=>{t===G.K.Blank?e((0,Z.V)({source:Q.d.LISTS_TEMPLATES,reason:"create-list-from-lists-templates"})):e((0,X.q)({element:n.createElement(V.A,{templateId:t})}))},[e]),d=(0,n.useCallback)(()=>{e((0,X.q)({element:n.createElement(W.A)}))},[e]),m=(0,n.useCallback)(e=>e?.descriptionBlocks!==void 0?n.createElement(H.$,{value:e.descriptionBlocks}):e?.description||"",[]),u=s.map(e=>{let t=m(e);return n.createElement("div",{className:et().templateListItem,key:e.id},n.createElement(B.V,{size:F.S.expanded,entityState:F.w.enabled,primaryLabel:e.name,secondaryLabel:t,backgroundImage:(({template:e})=>{switch(e?.view?.type){case q.q.Board:return{card:j};case q.q.Table:if(e?.view?.grouping?.groupBy)return{card:z};return{card:$};default:if(e?.id===G.K.ProjectTracker)return{card:K};return{card:$}}})({template:e})?.card,withBorder:!1,shouldShrinkUnderDefaultWidth:!0,truncateLabels:!0,onClick:c(e.id),backgroundLoadingHeight:130,isRemovable:!1,customMinWidth:221,isAutoHeight:!0}))}),_=n.createElement("div",null,n.createElement("p",{className:et().titleWrapper},n.createElement("span",{className:et().titleText},ea.t("Featured templates")),n.createElement(U.A,{className:et().seeAllLink,onClick:d},ea.t("See all"))),n.createElement("div",{className:`${et().buttonsContainer} ${et().cardsV2}`},u));return a?n.createElement(D.A,{size:"medium",noMargin:!0}):_};ListsTemplates.displayName="ListsTemplates";let en=n.memo(ListsTemplates);var er=a(0x1789e94fa),ei=a(0x201c75199),el=a(0x2132483d2),eo=a(0xbd3de346),es=a(0x206bb6436),ec=a(0x1befa7c4),ed=a(0xe8015073),em=a(0xa985ed31),eu=a(0x23e174be6),ep=a(0x19e4a8feb),eh=a(0xb60a1b),e_=a(0x21bfacd01),ef=a(0x19c76d181),eb=a(0x16f1f4c74),eg=a(0x23cc2f8fd),ey=a(0x1384d5d4c),eA=a(0x182b853bf),ex=a(0x1a0b49dc0),eE=a(0x1fa577313),eC=a(0x14633fe41),ek=a(0x206e601f5),ev=a(0x2bfcf5dd),eS=a(0x164e27b8c),eI=a(0x1d06e350e),ew=a(0x14ea3ce99),eT=a(0x13654559a),eN=a(0x2d1c8f66),eM=a(0xafce781a),eR=a(0x5b1935a6),eP=a(0xd0eb5473),eL=a(0xe4af74fc),eO=a(0xe80ed487),eD=a(0x1950da728);let eF=new s.Ay("lists"),eU="all_lists_filter",useListExplorer=({context:e,explorerContext:t})=>{let a=(0,r.wA)(),s=(0,r.Pj)(),_=(0,p.d4)(ef.WR),f=(0,p.d4)(N.H7),b=(0,C.tc)(f),g=!!(0,p.d4)(es.B),y=(0,p.d4)(e=>(0,eL.tA)(e,{permission:ed.p.CREATE_LIST_TEMPLATE})),A=(0,eP.Jr)(y),x=e===u.SP.UnifiedFilePicker?eI.ej.UNIFIED_FILE_PICKER_LISTS:eI.ej.LISTS,E=(0,m.A)(),{handlePageSelect:k,handleSortSelect:v,results:S,page:I,pageCount:w,sort:T,isLoading:M,isZeroState:R,filters:P,totalCount:D,query:F}=(0,d.A)(x,eI.ri.LISTS),U=(0,p.d4)(h.$8),[B,H]=(0,n.useState)(e===u.SP.AddToList?U:void 0),W=(0,p.d4)(e_.V),V=(0,p.d4)(e=>B?(0,ew.Lp)(e,B):void 0),G=(0,p.d4)(h.yv),[q,j]=(0,n.useState)(!1),z=t?.prependTemplatesToResults?(0,Y.u)({listTemplates:G,filterOutBlankTemplate:!0}):null;(0,l.A)(()=>{t?.prependTemplatesToResults&&(0,i.A)(G)&&(async()=>{j(!0),await a((0,J.Q)()),j(!1)})()}),(0,l.A)(()=>{a((0,eM.iR)({event:{type:eR.jo.LISTS_PAGE_OPENED}}))});let K=(0,p.d4)(t=>e===u.SP.UnifiedFilePicker?(0,eO.l)(t,eD.Jx.UNIFIED_FILE_PICKER):void 0),$=K?(0,ep.Q)(K).trim():"";(0,l.A)(()=>{e===u.SP.UnifiedFilePicker&&$!==F&&(a((0,ev.o)({browserInstanceId:x,value:$??""})),a((0,ex.d)({browserInstanceId:x})))});let[Q,Z]=(0,n.useState)(!1);(0,n.useEffect)(()=>{Z(M||q)},[M,q]);let X=e===u.SP.AddToList||e===u.SP.ListPicker||e===u.SP.UnifiedFilePicker,ee=(0,n.useMemo)(()=>S.map(e=>({id:e.id,user:e.user})),[S]),et=P?.notFrom?.includes(_)&&P?.with?.includes(_),ea=P?.from?.includes(_),eB=(0,n.useMemo)(()=>et?"shared_with_you_lists_filter":ea?"created_by_you_lists_filter":eU,[ea,et]),eH=eB===eU&&T===eI.QX.RECENTLY_VIEWED&&1===I&&!F,eW=t?.prependTemplatesToResults&&eH,eV=(0,o.A)(M);(0,n.useEffect)(()=>{if(!eH||!(eV&&!M))return;let e=ee.map(e=>e.id);a((0,eT.Uo)({listsIds:e}))},[a,ee,eH,M,eV]);let eG=(0,p.d4)(h.Tj),eq=eH&&!eG,ej=(0,p.wz)(e=>{let t=(0,h.iM)(e),a=[];return t.forEach(t=>{let n=(0,ew.Lp)(e,t);n&&!(0,eo.aK)(n)&&a.push({id:n.id,user:n.user})}),a}),ez=eq?ej:ee,eK=(0,p.wz)(a=>e===u.SP.AddToList?ez.filter(e=>!(0,h.I9)(a,e.id)):t?.forSolutionTemplate?ez.filter(e=>{let t=(0,ew.Lp)(a,e.id),n=(0,eo.vH)(a,t);return(0,el.f)({file:t,isFileSharingRestrictedForTeam:g,currentTeamId:f.id,currentUserOwnsFile:n,canCreateTemplates:A}).isValid}):t?.excludeTemplatesInSearchResult?ez.filter(e=>{let t=(0,ew.Lp)(a,e.id);return!(0,eo.Vc)(t)}):ez),e$=useGetShowListsPageNux({context:e});(0,l.A)(()=>{a((0,ey.V)({browserInstanceId:x}))});let eY=(0,n.useCallback)((e,t)=>{X?H(t):(0,em.A)(t)&&a((0,eN.N)({listFileId:t,source:eh.B.LISTS_BROWSE_PAGE_ITEM,forceOpenInSplitView:!W&&(0,c.A)(e)}))},[a,X,W]),eQ=(0,n.useCallback)(({value:e})=>{e===eU?F||T===eI.QX.RECENTLY_VIEWED?a((0,eE.q)({browserInstanceId:x})):(a((0,eE.q)({browserInstanceId:x,fetch:!1})),a((0,eS.I)({browserInstanceId:x,value:eI.QX.RECENTLY_VIEWED}))):"shared_with_you_lists_filter"===e?a((0,ek.d)({browserInstanceId:x,filters:{from:[],notFrom:[_],onlyMyChannels:!1,with:[_]},sort:F||T===eI.QX.RECENTLY_VIEWED?T:eI.QX.RECENTLY_VIEWED})):"created_by_you_lists_filter"===e&&a((0,ek.d)({browserInstanceId:x,filters:{from:[_],notFrom:[],onlyMyChannels:!1,with:[]},sort:T!==eI.QX.RECENTLY_VIEWED||F?T:eI.QX.NEWEST}))},[x,a,_,T,F]),eZ=(0,n.useCallback)(()=>{a((0,eb.NY)({browserInstanceId:x,value:""})),a((0,eC.q)({browserInstanceId:x})),T===eI.QX.RELEVANT?a((0,eS.I)({browserInstanceId:x,value:ea?eI.QX.NEWEST:eI.QX.RECENTLY_VIEWED})):a((0,eA.h)({browserInstanceId:x}))},[x,a,T,ea]),eJ=(0,n.useCallback)(({selectedIndex:e,suggestions:t,userQuery:n,shouldOpenInTile:r})=>{if(!n)return void eZ();if(null===e)return;let i=t[e];a((0,eg.o)({browserInstanceId:x,selectedIndex:e,suggestion:i,suggestions:t,userQuery:n})),i.is_type_query_completion?(a((0,ev.o)({browserInstanceId:x,value:n})),a((0,eb.d1)({browserInstanceId:x,value:eI.QX.RELEVANT})),a((0,ex.d)({browserInstanceId:x}))):X?H(i.fileId):E(i,n,r)},[x,a,E,eZ,X]),eX=(0,n.useMemo)(()=>({allowEmptyQuery:!0,tiered:!0,entities:{files:{onlyLists:!0,onlyWriteable:e===u.SP.AddToList}},limit:30,returnMetadata:!0,sort:{frecency:!0,model:(0,eu.I)()},searchViewContext:"autocomplete:lists-browser",filter:e=>{if(!t?.forSolutionTemplate)return!0;let a=(0,eo.vH)(s.getState(),e);return(0,el.f)({file:e,isFileSharingRestrictedForTeam:g,currentTeamId:f.id,currentUserOwnsFile:a,canCreateTemplates:A}).isValid}}),[e,f.id,t?.forSolutionTemplate,g,s,A]);return(0,n.useCallback)(()=>{let t=[];if(e===u.SP.BrowseLists&&(b?t.push({key:"freemium-header",type:ec.MA.GenericFullWidthComponent,data:{component:n.createElement(L,null)},role:ec.N3.Presentation,fullWidth:!0}):e$?t.push({key:"nux-header",type:ec.MA.GenericFullWidthComponent,data:{component:n.createElement(O.A,null)},role:ec.N3.Presentation,fullWidth:!0}):t.push({key:"nux-sub-header",type:ec.MA.GenericFullWidthComponent,data:{component:n.createElement(er.A,ei.A)},role:ec.N3.Presentation,fullWidth:!0}),t.push({key:"list-templates",type:ec.MA.Templates,data:{customTemplateUi:n.createElement(en,null)},role:ec.N3.Presentation})),!(e$&&0===ej.length||e===u.SP.AddToList)){let e=[ea?null:{label:eF.t("Recently viewed"),value:eI.QX.RECENTLY_VIEWED},{label:eF.t("Last updated"),value:eI.QX.NEWEST}].filter(e=>null!==e),a=[{label:eF.t("Most relevant",{ns:"browsers"}),value:eI.QX.RELEVANT},{label:eF.t("Last updated"),value:eI.QX.NEWEST}];t.push({key:"controls",type:ec.MA.Controls,data:{selects:[{id:"filter",title:eF.t("Filter"),value:eB,onChange:eQ,type:ec.jc.EXPANDED,options:[{label:eF.t("All lists"),value:"all_lists_filter"},{label:eF.t("Shared with you"),value:"shared_with_you_lists_filter"},{label:eF.t("Created by you"),value:"created_by_you_lists_filter"}]},{id:"sort",title:eF.t("Sort"),value:T,onChange:v,options:F?a:e,position:"right"}]},role:ec.N3.Presentation})}return(Q&&!eq||q)&&t.push({key:"list-loading",type:ec.MA.ListLoading,role:ec.N3.Presentation,scrollToTop:!0}),eW&&z?.length&&z.forEach((e,a)=>{let n={key:e.id,type:ec.MA.ListTemplateResult,data:{template:e,isActiveItem:X&&e.id===B},onListItemSelect:t=>{eY(t,e.id)},autoClogProps:{elementIndex:a,elementName:"list_template_result"},role:ec.N3.ListItem};t.push(n)}),(!Q||eK.length)&&(e===u.SP.AddToList&&B&&V&&!(0,eo.aK)(V)&&!eK.some(e=>e.id===B)&&eK.unshift({id:V.id,user:V.user}),eK.forEach((a,n)=>{let r=a.id,i={key:r,type:ec.MA.ListResult,data:{list:a,sort:T,isFirst:0===n&&!(eW&&z?.length),isLast:n===eK.length-1,createdByUserId:a.user||"",showActions:!X,showFileMetadataAvatarStack:!X,isActiveItem:X&&r===B,fromOrganization:!0},onListItemSelect:e=>{eY(e,r)},autoClogProps:{elementIndex:n,elementName:"file_result"},role:ec.N3.ListItem};r===U&&e===u.SP.AddToList?t.unshift(i):t.push(i)})),Q||D||R||t.push({key:"zero-empty",type:ec.MA.EmptyState,data:{title:eF.t("No results"),description:eF.t("You may want to try adjusting your filters.")},role:ec.N3.Presentation}),!(e$&&0===eK.length)&&w>1&&t.push({key:"pagination",type:ec.MA.Pagination,data:{currentPage:I,pageCount:w,onPageSelect:k},role:ec.N3.Presentation}),{rows:t,onSearch:e$?void 0:eJ,onResetSearch:e$?void 0:eZ,searcherOptions:eX,isZeroState:!F}},[b,e$,X,ej.length,e,Q,eq,q,eW,z,eK,D,R,w,eJ,eZ,eX,F,eB,eQ,T,v,B,eY,U,I,k,V,ea])};useListExplorer.displayName="useListExplorer";let eB=useListExplorer},0xdd12ffd6:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x241ac41be),i=a(0x14e1f3005);let l=[...Array(30).keys()].map(e=>e.toString()),FileGridSkeleton=()=>{let e=(0,n.useCallback)(()=>n.createElement(r.A,null),[]);return n.createElement(i.A,{keys:l,renderCell:e,minColumnWidth:200})};FileGridSkeleton.displayName="FileGridSkeleton";let o=FileGridSkeleton},0x72f285f9:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x339b339c),i=a(0x84a5226c);let l=n.memo(({skeletonListItemCount:e,removeTopPadding:t})=>n.createElement(n.Fragment,null,!t&&n.createElement("div",{style:{marginBottom:"10px"},className:"p-explorer_result--list"},n.createElement(r.A,{size:"small"})),n.createElement(i.A,{className:"p-explorer_result--list p-explorer_result--list--first"}),[...Array(e)].map((e,t)=>n.createElement(i.A,{key:t,className:"p-explorer_result--list"})),n.createElement(i.A,{className:"p-explorer_result--list p-explorer_result--list--last"}))),GroupedFileListSkeleton=({skeletonListItemCount:e,removeTopPadding:t})=>e?n.createElement(l,{skeletonListItemCount:e,removeTopPadding:t}):n.createElement(n.Fragment,null,n.createElement(l,null),n.createElement(l,null),n.createElement(l,null));GroupedFileListSkeleton.displayName="GroupedFileListSkeleton";let o=n.memo(GroupedFileListSkeleton)},0x14527d07c:(e,t,a)=>{"use strict";a.d(t,{t:()=>useEnsureDmsAreLoaded});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1595bdd0),l=a(0x1845fa6a6),o=a(0x280afe13),s=a(0x143fb6398),c=a(0x68db9e1f);function useEnsureDmsAreLoaded(){let e=(0,r.wA)(),[t,a]=(0,n.useState)([]),d=(0,n.useCallback)(()=>e((0,c.A)({requireLatest:!0,excludeAppDMs:!0,excludeMpims:!0})).then(e=>{let t=e.filter(e=>e.latestTs&&e.latestTs>="1"&&(0,s.ju)(e.channel));return a((0,i.A)(t.map(e=>(0,o.e)(e.channel))).slice(0,25))}),[e,a]),[m]=(0,l.A)({reason:"external-connections-browser-conversation-counts",onMountOrChange:d});return(0,n.useMemo)(()=>({isLoading:m,memberIds:t}),[m,t])}},0x74a52d49:(e,t,a)=>{"use strict";a.d(t,{A:()=>_});var n=a(0xbad225b5),r=a(0x40c0d834),i=a(0x20482ad21),l=a(0x16ac9b089),o=a(0x11a296110),s=a(0x205e9cb8),c=a(0x113614463),d=a(0x4433d67f),m=a(0x3711e82d),u=a(0x226892387),p=a(0x32b21afc);let h=new i.Ay("slack_connect_hub"),FeaturedContactCard=({contactExternalId:e,avatarSize:t,buttonProps:a})=>{let{email:i,image_512:_,name:f}=(0,u.d4)(t=>(0,p.w8)(t,e)),b=(0,u.d4)(t=>(0,p.Ee)(t,e)),[g,y]=(0,d.A)(()=>{let t=document.querySelector(".p-workspace-layout")?.offsetTop??0;return{element:n.createElement(s.A,{contactId:e,scdmInviteErrorCode:b,isFixedPosition:!0,topOffset:t,onClose:y})}});return(0,n.useEffect)(()=>{b&&g()},[g,b]),n.createElement(r.A,{uiStep:m.UiStep.CONNECTABLE_CONTACTS_SEARCH_RESULT,stepVariant:"on_slack",clogImpression:!0},n.createElement("div",{className:"p-featured_contact_card"},n.createElement(o.Ay,{className:"p-featured_contact_card__primary_button","aria-label":h.t("View contact details for {nameOrEmail}",{nameOrEmail:(0,l.Ay)(f||i)}),...a}),n.createElement("img",{className:"p-featured_contact_card__photo",src:_,alt:f,width:t}),n.createElement("div",{className:"p-featured_contact_card__body"},n.createElement("div",{className:"p-featured_contact_card__name"},f||i),n.createElement("div",{className:"p-featured_contact_card__email"},f?i:""),n.createElement(c.A,{contactExternalId:e,size:"small"}))))};FeaturedContactCard.displayName="FeaturedContactCard";let _=FeaturedContactCard},0x113614463:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x102edf836),o=a(0x11a296110),s=a(0x2501a2cee),c=a(0x4c96e5d9),d=a(0x1001c1606),m=a(0x226892387),u=a(0x32b21afc),p=a(0xede25000);let h=new i.Ay("slack_connect_hub"),_={elementName:"invite_to_scdm",onClick:{enableClogAction:!0}},ConnectableContactInviteCta=({contactExternalId:e,"data-qa":t,size:a=l.F0.medium})=>{let i=(0,r.wA)(),{is_on_slack:f}=(0,m.d4)(t=>(0,u.w8)(t,e)),b=(0,m.d4)(t=>(0,u.Gy)(t,e,"im")),[g,y]=(0,n.useState)(!1),A=(0,n.useCallback)(()=>{y(!0),i((0,p.A)({contactExternalId:e})).finally(()=>{y(!1)})},[i,e]),x=(0,m.d4)(d.u),E=f?h.t("Start Conversation"):h.t("Invite to Join Slack"),C=E;b&&(E=n.createElement(n.Fragment,null,n.createElement(s.Ah,{name:"check",inline:!0}),h.t("Invitation Sent")),C=h.t("Invitation Sent"));let k=b||!x,v=n.createElement(o.lV,{size:a,onClick:k?void 0:A,type:f?"primary":"outline",className:"p-connectable_contact_invite_cta",disabled:k,"data-qa":t,loading:g,autoClogProps:_,"aria-label":C},E);return b||x?v:n.createElement(c.Ay,{tip:h.t("You don\u2019t have permission to start a DM with people outside your company.")},v)};ConnectableContactInviteCta.displayName="ConnectableContactInviteCta";let f=ConnectableContactInviteCta},0x1e98b1aaf:(e,t,a)=>{"use strict";a.d(t,{I:()=>E,P:()=>ExternalConnectionsCta});var n,r,i=a(0xbad225b5),l=a(0x120c268ad),o=a.n(l),s=a(0x1cbdfeceb),c=a(0x6affae29),d=a(0x20482ad21),m=a(0x11a296110),u=a(0x128d54e52),p=a(0x1535e80f3),h=a(0x2501a2cee),_=a(0xa1832ae4),f=a(0xb8504a42),b=a(0x159a0d582),g=a(0x3711e82d),y=a(0x226892387),A=a(0x1ee439e69);let x=new d.Ay("slack_connect");var E=((n={}).AdminSettings="admin_settings",n.AdminInvitations="admin_invitations",n.AdminOrganizations="admin_organizations",n),C=((r=C||{}).AdminSettings="settings",r.AdminInvitations="invitations",r.AdminOrganizations="organizations",r);let k={onClick:{enableClogAction:!0},elementType:g.ElementType.BUTTON},ExternalConnectionsCta=({type:e,className:t})=>{let a=(0,y.d4)(A.H7),n=(0,f.r7)(a),r=(0,y.d4)(A.lp),l=(0,y.d4)(b.W),{text:d,subtext:E,iconName:C,action:v,href:S,autoClogProps:I}=(e=>{switch(e){case"admin_settings":return{text:x.t("Customize settings"),subtext:x.t("Set permissions and view options for added security"),iconName:"settings",href:n?`${(0,_.Zl)(r)}manage/slack-connect/settings`:"/admin/settings#permissions",autoClogProps:{...k,uiComponentName:g.UiComponentName.SLACK_CONNECT_ADMIN_CTAS,elementName:"settings"}};case"admin_invitations":return{text:x.t("Manage requests"),subtext:x.t("Review and approve connection requests from your team"),iconName:"paper-plane",action:n&&l?s.A:()=>{(0,_.gC)(a,"admin/slack-connect-invitations")},href:n&&l?`${(0,_.Zl)(r)}manage/slack-connect/requests-pending-invites`:void 0,autoClogProps:{...k,uiComponentName:g.UiComponentName.SLACK_CONNECT_ADMIN_CTAS,elementName:"invitations"}};case"admin_organizations":return{text:x.t("Manage connections"),subtext:x.t("Streamline approvals with trusted partners"),iconName:"workspace",action:n?s.A:()=>{(0,_.gC)(a,"admin/slack-connect-connections")},href:n?`${(0,_.Zl)(r)}manage/slack-connect/connections`:void 0,autoClogProps:{...k,uiComponentName:g.UiComponentName.SLACK_CONNECT_ADMIN_CTAS,elementName:"organizations"}};default:(0,c.Kh)(e)}})(e),w=(0,i.useCallback)(()=>i.createElement("div",{className:"p-external_connections_cta__icon"},i.createElement(h.Ah,{name:C,size:"20"})),[C]),T=(0,i.useCallback)(()=>i.createElement("strong",null,d),[d]),N=(0,i.useCallback)(()=>i.createElement(u.sT,null,E),[E]),M={children:i.createElement(i.Fragment,null,i.createElement(u.Ay,{className:o()("p-external_connections_cta"),size:p.ny.medium,avatar:w,text:T(),subtext:N()}),i.createElement("div",{className:"p-external_connections_cta__new_window_icon"},i.createElement(h.Ah,{name:"new-window",size:"20"}))),className:o()("full_width","display_flex","p-external_connections_cta__container",t),onClick:v,autoClogProps:I};return S?i.createElement(m.jV,{href:S,target:"_blank",...M}):i.createElement(m.Nm,M)};ExternalConnectionsCta.displayName="ExternalConnectionsCta"},0x5b24a5bc:(e,t,a)=>{"use strict";a.d(t,{a:()=>ExternalLimitedInviteTeammatesControls});var n=a(0xbad225b5),r=a(0x1f022ebd9),i=a(0x15279822),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x1d57b7d4c),c=a(0x1d2cd7755),d=a(0x2501a2cee),m=a(0x189a28b3e),u=a(0x161b91aba),p=a(0x1ecf60a39),h=a(0xd289a116),_=a(0xba4aff95),f=a(0x20e80190e),b=a(0x226892387);let g=new l.Ay("slack_connect_external_limited"),ExternalLimitedInviteTeammatesControls=({buttonAutoClogProps:e,contentClassName:t,contentSectionClassName:a,footerClassName:l,isExternalLimited:y,isLoading:A,onBackClick:x,onRadioChange:E,onSubmitClick:C,onToggle:k,legendText:v,submitButtonText:S,showSelectionOptions:I})=>{let w=(0,n.useRef)(null),T="invite-switch-label",N=y?g.t("Off"):g.t("On"),M="external_limited_invite_permissions_legend",R=y?h.l.ExternalLimited:h.l.ExternalUnlimited,P=(0,b.d4)(u.Tv);return(0,r.A)(()=>{(0,i.Fp)(w.current)?.focus()}),n.createElement(n.Fragment,null,I&&n.createElement(f.$m,{className:t},n.createElement(f.qf,{id:"p-external_limited_invite_teammates_modal__content",className:a},E?n.createElement(n.Fragment,null,n.createElement(s.A,{id:M,className:"p-external_limited_invite_teammates_modal__external_limited_radiogroup_legend"},v||g.t("What should they be able to do?")),n.createElement(p.A,{selectedRadio:R,onRadioChange:E,legendId:M})):n.createElement(n.Fragment,null,n.createElement(c.A,{className:"p-external_limited_invite_teammates_modal__invite_label","data-qa":"external_limited_invite_teammates_modal_label",text:g.t("Let them invite their coworkers"),type:"inline"},n.createElement("div",{className:"p-external_limited_invite_teammates_modal__invite_switch",ref:w},n.createElement("span",{id:T,className:"p-external_limited_invite_teammates_modal__invite_switch_text","aria-hidden":!0},N),n.createElement(m.A,{ariaLabel:"",ariaLabelledBy:T,className:"p-external_limited_invite_teammates_modal__invite_switch_switch",dataQa:"external_limited_invite_teammates_modal_switch",isToggled:!y,onChange:k}))),n.createElement("p",{className:"p-external_limited_invite_teammates_modal__invite_note_text","data-qa":"external_limited_invite_teammates_modal_note_text"},g.t("They\u2019ll also be able to use apps and workflows, and their organizations will get a copy of the channel\u2019s contents."))))),n.createElement(f.jl,{className:l},P?g.rt("<a>Learn more about channel permissions</a>",null,({text:e,tag:t})=>"a"===t?n.createElement(_.A,{className:"inline_flex justify_contents_center",articleId:0x15d3fb76fcd,forceOpenInBrowser:!0},n.createElement("span",{className:"margin_right_25"},n.createElement(d.Ah,{name:"info",inline:!0})),e):null):null,n.createElement(f.ox,null,n.createElement(o.Ay,{className:"margin_right_50",type:"outline",onClick:x,"data-qa":"external_limited_invite_teammates_modal_back_button",autoClogProps:{...e.back,onClick:{enableClogAction:!0}}},g.t("Back")),n.createElement(o.lV,{loading:A,onClick:C,"data-qa":"external_limited_invite_teammates_modal_send_button",autoClogProps:{...e.submit,isPrimaryCTA:!0,onClick:{enableClogAction:!0}},"aria-label":void 0},S))))};ExternalLimitedInviteTeammatesControls.displayName="ExternalLimitedInviteTeammatesControls"},0x861e47a3:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x20e77676b);let l=new r.Ay("slack_connect_external_limited"),ExternalLimitedLearnMoreLink=()=>{let e=l.t("Learn more");return n.createElement(i.A,{articleId:0x15d3fb76fcd},e)};ExternalLimitedLearnMoreLink.displayName="ExternalLimitedLearnMoreLink";let o=ExternalLimitedLearnMoreLink},0x1ecf60a39:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x1d2cd7755),l=a(0x139c79d16),o=a(0xa5dbe09b),s=a(0x161b91aba),c=a(0xd289a116),d=a(0x226892387);let m=new r.Ay("slack_connect_external_limited"),ExternalLimitedRadiogroup=({onRadioChange:e,selectedRadio:t,legendId:a="",isDisabled:r=!1})=>{let u="external_limited_select_permissions",p=(0,d.d4)(s.Tv),h=p?m.t("Includes full access to the channel, workflows and apps. After you\u2019re done collaborating, they\u2019ll get to keep a copy of the channel history."):m.t("They\u2019ll also be able to use apps and workflows, and their organization will get a copy of the channel\u2019s contents."),_=p?m.t("Doesn\u2019t include the use of workflows or apps, and they can\u2019t invite their coworkers."):void 0;return n.createElement(o.A,{"aria-labelledby":a,isDisabled:r,className:"p-external_limited_radiogroup__radiogroup","data-qa":"external_limited_select_permissions"},n.createElement(i.A,{text:m.t("Post and invite"),type:"inline",cursor:"pointer",subtext:h,className:"p-external_limited_radiogroup__label","data-qa":"external_limited_select_permissions--external_unlimited",isDisabled:r},n.createElement(l.A,{id:c.l.ExternalUnlimited,checked:t===c.l.ExternalUnlimited,name:u,value:c.l.ExternalUnlimited,"data-qa":"external_limited_select_permissions--external_unlimited_input",onChange:e,disabled:r})),n.createElement(i.A,{text:m.t("Only post"),type:"inline",cursor:"pointer",subtext:_,className:"p-external_limited_radiogroup__label","data-qa":"external_limited_select_permissions--external_limited",isDisabled:r},n.createElement(l.A,{id:c.l.ExternalLimited,checked:t===c.l.ExternalLimited,name:u,value:c.l.ExternalLimited,"data-qa":"external_limited_select_permissions--external_limited_input",onChange:e,disabled:r})))};ExternalLimitedRadiogroup.displayName="ExternalLimitedRadiogroup";let u=ExternalLimitedRadiogroup},0xd289a116:(e,t,a)=>{"use strict";a.d(t,{l:()=>r});var n,r=((n={}).ExternalLimited="EXTERNAL_LIMITED",n.ExternalUnlimited="EXTERNAL_UNLIMITED",n)},0xfe3b01df:(e,t,a)=>{"use strict";a.d(t,{A:()=>b,y:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x2b7f0bcc),o=a(0x247cf31a2),s=a(0xa1832ae4),c=a(0x20e80190e),d=a(0x9b971e7e),m=a(0x226892387),u=a(0x217553e42),p=a(0x1fcbb004d),h=a(0x1ee439e69);let _=new i.Ay("slack_connect_external_limited"),f={AddPeople:"add_people",AddWorkflows:"add_workflows",AddShortcut:"add_shortcut",AddApps:"add_apps"},ExternalLimitedRoadblockModal=({source:e,channel:t,title:a,body:i})=>{let b=(0,r.wA)(),g=(0,m.d4)(e=>"string"==typeof t?(0,u.OL)(e,t):t),{title:y,body:A}=((e,t)=>{switch(t){case f.AddPeople:return{title:_.t("Add people"),body:_.rt("Members of <strong>{ownTeamName}</strong> aren\u2019t able to add people to this channel.",{ownTeamName:e})};case f.AddShortcut:return{title:_.t("Add shortcut"),body:_.rt("Members of <strong>{ownTeamName}</strong> aren\u2019t able to add shortcuts to this channel.",{ownTeamName:e})};case f.AddWorkflows:return{title:_.t("Add workflows"),body:_.rt("Members of <strong>{ownTeamName}</strong> aren\u2019t able to add workflows to this channel.",{ownTeamName:e})};case f.AddApps:return{title:_.t("Add apps"),body:_.rt("Members of <strong>{ownTeamName}</strong> aren\u2019t able to add apps to this channel.",{ownTeamName:e})};default:return{title:_.t("Can\u2019t continue"),body:_.rt("There are a few things people from <strong>{ownTeamName}</strong> can\u2019t do in this channel \u2014 and you\u2019ve just found one of them.",{ownTeamName:e})}}})((0,m.d4)(e=>{let t=(0,h._J)(e,(0,d.Kc)(e));return(0,s.F1)(t)}),e),x=(0,n.useCallback)(()=>b((0,p.O)()),[b]);return n.createElement(c.dW,{closeModal:x,dataQa:"external-limited-roadblock-modal"},n.createElement(c.rQ,null,n.createElement(c.Rc,{title:a??y,subtitle:t?n.createElement(o.A,{channel:g}):null})),n.createElement(c.$m,null,n.createElement(c.qf,null,n.createElement(l.Ay,{icon:"info"},n.createElement("span",null,i??A)))),n.createElement(c.jl,null,n.createElement(c.ox,null,n.createElement(c.s_,{type:"outline","data-qa":"external-limited-member-roadblock-modal-ok-button","aria-label":_.t("OK")},_.t("OK")))))};ExternalLimitedRoadblockModal.displayName="ExternalLimitedRoadblockModal";let b=ExternalLimitedRoadblockModal},0x221f5d292:(e,t,a)=>{"use strict";a.d(t,{N5:()=>r,bf:()=>n});let n={All:"",Connected:"CONNECTED",Disconnected:"DISCONNECTED",Blocked:"BLOCKED",Pending:"IN_REVIEW"},r={All:"",Any:"any",None:"none",ApprovedOrgsOnly:"approved_orgs_only",AllowSCFileUploads:"allow_sc_file_uploads",ProfileVisibility:"profile_visibility",AllowedCanvasSharing:"allowed_canvas_sharing",AllowedListSharing:"allowed_list_sharing",AwayTeamSCInvitePermissions:"away_team_sc_invite_permissions",AutoAccept:"accept_sc_invites",ScMpdmConversion:"sc_mpdm_to_private",ExternalAwarenessVisibility:"external_awareness_context_bar",InteractWithExternalWorkflows:"interact_with_externally_owned_workflows",ExternalTeamsUseLocalOwnedWorkflows:"external_teams_interact_with_locally_owned_workflows"}},0x1eb7b2407:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0xc7cbdeb4),i=a(0x112e8a9c0),l=a(0x1b9d5cc0c),o=a(0x350d87d7),s=a(0x1aad32b98),c=a(0x167bc3887),d=a(0x1c91944c9),m=a(0xb129c1d5),u=a(0xe684f705);function getMemberImage(e){if(e)return(0,c.Ay)({avatarHash:(0,l.aY)(e),memberId:e.id,size:r.p,teamOrEnterpriseId:(0,o.A)(e)?(0,s.D5)(e):(0,s.dQ)(e)}).imageUrl}function FaceStack({className:e,primaryMember:t,primaryIsHiddenUser:a,secondaryMember:l,secondaryIsHiddenUser:o}){let s=t&&getMemberImage(t),c=l&&getMemberImage(l);return n.createElement(r.A,{className:e,primaryImage:s,secondaryImage:c,PrimaryHiddenUserComponent:a?i.A:void 0,SecondaryHiddenUserComponent:o?i.A:void 0})}function mapStateToProps(e,{primaryMemberId:t,secondaryMemberId:a}){return{primaryMember:(0,u.nv)(e,t),secondaryMember:(0,u.nv)(e,a),primaryIsHiddenUser:(0,m.a)(e,t),secondaryIsHiddenUser:(0,m.a)(e,a)}}FaceStack.displayName="FaceStack";let p=(0,d.N)(mapStateToProps)(FaceStack)},0xa67b3699:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x237b6a339),o=a(0x21f3c49e8),s=a(0x18f2150ea),c=a(0x130d89881),d=a(0x1c659cbb1),m=a(0x8ad213fa);let u=class extends n.Component{renderAvatar(e,t){let a,r,{avatarProps:i}=this.props;return(0,m.A)(e)?a=e:r=e,n.createElement(d.Ay,{additionalOverlay:t,ariaHidden:"true",botId:a,key:e||(0,l.A)("unknown-"),tabIndex:"-1",userId:r,...i})}renderAvatars(e,t){if(!t)return null;let a=e.slice(0,t-1).map(e=>this.renderAvatar(e));if(e.length>=t){let n=e.length-t;a.push(this.renderAvatar(e[t-1],n))}return a}render(){let e,{avatarOuterHeight:t,avatarOuterWidth:a,className:r,maxNumFaces:l,memberIds:d,style:m}=this.props;return(0,o.A)(d)||(0,s.A)(l)&&l<=0?null:(e=(0,s.A)(l)?this.renderAvatars(d||[],l):n.createElement(c.A,null,({height:e,width:t})=>{let r=Math.floor(t/a),i=this.renderAvatars(d||[],r);return n.createElement("div",{style:{height:e,width:t}},i)}),n.createElement("div",{className:i()("p-facepile",r),style:m||{height:t}},e))}};u.displayName="Facepile";let p=u},0xeb42f08f:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n,r=((n=r||{})[n.STRETCH=0]="STRETCH",n[n.FULL_WIDTH=1]="FULL_WIDTH",n[n.DEFAULT=2]="DEFAULT",n);let i=r},0x1b5a5fae:(e,t,a)=>{"use strict";a.d(t,{m:()=>FileImageAltBadge});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x15279822),s=a(0x20482ad21),c=a(0x20c2e7f06),d=a(0x344bb842),m=a(0x6aeae8a3),u=a(0x2501a2cee),p=a(0x4c96e5d9),h=a(0x1b82dd5a4),_=a(0x22fd0ecc8),f=a(0x226892387),b=a(0x592ba57),g=a(0xcc5a1e68),y=a(0x448f547b),A=a.n(y);let x=new s.Ay("files"),E={name:"edit"},C={name:"close"},FileImageAltBadge=({file:e,fileIds:t,onImageDescriptionClose:a,showActions:i,children:s,dialogEntrypoint:y})=>{let k=(0,r.wA)(),v=(0,f.d4)(h.FR),S=(0,f.d4)(h.Ow),I=(0,f.d4)(t=>!!e&&(0,b.u)(t,e)),w=(0,_.zo)(e),T=(0,n.useRef)(null),N=(0,n.useRef)(null),M=v&&I,R=M&&!w&&(S||i),P=R||w,L=x.t("Show description"),O=x.t("Add description"),D=R?O:L,F=x.t("ALT"),U=(0,n.useCallback)(e=>{e?.stopPropagation(),e?.preventDefault()},[]),B=(0,n.useCallback)(a=>{a?.stopPropagation(),a?.preventDefault(),M&&k((0,g.k)({file:e,fileIds:t,dialogEntrypoint:y}))},[M,y,k,e,t]),H=(0,n.useCallback)(()=>{(0,o.Fp)(T.current)?.focus()},[]),W=(0,n.useCallback)(e=>{e?.stopPropagation(),e?.preventDefault(),N.current?.closePopover()},[]),V=(0,n.useCallback)(t=>n.createElement(m.AM,{...t,offsetY:-8,onAfterClose:a,onOpen:H},n.createElement("div",{ref:T,className:l()(A().popover,{[A().popoverDynamic]:v})},n.createElement("div",{className:A().popoverHeader},n.createElement("div",{className:A().popoverTitle},x.t("Description")),v&&n.createElement("div",{className:A().popoverHeaderActions},M&&n.createElement(d.A,{onClick:B,size:"small",svgIconProps:E,"aria-label":v?x.t("Edit description"):"Edit description"}),n.createElement(d.A,{onClick:W,size:"small",svgIconProps:C,"aria-label":v?x.t("Close"):"Close"}))),n.createElement("div",{className:l()(A().popoverContent,{[A().popoverContentScrollable]:v})},(0,_.dh)(e)))),[a,H,W,v,M,B,e]),G=(0,n.useMemo)(()=>n.createElement(n.Fragment,null,R&&n.createElement(u.Ah,{name:"plus"}),F),[F,R]),q=(0,n.useMemo)(()=>{if(s){let e=n.cloneElement(s,{className:s.props.className,key:R?"plus-alt-button":"alt-button","aria-label":D,onClick:B,children:G});return n.createElement(p.Ay,{tip:D,hideFromScreenReader:!0},e)}return n.createElement(p.Ay,{tip:D,hideFromScreenReader:!0},n.createElement(c.A,{key:R?"plus-alt-button":"alt-button",onClick:B,className:l()(A().altBadge,"button-inline-flex",{[A().plusAltBadgeWhenActive]:R&&!S}),"aria-label":D},G))},[s,R,B,S,G,D]);return P?R?q:n.createElement(m.Wv,{ref:N,onClick:U,renderPopover:V,position:"top-left"},q):null};FileImageAltBadge.displayName="FileImageAltBadge"},0xf2ea806f:(e,t,a)=>{"use strict";a.d(t,{A:()=>FileImageThumbnailImg});var n=a(0xbad225b5),r=a(0x15bffdd15);function FileImageThumbnailImg({src:e,alt:t,...a}){let i=(0,r.A)(e);return n.createElement("img",{src:i,alt:t,...a})}FileImageThumbnailImg.displayName="FileImageThumbnailImg"},0xf02ea055:(e,t,a)=>{"use strict";a.d(t,{A:()=>V});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20b4dda68),o=a(0x1a256ff50),s=a(0x15e39ab9e),c=a(0x210cf696f),d=a(0xeb42f08f),m=a(0x1b5a5fae),u=a(0xf2ea806f),p=a(0xc31f9833),h=a(0x14813ebd1),_=a(0x3ccc8c8e),f=a(0x8c0b43fc),b=a(0x198199619),g=a(0x180035d06),y=a(0x148efa02a),A=a(0x4a4f65b2),x=a(0xaec471e9),E=a(0x1f3226107),C=a(0xbd3de346),k=a(0x22fd0ecc8),v=a(0x1ec68d6a3),S=a(0x11439744b),I=a(0x107c8ce7),w=a(0x1c91944c9),T=a(0x9b971e7e),N=a(0x1ccef1c6f),M=a(0x1b5e73e1d),R=a(0x251499a17),P=a(0x1266f1359),L=a(0x17a41206b),O=a(0x14149c126),D=a(0xd93ecf94),F=a(0x448f547b),U=a.n(F);let B="FILE-IMAGE-THUMB",H=class extends n.Component{failedAttempts;retryTimer;failedUrl;hasRefreshedFile;isUnmounted;static contextType=g.A;static defaultProps={dimensionSetting:d.A.STRETCH,fileContainerType:l.zk.FILE_MESSAGE_ACTION,isOnline:!0,isFileDetails:!1,disableContextMenu:!1};constructor(e){super(e),this.previewImage=this.previewImage.bind(this),this.onImgError=this.onImgError.bind(this),this.onImgLoad=this.onImgLoad.bind(this),this.renderImage=this.renderImage.bind(this),this.state={broken:!1,loaded:!1},this.failedAttempts=0,this.hasRefreshedFile=!1,this.isUnmounted=!1}componentDidUpdate(e,t){let{isOnline:a,file:n,experimentFileThumbRefreshGroupOn:r}=this.props,{broken:i}=this.state;r&&e.file.thumb_360!==n.thumb_360&&(this.hasRefreshedFile=!1,this.failedAttempts=0),!e.isOnline&&t.broken&&a&&i&&this.setState(()=>({broken:!1,loaded:!1}))}componentWillUnmount(){this.isUnmounted=!0,this.retryTimer&&clearTimeout(this.retryTimer)}onImgError(e){this.failedAttempts+=1;let t=e?.target?.src;this.failedUrl=t,this.setState(()=>({broken:!0,loaded:!1}),async()=>{let{file:e,isOnline:t,logger:a,telemeter:n,refreshFile:r,experimentFileThumbRefreshGroupOn:i}=this.props;if(!t)return;let l=Math.abs(Math.floor(Date.now()/1e3)-(e.created||0));if(l&&l<30){if(this.failedAttempts>1){a.info(B,`retry failed ${e.id}`),n.count("file_image_thumbnail_retry_failed");return}this.retryTimer=window.setTimeout(()=>{this.retryTimer=null,this.setState(()=>({broken:!1}))},2e3);return}if(i){if(this.hasRefreshedFile){a.info(B,`already refreshed file ${e.id}, not calling files.info again`),n.count("file_image_thumbnail_refresh_skipped_already_refreshed");return}a.info(B,`calling files.info to refresh ${e.id} due to thumbnail failure`),n.count("file_image_thumbnail_refresh_triggered"),this.hasRefreshedFile=!0;try{if(await r({fileId:e.id,reason:"thumbnail_load_failure"}),this.isUnmounted)return;this.setState(()=>({broken:!1})),n.count("file_image_thumbnail_refresh_success")}catch(t){a.error(B,`failed to refresh file ${e.id}`,t),n.count("file_image_thumbnail_refresh_failed")}}})}onImgLoad(e){let{logger:t,telemeter:a,file:n}=this.props;this.failedAttempts>0&&(t.info(B,`retry fixed ${n.id}`),a.count("file_image_thumbnail_retry_success"),(e&&e.target&&e.target.src)!==this.failedUrl&&a.count("file_image_thumbnail_retry_success_url_changed")),this.setState(()=>({broken:!1,loaded:!0}))}getTinyThumbBackgroundImage(){let{file:e}=this.props,t=(0,C.PY)(e);return t?`url(${t})`:""}getTinyThumbStyle(){let{broken:e,loaded:t}=this.state,{hasTinyThumb:a}=this.props;if(!a||t&&!e)return{};let n=this.getTinyThumbBackgroundImage();return n?{backgroundImage:n}:{}}previewImage(e){let{file:t,experimentMessageGalleryV2GroupOn:a,experimentMessageGalleryV3GroupOn:n}=this.props;if((0,I.A)(e))return;let{mediaViewerEnabled:r,displayInMediaViewer:i}=this.context,{ts:l,channelId:o,threadTs:s,viewContext:c,clogLinkClick:d,openViewer:m,quipMediaInfoGenerator:u,quipSectionId:h,teamId:_}=this.props;e.preventDefault(),d&&d({subtype:"msg_photo_expand",link_action:"file_viewer_link",item_type:"F",item_id:t.id});let f=t.id;if(c!==b.s.CANVAS)if(h&&u)u().then(({quipFileId:e,files:t})=>{let a=(0,y.lA)({quipFileId:e,fileId:f,entityId:h});m({fileId:f,fileChannelMediaInfo:{fileId:e,files:t},mediaId:a})});else if(r){let e=(0,P.$D)(_),a=(e&&o&&s?(0,p.o)(e,{channelId:o,threadTs:s,ts:l}):[]).find(e=>e.fileId===t.id);i(a?.mediaId||"")}else m({fileId:f,ts:l,channelId:o,threadTs:s,viewContext:c,isStackable:!0,showThread:a||n})}getWidth(e,t){let a,{galleryWidth:n,renderedFilesDimensions:r=[],experimentMessageGalleryV3GroupOn:i}=this.props;if(this.getShouldApplyAspectRatio())return(0,f.cL)({originalWidth:t.original_w,originalHeight:t.original_h,containerWidth:n??0,renderedFilesDimensions:r});if(i&&2===r.length)return(0,f.Eo)({galleryWidth:n??0,renderedFilesDimensions:r,originalWidth:t.original_w??0,originalHeight:t.original_h??0,isContainer:!1}).width;switch(e){case d.A.STRETCH:a=void 0;break;case d.A.FULL_WIDTH:a="100%";break;default:a=t.thumb_360_w}return a}getHeight(e,t){let{experimentMessageGalleryV3GroupOn:a,renderedFilesDimensions:n=[],galleryWidth:r}=this.props;if(!this.getShouldApplyAspectRatio())return a&&2===n.length?(0,f.Eo)({galleryWidth:r??0,renderedFilesDimensions:n,originalWidth:t.original_w||t.thumb_video_w||0,originalHeight:t.original_h||t.thumb_video_h||0,isContainer:!1}).height:e===d.A.DEFAULT?t.thumb_360_h:void 0}getImageType(e){let{experimentMessageGalleryV2GroupOn:t,experimentMessageGalleryV3GroupOn:a}=this.props;if(t||a)return(0,f.Sm)({originalWidth:e.original_w??0,originalHeight:e.original_h??0})}renderAltBadge(){let{file:e,msg:t,onImageDescriptionClose:a,showActions:r,isFileDetails:i}=this.props;return i?null:n.createElement(m.m,{file:e,dialogEntrypoint:R.P.THUMBNAIL_ALT_BADGE,fileIds:t?.files,onImageDescriptionClose:a,showActions:r})}getShouldApplyAspectRatio(){let{experimentMessageGalleryV2GroupOn:e,experimentMessageGalleryV3GroupOn:t,renderedFilesDimensions:a}=this.props;return!!e&&!t||!!t&&!!a&&!!(a.length>2)}renderImage(e){let{file:t,fileContainerType:a,dimensionSetting:r,hasTinyThumb:o}=this.props,{broken:s,loaded:c}=this.state,d=this.getShouldApplyAspectRatio(),m=this.getWidth(r,t),p=this.getHeight(r,t),h=this.getImageType(t),_=(0,f.IS)({originalWidth:t?.original_w??0,originalHeight:t?.original_h??0}),renderImg=e=>!s&&n.createElement(u.A,{className:i()("p-file_image_thumbnail__image",{"p-file_image_thumbnail__image--landscape":h===f.pW.LANDSCAPE&&d,"p-file_image_thumbnail__image--portrait":h===f.pW.PORTRAIT&&d,"p-file_image_thumbnail__image--square":h===f.pW.SQUARE&&d,"p-file_image_thumbnail__image_contain--gallery_v2":_&&d}),alt:(0,k.dh)(t)||"",src:e,width:m,height:p,onError:this.onImgError,onLoad:this.onImgLoad,"data-qa":"file_image_thumbnail_img","data-needs-load":!c||void 0,crossOrigin:a===l.zk.FILE_EMBEDDED_UNFURL?"use-credentials":void 0}),b=this.getTinyThumbStyle();return o?n.createElement("div",{className:i()({"p-file_image_thumbnail__tiny_thumb_wrapper":!d,"p-file_image_thumbnail__image--landscape":h===f.pW.LANDSCAPE&&d&&!c&&!_,"p-file_image_thumbnail__image--portrait":h===f.pW.PORTRAIT&&d&&!c&&!_,"p-file_image_thumbnail__image--square":h===f.pW.SQUARE&&d&&!c&&!_,"p-file_image_thumbnail__tiny_thumb_wrapper_contain--gallery_v2":_&&d&&!c,"p-file_image_thumbnail__tiny_thumb_wrapper--gallery_v2":d},b.backgroundImage&&U().blurFallback),style:{...b,width:m,height:p}},renderImg(e)):renderImg(e)}render(){let e,{file:t,maxSize:a,suppressAnimations:r,fileContainerType:o,disableContextMenu:d,experimentMessageGalleryV2GroupOn:m,experimentMessageGalleryV3GroupOn:u,channelId:p,viewContext:f}=this.props,{broken:b}=this.state,getImageSrc=e=>"full"===a?(0,C.N7)(t,{suppressAnimations:e}):(0,C.mN)(t,{maxSize:a,suppressAnimations:e}),g=getImageSrc(r),y=i()("p-file_image_thumbnail__wrapper",this.props.className,{"p-file_image_thumbnail__wrapper--broken":!!b,"p-file_image_thumbnail__wrapper--gallery_v2":m||u,"p-file_image_thumbnail__wrapper--gallery_v3":u,[U().thumbnailWrapperV2]:m||u},U().thumbnailWrapper),A=r&&t.deanimate;switch(o){case l.zk.FILE_MESSAGE_ACTION:e="message_file_image_thumbnail";break;case l.zk.FILE_EMBEDDED_UNFURL:e="embedded_file_image_thumbnail"}let x=null;if(A){let e=getImageSrc(!1);g&&e&&(x=n.createElement(_.A,{src:g,animatedSrc:e,title:t.title},({source:e})=>this.renderImage(e)))}else x=o===l.zk.FILE_EMBEDDED_UNFURL?n.createElement(c.A,{className:y,"data-qa":e,"data-file-id":t.id,onClick:this.previewImage,renderAsSpan:!0},g&&this.renderImage(g),!b&&g&&this.renderAltBadge()):n.createElement(s.A,{className:y,"data-qa":e,"data-file-id":t.id,href:t.url_private||"",rel:"noopener noreferrer",onClick:this.previewImage},g&&this.renderImage(g),!b&&g&&this.renderAltBadge());return x?n.createElement(h.T,{file:t,disabled:d,channelId:p,viewContext:f},x):null}};function mapStateToProps(e,{file:t,channelId:a,ts:n,viewContext:r}){return{teamId:(0,T.ZT)(e),msg:a&&n?(0,D.Ld)(e,a,n):null,suppressAnimations:!(0,N.ty)(e,"a11y_animations"),isOnline:!!(0,L.Pb)(e),logger:(0,v.Ay)({state:e}),telemeter:(0,S.Cy)({state:e}),hasTinyThumb:(0,C.nY)(t),experimentMessageGalleryV2GroupOn:(0,A.v)(e,r),experimentMessageGalleryV3GroupOn:(0,x._)(e,r),experimentFileThumbRefreshGroupOn:"on"===(0,O._Z)(e,"file_thumb_refresh")}}H.displayName="FileImageThumbnail";let W={openViewer:M.A,refreshFile:E.B2},V=(0,w.N)(mapStateToProps,W,null,{areStatePropsEqual:o.kt})(H)},0x20f503dd9:(e,t,a)=>{"use strict";a.d(t,{M:()=>I,l:()=>S});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11a296110),l=a(0x1faa3f1ac),o=a(0x20e80190e),s=a(0x1c91944c9),c=a(0xe874a88a),d=a(0x1f3226107),m=a(0x11c82607b),u=a(0x23e1fed85);let p=(0,m.Ay)("Calls files.revokePublicURL and upserts the response",(e,t,{fileId:a}={})=>a?e((0,d.BB)({fileId:a})).then(({file:t}={})=>{t&&e((0,u.b)({files:[t]}))}):c.S.reject(Error("fileId missing while calling revokePublicUrlAndUpsert")));p.meta={name:"revokePublicUrlAndUpsert",key:"createThunkRevokePublicUrlAndUpsert",description:"Calls files.revokePublicURL and upserts the response"};var h=a(0x1fcbb004d);let _=new r.Ay("files");function RevokePublicUrlDialog({fileId:e,closeModal:t,revokePublicUrlAndUpsert:a}){let[r,l]=(0,n.useState)(!1),s=(0,n.useCallback)(()=>{l(!0),a({fileId:e}).then(t).catch(()=>l(!1))},[e,t,a,l]);return n.createElement(o.dW,{closeModal:t},n.createElement(o.rQ,null,n.createElement(o.Rc,{title:_.t("Revoke public file link")})),n.createElement(o.$m,null,n.createElement(o.qf,null,n.createElement("p",null,_.t("This will disable the Public Link for this file. This will cause any previously shared links to stop working.")),n.createElement("p",null,_.t("Are you sure you want to revoke this public link?")))),n.createElement(o.jl,null,n.createElement(o.ox,null,n.createElement(o.s_,{type:"outline","aria-label":_.t("Cancel")},_.t("Cancel")),n.createElement(i.Ay,{type:"danger",onClick:s,disabled:r},_.t("Revoke it")))))}RevokePublicUrlDialog.displayName="RevokePublicUrlDialog";let f=(0,s.N)(null,{closeModal:(...e)=>(0,h.O)(...e),revokePublicUrlAndUpsert:(...e)=>p(...e)})(RevokePublicUrlDialog);var b=a(0x46dbff89);let g=(0,m.Ay)("Opens the public URL dialog",(e,t,{fileId:a})=>{a&&e((0,b.q)({element:n.createElement(f,{fileId:a})}))});g.meta={name:"openRevokePublicUrlDialog",key:"createThunkOpenRevokePublicUrlDialog",description:"Opens the public URL dialog"};var y=a(0x1060b2cb),A=a(0xbd3de346),x=a(0x14ea3ce99);let E=new r.Ay("files");function FilePublicUrlDialog({fileId:e,publicUrl:t,closeModal:a,openRevokePublicUrlDialog:r,canRevoke:s}){let c=(0,n.useCallback)(()=>r({fileId:e}),[e,r]);return n.createElement(o.dW,{closeModal:a},n.createElement(o.rQ,null,n.createElement(o.Rc,{title:E.t("Public link to this file")})),n.createElement(o.$m,null,n.createElement(o.qf,null,n.createElement(l.A,{href:t},t))),n.createElement(o.jl,null,n.createElement(o.ox,null,s&&n.createElement(i.Ay,{type:"outline",onClick:c},E.t("Revoke")),n.createElement(o.s_,{type:"primary",autoFocus:!0,"aria-label":E.t("Done")},E.t("Done")))))}function mapStateToProps(e,{fileId:t}){let a=(0,x.Lp)(e,t),n=(0,y.$F)(e,{file:a});return{publicUrl:(0,A.b4)(a),canRevoke:!!n.revoke_public_link}}FilePublicUrlDialog.displayName="FilePublicUrlDialog";let C=(0,s.N)(mapStateToProps,{closeModal:(...e)=>(0,h.O)(...e),openRevokePublicUrlDialog:(...e)=>g(...e)})(FilePublicUrlDialog);var k=a(0x7a7f5d44);let v=(0,m.Ay)("Calls files.sharedPublicURL and upserts response",(e,t,{fileId:a}={})=>a?e((0,k.u)({file:a,reason:"sharing-public-url-of-file"})).then(({file:t})=>{t&&(0,A.E$)(t)&&e((0,u.b)({files:[t]}))}):c.S.reject(Error("fileId missing while calling createPublicUrlAndUpsert")));v.meta={name:"createPublicUrlAndUpsert",key:"createThunkCreatePublicUrlAndUpsert",description:"Calls files.sharedPublicURL and upserts response"};let S=(0,m.Ay)("Opens the public URL dialog",(e,t,{fileId:a,isStackable:r})=>{a&&e((0,b.q)({element:n.createElement(C,{fileId:a}),isStackable:r}))});S.meta={name:"openFilePublicUrlDialog",key:"createThunkOpenFilePublicUrlDialog",description:"Opens the public URL dialog"};let I=(0,m.Ay)("Make the api call to create a public URL and open the dialog",(e,t,{fileId:a,isStackable:n})=>e(v({fileId:a})).then(()=>{e(S({fileId:a,isStackable:n}))}));I.meta={name:"createPublicFileUrlAndOpenDialog",key:"createThunkCreatePublicFileUrlAndOpenDialog",description:"Make the api call to create a public URL and open the dialog"}},0x20552c191:(e,t,a)=>{"use strict";a.d(t,{N:()=>FileThumbnail,M:()=>IconThumbnail});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1535e80f3),o=a(0x15f8e452a),s=a(0x2501a2cee),c=a(0xbd3de346),d=a(0x226892387),m=a(0x1fb2d2a87);function QuipIcon({file:e,hasNotification:t=!1,useIa4Icon:a=!1}){let r=(0,d.d4)(m.to);if(!(0,c.DQ)(e))return null;let l=i()("p-quip_icon_notification_badge",{"p-quip_icon_notification_badge--dark_mode":"dark"===r}),o=i()("p-quip_icon_container",{"p-quip_icon_container__ia4_icon":a});return n.createElement("div",null,n.createElement("div",{className:o},n.createElement(s.Ah,{name:a?"canvas-content-filled":"canvas-content",type:"quip",size:"20"})),t?n.createElement("div",{className:l}):null)}QuipIcon.displayName="QuipIcon";let u=n.memo(QuipIcon);var p=a(0xf5bbd10a),h=a(0x1abdfd657);function MiroIcon({iconClassName:e,file:t,size:a="20"}){let r=(0,p.A)(),l=(0,d.d4)(m.to);return t&&!(0,c.c0)(t)?(r.error(`[MiroIcon] Expected Miro file, got ${(0,h.t)(t)}`),null):n.createElement("div",{className:i()(e,"p-file_miro_icon",`p-file_miro_icon--${l}`)},n.createElement(s.Ah,{name:"brand-miro-filled",size:a}))}MiroIcon.displayName="MiroIcon";let _=n.memo(MiroIcon);var f=a(0x1f2e34d8),b=a(0x1376f3e6),g=a(0x37451d7),y=a(0x1bc80af71),A=a(0x15bffdd15),x=a(0x108b445e9),E=a(0x22fd0ecc8),C=a(0xbac48619),k=a(0x150447374),v=a(0x1ccef1c6f);let S=3/4,I=9/16,w=3/4,T=1/4,N=5/4;function ThumbnailImg({className:e,containerHeight:t,containerWidth:a,file:r,cover:l,suppressAnimations:o}){let s,m,[u,p]=(0,n.useState)(!1),[h,_]=(0,n.useState)(!1),f=(0,d.d4)(e=>!(0,v.ty)(e,"a11y_animations")),b=i()(e,"p-file_thumbnail__img"),{src:g,height:y,width:x}=(0,c.WA)(r,{containerHeight:t,containerWidth:a,cover:l,suppressAnimations:o||f})||{},C=(0,A.A)(g);if(y&&x){let e=y/x,n=e>t/a;l&&n||!l&&!n?s=e*(m=Math.min(a,x)):m=(s=Math.min(t,y))/e}let k=(0,n.useCallback)(()=>p(!0),[]),S=(0,n.useCallback)(()=>_(!0),[]);if(u)return n.createElement("div",{className:"p-file_thumbnail__broken_img",style:{height:t,width:a}});let I=n.createElement("img",{key:r.id,className:b,alt:(0,E.dh)(r)??void 0,src:C,height:s,width:m,onError:k,onLoad:S,"data-qa":"file_thumbnail_img"});return(0,c.nY)(r)&&s&&m?n.createElement("div",{className:"p-file_thumbnail__tiny_thumb_wrapper",style:{backgroundImage:h?void 0:`url(${(0,c.PY)(r)})`,filter:h?void 0:"blur(6px)",height:s,width:m}},I):I}function ImageThumbnail({containerHeight:e,containerWidth:t,cover:a,file:r,suppressAnimations:i}){return n.createElement(ThumbnailImg,{key:r?.id,className:"p-file_thumbnail__image",file:r,containerHeight:e,containerWidth:t,cover:a,suppressAnimations:i})}function DocumentThumbnail({containerHeight:e,containerWidth:t,file:a}){return n.createElement("div",{className:"p-file_thumbnail__document_container",style:{maxHeight:e},"data-qa":"file_thumbnail_doc"},n.createElement(ThumbnailImg,{className:"p-file_thumbnail__document_img",file:a,containerHeight:e,containerWidth:t,cover:!0}))}function IconThumbnail({className:e,file:t,hasNotification:a}){let r=i()("c-icon__file","p-file_thumbnail__file_icon",e),l=(0,d.d4)(g.U);if((0,c.DQ)(t))return n.createElement(u,{file:t,hasNotification:a,useIa4Icon:!0});if((0,c.l7)(t))return n.createElement(f.A,{iconClassName:i()("p-file_thumbnail__file_icon",e),file:t});if((0,c.Y8)(t)&&l)return n.createElement(y.A,{iconClassName:i()("p-file_thumbnail__file_icon",e),file:t});if((0,c.c0)(t))return n.createElement(_,{iconClassName:i()("p-file_thumbnail__file_icon",e),file:t});let s=(0,k.a)(t);return n.createElement(o.A,{className:r,"data-qa":"file_thumbnail_icon",file:"svgicon",type:s})}function FileThumbnail(e){let t,a,{file:r,forceIconThumbnail:u,forceIconThumbnailForDocument:p,presentationOnly:h,hasNotification:_}=e,{original_h:f,original_w:g}=r,y=(0,c.sJ)(r),A=(0,d.d4)(m.to),E=S;e.height&&e.width?E=e.height/e.width:f&&g&&(E=Math.max(E=Math.min(E=f/g,y?N:w),y?T:I));let k=e.width,v=e.height||E*e.width;if((0,C.A)(r))a="exception",t=n.createElement("span",null);else if((0,c.aK)(r))a="exception",t=n.createElement(o.A,{type:"trash"});else if((0,c.Sp)(r))a="exception",t=n.createElement(s.Ah,{name:"lock",size:"20"});else if((0,c.c4)(r))a="exception",t=n.createElement(o.A,{type:"question"});else if((0,c.Bp)(r)||(0,c.Ki)(r)||(0,c.AL)(r))a="exception",t=n.createElement(s.Ah,{name:"lock-filled"});else if((0,c.kn)(r))a="exception",t=n.createElement(s.Ah,{name:"info"});else if((0,c.sR)(r))a="exception",t=n.createElement(o.A,{type:"lock"});else if(y&&!u)a="image",t=n.createElement(ImageThumbnail,{containerWidth:k,containerHeight:v,cover:!!e.cover,file:r,suppressAnimations:e.suppressAnimations});else if(((0,c.pI)(r)||(0,c._y)(r))&&!u){a="video";let e=(0,x.A)(r)?r.transcription_hl?.lines?.[0]?.start_time_ms:void 0;t=n.createElement(b.A,{className:"p-file_thumbnail__media",file:r,useUserAvatarAudioThumb:v>l.RG.xlarge,jumpToTimeMs:e,"data-qa":"file_thumbnail_video"})}else(r.thumb_pdf||r.thumb_360)&&!u&&!p?(a="document",t=n.createElement(DocumentThumbnail,{containerWidth:k,containerHeight:v,file:r})):(a="other",t=n.createElement(IconThumbnail,{file:r,hasNotification:_}));let M=i()("p-file_thumbnail__container",`p-file_thumbnail__container--${a}`,e.className,{"p-file_thumbnail__container--dark-theme":"dark"===A});return n.createElement("div",{className:M,style:{width:k,height:v},"aria-hidden":h,"data-qa":e["data-qa"]},t)}ThumbnailImg.displayName="ThumbnailImg",ImageThumbnail.displayName="ImageThumbnail",DocumentThumbnail.displayName="DocumentThumbnail",IconThumbnail.displayName="IconThumbnail",FileThumbnail.displayName="FileThumbnail"},0x12ed331a9:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>I});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x1229d92d),s=a(0x20482ad21),c=a(0x16ac9b089),d=a(0x9f7220f0),m=a(0x1614f02d1),u=a(0x11a296110),p=a(0x15f8e452a),h=a(0xa624a5c7),_=a(0x1c91944c9);let f=new s.Ay("files"),b=class extends n.Component{buttonRef;constructor(e){super(e),this.onClick=this.onClick.bind(this),this.focus=this.focus.bind(this),this.buttonRef=n.createRef()}onClick(){this.props.cancel(),this.props.dispatchTransitionFocusToPrimaryView()}focus(){this.buttonRef?.current?.focus()}render(){return n.createElement(u.Nm,{key:"cancel",className:"p-file_upload_banner__cancel",onClick:this.onClick,ref:this.buttonRef,"aria-label":f.t("Cancel upload",{fallbackHash:"77dfd2135f4db726c47299bb55be26f7f4525a46"})},n.createElement(p.A,{type:"times"}))}};b.displayName="FileUploadBannerCancelButton";let g=(0,_.N)(null,e=>({dispatchTransitionFocusToPrimaryView:(...t)=>e((0,h.Yu)(...t))}))(b);var y=a(0x182c9b0b0),A=a(0x798b166a),x=a(0x14cf21489),E=a(0x1d6a65362),C=a(0x1ee439e69),k=a(0x19895585a);let v=new s.Ay("files"),S=class extends n.PureComponent{statusAnnouncementTimer=null;static defaultProps={fileName:"",fileCount:0,percentComplete:0,status:x.mK,cancelable:!1,isRetry:!1,teamId:void 0,hideBanner:!1,className:void 0,originWindowId:void 0,windowId:void 0,sendMessageToAnnouncerAPI:l.A};static renderComplete(){let e=v.t("Processing uploaded file\u2026 complete!");return n.createElement("div",{className:"p-file_upload_banner__progress p-file_upload_banner__progress--complete"},n.createElement("div",{className:"p-file_upload_banner__text"},e))}constructor(e){super(e),this.cancel=this.cancel.bind(this),this.clearOverrides=this.clearOverrides.bind(this),this.doneProlongingStatus=this.doneProlongingStatus.bind(this),this.state={statusOverride:null,fileNameOverride:null,timer:null,fading:!1}}componentDidUpdate({status:e}){let{fileName:t,status:a}=this.props,n=[x.Wz,x.wS];a!==e&&(this.maybeAnnounceUpdatedStatus(),n.includes(a)&&this.setState(()=>({statusOverride:a,fileNameOverride:t||null,timer:setTimeout(this.doneProlongingStatus,1e3)})))}componentWillUnmount(){this.state.timer&&clearTimeout(this.state.timer),this.maybeClearStatusAnnouncement()}getFileName(){let{fileName:e}=this.props,{fileNameOverride:t}=this.state;return t||e||""}getStatus(){let{status:e}=this.props,{statusOverride:t}=this.state;return t||e}maybeAnnounceUpdatedStatus(){let{status:e,fileCount:t,sendMessageToAnnouncerAPI:a}=this.props;if(this.maybeClearStatusAnnouncement(),e!==x.mK&&e!==x.g6)return;let n=(t||0)>1?v.t("{fileCount} files",{fileCount:t}):(0,c.Ay)(this.getFileName()),r=e===x.mK?v.t("Uploading {fileDescription}",{fileDescription:n}):v.t("Processing {fileDescription}",{fileDescription:n}),i=e===x.mK?()=>{let{percentComplete:e}=this.props;return e?v.t("{percentComplete} percent",{percentComplete:e}):""}:()=>v.t("Processing");a?.({message:r}),this.statusAnnouncementTimer=setInterval(()=>{let e=i();e&&a?.({message:e})},5e3)}maybeClearStatusAnnouncement(){this.statusAnnouncementTimer&&(clearTimeout(this.statusAnnouncementTimer),this.statusAnnouncementTimer=null)}cancel(){let{teamId:e}=this.props,t=(0,A.iE)(e),a=t.cancelCurrentUpload.bind(t);setTimeout(()=>{a()},1)}clearOverrides(){this.setState(()=>({statusOverride:null,fileNameOverride:null,timer:null,fading:!1}))}doneProlongingStatus(){this.props.status===x.nY?this.setState(()=>({fading:!0,timer:setTimeout(this.clearOverrides,250)})):this.clearOverrides()}renderCanceled(){let{fileCount:e}=this.props,t=this.getFileName(),a=v.t("Canceling {fileName}\u2026",{fileName:(0,c.Ay)(t)});return(e||0)>1&&(a=v.t("Canceling upload\u2026")),n.createElement("div",{className:"p-file_upload_banner__progress p-file_upload_banner__progress--canceled"},n.createElement("div",{className:"p-file_upload_banner__text"},n.createElement(d.z,{assertive:!0},a)))}renderMultiFileUploadComplete(){let{fileCount:e}=this.props,t=v.t("Processing uploaded {fileCount, plural, =1 {file} other {files}}\u2026 complete!",{fileCount:e}),a=v.t("{multiFileUploadComplete} Message ready to be sent.",{multiFileUploadComplete:t});return n.createElement("div",{className:"p-file_upload_banner__progress p-file_upload_banner__progress--complete"},n.createElement(d.A,{assertive:!0,message:a}),n.createElement("div",{className:"p-file_upload_banner__text"},t))}renderUploading(){let e,t,{fileName:a,fileCount:r,percentComplete:l,cancelable:o,isRetry:s}=this.props,d=this.getStatus()===x.g6||(l||0)>=99;d?e=v.t("Processing uploaded {fileCount, plural, =1 {file} other {files}}\u2026",{fileCount:r}):(s?(e=v.t("Re-uploading {fileName}",{fileName:(0,c.Ay)(a||"")}),(r||0)>1&&(e=v.t("Re-uploading {fileCount} files",{fileCount:r}))):(e=v.t("Uploading {fileName}",{fileName:(0,c.Ay)(a||"")}),(r||0)>1&&(e=v.t("Uploading {fileCount} files",{fileCount:r}))),t=`${l}%`);let m=i()("p-file_upload_banner__progress_inner",{"p-file_upload_banner__progress_inner--animated":d}),u={width:`${l}%`},p=null;return o&&!d&&(p=n.createElement(g,{cancel:this.cancel})),n.createElement(n.Fragment,null,n.createElement("div",{key:"bar",role:"progressbar","aria-valuenow":l,className:"p-file_upload_banner__progress"},n.createElement("span",{className:m,style:u})),n.createElement("div",{key:"text",className:"p-file_upload_banner__text"},n.createElement("span",{className:"p-file_upload_banner__text_name"},e),t&&n.createElement("span",{className:"p-file_upload_banner__text_percent"},t)),p)}render(){let e,t=this.getStatus(),{cancelable:a,hideBanner:r,windowId:l,originWindowId:o,container:s,originContainer:c}=this.props,{fading:d}=this.state;if(t===x.nY||r||l!==o)return null;let m=c===k.mq.Split,u=s===k.mq.Split;if(!m&&u||m&&!u)return null;e=t===x.mK||t===x.g6?this.renderUploading():t===x.Wz?this.renderMultiFileUploadComplete():this.renderCanceled();let p=i()("p-file_upload_banner p-message_pane__banner",this.props.className,{"p-file_upload_banner--fading":d,"p-file_upload_banner--cancelable":a});return n.createElement("div",{className:p},e)}};function mapStateToProps(e){let{status:t,fileName:a,fileCount:n,percentComplete:r,cancelable:i,isRetry:l,originWindowId:o,originContainer:s}=(0,E.LV)(e)||{},c=(0,C.H7)(e);return{status:t??x.nY,fileName:a??void 0,fileCount:n??void 0,percentComplete:r,cancelable:i,isRetry:l,teamId:c.id,originWindowId:o,originContainer:s}}S.displayName="FileUploadBanner";let I=(0,y.A)((0,_.N)(mapStateToProps)((0,o.A)((0,m.A)(S))))},0xb1eb2d52:(e,t,a)=>{"use strict";a.d(t,{A:()=>A});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x658a411c),l=a(0x20482ad21),o=a(0x182c9b0b0),s=a(0x839ba347),c=a(0xa794f9e1),d=a(0x19c76d181),m=a(0x217553e42),u=a(0x1c2eef3c8),p=a(0x1973dd8ce);function getDraftsByDestinationId(e,t,a){let n=[];if(!t)return n;let r=(0,u.Hw)(e);return(0,s.A)(r,r=>{let i=(0,c.ue)(r);if(!i)return;let l=(0,c.zl)(r);if(!a&&l&&l.indexOf(t)>-1)return void n.push(i);t&&a&&(0,c.mI)(r).indexOf((0,p.Q)({channelId:t,threadTs:a}))>-1&&n.push(i);let o=(0,c.KL)(r);if(o){let a;if(1===o.length&&(a=(0,m.Pu)(e,o[0])),o.length>1){let t=(0,d.WR)(e);a=(0,m.FB)(e,[t,...o])}a?.id===t&&n.push(i)}}),n}var h=a(0x105ecbbed),_=a(0x1c91944c9),f=a(0x1efa64175),b=a(0x357dacc7);let g=new l.Ay("monkey_bear"),y={width:"100%"};function PendingFileUploadBanner({percentComplete:e}){if(!e)return null;let t=g.t("Uploading\u2026");return n.createElement("div",{className:"p-file_upload_banner p-message_pane__banner"},n.createElement("div",{key:"bar",className:"p-file_upload_banner__progress"},n.createElement("span",{className:"p-file_upload_banner__progress_inner p-file_upload_banner__progress_inner--animated",style:y})),n.createElement("div",{key:"text",className:"p-file_upload_banner__text"},t))}function mapStateToProps(e,{destinationId:t,getSiblingView:a}){let n=(0,b.hP)(e);if((0,r.A)(n))return{percentComplete:0};let{channelId:l,threadTs:o}=(0,p.x)(t),s=getDraftsByDestinationId(e,l,o),c=(0,h.jA)(e,{getSiblingView:a});return s.push(t),c&&s.push(c),{percentComplete:100*!!(0,i.A)(s,t=>{let a=(0,f.l1)(e,t);return(0,i.A)(a,e=>n[e]?.isSending)})}}PendingFileUploadBanner.displayName="PendingFileUploadBanner";let A=(0,o.A)((0,_.N)(mapStateToProps)(PendingFileUploadBanner))},0xb5d4716b:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x130d89881),s=a(0xb1ea448c),c=a(0x1cb091cca),d=a(0x1f3226107),m=a(0xbd3de346);function CsvTsvViewer({fileId:e,hideLineNum:t}){let a=(0,r.wA)(),[i,u]=(0,n.useState)(null),[p,h]=(0,n.useState)(!0);(0,n.useEffect)(()=>{let fetchFile=async()=>{u(await a((0,d.PF)({fileId:e,truncate:!1}))),h(!1)};i||fetchFile()},[a,i,e]);let _=`
`,f=(i?.content||"").replace(/\r\n/g,`
`).split(_),b=0,g=f.map(e=>{let t=[];(0,m.bB)(i)&&(t=(e=>{let t=[],a=!1,n=0;for(let r=0;r<e.length;r++){let i=e[r],l=e[r+1];if(t[n]=t[n]||"",'"'===i&&a&&'"'===l){t[n]+=i,r+=1;continue}if('"'===i){a=!a;continue}if(","===i&&!a){n+=1;continue}t[n]+=i}return t})(e)),(0,m.y)(i)&&(t=e.split("	"));let a=t.length;return(b=b<a?a:b,a>0)?t.map(e=>{let t=e.trim(),a=t.length;return'"'===t.charAt(0)&&'"'===t.charAt(a-1)?t.slice(1,-1):t}):null}),y=g.length,A=y>25?700:Math.max(28*y,28),x=(0,n.useCallback)(()=>g.map((e,t)=>`row-${t}`),[g]),E=(0,n.useCallback)(e=>{if(null!=g&&!g[e])return null;let a=g[e]||[],r=a.length;return b>r&&(a=a.concat(Array(b-r).fill(""))),n.createElement("div",{className:l()("p-csv_tsv_viewer__row",{"p-csv_tsv_viewer__hide-line-num":t}),"data-qa":t?"csv_tsv_viewer_hide_line_num":"csv_tsv_viewer",style:{"--csv-tsv-row-num":e+1}},a.map((e,t)=>{let a=`col-${t}`,r=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");return n.createElement("div",{className:l()("p-csv_tsv_viewer__col",{"p-csv_tsv_viewer__col-num":""!==e.trim()&&!isNaN(e)}),key:a},r)}))},[g,b,t]),renderLoading=()=>n.createElement("div",{className:"p-csv_tsv_viewer p-csv_tsv_viewer__loading"},n.createElement(s.A,null));renderLoading.displayName="renderLoading";let render=()=>n.createElement(o.A,{disableHeight:!0},({width:e})=>n.createElement(c.Ay,{className:"p-csv_tsv_viewer",keys:x().map(e=>e),height:A,rowRenderer:E,width:e,id:"csv-tsv-snippet-view",role:"listbox",shouldHorizontallyScroll:!0,"aria-label":""}));return render.displayName="render",p?renderLoading():render()}CsvTsvViewer.displayName="CsvTsvViewer";let u=CsvTsvViewer},0x6c89741c:(e,t,a)=>{"use strict";a.d(t,{k:()=>w,A:()=>M});var n=a(0xbad225b5),r=a(0x2bba3a0),i=a(0x1a256ff50),l=a(0x481ccd2f),o=a(0x1cbdfeceb),s=a(0x1626d9977),c=a(0xe8e6ff7d),d=a(0xbc5eb268),m=a(0x20482ad21),u=a(0x344bb842),p=a(0x210cf696f),h=a(0x1c91944c9),_=a(0x251499a17),f=a(0x1fcbb004d);let b=new m.Ay("multi_file_upload"),g={name:"close"},y=class extends n.PureComponent{static defaultProps={title:void 0,disableFileEditOptions:!1,closeModal:o.A,openEditFileDialog:o.A};constructor(e){super(e),this.closeModal=this.closeModal.bind(this),this.editFile=this.editFile.bind(this)}closeModal(){this.props.closeModal()}editFile(){let{file:e}=this.props;this.props.openEditFileDialog({isStackable:!0,file:e,dialogEntrypoint:_.P.MEDIA_VIEWER_BUTTON})}render(){let{title:e,disableFileEditOptions:t}=this.props,a=b.t("Close");return n.createElement("div",{className:"p-file_viewer__header"},n.createElement("div",{className:"p-file_viewer__header__meta"},n.createElement("div",{className:"p-file_viewer__header__meta__stack"},n.createElement("div",{className:"bold"},e),e&&!t&&n.createElement(p.A,{className:"p-file_viewer__header__meta__minor",onClick:this.editFile},b.t("Edit file details")))),n.createElement("div",{className:"p-file_viewer__header__actions"},n.createElement(u.A,{className:"p-file_viewer__header__button",backgroundStyle:void 0,onClick:this.closeModal,"aria-label":a,svgIconProps:g})))}};y.displayName="Header";let A=(0,h.N)(null,e=>({closeModal:()=>e((0,f.O)()),openEditFileDialog:t=>e((0,_.A)(t))}))(y);var x=a(0xbd3de346),E=a(0x22fd0ecc8),C=a(0x226892387),k=a(0x14ea3ce99),v=a(0x1d864af40),S=a(0x357dacc7);let FileViewer=({fileId:e,image:t,showPrev:a=!1,showNext:r=!1,disableFileEditOptions:i=!1,disableContextMenu:l=!1,onPrev:m=o.A,onNext:u=o.A})=>{let p=(0,C.d4)(t=>(0,k.Lp)(t,e)),h=p,_=(0,C.d4)(t=>(0,v.N)(t,e)),f=(0,C.d4)(e=>(0,k.Lp)(e,_));(0,x.E$)(p)||(h=f);let b=(0,C.d4)(t=>(0,S.Oq)(t,{pendingFileId:e})),g=b?.file,y=(0,x.E$)(h)?h:g,I=(0,E.V)(y)||y.name;if(g){let e=b?.title;e&&(I=e)}if(y&&t)return n.createElement(s.A,{contentLabel:I},n.createElement(A,{file:y,title:I,disableFileEditOptions:i}),n.createElement(c.A,{file:y,image:t,shouldUseImageFromFile:!1,disableContextMenu:l},n.createElement(d.V,{onPrev:m,onNext:u,showPrev:a,showNext:r})))};FileViewer.displayName="FileViewer";var I=a(0xc31f9833);let w="file-navigation-controller",T=class FileNavigationController extends n.Component{static getDerivedStateFromProps(e,t){let{ts:a,image:n,youtube:i,fileId:l}=t,o={ts:a,image:n,youtube:i,fileId:l},s=(0,r.A)(e.images,e=>FileNavigationController.matchImage(e,o));return s<0?{index:-1}:{index:s,ts:a,image:n,youtube:i,fileId:l}}static matchImage(e,t){return e.ts===t.ts&&(!!e.fileId&&!!t.fileId&&e.fileId===t.fileId||!!e.image&&!!t.image&&e.image.src===t.image.src||!!e.youtube&&!!t.youtube&&e.youtube.src===t.youtube.src)}constructor(e){super(e),this.onPrev=this.onPrev.bind(this),this.onNext=this.onNext.bind(this);const{ts:t,image:a,youtube:n,fileId:r}=e,i={ts:t,image:a,youtube:n,fileId:r},l=e.images.findIndex(e=>FileNavigationController.matchImage(e,i));this.state={ts:t,index:l,image:a,youtube:n,fileId:r}}componentDidUpdate(){(this.state.index<0||!this.props.images.length)&&this.props.closeModal({closeNamed:[w]})}onNext(){this.setState((e,t)=>{if(e.index>=t.images.length-1)return e;let a=e.index+1,{ts:n,image:r,youtube:i,fileId:l}=t.images[a]||{};return{index:a,ts:n,image:r,youtube:i,fileId:l}})}onPrev(){this.setState((e,t)=>{if(0===e.index)return e;let a=e.index-1,{ts:n,image:r,youtube:i,fileId:l}=t.images[a]||{};return{index:a,ts:n,image:r,youtube:i,fileId:l}})}render(){let{images:e,isPendingView:t,disableFileEditOptions:a,disableContextMenu:r}=this.props,{index:i}=this.state;if(i<0||!e.length)return null;let o=i>0,s=i<e.length-1,{image:c,youtube:d,userId:m,botId:u,fileId:p,title:h,date:_,externalUrl:f}=e[i]||{};return t&&p?n.createElement(FileViewer,{fileId:p,image:c,showPrev:o,showNext:s,onPrev:this.onPrev,onNext:this.onNext,disableFileEditOptions:a,disableContextMenu:r}):n.createElement(l.A,{botId:u,userId:m,fileId:p,image:c,youtube:d,externalUrl:f,title:h,date:_,showPrev:o,showNext:s,onPrev:this.onPrev,onNext:this.onNext})}};T.displayName="FileNavigationController";let N={closeModal:f.O},M=(0,h.N)((e,{channelId:t,images:a,threadTs:n,ts:r,viewContext:i})=>({images:a||(0,I.C)(e,{channelId:t,threadTs:n,ts:r,viewContext:i})||[]}),N,null,{areStatePropsEqual:i.kt})(T)},0x17d2efa1c:(e,t,a)=>{"use strict";a.d(t,{A:()=>ef});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x125763ad),s=a(0x20b4dda68),c=a(0x62a17882),d=a(0x20482ad21),m=a(0xf3c40abe),u=a(0x344bb842),p=a(0x99233ecb),h=a(0x4c96e5d9),_=a(0xec8d5140),f=a(0x20f503dd9),b=a(0x1060b2cb),g=a(0x84332f42),y=a(0x230670247),A=a(0x138aa1844),x=a(0x124f71042),E=a(0x92be6ba5),C=a(0x16cf1da63),k=a(0x40c0d834),v=a(0x1c18c5d4e),S=a(0x1059ba41d),I=a(0x3711e82d),w=a(0xeeae4283),T=a(0x226892387);let N=new d.Ay("slackforce"),M={name:"ellipsis-vertical-filled"},R={onClick:{enableClogAction:!0},elementName:"download"},P={onClick:{enableClogAction:!0},elementName:"open_in_salesforce"},EmailFileViewerActions=({file:e})=>{let t=(0,C.wA)(),a=(0,T.d4)(v.I),r=!(0,S.g9M)()&&e.url_private_download,i=(0,n.useCallback)(()=>{t((0,w.A)({file:e}))},[t,e]),l=(0,n.useCallback)(t=>{let l=[{label:N.t("Download"),show:r,click:i,autoClogProps:R},{label:N.t("Open in Salesforce"),show:!a,href:e.external_url||"",autoClogProps:P}].filter(e=>void 0===e.show||e.show);return n.createElement(p.a,{...t,template:l,width:"auto"})},[a,e.external_url,i,r]),o=N.t("More actions");return n.createElement(k.A,{eventId:I.EventId.LOB_SALESFORCE_INTEGRATIONS,uiComponentName:I.UiComponentName.SLACKFORCE_EMAIL_FILE_VIEWER_ACTIONS,fileType:e.filetype},n.createElement(p.cQ,{renderMenu:l,position:"top-right"},n.createElement(h.Ay,{tip:o,position:"top"},n.createElement(u.A,{"aria-label":o,svgIconProps:M,backgroundStyle:"dark"}))))};EmailFileViewerActions.displayName="EmailFileViewerActions";var L=a(0x1f3226107),O=a(0x1a02c72b5),D=a(0x182c9b0b0),F=a(0xbd3de346),U=a(0x108b445e9),B=a(0x1a1bf97fe),H=a(0x184bdf20),W=a(0x25005369a),V=a(0x12e2c86ba),G=a(0x1ad2b0609),q=a(0xa1832ae4),j=a(0x45012309),z=a(0x1cae2f048),K=a(0x1c91944c9),$=a(0x1d600678),Y=a(0x1090ec8f9),Q=a(0x16a97f29c),Z=a(0x251499a17),J=a(0x2f04ca84),X=a(0x22d443103),ee=a(0x6467352),et=a(0x225278752),ea=a(0x15f2fd44c),en=a(0x217553e42),er=a(0x17a41206b),ei=a(0x14149c126),el=a(0x8c94c891),eo=a(0x693246f3),es=a(0x1fcbb004d),ec=a(0x46dbff89),ed=a(0x1de4133),em=a(0x1ee439e69);let eu=new d.Ay("file"),ep=class extends n.Component{static contextType=x.A;static defaultProps={includeCloseButton:!1,blockFileDownloadsForUntrustedClients:!1,isFileAuthorExternal:!1,showDownloadButton:!0,showShareButton:!0,showOpenWindow:!0,iconButtonBackgroundStyle:"light",menuPosition:"bottom-right",tooltipPosition:"bottom",onMenuOpen:l.A,onMenuClose:l.A,isTemplate:!1,showPdfPrintButton:!0,onViewSummary:l.A,isFileOwner:!1,experimentFilesShareContextGroupOn:!1};focusRefs=[];downloadIcon={name:"download"};printIcon={name:"print"};ellipsisIcon={name:"ellipsis-horizontal-filled"};externalLinkIcon={name:"new-window"};shareIcon={name:"share-message"};closeIcon={name:"close"};constructor(e){super(e),this.onDownload=this.onDownload.bind(this),this.onShare=this.onShare.bind(this),this.onPrint=this.onPrint.bind(this),this.clogLinkClick=this.clogLinkClick.bind(this),this.clogLinkClickForOverflowMenu=this.clogLinkClickForOverflowMenu.bind(this),this.editFile=this.editFile.bind(this),this.deleteFile=this.deleteFile.bind(this),this.reportFile=this.reportFile.bind(this),this.renderMenu=this.renderMenu.bind(this),this.openWindow=this.openWindow.bind(this),this.renderMoreActions=this.renderMoreActions.bind(this),this.onRemovePreview=this.onRemovePreview.bind(this),this.onDeleteSummary=this.onDeleteSummary.bind(this)}componentDidMount(){this.props.hasKeyboardFocus&&this.focusRefs.length&&this.focusRefs[0]?.focus()}onDeleteSummary(){let{dispatchOpenModal:e,file:t}=this.props;t&&e({element:n.createElement(E.A,{file:t}),isStackable:!0})}onShare(){let{file:e}=this.props;e&&(this.props.openShareDialog({fileId:e.id,isStackable:!0}),this.trackAction(I.UiElement.SHARE_FILE_BUTTON),this.clogLinkClickForActionButton({link_action:"file_share_action",subtype:"file_share"}))}onDownload(e){e.stopPropagation(),e.preventDefault();let{file:t}=this.props;t&&this.props.downloadFile({file:t,clog:!1,action:ea.c.ViewFile}).then(e=>this.clogLinkClickForActionButton({link_action:"file_ssb_download_link",subtype:"file_download",is_successful:e}))}onPrint(){let{file:e}=this.props;if(!e||!(0,F.F1)(e))return;let t=(0,F.fX)(e);t&&((0,z.A)(t),this.clogLinkClickForActionButton({link_action:"file_print_action"}))}onRemovePreview(){let{file:e}=this.props;e&&(this.clogLinkClickForOverflowMenu({link_action:"file_remove_preview_action",contexts:{ui_context:{action:"delete",ui_component:"file_preview"}}}),this.props.editFile({fileId:e.id,title:e.title,removeThumbPdf:!0}),this.props.closeModal())}onCloseModal(){this.props.closeModal()}trackAction(e){let{clogger:t,file:a}=this.props;if(!a)return;let n={element_value:a.id,view_context:s.zk.FILE_VIEWER},r={action:I.UiAction.CLICK,ui_element:e,ui_properties:n};t.track(I.EventId.FILE_ACTION,{contexts:{ui_context:r}})}clogLinkClick(e){let{file:t}=this.props;t&&this.props.clogFileClick({file:t,payload:e})}clogLinkClickForActionButton(e={}){return this.clogLinkClick((0,o.A)(e,{contexts:{ui_context:{ui_step:I.UiStep.FILE_VIEWER,ui_properties:{element_name:"file_action_button"}}}}))}clogLinkClickForOverflowMenu(e={}){return this.clogLinkClick((0,o.A)(e,{contexts:{ui_context:{ui_step:I.UiStep.FILE_VIEWER,ui_properties:{element_name:"file_action_menu"}}}}))}deleteFile(){let{file:e,onDelete:t}=this.props;e&&(this.props.openDeleteFileDialog({fileId:e.id,isStackable:!0}),t?.())}reportFile(){let{file:e,team:t,defaultWorkspace:a}=this.props;if(!e||!a)return;let n=this.context,r=n?.threadTs,i=encodeURI((0,F.IE)(e,t?.id,r));(0,q.gC)(a,`/help/requests/report-content?u=${i}&type=file`)}openWindow(e){let{file:t}=this.props;if(t&&(0,c.dY)("4.6.0")){if((0,F.sJ)(t)){this.props.openImageInNewChildWindow({file:t}),e.preventDefault();return}(0,F.F1)(t)&&(this.props.openPDFInNewChildWindow({file:t}),e.preventDefault())}}editFile(){let{file:e}=this.props;e&&this.props.openEditFileDialog({file:e,isStackable:!0,dialogEntrypoint:Z.P.FILE_ACTIONS_MENU})}renderAttachmentActions(){if(!this.props.attachmentSrc||this.props.file)return null;let e=this.props.attachmentSrcTooltip||eu.t("Open original");return n.createElement(h.Ay,{tip:e,position:this.props.tooltipPosition,delay:h.PK},n.createElement(u.A,{className:i()("p-file_viewer__header__button",this.props.iconButtonClassName),svgIconProps:this.externalLinkIcon,backgroundStyle:this.props.iconButtonBackgroundStyle,href:this.props.attachmentSrc,"data-qa":"file_viewer_attachment_src","aria-label":e}))}renderPrintAction(){return this.props.showPdfPrintButton&&this.props.file&&(0,F.F1)(this.props.file)&&this.props.canPrintPDF?n.createElement(h.Ay,{tip:eu.t("Print"),position:this.props.tooltipPosition,delay:h.PK},n.createElement(u.A,{className:i()("p-file_viewer__header__button",this.props.iconButtonClassName),svgIconProps:this.printIcon,backgroundStyle:this.props.iconButtonBackgroundStyle,onClick:this.onPrint,"aria-label":eu.t("Print"),ref:e=>this.focusRefs.push(e)})):null}renderMoreActions(e){if(this.props.file)return n.createElement(p.cQ,{renderMenu:e,position:this.props.menuPosition,onOpen:this.props.onMenuOpen,onClose:this.props.onMenuClose},n.createElement(h.Ay,{tip:eu.t("More actions"),position:this.props.tooltipPosition,delay:h.PK},n.createElement(u.A,{className:i()("p-file_viewer__header__button",this.props.iconButtonClassName),svgIconProps:this.ellipsisIcon,backgroundStyle:this.props.iconButtonBackgroundStyle,onClick:l.A,"data-qa":"file_viewer_actions_menu_btn","aria-label":eu.t("More actions")})))}renderFileActions(){let e;if(!this.props.file)return null;let{children:t,isOffline:a,file:r,fileTeam:l}=this.props,o=this.props.showDownloadButton&&!a,s=eu.t("Download");return this.props.isFileAuthorExternal&&l&&(s=eu.t("Download from {teamName}",{teamName:(0,q.F1)(l)})),e=(0,B.K)(r)?n.createElement(EmailFileViewerActions,{file:r}):(0,U.A)(r)||(0,H.A)(r)||(0,F._y)(r)?n.createElement(A.A,{file:r,msg:this.props.msg,onDelete:this.props.onDelete,viewContext:y.wj,onViewThread:this.props.onViewThread,onViewTranscript:this.props.onViewTranscript},e=>this.renderMoreActions(e)):this.renderMoreActions(this.renderMenu),n.createElement(n.Fragment,null,o&&n.createElement(h.Ay,{tip:s,position:this.props.tooltipPosition,delay:h.PK},n.createElement(u.A,{className:i()("p-file_viewer__header__button",this.props.iconButtonClassName),svgIconProps:this.downloadIcon,backgroundStyle:this.props.iconButtonBackgroundStyle,onClick:this.onDownload,"aria-label":s,ref:e=>this.focusRefs.push(e)})),this.renderPrintAction(),this.props.showShareButton&&n.createElement(h.Ay,{tip:eu.t("Share file\u2026"),position:this.props.tooltipPosition,delay:h.PK},n.createElement(u.A,{className:i()("p-file_viewer__header__button",this.props.iconButtonClassName),svgIconProps:this.shareIcon,backgroundStyle:this.props.iconButtonBackgroundStyle,onClick:this.onShare,"aria-label":eu.t("Share file\u2026"),ref:e=>this.focusRefs.push(e)})),t,e)}renderMenu(e){if(!this.props.file)return;let t={file:this.props.file,actions:this.props.fileActions,isSnippet:!1,fileDownloadUrl:this.props.fileDownloadUrl,fileRefreshState:void 0,clogLinkClick:this.clogLinkClickForOverflowMenu,refreshFile:this.props.refreshFile,includeStar:!1,includeSaved:!0,updateStar:this.props.updateStar,editFile:this.editFile,deleteFile:this.deleteFile,onDeleteSummary:this.onDeleteSummary,reportFile:this.reportFile,openWindow:this.props.showOpenWindow?this.openWindow:void 0,navigate:this.props.navigate,openFilePublicUrlDialog:this.props.openFilePublicUrlDialog,createPublicFileUrlAndOpenDialog:this.props.createPublicFileUrlAndOpenDialog,openFileInBrowser:this.props.openFileInBrowser,inFileDetails:!1,isOffline:this.props.isOffline,reportToSlackEnabled:this.props.reportToSlackEnabled,includeDownload:!this.props.showDownloadButton,onDownload:this.onDownload,includeShare:!this.props.showShareButton,onShare:this.onShare,onViewThread:this.props.onViewThread,addSavedFile:this.props.addSavedFile,removeSavedFile:this.props.removeSavedFile,isTemplate:this.props.isTemplate,removePreview:this.onRemovePreview,isFileOwner:!0,dispatchLinkCopiedToast:this.props.dispatchLinkCopiedToast,channelId:this.props.channelId,bookmark:this.props.bookmark,fromFileViewer:!0,experimentFilesShareContextGroupOn:this.props.experimentFilesShareContextGroupOn},a=(0,g.V)(t);return n.createElement(p.a,{...e,width:220,template:a,stripTerminalSeparators:!0,onMenuItemSelected:(t,a)=>!a.defaultPrevented&&e.onMenuItemSelected?.(t,a)})}render(){let e=eu.t("Close");return n.createElement("div",{className:i()("p-file_viewer__header__actions",this.props.className)},this.renderFileActions(),this.renderAttachmentActions(),this.props.includeCloseButton&&n.createElement(n.Fragment,null,n.createElement("div",{className:"p-file_viewer__header__separator"}),n.createElement(h.Ay,{tip:e,position:this.props.tooltipPosition,delay:h.PK},n.createElement(u.A,{className:i()("p-file_viewer__header__button",this.props.iconButtonClassName),"data-qa":"file_viewer_header_close_button",svgIconProps:this.closeIcon,backgroundStyle:this.props.iconButtonBackgroundStyle,onClick:this.onCloseModal,"aria-label":e}))))}};ep.displayName="FileViewerActions";let eh={closeModal:es.O,updateStar:et.A,navigate:O.o,openFilePublicUrlDialog:f.l,createPublicFileUrlAndOpenDialog:f.M,clogFileClick:Y.q,openEditFileDialog:Z.A,openShareDialog:X.A,openDeleteFileDialog:Q.A,downloadFile:w.A,refreshFile:ee.A,openImageInNewChildWindow:el.d,openPDFInNewChildWindow:eo.U,openFileInBrowser:J.A,addSavedFile:ed.jx,removeSavedFile:ed.U4,editFile:L.$y,dispatchOpenModal:ec.q,dispatchLinkCopiedToast:_.M},e_=(0,K.N)((e,{getPrimaryView:t,...a})=>({blockFileDownloadsForUntrustedClients:(0,$.x)(e,"block_file_download"),fileDownloadUrl:a.file&&((0,W.S)(e,a.file)??void 0),canPrintPDF:(0,z.E)(e),isOffline:!(0,er.Pb)(e),clogger:(0,j.eo)({state:e}),isFileAuthorExternal:a.file&&(0,V.t)(e,a.file.id),fileTeam:a.file&&a.file.user_team?(0,em._J)(e,a.file.user_team):void 0,team:(0,em.H7)(e),reportToSlackEnabled:(0,G.J)(e),isTemplate:a.file&&(0,F.dE)(a.file),defaultWorkspace:(0,em.fu)(e),isFileOwner:a.file&&(0,F.vH)(e,a.file),channelId:(0,en.OL)(e,t(e)?.id)?.id,experimentFilesShareContextGroupOn:"on"===(0,ei._Z)(e,"files_share_context")}),eh),ef=(0,D.A)(e_((0,m.A)((0,b.CV)(ep))))},0x1626d9977:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20e80190e),l=a(0x1fcbb004d);let FileViewerContainer=({children:e,contentLabel:t})=>{let a=(0,r.wA)(),o=(0,n.useCallback)(()=>a((0,l.O)()),[a]);return n.createElement(i.dW,{fullscreen:!0,showCloseButton:!1,className:"p-file_viewer__body",overlayClassName:"p-file_viewer__modal_overlay",contentLabel:t,closeModal:o},n.createElement("div",{className:"p-file_viewer"},e))};FileViewerContainer.displayName="FileViewerContainer";let o=n.memo(FileViewerContainer)},0xe8e6ff7d:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x1229d92d),l=a(951303e3),o=a(0x1a256ff50),s=a(0xb1ea448c),c=a(0xb5d4716b),d=a(0x204e4deb9),m=a(0x8db27ef6),u=a(0x1f0d39659),p=a(0xbd3de346),h=a(0x24a2e2ed),_=a(0x1c5663457),f=a(0x8edc8141),b=a(0xa985ed31),g=a(0x1c91944c9),y=a(0x1ccef1c6f),A=a(0x1fcbb004d);let x=class extends n.Component{static defaultProps={file:void 0,image:void 0,shouldUseImageFromFile:!1,pdf:void 0,youtube:void 0,children:null,onDidZoomLevelChange:r.A,closeFileViewer:r.A,withoutZoomInteractions:!1,viewContext:void 0,hideZoomControls:!1,windowRef:(0,l.O)(window),customHandleReset:r.A,isLoading:!1,canPreviewBoxRemoteFiles:!1,onPDFDownloaded:r.A,loaderComponent:null,reloadOnFileChange:!1,isEditDialogImagePreview:!1,isEditDialogImagePreviewLoading:!1,alwaysShowZoomControls:!1,disableContextMenu:!1};constructor(e){super(e),this.state={rotation:e.image&&e.image.orientation?e.image.orientation:0},this.rotateImage=this.rotateImage.bind(this)}rotateImage(e,t){this.setState(()=>({rotation:e}),()=>t(e))}renderImageViewer(){let{image:e,file:t,onDidZoomLevelChange:a,viewContext:r,hideZoomControls:i,customHandleReset:l,isEditDialogImagePreview:o,alwaysShowZoomControls:s,disableContextMenu:c}=this.props;return e?n.createElement(u.Ay,{key:e.src,file:t,onDidZoomLevelChange:a,image:{src:e.src,animatedSrc:e.animatedSrc,isAnimated:e.isAnimated,altText:e.altText,width:e.width,height:e.height,orientation:this.state.rotation,thumbnailUrl:e.thumbnailUrl,mimeType:e.mimeType},closeImageViewer:this.props.closeFileViewer,withoutZoomInteractions:this.props.withoutZoomInteractions,viewContext:r,rotateImage:this.rotateImage,hideZoomControls:i,customHandleReset:l,isEditDialogImagePreview:o,alwaysShowZoomControls:s,disableContextMenu:c}):null}renderPDFViewer(){let{pdf:e,file:t,viewContext:a,windowRef:r,canPreviewBoxRemoteFiles:i}=this.props;return e&&t?n.createElement(d.A,{key:e.src,file:t,src:e.src,isConvertedPdf:e.isConvertedPdf,viewContext:a,windowRef:r,canPreviewBoxRemoteFiles:i,onPDFDownloaded:this.props.onPDFDownloaded,loaderComponent:this.props.loaderComponent,reloadOnFileChange:this.props.reloadOnFileChange}):null}renderCsvTsvViewer(){let{file:e}=this.props;return e&&((0,p.bB)(e)||(0,p.y)(e))?n.createElement(c.A,{fileId:e?.id,hideLineNum:!0}):null}renderYoutubeViewer(){let{youtube:e}=this.props;return e&&this.props.closeFileViewer?n.createElement(m.A,{src:e.src,closeViewer:this.props.closeFileViewer}):null}renderLoading(){let{isLoading:e,isEditDialogImagePreviewLoading:t}=this.props;return e||t?n.createElement("div",{className:"p-file_viewer__loading"},n.createElement(s.A,null)):null}render(){return n.createElement("div",{className:"p-file_viewer__content"},this.renderLoading(),this.renderImageViewer(),this.renderPDFViewer(),this.renderCsvTsvViewer(),this.renderYoutubeViewer(),this.props.children)}};x.displayName="FileViewerContent";let E=(0,g.N)((e,t)=>{let{file:a,image:n,shouldUseImageFromFile:r,isEditDialogImagePreview:i}=t,l=n;return r&&a&&(l=(0,p.Cd)(a)||(0,p.eX)(a)?(0,_.xk)(a):a?.id&&(0,b.A)(a.id)||!i?(0,_.Ee)(a,{suppressAnimations:!(0,y.ty)(e,"a11y_animations"),canPreviewRemoteImage:(0,h.S)(e,a),shouldUseCustomFileStore:(0,f.A)(e,a),image:n}):n),{image:l,isEditDialogImagePreviewLoading:i&&!l}},(e,t)=>({closeFileViewer:t.closeFileViewer||(()=>e((0,A.O)()))}),null,{areStatePropsEqual:o.kt})((0,i.A)(x))},0xbc5eb268:(e,t,a)=>{"use strict";a.d(t,{V:()=>FileViewerNavigation});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0x8601851c),l=a(0x20482ad21),o=a(0xdbb55997),s=a(0xa6f3163b),c=a(0x2501a2cee);let d=new l.Ay("file");let FileViewerNavigation=class FileViewerNavigation extends n.PureComponent{static defaultProps={showPrev:!1,showNext:!1,onPrev:r.A,onNext:r.A};keyCommands;constructor(e){super(e),this.onPrev=this.onPrev.bind(this),this.onNext=this.onNext.bind(this),this.keyCommands=new i.A}componentDidMount(){this.keyCommands.bindAll([{keys:"left",handler:this.onPrev},{keys:"right",handler:this.onNext}])}componentWillUnmount(){this.keyCommands.reset()}onNext(e){(0,o.A)(e.target)||this.props.onNext?.()}onPrev(e){(0,o.A)(e.target)||this.props.onPrev?.()}renderNext(){let e=d.t("Next");return n.createElement(s.A,{className:"p-file_viewer__nav p-file_viewer__nav--next",onClick:this.onNext,"data-qa":"file_viewer_navigation_next","aria-label":e},n.createElement(c.Ah,{name:"arrow-right"}))}renderPrev(){let e=d.t("Previous");return n.createElement(s.A,{className:"p-file_viewer__nav p-file_viewer__nav--prev",onClick:this.onPrev,"data-qa":"file_viewer_navigation_prev","aria-label":e},n.createElement(c.Ah,{name:"arrow-left"}))}render(){let{showPrev:e,showNext:t}=this.props;return e||t?n.createElement(n.Fragment,null,e&&this.renderPrev(),t&&this.renderNext()):null}};FileViewerNavigation.displayName="FileViewerNavigation"},0x481ccd2f:(e,t,a)=>{"use strict";a.d(t,{A:()=>eu});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x1cbdfeceb),l=a(0x1075d3a9c),o=a.n(l),s=a(0x1a256ff50),c=a(0x18c2d4c6f),d=a(0x1626d9977),m=a(0xe8e6ff7d),u=a(0x120c268ad),p=a.n(u),h=a(0x20482ad21),_=a(0x1d5f57074),f=a(0x1c659cbb1),b=a(0x1e5781b84),g=a(0x178109f89),y=a(0x17d2efa1c),A=a(0x10fb9a645);let x=new h.Ay("file"),E=class extends n.PureComponent{render(){let e,t,{title:a,botId:r,userId:i,date:l,file:o,externalUrl:s,attachmentSrc:c}=this.props,d=(i||r)&&n.createElement(f.Ay,{size:36,botId:r,userId:i,className:"p-file_viewer__header__meta__avatar",isInteractive:!1});s&&(e=(0,_.Ay)(s).host,t=x.t("Open on {domain}",{domain:e}));let m=i&&n.createElement(b.A,{className:"p-file_viewer__header__meta__name",id:i}),u=l&&n.createElement(A.A,{timestamp:l.toString(),full:!0}),h=e||n.createElement(n.Fragment,null,m,u),E=p()("p-file_viewer__header__meta__stack",{"p-file_viewer__header__meta__stack--no-meta-minor":!h});return n.createElement("div",{className:"p-file_viewer__header"},n.createElement("div",{className:"p-file_viewer__header__meta"},d,n.createElement("div",{className:E},n.createElement("div",{className:"p-file_viewer__header__meta__title","data-qa":"file_viewer_header_title"},"object"==typeof a?n.createElement(g.A,a):a),n.createElement("div",{className:"p-file_viewer__header__meta__minor","data-qa":"file_viewer_header_meta_minor"},h))),n.createElement(y.A,{file:o,attachmentSrc:s||c,attachmentSrcTooltip:t}))}};E.displayName="Header";var C=a(0xbc5eb268),k=a(0x198199619),v=a(0x230670247),S=a(0x1f3226107),I=a(0xbd3de346),w=a(0x92599c42),T=a(0x24b7f48bb),N=a(0x22fd0ecc8),M=a(0x1c5663457),R=a(0x3711e82d),P=a(0xf4c5686f),L=a(0x1ec68d6a3),O=a(0x1c91944c9),D=a(0x9b971e7e),F=a(0x1ccef1c6f),U=a(0x226892387),B=a(0x14ea3ce99),H=a(0xca924ee1),W=a(0x1b40cb959),V=a(0x1a8cc04e1),G=a(0x1c7cb6e50),q=a(0x1266f1359),j=a(0x1595ba3b5);let z="remote-file-preview-token-store",K=(0,H.A)(()=>new V.Ay({storeKey:"remoteFilePreviewTokens",fetch:e=>(0,q.Qw)(e,(0,W.W)({reason:"_fetch_"})).then(t=>{let a=(0,G.t)(t);(0,q.Qw)(e,(0,j._)(a))}),isEnabled:()=>!0,metricsName:"generate-provider-token-for-file-store"})),maybeRefetch=e=>K().maybeRefetch(e,z);var $=a(0x1cf0d97e1);let Y=(0,$.Ay)((e,t,a)=>(a&&t&&maybeRefetch(t),e.remoteFilePreviewTokens||null));Y.meta={name:"getRemoteFileTokensWithExpiry",key:"createSelectorGetRemoteFileTokensWithExpiry",description:(e,t,a)=>(a&&t&&maybeRefetch(t),e.remoteFilePreviewTokens||null)};var Q=a(0x1a54910a1);let Z=(0,$.Ay)(e=>e.remoteFilePreviewUrl||null);Z.meta={name:"getRemoteFilePreviewUrl",key:"createSelectorGetRemoteFilePreviewUrl",description:e=>e.remoteFilePreviewUrl||null};var J=a(0x1ee15af19),X=a(0x1e2051844),ee=a(0xe874a88a),et=a(0x18dac2b8e),ea=a(0x16998c9bf),en=a(0xbaaab71e),er=a(0x1b4891be7),ei=a(0x7fae732f),el=a(0x16ed1b0dc),eo=a(0x11c82607b),es=a(0x217553e42),ec=a(0x22309215f),ed=a(0x19895585a);let fetchFromBoxPreviewApi=async(e,t,a,n,r)=>{let i=null;try{let e={url:t};r&&(e.targetFormat=r),i=JSON.stringify(e)}catch{i=null}if(!i)return new ee.S((e,t)=>t(Error("Box preview api: request body is null")));let l={"content-type":"application/json",Authorization:e||""};return new ee.S((e,t,r)=>{let o=new XMLHttpRequest,s=new Date().valueOf();o.addEventListener("load",()=>{if(200===o.status||202===o.status)a.clogger.track(R.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:R.UiAction.CLICK,action_status:R.UiActionStatus.SUCCESS},core:{api_name:"box_preview",http_status_code:o.status,api_latency_ms:new Date().valueOf()-s,file_type:n.filetype}}}),e(o.response);else{let e=Error(`Box preview api: responseStatus - ${o.status}`);e.name=o.response.error,a.clogger.track(R.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:R.UiAction.CLICK,action_status:R.UiActionStatus.FAIL},core:{api_name:"box_preview",http_status_code:o.status,error_type:e.name,file_type:n.filetype}}}),a.logger.error(e,{file_id:n.fileId},{subtype:n.subtype}),t(e)}}),o.addEventListener("error",()=>{let e=Error(`Box preview api: received error - ${o.status}`);e.name="box_preview_api_res_error",a.clogger.track(R.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:R.UiAction.CLICK,action_status:R.UiActionStatus.FAIL},core:{api_name:"box_preview",http_status_code:o.status||0,error_type:e.name,file_type:n.filetype}}}),a.logger.error(e,{file_id:n.fileId},{subtype:n.subtype}),t(e)}),r&&r(()=>o.abort()),o.responseType="json",o.withCredentials=!0,o.open("POST","https://account.box.com/app-api/slack-v2/preview",!0),Object.keys(l).forEach(e=>o.setRequestHeader(e,l[e])),o.send(i)})},fetchProviderUrl=async(e,t,a,n,r,i)=>{let l=null;if((0,et.Cu)()){let a=await i((0,er.r)({reason:"_fetch_",providerToken:e,fileUrl:t}));if(a){let e=(0,G.t)(a);e.width||(e.width=0),e.height||(e.height=0),e.animatedDownloadUrl="",l={...e,errorCode:""}}}else{let i=await fetchFromBoxPreviewApi(e,t,n,r);if(i){let o=(0,G.t)(i);if(o.animatedDownloadUrl="",a&&o.isAnimated){let a=await fetchFromBoxPreviewApi(e,`${t}`,n,r,"png"),i=o.downloadUrl;(o=(0,G.t)(a)).isAnimated=!0,o.animatedDownloadUrl=i}o.width=0,o.height=0,l={...o,errorCode:""}}}return l},em=(0,eo.Ay)("Fetch remote file preview url",async(e,t,{externalUrl:a,remoteFilePreviewTokens:n,suppressAnimations:r,loggers:i,logParams:l},o)=>{let s,c=t(),{getSiblingView:d}=o(en.U),m=d(c,{container:ed.mq.Primary})?.id,u=(0,J.A)(n.teamIdJwtTokenMap)?.jwtToken;if(void 0!==n.teamIdJwtTokenMap&&n.teamIdJwtTokenMap.length>1&&(0,el.A)(m)){let e=(0,es.OL)(t(),m);if(void 0!==(s=(0,ei.n)(t(),e)||"")&&""!==s){let e=(0,X.A)(n.teamIdJwtTokenMap,{teamId:s});void 0!==e&&(u=e.jwtToken)}}try{let t=await fetchProviderUrl(u||"",a,r,i,l,e);if(null!=t)if(t.isReady){let a=(0,G.t)(t);""!==a.downloadUrl&&a.token&&(a.downloadUrl+=`?access_token=${a.token}`),e((0,Q.D5)(a))}else e((0,Q.Dj)(ec.m.PreviewNotReady))}catch(t){e((0,Q.Dj)((0,ea.iT)(t).name||""))}});function FileViewer({title:e,botId:t,userId:a,date:l,externalUrl:s,image:u,pdf:p,youtube:h,file:_,fileId:f,showPrev:b=!1,showNext:g=!1,onPrev:y=i.A,onNext:A=i.A,viewContext:x,onDidZoomLevelChange:I=i.A,hideZoomControls:w=!1,closeFileViewer:N,withoutZoomInteractions:M=!1,customHandleReset:O=i.A,openFileViewerErrorModal:B=i.A,attachmentSrc:H,shouldUseImageFromFile:W=!0,disableContextMenu:V=!1}){let G=(0,U.d4)(P.e),q=(0,U.d4)(e=>(0,L.Ay)({state:e,label:ec.o})),[j,$]=(0,n.useState)(0),J=(0,U.d4)(D.ZT),X=(0,U.d4)(e=>!!_&&(0,T.$)(e,_)),ee=(0,U.d4)(e=>!(0,F.ty)(e,"a11y_animations")),et=(0,U.d4)(e=>J&&_?Y(e,J,X):void 0),ea=(0,U.d4)(Z),en=ea?.downloadUrl||"",er=_?.external_url||null,ei=(0,r.wA)();(0,n.useEffect)(()=>()=>{ei((0,Q.Hj)())},[ei]),(0,n.useEffect)(()=>{f&&!_&&ei((0,S.B2)({fileId:f,reason:"file-viewer"}))},[f,_,ei]),(0,n.useEffect)(()=>{if(X&&er&&et&&J)if(et.expiry>0&&o()().unix()>=et.expiry)K().markObjectsAsStale(J,[z]);else et.teamIdJwtTokenMap.length>0&&ei(em({externalUrl:er,remoteFilePreviewTokens:et,suppressAnimations:ee,loggers:{logger:q,clogger:G},logParams:{fileId:f??"",filetype:_?.filetype??"",subtype:ec.o}}))},[X,J,er,f,_?.filetype,q,G,ei,et,ee]),(0,n.useEffect)(()=>{if(X&&en&&ea?.format!=="pdf"){let e=new Date().valueOf(),t=new Image;t.src=en,t.setAttribute("style","display:none"),t.onload=()=>{t&&(G.track(R.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:R.UiAction.IMPRESSION,action_status:R.UiActionStatus.SUCCESS},core:{api_name:"box_download",http_status_code:200,api_latency_ms:new Date().valueOf()-e,file_type:_?.filetype}}}),ei((0,Q.Oo)({width:t.width,height:t.height})),t=null)},t.onerror=()=>{G.track(R.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:R.UiAction.IMPRESSION,action_status:R.UiActionStatus.FAIL},core:{api_name:"box_download",http_status_code:400,error_type:"download_image_error",file_type:_?.filetype}}}),q.error(Error("Box file download failed"),{file_id:f},{subtype:ec.o}),t=null}}},[X,en,ea?.format,G,q,f,_?.filetype,ei]);let el="object"==typeof e?e?.text??"":e??"";if(X&&ea?.errorCode&&"function"==typeof B)return B({errorCode:ea.errorCode,externalUrl:er}),null;let eo=X&&""===en,es=n.createElement(m.A,{image:u,pdf:p,youtube:h,file:_,shouldUseImageFromFile:W,onDidZoomLevelChange:e=>{I&&I(e),$(e)},viewContext:x,key:f,hideZoomControls:w,closeFileViewer:N,withoutZoomInteractions:M,customHandleReset:O,isLoading:eo,canPreviewBoxRemoteFiles:X,disableContextMenu:V},x!==v.wj&&x!==k.s.CANVAS&&n.createElement(C.V,{showPrev:b&&0===j,showNext:g&&0===j,onPrev:y,onNext:A}));return x===v.wj||x===k.s.CANVAS?n.createElement(c.A,{subtype:"files"},es):n.createElement(c.A,{subtype:"files"},n.createElement(d.A,{contentLabel:el},n.createElement(E,{title:e,botId:t,userId:a,date:l,file:_,attachmentSrc:H,externalUrl:s}),es))}em.meta={name:"fetchRemotePreviewUrl",key:"createThunkFetchRemotePreviewUrl",description:"Fetch remote file preview url"},FileViewer.displayName="FileViewer";let eu=(0,O.N)((e,t)=>{if(t.fileId){let a,n=(0,B.Lp)(e,t.fileId);if(!n)return{};let r=!(0,F.ty)(e,"a11y_animations"),i=t?.youtube?.src??(0,M.Cc)(n,{suppressAnimations:r})??null;if((0,T.$)(e,n)){let a,r,i=Z(e),{filetype:l}=n;if(i&&""!==i.downloadUrl&&l)if(w.hp.includes(l)&&0!==i.width&&0!==i.height){let e=i.width,t=i.height;a={src:i.downloadUrl,width:e,height:t,isAnimated:i.isAnimated,altText:(0,N.dh)(n)??"",thumbnailUrl:i.downloadUrl,mimeType:n.mimetype},i.isAnimated&&i.animatedDownloadUrl&&(a.animatedSrc=i.animatedDownloadUrl)}else w.bc.concat(w.TT).includes(l)&&i.downloadUrl&&(r={src:i.downloadUrl,isConvertedPdf:!1});return{...t,title:(0,N.V)(n),botId:n.bot_id,userId:n.user,date:n.timestamp,image:a,pdf:r,file:n,shouldUseImageFromFile:!1}}return(0,I.F1)(n)&&(a={src:(0,I.fX)(n)??"",isConvertedPdf:(0,I.Ts)(n)}),{...t,title:(0,N.V)(n),botId:n.bot_id,userId:n.user,date:n.timestamp,pdf:a,file:n,attachmentSrc:i}}return{}},null,null,{areStatePropsEqual:s.kt})(FileViewer)},0x23c853006:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=a(0x481ccd2f).A},0x204e4deb9:(e,t,a)=>{"use strict";a.d(t,{A:()=>D});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x225645a46),s=a(0xe874a88a),c=a(0x18dac2b8e),d=a(0x20482ad21),m=a(951303e3),u=a(0xd35ac109),p=a(0xb1ea448c),h=a(0x15fb82076),_=a(0xbb0c5132),f=a(0x14813ebd1),b=a(0x230670247),g=a(0x15a8943a8),y=a(0x25005369a),A=a(0x3711e82d),x=a(0x45012309),E=a(0x1ec68d6a3),C=a(0x1c91944c9),k=a(0x1d600678),v=a(0xeeae4283),S=a(0x15f2fd44c),I=a(0x1fb2d2a87),w=a(0x1fcbb004d),T=a(0x22309215f),N=a(0x16ffed5ab);let M=new d.Ay("file_viewer"),R="pdf_pages",P="context_menu_request",L=class extends n.Component{fetchPromise;viewerPromise;onViewerReady;viewer;containerRef;static defaultProps={clientTheme:"light",windowRef:(0,m.O)(window)};constructor(e){super(e),this.onDownload=this.onDownload.bind(this),this.onMessage=this.onMessage.bind(this),this.onViewerReady=l.A,this.fetchPromise=null,this.viewerPromise=null,this.viewer=n.createRef(),this.containerRef=n.createRef(),this.state={loading:!0,error:!1}}componentDidMount(){if(!this.props.src)return;this.fetchPromise=this.fetchPDF(),this.viewerPromise=new s.K(e=>{this.onViewerReady=e}),this.init();let e=(0,m.h)(this.props.windowRef||window);e&&e.addEventListener("message",this.onMessage)}componentDidUpdate(e){e.src!==this.props.src&&this.props.reloadOnFileChange&&(this.fetchPromise=this.fetchPDF(),this.viewerPromise=new s.K(e=>{this.onViewerReady=e}),this.init())}componentWillUnmount(){this.fetchPromise&&this.fetchPromise.cancel(),this.viewerPromise&&this.viewerPromise.cancel();let e=(0,m.h)(this.props.windowRef||window);e&&e.removeEventListener("message",this.onMessage)}onDownload(e){e.preventDefault();let{file:t}=this.props;t&&this.props.downloadFile({file:t,action:S.c.ViewFile})}onError(){this.setState(()=>({loading:!1,error:!0}))}onMessage(e){let{blockFileDownloadsForUntrustedClients:t,fileDownloadUrl:a,logger:r,isConvertedPdf:i}=this.props;if(!e.source||e.source.parent!==(0,m.h)(this.props.windowRef||window))return void r.warn("PDF-VIEWER","Received a message from a source that is not a child");if(!(e.data?.source?.startsWith("react-devtools")||e.data?.type?.startsWith("webpack")))switch(this.getMessageType(e.data)){case"pdf_iframe_ready":r.debug("PDF-VIEWER","iframe ready"),this.onViewerReady(e.source);break;case"pdf_rendered":r.debug("PDF_RENDERED","pdf rendered");break;case"close_file_viewer":r.debug("PDF-VIEWER","requesting close"),this.props.closeModal();break;case"corrupt_pdf":r.error("PDF-VIEWER","corrupt PDF"),this.onError();break;case P:if(this.containerRef.current&&"number"==typeof e.data.x&&"number"==typeof e.data.y){let t=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.data.x,clientY:e.data.y});this.containerRef.current.dispatchEvent(t)}break;case R:{if(!i||25!==e.data.pdf_pages)break;let r=t?{renderAsSpan:!0}:{href:a??"about:blank"},l=M.rt("You\u2019re previewing the first 25 pages of this file. <link>Download the file to see all pages.</link>",{},({key:e,text:t})=>n.createElement(h.A,{key:e,onClick:this.onDownload,"data-qa":"pdf_viewer_download",...r},t)),o=n.createElement(_.Ay,null,n.createElement("span",null,l));this.props.enqueueToast({element:o});break}default:r.warn("PDF-VIEWER","not handling unknown message",e.data)}}getMessageType(e){if((0,o.A)(e)){if(e.pdf_pages)return R;if(e.type===P)return P}return e}fetchPDF(){let{src:e,canPreviewBoxRemoteFiles:t,clogger:a,logger:n,file:r}=this.props;return e?new s.K((i,l,o)=>{let s=new XMLHttpRequest,c=new Date().valueOf();s.addEventListener("load",()=>{if(t)if(200===s.status)a.track(A.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:A.UiAction.IMPRESSION,action_status:A.UiActionStatus.SUCCESS},core:{api_name:"box_download",http_status_code:s.status,api_latency_ms:new Date().valueOf()-c,file_type:r?.filetype}}});else{let e=Error(`Box preview api: responseStatus - ${s.status}`);a.track(A.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:A.UiAction.IMPRESSION,action_status:A.UiActionStatus.FAIL},core:{api_name:"box_download",http_status_code:s.status,error_type:"download_pdf_error",file_type:r?.filetype}}}),n.error(e,{file_id:r?.id},{subtype:T.o}),l(e);return}i(s.response)}),s.addEventListener("error",()=>{let e=`PDF load request failed with status ${s.status}`;t&&(a.track(A.EventId.BOX_REMOTE_FILE_PREVIEWS,{contexts:{ui_context:{action:A.UiAction.IMPRESSION,action_status:A.UiActionStatus.FAIL},core:{api_name:"box_download",http_status_code:s.status||0,error_type:"download_pdf_error",file_type:r?.filetype}}}),n.error(Error(e),{file_id:r?.id},{subtype:T.o})),l(Error(e))}),o?.(()=>s.abort()),s.responseType="arraybuffer",s.withCredentials=!0,t&&(s.withCredentials=!1),s.open("GET",e),s.send()}):s.K.reject(Error("No PDF src specified"))}init(){s.K.all([this.fetchPromise,this.viewerPromise]).then(([e,t])=>{this.props.logger.debug("PDF-VIEWER","all good! ready to send",e,t),this.setState(()=>({loading:!1})),this.sendPDF(e,t),this.props.onPDFDownloaded&&this.props.onPDFDownloaded(t)}).catch(e=>{this.props.logger.error(e),this.onError()})}sendPDF(e,t){let{logger:a}=this.props;if(!e||!t){a.error("PDF-VIEWER","wtf? no data or viewer",e,t),this.onError();return}a.debug("PDF-VIEWER","sending buffer to iframe",e,t),t.postMessage(e,"*",[e])}renderError(){return n.createElement("div",{className:"p-pdf_viewer__error","data-qa":"pdf_viewer_error"})}renderLoading(){return this.state.loading?this.props.loaderComponent?this.props.loaderComponent:n.createElement("div",{className:"p-pdf_viewer__loading","data-qa":"pdf_viewer_loading"},n.createElement(p.A,null)):null}render(){let{clientTheme:e,src:t,pdfViewerPath:a,disableContextMenu:r,file:l}=this.props,{error:o}=this.state;if(!t||o)return this.renderError();let s={};if("dark"===e&&(s.theme="dark"),this.props.viewContext&&this.props.clipsDesignImprovementsEnabled&&(s.viewContext=this.props.viewContext),(0,c.b3)()){let e=(0,u.nT)(window.location.search);e?.use_env_pdf_viewer||(s.js_path=`${e?.js_path}`)}let d=(0,u.iU)(s),m=`${a||"/pdf-viewer"}${d}`,p=(0,c.KV)()||(0,c.YG)()||(0,c.Yl)()||(0,c.f9)(),h=n.createElement("div",{ref:this.containerRef,className:i()("p-pdf_viewer",{"p-pdf_viewer--media_viewer":this.props.viewContext===b.wj&&this.props.clipsDesignImprovementsEnabled}),"data-qa":"pdf_viewer_container"},this.renderLoading(),n.createElement("iframe",{className:"p-pdf_viewer__frame",src:m,ref:this.viewer,title:M.t("PDF Viewer"),sandbox:p?"allow-popups allow-scripts":void 0,credentialless:p?"credentialless":void 0}));return l?n.createElement(f.T,{file:l,disabled:r},h):h}};L.displayName="PDFViewer";let O={closeModal:w.O,downloadFile:v.A,enqueueToast:N.M},D=(0,C.N)((e,t)=>({logger:(0,E.Ay)({state:e}),clogger:(0,x.eo)({state:e}),clientTheme:(0,I.to)(e),blockFileDownloadsForUntrustedClients:(0,k.x)(e,"block_file_download"),clipsDesignImprovementsEnabled:"themed_blur"!==(0,g.K5)(),fileDownloadUrl:(0,y.S)(e,t.file)}),O)(L)},0xc31f9833:(e,t,a)=>{"use strict";a.d(t,{C:()=>getImagesFromChannel,o:()=>getMediaQueueFromThread});var n=a(0x1d5f57074),r=a(0x148efa02a),i=a(0xbd3de346),l=a(0x108d3428e),o=a(0x21d6ed371),s=a(0x1b0a362c3),c=a(0xa88049da),d=a(0x105ecbbed),m=a(0x1c7cb6e50),u=a(0x235ff1eab),p=a(0x8ad213fa),h=a(0x4f725d55),_=a(0xb04c4a12),f=a(0x203d83ff),b=a(0xc561af5),g=a(0x14ea3ce99),y=a(0xd93ecf94);function getImagesFromChannel(e,{channelId:t,threadTs:a,ts:A,viewContext:x,includeAllMediaTypes:E=!1}){if(!t||!A)return[];let C=(0,y.Ld)(e,t,A),k=a||(0,s.L)(C),v=(x===_.Y.THREAD||x===_.Y.THREADS_VIEW)&&k,S=[];if(v||!x||x===_.Y.MESSAGE_PANE){let a=v?(0,d.Iu)(t,k):t,n=(0,b.tp)(e,a,A);n&&n.timestamps&&(S=n.timestamps.map(a=>(0,y.Ld)(e,t,a)).filter(e=>!!e))}!S.length&&C&&(S=[C]);let I=[],w=[];return S.forEach(t=>{let a=0;if(!v&&(0,o.dK)(t))return;let{userId:s,botId:d}=(0,c.A)(e,t),m=t.files||t.file&&[t.file];m&&m.forEach(n=>{let l=(0,g.Lp)(e,n),o={ts:t.ts,fileId:n};(0,i.sJ)(l)&&I.push(o),E&&(0,i.PX)(l)&&(w.push({mediaId:(0,r.QF)({ts:t.ts,mediaIndex:a}),msgTs:t.ts,...o}),a+=1)});let _=t.attachments;_&&_.forEach(o=>{(o.app_unfurl_url||o.original_url||o.from_url)&&(s=(0,h.A)(o.author_id)?o.author_id:void 0,d=(0,p.A)(o.author_id)?o.author_id:o.bot_id);let c=o.title_link||o.original_url||o.app_unfurl_url;if(c||!o.from_url||(0,f.A)((0,n.Ay)(o.from_url).hostname)||(c=o.from_url),o.image_url){let n={userId:s,botId:d,ts:t.ts,date:Number(o.ts||t.ts),image:{src:(0,u.Ay)(e,{url:o.image_url,rotate:!0}),width:o.image_width,height:o.image_height,sizeForRetina:!0,deanimatedSrc:(0,u.Ay)(e,{url:o.image_url,rotate:!0,stopAnimations:!0})},title:{type:"plain_text",text:o.title||o.author_name,emoji:!0},externalUrl:c};if(I.push(n),E){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...n,externalUrl:c||o.image_url}),a+=1}}if(E&&(o.audio_html||o.video_html)){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,externalUrl:c,...o}),a+=1}o.blocks&&o.blocks.forEach(n=>{if("image"===n.type){let i={userId:s,botId:d,ts:t.ts,date:Number(o.ts||t.ts),image:{src:(0,u.Ay)(e,{url:n.image_url,rotate:!0}),width:n.image_width,height:n.image_height,sizeForRetina:!0,deanimatedSrc:(0,u.Ay)(e,{url:n.image_url,rotate:!0,stopAnimations:!0})},title:n.title||o.original_url||o.app_unfurl_url,externalUrl:c};if(I.push(i),E){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...i}),a+=1}}if("video"===n.type&&n.video_url){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...n}),a+=1}if(E&&"file"===n.type||"table"===n.type){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...n}),a+=1}}),o.files&&o.files.forEach(n=>{let o={ts:t.ts,fileId:n.id},s=(0,g.Lp)(e,n.id);if((0,i.sJ)(s)&&I.push(o),E&&((0,i.sJ)(s)||(0,i.F1)(s)||(0,i.CL)(s)||(0,l.A)(s)||(0,i._y)(s))){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...o}),a+=1}})}),t.blocks&&t.blocks.forEach(n=>{if("image"===n.type){let i={userId:s,botId:d,ts:t.ts,image:{src:(0,u.Ay)(e,{url:n.image_url,rotate:!0}),width:n.image_width,height:n.image_height,sizeForRetina:!0,deanimatedSrc:(0,u.Ay)(e,{url:n.image_url,rotate:!0,stopAnimations:!0})},title:n.title};if(I.push(i),E){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...i}),a+=1}}if("video"===n.type&&n.video_url){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...n}),a+=1}if("table"===n.type){let e=t.ts;w.push({mediaId:(0,r.QF)({ts:e,mediaIndex:a}),msgTs:e,...n}),a+=1}})}),E?w.map(e=>(0,m.A)(e)):I}function getMediaQueueFromThread(e,{channelId:t,threadTs:a,ts:n}){return getImagesFromChannel(e,{channelId:t,threadTs:a,ts:n,viewContext:_.Y.THREAD,includeAllMediaTypes:!0})}},0x8db27ef6:(e,t,a)=>{"use strict";a.d(t,{A:()=>YoutubeViewer});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x151a93a75);let l=new r.Ay("file_viewer");let YoutubeViewer=class YoutubeViewer extends n.Component{containerElement;constructor(e){super(e),this.containerElement=n.createRef(),this.handleContainerClick=this.handleContainerClick.bind(this)}handleContainerClick(e){e.target===this.containerElement.current&&this.props.closeViewer()}renderError(){return n.createElement("div",{className:"p-pdf_viewer__error"})}render(){let{src:e}=this.props,t=e?(0,i.E8)(e):"",a=`https://www.youtube.com/embed/${t}`;return e&&""!==t?n.createElement("div",{className:"p-youtube_viewer",ref:this.containerElement,onClick:this.handleContainerClick},n.createElement("div",{className:"p-youtube_viewer__video"},n.createElement("div",{className:"p-youtube_viewer__responsive_container"},n.createElement("iframe",{className:"p-youtube_viewer__iframe",src:a,frameBorder:"0",allowFullScreen:!0,title:l.t("Youtube Video for App"),"data-qa":"youtube_viewer"})))):this.renderError()}};YoutubeViewer.displayName="YoutubeViewer"},0x12c8377bb:(e,t,a)=>{"use strict";a.d(t,{A:()=>aO});var n=a(0xbad225b5),r=a(0xc26f5c40),i=a(0x120c268ad),l=a.n(i),o=a(0x155d02b1c),s=a(0x125763ad),c=a(0x1cbdfeceb),d=a(0xbe5e39b6),m=a(0xb97b797e),u=a(0x20b4dda68),p=a(0x62a17882),h=a(0x20482ad21),_=a(0x16ac9b089),f=a(0x11a296110),b=a(0x344bb842),g=a(0x99233ecb),y=a(0x2501a2cee),A=a(0x4c96e5d9),x=a(0x1fdec3e16),E=a(0x125de1ee5),C=a(0x112d5d28c),k=a(0xec8d5140),v=a(0x171c34b90),S=a(0x930afbbd),I=a(0xf4f3c80f),w=a(0x20f503dd9),T=a(0xe28bfa77),N=a(0x1266327e6),M=a(0x1060b2cb),R=a(0x84332f42),P=a(0x124f71042),L=a(0x4a4f65b2),O=a(0xaec471e9),D=a(0x1d8f0e558),F=a(0x5e61a73e),U=a(0x483ff0d),B=a(0x11036d95f);function withPeeksContext(e){let t=n.forwardRef((t,a)=>n.createElement(B.Z.Consumer,null,r=>n.createElement(e,{ref:a,...t,...r})));return t.displayName=`withPeeks(${e.displayName})`,t}withPeeksContext.displayName="withPeeksContext";let H=withPeeksContext;var W=a(0x92be6ba5),V=a(0x125518961),G=a(0x3ca4e1cc),q=a(0x1b6f39a31),j=a(0x238c0d7af),z=a(0x22ee3e0e1),K=a(0x1b26458f7),$=a(0x13dd2b9ca),Y=a(0x1f3226107),Q=a(0x1a02c72b5),Z=a(0xd6a16321),J=a(0x182c9b0b0),X=a(0xbd3de346),ee=a(0xbac48619),et=a(0x167d76333),ea=a(0xa1832ae4),en=a(0x14ea3ce99),er=a(0x1ee439e69),ei=a(0x24b7f48bb),el=a(0x25005369a),eo=a(0x22fd0ecc8),es=a(0x1abdfd657),ec=a(0x1a3aebc27),ed=a(0x12e2c86ba),em=a(0x1c450e1a),eu=a(0x1ad2b0609),ep=a(0xa5fcf051),eh=a(0x242eba684),e_=a(0x3711e82d),ef=a(0x45012309),eb=a(0x6d72337),eg=a(0xc4548bcd),ey=a(0x1cae2f048),eA=a(0x107e97a6b),ex=a(0x1c91944c9),eE=a(0x1d600678),eC=a(0x1ccef1c6f),ek=a(0x1f113e65c),ev=a(0x1d6936809),eS=a(0x102edf836),eI=a(0x193edc1da),ew=a(0x10a716a94),eT=a(0x17ea0fa2c),eN=a(0x12185e091),eM=a(0xa9a7442),eR=a(0x217553e42),eP=a(0x14149c126);let eL=new h.Ay("monkey_bear"),eO={entities:{channels:{includeArchived:!1,includeExternallyShared:!1,includePrivate:!1}},allowEmptyQuery:!0},eD=class extends n.Component{static defaultProps={hasError:!1,onChange:c.A,loaded:!1,customSearchOptions:null};constructor(e){super(e),this.onChange=this.onChange.bind(this),this.getChannels=this.getChannels.bind(this),this.onOptionSelected=this.onOptionSelected.bind(this),this.state={selectedOption:e.value?inlineChannelOption(e.value):void 0}}onOptionSelected(e){let{value:t,label:a}=e,{onChange:n}=this.props;this.setState(()=>({selectedOption:{value:t,label:a}})),n?.(t)}onChange(e,t){this.setState(()=>({selectedOption:{value:e,label:t}})),this.props.onChange?.(e)}getChannels(e){let t={...eO,entities:{channels:{...eO.entities.channels,includePrivate:!1}}};return this.props.fetchChannels(e,t).then(e=>e.map(e=>inlineChannelOption(e.id)))}renderChannelOption(e){return e?.value?n.createElement(eI.A,{channelId:e.value}):eL.t("Select an existing channel")}render(){let{hasError:e,loaded:t}=this.props,a=e?[{id:"invalid_channel",message:eL.t("Please select a valid channel")}]:void 0;return n.createElement(ew.A,{subtype:"imports_channel_mapping_select"},n.createElement(eM.m,{isRequired:!1,errors:a,selectId:"imports_channel_mapping_select",placeholderText:eL.t("Select an existing channel"),ariaLabel:eL.t("Select an existing channel"),debounceWaitPeriod:200,search:this.getChannels,renderOption:this.renderChannelOption,renderSelectedOption:this.renderChannelOption,onOptionSelected:this.onOptionSelected,selectedOption:this.state.selectedOption,key:t?"1":"0",width:"100%",selectDataQa:"channel-mapping-channel-select"}))}};function inlineChannelOption(e){return{value:e,label:n.createElement("div",{className:"p-file_list__select__member"},n.createElement(eI.A,{channelId:e}))}}eD.displayName="ChannelMappingChannelSelect",inlineChannelOption.displayName="inlineChannelOption";let eF=(0,ex.N)((e,t)=>{if(!t.value)return{loaded:!0};let a=(0,eR.OL)(e,t.value),n="on"===(0,eP._Z)(e,"imports_allow_private_channel");return{loaded:(0,eN.Zx)(a),experimentImportsAllowPrivateChannelGroupOn:n}},(e,{customSearchOptions:t})=>({fetchChannels:(a,n)=>e((0,eT.$P)({query:a,options:t||n}))}))(eD);var eU=a(0x20e80190e),eB=a(0x16ef98cf),eH=a(0x217c68a35),eW=a(0x71933eef);function extractEmailAddressesFromEmail(e){let t=[];return e.from&&t.push(...e.from),e.to&&t.push(...e.to),e.cc&&t.push(...e.cc),t.filter(e=>e.address&&eW.tN.EMAIL.exec(e.address)).map(e=>e.address)}var eV=a(0x11c82607b),eG=a(0x14a5dae9c),eq=a(0x1ffbda36f),ej=a(0x15176067);let createEmailMessageEphemeralBlocks=({permalink:e})=>[{type:"section",block_id:"post_email_ephemeral_msg_blk",text:{type:"plain_text",text:new h.Ay("slack-connect-email").t("Would you like to post the email in this channel?")}},{type:"actions",block_id:"post_email_actions_blk",elements:[{type:"button",text:{type:"plain_text",text:"Dismiss"},value:"dismiss",action_id:"cea_dismiss_cta"},{type:"button",style:"primary",text:{type:"plain_text",text:"Post Email"},value:e,action_id:"post_email_cta"}]}],ez=(0,eV.Ay)("opens create channel modal with invitees from email",(e,t,{file:a,channelId:n})=>{let r=t(),i=(0,eq.H)(r,{channelId:n}),l=extractEmailAddressesFromEmail(a).filter(e=>e!==i?.address),o=(0,ek.ZQ)(r,l,!0),s=(0,ek.HN)(a.subject);e((0,eG.A)({channelName:s,defaultToPrivate:!0,createSharedChannel:!0,entryPoint:eH.IV.EmailObject,initialInvitedEmails:o,onChannelCreated:t=>{let n=createEmailMessageEphemeralBlocks({permalink:a.permalink});e((0,ej.A)({temporary:!0,message:{channel:t.id,text:n[0]?.text?.text,blocks:n}}))}}))});ez.meta={name:"createChannelFromEmailObject",key:"createThunkCreateChannelFromEmailObject",description:"opens create channel modal with invitees from email"};var eK=a(0x1dff4f8b1),e$=a(0x11eae4d05);let eY=new h.Ay("slack_connect"),eQ={entities:{channels:{includeArchived:!1,includeExternallyShared:!0,includePrivate:!1}},allowEmptyQuery:!0},SlackConnectAddToChannelModal=e=>{let{createChannelFromEmailObject:t,currentTopLevelTeam:a,file:r,initialInvitedEmails:i,onChannelSelected:l,parentChannelId:o,navigateToChannel:s,startChannelInviteModal:c,entryPoint:d}=e,[m,u]=(0,n.useState)(),p=(0,n.useCallback)(()=>{r&&o&&t({file:r,channelId:o})},[o,t,r]),h=(0,n.useCallback)(async()=>{m&&(await s(m),c({channelId:m,initialSelectedEmails:i,entryPoint:d?`${d}_via_slack_connect_add_to_channel_modal`:eB.kP.SlackConnectAddToChannelModal}),l&&l(m))},[d,i,l,m,s,c]),_=eY.t("Select an existing channel"),f=(0,ea.F1)(a),b=eY.t("Start by selecting a channel. We\u2019ll help you add everyone included in the email to it, even people outside {teamName}",{teamName:f}),g=eY.t("Create New"),y=eY.t("Next");return n.createElement(eU.dW,{closeModal:e.closeModal,dataQa:"slack_connect_add_to_channel_modal",className:"overflow_visible"},n.createElement(eU.rQ,null,n.createElement(eU.Rc,{"data-qa":"slack_connect_add_to_channel_modal",title:_})),n.createElement("section",{className:"c-sk-modal_content_section"},n.createElement("p",{className:"sk_dark_gray"},b),n.createElement(eF,{onChange:u,customSearchOptions:eQ,"data-qa":"slack_connect_add_to_channel_modal_channel_selector"})),n.createElement(eU.jl,null,n.createElement(eU.ox,null,n.createElement(eS.Ay,{type:"outline",onClick:p,"data-qa":"slack_connect_add_to_channel_modal_create_new_button"},g),n.createElement(eS.Ay,{type:"primary",onClick:h,"data-qa":"slack_connect_add_to_channel_modal_next_button",disabled:!m},y))))};SlackConnectAddToChannelModal.displayName="SlackConnectAddToChannelModal";let eZ=(0,ex.N)(e=>({currentTopLevelTeam:(0,er.Yc)(e)}),e=>(0,ev.zH)({createChannelFromEmailObject:ez,startChannelInviteModal:eK.A,navigateToChannel:e=>(0,Q.o)((0,Z.pr)(e))},e))(SlackConnectAddToChannelModal),eJ=(0,e$.e)(eZ),eX=(0,eV.Ay)("opens channel selector modal to add invitees from email",(e,t,{file:a,channelId:n})=>{let r=t(),i=(0,eq.H)(r,{channelId:n}),l=extractEmailAddressesFromEmail(a).filter(e=>e!==i?.address);e(eJ({file:a,parentChannelId:n,initialInvitedEmails:(0,ek.ZQ)(r,l,!1),onChannelSelected:t=>{let n=createEmailMessageEphemeralBlocks({permalink:a.permalink});e((0,ej.A)({temporary:!0,message:{channel:t,text:n[0]?.text?.text,blocks:n}}))},entryPoint:"email_object"}))});eX.meta={name:"addToExistingChannelFromEmailObject",key:"createThunkAddToExistingChannelFromEmailObject",description:"opens channel selector modal to add invitees from email"};var e0=a(0xeeae4283),e1=a(0x1b5e73e1d),e2=a(0x228691cd3),e4=a(0x7aad5cf6),e5=a(0xb60a1b),e3=a(0xf504efa8),e6=a(0x1faa3f1ac),e8=a(0x6e87d4ec),e7=a(0x1e3c7661);let e9=new h.Ay("lists"),ListDeletedToast=({message:e,onUndo:t})=>{let a=t?e7.$c:e7.UJ;return n.createElement(e8.A,{toastClasses:"p-list_toast",duration:a},e,t&&" ",t&&n.createElement(e6.A,{onClick:t},e9.t("Undo")))};ListDeletedToast.displayName="ListDeletedToast";var te=a(0x6ea1f0ed),tt=a(0x16ffed5ab);let ta=(0,eV.Ay)("Show list deleted toast",(e,t,{message:a,onUndo:r})=>{e((0,te.Z)()),e((0,tt.M)({element:n.createElement(ListDeletedToast,{message:a,onUndo:r})}))});ta.meta={name:"showListDeletedToast",key:"createThunkShowListDeletedToast",description:"Show list deleted toast"};var tn=a(0x1f65b4e0b),tr=a(0x1303ec42e),ti=a(0x16a97f29c),tl=a(0x251499a17),to=a(0x133eee6c1),ts=a(0xe28ad2a3),tc=a(0x1c3fa2c57),td=a(0x23a80406a),tm=a(0x21c50a68b),tu=a(0x1d06c44fe),tp=a(0x1ec68d6a3),th=a(0x23e1fed85);let t_=(0,eV.Ay)("Edit a snippet",(e,t,{fileId:a,title:n,content:r,filetype:i,reason:l}={})=>e((0,Y.$y)({fileId:a,title:n,content:r,filetype:i,reason:l})).then(({file:t}={})=>{t&&e((0,th.b)({files:[t]}))}));t_.meta={name:"editSnippet",key:"createThunkEditSnippet",description:"Edit a snippet"};var tf=a(0x1fcbb004d),tb=a(0x46dbff89);let tg=new h.Ay("snippet-dialog"),ty=class extends n.PureComponent{edited;pendingSave;static defaultProps={file:void 0,fileIsFetching:!1};constructor(e){const t=e.file;if(!t)throw Error(`Could not find file id: ${e.fileId}`);super(e),(0,m.v)(this,["handleFileNameChange","handleFileTypeChange","handleFileContentChange","handleSubmit","shouldShowSpeedBump"]),this.state={submitting:!1,...this.getInitialState(t)},this.edited=!1}getInitialState(e){let t=e.title;return t&&(t=(0,o.A)(t),t=this.props.convertEmojiInStringToLocalizedThunk({locale:(0,tm.JK)(),text:t})??void 0),{fileName:t,fileType:e.filetype,fileContent:e.content}}componentDidUpdate(e){e.file===this.props.file||this.edited||this.updateInitialState(this.props.file)}componentWillUnmount(){this.pendingSave&&this.pendingSave.cancel()}handleFileContentChange(e){this.edited=!0,this.setState(()=>({fileContent:e}))}handleFileNameChange(e){this.setState(()=>({fileName:e}))}handleFileTypeChange(e){this.setState(()=>({fileType:e}))}handleSubmit(){let{file:e,logger:t}=this.props,{fileName:a,fileType:r,fileContent:i}=this.state;return this.setState(()=>({submitting:!0})),this.pendingSave=this.props.editSnippet({fileId:e.id,title:this.props.convertEmojiInStringToCanonicalThunk({locale:(0,tm.JK)(),text:a})??void 0,content:i,filetype:r,reason:"edit-snippet-dialog/handleSubmit"}).then(()=>{this.pendingSave=null,this.props.closeModal()}).catch(e=>{this.pendingSave=null,this.setState(()=>({submitting:!1})),t.error("EDIT-SNIPPET",e,{subtype:"edit_snippet_api_fail"}),this.props.openModal({element:n.createElement(to.A,{title:tg.t("Saving failed")},tg.t("Sorry, something went wrong with saving your changes. Try again in a moment.")),isStackable:!0})}),!1}isGoDisabled(){let{fileContent:e,fileName:t}=this.state;return this.state.submitting||t&&t.length>u.W2||!e}shouldShowSpeedBump(e){if("cancel"===e||"close"===e){let{fileContent:e}=this.state,{file:t}=this.props;return e!==t.content}return!1}updateInitialState(e){this.setState(()=>this.getInitialState(e))}render(){let{file:e,fileIsFetching:t}=this.props;if(!e)return null;let{fileName:a,fileType:r,fileContent:i}=this.state,l=tg.t("Edit snippet"),o=tg.t("Save Changes"),s=t&&!i,c=s?tg.t("Loading\u2026",{fallbackHash:"b04ba49f848624bb97ab094a2631d2ad74913498"}):i;return n.createElement(ts.Ay,{className:"p-snippet_dialog",title:l,goButtonText:o,useSlackScrollbarWithPadding:!0,onGo:this.handleSubmit,goButtonIsDisabled:this.isGoDisabled(),getShouldShowSpeedBump:this.shouldShowSpeedBump,speedBumpTitleText:tg.t("Are you sure you want to discard your changes?"),speedBumpCancelButtonText:tg.t("No, keep it"),speedBumpContinueButtonText:tg.t("Yes, discard the changes")},n.createElement(td.A,{fileName:a,onFileNameChange:this.handleFileNameChange,fileType:r,onFileTypeChange:this.handleFileTypeChange,fileContent:c||"",onFileContentChange:this.handleFileContentChange,onKBSubmit:this.handleSubmit,readOnly:s}))}};function edit_snippet_dialog_mapStateToProps(e,{fileId:t}){return{logger:(0,tp.Ay)({state:e}),file:(0,en.Lp)(e,t)}}ty.displayName="EditSnippetDialog";let tA={editSnippet:t_,closeModal:tf.O,openModal:tb.q,convertEmojiInStringToCanonicalThunk:tu.b6,convertEmojiInStringToLocalizedThunk:tu.m$},tx=(0,ex.N)(edit_snippet_dialog_mapStateToProps,tA)(ty),tE=(0,tc.A)(tx,{alwaysFetchOnMount:!0});var tC=a(0x14961934a),tk=a(0x883f2056),tv=a(0x15f2fd44c);let tS=(0,eV.Ay)("Loads an existing snippet into the snippet editor",(e,t,{fileId:a})=>{e((0,tb.q)({element:n.createElement(tE,{fileId:a})}))});tS.meta={name:"openEditSnippetDialog",key:"createThunkOpenEditSnippetDialog",description:"Loads an existing snippet into the snippet editor"};let tI=(0,eV.Ay)("Loads an existing snippet into the snippet editor with IP check",(e,t,{fileId:a})=>{let n=t();return(0,eE.x)(n,"block_file_download")?e((0,tC.i)({reason:"FileActions_checkIP",fileId:a})).then(({ip_allowed:t})=>t?e(tS({fileId:a})):e((0,tk.a1)(tv.c.EditTextFile))).catch(()=>{e((0,tk.a1)(tv.c.EditTextFile))}):e(tS({fileId:a}))});tI.meta={name:"openEditSnippetDialogWithIPCheck",key:"createThunkOpenEditSnippetDialogWithIPCheck",description:"Loads an existing snippet into the snippet editor with IP check"};var tw=a(0x2f04ca84),tT=a(0x21aad6f5),tN=a(0x22d443103),tM=a(0x2bdaffa8),tR=a(0x20b63020e),tP=a(0x1fa458710),tL=a(0x1d774a049),tO=a(0xbaaab71e),tD=a(0x19895585a);let tF=(0,eV.Ay)("Closes the channel space for the given channel",(e,t,a,n)=>{let{closeView:r}=n(tO.U);if(r)return r(tD.mq.Secondary)});tF.meta={name:"closeChannelSpace",key:"createThunkCloseChannelSpace",description:"Closes the channel space for the given channel"};var tU=a(0x6467352),tB=a(0x183e20f52),tH=a(0x225278752),tW=a(0x6b44999b),tV=a(0x1e3eb45fd),tG=a(0x6aa3bf15),tq=a(0x214aa5e11),tj=a(0x72f6f21f),tK=a(0xe5a58ce1),t$=a(0x21bfacd01),tY=a(0x17a41206b),tQ=a(0x1a5e6d9b7),tZ=a(0x1c0b26a1c),tJ=a(0x95143e3f),tX=a(0x1125355f0),t0=a(0x6ee3decf),t1=a(0xd6d05b6f),t2=a(0x8c94c891),t4=a(0x693246f3),t5=a(0x1b0ef8c10),t3=a(0x1d94e71e3),t6=a(0x139aa1a7),t8=a(0xdeae2607),t7=a(0x15b7c8c4b),t9=a(0xa5fcc89),ae=a(0x8468bab2),at=a(0x13654559a),aa=a(0x2d1c8f66),an=a(0x14a799db1);let ar=new h.Ay("files"),ai=(0,eV.Ay)("Replace file with tombstone",async(e,t,{fileId:a,title:n,filetype:r})=>{if(await e((0,t8.b)({fileId:a,reason:`restore-deleted-${r}`})),e((0,ae.nM)(a)),"list"===r){let t=await e((0,Y.PF)({fileId:a}));e((0,an.y)({lists:[t]})),e((0,at.wW)({listId:a}))}e((0,t7.A)({message:ar.t("{title} restored.",{title:(0,_.Ay)((0,o.A)(n))}),onView:()=>{"list"===r&&e((0,aa.N)({listFileId:a})),"quip"===r&&(0,t9.T)({viewType:t6.D.Canvas,navigateProps:(0,Z.mo)({id:a})}),e((0,te.Z)())}}))});ai.meta={name:"undeleteFile",key:"createThunkUndeleteFile",description:"Replace file with tombstone"};var al=a(0x475fe7d6),ao=a(0x14602bb93),as=a(0x1cf49d51f),ac=a(0x109246c07),ad=a(0x1de4133),am=a(0x1950da728),au=a(0x17e63c876),ap=a(0x4479e27b),ah=a(0x15bd01ec9),a_=a(0x1f5c53bc);let af=new h.Ay("file"),ab=n.createElement(y.Ah,{name:"zoom-in"}),ag=n.createElement(y.Ah,{name:"arrow-collapse"}),ay=n.createElement(y.Ah,{name:"download"}),aA=n.createElement(y.Ah,{name:"edit"}),ax=n.createElement(y.Ah,{name:"new-window"}),aE=n.createElement(y.Ah,{name:"share-message"}),aC=n.createElement(y.Ah,{name:"bookmark"}),ak=n.createElement(y.Ah,{name:"bookmark-filled"}),av=n.createElement(y.Ah,{name:"folder"}),aS=n.createElement(y.Ah,{name:"close"}),aI=n.createElement(y.Ah,{name:"ellipsis-vertical-filled"}),aw=n.createElement(y.Ah,{name:"ellipsis-vertical-filled",size:"20"}),aT=n.createElement(y.Ah,{name:"star"}),aN=n.createElement(y.Ah,{name:"star-filled"}),aM=n.createElement(y.Ah,{name:"info"}),aR=n.createElement(y.Ah,{name:"info"}),stopPropagation=e=>e.stopPropagation(),aP=class extends n.PureComponent{fileActionsRef;static contextType=P.A;static defaultProps={includeRootDownloadAction:!0,featureReactMessages:!0,fileContainerType:u.zk.FILE_MESSAGE_ACTION,includeDeleteAction:!0,includeExternalLinkAction:!0,includeViewFileDetailsAction:!0,type:am.rd.file};constructor(e){super(e),this.state={isMenuOpen:!1},this.fileActionsRef=n.createRef(),(0,m.v)(this,["clogLinkClickForActionButton","clogLinkClickForOverflowMenu","editFile","onPopoverClose","deleteFile","reportFile","removeFileFromFolder","onCollapse","onDownload","menuTrigger","onEdit","onExpand","onRemovePreview","onShare","onSuccessfulDelete","onStartHuddle","onStar","onOpenFinder","onRemoveDownload","onUndoDelete","openWindow","openSplit","renderExpand","renderMenu","renderRemoveDesktopDownload","renderOpenInFinder","renderRemoveHuddleAttachment","printPDF","renderRemoveCallAttachment","makeCanvasCollection","removeCanvasCollection","makeListCollection","removeListCollection","removeFileFromListCell","onDeleteSummary","onTranslateFileSummary","onTranslateFileSummaryChangeTranslationLanguage","maybeClogSearchFileAction","handlePreview","shouldShowFileReferences","renderFileReferences","shouldShowPreviewButton"])}componentDidMount(){this.fileActionsRef.current&&this.fileActionsRef.current.toggleAttribute(r.EmbeddedUIAttributes.NO_FOCUS_ON_CLICK,!!this.props.embeddedUiData)}onCollapse(){this.props.collapse?.(),this.clogLinkClickForActionButton({subtype:"file_collapse"}),this.maybeClogSearchFileAction(tB.Pj.collapse)}onDeleteSummary(){let{dispatchOpenModal:e,file:t}=this.props;e({element:n.createElement(W.A,{file:t}),isStackable:!0}),this.maybeClogSearchFileAction(tB.Pj.deleteSummary)}onDownload(e){e.preventDefault(),e.stopPropagation();let{file:t}=this.props;this.maybeClogSearchFileAction(tB.Pj.download),this.props.downloadFile({file:t,clog:!1,action:tv.c.DownloadFile}).then(e=>(this.props.includeRootDownloadAction?this.clogLinkClickForActionButton:this.clogLinkClickForOverflowMenu)({link_action:"file_ssb_download_link",subtype:"file_download",is_successful:e}))}onEdit(e){let{file:t}=this.props;e.stopPropagation(),this.props.openEditSnippetDialog({fileId:t.id}),this.clogLinkClickForActionButton({link_action:"file_edit_action"}),this.maybeClogSearchFileAction(tB.Pj.edit)}onExpand(){let{file:e,channelId:t,openViewer:a}=this.props;this.props.clogLinkClick?.({subtype:"msg_photo_expand",link_action:"file_viewer_link",item_type:"F",item_id:e.id}),this.maybeClogSearchFileAction(tB.Pj.expand),a({fileId:e.id,channelId:t,isStackable:!0})}onTranslateFileSummary(){let{file:e}=this.props;e.ai_summary&&this.props.maybeOpenTranslationsSettingsModalForFileSummaryTranslation({fileId:e.id,summaryId:e.ai_summary.id})}onTranslateFileSummaryChangeTranslationLanguage(){let{file:e}=this.props;e.ai_summary&&this.props.openAiMessageTranslationsSettingsModalCircular({fileId:e.id,summaryId:e.ai_summary.id})}onRemovePreview(){let{file:e}=this.props;this.clogLinkClickForOverflowMenu({link_action:"file_remove_preview_action",contexts:{ui_context:{action:"delete",ui_component:"file_preview"}}}),this.props.editFile({fileId:e.id,title:e.title,removeThumbPdf:!0}),this.maybeClogSearchFileAction(tB.Pj.removePreview)}onShare(e){let{file:t,isChannelFiles:a,fileContainerType:n,maybeClosePeek:r,experimentCanvasBrowserContextMenuGroupOn:i,shareFileAsWorkObject:l,workObjectEntityId:o}=this.props;if(this.maybeClogSearchFileAction(tB.Pj.share),e.stopPropagation(),i)return this.props.shareFile({fileId:t.id,fileContainerType:n,isChannelFiles:a,clogShareClick:this.props.clogShareClick,maybeClosePeak:r});let s=(0,X.wL)(t),c=(0,X.l7)(t);return l&&t.app_id&&t.external_url&&o?this.props.openShareWorkObjectModalCircular({fallbackAppId:t.app_id,fallbackTitle:t.title??"",fallbackSubtitle:t.pretty_type??"",url:t.external_url,entityId:o}):s?this.props.openShareQuipModal({fileId:t.id,isStackable:!1,viewContext:n}):c?this.props.openShareListsModal({fileId:t.id,isStackable:!0,isSlackDoc:!1,viewContext:n}):this.props.openShareDialog({fileId:t.id,isStackable:!0,isSlackDoc:!1,viewContext:n}),r(),!a&&this.props.clogShareClick&&this.props.clogShareClick({fileId:t.id}),this.trackAction(e_.UiElement.SHARE_FILE_BUTTON),this.clogLinkClickForActionButton({subtype:"file_share",link_action:"file_share_action"})}onStartHuddle(){let{file:e}=this.props,t=`C${e.id.slice(1)}`;this.props.startHuddle({channelId:t}),this.maybeClogSearchFileAction(tB.Pj.startHuddle)}onStar(){let{file:e}=this.props;(0,X.Gs)(e)?this.props.removeSavedFile({itemId:e.id}):this.props.addSavedFile({fileId:e.id}),this.clogLinkClickForActionButton({link_action:"file_save_action"}),this.maybeClogSearchFileAction(tB.Pj.star)}onOpenFinder(){this.props.showDownload(this.props.file.id),this.clogLinkClickForActionButton({link_action:"file_open_finder_action"}),this.trackAction(e_.UiElement.OPEN_FINDER_FILE_BUTTON),this.maybeClogSearchFileAction(tB.Pj.openFinder)}onRemoveDownload(){this.props.cancelDesktopDownload(this.props.file.id),this.props.removeDesktopDownload(this.props.file.id),this.props.removeActiveDownload(this.props.file.id),this.clogLinkClickForActionButton({link_action:"file_remove_download_action"}),this.trackAction(e_.UiElement.REMOVE_DOWNLOAD_FILE_BUTTON),this.maybeClogSearchFileAction(tB.Pj.removeDownload)}onPopoverClose(){this.setState(()=>({isMenuOpen:!1}))}onUndoDelete(){let{file:e}=this.props,{id:t,title:a,filetype:n}=e;this.props.undeleteFile({fileId:t,title:a??"",filetype:n??""}),this.maybeClogSearchFileAction(tB.Pj.undoDelete)}onSuccessfulDelete(){let{file:e}=this.props;((0,X.l7)(e)||(0,X.DQ)(e))&&(this.props.showListDeletedToast({message:af.t("{title} deleted.",{title:this.getTitleForAriaLabel()}),onUndo:this.onUndoDelete}),this.props.addRecentlyDeletedFile({id:e.id}),this.maybeClogSearchFileAction(tB.Pj.successfulDelete))}getTitleForAriaLabel(){return(0,_.Ay)((0,o.A)(this.props.file.title))}maybeClogSearchFileAction(e){let{file:t,type:a,isOnSearchTab:n,index:r,clogSearchFileResult:i}=this.props;n&&i({iid:t.iid,userId:t.user??"",fileId:t.id,position:r??0,fileType:t.filetype,type:a,subtargetType:e})}handlePreview(){let{file:e,channelId:t,navigateFromFileToWorkObject:a}=this.props;a({file:e,channelId:t,source:"preview"})}clogLinkClick(e={}){let{file:t}=this.props;if(this.props.clogLinkClick)return this.props.clogLinkClick({item_type:t.id[0],item_id:t.id,...e})}clogLinkClickForActionButton(e={}){return this.clogLinkClick((0,s.A)(e,{contexts:{ui_context:{ui_properties:{element_name:"file_action_button"}}}}))}clogLinkClickForOverflowMenu(e={}){return this.clogLinkClick((0,s.A)(e,{contexts:{ui_context:{ui_properties:{element_name:"file_action_menu"}}}}))}removeFileFromListCell(){this.props.includeRemoveFileFromListCellAction&&this.props.removeFileFromListCell&&this.props.removeFileFromListCell()}deleteFile(){let{file:e,fileTs:t}=this.props,a=this.context,n=a?.ts,r=a?.channelId,i=a?.msg,l=a?.threadTs,o=a?.viewContext,s=i?i.files:void 0,c=i&&i.text?.length?t??void 0:n;this.props.openDeleteFileDialog({fileId:e.id,channelId:r,threadTs:l,ts:n,fileIds:s,msgFileTs:c,viewContext:o,onSuccessfulDelete:this.onSuccessfulDelete,isStackable:!0}),this.maybeClogSearchFileAction(tB.Pj.delete)}reportFile(){let{file:e,team:t,defaultWorkspace:a}=this.props,n=this.context,r=n?.threadTs,i=encodeURI((0,X.IE)(e,t?.id,r));(0,ea.gC)(a,`/help/requests/report-content?u=${i}&type=file`),this.maybeClogSearchFileAction(tB.Pj.report)}removeFileFromFolder(){let{dispatchOpenModal:e,bookmark:t,channelId:a}=this.props;a&&t&&e({element:n.createElement(C.A,{bookmark:t,onClose:c.A,fromChannelFolder:!0,channelId:a})})}openWindow(e){let{file:t}=this.props;if((0,X.Z0)(t)){this.props.openFileInNewWindow({file:t}),this.clogLinkClickForActionButton({link_action:"file_open_child_window_action"}),e.preventDefault();return}if((0,X.DQ)(t)){this.props.openDoc({fileId:t.id,forceNewWindow:!0,source:tL.f.FILE_DETAILS}),this.clogLinkClickForActionButton({link_action:"file_open_child_window_action"});return}if((0,p.dY)("4.6.0")){if((0,X.sJ)(t)){this.props.openImageInNewChildWindow({file:t}),this.clogLinkClickForActionButton({link_action:"file_open_child_window_action"}),e.preventDefault();return}if((0,X.F1)(t)){this.props.openPDFInNewChildWindow({file:t}),this.clogLinkClickForActionButton({link_action:"file_open_child_window_action"}),e.preventDefault();return}}if((0,X.ez)(t)&&(0,p.dY)("4.6.0")){let a=this.props.pauseVideoAndGetCurrentTime?.()??0;this.props.openVideoInNewChildWindow({file:t,videoSeekTimeInSeconds:a}),this.clogLinkClickForActionButton({link_action:"file_open_child_window_action"}),e.preventDefault();return}if((0,X.l7)(t)){this.props.openList({listFileId:t.id,forceOpenInChildWindow:!0,source:e5.B.FILE_DETAILS}),this.clogLinkClickForActionButton({link_action:"file_open_child_window_action"});return}this.maybeClogSearchFileAction(tB.Pj.newWindow),t.url_private&&(0,eg.A)(t.url_private,"_blank")&&e.preventDefault()}openSplit(){let{file:e}=this.props;(0,X.DQ)(e)&&(this.props.openInSplitView({navProps:(0,Z.mo)({id:e.id}),clogParams:{entryPoint:"file/actions"}}),this.clogLinkClickForActionButton({link_action:"file_open_split_view_action"})),(0,X.l7)(e)&&(this.props.openInSplitView({navProps:(0,Z.st)({listId:e.id}),clogParams:{entryPoint:"file/actions"}}),this.clogLinkClickForActionButton({link_action:"file_open_split_view_action"}))}editFile(){let{file:e}=this.props;this.props.openEditFileDialog({file:e,isStackable:!0,dialogEntrypoint:tl.P.FILE_ACTIONS_MENU}),this.maybeClogSearchFileAction(tB.Pj.edit)}printPDF(){let{file:e}=this.props;(0,ey.A)((0,X.fX)(e)??""),this.maybeClogSearchFileAction(tB.Pj.printPdf)}makeCanvasCollection(){let{file:e}=this.props;this.props.makeCanvasAsCollection({fileId:e.id})}removeCanvasCollection(){let{file:e}=this.props;this.props.removeCanvasAsCollection({fileId:e.id})}makeListCollection(){let{file:e}=this.props;this.props.makeListAsCollection({fileId:e.id})}removeListCollection(){let{file:e}=this.props;this.props.removeListAsCollection({fileId:e.id})}trackAction(e){let{clogger:t,file:a,fileContainerType:n}=this.props,r={element_value:a.id,view_context:n},i={action:e_.UiAction.CLICK,ui_element:e,ui_properties:r};t.track(e_.EventId.FILE_ACTION,{contexts:{ui_context:i},core:{item_type:a.id[0],item_id:a.id}})}menuTrigger(){this.setState(()=>({isMenuOpen:!0}))}renderActionButton(e){let{icon:t,size:a,tooltip:r,href:i,onClick:l,ariaLabel:o,"data-qa":s,isDisabled:c,popoverTrigger:d,autoClogProps:m,asButton:u,className:p}=e,{isFileDetailsReferenceView:h}=this.props;if(h)return u?n.createElement(f.Ay,{type:"outline",className:"display_flex flex_one",onClick:l,autoClogProps:m},n.createElement("div",{className:"margin_right_50"},t),n.createElement(x.A,{lines:1},r)):n.createElement(D.A,{icon:t,href:i,onClick:l,label:r,"aria-label":o,"data-qa":s,isDisabled:c,autoClogProps:m,size:"medium",className:"p-file_details__references_actions"});let _=n.createElement(D.A,{icon:t,href:i,onClick:l,label:r,"aria-label":o,"data-qa":s,isDisabled:c,autoClogProps:m,className:p,size:a});return d&&(_=d),_}renderCollapse(){return!this.props.isExpanded||this.props.isEmbeddedInCanvas?null:this.renderActionButton({icon:ag,tooltip:af.t("Collapse"),onClick:this.onCollapse,dark:!0,ariaLabel:af.t("Collapse {fileTitle}",{fileTitle:this.getTitleForAriaLabel()}),"data-qa":"collapse_action",svgIconProps:{name:"arrow-collapse"}})}renderDownload(){let{blockFileDownloadsForUntrustedClients:e,file:t,fileDownloadUrl:a,fileActions:n,fileTeam:r,isEmbeddedInCanvas:i,experimentMessageGalleryV2GroupOn:o,experimentMessageGalleryV3GroupOn:s}=this.props;if((0,X.ge)(t)||(0,X.Vx)(t)||(0,X.Z0)(t)||!n.download||i)return null;let c=af.rt("Download");return this.props.isFileAuthorExternal&&r&&(c=af.rt("Download from {teamName}",{teamName:(0,ea.F1)(r)})),this.renderActionButton({icon:ay,tooltip:c,href:(e?null:a)??void 0,onClick:this.onDownload,ariaLabel:af.t("Download {fileTitle}",{fileTitle:this.getTitleForAriaLabel()}),"data-qa":"download_action",size:o||s?"x-small":void 0,className:l()({"c-message_actions__button--gallery_v2":o||s,"c-message_actions__button--gallery_v2_margin":o||s}),svgIconProps:{name:"download"}})}renderSummary(){let{isFileDetails:e,file:t}=this.props;if(e)return null;let a=af.t("View summary of {fileTitle}",{fileTitle:this.getTitleForAriaLabel()}),r=n.createElement(V.a,{file:t,fromHoverMenu:!0},n.createElement(A.Ay,{tip:af.t("View summary")},n.createElement(b.A,{"aria-label":a,svgIconProps:this.props.slackAiIconProps,size:"small"})));return this.renderActionButton({popoverTrigger:r})}renderEdit(e){let{file:t,isSnippet:a,isEmbeddedInCanvas:n}=this.props;if(!e.edit||n)return null;if(a){let e=af.t("Edit {fileTitle}",{fileTitle:this.getTitleForAriaLabel()});return(0,X.$J)(t)?this.renderActionButton({icon:aA,tooltip:af.t("Edit"),href:t.edit_link,onClick:stopPropagation,ariaLabel:e,"data-qa":"edit_snippet",svgIconProps:{name:"edit"}}):this.renderActionButton({icon:aA,tooltip:af.t("Edit"),onClick:this.onEdit,ariaLabel:e,"data-qa":"edit_snippet",svgIconProps:{name:"edit"}})}let r=af.t("Edit {fileTitle} in new window",{fileTitle:this.getTitleForAriaLabel()});return this.renderActionButton({icon:ax,tooltip:af.t("Edit in new window"),href:t.permalink,onClick:this.openWindow,ariaLabel:r,"data-qa":"edit_new_window",svgIconProps:{name:"new-window"}})}renderExpand(){let{file:e,suppressAnimations:t}=this.props;if(!(t&&e&&e.filetype&&("gif"===e.filetype||"png"===e.filetype)&&e.deanimate))return null;let a=af.t("Expand");return this.renderActionButton({icon:ab,tooltip:a,onClick:this.onExpand,ariaLabel:a,"data-qa":"expand_animations",svgIconProps:{name:"zoom-in"}})}renderExternal(e){let{file:t,isSnippet:a,isEmail:n,isImage:r,experimentPostsReadOnlyGroupOn:i,experimentNewEmailRenderingGroupOn:l}=this.props,o=(0,X.ge)(t);if(o&&(o="gdrive"!==t.external_type||!!r),!(o||n||a&&!e.edit||(0,X.Z0)(t)&&!e.edit&&"post"!==t.mode)||"docs"===t.mode&&i||(0,X.bB)(t)||n&&l)return null;let s=(0,X.ge)(t)?t.url_private:t.permalink,c=(()=>{if(!(0,X.ge)(t))return af.t("Open in new window");switch(t.external_type){case"gdrive":return af.t("Open file on Google Drive");case"dropbox":return af.t("Open file on Dropbox");case"box":return af.t("Open file on Box");case"onedrive":return af.t("Open file on OneDrive");default:return af.t("Open file on a web page")}})(),d=(0,X.ge)(t)?void 0:this.openWindow;return this.renderActionButton({icon:ax,ariaLabel:c,tooltip:c,href:s,onClick:d,"data-qa":"open_external",svgIconProps:{name:"new-window"}})}renderOpenDocInNewWindow(e){let{file:t,showCanvasIa4Metadata:a,onlyContextMenuAction:r,openDocSource:i,isOnSearchTab:l,isFileDetailsReferenceView:o,experimentFilesShareContextGroupOn:s}=this.props;if(!e.new_window||a||r)return null;if((0,X.DQ)(t)&&!o&&!s)return n.createElement(U.A,{viewId:(0,eA.Lo)({id:t.id}),tooltipPosition:d.yX.Top,size:"small",openDocSource:i,onOpen:()=>this.maybeClogSearchFileAction(tB.Pj.newWindow)});if(l){let e=af.t("Open in new window");return this.renderActionButton({icon:ax,tooltip:e,onClick:this.openWindow,ariaLabel:af.t("Open in new window"),"data-qa":"open_in_new_window",svgIconProps:{name:"new-window"}})}return null}renderMenu(e){let{file:t,fileActions:a,isEmail:r,isSnippet:i,fileDownloadUrl:l,fileRefreshState:o,team:s,inFileDetails:c,isOffline:d,createChannelFromEmailObject:m,addToExistingChannelFromEmailObject:u,channelId:p,isHuddleAttachment:h,isCallAttachment:_,isBookmark:f,experimentSlackDocsGroupOn:b,onBookmarkToChannel:y,includeDeleteAction:A,includeExternalLinkAction:x,showMoreListBrowserActions:E,includeViewFileDetailsAction:C,reportToSlackEnabled:k,isEmbeddedInCanvas:v,fromCanvasOrganization:I,maybeClosePeek:w,showCanvasIa4Metadata:T,hasPermissionToPinCanvas:N,canvasIsPinned:M,isBoxRemoteFilesPreviewEnabled:P,appName:L,experimentCanvasBrowserContextMenuGroupOn:O,shouldRestrictUserShareFile:D,isAiFileSummariesEnabled:F,experimentSlackAiFileSummaryTranslationGroupOn:U,aiFileSummaryTranslation:B,isFileOwner:H,bookmark:W,isBBModeEnabled:V,maybeOpenShareFileAsTabConfirmationModal:G,addExternalFileAsChannelTab:q,navigateFromFileToWorkObject:j,shareFileAsWorkObject:z,isFileWorkObjectCompatible:K,isFullSizePreviewEnabled:$,experimentFilesShareContextGroupOn:Y,experimentTab3pFilesFeAllowAddGroupOn:Q,experimentMessageGalleryV2GroupOn:Z,experimentMessageGalleryV3GroupOn:J,dispatchCopyImageToClipboardWithToast:ee}=this.props,et=C&&(0,X.ZG)(t)&&!this.shouldShowFileReferences(),ea={onDeleteSummary:this.onDeleteSummary,isFileOwner:H,file:t,isEmail:r,isSnippet:i,fileDownloadUrl:l??"",fileRefreshState:o,clogLinkClick:this.clogLinkClickForOverflowMenu,teamId:s?.id,inFileDetails:c,refreshFile:this.props.refreshFile,includeDownload:!this.props.includeRootDownloadAction,onDownload:this.onDownload,includeShare:(0,X.l7)(t),onShare:this.onShare,includeStar:!1,updateStar:this.props.updateStar,includeSaved:!this.props.includeRootStarAction,addSavedFile:this.props.addSavedFile,removeSavedFile:this.props.removeSavedFile,editFile:this.editFile,actions:a,deleteFile:this.deleteFile,reportFile:this.reportFile,removeFileFromFolder:this.removeFileFromFolder,removePreview:this.onRemovePreview,openFileInBrowser:this.props.openFileInBrowser,openFilePublicUrlDialog:this.props.openFilePublicUrlDialog,createPublicFileUrlAndOpenDialog:this.props.createPublicFileUrlAndOpenDialog,isOffline:d,openWindow:this.openWindow,openSplit:this.openSplit,createChannelFromEmailObject:m,addToExistingChannelFromEmailObject:u,channelId:p,onPopoverClose:this.onPopoverClose,onTriggerClose:e.onTriggerClose,shouldStackModals:!0,isHuddleAttachment:h,isCallAttachment:_,isBookmark:f,experimentSlackDocsGroupOn:b,onBookmarkToChannel:y,reportToSlackEnabled:k,canPrintPDF:this.props.canPrintPDF,printPDF:this.printPDF,includeDeleteAction:A,includeExternalLinkAction:x,includeViewFileDetailsAction:et,navigate:this.props.navigate,makeCanvasCollection:this.makeCanvasCollection,removeCanvasCollection:this.removeCanvasCollection,isAiFileSummariesEnabled:F,experimentSlackAiFileSummaryTranslationGroupOn:U,aiFileSummaryTranslation:B,onTranslateFileSummary:this.onTranslateFileSummary,onTranslateFileSummaryChangeTranslationLanguage:this.onTranslateFileSummaryChangeTranslationLanguage,isCollection:this.props.isCollection,fromCanvasOrganization:I,showCanvasShare:T&&(0,X.wL)(t),shouldShowPinCanvas:N,canvasIsPinned:M,isTemplate:this.props.isTemplate,isBoxRemoteFilesPreviewEnabled:P,appName:L??"",shouldRestrictUserShareFile:D,experimentCanvasBrowserContextMenuGroupOn:O,experimentNewEmailRenderingGroupOn:this.props.experimentNewEmailRenderingGroupOn,isListCollection:this.props.isListCollection,makeListCollection:this.makeListCollection,removeListCollection:this.removeListCollection,showMoreListBrowserActions:E,includeRemoveFileFromListCellAction:this.props.includeRemoveFileFromListCellAction,removeFileFromListCell:this.removeFileFromListCell,index:this.props.index,isOnSearchTab:this.props.isOnSearchTab,clogSearchFileResultClick:this.props.clogSearchFileResult,bookmark:W,dispatchLinkCopiedToast:this.props.dispatchLinkCopiedToast,isBBModeEnabled:V,maybeOpenShareFileAsTabConfirmationModal:G,addExternalFileAsChannelTab:q,navigateFromFileToWorkObject:j,shareFileAsWorkObject:z,isFileWorkObjectCompatible:K,isFullSizePreviewEnabled:$,experimentFilesShareContextGroupOn:Y,experimentCustomFileSectionsGroupOn:this.props.experimentCustomFileSectionsGroupOn,experimentTab3pFilesFeAllowAddGroupOn:Q,experimentMessageGalleryV2GroupOn:Z,experimentMessageGalleryV3GroupOn:J,dispatchCopyImageToClipboardWithToast:ee,isImage:(0,X.sJ)(t)};if(v)return n.createElement(S.A,{menuProps:e});let en=(0,R.V)(ea);return n.createElement(g.a,{...e,width:r?256:220,template:en,stripTerminalSeparators:!0,onMenuItemSelected:(t,a)=>{a.stopPropagation();let n="key"in a&&"Enter"===a.key;return w(),(n||!a.defaultPrevented)&&e.onMenuItemSelected?.(t,a)}})}renderRemote(){let{file:e,appName:t}=this.props;if(!(0,X.Vx)(e))return null;let a=e.url_private,n=af.t("Click to open in {appName}",{appName:t??""});return this.renderActionButton({icon:ax,ariaLabel:n,tooltip:n,href:a,onClick:e=>e.stopPropagation(),svgIconProps:{name:"new-window"}})}renderShare(e=!1){let{fileActions:t,isEmbeddedInCanvas:a,file:n,showCanvasIa4Metadata:r,isTemplate:i,onlyContextMenuAction:l,shouldRestrictUserShareFile:o,experimentMessageGalleryV2GroupOn:s,experimentMessageGalleryV3GroupOn:c}=this.props;if(s||c||!(0,X.ZG)(n)||!t.share&&!t.share_private_file||a&&(0,X.wL)(n)||r||l||(0,X.Hn)(n))return null;let d=af.t("Share {fileTitle}",{fileTitle:this.getTitleForAriaLabel()}),m=af.t("Share file\u2026");return o?m=af.t("Sharing info"):i?m=af.t("Share template"):(0,X.wL)(n)?m=af.t("Share canvas"):(0,X.l7)(n)&&(m=af.t("Share list")),this.renderActionButton({icon:aE,tooltip:m,onClick:this.onShare,ariaLabel:d,"data-qa":"share_file",isDisabled:(0,X.aK)(n),svgIconProps:{name:"share-message"},asButton:e})}shouldShowPreviewButton(){let{file:e,isFileWorkObjectCompatible:t,fileActions:a}=this.props;return!!e.app_id&&!!t&&!a.open_remote_file}renderPreview(){let{file:e,showCanvasIa4Metadata:t,onlyContextMenuAction:a,isFullSizePreviewEnabled:r,workObject:i,experimentWorkObjectsUnsupportedFilePatternGroupOn:l}=this.props;if(!this.shouldShowPreviewButton())return null;if(!l&&e.app_id&&(0,ec.rB)(e.app_id)){let t=af.t("View latest details");return this.renderActionButton({icon:aM,tooltip:t,ariaLabel:t,onClick:this.handlePreview,"data-qa":"view_info",isDisabled:(0,X.aK)(e),svgIconProps:{name:"info"}})}let o=t||a,s=!i||(0,ah.nY)(i);return n.createElement(j.P,{handlePreview:this.handlePreview,iconOnly:o,showDivider:!o,isLoading:l&&s,variant:!l||r?"preview":"info"})}renderOpenRemoteImage(){let{fileActions:e,isEmbeddedInCanvas:t}=this.props;return!!e.open_remote_file&&!t&&this.renderRemote()}renderStar(){let e,t,{file:a,isEmbeddedInCanvas:n,onlyContextMenuAction:r}=this.props;return n||r?null:((0,X.Gs)(a)?(t=ak,e=af.t("Remove from Later")):(t=aC,e=af.t("Save for later")),this.renderActionButton({icon:t,ariaLabel:e,tooltip:e,onClick:this.onStar,dark:!1,"data-qa":"save_file",svgIconProps:{name:(0,X.Gs)(a)?"bookmark-filled":"bookmark"}}))}renderOpenInFinder(){let{isDownloadFile:e,fileActions:t,isEmbeddedInCanvas:a}=this.props;if(!e||!t.remove_download||a)return null;let n=(0,p.cX)()?af.t("Show in Finder"):af.t("Open containing folder");return this.renderActionButton({icon:av,ariaLabel:n,tooltip:n,onClick:e=>{e.stopPropagation(),this.onOpenFinder()},"data-qa":"open_finder",isOpenFinder:!0,svgIconProps:{name:"folder"},className:"c-file__finder_button"})}renderRemoveDesktopDownload(){let{fileActions:e,isDownloadFile:t,isEmbeddedInCanvas:a}=this.props;if(!t||!e.remove_download||a)return null;let n=af.t("Clear download");return this.renderActionButton({icon:aS,ariaLabel:n,tooltip:n,onClick:e=>{e.stopPropagation(),this.onRemoveDownload()},"data-qa":"remove_download",svgIconProps:{name:"close"}})}renderRemoveHuddleAttachment(){let{onRemoveHuddleAttachment:e}=this.props,t=af.t("Remove from huddle");return this.renderActionButton({icon:aS,ariaLabel:t,tooltip:t,onClick:e,dark:!1,"data-qa":"remove_huddle_attachment",svgIconProps:{name:"close"}})}renderRemoveCallAttachment(){let{onRemoveCallAttachment:e}=this.props,t=af.t("Remove from huddle");return this.renderActionButton({icon:aS,ariaLabel:t,tooltip:t,onClick:e,dark:!1,"data-qa":"remove_huddle_attachment",svgIconProps:{name:"close"}})}renderFavoriteButton(){let{file:e,experimentCustomFileSectionsGroupOn:t}=this.props;if(!t)return null;let a=(0,X.l7)(e),r=(0,X.DQ)(e);if(!a&&!r)return null;if(r){let{onlyContextMenuAction:t}=this.props;if((0,X.ny)(e)||t)return null}return n.createElement(N.H,{fileId:e.id,size:"small",className:"c-message_actions__button",tooltipPosition:"top",source:I.j.FILE_PILLOW})}renderFavoriteList(){let{file:e,isListCollection:t,experimentCustomFileSectionsGroupOn:a}=this.props;if(!(0,X.l7)(e))return null;if(a)return this.renderFavoriteButton();let n=t?af.t("Unstar list"):af.t("Add to starred"),r=(0,eo.WP)(e),i=null;return i=t?af.t("Unstar {listName}",{listName:r??""}):af.t("Add {listName} to starred",{listName:r??""}),this.renderActionButton({icon:t?aN:aT,ariaLabel:i,tooltip:n,onClick:e=>{e.stopPropagation(),this.maybeClogSearchFileAction(tB.Pj.star),t?this.removeListCollection():this.makeListCollection()},dark:!1,svgIconProps:{name:t?"star-filled":"star"},className:l()("c-file__star_button",{"c-file__unstar_button":t})})}renderFavoriteCanvas(){let{file:e,isCollection:t,onlyContextMenuAction:a,experimentCustomFileSectionsGroupOn:n}=this.props;if(!(0,X.DQ)(e)||(0,X.ny)(e)||a)return null;if(n)return this.renderFavoriteButton();let r=t?af.t("Unstar canvas"):af.t("Add to starred");return this.renderActionButton({icon:t?aN:aT,ariaLabel:r,tooltip:r,onClick:e=>{e.stopPropagation(),this.maybeClogSearchFileAction(tB.Pj.star),t?this.removeCanvasCollection():this.makeCanvasCollection()},dark:!1,svgIconProps:{name:t?"star-filled":"star"},className:l()("c-file__star_button",{"c-file__unstar_button":t})})}shouldShowFileReferences(){let{file:e,experimentFilesShareContextGroupOn:t,showCanvasIa4Metadata:a,onlyContextMenuAction:n,isFileDetailsReferenceView:r,isFileWorkObjectCompatible:i,experimentMessageGalleryV2GroupOn:l,experimentMessageGalleryV3GroupOn:o}=this.props;return!(!t||l||o||a||n||r||(0,X.ny)(e))&&!i&&!this.props.isDownloadFile}renderFileReferences(){let e,{file:t,experimentFilesShareContextGroupOn:a,isTemplate:n}=this.props;if(!this.shouldShowFileReferences())return null;e=(0,X.l7)(t)?af.t("View list details"):af.t("View canvas details");let r=(0,v.u)(t,n,!1,a),i={eventId:e_.EventId.FILE_DETAILS,elementName:"view_file_details",onClick:{enableClogAction:!0},fileId:t.id,uiComponentVariant:"file_references"};return this.renderActionButton({icon:aR,ariaLabel:e,tooltip:r,dark:!1,"data-qa":"file_references",onClick:e=>{e.stopPropagation(),this.maybeClogSearchFileAction(tB.Pj.fileReferences),this.props.navigate((0,Z.EJ)(t.id))},autoClogProps:i})}renderMoreActionsAriaLabel(){let{file:e}=this.props;return(0,X.l7)(e)?af.t("More actions for {listName}",{listName:(0,eo.WP)(e)??""}):af.t("More actions")}getSizeForMessageActionButton(){let{experimentMessageGalleryV2GroupOn:e,experimentMessageGalleryV3GroupOn:t,isFileDetailsReferenceView:a}=this.props;return e||t?"x-small":a?"medium":"small"}render(){let{file:e,fileActions:t,className:a,includeRootDownloadAction:r,includeRootStarAction:i,isOffline:o,wasRecentlyOnline:s,isDownloadFile:c,shouldHideActionsForHiddenCanvas:d,isFileDetails:m,experimentSlackDocsGroupOn:u,isHuddleAttachment:p,isCallAttachment:h,embeddedUiData:_,showCanvasIa4Metadata:f,isAiFileSummariesEnabled:b,showFileSummaryAction:y,isFileDetailsReferenceView:A,experimentMessageGalleryV2GroupOn:x,experimentMessageGalleryV3GroupOn:E}=this.props,C=this.renderMoreActionsAriaLabel(),k=af.rt("More actions");s||(k=n.createElement(F.A,{tooltipLabel:k}));let v=null;if(d||(0,X.Hn)(e))return null;if(!c){let e=this.getSizeForMessageActionButton();v=n.createElement(g.cQ,{onClick:this.menuTrigger,onMenuItemSelected:this.onPopoverClose,onPopoverClose:this.onPopoverClose,renderMenu:this.renderMenu,preventScroll:!!_,position:"left-bottom",offsetX:-4},n.createElement(D.A,{icon:A?aw:aI,label:k,"aria-label":C,tooltipPosition:"top-right","data-qa":"more_file_actions",size:e,className:l()({"p-file_details__references_more_actions":A,"c-message_actions__button--gallery_v2":x||E})}))}return n.createElement("div",{className:l()("c-file__actions",{"c-file__actions__hover":this.state.isMenuOpen&&!m,"c-message_actions__container":!m,"c-message_actions__group":!m,"c-file__actions--canvas-ia4":f,"c-message_actions--gallery_v2":x||E},a),ref:this.fileActionsRef,"aria-label":C,"data-qa":"file_actions",onClick:stopPropagation,role:"presentation"},A&&this.renderShare(!0),b&&y&&this.renderSummary(),this.renderCollapse(),!o&&r&&this.renderDownload(),this.renderExpand(),this.renderEdit(t),!c&&this.renderExternal(t),this.renderPreview(),this.renderOpenRemoteImage(),!A&&this.renderShare(),this.renderOpenDocInNewWindow(t),i&&this.renderStar(),this.renderOpenInFinder(),this.renderRemoveDesktopDownload(),this.renderFavoriteCanvas(),this.renderFavoriteList(),this.renderFileReferences(),v,u&&p&&this.renderRemoveHuddleAttachment(),u&&h&&this.renderRemoveCallAttachment())}};aP.displayName="FileActions";let aL={openViewer:e1.A,refreshFile:tU.A,updateStar:tH.A,openEditFileDialog:tl.A,downloadFile:e0.A,openShareDialog:tN.A,openShareQuipModal:eb.bd,startHuddle:al.A,removeDesktopDownload:tQ.LS,cancelDesktopDownload:tQ.$3,openDeleteFileDialog:ti.A,editFile:Y.$y,openEditSnippetDialog:tI,openFilePublicUrlDialog:w.l,createPublicFileUrlAndOpenDialog:w.M,openFileInNewWindow:tT.A,removeActiveDownload:tW.p3,showDownload:tQ.Y$,createChannelFromEmailObject:ez,addToExistingChannelFromEmailObject:eX,openImageInNewChildWindow:t2.d,openPDFInNewChildWindow:t4.U,openVideoInNewChildWindow:t5.v,openFileInBrowser:tw.A,openDoc:tP.A,closeChannelCanvas:tF,addSavedFile:ad.jx,removeSavedFile:ad.U4,navigate:Q.o,makeCanvasAsCollection:t1.g,removeCanvasAsCollection:t3.Y,shareFile:e4.s,undeleteFile:ai,addRecentlyDeletedFile:au.Lc,makeListAsCollection:ao.E,openShareListsModal:e3.A,removeListAsCollection:as.u,showListDeletedToast:ta,openList:aa.N,dispatchOpenModal:tb.q,clogSearchFileResult:tB.dU,maybeOpenTranslationsSettingsModalForFileSummaryTranslation:tK.n,openAiMessageTranslationsSettingsModalCircular:tr.A,dispatchLinkCopiedToast:k.M,navigateFromFileToWorkObject:tn.b,openInSplitView:E.p,maybeOpenShareFileAsTabConfirmationModal:tR.Z,addExternalFileAsChannelTab:e2.r,openShareWorkObjectModalCircular:tM.A,dispatchCopyImageToClipboardWithToast:T.P},aO=(0,ex.N)((e,t)=>{let{channelId:a,file:n,fileContainerType:r,externalWorkspaceId:i,isFileDetails:l,isDownloadFile:o,viewContext:s}=t,c=(0,eR.OL)(e,a),d=(0,es.t)(n),m=(0,X.VP)(n),p=n.user_team?(0,er._J)(e,n.user_team):void 0,h=(0,eh.u)(p),_=(0,t0.I)(e,n),f="on"===(0,eP._Z)(e,"files_share_context"),b=(0,G.GH)(e),g=(0,L.v)(e,s),y=(0,O._)(e,s),A=(0,z.E)(n,_),x=b?(0,a_.UQ)(e,{file:n,fetchIfMissing:!0}):void 0,E=x?(0,q.Kr)(x):void 0,C=b&&E?.fullSizePreview()?E.isFullSizePreviewEnabled(b):!!n&&(0,K.k)(n.app_id,n);return{fileTs:m,fileTeam:p,isImage:"image"===d,isSnippet:"snippet"===d,isEmail:"email"===d,channelId:c&&c.id,isFileAuthorExternal:(0,ed.t)(e,n.id),fileDownloadUrl:(0,el.S)(e,n),fileRefreshState:(0,tZ.R)(e,n.id)||tJ.c.READY,team:(0,er.H7)(e),blockFileDownloadsForUntrustedClients:(0,eE.x)(e,"block_file_download"),isDocFile:(0,X.ZH)(n),isOffline:!(0,tY.Pb)(e),wasRecentlyOnline:(0,tY.TP)(e),appName:(0,tX.Y)(e,n,_),clogger:(0,ef.eo)({state:e}),suppressAnimations:!(0,eC.ty)(e,"a11y_animations"),reportToSlackEnabled:(0,eu.J)(e),defaultWorkspace:(0,er.fu)(e),canPrintPDF:(0,ey.E)(e),isSpaceCurrentlyOpen:(0,ac.Bi)(e),shouldRestrictUserShareFile:(0,em.GF)(e,n),isEmbeddedInCanvas:r===u.zk.FILE_EMBEDDED_UNFURL,shouldHideActionsForHiddenCanvas:(0,X.sR)(n),isCollection:(0,ap.uU)(e,n.id),hasPermissionToPinCanvas:(0,ep.N)(e,n.id,i),maximumPinnedCanvasesReached:h,canvasIsPinned:((e,t,a)=>{if(!(0,et.F)(e))return!1;let n=(0,en.Lp)(e,t);return!(!n||(0,ee.A)(n))&&!!(0,X.wL)(n)&&(0,ea.zs)((0,er._J)(e,a)).map(e=>e.canvas_id).includes(t)})(e,n.id,i??""),isTemplate:(0,X.dE)(n)||(0,X.Vc)(n),isBoxRemoteFilesPreviewEnabled:(0,ei.$)(e,n),experimentCanvasBrowserContextMenuGroupOn:"on"===(0,eP._Z)(e,"canvas_browser_context_menu"),experimentPostsReadOnlyGroupOn:"on"===(0,eP._Z)(e,"posts_read_only"),experimentNewEmailRenderingGroupOn:"on"===(0,eP._Z)(e,"new_email_rendering"),isAiFileSummariesEnabled:(0,tV.sE)(e),showFileSummaryAction:(0,X.mb)(n)&&!o,isListCollection:(0,ap.uU)(e,n.id),isFileOwner:(0,X.vH)(e,n),experimentSlackAiFileSummaryTranslationGroupOn:(0,tq.tG)(e),aiFileSummaryTranslation:(0,tj.dC)(e,n.id,n.ai_summary?.id),isBBModeEnabled:(0,t$.V)(e),slackAiIconProps:(0,tG.e)(e),shareFileAsWorkObject:(0,$.Z)(e,n),workObject:x,workObjectEntityId:A,isFileWorkObjectCompatible:(0,X.NF)(n,_),isFullSizePreviewEnabled:C,experimentWorkObjectsUnsupportedFilePatternGroupOn:b,experimentFilesShareContextGroupOn:f,isFileDetailsReferenceView:l&&f,experimentCustomFileSectionsGroupOn:"on"===(0,eP._Z)(e,"custom_file_sections"),isInFileCollection:(0,ap.c3)(e,n.id),experimentTab3pFilesFeAllowAddGroupOn:"on"===(0,eP._Z)(e,"tab_3p_files_fe_allow_add"),experimentMessageGalleryV2GroupOn:g,experimentMessageGalleryV3GroupOn:y}},aL)(H((0,M.CV)((0,J.A)(aP))))},0x624dd21:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x63192578),o=a(0x2a053a10),s=a(0x4e1a3b33),c=a(0x15ad24864),d=a(0x106632d1d),m=a(0xbd3de346),u=a(0x108b445e9),p=a(0x1c91944c9),h=a(0x1ccef1c6f);let _=class extends n.PureComponent{isPlaying;static defaultProps={audioPlayerStyle:{style:"default",mini:!1},showActions:!0};constructor(e){super(e),this.isPlaying=!1,this.onPlay=this.onPlay.bind(this),this.onPause=this.onPause.bind(this),this.state={currentlyPlayingURL:void 0}}componentWillUnmount(){this.isPlaying&&this.props.setMediaPlaybackInProgress(!1)}onPlay(){this.props.setMediaPlaybackInProgress(!0),this.isPlaying=!0,this.setState(()=>({currentlyPlayingURL:this.getMediaURL()}))}onPause(){this.props.setMediaPlaybackInProgress(!1),this.isPlaying=!1,this.setState(()=>({currentlyPlayingURL:void 0}))}getMediaURL(){let{file:e}=this.props;return e?.aac||e?.url_private}render(){let{className:e,file:t,ts:a,channelId:r,overridePlaybackSpeed:d,mediaPlaybackSpeed:p,audioPlayerStyle:h,showActions:_,onDurationLoad:f}=this.props;if(!(0,m.pI)(t))return null;let b=this.state.currentlyPlayingURL||this.getMediaURL();if(!b)return null;let g=n.createElement(s.A,{file:t}),y=(0,u.A)(t)||(0,m.fD)(t),A=d;return!A&&y&&(A=p),n.createElement(o.V.Consumer,null,o=>n.createElement(l.A,{fileId:t.id,fileType:t.filetype,ts:a,channelId:r,src:b,isAudioMessage:y,initialPlaybackSpeed:A,waveformData:y?t?.audio_wave_samples:void 0,renderTranscriptButton:e=>n.createElement(c.A,{className:"margin_left_50",setCurrentTime:e,file:t}),className:i()("c-pillow_file__audio_player",e),name:g,size:t.size??0,audioPlaybackCoordinator:o,onPlay:this.onPlay,onPause:this.onPause,audioPlayerStyle:h,showActions:_,onDurationLoad:f}))}};_.displayName="FileAudio";let f=(0,p.N)(e=>({mediaPlaybackSpeed:(0,h.ty)(e,"media_playback_speed")}))((0,d.ay)(_))},0x1dcb2d57e:(e,t,a)=>{"use strict";a.d(t,{A:()=>f});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x11a296110),o=a(0x1d71c4455),s=a(0x139aa1a7),c=a(0x18460d15c),d=a(0xd843ab47),m=a(0xbd3de346),u=a(0x226892387),p=a(0x14ea3ce99),h=a(0x19895585a);let _=new i.Ay("request_access_done");function FileRequestAccessButton({fileId:e,type:t=o.Q.primary,callback:a,buttonClassName:i,size:f,skipDoneDialog:b=!1,stopPropagationOnCallback:g=!1,inHovercard:y=!1}){let A=(0,r.wA)(),[x,E]=(0,n.useState)(!1),{container:C,getPrimaryView:k}=(0,n.useContext)(d.A),v=(0,u.d4)(k),S=(0,u.d4)(t=>(0,p.Lp)(t,e)),I=(0,m.DQ)(S),w=(0,n.useCallback)(t=>{A((0,c.A)({fileId:e,skipConfirmation:!0,skipDoneDialog:b})),E(!0),a&&(g&&t.stopPropagation(),a())},[A,e,a,b,g]),T=x?_.t("Request sent"):_.t("Request access"),N=!y&&I&&v?.viewType===s.D.List&&C===h.mq.Secondary;return n.createElement(l.Ay,{type:t,onClick:w,"data-qa":"file-request-access-button",disabled:x,className:i,size:f,autoFocus:N},T)}FileRequestAccessButton.displayName="FileRequestAccessButton";let f=FileRequestAccessButton},0x24ddfedf3:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0x20e80190e),o=a(0x1fcbb004d);let s=new i.Ay("request_access_done"),RequestAccessDoneModal=()=>{let e=(0,r.wA)(),t=(0,n.useCallback)(()=>{e((0,o.O)())},[e]),a=s.t("Request sent"),i=s.t("You\u2019ll be notified once it\u2019s been shared with you"),c=s.t("Done");return n.createElement(l.dW,{closeModal:t,centered:!0,shouldCloseOnOverlayClick:!0},n.createElement(l.rQ,null,n.createElement(l.Rc,null,n.createElement("h2",null,a))),n.createElement(l.$m,null,n.createElement(l.qf,null,i)),n.createElement(l.jl,null,n.createElement(l.ox,null,n.createElement(l.s_,{type:"primary",onClick:t,"aria-label":c},c))))};RequestAccessDoneModal.displayName="RequestAccessDoneModal";var c=a(0x11c82607b),d=a(0x46dbff89);let m=(0,c.Ay)("Opens the Request Access Done confirmation modal in client",(e,t)=>{e((0,d.q)({element:n.createElement(RequestAccessDoneModal,null)}))});m.meta={name:"openRequestAccessDoneModal",key:"createThunkOpenRequestAccessDoneModal",description:"Opens the Request Access Done confirmation modal in client"};let u=m},0xee0b413f:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x8c8bafa3),l=a(0x20482ad21),o=a(0x1faa3f1ac),s=a(0x20e80190e),c=a(0x1fcbb004d);let d=new l.Ay("request_access_error"),RequestAccessErrorModal=()=>{let e=(0,r.wA)(),t=(0,n.useCallback)(()=>{e((0,c.O)())},[e]),a=d.rt("Something\u2019s gone wrong. If the problem persists, <a>let us know</a>.",null,({tag:e,text:t})=>n.createElement(o.A,{key:e,target:"_blank",href:`https://${(0,i.qF)()}/help/requests/new`},t));return n.createElement(s.dW,{closeModal:t,centered:!0,shouldCloseOnOverlayClick:!0},n.createElement(s.rQ,null,n.createElement(s.Rc,null,n.createElement("h2",null,d.t("Error")))),n.createElement(s.$m,null,n.createElement(s.qf,null,a)),n.createElement(s.jl,null,n.createElement(s.ox,null,n.createElement(s.s_,{type:"danger",onClick:t,"aria-label":d.t("Close")},d.t("Close")))))};RequestAccessErrorModal.displayName="RequestAccessErrorModal";var m=a(0x11c82607b),u=a(0x46dbff89);let p=(0,m.Ay)("Opens the Request Access Done confirmation modal in client",(e,t)=>{e((0,u.q)({element:n.createElement(RequestAccessErrorModal,null)}))});p.meta={name:"openRequestAccessErrorModal",key:"createThunkOpenRequestAccessErrorModal",description:"Opens the Request Access Done confirmation modal in client"};let h=p},0x18460d15c:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x40c0d834),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x24ddfedf3),c=a(0xee0b413f),d=a(0x140bb1e78),m=a(0xbd3de346),u=a(0x20e80190e),p=a(0x3711e82d),h=a(0x226892387),_=a(0x14ea3ce99),f=a(0x1fcbb004d);let b=new l.Ay("request_access_done"),g={uiComponentName:p.UiComponentName.QUIP_PERMISSIONS_REQUEST_MODAL,uiComponentVariant:"request_close",elementName:"quip_permissions_request_button_close",onClick:{enableClogAction:!0}},y={uiComponentName:p.UiComponentName.QUIP_PERMISSIONS_REQUEST_MODAL,uiComponentVariant:"request_send",elementName:"quip_permissions_request_button_send",onClick:{enableClogAction:!0}},CustomizedRequestAccessModal=({fileId:e})=>{let[t,a]=(0,n.useState)(!1),[l,A]=(0,n.useState)(!1),x=(0,r.wA)(),E=(0,h.d4)(t=>(0,_.Lp)(t,e)),C=(0,n.useCallback)(()=>(x((0,f.O)()),!1),[x]),k=(0,n.useCallback)(()=>{A(!1),x((0,d.x)({fileId:e,requestType:"access",reason:"CustomizedRequestAccessModal"})).then(()=>x((0,s.A)())).catch(()=>{x((0,c.A)())}),a(!0)},[x,e]),v=b.t("You need to request access",{fallbackHash:"384d50cc961f3f5667f81c3db3ba493621488050"}),S=b.t("To get access, you can send a request to the owners of the canvas.",{fallbackHash:"16834285a44e33a46cfa86485105f6803bf0ed04"});(0,m.dE)(E)||(0,m.Vc)(E)?S=b.t("To get access, you can send a request to the owners of the template.",{fallbackHash:"16834285a44e33a46cfa86485105f6803bf0ed04"}):(0,m.l7)(E)&&(S=b.t("To get access, you can send a request to the owners of the list.",{fallbackHash:"16834285a44e33a46cfa86485105f6803bf0ed04"}));let I=b.t("Cancel"),w=b.t("Request access");return E?n.createElement(i.A,{eventId:p.EventId.QUIP_PERMISSIONS_REQUEST,elementType:p.ElementType.MODAL},n.createElement(u.dW,{closeModal:C,"data-qa":"canvas_customized_request_access_modal",centered:!0,shouldCloseOnOverlayClick:!0},n.createElement(u.rQ,null,n.createElement(u.Rc,null,n.createElement("h2",null,v))),n.createElement(u.$m,null,n.createElement(u.qf,null,S)),n.createElement(u.jl,null,n.createElement(u.ox,null,n.createElement(u.s_,{type:"outline",onClick:C,"data-qa":"canvas_request_cancel_button",autoClogProps:g,"aria-label":I},I),n.createElement(o.lV,{type:"primary",onClick:k,loading:l,"data-qa":"canvas_request_access_button",disabled:t,autoClogProps:y,"aria-label":w},w))))):null};CustomizedRequestAccessModal.displayName="CustomizedRequestAccessModal";var A=a(0x11c82607b),x=a(0x46dbff89);let E=(0,A.Ay)("Opens the Request Access Done confirmation modal in client",(e,t,{fileId:a})=>{e((0,x.q)({element:n.createElement(CustomizedRequestAccessModal,{fileId:a})}))});E.meta={name:"openCustomizedRequestAccessModal",key:"createThunkOpenCustomizedRequestAccessModal",description:"Opens the Request Access Done confirmation modal in client"};var C=a(0xc8023a66),k=a(0x240abc170);let v=(0,A.Ay)('Opens the "Request Access" modal',async(e,t,{fileId:a,url:n,skipConfirmation:r,skipDoneDialog:i})=>{let l;if(!a&&n){let e=(0,k.cR)(t(),n),a=(0,C.$q)(t(),n);null!==e&&(l=e),null!==a&&(l=a)}else a&&(l=a);l&&(r?e((0,d.x)({fileId:l,requestType:"access",reason:"DirectRequestAccessModal"})).then(()=>{i||e((0,s.A)())}).catch(()=>{e((0,c.A)())}):e(E({fileId:l})))});v.meta={name:"requestAccessModalThunk",key:"createThunkRequestAccessModalThunk",description:'Opens the "Request Access" modal'};let S=v},0xcc263d32:(e,t,a)=>{"use strict";a.d(t,{A:()=>T});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0xe874a88a),l=a(0x807220a2),o=a(0x11a296110),s=a(0x2501a2cee),c=a(0x1c403364b),d=a(0x16e80f9af),m=a(0x12acc8b1),u=a(0x1b481369f),p=a(0x14c22bca),h=a(0x7fbb7bb1),_=a(0x1376f3e6),f=a(0x1d9627ee3),b=a(0xcfa85c93),g=a(0x13fbcf481),y=a(0xbd3de346),A=a(0x108b445e9),x=a(0x22fd0ecc8),E=a(0xa1832ae4),C=a(0x3711e82d),k=a(0x12303b2bd),v=a(0x1a80146c8),S=a(0x226892387),I=a(0x1bd76421c),w=a.n(I);let EmailAttachmentGallery=({files:e,channelId:t,threadTs:a,appId:I,emailId:T})=>{let N=(0,r.wA)(),[M,R]=(0,n.useState)([]),P=(0,n.useMemo)(()=>e.map(e=>e.id),[e]),L=(0,S.d4)(E.FH);(0,n.useEffect)(()=>{if(e.every(g.Hp))return;let t=[];e.forEach(e=>{(0,y.sJ)(e)&&t.push(i.K.resolve({file:e,fileId:e.id,title:(0,x.SB)(e),image:{src:e.url_private,width:e.original_w,height:e.original_h}}))}),i.K.all(t).then(e=>{R(e)})},[e]);let O=(0,n.useCallback)(e=>{N((0,f.A)({fileId:e.id}))},[N]),renderAttachment=e=>{let t=e.name,a=(0,k.A)(e.size),r=e.mimetype,i=(0,b.T)(r||"",I||"",!1),l=e.id,c=`${L}enterprise-search/email/${I}/${T}/attachments/${l}?filename=${encodeURIComponent(t)}`;return n.createElement(o.jV,{href:c,className:w().attachmentItem},n.createElement(s.Ah,{size:"24",name:i}),n.createElement("div",{className:w().attachmentInfo},n.createElement("p",{className:w().attachmentName},t),n.createElement("p",{className:w().attachmentSize},a)))};renderAttachment.displayName="renderAttachment";let renderFile=e=>(0,y.sJ)(e)?n.createElement(m.A,{file:e,fileIds:P,previewFiles:M,channelId:t,threadTs:a,orientation:null,width:null,height:null,isImageUploaded:!0}):(0,y._y)(e)||(0,A.A)(e)?n.createElement("div",{className:w().mediaFileThumbnailContainer},n.createElement(_.A,{file:e,onClick:()=>O(e)})):n.createElement(u.A,{file:e,channelId:t,showActions:!1,onClick:t=>{N((0,v.A)({e:t,fileId:e.id}))}},n.createElement(c.A,{className:"p-pending_file__medium_file_entity","data-qa":"pending_file__medium_file_entity",file:e,id:e.id}));if(renderFile.displayName="renderFile",!e||0===e.length)return null;let D=(0,l.gj)()?{fallbackWidth:445}:{};return n.createElement(d.A,{uiComponentName:C.UiComponentName.EMAIL_ATTACHMENT_GALLERY,clogImpression:!0},n.createElement("div",{className:w().container,"data-qa":"email-attachment-gallery"},n.createElement(h.A,D,({measureRef:t,width:a})=>n.createElement("div",{ref:t},n.createElement(p.A,{width:a,pageSize:230},n.createElement("div",{className:w().fileGallery,"data-qa":"email-attachment-gallery-files"},e.map(e=>n.createElement("div",{key:e.id,className:w().fileContainer},(0,g.Hp)(e)?renderAttachment(e):renderFile(e)))))))))};EmailAttachmentGallery.displayName="EmailAttachmentGallery";let T=EmailAttachmentGallery},0x4504d718:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0x120c268ad),o=a.n(l),s=a(0x1229d92d),c=a(0x1d5f57074),d=a(0x20482ad21),m=a(0x11a296110),u=a(0x20e80190e),p=a(0x1fcbb004d);let h=new d.Ay("hide-user"),LinkRedirectModal=({href:e,windowRef:t})=>{let a=(0,i.wA)(),n=(0,r.useCallback)(()=>(a((0,p.O)()),!1),[a]),l=(0,r.useCallback)(()=>(t.deref()?.open(e,"_blank"),a((0,p.O)()),!1),[a,e,t]);return r.createElement(u.dW,{closeModal:n},r.createElement(u.rQ,null,r.createElement(u.Rc,{title:h.t("Open Link")}),r.createElement(u.$m,null,r.createElement(u.qf,{className:"c-pillow_file__link_redirect_text"},h.t("You\u2019re opening a link you received in an email. Make sure the following URL is where you want to go."),r.createElement("div",{className:"c-pillow_file__link_redirect_link"},e))),r.createElement(u.jl,null,r.createElement(u.ox,null,r.createElement(u.s_,{type:"outline",onClick:n,"aria-label":h.t("Cancel")},h.t("Cancel")),r.createElement(m.Ay,{type:"primary",onClick:l},h.t("Open Link"))))))};LinkRedirectModal.displayName="LinkRedirectModal";let _=(0,s.A)(LinkRedirectModal);var f=a(0x11c82607b),b=a(0x46dbff89);let g=(0,f.Ay)("Opens the Link redirect confirmation modal in client",(e,t,{href:a})=>{e((0,b.q)({element:r.createElement(_,{href:a})}))});g.meta={name:"openLinkRedirectModal",key:"createThunkOpenLinkRedirectModal",description:"Opens the Link redirect confirmation modal in client"};var y=((n={}).Small="small",n.Medium="medium",n.Max="max",n.Full="full",n),A=a(0xa5d8361b),x=a(0x226892387),E=a(0x14149c126);let EmailIframe=({file:e,src:t,isDarkTheme:a,windowRef:n,fullHeight:l,isFileDetails:s,onLoad:d})=>{let m=(0,i.wA)(),u=(0,r.useRef)(null),p=(0,x.d4)(e=>"on"===(0,E._Z)(e,"new_email_rendering")),h=t??`${e?.url_private}?iframe=1`,_=t??e?.url_private,f=(0,r.useMemo)(()=>(({plainText:e="",experimentNewEmailRenderingGroupOn:t,fullHeight:a})=>{if(!t)return"max";if(a)return"full";if(!e)return"max";let n=e.length,r=(e.match(/\n/g)?.length??0)+1;return n<=150&&r<=3?"small":n<=400&&r<=8?"medium":"max"})({plainText:e?.plain_text??"",experimentNewEmailRenderingGroupOn:p,fullHeight:l}),[e,p,l]);(0,r.useEffect)(()=>{let onMessage=e=>{if(e.source===u.current?.contentWindow&&_&&e.origin===(0,c.Ay)(_)?.origin){if(e.data?.type==="onClick"&&(0,A.A)(e.data.href)){let t=e.data.href;(e=>{if(!e)return!1;let t=(0,c.Ay)(e).protocol;return"https:"===t||"http:"===t})(t)?m(g({href:t})):n.deref()?.open(t,"_blank")}else if(e.data?.type==="requestTheme"){let t=a?"dark":"light";u.current?.contentWindow?.postMessage({type:"themeUpdate",theme:t},e.origin)}}};return n.deref()?.addEventListener("message",onMessage),()=>n.deref()?.removeEventListener("message",onMessage)},[_,m,n,a]),(0,r.useEffect)(()=>{if(!u.current?.contentWindow||!_)return;let e=(0,c.Ay)(_)?.origin;if(!e)return;let t=a?"dark":"light";u.current.contentWindow.postMessage({type:"themeUpdate",theme:t},e)},[a,_]);let b=o()("c-pillow_file__email__content",{"c-pillow_file__email__content_iframe":!p,"c-pillow_file__email__content--dark-mode_iframe":a,"c-pillow_file__email__content_width":s,"c-pillow_file__email__content_height":p,"c-pillow_file__email__content_height--small":p&&f===y.Small,"c-pillow_file__email__content_height--medium":p&&f===y.Medium,"c-pillow_file__email__content_height--full":p&&f===y.Full});return r.createElement("div",{className:b},r.createElement("iframe",{ref:u,className:"c-pillow_file__email__content__iframe_sandbox",title:e?.title,sandbox:"allow-same-origin allow-popups allow-scripts",src:h,onLoad:d}))};EmailIframe.displayName="EmailIframe";let C=(0,s.A)(EmailIframe)},0xb7ebc7b4:(e,t,a)=>{"use strict";a.d(t,{K:()=>EmailRecipient});var n=a(0xbad225b5),r=a(0x21f3c49e8),i=a(0x45ad3b82),l=a(0x2501a2cee),o=a(0x1fdec3e16),s=a(0x514e33ce),c=a(0x977eaed6),d=a.n(c);let EmailAddressEntity=({email:e,showWarning:t=!1,channelId:a})=>n.createElement(s.A,{href:`mailto:${e}`,channelId:a},n.createElement("div",{className:t?d().emailAddressContentWarning:d().emailAddressContent},t?n.createElement(l.Ah,{name:"warning",inline:!0,size:"16"}):n.createElement(l.Ah,{name:"email",inline:!0,size:"16"}),n.createElement("div",{className:d().emailAddressText},n.createElement(o.A,{lines:1},e))));EmailAddressEntity.displayName="EmailAddressEntity";var m=a(0x186b638d6),u=a(0xc34fd270),p=a(0x226892387),h=a(0xe684f705);let EmailUserEntity=({userId:e})=>{let t=(0,p.d4)(t=>(0,h.nv)(t,e));return n.createElement(u.Ay,{id:t.id,showTooltip:!1,useShortMode:!0,showStatus:!1,showPresence:!1,showBadge:!1,className:"c-token--member margin_right_25","data-qa":"token_member",tokenSize:m.F.small})};EmailUserEntity.displayName="EmailUserEntity";var _=a(0x16ed1b0dc),f=a(0x17bc3bfdb),b=a.n(f);function EmailRecipient({address:e,name:t,userId:a,channelId:l}){return a?n.createElement(EmailUserEntity,{userId:a}):(0,r.A)(e)&&t&&(0,_.A)(t)?n.createElement(i.A,{id:t}):e&&!(0,r.A)(e)?n.createElement(EmailAddressEntity,{email:e,channelId:l}):n.createElement("span",{className:b().content},t||"Email")}EmailRecipient.displayName="EmailRecipient"},0x1865df7e3:(e,t,a)=>{"use strict";a.d(t,{A:()=>L});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x21f3c49e8),c=a(0x1ee15af19),d=a(0x20482ad21),m=a(0x15f8e452a),u=a(0x1faa3f1ac),p=a(0x4c96e5d9),h=a(0x4504d718),_=a(0x818593a1),f=a(0x1ea416c47),b=a(0x4e1a3b33),g=a(0xbd3de346),y=a(0x12303b2bd),A=a(0xd89ed9da),x=a(0x9b971e7e),E=a(0xe874a88a),C=a(0x14961934a),k=a(0x11c82607b),v=a(0x1d600678),S=a(0x883f2056),I=a(0x15f2fd44c),w=a(0x1a216ab4f);let T=(0,k.Ay)("Open a link",(e,t,{link:a})=>{let n=!1;try{n=!window.open(a)}catch{n=!0}return n?(e((0,w.O)(!0)),E.S.resolve(!1)):E.S.resolve(!0)});T.meta={name:"openLink",key:"createThunkOpenLink",description:"Open a link"};let N=(0,k.Ay)("Open a link after IP check",(e,t,{link:a,fileId:n="",action:r=I.c.Default})=>{let i=t();return(0,v.x)(i,"block_file_download")?e((0,C.i)({reason:"LinkActions_checkIP",fileId:n})).then(({ip_allowed:t})=>t?e(T({link:a})):(e((0,S.a1)(r)),!1)).catch(()=>(e((0,S.a1)(r)),!1)):e(T({link:a}))});N.meta={name:"openLinkWithIpCheck",key:"createThunkOpenLinkWithIpCheck",description:"Open a link after IP check"};var M=a(0x226892387),R=a(0x1fb2d2a87);let P=new d.Ay("files"),FileEmail=({file:e,clogLinkClick:t,isExpanded:a=!1,isExpandable:i=!1,expand:d=o.A})=>{let _=(0,r.wA)(),[E,C]=(0,n.useState)(!0),k=(0,M.d4)(x.ZT),v=e&&e.timestamp,S=(0,M.d4)(e=>v?(0,A.A)(e,v,{uncapitalized:!1}):null),w=(0,M.d4)(e=>"dark"===(0,R.to)(e)),getAttachmentsLinks=()=>e.attachments?.map((e,t)=>{let{mimetype:a,url:r,filename:i,size:o}=e,s=`${r}?teamId=${k}`,c=e.url||t,d=l()("c-pillow_file__email__attachment_alt","c-pillow_file__email__attachment_alt--file"),p=(0,y.A)(o||0);return n.createElement(u.A,{key:c,className:d,onClick:()=>{_(N({link:s,action:I.c.ViewFile}))}},n.createElement(m.A,{type:"paperclip",size:"inherit",className:"c-pillow_file__email__attachment__icon"}),n.createElement("span",{"data-qa":"file-email-attachment-alt-name",className:"c-pillow_file__email__attachment_alt__name"},i),n.createElement("span",{className:"c-pillow_file__email__attachment__meta"},p," ",a))});getAttachmentsLinks.displayName="getAttachmentsLinks";let disableExpandablePill=()=>{C(!1)},enableExpandablePill=()=>{C(!0)},expandEmail=()=>{a||i&&(d(),t({subtype:"file_expand"}))},renderAttachments=()=>{let t=!(0,s.A)(e.attachments),a=e.attachments?.length||0;if(e.inline_attachment_count&&(a+=e.inline_attachment_count),e.original_attachment_count&&e.original_attachment_count!==a){let r=P.rt("{count, plural, =1 {# attachment} other {# attachments}} removed {icon}",{count:e.original_attachment_count-a,icon:n.createElement(p.Ay,{tip:P.t("File uploads were disabled on this workspace"),position:"top",onShow:disableExpandablePill,onHide:enableExpandablePill},n.createElement(m.A,{type:"question-circle",size:"inherit"}))});return n.createElement("div",{className:"c-pillow_file__email__attachments"},n.createElement("div",{className:"c-pillow_file__email__attachments__count"},r),t&&n.createElement(n.Fragment,null,getAttachmentsLinks()))}return t?n.createElement("div",{className:"c-pillow_file__email__attachments"},n.createElement("div",{className:"c-pillow_file__email__attachments__count"},P.rt("{count, plural, =1 {# attachment} other {# attachments}}",{count:e.attachments?.length||0})),getAttachmentsLinks()):null};renderAttachments.displayName="renderAttachments";let renderCollapsedContent=()=>{let t=e.preview_plain_text||P.t("(No content)");return n.createElement("div",{className:"c-pillow_file__email__content--alt-collapsed"},t)};renderCollapsedContent.displayName="renderCollapsedContent";let renderSmallViewAttachments=()=>{if((0,s.A)(e.attachments))return null;let t=getAttachmentsLinks(),a=!!t&&t.length>4;if(a){let e=a?t.slice(0,3):t,r=t.length-e.length;return n.createElement("div",{className:"c-pillow_file__email__attachments"},e,n.createElement("div",{"data-qa":"file-email-attachement-count",className:"c-pillow_file__email__attachments__count"},P.t("+ {count} attachments",{count:r})))}return n.createElement("div",{className:"c-pillow_file__email__attachments"},t)};renderSmallViewAttachments.displayName="renderSmallViewAttachments";let renderSmallContent=()=>{let t=(0,c.A)(e.from)?.name||(0,c.A)(e.from)?.address,a=e.preview_plain_text||P.t("(No content)");return n.createElement(n.Fragment,null,n.createElement("div",{"data-qa":"file-email-small-content",className:"c-pillow_file__email__small_density__wrapper"},n.createElement("div",{className:"c-pillow_file__email__small_density"},n.createElement("div",{className:"c-pillow_file__email__small_density__primary_content"},n.createElement(b.A,{className:"bold c-pillow_file__email__small_density__subject",file:e}),n.createElement("span",{className:"sk_light_gray c-pillow_file__email__small_density__date"},S)),n.createElement("div",{className:"c-pillow_file__email__small_density__secondary_content"},n.createElement("span",{className:"c-pillow_file__email__small_density__sender"},` From ${t} `),n.createElement("span",{className:"c-pillow_file__email__small_density__body"},a)))),renderSmallViewAttachments())};renderSmallContent.displayName="renderSmallContent";let renderExpandedHeader=()=>{let t=formatSender((0,c.A)(e.from)),recipientFormatter=(e,t,a)=>formatSender(e,t<a.length-1),a=e.to?.map(recipientFormatter),r=!(0,s.A)(e.cc)&&e.cc?.map(recipientFormatter),i=P.t("Cc");return n.createElement("div",{className:"c-pillow_file__email__header"},n.createElement("table",{className:"c-pillow_file__email__meta"},n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",{className:"c-pillow_file__email__meta__field"},P.t("From")),n.createElement("td",null,t)),n.createElement("tr",null,n.createElement("td",{className:"c-pillow_file__email__meta__field"},P.t("To")),n.createElement("td",null,a)),r&&n.createElement("tr",null,n.createElement("td",{className:"c-pillow_file__email__meta__field"},i),n.createElement("td",null,r)),n.createElement("tr",null,n.createElement("td",{className:"c-pillow_file__email__meta__field"},P.t("Subject")),n.createElement("td",null,n.createElement("span",{className:"c-pillow_file__email__meta__subject"},e.subject||P.t("(No Subject)")))),S&&n.createElement("tr",null,n.createElement("td",{className:"c-pillow_file__email__meta__field"},P.t("Date")),n.createElement("td",null,S)))))};renderExpandedHeader.displayName="renderExpandedHeader";let renderNewEmails=()=>{let r=i&&!a,o=l()("c-pillow_file__email","c-pillow_file__content",{"c-pillow_file__content--collapsed":r&&!1,"c-pillow_file__email--collapsed":r,"c-pillow_file__email--small":!0,"c-pillow_file__email--expanded":a,"c-pillow_file__email--sandboxed":!0});return r&&1?n.createElement("div",{role:"presentation","data-qa":"file-email-collapsed-small-view",className:o,onClick:expandEmail},renderSmallContent(),n.createElement(f.s,{lineCount:e.lines,clogLinkClick:t})):n.createElement("div",{"data-qa":"file-email-expanded-view",className:o},renderExpandedHeader(),a?n.createElement(h.A,{file:e,isDarkTheme:w}):renderCollapsedContent(),renderAttachments(),E&&n.createElement(f.s,{clogLinkClick:t}))};return(renderNewEmails.displayName="renderNewEmails",(0,g.aK)(e)||"email"!==e.mode)?null:renderNewEmails()};function formatSender(e,t=!1){if(!e)return null;let a=e.name&&n.createElement(n.Fragment,null,n.createElement("span",{className:"c-pillow_file__email__sender__name"},e.name)," "),r=e.address&&n.createElement("span",{className:"c-pillow_file__email__sender__address"},"<",e.address,">");return n.createElement("span",{key:`${e.name}${e.address}`,className:"c-pillow_file__email__sender"},a,r,t&&", ")}FileEmail.displayName="FileEmail",formatSender.displayName="formatSender";let L=(0,_.lk)(FileEmail)},0x818593a1:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>A,lk:()=>withExpandable});var n=a(0xbad225b5),r=a(0x1cbdfeceb),i=a(0xc48503ad),l=a.n(i),o=a(0x5739d664),s=a(0x106a32624),c=a(0x683d5e9c),d=a(0x1c91944c9),m=a(0x8cc8cdb),u=a(0xeebad8d),p=a(0x1911b238),h=a(0x6cd12b6a),_=a(0xbd27fc13);let f=(0,n.createContext)({isExpanded:!1,isExpandable:!1,expand:r.A,collapse:r.A}),b={file:l().object.isRequired,ts:l().string.isRequired,channelId:l().string.isRequired,threadTs:l().string,forceExpanded:l().bool,children:l().node,isExpanded:l().bool,isExpanding:l().bool,isExpandable:l().bool,fetchAndExpand:l().func,collapseAndEnsureInView:l().func,collapseFile:l().func,viewContext:l().string,isDownloadAllowed:l().bool},g={threadTs:void 0,children:void 0,isExpanded:!1,isExpanding:!1,isExpandable:!1,forceExpanded:!1,fetchAndExpand:r.A,collapseAndEnsureInView:r.A,collapseFile:r.A,viewContext:void 0,isDownloadAllowed:!0},y=class extends n.PureComponent{constructor(e){super(e),this.expand=this.expand.bind(this),this.collapse=this.collapse.bind(this),this.getExpandableContextProviderValue=(0,o.A)(this.getExpandableContextProviderValue.bind(this))}getExpandableContextProviderValue(e,t,a,n,r){return{isExpanded:(e||t)&&r,isExpanding:a,isExpandable:!e&&n,expand:this.expand,collapse:this.collapse}}expand(){this.props.fetchAndExpand({fileId:this.props.file.id,channelId:this.props.channelId,ts:this.props.ts,viewContext:this.props.viewContext})}collapse(){/\d{10}\.?\d{6}/.test(this.props.ts)?this.props.collapseAndEnsureInView({fileId:this.props.file.id,ts:this.props.ts,channelId:this.props.channelId,threadTs:this.props.threadTs,viewContext:this.props.viewContext}):this.props.collapseFile({fileId:this.props.file.id,ts:this.props.ts,channelId:this.props.channelId,viewContext:this.props.viewContext})}render(){let{forceExpanded:e,isExpanded:t,isExpanding:a,isExpandable:r,isDownloadAllowed:i}=this.props,l=this.getExpandableContextProviderValue(e,t,a,r,i);return n.createElement(f.Provider,{value:l},this.props.children)}};y.displayName="ExpandableContainer";let A=(0,s.em)((0,d.N)((e,t)=>({isExpanded:(0,p.CJ)(e,{fileId:t.file.id,channelId:t.channelId,ts:t.ts,viewContext:t.viewContext}),isExpanding:(0,p.$J)(e,{fileId:t.file.id,channelId:t.channelId,ts:t.ts,viewContext:t.viewContext}),isExpandable:(0,c.t)(t.file),isDownloadAllowed:(0,m.TW)(e)}),{fetchAndExpand:_.r,collapseAndEnsureInView:h.z,collapseFile:u.An})(y));y.propTypes=b,y.defaultProps=g;let withExpandable=e=>function(t){return n.createElement(f.Consumer,null,({isExpanded:a,isExpanding:r,isExpandable:i,expand:l,collapse:o})=>n.createElement(e,{...t,isExpanded:a,isExpanding:r,isExpandable:i,expand:l,collapse:o}))}},0x1ea416c47:(e,t,a)=>{"use strict";a.d(t,{s:()=>u});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0xa6f3163b),s=a(0xb1ea448c),c=a(0x2501a2cee),d=a(0x818593a1);let m=new l.Ay("files");function ExpandablePillInternal({lineCount:e,isExpanded:t,isExpandable:a,isExpanding:r,expand:l,collapse:d,clogLinkClick:u}){let p=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),d?.(),u?.({subtype:"file_collapse"})},[d,u]),h=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),l?.(),u?.({subtype:"file_expand"})},[l,u]);if(!a)return null;let _=i()("c-pillow_file__expandable_pill",{"c-pillow_file__expandable_pill--expand":!t,"c-pillow_file__expandable_pill--collapse":t,"c-pillow_file__expandable_pill--expanding":r});if(t)return n.createElement("div",{className:_},n.createElement(o.A,{className:"c-pillow_file__expandable_pill__button","aria-expanded":t,onClick:p},m.t("Collapse"),n.createElement(c.Ah,{name:"arrow-up",inline:!0})));if(r)return n.createElement("div",{className:_},n.createElement(s.A,{color:"blue",size:"medium"}));let f=e?m.t("Click to expand inline ({lineCount, plural, =1 {# line} other {# lines}})",{lineCount:e}):m.t("Click to expand inline");return n.createElement("div",{className:_},n.createElement(o.A,{className:"c-pillow_file__expandable_pill__button","aria-expanded":t,onClick:h},n.createElement(c.Ah,{name:"plus",inline:!0}),f))}ExpandablePillInternal.displayName="ExpandablePillInternal";let u=(0,d.lk)(ExpandablePillInternal)},0x1bd506bc3:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x147939a6);let i={maxHeight:"100%",maxWidth:"100%",height:"auto",width:"auto"},l=class extends n.PureComponent{videoRef;constructor(e){super(e),this.videoRef=(0,n.createRef)()}componentDidMount(){let{videoSeekTimeInSeconds:e,videoPlaybackSpeed:t}=this.props;this.videoRef&&this.videoRef.current&&(e&&(this.videoRef.current.currentTime=e),t&&(this.videoRef.current.playbackRate=t))}render(){let{posterUrl:e,src:t,vtt:a,enableMediaCaptions:l}=this.props;return n.createElement("video",{className:"c-pillow_file__video",controls:!0,autoPlay:!0,poster:e,src:t,disablePictureInPicture:!0,controlsList:"nodownload",style:i,ref:this.videoRef},a&&n.createElement(r.A,{vtt:a,enableMediaCaptions:!!l}))}};l.displayName="ExternalWindowVideo";let o=l},0xc62abf6e:(e,t,a)=>{"use strict";a.d(t,{Mm:()=>getCopyLinkMenuItem,r3:()=>useCopyLinkMenuItem});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xec8d5140),o=a(0xbd3de346),s=a(0x1ed767a16),c=a(0x3711e82d),d=a(0x226892387),m=a(0x14ea3ce99),u=a(0x1ee439e69);let p=new i.Ay("file");function useCopyLinkMenuItem({fileId:e}){let t=(0,d.d4)(t=>(0,m.Lp)(t,e)),a=(0,d.d4)(u.H7),i=(0,r.wA)(),o=(0,n.useCallback)(()=>i((0,l.M)()),[i]);return(0,n.useMemo)(()=>{if(t)return getCopyLinkMenuItem({file:t,teamId:a.id,dispatchLinkCopiedToast:o})},[t,a.id,o])}function getCopyLinkLabel({file:e}){return(0,o.l7)(e)?p.t("Copy link to list"):(0,o.dE)(e)?p.t("Copy link to template"):(0,o.DQ)(e)?p.t("Copy link to canvas"):p.t("Copy link to file")}function getCopyLinkMenuItem({file:e,teamId:t,clogLinkClick:a,dispatchLinkCopiedToast:n}){let r=(0,o.IE)(e,t);return{label:getCopyLinkLabel({file:e}),show:!!(0,s.tD)()&&(0,o.ZG)(e),click:()=>{a&&a({subtype:"copy_link"}),(0,s.x3)(r),n()},dataQa:"copy_file_link",autoClogProps:{eventId:(0,o.DQ)(e)?c.EventId.QUIP_SHARE:c.EventId.FILE_SHARE,elementName:"copy_link",onClick:{enableClogAction:!0},fileId:e.id}}}},0x172389992:(e,t,a)=>{"use strict";a.d(t,{QD:()=>getShareFileMenuItem,ZY:()=>useShareFileMenuItem});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x20482ad21),l=a(0xf8560e15),o=a(0xbd3de346),s=a(0x1c450e1a),c=a(0x3711e82d),d=a(0x7aad5cf6),m=a(0x226892387),u=a(0x14ea3ce99);let p=new i.Ay("file");function useShareFileMenuItem({fileId:e}){let t=(0,r.wA)(),a=(0,m.d4)(t=>(0,u.Lp)(t,e)),i=(0,m.d4)(e=>(0,o.vH)(e,a)),{inChannelCanvasPreview:c}=(0,n.useContext)(l.A),p=(0,m.d4)(e=>(0,s.GF)(e,a));return(0,n.useMemo)(()=>{if(a)return getShareFileMenuItem({file:a,isFileOwner:i,inChannelCanvasPreview:c,shouldRestrictUserShareFile:p,onClick:()=>t((0,d.s)({fileId:e}))})},[a,i,c,p,t,e])}function getShareLabel({file:e,shouldRestrictUserShareFile:t}){return t?p.t("Sharing info"):(0,o.dE)(e)?p.t("Share template"):(0,o.l7)(e)?p.t("Share list"):(0,o.U9)(e)?p.t("Share canvas"):p.t("Share file\u2026")}function getShareFileMenuItem({file:e,isFileOwner:t,inChannelCanvasPreview:a,shouldRestrictUserShareFile:n,onClick:r}){let i=e.is_public||t,l=(0,o.l7)(e),s=(0,o.U9)(e)&&i;return{label:getShareLabel({file:e,shouldRestrictUserShareFile:n}),show:s||(a||l)&&(i||!i),click:r,dataQa:"share_file",autoClogProps:{eventId:(0,o.DQ)(e)?c.EventId.QUIP_SHARE:c.EventId.FILE_SHARE,elementName:"share_file",onClick:{enableClogAction:!0},fileId:e.id}}}},0x24137a62:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x155d02b1c),i=a(0x20482ad21),l=a(0x4c96e5d9),o=a(0x1c403364b),s=a(0x339b339c),c=a(0x1acf9d7d9),d=a(0x6c151463),m=a(0xbd3de346),u=a(0xbac48619),p=a(0x2378cf6ec),h=a(0x6960d8b9),_=a(0x1ccef1c6f),f=a(0x226892387);let b=new i.Ay("files"),g=n.memo(({file:e,useSeparator:t=!1,isChannelFiles:a=!1,excludeTime:r=!1,experimentChannelFilesViewGroupTreatment:i=!1})=>{let l,o=(0,f.d4)(e=>(0,_.ty)(e,"time24")??!1),s=(0,f.d4)(t=>(0,p.I)(t,e.user,!1,!1,!1,!1)),renderTimestamp=()=>{let t;if(void 0===(0,m.VP)(e))return null;let l=(0,h.Od)((0,m.VP)(e)??void 0,{shortenMonth:!0});if(a&&i)if("Today"===l||"Yesterday"===l){let e=l.toLowerCase();t=b.t("{newDate}",{newDate:e})}else t=b.t("on {date}",{date:l});else t=l;let s=r?t:b.t("{date} at {time}",{date:l,time:(0,h.Yq)((0,m.VP)(e)??"","{time}",{do24hrTime:o})});return n.createElement("span",{className:"c-pillow_file__timestamp"},s)};renderTimestamp.displayName="renderTimestamp";let renderUser=()=>e.bot_id?n.createElement(d.A,{id:e.bot_id,className:a?"c-pillow_file__user-channel-files":"c-pillow_file__user",isChannelFiles:a}):n.createElement(c.A,{name:s,isChannelFiles:a,className:a?"c-pillow_file__user-channel-files":"c-pillow_file__user"});return(renderUser.displayName="renderUser",(0,u.A)(e)||(0,m.aK)(e)||(0,m.c4)(e)||(0,m.Bp)(e)||(0,m.Ki)(e))?null:n.createElement("div",{className:"c-pillow_file__user_timestamp c-pillow_file__meta__entry display_flex"},renderUser(),(l="\xa0\xa0",a?"\xa0":t?[l,"\xb7",l]:l),renderTimestamp())});g.displayName="FileUserTimestamp";var y=a(0x202fa5d55),A=a(0x153e18eb9),x=a(0xe1300f34),E=a(0x108d3428e),C=a(0x22fd0ecc8),k=a(0x171fa252d);let v=new i.Ay("files"),FileCardContent=({file:e,displayText:t,showJustification:a,justification:i,isChannelFiles:c,detailType:d,detailTextOverride:p,hasNotification:h,documentUnfurlTs:_})=>{let b=(0,f.d4)(a=>t||((0,E.A)(e)?(0,x.Wg)(a,e):e.title?(0,r.A)(e.title):(0,C.WP)(e))),S=(0,u.A)(e),I=(0,m.aK)(e),w=(0,m.c4)(e),T=(0,m.kn)(e),N=!S&&!I&&!w,M=(0,n.useRef)(null),R=(0,n.useRef)(null),P=(0,k.c)(M.current),L=(0,k.c)(R.current),O=n.createElement(y.A,{text:b,showTooltips:!1});I?O=v.t("This file was deleted."):w?O=v.t("This file was not found."):T&&(O=null);let renderInfo=()=>N?T?n.createElement(A.A,{context:"file_card"}):a?i:n.createElement(g,{file:e,useSeparator:!0,excludeTime:!0}):n.createElement(s.A,null);renderInfo.displayName="renderInfo";let D=n.createElement("div",{className:"p-file_card__entity"},n.createElement(o.A,{file:e,id:e.id,detailType:d,detailTextOverride:p,timestampProps:{isChannelFiles:!!c,excludeTime:!0},forceIconThumbnail:!0,documentUnfurlTs:_,hasNotification:h}));return P||L?n.createElement(l.Ay,{tip:n.createElement(n.Fragment,null,n.createElement("div",null,O),n.createElement("div",{className:"p-file_card__tooltip_info"},renderInfo()))},D):D};FileCardContent.displayName="FileCardContent";let S=FileCardContent},0x3be5855c:(e,t,a)=>{"use strict";a.d(t,{A:()=>C});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20b4dda68),s=a(0x185d29d70),c=a(0x1d3efd4ea),d=a(0x14813ebd1),m=a(0x1b2e599bc),u=a(0x1ced75d54),p=a(0x1376f3e6),h=a(0xbd3de346),_=a(0x108b445e9),f=a(0x1abdfd657),b=a(0x1a3aebc27),g=a(0x8edc8141),y=a(0x1b9d5cc0c),A=a(0xe684f705),x=a(0xbac48619),E=a(0x226892387);let FileCardPreview=({file:e,suppressAnimations:t,fileContainerType:a,shouldUseFileAspectRatio:r,className:C,useFullSizeImage:k=!1,disableContextMenu:v=!1})=>{let S=(0,x.A)(e),[I,w]=(0,n.useState)(!1),[T,N]=(0,n.useState)(!1),{filetype:M,original_h:R,original_w:P}=e,L=(0,E.d4)(t=>e&&((e,t)=>{if(!t||!(0,h.Vx)(t)||!(0,h.sJ)(t))return!1;let a=t.bot_user_id||t.user;if(!a)return!1;let n=(0,A.nv)(e,a),r=(0,y.PV)(n);return!!r&&!!(0,b.rB)(r)&&(0,g.A)(e,t)})(t,e)),O=k?(0,h.N7)(e):getThumbnailSrc(e,t,L),D=M||(0,h.J4)(e.mimetype??""),F=(0,n.useMemo)(()=>({backgroundImage:`url("${O?CSS.escape(O):""}")`,aspectRatio:r&&P&&R?(P/R).toFixed(6):void 0}),[O,r,P,R]),U=(0,n.useMemo)(()=>(0,h.DQ)(e)?n.createElement(m.Ay,{fileId:e.id,hideTitle:!0}):null,[e]),B=(0,h._y)(e)||(0,_.A)(e);(0,n.useEffect)(()=>{if(!O||S||T)return;let e=document.createElement("img");e.src=O,e.onload=()=>{N(!0)},e.onerror=()=>{w(!0)}},[S,T,O]);let H=O&&T&&!I,W=O&&!T&&!I,V=(!O||I)&&!S,G=0;(0,_.A)(e)&&(G=e.transcription_hl?.lines?.[0]?.start_time_ms??0);let q=!B&&V;function getPlaceholderImageClassName(){if(q){let e=(0,s.a3)({fileTypeDescription:D}),t=(0,s.lZ)({fileTypeDescription:D}),n=a!==o.zk.FILE_EMBEDDED_UNFURL&&(0,s.iL)({fileTypeDescription:D}),r=(0,s.FZ)({fileTypeDescription:D});if(e)return"p-file_card__preview--placeholder-image";if(n)return"p-file_card__preview--placeholder-text";if(t)return"p-file_card__preview--placeholder-email";if(r)return"p-file_card__preview--preview-zip"}return""}let j=n.createElement("div",{"data-file-id":e.id,className:i()("p-file_card__preview",C,getPlaceholderImageClassName(),{"p-file_card__preview--embedded":a===o.zk.FILE_EMBEDDED_UNFURL,"p-file_card__preview--quip":a===o.zk.FILE_QUIP_BROWSER,"p-file_card__preview--browser":a===o.zk.FILE_BROWSER}),style:H?F:void 0,"data-qa":"file-card-preview"},(S||W)&&n.createElement(c.A,{size:50,dataQa:"file_card_preview_missing_icon"}),B&&n.createElement(p.A,{file:e,className:"p-file_card__preview__playable",useUserAvatarAudioThumb:!0,jumpToTimeMs:G}),a===o.zk.FILE_EMBEDDED_UNFURL&&"snippet"===(0,f.t)(e)&&n.createElement(u.A,{file:e,clogLinkClick:l.A,showTruncationWarning:!1,isExpanded:!0}),U);return n.createElement(d.T,{file:e,disabled:v},j)};function getThumbnailSrc(e,t,a){return(0,h.mN)(e,{suppressAnimations:t,isCfsImage:a})}FileCardPreview.displayName="FileCardPreview";let C=FileCardPreview},0x241ac41be:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x339b339c);let FileCardSkeleton=()=>n.createElement("div",{className:i()("p-file_card__container","p-file_card__container--ia4")},n.createElement("div",{className:"p-file_card"},n.createElement("div",{className:"p-file_card__content"},n.createElement(l.A,{size:"random"}),n.createElement("br",null),n.createElement(l.A,{size:"random"})),n.createElement("div",{className:"p-file_card__preview"})));FileCardSkeleton.displayName="FileCardSkeleton";let o=FileCardSkeleton},0x10aeb4921:(e,t,a)=>{"use strict";a.d(t,{A:()=>z});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20b4dda68),o=a(0x181d663bb),s=a(0x20482ad21),c=a(0xf3c40abe),d=a(0x5373464c),m=a(0x410829f8),u=a(0x3796a18c),p=a(0xe96db5ef),h=a(0x2301c802e),_=a(0x12c8377bb),f=a(0x24137a62),b=a(0x3be5855c),g=a(0x1ba0b4731),y=a(0x1e40425ab),A=a(0x190011db1),x=a(0xbd3de346),E=a(0x20679dcfc),C=a(0xdd7fdd59),k=a(0xbac48619),v=a(0x1d06aec13),S=a(0x1c91944c9),I=a(0x1ccef1c6f),w=a(0x1090ec8f9),T=a(0x226892387),N=a(0x1e3eb45fd),M=a(0x3711e82d),R=a(0x45012309),P=a(0x11c82607b),L=a(0x183e20f52),O=a(0x1c56fcf95),D=a(0x1512257b8),F=a(0x19315733c),U=a(0xd1201dea),B=a(0x14ea3ce99);let H=(0,P.Ay)("Clog file share click",(e,t,{fileId:a,browserInstanceId:n})=>{let r=t(),i=(0,R.eo)({state:r}),{metadata:l,results:o,page:s,sort:c}=(0,O.gK)(r,n),d=l?.[a]?.iid,m=o[s].indexOf(a),u=(0,B.Lp)(r,a);i.track(M.EventId.SEARCH_CLICK,{...(0,U.D)(r,n),...(0,F.M)(r,e,n),click_target_type:D.v.FILE_SHARE,click_iid:d,click_user_id:u.user,click_file_id:a,click_position:m,click_file_type:u.filetype}),i.track(M.EventId.SEARCH_RESULT_CLICK,{...(0,U.D)(r,n),...(0,F.M)(r,e,n),click_target_type:D.v.FILE_SHARE,click_iid:d,click_user_id:u.user,click_file_id:a,click_position:m,click_file_type:u.filetype}),"recommended"===c&&e((0,L.aV)({position:m,id:a,selectedType:"file"}))});H.meta={name:"clogFileShareClick",key:"createThunkClogFileShareClick",description:"Clog file share click"};var W=a(0x217553e42),V=a(0x14149c126),G=a(0x2291c5d37);let q=new s.Ay("file");function FileCard({externalWorkspaceId:e,externalWorkspace:t,refToForward:a,browserInstanceId:r,file:s,width:c,className:C,containerClassName:S,displayText:I,showJustification:w,justification:M,suppressAnimation:R,isFocused:P,forceClickStyles:L,mainAction:O,isChannelFiles:D,clogProps:F,dispatchClogClick:U,dispatchClogFileShareClick:B,onClick:H,onContextMenu:j,onKeyDown:z,onBlur:K,onFocus:$,tabIndex:Y,style:Q,hasKeyboardFocus:Z,fileContainerType:J,detailType:X=u.s.OWNER_TIMESTAMP,detailTextOverride:ee,badgeCount:et=0,hasNotification:ea=!1,documentUnfurlTs:en,containingFileChannelId:er,disableFileActions:ei=!1,shouldShowPreview:el=!0,isOnSearchTab:eo=!1,channelId:es,...ec}){let ed,[em,eu]=(0,n.useState)(!1),[ep,eh]=(0,n.useState)(!1),e_=(0,n.useCallback)(()=>{eu(!0)},[]),ef=(0,n.useCallback)(()=>{eu(!1)},[]),eb=(0,n.useCallback)(e=>{eh(!1),K?.(e)},[K]),eg=(0,n.useCallback)(e=>{eh(!0),$?.(e)},[$]),ey=(0,n.useCallback)(e=>{U({file:s,payload:{...e,...F},isChannelFiles:D})},[U,s,F,D]),eA=(0,n.useCallback)(({fileId:e})=>{r&&B({browserInstanceId:r,fileId:e})},[B,r]),[ex,eE]=(0,n.useState)(null),eC=(0,n.useMemo)(()=>(0,x.wL)(s)?(0,E.p)(s.id):"",[s]),ek=(0,T.d4)(e=>eC?(0,W.OL)(e,eC):null),ev=(0,T.d4)(N.sE),{embeddedUiData:eS}=(0,n.useContext)(h.N),eI=(0,p.A)(),ew=(0,T.d4)(e=>(0,x.wL)(s)?(0,G.X)(e,s.id,!0):"");(0,n.useEffect)(()=>{ew&&eI?.docs.getCannedDocName(ew).then(e=>{eE(e)})},[eI,ew]);let eT=!!eC&&!ek?.is_channel&&!!ex&&(0,v.Fh)(ex)&&J===l.zk.FILE_QUIP_BROWSER,eN=(0,T.d4)(e=>"on"===(0,V._Z)(e,"canvas_badging_highlighting"))&&s.show_badge,eM=n.createElement(f.A,{file:s,displayText:I,showJustification:!!w,justification:M,isChannelFiles:!!D,detailType:X,detailTextOverride:ee,documentUnfurlTs:en,hasNotification:ea||eN}),eR=!!H,eP=!!eS,eL=eR?g.A:"div",eO=eR?{file:s,onClick:H,onBlur:eb,onFocus:eg,onKeyDown:z,tabIndex:Y}:void 0,eD=!!(P||ep&&Z),eF=(!eP||eS.isFocusedOrReadOnly())&&(em||eD);et>0&&(0,x.wL)(s)&&!(0,k.A)(s)&&(0,x.ZG)(s)?ed=n.createElement(m.Gm,{count:et,className:"c-file__mention_badge",style:m.rY.red}):eT&&(ed=n.createElement(d.A,{className:"p-file_card__callout_badge"},q.t("Sample")));let eU=ev&&(0,x.b5)(s)?n.createElement(A.A,{file:s,fileContainerType:J}):null;return n.createElement(y.n.Provider,{value:{mouseOver:eF}},n.createElement("div",{className:i()("p-file_card__container","p-file_card__container--ia4",{"p-file_card__container--focus-visible":Z},S),onContextMenu:j},n.createElement(eL,{ref:a,className:i()({"p-file_card":!eP,"p-file_card--focus":eD,"p-file_card--clickable":L,"p-file_card--view":"view"===O&&J!==l.zk.FILE_EMBEDDED_UNFURL},C),role:"presentation",onMouseEnter:e_,onMouseLeave:ef,style:Q,...eO,...(0,o.A)(ec)},eM,el?n.createElement(b.A,{file:s,suppressAnimations:R,fileContainerType:J}):void 0),ed,!ei&&n.createElement(_.A,{className:i()("p-file_card__actions",{"p-file_card__actions--hover":eF}),file:s,externalWorkspaceId:e,externalWorkspace:t,clogLinkClick:ey,clogShareClick:eA,isChannelFiles:D,fileContainerType:J,embeddedUiData:eS??void 0,isOnSearchTab:eo,channelId:es}),eU))}function mapStateToProps(e,{file:t}){return{suppressAnimation:!(0,I.ty)(e,"a11y_animations"),mainAction:(0,C.q)(e,t)}}function mapDispatchToProps(e){return{dispatchClogClick:t=>e((0,w.q)(t)),dispatchClogFileShareClick:t=>e(H(t))}}FileCard.displayName="FileCard";let j=(0,S.N)(mapStateToProps,mapDispatchToProps)((0,c.A)(FileCard)),z=n.forwardRef((e,t)=>n.createElement(j,{refToForward:t,...e}))},0xe28bfa77:(e,t,a)=>{"use strict";a.d(t,{P:()=>f});var n=a(0xbad225b5),r=a(0xd6ba6894),i=a(0x20482ad21),l=a(0x6e87d4ec);let o=(0,a(0xf8dd7f80).getGenericLogger)();async function copyImageToClipboard(e,t=r.J){if(!t.navigator.clipboard?.write||"u"<typeof ClipboardItem)return o.warn("Clipboard API is not available"),!1;try{return await t.navigator.clipboard.write([new ClipboardItem({"image/png":createImageBlobPromise(e,t)})]),!0}catch(e){return o.warn("Failed to copy image to clipboard",e),!1}}async function createImageBlobPromise(e,t=r.J){let a=await fetch(e,{credentials:"include",cache:"reload"});if(!a.ok)throw Error(`Failed to fetch image: ${a.status}`);let n=await a.blob();return"image/png"===n.type?n:convertBlobToPng(n,t)}function convertBlobToPng(e,t=r.J){return new Promise((a,n)=>{let r=new Image,i=URL.createObjectURL(e);r.onload=()=>{URL.revokeObjectURL(i);let e=t.document.createElement("canvas");e.width=r.naturalWidth,e.height=r.naturalHeight;let l=e.getContext("2d");l?(l.drawImage(r,0,0),e.toBlob(e=>{e?a(e):n(Error("Failed to convert image to PNG"))},"image/png",1)):n(Error("Could not get canvas 2d context"))},r.onerror=()=>{URL.revokeObjectURL(i),n(Error("Failed to load image for conversion"))},r.src=i})}var s=a(0x1d73a63ad),c=a(0x11c82607b),d=a(0x14149c126),m=a(0x16ffed5ab),u=a(0x19895585a),p=a(0xe822f938);let h=new i.Ay("file"),_={name:"check"};function getFocusedWindow(e){let t=(0,p.pA)(e);if(t&&t!==u.N2){let e=(0,s.ZF)(t)?.childWindowRef;if(e)return e}return r.J}let f=(0,c.Ay)("Copy image to clipboard with toast",async(e,t,{imageUrl:a})=>{let r=t(),i="on"===(0,d._Z)(r,"files_native_context_menu"),o=getFocusedWindow(r),s=await copyImageToClipboard(a,o);return e(s?(0,m.M)({element:n.createElement(l.A,{announceContentAsAssertive:!1,svgIconProps:_},i?h.t("Image copied to clipboard"):"Image copied to clipboard"),targetWindow:o}):(0,m.M)({element:n.createElement(l.A,{announceContentAsAssertive:!1,svgIconProps:_},i?h.t("Failed to copy image"):"Failed to copy image"),targetWindow:o})),s});f.meta={name:"copyImageToClipboardWithToast",key:"createThunkCopyImageToClipboardWithToast",description:"Copy image to clipboard with toast"}},0x14813ebd1:(e,t,a)=>{"use strict";a.d(t,{T:()=>FileContextMenuTrigger});var n=a(0xbad225b5),r=a(0x20482ad21),i=a(0x11253e6a6),l=a(0x13cbe94af),o=a(0xbd3de346),s=a(0x226892387),c=a(0x14149c126),d=a(0x11e29432f),m=a.n(d);let u=new r.Ay("file");function FileContextMenuTrigger({children:e,file:t,disabled:a=!1,channelId:r,viewContext:d}){let{getTemplate:p}=(0,l.E)(t,r,d),h=(0,s.d4)(e=>"on"===(0,c._Z)(e,"files_native_context_menu"));return!a&&h&&(0,o.ZG)(t)?n.createElement(i.A,{getTemplate:p,desktopAppOnly:!1,showSlackKitContextMenuOnDesktop:!0,width:"auto",menuAriaLabel:u.t("File actions")},n.createElement("div",{className:m().wrapper},e)):e}FileContextMenuTrigger.displayName="FileContextMenuTrigger"},0x13cbe94af:(e,t,a)=>{"use strict";a.d(t,{v:()=>getFileContextMenuTemplate,E:()=>useFileContextMenu});var n,r=a(0xbad225b5),i=a(0x16cf1da63),l=a(0xec8d5140),o=a(0x20f503dd9),s=a(0x62a17882),c=a(0x20482ad21),d=((n={}).SHARE_FILE="share_file",n.COPY_IMAGE="copy_image",n.COPY_LINK_TO_FILE="copy_link_to_file",n.DOWNLOAD="download",n.SAVE_FOR_LATER="save_for_later",n.OPEN_IN="open_in",n.EDIT_IMAGE_DETAILS="edit_image_details",n.VIEW_FILE_DETAILS="view_file_details",n.CREATE_EXTERNAL_LINK="create_external_link",n.ADD_TO_FOLDER="add_to_folder",n.DELETE_FILE="delete_file",n);let m={groups:[{items:["share_file","copy_image","copy_link_to_file","download"],separator:!1}]},u={groups:[{items:["download"],separator:!0},{items:["share_file","copy_link_to_file","copy_image","save_for_later"],separator:!0},{items:["open_in","edit_image_details","view_file_details","create_external_link"],separator:!0},{items:["add_to_folder"],separator:!0},{items:["delete_file"],separator:!1}]};var p=a(0x3440462),h=a(0xd6a16321),_=a(0xbd3de346),f=a(0x1ed767a16),b=a(0x3711e82d);let g=new c.Ay("file");function getFileContextMenuAutoClogProps(e,t){return{eventId:b.EventId.CONTEXT_MENU_ACTION,elementName:e,onClick:{enableClogAction:!0},uiComponentName:"file_context_menu",fileId:t}}let buildFileContextMenuItems=({channelId:e,file:t,fileActions:a,messageContext:n,dispatchNavigate:i,dispatchLinkCopiedToast:l,dispatchCopyImageToClipboardWithToast:o,dispatchOpenEditFileDialog:c,dispatchOpenImageInNewChildWindow:b,dispatchOpenFileInBrowser:y,dispatchAddSavedFile:A,dispatchRemoveSavedFile:x,dispatchOpenFilePublicUrlDialog:E,dispatchCreatePublicFileUrlAndOpenDialog:C,dispatchOpenDeleteFileDialog:k,onDownload:v,onOpenVideoInNewWindow:S,onShare:I,experimentFilesNativeContextMenuGroupOn:w,experimentMessageGalleryV2GroupOn:T,experimentMessageGalleryV3GroupOn:N,isClientOffline:M})=>{let R=(0,_.IE)(t),P=(0,_.sJ)(t),L=(0,_.ez)(t),O={label:g.t("Open in browser"),target:t.id,href:t.url_private,click:e=>{y?.()&&e.preventDefault()}},openWindow=e=>{(0,s.dY)("4.6.0")&&(0,_.sJ)(t)&&(b?.(),e.preventDefault()),(0,_.ez)(t)&&(0,s.dY)("4.6.0")&&S?.()},D={label:(0,s.y3)()?g.t("Open in new window"):g.t("Open in new tab"),target:t.id,href:t.url_private,click:e=>{openWindow?.(e)}},F={label:T||N?g.t("Open in thread"):"Open in thread",click:()=>{}},renderAddToFolderSubmenu=a=>r.createElement(p.e1,{fileId:t.id,channelId:e,menuProps:a});renderAddToFolderSubmenu.displayName="renderAddToFolderSubmenu";let deleteFile=()=>{let a=(0,_.VP)(t),r=n?.ts,i=n?.msg,l=n?.threadTs,o=n?.viewContext,s=i?i.files:void 0,c=i&&i.text?.length?a??void 0:r;k?.({fileId:t.id,channelId:e,threadTs:l,ts:r,fileIds:s,msgFileTs:c,viewContext:o,isStackable:!0})},U={[d.SHARE_FILE]:()=>(!a||a.share||a.share_private_file)&&I?{label:g.t("Share file\u2026"),click:e=>{e?.stopPropagation?.(),e?.preventDefault?.(),I(e)},dataQa:"share_file",autoClogProps:getFileContextMenuAutoClogProps("share_file",t.id)}:null,[d.COPY_IMAGE]:()=>{if(P){let e=(0,_.N7)(t);if(e)return{label:w?g.t("Copy image"):"Copy image",click:t=>{t?.stopPropagation?.(),t?.preventDefault?.(),o?.(e)},dataQa:"copy_image",autoClogProps:getFileContextMenuAutoClogProps("copy_image",t.id)}}return null},[d.COPY_LINK_TO_FILE]:()=>!a||a.copy_file_link?{label:T||N?g.t("Copy link"):g.t("Copy link to file"),click:e=>{e?.stopPropagation?.(),e?.preventDefault?.(),(0,f.x3)(R),l?.()},dataQa:"copy_link",autoClogProps:getFileContextMenuAutoClogProps("copy_link",t.id)}:null,[d.DOWNLOAD]:()=>(!a||a.download)&&v?{label:g.t("Download"),click:e=>{e?.stopPropagation?.(),e?.preventDefault?.(),v(e)},dataQa:"download_action",autoClogProps:getFileContextMenuAutoClogProps("download_file",t.id)}:null,[d.SAVE_FOR_LATER]:()=>{if(T||N){let e=g.t("Save for later"),a=(0,_.Gs)(t);return a&&(e=g.t("Remove from Later")),{label:e,click:e=>{e?.stopPropagation?.(),e?.preventDefault?.(),a?x?.():A?.()}}}return null},[d.OPEN_IN]:()=>{let e=a?.open_original&&!!openWindow||a?.open_in_browser;if((T||N)&&e){let e=[];return(0,s.y3)()&&e.push(O),P&&e.push(D),L&&e.push(F),{label:T||N?g.t("Open in"):"Open in",type:"submenu",template:e}}return null},[d.EDIT_IMAGE_DETAILS]:()=>P&&a?.edit_file&&(T||N)?{label:g.t("Edit image details"),disabled:M,showOfflineIcon:M,click:()=>{c?.()}}:null,[d.VIEW_FILE_DETAILS]:()=>T||N?{label:g.t("View file details"),click:()=>{i?.((0,h.EJ)(t.id))}}:null,[d.CREATE_EXTERNAL_LINK]:()=>(a?.create_public_link||a?.view_public_link||a?.revoke_public_link)&&!(0,_.DQ)(t)&&(T||N)?{label:t.public_url_shared?g.t("View external link\u2026"):g.t("Create external link\u2026"),disabled:M,showOfflineIcon:M,click:()=>{t.public_url_shared?E?.():C?.()}}:null,[d.ADD_TO_FOLDER]:()=>a?.add_to_folder&&(T||N)?{label:g.t("Add to folder"),type:"submenu",renderSubmenu:renderAddToFolderSubmenu}:null,[d.DELETE_FILE]:()=>a?.delete_file&&(T||N)?{label:g.t("Delete file"),disabled:M,showOfflineIcon:M,danger:!0,click:()=>deleteFile?.(),dataQa:"delete_file"}:null};return((P||L)&&(T||N)?u:m).groups.flatMap(e=>{let t=e.items.map(e=>{let t=U[`${e}`];if(t){let e=t();if(e)return e}return null}).filter(e=>null!==e);return e.separator&&t.push({type:"separator",key:`separator-${e.items.join(" - ")}`}),t})};buildFileContextMenuItems.displayName="buildFileContextMenuItems";var y=a(0xe28bfa77),A=a(0x1060b2cb),x=a(0x124f71042),E=a(0x4a4f65b2),C=a(0xaec471e9),k=a(0x1a02c72b5),v=a(0xeeae4283),S=a(0xf504efa8),I=a(0x16a97f29c),w=a(0x1e9956325),T=a(0x2f04ca84),N=a(0x2210540b5),M=a(0x22d443103),R=a(0x1a9f7b6d4),P=a(0x226892387),L=a(0x15f2fd44c),O=a(0x17a41206b),D=a(0x14149c126),F=a(0x1de4133);function getFileContextMenuTemplate({channelId:e,file:t,fileActions:a,messageContext:n,dispatchNavigate:r,dispatchLinkCopiedToast:i,dispatchCopyImageToClipboardWithToast:l,dispatchOpenEditFileDialog:o,dispatchOpenImageInNewChildWindow:s,dispatchOpenFileInBrowser:c,dispatchOpenFilePublicUrlDialog:d,dispatchCreatePublicFileUrlAndOpenDialog:m,dispatchAddSavedFile:u,dispatchRemoveSavedFile:p,dispatchOpenDeleteFileDialog:h,onDownload:_,onOpenVideoInNewWindow:f,onShare:b,experimentFilesNativeContextMenuGroupOn:g,experimentMessageGalleryV2GroupOn:y,experimentMessageGalleryV3GroupOn:A,isClientOffline:x}){return buildFileContextMenuItems({channelId:e,file:t,fileActions:a,messageContext:n,dispatchNavigate:r,dispatchLinkCopiedToast:i,dispatchCopyImageToClipboardWithToast:l,dispatchOpenEditFileDialog:o,dispatchOpenImageInNewChildWindow:s,dispatchOpenFileInBrowser:c,dispatchOpenFilePublicUrlDialog:d,dispatchCreatePublicFileUrlAndOpenDialog:m,dispatchAddSavedFile:u,dispatchRemoveSavedFile:p,dispatchOpenDeleteFileDialog:h,onDownload:_,onOpenVideoInNewWindow:f,onShare:b,experimentFilesNativeContextMenuGroupOn:g,experimentMessageGalleryV2GroupOn:y,experimentMessageGalleryV3GroupOn:A,isClientOffline:x})}function useFileContextMenu(e,t,a){let n=(0,i.wA)(),s=(0,A.H$)(e),c=(0,r.useContext)(x.A),d=(0,P.d4)(e=>"on"===(0,D._Z)(e,"files_native_context_menu")),m=(0,P.d4)(e=>(0,E.v)(e,a)),u=(0,P.d4)(e=>(0,C._)(e,a)),p=!(0,P.d4)(O.Pb),h=(0,r.useCallback)(()=>{(0,_.DQ)(e)?n((0,R.A)({fileId:e.id})):(0,_.l7)(e)?n((0,S.A)({fileId:e.id,isStackable:!0})):n((0,M.A)({fileId:e.id,isStackable:!0}))},[e,n]);return{getTemplate:(0,r.useCallback)(()=>getFileContextMenuTemplate({channelId:t,messageContext:c,file:e,fileActions:s,dispatchAddSavedFile:()=>n((0,F.jx)({fileId:e.id})),dispatchCopyImageToClipboardWithToast:e=>n((0,y.P)({imageUrl:e})),dispatchLinkCopiedToast:()=>n((0,l.M)()),dispatchNavigate:e=>n((0,k.o)(e)),dispatchRemoveSavedFile:()=>n((0,F.U4)({itemId:e.id})),dispatchOpenImageInNewChildWindow:()=>n((0,N.A)({file:e})),dispatchOpenEditFileDialog:()=>n((0,w.A)({file:e,isStackable:!0,dialogEntrypoint:w.o.FILE_ACTIONS_MENU})),dispatchOpenFilePublicUrlDialog:()=>n((0,o.l)({fileId:e.id,isStackable:!0})),dispatchCreatePublicFileUrlAndOpenDialog:()=>n((0,o.M)({fileId:e.id,isStackable:!0})),dispatchOpenFileInBrowser:()=>n((0,T.A)({fileId:e.id})),dispatchOpenDeleteFileDialog:e=>n((0,I.A)(e)),isClientOffline:p,onDownload:()=>n((0,v.A)({file:e,clog:!1,action:L.c.DownloadFile})),onShare:h,experimentFilesNativeContextMenuGroupOn:d,experimentMessageGalleryV2GroupOn:m,experimentMessageGalleryV3GroupOn:u}),[t,c,e,s,n,h,p,d,m,u]),fileActions:s}}},0x1ba0b4731:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x11a296110),s=a(0x210cf696f),c=a(0x2301c802e),d=a(0x15f4f83cf),m=a(0x25005369a),u=a(0x3711e82d),p=a(0x226892387);function FileLinkButton({refToForward:e,children:t,file:a,className:r,onClick:h,preventDefault:_,autoClogProps:f,...b}){let g=(0,p.d4)(e=>a&&(0,d.uz)(a)&&(0,m.K)(e,a))||"",{embeddedUiData:y}=(0,n.useContext)(c.N),A=(0,n.useCallback)(e=>{(h&&h!==l.A||_)&&(e.preventDefault(),h?.(e))},[h,_]),x=(0,n.useMemo)(()=>({eventId:u.EventId.QUIP_CANVAS_URL_CLICK,onClick:{enableClogAction:!0},source:"canvas",canvasNewNotificationBadge:!!a?.show_badge,contexts:{core:{file_id:a?.id}}}),[a?.id,a?.show_badge]);return g||h?y?n.createElement(s.A,{ref:e,className:i()("p-file_link_button--link",r),onClick:A,autoClogProps:x,renderAsSpan:!0,...b},t):n.createElement(o.jV,{ref:e,className:i()("p-file_link_button--link",r),href:g,onClick:A,autoClogProps:f,...b},t):n.createElement("div",{ref:e,className:r,...b},t)}FileLinkButton.displayName="FileLinkButton";let h=n.forwardRef((e,t)=>n.createElement(FileLinkButton,{refToForward:t,...e}))},0x11ff2a0ed:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x2469ec64e),c=a(0x913f6320),d=a(0x11aaf59fe),m=a(0xbd3de346),u=a(0x3711e82d),p=a(0x107aecd4a),h=a(0x226892387),_=a(0x217553e42),f=a(0xb47d3416),b=a(0x6dc64a9b),g=a(0xaa51370c);let y=new o.Ay("file-permissions"),A={eventId:u.EventId.QUIP_PERMISSIONS_CHANGE,uiComponentName:u.UiComponentName.QUIP_PERMISSIONS_ACCESS_SELECT,uiComponentVariant:"composer",elementName:"quip_permissions_access_select_composer_option",onOptionSelected:{enableClogAction:!0,setElementValueOnAction:!0}},FilePermissionsSelect=({file:e,draftId:t,channelId:a,onFilePermissionSelect:i})=>{let o,u=(0,h.d4)(a=>(0,b.ZB)(a,t,e.id)),x=(0,h.d4)(e=>(0,_.OL)(e,a)),E=(0,m.dE)(e),[C,k]=(0,n.useState)(!1),v=(0,r.wA)(),S=(0,p.cB)({file:e,targetChannel:x}),I=u&&!!S.find(e=>e.value===u.grant);return void 0!==u&&I?o=(0,p.GY)(e,u.grant):(o=(0,m.x0)(e)||E?(0,p.GY)(e,g.z.Read):S.find(e=>!e.isDisabled))&&v((0,f.zg)({fileId:e.id,draftId:t,grant:o.value})),n.createElement(c.A,{key:`file-permissions-select-${e.id}-${S.length}`,className:l()("p-file_quip_canvas_text_select",{"p-file_quip_canvas_text_select--focus_ring":C}),selectId:`file-access-select-${(0,s.r9)()}`,selectDataQa:"file-access-select",options:S,selectedOption:o,onOptionSelected:(a,n)=>{k(!!n),v((0,f.zg)({fileId:e.id,draftId:t,grant:a.value})),i&&i()},ariaLabel:y.t("Select Access Level"),size:d.hu.SMALL,isRequired:!0,autoClogProps:A})};FilePermissionsSelect.displayName="FilePermissionsSelect";let x=FilePermissionsSelect},0x1266327e6:(e,t,a)=>{"use strict";a.d(t,{H:()=>FileSectionDropdownButton});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x11a296110),s=a(0x344bb842),c=a(0x99233ecb),d=a(0x2501a2cee),m=a(0x4c96e5d9),u=a(0x1b3ecb90f),p=a(0x1e1803eda),h=a(0x226892387),_=a(0x14149c126),f=a(0x225501578),b=a(0x4479e27b);let g=new l.Ay("files");function FileSectionDropdownButton({fileId:e,size:t="x-small",addToRecentsOnRemove:a,showOutline:r=!1,className:l,tooltipPosition:y="bottom-right",source:A}){let x=(0,h.d4)(e=>"on"===(0,_._Z)(e,"custom_file_sections")),E=(0,h.d4)(t=>(0,b.IN)(t,e)),C=(0,n.useCallback)(t=>n.createElement(p.d,{fileId:e,addToRecentsOnRemove:a,menuProps:t,source:A}),[e,a,A]),k=E?.type===f.$.STARRED,v=E?.emoji,S=!!E;if(!x)return null;let I=g.t("Move file");return k?n.createElement(c.cQ,{key:"starred",position:"bottom-right",renderMenu:C},n.createElement(m.Ay,{tip:I,position:y},n.createElement(o.Nm,{className:i()("inline_flex","p-view_header_star_action_button","p-view_header_star_action_button_filled","icon_button",{"icon_button--outline":r},l),"aria-label":I,"data-qa":"star-file-button"},n.createElement(d.Ah,{name:"star-filled",size:"20"})))):v?n.createElement(c.cQ,{key:"emoji",position:"bottom-right",renderMenu:C},n.createElement(m.Ay,{tip:I,position:y},n.createElement(s.A,{size:t,outline:r,"aria-label":I,"data-qa":"star-file-button",className:l},n.createElement(u.Ay,{shouldFallbackOnLoadError:!0,emojiSize:u.lw.SMALL,text:E.emoji,stopAnimations:!0,renderEmojiFallback:!0})))):n.createElement(c.cQ,{key:"icon",position:"bottom-right",renderMenu:C},n.createElement(m.Ay,{tip:I,position:y},n.createElement(s.A,{size:t,outline:r,"aria-label":I,"data-qa":"star-file-button",svgIconProps:{name:S?"section":"star",size:"20"},className:l})))}FileSectionDropdownButton.displayName="FileSectionDropdownButton"},0x1c3fa2c57:(e,t,a)=>{"use strict";a.d(t,{A:()=>withFileSubscription});var n=a(0xbad225b5),r=a(0x1f3226107),i=a(0x1c91944c9);let l=class extends n.PureComponent{static defaultProps={fileId:void 0,fileIdToFetch:void 0,alwaysFetchOnMount:!1,publicShared:!1,skipShares:!1};pendingPromise=null;constructor(e){super(e),this.reloadFile=this.reloadFile.bind(this),this.state={fileIsFetching:!1}}componentDidMount(){this.props.alwaysFetchOnMount&&this.fetchFileInfo(this.fileIdToFetch())}componentDidUpdate(e){this.props.alwaysFetchOnMount&&this.fileIdToFetch(e)!==this.fileIdToFetch()&&this.fetchFileInfo(this.fileIdToFetch())}componentWillUnmount(){this.pendingPromise&&this.pendingPromise.cancel()}fileIdToFetch(e=this.props){return e.fileIdToFetch??e.fileId}fetchFileInfo(e){if(this.state.fileIsFetching||!e)return;this.setState(()=>({fileIsFetching:!0}));let t=this.props.fetchAndUpsertFileById({fileId:e,reason:"file-subscription.fetchFileInfo",publicShared:this.props.publicShared,skipShares:this.props.skipShares});this.pendingPromise=t.then(()=>{this.setState(()=>({fileIsFetching:!1}))}).catch(()=>{this.setState(()=>({fileIsFetching:!1}))}).finally(()=>{this.pendingPromise=null})}reloadFile(){this.fetchFileInfo(this.fileIdToFetch())}render(){let{WrappedComponent:e,forwardedRef:t,...a}=this.props;return n.createElement(e,{...this.state,...a,ref:t,reloadFile:this.reloadFile})}};function withFileSubscription(e,t={}){function mapStateToProps(a,{fileId:n,fileIdToFetch:r}){return n||r?{...t,fileIdToFetch:r,WrappedComponent:e}:{WrappedComponent:e}}let a=n.forwardRef((e,t)=>n.createElement(l,{...e,forwardedRef:t}));return(0,i.N)(mapStateToProps,e=>({fetchAndUpsertFileById:t=>e((0,r.B2)(t))}),void 0,{forwardRef:!0})(a)}l.displayName="FileSubscription",withFileSubscription.displayName="withFileSubscription"},0xbc05fc30:(e,t,a)=>{"use strict";a.d(t,{A:()=>FileTitleBadge});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20482ad21),o=a(0x21cf37dc6),s=a(0xbd3de346),c=a(0x226892387),d=a(0xbc72568a),m=a(0x14149c126),u=a(0x14ea3ce99),p=a(0x1950da728),h=a(0x1acf15cf9),_=a.n(h);let f=new l.Ay("files"),FileTitleBadge=({id:e,size:t,showTags:a})=>{let r=(0,c.d4)(t=>e?(0,u.Lp)(t,e):void 0),l=(0,c.d4)(e=>"on"===(0,m._Z)(e,"top_result_tags")),h=(0,s.dE)(r),b=(0,c.d4)(t=>(0,d.z4)(t,e??"")),g=(0,s.Vc)(r),y=r?.tag,A=i()(_().fileTitleBadge,{[_().fileTitleBadgeSizeSmall]:t===o.o.Small}),x=i()(_().topResultsfileTitleBadge,{[_().fileTitleBadgeColorOcean]:y===p.Ab.RECENTLY_UPDATED_BY_YOU,[_().fileTitleBadgeColorTomato]:y===p.Ab.FREQUENTLY_VIEWED_BY_YOU,[_().fileTitleBadgeColorSangria]:y===p.Ab.NEW,[_().fileTitleBadgeColorGrass]:y===p.Ab.POPULAR_THIS_WEEK,[_().fileTitleBadgeColorRed]:y===p.Ab.FREQUENTLY_VIEWED_BY_YOU,[_().fileTitleBadgeColorHoneycomb]:y===p.Ab.RECENTLY_VIEWED,[_().fileTitleBadgeColorFlamingo]:y===p.Ab.RECENTLY_UPDATED_BY_OTHERS,[_().fileTitleBadgeColorAqua]:y===p.Ab.RECENTLY_SHARED_BY_YOU});return h||b||g?n.createElement("div",{className:A},n.createElement("span",null,f.t("Template"))):l&&y&&a?n.createElement("div",{className:x},n.createElement("span",null,y)):null};FileTitleBadge.displayName="FileTitleBadge"},0x23033658b:(e,t,a)=>{"use strict";a.d(t,{A:()=>connectedFile});var n=a(0xbad225b5),r=a(0x1c91944c9),i=a(0x14ea3ce99);let mapStateToProps=(e,{fileId:t})=>({file:(0,i.Lp)(e,t)});function connectedFile(e){return(0,r.N)(mapStateToProps)(t=>t&&t.file?n.createElement(e,t):null)}connectedFile.displayName="connectedFile"},0x22f5cc45d:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(0x23033658b),r=a(0x13022d1e6);let i=(0,n.A)(r.A)},0x1ab7b4693:(e,t,a)=>{"use strict";a.d(t,{C:()=>n});let n=(0,a(0x12da80373).w)("render-contextual-file",()=>null,{useSingleton:!1})},0x13022d1e6:(e,t,a)=>{"use strict";a.d(t,{A:()=>A,C:()=>renderContextualFile});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x20b4dda68),o=a(0x20482ad21),s=a(0x1c403364b),c=a(0x1c003781f),d=a(0x3796a18c),m=a(0x131e0b1e1),u=a(0x1b481369f),p=a(0xbd3de346),h=a(0xbcfcc9c7),_=a(0x4479e27b);let f=new o.Ay("files");function getFileDetailOverrideAriaLabel(e,t,a,n){let r=(0,h.N)(e,t,a);if(Array.isArray(r)&&(r=r.filter(Boolean).join(", ")),a===d.s.ACTIVITY_MENTION)return"";if(n){let a=(0,_.uU)(e,t.id),n=(0,p.dE)(t)||(0,p.Vc)(t),i=a?f.t("Starred"):"",l=n?f.t("Template"):"",o=[t.pretty_type,l].filter(Boolean).join(" ");return`${i} ${o}. ${r}`}return r}var b=a(0x226892387),g=a(0x14149c126);let y=new o.Ay("file"),ContextualFile=({file:e,className:t,clogLinkClick:a,fullWidth:r,showActions:o,onlyContextMenuAction:h,includeRootDownloadAction:_,includeRootStarAction:f,isChannelFiles:A,"data-qa":x,forceFocusVisible:E,forceHoverVisible:C,forceClickStyles:k,useListStyling:v,onClick:S,hideActionText:I=!1,includeDeleteAction:w=!0,includeExternalLinkAction:T=!0,showMoreListBrowserActions:N=!1,includeViewFileDetailsAction:M=!0,badgeCount:R,hasNotification:P=!1,detailType:L=d.s.OWNER_TIMESTAMP,detailTextOverride:O,isActive:D=!1,filePropertyOverride:F,allowLiveTitle:U,fromCanvasOrganization:B=!1,containerHasFocus:H=!1,showCanvasIa4Metadata:W=!1,showCanvasModalMetadata:V=!1,showStarredStatus:G=!1,showSearchJustification:q=!1,transparent:j=!1,includeRemoveFileFromListCellAction:z=!1,removeFileFromListCell:K,openDocSource:$,disabledReason:Y,channelId:Q,bookmark:Z,withoutBorder:J=!1,preventHoverOver:X=!1,secondaryContent:ee})=>{let et=v?c.A:s.A,ea=(0,n.useMemo)(()=>({excludeTime:!0,displaySharedBy:!I,isChannelFiles:A}),[A,I]),en=(0,b.d4)(e=>"on"===(0,g._Z)(e,"canvas_badging_highlighting")),er=en&&e.show_badge,ei=(0,m.A)(),el=(0,p.DQ)(e)&&ei,eo=el?y.t("View only"):O,es=(0,b.d4)(t=>getFileDetailOverrideAriaLabel(t,e,L,W)),ec=n.createElement(et,{file:e,id:e.id,detailType:L,timestampProps:ea,hideActionText:I,detailTextOverride:eo,hasNotification:P||er,isActive:D,allowLiveTitle:U,isViewOnly:el,showCanvasIa4Metadata:W,showCanvasModalMetadata:V,preventHoverOver:X,secondaryContent:ee}),ed="";return P?ed=en?y.t(", Unread notification"):", Unread notification":er&&(ed=en?y.t(", has new edits"):""),F&&Object.assign(e,F),n.createElement(u.A,{file:e,className:i()("p-contextual_file",{"p-contextual_file--list-item":v,"p-contextual_file--mention_notification":P},t),onClick:S,fullWidth:r,clogLinkClick:a,showActions:o,onlyContextMenuAction:h,includeRootDownloadAction:_,includeRootStarAction:f,fileContainerType:l.zk.FILE_CONTEXTUAL,"data-qa":x,forceFocusVisible:E,forceHoverVisible:C,containerHasFocus:H,forceClickStyles:k,includeDeleteAction:w,includeExternalLinkAction:T,showMoreListBrowserActions:N,includeViewFileDetailsAction:M,badgeCount:R,ariaLabel:ed,fromCanvasOrganization:B,showCanvasIa4Metadata:W,detailTextAriaLabel:es,showCanvasModalMetadata:V,showStarredStatus:G,showSearchJustification:q,isTransparent:j,includeRemoveFileFromListCellAction:z,removeFileFromListCell:K,openDocSource:$,disabledReason:Y,channelId:Q,bookmark:Z,withoutBorder:J},ec)};ContextualFile.displayName="ContextualFile";let A=ContextualFile;function renderContextualFile(e){return n.createElement(ContextualFile,e)}renderContextualFile.displayName="renderContextualFile"},0x131d7b005:(e,t,a)=>{"use strict";a.d(t,{A:()=>S});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x15f8e452a),s=a(0x1c403364b),c=a(0x3796a18c),d=a(0x1b481369f),m=a(0x2380341f5),u=a(0x20482ad21),p=a(0x16ac9b089),h=a(0x339b339c),_=a(0xf8c5d1b5);let f=new u.Ay("menu_file");function QuipLastUpdated({fileId:e}){let t=(0,_.A)(e);return t?n.createElement(n.Fragment,null,f.t("Last edited {timeAgo}",{timeAgo:t&&(0,p.Ay)((0,m.A)(t))})):n.createElement(h.A,{size:"small"})}QuipLastUpdated.displayName="QuipLastUpdated";var b=a(0x1079d10b3),g=a(0xbd3de346),y=a(0x108d3428e),A=a(0x21186af8),x=a(0x12303b2bd),E=a(0x226892387);let C=new u.Ay("menu_file");function FileSize({file:e,action:t,showPreview:a=!1,isExpandable:r=!1,isExpanded:i=!1,isFileDetails:l=!1}){let o=(0,g.Z0)(e),s=!!e&&"downloadState"in e,d=(0,E.d4)(a=>o?(0,A.A)("window",e,a):(0,A.A)(t??null,e,a)),u=(0,n.useCallback)(()=>{if(l&&((0,g.Z0)(e)||"detail"===t))return null;if(o&&a)return r?i?C.t("Click to collapse"):C.t("Click to expand"):null;return d},[t,d,e,r,i,l,o,a]),h=(0,n.useCallback)(()=>{if(o)return C.t("Last edited {timeAgo}",{timeAgo:e.updated?(0,p.Ay)((0,m.A)(e.updated)):""});if((0,y.A)(e))return C.t("Slack Clip");if((0,g.DQ)(e))return n.createElement(QuipLastUpdated,{fileId:e.id});let t=e.is_external?(0,b.A)(e):e.pretty_type;return"Arugula"===t?C.t("Post"):t},[e,o]);if((0,g.aK)(e)||(0,g.c4)(e)||(0,g.Bp)(e)||(0,g.Ki)(e))return null;if(s){let t;if("progressing"===e.downloadState||"paused"===e.downloadState){let a=e.progress,n=(0,x.A)((e.size??0)*a),r=(0,x.A)(e.size??0);t=C.t("{downloadedSizeMb} of {totalSizeMb} ",{downloadedSizeMb:n,totalSizeMb:r})}return n.createElement("div",{className:"c-pillow_file__size c-pillow_file__meta__entry"},n.createElement("div",{className:"c-pillow_file__swap"},t,h(),"completed"===e.downloadState&&n.createElement("div",{className:"c-pillow_file__slide c-pillow_file__size__action"},u())))}return t===c.h.Show||c.h.Detail,n.createElement("div",{className:"c-pillow_file__size c-pillow_file__meta__entry"},n.createElement("div",{className:"c-pillow_file__swap"},h(),n.createElement("div",{className:"c-pillow_file__slide c-pillow_file__size__action"},u())))}FileSize.displayName="FileSize";let k=FileSize,v=class extends n.Component{constructor(e){super(e),this.onClick=this.onClick.bind(this)}static defaultProps={clogLinkClick:l.A,fullWidth:!1,onClick:l.A,showActions:!0,includeRootDownloadAction:!0,includeRootStarAction:!1,className:"",isActiveDownload:!1,action:"show","data-qa":void 0,fileContainerType:void 0};onClick(e){e.preventDefault(),this.props.onClick?.(e,this.props.file)}render(){let{file:e,clogLinkClick:t,fullWidth:a,showActions:r,includeRootDownloadAction:l,includeRootStarAction:m,"data-qa":u,fileContainerType:p}=this.props,h=i()("c-pillow_file_container--download",this.props.className),_=n.createElement(k,{file:e,action:this.props.action});return n.createElement(d.A,{file:e,className:h,fullWidth:a,clogLinkClick:t,showActions:r,includeRootDownloadAction:l,includeRootStarAction:m,isDownloadFile:!0,isActiveDownload:this.props.isActiveDownload,"data-qa":u,fileContainerType:p,onClick:this.onClick},n.createElement(s.A,{id:e.id,file:e,forceIconThumbnail:!0,fileActionOverride:c.h.Open,isDetailTextBold:!0,detailTextOverride:_}),this.props.isActiveDownload&&n.createElement(o.A,{type:"circle-checkbox-checked",className:"c-pillow_file_meta_icon"}),this.props.children)}};v.displayName="DownloadFile";let S=v},0x12acc8b1:(e,t,a)=>{"use strict";a.d(t,{A:()=>E});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x1cbdfeceb),s=a(0x1b81e2549),c=a(0x9e38a344),d=a(0x14fad6485),m=a(0x20482ad21),u=a(0x11a296110),p=a(0x11fda96e5),h=a(0x7f81b930),_=a(0x1d9627ee3),f=a(0x106a32624),b=a(0x22fd0ecc8),g=a(0xb04c4a12),y=a(0x7baf2a8a),A=a(0xd539ad35);let x=new m.Ay("multi_file_upload"),DraftImageFile=({file:e,fileIds:t,previewFiles:a,channelId:i,threadTs:m,className:f,orientation:E,width:C,height:k,onReorder:v=o.A,shouldReorderVideoFiles:S=!1,isEditComposer:I=!1,viewContext:w,isImageUploaded:T=!1})=>{let N=(0,r.wA)(),{windowRef:M}=(0,n.useContext)(d._0),R=t?.indexOf(e.id),[,P,L]=(0,s.i)(()=>({type:h.Eu,item:{id:e.id}})),[{isHoveredOn:O,currentDraggingFile:D},F]=(0,c.H)(()=>({accept:h.Eu,drop:e=>{v({fileId:e.id,newIndex:R})},collect:e=>({isHoveredOn:e.isOver(),currentDraggingFile:e.getItem()})}),[R,v]),U=(0,n.useCallback)(t=>{t.stopPropagation();let n=e.url_private,r=e.original_w||C,l=e.original_h||k;w===g.Y.HUDDLE_THREADS?N((0,A.o)({fileId:e.id})):T?N((0,_.A)({fileId:e.id})):N((0,y.i)({fileId:e.id,channelId:i,threadTs:m,image:{src:n,width:r??void 0,height:l??void 0,orientation:E??void 0},images:a}))},[e,C,k,w,N,i,m,E,a,T]),renderImageThumbnail=()=>n.createElement("span",{className:"p-draft_image_file__thumbnail",ref:L},n.createElement(p.A,{className:"p-draft_image_file__thumbnail_entity",file:e,size:62}));renderImageThumbnail.displayName="renderImageThumbnail";let B=l()("p-multi_file_upload__image_file p-draft_image_file",f),H=`draft-image-file-name-${e.id}`;if(S){let a,r=t?.indexOf(D?.id),i=void 0!==r&&void 0!==R&&r<R,o=void 0!==r&&void 0!==R&&r>R,s=l()("p-draft_image_file__dropping_divider",{"p-draft_image_file__dropping_divider--first":0===R,"p-draft_image_file__dropping_divider--right":i,"p-draft_image_file__dropping_divider--left":o}),c=n.createElement("span",{className:s}),d=`p-draft_image_file${I?"-editing-":"--"}${R}`,m=l()("p-draft_image_file__btn",d,{"p-draft_image_file__btn--hovered-right":O&&i,"p-draft_image_file__btn--hovered-left":O&&o});if(void 0!==R&&R>-1){let e=`p-draft_image_file${I?"-editing-":"--"}${R-1}`,t=`p-draft_image_file${I?"-editing-":"--"}${R+1}`;(a=o?M.deref()?.document.getElementsByClassName(e)[0]:M.deref()?.document.getElementsByClassName(t)[0])||(a=o?M.deref()?.document.getElementsByClassName(`p-pending_file--${R-1}`)[0]:M.deref()?.document.getElementsByClassName(`p-pending_file--${R+1}`)[0]),a&&(O?o?a.classList.add("p-draft_image_file__btn--hovered-right"):i&&a.classList.add("p-draft_image_file__btn--hovered-left"):(a.classList.remove("p-draft_image_file__btn--hovered-right"),a.classList.remove("p-draft_image_file__btn--hovered-left")))}return n.createElement(n.Fragment,null,n.createElement("div",{ref:F},n.createElement(u.Nm,{className:m,onClick:U,"aria-label":x.t("Preview image"),"aria-describedby":H},n.createElement("div",{className:B,ref:P},renderImageThumbnail()),n.createElement("span",{id:H,hidden:!0},(0,b.SB)(e)))),O&&R!==r&&c)}return n.createElement(u.Nm,{className:"p-draft_image_file__btn",onClick:U,"aria-label":x.t("Preview image"),"aria-describedby":H},n.createElement("div",{className:B},renderImageThumbnail()),n.createElement("span",{id:H,hidden:!0},(0,b.SB)(e)))};DraftImageFile.displayName="DraftImageFile";let E=(0,f.em)(DraftImageFile)},0x1f64e1a7f:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var n=a(0xbad225b5),r=a(0x16cf1da63),i=a(0x120c268ad),l=a.n(i),o=a(0x20482ad21),s=a(0x1376f3e6),c=a(0x152b774f2),d=a(0x184bdf20),m=a(0x22fd0ecc8),u=a(0x46dbff89);let p=new o.Ay("drafts");function DraftVideoFile({className:e,file:t,onPreviewClickIsStackable:a}){let i=(0,r.wA)(),o=(0,m.V)(t)||((0,d.A)(t)?p.t("Video file"):p.t("Audio file")),h=(0,n.useCallback)(()=>{i((0,u.q)({element:n.createElement(c.A,{file:t}),isStackable:a}))},[t,i,a]);return n.createElement(s.A,{file:t,onClick:h,className:l()("p-draft_video_file",e),ariaLabel:o})}DraftVideoFile.displayName="DraftVideoFile";let h=DraftVideoFile},0x1c61266df:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x106809bc6),o=a(0x236a5cd68),s=a(0x8c0b43fc),c=a(0x4a4f65b2),d=a(0xaec471e9),m=a(0x1c91944c9);let u=class extends n.Component{isGridFile(){let{galleryMode:e}=this.props;return e===s.FS.COMPACT||e===s.FS.NARROW||e===s.FS.WIDE}isImageSmallerThanContainer({width:e,height:t}){let{originalH:a,originalW:n}=this.props;return(0,s.kh)({originalHeight:a,originalWidth:n,containerHeight:t,containerWidth:e})}renderContents({width:e,height:t,isImageSmallerThanContainer:a}){return this.props.children({width:e,height:t,isImageSmallerThanContainer:a})}renderGridFile(){let{className:e,galleryMode:t,galleryWidth:a,originalH:r,originalW:l,rowHeight:o,experimentMessageGalleryV2GroupOn:c,experimentMessageGalleryV3GroupOn:d,renderedFilesDimensions:m}=this.props;if(!this.isGridFile())return null;let{width:u,height:p,span:h,aspectRatio:_}=(0,s.zI)({galleryMode:t,galleryWidth:a,rowHeight:o,originalHeight:r,originalWidth:l,experimentMessageGalleryV2GroupOn:c,experimentMessageGalleryV3GroupOn:d,renderedFilesDimensions:m}),f={width:u,aspectRatio:_,height:c||d&&m?.length&&m.length>2?void 0:p,gridColumnEnd:h?`span ${h}`:void 0},b=this.isImageSmallerThanContainer({width:u,height:p}),g=i()("p-message_gallery_image_file c-file_gallery_image_file",e,{"c-file_gallery_image_file__smaller_than_container":b});return n.createElement("div",{className:g,style:f},this.renderContents({width:u,height:p,isImageSmallerThanContainer:b}))}renderSingleFile(){let{thumb360h:e,thumb360w:t,experimentMessageGalleryV2GroupOn:a,experimentMessageGalleryV3GroupOn:r,originalH:c,originalW:d,galleryWidth:m,renderedFilesDimensions:u}=this.props,p=0,h=0;r?(p=(0,l.A)(t,s.p0,s.R7),h=(0,l.A)(e,s.SO,s.wQ)):a?p=(0,s.cL)({originalWidth:d,originalHeight:c,containerWidth:m,renderedFilesDimensions:u}):(p=Math.max(t,s.p0),h=Math.max(e,s.SO));let _=this.isImageSmallerThanContainer({width:p,height:h}),f=i()("p-message_gallery_image_file","c-file_gallery_image_file",this.props.className,{"c-file_gallery_image_file__smaller_than_container":_});if(a&&!r){let e=(0,s.Sm)({originalWidth:d,originalHeight:c}),t=(0,s.cm)(e);return n.createElement("div",{className:f,style:{width:p,aspectRatio:t}},this.renderContents({width:p,height:h,isImageSmallerThanContainer:_}))}return n.createElement(o.A,{className:f,width:p,height:h},this.renderContents({width:p,height:h,isImageSmallerThanContainer:_}))}render(){return this.isGridFile()?this.renderGridFile():this.renderSingleFile()}};u.displayName="FileGallerySpan";let p=(0,m.N)((e,{viewContext:t})=>({experimentMessageGalleryV2GroupOn:(0,c.v)(e,t),experimentMessageGalleryV3GroupOn:(0,d._)(e,t)}))(u)},0xfaeada07:(e,t,a)=>{"use strict";a.d(t,{A:()=>e1});var n=a(0xbad225b5),r=a(0x120c268ad),i=a.n(r),l=a(0x1cbdfeceb),o=a(0x20482ad21),s=a(0x32d3ef3d),c=a(0x1c403364b),d=a(0x251a2acd0),m=a(0x1dd284e05),u=a(0x137d8e1fe),p=a(0x10a716a94),h=a(0x624dd21),_=a(0x1865df7e3),f=a(0x16cf1da63),b=a(0x1ee15af19),g=a(0xcc263d32),y=a(0x4504d718),A=a(0x3bc7bbd5),x=a(0xa6f3163b),E=a(0xb7ebc7b4);let C=new o.Ay("files"),SenderRecipientRow=({recipients:e,label:t,showWarning:a,warningMessage:r,channelId:l,onUserClick:o})=>{let[s,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),[u,p]=(0,n.useState)(0),h=(0,n.useRef)(null);(0,n.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let measure=()=>{let t=Array.from(e.children);if(0===t.length)return void m(!1);let a=[];for(let e of t){let t=e.offsetTop;a.some(e=>2>Math.abs(e-t))||a.push(t)}if(a.length>3){let e=a[2],n=0;for(let a of t)2>Math.abs(a.offsetTop-e)&&(n=Math.max(n,a.offsetTop+a.offsetHeight));p(n),m(!0)}else m(!1)};measure();let t=(0,A.A)(measure);return t.observe(e),()=>t.disconnect()},[e]);let _=(0,n.useCallback)(()=>{c(e=>!e)},[]),f=d&&!s;return n.createElement("div",{className:"c-pillow_file__email__meta__recipient"},n.createElement("div",{className:"c-pillow_file__email__meta__recipient__field"},t),n.createElement("div",{className:"c-pillow_file__email__meta__recipient__content"},n.createElement("div",{className:"c-pillow_file__email__meta__recipient__values"},n.createElement("div",{ref:h,className:"c-pillow_file__email__meta__recipient__values_inner",style:f&&u?{maxHeight:u,overflow:"hidden"}:void 0},e.map((t,a)=>n.createElement(x.A,{className:i()("c-pillow_file_email__meta__recipient__default",{"c-pillow_file__email__meta__recipient__value":!!t.slack_user_id}),key:t.address,onClick:()=>{t.slack_user_id&&o(t.slack_user_id.toString())}},n.createElement("span",null,n.createElement(E.K,{address:t.address,name:t.name,userId:t.slack_user_id?.toString(),channelId:l}),a<e.length-1&&" ")))),d&&n.createElement(x.A,{className:"c-pillow_file__email__meta__recipient__show_more",onClick:_},s?C.t("Show less"):C.t("Show more"))),a&&r&&n.createElement("div",{className:"c-pillow_file__email__meta__recipient__warning"},r)))};SenderRecipientRow.displayName="SenderRecipientRow";var k=a(0x1f3226107),v=a(0x1a02c72b5),S=a(0xd6a16321),I=a(0x15f4f83cf),w=a(0xbd3de346),T=a(0x226892387),N=a(0x1fb2d2a87),M=a(0x14149c126),R=a(0x14ea3ce99);let P=new o.Ay("files"),FileEmailV2=({file:e,channelId:t})=>{let a=(0,f.wA)(),r=(0,T.d4)(e=>"dark"===(0,N.to)(e)),i=(0,T.d4)(e=>"on"===(0,M._Z)(e,"new_email_rendering")),l=(0,n.useMemo)(()=>e.attachments?.map(e=>e.slack_file_id||"")||[],[e]),o=(0,T.Z2)(e=>(0,R.bO)(e,l));(0,n.useEffect)(()=>{let e=l.filter((e,t)=>{let a=o[t];return(0,I.mX)(a)});e.length>0&&a((0,k.Yc)({fileIds:e,reason:"email-v2/fetch-attachments"}))},[a,l,o]);let s=(0,n.useMemo)(()=>o.filter(e=>!(0,I.mX)(e)),[o]),c=(0,n.useCallback)(e=>{a((0,v.o)((0,S.Fo)({memberId:e})))},[a]);if((0,w.aK)(e)||"email"!==e.mode||!i)return null;let d=(0,b.A)(e.from)&&void 0!==(0,b.A)(e.from)?[(0,b.A)(e.from)]:void 0,m=P.t("Heads up \u2014 we couldn\u2019t verify this email\u2019s sender. Make sure you know them before you open any links or attachments.");return n.createElement("div",{className:"c-pillow_file__email__unfurl"},n.createElement("div",{className:"c-pillow_file__email__meta__recipient_container"},d&&void 0!==d&&n.createElement(SenderRecipientRow,{recipients:d,label:P.t("From"),showWarning:!(e.email_security?.has_valid_dmarc??!0),warningMessage:m,channelId:t,onUserClick:c}),e.to&&e.to.length>0&&n.createElement(SenderRecipientRow,{recipients:e.to,label:P.t("To"),channelId:t,onUserClick:c}),e.cc&&e.cc.length>0&&n.createElement(SenderRecipientRow,{recipients:e.cc,label:P.t("Cc"),channelId:t,onUserClick:c})),n.createElement(y.A,{file:e,isDarkTheme:r}),s.length>0&&n.createElement("div",{className:"c-pillow_file__email__attachments_container"},n.createElement(g.A,{files:s})))};FileEmailV2.displayName="FileEmailV2";var L=a(0x818593a1),O=a(0x14813ebd1),D=a(0x1ba0b4731),F=a(0x344bb842),U=a(0x4c96e5d9),B=a(0x9912e4ab),H=a.n(B);let W={google_meet:{name:"Google Calendar",iconUrl:"/img/today/icons/google_meet.svg",dayOfMeetingUrlTemplate:"https://calendar.google.com/calendar/r/day/{year}/{month}/{day}"}},V={name:"Calendar",iconUrl:"/img/today/icons/calendar.svg"},G={name:"new-window"};function getProviderConfig(e){return e&&W[e]||V}function formatTime(e){let t=new Date(1e3*e),a=t.getHours(),n=t.getMinutes().toString().padStart(2,"0");return`${a%12||12}:${n} ${a>=12?"PM":"AM"}`}function formatDate(e){let t=new Date(1e3*e),a=t.getMonth()+1,n=t.getDate(),r=t.getFullYear();return`${a}/${n}/${r}`}function formatScheduledText(e,t){let a=formatDate(e),n=formatTime(e),r=formatTime(t);return`Scheduled on ${a} from ${n} to ${r}`}function buildCalendarUrl(e,t){let a=new Date(1e3*t),n=a.getFullYear(),r=String(a.getMonth()+1).padStart(2,"0"),i=String(a.getDate()).padStart(2,"0");return e.replace("{year}",String(n)).replace("{month}",r).replace("{day}",i)}function MeetingCard({file:e}){let t=e.meeting_metadata,a=(0,T.d4)(e=>"on"===(0,M._Z)(e,"channel_meeting_invite"));if(!t||!a)return null;let{title:r,meeting_provider:i}=t,l=t.start_time,o=t.end_time,s=getProviderConfig(i);if(!l||!o)return null;let c=formatScheduledText(l,o),d=s.dayOfMeetingUrlTemplate,m=d?buildCalendarUrl(d,l):null;return n.createElement("div",{className:H().meetingCard},n.createElement("div",{className:H().icon},n.createElement("img",{src:s.iconUrl,alt:s.name,className:H().iconImage})),n.createElement("div",{className:H().content},n.createElement("div",{className:H().title},r||"Untitled Meeting"),n.createElement("div",{className:H().scheduled},c)),m&&n.createElement("div",{className:`c-message_actions__container c-message_actions__group ${H().actions}`},n.createElement(U.Ay,{tip:`Open ${s.name}`,delay:U.PK},n.createElement(F.A,{"aria-label":`Open ${s.name}`,href:m,target:"_blank",rel:"noopener noreferrer",svgIconProps:G,"data-qa":"meeting-card-calendar-action"}))))}MeetingCard.displayName="MeetingCard";var q=a(0x20b4dda68),j=a(0x236a5cd68),z=a(0xeb42f08f),K=a(0xf02ea055),$=a(0x12c8377bb);let Y=class extends n.PureComponent{static defaultProps={channelId:void 0,clogLinkClick:l.A,className:void 0,showActions:!0,largeImage:!1,viewContext:void 0,isFileDetails:!1};render(){let{file:e,channelId:t,showActions:a,largeImage:r,clogLinkClick:o,viewContext:s,isFileDetails:c}=this.props,d=i()(this.props.className,"p-message_image_file"),m=a&&n.createElement($.A,{file:e,channelId:t,clogLinkClick:o,className:i()("c-file__actions--image",{"c-file__actions--overflow__new-file-actions":!!e.thumb_360_w&&e.thumb_360_w<128,"c-file__actions--short":!!e.thumb_360_h&&e.thumb_360_h<50})}),u=r?480:q.C6,p=r&&e.thumb_480_w||e.thumb_360_w,h=r&&e.thumb_480_h||e.thumb_360_h;return p&&h?n.createElement(j.A,{className:d,width:p,height:h},n.createElement(K.A,{file:e,maxSize:u,clogLinkClick:o,viewContext:s,dimensionSetting:z.A.STRETCH,onImageDescriptionClose:l.A,isFileDetails:c}),m):null}};Y.displayName="MessageImageFile";var Q=a(0x1b481369f),Z=a(0x37451d7),J=a(0x1fb48eb63),X=a(0xd93ecf94);let PollMessageFile=({file:e,channelId:t,ts:a,viewContext:r})=>{let i=(0,T.d4)(Z.U),l=(0,n.useCallback)(e=>{e.stopPropagation()},[]),o=(0,T.d4)(e=>t&&a?(0,X.Ld)(e,t,a):null);return i?n.createElement("div",{onClick:l},n.createElement(J.A,{file:e,viewContext:r,channelId:t,threadTs:o?.thread_ts||a})):null};PollMessageFile.displayName="PollMessageFile";let ee=n.memo(PollMessageFile);var et=a(0x145935f2f),ea=a(0x15bffdd15),en=a(0x1abdfd657);function FilePreview(e){let{file:t}=e,a=(0,ea.A)(t?.thumb_800||t?.thumb_480||t?.thumb_pdf);if(!t.has_rich_preview&&!t.thumb_pdf||(0,w.aK)(t)||(0,w.c4)(t)||!a)return null;let r="image"===(0,en.t)(t),l=!1;if(r){let e;t.thumb_800_w&&t.thumb_800_h?e=t.thumb_800_w/t.thumb_800_h:t.thumb_480_w&&t.thumb_480_h&&(e=t.thumb_480_w/t.thumb_480_h),e&&e>1.45&&e<2.55&&(l=!0)}let o=i()("c-pillow_file__preview",{"c-pillow_file__preview--document":!0,"c-pillow_file__preview--image":r,"c-pillow_file__preview--cover":l});return n.createElement("div",{className:o,style:{backgroundImage:`url('${a}')`},"data-qa":e["data-qa"]})}FilePreview.displayName="FilePreview";let er=n.memo(FilePreview);var ei=a(0x1b2e599bc),el=a(0x1ced75d54),eo=a(0x8c0b43fc),es=a(0x15f8e452a),ec=a(0x106632d1d),ed=a(0x184bdf20),em=a(0x1c91944c9),eu=a(0x1090ec8f9);let ep=new o.Ay("files"),eh=class extends n.PureComponent{static defaultProps={clogFileClick:l.A,setMediaPlaybackInProgress:l.A};constructor(e){super(e),this.onLoadedData=this.onLoadedData.bind(this),this.onPlay=this.onPlay.bind(this),this.onPlaceholderClick=this.onPlaceholderClick.bind(this),this.state={height:null,playing:!1}}componentWillUnmount(){this.state.playing&&this.props.setMediaPlaybackInProgress(!1)}onLoadedData(){if(!this.props.forwardedRef)return;let e="function"==typeof this.props.forwardedRef?null:this.props.forwardedRef.current;if(!e||!e.videoWidth&&!e.videoHeight)return;let t=Math.min(320,e.clientWidth/(e.videoWidth/e.videoHeight));this.setState(()=>({height:t}))}onPlaceholderClick(){this.setState(()=>({playing:!0}))}onPlay(){let{file:e}=this.props;this.props.clogFileClick({file:e,payload:{subtype:"video_play"}}),this.props.setMediaPlaybackInProgress(!0)}renderVideo(){let{file:e}=this.props,t=e.url_private;if(!t)return null;let a=e.thumb_video_ts??e.thumb_video;if(!this.state.playing){let t=a?{backgroundImage:`url("${CSS.escape(a??"")}")`}:void 0,r=i()("c-pillow_file__video","c-pillow_file__video--placeholder",{"c-pillow_file__video--placeholder-poster":a}),l=(0,ed.A)(e);return n.createElement("div",{className:r,style:t,onClick:l?this.onPlaceholderClick:void 0},n.createElement(x.A,{onClick:this.onPlaceholderClick,className:"c-pillow_file__video__placeholder_button","aria-label":ep.t("Play video")},n.createElement(es.A,{type:"play-filled",size:"inherit",className:"c-pillow_file__video__placeholder_icon"})))}return n.createElement("video",{className:"c-pillow_file__video",controls:!0,autoPlay:!0,poster:a,src:t,onPlay:this.onPlay,ref:this.props.forwardedRef,style:{height:this.state.height??void 0},onLoadedData:this.onLoadedData,preload:"none",disablePictureInPicture:!0,controlsList:"nodownload"})}render(){let{file:e}=this.props;return!(0,w.aK)(e)&&(0,w.CL)(e)&&(0,w.ez)(e)?n.createElement("div",{className:"c-pillow_file__video_container",tabIndex:-1,"data-media-focus-container":!0},this.renderVideo()):null}};eh.displayName="FileVideo";let e_=(0,em.N)(null,{clogFileClick:e=>(0,eu.q)(e)})((0,ec.ay)(eh)),ef=n.forwardRef(({file:e,setMediaPlaybackInProgress:t},a)=>n.createElement(e_,{file:e,setMediaPlaybackInProgress:t,forwardedRef:a}));var eb=a(0x180035d06),eg=a(0x11a296110),ey=a(0xb1ea448c),eA=a(0x210cf696f),ex=a(0x2501a2cee),eE=a(0x20b79f290),eC=a(0x1f93c84b8),ek=a(0x10bae7b36),ev=a(0x15a8943a8),eS=a(0x1fcbb004d);let eI=new o.Ay("stories_av"),RemoveMediaTranscriptPreviewConfirmationModal=({file:e})=>{let t=(0,f.wA)(),a=(0,T.d4)(ev.ac),r=(0,n.useCallback)(()=>{t((0,eS.O)())},[t]),i=(0,n.useCallback)(()=>{t((0,k.$y)({fileId:e?.id,removeTranscriptPreview:!0,reason:"media-transcript-preview-remove"})),r()},[t,e,r]);return a?n.createElement(ek.A,{title:eI.t("Remove transcript preview?"),submitButtonText:eI.t("Remove"),cancelButtonText:eI.t("Cancel"),submitButtonType:"danger",onSubmit:i,onClose:r,onCancel:r},n.createElement("p",null,eI.t("This will remove the preview of your clip\u2019s transcript when shared in a conversation. This cannot be undone."))):null};RemoveMediaTranscriptPreviewConfirmationModal.displayName="RemoveMediaTranscriptPreviewConfirmationModal";var ew=a(0x12287b3f1),eT=a(0x238b287cf),eN=a(0xe1300f34),eM=a(0x3711e82d),eR=a(0x1ec68d6a3),eP=a(0x9b971e7e),eL=a(0xf9cb31c6),eO=a(0x46dbff89);let eD=new o.Ay("stories_av"),MediaTranscriptPreview=({file:e,setCurrentTime:t})=>{let a=(0,f.wA)(),r=(0,eT.A)(),{isTranscribing:l,startTranscription:o,stopTranscription:s}=(0,eE.Z)(e.id,e.transcription?.status),[c,d]=(0,n.useState)(!1),m=(0,T.d4)(t=>(0,eN.BM)(t,e)),u=(0,T.d4)(ev.ac),p=(0,T.d4)(eL.xK),h=(0,T.d4)(ev.Xz),_=(0,T.d4)(eN.y0),b=(0,T.d4)(eP.ZT),g=e?.transcription?.preview?.content,y=(0,n.useMemo)(()=>({file_id:e.id,subtype:e.subtype,media_type:(0,w.pI)(e)?"audio":"video"}),[e]),A=(0,n.useCallback)(()=>{r.track(eM.EventId.MEDIA_PLAYER,{...y,contexts:{ui_context:{ui_step:"embedded",action:"click",ui_properties:{element_type:"button",element_name:"transcript_preview"}}}})},[y,r]),x=(0,n.useCallback)(()=>{r.track(eM.EventId.MEDIA_PLAYER,{...y,contexts:{ui_context:{ui_step:"embedded",action:"click",ui_properties:{element_type:"button",element_name:"transcript_preview_delete"}}}})},[y,r]),E=(0,n.useCallback)((t,n,r)=>{if(!b)return;o();let i=(0,eR.Ay)({teamId:b,label:r});i.info(`Starting transcription with ${n}`,{fileId:e.id,locale:t}),a((0,ew.$)({fileId:e.id,locale:t,reason:n})).then(()=>{i.info("Transcription started successfully",{fileId:e.id,locale:t})}).catch(a=>{s(),i.error(r,"Failed to start transcription",{fileId:e.id,locale:t,error:a.message})})},[a,e.id,b,o,s]),C=(0,n.useCallback)((t="transcript_generate")=>{r.track(eM.EventId.MEDIA_PLAYER,{file_id:e.id,subtype:e.subtype,media_type:(0,w._y)(e)?"video":"audio",contexts:{ui_context:{ui_step:"embedded",action:"click",ui_properties:{element_type:"button",element_name:t}}}}),E(void 0,"generate-transcript","GENERATE_TRANSCRIPT")},[E,r,e]),k=(0,n.useCallback)(()=>{C("transcript_generate")},[C]),v=(0,n.useCallback)(()=>{C("transcript_generate_retry")},[C]),S=(0,n.useCallback)(()=>{d(!0)},[]),I=(0,n.useCallback)(()=>{a((0,eO.q)({element:n.createElement(RemoveMediaTranscriptPreviewConfirmationModal,{file:e}),name:"remove-transcript-preview-confirmation"})),x()},[a,e,x]),N=n.createElement("div",{className:"c-message_attachment__delete_container align_items_center"},n.createElement(eg.Nm,{className:"c-message_attachment__delete",onClick:S,"aria-label":eD.t("Dismiss transcript generation prompt")},n.createElement(ex.Ah,{name:"close"}))),M=m?n.createElement("div",{className:"c-message_attachment__delete_container"},n.createElement(eg.Nm,{className:"c-message_attachment__delete",onClick:I,"aria-label":eD.t("Remove transcript")},n.createElement(ex.Ah,{name:"close"}))):null,R=(0,n.useCallback)((e,t)=>n.createElement("div",{className:"c-message_kit__attachments"},n.createElement("div",{className:"c-message_attachment c-message_attachment__transcript"},t,e)),[]);return u&&_&&e.is_transcription_region_supported?p&&!h&&(e.transcription?.status==="processing"||l)?R(n.createElement("blockquote",{className:"p-media_transcript__blockquote"},n.createElement("span",{className:i()("align_items_center","inline_flex")},n.createElement(ey.A,{size:"small",className:i()("margin_right_25")}),eD.t("Processing transcript\u2026")))):!p||h||c||e.transcription?.status!=="failed"?!p||h||c||e.transcription?.status&&"none"!==e.transcription.status?g?R(n.createElement(eC.A,{file:e,setCurrentTime:t,onViewTranscriptClicked:A,renderAsBlockQuote:!0,className:"p-media_transcript__blockquote"}),M):null:R(n.createElement("blockquote",{className:"p-media_transcript__blockquote"},n.createElement(eA.A,{onClick:k},eD.t("Generate transcript"))),N):R(n.createElement("blockquote",{className:"p-media_transcript__blockquote"},eD.t("Failed to generate transcript.")," ",n.createElement(eA.A,{onClick:v},eD.t("Try again"))),N):null};MediaTranscriptPreview.displayName="MediaTranscriptPreview";var eF=a(0x252dd886b),eU=a(0x148efa02a),eB=a(0x1089b4144),eH=a(0x124f71042),eW=a(0x4a4f65b2),eV=a(0xaec471e9),eG=a(0x108b445e9),eq=a(0xdd7fdd59),ej=a(0x683d5e9c),ez=a(0xd89ed9da),eK=a(0x1ccef1c6f),e$=a(0x1a80146c8),eY=a(0x1d774a049),eQ=a(0x130875b3c),eZ=a(0x1911b238);let eJ=new o.Ay("files"),eX=(0,L.lk)(el.A),e0=class extends n.PureComponent{static contextType=eb.A;static defaultProps={threadTs:void 0,clogLinkClick:l.A,className:null,showActions:!0,forceExpanded:!1,largeImage:!1,showPreview:!0,viewContext:void 0,isFileDetails:!1,onFileClick:l.A,isHuddleAttachment:!1,onRemoveHuddleAttachment:l.A,onBookmarkToChannel:l.A,isBookmark:!1,isCallAttachment:!1,onRemoveCallAttachment:l.A,dragRef:l.A,fileAction:void 0,isExpandable:!1,isExpanded:!1,isCustomFileStoreWorkspace:!1,mediaId:void 0,experimentClipsTranscriptPreviewGroupOn:!1,galleryMode:void 0,galleryWidth:void 0,renderedFilesDimensions:void 0,experimentCanvasBadgingHighlightingGroupOn:!1,listFileSnapshotAttachment:void 0,experimentPollsGroupOn:!1,dlpProcessingIds:new Set,handleFileContainerClick:l.A,isAiFileSummariesEnabled:!1,experimentDlpAsyncFileProcessingGroupOn:!1,isInDlpProcessing:!1};videoRef;constructor(e){super(e),this.state={audioDuration:void 0},this.onClick=this.onClick.bind(this),this.onDurationLoad=this.onDurationLoad.bind(this),this.pauseVideoAndGetCurrentTime=this.pauseVideoAndGetCurrentTime.bind(this),this.playVideoAndSeekToTime=this.playVideoAndSeekToTime.bind(this),this.videoRef=(0,n.createRef)(),this.onEmailHeaderClick=this.onEmailHeaderClick.bind(this)}onClick(e){let{file:t,clogLinkClick:a,ts:n,channelId:r,threadTs:i,viewContext:l,showPreview:o,isExpandable:s,isExpanded:c,isFileDetails:d,onFileClick:m,mediaId:u}=this.props,{mediaViewerEnabled:p,displayInMediaViewer:h}=this.context;p&&u&&"view"===this.getAction()?h(u):this.props.handleFileContainerClick({e,fileId:t.id,clogLinkClick:a,ts:n,channelId:r,threadTs:i,viewContext:l,showPreview:o,isExpandable:s,isFileDetails:d,isExpanded:c,source:eY.f.FILE_ATTACHED_TO_MESSAGE}),m&&m(e)}onDurationLoad(e){this.setState(()=>({audioDuration:e}))}getAction(){let{file:e,fileAction:t}=this.props;return(0,w.Z0)(e)?null:t}pauseVideoAndGetCurrentTime(){return this.videoRef&&this.videoRef.current?(this.videoRef.current.paused||this.videoRef.current.pause(),this.videoRef.current.currentTime):0}playVideoAndSeekToTime(e){let{file:t,viewContext:a}=this.props,n=(0,eN.p4)(t);if(!n)return;let r=eF.A.getBySrc(n,{viewContext:a});r&&(r.seek(e),r.play())}onEmailHeaderClick(){let{file:e}=this.props;this.props.handleEmailHeaderClick(e.id)}renderHeader(){let{file:e,isExpandable:t,showPreview:a,experimentCanvasBadgingHighlightingGroupOn:r,experimentNewEmailRenderingGroupOn:i,humanTs:l}=this.props;if("snippet"===(0,en.t)(e)&&a&&!(0,w.Bp)(e)&&!(0,w.Ki)(e)&&!(0,w.AL)(e)&&!(0,w.Sp)(e))return null;if("email"===(0,en.t)(e)&&a&&!(0,w.Bp)(e)&&!(0,w.Ki)(e)&&!(0,w.AL)(e))return i?n.createElement("div",{role:"button",tabIndex:0,onClick:this.onEmailHeaderClick,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.onEmailHeaderClick())},style:{cursor:"pointer"}},n.createElement(c.A,{id:e.id,className:"p-message_file__header",file:e,"data-qa":"message_file_header",noBadge:!0,detailTextOverride:l})):null;if((0,w.pI)(e)&&!(0,w.Bp)(e)&&!(0,w.Ki)(e)&&!(0,w.AL)(e))return null;let o=r&&e.show_badge,s=n.createElement(c.A,{id:e.id,className:"p-message_file__header",file:e,forceIconThumbnail:a,"data-qa":"message_file_header",noBadge:!0,hasNotification:o});return t&&(s=n.createElement(D.A,{file:e,className:"p-message_file__header_link",onClick:this.onClick},s)),s}renderPreview(){let{showPreview:e,showActions:t,file:a,ts:r,channelId:i,clogLinkClick:o,experimentNewEmailRenderingGroupOn:s}=this.props,c={style:(0,eG.A)(a)||(0,w.fD)(a)?"default":"card",mini:!1};return!e&&(0,w.pI)(a)?(c.mini=!(0,eG.A)(a),n.createElement(h.A,{file:a,ts:r,channelId:i,audioPlayerStyle:c,onDurationLoad:this.onDurationLoad})):!e||(0,w.Bp)(a)||(0,w.Ki)(a)||(0,w.AL)(a)||(0,w.Sp)(a)?null:n.createElement(p.A,null,n.createElement(er,{file:a,"data-qa":"message_file_preview"}),(0,w.pI)(a)&&n.createElement(h.A,{file:a,ts:r,channelId:i,audioPlayerStyle:c,showActions:t,onDurationLoad:this.onDurationLoad}),(0,w.ez)(a)&&n.createElement(ef,{ref:this.videoRef,file:a}),(0,w.Z0)(a)&&(0,et.D)({file:a,clogLinkClick:o||l.A}),(0,w.U9)(a)&&n.createElement(ei.Ay,{fileId:a.id,containerClassName:"p-file_quip--unfurl",hideTitle:!0}),"snippet"===(0,en.t)(a)&&n.createElement(eX,{file:a,clogLinkClick:o}),"email"===(0,en.t)(a)&&(s?n.createElement(FileEmailV2,{file:a,channelId:i}):n.createElement(_.A,{file:a,channelId:i,ts:r,clogLinkClick:o})))}render(){let{file:e,ts:t,channelId:a,threadTs:r,showActions:l,forceExpanded:o,largeImage:c,clogLinkClick:m,showPreview:h,viewContext:_,isExpanded:f,isExpandable:b,isHuddleAttachment:g,isBookmark:y,onRemoveHuddleAttachment:A,onBookmarkToChannel:x,isCallAttachment:E,onRemoveCallAttachment:C,experimentClipsTranscriptPreviewGroupOn:k,experimentPollsGroupOn:v,galleryMode:S,galleryWidth:I,renderedFilesDimensions:T,listFileSnapshotAttachment:N,isFileDetails:M,dragRef:R,experimentDlpAsyncFileProcessingGroupOn:P,isInDlpProcessing:D,experimentMessageGalleryV2GroupOn:F,experimentChannelMeetingInviteGroupOn:U,experimentMessageGalleryV3GroupOn:B}=this.props,H=(0,en.t)(e),W=i()(this.props.className,{"p-message_file":!(0,w.kn)(e),"p-message_file--media":(0,w.CL)(e)&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--audio_message":(0,eG.A)(e)&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--post":"post"===H&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--quip":(0,w.U9)(e)&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--email":"email"===H&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--expanded-email":"email"===H&&f&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--snippet":"snippet"===H&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--image":"image"===H&&!(0,w.Bp)(e)&&!(0,w.Ki)(e),"p-message_file--show_preview":h&&!(0,w.Vx)(e),"p-message_file--remote_image":"image"===H&&(0,w.Vx)(e)});if(!(0,w.Vx)(e)&&"image"===(0,en.t)(e)&&h)return n.createElement(Y,{file:e,className:W,clogLinkClick:m,showActions:l,largeImage:c,viewContext:_,isFileDetails:M});let V=S===eo.FS.SINGLE_FILE,G=null;if(k&&!((F||B)&&(0,w._y)(e))&&((0,w.pI)(e)||(0,w._y)(e))&&V&&(G=n.createElement(MediaTranscriptPreview,{file:e,setCurrentTime:this.playVideoAndSeekToTime})),(0,w._y)(e)&&h&&!(0,w.Bp)(e)&&!(0,w.Ki)(e))return n.createElement(n.Fragment,null,n.createElement(eB.A,{file:e,channelId:a,ts:t,galleryWidth:I,renderedFilesDimensions:T,viewContext:_,showActions:l,maxWidth:B?eo.R7:void 0,maxHeight:B?eo.wQ:void 0}),G);if((0,w.Y8)(e)&&v&&h&&!(0,w.Bp)(e)&&!(0,w.Ki)(e))return n.createElement(ee,{file:e,channelId:a,ts:t,viewContext:_||""});if((0,w.l7)(e)&&(0,w.ZG)(e)){le