@apolitical/component-library 1.13.4-beta.3 → 1.13.4-beta.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.
- package/index.js +9 -9
- package/index.mjs +214 -184
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var
|
|
5
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var u=typeof c;if(u==="string"||u==="number")r.push(c);else if(Array.isArray(c)){if(c.length){var o=n.apply(null,c);o&&r.push(o)}}else if(u==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){r.push(c.toString());continue}for(var a in c)t.call(c,a)&&c[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(fn);var Ss=fn.exports;const T=ys(Ss),Es=({element:e="span",showOnFocus:t=!0,children:n,...r})=>g.createElement(e,{...r,className:T("hidden",{"show-on-focus":t}),children:n}),ne=g.memo(Es),Ts=({element:e="span",children:t=null,...n})=>g.createElement(e,{...n,"aria-hidden":!0},t),Mt=g.memo(Ts);var St={exports:{}},Me={};/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.min.js
|
|
8
8
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/var en;function $s(){if(en)return Me;en=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
13
|
+
*/var en;function $s(){if(en)return Me;en=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(o,a,d){var l,f={},h=null,p=null;d!==void 0&&(h=""+d),a.key!==void 0&&(h=""+a.key),a.ref!==void 0&&(p=a.ref);for(l in a)r.call(a,l)&&!c.hasOwnProperty(l)&&(f[l]=a[l]);if(o&&o.defaultProps)for(l in a=o.defaultProps,a)f[l]===void 0&&(f[l]=a[l]);return{$$typeof:t,type:o,key:h,ref:p,props:f,_owner:i.current}}return Me.Fragment=n,Me.jsx=u,Me.jsxs=u,Me}var Ce={};/**
|
|
14
14
|
* @license React
|
|
15
15
|
* react-jsx-runtime.development.js
|
|
16
16
|
*
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/var tn;function Ms(){return tn||(tn=1,process.env.NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),
|
|
22
|
-
`+le+m}}var he=!1,pe;{var Oe=typeof WeakMap=="function"?WeakMap:Map;pe=new Oe}function Te(m,w){if(!m||he)return"";{var S=pe.get(m);if(S!==void 0)return S}var M;he=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var U;U=Z.current,Z.current=null,ee();try{if(w){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(ge){M=ge}Reflect.construct(m,[],N)}else{try{N.call()}catch(ge){M=ge}m.call(N.prototype)}}else{try{throw Error()}catch(ge){M=ge}m()}}catch(ge){if(ge&&M&&typeof ge.stack=="string"){for(var
|
|
21
|
+
*/var tn;function Ms(){return tn||(tn=1,process.env.NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),x=Symbol.iterator,y="@@iterator";function _(m){if(m===null||typeof m!="object")return null;var w=x&&m[x]||m[y];return typeof w=="function"?w:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(m){{for(var w=arguments.length,S=new Array(w>1?w-1:0),M=1;M<w;M++)S[M-1]=arguments[M];$("error",m,S)}}function $(m,w,S){{var M=E.ReactDebugCurrentFrame,L=M.getStackAddendum();L!==""&&(w+="%s",S=S.concat([L]));var U=S.map(function(N){return String(N)});U.unshift("Warning: "+w),Function.prototype.apply.call(console[m],console,U)}}var R=!1,D=!1,B=!1,V=!1,b=!1,v;v=Symbol.for("react.module.reference");function H(m){return!!(typeof m=="string"||typeof m=="function"||m===r||m===c||b||m===i||m===d||m===l||V||m===p||R||D||B||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===u||m.$$typeof===o||m.$$typeof===a||m.$$typeof===v||m.getModuleId!==void 0))}function k(m,w,S){var M=m.displayName;if(M)return M;var L=w.displayName||w.name||"";return L!==""?S+"("+L+")":S}function Y(m){return m.displayName||"Context"}function P(m){if(m==null)return null;if(typeof m.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case r:return"Fragment";case n:return"Portal";case c:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case l:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case o:var w=m;return Y(w)+".Consumer";case u:var S=m;return Y(S._context)+".Provider";case a:return k(m,m.render,"ForwardRef");case f:var M=m.displayName||null;return M!==null?M:P(m.type)||"Memo";case h:{var L=m,U=L._payload,N=L._init;try{return P(N(U))}catch{return null}}}return null}var I=Object.assign,Q=0,W,X,se,re,oe,ae,te;function A(){}A.__reactDisabledLog=!0;function ee(){{if(Q===0){W=console.log,X=console.info,se=console.warn,re=console.error,oe=console.group,ae=console.groupCollapsed,te=console.groupEnd;var m={configurable:!0,enumerable:!0,value:A,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}Q++}}function G(){{if(Q--,Q===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},m,{value:W}),info:I({},m,{value:X}),warn:I({},m,{value:se}),error:I({},m,{value:re}),group:I({},m,{value:oe}),groupCollapsed:I({},m,{value:ae}),groupEnd:I({},m,{value:te})})}Q<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=E.ReactCurrentDispatcher,le;function ue(m,w,S){{if(le===void 0)try{throw Error()}catch(L){var M=L.stack.trim().match(/\n( *(at )?)/);le=M&&M[1]||""}return`
|
|
22
|
+
`+le+m}}var he=!1,pe;{var Oe=typeof WeakMap=="function"?WeakMap:Map;pe=new Oe}function Te(m,w){if(!m||he)return"";{var S=pe.get(m);if(S!==void 0)return S}var M;he=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var U;U=Z.current,Z.current=null,ee();try{if(w){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(ge){M=ge}Reflect.construct(m,[],N)}else{try{N.call()}catch(ge){M=ge}m.call(N.prototype)}}else{try{throw Error()}catch(ge){M=ge}m()}}catch(ge){if(ge&&M&&typeof ge.stack=="string"){for(var F=ge.stack.split(`
|
|
23
23
|
`),ie=M.stack.split(`
|
|
24
|
-
`),q=
|
|
25
|
-
`+
|
|
24
|
+
`),q=F.length-1,K=ie.length-1;q>=1&&K>=0&&F[q]!==ie[K];)K--;for(;q>=1&&K>=0;q--,K--)if(F[q]!==ie[K]){if(q!==1||K!==1)do if(q--,K--,K<0||F[q]!==ie[K]){var de=`
|
|
25
|
+
`+F[q].replace(" at new "," at ");return m.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",m.displayName)),typeof m=="function"&&pe.set(m,de),de}while(q>=1&&K>=0);break}}}finally{he=!1,Z.current=U,G(),Error.prepareStackTrace=L}var ye=m?m.displayName||m.name:"",Kt=ye?ue(ye):"";return typeof m=="function"&&pe.set(m,Kt),Kt}function Jn(m,w,S){return Te(m,!1)}function Xn(m){var w=m.prototype;return!!(w&&w.isReactComponent)}function He(m,w,S){if(m==null)return"";if(typeof m=="function")return Te(m,Xn(m));if(typeof m=="string")return ue(m);switch(m){case d:return ue("Suspense");case l:return ue("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case a:return Jn(m.render);case f:return He(m.type,w,S);case h:{var M=m,L=M._payload,U=M._init;try{return He(U(L),w,S)}catch{}}}return""}var Qe=Object.prototype.hasOwnProperty,Ht={},Qt=E.ReactDebugCurrentFrame;function Ue(m){if(m){var w=m._owner,S=He(m.type,m._source,w?w.type:null);Qt.setExtraStackFrame(S)}else Qt.setExtraStackFrame(null)}function Zn(m,w,S,M,L){{var U=Function.call.bind(Qe);for(var N in m)if(U(m,N)){var F=void 0;try{if(typeof m[N]!="function"){var ie=Error((M||"React class")+": "+S+" type `"+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[N]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ie.name="Invariant Violation",ie}F=m[N](w,N,M,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){F=q}F&&!(F instanceof Error)&&(Ue(L),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",M||"React class",S,N,typeof F),Ue(null)),F instanceof Error&&!(F.message in Ht)&&(Ht[F.message]=!0,Ue(L),j("Failed %s type: %s",S,F.message),Ue(null))}}}var qn=Array.isArray;function at(m){return qn(m)}function Kn(m){{var w=typeof Symbol=="function"&&Symbol.toStringTag,S=w&&m[Symbol.toStringTag]||m.constructor.name||"Object";return S}}function es(m){try{return Ut(m),!1}catch{return!0}}function Ut(m){return""+m}function Wt(m){if(es(m))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Kn(m)),Ut(m)}var $e=E.ReactCurrentOwner,ts={key:!0,ref:!0,__self:!0,__source:!0},zt,Vt,it;it={};function ns(m){if(Qe.call(m,"ref")){var w=Object.getOwnPropertyDescriptor(m,"ref").get;if(w&&w.isReactWarning)return!1}return m.ref!==void 0}function ss(m){if(Qe.call(m,"key")){var w=Object.getOwnPropertyDescriptor(m,"key").get;if(w&&w.isReactWarning)return!1}return m.key!==void 0}function rs(m,w){if(typeof m.ref=="string"&&$e.current&&w&&$e.current.stateNode!==w){var S=P($e.current.type);it[S]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P($e.current.type),m.ref),it[S]=!0)}}function os(m,w){{var S=function(){zt||(zt=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};S.isReactWarning=!0,Object.defineProperty(m,"key",{get:S,configurable:!0})}}function as(m,w){{var S=function(){Vt||(Vt=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};S.isReactWarning=!0,Object.defineProperty(m,"ref",{get:S,configurable:!0})}}var is=function(m,w,S,M,L,U,N){var F={$$typeof:t,type:m,key:w,ref:S,props:N,_owner:U};return F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(F,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M}),Object.defineProperty(F,"_source",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F};function ls(m,w,S,M,L){{var U,N={},F=null,ie=null;S!==void 0&&(Wt(S),F=""+S),ss(w)&&(Wt(w.key),F=""+w.key),ns(w)&&(ie=w.ref,rs(w,L));for(U in w)Qe.call(w,U)&&!ts.hasOwnProperty(U)&&(N[U]=w[U]);if(m&&m.defaultProps){var q=m.defaultProps;for(U in q)N[U]===void 0&&(N[U]=q[U])}if(F||ie){var K=typeof m=="function"?m.displayName||m.name||"Unknown":m;F&&os(N,K),ie&&as(N,K)}return is(m,F,ie,L,M,$e.current,N)}}var lt=E.ReactCurrentOwner,Yt=E.ReactDebugCurrentFrame;function je(m){if(m){var w=m._owner,S=He(m.type,m._source,w?w.type:null);Yt.setExtraStackFrame(S)}else Yt.setExtraStackFrame(null)}var ct;ct=!1;function ut(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}function Gt(){{if(lt.current){var m=P(lt.current.type);if(m)return`
|
|
26
26
|
|
|
27
27
|
Check the render method of \``+m+"`."}return""}}function cs(m){{if(m!==void 0){var w=m.fileName.replace(/^.*[\\\/]/,""),S=m.lineNumber;return`
|
|
28
28
|
|
|
29
29
|
Check your code at `+w+":"+S+"."}return""}}var Jt={};function us(m){{var w=Gt();if(!w){var S=typeof m=="string"?m:m.displayName||m.name;S&&(w=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+S+">.")}return w}}function Xt(m,w){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var S=us(w);if(Jt[S])return;Jt[S]=!0;var M="";m&&m._owner&&m._owner!==lt.current&&(M=" It was passed a child from "+P(m._owner.type)+"."),je(m),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,M),je(null)}}function Zt(m,w){{if(typeof m!="object")return;if(at(m))for(var S=0;S<m.length;S++){var M=m[S];ut(M)&&Xt(M,w)}else if(ut(m))m._store&&(m._store.validated=!0);else if(m){var L=_(m);if(typeof L=="function"&&L!==m.entries)for(var U=L.call(m),N;!(N=U.next()).done;)ut(N.value)&&Xt(N.value,w)}}}function ds(m){{var w=m.type;if(w==null||typeof w=="string")return;var S;if(typeof w=="function")S=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===a||w.$$typeof===f))S=w.propTypes;else return;if(S){var M=P(w);Zn(S,m.props,"prop",M,m)}else if(w.PropTypes!==void 0&&!ct){ct=!0;var L=P(w);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ms(m){{for(var w=Object.keys(m.props),S=0;S<w.length;S++){var M=w[S];if(M!=="children"&&M!=="key"){je(m),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),je(null);break}}m.ref!==null&&(je(m),j("Invalid attribute `ref` supplied to `React.Fragment`."),je(null))}}function qt(m,w,S,M,L,U){{var N=H(m);if(!N){var
|
|
31
|
+
Check the top-level render call using <`+S+">.")}return w}}function Xt(m,w){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var S=us(w);if(Jt[S])return;Jt[S]=!0;var M="";m&&m._owner&&m._owner!==lt.current&&(M=" It was passed a child from "+P(m._owner.type)+"."),je(m),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,M),je(null)}}function Zt(m,w){{if(typeof m!="object")return;if(at(m))for(var S=0;S<m.length;S++){var M=m[S];ut(M)&&Xt(M,w)}else if(ut(m))m._store&&(m._store.validated=!0);else if(m){var L=_(m);if(typeof L=="function"&&L!==m.entries)for(var U=L.call(m),N;!(N=U.next()).done;)ut(N.value)&&Xt(N.value,w)}}}function ds(m){{var w=m.type;if(w==null||typeof w=="string")return;var S;if(typeof w=="function")S=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===a||w.$$typeof===f))S=w.propTypes;else return;if(S){var M=P(w);Zn(S,m.props,"prop",M,m)}else if(w.PropTypes!==void 0&&!ct){ct=!0;var L=P(w);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ms(m){{for(var w=Object.keys(m.props),S=0;S<w.length;S++){var M=w[S];if(M!=="children"&&M!=="key"){je(m),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M),je(null);break}}m.ref!==null&&(je(m),j("Invalid attribute `ref` supplied to `React.Fragment`."),je(null))}}function qt(m,w,S,M,L,U){{var N=H(m);if(!N){var F="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(F+=" 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 ie=cs(L);ie?F+=ie:F+=Gt();var q;m===null?q="null":at(m)?q="array":m!==void 0&&m.$$typeof===t?(q="<"+(P(m.type)||"Unknown")+" />",F=" Did you accidentally export a JSX literal instead of a component?"):q=typeof m,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,F)}var K=ls(m,w,S,L,U);if(K==null)return K;if(N){var de=w.children;if(de!==void 0)if(M)if(at(de)){for(var ye=0;ye<de.length;ye++)Zt(de[ye],m);Object.freeze&&Object.freeze(de)}else j("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 Zt(de,m)}return m===r?ms(K):ds(K),K}}function fs(m,w,S){return qt(m,w,S,!0)}function hs(m,w,S){return qt(m,w,S,!1)}var ps=hs,gs=fs;Ce.Fragment=r,Ce.jsx=ps,Ce.jsxs=gs}()),Ce}process.env.NODE_ENV==="production"?St.exports=$s():St.exports=Ms();var s=St.exports;const hn=()=>{const[e,t]=g.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return g.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},we=(e,t)=>{const n=g.useRef(!1);g.useEffect(()=>{n.current?e():n.current=!0},t)};function Cs(e,t,n){var r=this,i=g.useRef(null),c=g.useRef(0),u=g.useRef(null),o=g.useRef([]),a=g.useRef(),d=g.useRef(),l=g.useRef(e),f=g.useRef(!0);g.useEffect(function(){l.current=e},[e]);var h=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,x=!("trailing"in n)||!!n.trailing,y="maxWait"in n,_=y?Math.max(+n.maxWait||0,t):null;g.useEffect(function(){return f.current=!0,function(){f.current=!1}},[]);var E=g.useMemo(function(){var j=function(b){var v=o.current,H=a.current;return o.current=a.current=null,c.current=b,d.current=l.current.apply(H,v)},$=function(b,v){h&&cancelAnimationFrame(u.current),u.current=h?requestAnimationFrame(b):setTimeout(b,v)},R=function(b){if(!f.current)return!1;var v=b-i.current;return!i.current||v>=t||v<0||y&&b-c.current>=_},D=function(b){return u.current=null,x&&o.current?j(b):(o.current=a.current=null,d.current)},B=function b(){var v=Date.now();if(R(v))return D(v);if(f.current){var H=t-(v-i.current),k=y?Math.min(H,_-(v-c.current)):H;$(b,k)}},V=function(){var b=Date.now(),v=R(b);if(o.current=[].slice.call(arguments),a.current=r,i.current=b,v){if(!u.current&&f.current)return c.current=i.current,$(B,t),p?j(i.current):d.current;if(y)return $(B,t),j(i.current)}return u.current||$(B,t),d.current};return V.cancel=function(){u.current&&(h?cancelAnimationFrame(u.current):clearTimeout(u.current)),c.current=0,o.current=i.current=a.current=u.current=null},V.isPending=function(){return!!u.current},V.flush=function(){return u.current?D(Date.now()):d.current},V},[p,y,t,_,x,h]);return E}function pn(e,t,n){var r=n===void 0?{}:n,i=r.leading,c=r.trailing;return Cs(e,t,{maxWait:t,leading:i===void 0||i,trailing:c===void 0||c})}let dt;const Ae=(e=!0,t=!1)=>{if(!e)return;const[n,r]=g.useState(0)||[!1,()=>{}];g.useEffect(()=>(c(),window.addEventListener("resize",u),()=>{clearTimeout(dt),u.flush(),window.removeEventListener("resize",u)}),[]);const i=()=>window.innerWidth,c=()=>{r(i())},u=pn(()=>{i()!==n&&(t&&(clearTimeout(dt),document.body.classList.add("is-resizing"),dt=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),c())},500,{leading:!0});return n},gn=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[i,c]=g.useState({current:0,past:0})||[!1,()=>{}],[u,o]=g.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];g.useEffect(()=>(a(),window.addEventListener("scroll",d),()=>{d.flush(),window.removeEventListener("scroll",d)}),[]);const a=()=>{const l=window.scrollY,f=i.current,h=l-f,p=h>0?"down":"up";if(c({current:l,past:f}),p==="down"){l>=e+t.down&&!u.scrollDown&&(!u.scrollUp||h>t.up)&&(n(),o({scrollUp:!1,scrollDown:!0}));return}Math.abs(h)>=t.up&&!u.scrollUp&&(r(),o({scrollUp:!0,scrollDown:!1}))},d=pn(()=>{a()},250);return i},Rs=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=g.useRef(!1);we(()=>{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)},Ds=(e,t)=>{Array.isArray(t)||(t=[t]);const n=_s(e);return t.forEach(({type:r,value:i})=>{xs(n,r,i)}),n},_n=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},xn=(e,t,n)=>{let r=n.mobile;for(const i in t){const c=parseInt(String(t[i]));if(e>=c)r=n[c];else if(e<c)break}return r},Fs=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),As=e=>{let c;try{c=new Date().getTime()-new Date(e).getTime()}catch{return""}const u=c/36e5,o=Math.floor(c/864e5);if(o<1)return u<1?{path:"now"}:{path:"hours",number:Math.floor(u)};if(o<7)return{path:"days",number:o};const a=Math.floor(o/7);return a<=52?{path:"weeks",number:a}:{path:"years",number:Math.floor(o/365)}},Ns=e=>new Promise(t=>setTimeout(t,e)),Ct={apolitical:"Apolitical",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",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_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",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",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",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",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
|
-
Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"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:"Write something...",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_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",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_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",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.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",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_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_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",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",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_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",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_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 and data",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",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",inviteModal_title:"You’re registered",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 emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",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.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",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",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",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",progressBar:"{number}% loaded",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!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",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>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},Ps={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>"},Is={collapsibleSection_summary:"En savoir plus",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>"},Ls={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>"},Bs=Object.freeze(Object.defineProperty({__proto__:null,en:Ct,es:Ps,fr:Is,pt:Ls},Symbol.toStringTag,{value:"Module"})),me=(e,t,n,r,i={})=>{let l="";return`${t}_${n}`in Ct?l=e({id:`${t}_${n}`},i):l=e({id:t},{[r]:n,...i}),l},Os=(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 i=n.length-1;i>=0;i--){const l=Math.pow(10,(i+1)*3);if(l<=e){e=Math.round(e*t/l)/t,e===1e3&&i<n.length-1&&(e=1,i++),r=`${e}${n[i]}`;break}}return r},bn=(e,t)=>g.Children.map(e,n=>g.cloneElement(n,{...t})),Hs=e=>e.replace(/\s+/g,"").length>0,z=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:i=!1,element:l="button",onClick:u=!1,className:o="",disabled:a=!1,screenreaderText:d=!1,children:c=!1,...f})=>{const p=Fe(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const _=Object.assign({},t),T=_n(Object.keys(_));t=xn(p,T,_)}const x=[];typeof t=="string"&&x.push(t),r&&(x.push("icon"),typeof r=="object"?(x.push(r.icon),r.position?x.push(r.position):x.push("left"),r.hover&&x.push(`hover_${r.hover}`),r.animate&&(x.push("animate"),typeof r.animate=="string"&&x.push(r.animate))):(x.push(r),!r.includes("right")&&!r.includes("left")&&x.push("left"))),n.muted&&x.push("muted"),n.fullWidth&&x.push("full-width");const y={...f,className:E(e,o,x,{"no-text":!c,disabled:a,button:i}),onClick:_=>{(!i||i[0]==="#")&&u&&(_.preventDefault(),_.stopPropagation()),u&&u(_)},disabled:typeof a=="object"&&"isClickable"in a?!a.isClickable:a};return i&&(l="a",y.href=i),g.createElement(l,y,c||(d?s.jsx(ne,{showOnFocus:!1,children:d}):null))},Ne=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",i=e.map((l,u)=>r==="p"?s.jsx(z,{...l},u):s.jsx("li",{children:s.jsx(z,{...l})},u));return g.createElement(r,{className:E("button-wrapper",t),...n,children:i})};const ke=({className:e="",maxWidth:t=!1})=>{const n=t?{"--max-width":`${t/16}rem`}:{};return s.jsx("hr",{className:E(e,{"has-max-width":t}),style:n})},Pe=({href:e,children:t,fallbackElement:n,className:r="",onClick:i,gtmContext:l,gtmType:u,...o})=>{if(e){const a={...o};return i&&(a.onClick=i),l&&(a["data-gtm-event-context"]=l),u&&(a["data-gtm-event-type"]=u),s.jsx("a",{href:e,className:E("gtm-trackable",r),...a,children:t})}return n?g.createElement(n,{children:t,className:r,...o}):t},nn={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"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Qs=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:i}=e?nn[e]:nn.fallback;return{range:t&&t.length>0?t:r,sizes:n||i}},Us=({format:e,height:t,query:n,width:r})=>{let i=`w=${r}&h=${t}`;return i=e?`${i}&fm=${e}`:i,i=n?`${i}&${n}`:i,i},mt=({format:e,range:t,url:n,query:r})=>t.map(({height:i,width:l})=>`${n}?${Us({format:e,height:i,query:r,width:l})} ${l}w`).join(", ");const vn=({image:e,className:t,testId:n})=>{const{description:r,height:i,type:l,query:u,url:o,width:a,loading:d,decoding:c,fetchPriority:f}=e,{range:h,sizes:p}=Qs(e),x=mt({format:"avif",query:u,range:h,url:o}),y=mt({format:"webp",query:u,range:h,url:o}),_=mt({format:"",query:u,range:h,url:o});return s.jsxs("picture",{className:t,children:[l!=="image/gif"&&s.jsx("source",{type:"image/avif",srcSet:x,sizes:p,"data-testid":"source"}),s.jsx("source",{type:"image/webp",srcSet:y,sizes:p,"data-testid":"source"}),s.jsx("img",{srcSet:_,sizes:p,src:o,alt:r,loading:d||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:a,height:i,"data-testid":n||"image"})]})};let Re=!1;const wn=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const r=C.useIntl(),i=g.useRef(null),[l,u]=g.useState("hidden");g.useEffect(()=>{const a=i.current;if(a)return a.addEventListener("transitionend",o),()=>{a.removeEventListener("transitionend",o)}},[]);const o=({propertyName:a})=>{a==="opacity"&&(Re!==!1&&clearTimeout(Re),u(d=>d==="opening"?"open":d==="closing"?"closed":d==="closed"?"hidden":d))};return we(()=>{Re!==!1&&clearTimeout(Re);let a="open";e?u("opening"):(u("closing"),a="hidden"),Re=setTimeout(()=>{u(a)},300)},[e]),s.jsx("aside",{ref:i,className:E("tooltip text-medium",l,{loading:t}),hidden:l==="hidden",children:t?s.jsx("p",{children:r.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?s.jsx("p",{children:n}):n})};const Rt=({children:e,className:t="",...n})=>s.jsx("section",{className:E("full-width-section",t),...n,children:e});const Ws=({text:e,buttons:t,className:n=""})=>{const r=[];return t.forEach(i=>{r.push({href:i.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":i.eventContext||"Download",target:"_blank",children:i.text})}),s.jsx(Rt,{className:E("download-section",n),children:s.jsxs(s.Fragment,{children:[g.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),s.jsx(Ne,{buttons:r})]})})};const zs=({title:e=!1,logos:t=[],className:n=""})=>{const r=t.length;if(r===0)return null;const i={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return s.jsxs("div",{className:E("logos",n),children:[e&&g.createElement(i.element,{className:"title"},i.text),s.jsx("ul",{className:E({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:l,nameOfBusiness:u,link:o=!1,description:a=!1},d)=>{if(!l||!l.url)return null;const c=s.jsx("img",{src:l.url,width:l.width||"auto",height:l.height||"auto",alt:u});return s.jsxs("li",{children:[s.jsx("p",{className:"img-wrapper",children:o?s.jsx("a",{href:o,target:"_blank",rel:"nofollow noreferrer noopener",children:c}):c}),a&&s.jsx("small",{children:a})]},window.btoa(`${l.url}_${d}`))})})]})};const Vs=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Ys=({className:e="",content:t,image:n,variant:r="default",spacing:i="normal",cta:l,children:u})=>{const o=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},d={};return o.forEach(c=>{if(!t[c]){d[c]=!1;return}if(typeof t[c]=="object"){d[c]=t[c];const{text:f,element:h}=t[c];if(h&&Vs.includes(h.toLowerCase()))return;d[c]={text:f,element:a[c]};return}d[c]={text:t[c],element:a[c]}}),l&&l.link&&l.link[0]==="#"&&(l.props||(l.props={}),l.props.onClick=c=>{c.preventDefault(),c.stopPropagation();const f=document.getElementById(l.link.substring(1));f&&f.scrollIntoView({behavior:"smooth"})}),s.jsx(Rt,{className:E("banner-section",r,i,e,{"has-image":n,"has-extra-spacing":i==="normal"&&d.eyebrow&&d.title}),children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"content-wrapper",children:[o.map(c=>{if(d[c]&&typeof d[c]=="object"){const{text:f,element:h=""}=d[c];return g.createElement(h.toLowerCase(),{key:c,className:c},f)}return null}),u,l&&l.text&&l.link&&s.jsx(z,{variant:n||r==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:l.link,...l.props,children:l.text})]}),n&&s.jsx(vn,{image:{...n,aspect:"banner"}})]})})},Gs=g.memo(Ys);const Js=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:i})=>!n&&!r?null:s.jsxs("aside",{className:E("marketing-block",e),children:[n&&s.jsx("p",{className:"title",children:n}),r&&s.jsx("p",{children:r}),t&&s.jsx(z,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Ze="https://storage.googleapis.com/apolitical-assets/",Se={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},Xs="200,000+";const At=({label:e=!1,className:t="",children:n})=>{const r=C.useIntl();return s.jsxs("details",{className:E("collapsible-section",t),children:[s.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),s.jsx("div",{className:"content",children:n})]})};const be=({variant:e="primary",className:t="",children:n,...r})=>s.jsx("div",{className:E("highlighted-text-box",e,t),...r,children:n});const Ie=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let i=n&&!!Object.keys(n).length;const l=typeof n=="object"&&"breakpoints"in n,u=Fe(l);if(l&&typeof n=="object"&&typeof u=="number"){const f=Object.assign({},n.breakpoints),h=_n(Object.keys(f));i=xn(u,h,f)}const{breakpoints:o,text:a="",component:d,...c}=n;return s.jsx(be,{variant:"subtle",className:E("empty-state-box",e,r),children:s.jsxs(s.Fragment,{children:[t&&s.jsx(nt,{options:{forceBlock:!0},children:t}),i&&typeof n=="object"&&(d||s.jsx(z,{...c,variant:n.variant?n.variant:"secondary",children:a}))]})})};const Et=({children:e,...t})=>s.jsx("p",{...t,children:e}),kn={q:Et,blockquote:Et};for(let e=1;e<=6;e++)kn[`h${e}`]={component:Et,props:{className:"title"}};const jn=({type:e="default",className:t="",heading:n=!1,children:r})=>s.jsxs("div",{className:E("helper-text-box text-small",e,t),children:[n&&s.jsx("p",{className:"title",children:n}),typeof r=="string"?s.jsx(nt,{options:{wrapper:g.Fragment,forceBlock:!0,overrides:kn},children:r}):s.jsx("p",{children:r})]});const Zs=({className:e="",show:t=!1,hide:n=!1,text:r,children:i})=>{const l=C.useIntl(),u=g.useRef(null),[o,a]=g.useState(""),[d,c]=g.useState("closed");g.useEffect(()=>{const p=u.current;if(p)return p.addEventListener("transitionend",f),()=>{p.removeEventListener("transitionend",f)}},[]),g.useEffect(()=>{if(!r||typeof r!="string")return;const p=r.split(`
|
|
35
|
+
Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"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:"Write something...",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_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",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_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",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.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",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_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_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",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",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_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",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_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 and data",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",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",inviteModal_title:"You’re registered",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 emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",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.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",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",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",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",progressBar:"{number}% loaded",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!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",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>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},Ps={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>"},Is={collapsibleSection_summary:"En savoir plus",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>"},Ls={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>"},Bs=Object.freeze(Object.defineProperty({__proto__:null,en:Ct,es:Ps,fr:Is,pt:Ls},Symbol.toStringTag,{value:"Module"})),me=(e,t,n,r,i={})=>{let c="";return`${t}_${n}`in Ct?c=e({id:`${t}_${n}`},i):c=e({id:t},{[r]:n,...i}),c},Os=(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 i=n.length-1;i>=0;i--){const c=Math.pow(10,(i+1)*3);if(c<=e){e=Math.round(e*t/c)/t,e===1e3&&i<n.length-1&&(e=1,i++),r=`${e}${n[i]}`;break}}return r},bn=(e,t)=>g.Children.map(e,n=>g.cloneElement(n,{...t})),Hs=e=>e.replace(/\s+/g,"").length>0,z=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:i=!1,element:c="button",onClick:u=!1,className:o="",disabled:a=!1,screenreaderText:d=!1,children:l=!1,...f})=>{const p=Ae(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const _=Object.assign({},t),E=_n(Object.keys(_));t=xn(p,E,_)}const x=[];typeof t=="string"&&x.push(t),r&&(x.push("icon"),typeof r=="object"?(x.push(r.icon),r.position?x.push(r.position):x.push("left"),r.hover&&x.push(`hover_${r.hover}`),r.animate&&(x.push("animate"),typeof r.animate=="string"&&x.push(r.animate))):(x.push(r),!r.includes("right")&&!r.includes("left")&&x.push("left"))),n.muted&&x.push("muted"),n.fullWidth&&x.push("full-width");const y={...f,className:T(e,o,x,{"no-text":!l,disabled:a,button:i}),onClick:_=>{(!i||i[0]==="#")&&u&&(_.preventDefault(),_.stopPropagation()),u&&u(_)},disabled:typeof a=="object"&&"isClickable"in a?!a.isClickable:a};return i&&(c="a",y.href=i),g.createElement(c,y,l||(d?s.jsx(ne,{showOnFocus:!1,children:d}):null))},Ne=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",i=e.map((c,u)=>r==="p"?s.jsx(z,{...c},u):s.jsx("li",{children:s.jsx(z,{...c})},u));return g.createElement(r,{className:T("button-wrapper",t),...n,children:i})};const ke=({className:e="",maxWidth:t=!1})=>{const n=t?{"--max-width":`${t/16}rem`}:{};return s.jsx("hr",{className:T(e,{"has-max-width":t}),style:n})},Pe=({href:e,children:t,fallbackElement:n,className:r="",onClick:i,gtmContext:c,gtmType:u,...o})=>{if(e){const a={...o};return i&&(a.onClick=i),c&&(a["data-gtm-event-context"]=c),u&&(a["data-gtm-event-type"]=u),s.jsx("a",{href:e,className:T("gtm-trackable",r),...a,children:t})}return n?g.createElement(n,{children:t,className:r,...o}):t},nn={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"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Qs=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:i}=e?nn[e]:nn.fallback;return{range:t&&t.length>0?t:r,sizes:n||i}},Us=({format:e,height:t,query:n,width:r})=>{let i=`w=${r}&h=${t}`;return i=e?`${i}&fm=${e}`:i,i=n?`${i}&${n}`:i,i},mt=({format:e,range:t,url:n,query:r})=>t.map(({height:i,width:c})=>`${n}?${Us({format:e,height:i,query:r,width:c})} ${c}w`).join(", ");const vn=({image:e,className:t,testId:n})=>{const{description:r,height:i,type:c,query:u,url:o,width:a,loading:d,decoding:l,fetchPriority:f}=e,{range:h,sizes:p}=Qs(e),x=mt({format:"avif",query:u,range:h,url:o}),y=mt({format:"webp",query:u,range:h,url:o}),_=mt({format:"",query:u,range:h,url:o});return s.jsxs("picture",{className:t,children:[c!=="image/gif"&&s.jsx("source",{type:"image/avif",srcSet:x,sizes:p,"data-testid":"source"}),s.jsx("source",{type:"image/webp",srcSet:y,sizes:p,"data-testid":"source"}),s.jsx("img",{srcSet:_,sizes:p,src:o,alt:r,loading:d||"lazy",decoding:l||"async",fetchpriority:f||"auto",width:a,height:i,"data-testid":n||"image"})]})};let Re=!1;const wn=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const r=C.useIntl(),i=g.useRef(null),[c,u]=g.useState("hidden");g.useEffect(()=>{const a=i.current;if(a)return a.addEventListener("transitionend",o),()=>{a.removeEventListener("transitionend",o)}},[]);const o=({propertyName:a})=>{a==="opacity"&&(Re!==!1&&clearTimeout(Re),u(d=>d==="opening"?"open":d==="closing"?"closed":d==="closed"?"hidden":d))};return we(()=>{Re!==!1&&clearTimeout(Re);let a="open";e?u("opening"):(u("closing"),a="hidden"),Re=setTimeout(()=>{u(a)},300)},[e]),s.jsx("aside",{ref:i,className:T("tooltip text-medium",c,{loading:t}),hidden:c==="hidden",children:t?s.jsx("p",{children:r.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?s.jsx("p",{children:n}):n})};const Rt=({children:e,className:t="",...n})=>s.jsx("section",{className:T("full-width-section",t),...n,children:e});const Ws=({text:e,buttons:t,className:n=""})=>{const r=[];return t.forEach(i=>{r.push({href:i.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":i.eventContext||"Download",target:"_blank",children:i.text})}),s.jsx(Rt,{className:T("download-section",n),children:s.jsxs(s.Fragment,{children:[g.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),s.jsx(Ne,{buttons:r})]})})};const zs=({title:e=!1,logos:t=[],className:n=""})=>{const r=t.length;if(r===0)return null;const i={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return s.jsxs("div",{className:T("logos",n),children:[e&&g.createElement(i.element,{className:"title"},i.text),s.jsx("ul",{className:T({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:c,nameOfBusiness:u,link:o=!1,description:a=!1},d)=>{if(!c||!c.url)return null;const l=s.jsx("img",{src:c.url,width:c.width||"auto",height:c.height||"auto",alt:u});return s.jsxs("li",{children:[s.jsx("p",{className:"img-wrapper",children:o?s.jsx("a",{href:o,target:"_blank",rel:"nofollow noreferrer noopener",children:l}):l}),a&&s.jsx("small",{children:a})]},window.btoa(`${c.url}_${d}`))})})]})};const Vs=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Ys=({className:e="",content:t,image:n,variant:r="default",spacing:i="normal",cta:c,children:u})=>{const o=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},d={};return o.forEach(l=>{if(!t[l]){d[l]=!1;return}if(typeof t[l]=="object"){d[l]=t[l];const{text:f,element:h}=t[l];if(h&&Vs.includes(h.toLowerCase()))return;d[l]={text:f,element:a[l]};return}d[l]={text:t[l],element:a[l]}}),c&&c.link&&c.link[0]==="#"&&(c.props||(c.props={}),c.props.onClick=l=>{l.preventDefault(),l.stopPropagation();const f=document.getElementById(c.link.substring(1));f&&f.scrollIntoView({behavior:"smooth"})}),s.jsx(Rt,{className:T("banner-section",r,i,e,{"has-image":n,"has-extra-spacing":i==="normal"&&d.eyebrow&&d.title}),children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"content-wrapper",children:[o.map(l=>{if(d[l]&&typeof d[l]=="object"){const{text:f,element:h=""}=d[l];return g.createElement(h.toLowerCase(),{key:l,className:l},f)}return null}),u,c&&c.text&&c.link&&s.jsx(z,{variant:n||r==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:c.link,...c.props,children:c.text})]}),n&&s.jsx(vn,{image:{...n,aspect:"banner"}})]})})},Gs=g.memo(Ys);const Js=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:i})=>!n&&!r?null:s.jsxs("aside",{className:T("marketing-block",e),children:[n&&s.jsx("p",{className:"title",children:n}),r&&s.jsx("p",{children:r}),t&&s.jsx(z,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Ze="https://storage.googleapis.com/apolitical-assets/",Se={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},Xs="200,000+";const Dt=({label:e=!1,className:t="",children:n})=>{const r=C.useIntl();return s.jsxs("details",{className:T("collapsible-section",t),children:[s.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),s.jsx("div",{className:"content",children:n})]})};const be=({variant:e="primary",className:t="",children:n,...r})=>s.jsx("div",{className:T("highlighted-text-box",e,t),...r,children:n});const Ie=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let i=n&&!!Object.keys(n).length;const c=typeof n=="object"&&"breakpoints"in n,u=Ae(c);if(c&&typeof n=="object"&&typeof u=="number"){const f=Object.assign({},n.breakpoints),h=_n(Object.keys(f));i=xn(u,h,f)}const{breakpoints:o,text:a="",component:d,...l}=n;return s.jsx(be,{variant:"subtle",className:T("empty-state-box",e,r),children:s.jsxs(s.Fragment,{children:[t&&s.jsx(nt,{options:{forceBlock:!0},children:t}),i&&typeof n=="object"&&(d||s.jsx(z,{...l,variant:n.variant?n.variant:"secondary",children:a}))]})})};const Et=({children:e,...t})=>s.jsx("p",{...t,children:e}),kn={q:Et,blockquote:Et};for(let e=1;e<=6;e++)kn[`h${e}`]={component:Et,props:{className:"title"}};const jn=({type:e="default",className:t="",heading:n=!1,children:r})=>s.jsxs("div",{className:T("helper-text-box text-small",e,t),children:[n&&s.jsx("p",{className:"title",children:n}),typeof r=="string"?s.jsx(nt,{options:{wrapper:g.Fragment,forceBlock:!0,overrides:kn},children:r}):s.jsx("p",{children:r})]});const Zs=({className:e="",show:t=!1,hide:n=!1,text:r,children:i})=>{const c=C.useIntl(),u=g.useRef(null),[o,a]=g.useState(""),[d,l]=g.useState("closed");g.useEffect(()=>{const p=u.current;if(p)return p.addEventListener("transitionend",f),()=>{p.removeEventListener("transitionend",f)}},[]),g.useEffect(()=>{if(!r||typeof r!="string")return;const p=r.split(`
|
|
36
36
|
`);a(p.length<3?`${r.substring(0,400)}...`:p.slice(0,3).join(`
|
|
37
|
-
`))},[r]),g.useEffect(()=>{d==="ready-to-close"&&c("closing")},[d]);const f=({propertyName:p})=>{p==="max-height"&&c(x=>x==="opening"?"open":x==="closing"?"closed":x)};if(!r)return null;const h=["opening","open"].includes(d);return s.jsxs(be,{variant:"subtle",className:E("hide-show-text-box",e),children:[s.jsxs("div",{ref:u,className:E("content",d),children:[s.jsx(nt,{options:{forceBlock:!0},children:d==="closed"?o:r}),d!=="closed"&&i]}),s.jsx("p",{className:"cta",children:s.jsx(z,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:E({"rotate-180":h}),onClick:()=>{c(h?"ready-to-close":"opening")},children:h?n||l.formatMessage({id:"hideShowTextBox_hide"}):t||l.formatMessage({id:"hideShowTextBox_show"})})})]})},qs=()=>g.Fragment,Ks=({children:e})=>s.jsx(be,{variant:"secondary",children:e}),er=["span","strong","h1","h2","h3","h4","h5","h6","p"],tr=({children:e})=>{const t=C.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const l of g.Children.toArray(e))if(!(!l||typeof l=="string"||typeof l=="number"))if(g.isValidElement(l)&&l.type==="summary"){if(l.props&&l.props.children){for(const u of g.Children.toArray(l.props.children))if(!(!u||typeof u=="string"||typeof u=="number")&&g.isValidElement(u)){const o=u.type;if(er.includes(o)){for(n=u.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(l);const i=n?n.toString():"";return s.jsx(At,{label:i,className:["Sources","Resources"].includes(i)?"discrete-links":"",children:r.map(l=>l)})},nr=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return s.jsx(be,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return s.jsx(be,{variant:"primary",children:e});case"pink-textbox":return s.jsx(be,{variant:"tertiary",children:e});default:return s.jsx("div",{...t,children:e})}return s.jsx("div",{...t,children:e})},sr=e=>{const t=C.useIntl(),n=Date.now().toString();let r="default";const i=e.src;return i.includes("youtube")||i.includes("vimeo")?r="video":i.includes("riddle")||i.includes("sli.do")?r="poll":i.includes("padlet")&&(r="padlet"),s.jsxs(s.Fragment,{children:[s.jsx(ne,{children:s.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),s.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),s.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},sn=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},rr=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,i=!1;for(const l of g.Children.toArray(e))if(!(!l||typeof l=="string"||typeof l=="number")&&g.isValidElement(l)){const u=l.type;if(["button","center","span","strong"].includes(u)&&l.props&&l.props.children&&l.props.children[0])for((u==="button"||sn(l.props.children[0])==="button")&&(i=!0),r=l.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!g.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&sn(r)==="button"&&(i=!0);else break}return i?(n={...n,className:"button primary medium"},s.jsx("p",{className:"center",children:s.jsx(z,{variant:"primary",size:"medium",...n,children:r})})):s.jsx("a",{...n,children:r})},yn=({children:e})=>s.jsx("span",{children:e});const Tt=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:g.Fragment,forceBlock:!0,overrides:{a:rr,CollapsibleSection:At,TextBox:be,CaseStudy:Ks,style:qs,details:tr,div:nr,iframe:sr}};return s.jsx("div",{className:E("markdown-text",e),children:s.jsx(nt,{options:{...r,...t},children:n})})};const Sn=({size:e="medium",variant:t="default",className:n="",children:r})=>s.jsx("span",{className:E("pill",e,t,n),children:r});const qe=({element:e="p",children:t=null,className:n="",...r})=>g.createElement(e,{...r,className:E("status-banner text-small",n),"aria-live":"assertive"},t);const or=({progress:e=0,text:t=!1,className:n=""})=>{const r=C.useIntl(),i=e>75?100:e>50?75:e>25?50:e>5?25:0,l={"--progress":`${e}%`};return s.jsx("span",{className:E(`progress-bar section-${i}`,n),style:l,children:s.jsx(ne,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},En=g.memo(or);const ft="loadingBlock_",ar=({progress:e=0,steps:t=!1,className:n=""})=>{const r=C.useIntl();t||(t={0:{text:r.formatMessage({id:`${ft}loading`})},75:{text:r.formatMessage({id:`${ft}almostDone`})},100:{text:r.formatMessage({id:`${ft}complete`})}});let i=null;const l=Object.keys(t);for(let o=0;o<l.length&&!(e<parseInt(l[o]));o++)i=l[o];const u=i&&t[i].icon?{"--icon":`url(${Ze}icons/${t[i].icon}.svg)`}:{};return s.jsxs(be,{className:E("loading-block",n,{"has-icon":i&&t[i].icon}),variant:"subtle",style:u,children:[i&&s.jsx("span",{className:"step",children:t[i].text}),s.jsx(En,{progress:e})]})},ir=g.memo(ar);const fe=({element:e="div",className:t="",...n})=>s.jsx(Mt,{element:e,className:E("loading-placeholder",t),...n});const $t={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},Tn=(e,t)=>e in $t?s.jsx("div",{className:e,children:$t[e].map((n,r)=>Tn(n,r))},t):s.jsx(fe,{className:e},t),$n=({layout:e="overview-page"})=>s.jsx("div",{className:E("loading-state",e),children:$t[e].map((t,n)=>Tn(t,n))}),Mn=e=>{const t=e&&e.toUpperCase().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):""},We=["#5AB6A3","#A2D7AF","#806056","#3962B3"],lr=e=>{const t=Math.ceil(26/We.length),n=Mn(e).toLowerCase();if(n==="")return We[0];const r=n.charCodeAt(0)-96;for(let i=0;i<We.length;i++)if(r<=t*(i+1))return We[i]};const rn=256,st=({className:e="",src:t="",name:n,alt:r,width:i=rn,height:l=rn,...u})=>{const[o,a]=g.useState(!1),d=g.useRef(null);g.useEffect(()=>{const f=d.current;if(!f)return;const h=f.getContext("2d");if(!h)return;const p=i,x=l;typeof window<"u"&&window.devicePixelRatio&&(f.width=p*window.devicePixelRatio,f.height=x*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=lr(n),h.fillRect(0,0,p,x),h.font=`${p/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText(Mn(n),p/2,x/1.6)},[n]);let c=!1;return t&&t!==""&&!o&&(t.includes("http")||t.includes("//"))&&(c=!0),s.jsx("figure",{className:E("profile-picture",e,{error:o}),...u,children:c?s.jsx("img",{src:t,alt:r||n,onError:()=>{a(!0)},width:i,height:l}):s.jsx("canvas",{ref:d})})},Dt=e=>e==="apolitical"?{image:`${Ze}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ze}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},cr=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const i=e!=="",l=t!=="",u=n!=="";if(!i&&!l&&!u)return"";const o=`${e}${i&&l?` — ${t}`:t}`;let a=`${o}${(i||l)&&u?`, ${n}`:n}`;return a.length>r&&(a=o),a.length>r&&(a=tt(a,r)),a};const rt=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:r="member",gtmType:i="member-click",className:l=""})=>{const u=C.useIntl(),o=Dt(t);o.name||(o.name=u.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:a,url:d,image:c}=o,f=cr(o),h=n&&n.createdAt?Fs(n.createdAt):!1,p=n&&n.createdAt?Ds(n.createdAt):"";return g.createElement(e,{className:E("member text-medium",l),children:s.jsxs(Pe,{href:d,gtmType:i,gtmContext:r,onClick:x=>{x==null||x.stopPropagation()},children:[s.jsx(st,{name:a,src:c}),s.jsxs("p",{className:"details",children:[s.jsx("strong",{children:a}),n&&s.jsxs("span",{className:"additional-content",children:[n.createdAt&&h&&s.jsx("span",{className:"date",title:p,"aria-label":p,children:u.formatMessage({id:`dates_${h.path}`},{number:h.number})}),n.didEdit&&s.jsx("em",{children:u.formatMessage({id:"discussion_edited"})})]}),f&&s.jsx("small",{children:f})]})]})})};const on={small:24,medium:48},Cn=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:i,showGap:l,showPlaceholders:u}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,className:a=""})=>{const d=C.useIntl();return!n||n.length===0?null:g.createElement(e,{className:E("contributors",a,i,{"has-gap":l}),children:s.jsxs(s.Fragment,{children:[s.jsx("ul",{children:n.map((c,f)=>{let h,p="";if(f<o){const{name:x="",image:y=""}=Dt(c);if(u)return s.jsx(fe,{element:"li",className:"contributor"},f);h=s.jsx(st,{name:x,src:y,width:on[i||"medium"],height:on[i||"medium"]})}else if(f===o){const x=(t||n.length)-o;h=s.jsxs("small",{className:E({"large-number":x>99}),children:["+",Os(x,0)]}),p="number-left"}return h?s.jsx("li",{className:E("contributor",p),children:h},f):null})}),r&&s.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?d.formatMessage({id:`member_${n[0]}`}):tt(n[0].name||"",20):null})]})})},Rn=({showDevTools:e=!0,children:t})=>{const n=new J.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return s.jsxs(J.QueryClientProvider,{client:n,children:[t,e&&s.jsx(bs.ReactQueryDevtools,{initialIsOpen:!1})]})};var ur=g.createContext({client:Xe});function dr(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,l=g.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&&i&&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&&(Xe.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),Xe.init(r,i)),Xe)},[n,r]);return g.createElement(ur.Provider,{value:{client:l}},t)}const An=({children:e,user:t})=>t.isLoading?s.jsx(s.Fragment,{}):process.env.REACT_APP_PUBLIC_POSTHOG_KEY?s.jsx(dr,{apiKey:atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),options:{api_host:"https://eu.posthog.com",autocapture:!1,secure_cookie:!0,bootstrap:{distinctID:t.id||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!t.id}},children:e}):e,Dn=({children:e,locale:t,messages:n})=>{const r=t||"en",i={...Bs[r],...n||{}};return s.jsx(C.IntlProvider,{locale:r,messages:i,children:e})},ve=g.createContext(null),Fn=({children:e,user:t})=>s.jsx(ve.Provider,{value:t,children:e}),mr=({bootstrap:e,children:t,intl:n})=>{const[r,i]=g.useState({isLoading:!0});return g.useEffect(()=>{e().then(l=>i({...l,isLoading:!1})).catch(()=>i({isLoading:!1}))},[]),s.jsx(Dn,{locale:n==null?void 0:n.locale,messages:n==null?void 0:n.messages,children:s.jsx(Fn,{user:r,children:s.jsx(Rn,{children:s.jsx(An,{user:r,children:t})})})})};const ht="joinCommunityButton",Ft=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:r}={join:()=>{},leave:()=>{}}})=>{const i=C.useIntl(),l=g.useContext(ve),u=l&&typeof l.id=="string",[o,a]=g.useState(e),[d,c]=g.useState(e?"joined":"notJoined");g.useEffect(()=>{d==="joining"?c("joined"):d==="leaving"&&c("notJoined")},[o]);const f={},h={};return o&&d!=="leaving"&&(f["data-hover-text"]=i.formatMessage({id:`${ht}_leave`}),f["aria-label"]=i.formatMessage({id:`${ht}_member_aria`}),h["aria-hidden"]="true"),s.jsx(z,{variant:o?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:o&&d!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async p=>{u&&(p.currentTarget.blur(),o?(c("leaving"),typeof r=="function"&&await r()):(c("joining"),typeof n=="function"&&await n()),a(!o))},className:E("join-community-button",d,{active:d==="joining"}),disabled:!u,...f,children:s.jsx("span",{className:"text",...h,children:i.formatMessage({id:`${ht}${["joining","leaving"].includes(d)?`_${d}`:o?"_member":t?"_short":""}`})})})};const pt="communityDetails_",fr=({isMember:e=!1,slug:t,members:{number:n,data:r}={number:void 0,data:[]},className:i="",...l})=>{const u=C.useIntl(),o=n||(r==null?void 0:r.length)||0;return s.jsxs("div",{className:E("community-details",i),children:[s.jsx(ke,{}),s.jsxs("div",{className:"member-details",children:[s.jsxs("div",{className:"top",children:[s.jsxs("h3",{children:[u.formatMessage({id:`${pt}members`}),s.jsx("span",{className:"count",children:o})]}),s.jsx("p",{className:"text-small",children:s.jsx("a",{href:`/communities/${t}/members`,children:u.formatMessage({id:`${pt}viewAll`})})})]}),s.jsx(Cn,{contributors:{total:n,data:r!=null&&r.length?r:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:o===0},cutoff:5})]}),s.jsx(Ft,{isMember:e,...l}),e&&s.jsx(z,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:u.formatMessage({id:`${pt}invite`})})]})};const hr=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const r=C.useIntl();return s.jsxs(s.Fragment,{children:[s.jsx(ne,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),s.jsx("ul",{className:E("breadcrumbs text-small",n),children:e.map(({text:i,href:l,current:u=!1},o)=>s.jsxs("li",{children:[u&&s.jsx(ne,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),s.jsx(Pe,{href:u?void 0:l,children:tt(i,t)})]},`${window.btoa(i)}_${o}`))})]})};const pr=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:i=""})=>{const l=C.useIntl(),u=t?[{id:"all",text:typeof t!="boolean"&&t.text||l.formatMessage({id:"filters_all"})},...e]:e,[o,a]=g.useState(t?["all"]:[]),d=(c,f)=>{let h=[];o.includes(c)?h=o.filter(p=>p!==c):c==="all"?h=["all"]:n?h=[...o.filter(p=>p!=="all"),c]:h=[c],a(p=>(r&&typeof r=="function"&&r({current:h,previous:p}),h)),f&&typeof f=="function"&&f()};return s.jsx("ul",{className:E("filters",i),children:u.map(({id:c,text:f,disabled:h=!1,callback:p=()=>{}})=>{let x={};return h&&(x={disabled:!0,"aria-label":l.formatMessage({id:"filters_disabled"},{name:f})}),s.jsx("li",{children:s.jsx("button",{className:E(c,{selected:o.includes(c)}),onClick:y=>{y.preventDefault(),y.stopPropagation(),d(c,p)},...x,children:f})},c)})})},gr=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let r="";return t.forEach(({url:i,position:l})=>{l==="before-lang"?r+=`/${i}`:(r.includes(`/${n}/`)||(r+=`/${n}`),r+=`/${i}`)}),r.includes(`/${n}/`)||(r+=`/${n}`),r};const gt={en:"English",es:"Español",fr:"Français",pt:"Português"},ze="languageSwitcher_",_r=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:r,onChange:i=()=>{},urlParts:l,variant:u="default",label:o,className:a=""})=>{const d=C.useIntl(),[c,f]=g.useState(e);if(g.useEffect(()=>{e!==c&&f(e)},[e]),!r||!Object.values(r).some(y=>y&&y.post_name))return null;const p=Object.keys(r),x=c!==e;return s.jsxs("div",{className:E("language-switcher text-small",u,a),children:[s.jsxs("nav",{children:[u!=="short"&&s.jsx("p",{children:o||d.formatMessage({id:`${ze}label`})}),s.jsx("ul",{children:p.map(y=>{if(!gt[y])return null;let _={className:y};return c===y?_["aria-label"]=d.formatMessage({id:`${ze}selected`},{language:gt[y]}):_={..._,href:gr(y,l),onClick:T=>{T.preventDefault(),T.stopPropagation(),f(y),i(y)}},s.jsx("li",{children:s.jsx(Pe,{..._,fallbackElement:"span",children:gt[y]})},y)})}),u!=="short"&&!x&&s.jsx("p",{children:d.formatMessage({id:`${ze}translation_${t?"original":n?"human":"machine"}`})})]}),u!=="short"&&!x&&!t&&!n&&s.jsx("small",{children:d.formatMessage({id:`${ze}disclaimer`},{email:Se.support,link:y=>{const _=`mailto:${y}`;return s.jsx("a",{href:_,children:y})}})})]})};const _t=C.createIntl({locale:"en",messages:Ct}),Nn=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:i=!1,messages:l={button:_t.formatMessage({id:"loadMore_button"}),endOfFeed:_t.formatMessage({id:"loadMore_endOfFeed"}),error:_t.formatMessage({id:"loadMore_error"})},className:u="",gtmContext:o="LoadMore"})=>{const[a,d]=g.useState(!1),[c,f]=g.useState(!1);if(t<=0||t<n*e)return null;const h=async p=>{try{await r(p)}catch(x){x instanceof Error&&x.message&&x.message.includes("Cannot read items")?f(!0):d(!0)}};return s.jsxs("footer",{className:E("load-more",u),children:[a&&s.jsx("p",{className:"error",children:l.error}),c?s.jsx("p",{children:l.endOfFeed}):s.jsx(z,{variant:"secondary",icon:i,onClick:h,"data-gtm-event-context":o,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:l.button})]})};let Ve=!1;const Pn=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const i=C.useIntl(),l=g.useRef(null),[u,o]=g.useState(!1),a=d=>{l.current&&d.target instanceof HTMLElement&&!l.current.contains(d.target)&&o(!1)};return g.useEffect(()=>(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)})),g.createElement(e,{ref:l,className:E("more-menu text-medium",r),children:s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>o(!u),"aria-haspopup":"true","aria-expanded":u,"aria-controls":t,screenreaderText:i.formatMessage({id:"moreMenu"})}),s.jsx("ul",{id:t,hidden:!u,children:n.map(({href:d,onClick:c,text:f,icon:h,...p},x)=>{const y={...p,onClick:_=>{o(!1),typeof c=="function"&&c(_)},onFocus:()=>{Ve&&(clearTimeout(Ve),Ve=!1)},onBlur:()=>{Ve=setTimeout(()=>{o(!1)},100)}};return d&&(y.href=d),s.jsx("li",{children:s.jsx(z,{variant:"tertiary",size:"medium",icon:h?{icon:h,position:"left"}:!1,...y,children:f})},`${window.btoa(f)}_${x}`)})})]})})};const Nt=({variant:e="default",version:t="default",className:n="",...r})=>s.jsx("p",{className:"logo-wrapper",children:s.jsx("a",{href:"/home/",className:E("logo",e,t,n),...r,children:s.jsx(ne,{children:s.jsx(C.FormattedMessage,{id:"apolitical"})})})});const xr={"2-1":901},br=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const i=Fe(!0);let l=r;return g.Children.count(r)===1&&(l=g.Children.toArray(r)[0],l.props&&(l=l.props.children)),s.jsx("section",{className:E("columns",`layout-${e}`,n),children:g.Children.map(l,(u,o)=>t!==!1&&o===t&&i&&i<xr[e]?null:u)})};const xt="cookieBanner_",bt=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],vt=new Date(Date.now()+12*30*24*60*60*1e3),In=()=>{const e=C.useIntl(),[t,n,r]=dn.useCookies(bt),[i,l]=g.useState(!t["apol-cookie-banner"]),u=()=>{bt.forEach(c=>{n(c,!0,{path:"/",expires:vt,domain:c==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),l(!1),window.location.reload()},o=()=>{n("apol-cookie-banner",!0,{path:"/",expires:vt}),bt.forEach(c=>{if(c==="apol-cookie-banner"){n(c,!0,{path:"/",expires:vt});return}r(c)}),l(!1)};if(!i)return null;const a=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:o,gtmType:"reject-all"},{id:"accept",onClick:u,gtmType:"accepted-all"}],d=[];return a.forEach(c=>{d.push({variant:c.href?"tertiary":"primary",href:c.href,onClick:c.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${c.gtmType}-click`,children:e.formatMessage({id:`${xt}buttons_${c.id}`})})}),s.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[s.jsx("h6",{children:e.formatMessage({id:`${xt}title`})}),s.jsx("p",{children:e.formatMessage({id:`${xt}text`})}),s.jsx(Ne,{buttons:d})]})},xe={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:Se["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:Se["data-protection"].eu,gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:Se.support,gtmType:"concierge-email-click"},business:{email:Se.general,gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Ee="footer_",Ke="SiteFooter",an=({group:e})=>{const t=xe[e].order||[];let n=!1;return"text"in xe[e]&&(n=xe[e].text),s.jsxs(g.Fragment,{children:[s.jsx("p",{className:"pre-title",children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}`})}),Array.isArray(t)&&t.length>0&&s.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:i,gtmType:l}=xe[e][r],u={};return["legal"].includes(e)&&(u.target="_blank",u.rel="noopener"),s.jsx("li",{children:s.jsx("a",{href:i,className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":l,...u,children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&s.jsx("dl",{className:"text-medium",children:n.order.map(r=>s.jsxs(g.Fragment,{children:[s.jsx("dt",{children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}_${r}`})}),s.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&s.jsx("address",{children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}_${r}_address`,values:{br:s.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&s.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Pt=()=>s.jsx("div",{id:"footer",children:s.jsxs("div",{className:"wrapper",children:[s.jsx(Mt,{element:"hr"}),s.jsx(Nt,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":"logo-homepage-link"}),s.jsx("footer",{children:["platform","community","company","contact"].map(e=>s.jsxs("div",{className:"group",children:[s.jsx(an,{group:e}),Object.keys(xe[e]).includes("child")&&s.jsx(an,{group:xe[e].child})]},e))}),s.jsx("hr",{}),s.jsxs("div",{className:"sub-footer",children:[s.jsx("ul",{children:Array.isArray(xe.social.order)&&xe.social.order.map(e=>{const t=xe.social[e];return s.jsx("li",{className:e,children:s.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":"social-click",children:s.jsx("span",{className:"hidden",children:s.jsx(C.FormattedMessage,{id:`${Ee}social_${e}`})})})},e)})}),s.jsx("small",{children:s.jsx(C.FormattedMessage,{id:`${Ee}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Ye="emailHelperTextBox_",vr=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const i=C.useIntl(),[l,u]=g.useState({path:`${Ye}default`,type:"default",link:{},mail:{},error:""}),[o,a]=g.useState(!1),d=g.useCallback(p=>{p.preventDefault(),p.stopPropagation();const x=y=>{u({path:`${Ye}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>d(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:y})};if(typeof r!="function"){x(i.formatMessage({id:`${Ye}error_noFunction`}));return}a(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(y=>{x(y.message)}).finally(()=>{a(!1)})},[t,n,r]);g.useEffect(()=>{let p=Ye,x="default",y={},_={};switch(e){case"gov":p+="autoApproved",x="success";break;case"nonGov":p+="unrecognisedEmail",x="error",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",x="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",x="error",y={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>d(T),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",x="error",y={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}u({...l,path:p,type:x,link:y,mail:_})},[e]);const c={};return["link","mail"].forEach(p=>{c[p]=Object.keys(l[p]).length?x=>s.jsx("a",{...l[p],children:x}):x=>x}),s.jsx(jn,{type:l.type,heading:o?!1:i.formatMessage({id:`${l.path}_title`}),children:o?s.jsxs(s.Fragment,{children:[s.jsx(fe,{element:"span"}),s.jsx(fe,{element:"span"})]}):i.formatMessage({id:`${l.path}_text`},{...c,strong:p=>s.jsx("strong",{children:p}),em:p=>s.jsx("em",{children:p}),br:s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx("br",{})]}),error:l.error})})};const Ge="passwordRules_",Ln="isMoreThanEightCharacters",Bn="includesNumberAndSymbol",On="includesLowerAndUppercase",wr={[Ln]:"8Characters",[Bn]:"numberSymbol",[On]:"lowercaseUppercase"},kr=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=C.useIntl();return s.jsxs("aside",{className:E("password-rules",t),children:[s.jsx("small",{children:n.formatMessage({id:`${Ge}intro`})}),s.jsx("ul",{children:[Ln,Bn,On].map(r=>s.jsxs("li",{className:E({matches:e[r]}),children:[s.jsxs(ne,{children:[n.formatMessage({id:`${Ge}rule_label`})," "]}),s.jsx("span",{children:n.formatMessage({id:`${Ge}rule_${wr[r]}`})}),!e[r]&&s.jsxs(ne,{element:"strong",children:[" "," ",n.formatMessage({id:`${Ge}notMet`})]})]},`rule-${r}`))})]})},jr=g.memo(kr);const yr=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:i=()=>{}},className:l="",hasLoaded:u=!1})=>{const o=C.useIntl(),[a,d]=g.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const T=await n();d(j=>({...j,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){d(j=>({...j,setUp:!0,disabled:!0})),i(T)}};if(g.useEffect(()=>{u&&!a.setUp&&c()},[u]),!u)return s.jsx(fe,{className:"rating-placeholder"});const{id:f,rating:h,disabled:p}=a,x="ratings_",y={text:o.formatMessage({id:`${x}text`}),low:o.formatMessage({id:`${x}low`}),high:o.formatMessage({id:`${x}high`}),success:o.formatMessage({id:`${x}success`}),...e},_=async T=>{if(!(!f||p))try{d(j=>({...j,rating:T,disabled:!0})),await r({id:f,value:T})}catch(j){d($=>({...$,rating:null})),i(j)}finally{d(j=>({...j,disabled:!1}))}};return s.jsxs("div",{className:E("rating",l),children:[s.jsx("span",{className:"label",children:y[h?"success":"text"]}),s.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const j=T+1;return s.jsx("li",{className:E({selected:h&&j<=h}),children:s.jsx(z,{variant:"tertiary",size:"small",icon:{icon:`star${!h||j>h?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${o.formatMessage({id:`${x}stars`},{number:j,total:t})}${j===1||j===t?` - ${y[j===1?"low":"high"]}`:""}`,onClick:$=>{$.preventDefault(),$.stopPropagation(),_(j)},disabled:p})},`rating-${j}`)})})]})};const Hn=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:i="search-bar",gtmEvent:l="form-submission"})=>{const{searchIsOpen:u=!0,isDesktopVersion:o=!1}=n||{},a=C.useIntl(),d=g.useRef(null);we(()=>{!n||o||!u||d.current&&d.current.focus()},[u]);const c=f=>{f.preventDefault(),f.stopPropagation(),!(!d.current||!d.current.value||d.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(d.current.value)}`)};return s.jsx("form",{onSubmit:c,className:E("search-form gtm-trackable",t),"data-gtm-event-context":i,"data-gtm-event-type":l,children:s.jsx("fieldset",{id:`${e}-form`,hidden:n?!u:!1,role:"search",children:s.jsxs("p",{children:[s.jsx(ne,{element:"label",htmlFor:e,children:a.formatMessage({id:"search_label"})}),s.jsx("input",{ref:d,type:"search",id:e,name:e,defaultValue:r,placeholder:a.formatMessage({id:"search_placeholder"}),onKeyDown:f=>{f.key==="Enter"&&c(f)}}),s.jsx("button",{className:"clear",onClick:f=>{f.preventDefault(),f.stopPropagation(),d.current&&d.current.value&&(d.current.value="")},children:s.jsx(ne,{children:a.formatMessage({id:"search_clear"})})}),s.jsx("button",{className:"search",onClick:c,children:s.jsx(ne,{children:a.formatMessage({id:"search_cta"})})})]})})})};const Qn=({title:e,label:t,ctaMessage:n,titleColor:r,labelColor:i,backgroundColor:l,onClose:u,reportError:o,sendInvites:a,initialFormStatus:d="NOT_SUBMITTED"})=>{const[c,f]=g.useState([]),[h,p]=g.useState(!0),[x,y]=g.useState(d),{formatMessage:_}=C.useIntl(),T=async R=>{R.preventDefault();try{await a(c),f([]),y("SUCCESS")}catch(A){y("ERROR"),o(A)}},j=R=>{R.preventDefault(),y("NOT_SUBMITTED"),p(!0),f([])},$=R=>{R.preventDefault(),u(),y("CLOSED")};return x==="CLOSED"?null:x==="ERROR"||x==="SUCCESS"?s.jsxs("div",{className:"invite-form-wrapper",children:[s.jsx("div",{className:"content centred",children:x==="SUCCESS"?s.jsx("h2",{className:"success-title",children:_({id:"inviteForm_success"})}):s.jsxs("h2",{className:"error-title",children:[" ",_({id:"inviteForm_error"})]})}),s.jsx(ke,{}),s.jsx("div",{className:"footer",children:x==="SUCCESS"?s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"secondary",onClick:j,children:_({id:"inviteForm_ctaSendMoreInvites"})}),s.jsx(z,{onClick:$,children:_({id:"inviteForm_ctaDone"})})]}):s.jsx(z,{onClick:j,children:_({id:"inviteForm_ctaTryAgain"})})})]}):s.jsx("div",{className:"invite-form-wrapper",children:s.jsxs("form",{style:{backgroundColor:l},onSubmit:T,className:E("invite-form gtm-trackable"),children:[s.jsxs("fieldset",{className:"content",children:[s.jsx("h2",{className:"title",style:{color:r},children:e}),s.jsx("label",{htmlFor:"email-input",className:"label",style:{color:i},children:t}),s.jsx(vs.ReactMultiEmail,{id:"email-input",inputClassName:"email-input input",placeholder:_({id:"inviteForm_email_placeholder"}),emails:c,onChange:R=>{f(R),p(!R.length)},autoFocus:!1,getLabel:(R,A,B)=>s.jsxs("div",{className:"email text-medium",children:[s.jsx("div",{"data-tag-item":!0,children:R}),s.jsx(z,{variant:"tertiary",size:"small",icon:{icon:"close"},onClick:()=>{B(A),p(!c.length)},className:"remove-email-button",screenreaderText:_({id:"overlay_close"})})]},A)})]}),s.jsx(ke,{}),s.jsx("fieldset",{className:"footer",children:s.jsx(z,{className:"sendEmailsButton",disabled:h,children:n})})]})})},O={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=l=>{const u=`logged${e?"In":"Out"}`;return t>=n[l][u]};let i={};return["navigation","search"].forEach(l=>{i[l]=r(l)}),i},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(i=>i===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const i=Date.now();if(!t&&O.handlerCalled[e]&&i-O.handlerCalled[e]<500)return;O.handlerCalled[e]=i;let l=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(u=>{u===e||n[u]===!1||l.push({type:`menus.${u}`,value:!1})}),r(l)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const i=mn(e[r],t);if(!(typeof i>"u")&&(!n||i[t]&&i[t].includes(n)||i.value&&i.value.includes(n)||i.toString().includes(n)))return e[r]}return e[0].children?O.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:i})=>{if(!t.current||!t.current.children)return;const l=n?"desktop":"default";if(r[e][l]){r[e][l].focus();return}let u,o;switch(e){case"navigation":if(n){const a=O.findFirstChild(t.current.children,"attributes.aria-controls","navigation");u=O.findFirstChild(a.children,"href")}else u=O.findFirstChild(t.current.children,"href");u||(u=t.current);break;case"account":if(o=O.findFirstChild(t.current.children,"className","account"),!o||!o.children)return;u=O.findFirstChild(o.children,"href");break;default:return}u&&(i([{type:`focusElements.${e}.${l}`,value:u}]),u.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(O.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(O.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(O.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{O.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},De={order:["home","topics","partners","account"],home:{href:"/home/",hasVariantText:!0,gtmType:"homepage-click"},topics:{order:["explore","topics"],menuId:"navigation",explore:{order:["events","courses","q-and-a","articles"],events:{href:"/events/",className:"icon events"},courses:{href:"/microcourses/",gtmType:"microcourses-click",className:"icon courses"},"q-and-a":{href:"/questions-answers/",className:"icon q-and-a"},articles:{href:"/solution-articles/",gtmType:"articles-click",className:"icon articles"}},topics:{order:["climate","cities-and-local-government","digital-and-data","education","equity-justice-and-inclusion","health-and-social-care","innovation","leadership-and-skills","life-in-government","policymaking","transport-and-infrastructure","work-and-the-economy"],className:"columns",climate:{href:"/topics/climate/"},"cities-and-local-government":{href:"/topics/cities-and-local-government/"},"digital-and-data":{href:"/topics/digital-and-data/"},education:{href:"/topics/education/"},"equity-justice-and-inclusion":{href:"/topics/equity-justice-and-inclusion/"},"health-and-social-care":{href:"/topics/health-and-social-care/"},innovation:{href:"/topics/innovation/"},"leadership-and-skills":{href:"/topics/leadership-and-skills/"},"life-in-government":{href:"/topics/life-in-government/"},policymaking:{href:"/topics/policymaking/"},"transport-and-infrastructure":{href:"/topics/transport-and-infrastructure/"},"work-and-the-economy":{href:"/topics/work-and-the-economy/"}}},partners:{href:"/partnerships/",onlyShow:"logged-out"},account:{order:["profile","settings","log-out"],className:"account",onlyShow:"logged-in",doTrack:!1,profile:{href:"/profiles/me"},settings:{href:"/profiles/me/manage-account"},"log-out":{href:"/user-onboarding/logout",className:"divider"}},buttons:{order:["login","signup"],login:{href:"/user-onboarding/login"},signup:{href:"/signup/?ref=header-banner",props:{variant:"primary"}}}},et=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:i=()=>{},doTrack:l=null})=>{const u=C.useIntl(),o=mn(De,e);if(!o||o.onlyShow&&(o.onlyShow==="logged-in"&&!t||o.onlyShow==="logged-out"&&t))return null;const a="doTrack"in o,d=l===null?a?o.doTrack:!0:l,c=e.includes("buttons.");let f=`header_${e.replaceAll(".","_")}`;o.hasVariantText&&(f+=`_logged${t?"In":"Out"}`);let h=!1;if(o.href){let j=o.gtmType||`${e}-click`;if(j.includes(".")){const $=j.split("."),R=$[$.length-2];j=`${R==="topics"?`${R}-`:""}${$[$.length-1]}`}h={href:o.href,role:"menuitem"},d&&(h={...h,className:"gtm-trackable","data-gtm-event-type":j,"data-gtm-event-context":"HeaderButtons"}),c&&(h={...h,variant:"secondary",size:{mobile:"small",881:"large"},...o.props||{}})}const p=o.order&&o.order[0]&&o[o.order[0]],x=p&&o[o.order[0]].order,y=h&&window.location.pathname===o.href;let _={},T={};if(p){const j=o.menuId||e,$={onClick:R=>O.events.onClick(R,{id:j,callback:i,isOpen:r[j]}),onFocus:()=>O.events.onFocus({id:j}),onBlur:()=>O.events.onBlur({id:j,callback:i}),onMouseLeave:()=>O.events.onBlur({id:j,callback:i}),onMouseEnter:()=>O.events.onMouseEnter({id:j,callback:i})};n&&(x&&(_={...$,onKeyPress:R=>{R.key==="Enter"&&O.events.onClick(R,{id:j,callback:i,isOpen:r[j]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[j],"aria-controls":j}),T={hidden:j in r?!r[j]:!0}),x||(T={...T,...$})}return s.jsxs("li",{className:E({[o.className]:o.className,"has-submenu":p,parent:x,active:y}),role:"none",..._,children:[h?g.createElement(c?z:"a",h,u.formatMessage({id:f})):u.formatMessage({id:f}),o.order&&s.jsx("ul",{...T,children:o.order.map(j=>{if(!o[j])return null;const $={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:i,doTrack:a?d:null};return o[j].order?s.jsxs("li",{className:E({[o[j].className]:o[j].className}),children:[u.formatMessage({id:`${f}_${j}`}),s.jsx("ul",{children:o[j].order.map(R=>s.jsx(et,{id:`${e}.${j}.${R}`,...$},R))})]},j):s.jsx(et,{id:`${e}.${j}`,...$},j)})})]},e)};const Sr={height:67,height_desktop:83},It=()=>{const e=C.useIntl(),t=g.useContext(ve),n=Fe(!0,!0),r=t&&typeof t.id=="string",i=g.useMemo(()=>O.getIsDesktopVersion(r,n),[r,n]),[l,u]=g.useReducer(As,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:o,menus:a,focusElements:d}=l;gn({scrollPosition:Sr[`height${i.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!i&&a.navigation||O.shouldChangeHeaderIsVisible(!0,a,u)},scrollDown:()=>{!i&&a.navigation||O.shouldChangeHeaderIsVisible(!1,a,u)}}});const c=(h,p)=>{O.handleMenus({id:h,value:p,menus:a,dispatch:u})},f=g.useRef(null);return we(()=>{a.navigation&&O.autoFocus({menu:"navigation",navigationRef:f,isDesktopVersion:i.navigation,focusElements:d,dispatch:u})},[a.navigation]),we(()=>{a.account&&O.autoFocus({menu:"account",navigationRef:f,isDesktopVersion:i.navigation,focusElements:d,dispatch:u})},[a.account]),t&&t.isLoading?null:s.jsxs(s.Fragment,{children:[s.jsxs("nav",{id:"header",className:E({"logged-in":r,"logged-out":!r,visible:o}),children:[s.jsx(ne,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),s.jsx(Nt,{}),!i.navigation&&s.jsx("button",{className:"menu-button gtm-trackable",onClick:h=>{h.preventDefault(),h.stopPropagation(),c("navigation",!a.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":a.navigation,"aria-controls":"navigation",children:s.jsx(ne,{children:e.formatMessage({id:`header_menu_${a.navigation?"hide":"show"}`})})}),s.jsx("ul",{ref:f,id:"navigation",hidden:i.navigation||a.account?!1:!a.navigation,role:"menu","data-showing":!i.navigation&&a.account?"account":"default",children:De.order.map(h=>s.jsx(et,{id:h,isLoggedIn:r,isDesktopVersion:i.navigation,menus:{navigation:a.navigation,account:a.account},callback:c},h))}),!i.search&&s.jsx("button",{className:"search toggle-search-button",onClick:h=>{h.preventDefault(),h.stopPropagation(),c("search",!a.search)},"aria-haspopup":"true","aria-expanded":a.search,"aria-controls":"search-form",children:s.jsx(ne,{children:e.formatMessage({id:`header_search_${a.search?"hide":"show"}`})})}),s.jsx(Hn,{id:"global-search",handleToggle:{searchIsOpen:a.search,isDesktopVersion:i.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?s.jsxs("button",{className:"account-button",onClick:h=>O.events.onClick(h,{id:"account",callback:c,isOpen:a.account}),onMouseEnter:()=>O.events.onMouseEnter({id:"account",callback:c}),onMouseLeave:()=>O.events.onBlur({id:"account",callback:c}),"aria-haspopup":"true","aria-expanded":a.account,"aria-controls":"navigation",children:[s.jsx(ne,{children:e.formatMessage({id:`header_account_${a.account?"hide":"show"}`})}),s.jsx(st,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):s.jsx("ul",{className:"sign-in-buttons",children:De.buttons.order.map(h=>s.jsx(et,{id:`buttons.${h}`},h))})]}),s.jsx("hr",{id:"content-of-page"}),s.jsx("div",{className:E("overlay",{open:a.navigation||a.account||!i.search&&a.search})})]})};const Er=()=>{const e=C.useIntl();return s.jsxs(s.Fragment,{children:[s.jsx(It,{}),s.jsx("div",{className:"content",children:s.jsx(Ie,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),s.jsx(Pt,{})]})},Tr=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:i="",locale:l="en"})=>{const u=hn();g.useEffect(()=>{window.scrollTo(0,0)},[u]);const o=bn(e,{locale:l});return s.jsx(ws.ErrorBoundary,{onError:t,fallback:s.jsx(Er,{}),children:s.jsx(g.Suspense,{fallback:s.jsx($n,{layout:"overview-page"}),children:s.jsx("div",{id:"wrapper",className:E(i,{[r]:r!=="default"}),children:s.jsxs(dn.CookiesProvider,{children:[s.jsx(It,{}),s.jsx("div",{className:"content",children:o}),n&&s.jsx(Pt,{}),s.jsx(In,{})]})})})})},ln={default:"tags_",headerTopics:"header_topics_topics_"},wt={topic:{Climate:"climate",CitiesAndLocalGovernment:"cities-and-local-government",DigitalAndData:"digital-and-data",Education:"education",EquityJusticeAndInclusion:"equity-justice-and-inclusion",HealthAndSocialCare:"health-and-social-care",Innovation:"innovation",LeadershipAndSkills:"leadership-and-skills",LifeInGovernment:"life-in-government",Policymaking:"policymaking",TransportAndInfrastructure:"transport-and-infrastructure",WorkAndTheEconomy:"work-and-the-economy"},"from the community":"community"},$r={getTagDetails:e=>{if(e.includes("topic_")){if(e=wt.topic[e.replace("topic_","")],e){const t=De.topics.topics[e].href;return t?{id:e,href:t,text:`${ln.headerTopics}${e}`}:null}return null}return wt[e]?(e=wt[e],{id:e,text:`${ln.default}${e}`}):null}};const Mr=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:i="",gtmType:l="tag-click",gtmContext:u="tags"})=>{const o=C.useIntl();if(!e||e.length<1)return null;const a=[];return e.forEach(d=>{if(!d)return;const c=$r.getTagDetails(d);c&&a.push(c)}),a.length<1?null:s.jsx("ul",{className:E("tags text-small",t,i,{"one-line":n}),children:a.map(d=>{const c=o.formatMessage({id:d.text});return s.jsx("li",{children:d.href&&r?s.jsx("a",{href:d.href,className:"gtm-trackable","data-gtm-event-type":l,"data-gtm-event-context":u,children:c}):c},d.id)})})};const Cr=({members:{total:e,data:t=[]},pagination:n,gtmContext:r="member",gtmType:i="member-click",className:l=""})=>{const u=C.useIntl();return t.length===0?null:(e||(e=t.length),s.jsxs("div",{className:E("members-list",l),children:[s.jsxs("h1",{children:[u.formatMessage({id:"membersList"}),s.jsx("span",{className:"count",children:e})]}),s.jsx("ul",{children:t.map((o,a)=>s.jsxs("li",{children:[s.jsx(rt,{member:o,gtmContext:r,gtmType:i}),o.isAdmin&&s.jsx(Sn,{children:u.formatMessage({id:"membersList_admin"})})]},a))}),n&&s.jsx(Nn,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:r})]}))};let Je=null;const ce="discussion_form_",Lt=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:i=5e4,minRows:l=4,forceShow:u={cancel:!1,error:!1},functions:o={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:a="DiscussionForm"})=>{var v,H;const d=C.useIntl(),c=g.useContext(ve),[f,h]=g.useState(n.isEditing&&n.isEditing.text||""),[p,x]=g.useState(u.error||!1),[y,_]=g.useState(!1),T=g.useRef(null);if(r||(r=T),n.isLoading)return s.jsx(fe,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const j=k=>{const Y=k.target.value;h(Y);let P;!c||!c.id?P=me(d.formatMessage,`${ce}error_loggedOut`,e.type,"action"):t?Y.length>=i&&(P=`${ce}error_tooLong`):P=me(d.formatMessage,`${ce}error_noPermission`,e.type,"action"),P?x(P):p&&x(!1)};let $=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const k=e.type==="response"?((v=e.slugs)==null?void 0:v.question)||"":((H=e.slugs)==null?void 0:H.answer)||"";k&&($=`${$}-${k.slice(-15)}`)}const R=async k=>{var P;if(k.preventDefault(),k.stopPropagation(),!c||!c.id||!t||B)return;Je&&clearTimeout(Je),_("submitting");const Y=window.location.pathname;try{let I;switch(e.type){case"post":I=await o.create({content:f});break;case"question":I=await o.create({title:f,authorId:c&&c.id,...(P=o.props)==null?void 0:P.create});break;case"response":I=await o.create({question:e.slugs.question},{body:f,authorId:c&&c.id,contentPath:Y});break;case"reply":I=await o.create({question:e.slugs.question,answer:e.slugs.answer},{body:f,authorId:c&&c.id,contentPath:Y});break;default:break}await Ns(1e3),o.callback&&await o.callback(I),Je=setTimeout(()=>{h(""),_("submitted"),A()},500)}catch(I){const Q=I;let W=`${ce}error`;Q.message.includes("entry already exists")&&(W=me(d.formatMessage,`${ce}error_alreadyExists`,e.type,"action")),Q.message.includes("429")?W=me(d.formatMessage,`${ce}error_tooMany`,e.type,"action"):Q.message.includes("400")&&(W=`${ce}error`),x(W),A()}},A=()=>{Je=setTimeout(()=>{x(!1),_(!1)},5e3)},B=!f||!Hs(f),V=y==="submitting",b=[];return(n.isEditing&&!V||u.cancel)&&b.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:o.handleCancel,className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!u.cancel&&(!c||!c.id||!f),children:d.formatMessage({id:`${ce}cancel`})}),b.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:k=>{if(n.isEditing){_("submitting"),o.handleSaveEdit&&o.handleSaveEdit(T.current&&"value"in T.current?T.current.value:"");return}R(k)},className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!c||!c.id||!t||B||V||n.isEditing&&f===n.isEditing.text,children:d.formatMessage({id:`${ce}${V?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),s.jsxs("form",{id:$,className:E("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&s.jsx("h2",{children:me(d.formatMessage,`${ce}title`,e.type,"action")}),s.jsx(rt,{member:c||"community",gtmContext:a,gtmType:"profile-click"}),s.jsx(ne,{element:"label",showOnFocus:!1,htmlFor:`${$}-input`,children:me(d.formatMessage,`${ce}label`,e.type,"action")}),s.jsx(ks,{ref:r,id:`${$}-input`,name:e.type,placeholder:me(d.formatMessage,`${ce}placeholder`,e.type,"action"),onChange:j,value:f,maxLength:i,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:l,autoFocus:!!n.isEditing}),s.jsx("small",{children:me(d.formatMessage,`${ce}explainer`,e.type,"action",{a:k=>s.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":"community-guidelines-link",rel:"noreferrer",children:k})})}),s.jsx(Ne,{buttons:b}),y==="submitted"&&s.jsx(qe,{className:"success","data-testid":"success",children:me(d.formatMessage,`${ce}success`,e.type,"action")}),p&&s.jsx(qe,{id:"error-message",className:"error","data-testid":"error",children:u.error?u.error:typeof p=="string"?p.includes(" ")?p:d.formatMessage({id:p},{action:d.formatMessage({id:`discussion_action_${e.type}`}),maxLength:i}):p})]})},ot=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:r,join:i,leave:l,notMemberStateText:u}})=>r&&!n?s.jsx(Ie,{text:u,button:{component:s.jsx(Ft,{functions:{join:i,leave:l}})}}):s.jsx(Lt,{content:{type:e,slugs:{}},functions:{create:t}}),Rr={showThread:!1,showForm:!1},Le=g.createContext(Rr),Un=({children:e})=>{const[t,n]=g.useState({showThread:!1,showForm:!1});return s.jsx(Le.Provider,{value:{...t,updateConversation:n},children:e})},Ar=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),Dr=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let Ae=!1;const kt=()=>{Ae!==!1&&(clearTimeout(Ae),Ae=!1)},jt=10,Wn=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:r=!0,userLiked:i=!1,content:l={type:"reply",slugs:{}},canLike:u=!0,functions:{createLike:o=()=>{},deleteLike:a=()=>{}}={}})=>{const d=C.useIntl();g.useEffect(()=>{p(i)},[i]);const[c,f]=g.useState(t),[h,p]=g.useState(i),[x,y]=g.useState(!1),[_,T]=g.useState(!1),j=g.useMemo(()=>Dr(n,jt),[n]),$=A=>{if(A.preventDefault(),A.stopPropagation(),T(!1),Ae)return kt(),!1;if(kt(),x||!u)return!1;Ae=setTimeout(R,350)},R=async()=>{if(kt(),x||!u)return!1;let A=h?c-1:c+1;A<0&&(A=0),y(!0),f(A),p(!h);try{if(l&&l.slugs){const B=Ar(l.slugs);h?await a(B):await o(B,{contentPath:window.location.pathname})}}catch{f(t),p(i)}finally{y(!1)}};return g.createElement(e,{className:E("likes-wrapper text-medium action-button",{"show-spinner":x,"is-liked":h,disabled:!u}),onClick:$,onMouseEnter:()=>{T(!0)},onMouseLeave:()=>{T(!1)},onFocus:()=>{T(!0)},onBlur:()=>{T(!1)},children:s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:E({"do-animation":h&&!i}),screenreaderText:u?d.formatMessage({id:`discussion_likes_${h?"unlike":"like"}`},{action:d.formatMessage({id:`discussion_action_${l.type}`})}):!1,onClick:$,disabled:!u,"aria-hidden":!u,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${l.type}-click`}),s.jsx("span",{className:E("number-of-likes",{"no-likes":c===0}),"data-testid":"number-of-likes",children:d.formatMessage({id:`discussion_likes${r?"_short":""}`},{number:c})}),n&&s.jsx(wn,{isOpen:_,isLoading:n.length===0,children:n.length&&s.jsxs("ul",{children:[j.map(A=>typeof A=="string"||!A.name?null:s.jsx("li",{children:s.jsx(Pe,{href:A.id?`/profiles/${A.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:A.name})},A.id||window.btoa(A.name))),n.length>jt&&s.jsx("li",{children:d.formatMessage({id:"discussion_likes_more"},{number:n.length-jt})})]})})]})})};const zn=({element:e="section",children:t,className:n,...r})=>g.createElement(e,{className:E("modal",n),children:typeof t=="string"?s.jsx("p",{children:t}):t,...r});const Bt=({id:e="content-overlay",isOpen:t=!1,showDivider:n=!0,maxWidth:r,functions:{onOpen:i=()=>{},onClose:l=()=>{}}={},forceShow:{error:u=!1}={},title:o,children:a,buttons:d,className:c="",gtmContext:f="Modal"})=>{const h=C.useIntl(),[p,x]=g.useState(t),y=T=>{x(T),T?(i(),document.body.classList.add("has-overlay")):(l(),document.body.classList.remove("has-overlay"))};g.useEffect(()=>{y(t)},[t]);const _=r?{"--max-width":`${r/16}rem`}:{};return s.jsx("div",{className:E("overlay",{open:p}),children:s.jsx(zn,{id:e,className:E("overlay-modal",c,{"has-max-width":r}),hidden:!p,style:_,children:t&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"top",children:[o&&s.jsx("h2",{className:"modal-title",children:o}),s.jsx(z,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>y(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":f,screenreaderText:h.formatMessage({id:"overlay_close"})})]}),n&&s.jsx(ke,{}),a,d&&s.jsxs("div",{className:"bottom",children:[s.jsx(ke,{}),s.jsx(Ne,{buttons:d})]}),u&&s.jsx(qe,{className:"error",children:u})]})})})},Vn=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e});const Fr=({className:e,showModal:t=!0,title:n,formTitle:r="Know someone who might like to join this workshop?",formLabel:i="Send an invitation to your colleagues below",ctaMessage:l="Send invites",showIcon:u,onClose:o,reportError:a=()=>{},sendInvites:d})=>s.jsx(Bt,{title:n,isOpen:t,showDivider:!1,showIcon:u,className:E("invite-modal",e,{success:!!n}),children:s.jsx(Qn,{title:r,label:i,ctaMessage:l,onClose:o,sendInvites:d,reportError:a})}),cn=e=>{const t={};return Object.keys(e).forEach(n=>n.includes("Id")?t[n]=e[n]:t[`${n}Slug`]=e[n]),t},Ot=(e,t)=>e&&!t;const _e="discussion_",Nr=280,Be=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:r=!1,originalAuthorId:i,functions:{content:{createContent:l,deleteContent:u,updateContent:o}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:a,deleteLike:d}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:c}={openComments:()=>{}}},links:f={},className:h,gtmContext:p="DiscussionAnswer",children:x,isTruncated:y=!1})=>{const _=C.useIntl(),T=g.useContext(ve),j=g.useContext(Le),[$,R]=g.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[A,B]=g.useState(!1),[V,b]=g.useState("");if(g.useEffect(()=>{R({...$,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return s.jsx(fe,{className:"discussion-card discussion-post"});const{author:v,canLike:H,createdAt:k,id:Y,likes:P=0,userLiked:I,comments:Q=0}=t,W=y?tt($.body,Nr):$.body,X=T&&T.id&&typeof v!="string"&&v.id&&v.id===T.id||!1,se=typeof H=="boolean"?H:n?!X:!1,re=async F=>{F||(F=""),b("");try{if(!js(F,$.body)){const ee=t.type==="question"?{title:F}:{body:F};await o(cn(t.slugs),ee)}R({body:F,isEditing:!1,didEdit:!0})}catch{b(`${_e}form_error`)}},oe=()=>{j&&j.updateConversation&&j.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const ee=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,G=document.getElementById(ee),Z=document.getElementById(`${ee}-input`);Z&&Z.focus(),G&&G.scrollIntoView({behavior:"smooth"})},0)},ae=()=>{try{u(cn(t.slugs))}catch{b("delete-error")}},te=[{text:_.formatMessage({id:`${_e}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(_.formatMessage({id:`${_e}report_subject`}))}&body=${encodeURI(_.formatMessage({id:`${_e}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&X&&te.push({text:_.formatMessage({id:`${_e}moreMenu_edit`}),onClick:()=>R({...$,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`edit-${t.type}-click`},{text:_.formatMessage({id:`${_e}moreMenu_delete`}),onClick:F=>{F.preventDefault(),F.stopPropagation(),B(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`delete-${t.type}-click`,...Vn(`delete-${t.slug}-modal`,A)}),g.createElement(e,{className:E("discussion-post",h),"data-testid":`discussion-${t.type}-thread`,children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{id:Y||t.slug,className:E("discussion-card",t.type,{editing:$.isEditing,"has-link":f.post&&!$.isEditing}),onClick:F=>{!f.post||$.isEditing||(F.preventDefault(),F.stopPropagation(),window.location.href=f.post)},children:[!$.isEditing&&s.jsx(rt,{member:v,additionalContent:{createdAt:k,didEdit:$.didEdit},className:typeof v!="string"&&v.id===i?"highlighted":"",gtmContext:p,gtmType:"profile-click"}),$.isEditing?s.jsx(Lt,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:r,isInWrapper:!0,isEditing:{text:$.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:V!==""&&V!=="delete-error"?_.formatMessage({id:V},{action:_.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:l,handleSaveEdit:re,handleCancel:()=>{b(""),R({...$,isEditing:!1})}},gtmContext:`${p}Form`}):f.post?s.jsx("a",{href:f.post,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":"title-click",children:s.jsx(Tt,{options:{overrides:{a:yn}},children:W})}):s.jsx(Tt,{options:{wrapper:t.type==="question"?"h1":g.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:W}),!$.isEditing&&s.jsxs("ul",{className:E("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[s.jsx(Wn,{element:"li",likes:P,isShort:!1,userLiked:I,content:{type:t.type,slugs:t.slugs},canLike:se,functions:{createLike:a,deleteLike:d}}),(["question","post"].includes(t.type)||f.comments||typeof c=="function")&&s.jsxs("li",{className:"action-button",onClick:F=>{F.preventDefault(),F.stopPropagation(),f.comments&&(window.location.href=f.comments),typeof c=="function"&&c()},children:[s.jsx(z,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:f.comments?f.comments:!1,onClick:f.comments||typeof c!="function"?!1:c,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:_.formatMessage({id:`${_e}comments_screenReader`},{count:Q})}),s.jsx("span",{children:_.formatMessage({id:`${_e}comments`},{count:Q})})]}),(t.type==="answer"||t.type==="reply")&&s.jsx("li",{children:s.jsx(z,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:oe,children:_.formatMessage({id:`${_e}reply`})})}),s.jsx(Pn,{element:"li",id:`more-${t.slug}`,options:te})]})]}),x,s.jsx(Bt,{id:`delete-${t.slug}-modal`,isOpen:A,functions:{onOpen:()=>{},onClose:()=>B(!1)},forceShow:{error:V==="delete-error"?_.formatMessage({id:"discussion_delete_error"},{action:_.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:_.formatMessage({id:"discussion_delete_title"},{action:_.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>B(!1),children:_.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:ae,children:_.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:s.jsx(C.FormattedMessage,{id:"discussion_delete_text",values:{p:F=>s.jsx("p",{children:F}),action:_.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const yt="discussion_responses_",Pr=({type:e="answer",responses:t=0})=>{const n=C.useIntl();return s.jsxs("div",{className:"responses-heading",children:[s.jsx("h3",{children:n.formatMessage({id:`${yt}title`},{action:n.formatMessage({id:`${yt}${e}`}),count:t})}),t===0&&s.jsx("p",{children:me(n.formatMessage,`${yt}empty`,e,e)})]})};const Yn=({count:e=0,showRepliesButton:t=!0,children:n})=>{const r=C.useIntl(),i=g.useRef(null),l=g.useContext(Le),[u,o]=g.useState("closed");g.useEffect(()=>{const f=i.current;if(f)return f.addEventListener("transitionend",a),()=>{f.removeEventListener("transitionend",a)}},[]),we(()=>{u==="closed"&&!l.showThread||o(["opening","open"].includes(u)?"ready-to-close":"opening")},[l.showThread]),g.useEffect(()=>{u==="ready-to-close"&&o("closing")},[u]);const a=({propertyName:f})=>{f==="max-height"&&o(h=>h==="opening"?"open":h==="closing"?"closed":h)},d=["opening","open"].includes(u),c=bn(n,{element:"li"});return s.jsxs("div",{className:"thread-wrapper",children:[t&&s.jsx(z,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${d?"left":"right"}`},onClick:()=>{var f;(f=l.updateConversation)==null||f.call(l,h=>({showThread:!h.showThread,showForm:!1}))},children:r.formatMessage({id:`discussion_thread_${d?"hide":"show"}`},{count:e})}),s.jsx("ul",{ref:i,className:E("thread",u),hidden:!l.showThread,children:c})]})},Ir=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),Lr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({content:o})=>{if(!n)return;const a=Ir({user:n,content:o,verb:"post"});await e.cancelQueries({queryKey:t});const d=e.getQueryData(t);return e.setQueryData(t,c=>[...c,a]),{previousActivities:d}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Br=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:u,content:{body:o}})=>{if(o.length===0)return;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),d=a==null?void 0:a.map(c=>((c==null?void 0:c.id)===(u==null?void 0:u.activityId)&&(c.content=o),c));return e.setQueryData(t,()=>d&&[...d]),{previousActivities:d}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Or=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:o})=>{await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),d=a==null?void 0:a.map(c=>{var f;return(c==null?void 0:c.id)===o&&((f=c.reaction_counts)!=null&&f.like?c.reaction_counts.like+=1:c.reaction_counts.like=1),c});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:d}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivities)},onSuccess:o=>{const a=e.getQueryData(t),d=a==null?void 0:a.map(c=>((c==null?void 0:c.id)===(o==null?void 0:o.activity_id)&&(c.own_reactions.like?c.own_reactions.like.push(o):c.own_reactions.like=[o]),c));return e.setQueryData(t,()=>d&&[...d]),{previousActivities:a}},onSettled:(o,a,d)=>{e.invalidateQueries({queryKey:[...t,d.activityId]})}}),Hr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:a})=>{await e.cancelQueries({queryKey:t});const d=e.getQueryData(t),c=d==null?void 0:d.map(f=>{var h;return(f==null?void 0:f.id)===a&&(h=f.reaction_counts)!=null&&h.like&&(f.reaction_counts.like-=1),f});return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(a,d,c)=>{e.setQueryData(t,c.previousActivities)},onSuccess:(a,{activityId:d})=>{const c=e.getQueryData(t),f=c==null?void 0:c.map(h=>{var p,x,y,_;if(h.id===d){const T=(y=(x=(p=h.own_reactions)==null?void 0:p.like)==null?void 0:x.find(j=>j.user_id===(n==null?void 0:n.id)))==null?void 0:y.id;return h.own_reactions.like=(_=h.own_reactions.like)==null?void 0:_.filter(j=>j.id!==T),h}else return h});return e.setQueryData(t,()=>f&&[...f]),{previousActivities:c}},onSettled:(a,d,c)=>{e.invalidateQueries({queryKey:[...t,c.activityId]})}}),Qr=({basePath:e,parentId:t,isMember:n,functions:{list:r,create:i,edit:l,like:u,unlike:o,join:a,leave:d}})=>{const c=C.useIntl(),f=J.useQueryClient(),h=g.useContext(ve),{data:p,error:x,isLoading:y,isFetching:_}=J.useQuery({queryKey:[e,t],queryFn:r}),T=Lr({queryClient:f,queryKey:[e,t],user:h,mutationFn:i}),{mutate:j}=J.useMutation(T),$=Br({queryClient:f,queryKey:[e,t],mutationFn:async k=>await l(k)}),{mutate:R}=J.useMutation($),A=Or({queryClient:f,queryKey:[e,t],mutationFn:u}),{mutate:B}=J.useMutation(A),V=Hr({queryClient:f,queryKey:[e,t],user:h,mutationFn:async({activityId:k})=>{var I,Q,W;const Y=p&&(p==null?void 0:p.find(X=>X.id===k)),P=(W=(Q=(I=Y==null?void 0:Y.own_reactions)==null?void 0:I.like)==null?void 0:Q.find(X=>X.user_id===(h==null?void 0:h.id)))==null?void 0:W.id;await o({reactionId:P||"",activityId:k})}}),{mutate:b}=J.useMutation(V),v=g.useCallback(({activityId:k})=>B({activityId:k}),[B]),H=g.useCallback(({activityId:k})=>b({activityId:k}),[b]);return x?s.jsx(Ie,{variant:"error",text:x.message}):y?s.jsx(fe,{style:{height:"400px"}}):s.jsxs(s.Fragment,{children:[s.jsx(ot,{contentType:"post",createPost:j,membershipRequiredToPost:{isMember:n,required:!0,join:a,leave:d,notMemberStateText:c.formatMessage({id:"community_joinToPost"})}}),!_&&Array.isArray(p)&&(p==null?void 0:p.map(k=>{var I,Q,W,X,se,re,oe,ae,te,F,ee,G;const Y=((I=k==null?void 0:k.actor)==null?void 0:I.id)===(h==null?void 0:h.id),P=Ot(n,Y);return s.jsxs(g.Fragment,{children:[s.jsx(Be,{content:{type:"post",body:k==null?void 0:k.content,canLike:P,createdAt:(k==null?void 0:k.time)||"",slugs:{parentId:t,activityId:k==null?void 0:k.id},slug:k==null?void 0:k.id,author:{id:(Q=k==null?void 0:k.actor)==null?void 0:Q.id,name:`${(X=(W=k==null?void 0:k.actor)==null?void 0:W.data)==null?void 0:X.name}`,organization:(re=(se=k==null?void 0:k.actor)==null?void 0:se.data)==null?void 0:re.organization,jobTitle:(ae=(oe=k==null?void 0:k.actor)==null?void 0:oe.data)==null?void 0:ae.jobTitle,image:{thumbnail:((F=(te=k==null?void 0:k.actor)==null?void 0:te.data)==null?void 0:F.thumbnail)||void 0}},userLiked:((ee=k==null?void 0:k.own_reactions)==null?void 0:ee.like)&&((G=k==null?void 0:k.own_reactions)==null?void 0:G.like.length)>0,likes:(k==null?void 0:k.reaction_counts.like)||0,comments:(k==null?void 0:k.reaction_counts.reply)||0},links:{post:`${e}/${t}/${k==null?void 0:k.id}`,comments:`${e}/${t}/${k==null?void 0:k.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:(Z,le)=>R({activityInfo:Z,content:le})},likes:{createLike:()=>{v({activityId:k==null?void 0:k.id})},deleteLike:()=>{H({activityId:k==null?void 0:k.id})}},comments:{openComments:()=>null}},isTruncated:!0}),s.jsx(ke,{})]},k==null?void 0:k.id)}))]})},Ur=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:o=>{var d;const a=e.getQueryData(t);if(a)return(d=a==null?void 0:a.latest_reactions)!=null&&d.reply?(a.latest_reactions.reply.unshift(o),a&&(a.reaction_counts={reply:a.latest_reactions.reply.length})):(a.latest_reactions={reply:[o]},a.reaction_counts={reply:1}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Wr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyInfo:l,content:{body:u}})=>{var d,c,f;if(u.length===0)return;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t);if(!o||!((d=o==null?void 0:o.latest_reactions)!=null&&d.reply))return;const a=(f=(c=o==null?void 0:o.latest_reactions)==null?void 0:c.reply)==null?void 0:f.map(h=>(h.id===l.replySlug&&(h.data.content=u),h));return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}},onError:(l,u,o)=>{e.setQueryData(t,o.previousActivity)}}),zr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:u})=>{var d,c;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t),a=(c=(d=o==null?void 0:o.latest_reactions)==null?void 0:d.reply)==null?void 0:c.map(f=>{var h;return f.id===u&&((h=f.children_counts)!=null&&h.like?f.children_counts.like+=1:f.children_counts={like:1}),f});return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivity)},onSuccess:u=>{var d;const o=e.getQueryData(t),a=(d=o==null?void 0:o.latest_reactions.reply)==null?void 0:d.map(c=>{var f;return c.id===u.id&&((f=c.own_children)!=null&&f.like?c.own_children.like.push(u):c.own_children={like:[u]}),c});return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}}}),Vr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:o})=>{var c;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);if(!a)return;const d=(c=a.latest_reactions.reply)==null?void 0:c.map(f=>(f.id===o&&f.children_counts.like&&(f.children_counts.like-=1),f));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:(o,{replyId:a})=>{var f;const d=e.getQueryData(t);if(!d)return;const c=(f=d.latest_reactions.reply)==null?void 0:f.map(h=>{var p;return h.id===a?(p=h.latest_children.reply)==null?void 0:p.filter(y=>y.user_id!==(n==null?void 0:n.id)):h});return e.setQueryData(t,()=>({...d,latest_reactions:{reply:c}})),{previousActivity:d}}}),Yr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onSuccess:o=>{var c;const a=e.getQueryData(t),d=(c=a==null?void 0:a.latest_reactions.reply)==null?void 0:c.map(f=>(f.id===o.parent&&(f.latest_children.reply&&f.children_counts.reply?(f.latest_children.reply.push(o),f.children_counts.reply+=1):(f.latest_children.reply=[o],f.children_counts.reply=1)),f));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Gr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onError:(l,u,o)=>{e.setQueryData(t,o.previousActivity)},onMutate:async({replyInfo:l,content:{body:u}})=>{var d,c,f;if(u.length===0)return;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t);if(!o||!((d=o==null?void 0:o.latest_reactions)!=null&&d.reply))return;const a=(f=(c=o==null?void 0:o.latest_reactions)==null?void 0:c.reply)==null?void 0:f.map(h=>{var p;return h.id===l.replyParentId&&((p=h.latest_children.reply)==null||p.map(x=>(x.id===l.replySlug&&(x.data.content=u),x))),h});return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}}}),un=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:u,replyParentId:o})=>{var c;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),d=(c=a==null?void 0:a.latest_reactions.reply)==null?void 0:c.map(f=>{var h;return f.id===o&&((h=f.latest_children.reply)==null||h.map(p=>{var x;return p.id===u&&((x=p.children_counts)!=null&&x.like?p.children_counts.like+=1:p.children_counts={like:1}),p})),f});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivity)},onSuccess:(u,o)=>{var c;const a=e.getQueryData(t),d=(c=a==null?void 0:a.latest_reactions.reply)==null?void 0:c.map(f=>{var h;return f.id===o.replyParentId&&((h=f.latest_children.reply)==null||h.map(p=>(p.id===o.replyId&&(p.own_children=p.own_children||{},p.own_children.like=p.own_children.like||[],p.own_children.like.push(u)),p))),f});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}}}),Jr=({basePath:e,parentId:t,replyParentId:n,activityId:r,replyCount:i,replies:l,functions:{create:u,edit:o,join:a,leave:d,like:c,unlike:f}})=>{const h=C.useIntl(),p=J.useQueryClient(),x=g.useContext(Le),y=Yr({queryClient:p,queryKey:[e,t,r],mutationFn:async v=>u({replyId:n,content:v.body})}),{mutate:_}=J.useMutation(y),T=Gr({queryClient:p,queryKey:[e,t,r],mutationFn:o}),{mutate:j}=J.useMutation(T),$=un({queryClient:p,queryKey:[e,t,r],mutationFn:c}),{mutate:R}=J.useMutation($),A=un({queryClient:p,queryKey:[e,t,r],mutationFn:f}),{mutate:B}=J.useMutation(A),V=g.useCallback(({replyId:v,replyParentId:H})=>R({replyId:v,replyParentId:H}),[R]),b=g.useCallback(({replyId:v,replyParentId:H})=>B({replyId:v,replyParentId:H}),[B]);return s.jsx(Yn,{count:i,showRepliesButton:i>0||x.showForm,children:s.jsxs(s.Fragment,{children:[x.showForm&&s.jsx(ot,{contentType:"reply",createPost:(v,H)=>_(H),membershipRequiredToPost:{isMember:!0,required:!0,join:a,leave:d,notMemberStateText:h.formatMessage({id:"community_joinToPost"})}}),(l==null?void 0:l.length)===0||(l==null?void 0:l.map(v=>{var H,k,Y,P,I,Q,W,X,se,re,oe,ae,te,F,ee;return s.jsx(Be,{content:{type:"reply",body:typeof v.data.content=="string"?(H=v==null?void 0:v.data)==null?void 0:H.content:((Y=(k=v==null?void 0:v.data)==null?void 0:k.content)==null?void 0:Y.text)||"",createdAt:v==null?void 0:v.created_at,slugs:{parentId:t,activityId:r,replyParentId:v==null?void 0:v.parent,reply:v==null?void 0:v.id},slug:"",author:{id:(P=v==null?void 0:v.user)==null?void 0:P.id,name:(Q=(I=v==null?void 0:v.user)==null?void 0:I.data)==null?void 0:Q.name,organization:(X=(W=v==null?void 0:v.user)==null?void 0:W.data)==null?void 0:X.organization,jobTitle:(re=(se=v==null?void 0:v.user)==null?void 0:se.data)==null?void 0:re.jobTitle,image:{thumbnail:((ae=(oe=v==null?void 0:v.user)==null?void 0:oe.data)==null?void 0:ae.thumbnail)||void 0}},userLiked:((te=v==null?void 0:v.own_children)==null?void 0:te.like)&&((F=v==null?void 0:v.own_children)==null?void 0:F.like.length)>0,likes:((ee=v==null?void 0:v.children_counts)==null?void 0:ee.like)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(G,Z)=>j({replyInfo:G,content:Z})},likes:{createLike:()=>V({replyId:v==null?void 0:v.id,replyParentId:v==null?void 0:v.parent}),deleteLike:()=>{var Z,le,ue;const G=((Z=v==null?void 0:v.own_children)==null?void 0:Z.like)&&((ue=(le=v==null?void 0:v.own_children)==null?void 0:le.like[0])==null?void 0:ue.id);return b({replyId:G||""})}},comments:{}}},v==null?void 0:v.id)}))]})})},Gn=({basePath:e,parentId:t,activityId:n,repliesList:r,isMember:i,functions:{createReply:l,editReply:u,like:o,unlike:a,join:d,leave:c}})=>{const f=C.useIntl(),h=J.useQueryClient(),p=g.useContext(ve),x=Ur({queryClient:h,queryKey:[e,t,n],mutationFn:async b=>l({activityId:n,content:b.body})}),{mutate:y}=J.useMutation(x),_=Wr({queryClient:h,queryKey:[e,t,n],mutationFn:async b=>u(b)}),{mutate:T}=J.useMutation(_),j=zr({queryClient:h,queryKey:[e,t,n],mutationFn:o}),{mutate:$}=J.useMutation(j),R=Vr({queryClient:h,queryKey:[e,t,n],user:p,mutationFn:a}),{mutate:A}=J.useMutation(R),B=g.useCallback(({replyId:b})=>$({replyId:b}),[$]),V=g.useCallback(({replyId:b})=>A({replyId:b}),[A]);return s.jsxs(s.Fragment,{children:[s.jsx(ot,{contentType:"reply",createPost:(b,v)=>y(v),membershipRequiredToPost:{isMember:i,required:!0,join:d,leave:c,notMemberStateText:f.formatMessage({id:"community_joinToPost"})}}),(r==null?void 0:r.length)===0||(r==null?void 0:r.map(b=>{var k,Y,P,I,Q,W,X,se,re,oe,ae,te,F,ee,G,Z,le,ue;const v=((k=b==null?void 0:b.user)==null?void 0:k.id)===(p==null?void 0:p.id),H=Ot(i,v);return s.jsx(Un,{children:s.jsx(Be,{content:{type:"reply",body:typeof b.data.content=="string"?(Y=b==null?void 0:b.data)==null?void 0:Y.content:((I=(P=b==null?void 0:b.data)==null?void 0:P.content)==null?void 0:I.text)||"",canLike:H,createdAt:b==null?void 0:b.created_at,slugs:{question:`${e}/${t}/${n}`,parentId:t,reply:b==null?void 0:b.id},slug:`${e}/${t}/${n}#${b==null?void 0:b.id}`,author:{id:(Q=b==null?void 0:b.user)==null?void 0:Q.id,name:(X=(W=b==null?void 0:b.user)==null?void 0:W.data)==null?void 0:X.name,organization:(re=(se=b==null?void 0:b.user)==null?void 0:se.data)==null?void 0:re.organization,jobTitle:(ae=(oe=b==null?void 0:b.user)==null?void 0:oe.data)==null?void 0:ae.jobTitle,image:{thumbnail:((F=(te=b==null?void 0:b.user)==null?void 0:te.data)==null?void 0:F.thumbnail)||void 0}},userLiked:((ee=b==null?void 0:b.own_children)==null?void 0:ee.like)&&((G=b==null?void 0:b.own_children)==null?void 0:G.like.length)>0,likes:((Z=b==null?void 0:b.children_counts)==null?void 0:Z.like)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(he,pe)=>T({replyInfo:he,content:pe})},likes:{createLike:()=>B({replyId:b==null?void 0:b.id}),deleteLike:()=>{var pe,Oe,Te;const he=((pe=b==null?void 0:b.own_children)==null?void 0:pe.like)&&((Te=(Oe=b==null?void 0:b.own_children)==null?void 0:Oe.like[0])==null?void 0:Te.id);return V({replyId:he||""})}},comments:{}},children:s.jsx(Jr,{basePath:e,parentId:t,replyParentId:b==null?void 0:b.id,activityId:n,replyCount:((le=b==null?void 0:b.children_counts)==null?void 0:le.reply)||0,replies:(ue=b==null?void 0:b.latest_children)==null?void 0:ue.reply,isMember:i,functions:{create:l,edit:u,like:o,unlike:a,join:d,leave:c}})},b==null?void 0:b.id)},b==null?void 0:b.id)}))]})},Xr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:u,content:{body:o}})=>{if(o.length===0)return;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);return a&&a.id===(u==null?void 0:u.activityId)&&(a.content=o),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Zr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var a;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t);return(a=o==null?void 0:o.reaction_counts)!=null&&a.like?o.reaction_counts.like+=1:o&&(o.reaction_counts={like:1}),e.setQueryData(t,()=>({...o})),{previousActivity:o}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:o=>{const a=e.getQueryData(t);return a!=null&&a.own_reactions.like?a.own_reactions.like.push(o):a&&(a.own_reactions={like:[o]}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),qr=({queryClient:e,queryKey:t,user:n,activity:r,mutationFn:i})=>({mutationFn:i,onMutate:async()=>{var c;await e.cancelQueries({queryKey:t});const d=e.getQueryData(t);return(c=d==null?void 0:d.reaction_counts)!=null&&c.like&&d.reaction_counts.like>0&&(d.reaction_counts.like-=1),e.setQueryData(t,()=>({...d})),{previousActivity:d}},onError:(d,c,f)=>{e.setQueryData(t,f.previousActivity)},onSuccess:()=>{var f,h,p;if(!r)return;const d=(p=(h=(f=r.own_reactions)==null?void 0:f.like)==null?void 0:h.find(x=>x.user_id===(n==null?void 0:n.id)))==null?void 0:p.id,c=e.getQueryData(t);if(c!=null&&c.own_reactions.like)return c.own_reactions.like=c.own_reactions.like.filter(x=>x.id!==d),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onSettled:()=>{e.invalidateQueries({queryKey:t})}});const Kr=({basePath:e,parentId:t,activityId:n,isMember:r,functions:{get:i,editActivity:l,likeActivity:u,unlikeActivity:o,createReply:a,editReply:d,likeReply:c,unlikeReply:f,join:h,leave:p}})=>{var I,Q,W,X,se,re,oe,ae,te,F,ee;const x=g.useContext(ve),y=J.useQueryClient(),{data:_,error:T,isLoading:j,isFetching:$}=J.useQuery({queryKey:[e,t,n],queryFn:i}),R=Xr({queryClient:y,queryKey:[e,t,n],mutationFn:async G=>await l(G)}),{mutate:A}=J.useMutation(R),B=Zr({queryClient:y,queryKey:[e,t,n],mutationFn:u}),{mutate:V}=J.useMutation(B),b=qr({queryClient:y,queryKey:[e,t,n],user:x,mutationFn:async()=>{var Z,le,ue;const G=(ue=(le=(Z=_==null?void 0:_.own_reactions)==null?void 0:Z.like)==null?void 0:le.find(he=>he.user_id===(x==null?void 0:x.id)))==null?void 0:ue.id;await o({activityId:n,reactionId:G})},activity:_}),{mutate:v}=J.useMutation(b),H=g.useCallback(({activityId:G})=>V({activityId:G}),[V]),k=g.useCallback(async({activityId:G})=>v({activityId:G}),[v]);if(T)return s.jsx(Ie,{variant:"error",text:T.message});if(j||$)return s.jsx(fe,{style:{height:"400px"}});const Y=((I=_==null?void 0:_.actor)==null?void 0:I.id)===(x==null?void 0:x.id),P=Ot(r,Y);return s.jsx(Be,{className:"activity-section",content:{type:"post",body:_==null?void 0:_.content,canLike:P,createdAt:(_==null?void 0:_.time)||"",slugs:{question:`${t}/${n}`,parentId:t,activityId:_==null?void 0:_.id},slug:n,author:{id:(Q=_==null?void 0:_.actor)==null?void 0:Q.id,name:(W=_==null?void 0:_.actor)==null?void 0:W.data.name,organization:(X=_==null?void 0:_.actor)==null?void 0:X.data.organization,jobTitle:(se=_==null?void 0:_.actor)==null?void 0:se.data.jobTitle,image:{thumbnail:((re=_==null?void 0:_.actor)==null?void 0:re.data.thumbnail)||void 0}},userLiked:((oe=_==null?void 0:_.own_reactions)==null?void 0:oe.like)&&((ae=_==null?void 0:_.own_reactions)==null?void 0:ae.like.length)>0,likes:_&&(_==null?void 0:_.reaction_counts.like),comments:_&&(_==null?void 0:_.reaction_counts.reply)},originalAuthorId:(te=_==null?void 0:_.actor)==null?void 0:te.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(G,Z)=>A({activityInfo:G,content:Z})},likes:{createLike:()=>H({activityId:n}),deleteLike:()=>k({activityId:n})},comments:{openComments:()=>{}}},children:s.jsxs(s.Fragment,{children:[s.jsxs("h3",{children:["Comments (",((F=_==null?void 0:_.reaction_counts)==null?void 0:F.reply)||0,")"]}),s.jsx(Gn,{basePath:e,parentId:t,activityId:n,repliesList:(ee=_==null?void 0:_.latest_reactions)==null?void 0:ee.reply,isMember:r,functions:{createReply:a,like:c,unlike:f,editReply:d,join:h,leave:p}})]})},n)},eo=({id:e,data:{jobTitle:t,name:n,organization:r,thumbnail:i}})=>({id:e,name:n,jobTitle:t,organization:r,image:{thumbnail:i}});exports.ASSETS_BUCKET=Ze;exports.ActivitiesFeed=Qr;exports.ActivitySection=Kr;exports.AddPost=ot;exports.BannerSection=Gs;exports.Breadcrumbs=hr;exports.Button=z;exports.ButtonWrapper=Ne;exports.CacheProvider=Rn;exports.CollapsibleSection=At;exports.Columns=br;exports.CommunityDetails=fr;exports.Contributors=Cn;exports.ConversationContext=Le;exports.CookieBanner=In;exports.DiscussionConversation=Un;exports.DiscussionForm=Lt;exports.DiscussionLikes=Wn;exports.DiscussionPost=Be;exports.DiscussionThread=Yn;exports.Divider=ke;exports.DownloadSection=Ws;exports.EMAILS=Se;exports.EmailHelperTextBox=vr;exports.EmptyStateBox=Ie;exports.Filters=pr;exports.FlagsProvider=An;exports.Footer=Pt;exports.FullWidthSection=Rt;exports.GlobalProviders=mr;exports.Header=It;exports.HelperTextBox=jn;exports.HiddenFromScreenReaders=Mt;exports.HideShowTextBox=Zs;exports.HighlightedTextBox=be;exports.IntlProvider=Dn;exports.InviteForm=Qn;exports.InviteModal=Fr;exports.JoinButton=Ft;exports.LanguageSwitcher=_r;exports.Link=Pe;exports.LoadMore=Nn;exports.LoadingBlock=ir;exports.LoadingPlaceholder=fe;exports.LoadingState=$n;exports.Logo=Nt;exports.LogoSection=zs;exports.MarkdownText=Tt;exports.MarketingBox=Js;exports.Member=rt;exports.MembersList=Cr;exports.Modal=zn;exports.MoreMenu=Pn;exports.NUMBER_OF_USERS=Xs;exports.Overlay=Bt;exports.PageLayout=Tr;exports.PasswordRules=jr;exports.Pill=Sn;exports.ProfilePicture=st;exports.ProgressBar=En;exports.Rating=yr;exports.RepliesFeed=Gn;exports.ResponsesHeading=Pr;exports.ResponsiveImage=vn;exports.SearchForm=Hn;exports.Span=yn;exports.StatusBanner=qe;exports.Tags=Mr;exports.Tooltip=wn;exports.UserContext=ve;exports.UserProvider=Fn;exports.VisuallyHidden=ne;exports.addAriaProps=Vn;exports.getMember=Dt;exports.headerData=De;exports.mapGetStreamData=eo;exports.useCurrentPath=hn;exports.useEffectAfterMount=we;exports.useScreenWidth=Fe;exports.useScrollListener=gn;exports.useScrollToHash=Rs;
|
|
37
|
+
`))},[r]),g.useEffect(()=>{d==="ready-to-close"&&l("closing")},[d]);const f=({propertyName:p})=>{p==="max-height"&&l(x=>x==="opening"?"open":x==="closing"?"closed":x)};if(!r)return null;const h=["opening","open"].includes(d);return s.jsxs(be,{variant:"subtle",className:T("hide-show-text-box",e),children:[s.jsxs("div",{ref:u,className:T("content",d),children:[s.jsx(nt,{options:{forceBlock:!0},children:d==="closed"?o:r}),d!=="closed"&&i]}),s.jsx("p",{className:"cta",children:s.jsx(z,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:T({"rotate-180":h}),onClick:()=>{l(h?"ready-to-close":"opening")},children:h?n||c.formatMessage({id:"hideShowTextBox_hide"}):t||c.formatMessage({id:"hideShowTextBox_show"})})})]})},qs=()=>g.Fragment,Ks=({children:e})=>s.jsx(be,{variant:"secondary",children:e}),er=["span","strong","h1","h2","h3","h4","h5","h6","p"],tr=({children:e})=>{const t=C.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const c of g.Children.toArray(e))if(!(!c||typeof c=="string"||typeof c=="number"))if(g.isValidElement(c)&&c.type==="summary"){if(c.props&&c.props.children){for(const u of g.Children.toArray(c.props.children))if(!(!u||typeof u=="string"||typeof u=="number")&&g.isValidElement(u)){const o=u.type;if(er.includes(o)){for(n=u.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(c);const i=n?n.toString():"";return s.jsx(Dt,{label:i,className:["Sources","Resources"].includes(i)?"discrete-links":"",children:r.map(c=>c)})},nr=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return s.jsx(be,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return s.jsx(be,{variant:"primary",children:e});case"pink-textbox":return s.jsx(be,{variant:"tertiary",children:e});default:return s.jsx("div",{...t,children:e})}return s.jsx("div",{...t,children:e})},sr=e=>{const t=C.useIntl(),n=Date.now().toString();let r="default";const i=e.src;return i.includes("youtube")||i.includes("vimeo")?r="video":i.includes("riddle")||i.includes("sli.do")?r="poll":i.includes("padlet")&&(r="padlet"),s.jsxs(s.Fragment,{children:[s.jsx(ne,{children:s.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),s.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),s.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},sn=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},rr=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,i=!1;for(const c of g.Children.toArray(e))if(!(!c||typeof c=="string"||typeof c=="number")&&g.isValidElement(c)){const u=c.type;if(["button","center","span","strong"].includes(u)&&c.props&&c.props.children&&c.props.children[0])for((u==="button"||sn(c.props.children[0])==="button")&&(i=!0),r=c.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!g.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&sn(r)==="button"&&(i=!0);else break}return i?(n={...n,className:"button primary medium"},s.jsx("p",{className:"center",children:s.jsx(z,{variant:"primary",size:"medium",...n,children:r})})):s.jsx("a",{...n,children:r})},yn=({children:e})=>s.jsx("span",{children:e});const Tt=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:g.Fragment,forceBlock:!0,overrides:{a:rr,CollapsibleSection:Dt,TextBox:be,CaseStudy:Ks,style:qs,details:tr,div:nr,iframe:sr}};return s.jsx("div",{className:T("markdown-text",e),children:s.jsx(nt,{options:{...r,...t},children:n})})};const Sn=({size:e="medium",variant:t="default",className:n="",children:r})=>s.jsx("span",{className:T("pill",e,t,n),children:r});const qe=({element:e="p",children:t=null,className:n="",...r})=>g.createElement(e,{...r,className:T("status-banner text-small",n),"aria-live":"assertive"},t);const or=({progress:e=0,text:t=!1,className:n=""})=>{const r=C.useIntl(),i=e>75?100:e>50?75:e>25?50:e>5?25:0,c={"--progress":`${e}%`};return s.jsx("span",{className:T(`progress-bar section-${i}`,n),style:c,children:s.jsx(ne,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},En=g.memo(or);const ft="loadingBlock_",ar=({progress:e=0,steps:t=!1,className:n=""})=>{const r=C.useIntl();t||(t={0:{text:r.formatMessage({id:`${ft}loading`})},75:{text:r.formatMessage({id:`${ft}almostDone`})},100:{text:r.formatMessage({id:`${ft}complete`})}});let i=null;const c=Object.keys(t);for(let o=0;o<c.length&&!(e<parseInt(c[o]));o++)i=c[o];const u=i&&t[i].icon?{"--icon":`url(${Ze}icons/${t[i].icon}.svg)`}:{};return s.jsxs(be,{className:T("loading-block",n,{"has-icon":i&&t[i].icon}),variant:"subtle",style:u,children:[i&&s.jsx("span",{className:"step",children:t[i].text}),s.jsx(En,{progress:e})]})},ir=g.memo(ar);const fe=({element:e="div",className:t="",...n})=>s.jsx(Mt,{element:e,className:T("loading-placeholder",t),...n});const $t={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},Tn=(e,t)=>e in $t?s.jsx("div",{className:e,children:$t[e].map((n,r)=>Tn(n,r))},t):s.jsx(fe,{className:e},t),$n=({layout:e="overview-page"})=>s.jsx("div",{className:T("loading-state",e),children:$t[e].map((t,n)=>Tn(t,n))}),Mn=e=>{const t=e&&e.toUpperCase().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):""},We=["#5AB6A3","#A2D7AF","#806056","#3962B3"],lr=e=>{const t=Math.ceil(26/We.length),n=Mn(e).toLowerCase();if(n==="")return We[0];const r=n.charCodeAt(0)-96;for(let i=0;i<We.length;i++)if(r<=t*(i+1))return We[i]};const rn=256,st=({className:e="",src:t="",name:n,alt:r,width:i=rn,height:c=rn,...u})=>{const[o,a]=g.useState(!1),d=g.useRef(null);g.useEffect(()=>{const f=d.current;if(!f)return;const h=f.getContext("2d");if(!h)return;const p=i,x=c;typeof window<"u"&&window.devicePixelRatio&&(f.width=p*window.devicePixelRatio,f.height=x*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=lr(n),h.fillRect(0,0,p,x),h.font=`${p/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText(Mn(n),p/2,x/1.6)},[n]);let l=!1;return t&&t!==""&&!o&&(t.includes("http")||t.includes("//"))&&(l=!0),s.jsx("figure",{className:T("profile-picture",e,{error:o}),...u,children:l?s.jsx("img",{src:t,alt:r||n,onError:()=>{a(!0)},width:i,height:c}):s.jsx("canvas",{ref:d})})},Ft=e=>e==="apolitical"?{image:`${Ze}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ze}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},cr=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const i=e!=="",c=t!=="",u=n!=="";if(!i&&!c&&!u)return"";const o=`${e}${i&&c?` — ${t}`:t}`;let a=`${o}${(i||c)&&u?`, ${n}`:n}`;return a.length>r&&(a=o),a.length>r&&(a=tt(a,r)),a};const rt=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:r="member",gtmType:i="member-click",className:c=""})=>{const u=C.useIntl(),o=Ft(t);o.name||(o.name=u.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:a,url:d,image:l}=o,f=cr(o),h=n&&n.createdAt?As(n.createdAt):!1,p=n&&n.createdAt?Fs(n.createdAt):"";return g.createElement(e,{className:T("member text-medium",c),children:s.jsxs(Pe,{href:d,gtmType:i,gtmContext:r,onClick:x=>{x==null||x.stopPropagation()},children:[s.jsx(st,{name:a,src:l}),s.jsxs("p",{className:"details",children:[s.jsx("strong",{children:a}),n&&s.jsxs("span",{className:"additional-content",children:[n.createdAt&&h&&s.jsx("span",{className:"date",title:p,"aria-label":p,children:u.formatMessage({id:`dates_${h.path}`},{number:h.number})}),n.didEdit&&s.jsx("em",{children:u.formatMessage({id:"discussion_edited"})})]}),f&&s.jsx("small",{children:f})]})]})})};const on={small:24,medium:48},Cn=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:i,showGap:c,showPlaceholders:u}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,className:a=""})=>{const d=C.useIntl();return!n||n.length===0?null:g.createElement(e,{className:T("contributors",a,i,{"has-gap":c}),children:s.jsxs(s.Fragment,{children:[s.jsx("ul",{children:n.map((l,f)=>{let h,p="";if(f<o){const{name:x="",image:y=""}=Ft(l);if(u)return s.jsx(fe,{element:"li",className:"contributor"},f);h=s.jsx(st,{name:x,src:y,width:on[i||"medium"],height:on[i||"medium"]})}else if(f===o){const x=(t||n.length)-o;h=s.jsxs("small",{className:T({"large-number":x>99}),children:["+",Os(x,0)]}),p="number-left"}return h?s.jsx("li",{className:T("contributor",p),children:h},f):null})}),r&&s.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?d.formatMessage({id:`member_${n[0]}`}):tt(n[0].name||"",20):null})]})})},Rn=({showDevTools:e=!0,children:t})=>{const n=new J.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return s.jsxs(J.QueryClientProvider,{client:n,children:[t,e&&s.jsx(bs.ReactQueryDevtools,{initialIsOpen:!1})]})};var ur=g.createContext({client:Xe});function dr(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,c=g.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&&i&&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&&(Xe.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),Xe.init(r,i)),Xe)},[n,r]);return g.createElement(ur.Provider,{value:{client:c}},t)}const Dn=({children:e,user:t})=>t.isLoading?s.jsx(s.Fragment,{}):process.env.REACT_APP_PUBLIC_POSTHOG_KEY?s.jsx(dr,{apiKey:atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),options:{api_host:"https://eu.posthog.com",autocapture:!1,secure_cookie:!0,bootstrap:{distinctID:t.id||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!t.id}},children:e}):e,Fn=({children:e,locale:t,messages:n})=>{const r=t||"en",i={...Bs[r],...n||{}};return s.jsx(C.IntlProvider,{locale:r,messages:i,children:e})},ve=g.createContext(null),An=({children:e,user:t})=>s.jsx(ve.Provider,{value:t,children:e}),mr=({bootstrap:e,children:t,intl:n})=>{const[r,i]=g.useState({isLoading:!0});return g.useEffect(()=>{e().then(c=>i({...c,isLoading:!1})).catch(()=>i({isLoading:!1}))},[]),s.jsx(Fn,{locale:n==null?void 0:n.locale,messages:n==null?void 0:n.messages,children:s.jsx(An,{user:r,children:s.jsx(Rn,{children:s.jsx(Dn,{user:r,children:t})})})})};const ht="joinCommunityButton",At=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:r}={join:()=>{},leave:()=>{}}})=>{const i=C.useIntl(),c=g.useContext(ve),u=c&&typeof c.id=="string",[o,a]=g.useState(e),[d,l]=g.useState(e?"joined":"notJoined");g.useEffect(()=>{d==="joining"?l("joined"):d==="leaving"&&l("notJoined")},[o]);const f={},h={};return o&&d!=="leaving"&&(f["data-hover-text"]=i.formatMessage({id:`${ht}_leave`}),f["aria-label"]=i.formatMessage({id:`${ht}_member_aria`}),h["aria-hidden"]="true"),s.jsx(z,{variant:o?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:o&&d!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async p=>{u&&(p.currentTarget.blur(),o?(l("leaving"),typeof r=="function"&&await r()):(l("joining"),typeof n=="function"&&await n()),a(!o))},className:T("join-community-button",d,{active:d==="joining"}),disabled:!u,...f,children:s.jsx("span",{className:"text",...h,children:i.formatMessage({id:`${ht}${["joining","leaving"].includes(d)?`_${d}`:o?"_member":t?"_short":""}`})})})};const pt="communityDetails_",fr=({isMember:e=!1,slug:t,members:{number:n,data:r}={number:void 0,data:[]},className:i="",...c})=>{const u=C.useIntl(),o=n||(r==null?void 0:r.length)||0;return s.jsxs("div",{className:T("community-details",i),children:[s.jsx(ke,{}),s.jsxs("div",{className:"member-details",children:[s.jsxs("div",{className:"top",children:[s.jsxs("h3",{children:[u.formatMessage({id:`${pt}members`}),s.jsx("span",{className:"count",children:o})]}),s.jsx("p",{className:"text-small",children:s.jsx("a",{href:`/communities/${t}/members`,children:u.formatMessage({id:`${pt}viewAll`})})})]}),s.jsx(Cn,{contributors:{total:n,data:r!=null&&r.length?r:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:o===0},cutoff:5})]}),s.jsx(At,{isMember:e,...c}),e&&s.jsx(z,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:u.formatMessage({id:`${pt}invite`})})]})};const hr=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const r=C.useIntl();return s.jsxs(s.Fragment,{children:[s.jsx(ne,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),s.jsx("ul",{className:T("breadcrumbs text-small",n),children:e.map(({text:i,href:c,current:u=!1},o)=>s.jsxs("li",{children:[u&&s.jsx(ne,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),s.jsx(Pe,{href:u?void 0:c,children:tt(i,t)})]},`${window.btoa(i)}_${o}`))})]})};const pr=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:i=""})=>{const c=C.useIntl(),u=t?[{id:"all",text:typeof t!="boolean"&&t.text||c.formatMessage({id:"filters_all"})},...e]:e,[o,a]=g.useState(t?["all"]:[]),d=(l,f)=>{let h=[];o.includes(l)?h=o.filter(p=>p!==l):l==="all"?h=["all"]:n?h=[...o.filter(p=>p!=="all"),l]:h=[l],a(p=>(r&&typeof r=="function"&&r({current:h,previous:p}),h)),f&&typeof f=="function"&&f()};return s.jsx("ul",{className:T("filters",i),children:u.map(({id:l,text:f,disabled:h=!1,callback:p=()=>{}})=>{let x={};return h&&(x={disabled:!0,"aria-label":c.formatMessage({id:"filters_disabled"},{name:f})}),s.jsx("li",{children:s.jsx("button",{className:T(l,{selected:o.includes(l)}),onClick:y=>{y.preventDefault(),y.stopPropagation(),d(l,p)},...x,children:f})},l)})})},gr=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let r="";return t.forEach(({url:i,position:c})=>{c==="before-lang"?r+=`/${i}`:(r.includes(`/${n}/`)||(r+=`/${n}`),r+=`/${i}`)}),r.includes(`/${n}/`)||(r+=`/${n}`),r};const gt={en:"English",es:"Español",fr:"Français",pt:"Português"},ze="languageSwitcher_",_r=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:r,onChange:i=()=>{},urlParts:c,variant:u="default",label:o,className:a=""})=>{const d=C.useIntl(),[l,f]=g.useState(e);if(g.useEffect(()=>{e!==l&&f(e)},[e]),!r||!Object.values(r).some(y=>y&&y.post_name))return null;const p=Object.keys(r),x=l!==e;return s.jsxs("div",{className:T("language-switcher text-small",u,a),children:[s.jsxs("nav",{children:[u!=="short"&&s.jsx("p",{children:o||d.formatMessage({id:`${ze}label`})}),s.jsx("ul",{children:p.map(y=>{if(!gt[y])return null;let _={className:y};return l===y?_["aria-label"]=d.formatMessage({id:`${ze}selected`},{language:gt[y]}):_={..._,href:gr(y,c),onClick:E=>{E.preventDefault(),E.stopPropagation(),f(y),i(y)}},s.jsx("li",{children:s.jsx(Pe,{..._,fallbackElement:"span",children:gt[y]})},y)})}),u!=="short"&&!x&&s.jsx("p",{children:d.formatMessage({id:`${ze}translation_${t?"original":n?"human":"machine"}`})})]}),u!=="short"&&!x&&!t&&!n&&s.jsx("small",{children:d.formatMessage({id:`${ze}disclaimer`},{email:Se.support,link:y=>{const _=`mailto:${y}`;return s.jsx("a",{href:_,children:y})}})})]})};const _t=C.createIntl({locale:"en",messages:Ct}),Nn=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:i=!1,messages:c={button:_t.formatMessage({id:"loadMore_button"}),endOfFeed:_t.formatMessage({id:"loadMore_endOfFeed"}),error:_t.formatMessage({id:"loadMore_error"})},className:u="",gtmContext:o="LoadMore"})=>{const[a,d]=g.useState(!1),[l,f]=g.useState(!1);if(t<=0||t<n*e)return null;const h=async p=>{try{await r(p)}catch(x){x instanceof Error&&x.message&&x.message.includes("Cannot read items")?f(!0):d(!0)}};return s.jsxs("footer",{className:T("load-more",u),children:[a&&s.jsx("p",{className:"error",children:c.error}),l?s.jsx("p",{children:c.endOfFeed}):s.jsx(z,{variant:"secondary",icon:i,onClick:h,"data-gtm-event-context":o,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:c.button})]})};let Ve=!1;const Pn=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const i=C.useIntl(),c=g.useRef(null),[u,o]=g.useState(!1),a=d=>{c.current&&d.target instanceof HTMLElement&&!c.current.contains(d.target)&&o(!1)};return g.useEffect(()=>(document.addEventListener("click",a,!0),()=>{document.removeEventListener("click",a,!0)})),g.createElement(e,{ref:c,className:T("more-menu text-medium",r),children:s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>o(!u),"aria-haspopup":"true","aria-expanded":u,"aria-controls":t,screenreaderText:i.formatMessage({id:"moreMenu"})}),s.jsx("ul",{id:t,hidden:!u,children:n.map(({href:d,onClick:l,text:f,icon:h,...p},x)=>{const y={...p,onClick:_=>{o(!1),typeof l=="function"&&l(_)},onFocus:()=>{Ve&&(clearTimeout(Ve),Ve=!1)},onBlur:()=>{Ve=setTimeout(()=>{o(!1)},100)}};return d&&(y.href=d),s.jsx("li",{children:s.jsx(z,{variant:"tertiary",size:"medium",icon:h?{icon:h,position:"left"}:!1,...y,children:f})},`${window.btoa(f)}_${x}`)})})]})})};const Nt=({variant:e="default",version:t="default",className:n="",...r})=>s.jsx("p",{className:"logo-wrapper",children:s.jsx("a",{href:"/home/",className:T("logo",e,t,n),...r,children:s.jsx(ne,{children:s.jsx(C.FormattedMessage,{id:"apolitical"})})})});const xr={"2-1":901},br=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const i=Ae(!0);let c=r;return g.Children.count(r)===1&&(c=g.Children.toArray(r)[0],c.props&&(c=c.props.children)),s.jsx("section",{className:T("columns",`layout-${e}`,n),children:g.Children.map(c,(u,o)=>t!==!1&&o===t&&i&&i<xr[e]?null:u)})};const xt="cookieBanner_",bt=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],vt=new Date(Date.now()+12*30*24*60*60*1e3),In=()=>{const e=C.useIntl(),[t,n,r]=dn.useCookies(bt),[i,c]=g.useState(!t["apol-cookie-banner"]),u=()=>{bt.forEach(l=>{n(l,!0,{path:"/",expires:vt,domain:l==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),c(!1),window.location.reload()},o=()=>{n("apol-cookie-banner",!0,{path:"/",expires:vt}),bt.forEach(l=>{if(l==="apol-cookie-banner"){n(l,!0,{path:"/",expires:vt});return}r(l)}),c(!1)};if(!i)return null;const a=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:o,gtmType:"reject-all"},{id:"accept",onClick:u,gtmType:"accepted-all"}],d=[];return a.forEach(l=>{d.push({variant:l.href?"tertiary":"primary",href:l.href,onClick:l.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${l.gtmType}-click`,children:e.formatMessage({id:`${xt}buttons_${l.id}`})})}),s.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[s.jsx("h6",{children:e.formatMessage({id:`${xt}title`})}),s.jsx("p",{children:e.formatMessage({id:`${xt}text`})}),s.jsx(Ne,{buttons:d})]})},xe={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:Se["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:Se["data-protection"].eu,gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:Se.support,gtmType:"concierge-email-click"},business:{email:Se.general,gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Ee="footer_",Ke="SiteFooter",an=({group:e})=>{const t=xe[e].order||[];let n=!1;return"text"in xe[e]&&(n=xe[e].text),s.jsxs(g.Fragment,{children:[s.jsx("p",{className:"pre-title",children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}`})}),Array.isArray(t)&&t.length>0&&s.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:i,gtmType:c}=xe[e][r],u={};return["legal"].includes(e)&&(u.target="_blank",u.rel="noopener"),s.jsx("li",{children:s.jsx("a",{href:i,className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":c,...u,children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&s.jsx("dl",{className:"text-medium",children:n.order.map(r=>s.jsxs(g.Fragment,{children:[s.jsx("dt",{children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}_${r}`})}),s.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&s.jsx("address",{children:s.jsx(C.FormattedMessage,{id:`${Ee}${e}_${r}_address`,values:{br:s.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&s.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Pt=()=>s.jsx("div",{id:"footer",children:s.jsxs("div",{className:"wrapper",children:[s.jsx(Mt,{element:"hr"}),s.jsx(Nt,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":"logo-homepage-link"}),s.jsx("footer",{children:["platform","community","company","contact"].map(e=>s.jsxs("div",{className:"group",children:[s.jsx(an,{group:e}),Object.keys(xe[e]).includes("child")&&s.jsx(an,{group:xe[e].child})]},e))}),s.jsx("hr",{}),s.jsxs("div",{className:"sub-footer",children:[s.jsx("ul",{children:Array.isArray(xe.social.order)&&xe.social.order.map(e=>{const t=xe.social[e];return s.jsx("li",{className:e,children:s.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ke,"data-gtm-event-type":"social-click",children:s.jsx("span",{className:"hidden",children:s.jsx(C.FormattedMessage,{id:`${Ee}social_${e}`})})})},e)})}),s.jsx("small",{children:s.jsx(C.FormattedMessage,{id:`${Ee}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Ye="emailHelperTextBox_",vr=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const i=C.useIntl(),[c,u]=g.useState({path:`${Ye}default`,type:"default",link:{},mail:{},error:""}),[o,a]=g.useState(!1),d=g.useCallback(p=>{p.preventDefault(),p.stopPropagation();const x=y=>{u({path:`${Ye}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>d(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:y})};if(typeof r!="function"){x(i.formatMessage({id:`${Ye}error_noFunction`}));return}a(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(y=>{x(y.message)}).finally(()=>{a(!1)})},[t,n,r]);g.useEffect(()=>{let p=Ye,x="default",y={},_={};switch(e){case"gov":p+="autoApproved",x="success";break;case"nonGov":p+="unrecognisedEmail",x="error",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",x="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",x="error",y={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:E=>d(E),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",x="error",y={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}u({...c,path:p,type:x,link:y,mail:_})},[e]);const l={};return["link","mail"].forEach(p=>{l[p]=Object.keys(c[p]).length?x=>s.jsx("a",{...c[p],children:x}):x=>x}),s.jsx(jn,{type:c.type,heading:o?!1:i.formatMessage({id:`${c.path}_title`}),children:o?s.jsxs(s.Fragment,{children:[s.jsx(fe,{element:"span"}),s.jsx(fe,{element:"span"})]}):i.formatMessage({id:`${c.path}_text`},{...l,strong:p=>s.jsx("strong",{children:p}),em:p=>s.jsx("em",{children:p}),br:s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx("br",{})]}),error:c.error})})};const Ge="passwordRules_",Ln="isMoreThanEightCharacters",Bn="includesNumberAndSymbol",On="includesLowerAndUppercase",wr={[Ln]:"8Characters",[Bn]:"numberSymbol",[On]:"lowercaseUppercase"},kr=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=C.useIntl();return s.jsxs("aside",{className:T("password-rules",t),children:[s.jsx("small",{children:n.formatMessage({id:`${Ge}intro`})}),s.jsx("ul",{children:[Ln,Bn,On].map(r=>s.jsxs("li",{className:T({matches:e[r]}),children:[s.jsxs(ne,{children:[n.formatMessage({id:`${Ge}rule_label`})," "]}),s.jsx("span",{children:n.formatMessage({id:`${Ge}rule_${wr[r]}`})}),!e[r]&&s.jsxs(ne,{element:"strong",children:[" "," ",n.formatMessage({id:`${Ge}notMet`})]})]},`rule-${r}`))})]})},jr=g.memo(kr);const yr=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:i=()=>{}},className:c="",hasLoaded:u=!1})=>{const o=C.useIntl(),[a,d]=g.useState({setUp:!1,id:null,rating:null,disabled:!0}),l=async()=>{try{const E=await n();d(j=>({...j,setUp:!0,id:E&&E.id,disabled:!1}))}catch(E){d(j=>({...j,setUp:!0,disabled:!0})),i(E)}};if(g.useEffect(()=>{u&&!a.setUp&&l()},[u]),!u)return s.jsx(fe,{className:"rating-placeholder"});const{id:f,rating:h,disabled:p}=a,x="ratings_",y={text:o.formatMessage({id:`${x}text`}),low:o.formatMessage({id:`${x}low`}),high:o.formatMessage({id:`${x}high`}),success:o.formatMessage({id:`${x}success`}),...e},_=async E=>{if(!(!f||p))try{d(j=>({...j,rating:E,disabled:!0})),await r({id:f,value:E})}catch(j){d($=>({...$,rating:null})),i(j)}finally{d(j=>({...j,disabled:!1}))}};return s.jsxs("div",{className:T("rating",c),children:[s.jsx("span",{className:"label",children:y[h?"success":"text"]}),s.jsx("ol",{children:Array.from(new Array(t).keys()).map(E=>{const j=E+1;return s.jsx("li",{className:T({selected:h&&j<=h}),children:s.jsx(z,{variant:"tertiary",size:"small",icon:{icon:`star${!h||j>h?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${o.formatMessage({id:`${x}stars`},{number:j,total:t})}${j===1||j===t?` - ${y[j===1?"low":"high"]}`:""}`,onClick:$=>{$.preventDefault(),$.stopPropagation(),_(j)},disabled:p})},`rating-${j}`)})})]})};const Hn=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:i="search-bar",gtmEvent:c="form-submission"})=>{const{searchIsOpen:u=!0,isDesktopVersion:o=!1}=n||{},a=C.useIntl(),d=g.useRef(null);we(()=>{!n||o||!u||d.current&&d.current.focus()},[u]);const l=f=>{f.preventDefault(),f.stopPropagation(),!(!d.current||!d.current.value||d.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(d.current.value)}`)};return s.jsx("form",{onSubmit:l,className:T("search-form gtm-trackable",t),"data-gtm-event-context":i,"data-gtm-event-type":c,children:s.jsx("fieldset",{id:`${e}-form`,hidden:n?!u:!1,role:"search",children:s.jsxs("p",{children:[s.jsx(ne,{element:"label",htmlFor:e,children:a.formatMessage({id:"search_label"})}),s.jsx("input",{ref:d,type:"search",id:e,name:e,defaultValue:r,placeholder:a.formatMessage({id:"search_placeholder"}),onKeyDown:f=>{f.key==="Enter"&&l(f)}}),s.jsx("button",{className:"clear",onClick:f=>{f.preventDefault(),f.stopPropagation(),d.current&&d.current.value&&(d.current.value="")},children:s.jsx(ne,{children:a.formatMessage({id:"search_clear"})})}),s.jsx("button",{className:"search",onClick:l,children:s.jsx(ne,{children:a.formatMessage({id:"search_cta"})})})]})})})};const Qn=({title:e,label:t,ctaMessage:n,titleColor:r,labelColor:i,backgroundColor:c,onClose:u,reportError:o,sendInvites:a,initialFormStatus:d="NOT_SUBMITTED"})=>{const[l,f]=g.useState([]),[h,p]=g.useState(!0),[x,y]=g.useState(d),{formatMessage:_}=C.useIntl(),E=async R=>{R.preventDefault();try{await a(l),f([]),y("SUCCESS")}catch(D){y("ERROR"),o(D)}},j=R=>{R.preventDefault(),y("NOT_SUBMITTED"),p(!0),f([])},$=R=>{R.preventDefault(),u(),y("CLOSED")};return x==="CLOSED"?null:x==="ERROR"||x==="SUCCESS"?s.jsxs("div",{className:"invite-form-wrapper",children:[s.jsx("div",{className:"content centred",children:x==="SUCCESS"?s.jsx("h2",{className:"success-title",children:_({id:"inviteForm_success"})}):s.jsxs("h2",{className:"error-title",children:[" ",_({id:"inviteForm_error"})]})}),s.jsx(ke,{}),s.jsx("div",{className:"footer",children:x==="SUCCESS"?s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"secondary",onClick:j,children:_({id:"inviteForm_ctaSendMoreInvites"})}),s.jsx(z,{onClick:$,children:_({id:"inviteForm_ctaDone"})})]}):s.jsx(z,{onClick:j,children:_({id:"inviteForm_ctaTryAgain"})})})]}):s.jsx("div",{className:"invite-form-wrapper",children:s.jsxs("form",{style:{backgroundColor:c},onSubmit:E,className:T("invite-form gtm-trackable"),children:[s.jsxs("fieldset",{className:"content",children:[s.jsx("h2",{className:"title",style:{color:r},children:e}),s.jsx("label",{htmlFor:"email-input",className:"label",style:{color:i},children:t}),s.jsx(vs.ReactMultiEmail,{id:"email-input",inputClassName:"email-input input",placeholder:_({id:"inviteForm_email_placeholder"}),emails:l,onChange:R=>{f(R),p(!R.length)},autoFocus:!1,getLabel:(R,D,B)=>s.jsxs("div",{className:"email text-medium",children:[s.jsx("div",{"data-tag-item":!0,children:R}),s.jsx(z,{variant:"tertiary",size:"small",icon:{icon:"close"},onClick:()=>{B(D),p(!l.length)},className:"remove-email-button",screenreaderText:_({id:"overlay_close"})})]},D)})]}),s.jsx(ke,{}),s.jsx("fieldset",{className:"footer",children:s.jsx(z,{className:"sendEmailsButton",disabled:h,children:n})})]})})},O={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=c=>{const u=`logged${e?"In":"Out"}`;return t>=n[c][u]};let i={};return["navigation","search"].forEach(c=>{i[c]=r(c)}),i},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(i=>i===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const i=Date.now();if(!t&&O.handlerCalled[e]&&i-O.handlerCalled[e]<500)return;O.handlerCalled[e]=i;let c=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(u=>{u===e||n[u]===!1||c.push({type:`menus.${u}`,value:!1})}),r(c)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const i=mn(e[r],t);if(!(typeof i>"u")&&(!n||i[t]&&i[t].includes(n)||i.value&&i.value.includes(n)||i.toString().includes(n)))return e[r]}return e[0].children?O.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:i})=>{if(!t.current||!t.current.children)return;const c=n?"desktop":"default";if(r[e][c]){r[e][c].focus();return}let u,o;switch(e){case"navigation":if(n){const a=O.findFirstChild(t.current.children,"attributes.aria-controls","navigation");u=O.findFirstChild(a.children,"href")}else u=O.findFirstChild(t.current.children,"href");u||(u=t.current);break;case"account":if(o=O.findFirstChild(t.current.children,"className","account"),!o||!o.children)return;u=O.findFirstChild(o.children,"href");break;default:return}u&&(i([{type:`focusElements.${e}.${c}`,value:u}]),u.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(O.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(O.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(O.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{O.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Fe={order:["home","topics","partners","account"],home:{href:"/home/",hasVariantText:!0,gtmType:"homepage-click"},topics:{order:["explore","topics"],menuId:"navigation",explore:{order:["events","courses","q-and-a","articles"],events:{href:"/events/",className:"icon events"},courses:{href:"/microcourses/",gtmType:"microcourses-click",className:"icon courses"},"q-and-a":{href:"/questions-answers/",className:"icon q-and-a"},articles:{href:"/solution-articles/",gtmType:"articles-click",className:"icon articles"}},topics:{order:["climate","cities-and-local-government","digital-and-data","education","equity-justice-and-inclusion","health-and-social-care","innovation","leadership-and-skills","life-in-government","policymaking","transport-and-infrastructure","work-and-the-economy"],className:"columns",climate:{href:"/topics/climate/"},"cities-and-local-government":{href:"/topics/cities-and-local-government/"},"digital-and-data":{href:"/topics/digital-and-data/"},education:{href:"/topics/education/"},"equity-justice-and-inclusion":{href:"/topics/equity-justice-and-inclusion/"},"health-and-social-care":{href:"/topics/health-and-social-care/"},innovation:{href:"/topics/innovation/"},"leadership-and-skills":{href:"/topics/leadership-and-skills/"},"life-in-government":{href:"/topics/life-in-government/"},policymaking:{href:"/topics/policymaking/"},"transport-and-infrastructure":{href:"/topics/transport-and-infrastructure/"},"work-and-the-economy":{href:"/topics/work-and-the-economy/"}}},partners:{href:"/partnerships/",onlyShow:"logged-out"},account:{order:["profile","settings","log-out"],className:"account",onlyShow:"logged-in",doTrack:!1,profile:{href:"/profiles/me"},settings:{href:"/profiles/me/manage-account"},"log-out":{href:"/user-onboarding/logout",className:"divider"}},buttons:{order:["login","signup"],login:{href:"/user-onboarding/login"},signup:{href:"/signup/?ref=header-banner",props:{variant:"primary"}}}},et=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:i=()=>{},doTrack:c=null})=>{const u=C.useIntl(),o=mn(Fe,e);if(!o||o.onlyShow&&(o.onlyShow==="logged-in"&&!t||o.onlyShow==="logged-out"&&t))return null;const a="doTrack"in o,d=c===null?a?o.doTrack:!0:c,l=e.includes("buttons.");let f=`header_${e.replaceAll(".","_")}`;o.hasVariantText&&(f+=`_logged${t?"In":"Out"}`);let h=!1;if(o.href){let j=o.gtmType||`${e}-click`;if(j.includes(".")){const $=j.split("."),R=$[$.length-2];j=`${R==="topics"?`${R}-`:""}${$[$.length-1]}`}h={href:o.href,role:"menuitem"},d&&(h={...h,className:"gtm-trackable","data-gtm-event-type":j,"data-gtm-event-context":"HeaderButtons"}),l&&(h={...h,variant:"secondary",size:{mobile:"small",881:"large"},...o.props||{}})}const p=o.order&&o.order[0]&&o[o.order[0]],x=p&&o[o.order[0]].order,y=h&&window.location.pathname===o.href;let _={},E={};if(p){const j=o.menuId||e,$={onClick:R=>O.events.onClick(R,{id:j,callback:i,isOpen:r[j]}),onFocus:()=>O.events.onFocus({id:j}),onBlur:()=>O.events.onBlur({id:j,callback:i}),onMouseLeave:()=>O.events.onBlur({id:j,callback:i}),onMouseEnter:()=>O.events.onMouseEnter({id:j,callback:i})};n&&(x&&(_={...$,onKeyPress:R=>{R.key==="Enter"&&O.events.onClick(R,{id:j,callback:i,isOpen:r[j]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[j],"aria-controls":j}),E={hidden:j in r?!r[j]:!0}),x||(E={...E,...$})}return s.jsxs("li",{className:T({[o.className]:o.className,"has-submenu":p,parent:x,active:y}),role:"none",..._,children:[h?g.createElement(l?z:"a",h,u.formatMessage({id:f})):u.formatMessage({id:f}),o.order&&s.jsx("ul",{...E,children:o.order.map(j=>{if(!o[j])return null;const $={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:i,doTrack:a?d:null};return o[j].order?s.jsxs("li",{className:T({[o[j].className]:o[j].className}),children:[u.formatMessage({id:`${f}_${j}`}),s.jsx("ul",{children:o[j].order.map(R=>s.jsx(et,{id:`${e}.${j}.${R}`,...$},R))})]},j):s.jsx(et,{id:`${e}.${j}`,...$},j)})})]},e)};const Sr={height:67,height_desktop:83},It=()=>{const e=C.useIntl(),t=g.useContext(ve),n=Ae(!0,!0),r=t&&typeof t.id=="string",i=g.useMemo(()=>O.getIsDesktopVersion(r,n),[r,n]),[c,u]=g.useReducer(Ds,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:o,menus:a,focusElements:d}=c;gn({scrollPosition:Sr[`height${i.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!i&&a.navigation||O.shouldChangeHeaderIsVisible(!0,a,u)},scrollDown:()=>{!i&&a.navigation||O.shouldChangeHeaderIsVisible(!1,a,u)}}});const l=(h,p)=>{O.handleMenus({id:h,value:p,menus:a,dispatch:u})},f=g.useRef(null);return we(()=>{a.navigation&&O.autoFocus({menu:"navigation",navigationRef:f,isDesktopVersion:i.navigation,focusElements:d,dispatch:u})},[a.navigation]),we(()=>{a.account&&O.autoFocus({menu:"account",navigationRef:f,isDesktopVersion:i.navigation,focusElements:d,dispatch:u})},[a.account]),t&&t.isLoading?null:s.jsxs(s.Fragment,{children:[s.jsxs("nav",{id:"header",className:T({"logged-in":r,"logged-out":!r,visible:o}),children:[s.jsx(ne,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),s.jsx(Nt,{}),!i.navigation&&s.jsx("button",{className:"menu-button gtm-trackable",onClick:h=>{h.preventDefault(),h.stopPropagation(),l("navigation",!a.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":a.navigation,"aria-controls":"navigation",children:s.jsx(ne,{children:e.formatMessage({id:`header_menu_${a.navigation?"hide":"show"}`})})}),s.jsx("ul",{ref:f,id:"navigation",hidden:i.navigation||a.account?!1:!a.navigation,role:"menu","data-showing":!i.navigation&&a.account?"account":"default",children:Fe.order.map(h=>s.jsx(et,{id:h,isLoggedIn:r,isDesktopVersion:i.navigation,menus:{navigation:a.navigation,account:a.account},callback:l},h))}),!i.search&&s.jsx("button",{className:"search toggle-search-button",onClick:h=>{h.preventDefault(),h.stopPropagation(),l("search",!a.search)},"aria-haspopup":"true","aria-expanded":a.search,"aria-controls":"search-form",children:s.jsx(ne,{children:e.formatMessage({id:`header_search_${a.search?"hide":"show"}`})})}),s.jsx(Hn,{id:"global-search",handleToggle:{searchIsOpen:a.search,isDesktopVersion:i.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?s.jsxs("button",{className:"account-button",onClick:h=>O.events.onClick(h,{id:"account",callback:l,isOpen:a.account}),onMouseEnter:()=>O.events.onMouseEnter({id:"account",callback:l}),onMouseLeave:()=>O.events.onBlur({id:"account",callback:l}),"aria-haspopup":"true","aria-expanded":a.account,"aria-controls":"navigation",children:[s.jsx(ne,{children:e.formatMessage({id:`header_account_${a.account?"hide":"show"}`})}),s.jsx(st,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):s.jsx("ul",{className:"sign-in-buttons",children:Fe.buttons.order.map(h=>s.jsx(et,{id:`buttons.${h}`},h))})]}),s.jsx("hr",{id:"content-of-page"}),s.jsx("div",{className:T("overlay",{open:a.navigation||a.account||!i.search&&a.search})})]})};const Er=()=>{const e=C.useIntl();return s.jsxs(s.Fragment,{children:[s.jsx(It,{}),s.jsx("div",{className:"content",children:s.jsx(Ie,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),s.jsx(Pt,{})]})},Tr=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:i="",locale:c="en"})=>{const u=hn();g.useEffect(()=>{window.scrollTo(0,0)},[u]);const o=bn(e,{locale:c});return s.jsx(ws.ErrorBoundary,{onError:t,fallback:s.jsx(Er,{}),children:s.jsx(g.Suspense,{fallback:s.jsx($n,{layout:"overview-page"}),children:s.jsx("div",{id:"wrapper",className:T(i,{[r]:r!=="default"}),children:s.jsxs(dn.CookiesProvider,{children:[s.jsx(It,{}),s.jsx("div",{className:"content",children:o}),n&&s.jsx(Pt,{}),s.jsx(In,{})]})})})})},ln={default:"tags_",headerTopics:"header_topics_topics_"},wt={topic:{Climate:"climate",CitiesAndLocalGovernment:"cities-and-local-government",DigitalAndData:"digital-and-data",Education:"education",EquityJusticeAndInclusion:"equity-justice-and-inclusion",HealthAndSocialCare:"health-and-social-care",Innovation:"innovation",LeadershipAndSkills:"leadership-and-skills",LifeInGovernment:"life-in-government",Policymaking:"policymaking",TransportAndInfrastructure:"transport-and-infrastructure",WorkAndTheEconomy:"work-and-the-economy"},"from the community":"community"},$r={getTagDetails:e=>{if(e.includes("topic_")){if(e=wt.topic[e.replace("topic_","")],e){const t=Fe.topics.topics[e].href;return t?{id:e,href:t,text:`${ln.headerTopics}${e}`}:null}return null}return wt[e]?(e=wt[e],{id:e,text:`${ln.default}${e}`}):null}};const Mr=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:i="",gtmType:c="tag-click",gtmContext:u="tags"})=>{const o=C.useIntl();if(!e||e.length<1)return null;const a=[];return e.forEach(d=>{if(!d)return;const l=$r.getTagDetails(d);l&&a.push(l)}),a.length<1?null:s.jsx("ul",{className:T("tags text-small",t,i,{"one-line":n}),children:a.map(d=>{const l=o.formatMessage({id:d.text});return s.jsx("li",{children:d.href&&r?s.jsx("a",{href:d.href,className:"gtm-trackable","data-gtm-event-type":c,"data-gtm-event-context":u,children:l}):l},d.id)})})};const Cr=({members:{total:e,data:t=[]},pagination:n,gtmContext:r="member",gtmType:i="member-click",className:c=""})=>{const u=C.useIntl();return t.length===0?null:(e||(e=t.length),s.jsxs("div",{className:T("members-list",c),children:[s.jsxs("h1",{children:[u.formatMessage({id:"membersList"}),s.jsx("span",{className:"count",children:e})]}),s.jsx("ul",{children:t.map((o,a)=>s.jsxs("li",{children:[s.jsx(rt,{member:o,gtmContext:r,gtmType:i}),o.isAdmin&&s.jsx(Sn,{children:u.formatMessage({id:"membersList_admin"})})]},a))}),n&&s.jsx(Nn,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:r})]}))};let Je=null;const ce="discussion_form_",Lt=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:i=5e4,minRows:c=4,forceShow:u={cancel:!1,error:!1},functions:o={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:a="DiscussionForm"})=>{var v,H;const d=C.useIntl(),l=g.useContext(ve),[f,h]=g.useState(n.isEditing&&n.isEditing.text||""),[p,x]=g.useState(u.error||!1),[y,_]=g.useState(!1),E=g.useRef(null);if(r||(r=E),n.isLoading)return s.jsx(fe,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const j=k=>{const Y=k.target.value;h(Y);let P;!l||!l.id?P=me(d.formatMessage,`${ce}error_loggedOut`,e.type,"action"):t?Y.length>=i&&(P=`${ce}error_tooLong`):P=me(d.formatMessage,`${ce}error_noPermission`,e.type,"action"),P?x(P):p&&x(!1)};let $=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const k=e.type==="response"?((v=e.slugs)==null?void 0:v.question)||"":((H=e.slugs)==null?void 0:H.answer)||"";k&&($=`${$}-${k.slice(-15)}`)}const R=async k=>{var P;if(k.preventDefault(),k.stopPropagation(),!l||!l.id||!t||B)return;Je&&clearTimeout(Je),_("submitting");const Y=window.location.pathname;try{let I;switch(e.type){case"post":I=await o.create({content:f});break;case"question":I=await o.create({title:f,authorId:l&&l.id,...(P=o.props)==null?void 0:P.create});break;case"response":I=await o.create({question:e.slugs.question},{body:f,authorId:l&&l.id,contentPath:Y});break;case"reply":I=await o.create({question:e.slugs.question,answer:e.slugs.answer},{body:f,authorId:l&&l.id,contentPath:Y});break;default:break}await Ns(1e3),o.callback&&await o.callback(I),Je=setTimeout(()=>{h(""),_("submitted"),D()},500)}catch(I){const Q=I;let W=`${ce}error`;Q.message.includes("entry already exists")&&(W=me(d.formatMessage,`${ce}error_alreadyExists`,e.type,"action")),Q.message.includes("429")?W=me(d.formatMessage,`${ce}error_tooMany`,e.type,"action"):Q.message.includes("400")&&(W=`${ce}error`),x(W),D()}},D=()=>{Je=setTimeout(()=>{x(!1),_(!1)},5e3)},B=!f||!Hs(f),V=y==="submitting",b=[];return(n.isEditing&&!V||u.cancel)&&b.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:o.handleCancel,className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!u.cancel&&(!l||!l.id||!f),children:d.formatMessage({id:`${ce}cancel`})}),b.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:k=>{if(n.isEditing){_("submitting"),o.handleSaveEdit&&o.handleSaveEdit(E.current&&"value"in E.current?E.current.value:"");return}R(k)},className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!l||!l.id||!t||B||V||n.isEditing&&f===n.isEditing.text,children:d.formatMessage({id:`${ce}${V?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),s.jsxs("form",{id:$,className:T("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&s.jsx("h2",{children:me(d.formatMessage,`${ce}title`,e.type,"action")}),s.jsx(rt,{member:l||"community",gtmContext:a,gtmType:"profile-click"}),s.jsx(ne,{element:"label",showOnFocus:!1,htmlFor:`${$}-input`,children:me(d.formatMessage,`${ce}label`,e.type,"action")}),s.jsx(ks,{ref:r,id:`${$}-input`,name:e.type,placeholder:me(d.formatMessage,`${ce}placeholder`,e.type,"action"),onChange:j,value:f,maxLength:i,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:c,autoFocus:!!n.isEditing}),s.jsx("small",{children:me(d.formatMessage,`${ce}explainer`,e.type,"action",{a:k=>s.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":"community-guidelines-link",rel:"noreferrer",children:k})})}),s.jsx(Ne,{buttons:b}),y==="submitted"&&s.jsx(qe,{className:"success","data-testid":"success",children:me(d.formatMessage,`${ce}success`,e.type,"action")}),p&&s.jsx(qe,{id:"error-message",className:"error","data-testid":"error",children:u.error?u.error:typeof p=="string"?p.includes(" ")?p:d.formatMessage({id:p},{action:d.formatMessage({id:`discussion_action_${e.type}`}),maxLength:i}):p})]})},ot=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:r,join:i,leave:c,notMemberStateText:u}})=>r&&!n?s.jsx(Ie,{text:u,button:{component:s.jsx(At,{functions:{join:i,leave:c}})}}):s.jsx(Lt,{content:{type:e,slugs:{}},functions:{create:t}}),Rr={showThread:!1,showForm:!1},Le=g.createContext(Rr),Un=({children:e})=>{const[t,n]=g.useState({showThread:!1,showForm:!1});return s.jsx(Le.Provider,{value:{...t,updateConversation:n},children:e})},Dr=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),Fr=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let De=!1;const kt=()=>{De!==!1&&(clearTimeout(De),De=!1)},jt=10,Wn=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:r=!0,userLiked:i=!1,content:c={type:"reply",slugs:{}},canLike:u=!0,functions:{createLike:o=()=>{},deleteLike:a=()=>{}}={}})=>{const d=C.useIntl();g.useEffect(()=>{p(i)},[i]);const[l,f]=g.useState(t),[h,p]=g.useState(i),[x,y]=g.useState(!1),[_,E]=g.useState(!1),j=g.useMemo(()=>Fr(n,jt),[n]),$=D=>{if(D.preventDefault(),D.stopPropagation(),E(!1),De)return kt(),!1;if(kt(),x||!u)return!1;De=setTimeout(R,350)},R=async()=>{if(kt(),x||!u)return!1;let D=h?l-1:l+1;D<0&&(D=0),y(!0),f(D),p(!h);try{if(c&&c.slugs){const B=Dr(c.slugs);h?await a(B):await o(B,{contentPath:window.location.pathname})}}catch{f(t),p(i)}finally{y(!1)}};return g.createElement(e,{className:T("likes-wrapper text-medium action-button",{"show-spinner":x,"is-liked":h,disabled:!u}),onClick:$,onMouseEnter:()=>{E(!0)},onMouseLeave:()=>{E(!1)},onFocus:()=>{E(!0)},onBlur:()=>{E(!1)},children:s.jsxs(s.Fragment,{children:[s.jsx(z,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:T({"do-animation":h&&!i}),screenreaderText:u?d.formatMessage({id:`discussion_likes_${h?"unlike":"like"}`},{action:d.formatMessage({id:`discussion_action_${c.type}`})}):!1,onClick:$,disabled:!u,"aria-hidden":!u,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${c.type}-click`}),s.jsx("span",{className:T("number-of-likes",{"no-likes":l===0}),"data-testid":"number-of-likes",children:d.formatMessage({id:`discussion_likes${r?"_short":""}`},{number:l})}),n&&s.jsx(wn,{isOpen:_,isLoading:n.length===0,children:n.length&&s.jsxs("ul",{children:[j.map(D=>typeof D=="string"||!D.name?null:s.jsx("li",{children:s.jsx(Pe,{href:D.id?`/profiles/${D.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:D.name})},D.id||window.btoa(D.name))),n.length>jt&&s.jsx("li",{children:d.formatMessage({id:"discussion_likes_more"},{number:n.length-jt})})]})})]})})};const zn=({element:e="section",children:t,className:n,...r})=>g.createElement(e,{className:T("modal",n),children:typeof t=="string"?s.jsx("p",{children:t}):t,...r});const Bt=({id:e="content-overlay",isOpen:t=!1,showDivider:n=!0,maxWidth:r,functions:{onOpen:i=()=>{},onClose:c=()=>{}}={},forceShow:{error:u=!1}={},title:o,children:a,buttons:d,className:l="",gtmContext:f="Modal"})=>{const h=C.useIntl(),[p,x]=g.useState(t),y=E=>{x(E),E?(i(),document.body.classList.add("has-overlay")):(c(),document.body.classList.remove("has-overlay"))};g.useEffect(()=>{y(t)},[t]);const _=r?{"--max-width":`${r/16}rem`}:{};return s.jsx("div",{className:T("overlay",{open:p}),children:s.jsx(zn,{id:e,className:T("overlay-modal",l,{"has-max-width":r}),hidden:!p,style:_,children:t&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"top",children:[o&&s.jsx("h2",{className:"modal-title",children:o}),s.jsx(z,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>y(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":f,screenreaderText:h.formatMessage({id:"overlay_close"})})]}),n&&s.jsx(ke,{}),a,d&&s.jsxs("div",{className:"bottom",children:[s.jsx(ke,{}),s.jsx(Ne,{buttons:d})]}),u&&s.jsx(qe,{className:"error",children:u})]})})})},Vn=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e});const Ar=({className:e,showModal:t=!0,title:n,formTitle:r="Know someone who might like to join this workshop?",formLabel:i="Send an invitation to your colleagues below",ctaMessage:c="Send invites",showIcon:u,onClose:o,reportError:a=()=>{},sendInvites:d})=>s.jsx(Bt,{title:n,isOpen:t,showDivider:!1,showIcon:u,className:T("invite-modal",e,{success:!!n}),children:s.jsx(Qn,{title:r,label:i,ctaMessage:c,onClose:o,sendInvites:d,reportError:a})}),cn=e=>{const t={};return Object.keys(e).forEach(n=>n.includes("Id")?t[n]=e[n]:t[`${n}Slug`]=e[n]),t},Ot=(e,t)=>e&&!t;const _e="discussion_",Nr=280,Be=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:r=!1,originalAuthorId:i,functions:{content:{createContent:c,deleteContent:u,updateContent:o}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:a,deleteLike:d}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:l}={openComments:()=>{}}},links:f={},className:h,gtmContext:p="DiscussionAnswer",children:x,isTruncated:y=!1})=>{const _=C.useIntl(),E=g.useContext(ve),j=g.useContext(Le),[$,R]=g.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[D,B]=g.useState(!1),[V,b]=g.useState("");if(g.useEffect(()=>{R({...$,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return s.jsx(fe,{className:"discussion-card discussion-post"});const{author:v,canLike:H,createdAt:k,id:Y,likes:P=0,userLiked:I,comments:Q=0}=t,W=y?tt($.body,Nr):$.body,X=E&&E.id&&typeof v!="string"&&v.id&&v.id===E.id||!1,se=typeof H=="boolean"?H:n?!X:!1,re=async A=>{A||(A=""),b("");try{if(!js(A,$.body)){const ee=t.type==="question"?{title:A}:{body:A};await o(cn(t.slugs),ee)}R({body:A,isEditing:!1,didEdit:!0})}catch{b(`${_e}form_error`)}},oe=()=>{j&&j.updateConversation&&j.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const ee=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,G=document.getElementById(ee),Z=document.getElementById(`${ee}-input`);Z&&Z.focus(),G&&G.scrollIntoView({behavior:"smooth"})},0)},ae=()=>{try{u(cn(t.slugs))}catch{b("delete-error")}},te=[{text:_.formatMessage({id:`${_e}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(_.formatMessage({id:`${_e}report_subject`}))}&body=${encodeURI(_.formatMessage({id:`${_e}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&X&&te.push({text:_.formatMessage({id:`${_e}moreMenu_edit`}),onClick:()=>R({...$,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`edit-${t.type}-click`},{text:_.formatMessage({id:`${_e}moreMenu_delete`}),onClick:A=>{A.preventDefault(),A.stopPropagation(),B(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`delete-${t.type}-click`,...Vn(`delete-${t.slug}-modal`,D)}),g.createElement(e,{className:T("discussion-post",h),"data-testid":`discussion-${t.type}-thread`,children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{id:Y||t.slug,className:T("discussion-card",t.type,{editing:$.isEditing,"has-link":f.post&&!$.isEditing}),onClick:A=>{!f.post||$.isEditing||(A.preventDefault(),A.stopPropagation(),window.location.href=f.post)},children:[!$.isEditing&&s.jsx(rt,{member:v,additionalContent:{createdAt:k,didEdit:$.didEdit},className:typeof v!="string"&&v.id===i?"highlighted":"",gtmContext:p,gtmType:"profile-click"}),$.isEditing?s.jsx(Lt,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:r,isInWrapper:!0,isEditing:{text:$.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:V!==""&&V!=="delete-error"?_.formatMessage({id:V},{action:_.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:c,handleSaveEdit:re,handleCancel:()=>{b(""),R({...$,isEditing:!1})}},gtmContext:`${p}Form`}):f.post?s.jsx("a",{href:f.post,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":"title-click",children:s.jsx(Tt,{options:{overrides:{a:yn}},children:W})}):s.jsx(Tt,{options:{wrapper:t.type==="question"?"h1":g.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:W}),!$.isEditing&&s.jsxs("ul",{className:T("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[s.jsx(Wn,{element:"li",likes:P,isShort:!1,userLiked:I,content:{type:t.type,slugs:t.slugs},canLike:se,functions:{createLike:a,deleteLike:d}}),(["question","post"].includes(t.type)||f.comments||typeof l=="function")&&s.jsxs("li",{className:"action-button",onClick:A=>{A.preventDefault(),A.stopPropagation(),f.comments&&(window.location.href=f.comments),typeof l=="function"&&l()},children:[s.jsx(z,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:f.comments?f.comments:!1,onClick:f.comments||typeof l!="function"?!1:l,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:_.formatMessage({id:`${_e}comments_screenReader`},{count:Q})}),s.jsx("span",{children:_.formatMessage({id:`${_e}comments`},{count:Q})})]}),(t.type==="answer"||t.type==="reply")&&s.jsx("li",{children:s.jsx(z,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:oe,children:_.formatMessage({id:`${_e}reply`})})}),s.jsx(Pn,{element:"li",id:`more-${t.slug}`,options:te})]})]}),x,s.jsx(Bt,{id:`delete-${t.slug}-modal`,isOpen:D,functions:{onOpen:()=>{},onClose:()=>B(!1)},forceShow:{error:V==="delete-error"?_.formatMessage({id:"discussion_delete_error"},{action:_.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:_.formatMessage({id:"discussion_delete_title"},{action:_.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>B(!1),children:_.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:ae,children:_.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:s.jsx(C.FormattedMessage,{id:"discussion_delete_text",values:{p:A=>s.jsx("p",{children:A}),action:_.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const yt="discussion_responses_",Pr=({type:e="answer",responses:t=0})=>{const n=C.useIntl();return s.jsxs("div",{className:"responses-heading",children:[s.jsx("h3",{children:n.formatMessage({id:`${yt}title`},{action:n.formatMessage({id:`${yt}${e}`}),count:t})}),t===0&&s.jsx("p",{children:me(n.formatMessage,`${yt}empty`,e,e)})]})};const Yn=({count:e=0,showRepliesButton:t=!0,children:n})=>{const r=C.useIntl(),i=g.useRef(null),c=g.useContext(Le),[u,o]=g.useState("closed");g.useEffect(()=>{const f=i.current;if(f)return f.addEventListener("transitionend",a),()=>{f.removeEventListener("transitionend",a)}},[]),we(()=>{u==="closed"&&!c.showThread||o(["opening","open"].includes(u)?"ready-to-close":"opening")},[c.showThread]),g.useEffect(()=>{u==="ready-to-close"&&o("closing")},[u]);const a=({propertyName:f})=>{f==="max-height"&&o(h=>h==="opening"?"open":h==="closing"?"closed":h)},d=["opening","open"].includes(u),l=bn(n,{element:"li"});return s.jsxs("div",{className:"thread-wrapper",children:[t&&s.jsx(z,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${d?"left":"right"}`},onClick:()=>{var f;(f=c.updateConversation)==null||f.call(c,h=>({showThread:!h.showThread,showForm:!1}))},children:r.formatMessage({id:`discussion_thread_${d?"hide":"show"}`},{count:e})}),s.jsx("ul",{ref:i,className:T("thread",u),hidden:!c.showThread,children:l})]})},Ir=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),Lr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({content:o})=>{if(!n)return;const a=Ir({user:n,content:o,verb:"post"});await e.cancelQueries({queryKey:t});const d=e.getQueryData(t);return e.setQueryData(t,l=>[...l,a]),{previousActivities:d}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Br=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:u,content:{body:o}})=>{if(o.length===0)return;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),d=a==null?void 0:a.map(l=>((l==null?void 0:l.id)===(u==null?void 0:u.activityId)&&(l.content=o),l));return e.setQueryData(t,()=>d&&[...d]),{previousActivities:d}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Or=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:o})=>{await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),d=a==null?void 0:a.map(l=>{var f;return(l==null?void 0:l.id)===o&&((f=l.reaction_counts)!=null&&f.like?l.reaction_counts.like+=1:l.reaction_counts.like=1),l});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:d}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivities)},onSuccess:o=>{const a=e.getQueryData(t),d=a==null?void 0:a.map(l=>{var f,h;return(l==null?void 0:l.id)===(o==null?void 0:o.activity_id)&&((f=l.own_reactions)!=null&&f.like?l.own_reactions.like.push(o):l.own_reactions.like=[o],(h=l.latest_reactions)!=null&&h.like?l.latest_reactions.like.push(o):l.latest_reactions.like=[o]),l});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:a}},onSettled:(o,a,d)=>{e.invalidateQueries({queryKey:[...t,d.activityId]})}}),Hr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:a})=>{await e.cancelQueries({queryKey:t});const d=e.getQueryData(t),l=d==null?void 0:d.map(f=>{var h;return(f==null?void 0:f.id)===a&&(h=f.reaction_counts)!=null&&h.like&&(f.reaction_counts.like-=1),f});return e.setQueryData(t,()=>l&&[...l]),{previousActivities:l}},onError:(a,d,l)=>{e.setQueryData(t,l.previousActivities)},onSuccess:(a,{activityId:d})=>{const l=e.getQueryData(t),f=l==null?void 0:l.map(h=>{var p,x,y,_,E;if(h.id===d){const j=(y=(x=(p=h.own_reactions)==null?void 0:p.like)==null?void 0:x.find($=>$.user_id===(n==null?void 0:n.id)))==null?void 0:y.id;return h.own_reactions.like=(_=h.own_reactions.like)==null?void 0:_.filter($=>$.id!==j),h.latest_reactions.like=(E=h.latest_reactions.like)==null?void 0:E.filter($=>$.id!==j),h}else return h});return e.setQueryData(t,()=>f&&[...f]),{previousActivities:l}},onSettled:(a,d,l)=>{e.invalidateQueries({queryKey:[...t,l.activityId]})}}),Qr=({basePath:e,parentId:t,isMember:n,functions:{list:r,create:i,edit:c,like:u,unlike:o,join:a,leave:d}})=>{const l=C.useIntl(),f=J.useQueryClient(),h=g.useContext(ve),{data:p,error:x,isLoading:y,isFetching:_}=J.useQuery({queryKey:[e,t],queryFn:r}),E=Lr({queryClient:f,queryKey:[e,t],user:h,mutationFn:i}),{mutate:j}=J.useMutation(E),$=Br({queryClient:f,queryKey:[e,t],mutationFn:async k=>await c(k)}),{mutate:R}=J.useMutation($),D=Or({queryClient:f,queryKey:[e,t],mutationFn:u}),{mutate:B}=J.useMutation(D),V=Hr({queryClient:f,queryKey:[e,t],user:h,mutationFn:async({activityId:k})=>{var I,Q,W;const Y=p&&(p==null?void 0:p.find(X=>X.id===k)),P=(W=(Q=(I=Y==null?void 0:Y.own_reactions)==null?void 0:I.like)==null?void 0:Q.find(X=>X.user_id===(h==null?void 0:h.id)))==null?void 0:W.id;await o({reactionId:P||"",activityId:k})}}),{mutate:b}=J.useMutation(V),v=g.useCallback(({activityId:k})=>B({activityId:k}),[B]),H=g.useCallback(({activityId:k})=>b({activityId:k}),[b]);return x?s.jsx(Ie,{variant:"error",text:x.message}):y?s.jsx(fe,{style:{height:"400px"}}):s.jsxs(s.Fragment,{children:[s.jsx(ot,{contentType:"post",createPost:j,membershipRequiredToPost:{isMember:n,required:!0,join:a,leave:d,notMemberStateText:l.formatMessage({id:"community_joinToPost"})}}),!_&&Array.isArray(p)&&(p==null?void 0:p.map(k=>{var I,Q,W,X,se,re,oe,ae,te,A,ee,G;const Y=((I=k==null?void 0:k.actor)==null?void 0:I.id)===(h==null?void 0:h.id),P=Ot(n,Y);return s.jsxs(g.Fragment,{children:[s.jsx(Be,{content:{type:"post",body:k==null?void 0:k.content,canLike:P,createdAt:(k==null?void 0:k.time)||"",slugs:{parentId:t,activityId:k==null?void 0:k.id},slug:k==null?void 0:k.id,author:{id:(Q=k==null?void 0:k.actor)==null?void 0:Q.id,name:`${(X=(W=k==null?void 0:k.actor)==null?void 0:W.data)==null?void 0:X.name}`,organization:(re=(se=k==null?void 0:k.actor)==null?void 0:se.data)==null?void 0:re.organization,jobTitle:(ae=(oe=k==null?void 0:k.actor)==null?void 0:oe.data)==null?void 0:ae.jobTitle,image:{thumbnail:((A=(te=k==null?void 0:k.actor)==null?void 0:te.data)==null?void 0:A.thumbnail)||void 0}},userLiked:((ee=k==null?void 0:k.own_reactions)==null?void 0:ee.like)&&((G=k==null?void 0:k.own_reactions)==null?void 0:G.like.length)>0,likes:(k==null?void 0:k.reaction_counts.like)||0,comments:(k==null?void 0:k.reaction_counts.reply)||0},links:{post:`${e}/${t}/${k==null?void 0:k.id}`,comments:`${e}/${t}/${k==null?void 0:k.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:(Z,le)=>R({activityInfo:Z,content:le})},likes:{createLike:()=>{v({activityId:k==null?void 0:k.id})},deleteLike:()=>{H({activityId:k==null?void 0:k.id})}},comments:{openComments:()=>null}},isTruncated:!0}),s.jsx(ke,{})]},k==null?void 0:k.id)}))]})},Ur=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:o=>{var d;const a=e.getQueryData(t);if(a)return(d=a==null?void 0:a.latest_reactions)!=null&&d.reply?(a.latest_reactions.reply.unshift(o),a&&(a.reaction_counts={reply:a.latest_reactions.reply.length})):(a.latest_reactions={reply:[o]},a.reaction_counts={reply:1}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Wr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyInfo:c,content:{body:u}})=>{var d,l,f;if(u.length===0)return;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t);if(!o||!((d=o==null?void 0:o.latest_reactions)!=null&&d.reply))return;const a=(f=(l=o==null?void 0:o.latest_reactions)==null?void 0:l.reply)==null?void 0:f.map(h=>(h.id===c.replySlug&&(h.data.content=u),h));return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}},onError:(c,u,o)=>{e.setQueryData(t,o.previousActivity)}}),zr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:u})=>{var d,l;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t),a=(l=(d=o==null?void 0:o.latest_reactions)==null?void 0:d.reply)==null?void 0:l.map(f=>{var h;return f.id===u&&((h=f.children_counts)!=null&&h.like?f.children_counts.like+=1:f.children_counts={like:1}),f});return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivity)},onSuccess:u=>{var d;const o=e.getQueryData(t),a=(d=o==null?void 0:o.latest_reactions.reply)==null?void 0:d.map(l=>{var f,h;return l.id===u.id&&((f=l.own_children)!=null&&f.like?l.own_children.like.push(u):l.own_children={like:[u]},(h=l.latest_children)!=null&&h.like?l.latest_children.like.push(u):l.latest_children={like:[u]}),l});return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}}}),Vr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:o})=>{var l;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);if(!a)return;const d=(l=a.latest_reactions.reply)==null?void 0:l.map(f=>(f.id===o&&f.children_counts.like&&(f.children_counts.like-=1),f));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:(o,{replyId:a})=>{var f;const d=e.getQueryData(t);if(!d)return;const l=(f=d.latest_reactions.reply)==null?void 0:f.map(h=>{var p,x,y;if(h.id===a){let _=(p=h.latest_children.reply)==null?void 0:p.filter(E=>E.user_id!==(n==null?void 0:n.id));return _=(y=(x=h==null?void 0:h.own_children)==null?void 0:x.reply)==null?void 0:y.filter(E=>E.user_id!==(n==null?void 0:n.id)),_}return h});return e.setQueryData(t,()=>({...d,latest_reactions:{reply:l}})),{previousActivity:d}}}),Yr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onSuccess:o=>{var l;const a=e.getQueryData(t),d=(l=a==null?void 0:a.latest_reactions.reply)==null?void 0:l.map(f=>(f.id===o.parent&&(f.latest_children.reply&&f.children_counts.reply?(f.latest_children.reply.push(o),f.children_counts.reply+=1):(f.latest_children.reply=[o],f.children_counts.reply=1)),f));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Gr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onError:(c,u,o)=>{e.setQueryData(t,o.previousActivity)},onMutate:async({replyInfo:c,content:{body:u}})=>{var d,l,f;if(u.length===0)return;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t);if(!o||!((d=o==null?void 0:o.latest_reactions)!=null&&d.reply))return;const a=(f=(l=o==null?void 0:o.latest_reactions)==null?void 0:l.reply)==null?void 0:f.map(h=>{var p;return h.id===c.replyParentId&&((p=h.latest_children.reply)==null||p.map(x=>(x.id===c.replySlug&&(x.data.content=u),x))),h});return e.setQueryData(t,()=>({...o,latest_reactions:{reply:a}})),{previousActivity:o}}}),un=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:u,replyParentId:o})=>{var l;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),d=(l=a==null?void 0:a.latest_reactions.reply)==null?void 0:l.map(f=>{var h;return f.id===o&&((h=f.latest_children.reply)==null||h.map(p=>{var x;return p.id===u&&((x=p.children_counts)!=null&&x.like?p.children_counts.like+=1:p.children_counts={like:1}),p})),f});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivity)},onSuccess:(u,o)=>{var l;const a=e.getQueryData(t),d=(l=a==null?void 0:a.latest_reactions.reply)==null?void 0:l.map(f=>{var h;return f.id===o.replyParentId&&((h=f.latest_children.reply)==null||h.map(p=>(p.id===o.replyId&&(p.latest_children=p.latest_children||{},p.own_children=p.own_children||{},p.latest_children.like=p.latest_children.like||[],p.own_children.like=p.own_children.like||[],p.latest_children.like.push(u),p.own_children.like.push(u)),p))),f});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:d}})),{previousActivity:a}}}),Jr=({basePath:e,parentId:t,replyParentId:n,activityId:r,replyCount:i,replies:c,functions:{create:u,edit:o,join:a,leave:d,like:l,unlike:f}})=>{const h=C.useIntl(),p=J.useQueryClient(),x=g.useContext(Le),y=Yr({queryClient:p,queryKey:[e,t,r],mutationFn:async v=>u({replyId:n,content:v.body})}),{mutate:_}=J.useMutation(y),E=Gr({queryClient:p,queryKey:[e,t,r],mutationFn:o}),{mutate:j}=J.useMutation(E),$=un({queryClient:p,queryKey:[e,t,r],mutationFn:l}),{mutate:R}=J.useMutation($),D=un({queryClient:p,queryKey:[e,t,r],mutationFn:f}),{mutate:B}=J.useMutation(D),V=g.useCallback(({replyId:v,replyParentId:H})=>R({replyId:v,replyParentId:H}),[R]),b=g.useCallback(({replyId:v,replyParentId:H})=>B({replyId:v,replyParentId:H}),[B]);return s.jsx(Yn,{count:i,showRepliesButton:i>0||x.showForm,children:s.jsxs(s.Fragment,{children:[x.showForm&&s.jsx(ot,{contentType:"reply",createPost:(v,H)=>_(H),membershipRequiredToPost:{isMember:!0,required:!0,join:a,leave:d,notMemberStateText:h.formatMessage({id:"community_joinToPost"})}}),(c==null?void 0:c.length)===0||(c==null?void 0:c.map(v=>{var H,k,Y,P,I,Q,W,X,se,re,oe,ae,te,A,ee;return s.jsx(Be,{content:{type:"reply",body:typeof v.data.content=="string"?(H=v==null?void 0:v.data)==null?void 0:H.content:((Y=(k=v==null?void 0:v.data)==null?void 0:k.content)==null?void 0:Y.text)||"",createdAt:v==null?void 0:v.created_at,slugs:{parentId:t,activityId:r,replyParentId:v==null?void 0:v.parent,reply:v==null?void 0:v.id},slug:"",author:{id:(P=v==null?void 0:v.user)==null?void 0:P.id,name:(Q=(I=v==null?void 0:v.user)==null?void 0:I.data)==null?void 0:Q.name,organization:(X=(W=v==null?void 0:v.user)==null?void 0:W.data)==null?void 0:X.organization,jobTitle:(re=(se=v==null?void 0:v.user)==null?void 0:se.data)==null?void 0:re.jobTitle,image:{thumbnail:((ae=(oe=v==null?void 0:v.user)==null?void 0:oe.data)==null?void 0:ae.thumbnail)||void 0}},userLiked:((te=v==null?void 0:v.own_children)==null?void 0:te.like)&&((A=v==null?void 0:v.own_children)==null?void 0:A.like.length)>0,likes:((ee=v==null?void 0:v.children_counts)==null?void 0:ee.like)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(G,Z)=>j({replyInfo:G,content:Z})},likes:{createLike:()=>V({replyId:v==null?void 0:v.id,replyParentId:v==null?void 0:v.parent}),deleteLike:()=>{var Z,le,ue;const G=((Z=v==null?void 0:v.own_children)==null?void 0:Z.like)&&((ue=(le=v==null?void 0:v.own_children)==null?void 0:le.like[0])==null?void 0:ue.id);return b({replyId:G||""})}},comments:{}}},v==null?void 0:v.id)}))]})})},Gn=({basePath:e,parentId:t,activityId:n,repliesList:r,isMember:i,functions:{createReply:c,editReply:u,like:o,unlike:a,join:d,leave:l}})=>{const f=C.useIntl(),h=J.useQueryClient(),p=g.useContext(ve),x=Ur({queryClient:h,queryKey:[e,t,n],mutationFn:async b=>c({activityId:n,content:b.body})}),{mutate:y}=J.useMutation(x),_=Wr({queryClient:h,queryKey:[e,t,n],mutationFn:async b=>u(b)}),{mutate:E}=J.useMutation(_),j=zr({queryClient:h,queryKey:[e,t,n],mutationFn:o}),{mutate:$}=J.useMutation(j),R=Vr({queryClient:h,queryKey:[e,t,n],user:p,mutationFn:a}),{mutate:D}=J.useMutation(R),B=g.useCallback(({replyId:b})=>$({replyId:b}),[$]),V=g.useCallback(({replyId:b})=>D({replyId:b}),[D]);return s.jsxs(s.Fragment,{children:[s.jsx(ot,{contentType:"reply",createPost:(b,v)=>y(v),membershipRequiredToPost:{isMember:i,required:!0,join:d,leave:l,notMemberStateText:f.formatMessage({id:"community_joinToPost"})}}),(r==null?void 0:r.length)===0||(r==null?void 0:r.map(b=>{var k,Y,P,I,Q,W,X,se,re,oe,ae,te,A,ee,G,Z,le,ue;const v=((k=b==null?void 0:b.user)==null?void 0:k.id)===(p==null?void 0:p.id),H=Ot(i,v);return s.jsx(Un,{children:s.jsx(Be,{content:{type:"reply",body:typeof b.data.content=="string"?(Y=b==null?void 0:b.data)==null?void 0:Y.content:((I=(P=b==null?void 0:b.data)==null?void 0:P.content)==null?void 0:I.text)||"",canLike:H,createdAt:b==null?void 0:b.created_at,slugs:{question:`${e}/${t}/${n}`,parentId:t,reply:b==null?void 0:b.id},slug:`${e}/${t}/${n}#${b==null?void 0:b.id}`,author:{id:(Q=b==null?void 0:b.user)==null?void 0:Q.id,name:(X=(W=b==null?void 0:b.user)==null?void 0:W.data)==null?void 0:X.name,organization:(re=(se=b==null?void 0:b.user)==null?void 0:se.data)==null?void 0:re.organization,jobTitle:(ae=(oe=b==null?void 0:b.user)==null?void 0:oe.data)==null?void 0:ae.jobTitle,image:{thumbnail:((A=(te=b==null?void 0:b.user)==null?void 0:te.data)==null?void 0:A.thumbnail)||void 0}},userLiked:((ee=b==null?void 0:b.own_children)==null?void 0:ee.like)&&((G=b==null?void 0:b.own_children)==null?void 0:G.like.length)>0,likes:((Z=b==null?void 0:b.children_counts)==null?void 0:Z.like)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(he,pe)=>E({replyInfo:he,content:pe})},likes:{createLike:()=>B({replyId:b==null?void 0:b.id}),deleteLike:()=>{var pe,Oe,Te;const he=((pe=b==null?void 0:b.own_children)==null?void 0:pe.like)&&((Te=(Oe=b==null?void 0:b.own_children)==null?void 0:Oe.like[0])==null?void 0:Te.id);return V({replyId:he||""})}},comments:{}},children:s.jsx(Jr,{basePath:e,parentId:t,replyParentId:b==null?void 0:b.id,activityId:n,replyCount:((le=b==null?void 0:b.children_counts)==null?void 0:le.reply)||0,replies:(ue=b==null?void 0:b.latest_children)==null?void 0:ue.reply,isMember:i,functions:{create:c,edit:u,like:o,unlike:a,join:d,leave:l}})},b==null?void 0:b.id)},b==null?void 0:b.id)}))]})},Xr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:u,content:{body:o}})=>{if(o.length===0)return;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);return a&&a.id===(u==null?void 0:u.activityId)&&(a.content=o),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onError:(u,o,a)=>{e.setQueryData(t,a.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Zr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var a;await e.cancelQueries({queryKey:t});const o=e.getQueryData(t);return(a=o==null?void 0:o.reaction_counts)!=null&&a.like?o.reaction_counts.like+=1:o&&(o.reaction_counts={like:1}),e.setQueryData(t,()=>({...o})),{previousActivity:o}},onError:(o,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:o=>{const a=e.getQueryData(t);return a!=null&&a.own_reactions.like?a.own_reactions.like.push(o):a&&(a.own_reactions={like:[o]}),a!=null&&a.latest_reactions.like?a.latest_reactions.like.push(o):a&&(a.latest_reactions={like:[o]}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),qr=({queryClient:e,queryKey:t,user:n,activity:r,mutationFn:i})=>({mutationFn:i,onMutate:async()=>{var l;await e.cancelQueries({queryKey:t});const d=e.getQueryData(t);return(l=d==null?void 0:d.reaction_counts)!=null&&l.like&&d.reaction_counts.like>0&&(d.reaction_counts.like-=1),e.setQueryData(t,()=>({...d})),{previousActivity:d}},onError:(d,l,f)=>{e.setQueryData(t,f.previousActivity)},onSuccess:()=>{var f,h,p;if(!r)return;const d=(p=(h=(f=r.own_reactions)==null?void 0:f.like)==null?void 0:h.find(x=>x.user_id===(n==null?void 0:n.id)))==null?void 0:p.id,l=e.getQueryData(t);if(l!=null&&l.own_reactions.like&&(l.own_reactions.like=l.own_reactions.like.filter(x=>x.id!==d),!!(l!=null&&l.latest_reactions.like)))return l.latest_reactions.like=l.latest_reactions.like.filter(x=>x.id!==d),e.setQueryData(t,()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:t})}});const Kr=({basePath:e,parentId:t,activityId:n,isMember:r,functions:{get:i,editActivity:c,likeActivity:u,unlikeActivity:o,createReply:a,editReply:d,likeReply:l,unlikeReply:f,join:h,leave:p}})=>{var I,Q,W,X,se,re,oe,ae,te,A,ee;const x=g.useContext(ve),y=J.useQueryClient(),{data:_,error:E,isLoading:j,isFetching:$}=J.useQuery({queryKey:[e,t,n],queryFn:i}),R=Xr({queryClient:y,queryKey:[e,t,n],mutationFn:async G=>await c(G)}),{mutate:D}=J.useMutation(R),B=Zr({queryClient:y,queryKey:[e,t,n],mutationFn:u}),{mutate:V}=J.useMutation(B),b=qr({queryClient:y,queryKey:[e,t,n],user:x,mutationFn:async()=>{var Z,le,ue;const G=(ue=(le=(Z=_==null?void 0:_.own_reactions)==null?void 0:Z.like)==null?void 0:le.find(he=>he.user_id===(x==null?void 0:x.id)))==null?void 0:ue.id;await o({activityId:n,reactionId:G})},activity:_}),{mutate:v}=J.useMutation(b),H=g.useCallback(({activityId:G})=>V({activityId:G}),[V]),k=g.useCallback(async({activityId:G})=>v({activityId:G}),[v]);if(E)return s.jsx(Ie,{variant:"error",text:E.message});if(j||$)return s.jsx(fe,{style:{height:"400px"}});const Y=((I=_==null?void 0:_.actor)==null?void 0:I.id)===(x==null?void 0:x.id),P=Ot(r,Y);return s.jsx(Be,{className:"activity-section",content:{type:"post",body:_==null?void 0:_.content,canLike:P,createdAt:(_==null?void 0:_.time)||"",slugs:{question:`${t}/${n}`,parentId:t,activityId:_==null?void 0:_.id},slug:n,author:{id:(Q=_==null?void 0:_.actor)==null?void 0:Q.id,name:(W=_==null?void 0:_.actor)==null?void 0:W.data.name,organization:(X=_==null?void 0:_.actor)==null?void 0:X.data.organization,jobTitle:(se=_==null?void 0:_.actor)==null?void 0:se.data.jobTitle,image:{thumbnail:((re=_==null?void 0:_.actor)==null?void 0:re.data.thumbnail)||void 0}},userLiked:((oe=_==null?void 0:_.own_reactions)==null?void 0:oe.like)&&((ae=_==null?void 0:_.own_reactions)==null?void 0:ae.like.length)>0,likes:_&&(_==null?void 0:_.reaction_counts.like),comments:_&&(_==null?void 0:_.reaction_counts.reply)},originalAuthorId:(te=_==null?void 0:_.actor)==null?void 0:te.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(G,Z)=>D({activityInfo:G,content:Z})},likes:{createLike:()=>H({activityId:n}),deleteLike:()=>k({activityId:n})},comments:{openComments:()=>{}}},children:s.jsxs(s.Fragment,{children:[s.jsxs("h3",{children:["Comments (",((A=_==null?void 0:_.reaction_counts)==null?void 0:A.reply)||0,")"]}),s.jsx(Gn,{basePath:e,parentId:t,activityId:n,repliesList:(ee=_==null?void 0:_.latest_reactions)==null?void 0:ee.reply,isMember:r,functions:{createReply:a,like:l,unlike:f,editReply:d,join:h,leave:p}})]})},n)},eo=({id:e,data:{jobTitle:t,name:n,organization:r,thumbnail:i}})=>({id:e,name:n,jobTitle:t,organization:r,image:{thumbnail:i}});exports.ASSETS_BUCKET=Ze;exports.ActivitiesFeed=Qr;exports.ActivitySection=Kr;exports.AddPost=ot;exports.BannerSection=Gs;exports.Breadcrumbs=hr;exports.Button=z;exports.ButtonWrapper=Ne;exports.CacheProvider=Rn;exports.CollapsibleSection=Dt;exports.Columns=br;exports.CommunityDetails=fr;exports.Contributors=Cn;exports.ConversationContext=Le;exports.CookieBanner=In;exports.DiscussionConversation=Un;exports.DiscussionForm=Lt;exports.DiscussionLikes=Wn;exports.DiscussionPost=Be;exports.DiscussionThread=Yn;exports.Divider=ke;exports.DownloadSection=Ws;exports.EMAILS=Se;exports.EmailHelperTextBox=vr;exports.EmptyStateBox=Ie;exports.Filters=pr;exports.FlagsProvider=Dn;exports.Footer=Pt;exports.FullWidthSection=Rt;exports.GlobalProviders=mr;exports.Header=It;exports.HelperTextBox=jn;exports.HiddenFromScreenReaders=Mt;exports.HideShowTextBox=Zs;exports.HighlightedTextBox=be;exports.IntlProvider=Fn;exports.InviteForm=Qn;exports.InviteModal=Ar;exports.JoinButton=At;exports.LanguageSwitcher=_r;exports.Link=Pe;exports.LoadMore=Nn;exports.LoadingBlock=ir;exports.LoadingPlaceholder=fe;exports.LoadingState=$n;exports.Logo=Nt;exports.LogoSection=zs;exports.MarkdownText=Tt;exports.MarketingBox=Js;exports.Member=rt;exports.MembersList=Cr;exports.Modal=zn;exports.MoreMenu=Pn;exports.NUMBER_OF_USERS=Xs;exports.Overlay=Bt;exports.PageLayout=Tr;exports.PasswordRules=jr;exports.Pill=Sn;exports.ProfilePicture=st;exports.ProgressBar=En;exports.Rating=yr;exports.RepliesFeed=Gn;exports.ResponsesHeading=Pr;exports.ResponsiveImage=vn;exports.SearchForm=Hn;exports.Span=yn;exports.StatusBanner=qe;exports.Tags=Mr;exports.Tooltip=wn;exports.UserContext=ve;exports.UserProvider=An;exports.VisuallyHidden=ne;exports.addAriaProps=Vn;exports.getMember=Ft;exports.headerData=Fe;exports.mapGetStreamData=eo;exports.useCurrentPath=hn;exports.useEffectAfterMount=we;exports.useScreenWidth=Ae;exports.useScrollListener=gn;exports.useScrollToHash=Rs;
|