@apolitical/component-library 5.4.3 → 5.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,5 +7,7 @@ export interface IActivity extends FlatActivityEnriched {
7
7
  title: string;
8
8
  total_replies?: number;
9
9
  total_likes?: number;
10
- additional_data?: IEnrichedUrlData;
10
+ additional_data?: {
11
+ link?: IEnrichedUrlData | false | undefined;
12
+ };
11
13
  }
@@ -1,6 +1,8 @@
1
1
  declare const _default: (hasTooltip?: boolean) => {
2
2
  showTooltip: boolean;
3
3
  tooltipProps: {
4
+ onClick?: undefined;
5
+ onKeyDown?: undefined;
4
6
  onMouseOver?: undefined;
5
7
  onMouseOut?: undefined;
6
8
  onFocus?: undefined;
@@ -10,6 +12,8 @@ declare const _default: (hasTooltip?: boolean) => {
10
12
  } | {
11
13
  showTooltip: boolean;
12
14
  tooltipProps: {
15
+ onClick: () => void;
16
+ onKeyDown: (e: React.KeyboardEvent) => void;
13
17
  onMouseOver: () => void;
14
18
  onMouseOut: () => void;
15
19
  onFocus: () => void;
package/index.js CHANGED
@@ -28,13 +28,13 @@ Check the render method of \``+R+"`."}return""}}function Wh(R){{if(R!==void 0){v
28
28
 
29
29
  Check your code at `+oe+":"+ce+"."}return""}}var Qo={};function Hh(R){{var oe=Go();if(!oe){var ce=typeof R=="string"?R:R.displayName||R.name;ce&&(oe=`
30
30
 
31
- Check the top-level render call using <`+ce+">.")}return oe}}function Jo(R,oe){{if(!R._store||R._store.validated||R.key!=null)return;R._store.validated=!0;var ce=Hh(oe);if(Qo[ce])return;Qo[ce]=!0;var De="";R&&R._owner&&R._owner!==sn.current&&(De=" It was passed a child from "+_(R._owner.type)+"."),Ln(R),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ce,De),Ln(null)}}function Xo(R,oe){{if(typeof R!="object")return;if(Be(R))for(var ce=0;ce<R.length;ce++){var De=R[ce];vi(De)&&Jo(De,oe)}else if(vi(R))R._store&&(R._store.validated=!0);else if(R){var Oe=v(R);if(typeof Oe=="function"&&Oe!==R.entries)for(var qe=Oe.call(R),je;!(je=qe.next()).done;)vi(je.value)&&Jo(je.value,oe)}}}function Vh(R){{var oe=R.type;if(oe==null||typeof oe=="string")return;var ce;if(typeof oe=="function")ce=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===l||oe.$$typeof===h))ce=oe.propTypes;else return;if(ce){var De=_(oe);Ue(ce,R.props,"prop",De,R)}else if(oe.PropTypes!==void 0&&!gi){gi=!0;var Oe=_(oe);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kh(R){{for(var oe=Object.keys(R.props),ce=0;ce<oe.length;ce++){var De=oe[ce];if(De!=="children"&&De!=="key"){Ln(R),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),Ln(null);break}}R.ref!==null&&(Ln(R),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ln(null))}}function eu(R,oe,ce,De,Oe,qe){{var je=q(R);if(!je){var Se="";(R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(Se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ft=Wh(Oe);ft?Se+=ft:Se+=Go();var Je;R===null?Je="null":Be(R)?Je="array":R!==void 0&&R.$$typeof===t?(Je="<"+(_(R.type)||"Unknown")+" />",Se=" Did you accidentally export a JSX literal instead of a component?"):Je=typeof R,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Je,Se)}var tt=$n(R,oe,ce,Oe,qe);if(tt==null)return tt;if(je){var _t=oe.children;if(_t!==void 0)if(De)if(Be(_t)){for(var zn=0;zn<_t.length;zn++)Xo(_t[zn],R);Object.freeze&&Object.freeze(_t)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Xo(_t,R)}return R===r?Kh(tt):Vh(tt),tt}}function Zh(R,oe,ce){return eu(R,oe,ce,!0)}function Yh(R,oe,ce){return eu(R,oe,ce,!1)}var Gh=Yh,Qh=Zh;pr.Fragment=r,pr.jsx=Gh,pr.jsxs=Qh}()),pr}process.env.NODE_ENV==="production"?gs.exports=im():gs.exports=sm();var c=gs.exports;const Lc=()=>{const[e,t]=y.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return y.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},rr=(e,t)=>{const n=y.useRef(!1);y.useEffect(()=>{n.current?e():n.current=!0},t)};function zc(e,t,n){var r=this,a=y.useRef(null),i=y.useRef(0),s=y.useRef(null),o=y.useRef([]),l=y.useRef(),u=y.useRef(),d=y.useRef(e),h=y.useRef(!0);d.current=e;var m=typeof window<"u",p=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,f=!("trailing"in n)||!!n.trailing,v="maxWait"in n,b="debounceOnServer"in n&&!!n.debounceOnServer,E=v?Math.max(+n.maxWait||0,t):null;y.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var k=y.useMemo(function(){var T=function(q){var $=o.current,F=l.current;return o.current=l.current=null,i.current=q,u.current=d.current.apply(F,$)},D=function(q,$){p&&cancelAnimationFrame(s.current),s.current=p?requestAnimationFrame(q):setTimeout(q,$)},w=function(q){if(!h.current)return!1;var $=q-a.current;return!a.current||$>=t||$<0||v&&q-i.current>=E},S=function(q){return s.current=null,f&&o.current?T(q):(o.current=l.current=null,u.current)},z=function q(){var $=Date.now();if(w($))return S($);if(h.current){var F=t-($-a.current),_=v?Math.min(F,E-($-i.current)):F;D(q,_)}},N=function(){if(m||b){var q=Date.now(),$=w(q);if(o.current=[].slice.call(arguments),l.current=r,a.current=q,$){if(!s.current&&h.current)return i.current=a.current,D(z,t),g?T(a.current):u.current;if(v)return D(z,t),T(a.current)}return s.current||D(z,t),u.current}};return N.cancel=function(){s.current&&(p?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,o.current=a.current=l.current=s.current=null},N.isPending=function(){return!!s.current},N.flush=function(){return s.current?S(Date.now()):u.current},N},[g,v,t,E,f,p,m,b]);return k}function qc(e,t,n){var r=n===void 0?{}:n,a=r.leading,i=r.trailing;return zc(e,t,{maxWait:t,leading:a===void 0||a,trailing:i===void 0||i})}let bi;const Mn=(e=!0,t=!1,n="window")=>{if(!e)return;const[r,a]=y.useState(0)||[!1,()=>{}],i=n==="window"?[]:[n];y.useEffect(()=>(o(),window.addEventListener("resize",u),window.addEventListener("hashchange",u),window.addEventListener("hiddenSectionVisible",l),()=>{clearTimeout(bi),u.flush(),window.removeEventListener("resize",u),window.removeEventListener("hashchange",u),window.removeEventListener("hiddenSectionVisible",l)}),i);const s=()=>{if(n)return n==="window"?window.innerWidth:n.offsetWidth},o=()=>{a(s())},l=({detail:d})=>{const{id:h}=d;n==="window"||!n.closest(`#${h}`)||s()===r||o()},u=qc(()=>{s()!==r&&(t&&(clearTimeout(bi),document.body.classList.add("is-resizing"),bi=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},Uc=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[a,i]=y.useState({current:0,past:0})||[!1,()=>{}],[s,o]=y.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];y.useEffect(()=>(l(),window.addEventListener("scroll",u),()=>{u.flush(),window.removeEventListener("scroll",u)}),[]);const l=()=>{const d=window.scrollY,h=a.current,m=d-h,p=m>0?"down":"up";if(i({current:d,past:h}),p==="down"){d>=e+t.down&&!s.scrollDown&&(!s.scrollUp||m>t.up)&&(n(),o({scrollUp:!1,scrollDown:!0}));return}Math.abs(m)>=t.up&&!s.scrollUp&&(r(),o({scrollUp:!0,scrollDown:!1}))},u=qc(()=>{l()},250);return a},Qs=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=y.useRef(!1);rr(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const r=document.getElementById(window.location.hash.replace("#",""));r&&(r.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)},Js=(e=!1)=>{if(!e)return{showTooltip:!1,tooltipProps:{}};const[t,n]=y.useState(!1);return{showTooltip:t,tooltipProps:{onMouseOver:()=>n(!0),onMouseOut:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),tabIndex:0}}};const au={},Nn=y.forwardRef(({id:e,styling:t={},isOpen:n=!1,isLoading:r=!1,children:a,className:i="",functions:s={},callbacks:o={},accessibility:l={},...u},d)=>{const h=se.useIntl(),[m]=y.useState(e||Date.now().toString()),p=y.useRef(null),g=d||p,[f,v]=y.useState(n?"open":"hidden"),{extraPadding:b=!0,hasPointer:E=!1,hasForm:k=!1}=t,{onOpen:T=()=>{},onClose:D=()=>{}}=o,{readToScreenreadersWhenClosed:w=!1,...S}=l,z=au[m];y.useEffect(()=>{const F=g==null?void 0:g.current;if(F)return F.addEventListener("transitionend",N),()=>{F.removeEventListener("transitionend",N)}},[]),y.useEffect(()=>{if(f!=="open")return;const F=_=>{_.key==="Escape"&&(_.stopPropagation(),_.preventDefault(),v("closed"))};return document.addEventListener("keyup",F),()=>{document.removeEventListener("keyup",F)}},[f]);const N=({propertyName:F})=>{F==="opacity"&&(z!==!1&&clearTimeout(z),v(_=>(_==="open"?T():_==="closed"&&D(),_==="opening"?"open":_==="closing"?"closed":_==="closed"?"hidden":_)))};rr(()=>{z!==!1&&clearTimeout(z);let F="open";n?v("opening"):(v("closing"),F="hidden"),au[m||""]=setTimeout(()=>{v(F)},300)},[n]);const q={...u,...S};s&&s.onBlur&&(q.onBlur=s.onBlur);const $={className:"content"};return w?$.className=Z("content",{hidden:f==="hidden"}):$.hidden=f==="hidden",c.jsx("aside",{ref:g,className:Z("tooltip text-medium",f,i,{loading:r,"extra-padding":b,"has-pointer":E,bottom:E==="bottom","has-form":k}),...q,children:c.jsx("div",{...$,children:r?c.jsx("p",{children:h.formatMessage({id:"tooltip_loading"})}):typeof a=="string"?c.jsx("p",{children:a}):a})})}),Vr=(e,t)=>{Array.isArray(t)||(t=[t]);const n=_n(e);return t.forEach(({type:r,value:a})=>{Jh(n,r,a)}),n},Wc=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},Hc=(e,t,n)=>{let r=n.mobile;for(const a in t){const i=parseInt(String(t[a]));if(e>=i)r=n[i];else if(e<i)break}return r},Vc=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Kc=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()).replace(/[&\s]+/g,""),Zc=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),om=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()),Ht="https://storage.googleapis.com/apolitical-assets/",Kn={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},wr={ARTICLE:"microcourseArticle",DISCUSSION:"microcourseDiscussion",QUIZ:"assessmentQuiz"},vs="SU:",Pr="DELETED",Yc="Invalid token error: Logging user out...",um="200,000+",lm="160+",Mr=/@{{([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})}}/g,Gc=new RegExp("(?<=^|\\s)@([A-Za-z]+(?:[- ]?[A-Za-z]*)*)$");function cm(e){return e?{"--icon":`url(${Ht}icons/${e}.svg)`}:{}}const wn={milliseconds:{inSecond:1e3,inMinute:6e4,inHour:36e5,inDay:864e5},year:{weeks:52,days:365}},Qc=(e,t="en")=>new Date(e).toLocaleString(t,{day:"numeric",month:"short"}),Xs=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),bs=e=>{let t;const n=ja(),r=ja(new Date(e));try{t=n.getTime()-r.getTime()}catch{return""}const a=t/wn.milliseconds.inHour,i=Math.floor(t/wn.milliseconds.inDay);if(i<1)return a<1?{path:"now"}:{path:"hours",number:Math.floor(a)};if(i<7)return{path:"days",number:i};const s=Math.floor(i/7);return s<=wn.year.weeks?{path:"weeks",number:s}:{path:"years",number:Math.floor(i/wn.year.days)}},ja=e=>{const n=(e||new Date).toUTCString();return new Date(n)},dm=(e,t,n)=>{let r;const a=ja(),i=ja(new Date(e));try{r=a.getTime()-i.getTime()}catch{return!1}switch(n){case"seconds":return r/wn.milliseconds.inSecond<=t;case"minutes":return r/wn.milliseconds.inMinute<=t;case"hours":return r/wn.milliseconds.inHour<=t}return!1},fm=(e,t)=>{const n=new Date(e);return Math.abs(new Date().getTime()-n.getTime())/(1e3*60*60*24)<t},hm=e=>new Promise(t=>setTimeout(t,e)),mm=()=>{let e=!1;return typeof window<"u"&&(e=!!(window&&window.location&&window.location.href&&window.location.href.includes("localhost"))),e},lr={apolitical:"Apolitical",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",card_carousel_viewAll:"View all",card_label_communityPage:"Community",card_label_event:"Event",card_label_learningHub:"Programme",card_label_listPage:"List",card_label_microcourse:"Course",card_label_qaQuestion:"Q&A",card_label_solutionArticle:"Article",card_bootcamp:"Email boot camp",card_ended:"Ended",card_new:"New",card_registered:"Registered",card_partner:"{partner} and {number} more",card_contributors_event:"Multiple speakers",card_contributors_solutionArticle:"Multiple authors",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_member_type_owner:"Admin",card_member_type_member:"Member",card_member_count:"{count} members",card_cta_people:"View profile",card_cta_communityPage:"Join now",card_cta_event:"Register now",card_cta_microcourse:"Enrol now",card_cta_communityPage_loading:"Joining...",card_cta_event_loading:"Registering...",card_cta_microcourse_loading:"Enrolling...",card_cta_communityPage_done:"Joined",card_cta_event_done:"Registered",card_cta_microcourse_done:"Enrolled",carousel_pagination_previous:"previous",carousel_pagination_previousSlide:"Previous slide",carousel_pagination_next:"next",carousel_pagination_nextSlide:"Next slide",carousel_pagination_slide:"Slide {number} of {total}",carousel_pagination_ariaLive:"On {direction} slide: {count, plural, one {1 card} other {# cards}} available",carousel_pagination_ariaLive_slide:"On slide {slide}: {count, plural, one {1 card} other {# cards}} available",activitySection_notFoundError:"Post not found",activitiesFeed_sorting_label:"Choose feed sorting method",activitiesFeed_rankingMethod_recent:"Recent",activitiesFeed_rankingMethod_popular:"Popular",activitiesFeed_rankingMethod_internalTesting:"Testing",activitiesFeed_noActivities_inCategories:"There are no posts of this type yet.",activitiesFeed_noActivities:"Activities will appear here.",activitiesFeed_noActivities_button:"Explore Communities",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",community_sortSuccess:"Feed ordered by {order}",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",joinCommunityButton_closed_tooltip:"Please contact the admin of this closed community if you would like to join it.",joinCommunityButton_aria_live:"You are {action} this community",member_apolitical:"Apolitical",member_community:"Community post",member_deleted:"Deleted user",member_profile:"Update profile",membersList:"Members",membersList_admin:"Admin",membersList_profile:"Update profile",membersList_modal_title:"Update profile",courseStructure_section:"{number, plural, =0 {Start here} other {Section #}}",courseStructure_section_end:"End here",courseStructure_time_left:"left",courseStructure_time_completed:"Completed",courseProgression_done:"<percent>{number}%</percent> done",courseProgression_timeLeft:"left","lessonType_analyse-data":"Analyse data","lessonType_analyse-scenarios":"Analyse scenarios","lessonType_attend-webinar":"Attend webinar","lessonType_brainstorm-ideas":"Brainstorm ideas","lessonType_discuss-with-peers":"Discuss with peers","lessonType_discuss-with-team":"Discuss with team","lessonType_do-activity":"Do activity","lessonType_do-assessment":"Do assessment","lessonType_explore-casebook":"Explore casebook","lessonType_fill-out-workbook":"Fill out workbook","lessonType_fill-out-worksheet":"Fill out worksheet","lessonType_investigate-interview":"Investigate interview","lessonType_listen-to-audio":"Listen to audio","lessonType_listen-to-audiocast":"Listen to audiocast","lessonType_listen-to-podcast":"Listen to podcast","lessonType_read-article":"Read article","lessonType_read-article-by-expert":"Read article by expert","lessonType_read-article-by-public-servant":"Read article by public servant","lessonType_read-conclusion":"Read conclusion","lessonType_read-infographic":"Read infographic","lessonType_read-introduction":"Read introduction","lessonType_read-resource":"Read resource","lessonType_reflect-on-content":"Reflect on content","lessonType_share-experiences":"Share experiences","lessonType_take-quiz":"Take quiz","lessonType_use-toolkit":"Use toolkit","lessonType_watch-video":"Watch video","lessonType_watch-webinar":"Watch webinar",markCompleteButton:"Mark as complete",markCompleteButton_completed:"Lesson complete",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
31
+ Check the top-level render call using <`+ce+">.")}return oe}}function Jo(R,oe){{if(!R._store||R._store.validated||R.key!=null)return;R._store.validated=!0;var ce=Hh(oe);if(Qo[ce])return;Qo[ce]=!0;var De="";R&&R._owner&&R._owner!==sn.current&&(De=" It was passed a child from "+_(R._owner.type)+"."),Ln(R),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ce,De),Ln(null)}}function Xo(R,oe){{if(typeof R!="object")return;if(Be(R))for(var ce=0;ce<R.length;ce++){var De=R[ce];vi(De)&&Jo(De,oe)}else if(vi(R))R._store&&(R._store.validated=!0);else if(R){var Oe=v(R);if(typeof Oe=="function"&&Oe!==R.entries)for(var qe=Oe.call(R),je;!(je=qe.next()).done;)vi(je.value)&&Jo(je.value,oe)}}}function Vh(R){{var oe=R.type;if(oe==null||typeof oe=="string")return;var ce;if(typeof oe=="function")ce=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===l||oe.$$typeof===h))ce=oe.propTypes;else return;if(ce){var De=_(oe);Ue(ce,R.props,"prop",De,R)}else if(oe.PropTypes!==void 0&&!gi){gi=!0;var Oe=_(oe);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Oe||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kh(R){{for(var oe=Object.keys(R.props),ce=0;ce<oe.length;ce++){var De=oe[ce];if(De!=="children"&&De!=="key"){Ln(R),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),Ln(null);break}}R.ref!==null&&(Ln(R),E("Invalid attribute `ref` supplied to `React.Fragment`."),Ln(null))}}function eu(R,oe,ce,De,Oe,qe){{var je=q(R);if(!je){var Se="";(R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(Se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ft=Wh(Oe);ft?Se+=ft:Se+=Go();var Je;R===null?Je="null":Be(R)?Je="array":R!==void 0&&R.$$typeof===t?(Je="<"+(_(R.type)||"Unknown")+" />",Se=" Did you accidentally export a JSX literal instead of a component?"):Je=typeof R,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Je,Se)}var tt=$n(R,oe,ce,Oe,qe);if(tt==null)return tt;if(je){var _t=oe.children;if(_t!==void 0)if(De)if(Be(_t)){for(var zn=0;zn<_t.length;zn++)Xo(_t[zn],R);Object.freeze&&Object.freeze(_t)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Xo(_t,R)}return R===r?Kh(tt):Vh(tt),tt}}function Zh(R,oe,ce){return eu(R,oe,ce,!0)}function Yh(R,oe,ce){return eu(R,oe,ce,!1)}var Gh=Yh,Qh=Zh;pr.Fragment=r,pr.jsx=Gh,pr.jsxs=Qh}()),pr}process.env.NODE_ENV==="production"?gs.exports=im():gs.exports=sm();var c=gs.exports;const Lc=()=>{const[e,t]=y.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return y.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},rr=(e,t)=>{const n=y.useRef(!1);y.useEffect(()=>{n.current?e():n.current=!0},t)};function zc(e,t,n){var r=this,a=y.useRef(null),i=y.useRef(0),s=y.useRef(null),o=y.useRef([]),l=y.useRef(),u=y.useRef(),d=y.useRef(e),h=y.useRef(!0);d.current=e;var m=typeof window<"u",p=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,f=!("trailing"in n)||!!n.trailing,v="maxWait"in n,b="debounceOnServer"in n&&!!n.debounceOnServer,E=v?Math.max(+n.maxWait||0,t):null;y.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var k=y.useMemo(function(){var T=function(q){var $=o.current,F=l.current;return o.current=l.current=null,i.current=q,u.current=d.current.apply(F,$)},D=function(q,$){p&&cancelAnimationFrame(s.current),s.current=p?requestAnimationFrame(q):setTimeout(q,$)},w=function(q){if(!h.current)return!1;var $=q-a.current;return!a.current||$>=t||$<0||v&&q-i.current>=E},S=function(q){return s.current=null,f&&o.current?T(q):(o.current=l.current=null,u.current)},z=function q(){var $=Date.now();if(w($))return S($);if(h.current){var F=t-($-a.current),_=v?Math.min(F,E-($-i.current)):F;D(q,_)}},N=function(){if(m||b){var q=Date.now(),$=w(q);if(o.current=[].slice.call(arguments),l.current=r,a.current=q,$){if(!s.current&&h.current)return i.current=a.current,D(z,t),g?T(a.current):u.current;if(v)return D(z,t),T(a.current)}return s.current||D(z,t),u.current}};return N.cancel=function(){s.current&&(p?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,o.current=a.current=l.current=s.current=null},N.isPending=function(){return!!s.current},N.flush=function(){return s.current?S(Date.now()):u.current},N},[g,v,t,E,f,p,m,b]);return k}function qc(e,t,n){var r=n===void 0?{}:n,a=r.leading,i=r.trailing;return zc(e,t,{maxWait:t,leading:a===void 0||a,trailing:i===void 0||i})}let bi;const Mn=(e=!0,t=!1,n="window")=>{if(!e)return;const[r,a]=y.useState(0)||[!1,()=>{}],i=n==="window"?[]:[n];y.useEffect(()=>(o(),window.addEventListener("resize",u),window.addEventListener("hashchange",u),window.addEventListener("hiddenSectionVisible",l),()=>{clearTimeout(bi),u.flush(),window.removeEventListener("resize",u),window.removeEventListener("hashchange",u),window.removeEventListener("hiddenSectionVisible",l)}),i);const s=()=>{if(n)return n==="window"?window.innerWidth:n.offsetWidth},o=()=>{a(s())},l=({detail:d})=>{const{id:h}=d;n==="window"||!n.closest(`#${h}`)||s()===r||o()},u=qc(()=>{s()!==r&&(t&&(clearTimeout(bi),document.body.classList.add("is-resizing"),bi=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},Uc=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[a,i]=y.useState({current:0,past:0})||[!1,()=>{}],[s,o]=y.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];y.useEffect(()=>(l(),window.addEventListener("scroll",u),()=>{u.flush(),window.removeEventListener("scroll",u)}),[]);const l=()=>{const d=window.scrollY,h=a.current,m=d-h,p=m>0?"down":"up";if(i({current:d,past:h}),p==="down"){d>=e+t.down&&!s.scrollDown&&(!s.scrollUp||m>t.up)&&(n(),o({scrollUp:!1,scrollDown:!0}));return}Math.abs(m)>=t.up&&!s.scrollUp&&(r(),o({scrollUp:!0,scrollDown:!1}))},u=qc(()=>{l()},250);return a},Qs=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=y.useRef(!1);rr(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const r=document.getElementById(window.location.hash.replace("#",""));r&&(r.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)},Js=(e=!1)=>{if(!e)return{showTooltip:!1,tooltipProps:{}};const[t,n]=y.useState(!1);return{showTooltip:t,tooltipProps:{onClick:()=>n(!t),onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation(),n(!t))},onMouseOver:()=>n(!0),onMouseOut:()=>n(!1),onFocus:()=>n(!0),onBlur:()=>n(!1),tabIndex:0}}};const au={},Nn=y.forwardRef(({id:e,styling:t={},isOpen:n=!1,isLoading:r=!1,children:a,className:i="",functions:s={},callbacks:o={},accessibility:l={},...u},d)=>{const h=se.useIntl(),[m]=y.useState(e||Date.now().toString()),p=y.useRef(null),g=d||p,[f,v]=y.useState(n?"open":"hidden"),{extraPadding:b=!0,hasPointer:E=!1,hasForm:k=!1}=t,{onOpen:T=()=>{},onClose:D=()=>{}}=o,{readToScreenreadersWhenClosed:w=!1,...S}=l,z=au[m];y.useEffect(()=>{const F=g==null?void 0:g.current;if(F)return F.addEventListener("transitionend",N),()=>{F.removeEventListener("transitionend",N)}},[]),y.useEffect(()=>{if(f!=="open")return;const F=_=>{_.key==="Escape"&&(_.stopPropagation(),_.preventDefault(),v("closed"))};return document.addEventListener("keyup",F),()=>{document.removeEventListener("keyup",F)}},[f]);const N=({propertyName:F})=>{F==="opacity"&&(z!==!1&&clearTimeout(z),v(_=>(_==="open"?T():_==="closed"&&D(),_==="opening"?"open":_==="closing"?"closed":_==="closed"?"hidden":_)))};rr(()=>{z!==!1&&clearTimeout(z);let F="open";n?v("opening"):(v("closing"),F="hidden"),au[m||""]=setTimeout(()=>{v(F)},300)},[n]);const q={...u,...S};s&&s.onBlur&&(q.onBlur=s.onBlur);const $={className:"content"};return w?$.className=Z("content",{hidden:f==="hidden"}):($.hidden=f==="hidden",$["aria-live"]="polite"),c.jsx("aside",{ref:g,id:m,className:Z("tooltip text-medium",f,i,{loading:r,"extra-padding":b,"has-pointer":E,bottom:E==="bottom","has-form":k}),...q,children:c.jsx("div",{...$,children:r?c.jsx("p",{children:h.formatMessage({id:"tooltip_loading"})}):typeof a=="string"?c.jsx("p",{children:a}):a})})}),Vr=(e,t)=>{Array.isArray(t)||(t=[t]);const n=_n(e);return t.forEach(({type:r,value:a})=>{Jh(n,r,a)}),n},Wc=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},Hc=(e,t,n)=>{let r=n.mobile;for(const a in t){const i=parseInt(String(t[a]));if(e>=i)r=n[i];else if(e<i)break}return r},Vc=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Kc=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()).replace(/[&\s]+/g,""),Zc=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),om=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()),Ht="https://storage.googleapis.com/apolitical-assets/",Kn={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},wr={ARTICLE:"microcourseArticle",DISCUSSION:"microcourseDiscussion",QUIZ:"assessmentQuiz"},vs="SU:",Pr="DELETED",Yc="Invalid token error: Logging user out...",um="200,000+",lm="160+",Mr=/@{{([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})}}/g,Gc=new RegExp("(?<=^|\\s)@([A-Za-z]+(?:[- ]?[A-Za-z]*)*)$");function cm(e){return e?{"--icon":`url(${Ht}icons/${e}.svg)`}:{}}const wn={milliseconds:{inSecond:1e3,inMinute:6e4,inHour:36e5,inDay:864e5},year:{weeks:52,days:365}},Qc=(e,t="en")=>new Date(e).toLocaleString(t,{day:"numeric",month:"short"}),Xs=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),bs=e=>{let t;const n=ja(),r=ja(new Date(e));try{t=n.getTime()-r.getTime()}catch{return""}const a=t/wn.milliseconds.inHour,i=Math.floor(t/wn.milliseconds.inDay);if(i<1)return a<1?{path:"now"}:{path:"hours",number:Math.floor(a)};if(i<7)return{path:"days",number:i};const s=Math.floor(i/7);return s<=wn.year.weeks?{path:"weeks",number:s}:{path:"years",number:Math.floor(i/wn.year.days)}},ja=e=>{const n=(e||new Date).toUTCString();return new Date(n)},dm=(e,t,n)=>{let r;const a=ja(),i=ja(new Date(e));try{r=a.getTime()-i.getTime()}catch{return!1}switch(n){case"seconds":return r/wn.milliseconds.inSecond<=t;case"minutes":return r/wn.milliseconds.inMinute<=t;case"hours":return r/wn.milliseconds.inHour<=t}return!1},fm=(e,t)=>{const n=new Date(e);return Math.abs(new Date().getTime()-n.getTime())/(1e3*60*60*24)<t},hm=e=>new Promise(t=>setTimeout(t,e)),mm=()=>{let e=!1;return typeof window<"u"&&(e=!!(window&&window.location&&window.location.href&&window.location.href.includes("localhost"))),e},lr={apolitical:"Apolitical",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",card_carousel_viewAll:"View all",card_label_communityPage:"Community",card_label_event:"Event",card_label_learningHub:"Programme",card_label_listPage:"List",card_label_microcourse:"Course",card_label_qaQuestion:"Q&A",card_label_solutionArticle:"Article",card_bootcamp:"Email boot camp",card_ended:"Ended",card_new:"New",card_registered:"Registered",card_partner:"{partner} and {number} more",card_contributors_event:"Multiple speakers",card_contributors_solutionArticle:"Multiple authors",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_member_type_owner:"Admin",card_member_type_member:"Member",card_member_count:"{count} members",card_cta_people:"View profile",card_cta_communityPage:"Join now",card_cta_event:"Register now",card_cta_microcourse:"Enrol now",card_cta_communityPage_loading:"Joining...",card_cta_event_loading:"Registering...",card_cta_microcourse_loading:"Enrolling...",card_cta_communityPage_done:"Joined",card_cta_event_done:"Registered",card_cta_microcourse_done:"Enrolled",carousel_pagination_previous:"previous",carousel_pagination_previousSlide:"Previous slide",carousel_pagination_next:"next",carousel_pagination_nextSlide:"Next slide",carousel_pagination_slide:"Slide {number} of {total}",carousel_pagination_ariaLive:"On {direction} slide: {count, plural, one {1 card} other {# cards}} available",carousel_pagination_ariaLive_slide:"On slide {slide}: {count, plural, one {1 card} other {# cards}} available",activitySection_notFoundError:"Post not found",activitiesFeed_sorting_label:"Choose feed sorting method",activitiesFeed_rankingMethod_recent:"Recent",activitiesFeed_rankingMethod_popular:"Popular",activitiesFeed_rankingMethod_internalTesting:"Testing",activitiesFeed_noActivities_inCategories:"There are no posts of this type yet.",activitiesFeed_noActivities:"Activities will appear here.",activitiesFeed_noActivities_button:"Explore Communities",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",community_sortSuccess:"Feed ordered by {order}",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",joinCommunityButton_closed_tooltip:"Please contact the admin of this closed community if you would like to join it.",joinCommunityButton_aria_live:"You are {action} this community",member_apolitical:"Apolitical",member_community:"Community post",member_deleted:"Deleted user",member_profile:"Update profile",membersList:"Members",membersList_admin:"Admin",membersList_profile:"Update profile",membersList_modal_title:"Update profile",courseStructure_section:"{number, plural, =0 {Start here} other {Section #}}",courseStructure_section_end:"End here",courseStructure_time_left:"left",courseStructure_time_completed:"Completed",courseProgression_done:"<percent>{number}%</percent> done",courseProgression_timeLeft:"left","lessonType_analyse-data":"Analyse data","lessonType_analyse-scenarios":"Analyse scenarios","lessonType_attend-webinar":"Attend webinar","lessonType_brainstorm-ideas":"Brainstorm ideas","lessonType_discuss-with-peers":"Discuss with peers","lessonType_discuss-with-team":"Discuss with team","lessonType_do-activity":"Do activity","lessonType_do-assessment":"Do assessment","lessonType_explore-casebook":"Explore casebook","lessonType_fill-out-workbook":"Fill out workbook","lessonType_fill-out-worksheet":"Fill out worksheet","lessonType_investigate-interview":"Investigate interview","lessonType_listen-to-audio":"Listen to audio","lessonType_listen-to-audiocast":"Listen to audiocast","lessonType_listen-to-podcast":"Listen to podcast","lessonType_read-article":"Read article","lessonType_read-article-by-expert":"Read article by expert","lessonType_read-article-by-public-servant":"Read article by public servant","lessonType_read-conclusion":"Read conclusion","lessonType_read-infographic":"Read infographic","lessonType_read-introduction":"Read introduction","lessonType_read-resource":"Read resource","lessonType_reflect-on-content":"Reflect on content","lessonType_share-experiences":"Share experiences","lessonType_take-quiz":"Take quiz","lessonType_use-toolkit":"Use toolkit","lessonType_watch-video":"Watch video","lessonType_watch-webinar":"Watch webinar",markCompleteButton:"Mark as complete",markCompleteButton_completed:"Lesson complete",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
32
32
 
33
33
  Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
34
34
 
35
35
  Thank you for helping to protect the Apolitical community from abusive content.`,discussionFormCard_placeholder:"Write a post or ask a question...",discussionFormCard_overlay_title:"Discard post",discussionFormCard_overlay_text:"Are you sure you want to leave without posting? Changes you have made will not be saved.",discussionFormCard_overlay_cta_discard:"Discard",discussionFormCard_overlay_cta_continue:"Continue editing",discussion_form_postType_label:"Post type","discussion_form__postType_no-category":"Post",discussion_form_title:"Write your {action}",discussion_form_titleField_label:"Title",discussion_form_titleField_placeholder:"Write something...",discussion_form_titleField_error:"Please enter a title or a body for your post.",discussion_form_placeholder:"Write a {action}...",discussion_form_label:"Body",discussion_form_label_action:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Share a question, insight, or announcement with the community",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_showAll:"Show all...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_likes_show:"Show who liked this {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_pin:"Pin post",discussion_moreMenu_unpin:"Unpin post",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_responses_placeholder:"Write a comment...",discussion_share_copy_link:"Copy link",discussion_share_copy_link_success:"Link copied to clipboard",discussion_thread_show:"Show {count} {count, select, 1 {reply} other {replies}}",discussion_thread_hide:"Hide replies",discussion_thread_loadMore:"Load more replies",profileModalLauncher_successMessage:"Your post has been created",profileModalLauncher_title:"Your profile is incomplete",profileModalLauncher_text:"A complete profile builds trust and amplifies your voice across the community. Ensure all your details are up to date including a photo and a bio.",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",dropdown_menu_multiselect_all:"All",dropdown_menu_multiselect_none:"None",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_fieldWrapper_characterLimit_aria_default:"You have {remaining, plural, =0 {no characters} one {1 character} other {# characters}} remaining.",form_fieldWrapper_characterLimit_aria_over:"You are {over, plural, one {1 character} other {# characters}} over the limit. Please shorten your text to {limit} characters.",form_fieldWrapper_characterLimit_info:"You can enter up to {limit} characters",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_cancel:"Cancel",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",form_success:"Thank you for submitting the form!",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their email addresses below",inviteForm_message_label:"Add an invitation note",inviteForm_message_placeholder:"Add a personal note to your invitation...",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",inputAutocomplete_placeholder:"Start typing...",passwordRules_unmatched_text:"Passwords do not match",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",passwordRules_currentPassword_label:"Current password",passwordRules_newPassword_label:"New password",passwordRules_confirmPassword_label:"Confirm new password",profileForm_image:"Upload photo",profileForm_name:"Full name",profileForm_name_placeholder:"What's your name, so people can recognise you?",profileForm_jobTitle:"Job title",profileForm_jobTitle_placeholder:"What's your current job title?",profileForm_organization:"Organisation",profileForm_organization_placeholder:"Where do you work?",profileForm_location:"Location",profileForm_location_placeholder:"Add your city",profileForm_location_error:"Please choose a location from the list.",profileForm_bio:"Bio",profileForm_bio_placeholder:"Tell us more about yourself...",profileForm_cta:"Save",profileForm_cta_submitting:"Saving...",profileForm_cta_submitted:"Saved",profileImageChange_cta_uploading:"Uploading image...",profileImageChange_cta_change:"Change photo",profileImageChange_cta_upload:"+ Add profile photo",profileImageChange_error:"There was an error uploading the image. Please try a different file format or reduce the file size to less than 5MB. Contact us if problem persists.",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",richTextEditor_placeholder:"Write something...",richTextEditor_toolbar:"Formatting options",richTextEditor_bold:"Bold",richTextEditor_italic:"Italic",richTextEditor_strikeThrough:"Strikethrough",richTextEditor_link:"Link",richTextEditor_link_text:"Text:",richTextEditor_link_text_aria:"Text to be linked:",richTextEditor_link_url:"Link:",richTextEditor_link_placeholder:"Type or paste URL",richTextEditor_link_error_required:"Please enter a URL to link to",richTextEditor_link_open:"Open: {link}",richTextEditor_link_open_text:"Opens in a new window",richTextEditor_link_edit:"Edit",richTextEditor_link_remove:"Remove",richTextEditor_link_button:"Add link",richTextEditor_link_enrichedUrl_aria:"Remove this preview for {title}",richTextEditor_link_enrichedUrl_aria_fallback:"the link",richTextEditor_link_enrichedUrl_aria_live:"The link preview has been removed from your post",richTextEditor_ol_list:"Numbered list",richTextEditor_ul_list:"Bullet-point list",richTextEditor_block_quote:"Quote",richTextEditor_mention_fallback:"Can't find who you're looking for? Invite them to the community",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",showpassword_show:"Show",showpassword_hide:"Hide",showpassword_aria_show:"Your password is hidden. Click to show.",showpassword_aria_hide:"Your password is visible. Click to hide.",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",tableOfContents:"Table of contents",timeToComplete_hours:"{time, plural, =0 {} one {1 hour} other {# hours}}",timeToComplete_hours_short:"{time}h",timeToComplete_minutes:"{time, plural, =0 {} one {1 minute} other {# minutes}}",timeToComplete_minutes_short:"{time}m",timeToComplete_range:"{early} - {late}",timeToComplete_range_aria:"between {early} and {late}",tooltip_loading:"Loading...",return_to_nav_button:"Back to top",progressTracker:"Step {current} of {total}",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_platform_communities:"Communities",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_news:"News",footer_company_insights:"Insights",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_ai:"AI principles",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_explore_communities:"Communities",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital, data and AI",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",progressBar:"{number}% loaded",discussionFormModal_title:"Create a post",discussionFormModal_cta:"Create post",inviteModal_title:"You’re registered",inviteModal_formTitle:"Know someone who might like to join this workshop?",inviteModal_formLabel:"Invite your colleagues by typing or pasting their email addresses below.",inviteModal_cta:"Send",overlay_close:"Close",profileModal_title:"Update your profile",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",filters_all:"Show all",filters_disabled:"{name} - no results",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",moreMenu:"See more options",navigationMenu_links_homepage:"Home",navigationMenu_links_events:"Events",navigationMenu_links_microcourses:"Courses","navigationMenu_links_q-and-a":"Q&A",navigationMenu_links_articles:"Articles",navigationMenu_links_communities:"Communities",shareLinks_label:"Share",shareLinks_link_linkedin:"Share on LinkedIn",shareLinks_link_twitter:"Share on Twitter",shareLinks_link_facebook:"Share on Facebook",shareLinks_link_email:"Share by email","shareLinks_link_clipboard-copy":"Copy the link",tags_community:"From the community",editSection_placeholder_description:"Add some details",editSection_placeholder_cta:"add",editSection_edit:"Edit",notFoundError_title:"We can't find that page",notFoundError_text:"Sorry about that. We all mess up sometimes - read some ‘fail’ stories below.",notFoundError_post_1:"Why public servants must learn to fail — and 3 tips for how to do it",notFoundError_post_2:"What failure has taught me",notFoundError_post_3:"How to learn from failure without causing a scandal",notFoundError_cta:"View more articles",collapsibleSection_summary:"Find out more",contentTypeLabel_event:"Event",contentTypeLabel_learningHub:"Programme",contentTypeLabel_listPage:"List",contentTypeLabel_microcourse:"Course",contentTypeLabel_qaQuestion:"Q&A",contentTypeLabel_solutionArticle:"Article",contentTypeLabel_communityPage:"Community",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll"},pm={...lr,languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},gm={...lr,languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>",collapsibleSection_summary:"En savoir plus"},vm={...lr,languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},bm=Object.freeze(Object.defineProperty({__proto__:null,en:lr,es:pm,fr:gm,pt:vm},Symbol.toStringTag,{value:"Module"})),ei=(e,t=lr)=>e in t,Ot=(e,t,n,r,a={})=>{let i="";return ei(`${t}_${n}`)?i=e({id:`${t}_${n}`},a):i=e({id:t},{[r]:n,...a}),i},ym=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let a=n.length-1;a>=0;a--){const i=Math.pow(10,(a+1)*3);if(i<=e){e=Math.round(e*t/i)/t,e===1e3&&a<n.length-1&&(e=1,a++),r=`${e}${n[a]}`;break}}return r},Ca=(e,t)=>y.Children.map(e,n=>Object.is(n,null)?n:y.cloneElement(n,{...t})),Jc=(e=0)=>{setTimeout(()=>{const t=document.querySelector(".splash-screen");t&&t.remove(),window.prerenderReady=!0},e)},xm=e=>{var i,s,o;const n=["name","organization","jobTitle","biography"].every(l=>{const u=e[l];return u!=null&&u!==""}),r=((i=e.image)==null?void 0:i.thumbnail)!==void 0,a=((s=e.location)==null?void 0:s.en)!==void 0||((o=e.location)==null?void 0:o.country)!==void 0;return n&&r&&a},Dm=(e,t,n)=>!t.id||!t.name?"":t.error?n.replace(/{{name}}/g,Pr).replace(/{{id}}/g,Pr):n.replace(/{{name}}/g,t.name).replace(/{{id}}/g,t.id),Xc=async({text:e,template:t,mentions:n,listMembers:r=()=>Promise.resolve([])})=>{var i;if(!n)return e;const a=e.match(Mr);if(!a)return e;for(const s of a){const o=s.replace(Mr,(d,h)=>h),l=n[o];if(!l)continue;const u={};if(typeof l=="object")u.name=l.error?l.error:((i=l==null?void 0:l.data)==null?void 0:i.name)||"",u.id=l.id||"",u.error=l.error;else{const d=l;if(d.startsWith(vs))try{const h=d.replace(vs,"");u.id=h,await r({id:h}).then(m=>{const{name:p,error:g}=m;u.name=g||p||"",u.error=g})}catch{e.replace(s,"@");continue}else continue}e=e.replace(s,u.name?Dm(e,u,t):s)}return e},eo=e=>{const t=e.startsWith("http")?e:`https://${e}`,r=new URL(t).hostname;return{full:t,pretty:r}},ed=e=>new URLSearchParams(window.location.search).get(e),iu=(e="")=>e.replace(/\s+/g,"").length>0,ys=e=>{const t=e.length>8,n=/[0-9]/.test(e)&&/[`!@#$%^&*()_+\-=[\]{}£;':"\\|,.<>/?~]/.test(e),r=new RegExp("^(?=.*?[A-Z])(?=.*?[a-z])").test(e);return{isValid:t&&n&&r,matchingRules:{isMoreThanEightCharacters:t,includesNumberAndSymbol:n,includesLowerAndUppercase:r}}};const ke=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:a=!1,element:i="button",onClick:s=!1,className:o="",disabled:l=!1,tooltip:u="",screenreaderText:d=!1,children:h=!1,...m})=>{const g=Mn(typeof t=="object"),{showTooltip:f,tooltipProps:v}=Js(!!u);if(typeof t=="object"&&typeof g=="number"){const T=Object.assign({},t),D=Wc(Object.keys(T));t=Hc(g,D,T)}!l&&u&&(u="");const b=[];typeof t=="string"&&b.push(t),r&&(b.push("icon"),typeof r=="object"?(b.push(r.icon),r.position?b.push(r.position):b.push("left"),r.hover&&b.push(`hover_${r.hover}`),r.animate&&(b.push("animate"),typeof r.animate=="string"&&b.push(r.animate))):(b.push(r),!r.includes("right")&&!r.includes("left")&&b.push("left")));const E={...m,className:Z(e,o,b,{"no-text":!h,disabled:l,button:a,muted:n.muted,"full-width":n.fullWidth}),onClick:T=>{(!a||a[0]==="#")&&s&&(T.preventDefault(),T.stopPropagation()),s&&s(T)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};a&&(i="a",E.href=a);const k=y.createElement(i,E,h||(d?c.jsx(Re,{showOnFocus:!1,children:d}):null));return l&&u?c.jsxs("span",{className:"button-container",...v,children:[c.jsx(Nn,{isOpen:f,accessibility:{readToScreenreadersWhenClosed:!0},children:u}),k]}):k},cr=({buttons:e,wrappers:t=[],className:n="",...r})=>{const a=e.length>1?"ul":"p",i=e.map((s,o)=>{var l;return a==="p"?c.jsx(ke,{...s},o):c.jsx("li",{className:((l=t[o])==null?void 0:l.className)||"",children:c.jsx(ke,{...s})},o)});return y.createElement(a,{className:Z("button-wrapper",n),...r,children:i})};const Qt=({className:e="",maxWidth:t=!1})=>{const n=t?{"--max-width":`${t/16}rem`}:{};return c.jsx("hr",{className:Z(e,{"has-max-width":t}),style:n})},su={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},highlightSection:{range:[{height:200,width:674},{height:400,width:1348},{height:1e3,width:1e3},{height:2e3,width:2e3}],sizes:"(max-width: 500px) 674px, (max-width: 1024px) 1348px, (max-width: 1200px) 1000px, 2000px"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"}},Cm=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:a}=e?su[e]:su.fallback;return{range:t&&t.length>0?t:r,sizes:n||a}},wm=({format:e,height:t,query:n,width:r})=>{let a=`w=${r}&h=${t}`;return a=e?`${a}&fm=${e}`:a,a=n?`${a}&${n}`:a,a},yi=({format:e,range:t,url:n,query:r})=>t.map(({height:a,width:i})=>`${n}?${wm({format:e,height:a,query:r,width:i})} ${i}w`).join(", ");const Rn=({image:e,className:t,testId:n})=>{const{description:r,height:a,type:i,query:s,url:o,width:l,loading:u,decoding:d,fetchPriority:h}=e,{range:m,sizes:p}=Cm(e),g=yi({format:"avif",query:s,range:m,url:o}),f=yi({format:"webp",query:s,range:m,url:o}),v=yi({format:"",query:s,range:m,url:o});return i&&i.includes("svg")?c.jsx("picture",{className:t,children:c.jsx("img",{src:o,alt:r,loading:u||"lazy",decoding:d||"async",fetchpriority:h||"auto",width:l,height:a,"data-testid":n||"image"})}):c.jsxs("picture",{className:t,children:[i!=="image/gif"&&c.jsx("source",{type:"image/avif",srcSet:g,sizes:p,"data-testid":"source"}),c.jsx("source",{type:"image/webp",srcSet:f,sizes:p,"data-testid":"source"}),c.jsx("img",{srcSet:v,sizes:p,src:o,alt:r,loading:u||"lazy",decoding:d||"async",fetchpriority:h||"auto",width:l,height:a,"data-testid":n||"image"})]})};const Em=({image:e,className:t="",testId:n})=>c.jsx("div",{className:`image-container ${t}`,"data-testid":n||"image-container",children:e&&c.jsx(Rn,{image:{...e},className:"image"})}),pn=({href:e,children:t,fallbackElement:n,className:r="",onClick:a,gtmContext:i,gtmType:s,...o})=>{if(e){const l={...o};return a&&(l.onClick=a),i&&(l["data-gtm-event-context"]=i),s&&(l["data-gtm-event-type"]=s),c.jsx("a",{href:e,className:Z("gtm-trackable",r),...l,children:t})}return n?y.createElement(n,{children:t,className:r,...o}):c.jsx(c.Fragment,{children:t})};const td=y.forwardRef(({className:e="",children:t},n)=>{const r=y.useRef(null),a=n||r;return c.jsx("aside",{ref:a,className:Z("popover",e),"aria-live":"polite",children:t})}),dr=({parent:e=document.body,children:t})=>typeof document=="object"?Nc.createPortal(t,e):null,_m=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"}));const km=({currentStep:e=1,steps:t=1})=>c.jsxs(c.Fragment,{children:[c.jsx(Re,{children:c.jsx(se.FormattedMessage,{id:"progressTracker",values:{current:e,total:t}})}),c.jsx("div",{className:"progress-tracker",children:c.jsx("div",{className:"dots-wrapper",children:new Array(t).fill("").map((n,r)=>{const a=r+1;return c.jsxs("div",{className:"dot-wrapper",children:[c.jsx("div",{className:Z("dot",{active:a===e,completed:a<e}),"data-testid":"progress-dot"}),c.jsx("div",{className:Z("line",{active:a<e})})]},r)})})})]});const Fm=({elementId:e,offset:t=20})=>{const n=se.useIntl(),r=()=>{const a=document.getElementById(e);if(!a)return;const i=document.getElementById("header");i&&window.scrollTo({top:a.offsetTop-i.clientHeight-t})};return c.jsx(ke,{variant:"secondary",className:"return-to-nav",onClick:r,"data-gtm-event-context":"ListPageMobile","data-gtm-event-type":"back-to-nav-button-click",screenreaderText:n.formatMessage({id:"return_to_nav_button"})})};const Bm=({items:e,className:t="",...n})=>c.jsx("ul",{className:Z("buckets",t),...n,children:e.map(({title:r,text:a,link:i,...s},o)=>c.jsx("li",{className:"bucket text-medium",children:c.jsxs("a",{href:i,...s,children:[c.jsx("p",{className:"title",children:r}),c.jsx("p",{children:a})]})},o))}),ou=300,uu="ease-in-out";class Am{constructor(t){this.el=t,this.summary=t.querySelector("summary"),this.content=t.querySelector(".content"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.summary.addEventListener("click",n=>this.onClick(n))}cleanUp(){this.summary.removeEventListener("click",t=>this.onClick(t))}onClick(t){t.preventDefault(),t.stopPropagation(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink()}shrink(){this.isClosing=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:ou,easing:uu}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:ou,easing:uu}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(t){this.el.open=t,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}const ti=({label:e=!1,className:t="",children:n,shouldAnimate:r=!1})=>{const a=se.useIntl(),i=y.useRef(null);return y.useEffect(()=>{let s;return r&&(s=new Am(i.current)),()=>{r&&s&&s.cleanUp()}},[]),c.jsxs("details",{ref:i,className:Z("collapsible-section",t,{"should-animate":r}),children:[c.jsx("summary",{children:e||a.formatMessage({id:"collapsibleSection_summary"})}),c.jsx("div",{className:"content",children:n})]})},lu={cube:"box",graduationCap:"graduation-cap",person:"user",speech:"speech-bubble_round",star:"star_empty_thin"},Tm=e=>{let t=e;return Object.keys(lu).includes(e)&&(t=lu[e]),`url(${Ht}icons/${t}.svg)`};const cu={customCard:"custom",microcourse:"course",solutionArticle:"article",qaQuestion:"question",listPage:"list",learningHub:"learning-hub",communityPage:"communityPage"},nd=({contentType:e,customIcon:t,customLabel:n,className:r=""})=>{const a=se.useIntl(),i=t?{"--custom-icon":Tm(t)}:{},s=ei(`contentTypeLabel_${e}`)?a.formatMessage({id:`contentTypeLabel_${e}`}):!1;return!n&&!s?null:c.jsx("small",{className:Z("content-type-label text-small",e in cu?cu[e]:e,r,{"has-custom-icon":t}),style:i,"data-testid":"content-type-label",children:n||s})};const Tt=({variant:e="primary",icon:t,styling:n={},className:r="",children:a,...i})=>{const{showHighlight:s=!1,background:o="default"}=n,l=t?{"--icon":`url(${Ht}icons/${t}.svg)`}:{};return c.jsx("div",{className:Z("highlighted-text-box",e,r,{"has-icon":t,"show-highlight":s,[o]:o!=="default"}),style:l,...i,children:a})};const gn=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let a=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Mn(i);if(i&&typeof n=="object"&&typeof s=="number"){const h=Object.assign({},n.breakpoints),m=Wc(Object.keys(h));a=Hc(s,m,h)}const{breakpoints:o,text:l="",component:u,...d}=n;return c.jsx(Tt,{variant:"subtle",className:Z("empty-state-box",e,r),children:c.jsxs(c.Fragment,{children:[t&&typeof t=="string"?c.jsx(Ut,{options:{forceBlock:!0},children:t}):t,a&&typeof n=="object"&&(u||c.jsx(ke,{...d,variant:n.variant?n.variant:"secondary",children:l}))]})})};const xs=({children:e,...t})=>c.jsx("p",{...t,children:e}),rd={q:xs,blockquote:xs};for(let e=1;e<=6;e++)rd[`h${e}`]={component:xs,props:{className:"title"}};const ad=({type:e="default",className:t="",heading:n=!1,children:r,...a})=>c.jsxs("div",{...a,className:Z("helper-text-box text-small",e,t),children:[n&&c.jsx("p",{className:"title",children:n}),typeof r=="string"?c.jsx(Ut,{options:{wrapper:y.Fragment,forceBlock:!0,overrides:rd},children:r}):c.jsx("p",{children:r})]});const id=({id:e,className:t="",show:n=!1,hide:r=!1,text:a,markdownOptions:i,fadeStyle:s="default",children:o})=>{const l=se.useIntl(),u=y.useRef(null);e||(e=Date.now().toString());const[d,h]=y.useState(""),[m,p]=y.useState("closed");y.useEffect(()=>{const v=u.current;if(v)return v.addEventListener("transitionend",g),()=>{v.removeEventListener("transitionend",g)}},[]),y.useEffect(()=>{if(!a||typeof a!="string")return;const v=a.split(`
36
36
  `);h(v.length<3?`${a.substring(0,400)}...`:v.slice(0,3).join(`
37
- `))},[a]),y.useEffect(()=>{m==="ready-to-close"&&p("closing")},[m]);const g=({propertyName:v})=>{v==="max-height"&&p(b=>b==="opening"?"open":b==="closing"?"closed":b)},f=["opening","open"].includes(m);return c.jsxs(Tt,{variant:"subtle",className:Z("hide-show-text-box",t),children:[c.jsx("div",{ref:u,id:e,className:Z("content",m,s),children:a?c.jsxs(c.Fragment,{children:[c.jsx(Ut,{options:{forceBlock:!0,...i},children:m==="closed"?d:a}),m!=="closed"&&o]}):o}),c.jsx("p",{className:"cta",children:c.jsx(ke,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:Z({"rotate-180":f}),onClick:()=>{p(f?"ready-to-close":"opening")},"aria-expanded":f,"aria-controls":e,children:f?r||l.formatMessage({id:"hideShowTextBox_hide"}):n||l.formatMessage({id:"hideShowTextBox_show"})})})]})};const Sm=({element:e="ul",layout:t="vertical",variant:n="default",items:r=[],styling:a={},className:i=""})=>{const{hasBorder:s=!1,zebraStriping:o=!1}=a;return y.createElement(e,{className:Z("icon-bulleted-list text-medium",n,i,{"has-border":s,"has-zebra-stripes":o,[t]:e!=="dl"}),children:r.map((l,u)=>{const d={wrapper:y.Fragment,forceInline:!0},h={"--icon":`url(${Ht}icons/${l.icon}.svg)`};return e==="dl"?c.jsxs(y.Fragment,{children:[c.jsx("dt",{style:h,children:c.jsx(Ut,{options:d,children:l.dt||""})},`dt-${u}`),c.jsx("dd",{children:typeof l.text=="string"?c.jsx(Ut,{options:d,children:l.text}):l.text},`dd-${u}`)]},`dl-${u}`):c.jsx("li",{style:h,children:typeof l.text=="string"?c.jsx(Ut,{options:d,children:l.text}):l.text},u)})})},ut=()=>y.Fragment,jm=({children:e})=>c.jsx(Tt,{variant:"secondary",children:e}),Om=({children:e})=>typeof e=="object"&&Object.keys(e||{}).length===1?c.jsx("p",{className:"center",children:e}):c.jsx("div",{className:"center",children:e}),Pm=["span","strong","h1","h2","h3","h4","h5","h6","p"],Mm=({children:e})=>{const t=se.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of y.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(y.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of y.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&y.isValidElement(s)){const o=s.type;if(Pm.includes(o)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const a=n?n.toString():"";return c.jsx(ti,{label:a,className:["Sources","Resources"].includes(a)?"discrete-links":"",children:r.map(i=>i)})},Nm=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return c.jsx(Tt,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return c.jsx(Tt,{variant:"primary",children:e});case"pink-textbox":return c.jsx(Tt,{variant:"tertiary",children:e});case"content":return typeof e=="object"&&Object.keys(e||{}).length===1?c.jsx("p",{children:e}):e;default:return c.jsx("div",{...t,children:e})}return c.jsx("div",{...t,children:e})},Ft=({children:e})=>c.jsx(c.Fragment,{children:e}),Rm=e=>{const t=se.useIntl(),n=Date.now().toString();let r="default";const a=e.src;a.includes("youtube")||a.includes("vimeo")?r="video":a.includes("riddle")||a.includes("sli.do")?r="poll":a.includes("padlet")&&(r="padlet");const i=`content-after-iframe-${n}`;return c.jsxs(c.Fragment,{children:[c.jsx(Re,{element:"a",href:`#${i}`,onClick:s=>{s.preventDefault(),s.stopPropagation();const o=document.getElementById(i);o==null||o.scrollIntoView({behavior:"smooth"}),o==null||o.focus()},children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})}),c.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),c.jsx("span",{id:i,tabIndex:0})]})},du=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Im=({children:e,...t})=>{const n=se.useIntl();let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let a=e,i=!1;for(const o of y.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&y.isValidElement(o)){const l=o.type;if(["button","center","span","strong"].includes(l)&&o.props&&o.props.children&&o.props.children[0])for((l==="button"||du(o.props.children[0])==="button")&&(i=!0),a=o.props.children[0];a&&typeof a!="string"&&!(typeof a=="boolean"||typeof a=="number"||!y.isValidElement(a));)if(a.props&&a.props.children&&a.props.children[0])a=a.props.children[0],a&&du(a)==="button"&&(i=!0);else break}const s=`@${Pr}`;return a===s||Array.isArray(a)&&a[0]===s?(delete r.href,delete r.target,c.jsxs("span",{...r,className:"mention deleted-user",children:["@",n.formatMessage({id:"member_deleted"})]})):i?(r={...r,className:"button primary medium"},c.jsx("p",{className:"center",children:c.jsx(ke,{variant:"primary",size:"medium",...r,children:a})})):c.jsx("a",{...r,children:a})},Ds=({children:e,...t})=>c.jsx("span",{className:Z({url:t==null?void 0:t.href}),children:e});const $m={default:{a:Im,CollapsibleSection:ti,TextBox:Tt,CaseStudy:jm,style:ut,details:Mm,div:Nm,iframe:Rm,center:Om},"text-only":{h1:ut,h2:ut,h3:ut,h4:ut,h5:ut,h6:ut,style:ut,details:ut,div:ut,TextBox:ut,CollapsibleSection:ut,CaseStudy:ut,blockquote:ut,iframe:ut,button:ut}},An=({element:e="div",className:t="",options:n={},children:r,overrideType:a="default",styling:i={}})=>{if(!r)return null;const{highlightTitles:s=!1}=i;r=r.replace(/^<br\/?>/,"");const o={wrapper:y.Fragment,forceBlock:!0};let l=$m[a];return n.overrides&&(l={...l,...n.overrides}),y.createElement(e,{className:Z("markdown-text",t,{"highlight-titles":s}),children:c.jsx(Ut,{options:{...o,...n,overrides:l},children:r})})};const sd=({maxWidth:e=!1,title:t,subtitle:n,children:r,className:a=""})=>{const i=e?{"--max-width":`${e/16}rem`}:{};return c.jsxs("section",{className:Z("page-heading",a),children:[c.jsxs("div",{className:Z("content",{"has-max-width":e}),style:i,children:[t&&t.text&&y.createElement(t.element||"h1",{className:"title"},t.text),n&&n.text&&y.createElement(n.element||"h2",{className:"text-medium"},n.text)]}),r]})};const Wt=({size:e="medium",variant:t="default",className:n="",icon:r,tooltip:a="",children:i,element:s="span",...o})=>{const l={"--icon":`url(${Ht}icons/${r}.svg)`},{showTooltip:u,tooltipProps:d}=Js(!!a),h=y.createElement(s,{className:Z("pill",e,t,n,{"has-icon":r}),style:l,children:i,...d,...o});return a?c.jsxs("span",{className:"pill-wrapper",children:[h,c.jsx(Nn,{isOpen:u,accessibility:{readToScreenreadersWhenClosed:!0},children:a})]}):h};const Nr=({element:e="p",children:t=null,className:n="",...r})=>y.createElement(e,{...r,className:Z("status-banner text-small",n),"aria-live":"assertive"},t),to=y.createContext({badges:[],isLoading:!0});function od(){return y.useContext(to)}const ud=({children:e,badges:t})=>c.jsx(to.Provider,{value:t,children:e}),ld=({showDevTools:e=!0,children:t})=>{const n=new Ve.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return c.jsxs(Ve.QueryClientProvider,{client:n,children:[t,e&&c.jsx(Xh.ReactQueryDevtools,{initialIsOpen:!1})]})};var Lm=y.createContext({client:Da});function zm(e){var t=e.children,n=e.client,r=e.apiKey,a=e.options,i=y.useMemo(function(){return n&&r&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&a&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n||(r&&(Da.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),Da.init(r,a)),Da)},[n,r]);return y.createElement(Lm.Provider,{value:{client:i}},t)}const cd=({children:e,user:t})=>t.isLoading?null:process.env.REACT_APP_PUBLIC_POSTHOG_KEY?c.jsx(zm,{apiKey:atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),options:{api_host:"/ph",autocapture:!1,disable_session_recording:!0,persistence_name:"flags",secure_cookie:!0,ui_host:"eu.posthog.com",bootstrap:{distinctID:t.id||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!t.id}},children:e}):c.jsx(c.Fragment,{children:e});var dd=(e=>(e.COMMUNITY_RANKING="community-ranking",e))(dd||{});const fd=({children:e,locale:t,messages:n})=>{const r=t||"en",a={...bm[r],...n||{}};return c.jsx(se.IntlProvider,{locale:r,messages:a,children:e})},no=y.createContext({}),wa={en:"English",es:"Español",fr:"Français",pt:"Português"},ct=y.createContext({isLoading:!0});function ni(){return y.useContext(ct)}const hd=({children:e,user:t,updateDetails:n})=>c.jsx(ct.Provider,{value:{...t,updateDetails:n},children:e}),ro=y.createContext({registerOverlay:()=>{},unregisterOverlay:()=>{}}),md=()=>y.useContext(ro),pd=({children:e})=>{const[t,n]=y.useState([]);y.useEffect(()=>{t.length>0?document.body.classList.add("has-overlay"):document.body.classList.remove("has-overlay")},[t]);const r=y.useCallback(i=>{n(s=>[...s,i])},[]),a=y.useCallback(i=>{n(s=>s.filter(o=>o!==i))},[]);return c.jsx(ro.Provider,{value:{registerOverlay:r,unregisterOverlay:a},children:e})},qm=({bootstrap:e,children:t,intl:n,showDevTools:r})=>{const[a,i]=y.useState({isLoading:!0}),[s,o]=y.useState({badges:[],isLoading:!0}),l=(n==null?void 0:n.locale)||localStorage.getItem("language")||"en",[u,d]=y.useState(l),h=m=>{localStorage.setItem("language",m),d(m)};return y.useEffect(()=>{e().then(m=>{Array.isArray(m)?(i({...m[0],isLoading:!1}),o({badges:m[1],isLoading:!1})):i({...m,isLoading:!1}),Jc(5e3)}).catch(m=>{m.message===Yc&&window.location.pathname!=="/user-onboarding/logout"&&(window.location.href="/user-onboarding/logout"),i({isLoading:!1}),o({badges:[],isLoading:!1})})},[]),c.jsx(no.Provider,{value:{language:u,updateLanguage:h},children:c.jsx(fd,{locale:u,messages:n==null?void 0:n.messages,children:c.jsx(Gs.CookiesProvider,{children:c.jsx(hd,{user:a,updateDetails:i,children:c.jsx(ud,{badges:s,children:c.jsx(pd,{children:c.jsx(ld,{showDevTools:r,children:c.jsx(cd,{user:a,children:t})})})})})})})})},Um={globe:"globe",heart:"heart_empty_thick",pencil:"pencil",star:"star_empty","speech-bubble":"speech-bubble_round"};const gd=({slug:e})=>{const{badges:t}=od(),n=t==null?void 0:t.find(o=>o.slug===e);if(!n)return null;const{name:r,icon:a,colour:i,description:s}=n;return c.jsx(Wt,{className:Z("user-badge",i==null?void 0:i.toLowerCase()),icon:a&&Um[a],element:"li",tooltip:s,children:r})};var lt=(e=>(e.COMMUNITIES="communities",e.PLATFORM="platform",e))(lt||{});const vd=({element:e="ul",userBadges:t,badgeOptions:n})=>{if(Object.keys(t).length!==0)return y.createElement(e,{className:"badges-list",children:(n==null?void 0:n.scopes)&&(n==null?void 0:n.scopes.map(r=>{var a,i;return(i=(a=t==null?void 0:t[r.scope])==null?void 0:a[r.area])==null?void 0:i.map((s,o)=>c.jsx(gd,{slug:s},o))}))})};const Wm=({styling:e={},progress:t=0,text:n=!1,className:r=""})=>{const a=se.useIntl(),{showText:i=!1,layout:s="bar",size:o="default",color:l="default"}=e,u=t>75?100:t>50?75:t>25?50:t>5?25:0,d={"--progress":`${t}%`};return c.jsx("span",{className:Z(`progress-bar section-${u}`,s,r,{[o]:o!=="default",[l!=="default"?l:""]:l!=="default"}),style:d,children:y.createElement(i?"span":Re,{className:i?"text":"",children:n||a.formatMessage({id:"progressBar"},{number:t})})})},ao=y.memo(Wm);const xi="loadingBlock_",Hm=({progress:e=0,steps:t=!1,className:n=""})=>{const r=se.useIntl();t||(t={0:{text:r.formatMessage({id:`${xi}loading`})},75:{text:r.formatMessage({id:`${xi}almostDone`})},100:{text:r.formatMessage({id:`${xi}complete`})}});let a=null;const i=Object.keys(t);for(let o=0;o<i.length&&!(e<parseInt(i[o]));o++)a=i[o];const s=a&&t[a].icon?{"--icon":`url(${Ht}icons/${t[a].icon}.svg)`}:{};return c.jsxs(Tt,{className:Z("loading-block",n,{"has-icon":a&&t[a].icon}),variant:"subtle",style:s,children:[a&&c.jsx("span",{className:"step",children:t[a].text}),c.jsx(ao,{progress:e})]})},Vm=y.memo(Hm);const jt=({element:e="div",className:t="",...n})=>c.jsx(Xa,{element:e,className:Z("loading-placeholder",t),...n});const Cs={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],heading:["title"],cards:["card","card","card","card"],carousel:["cards","controls"],"carousel-with-title":["title","cards","controls"],answers:["text","text","text"],"text-page":["title","text","text","text","text","subtitle","text","text","text","text","subtitle","text","text","text","text"],"form-with-answers":["question","subtitle","form","answers","answers","answers","answers","answers"],"general-website-page":["banner","text-page"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"],member:["profile-picture","text","text"],"course-navigation":["button","button"],"course-lesson-page":["breadcrumb","course-navigation","text-page"],"course-lesson-quiz":["text-page","quiz-box"]},bd=(e,t)=>e in Cs?c.jsx("div",{className:e,children:Cs[e].map((n,r)=>bd(n,r))},t):c.jsx(jt,{className:e},t),ri=({layout:e="overview-page",...t})=>c.jsx("div",{className:Z("loading-state",e),...t,children:Cs[e].map((n,r)=>bd(n,r))}),yd=e=>{const t=e&&e.toUpperCase().trim().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},Xr=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Km=e=>{const t=Math.ceil(26/Xr.length),n=yd(e).toLowerCase();if(n==="")return Xr[0];const r=n.charCodeAt(0)-96;for(let a=0;a<Xr.length;a++)if(r<=t*(a+1))return Xr[a]};const fu=256,vn=({className:e="",src:t="",name:n,alt:r,width:a=fu,height:i=fu,showInitials:s=!0,...o})=>{const[l,u]=y.useState(!1),d=y.useRef(null),h=r??n;y.useEffect(()=>{const p=d.current;if(!p)return;const g=p.getContext("2d");if(!g)return;const f=a,v=i;typeof window<"u"&&window.devicePixelRatio&&(p.width=f*window.devicePixelRatio,p.height=v*window.devicePixelRatio,g.scale(window.devicePixelRatio,window.devicePixelRatio)),g.fillStyle=Km(n),g.fillRect(0,0,f,v),g.font=`${f/3}px Arial`,g.textAlign="center",g.fillStyle="white",g.fillText(yd(n),f/2,v/1.6)},[n]);let m=!1;return t&&t!==""&&!l&&(t.includes("http")||t.includes("//"))&&(m=!0),c.jsx("figure",{className:Z("profile-picture",e,{error:l}),...o,children:m?c.jsx("img",{src:t,alt:h,onError:()=>{u(!0)},width:a,height:i}):s?c.jsx("canvas",{ref:d}):c.jsx("span",{className:"fallback"})})};var rt=(e=>(e.DISCUSSION_FORM_SUBMITTED="discussionFormSubmitted",e.DISCUSSION_POST_ADDED="discussionPostAdded",e.DISCUSSION_POST_CLICKED="discussionPostClicked",e.MEMBER_CLICKED="memberClicked",e))(rt||{});const ai=e=>e==="apolitical"?{image:`${Ht}logos/member_apolitical.svg`}:e==="community"||e==="deleted"||typeof e=="object"&&!e.name?{image:`${Ht}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail,badges:e.badges},Zm=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const a=e!=="",i=t!=="",s=n!=="";if(!a&&!i&&!s)return"";const o=`${e}${a&&i?` — ${t}`:t}`;let l=`${o}${(a||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=o),l.length>r&&(l=nr(l,r)),l};const Ym=y.lazy(()=>Promise.resolve().then(()=>_m)),Gm=y.lazy(()=>Promise.resolve().then(()=>c_));let ea=null;const Jt=({element:e="div",member:t="community",alt:n="",additionalContent:r=!1,styling:a={},functions:i={},gtmContext:s="member",gtmType:o="member-click",className:l="",badges:u,...d})=>{const h=se.useIntl(),{profile:m,...p}=i,{size:g="medium",variant:f="inline",isCondensed:v=!0,additionalContentNewLine:b=!1}=a,E=y.useContext(ct),k=m&&E&&typeof E.id=="string",[T,D]=y.useState(!1),w=ai(t);w.name||(w.name=h.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:S,image:z}=w;let{url:N}=w;typeof t=="object"&&t.link!==void 0&&(t.link===!1?N=void 0:N=t.link);const q=Zm(w),$=r&&r.createdAt?bs(r.createdAt):!1,F=r&&r.createdAt?Xs(r.createdAt):"";return y.createElement(e,{...d,className:Z("member text-medium",g,f,l,{"has-profile-link":k}),...p,children:c.jsxs(c.Fragment,{children:[c.jsxs(pn,{href:N,gtmType:o,gtmContext:s,onClick:_=>{if(_==null||_.preventDefault(),_==null||_.stopPropagation(),!N)return;ea&&clearTimeout(ea),ea=setTimeout(()=>{window.location.href=N},150);const P=new CustomEvent(rt.MEMBER_CLICKED,{detail:{link:N,timeout:ea}});document.dispatchEvent(P)},children:[c.jsx(vn,{name:S,src:z,alt:n}),c.jsxs("div",{className:"details",children:[c.jsxs("div",{className:Z("name",{"new-line":b}),"data-testid":"member-name",children:[c.jsx("span",{children:S}),(u==null?void 0:u.showBadges)&&(w==null?void 0:w.badges)&&c.jsx(vd,{userBadges:w.badges,badgeOptions:u}),r&&c.jsxs("span",{className:Z("additional-content",{"new-line":b}),children:[r.createdAt&&$&&c.jsx("span",{className:"date",title:F,"aria-label":F,"data-testid":"date",children:h.formatMessage({id:`dates_${$.path}`},{number:$.number})}),r.customMessage&&c.jsx("span",{children:r.customMessage}),r.didEdit&&c.jsx("em",{children:h.formatMessage({id:"discussion_edited"})})]})]}),q&&!b&&c.jsx("small",{className:Z({"text-medium":g==="large"}),"data-testid":"member-details",children:v?q:c.jsxs(c.Fragment,{children:[w.role,w.organisation?` — ${w.organisation}`:c.jsx(c.Fragment,{}),c.jsx("span",{className:"location",children:w.country})]})})]})]}),q&&m&&k?c.jsxs(c.Fragment,{children:[c.jsx(ke,{variant:"tertiary",size:"small",onClick:_=>{_.preventDefault(),_.stopPropagation(),D(!0)},"data-testid":"profile-button",children:h.formatMessage({id:"member_profile"})}),c.jsx(Ym,{children:c.jsx(Gm,{form:m,showModal:T,content:{title:h.formatMessage({id:"member_profile"})},functions:{onClose:()=>{D(!1)}},className:"in-portal"})})]}):c.jsx(c.Fragment,{})]})})},Qm=Object.freeze(Object.defineProperty({__proto__:null,default:Jt},Symbol.toStringTag,{value:"Module"}));const hu={small:24,medium:48},io=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:a,showGap:i,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,multipleText:l,className:u="",...d})=>{const h=se.useIntl();return!n||n.length===0?null:y.createElement(e,{...d,className:Z("contributors",u,a,{"has-gap":i}),children:c.jsxs(c.Fragment,{children:[c.jsx("ul",{children:n.map((m,p)=>{let g,f="";if(p<o){const{name:v="",image:b=""}=ai(m);if(s)return c.jsx(jt,{element:"li",className:"contributor"},p);g=c.jsx(vn,{name:v,src:b,width:hu[a||"medium"],height:hu[a||"medium"]})}else if(p===o){const v=(t||n.length)-o;g=c.jsxs("small",{className:Z({"large-number":v>99}),children:["+",ym(v,0)]}),f="number-left"}return g?c.jsx("li",{className:Z("contributor",f),children:g},p):null})}),r&&c.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?h.formatMessage({id:`member_${n[0]}`}):nr(n[0].name||"",20):l||null})]})})};const so=({element:e="section",children:t,className:n,...r})=>y.createElement(e,{className:Z("modal",n),children:typeof t=="string"?c.jsx("p",{children:t}):t,...r});var ws={exports:{}},ta={exports:{}},Me={};/** @license React v16.13.1
37
+ `))},[a]),y.useEffect(()=>{m==="ready-to-close"&&p("closing")},[m]);const g=({propertyName:v})=>{v==="max-height"&&p(b=>b==="opening"?"open":b==="closing"?"closed":b)},f=["opening","open"].includes(m);return c.jsxs(Tt,{variant:"subtle",className:Z("hide-show-text-box",t),children:[c.jsx("div",{ref:u,id:e,className:Z("content",m,s),children:a?c.jsxs(c.Fragment,{children:[c.jsx(Ut,{options:{forceBlock:!0,...i},children:m==="closed"?d:a}),m!=="closed"&&o]}):o}),c.jsx("p",{className:"cta",children:c.jsx(ke,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:Z({"rotate-180":f}),onClick:()=>{p(f?"ready-to-close":"opening")},"aria-expanded":f,"aria-controls":e,children:f?r||l.formatMessage({id:"hideShowTextBox_hide"}):n||l.formatMessage({id:"hideShowTextBox_show"})})})]})};const Sm=({element:e="ul",layout:t="vertical",variant:n="default",items:r=[],styling:a={},className:i=""})=>{const{hasBorder:s=!1,zebraStriping:o=!1}=a;return y.createElement(e,{className:Z("icon-bulleted-list text-medium",n,i,{"has-border":s,"has-zebra-stripes":o,[t]:e!=="dl"}),children:r.map((l,u)=>{const d={wrapper:y.Fragment,forceInline:!0},h={"--icon":`url(${Ht}icons/${l.icon}.svg)`};return e==="dl"?c.jsxs(y.Fragment,{children:[c.jsx("dt",{style:h,children:c.jsx(Ut,{options:d,children:l.dt||""})},`dt-${u}`),c.jsx("dd",{children:typeof l.text=="string"?c.jsx(Ut,{options:d,children:l.text}):l.text},`dd-${u}`)]},`dl-${u}`):c.jsx("li",{style:h,children:typeof l.text=="string"?c.jsx(Ut,{options:d,children:l.text}):l.text},u)})})},ut=()=>y.Fragment,jm=({children:e})=>c.jsx(Tt,{variant:"secondary",children:e}),Om=({children:e})=>typeof e=="object"&&Object.keys(e||{}).length===1?c.jsx("p",{className:"center",children:e}):c.jsx("div",{className:"center",children:e}),Pm=["span","strong","h1","h2","h3","h4","h5","h6","p"],Mm=({children:e})=>{const t=se.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of y.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(y.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of y.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&y.isValidElement(s)){const o=s.type;if(Pm.includes(o)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const a=n?n.toString():"";return c.jsx(ti,{label:a,className:["Sources","Resources"].includes(a)?"discrete-links":"",children:r.map(i=>i)})},Nm=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return c.jsx(Tt,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return c.jsx(Tt,{variant:"primary",children:e});case"pink-textbox":return c.jsx(Tt,{variant:"tertiary",children:e});case"content":return typeof e=="object"&&Object.keys(e||{}).length===1?c.jsx("p",{children:e}):e;default:return c.jsx("div",{...t,children:e})}return c.jsx("div",{...t,children:e})},Ft=({children:e})=>c.jsx(c.Fragment,{children:e}),Rm=e=>{const t=se.useIntl(),n=Date.now().toString();let r="default";const a=e.src;a.includes("youtube")||a.includes("vimeo")?r="video":a.includes("riddle")||a.includes("sli.do")?r="poll":a.includes("padlet")&&(r="padlet");const i=`content-after-iframe-${n}`;return c.jsxs(c.Fragment,{children:[c.jsx(Re,{element:"a",href:`#${i}`,onClick:s=>{s.preventDefault(),s.stopPropagation();const o=document.getElementById(i);o==null||o.scrollIntoView({behavior:"smooth"}),o==null||o.focus()},children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})}),c.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),c.jsx("span",{id:i,tabIndex:0})]})},du=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Im=({children:e,...t})=>{const n=se.useIntl();let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let a=e,i=!1;for(const o of y.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&y.isValidElement(o)){const l=o.type;if(["button","center","span","strong"].includes(l)&&o.props&&o.props.children&&o.props.children[0])for((l==="button"||du(o.props.children[0])==="button")&&(i=!0),a=o.props.children[0];a&&typeof a!="string"&&!(typeof a=="boolean"||typeof a=="number"||!y.isValidElement(a));)if(a.props&&a.props.children&&a.props.children[0])a=a.props.children[0],a&&du(a)==="button"&&(i=!0);else break}const s=`@${Pr}`;return a===s||Array.isArray(a)&&a[0]===s?(delete r.href,delete r.target,c.jsxs("span",{...r,className:"mention deleted-user",children:["@",n.formatMessage({id:"member_deleted"})]})):i?(r={...r,className:"button primary medium"},c.jsx("p",{className:"center",children:c.jsx(ke,{variant:"primary",size:"medium",...r,children:a})})):c.jsx("a",{...r,children:a})},Ds=({children:e,...t})=>c.jsx("span",{className:Z({url:t==null?void 0:t.href}),children:e});const $m={default:{a:Im,CollapsibleSection:ti,TextBox:Tt,CaseStudy:jm,style:ut,details:Mm,div:Nm,iframe:Rm,center:Om},"text-only":{h1:ut,h2:ut,h3:ut,h4:ut,h5:ut,h6:ut,style:ut,details:ut,div:ut,TextBox:ut,CollapsibleSection:ut,CaseStudy:ut,blockquote:ut,iframe:ut,button:ut}},An=({element:e="div",className:t="",options:n={},children:r,overrideType:a="default",styling:i={}})=>{if(!r)return null;const{highlightTitles:s=!1}=i;r=r.replace(/^<br\/?>/,"");const o={wrapper:y.Fragment,forceBlock:!0};let l=$m[a];return n.overrides&&(l={...l,...n.overrides}),y.createElement(e,{className:Z("markdown-text",t,{"highlight-titles":s}),children:c.jsx(Ut,{options:{...o,...n,overrides:l},children:r})})};const sd=({maxWidth:e=!1,title:t,subtitle:n,children:r,className:a=""})=>{const i=e?{"--max-width":`${e/16}rem`}:{};return c.jsxs("section",{className:Z("page-heading",a),children:[c.jsxs("div",{className:Z("content",{"has-max-width":e}),style:i,children:[t&&t.text&&y.createElement(t.element||"h1",{className:"title"},t.text),n&&n.text&&y.createElement(n.element||"h2",{className:"text-medium"},n.text)]}),r]})};const Wt=({size:e="medium",variant:t="default",className:n="",icon:r,tooltip:a="",children:i,element:s="span",...o})=>{const l={"--icon":`url(${Ht}icons/${r}.svg)`},{showTooltip:u,tooltipProps:d}=Js(!!a),h={},m=a?`tooltip-${window.btoa(a).substring(9,15)}`:void 0;a&&m&&(h["aria-describedby"]=m,h.role="button");const p=y.createElement(a?"span":s,{className:Z("pill",e,t,n,{"has-icon":r}),style:l,children:i,...d,...h,...o});return a?y.createElement(s,{className:"pill-wrapper"},c.jsxs(c.Fragment,{children:[p,c.jsx(Nn,{id:m,isOpen:u,children:a})]})):p};const Nr=({element:e="p",children:t=null,className:n="",...r})=>y.createElement(e,{...r,className:Z("status-banner text-small",n),"aria-live":"assertive"},t),to=y.createContext({badges:[],isLoading:!0});function od(){return y.useContext(to)}const ud=({children:e,badges:t})=>c.jsx(to.Provider,{value:t,children:e}),ld=({showDevTools:e=!0,children:t})=>{const n=new Ve.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return c.jsxs(Ve.QueryClientProvider,{client:n,children:[t,e&&c.jsx(Xh.ReactQueryDevtools,{initialIsOpen:!1})]})};var Lm=y.createContext({client:Da});function zm(e){var t=e.children,n=e.client,r=e.apiKey,a=e.options,i=y.useMemo(function(){return n&&r&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&a&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n||(r&&(Da.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),Da.init(r,a)),Da)},[n,r]);return y.createElement(Lm.Provider,{value:{client:i}},t)}const cd=({children:e,user:t})=>t.isLoading?null:process.env.REACT_APP_PUBLIC_POSTHOG_KEY?c.jsx(zm,{apiKey:atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),options:{api_host:"/ph",autocapture:!1,disable_session_recording:!0,persistence_name:"flags",secure_cookie:!0,ui_host:"eu.posthog.com",bootstrap:{distinctID:t.id||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!t.id}},children:e}):c.jsx(c.Fragment,{children:e});var dd=(e=>(e.COMMUNITY_RANKING="community-ranking",e))(dd||{});const fd=({children:e,locale:t,messages:n})=>{const r=t||"en",a={...bm[r],...n||{}};return c.jsx(se.IntlProvider,{locale:r,messages:a,children:e})},no=y.createContext({}),wa={en:"English",es:"Español",fr:"Français",pt:"Português"},ct=y.createContext({isLoading:!0});function ni(){return y.useContext(ct)}const hd=({children:e,user:t,updateDetails:n})=>c.jsx(ct.Provider,{value:{...t,updateDetails:n},children:e}),ro=y.createContext({registerOverlay:()=>{},unregisterOverlay:()=>{}}),md=()=>y.useContext(ro),pd=({children:e})=>{const[t,n]=y.useState([]);y.useEffect(()=>{t.length>0?document.body.classList.add("has-overlay"):document.body.classList.remove("has-overlay")},[t]);const r=y.useCallback(i=>{n(s=>[...s,i])},[]),a=y.useCallback(i=>{n(s=>s.filter(o=>o!==i))},[]);return c.jsx(ro.Provider,{value:{registerOverlay:r,unregisterOverlay:a},children:e})},qm=({bootstrap:e,children:t,intl:n,showDevTools:r})=>{const[a,i]=y.useState({isLoading:!0}),[s,o]=y.useState({badges:[],isLoading:!0}),l=(n==null?void 0:n.locale)||localStorage.getItem("language")||"en",[u,d]=y.useState(l),h=m=>{localStorage.setItem("language",m),d(m)};return y.useEffect(()=>{e().then(m=>{Array.isArray(m)?(i({...m[0],isLoading:!1}),o({badges:m[1],isLoading:!1})):i({...m,isLoading:!1}),Jc(5e3)}).catch(m=>{m.message===Yc&&window.location.pathname!=="/user-onboarding/logout"&&(window.location.href="/user-onboarding/logout"),i({isLoading:!1}),o({badges:[],isLoading:!1})})},[]),c.jsx(no.Provider,{value:{language:u,updateLanguage:h},children:c.jsx(fd,{locale:u,messages:n==null?void 0:n.messages,children:c.jsx(Gs.CookiesProvider,{children:c.jsx(hd,{user:a,updateDetails:i,children:c.jsx(ud,{badges:s,children:c.jsx(pd,{children:c.jsx(ld,{showDevTools:r,children:c.jsx(cd,{user:a,children:t})})})})})})})})},Um={globe:"globe",heart:"heart_empty_thick",pencil:"pencil",star:"star_empty","speech-bubble":"speech-bubble_round"};const gd=({slug:e})=>{const{badges:t}=od(),n=t==null?void 0:t.find(o=>o.slug===e);if(!n)return null;const{name:r,icon:a,colour:i,description:s}=n;return c.jsx(Wt,{className:Z("user-badge",i==null?void 0:i.toLowerCase()),icon:a&&Um[a],element:"li",tooltip:s,children:r})};var lt=(e=>(e.COMMUNITIES="communities",e.PLATFORM="platform",e))(lt||{});const vd=({element:e="ul",userBadges:t,badgeOptions:n})=>{if(Object.keys(t).length!==0)return y.createElement(e,{className:"badges-list",children:(n==null?void 0:n.scopes)&&(n==null?void 0:n.scopes.map(r=>{var a,i;return(i=(a=t==null?void 0:t[r.scope])==null?void 0:a[r.area])==null?void 0:i.map((s,o)=>c.jsx(gd,{slug:s},o))}))})};const Wm=({styling:e={},progress:t=0,text:n=!1,className:r=""})=>{const a=se.useIntl(),{showText:i=!1,layout:s="bar",size:o="default",color:l="default"}=e,u=t>75?100:t>50?75:t>25?50:t>5?25:0,d={"--progress":`${t}%`};return c.jsx("span",{className:Z(`progress-bar section-${u}`,s,r,{[o]:o!=="default",[l!=="default"?l:""]:l!=="default"}),style:d,children:y.createElement(i?"span":Re,{className:i?"text":"",children:n||a.formatMessage({id:"progressBar"},{number:t})})})},ao=y.memo(Wm);const xi="loadingBlock_",Hm=({progress:e=0,steps:t=!1,className:n=""})=>{const r=se.useIntl();t||(t={0:{text:r.formatMessage({id:`${xi}loading`})},75:{text:r.formatMessage({id:`${xi}almostDone`})},100:{text:r.formatMessage({id:`${xi}complete`})}});let a=null;const i=Object.keys(t);for(let o=0;o<i.length&&!(e<parseInt(i[o]));o++)a=i[o];const s=a&&t[a].icon?{"--icon":`url(${Ht}icons/${t[a].icon}.svg)`}:{};return c.jsxs(Tt,{className:Z("loading-block",n,{"has-icon":a&&t[a].icon}),variant:"subtle",style:s,children:[a&&c.jsx("span",{className:"step",children:t[a].text}),c.jsx(ao,{progress:e})]})},Vm=y.memo(Hm);const jt=({element:e="div",className:t="",...n})=>c.jsx(Xa,{element:e,className:Z("loading-placeholder",t),...n});const Cs={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],heading:["title"],cards:["card","card","card","card"],carousel:["cards","controls"],"carousel-with-title":["title","cards","controls"],answers:["text","text","text"],"text-page":["title","text","text","text","text","subtitle","text","text","text","text","subtitle","text","text","text","text"],"form-with-answers":["question","subtitle","form","answers","answers","answers","answers","answers"],"general-website-page":["banner","text-page"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"],member:["profile-picture","text","text"],"course-navigation":["button","button"],"course-lesson-page":["breadcrumb","course-navigation","text-page"],"course-lesson-quiz":["text-page","quiz-box"]},bd=(e,t)=>e in Cs?c.jsx("div",{className:e,children:Cs[e].map((n,r)=>bd(n,r))},t):c.jsx(jt,{className:e},t),ri=({layout:e="overview-page",...t})=>c.jsx("div",{className:Z("loading-state",e),...t,children:Cs[e].map((n,r)=>bd(n,r))}),yd=e=>{const t=e&&e.toUpperCase().trim().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},Xr=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Km=e=>{const t=Math.ceil(26/Xr.length),n=yd(e).toLowerCase();if(n==="")return Xr[0];const r=n.charCodeAt(0)-96;for(let a=0;a<Xr.length;a++)if(r<=t*(a+1))return Xr[a]};const fu=256,vn=({className:e="",src:t="",name:n,alt:r,width:a=fu,height:i=fu,showInitials:s=!0,...o})=>{const[l,u]=y.useState(!1),d=y.useRef(null),h=r??n;y.useEffect(()=>{const p=d.current;if(!p)return;const g=p.getContext("2d");if(!g)return;const f=a,v=i;typeof window<"u"&&window.devicePixelRatio&&(p.width=f*window.devicePixelRatio,p.height=v*window.devicePixelRatio,g.scale(window.devicePixelRatio,window.devicePixelRatio)),g.fillStyle=Km(n),g.fillRect(0,0,f,v),g.font=`${f/3}px Arial`,g.textAlign="center",g.fillStyle="white",g.fillText(yd(n),f/2,v/1.6)},[n]);let m=!1;return t&&t!==""&&!l&&(t.includes("http")||t.includes("//"))&&(m=!0),c.jsx("figure",{className:Z("profile-picture",e,{error:l}),...o,children:m?c.jsx("img",{src:t,alt:h,onError:()=>{u(!0)},width:a,height:i}):s?c.jsx("canvas",{ref:d}):c.jsx("span",{className:"fallback"})})};var rt=(e=>(e.DISCUSSION_FORM_SUBMITTED="discussionFormSubmitted",e.DISCUSSION_POST_ADDED="discussionPostAdded",e.DISCUSSION_POST_CLICKED="discussionPostClicked",e.MEMBER_CLICKED="memberClicked",e))(rt||{});const ai=e=>e==="apolitical"?{image:`${Ht}logos/member_apolitical.svg`}:e==="community"||e==="deleted"||typeof e=="object"&&!e.name?{image:`${Ht}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail,badges:e.badges},Zm=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const a=e!=="",i=t!=="",s=n!=="";if(!a&&!i&&!s)return"";const o=`${e}${a&&i?` — ${t}`:t}`;let l=`${o}${(a||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=o),l.length>r&&(l=nr(l,r)),l};const Ym=y.lazy(()=>Promise.resolve().then(()=>_m)),Gm=y.lazy(()=>Promise.resolve().then(()=>c_));let ea=null;const Jt=({element:e="div",member:t="community",alt:n="",additionalContent:r=!1,styling:a={},functions:i={},gtmContext:s="member",gtmType:o="member-click",className:l="",badges:u,...d})=>{const h=se.useIntl(),{profile:m,...p}=i,{size:g="medium",variant:f="inline",isCondensed:v=!0,additionalContentNewLine:b=!1}=a,E=y.useContext(ct),k=m&&E&&typeof E.id=="string",[T,D]=y.useState(!1),w=ai(t);w.name||(w.name=h.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:S,image:z}=w;let{url:N}=w;typeof t=="object"&&t.link!==void 0&&(t.link===!1?N=void 0:N=t.link);const q=Zm(w),$=r&&r.createdAt?bs(r.createdAt):!1,F=r&&r.createdAt?Xs(r.createdAt):"";return y.createElement(e,{...d,className:Z("member text-medium",g,f,l,{"has-profile-link":k}),...p,children:c.jsxs(c.Fragment,{children:[c.jsxs(pn,{href:N,gtmType:o,gtmContext:s,onClick:_=>{if(_==null||_.preventDefault(),_==null||_.stopPropagation(),!N)return;ea&&clearTimeout(ea),ea=setTimeout(()=>{window.location.href=N},150);const P=new CustomEvent(rt.MEMBER_CLICKED,{detail:{link:N,timeout:ea}});document.dispatchEvent(P)},children:[c.jsx(vn,{name:S,src:z,alt:n}),c.jsxs("div",{className:"details",children:[c.jsxs("div",{className:Z("name",{"new-line":b}),"data-testid":"member-name",children:[c.jsx("span",{children:S}),(u==null?void 0:u.showBadges)&&(w==null?void 0:w.badges)&&c.jsx(vd,{userBadges:w.badges,badgeOptions:u}),r&&c.jsxs("span",{className:Z("additional-content",{"new-line":b}),children:[r.createdAt&&$&&c.jsx("span",{className:"date",title:F,"aria-label":F,"data-testid":"date",children:h.formatMessage({id:`dates_${$.path}`},{number:$.number})}),r.customMessage&&c.jsx("span",{children:r.customMessage}),r.didEdit&&c.jsx("em",{children:h.formatMessage({id:"discussion_edited"})})]})]}),q&&!b&&c.jsx("small",{className:Z({"text-medium":g==="large"}),"data-testid":"member-details",children:v?q:c.jsxs(c.Fragment,{children:[w.role,w.organisation?` — ${w.organisation}`:c.jsx(c.Fragment,{}),c.jsx("span",{className:"location",children:w.country})]})})]})]}),q&&m&&k?c.jsxs(c.Fragment,{children:[c.jsx(ke,{variant:"tertiary",size:"small",onClick:_=>{_.preventDefault(),_.stopPropagation(),D(!0)},"data-testid":"profile-button",children:h.formatMessage({id:"member_profile"})}),c.jsx(Ym,{children:c.jsx(Gm,{form:m,showModal:T,content:{title:h.formatMessage({id:"member_profile"})},functions:{onClose:()=>{D(!1)}},className:"in-portal"})})]}):c.jsx(c.Fragment,{})]})})},Qm=Object.freeze(Object.defineProperty({__proto__:null,default:Jt},Symbol.toStringTag,{value:"Module"}));const hu={small:24,medium:48},io=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:a,showGap:i,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,multipleText:l,className:u="",...d})=>{const h=se.useIntl();return!n||n.length===0?null:y.createElement(e,{...d,className:Z("contributors",u,a,{"has-gap":i}),children:c.jsxs(c.Fragment,{children:[c.jsx("ul",{children:n.map((m,p)=>{let g,f="";if(p<o){const{name:v="",image:b=""}=ai(m);if(s)return c.jsx(jt,{element:"li",className:"contributor"},p);g=c.jsx(vn,{name:v,src:b,width:hu[a||"medium"],height:hu[a||"medium"]})}else if(p===o){const v=(t||n.length)-o;g=c.jsxs("small",{className:Z({"large-number":v>99}),children:["+",ym(v,0)]}),f="number-left"}return g?c.jsx("li",{className:Z("contributor",f),children:g},p):null})}),r&&c.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?h.formatMessage({id:`member_${n[0]}`}):nr(n[0].name||"",20):l||null})]})})};const so=({element:e="section",children:t,className:n,...r})=>y.createElement(e,{className:Z("modal",n),children:typeof t=="string"?c.jsx("p",{children:t}):t,...r});var ws={exports:{}},ta={exports:{}},Me={};/** @license React v16.13.1
38
38
  * react-is.production.min.js
39
39
  *
40
40
  * Copyright (c) Facebook, Inc. and its affiliates.